Browse code

Remove old version 5

Benjamin Roth authored on14/03/2021 15:27:00
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,7733 +0,0 @@
1
-/**
2
- * Swiper 5.4.0
3
- * Most modern mobile touch slider and framework with hardware accelerated transitions
4
- * http://swiperjs.com
5
- *
6
- * Copyright 2014-2020 Vladimir Kharlampidi
7
- *
8
- * Released under the MIT License
9
- *
10
- * Released on: May 15, 2020
11
- */
12
-
13
-import { $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, data, transform, transition as transition$1, on, off, trigger, transitionEnd as transitionEnd$1, outerWidth, outerHeight, offset, css, each, html, text, is, index, eq, append, prepend, next, nextAll, prev, prevAll, parent, parents, closest, find, children, filter, remove, add, styles } from 'dom7/dist/dom7.modular';
14
-import { window, document as document$1 } from 'ssr-window';
15
-
16
-const Methods = {
17
-  addClass,
18
-  removeClass,
19
-  hasClass,
20
-  toggleClass,
21
-  attr,
22
-  removeAttr,
23
-  data,
24
-  transform,
25
-  transition: transition$1,
26
-  on,
27
-  off,
28
-  trigger,
29
-  transitionEnd: transitionEnd$1,
30
-  outerWidth,
31
-  outerHeight,
32
-  offset,
33
-  css,
34
-  each,
35
-  html,
36
-  text,
37
-  is,
38
-  index,
39
-  eq,
40
-  append,
41
-  prepend,
42
-  next,
43
-  nextAll,
44
-  prev,
45
-  prevAll,
46
-  parent,
47
-  parents,
48
-  closest,
49
-  find,
50
-  children,
51
-  filter,
52
-  remove,
53
-  add,
54
-  styles,
55
-};
56
-
57
-Object.keys(Methods).forEach((methodName) => {
58
-  $.fn[methodName] = $.fn[methodName] || Methods[methodName];
59
-});
60
-
61
-const Utils = {
62
-  deleteProps(obj) {
63
-    const object = obj;
64
-    Object.keys(object).forEach((key) => {
65
-      try {
66
-        object[key] = null;
67
-      } catch (e) {
68
-        // no getter for object
69
-      }
70
-      try {
71
-        delete object[key];
72
-      } catch (e) {
73
-        // something got wrong
74
-      }
75
-    });
76
-  },
77
-  nextTick(callback, delay = 0) {
78
-    return setTimeout(callback, delay);
79
-  },
80
-  now() {
81
-    return Date.now();
82
-  },
83
-  getTranslate(el, axis = 'x') {
84
-    let matrix;
85
-    let curTransform;
86
-    let transformMatrix;
87
-
88
-    const curStyle = window.getComputedStyle(el, null);
89
-
90
-    if (window.WebKitCSSMatrix) {
91
-      curTransform = curStyle.transform || curStyle.webkitTransform;
92
-      if (curTransform.split(',').length > 6) {
93
-        curTransform = curTransform.split(', ').map((a) => a.replace(',', '.')).join(', ');
94
-      }
95
-      // Some old versions of Webkit choke when 'none' is passed; pass
96
-      // empty string instead in this case
97
-      transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
98
-    } else {
99
-      transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
100
-      matrix = transformMatrix.toString().split(',');
101
-    }
102
-
103
-    if (axis === 'x') {
104
-      // Latest Chrome and webkits Fix
105
-      if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
106
-      // Crazy IE10 Matrix
107
-      else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
108
-      // Normal Browsers
109
-      else curTransform = parseFloat(matrix[4]);
110
-    }
111
-    if (axis === 'y') {
112
-      // Latest Chrome and webkits Fix
113
-      if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
114
-      // Crazy IE10 Matrix
115
-      else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
116
-      // Normal Browsers
117
-      else curTransform = parseFloat(matrix[5]);
118
-    }
119
-    return curTransform || 0;
120
-  },
121
-  parseUrlQuery(url) {
122
-    const query = {};
123
-    let urlToParse = url || window.location.href;
124
-    let i;
125
-    let params;
126
-    let param;
127
-    let length;
128
-    if (typeof urlToParse === 'string' && urlToParse.length) {
129
-      urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : '';
130
-      params = urlToParse.split('&').filter((paramsPart) => paramsPart !== '');
131
-      length = params.length;
132
-
133
-      for (i = 0; i < length; i += 1) {
134
-        param = params[i].replace(/#\S+/g, '').split('=');
135
-        query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';
136
-      }
137
-    }
138
-    return query;
139
-  },
140
-  isObject(o) {
141
-    return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
142
-  },
143
-  extend(...args) {
144
-    const to = Object(args[0]);
145
-    for (let i = 1; i < args.length; i += 1) {
146
-      const nextSource = args[i];
147
-      if (nextSource !== undefined && nextSource !== null) {
148
-        const keysArray = Object.keys(Object(nextSource));
149
-        for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
150
-          const nextKey = keysArray[nextIndex];
151
-          const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
152
-          if (desc !== undefined && desc.enumerable) {
153
-            if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
154
-              Utils.extend(to[nextKey], nextSource[nextKey]);
155
-            } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
156
-              to[nextKey] = {};
157
-              Utils.extend(to[nextKey], nextSource[nextKey]);
158
-            } else {
159
-              to[nextKey] = nextSource[nextKey];
160
-            }
161
-          }
162
-        }
163
-      }
164
-    }
165
-    return to;
166
-  },
167
-};
168
-
169
-const Support = (function Support() {
170
-  return {
171
-    touch: !!(('ontouchstart' in window) || (window.DocumentTouch && document$1 instanceof window.DocumentTouch)),
172
-
173
-    pointerEvents: !!window.PointerEvent && ('maxTouchPoints' in window.navigator) && window.navigator.maxTouchPoints >= 0,
174
-
175
-    observer: (function checkObserver() {
176
-      return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
177
-    }()),
178
-
179
-    passiveListener: (function checkPassiveListener() {
180
-      let supportsPassive = false;
181
-      try {
182
-        const opts = Object.defineProperty({}, 'passive', {
183
-          // eslint-disable-next-line
184
-          get() {
185
-            supportsPassive = true;
186
-          },
187
-        });
188
-        window.addEventListener('testPassiveListener', null, opts);
189
-      } catch (e) {
190
-        // No support
191
-      }
192
-      return supportsPassive;
193
-    }()),
194
-
195
-    gestures: (function checkGestures() {
196
-      return 'ongesturestart' in window;
197
-    }()),
198
-  };
199
-}());
200
-
201
-class SwiperClass {
202
-  constructor(params = {}) {
203
-    const self = this;
204
-    self.params = params;
205
-
206
-    // Events
207
-    self.eventsListeners = {};
208
-
209
-    if (self.params && self.params.on) {
210
-      Object.keys(self.params.on).forEach((eventName) => {
211
-        self.on(eventName, self.params.on[eventName]);
212
-      });
213
-    }
214
-  }
215
-
216
-  on(events, handler, priority) {
217
-    const self = this;
218
-    if (typeof handler !== 'function') return self;
219
-    const method = priority ? 'unshift' : 'push';
220
-    events.split(' ').forEach((event) => {
221
-      if (!self.eventsListeners[event]) self.eventsListeners[event] = [];
222
-      self.eventsListeners[event][method](handler);
223
-    });
224
-    return self;
225
-  }
226
-
227
-  once(events, handler, priority) {
228
-    const self = this;
229
-    if (typeof handler !== 'function') return self;
230
-    function onceHandler(...args) {
231
-      self.off(events, onceHandler);
232
-      if (onceHandler.f7proxy) {
233
-        delete onceHandler.f7proxy;
234
-      }
235
-      handler.apply(self, args);
236
-    }
237
-    onceHandler.f7proxy = handler;
238
-    return self.on(events, onceHandler, priority);
239
-  }
240
-
241
-  off(events, handler) {
242
-    const self = this;
243
-    if (!self.eventsListeners) return self;
244
-    events.split(' ').forEach((event) => {
245
-      if (typeof handler === 'undefined') {
246
-        self.eventsListeners[event] = [];
247
-      } else if (self.eventsListeners[event] && self.eventsListeners[event].length) {
248
-        self.eventsListeners[event].forEach((eventHandler, index) => {
249
-          if (eventHandler === handler || (eventHandler.f7proxy && eventHandler.f7proxy === handler)) {
250
-            self.eventsListeners[event].splice(index, 1);
251
-          }
252
-        });
253
-      }
254
-    });
255
-    return self;
256
-  }
257
-
258
-  emit(...args) {
259
-    const self = this;
260
-    if (!self.eventsListeners) return self;
261
-    let events;
262
-    let data;
263
-    let context;
264
-    if (typeof args[0] === 'string' || Array.isArray(args[0])) {
265
-      events = args[0];
266
-      data = args.slice(1, args.length);
267
-      context = self;
268
-    } else {
269
-      events = args[0].events;
270
-      data = args[0].data;
271
-      context = args[0].context || self;
272
-    }
273
-    const eventsArray = Array.isArray(events) ? events : events.split(' ');
274
-    eventsArray.forEach((event) => {
275
-      if (self.eventsListeners && self.eventsListeners[event]) {
276
-        const handlers = [];
277
-        self.eventsListeners[event].forEach((eventHandler) => {
278
-          handlers.push(eventHandler);
279
-        });
280
-        handlers.forEach((eventHandler) => {
281
-          eventHandler.apply(context, data);
282
-        });
283
-      }
284
-    });
285
-    return self;
286
-  }
287
-
288
-  useModulesParams(instanceParams) {
289
-    const instance = this;
290
-    if (!instance.modules) return;
291
-    Object.keys(instance.modules).forEach((moduleName) => {
292
-      const module = instance.modules[moduleName];
293
-      // Extend params
294
-      if (module.params) {
295
-        Utils.extend(instanceParams, module.params);
296
-      }
297
-    });
298
-  }
299
-
300
-  useModules(modulesParams = {}) {
301
-    const instance = this;
302
-    if (!instance.modules) return;
303
-    Object.keys(instance.modules).forEach((moduleName) => {
304
-      const module = instance.modules[moduleName];
305
-      const moduleParams = modulesParams[moduleName] || {};
306
-      // Extend instance methods and props
307
-      if (module.instance) {
308
-        Object.keys(module.instance).forEach((modulePropName) => {
309
-          const moduleProp = module.instance[modulePropName];
310
-          if (typeof moduleProp === 'function') {
311
-            instance[modulePropName] = moduleProp.bind(instance);
312
-          } else {
313
-            instance[modulePropName] = moduleProp;
314
-          }
315
-        });
316
-      }
317
-      // Add event listeners
318
-      if (module.on && instance.on) {
319
-        Object.keys(module.on).forEach((moduleEventName) => {
320
-          instance.on(moduleEventName, module.on[moduleEventName]);
321
-        });
322
-      }
323
-
324
-      // Module create callback
325
-      if (module.create) {
326
-        module.create.bind(instance)(moduleParams);
327
-      }
328
-    });
329
-  }
330
-
331
-  static set components(components) {
332
-    const Class = this;
333
-    if (!Class.use) return;
334
-    Class.use(components);
335
-  }
336
-
337
-  static installModule(module, ...params) {
338
-    const Class = this;
339
-    if (!Class.prototype.modules) Class.prototype.modules = {};
340
-    const name = module.name || (`${Object.keys(Class.prototype.modules).length}_${Utils.now()}`);
341
-    Class.prototype.modules[name] = module;
342
-    // Prototype
343
-    if (module.proto) {
344
-      Object.keys(module.proto).forEach((key) => {
345
-        Class.prototype[key] = module.proto[key];
346
-      });
347
-    }
348
-    // Class
349
-    if (module.static) {
350
-      Object.keys(module.static).forEach((key) => {
351
-        Class[key] = module.static[key];
352
-      });
353
-    }
354
-    // Callback
355
-    if (module.install) {
356
-      module.install.apply(Class, params);
357
-    }
358
-    return Class;
359
-  }
360
-
361
-  static use(module, ...params) {
362
-    const Class = this;
363
-    if (Array.isArray(module)) {
364
-      module.forEach((m) => Class.installModule(m));
365
-      return Class;
366
-    }
367
-    return Class.installModule(module, ...params);
368
-  }
369
-}
370
-
371
-function updateSize () {
372
-  const swiper = this;
373
-  let width;
374
-  let height;
375
-  const $el = swiper.$el;
376
-  if (typeof swiper.params.width !== 'undefined') {
377
-    width = swiper.params.width;
378
-  } else {
379
-    width = $el[0].clientWidth;
380
-  }
381
-  if (typeof swiper.params.height !== 'undefined') {
382
-    height = swiper.params.height;
383
-  } else {
384
-    height = $el[0].clientHeight;
385
-  }
386
-  if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {
387
-    return;
388
-  }
389
-
390
-  // Subtract paddings
391
-  width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);
392
-  height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);
393
-
394
-  Utils.extend(swiper, {
395
-    width,
396
-    height,
397
-    size: swiper.isHorizontal() ? width : height,
398
-  });
399
-}
400
-
401
-function updateSlides () {
402
-  const swiper = this;
403
-  const params = swiper.params;
404
-
405
-  const {
406
-    $wrapperEl, size: swiperSize, rtlTranslate: rtl, wrongRTL,
407
-  } = swiper;
408
-  const isVirtual = swiper.virtual && params.virtual.enabled;
409
-  const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
410
-  const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);
411
-  const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
412
-  let snapGrid = [];
413
-  const slidesGrid = [];
414
-  const slidesSizesGrid = [];
415
-
416
-  function slidesForMargin(slideIndex) {
417
-    if (!params.cssMode) return true;
418
-    if (slideIndex === slides.length - 1) {
419
-      return false;
420
-    }
421
-    return true;
422
-  }
423
-
424
-  let offsetBefore = params.slidesOffsetBefore;
425
-  if (typeof offsetBefore === 'function') {
426
-    offsetBefore = params.slidesOffsetBefore.call(swiper);
427
-  }
428
-
429
-  let offsetAfter = params.slidesOffsetAfter;
430
-  if (typeof offsetAfter === 'function') {
431
-    offsetAfter = params.slidesOffsetAfter.call(swiper);
432
-  }
433
-
434
-  const previousSnapGridLength = swiper.snapGrid.length;
435
-  const previousSlidesGridLength = swiper.snapGrid.length;
436
-
437
-  let spaceBetween = params.spaceBetween;
438
-  let slidePosition = -offsetBefore;
439
-  let prevSlideSize = 0;
440
-  let index = 0;
441
-  if (typeof swiperSize === 'undefined') {
442
-    return;
443
-  }
444
-  if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
445
-    spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;
446
-  }
447
-
448
-  swiper.virtualSize = -spaceBetween;
449
-
450
-  // reset margins
451
-  if (rtl) slides.css({ marginLeft: '', marginTop: '' });
452
-  else slides.css({ marginRight: '', marginBottom: '' });
453
-
454
-  let slidesNumberEvenToRows;
455
-  if (params.slidesPerColumn > 1) {
456
-    if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {
457
-      slidesNumberEvenToRows = slidesLength;
458
-    } else {
459
-      slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;
460
-    }
461
-    if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {
462
-      slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);
463
-    }
464
-  }
465
-
466
-  // Calc slides
467
-  let slideSize;
468
-  const slidesPerColumn = params.slidesPerColumn;
469
-  const slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
470
-  const numFullColumns = Math.floor(slidesLength / params.slidesPerColumn);
471
-  for (let i = 0; i < slidesLength; i += 1) {
472
-    slideSize = 0;
473
-    const slide = slides.eq(i);
474
-    if (params.slidesPerColumn > 1) {
475
-      // Set slides order
476
-      let newSlideOrderIndex;
477
-      let column;
478
-      let row;
479
-      if (params.slidesPerColumnFill === 'row' && params.slidesPerGroup > 1) {
480
-        const groupIndex = Math.floor(i / (params.slidesPerGroup * params.slidesPerColumn));
481
-        const slideIndexInGroup = i - params.slidesPerColumn * params.slidesPerGroup * groupIndex;
482
-        const columnsInGroup = groupIndex === 0
483
-          ? params.slidesPerGroup
484
-          : Math.min(Math.ceil((slidesLength - groupIndex * slidesPerColumn * params.slidesPerGroup) / slidesPerColumn), params.slidesPerGroup);
485
-        row = Math.floor(slideIndexInGroup / columnsInGroup);
486
-        column = (slideIndexInGroup - row * columnsInGroup) + groupIndex * params.slidesPerGroup;
487
-
488
-        newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn);
489
-        slide
490
-          .css({
491
-            '-webkit-box-ordinal-group': newSlideOrderIndex,
492
-            '-moz-box-ordinal-group': newSlideOrderIndex,
493
-            '-ms-flex-order': newSlideOrderIndex,
494
-            '-webkit-order': newSlideOrderIndex,
495
-            order: newSlideOrderIndex,
496
-          });
497
-      } else if (params.slidesPerColumnFill === 'column') {
498
-        column = Math.floor(i / slidesPerColumn);
499
-        row = i - (column * slidesPerColumn);
500
-        if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) {
501
-          row += 1;
502
-          if (row >= slidesPerColumn) {
503
-            row = 0;
504
-            column += 1;
505
-          }
506
-        }
507
-      } else {
508
-        row = Math.floor(i / slidesPerRow);
509
-        column = i - (row * slidesPerRow);
510
-      }
511
-      slide.css(
512
-        `margin-${swiper.isHorizontal() ? 'top' : 'left'}`,
513
-        (row !== 0 && params.spaceBetween) && (`${params.spaceBetween}px`)
514
-      );
515
-    }
516
-    if (slide.css('display') === 'none') continue; // eslint-disable-line
517
-
518
-    if (params.slidesPerView === 'auto') {
519
-      const slideStyles = window.getComputedStyle(slide[0], null);
520
-      const currentTransform = slide[0].style.transform;
521
-      const currentWebKitTransform = slide[0].style.webkitTransform;
522
-      if (currentTransform) {
523
-        slide[0].style.transform = 'none';
524
-      }
525
-      if (currentWebKitTransform) {
526
-        slide[0].style.webkitTransform = 'none';
527
-      }
528
-      if (params.roundLengths) {
529
-        slideSize = swiper.isHorizontal()
530
-          ? slide.outerWidth(true)
531
-          : slide.outerHeight(true);
532
-      } else {
533
-        // eslint-disable-next-line
534
-        if (swiper.isHorizontal()) {
535
-          const width = parseFloat(slideStyles.getPropertyValue('width'));
536
-          const paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left'));
537
-          const paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right'));
538
-          const marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left'));
539
-          const marginRight = parseFloat(slideStyles.getPropertyValue('margin-right'));
540
-          const boxSizing = slideStyles.getPropertyValue('box-sizing');
541
-          if (boxSizing && boxSizing === 'border-box') {
542
-            slideSize = width + marginLeft + marginRight;
543
-          } else {
544
-            slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight;
545
-          }
546
-        } else {
547
-          const height = parseFloat(slideStyles.getPropertyValue('height'));
548
-          const paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top'));
549
-          const paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom'));
550
-          const marginTop = parseFloat(slideStyles.getPropertyValue('margin-top'));
551
-          const marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom'));
552
-          const boxSizing = slideStyles.getPropertyValue('box-sizing');
553
-          if (boxSizing && boxSizing === 'border-box') {
554
-            slideSize = height + marginTop + marginBottom;
555
-          } else {
556
-            slideSize = height + paddingTop + paddingBottom + marginTop + marginBottom;
557
-          }
558
-        }
559
-      }
560
-      if (currentTransform) {
561
-        slide[0].style.transform = currentTransform;
562
-      }
563
-      if (currentWebKitTransform) {
564
-        slide[0].style.webkitTransform = currentWebKitTransform;
565
-      }
566
-      if (params.roundLengths) slideSize = Math.floor(slideSize);
567
-    } else {
568
-      slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView;
569
-      if (params.roundLengths) slideSize = Math.floor(slideSize);
570
-
571
-      if (slides[i]) {
572
-        if (swiper.isHorizontal()) {
573
-          slides[i].style.width = `${slideSize}px`;
574
-        } else {
575
-          slides[i].style.height = `${slideSize}px`;
576
-        }
577
-      }
578
-    }
579
-    if (slides[i]) {
580
-      slides[i].swiperSlideSize = slideSize;
581
-    }
582
-    slidesSizesGrid.push(slideSize);
583
-
584
-
585
-    if (params.centeredSlides) {
586
-      slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween;
587
-      if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
588
-      if (i === 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
589
-      if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;
590
-      if (params.roundLengths) slidePosition = Math.floor(slidePosition);
591
-      if ((index) % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
592
-      slidesGrid.push(slidePosition);
593
-    } else {
594
-      if (params.roundLengths) slidePosition = Math.floor(slidePosition);
595
-      if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);
596
-      slidesGrid.push(slidePosition);
597
-      slidePosition = slidePosition + slideSize + spaceBetween;
598
-    }
599
-
600
-    swiper.virtualSize += slideSize + spaceBetween;
601
-
602
-    prevSlideSize = slideSize;
603
-
604
-    index += 1;
605
-  }
606
-  swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
607
-  let newSlidesGrid;
608
-
609
-  if (
610
-    rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
611
-    $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
612
-  }
613
-  if (params.setWrapperSize) {
614
-    if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
615
-    else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
616
-  }
617
-
618
-  if (params.slidesPerColumn > 1) {
619
-    swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;
620
-    swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;
621
-    if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
622
-    else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
623
-    if (params.centeredSlides) {
624
-      newSlidesGrid = [];
625
-      for (let i = 0; i < snapGrid.length; i += 1) {
626
-        let slidesGridItem = snapGrid[i];
627
-        if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
628
-        if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);
629
-      }
630
-      snapGrid = newSlidesGrid;
631
-    }
632
-  }
633
-
634
-  // Remove last grid elements depending on width
635
-  if (!params.centeredSlides) {
636
-    newSlidesGrid = [];
637
-    for (let i = 0; i < snapGrid.length; i += 1) {
638
-      let slidesGridItem = snapGrid[i];
639
-      if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
640
-      if (snapGrid[i] <= swiper.virtualSize - swiperSize) {
641
-        newSlidesGrid.push(slidesGridItem);
642
-      }
643
-    }
644
-    snapGrid = newSlidesGrid;
645
-    if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
646
-      snapGrid.push(swiper.virtualSize - swiperSize);
647
-    }
648
-  }
649
-  if (snapGrid.length === 0) snapGrid = [0];
650
-
651
-  if (params.spaceBetween !== 0) {
652
-    if (swiper.isHorizontal()) {
653
-      if (rtl) slides.filter(slidesForMargin).css({ marginLeft: `${spaceBetween}px` });
654
-      else slides.filter(slidesForMargin).css({ marginRight: `${spaceBetween}px` });
655
-    } else slides.filter(slidesForMargin).css({ marginBottom: `${spaceBetween}px` });
656
-  }
657
-
658
-  if (params.centeredSlides && params.centeredSlidesBounds) {
659
-    let allSlidesSize = 0;
660
-    slidesSizesGrid.forEach((slideSizeValue) => {
661
-      allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);
662
-    });
663
-    allSlidesSize -= params.spaceBetween;
664
-    const maxSnap = allSlidesSize - swiperSize;
665
-    snapGrid = snapGrid.map((snap) => {
666
-      if (snap < 0) return -offsetBefore;
667
-      if (snap > maxSnap) return maxSnap + offsetAfter;
668
-      return snap;
669
-    });
670
-  }
671
-
672
-  if (params.centerInsufficientSlides) {
673
-    let allSlidesSize = 0;
674
-    slidesSizesGrid.forEach((slideSizeValue) => {
675
-      allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);
676
-    });
677
-    allSlidesSize -= params.spaceBetween;
678
-    if (allSlidesSize < swiperSize) {
679
-      const allSlidesOffset = (swiperSize - allSlidesSize) / 2;
680
-      snapGrid.forEach((snap, snapIndex) => {
681
-        snapGrid[snapIndex] = snap - allSlidesOffset;
682
-      });
683
-      slidesGrid.forEach((snap, snapIndex) => {
684
-        slidesGrid[snapIndex] = snap + allSlidesOffset;
685
-      });
686
-    }
687
-  }
688
-
689
-  Utils.extend(swiper, {
690
-    slides,
691
-    snapGrid,
692
-    slidesGrid,
693
-    slidesSizesGrid,
694
-  });
695
-
696
-  if (slidesLength !== previousSlidesLength) {
697
-    swiper.emit('slidesLengthChange');
698
-  }
699
-  if (snapGrid.length !== previousSnapGridLength) {
700
-    if (swiper.params.watchOverflow) swiper.checkOverflow();
701
-    swiper.emit('snapGridLengthChange');
702
-  }
703
-  if (slidesGrid.length !== previousSlidesGridLength) {
704
-    swiper.emit('slidesGridLengthChange');
705
-  }
706
-
707
-  if (params.watchSlidesProgress || params.watchSlidesVisibility) {
708
-    swiper.updateSlidesOffset();
709
-  }
710
-}
711
-
712
-function updateAutoHeight (speed) {
713
-  const swiper = this;
714
-  const activeSlides = [];
715
-  let newHeight = 0;
716
-  let i;
717
-  if (typeof speed === 'number') {
718
-    swiper.setTransition(speed);
719
-  } else if (speed === true) {
720
-    swiper.setTransition(swiper.params.speed);
721
-  }
722
-  // Find slides currently in view
723
-  if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
724
-    if (swiper.params.centeredSlides) {
725
-      swiper.visibleSlides.each((index, slide) => {
726
-        activeSlides.push(slide);
727
-      });
728
-    } else {
729
-      for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
730
-        const index = swiper.activeIndex + i;
731
-        if (index > swiper.slides.length) break;
732
-        activeSlides.push(swiper.slides.eq(index)[0]);
733
-      }
734
-    }
735
-  } else {
736
-    activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);
737
-  }
738
-
739
-  // Find new height from highest slide in view
740
-  for (i = 0; i < activeSlides.length; i += 1) {
741
-    if (typeof activeSlides[i] !== 'undefined') {
742
-      const height = activeSlides[i].offsetHeight;
743
-      newHeight = height > newHeight ? height : newHeight;
744
-    }
745
-  }
746
-
747
-  // Update Height
748
-  if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);
749
-}
750
-
751
-function updateSlidesOffset () {
752
-  const swiper = this;
753
-  const slides = swiper.slides;
754
-  for (let i = 0; i < slides.length; i += 1) {
755
-    slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
756
-  }
757
-}
758
-
759
-function updateSlidesProgress (translate = (this && this.translate) || 0) {
760
-  const swiper = this;
761
-  const params = swiper.params;
762
-
763
-  const { slides, rtlTranslate: rtl } = swiper;
764
-
765
-  if (slides.length === 0) return;
766
-  if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
767
-
768
-  let offsetCenter = -translate;
769
-  if (rtl) offsetCenter = translate;
770
-
771
-  // Visible Slides
772
-  slides.removeClass(params.slideVisibleClass);
773
-
774
-  swiper.visibleSlidesIndexes = [];
775
-  swiper.visibleSlides = [];
776
-
777
-  for (let i = 0; i < slides.length; i += 1) {
778
-    const slide = slides[i];
779
-    const slideProgress = (
780
-      (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset
781
-    ) / (slide.swiperSlideSize + params.spaceBetween);
782
-    if (params.watchSlidesVisibility || (params.centeredSlides && params.autoHeight)) {
783
-      const slideBefore = -(offsetCenter - slide.swiperSlideOffset);
784
-      const slideAfter = slideBefore + swiper.slidesSizesGrid[i];
785
-      const isVisible = (slideBefore >= 0 && slideBefore < swiper.size - 1)
786
-                || (slideAfter > 1 && slideAfter <= swiper.size)
787
-                || (slideBefore <= 0 && slideAfter >= swiper.size);
788
-      if (isVisible) {
789
-        swiper.visibleSlides.push(slide);
790
-        swiper.visibleSlidesIndexes.push(i);
791
-        slides.eq(i).addClass(params.slideVisibleClass);
792
-      }
793
-    }
794
-    slide.progress = rtl ? -slideProgress : slideProgress;
795
-  }
796
-  swiper.visibleSlides = $(swiper.visibleSlides);
797
-}
798
-
799
-function updateProgress (translate) {
800
-  const swiper = this;
801
-  if (typeof translate === 'undefined') {
802
-    const multiplier = swiper.rtlTranslate ? -1 : 1;
803
-    // eslint-disable-next-line
804
-    translate = (swiper && swiper.translate && (swiper.translate * multiplier)) || 0;
805
-  }
806
-  const params = swiper.params;
807
-  const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
808
-  let { progress, isBeginning, isEnd } = swiper;
809
-  const wasBeginning = isBeginning;
810
-  const wasEnd = isEnd;
811
-  if (translatesDiff === 0) {
812
-    progress = 0;
813
-    isBeginning = true;
814
-    isEnd = true;
815
-  } else {
816
-    progress = (translate - swiper.minTranslate()) / (translatesDiff);
817
-    isBeginning = progress <= 0;
818
-    isEnd = progress >= 1;
819
-  }
820
-  Utils.extend(swiper, {
821
-    progress,
822
-    isBeginning,
823
-    isEnd,
824
-  });
825
-
826
-  if (params.watchSlidesProgress || params.watchSlidesVisibility || (params.centeredSlides && params.autoHeight)) swiper.updateSlidesProgress(translate);
827
-
828
-  if (isBeginning && !wasBeginning) {
829
-    swiper.emit('reachBeginning toEdge');
830
-  }
831
-  if (isEnd && !wasEnd) {
832
-    swiper.emit('reachEnd toEdge');
833
-  }
834
-  if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {
835
-    swiper.emit('fromEdge');
836
-  }
837
-
838
-  swiper.emit('progress', progress);
839
-}
840
-
841
-function updateSlidesClasses () {
842
-  const swiper = this;
843
-
844
-  const {
845
-    slides, params, $wrapperEl, activeIndex, realIndex,
846
-  } = swiper;
847
-  const isVirtual = swiper.virtual && params.virtual.enabled;
848
-
849
-  slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);
850
-
851
-  let activeSlide;
852
-  if (isVirtual) {
853
-    activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`);
854
-  } else {
855
-    activeSlide = slides.eq(activeIndex);
856
-  }
857
-
858
-  // Active classes
859
-  activeSlide.addClass(params.slideActiveClass);
860
-
861
-  if (params.loop) {
862
-    // Duplicate to all looped slides
863
-    if (activeSlide.hasClass(params.slideDuplicateClass)) {
864
-      $wrapperEl
865
-        .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`)
866
-        .addClass(params.slideDuplicateActiveClass);
867
-    } else {
868
-      $wrapperEl
869
-        .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`)
870
-        .addClass(params.slideDuplicateActiveClass);
871
-    }
872
-  }
873
-  // Next Slide
874
-  let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);
875
-  if (params.loop && nextSlide.length === 0) {
876
-    nextSlide = slides.eq(0);
877
-    nextSlide.addClass(params.slideNextClass);
878
-  }
879
-  // Prev Slide
880
-  let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);
881
-  if (params.loop && prevSlide.length === 0) {
882
-    prevSlide = slides.eq(-1);
883
-    prevSlide.addClass(params.slidePrevClass);
884
-  }
885
-  if (params.loop) {
886
-    // Duplicate to all looped slides
887
-    if (nextSlide.hasClass(params.slideDuplicateClass)) {
888
-      $wrapperEl
889
-        .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
890
-        .addClass(params.slideDuplicateNextClass);
891
-    } else {
892
-      $wrapperEl
893
-        .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
894
-        .addClass(params.slideDuplicateNextClass);
895
-    }
896
-    if (prevSlide.hasClass(params.slideDuplicateClass)) {
897
-      $wrapperEl
898
-        .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
899
-        .addClass(params.slideDuplicatePrevClass);
900
-    } else {
901
-      $wrapperEl
902
-        .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
903
-        .addClass(params.slideDuplicatePrevClass);
904
-    }
905
-  }
906
-}
907
-
908
-function updateActiveIndex (newActiveIndex) {
909
-  const swiper = this;
910
-  const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
911
-  const {
912
-    slidesGrid, snapGrid, params, activeIndex: previousIndex, realIndex: previousRealIndex, snapIndex: previousSnapIndex,
913
-  } = swiper;
914
-  let activeIndex = newActiveIndex;
915
-  let snapIndex;
916
-  if (typeof activeIndex === 'undefined') {
917
-    for (let i = 0; i < slidesGrid.length; i += 1) {
918
-      if (typeof slidesGrid[i + 1] !== 'undefined') {
919
-        if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) {
920
-          activeIndex = i;
921
-        } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
922
-          activeIndex = i + 1;
923
-        }
924
-      } else if (translate >= slidesGrid[i]) {
925
-        activeIndex = i;
926
-      }
927
-    }
928
-    // Normalize slideIndex
929
-    if (params.normalizeSlideIndex) {
930
-      if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;
931
-    }
932
-  }
933
-  if (snapGrid.indexOf(translate) >= 0) {
934
-    snapIndex = snapGrid.indexOf(translate);
935
-  } else {
936
-    const skip = Math.min(params.slidesPerGroupSkip, activeIndex);
937
-    snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);
938
-  }
939
-  if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
940
-  if (activeIndex === previousIndex) {
941
-    if (snapIndex !== previousSnapIndex) {
942
-      swiper.snapIndex = snapIndex;
943
-      swiper.emit('snapIndexChange');
944
-    }
945
-    return;
946
-  }
947
-
948
-  // Get real index
949
-  const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);
950
-
951
-  Utils.extend(swiper, {
952
-    snapIndex,
953
-    realIndex,
954
-    previousIndex,
955
-    activeIndex,
956
-  });
957
-  swiper.emit('activeIndexChange');
958
-  swiper.emit('snapIndexChange');
959
-  if (previousRealIndex !== realIndex) {
960
-    swiper.emit('realIndexChange');
961
-  }
962
-  if (swiper.initialized || swiper.params.runCallbacksOnInit) {
963
-    swiper.emit('slideChange');
964
-  }
965
-}
966
-
967
-function updateClickedSlide (e) {
968
-  const swiper = this;
969
-  const params = swiper.params;
970
-  const slide = $(e.target).closest(`.${params.slideClass}`)[0];
971
-  let slideFound = false;
972
-  if (slide) {
973
-    for (let i = 0; i < swiper.slides.length; i += 1) {
974
-      if (swiper.slides[i] === slide) slideFound = true;
975
-    }
976
-  }
977
-
978
-  if (slide && slideFound) {
979
-    swiper.clickedSlide = slide;
980
-    if (swiper.virtual && swiper.params.virtual.enabled) {
981
-      swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);
982
-    } else {
983
-      swiper.clickedIndex = $(slide).index();
984
-    }
985
-  } else {
986
-    swiper.clickedSlide = undefined;
987
-    swiper.clickedIndex = undefined;
988
-    return;
989
-  }
990
-  if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {
991
-    swiper.slideToClickedSlide();
992
-  }
993
-}
994
-
995
-var update = {
996
-  updateSize,
997
-  updateSlides,
998
-  updateAutoHeight,
999
-  updateSlidesOffset,
1000
-  updateSlidesProgress,
1001
-  updateProgress,
1002
-  updateSlidesClasses,
1003
-  updateActiveIndex,
1004
-  updateClickedSlide,
1005
-};
1006
-
1007
-function getTranslate (axis = this.isHorizontal() ? 'x' : 'y') {
1008
-  const swiper = this;
1009
-
1010
-  const {
1011
-    params, rtlTranslate: rtl, translate, $wrapperEl,
1012
-  } = swiper;
1013
-
1014
-  if (params.virtualTranslate) {
1015
-    return rtl ? -translate : translate;
1016
-  }
1017
-  if (params.cssMode) {
1018
-    return translate;
1019
-  }
1020
-
1021
-  let currentTranslate = Utils.getTranslate($wrapperEl[0], axis);
1022
-  if (rtl) currentTranslate = -currentTranslate;
1023
-
1024
-  return currentTranslate || 0;
1025
-}
1026
-
1027
-function setTranslate (translate, byController) {
1028
-  const swiper = this;
1029
-  const {
1030
-    rtlTranslate: rtl, params, $wrapperEl, wrapperEl, progress,
1031
-  } = swiper;
1032
-  let x = 0;
1033
-  let y = 0;
1034
-  const z = 0;
1035
-
1036
-  if (swiper.isHorizontal()) {
1037
-    x = rtl ? -translate : translate;
1038
-  } else {
1039
-    y = translate;
1040
-  }
1041
-
1042
-  if (params.roundLengths) {
1043
-    x = Math.floor(x);
1044
-    y = Math.floor(y);
1045
-  }
1046
-
1047
-  if (params.cssMode) {
1048
-    wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;
1049
-  } else if (!params.virtualTranslate) {
1050
-    $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);
1051
-  }
1052
-  swiper.previousTranslate = swiper.translate;
1053
-  swiper.translate = swiper.isHorizontal() ? x : y;
1054
-
1055
-  // Check if we need to update progress
1056
-  let newProgress;
1057
-  const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
1058
-  if (translatesDiff === 0) {
1059
-    newProgress = 0;
1060
-  } else {
1061
-    newProgress = (translate - swiper.minTranslate()) / (translatesDiff);
1062
-  }
1063
-  if (newProgress !== progress) {
1064
-    swiper.updateProgress(translate);
1065
-  }
1066
-
1067
-  swiper.emit('setTranslate', swiper.translate, byController);
1068
-}
1069
-
1070
-function minTranslate () {
1071
-  return (-this.snapGrid[0]);
1072
-}
1073
-
1074
-function maxTranslate () {
1075
-  return (-this.snapGrid[this.snapGrid.length - 1]);
1076
-}
1077
-
1078
-function translateTo (translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {
1079
-  const swiper = this;
1080
-
1081
-  const {
1082
-    params,
1083
-    wrapperEl,
1084
-  } = swiper;
1085
-
1086
-  if (swiper.animating && params.preventInteractionOnTransition) {
1087
-    return false;
1088
-  }
1089
-
1090
-  const minTranslate = swiper.minTranslate();
1091
-  const maxTranslate = swiper.maxTranslate();
1092
-  let newTranslate;
1093
-  if (translateBounds && translate > minTranslate) newTranslate = minTranslate;
1094
-  else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;
1095
-  else newTranslate = translate;
1096
-
1097
-  // Update progress
1098
-  swiper.updateProgress(newTranslate);
1099
-
1100
-  if (params.cssMode) {
1101
-    const isH = swiper.isHorizontal();
1102
-    if (speed === 0) {
1103
-      wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;
1104
-    } else {
1105
-      // eslint-disable-next-line
1106
-      if (wrapperEl.scrollTo) {
1107
-        wrapperEl.scrollTo({
1108
-          [isH ? 'left' : 'top']: -newTranslate,
1109
-          behavior: 'smooth',
1110
-        });
1111
-      } else {
1112
-        wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;
1113
-      }
1114
-    }
1115
-    return true;
1116
-  }
1117
-
1118
-  if (speed === 0) {
1119
-    swiper.setTransition(0);
1120
-    swiper.setTranslate(newTranslate);
1121
-    if (runCallbacks) {
1122
-      swiper.emit('beforeTransitionStart', speed, internal);
1123
-      swiper.emit('transitionEnd');
1124
-    }
1125
-  } else {
1126
-    swiper.setTransition(speed);
1127
-    swiper.setTranslate(newTranslate);
1128
-    if (runCallbacks) {
1129
-      swiper.emit('beforeTransitionStart', speed, internal);
1130
-      swiper.emit('transitionStart');
1131
-    }
1132
-    if (!swiper.animating) {
1133
-      swiper.animating = true;
1134
-      if (!swiper.onTranslateToWrapperTransitionEnd) {
1135
-        swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {
1136
-          if (!swiper || swiper.destroyed) return;
1137
-          if (e.target !== this) return;
1138
-          swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
1139
-          swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);
1140
-          swiper.onTranslateToWrapperTransitionEnd = null;
1141
-          delete swiper.onTranslateToWrapperTransitionEnd;
1142
-          if (runCallbacks) {
1143
-            swiper.emit('transitionEnd');
1144
-          }
1145
-        };
1146
-      }
1147
-      swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
1148
-      swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);
1149
-    }
1150
-  }
1151
-
1152
-  return true;
1153
-}
1154
-
1155
-var translate = {
1156
-  getTranslate,
1157
-  setTranslate,
1158
-  minTranslate,
1159
-  maxTranslate,
1160
-  translateTo,
1161
-};
1162
-
1163
-function setTransition (duration, byController) {
1164
-  const swiper = this;
1165
-
1166
-  if (!swiper.params.cssMode) {
1167
-    swiper.$wrapperEl.transition(duration);
1168
-  }
1169
-
1170
-  swiper.emit('setTransition', duration, byController);
1171
-}
1172
-
1173
-function transitionStart (runCallbacks = true, direction) {
1174
-  const swiper = this;
1175
-  const { activeIndex, params, previousIndex } = swiper;
1176
-  if (params.cssMode) return;
1177
-  if (params.autoHeight) {
1178
-    swiper.updateAutoHeight();
1179
-  }
1180
-
1181
-  let dir = direction;
1182
-  if (!dir) {
1183
-    if (activeIndex > previousIndex) dir = 'next';
1184
-    else if (activeIndex < previousIndex) dir = 'prev';
1185
-    else dir = 'reset';
1186
-  }
1187
-
1188
-  swiper.emit('transitionStart');
1189
-
1190
-  if (runCallbacks && activeIndex !== previousIndex) {
1191
-    if (dir === 'reset') {
1192
-      swiper.emit('slideResetTransitionStart');
1193
-      return;
1194
-    }
1195
-    swiper.emit('slideChangeTransitionStart');
1196
-    if (dir === 'next') {
1197
-      swiper.emit('slideNextTransitionStart');
1198
-    } else {
1199
-      swiper.emit('slidePrevTransitionStart');
1200
-    }
1201
-  }
1202
-}
1203
-
1204
-function transitionEnd (runCallbacks = true, direction) {
1205
-  const swiper = this;
1206
-  const { activeIndex, previousIndex, params } = swiper;
1207
-  swiper.animating = false;
1208
-  if (params.cssMode) return;
1209
-  swiper.setTransition(0);
1210
-
1211
-  let dir = direction;
1212
-  if (!dir) {
1213
-    if (activeIndex > previousIndex) dir = 'next';
1214
-    else if (activeIndex < previousIndex) dir = 'prev';
1215
-    else dir = 'reset';
1216
-  }
1217
-
1218
-  swiper.emit('transitionEnd');
1219
-
1220
-  if (runCallbacks && activeIndex !== previousIndex) {
1221
-    if (dir === 'reset') {
1222
-      swiper.emit('slideResetTransitionEnd');
1223
-      return;
1224
-    }
1225
-    swiper.emit('slideChangeTransitionEnd');
1226
-    if (dir === 'next') {
1227
-      swiper.emit('slideNextTransitionEnd');
1228
-    } else {
1229
-      swiper.emit('slidePrevTransitionEnd');
1230
-    }
1231
-  }
1232
-}
1233
-
1234
-var transition = {
1235
-  setTransition,
1236
-  transitionStart,
1237
-  transitionEnd,
1238
-};
1239
-
1240
-function slideTo (index = 0, speed = this.params.speed, runCallbacks = true, internal) {
1241
-  const swiper = this;
1242
-  let slideIndex = index;
1243
-  if (slideIndex < 0) slideIndex = 0;
1244
-
1245
-  const {
1246
-    params, snapGrid, slidesGrid, previousIndex, activeIndex, rtlTranslate: rtl, wrapperEl,
1247
-  } = swiper;
1248
-  if (swiper.animating && params.preventInteractionOnTransition) {
1249
-    return false;
1250
-  }
1251
-
1252
-  const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
1253
-  let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
1254
-  if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
1255
-
1256
-  if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {
1257
-    swiper.emit('beforeSlideChangeStart');
1258
-  }
1259
-
1260
-  const translate = -snapGrid[snapIndex];
1261
-
1262
-  // Update progress
1263
-  swiper.updateProgress(translate);
1264
-
1265
-  // Normalize slideIndex
1266
-  if (params.normalizeSlideIndex) {
1267
-    for (let i = 0; i < slidesGrid.length; i += 1) {
1268
-      if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {
1269
-        slideIndex = i;
1270
-      }
1271
-    }
1272
-  }
1273
-  // Directions locks
1274
-  if (swiper.initialized && slideIndex !== activeIndex) {
1275
-    if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
1276
-      return false;
1277
-    }
1278
-    if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {
1279
-      if ((activeIndex || 0) !== slideIndex) return false;
1280
-    }
1281
-  }
1282
-
1283
-  let direction;
1284
-  if (slideIndex > activeIndex) direction = 'next';
1285
-  else if (slideIndex < activeIndex) direction = 'prev';
1286
-  else direction = 'reset';
1287
-
1288
-
1289
-  // Update Index
1290
-  if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {
1291
-    swiper.updateActiveIndex(slideIndex);
1292
-    // Update Height
1293
-    if (params.autoHeight) {
1294
-      swiper.updateAutoHeight();
1295
-    }
1296
-    swiper.updateSlidesClasses();
1297
-    if (params.effect !== 'slide') {
1298
-      swiper.setTranslate(translate);
1299
-    }
1300
-    if (direction !== 'reset') {
1301
-      swiper.transitionStart(runCallbacks, direction);
1302
-      swiper.transitionEnd(runCallbacks, direction);
1303
-    }
1304
-    return false;
1305
-  }
1306
-  if (params.cssMode) {
1307
-    const isH = swiper.isHorizontal();
1308
-    let t = -translate;
1309
-    if (rtl) {
1310
-      t = wrapperEl.scrollWidth - wrapperEl.offsetWidth - t;
1311
-    }
1312
-    if (speed === 0) {
1313
-      wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;
1314
-    } else {
1315
-      // eslint-disable-next-line
1316
-      if (wrapperEl.scrollTo) {
1317
-        wrapperEl.scrollTo({
1318
-          [isH ? 'left' : 'top']: t,
1319
-          behavior: 'smooth',
1320
-        });
1321
-      } else {
1322
-        wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;
1323
-      }
1324
-    }
1325
-    return true;
1326
-  }
1327
-
1328
-  if (speed === 0) {
1329
-    swiper.setTransition(0);
1330
-    swiper.setTranslate(translate);
1331
-    swiper.updateActiveIndex(slideIndex);
1332
-    swiper.updateSlidesClasses();
1333
-    swiper.emit('beforeTransitionStart', speed, internal);
1334
-    swiper.transitionStart(runCallbacks, direction);
1335
-    swiper.transitionEnd(runCallbacks, direction);
1336
-  } else {
1337
-    swiper.setTransition(speed);
1338
-    swiper.setTranslate(translate);
1339
-    swiper.updateActiveIndex(slideIndex);
1340
-    swiper.updateSlidesClasses();
1341
-    swiper.emit('beforeTransitionStart', speed, internal);
1342
-    swiper.transitionStart(runCallbacks, direction);
1343
-    if (!swiper.animating) {
1344
-      swiper.animating = true;
1345
-      if (!swiper.onSlideToWrapperTransitionEnd) {
1346
-        swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
1347
-          if (!swiper || swiper.destroyed) return;
1348
-          if (e.target !== this) return;
1349
-          swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
1350
-          swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
1351
-          swiper.onSlideToWrapperTransitionEnd = null;
1352
-          delete swiper.onSlideToWrapperTransitionEnd;
1353
-          swiper.transitionEnd(runCallbacks, direction);
1354
-        };
1355
-      }
1356
-      swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
1357
-      swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
1358
-    }
1359
-  }
1360
-
1361
-  return true;
1362
-}
1363
-
1364
-function slideToLoop (index = 0, speed = this.params.speed, runCallbacks = true, internal) {
1365
-  const swiper = this;
1366
-  let newIndex = index;
1367
-  if (swiper.params.loop) {
1368
-    newIndex += swiper.loopedSlides;
1369
-  }
1370
-
1371
-  return swiper.slideTo(newIndex, speed, runCallbacks, internal);
1372
-}
1373
-
1374
-/* eslint no-unused-vars: "off" */
1375
-function slideNext (speed = this.params.speed, runCallbacks = true, internal) {
1376
-  const swiper = this;
1377
-  const { params, animating } = swiper;
1378
-  const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup;
1379
-  if (params.loop) {
1380
-    if (animating) return false;
1381
-    swiper.loopFix();
1382
-    // eslint-disable-next-line
1383
-    swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
1384
-  }
1385
-  return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);
1386
-}
1387
-
1388
-/* eslint no-unused-vars: "off" */
1389
-function slidePrev (speed = this.params.speed, runCallbacks = true, internal) {
1390
-  const swiper = this;
1391
-  const {
1392
-    params, animating, snapGrid, slidesGrid, rtlTranslate,
1393
-  } = swiper;
1394
-
1395
-  if (params.loop) {
1396
-    if (animating) return false;
1397
-    swiper.loopFix();
1398
-    // eslint-disable-next-line
1399
-    swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
1400
-  }
1401
-  const translate = rtlTranslate ? swiper.translate : -swiper.translate;
1402
-  function normalize(val) {
1403
-    if (val < 0) return -Math.floor(Math.abs(val));
1404
-    return Math.floor(val);
1405
-  }
1406
-  const normalizedTranslate = normalize(translate);
1407
-  const normalizedSnapGrid = snapGrid.map((val) => normalize(val));
1408
-  const normalizedSlidesGrid = slidesGrid.map((val) => normalize(val));
1409
-
1410
-  const currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];
1411
-  let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
1412
-  if (typeof prevSnap === 'undefined' && params.cssMode) {
1413
-    snapGrid.forEach((snap) => {
1414
-      if (!prevSnap && normalizedTranslate >= snap) prevSnap = snap;
1415
-    });
1416
-  }
1417
-  let prevIndex;
1418
-  if (typeof prevSnap !== 'undefined') {
1419
-    prevIndex = slidesGrid.indexOf(prevSnap);
1420
-    if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;
1421
-  }
1422
-  return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
1423
-}
1424
-
1425
-/* eslint no-unused-vars: "off" */
1426
-function slideReset (speed = this.params.speed, runCallbacks = true, internal) {
1427
-  const swiper = this;
1428
-  return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
1429
-}
1430
-
1431
-/* eslint no-unused-vars: "off" */
1432
-function slideToClosest (speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) {
1433
-  const swiper = this;
1434
-  let index = swiper.activeIndex;
1435
-  const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
1436
-  const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);
1437
-
1438
-  const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
1439
-
1440
-  if (translate >= swiper.snapGrid[snapIndex]) {
1441
-    // The current translate is on or after the current snap index, so the choice
1442
-    // is between the current index and the one after it.
1443
-    const currentSnap = swiper.snapGrid[snapIndex];
1444
-    const nextSnap = swiper.snapGrid[snapIndex + 1];
1445
-    if ((translate - currentSnap) > (nextSnap - currentSnap) * threshold) {
1446
-      index += swiper.params.slidesPerGroup;
1447
-    }
1448
-  } else {
1449
-    // The current translate is before the current snap index, so the choice
1450
-    // is between the current index and the one before it.
1451
-    const prevSnap = swiper.snapGrid[snapIndex - 1];
1452
-    const currentSnap = swiper.snapGrid[snapIndex];
1453
-    if ((translate - prevSnap) <= (currentSnap - prevSnap) * threshold) {
1454
-      index -= swiper.params.slidesPerGroup;
1455
-    }
1456
-  }
1457
-  index = Math.max(index, 0);
1458
-  index = Math.min(index, swiper.slidesGrid.length - 1);
1459
-
1460
-  return swiper.slideTo(index, speed, runCallbacks, internal);
1461
-}
1462
-
1463
-function slideToClickedSlide () {
1464
-  const swiper = this;
1465
-  const { params, $wrapperEl } = swiper;
1466
-
1467
-  const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
1468
-  let slideToIndex = swiper.clickedIndex;
1469
-  let realIndex;
1470
-  if (params.loop) {
1471
-    if (swiper.animating) return;
1472
-    realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);
1473
-    if (params.centeredSlides) {
1474
-      if (
1475
-        (slideToIndex < swiper.loopedSlides - (slidesPerView / 2))
1476
-        || (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2))
1477
-      ) {
1478
-        swiper.loopFix();
1479
-        slideToIndex = $wrapperEl
1480
-          .children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
1481
-          .eq(0)
1482
-          .index();
1483
-
1484
-        Utils.nextTick(() => {
1485
-          swiper.slideTo(slideToIndex);
1486
-        });
1487
-      } else {
1488
-        swiper.slideTo(slideToIndex);
1489
-      }
1490
-    } else if (slideToIndex > swiper.slides.length - slidesPerView) {
1491
-      swiper.loopFix();
1492
-      slideToIndex = $wrapperEl
1493
-        .children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
1494
-        .eq(0)
1495
-        .index();
1496
-
1497
-      Utils.nextTick(() => {
1498
-        swiper.slideTo(slideToIndex);
1499
-      });
1500
-    } else {
1501
-      swiper.slideTo(slideToIndex);
1502
-    }
1503
-  } else {
1504
-    swiper.slideTo(slideToIndex);
1505
-  }
1506
-}
1507
-
1508
-var slide = {
1509
-  slideTo,
1510
-  slideToLoop,
1511
-  slideNext,
1512
-  slidePrev,
1513
-  slideReset,
1514
-  slideToClosest,
1515
-  slideToClickedSlide,
1516
-};
1517
-
1518
-function loopCreate () {
1519
-  const swiper = this;
1520
-  const { params, $wrapperEl } = swiper;
1521
-  // Remove duplicated slides
1522
-  $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
1523
-
1524
-  let slides = $wrapperEl.children(`.${params.slideClass}`);
1525
-
1526
-  if (params.loopFillGroupWithBlank) {
1527
-    const blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);
1528
-    if (blankSlidesNum !== params.slidesPerGroup) {
1529
-      for (let i = 0; i < blankSlidesNum; i += 1) {
1530
-        const blankNode = $(document$1.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);
1531
-        $wrapperEl.append(blankNode);
1532
-      }
1533
-      slides = $wrapperEl.children(`.${params.slideClass}`);
1534
-    }
1535
-  }
1536
-
1537
-  if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;
1538
-
1539
-  swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10));
1540
-  swiper.loopedSlides += params.loopAdditionalSlides;
1541
-  if (swiper.loopedSlides > slides.length) {
1542
-    swiper.loopedSlides = slides.length;
1543
-  }
1544
-
1545
-  const prependSlides = [];
1546
-  const appendSlides = [];
1547
-  slides.each((index, el) => {
1548
-    const slide = $(el);
1549
-    if (index < swiper.loopedSlides) appendSlides.push(el);
1550
-    if (index < slides.length && index >= slides.length - swiper.loopedSlides) prependSlides.push(el);
1551
-    slide.attr('data-swiper-slide-index', index);
1552
-  });
1553
-  for (let i = 0; i < appendSlides.length; i += 1) {
1554
-    $wrapperEl.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
1555
-  }
1556
-  for (let i = prependSlides.length - 1; i >= 0; i -= 1) {
1557
-    $wrapperEl.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
1558
-  }
1559
-}
1560
-
1561
-function loopFix () {
1562
-  const swiper = this;
1563
-
1564
-  swiper.emit('beforeLoopFix');
1565
-
1566
-  const {
1567
-    activeIndex, slides, loopedSlides, allowSlidePrev, allowSlideNext, snapGrid, rtlTranslate: rtl,
1568
-  } = swiper;
1569
-  let newIndex;
1570
-  swiper.allowSlidePrev = true;
1571
-  swiper.allowSlideNext = true;
1572
-
1573
-  const snapTranslate = -snapGrid[activeIndex];
1574
-  const diff = snapTranslate - swiper.getTranslate();
1575
-
1576
-  // Fix For Negative Oversliding
1577
-  if (activeIndex < loopedSlides) {
1578
-    newIndex = (slides.length - (loopedSlides * 3)) + activeIndex;
1579
-    newIndex += loopedSlides;
1580
-    const slideChanged = swiper.slideTo(newIndex, 0, false, true);
1581
-    if (slideChanged && diff !== 0) {
1582
-      swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
1583
-    }
1584
-  } else if (activeIndex >= slides.length - loopedSlides) {
1585
-    // Fix For Positive Oversliding
1586
-    newIndex = -slides.length + activeIndex + loopedSlides;
1587
-    newIndex += loopedSlides;
1588
-    const slideChanged = swiper.slideTo(newIndex, 0, false, true);
1589
-    if (slideChanged && diff !== 0) {
1590
-      swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
1591
-    }
1592
-  }
1593
-  swiper.allowSlidePrev = allowSlidePrev;
1594
-  swiper.allowSlideNext = allowSlideNext;
1595
-
1596
-  swiper.emit('loopFix');
1597
-}
1598
-
1599
-function loopDestroy () {
1600
-  const swiper = this;
1601
-  const { $wrapperEl, params, slides } = swiper;
1602
-  $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();
1603
-  slides.removeAttr('data-swiper-slide-index');
1604
-}
1605
-
1606
-var loop = {
1607
-  loopCreate,
1608
-  loopFix,
1609
-  loopDestroy,
1610
-};
1611
-
1612
-function setGrabCursor (moving) {
1613
-  const swiper = this;
1614
-  if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked) || swiper.params.cssMode) return;
1615
-  const el = swiper.el;
1616
-  el.style.cursor = 'move';
1617
-  el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
1618
-  el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
1619
-  el.style.cursor = moving ? 'grabbing' : 'grab';
1620
-}
1621
-
1622
-function unsetGrabCursor () {
1623
-  const swiper = this;
1624
-  if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked) || swiper.params.cssMode) return;
1625
-  swiper.el.style.cursor = '';
1626
-}
1627
-
1628
-var grabCursor = {
1629
-  setGrabCursor,
1630
-  unsetGrabCursor,
1631
-};
1632
-
1633
-function appendSlide (slides) {
1634
-  const swiper = this;
1635
-  const { $wrapperEl, params } = swiper;
1636
-  if (params.loop) {
1637
-    swiper.loopDestroy();
1638
-  }
1639
-  if (typeof slides === 'object' && 'length' in slides) {
1640
-    for (let i = 0; i < slides.length; i += 1) {
1641
-      if (slides[i]) $wrapperEl.append(slides[i]);
1642
-    }
1643
-  } else {
1644
-    $wrapperEl.append(slides);
1645
-  }
1646
-  if (params.loop) {
1647
-    swiper.loopCreate();
1648
-  }
1649
-  if (!(params.observer && Support.observer)) {
1650
-    swiper.update();
1651
-  }
1652
-}
1653
-
1654
-function prependSlide (slides) {
1655
-  const swiper = this;
1656
-  const { params, $wrapperEl, activeIndex } = swiper;
1657
-
1658
-  if (params.loop) {
1659
-    swiper.loopDestroy();
1660
-  }
1661
-  let newActiveIndex = activeIndex + 1;
1662
-  if (typeof slides === 'object' && 'length' in slides) {
1663
-    for (let i = 0; i < slides.length; i += 1) {
1664
-      if (slides[i]) $wrapperEl.prepend(slides[i]);
1665
-    }
1666
-    newActiveIndex = activeIndex + slides.length;
1667
-  } else {
1668
-    $wrapperEl.prepend(slides);
1669
-  }
1670
-  if (params.loop) {
1671
-    swiper.loopCreate();
1672
-  }
1673
-  if (!(params.observer && Support.observer)) {
1674
-    swiper.update();
1675
-  }
1676
-  swiper.slideTo(newActiveIndex, 0, false);
1677
-}
1678
-
1679
-function addSlide (index, slides) {
1680
-  const swiper = this;
1681
-  const { $wrapperEl, params, activeIndex } = swiper;
1682
-  let activeIndexBuffer = activeIndex;
1683
-  if (params.loop) {
1684
-    activeIndexBuffer -= swiper.loopedSlides;
1685
-    swiper.loopDestroy();
1686
-    swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
1687
-  }
1688
-  const baseLength = swiper.slides.length;
1689
-  if (index <= 0) {
1690
-    swiper.prependSlide(slides);
1691
-    return;
1692
-  }
1693
-  if (index >= baseLength) {
1694
-    swiper.appendSlide(slides);
1695
-    return;
1696
-  }
1697
-  let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;
1698
-
1699
-  const slidesBuffer = [];
1700
-  for (let i = baseLength - 1; i >= index; i -= 1) {
1701
-    const currentSlide = swiper.slides.eq(i);
1702
-    currentSlide.remove();
1703
-    slidesBuffer.unshift(currentSlide);
1704
-  }
1705
-
1706
-  if (typeof slides === 'object' && 'length' in slides) {
1707
-    for (let i = 0; i < slides.length; i += 1) {
1708
-      if (slides[i]) $wrapperEl.append(slides[i]);
1709
-    }
1710
-    newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;
1711
-  } else {
1712
-    $wrapperEl.append(slides);
1713
-  }
1714
-
1715
-  for (let i = 0; i < slidesBuffer.length; i += 1) {
1716
-    $wrapperEl.append(slidesBuffer[i]);
1717
-  }
1718
-
1719
-  if (params.loop) {
1720
-    swiper.loopCreate();
1721
-  }
1722
-  if (!(params.observer && Support.observer)) {
1723
-    swiper.update();
1724
-  }
1725
-  if (params.loop) {
1726
-    swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
1727
-  } else {
1728
-    swiper.slideTo(newActiveIndex, 0, false);
1729
-  }
1730
-}
1731
-
1732
-function removeSlide (slidesIndexes) {
1733
-  const swiper = this;
1734
-  const { params, $wrapperEl, activeIndex } = swiper;
1735
-
1736
-  let activeIndexBuffer = activeIndex;
1737
-  if (params.loop) {
1738
-    activeIndexBuffer -= swiper.loopedSlides;
1739
-    swiper.loopDestroy();
1740
-    swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
1741
-  }
1742
-  let newActiveIndex = activeIndexBuffer;
1743
-  let indexToRemove;
1744
-
1745
-  if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {
1746
-    for (let i = 0; i < slidesIndexes.length; i += 1) {
1747
-      indexToRemove = slidesIndexes[i];
1748
-      if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
1749
-      if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
1750
-    }
1751
-    newActiveIndex = Math.max(newActiveIndex, 0);
1752
-  } else {
1753
-    indexToRemove = slidesIndexes;
1754
-    if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
1755
-    if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
1756
-    newActiveIndex = Math.max(newActiveIndex, 0);
1757
-  }
1758
-
1759
-  if (params.loop) {
1760
-    swiper.loopCreate();
1761
-  }
1762
-
1763
-  if (!(params.observer && Support.observer)) {
1764
-    swiper.update();
1765
-  }
1766
-  if (params.loop) {
1767
-    swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
1768
-  } else {
1769
-    swiper.slideTo(newActiveIndex, 0, false);
1770
-  }
1771
-}
1772
-
1773
-function removeAllSlides () {
1774
-  const swiper = this;
1775
-
1776
-  const slidesIndexes = [];
1777
-  for (let i = 0; i < swiper.slides.length; i += 1) {
1778
-    slidesIndexes.push(i);
1779
-  }
1780
-  swiper.removeSlide(slidesIndexes);
1781
-}
1782
-
1783
-var manipulation = {
1784
-  appendSlide,
1785
-  prependSlide,
1786
-  addSlide,
1787
-  removeSlide,
1788
-  removeAllSlides,
1789
-};
1790
-
1791
-const Device = (function Device() {
1792
-  const platform = window.navigator.platform;
1793
-  const ua = window.navigator.userAgent;
1794
-
1795
-  const device = {
1796
-    ios: false,
1797
-    android: false,
1798
-    androidChrome: false,
1799
-    desktop: false,
1800
-    iphone: false,
1801
-    ipod: false,
1802
-    ipad: false,
1803
-    edge: false,
1804
-    ie: false,
1805
-    firefox: false,
1806
-    macos: false,
1807
-    windows: false,
1808
-    cordova: !!(window.cordova || window.phonegap),
1809
-    phonegap: !!(window.cordova || window.phonegap),
1810
-    electron: false,
1811
-  };
1812
-
1813
-  const screenWidth = window.screen.width;
1814
-  const screenHeight = window.screen.height;
1815
-
1816
-  const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
1817
-  let ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
1818
-  const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
1819
-  const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
1820
-  const ie = ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;
1821
-  const edge = ua.indexOf('Edge/') >= 0;
1822
-  const firefox = ua.indexOf('Gecko/') >= 0 && ua.indexOf('Firefox/') >= 0;
1823
-  const windows = platform === 'Win32';
1824
-  const electron = ua.toLowerCase().indexOf('electron') >= 0;
1825
-  let macos = platform === 'MacIntel';
1826
-
1827
-  // iPadOs 13 fix
1828
-  if (!ipad
1829
-    && macos
1830
-    && Support.touch
1831
-    && (
1832
-      (screenWidth === 1024 && screenHeight === 1366) // Pro 12.9
1833
-      || (screenWidth === 834 && screenHeight === 1194) // Pro 11
1834
-      || (screenWidth === 834 && screenHeight === 1112) // Pro 10.5
1835
-      || (screenWidth === 768 && screenHeight === 1024) // other
1836
-    )
1837
-  ) {
1838
-    ipad = ua.match(/(Version)\/([\d.]+)/);
1839
-    macos = false;
1840
-  }
1841
-
1842
-  device.ie = ie;
1843
-  device.edge = edge;
1844
-  device.firefox = firefox;
1845
-
1846
-  // Android
1847
-  if (android && !windows) {
1848
-    device.os = 'android';
1849
-    device.osVersion = android[2];
1850
-    device.android = true;
1851
-    device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;
1852
-  }
1853
-  if (ipad || iphone || ipod) {
1854
-    device.os = 'ios';
1855
-    device.ios = true;
1856
-  }
1857
-  // iOS
1858
-  if (iphone && !ipod) {
1859
-    device.osVersion = iphone[2].replace(/_/g, '.');
1860
-    device.iphone = true;
1861
-  }
1862
-  if (ipad) {
1863
-    device.osVersion = ipad[2].replace(/_/g, '.');
1864
-    device.ipad = true;
1865
-  }
1866
-  if (ipod) {
1867
-    device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
1868
-    device.ipod = true;
1869
-  }
1870
-  // iOS 8+ changed UA
1871
-  if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {
1872
-    if (device.osVersion.split('.')[0] === '10') {
1873
-      device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];
1874
-    }
1875
-  }
1876
-
1877
-  // Webview
1878
-  device.webView = !!((iphone || ipad || ipod) && (ua.match(/.*AppleWebKit(?!.*Safari)/i) || window.navigator.standalone))
1879
-    || (window.matchMedia && window.matchMedia('(display-mode: standalone)').matches);
1880
-  device.webview = device.webView;
1881
-  device.standalone = device.webView;
1882
-
1883
-  // Desktop
1884
-  device.desktop = !(device.ios || device.android) || electron;
1885
-  if (device.desktop) {
1886
-    device.electron = electron;
1887
-    device.macos = macos;
1888
-    device.windows = windows;
1889
-    if (device.macos) {
1890
-      device.os = 'macos';
1891
-    }
1892
-    if (device.windows) {
1893
-      device.os = 'windows';
1894
-    }
1895
-  }
1896
-
1897
-  // Pixel Ratio
1898
-  device.pixelRatio = window.devicePixelRatio || 1;
1899
-
1900
-  // Export object
1901
-  return device;
1902
-}());
1903
-
1904
-function onTouchStart (event) {
1905
-  const swiper = this;
1906
-  const data = swiper.touchEventsData;
1907
-  const { params, touches } = swiper;
1908
-
1909
-  if (swiper.animating && params.preventInteractionOnTransition) {
1910
-    return;
1911
-  }
1912
-  let e = event;
1913
-  if (e.originalEvent) e = e.originalEvent;
1914
-  const $targetEl = $(e.target);
1915
-
1916
-  if (params.touchEventsTarget === 'wrapper') {
1917
-    if (!$targetEl.closest(swiper.wrapperEl).length) return;
1918
-  }
1919
-  data.isTouchEvent = e.type === 'touchstart';
1920
-  if (!data.isTouchEvent && 'which' in e && e.which === 3) return;
1921
-  if (!data.isTouchEvent && 'button' in e && e.button > 0) return;
1922
-  if (data.isTouched && data.isMoved) return;
1923
-  if (params.noSwiping && $targetEl.closest(params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`)[0]) {
1924
-    swiper.allowClick = true;
1925
-    return;
1926
-  }
1927
-  if (params.swipeHandler) {
1928
-    if (!$targetEl.closest(params.swipeHandler)[0]) return;
1929
-  }
1930
-
1931
-  touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
1932
-  touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
1933
-  const startX = touches.currentX;
1934
-  const startY = touches.currentY;
1935
-
1936
-  // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
1937
-
1938
-  const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;
1939
-  const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;
1940
-  if (
1941
-    edgeSwipeDetection
1942
-    && ((startX <= edgeSwipeThreshold)
1943
-    || (startX >= window.screen.width - edgeSwipeThreshold))
1944
-  ) {
1945
-    return;
1946
-  }
1947
-
1948
-  Utils.extend(data, {
1949
-    isTouched: true,
1950
-    isMoved: false,
1951
-    allowTouchCallbacks: true,
1952
-    isScrolling: undefined,
1953
-    startMoving: undefined,
1954
-  });
1955
-
1956
-  touches.startX = startX;
1957
-  touches.startY = startY;
1958
-  data.touchStartTime = Utils.now();
1959
-  swiper.allowClick = true;
1960
-  swiper.updateSize();
1961
-  swiper.swipeDirection = undefined;
1962
-  if (params.threshold > 0) data.allowThresholdMove = false;
1963
-  if (e.type !== 'touchstart') {
1964
-    let preventDefault = true;
1965
-    if ($targetEl.is(data.formElements)) preventDefault = false;
1966
-    if (
1967
-      document$1.activeElement
1968
-      && $(document$1.activeElement).is(data.formElements)
1969
-      && document$1.activeElement !== $targetEl[0]
1970
-    ) {
1971
-      document$1.activeElement.blur();
1972
-    }
1973
-
1974
-    const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;
1975
-    if (params.touchStartForcePreventDefault || shouldPreventDefault) {
1976
-      e.preventDefault();
1977
-    }
1978
-  }
1979
-  swiper.emit('touchStart', e);
1980
-}
1981
-
1982
-function onTouchMove (event) {
1983
-  const swiper = this;
1984
-  const data = swiper.touchEventsData;
1985
-  const { params, touches, rtlTranslate: rtl } = swiper;
1986
-  let e = event;
1987
-  if (e.originalEvent) e = e.originalEvent;
1988
-  if (!data.isTouched) {
1989
-    if (data.startMoving && data.isScrolling) {
1990
-      swiper.emit('touchMoveOpposite', e);
1991
-    }
1992
-    return;
1993
-  }
1994
-  if (data.isTouchEvent && e.type !== 'touchmove') return;
1995
-  const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]);
1996
-  const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX;
1997
-  const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY;
1998
-  if (e.preventedByNestedSwiper) {
1999
-    touches.startX = pageX;
2000
-    touches.startY = pageY;
2001
-    return;
2002
-  }
2003
-  if (!swiper.allowTouchMove) {
2004
-    // isMoved = true;
2005
-    swiper.allowClick = false;
2006
-    if (data.isTouched) {
2007
-      Utils.extend(touches, {
2008
-        startX: pageX,
2009
-        startY: pageY,
2010
-        currentX: pageX,
2011
-        currentY: pageY,
2012
-      });
2013
-      data.touchStartTime = Utils.now();
2014
-    }
2015
-    return;
2016
-  }
2017
-  if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {
2018
-    if (swiper.isVertical()) {
2019
-      // Vertical
2020
-      if (
2021
-        (pageY < touches.startY && swiper.translate <= swiper.maxTranslate())
2022
-        || (pageY > touches.startY && swiper.translate >= swiper.minTranslate())
2023
-      ) {
2024
-        data.isTouched = false;
2025
-        data.isMoved = false;
2026
-        return;
2027
-      }
2028
-    } else if (
2029
-      (pageX < touches.startX && swiper.translate <= swiper.maxTranslate())
2030
-      || (pageX > touches.startX && swiper.translate >= swiper.minTranslate())
2031
-    ) {
2032
-      return;
2033
-    }
2034
-  }
2035
-  if (data.isTouchEvent && document$1.activeElement) {
2036
-    if (e.target === document$1.activeElement && $(e.target).is(data.formElements)) {
2037
-      data.isMoved = true;
2038
-      swiper.allowClick = false;
2039
-      return;
2040
-    }
2041
-  }
2042
-  if (data.allowTouchCallbacks) {
2043
-    swiper.emit('touchMove', e);
2044
-  }
2045
-  if (e.targetTouches && e.targetTouches.length > 1) return;
2046
-
2047
-  touches.currentX = pageX;
2048
-  touches.currentY = pageY;
2049
-
2050
-  const diffX = touches.currentX - touches.startX;
2051
-  const diffY = touches.currentY - touches.startY;
2052
-  if (swiper.params.threshold && Math.sqrt((diffX ** 2) + (diffY ** 2)) < swiper.params.threshold) return;
2053
-
2054
-  if (typeof data.isScrolling === 'undefined') {
2055
-    let touchAngle;
2056
-    if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) {
2057
-      data.isScrolling = false;
2058
-    } else {
2059
-      // eslint-disable-next-line
2060
-      if ((diffX * diffX) + (diffY * diffY) >= 25) {
2061
-        touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;
2062
-        data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle);
2063
-      }
2064
-    }
2065
-  }
2066
-  if (data.isScrolling) {
2067
-    swiper.emit('touchMoveOpposite', e);
2068
-  }
2069
-  if (typeof data.startMoving === 'undefined') {
2070
-    if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
2071
-      data.startMoving = true;
2072
-    }
2073
-  }
2074
-  if (data.isScrolling) {
2075
-    data.isTouched = false;
2076
-    return;
2077
-  }
2078
-  if (!data.startMoving) {
2079
-    return;
2080
-  }
2081
-  swiper.allowClick = false;
2082
-  if (!params.cssMode && e.cancelable) {
2083
-    e.preventDefault();
2084
-  }
2085
-  if (params.touchMoveStopPropagation && !params.nested) {
2086
-    e.stopPropagation();
2087
-  }
2088
-
2089
-  if (!data.isMoved) {
2090
-    if (params.loop) {
2091
-      swiper.loopFix();
2092
-    }
2093
-    data.startTranslate = swiper.getTranslate();
2094
-    swiper.setTransition(0);
2095
-    if (swiper.animating) {
2096
-      swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');
2097
-    }
2098
-    data.allowMomentumBounce = false;
2099
-    // Grab Cursor
2100
-    if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2101
-      swiper.setGrabCursor(true);
2102
-    }
2103
-    swiper.emit('sliderFirstMove', e);
2104
-  }
2105
-  swiper.emit('sliderMove', e);
2106
-  data.isMoved = true;
2107
-
2108
-  let diff = swiper.isHorizontal() ? diffX : diffY;
2109
-  touches.diff = diff;
2110
-
2111
-  diff *= params.touchRatio;
2112
-  if (rtl) diff = -diff;
2113
-
2114
-  swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
2115
-  data.currentTranslate = diff + data.startTranslate;
2116
-
2117
-  let disableParentSwiper = true;
2118
-  let resistanceRatio = params.resistanceRatio;
2119
-  if (params.touchReleaseOnEdges) {
2120
-    resistanceRatio = 0;
2121
-  }
2122
-  if ((diff > 0 && data.currentTranslate > swiper.minTranslate())) {
2123
-    disableParentSwiper = false;
2124
-    if (params.resistance) data.currentTranslate = (swiper.minTranslate() - 1) + ((-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio);
2125
-  } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {
2126
-    disableParentSwiper = false;
2127
-    if (params.resistance) data.currentTranslate = (swiper.maxTranslate() + 1) - ((swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio);
2128
-  }
2129
-
2130
-  if (disableParentSwiper) {
2131
-    e.preventedByNestedSwiper = true;
2132
-  }
2133
-
2134
-  // Directions locks
2135
-  if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {
2136
-    data.currentTranslate = data.startTranslate;
2137
-  }
2138
-  if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {
2139
-    data.currentTranslate = data.startTranslate;
2140
-  }
2141
-
2142
-
2143
-  // Threshold
2144
-  if (params.threshold > 0) {
2145
-    if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
2146
-      if (!data.allowThresholdMove) {
2147
-        data.allowThresholdMove = true;
2148
-        touches.startX = touches.currentX;
2149
-        touches.startY = touches.currentY;
2150
-        data.currentTranslate = data.startTranslate;
2151
-        touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
2152
-        return;
2153
-      }
2154
-    } else {
2155
-      data.currentTranslate = data.startTranslate;
2156
-      return;
2157
-    }
2158
-  }
2159
-
2160
-  if (!params.followFinger || params.cssMode) return;
2161
-
2162
-  // Update active index in free mode
2163
-  if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {
2164
-    swiper.updateActiveIndex();
2165
-    swiper.updateSlidesClasses();
2166
-  }
2167
-  if (params.freeMode) {
2168
-    // Velocity
2169
-    if (data.velocities.length === 0) {
2170
-      data.velocities.push({
2171
-        position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
2172
-        time: data.touchStartTime,
2173
-      });
2174
-    }
2175
-    data.velocities.push({
2176
-      position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],
2177
-      time: Utils.now(),
2178
-    });
2179
-  }
2180
-  // Update progress
2181
-  swiper.updateProgress(data.currentTranslate);
2182
-  // Update translate
2183
-  swiper.setTranslate(data.currentTranslate);
2184
-}
2185
-
2186
-function onTouchEnd (event) {
2187
-  const swiper = this;
2188
-  const data = swiper.touchEventsData;
2189
-
2190
-  const {
2191
-    params, touches, rtlTranslate: rtl, $wrapperEl, slidesGrid, snapGrid,
2192
-  } = swiper;
2193
-  let e = event;
2194
-  if (e.originalEvent) e = e.originalEvent;
2195
-  if (data.allowTouchCallbacks) {
2196
-    swiper.emit('touchEnd', e);
2197
-  }
2198
-  data.allowTouchCallbacks = false;
2199
-  if (!data.isTouched) {
2200
-    if (data.isMoved && params.grabCursor) {
2201
-      swiper.setGrabCursor(false);
2202
-    }
2203
-    data.isMoved = false;
2204
-    data.startMoving = false;
2205
-    return;
2206
-  }
2207
-  // Return Grab Cursor
2208
-  if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2209
-    swiper.setGrabCursor(false);
2210
-  }
2211
-
2212
-  // Time diff
2213
-  const touchEndTime = Utils.now();
2214
-  const timeDiff = touchEndTime - data.touchStartTime;
2215
-
2216
-  // Tap, doubleTap, Click
2217
-  if (swiper.allowClick) {
2218
-    swiper.updateClickedSlide(e);
2219
-    swiper.emit('tap click', e);
2220
-    if (timeDiff < 300 && (touchEndTime - data.lastClickTime) < 300) {
2221
-      swiper.emit('doubleTap doubleClick', e);
2222
-    }
2223
-  }
2224
-
2225
-  data.lastClickTime = Utils.now();
2226
-  Utils.nextTick(() => {
2227
-    if (!swiper.destroyed) swiper.allowClick = true;
2228
-  });
2229
-
2230
-  if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {
2231
-    data.isTouched = false;
2232
-    data.isMoved = false;
2233
-    data.startMoving = false;
2234
-    return;
2235
-  }
2236
-  data.isTouched = false;
2237
-  data.isMoved = false;
2238
-  data.startMoving = false;
2239
-
2240
-  let currentPos;
2241
-  if (params.followFinger) {
2242
-    currentPos = rtl ? swiper.translate : -swiper.translate;
2243
-  } else {
2244
-    currentPos = -data.currentTranslate;
2245
-  }
2246
-
2247
-  if (params.cssMode) {
2248
-    return;
2249
-  }
2250
-
2251
-  if (params.freeMode) {
2252
-    if (currentPos < -swiper.minTranslate()) {
2253
-      swiper.slideTo(swiper.activeIndex);
2254
-      return;
2255
-    }
2256
-    if (currentPos > -swiper.maxTranslate()) {
2257
-      if (swiper.slides.length < snapGrid.length) {
2258
-        swiper.slideTo(snapGrid.length - 1);
2259
-      } else {
2260
-        swiper.slideTo(swiper.slides.length - 1);
2261
-      }
2262
-      return;
2263
-    }
2264
-
2265
-    if (params.freeModeMomentum) {
2266
-      if (data.velocities.length > 1) {
2267
-        const lastMoveEvent = data.velocities.pop();
2268
-        const velocityEvent = data.velocities.pop();
2269
-
2270
-        const distance = lastMoveEvent.position - velocityEvent.position;
2271
-        const time = lastMoveEvent.time - velocityEvent.time;
2272
-        swiper.velocity = distance / time;
2273
-        swiper.velocity /= 2;
2274
-        if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {
2275
-          swiper.velocity = 0;
2276
-        }
2277
-        // this implies that the user stopped moving a finger then released.
2278
-        // There would be no events with distance zero, so the last event is stale.
2279
-        if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) {
2280
-          swiper.velocity = 0;
2281
-        }
2282
-      } else {
2283
-        swiper.velocity = 0;
2284
-      }
2285
-      swiper.velocity *= params.freeModeMomentumVelocityRatio;
2286
-
2287
-      data.velocities.length = 0;
2288
-      let momentumDuration = 1000 * params.freeModeMomentumRatio;
2289
-      const momentumDistance = swiper.velocity * momentumDuration;
2290
-
2291
-      let newPosition = swiper.translate + momentumDistance;
2292
-      if (rtl) newPosition = -newPosition;
2293
-
2294
-      let doBounce = false;
2295
-      let afterBouncePosition;
2296
-      const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;
2297
-      let needsLoopFix;
2298
-      if (newPosition < swiper.maxTranslate()) {
2299
-        if (params.freeModeMomentumBounce) {
2300
-          if (newPosition + swiper.maxTranslate() < -bounceAmount) {
2301
-            newPosition = swiper.maxTranslate() - bounceAmount;
2302
-          }
2303
-          afterBouncePosition = swiper.maxTranslate();
2304
-          doBounce = true;
2305
-          data.allowMomentumBounce = true;
2306
-        } else {
2307
-          newPosition = swiper.maxTranslate();
2308
-        }
2309
-        if (params.loop && params.centeredSlides) needsLoopFix = true;
2310
-      } else if (newPosition > swiper.minTranslate()) {
2311
-        if (params.freeModeMomentumBounce) {
2312
-          if (newPosition - swiper.minTranslate() > bounceAmount) {
2313
-            newPosition = swiper.minTranslate() + bounceAmount;
2314
-          }
2315
-          afterBouncePosition = swiper.minTranslate();
2316
-          doBounce = true;
2317
-          data.allowMomentumBounce = true;
2318
-        } else {
2319
-          newPosition = swiper.minTranslate();
2320
-        }
2321
-        if (params.loop && params.centeredSlides) needsLoopFix = true;
2322
-      } else if (params.freeModeSticky) {
2323
-        let nextSlide;
2324
-        for (let j = 0; j < snapGrid.length; j += 1) {
2325
-          if (snapGrid[j] > -newPosition) {
2326
-            nextSlide = j;
2327
-            break;
2328
-          }
2329
-        }
2330
-
2331
-        if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {
2332
-          newPosition = snapGrid[nextSlide];
2333
-        } else {
2334
-          newPosition = snapGrid[nextSlide - 1];
2335
-        }
2336
-        newPosition = -newPosition;
2337
-      }
2338
-      if (needsLoopFix) {
2339
-        swiper.once('transitionEnd', () => {
2340
-          swiper.loopFix();
2341
-        });
2342
-      }
2343
-      // Fix duration
2344
-      if (swiper.velocity !== 0) {
2345
-        if (rtl) {
2346
-          momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
2347
-        } else {
2348
-          momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
2349
-        }
2350
-        if (params.freeModeSticky) {
2351
-          // If freeModeSticky is active and the user ends a swipe with a slow-velocity
2352
-          // event, then durations can be 20+ seconds to slide one (or zero!) slides.
2353
-          // It's easy to see this when simulating touch with mouse events. To fix this,
2354
-          // limit single-slide swipes to the default slide duration. This also has the
2355
-          // nice side effect of matching slide speed if the user stopped moving before
2356
-          // lifting finger or mouse vs. moving slowly before lifting the finger/mouse.
2357
-          // For faster swipes, also apply limits (albeit higher ones).
2358
-          const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate);
2359
-          const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex];
2360
-          if (moveDistance < currentSlideSize) {
2361
-            momentumDuration = params.speed;
2362
-          } else if (moveDistance < 2 * currentSlideSize) {
2363
-            momentumDuration = params.speed * 1.5;
2364
-          } else {
2365
-            momentumDuration = params.speed * 2.5;
2366
-          }
2367
-        }
2368
-      } else if (params.freeModeSticky) {
2369
-        swiper.slideToClosest();
2370
-        return;
2371
-      }
2372
-
2373
-      if (params.freeModeMomentumBounce && doBounce) {
2374
-        swiper.updateProgress(afterBouncePosition);
2375
-        swiper.setTransition(momentumDuration);
2376
-        swiper.setTranslate(newPosition);
2377
-        swiper.transitionStart(true, swiper.swipeDirection);
2378
-        swiper.animating = true;
2379
-        $wrapperEl.transitionEnd(() => {
2380
-          if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return;
2381
-          swiper.emit('momentumBounce');
2382
-          swiper.setTransition(params.speed);
2383
-          setTimeout(() => {
2384
-            swiper.setTranslate(afterBouncePosition);
2385
-            $wrapperEl.transitionEnd(() => {
2386
-              if (!swiper || swiper.destroyed) return;
2387
-              swiper.transitionEnd();
2388
-            });
2389
-          }, 0);
2390
-        });
2391
-      } else if (swiper.velocity) {
2392
-        swiper.updateProgress(newPosition);
2393
-        swiper.setTransition(momentumDuration);
2394
-        swiper.setTranslate(newPosition);
2395
-        swiper.transitionStart(true, swiper.swipeDirection);
2396
-        if (!swiper.animating) {
2397
-          swiper.animating = true;
2398
-          $wrapperEl.transitionEnd(() => {
2399
-            if (!swiper || swiper.destroyed) return;
2400
-            swiper.transitionEnd();
2401
-          });
2402
-        }
2403
-      } else {
2404
-        swiper.updateProgress(newPosition);
2405
-      }
2406
-
2407
-      swiper.updateActiveIndex();
2408
-      swiper.updateSlidesClasses();
2409
-    } else if (params.freeModeSticky) {
2410
-      swiper.slideToClosest();
2411
-      return;
2412
-    }
2413
-
2414
-    if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {
2415
-      swiper.updateProgress();
2416
-      swiper.updateActiveIndex();
2417
-      swiper.updateSlidesClasses();
2418
-    }
2419
-    return;
2420
-  }
2421
-
2422
-  // Find current slide
2423
-  let stopIndex = 0;
2424
-  let groupSize = swiper.slidesSizesGrid[0];
2425
-  for (let i = 0; i < slidesGrid.length; i += (i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup)) {
2426
-    const increment = (i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup);
2427
-    if (typeof slidesGrid[i + increment] !== 'undefined') {
2428
-      if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {
2429
-        stopIndex = i;
2430
-        groupSize = slidesGrid[i + increment] - slidesGrid[i];
2431
-      }
2432
-    } else if (currentPos >= slidesGrid[i]) {
2433
-      stopIndex = i;
2434
-      groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
2435
-    }
2436
-  }
2437
-
2438
-  // Find current slide size
2439
-  const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
2440
-  const increment = (stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup);
2441
-
2442
-  if (timeDiff > params.longSwipesMs) {
2443
-    // Long touches
2444
-    if (!params.longSwipes) {
2445
-      swiper.slideTo(swiper.activeIndex);
2446
-      return;
2447
-    }
2448
-    if (swiper.swipeDirection === 'next') {
2449
-      if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);
2450
-      else swiper.slideTo(stopIndex);
2451
-    }
2452
-    if (swiper.swipeDirection === 'prev') {
2453
-      if (ratio > (1 - params.longSwipesRatio)) swiper.slideTo(stopIndex + increment);
2454
-      else swiper.slideTo(stopIndex);
2455
-    }
2456
-  } else {
2457
-    // Short swipes
2458
-    if (!params.shortSwipes) {
2459
-      swiper.slideTo(swiper.activeIndex);
2460
-      return;
2461
-    }
2462
-    const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);
2463
-    if (!isNavButtonTarget) {
2464
-      if (swiper.swipeDirection === 'next') {
2465
-        swiper.slideTo(stopIndex + increment);
2466
-      }
2467
-      if (swiper.swipeDirection === 'prev') {
2468
-        swiper.slideTo(stopIndex);
2469
-      }
2470
-    } else if (e.target === swiper.navigation.nextEl) {
2471
-      swiper.slideTo(stopIndex + increment);
2472
-    } else {
2473
-      swiper.slideTo(stopIndex);
2474
-    }
2475
-  }
2476
-}
2477
-
2478
-function onResize () {
2479
-  const swiper = this;
2480
-
2481
-  const { params, el } = swiper;
2482
-
2483
-  if (el && el.offsetWidth === 0) return;
2484
-
2485
-  // Breakpoints
2486
-  if (params.breakpoints) {
2487
-    swiper.setBreakpoint();
2488
-  }
2489
-
2490
-  // Save locks
2491
-  const { allowSlideNext, allowSlidePrev, snapGrid } = swiper;
2492
-
2493
-  // Disable locks on resize
2494
-  swiper.allowSlideNext = true;
2495
-  swiper.allowSlidePrev = true;
2496
-
2497
-  swiper.updateSize();
2498
-  swiper.updateSlides();
2499
-
2500
-  swiper.updateSlidesClasses();
2501
-  if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
2502
-    swiper.slideTo(swiper.slides.length - 1, 0, false, true);
2503
-  } else {
2504
-    swiper.slideTo(swiper.activeIndex, 0, false, true);
2505
-  }
2506
-
2507
-  if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {
2508
-    swiper.autoplay.run();
2509
-  }
2510
-  // Return locks after resize
2511
-  swiper.allowSlidePrev = allowSlidePrev;
2512
-  swiper.allowSlideNext = allowSlideNext;
2513
-
2514
-  if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
2515
-    swiper.checkOverflow();
2516
-  }
2517
-}
2518
-
2519
-function onClick (e) {
2520
-  const swiper = this;
2521
-  if (!swiper.allowClick) {
2522
-    if (swiper.params.preventClicks) e.preventDefault();
2523
-    if (swiper.params.preventClicksPropagation && swiper.animating) {
2524
-      e.stopPropagation();
2525
-      e.stopImmediatePropagation();
2526
-    }
2527
-  }
2528
-}
2529
-
2530
-function onScroll () {
2531
-  const swiper = this;
2532
-  const { wrapperEl, rtlTranslate } = swiper;
2533
-  swiper.previousTranslate = swiper.translate;
2534
-  if (swiper.isHorizontal()) {
2535
-    if (rtlTranslate) {
2536
-      swiper.translate = ((wrapperEl.scrollWidth - wrapperEl.offsetWidth) - wrapperEl.scrollLeft);
2537
-    } else {
2538
-      swiper.translate = -wrapperEl.scrollLeft;
2539
-    }
2540
-  } else {
2541
-    swiper.translate = -wrapperEl.scrollTop;
2542
-  }
2543
-  // eslint-disable-next-line
2544
-  if (swiper.translate === -0) swiper.translate = 0;
2545
-
2546
-  swiper.updateActiveIndex();
2547
-  swiper.updateSlidesClasses();
2548
-
2549
-  let newProgress;
2550
-  const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
2551
-  if (translatesDiff === 0) {
2552
-    newProgress = 0;
2553
-  } else {
2554
-    newProgress = (swiper.translate - swiper.minTranslate()) / (translatesDiff);
2555
-  }
2556
-  if (newProgress !== swiper.progress) {
2557
-    swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);
2558
-  }
2559
-
2560
-  swiper.emit('setTranslate', swiper.translate, false);
2561
-}
2562
-
2563
-let dummyEventAttached = false;
2564
-function dummyEventListener() {}
2565
-
2566
-function attachEvents() {
2567
-  const swiper = this;
2568
-  const {
2569
-    params, touchEvents, el, wrapperEl,
2570
-  } = swiper;
2571
-
2572
-  swiper.onTouchStart = onTouchStart.bind(swiper);
2573
-  swiper.onTouchMove = onTouchMove.bind(swiper);
2574
-  swiper.onTouchEnd = onTouchEnd.bind(swiper);
2575
-  if (params.cssMode) {
2576
-    swiper.onScroll = onScroll.bind(swiper);
2577
-  }
2578
-
2579
-  swiper.onClick = onClick.bind(swiper);
2580
-
2581
-  const capture = !!params.nested;
2582
-
2583
-  // Touch Events
2584
-  if (!Support.touch && Support.pointerEvents) {
2585
-    el.addEventListener(touchEvents.start, swiper.onTouchStart, false);
2586
-    document$1.addEventListener(touchEvents.move, swiper.onTouchMove, capture);
2587
-    document$1.addEventListener(touchEvents.end, swiper.onTouchEnd, false);
2588
-  } else {
2589
-    if (Support.touch) {
2590
-      const passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
2591
-      el.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
2592
-      el.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture } : capture);
2593
-      el.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
2594
-      if (touchEvents.cancel) {
2595
-        el.addEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener);
2596
-      }
2597
-      if (!dummyEventAttached) {
2598
-        document$1.addEventListener('touchstart', dummyEventListener);
2599
-        dummyEventAttached = true;
2600
-      }
2601
-    }
2602
-    if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
2603
-      el.addEventListener('mousedown', swiper.onTouchStart, false);
2604
-      document$1.addEventListener('mousemove', swiper.onTouchMove, capture);
2605
-      document$1.addEventListener('mouseup', swiper.onTouchEnd, false);
2606
-    }
2607
-  }
2608
-  // Prevent Links Clicks
2609
-  if (params.preventClicks || params.preventClicksPropagation) {
2610
-    el.addEventListener('click', swiper.onClick, true);
2611
-  }
2612
-  if (params.cssMode) {
2613
-    wrapperEl.addEventListener('scroll', swiper.onScroll);
2614
-  }
2615
-
2616
-  // Resize handler
2617
-  if (params.updateOnWindowResize) {
2618
-    swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true);
2619
-  } else {
2620
-    swiper.on('observerUpdate', onResize, true);
2621
-  }
2622
-}
2623
-
2624
-function detachEvents() {
2625
-  const swiper = this;
2626
-
2627
-  const {
2628
-    params, touchEvents, el, wrapperEl,
2629
-  } = swiper;
2630
-
2631
-  const capture = !!params.nested;
2632
-
2633
-  // Touch Events
2634
-  if (!Support.touch && Support.pointerEvents) {
2635
-    el.removeEventListener(touchEvents.start, swiper.onTouchStart, false);
2636
-    document$1.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
2637
-    document$1.removeEventListener(touchEvents.end, swiper.onTouchEnd, false);
2638
-  } else {
2639
-    if (Support.touch) {
2640
-      const passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
2641
-      el.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
2642
-      el.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
2643
-      el.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
2644
-      if (touchEvents.cancel) {
2645
-        el.removeEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener);
2646
-      }
2647
-    }
2648
-    if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
2649
-      el.removeEventListener('mousedown', swiper.onTouchStart, false);
2650
-      document$1.removeEventListener('mousemove', swiper.onTouchMove, capture);
2651
-      document$1.removeEventListener('mouseup', swiper.onTouchEnd, false);
2652
-    }
2653
-  }
2654
-  // Prevent Links Clicks
2655
-  if (params.preventClicks || params.preventClicksPropagation) {
2656
-    el.removeEventListener('click', swiper.onClick, true);
2657
-  }
2658
-
2659
-  if (params.cssMode) {
2660
-    wrapperEl.removeEventListener('scroll', swiper.onScroll);
2661
-  }
2662
-
2663
-  // Resize handler
2664
-  swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize);
2665
-}
2666
-
2667
-var events = {
2668
-  attachEvents,
2669
-  detachEvents,
2670
-};
2671
-
2672
-function setBreakpoint () {
2673
-  const swiper = this;
2674
-  const {
2675
-    activeIndex, initialized, loopedSlides = 0, params, $el,
2676
-  } = swiper;
2677
-  const breakpoints = params.breakpoints;
2678
-  if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) return;
2679
-
2680
-  // Get breakpoint for window width and update parameters
2681
-  const breakpoint = swiper.getBreakpoint(breakpoints);
2682
-
2683
-  if (breakpoint && swiper.currentBreakpoint !== breakpoint) {
2684
-    const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
2685
-    if (breakpointOnlyParams) {
2686
-      ['slidesPerView', 'spaceBetween', 'slidesPerGroup', 'slidesPerGroupSkip', 'slidesPerColumn'].forEach((param) => {
2687
-        const paramValue = breakpointOnlyParams[param];
2688
-        if (typeof paramValue === 'undefined') return;
2689
-        if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) {
2690
-          breakpointOnlyParams[param] = 'auto';
2691
-        } else if (param === 'slidesPerView') {
2692
-          breakpointOnlyParams[param] = parseFloat(paramValue);
2693
-        } else {
2694
-          breakpointOnlyParams[param] = parseInt(paramValue, 10);
2695
-        }
2696
-      });
2697
-    }
2698
-
2699
-    const breakpointParams = breakpointOnlyParams || swiper.originalParams;
2700
-    const wasMultiRow = params.slidesPerColumn > 1;
2701
-    const isMultiRow = breakpointParams.slidesPerColumn > 1;
2702
-    if (wasMultiRow && !isMultiRow) {
2703
-      $el.removeClass(`${params.containerModifierClass}multirow ${params.containerModifierClass}multirow-column`);
2704
-    } else if (!wasMultiRow && isMultiRow) {
2705
-      $el.addClass(`${params.containerModifierClass}multirow`);
2706
-      if (breakpointParams.slidesPerColumnFill === 'column') {
2707
-        $el.addClass(`${params.containerModifierClass}multirow-column`);
2708
-      }
2709
-    }
2710
-
2711
-    const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;
2712
-    const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);
2713
-
2714
-    if (directionChanged && initialized) {
2715
-      swiper.changeDirection();
2716
-    }
2717
-
2718
-    Utils.extend(swiper.params, breakpointParams);
2719
-
2720
-    Utils.extend(swiper, {
2721
-      allowTouchMove: swiper.params.allowTouchMove,
2722
-      allowSlideNext: swiper.params.allowSlideNext,
2723
-      allowSlidePrev: swiper.params.allowSlidePrev,
2724
-    });
2725
-
2726
-    swiper.currentBreakpoint = breakpoint;
2727
-
2728
-    if (needsReLoop && initialized) {
2729
-      swiper.loopDestroy();
2730
-      swiper.loopCreate();
2731
-      swiper.updateSlides();
2732
-      swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false);
2733
-    }
2734
-
2735
-    swiper.emit('breakpoint', breakpointParams);
2736
-  }
2737
-}
2738
-
2739
-function getBreakpoint (breakpoints) {
2740
-  // Get breakpoint for window width
2741
-  if (!breakpoints) return undefined;
2742
-  let breakpoint = false;
2743
-
2744
-  const points = Object.keys(breakpoints).map((point) => {
2745
-    if (typeof point === 'string' && point.indexOf('@') === 0) {
2746
-      const minRatio = parseFloat(point.substr(1));
2747
-      const value = window.innerHeight * minRatio;
2748
-      return { value, point };
2749
-    }
2750
-    return { value: point, point };
2751
-  });
2752
-
2753
-  points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));
2754
-  for (let i = 0; i < points.length; i += 1) {
2755
-    const { point, value } = points[i];
2756
-    if (value <= window.innerWidth) {
2757
-      breakpoint = point;
2758
-    }
2759
-  }
2760
-  return breakpoint || 'max';
2761
-}
2762
-
2763
-var breakpoints = { setBreakpoint, getBreakpoint };
2764
-
2765
-function addClasses () {
2766
-  const swiper = this;
2767
-  const {
2768
-    classNames, params, rtl, $el,
2769
-  } = swiper;
2770
-  const suffixes = [];
2771
-
2772
-  suffixes.push('initialized');
2773
-  suffixes.push(params.direction);
2774
-
2775
-  if (params.freeMode) {
2776
-    suffixes.push('free-mode');
2777
-  }
2778
-  if (params.autoHeight) {
2779
-    suffixes.push('autoheight');
2780
-  }
2781
-  if (rtl) {
2782
-    suffixes.push('rtl');
2783
-  }
2784
-  if (params.slidesPerColumn > 1) {
2785
-    suffixes.push('multirow');
2786
-    if (params.slidesPerColumnFill === 'column') {
2787
-      suffixes.push('multirow-column');
2788
-    }
2789
-  }
2790
-  if (Device.android) {
2791
-    suffixes.push('android');
2792
-  }
2793
-  if (Device.ios) {
2794
-    suffixes.push('ios');
2795
-  }
2796
-
2797
-  if (params.cssMode) {
2798
-    suffixes.push('css-mode');
2799
-  }
2800
-
2801
-  suffixes.forEach((suffix) => {
2802
-    classNames.push(params.containerModifierClass + suffix);
2803
-  });
2804
-
2805
-  $el.addClass(classNames.join(' '));
2806
-}
2807
-
2808
-function removeClasses () {
2809
-  const swiper = this;
2810
-  const { $el, classNames } = swiper;
2811
-
2812
-  $el.removeClass(classNames.join(' '));
2813
-}
2814
-
2815
-var classes = { addClasses, removeClasses };
2816
-
2817
-function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) {
2818
-  let image;
2819
-  function onReady() {
2820
-    if (callback) callback();
2821
-  }
2822
-  const isPicture = $(imageEl).parent('picture')[0];
2823
-
2824
-  if (!isPicture && (!imageEl.complete || !checkForComplete)) {
2825
-    if (src) {
2826
-      image = new window.Image();
2827
-      image.onload = onReady;
2828
-      image.onerror = onReady;
2829
-      if (sizes) {
2830
-        image.sizes = sizes;
2831
-      }
2832
-      if (srcset) {
2833
-        image.srcset = srcset;
2834
-      }
2835
-      if (src) {
2836
-        image.src = src;
2837
-      }
2838
-    } else {
2839
-      onReady();
2840
-    }
2841
-  } else {
2842
-    // image already loaded...
2843
-    onReady();
2844
-  }
2845
-}
2846
-
2847
-function preloadImages () {
2848
-  const swiper = this;
2849
-  swiper.imagesToLoad = swiper.$el.find('img');
2850
-  function onReady() {
2851
-    if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;
2852
-    if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;
2853
-    if (swiper.imagesLoaded === swiper.imagesToLoad.length) {
2854
-      if (swiper.params.updateOnImagesReady) swiper.update();
2855
-      swiper.emit('imagesReady');
2856
-    }
2857
-  }
2858
-  for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {
2859
-    const imageEl = swiper.imagesToLoad[i];
2860
-    swiper.loadImage(
2861
-      imageEl,
2862
-      imageEl.currentSrc || imageEl.getAttribute('src'),
2863
-      imageEl.srcset || imageEl.getAttribute('srcset'),
2864
-      imageEl.sizes || imageEl.getAttribute('sizes'),
2865
-      true,
2866
-      onReady
2867
-    );
2868
-  }
2869
-}
2870
-
2871
-var images = {
2872
-  loadImage,
2873
-  preloadImages,
2874
-};
2875
-
2876
-function checkOverflow() {
2877
-  const swiper = this;
2878
-  const params = swiper.params;
2879
-  const wasLocked = swiper.isLocked;
2880
-  const lastSlidePosition = swiper.slides.length > 0 && (params.slidesOffsetBefore + (params.spaceBetween * (swiper.slides.length - 1)) + ((swiper.slides[0]).offsetWidth) * swiper.slides.length);
2881
-
2882
-  if (params.slidesOffsetBefore && params.slidesOffsetAfter && lastSlidePosition) {
2883
-    swiper.isLocked = lastSlidePosition <= swiper.size;
2884
-  } else {
2885
-    swiper.isLocked = swiper.snapGrid.length === 1;
2886
-  }
2887
-
2888
-  swiper.allowSlideNext = !swiper.isLocked;
2889
-  swiper.allowSlidePrev = !swiper.isLocked;
2890
-
2891
-  // events
2892
-  if (wasLocked !== swiper.isLocked) swiper.emit(swiper.isLocked ? 'lock' : 'unlock');
2893
-
2894
-  if (wasLocked && wasLocked !== swiper.isLocked) {
2895
-    swiper.isEnd = false;
2896
-    swiper.navigation.update();
2897
-  }
2898
-}
2899
-
2900
-var checkOverflow$1 = { checkOverflow };
2901
-
2902
-var defaults = {
2903
-  init: true,
2904
-  direction: 'horizontal',
2905
-  touchEventsTarget: 'container',
2906
-  initialSlide: 0,
2907
-  speed: 300,
2908
-  cssMode: false,
2909
-  updateOnWindowResize: true,
2910
-  //
2911
-  preventInteractionOnTransition: false,
2912
-
2913
-  // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
2914
-  edgeSwipeDetection: false,
2915
-  edgeSwipeThreshold: 20,
2916
-
2917
-  // Free mode
2918
-  freeMode: false,
2919
-  freeModeMomentum: true,
2920
-  freeModeMomentumRatio: 1,
2921
-  freeModeMomentumBounce: true,
2922
-  freeModeMomentumBounceRatio: 1,
2923
-  freeModeMomentumVelocityRatio: 1,
2924
-  freeModeSticky: false,
2925
-  freeModeMinimumVelocity: 0.02,
2926
-
2927
-  // Autoheight
2928
-  autoHeight: false,
2929
-
2930
-  // Set wrapper width
2931
-  setWrapperSize: false,
2932
-
2933
-  // Virtual Translate
2934
-  virtualTranslate: false,
2935
-
2936
-  // Effects
2937
-  effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
2938
-
2939
-  // Breakpoints
2940
-  breakpoints: undefined,
2941
-
2942
-  // Slides grid
2943
-  spaceBetween: 0,
2944
-  slidesPerView: 1,
2945
-  slidesPerColumn: 1,
2946
-  slidesPerColumnFill: 'column',
2947
-  slidesPerGroup: 1,
2948
-  slidesPerGroupSkip: 0,
2949
-  centeredSlides: false,
2950
-  centeredSlidesBounds: false,
2951
-  slidesOffsetBefore: 0, // in px
2952
-  slidesOffsetAfter: 0, // in px
2953
-  normalizeSlideIndex: true,
2954
-  centerInsufficientSlides: false,
2955
-
2956
-  // Disable swiper and hide navigation when container not overflow
2957
-  watchOverflow: false,
2958
-
2959
-  // Round length
2960
-  roundLengths: false,
2961
-
2962
-  // Touches
2963
-  touchRatio: 1,
2964
-  touchAngle: 45,
2965
-  simulateTouch: true,
2966
-  shortSwipes: true,
2967
-  longSwipes: true,
2968
-  longSwipesRatio: 0.5,
2969
-  longSwipesMs: 300,
2970
-  followFinger: true,
2971
-  allowTouchMove: true,
2972
-  threshold: 0,
2973
-  touchMoveStopPropagation: false,
2974
-  touchStartPreventDefault: true,
2975
-  touchStartForcePreventDefault: false,
2976
-  touchReleaseOnEdges: false,
2977
-
2978
-  // Unique Navigation Elements
2979
-  uniqueNavElements: true,
2980
-
2981
-  // Resistance
2982
-  resistance: true,
2983
-  resistanceRatio: 0.85,
2984
-
2985
-  // Progress
2986
-  watchSlidesProgress: false,
2987
-  watchSlidesVisibility: false,
2988
-
2989
-  // Cursor
2990
-  grabCursor: false,
2991
-
2992
-  // Clicks
2993
-  preventClicks: true,
2994
-  preventClicksPropagation: true,
2995
-  slideToClickedSlide: false,
2996
-
2997
-  // Images
2998
-  preloadImages: true,
2999
-  updateOnImagesReady: true,
3000
-
3001
-  // loop
3002
-  loop: false,
3003
-  loopAdditionalSlides: 0,
3004
-  loopedSlides: null,
3005
-  loopFillGroupWithBlank: false,
3006
-
3007
-  // Swiping/no swiping
3008
-  allowSlidePrev: true,
3009
-  allowSlideNext: true,
3010
-  swipeHandler: null, // '.swipe-handler',
3011
-  noSwiping: true,
3012
-  noSwipingClass: 'swiper-no-swiping',
3013
-  noSwipingSelector: null,
3014
-
3015
-  // Passive Listeners
3016
-  passiveListeners: true,
3017
-
3018
-  // NS
3019
-  containerModifierClass: 'swiper-container-', // NEW
3020
-  slideClass: 'swiper-slide',
3021
-  slideBlankClass: 'swiper-slide-invisible-blank',
3022
-  slideActiveClass: 'swiper-slide-active',
3023
-  slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
3024
-  slideVisibleClass: 'swiper-slide-visible',
3025
-  slideDuplicateClass: 'swiper-slide-duplicate',
3026
-  slideNextClass: 'swiper-slide-next',
3027
-  slideDuplicateNextClass: 'swiper-slide-duplicate-next',
3028
-  slidePrevClass: 'swiper-slide-prev',
3029
-  slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
3030
-  wrapperClass: 'swiper-wrapper',
3031
-
3032
-  // Callbacks
3033
-  runCallbacksOnInit: true,
3034
-};
3035
-
3036
-/* eslint no-param-reassign: "off" */
3037
-
3038
-const prototypes = {
3039
-  update,
3040
-  translate,
3041
-  transition,
3042
-  slide,
3043
-  loop,
3044
-  grabCursor,
3045
-  manipulation,
3046
-  events,
3047
-  breakpoints,
3048
-  checkOverflow: checkOverflow$1,
3049
-  classes,
3050
-  images,
3051
-};
3052
-
3053
-const extendedDefaults = {};
3054
-
3055
-class Swiper extends SwiperClass {
3056
-  constructor(...args) {
3057
-    let el;
3058
-    let params;
3059
-    if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {
3060
-      params = args[0];
3061
-    } else {
3062
-      [el, params] = args;
3063
-    }
3064
-    if (!params) params = {};
3065
-
3066
-    params = Utils.extend({}, params);
3067
-    if (el && !params.el) params.el = el;
3068
-
3069
-    super(params);
3070
-
3071
-    Object.keys(prototypes).forEach((prototypeGroup) => {
3072
-      Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => {
3073
-        if (!Swiper.prototype[protoMethod]) {
3074
-          Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
3075
-        }
3076
-      });
3077
-    });
3078
-
3079
-    // Swiper Instance
3080
-    const swiper = this;
3081
-    if (typeof swiper.modules === 'undefined') {
3082
-      swiper.modules = {};
3083
-    }
3084
-    Object.keys(swiper.modules).forEach((moduleName) => {
3085
-      const module = swiper.modules[moduleName];
3086
-      if (module.params) {
3087
-        const moduleParamName = Object.keys(module.params)[0];
3088
-        const moduleParams = module.params[moduleParamName];
3089
-        if (typeof moduleParams !== 'object' || moduleParams === null) return;
3090
-        if (!(moduleParamName in params && 'enabled' in moduleParams)) return;
3091
-        if (params[moduleParamName] === true) {
3092
-          params[moduleParamName] = { enabled: true };
3093
-        }
3094
-        if (
3095
-          typeof params[moduleParamName] === 'object'
3096
-          && !('enabled' in params[moduleParamName])
3097
-        ) {
3098
-          params[moduleParamName].enabled = true;
3099
-        }
3100
-        if (!params[moduleParamName]) params[moduleParamName] = { enabled: false };
3101
-      }
3102
-    });
3103
-
3104
-    // Extend defaults with modules params
3105
-    const swiperParams = Utils.extend({}, defaults);
3106
-    swiper.useModulesParams(swiperParams);
3107
-
3108
-    // Extend defaults with passed params
3109
-    swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params);
3110
-    swiper.originalParams = Utils.extend({}, swiper.params);
3111
-    swiper.passedParams = Utils.extend({}, params);
3112
-
3113
-    // Save Dom lib
3114
-    swiper.$ = $;
3115
-
3116
-    // Find el
3117
-    const $el = $(swiper.params.el);
3118
-    el = $el[0];
3119
-
3120
-    if (!el) {
3121
-      return undefined;
3122
-    }
3123
-
3124
-    if ($el.length > 1) {
3125
-      const swipers = [];
3126
-      $el.each((index, containerEl) => {
3127
-        const newParams = Utils.extend({}, params, { el: containerEl });
3128
-        swipers.push(new Swiper(newParams));
3129
-      });
3130
-      return swipers;
3131
-    }
3132
-
3133
-    el.swiper = swiper;
3134
-    $el.data('swiper', swiper);
3135
-
3136
-    // Find Wrapper
3137
-    let $wrapperEl;
3138
-    if (el && el.shadowRoot && el.shadowRoot.querySelector) {
3139
-      $wrapperEl = $(el.shadowRoot.querySelector(`.${swiper.params.wrapperClass}`));
3140
-      // Children needs to return slot items
3141
-      $wrapperEl.children = (options) => $el.children(options);
3142
-    } else {
3143
-      $wrapperEl = $el.children(`.${swiper.params.wrapperClass}`);
3144
-    }
3145
-    // Extend Swiper
3146
-    Utils.extend(swiper, {
3147
-      $el,
3148
-      el,
3149
-      $wrapperEl,
3150
-      wrapperEl: $wrapperEl[0],
3151
-
3152
-      // Classes
3153
-      classNames: [],
3154
-
3155
-      // Slides
3156
-      slides: $(),
3157
-      slidesGrid: [],
3158
-      snapGrid: [],
3159
-      slidesSizesGrid: [],
3160
-
3161
-      // isDirection
3162
-      isHorizontal() {
3163
-        return swiper.params.direction === 'horizontal';
3164
-      },
3165
-      isVertical() {
3166
-        return swiper.params.direction === 'vertical';
3167
-      },
3168
-      // RTL
3169
-      rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
3170
-      rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
3171
-      wrongRTL: $wrapperEl.css('display') === '-webkit-box',
3172
-
3173
-      // Indexes
3174
-      activeIndex: 0,
3175
-      realIndex: 0,
3176
-
3177
-      //
3178
-      isBeginning: true,
3179
-      isEnd: false,
3180
-
3181
-      // Props
3182
-      translate: 0,
3183
-      previousTranslate: 0,
3184
-      progress: 0,
3185
-      velocity: 0,
3186
-      animating: false,
3187
-
3188
-      // Locks
3189
-      allowSlideNext: swiper.params.allowSlideNext,
3190
-      allowSlidePrev: swiper.params.allowSlidePrev,
3191
-
3192
-      // Touch Events
3193
-      touchEvents: (function touchEvents() {
3194
-        const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];
3195
-        let desktop = ['mousedown', 'mousemove', 'mouseup'];
3196
-        if (Support.pointerEvents) {
3197
-          desktop = ['pointerdown', 'pointermove', 'pointerup'];
3198
-        }
3199
-        swiper.touchEventsTouch = {
3200
-          start: touch[0],
3201
-          move: touch[1],
3202
-          end: touch[2],
3203
-          cancel: touch[3],
3204
-        };
3205
-        swiper.touchEventsDesktop = {
3206
-          start: desktop[0],
3207
-          move: desktop[1],
3208
-          end: desktop[2],
3209
-        };
3210
-        return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;
3211
-      }()),
3212
-      touchEventsData: {
3213
-        isTouched: undefined,
3214
-        isMoved: undefined,
3215
-        allowTouchCallbacks: undefined,
3216
-        touchStartTime: undefined,
3217
-        isScrolling: undefined,
3218
-        currentTranslate: undefined,
3219
-        startTranslate: undefined,
3220
-        allowThresholdMove: undefined,
3221
-        // Form elements to match
3222
-        formElements: 'input, select, option, textarea, button, video, label',
3223
-        // Last click time
3224
-        lastClickTime: Utils.now(),
3225
-        clickTimeout: undefined,
3226
-        // Velocities
3227
-        velocities: [],
3228
-        allowMomentumBounce: undefined,
3229
-        isTouchEvent: undefined,
3230
-        startMoving: undefined,
3231
-      },
3232
-
3233
-      // Clicks
3234
-      allowClick: true,
3235
-
3236
-      // Touches
3237
-      allowTouchMove: swiper.params.allowTouchMove,
3238
-
3239
-      touches: {
3240
-        startX: 0,
3241
-        startY: 0,
3242
-        currentX: 0,
3243
-        currentY: 0,
3244
-        diff: 0,
3245
-      },
3246
-
3247
-      // Images
3248
-      imagesToLoad: [],
3249
-      imagesLoaded: 0,
3250
-
3251
-    });
3252
-
3253
-    // Install Modules
3254
-    swiper.useModules();
3255
-
3256
-    // Init
3257
-    if (swiper.params.init) {
3258
-      swiper.init();
3259
-    }
3260
-
3261
-    // Return app instance
3262
-    return swiper;
3263
-  }
3264
-
3265
-  slidesPerViewDynamic() {
3266
-    const swiper = this;
3267
-    const {
3268
-      params, slides, slidesGrid, size: swiperSize, activeIndex,
3269
-    } = swiper;
3270
-    let spv = 1;
3271
-    if (params.centeredSlides) {
3272
-      let slideSize = slides[activeIndex].swiperSlideSize;
3273
-      let breakLoop;
3274
-      for (let i = activeIndex + 1; i < slides.length; i += 1) {
3275
-        if (slides[i] && !breakLoop) {
3276
-          slideSize += slides[i].swiperSlideSize;
3277
-          spv += 1;
3278
-          if (slideSize > swiperSize) breakLoop = true;
3279
-        }
3280
-      }
3281
-      for (let i = activeIndex - 1; i >= 0; i -= 1) {
3282
-        if (slides[i] && !breakLoop) {
3283
-          slideSize += slides[i].swiperSlideSize;
3284
-          spv += 1;
3285
-          if (slideSize > swiperSize) breakLoop = true;
3286
-        }
3287
-      }
3288
-    } else {
3289
-      for (let i = activeIndex + 1; i < slides.length; i += 1) {
3290
-        if (slidesGrid[i] - slidesGrid[activeIndex] < swiperSize) {
3291
-          spv += 1;
3292
-        }
3293
-      }
3294
-    }
3295
-    return spv;
3296
-  }
3297
-
3298
-  update() {
3299
-    const swiper = this;
3300
-    if (!swiper || swiper.destroyed) return;
3301
-    const { snapGrid, params } = swiper;
3302
-    // Breakpoints
3303
-    if (params.breakpoints) {
3304
-      swiper.setBreakpoint();
3305
-    }
3306
-    swiper.updateSize();
3307
-    swiper.updateSlides();
3308
-    swiper.updateProgress();
3309
-    swiper.updateSlidesClasses();
3310
-
3311
-    function setTranslate() {
3312
-      const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
3313
-      const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
3314
-      swiper.setTranslate(newTranslate);
3315
-      swiper.updateActiveIndex();
3316
-      swiper.updateSlidesClasses();
3317
-    }
3318
-    let translated;
3319
-    if (swiper.params.freeMode) {
3320
-      setTranslate();
3321
-      if (swiper.params.autoHeight) {
3322
-        swiper.updateAutoHeight();
3323
-      }
3324
-    } else {
3325
-      if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
3326
-        translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);
3327
-      } else {
3328
-        translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
3329
-      }
3330
-      if (!translated) {
3331
-        setTranslate();
3332
-      }
3333
-    }
3334
-    if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
3335
-      swiper.checkOverflow();
3336
-    }
3337
-    swiper.emit('update');
3338
-  }
3339
-
3340
-  changeDirection(newDirection, needUpdate = true) {
3341
-    const swiper = this;
3342
-    const currentDirection = swiper.params.direction;
3343
-    if (!newDirection) {
3344
-      // eslint-disable-next-line
3345
-      newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';
3346
-    }
3347
-    if ((newDirection === currentDirection) || (newDirection !== 'horizontal' && newDirection !== 'vertical')) {
3348
-      return swiper;
3349
-    }
3350
-
3351
-    swiper.$el
3352
-      .removeClass(`${swiper.params.containerModifierClass}${currentDirection}`)
3353
-      .addClass(`${swiper.params.containerModifierClass}${newDirection}`);
3354
-
3355
-    swiper.params.direction = newDirection;
3356
-
3357
-    swiper.slides.each((slideIndex, slideEl) => {
3358
-      if (newDirection === 'vertical') {
3359
-        slideEl.style.width = '';
3360
-      } else {
3361
-        slideEl.style.height = '';
3362
-      }
3363
-    });
3364
-
3365
-    swiper.emit('changeDirection');
3366
-    if (needUpdate) swiper.update();
3367
-
3368
-    return swiper;
3369
-  }
3370
-
3371
-  init() {
3372
-    const swiper = this;
3373
-    if (swiper.initialized) return;
3374
-
3375
-    swiper.emit('beforeInit');
3376
-
3377
-    // Set breakpoint
3378
-    if (swiper.params.breakpoints) {
3379
-      swiper.setBreakpoint();
3380
-    }
3381
-
3382
-    // Add Classes
3383
-    swiper.addClasses();
3384
-
3385
-    // Create loop
3386
-    if (swiper.params.loop) {
3387
-      swiper.loopCreate();
3388
-    }
3389
-
3390
-    // Update size
3391
-    swiper.updateSize();
3392
-
3393
-    // Update slides
3394
-    swiper.updateSlides();
3395
-
3396
-    if (swiper.params.watchOverflow) {
3397
-      swiper.checkOverflow();
3398
-    }
3399
-
3400
-    // Set Grab Cursor
3401
-    if (swiper.params.grabCursor) {
3402
-      swiper.setGrabCursor();
3403
-    }
3404
-
3405
-    if (swiper.params.preloadImages) {
3406
-      swiper.preloadImages();
3407
-    }
3408
-
3409
-    // Slide To Initial Slide
3410
-    if (swiper.params.loop) {
3411
-      swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);
3412
-    } else {
3413
-      swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);
3414
-    }
3415
-
3416
-    // Attach events
3417
-    swiper.attachEvents();
3418
-
3419
-    // Init Flag
3420
-    swiper.initialized = true;
3421
-
3422
-    // Emit
3423
-    swiper.emit('init');
3424
-  }
3425
-
3426
-  destroy(deleteInstance = true, cleanStyles = true) {
3427
-    const swiper = this;
3428
-    const {
3429
-      params, $el, $wrapperEl, slides,
3430
-    } = swiper;
3431
-
3432
-    if (typeof swiper.params === 'undefined' || swiper.destroyed) {
3433
-      return null;
3434
-    }
3435
-
3436
-    swiper.emit('beforeDestroy');
3437
-
3438
-    // Init Flag
3439
-    swiper.initialized = false;
3440
-
3441
-    // Detach events
3442
-    swiper.detachEvents();
3443
-
3444
-    // Destroy loop
3445
-    if (params.loop) {
3446
-      swiper.loopDestroy();
3447
-    }
3448
-
3449
-    // Cleanup styles
3450
-    if (cleanStyles) {
3451
-      swiper.removeClasses();
3452
-      $el.removeAttr('style');
3453
-      $wrapperEl.removeAttr('style');
3454
-      if (slides && slides.length) {
3455
-        slides
3456
-          .removeClass([
3457
-            params.slideVisibleClass,
3458
-            params.slideActiveClass,
3459
-            params.slideNextClass,
3460
-            params.slidePrevClass,
3461
-          ].join(' '))
3462
-          .removeAttr('style')
3463
-          .removeAttr('data-swiper-slide-index');
3464
-      }
3465
-    }
3466
-
3467
-    swiper.emit('destroy');
3468
-
3469
-    // Detach emitter events
3470
-    Object.keys(swiper.eventsListeners).forEach((eventName) => {
3471
-      swiper.off(eventName);
3472
-    });
3473
-
3474
-    if (deleteInstance !== false) {
3475
-      swiper.$el[0].swiper = null;
3476
-      swiper.$el.data('swiper', null);
3477
-      Utils.deleteProps(swiper);
3478
-    }
3479
-    swiper.destroyed = true;
3480
-
3481
-    return null;
3482
-  }
3483
-
3484
-  static extendDefaults(newDefaults) {
3485
-    Utils.extend(extendedDefaults, newDefaults);
3486
-  }
3487
-
3488
-  static get extendedDefaults() {
3489
-    return extendedDefaults;
3490
-  }
3491
-
3492
-  static get defaults() {
3493
-    return defaults;
3494
-  }
3495
-
3496
-  static get Class() {
3497
-    return SwiperClass;
3498
-  }
3499
-
3500
-  static get $() {
3501
-    return $;
3502
-  }
3503
-}
3504
-
3505
-var Device$1 = {
3506
-  name: 'device',
3507
-  proto: {
3508
-    device: Device,
3509
-  },
3510
-  static: {
3511
-    device: Device,
3512
-  },
3513
-};
3514
-
3515
-var Support$1 = {
3516
-  name: 'support',
3517
-  proto: {
3518
-    support: Support,
3519
-  },
3520
-  static: {
3521
-    support: Support,
3522
-  },
3523
-};
3524
-
3525
-const Browser = (function Browser() {
3526
-  function isSafari() {
3527
-    const ua = window.navigator.userAgent.toLowerCase();
3528
-    return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
3529
-  }
3530
-  return {
3531
-    isEdge: !!window.navigator.userAgent.match(/Edge/g),
3532
-    isSafari: isSafari(),
3533
-    isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),
3534
-  };
3535
-}());
3536
-
3537
-var Browser$1 = {
3538
-  name: 'browser',
3539
-  proto: {
3540
-    browser: Browser,
3541
-  },
3542
-  static: {
3543
-    browser: Browser,
3544
-  },
3545
-};
3546
-
3547
-var Resize = {
3548
-  name: 'resize',
3549
-  create() {
3550
-    const swiper = this;
3551
-    Utils.extend(swiper, {
3552
-      resize: {
3553
-        resizeHandler() {
3554
-          if (!swiper || swiper.destroyed || !swiper.initialized) return;
3555
-          swiper.emit('beforeResize');
3556
-          swiper.emit('resize');
3557
-        },
3558
-        orientationChangeHandler() {
3559
-          if (!swiper || swiper.destroyed || !swiper.initialized) return;
3560
-          swiper.emit('orientationchange');
3561
-        },
3562
-      },
3563
-    });
3564
-  },
3565
-  on: {
3566
-    init() {
3567
-      const swiper = this;
3568
-      // Emit resize
3569
-      window.addEventListener('resize', swiper.resize.resizeHandler);
3570
-
3571
-      // Emit orientationchange
3572
-      window.addEventListener('orientationchange', swiper.resize.orientationChangeHandler);
3573
-    },
3574
-    destroy() {
3575
-      const swiper = this;
3576
-      window.removeEventListener('resize', swiper.resize.resizeHandler);
3577
-      window.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);
3578
-    },
3579
-  },
3580
-};
3581
-
3582
-const Observer = {
3583
-  func: window.MutationObserver || window.WebkitMutationObserver,
3584
-  attach(target, options = {}) {
3585
-    const swiper = this;
3586
-
3587
-    const ObserverFunc = Observer.func;
3588
-    const observer = new ObserverFunc((mutations) => {
3589
-      // The observerUpdate event should only be triggered
3590
-      // once despite the number of mutations.  Additional
3591
-      // triggers are redundant and are very costly
3592
-      if (mutations.length === 1) {
3593
-        swiper.emit('observerUpdate', mutations[0]);
3594
-        return;
3595
-      }
3596
-      const observerUpdate = function observerUpdate() {
3597
-        swiper.emit('observerUpdate', mutations[0]);
3598
-      };
3599
-
3600
-      if (window.requestAnimationFrame) {
3601
-        window.requestAnimationFrame(observerUpdate);
3602
-      } else {
3603
-        window.setTimeout(observerUpdate, 0);
3604
-      }
3605
-    });
3606
-
3607
-    observer.observe(target, {
3608
-      attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
3609
-      childList: typeof options.childList === 'undefined' ? true : options.childList,
3610
-      characterData: typeof options.characterData === 'undefined' ? true : options.characterData,
3611
-    });
3612
-
3613
-    swiper.observer.observers.push(observer);
3614
-  },
3615
-  init() {
3616
-    const swiper = this;
3617
-    if (!Support.observer || !swiper.params.observer) return;
3618
-    if (swiper.params.observeParents) {
3619
-      const containerParents = swiper.$el.parents();
3620
-      for (let i = 0; i < containerParents.length; i += 1) {
3621
-        swiper.observer.attach(containerParents[i]);
3622
-      }
3623
-    }
3624
-    // Observe container
3625
-    swiper.observer.attach(swiper.$el[0], { childList: swiper.params.observeSlideChildren });
3626
-
3627
-    // Observe wrapper
3628
-    swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });
3629
-  },
3630
-  destroy() {
3631
-    const swiper = this;
3632
-    swiper.observer.observers.forEach((observer) => {
3633
-      observer.disconnect();
3634
-    });
3635
-    swiper.observer.observers = [];
3636
-  },
3637
-};
3638
-
3639
-var Observer$1 = {
3640
-  name: 'observer',
3641
-  params: {
3642
-    observer: false,
3643
-    observeParents: false,
3644
-    observeSlideChildren: false,
3645
-  },
3646
-  create() {
3647
-    const swiper = this;
3648
-    Utils.extend(swiper, {
3649
-      observer: {
3650
-        init: Observer.init.bind(swiper),
3651
-        attach: Observer.attach.bind(swiper),
3652
-        destroy: Observer.destroy.bind(swiper),
3653
-        observers: [],
3654
-      },
3655
-    });
3656
-  },
3657
-  on: {
3658
-    init() {
3659
-      const swiper = this;
3660
-      swiper.observer.init();
3661
-    },
3662
-    destroy() {
3663
-      const swiper = this;
3664
-      swiper.observer.destroy();
3665
-    },
3666
-  },
3667
-};
3668
-
3669
-const Virtual = {
3670
-  update(force) {
3671
-    const swiper = this;
3672
-    const { slidesPerView, slidesPerGroup, centeredSlides } = swiper.params;
3673
-    const { addSlidesBefore, addSlidesAfter } = swiper.params.virtual;
3674
-    const {
3675
-      from: previousFrom,
3676
-      to: previousTo,
3677
-      slides,
3678
-      slidesGrid: previousSlidesGrid,
3679
-      renderSlide,
3680
-      offset: previousOffset,
3681
-    } = swiper.virtual;
3682
-    swiper.updateActiveIndex();
3683
-    const activeIndex = swiper.activeIndex || 0;
3684
-
3685
-    let offsetProp;
3686
-    if (swiper.rtlTranslate) offsetProp = 'right';
3687
-    else offsetProp = swiper.isHorizontal() ? 'left' : 'top';
3688
-
3689
-    let slidesAfter;
3690
-    let slidesBefore;
3691
-    if (centeredSlides) {
3692
-      slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;
3693
-      slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;
3694
-    } else {
3695
-      slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesBefore;
3696
-      slidesBefore = slidesPerGroup + addSlidesAfter;
3697
-    }
3698
-    const from = Math.max((activeIndex || 0) - slidesBefore, 0);
3699
-    const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);
3700
-    const offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);
3701
-
3702
-    Utils.extend(swiper.virtual, {
3703
-      from,
3704
-      to,
3705
-      offset,
3706
-      slidesGrid: swiper.slidesGrid,
3707
-    });
3708
-
3709
-    function onRendered() {
3710
-      swiper.updateSlides();
3711
-      swiper.updateProgress();
3712
-      swiper.updateSlidesClasses();
3713
-      if (swiper.lazy && swiper.params.lazy.enabled) {
3714
-        swiper.lazy.load();
3715
-      }
3716
-    }
3717
-
3718
-    if (previousFrom === from && previousTo === to && !force) {
3719
-      if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {
3720
-        swiper.slides.css(offsetProp, `${offset}px`);
3721
-      }
3722
-      swiper.updateProgress();
3723
-      return;
3724
-    }
3725
-    if (swiper.params.virtual.renderExternal) {
3726
-      swiper.params.virtual.renderExternal.call(swiper, {
3727
-        offset,
3728
-        from,
3729
-        to,
3730
-        slides: (function getSlides() {
3731
-          const slidesToRender = [];
3732
-          for (let i = from; i <= to; i += 1) {
3733
-            slidesToRender.push(slides[i]);
3734
-          }
3735
-          return slidesToRender;
3736
-        }()),
3737
-      });
3738
-      onRendered();
3739
-      return;
3740
-    }
3741
-    const prependIndexes = [];
3742
-    const appendIndexes = [];
3743
-    if (force) {
3744
-      swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove();
3745
-    } else {
3746
-      for (let i = previousFrom; i <= previousTo; i += 1) {
3747
-        if (i < from || i > to) {
3748
-          swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index="${i}"]`).remove();
3749
-        }
3750
-      }
3751
-    }
3752
-    for (let i = 0; i < slides.length; i += 1) {
3753
-      if (i >= from && i <= to) {
3754
-        if (typeof previousTo === 'undefined' || force) {
3755
-          appendIndexes.push(i);
3756
-        } else {
3757
-          if (i > previousTo) appendIndexes.push(i);
3758
-          if (i < previousFrom) prependIndexes.push(i);
3759
-        }
3760
-      }
3761
-    }
3762
-    appendIndexes.forEach((index) => {
3763
-      swiper.$wrapperEl.append(renderSlide(slides[index], index));
3764
-    });
3765
-    prependIndexes.sort((a, b) => b - a).forEach((index) => {
3766
-      swiper.$wrapperEl.prepend(renderSlide(slides[index], index));
3767
-    });
3768
-    swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset}px`);
3769
-    onRendered();
3770
-  },
3771
-  renderSlide(slide, index) {
3772
-    const swiper = this;
3773
-    const params = swiper.params.virtual;
3774
-    if (params.cache && swiper.virtual.cache[index]) {
3775
-      return swiper.virtual.cache[index];
3776
-    }
3777
-    const $slideEl = params.renderSlide
3778
-      ? $(params.renderSlide.call(swiper, slide, index))
3779
-      : $(`<div class="${swiper.params.slideClass}" data-swiper-slide-index="${index}">${slide}</div>`);
3780
-    if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index);
3781
-    if (params.cache) swiper.virtual.cache[index] = $slideEl;
3782
-    return $slideEl;
3783
-  },
3784
-  appendSlide(slides) {
3785
-    const swiper = this;
3786
-    if (typeof slides === 'object' && 'length' in slides) {
3787
-      for (let i = 0; i < slides.length; i += 1) {
3788
-        if (slides[i]) swiper.virtual.slides.push(slides[i]);
3789
-      }
3790
-    } else {
3791
-      swiper.virtual.slides.push(slides);
3792
-    }
3793
-    swiper.virtual.update(true);
3794
-  },
3795
-  prependSlide(slides) {
3796
-    const swiper = this;
3797
-    const activeIndex = swiper.activeIndex;
3798
-    let newActiveIndex = activeIndex + 1;
3799
-    let numberOfNewSlides = 1;
3800
-
3801
-    if (Array.isArray(slides)) {
3802
-      for (let i = 0; i < slides.length; i += 1) {
3803
-        if (slides[i]) swiper.virtual.slides.unshift(slides[i]);
3804
-      }
3805
-      newActiveIndex = activeIndex + slides.length;
3806
-      numberOfNewSlides = slides.length;
3807
-    } else {
3808
-      swiper.virtual.slides.unshift(slides);
3809
-    }
3810
-    if (swiper.params.virtual.cache) {
3811
-      const cache = swiper.virtual.cache;
3812
-      const newCache = {};
3813
-      Object.keys(cache).forEach((cachedIndex) => {
3814
-        const $cachedEl = cache[cachedIndex];
3815
-        const cachedElIndex = $cachedEl.attr('data-swiper-slide-index');
3816
-        if (cachedElIndex) {
3817
-          $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + 1);
3818
-        }
3819
-        newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl;
3820
-      });
3821
-      swiper.virtual.cache = newCache;
3822
-    }
3823
-    swiper.virtual.update(true);
3824
-    swiper.slideTo(newActiveIndex, 0);
3825
-  },
3826
-  removeSlide(slidesIndexes) {
3827
-    const swiper = this;
3828
-    if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return;
3829
-    let activeIndex = swiper.activeIndex;
3830
-    if (Array.isArray(slidesIndexes)) {
3831
-      for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) {
3832
-        swiper.virtual.slides.splice(slidesIndexes[i], 1);
3833
-        if (swiper.params.virtual.cache) {
3834
-          delete swiper.virtual.cache[slidesIndexes[i]];
3835
-        }
3836
-        if (slidesIndexes[i] < activeIndex) activeIndex -= 1;
3837
-        activeIndex = Math.max(activeIndex, 0);
3838
-      }
3839
-    } else {
3840
-      swiper.virtual.slides.splice(slidesIndexes, 1);
3841
-      if (swiper.params.virtual.cache) {
3842
-        delete swiper.virtual.cache[slidesIndexes];
3843
-      }
3844
-      if (slidesIndexes < activeIndex) activeIndex -= 1;
3845
-      activeIndex = Math.max(activeIndex, 0);
3846
-    }
3847
-    swiper.virtual.update(true);
3848
-    swiper.slideTo(activeIndex, 0);
3849
-  },
3850
-  removeAllSlides() {
3851
-    const swiper = this;
3852
-    swiper.virtual.slides = [];
3853
-    if (swiper.params.virtual.cache) {
3854
-      swiper.virtual.cache = {};
3855
-    }
3856
-    swiper.virtual.update(true);
3857
-    swiper.slideTo(0, 0);
3858
-  },
3859
-};
3860
-
3861
-var virtual = {
3862
-  name: 'virtual',
3863
-  params: {
3864
-    virtual: {
3865
-      enabled: false,
3866
-      slides: [],
3867
-      cache: true,
3868
-      renderSlide: null,
3869
-      renderExternal: null,
3870
-      addSlidesBefore: 0,
3871
-      addSlidesAfter: 0,
3872
-    },
3873
-  },
3874
-  create() {
3875
-    const swiper = this;
3876
-    Utils.extend(swiper, {
3877
-      virtual: {
3878
-        update: Virtual.update.bind(swiper),
3879
-        appendSlide: Virtual.appendSlide.bind(swiper),
3880
-        prependSlide: Virtual.prependSlide.bind(swiper),
3881
-        removeSlide: Virtual.removeSlide.bind(swiper),
3882
-        removeAllSlides: Virtual.removeAllSlides.bind(swiper),
3883
-        renderSlide: Virtual.renderSlide.bind(swiper),
3884
-        slides: swiper.params.virtual.slides,
3885
-        cache: {},
3886
-      },
3887
-    });
3888
-  },
3889
-  on: {
3890
-    beforeInit() {
3891
-      const swiper = this;
3892
-      if (!swiper.params.virtual.enabled) return;
3893
-      swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);
3894
-      const overwriteParams = {
3895
-        watchSlidesProgress: true,
3896
-      };
3897
-      Utils.extend(swiper.params, overwriteParams);
3898
-      Utils.extend(swiper.originalParams, overwriteParams);
3899
-
3900
-      if (!swiper.params.initialSlide) {
3901
-        swiper.virtual.update();
3902
-      }
3903
-    },
3904
-    setTranslate() {
3905
-      const swiper = this;
3906
-      if (!swiper.params.virtual.enabled) return;
3907
-      swiper.virtual.update();
3908
-    },
3909
-  },
3910
-};
3911
-
3912
-const Keyboard = {
3913
-  handle(event) {
3914
-    const swiper = this;
3915
-    const { rtlTranslate: rtl } = swiper;
3916
-    let e = event;
3917
-    if (e.originalEvent) e = e.originalEvent; // jquery fix
3918
-    const kc = e.keyCode || e.charCode;
3919
-    // Directions locks
3920
-    if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40) || kc === 34)) {
3921
-      return false;
3922
-    }
3923
-    if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38) || kc === 33)) {
3924
-      return false;
3925
-    }
3926
-    if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
3927
-      return undefined;
3928
-    }
3929
-    if (document$1.activeElement && document$1.activeElement.nodeName && (document$1.activeElement.nodeName.toLowerCase() === 'input' || document$1.activeElement.nodeName.toLowerCase() === 'textarea')) {
3930
-      return undefined;
3931
-    }
3932
-    if (swiper.params.keyboard.onlyInViewport && (kc === 33 || kc === 34 || kc === 37 || kc === 39 || kc === 38 || kc === 40)) {
3933
-      let inView = false;
3934
-      // Check that swiper should be inside of visible area of window
3935
-      if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {
3936
-        return undefined;
3937
-      }
3938
-      const windowWidth = window.innerWidth;
3939
-      const windowHeight = window.innerHeight;
3940
-      const swiperOffset = swiper.$el.offset();
3941
-      if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;
3942
-      const swiperCoord = [
3943
-        [swiperOffset.left, swiperOffset.top],
3944
-        [swiperOffset.left + swiper.width, swiperOffset.top],
3945
-        [swiperOffset.left, swiperOffset.top + swiper.height],
3946
-        [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height],
3947
-      ];
3948
-      for (let i = 0; i < swiperCoord.length; i += 1) {
3949
-        const point = swiperCoord[i];
3950
-        if (
3951
-          point[0] >= 0 && point[0] <= windowWidth
3952
-          && point[1] >= 0 && point[1] <= windowHeight
3953
-        ) {
3954
-          inView = true;
3955
-        }
3956
-      }
3957
-      if (!inView) return undefined;
3958
-    }
3959
-    if (swiper.isHorizontal()) {
3960
-      if (kc === 33 || kc === 34 || kc === 37 || kc === 39) {
3961
-        if (e.preventDefault) e.preventDefault();
3962
-        else e.returnValue = false;
3963
-      }
3964
-      if (((kc === 34 || kc === 39) && !rtl) || ((kc === 33 || kc === 37) && rtl)) swiper.slideNext();
3965
-      if (((kc === 33 || kc === 37) && !rtl) || ((kc === 34 || kc === 39) && rtl)) swiper.slidePrev();
3966
-    } else {
3967
-      if (kc === 33 || kc === 34 || kc === 38 || kc === 40) {
3968
-        if (e.preventDefault) e.preventDefault();
3969
-        else e.returnValue = false;
3970
-      }
3971
-      if (kc === 34 || kc === 40) swiper.slideNext();
3972
-      if (kc === 33 || kc === 38) swiper.slidePrev();
3973
-    }
3974
-    swiper.emit('keyPress', kc);
3975
-    return undefined;
3976
-  },
3977
-  enable() {
3978
-    const swiper = this;
3979
-    if (swiper.keyboard.enabled) return;
3980
-    $(document$1).on('keydown', swiper.keyboard.handle);
3981
-    swiper.keyboard.enabled = true;
3982
-  },
3983
-  disable() {
3984
-    const swiper = this;
3985
-    if (!swiper.keyboard.enabled) return;
3986
-    $(document$1).off('keydown', swiper.keyboard.handle);
3987
-    swiper.keyboard.enabled = false;
3988
-  },
3989
-};
3990
-
3991
-var keyboard = {
3992
-  name: 'keyboard',
3993
-  params: {
3994
-    keyboard: {
3995
-      enabled: false,
3996
-      onlyInViewport: true,
3997
-    },
3998
-  },
3999
-  create() {
4000
-    const swiper = this;
4001
-    Utils.extend(swiper, {
4002
-      keyboard: {
4003
-        enabled: false,
4004
-        enable: Keyboard.enable.bind(swiper),
4005
-        disable: Keyboard.disable.bind(swiper),
4006
-        handle: Keyboard.handle.bind(swiper),
4007
-      },
4008
-    });
4009
-  },
4010
-  on: {
4011
-    init() {
4012
-      const swiper = this;
4013
-      if (swiper.params.keyboard.enabled) {
4014
-        swiper.keyboard.enable();
4015
-      }
4016
-    },
4017
-    destroy() {
4018
-      const swiper = this;
4019
-      if (swiper.keyboard.enabled) {
4020
-        swiper.keyboard.disable();
4021
-      }
4022
-    },
4023
-  },
4024
-};
4025
-
4026
-function isEventSupported() {
4027
-  const eventName = 'onwheel';
4028
-  let isSupported = eventName in document$1;
4029
-
4030
-  if (!isSupported) {
4031
-    const element = document$1.createElement('div');
4032
-    element.setAttribute(eventName, 'return;');
4033
-    isSupported = typeof element[eventName] === 'function';
4034
-  }
4035
-
4036
-  if (!isSupported
4037
-    && document$1.implementation
4038
-    && document$1.implementation.hasFeature
4039
-    // always returns true in newer browsers as per the standard.
4040
-    // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
4041
-    && document$1.implementation.hasFeature('', '') !== true
4042
-  ) {
4043
-    // This is the only way to test support for the `wheel` event in IE9+.
4044
-    isSupported = document$1.implementation.hasFeature('Events.wheel', '3.0');
4045
-  }
4046
-
4047
-  return isSupported;
4048
-}
4049
-const Mousewheel = {
4050
-  lastScrollTime: Utils.now(),
4051
-  lastEventBeforeSnap: undefined,
4052
-  recentWheelEvents: [],
4053
-  event() {
4054
-    if (window.navigator.userAgent.indexOf('firefox') > -1) return 'DOMMouseScroll';
4055
-    return isEventSupported() ? 'wheel' : 'mousewheel';
4056
-  },
4057
-  normalize(e) {
4058
-    // Reasonable defaults
4059
-    const PIXEL_STEP = 10;
4060
-    const LINE_HEIGHT = 40;
4061
-    const PAGE_HEIGHT = 800;
4062
-
4063
-    let sX = 0;
4064
-    let sY = 0; // spinX, spinY
4065
-    let pX = 0;
4066
-    let pY = 0; // pixelX, pixelY
4067
-
4068
-    // Legacy
4069
-    if ('detail' in e) {
4070
-      sY = e.detail;
4071
-    }
4072
-    if ('wheelDelta' in e) {
4073
-      sY = -e.wheelDelta / 120;
4074
-    }
4075
-    if ('wheelDeltaY' in e) {
4076
-      sY = -e.wheelDeltaY / 120;
4077
-    }
4078
-    if ('wheelDeltaX' in e) {
4079
-      sX = -e.wheelDeltaX / 120;
4080
-    }
4081
-
4082
-    // side scrolling on FF with DOMMouseScroll
4083
-    if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
4084
-      sX = sY;
4085
-      sY = 0;
4086
-    }
4087
-
4088
-    pX = sX * PIXEL_STEP;
4089
-    pY = sY * PIXEL_STEP;
4090
-
4091
-    if ('deltaY' in e) {
4092
-      pY = e.deltaY;
4093
-    }
4094
-    if ('deltaX' in e) {
4095
-      pX = e.deltaX;
4096
-    }
4097
-
4098
-    if (e.shiftKey && !pX) { // if user scrolls with shift he wants horizontal scroll
4099
-      pX = pY;
4100
-      pY = 0;
4101
-    }
4102
-
4103
-    if ((pX || pY) && e.deltaMode) {
4104
-      if (e.deltaMode === 1) { // delta in LINE units
4105
-        pX *= LINE_HEIGHT;
4106
-        pY *= LINE_HEIGHT;
4107
-      } else { // delta in PAGE units
4108
-        pX *= PAGE_HEIGHT;
4109
-        pY *= PAGE_HEIGHT;
4110
-      }
4111
-    }
4112
-
4113
-    // Fall-back if spin cannot be determined
4114
-    if (pX && !sX) {
4115
-      sX = (pX < 1) ? -1 : 1;
4116
-    }
4117
-    if (pY && !sY) {
4118
-      sY = (pY < 1) ? -1 : 1;
4119
-    }
4120
-
4121
-    return {
4122
-      spinX: sX,
4123
-      spinY: sY,
4124
-      pixelX: pX,
4125
-      pixelY: pY,
4126
-    };
4127
-  },
4128
-  handleMouseEnter() {
4129
-    const swiper = this;
4130
-    swiper.mouseEntered = true;
4131
-  },
4132
-  handleMouseLeave() {
4133
-    const swiper = this;
4134
-    swiper.mouseEntered = false;
4135
-  },
4136
-  handle(event) {
4137
-    let e = event;
4138
-    const swiper = this;
4139
-    const params = swiper.params.mousewheel;
4140
-
4141
-    if (swiper.params.cssMode) {
4142
-      e.preventDefault();
4143
-    }
4144
-
4145
-    let target = swiper.$el;
4146
-    if (swiper.params.mousewheel.eventsTarged !== 'container') {
4147
-      target = $(swiper.params.mousewheel.eventsTarged);
4148
-    }
4149
-    if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true;
4150
-
4151
-    if (e.originalEvent) e = e.originalEvent; // jquery fix
4152
-    let delta = 0;
4153
-    const rtlFactor = swiper.rtlTranslate ? -1 : 1;
4154
-
4155
-    const data = Mousewheel.normalize(e);
4156
-
4157
-    if (params.forceToAxis) {
4158
-      if (swiper.isHorizontal()) {
4159
-        if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = data.pixelX * rtlFactor;
4160
-        else return true;
4161
-      } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = data.pixelY;
4162
-      else return true;
4163
-    } else {
4164
-      delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;
4165
-    }
4166
-
4167
-    if (delta === 0) return true;
4168
-
4169
-    if (params.invert) delta = -delta;
4170
-
4171
-    if (!swiper.params.freeMode) {
4172
-      // Register the new event in a variable which stores the relevant data
4173
-      const newEvent = {
4174
-        time: Utils.now(),
4175
-        delta: Math.abs(delta),
4176
-        direction: Math.sign(delta),
4177
-        raw: event,
4178
-      };
4179
-
4180
-      // Keep the most recent events
4181
-      const recentWheelEvents = swiper.mousewheel.recentWheelEvents;
4182
-      if (recentWheelEvents.length >= 2) {
4183
-        recentWheelEvents.shift(); // only store the last N events
4184
-      }
4185
-      const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;
4186
-      recentWheelEvents.push(newEvent);
4187
-
4188
-      // If there is at least one previous recorded event:
4189
-      //   If direction has changed or
4190
-      //   if the scroll is quicker than the previous one:
4191
-      //     Animate the slider.
4192
-      // Else (this is the first time the wheel is moved):
4193
-      //     Animate the slider.
4194
-      if (prevEvent) {
4195
-        if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) {
4196
-          swiper.mousewheel.animateSlider(newEvent);
4197
-        }
4198
-      } else {
4199
-        swiper.mousewheel.animateSlider(newEvent);
4200
-      }
4201
-
4202
-      // If it's time to release the scroll:
4203
-      //   Return now so you don't hit the preventDefault.
4204
-      if (swiper.mousewheel.releaseScroll(newEvent)) {
4205
-        return true;
4206
-      }
4207
-    } else {
4208
-      // Freemode or scrollContainer:
4209
-
4210
-      // If we recently snapped after a momentum scroll, then ignore wheel events
4211
-      // to give time for the deceleration to finish. Stop ignoring after 500 msecs
4212
-      // or if it's a new scroll (larger delta or inverse sign as last event before
4213
-      // an end-of-momentum snap).
4214
-      const newEvent = { time: Utils.now(), delta: Math.abs(delta), direction: Math.sign(delta) };
4215
-      const { lastEventBeforeSnap } = swiper.mousewheel;
4216
-      const ignoreWheelEvents = lastEventBeforeSnap
4217
-        && newEvent.time < lastEventBeforeSnap.time + 500
4218
-        && newEvent.delta <= lastEventBeforeSnap.delta
4219
-        && newEvent.direction === lastEventBeforeSnap.direction;
4220
-      if (!ignoreWheelEvents) {
4221
-        swiper.mousewheel.lastEventBeforeSnap = undefined;
4222
-
4223
-        if (swiper.params.loop) {
4224
-          swiper.loopFix();
4225
-        }
4226
-        let position = swiper.getTranslate() + (delta * params.sensitivity);
4227
-        const wasBeginning = swiper.isBeginning;
4228
-        const wasEnd = swiper.isEnd;
4229
-
4230
-        if (position >= swiper.minTranslate()) position = swiper.minTranslate();
4231
-        if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();
4232
-
4233
-        swiper.setTransition(0);
4234
-        swiper.setTranslate(position);
4235
-        swiper.updateProgress();
4236
-        swiper.updateActiveIndex();
4237
-        swiper.updateSlidesClasses();
4238
-
4239
-        if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {
4240
-          swiper.updateSlidesClasses();
4241
-        }
4242
-
4243
-        if (swiper.params.freeModeSticky) {
4244
-          // When wheel scrolling starts with sticky (aka snap) enabled, then detect
4245
-          // the end of a momentum scroll by storing recent (N=15?) wheel events.
4246
-          // 1. do all N events have decreasing or same (absolute value) delta?
4247
-          // 2. did all N events arrive in the last M (M=500?) msecs?
4248
-          // 3. does the earliest event have an (absolute value) delta that's
4249
-          //    at least P (P=1?) larger than the most recent event's delta?
4250
-          // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels?
4251
-          // If 1-4 are "yes" then we're near the end of a momuntum scroll deceleration.
4252
-          // Snap immediately and ignore remaining wheel events in this scroll.
4253
-          // See comment above for "remaining wheel events in this scroll" determination.
4254
-          // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event.
4255
-          clearTimeout(swiper.mousewheel.timeout);
4256
-          swiper.mousewheel.timeout = undefined;
4257
-          const recentWheelEvents = swiper.mousewheel.recentWheelEvents;
4258
-          if (recentWheelEvents.length >= 15) {
4259
-            recentWheelEvents.shift(); // only store the last N events
4260
-          }
4261
-          const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;
4262
-          const firstEvent = recentWheelEvents[0];
4263
-          recentWheelEvents.push(newEvent);
4264
-          if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) {
4265
-            // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log.
4266
-            recentWheelEvents.splice(0);
4267
-          } else if (recentWheelEvents.length >= 15
4268
-              && newEvent.time - firstEvent.time < 500
4269
-              && firstEvent.delta - newEvent.delta >= 1
4270
-              && newEvent.delta <= 6
4271
-          ) {
4272
-            // We're at the end of the deceleration of a momentum scroll, so there's no need
4273
-            // to wait for more events. Snap ASAP on the next tick.
4274
-            // Also, because there's some remaining momentum we'll bias the snap in the
4275
-            // direction of the ongoing scroll because it's better UX for the scroll to snap
4276
-            // in the same direction as the scroll instead of reversing to snap.  Therefore,
4277
-            // if it's already scrolled more than 20% in the current direction, keep going.
4278
-            const snapToThreshold = delta > 0 ? 0.8 : 0.2;
4279
-            swiper.mousewheel.lastEventBeforeSnap = newEvent;
4280
-            recentWheelEvents.splice(0);
4281
-            swiper.mousewheel.timeout = Utils.nextTick(() => {
4282
-              swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);
4283
-            }, 0); // no delay; move on next tick
4284
-          }
4285
-          if (!swiper.mousewheel.timeout) {
4286
-            // if we get here, then we haven't detected the end of a momentum scroll, so
4287
-            // we'll consider a scroll "complete" when there haven't been any wheel events
4288
-            // for 500ms.
4289
-            swiper.mousewheel.timeout = Utils.nextTick(() => {
4290
-              const snapToThreshold = 0.5;
4291
-              swiper.mousewheel.lastEventBeforeSnap = newEvent;
4292
-              recentWheelEvents.splice(0);
4293
-              swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);
4294
-            }, 500);
4295
-          }
4296
-        }
4297
-
4298
-        // Emit event
4299
-        if (!ignoreWheelEvents) swiper.emit('scroll', e);
4300
-
4301
-        // Stop autoplay
4302
-        if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop();
4303
-        // Return page scroll on edge positions
4304
-        if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;
4305
-      }
4306
-    }
4307
-
4308
-    if (e.preventDefault) e.preventDefault();
4309
-    else e.returnValue = false;
4310
-    return false;
4311
-  },
4312
-  animateSlider(newEvent) {
4313
-    const swiper = this;
4314
-    // If the movement is NOT big enough and
4315
-    // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider):
4316
-    //   Don't go any further (avoid insignificant scroll movement).
4317
-    if (newEvent.delta >= 6 && Utils.now() - swiper.mousewheel.lastScrollTime < 60) {
4318
-      // Return false as a default
4319
-      return true;
4320
-    }
4321
-    // If user is scrolling towards the end:
4322
-    //   If the slider hasn't hit the latest slide or
4323
-    //   if the slider is a loop and
4324
-    //   if the slider isn't moving right now:
4325
-    //     Go to next slide and
4326
-    //     emit a scroll event.
4327
-    // Else (the user is scrolling towards the beginning) and
4328
-    // if the slider hasn't hit the first slide or
4329
-    // if the slider is a loop and
4330
-    // if the slider isn't moving right now:
4331
-    //   Go to prev slide and
4332
-    //   emit a scroll event.
4333
-    if (newEvent.direction < 0) {
4334
-      if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
4335
-        swiper.slideNext();
4336
-        swiper.emit('scroll', newEvent.raw);
4337
-      }
4338
-    } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
4339
-      swiper.slidePrev();
4340
-      swiper.emit('scroll', newEvent.raw);
4341
-    }
4342
-    // If you got here is because an animation has been triggered so store the current time
4343
-    swiper.mousewheel.lastScrollTime = (new window.Date()).getTime();
4344
-    // Return false as a default
4345
-    return false;
4346
-  },
4347
-  releaseScroll(newEvent) {
4348
-    const swiper = this;
4349
-    const params = swiper.params.mousewheel;
4350
-    if (newEvent.direction < 0) {
4351
-      if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) {
4352
-        // Return true to animate scroll on edges
4353
-        return true;
4354
-      }
4355
-    } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) {
4356
-      // Return true to animate scroll on edges
4357
-      return true;
4358
-    }
4359
-    return false;
4360
-  },
4361
-  enable() {
4362
-    const swiper = this;
4363
-    const event = Mousewheel.event();
4364
-    if (swiper.params.cssMode) {
4365
-      swiper.wrapperEl.removeEventListener(event, swiper.mousewheel.handle);
4366
-      return true;
4367
-    }
4368
-    if (!event) return false;
4369
-    if (swiper.mousewheel.enabled) return false;
4370
-    let target = swiper.$el;
4371
-    if (swiper.params.mousewheel.eventsTarged !== 'container') {
4372
-      target = $(swiper.params.mousewheel.eventsTarged);
4373
-    }
4374
-    target.on('mouseenter', swiper.mousewheel.handleMouseEnter);
4375
-    target.on('mouseleave', swiper.mousewheel.handleMouseLeave);
4376
-    target.on(event, swiper.mousewheel.handle);
4377
-    swiper.mousewheel.enabled = true;
4378
-    return true;
4379
-  },
4380
-  disable() {
4381
-    const swiper = this;
4382
-    const event = Mousewheel.event();
4383
-    if (swiper.params.cssMode) {
4384
-      swiper.wrapperEl.addEventListener(event, swiper.mousewheel.handle);
4385
-      return true;
4386
-    }
4387
-    if (!event) return false;
4388
-    if (!swiper.mousewheel.enabled) return false;
4389
-    let target = swiper.$el;
4390
-    if (swiper.params.mousewheel.eventsTarged !== 'container') {
4391
-      target = $(swiper.params.mousewheel.eventsTarged);
4392
-    }
4393
-    target.off(event, swiper.mousewheel.handle);
4394
-    swiper.mousewheel.enabled = false;
4395
-    return true;
4396
-  },
4397
-};
4398
-
4399
-var mousewheel = {
4400
-  name: 'mousewheel',
4401
-  params: {
4402
-    mousewheel: {
4403
-      enabled: false,
4404
-      releaseOnEdges: false,
4405
-      invert: false,
4406
-      forceToAxis: false,
4407
-      sensitivity: 1,
4408
-      eventsTarged: 'container',
4409
-    },
4410
-  },
4411
-  create() {
4412
-    const swiper = this;
4413
-    Utils.extend(swiper, {
4414
-      mousewheel: {
4415
-        enabled: false,
4416
-        enable: Mousewheel.enable.bind(swiper),
4417
-        disable: Mousewheel.disable.bind(swiper),
4418
-        handle: Mousewheel.handle.bind(swiper),
4419
-        handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper),
4420
-        handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper),
4421
-        animateSlider: Mousewheel.animateSlider.bind(swiper),
4422
-        releaseScroll: Mousewheel.releaseScroll.bind(swiper),
4423
-        lastScrollTime: Utils.now(),
4424
-        lastEventBeforeSnap: undefined,
4425
-        recentWheelEvents: [],
4426
-      },
4427
-    });
4428
-  },
4429
-  on: {
4430
-    init() {
4431
-      const swiper = this;
4432
-      if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) {
4433
-        swiper.mousewheel.disable();
4434
-      }
4435
-      if (swiper.params.mousewheel.enabled) swiper.mousewheel.enable();
4436
-    },
4437
-    destroy() {
4438
-      const swiper = this;
4439
-      if (swiper.params.cssMode) {
4440
-        swiper.mousewheel.enable();
4441
-      }
4442
-      if (swiper.mousewheel.enabled) swiper.mousewheel.disable();
4443
-    },
4444
-  },
4445
-};
4446
-
4447
-const Navigation = {
4448
-  update() {
4449
-    // Update Navigation Buttons
4450
-    const swiper = this;
4451
-    const params = swiper.params.navigation;
4452
-
4453
-    if (swiper.params.loop) return;
4454
-    const { $nextEl, $prevEl } = swiper.navigation;
4455
-
4456
-    if ($prevEl && $prevEl.length > 0) {
4457
-      if (swiper.isBeginning) {
4458
-        $prevEl.addClass(params.disabledClass);
4459
-      } else {
4460
-        $prevEl.removeClass(params.disabledClass);
4461
-      }
4462
-      $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
4463
-    }
4464
-    if ($nextEl && $nextEl.length > 0) {
4465
-      if (swiper.isEnd) {
4466
-        $nextEl.addClass(params.disabledClass);
4467
-      } else {
4468
-        $nextEl.removeClass(params.disabledClass);
4469
-      }
4470
-      $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
4471
-    }
4472
-  },
4473
-  onPrevClick(e) {
4474
-    const swiper = this;
4475
-    e.preventDefault();
4476
-    if (swiper.isBeginning && !swiper.params.loop) return;
4477
-    swiper.slidePrev();
4478
-  },
4479
-  onNextClick(e) {
4480
-    const swiper = this;
4481
-    e.preventDefault();
4482
-    if (swiper.isEnd && !swiper.params.loop) return;
4483
-    swiper.slideNext();
4484
-  },
4485
-  init() {
4486
-    const swiper = this;
4487
-    const params = swiper.params.navigation;
4488
-    if (!(params.nextEl || params.prevEl)) return;
4489
-
4490
-    let $nextEl;
4491
-    let $prevEl;
4492
-    if (params.nextEl) {
4493
-      $nextEl = $(params.nextEl);
4494
-      if (
4495
-        swiper.params.uniqueNavElements
4496
-        && typeof params.nextEl === 'string'
4497
-        && $nextEl.length > 1
4498
-        && swiper.$el.find(params.nextEl).length === 1
4499
-      ) {
4500
-        $nextEl = swiper.$el.find(params.nextEl);
4501
-      }
4502
-    }
4503
-    if (params.prevEl) {
4504
-      $prevEl = $(params.prevEl);
4505
-      if (
4506
-        swiper.params.uniqueNavElements
4507
-        && typeof params.prevEl === 'string'
4508
-        && $prevEl.length > 1
4509
-        && swiper.$el.find(params.prevEl).length === 1
4510
-      ) {
4511
-        $prevEl = swiper.$el.find(params.prevEl);
4512
-      }
4513
-    }
4514
-
4515
-    if ($nextEl && $nextEl.length > 0) {
4516
-      $nextEl.on('click', swiper.navigation.onNextClick);
4517
-    }
4518
-    if ($prevEl && $prevEl.length > 0) {
4519
-      $prevEl.on('click', swiper.navigation.onPrevClick);
4520
-    }
4521
-
4522
-    Utils.extend(swiper.navigation, {
4523
-      $nextEl,
4524
-      nextEl: $nextEl && $nextEl[0],
4525
-      $prevEl,
4526
-      prevEl: $prevEl && $prevEl[0],
4527
-    });
4528
-  },
4529
-  destroy() {
4530
-    const swiper = this;
4531
-    const { $nextEl, $prevEl } = swiper.navigation;
4532
-    if ($nextEl && $nextEl.length) {
4533
-      $nextEl.off('click', swiper.navigation.onNextClick);
4534
-      $nextEl.removeClass(swiper.params.navigation.disabledClass);
4535
-    }
4536
-    if ($prevEl && $prevEl.length) {
4537
-      $prevEl.off('click', swiper.navigation.onPrevClick);
4538
-      $prevEl.removeClass(swiper.params.navigation.disabledClass);
4539
-    }
4540
-  },
4541
-};
4542
-
4543
-var navigation = {
4544
-  name: 'navigation',
4545
-  params: {
4546
-    navigation: {
4547
-      nextEl: null,
4548
-      prevEl: null,
4549
-
4550
-      hideOnClick: false,
4551
-      disabledClass: 'swiper-button-disabled',
4552
-      hiddenClass: 'swiper-button-hidden',
4553
-      lockClass: 'swiper-button-lock',
4554
-    },
4555
-  },
4556
-  create() {
4557
-    const swiper = this;
4558
-    Utils.extend(swiper, {
4559
-      navigation: {
4560
-        init: Navigation.init.bind(swiper),
4561
-        update: Navigation.update.bind(swiper),
4562
-        destroy: Navigation.destroy.bind(swiper),
4563
-        onNextClick: Navigation.onNextClick.bind(swiper),
4564
-        onPrevClick: Navigation.onPrevClick.bind(swiper),
4565
-      },
4566
-    });
4567
-  },
4568
-  on: {
4569
-    init() {
4570
-      const swiper = this;
4571
-      swiper.navigation.init();
4572
-      swiper.navigation.update();
4573
-    },
4574
-    toEdge() {
4575
-      const swiper = this;
4576
-      swiper.navigation.update();
4577
-    },
4578
-    fromEdge() {
4579
-      const swiper = this;
4580
-      swiper.navigation.update();
4581
-    },
4582
-    destroy() {
4583
-      const swiper = this;
4584
-      swiper.navigation.destroy();
4585
-    },
4586
-    click(e) {
4587
-      const swiper = this;
4588
-      const { $nextEl, $prevEl } = swiper.navigation;
4589
-      if (
4590
-        swiper.params.navigation.hideOnClick
4591
-        && !$(e.target).is($prevEl)
4592
-        && !$(e.target).is($nextEl)
4593
-      ) {
4594
-        let isHidden;
4595
-        if ($nextEl) {
4596
-          isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass);
4597
-        } else if ($prevEl) {
4598
-          isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass);
4599
-        }
4600
-        if (isHidden === true) {
4601
-          swiper.emit('navigationShow', swiper);
4602
-        } else {
4603
-          swiper.emit('navigationHide', swiper);
4604
-        }
4605
-        if ($nextEl) {
4606
-          $nextEl.toggleClass(swiper.params.navigation.hiddenClass);
4607
-        }
4608
-        if ($prevEl) {
4609
-          $prevEl.toggleClass(swiper.params.navigation.hiddenClass);
4610
-        }
4611
-      }
4612
-    },
4613
-  },
4614
-};
4615
-
4616
-const Pagination = {
4617
-  update() {
4618
-    // Render || Update Pagination bullets/items
4619
-    const swiper = this;
4620
-    const rtl = swiper.rtl;
4621
-    const params = swiper.params.pagination;
4622
-    if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
4623
-    const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
4624
-    const $el = swiper.pagination.$el;
4625
-    // Current/Total
4626
-    let current;
4627
-    const total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
4628
-    if (swiper.params.loop) {
4629
-      current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);
4630
-      if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) {
4631
-        current -= (slidesLength - (swiper.loopedSlides * 2));
4632
-      }
4633
-      if (current > total - 1) current -= total;
4634
-      if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;
4635
-    } else if (typeof swiper.snapIndex !== 'undefined') {
4636
-      current = swiper.snapIndex;
4637
-    } else {
4638
-      current = swiper.activeIndex || 0;
4639
-    }
4640
-    // Types
4641
-    if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
4642
-      const bullets = swiper.pagination.bullets;
4643
-      let firstIndex;
4644
-      let lastIndex;
4645
-      let midIndex;
4646
-      if (params.dynamicBullets) {
4647
-        swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);
4648
-        $el.css(swiper.isHorizontal() ? 'width' : 'height', `${swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)}px`);
4649
-        if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
4650
-          swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex);
4651
-          if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) {
4652
-            swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;
4653
-          } else if (swiper.pagination.dynamicBulletIndex < 0) {
4654
-            swiper.pagination.dynamicBulletIndex = 0;
4655
-          }
4656
-        }
4657
-        firstIndex = current - swiper.pagination.dynamicBulletIndex;
4658
-        lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
4659
-        midIndex = (lastIndex + firstIndex) / 2;
4660
-      }
4661
-      bullets.removeClass(`${params.bulletActiveClass} ${params.bulletActiveClass}-next ${params.bulletActiveClass}-next-next ${params.bulletActiveClass}-prev ${params.bulletActiveClass}-prev-prev ${params.bulletActiveClass}-main`);
4662
-      if ($el.length > 1) {
4663
-        bullets.each((index, bullet) => {
4664
-          const $bullet = $(bullet);
4665
-          const bulletIndex = $bullet.index();
4666
-          if (bulletIndex === current) {
4667
-            $bullet.addClass(params.bulletActiveClass);
4668
-          }
4669
-          if (params.dynamicBullets) {
4670
-            if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
4671
-              $bullet.addClass(`${params.bulletActiveClass}-main`);
4672
-            }
4673
-            if (bulletIndex === firstIndex) {
4674
-              $bullet
4675
-                .prev()
4676
-                .addClass(`${params.bulletActiveClass}-prev`)
4677
-                .prev()
4678
-                .addClass(`${params.bulletActiveClass}-prev-prev`);
4679
-            }
4680
-            if (bulletIndex === lastIndex) {
4681
-              $bullet
4682
-                .next()
4683
-                .addClass(`${params.bulletActiveClass}-next`)
4684
-                .next()
4685
-                .addClass(`${params.bulletActiveClass}-next-next`);
4686
-            }
4687
-          }
4688
-        });
4689
-      } else {
4690
-        const $bullet = bullets.eq(current);
4691
-        const bulletIndex = $bullet.index();
4692
-        $bullet.addClass(params.bulletActiveClass);
4693
-        if (params.dynamicBullets) {
4694
-          const $firstDisplayedBullet = bullets.eq(firstIndex);
4695
-          const $lastDisplayedBullet = bullets.eq(lastIndex);
4696
-          for (let i = firstIndex; i <= lastIndex; i += 1) {
4697
-            bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);
4698
-          }
4699
-          if (swiper.params.loop) {
4700
-            if (bulletIndex >= bullets.length - params.dynamicMainBullets) {
4701
-              for (let i = params.dynamicMainBullets; i >= 0; i -= 1) {
4702
-                bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`);
4703
-              }
4704
-              bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(`${params.bulletActiveClass}-prev`);
4705
-            } else {
4706
-              $firstDisplayedBullet
4707
-                .prev()
4708
-                .addClass(`${params.bulletActiveClass}-prev`)
4709
-                .prev()
4710
-                .addClass(`${params.bulletActiveClass}-prev-prev`);
4711
-              $lastDisplayedBullet
4712
-                .next()
4713
-                .addClass(`${params.bulletActiveClass}-next`)
4714
-                .next()
4715
-                .addClass(`${params.bulletActiveClass}-next-next`);
4716
-            }
4717
-          } else {
4718
-            $firstDisplayedBullet
4719
-              .prev()
4720
-              .addClass(`${params.bulletActiveClass}-prev`)
4721
-              .prev()
4722
-              .addClass(`${params.bulletActiveClass}-prev-prev`);
4723
-            $lastDisplayedBullet
4724
-              .next()
4725
-              .addClass(`${params.bulletActiveClass}-next`)
4726
-              .next()
4727
-              .addClass(`${params.bulletActiveClass}-next-next`);
4728
-          }
4729
-        }
4730
-      }
4731
-      if (params.dynamicBullets) {
4732
-        const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
4733
-        const bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize);
4734
-        const offsetProp = rtl ? 'right' : 'left';
4735
-        bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);
4736
-      }
4737
-    }
4738
-    if (params.type === 'fraction') {
4739
-      $el.find(`.${params.currentClass}`).text(params.formatFractionCurrent(current + 1));
4740
-      $el.find(`.${params.totalClass}`).text(params.formatFractionTotal(total));
4741
-    }
4742
-    if (params.type === 'progressbar') {
4743
-      let progressbarDirection;
4744
-      if (params.progressbarOpposite) {
4745
-        progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
4746
-      } else {
4747
-        progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
4748
-      }
4749
-      const scale = (current + 1) / total;
4750
-      let scaleX = 1;
4751
-      let scaleY = 1;
4752
-      if (progressbarDirection === 'horizontal') {
4753
-        scaleX = scale;
4754
-      } else {
4755
-        scaleY = scale;
4756
-      }
4757
-      $el.find(`.${params.progressbarFillClass}`).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed);
4758
-    }
4759
-    if (params.type === 'custom' && params.renderCustom) {
4760
-      $el.html(params.renderCustom(swiper, current + 1, total));
4761
-      swiper.emit('paginationRender', swiper, $el[0]);
4762
-    } else {
4763
-      swiper.emit('paginationUpdate', swiper, $el[0]);
4764
-    }
4765
-    $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
4766
-  },
4767
-  render() {
4768
-    // Render Container
4769
-    const swiper = this;
4770
-    const params = swiper.params.pagination;
4771
-    if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
4772
-    const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
4773
-
4774
-    const $el = swiper.pagination.$el;
4775
-    let paginationHTML = '';
4776
-    if (params.type === 'bullets') {
4777
-      const numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
4778
-      for (let i = 0; i < numberOfBullets; i += 1) {
4779
-        if (params.renderBullet) {
4780
-          paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
4781
-        } else {
4782
-          paginationHTML += `<${params.bulletElement} class="${params.bulletClass}"></${params.bulletElement}>`;
4783
-        }
4784
-      }
4785
-      $el.html(paginationHTML);
4786
-      swiper.pagination.bullets = $el.find(`.${params.bulletClass}`);
4787
-    }
4788
-    if (params.type === 'fraction') {
4789
-      if (params.renderFraction) {
4790
-        paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
4791
-      } else {
4792
-        paginationHTML = `<span class="${params.currentClass}"></span>`
4793
-        + ' / '
4794
-        + `<span class="${params.totalClass}"></span>`;
4795
-      }
4796
-      $el.html(paginationHTML);
4797
-    }
4798
-    if (params.type === 'progressbar') {
4799
-      if (params.renderProgressbar) {
4800
-        paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
4801
-      } else {
4802
-        paginationHTML = `<span class="${params.progressbarFillClass}"></span>`;
4803
-      }
4804
-      $el.html(paginationHTML);
4805
-    }
4806
-    if (params.type !== 'custom') {
4807
-      swiper.emit('paginationRender', swiper.pagination.$el[0]);
4808
-    }
4809
-  },
4810
-  init() {
4811
-    const swiper = this;
4812
-    const params = swiper.params.pagination;
4813
-    if (!params.el) return;
4814
-
4815
-    let $el = $(params.el);
4816
-    if ($el.length === 0) return;
4817
-
4818
-    if (
4819
-      swiper.params.uniqueNavElements
4820
-      && typeof params.el === 'string'
4821
-      && $el.length > 1
4822
-      && swiper.$el.find(params.el).length === 1
4823
-    ) {
4824
-      $el = swiper.$el.find(params.el);
4825
-    }
4826
-
4827
-    if (params.type === 'bullets' && params.clickable) {
4828
-      $el.addClass(params.clickableClass);
4829
-    }
4830
-
4831
-    $el.addClass(params.modifierClass + params.type);
4832
-
4833
-    if (params.type === 'bullets' && params.dynamicBullets) {
4834
-      $el.addClass(`${params.modifierClass}${params.type}-dynamic`);
4835
-      swiper.pagination.dynamicBulletIndex = 0;
4836
-      if (params.dynamicMainBullets < 1) {
4837
-        params.dynamicMainBullets = 1;
4838
-      }
4839
-    }
4840
-    if (params.type === 'progressbar' && params.progressbarOpposite) {
4841
-      $el.addClass(params.progressbarOppositeClass);
4842
-    }
4843
-
4844
-    if (params.clickable) {
4845
-      $el.on('click', `.${params.bulletClass}`, function onClick(e) {
4846
-        e.preventDefault();
4847
-        let index = $(this).index() * swiper.params.slidesPerGroup;
4848
-        if (swiper.params.loop) index += swiper.loopedSlides;
4849
-        swiper.slideTo(index);
4850
-      });
4851
-    }
4852
-
4853
-    Utils.extend(swiper.pagination, {
4854
-      $el,
4855
-      el: $el[0],
4856
-    });
4857
-  },
4858
-  destroy() {
4859
-    const swiper = this;
4860
-    const params = swiper.params.pagination;
4861
-    if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
4862
-    const $el = swiper.pagination.$el;
4863
-
4864
-    $el.removeClass(params.hiddenClass);
4865
-    $el.removeClass(params.modifierClass + params.type);
4866
-    if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass);
4867
-    if (params.clickable) {
4868
-      $el.off('click', `.${params.bulletClass}`);
4869
-    }
4870
-  },
4871
-};
4872
-
4873
-var pagination = {
4874
-  name: 'pagination',
4875
-  params: {
4876
-    pagination: {
4877
-      el: null,
4878
-      bulletElement: 'span',
4879
-      clickable: false,
4880
-      hideOnClick: false,
4881
-      renderBullet: null,
4882
-      renderProgressbar: null,
4883
-      renderFraction: null,
4884
-      renderCustom: null,
4885
-      progressbarOpposite: false,
4886
-      type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
4887
-      dynamicBullets: false,
4888
-      dynamicMainBullets: 1,
4889
-      formatFractionCurrent: (number) => number,
4890
-      formatFractionTotal: (number) => number,
4891
-      bulletClass: 'swiper-pagination-bullet',
4892
-      bulletActiveClass: 'swiper-pagination-bullet-active',
4893
-      modifierClass: 'swiper-pagination-', // NEW
4894
-      currentClass: 'swiper-pagination-current',
4895
-      totalClass: 'swiper-pagination-total',
4896
-      hiddenClass: 'swiper-pagination-hidden',
4897
-      progressbarFillClass: 'swiper-pagination-progressbar-fill',
4898
-      progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',
4899
-      clickableClass: 'swiper-pagination-clickable', // NEW
4900
-      lockClass: 'swiper-pagination-lock',
4901
-    },
4902
-  },
4903
-  create() {
4904
-    const swiper = this;
4905
-    Utils.extend(swiper, {
4906
-      pagination: {
4907
-        init: Pagination.init.bind(swiper),
4908
-        render: Pagination.render.bind(swiper),
4909
-        update: Pagination.update.bind(swiper),
4910
-        destroy: Pagination.destroy.bind(swiper),
4911
-        dynamicBulletIndex: 0,
4912
-      },
4913
-    });
4914
-  },
4915
-  on: {
4916
-    init() {
4917
-      const swiper = this;
4918
-      swiper.pagination.init();
4919
-      swiper.pagination.render();
4920
-      swiper.pagination.update();
4921
-    },
4922
-    activeIndexChange() {
4923
-      const swiper = this;
4924
-      if (swiper.params.loop) {
4925
-        swiper.pagination.update();
4926
-      } else if (typeof swiper.snapIndex === 'undefined') {
4927
-        swiper.pagination.update();
4928
-      }
4929
-    },
4930
-    snapIndexChange() {
4931
-      const swiper = this;
4932
-      if (!swiper.params.loop) {
4933
-        swiper.pagination.update();
4934
-      }
4935
-    },
4936
-    slidesLengthChange() {
4937
-      const swiper = this;
4938
-      if (swiper.params.loop) {
4939
-        swiper.pagination.render();
4940
-        swiper.pagination.update();
4941
-      }
4942
-    },
4943
-    snapGridLengthChange() {
4944
-      const swiper = this;
4945
-      if (!swiper.params.loop) {
4946
-        swiper.pagination.render();
4947
-        swiper.pagination.update();
4948
-      }
4949
-    },
4950
-    destroy() {
4951
-      const swiper = this;
4952
-      swiper.pagination.destroy();
4953
-    },
4954
-    click(e) {
4955
-      const swiper = this;
4956
-      if (
4957
-        swiper.params.pagination.el
4958
-        && swiper.params.pagination.hideOnClick
4959
-        && swiper.pagination.$el.length > 0
4960
-        && !$(e.target).hasClass(swiper.params.pagination.bulletClass)
4961
-      ) {
4962
-        const isHidden = swiper.pagination.$el.hasClass(swiper.params.pagination.hiddenClass);
4963
-        if (isHidden === true) {
4964
-          swiper.emit('paginationShow', swiper);
4965
-        } else {
4966
-          swiper.emit('paginationHide', swiper);
4967
-        }
4968
-        swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);
4969
-      }
4970
-    },
4971
-  },
4972
-};
4973
-
4974
-const Scrollbar = {
4975
-  setTranslate() {
4976
-    const swiper = this;
4977
-    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
4978
-    const { scrollbar, rtlTranslate: rtl, progress } = swiper;
4979
-    const {
4980
-      dragSize, trackSize, $dragEl, $el,
4981
-    } = scrollbar;
4982
-    const params = swiper.params.scrollbar;
4983
-
4984
-    let newSize = dragSize;
4985
-    let newPos = (trackSize - dragSize) * progress;
4986
-    if (rtl) {
4987
-      newPos = -newPos;
4988
-      if (newPos > 0) {
4989
-        newSize = dragSize - newPos;
4990
-        newPos = 0;
4991
-      } else if (-newPos + dragSize > trackSize) {
4992
-        newSize = trackSize + newPos;
4993
-      }
4994
-    } else if (newPos < 0) {
4995
-      newSize = dragSize + newPos;
4996
-      newPos = 0;
4997
-    } else if (newPos + dragSize > trackSize) {
4998
-      newSize = trackSize - newPos;
4999
-    }
5000
-    if (swiper.isHorizontal()) {
5001
-      $dragEl.transform(`translate3d(${newPos}px, 0, 0)`);
5002
-      $dragEl[0].style.width = `${newSize}px`;
5003
-    } else {
5004
-      $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);
5005
-      $dragEl[0].style.height = `${newSize}px`;
5006
-    }
5007
-    if (params.hide) {
5008
-      clearTimeout(swiper.scrollbar.timeout);
5009
-      $el[0].style.opacity = 1;
5010
-      swiper.scrollbar.timeout = setTimeout(() => {
5011
-        $el[0].style.opacity = 0;
5012
-        $el.transition(400);
5013
-      }, 1000);
5014
-    }
5015
-  },
5016
-  setTransition(duration) {
5017
-    const swiper = this;
5018
-    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
5019
-    swiper.scrollbar.$dragEl.transition(duration);
5020
-  },
5021
-  updateSize() {
5022
-    const swiper = this;
5023
-    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
5024
-
5025
-    const { scrollbar } = swiper;
5026
-    const { $dragEl, $el } = scrollbar;
5027
-
5028
-    $dragEl[0].style.width = '';
5029
-    $dragEl[0].style.height = '';
5030
-    const trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;
5031
-
5032
-    const divider = swiper.size / swiper.virtualSize;
5033
-    const moveDivider = divider * (trackSize / swiper.size);
5034
-    let dragSize;
5035
-    if (swiper.params.scrollbar.dragSize === 'auto') {
5036
-      dragSize = trackSize * divider;
5037
-    } else {
5038
-      dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);
5039
-    }
5040
-
5041
-    if (swiper.isHorizontal()) {
5042
-      $dragEl[0].style.width = `${dragSize}px`;
5043
-    } else {
5044
-      $dragEl[0].style.height = `${dragSize}px`;
5045
-    }
5046
-
5047
-    if (divider >= 1) {
5048
-      $el[0].style.display = 'none';
5049
-    } else {
5050
-      $el[0].style.display = '';
5051
-    }
5052
-    if (swiper.params.scrollbar.hide) {
5053
-      $el[0].style.opacity = 0;
5054
-    }
5055
-    Utils.extend(scrollbar, {
5056
-      trackSize,
5057
-      divider,
5058
-      moveDivider,
5059
-      dragSize,
5060
-    });
5061
-    scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);
5062
-  },
5063
-  getPointerPosition(e) {
5064
-    const swiper = this;
5065
-    if (swiper.isHorizontal()) {
5066
-      return ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].clientX : e.clientX);
5067
-    }
5068
-    return ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].clientY : e.clientY);
5069
-  },
5070
-  setDragPosition(e) {
5071
-    const swiper = this;
5072
-    const { scrollbar, rtlTranslate: rtl } = swiper;
5073
-    const {
5074
-      $el,
5075
-      dragSize,
5076
-      trackSize,
5077
-      dragStartPos,
5078
-    } = scrollbar;
5079
-
5080
-    let positionRatio;
5081
-    positionRatio = ((scrollbar.getPointerPosition(e)) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top']
5082
-      - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize);
5083
-    positionRatio = Math.max(Math.min(positionRatio, 1), 0);
5084
-    if (rtl) {
5085
-      positionRatio = 1 - positionRatio;
5086
-    }
5087
-
5088
-    const position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio);
5089
-
5090
-    swiper.updateProgress(position);
5091
-    swiper.setTranslate(position);
5092
-    swiper.updateActiveIndex();
5093
-    swiper.updateSlidesClasses();
5094
-  },
5095
-  onDragStart(e) {
5096
-    const swiper = this;
5097
-    const params = swiper.params.scrollbar;
5098
-    const { scrollbar, $wrapperEl } = swiper;
5099
-    const { $el, $dragEl } = scrollbar;
5100
-    swiper.scrollbar.isTouched = true;
5101
-    swiper.scrollbar.dragStartPos = (e.target === $dragEl[0] || e.target === $dragEl)
5102
-      ? scrollbar.getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null;
5103
-    e.preventDefault();
5104
-    e.stopPropagation();
5105
-
5106
-    $wrapperEl.transition(100);
5107
-    $dragEl.transition(100);
5108
-    scrollbar.setDragPosition(e);
5109
-
5110
-    clearTimeout(swiper.scrollbar.dragTimeout);
5111
-
5112
-    $el.transition(0);
5113
-    if (params.hide) {
5114
-      $el.css('opacity', 1);
5115
-    }
5116
-    if (swiper.params.cssMode) {
5117
-      swiper.$wrapperEl.css('scroll-snap-type', 'none');
5118
-    }
5119
-    swiper.emit('scrollbarDragStart', e);
5120
-  },
5121
-  onDragMove(e) {
5122
-    const swiper = this;
5123
-    const { scrollbar, $wrapperEl } = swiper;
5124
-    const { $el, $dragEl } = scrollbar;
5125
-
5126
-    if (!swiper.scrollbar.isTouched) return;
5127
-    if (e.preventDefault) e.preventDefault();
5128
-    else e.returnValue = false;
5129
-    scrollbar.setDragPosition(e);
5130
-    $wrapperEl.transition(0);
5131
-    $el.transition(0);
5132
-    $dragEl.transition(0);
5133
-    swiper.emit('scrollbarDragMove', e);
5134
-  },
5135
-  onDragEnd(e) {
5136
-    const swiper = this;
5137
-
5138
-    const params = swiper.params.scrollbar;
5139
-    const { scrollbar, $wrapperEl } = swiper;
5140
-    const { $el } = scrollbar;
5141
-
5142
-    if (!swiper.scrollbar.isTouched) return;
5143
-    swiper.scrollbar.isTouched = false;
5144
-    if (swiper.params.cssMode) {
5145
-      swiper.$wrapperEl.css('scroll-snap-type', '');
5146
-      $wrapperEl.transition('');
5147
-    }
5148
-    if (params.hide) {
5149
-      clearTimeout(swiper.scrollbar.dragTimeout);
5150
-      swiper.scrollbar.dragTimeout = Utils.nextTick(() => {
5151
-        $el.css('opacity', 0);
5152
-        $el.transition(400);
5153
-      }, 1000);
5154
-    }
5155
-    swiper.emit('scrollbarDragEnd', e);
5156
-    if (params.snapOnRelease) {
5157
-      swiper.slideToClosest();
5158
-    }
5159
-  },
5160
-  enableDraggable() {
5161
-    const swiper = this;
5162
-    if (!swiper.params.scrollbar.el) return;
5163
-    const {
5164
-      scrollbar, touchEventsTouch, touchEventsDesktop, params,
5165
-    } = swiper;
5166
-    const $el = scrollbar.$el;
5167
-    const target = $el[0];
5168
-    const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
5169
-    const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
5170
-    if (!Support.touch) {
5171
-      target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
5172
-      document$1.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
5173
-      document$1.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
5174
-    } else {
5175
-      target.addEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
5176
-      target.addEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
5177
-      target.addEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
5178
-    }
5179
-  },
5180
-  disableDraggable() {
5181
-    const swiper = this;
5182
-    if (!swiper.params.scrollbar.el) return;
5183
-    const {
5184
-      scrollbar, touchEventsTouch, touchEventsDesktop, params,
5185
-    } = swiper;
5186
-    const $el = scrollbar.$el;
5187
-    const target = $el[0];
5188
-    const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
5189
-    const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
5190
-    if (!Support.touch) {
5191
-      target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
5192
-      document$1.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
5193
-      document$1.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
5194
-    } else {
5195
-      target.removeEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
5196
-      target.removeEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
5197
-      target.removeEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
5198
-    }
5199
-  },
5200
-  init() {
5201
-    const swiper = this;
5202
-    if (!swiper.params.scrollbar.el) return;
5203
-    const { scrollbar, $el: $swiperEl } = swiper;
5204
-    const params = swiper.params.scrollbar;
5205
-
5206
-    let $el = $(params.el);
5207
-    if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {
5208
-      $el = $swiperEl.find(params.el);
5209
-    }
5210
-
5211
-    let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);
5212
-    if ($dragEl.length === 0) {
5213
-      $dragEl = $(`<div class="${swiper.params.scrollbar.dragClass}"></div>`);
5214
-      $el.append($dragEl);
5215
-    }
5216
-
5217
-    Utils.extend(scrollbar, {
5218
-      $el,
5219
-      el: $el[0],
5220
-      $dragEl,
5221
-      dragEl: $dragEl[0],
5222
-    });
5223
-
5224
-    if (params.draggable) {
5225
-      scrollbar.enableDraggable();
5226
-    }
5227
-  },
5228
-  destroy() {
5229
-    const swiper = this;
5230
-    swiper.scrollbar.disableDraggable();
5231
-  },
5232
-};
5233
-
5234
-var scrollbar = {
5235
-  name: 'scrollbar',
5236
-  params: {
5237
-    scrollbar: {
5238
-      el: null,
5239
-      dragSize: 'auto',
5240
-      hide: false,
5241
-      draggable: false,
5242
-      snapOnRelease: true,
5243
-      lockClass: 'swiper-scrollbar-lock',
5244
-      dragClass: 'swiper-scrollbar-drag',
5245
-    },
5246
-  },
5247
-  create() {
5248
-    const swiper = this;
5249
-    Utils.extend(swiper, {
5250
-      scrollbar: {
5251
-        init: Scrollbar.init.bind(swiper),
5252
-        destroy: Scrollbar.destroy.bind(swiper),
5253
-        updateSize: Scrollbar.updateSize.bind(swiper),
5254
-        setTranslate: Scrollbar.setTranslate.bind(swiper),
5255
-        setTransition: Scrollbar.setTransition.bind(swiper),
5256
-        enableDraggable: Scrollbar.enableDraggable.bind(swiper),
5257
-        disableDraggable: Scrollbar.disableDraggable.bind(swiper),
5258
-        setDragPosition: Scrollbar.setDragPosition.bind(swiper),
5259
-        getPointerPosition: Scrollbar.getPointerPosition.bind(swiper),
5260
-        onDragStart: Scrollbar.onDragStart.bind(swiper),
5261
-        onDragMove: Scrollbar.onDragMove.bind(swiper),
5262
-        onDragEnd: Scrollbar.onDragEnd.bind(swiper),
5263
-        isTouched: false,
5264
-        timeout: null,
5265
-        dragTimeout: null,
5266
-      },
5267
-    });
5268
-  },
5269
-  on: {
5270
-    init() {
5271
-      const swiper = this;
5272
-      swiper.scrollbar.init();
5273
-      swiper.scrollbar.updateSize();
5274
-      swiper.scrollbar.setTranslate();
5275
-    },
5276
-    update() {
5277
-      const swiper = this;
5278
-      swiper.scrollbar.updateSize();
5279
-    },
5280
-    resize() {
5281
-      const swiper = this;
5282
-      swiper.scrollbar.updateSize();
5283
-    },
5284
-    observerUpdate() {
5285
-      const swiper = this;
5286
-      swiper.scrollbar.updateSize();
5287
-    },
5288
-    setTranslate() {
5289
-      const swiper = this;
5290
-      swiper.scrollbar.setTranslate();
5291
-    },
5292
-    setTransition(duration) {
5293
-      const swiper = this;
5294
-      swiper.scrollbar.setTransition(duration);
5295
-    },
5296
-    destroy() {
5297
-      const swiper = this;
5298
-      swiper.scrollbar.destroy();
5299
-    },
5300
-  },
5301
-};
5302
-
5303
-const Parallax = {
5304
-  setTransform(el, progress) {
5305
-    const swiper = this;
5306
-    const { rtl } = swiper;
5307
-
5308
-    const $el = $(el);
5309
-    const rtlFactor = rtl ? -1 : 1;
5310
-
5311
-    const p = $el.attr('data-swiper-parallax') || '0';
5312
-    let x = $el.attr('data-swiper-parallax-x');
5313
-    let y = $el.attr('data-swiper-parallax-y');
5314
-    const scale = $el.attr('data-swiper-parallax-scale');
5315
-    const opacity = $el.attr('data-swiper-parallax-opacity');
5316
-
5317
-    if (x || y) {
5318
-      x = x || '0';
5319
-      y = y || '0';
5320
-    } else if (swiper.isHorizontal()) {
5321
-      x = p;
5322
-      y = '0';
5323
-    } else {
5324
-      y = p;
5325
-      x = '0';
5326
-    }
5327
-
5328
-    if ((x).indexOf('%') >= 0) {
5329
-      x = `${parseInt(x, 10) * progress * rtlFactor}%`;
5330
-    } else {
5331
-      x = `${x * progress * rtlFactor}px`;
5332
-    }
5333
-    if ((y).indexOf('%') >= 0) {
5334
-      y = `${parseInt(y, 10) * progress}%`;
5335
-    } else {
5336
-      y = `${y * progress}px`;
5337
-    }
5338
-
5339
-    if (typeof opacity !== 'undefined' && opacity !== null) {
5340
-      const currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress)));
5341
-      $el[0].style.opacity = currentOpacity;
5342
-    }
5343
-    if (typeof scale === 'undefined' || scale === null) {
5344
-      $el.transform(`translate3d(${x}, ${y}, 0px)`);
5345
-    } else {
5346
-      const currentScale = scale - ((scale - 1) * (1 - Math.abs(progress)));
5347
-      $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`);
5348
-    }
5349
-  },
5350
-  setTranslate() {
5351
-    const swiper = this;
5352
-    const {
5353
-      $el, slides, progress, snapGrid,
5354
-    } = swiper;
5355
-    $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]')
5356
-      .each((index, el) => {
5357
-        swiper.parallax.setTransform(el, progress);
5358
-      });
5359
-    slides.each((slideIndex, slideEl) => {
5360
-      let slideProgress = slideEl.progress;
5361
-      if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {
5362
-        slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1));
5363
-      }
5364
-      slideProgress = Math.min(Math.max(slideProgress, -1), 1);
5365
-      $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]')
5366
-        .each((index, el) => {
5367
-          swiper.parallax.setTransform(el, slideProgress);
5368
-        });
5369
-    });
5370
-  },
5371
-  setTransition(duration = this.params.speed) {
5372
-    const swiper = this;
5373
-    const { $el } = swiper;
5374
-    $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]')
5375
-      .each((index, parallaxEl) => {
5376
-        const $parallaxEl = $(parallaxEl);
5377
-        let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;
5378
-        if (duration === 0) parallaxDuration = 0;
5379
-        $parallaxEl.transition(parallaxDuration);
5380
-      });
5381
-  },
5382
-};
5383
-
5384
-var parallax = {
5385
-  name: 'parallax',
5386
-  params: {
5387
-    parallax: {
5388
-      enabled: false,
5389
-    },
5390
-  },
5391
-  create() {
5392
-    const swiper = this;
5393
-    Utils.extend(swiper, {
5394
-      parallax: {
5395
-        setTransform: Parallax.setTransform.bind(swiper),
5396
-        setTranslate: Parallax.setTranslate.bind(swiper),
5397
-        setTransition: Parallax.setTransition.bind(swiper),
5398
-      },
5399
-    });
5400
-  },
5401
-  on: {
5402
-    beforeInit() {
5403
-      const swiper = this;
5404
-      if (!swiper.params.parallax.enabled) return;
5405
-      swiper.params.watchSlidesProgress = true;
5406
-      swiper.originalParams.watchSlidesProgress = true;
5407
-    },
5408
-    init() {
5409
-      const swiper = this;
5410
-      if (!swiper.params.parallax.enabled) return;
5411
-      swiper.parallax.setTranslate();
5412
-    },
5413
-    setTranslate() {
5414
-      const swiper = this;
5415
-      if (!swiper.params.parallax.enabled) return;
5416
-      swiper.parallax.setTranslate();
5417
-    },
5418
-    setTransition(duration) {
5419
-      const swiper = this;
5420
-      if (!swiper.params.parallax.enabled) return;
5421
-      swiper.parallax.setTransition(duration);
5422
-    },
5423
-  },
5424
-};
5425
-
5426
-const Zoom = {
5427
-  // Calc Scale From Multi-touches
5428
-  getDistanceBetweenTouches(e) {
5429
-    if (e.targetTouches.length < 2) return 1;
5430
-    const x1 = e.targetTouches[0].pageX;
5431
-    const y1 = e.targetTouches[0].pageY;
5432
-    const x2 = e.targetTouches[1].pageX;
5433
-    const y2 = e.targetTouches[1].pageY;
5434
-    const distance = Math.sqrt(((x2 - x1) ** 2) + ((y2 - y1) ** 2));
5435
-    return distance;
5436
-  },
5437
-  // Events
5438
-  onGestureStart(e) {
5439
-    const swiper = this;
5440
-    const params = swiper.params.zoom;
5441
-    const zoom = swiper.zoom;
5442
-    const { gesture } = zoom;
5443
-    zoom.fakeGestureTouched = false;
5444
-    zoom.fakeGestureMoved = false;
5445
-    if (!Support.gestures) {
5446
-      if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {
5447
-        return;
5448
-      }
5449
-      zoom.fakeGestureTouched = true;
5450
-      gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);
5451
-    }
5452
-    if (!gesture.$slideEl || !gesture.$slideEl.length) {
5453
-      gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);
5454
-      if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
5455
-      gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');
5456
-      gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
5457
-      gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
5458
-      if (gesture.$imageWrapEl.length === 0) {
5459
-        gesture.$imageEl = undefined;
5460
-        return;
5461
-      }
5462
-    }
5463
-    if (gesture.$imageEl) {
5464
-      gesture.$imageEl.transition(0);
5465
-    }
5466
-    swiper.zoom.isScaling = true;
5467
-  },
5468
-  onGestureChange(e) {
5469
-    const swiper = this;
5470
-    const params = swiper.params.zoom;
5471
-    const zoom = swiper.zoom;
5472
-    const { gesture } = zoom;
5473
-    if (!Support.gestures) {
5474
-      if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {
5475
-        return;
5476
-      }
5477
-      zoom.fakeGestureMoved = true;
5478
-      gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);
5479
-    }
5480
-    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5481
-    if (Support.gestures) {
5482
-      zoom.scale = e.scale * zoom.currentScale;
5483
-    } else {
5484
-      zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;
5485
-    }
5486
-    if (zoom.scale > gesture.maxRatio) {
5487
-      zoom.scale = (gesture.maxRatio - 1) + (((zoom.scale - gesture.maxRatio) + 1) ** 0.5);
5488
-    }
5489
-    if (zoom.scale < params.minRatio) {
5490
-      zoom.scale = (params.minRatio + 1) - (((params.minRatio - zoom.scale) + 1) ** 0.5);
5491
-    }
5492
-    gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);
5493
-  },
5494
-  onGestureEnd(e) {
5495
-    const swiper = this;
5496
-    const params = swiper.params.zoom;
5497
-    const zoom = swiper.zoom;
5498
-    const { gesture } = zoom;
5499
-    if (!Support.gestures) {
5500
-      if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {
5501
-        return;
5502
-      }
5503
-      if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) {
5504
-        return;
5505
-      }
5506
-      zoom.fakeGestureTouched = false;
5507
-      zoom.fakeGestureMoved = false;
5508
-    }
5509
-    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5510
-    zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);
5511
-    gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
5512
-    zoom.currentScale = zoom.scale;
5513
-    zoom.isScaling = false;
5514
-    if (zoom.scale === 1) gesture.$slideEl = undefined;
5515
-  },
5516
-  onTouchStart(e) {
5517
-    const swiper = this;
5518
-    const zoom = swiper.zoom;
5519
-    const { gesture, image } = zoom;
5520
-    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5521
-    if (image.isTouched) return;
5522
-    if (Device.android && e.cancelable) e.preventDefault();
5523
-    image.isTouched = true;
5524
-    image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
5525
-    image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
5526
-  },
5527
-  onTouchMove(e) {
5528
-    const swiper = this;
5529
-    const zoom = swiper.zoom;
5530
-    const { gesture, image, velocity } = zoom;
5531
-    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5532
-    swiper.allowClick = false;
5533
-    if (!image.isTouched || !gesture.$slideEl) return;
5534
-
5535
-    if (!image.isMoved) {
5536
-      image.width = gesture.$imageEl[0].offsetWidth;
5537
-      image.height = gesture.$imageEl[0].offsetHeight;
5538
-      image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;
5539
-      image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;
5540
-      gesture.slideWidth = gesture.$slideEl[0].offsetWidth;
5541
-      gesture.slideHeight = gesture.$slideEl[0].offsetHeight;
5542
-      gesture.$imageWrapEl.transition(0);
5543
-      if (swiper.rtl) {
5544
-        image.startX = -image.startX;
5545
-        image.startY = -image.startY;
5546
-      }
5547
-    }
5548
-    // Define if we need image drag
5549
-    const scaledWidth = image.width * zoom.scale;
5550
-    const scaledHeight = image.height * zoom.scale;
5551
-
5552
-    if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;
5553
-
5554
-    image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
5555
-    image.maxX = -image.minX;
5556
-    image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
5557
-    image.maxY = -image.minY;
5558
-
5559
-    image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
5560
-    image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
5561
-
5562
-    if (!image.isMoved && !zoom.isScaling) {
5563
-      if (
5564
-        swiper.isHorizontal()
5565
-        && (
5566
-          (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x)
5567
-          || (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)
5568
-        )
5569
-      ) {
5570
-        image.isTouched = false;
5571
-        return;
5572
-      } if (
5573
-        !swiper.isHorizontal()
5574
-        && (
5575
-          (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y)
5576
-          || (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)
5577
-        )
5578
-      ) {
5579
-        image.isTouched = false;
5580
-        return;
5581
-      }
5582
-    }
5583
-    if (e.cancelable) {
5584
-      e.preventDefault();
5585
-    }
5586
-    e.stopPropagation();
5587
-
5588
-    image.isMoved = true;
5589
-    image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX;
5590
-    image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY;
5591
-
5592
-    if (image.currentX < image.minX) {
5593
-      image.currentX = (image.minX + 1) - (((image.minX - image.currentX) + 1) ** 0.8);
5594
-    }
5595
-    if (image.currentX > image.maxX) {
5596
-      image.currentX = (image.maxX - 1) + (((image.currentX - image.maxX) + 1) ** 0.8);
5597
-    }
5598
-
5599
-    if (image.currentY < image.minY) {
5600
-      image.currentY = (image.minY + 1) - (((image.minY - image.currentY) + 1) ** 0.8);
5601
-    }
5602
-    if (image.currentY > image.maxY) {
5603
-      image.currentY = (image.maxY - 1) + (((image.currentY - image.maxY) + 1) ** 0.8);
5604
-    }
5605
-
5606
-    // Velocity
5607
-    if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;
5608
-    if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;
5609
-    if (!velocity.prevTime) velocity.prevTime = Date.now();
5610
-    velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;
5611
-    velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;
5612
-    if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;
5613
-    if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;
5614
-    velocity.prevPositionX = image.touchesCurrent.x;
5615
-    velocity.prevPositionY = image.touchesCurrent.y;
5616
-    velocity.prevTime = Date.now();
5617
-
5618
-    gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
5619
-  },
5620
-  onTouchEnd() {
5621
-    const swiper = this;
5622
-    const zoom = swiper.zoom;
5623
-    const { gesture, image, velocity } = zoom;
5624
-    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5625
-    if (!image.isTouched || !image.isMoved) {
5626
-      image.isTouched = false;
5627
-      image.isMoved = false;
5628
-      return;
5629
-    }
5630
-    image.isTouched = false;
5631
-    image.isMoved = false;
5632
-    let momentumDurationX = 300;
5633
-    let momentumDurationY = 300;
5634
-    const momentumDistanceX = velocity.x * momentumDurationX;
5635
-    const newPositionX = image.currentX + momentumDistanceX;
5636
-    const momentumDistanceY = velocity.y * momentumDurationY;
5637
-    const newPositionY = image.currentY + momentumDistanceY;
5638
-
5639
-    // Fix duration
5640
-    if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);
5641
-    if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);
5642
-    const momentumDuration = Math.max(momentumDurationX, momentumDurationY);
5643
-
5644
-    image.currentX = newPositionX;
5645
-    image.currentY = newPositionY;
5646
-
5647
-    // Define if we need image drag
5648
-    const scaledWidth = image.width * zoom.scale;
5649
-    const scaledHeight = image.height * zoom.scale;
5650
-    image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
5651
-    image.maxX = -image.minX;
5652
-    image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
5653
-    image.maxY = -image.minY;
5654
-    image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);
5655
-    image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);
5656
-
5657
-    gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
5658
-  },
5659
-  onTransitionEnd() {
5660
-    const swiper = this;
5661
-    const zoom = swiper.zoom;
5662
-    const { gesture } = zoom;
5663
-    if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {
5664
-      if (gesture.$imageEl) {
5665
-        gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');
5666
-      }
5667
-      if (gesture.$imageWrapEl) {
5668
-        gesture.$imageWrapEl.transform('translate3d(0,0,0)');
5669
-      }
5670
-
5671
-      zoom.scale = 1;
5672
-      zoom.currentScale = 1;
5673
-
5674
-      gesture.$slideEl = undefined;
5675
-      gesture.$imageEl = undefined;
5676
-      gesture.$imageWrapEl = undefined;
5677
-    }
5678
-  },
5679
-  // Toggle Zoom
5680
-  toggle(e) {
5681
-    const swiper = this;
5682
-    const zoom = swiper.zoom;
5683
-
5684
-    if (zoom.scale && zoom.scale !== 1) {
5685
-      // Zoom Out
5686
-      zoom.out();
5687
-    } else {
5688
-      // Zoom In
5689
-      zoom.in(e);
5690
-    }
5691
-  },
5692
-  in(e) {
5693
-    const swiper = this;
5694
-
5695
-    const zoom = swiper.zoom;
5696
-    const params = swiper.params.zoom;
5697
-    const { gesture, image } = zoom;
5698
-
5699
-    if (!gesture.$slideEl) {
5700
-      if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {
5701
-        gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);
5702
-      } else {
5703
-        gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
5704
-      }
5705
-      gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');
5706
-      gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
5707
-    }
5708
-    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5709
-
5710
-    gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);
5711
-
5712
-    let touchX;
5713
-    let touchY;
5714
-    let offsetX;
5715
-    let offsetY;
5716
-    let diffX;
5717
-    let diffY;
5718
-    let translateX;
5719
-    let translateY;
5720
-    let imageWidth;
5721
-    let imageHeight;
5722
-    let scaledWidth;
5723
-    let scaledHeight;
5724
-    let translateMinX;
5725
-    let translateMinY;
5726
-    let translateMaxX;
5727
-    let translateMaxY;
5728
-    let slideWidth;
5729
-    let slideHeight;
5730
-
5731
-    if (typeof image.touchesStart.x === 'undefined' && e) {
5732
-      touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
5733
-      touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
5734
-    } else {
5735
-      touchX = image.touchesStart.x;
5736
-      touchY = image.touchesStart.y;
5737
-    }
5738
-
5739
-    zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
5740
-    zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
5741
-    if (e) {
5742
-      slideWidth = gesture.$slideEl[0].offsetWidth;
5743
-      slideHeight = gesture.$slideEl[0].offsetHeight;
5744
-      offsetX = gesture.$slideEl.offset().left;
5745
-      offsetY = gesture.$slideEl.offset().top;
5746
-      diffX = (offsetX + (slideWidth / 2)) - touchX;
5747
-      diffY = (offsetY + (slideHeight / 2)) - touchY;
5748
-
5749
-      imageWidth = gesture.$imageEl[0].offsetWidth;
5750
-      imageHeight = gesture.$imageEl[0].offsetHeight;
5751
-      scaledWidth = imageWidth * zoom.scale;
5752
-      scaledHeight = imageHeight * zoom.scale;
5753
-
5754
-      translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0);
5755
-      translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0);
5756
-      translateMaxX = -translateMinX;
5757
-      translateMaxY = -translateMinY;
5758
-
5759
-      translateX = diffX * zoom.scale;
5760
-      translateY = diffY * zoom.scale;
5761
-
5762
-      if (translateX < translateMinX) {
5763
-        translateX = translateMinX;
5764
-      }
5765
-      if (translateX > translateMaxX) {
5766
-        translateX = translateMaxX;
5767
-      }
5768
-
5769
-      if (translateY < translateMinY) {
5770
-        translateY = translateMinY;
5771
-      }
5772
-      if (translateY > translateMaxY) {
5773
-        translateY = translateMaxY;
5774
-      }
5775
-    } else {
5776
-      translateX = 0;
5777
-      translateY = 0;
5778
-    }
5779
-    gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`);
5780
-    gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
5781
-  },
5782
-  out() {
5783
-    const swiper = this;
5784
-
5785
-    const zoom = swiper.zoom;
5786
-    const params = swiper.params.zoom;
5787
-    const { gesture } = zoom;
5788
-
5789
-    if (!gesture.$slideEl) {
5790
-      if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {
5791
-        gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);
5792
-      } else {
5793
-        gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
5794
-      }
5795
-      gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');
5796
-      gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
5797
-    }
5798
-    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5799
-
5800
-    zoom.scale = 1;
5801
-    zoom.currentScale = 1;
5802
-    gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');
5803
-    gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');
5804
-    gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);
5805
-    gesture.$slideEl = undefined;
5806
-  },
5807
-  // Attach/Detach Events
5808
-  enable() {
5809
-    const swiper = this;
5810
-    const zoom = swiper.zoom;
5811
-    if (zoom.enabled) return;
5812
-    zoom.enabled = true;
5813
-
5814
-    const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
5815
-    const activeListenerWithCapture = Support.passiveListener ? { passive: false, capture: true } : true;
5816
-
5817
-    const slideSelector = `.${swiper.params.slideClass}`;
5818
-
5819
-    // Scale image
5820
-    if (Support.gestures) {
5821
-      swiper.$wrapperEl.on('gesturestart', slideSelector, zoom.onGestureStart, passiveListener);
5822
-      swiper.$wrapperEl.on('gesturechange', slideSelector, zoom.onGestureChange, passiveListener);
5823
-      swiper.$wrapperEl.on('gestureend', slideSelector, zoom.onGestureEnd, passiveListener);
5824
-    } else if (swiper.touchEvents.start === 'touchstart') {
5825
-      swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, zoom.onGestureStart, passiveListener);
5826
-      swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, zoom.onGestureChange, activeListenerWithCapture);
5827
-      swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, zoom.onGestureEnd, passiveListener);
5828
-      if (swiper.touchEvents.cancel) {
5829
-        swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, zoom.onGestureEnd, passiveListener);
5830
-      }
5831
-    }
5832
-
5833
-    // Move image
5834
-    swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove, activeListenerWithCapture);
5835
-  },
5836
-  disable() {
5837
-    const swiper = this;
5838
-    const zoom = swiper.zoom;
5839
-    if (!zoom.enabled) return;
5840
-
5841
-    swiper.zoom.enabled = false;
5842
-
5843
-    const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
5844
-    const activeListenerWithCapture = Support.passiveListener ? { passive: false, capture: true } : true;
5845
-
5846
-    const slideSelector = `.${swiper.params.slideClass}`;
5847
-
5848
-    // Scale image
5849
-    if (Support.gestures) {
5850
-      swiper.$wrapperEl.off('gesturestart', slideSelector, zoom.onGestureStart, passiveListener);
5851
-      swiper.$wrapperEl.off('gesturechange', slideSelector, zoom.onGestureChange, passiveListener);
5852
-      swiper.$wrapperEl.off('gestureend', slideSelector, zoom.onGestureEnd, passiveListener);
5853
-    } else if (swiper.touchEvents.start === 'touchstart') {
5854
-      swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, zoom.onGestureStart, passiveListener);
5855
-      swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, zoom.onGestureChange, activeListenerWithCapture);
5856
-      swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, zoom.onGestureEnd, passiveListener);
5857
-      if (swiper.touchEvents.cancel) {
5858
-        swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, zoom.onGestureEnd, passiveListener);
5859
-      }
5860
-    }
5861
-
5862
-    // Move image
5863
-    swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove, activeListenerWithCapture);
5864
-  },
5865
-};
5866
-
5867
-var zoom = {
5868
-  name: 'zoom',
5869
-  params: {
5870
-    zoom: {
5871
-      enabled: false,
5872
-      maxRatio: 3,
5873
-      minRatio: 1,
5874
-      toggle: true,
5875
-      containerClass: 'swiper-zoom-container',
5876
-      zoomedSlideClass: 'swiper-slide-zoomed',
5877
-    },
5878
-  },
5879
-  create() {
5880
-    const swiper = this;
5881
-    const zoom = {
5882
-      enabled: false,
5883
-      scale: 1,
5884
-      currentScale: 1,
5885
-      isScaling: false,
5886
-      gesture: {
5887
-        $slideEl: undefined,
5888
-        slideWidth: undefined,
5889
-        slideHeight: undefined,
5890
-        $imageEl: undefined,
5891
-        $imageWrapEl: undefined,
5892
-        maxRatio: 3,
5893
-      },
5894
-      image: {
5895
-        isTouched: undefined,
5896
-        isMoved: undefined,
5897
-        currentX: undefined,
5898
-        currentY: undefined,
5899
-        minX: undefined,
5900
-        minY: undefined,
5901
-        maxX: undefined,
5902
-        maxY: undefined,
5903
-        width: undefined,
5904
-        height: undefined,
5905
-        startX: undefined,
5906
-        startY: undefined,
5907
-        touchesStart: {},
5908
-        touchesCurrent: {},
5909
-      },
5910
-      velocity: {
5911
-        x: undefined,
5912
-        y: undefined,
5913
-        prevPositionX: undefined,
5914
-        prevPositionY: undefined,
5915
-        prevTime: undefined,
5916
-      },
5917
-    };
5918
-
5919
-    ('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach((methodName) => {
5920
-      zoom[methodName] = Zoom[methodName].bind(swiper);
5921
-    });
5922
-    Utils.extend(swiper, {
5923
-      zoom,
5924
-    });
5925
-
5926
-    let scale = 1;
5927
-    Object.defineProperty(swiper.zoom, 'scale', {
5928
-      get() {
5929
-        return scale;
5930
-      },
5931
-      set(value) {
5932
-        if (scale !== value) {
5933
-          const imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined;
5934
-          const slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined;
5935
-          swiper.emit('zoomChange', value, imageEl, slideEl);
5936
-        }
5937
-        scale = value;
5938
-      },
5939
-    });
5940
-  },
5941
-  on: {
5942
-    init() {
5943
-      const swiper = this;
5944
-      if (swiper.params.zoom.enabled) {
5945
-        swiper.zoom.enable();
5946
-      }
5947
-    },
5948
-    destroy() {
5949
-      const swiper = this;
5950
-      swiper.zoom.disable();
5951
-    },
5952
-    touchStart(e) {
5953
-      const swiper = this;
5954
-      if (!swiper.zoom.enabled) return;
5955
-      swiper.zoom.onTouchStart(e);
5956
-    },
5957
-    touchEnd(e) {
5958
-      const swiper = this;
5959
-      if (!swiper.zoom.enabled) return;
5960
-      swiper.zoom.onTouchEnd(e);
5961
-    },
5962
-    doubleTap(e) {
5963
-      const swiper = this;
5964
-      if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {
5965
-        swiper.zoom.toggle(e);
5966
-      }
5967
-    },
5968
-    transitionEnd() {
5969
-      const swiper = this;
5970
-      if (swiper.zoom.enabled && swiper.params.zoom.enabled) {
5971
-        swiper.zoom.onTransitionEnd();
5972
-      }
5973
-    },
5974
-    slideChange() {
5975
-      const swiper = this;
5976
-      if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) {
5977
-        swiper.zoom.onTransitionEnd();
5978
-      }
5979
-    },
5980
-  },
5981
-};
5982
-
5983
-const Lazy = {
5984
-  loadInSlide(index, loadInDuplicate = true) {
5985
-    const swiper = this;
5986
-    const params = swiper.params.lazy;
5987
-    if (typeof index === 'undefined') return;
5988
-    if (swiper.slides.length === 0) return;
5989
-    const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
5990
-
5991
-    const $slideEl = isVirtual
5992
-      ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index="${index}"]`)
5993
-      : swiper.slides.eq(index);
5994
-
5995
-    let $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`);
5996
-    if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {
5997
-      $images = $images.add($slideEl[0]);
5998
-    }
5999
-    if ($images.length === 0) return;
6000
-
6001
-    $images.each((imageIndex, imageEl) => {
6002
-      const $imageEl = $(imageEl);
6003
-      $imageEl.addClass(params.loadingClass);
6004
-
6005
-      const background = $imageEl.attr('data-background');
6006
-      const src = $imageEl.attr('data-src');
6007
-      const srcset = $imageEl.attr('data-srcset');
6008
-      const sizes = $imageEl.attr('data-sizes');
6009
-      const $pictureEl = $imageEl.parent('picture');
6010
-
6011
-      swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, () => {
6012
-        if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) return;
6013
-        if (background) {
6014
-          $imageEl.css('background-image', `url("${background}")`);
6015
-          $imageEl.removeAttr('data-background');
6016
-        } else {
6017
-          if (srcset) {
6018
-            $imageEl.attr('srcset', srcset);
6019
-            $imageEl.removeAttr('data-srcset');
6020
-          }
6021
-          if (sizes) {
6022
-            $imageEl.attr('sizes', sizes);
6023
-            $imageEl.removeAttr('data-sizes');
6024
-          }
6025
-          if ($pictureEl.length) {
6026
-            $pictureEl.children('source').each((sourceIndex, sourceEl) => {
6027
-              const $source = $(sourceEl);
6028
-
6029
-              if ($source.attr('data-srcset')) {
6030
-                $source.attr('srcset', $source.attr('data-srcset'));
6031
-                $source.removeAttr('data-srcset');
6032
-              }
6033
-            });
6034
-          }
6035
-          if (src) {
6036
-            $imageEl.attr('src', src);
6037
-            $imageEl.removeAttr('data-src');
6038
-          }
6039
-        }
6040
-
6041
-        $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);
6042
-        $slideEl.find(`.${params.preloaderClass}`).remove();
6043
-        if (swiper.params.loop && loadInDuplicate) {
6044
-          const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');
6045
-          if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {
6046
-            const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`);
6047
-            swiper.lazy.loadInSlide(originalSlide.index(), false);
6048
-          } else {
6049
-            const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`);
6050
-            swiper.lazy.loadInSlide(duplicatedSlide.index(), false);
6051
-          }
6052
-        }
6053
-        swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);
6054
-        if (swiper.params.autoHeight) {
6055
-          swiper.updateAutoHeight();
6056
-        }
6057
-      });
6058
-
6059
-      swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]);
6060
-    });
6061
-  },
6062
-  load() {
6063
-    const swiper = this;
6064
-    const {
6065
-      $wrapperEl, params: swiperParams, slides, activeIndex,
6066
-    } = swiper;
6067
-    const isVirtual = swiper.virtual && swiperParams.virtual.enabled;
6068
-    const params = swiperParams.lazy;
6069
-
6070
-    let slidesPerView = swiperParams.slidesPerView;
6071
-    if (slidesPerView === 'auto') {
6072
-      slidesPerView = 0;
6073
-    }
6074
-
6075
-    function slideExist(index) {
6076
-      if (isVirtual) {
6077
-        if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index="${index}"]`).length) {
6078
-          return true;
6079
-        }
6080
-      } else if (slides[index]) return true;
6081
-      return false;
6082
-    }
6083
-
6084
-    function slideIndex(slideEl) {
6085
-      if (isVirtual) {
6086
-        return $(slideEl).attr('data-swiper-slide-index');
6087
-      }
6088
-      return $(slideEl).index();
6089
-    }
6090
-
6091
-    if (!swiper.lazy.initialImageLoaded) swiper.lazy.initialImageLoaded = true;
6092
-    if (swiper.params.watchSlidesVisibility) {
6093
-      $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each((elIndex, slideEl) => {
6094
-        const index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();
6095
-        swiper.lazy.loadInSlide(index);
6096
-      });
6097
-    } else if (slidesPerView > 1) {
6098
-      for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {
6099
-        if (slideExist(i)) swiper.lazy.loadInSlide(i);
6100
-      }
6101
-    } else {
6102
-      swiper.lazy.loadInSlide(activeIndex);
6103
-    }
6104
-    if (params.loadPrevNext) {
6105
-      if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {
6106
-        const amount = params.loadPrevNextAmount;
6107
-        const spv = slidesPerView;
6108
-        const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);
6109
-        const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);
6110
-        // Next Slides
6111
-        for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {
6112
-          if (slideExist(i)) swiper.lazy.loadInSlide(i);
6113
-        }
6114
-        // Prev Slides
6115
-        for (let i = minIndex; i < activeIndex; i += 1) {
6116
-          if (slideExist(i)) swiper.lazy.loadInSlide(i);
6117
-        }
6118
-      } else {
6119
-        const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);
6120
-        if (nextSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(nextSlide));
6121
-
6122
-        const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);
6123
-        if (prevSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(prevSlide));
6124
-      }
6125
-    }
6126
-  },
6127
-};
6128
-
6129
-var lazy = {
6130
-  name: 'lazy',
6131
-  params: {
6132
-    lazy: {
6133
-      enabled: false,
6134
-      loadPrevNext: false,
6135
-      loadPrevNextAmount: 1,
6136
-      loadOnTransitionStart: false,
6137
-
6138
-      elementClass: 'swiper-lazy',
6139
-      loadingClass: 'swiper-lazy-loading',
6140
-      loadedClass: 'swiper-lazy-loaded',
6141
-      preloaderClass: 'swiper-lazy-preloader',
6142
-    },
6143
-  },
6144
-  create() {
6145
-    const swiper = this;
6146
-    Utils.extend(swiper, {
6147
-      lazy: {
6148
-        initialImageLoaded: false,
6149
-        load: Lazy.load.bind(swiper),
6150
-        loadInSlide: Lazy.loadInSlide.bind(swiper),
6151
-      },
6152
-    });
6153
-  },
6154
-  on: {
6155
-    beforeInit() {
6156
-      const swiper = this;
6157
-      if (swiper.params.lazy.enabled && swiper.params.preloadImages) {
6158
-        swiper.params.preloadImages = false;
6159
-      }
6160
-    },
6161
-    init() {
6162
-      const swiper = this;
6163
-      if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {
6164
-        swiper.lazy.load();
6165
-      }
6166
-    },
6167
-    scroll() {
6168
-      const swiper = this;
6169
-      if (swiper.params.freeMode && !swiper.params.freeModeSticky) {
6170
-        swiper.lazy.load();
6171
-      }
6172
-    },
6173
-    resize() {
6174
-      const swiper = this;
6175
-      if (swiper.params.lazy.enabled) {
6176
-        swiper.lazy.load();
6177
-      }
6178
-    },
6179
-    scrollbarDragMove() {
6180
-      const swiper = this;
6181
-      if (swiper.params.lazy.enabled) {
6182
-        swiper.lazy.load();
6183
-      }
6184
-    },
6185
-    transitionStart() {
6186
-      const swiper = this;
6187
-      if (swiper.params.lazy.enabled) {
6188
-        if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) {
6189
-          swiper.lazy.load();
6190
-        }
6191
-      }
6192
-    },
6193
-    transitionEnd() {
6194
-      const swiper = this;
6195
-      if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {
6196
-        swiper.lazy.load();
6197
-      }
6198
-    },
6199
-    slideChange() {
6200
-      const swiper = this;
6201
-      if (swiper.params.lazy.enabled && swiper.params.cssMode) {
6202
-        swiper.lazy.load();
6203
-      }
6204
-    },
6205
-  },
6206
-};
6207
-
6208
-/* eslint no-bitwise: ["error", { "allow": [">>"] }] */
6209
-
6210
-const Controller = {
6211
-  LinearSpline: function LinearSpline(x, y) {
6212
-    const binarySearch = (function search() {
6213
-      let maxIndex;
6214
-      let minIndex;
6215
-      let guess;
6216
-      return (array, val) => {
6217
-        minIndex = -1;
6218
-        maxIndex = array.length;
6219
-        while (maxIndex - minIndex > 1) {
6220
-          guess = maxIndex + minIndex >> 1;
6221
-          if (array[guess] <= val) {
6222
-            minIndex = guess;
6223
-          } else {
6224
-            maxIndex = guess;
6225
-          }
6226
-        }
6227
-        return maxIndex;
6228
-      };
6229
-    }());
6230
-    this.x = x;
6231
-    this.y = y;
6232
-    this.lastIndex = x.length - 1;
6233
-    // Given an x value (x2), return the expected y2 value:
6234
-    // (x1,y1) is the known point before given value,
6235
-    // (x3,y3) is the known point after given value.
6236
-    let i1;
6237
-    let i3;
6238
-
6239
-    this.interpolate = function interpolate(x2) {
6240
-      if (!x2) return 0;
6241
-
6242
-      // Get the indexes of x1 and x3 (the array indexes before and after given x2):
6243
-      i3 = binarySearch(this.x, x2);
6244
-      i1 = i3 - 1;
6245
-
6246
-      // We have our indexes i1 & i3, so we can calculate already:
6247
-      // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
6248
-      return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1];
6249
-    };
6250
-    return this;
6251
-  },
6252
-  // xxx: for now i will just save one spline function to to
6253
-  getInterpolateFunction(c) {
6254
-    const swiper = this;
6255
-    if (!swiper.controller.spline) {
6256
-      swiper.controller.spline = swiper.params.loop
6257
-        ? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid)
6258
-        : new Controller.LinearSpline(swiper.snapGrid, c.snapGrid);
6259
-    }
6260
-  },
6261
-  setTranslate(setTranslate, byController) {
6262
-    const swiper = this;
6263
-    const controlled = swiper.controller.control;
6264
-    let multiplier;
6265
-    let controlledTranslate;
6266
-    function setControlledTranslate(c) {
6267
-      // this will create an Interpolate function based on the snapGrids
6268
-      // x is the Grid of the scrolled scroller and y will be the controlled scroller
6269
-      // it makes sense to create this only once and recall it for the interpolation
6270
-      // the function does a lot of value caching for performance
6271
-      const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
6272
-      if (swiper.params.controller.by === 'slide') {
6273
-        swiper.controller.getInterpolateFunction(c);
6274
-        // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
6275
-        // but it did not work out
6276
-        controlledTranslate = -swiper.controller.spline.interpolate(-translate);
6277
-      }
6278
-
6279
-      if (!controlledTranslate || swiper.params.controller.by === 'container') {
6280
-        multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());
6281
-        controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate();
6282
-      }
6283
-
6284
-      if (swiper.params.controller.inverse) {
6285
-        controlledTranslate = c.maxTranslate() - controlledTranslate;
6286
-      }
6287
-      c.updateProgress(controlledTranslate);
6288
-      c.setTranslate(controlledTranslate, swiper);
6289
-      c.updateActiveIndex();
6290
-      c.updateSlidesClasses();
6291
-    }
6292
-    if (Array.isArray(controlled)) {
6293
-      for (let i = 0; i < controlled.length; i += 1) {
6294
-        if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
6295
-          setControlledTranslate(controlled[i]);
6296
-        }
6297
-      }
6298
-    } else if (controlled instanceof Swiper && byController !== controlled) {
6299
-      setControlledTranslate(controlled);
6300
-    }
6301
-  },
6302
-  setTransition(duration, byController) {
6303
-    const swiper = this;
6304
-    const controlled = swiper.controller.control;
6305
-    let i;
6306
-    function setControlledTransition(c) {
6307
-      c.setTransition(duration, swiper);
6308
-      if (duration !== 0) {
6309
-        c.transitionStart();
6310
-        if (c.params.autoHeight) {
6311
-          Utils.nextTick(() => {
6312
-            c.updateAutoHeight();
6313
-          });
6314
-        }
6315
-        c.$wrapperEl.transitionEnd(() => {
6316
-          if (!controlled) return;
6317
-          if (c.params.loop && swiper.params.controller.by === 'slide') {
6318
-            c.loopFix();
6319
-          }
6320
-          c.transitionEnd();
6321
-        });
6322
-      }
6323
-    }
6324
-    if (Array.isArray(controlled)) {
6325
-      for (i = 0; i < controlled.length; i += 1) {
6326
-        if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
6327
-          setControlledTransition(controlled[i]);
6328
-        }
6329
-      }
6330
-    } else if (controlled instanceof Swiper && byController !== controlled) {
6331
-      setControlledTransition(controlled);
6332
-    }
6333
-  },
6334
-};
6335
-var controller = {
6336
-  name: 'controller',
6337
-  params: {
6338
-    controller: {
6339
-      control: undefined,
6340
-      inverse: false,
6341
-      by: 'slide', // or 'container'
6342
-    },
6343
-  },
6344
-  create() {
6345
-    const swiper = this;
6346
-    Utils.extend(swiper, {
6347
-      controller: {
6348
-        control: swiper.params.controller.control,
6349
-        getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper),
6350
-        setTranslate: Controller.setTranslate.bind(swiper),
6351
-        setTransition: Controller.setTransition.bind(swiper),
6352
-      },
6353
-    });
6354
-  },
6355
-  on: {
6356
-    update() {
6357
-      const swiper = this;
6358
-      if (!swiper.controller.control) return;
6359
-      if (swiper.controller.spline) {
6360
-        swiper.controller.spline = undefined;
6361
-        delete swiper.controller.spline;
6362
-      }
6363
-    },
6364
-    resize() {
6365
-      const swiper = this;
6366
-      if (!swiper.controller.control) return;
6367
-      if (swiper.controller.spline) {
6368
-        swiper.controller.spline = undefined;
6369
-        delete swiper.controller.spline;
6370
-      }
6371
-    },
6372
-    observerUpdate() {
6373
-      const swiper = this;
6374
-      if (!swiper.controller.control) return;
6375
-      if (swiper.controller.spline) {
6376
-        swiper.controller.spline = undefined;
6377
-        delete swiper.controller.spline;
6378
-      }
6379
-    },
6380
-    setTranslate(translate, byController) {
6381
-      const swiper = this;
6382
-      if (!swiper.controller.control) return;
6383
-      swiper.controller.setTranslate(translate, byController);
6384
-    },
6385
-    setTransition(duration, byController) {
6386
-      const swiper = this;
6387
-      if (!swiper.controller.control) return;
6388
-      swiper.controller.setTransition(duration, byController);
6389
-    },
6390
-  },
6391
-};
6392
-
6393
-const a11y = {
6394
-  makeElFocusable($el) {
6395
-    $el.attr('tabIndex', '0');
6396
-    return $el;
6397
-  },
6398
-  makeElNotFocusable($el) {
6399
-    $el.attr('tabIndex', '-1');
6400
-    return $el;
6401
-  },
6402
-  addElRole($el, role) {
6403
-    $el.attr('role', role);
6404
-    return $el;
6405
-  },
6406
-  addElLabel($el, label) {
6407
-    $el.attr('aria-label', label);
6408
-    return $el;
6409
-  },
6410
-  disableEl($el) {
6411
-    $el.attr('aria-disabled', true);
6412
-    return $el;
6413
-  },
6414
-  enableEl($el) {
6415
-    $el.attr('aria-disabled', false);
6416
-    return $el;
6417
-  },
6418
-  onEnterKey(e) {
6419
-    const swiper = this;
6420
-    const params = swiper.params.a11y;
6421
-    if (e.keyCode !== 13) return;
6422
-    const $targetEl = $(e.target);
6423
-    if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {
6424
-      if (!(swiper.isEnd && !swiper.params.loop)) {
6425
-        swiper.slideNext();
6426
-      }
6427
-      if (swiper.isEnd) {
6428
-        swiper.a11y.notify(params.lastSlideMessage);
6429
-      } else {
6430
-        swiper.a11y.notify(params.nextSlideMessage);
6431
-      }
6432
-    }
6433
-    if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {
6434
-      if (!(swiper.isBeginning && !swiper.params.loop)) {
6435
-        swiper.slidePrev();
6436
-      }
6437
-      if (swiper.isBeginning) {
6438
-        swiper.a11y.notify(params.firstSlideMessage);
6439
-      } else {
6440
-        swiper.a11y.notify(params.prevSlideMessage);
6441
-      }
6442
-    }
6443
-    if (swiper.pagination && $targetEl.is(`.${swiper.params.pagination.bulletClass}`)) {
6444
-      $targetEl[0].click();
6445
-    }
6446
-  },
6447
-  notify(message) {
6448
-    const swiper = this;
6449
-    const notification = swiper.a11y.liveRegion;
6450
-    if (notification.length === 0) return;
6451
-    notification.html('');
6452
-    notification.html(message);
6453
-  },
6454
-  updateNavigation() {
6455
-    const swiper = this;
6456
-
6457
-    if (swiper.params.loop || !swiper.navigation) return;
6458
-    const { $nextEl, $prevEl } = swiper.navigation;
6459
-
6460
-    if ($prevEl && $prevEl.length > 0) {
6461
-      if (swiper.isBeginning) {
6462
-        swiper.a11y.disableEl($prevEl);
6463
-        swiper.a11y.makeElNotFocusable($prevEl);
6464
-      } else {
6465
-        swiper.a11y.enableEl($prevEl);
6466
-        swiper.a11y.makeElFocusable($prevEl);
6467
-      }
6468
-    }
6469
-    if ($nextEl && $nextEl.length > 0) {
6470
-      if (swiper.isEnd) {
6471
-        swiper.a11y.disableEl($nextEl);
6472
-        swiper.a11y.makeElNotFocusable($nextEl);
6473
-      } else {
6474
-        swiper.a11y.enableEl($nextEl);
6475
-        swiper.a11y.makeElFocusable($nextEl);
6476
-      }
6477
-    }
6478
-  },
6479
-  updatePagination() {
6480
-    const swiper = this;
6481
-    const params = swiper.params.a11y;
6482
-    if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
6483
-      swiper.pagination.bullets.each((bulletIndex, bulletEl) => {
6484
-        const $bulletEl = $(bulletEl);
6485
-        swiper.a11y.makeElFocusable($bulletEl);
6486
-        swiper.a11y.addElRole($bulletEl, 'button');
6487
-        swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1));
6488
-      });
6489
-    }
6490
-  },
6491
-  init() {
6492
-    const swiper = this;
6493
-
6494
-    swiper.$el.append(swiper.a11y.liveRegion);
6495
-
6496
-    // Navigation
6497
-    const params = swiper.params.a11y;
6498
-    let $nextEl;
6499
-    let $prevEl;
6500
-    if (swiper.navigation && swiper.navigation.$nextEl) {
6501
-      $nextEl = swiper.navigation.$nextEl;
6502
-    }
6503
-    if (swiper.navigation && swiper.navigation.$prevEl) {
6504
-      $prevEl = swiper.navigation.$prevEl;
6505
-    }
6506
-    if ($nextEl) {
6507
-      swiper.a11y.makeElFocusable($nextEl);
6508
-      swiper.a11y.addElRole($nextEl, 'button');
6509
-      swiper.a11y.addElLabel($nextEl, params.nextSlideMessage);
6510
-      $nextEl.on('keydown', swiper.a11y.onEnterKey);
6511
-    }
6512
-    if ($prevEl) {
6513
-      swiper.a11y.makeElFocusable($prevEl);
6514
-      swiper.a11y.addElRole($prevEl, 'button');
6515
-      swiper.a11y.addElLabel($prevEl, params.prevSlideMessage);
6516
-      $prevEl.on('keydown', swiper.a11y.onEnterKey);
6517
-    }
6518
-
6519
-    // Pagination
6520
-    if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
6521
-      swiper.pagination.$el.on('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
6522
-    }
6523
-  },
6524
-  destroy() {
6525
-    const swiper = this;
6526
-    if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) swiper.a11y.liveRegion.remove();
6527
-
6528
-    let $nextEl;
6529
-    let $prevEl;
6530
-    if (swiper.navigation && swiper.navigation.$nextEl) {
6531
-      $nextEl = swiper.navigation.$nextEl;
6532
-    }
6533
-    if (swiper.navigation && swiper.navigation.$prevEl) {
6534
-      $prevEl = swiper.navigation.$prevEl;
6535
-    }
6536
-    if ($nextEl) {
6537
-      $nextEl.off('keydown', swiper.a11y.onEnterKey);
6538
-    }
6539
-    if ($prevEl) {
6540
-      $prevEl.off('keydown', swiper.a11y.onEnterKey);
6541
-    }
6542
-
6543
-    // Pagination
6544
-    if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
6545
-      swiper.pagination.$el.off('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
6546
-    }
6547
-  },
6548
-};
6549
-var a11y$1 = {
6550
-  name: 'a11y',
6551
-  params: {
6552
-    a11y: {
6553
-      enabled: true,
6554
-      notificationClass: 'swiper-notification',
6555
-      prevSlideMessage: 'Previous slide',
6556
-      nextSlideMessage: 'Next slide',
6557
-      firstSlideMessage: 'This is the first slide',
6558
-      lastSlideMessage: 'This is the last slide',
6559
-      paginationBulletMessage: 'Go to slide {{index}}',
6560
-    },
6561
-  },
6562
-  create() {
6563
-    const swiper = this;
6564
-    Utils.extend(swiper, {
6565
-      a11y: {
6566
-        liveRegion: $(`<span class="${swiper.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`),
6567
-      },
6568
-    });
6569
-    Object.keys(a11y).forEach((methodName) => {
6570
-      swiper.a11y[methodName] = a11y[methodName].bind(swiper);
6571
-    });
6572
-  },
6573
-  on: {
6574
-    init() {
6575
-      const swiper = this;
6576
-      if (!swiper.params.a11y.enabled) return;
6577
-      swiper.a11y.init();
6578
-      swiper.a11y.updateNavigation();
6579
-    },
6580
-    toEdge() {
6581
-      const swiper = this;
6582
-      if (!swiper.params.a11y.enabled) return;
6583
-      swiper.a11y.updateNavigation();
6584
-    },
6585
-    fromEdge() {
6586
-      const swiper = this;
6587
-      if (!swiper.params.a11y.enabled) return;
6588
-      swiper.a11y.updateNavigation();
6589
-    },
6590
-    paginationUpdate() {
6591
-      const swiper = this;
6592
-      if (!swiper.params.a11y.enabled) return;
6593
-      swiper.a11y.updatePagination();
6594
-    },
6595
-    destroy() {
6596
-      const swiper = this;
6597
-      if (!swiper.params.a11y.enabled) return;
6598
-      swiper.a11y.destroy();
6599
-    },
6600
-  },
6601
-};
6602
-
6603
-const History = {
6604
-  init() {
6605
-    const swiper = this;
6606
-    if (!swiper.params.history) return;
6607
-    if (!window.history || !window.history.pushState) {
6608
-      swiper.params.history.enabled = false;
6609
-      swiper.params.hashNavigation.enabled = true;
6610
-      return;
6611
-    }
6612
-    const history = swiper.history;
6613
-    history.initialized = true;
6614
-    history.paths = History.getPathValues();
6615
-    if (!history.paths.key && !history.paths.value) return;
6616
-    history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit);
6617
-    if (!swiper.params.history.replaceState) {
6618
-      window.addEventListener('popstate', swiper.history.setHistoryPopState);
6619
-    }
6620
-  },
6621
-  destroy() {
6622
-    const swiper = this;
6623
-    if (!swiper.params.history.replaceState) {
6624
-      window.removeEventListener('popstate', swiper.history.setHistoryPopState);
6625
-    }
6626
-  },
6627
-  setHistoryPopState() {
6628
-    const swiper = this;
6629
-    swiper.history.paths = History.getPathValues();
6630
-    swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false);
6631
-  },
6632
-  getPathValues() {
6633
-    const pathArray = window.location.pathname.slice(1).split('/').filter((part) => part !== '');
6634
-    const total = pathArray.length;
6635
-    const key = pathArray[total - 2];
6636
-    const value = pathArray[total - 1];
6637
-    return { key, value };
6638
-  },
6639
-  setHistory(key, index) {
6640
-    const swiper = this;
6641
-    if (!swiper.history.initialized || !swiper.params.history.enabled) return;
6642
-    const slide = swiper.slides.eq(index);
6643
-    let value = History.slugify(slide.attr('data-history'));
6644
-    if (!window.location.pathname.includes(key)) {
6645
-      value = `${key}/${value}`;
6646
-    }
6647
-    const currentState = window.history.state;
6648
-    if (currentState && currentState.value === value) {
6649
-      return;
6650
-    }
6651
-    if (swiper.params.history.replaceState) {
6652
-      window.history.replaceState({ value }, null, value);
6653
-    } else {
6654
-      window.history.pushState({ value }, null, value);
6655
-    }
6656
-  },
6657
-  slugify(text) {
6658
-    return text.toString()
6659
-      .replace(/\s+/g, '-')
6660
-      .replace(/[^\w-]+/g, '')
6661
-      .replace(/--+/g, '-')
6662
-      .replace(/^-+/, '')
6663
-      .replace(/-+$/, '');
6664
-  },
6665
-  scrollToSlide(speed, value, runCallbacks) {
6666
-    const swiper = this;
6667
-    if (value) {
6668
-      for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
6669
-        const slide = swiper.slides.eq(i);
6670
-        const slideHistory = History.slugify(slide.attr('data-history'));
6671
-        if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {
6672
-          const index = slide.index();
6673
-          swiper.slideTo(index, speed, runCallbacks);
6674
-        }
6675
-      }
6676
-    } else {
6677
-      swiper.slideTo(0, speed, runCallbacks);
6678
-    }
6679
-  },
6680
-};
6681
-
6682
-var history = {
6683
-  name: 'history',
6684
-  params: {
6685
-    history: {
6686
-      enabled: false,
6687
-      replaceState: false,
6688
-      key: 'slides',
6689
-    },
6690
-  },
6691
-  create() {
6692
-    const swiper = this;
6693
-    Utils.extend(swiper, {
6694
-      history: {
6695
-        init: History.init.bind(swiper),
6696
-        setHistory: History.setHistory.bind(swiper),
6697
-        setHistoryPopState: History.setHistoryPopState.bind(swiper),
6698
-        scrollToSlide: History.scrollToSlide.bind(swiper),
6699
-        destroy: History.destroy.bind(swiper),
6700
-      },
6701
-    });
6702
-  },
6703
-  on: {
6704
-    init() {
6705
-      const swiper = this;
6706
-      if (swiper.params.history.enabled) {
6707
-        swiper.history.init();
6708
-      }
6709
-    },
6710
-    destroy() {
6711
-      const swiper = this;
6712
-      if (swiper.params.history.enabled) {
6713
-        swiper.history.destroy();
6714
-      }
6715
-    },
6716
-    transitionEnd() {
6717
-      const swiper = this;
6718
-      if (swiper.history.initialized) {
6719
-        swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);
6720
-      }
6721
-    },
6722
-    slideChange() {
6723
-      const swiper = this;
6724
-      if (swiper.history.initialized && swiper.params.cssMode) {
6725
-        swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);
6726
-      }
6727
-    },
6728
-  },
6729
-};
6730
-
6731
-const HashNavigation = {
6732
-  onHashCange() {
6733
-    const swiper = this;
6734
-    swiper.emit('hashChange');
6735
-    const newHash = document$1.location.hash.replace('#', '');
6736
-    const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');
6737
-    if (newHash !== activeSlideHash) {
6738
-      const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash="${newHash}"]`).index();
6739
-      if (typeof newIndex === 'undefined') return;
6740
-      swiper.slideTo(newIndex);
6741
-    }
6742
-  },
6743
-  setHash() {
6744
-    const swiper = this;
6745
-    if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) return;
6746
-    if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {
6747
-      window.history.replaceState(null, null, (`#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || ''));
6748
-      swiper.emit('hashSet');
6749
-    } else {
6750
-      const slide = swiper.slides.eq(swiper.activeIndex);
6751
-      const hash = slide.attr('data-hash') || slide.attr('data-history');
6752
-      document$1.location.hash = hash || '';
6753
-      swiper.emit('hashSet');
6754
-    }
6755
-  },
6756
-  init() {
6757
-    const swiper = this;
6758
-    if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) return;
6759
-    swiper.hashNavigation.initialized = true;
6760
-    const hash = document$1.location.hash.replace('#', '');
6761
-    if (hash) {
6762
-      const speed = 0;
6763
-      for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
6764
-        const slide = swiper.slides.eq(i);
6765
-        const slideHash = slide.attr('data-hash') || slide.attr('data-history');
6766
-        if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {
6767
-          const index = slide.index();
6768
-          swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true);
6769
-        }
6770
-      }
6771
-    }
6772
-    if (swiper.params.hashNavigation.watchState) {
6773
-      $(window).on('hashchange', swiper.hashNavigation.onHashCange);
6774
-    }
6775
-  },
6776
-  destroy() {
6777
-    const swiper = this;
6778
-    if (swiper.params.hashNavigation.watchState) {
6779
-      $(window).off('hashchange', swiper.hashNavigation.onHashCange);
6780
-    }
6781
-  },
6782
-};
6783
-var hashNavigation = {
6784
-  name: 'hash-navigation',
6785
-  params: {
6786
-    hashNavigation: {
6787
-      enabled: false,
6788
-      replaceState: false,
6789
-      watchState: false,
6790
-    },
6791
-  },
6792
-  create() {
6793
-    const swiper = this;
6794
-    Utils.extend(swiper, {
6795
-      hashNavigation: {
6796
-        initialized: false,
6797
-        init: HashNavigation.init.bind(swiper),
6798
-        destroy: HashNavigation.destroy.bind(swiper),
6799
-        setHash: HashNavigation.setHash.bind(swiper),
6800
-        onHashCange: HashNavigation.onHashCange.bind(swiper),
6801
-      },
6802
-    });
6803
-  },
6804
-  on: {
6805
-    init() {
6806
-      const swiper = this;
6807
-      if (swiper.params.hashNavigation.enabled) {
6808
-        swiper.hashNavigation.init();
6809
-      }
6810
-    },
6811
-    destroy() {
6812
-      const swiper = this;
6813
-      if (swiper.params.hashNavigation.enabled) {
6814
-        swiper.hashNavigation.destroy();
6815
-      }
6816
-    },
6817
-    transitionEnd() {
6818
-      const swiper = this;
6819
-      if (swiper.hashNavigation.initialized) {
6820
-        swiper.hashNavigation.setHash();
6821
-      }
6822
-    },
6823
-    slideChange() {
6824
-      const swiper = this;
6825
-      if (swiper.hashNavigation.initialized && swiper.params.cssMode) {
6826
-        swiper.hashNavigation.setHash();
6827
-      }
6828
-    },
6829
-  },
6830
-};
6831
-
6832
-/* eslint no-underscore-dangle: "off" */
6833
-
6834
-const Autoplay = {
6835
-  run() {
6836
-    const swiper = this;
6837
-    const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);
6838
-    let delay = swiper.params.autoplay.delay;
6839
-    if ($activeSlideEl.attr('data-swiper-autoplay')) {
6840
-      delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;
6841
-    }
6842
-    clearTimeout(swiper.autoplay.timeout);
6843
-    swiper.autoplay.timeout = Utils.nextTick(() => {
6844
-      if (swiper.params.autoplay.reverseDirection) {
6845
-        if (swiper.params.loop) {
6846
-          swiper.loopFix();
6847
-          swiper.slidePrev(swiper.params.speed, true, true);
6848
-          swiper.emit('autoplay');
6849
-        } else if (!swiper.isBeginning) {
6850
-          swiper.slidePrev(swiper.params.speed, true, true);
6851
-          swiper.emit('autoplay');
6852
-        } else if (!swiper.params.autoplay.stopOnLastSlide) {
6853
-          swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);
6854
-          swiper.emit('autoplay');
6855
-        } else {
6856
-          swiper.autoplay.stop();
6857
-        }
6858
-      } else if (swiper.params.loop) {
6859
-        swiper.loopFix();
6860
-        swiper.slideNext(swiper.params.speed, true, true);
6861
-        swiper.emit('autoplay');
6862
-      } else if (!swiper.isEnd) {
6863
-        swiper.slideNext(swiper.params.speed, true, true);
6864
-        swiper.emit('autoplay');
6865
-      } else if (!swiper.params.autoplay.stopOnLastSlide) {
6866
-        swiper.slideTo(0, swiper.params.speed, true, true);
6867
-        swiper.emit('autoplay');
6868
-      } else {
6869
-        swiper.autoplay.stop();
6870
-      }
6871
-      if (swiper.params.cssMode && swiper.autoplay.running) swiper.autoplay.run();
6872
-    }, delay);
6873
-  },
6874
-  start() {
6875
-    const swiper = this;
6876
-    if (typeof swiper.autoplay.timeout !== 'undefined') return false;
6877
-    if (swiper.autoplay.running) return false;
6878
-    swiper.autoplay.running = true;
6879
-    swiper.emit('autoplayStart');
6880
-    swiper.autoplay.run();
6881
-    return true;
6882
-  },
6883
-  stop() {
6884
-    const swiper = this;
6885
-    if (!swiper.autoplay.running) return false;
6886
-    if (typeof swiper.autoplay.timeout === 'undefined') return false;
6887
-
6888
-    if (swiper.autoplay.timeout) {
6889
-      clearTimeout(swiper.autoplay.timeout);
6890
-      swiper.autoplay.timeout = undefined;
6891
-    }
6892
-    swiper.autoplay.running = false;
6893
-    swiper.emit('autoplayStop');
6894
-    return true;
6895
-  },
6896
-  pause(speed) {
6897
-    const swiper = this;
6898
-    if (!swiper.autoplay.running) return;
6899
-    if (swiper.autoplay.paused) return;
6900
-    if (swiper.autoplay.timeout) clearTimeout(swiper.autoplay.timeout);
6901
-    swiper.autoplay.paused = true;
6902
-    if (speed === 0 || !swiper.params.autoplay.waitForTransition) {
6903
-      swiper.autoplay.paused = false;
6904
-      swiper.autoplay.run();
6905
-    } else {
6906
-      swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd);
6907
-      swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
6908
-    }
6909
-  },
6910
-};
6911
-
6912
-var autoplay = {
6913
-  name: 'autoplay',
6914
-  params: {
6915
-    autoplay: {
6916
-      enabled: false,
6917
-      delay: 3000,
6918
-      waitForTransition: true,
6919
-      disableOnInteraction: true,
6920
-      stopOnLastSlide: false,
6921
-      reverseDirection: false,
6922
-    },
6923
-  },
6924
-  create() {
6925
-    const swiper = this;
6926
-    Utils.extend(swiper, {
6927
-      autoplay: {
6928
-        running: false,
6929
-        paused: false,
6930
-        run: Autoplay.run.bind(swiper),
6931
-        start: Autoplay.start.bind(swiper),
6932
-        stop: Autoplay.stop.bind(swiper),
6933
-        pause: Autoplay.pause.bind(swiper),
6934
-        onVisibilityChange() {
6935
-          if (document.visibilityState === 'hidden' && swiper.autoplay.running) {
6936
-            swiper.autoplay.pause();
6937
-          }
6938
-          if (document.visibilityState === 'visible' && swiper.autoplay.paused) {
6939
-            swiper.autoplay.run();
6940
-            swiper.autoplay.paused = false;
6941
-          }
6942
-        },
6943
-        onTransitionEnd(e) {
6944
-          if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;
6945
-          if (e.target !== this) return;
6946
-          swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd);
6947
-          swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
6948
-          swiper.autoplay.paused = false;
6949
-          if (!swiper.autoplay.running) {
6950
-            swiper.autoplay.stop();
6951
-          } else {
6952
-            swiper.autoplay.run();
6953
-          }
6954
-        },
6955
-      },
6956
-    });
6957
-  },
6958
-  on: {
6959
-    init() {
6960
-      const swiper = this;
6961
-      if (swiper.params.autoplay.enabled) {
6962
-        swiper.autoplay.start();
6963
-        document.addEventListener('visibilitychange', swiper.autoplay.onVisibilityChange);
6964
-      }
6965
-    },
6966
-    beforeTransitionStart(speed, internal) {
6967
-      const swiper = this;
6968
-      if (swiper.autoplay.running) {
6969
-        if (internal || !swiper.params.autoplay.disableOnInteraction) {
6970
-          swiper.autoplay.pause(speed);
6971
-        } else {
6972
-          swiper.autoplay.stop();
6973
-        }
6974
-      }
6975
-    },
6976
-    sliderFirstMove() {
6977
-      const swiper = this;
6978
-      if (swiper.autoplay.running) {
6979
-        if (swiper.params.autoplay.disableOnInteraction) {
6980
-          swiper.autoplay.stop();
6981
-        } else {
6982
-          swiper.autoplay.pause();
6983
-        }
6984
-      }
6985
-    },
6986
-    touchEnd() {
6987
-      const swiper = this;
6988
-      if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) {
6989
-        swiper.autoplay.run();
6990
-      }
6991
-    },
6992
-    destroy() {
6993
-      const swiper = this;
6994
-      if (swiper.autoplay.running) {
6995
-        swiper.autoplay.stop();
6996
-      }
6997
-      document.removeEventListener('visibilitychange', swiper.autoplay.onVisibilityChange);
6998
-    },
6999
-  },
7000
-};
7001
-
7002
-const Fade = {
7003
-  setTranslate() {
7004
-    const swiper = this;
7005
-    const { slides } = swiper;
7006
-    for (let i = 0; i < slides.length; i += 1) {
7007
-      const $slideEl = swiper.slides.eq(i);
7008
-      const offset = $slideEl[0].swiperSlideOffset;
7009
-      let tx = -offset;
7010
-      if (!swiper.params.virtualTranslate) tx -= swiper.translate;
7011
-      let ty = 0;
7012
-      if (!swiper.isHorizontal()) {
7013
-        ty = tx;
7014
-        tx = 0;
7015
-      }
7016
-      const slideOpacity = swiper.params.fadeEffect.crossFade
7017
-        ? Math.max(1 - Math.abs($slideEl[0].progress), 0)
7018
-        : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);
7019
-      $slideEl
7020
-        .css({
7021
-          opacity: slideOpacity,
7022
-        })
7023
-        .transform(`translate3d(${tx}px, ${ty}px, 0px)`);
7024
-    }
7025
-  },
7026
-  setTransition(duration) {
7027
-    const swiper = this;
7028
-    const { slides, $wrapperEl } = swiper;
7029
-    slides.transition(duration);
7030
-    if (swiper.params.virtualTranslate && duration !== 0) {
7031
-      let eventTriggered = false;
7032
-      slides.transitionEnd(() => {
7033
-        if (eventTriggered) return;
7034
-        if (!swiper || swiper.destroyed) return;
7035
-        eventTriggered = true;
7036
-        swiper.animating = false;
7037
-        const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
7038
-        for (let i = 0; i < triggerEvents.length; i += 1) {
7039
-          $wrapperEl.trigger(triggerEvents[i]);
7040
-        }
7041
-      });
7042
-    }
7043
-  },
7044
-};
7045
-
7046
-var effectFade = {
7047
-  name: 'effect-fade',
7048
-  params: {
7049
-    fadeEffect: {
7050
-      crossFade: false,
7051
-    },
7052
-  },
7053
-  create() {
7054
-    const swiper = this;
7055
-    Utils.extend(swiper, {
7056
-      fadeEffect: {
7057
-        setTranslate: Fade.setTranslate.bind(swiper),
7058
-        setTransition: Fade.setTransition.bind(swiper),
7059
-      },
7060
-    });
7061
-  },
7062
-  on: {
7063
-    beforeInit() {
7064
-      const swiper = this;
7065
-      if (swiper.params.effect !== 'fade') return;
7066
-      swiper.classNames.push(`${swiper.params.containerModifierClass}fade`);
7067
-      const overwriteParams = {
7068
-        slidesPerView: 1,
7069
-        slidesPerColumn: 1,
7070
-        slidesPerGroup: 1,
7071
-        watchSlidesProgress: true,
7072
-        spaceBetween: 0,
7073
-        virtualTranslate: true,
7074
-      };
7075
-      Utils.extend(swiper.params, overwriteParams);
7076
-      Utils.extend(swiper.originalParams, overwriteParams);
7077
-    },
7078
-    setTranslate() {
7079
-      const swiper = this;
7080
-      if (swiper.params.effect !== 'fade') return;
7081
-      swiper.fadeEffect.setTranslate();
7082
-    },
7083
-    setTransition(duration) {
7084
-      const swiper = this;
7085
-      if (swiper.params.effect !== 'fade') return;
7086
-      swiper.fadeEffect.setTransition(duration);
7087
-    },
7088
-  },
7089
-};
7090
-
7091
-const Cube = {
7092
-  setTranslate() {
7093
-    const swiper = this;
7094
-    const {
7095
-      $el, $wrapperEl, slides, width: swiperWidth, height: swiperHeight, rtlTranslate: rtl, size: swiperSize,
7096
-    } = swiper;
7097
-    const params = swiper.params.cubeEffect;
7098
-    const isHorizontal = swiper.isHorizontal();
7099
-    const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
7100
-    let wrapperRotate = 0;
7101
-    let $cubeShadowEl;
7102
-    if (params.shadow) {
7103
-      if (isHorizontal) {
7104
-        $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');
7105
-        if ($cubeShadowEl.length === 0) {
7106
-          $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
7107
-          $wrapperEl.append($cubeShadowEl);
7108
-        }
7109
-        $cubeShadowEl.css({ height: `${swiperWidth}px` });
7110
-      } else {
7111
-        $cubeShadowEl = $el.find('.swiper-cube-shadow');
7112
-        if ($cubeShadowEl.length === 0) {
7113
-          $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
7114
-          $el.append($cubeShadowEl);
7115
-        }
7116
-      }
7117
-    }
7118
-    for (let i = 0; i < slides.length; i += 1) {
7119
-      const $slideEl = slides.eq(i);
7120
-      let slideIndex = i;
7121
-      if (isVirtual) {
7122
-        slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);
7123
-      }
7124
-      let slideAngle = slideIndex * 90;
7125
-      let round = Math.floor(slideAngle / 360);
7126
-      if (rtl) {
7127
-        slideAngle = -slideAngle;
7128
-        round = Math.floor(-slideAngle / 360);
7129
-      }
7130
-      const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
7131
-      let tx = 0;
7132
-      let ty = 0;
7133
-      let tz = 0;
7134
-      if (slideIndex % 4 === 0) {
7135
-        tx = -round * 4 * swiperSize;
7136
-        tz = 0;
7137
-      } else if ((slideIndex - 1) % 4 === 0) {
7138
-        tx = 0;
7139
-        tz = -round * 4 * swiperSize;
7140
-      } else if ((slideIndex - 2) % 4 === 0) {
7141
-        tx = swiperSize + (round * 4 * swiperSize);
7142
-        tz = swiperSize;
7143
-      } else if ((slideIndex - 3) % 4 === 0) {
7144
-        tx = -swiperSize;
7145
-        tz = (3 * swiperSize) + (swiperSize * 4 * round);
7146
-      }
7147
-      if (rtl) {
7148
-        tx = -tx;
7149
-      }
7150
-
7151
-      if (!isHorizontal) {
7152
-        ty = tx;
7153
-        tx = 0;
7154
-      }
7155
-
7156
-      const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;
7157
-      if (progress <= 1 && progress > -1) {
7158
-        wrapperRotate = (slideIndex * 90) + (progress * 90);
7159
-        if (rtl) wrapperRotate = (-slideIndex * 90) - (progress * 90);
7160
-      }
7161
-      $slideEl.transform(transform);
7162
-      if (params.slideShadows) {
7163
-        // Set shadows
7164
-        let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
7165
-        let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
7166
-        if (shadowBefore.length === 0) {
7167
-          shadowBefore = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
7168
-          $slideEl.append(shadowBefore);
7169
-        }
7170
-        if (shadowAfter.length === 0) {
7171
-          shadowAfter = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
7172
-          $slideEl.append(shadowAfter);
7173
-        }
7174
-        if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
7175
-        if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
7176
-      }
7177
-    }
7178
-    $wrapperEl.css({
7179
-      '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,
7180
-      '-moz-transform-origin': `50% 50% -${swiperSize / 2}px`,
7181
-      '-ms-transform-origin': `50% 50% -${swiperSize / 2}px`,
7182
-      'transform-origin': `50% 50% -${swiperSize / 2}px`,
7183
-    });
7184
-
7185
-    if (params.shadow) {
7186
-      if (isHorizontal) {
7187
-        $cubeShadowEl.transform(`translate3d(0px, ${(swiperWidth / 2) + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`);
7188
-      } else {
7189
-        const shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90);
7190
-        const multiplier = 1.5 - (
7191
-          (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2)
7192
-          + (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2)
7193
-        );
7194
-        const scale1 = params.shadowScale;
7195
-        const scale2 = params.shadowScale / multiplier;
7196
-        const offset = params.shadowOffset;
7197
-        $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${(swiperHeight / 2) + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`);
7198
-      }
7199
-    }
7200
-    const zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0;
7201
-    $wrapperEl
7202
-      .transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`);
7203
-  },
7204
-  setTransition(duration) {
7205
-    const swiper = this;
7206
-    const { $el, slides } = swiper;
7207
-    slides
7208
-      .transition(duration)
7209
-      .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
7210
-      .transition(duration);
7211
-    if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {
7212
-      $el.find('.swiper-cube-shadow').transition(duration);
7213
-    }
7214
-  },
7215
-};
7216
-
7217
-var effectCube = {
7218
-  name: 'effect-cube',
7219
-  params: {
7220
-    cubeEffect: {
7221
-      slideShadows: true,
7222
-      shadow: true,
7223
-      shadowOffset: 20,
7224
-      shadowScale: 0.94,
7225
-    },
7226
-  },
7227
-  create() {
7228
-    const swiper = this;
7229
-    Utils.extend(swiper, {
7230
-      cubeEffect: {
7231
-        setTranslate: Cube.setTranslate.bind(swiper),
7232
-        setTransition: Cube.setTransition.bind(swiper),
7233
-      },
7234
-    });
7235
-  },
7236
-  on: {
7237
-    beforeInit() {
7238
-      const swiper = this;
7239
-      if (swiper.params.effect !== 'cube') return;
7240
-      swiper.classNames.push(`${swiper.params.containerModifierClass}cube`);
7241
-      swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
7242
-      const overwriteParams = {
7243
-        slidesPerView: 1,
7244
-        slidesPerColumn: 1,
7245
-        slidesPerGroup: 1,
7246
-        watchSlidesProgress: true,
7247
-        resistanceRatio: 0,
7248
-        spaceBetween: 0,
7249
-        centeredSlides: false,
7250
-        virtualTranslate: true,
7251
-      };
7252
-      Utils.extend(swiper.params, overwriteParams);
7253
-      Utils.extend(swiper.originalParams, overwriteParams);
7254
-    },
7255
-    setTranslate() {
7256
-      const swiper = this;
7257
-      if (swiper.params.effect !== 'cube') return;
7258
-      swiper.cubeEffect.setTranslate();
7259
-    },
7260
-    setTransition(duration) {
7261
-      const swiper = this;
7262
-      if (swiper.params.effect !== 'cube') return;
7263
-      swiper.cubeEffect.setTransition(duration);
7264
-    },
7265
-  },
7266
-};
7267
-
7268
-const Flip = {
7269
-  setTranslate() {
7270
-    const swiper = this;
7271
-    const { slides, rtlTranslate: rtl } = swiper;
7272
-    for (let i = 0; i < slides.length; i += 1) {
7273
-      const $slideEl = slides.eq(i);
7274
-      let progress = $slideEl[0].progress;
7275
-      if (swiper.params.flipEffect.limitRotation) {
7276
-        progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
7277
-      }
7278
-      const offset = $slideEl[0].swiperSlideOffset;
7279
-      const rotate = -180 * progress;
7280
-      let rotateY = rotate;
7281
-      let rotateX = 0;
7282
-      let tx = -offset;
7283
-      let ty = 0;
7284
-      if (!swiper.isHorizontal()) {
7285
-        ty = tx;
7286
-        tx = 0;
7287
-        rotateX = -rotateY;
7288
-        rotateY = 0;
7289
-      } else if (rtl) {
7290
-        rotateY = -rotateY;
7291
-      }
7292
-
7293
-      $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;
7294
-
7295
-      if (swiper.params.flipEffect.slideShadows) {
7296
-        // Set shadows
7297
-        let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
7298
-        let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
7299
-        if (shadowBefore.length === 0) {
7300
-          shadowBefore = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'left' : 'top'}"></div>`);
7301
-          $slideEl.append(shadowBefore);
7302
-        }
7303
-        if (shadowAfter.length === 0) {
7304
-          shadowAfter = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'right' : 'bottom'}"></div>`);
7305
-          $slideEl.append(shadowAfter);
7306
-        }
7307
-        if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
7308
-        if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
7309
-      }
7310
-      $slideEl
7311
-        .transform(`translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`);
7312
-    }
7313
-  },
7314
-  setTransition(duration) {
7315
-    const swiper = this;
7316
-    const { slides, activeIndex, $wrapperEl } = swiper;
7317
-    slides
7318
-      .transition(duration)
7319
-      .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
7320
-      .transition(duration);
7321
-    if (swiper.params.virtualTranslate && duration !== 0) {
7322
-      let eventTriggered = false;
7323
-      // eslint-disable-next-line
7324
-      slides.eq(activeIndex).transitionEnd(function onTransitionEnd() {
7325
-        if (eventTriggered) return;
7326
-        if (!swiper || swiper.destroyed) return;
7327
-        // if (!$(this).hasClass(swiper.params.slideActiveClass)) return;
7328
-        eventTriggered = true;
7329
-        swiper.animating = false;
7330
-        const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
7331
-        for (let i = 0; i < triggerEvents.length; i += 1) {
7332
-          $wrapperEl.trigger(triggerEvents[i]);
7333
-        }
7334
-      });
7335
-    }
7336
-  },
7337
-};
7338
-
7339
-var effectFlip = {
7340
-  name: 'effect-flip',
7341
-  params: {
7342
-    flipEffect: {
7343
-      slideShadows: true,
7344
-      limitRotation: true,
7345
-    },
7346
-  },
7347
-  create() {
7348
-    const swiper = this;
7349
-    Utils.extend(swiper, {
7350
-      flipEffect: {
7351
-        setTranslate: Flip.setTranslate.bind(swiper),
7352
-        setTransition: Flip.setTransition.bind(swiper),
7353
-      },
7354
-    });
7355
-  },
7356
-  on: {
7357
-    beforeInit() {
7358
-      const swiper = this;
7359
-      if (swiper.params.effect !== 'flip') return;
7360
-      swiper.classNames.push(`${swiper.params.containerModifierClass}flip`);
7361
-      swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
7362
-      const overwriteParams = {
7363
-        slidesPerView: 1,
7364
-        slidesPerColumn: 1,
7365
-        slidesPerGroup: 1,
7366
-        watchSlidesProgress: true,
7367
-        spaceBetween: 0,
7368
-        virtualTranslate: true,
7369
-      };
7370
-      Utils.extend(swiper.params, overwriteParams);
7371
-      Utils.extend(swiper.originalParams, overwriteParams);
7372
-    },
7373
-    setTranslate() {
7374
-      const swiper = this;
7375
-      if (swiper.params.effect !== 'flip') return;
7376
-      swiper.flipEffect.setTranslate();
7377
-    },
7378
-    setTransition(duration) {
7379
-      const swiper = this;
7380
-      if (swiper.params.effect !== 'flip') return;
7381
-      swiper.flipEffect.setTransition(duration);
7382
-    },
7383
-  },
7384
-};
7385
-
7386
-const Coverflow = {
7387
-  setTranslate() {
7388
-    const swiper = this;
7389
-    const {
7390
-      width: swiperWidth, height: swiperHeight, slides, $wrapperEl, slidesSizesGrid,
7391
-    } = swiper;
7392
-    const params = swiper.params.coverflowEffect;
7393
-    const isHorizontal = swiper.isHorizontal();
7394
-    const transform = swiper.translate;
7395
-    const center = isHorizontal ? -transform + (swiperWidth / 2) : -transform + (swiperHeight / 2);
7396
-    const rotate = isHorizontal ? params.rotate : -params.rotate;
7397
-    const translate = params.depth;
7398
-    // Each slide offset from center
7399
-    for (let i = 0, length = slides.length; i < length; i += 1) {
7400
-      const $slideEl = slides.eq(i);
7401
-      const slideSize = slidesSizesGrid[i];
7402
-      const slideOffset = $slideEl[0].swiperSlideOffset;
7403
-      const offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier;
7404
-
7405
-      let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
7406
-      let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
7407
-      // var rotateZ = 0
7408
-      let translateZ = -translate * Math.abs(offsetMultiplier);
7409
-
7410
-      let stretch = params.stretch;
7411
-      // Allow percentage to make a relative stretch for responsive sliders
7412
-      if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) {
7413
-        stretch = ((parseFloat(params.stretch) / 100) * slideSize);
7414
-      }
7415
-      let translateY = isHorizontal ? 0 : stretch * (offsetMultiplier);
7416
-      let translateX = isHorizontal ? stretch * (offsetMultiplier) : 0;
7417
-
7418
-      // Fix for ultra small values
7419
-      if (Math.abs(translateX) < 0.001) translateX = 0;
7420
-      if (Math.abs(translateY) < 0.001) translateY = 0;
7421
-      if (Math.abs(translateZ) < 0.001) translateZ = 0;
7422
-      if (Math.abs(rotateY) < 0.001) rotateY = 0;
7423
-      if (Math.abs(rotateX) < 0.001) rotateX = 0;
7424
-
7425
-      const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px)  rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
7426
-
7427
-      $slideEl.transform(slideTransform);
7428
-      $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
7429
-      if (params.slideShadows) {
7430
-        // Set shadows
7431
-        let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
7432
-        let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
7433
-        if ($shadowBeforeEl.length === 0) {
7434
-          $shadowBeforeEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
7435
-          $slideEl.append($shadowBeforeEl);
7436
-        }
7437
-        if ($shadowAfterEl.length === 0) {
7438
-          $shadowAfterEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
7439
-          $slideEl.append($shadowAfterEl);
7440
-        }
7441
-        if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
7442
-        if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;
7443
-      }
7444
-    }
7445
-
7446
-    // Set correct perspective for IE10
7447
-    if (Support.pointerEvents || Support.prefixedPointerEvents) {
7448
-      const ws = $wrapperEl[0].style;
7449
-      ws.perspectiveOrigin = `${center}px 50%`;
7450
-    }
7451
-  },
7452
-  setTransition(duration) {
7453
-    const swiper = this;
7454
-    swiper.slides
7455
-      .transition(duration)
7456
-      .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
7457
-      .transition(duration);
7458
-  },
7459
-};
7460
-
7461
-var effectCoverflow = {
7462
-  name: 'effect-coverflow',
7463
-  params: {
7464
-    coverflowEffect: {
7465
-      rotate: 50,
7466
-      stretch: 0,
7467
-      depth: 100,
7468
-      modifier: 1,
7469
-      slideShadows: true,
7470
-    },
7471
-  },
7472
-  create() {
7473
-    const swiper = this;
7474
-    Utils.extend(swiper, {
7475
-      coverflowEffect: {
7476
-        setTranslate: Coverflow.setTranslate.bind(swiper),
7477
-        setTransition: Coverflow.setTransition.bind(swiper),
7478
-      },
7479
-    });
7480
-  },
7481
-  on: {
7482
-    beforeInit() {
7483
-      const swiper = this;
7484
-      if (swiper.params.effect !== 'coverflow') return;
7485
-
7486
-      swiper.classNames.push(`${swiper.params.containerModifierClass}coverflow`);
7487
-      swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
7488
-
7489
-      swiper.params.watchSlidesProgress = true;
7490
-      swiper.originalParams.watchSlidesProgress = true;
7491
-    },
7492
-    setTranslate() {
7493
-      const swiper = this;
7494
-      if (swiper.params.effect !== 'coverflow') return;
7495
-      swiper.coverflowEffect.setTranslate();
7496
-    },
7497
-    setTransition(duration) {
7498
-      const swiper = this;
7499
-      if (swiper.params.effect !== 'coverflow') return;
7500
-      swiper.coverflowEffect.setTransition(duration);
7501
-    },
7502
-  },
7503
-};
7504
-
7505
-const Thumbs = {
7506
-  init() {
7507
-    const swiper = this;
7508
-    const { thumbs: thumbsParams } = swiper.params;
7509
-    const SwiperClass = swiper.constructor;
7510
-    if (thumbsParams.swiper instanceof SwiperClass) {
7511
-      swiper.thumbs.swiper = thumbsParams.swiper;
7512
-      Utils.extend(swiper.thumbs.swiper.originalParams, {
7513
-        watchSlidesProgress: true,
7514
-        slideToClickedSlide: false,
7515
-      });
7516
-      Utils.extend(swiper.thumbs.swiper.params, {
7517
-        watchSlidesProgress: true,
7518
-        slideToClickedSlide: false,
7519
-      });
7520
-    } else if (Utils.isObject(thumbsParams.swiper)) {
7521
-      swiper.thumbs.swiper = new SwiperClass(Utils.extend({}, thumbsParams.swiper, {
7522
-        watchSlidesVisibility: true,
7523
-        watchSlidesProgress: true,
7524
-        slideToClickedSlide: false,
7525
-      }));
7526
-      swiper.thumbs.swiperCreated = true;
7527
-    }
7528
-    swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);
7529
-    swiper.thumbs.swiper.on('tap', swiper.thumbs.onThumbClick);
7530
-  },
7531
-  onThumbClick() {
7532
-    const swiper = this;
7533
-    const thumbsSwiper = swiper.thumbs.swiper;
7534
-    if (!thumbsSwiper) return;
7535
-    const clickedIndex = thumbsSwiper.clickedIndex;
7536
-    const clickedSlide = thumbsSwiper.clickedSlide;
7537
-    if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return;
7538
-    if (typeof clickedIndex === 'undefined' || clickedIndex === null) return;
7539
-    let slideToIndex;
7540
-    if (thumbsSwiper.params.loop) {
7541
-      slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10);
7542
-    } else {
7543
-      slideToIndex = clickedIndex;
7544
-    }
7545
-    if (swiper.params.loop) {
7546
-      let currentIndex = swiper.activeIndex;
7547
-      if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) {
7548
-        swiper.loopFix();
7549
-        // eslint-disable-next-line
7550
-        swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
7551
-        currentIndex = swiper.activeIndex;
7552
-      }
7553
-      const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index();
7554
-      const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index();
7555
-      if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;
7556
-      else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;
7557
-      else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;
7558
-      else slideToIndex = prevIndex;
7559
-    }
7560
-    swiper.slideTo(slideToIndex);
7561
-  },
7562
-  update(initial) {
7563
-    const swiper = this;
7564
-    const thumbsSwiper = swiper.thumbs.swiper;
7565
-    if (!thumbsSwiper) return;
7566
-
7567
-    const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto'
7568
-      ? thumbsSwiper.slidesPerViewDynamic()
7569
-      : thumbsSwiper.params.slidesPerView;
7570
-
7571
-    const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;
7572
-    const useOffset = autoScrollOffset && !thumbsSwiper.params.loop;
7573
-    if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {
7574
-      let currentThumbsIndex = thumbsSwiper.activeIndex;
7575
-      let newThumbsIndex;
7576
-      let direction;
7577
-      if (thumbsSwiper.params.loop) {
7578
-        if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) {
7579
-          thumbsSwiper.loopFix();
7580
-          // eslint-disable-next-line
7581
-          thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft;
7582
-          currentThumbsIndex = thumbsSwiper.activeIndex;
7583
-        }
7584
-        // Find actual thumbs index to slide to
7585
-        const prevThumbsIndex = thumbsSwiper.slides
7586
-          .eq(currentThumbsIndex)
7587
-          .prevAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0)
7588
-          .index();
7589
-        const nextThumbsIndex = thumbsSwiper.slides
7590
-          .eq(currentThumbsIndex)
7591
-          .nextAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0)
7592
-          .index();
7593
-        if (typeof prevThumbsIndex === 'undefined') newThumbsIndex = nextThumbsIndex;
7594
-        else if (typeof nextThumbsIndex === 'undefined') newThumbsIndex = prevThumbsIndex;
7595
-        else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) newThumbsIndex = currentThumbsIndex;
7596
-        else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) newThumbsIndex = nextThumbsIndex;
7597
-        else newThumbsIndex = prevThumbsIndex;
7598
-        direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';
7599
-      } else {
7600
-        newThumbsIndex = swiper.realIndex;
7601
-        direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev';
7602
-      }
7603
-      if (useOffset) {
7604
-        newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset;
7605
-      }
7606
-
7607
-      if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {
7608
-        if (thumbsSwiper.params.centeredSlides) {
7609
-          if (newThumbsIndex > currentThumbsIndex) {
7610
-            newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;
7611
-          } else {
7612
-            newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;
7613
-          }
7614
-        } else if (newThumbsIndex > currentThumbsIndex) {
7615
-          newThumbsIndex = newThumbsIndex - slidesPerView + 1;
7616
-        }
7617
-        thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);
7618
-      }
7619
-    }
7620
-
7621
-    // Activate thumbs
7622
-    let thumbsToActivate = 1;
7623
-    const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;
7624
-
7625
-    if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {
7626
-      thumbsToActivate = swiper.params.slidesPerView;
7627
-    }
7628
-
7629
-    if (!swiper.params.thumbs.multipleActiveThumbs) {
7630
-      thumbsToActivate = 1;
7631
-    }
7632
-
7633
-    thumbsToActivate = Math.floor(thumbsToActivate);
7634
-
7635
-    thumbsSwiper.slides.removeClass(thumbActiveClass);
7636
-    if (thumbsSwiper.params.loop || (thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled)) {
7637
-      for (let i = 0; i < thumbsToActivate; i += 1) {
7638
-        thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index="${swiper.realIndex + i}"]`).addClass(thumbActiveClass);
7639
-      }
7640
-    } else {
7641
-      for (let i = 0; i < thumbsToActivate; i += 1) {
7642
-        thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass);
7643
-      }
7644
-    }
7645
-  },
7646
-};
7647
-var thumbs = {
7648
-  name: 'thumbs',
7649
-  params: {
7650
-    thumbs: {
7651
-      swiper: null,
7652
-      multipleActiveThumbs: true,
7653
-      autoScrollOffset: 0,
7654
-      slideThumbActiveClass: 'swiper-slide-thumb-active',
7655
-      thumbsContainerClass: 'swiper-container-thumbs',
7656
-    },
7657
-  },
7658
-  create() {
7659
-    const swiper = this;
7660
-    Utils.extend(swiper, {
7661
-      thumbs: {
7662
-        swiper: null,
7663
-        init: Thumbs.init.bind(swiper),
7664
-        update: Thumbs.update.bind(swiper),
7665
-        onThumbClick: Thumbs.onThumbClick.bind(swiper),
7666
-      },
7667
-    });
7668
-  },
7669
-  on: {
7670
-    beforeInit() {
7671
-      const swiper = this;
7672
-      const { thumbs } = swiper.params;
7673
-      if (!thumbs || !thumbs.swiper) return;
7674
-      swiper.thumbs.init();
7675
-      swiper.thumbs.update(true);
7676
-    },
7677
-    slideChange() {
7678
-      const swiper = this;
7679
-      if (!swiper.thumbs.swiper) return;
7680
-      swiper.thumbs.update();
7681
-    },
7682
-    update() {
7683
-      const swiper = this;
7684
-      if (!swiper.thumbs.swiper) return;
7685
-      swiper.thumbs.update();
7686
-    },
7687
-    resize() {
7688
-      const swiper = this;
7689
-      if (!swiper.thumbs.swiper) return;
7690
-      swiper.thumbs.update();
7691
-    },
7692
-    observerUpdate() {
7693
-      const swiper = this;
7694
-      if (!swiper.thumbs.swiper) return;
7695
-      swiper.thumbs.update();
7696
-    },
7697
-    setTransition(duration) {
7698
-      const swiper = this;
7699
-      const thumbsSwiper = swiper.thumbs.swiper;
7700
-      if (!thumbsSwiper) return;
7701
-      thumbsSwiper.setTransition(duration);
7702
-    },
7703
-    beforeDestroy() {
7704
-      const swiper = this;
7705
-      const thumbsSwiper = swiper.thumbs.swiper;
7706
-      if (!thumbsSwiper) return;
7707
-      if (swiper.thumbs.swiperCreated && thumbsSwiper) {
7708
-        thumbsSwiper.destroy();
7709
-      }
7710
-    },
7711
-  },
7712
-};
7713
-
7714
-// Swiper Class
7715
-
7716
-const components = [
7717
-  Device$1,
7718
-  Support$1,
7719
-  Browser$1,
7720
-  Resize,
7721
-  Observer$1,
7722
-  
7723
-];
7724
-
7725
-if (typeof Swiper.use === 'undefined') {
7726
-  Swiper.use = Swiper.Class.use;
7727
-  Swiper.installModule = Swiper.Class.installModule;
7728
-}
7729
-
7730
-Swiper.use(components);
7731
-
7732
-export { a11y$1 as A11y, autoplay as Autoplay, controller as Controller, effectCoverflow as EffectCoverflow, effectCube as EffectCube, effectFade as EffectFade, effectFlip as EffectFlip, hashNavigation as HashNavigation, history as History, keyboard as Keyboard, lazy as Lazy, mousewheel as Mousewheel, navigation as Navigation, pagination as Pagination, parallax as Parallax, scrollbar as Scrollbar, Swiper, thumbs as Thumbs, virtual as Virtual, zoom as Zoom };
7733
-//# sourceMappingURL=swiper.esm.js.map
Browse code

Initial commit

Benjamin Roth authored on19/05/2020 21:59:44
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,7733 @@
1
+/**
2
+ * Swiper 5.4.0
3
+ * Most modern mobile touch slider and framework with hardware accelerated transitions
4
+ * http://swiperjs.com
5
+ *
6
+ * Copyright 2014-2020 Vladimir Kharlampidi
7
+ *
8
+ * Released under the MIT License
9
+ *
10
+ * Released on: May 15, 2020
11
+ */
12
+
13
+import { $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, data, transform, transition as transition$1, on, off, trigger, transitionEnd as transitionEnd$1, outerWidth, outerHeight, offset, css, each, html, text, is, index, eq, append, prepend, next, nextAll, prev, prevAll, parent, parents, closest, find, children, filter, remove, add, styles } from 'dom7/dist/dom7.modular';
14
+import { window, document as document$1 } from 'ssr-window';
15
+
16
+const Methods = {
17
+  addClass,
18
+  removeClass,
19
+  hasClass,
20
+  toggleClass,
21
+  attr,
22
+  removeAttr,
23
+  data,
24
+  transform,
25
+  transition: transition$1,
26
+  on,
27
+  off,
28
+  trigger,
29
+  transitionEnd: transitionEnd$1,
30
+  outerWidth,
31
+  outerHeight,
32
+  offset,
33
+  css,
34
+  each,
35
+  html,
36
+  text,
37
+  is,
38
+  index,
39
+  eq,
40
+  append,
41
+  prepend,
42
+  next,
43
+  nextAll,
44
+  prev,
45
+  prevAll,
46
+  parent,
47
+  parents,
48
+  closest,
49
+  find,
50
+  children,
51
+  filter,
52
+  remove,
53
+  add,
54
+  styles,
55
+};
56
+
57
+Object.keys(Methods).forEach((methodName) => {
58
+  $.fn[methodName] = $.fn[methodName] || Methods[methodName];
59
+});
60
+
61
+const Utils = {
62
+  deleteProps(obj) {
63
+    const object = obj;
64
+    Object.keys(object).forEach((key) => {
65
+      try {
66
+        object[key] = null;
67
+      } catch (e) {
68
+        // no getter for object
69
+      }
70
+      try {
71
+        delete object[key];
72
+      } catch (e) {
73
+        // something got wrong
74
+      }
75
+    });
76
+  },
77
+  nextTick(callback, delay = 0) {
78
+    return setTimeout(callback, delay);
79
+  },
80
+  now() {
81
+    return Date.now();
82
+  },
83
+  getTranslate(el, axis = 'x') {
84
+    let matrix;
85
+    let curTransform;
86
+    let transformMatrix;
87
+
88
+    const curStyle = window.getComputedStyle(el, null);
89
+
90
+    if (window.WebKitCSSMatrix) {
91
+      curTransform = curStyle.transform || curStyle.webkitTransform;
92
+      if (curTransform.split(',').length > 6) {
93
+        curTransform = curTransform.split(', ').map((a) => a.replace(',', '.')).join(', ');
94
+      }
95
+      // Some old versions of Webkit choke when 'none' is passed; pass
96
+      // empty string instead in this case
97
+      transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
98
+    } else {
99
+      transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
100
+      matrix = transformMatrix.toString().split(',');
101
+    }
102
+
103
+    if (axis === 'x') {
104
+      // Latest Chrome and webkits Fix
105
+      if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
106
+      // Crazy IE10 Matrix
107
+      else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
108
+      // Normal Browsers
109
+      else curTransform = parseFloat(matrix[4]);
110
+    }
111
+    if (axis === 'y') {
112
+      // Latest Chrome and webkits Fix
113
+      if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
114
+      // Crazy IE10 Matrix
115
+      else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
116
+      // Normal Browsers
117
+      else curTransform = parseFloat(matrix[5]);
118
+    }
119
+    return curTransform || 0;
120
+  },
121
+  parseUrlQuery(url) {
122
+    const query = {};
123
+    let urlToParse = url || window.location.href;
124
+    let i;
125
+    let params;
126
+    let param;
127
+    let length;
128
+    if (typeof urlToParse === 'string' && urlToParse.length) {
129
+      urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : '';
130
+      params = urlToParse.split('&').filter((paramsPart) => paramsPart !== '');
131
+      length = params.length;
132
+
133
+      for (i = 0; i < length; i += 1) {
134
+        param = params[i].replace(/#\S+/g, '').split('=');
135
+        query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';
136
+      }
137
+    }
138
+    return query;
139
+  },
140
+  isObject(o) {
141
+    return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
142
+  },
143
+  extend(...args) {
144
+    const to = Object(args[0]);
145
+    for (let i = 1; i < args.length; i += 1) {
146
+      const nextSource = args[i];
147
+      if (nextSource !== undefined && nextSource !== null) {
148
+        const keysArray = Object.keys(Object(nextSource));
149
+        for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
150
+          const nextKey = keysArray[nextIndex];
151
+          const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
152
+          if (desc !== undefined && desc.enumerable) {
153
+            if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
154
+              Utils.extend(to[nextKey], nextSource[nextKey]);
155
+            } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
156
+              to[nextKey] = {};
157
+              Utils.extend(to[nextKey], nextSource[nextKey]);
158
+            } else {
159
+              to[nextKey] = nextSource[nextKey];
160
+            }
161
+          }
162
+        }
163
+      }
164
+    }
165
+    return to;
166
+  },
167
+};
168
+
169
+const Support = (function Support() {
170
+  return {
171
+    touch: !!(('ontouchstart' in window) || (window.DocumentTouch && document$1 instanceof window.DocumentTouch)),
172
+
173
+    pointerEvents: !!window.PointerEvent && ('maxTouchPoints' in window.navigator) && window.navigator.maxTouchPoints >= 0,
174
+
175
+    observer: (function checkObserver() {
176
+      return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
177
+    }()),
178
+
179
+    passiveListener: (function checkPassiveListener() {
180
+      let supportsPassive = false;
181
+      try {
182
+        const opts = Object.defineProperty({}, 'passive', {
183
+          // eslint-disable-next-line
184
+          get() {
185
+            supportsPassive = true;
186
+          },
187
+        });
188
+        window.addEventListener('testPassiveListener', null, opts);
189
+      } catch (e) {
190
+        // No support
191
+      }
192
+      return supportsPassive;
193
+    }()),
194
+
195
+    gestures: (function checkGestures() {
196
+      return 'ongesturestart' in window;
197
+    }()),
198
+  };
199
+}());
200
+
201
+class SwiperClass {
202
+  constructor(params = {}) {
203
+    const self = this;
204
+    self.params = params;
205
+
206
+    // Events
207
+    self.eventsListeners = {};
208
+
209
+    if (self.params && self.params.on) {
210
+      Object.keys(self.params.on).forEach((eventName) => {
211
+        self.on(eventName, self.params.on[eventName]);
212
+      });
213
+    }
214
+  }
215
+
216
+  on(events, handler, priority) {
217
+    const self = this;
218
+    if (typeof handler !== 'function') return self;
219
+    const method = priority ? 'unshift' : 'push';
220
+    events.split(' ').forEach((event) => {
221
+      if (!self.eventsListeners[event]) self.eventsListeners[event] = [];
222
+      self.eventsListeners[event][method](handler);
223
+    });
224
+    return self;
225
+  }
226
+
227
+  once(events, handler, priority) {
228
+    const self = this;
229
+    if (typeof handler !== 'function') return self;
230
+    function onceHandler(...args) {
231
+      self.off(events, onceHandler);
232
+      if (onceHandler.f7proxy) {
233
+        delete onceHandler.f7proxy;
234
+      }
235
+      handler.apply(self, args);
236
+    }
237
+    onceHandler.f7proxy = handler;
238
+    return self.on(events, onceHandler, priority);
239
+  }
240
+
241
+  off(events, handler) {
242
+    const self = this;
243
+    if (!self.eventsListeners) return self;
244
+    events.split(' ').forEach((event) => {
245
+      if (typeof handler === 'undefined') {
246
+        self.eventsListeners[event] = [];
247
+      } else if (self.eventsListeners[event] && self.eventsListeners[event].length) {
248
+        self.eventsListeners[event].forEach((eventHandler, index) => {
249
+          if (eventHandler === handler || (eventHandler.f7proxy && eventHandler.f7proxy === handler)) {
250
+            self.eventsListeners[event].splice(index, 1);
251
+          }
252
+        });
253
+      }
254
+    });
255
+    return self;
256
+  }
257
+
258
+  emit(...args) {
259
+    const self = this;
260
+    if (!self.eventsListeners) return self;
261
+    let events;
262
+    let data;
263
+    let context;
264
+    if (typeof args[0] === 'string' || Array.isArray(args[0])) {
265
+      events = args[0];
266
+      data = args.slice(1, args.length);
267
+      context = self;
268
+    } else {
269
+      events = args[0].events;
270
+      data = args[0].data;
271
+      context = args[0].context || self;
272
+    }
273
+    const eventsArray = Array.isArray(events) ? events : events.split(' ');
274
+    eventsArray.forEach((event) => {
275
+      if (self.eventsListeners && self.eventsListeners[event]) {
276
+        const handlers = [];
277
+        self.eventsListeners[event].forEach((eventHandler) => {
278
+          handlers.push(eventHandler);
279
+        });
280
+        handlers.forEach((eventHandler) => {
281
+          eventHandler.apply(context, data);
282
+        });
283
+      }
284
+    });
285
+    return self;
286
+  }
287
+
288
+  useModulesParams(instanceParams) {
289
+    const instance = this;
290
+    if (!instance.modules) return;
291
+    Object.keys(instance.modules).forEach((moduleName) => {
292
+      const module = instance.modules[moduleName];
293
+      // Extend params
294
+      if (module.params) {
295
+        Utils.extend(instanceParams, module.params);
296
+      }
297
+    });
298
+  }
299
+
300
+  useModules(modulesParams = {}) {
301
+    const instance = this;
302
+    if (!instance.modules) return;
303
+    Object.keys(instance.modules).forEach((moduleName) => {
304
+      const module = instance.modules[moduleName];
305
+      const moduleParams = modulesParams[moduleName] || {};
306
+      // Extend instance methods and props
307
+      if (module.instance) {
308
+        Object.keys(module.instance).forEach((modulePropName) => {
309
+          const moduleProp = module.instance[modulePropName];
310
+          if (typeof moduleProp === 'function') {
311
+            instance[modulePropName] = moduleProp.bind(instance);
312
+          } else {
313
+            instance[modulePropName] = moduleProp;
314
+          }
315
+        });
316
+      }
317
+      // Add event listeners
318
+      if (module.on && instance.on) {
319
+        Object.keys(module.on).forEach((moduleEventName) => {
320
+          instance.on(moduleEventName, module.on[moduleEventName]);
321
+        });
322
+      }
323
+
324
+      // Module create callback
325
+      if (module.create) {
326
+        module.create.bind(instance)(moduleParams);
327
+      }
328
+    });
329
+  }
330
+
331
+  static set components(components) {
332
+    const Class = this;
333
+    if (!Class.use) return;
334
+    Class.use(components);
335
+  }
336
+
337
+  static installModule(module, ...params) {
338
+    const Class = this;
339
+    if (!Class.prototype.modules) Class.prototype.modules = {};
340
+    const name = module.name || (`${Object.keys(Class.prototype.modules).length}_${Utils.now()}`);
341
+    Class.prototype.modules[name] = module;
342
+    // Prototype
343
+    if (module.proto) {
344
+      Object.keys(module.proto).forEach((key) => {
345
+        Class.prototype[key] = module.proto[key];
346
+      });
347
+    }
348
+    // Class
349
+    if (module.static) {
350
+      Object.keys(module.static).forEach((key) => {
351
+        Class[key] = module.static[key];
352
+      });
353
+    }
354
+    // Callback
355
+    if (module.install) {
356
+      module.install.apply(Class, params);
357
+    }
358
+    return Class;
359
+  }
360
+
361
+  static use(module, ...params) {
362
+    const Class = this;
363
+    if (Array.isArray(module)) {
364
+      module.forEach((m) => Class.installModule(m));
365
+      return Class;
366
+    }
367
+    return Class.installModule(module, ...params);
368
+  }
369
+}
370
+
371
+function updateSize () {
372
+  const swiper = this;
373
+  let width;
374
+  let height;
375
+  const $el = swiper.$el;
376
+  if (typeof swiper.params.width !== 'undefined') {
377
+    width = swiper.params.width;
378
+  } else {
379
+    width = $el[0].clientWidth;
380
+  }
381
+  if (typeof swiper.params.height !== 'undefined') {
382
+    height = swiper.params.height;
383
+  } else {
384
+    height = $el[0].clientHeight;
385
+  }
386
+  if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {
387
+    return;
388
+  }
389
+
390
+  // Subtract paddings
391
+  width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);
392
+  height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);
393
+
394
+  Utils.extend(swiper, {
395
+    width,
396
+    height,
397
+    size: swiper.isHorizontal() ? width : height,
398
+  });
399
+}
400
+
401
+function updateSlides () {
402
+  const swiper = this;
403
+  const params = swiper.params;
404
+
405
+  const {
406
+    $wrapperEl, size: swiperSize, rtlTranslate: rtl, wrongRTL,
407
+  } = swiper;
408
+  const isVirtual = swiper.virtual && params.virtual.enabled;
409
+  const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
410
+  const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);
411
+  const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
412
+  let snapGrid = [];
413
+  const slidesGrid = [];
414
+  const slidesSizesGrid = [];
415
+
416
+  function slidesForMargin(slideIndex) {
417
+    if (!params.cssMode) return true;
418
+    if (slideIndex === slides.length - 1) {
419
+      return false;
420
+    }
421
+    return true;
422
+  }
423
+
424
+  let offsetBefore = params.slidesOffsetBefore;
425
+  if (typeof offsetBefore === 'function') {
426
+    offsetBefore = params.slidesOffsetBefore.call(swiper);
427
+  }
428
+
429
+  let offsetAfter = params.slidesOffsetAfter;
430
+  if (typeof offsetAfter === 'function') {
431
+    offsetAfter = params.slidesOffsetAfter.call(swiper);
432
+  }
433
+
434
+  const previousSnapGridLength = swiper.snapGrid.length;
435
+  const previousSlidesGridLength = swiper.snapGrid.length;
436
+
437
+  let spaceBetween = params.spaceBetween;
438
+  let slidePosition = -offsetBefore;
439
+  let prevSlideSize = 0;
440
+  let index = 0;
441
+  if (typeof swiperSize === 'undefined') {
442
+    return;
443
+  }
444
+  if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
445
+    spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;
446
+  }
447
+
448
+  swiper.virtualSize = -spaceBetween;
449
+
450
+  // reset margins
451
+  if (rtl) slides.css({ marginLeft: '', marginTop: '' });
452
+  else slides.css({ marginRight: '', marginBottom: '' });
453
+
454
+  let slidesNumberEvenToRows;
455
+  if (params.slidesPerColumn > 1) {
456
+    if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {
457
+      slidesNumberEvenToRows = slidesLength;
458
+    } else {
459
+      slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;
460
+    }
461
+    if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {
462
+      slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);
463
+    }
464
+  }
465
+
466
+  // Calc slides
467
+  let slideSize;
468
+  const slidesPerColumn = params.slidesPerColumn;
469
+  const slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
470
+  const numFullColumns = Math.floor(slidesLength / params.slidesPerColumn);
471
+  for (let i = 0; i < slidesLength; i += 1) {
472
+    slideSize = 0;
473
+    const slide = slides.eq(i);
474
+    if (params.slidesPerColumn > 1) {
475
+      // Set slides order
476
+      let newSlideOrderIndex;
477
+      let column;
478
+      let row;
479
+      if (params.slidesPerColumnFill === 'row' && params.slidesPerGroup > 1) {
480
+        const groupIndex = Math.floor(i / (params.slidesPerGroup * params.slidesPerColumn));
481
+        const slideIndexInGroup = i - params.slidesPerColumn * params.slidesPerGroup * groupIndex;
482
+        const columnsInGroup = groupIndex === 0
483
+          ? params.slidesPerGroup
484
+          : Math.min(Math.ceil((slidesLength - groupIndex * slidesPerColumn * params.slidesPerGroup) / slidesPerColumn), params.slidesPerGroup);
485
+        row = Math.floor(slideIndexInGroup / columnsInGroup);
486
+        column = (slideIndexInGroup - row * columnsInGroup) + groupIndex * params.slidesPerGroup;
487
+
488
+        newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn);
489
+        slide
490
+          .css({
491
+            '-webkit-box-ordinal-group': newSlideOrderIndex,
492
+            '-moz-box-ordinal-group': newSlideOrderIndex,
493
+            '-ms-flex-order': newSlideOrderIndex,
494
+            '-webkit-order': newSlideOrderIndex,
495
+            order: newSlideOrderIndex,
496
+          });
497
+      } else if (params.slidesPerColumnFill === 'column') {
498
+        column = Math.floor(i / slidesPerColumn);
499
+        row = i - (column * slidesPerColumn);
500
+        if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) {
501
+          row += 1;
502
+          if (row >= slidesPerColumn) {
503
+            row = 0;
504
+            column += 1;
505
+          }
506
+        }
507
+      } else {
508
+        row = Math.floor(i / slidesPerRow);
509
+        column = i - (row * slidesPerRow);
510
+      }
511
+      slide.css(
512
+        `margin-${swiper.isHorizontal() ? 'top' : 'left'}`,
513
+        (row !== 0 && params.spaceBetween) && (`${params.spaceBetween}px`)
514
+      );
515
+    }
516
+    if (slide.css('display') === 'none') continue; // eslint-disable-line
517
+
518
+    if (params.slidesPerView === 'auto') {
519
+      const slideStyles = window.getComputedStyle(slide[0], null);
520
+      const currentTransform = slide[0].style.transform;
521
+      const currentWebKitTransform = slide[0].style.webkitTransform;
522
+      if (currentTransform) {
523
+        slide[0].style.transform = 'none';
524
+      }
525
+      if (currentWebKitTransform) {
526
+        slide[0].style.webkitTransform = 'none';
527
+      }
528
+      if (params.roundLengths) {
529
+        slideSize = swiper.isHorizontal()
530
+          ? slide.outerWidth(true)
531
+          : slide.outerHeight(true);
532
+      } else {
533
+        // eslint-disable-next-line
534
+        if (swiper.isHorizontal()) {
535
+          const width = parseFloat(slideStyles.getPropertyValue('width'));
536
+          const paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left'));
537
+          const paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right'));
538
+          const marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left'));
539
+          const marginRight = parseFloat(slideStyles.getPropertyValue('margin-right'));
540
+          const boxSizing = slideStyles.getPropertyValue('box-sizing');
541
+          if (boxSizing && boxSizing === 'border-box') {
542
+            slideSize = width + marginLeft + marginRight;
543
+          } else {
544
+            slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight;
545
+          }
546
+        } else {
547
+          const height = parseFloat(slideStyles.getPropertyValue('height'));
548
+          const paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top'));
549
+          const paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom'));
550
+          const marginTop = parseFloat(slideStyles.getPropertyValue('margin-top'));
551
+          const marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom'));
552
+          const boxSizing = slideStyles.getPropertyValue('box-sizing');
553
+          if (boxSizing && boxSizing === 'border-box') {
554
+            slideSize = height + marginTop + marginBottom;
555
+          } else {
556
+            slideSize = height + paddingTop + paddingBottom + marginTop + marginBottom;
557
+          }
558
+        }
559
+      }
560
+      if (currentTransform) {
561
+        slide[0].style.transform = currentTransform;
562
+      }
563
+      if (currentWebKitTransform) {
564
+        slide[0].style.webkitTransform = currentWebKitTransform;
565
+      }
566
+      if (params.roundLengths) slideSize = Math.floor(slideSize);
567
+    } else {
568
+      slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView;
569
+      if (params.roundLengths) slideSize = Math.floor(slideSize);
570
+
571
+      if (slides[i]) {
572
+        if (swiper.isHorizontal()) {
573
+          slides[i].style.width = `${slideSize}px`;
574
+        } else {
575
+          slides[i].style.height = `${slideSize}px`;
576
+        }
577
+      }
578
+    }
579
+    if (slides[i]) {
580
+      slides[i].swiperSlideSize = slideSize;
581
+    }
582
+    slidesSizesGrid.push(slideSize);
583
+
584
+
585
+    if (params.centeredSlides) {
586
+      slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween;
587
+      if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
588
+      if (i === 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
589
+      if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;
590
+      if (params.roundLengths) slidePosition = Math.floor(slidePosition);
591
+      if ((index) % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
592
+      slidesGrid.push(slidePosition);
593
+    } else {
594
+      if (params.roundLengths) slidePosition = Math.floor(slidePosition);
595
+      if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);
596
+      slidesGrid.push(slidePosition);
597
+      slidePosition = slidePosition + slideSize + spaceBetween;
598
+    }
599
+
600
+    swiper.virtualSize += slideSize + spaceBetween;
601
+
602
+    prevSlideSize = slideSize;
603
+
604
+    index += 1;
605
+  }
606
+  swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
607
+  let newSlidesGrid;
608
+
609
+  if (
610
+    rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
611
+    $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
612
+  }
613
+  if (params.setWrapperSize) {
614
+    if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
615
+    else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
616
+  }
617
+
618
+  if (params.slidesPerColumn > 1) {
619
+    swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;
620
+    swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;
621
+    if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
622
+    else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
623
+    if (params.centeredSlides) {
624
+      newSlidesGrid = [];
625
+      for (let i = 0; i < snapGrid.length; i += 1) {
626
+        let slidesGridItem = snapGrid[i];
627
+        if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
628
+        if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);
629
+      }
630
+      snapGrid = newSlidesGrid;
631
+    }
632
+  }
633
+
634
+  // Remove last grid elements depending on width
635
+  if (!params.centeredSlides) {
636
+    newSlidesGrid = [];
637
+    for (let i = 0; i < snapGrid.length; i += 1) {
638
+      let slidesGridItem = snapGrid[i];
639
+      if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
640
+      if (snapGrid[i] <= swiper.virtualSize - swiperSize) {
641
+        newSlidesGrid.push(slidesGridItem);
642
+      }
643
+    }
644
+    snapGrid = newSlidesGrid;
645
+    if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
646
+      snapGrid.push(swiper.virtualSize - swiperSize);
647
+    }
648
+  }
649
+  if (snapGrid.length === 0) snapGrid = [0];
650
+
651
+  if (params.spaceBetween !== 0) {
652
+    if (swiper.isHorizontal()) {
653
+      if (rtl) slides.filter(slidesForMargin).css({ marginLeft: `${spaceBetween}px` });
654
+      else slides.filter(slidesForMargin).css({ marginRight: `${spaceBetween}px` });
655
+    } else slides.filter(slidesForMargin).css({ marginBottom: `${spaceBetween}px` });
656
+  }
657
+
658
+  if (params.centeredSlides && params.centeredSlidesBounds) {
659
+    let allSlidesSize = 0;
660
+    slidesSizesGrid.forEach((slideSizeValue) => {
661
+      allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);
662
+    });
663
+    allSlidesSize -= params.spaceBetween;
664
+    const maxSnap = allSlidesSize - swiperSize;
665
+    snapGrid = snapGrid.map((snap) => {
666
+      if (snap < 0) return -offsetBefore;
667
+      if (snap > maxSnap) return maxSnap + offsetAfter;
668
+      return snap;
669
+    });
670
+  }
671
+
672
+  if (params.centerInsufficientSlides) {
673
+    let allSlidesSize = 0;
674
+    slidesSizesGrid.forEach((slideSizeValue) => {
675
+      allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);
676
+    });
677
+    allSlidesSize -= params.spaceBetween;
678
+    if (allSlidesSize < swiperSize) {
679
+      const allSlidesOffset = (swiperSize - allSlidesSize) / 2;
680
+      snapGrid.forEach((snap, snapIndex) => {
681
+        snapGrid[snapIndex] = snap - allSlidesOffset;
682
+      });
683
+      slidesGrid.forEach((snap, snapIndex) => {
684
+        slidesGrid[snapIndex] = snap + allSlidesOffset;
685
+      });
686
+    }
687
+  }
688
+
689
+  Utils.extend(swiper, {
690
+    slides,
691
+    snapGrid,
692
+    slidesGrid,
693
+    slidesSizesGrid,
694
+  });
695
+
696
+  if (slidesLength !== previousSlidesLength) {
697
+    swiper.emit('slidesLengthChange');
698
+  }
699
+  if (snapGrid.length !== previousSnapGridLength) {
700
+    if (swiper.params.watchOverflow) swiper.checkOverflow();
701
+    swiper.emit('snapGridLengthChange');
702
+  }
703
+  if (slidesGrid.length !== previousSlidesGridLength) {
704
+    swiper.emit('slidesGridLengthChange');
705
+  }
706
+
707
+  if (params.watchSlidesProgress || params.watchSlidesVisibility) {
708
+    swiper.updateSlidesOffset();
709
+  }
710
+}
711
+
712
+function updateAutoHeight (speed) {
713
+  const swiper = this;
714
+  const activeSlides = [];
715
+  let newHeight = 0;
716
+  let i;
717
+  if (typeof speed === 'number') {
718
+    swiper.setTransition(speed);
719
+  } else if (speed === true) {
720
+    swiper.setTransition(swiper.params.speed);
721
+  }
722
+  // Find slides currently in view
723
+  if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
724
+    if (swiper.params.centeredSlides) {
725
+      swiper.visibleSlides.each((index, slide) => {
726
+        activeSlides.push(slide);
727
+      });
728
+    } else {
729
+      for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
730
+        const index = swiper.activeIndex + i;
731
+        if (index > swiper.slides.length) break;
732
+        activeSlides.push(swiper.slides.eq(index)[0]);
733
+      }
734
+    }
735
+  } else {
736
+    activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);
737
+  }
738
+
739
+  // Find new height from highest slide in view
740
+  for (i = 0; i < activeSlides.length; i += 1) {
741
+    if (typeof activeSlides[i] !== 'undefined') {
742
+      const height = activeSlides[i].offsetHeight;
743
+      newHeight = height > newHeight ? height : newHeight;
744
+    }
745
+  }
746
+
747
+  // Update Height
748
+  if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);
749
+}
750
+
751
+function updateSlidesOffset () {
752
+  const swiper = this;
753
+  const slides = swiper.slides;
754
+  for (let i = 0; i < slides.length; i += 1) {
755
+    slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
756
+  }
757
+}
758
+
759
+function updateSlidesProgress (translate = (this && this.translate) || 0) {
760
+  const swiper = this;
761
+  const params = swiper.params;
762
+
763
+  const { slides, rtlTranslate: rtl } = swiper;
764
+
765
+  if (slides.length === 0) return;
766
+  if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
767
+
768
+  let offsetCenter = -translate;
769
+  if (rtl) offsetCenter = translate;
770
+
771
+  // Visible Slides
772
+  slides.removeClass(params.slideVisibleClass);
773
+
774
+  swiper.visibleSlidesIndexes = [];
775
+  swiper.visibleSlides = [];
776
+
777
+  for (let i = 0; i < slides.length; i += 1) {
778
+    const slide = slides[i];
779
+    const slideProgress = (
780
+      (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset
781
+    ) / (slide.swiperSlideSize + params.spaceBetween);
782
+    if (params.watchSlidesVisibility || (params.centeredSlides && params.autoHeight)) {
783
+      const slideBefore = -(offsetCenter - slide.swiperSlideOffset);
784
+      const slideAfter = slideBefore + swiper.slidesSizesGrid[i];
785
+      const isVisible = (slideBefore >= 0 && slideBefore < swiper.size - 1)
786
+                || (slideAfter > 1 && slideAfter <= swiper.size)
787
+                || (slideBefore <= 0 && slideAfter >= swiper.size);
788
+      if (isVisible) {
789
+        swiper.visibleSlides.push(slide);
790
+        swiper.visibleSlidesIndexes.push(i);
791
+        slides.eq(i).addClass(params.slideVisibleClass);
792
+      }
793
+    }
794
+    slide.progress = rtl ? -slideProgress : slideProgress;
795
+  }
796
+  swiper.visibleSlides = $(swiper.visibleSlides);
797
+}
798
+
799
+function updateProgress (translate) {
800
+  const swiper = this;
801
+  if (typeof translate === 'undefined') {
802
+    const multiplier = swiper.rtlTranslate ? -1 : 1;
803
+    // eslint-disable-next-line
804
+    translate = (swiper && swiper.translate && (swiper.translate * multiplier)) || 0;
805
+  }
806
+  const params = swiper.params;
807
+  const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
808
+  let { progress, isBeginning, isEnd } = swiper;
809
+  const wasBeginning = isBeginning;
810
+  const wasEnd = isEnd;
811
+  if (translatesDiff === 0) {
812
+    progress = 0;
813
+    isBeginning = true;
814
+    isEnd = true;
815
+  } else {
816
+    progress = (translate - swiper.minTranslate()) / (translatesDiff);
817
+    isBeginning = progress <= 0;
818
+    isEnd = progress >= 1;
819
+  }
820
+  Utils.extend(swiper, {
821
+    progress,
822
+    isBeginning,
823
+    isEnd,
824
+  });
825
+
826
+  if (params.watchSlidesProgress || params.watchSlidesVisibility || (params.centeredSlides && params.autoHeight)) swiper.updateSlidesProgress(translate);
827
+
828
+  if (isBeginning && !wasBeginning) {
829
+    swiper.emit('reachBeginning toEdge');
830
+  }
831
+  if (isEnd && !wasEnd) {
832
+    swiper.emit('reachEnd toEdge');
833
+  }
834
+  if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {
835
+    swiper.emit('fromEdge');
836
+  }
837
+
838
+  swiper.emit('progress', progress);
839
+}
840
+
841
+function updateSlidesClasses () {
842
+  const swiper = this;
843
+
844
+  const {
845
+    slides, params, $wrapperEl, activeIndex, realIndex,
846
+  } = swiper;
847
+  const isVirtual = swiper.virtual && params.virtual.enabled;
848
+
849
+  slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);
850
+
851
+  let activeSlide;
852
+  if (isVirtual) {
853
+    activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`);
854
+  } else {
855
+    activeSlide = slides.eq(activeIndex);
856
+  }
857
+
858
+  // Active classes
859
+  activeSlide.addClass(params.slideActiveClass);
860
+
861
+  if (params.loop) {
862
+    // Duplicate to all looped slides
863
+    if (activeSlide.hasClass(params.slideDuplicateClass)) {
864
+      $wrapperEl
865
+        .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`)
866
+        .addClass(params.slideDuplicateActiveClass);
867
+    } else {
868
+      $wrapperEl
869
+        .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`)
870
+        .addClass(params.slideDuplicateActiveClass);
871
+    }
872
+  }
873
+  // Next Slide
874
+  let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);
875
+  if (params.loop && nextSlide.length === 0) {
876
+    nextSlide = slides.eq(0);
877
+    nextSlide.addClass(params.slideNextClass);
878
+  }
879
+  // Prev Slide
880
+  let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);
881
+  if (params.loop && prevSlide.length === 0) {
882
+    prevSlide = slides.eq(-1);
883
+    prevSlide.addClass(params.slidePrevClass);
884
+  }
885
+  if (params.loop) {
886
+    // Duplicate to all looped slides
887
+    if (nextSlide.hasClass(params.slideDuplicateClass)) {
888
+      $wrapperEl
889
+        .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
890
+        .addClass(params.slideDuplicateNextClass);
891
+    } else {
892
+      $wrapperEl
893
+        .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
894
+        .addClass(params.slideDuplicateNextClass);
895
+    }
896
+    if (prevSlide.hasClass(params.slideDuplicateClass)) {
897
+      $wrapperEl
898
+        .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
899
+        .addClass(params.slideDuplicatePrevClass);
900
+    } else {
901
+      $wrapperEl
902
+        .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
903
+        .addClass(params.slideDuplicatePrevClass);
904
+    }
905
+  }
906
+}
907
+
908
+function updateActiveIndex (newActiveIndex) {
909
+  const swiper = this;
910
+  const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
911
+  const {
912
+    slidesGrid, snapGrid, params, activeIndex: previousIndex, realIndex: previousRealIndex, snapIndex: previousSnapIndex,
913
+  } = swiper;
914
+  let activeIndex = newActiveIndex;
915
+  let snapIndex;
916
+  if (typeof activeIndex === 'undefined') {
917
+    for (let i = 0; i < slidesGrid.length; i += 1) {
918
+      if (typeof slidesGrid[i + 1] !== 'undefined') {
919
+        if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) {
920
+          activeIndex = i;
921
+        } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
922
+          activeIndex = i + 1;
923
+        }
924
+      } else if (translate >= slidesGrid[i]) {
925
+        activeIndex = i;
926
+      }
927
+    }
928
+    // Normalize slideIndex
929
+    if (params.normalizeSlideIndex) {
930
+      if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;
931
+    }
932
+  }
933
+  if (snapGrid.indexOf(translate) >= 0) {
934
+    snapIndex = snapGrid.indexOf(translate);
935
+  } else {
936
+    const skip = Math.min(params.slidesPerGroupSkip, activeIndex);
937
+    snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);
938
+  }
939
+  if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
940
+  if (activeIndex === previousIndex) {
941
+    if (snapIndex !== previousSnapIndex) {
942
+      swiper.snapIndex = snapIndex;
943
+      swiper.emit('snapIndexChange');
944
+    }
945
+    return;
946
+  }
947
+
948
+  // Get real index
949
+  const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);
950
+
951
+  Utils.extend(swiper, {
952
+    snapIndex,
953
+    realIndex,
954
+    previousIndex,
955
+    activeIndex,
956
+  });
957
+  swiper.emit('activeIndexChange');
958
+  swiper.emit('snapIndexChange');
959
+  if (previousRealIndex !== realIndex) {
960
+    swiper.emit('realIndexChange');
961
+  }
962
+  if (swiper.initialized || swiper.params.runCallbacksOnInit) {
963
+    swiper.emit('slideChange');
964
+  }
965
+}
966
+
967
+function updateClickedSlide (e) {
968
+  const swiper = this;
969
+  const params = swiper.params;
970
+  const slide = $(e.target).closest(`.${params.slideClass}`)[0];
971
+  let slideFound = false;
972
+  if (slide) {
973
+    for (let i = 0; i < swiper.slides.length; i += 1) {
974
+      if (swiper.slides[i] === slide) slideFound = true;
975
+    }
976
+  }
977
+
978
+  if (slide && slideFound) {
979
+    swiper.clickedSlide = slide;
980
+    if (swiper.virtual && swiper.params.virtual.enabled) {
981
+      swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);
982
+    } else {
983
+      swiper.clickedIndex = $(slide).index();
984
+    }
985
+  } else {
986
+    swiper.clickedSlide = undefined;
987
+    swiper.clickedIndex = undefined;
988
+    return;
989
+  }
990
+  if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {
991
+    swiper.slideToClickedSlide();
992
+  }
993
+}
994
+
995
+var update = {
996
+  updateSize,
997
+  updateSlides,
998
+  updateAutoHeight,
999
+  updateSlidesOffset,
1000
+  updateSlidesProgress,
1001
+  updateProgress,
1002
+  updateSlidesClasses,
1003
+  updateActiveIndex,
1004
+  updateClickedSlide,
1005
+};
1006
+
1007
+function getTranslate (axis = this.isHorizontal() ? 'x' : 'y') {
1008
+  const swiper = this;
1009
+
1010
+  const {
1011
+    params, rtlTranslate: rtl, translate, $wrapperEl,
1012
+  } = swiper;
1013
+
1014
+  if (params.virtualTranslate) {
1015
+    return rtl ? -translate : translate;
1016
+  }
1017
+  if (params.cssMode) {
1018
+    return translate;
1019
+  }
1020
+
1021
+  let currentTranslate = Utils.getTranslate($wrapperEl[0], axis);
1022
+  if (rtl) currentTranslate = -currentTranslate;
1023
+
1024
+  return currentTranslate || 0;
1025
+}
1026
+
1027
+function setTranslate (translate, byController) {
1028
+  const swiper = this;
1029
+  const {
1030
+    rtlTranslate: rtl, params, $wrapperEl, wrapperEl, progress,
1031
+  } = swiper;
1032
+  let x = 0;
1033
+  let y = 0;
1034
+  const z = 0;
1035
+
1036
+  if (swiper.isHorizontal()) {
1037
+    x = rtl ? -translate : translate;
1038
+  } else {
1039
+    y = translate;
1040
+  }
1041
+
1042
+  if (params.roundLengths) {
1043
+    x = Math.floor(x);
1044
+    y = Math.floor(y);
1045
+  }
1046
+
1047
+  if (params.cssMode) {
1048
+    wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;
1049
+  } else if (!params.virtualTranslate) {
1050
+    $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);
1051
+  }
1052
+  swiper.previousTranslate = swiper.translate;
1053
+  swiper.translate = swiper.isHorizontal() ? x : y;
1054
+
1055
+  // Check if we need to update progress
1056
+  let newProgress;
1057
+  const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
1058
+  if (translatesDiff === 0) {
1059
+    newProgress = 0;
1060
+  } else {
1061
+    newProgress = (translate - swiper.minTranslate()) / (translatesDiff);
1062
+  }
1063
+  if (newProgress !== progress) {
1064
+    swiper.updateProgress(translate);
1065
+  }
1066
+
1067
+  swiper.emit('setTranslate', swiper.translate, byController);
1068
+}
1069
+
1070
+function minTranslate () {
1071
+  return (-this.snapGrid[0]);
1072
+}
1073
+
1074
+function maxTranslate () {
1075
+  return (-this.snapGrid[this.snapGrid.length - 1]);
1076
+}
1077
+
1078
+function translateTo (translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {
1079
+  const swiper = this;
1080
+
1081
+  const {
1082
+    params,
1083
+    wrapperEl,
1084
+  } = swiper;
1085
+
1086
+  if (swiper.animating && params.preventInteractionOnTransition) {
1087
+    return false;
1088
+  }
1089
+
1090
+  const minTranslate = swiper.minTranslate();
1091
+  const maxTranslate = swiper.maxTranslate();
1092
+  let newTranslate;
1093
+  if (translateBounds && translate > minTranslate) newTranslate = minTranslate;
1094
+  else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;
1095
+  else newTranslate = translate;
1096
+
1097
+  // Update progress
1098
+  swiper.updateProgress(newTranslate);
1099
+
1100
+  if (params.cssMode) {
1101
+    const isH = swiper.isHorizontal();
1102
+    if (speed === 0) {
1103
+      wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;
1104
+    } else {
1105
+      // eslint-disable-next-line
1106
+      if (wrapperEl.scrollTo) {
1107
+        wrapperEl.scrollTo({
1108
+          [isH ? 'left' : 'top']: -newTranslate,
1109
+          behavior: 'smooth',
1110
+        });
1111
+      } else {
1112
+        wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;
1113
+      }
1114
+    }
1115
+    return true;
1116
+  }
1117
+
1118
+  if (speed === 0) {
1119
+    swiper.setTransition(0);
1120
+    swiper.setTranslate(newTranslate);
1121
+    if (runCallbacks) {
1122
+      swiper.emit('beforeTransitionStart', speed, internal);
1123
+      swiper.emit('transitionEnd');
1124
+    }
1125
+  } else {
1126
+    swiper.setTransition(speed);
1127
+    swiper.setTranslate(newTranslate);
1128
+    if (runCallbacks) {
1129
+      swiper.emit('beforeTransitionStart', speed, internal);
1130
+      swiper.emit('transitionStart');
1131
+    }
1132
+    if (!swiper.animating) {
1133
+      swiper.animating = true;
1134
+      if (!swiper.onTranslateToWrapperTransitionEnd) {
1135
+        swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {
1136
+          if (!swiper || swiper.destroyed) return;
1137
+          if (e.target !== this) return;
1138
+          swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
1139
+          swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);
1140
+          swiper.onTranslateToWrapperTransitionEnd = null;
1141
+          delete swiper.onTranslateToWrapperTransitionEnd;
1142
+          if (runCallbacks) {
1143
+            swiper.emit('transitionEnd');
1144
+          }
1145
+        };
1146
+      }
1147
+      swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
1148
+      swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);
1149
+    }
1150
+  }
1151
+
1152
+  return true;
1153
+}
1154
+
1155
+var translate = {
1156
+  getTranslate,
1157
+  setTranslate,
1158
+  minTranslate,
1159
+  maxTranslate,
1160
+  translateTo,
1161
+};
1162
+
1163
+function setTransition (duration, byController) {
1164
+  const swiper = this;
1165
+
1166
+  if (!swiper.params.cssMode) {
1167
+    swiper.$wrapperEl.transition(duration);
1168
+  }
1169
+
1170
+  swiper.emit('setTransition', duration, byController);
1171
+}
1172
+
1173
+function transitionStart (runCallbacks = true, direction) {
1174
+  const swiper = this;
1175
+  const { activeIndex, params, previousIndex } = swiper;
1176
+  if (params.cssMode) return;
1177
+  if (params.autoHeight) {
1178
+    swiper.updateAutoHeight();
1179
+  }
1180
+
1181
+  let dir = direction;
1182
+  if (!dir) {
1183
+    if (activeIndex > previousIndex) dir = 'next';
1184
+    else if (activeIndex < previousIndex) dir = 'prev';
1185
+    else dir = 'reset';
1186
+  }
1187
+
1188
+  swiper.emit('transitionStart');
1189
+
1190
+  if (runCallbacks && activeIndex !== previousIndex) {
1191
+    if (dir === 'reset') {
1192
+      swiper.emit('slideResetTransitionStart');
1193
+      return;
1194
+    }
1195
+    swiper.emit('slideChangeTransitionStart');
1196
+    if (dir === 'next') {
1197
+      swiper.emit('slideNextTransitionStart');
1198
+    } else {
1199
+      swiper.emit('slidePrevTransitionStart');
1200
+    }
1201
+  }
1202
+}
1203
+
1204
+function transitionEnd (runCallbacks = true, direction) {
1205
+  const swiper = this;
1206
+  const { activeIndex, previousIndex, params } = swiper;
1207
+  swiper.animating = false;
1208
+  if (params.cssMode) return;
1209
+  swiper.setTransition(0);
1210
+
1211
+  let dir = direction;
1212
+  if (!dir) {
1213
+    if (activeIndex > previousIndex) dir = 'next';
1214
+    else if (activeIndex < previousIndex) dir = 'prev';
1215
+    else dir = 'reset';
1216
+  }
1217
+
1218
+  swiper.emit('transitionEnd');
1219
+
1220
+  if (runCallbacks && activeIndex !== previousIndex) {
1221
+    if (dir === 'reset') {
1222
+      swiper.emit('slideResetTransitionEnd');
1223
+      return;
1224
+    }
1225
+    swiper.emit('slideChangeTransitionEnd');
1226
+    if (dir === 'next') {
1227
+      swiper.emit('slideNextTransitionEnd');
1228
+    } else {
1229
+      swiper.emit('slidePrevTransitionEnd');
1230
+    }
1231
+  }
1232
+}
1233
+
1234
+var transition = {
1235
+  setTransition,
1236
+  transitionStart,
1237
+  transitionEnd,
1238
+};
1239
+
1240
+function slideTo (index = 0, speed = this.params.speed, runCallbacks = true, internal) {
1241
+  const swiper = this;
1242
+  let slideIndex = index;
1243
+  if (slideIndex < 0) slideIndex = 0;
1244
+
1245
+  const {
1246
+    params, snapGrid, slidesGrid, previousIndex, activeIndex, rtlTranslate: rtl, wrapperEl,
1247
+  } = swiper;
1248
+  if (swiper.animating && params.preventInteractionOnTransition) {
1249
+    return false;
1250
+  }
1251
+
1252
+  const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
1253
+  let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
1254
+  if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
1255
+
1256
+  if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {
1257
+    swiper.emit('beforeSlideChangeStart');
1258
+  }
1259
+
1260
+  const translate = -snapGrid[snapIndex];
1261
+
1262
+  // Update progress
1263
+  swiper.updateProgress(translate);
1264
+
1265
+  // Normalize slideIndex
1266
+  if (params.normalizeSlideIndex) {
1267
+    for (let i = 0; i < slidesGrid.length; i += 1) {
1268
+      if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {
1269
+        slideIndex = i;
1270
+      }
1271
+    }
1272
+  }
1273
+  // Directions locks
1274
+  if (swiper.initialized && slideIndex !== activeIndex) {
1275
+    if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
1276
+      return false;
1277
+    }
1278
+    if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {
1279
+      if ((activeIndex || 0) !== slideIndex) return false;
1280
+    }
1281
+  }
1282
+
1283
+  let direction;
1284
+  if (slideIndex > activeIndex) direction = 'next';
1285
+  else if (slideIndex < activeIndex) direction = 'prev';
1286
+  else direction = 'reset';
1287
+
1288
+
1289
+  // Update Index
1290
+  if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {
1291
+    swiper.updateActiveIndex(slideIndex);
1292
+    // Update Height
1293
+    if (params.autoHeight) {
1294
+      swiper.updateAutoHeight();
1295
+    }
1296
+    swiper.updateSlidesClasses();
1297
+    if (params.effect !== 'slide') {
1298
+      swiper.setTranslate(translate);
1299
+    }
1300
+    if (direction !== 'reset') {
1301
+      swiper.transitionStart(runCallbacks, direction);
1302
+      swiper.transitionEnd(runCallbacks, direction);
1303
+    }
1304
+    return false;
1305
+  }
1306
+  if (params.cssMode) {
1307
+    const isH = swiper.isHorizontal();
1308
+    let t = -translate;
1309
+    if (rtl) {
1310
+      t = wrapperEl.scrollWidth - wrapperEl.offsetWidth - t;
1311
+    }
1312
+    if (speed === 0) {
1313
+      wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;
1314
+    } else {
1315
+      // eslint-disable-next-line
1316
+      if (wrapperEl.scrollTo) {
1317
+        wrapperEl.scrollTo({
1318
+          [isH ? 'left' : 'top']: t,
1319
+          behavior: 'smooth',
1320
+        });
1321
+      } else {
1322
+        wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;
1323
+      }
1324
+    }
1325
+    return true;
1326
+  }
1327
+
1328
+  if (speed === 0) {
1329
+    swiper.setTransition(0);
1330
+    swiper.setTranslate(translate);
1331
+    swiper.updateActiveIndex(slideIndex);
1332
+    swiper.updateSlidesClasses();
1333
+    swiper.emit('beforeTransitionStart', speed, internal);
1334
+    swiper.transitionStart(runCallbacks, direction);
1335
+    swiper.transitionEnd(runCallbacks, direction);
1336
+  } else {
1337
+    swiper.setTransition(speed);
1338
+    swiper.setTranslate(translate);
1339
+    swiper.updateActiveIndex(slideIndex);
1340
+    swiper.updateSlidesClasses();
1341
+    swiper.emit('beforeTransitionStart', speed, internal);
1342
+    swiper.transitionStart(runCallbacks, direction);
1343
+    if (!swiper.animating) {
1344
+      swiper.animating = true;
1345
+      if (!swiper.onSlideToWrapperTransitionEnd) {
1346
+        swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
1347
+          if (!swiper || swiper.destroyed) return;
1348
+          if (e.target !== this) return;
1349
+          swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
1350
+          swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
1351
+          swiper.onSlideToWrapperTransitionEnd = null;
1352
+          delete swiper.onSlideToWrapperTransitionEnd;
1353
+          swiper.transitionEnd(runCallbacks, direction);
1354
+        };
1355
+      }
1356
+      swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
1357
+      swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
1358
+    }
1359
+  }
1360
+
1361
+  return true;
1362
+}
1363
+
1364
+function slideToLoop (index = 0, speed = this.params.speed, runCallbacks = true, internal) {
1365
+  const swiper = this;
1366
+  let newIndex = index;
1367
+  if (swiper.params.loop) {
1368
+    newIndex += swiper.loopedSlides;
1369
+  }
1370
+
1371
+  return swiper.slideTo(newIndex, speed, runCallbacks, internal);
1372
+}
1373
+
1374
+/* eslint no-unused-vars: "off" */
1375
+function slideNext (speed = this.params.speed, runCallbacks = true, internal) {
1376
+  const swiper = this;
1377
+  const { params, animating } = swiper;
1378
+  const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup;
1379
+  if (params.loop) {
1380
+    if (animating) return false;
1381
+    swiper.loopFix();
1382
+    // eslint-disable-next-line
1383
+    swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
1384
+  }
1385
+  return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);
1386
+}
1387
+
1388
+/* eslint no-unused-vars: "off" */
1389
+function slidePrev (speed = this.params.speed, runCallbacks = true, internal) {
1390
+  const swiper = this;
1391
+  const {
1392
+    params, animating, snapGrid, slidesGrid, rtlTranslate,
1393
+  } = swiper;
1394
+
1395
+  if (params.loop) {
1396
+    if (animating) return false;
1397
+    swiper.loopFix();
1398
+    // eslint-disable-next-line
1399
+    swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
1400
+  }
1401
+  const translate = rtlTranslate ? swiper.translate : -swiper.translate;
1402
+  function normalize(val) {
1403
+    if (val < 0) return -Math.floor(Math.abs(val));
1404
+    return Math.floor(val);
1405
+  }
1406
+  const normalizedTranslate = normalize(translate);
1407
+  const normalizedSnapGrid = snapGrid.map((val) => normalize(val));
1408
+  const normalizedSlidesGrid = slidesGrid.map((val) => normalize(val));
1409
+
1410
+  const currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];
1411
+  let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
1412
+  if (typeof prevSnap === 'undefined' && params.cssMode) {
1413
+    snapGrid.forEach((snap) => {
1414
+      if (!prevSnap && normalizedTranslate >= snap) prevSnap = snap;
1415
+    });
1416
+  }
1417
+  let prevIndex;
1418
+  if (typeof prevSnap !== 'undefined') {
1419
+    prevIndex = slidesGrid.indexOf(prevSnap);
1420
+    if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;
1421
+  }
1422
+  return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
1423
+}
1424
+
1425
+/* eslint no-unused-vars: "off" */
1426
+function slideReset (speed = this.params.speed, runCallbacks = true, internal) {
1427
+  const swiper = this;
1428
+  return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
1429
+}
1430
+
1431
+/* eslint no-unused-vars: "off" */
1432
+function slideToClosest (speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) {
1433
+  const swiper = this;
1434
+  let index = swiper.activeIndex;
1435
+  const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
1436
+  const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);
1437
+
1438
+  const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
1439
+
1440
+  if (translate >= swiper.snapGrid[snapIndex]) {
1441
+    // The current translate is on or after the current snap index, so the choice
1442
+    // is between the current index and the one after it.
1443
+    const currentSnap = swiper.snapGrid[snapIndex];
1444
+    const nextSnap = swiper.snapGrid[snapIndex + 1];
1445
+    if ((translate - currentSnap) > (nextSnap - currentSnap) * threshold) {
1446
+      index += swiper.params.slidesPerGroup;
1447
+    }
1448
+  } else {
1449
+    // The current translate is before the current snap index, so the choice
1450
+    // is between the current index and the one before it.
1451
+    const prevSnap = swiper.snapGrid[snapIndex - 1];
1452
+    const currentSnap = swiper.snapGrid[snapIndex];
1453
+    if ((translate - prevSnap) <= (currentSnap - prevSnap) * threshold) {
1454
+      index -= swiper.params.slidesPerGroup;
1455
+    }
1456
+  }
1457
+  index = Math.max(index, 0);
1458
+  index = Math.min(index, swiper.slidesGrid.length - 1);
1459
+
1460
+  return swiper.slideTo(index, speed, runCallbacks, internal);
1461
+}
1462
+
1463
+function slideToClickedSlide () {
1464
+  const swiper = this;
1465
+  const { params, $wrapperEl } = swiper;
1466
+
1467
+  const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
1468
+  let slideToIndex = swiper.clickedIndex;
1469
+  let realIndex;
1470
+  if (params.loop) {
1471
+    if (swiper.animating) return;
1472
+    realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);
1473
+    if (params.centeredSlides) {
1474
+      if (
1475
+        (slideToIndex < swiper.loopedSlides - (slidesPerView / 2))
1476
+        || (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2))
1477
+      ) {
1478
+        swiper.loopFix();
1479
+        slideToIndex = $wrapperEl
1480
+          .children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
1481
+          .eq(0)
1482
+          .index();
1483
+
1484
+        Utils.nextTick(() => {
1485
+          swiper.slideTo(slideToIndex);
1486
+        });
1487
+      } else {
1488
+        swiper.slideTo(slideToIndex);
1489
+      }
1490
+    } else if (slideToIndex > swiper.slides.length - slidesPerView) {
1491
+      swiper.loopFix();
1492
+      slideToIndex = $wrapperEl
1493
+        .children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
1494
+        .eq(0)
1495
+        .index();
1496
+
1497
+      Utils.nextTick(() => {
1498
+        swiper.slideTo(slideToIndex);
1499
+      });
1500
+    } else {
1501
+      swiper.slideTo(slideToIndex);
1502
+    }
1503
+  } else {
1504
+    swiper.slideTo(slideToIndex);
1505
+  }
1506
+}
1507
+
1508
+var slide = {
1509
+  slideTo,
1510
+  slideToLoop,
1511
+  slideNext,
1512
+  slidePrev,
1513
+  slideReset,
1514
+  slideToClosest,
1515
+  slideToClickedSlide,
1516
+};
1517
+
1518
+function loopCreate () {
1519
+  const swiper = this;
1520
+  const { params, $wrapperEl } = swiper;
1521
+  // Remove duplicated slides
1522
+  $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
1523
+
1524
+  let slides = $wrapperEl.children(`.${params.slideClass}`);
1525
+
1526
+  if (params.loopFillGroupWithBlank) {
1527
+    const blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);
1528
+    if (blankSlidesNum !== params.slidesPerGroup) {
1529
+      for (let i = 0; i < blankSlidesNum; i += 1) {
1530
+        const blankNode = $(document$1.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);
1531
+        $wrapperEl.append(blankNode);
1532
+      }
1533
+      slides = $wrapperEl.children(`.${params.slideClass}`);
1534
+    }
1535
+  }
1536
+
1537
+  if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;
1538
+
1539
+  swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10));
1540
+  swiper.loopedSlides += params.loopAdditionalSlides;
1541
+  if (swiper.loopedSlides > slides.length) {
1542
+    swiper.loopedSlides = slides.length;
1543
+  }
1544
+
1545
+  const prependSlides = [];
1546
+  const appendSlides = [];
1547
+  slides.each((index, el) => {
1548
+    const slide = $(el);
1549
+    if (index < swiper.loopedSlides) appendSlides.push(el);
1550
+    if (index < slides.length && index >= slides.length - swiper.loopedSlides) prependSlides.push(el);
1551
+    slide.attr('data-swiper-slide-index', index);
1552
+  });
1553
+  for (let i = 0; i < appendSlides.length; i += 1) {
1554
+    $wrapperEl.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
1555
+  }
1556
+  for (let i = prependSlides.length - 1; i >= 0; i -= 1) {
1557
+    $wrapperEl.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
1558
+  }
1559
+}
1560
+
1561
+function loopFix () {
1562
+  const swiper = this;
1563
+
1564
+  swiper.emit('beforeLoopFix');
1565
+
1566
+  const {
1567
+    activeIndex, slides, loopedSlides, allowSlidePrev, allowSlideNext, snapGrid, rtlTranslate: rtl,
1568
+  } = swiper;
1569
+  let newIndex;
1570
+  swiper.allowSlidePrev = true;
1571
+  swiper.allowSlideNext = true;
1572
+
1573
+  const snapTranslate = -snapGrid[activeIndex];
1574
+  const diff = snapTranslate - swiper.getTranslate();
1575
+
1576
+  // Fix For Negative Oversliding
1577
+  if (activeIndex < loopedSlides) {
1578
+    newIndex = (slides.length - (loopedSlides * 3)) + activeIndex;
1579
+    newIndex += loopedSlides;
1580
+    const slideChanged = swiper.slideTo(newIndex, 0, false, true);
1581
+    if (slideChanged && diff !== 0) {
1582
+      swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
1583
+    }
1584
+  } else if (activeIndex >= slides.length - loopedSlides) {
1585
+    // Fix For Positive Oversliding
1586
+    newIndex = -slides.length + activeIndex + loopedSlides;
1587
+    newIndex += loopedSlides;
1588
+    const slideChanged = swiper.slideTo(newIndex, 0, false, true);
1589
+    if (slideChanged && diff !== 0) {
1590
+      swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
1591
+    }
1592
+  }
1593
+  swiper.allowSlidePrev = allowSlidePrev;
1594
+  swiper.allowSlideNext = allowSlideNext;
1595
+
1596
+  swiper.emit('loopFix');
1597
+}
1598
+
1599
+function loopDestroy () {
1600
+  const swiper = this;
1601
+  const { $wrapperEl, params, slides } = swiper;
1602
+  $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();
1603
+  slides.removeAttr('data-swiper-slide-index');
1604
+}
1605
+
1606
+var loop = {
1607
+  loopCreate,
1608
+  loopFix,
1609
+  loopDestroy,
1610
+};
1611
+
1612
+function setGrabCursor (moving) {
1613
+  const swiper = this;
1614
+  if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked) || swiper.params.cssMode) return;
1615
+  const el = swiper.el;
1616
+  el.style.cursor = 'move';
1617
+  el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
1618
+  el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
1619
+  el.style.cursor = moving ? 'grabbing' : 'grab';
1620
+}
1621
+
1622
+function unsetGrabCursor () {
1623
+  const swiper = this;
1624
+  if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked) || swiper.params.cssMode) return;
1625
+  swiper.el.style.cursor = '';
1626
+}
1627
+
1628
+var grabCursor = {
1629
+  setGrabCursor,
1630
+  unsetGrabCursor,
1631
+};
1632
+
1633
+function appendSlide (slides) {
1634
+  const swiper = this;
1635
+  const { $wrapperEl, params } = swiper;
1636
+  if (params.loop) {
1637
+    swiper.loopDestroy();
1638
+  }
1639
+  if (typeof slides === 'object' && 'length' in slides) {
1640
+    for (let i = 0; i < slides.length; i += 1) {
1641
+      if (slides[i]) $wrapperEl.append(slides[i]);
1642
+    }
1643
+  } else {
1644
+    $wrapperEl.append(slides);
1645
+  }
1646
+  if (params.loop) {
1647
+    swiper.loopCreate();
1648
+  }
1649
+  if (!(params.observer && Support.observer)) {
1650
+    swiper.update();
1651
+  }
1652
+}
1653
+
1654
+function prependSlide (slides) {
1655
+  const swiper = this;
1656
+  const { params, $wrapperEl, activeIndex } = swiper;
1657
+
1658
+  if (params.loop) {
1659
+    swiper.loopDestroy();
1660
+  }
1661
+  let newActiveIndex = activeIndex + 1;
1662
+  if (typeof slides === 'object' && 'length' in slides) {
1663
+    for (let i = 0; i < slides.length; i += 1) {
1664
+      if (slides[i]) $wrapperEl.prepend(slides[i]);
1665
+    }
1666
+    newActiveIndex = activeIndex + slides.length;
1667
+  } else {
1668
+    $wrapperEl.prepend(slides);
1669
+  }
1670
+  if (params.loop) {
1671
+    swiper.loopCreate();
1672
+  }
1673
+  if (!(params.observer && Support.observer)) {
1674
+    swiper.update();
1675
+  }
1676
+  swiper.slideTo(newActiveIndex, 0, false);
1677
+}
1678
+
1679
+function addSlide (index, slides) {
1680
+  const swiper = this;
1681
+  const { $wrapperEl, params, activeIndex } = swiper;
1682
+  let activeIndexBuffer = activeIndex;
1683
+  if (params.loop) {
1684
+    activeIndexBuffer -= swiper.loopedSlides;
1685
+    swiper.loopDestroy();
1686
+    swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
1687
+  }
1688
+  const baseLength = swiper.slides.length;
1689
+  if (index <= 0) {
1690
+    swiper.prependSlide(slides);
1691
+    return;
1692
+  }
1693
+  if (index >= baseLength) {
1694
+    swiper.appendSlide(slides);
1695
+    return;
1696
+  }
1697
+  let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;
1698
+
1699
+  const slidesBuffer = [];
1700
+  for (let i = baseLength - 1; i >= index; i -= 1) {
1701
+    const currentSlide = swiper.slides.eq(i);
1702
+    currentSlide.remove();
1703
+    slidesBuffer.unshift(currentSlide);
1704
+  }
1705
+
1706
+  if (typeof slides === 'object' && 'length' in slides) {
1707
+    for (let i = 0; i < slides.length; i += 1) {
1708
+      if (slides[i]) $wrapperEl.append(slides[i]);
1709
+    }
1710
+    newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;
1711
+  } else {
1712
+    $wrapperEl.append(slides);
1713
+  }
1714
+
1715
+  for (let i = 0; i < slidesBuffer.length; i += 1) {
1716
+    $wrapperEl.append(slidesBuffer[i]);
1717
+  }
1718
+
1719
+  if (params.loop) {
1720
+    swiper.loopCreate();
1721
+  }
1722
+  if (!(params.observer && Support.observer)) {
1723
+    swiper.update();
1724
+  }
1725
+  if (params.loop) {
1726
+    swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
1727
+  } else {
1728
+    swiper.slideTo(newActiveIndex, 0, false);
1729
+  }
1730
+}
1731
+
1732
+function removeSlide (slidesIndexes) {
1733
+  const swiper = this;
1734
+  const { params, $wrapperEl, activeIndex } = swiper;
1735
+
1736
+  let activeIndexBuffer = activeIndex;
1737
+  if (params.loop) {
1738
+    activeIndexBuffer -= swiper.loopedSlides;
1739
+    swiper.loopDestroy();
1740
+    swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
1741
+  }
1742
+  let newActiveIndex = activeIndexBuffer;
1743
+  let indexToRemove;
1744
+
1745
+  if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {
1746
+    for (let i = 0; i < slidesIndexes.length; i += 1) {
1747
+      indexToRemove = slidesIndexes[i];
1748
+      if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
1749
+      if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
1750
+    }
1751
+    newActiveIndex = Math.max(newActiveIndex, 0);
1752
+  } else {
1753
+    indexToRemove = slidesIndexes;
1754
+    if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
1755
+    if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
1756
+    newActiveIndex = Math.max(newActiveIndex, 0);
1757
+  }
1758
+
1759
+  if (params.loop) {
1760
+    swiper.loopCreate();
1761
+  }
1762
+
1763
+  if (!(params.observer && Support.observer)) {
1764
+    swiper.update();
1765
+  }
1766
+  if (params.loop) {
1767
+    swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
1768
+  } else {
1769
+    swiper.slideTo(newActiveIndex, 0, false);
1770
+  }
1771
+}
1772
+
1773
+function removeAllSlides () {
1774
+  const swiper = this;
1775
+
1776
+  const slidesIndexes = [];
1777
+  for (let i = 0; i < swiper.slides.length; i += 1) {
1778
+    slidesIndexes.push(i);
1779
+  }
1780
+  swiper.removeSlide(slidesIndexes);
1781
+}
1782
+
1783
+var manipulation = {
1784
+  appendSlide,
1785
+  prependSlide,
1786
+  addSlide,
1787
+  removeSlide,
1788
+  removeAllSlides,
1789
+};
1790
+
1791
+const Device = (function Device() {
1792
+  const platform = window.navigator.platform;
1793
+  const ua = window.navigator.userAgent;
1794
+
1795
+  const device = {
1796
+    ios: false,
1797
+    android: false,
1798
+    androidChrome: false,
1799
+    desktop: false,
1800
+    iphone: false,
1801
+    ipod: false,
1802
+    ipad: false,
1803
+    edge: false,
1804
+    ie: false,
1805
+    firefox: false,
1806
+    macos: false,
1807
+    windows: false,
1808
+    cordova: !!(window.cordova || window.phonegap),
1809
+    phonegap: !!(window.cordova || window.phonegap),
1810
+    electron: false,
1811
+  };
1812
+
1813
+  const screenWidth = window.screen.width;
1814
+  const screenHeight = window.screen.height;
1815
+
1816
+  const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
1817
+  let ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
1818
+  const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
1819
+  const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
1820
+  const ie = ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;
1821
+  const edge = ua.indexOf('Edge/') >= 0;
1822
+  const firefox = ua.indexOf('Gecko/') >= 0 && ua.indexOf('Firefox/') >= 0;
1823
+  const windows = platform === 'Win32';
1824
+  const electron = ua.toLowerCase().indexOf('electron') >= 0;
1825
+  let macos = platform === 'MacIntel';
1826
+
1827
+  // iPadOs 13 fix
1828
+  if (!ipad
1829
+    && macos
1830
+    && Support.touch
1831
+    && (
1832
+      (screenWidth === 1024 && screenHeight === 1366) // Pro 12.9
1833
+      || (screenWidth === 834 && screenHeight === 1194) // Pro 11
1834
+      || (screenWidth === 834 && screenHeight === 1112) // Pro 10.5
1835
+      || (screenWidth === 768 && screenHeight === 1024) // other
1836
+    )
1837
+  ) {
1838
+    ipad = ua.match(/(Version)\/([\d.]+)/);
1839
+    macos = false;
1840
+  }
1841
+
1842
+  device.ie = ie;
1843
+  device.edge = edge;
1844
+  device.firefox = firefox;
1845
+
1846
+  // Android
1847
+  if (android && !windows) {
1848
+    device.os = 'android';
1849
+    device.osVersion = android[2];
1850
+    device.android = true;
1851
+    device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;
1852
+  }
1853
+  if (ipad || iphone || ipod) {
1854
+    device.os = 'ios';
1855
+    device.ios = true;
1856
+  }
1857
+  // iOS
1858
+  if (iphone && !ipod) {
1859
+    device.osVersion = iphone[2].replace(/_/g, '.');
1860
+    device.iphone = true;
1861
+  }
1862
+  if (ipad) {
1863
+    device.osVersion = ipad[2].replace(/_/g, '.');
1864
+    device.ipad = true;
1865
+  }
1866
+  if (ipod) {
1867
+    device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
1868
+    device.ipod = true;
1869
+  }
1870
+  // iOS 8+ changed UA
1871
+  if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {
1872
+    if (device.osVersion.split('.')[0] === '10') {
1873
+      device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];
1874
+    }
1875
+  }
1876
+
1877
+  // Webview
1878
+  device.webView = !!((iphone || ipad || ipod) && (ua.match(/.*AppleWebKit(?!.*Safari)/i) || window.navigator.standalone))
1879
+    || (window.matchMedia && window.matchMedia('(display-mode: standalone)').matches);
1880
+  device.webview = device.webView;
1881
+  device.standalone = device.webView;
1882
+
1883
+  // Desktop
1884
+  device.desktop = !(device.ios || device.android) || electron;
1885
+  if (device.desktop) {
1886
+    device.electron = electron;
1887
+    device.macos = macos;
1888
+    device.windows = windows;
1889
+    if (device.macos) {
1890
+      device.os = 'macos';
1891
+    }
1892
+    if (device.windows) {
1893
+      device.os = 'windows';
1894
+    }
1895
+  }
1896
+
1897
+  // Pixel Ratio
1898
+  device.pixelRatio = window.devicePixelRatio || 1;
1899
+
1900
+  // Export object
1901
+  return device;
1902
+}());
1903
+
1904
+function onTouchStart (event) {
1905
+  const swiper = this;
1906
+  const data = swiper.touchEventsData;
1907
+  const { params, touches } = swiper;
1908
+
1909
+  if (swiper.animating && params.preventInteractionOnTransition) {
1910
+    return;
1911
+  }
1912
+  let e = event;
1913
+  if (e.originalEvent) e = e.originalEvent;
1914
+  const $targetEl = $(e.target);
1915
+
1916
+  if (params.touchEventsTarget === 'wrapper') {
1917
+    if (!$targetEl.closest(swiper.wrapperEl).length) return;
1918
+  }
1919
+  data.isTouchEvent = e.type === 'touchstart';
1920
+  if (!data.isTouchEvent && 'which' in e && e.which === 3) return;
1921
+  if (!data.isTouchEvent && 'button' in e && e.button > 0) return;
1922
+  if (data.isTouched && data.isMoved) return;
1923
+  if (params.noSwiping && $targetEl.closest(params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`)[0]) {
1924
+    swiper.allowClick = true;
1925
+    return;
1926
+  }
1927
+  if (params.swipeHandler) {
1928
+    if (!$targetEl.closest(params.swipeHandler)[0]) return;
1929
+  }
1930
+
1931
+  touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
1932
+  touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
1933
+  const startX = touches.currentX;
1934
+  const startY = touches.currentY;
1935
+
1936
+  // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
1937
+
1938
+  const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;
1939
+  const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;
1940
+  if (
1941
+    edgeSwipeDetection
1942
+    && ((startX <= edgeSwipeThreshold)
1943
+    || (startX >= window.screen.width - edgeSwipeThreshold))
1944
+  ) {
1945
+    return;
1946
+  }
1947
+
1948
+  Utils.extend(data, {
1949
+    isTouched: true,
1950
+    isMoved: false,
1951
+    allowTouchCallbacks: true,
1952
+    isScrolling: undefined,
1953
+    startMoving: undefined,
1954
+  });
1955
+
1956
+  touches.startX = startX;
1957
+  touches.startY = startY;
1958
+  data.touchStartTime = Utils.now();
1959
+  swiper.allowClick = true;
1960
+  swiper.updateSize();
1961
+  swiper.swipeDirection = undefined;
1962
+  if (params.threshold > 0) data.allowThresholdMove = false;
1963
+  if (e.type !== 'touchstart') {
1964
+    let preventDefault = true;
1965
+    if ($targetEl.is(data.formElements)) preventDefault = false;
1966
+    if (
1967
+      document$1.activeElement
1968
+      && $(document$1.activeElement).is(data.formElements)
1969
+      && document$1.activeElement !== $targetEl[0]
1970
+    ) {
1971
+      document$1.activeElement.blur();
1972
+    }
1973
+
1974
+    const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;
1975
+    if (params.touchStartForcePreventDefault || shouldPreventDefault) {
1976
+      e.preventDefault();
1977
+    }
1978
+  }
1979
+  swiper.emit('touchStart', e);
1980
+}
1981
+
1982
+function onTouchMove (event) {
1983
+  const swiper = this;
1984
+  const data = swiper.touchEventsData;
1985
+  const { params, touches, rtlTranslate: rtl } = swiper;
1986
+  let e = event;
1987
+  if (e.originalEvent) e = e.originalEvent;
1988
+  if (!data.isTouched) {
1989
+    if (data.startMoving && data.isScrolling) {
1990
+      swiper.emit('touchMoveOpposite', e);
1991
+    }
1992
+    return;
1993
+  }
1994
+  if (data.isTouchEvent && e.type !== 'touchmove') return;
1995
+  const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]);
1996
+  const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX;
1997
+  const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY;
1998
+  if (e.preventedByNestedSwiper) {
1999
+    touches.startX = pageX;
2000
+    touches.startY = pageY;
2001
+    return;
2002
+  }
2003
+  if (!swiper.allowTouchMove) {
2004
+    // isMoved = true;
2005
+    swiper.allowClick = false;
2006
+    if (data.isTouched) {
2007
+      Utils.extend(touches, {
2008
+        startX: pageX,
2009
+        startY: pageY,
2010
+        currentX: pageX,
2011
+        currentY: pageY,
2012
+      });
2013
+      data.touchStartTime = Utils.now();
2014
+    }
2015
+    return;
2016
+  }
2017
+  if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {
2018
+    if (swiper.isVertical()) {
2019
+      // Vertical
2020
+      if (
2021
+        (pageY < touches.startY && swiper.translate <= swiper.maxTranslate())
2022
+        || (pageY > touches.startY && swiper.translate >= swiper.minTranslate())
2023
+      ) {
2024
+        data.isTouched = false;
2025
+        data.isMoved = false;
2026
+        return;
2027
+      }
2028
+    } else if (
2029
+      (pageX < touches.startX && swiper.translate <= swiper.maxTranslate())
2030
+      || (pageX > touches.startX && swiper.translate >= swiper.minTranslate())
2031
+    ) {
2032
+      return;
2033
+    }
2034
+  }
2035
+  if (data.isTouchEvent && document$1.activeElement) {
2036
+    if (e.target === document$1.activeElement && $(e.target).is(data.formElements)) {
2037
+      data.isMoved = true;
2038
+      swiper.allowClick = false;
2039
+      return;
2040
+    }
2041
+  }
2042
+  if (data.allowTouchCallbacks) {
2043
+    swiper.emit('touchMove', e);
2044
+  }
2045
+  if (e.targetTouches && e.targetTouches.length > 1) return;
2046
+
2047
+  touches.currentX = pageX;
2048
+  touches.currentY = pageY;
2049
+
2050
+  const diffX = touches.currentX - touches.startX;
2051
+  const diffY = touches.currentY - touches.startY;
2052
+  if (swiper.params.threshold && Math.sqrt((diffX ** 2) + (diffY ** 2)) < swiper.params.threshold) return;
2053
+
2054
+  if (typeof data.isScrolling === 'undefined') {
2055
+    let touchAngle;
2056
+    if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) {
2057
+      data.isScrolling = false;
2058
+    } else {
2059
+      // eslint-disable-next-line
2060
+      if ((diffX * diffX) + (diffY * diffY) >= 25) {
2061
+        touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;
2062
+        data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle);
2063
+      }
2064
+    }
2065
+  }
2066
+  if (data.isScrolling) {
2067
+    swiper.emit('touchMoveOpposite', e);
2068
+  }
2069
+  if (typeof data.startMoving === 'undefined') {
2070
+    if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
2071
+      data.startMoving = true;
2072
+    }
2073
+  }
2074
+  if (data.isScrolling) {
2075
+    data.isTouched = false;
2076
+    return;
2077
+  }
2078
+  if (!data.startMoving) {
2079
+    return;
2080
+  }
2081
+  swiper.allowClick = false;
2082
+  if (!params.cssMode && e.cancelable) {
2083
+    e.preventDefault();
2084
+  }
2085
+  if (params.touchMoveStopPropagation && !params.nested) {
2086
+    e.stopPropagation();
2087
+  }
2088
+
2089
+  if (!data.isMoved) {
2090
+    if (params.loop) {
2091
+      swiper.loopFix();
2092
+    }
2093
+    data.startTranslate = swiper.getTranslate();
2094
+    swiper.setTransition(0);
2095
+    if (swiper.animating) {
2096
+      swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');
2097
+    }
2098
+    data.allowMomentumBounce = false;
2099
+    // Grab Cursor
2100
+    if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2101
+      swiper.setGrabCursor(true);
2102
+    }
2103
+    swiper.emit('sliderFirstMove', e);
2104
+  }
2105
+  swiper.emit('sliderMove', e);
2106
+  data.isMoved = true;
2107
+
2108
+  let diff = swiper.isHorizontal() ? diffX : diffY;
2109
+  touches.diff = diff;
2110
+
2111
+  diff *= params.touchRatio;
2112
+  if (rtl) diff = -diff;
2113
+
2114
+  swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
2115
+  data.currentTranslate = diff + data.startTranslate;
2116
+
2117
+  let disableParentSwiper = true;
2118
+  let resistanceRatio = params.resistanceRatio;
2119
+  if (params.touchReleaseOnEdges) {
2120
+    resistanceRatio = 0;
2121
+  }
2122
+  if ((diff > 0 && data.currentTranslate > swiper.minTranslate())) {
2123
+    disableParentSwiper = false;
2124
+    if (params.resistance) data.currentTranslate = (swiper.minTranslate() - 1) + ((-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio);
2125
+  } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {
2126
+    disableParentSwiper = false;
2127
+    if (params.resistance) data.currentTranslate = (swiper.maxTranslate() + 1) - ((swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio);
2128
+  }
2129
+
2130
+  if (disableParentSwiper) {
2131
+    e.preventedByNestedSwiper = true;
2132
+  }
2133
+
2134
+  // Directions locks
2135
+  if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {
2136
+    data.currentTranslate = data.startTranslate;
2137
+  }
2138
+  if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {
2139
+    data.currentTranslate = data.startTranslate;
2140
+  }
2141
+
2142
+
2143
+  // Threshold
2144
+  if (params.threshold > 0) {
2145
+    if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
2146
+      if (!data.allowThresholdMove) {
2147
+        data.allowThresholdMove = true;
2148
+        touches.startX = touches.currentX;
2149
+        touches.startY = touches.currentY;
2150
+        data.currentTranslate = data.startTranslate;
2151
+        touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
2152
+        return;
2153
+      }
2154
+    } else {
2155
+      data.currentTranslate = data.startTranslate;
2156
+      return;
2157
+    }
2158
+  }
2159
+
2160
+  if (!params.followFinger || params.cssMode) return;
2161
+
2162
+  // Update active index in free mode
2163
+  if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {
2164
+    swiper.updateActiveIndex();
2165
+    swiper.updateSlidesClasses();
2166
+  }
2167
+  if (params.freeMode) {
2168
+    // Velocity
2169
+    if (data.velocities.length === 0) {
2170
+      data.velocities.push({
2171
+        position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
2172
+        time: data.touchStartTime,
2173
+      });
2174
+    }
2175
+    data.velocities.push({
2176
+      position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],
2177
+      time: Utils.now(),
2178
+    });
2179
+  }
2180
+  // Update progress
2181
+  swiper.updateProgress(data.currentTranslate);
2182
+  // Update translate
2183
+  swiper.setTranslate(data.currentTranslate);
2184
+}
2185
+
2186
+function onTouchEnd (event) {
2187
+  const swiper = this;
2188
+  const data = swiper.touchEventsData;
2189
+
2190
+  const {
2191
+    params, touches, rtlTranslate: rtl, $wrapperEl, slidesGrid, snapGrid,
2192
+  } = swiper;
2193
+  let e = event;
2194
+  if (e.originalEvent) e = e.originalEvent;
2195
+  if (data.allowTouchCallbacks) {
2196
+    swiper.emit('touchEnd', e);
2197
+  }
2198
+  data.allowTouchCallbacks = false;
2199
+  if (!data.isTouched) {
2200
+    if (data.isMoved && params.grabCursor) {
2201
+      swiper.setGrabCursor(false);
2202
+    }
2203
+    data.isMoved = false;
2204
+    data.startMoving = false;
2205
+    return;
2206
+  }
2207
+  // Return Grab Cursor
2208
+  if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2209
+    swiper.setGrabCursor(false);
2210
+  }
2211
+
2212
+  // Time diff
2213
+  const touchEndTime = Utils.now();
2214
+  const timeDiff = touchEndTime - data.touchStartTime;
2215
+
2216
+  // Tap, doubleTap, Click
2217
+  if (swiper.allowClick) {
2218
+    swiper.updateClickedSlide(e);
2219
+    swiper.emit('tap click', e);
2220
+    if (timeDiff < 300 && (touchEndTime - data.lastClickTime) < 300) {
2221
+      swiper.emit('doubleTap doubleClick', e);
2222
+    }
2223
+  }
2224
+
2225
+  data.lastClickTime = Utils.now();
2226
+  Utils.nextTick(() => {
2227
+    if (!swiper.destroyed) swiper.allowClick = true;
2228
+  });
2229
+
2230
+  if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {
2231
+    data.isTouched = false;
2232
+    data.isMoved = false;
2233
+    data.startMoving = false;
2234
+    return;
2235
+  }
2236
+  data.isTouched = false;
2237
+  data.isMoved = false;
2238
+  data.startMoving = false;
2239
+
2240
+  let currentPos;
2241
+  if (params.followFinger) {
2242
+    currentPos = rtl ? swiper.translate : -swiper.translate;
2243
+  } else {
2244
+    currentPos = -data.currentTranslate;
2245
+  }
2246
+
2247
+  if (params.cssMode) {
2248
+    return;
2249
+  }
2250
+
2251
+  if (params.freeMode) {
2252
+    if (currentPos < -swiper.minTranslate()) {
2253
+      swiper.slideTo(swiper.activeIndex);
2254
+      return;
2255
+    }
2256
+    if (currentPos > -swiper.maxTranslate()) {
2257
+      if (swiper.slides.length < snapGrid.length) {
2258
+        swiper.slideTo(snapGrid.length - 1);
2259
+      } else {
2260
+        swiper.slideTo(swiper.slides.length - 1);
2261
+      }
2262
+      return;
2263
+    }
2264
+
2265
+    if (params.freeModeMomentum) {
2266
+      if (data.velocities.length > 1) {
2267
+        const lastMoveEvent = data.velocities.pop();
2268
+        const velocityEvent = data.velocities.pop();
2269
+
2270
+        const distance = lastMoveEvent.position - velocityEvent.position;
2271
+        const time = lastMoveEvent.time - velocityEvent.time;
2272
+        swiper.velocity = distance / time;
2273
+        swiper.velocity /= 2;
2274
+        if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {
2275
+          swiper.velocity = 0;
2276
+        }
2277
+        // this implies that the user stopped moving a finger then released.
2278
+        // There would be no events with distance zero, so the last event is stale.
2279
+        if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) {
2280
+          swiper.velocity = 0;
2281
+        }
2282
+      } else {
2283
+        swiper.velocity = 0;
2284
+      }
2285
+      swiper.velocity *= params.freeModeMomentumVelocityRatio;
2286
+
2287
+      data.velocities.length = 0;
2288
+      let momentumDuration = 1000 * params.freeModeMomentumRatio;
2289
+      const momentumDistance = swiper.velocity * momentumDuration;
2290
+
2291
+      let newPosition = swiper.translate + momentumDistance;
2292
+      if (rtl) newPosition = -newPosition;
2293
+
2294
+      let doBounce = false;
2295
+      let afterBouncePosition;
2296
+      const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;
2297
+      let needsLoopFix;
2298
+      if (newPosition < swiper.maxTranslate()) {
2299
+        if (params.freeModeMomentumBounce) {
2300
+          if (newPosition + swiper.maxTranslate() < -bounceAmount) {
2301
+            newPosition = swiper.maxTranslate() - bounceAmount;
2302
+          }
2303
+          afterBouncePosition = swiper.maxTranslate();
2304
+          doBounce = true;
2305
+          data.allowMomentumBounce = true;
2306
+        } else {
2307
+          newPosition = swiper.maxTranslate();
2308
+        }
2309
+        if (params.loop && params.centeredSlides) needsLoopFix = true;
2310
+      } else if (newPosition > swiper.minTranslate()) {
2311
+        if (params.freeModeMomentumBounce) {
2312
+          if (newPosition - swiper.minTranslate() > bounceAmount) {
2313
+            newPosition = swiper.minTranslate() + bounceAmount;
2314
+          }
2315
+          afterBouncePosition = swiper.minTranslate();
2316
+          doBounce = true;
2317
+          data.allowMomentumBounce = true;
2318
+        } else {
2319
+          newPosition = swiper.minTranslate();
2320
+        }
2321
+        if (params.loop && params.centeredSlides) needsLoopFix = true;
2322
+      } else if (params.freeModeSticky) {
2323
+        let nextSlide;
2324
+        for (let j = 0; j < snapGrid.length; j += 1) {
2325
+          if (snapGrid[j] > -newPosition) {
2326
+            nextSlide = j;
2327
+            break;
2328
+          }
2329
+        }
2330
+
2331
+        if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {
2332
+          newPosition = snapGrid[nextSlide];
2333
+        } else {
2334
+          newPosition = snapGrid[nextSlide - 1];
2335
+        }
2336
+        newPosition = -newPosition;
2337
+      }
2338
+      if (needsLoopFix) {
2339
+        swiper.once('transitionEnd', () => {
2340
+          swiper.loopFix();
2341
+        });
2342
+      }
2343
+      // Fix duration
2344
+      if (swiper.velocity !== 0) {
2345
+        if (rtl) {
2346
+          momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
2347
+        } else {
2348
+          momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
2349
+        }
2350
+        if (params.freeModeSticky) {
2351
+          // If freeModeSticky is active and the user ends a swipe with a slow-velocity
2352
+          // event, then durations can be 20+ seconds to slide one (or zero!) slides.
2353
+          // It's easy to see this when simulating touch with mouse events. To fix this,
2354
+          // limit single-slide swipes to the default slide duration. This also has the
2355
+          // nice side effect of matching slide speed if the user stopped moving before
2356
+          // lifting finger or mouse vs. moving slowly before lifting the finger/mouse.
2357
+          // For faster swipes, also apply limits (albeit higher ones).
2358
+          const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate);
2359
+          const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex];
2360
+          if (moveDistance < currentSlideSize) {
2361
+            momentumDuration = params.speed;
2362
+          } else if (moveDistance < 2 * currentSlideSize) {
2363
+            momentumDuration = params.speed * 1.5;
2364
+          } else {
2365
+            momentumDuration = params.speed * 2.5;
2366
+          }
2367
+        }
2368
+      } else if (params.freeModeSticky) {
2369
+        swiper.slideToClosest();
2370
+        return;
2371
+      }
2372
+
2373
+      if (params.freeModeMomentumBounce && doBounce) {
2374
+        swiper.updateProgress(afterBouncePosition);
2375
+        swiper.setTransition(momentumDuration);
2376
+        swiper.setTranslate(newPosition);
2377
+        swiper.transitionStart(true, swiper.swipeDirection);
2378
+        swiper.animating = true;
2379
+        $wrapperEl.transitionEnd(() => {
2380
+          if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return;
2381
+          swiper.emit('momentumBounce');
2382
+          swiper.setTransition(params.speed);
2383
+          setTimeout(() => {
2384
+            swiper.setTranslate(afterBouncePosition);
2385
+            $wrapperEl.transitionEnd(() => {
2386
+              if (!swiper || swiper.destroyed) return;
2387
+              swiper.transitionEnd();
2388
+            });
2389
+          }, 0);
2390
+        });
2391
+      } else if (swiper.velocity) {
2392
+        swiper.updateProgress(newPosition);
2393
+        swiper.setTransition(momentumDuration);
2394
+        swiper.setTranslate(newPosition);
2395
+        swiper.transitionStart(true, swiper.swipeDirection);
2396
+        if (!swiper.animating) {
2397
+          swiper.animating = true;
2398
+          $wrapperEl.transitionEnd(() => {
2399
+            if (!swiper || swiper.destroyed) return;
2400
+            swiper.transitionEnd();
2401
+          });
2402
+        }
2403
+      } else {
2404
+        swiper.updateProgress(newPosition);
2405
+      }
2406
+
2407
+      swiper.updateActiveIndex();
2408
+      swiper.updateSlidesClasses();
2409
+    } else if (params.freeModeSticky) {
2410
+      swiper.slideToClosest();
2411
+      return;
2412
+    }
2413
+
2414
+    if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {
2415
+      swiper.updateProgress();
2416
+      swiper.updateActiveIndex();
2417
+      swiper.updateSlidesClasses();
2418
+    }
2419
+    return;
2420
+  }
2421
+
2422
+  // Find current slide
2423
+  let stopIndex = 0;
2424
+  let groupSize = swiper.slidesSizesGrid[0];
2425
+  for (let i = 0; i < slidesGrid.length; i += (i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup)) {
2426
+    const increment = (i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup);
2427
+    if (typeof slidesGrid[i + increment] !== 'undefined') {
2428
+      if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {
2429
+        stopIndex = i;
2430
+        groupSize = slidesGrid[i + increment] - slidesGrid[i];
2431
+      }
2432
+    } else if (currentPos >= slidesGrid[i]) {
2433
+      stopIndex = i;
2434
+      groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
2435
+    }
2436
+  }
2437
+
2438
+  // Find current slide size
2439
+  const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
2440
+  const increment = (stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup);
2441
+
2442
+  if (timeDiff > params.longSwipesMs) {
2443
+    // Long touches
2444
+    if (!params.longSwipes) {
2445
+      swiper.slideTo(swiper.activeIndex);
2446
+      return;
2447
+    }
2448
+    if (swiper.swipeDirection === 'next') {
2449
+      if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);
2450
+      else swiper.slideTo(stopIndex);
2451
+    }
2452
+    if (swiper.swipeDirection === 'prev') {
2453
+      if (ratio > (1 - params.longSwipesRatio)) swiper.slideTo(stopIndex + increment);
2454
+      else swiper.slideTo(stopIndex);
2455
+    }
2456
+  } else {
2457
+    // Short swipes
2458
+    if (!params.shortSwipes) {
2459
+      swiper.slideTo(swiper.activeIndex);
2460
+      return;
2461
+    }
2462
+    const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);
2463
+    if (!isNavButtonTarget) {
2464
+      if (swiper.swipeDirection === 'next') {
2465
+        swiper.slideTo(stopIndex + increment);
2466
+      }
2467
+      if (swiper.swipeDirection === 'prev') {
2468
+        swiper.slideTo(stopIndex);
2469
+      }
2470
+    } else if (e.target === swiper.navigation.nextEl) {
2471
+      swiper.slideTo(stopIndex + increment);
2472
+    } else {
2473
+      swiper.slideTo(stopIndex);
2474
+    }
2475
+  }
2476
+}
2477
+
2478
+function onResize () {
2479
+  const swiper = this;
2480
+
2481
+  const { params, el } = swiper;
2482
+
2483
+  if (el && el.offsetWidth === 0) return;
2484
+
2485
+  // Breakpoints
2486
+  if (params.breakpoints) {
2487
+    swiper.setBreakpoint();
2488
+  }
2489
+
2490
+  // Save locks
2491
+  const { allowSlideNext, allowSlidePrev, snapGrid } = swiper;
2492
+
2493
+  // Disable locks on resize
2494
+  swiper.allowSlideNext = true;
2495
+  swiper.allowSlidePrev = true;
2496
+
2497
+  swiper.updateSize();
2498
+  swiper.updateSlides();
2499
+
2500
+  swiper.updateSlidesClasses();
2501
+  if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
2502
+    swiper.slideTo(swiper.slides.length - 1, 0, false, true);
2503
+  } else {
2504
+    swiper.slideTo(swiper.activeIndex, 0, false, true);
2505
+  }
2506
+
2507
+  if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {
2508
+    swiper.autoplay.run();
2509
+  }
2510
+  // Return locks after resize
2511
+  swiper.allowSlidePrev = allowSlidePrev;
2512
+  swiper.allowSlideNext = allowSlideNext;
2513
+
2514
+  if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
2515
+    swiper.checkOverflow();
2516
+  }
2517
+}
2518
+
2519
+function onClick (e) {
2520
+  const swiper = this;
2521
+  if (!swiper.allowClick) {
2522
+    if (swiper.params.preventClicks) e.preventDefault();
2523
+    if (swiper.params.preventClicksPropagation && swiper.animating) {
2524
+      e.stopPropagation();
2525
+      e.stopImmediatePropagation();
2526
+    }
2527
+  }
2528
+}
2529
+
2530
+function onScroll () {
2531
+  const swiper = this;
2532
+  const { wrapperEl, rtlTranslate } = swiper;
2533
+  swiper.previousTranslate = swiper.translate;
2534
+  if (swiper.isHorizontal()) {
2535
+    if (rtlTranslate) {
2536
+      swiper.translate = ((wrapperEl.scrollWidth - wrapperEl.offsetWidth) - wrapperEl.scrollLeft);
2537
+    } else {
2538
+      swiper.translate = -wrapperEl.scrollLeft;
2539
+    }
2540
+  } else {
2541
+    swiper.translate = -wrapperEl.scrollTop;
2542
+  }
2543
+  // eslint-disable-next-line
2544
+  if (swiper.translate === -0) swiper.translate = 0;
2545
+
2546
+  swiper.updateActiveIndex();
2547
+  swiper.updateSlidesClasses();
2548
+
2549
+  let newProgress;
2550
+  const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
2551
+  if (translatesDiff === 0) {
2552
+    newProgress = 0;
2553
+  } else {
2554
+    newProgress = (swiper.translate - swiper.minTranslate()) / (translatesDiff);
2555
+  }
2556
+  if (newProgress !== swiper.progress) {
2557
+    swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);
2558
+  }
2559
+
2560
+  swiper.emit('setTranslate', swiper.translate, false);
2561
+}
2562
+
2563
+let dummyEventAttached = false;
2564
+function dummyEventListener() {}
2565
+
2566
+function attachEvents() {
2567
+  const swiper = this;
2568
+  const {
2569
+    params, touchEvents, el, wrapperEl,
2570
+  } = swiper;
2571
+
2572
+  swiper.onTouchStart = onTouchStart.bind(swiper);
2573
+  swiper.onTouchMove = onTouchMove.bind(swiper);
2574
+  swiper.onTouchEnd = onTouchEnd.bind(swiper);
2575
+  if (params.cssMode) {
2576
+    swiper.onScroll = onScroll.bind(swiper);
2577
+  }
2578
+
2579
+  swiper.onClick = onClick.bind(swiper);
2580
+
2581
+  const capture = !!params.nested;
2582
+
2583
+  // Touch Events
2584
+  if (!Support.touch && Support.pointerEvents) {
2585
+    el.addEventListener(touchEvents.start, swiper.onTouchStart, false);
2586
+    document$1.addEventListener(touchEvents.move, swiper.onTouchMove, capture);
2587
+    document$1.addEventListener(touchEvents.end, swiper.onTouchEnd, false);
2588
+  } else {
2589
+    if (Support.touch) {
2590
+      const passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
2591
+      el.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
2592
+      el.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture } : capture);
2593
+      el.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
2594
+      if (touchEvents.cancel) {
2595
+        el.addEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener);
2596
+      }
2597
+      if (!dummyEventAttached) {
2598
+        document$1.addEventListener('touchstart', dummyEventListener);
2599
+        dummyEventAttached = true;
2600
+      }
2601
+    }
2602
+    if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
2603
+      el.addEventListener('mousedown', swiper.onTouchStart, false);
2604
+      document$1.addEventListener('mousemove', swiper.onTouchMove, capture);
2605
+      document$1.addEventListener('mouseup', swiper.onTouchEnd, false);
2606
+    }
2607
+  }
2608
+  // Prevent Links Clicks
2609
+  if (params.preventClicks || params.preventClicksPropagation) {
2610
+    el.addEventListener('click', swiper.onClick, true);
2611
+  }
2612
+  if (params.cssMode) {
2613
+    wrapperEl.addEventListener('scroll', swiper.onScroll);
2614
+  }
2615
+
2616
+  // Resize handler
2617
+  if (params.updateOnWindowResize) {
2618
+    swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true);
2619
+  } else {
2620
+    swiper.on('observerUpdate', onResize, true);
2621
+  }
2622
+}
2623
+
2624
+function detachEvents() {
2625
+  const swiper = this;
2626
+
2627
+  const {
2628
+    params, touchEvents, el, wrapperEl,
2629
+  } = swiper;
2630
+
2631
+  const capture = !!params.nested;
2632
+
2633
+  // Touch Events
2634
+  if (!Support.touch && Support.pointerEvents) {
2635
+    el.removeEventListener(touchEvents.start, swiper.onTouchStart, false);
2636
+    document$1.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
2637
+    document$1.removeEventListener(touchEvents.end, swiper.onTouchEnd, false);
2638
+  } else {
2639
+    if (Support.touch) {
2640
+      const passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
2641
+      el.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
2642
+      el.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
2643
+      el.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
2644
+      if (touchEvents.cancel) {
2645
+        el.removeEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener);
2646
+      }
2647
+    }
2648
+    if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
2649
+      el.removeEventListener('mousedown', swiper.onTouchStart, false);
2650
+      document$1.removeEventListener('mousemove', swiper.onTouchMove, capture);
2651
+      document$1.removeEventListener('mouseup', swiper.onTouchEnd, false);
2652
+    }
2653
+  }
2654
+  // Prevent Links Clicks
2655
+  if (params.preventClicks || params.preventClicksPropagation) {
2656
+    el.removeEventListener('click', swiper.onClick, true);
2657
+  }
2658
+
2659
+  if (params.cssMode) {
2660
+    wrapperEl.removeEventListener('scroll', swiper.onScroll);
2661
+  }
2662
+
2663
+  // Resize handler
2664
+  swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize);
2665
+}
2666
+
2667
+var events = {
2668
+  attachEvents,
2669
+  detachEvents,
2670
+};
2671
+
2672
+function setBreakpoint () {
2673
+  const swiper = this;
2674
+  const {
2675
+    activeIndex, initialized, loopedSlides = 0, params, $el,
2676
+  } = swiper;
2677
+  const breakpoints = params.breakpoints;
2678
+  if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) return;
2679
+
2680
+  // Get breakpoint for window width and update parameters
2681
+  const breakpoint = swiper.getBreakpoint(breakpoints);
2682
+
2683
+  if (breakpoint && swiper.currentBreakpoint !== breakpoint) {
2684
+    const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
2685
+    if (breakpointOnlyParams) {
2686
+      ['slidesPerView', 'spaceBetween', 'slidesPerGroup', 'slidesPerGroupSkip', 'slidesPerColumn'].forEach((param) => {
2687
+        const paramValue = breakpointOnlyParams[param];
2688
+        if (typeof paramValue === 'undefined') return;
2689
+        if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) {
2690
+          breakpointOnlyParams[param] = 'auto';
2691
+        } else if (param === 'slidesPerView') {
2692
+          breakpointOnlyParams[param] = parseFloat(paramValue);
2693
+        } else {
2694
+          breakpointOnlyParams[param] = parseInt(paramValue, 10);
2695
+        }
2696
+      });
2697
+    }
2698
+
2699
+    const breakpointParams = breakpointOnlyParams || swiper.originalParams;
2700
+    const wasMultiRow = params.slidesPerColumn > 1;
2701
+    const isMultiRow = breakpointParams.slidesPerColumn > 1;
2702
+    if (wasMultiRow && !isMultiRow) {
2703
+      $el.removeClass(`${params.containerModifierClass}multirow ${params.containerModifierClass}multirow-column`);
2704
+    } else if (!wasMultiRow && isMultiRow) {
2705
+      $el.addClass(`${params.containerModifierClass}multirow`);
2706
+      if (breakpointParams.slidesPerColumnFill === 'column') {
2707
+        $el.addClass(`${params.containerModifierClass}multirow-column`);
2708
+      }
2709
+    }
2710
+
2711
+    const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;
2712
+    const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);
2713
+
2714
+    if (directionChanged && initialized) {
2715
+      swiper.changeDirection();
2716
+    }
2717
+
2718
+    Utils.extend(swiper.params, breakpointParams);
2719
+
2720
+    Utils.extend(swiper, {
2721
+      allowTouchMove: swiper.params.allowTouchMove,
2722
+      allowSlideNext: swiper.params.allowSlideNext,
2723
+      allowSlidePrev: swiper.params.allowSlidePrev,
2724
+    });
2725
+
2726
+    swiper.currentBreakpoint = breakpoint;
2727
+
2728
+    if (needsReLoop && initialized) {
2729
+      swiper.loopDestroy();
2730
+      swiper.loopCreate();
2731
+      swiper.updateSlides();
2732
+      swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false);
2733
+    }
2734
+
2735
+    swiper.emit('breakpoint', breakpointParams);
2736
+  }
2737
+}
2738
+
2739
+function getBreakpoint (breakpoints) {
2740
+  // Get breakpoint for window width
2741
+  if (!breakpoints) return undefined;
2742
+  let breakpoint = false;
2743
+
2744
+  const points = Object.keys(breakpoints).map((point) => {
2745
+    if (typeof point === 'string' && point.indexOf('@') === 0) {
2746
+      const minRatio = parseFloat(point.substr(1));
2747
+      const value = window.innerHeight * minRatio;
2748
+      return { value, point };
2749
+    }
2750
+    return { value: point, point };
2751
+  });
2752
+
2753
+  points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));
2754
+  for (let i = 0; i < points.length; i += 1) {
2755
+    const { point, value } = points[i];
2756
+    if (value <= window.innerWidth) {
2757
+      breakpoint = point;
2758
+    }
2759
+  }
2760
+  return breakpoint || 'max';
2761
+}
2762
+
2763
+var breakpoints = { setBreakpoint, getBreakpoint };
2764
+
2765
+function addClasses () {
2766
+  const swiper = this;
2767
+  const {
2768
+    classNames, params, rtl, $el,
2769
+  } = swiper;
2770
+  const suffixes = [];
2771
+
2772
+  suffixes.push('initialized');
2773
+  suffixes.push(params.direction);
2774
+
2775
+  if (params.freeMode) {
2776
+    suffixes.push('free-mode');
2777
+  }
2778
+  if (params.autoHeight) {
2779
+    suffixes.push('autoheight');
2780
+  }
2781
+  if (rtl) {
2782
+    suffixes.push('rtl');
2783
+  }
2784
+  if (params.slidesPerColumn > 1) {
2785
+    suffixes.push('multirow');
2786
+    if (params.slidesPerColumnFill === 'column') {
2787
+      suffixes.push('multirow-column');
2788
+    }
2789
+  }
2790
+  if (Device.android) {
2791
+    suffixes.push('android');
2792
+  }
2793
+  if (Device.ios) {
2794
+    suffixes.push('ios');
2795
+  }
2796
+
2797
+  if (params.cssMode) {
2798
+    suffixes.push('css-mode');
2799
+  }
2800
+
2801
+  suffixes.forEach((suffix) => {
2802
+    classNames.push(params.containerModifierClass + suffix);
2803
+  });
2804
+
2805
+  $el.addClass(classNames.join(' '));
2806
+}
2807
+
2808
+function removeClasses () {
2809
+  const swiper = this;
2810
+  const { $el, classNames } = swiper;
2811
+
2812
+  $el.removeClass(classNames.join(' '));
2813
+}
2814
+
2815
+var classes = { addClasses, removeClasses };
2816
+
2817
+function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) {
2818
+  let image;
2819
+  function onReady() {
2820
+    if (callback) callback();
2821
+  }
2822
+  const isPicture = $(imageEl).parent('picture')[0];
2823
+
2824
+  if (!isPicture && (!imageEl.complete || !checkForComplete)) {
2825
+    if (src) {
2826
+      image = new window.Image();
2827
+      image.onload = onReady;
2828
+      image.onerror = onReady;
2829
+      if (sizes) {
2830
+        image.sizes = sizes;
2831
+      }
2832
+      if (srcset) {
2833
+        image.srcset = srcset;
2834
+      }
2835
+      if (src) {
2836
+        image.src = src;
2837
+      }
2838
+    } else {
2839
+      onReady();
2840
+    }
2841
+  } else {
2842
+    // image already loaded...
2843
+    onReady();
2844
+  }
2845
+}
2846
+
2847
+function preloadImages () {
2848
+  const swiper = this;
2849
+  swiper.imagesToLoad = swiper.$el.find('img');
2850
+  function onReady() {
2851
+    if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;
2852
+    if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;
2853
+    if (swiper.imagesLoaded === swiper.imagesToLoad.length) {
2854
+      if (swiper.params.updateOnImagesReady) swiper.update();
2855
+      swiper.emit('imagesReady');
2856
+    }
2857
+  }
2858
+  for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {
2859
+    const imageEl = swiper.imagesToLoad[i];
2860
+    swiper.loadImage(
2861
+      imageEl,
2862
+      imageEl.currentSrc || imageEl.getAttribute('src'),
2863
+      imageEl.srcset || imageEl.getAttribute('srcset'),
2864
+      imageEl.sizes || imageEl.getAttribute('sizes'),
2865
+      true,
2866
+      onReady
2867
+    );
2868
+  }
2869
+}
2870
+
2871
+var images = {
2872
+  loadImage,
2873
+  preloadImages,
2874
+};
2875
+
2876
+function checkOverflow() {
2877
+  const swiper = this;
2878
+  const params = swiper.params;
2879
+  const wasLocked = swiper.isLocked;
2880
+  const lastSlidePosition = swiper.slides.length > 0 && (params.slidesOffsetBefore + (params.spaceBetween * (swiper.slides.length - 1)) + ((swiper.slides[0]).offsetWidth) * swiper.slides.length);
2881
+
2882
+  if (params.slidesOffsetBefore && params.slidesOffsetAfter && lastSlidePosition) {
2883
+    swiper.isLocked = lastSlidePosition <= swiper.size;
2884
+  } else {
2885
+    swiper.isLocked = swiper.snapGrid.length === 1;
2886
+  }
2887
+
2888
+  swiper.allowSlideNext = !swiper.isLocked;
2889
+  swiper.allowSlidePrev = !swiper.isLocked;
2890
+
2891
+  // events
2892
+  if (wasLocked !== swiper.isLocked) swiper.emit(swiper.isLocked ? 'lock' : 'unlock');
2893
+
2894
+  if (wasLocked && wasLocked !== swiper.isLocked) {
2895
+    swiper.isEnd = false;
2896
+    swiper.navigation.update();
2897
+  }
2898
+}
2899
+
2900
+var checkOverflow$1 = { checkOverflow };
2901
+
2902
+var defaults = {
2903
+  init: true,
2904
+  direction: 'horizontal',
2905
+  touchEventsTarget: 'container',
2906
+  initialSlide: 0,
2907
+  speed: 300,
2908
+  cssMode: false,
2909
+  updateOnWindowResize: true,
2910
+  //
2911
+  preventInteractionOnTransition: false,
2912
+
2913
+  // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
2914
+  edgeSwipeDetection: false,
2915
+  edgeSwipeThreshold: 20,
2916
+
2917
+  // Free mode
2918
+  freeMode: false,
2919
+  freeModeMomentum: true,
2920
+  freeModeMomentumRatio: 1,
2921
+  freeModeMomentumBounce: true,
2922
+  freeModeMomentumBounceRatio: 1,
2923
+  freeModeMomentumVelocityRatio: 1,
2924
+  freeModeSticky: false,
2925
+  freeModeMinimumVelocity: 0.02,
2926
+
2927
+  // Autoheight
2928
+  autoHeight: false,
2929
+
2930
+  // Set wrapper width
2931
+  setWrapperSize: false,
2932
+
2933
+  // Virtual Translate
2934
+  virtualTranslate: false,
2935
+
2936
+  // Effects
2937
+  effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
2938
+
2939
+  // Breakpoints
2940
+  breakpoints: undefined,
2941
+
2942
+  // Slides grid
2943
+  spaceBetween: 0,
2944
+  slidesPerView: 1,
2945
+  slidesPerColumn: 1,
2946
+  slidesPerColumnFill: 'column',
2947
+  slidesPerGroup: 1,
2948
+  slidesPerGroupSkip: 0,
2949
+  centeredSlides: false,
2950
+  centeredSlidesBounds: false,
2951
+  slidesOffsetBefore: 0, // in px
2952
+  slidesOffsetAfter: 0, // in px
2953
+  normalizeSlideIndex: true,
2954
+  centerInsufficientSlides: false,
2955
+
2956
+  // Disable swiper and hide navigation when container not overflow
2957
+  watchOverflow: false,
2958
+
2959
+  // Round length
2960
+  roundLengths: false,
2961
+
2962
+  // Touches
2963
+  touchRatio: 1,
2964
+  touchAngle: 45,
2965
+  simulateTouch: true,
2966
+  shortSwipes: true,
2967
+  longSwipes: true,
2968
+  longSwipesRatio: 0.5,
2969
+  longSwipesMs: 300,
2970
+  followFinger: true,
2971
+  allowTouchMove: true,
2972
+  threshold: 0,
2973
+  touchMoveStopPropagation: false,
2974
+  touchStartPreventDefault: true,
2975
+  touchStartForcePreventDefault: false,
2976
+  touchReleaseOnEdges: false,
2977
+
2978
+  // Unique Navigation Elements
2979
+  uniqueNavElements: true,
2980
+
2981
+  // Resistance
2982
+  resistance: true,
2983
+  resistanceRatio: 0.85,
2984
+
2985
+  // Progress
2986
+  watchSlidesProgress: false,
2987
+  watchSlidesVisibility: false,
2988
+
2989
+  // Cursor
2990
+  grabCursor: false,
2991
+
2992
+  // Clicks
2993
+  preventClicks: true,
2994
+  preventClicksPropagation: true,
2995
+  slideToClickedSlide: false,
2996
+
2997
+  // Images
2998
+  preloadImages: true,
2999
+  updateOnImagesReady: true,
3000
+
3001
+  // loop
3002
+  loop: false,
3003
+  loopAdditionalSlides: 0,
3004
+  loopedSlides: null,
3005
+  loopFillGroupWithBlank: false,
3006
+
3007
+  // Swiping/no swiping
3008
+  allowSlidePrev: true,
3009
+  allowSlideNext: true,
3010
+  swipeHandler: null, // '.swipe-handler',
3011
+  noSwiping: true,
3012
+  noSwipingClass: 'swiper-no-swiping',
3013
+  noSwipingSelector: null,
3014
+
3015
+  // Passive Listeners
3016
+  passiveListeners: true,
3017
+
3018
+  // NS
3019
+  containerModifierClass: 'swiper-container-', // NEW
3020
+  slideClass: 'swiper-slide',
3021
+  slideBlankClass: 'swiper-slide-invisible-blank',
3022
+  slideActiveClass: 'swiper-slide-active',
3023
+  slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
3024
+  slideVisibleClass: 'swiper-slide-visible',
3025
+  slideDuplicateClass: 'swiper-slide-duplicate',
3026
+  slideNextClass: 'swiper-slide-next',
3027
+  slideDuplicateNextClass: 'swiper-slide-duplicate-next',
3028
+  slidePrevClass: 'swiper-slide-prev',
3029
+  slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
3030
+  wrapperClass: 'swiper-wrapper',
3031
+
3032
+  // Callbacks
3033
+  runCallbacksOnInit: true,
3034
+};
3035
+
3036
+/* eslint no-param-reassign: "off" */
3037
+
3038
+const prototypes = {
3039
+  update,
3040
+  translate,
3041
+  transition,
3042
+  slide,
3043
+  loop,
3044
+  grabCursor,
3045
+  manipulation,
3046
+  events,
3047
+  breakpoints,
3048
+  checkOverflow: checkOverflow$1,
3049
+  classes,
3050
+  images,
3051
+};
3052
+
3053
+const extendedDefaults = {};
3054
+
3055
+class Swiper extends SwiperClass {
3056
+  constructor(...args) {
3057
+    let el;
3058
+    let params;
3059
+    if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {
3060
+      params = args[0];
3061
+    } else {
3062
+      [el, params] = args;
3063
+    }
3064
+    if (!params) params = {};
3065
+
3066
+    params = Utils.extend({}, params);
3067
+    if (el && !params.el) params.el = el;
3068
+
3069
+    super(params);
3070
+
3071
+    Object.keys(prototypes).forEach((prototypeGroup) => {
3072
+      Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => {
3073
+        if (!Swiper.prototype[protoMethod]) {
3074
+          Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
3075
+        }
3076
+      });
3077
+    });
3078
+
3079
+    // Swiper Instance
3080
+    const swiper = this;
3081
+    if (typeof swiper.modules === 'undefined') {
3082
+      swiper.modules = {};
3083
+    }
3084
+    Object.keys(swiper.modules).forEach((moduleName) => {
3085
+      const module = swiper.modules[moduleName];
3086
+      if (module.params) {
3087
+        const moduleParamName = Object.keys(module.params)[0];
3088
+        const moduleParams = module.params[moduleParamName];
3089
+        if (typeof moduleParams !== 'object' || moduleParams === null) return;
3090
+        if (!(moduleParamName in params && 'enabled' in moduleParams)) return;
3091
+        if (params[moduleParamName] === true) {
3092
+          params[moduleParamName] = { enabled: true };
3093
+        }
3094
+        if (
3095
+          typeof params[moduleParamName] === 'object'
3096
+          && !('enabled' in params[moduleParamName])
3097
+        ) {
3098
+          params[moduleParamName].enabled = true;
3099
+        }
3100
+        if (!params[moduleParamName]) params[moduleParamName] = { enabled: false };
3101
+      }
3102
+    });
3103
+
3104
+    // Extend defaults with modules params
3105
+    const swiperParams = Utils.extend({}, defaults);
3106
+    swiper.useModulesParams(swiperParams);
3107
+
3108
+    // Extend defaults with passed params
3109
+    swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params);
3110
+    swiper.originalParams = Utils.extend({}, swiper.params);
3111
+    swiper.passedParams = Utils.extend({}, params);
3112
+
3113
+    // Save Dom lib
3114
+    swiper.$ = $;
3115
+
3116
+    // Find el
3117
+    const $el = $(swiper.params.el);
3118
+    el = $el[0];
3119
+
3120
+    if (!el) {
3121
+      return undefined;
3122
+    }
3123
+
3124
+    if ($el.length > 1) {
3125
+      const swipers = [];
3126
+      $el.each((index, containerEl) => {
3127
+        const newParams = Utils.extend({}, params, { el: containerEl });
3128
+        swipers.push(new Swiper(newParams));
3129
+      });
3130
+      return swipers;
3131
+    }
3132
+
3133
+    el.swiper = swiper;
3134
+    $el.data('swiper', swiper);
3135
+
3136
+    // Find Wrapper
3137
+    let $wrapperEl;
3138
+    if (el && el.shadowRoot && el.shadowRoot.querySelector) {
3139
+      $wrapperEl = $(el.shadowRoot.querySelector(`.${swiper.params.wrapperClass}`));
3140
+      // Children needs to return slot items
3141
+      $wrapperEl.children = (options) => $el.children(options);
3142
+    } else {
3143
+      $wrapperEl = $el.children(`.${swiper.params.wrapperClass}`);
3144
+    }
3145
+    // Extend Swiper
3146
+    Utils.extend(swiper, {
3147
+      $el,
3148
+      el,
3149
+      $wrapperEl,
3150
+      wrapperEl: $wrapperEl[0],
3151
+
3152
+      // Classes
3153
+      classNames: [],
3154
+
3155
+      // Slides
3156
+      slides: $(),
3157
+      slidesGrid: [],
3158
+      snapGrid: [],
3159
+      slidesSizesGrid: [],
3160
+
3161
+      // isDirection
3162
+      isHorizontal() {
3163
+        return swiper.params.direction === 'horizontal';
3164
+      },
3165
+      isVertical() {
3166
+        return swiper.params.direction === 'vertical';
3167
+      },
3168
+      // RTL
3169
+      rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
3170
+      rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
3171
+      wrongRTL: $wrapperEl.css('display') === '-webkit-box',
3172
+
3173
+      // Indexes
3174
+      activeIndex: 0,
3175
+      realIndex: 0,
3176
+
3177
+      //
3178
+      isBeginning: true,
3179
+      isEnd: false,
3180
+
3181
+      // Props
3182
+      translate: 0,
3183
+      previousTranslate: 0,
3184
+      progress: 0,
3185
+      velocity: 0,
3186
+      animating: false,
3187
+
3188
+      // Locks
3189
+      allowSlideNext: swiper.params.allowSlideNext,
3190
+      allowSlidePrev: swiper.params.allowSlidePrev,
3191
+
3192
+      // Touch Events
3193
+      touchEvents: (function touchEvents() {
3194
+        const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];
3195
+        let desktop = ['mousedown', 'mousemove', 'mouseup'];
3196
+        if (Support.pointerEvents) {
3197
+          desktop = ['pointerdown', 'pointermove', 'pointerup'];
3198
+        }
3199
+        swiper.touchEventsTouch = {
3200
+          start: touch[0],
3201
+          move: touch[1],
3202
+          end: touch[2],
3203
+          cancel: touch[3],
3204
+        };
3205
+        swiper.touchEventsDesktop = {
3206
+          start: desktop[0],
3207
+          move: desktop[1],
3208
+          end: desktop[2],
3209
+        };
3210
+        return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;
3211
+      }()),
3212
+      touchEventsData: {
3213
+        isTouched: undefined,
3214
+        isMoved: undefined,
3215
+        allowTouchCallbacks: undefined,
3216
+        touchStartTime: undefined,
3217
+        isScrolling: undefined,
3218
+        currentTranslate: undefined,
3219
+        startTranslate: undefined,
3220
+        allowThresholdMove: undefined,
3221
+        // Form elements to match
3222
+        formElements: 'input, select, option, textarea, button, video, label',
3223
+        // Last click time
3224
+        lastClickTime: Utils.now(),
3225
+        clickTimeout: undefined,
3226
+        // Velocities
3227
+        velocities: [],
3228
+        allowMomentumBounce: undefined,
3229
+        isTouchEvent: undefined,
3230
+        startMoving: undefined,
3231
+      },
3232
+
3233
+      // Clicks
3234
+      allowClick: true,
3235
+
3236
+      // Touches
3237
+      allowTouchMove: swiper.params.allowTouchMove,
3238
+
3239
+      touches: {
3240
+        startX: 0,
3241
+        startY: 0,
3242
+        currentX: 0,
3243
+        currentY: 0,
3244
+        diff: 0,
3245
+      },
3246
+
3247
+      // Images
3248
+      imagesToLoad: [],
3249
+      imagesLoaded: 0,
3250
+
3251
+    });
3252
+
3253
+    // Install Modules
3254
+    swiper.useModules();
3255
+
3256
+    // Init
3257
+    if (swiper.params.init) {
3258
+      swiper.init();
3259
+    }
3260
+
3261
+    // Return app instance
3262
+    return swiper;
3263
+  }
3264
+
3265
+  slidesPerViewDynamic() {
3266
+    const swiper = this;
3267
+    const {
3268
+      params, slides, slidesGrid, size: swiperSize, activeIndex,
3269
+    } = swiper;
3270
+    let spv = 1;
3271
+    if (params.centeredSlides) {
3272
+      let slideSize = slides[activeIndex].swiperSlideSize;
3273
+      let breakLoop;
3274
+      for (let i = activeIndex + 1; i < slides.length; i += 1) {
3275
+        if (slides[i] && !breakLoop) {
3276
+          slideSize += slides[i].swiperSlideSize;
3277
+          spv += 1;
3278
+          if (slideSize > swiperSize) breakLoop = true;
3279
+        }
3280
+      }
3281
+      for (let i = activeIndex - 1; i >= 0; i -= 1) {
3282
+        if (slides[i] && !breakLoop) {
3283
+          slideSize += slides[i].swiperSlideSize;
3284
+          spv += 1;
3285
+          if (slideSize > swiperSize) breakLoop = true;
3286
+        }
3287
+      }
3288
+    } else {
3289
+      for (let i = activeIndex + 1; i < slides.length; i += 1) {
3290
+        if (slidesGrid[i] - slidesGrid[activeIndex] < swiperSize) {
3291
+          spv += 1;
3292
+        }
3293
+      }
3294
+    }
3295
+    return spv;
3296
+  }
3297
+
3298
+  update() {
3299
+    const swiper = this;
3300
+    if (!swiper || swiper.destroyed) return;
3301
+    const { snapGrid, params } = swiper;
3302
+    // Breakpoints
3303
+    if (params.breakpoints) {
3304
+      swiper.setBreakpoint();
3305
+    }
3306
+    swiper.updateSize();
3307
+    swiper.updateSlides();
3308
+    swiper.updateProgress();
3309
+    swiper.updateSlidesClasses();
3310
+
3311
+    function setTranslate() {
3312
+      const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
3313
+      const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
3314
+      swiper.setTranslate(newTranslate);
3315
+      swiper.updateActiveIndex();
3316
+      swiper.updateSlidesClasses();
3317
+    }
3318
+    let translated;
3319
+    if (swiper.params.freeMode) {
3320
+      setTranslate();
3321
+      if (swiper.params.autoHeight) {
3322
+        swiper.updateAutoHeight();
3323
+      }
3324
+    } else {
3325
+      if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
3326
+        translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);
3327
+      } else {
3328
+        translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
3329
+      }
3330
+      if (!translated) {
3331
+        setTranslate();
3332
+      }
3333
+    }
3334
+    if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
3335
+      swiper.checkOverflow();
3336
+    }
3337
+    swiper.emit('update');
3338
+  }
3339
+
3340
+  changeDirection(newDirection, needUpdate = true) {
3341
+    const swiper = this;
3342
+    const currentDirection = swiper.params.direction;
3343
+    if (!newDirection) {
3344
+      // eslint-disable-next-line
3345
+      newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';
3346
+    }
3347
+    if ((newDirection === currentDirection) || (newDirection !== 'horizontal' && newDirection !== 'vertical')) {
3348
+      return swiper;
3349
+    }
3350
+
3351
+    swiper.$el
3352
+      .removeClass(`${swiper.params.containerModifierClass}${currentDirection}`)
3353
+      .addClass(`${swiper.params.containerModifierClass}${newDirection}`);
3354
+
3355
+    swiper.params.direction = newDirection;
3356
+
3357
+    swiper.slides.each((slideIndex, slideEl) => {
3358
+      if (newDirection === 'vertical') {
3359
+        slideEl.style.width = '';
3360
+      } else {
3361
+        slideEl.style.height = '';
3362
+      }
3363
+    });
3364
+
3365
+    swiper.emit('changeDirection');
3366
+    if (needUpdate) swiper.update();
3367
+
3368
+    return swiper;
3369
+  }
3370
+
3371
+  init() {
3372
+    const swiper = this;
3373
+    if (swiper.initialized) return;
3374
+
3375
+    swiper.emit('beforeInit');
3376
+
3377
+    // Set breakpoint
3378
+    if (swiper.params.breakpoints) {
3379
+      swiper.setBreakpoint();
3380
+    }
3381
+
3382
+    // Add Classes
3383
+    swiper.addClasses();
3384
+
3385
+    // Create loop
3386
+    if (swiper.params.loop) {
3387
+      swiper.loopCreate();
3388
+    }
3389
+
3390
+    // Update size
3391
+    swiper.updateSize();
3392
+
3393
+    // Update slides
3394
+    swiper.updateSlides();
3395
+
3396
+    if (swiper.params.watchOverflow) {
3397
+      swiper.checkOverflow();
3398
+    }
3399
+
3400
+    // Set Grab Cursor
3401
+    if (swiper.params.grabCursor) {
3402
+      swiper.setGrabCursor();
3403
+    }
3404
+
3405
+    if (swiper.params.preloadImages) {
3406
+      swiper.preloadImages();
3407
+    }
3408
+
3409
+    // Slide To Initial Slide
3410
+    if (swiper.params.loop) {
3411
+      swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);
3412
+    } else {
3413
+      swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);
3414
+    }
3415
+
3416
+    // Attach events
3417
+    swiper.attachEvents();
3418
+
3419
+    // Init Flag
3420
+    swiper.initialized = true;
3421
+
3422
+    // Emit
3423
+    swiper.emit('init');
3424
+  }
3425
+
3426
+  destroy(deleteInstance = true, cleanStyles = true) {
3427
+    const swiper = this;
3428
+    const {
3429
+      params, $el, $wrapperEl, slides,
3430
+    } = swiper;
3431
+
3432
+    if (typeof swiper.params === 'undefined' || swiper.destroyed) {
3433
+      return null;
3434
+    }
3435
+
3436
+    swiper.emit('beforeDestroy');
3437
+
3438
+    // Init Flag
3439
+    swiper.initialized = false;
3440
+
3441
+    // Detach events
3442
+    swiper.detachEvents();
3443
+
3444
+    // Destroy loop
3445
+    if (params.loop) {
3446
+      swiper.loopDestroy();
3447
+    }
3448
+
3449
+    // Cleanup styles
3450
+    if (cleanStyles) {
3451
+      swiper.removeClasses();
3452
+      $el.removeAttr('style');
3453
+      $wrapperEl.removeAttr('style');
3454
+      if (slides && slides.length) {
3455
+        slides
3456
+          .removeClass([
3457
+            params.slideVisibleClass,
3458
+            params.slideActiveClass,
3459
+            params.slideNextClass,
3460
+            params.slidePrevClass,
3461
+          ].join(' '))
3462
+          .removeAttr('style')
3463
+          .removeAttr('data-swiper-slide-index');
3464
+      }
3465
+    }
3466
+
3467
+    swiper.emit('destroy');
3468
+
3469
+    // Detach emitter events
3470
+    Object.keys(swiper.eventsListeners).forEach((eventName) => {
3471
+      swiper.off(eventName);
3472
+    });
3473
+
3474
+    if (deleteInstance !== false) {
3475
+      swiper.$el[0].swiper = null;
3476
+      swiper.$el.data('swiper', null);
3477
+      Utils.deleteProps(swiper);
3478
+    }
3479
+    swiper.destroyed = true;
3480
+
3481
+    return null;
3482
+  }
3483
+
3484
+  static extendDefaults(newDefaults) {
3485
+    Utils.extend(extendedDefaults, newDefaults);
3486
+  }
3487
+
3488
+  static get extendedDefaults() {
3489
+    return extendedDefaults;
3490
+  }
3491
+
3492
+  static get defaults() {
3493
+    return defaults;
3494
+  }
3495
+
3496
+  static get Class() {
3497
+    return SwiperClass;
3498
+  }
3499
+
3500
+  static get $() {
3501
+    return $;
3502
+  }
3503
+}
3504
+
3505
+var Device$1 = {
3506
+  name: 'device',
3507
+  proto: {
3508
+    device: Device,
3509
+  },
3510
+  static: {
3511
+    device: Device,
3512
+  },
3513
+};
3514
+
3515
+var Support$1 = {
3516
+  name: 'support',
3517
+  proto: {
3518
+    support: Support,
3519
+  },
3520
+  static: {
3521
+    support: Support,
3522
+  },
3523
+};
3524
+
3525
+const Browser = (function Browser() {
3526
+  function isSafari() {
3527
+    const ua = window.navigator.userAgent.toLowerCase();
3528
+    return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
3529
+  }
3530
+  return {
3531
+    isEdge: !!window.navigator.userAgent.match(/Edge/g),
3532
+    isSafari: isSafari(),
3533
+    isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),
3534
+  };
3535
+}());
3536
+
3537
+var Browser$1 = {
3538
+  name: 'browser',
3539
+  proto: {
3540
+    browser: Browser,
3541
+  },
3542
+  static: {
3543
+    browser: Browser,
3544
+  },
3545
+};
3546
+
3547
+var Resize = {
3548
+  name: 'resize',
3549
+  create() {
3550
+    const swiper = this;
3551
+    Utils.extend(swiper, {
3552
+      resize: {
3553
+        resizeHandler() {
3554
+          if (!swiper || swiper.destroyed || !swiper.initialized) return;
3555
+          swiper.emit('beforeResize');
3556
+          swiper.emit('resize');
3557
+        },
3558
+        orientationChangeHandler() {
3559
+          if (!swiper || swiper.destroyed || !swiper.initialized) return;
3560
+          swiper.emit('orientationchange');
3561
+        },
3562
+      },
3563
+    });
3564
+  },
3565
+  on: {
3566
+    init() {
3567
+      const swiper = this;
3568
+      // Emit resize
3569
+      window.addEventListener('resize', swiper.resize.resizeHandler);
3570
+
3571
+      // Emit orientationchange
3572
+      window.addEventListener('orientationchange', swiper.resize.orientationChangeHandler);
3573
+    },
3574
+    destroy() {
3575
+      const swiper = this;
3576
+      window.removeEventListener('resize', swiper.resize.resizeHandler);
3577
+      window.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);
3578
+    },
3579
+  },
3580
+};
3581
+
3582
+const Observer = {
3583
+  func: window.MutationObserver || window.WebkitMutationObserver,
3584
+  attach(target, options = {}) {
3585
+    const swiper = this;
3586
+
3587
+    const ObserverFunc = Observer.func;
3588
+    const observer = new ObserverFunc((mutations) => {
3589
+      // The observerUpdate event should only be triggered
3590
+      // once despite the number of mutations.  Additional
3591
+      // triggers are redundant and are very costly
3592
+      if (mutations.length === 1) {
3593
+        swiper.emit('observerUpdate', mutations[0]);
3594
+        return;
3595
+      }
3596
+      const observerUpdate = function observerUpdate() {
3597
+        swiper.emit('observerUpdate', mutations[0]);
3598
+      };
3599
+
3600
+      if (window.requestAnimationFrame) {
3601
+        window.requestAnimationFrame(observerUpdate);
3602
+      } else {
3603
+        window.setTimeout(observerUpdate, 0);
3604
+      }
3605
+    });
3606
+
3607
+    observer.observe(target, {
3608
+      attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
3609
+      childList: typeof options.childList === 'undefined' ? true : options.childList,
3610
+      characterData: typeof options.characterData === 'undefined' ? true : options.characterData,
3611
+    });
3612
+
3613
+    swiper.observer.observers.push(observer);
3614
+  },
3615
+  init() {
3616
+    const swiper = this;
3617
+    if (!Support.observer || !swiper.params.observer) return;
3618
+    if (swiper.params.observeParents) {
3619
+      const containerParents = swiper.$el.parents();
3620
+      for (let i = 0; i < containerParents.length; i += 1) {
3621
+        swiper.observer.attach(containerParents[i]);
3622
+      }
3623
+    }
3624
+    // Observe container
3625
+    swiper.observer.attach(swiper.$el[0], { childList: swiper.params.observeSlideChildren });
3626
+
3627
+    // Observe wrapper
3628
+    swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });
3629
+  },
3630
+  destroy() {
3631
+    const swiper = this;
3632
+    swiper.observer.observers.forEach((observer) => {
3633
+      observer.disconnect();
3634
+    });
3635
+    swiper.observer.observers = [];
3636
+  },
3637
+};
3638
+
3639
+var Observer$1 = {
3640
+  name: 'observer',
3641
+  params: {
3642
+    observer: false,
3643
+    observeParents: false,
3644
+    observeSlideChildren: false,
3645
+  },
3646
+  create() {
3647
+    const swiper = this;
3648
+    Utils.extend(swiper, {
3649
+      observer: {
3650
+        init: Observer.init.bind(swiper),
3651
+        attach: Observer.attach.bind(swiper),
3652
+        destroy: Observer.destroy.bind(swiper),
3653
+        observers: [],
3654
+      },
3655
+    });
3656
+  },
3657
+  on: {
3658
+    init() {
3659
+      const swiper = this;
3660
+      swiper.observer.init();
3661
+    },
3662
+    destroy() {
3663
+      const swiper = this;
3664
+      swiper.observer.destroy();
3665
+    },
3666
+  },
3667
+};
3668
+
3669
+const Virtual = {
3670
+  update(force) {
3671
+    const swiper = this;
3672
+    const { slidesPerView, slidesPerGroup, centeredSlides } = swiper.params;
3673
+    const { addSlidesBefore, addSlidesAfter } = swiper.params.virtual;
3674
+    const {
3675
+      from: previousFrom,
3676
+      to: previousTo,
3677
+      slides,
3678
+      slidesGrid: previousSlidesGrid,
3679
+      renderSlide,
3680
+      offset: previousOffset,
3681
+    } = swiper.virtual;
3682
+    swiper.updateActiveIndex();
3683
+    const activeIndex = swiper.activeIndex || 0;
3684
+
3685
+    let offsetProp;
3686
+    if (swiper.rtlTranslate) offsetProp = 'right';
3687
+    else offsetProp = swiper.isHorizontal() ? 'left' : 'top';
3688
+
3689
+    let slidesAfter;
3690
+    let slidesBefore;
3691
+    if (centeredSlides) {
3692
+      slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;
3693
+      slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;
3694
+    } else {
3695
+      slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesBefore;
3696
+      slidesBefore = slidesPerGroup + addSlidesAfter;
3697
+    }
3698
+    const from = Math.max((activeIndex || 0) - slidesBefore, 0);
3699
+    const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);
3700
+    const offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);
3701
+
3702
+    Utils.extend(swiper.virtual, {
3703
+      from,
3704
+      to,
3705
+      offset,
3706
+      slidesGrid: swiper.slidesGrid,
3707
+    });
3708
+
3709
+    function onRendered() {
3710
+      swiper.updateSlides();
3711
+      swiper.updateProgress();
3712
+      swiper.updateSlidesClasses();
3713
+      if (swiper.lazy && swiper.params.lazy.enabled) {
3714
+        swiper.lazy.load();
3715
+      }
3716
+    }
3717
+
3718
+    if (previousFrom === from && previousTo === to && !force) {
3719
+      if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {
3720
+        swiper.slides.css(offsetProp, `${offset}px`);
3721
+      }
3722
+      swiper.updateProgress();
3723
+      return;
3724
+    }
3725
+    if (swiper.params.virtual.renderExternal) {
3726
+      swiper.params.virtual.renderExternal.call(swiper, {
3727
+        offset,
3728
+        from,
3729
+        to,
3730
+        slides: (function getSlides() {
3731
+          const slidesToRender = [];
3732
+          for (let i = from; i <= to; i += 1) {
3733
+            slidesToRender.push(slides[i]);
3734
+          }
3735
+          return slidesToRender;
3736
+        }()),
3737
+      });
3738
+      onRendered();
3739
+      return;
3740
+    }
3741
+    const prependIndexes = [];
3742
+    const appendIndexes = [];
3743
+    if (force) {
3744
+      swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove();
3745
+    } else {
3746
+      for (let i = previousFrom; i <= previousTo; i += 1) {
3747
+        if (i < from || i > to) {
3748
+          swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index="${i}"]`).remove();
3749
+        }
3750
+      }
3751
+    }
3752
+    for (let i = 0; i < slides.length; i += 1) {
3753
+      if (i >= from && i <= to) {
3754
+        if (typeof previousTo === 'undefined' || force) {
3755
+          appendIndexes.push(i);
3756
+        } else {
3757
+          if (i > previousTo) appendIndexes.push(i);
3758
+          if (i < previousFrom) prependIndexes.push(i);
3759
+        }
3760
+      }
3761
+    }
3762
+    appendIndexes.forEach((index) => {
3763
+      swiper.$wrapperEl.append(renderSlide(slides[index], index));
3764
+    });
3765
+    prependIndexes.sort((a, b) => b - a).forEach((index) => {
3766
+      swiper.$wrapperEl.prepend(renderSlide(slides[index], index));
3767
+    });
3768
+    swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset}px`);
3769
+    onRendered();
3770
+  },
3771
+  renderSlide(slide, index) {
3772
+    const swiper = this;
3773
+    const params = swiper.params.virtual;
3774
+    if (params.cache && swiper.virtual.cache[index]) {
3775
+      return swiper.virtual.cache[index];
3776
+    }
3777
+    const $slideEl = params.renderSlide
3778
+      ? $(params.renderSlide.call(swiper, slide, index))
3779
+      : $(`<div class="${swiper.params.slideClass}" data-swiper-slide-index="${index}">${slide}</div>`);
3780
+    if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index);
3781
+    if (params.cache) swiper.virtual.cache[index] = $slideEl;
3782
+    return $slideEl;
3783
+  },
3784
+  appendSlide(slides) {
3785
+    const swiper = this;
3786
+    if (typeof slides === 'object' && 'length' in slides) {
3787
+      for (let i = 0; i < slides.length; i += 1) {
3788
+        if (slides[i]) swiper.virtual.slides.push(slides[i]);
3789
+      }
3790
+    } else {
3791
+      swiper.virtual.slides.push(slides);
3792
+    }
3793
+    swiper.virtual.update(true);
3794
+  },
3795
+  prependSlide(slides) {
3796
+    const swiper = this;
3797
+    const activeIndex = swiper.activeIndex;
3798
+    let newActiveIndex = activeIndex + 1;
3799
+    let numberOfNewSlides = 1;
3800
+
3801
+    if (Array.isArray(slides)) {
3802
+      for (let i = 0; i < slides.length; i += 1) {
3803
+        if (slides[i]) swiper.virtual.slides.unshift(slides[i]);
3804
+      }
3805
+      newActiveIndex = activeIndex + slides.length;
3806
+      numberOfNewSlides = slides.length;
3807
+    } else {
3808
+      swiper.virtual.slides.unshift(slides);
3809
+    }
3810
+    if (swiper.params.virtual.cache) {
3811
+      const cache = swiper.virtual.cache;
3812
+      const newCache = {};
3813
+      Object.keys(cache).forEach((cachedIndex) => {
3814
+        const $cachedEl = cache[cachedIndex];
3815
+        const cachedElIndex = $cachedEl.attr('data-swiper-slide-index');
3816
+        if (cachedElIndex) {
3817
+          $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + 1);
3818
+        }
3819
+        newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl;
3820
+      });
3821
+      swiper.virtual.cache = newCache;
3822
+    }
3823
+    swiper.virtual.update(true);
3824
+    swiper.slideTo(newActiveIndex, 0);
3825
+  },
3826
+  removeSlide(slidesIndexes) {
3827
+    const swiper = this;
3828
+    if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return;
3829
+    let activeIndex = swiper.activeIndex;
3830
+    if (Array.isArray(slidesIndexes)) {
3831
+      for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) {
3832
+        swiper.virtual.slides.splice(slidesIndexes[i], 1);
3833
+        if (swiper.params.virtual.cache) {
3834
+          delete swiper.virtual.cache[slidesIndexes[i]];
3835
+        }
3836
+        if (slidesIndexes[i] < activeIndex) activeIndex -= 1;
3837
+        activeIndex = Math.max(activeIndex, 0);
3838
+      }
3839
+    } else {
3840
+      swiper.virtual.slides.splice(slidesIndexes, 1);
3841
+      if (swiper.params.virtual.cache) {
3842
+        delete swiper.virtual.cache[slidesIndexes];
3843
+      }
3844
+      if (slidesIndexes < activeIndex) activeIndex -= 1;
3845
+      activeIndex = Math.max(activeIndex, 0);
3846
+    }
3847
+    swiper.virtual.update(true);
3848
+    swiper.slideTo(activeIndex, 0);
3849
+  },
3850
+  removeAllSlides() {
3851
+    const swiper = this;
3852
+    swiper.virtual.slides = [];
3853
+    if (swiper.params.virtual.cache) {
3854
+      swiper.virtual.cache = {};
3855
+    }
3856
+    swiper.virtual.update(true);
3857
+    swiper.slideTo(0, 0);
3858
+  },
3859
+};
3860
+
3861
+var virtual = {
3862
+  name: 'virtual',
3863
+  params: {
3864
+    virtual: {
3865
+      enabled: false,
3866
+      slides: [],
3867
+      cache: true,
3868
+      renderSlide: null,
3869
+      renderExternal: null,
3870
+      addSlidesBefore: 0,
3871
+      addSlidesAfter: 0,
3872
+    },
3873
+  },
3874
+  create() {
3875
+    const swiper = this;
3876
+    Utils.extend(swiper, {
3877
+      virtual: {
3878
+        update: Virtual.update.bind(swiper),
3879
+        appendSlide: Virtual.appendSlide.bind(swiper),
3880
+        prependSlide: Virtual.prependSlide.bind(swiper),
3881
+        removeSlide: Virtual.removeSlide.bind(swiper),
3882
+        removeAllSlides: Virtual.removeAllSlides.bind(swiper),
3883
+        renderSlide: Virtual.renderSlide.bind(swiper),
3884
+        slides: swiper.params.virtual.slides,
3885
+        cache: {},
3886
+      },
3887
+    });
3888
+  },
3889
+  on: {
3890
+    beforeInit() {
3891
+      const swiper = this;
3892
+      if (!swiper.params.virtual.enabled) return;
3893
+      swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);
3894
+      const overwriteParams = {
3895
+        watchSlidesProgress: true,
3896
+      };
3897
+      Utils.extend(swiper.params, overwriteParams);
3898
+      Utils.extend(swiper.originalParams, overwriteParams);
3899
+
3900
+      if (!swiper.params.initialSlide) {
3901
+        swiper.virtual.update();
3902
+      }
3903
+    },
3904
+    setTranslate() {
3905
+      const swiper = this;
3906
+      if (!swiper.params.virtual.enabled) return;
3907
+      swiper.virtual.update();
3908
+    },
3909
+  },
3910
+};
3911
+
3912
+const Keyboard = {
3913
+  handle(event) {
3914
+    const swiper = this;
3915
+    const { rtlTranslate: rtl } = swiper;
3916
+    let e = event;
3917
+    if (e.originalEvent) e = e.originalEvent; // jquery fix
3918
+    const kc = e.keyCode || e.charCode;
3919
+    // Directions locks
3920
+    if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40) || kc === 34)) {
3921
+      return false;
3922
+    }
3923
+    if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38) || kc === 33)) {
3924
+      return false;
3925
+    }
3926
+    if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
3927
+      return undefined;
3928
+    }
3929
+    if (document$1.activeElement && document$1.activeElement.nodeName && (document$1.activeElement.nodeName.toLowerCase() === 'input' || document$1.activeElement.nodeName.toLowerCase() === 'textarea')) {
3930
+      return undefined;
3931
+    }
3932
+    if (swiper.params.keyboard.onlyInViewport && (kc === 33 || kc === 34 || kc === 37 || kc === 39 || kc === 38 || kc === 40)) {
3933
+      let inView = false;
3934
+      // Check that swiper should be inside of visible area of window
3935
+      if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {
3936
+        return undefined;
3937
+      }
3938
+      const windowWidth = window.innerWidth;
3939
+      const windowHeight = window.innerHeight;
3940
+      const swiperOffset = swiper.$el.offset();
3941
+      if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;
3942
+      const swiperCoord = [
3943
+        [swiperOffset.left, swiperOffset.top],
3944
+        [swiperOffset.left + swiper.width, swiperOffset.top],
3945
+        [swiperOffset.left, swiperOffset.top + swiper.height],
3946
+        [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height],
3947
+      ];
3948
+      for (let i = 0; i < swiperCoord.length; i += 1) {
3949
+        const point = swiperCoord[i];
3950
+        if (
3951
+          point[0] >= 0 && point[0] <= windowWidth
3952
+          && point[1] >= 0 && point[1] <= windowHeight
3953
+        ) {
3954
+          inView = true;
3955
+        }
3956
+      }
3957
+      if (!inView) return undefined;
3958
+    }
3959
+    if (swiper.isHorizontal()) {
3960
+      if (kc === 33 || kc === 34 || kc === 37 || kc === 39) {
3961
+        if (e.preventDefault) e.preventDefault();
3962
+        else e.returnValue = false;
3963
+      }
3964
+      if (((kc === 34 || kc === 39) && !rtl) || ((kc === 33 || kc === 37) && rtl)) swiper.slideNext();
3965
+      if (((kc === 33 || kc === 37) && !rtl) || ((kc === 34 || kc === 39) && rtl)) swiper.slidePrev();
3966
+    } else {
3967
+      if (kc === 33 || kc === 34 || kc === 38 || kc === 40) {
3968
+        if (e.preventDefault) e.preventDefault();
3969
+        else e.returnValue = false;
3970
+      }
3971
+      if (kc === 34 || kc === 40) swiper.slideNext();
3972
+      if (kc === 33 || kc === 38) swiper.slidePrev();
3973
+    }
3974
+    swiper.emit('keyPress', kc);
3975
+    return undefined;
3976
+  },
3977
+  enable() {
3978
+    const swiper = this;
3979
+    if (swiper.keyboard.enabled) return;
3980
+    $(document$1).on('keydown', swiper.keyboard.handle);
3981
+    swiper.keyboard.enabled = true;
3982
+  },
3983
+  disable() {
3984
+    const swiper = this;
3985
+    if (!swiper.keyboard.enabled) return;
3986
+    $(document$1).off('keydown', swiper.keyboard.handle);
3987
+    swiper.keyboard.enabled = false;
3988
+  },
3989
+};
3990
+
3991
+var keyboard = {
3992
+  name: 'keyboard',
3993
+  params: {
3994
+    keyboard: {
3995
+      enabled: false,
3996
+      onlyInViewport: true,
3997
+    },
3998
+  },
3999
+  create() {
4000
+    const swiper = this;
4001
+    Utils.extend(swiper, {
4002
+      keyboard: {
4003
+        enabled: false,
4004
+        enable: Keyboard.enable.bind(swiper),
4005
+        disable: Keyboard.disable.bind(swiper),
4006
+        handle: Keyboard.handle.bind(swiper),
4007
+      },
4008
+    });
4009
+  },
4010
+  on: {
4011
+    init() {
4012
+      const swiper = this;
4013
+      if (swiper.params.keyboard.enabled) {
4014
+        swiper.keyboard.enable();
4015
+      }
4016
+    },
4017
+    destroy() {
4018
+      const swiper = this;
4019
+      if (swiper.keyboard.enabled) {
4020
+        swiper.keyboard.disable();
4021
+      }
4022
+    },
4023
+  },
4024
+};
4025
+
4026
+function isEventSupported() {
4027
+  const eventName = 'onwheel';
4028
+  let isSupported = eventName in document$1;
4029
+
4030
+  if (!isSupported) {
4031
+    const element = document$1.createElement('div');
4032
+    element.setAttribute(eventName, 'return;');
4033
+    isSupported = typeof element[eventName] === 'function';
4034
+  }
4035
+
4036
+  if (!isSupported
4037
+    && document$1.implementation
4038
+    && document$1.implementation.hasFeature
4039
+    // always returns true in newer browsers as per the standard.
4040
+    // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
4041
+    && document$1.implementation.hasFeature('', '') !== true
4042
+  ) {
4043
+    // This is the only way to test support for the `wheel` event in IE9+.
4044
+    isSupported = document$1.implementation.hasFeature('Events.wheel', '3.0');
4045
+  }
4046
+
4047
+  return isSupported;
4048
+}
4049
+const Mousewheel = {
4050
+  lastScrollTime: Utils.now(),
4051
+  lastEventBeforeSnap: undefined,
4052
+  recentWheelEvents: [],
4053
+  event() {
4054
+    if (window.navigator.userAgent.indexOf('firefox') > -1) return 'DOMMouseScroll';
4055
+    return isEventSupported() ? 'wheel' : 'mousewheel';
4056
+  },
4057
+  normalize(e) {
4058
+    // Reasonable defaults
4059
+    const PIXEL_STEP = 10;
4060
+    const LINE_HEIGHT = 40;
4061
+    const PAGE_HEIGHT = 800;
4062
+
4063
+    let sX = 0;
4064
+    let sY = 0; // spinX, spinY
4065
+    let pX = 0;
4066
+    let pY = 0; // pixelX, pixelY
4067
+
4068
+    // Legacy
4069
+    if ('detail' in e) {
4070
+      sY = e.detail;
4071
+    }
4072
+    if ('wheelDelta' in e) {
4073
+      sY = -e.wheelDelta / 120;
4074
+    }
4075
+    if ('wheelDeltaY' in e) {
4076
+      sY = -e.wheelDeltaY / 120;
4077
+    }
4078
+    if ('wheelDeltaX' in e) {
4079
+      sX = -e.wheelDeltaX / 120;
4080
+    }
4081
+
4082
+    // side scrolling on FF with DOMMouseScroll
4083
+    if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
4084
+      sX = sY;
4085
+      sY = 0;
4086
+    }
4087
+
4088
+    pX = sX * PIXEL_STEP;
4089
+    pY = sY * PIXEL_STEP;
4090
+
4091
+    if ('deltaY' in e) {
4092
+      pY = e.deltaY;
4093
+    }
4094
+    if ('deltaX' in e) {
4095
+      pX = e.deltaX;
4096
+    }
4097
+
4098
+    if (e.shiftKey && !pX) { // if user scrolls with shift he wants horizontal scroll
4099
+      pX = pY;
4100
+      pY = 0;
4101
+    }
4102
+
4103
+    if ((pX || pY) && e.deltaMode) {
4104
+      if (e.deltaMode === 1) { // delta in LINE units
4105
+        pX *= LINE_HEIGHT;
4106
+        pY *= LINE_HEIGHT;
4107
+      } else { // delta in PAGE units
4108
+        pX *= PAGE_HEIGHT;
4109
+        pY *= PAGE_HEIGHT;
4110
+      }
4111
+    }
4112
+
4113
+    // Fall-back if spin cannot be determined
4114
+    if (pX && !sX) {
4115
+      sX = (pX < 1) ? -1 : 1;
4116
+    }
4117
+    if (pY && !sY) {
4118
+      sY = (pY < 1) ? -1 : 1;
4119
+    }
4120
+
4121
+    return {
4122
+      spinX: sX,
4123
+      spinY: sY,
4124
+      pixelX: pX,
4125
+      pixelY: pY,
4126
+    };
4127
+  },
4128
+  handleMouseEnter() {
4129
+    const swiper = this;
4130
+    swiper.mouseEntered = true;
4131
+  },
4132
+  handleMouseLeave() {
4133
+    const swiper = this;
4134
+    swiper.mouseEntered = false;
4135
+  },
4136
+  handle(event) {
4137
+    let e = event;
4138
+    const swiper = this;
4139
+    const params = swiper.params.mousewheel;
4140
+
4141
+    if (swiper.params.cssMode) {
4142
+      e.preventDefault();
4143
+    }
4144
+
4145
+    let target = swiper.$el;
4146
+    if (swiper.params.mousewheel.eventsTarged !== 'container') {
4147
+      target = $(swiper.params.mousewheel.eventsTarged);
4148
+    }
4149
+    if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true;
4150
+
4151
+    if (e.originalEvent) e = e.originalEvent; // jquery fix
4152
+    let delta = 0;
4153
+    const rtlFactor = swiper.rtlTranslate ? -1 : 1;
4154
+
4155
+    const data = Mousewheel.normalize(e);
4156
+
4157
+    if (params.forceToAxis) {
4158
+      if (swiper.isHorizontal()) {
4159
+        if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = data.pixelX * rtlFactor;
4160
+        else return true;
4161
+      } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = data.pixelY;
4162
+      else return true;
4163
+    } else {
4164
+      delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;
4165
+    }
4166
+
4167
+    if (delta === 0) return true;
4168
+
4169
+    if (params.invert) delta = -delta;
4170
+
4171
+    if (!swiper.params.freeMode) {
4172
+      // Register the new event in a variable which stores the relevant data
4173
+      const newEvent = {
4174
+        time: Utils.now(),
4175
+        delta: Math.abs(delta),
4176
+        direction: Math.sign(delta),
4177
+        raw: event,
4178
+      };
4179
+
4180
+      // Keep the most recent events
4181
+      const recentWheelEvents = swiper.mousewheel.recentWheelEvents;
4182
+      if (recentWheelEvents.length >= 2) {
4183
+        recentWheelEvents.shift(); // only store the last N events
4184
+      }
4185
+      const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;
4186
+      recentWheelEvents.push(newEvent);
4187
+
4188
+      // If there is at least one previous recorded event:
4189
+      //   If direction has changed or
4190
+      //   if the scroll is quicker than the previous one:
4191
+      //     Animate the slider.
4192
+      // Else (this is the first time the wheel is moved):
4193
+      //     Animate the slider.
4194
+      if (prevEvent) {
4195
+        if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) {
4196
+          swiper.mousewheel.animateSlider(newEvent);
4197
+        }
4198
+      } else {
4199
+        swiper.mousewheel.animateSlider(newEvent);
4200
+      }
4201
+
4202
+      // If it's time to release the scroll:
4203
+      //   Return now so you don't hit the preventDefault.
4204
+      if (swiper.mousewheel.releaseScroll(newEvent)) {
4205
+        return true;
4206
+      }
4207
+    } else {
4208
+      // Freemode or scrollContainer:
4209
+
4210
+      // If we recently snapped after a momentum scroll, then ignore wheel events
4211
+      // to give time for the deceleration to finish. Stop ignoring after 500 msecs
4212
+      // or if it's a new scroll (larger delta or inverse sign as last event before
4213
+      // an end-of-momentum snap).
4214
+      const newEvent = { time: Utils.now(), delta: Math.abs(delta), direction: Math.sign(delta) };
4215
+      const { lastEventBeforeSnap } = swiper.mousewheel;
4216
+      const ignoreWheelEvents = lastEventBeforeSnap
4217
+        && newEvent.time < lastEventBeforeSnap.time + 500
4218
+        && newEvent.delta <= lastEventBeforeSnap.delta
4219
+        && newEvent.direction === lastEventBeforeSnap.direction;
4220
+      if (!ignoreWheelEvents) {
4221
+        swiper.mousewheel.lastEventBeforeSnap = undefined;
4222
+
4223
+        if (swiper.params.loop) {
4224
+          swiper.loopFix();
4225
+        }
4226
+        let position = swiper.getTranslate() + (delta * params.sensitivity);
4227
+        const wasBeginning = swiper.isBeginning;
4228
+        const wasEnd = swiper.isEnd;
4229
+
4230
+        if (position >= swiper.minTranslate()) position = swiper.minTranslate();
4231
+        if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();
4232
+
4233
+        swiper.setTransition(0);
4234
+        swiper.setTranslate(position);
4235
+        swiper.updateProgress();
4236
+        swiper.updateActiveIndex();
4237
+        swiper.updateSlidesClasses();
4238
+
4239
+        if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {
4240
+          swiper.updateSlidesClasses();
4241
+        }
4242
+
4243
+        if (swiper.params.freeModeSticky) {
4244
+          // When wheel scrolling starts with sticky (aka snap) enabled, then detect
4245
+          // the end of a momentum scroll by storing recent (N=15?) wheel events.
4246
+          // 1. do all N events have decreasing or same (absolute value) delta?
4247
+          // 2. did all N events arrive in the last M (M=500?) msecs?
4248
+          // 3. does the earliest event have an (absolute value) delta that's
4249
+          //    at least P (P=1?) larger than the most recent event's delta?
4250
+          // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels?
4251
+          // If 1-4 are "yes" then we're near the end of a momuntum scroll deceleration.
4252
+          // Snap immediately and ignore remaining wheel events in this scroll.
4253
+          // See comment above for "remaining wheel events in this scroll" determination.
4254
+          // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event.
4255
+          clearTimeout(swiper.mousewheel.timeout);
4256
+          swiper.mousewheel.timeout = undefined;
4257
+          const recentWheelEvents = swiper.mousewheel.recentWheelEvents;
4258
+          if (recentWheelEvents.length >= 15) {
4259
+            recentWheelEvents.shift(); // only store the last N events
4260
+          }
4261
+          const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;
4262
+          const firstEvent = recentWheelEvents[0];
4263
+          recentWheelEvents.push(newEvent);
4264
+          if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) {
4265
+            // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log.
4266
+            recentWheelEvents.splice(0);
4267
+          } else if (recentWheelEvents.length >= 15
4268
+              && newEvent.time - firstEvent.time < 500
4269
+              && firstEvent.delta - newEvent.delta >= 1
4270
+              && newEvent.delta <= 6
4271
+          ) {
4272
+            // We're at the end of the deceleration of a momentum scroll, so there's no need
4273
+            // to wait for more events. Snap ASAP on the next tick.
4274
+            // Also, because there's some remaining momentum we'll bias the snap in the
4275
+            // direction of the ongoing scroll because it's better UX for the scroll to snap
4276
+            // in the same direction as the scroll instead of reversing to snap.  Therefore,
4277
+            // if it's already scrolled more than 20% in the current direction, keep going.
4278
+            const snapToThreshold = delta > 0 ? 0.8 : 0.2;
4279
+            swiper.mousewheel.lastEventBeforeSnap = newEvent;
4280
+            recentWheelEvents.splice(0);
4281
+            swiper.mousewheel.timeout = Utils.nextTick(() => {
4282
+              swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);
4283
+            }, 0); // no delay; move on next tick
4284
+          }
4285
+          if (!swiper.mousewheel.timeout) {
4286
+            // if we get here, then we haven't detected the end of a momentum scroll, so
4287
+            // we'll consider a scroll "complete" when there haven't been any wheel events
4288
+            // for 500ms.
4289
+            swiper.mousewheel.timeout = Utils.nextTick(() => {
4290
+              const snapToThreshold = 0.5;
4291
+              swiper.mousewheel.lastEventBeforeSnap = newEvent;
4292
+              recentWheelEvents.splice(0);
4293
+              swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);
4294
+            }, 500);
4295
+          }
4296
+        }
4297
+
4298
+        // Emit event
4299
+        if (!ignoreWheelEvents) swiper.emit('scroll', e);
4300
+
4301
+        // Stop autoplay
4302
+        if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop();
4303
+        // Return page scroll on edge positions
4304
+        if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;
4305
+      }
4306
+    }
4307
+
4308
+    if (e.preventDefault) e.preventDefault();
4309
+    else e.returnValue = false;
4310
+    return false;
4311
+  },
4312
+  animateSlider(newEvent) {
4313
+    const swiper = this;
4314
+    // If the movement is NOT big enough and
4315
+    // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider):
4316
+    //   Don't go any further (avoid insignificant scroll movement).
4317
+    if (newEvent.delta >= 6 && Utils.now() - swiper.mousewheel.lastScrollTime < 60) {
4318
+      // Return false as a default
4319
+      return true;
4320
+    }
4321
+    // If user is scrolling towards the end:
4322
+    //   If the slider hasn't hit the latest slide or
4323
+    //   if the slider is a loop and
4324
+    //   if the slider isn't moving right now:
4325
+    //     Go to next slide and
4326
+    //     emit a scroll event.
4327
+    // Else (the user is scrolling towards the beginning) and
4328
+    // if the slider hasn't hit the first slide or
4329
+    // if the slider is a loop and
4330
+    // if the slider isn't moving right now:
4331
+    //   Go to prev slide and
4332
+    //   emit a scroll event.
4333
+    if (newEvent.direction < 0) {
4334
+      if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
4335
+        swiper.slideNext();
4336
+        swiper.emit('scroll', newEvent.raw);
4337
+      }
4338
+    } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
4339
+      swiper.slidePrev();
4340
+      swiper.emit('scroll', newEvent.raw);
4341
+    }
4342
+    // If you got here is because an animation has been triggered so store the current time
4343
+    swiper.mousewheel.lastScrollTime = (new window.Date()).getTime();
4344
+    // Return false as a default
4345
+    return false;
4346
+  },
4347
+  releaseScroll(newEvent) {
4348
+    const swiper = this;
4349
+    const params = swiper.params.mousewheel;
4350
+    if (newEvent.direction < 0) {
4351
+      if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) {
4352
+        // Return true to animate scroll on edges
4353
+        return true;
4354
+      }
4355
+    } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) {
4356
+      // Return true to animate scroll on edges
4357
+      return true;
4358
+    }
4359
+    return false;
4360
+  },
4361
+  enable() {
4362
+    const swiper = this;
4363
+    const event = Mousewheel.event();
4364
+    if (swiper.params.cssMode) {
4365
+      swiper.wrapperEl.removeEventListener(event, swiper.mousewheel.handle);
4366
+      return true;
4367
+    }
4368
+    if (!event) return false;
4369
+    if (swiper.mousewheel.enabled) return false;
4370
+    let target = swiper.$el;
4371
+    if (swiper.params.mousewheel.eventsTarged !== 'container') {
4372
+      target = $(swiper.params.mousewheel.eventsTarged);
4373
+    }
4374
+    target.on('mouseenter', swiper.mousewheel.handleMouseEnter);
4375
+    target.on('mouseleave', swiper.mousewheel.handleMouseLeave);
4376
+    target.on(event, swiper.mousewheel.handle);
4377
+    swiper.mousewheel.enabled = true;
4378
+    return true;
4379
+  },
4380
+  disable() {
4381
+    const swiper = this;
4382
+    const event = Mousewheel.event();
4383
+    if (swiper.params.cssMode) {
4384
+      swiper.wrapperEl.addEventListener(event, swiper.mousewheel.handle);
4385
+      return true;
4386
+    }
4387
+    if (!event) return false;
4388
+    if (!swiper.mousewheel.enabled) return false;
4389
+    let target = swiper.$el;
4390
+    if (swiper.params.mousewheel.eventsTarged !== 'container') {
4391
+      target = $(swiper.params.mousewheel.eventsTarged);
4392
+    }
4393
+    target.off(event, swiper.mousewheel.handle);
4394
+    swiper.mousewheel.enabled = false;
4395
+    return true;
4396
+  },
4397
+};
4398
+
4399
+var mousewheel = {
4400
+  name: 'mousewheel',
4401
+  params: {
4402
+    mousewheel: {
4403
+      enabled: false,
4404
+      releaseOnEdges: false,
4405
+      invert: false,
4406
+      forceToAxis: false,
4407
+      sensitivity: 1,
4408
+      eventsTarged: 'container',
4409
+    },
4410
+  },
4411
+  create() {
4412
+    const swiper = this;
4413
+    Utils.extend(swiper, {
4414
+      mousewheel: {
4415
+        enabled: false,
4416
+        enable: Mousewheel.enable.bind(swiper),
4417
+        disable: Mousewheel.disable.bind(swiper),
4418
+        handle: Mousewheel.handle.bind(swiper),
4419
+        handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper),
4420
+        handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper),
4421
+        animateSlider: Mousewheel.animateSlider.bind(swiper),
4422
+        releaseScroll: Mousewheel.releaseScroll.bind(swiper),
4423
+        lastScrollTime: Utils.now(),
4424
+        lastEventBeforeSnap: undefined,
4425
+        recentWheelEvents: [],
4426
+      },
4427
+    });
4428
+  },
4429
+  on: {
4430
+    init() {
4431
+      const swiper = this;
4432
+      if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) {
4433
+        swiper.mousewheel.disable();
4434
+      }
4435
+      if (swiper.params.mousewheel.enabled) swiper.mousewheel.enable();
4436
+    },
4437
+    destroy() {
4438
+      const swiper = this;
4439
+      if (swiper.params.cssMode) {
4440
+        swiper.mousewheel.enable();
4441
+      }
4442
+      if (swiper.mousewheel.enabled) swiper.mousewheel.disable();
4443
+    },
4444
+  },
4445
+};
4446
+
4447
+const Navigation = {
4448
+  update() {
4449
+    // Update Navigation Buttons
4450
+    const swiper = this;
4451
+    const params = swiper.params.navigation;
4452
+
4453
+    if (swiper.params.loop) return;
4454
+    const { $nextEl, $prevEl } = swiper.navigation;
4455
+
4456
+    if ($prevEl && $prevEl.length > 0) {
4457
+      if (swiper.isBeginning) {
4458
+        $prevEl.addClass(params.disabledClass);
4459
+      } else {
4460
+        $prevEl.removeClass(params.disabledClass);
4461
+      }
4462
+      $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
4463
+    }
4464
+    if ($nextEl && $nextEl.length > 0) {
4465
+      if (swiper.isEnd) {
4466
+        $nextEl.addClass(params.disabledClass);
4467
+      } else {
4468
+        $nextEl.removeClass(params.disabledClass);
4469
+      }
4470
+      $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
4471
+    }
4472
+  },
4473
+  onPrevClick(e) {
4474
+    const swiper = this;
4475
+    e.preventDefault();
4476
+    if (swiper.isBeginning && !swiper.params.loop) return;
4477
+    swiper.slidePrev();
4478
+  },
4479
+  onNextClick(e) {
4480
+    const swiper = this;
4481
+    e.preventDefault();
4482
+    if (swiper.isEnd && !swiper.params.loop) return;
4483
+    swiper.slideNext();
4484
+  },
4485
+  init() {
4486
+    const swiper = this;
4487
+    const params = swiper.params.navigation;
4488
+    if (!(params.nextEl || params.prevEl)) return;
4489
+
4490
+    let $nextEl;
4491
+    let $prevEl;
4492
+    if (params.nextEl) {
4493
+      $nextEl = $(params.nextEl);
4494
+      if (
4495
+        swiper.params.uniqueNavElements
4496
+        && typeof params.nextEl === 'string'
4497
+        && $nextEl.length > 1
4498
+        && swiper.$el.find(params.nextEl).length === 1
4499
+      ) {
4500
+        $nextEl = swiper.$el.find(params.nextEl);
4501
+      }
4502
+    }
4503
+    if (params.prevEl) {
4504
+      $prevEl = $(params.prevEl);
4505
+      if (
4506
+        swiper.params.uniqueNavElements
4507
+        && typeof params.prevEl === 'string'
4508
+        && $prevEl.length > 1
4509
+        && swiper.$el.find(params.prevEl).length === 1
4510
+      ) {
4511
+        $prevEl = swiper.$el.find(params.prevEl);
4512
+      }
4513
+    }
4514
+
4515
+    if ($nextEl && $nextEl.length > 0) {
4516
+      $nextEl.on('click', swiper.navigation.onNextClick);
4517
+    }
4518
+    if ($prevEl && $prevEl.length > 0) {
4519
+      $prevEl.on('click', swiper.navigation.onPrevClick);
4520
+    }
4521
+
4522
+    Utils.extend(swiper.navigation, {
4523
+      $nextEl,
4524
+      nextEl: $nextEl && $nextEl[0],
4525
+      $prevEl,
4526
+      prevEl: $prevEl && $prevEl[0],
4527
+    });
4528
+  },
4529
+  destroy() {
4530
+    const swiper = this;
4531
+    const { $nextEl, $prevEl } = swiper.navigation;
4532
+    if ($nextEl && $nextEl.length) {
4533
+      $nextEl.off('click', swiper.navigation.onNextClick);
4534
+      $nextEl.removeClass(swiper.params.navigation.disabledClass);
4535
+    }
4536
+    if ($prevEl && $prevEl.length) {
4537
+      $prevEl.off('click', swiper.navigation.onPrevClick);
4538
+      $prevEl.removeClass(swiper.params.navigation.disabledClass);
4539
+    }
4540
+  },
4541
+};
4542
+
4543
+var navigation = {
4544
+  name: 'navigation',
4545
+  params: {
4546
+    navigation: {
4547
+      nextEl: null,
4548
+      prevEl: null,
4549
+
4550
+      hideOnClick: false,
4551
+      disabledClass: 'swiper-button-disabled',
4552
+      hiddenClass: 'swiper-button-hidden',
4553
+      lockClass: 'swiper-button-lock',
4554
+    },
4555
+  },
4556
+  create() {
4557
+    const swiper = this;
4558
+    Utils.extend(swiper, {
4559
+      navigation: {
4560
+        init: Navigation.init.bind(swiper),
4561
+        update: Navigation.update.bind(swiper),
4562
+        destroy: Navigation.destroy.bind(swiper),
4563
+        onNextClick: Navigation.onNextClick.bind(swiper),
4564
+        onPrevClick: Navigation.onPrevClick.bind(swiper),
4565
+      },
4566
+    });
4567
+  },
4568
+  on: {
4569
+    init() {
4570
+      const swiper = this;
4571
+      swiper.navigation.init();
4572
+      swiper.navigation.update();
4573
+    },
4574
+    toEdge() {
4575
+      const swiper = this;
4576
+      swiper.navigation.update();
4577
+    },
4578
+    fromEdge() {
4579
+      const swiper = this;
4580
+      swiper.navigation.update();
4581
+    },
4582
+    destroy() {
4583
+      const swiper = this;
4584
+      swiper.navigation.destroy();
4585
+    },
4586
+    click(e) {
4587
+      const swiper = this;
4588
+      const { $nextEl, $prevEl } = swiper.navigation;
4589
+      if (
4590
+        swiper.params.navigation.hideOnClick
4591
+        && !$(e.target).is($prevEl)
4592
+        && !$(e.target).is($nextEl)
4593
+      ) {
4594
+        let isHidden;
4595
+        if ($nextEl) {
4596
+          isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass);
4597
+        } else if ($prevEl) {
4598
+          isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass);
4599
+        }
4600
+        if (isHidden === true) {
4601
+          swiper.emit('navigationShow', swiper);
4602
+        } else {
4603
+          swiper.emit('navigationHide', swiper);
4604
+        }
4605
+        if ($nextEl) {
4606
+          $nextEl.toggleClass(swiper.params.navigation.hiddenClass);
4607
+        }
4608
+        if ($prevEl) {
4609
+          $prevEl.toggleClass(swiper.params.navigation.hiddenClass);
4610
+        }
4611
+      }
4612
+    },
4613
+  },
4614
+};
4615
+
4616
+const Pagination = {
4617
+  update() {
4618
+    // Render || Update Pagination bullets/items
4619
+    const swiper = this;
4620
+    const rtl = swiper.rtl;
4621
+    const params = swiper.params.pagination;
4622
+    if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
4623
+    const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
4624
+    const $el = swiper.pagination.$el;
4625
+    // Current/Total
4626
+    let current;
4627
+    const total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
4628
+    if (swiper.params.loop) {
4629
+      current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);
4630
+      if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) {
4631
+        current -= (slidesLength - (swiper.loopedSlides * 2));
4632
+      }
4633
+      if (current > total - 1) current -= total;
4634
+      if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;
4635
+    } else if (typeof swiper.snapIndex !== 'undefined') {
4636
+      current = swiper.snapIndex;
4637
+    } else {
4638
+      current = swiper.activeIndex || 0;
4639
+    }
4640
+    // Types
4641
+    if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
4642
+      const bullets = swiper.pagination.bullets;
4643
+      let firstIndex;
4644
+      let lastIndex;
4645
+      let midIndex;
4646
+      if (params.dynamicBullets) {
4647
+        swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);
4648
+        $el.css(swiper.isHorizontal() ? 'width' : 'height', `${swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)}px`);
4649
+        if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
4650
+          swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex);
4651
+          if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) {
4652
+            swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;
4653
+          } else if (swiper.pagination.dynamicBulletIndex < 0) {
4654
+            swiper.pagination.dynamicBulletIndex = 0;
4655
+          }
4656
+        }
4657
+        firstIndex = current - swiper.pagination.dynamicBulletIndex;
4658
+        lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
4659
+        midIndex = (lastIndex + firstIndex) / 2;
4660
+      }
4661
+      bullets.removeClass(`${params.bulletActiveClass} ${params.bulletActiveClass}-next ${params.bulletActiveClass}-next-next ${params.bulletActiveClass}-prev ${params.bulletActiveClass}-prev-prev ${params.bulletActiveClass}-main`);
4662
+      if ($el.length > 1) {
4663
+        bullets.each((index, bullet) => {
4664
+          const $bullet = $(bullet);
4665
+          const bulletIndex = $bullet.index();
4666
+          if (bulletIndex === current) {
4667
+            $bullet.addClass(params.bulletActiveClass);
4668
+          }
4669
+          if (params.dynamicBullets) {
4670
+            if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
4671
+              $bullet.addClass(`${params.bulletActiveClass}-main`);
4672
+            }
4673
+            if (bulletIndex === firstIndex) {
4674
+              $bullet
4675
+                .prev()
4676
+                .addClass(`${params.bulletActiveClass}-prev`)
4677
+                .prev()
4678
+                .addClass(`${params.bulletActiveClass}-prev-prev`);
4679
+            }
4680
+            if (bulletIndex === lastIndex) {
4681
+              $bullet
4682
+                .next()
4683
+                .addClass(`${params.bulletActiveClass}-next`)
4684
+                .next()
4685
+                .addClass(`${params.bulletActiveClass}-next-next`);
4686
+            }
4687
+          }
4688
+        });
4689
+      } else {
4690
+        const $bullet = bullets.eq(current);
4691
+        const bulletIndex = $bullet.index();
4692
+        $bullet.addClass(params.bulletActiveClass);
4693
+        if (params.dynamicBullets) {
4694
+          const $firstDisplayedBullet = bullets.eq(firstIndex);
4695
+          const $lastDisplayedBullet = bullets.eq(lastIndex);
4696
+          for (let i = firstIndex; i <= lastIndex; i += 1) {
4697
+            bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);
4698
+          }
4699
+          if (swiper.params.loop) {
4700
+            if (bulletIndex >= bullets.length - params.dynamicMainBullets) {
4701
+              for (let i = params.dynamicMainBullets; i >= 0; i -= 1) {
4702
+                bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`);
4703
+              }
4704
+              bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(`${params.bulletActiveClass}-prev`);
4705
+            } else {
4706
+              $firstDisplayedBullet
4707
+                .prev()
4708
+                .addClass(`${params.bulletActiveClass}-prev`)
4709
+                .prev()
4710
+                .addClass(`${params.bulletActiveClass}-prev-prev`);
4711
+              $lastDisplayedBullet
4712
+                .next()
4713
+                .addClass(`${params.bulletActiveClass}-next`)
4714
+                .next()
4715
+                .addClass(`${params.bulletActiveClass}-next-next`);
4716
+            }
4717
+          } else {
4718
+            $firstDisplayedBullet
4719
+              .prev()
4720
+              .addClass(`${params.bulletActiveClass}-prev`)
4721
+              .prev()
4722
+              .addClass(`${params.bulletActiveClass}-prev-prev`);
4723
+            $lastDisplayedBullet
4724
+              .next()
4725
+              .addClass(`${params.bulletActiveClass}-next`)
4726
+              .next()
4727
+              .addClass(`${params.bulletActiveClass}-next-next`);
4728
+          }
4729
+        }
4730
+      }
4731
+      if (params.dynamicBullets) {
4732
+        const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
4733
+        const bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize);
4734
+        const offsetProp = rtl ? 'right' : 'left';
4735
+        bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);
4736
+      }
4737
+    }
4738
+    if (params.type === 'fraction') {
4739
+      $el.find(`.${params.currentClass}`).text(params.formatFractionCurrent(current + 1));
4740
+      $el.find(`.${params.totalClass}`).text(params.formatFractionTotal(total));
4741
+    }
4742
+    if (params.type === 'progressbar') {
4743
+      let progressbarDirection;
4744
+      if (params.progressbarOpposite) {
4745
+        progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
4746
+      } else {
4747
+        progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
4748
+      }
4749
+      const scale = (current + 1) / total;
4750
+      let scaleX = 1;
4751
+      let scaleY = 1;
4752
+      if (progressbarDirection === 'horizontal') {
4753
+        scaleX = scale;
4754
+      } else {
4755
+        scaleY = scale;
4756
+      }
4757
+      $el.find(`.${params.progressbarFillClass}`).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed);
4758
+    }
4759
+    if (params.type === 'custom' && params.renderCustom) {
4760
+      $el.html(params.renderCustom(swiper, current + 1, total));
4761
+      swiper.emit('paginationRender', swiper, $el[0]);
4762
+    } else {
4763
+      swiper.emit('paginationUpdate', swiper, $el[0]);
4764
+    }
4765
+    $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
4766
+  },
4767
+  render() {
4768
+    // Render Container
4769
+    const swiper = this;
4770
+    const params = swiper.params.pagination;
4771
+    if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
4772
+    const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
4773
+
4774
+    const $el = swiper.pagination.$el;
4775
+    let paginationHTML = '';
4776
+    if (params.type === 'bullets') {
4777
+      const numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
4778
+      for (let i = 0; i < numberOfBullets; i += 1) {
4779
+        if (params.renderBullet) {
4780
+          paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
4781
+        } else {
4782
+          paginationHTML += `<${params.bulletElement} class="${params.bulletClass}"></${params.bulletElement}>`;
4783
+        }
4784
+      }
4785
+      $el.html(paginationHTML);
4786
+      swiper.pagination.bullets = $el.find(`.${params.bulletClass}`);
4787
+    }
4788
+    if (params.type === 'fraction') {
4789
+      if (params.renderFraction) {
4790
+        paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
4791
+      } else {
4792
+        paginationHTML = `<span class="${params.currentClass}"></span>`
4793
+        + ' / '
4794
+        + `<span class="${params.totalClass}"></span>`;
4795
+      }
4796
+      $el.html(paginationHTML);
4797
+    }
4798
+    if (params.type === 'progressbar') {
4799
+      if (params.renderProgressbar) {
4800
+        paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
4801
+      } else {
4802
+        paginationHTML = `<span class="${params.progressbarFillClass}"></span>`;
4803
+      }
4804
+      $el.html(paginationHTML);
4805
+    }
4806
+    if (params.type !== 'custom') {
4807
+      swiper.emit('paginationRender', swiper.pagination.$el[0]);
4808
+    }
4809
+  },
4810
+  init() {
4811
+    const swiper = this;
4812
+    const params = swiper.params.pagination;
4813
+    if (!params.el) return;
4814
+
4815
+    let $el = $(params.el);
4816
+    if ($el.length === 0) return;
4817
+
4818
+    if (
4819
+      swiper.params.uniqueNavElements
4820
+      && typeof params.el === 'string'
4821
+      && $el.length > 1
4822
+      && swiper.$el.find(params.el).length === 1
4823
+    ) {
4824
+      $el = swiper.$el.find(params.el);
4825
+    }
4826
+
4827
+    if (params.type === 'bullets' && params.clickable) {
4828
+      $el.addClass(params.clickableClass);
4829
+    }
4830
+
4831
+    $el.addClass(params.modifierClass + params.type);
4832
+
4833
+    if (params.type === 'bullets' && params.dynamicBullets) {
4834
+      $el.addClass(`${params.modifierClass}${params.type}-dynamic`);
4835
+      swiper.pagination.dynamicBulletIndex = 0;
4836
+      if (params.dynamicMainBullets < 1) {
4837
+        params.dynamicMainBullets = 1;
4838
+      }
4839
+    }
4840
+    if (params.type === 'progressbar' && params.progressbarOpposite) {
4841
+      $el.addClass(params.progressbarOppositeClass);
4842
+    }
4843
+
4844
+    if (params.clickable) {
4845
+      $el.on('click', `.${params.bulletClass}`, function onClick(e) {
4846
+        e.preventDefault();
4847
+        let index = $(this).index() * swiper.params.slidesPerGroup;
4848
+        if (swiper.params.loop) index += swiper.loopedSlides;
4849
+        swiper.slideTo(index);
4850
+      });
4851
+    }
4852
+
4853
+    Utils.extend(swiper.pagination, {
4854
+      $el,
4855
+      el: $el[0],
4856
+    });
4857
+  },
4858
+  destroy() {
4859
+    const swiper = this;
4860
+    const params = swiper.params.pagination;
4861
+    if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
4862
+    const $el = swiper.pagination.$el;
4863
+
4864
+    $el.removeClass(params.hiddenClass);
4865
+    $el.removeClass(params.modifierClass + params.type);
4866
+    if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass);
4867
+    if (params.clickable) {
4868
+      $el.off('click', `.${params.bulletClass}`);
4869
+    }
4870
+  },
4871
+};
4872
+
4873
+var pagination = {
4874
+  name: 'pagination',
4875
+  params: {
4876
+    pagination: {
4877
+      el: null,
4878
+      bulletElement: 'span',
4879
+      clickable: false,
4880
+      hideOnClick: false,
4881
+      renderBullet: null,
4882
+      renderProgressbar: null,
4883
+      renderFraction: null,
4884
+      renderCustom: null,
4885
+      progressbarOpposite: false,
4886
+      type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
4887
+      dynamicBullets: false,
4888
+      dynamicMainBullets: 1,
4889
+      formatFractionCurrent: (number) => number,
4890
+      formatFractionTotal: (number) => number,
4891
+      bulletClass: 'swiper-pagination-bullet',
4892
+      bulletActiveClass: 'swiper-pagination-bullet-active',
4893
+      modifierClass: 'swiper-pagination-', // NEW
4894
+      currentClass: 'swiper-pagination-current',
4895
+      totalClass: 'swiper-pagination-total',
4896
+      hiddenClass: 'swiper-pagination-hidden',
4897
+      progressbarFillClass: 'swiper-pagination-progressbar-fill',
4898
+      progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',
4899
+      clickableClass: 'swiper-pagination-clickable', // NEW
4900
+      lockClass: 'swiper-pagination-lock',
4901
+    },
4902
+  },
4903
+  create() {
4904
+    const swiper = this;
4905
+    Utils.extend(swiper, {
4906
+      pagination: {
4907
+        init: Pagination.init.bind(swiper),
4908
+        render: Pagination.render.bind(swiper),
4909
+        update: Pagination.update.bind(swiper),
4910
+        destroy: Pagination.destroy.bind(swiper),
4911
+        dynamicBulletIndex: 0,
4912
+      },
4913
+    });
4914
+  },
4915
+  on: {
4916
+    init() {
4917
+      const swiper = this;
4918
+      swiper.pagination.init();
4919
+      swiper.pagination.render();
4920
+      swiper.pagination.update();
4921
+    },
4922
+    activeIndexChange() {
4923
+      const swiper = this;
4924
+      if (swiper.params.loop) {
4925
+        swiper.pagination.update();
4926
+      } else if (typeof swiper.snapIndex === 'undefined') {
4927
+        swiper.pagination.update();
4928
+      }
4929
+    },
4930
+    snapIndexChange() {
4931
+      const swiper = this;
4932
+      if (!swiper.params.loop) {
4933
+        swiper.pagination.update();
4934
+      }
4935
+    },
4936
+    slidesLengthChange() {
4937
+      const swiper = this;
4938
+      if (swiper.params.loop) {
4939
+        swiper.pagination.render();
4940
+        swiper.pagination.update();
4941
+      }
4942
+    },
4943
+    snapGridLengthChange() {
4944
+      const swiper = this;
4945
+      if (!swiper.params.loop) {
4946
+        swiper.pagination.render();
4947
+        swiper.pagination.update();
4948
+      }
4949
+    },
4950
+    destroy() {
4951
+      const swiper = this;
4952
+      swiper.pagination.destroy();
4953
+    },
4954
+    click(e) {
4955
+      const swiper = this;
4956
+      if (
4957
+        swiper.params.pagination.el
4958
+        && swiper.params.pagination.hideOnClick
4959
+        && swiper.pagination.$el.length > 0
4960
+        && !$(e.target).hasClass(swiper.params.pagination.bulletClass)
4961
+      ) {
4962
+        const isHidden = swiper.pagination.$el.hasClass(swiper.params.pagination.hiddenClass);
4963
+        if (isHidden === true) {
4964
+          swiper.emit('paginationShow', swiper);
4965
+        } else {
4966
+          swiper.emit('paginationHide', swiper);
4967
+        }
4968
+        swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);
4969
+      }
4970
+    },
4971
+  },
4972
+};
4973
+
4974
+const Scrollbar = {
4975
+  setTranslate() {
4976
+    const swiper = this;
4977
+    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
4978
+    const { scrollbar, rtlTranslate: rtl, progress } = swiper;
4979
+    const {
4980
+      dragSize, trackSize, $dragEl, $el,
4981
+    } = scrollbar;
4982
+    const params = swiper.params.scrollbar;
4983
+
4984
+    let newSize = dragSize;
4985
+    let newPos = (trackSize - dragSize) * progress;
4986
+    if (rtl) {
4987
+      newPos = -newPos;
4988
+      if (newPos > 0) {
4989
+        newSize = dragSize - newPos;
4990
+        newPos = 0;
4991
+      } else if (-newPos + dragSize > trackSize) {
4992
+        newSize = trackSize + newPos;
4993
+      }
4994
+    } else if (newPos < 0) {
4995
+      newSize = dragSize + newPos;
4996
+      newPos = 0;
4997
+    } else if (newPos + dragSize > trackSize) {
4998
+      newSize = trackSize - newPos;
4999
+    }
5000
+    if (swiper.isHorizontal()) {
5001
+      $dragEl.transform(`translate3d(${newPos}px, 0, 0)`);
5002
+      $dragEl[0].style.width = `${newSize}px`;
5003
+    } else {
5004
+      $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);
5005
+      $dragEl[0].style.height = `${newSize}px`;
5006
+    }
5007
+    if (params.hide) {
5008
+      clearTimeout(swiper.scrollbar.timeout);
5009
+      $el[0].style.opacity = 1;
5010
+      swiper.scrollbar.timeout = setTimeout(() => {
5011
+        $el[0].style.opacity = 0;
5012
+        $el.transition(400);
5013
+      }, 1000);
5014
+    }
5015
+  },
5016
+  setTransition(duration) {
5017
+    const swiper = this;
5018
+    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
5019
+    swiper.scrollbar.$dragEl.transition(duration);
5020
+  },
5021
+  updateSize() {
5022
+    const swiper = this;
5023
+    if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
5024
+
5025
+    const { scrollbar } = swiper;
5026
+    const { $dragEl, $el } = scrollbar;
5027
+
5028
+    $dragEl[0].style.width = '';
5029
+    $dragEl[0].style.height = '';
5030
+    const trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;
5031
+
5032
+    const divider = swiper.size / swiper.virtualSize;
5033
+    const moveDivider = divider * (trackSize / swiper.size);
5034
+    let dragSize;
5035
+    if (swiper.params.scrollbar.dragSize === 'auto') {
5036
+      dragSize = trackSize * divider;
5037
+    } else {
5038
+      dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);
5039
+    }
5040
+
5041
+    if (swiper.isHorizontal()) {
5042
+      $dragEl[0].style.width = `${dragSize}px`;
5043
+    } else {
5044
+      $dragEl[0].style.height = `${dragSize}px`;
5045
+    }
5046
+
5047
+    if (divider >= 1) {
5048
+      $el[0].style.display = 'none';
5049
+    } else {
5050
+      $el[0].style.display = '';
5051
+    }
5052
+    if (swiper.params.scrollbar.hide) {
5053
+      $el[0].style.opacity = 0;
5054
+    }
5055
+    Utils.extend(scrollbar, {
5056
+      trackSize,
5057
+      divider,
5058
+      moveDivider,
5059
+      dragSize,
5060
+    });
5061
+    scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);
5062
+  },
5063
+  getPointerPosition(e) {
5064
+    const swiper = this;
5065
+    if (swiper.isHorizontal()) {
5066
+      return ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].clientX : e.clientX);
5067
+    }
5068
+    return ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].clientY : e.clientY);
5069
+  },
5070
+  setDragPosition(e) {
5071
+    const swiper = this;
5072
+    const { scrollbar, rtlTranslate: rtl } = swiper;
5073
+    const {
5074
+      $el,
5075
+      dragSize,
5076
+      trackSize,
5077
+      dragStartPos,
5078
+    } = scrollbar;
5079
+
5080
+    let positionRatio;
5081
+    positionRatio = ((scrollbar.getPointerPosition(e)) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top']
5082
+      - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize);
5083
+    positionRatio = Math.max(Math.min(positionRatio, 1), 0);
5084
+    if (rtl) {
5085
+      positionRatio = 1 - positionRatio;
5086
+    }
5087
+
5088
+    const position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio);
5089
+
5090
+    swiper.updateProgress(position);
5091
+    swiper.setTranslate(position);
5092
+    swiper.updateActiveIndex();
5093
+    swiper.updateSlidesClasses();
5094
+  },
5095
+  onDragStart(e) {
5096
+    const swiper = this;
5097
+    const params = swiper.params.scrollbar;
5098
+    const { scrollbar, $wrapperEl } = swiper;
5099
+    const { $el, $dragEl } = scrollbar;
5100
+    swiper.scrollbar.isTouched = true;
5101
+    swiper.scrollbar.dragStartPos = (e.target === $dragEl[0] || e.target === $dragEl)
5102
+      ? scrollbar.getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null;
5103
+    e.preventDefault();
5104
+    e.stopPropagation();
5105
+
5106
+    $wrapperEl.transition(100);
5107
+    $dragEl.transition(100);
5108
+    scrollbar.setDragPosition(e);
5109
+
5110
+    clearTimeout(swiper.scrollbar.dragTimeout);
5111
+
5112
+    $el.transition(0);
5113
+    if (params.hide) {
5114
+      $el.css('opacity', 1);
5115
+    }
5116
+    if (swiper.params.cssMode) {
5117
+      swiper.$wrapperEl.css('scroll-snap-type', 'none');
5118
+    }
5119
+    swiper.emit('scrollbarDragStart', e);
5120
+  },
5121
+  onDragMove(e) {
5122
+    const swiper = this;
5123
+    const { scrollbar, $wrapperEl } = swiper;
5124
+    const { $el, $dragEl } = scrollbar;
5125
+
5126
+    if (!swiper.scrollbar.isTouched) return;
5127
+    if (e.preventDefault) e.preventDefault();
5128
+    else e.returnValue = false;
5129
+    scrollbar.setDragPosition(e);
5130
+    $wrapperEl.transition(0);
5131
+    $el.transition(0);
5132
+    $dragEl.transition(0);
5133
+    swiper.emit('scrollbarDragMove', e);
5134
+  },
5135
+  onDragEnd(e) {
5136
+    const swiper = this;
5137
+
5138
+    const params = swiper.params.scrollbar;
5139
+    const { scrollbar, $wrapperEl } = swiper;
5140
+    const { $el } = scrollbar;
5141
+
5142
+    if (!swiper.scrollbar.isTouched) return;
5143
+    swiper.scrollbar.isTouched = false;
5144
+    if (swiper.params.cssMode) {
5145
+      swiper.$wrapperEl.css('scroll-snap-type', '');
5146
+      $wrapperEl.transition('');
5147
+    }
5148
+    if (params.hide) {
5149
+      clearTimeout(swiper.scrollbar.dragTimeout);
5150
+      swiper.scrollbar.dragTimeout = Utils.nextTick(() => {
5151
+        $el.css('opacity', 0);
5152
+        $el.transition(400);
5153
+      }, 1000);
5154
+    }
5155
+    swiper.emit('scrollbarDragEnd', e);
5156
+    if (params.snapOnRelease) {
5157
+      swiper.slideToClosest();
5158
+    }
5159
+  },
5160
+  enableDraggable() {
5161
+    const swiper = this;
5162
+    if (!swiper.params.scrollbar.el) return;
5163
+    const {
5164
+      scrollbar, touchEventsTouch, touchEventsDesktop, params,
5165
+    } = swiper;
5166
+    const $el = scrollbar.$el;
5167
+    const target = $el[0];
5168
+    const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
5169
+    const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
5170
+    if (!Support.touch) {
5171
+      target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
5172
+      document$1.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
5173
+      document$1.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
5174
+    } else {
5175
+      target.addEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
5176
+      target.addEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
5177
+      target.addEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
5178
+    }
5179
+  },
5180
+  disableDraggable() {
5181
+    const swiper = this;
5182
+    if (!swiper.params.scrollbar.el) return;
5183
+    const {
5184
+      scrollbar, touchEventsTouch, touchEventsDesktop, params,
5185
+    } = swiper;
5186
+    const $el = scrollbar.$el;
5187
+    const target = $el[0];
5188
+    const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
5189
+    const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
5190
+    if (!Support.touch) {
5191
+      target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
5192
+      document$1.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
5193
+      document$1.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
5194
+    } else {
5195
+      target.removeEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
5196
+      target.removeEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
5197
+      target.removeEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
5198
+    }
5199
+  },
5200
+  init() {
5201
+    const swiper = this;
5202
+    if (!swiper.params.scrollbar.el) return;
5203
+    const { scrollbar, $el: $swiperEl } = swiper;
5204
+    const params = swiper.params.scrollbar;
5205
+
5206
+    let $el = $(params.el);
5207
+    if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {
5208
+      $el = $swiperEl.find(params.el);
5209
+    }
5210
+
5211
+    let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);
5212
+    if ($dragEl.length === 0) {
5213
+      $dragEl = $(`<div class="${swiper.params.scrollbar.dragClass}"></div>`);
5214
+      $el.append($dragEl);
5215
+    }
5216
+
5217
+    Utils.extend(scrollbar, {
5218
+      $el,
5219
+      el: $el[0],
5220
+      $dragEl,
5221
+      dragEl: $dragEl[0],
5222
+    });
5223
+
5224
+    if (params.draggable) {
5225
+      scrollbar.enableDraggable();
5226
+    }
5227
+  },
5228
+  destroy() {
5229
+    const swiper = this;
5230
+    swiper.scrollbar.disableDraggable();
5231
+  },
5232
+};
5233
+
5234
+var scrollbar = {
5235
+  name: 'scrollbar',
5236
+  params: {
5237
+    scrollbar: {
5238
+      el: null,
5239
+      dragSize: 'auto',
5240
+      hide: false,
5241
+      draggable: false,
5242
+      snapOnRelease: true,
5243
+      lockClass: 'swiper-scrollbar-lock',
5244
+      dragClass: 'swiper-scrollbar-drag',
5245
+    },
5246
+  },
5247
+  create() {
5248
+    const swiper = this;
5249
+    Utils.extend(swiper, {
5250
+      scrollbar: {
5251
+        init: Scrollbar.init.bind(swiper),
5252
+        destroy: Scrollbar.destroy.bind(swiper),
5253
+        updateSize: Scrollbar.updateSize.bind(swiper),
5254
+        setTranslate: Scrollbar.setTranslate.bind(swiper),
5255
+        setTransition: Scrollbar.setTransition.bind(swiper),
5256
+        enableDraggable: Scrollbar.enableDraggable.bind(swiper),
5257
+        disableDraggable: Scrollbar.disableDraggable.bind(swiper),
5258
+        setDragPosition: Scrollbar.setDragPosition.bind(swiper),
5259
+        getPointerPosition: Scrollbar.getPointerPosition.bind(swiper),
5260
+        onDragStart: Scrollbar.onDragStart.bind(swiper),
5261
+        onDragMove: Scrollbar.onDragMove.bind(swiper),
5262
+        onDragEnd: Scrollbar.onDragEnd.bind(swiper),
5263
+        isTouched: false,
5264
+        timeout: null,
5265
+        dragTimeout: null,
5266
+      },
5267
+    });
5268
+  },
5269
+  on: {
5270
+    init() {
5271
+      const swiper = this;
5272
+      swiper.scrollbar.init();
5273
+      swiper.scrollbar.updateSize();
5274
+      swiper.scrollbar.setTranslate();
5275
+    },
5276
+    update() {
5277
+      const swiper = this;
5278
+      swiper.scrollbar.updateSize();
5279
+    },
5280
+    resize() {
5281
+      const swiper = this;
5282
+      swiper.scrollbar.updateSize();
5283
+    },
5284
+    observerUpdate() {
5285
+      const swiper = this;
5286
+      swiper.scrollbar.updateSize();
5287
+    },
5288
+    setTranslate() {
5289
+      const swiper = this;
5290
+      swiper.scrollbar.setTranslate();
5291
+    },
5292
+    setTransition(duration) {
5293
+      const swiper = this;
5294
+      swiper.scrollbar.setTransition(duration);
5295
+    },
5296
+    destroy() {
5297
+      const swiper = this;
5298
+      swiper.scrollbar.destroy();
5299
+    },
5300
+  },
5301
+};
5302
+
5303
+const Parallax = {
5304
+  setTransform(el, progress) {
5305
+    const swiper = this;
5306
+    const { rtl } = swiper;
5307
+
5308
+    const $el = $(el);
5309
+    const rtlFactor = rtl ? -1 : 1;
5310
+
5311
+    const p = $el.attr('data-swiper-parallax') || '0';
5312
+    let x = $el.attr('data-swiper-parallax-x');
5313
+    let y = $el.attr('data-swiper-parallax-y');
5314
+    const scale = $el.attr('data-swiper-parallax-scale');
5315
+    const opacity = $el.attr('data-swiper-parallax-opacity');
5316
+
5317
+    if (x || y) {
5318
+      x = x || '0';
5319
+      y = y || '0';
5320
+    } else if (swiper.isHorizontal()) {
5321
+      x = p;
5322
+      y = '0';
5323
+    } else {
5324
+      y = p;
5325
+      x = '0';
5326
+    }
5327
+
5328
+    if ((x).indexOf('%') >= 0) {
5329
+      x = `${parseInt(x, 10) * progress * rtlFactor}%`;
5330
+    } else {
5331
+      x = `${x * progress * rtlFactor}px`;
5332
+    }
5333
+    if ((y).indexOf('%') >= 0) {
5334
+      y = `${parseInt(y, 10) * progress}%`;
5335
+    } else {
5336
+      y = `${y * progress}px`;
5337
+    }
5338
+
5339
+    if (typeof opacity !== 'undefined' && opacity !== null) {
5340
+      const currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress)));
5341
+      $el[0].style.opacity = currentOpacity;
5342
+    }
5343
+    if (typeof scale === 'undefined' || scale === null) {
5344
+      $el.transform(`translate3d(${x}, ${y}, 0px)`);
5345
+    } else {
5346
+      const currentScale = scale - ((scale - 1) * (1 - Math.abs(progress)));
5347
+      $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`);
5348
+    }
5349
+  },
5350
+  setTranslate() {
5351
+    const swiper = this;
5352
+    const {
5353
+      $el, slides, progress, snapGrid,
5354
+    } = swiper;
5355
+    $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]')
5356
+      .each((index, el) => {
5357
+        swiper.parallax.setTransform(el, progress);
5358
+      });
5359
+    slides.each((slideIndex, slideEl) => {
5360
+      let slideProgress = slideEl.progress;
5361
+      if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {
5362
+        slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1));
5363
+      }
5364
+      slideProgress = Math.min(Math.max(slideProgress, -1), 1);
5365
+      $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]')
5366
+        .each((index, el) => {
5367
+          swiper.parallax.setTransform(el, slideProgress);
5368
+        });
5369
+    });
5370
+  },
5371
+  setTransition(duration = this.params.speed) {
5372
+    const swiper = this;
5373
+    const { $el } = swiper;
5374
+    $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]')
5375
+      .each((index, parallaxEl) => {
5376
+        const $parallaxEl = $(parallaxEl);
5377
+        let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;
5378
+        if (duration === 0) parallaxDuration = 0;
5379
+        $parallaxEl.transition(parallaxDuration);
5380
+      });
5381
+  },
5382
+};
5383
+
5384
+var parallax = {
5385
+  name: 'parallax',
5386
+  params: {
5387
+    parallax: {
5388
+      enabled: false,
5389
+    },
5390
+  },
5391
+  create() {
5392
+    const swiper = this;
5393
+    Utils.extend(swiper, {
5394
+      parallax: {
5395
+        setTransform: Parallax.setTransform.bind(swiper),
5396
+        setTranslate: Parallax.setTranslate.bind(swiper),
5397
+        setTransition: Parallax.setTransition.bind(swiper),
5398
+      },
5399
+    });
5400
+  },
5401
+  on: {
5402
+    beforeInit() {
5403
+      const swiper = this;
5404
+      if (!swiper.params.parallax.enabled) return;
5405
+      swiper.params.watchSlidesProgress = true;
5406
+      swiper.originalParams.watchSlidesProgress = true;
5407
+    },
5408
+    init() {
5409
+      const swiper = this;
5410
+      if (!swiper.params.parallax.enabled) return;
5411
+      swiper.parallax.setTranslate();
5412
+    },
5413
+    setTranslate() {
5414
+      const swiper = this;
5415
+      if (!swiper.params.parallax.enabled) return;
5416
+      swiper.parallax.setTranslate();
5417
+    },
5418
+    setTransition(duration) {
5419
+      const swiper = this;
5420
+      if (!swiper.params.parallax.enabled) return;
5421
+      swiper.parallax.setTransition(duration);
5422
+    },
5423
+  },
5424
+};
5425
+
5426
+const Zoom = {
5427
+  // Calc Scale From Multi-touches
5428
+  getDistanceBetweenTouches(e) {
5429
+    if (e.targetTouches.length < 2) return 1;
5430
+    const x1 = e.targetTouches[0].pageX;
5431
+    const y1 = e.targetTouches[0].pageY;
5432
+    const x2 = e.targetTouches[1].pageX;
5433
+    const y2 = e.targetTouches[1].pageY;
5434
+    const distance = Math.sqrt(((x2 - x1) ** 2) + ((y2 - y1) ** 2));
5435
+    return distance;
5436
+  },
5437
+  // Events
5438
+  onGestureStart(e) {
5439
+    const swiper = this;
5440
+    const params = swiper.params.zoom;
5441
+    const zoom = swiper.zoom;
5442
+    const { gesture } = zoom;
5443
+    zoom.fakeGestureTouched = false;
5444
+    zoom.fakeGestureMoved = false;
5445
+    if (!Support.gestures) {
5446
+      if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {
5447
+        return;
5448
+      }
5449
+      zoom.fakeGestureTouched = true;
5450
+      gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);
5451
+    }
5452
+    if (!gesture.$slideEl || !gesture.$slideEl.length) {
5453
+      gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);
5454
+      if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
5455
+      gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');
5456
+      gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
5457
+      gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
5458
+      if (gesture.$imageWrapEl.length === 0) {
5459
+        gesture.$imageEl = undefined;
5460
+        return;
5461
+      }
5462
+    }
5463
+    if (gesture.$imageEl) {
5464
+      gesture.$imageEl.transition(0);
5465
+    }
5466
+    swiper.zoom.isScaling = true;
5467
+  },
5468
+  onGestureChange(e) {
5469
+    const swiper = this;
5470
+    const params = swiper.params.zoom;
5471
+    const zoom = swiper.zoom;
5472
+    const { gesture } = zoom;
5473
+    if (!Support.gestures) {
5474
+      if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {
5475
+        return;
5476
+      }
5477
+      zoom.fakeGestureMoved = true;
5478
+      gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);
5479
+    }
5480
+    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5481
+    if (Support.gestures) {
5482
+      zoom.scale = e.scale * zoom.currentScale;
5483
+    } else {
5484
+      zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;
5485
+    }
5486
+    if (zoom.scale > gesture.maxRatio) {
5487
+      zoom.scale = (gesture.maxRatio - 1) + (((zoom.scale - gesture.maxRatio) + 1) ** 0.5);
5488
+    }
5489
+    if (zoom.scale < params.minRatio) {
5490
+      zoom.scale = (params.minRatio + 1) - (((params.minRatio - zoom.scale) + 1) ** 0.5);
5491
+    }
5492
+    gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);
5493
+  },
5494
+  onGestureEnd(e) {
5495
+    const swiper = this;
5496
+    const params = swiper.params.zoom;
5497
+    const zoom = swiper.zoom;
5498
+    const { gesture } = zoom;
5499
+    if (!Support.gestures) {
5500
+      if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {
5501
+        return;
5502
+      }
5503
+      if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) {
5504
+        return;
5505
+      }
5506
+      zoom.fakeGestureTouched = false;
5507
+      zoom.fakeGestureMoved = false;
5508
+    }
5509
+    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5510
+    zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);
5511
+    gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
5512
+    zoom.currentScale = zoom.scale;
5513
+    zoom.isScaling = false;
5514
+    if (zoom.scale === 1) gesture.$slideEl = undefined;
5515
+  },
5516
+  onTouchStart(e) {
5517
+    const swiper = this;
5518
+    const zoom = swiper.zoom;
5519
+    const { gesture, image } = zoom;
5520
+    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5521
+    if (image.isTouched) return;
5522
+    if (Device.android && e.cancelable) e.preventDefault();
5523
+    image.isTouched = true;
5524
+    image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
5525
+    image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
5526
+  },
5527
+  onTouchMove(e) {
5528
+    const swiper = this;
5529
+    const zoom = swiper.zoom;
5530
+    const { gesture, image, velocity } = zoom;
5531
+    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5532
+    swiper.allowClick = false;
5533
+    if (!image.isTouched || !gesture.$slideEl) return;
5534
+
5535
+    if (!image.isMoved) {
5536
+      image.width = gesture.$imageEl[0].offsetWidth;
5537
+      image.height = gesture.$imageEl[0].offsetHeight;
5538
+      image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;
5539
+      image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;
5540
+      gesture.slideWidth = gesture.$slideEl[0].offsetWidth;
5541
+      gesture.slideHeight = gesture.$slideEl[0].offsetHeight;
5542
+      gesture.$imageWrapEl.transition(0);
5543
+      if (swiper.rtl) {
5544
+        image.startX = -image.startX;
5545
+        image.startY = -image.startY;
5546
+      }
5547
+    }
5548
+    // Define if we need image drag
5549
+    const scaledWidth = image.width * zoom.scale;
5550
+    const scaledHeight = image.height * zoom.scale;
5551
+
5552
+    if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;
5553
+
5554
+    image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
5555
+    image.maxX = -image.minX;
5556
+    image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
5557
+    image.maxY = -image.minY;
5558
+
5559
+    image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
5560
+    image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
5561
+
5562
+    if (!image.isMoved && !zoom.isScaling) {
5563
+      if (
5564
+        swiper.isHorizontal()
5565
+        && (
5566
+          (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x)
5567
+          || (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)
5568
+        )
5569
+      ) {
5570
+        image.isTouched = false;
5571
+        return;
5572
+      } if (
5573
+        !swiper.isHorizontal()
5574
+        && (
5575
+          (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y)
5576
+          || (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)
5577
+        )
5578
+      ) {
5579
+        image.isTouched = false;
5580
+        return;
5581
+      }
5582
+    }
5583
+    if (e.cancelable) {
5584
+      e.preventDefault();
5585
+    }
5586
+    e.stopPropagation();
5587
+
5588
+    image.isMoved = true;
5589
+    image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX;
5590
+    image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY;
5591
+
5592
+    if (image.currentX < image.minX) {
5593
+      image.currentX = (image.minX + 1) - (((image.minX - image.currentX) + 1) ** 0.8);
5594
+    }
5595
+    if (image.currentX > image.maxX) {
5596
+      image.currentX = (image.maxX - 1) + (((image.currentX - image.maxX) + 1) ** 0.8);
5597
+    }
5598
+
5599
+    if (image.currentY < image.minY) {
5600
+      image.currentY = (image.minY + 1) - (((image.minY - image.currentY) + 1) ** 0.8);
5601
+    }
5602
+    if (image.currentY > image.maxY) {
5603
+      image.currentY = (image.maxY - 1) + (((image.currentY - image.maxY) + 1) ** 0.8);
5604
+    }
5605
+
5606
+    // Velocity
5607
+    if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;
5608
+    if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;
5609
+    if (!velocity.prevTime) velocity.prevTime = Date.now();
5610
+    velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;
5611
+    velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;
5612
+    if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;
5613
+    if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;
5614
+    velocity.prevPositionX = image.touchesCurrent.x;
5615
+    velocity.prevPositionY = image.touchesCurrent.y;
5616
+    velocity.prevTime = Date.now();
5617
+
5618
+    gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
5619
+  },
5620
+  onTouchEnd() {
5621
+    const swiper = this;
5622
+    const zoom = swiper.zoom;
5623
+    const { gesture, image, velocity } = zoom;
5624
+    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5625
+    if (!image.isTouched || !image.isMoved) {
5626
+      image.isTouched = false;
5627
+      image.isMoved = false;
5628
+      return;
5629
+    }
5630
+    image.isTouched = false;
5631
+    image.isMoved = false;
5632
+    let momentumDurationX = 300;
5633
+    let momentumDurationY = 300;
5634
+    const momentumDistanceX = velocity.x * momentumDurationX;
5635
+    const newPositionX = image.currentX + momentumDistanceX;
5636
+    const momentumDistanceY = velocity.y * momentumDurationY;
5637
+    const newPositionY = image.currentY + momentumDistanceY;
5638
+
5639
+    // Fix duration
5640
+    if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);
5641
+    if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);
5642
+    const momentumDuration = Math.max(momentumDurationX, momentumDurationY);
5643
+
5644
+    image.currentX = newPositionX;
5645
+    image.currentY = newPositionY;
5646
+
5647
+    // Define if we need image drag
5648
+    const scaledWidth = image.width * zoom.scale;
5649
+    const scaledHeight = image.height * zoom.scale;
5650
+    image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
5651
+    image.maxX = -image.minX;
5652
+    image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
5653
+    image.maxY = -image.minY;
5654
+    image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);
5655
+    image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);
5656
+
5657
+    gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
5658
+  },
5659
+  onTransitionEnd() {
5660
+    const swiper = this;
5661
+    const zoom = swiper.zoom;
5662
+    const { gesture } = zoom;
5663
+    if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {
5664
+      if (gesture.$imageEl) {
5665
+        gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');
5666
+      }
5667
+      if (gesture.$imageWrapEl) {
5668
+        gesture.$imageWrapEl.transform('translate3d(0,0,0)');
5669
+      }
5670
+
5671
+      zoom.scale = 1;
5672
+      zoom.currentScale = 1;
5673
+
5674
+      gesture.$slideEl = undefined;
5675
+      gesture.$imageEl = undefined;
5676
+      gesture.$imageWrapEl = undefined;
5677
+    }
5678
+  },
5679
+  // Toggle Zoom
5680
+  toggle(e) {
5681
+    const swiper = this;
5682
+    const zoom = swiper.zoom;
5683
+
5684
+    if (zoom.scale && zoom.scale !== 1) {
5685
+      // Zoom Out
5686
+      zoom.out();
5687
+    } else {
5688
+      // Zoom In
5689
+      zoom.in(e);
5690
+    }
5691
+  },
5692
+  in(e) {
5693
+    const swiper = this;
5694
+
5695
+    const zoom = swiper.zoom;
5696
+    const params = swiper.params.zoom;
5697
+    const { gesture, image } = zoom;
5698
+
5699
+    if (!gesture.$slideEl) {
5700
+      if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {
5701
+        gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);
5702
+      } else {
5703
+        gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
5704
+      }
5705
+      gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');
5706
+      gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
5707
+    }
5708
+    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5709
+
5710
+    gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);
5711
+
5712
+    let touchX;
5713
+    let touchY;
5714
+    let offsetX;
5715
+    let offsetY;
5716
+    let diffX;
5717
+    let diffY;
5718
+    let translateX;
5719
+    let translateY;
5720
+    let imageWidth;
5721
+    let imageHeight;
5722
+    let scaledWidth;
5723
+    let scaledHeight;
5724
+    let translateMinX;
5725
+    let translateMinY;
5726
+    let translateMaxX;
5727
+    let translateMaxY;
5728
+    let slideWidth;
5729
+    let slideHeight;
5730
+
5731
+    if (typeof image.touchesStart.x === 'undefined' && e) {
5732
+      touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
5733
+      touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
5734
+    } else {
5735
+      touchX = image.touchesStart.x;
5736
+      touchY = image.touchesStart.y;
5737
+    }
5738
+
5739
+    zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
5740
+    zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
5741
+    if (e) {
5742
+      slideWidth = gesture.$slideEl[0].offsetWidth;
5743
+      slideHeight = gesture.$slideEl[0].offsetHeight;
5744
+      offsetX = gesture.$slideEl.offset().left;
5745
+      offsetY = gesture.$slideEl.offset().top;
5746
+      diffX = (offsetX + (slideWidth / 2)) - touchX;
5747
+      diffY = (offsetY + (slideHeight / 2)) - touchY;
5748
+
5749
+      imageWidth = gesture.$imageEl[0].offsetWidth;
5750
+      imageHeight = gesture.$imageEl[0].offsetHeight;
5751
+      scaledWidth = imageWidth * zoom.scale;
5752
+      scaledHeight = imageHeight * zoom.scale;
5753
+
5754
+      translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0);
5755
+      translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0);
5756
+      translateMaxX = -translateMinX;
5757
+      translateMaxY = -translateMinY;
5758
+
5759
+      translateX = diffX * zoom.scale;
5760
+      translateY = diffY * zoom.scale;
5761
+
5762
+      if (translateX < translateMinX) {
5763
+        translateX = translateMinX;
5764
+      }
5765
+      if (translateX > translateMaxX) {
5766
+        translateX = translateMaxX;
5767
+      }
5768
+
5769
+      if (translateY < translateMinY) {
5770
+        translateY = translateMinY;
5771
+      }
5772
+      if (translateY > translateMaxY) {
5773
+        translateY = translateMaxY;
5774
+      }
5775
+    } else {
5776
+      translateX = 0;
5777
+      translateY = 0;
5778
+    }
5779
+    gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`);
5780
+    gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
5781
+  },
5782
+  out() {
5783
+    const swiper = this;
5784
+
5785
+    const zoom = swiper.zoom;
5786
+    const params = swiper.params.zoom;
5787
+    const { gesture } = zoom;
5788
+
5789
+    if (!gesture.$slideEl) {
5790
+      if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {
5791
+        gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);
5792
+      } else {
5793
+        gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
5794
+      }
5795
+      gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');
5796
+      gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
5797
+    }
5798
+    if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5799
+
5800
+    zoom.scale = 1;
5801
+    zoom.currentScale = 1;
5802
+    gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');
5803
+    gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');
5804
+    gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);
5805
+    gesture.$slideEl = undefined;
5806
+  },
5807
+  // Attach/Detach Events
5808
+  enable() {
5809
+    const swiper = this;
5810
+    const zoom = swiper.zoom;
5811
+    if (zoom.enabled) return;
5812
+    zoom.enabled = true;
5813
+
5814
+    const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
5815
+    const activeListenerWithCapture = Support.passiveListener ? { passive: false, capture: true } : true;
5816
+
5817
+    const slideSelector = `.${swiper.params.slideClass}`;
5818
+
5819
+    // Scale image
5820
+    if (Support.gestures) {
5821
+      swiper.$wrapperEl.on('gesturestart', slideSelector, zoom.onGestureStart, passiveListener);
5822
+      swiper.$wrapperEl.on('gesturechange', slideSelector, zoom.onGestureChange, passiveListener);
5823
+      swiper.$wrapperEl.on('gestureend', slideSelector, zoom.onGestureEnd, passiveListener);
5824
+    } else if (swiper.touchEvents.start === 'touchstart') {
5825
+      swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, zoom.onGestureStart, passiveListener);
5826
+      swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, zoom.onGestureChange, activeListenerWithCapture);
5827
+      swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, zoom.onGestureEnd, passiveListener);
5828
+      if (swiper.touchEvents.cancel) {
5829
+        swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, zoom.onGestureEnd, passiveListener);
5830
+      }
5831
+    }
5832
+
5833
+    // Move image
5834
+    swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove, activeListenerWithCapture);
5835
+  },
5836
+  disable() {
5837
+    const swiper = this;
5838
+    const zoom = swiper.zoom;
5839
+    if (!zoom.enabled) return;
5840
+
5841
+    swiper.zoom.enabled = false;
5842
+
5843
+    const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
5844
+    const activeListenerWithCapture = Support.passiveListener ? { passive: false, capture: true } : true;
5845
+
5846
+    const slideSelector = `.${swiper.params.slideClass}`;
5847
+
5848
+    // Scale image
5849
+    if (Support.gestures) {
5850
+      swiper.$wrapperEl.off('gesturestart', slideSelector, zoom.onGestureStart, passiveListener);
5851
+      swiper.$wrapperEl.off('gesturechange', slideSelector, zoom.onGestureChange, passiveListener);
5852
+      swiper.$wrapperEl.off('gestureend', slideSelector, zoom.onGestureEnd, passiveListener);
5853
+    } else if (swiper.touchEvents.start === 'touchstart') {
5854
+      swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, zoom.onGestureStart, passiveListener);
5855
+      swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, zoom.onGestureChange, activeListenerWithCapture);
5856
+      swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, zoom.onGestureEnd, passiveListener);
5857
+      if (swiper.touchEvents.cancel) {
5858
+        swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, zoom.onGestureEnd, passiveListener);
5859
+      }
5860
+    }
5861
+
5862
+    // Move image
5863
+    swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove, activeListenerWithCapture);
5864
+  },
5865
+};
5866
+
5867
+var zoom = {
5868
+  name: 'zoom',
5869
+  params: {
5870
+    zoom: {
5871
+      enabled: false,
5872
+      maxRatio: 3,
5873
+      minRatio: 1,
5874
+      toggle: true,
5875
+      containerClass: 'swiper-zoom-container',
5876
+      zoomedSlideClass: 'swiper-slide-zoomed',
5877
+    },
5878
+  },
5879
+  create() {
5880
+    const swiper = this;
5881
+    const zoom = {
5882
+      enabled: false,
5883
+      scale: 1,
5884
+      currentScale: 1,
5885
+      isScaling: false,
5886
+      gesture: {
5887
+        $slideEl: undefined,
5888
+        slideWidth: undefined,
5889
+        slideHeight: undefined,
5890
+        $imageEl: undefined,
5891
+        $imageWrapEl: undefined,
5892
+        maxRatio: 3,
5893
+      },
5894
+      image: {
5895
+        isTouched: undefined,
5896
+        isMoved: undefined,
5897
+        currentX: undefined,
5898
+        currentY: undefined,
5899
+        minX: undefined,
5900
+        minY: undefined,
5901
+        maxX: undefined,
5902
+        maxY: undefined,
5903
+        width: undefined,
5904
+        height: undefined,
5905
+        startX: undefined,
5906
+        startY: undefined,
5907
+        touchesStart: {},
5908
+        touchesCurrent: {},
5909
+      },
5910
+      velocity: {
5911
+        x: undefined,
5912
+        y: undefined,
5913
+        prevPositionX: undefined,
5914
+        prevPositionY: undefined,
5915
+        prevTime: undefined,
5916
+      },
5917
+    };
5918
+
5919
+    ('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach((methodName) => {
5920
+      zoom[methodName] = Zoom[methodName].bind(swiper);
5921
+    });
5922
+    Utils.extend(swiper, {
5923
+      zoom,
5924
+    });
5925
+
5926
+    let scale = 1;
5927
+    Object.defineProperty(swiper.zoom, 'scale', {
5928
+      get() {
5929
+        return scale;
5930
+      },
5931
+      set(value) {
5932
+        if (scale !== value) {
5933
+          const imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined;
5934
+          const slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined;
5935
+          swiper.emit('zoomChange', value, imageEl, slideEl);
5936
+        }
5937
+        scale = value;
5938
+      },
5939
+    });
5940
+  },
5941
+  on: {
5942
+    init() {
5943
+      const swiper = this;
5944
+      if (swiper.params.zoom.enabled) {
5945
+        swiper.zoom.enable();
5946
+      }
5947
+    },
5948
+    destroy() {
5949
+      const swiper = this;
5950
+      swiper.zoom.disable();
5951
+    },
5952
+    touchStart(e) {
5953
+      const swiper = this;
5954
+      if (!swiper.zoom.enabled) return;
5955
+      swiper.zoom.onTouchStart(e);
5956
+    },
5957
+    touchEnd(e) {
5958
+      const swiper = this;
5959
+      if (!swiper.zoom.enabled) return;
5960
+      swiper.zoom.onTouchEnd(e);
5961
+    },
5962
+    doubleTap(e) {
5963
+      const swiper = this;
5964
+      if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {
5965
+        swiper.zoom.toggle(e);
5966
+      }
5967
+    },
5968
+    transitionEnd() {
5969
+      const swiper = this;
5970
+      if (swiper.zoom.enabled && swiper.params.zoom.enabled) {
5971
+        swiper.zoom.onTransitionEnd();
5972
+      }
5973
+    },
5974
+    slideChange() {
5975
+      const swiper = this;
5976
+      if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) {
5977
+        swiper.zoom.onTransitionEnd();
5978
+      }
5979
+    },
5980
+  },
5981
+};
5982
+
5983
+const Lazy = {
5984
+  loadInSlide(index, loadInDuplicate = true) {
5985
+    const swiper = this;
5986
+    const params = swiper.params.lazy;
5987
+    if (typeof index === 'undefined') return;
5988
+    if (swiper.slides.length === 0) return;
5989
+    const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
5990
+
5991
+    const $slideEl = isVirtual
5992
+      ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index="${index}"]`)
5993
+      : swiper.slides.eq(index);
5994
+
5995
+    let $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`);
5996
+    if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {
5997
+      $images = $images.add($slideEl[0]);
5998
+    }
5999
+    if ($images.length === 0) return;
6000
+
6001
+    $images.each((imageIndex, imageEl) => {
6002
+      const $imageEl = $(imageEl);
6003
+      $imageEl.addClass(params.loadingClass);
6004
+
6005
+      const background = $imageEl.attr('data-background');
6006
+      const src = $imageEl.attr('data-src');
6007
+      const srcset = $imageEl.attr('data-srcset');
6008
+      const sizes = $imageEl.attr('data-sizes');
6009
+      const $pictureEl = $imageEl.parent('picture');
6010
+
6011
+      swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, () => {
6012
+        if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) return;
6013
+        if (background) {
6014
+          $imageEl.css('background-image', `url("${background}")`);
6015
+          $imageEl.removeAttr('data-background');
6016
+        } else {
6017
+          if (srcset) {
6018
+            $imageEl.attr('srcset', srcset);
6019
+            $imageEl.removeAttr('data-srcset');
6020
+          }
6021
+          if (sizes) {
6022
+            $imageEl.attr('sizes', sizes);
6023
+            $imageEl.removeAttr('data-sizes');
6024
+          }
6025
+          if ($pictureEl.length) {
6026
+            $pictureEl.children('source').each((sourceIndex, sourceEl) => {
6027
+              const $source = $(sourceEl);
6028
+
6029
+              if ($source.attr('data-srcset')) {
6030
+                $source.attr('srcset', $source.attr('data-srcset'));
6031
+                $source.removeAttr('data-srcset');
6032
+              }
6033
+            });
6034
+          }
6035
+          if (src) {
6036
+            $imageEl.attr('src', src);
6037
+            $imageEl.removeAttr('data-src');
6038
+          }
6039
+        }
6040
+
6041
+        $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);
6042
+        $slideEl.find(`.${params.preloaderClass}`).remove();
6043
+        if (swiper.params.loop && loadInDuplicate) {
6044
+          const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');
6045
+          if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {
6046
+            const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`);
6047
+            swiper.lazy.loadInSlide(originalSlide.index(), false);
6048
+          } else {
6049
+            const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`);
6050
+            swiper.lazy.loadInSlide(duplicatedSlide.index(), false);
6051
+          }
6052
+        }
6053
+        swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);
6054
+        if (swiper.params.autoHeight) {
6055
+          swiper.updateAutoHeight();
6056
+        }
6057
+      });
6058
+
6059
+      swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]);
6060
+    });
6061
+  },
6062
+  load() {
6063
+    const swiper = this;
6064
+    const {
6065
+      $wrapperEl, params: swiperParams, slides, activeIndex,
6066
+    } = swiper;
6067
+    const isVirtual = swiper.virtual && swiperParams.virtual.enabled;
6068
+    const params = swiperParams.lazy;
6069
+
6070
+    let slidesPerView = swiperParams.slidesPerView;
6071
+    if (slidesPerView === 'auto') {
6072
+      slidesPerView = 0;
6073
+    }
6074
+
6075
+    function slideExist(index) {
6076
+      if (isVirtual) {
6077
+        if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index="${index}"]`).length) {
6078
+          return true;
6079
+        }
6080
+      } else if (slides[index]) return true;
6081
+      return false;
6082
+    }
6083
+
6084
+    function slideIndex(slideEl) {
6085
+      if (isVirtual) {
6086
+        return $(slideEl).attr('data-swiper-slide-index');
6087
+      }
6088
+      return $(slideEl).index();
6089
+    }
6090
+
6091
+    if (!swiper.lazy.initialImageLoaded) swiper.lazy.initialImageLoaded = true;
6092
+    if (swiper.params.watchSlidesVisibility) {
6093
+      $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each((elIndex, slideEl) => {
6094
+        const index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();
6095
+        swiper.lazy.loadInSlide(index);
6096
+      });
6097
+    } else if (slidesPerView > 1) {
6098
+      for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {
6099
+        if (slideExist(i)) swiper.lazy.loadInSlide(i);
6100
+      }
6101
+    } else {
6102
+      swiper.lazy.loadInSlide(activeIndex);
6103
+    }
6104
+    if (params.loadPrevNext) {
6105
+      if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {
6106
+        const amount = params.loadPrevNextAmount;
6107
+        const spv = slidesPerView;
6108
+        const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);
6109
+        const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);
6110
+        // Next Slides
6111
+        for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {
6112
+          if (slideExist(i)) swiper.lazy.loadInSlide(i);
6113
+        }
6114
+        // Prev Slides
6115
+        for (let i = minIndex; i < activeIndex; i += 1) {
6116
+          if (slideExist(i)) swiper.lazy.loadInSlide(i);
6117
+        }
6118
+      } else {
6119
+        const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);
6120
+        if (nextSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(nextSlide));
6121
+
6122
+        const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);
6123
+        if (prevSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(prevSlide));
6124
+      }
6125
+    }
6126
+  },
6127
+};
6128
+
6129
+var lazy = {
6130
+  name: 'lazy',
6131
+  params: {
6132
+    lazy: {
6133
+      enabled: false,
6134
+      loadPrevNext: false,
6135
+      loadPrevNextAmount: 1,
6136
+      loadOnTransitionStart: false,
6137
+
6138
+      elementClass: 'swiper-lazy',
6139
+      loadingClass: 'swiper-lazy-loading',
6140
+      loadedClass: 'swiper-lazy-loaded',
6141
+      preloaderClass: 'swiper-lazy-preloader',
6142
+    },
6143
+  },
6144
+  create() {
6145
+    const swiper = this;
6146
+    Utils.extend(swiper, {
6147
+      lazy: {
6148
+        initialImageLoaded: false,
6149
+        load: Lazy.load.bind(swiper),
6150
+        loadInSlide: Lazy.loadInSlide.bind(swiper),
6151
+      },
6152
+    });
6153
+  },
6154
+  on: {
6155
+    beforeInit() {
6156
+      const swiper = this;
6157
+      if (swiper.params.lazy.enabled && swiper.params.preloadImages) {
6158
+        swiper.params.preloadImages = false;
6159
+      }
6160
+    },
6161
+    init() {
6162
+      const swiper = this;
6163
+      if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {
6164
+        swiper.lazy.load();
6165
+      }
6166
+    },
6167
+    scroll() {
6168
+      const swiper = this;
6169
+      if (swiper.params.freeMode && !swiper.params.freeModeSticky) {
6170
+        swiper.lazy.load();
6171
+      }
6172
+    },
6173
+    resize() {
6174
+      const swiper = this;
6175
+      if (swiper.params.lazy.enabled) {
6176
+        swiper.lazy.load();
6177
+      }
6178
+    },
6179
+    scrollbarDragMove() {
6180
+      const swiper = this;
6181
+      if (swiper.params.lazy.enabled) {
6182
+        swiper.lazy.load();
6183
+      }
6184
+    },
6185
+    transitionStart() {
6186
+      const swiper = this;
6187
+      if (swiper.params.lazy.enabled) {
6188
+        if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) {
6189
+          swiper.lazy.load();
6190
+        }
6191
+      }
6192
+    },
6193
+    transitionEnd() {
6194
+      const swiper = this;
6195
+      if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {
6196
+        swiper.lazy.load();
6197
+      }
6198
+    },
6199
+    slideChange() {
6200
+      const swiper = this;
6201
+      if (swiper.params.lazy.enabled && swiper.params.cssMode) {
6202
+        swiper.lazy.load();
6203
+      }
6204
+    },
6205
+  },
6206
+};
6207
+
6208
+/* eslint no-bitwise: ["error", { "allow": [">>"] }] */
6209
+
6210
+const Controller = {
6211
+  LinearSpline: function LinearSpline(x, y) {
6212
+    const binarySearch = (function search() {
6213
+      let maxIndex;
6214
+      let minIndex;
6215
+      let guess;
6216
+      return (array, val) => {
6217
+        minIndex = -1;
6218
+        maxIndex = array.length;
6219
+        while (maxIndex - minIndex > 1) {
6220
+          guess = maxIndex + minIndex >> 1;
6221
+          if (array[guess] <= val) {
6222
+            minIndex = guess;
6223
+          } else {
6224
+            maxIndex = guess;
6225
+          }
6226
+        }
6227
+        return maxIndex;
6228
+      };
6229
+    }());
6230
+    this.x = x;
6231
+    this.y = y;
6232
+    this.lastIndex = x.length - 1;
6233
+    // Given an x value (x2), return the expected y2 value:
6234
+    // (x1,y1) is the known point before given value,
6235
+    // (x3,y3) is the known point after given value.
6236
+    let i1;
6237
+    let i3;
6238
+
6239
+    this.interpolate = function interpolate(x2) {
6240
+      if (!x2) return 0;
6241
+
6242
+      // Get the indexes of x1 and x3 (the array indexes before and after given x2):
6243
+      i3 = binarySearch(this.x, x2);
6244
+      i1 = i3 - 1;
6245
+
6246
+      // We have our indexes i1 & i3, so we can calculate already:
6247
+      // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
6248
+      return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1];
6249
+    };
6250
+    return this;
6251
+  },
6252
+  // xxx: for now i will just save one spline function to to
6253
+  getInterpolateFunction(c) {
6254
+    const swiper = this;
6255
+    if (!swiper.controller.spline) {
6256
+      swiper.controller.spline = swiper.params.loop
6257
+        ? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid)
6258
+        : new Controller.LinearSpline(swiper.snapGrid, c.snapGrid);
6259
+    }
6260
+  },
6261
+  setTranslate(setTranslate, byController) {
6262
+    const swiper = this;
6263
+    const controlled = swiper.controller.control;
6264
+    let multiplier;
6265
+    let controlledTranslate;
6266
+    function setControlledTranslate(c) {
6267
+      // this will create an Interpolate function based on the snapGrids
6268
+      // x is the Grid of the scrolled scroller and y will be the controlled scroller
6269
+      // it makes sense to create this only once and recall it for the interpolation
6270
+      // the function does a lot of value caching for performance
6271
+      const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
6272
+      if (swiper.params.controller.by === 'slide') {
6273
+        swiper.controller.getInterpolateFunction(c);
6274
+        // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
6275
+        // but it did not work out
6276
+        controlledTranslate = -swiper.controller.spline.interpolate(-translate);
6277
+      }
6278
+
6279
+      if (!controlledTranslate || swiper.params.controller.by === 'container') {
6280
+        multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());
6281
+        controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate();
6282
+      }
6283
+
6284
+      if (swiper.params.controller.inverse) {
6285
+        controlledTranslate = c.maxTranslate() - controlledTranslate;
6286
+      }
6287
+      c.updateProgress(controlledTranslate);
6288
+      c.setTranslate(controlledTranslate, swiper);
6289
+      c.updateActiveIndex();
6290
+      c.updateSlidesClasses();
6291
+    }
6292
+    if (Array.isArray(controlled)) {
6293
+      for (let i = 0; i < controlled.length; i += 1) {
6294
+        if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
6295
+          setControlledTranslate(controlled[i]);
6296
+        }
6297
+      }
6298
+    } else if (controlled instanceof Swiper && byController !== controlled) {
6299
+      setControlledTranslate(controlled);
6300
+    }
6301
+  },
6302
+  setTransition(duration, byController) {
6303
+    const swiper = this;
6304
+    const controlled = swiper.controller.control;
6305
+    let i;
6306
+    function setControlledTransition(c) {
6307
+      c.setTransition(duration, swiper);
6308
+      if (duration !== 0) {
6309
+        c.transitionStart();
6310
+        if (c.params.autoHeight) {
6311
+          Utils.nextTick(() => {
6312
+            c.updateAutoHeight();
6313
+          });
6314
+        }
6315
+        c.$wrapperEl.transitionEnd(() => {
6316
+          if (!controlled) return;
6317
+          if (c.params.loop && swiper.params.controller.by === 'slide') {
6318
+            c.loopFix();
6319
+          }
6320
+          c.transitionEnd();
6321
+        });
6322
+      }
6323
+    }
6324
+    if (Array.isArray(controlled)) {
6325
+      for (i = 0; i < controlled.length; i += 1) {
6326
+        if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
6327
+          setControlledTransition(controlled[i]);
6328
+        }
6329
+      }
6330
+    } else if (controlled instanceof Swiper && byController !== controlled) {
6331
+      setControlledTransition(controlled);
6332
+    }
6333
+  },
6334
+};
6335
+var controller = {
6336
+  name: 'controller',
6337
+  params: {
6338
+    controller: {
6339
+      control: undefined,
6340
+      inverse: false,
6341
+      by: 'slide', // or 'container'
6342
+    },
6343
+  },
6344
+  create() {
6345
+    const swiper = this;
6346
+    Utils.extend(swiper, {
6347
+      controller: {
6348
+        control: swiper.params.controller.control,
6349
+        getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper),
6350
+        setTranslate: Controller.setTranslate.bind(swiper),
6351
+        setTransition: Controller.setTransition.bind(swiper),
6352
+      },
6353
+    });
6354
+  },
6355
+  on: {
6356
+    update() {
6357
+      const swiper = this;
6358
+      if (!swiper.controller.control) return;
6359
+      if (swiper.controller.spline) {
6360
+        swiper.controller.spline = undefined;
6361
+        delete swiper.controller.spline;
6362
+      }
6363
+    },
6364
+    resize() {
6365
+      const swiper = this;
6366
+      if (!swiper.controller.control) return;
6367
+      if (swiper.controller.spline) {
6368
+        swiper.controller.spline = undefined;
6369
+        delete swiper.controller.spline;
6370
+      }
6371
+    },
6372
+    observerUpdate() {
6373
+      const swiper = this;
6374
+      if (!swiper.controller.control) return;
6375
+      if (swiper.controller.spline) {
6376
+        swiper.controller.spline = undefined;
6377
+        delete swiper.controller.spline;
6378
+      }
6379
+    },
6380
+    setTranslate(translate, byController) {
6381
+      const swiper = this;
6382
+      if (!swiper.controller.control) return;
6383
+      swiper.controller.setTranslate(translate, byController);
6384
+    },
6385
+    setTransition(duration, byController) {
6386
+      const swiper = this;
6387
+      if (!swiper.controller.control) return;
6388
+      swiper.controller.setTransition(duration, byController);
6389
+    },
6390
+  },
6391
+};
6392
+
6393
+const a11y = {
6394
+  makeElFocusable($el) {
6395
+    $el.attr('tabIndex', '0');
6396
+    return $el;
6397
+  },
6398
+  makeElNotFocusable($el) {
6399
+    $el.attr('tabIndex', '-1');
6400
+    return $el;
6401
+  },
6402
+  addElRole($el, role) {
6403
+    $el.attr('role', role);
6404
+    return $el;
6405
+  },
6406
+  addElLabel($el, label) {
6407
+    $el.attr('aria-label', label);
6408
+    return $el;
6409
+  },
6410
+  disableEl($el) {
6411
+    $el.attr('aria-disabled', true);
6412
+    return $el;
6413
+  },
6414
+  enableEl($el) {
6415
+    $el.attr('aria-disabled', false);
6416
+    return $el;
6417
+  },
6418
+  onEnterKey(e) {
6419
+    const swiper = this;
6420
+    const params = swiper.params.a11y;
6421
+    if (e.keyCode !== 13) return;
6422
+    const $targetEl = $(e.target);
6423
+    if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {
6424
+      if (!(swiper.isEnd && !swiper.params.loop)) {
6425
+        swiper.slideNext();
6426
+      }
6427
+      if (swiper.isEnd) {
6428
+        swiper.a11y.notify(params.lastSlideMessage);
6429
+      } else {
6430
+        swiper.a11y.notify(params.nextSlideMessage);
6431
+      }
6432
+    }
6433
+    if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {
6434
+      if (!(swiper.isBeginning && !swiper.params.loop)) {
6435
+        swiper.slidePrev();
6436
+      }
6437
+      if (swiper.isBeginning) {
6438
+        swiper.a11y.notify(params.firstSlideMessage);
6439
+      } else {
6440
+        swiper.a11y.notify(params.prevSlideMessage);
6441
+      }
6442
+    }
6443
+    if (swiper.pagination && $targetEl.is(`.${swiper.params.pagination.bulletClass}`)) {
6444
+      $targetEl[0].click();
6445
+    }
6446
+  },
6447
+  notify(message) {
6448
+    const swiper = this;
6449
+    const notification = swiper.a11y.liveRegion;
6450
+    if (notification.length === 0) return;
6451
+    notification.html('');
6452
+    notification.html(message);
6453
+  },
6454
+  updateNavigation() {
6455
+    const swiper = this;
6456
+
6457
+    if (swiper.params.loop || !swiper.navigation) return;
6458
+    const { $nextEl, $prevEl } = swiper.navigation;
6459
+
6460
+    if ($prevEl && $prevEl.length > 0) {
6461
+      if (swiper.isBeginning) {
6462
+        swiper.a11y.disableEl($prevEl);
6463
+        swiper.a11y.makeElNotFocusable($prevEl);
6464
+      } else {
6465
+        swiper.a11y.enableEl($prevEl);
6466
+        swiper.a11y.makeElFocusable($prevEl);
6467
+      }
6468
+    }
6469
+    if ($nextEl && $nextEl.length > 0) {
6470
+      if (swiper.isEnd) {
6471
+        swiper.a11y.disableEl($nextEl);
6472
+        swiper.a11y.makeElNotFocusable($nextEl);
6473
+      } else {
6474
+        swiper.a11y.enableEl($nextEl);
6475
+        swiper.a11y.makeElFocusable($nextEl);
6476
+      }
6477
+    }
6478
+  },
6479
+  updatePagination() {
6480
+    const swiper = this;
6481
+    const params = swiper.params.a11y;
6482
+    if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
6483
+      swiper.pagination.bullets.each((bulletIndex, bulletEl) => {
6484
+        const $bulletEl = $(bulletEl);
6485
+        swiper.a11y.makeElFocusable($bulletEl);
6486
+        swiper.a11y.addElRole($bulletEl, 'button');
6487
+        swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1));
6488
+      });
6489
+    }
6490
+  },
6491
+  init() {
6492
+    const swiper = this;
6493
+
6494
+    swiper.$el.append(swiper.a11y.liveRegion);
6495
+
6496
+    // Navigation
6497
+    const params = swiper.params.a11y;
6498
+    let $nextEl;
6499
+    let $prevEl;
6500
+    if (swiper.navigation && swiper.navigation.$nextEl) {
6501
+      $nextEl = swiper.navigation.$nextEl;
6502
+    }
6503
+    if (swiper.navigation && swiper.navigation.$prevEl) {
6504
+      $prevEl = swiper.navigation.$prevEl;
6505
+    }
6506
+    if ($nextEl) {
6507
+      swiper.a11y.makeElFocusable($nextEl);
6508
+      swiper.a11y.addElRole($nextEl, 'button');
6509
+      swiper.a11y.addElLabel($nextEl, params.nextSlideMessage);
6510
+      $nextEl.on('keydown', swiper.a11y.onEnterKey);
6511
+    }
6512
+    if ($prevEl) {
6513
+      swiper.a11y.makeElFocusable($prevEl);
6514
+      swiper.a11y.addElRole($prevEl, 'button');
6515
+      swiper.a11y.addElLabel($prevEl, params.prevSlideMessage);
6516
+      $prevEl.on('keydown', swiper.a11y.onEnterKey);
6517
+    }
6518
+
6519
+    // Pagination
6520
+    if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
6521
+      swiper.pagination.$el.on('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
6522
+    }
6523
+  },
6524
+  destroy() {
6525
+    const swiper = this;
6526
+    if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) swiper.a11y.liveRegion.remove();
6527
+
6528
+    let $nextEl;
6529
+    let $prevEl;
6530
+    if (swiper.navigation && swiper.navigation.$nextEl) {
6531
+      $nextEl = swiper.navigation.$nextEl;
6532
+    }
6533
+    if (swiper.navigation && swiper.navigation.$prevEl) {
6534
+      $prevEl = swiper.navigation.$prevEl;
6535
+    }
6536
+    if ($nextEl) {
6537
+      $nextEl.off('keydown', swiper.a11y.onEnterKey);
6538
+    }
6539
+    if ($prevEl) {
6540
+      $prevEl.off('keydown', swiper.a11y.onEnterKey);
6541
+    }
6542
+
6543
+    // Pagination
6544
+    if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
6545
+      swiper.pagination.$el.off('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
6546
+    }
6547
+  },
6548
+};
6549
+var a11y$1 = {
6550
+  name: 'a11y',
6551
+  params: {
6552
+    a11y: {
6553
+      enabled: true,
6554
+      notificationClass: 'swiper-notification',
6555
+      prevSlideMessage: 'Previous slide',
6556
+      nextSlideMessage: 'Next slide',
6557
+      firstSlideMessage: 'This is the first slide',
6558
+      lastSlideMessage: 'This is the last slide',
6559
+      paginationBulletMessage: 'Go to slide {{index}}',
6560
+    },
6561
+  },
6562
+  create() {
6563
+    const swiper = this;
6564
+    Utils.extend(swiper, {
6565
+      a11y: {
6566
+        liveRegion: $(`<span class="${swiper.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`),
6567
+      },
6568
+    });
6569
+    Object.keys(a11y).forEach((methodName) => {
6570
+      swiper.a11y[methodName] = a11y[methodName].bind(swiper);
6571
+    });
6572
+  },
6573
+  on: {
6574
+    init() {
6575
+      const swiper = this;
6576
+      if (!swiper.params.a11y.enabled) return;
6577
+      swiper.a11y.init();
6578
+      swiper.a11y.updateNavigation();
6579
+    },
6580
+    toEdge() {
6581
+      const swiper = this;
6582
+      if (!swiper.params.a11y.enabled) return;
6583
+      swiper.a11y.updateNavigation();
6584
+    },
6585
+    fromEdge() {
6586
+      const swiper = this;
6587
+      if (!swiper.params.a11y.enabled) return;
6588
+      swiper.a11y.updateNavigation();
6589
+    },
6590
+    paginationUpdate() {
6591
+      const swiper = this;
6592
+      if (!swiper.params.a11y.enabled) return;
6593
+      swiper.a11y.updatePagination();
6594
+    },
6595
+    destroy() {
6596
+      const swiper = this;
6597
+      if (!swiper.params.a11y.enabled) return;
6598
+      swiper.a11y.destroy();
6599
+    },
6600
+  },
6601
+};
6602
+
6603
+const History = {
6604
+  init() {
6605
+    const swiper = this;
6606
+    if (!swiper.params.history) return;
6607
+    if (!window.history || !window.history.pushState) {
6608
+      swiper.params.history.enabled = false;
6609
+      swiper.params.hashNavigation.enabled = true;
6610
+      return;
6611
+    }
6612
+    const history = swiper.history;
6613
+    history.initialized = true;
6614
+    history.paths = History.getPathValues();
6615
+    if (!history.paths.key && !history.paths.value) return;
6616
+    history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit);
6617
+    if (!swiper.params.history.replaceState) {
6618
+      window.addEventListener('popstate', swiper.history.setHistoryPopState);
6619
+    }
6620
+  },
6621
+  destroy() {
6622
+    const swiper = this;
6623
+    if (!swiper.params.history.replaceState) {
6624
+      window.removeEventListener('popstate', swiper.history.setHistoryPopState);
6625
+    }
6626
+  },
6627
+  setHistoryPopState() {
6628
+    const swiper = this;
6629
+    swiper.history.paths = History.getPathValues();
6630
+    swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false);
6631
+  },
6632
+  getPathValues() {
6633
+    const pathArray = window.location.pathname.slice(1).split('/').filter((part) => part !== '');
6634
+    const total = pathArray.length;
6635
+    const key = pathArray[total - 2];
6636
+    const value = pathArray[total - 1];
6637
+    return { key, value };
6638
+  },
6639
+  setHistory(key, index) {
6640
+    const swiper = this;
6641
+    if (!swiper.history.initialized || !swiper.params.history.enabled) return;
6642
+    const slide = swiper.slides.eq(index);
6643
+    let value = History.slugify(slide.attr('data-history'));
6644
+    if (!window.location.pathname.includes(key)) {
6645
+      value = `${key}/${value}`;
6646
+    }
6647
+    const currentState = window.history.state;
6648
+    if (currentState && currentState.value === value) {
6649
+      return;
6650
+    }
6651
+    if (swiper.params.history.replaceState) {
6652
+      window.history.replaceState({ value }, null, value);
6653
+    } else {
6654
+      window.history.pushState({ value }, null, value);
6655
+    }
6656
+  },
6657
+  slugify(text) {
6658
+    return text.toString()
6659
+      .replace(/\s+/g, '-')
6660
+      .replace(/[^\w-]+/g, '')
6661
+      .replace(/--+/g, '-')
6662
+      .replace(/^-+/, '')
6663
+      .replace(/-+$/, '');
6664
+  },
6665
+  scrollToSlide(speed, value, runCallbacks) {
6666
+    const swiper = this;
6667
+    if (value) {
6668
+      for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
6669
+        const slide = swiper.slides.eq(i);
6670
+        const slideHistory = History.slugify(slide.attr('data-history'));
6671
+        if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {
6672
+          const index = slide.index();
6673
+          swiper.slideTo(index, speed, runCallbacks);
6674
+        }
6675
+      }
6676
+    } else {
6677
+      swiper.slideTo(0, speed, runCallbacks);
6678
+    }
6679
+  },
6680
+};
6681
+
6682
+var history = {
6683
+  name: 'history',
6684
+  params: {
6685
+    history: {
6686
+      enabled: false,
6687
+      replaceState: false,
6688
+      key: 'slides',
6689
+    },
6690
+  },
6691
+  create() {
6692
+    const swiper = this;
6693
+    Utils.extend(swiper, {
6694
+      history: {
6695
+        init: History.init.bind(swiper),
6696
+        setHistory: History.setHistory.bind(swiper),
6697
+        setHistoryPopState: History.setHistoryPopState.bind(swiper),
6698
+        scrollToSlide: History.scrollToSlide.bind(swiper),
6699
+        destroy: History.destroy.bind(swiper),
6700
+      },
6701
+    });
6702
+  },
6703
+  on: {
6704
+    init() {
6705
+      const swiper = this;
6706
+      if (swiper.params.history.enabled) {
6707
+        swiper.history.init();
6708
+      }
6709
+    },
6710
+    destroy() {
6711
+      const swiper = this;
6712
+      if (swiper.params.history.enabled) {
6713
+        swiper.history.destroy();
6714
+      }
6715
+    },
6716
+    transitionEnd() {
6717
+      const swiper = this;
6718
+      if (swiper.history.initialized) {
6719
+        swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);
6720
+      }
6721
+    },
6722
+    slideChange() {
6723
+      const swiper = this;
6724
+      if (swiper.history.initialized && swiper.params.cssMode) {
6725
+        swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);
6726
+      }
6727
+    },
6728
+  },
6729
+};
6730
+
6731
+const HashNavigation = {
6732
+  onHashCange() {
6733
+    const swiper = this;
6734
+    swiper.emit('hashChange');
6735
+    const newHash = document$1.location.hash.replace('#', '');
6736
+    const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');
6737
+    if (newHash !== activeSlideHash) {
6738
+      const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash="${newHash}"]`).index();
6739
+      if (typeof newIndex === 'undefined') return;
6740
+      swiper.slideTo(newIndex);
6741
+    }
6742
+  },
6743
+  setHash() {
6744
+    const swiper = this;
6745
+    if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) return;
6746
+    if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {
6747
+      window.history.replaceState(null, null, (`#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || ''));
6748
+      swiper.emit('hashSet');
6749
+    } else {
6750
+      const slide = swiper.slides.eq(swiper.activeIndex);
6751
+      const hash = slide.attr('data-hash') || slide.attr('data-history');
6752
+      document$1.location.hash = hash || '';
6753
+      swiper.emit('hashSet');
6754
+    }
6755
+  },
6756
+  init() {
6757
+    const swiper = this;
6758
+    if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) return;
6759
+    swiper.hashNavigation.initialized = true;
6760
+    const hash = document$1.location.hash.replace('#', '');
6761
+    if (hash) {
6762
+      const speed = 0;
6763
+      for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
6764
+        const slide = swiper.slides.eq(i);
6765
+        const slideHash = slide.attr('data-hash') || slide.attr('data-history');
6766
+        if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {
6767
+          const index = slide.index();
6768
+          swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true);
6769
+        }
6770
+      }
6771
+    }
6772
+    if (swiper.params.hashNavigation.watchState) {
6773
+      $(window).on('hashchange', swiper.hashNavigation.onHashCange);
6774
+    }
6775
+  },
6776
+  destroy() {
6777
+    const swiper = this;
6778
+    if (swiper.params.hashNavigation.watchState) {
6779
+      $(window).off('hashchange', swiper.hashNavigation.onHashCange);
6780
+    }
6781
+  },
6782
+};
6783
+var hashNavigation = {
6784
+  name: 'hash-navigation',
6785
+  params: {
6786
+    hashNavigation: {
6787
+      enabled: false,
6788
+      replaceState: false,
6789
+      watchState: false,
6790
+    },
6791
+  },
6792
+  create() {
6793
+    const swiper = this;
6794
+    Utils.extend(swiper, {
6795
+      hashNavigation: {
6796
+        initialized: false,
6797
+        init: HashNavigation.init.bind(swiper),
6798
+        destroy: HashNavigation.destroy.bind(swiper),
6799
+        setHash: HashNavigation.setHash.bind(swiper),
6800
+        onHashCange: HashNavigation.onHashCange.bind(swiper),
6801
+      },
6802
+    });
6803
+  },
6804
+  on: {
6805
+    init() {
6806
+      const swiper = this;
6807
+      if (swiper.params.hashNavigation.enabled) {
6808
+        swiper.hashNavigation.init();
6809
+      }
6810
+    },
6811
+    destroy() {
6812
+      const swiper = this;
6813
+      if (swiper.params.hashNavigation.enabled) {
6814
+        swiper.hashNavigation.destroy();
6815
+      }
6816
+    },
6817
+    transitionEnd() {
6818
+      const swiper = this;
6819
+      if (swiper.hashNavigation.initialized) {
6820
+        swiper.hashNavigation.setHash();
6821
+      }
6822
+    },
6823
+    slideChange() {
6824
+      const swiper = this;
6825
+      if (swiper.hashNavigation.initialized && swiper.params.cssMode) {
6826
+        swiper.hashNavigation.setHash();
6827
+      }
6828
+    },
6829
+  },
6830
+};
6831
+
6832
+/* eslint no-underscore-dangle: "off" */
6833
+
6834
+const Autoplay = {
6835
+  run() {
6836
+    const swiper = this;
6837
+    const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);
6838
+    let delay = swiper.params.autoplay.delay;
6839
+    if ($activeSlideEl.attr('data-swiper-autoplay')) {
6840
+      delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;
6841
+    }
6842
+    clearTimeout(swiper.autoplay.timeout);
6843
+    swiper.autoplay.timeout = Utils.nextTick(() => {
6844
+      if (swiper.params.autoplay.reverseDirection) {
6845
+        if (swiper.params.loop) {
6846
+          swiper.loopFix();
6847
+          swiper.slidePrev(swiper.params.speed, true, true);
6848
+          swiper.emit('autoplay');
6849
+        } else if (!swiper.isBeginning) {
6850
+          swiper.slidePrev(swiper.params.speed, true, true);
6851
+          swiper.emit('autoplay');
6852
+        } else if (!swiper.params.autoplay.stopOnLastSlide) {
6853
+          swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);
6854
+          swiper.emit('autoplay');
6855
+        } else {
6856
+          swiper.autoplay.stop();
6857
+        }
6858
+      } else if (swiper.params.loop) {
6859
+        swiper.loopFix();
6860
+        swiper.slideNext(swiper.params.speed, true, true);
6861
+        swiper.emit('autoplay');
6862
+      } else if (!swiper.isEnd) {
6863
+        swiper.slideNext(swiper.params.speed, true, true);
6864
+        swiper.emit('autoplay');
6865
+      } else if (!swiper.params.autoplay.stopOnLastSlide) {
6866
+        swiper.slideTo(0, swiper.params.speed, true, true);
6867
+        swiper.emit('autoplay');
6868
+      } else {
6869
+        swiper.autoplay.stop();
6870
+      }
6871
+      if (swiper.params.cssMode && swiper.autoplay.running) swiper.autoplay.run();
6872
+    }, delay);
6873
+  },
6874
+  start() {
6875
+    const swiper = this;
6876
+    if (typeof swiper.autoplay.timeout !== 'undefined') return false;
6877
+    if (swiper.autoplay.running) return false;
6878
+    swiper.autoplay.running = true;
6879
+    swiper.emit('autoplayStart');
6880
+    swiper.autoplay.run();
6881
+    return true;
6882
+  },
6883
+  stop() {
6884
+    const swiper = this;
6885
+    if (!swiper.autoplay.running) return false;
6886
+    if (typeof swiper.autoplay.timeout === 'undefined') return false;
6887
+
6888
+    if (swiper.autoplay.timeout) {
6889
+      clearTimeout(swiper.autoplay.timeout);
6890
+      swiper.autoplay.timeout = undefined;
6891
+    }
6892
+    swiper.autoplay.running = false;
6893
+    swiper.emit('autoplayStop');
6894
+    return true;
6895
+  },
6896
+  pause(speed) {
6897
+    const swiper = this;
6898
+    if (!swiper.autoplay.running) return;
6899
+    if (swiper.autoplay.paused) return;
6900
+    if (swiper.autoplay.timeout) clearTimeout(swiper.autoplay.timeout);
6901
+    swiper.autoplay.paused = true;
6902
+    if (speed === 0 || !swiper.params.autoplay.waitForTransition) {
6903
+      swiper.autoplay.paused = false;
6904
+      swiper.autoplay.run();
6905
+    } else {
6906
+      swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd);
6907
+      swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
6908
+    }
6909
+  },
6910
+};
6911
+
6912
+var autoplay = {
6913
+  name: 'autoplay',
6914
+  params: {
6915
+    autoplay: {
6916
+      enabled: false,
6917
+      delay: 3000,
6918
+      waitForTransition: true,
6919
+      disableOnInteraction: true,
6920
+      stopOnLastSlide: false,
6921
+      reverseDirection: false,
6922
+    },
6923
+  },
6924
+  create() {
6925
+    const swiper = this;
6926
+    Utils.extend(swiper, {
6927
+      autoplay: {
6928
+        running: false,
6929
+        paused: false,
6930
+        run: Autoplay.run.bind(swiper),
6931
+        start: Autoplay.start.bind(swiper),
6932
+        stop: Autoplay.stop.bind(swiper),
6933
+        pause: Autoplay.pause.bind(swiper),
6934
+        onVisibilityChange() {
6935
+          if (document.visibilityState === 'hidden' && swiper.autoplay.running) {
6936
+            swiper.autoplay.pause();
6937
+          }
6938
+          if (document.visibilityState === 'visible' && swiper.autoplay.paused) {
6939
+            swiper.autoplay.run();
6940
+            swiper.autoplay.paused = false;
6941
+          }
6942
+        },
6943
+        onTransitionEnd(e) {
6944
+          if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;
6945
+          if (e.target !== this) return;
6946
+          swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd);
6947
+          swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
6948
+          swiper.autoplay.paused = false;
6949
+          if (!swiper.autoplay.running) {
6950
+            swiper.autoplay.stop();
6951
+          } else {
6952
+            swiper.autoplay.run();
6953
+          }
6954
+        },
6955
+      },
6956
+    });
6957
+  },
6958
+  on: {
6959
+    init() {
6960
+      const swiper = this;
6961
+      if (swiper.params.autoplay.enabled) {
6962
+        swiper.autoplay.start();
6963
+        document.addEventListener('visibilitychange', swiper.autoplay.onVisibilityChange);
6964
+      }
6965
+    },
6966
+    beforeTransitionStart(speed, internal) {
6967
+      const swiper = this;
6968
+      if (swiper.autoplay.running) {
6969
+        if (internal || !swiper.params.autoplay.disableOnInteraction) {
6970
+          swiper.autoplay.pause(speed);
6971
+        } else {
6972
+          swiper.autoplay.stop();
6973
+        }
6974
+      }
6975
+    },
6976
+    sliderFirstMove() {
6977
+      const swiper = this;
6978
+      if (swiper.autoplay.running) {
6979
+        if (swiper.params.autoplay.disableOnInteraction) {
6980
+          swiper.autoplay.stop();
6981
+        } else {
6982
+          swiper.autoplay.pause();
6983
+        }
6984
+      }
6985
+    },
6986
+    touchEnd() {
6987
+      const swiper = this;
6988
+      if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) {
6989
+        swiper.autoplay.run();
6990
+      }
6991
+    },
6992
+    destroy() {
6993
+      const swiper = this;
6994
+      if (swiper.autoplay.running) {
6995
+        swiper.autoplay.stop();
6996
+      }
6997
+      document.removeEventListener('visibilitychange', swiper.autoplay.onVisibilityChange);
6998
+    },
6999
+  },
7000
+};
7001
+
7002
+const Fade = {
7003
+  setTranslate() {
7004
+    const swiper = this;
7005
+    const { slides } = swiper;
7006
+    for (let i = 0; i < slides.length; i += 1) {
7007
+      const $slideEl = swiper.slides.eq(i);
7008
+      const offset = $slideEl[0].swiperSlideOffset;
7009
+      let tx = -offset;
7010
+      if (!swiper.params.virtualTranslate) tx -= swiper.translate;
7011
+      let ty = 0;
7012
+      if (!swiper.isHorizontal()) {
7013
+        ty = tx;
7014
+        tx = 0;
7015
+      }
7016
+      const slideOpacity = swiper.params.fadeEffect.crossFade
7017
+        ? Math.max(1 - Math.abs($slideEl[0].progress), 0)
7018
+        : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);
7019
+      $slideEl
7020
+        .css({
7021
+          opacity: slideOpacity,
7022
+        })
7023
+        .transform(`translate3d(${tx}px, ${ty}px, 0px)`);
7024
+    }
7025
+  },
7026
+  setTransition(duration) {
7027
+    const swiper = this;
7028
+    const { slides, $wrapperEl } = swiper;
7029
+    slides.transition(duration);
7030
+    if (swiper.params.virtualTranslate && duration !== 0) {
7031
+      let eventTriggered = false;
7032
+      slides.transitionEnd(() => {
7033
+        if (eventTriggered) return;
7034
+        if (!swiper || swiper.destroyed) return;
7035
+        eventTriggered = true;
7036
+        swiper.animating = false;
7037
+        const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
7038
+        for (let i = 0; i < triggerEvents.length; i += 1) {
7039
+          $wrapperEl.trigger(triggerEvents[i]);
7040
+        }
7041
+      });
7042
+    }
7043
+  },
7044
+};
7045
+
7046
+var effectFade = {
7047
+  name: 'effect-fade',
7048
+  params: {
7049
+    fadeEffect: {
7050
+      crossFade: false,
7051
+    },
7052
+  },
7053
+  create() {
7054
+    const swiper = this;
7055
+    Utils.extend(swiper, {
7056
+      fadeEffect: {
7057
+        setTranslate: Fade.setTranslate.bind(swiper),
7058
+        setTransition: Fade.setTransition.bind(swiper),
7059
+      },
7060
+    });
7061
+  },
7062
+  on: {
7063
+    beforeInit() {
7064
+      const swiper = this;
7065
+      if (swiper.params.effect !== 'fade') return;
7066
+      swiper.classNames.push(`${swiper.params.containerModifierClass}fade`);
7067
+      const overwriteParams = {
7068
+        slidesPerView: 1,
7069
+        slidesPerColumn: 1,
7070
+        slidesPerGroup: 1,
7071
+        watchSlidesProgress: true,
7072
+        spaceBetween: 0,
7073
+        virtualTranslate: true,
7074
+      };
7075
+      Utils.extend(swiper.params, overwriteParams);
7076
+      Utils.extend(swiper.originalParams, overwriteParams);
7077
+    },
7078
+    setTranslate() {
7079
+      const swiper = this;
7080
+      if (swiper.params.effect !== 'fade') return;
7081
+      swiper.fadeEffect.setTranslate();
7082
+    },
7083
+    setTransition(duration) {
7084
+      const swiper = this;
7085
+      if (swiper.params.effect !== 'fade') return;
7086
+      swiper.fadeEffect.setTransition(duration);
7087
+    },
7088
+  },
7089
+};
7090
+
7091
+const Cube = {
7092
+  setTranslate() {
7093
+    const swiper = this;
7094
+    const {
7095
+      $el, $wrapperEl, slides, width: swiperWidth, height: swiperHeight, rtlTranslate: rtl, size: swiperSize,
7096
+    } = swiper;
7097
+    const params = swiper.params.cubeEffect;
7098
+    const isHorizontal = swiper.isHorizontal();
7099
+    const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
7100
+    let wrapperRotate = 0;
7101
+    let $cubeShadowEl;
7102
+    if (params.shadow) {
7103
+      if (isHorizontal) {
7104
+        $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');
7105
+        if ($cubeShadowEl.length === 0) {
7106
+          $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
7107
+          $wrapperEl.append($cubeShadowEl);
7108
+        }
7109
+        $cubeShadowEl.css({ height: `${swiperWidth}px` });
7110
+      } else {
7111
+        $cubeShadowEl = $el.find('.swiper-cube-shadow');
7112
+        if ($cubeShadowEl.length === 0) {
7113
+          $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
7114
+          $el.append($cubeShadowEl);
7115
+        }
7116
+      }
7117
+    }
7118
+    for (let i = 0; i < slides.length; i += 1) {
7119
+      const $slideEl = slides.eq(i);
7120
+      let slideIndex = i;
7121
+      if (isVirtual) {
7122
+        slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);
7123
+      }
7124
+      let slideAngle = slideIndex * 90;
7125
+      let round = Math.floor(slideAngle / 360);
7126
+      if (rtl) {
7127
+        slideAngle = -slideAngle;
7128
+        round = Math.floor(-slideAngle / 360);
7129
+      }
7130
+      const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
7131
+      let tx = 0;
7132
+      let ty = 0;
7133
+      let tz = 0;
7134
+      if (slideIndex % 4 === 0) {
7135
+        tx = -round * 4 * swiperSize;
7136
+        tz = 0;
7137
+      } else if ((slideIndex - 1) % 4 === 0) {
7138
+        tx = 0;
7139
+        tz = -round * 4 * swiperSize;
7140
+      } else if ((slideIndex - 2) % 4 === 0) {
7141
+        tx = swiperSize + (round * 4 * swiperSize);
7142
+        tz = swiperSize;
7143
+      } else if ((slideIndex - 3) % 4 === 0) {
7144
+        tx = -swiperSize;
7145
+        tz = (3 * swiperSize) + (swiperSize * 4 * round);
7146
+      }
7147
+      if (rtl) {
7148
+        tx = -tx;
7149
+      }
7150
+
7151
+      if (!isHorizontal) {
7152
+        ty = tx;
7153
+        tx = 0;
7154
+      }
7155
+
7156
+      const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;
7157
+      if (progress <= 1 && progress > -1) {
7158
+        wrapperRotate = (slideIndex * 90) + (progress * 90);
7159
+        if (rtl) wrapperRotate = (-slideIndex * 90) - (progress * 90);
7160
+      }
7161
+      $slideEl.transform(transform);
7162
+      if (params.slideShadows) {
7163
+        // Set shadows
7164
+        let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
7165
+        let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
7166
+        if (shadowBefore.length === 0) {
7167
+          shadowBefore = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
7168
+          $slideEl.append(shadowBefore);
7169
+        }
7170
+        if (shadowAfter.length === 0) {
7171
+          shadowAfter = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
7172
+          $slideEl.append(shadowAfter);
7173
+        }
7174
+        if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
7175
+        if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
7176
+      }
7177
+    }
7178
+    $wrapperEl.css({
7179
+      '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,
7180
+      '-moz-transform-origin': `50% 50% -${swiperSize / 2}px`,
7181
+      '-ms-transform-origin': `50% 50% -${swiperSize / 2}px`,
7182
+      'transform-origin': `50% 50% -${swiperSize / 2}px`,
7183
+    });
7184
+
7185
+    if (params.shadow) {
7186
+      if (isHorizontal) {
7187
+        $cubeShadowEl.transform(`translate3d(0px, ${(swiperWidth / 2) + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`);
7188
+      } else {
7189
+        const shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90);
7190
+        const multiplier = 1.5 - (
7191
+          (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2)
7192
+          + (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2)
7193
+        );
7194
+        const scale1 = params.shadowScale;
7195
+        const scale2 = params.shadowScale / multiplier;
7196
+        const offset = params.shadowOffset;
7197
+        $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${(swiperHeight / 2) + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`);
7198
+      }
7199
+    }
7200
+    const zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0;
7201
+    $wrapperEl
7202
+      .transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`);
7203
+  },
7204
+  setTransition(duration) {
7205
+    const swiper = this;
7206
+    const { $el, slides } = swiper;
7207
+    slides
7208
+      .transition(duration)
7209
+      .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
7210
+      .transition(duration);
7211
+    if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {
7212
+      $el.find('.swiper-cube-shadow').transition(duration);
7213
+    }
7214
+  },
7215
+};
7216
+
7217
+var effectCube = {
7218
+  name: 'effect-cube',
7219
+  params: {
7220
+    cubeEffect: {
7221
+      slideShadows: true,
7222
+      shadow: true,
7223
+      shadowOffset: 20,
7224
+      shadowScale: 0.94,
7225
+    },
7226
+  },
7227
+  create() {
7228
+    const swiper = this;
7229
+    Utils.extend(swiper, {
7230
+      cubeEffect: {
7231
+        setTranslate: Cube.setTranslate.bind(swiper),
7232
+        setTransition: Cube.setTransition.bind(swiper),
7233
+      },
7234
+    });
7235
+  },
7236
+  on: {
7237
+    beforeInit() {
7238
+      const swiper = this;
7239
+      if (swiper.params.effect !== 'cube') return;
7240
+      swiper.classNames.push(`${swiper.params.containerModifierClass}cube`);
7241
+      swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
7242
+      const overwriteParams = {
7243
+        slidesPerView: 1,
7244
+        slidesPerColumn: 1,
7245
+        slidesPerGroup: 1,
7246
+        watchSlidesProgress: true,
7247
+        resistanceRatio: 0,
7248
+        spaceBetween: 0,
7249
+        centeredSlides: false,
7250
+        virtualTranslate: true,
7251
+      };
7252
+      Utils.extend(swiper.params, overwriteParams);
7253
+      Utils.extend(swiper.originalParams, overwriteParams);
7254
+    },
7255
+    setTranslate() {
7256
+      const swiper = this;
7257
+      if (swiper.params.effect !== 'cube') return;
7258
+      swiper.cubeEffect.setTranslate();
7259
+    },
7260
+    setTransition(duration) {
7261
+      const swiper = this;
7262
+      if (swiper.params.effect !== 'cube') return;
7263
+      swiper.cubeEffect.setTransition(duration);
7264
+    },
7265
+  },
7266
+};
7267
+
7268
+const Flip = {
7269
+  setTranslate() {
7270
+    const swiper = this;
7271
+    const { slides, rtlTranslate: rtl } = swiper;
7272
+    for (let i = 0; i < slides.length; i += 1) {
7273
+      const $slideEl = slides.eq(i);
7274
+      let progress = $slideEl[0].progress;
7275
+      if (swiper.params.flipEffect.limitRotation) {
7276
+        progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
7277
+      }
7278
+      const offset = $slideEl[0].swiperSlideOffset;
7279
+      const rotate = -180 * progress;
7280
+      let rotateY = rotate;
7281
+      let rotateX = 0;
7282
+      let tx = -offset;
7283
+      let ty = 0;
7284
+      if (!swiper.isHorizontal()) {
7285
+        ty = tx;
7286
+        tx = 0;
7287
+        rotateX = -rotateY;
7288
+        rotateY = 0;
7289
+      } else if (rtl) {
7290
+        rotateY = -rotateY;
7291
+      }
7292
+
7293
+      $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;
7294
+
7295
+      if (swiper.params.flipEffect.slideShadows) {
7296
+        // Set shadows
7297
+        let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
7298
+        let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
7299
+        if (shadowBefore.length === 0) {
7300
+          shadowBefore = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'left' : 'top'}"></div>`);
7301
+          $slideEl.append(shadowBefore);
7302
+        }
7303
+        if (shadowAfter.length === 0) {
7304
+          shadowAfter = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'right' : 'bottom'}"></div>`);
7305
+          $slideEl.append(shadowAfter);
7306
+        }
7307
+        if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
7308
+        if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
7309
+      }
7310
+      $slideEl
7311
+        .transform(`translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`);
7312
+    }
7313
+  },
7314
+  setTransition(duration) {
7315
+    const swiper = this;
7316
+    const { slides, activeIndex, $wrapperEl } = swiper;
7317
+    slides
7318
+      .transition(duration)
7319
+      .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
7320
+      .transition(duration);
7321
+    if (swiper.params.virtualTranslate && duration !== 0) {
7322
+      let eventTriggered = false;
7323
+      // eslint-disable-next-line
7324
+      slides.eq(activeIndex).transitionEnd(function onTransitionEnd() {
7325
+        if (eventTriggered) return;
7326
+        if (!swiper || swiper.destroyed) return;
7327
+        // if (!$(this).hasClass(swiper.params.slideActiveClass)) return;
7328
+        eventTriggered = true;
7329
+        swiper.animating = false;
7330
+        const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
7331
+        for (let i = 0; i < triggerEvents.length; i += 1) {
7332
+          $wrapperEl.trigger(triggerEvents[i]);
7333
+        }
7334
+      });
7335
+    }
7336
+  },
7337
+};
7338
+
7339
+var effectFlip = {
7340
+  name: 'effect-flip',
7341
+  params: {
7342
+    flipEffect: {
7343
+      slideShadows: true,
7344
+      limitRotation: true,
7345
+    },
7346
+  },
7347
+  create() {
7348
+    const swiper = this;
7349
+    Utils.extend(swiper, {
7350
+      flipEffect: {
7351
+        setTranslate: Flip.setTranslate.bind(swiper),
7352
+        setTransition: Flip.setTransition.bind(swiper),
7353
+      },
7354
+    });
7355
+  },
7356
+  on: {
7357
+    beforeInit() {
7358
+      const swiper = this;
7359
+      if (swiper.params.effect !== 'flip') return;
7360
+      swiper.classNames.push(`${swiper.params.containerModifierClass}flip`);
7361
+      swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
7362
+      const overwriteParams = {
7363
+        slidesPerView: 1,
7364
+        slidesPerColumn: 1,
7365
+        slidesPerGroup: 1,
7366
+        watchSlidesProgress: true,
7367
+        spaceBetween: 0,
7368
+        virtualTranslate: true,
7369
+      };
7370
+      Utils.extend(swiper.params, overwriteParams);
7371
+      Utils.extend(swiper.originalParams, overwriteParams);
7372
+    },
7373
+    setTranslate() {
7374
+      const swiper = this;
7375
+      if (swiper.params.effect !== 'flip') return;
7376
+      swiper.flipEffect.setTranslate();
7377
+    },
7378
+    setTransition(duration) {
7379
+      const swiper = this;
7380
+      if (swiper.params.effect !== 'flip') return;
7381
+      swiper.flipEffect.setTransition(duration);
7382
+    },
7383
+  },
7384
+};
7385
+
7386
+const Coverflow = {
7387
+  setTranslate() {
7388
+    const swiper = this;
7389
+    const {
7390
+      width: swiperWidth, height: swiperHeight, slides, $wrapperEl, slidesSizesGrid,
7391
+    } = swiper;
7392
+    const params = swiper.params.coverflowEffect;
7393
+    const isHorizontal = swiper.isHorizontal();
7394
+    const transform = swiper.translate;
7395
+    const center = isHorizontal ? -transform + (swiperWidth / 2) : -transform + (swiperHeight / 2);
7396
+    const rotate = isHorizontal ? params.rotate : -params.rotate;
7397
+    const translate = params.depth;
7398
+    // Each slide offset from center
7399
+    for (let i = 0, length = slides.length; i < length; i += 1) {
7400
+      const $slideEl = slides.eq(i);
7401
+      const slideSize = slidesSizesGrid[i];
7402
+      const slideOffset = $slideEl[0].swiperSlideOffset;
7403
+      const offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier;
7404
+
7405
+      let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
7406
+      let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
7407
+      // var rotateZ = 0
7408
+      let translateZ = -translate * Math.abs(offsetMultiplier);
7409
+
7410
+      let stretch = params.stretch;
7411
+      // Allow percentage to make a relative stretch for responsive sliders
7412
+      if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) {
7413
+        stretch = ((parseFloat(params.stretch) / 100) * slideSize);
7414
+      }
7415
+      let translateY = isHorizontal ? 0 : stretch * (offsetMultiplier);
7416
+      let translateX = isHorizontal ? stretch * (offsetMultiplier) : 0;
7417
+
7418
+      // Fix for ultra small values
7419
+      if (Math.abs(translateX) < 0.001) translateX = 0;
7420
+      if (Math.abs(translateY) < 0.001) translateY = 0;
7421
+      if (Math.abs(translateZ) < 0.001) translateZ = 0;
7422
+      if (Math.abs(rotateY) < 0.001) rotateY = 0;
7423
+      if (Math.abs(rotateX) < 0.001) rotateX = 0;
7424
+
7425
+      const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px)  rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
7426
+
7427
+      $slideEl.transform(slideTransform);
7428
+      $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
7429
+      if (params.slideShadows) {
7430
+        // Set shadows
7431
+        let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
7432
+        let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
7433
+        if ($shadowBeforeEl.length === 0) {
7434
+          $shadowBeforeEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
7435
+          $slideEl.append($shadowBeforeEl);
7436
+        }
7437
+        if ($shadowAfterEl.length === 0) {
7438
+          $shadowAfterEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
7439
+          $slideEl.append($shadowAfterEl);
7440
+        }
7441
+        if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
7442
+        if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;
7443
+      }
7444
+    }
7445
+
7446
+    // Set correct perspective for IE10
7447
+    if (Support.pointerEvents || Support.prefixedPointerEvents) {
7448
+      const ws = $wrapperEl[0].style;
7449
+      ws.perspectiveOrigin = `${center}px 50%`;
7450
+    }
7451
+  },
7452
+  setTransition(duration) {
7453
+    const swiper = this;
7454
+    swiper.slides
7455
+      .transition(duration)
7456
+      .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
7457
+      .transition(duration);
7458
+  },
7459
+};
7460
+
7461
+var effectCoverflow = {
7462
+  name: 'effect-coverflow',
7463
+  params: {
7464
+    coverflowEffect: {
7465
+      rotate: 50,
7466
+      stretch: 0,
7467
+      depth: 100,
7468
+      modifier: 1,
7469
+      slideShadows: true,
7470
+    },
7471
+  },
7472
+  create() {
7473
+    const swiper = this;
7474
+    Utils.extend(swiper, {
7475
+      coverflowEffect: {
7476
+        setTranslate: Coverflow.setTranslate.bind(swiper),
7477
+        setTransition: Coverflow.setTransition.bind(swiper),
7478
+      },
7479
+    });
7480
+  },
7481
+  on: {
7482
+    beforeInit() {
7483
+      const swiper = this;
7484
+      if (swiper.params.effect !== 'coverflow') return;
7485
+
7486
+      swiper.classNames.push(`${swiper.params.containerModifierClass}coverflow`);
7487
+      swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
7488
+
7489
+      swiper.params.watchSlidesProgress = true;
7490
+      swiper.originalParams.watchSlidesProgress = true;
7491
+    },
7492
+    setTranslate() {
7493
+      const swiper = this;
7494
+      if (swiper.params.effect !== 'coverflow') return;
7495
+      swiper.coverflowEffect.setTranslate();
7496
+    },
7497
+    setTransition(duration) {
7498
+      const swiper = this;
7499
+      if (swiper.params.effect !== 'coverflow') return;
7500
+      swiper.coverflowEffect.setTransition(duration);
7501
+    },
7502
+  },
7503
+};
7504
+
7505
+const Thumbs = {
7506
+  init() {
7507
+    const swiper = this;
7508
+    const { thumbs: thumbsParams } = swiper.params;
7509
+    const SwiperClass = swiper.constructor;
7510
+    if (thumbsParams.swiper instanceof SwiperClass) {
7511
+      swiper.thumbs.swiper = thumbsParams.swiper;
7512
+      Utils.extend(swiper.thumbs.swiper.originalParams, {
7513
+        watchSlidesProgress: true,
7514
+        slideToClickedSlide: false,
7515
+      });
7516
+      Utils.extend(swiper.thumbs.swiper.params, {
7517
+        watchSlidesProgress: true,
7518
+        slideToClickedSlide: false,
7519
+      });
7520
+    } else if (Utils.isObject(thumbsParams.swiper)) {
7521
+      swiper.thumbs.swiper = new SwiperClass(Utils.extend({}, thumbsParams.swiper, {
7522
+        watchSlidesVisibility: true,
7523
+        watchSlidesProgress: true,
7524
+        slideToClickedSlide: false,
7525
+      }));
7526
+      swiper.thumbs.swiperCreated = true;
7527
+    }
7528
+    swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);
7529
+    swiper.thumbs.swiper.on('tap', swiper.thumbs.onThumbClick);
7530
+  },
7531
+  onThumbClick() {
7532
+    const swiper = this;
7533
+    const thumbsSwiper = swiper.thumbs.swiper;
7534
+    if (!thumbsSwiper) return;
7535
+    const clickedIndex = thumbsSwiper.clickedIndex;
7536
+    const clickedSlide = thumbsSwiper.clickedSlide;
7537
+    if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return;
7538
+    if (typeof clickedIndex === 'undefined' || clickedIndex === null) return;
7539
+    let slideToIndex;
7540
+    if (thumbsSwiper.params.loop) {
7541
+      slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10);
7542
+    } else {
7543
+      slideToIndex = clickedIndex;
7544
+    }
7545
+    if (swiper.params.loop) {
7546
+      let currentIndex = swiper.activeIndex;
7547
+      if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) {
7548
+        swiper.loopFix();
7549
+        // eslint-disable-next-line
7550
+        swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
7551
+        currentIndex = swiper.activeIndex;
7552
+      }
7553
+      const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index();
7554
+      const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index();
7555
+      if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;
7556
+      else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;
7557
+      else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;
7558
+      else slideToIndex = prevIndex;
7559
+    }
7560
+    swiper.slideTo(slideToIndex);
7561
+  },
7562
+  update(initial) {
7563
+    const swiper = this;
7564
+    const thumbsSwiper = swiper.thumbs.swiper;
7565
+    if (!thumbsSwiper) return;
7566
+
7567
+    const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto'
7568
+      ? thumbsSwiper.slidesPerViewDynamic()
7569
+      : thumbsSwiper.params.slidesPerView;
7570
+
7571
+    const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;
7572
+    const useOffset = autoScrollOffset && !thumbsSwiper.params.loop;
7573
+    if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {
7574
+      let currentThumbsIndex = thumbsSwiper.activeIndex;
7575
+      let newThumbsIndex;
7576
+      let direction;
7577
+      if (thumbsSwiper.params.loop) {
7578
+        if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) {
7579
+          thumbsSwiper.loopFix();
7580
+          // eslint-disable-next-line
7581
+          thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft;
7582
+          currentThumbsIndex = thumbsSwiper.activeIndex;
7583
+        }
7584
+        // Find actual thumbs index to slide to
7585
+        const prevThumbsIndex = thumbsSwiper.slides
7586
+          .eq(currentThumbsIndex)
7587
+          .prevAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0)
7588
+          .index();
7589
+        const nextThumbsIndex = thumbsSwiper.slides
7590
+          .eq(currentThumbsIndex)
7591
+          .nextAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0)
7592
+          .index();
7593
+        if (typeof prevThumbsIndex === 'undefined') newThumbsIndex = nextThumbsIndex;
7594
+        else if (typeof nextThumbsIndex === 'undefined') newThumbsIndex = prevThumbsIndex;
7595
+        else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) newThumbsIndex = currentThumbsIndex;
7596
+        else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) newThumbsIndex = nextThumbsIndex;
7597
+        else newThumbsIndex = prevThumbsIndex;
7598
+        direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';
7599
+      } else {
7600
+        newThumbsIndex = swiper.realIndex;
7601
+        direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev';
7602
+      }
7603
+      if (useOffset) {
7604
+        newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset;
7605
+      }
7606
+
7607
+      if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {
7608
+        if (thumbsSwiper.params.centeredSlides) {
7609
+          if (newThumbsIndex > currentThumbsIndex) {
7610
+            newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;
7611
+          } else {
7612
+            newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;
7613
+          }
7614
+        } else if (newThumbsIndex > currentThumbsIndex) {
7615
+          newThumbsIndex = newThumbsIndex - slidesPerView + 1;
7616
+        }
7617
+        thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);
7618
+      }
7619
+    }
7620
+
7621
+    // Activate thumbs
7622
+    let thumbsToActivate = 1;
7623
+    const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;
7624
+
7625
+    if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {
7626
+      thumbsToActivate = swiper.params.slidesPerView;
7627
+    }
7628
+
7629
+    if (!swiper.params.thumbs.multipleActiveThumbs) {
7630
+      thumbsToActivate = 1;
7631
+    }
7632
+
7633
+    thumbsToActivate = Math.floor(thumbsToActivate);
7634
+
7635
+    thumbsSwiper.slides.removeClass(thumbActiveClass);
7636
+    if (thumbsSwiper.params.loop || (thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled)) {
7637
+      for (let i = 0; i < thumbsToActivate; i += 1) {
7638
+        thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index="${swiper.realIndex + i}"]`).addClass(thumbActiveClass);
7639
+      }
7640
+    } else {
7641
+      for (let i = 0; i < thumbsToActivate; i += 1) {
7642
+        thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass);
7643
+      }
7644
+    }
7645
+  },
7646
+};
7647
+var thumbs = {
7648
+  name: 'thumbs',
7649
+  params: {
7650
+    thumbs: {
7651
+      swiper: null,
7652
+      multipleActiveThumbs: true,
7653
+      autoScrollOffset: 0,
7654
+      slideThumbActiveClass: 'swiper-slide-thumb-active',
7655
+      thumbsContainerClass: 'swiper-container-thumbs',
7656
+    },
7657
+  },
7658
+  create() {
7659
+    const swiper = this;
7660
+    Utils.extend(swiper, {
7661
+      thumbs: {
7662
+        swiper: null,
7663
+        init: Thumbs.init.bind(swiper),
7664
+        update: Thumbs.update.bind(swiper),
7665
+        onThumbClick: Thumbs.onThumbClick.bind(swiper),
7666
+      },
7667
+    });
7668
+  },
7669
+  on: {
7670
+    beforeInit() {
7671
+      const swiper = this;
7672
+      const { thumbs } = swiper.params;
7673
+      if (!thumbs || !thumbs.swiper) return;
7674
+      swiper.thumbs.init();
7675
+      swiper.thumbs.update(true);
7676
+    },
7677
+    slideChange() {
7678
+      const swiper = this;
7679
+      if (!swiper.thumbs.swiper) return;
7680
+      swiper.thumbs.update();
7681
+    },
7682
+    update() {
7683
+      const swiper = this;
7684
+      if (!swiper.thumbs.swiper) return;
7685
+      swiper.thumbs.update();
7686
+    },
7687
+    resize() {
7688
+      const swiper = this;
7689
+      if (!swiper.thumbs.swiper) return;
7690
+      swiper.thumbs.update();
7691
+    },
7692
+    observerUpdate() {
7693
+      const swiper = this;
7694
+      if (!swiper.thumbs.swiper) return;
7695
+      swiper.thumbs.update();
7696
+    },
7697
+    setTransition(duration) {
7698
+      const swiper = this;
7699
+      const thumbsSwiper = swiper.thumbs.swiper;
7700
+      if (!thumbsSwiper) return;
7701
+      thumbsSwiper.setTransition(duration);
7702
+    },
7703
+    beforeDestroy() {
7704
+      const swiper = this;
7705
+      const thumbsSwiper = swiper.thumbs.swiper;
7706
+      if (!thumbsSwiper) return;
7707
+      if (swiper.thumbs.swiperCreated && thumbsSwiper) {
7708
+        thumbsSwiper.destroy();
7709
+      }
7710
+    },
7711
+  },
7712
+};
7713
+
7714
+// Swiper Class
7715
+
7716
+const components = [
7717
+  Device$1,
7718
+  Support$1,
7719
+  Browser$1,
7720
+  Resize,
7721
+  Observer$1,
7722
+  
7723
+];
7724
+
7725
+if (typeof Swiper.use === 'undefined') {
7726
+  Swiper.use = Swiper.Class.use;
7727
+  Swiper.installModule = Swiper.Class.installModule;
7728
+}
7729
+
7730
+Swiper.use(components);
7731
+
7732
+export { a11y$1 as A11y, autoplay as Autoplay, controller as Controller, effectCoverflow as EffectCoverflow, effectCube as EffectCube, effectFade as EffectFade, effectFlip as EffectFlip, hashNavigation as HashNavigation, history as History, keyboard as Keyboard, lazy as Lazy, mousewheel as Mousewheel, navigation as Navigation, pagination as Pagination, parallax as Parallax, scrollbar as Scrollbar, Swiper, thumbs as Thumbs, virtual as Virtual, zoom as Zoom };
7733
+//# sourceMappingURL=swiper.esm.js.map