diff --git a/components.json b/components.json index 61f0d78..74fbd74 100644 --- a/components.json +++ b/components.json @@ -16,6 +16,11 @@ "url" :"react/build/?slider", "authorName" : "kevintamakuwala", "imgUrl" : "./images/slider.png" + }, + { + "name" : "Pagination", + "url" :"react/build/?pagination", + "authorName" : "kevintamakuwala", + "imgUrl" : "./images/pagination.png" } - ] \ No newline at end of file diff --git a/components/react/README.md b/components/react/README.md index 3801d08..52ec80f 100644 --- a/components/react/README.md +++ b/components/react/README.md @@ -13,30 +13,4 @@ 1. Always explicitly, **build the react project, every-time before committing** `npm run build`. Only then your changes will be reflected in static build. 2. Make sure the Urls in package.json and Layout.jsx are production friendly, as mentioned earlier. (Refer code for more understanding). -## Use "npm start" in react-components directory to start the react project. -## This React Project contains all the react based components. This project can be viewed [http://localhost:3000](http://localhost:3000) followed by the SLUG (Endpoint) of the components. -## Multiple other components can be created in the pages directory of this project. The "Layout" page holds the list of components made in react. -## Error page holds error message for invalid request. -## Routes are present in app.js file. ------------------------------------------------------------------ - -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. - -The page will reload when you make changes.\ -You may also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. diff --git a/components/react/build/asset-manifest.json b/components/react/build/asset-manifest.json index 2fb403a..9aafdd7 100644 --- a/components/react/build/asset-manifest.json +++ b/components/react/build/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { - "main.css": "/Frontend-Treasure/components/react/build/static/css/main.7c33173d.css", - "main.js": "/Frontend-Treasure/components/react/build/static/js/main.02646e9a.js", + "main.css": "/Frontend-Treasure/components/react/build/static/css/main.693f2cad.css", + "main.js": "/Frontend-Treasure/components/react/build/static/js/main.7087bd13.js", "index.html": "/Frontend-Treasure/components/react/build/index.html", - "main.7c33173d.css.map": "/Frontend-Treasure/components/react/build/static/css/main.7c33173d.css.map", - "main.02646e9a.js.map": "/Frontend-Treasure/components/react/build/static/js/main.02646e9a.js.map" + "main.693f2cad.css.map": "/Frontend-Treasure/components/react/build/static/css/main.693f2cad.css.map", + "main.7087bd13.js.map": "/Frontend-Treasure/components/react/build/static/js/main.7087bd13.js.map" }, "entrypoints": [ - "static/css/main.7c33173d.css", - "static/js/main.02646e9a.js" + "static/css/main.693f2cad.css", + "static/js/main.7087bd13.js" ] } \ No newline at end of file diff --git a/components/react/build/index.html b/components/react/build/index.html index df6fe1d..4a2bdc5 100644 --- a/components/react/build/index.html +++ b/components/react/build/index.html @@ -1 +1 @@ -
e||125 a||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import React from \"react\";\r\nconst Layout = () => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default Layout;\r\n","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nexport default function _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","/**\n * SSR Window 4.0.2\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object;\n}\nfunction extend(target, src) {\n if (target === void 0) {\n target = {};\n }\n if (src === void 0) {\n src = {};\n }\n Object.keys(src).forEach(key => {\n if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\nconst ssrDocument = {\n body: {},\n addEventListener() {},\n removeEventListener() {},\n activeElement: {\n blur() {},\n nodeName: ''\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() {}\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() {},\n getElementsByTagName() {\n return [];\n }\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n }\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: ''\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n },\n history: {\n replaceState() {},\n pushState() {},\n go() {},\n back() {}\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() {},\n removeEventListener() {},\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n }\n };\n },\n Image() {},\n Date() {},\n screen: {},\n setTimeout() {},\n clearTimeout() {},\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n }\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { getWindow as a, getDocument as g };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\nimport { a as elementParents, l as elementStyle, e as elementChildren, s as setCSSProperty, f as elementOuterSize, m as elementNextAll, o as elementPrevAll, h as getTranslate, p as animateCSSModeScroll, n as nextTick, d as now, q as extend, g as elementIndex, c as createElement, r as deleteProps } from './utils.mjs';\n\nlet support;\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n return {\n smoothScroll: document.documentElement && document.documentElement.style && 'scrollBehavior' in document.documentElement.style,\n touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch)\n };\n}\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n return support;\n}\n\nlet deviceCached;\nfunction calcDevice(_temp) {\n let {\n userAgent\n } = _temp === void 0 ? {} : _temp;\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n const device = {\n ios: false,\n android: false\n };\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel';\n\n // iPadOs 13 fix\n const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n }\n\n // Android\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n }\n\n // Export object\n return device;\n}\nfunction getDevice(overrides) {\n if (overrides === void 0) {\n overrides = {};\n }\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n return deviceCached;\n}\n\nlet browser;\nfunction calcBrowser() {\n const window = getWindow();\n let needPerspectiveFix = false;\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n if (isSafari()) {\n const ua = String(window.navigator.userAgent);\n if (ua.includes('Version/')) {\n const [major, minor] = ua.split('Version/')[1].split(' ')[0].split('.').map(num => Number(num));\n needPerspectiveFix = major < 16 || major === 16 && minor < 2;\n }\n }\n return {\n isSafari: needPerspectiveFix || isSafari(),\n needPerspectiveFix,\n isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent)\n };\n}\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n return browser;\n}\n\nfunction Resize(_ref) {\n let {\n swiper,\n on,\n emit\n } = _ref;\n const window = getWindow();\n let observer = null;\n let animationFrame = null;\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver(entries => {\n animationFrame = window.requestAnimationFrame(() => {\n const {\n width,\n height\n } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(_ref2 => {\n let {\n contentBoxSize,\n contentRect,\n target\n } = _ref2;\n if (target && target !== swiper.el) return;\n newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n });\n observer.observe(swiper.el);\n };\n const removeObserver = () => {\n if (animationFrame) {\n window.cancelAnimationFrame(animationFrame);\n }\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}\n\nfunction Observer(_ref) {\n let {\n swiper,\n extendParams,\n on,\n emit\n } = _ref;\n const observers = [];\n const window = getWindow();\n const attach = function (target, options) {\n if (options === void 0) {\n options = {};\n }\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc(mutations => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (swiper.__preventObserver__) return;\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n observers.push(observer);\n };\n const init = () => {\n if (!swiper.params.observer) return;\n if (swiper.params.observeParents) {\n const containerParents = elementParents(swiper.hostEl);\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n }\n // Observe container\n attach(swiper.hostEl, {\n childList: swiper.params.observeSlideChildren\n });\n\n // Observe wrapper\n attach(swiper.wrapperEl, {\n attributes: false\n });\n };\n const destroy = () => {\n observers.forEach(observer => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false\n });\n on('init', init);\n on('destroy', destroy);\n}\n\n/* eslint-disable no-underscore-dangle */\n\nvar eventsEmitter = {\n on(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach(event => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n once(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n function onceHandler() {\n self.off(events, onceHandler);\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n handler.apply(self, args);\n }\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n onAny(handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n return self;\n },\n offAny(handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n return self;\n },\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach(event => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n emit() {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach(event => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach(eventHandler => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach(eventHandler => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n};\n\nfunction updateSize() {\n const swiper = this;\n let width;\n let height;\n const el = swiper.el;\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = el.clientWidth;\n }\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = el.clientHeight;\n }\n if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n return;\n }\n\n // Subtract paddings\n width = width - parseInt(elementStyle(el, 'padding-left') || 0, 10) - parseInt(elementStyle(el, 'padding-right') || 0, 10);\n height = height - parseInt(elementStyle(el, 'padding-top') || 0, 10) - parseInt(elementStyle(el, 'padding-bottom') || 0, 10);\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height\n });\n}\n\nfunction updateSlides() {\n const swiper = this;\n function getDirectionLabel(property) {\n if (swiper.isHorizontal()) {\n return property;\n }\n // prettier-ignore\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom'\n }[property];\n }\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0);\n }\n const params = swiper.params;\n const {\n wrapperEl,\n slidesEl,\n size: swiperSize,\n rtlTranslate: rtl,\n wrongRTL\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = elementChildren(slidesEl, `.${swiper.params.slideClass}, swiper-slide`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n let offsetBefore = params.slidesOffsetBefore;\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n let offsetAfter = params.slidesOffsetAfter;\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n if (typeof swiperSize === 'undefined') {\n return;\n }\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n swiper.virtualSize = -spaceBetween;\n\n // reset margins\n slides.forEach(slideEl => {\n if (rtl) {\n slideEl.style.marginLeft = '';\n } else {\n slideEl.style.marginRight = '';\n }\n slideEl.style.marginBottom = '';\n slideEl.style.marginTop = '';\n });\n\n // reset cssMode offsets\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', '');\n }\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n if (gridEnabled) {\n swiper.grid.initSlides(slidesLength);\n }\n\n // Calc slides\n let slideSize;\n const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {\n return typeof params.breakpoints[key].slidesPerView !== 'undefined';\n }).length > 0;\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n let slide;\n if (slides[i]) slide = slides[i];\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel);\n }\n if (slides[i] && elementStyle(slide, 'display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n if (shouldResetSlideSize) {\n slides[i].style[getDirectionLabel('width')] = ``;\n }\n const slideStyles = getComputedStyle(slide);\n const currentTransform = slide.style.transform;\n const currentWebKitTransform = slide.style.webkitTransform;\n if (currentTransform) {\n slide.style.transform = 'none';\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = 'none';\n }\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? elementOuterSize(slide, 'width', true) : elementOuterSize(slide, 'height', true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const {\n clientWidth,\n offsetWidth\n } = slide;\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);\n }\n }\n if (currentTransform) {\n slide.style.transform = currentTransform;\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = currentWebKitTransform;\n }\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n if (slides[i]) {\n slides[i].style[getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n slidesSizesGrid.push(slideSize);\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n swiper.virtualSize += slideSize + spaceBetween;\n prevSlideSize = slideSize;\n index += 1;\n }\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (params.setWrapperSize) {\n wrapperEl.style[getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel);\n }\n\n // Remove last grid elements depending on width\n if (!params.centeredSlides) {\n const newSlidesGrid = [];\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n snapGrid = newSlidesGrid;\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n if (isVirtual && params.loop) {\n const size = slidesSizesGrid[0] + spaceBetween;\n if (params.slidesPerGroup > 1) {\n const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup);\n const groupSize = size * params.slidesPerGroup;\n for (let i = 0; i < groups; i += 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize);\n }\n }\n for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) {\n if (params.slidesPerGroup === 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + size);\n }\n slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size);\n swiper.virtualSize += size;\n }\n }\n if (snapGrid.length === 0) snapGrid = [0];\n if (spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight');\n slides.filter((_, slideIndex) => {\n if (!params.cssMode || params.loop) return true;\n if (slideIndex === slides.length - 1) {\n return false;\n }\n return true;\n }).forEach(slideEl => {\n slideEl.style[key] = `${spaceBetween}px`;\n });\n }\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map(snap => {\n if (snap <= 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid\n });\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);\n }\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) {\n const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`;\n const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass);\n if (slidesLength <= params.maxBackfaceHiddenSlides) {\n if (!hasClassBackfaceClassAdded) swiper.el.classList.add(backFaceHiddenClass);\n } else if (hasClassBackfaceClassAdded) {\n swiper.el.classList.remove(backFaceHiddenClass);\n }\n }\n}\n\nfunction updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n const getSlideByIndex = index => {\n if (isVirtual) {\n return swiper.slides[swiper.getSlideIndexByData(index)];\n }\n return swiper.slides[index];\n };\n // Find slides currently in view\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n (swiper.visibleSlides || []).forEach(slide => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n }\n\n // Find new height from highest slide in view\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n }\n\n // Update Height\n if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`;\n}\n\nfunction updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n // eslint-disable-next-line\n const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0;\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset - swiper.cssOverflowAdjustment();\n }\n}\n\nfunction updateSlidesProgress(translate) {\n if (translate === void 0) {\n translate = this && this.translate || 0;\n }\n const swiper = this;\n const params = swiper.params;\n const {\n slides,\n rtlTranslate: rtl,\n snapGrid\n } = swiper;\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate;\n\n // Visible Slides\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideVisibleClass);\n });\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n let spaceBetween = params.spaceBetween;\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n let slideOffset = slide.swiperSlideOffset;\n if (params.cssMode && params.centeredSlides) {\n slideOffset -= slides[0].swiperSlideOffset;\n }\n const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const slideBefore = -(offsetCenter - slideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides[i].classList.add(params.slideVisibleClass);\n }\n slide.progress = rtl ? -slideProgress : slideProgress;\n slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;\n }\n}\n\nfunction updateProgress(translate) {\n const swiper = this;\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1;\n // eslint-disable-next-line\n translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n }\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let {\n progress,\n isBeginning,\n isEnd,\n progressLoop\n } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n const isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1;\n const isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1;\n isBeginning = isBeginningRounded || progress <= 0;\n isEnd = isEndRounded || progress >= 1;\n if (isBeginningRounded) progress = 0;\n if (isEndRounded) progress = 1;\n }\n if (params.loop) {\n const firstSlideIndex = swiper.getSlideIndexByData(0);\n const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1);\n const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex];\n const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex];\n const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1];\n const translateAbs = Math.abs(translate);\n if (translateAbs >= firstSlideTranslate) {\n progressLoop = (translateAbs - firstSlideTranslate) / translateMax;\n } else {\n progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax;\n }\n if (progressLoop > 1) progressLoop -= 1;\n }\n Object.assign(swiper, {\n progress,\n progressLoop,\n isBeginning,\n isEnd\n });\n if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n swiper.emit('fromEdge');\n }\n swiper.emit('progress', progress);\n}\n\nfunction updateSlidesClasses() {\n const swiper = this;\n const {\n slides,\n params,\n slidesEl,\n activeIndex\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const getFilteredSlide = selector => {\n return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];\n };\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass);\n });\n let activeSlide;\n if (isVirtual) {\n if (params.loop) {\n let slideIndex = activeIndex - swiper.virtual.slidesBefore;\n if (slideIndex < 0) slideIndex = swiper.virtual.slides.length + slideIndex;\n if (slideIndex >= swiper.virtual.slides.length) slideIndex -= swiper.virtual.slides.length;\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${slideIndex}\"]`);\n } else {\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${activeIndex}\"]`);\n }\n } else {\n activeSlide = slides[activeIndex];\n }\n if (activeSlide) {\n // Active classes\n activeSlide.classList.add(params.slideActiveClass);\n\n // Next Slide\n let nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !nextSlide) {\n nextSlide = slides[0];\n }\n if (nextSlide) {\n nextSlide.classList.add(params.slideNextClass);\n }\n // Prev Slide\n let prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !prevSlide === 0) {\n prevSlide = slides[slides.length - 1];\n }\n if (prevSlide) {\n prevSlide.classList.add(params.slidePrevClass);\n }\n }\n swiper.emitSlidesClasses();\n}\n\nconst processLazyPreloader = (swiper, imageEl) => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;\n const slideEl = imageEl.closest(slideSelector());\n if (slideEl) {\n let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (!lazyEl && swiper.isElement) {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n } else {\n // init later\n requestAnimationFrame(() => {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (lazyEl) lazyEl.remove();\n }\n });\n }\n }\n if (lazyEl) lazyEl.remove();\n }\n};\nconst unlazy = (swiper, index) => {\n if (!swiper.slides[index]) return;\n const imageEl = swiper.slides[index].querySelector('[loading=\"lazy\"]');\n if (imageEl) imageEl.removeAttribute('loading');\n};\nconst preload = swiper => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n let amount = swiper.params.lazyPreloadPrevNext;\n const len = swiper.slides.length;\n if (!len || !amount || amount < 0) return;\n amount = Math.min(amount, len);\n const slidesPerView = swiper.params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView);\n const activeIndex = swiper.activeIndex;\n if (swiper.params.grid && swiper.params.grid.rows > 1) {\n const activeColumn = activeIndex;\n const preloadColumns = [activeColumn - amount];\n preloadColumns.push(...Array.from({\n length: amount\n }).map((_, i) => {\n return activeColumn + slidesPerView + i;\n }));\n swiper.slides.forEach((slideEl, i) => {\n if (preloadColumns.includes(slideEl.column)) unlazy(swiper, i);\n });\n return;\n }\n const slideIndexLastInView = activeIndex + slidesPerView - 1;\n if (swiper.params.rewind || swiper.params.loop) {\n for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) {\n const realIndex = (i % len + len) % len;\n if (realIndex < activeIndex || realIndex > slideIndexLastInView) unlazy(swiper, realIndex);\n }\n } else {\n for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) {\n if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) {\n unlazy(swiper, i);\n }\n }\n }\n};\n\nfunction getActiveIndexByTranslate(swiper) {\n const {\n slidesGrid,\n params\n } = swiper;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n let activeIndex;\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n }\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n return activeIndex;\n}\nfunction updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n const getVirtualRealIndex = aIndex => {\n let realIndex = aIndex - swiper.virtual.slidesBefore;\n if (realIndex < 0) {\n realIndex = swiper.virtual.slides.length + realIndex;\n }\n if (realIndex >= swiper.virtual.slides.length) {\n realIndex -= swiper.virtual.slides.length;\n }\n return realIndex;\n };\n if (typeof activeIndex === 'undefined') {\n activeIndex = getActiveIndexByTranslate(swiper);\n }\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n if (activeIndex === previousIndex) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.realIndex = getVirtualRealIndex(activeIndex);\n }\n return;\n }\n // Get real index\n let realIndex;\n if (swiper.virtual && params.virtual.enabled && params.loop) {\n realIndex = getVirtualRealIndex(activeIndex);\n } else if (swiper.slides[activeIndex]) {\n realIndex = parseInt(swiper.slides[activeIndex].getAttribute('data-swiper-slide-index') || activeIndex, 10);\n } else {\n realIndex = activeIndex;\n }\n Object.assign(swiper, {\n previousSnapIndex,\n snapIndex,\n previousRealIndex,\n realIndex,\n previousIndex,\n activeIndex\n });\n if (swiper.initialized) {\n preload(swiper);\n }\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n swiper.emit('slideChange');\n }\n}\n\nfunction updateClickedSlide(el, path) {\n const swiper = this;\n const params = swiper.params;\n let slide = el.closest(`.${params.slideClass}, swiper-slide`);\n if (!slide && swiper.isElement && path && path.length > 1 && path.includes(el)) {\n [...path.slice(path.indexOf(el) + 1, path.length)].forEach(pathEl => {\n if (!slide && pathEl.matches && pathEl.matches(`.${params.slideClass}, swiper-slide`)) {\n slide = pathEl;\n }\n });\n }\n let slideFound = false;\n let slideIndex;\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt(slide.getAttribute('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}\n\nvar update = {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide\n};\n\nfunction getSwiperTranslate(axis) {\n if (axis === void 0) {\n axis = this.isHorizontal() ? 'x' : 'y';\n }\n const swiper = this;\n const {\n params,\n rtlTranslate: rtl,\n translate,\n wrapperEl\n } = swiper;\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n if (params.cssMode) {\n return translate;\n }\n let currentTranslate = getTranslate(wrapperEl, axis);\n currentTranslate += swiper.cssOverflowAdjustment();\n if (rtl) currentTranslate = -currentTranslate;\n return currentTranslate || 0;\n}\n\nfunction setTranslate(translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl,\n params,\n wrapperEl,\n progress\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y;\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n if (swiper.isHorizontal()) {\n x -= swiper.cssOverflowAdjustment();\n } else {\n y -= swiper.cssOverflowAdjustment();\n }\n wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`;\n }\n\n // Check if we need to update progress\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n swiper.emit('setTranslate', swiper.translate, byController);\n}\n\nfunction minTranslate() {\n return -this.snapGrid[0];\n}\n\nfunction maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}\n\nfunction translateTo(translate, speed, runCallbacks, translateBounds, internal) {\n if (translate === void 0) {\n translate = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (translateBounds === void 0) {\n translateBounds = true;\n }\n const swiper = this;\n const {\n params,\n wrapperEl\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;\n\n // Update progress\n swiper.updateProgress(newTranslate);\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: -newTranslate,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth'\n });\n }\n return true;\n }\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n return true;\n}\n\nvar translate = {\n getTranslate: getSwiperTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo\n};\n\nfunction setTransition(duration, byController) {\n const swiper = this;\n if (!swiper.params.cssMode) {\n swiper.wrapperEl.style.transitionDuration = `${duration}ms`;\n swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : '';\n }\n swiper.emit('setTransition', duration, byController);\n}\n\nfunction transitionEmit(_ref) {\n let {\n swiper,\n runCallbacks,\n direction,\n step\n } = _ref;\n const {\n activeIndex,\n previousIndex\n } = swiper;\n let dir = direction;\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n }\n swiper.emit(`transition${step}`);\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n return;\n }\n swiper.emit(`slideChangeTransition${step}`);\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}\n\nfunction transitionStart(runCallbacks, direction) {\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params\n } = swiper;\n if (params.cssMode) return;\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'Start'\n });\n}\n\nfunction transitionEnd(runCallbacks, direction) {\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'End'\n });\n}\n\nvar transition = {\n setTransition,\n transitionStart,\n transitionEnd\n};\n\nfunction slideTo(index, speed, runCallbacks, internal, initial) {\n if (index === void 0) {\n index = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (typeof index === 'string') {\n index = parseInt(index, 10);\n }\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) {\n return false;\n }\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n const translate = -snapGrid[snapIndex];\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {\n slideIndex = i;\n } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n }\n // Directions locks\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && (rtl ? translate > swiper.translate && translate > swiper.minTranslate() : translate < swiper.translate && translate < swiper.minTranslate())) {\n return false;\n }\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) {\n return false;\n }\n }\n }\n if (slideIndex !== (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n // Update progress\n swiper.updateProgress(translate);\n let direction;\n if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';\n\n // Update Index\n if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {\n swiper.updateActiveIndex(slideIndex);\n // Update Height\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n swiper.updateSlidesClasses();\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n return false;\n }\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n if (speed === 0) {\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n swiper._immediateVirtual = true;\n }\n if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) {\n swiper._cssModeVirtualInitialSet = true;\n requestAnimationFrame(() => {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n });\n } else {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n }\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n swiper._immediateVirtual = false;\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: t,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth'\n });\n }\n return true;\n }\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n if (speed === 0) {\n swiper.transitionEnd(runCallbacks, direction);\n } else if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n }\n return true;\n}\n\nfunction slideToLoop(index, speed, runCallbacks, internal) {\n if (index === void 0) {\n index = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (typeof index === 'string') {\n const indexAsNumber = parseInt(index, 10);\n index = indexAsNumber;\n }\n const swiper = this;\n let newIndex = index;\n if (swiper.params.loop) {\n if (swiper.virtual && swiper.params.virtual.enabled) {\n // eslint-disable-next-line\n newIndex = newIndex + swiper.virtual.slidesBefore;\n } else {\n newIndex = swiper.getSlideIndexByData(newIndex);\n }\n }\n return swiper.slideTo(newIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideNext(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n enabled,\n params,\n animating\n } = swiper;\n if (!enabled) return swiper;\n let perGroup = params.slidesPerGroup;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'next'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n if (swiper.activeIndex === swiper.slides.length - 1 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n });\n return true;\n }\n }\n if (params.rewind && swiper.isEnd) {\n return swiper.slideTo(0, speed, runCallbacks, internal);\n }\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slidePrev(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params,\n snapGrid,\n slidesGrid,\n rtlTranslate,\n enabled,\n animating\n } = swiper;\n if (!enabled) return swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'prev'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n }\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map(val => normalize(val));\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n let prevIndex = 0;\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n if (params.rewind && swiper.isBeginning) {\n const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n return swiper.slideTo(lastIndex, speed, runCallbacks, internal);\n } else if (params.loop && swiper.activeIndex === 0 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n });\n return true;\n }\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideReset(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideToClosest(speed, runCallbacks, internal, threshold) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (threshold === void 0) {\n threshold = 0.5;\n }\n const swiper = this;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}\n\nfunction slideToClickedSlide() {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`;\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt(swiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10);\n if (params.centeredSlides) {\n if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {\n swiper.loopFix();\n slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index=\"${realIndex}\"]`)[0]);\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index=\"${realIndex}\"]`)[0]);\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}\n\nvar slide = {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide\n};\n\nfunction loopCreate(slideRealIndex) {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n slides.forEach((el, index) => {\n el.setAttribute('data-swiper-slide-index', index);\n });\n swiper.loopFix({\n slideRealIndex,\n direction: params.centeredSlides ? undefined : 'next'\n });\n}\n\nfunction loopFix(_temp) {\n let {\n slideRealIndex,\n slideTo = true,\n direction,\n setTranslate,\n activeSlideIndex,\n byController,\n byMousewheel\n } = _temp === void 0 ? {} : _temp;\n const swiper = this;\n if (!swiper.params.loop) return;\n swiper.emit('beforeLoopFix');\n const {\n slides,\n allowSlidePrev,\n allowSlideNext,\n slidesEl,\n params\n } = swiper;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n if (swiper.virtual && params.virtual.enabled) {\n if (slideTo) {\n if (!params.centeredSlides && swiper.snapIndex === 0) {\n swiper.slideTo(swiper.virtual.slides.length, 0, false, true);\n } else if (params.centeredSlides && swiper.snapIndex < params.slidesPerView) {\n swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true);\n } else if (swiper.snapIndex === swiper.snapGrid.length - 1) {\n swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true);\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n swiper.emit('loopFix');\n return;\n }\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10));\n let loopedSlides = params.loopedSlides || slidesPerView;\n if (loopedSlides % params.slidesPerGroup !== 0) {\n loopedSlides += params.slidesPerGroup - loopedSlides % params.slidesPerGroup;\n }\n swiper.loopedSlides = loopedSlides;\n const prependSlidesIndexes = [];\n const appendSlidesIndexes = [];\n let activeIndex = swiper.activeIndex;\n if (typeof activeSlideIndex === 'undefined') {\n activeSlideIndex = swiper.getSlideIndex(swiper.slides.filter(el => el.classList.contains(params.slideActiveClass))[0]);\n } else {\n activeIndex = activeSlideIndex;\n }\n const isNext = direction === 'next' || !direction;\n const isPrev = direction === 'prev' || !direction;\n let slidesPrepended = 0;\n let slidesAppended = 0;\n // prepend last slides before start\n if (activeSlideIndex < loopedSlides) {\n slidesPrepended = Math.max(loopedSlides - activeSlideIndex, params.slidesPerGroup);\n for (let i = 0; i < loopedSlides - activeSlideIndex; i += 1) {\n const index = i - Math.floor(i / slides.length) * slides.length;\n prependSlidesIndexes.push(slides.length - index - 1);\n }\n } else if (activeSlideIndex /* + slidesPerView */ > swiper.slides.length - loopedSlides * 2) {\n slidesAppended = Math.max(activeSlideIndex - (swiper.slides.length - loopedSlides * 2), params.slidesPerGroup);\n for (let i = 0; i < slidesAppended; i += 1) {\n const index = i - Math.floor(i / slides.length) * slides.length;\n appendSlidesIndexes.push(index);\n }\n }\n if (isPrev) {\n prependSlidesIndexes.forEach(index => {\n swiper.slides[index].swiperLoopMoveDOM = true;\n slidesEl.prepend(swiper.slides[index]);\n swiper.slides[index].swiperLoopMoveDOM = false;\n });\n }\n if (isNext) {\n appendSlidesIndexes.forEach(index => {\n swiper.slides[index].swiperLoopMoveDOM = true;\n slidesEl.append(swiper.slides[index]);\n swiper.slides[index].swiperLoopMoveDOM = false;\n });\n }\n swiper.recalcSlides();\n if (params.slidesPerView === 'auto') {\n swiper.updateSlides();\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n if (slideTo) {\n if (prependSlidesIndexes.length > 0 && isPrev) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex + slidesPrepended, 0, false, true);\n if (setTranslate) {\n swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff;\n swiper.touchEventsData.currentTranslate = swiper.translate;\n }\n }\n } else {\n if (setTranslate) {\n swiper.slideToLoop(slideRealIndex, 0, false, true);\n swiper.touchEventsData.currentTranslate = swiper.translate;\n }\n }\n } else if (appendSlidesIndexes.length > 0 && isNext) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex - slidesAppended, 0, false, true);\n if (setTranslate) {\n swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff;\n swiper.touchEventsData.currentTranslate = swiper.translate;\n }\n }\n } else {\n swiper.slideToLoop(slideRealIndex, 0, false, true);\n }\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.controller && swiper.controller.control && !byController) {\n const loopParams = {\n slideRealIndex,\n direction,\n setTranslate,\n activeSlideIndex,\n byController: true\n };\n if (Array.isArray(swiper.controller.control)) {\n swiper.controller.control.forEach(c => {\n if (!c.destroyed && c.params.loop) c.loopFix({\n ...loopParams,\n slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n });\n } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {\n swiper.controller.control.loopFix({\n ...loopParams,\n slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n }\n }\n swiper.emit('loopFix');\n}\n\nfunction loopDestroy() {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;\n swiper.recalcSlides();\n const newSlidesOrder = [];\n swiper.slides.forEach(slideEl => {\n const index = typeof slideEl.swiperSlideIndex === 'undefined' ? slideEl.getAttribute('data-swiper-slide-index') * 1 : slideEl.swiperSlideIndex;\n newSlidesOrder[index] = slideEl;\n });\n swiper.slides.forEach(slideEl => {\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n newSlidesOrder.forEach(slideEl => {\n slidesEl.append(slideEl);\n });\n swiper.recalcSlides();\n swiper.slideTo(swiper.realIndex, 0);\n}\n\nvar loop = {\n loopCreate,\n loopFix,\n loopDestroy\n};\n\nfunction setGrabCursor(moving) {\n const swiper = this;\n if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n el.style.cursor = 'move';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nfunction unsetGrabCursor() {\n const swiper = this;\n if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {\n return;\n }\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nvar grabCursor = {\n setGrabCursor,\n unsetGrabCursor\n};\n\n// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\nfunction closestElement(selector, base) {\n if (base === void 0) {\n base = this;\n }\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n if (!found && !el.getRootNode) {\n return null;\n }\n return found || __closestFrom(el.getRootNode().host);\n }\n return __closestFrom(base);\n}\nfunction onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n const window = getWindow();\n const data = swiper.touchEventsData;\n data.evCache.push(event);\n const {\n params,\n touches,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && event.pointerType === 'mouse') return;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let targetEl = e.target;\n if (params.touchEventsTarget === 'wrapper') {\n if (!swiper.wrapperEl.contains(targetEl)) return;\n }\n if ('which' in e && e.which === 3) return;\n if ('button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return;\n\n // change target el for shadow root component\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n // eslint-disable-next-line\n const eventPath = event.composedPath ? event.composedPath() : event.path;\n if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {\n targetEl = eventPath[0];\n }\n const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot);\n\n // use closestElement for shadow root element to get the actual closest for nested shadow root element\n if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) {\n swiper.allowClick = true;\n return;\n }\n if (params.swipeHandler) {\n if (!targetEl.closest(params.swipeHandler)) return;\n }\n touches.currentX = e.pageX;\n touches.currentY = e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY;\n\n // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;\n if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n } else {\n return;\n }\n }\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined\n });\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n let preventDefault = true;\n if (targetEl.matches(data.focusableElements)) {\n preventDefault = false;\n if (targetEl.nodeName === 'SELECT') {\n data.isTouched = false;\n }\n }\n if (document.activeElement && document.activeElement.matches(data.focusableElements) && document.activeElement !== targetEl) {\n document.activeElement.blur();\n }\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) {\n e.preventDefault();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) {\n swiper.freeMode.onTouchStart();\n }\n swiper.emit('touchStart', e);\n}\n\nfunction onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && event.pointerType === 'mouse') return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n return;\n }\n const pointerIndex = data.evCache.findIndex(cachedEv => cachedEv.pointerId === e.pointerId);\n if (pointerIndex >= 0) data.evCache[pointerIndex] = e;\n const targetTouch = data.evCache.length > 1 ? data.evCache[0] : e;\n const pageX = targetTouch.pageX;\n const pageY = targetTouch.pageY;\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n if (!swiper.allowTouchMove) {\n if (!e.target.matches(data.focusableElements)) {\n swiper.allowClick = false;\n }\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n prevX: swiper.touches.currentX,\n prevY: swiper.touches.currentY,\n currentX: pageX,\n currentY: pageY\n });\n data.touchStartTime = now();\n }\n return;\n }\n if (params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {\n return;\n }\n }\n if (document.activeElement) {\n if (e.target === document.activeElement && e.target.matches(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n if (e.targetTouches && e.targetTouches.length > 1) return;\n touches.currentX = pageX;\n touches.currentY = pageY;\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n if (data.isScrolling || swiper.zoom && swiper.params.zoom && swiper.params.zoom.enabled && data.evCache.length > 1) {\n data.isTouched = false;\n return;\n }\n if (!data.startMoving) {\n return;\n }\n swiper.allowClick = false;\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n let diff = swiper.isHorizontal() ? diffX : diffY;\n let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY;\n if (params.oneWayMovement) {\n diff = Math.abs(diff) * (rtl ? 1 : -1);\n touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);\n }\n touches.diff = diff;\n diff *= params.touchRatio;\n if (rtl) {\n diff = -diff;\n touchesDiff = -touchesDiff;\n }\n const prevTouchesDirection = swiper.touchesDirection;\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next';\n const isLoop = swiper.params.loop && !params.cssMode;\n const allowLoopFix = swiper.swipeDirection === 'next' && swiper.allowSlideNext || swiper.swipeDirection === 'prev' && swiper.allowSlidePrev;\n if (!data.isMoved) {\n if (isLoop && allowLoopFix) {\n swiper.loopFix({\n direction: swiper.swipeDirection\n });\n }\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n if (swiper.animating) {\n const evt = new window.CustomEvent('transitionend', {\n bubbles: true,\n cancelable: true\n });\n swiper.wrapperEl.dispatchEvent(evt);\n }\n data.allowMomentumBounce = false;\n // Grab Cursor\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n swiper.emit('sliderFirstMove', e);\n }\n let loopFixed;\n if (data.isMoved && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) {\n // need another loop fix\n swiper.loopFix({\n direction: swiper.swipeDirection,\n setTranslate: true\n });\n loopFixed = true;\n }\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n data.currentTranslate = diff + data.startTranslate;\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n if (diff > 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.size / 2 : swiper.minTranslate())) {\n swiper.loopFix({\n direction: 'prev',\n setTranslate: true,\n activeSlideIndex: 0\n });\n }\n if (data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n }\n }\n } else if (diff < 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.size / 2 : swiper.maxTranslate())) {\n swiper.loopFix({\n direction: 'next',\n setTranslate: true,\n activeSlideIndex: swiper.slides.length - (params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)))\n });\n }\n if (data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n }\n }\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n }\n\n // Directions locks\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n }\n\n // Threshold\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n if (!params.followFinger || params.cssMode) return;\n\n // Update active index in free mode\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n }\n // Update progress\n swiper.updateProgress(data.currentTranslate);\n // Update translate\n swiper.setTranslate(data.currentTranslate);\n}\n\nfunction onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n const pointerIndex = data.evCache.findIndex(cachedEv => cachedEv.pointerId === event.pointerId);\n if (pointerIndex >= 0) {\n data.evCache.splice(pointerIndex, 1);\n }\n if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(event.type)) {\n const proceed = ['pointercancel', 'contextmenu'].includes(event.type) && (swiper.browser.isSafari || swiper.browser.isWebView);\n if (!proceed) {\n return;\n }\n }\n const {\n params,\n touches,\n rtlTranslate: rtl,\n slidesGrid,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && event.pointerType === 'mouse') return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n data.allowTouchCallbacks = false;\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n // Return Grab Cursor\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n }\n\n // Time diff\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n // Tap, doubleTap, Click\n if (swiper.allowClick) {\n const pathTree = e.path || e.composedPath && e.composedPath();\n swiper.updateClickedSlide(pathTree && pathTree[0] || e.target, pathTree);\n swiper.emit('tap click', e);\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n let currentPos;\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n if (params.cssMode) {\n return;\n }\n if (params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({\n currentPos\n });\n return;\n }\n\n // Find current slide\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n }\n let rewindFirstIndex = null;\n let rewindLastIndex = null;\n if (params.rewind) {\n if (swiper.isBeginning) {\n rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n } else if (swiper.isEnd) {\n rewindFirstIndex = 0;\n }\n }\n // Find current slide size\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) {\n swiper.slideTo(stopIndex + increment);\n } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) {\n swiper.slideTo(rewindLastIndex);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);\n }\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}\n\nfunction onResize() {\n const swiper = this;\n const {\n params,\n el\n } = swiper;\n if (el && el.offsetWidth === 0) return;\n\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Save locks\n const {\n allowSlideNext,\n allowSlidePrev,\n snapGrid\n } = swiper;\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n // Disable locks on resize\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateSlidesClasses();\n const isVirtualLoop = isVirtual && params.loop;\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n if (swiper.params.loop && !isVirtual) {\n swiper.slideToLoop(swiper.realIndex, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n }\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n clearTimeout(swiper.autoplay.resizeTimeout);\n swiper.autoplay.resizeTimeout = setTimeout(() => {\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.resume();\n }\n }, 500);\n }\n // Return locks after resize\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}\n\nfunction onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}\n\nfunction onScroll() {\n const swiper = this;\n const {\n wrapperEl,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n }\n // eslint-disable-next-line\n if (swiper.translate === 0) swiper.translate = 0;\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n swiper.emit('setTranslate', swiper.translate, false);\n}\n\nfunction onLoad(e) {\n const swiper = this;\n processLazyPreloader(swiper, e.target);\n if (swiper.params.cssMode || swiper.params.slidesPerView !== 'auto' && !swiper.params.autoHeight) {\n return;\n }\n swiper.update();\n}\n\nlet dummyEventAttached = false;\nfunction dummyEventListener() {}\nconst events = (swiper, method) => {\n const document = getDocument();\n const {\n params,\n el,\n wrapperEl,\n device\n } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method;\n\n // Touch Events\n el[domMethod]('pointerdown', swiper.onTouchStart, {\n passive: false\n });\n document[domMethod]('pointermove', swiper.onTouchMove, {\n passive: false,\n capture\n });\n document[domMethod]('pointerup', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointercancel', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerout', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerleave', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('contextmenu', swiper.onTouchEnd, {\n passive: true\n });\n\n // Prevent Links Clicks\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n }\n\n // Resize handler\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n\n // Images loader\n el[domMethod]('load', swiper.onLoad, {\n capture: true\n });\n};\nfunction attachEvents() {\n const swiper = this;\n const document = getDocument();\n const {\n params\n } = swiper;\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n swiper.onClick = onClick.bind(swiper);\n swiper.onLoad = onLoad.bind(swiper);\n if (!dummyEventAttached) {\n document.addEventListener('touchstart', dummyEventListener);\n dummyEventAttached = true;\n }\n events(swiper, 'on');\n}\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\nvar events$1 = {\n attachEvents,\n detachEvents\n};\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\nfunction setBreakpoint() {\n const swiper = this;\n const {\n realIndex,\n initialized,\n params,\n el\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;\n\n // Get breakpoint for window width and update parameters\n const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n const wasEnabled = params.enabled;\n if (wasMultiRow && !isMultiRow) {\n el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n el.classList.add(`${params.containerModifierClass}grid`);\n if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {\n el.classList.add(`${params.containerModifierClass}grid-column`);\n }\n swiper.emitContainerClasses();\n }\n\n // Toggle navigation, pagination, scrollbar\n ['navigation', 'pagination', 'scrollbar'].forEach(prop => {\n if (typeof breakpointParams[prop] === 'undefined') return;\n const wasModuleEnabled = params[prop] && params[prop].enabled;\n const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;\n if (wasModuleEnabled && !isModuleEnabled) {\n swiper[prop].disable();\n }\n if (!wasModuleEnabled && isModuleEnabled) {\n swiper[prop].enable();\n }\n });\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n const wasLoop = params.loop;\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n extend(swiper.params, breakpointParams);\n const isEnabled = swiper.params.enabled;\n const hasLoop = swiper.params.loop;\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev\n });\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n swiper.currentBreakpoint = breakpoint;\n swiper.emit('_beforeBreakpoint', breakpointParams);\n if (initialized) {\n if (needsReLoop) {\n swiper.loopDestroy();\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (!wasLoop && hasLoop) {\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (wasLoop && !hasLoop) {\n swiper.loopDestroy();\n }\n }\n swiper.emit('breakpoint', breakpointParams);\n}\n\nfunction getBreakpoint(breakpoints, base, containerEl) {\n if (base === void 0) {\n base = 'window';\n }\n if (!breakpoints || base === 'container' && !containerEl) return undefined;\n let breakpoint = false;\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n const points = Object.keys(breakpoints).map(point => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return {\n value,\n point\n };\n }\n return {\n value: point,\n point\n };\n });\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n for (let i = 0; i < points.length; i += 1) {\n const {\n point,\n value\n } = points[i];\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n return breakpoint || 'max';\n}\n\nvar breakpoints = {\n setBreakpoint,\n getBreakpoint\n};\n\nfunction prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach(item => {\n if (typeof item === 'object') {\n Object.keys(item).forEach(classNames => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\nfunction addClasses() {\n const swiper = this;\n const {\n classNames,\n params,\n rtl,\n el,\n device\n } = swiper;\n // prettier-ignore\n const suffixes = prepareClasses(['initialized', params.direction, {\n 'free-mode': swiper.params.freeMode && params.freeMode.enabled\n }, {\n 'autoheight': params.autoHeight\n }, {\n 'rtl': rtl\n }, {\n 'grid': params.grid && params.grid.rows > 1\n }, {\n 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'\n }, {\n 'android': device.android\n }, {\n 'ios': device.ios\n }, {\n 'css-mode': params.cssMode\n }, {\n 'centered': params.cssMode && params.centeredSlides\n }, {\n 'watch-progress': params.watchSlidesProgress\n }], params.containerModifierClass);\n classNames.push(...suffixes);\n el.classList.add(...classNames);\n swiper.emitContainerClasses();\n}\n\nfunction removeClasses() {\n const swiper = this;\n const {\n el,\n classNames\n } = swiper;\n el.classList.remove(...classNames);\n swiper.emitContainerClasses();\n}\n\nvar classes = {\n addClasses,\n removeClasses\n};\n\nfunction checkOverflow() {\n const swiper = this;\n const {\n isLocked: wasLocked,\n params\n } = swiper;\n const {\n slidesOffsetBefore\n } = params;\n if (slidesOffsetBefore) {\n const lastSlideIndex = swiper.slides.length - 1;\n const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;\n swiper.isLocked = swiper.size > lastSlideRightEdge;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n if (params.allowSlideNext === true) {\n swiper.allowSlideNext = !swiper.isLocked;\n }\n if (params.allowSlidePrev === true) {\n swiper.allowSlidePrev = !swiper.isLocked;\n }\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n }\n if (wasLocked !== swiper.isLocked) {\n swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n }\n}\nvar checkOverflow$1 = {\n checkOverflow\n};\n\nvar defaults = {\n init: true,\n direction: 'horizontal',\n oneWayMovement: false,\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n // Overrides\n width: null,\n height: null,\n //\n preventInteractionOnTransition: false,\n // ssr\n userAgent: null,\n url: null,\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide',\n // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0,\n // in px\n slidesOffsetAfter: 0,\n // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: true,\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 5,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Progress\n watchSlidesProgress: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // loop\n loop: false,\n loopedSlides: null,\n loopPreventsSliding: true,\n // rewind\n rewind: false,\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null,\n // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n // Passive Listeners\n passiveListeners: true,\n maxBackfaceHiddenSlides: 10,\n // NS\n containerModifierClass: 'swiper-',\n // NEW\n slideClass: 'swiper-slide',\n slideActiveClass: 'swiper-slide-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideNextClass: 'swiper-slide-next',\n slidePrevClass: 'swiper-slide-prev',\n wrapperClass: 'swiper-wrapper',\n lazyPreloaderClass: 'swiper-lazy-preloader',\n lazyPreloadPrevNext: 0,\n // Callbacks\n runCallbacksOnInit: true,\n // Internals\n _emitClasses: false\n};\n\nfunction moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj) {\n if (obj === void 0) {\n obj = {};\n }\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n if (params[moduleParamName] === true) {\n params[moduleParamName] = {\n enabled: true\n };\n }\n if (moduleParamName === 'navigation' && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].prevEl && !params[moduleParamName].nextEl) {\n params[moduleParamName].auto = true;\n }\n if (['pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].el) {\n params[moduleParamName].auto = true;\n }\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n if (!params[moduleParamName]) params[moduleParamName] = {\n enabled: false\n };\n extend(allModulesParams, obj);\n };\n}\n\n/* eslint no-param-reassign: \"off\" */\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events: events$1,\n breakpoints,\n checkOverflow: checkOverflow$1,\n classes\n};\nconst extendedDefaults = {};\nclass Swiper {\n constructor() {\n let el;\n let params;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {\n params = args[0];\n } else {\n [el, params] = args;\n }\n if (!params) params = {};\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n const document = getDocument();\n if (params.el && typeof params.el === 'string' && document.querySelectorAll(params.el).length > 1) {\n const swipers = [];\n document.querySelectorAll(params.el).forEach(containerEl => {\n const newParams = extend({}, params, {\n el: containerEl\n });\n swipers.push(new Swiper(newParams));\n });\n // eslint-disable-next-line no-constructor-return\n return swipers;\n }\n\n // Swiper Instance\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({\n userAgent: params.userAgent\n });\n swiper.browser = getBrowser();\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n swiper.modules = [...swiper.__modules__];\n if (params.modules && Array.isArray(params.modules)) {\n swiper.modules.push(...params.modules);\n }\n const allModulesParams = {};\n swiper.modules.forEach(mod => {\n mod({\n params,\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper)\n });\n });\n\n // Extend defaults with modules params\n const swiperParams = extend({}, defaults, allModulesParams);\n\n // Extend defaults with passed params\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params);\n\n // add event listeners\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach(eventName => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n }\n\n // Extend Swiper\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n // Classes\n classNames: [],\n // Slides\n slides: [],\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n //\n isBeginning: true,\n isEnd: false,\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n cssOverflowAdjustment() {\n // Returns 0 unless `translate` is > 2**23\n // Should be subtracted from css values to prevent overflow\n return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;\n },\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n // Touch Events\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: 0,\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n startMoving: undefined,\n evCache: []\n },\n // Clicks\n allowClick: true,\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n },\n // Images\n imagesToLoad: [],\n imagesLoaded: 0\n });\n swiper.emit('_swiper');\n\n // Init\n if (swiper.params.init) {\n swiper.init();\n }\n\n // Return app instance\n // eslint-disable-next-line no-constructor-return\n return swiper;\n }\n getSlideIndex(slideEl) {\n const {\n slidesEl,\n params\n } = this;\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n const firstSlideIndex = elementIndex(slides[0]);\n return elementIndex(slideEl) - firstSlideIndex;\n }\n getSlideIndexByData(index) {\n return this.getSlideIndex(this.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === index)[0]);\n }\n recalcSlides() {\n const swiper = this;\n const {\n slidesEl,\n params\n } = swiper;\n swiper.slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n }\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n swiper.emit('enable');\n }\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n swiper.emit('disable');\n }\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter(className => {\n return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n getSlideClasses(slideEl) {\n const swiper = this;\n if (swiper.destroyed) return '';\n return slideEl.className.split(' ').filter(className => {\n return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;\n }).join(' ');\n }\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.forEach(slideEl => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({\n slideEl,\n classNames\n });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n slidesPerViewDynamic(view, exact) {\n if (view === void 0) {\n view = 'current';\n }\n if (exact === void 0) {\n exact = false;\n }\n const swiper = this;\n const {\n params,\n slides,\n slidesGrid,\n slidesSizesGrid,\n size: swiperSize,\n activeIndex\n } = swiper;\n let spv = 1;\n if (typeof params.slidesPerView === 'number') return params.slidesPerView;\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex] ? slides[activeIndex].swiperSlideSize : 0;\n let breakLoop;\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n return spv;\n }\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const {\n snapGrid,\n params\n } = swiper;\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n [...swiper.el.querySelectorAll('[loading=\"lazy\"]')].forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n }\n });\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n let translated;\n if (params.freeMode && params.freeMode.enabled && !params.cssMode) {\n setTranslate();\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) {\n const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides;\n translated = swiper.slideTo(slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n if (!translated) {\n setTranslate();\n }\n }\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n swiper.emit('update');\n }\n changeDirection(newDirection, needUpdate) {\n if (needUpdate === void 0) {\n needUpdate = true;\n }\n const swiper = this;\n const currentDirection = swiper.params.direction;\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n return swiper;\n }\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`);\n swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n swiper.params.direction = newDirection;\n swiper.slides.forEach(slideEl => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n return swiper;\n }\n changeLanguageDirection(direction) {\n const swiper = this;\n if (swiper.rtl && direction === 'rtl' || !swiper.rtl && direction === 'ltr') return;\n swiper.rtl = direction === 'rtl';\n swiper.rtlTranslate = swiper.params.direction === 'horizontal' && swiper.rtl;\n if (swiper.rtl) {\n swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'rtl';\n } else {\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'ltr';\n }\n swiper.update();\n }\n mount(element) {\n const swiper = this;\n if (swiper.mounted) return true;\n\n // Find el\n let el = element || swiper.params.el;\n if (typeof el === 'string') {\n el = document.querySelector(el);\n }\n if (!el) {\n return false;\n }\n el.swiper = swiper;\n if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === 'SWIPER-CONTAINER') {\n swiper.isElement = true;\n }\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = el.shadowRoot.querySelector(getWrapperSelector());\n // Children needs to return slot items\n return res;\n }\n return elementChildren(el, getWrapperSelector())[0];\n };\n // Find Wrapper\n let wrapperEl = getWrapper();\n if (!wrapperEl && swiper.params.createElements) {\n wrapperEl = createElement('div', swiper.params.wrapperClass);\n el.append(wrapperEl);\n elementChildren(el, `.${swiper.params.slideClass}`).forEach(slideEl => {\n wrapperEl.append(slideEl);\n });\n }\n Object.assign(swiper, {\n el,\n wrapperEl,\n slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl,\n hostEl: swiper.isElement ? el.parentNode.host : el,\n mounted: true,\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl',\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl'),\n wrongRTL: elementStyle(wrapperEl, 'display') === '-webkit-box'\n });\n return true;\n }\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n swiper.emit('beforeInit');\n\n // Set breakpoint\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Add Classes\n swiper.addClasses();\n\n // Update size\n swiper.updateSize();\n\n // Update slides\n swiper.updateSlides();\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n }\n\n // Set Grab Cursor\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n // Slide To Initial Slide\n if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n }\n\n // Create loop\n if (swiper.params.loop) {\n swiper.loopCreate();\n }\n\n // Attach events\n swiper.attachEvents();\n const lazyElements = [...swiper.el.querySelectorAll('[loading=\"lazy\"]')];\n if (swiper.isElement) {\n lazyElements.push(...swiper.hostEl.querySelectorAll('[loading=\"lazy\"]'));\n }\n lazyElements.forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n } else {\n imageEl.addEventListener('load', e => {\n processLazyPreloader(swiper, e.target);\n });\n }\n });\n preload(swiper);\n\n // Init Flag\n swiper.initialized = true;\n preload(swiper);\n\n // Emit\n swiper.emit('init');\n swiper.emit('afterInit');\n return swiper;\n }\n destroy(deleteInstance, cleanStyles) {\n if (deleteInstance === void 0) {\n deleteInstance = true;\n }\n if (cleanStyles === void 0) {\n cleanStyles = true;\n }\n const swiper = this;\n const {\n params,\n el,\n wrapperEl,\n slides\n } = swiper;\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n swiper.emit('beforeDestroy');\n\n // Init Flag\n swiper.initialized = false;\n\n // Detach events\n swiper.detachEvents();\n\n // Destroy loop\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n // Cleanup styles\n if (cleanStyles) {\n swiper.removeClasses();\n el.removeAttribute('style');\n wrapperEl.removeAttribute('style');\n if (slides && slides.length) {\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);\n slideEl.removeAttribute('style');\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n }\n }\n swiper.emit('destroy');\n\n // Detach emitter events\n Object.keys(swiper.eventsListeners).forEach(eventName => {\n swiper.off(eventName);\n });\n if (deleteInstance !== false) {\n swiper.el.swiper = null;\n deleteProps(swiper);\n }\n swiper.destroyed = true;\n return null;\n }\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n static get extendedDefaults() {\n return extendedDefaults;\n }\n static get defaults() {\n return defaults;\n }\n static installModule(mod) {\n if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];\n const modules = Swiper.prototype.__modules__;\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach(m => Swiper.installModule(m));\n return Swiper;\n }\n Swiper.installModule(module);\n return Swiper;\n }\n}\nObject.keys(prototypes).forEach(prototypeGroup => {\n Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\nSwiper.use([Resize, Observer]);\n\nexport { Swiper as S, defaults as d };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach(key => {\n try {\n object[key] = null;\n } catch (e) {\n // no getter for object\n }\n try {\n delete object[key];\n } catch (e) {\n // something got wrong\n }\n });\n}\nfunction nextTick(callback, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return setTimeout(callback, delay);\n}\nfunction now() {\n return Date.now();\n}\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n if (!style) {\n style = el.style;\n }\n return style;\n}\nfunction getTranslate(el, axis) {\n if (axis === void 0) {\n axis = 'x';\n }\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n const curStyle = getComputedStyle(el);\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n return curTransform || 0;\n}\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';\n}\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\nfunction extend() {\n const to = Object(arguments.length <= 0 ? undefined : arguments[0]);\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n for (let i = 1; i < arguments.length; i += 1) {\n const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i];\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n return to;\n}\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\nfunction animateCSSModeScroll(_ref) {\n let {\n swiper,\n targetPosition,\n side\n } = _ref;\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n const isOutOfBound = (current, target) => {\n return dir === 'next' && current >= target || dir === 'prev' && current <= target;\n };\n const animate = () => {\n time = new Date().getTime();\n if (startTime === null) {\n startTime = time;\n }\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n if (isOutOfBound(currentPosition, targetPosition)) {\n currentPosition = targetPosition;\n }\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.scrollSnapType = '';\n setTimeout(() => {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n });\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n animate();\n}\nfunction getSlideTransformEl(slideEl) {\n return slideEl.querySelector('.swiper-slide-transform') || slideEl.shadowRoot && slideEl.shadowRoot.querySelector('.swiper-slide-transform') || slideEl;\n}\nfunction elementChildren(element, selector) {\n if (selector === void 0) {\n selector = '';\n }\n return [...element.children].filter(el => el.matches(selector));\n}\nfunction createElement(tag, classes) {\n if (classes === void 0) {\n classes = [];\n }\n const el = document.createElement(tag);\n el.classList.add(...(Array.isArray(classes) ? classes : [classes]));\n return el;\n}\nfunction elementOffset(el) {\n const window = getWindow();\n const document = getDocument();\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n}\nfunction elementPrevAll(el, selector) {\n const prevEls = [];\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n if (selector) {\n if (prev.matches(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n el = prev;\n }\n return prevEls;\n}\nfunction elementNextAll(el, selector) {\n const nextEls = [];\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n if (selector) {\n if (next.matches(selector)) nextEls.push(next);\n } else nextEls.push(next);\n el = next;\n }\n return nextEls;\n}\nfunction elementStyle(el, prop) {\n const window = getWindow();\n return window.getComputedStyle(el, null).getPropertyValue(prop);\n}\nfunction elementIndex(el) {\n let child = el;\n let i;\n if (child) {\n i = 0;\n // eslint-disable-next-line\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n return i;\n }\n return undefined;\n}\nfunction elementParents(el, selector) {\n const parents = []; // eslint-disable-line\n let parent = el.parentElement; // eslint-disable-line\n while (parent) {\n if (selector) {\n if (parent.matches(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n parent = parent.parentElement;\n }\n return parents;\n}\nfunction elementTransitionEnd(el, callback) {\n function fireCallBack(e) {\n if (e.target !== el) return;\n callback.call(el, e);\n el.removeEventListener('transitionend', fireCallBack);\n }\n if (callback) {\n el.addEventListener('transitionend', fireCallBack);\n }\n}\nfunction elementOuterSize(el, size, includeMargins) {\n const window = getWindow();\n if (includeMargins) {\n return el[size === 'width' ? 'offsetWidth' : 'offsetHeight'] + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-right' : 'margin-top')) + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-left' : 'margin-bottom'));\n }\n return el.offsetWidth;\n}\n\nexport { elementParents as a, elementOffset as b, createElement as c, now as d, elementChildren as e, elementOuterSize as f, elementIndex as g, getTranslate as h, elementTransitionEnd as i, isObject as j, getSlideTransformEl as k, elementStyle as l, elementNextAll as m, nextTick as n, elementPrevAll as o, animateCSSModeScroll as p, extend as q, deleteProps as r, setCSSProperty as s };\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","/* underscore in name -> watch for changes */\nconst paramsList = ['eventsPrefix', 'injectStyles', 'injectStylesUrls', 'modules', 'init', '_direction', 'oneWayMovement', 'touchEventsTarget', 'initialSlide', '_speed', 'cssMode', 'updateOnWindowResize', 'resizeObserver', 'nested', 'focusableElements', '_enabled', '_width', '_height', 'preventInteractionOnTransition', 'userAgent', 'url', '_edgeSwipeDetection', '_edgeSwipeThreshold', '_freeMode', '_autoHeight', 'setWrapperSize', 'virtualTranslate', '_effect', 'breakpoints', 'breakpointsBase', '_spaceBetween', '_slidesPerView', 'maxBackfaceHiddenSlides', '_grid', '_slidesPerGroup', '_slidesPerGroupSkip', '_slidesPerGroupAuto', '_centeredSlides', '_centeredSlidesBounds', '_slidesOffsetBefore', '_slidesOffsetAfter', 'normalizeSlideIndex', '_centerInsufficientSlides', '_watchOverflow', 'roundLengths', 'touchRatio', 'touchAngle', 'simulateTouch', '_shortSwipes', '_longSwipes', 'longSwipesRatio', 'longSwipesMs', '_followFinger', 'allowTouchMove', '_threshold', 'touchMoveStopPropagation', 'touchStartPreventDefault', 'touchStartForcePreventDefault', 'touchReleaseOnEdges', 'uniqueNavElements', '_resistance', '_resistanceRatio', '_watchSlidesProgress', '_grabCursor', 'preventClicks', 'preventClicksPropagation', '_slideToClickedSlide', '_loop', 'loopedSlides', 'loopPreventsSliding', '_rewind', '_allowSlidePrev', '_allowSlideNext', '_swipeHandler', '_noSwiping', 'noSwipingClass', 'noSwipingSelector', 'passiveListeners', 'containerModifierClass', 'slideClass', 'slideActiveClass', 'slideVisibleClass', 'slideNextClass', 'slidePrevClass', 'wrapperClass', 'lazyPreloaderClass', 'lazyPreloadPrevNext', 'runCallbacksOnInit', 'observer', 'observeParents', 'observeSlideChildren',\n// modules\n'a11y', '_autoplay', '_controller', 'coverflowEffect', 'cubeEffect', 'fadeEffect', 'flipEffect', 'creativeEffect', 'cardsEffect', 'hashNavigation', 'history', 'keyboard', 'mousewheel', '_navigation', '_pagination', 'parallax', '_scrollbar', '_thumbs', 'virtual', 'zoom', 'control'];\n\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object' && !o.__swiper__;\n}\nfunction extend(target, src) {\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n Object.keys(src).filter(key => noExtend.indexOf(key) < 0).forEach(key => {\n if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\n if (src[key].__swiper__) target[key] = src[key];else extend(target[key], src[key]);\n } else {\n target[key] = src[key];\n }\n });\n}\nfunction needsNavigation(params) {\n if (params === void 0) {\n params = {};\n }\n return params.navigation && typeof params.navigation.nextEl === 'undefined' && typeof params.navigation.prevEl === 'undefined';\n}\nfunction needsPagination(params) {\n if (params === void 0) {\n params = {};\n }\n return params.pagination && typeof params.pagination.el === 'undefined';\n}\nfunction needsScrollbar(params) {\n if (params === void 0) {\n params = {};\n }\n return params.scrollbar && typeof params.scrollbar.el === 'undefined';\n}\nfunction uniqueClasses(classNames) {\n if (classNames === void 0) {\n classNames = '';\n }\n const classes = classNames.split(' ').map(c => c.trim()).filter(c => !!c);\n const unique = [];\n classes.forEach(c => {\n if (unique.indexOf(c) < 0) unique.push(c);\n });\n return unique.join(' ');\n}\nfunction attrToProp(attrName) {\n if (attrName === void 0) {\n attrName = '';\n }\n return attrName.replace(/-[a-z]/g, l => l.toUpperCase().replace('-', ''));\n}\nfunction wrapperClass(className) {\n if (className === void 0) {\n className = '';\n }\n if (!className) return 'swiper-wrapper';\n if (!className.includes('swiper-wrapper')) return `swiper-wrapper ${className}`;\n return className;\n}\n\nfunction updateSwiper(_ref) {\n let {\n swiper,\n slides,\n passedParams,\n changedParams,\n nextEl,\n prevEl,\n scrollbarEl,\n paginationEl\n } = _ref;\n const updateParams = changedParams.filter(key => key !== 'children' && key !== 'direction' && key !== 'wrapperClass');\n const {\n params: currentParams,\n pagination,\n navigation,\n scrollbar,\n virtual,\n thumbs\n } = swiper;\n let needThumbsInit;\n let needControllerInit;\n let needPaginationInit;\n let needScrollbarInit;\n let needNavigationInit;\n let loopNeedDestroy;\n let loopNeedEnable;\n let loopNeedReloop;\n if (changedParams.includes('thumbs') && passedParams.thumbs && passedParams.thumbs.swiper && currentParams.thumbs && !currentParams.thumbs.swiper) {\n needThumbsInit = true;\n }\n if (changedParams.includes('controller') && passedParams.controller && passedParams.controller.control && currentParams.controller && !currentParams.controller.control) {\n needControllerInit = true;\n }\n if (changedParams.includes('pagination') && passedParams.pagination && (passedParams.pagination.el || paginationEl) && (currentParams.pagination || currentParams.pagination === false) && pagination && !pagination.el) {\n needPaginationInit = true;\n }\n if (changedParams.includes('scrollbar') && passedParams.scrollbar && (passedParams.scrollbar.el || scrollbarEl) && (currentParams.scrollbar || currentParams.scrollbar === false) && scrollbar && !scrollbar.el) {\n needScrollbarInit = true;\n }\n if (changedParams.includes('navigation') && passedParams.navigation && (passedParams.navigation.prevEl || prevEl) && (passedParams.navigation.nextEl || nextEl) && (currentParams.navigation || currentParams.navigation === false) && navigation && !navigation.prevEl && !navigation.nextEl) {\n needNavigationInit = true;\n }\n const destroyModule = mod => {\n if (!swiper[mod]) return;\n swiper[mod].destroy();\n if (mod === 'navigation') {\n if (swiper.isElement) {\n swiper[mod].prevEl.remove();\n swiper[mod].nextEl.remove();\n }\n currentParams[mod].prevEl = undefined;\n currentParams[mod].nextEl = undefined;\n swiper[mod].prevEl = undefined;\n swiper[mod].nextEl = undefined;\n } else {\n if (swiper.isElement) {\n swiper[mod].el.remove();\n }\n currentParams[mod].el = undefined;\n swiper[mod].el = undefined;\n }\n };\n if (changedParams.includes('loop') && swiper.isElement) {\n if (currentParams.loop && !passedParams.loop) {\n loopNeedDestroy = true;\n } else if (!currentParams.loop && passedParams.loop) {\n loopNeedEnable = true;\n } else {\n loopNeedReloop = true;\n }\n }\n updateParams.forEach(key => {\n if (isObject(currentParams[key]) && isObject(passedParams[key])) {\n extend(currentParams[key], passedParams[key]);\n if ((key === 'navigation' || key === 'pagination' || key === 'scrollbar') && 'enabled' in passedParams[key] && !passedParams[key].enabled) {\n destroyModule(key);\n }\n } else {\n const newValue = passedParams[key];\n if ((newValue === true || newValue === false) && (key === 'navigation' || key === 'pagination' || key === 'scrollbar')) {\n if (newValue === false) {\n destroyModule(key);\n }\n } else {\n currentParams[key] = passedParams[key];\n }\n }\n });\n if (updateParams.includes('controller') && !needControllerInit && swiper.controller && swiper.controller.control && currentParams.controller && currentParams.controller.control) {\n swiper.controller.control = currentParams.controller.control;\n }\n if (changedParams.includes('children') && slides && virtual && currentParams.virtual.enabled) {\n virtual.slides = slides;\n virtual.update(true);\n }\n if (changedParams.includes('children') && slides && currentParams.loop) {\n loopNeedReloop = true;\n }\n if (needThumbsInit) {\n const initialized = thumbs.init();\n if (initialized) thumbs.update(true);\n }\n if (needControllerInit) {\n swiper.controller.control = currentParams.controller.control;\n }\n if (needPaginationInit) {\n if (swiper.isElement && (!paginationEl || typeof paginationEl === 'string')) {\n paginationEl = document.createElement('div');\n paginationEl.classList.add('swiper-pagination');\n paginationEl.part.add('pagination');\n swiper.el.appendChild(paginationEl);\n }\n if (paginationEl) currentParams.pagination.el = paginationEl;\n pagination.init();\n pagination.render();\n pagination.update();\n }\n if (needScrollbarInit) {\n if (swiper.isElement && (!scrollbarEl || typeof scrollbarEl === 'string')) {\n scrollbarEl = document.createElement('div');\n scrollbarEl.classList.add('swiper-scrollbar');\n scrollbarEl.part.add('scrollbar');\n swiper.el.appendChild(scrollbarEl);\n }\n if (scrollbarEl) currentParams.scrollbar.el = scrollbarEl;\n scrollbar.init();\n scrollbar.updateSize();\n scrollbar.setTranslate();\n }\n if (needNavigationInit) {\n if (swiper.isElement) {\n if (!nextEl || typeof nextEl === 'string') {\n nextEl = document.createElement('div');\n nextEl.classList.add('swiper-button-next');\n nextEl.innerHTML = swiper.hostEl.constructor.nextButtonSvg;\n nextEl.part.add('button-next');\n swiper.el.appendChild(nextEl);\n }\n if (!prevEl || typeof prevEl === 'string') {\n prevEl = document.createElement('div');\n prevEl.classList.add('swiper-button-prev');\n prevEl.innerHTML = swiper.hostEl.constructor.prevButtonSvg;\n prevEl.part.add('button-prev');\n swiper.el.appendChild(prevEl);\n }\n }\n if (nextEl) currentParams.navigation.nextEl = nextEl;\n if (prevEl) currentParams.navigation.prevEl = prevEl;\n navigation.init();\n navigation.update();\n }\n if (changedParams.includes('allowSlideNext')) {\n swiper.allowSlideNext = passedParams.allowSlideNext;\n }\n if (changedParams.includes('allowSlidePrev')) {\n swiper.allowSlidePrev = passedParams.allowSlidePrev;\n }\n if (changedParams.includes('direction')) {\n swiper.changeDirection(passedParams.direction, false);\n }\n if (loopNeedDestroy || loopNeedReloop) {\n swiper.loopDestroy();\n }\n if (loopNeedEnable || loopNeedReloop) {\n swiper.loopCreate();\n }\n swiper.update();\n}\n\nexport { needsPagination as a, needsScrollbar as b, attrToProp as c, uniqueClasses as d, extend as e, isObject as i, needsNavigation as n, paramsList as p, updateSwiper as u, wrapperClass as w };\n","import { e as extend, p as paramsList, i as isObject, n as needsNavigation, a as needsPagination, b as needsScrollbar } from './update-swiper.mjs';\nimport { d as defaults } from './swiper-core.mjs';\n\nfunction getParams(obj, splitEvents) {\n if (obj === void 0) {\n obj = {};\n }\n if (splitEvents === void 0) {\n splitEvents = true;\n }\n const params = {\n on: {}\n };\n const events = {};\n const passedParams = {};\n extend(params, defaults);\n params._emitClasses = true;\n params.init = false;\n const rest = {};\n const allowedParams = paramsList.map(key => key.replace(/_/, ''));\n const plainObj = Object.assign({}, obj);\n Object.keys(plainObj).forEach(key => {\n if (typeof obj[key] === 'undefined') return;\n if (allowedParams.indexOf(key) >= 0) {\n if (isObject(obj[key])) {\n params[key] = {};\n passedParams[key] = {};\n extend(params[key], obj[key]);\n extend(passedParams[key], obj[key]);\n } else {\n params[key] = obj[key];\n passedParams[key] = obj[key];\n }\n } else if (key.search(/on[A-Z]/) === 0 && typeof obj[key] === 'function') {\n if (splitEvents) {\n events[`${key[2].toLowerCase()}${key.substr(3)}`] = obj[key];\n } else {\n params.on[`${key[2].toLowerCase()}${key.substr(3)}`] = obj[key];\n }\n } else {\n rest[key] = obj[key];\n }\n });\n ['navigation', 'pagination', 'scrollbar'].forEach(key => {\n if (params[key] === true) params[key] = {};\n if (params[key] === false) delete params[key];\n });\n return {\n params,\n passedParams,\n rest,\n events\n };\n}\n\nfunction mountSwiper(_ref, swiperParams) {\n let {\n el,\n nextEl,\n prevEl,\n paginationEl,\n scrollbarEl,\n swiper\n } = _ref;\n if (needsNavigation(swiperParams) && nextEl && prevEl) {\n swiper.params.navigation.nextEl = nextEl;\n swiper.originalParams.navigation.nextEl = nextEl;\n swiper.params.navigation.prevEl = prevEl;\n swiper.originalParams.navigation.prevEl = prevEl;\n }\n if (needsPagination(swiperParams) && paginationEl) {\n swiper.params.pagination.el = paginationEl;\n swiper.originalParams.pagination.el = paginationEl;\n }\n if (needsScrollbar(swiperParams) && scrollbarEl) {\n swiper.params.scrollbar.el = scrollbarEl;\n swiper.originalParams.scrollbar.el = scrollbarEl;\n }\n swiper.init(el);\n}\n\nfunction getChangedParams(swiperParams, oldParams, children, oldChildren, getKey) {\n const keys = [];\n if (!oldParams) return keys;\n const addKey = key => {\n if (keys.indexOf(key) < 0) keys.push(key);\n };\n if (children && oldChildren) {\n const oldChildrenKeys = oldChildren.map(getKey);\n const childrenKeys = children.map(getKey);\n if (oldChildrenKeys.join('') !== childrenKeys.join('')) addKey('children');\n if (oldChildren.length !== children.length) addKey('children');\n }\n const watchParams = paramsList.filter(key => key[0] === '_').map(key => key.replace(/_/, ''));\n watchParams.forEach(key => {\n if (key in swiperParams && key in oldParams) {\n if (isObject(swiperParams[key]) && isObject(oldParams[key])) {\n const newKeys = Object.keys(swiperParams[key]);\n const oldKeys = Object.keys(oldParams[key]);\n if (newKeys.length !== oldKeys.length) {\n addKey(key);\n } else {\n newKeys.forEach(newKey => {\n if (swiperParams[key][newKey] !== oldParams[key][newKey]) {\n addKey(key);\n }\n });\n oldKeys.forEach(oldKey => {\n if (swiperParams[key][oldKey] !== oldParams[key][oldKey]) addKey(key);\n });\n }\n } else if (swiperParams[key] !== oldParams[key]) {\n addKey(key);\n }\n }\n });\n return keys;\n}\n\nconst updateOnVirtualData = swiper => {\n if (!swiper || swiper.destroyed || !swiper.params.virtual || swiper.params.virtual && !swiper.params.virtual.enabled) return;\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n if (swiper.parallax && swiper.params.parallax && swiper.params.parallax.enabled) {\n swiper.parallax.setTranslate();\n }\n};\n\nexport { getChangedParams as a, getParams as g, mountSwiper as m, updateOnVirtualData as u };\n","/**\n * Swiper React 10.3.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2023 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: September 28, 2023\n */\n\nimport React, { useEffect, useLayoutEffect, useContext, createContext, forwardRef, useState, useRef } from 'react';\nimport { S as Swiper$1 } from './shared/swiper-core.mjs';\nimport { g as getParams, m as mountSwiper, a as getChangedParams, u as updateOnVirtualData } from './shared/update-on-virtual-data.mjs';\nimport { d as uniqueClasses, w as wrapperClass, n as needsNavigation, b as needsScrollbar, a as needsPagination, e as extend, u as updateSwiper } from './shared/update-swiper.mjs';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction isChildSwiperSlide(child) {\n return child.type && child.type.displayName && child.type.displayName.includes('SwiperSlide');\n}\nfunction processChildren(c) {\n const slides = [];\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.children) {\n processChildren(child.props.children).forEach(slide => slides.push(slide));\n }\n });\n return slides;\n}\nfunction getChildren(c) {\n const slides = [];\n const slots = {\n 'container-start': [],\n 'container-end': [],\n 'wrapper-start': [],\n 'wrapper-end': []\n };\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.slot && slots[child.props.slot]) {\n slots[child.props.slot].push(child);\n } else if (child.props && child.props.children) {\n const foundSlides = processChildren(child.props.children);\n if (foundSlides.length > 0) {\n foundSlides.forEach(slide => slides.push(slide));\n } else {\n slots['container-end'].push(child);\n }\n } else {\n slots['container-end'].push(child);\n }\n });\n return {\n slides,\n slots\n };\n}\n\nfunction renderVirtual(swiper, slides, virtualData) {\n if (!virtualData) return null;\n const getSlideIndex = index => {\n let slideIndex = index;\n if (index < 0) {\n slideIndex = slides.length + index;\n } else if (slideIndex >= slides.length) {\n // eslint-disable-next-line\n slideIndex = slideIndex - slides.length;\n }\n return slideIndex;\n };\n const style = swiper.isHorizontal() ? {\n [swiper.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`\n } : {\n top: `${virtualData.offset}px`\n };\n const {\n from,\n to\n } = virtualData;\n const loopFrom = swiper.params.loop ? -slides.length : 0;\n const loopTo = swiper.params.loop ? slides.length * 2 : slides.length;\n const slidesToRender = [];\n for (let i = loopFrom; i < loopTo; i += 1) {\n if (i >= from && i <= to) {\n slidesToRender.push(slides[getSlideIndex(i)]);\n }\n }\n return slidesToRender.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper,\n style,\n key: `slide-${index}`\n });\n });\n}\n\nfunction useIsomorphicLayoutEffect(callback, deps) {\n // eslint-disable-next-line\n if (typeof window === 'undefined') return useEffect(callback, deps);\n return useLayoutEffect(callback, deps);\n}\n\nconst SwiperSlideContext = /*#__PURE__*/createContext(null);\nconst useSwiperSlide = () => {\n return useContext(SwiperSlideContext);\n};\nconst SwiperContext = /*#__PURE__*/createContext(null);\nconst useSwiper = () => {\n return useContext(SwiperContext);\n};\n\nconst Swiper = /*#__PURE__*/forwardRef(function (_temp, externalElRef) {\n let {\n className,\n tag: Tag = 'div',\n wrapperTag: WrapperTag = 'div',\n children,\n onSwiper,\n ...rest\n } = _temp === void 0 ? {} : _temp;\n let eventsAssigned = false;\n const [containerClasses, setContainerClasses] = useState('swiper');\n const [virtualData, setVirtualData] = useState(null);\n const [breakpointChanged, setBreakpointChanged] = useState(false);\n const initializedRef = useRef(false);\n const swiperElRef = useRef(null);\n const swiperRef = useRef(null);\n const oldPassedParamsRef = useRef(null);\n const oldSlides = useRef(null);\n const nextElRef = useRef(null);\n const prevElRef = useRef(null);\n const paginationElRef = useRef(null);\n const scrollbarElRef = useRef(null);\n const {\n params: swiperParams,\n passedParams,\n rest: restProps,\n events\n } = getParams(rest);\n const {\n slides,\n slots\n } = getChildren(children);\n const onBeforeBreakpoint = () => {\n setBreakpointChanged(!breakpointChanged);\n };\n Object.assign(swiperParams.on, {\n _containerClasses(swiper, classes) {\n setContainerClasses(classes);\n }\n });\n const initSwiper = () => {\n // init swiper\n Object.assign(swiperParams.on, events);\n eventsAssigned = true;\n const passParams = {\n ...swiperParams\n };\n delete passParams.wrapperClass;\n swiperRef.current = new Swiper$1(passParams);\n if (swiperRef.current.virtual && swiperRef.current.params.virtual.enabled) {\n swiperRef.current.virtual.slides = slides;\n const extendWith = {\n cache: false,\n slides,\n renderExternal: setVirtualData,\n renderExternalUpdate: false\n };\n extend(swiperRef.current.params.virtual, extendWith);\n extend(swiperRef.current.originalParams.virtual, extendWith);\n }\n };\n if (!swiperElRef.current) {\n initSwiper();\n }\n\n // Listen for breakpoints change\n if (swiperRef.current) {\n swiperRef.current.on('_beforeBreakpoint', onBeforeBreakpoint);\n }\n const attachEvents = () => {\n if (eventsAssigned || !events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.on(eventName, events[eventName]);\n });\n };\n const detachEvents = () => {\n if (!events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.off(eventName, events[eventName]);\n });\n };\n useEffect(() => {\n return () => {\n if (swiperRef.current) swiperRef.current.off('_beforeBreakpoint', onBeforeBreakpoint);\n };\n });\n\n // set initialized flag\n useEffect(() => {\n if (!initializedRef.current && swiperRef.current) {\n swiperRef.current.emitSlidesClasses();\n initializedRef.current = true;\n }\n });\n\n // mount swiper\n useIsomorphicLayoutEffect(() => {\n if (externalElRef) {\n externalElRef.current = swiperElRef.current;\n }\n if (!swiperElRef.current) return;\n if (swiperRef.current.destroyed) {\n initSwiper();\n }\n mountSwiper({\n el: swiperElRef.current,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n paginationEl: paginationElRef.current,\n scrollbarEl: scrollbarElRef.current,\n swiper: swiperRef.current\n }, swiperParams);\n if (onSwiper) onSwiper(swiperRef.current);\n // eslint-disable-next-line\n return () => {\n if (swiperRef.current && !swiperRef.current.destroyed) {\n swiperRef.current.destroy(true, false);\n }\n };\n }, []);\n\n // watch for params change\n useIsomorphicLayoutEffect(() => {\n attachEvents();\n const changedParams = getChangedParams(passedParams, oldPassedParamsRef.current, slides, oldSlides.current, c => c.key);\n oldPassedParamsRef.current = passedParams;\n oldSlides.current = slides;\n if (changedParams.length && swiperRef.current && !swiperRef.current.destroyed) {\n updateSwiper({\n swiper: swiperRef.current,\n slides,\n passedParams,\n changedParams,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n scrollbarEl: scrollbarElRef.current,\n paginationEl: paginationElRef.current\n });\n }\n return () => {\n detachEvents();\n };\n });\n\n // update on virtual update\n useIsomorphicLayoutEffect(() => {\n updateOnVirtualData(swiperRef.current);\n }, [virtualData]);\n\n // bypass swiper instance to slides\n function renderSlides() {\n if (swiperParams.virtual) {\n return renderVirtual(swiperRef.current, slides, virtualData);\n }\n return slides.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper: swiperRef.current,\n swiperSlideIndex: index\n });\n });\n }\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: swiperElRef,\n className: uniqueClasses(`${containerClasses}${className ? ` ${className}` : ''}`)\n }, restProps), /*#__PURE__*/React.createElement(SwiperContext.Provider, {\n value: swiperRef.current\n }, slots['container-start'], /*#__PURE__*/React.createElement(WrapperTag, {\n className: wrapperClass(swiperParams.wrapperClass)\n }, slots['wrapper-start'], renderSlides(), slots['wrapper-end']), needsNavigation(swiperParams) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n ref: prevElRef,\n className: \"swiper-button-prev\"\n }), /*#__PURE__*/React.createElement(\"div\", {\n ref: nextElRef,\n className: \"swiper-button-next\"\n })), needsScrollbar(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: scrollbarElRef,\n className: \"swiper-scrollbar\"\n }), needsPagination(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: paginationElRef,\n className: \"swiper-pagination\"\n }), slots['container-end']));\n});\nSwiper.displayName = 'Swiper';\n\nconst SwiperSlide = /*#__PURE__*/forwardRef(function (_temp, externalRef) {\n let {\n tag: Tag = 'div',\n children,\n className = '',\n swiper,\n zoom,\n lazy,\n virtualIndex,\n swiperSlideIndex,\n ...rest\n } = _temp === void 0 ? {} : _temp;\n const slideElRef = useRef(null);\n const [slideClasses, setSlideClasses] = useState('swiper-slide');\n const [lazyLoaded, setLazyLoaded] = useState(false);\n function updateClasses(_s, el, classNames) {\n if (el === slideElRef.current) {\n setSlideClasses(classNames);\n }\n }\n useIsomorphicLayoutEffect(() => {\n if (typeof swiperSlideIndex !== 'undefined') {\n slideElRef.current.swiperSlideIndex = swiperSlideIndex;\n }\n if (externalRef) {\n externalRef.current = slideElRef.current;\n }\n if (!slideElRef.current || !swiper) {\n return;\n }\n if (swiper.destroyed) {\n if (slideClasses !== 'swiper-slide') {\n setSlideClasses('swiper-slide');\n }\n return;\n }\n swiper.on('_slideClass', updateClasses);\n // eslint-disable-next-line\n return () => {\n if (!swiper) return;\n swiper.off('_slideClass', updateClasses);\n };\n });\n useIsomorphicLayoutEffect(() => {\n if (swiper && slideElRef.current && !swiper.destroyed) {\n setSlideClasses(swiper.getSlideClasses(slideElRef.current));\n }\n }, [swiper]);\n const slideData = {\n isActive: slideClasses.indexOf('swiper-slide-active') >= 0,\n isVisible: slideClasses.indexOf('swiper-slide-visible') >= 0,\n isPrev: slideClasses.indexOf('swiper-slide-prev') >= 0,\n isNext: slideClasses.indexOf('swiper-slide-next') >= 0\n };\n const renderChildren = () => {\n return typeof children === 'function' ? children(slideData) : children;\n };\n const onLoad = () => {\n setLazyLoaded(true);\n };\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: slideElRef,\n className: uniqueClasses(`${slideClasses}${className ? ` ${className}` : ''}`),\n \"data-swiper-slide-index\": virtualIndex,\n onLoad: onLoad\n }, rest), zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-zoom-container\",\n \"data-swiper-zoom\": typeof zoom === 'number' ? zoom : undefined\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\"\n }))), !zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\"\n })));\n});\nSwiperSlide.displayName = 'SwiperSlide';\n\nexport { Swiper, SwiperSlide, useSwiper, useSwiperSlide };\n","function classesToSelector(classes) {\n if (classes === void 0) {\n classes = '';\n }\n return `.${classes.trim().replace(/([\\.:!+\\/])/g, '\\\\$1') // eslint-disable-line\n .replace(/ /g, '.')}`;\n}\n\nexport { classesToSelector as c };\n","import { c as classesToSelector } from '../shared/classes-to-selector.mjs';\nimport { c as createElementIfNotDefined } from '../shared/create-element-if-not-defined.mjs';\nimport { f as elementOuterSize, g as elementIndex, a as elementParents } from '../shared/utils.mjs';\n\nfunction Pagination(_ref) {\n let {\n swiper,\n extendParams,\n on,\n emit\n } = _ref;\n const pfx = 'swiper-pagination';\n extendParams({\n pagination: {\n el: null,\n bulletElement: 'span',\n clickable: false,\n hideOnClick: false,\n renderBullet: null,\n renderProgressbar: null,\n renderFraction: null,\n renderCustom: null,\n progressbarOpposite: false,\n type: 'bullets',\n // 'bullets' or 'progressbar' or 'fraction' or 'custom'\n dynamicBullets: false,\n dynamicMainBullets: 1,\n formatFractionCurrent: number => number,\n formatFractionTotal: number => number,\n bulletClass: `${pfx}-bullet`,\n bulletActiveClass: `${pfx}-bullet-active`,\n modifierClass: `${pfx}-`,\n currentClass: `${pfx}-current`,\n totalClass: `${pfx}-total`,\n hiddenClass: `${pfx}-hidden`,\n progressbarFillClass: `${pfx}-progressbar-fill`,\n progressbarOppositeClass: `${pfx}-progressbar-opposite`,\n clickableClass: `${pfx}-clickable`,\n lockClass: `${pfx}-lock`,\n horizontalClass: `${pfx}-horizontal`,\n verticalClass: `${pfx}-vertical`,\n paginationDisabledClass: `${pfx}-disabled`\n }\n });\n swiper.pagination = {\n el: null,\n bullets: []\n };\n let bulletSize;\n let dynamicBulletIndex = 0;\n const makeElementsArray = el => (Array.isArray(el) ? el : [el]).filter(e => !!e);\n function isPaginationDisabled() {\n return !swiper.params.pagination.el || !swiper.pagination.el || Array.isArray(swiper.pagination.el) && swiper.pagination.el.length === 0;\n }\n function setSideBullets(bulletEl, position) {\n const {\n bulletActiveClass\n } = swiper.params.pagination;\n if (!bulletEl) return;\n bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];\n if (bulletEl) {\n bulletEl.classList.add(`${bulletActiveClass}-${position}`);\n bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];\n if (bulletEl) {\n bulletEl.classList.add(`${bulletActiveClass}-${position}-${position}`);\n }\n }\n }\n function onBulletClick(e) {\n const bulletEl = e.target.closest(classesToSelector(swiper.params.pagination.bulletClass));\n if (!bulletEl) {\n return;\n }\n e.preventDefault();\n const index = elementIndex(bulletEl) * swiper.params.slidesPerGroup;\n if (swiper.params.loop) {\n if (swiper.realIndex === index) return;\n const realIndex = swiper.realIndex;\n const newSlideIndex = swiper.getSlideIndexByData(index);\n const currentSlideIndex = swiper.getSlideIndexByData(swiper.realIndex);\n const loopFix = dir => {\n const indexBeforeLoopFix = swiper.activeIndex;\n swiper.loopFix({\n direction: dir,\n activeSlideIndex: newSlideIndex,\n slideTo: false\n });\n const indexAfterFix = swiper.activeIndex;\n if (indexBeforeLoopFix === indexAfterFix) {\n swiper.slideToLoop(realIndex, 0, false, true);\n }\n };\n if (newSlideIndex > swiper.slides.length - swiper.loopedSlides) {\n loopFix(newSlideIndex > currentSlideIndex ? 'next' : 'prev');\n } else if (swiper.params.centeredSlides) {\n const slidesPerView = swiper.params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(swiper.params.slidesPerView, 10));\n if (newSlideIndex < Math.floor(slidesPerView / 2)) {\n loopFix('prev');\n }\n }\n swiper.slideToLoop(index);\n } else {\n swiper.slideTo(index);\n }\n }\n function update() {\n // Render || Update Pagination bullets/items\n const rtl = swiper.rtl;\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n let el = swiper.pagination.el;\n el = makeElementsArray(el);\n // Current/Total\n let current;\n let previousIndex;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const total = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n if (swiper.params.loop) {\n previousIndex = swiper.previousRealIndex || 0;\n current = swiper.params.slidesPerGroup > 1 ? Math.floor(swiper.realIndex / swiper.params.slidesPerGroup) : swiper.realIndex;\n } else if (typeof swiper.snapIndex !== 'undefined') {\n current = swiper.snapIndex;\n previousIndex = swiper.previousSnapIndex;\n } else {\n previousIndex = swiper.previousIndex || 0;\n current = swiper.activeIndex || 0;\n }\n // Types\n if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {\n const bullets = swiper.pagination.bullets;\n let firstIndex;\n let lastIndex;\n let midIndex;\n if (params.dynamicBullets) {\n bulletSize = elementOuterSize(bullets[0], swiper.isHorizontal() ? 'width' : 'height', true);\n el.forEach(subEl => {\n subEl.style[swiper.isHorizontal() ? 'width' : 'height'] = `${bulletSize * (params.dynamicMainBullets + 4)}px`;\n });\n if (params.dynamicMainBullets > 1 && previousIndex !== undefined) {\n dynamicBulletIndex += current - (previousIndex || 0);\n if (dynamicBulletIndex > params.dynamicMainBullets - 1) {\n dynamicBulletIndex = params.dynamicMainBullets - 1;\n } else if (dynamicBulletIndex < 0) {\n dynamicBulletIndex = 0;\n }\n }\n firstIndex = Math.max(current - dynamicBulletIndex, 0);\n lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);\n midIndex = (lastIndex + firstIndex) / 2;\n }\n bullets.forEach(bulletEl => {\n const classesToRemove = [...['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`)].map(s => typeof s === 'string' && s.includes(' ') ? s.split(' ') : s).flat();\n bulletEl.classList.remove(...classesToRemove);\n });\n if (el.length > 1) {\n bullets.forEach(bullet => {\n const bulletIndex = elementIndex(bullet);\n if (bulletIndex === current) {\n bullet.classList.add(...params.bulletActiveClass.split(' '));\n } else if (swiper.isElement) {\n bullet.setAttribute('part', 'bullet');\n }\n if (params.dynamicBullets) {\n if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {\n bullet.classList.add(...`${params.bulletActiveClass}-main`.split(' '));\n }\n if (bulletIndex === firstIndex) {\n setSideBullets(bullet, 'prev');\n }\n if (bulletIndex === lastIndex) {\n setSideBullets(bullet, 'next');\n }\n }\n });\n } else {\n const bullet = bullets[current];\n if (bullet) {\n bullet.classList.add(...params.bulletActiveClass.split(' '));\n }\n if (swiper.isElement) {\n bullets.forEach((bulletEl, bulletIndex) => {\n bulletEl.setAttribute('part', bulletIndex === current ? 'bullet-active' : 'bullet');\n });\n }\n if (params.dynamicBullets) {\n const firstDisplayedBullet = bullets[firstIndex];\n const lastDisplayedBullet = bullets[lastIndex];\n for (let i = firstIndex; i <= lastIndex; i += 1) {\n if (bullets[i]) {\n bullets[i].classList.add(...`${params.bulletActiveClass}-main`.split(' '));\n }\n }\n setSideBullets(firstDisplayedBullet, 'prev');\n setSideBullets(lastDisplayedBullet, 'next');\n }\n }\n if (params.dynamicBullets) {\n const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);\n const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;\n const offsetProp = rtl ? 'right' : 'left';\n bullets.forEach(bullet => {\n bullet.style[swiper.isHorizontal() ? offsetProp : 'top'] = `${bulletsOffset}px`;\n });\n }\n }\n el.forEach((subEl, subElIndex) => {\n if (params.type === 'fraction') {\n subEl.querySelectorAll(classesToSelector(params.currentClass)).forEach(fractionEl => {\n fractionEl.textContent = params.formatFractionCurrent(current + 1);\n });\n subEl.querySelectorAll(classesToSelector(params.totalClass)).forEach(totalEl => {\n totalEl.textContent = params.formatFractionTotal(total);\n });\n }\n if (params.type === 'progressbar') {\n let progressbarDirection;\n if (params.progressbarOpposite) {\n progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';\n } else {\n progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';\n }\n const scale = (current + 1) / total;\n let scaleX = 1;\n let scaleY = 1;\n if (progressbarDirection === 'horizontal') {\n scaleX = scale;\n } else {\n scaleY = scale;\n }\n subEl.querySelectorAll(classesToSelector(params.progressbarFillClass)).forEach(progressEl => {\n progressEl.style.transform = `translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`;\n progressEl.style.transitionDuration = `${swiper.params.speed}ms`;\n });\n }\n if (params.type === 'custom' && params.renderCustom) {\n subEl.innerHTML = params.renderCustom(swiper, current + 1, total);\n if (subElIndex === 0) emit('paginationRender', subEl);\n } else {\n if (subElIndex === 0) emit('paginationRender', subEl);\n emit('paginationUpdate', subEl);\n }\n if (swiper.params.watchOverflow && swiper.enabled) {\n subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass);\n }\n });\n }\n function render() {\n // Render Container\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n let el = swiper.pagination.el;\n el = makeElementsArray(el);\n let paginationHTML = '';\n if (params.type === 'bullets') {\n let numberOfBullets = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && numberOfBullets > slidesLength) {\n numberOfBullets = slidesLength;\n }\n for (let i = 0; i < numberOfBullets; i += 1) {\n if (params.renderBullet) {\n paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);\n } else {\n // prettier-ignore\n paginationHTML += `<${params.bulletElement} ${swiper.isElement ? 'part=\"bullet\"' : ''} class=\"${params.bulletClass}\">${params.bulletElement}>`;\n }\n }\n }\n if (params.type === 'fraction') {\n if (params.renderFraction) {\n paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);\n } else {\n paginationHTML = `` + ' / ' + ``;\n }\n }\n if (params.type === 'progressbar') {\n if (params.renderProgressbar) {\n paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);\n } else {\n paginationHTML = ``;\n }\n }\n swiper.pagination.bullets = [];\n el.forEach(subEl => {\n if (params.type !== 'custom') {\n subEl.innerHTML = paginationHTML || '';\n }\n if (params.type === 'bullets') {\n swiper.pagination.bullets.push(...subEl.querySelectorAll(classesToSelector(params.bulletClass)));\n }\n });\n if (params.type !== 'custom') {\n emit('paginationRender', el[0]);\n }\n }\n function init() {\n swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, {\n el: 'swiper-pagination'\n });\n const params = swiper.params.pagination;\n if (!params.el) return;\n let el;\n if (typeof params.el === 'string' && swiper.isElement) {\n el = swiper.el.querySelector(params.el);\n }\n if (!el && typeof params.el === 'string') {\n el = [...document.querySelectorAll(params.el)];\n }\n if (!el) {\n el = params.el;\n }\n if (!el || el.length === 0) return;\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && Array.isArray(el) && el.length > 1) {\n el = [...swiper.el.querySelectorAll(params.el)];\n // check if it belongs to another nested Swiper\n if (el.length > 1) {\n el = el.filter(subEl => {\n if (elementParents(subEl, '.swiper')[0] !== swiper.el) return false;\n return true;\n })[0];\n }\n }\n if (Array.isArray(el) && el.length === 1) el = el[0];\n Object.assign(swiper.pagination, {\n el\n });\n el = makeElementsArray(el);\n el.forEach(subEl => {\n if (params.type === 'bullets' && params.clickable) {\n subEl.classList.add(...(params.clickableClass || '').split(' '));\n }\n subEl.classList.add(params.modifierClass + params.type);\n subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n if (params.type === 'bullets' && params.dynamicBullets) {\n subEl.classList.add(`${params.modifierClass}${params.type}-dynamic`);\n dynamicBulletIndex = 0;\n if (params.dynamicMainBullets < 1) {\n params.dynamicMainBullets = 1;\n }\n }\n if (params.type === 'progressbar' && params.progressbarOpposite) {\n subEl.classList.add(params.progressbarOppositeClass);\n }\n if (params.clickable) {\n subEl.addEventListener('click', onBulletClick);\n }\n if (!swiper.enabled) {\n subEl.classList.add(params.lockClass);\n }\n });\n }\n function destroy() {\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n let el = swiper.pagination.el;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => {\n subEl.classList.remove(params.hiddenClass);\n subEl.classList.remove(params.modifierClass + params.type);\n subEl.classList.remove(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n if (params.clickable) {\n subEl.classList.remove(...(params.clickableClass || '').split(' '));\n subEl.removeEventListener('click', onBulletClick);\n }\n });\n }\n if (swiper.pagination.bullets) swiper.pagination.bullets.forEach(subEl => subEl.classList.remove(...params.bulletActiveClass.split(' ')));\n }\n on('changeDirection', () => {\n if (!swiper.pagination || !swiper.pagination.el) return;\n const params = swiper.params.pagination;\n let {\n el\n } = swiper.pagination;\n el = makeElementsArray(el);\n el.forEach(subEl => {\n subEl.classList.remove(params.horizontalClass, params.verticalClass);\n subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n });\n });\n on('init', () => {\n if (swiper.params.pagination.enabled === false) {\n // eslint-disable-next-line\n disable();\n } else {\n init();\n render();\n update();\n }\n });\n on('activeIndexChange', () => {\n if (typeof swiper.snapIndex === 'undefined') {\n update();\n }\n });\n on('snapIndexChange', () => {\n update();\n });\n on('snapGridLengthChange', () => {\n render();\n update();\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.pagination.lockClass));\n }\n });\n on('lock unlock', () => {\n update();\n });\n on('click', (_s, e) => {\n const targetEl = e.target;\n const el = makeElementsArray(swiper.pagination.el);\n if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && el && el.length > 0 && !targetEl.classList.contains(swiper.params.pagination.bulletClass)) {\n if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return;\n const isHidden = el[0].classList.contains(swiper.params.pagination.hiddenClass);\n if (isHidden === true) {\n emit('paginationShow');\n } else {\n emit('paginationHide');\n }\n el.forEach(subEl => subEl.classList.toggle(swiper.params.pagination.hiddenClass));\n }\n });\n const enable = () => {\n swiper.el.classList.remove(swiper.params.pagination.paginationDisabledClass);\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList.remove(swiper.params.pagination.paginationDisabledClass));\n }\n init();\n render();\n update();\n };\n const disable = () => {\n swiper.el.classList.add(swiper.params.pagination.paginationDisabledClass);\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList.add(swiper.params.pagination.paginationDisabledClass));\n }\n destroy();\n };\n Object.assign(swiper.pagination, {\n enable,\n disable,\n render,\n update,\n init,\n destroy\n });\n}\n\nexport { Pagination as default };\n","import { e as elementChildren, c as createElement } from './utils.mjs';\n\nfunction createElementIfNotDefined(swiper, originalParams, params, checkProps) {\n if (swiper.params.createElements) {\n Object.keys(checkProps).forEach(key => {\n if (!params[key] && params.auto === true) {\n let element = elementChildren(swiper.el, `.${checkProps[key]}`)[0];\n if (!element) {\n element = createElement('div', checkProps[key]);\n element.className = checkProps[key];\n swiper.el.append(element);\n }\n params[key] = element;\n originalParams[key] = element;\n }\n });\n }\n return params;\n}\n\nexport { createElementIfNotDefined as c };\n","import { g as getDocument } from '../shared/ssr-window.esm.mjs';\n\n/* eslint no-underscore-dangle: \"off\" */\n/* eslint no-use-before-define: \"off\" */\nfunction Autoplay(_ref) {\n let {\n swiper,\n extendParams,\n on,\n emit,\n params\n } = _ref;\n swiper.autoplay = {\n running: false,\n paused: false,\n timeLeft: 0\n };\n extendParams({\n autoplay: {\n enabled: false,\n delay: 3000,\n waitForTransition: true,\n disableOnInteraction: true,\n stopOnLastSlide: false,\n reverseDirection: false,\n pauseOnMouseEnter: false\n }\n });\n let timeout;\n let raf;\n let autoplayDelayTotal = params && params.autoplay ? params.autoplay.delay : 3000;\n let autoplayDelayCurrent = params && params.autoplay ? params.autoplay.delay : 3000;\n let autoplayTimeLeft;\n let autoplayStartTime = new Date().getTime;\n let wasPaused;\n let isTouched;\n let pausedByTouch;\n let touchStartTimeout;\n let slideChanged;\n let pausedByInteraction;\n function onTransitionEnd(e) {\n if (!swiper || swiper.destroyed || !swiper.wrapperEl) return;\n if (e.target !== swiper.wrapperEl) return;\n swiper.wrapperEl.removeEventListener('transitionend', onTransitionEnd);\n resume();\n }\n const calcTimeLeft = () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n if (swiper.autoplay.paused) {\n wasPaused = true;\n } else if (wasPaused) {\n autoplayDelayCurrent = autoplayTimeLeft;\n wasPaused = false;\n }\n const timeLeft = swiper.autoplay.paused ? autoplayTimeLeft : autoplayStartTime + autoplayDelayCurrent - new Date().getTime();\n swiper.autoplay.timeLeft = timeLeft;\n emit('autoplayTimeLeft', timeLeft, timeLeft / autoplayDelayTotal);\n raf = requestAnimationFrame(() => {\n calcTimeLeft();\n });\n };\n const getSlideDelay = () => {\n let activeSlideEl;\n if (swiper.virtual && swiper.params.virtual.enabled) {\n activeSlideEl = swiper.slides.filter(slideEl => slideEl.classList.contains('swiper-slide-active'))[0];\n } else {\n activeSlideEl = swiper.slides[swiper.activeIndex];\n }\n if (!activeSlideEl) return undefined;\n const currentSlideDelay = parseInt(activeSlideEl.getAttribute('data-swiper-autoplay'), 10);\n return currentSlideDelay;\n };\n const run = delayForce => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n cancelAnimationFrame(raf);\n calcTimeLeft();\n let delay = typeof delayForce === 'undefined' ? swiper.params.autoplay.delay : delayForce;\n autoplayDelayTotal = swiper.params.autoplay.delay;\n autoplayDelayCurrent = swiper.params.autoplay.delay;\n const currentSlideDelay = getSlideDelay();\n if (!Number.isNaN(currentSlideDelay) && currentSlideDelay > 0 && typeof delayForce === 'undefined') {\n delay = currentSlideDelay;\n autoplayDelayTotal = currentSlideDelay;\n autoplayDelayCurrent = currentSlideDelay;\n }\n autoplayTimeLeft = delay;\n const speed = swiper.params.speed;\n const proceed = () => {\n if (!swiper || swiper.destroyed) return;\n if (swiper.params.autoplay.reverseDirection) {\n if (!swiper.isBeginning || swiper.params.loop || swiper.params.rewind) {\n swiper.slidePrev(speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n swiper.slideTo(swiper.slides.length - 1, speed, true, true);\n emit('autoplay');\n }\n } else {\n if (!swiper.isEnd || swiper.params.loop || swiper.params.rewind) {\n swiper.slideNext(speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n swiper.slideTo(0, speed, true, true);\n emit('autoplay');\n }\n }\n if (swiper.params.cssMode) {\n autoplayStartTime = new Date().getTime();\n requestAnimationFrame(() => {\n run();\n });\n }\n };\n if (delay > 0) {\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n proceed();\n }, delay);\n } else {\n requestAnimationFrame(() => {\n proceed();\n });\n }\n\n // eslint-disable-next-line\n return delay;\n };\n const start = () => {\n swiper.autoplay.running = true;\n run();\n emit('autoplayStart');\n };\n const stop = () => {\n swiper.autoplay.running = false;\n clearTimeout(timeout);\n cancelAnimationFrame(raf);\n emit('autoplayStop');\n };\n const pause = (internal, reset) => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n clearTimeout(timeout);\n if (!internal) {\n pausedByInteraction = true;\n }\n const proceed = () => {\n emit('autoplayPause');\n if (swiper.params.autoplay.waitForTransition) {\n swiper.wrapperEl.addEventListener('transitionend', onTransitionEnd);\n } else {\n resume();\n }\n };\n swiper.autoplay.paused = true;\n if (reset) {\n if (slideChanged) {\n autoplayTimeLeft = swiper.params.autoplay.delay;\n }\n slideChanged = false;\n proceed();\n return;\n }\n const delay = autoplayTimeLeft || swiper.params.autoplay.delay;\n autoplayTimeLeft = delay - (new Date().getTime() - autoplayStartTime);\n if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop) return;\n if (autoplayTimeLeft < 0) autoplayTimeLeft = 0;\n proceed();\n };\n const resume = () => {\n if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop || swiper.destroyed || !swiper.autoplay.running) return;\n autoplayStartTime = new Date().getTime();\n if (pausedByInteraction) {\n pausedByInteraction = false;\n run(autoplayTimeLeft);\n } else {\n run();\n }\n swiper.autoplay.paused = false;\n emit('autoplayResume');\n };\n const onVisibilityChange = () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n const document = getDocument();\n if (document.visibilityState === 'hidden') {\n pausedByInteraction = true;\n pause(true);\n }\n if (document.visibilityState === 'visible') {\n resume();\n }\n };\n const onPointerEnter = e => {\n if (e.pointerType !== 'mouse') return;\n pausedByInteraction = true;\n if (swiper.animating || swiper.autoplay.paused) return;\n pause(true);\n };\n const onPointerLeave = e => {\n if (e.pointerType !== 'mouse') return;\n if (swiper.autoplay.paused) {\n resume();\n }\n };\n const attachMouseEvents = () => {\n if (swiper.params.autoplay.pauseOnMouseEnter) {\n swiper.el.addEventListener('pointerenter', onPointerEnter);\n swiper.el.addEventListener('pointerleave', onPointerLeave);\n }\n };\n const detachMouseEvents = () => {\n swiper.el.removeEventListener('pointerenter', onPointerEnter);\n swiper.el.removeEventListener('pointerleave', onPointerLeave);\n };\n const attachDocumentEvents = () => {\n const document = getDocument();\n document.addEventListener('visibilitychange', onVisibilityChange);\n };\n const detachDocumentEvents = () => {\n const document = getDocument();\n document.removeEventListener('visibilitychange', onVisibilityChange);\n };\n on('init', () => {\n if (swiper.params.autoplay.enabled) {\n attachMouseEvents();\n attachDocumentEvents();\n autoplayStartTime = new Date().getTime();\n start();\n }\n });\n on('destroy', () => {\n detachMouseEvents();\n detachDocumentEvents();\n if (swiper.autoplay.running) {\n stop();\n }\n });\n on('beforeTransitionStart', (_s, speed, internal) => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n if (internal || !swiper.params.autoplay.disableOnInteraction) {\n pause(true, true);\n } else {\n stop();\n }\n });\n on('sliderFirstMove', () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n return;\n }\n isTouched = true;\n pausedByTouch = false;\n pausedByInteraction = false;\n touchStartTimeout = setTimeout(() => {\n pausedByInteraction = true;\n pausedByTouch = true;\n pause(true);\n }, 200);\n });\n on('touchEnd', () => {\n if (swiper.destroyed || !swiper.autoplay.running || !isTouched) return;\n clearTimeout(touchStartTimeout);\n clearTimeout(timeout);\n if (swiper.params.autoplay.disableOnInteraction) {\n pausedByTouch = false;\n isTouched = false;\n return;\n }\n if (pausedByTouch && swiper.params.cssMode) resume();\n pausedByTouch = false;\n isTouched = false;\n });\n on('slideChange', () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n slideChanged = true;\n });\n Object.assign(swiper.autoplay, {\n start,\n stop,\n pause,\n resume\n });\n}\n\nexport { Autoplay as default };\n","/*\r\n * Author: Kevin Tamakuwala (Github: @kevintamakuwala)\r\n * Date: 16/10/2003\r\n * Functionalities:\r\n * 1) Infinite Autoplay when present on screen\r\n * 2) Swiping functionality\r\n*/\r\n\r\nimport React from \"react\";\r\n\r\n// Import Swiper React components\r\nimport { Swiper, SwiperSlide } from \"swiper/react\";\r\n\r\n// Import Swiper styles\r\nimport \"swiper/css\";\r\nimport \"swiper/css/effect-coverflow\";\r\nimport \"swiper/css\";\r\nimport \"./slider.css\";\r\nimport { Pagination, Autoplay } from \"swiper/modules\";\r\nimport SwiperCore from \"swiper\";\r\n\r\n// dummy images, you can keep cards instead.\r\nconst dummyImages = [\r\n \"https://images.unsplash.com/photo-1696004503906-6b6ca3923f71?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODE3Nw&ixlib=rb-4.0.3&q=80&w=300\",\r\n \"https://images.unsplash.com/photo-1696526552981-893b9caf991d?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODIyNg&ixlib=rb-4.0.3&q=80&w=300\",\r\n \"https://images.unsplash.com/photo-1693590593548-adb2d98e8f2b?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODI4OA&ixlib=rb-4.0.3&q=80&w=300\",\r\n \"https://images.unsplash.com/photo-1696164712534-25a0dca38a2d?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODMyMQ&ixlib=rb-4.0.3&q=80&w=300\",\r\n \"https://images.unsplash.com/photo-1696164255885-4bb2db6bb3f2?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODMzOA&ixlib=rb-4.0.3&q=80&w=300\",\r\n \"https://source.unsplash.com/random/300x300\",\r\n \"https://images.unsplash.com/photo-1695642579321-fcb1fc79b976?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODM2Mg&ixlib=rb-4.0.3&q=80&w=300\",\r\n];\r\n\r\nconst Slider = () => {\r\n // using autoplay feature\r\n SwiperCore.use([Autoplay]);\r\n\r\n // including styles\r\n const styles = {\r\n slider__inner_container: {\r\n display: \"flex\",\r\n transition: \".5s\",\r\n },\r\n slider__container: {\r\n overflow: \"hidden\",\r\n margin: \"0 3rem\",\r\n },\r\n __card: {\r\n padding: \"1rem 0.5rem\",\r\n },\r\n slideIn: {\r\n display: \"none\",\r\n },\r\n };\r\n\r\n // for autoplay slider: only when present on viewport. Use below code to achieve that using framer-motion and conditional rendering. --------------------------\r\n\r\n // const [isIntersecting, setIsIntersecting] = useState(false);\r\n // const ref = useRef(null);\r\n\r\n // useEffect(() => {\r\n // const observer = new IntersectionObserver(\r\n // ([entry]) => {\r\n // setIsIntersecting(entry.isIntersecting);\r\n // },\r\n // { rootMargin: \"-100px\" }\r\n // );\r\n // observer.observe(ref.current);\r\n\r\n // return () => observer.disconnect();\r\n // }, []);\r\n\r\n // useEffect(() => {\r\n // if (isIntersecting) {\r\n // ref.current.querySelectorAll(\"div\").forEach((el) => {\r\n // el.classList.remove(\"slideIn\");\r\n // });\r\n // }\r\n // }, [isIntersecting]);\r\n\r\n return (\r\n e||125 a||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","import React from \"react\";\r\nconst Layout = () => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default Layout;\r\n","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nexport default function _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","/**\n * SSR Window 4.0.2\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object;\n}\nfunction extend(target, src) {\n if (target === void 0) {\n target = {};\n }\n if (src === void 0) {\n src = {};\n }\n Object.keys(src).forEach(key => {\n if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\nconst ssrDocument = {\n body: {},\n addEventListener() {},\n removeEventListener() {},\n activeElement: {\n blur() {},\n nodeName: ''\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() {}\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() {},\n getElementsByTagName() {\n return [];\n }\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n }\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: ''\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n },\n history: {\n replaceState() {},\n pushState() {},\n go() {},\n back() {}\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() {},\n removeEventListener() {},\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n }\n };\n },\n Image() {},\n Date() {},\n screen: {},\n setTimeout() {},\n clearTimeout() {},\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n }\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { getWindow as a, getDocument as g };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\nimport { a as elementParents, l as elementStyle, e as elementChildren, s as setCSSProperty, f as elementOuterSize, m as elementNextAll, o as elementPrevAll, h as getTranslate, p as animateCSSModeScroll, n as nextTick, d as now, q as extend, g as elementIndex, c as createElement, r as deleteProps } from './utils.mjs';\n\nlet support;\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n return {\n smoothScroll: document.documentElement && document.documentElement.style && 'scrollBehavior' in document.documentElement.style,\n touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch)\n };\n}\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n return support;\n}\n\nlet deviceCached;\nfunction calcDevice(_temp) {\n let {\n userAgent\n } = _temp === void 0 ? {} : _temp;\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n const device = {\n ios: false,\n android: false\n };\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel';\n\n // iPadOs 13 fix\n const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n }\n\n // Android\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n }\n\n // Export object\n return device;\n}\nfunction getDevice(overrides) {\n if (overrides === void 0) {\n overrides = {};\n }\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n return deviceCached;\n}\n\nlet browser;\nfunction calcBrowser() {\n const window = getWindow();\n let needPerspectiveFix = false;\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n if (isSafari()) {\n const ua = String(window.navigator.userAgent);\n if (ua.includes('Version/')) {\n const [major, minor] = ua.split('Version/')[1].split(' ')[0].split('.').map(num => Number(num));\n needPerspectiveFix = major < 16 || major === 16 && minor < 2;\n }\n }\n return {\n isSafari: needPerspectiveFix || isSafari(),\n needPerspectiveFix,\n isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent)\n };\n}\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n return browser;\n}\n\nfunction Resize(_ref) {\n let {\n swiper,\n on,\n emit\n } = _ref;\n const window = getWindow();\n let observer = null;\n let animationFrame = null;\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver(entries => {\n animationFrame = window.requestAnimationFrame(() => {\n const {\n width,\n height\n } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(_ref2 => {\n let {\n contentBoxSize,\n contentRect,\n target\n } = _ref2;\n if (target && target !== swiper.el) return;\n newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n });\n observer.observe(swiper.el);\n };\n const removeObserver = () => {\n if (animationFrame) {\n window.cancelAnimationFrame(animationFrame);\n }\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}\n\nfunction Observer(_ref) {\n let {\n swiper,\n extendParams,\n on,\n emit\n } = _ref;\n const observers = [];\n const window = getWindow();\n const attach = function (target, options) {\n if (options === void 0) {\n options = {};\n }\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc(mutations => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (swiper.__preventObserver__) return;\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n observers.push(observer);\n };\n const init = () => {\n if (!swiper.params.observer) return;\n if (swiper.params.observeParents) {\n const containerParents = elementParents(swiper.hostEl);\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n }\n // Observe container\n attach(swiper.hostEl, {\n childList: swiper.params.observeSlideChildren\n });\n\n // Observe wrapper\n attach(swiper.wrapperEl, {\n attributes: false\n });\n };\n const destroy = () => {\n observers.forEach(observer => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false\n });\n on('init', init);\n on('destroy', destroy);\n}\n\n/* eslint-disable no-underscore-dangle */\n\nvar eventsEmitter = {\n on(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach(event => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n once(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n function onceHandler() {\n self.off(events, onceHandler);\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n handler.apply(self, args);\n }\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n onAny(handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n return self;\n },\n offAny(handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n return self;\n },\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach(event => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n emit() {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach(event => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach(eventHandler => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach(eventHandler => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n};\n\nfunction updateSize() {\n const swiper = this;\n let width;\n let height;\n const el = swiper.el;\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = el.clientWidth;\n }\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = el.clientHeight;\n }\n if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n return;\n }\n\n // Subtract paddings\n width = width - parseInt(elementStyle(el, 'padding-left') || 0, 10) - parseInt(elementStyle(el, 'padding-right') || 0, 10);\n height = height - parseInt(elementStyle(el, 'padding-top') || 0, 10) - parseInt(elementStyle(el, 'padding-bottom') || 0, 10);\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height\n });\n}\n\nfunction updateSlides() {\n const swiper = this;\n function getDirectionLabel(property) {\n if (swiper.isHorizontal()) {\n return property;\n }\n // prettier-ignore\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom'\n }[property];\n }\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0);\n }\n const params = swiper.params;\n const {\n wrapperEl,\n slidesEl,\n size: swiperSize,\n rtlTranslate: rtl,\n wrongRTL\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = elementChildren(slidesEl, `.${swiper.params.slideClass}, swiper-slide`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n let offsetBefore = params.slidesOffsetBefore;\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n let offsetAfter = params.slidesOffsetAfter;\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n if (typeof swiperSize === 'undefined') {\n return;\n }\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n swiper.virtualSize = -spaceBetween;\n\n // reset margins\n slides.forEach(slideEl => {\n if (rtl) {\n slideEl.style.marginLeft = '';\n } else {\n slideEl.style.marginRight = '';\n }\n slideEl.style.marginBottom = '';\n slideEl.style.marginTop = '';\n });\n\n // reset cssMode offsets\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', '');\n }\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n if (gridEnabled) {\n swiper.grid.initSlides(slidesLength);\n }\n\n // Calc slides\n let slideSize;\n const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {\n return typeof params.breakpoints[key].slidesPerView !== 'undefined';\n }).length > 0;\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n let slide;\n if (slides[i]) slide = slides[i];\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel);\n }\n if (slides[i] && elementStyle(slide, 'display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n if (shouldResetSlideSize) {\n slides[i].style[getDirectionLabel('width')] = ``;\n }\n const slideStyles = getComputedStyle(slide);\n const currentTransform = slide.style.transform;\n const currentWebKitTransform = slide.style.webkitTransform;\n if (currentTransform) {\n slide.style.transform = 'none';\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = 'none';\n }\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? elementOuterSize(slide, 'width', true) : elementOuterSize(slide, 'height', true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const {\n clientWidth,\n offsetWidth\n } = slide;\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);\n }\n }\n if (currentTransform) {\n slide.style.transform = currentTransform;\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = currentWebKitTransform;\n }\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n if (slides[i]) {\n slides[i].style[getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n slidesSizesGrid.push(slideSize);\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n swiper.virtualSize += slideSize + spaceBetween;\n prevSlideSize = slideSize;\n index += 1;\n }\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (params.setWrapperSize) {\n wrapperEl.style[getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel);\n }\n\n // Remove last grid elements depending on width\n if (!params.centeredSlides) {\n const newSlidesGrid = [];\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n snapGrid = newSlidesGrid;\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n if (isVirtual && params.loop) {\n const size = slidesSizesGrid[0] + spaceBetween;\n if (params.slidesPerGroup > 1) {\n const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup);\n const groupSize = size * params.slidesPerGroup;\n for (let i = 0; i < groups; i += 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize);\n }\n }\n for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) {\n if (params.slidesPerGroup === 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + size);\n }\n slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size);\n swiper.virtualSize += size;\n }\n }\n if (snapGrid.length === 0) snapGrid = [0];\n if (spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight');\n slides.filter((_, slideIndex) => {\n if (!params.cssMode || params.loop) return true;\n if (slideIndex === slides.length - 1) {\n return false;\n }\n return true;\n }).forEach(slideEl => {\n slideEl.style[key] = `${spaceBetween}px`;\n });\n }\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map(snap => {\n if (snap <= 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid\n });\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);\n }\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) {\n const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`;\n const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass);\n if (slidesLength <= params.maxBackfaceHiddenSlides) {\n if (!hasClassBackfaceClassAdded) swiper.el.classList.add(backFaceHiddenClass);\n } else if (hasClassBackfaceClassAdded) {\n swiper.el.classList.remove(backFaceHiddenClass);\n }\n }\n}\n\nfunction updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n const getSlideByIndex = index => {\n if (isVirtual) {\n return swiper.slides[swiper.getSlideIndexByData(index)];\n }\n return swiper.slides[index];\n };\n // Find slides currently in view\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n (swiper.visibleSlides || []).forEach(slide => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n }\n\n // Find new height from highest slide in view\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n }\n\n // Update Height\n if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`;\n}\n\nfunction updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n // eslint-disable-next-line\n const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0;\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset - swiper.cssOverflowAdjustment();\n }\n}\n\nfunction updateSlidesProgress(translate) {\n if (translate === void 0) {\n translate = this && this.translate || 0;\n }\n const swiper = this;\n const params = swiper.params;\n const {\n slides,\n rtlTranslate: rtl,\n snapGrid\n } = swiper;\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate;\n\n // Visible Slides\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideVisibleClass);\n });\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n let spaceBetween = params.spaceBetween;\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n let slideOffset = slide.swiperSlideOffset;\n if (params.cssMode && params.centeredSlides) {\n slideOffset -= slides[0].swiperSlideOffset;\n }\n const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const slideBefore = -(offsetCenter - slideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides[i].classList.add(params.slideVisibleClass);\n }\n slide.progress = rtl ? -slideProgress : slideProgress;\n slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;\n }\n}\n\nfunction updateProgress(translate) {\n const swiper = this;\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1;\n // eslint-disable-next-line\n translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n }\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let {\n progress,\n isBeginning,\n isEnd,\n progressLoop\n } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n const isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1;\n const isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1;\n isBeginning = isBeginningRounded || progress <= 0;\n isEnd = isEndRounded || progress >= 1;\n if (isBeginningRounded) progress = 0;\n if (isEndRounded) progress = 1;\n }\n if (params.loop) {\n const firstSlideIndex = swiper.getSlideIndexByData(0);\n const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1);\n const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex];\n const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex];\n const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1];\n const translateAbs = Math.abs(translate);\n if (translateAbs >= firstSlideTranslate) {\n progressLoop = (translateAbs - firstSlideTranslate) / translateMax;\n } else {\n progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax;\n }\n if (progressLoop > 1) progressLoop -= 1;\n }\n Object.assign(swiper, {\n progress,\n progressLoop,\n isBeginning,\n isEnd\n });\n if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n swiper.emit('fromEdge');\n }\n swiper.emit('progress', progress);\n}\n\nfunction updateSlidesClasses() {\n const swiper = this;\n const {\n slides,\n params,\n slidesEl,\n activeIndex\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const getFilteredSlide = selector => {\n return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];\n };\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass);\n });\n let activeSlide;\n if (isVirtual) {\n if (params.loop) {\n let slideIndex = activeIndex - swiper.virtual.slidesBefore;\n if (slideIndex < 0) slideIndex = swiper.virtual.slides.length + slideIndex;\n if (slideIndex >= swiper.virtual.slides.length) slideIndex -= swiper.virtual.slides.length;\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${slideIndex}\"]`);\n } else {\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${activeIndex}\"]`);\n }\n } else {\n activeSlide = slides[activeIndex];\n }\n if (activeSlide) {\n // Active classes\n activeSlide.classList.add(params.slideActiveClass);\n\n // Next Slide\n let nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !nextSlide) {\n nextSlide = slides[0];\n }\n if (nextSlide) {\n nextSlide.classList.add(params.slideNextClass);\n }\n // Prev Slide\n let prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !prevSlide === 0) {\n prevSlide = slides[slides.length - 1];\n }\n if (prevSlide) {\n prevSlide.classList.add(params.slidePrevClass);\n }\n }\n swiper.emitSlidesClasses();\n}\n\nconst processLazyPreloader = (swiper, imageEl) => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;\n const slideEl = imageEl.closest(slideSelector());\n if (slideEl) {\n let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (!lazyEl && swiper.isElement) {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n } else {\n // init later\n requestAnimationFrame(() => {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (lazyEl) lazyEl.remove();\n }\n });\n }\n }\n if (lazyEl) lazyEl.remove();\n }\n};\nconst unlazy = (swiper, index) => {\n if (!swiper.slides[index]) return;\n const imageEl = swiper.slides[index].querySelector('[loading=\"lazy\"]');\n if (imageEl) imageEl.removeAttribute('loading');\n};\nconst preload = swiper => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n let amount = swiper.params.lazyPreloadPrevNext;\n const len = swiper.slides.length;\n if (!len || !amount || amount < 0) return;\n amount = Math.min(amount, len);\n const slidesPerView = swiper.params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView);\n const activeIndex = swiper.activeIndex;\n if (swiper.params.grid && swiper.params.grid.rows > 1) {\n const activeColumn = activeIndex;\n const preloadColumns = [activeColumn - amount];\n preloadColumns.push(...Array.from({\n length: amount\n }).map((_, i) => {\n return activeColumn + slidesPerView + i;\n }));\n swiper.slides.forEach((slideEl, i) => {\n if (preloadColumns.includes(slideEl.column)) unlazy(swiper, i);\n });\n return;\n }\n const slideIndexLastInView = activeIndex + slidesPerView - 1;\n if (swiper.params.rewind || swiper.params.loop) {\n for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) {\n const realIndex = (i % len + len) % len;\n if (realIndex < activeIndex || realIndex > slideIndexLastInView) unlazy(swiper, realIndex);\n }\n } else {\n for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) {\n if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) {\n unlazy(swiper, i);\n }\n }\n }\n};\n\nfunction getActiveIndexByTranslate(swiper) {\n const {\n slidesGrid,\n params\n } = swiper;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n let activeIndex;\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n }\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n return activeIndex;\n}\nfunction updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n const getVirtualRealIndex = aIndex => {\n let realIndex = aIndex - swiper.virtual.slidesBefore;\n if (realIndex < 0) {\n realIndex = swiper.virtual.slides.length + realIndex;\n }\n if (realIndex >= swiper.virtual.slides.length) {\n realIndex -= swiper.virtual.slides.length;\n }\n return realIndex;\n };\n if (typeof activeIndex === 'undefined') {\n activeIndex = getActiveIndexByTranslate(swiper);\n }\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n if (activeIndex === previousIndex) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.realIndex = getVirtualRealIndex(activeIndex);\n }\n return;\n }\n // Get real index\n let realIndex;\n if (swiper.virtual && params.virtual.enabled && params.loop) {\n realIndex = getVirtualRealIndex(activeIndex);\n } else if (swiper.slides[activeIndex]) {\n realIndex = parseInt(swiper.slides[activeIndex].getAttribute('data-swiper-slide-index') || activeIndex, 10);\n } else {\n realIndex = activeIndex;\n }\n Object.assign(swiper, {\n previousSnapIndex,\n snapIndex,\n previousRealIndex,\n realIndex,\n previousIndex,\n activeIndex\n });\n if (swiper.initialized) {\n preload(swiper);\n }\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n swiper.emit('slideChange');\n }\n}\n\nfunction updateClickedSlide(el, path) {\n const swiper = this;\n const params = swiper.params;\n let slide = el.closest(`.${params.slideClass}, swiper-slide`);\n if (!slide && swiper.isElement && path && path.length > 1 && path.includes(el)) {\n [...path.slice(path.indexOf(el) + 1, path.length)].forEach(pathEl => {\n if (!slide && pathEl.matches && pathEl.matches(`.${params.slideClass}, swiper-slide`)) {\n slide = pathEl;\n }\n });\n }\n let slideFound = false;\n let slideIndex;\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt(slide.getAttribute('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}\n\nvar update = {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide\n};\n\nfunction getSwiperTranslate(axis) {\n if (axis === void 0) {\n axis = this.isHorizontal() ? 'x' : 'y';\n }\n const swiper = this;\n const {\n params,\n rtlTranslate: rtl,\n translate,\n wrapperEl\n } = swiper;\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n if (params.cssMode) {\n return translate;\n }\n let currentTranslate = getTranslate(wrapperEl, axis);\n currentTranslate += swiper.cssOverflowAdjustment();\n if (rtl) currentTranslate = -currentTranslate;\n return currentTranslate || 0;\n}\n\nfunction setTranslate(translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl,\n params,\n wrapperEl,\n progress\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y;\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n if (swiper.isHorizontal()) {\n x -= swiper.cssOverflowAdjustment();\n } else {\n y -= swiper.cssOverflowAdjustment();\n }\n wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`;\n }\n\n // Check if we need to update progress\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n swiper.emit('setTranslate', swiper.translate, byController);\n}\n\nfunction minTranslate() {\n return -this.snapGrid[0];\n}\n\nfunction maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}\n\nfunction translateTo(translate, speed, runCallbacks, translateBounds, internal) {\n if (translate === void 0) {\n translate = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (translateBounds === void 0) {\n translateBounds = true;\n }\n const swiper = this;\n const {\n params,\n wrapperEl\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;\n\n // Update progress\n swiper.updateProgress(newTranslate);\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: -newTranslate,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth'\n });\n }\n return true;\n }\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n return true;\n}\n\nvar translate = {\n getTranslate: getSwiperTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo\n};\n\nfunction setTransition(duration, byController) {\n const swiper = this;\n if (!swiper.params.cssMode) {\n swiper.wrapperEl.style.transitionDuration = `${duration}ms`;\n swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : '';\n }\n swiper.emit('setTransition', duration, byController);\n}\n\nfunction transitionEmit(_ref) {\n let {\n swiper,\n runCallbacks,\n direction,\n step\n } = _ref;\n const {\n activeIndex,\n previousIndex\n } = swiper;\n let dir = direction;\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n }\n swiper.emit(`transition${step}`);\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n return;\n }\n swiper.emit(`slideChangeTransition${step}`);\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}\n\nfunction transitionStart(runCallbacks, direction) {\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params\n } = swiper;\n if (params.cssMode) return;\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'Start'\n });\n}\n\nfunction transitionEnd(runCallbacks, direction) {\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'End'\n });\n}\n\nvar transition = {\n setTransition,\n transitionStart,\n transitionEnd\n};\n\nfunction slideTo(index, speed, runCallbacks, internal, initial) {\n if (index === void 0) {\n index = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (typeof index === 'string') {\n index = parseInt(index, 10);\n }\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) {\n return false;\n }\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n const translate = -snapGrid[snapIndex];\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {\n slideIndex = i;\n } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n }\n // Directions locks\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && (rtl ? translate > swiper.translate && translate > swiper.minTranslate() : translate < swiper.translate && translate < swiper.minTranslate())) {\n return false;\n }\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) {\n return false;\n }\n }\n }\n if (slideIndex !== (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n // Update progress\n swiper.updateProgress(translate);\n let direction;\n if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';\n\n // Update Index\n if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {\n swiper.updateActiveIndex(slideIndex);\n // Update Height\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n swiper.updateSlidesClasses();\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n return false;\n }\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n if (speed === 0) {\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n swiper._immediateVirtual = true;\n }\n if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) {\n swiper._cssModeVirtualInitialSet = true;\n requestAnimationFrame(() => {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n });\n } else {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n }\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n swiper._immediateVirtual = false;\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: t,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth'\n });\n }\n return true;\n }\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n if (speed === 0) {\n swiper.transitionEnd(runCallbacks, direction);\n } else if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n }\n return true;\n}\n\nfunction slideToLoop(index, speed, runCallbacks, internal) {\n if (index === void 0) {\n index = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (typeof index === 'string') {\n const indexAsNumber = parseInt(index, 10);\n index = indexAsNumber;\n }\n const swiper = this;\n let newIndex = index;\n if (swiper.params.loop) {\n if (swiper.virtual && swiper.params.virtual.enabled) {\n // eslint-disable-next-line\n newIndex = newIndex + swiper.virtual.slidesBefore;\n } else {\n newIndex = swiper.getSlideIndexByData(newIndex);\n }\n }\n return swiper.slideTo(newIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideNext(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n enabled,\n params,\n animating\n } = swiper;\n if (!enabled) return swiper;\n let perGroup = params.slidesPerGroup;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'next'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n if (swiper.activeIndex === swiper.slides.length - 1 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n });\n return true;\n }\n }\n if (params.rewind && swiper.isEnd) {\n return swiper.slideTo(0, speed, runCallbacks, internal);\n }\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slidePrev(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params,\n snapGrid,\n slidesGrid,\n rtlTranslate,\n enabled,\n animating\n } = swiper;\n if (!enabled) return swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'prev'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n }\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map(val => normalize(val));\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n let prevIndex = 0;\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n if (params.rewind && swiper.isBeginning) {\n const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n return swiper.slideTo(lastIndex, speed, runCallbacks, internal);\n } else if (params.loop && swiper.activeIndex === 0 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n });\n return true;\n }\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideReset(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideToClosest(speed, runCallbacks, internal, threshold) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (threshold === void 0) {\n threshold = 0.5;\n }\n const swiper = this;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}\n\nfunction slideToClickedSlide() {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`;\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt(swiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10);\n if (params.centeredSlides) {\n if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {\n swiper.loopFix();\n slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index=\"${realIndex}\"]`)[0]);\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index=\"${realIndex}\"]`)[0]);\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}\n\nvar slide = {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide\n};\n\nfunction loopCreate(slideRealIndex) {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n slides.forEach((el, index) => {\n el.setAttribute('data-swiper-slide-index', index);\n });\n swiper.loopFix({\n slideRealIndex,\n direction: params.centeredSlides ? undefined : 'next'\n });\n}\n\nfunction loopFix(_temp) {\n let {\n slideRealIndex,\n slideTo = true,\n direction,\n setTranslate,\n activeSlideIndex,\n byController,\n byMousewheel\n } = _temp === void 0 ? {} : _temp;\n const swiper = this;\n if (!swiper.params.loop) return;\n swiper.emit('beforeLoopFix');\n const {\n slides,\n allowSlidePrev,\n allowSlideNext,\n slidesEl,\n params\n } = swiper;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n if (swiper.virtual && params.virtual.enabled) {\n if (slideTo) {\n if (!params.centeredSlides && swiper.snapIndex === 0) {\n swiper.slideTo(swiper.virtual.slides.length, 0, false, true);\n } else if (params.centeredSlides && swiper.snapIndex < params.slidesPerView) {\n swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true);\n } else if (swiper.snapIndex === swiper.snapGrid.length - 1) {\n swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true);\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n swiper.emit('loopFix');\n return;\n }\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10));\n let loopedSlides = params.loopedSlides || slidesPerView;\n if (loopedSlides % params.slidesPerGroup !== 0) {\n loopedSlides += params.slidesPerGroup - loopedSlides % params.slidesPerGroup;\n }\n swiper.loopedSlides = loopedSlides;\n const prependSlidesIndexes = [];\n const appendSlidesIndexes = [];\n let activeIndex = swiper.activeIndex;\n if (typeof activeSlideIndex === 'undefined') {\n activeSlideIndex = swiper.getSlideIndex(swiper.slides.filter(el => el.classList.contains(params.slideActiveClass))[0]);\n } else {\n activeIndex = activeSlideIndex;\n }\n const isNext = direction === 'next' || !direction;\n const isPrev = direction === 'prev' || !direction;\n let slidesPrepended = 0;\n let slidesAppended = 0;\n // prepend last slides before start\n if (activeSlideIndex < loopedSlides) {\n slidesPrepended = Math.max(loopedSlides - activeSlideIndex, params.slidesPerGroup);\n for (let i = 0; i < loopedSlides - activeSlideIndex; i += 1) {\n const index = i - Math.floor(i / slides.length) * slides.length;\n prependSlidesIndexes.push(slides.length - index - 1);\n }\n } else if (activeSlideIndex /* + slidesPerView */ > swiper.slides.length - loopedSlides * 2) {\n slidesAppended = Math.max(activeSlideIndex - (swiper.slides.length - loopedSlides * 2), params.slidesPerGroup);\n for (let i = 0; i < slidesAppended; i += 1) {\n const index = i - Math.floor(i / slides.length) * slides.length;\n appendSlidesIndexes.push(index);\n }\n }\n if (isPrev) {\n prependSlidesIndexes.forEach(index => {\n swiper.slides[index].swiperLoopMoveDOM = true;\n slidesEl.prepend(swiper.slides[index]);\n swiper.slides[index].swiperLoopMoveDOM = false;\n });\n }\n if (isNext) {\n appendSlidesIndexes.forEach(index => {\n swiper.slides[index].swiperLoopMoveDOM = true;\n slidesEl.append(swiper.slides[index]);\n swiper.slides[index].swiperLoopMoveDOM = false;\n });\n }\n swiper.recalcSlides();\n if (params.slidesPerView === 'auto') {\n swiper.updateSlides();\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n if (slideTo) {\n if (prependSlidesIndexes.length > 0 && isPrev) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex + slidesPrepended, 0, false, true);\n if (setTranslate) {\n swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff;\n swiper.touchEventsData.currentTranslate = swiper.translate;\n }\n }\n } else {\n if (setTranslate) {\n swiper.slideToLoop(slideRealIndex, 0, false, true);\n swiper.touchEventsData.currentTranslate = swiper.translate;\n }\n }\n } else if (appendSlidesIndexes.length > 0 && isNext) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex - slidesAppended, 0, false, true);\n if (setTranslate) {\n swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff;\n swiper.touchEventsData.currentTranslate = swiper.translate;\n }\n }\n } else {\n swiper.slideToLoop(slideRealIndex, 0, false, true);\n }\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.controller && swiper.controller.control && !byController) {\n const loopParams = {\n slideRealIndex,\n direction,\n setTranslate,\n activeSlideIndex,\n byController: true\n };\n if (Array.isArray(swiper.controller.control)) {\n swiper.controller.control.forEach(c => {\n if (!c.destroyed && c.params.loop) c.loopFix({\n ...loopParams,\n slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n });\n } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {\n swiper.controller.control.loopFix({\n ...loopParams,\n slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n }\n }\n swiper.emit('loopFix');\n}\n\nfunction loopDestroy() {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;\n swiper.recalcSlides();\n const newSlidesOrder = [];\n swiper.slides.forEach(slideEl => {\n const index = typeof slideEl.swiperSlideIndex === 'undefined' ? slideEl.getAttribute('data-swiper-slide-index') * 1 : slideEl.swiperSlideIndex;\n newSlidesOrder[index] = slideEl;\n });\n swiper.slides.forEach(slideEl => {\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n newSlidesOrder.forEach(slideEl => {\n slidesEl.append(slideEl);\n });\n swiper.recalcSlides();\n swiper.slideTo(swiper.realIndex, 0);\n}\n\nvar loop = {\n loopCreate,\n loopFix,\n loopDestroy\n};\n\nfunction setGrabCursor(moving) {\n const swiper = this;\n if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n el.style.cursor = 'move';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nfunction unsetGrabCursor() {\n const swiper = this;\n if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {\n return;\n }\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nvar grabCursor = {\n setGrabCursor,\n unsetGrabCursor\n};\n\n// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\nfunction closestElement(selector, base) {\n if (base === void 0) {\n base = this;\n }\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n if (!found && !el.getRootNode) {\n return null;\n }\n return found || __closestFrom(el.getRootNode().host);\n }\n return __closestFrom(base);\n}\nfunction onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n const window = getWindow();\n const data = swiper.touchEventsData;\n data.evCache.push(event);\n const {\n params,\n touches,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && event.pointerType === 'mouse') return;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let targetEl = e.target;\n if (params.touchEventsTarget === 'wrapper') {\n if (!swiper.wrapperEl.contains(targetEl)) return;\n }\n if ('which' in e && e.which === 3) return;\n if ('button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return;\n\n // change target el for shadow root component\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n // eslint-disable-next-line\n const eventPath = event.composedPath ? event.composedPath() : event.path;\n if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {\n targetEl = eventPath[0];\n }\n const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot);\n\n // use closestElement for shadow root element to get the actual closest for nested shadow root element\n if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) {\n swiper.allowClick = true;\n return;\n }\n if (params.swipeHandler) {\n if (!targetEl.closest(params.swipeHandler)) return;\n }\n touches.currentX = e.pageX;\n touches.currentY = e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY;\n\n // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;\n if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n } else {\n return;\n }\n }\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined\n });\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n let preventDefault = true;\n if (targetEl.matches(data.focusableElements)) {\n preventDefault = false;\n if (targetEl.nodeName === 'SELECT') {\n data.isTouched = false;\n }\n }\n if (document.activeElement && document.activeElement.matches(data.focusableElements) && document.activeElement !== targetEl) {\n document.activeElement.blur();\n }\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) {\n e.preventDefault();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) {\n swiper.freeMode.onTouchStart();\n }\n swiper.emit('touchStart', e);\n}\n\nfunction onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && event.pointerType === 'mouse') return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n return;\n }\n const pointerIndex = data.evCache.findIndex(cachedEv => cachedEv.pointerId === e.pointerId);\n if (pointerIndex >= 0) data.evCache[pointerIndex] = e;\n const targetTouch = data.evCache.length > 1 ? data.evCache[0] : e;\n const pageX = targetTouch.pageX;\n const pageY = targetTouch.pageY;\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n if (!swiper.allowTouchMove) {\n if (!e.target.matches(data.focusableElements)) {\n swiper.allowClick = false;\n }\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n prevX: swiper.touches.currentX,\n prevY: swiper.touches.currentY,\n currentX: pageX,\n currentY: pageY\n });\n data.touchStartTime = now();\n }\n return;\n }\n if (params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {\n return;\n }\n }\n if (document.activeElement) {\n if (e.target === document.activeElement && e.target.matches(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n if (e.targetTouches && e.targetTouches.length > 1) return;\n touches.currentX = pageX;\n touches.currentY = pageY;\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n if (data.isScrolling || swiper.zoom && swiper.params.zoom && swiper.params.zoom.enabled && data.evCache.length > 1) {\n data.isTouched = false;\n return;\n }\n if (!data.startMoving) {\n return;\n }\n swiper.allowClick = false;\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n let diff = swiper.isHorizontal() ? diffX : diffY;\n let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY;\n if (params.oneWayMovement) {\n diff = Math.abs(diff) * (rtl ? 1 : -1);\n touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);\n }\n touches.diff = diff;\n diff *= params.touchRatio;\n if (rtl) {\n diff = -diff;\n touchesDiff = -touchesDiff;\n }\n const prevTouchesDirection = swiper.touchesDirection;\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next';\n const isLoop = swiper.params.loop && !params.cssMode;\n const allowLoopFix = swiper.swipeDirection === 'next' && swiper.allowSlideNext || swiper.swipeDirection === 'prev' && swiper.allowSlidePrev;\n if (!data.isMoved) {\n if (isLoop && allowLoopFix) {\n swiper.loopFix({\n direction: swiper.swipeDirection\n });\n }\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n if (swiper.animating) {\n const evt = new window.CustomEvent('transitionend', {\n bubbles: true,\n cancelable: true\n });\n swiper.wrapperEl.dispatchEvent(evt);\n }\n data.allowMomentumBounce = false;\n // Grab Cursor\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n swiper.emit('sliderFirstMove', e);\n }\n let loopFixed;\n if (data.isMoved && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) {\n // need another loop fix\n swiper.loopFix({\n direction: swiper.swipeDirection,\n setTranslate: true\n });\n loopFixed = true;\n }\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n data.currentTranslate = diff + data.startTranslate;\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n if (diff > 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.size / 2 : swiper.minTranslate())) {\n swiper.loopFix({\n direction: 'prev',\n setTranslate: true,\n activeSlideIndex: 0\n });\n }\n if (data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n }\n }\n } else if (diff < 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.size / 2 : swiper.maxTranslate())) {\n swiper.loopFix({\n direction: 'next',\n setTranslate: true,\n activeSlideIndex: swiper.slides.length - (params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)))\n });\n }\n if (data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n }\n }\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n }\n\n // Directions locks\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n }\n\n // Threshold\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n if (!params.followFinger || params.cssMode) return;\n\n // Update active index in free mode\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n }\n // Update progress\n swiper.updateProgress(data.currentTranslate);\n // Update translate\n swiper.setTranslate(data.currentTranslate);\n}\n\nfunction onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n const pointerIndex = data.evCache.findIndex(cachedEv => cachedEv.pointerId === event.pointerId);\n if (pointerIndex >= 0) {\n data.evCache.splice(pointerIndex, 1);\n }\n if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(event.type)) {\n const proceed = ['pointercancel', 'contextmenu'].includes(event.type) && (swiper.browser.isSafari || swiper.browser.isWebView);\n if (!proceed) {\n return;\n }\n }\n const {\n params,\n touches,\n rtlTranslate: rtl,\n slidesGrid,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && event.pointerType === 'mouse') return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n data.allowTouchCallbacks = false;\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n // Return Grab Cursor\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n }\n\n // Time diff\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n // Tap, doubleTap, Click\n if (swiper.allowClick) {\n const pathTree = e.path || e.composedPath && e.composedPath();\n swiper.updateClickedSlide(pathTree && pathTree[0] || e.target, pathTree);\n swiper.emit('tap click', e);\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n let currentPos;\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n if (params.cssMode) {\n return;\n }\n if (params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({\n currentPos\n });\n return;\n }\n\n // Find current slide\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n }\n let rewindFirstIndex = null;\n let rewindLastIndex = null;\n if (params.rewind) {\n if (swiper.isBeginning) {\n rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n } else if (swiper.isEnd) {\n rewindFirstIndex = 0;\n }\n }\n // Find current slide size\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) {\n swiper.slideTo(stopIndex + increment);\n } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) {\n swiper.slideTo(rewindLastIndex);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);\n }\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}\n\nfunction onResize() {\n const swiper = this;\n const {\n params,\n el\n } = swiper;\n if (el && el.offsetWidth === 0) return;\n\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Save locks\n const {\n allowSlideNext,\n allowSlidePrev,\n snapGrid\n } = swiper;\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n // Disable locks on resize\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateSlidesClasses();\n const isVirtualLoop = isVirtual && params.loop;\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n if (swiper.params.loop && !isVirtual) {\n swiper.slideToLoop(swiper.realIndex, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n }\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n clearTimeout(swiper.autoplay.resizeTimeout);\n swiper.autoplay.resizeTimeout = setTimeout(() => {\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.resume();\n }\n }, 500);\n }\n // Return locks after resize\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}\n\nfunction onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}\n\nfunction onScroll() {\n const swiper = this;\n const {\n wrapperEl,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n }\n // eslint-disable-next-line\n if (swiper.translate === 0) swiper.translate = 0;\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n swiper.emit('setTranslate', swiper.translate, false);\n}\n\nfunction onLoad(e) {\n const swiper = this;\n processLazyPreloader(swiper, e.target);\n if (swiper.params.cssMode || swiper.params.slidesPerView !== 'auto' && !swiper.params.autoHeight) {\n return;\n }\n swiper.update();\n}\n\nlet dummyEventAttached = false;\nfunction dummyEventListener() {}\nconst events = (swiper, method) => {\n const document = getDocument();\n const {\n params,\n el,\n wrapperEl,\n device\n } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method;\n\n // Touch Events\n el[domMethod]('pointerdown', swiper.onTouchStart, {\n passive: false\n });\n document[domMethod]('pointermove', swiper.onTouchMove, {\n passive: false,\n capture\n });\n document[domMethod]('pointerup', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointercancel', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerout', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerleave', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('contextmenu', swiper.onTouchEnd, {\n passive: true\n });\n\n // Prevent Links Clicks\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n }\n\n // Resize handler\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n\n // Images loader\n el[domMethod]('load', swiper.onLoad, {\n capture: true\n });\n};\nfunction attachEvents() {\n const swiper = this;\n const document = getDocument();\n const {\n params\n } = swiper;\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n swiper.onClick = onClick.bind(swiper);\n swiper.onLoad = onLoad.bind(swiper);\n if (!dummyEventAttached) {\n document.addEventListener('touchstart', dummyEventListener);\n dummyEventAttached = true;\n }\n events(swiper, 'on');\n}\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\nvar events$1 = {\n attachEvents,\n detachEvents\n};\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\nfunction setBreakpoint() {\n const swiper = this;\n const {\n realIndex,\n initialized,\n params,\n el\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;\n\n // Get breakpoint for window width and update parameters\n const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n const wasEnabled = params.enabled;\n if (wasMultiRow && !isMultiRow) {\n el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n el.classList.add(`${params.containerModifierClass}grid`);\n if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {\n el.classList.add(`${params.containerModifierClass}grid-column`);\n }\n swiper.emitContainerClasses();\n }\n\n // Toggle navigation, pagination, scrollbar\n ['navigation', 'pagination', 'scrollbar'].forEach(prop => {\n if (typeof breakpointParams[prop] === 'undefined') return;\n const wasModuleEnabled = params[prop] && params[prop].enabled;\n const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;\n if (wasModuleEnabled && !isModuleEnabled) {\n swiper[prop].disable();\n }\n if (!wasModuleEnabled && isModuleEnabled) {\n swiper[prop].enable();\n }\n });\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n const wasLoop = params.loop;\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n extend(swiper.params, breakpointParams);\n const isEnabled = swiper.params.enabled;\n const hasLoop = swiper.params.loop;\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev\n });\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n swiper.currentBreakpoint = breakpoint;\n swiper.emit('_beforeBreakpoint', breakpointParams);\n if (initialized) {\n if (needsReLoop) {\n swiper.loopDestroy();\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (!wasLoop && hasLoop) {\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (wasLoop && !hasLoop) {\n swiper.loopDestroy();\n }\n }\n swiper.emit('breakpoint', breakpointParams);\n}\n\nfunction getBreakpoint(breakpoints, base, containerEl) {\n if (base === void 0) {\n base = 'window';\n }\n if (!breakpoints || base === 'container' && !containerEl) return undefined;\n let breakpoint = false;\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n const points = Object.keys(breakpoints).map(point => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return {\n value,\n point\n };\n }\n return {\n value: point,\n point\n };\n });\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n for (let i = 0; i < points.length; i += 1) {\n const {\n point,\n value\n } = points[i];\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n return breakpoint || 'max';\n}\n\nvar breakpoints = {\n setBreakpoint,\n getBreakpoint\n};\n\nfunction prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach(item => {\n if (typeof item === 'object') {\n Object.keys(item).forEach(classNames => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\nfunction addClasses() {\n const swiper = this;\n const {\n classNames,\n params,\n rtl,\n el,\n device\n } = swiper;\n // prettier-ignore\n const suffixes = prepareClasses(['initialized', params.direction, {\n 'free-mode': swiper.params.freeMode && params.freeMode.enabled\n }, {\n 'autoheight': params.autoHeight\n }, {\n 'rtl': rtl\n }, {\n 'grid': params.grid && params.grid.rows > 1\n }, {\n 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'\n }, {\n 'android': device.android\n }, {\n 'ios': device.ios\n }, {\n 'css-mode': params.cssMode\n }, {\n 'centered': params.cssMode && params.centeredSlides\n }, {\n 'watch-progress': params.watchSlidesProgress\n }], params.containerModifierClass);\n classNames.push(...suffixes);\n el.classList.add(...classNames);\n swiper.emitContainerClasses();\n}\n\nfunction removeClasses() {\n const swiper = this;\n const {\n el,\n classNames\n } = swiper;\n el.classList.remove(...classNames);\n swiper.emitContainerClasses();\n}\n\nvar classes = {\n addClasses,\n removeClasses\n};\n\nfunction checkOverflow() {\n const swiper = this;\n const {\n isLocked: wasLocked,\n params\n } = swiper;\n const {\n slidesOffsetBefore\n } = params;\n if (slidesOffsetBefore) {\n const lastSlideIndex = swiper.slides.length - 1;\n const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;\n swiper.isLocked = swiper.size > lastSlideRightEdge;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n if (params.allowSlideNext === true) {\n swiper.allowSlideNext = !swiper.isLocked;\n }\n if (params.allowSlidePrev === true) {\n swiper.allowSlidePrev = !swiper.isLocked;\n }\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n }\n if (wasLocked !== swiper.isLocked) {\n swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n }\n}\nvar checkOverflow$1 = {\n checkOverflow\n};\n\nvar defaults = {\n init: true,\n direction: 'horizontal',\n oneWayMovement: false,\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n // Overrides\n width: null,\n height: null,\n //\n preventInteractionOnTransition: false,\n // ssr\n userAgent: null,\n url: null,\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide',\n // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0,\n // in px\n slidesOffsetAfter: 0,\n // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: true,\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 5,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Progress\n watchSlidesProgress: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // loop\n loop: false,\n loopedSlides: null,\n loopPreventsSliding: true,\n // rewind\n rewind: false,\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null,\n // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n // Passive Listeners\n passiveListeners: true,\n maxBackfaceHiddenSlides: 10,\n // NS\n containerModifierClass: 'swiper-',\n // NEW\n slideClass: 'swiper-slide',\n slideActiveClass: 'swiper-slide-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideNextClass: 'swiper-slide-next',\n slidePrevClass: 'swiper-slide-prev',\n wrapperClass: 'swiper-wrapper',\n lazyPreloaderClass: 'swiper-lazy-preloader',\n lazyPreloadPrevNext: 0,\n // Callbacks\n runCallbacksOnInit: true,\n // Internals\n _emitClasses: false\n};\n\nfunction moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj) {\n if (obj === void 0) {\n obj = {};\n }\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n if (params[moduleParamName] === true) {\n params[moduleParamName] = {\n enabled: true\n };\n }\n if (moduleParamName === 'navigation' && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].prevEl && !params[moduleParamName].nextEl) {\n params[moduleParamName].auto = true;\n }\n if (['pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].el) {\n params[moduleParamName].auto = true;\n }\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n if (!params[moduleParamName]) params[moduleParamName] = {\n enabled: false\n };\n extend(allModulesParams, obj);\n };\n}\n\n/* eslint no-param-reassign: \"off\" */\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events: events$1,\n breakpoints,\n checkOverflow: checkOverflow$1,\n classes\n};\nconst extendedDefaults = {};\nclass Swiper {\n constructor() {\n let el;\n let params;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {\n params = args[0];\n } else {\n [el, params] = args;\n }\n if (!params) params = {};\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n const document = getDocument();\n if (params.el && typeof params.el === 'string' && document.querySelectorAll(params.el).length > 1) {\n const swipers = [];\n document.querySelectorAll(params.el).forEach(containerEl => {\n const newParams = extend({}, params, {\n el: containerEl\n });\n swipers.push(new Swiper(newParams));\n });\n // eslint-disable-next-line no-constructor-return\n return swipers;\n }\n\n // Swiper Instance\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({\n userAgent: params.userAgent\n });\n swiper.browser = getBrowser();\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n swiper.modules = [...swiper.__modules__];\n if (params.modules && Array.isArray(params.modules)) {\n swiper.modules.push(...params.modules);\n }\n const allModulesParams = {};\n swiper.modules.forEach(mod => {\n mod({\n params,\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper)\n });\n });\n\n // Extend defaults with modules params\n const swiperParams = extend({}, defaults, allModulesParams);\n\n // Extend defaults with passed params\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params);\n\n // add event listeners\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach(eventName => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n }\n\n // Extend Swiper\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n // Classes\n classNames: [],\n // Slides\n slides: [],\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n //\n isBeginning: true,\n isEnd: false,\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n cssOverflowAdjustment() {\n // Returns 0 unless `translate` is > 2**23\n // Should be subtracted from css values to prevent overflow\n return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;\n },\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n // Touch Events\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: 0,\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n startMoving: undefined,\n evCache: []\n },\n // Clicks\n allowClick: true,\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n },\n // Images\n imagesToLoad: [],\n imagesLoaded: 0\n });\n swiper.emit('_swiper');\n\n // Init\n if (swiper.params.init) {\n swiper.init();\n }\n\n // Return app instance\n // eslint-disable-next-line no-constructor-return\n return swiper;\n }\n getSlideIndex(slideEl) {\n const {\n slidesEl,\n params\n } = this;\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n const firstSlideIndex = elementIndex(slides[0]);\n return elementIndex(slideEl) - firstSlideIndex;\n }\n getSlideIndexByData(index) {\n return this.getSlideIndex(this.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === index)[0]);\n }\n recalcSlides() {\n const swiper = this;\n const {\n slidesEl,\n params\n } = swiper;\n swiper.slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n }\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n swiper.emit('enable');\n }\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n swiper.emit('disable');\n }\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter(className => {\n return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n getSlideClasses(slideEl) {\n const swiper = this;\n if (swiper.destroyed) return '';\n return slideEl.className.split(' ').filter(className => {\n return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;\n }).join(' ');\n }\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.forEach(slideEl => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({\n slideEl,\n classNames\n });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n slidesPerViewDynamic(view, exact) {\n if (view === void 0) {\n view = 'current';\n }\n if (exact === void 0) {\n exact = false;\n }\n const swiper = this;\n const {\n params,\n slides,\n slidesGrid,\n slidesSizesGrid,\n size: swiperSize,\n activeIndex\n } = swiper;\n let spv = 1;\n if (typeof params.slidesPerView === 'number') return params.slidesPerView;\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex] ? slides[activeIndex].swiperSlideSize : 0;\n let breakLoop;\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n return spv;\n }\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const {\n snapGrid,\n params\n } = swiper;\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n [...swiper.el.querySelectorAll('[loading=\"lazy\"]')].forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n }\n });\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n let translated;\n if (params.freeMode && params.freeMode.enabled && !params.cssMode) {\n setTranslate();\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) {\n const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides;\n translated = swiper.slideTo(slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n if (!translated) {\n setTranslate();\n }\n }\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n swiper.emit('update');\n }\n changeDirection(newDirection, needUpdate) {\n if (needUpdate === void 0) {\n needUpdate = true;\n }\n const swiper = this;\n const currentDirection = swiper.params.direction;\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n return swiper;\n }\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`);\n swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n swiper.params.direction = newDirection;\n swiper.slides.forEach(slideEl => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n return swiper;\n }\n changeLanguageDirection(direction) {\n const swiper = this;\n if (swiper.rtl && direction === 'rtl' || !swiper.rtl && direction === 'ltr') return;\n swiper.rtl = direction === 'rtl';\n swiper.rtlTranslate = swiper.params.direction === 'horizontal' && swiper.rtl;\n if (swiper.rtl) {\n swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'rtl';\n } else {\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'ltr';\n }\n swiper.update();\n }\n mount(element) {\n const swiper = this;\n if (swiper.mounted) return true;\n\n // Find el\n let el = element || swiper.params.el;\n if (typeof el === 'string') {\n el = document.querySelector(el);\n }\n if (!el) {\n return false;\n }\n el.swiper = swiper;\n if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === 'SWIPER-CONTAINER') {\n swiper.isElement = true;\n }\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = el.shadowRoot.querySelector(getWrapperSelector());\n // Children needs to return slot items\n return res;\n }\n return elementChildren(el, getWrapperSelector())[0];\n };\n // Find Wrapper\n let wrapperEl = getWrapper();\n if (!wrapperEl && swiper.params.createElements) {\n wrapperEl = createElement('div', swiper.params.wrapperClass);\n el.append(wrapperEl);\n elementChildren(el, `.${swiper.params.slideClass}`).forEach(slideEl => {\n wrapperEl.append(slideEl);\n });\n }\n Object.assign(swiper, {\n el,\n wrapperEl,\n slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl,\n hostEl: swiper.isElement ? el.parentNode.host : el,\n mounted: true,\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl',\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl'),\n wrongRTL: elementStyle(wrapperEl, 'display') === '-webkit-box'\n });\n return true;\n }\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n swiper.emit('beforeInit');\n\n // Set breakpoint\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Add Classes\n swiper.addClasses();\n\n // Update size\n swiper.updateSize();\n\n // Update slides\n swiper.updateSlides();\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n }\n\n // Set Grab Cursor\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n // Slide To Initial Slide\n if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n }\n\n // Create loop\n if (swiper.params.loop) {\n swiper.loopCreate();\n }\n\n // Attach events\n swiper.attachEvents();\n const lazyElements = [...swiper.el.querySelectorAll('[loading=\"lazy\"]')];\n if (swiper.isElement) {\n lazyElements.push(...swiper.hostEl.querySelectorAll('[loading=\"lazy\"]'));\n }\n lazyElements.forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n } else {\n imageEl.addEventListener('load', e => {\n processLazyPreloader(swiper, e.target);\n });\n }\n });\n preload(swiper);\n\n // Init Flag\n swiper.initialized = true;\n preload(swiper);\n\n // Emit\n swiper.emit('init');\n swiper.emit('afterInit');\n return swiper;\n }\n destroy(deleteInstance, cleanStyles) {\n if (deleteInstance === void 0) {\n deleteInstance = true;\n }\n if (cleanStyles === void 0) {\n cleanStyles = true;\n }\n const swiper = this;\n const {\n params,\n el,\n wrapperEl,\n slides\n } = swiper;\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n swiper.emit('beforeDestroy');\n\n // Init Flag\n swiper.initialized = false;\n\n // Detach events\n swiper.detachEvents();\n\n // Destroy loop\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n // Cleanup styles\n if (cleanStyles) {\n swiper.removeClasses();\n el.removeAttribute('style');\n wrapperEl.removeAttribute('style');\n if (slides && slides.length) {\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);\n slideEl.removeAttribute('style');\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n }\n }\n swiper.emit('destroy');\n\n // Detach emitter events\n Object.keys(swiper.eventsListeners).forEach(eventName => {\n swiper.off(eventName);\n });\n if (deleteInstance !== false) {\n swiper.el.swiper = null;\n deleteProps(swiper);\n }\n swiper.destroyed = true;\n return null;\n }\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n static get extendedDefaults() {\n return extendedDefaults;\n }\n static get defaults() {\n return defaults;\n }\n static installModule(mod) {\n if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];\n const modules = Swiper.prototype.__modules__;\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach(m => Swiper.installModule(m));\n return Swiper;\n }\n Swiper.installModule(module);\n return Swiper;\n }\n}\nObject.keys(prototypes).forEach(prototypeGroup => {\n Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\nSwiper.use([Resize, Observer]);\n\nexport { Swiper as S, defaults as d };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach(key => {\n try {\n object[key] = null;\n } catch (e) {\n // no getter for object\n }\n try {\n delete object[key];\n } catch (e) {\n // something got wrong\n }\n });\n}\nfunction nextTick(callback, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return setTimeout(callback, delay);\n}\nfunction now() {\n return Date.now();\n}\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n if (!style) {\n style = el.style;\n }\n return style;\n}\nfunction getTranslate(el, axis) {\n if (axis === void 0) {\n axis = 'x';\n }\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n const curStyle = getComputedStyle(el);\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n return curTransform || 0;\n}\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';\n}\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\nfunction extend() {\n const to = Object(arguments.length <= 0 ? undefined : arguments[0]);\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n for (let i = 1; i < arguments.length; i += 1) {\n const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i];\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n return to;\n}\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\nfunction animateCSSModeScroll(_ref) {\n let {\n swiper,\n targetPosition,\n side\n } = _ref;\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n const isOutOfBound = (current, target) => {\n return dir === 'next' && current >= target || dir === 'prev' && current <= target;\n };\n const animate = () => {\n time = new Date().getTime();\n if (startTime === null) {\n startTime = time;\n }\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n if (isOutOfBound(currentPosition, targetPosition)) {\n currentPosition = targetPosition;\n }\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.scrollSnapType = '';\n setTimeout(() => {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n });\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n animate();\n}\nfunction getSlideTransformEl(slideEl) {\n return slideEl.querySelector('.swiper-slide-transform') || slideEl.shadowRoot && slideEl.shadowRoot.querySelector('.swiper-slide-transform') || slideEl;\n}\nfunction elementChildren(element, selector) {\n if (selector === void 0) {\n selector = '';\n }\n return [...element.children].filter(el => el.matches(selector));\n}\nfunction createElement(tag, classes) {\n if (classes === void 0) {\n classes = [];\n }\n const el = document.createElement(tag);\n el.classList.add(...(Array.isArray(classes) ? classes : [classes]));\n return el;\n}\nfunction elementOffset(el) {\n const window = getWindow();\n const document = getDocument();\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n}\nfunction elementPrevAll(el, selector) {\n const prevEls = [];\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n if (selector) {\n if (prev.matches(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n el = prev;\n }\n return prevEls;\n}\nfunction elementNextAll(el, selector) {\n const nextEls = [];\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n if (selector) {\n if (next.matches(selector)) nextEls.push(next);\n } else nextEls.push(next);\n el = next;\n }\n return nextEls;\n}\nfunction elementStyle(el, prop) {\n const window = getWindow();\n return window.getComputedStyle(el, null).getPropertyValue(prop);\n}\nfunction elementIndex(el) {\n let child = el;\n let i;\n if (child) {\n i = 0;\n // eslint-disable-next-line\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n return i;\n }\n return undefined;\n}\nfunction elementParents(el, selector) {\n const parents = []; // eslint-disable-line\n let parent = el.parentElement; // eslint-disable-line\n while (parent) {\n if (selector) {\n if (parent.matches(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n parent = parent.parentElement;\n }\n return parents;\n}\nfunction elementTransitionEnd(el, callback) {\n function fireCallBack(e) {\n if (e.target !== el) return;\n callback.call(el, e);\n el.removeEventListener('transitionend', fireCallBack);\n }\n if (callback) {\n el.addEventListener('transitionend', fireCallBack);\n }\n}\nfunction elementOuterSize(el, size, includeMargins) {\n const window = getWindow();\n if (includeMargins) {\n return el[size === 'width' ? 'offsetWidth' : 'offsetHeight'] + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-right' : 'margin-top')) + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-left' : 'margin-bottom'));\n }\n return el.offsetWidth;\n}\n\nexport { elementParents as a, elementOffset as b, createElement as c, now as d, elementChildren as e, elementOuterSize as f, elementIndex as g, getTranslate as h, elementTransitionEnd as i, isObject as j, getSlideTransformEl as k, elementStyle as l, elementNextAll as m, nextTick as n, elementPrevAll as o, animateCSSModeScroll as p, extend as q, deleteProps as r, setCSSProperty as s };\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","/* underscore in name -> watch for changes */\nconst paramsList = ['eventsPrefix', 'injectStyles', 'injectStylesUrls', 'modules', 'init', '_direction', 'oneWayMovement', 'touchEventsTarget', 'initialSlide', '_speed', 'cssMode', 'updateOnWindowResize', 'resizeObserver', 'nested', 'focusableElements', '_enabled', '_width', '_height', 'preventInteractionOnTransition', 'userAgent', 'url', '_edgeSwipeDetection', '_edgeSwipeThreshold', '_freeMode', '_autoHeight', 'setWrapperSize', 'virtualTranslate', '_effect', 'breakpoints', 'breakpointsBase', '_spaceBetween', '_slidesPerView', 'maxBackfaceHiddenSlides', '_grid', '_slidesPerGroup', '_slidesPerGroupSkip', '_slidesPerGroupAuto', '_centeredSlides', '_centeredSlidesBounds', '_slidesOffsetBefore', '_slidesOffsetAfter', 'normalizeSlideIndex', '_centerInsufficientSlides', '_watchOverflow', 'roundLengths', 'touchRatio', 'touchAngle', 'simulateTouch', '_shortSwipes', '_longSwipes', 'longSwipesRatio', 'longSwipesMs', '_followFinger', 'allowTouchMove', '_threshold', 'touchMoveStopPropagation', 'touchStartPreventDefault', 'touchStartForcePreventDefault', 'touchReleaseOnEdges', 'uniqueNavElements', '_resistance', '_resistanceRatio', '_watchSlidesProgress', '_grabCursor', 'preventClicks', 'preventClicksPropagation', '_slideToClickedSlide', '_loop', 'loopedSlides', 'loopPreventsSliding', '_rewind', '_allowSlidePrev', '_allowSlideNext', '_swipeHandler', '_noSwiping', 'noSwipingClass', 'noSwipingSelector', 'passiveListeners', 'containerModifierClass', 'slideClass', 'slideActiveClass', 'slideVisibleClass', 'slideNextClass', 'slidePrevClass', 'wrapperClass', 'lazyPreloaderClass', 'lazyPreloadPrevNext', 'runCallbacksOnInit', 'observer', 'observeParents', 'observeSlideChildren',\n// modules\n'a11y', '_autoplay', '_controller', 'coverflowEffect', 'cubeEffect', 'fadeEffect', 'flipEffect', 'creativeEffect', 'cardsEffect', 'hashNavigation', 'history', 'keyboard', 'mousewheel', '_navigation', '_pagination', 'parallax', '_scrollbar', '_thumbs', 'virtual', 'zoom', 'control'];\n\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object' && !o.__swiper__;\n}\nfunction extend(target, src) {\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n Object.keys(src).filter(key => noExtend.indexOf(key) < 0).forEach(key => {\n if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\n if (src[key].__swiper__) target[key] = src[key];else extend(target[key], src[key]);\n } else {\n target[key] = src[key];\n }\n });\n}\nfunction needsNavigation(params) {\n if (params === void 0) {\n params = {};\n }\n return params.navigation && typeof params.navigation.nextEl === 'undefined' && typeof params.navigation.prevEl === 'undefined';\n}\nfunction needsPagination(params) {\n if (params === void 0) {\n params = {};\n }\n return params.pagination && typeof params.pagination.el === 'undefined';\n}\nfunction needsScrollbar(params) {\n if (params === void 0) {\n params = {};\n }\n return params.scrollbar && typeof params.scrollbar.el === 'undefined';\n}\nfunction uniqueClasses(classNames) {\n if (classNames === void 0) {\n classNames = '';\n }\n const classes = classNames.split(' ').map(c => c.trim()).filter(c => !!c);\n const unique = [];\n classes.forEach(c => {\n if (unique.indexOf(c) < 0) unique.push(c);\n });\n return unique.join(' ');\n}\nfunction attrToProp(attrName) {\n if (attrName === void 0) {\n attrName = '';\n }\n return attrName.replace(/-[a-z]/g, l => l.toUpperCase().replace('-', ''));\n}\nfunction wrapperClass(className) {\n if (className === void 0) {\n className = '';\n }\n if (!className) return 'swiper-wrapper';\n if (!className.includes('swiper-wrapper')) return `swiper-wrapper ${className}`;\n return className;\n}\n\nfunction updateSwiper(_ref) {\n let {\n swiper,\n slides,\n passedParams,\n changedParams,\n nextEl,\n prevEl,\n scrollbarEl,\n paginationEl\n } = _ref;\n const updateParams = changedParams.filter(key => key !== 'children' && key !== 'direction' && key !== 'wrapperClass');\n const {\n params: currentParams,\n pagination,\n navigation,\n scrollbar,\n virtual,\n thumbs\n } = swiper;\n let needThumbsInit;\n let needControllerInit;\n let needPaginationInit;\n let needScrollbarInit;\n let needNavigationInit;\n let loopNeedDestroy;\n let loopNeedEnable;\n let loopNeedReloop;\n if (changedParams.includes('thumbs') && passedParams.thumbs && passedParams.thumbs.swiper && currentParams.thumbs && !currentParams.thumbs.swiper) {\n needThumbsInit = true;\n }\n if (changedParams.includes('controller') && passedParams.controller && passedParams.controller.control && currentParams.controller && !currentParams.controller.control) {\n needControllerInit = true;\n }\n if (changedParams.includes('pagination') && passedParams.pagination && (passedParams.pagination.el || paginationEl) && (currentParams.pagination || currentParams.pagination === false) && pagination && !pagination.el) {\n needPaginationInit = true;\n }\n if (changedParams.includes('scrollbar') && passedParams.scrollbar && (passedParams.scrollbar.el || scrollbarEl) && (currentParams.scrollbar || currentParams.scrollbar === false) && scrollbar && !scrollbar.el) {\n needScrollbarInit = true;\n }\n if (changedParams.includes('navigation') && passedParams.navigation && (passedParams.navigation.prevEl || prevEl) && (passedParams.navigation.nextEl || nextEl) && (currentParams.navigation || currentParams.navigation === false) && navigation && !navigation.prevEl && !navigation.nextEl) {\n needNavigationInit = true;\n }\n const destroyModule = mod => {\n if (!swiper[mod]) return;\n swiper[mod].destroy();\n if (mod === 'navigation') {\n if (swiper.isElement) {\n swiper[mod].prevEl.remove();\n swiper[mod].nextEl.remove();\n }\n currentParams[mod].prevEl = undefined;\n currentParams[mod].nextEl = undefined;\n swiper[mod].prevEl = undefined;\n swiper[mod].nextEl = undefined;\n } else {\n if (swiper.isElement) {\n swiper[mod].el.remove();\n }\n currentParams[mod].el = undefined;\n swiper[mod].el = undefined;\n }\n };\n if (changedParams.includes('loop') && swiper.isElement) {\n if (currentParams.loop && !passedParams.loop) {\n loopNeedDestroy = true;\n } else if (!currentParams.loop && passedParams.loop) {\n loopNeedEnable = true;\n } else {\n loopNeedReloop = true;\n }\n }\n updateParams.forEach(key => {\n if (isObject(currentParams[key]) && isObject(passedParams[key])) {\n extend(currentParams[key], passedParams[key]);\n if ((key === 'navigation' || key === 'pagination' || key === 'scrollbar') && 'enabled' in passedParams[key] && !passedParams[key].enabled) {\n destroyModule(key);\n }\n } else {\n const newValue = passedParams[key];\n if ((newValue === true || newValue === false) && (key === 'navigation' || key === 'pagination' || key === 'scrollbar')) {\n if (newValue === false) {\n destroyModule(key);\n }\n } else {\n currentParams[key] = passedParams[key];\n }\n }\n });\n if (updateParams.includes('controller') && !needControllerInit && swiper.controller && swiper.controller.control && currentParams.controller && currentParams.controller.control) {\n swiper.controller.control = currentParams.controller.control;\n }\n if (changedParams.includes('children') && slides && virtual && currentParams.virtual.enabled) {\n virtual.slides = slides;\n virtual.update(true);\n }\n if (changedParams.includes('children') && slides && currentParams.loop) {\n loopNeedReloop = true;\n }\n if (needThumbsInit) {\n const initialized = thumbs.init();\n if (initialized) thumbs.update(true);\n }\n if (needControllerInit) {\n swiper.controller.control = currentParams.controller.control;\n }\n if (needPaginationInit) {\n if (swiper.isElement && (!paginationEl || typeof paginationEl === 'string')) {\n paginationEl = document.createElement('div');\n paginationEl.classList.add('swiper-pagination');\n paginationEl.part.add('pagination');\n swiper.el.appendChild(paginationEl);\n }\n if (paginationEl) currentParams.pagination.el = paginationEl;\n pagination.init();\n pagination.render();\n pagination.update();\n }\n if (needScrollbarInit) {\n if (swiper.isElement && (!scrollbarEl || typeof scrollbarEl === 'string')) {\n scrollbarEl = document.createElement('div');\n scrollbarEl.classList.add('swiper-scrollbar');\n scrollbarEl.part.add('scrollbar');\n swiper.el.appendChild(scrollbarEl);\n }\n if (scrollbarEl) currentParams.scrollbar.el = scrollbarEl;\n scrollbar.init();\n scrollbar.updateSize();\n scrollbar.setTranslate();\n }\n if (needNavigationInit) {\n if (swiper.isElement) {\n if (!nextEl || typeof nextEl === 'string') {\n nextEl = document.createElement('div');\n nextEl.classList.add('swiper-button-next');\n nextEl.innerHTML = swiper.hostEl.constructor.nextButtonSvg;\n nextEl.part.add('button-next');\n swiper.el.appendChild(nextEl);\n }\n if (!prevEl || typeof prevEl === 'string') {\n prevEl = document.createElement('div');\n prevEl.classList.add('swiper-button-prev');\n prevEl.innerHTML = swiper.hostEl.constructor.prevButtonSvg;\n prevEl.part.add('button-prev');\n swiper.el.appendChild(prevEl);\n }\n }\n if (nextEl) currentParams.navigation.nextEl = nextEl;\n if (prevEl) currentParams.navigation.prevEl = prevEl;\n navigation.init();\n navigation.update();\n }\n if (changedParams.includes('allowSlideNext')) {\n swiper.allowSlideNext = passedParams.allowSlideNext;\n }\n if (changedParams.includes('allowSlidePrev')) {\n swiper.allowSlidePrev = passedParams.allowSlidePrev;\n }\n if (changedParams.includes('direction')) {\n swiper.changeDirection(passedParams.direction, false);\n }\n if (loopNeedDestroy || loopNeedReloop) {\n swiper.loopDestroy();\n }\n if (loopNeedEnable || loopNeedReloop) {\n swiper.loopCreate();\n }\n swiper.update();\n}\n\nexport { needsPagination as a, needsScrollbar as b, attrToProp as c, uniqueClasses as d, extend as e, isObject as i, needsNavigation as n, paramsList as p, updateSwiper as u, wrapperClass as w };\n","import { e as extend, p as paramsList, i as isObject, n as needsNavigation, a as needsPagination, b as needsScrollbar } from './update-swiper.mjs';\nimport { d as defaults } from './swiper-core.mjs';\n\nfunction getParams(obj, splitEvents) {\n if (obj === void 0) {\n obj = {};\n }\n if (splitEvents === void 0) {\n splitEvents = true;\n }\n const params = {\n on: {}\n };\n const events = {};\n const passedParams = {};\n extend(params, defaults);\n params._emitClasses = true;\n params.init = false;\n const rest = {};\n const allowedParams = paramsList.map(key => key.replace(/_/, ''));\n const plainObj = Object.assign({}, obj);\n Object.keys(plainObj).forEach(key => {\n if (typeof obj[key] === 'undefined') return;\n if (allowedParams.indexOf(key) >= 0) {\n if (isObject(obj[key])) {\n params[key] = {};\n passedParams[key] = {};\n extend(params[key], obj[key]);\n extend(passedParams[key], obj[key]);\n } else {\n params[key] = obj[key];\n passedParams[key] = obj[key];\n }\n } else if (key.search(/on[A-Z]/) === 0 && typeof obj[key] === 'function') {\n if (splitEvents) {\n events[`${key[2].toLowerCase()}${key.substr(3)}`] = obj[key];\n } else {\n params.on[`${key[2].toLowerCase()}${key.substr(3)}`] = obj[key];\n }\n } else {\n rest[key] = obj[key];\n }\n });\n ['navigation', 'pagination', 'scrollbar'].forEach(key => {\n if (params[key] === true) params[key] = {};\n if (params[key] === false) delete params[key];\n });\n return {\n params,\n passedParams,\n rest,\n events\n };\n}\n\nfunction mountSwiper(_ref, swiperParams) {\n let {\n el,\n nextEl,\n prevEl,\n paginationEl,\n scrollbarEl,\n swiper\n } = _ref;\n if (needsNavigation(swiperParams) && nextEl && prevEl) {\n swiper.params.navigation.nextEl = nextEl;\n swiper.originalParams.navigation.nextEl = nextEl;\n swiper.params.navigation.prevEl = prevEl;\n swiper.originalParams.navigation.prevEl = prevEl;\n }\n if (needsPagination(swiperParams) && paginationEl) {\n swiper.params.pagination.el = paginationEl;\n swiper.originalParams.pagination.el = paginationEl;\n }\n if (needsScrollbar(swiperParams) && scrollbarEl) {\n swiper.params.scrollbar.el = scrollbarEl;\n swiper.originalParams.scrollbar.el = scrollbarEl;\n }\n swiper.init(el);\n}\n\nfunction getChangedParams(swiperParams, oldParams, children, oldChildren, getKey) {\n const keys = [];\n if (!oldParams) return keys;\n const addKey = key => {\n if (keys.indexOf(key) < 0) keys.push(key);\n };\n if (children && oldChildren) {\n const oldChildrenKeys = oldChildren.map(getKey);\n const childrenKeys = children.map(getKey);\n if (oldChildrenKeys.join('') !== childrenKeys.join('')) addKey('children');\n if (oldChildren.length !== children.length) addKey('children');\n }\n const watchParams = paramsList.filter(key => key[0] === '_').map(key => key.replace(/_/, ''));\n watchParams.forEach(key => {\n if (key in swiperParams && key in oldParams) {\n if (isObject(swiperParams[key]) && isObject(oldParams[key])) {\n const newKeys = Object.keys(swiperParams[key]);\n const oldKeys = Object.keys(oldParams[key]);\n if (newKeys.length !== oldKeys.length) {\n addKey(key);\n } else {\n newKeys.forEach(newKey => {\n if (swiperParams[key][newKey] !== oldParams[key][newKey]) {\n addKey(key);\n }\n });\n oldKeys.forEach(oldKey => {\n if (swiperParams[key][oldKey] !== oldParams[key][oldKey]) addKey(key);\n });\n }\n } else if (swiperParams[key] !== oldParams[key]) {\n addKey(key);\n }\n }\n });\n return keys;\n}\n\nconst updateOnVirtualData = swiper => {\n if (!swiper || swiper.destroyed || !swiper.params.virtual || swiper.params.virtual && !swiper.params.virtual.enabled) return;\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n if (swiper.parallax && swiper.params.parallax && swiper.params.parallax.enabled) {\n swiper.parallax.setTranslate();\n }\n};\n\nexport { getChangedParams as a, getParams as g, mountSwiper as m, updateOnVirtualData as u };\n","/**\n * Swiper React 10.3.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2023 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: September 28, 2023\n */\n\nimport React, { useEffect, useLayoutEffect, useContext, createContext, forwardRef, useState, useRef } from 'react';\nimport { S as Swiper$1 } from './shared/swiper-core.mjs';\nimport { g as getParams, m as mountSwiper, a as getChangedParams, u as updateOnVirtualData } from './shared/update-on-virtual-data.mjs';\nimport { d as uniqueClasses, w as wrapperClass, n as needsNavigation, b as needsScrollbar, a as needsPagination, e as extend, u as updateSwiper } from './shared/update-swiper.mjs';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction isChildSwiperSlide(child) {\n return child.type && child.type.displayName && child.type.displayName.includes('SwiperSlide');\n}\nfunction processChildren(c) {\n const slides = [];\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.children) {\n processChildren(child.props.children).forEach(slide => slides.push(slide));\n }\n });\n return slides;\n}\nfunction getChildren(c) {\n const slides = [];\n const slots = {\n 'container-start': [],\n 'container-end': [],\n 'wrapper-start': [],\n 'wrapper-end': []\n };\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.slot && slots[child.props.slot]) {\n slots[child.props.slot].push(child);\n } else if (child.props && child.props.children) {\n const foundSlides = processChildren(child.props.children);\n if (foundSlides.length > 0) {\n foundSlides.forEach(slide => slides.push(slide));\n } else {\n slots['container-end'].push(child);\n }\n } else {\n slots['container-end'].push(child);\n }\n });\n return {\n slides,\n slots\n };\n}\n\nfunction renderVirtual(swiper, slides, virtualData) {\n if (!virtualData) return null;\n const getSlideIndex = index => {\n let slideIndex = index;\n if (index < 0) {\n slideIndex = slides.length + index;\n } else if (slideIndex >= slides.length) {\n // eslint-disable-next-line\n slideIndex = slideIndex - slides.length;\n }\n return slideIndex;\n };\n const style = swiper.isHorizontal() ? {\n [swiper.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`\n } : {\n top: `${virtualData.offset}px`\n };\n const {\n from,\n to\n } = virtualData;\n const loopFrom = swiper.params.loop ? -slides.length : 0;\n const loopTo = swiper.params.loop ? slides.length * 2 : slides.length;\n const slidesToRender = [];\n for (let i = loopFrom; i < loopTo; i += 1) {\n if (i >= from && i <= to) {\n slidesToRender.push(slides[getSlideIndex(i)]);\n }\n }\n return slidesToRender.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper,\n style,\n key: `slide-${index}`\n });\n });\n}\n\nfunction useIsomorphicLayoutEffect(callback, deps) {\n // eslint-disable-next-line\n if (typeof window === 'undefined') return useEffect(callback, deps);\n return useLayoutEffect(callback, deps);\n}\n\nconst SwiperSlideContext = /*#__PURE__*/createContext(null);\nconst useSwiperSlide = () => {\n return useContext(SwiperSlideContext);\n};\nconst SwiperContext = /*#__PURE__*/createContext(null);\nconst useSwiper = () => {\n return useContext(SwiperContext);\n};\n\nconst Swiper = /*#__PURE__*/forwardRef(function (_temp, externalElRef) {\n let {\n className,\n tag: Tag = 'div',\n wrapperTag: WrapperTag = 'div',\n children,\n onSwiper,\n ...rest\n } = _temp === void 0 ? {} : _temp;\n let eventsAssigned = false;\n const [containerClasses, setContainerClasses] = useState('swiper');\n const [virtualData, setVirtualData] = useState(null);\n const [breakpointChanged, setBreakpointChanged] = useState(false);\n const initializedRef = useRef(false);\n const swiperElRef = useRef(null);\n const swiperRef = useRef(null);\n const oldPassedParamsRef = useRef(null);\n const oldSlides = useRef(null);\n const nextElRef = useRef(null);\n const prevElRef = useRef(null);\n const paginationElRef = useRef(null);\n const scrollbarElRef = useRef(null);\n const {\n params: swiperParams,\n passedParams,\n rest: restProps,\n events\n } = getParams(rest);\n const {\n slides,\n slots\n } = getChildren(children);\n const onBeforeBreakpoint = () => {\n setBreakpointChanged(!breakpointChanged);\n };\n Object.assign(swiperParams.on, {\n _containerClasses(swiper, classes) {\n setContainerClasses(classes);\n }\n });\n const initSwiper = () => {\n // init swiper\n Object.assign(swiperParams.on, events);\n eventsAssigned = true;\n const passParams = {\n ...swiperParams\n };\n delete passParams.wrapperClass;\n swiperRef.current = new Swiper$1(passParams);\n if (swiperRef.current.virtual && swiperRef.current.params.virtual.enabled) {\n swiperRef.current.virtual.slides = slides;\n const extendWith = {\n cache: false,\n slides,\n renderExternal: setVirtualData,\n renderExternalUpdate: false\n };\n extend(swiperRef.current.params.virtual, extendWith);\n extend(swiperRef.current.originalParams.virtual, extendWith);\n }\n };\n if (!swiperElRef.current) {\n initSwiper();\n }\n\n // Listen for breakpoints change\n if (swiperRef.current) {\n swiperRef.current.on('_beforeBreakpoint', onBeforeBreakpoint);\n }\n const attachEvents = () => {\n if (eventsAssigned || !events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.on(eventName, events[eventName]);\n });\n };\n const detachEvents = () => {\n if (!events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.off(eventName, events[eventName]);\n });\n };\n useEffect(() => {\n return () => {\n if (swiperRef.current) swiperRef.current.off('_beforeBreakpoint', onBeforeBreakpoint);\n };\n });\n\n // set initialized flag\n useEffect(() => {\n if (!initializedRef.current && swiperRef.current) {\n swiperRef.current.emitSlidesClasses();\n initializedRef.current = true;\n }\n });\n\n // mount swiper\n useIsomorphicLayoutEffect(() => {\n if (externalElRef) {\n externalElRef.current = swiperElRef.current;\n }\n if (!swiperElRef.current) return;\n if (swiperRef.current.destroyed) {\n initSwiper();\n }\n mountSwiper({\n el: swiperElRef.current,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n paginationEl: paginationElRef.current,\n scrollbarEl: scrollbarElRef.current,\n swiper: swiperRef.current\n }, swiperParams);\n if (onSwiper) onSwiper(swiperRef.current);\n // eslint-disable-next-line\n return () => {\n if (swiperRef.current && !swiperRef.current.destroyed) {\n swiperRef.current.destroy(true, false);\n }\n };\n }, []);\n\n // watch for params change\n useIsomorphicLayoutEffect(() => {\n attachEvents();\n const changedParams = getChangedParams(passedParams, oldPassedParamsRef.current, slides, oldSlides.current, c => c.key);\n oldPassedParamsRef.current = passedParams;\n oldSlides.current = slides;\n if (changedParams.length && swiperRef.current && !swiperRef.current.destroyed) {\n updateSwiper({\n swiper: swiperRef.current,\n slides,\n passedParams,\n changedParams,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n scrollbarEl: scrollbarElRef.current,\n paginationEl: paginationElRef.current\n });\n }\n return () => {\n detachEvents();\n };\n });\n\n // update on virtual update\n useIsomorphicLayoutEffect(() => {\n updateOnVirtualData(swiperRef.current);\n }, [virtualData]);\n\n // bypass swiper instance to slides\n function renderSlides() {\n if (swiperParams.virtual) {\n return renderVirtual(swiperRef.current, slides, virtualData);\n }\n return slides.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper: swiperRef.current,\n swiperSlideIndex: index\n });\n });\n }\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: swiperElRef,\n className: uniqueClasses(`${containerClasses}${className ? ` ${className}` : ''}`)\n }, restProps), /*#__PURE__*/React.createElement(SwiperContext.Provider, {\n value: swiperRef.current\n }, slots['container-start'], /*#__PURE__*/React.createElement(WrapperTag, {\n className: wrapperClass(swiperParams.wrapperClass)\n }, slots['wrapper-start'], renderSlides(), slots['wrapper-end']), needsNavigation(swiperParams) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n ref: prevElRef,\n className: \"swiper-button-prev\"\n }), /*#__PURE__*/React.createElement(\"div\", {\n ref: nextElRef,\n className: \"swiper-button-next\"\n })), needsScrollbar(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: scrollbarElRef,\n className: \"swiper-scrollbar\"\n }), needsPagination(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: paginationElRef,\n className: \"swiper-pagination\"\n }), slots['container-end']));\n});\nSwiper.displayName = 'Swiper';\n\nconst SwiperSlide = /*#__PURE__*/forwardRef(function (_temp, externalRef) {\n let {\n tag: Tag = 'div',\n children,\n className = '',\n swiper,\n zoom,\n lazy,\n virtualIndex,\n swiperSlideIndex,\n ...rest\n } = _temp === void 0 ? {} : _temp;\n const slideElRef = useRef(null);\n const [slideClasses, setSlideClasses] = useState('swiper-slide');\n const [lazyLoaded, setLazyLoaded] = useState(false);\n function updateClasses(_s, el, classNames) {\n if (el === slideElRef.current) {\n setSlideClasses(classNames);\n }\n }\n useIsomorphicLayoutEffect(() => {\n if (typeof swiperSlideIndex !== 'undefined') {\n slideElRef.current.swiperSlideIndex = swiperSlideIndex;\n }\n if (externalRef) {\n externalRef.current = slideElRef.current;\n }\n if (!slideElRef.current || !swiper) {\n return;\n }\n if (swiper.destroyed) {\n if (slideClasses !== 'swiper-slide') {\n setSlideClasses('swiper-slide');\n }\n return;\n }\n swiper.on('_slideClass', updateClasses);\n // eslint-disable-next-line\n return () => {\n if (!swiper) return;\n swiper.off('_slideClass', updateClasses);\n };\n });\n useIsomorphicLayoutEffect(() => {\n if (swiper && slideElRef.current && !swiper.destroyed) {\n setSlideClasses(swiper.getSlideClasses(slideElRef.current));\n }\n }, [swiper]);\n const slideData = {\n isActive: slideClasses.indexOf('swiper-slide-active') >= 0,\n isVisible: slideClasses.indexOf('swiper-slide-visible') >= 0,\n isPrev: slideClasses.indexOf('swiper-slide-prev') >= 0,\n isNext: slideClasses.indexOf('swiper-slide-next') >= 0\n };\n const renderChildren = () => {\n return typeof children === 'function' ? children(slideData) : children;\n };\n const onLoad = () => {\n setLazyLoaded(true);\n };\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: slideElRef,\n className: uniqueClasses(`${slideClasses}${className ? ` ${className}` : ''}`),\n \"data-swiper-slide-index\": virtualIndex,\n onLoad: onLoad\n }, rest), zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-zoom-container\",\n \"data-swiper-zoom\": typeof zoom === 'number' ? zoom : undefined\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\"\n }))), !zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\"\n })));\n});\nSwiperSlide.displayName = 'SwiperSlide';\n\nexport { Swiper, SwiperSlide, useSwiper, useSwiperSlide };\n","function classesToSelector(classes) {\n if (classes === void 0) {\n classes = '';\n }\n return `.${classes.trim().replace(/([\\.:!+\\/])/g, '\\\\$1') // eslint-disable-line\n .replace(/ /g, '.')}`;\n}\n\nexport { classesToSelector as c };\n","import { c as classesToSelector } from '../shared/classes-to-selector.mjs';\nimport { c as createElementIfNotDefined } from '../shared/create-element-if-not-defined.mjs';\nimport { f as elementOuterSize, g as elementIndex, a as elementParents } from '../shared/utils.mjs';\n\nfunction Pagination(_ref) {\n let {\n swiper,\n extendParams,\n on,\n emit\n } = _ref;\n const pfx = 'swiper-pagination';\n extendParams({\n pagination: {\n el: null,\n bulletElement: 'span',\n clickable: false,\n hideOnClick: false,\n renderBullet: null,\n renderProgressbar: null,\n renderFraction: null,\n renderCustom: null,\n progressbarOpposite: false,\n type: 'bullets',\n // 'bullets' or 'progressbar' or 'fraction' or 'custom'\n dynamicBullets: false,\n dynamicMainBullets: 1,\n formatFractionCurrent: number => number,\n formatFractionTotal: number => number,\n bulletClass: `${pfx}-bullet`,\n bulletActiveClass: `${pfx}-bullet-active`,\n modifierClass: `${pfx}-`,\n currentClass: `${pfx}-current`,\n totalClass: `${pfx}-total`,\n hiddenClass: `${pfx}-hidden`,\n progressbarFillClass: `${pfx}-progressbar-fill`,\n progressbarOppositeClass: `${pfx}-progressbar-opposite`,\n clickableClass: `${pfx}-clickable`,\n lockClass: `${pfx}-lock`,\n horizontalClass: `${pfx}-horizontal`,\n verticalClass: `${pfx}-vertical`,\n paginationDisabledClass: `${pfx}-disabled`\n }\n });\n swiper.pagination = {\n el: null,\n bullets: []\n };\n let bulletSize;\n let dynamicBulletIndex = 0;\n const makeElementsArray = el => (Array.isArray(el) ? el : [el]).filter(e => !!e);\n function isPaginationDisabled() {\n return !swiper.params.pagination.el || !swiper.pagination.el || Array.isArray(swiper.pagination.el) && swiper.pagination.el.length === 0;\n }\n function setSideBullets(bulletEl, position) {\n const {\n bulletActiveClass\n } = swiper.params.pagination;\n if (!bulletEl) return;\n bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];\n if (bulletEl) {\n bulletEl.classList.add(`${bulletActiveClass}-${position}`);\n bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];\n if (bulletEl) {\n bulletEl.classList.add(`${bulletActiveClass}-${position}-${position}`);\n }\n }\n }\n function onBulletClick(e) {\n const bulletEl = e.target.closest(classesToSelector(swiper.params.pagination.bulletClass));\n if (!bulletEl) {\n return;\n }\n e.preventDefault();\n const index = elementIndex(bulletEl) * swiper.params.slidesPerGroup;\n if (swiper.params.loop) {\n if (swiper.realIndex === index) return;\n const realIndex = swiper.realIndex;\n const newSlideIndex = swiper.getSlideIndexByData(index);\n const currentSlideIndex = swiper.getSlideIndexByData(swiper.realIndex);\n const loopFix = dir => {\n const indexBeforeLoopFix = swiper.activeIndex;\n swiper.loopFix({\n direction: dir,\n activeSlideIndex: newSlideIndex,\n slideTo: false\n });\n const indexAfterFix = swiper.activeIndex;\n if (indexBeforeLoopFix === indexAfterFix) {\n swiper.slideToLoop(realIndex, 0, false, true);\n }\n };\n if (newSlideIndex > swiper.slides.length - swiper.loopedSlides) {\n loopFix(newSlideIndex > currentSlideIndex ? 'next' : 'prev');\n } else if (swiper.params.centeredSlides) {\n const slidesPerView = swiper.params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(swiper.params.slidesPerView, 10));\n if (newSlideIndex < Math.floor(slidesPerView / 2)) {\n loopFix('prev');\n }\n }\n swiper.slideToLoop(index);\n } else {\n swiper.slideTo(index);\n }\n }\n function update() {\n // Render || Update Pagination bullets/items\n const rtl = swiper.rtl;\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n let el = swiper.pagination.el;\n el = makeElementsArray(el);\n // Current/Total\n let current;\n let previousIndex;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const total = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n if (swiper.params.loop) {\n previousIndex = swiper.previousRealIndex || 0;\n current = swiper.params.slidesPerGroup > 1 ? Math.floor(swiper.realIndex / swiper.params.slidesPerGroup) : swiper.realIndex;\n } else if (typeof swiper.snapIndex !== 'undefined') {\n current = swiper.snapIndex;\n previousIndex = swiper.previousSnapIndex;\n } else {\n previousIndex = swiper.previousIndex || 0;\n current = swiper.activeIndex || 0;\n }\n // Types\n if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {\n const bullets = swiper.pagination.bullets;\n let firstIndex;\n let lastIndex;\n let midIndex;\n if (params.dynamicBullets) {\n bulletSize = elementOuterSize(bullets[0], swiper.isHorizontal() ? 'width' : 'height', true);\n el.forEach(subEl => {\n subEl.style[swiper.isHorizontal() ? 'width' : 'height'] = `${bulletSize * (params.dynamicMainBullets + 4)}px`;\n });\n if (params.dynamicMainBullets > 1 && previousIndex !== undefined) {\n dynamicBulletIndex += current - (previousIndex || 0);\n if (dynamicBulletIndex > params.dynamicMainBullets - 1) {\n dynamicBulletIndex = params.dynamicMainBullets - 1;\n } else if (dynamicBulletIndex < 0) {\n dynamicBulletIndex = 0;\n }\n }\n firstIndex = Math.max(current - dynamicBulletIndex, 0);\n lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);\n midIndex = (lastIndex + firstIndex) / 2;\n }\n bullets.forEach(bulletEl => {\n const classesToRemove = [...['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`)].map(s => typeof s === 'string' && s.includes(' ') ? s.split(' ') : s).flat();\n bulletEl.classList.remove(...classesToRemove);\n });\n if (el.length > 1) {\n bullets.forEach(bullet => {\n const bulletIndex = elementIndex(bullet);\n if (bulletIndex === current) {\n bullet.classList.add(...params.bulletActiveClass.split(' '));\n } else if (swiper.isElement) {\n bullet.setAttribute('part', 'bullet');\n }\n if (params.dynamicBullets) {\n if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {\n bullet.classList.add(...`${params.bulletActiveClass}-main`.split(' '));\n }\n if (bulletIndex === firstIndex) {\n setSideBullets(bullet, 'prev');\n }\n if (bulletIndex === lastIndex) {\n setSideBullets(bullet, 'next');\n }\n }\n });\n } else {\n const bullet = bullets[current];\n if (bullet) {\n bullet.classList.add(...params.bulletActiveClass.split(' '));\n }\n if (swiper.isElement) {\n bullets.forEach((bulletEl, bulletIndex) => {\n bulletEl.setAttribute('part', bulletIndex === current ? 'bullet-active' : 'bullet');\n });\n }\n if (params.dynamicBullets) {\n const firstDisplayedBullet = bullets[firstIndex];\n const lastDisplayedBullet = bullets[lastIndex];\n for (let i = firstIndex; i <= lastIndex; i += 1) {\n if (bullets[i]) {\n bullets[i].classList.add(...`${params.bulletActiveClass}-main`.split(' '));\n }\n }\n setSideBullets(firstDisplayedBullet, 'prev');\n setSideBullets(lastDisplayedBullet, 'next');\n }\n }\n if (params.dynamicBullets) {\n const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);\n const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;\n const offsetProp = rtl ? 'right' : 'left';\n bullets.forEach(bullet => {\n bullet.style[swiper.isHorizontal() ? offsetProp : 'top'] = `${bulletsOffset}px`;\n });\n }\n }\n el.forEach((subEl, subElIndex) => {\n if (params.type === 'fraction') {\n subEl.querySelectorAll(classesToSelector(params.currentClass)).forEach(fractionEl => {\n fractionEl.textContent = params.formatFractionCurrent(current + 1);\n });\n subEl.querySelectorAll(classesToSelector(params.totalClass)).forEach(totalEl => {\n totalEl.textContent = params.formatFractionTotal(total);\n });\n }\n if (params.type === 'progressbar') {\n let progressbarDirection;\n if (params.progressbarOpposite) {\n progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';\n } else {\n progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';\n }\n const scale = (current + 1) / total;\n let scaleX = 1;\n let scaleY = 1;\n if (progressbarDirection === 'horizontal') {\n scaleX = scale;\n } else {\n scaleY = scale;\n }\n subEl.querySelectorAll(classesToSelector(params.progressbarFillClass)).forEach(progressEl => {\n progressEl.style.transform = `translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`;\n progressEl.style.transitionDuration = `${swiper.params.speed}ms`;\n });\n }\n if (params.type === 'custom' && params.renderCustom) {\n subEl.innerHTML = params.renderCustom(swiper, current + 1, total);\n if (subElIndex === 0) emit('paginationRender', subEl);\n } else {\n if (subElIndex === 0) emit('paginationRender', subEl);\n emit('paginationUpdate', subEl);\n }\n if (swiper.params.watchOverflow && swiper.enabled) {\n subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass);\n }\n });\n }\n function render() {\n // Render Container\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n let el = swiper.pagination.el;\n el = makeElementsArray(el);\n let paginationHTML = '';\n if (params.type === 'bullets') {\n let numberOfBullets = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && numberOfBullets > slidesLength) {\n numberOfBullets = slidesLength;\n }\n for (let i = 0; i < numberOfBullets; i += 1) {\n if (params.renderBullet) {\n paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);\n } else {\n // prettier-ignore\n paginationHTML += `<${params.bulletElement} ${swiper.isElement ? 'part=\"bullet\"' : ''} class=\"${params.bulletClass}\">${params.bulletElement}>`;\n }\n }\n }\n if (params.type === 'fraction') {\n if (params.renderFraction) {\n paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);\n } else {\n paginationHTML = `` + ' / ' + ``;\n }\n }\n if (params.type === 'progressbar') {\n if (params.renderProgressbar) {\n paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);\n } else {\n paginationHTML = ``;\n }\n }\n swiper.pagination.bullets = [];\n el.forEach(subEl => {\n if (params.type !== 'custom') {\n subEl.innerHTML = paginationHTML || '';\n }\n if (params.type === 'bullets') {\n swiper.pagination.bullets.push(...subEl.querySelectorAll(classesToSelector(params.bulletClass)));\n }\n });\n if (params.type !== 'custom') {\n emit('paginationRender', el[0]);\n }\n }\n function init() {\n swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, {\n el: 'swiper-pagination'\n });\n const params = swiper.params.pagination;\n if (!params.el) return;\n let el;\n if (typeof params.el === 'string' && swiper.isElement) {\n el = swiper.el.querySelector(params.el);\n }\n if (!el && typeof params.el === 'string') {\n el = [...document.querySelectorAll(params.el)];\n }\n if (!el) {\n el = params.el;\n }\n if (!el || el.length === 0) return;\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && Array.isArray(el) && el.length > 1) {\n el = [...swiper.el.querySelectorAll(params.el)];\n // check if it belongs to another nested Swiper\n if (el.length > 1) {\n el = el.filter(subEl => {\n if (elementParents(subEl, '.swiper')[0] !== swiper.el) return false;\n return true;\n })[0];\n }\n }\n if (Array.isArray(el) && el.length === 1) el = el[0];\n Object.assign(swiper.pagination, {\n el\n });\n el = makeElementsArray(el);\n el.forEach(subEl => {\n if (params.type === 'bullets' && params.clickable) {\n subEl.classList.add(...(params.clickableClass || '').split(' '));\n }\n subEl.classList.add(params.modifierClass + params.type);\n subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n if (params.type === 'bullets' && params.dynamicBullets) {\n subEl.classList.add(`${params.modifierClass}${params.type}-dynamic`);\n dynamicBulletIndex = 0;\n if (params.dynamicMainBullets < 1) {\n params.dynamicMainBullets = 1;\n }\n }\n if (params.type === 'progressbar' && params.progressbarOpposite) {\n subEl.classList.add(params.progressbarOppositeClass);\n }\n if (params.clickable) {\n subEl.addEventListener('click', onBulletClick);\n }\n if (!swiper.enabled) {\n subEl.classList.add(params.lockClass);\n }\n });\n }\n function destroy() {\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n let el = swiper.pagination.el;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => {\n subEl.classList.remove(params.hiddenClass);\n subEl.classList.remove(params.modifierClass + params.type);\n subEl.classList.remove(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n if (params.clickable) {\n subEl.classList.remove(...(params.clickableClass || '').split(' '));\n subEl.removeEventListener('click', onBulletClick);\n }\n });\n }\n if (swiper.pagination.bullets) swiper.pagination.bullets.forEach(subEl => subEl.classList.remove(...params.bulletActiveClass.split(' ')));\n }\n on('changeDirection', () => {\n if (!swiper.pagination || !swiper.pagination.el) return;\n const params = swiper.params.pagination;\n let {\n el\n } = swiper.pagination;\n el = makeElementsArray(el);\n el.forEach(subEl => {\n subEl.classList.remove(params.horizontalClass, params.verticalClass);\n subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n });\n });\n on('init', () => {\n if (swiper.params.pagination.enabled === false) {\n // eslint-disable-next-line\n disable();\n } else {\n init();\n render();\n update();\n }\n });\n on('activeIndexChange', () => {\n if (typeof swiper.snapIndex === 'undefined') {\n update();\n }\n });\n on('snapIndexChange', () => {\n update();\n });\n on('snapGridLengthChange', () => {\n render();\n update();\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.pagination.lockClass));\n }\n });\n on('lock unlock', () => {\n update();\n });\n on('click', (_s, e) => {\n const targetEl = e.target;\n const el = makeElementsArray(swiper.pagination.el);\n if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && el && el.length > 0 && !targetEl.classList.contains(swiper.params.pagination.bulletClass)) {\n if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return;\n const isHidden = el[0].classList.contains(swiper.params.pagination.hiddenClass);\n if (isHidden === true) {\n emit('paginationShow');\n } else {\n emit('paginationHide');\n }\n el.forEach(subEl => subEl.classList.toggle(swiper.params.pagination.hiddenClass));\n }\n });\n const enable = () => {\n swiper.el.classList.remove(swiper.params.pagination.paginationDisabledClass);\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList.remove(swiper.params.pagination.paginationDisabledClass));\n }\n init();\n render();\n update();\n };\n const disable = () => {\n swiper.el.classList.add(swiper.params.pagination.paginationDisabledClass);\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList.add(swiper.params.pagination.paginationDisabledClass));\n }\n destroy();\n };\n Object.assign(swiper.pagination, {\n enable,\n disable,\n render,\n update,\n init,\n destroy\n });\n}\n\nexport { Pagination as default };\n","import { e as elementChildren, c as createElement } from './utils.mjs';\n\nfunction createElementIfNotDefined(swiper, originalParams, params, checkProps) {\n if (swiper.params.createElements) {\n Object.keys(checkProps).forEach(key => {\n if (!params[key] && params.auto === true) {\n let element = elementChildren(swiper.el, `.${checkProps[key]}`)[0];\n if (!element) {\n element = createElement('div', checkProps[key]);\n element.className = checkProps[key];\n swiper.el.append(element);\n }\n params[key] = element;\n originalParams[key] = element;\n }\n });\n }\n return params;\n}\n\nexport { createElementIfNotDefined as c };\n","import { g as getDocument } from '../shared/ssr-window.esm.mjs';\n\n/* eslint no-underscore-dangle: \"off\" */\n/* eslint no-use-before-define: \"off\" */\nfunction Autoplay(_ref) {\n let {\n swiper,\n extendParams,\n on,\n emit,\n params\n } = _ref;\n swiper.autoplay = {\n running: false,\n paused: false,\n timeLeft: 0\n };\n extendParams({\n autoplay: {\n enabled: false,\n delay: 3000,\n waitForTransition: true,\n disableOnInteraction: true,\n stopOnLastSlide: false,\n reverseDirection: false,\n pauseOnMouseEnter: false\n }\n });\n let timeout;\n let raf;\n let autoplayDelayTotal = params && params.autoplay ? params.autoplay.delay : 3000;\n let autoplayDelayCurrent = params && params.autoplay ? params.autoplay.delay : 3000;\n let autoplayTimeLeft;\n let autoplayStartTime = new Date().getTime;\n let wasPaused;\n let isTouched;\n let pausedByTouch;\n let touchStartTimeout;\n let slideChanged;\n let pausedByInteraction;\n function onTransitionEnd(e) {\n if (!swiper || swiper.destroyed || !swiper.wrapperEl) return;\n if (e.target !== swiper.wrapperEl) return;\n swiper.wrapperEl.removeEventListener('transitionend', onTransitionEnd);\n resume();\n }\n const calcTimeLeft = () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n if (swiper.autoplay.paused) {\n wasPaused = true;\n } else if (wasPaused) {\n autoplayDelayCurrent = autoplayTimeLeft;\n wasPaused = false;\n }\n const timeLeft = swiper.autoplay.paused ? autoplayTimeLeft : autoplayStartTime + autoplayDelayCurrent - new Date().getTime();\n swiper.autoplay.timeLeft = timeLeft;\n emit('autoplayTimeLeft', timeLeft, timeLeft / autoplayDelayTotal);\n raf = requestAnimationFrame(() => {\n calcTimeLeft();\n });\n };\n const getSlideDelay = () => {\n let activeSlideEl;\n if (swiper.virtual && swiper.params.virtual.enabled) {\n activeSlideEl = swiper.slides.filter(slideEl => slideEl.classList.contains('swiper-slide-active'))[0];\n } else {\n activeSlideEl = swiper.slides[swiper.activeIndex];\n }\n if (!activeSlideEl) return undefined;\n const currentSlideDelay = parseInt(activeSlideEl.getAttribute('data-swiper-autoplay'), 10);\n return currentSlideDelay;\n };\n const run = delayForce => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n cancelAnimationFrame(raf);\n calcTimeLeft();\n let delay = typeof delayForce === 'undefined' ? swiper.params.autoplay.delay : delayForce;\n autoplayDelayTotal = swiper.params.autoplay.delay;\n autoplayDelayCurrent = swiper.params.autoplay.delay;\n const currentSlideDelay = getSlideDelay();\n if (!Number.isNaN(currentSlideDelay) && currentSlideDelay > 0 && typeof delayForce === 'undefined') {\n delay = currentSlideDelay;\n autoplayDelayTotal = currentSlideDelay;\n autoplayDelayCurrent = currentSlideDelay;\n }\n autoplayTimeLeft = delay;\n const speed = swiper.params.speed;\n const proceed = () => {\n if (!swiper || swiper.destroyed) return;\n if (swiper.params.autoplay.reverseDirection) {\n if (!swiper.isBeginning || swiper.params.loop || swiper.params.rewind) {\n swiper.slidePrev(speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n swiper.slideTo(swiper.slides.length - 1, speed, true, true);\n emit('autoplay');\n }\n } else {\n if (!swiper.isEnd || swiper.params.loop || swiper.params.rewind) {\n swiper.slideNext(speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n swiper.slideTo(0, speed, true, true);\n emit('autoplay');\n }\n }\n if (swiper.params.cssMode) {\n autoplayStartTime = new Date().getTime();\n requestAnimationFrame(() => {\n run();\n });\n }\n };\n if (delay > 0) {\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n proceed();\n }, delay);\n } else {\n requestAnimationFrame(() => {\n proceed();\n });\n }\n\n // eslint-disable-next-line\n return delay;\n };\n const start = () => {\n swiper.autoplay.running = true;\n run();\n emit('autoplayStart');\n };\n const stop = () => {\n swiper.autoplay.running = false;\n clearTimeout(timeout);\n cancelAnimationFrame(raf);\n emit('autoplayStop');\n };\n const pause = (internal, reset) => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n clearTimeout(timeout);\n if (!internal) {\n pausedByInteraction = true;\n }\n const proceed = () => {\n emit('autoplayPause');\n if (swiper.params.autoplay.waitForTransition) {\n swiper.wrapperEl.addEventListener('transitionend', onTransitionEnd);\n } else {\n resume();\n }\n };\n swiper.autoplay.paused = true;\n if (reset) {\n if (slideChanged) {\n autoplayTimeLeft = swiper.params.autoplay.delay;\n }\n slideChanged = false;\n proceed();\n return;\n }\n const delay = autoplayTimeLeft || swiper.params.autoplay.delay;\n autoplayTimeLeft = delay - (new Date().getTime() - autoplayStartTime);\n if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop) return;\n if (autoplayTimeLeft < 0) autoplayTimeLeft = 0;\n proceed();\n };\n const resume = () => {\n if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop || swiper.destroyed || !swiper.autoplay.running) return;\n autoplayStartTime = new Date().getTime();\n if (pausedByInteraction) {\n pausedByInteraction = false;\n run(autoplayTimeLeft);\n } else {\n run();\n }\n swiper.autoplay.paused = false;\n emit('autoplayResume');\n };\n const onVisibilityChange = () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n const document = getDocument();\n if (document.visibilityState === 'hidden') {\n pausedByInteraction = true;\n pause(true);\n }\n if (document.visibilityState === 'visible') {\n resume();\n }\n };\n const onPointerEnter = e => {\n if (e.pointerType !== 'mouse') return;\n pausedByInteraction = true;\n if (swiper.animating || swiper.autoplay.paused) return;\n pause(true);\n };\n const onPointerLeave = e => {\n if (e.pointerType !== 'mouse') return;\n if (swiper.autoplay.paused) {\n resume();\n }\n };\n const attachMouseEvents = () => {\n if (swiper.params.autoplay.pauseOnMouseEnter) {\n swiper.el.addEventListener('pointerenter', onPointerEnter);\n swiper.el.addEventListener('pointerleave', onPointerLeave);\n }\n };\n const detachMouseEvents = () => {\n swiper.el.removeEventListener('pointerenter', onPointerEnter);\n swiper.el.removeEventListener('pointerleave', onPointerLeave);\n };\n const attachDocumentEvents = () => {\n const document = getDocument();\n document.addEventListener('visibilitychange', onVisibilityChange);\n };\n const detachDocumentEvents = () => {\n const document = getDocument();\n document.removeEventListener('visibilitychange', onVisibilityChange);\n };\n on('init', () => {\n if (swiper.params.autoplay.enabled) {\n attachMouseEvents();\n attachDocumentEvents();\n autoplayStartTime = new Date().getTime();\n start();\n }\n });\n on('destroy', () => {\n detachMouseEvents();\n detachDocumentEvents();\n if (swiper.autoplay.running) {\n stop();\n }\n });\n on('beforeTransitionStart', (_s, speed, internal) => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n if (internal || !swiper.params.autoplay.disableOnInteraction) {\n pause(true, true);\n } else {\n stop();\n }\n });\n on('sliderFirstMove', () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n return;\n }\n isTouched = true;\n pausedByTouch = false;\n pausedByInteraction = false;\n touchStartTimeout = setTimeout(() => {\n pausedByInteraction = true;\n pausedByTouch = true;\n pause(true);\n }, 200);\n });\n on('touchEnd', () => {\n if (swiper.destroyed || !swiper.autoplay.running || !isTouched) return;\n clearTimeout(touchStartTimeout);\n clearTimeout(timeout);\n if (swiper.params.autoplay.disableOnInteraction) {\n pausedByTouch = false;\n isTouched = false;\n return;\n }\n if (pausedByTouch && swiper.params.cssMode) resume();\n pausedByTouch = false;\n isTouched = false;\n });\n on('slideChange', () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n slideChanged = true;\n });\n Object.assign(swiper.autoplay, {\n start,\n stop,\n pause,\n resume\n });\n}\n\nexport { Autoplay as default };\n","/*\r\n * Author: Kevin Tamakuwala (Github: @kevintamakuwala)\r\n * Date: 16/10/2003\r\n * Functionalities:\r\n * 1) Infinite Autoplay when present on screen\r\n * 2) Swiping functionality\r\n*/\r\n\r\nimport React from \"react\";\r\n\r\n// Import Swiper React components\r\nimport { Swiper, SwiperSlide } from \"swiper/react\";\r\n\r\n// Import Swiper styles\r\nimport \"swiper/css\";\r\nimport \"swiper/css/effect-coverflow\";\r\nimport \"swiper/css\";\r\nimport \"./slider.css\";\r\nimport { Pagination, Autoplay } from \"swiper/modules\";\r\nimport SwiperCore from \"swiper\";\r\n\r\n// dummy images, you can keep cards instead.\r\nconst dummyImages = [\r\n \"https://images.unsplash.com/photo-1696004503906-6b6ca3923f71?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODE3Nw&ixlib=rb-4.0.3&q=80&w=300\",\r\n \"https://images.unsplash.com/photo-1696526552981-893b9caf991d?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODIyNg&ixlib=rb-4.0.3&q=80&w=300\",\r\n \"https://images.unsplash.com/photo-1693590593548-adb2d98e8f2b?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODI4OA&ixlib=rb-4.0.3&q=80&w=300\",\r\n \"https://images.unsplash.com/photo-1696164712534-25a0dca38a2d?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODMyMQ&ixlib=rb-4.0.3&q=80&w=300\",\r\n \"https://images.unsplash.com/photo-1696164255885-4bb2db6bb3f2?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODMzOA&ixlib=rb-4.0.3&q=80&w=300\",\r\n \"https://source.unsplash.com/random/300x300\",\r\n \"https://images.unsplash.com/photo-1695642579321-fcb1fc79b976?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=300&ixid=MnwxfDB8MXxyYW5kb218MHx8fHx8fHx8MTY5NzQ0ODM2Mg&ixlib=rb-4.0.3&q=80&w=300\",\r\n];\r\n\r\nconst Slider = () => {\r\n // using autoplay feature\r\n SwiperCore.use([Autoplay]);\r\n\r\n // including styles\r\n const styles = {\r\n slider__inner_container: {\r\n display: \"flex\",\r\n transition: \".5s\",\r\n },\r\n slider__container: {\r\n overflow: \"hidden\",\r\n margin: \"0 3rem\",\r\n },\r\n __card: {\r\n padding: \"1rem 0.5rem\",\r\n },\r\n slideIn: {\r\n display: \"none\",\r\n },\r\n };\r\n\r\n // for autoplay slider: only when present on viewport. Use below code to achieve that using framer-motion and conditional rendering. --------------------------\r\n\r\n // const [isIntersecting, setIsIntersecting] = useState(false);\r\n // const ref = useRef(null);\r\n\r\n // useEffect(() => {\r\n // const observer = new IntersectionObserver(\r\n // ([entry]) => {\r\n // setIsIntersecting(entry.isIntersecting);\r\n // },\r\n // { rootMargin: \"-100px\" }\r\n // );\r\n // observer.observe(ref.current);\r\n\r\n // return () => observer.disconnect();\r\n // }, []);\r\n\r\n // useEffect(() => {\r\n // if (isIntersecting) {\r\n // ref.current.querySelectorAll(\"div\").forEach((el) => {\r\n // el.classList.remove(\"slideIn\");\r\n // });\r\n // }\r\n // }, [isIntersecting]);\r\n\r\n return (\r\n {element} {element}ee?ee+g:e}))}if(r.centerInsufficientSlides){var te=0;if(m.forEach((function(e){te+=e+(w||0)})),(te-=w)
ee?ee+g:e}))}if(r.centerInsufficientSlides){var te=0;if(m.forEach((function(e){te+=e+(w||0)})),(te-=w)