@danielcruzcode/ui-core 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/commerce/ProductCard/ProductCard.d.ts +1 -1
  2. package/dist/commerce/ProductCard/ProductCard.d.ts.map +1 -1
  3. package/dist/commerce/ProductShelf/ProductShelf.d.ts +1 -1
  4. package/dist/commerce/ProductShelf/ProductShelf.d.ts.map +1 -1
  5. package/dist/components/Card/Card.d.ts +1 -1
  6. package/dist/components/Card/Card.d.ts.map +1 -1
  7. package/dist/components/Carousel/Carousel.d.ts +2 -2
  8. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.cjs10.js +1 -1
  11. package/dist/index.cjs11.js +1 -1
  12. package/dist/index.cjs12.js +5 -1
  13. package/dist/index.cjs13.js +6 -1
  14. package/dist/index.cjs14.js +1 -1
  15. package/dist/index.cjs15.js +1 -1
  16. package/dist/index.cjs16.js +1 -1
  17. package/dist/index.cjs17.js +1 -1
  18. package/dist/index.cjs18.js +1 -1
  19. package/dist/index.cjs2.js +19 -1
  20. package/dist/index.cjs3.js +12 -1
  21. package/dist/index.cjs4.js +17 -1
  22. package/dist/index.cjs5.js +17 -1
  23. package/dist/index.cjs6.js +8 -1
  24. package/dist/index.cjs7.js +12 -1
  25. package/dist/index.cjs8.js +8 -1
  26. package/dist/index.cjs9.js +18 -1
  27. package/dist/index.esm.js +22 -22
  28. package/dist/index.esm10.js +65 -61
  29. package/dist/index.esm11.js +24 -48
  30. package/dist/index.esm12.js +11 -22
  31. package/dist/index.esm13.js +12 -25
  32. package/dist/index.esm14.js +45 -11
  33. package/dist/index.esm15.js +22 -5
  34. package/dist/index.esm16.js +33 -5
  35. package/dist/index.esm17.js +1202 -6
  36. package/dist/index.esm18.js +50 -13
  37. package/dist/index.esm2.js +38 -5
  38. package/dist/index.esm3.js +27 -46
  39. package/dist/index.esm4.js +29 -32
  40. package/dist/index.esm5.js +35 -96
  41. package/dist/index.esm6.js +26 -58
  42. package/dist/index.esm7.js +29 -5
  43. package/dist/index.esm8.js +34 -55
  44. package/dist/index.esm9.js +69 -162
  45. package/dist/layout/Container/Container.d.ts +2 -1
  46. package/dist/layout/Container/Container.d.ts.map +1 -1
  47. package/dist/layout/Stack/Stack.d.ts +4 -3
  48. package/dist/layout/Stack/Stack.d.ts.map +1 -1
  49. package/dist/primitives/Badge/Badge.d.ts.map +1 -1
  50. package/dist/primitives/Button/Button.d.ts +1 -1
  51. package/dist/primitives/Button/Button.d.ts.map +1 -1
  52. package/dist/primitives/Checkbox/Checkbox.d.ts +1 -1
  53. package/dist/primitives/Checkbox/Checkbox.d.ts.map +1 -1
  54. package/dist/primitives/Input/Input.d.ts +1 -1
  55. package/dist/primitives/Input/Input.d.ts.map +1 -1
  56. package/dist/primitives/Select/Select.d.ts +1 -1
  57. package/dist/primitives/Select/Select.d.ts.map +1 -1
  58. package/dist/primitives/Tag/Tag.d.ts.map +1 -1
  59. package/package.json +6 -26
  60. package/dist/commerce/ProductCard/ProductCard.css.d.ts +0 -23
  61. package/dist/commerce/ProductCard/ProductCard.css.d.ts.map +0 -1
  62. package/dist/commerce/ProductShelf/ProductShelf.css.d.ts +0 -3
  63. package/dist/commerce/ProductShelf/ProductShelf.css.d.ts.map +0 -1
  64. package/dist/components/Card/Card.css.d.ts +0 -30
  65. package/dist/components/Card/Card.css.d.ts.map +0 -1
  66. package/dist/components/Carousel/Carousel.css.d.ts +0 -8
  67. package/dist/components/Carousel/Carousel.css.d.ts.map +0 -1
  68. package/dist/index.cjs19.js +0 -1
  69. package/dist/index.cjs20.js +0 -1
  70. package/dist/index.cjs21.js +0 -1
  71. package/dist/index.cjs22.js +0 -1
  72. package/dist/index.cjs23.js +0 -1
  73. package/dist/index.cjs24.js +0 -1
  74. package/dist/index.cjs25.js +0 -1
  75. package/dist/index.cjs26.js +0 -1
  76. package/dist/index.cjs27.js +0 -1
  77. package/dist/index.cjs28.js +0 -1
  78. package/dist/index.cjs30.js +0 -1
  79. package/dist/index.cjs31.js +0 -1
  80. package/dist/index.cjs35.js +0 -1
  81. package/dist/index.cjs44.js +0 -1
  82. package/dist/index.cjs45.js +0 -1
  83. package/dist/index.cjs46.js +0 -1
  84. package/dist/index.cjs49.js +0 -1
  85. package/dist/index.cjs50.js +0 -1
  86. package/dist/index.cjs51.js +0 -1
  87. package/dist/index.cjs52.js +0 -1
  88. package/dist/index.esm19.js +0 -12
  89. package/dist/index.esm20.js +0 -26
  90. package/dist/index.esm21.js +0 -7
  91. package/dist/index.esm22.js +0 -7
  92. package/dist/index.esm23.js +0 -11
  93. package/dist/index.esm24.js +0 -136
  94. package/dist/index.esm25.js +0 -226
  95. package/dist/index.esm26.js +0 -130
  96. package/dist/index.esm27.js +0 -280
  97. package/dist/index.esm28.js +0 -11
  98. package/dist/index.esm30.js +0 -5
  99. package/dist/index.esm31.js +0 -1
  100. package/dist/index.esm35.js +0 -88
  101. package/dist/index.esm44.js +0 -2038
  102. package/dist/index.esm45.js +0 -60
  103. package/dist/index.esm46.js +0 -191
  104. package/dist/index.esm49.js +0 -12
  105. package/dist/index.esm50.js +0 -182
  106. package/dist/index.esm51.js +0 -6
  107. package/dist/index.esm52.js +0 -134
  108. package/dist/layout/Container/Container.css.d.ts +0 -20
  109. package/dist/layout/Container/Container.css.d.ts.map +0 -1
  110. package/dist/layout/Stack/Stack.css.d.ts +0 -2
  111. package/dist/layout/Stack/Stack.css.d.ts.map +0 -1
  112. package/dist/primitives/Badge/Badge.css.d.ts +0 -37
  113. package/dist/primitives/Badge/Badge.css.d.ts.map +0 -1
  114. package/dist/primitives/Button/Button.css.d.ts +0 -60
  115. package/dist/primitives/Button/Button.css.d.ts.map +0 -1
  116. package/dist/primitives/Checkbox/Checkbox.css.d.ts +0 -9
  117. package/dist/primitives/Checkbox/Checkbox.css.d.ts.map +0 -1
  118. package/dist/primitives/Input/Input.css.d.ts +0 -11
  119. package/dist/primitives/Input/Input.css.d.ts.map +0 -1
  120. package/dist/primitives/Select/Select.css.d.ts +0 -8
  121. package/dist/primitives/Select/Select.css.d.ts.map +0 -1
  122. package/dist/primitives/Tag/Tag.css.d.ts +0 -16
  123. package/dist/primitives/Tag/Tag.css.d.ts.map +0 -1
  124. package/dist/styles.css +0 -1
  125. package/dist/styles.d.ts +0 -1
  126. package/dist/styles.d.ts.map +0 -1
  127. package/styles.css +0 -1
@@ -1,2038 +0,0 @@
1
- var xe = Object.defineProperty, ye = Object.defineProperties;
2
- var Ee = Object.getOwnPropertyDescriptors;
3
- var ne = Object.getOwnPropertySymbols;
4
- var Pe = Object.prototype.hasOwnProperty, Me = Object.prototype.propertyIsEnumerable;
5
- var ae = (s, t, e) => t in s ? xe(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, q = (s, t) => {
6
- for (var e in t || (t = {}))
7
- Pe.call(t, e) && ae(s, e, t[e]);
8
- if (ne)
9
- for (var e of ne(t))
10
- Me.call(t, e) && ae(s, e, t[e]);
11
- return s;
12
- }, U = (s, t) => ye(s, Ee(t));
13
- import { g as R, a as $ } from "./index.esm52.js";
14
- import { x as D, e as B, j as le, c as ie, q as N, y as Ce, v as X, n as he, u as me, l as Ie, r as Le, t as ze, b as W, i as oe, w as ke, h as j, d as Oe } from "./index.esm50.js";
15
- let K;
16
- function Ae() {
17
- const s = $(), t = R();
18
- return {
19
- smoothScroll: t.documentElement && t.documentElement.style && "scrollBehavior" in t.documentElement.style,
20
- touch: !!("ontouchstart" in s || s.DocumentTouch && t instanceof s.DocumentTouch)
21
- };
22
- }
23
- function ge() {
24
- return K || (K = Ae()), K;
25
- }
26
- let J;
27
- function Ge({
28
- userAgent: s
29
- } = {}) {
30
- const t = ge(), e = $(), i = e.navigator.platform, n = s || e.navigator.userAgent, r = {
31
- ios: !1,
32
- android: !1
33
- }, l = e.screen.width, o = e.screen.height, a = n.match(/(Android);?[\s\/]+([\d.]+)?/);
34
- let d = n.match(/(iPad)(?!\1).*OS\s([\d_]+)/);
35
- const u = n.match(/(iPod)(.*OS\s([\d_]+))?/), c = !d && n.match(/(iPhone\sOS|iOS)\s([\d_]+)/), h = i === "Win32";
36
- let f = i === "MacIntel";
37
- const p = ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"];
38
- return !d && f && t.touch && p.indexOf(`${l}x${o}`) >= 0 && (d = n.match(/(Version)\/([\d.]+)/), d || (d = [0, 1, "13_0_0"]), f = !1), a && !h && (r.os = "android", r.android = !0), (d || c || u) && (r.os = "ios", r.ios = !0), r;
39
- }
40
- function ve(s = {}) {
41
- return J || (J = Ge(s)), J;
42
- }
43
- let Q;
44
- function Ve() {
45
- const s = $(), t = ve();
46
- let e = !1;
47
- function i() {
48
- const o = s.navigator.userAgent.toLowerCase();
49
- return o.indexOf("safari") >= 0 && o.indexOf("chrome") < 0 && o.indexOf("android") < 0;
50
- }
51
- if (i()) {
52
- const o = String(s.navigator.userAgent);
53
- if (o.includes("Version/")) {
54
- const [a, d] = o.split("Version/")[1].split(" ")[0].split(".").map((u) => Number(u));
55
- e = a < 16 || a === 16 && d < 2;
56
- }
57
- }
58
- const n = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(s.navigator.userAgent), r = i(), l = r || n && t.ios;
59
- return {
60
- isSafari: e || r,
61
- needPerspectiveFix: e,
62
- need3dFix: l,
63
- isWebView: n
64
- };
65
- }
66
- function we() {
67
- return Q || (Q = Ve()), Q;
68
- }
69
- function De({
70
- swiper: s,
71
- on: t,
72
- emit: e
73
- }) {
74
- const i = $();
75
- let n = null, r = null;
76
- const l = () => {
77
- !s || s.destroyed || !s.initialized || (e("beforeResize"), e("resize"));
78
- }, o = () => {
79
- !s || s.destroyed || !s.initialized || (n = new ResizeObserver((u) => {
80
- r = i.requestAnimationFrame(() => {
81
- const {
82
- width: c,
83
- height: h
84
- } = s;
85
- let f = c, p = h;
86
- u.forEach(({
87
- contentBoxSize: m,
88
- contentRect: E,
89
- target: x
90
- }) => {
91
- x && x !== s.el || (f = E ? E.width : (m[0] || m).inlineSize, p = E ? E.height : (m[0] || m).blockSize);
92
- }), (f !== c || p !== h) && l();
93
- });
94
- }), n.observe(s.el));
95
- }, a = () => {
96
- r && i.cancelAnimationFrame(r), n && n.unobserve && s.el && (n.unobserve(s.el), n = null);
97
- }, d = () => {
98
- !s || s.destroyed || !s.initialized || e("orientationchange");
99
- };
100
- t("init", () => {
101
- if (s.params.resizeObserver && typeof i.ResizeObserver != "undefined") {
102
- o();
103
- return;
104
- }
105
- i.addEventListener("resize", l), i.addEventListener("orientationchange", d);
106
- }), t("destroy", () => {
107
- a(), i.removeEventListener("resize", l), i.removeEventListener("orientationchange", d);
108
- });
109
- }
110
- function Be({
111
- swiper: s,
112
- extendParams: t,
113
- on: e,
114
- emit: i
115
- }) {
116
- const n = [], r = $(), l = (d, u = {}) => {
117
- const c = r.MutationObserver || r.WebkitMutationObserver, h = new c((f) => {
118
- if (s.__preventObserver__) return;
119
- if (f.length === 1) {
120
- i("observerUpdate", f[0]);
121
- return;
122
- }
123
- const p = function() {
124
- i("observerUpdate", f[0]);
125
- };
126
- r.requestAnimationFrame ? r.requestAnimationFrame(p) : r.setTimeout(p, 0);
127
- });
128
- h.observe(d, {
129
- attributes: typeof u.attributes == "undefined" ? !0 : u.attributes,
130
- childList: s.isElement || (typeof u.childList == "undefined" ? !0 : u).childList,
131
- characterData: typeof u.characterData == "undefined" ? !0 : u.characterData
132
- }), n.push(h);
133
- }, o = () => {
134
- if (s.params.observer) {
135
- if (s.params.observeParents) {
136
- const d = Oe(s.hostEl);
137
- for (let u = 0; u < d.length; u += 1)
138
- l(d[u]);
139
- }
140
- l(s.hostEl, {
141
- childList: s.params.observeSlideChildren
142
- }), l(s.wrapperEl, {
143
- attributes: !1
144
- });
145
- }
146
- }, a = () => {
147
- n.forEach((d) => {
148
- d.disconnect();
149
- }), n.splice(0, n.length);
150
- };
151
- t({
152
- observer: !1,
153
- observeParents: !1,
154
- observeSlideChildren: !1
155
- }), e("init", o), e("destroy", a);
156
- }
157
- var _e = {
158
- on(s, t, e) {
159
- const i = this;
160
- if (!i.eventsListeners || i.destroyed || typeof t != "function") return i;
161
- const n = e ? "unshift" : "push";
162
- return s.split(" ").forEach((r) => {
163
- i.eventsListeners[r] || (i.eventsListeners[r] = []), i.eventsListeners[r][n](t);
164
- }), i;
165
- },
166
- once(s, t, e) {
167
- const i = this;
168
- if (!i.eventsListeners || i.destroyed || typeof t != "function") return i;
169
- function n(...r) {
170
- i.off(s, n), n.__emitterProxy && delete n.__emitterProxy, t.apply(i, r);
171
- }
172
- return n.__emitterProxy = t, i.on(s, n, e);
173
- },
174
- onAny(s, t) {
175
- const e = this;
176
- if (!e.eventsListeners || e.destroyed || typeof s != "function") return e;
177
- const i = t ? "unshift" : "push";
178
- return e.eventsAnyListeners.indexOf(s) < 0 && e.eventsAnyListeners[i](s), e;
179
- },
180
- offAny(s) {
181
- const t = this;
182
- if (!t.eventsListeners || t.destroyed || !t.eventsAnyListeners) return t;
183
- const e = t.eventsAnyListeners.indexOf(s);
184
- return e >= 0 && t.eventsAnyListeners.splice(e, 1), t;
185
- },
186
- off(s, t) {
187
- const e = this;
188
- return !e.eventsListeners || e.destroyed || !e.eventsListeners || s.split(" ").forEach((i) => {
189
- typeof t == "undefined" ? e.eventsListeners[i] = [] : e.eventsListeners[i] && e.eventsListeners[i].forEach((n, r) => {
190
- (n === t || n.__emitterProxy && n.__emitterProxy === t) && e.eventsListeners[i].splice(r, 1);
191
- });
192
- }), e;
193
- },
194
- emit(...s) {
195
- const t = this;
196
- if (!t.eventsListeners || t.destroyed || !t.eventsListeners) return t;
197
- let e, i, n;
198
- return typeof s[0] == "string" || Array.isArray(s[0]) ? (e = s[0], i = s.slice(1, s.length), n = t) : (e = s[0].events, i = s[0].data, n = s[0].context || t), i.unshift(n), (Array.isArray(e) ? e : e.split(" ")).forEach((l) => {
199
- t.eventsAnyListeners && t.eventsAnyListeners.length && t.eventsAnyListeners.forEach((o) => {
200
- o.apply(n, [l, ...i]);
201
- }), t.eventsListeners && t.eventsListeners[l] && t.eventsListeners[l].forEach((o) => {
202
- o.apply(n, i);
203
- });
204
- }), t;
205
- }
206
- };
207
- function Fe() {
208
- const s = this;
209
- let t, e;
210
- const i = s.el;
211
- typeof s.params.width != "undefined" && s.params.width !== null ? t = s.params.width : t = i.clientWidth, typeof s.params.height != "undefined" && s.params.height !== null ? e = s.params.height : e = i.clientHeight, !(t === 0 && s.isHorizontal() || e === 0 && s.isVertical()) && (t = t - parseInt(N(i, "padding-left") || 0, 10) - parseInt(N(i, "padding-right") || 0, 10), e = e - parseInt(N(i, "padding-top") || 0, 10) - parseInt(N(i, "padding-bottom") || 0, 10), Number.isNaN(t) && (t = 0), Number.isNaN(e) && (e = 0), Object.assign(s, {
212
- width: t,
213
- height: e,
214
- size: s.isHorizontal() ? t : e
215
- }));
216
- }
217
- function Ne() {
218
- const s = this;
219
- function t(b, w) {
220
- return parseFloat(b.getPropertyValue(s.getDirectionLabel(w)) || 0);
221
- }
222
- const e = s.params, {
223
- wrapperEl: i,
224
- slidesEl: n,
225
- rtlTranslate: r,
226
- wrongRTL: l
227
- } = s, o = s.virtual && e.virtual.enabled, a = o ? s.virtual.slides.length : s.slides.length, d = B(n, `.${s.params.slideClass}, swiper-slide`), u = o ? s.virtual.slides.length : d.length;
228
- let c = [];
229
- const h = [], f = [];
230
- let p = e.slidesOffsetBefore;
231
- typeof p == "function" && (p = e.slidesOffsetBefore.call(s));
232
- let m = e.slidesOffsetAfter;
233
- typeof m == "function" && (m = e.slidesOffsetAfter.call(s));
234
- const E = s.snapGrid.length, x = s.slidesGrid.length, v = s.size - p - m;
235
- let g = e.spaceBetween, y = -p, S = 0, I = 0;
236
- if (typeof v == "undefined")
237
- return;
238
- typeof g == "string" && g.indexOf("%") >= 0 ? g = parseFloat(g.replace("%", "")) / 100 * v : typeof g == "string" && (g = parseFloat(g)), s.virtualSize = -g - p - m, d.forEach((b) => {
239
- r ? b.style.marginLeft = "" : b.style.marginRight = "", b.style.marginBottom = "", b.style.marginTop = "";
240
- }), e.centeredSlides && e.cssMode && (W(i, "--swiper-centered-offset-before", ""), W(i, "--swiper-centered-offset-after", "")), e.cssMode && (W(i, "--swiper-slides-offset-before", `${p}px`), W(i, "--swiper-slides-offset-after", `${m}px`));
241
- const M = e.grid && e.grid.rows > 1 && s.grid;
242
- M ? s.grid.initSlides(d) : s.grid && s.grid.unsetSlides();
243
- let T;
244
- const k = e.slidesPerView === "auto" && e.breakpoints && Object.keys(e.breakpoints).filter((b) => typeof e.breakpoints[b].slidesPerView != "undefined").length > 0;
245
- for (let b = 0; b < u; b += 1) {
246
- T = 0;
247
- const w = d[b];
248
- if (!(w && (M && s.grid.updateSlide(b, w, d), N(w, "display") === "none"))) {
249
- if (o && e.slidesPerView === "auto")
250
- e.virtual.slidesPerViewAutoSlideSize && (T = e.virtual.slidesPerViewAutoSlideSize), T && w && (e.roundLengths && (T = Math.floor(T)), w.style[s.getDirectionLabel("width")] = `${T}px`);
251
- else if (e.slidesPerView === "auto") {
252
- k && (w.style[s.getDirectionLabel("width")] = "");
253
- const C = getComputedStyle(w), L = w.style.transform, z = w.style.webkitTransform;
254
- if (L && (w.style.transform = "none"), z && (w.style.webkitTransform = "none"), e.roundLengths)
255
- T = s.isHorizontal() ? oe(w, "width") : oe(w, "height");
256
- else {
257
- const O = t(C, "width"), _ = t(C, "padding-left"), H = t(C, "padding-right"), P = t(C, "margin-left"), A = t(C, "margin-right"), G = C.getPropertyValue("box-sizing");
258
- if (G && G === "border-box")
259
- T = O + P + A;
260
- else {
261
- const {
262
- clientWidth: F,
263
- offsetWidth: be
264
- } = w;
265
- T = O + _ + H + P + A + (be - F);
266
- }
267
- }
268
- L && (w.style.transform = L), z && (w.style.webkitTransform = z), e.roundLengths && (T = Math.floor(T));
269
- } else
270
- T = (v - (e.slidesPerView - 1) * g) / e.slidesPerView, e.roundLengths && (T = Math.floor(T)), w && (w.style[s.getDirectionLabel("width")] = `${T}px`);
271
- w && (w.swiperSlideSize = T), f.push(T), e.centeredSlides ? (y = y + T / 2 + S / 2 + g, S === 0 && b !== 0 && (y = y - v / 2 - g), b === 0 && (y = y - v / 2 - g), Math.abs(y) < 1 / 1e3 && (y = 0), e.roundLengths && (y = Math.floor(y)), I % e.slidesPerGroup === 0 && c.push(y), h.push(y)) : (e.roundLengths && (y = Math.floor(y)), (I - Math.min(s.params.slidesPerGroupSkip, I)) % s.params.slidesPerGroup === 0 && c.push(y), h.push(y), y = y + T + g), s.virtualSize += T + g, S = T, I += 1;
272
- }
273
- }
274
- if (s.virtualSize = Math.max(s.virtualSize, v) + m, r && l && (e.effect === "slide" || e.effect === "coverflow") && (i.style.width = `${s.virtualSize + g}px`), e.setWrapperSize && (i.style[s.getDirectionLabel("width")] = `${s.virtualSize + g}px`), M && s.grid.updateWrapperSize(T, c), !e.centeredSlides) {
275
- const b = e.slidesPerView !== "auto" && e.slidesPerView % 1 !== 0, w = e.snapToSlideEdge && !e.loop && (e.slidesPerView === "auto" || b);
276
- let C = c.length;
277
- if (w) {
278
- let z;
279
- if (e.slidesPerView === "auto") {
280
- z = 1;
281
- let O = 0;
282
- for (let _ = f.length - 1; _ >= 0 && (O += f[_] + (_ < f.length - 1 ? g : 0), O <= v); _ -= 1)
283
- z = f.length - _;
284
- } else
285
- z = Math.floor(e.slidesPerView);
286
- C = Math.max(u - z, 0);
287
- }
288
- const L = [];
289
- for (let z = 0; z < c.length; z += 1) {
290
- let O = c[z];
291
- e.roundLengths && (O = Math.floor(O)), w ? z <= C && L.push(O) : c[z] <= s.virtualSize - v && L.push(O);
292
- }
293
- c = L, Math.floor(s.virtualSize - v) - Math.floor(c[c.length - 1]) > 1 && (w || c.push(s.virtualSize - v));
294
- }
295
- if (o && e.loop) {
296
- const b = f[0] + g;
297
- if (e.slidesPerGroup > 1) {
298
- const w = Math.ceil((s.virtual.slidesBefore + s.virtual.slidesAfter) / e.slidesPerGroup), C = b * e.slidesPerGroup;
299
- for (let L = 0; L < w; L += 1)
300
- c.push(c[c.length - 1] + C);
301
- }
302
- for (let w = 0; w < s.virtual.slidesBefore + s.virtual.slidesAfter; w += 1)
303
- e.slidesPerGroup === 1 && c.push(c[c.length - 1] + b), h.push(h[h.length - 1] + b), s.virtualSize += b;
304
- }
305
- if (c.length === 0 && (c = [0]), g !== 0) {
306
- const b = s.isHorizontal() && r ? "marginLeft" : s.getDirectionLabel("marginRight");
307
- d.filter((w, C) => !e.cssMode || e.loop ? !0 : C !== d.length - 1).forEach((w) => {
308
- w.style[b] = `${g}px`;
309
- });
310
- }
311
- if (e.centeredSlides && e.centeredSlidesBounds) {
312
- let b = 0;
313
- f.forEach((C) => {
314
- b += C + (g || 0);
315
- }), b -= g;
316
- const w = b > v ? b - v : 0;
317
- c = c.map((C) => C <= 0 ? -p : C > w ? w + m : C);
318
- }
319
- if (e.centerInsufficientSlides) {
320
- let b = 0;
321
- if (f.forEach((w) => {
322
- b += w + (g || 0);
323
- }), b -= g, b < v) {
324
- const w = (v - b) / 2;
325
- c.forEach((C, L) => {
326
- c[L] = C - w;
327
- }), h.forEach((C, L) => {
328
- h[L] = C + w;
329
- });
330
- }
331
- }
332
- if (Object.assign(s, {
333
- slides: d,
334
- snapGrid: c,
335
- slidesGrid: h,
336
- slidesSizesGrid: f
337
- }), e.centeredSlides && e.cssMode && !e.centeredSlidesBounds) {
338
- W(i, "--swiper-centered-offset-before", `${-c[0]}px`), W(i, "--swiper-centered-offset-after", `${s.size / 2 - f[f.length - 1] / 2}px`);
339
- const b = -s.snapGrid[0], w = -s.slidesGrid[0];
340
- s.snapGrid = s.snapGrid.map((C) => C + b), s.slidesGrid = s.slidesGrid.map((C) => C + w);
341
- }
342
- if (u !== a && s.emit("slidesLengthChange"), c.length !== E && (s.params.watchOverflow && s.checkOverflow(), s.emit("snapGridLengthChange")), h.length !== x && s.emit("slidesGridLengthChange"), e.watchSlidesProgress && s.updateSlidesOffset(), s.emit("slidesUpdated"), !o && !e.cssMode && (e.effect === "slide" || e.effect === "fade")) {
343
- const b = `${e.containerModifierClass}backface-hidden`, w = s.el.classList.contains(b);
344
- u <= e.maxBackfaceHiddenSlides ? w || s.el.classList.add(b) : w && s.el.classList.remove(b);
345
- }
346
- }
347
- function $e(s) {
348
- const t = this, e = [], i = t.virtual && t.params.virtual.enabled;
349
- let n = 0, r;
350
- typeof s == "number" ? t.setTransition(s) : s === !0 && t.setTransition(t.params.speed);
351
- const l = (o) => i ? t.slides[t.getSlideIndexByData(o)] : t.slides[o];
352
- if (t.params.slidesPerView !== "auto" && t.params.slidesPerView > 1)
353
- if (t.params.centeredSlides)
354
- (t.visibleSlides || []).forEach((o) => {
355
- e.push(o);
356
- });
357
- else
358
- for (r = 0; r < Math.ceil(t.params.slidesPerView); r += 1) {
359
- const o = t.activeIndex + r;
360
- if (o > t.slides.length && !i) break;
361
- e.push(l(o));
362
- }
363
- else
364
- e.push(l(t.activeIndex));
365
- for (r = 0; r < e.length; r += 1)
366
- if (typeof e[r] != "undefined") {
367
- const o = e[r].offsetHeight;
368
- n = o > n ? o : n;
369
- }
370
- (n || n === 0) && (t.wrapperEl.style.height = `${n}px`);
371
- }
372
- function He() {
373
- const s = this, t = s.slides, e = s.isElement ? s.isHorizontal() ? s.wrapperEl.offsetLeft : s.wrapperEl.offsetTop : 0;
374
- for (let i = 0; i < t.length; i += 1)
375
- t[i].swiperSlideOffset = (s.isHorizontal() ? t[i].offsetLeft : t[i].offsetTop) - e - s.cssOverflowAdjustment();
376
- }
377
- const de = (s, t, e) => {
378
- t && !s.classList.contains(e) ? s.classList.add(e) : !t && s.classList.contains(e) && s.classList.remove(e);
379
- };
380
- function Re(s = this && this.translate || 0) {
381
- const t = this, e = t.params, {
382
- slides: i,
383
- rtlTranslate: n,
384
- snapGrid: r
385
- } = t;
386
- if (i.length === 0) return;
387
- typeof i[0].swiperSlideOffset == "undefined" && t.updateSlidesOffset();
388
- let l = -s;
389
- n && (l = s), t.visibleSlidesIndexes = [], t.visibleSlides = [];
390
- let o = e.spaceBetween;
391
- typeof o == "string" && o.indexOf("%") >= 0 ? o = parseFloat(o.replace("%", "")) / 100 * t.size : typeof o == "string" && (o = parseFloat(o));
392
- for (let a = 0; a < i.length; a += 1) {
393
- const d = i[a];
394
- let u = d.swiperSlideOffset;
395
- e.cssMode && e.centeredSlides && (u -= i[0].swiperSlideOffset);
396
- const c = (l + (e.centeredSlides ? t.minTranslate() : 0) - u) / (d.swiperSlideSize + o), h = (l - r[0] + (e.centeredSlides ? t.minTranslate() : 0) - u) / (d.swiperSlideSize + o), f = -(l - u), p = f + t.slidesSizesGrid[a], m = f >= 0 && f <= t.size - t.slidesSizesGrid[a], E = f >= 0 && f < t.size - 1 || p > 1 && p <= t.size || f <= 0 && p >= t.size;
397
- E && (t.visibleSlides.push(d), t.visibleSlidesIndexes.push(a)), de(d, E, e.slideVisibleClass), de(d, m, e.slideFullyVisibleClass), d.progress = n ? -c : c, d.originalProgress = n ? -h : h;
398
- }
399
- }
400
- function We(s) {
401
- const t = this;
402
- if (typeof s == "undefined") {
403
- const u = t.rtlTranslate ? -1 : 1;
404
- s = t && t.translate && t.translate * u || 0;
405
- }
406
- const e = t.params, i = t.maxTranslate() - t.minTranslate();
407
- let {
408
- progress: n,
409
- isBeginning: r,
410
- isEnd: l,
411
- progressLoop: o
412
- } = t;
413
- const a = r, d = l;
414
- if (i === 0)
415
- n = 0, r = !0, l = !0;
416
- else {
417
- n = (s - t.minTranslate()) / i;
418
- const u = Math.abs(s - t.minTranslate()) < 1, c = Math.abs(s - t.maxTranslate()) < 1;
419
- r = u || n <= 0, l = c || n >= 1, u && (n = 0), c && (n = 1);
420
- }
421
- if (e.loop) {
422
- const u = t.getSlideIndexByData(0), c = t.getSlideIndexByData(t.slides.length - 1), h = t.slidesGrid[u], f = t.slidesGrid[c], p = t.slidesGrid[t.slidesGrid.length - 1], m = Math.abs(s);
423
- m >= h ? o = (m - h) / p : o = (m + p - f) / p, o > 1 && (o -= 1);
424
- }
425
- Object.assign(t, {
426
- progress: n,
427
- progressLoop: o,
428
- isBeginning: r,
429
- isEnd: l
430
- }), (e.watchSlidesProgress || e.centeredSlides && e.autoHeight) && t.updateSlidesProgress(s), r && !a && t.emit("reachBeginning toEdge"), l && !d && t.emit("reachEnd toEdge"), (a && !r || d && !l) && t.emit("fromEdge"), t.emit("progress", n);
431
- }
432
- const Z = (s, t, e) => {
433
- t && !s.classList.contains(e) ? s.classList.add(e) : !t && s.classList.contains(e) && s.classList.remove(e);
434
- };
435
- function Ye() {
436
- const s = this, {
437
- slides: t,
438
- params: e,
439
- slidesEl: i,
440
- activeIndex: n
441
- } = s, r = s.virtual && e.virtual.enabled, l = s.grid && e.grid && e.grid.rows > 1, o = (c) => B(i, `.${e.slideClass}${c}, swiper-slide${c}`)[0];
442
- let a, d, u;
443
- if (r)
444
- if (e.loop) {
445
- let c = n - s.virtual.slidesBefore;
446
- c < 0 && (c = s.virtual.slides.length + c), c >= s.virtual.slides.length && (c -= s.virtual.slides.length), a = o(`[data-swiper-slide-index="${c}"]`);
447
- } else
448
- a = o(`[data-swiper-slide-index="${n}"]`);
449
- else
450
- l ? (a = t.find((c) => c.column === n), u = t.find((c) => c.column === n + 1), d = t.find((c) => c.column === n - 1)) : a = t[n];
451
- a && (l || (u = Le(a, `.${e.slideClass}, swiper-slide`)[0], e.loop && !u && (u = t[0]), d = ze(a, `.${e.slideClass}, swiper-slide`)[0], e.loop && !d === 0 && (d = t[t.length - 1]))), t.forEach((c) => {
452
- Z(c, c === a, e.slideActiveClass), Z(c, c === u, e.slideNextClass), Z(c, c === d, e.slidePrevClass);
453
- }), s.emitSlidesClasses();
454
- }
455
- const Y = (s, t) => {
456
- if (!s || s.destroyed || !s.params) return;
457
- const e = () => s.isElement ? "swiper-slide" : `.${s.params.slideClass}`, i = t.closest(e());
458
- if (i) {
459
- let n = i.querySelector(`.${s.params.lazyPreloaderClass}`);
460
- !n && s.isElement && (i.shadowRoot ? n = i.shadowRoot.querySelector(`.${s.params.lazyPreloaderClass}`) : requestAnimationFrame(() => {
461
- i.shadowRoot && (n = i.shadowRoot.querySelector(`.${s.params.lazyPreloaderClass}`), n && !n.lazyPreloaderManaged && n.remove());
462
- })), n && !n.lazyPreloaderManaged && n.remove();
463
- }
464
- }, ee = (s, t) => {
465
- if (!s.slides[t]) return;
466
- const e = s.slides[t].querySelector('[loading="lazy"]');
467
- e && e.removeAttribute("loading");
468
- }, re = (s) => {
469
- if (!s || s.destroyed || !s.params) return;
470
- let t = s.params.lazyPreloadPrevNext;
471
- const e = s.slides.length;
472
- if (!e || !t || t < 0) return;
473
- t = Math.min(t, e);
474
- const i = s.params.slidesPerView === "auto" ? s.slidesPerViewDynamic() : Math.ceil(s.params.slidesPerView), n = s.activeIndex;
475
- if (s.params.grid && s.params.grid.rows > 1) {
476
- const l = n, o = [l - t];
477
- o.push(...Array.from({
478
- length: t
479
- }).map((a, d) => l + i + d)), s.slides.forEach((a, d) => {
480
- o.includes(a.column) && ee(s, d);
481
- });
482
- return;
483
- }
484
- const r = n + i - 1;
485
- if (s.params.rewind || s.params.loop)
486
- for (let l = n - t; l <= r + t; l += 1) {
487
- const o = (l % e + e) % e;
488
- (o < n || o > r) && ee(s, o);
489
- }
490
- else
491
- for (let l = Math.max(n - t, 0); l <= Math.min(r + t, e - 1); l += 1)
492
- l !== n && (l > r || l < n) && ee(s, l);
493
- };
494
- function Xe(s) {
495
- const {
496
- slidesGrid: t,
497
- params: e
498
- } = s, i = s.rtlTranslate ? s.translate : -s.translate;
499
- let n;
500
- for (let r = 0; r < t.length; r += 1)
501
- typeof t[r + 1] != "undefined" ? i >= t[r] && i < t[r + 1] - (t[r + 1] - t[r]) / 2 ? n = r : i >= t[r] && i < t[r + 1] && (n = r + 1) : i >= t[r] && (n = r);
502
- return e.normalizeSlideIndex && (n < 0 || typeof n == "undefined") && (n = 0), n;
503
- }
504
- function je(s) {
505
- const t = this, e = t.rtlTranslate ? t.translate : -t.translate, {
506
- snapGrid: i,
507
- params: n,
508
- activeIndex: r,
509
- realIndex: l,
510
- snapIndex: o
511
- } = t;
512
- let a = s, d;
513
- const u = (f) => {
514
- let p = f - t.virtual.slidesBefore;
515
- return p < 0 && (p = t.virtual.slides.length + p), p >= t.virtual.slides.length && (p -= t.virtual.slides.length), p;
516
- };
517
- if (typeof a == "undefined" && (a = Xe(t)), i.indexOf(e) >= 0)
518
- d = i.indexOf(e);
519
- else {
520
- const f = Math.min(n.slidesPerGroupSkip, a);
521
- d = f + Math.floor((a - f) / n.slidesPerGroup);
522
- }
523
- if (d >= i.length && (d = i.length - 1), a === r && !t.params.loop) {
524
- d !== o && (t.snapIndex = d, t.emit("snapIndexChange"));
525
- return;
526
- }
527
- if (a === r && t.params.loop && t.virtual && t.params.virtual.enabled) {
528
- t.realIndex = u(a);
529
- return;
530
- }
531
- const c = t.grid && n.grid && n.grid.rows > 1;
532
- let h;
533
- if (t.virtual && n.virtual.enabled)
534
- n.loop ? h = u(a) : h = a;
535
- else if (c) {
536
- const f = t.slides.find((m) => m.column === a);
537
- let p = parseInt(f.getAttribute("data-swiper-slide-index"), 10);
538
- Number.isNaN(p) && (p = Math.max(t.slides.indexOf(f), 0)), h = Math.floor(p / n.grid.rows);
539
- } else if (t.slides[a]) {
540
- const f = t.slides[a].getAttribute("data-swiper-slide-index");
541
- f ? h = parseInt(f, 10) : h = a;
542
- } else
543
- h = a;
544
- Object.assign(t, {
545
- previousSnapIndex: o,
546
- snapIndex: d,
547
- previousRealIndex: l,
548
- realIndex: h,
549
- previousIndex: r,
550
- activeIndex: a
551
- }), t.initialized && re(t), t.emit("activeIndexChange"), t.emit("snapIndexChange"), (t.initialized || t.params.runCallbacksOnInit) && (l !== h && t.emit("realIndexChange"), t.emit("slideChange"));
552
- }
553
- function qe(s, t) {
554
- const e = this, i = e.params;
555
- let n = s.closest(`.${i.slideClass}, swiper-slide`);
556
- !n && e.isElement && t && t.length > 1 && t.includes(s) && [...t.slice(t.indexOf(s) + 1, t.length)].forEach((o) => {
557
- !n && o.matches && o.matches(`.${i.slideClass}, swiper-slide`) && (n = o);
558
- });
559
- let r = !1, l;
560
- if (n) {
561
- for (let o = 0; o < e.slides.length; o += 1)
562
- if (e.slides[o] === n) {
563
- r = !0, l = o;
564
- break;
565
- }
566
- }
567
- if (n && r)
568
- e.clickedSlide = n, e.virtual && e.params.virtual.enabled ? e.clickedIndex = parseInt(n.getAttribute("data-swiper-slide-index"), 10) : e.clickedIndex = l;
569
- else {
570
- e.clickedSlide = void 0, e.clickedIndex = void 0;
571
- return;
572
- }
573
- i.slideToClickedSlide && e.clickedIndex !== void 0 && e.clickedIndex !== e.activeIndex && e.slideToClickedSlide();
574
- }
575
- var Ue = {
576
- updateSize: Fe,
577
- updateSlides: Ne,
578
- updateAutoHeight: $e,
579
- updateSlidesOffset: He,
580
- updateSlidesProgress: Re,
581
- updateProgress: We,
582
- updateSlidesClasses: Ye,
583
- updateActiveIndex: je,
584
- updateClickedSlide: qe
585
- };
586
- function Ke(s = this.isHorizontal() ? "x" : "y") {
587
- const t = this, {
588
- params: e,
589
- rtlTranslate: i,
590
- translate: n,
591
- wrapperEl: r
592
- } = t;
593
- if (e.virtualTranslate)
594
- return i ? -n : n;
595
- if (e.cssMode)
596
- return n;
597
- let l = Ie(r, s);
598
- return l += t.cssOverflowAdjustment(), i && (l = -l), l || 0;
599
- }
600
- function Je(s, t) {
601
- const e = this, {
602
- rtlTranslate: i,
603
- params: n,
604
- wrapperEl: r,
605
- progress: l
606
- } = e;
607
- let o = 0, a = 0;
608
- const d = 0;
609
- e.isHorizontal() ? o = i ? -s : s : a = s, n.roundLengths && (o = Math.floor(o), a = Math.floor(a)), e.previousTranslate = e.translate, e.translate = e.isHorizontal() ? o : a, n.cssMode ? r[e.isHorizontal() ? "scrollLeft" : "scrollTop"] = e.isHorizontal() ? -o : -a : n.virtualTranslate || (e.isHorizontal() ? o -= e.cssOverflowAdjustment() : a -= e.cssOverflowAdjustment(), r.style.transform = `translate3d(${o}px, ${a}px, ${d}px)`);
610
- let u;
611
- const c = e.maxTranslate() - e.minTranslate();
612
- c === 0 ? u = 0 : u = (s - e.minTranslate()) / c, u !== l && e.updateProgress(s), e.emit("setTranslate", e.translate, t);
613
- }
614
- function Qe() {
615
- return -this.snapGrid[0];
616
- }
617
- function Ze() {
618
- return -this.snapGrid[this.snapGrid.length - 1];
619
- }
620
- function et(s = 0, t = this.params.speed, e = !0, i = !0, n) {
621
- const r = this, {
622
- params: l,
623
- wrapperEl: o
624
- } = r;
625
- if (r.animating && l.preventInteractionOnTransition)
626
- return !1;
627
- const a = r.minTranslate(), d = r.maxTranslate();
628
- let u;
629
- if (i && s > a ? u = a : i && s < d ? u = d : u = s, r.updateProgress(u), l.cssMode) {
630
- const c = r.isHorizontal();
631
- if (t === 0)
632
- o[c ? "scrollLeft" : "scrollTop"] = -u;
633
- else {
634
- if (!r.support.smoothScroll)
635
- return me({
636
- swiper: r,
637
- targetPosition: -u,
638
- side: c ? "left" : "top"
639
- }), !0;
640
- o.scrollTo({
641
- [c ? "left" : "top"]: -u,
642
- behavior: "smooth"
643
- });
644
- }
645
- return !0;
646
- }
647
- return t === 0 ? (r.setTransition(0), r.setTranslate(u), e && (r.emit("beforeTransitionStart", t, n), r.emit("transitionEnd"))) : (r.setTransition(t), r.setTranslate(u), e && (r.emit("beforeTransitionStart", t, n), r.emit("transitionStart")), r.animating || (r.animating = !0, r.onTranslateToWrapperTransitionEnd || (r.onTranslateToWrapperTransitionEnd = function(h) {
648
- !r || r.destroyed || h.target === this && (r.wrapperEl.removeEventListener("transitionend", r.onTranslateToWrapperTransitionEnd), r.onTranslateToWrapperTransitionEnd = null, delete r.onTranslateToWrapperTransitionEnd, r.animating = !1, e && r.emit("transitionEnd"));
649
- }), r.wrapperEl.addEventListener("transitionend", r.onTranslateToWrapperTransitionEnd))), !0;
650
- }
651
- var tt = {
652
- getTranslate: Ke,
653
- setTranslate: Je,
654
- minTranslate: Qe,
655
- maxTranslate: Ze,
656
- translateTo: et
657
- };
658
- function st(s, t) {
659
- const e = this;
660
- e.params.cssMode || (e.wrapperEl.style.transitionDuration = `${s}ms`, e.wrapperEl.style.transitionDelay = s === 0 ? "0ms" : ""), e.emit("setTransition", s, t);
661
- }
662
- function Se({
663
- swiper: s,
664
- runCallbacks: t,
665
- direction: e,
666
- step: i
667
- }) {
668
- const {
669
- activeIndex: n,
670
- previousIndex: r
671
- } = s;
672
- let l = e;
673
- l || (n > r ? l = "next" : n < r ? l = "prev" : l = "reset"), s.emit(`transition${i}`), t && l === "reset" ? s.emit(`slideResetTransition${i}`) : t && n !== r && (s.emit(`slideChangeTransition${i}`), l === "next" ? s.emit(`slideNextTransition${i}`) : s.emit(`slidePrevTransition${i}`));
674
- }
675
- function it(s = !0, t) {
676
- const e = this, {
677
- params: i
678
- } = e;
679
- i.cssMode || (i.autoHeight && e.updateAutoHeight(), Se({
680
- swiper: e,
681
- runCallbacks: s,
682
- direction: t,
683
- step: "Start"
684
- }));
685
- }
686
- function rt(s = !0, t) {
687
- const e = this, {
688
- params: i
689
- } = e;
690
- e.animating = !1, !i.cssMode && (e.setTransition(0), Se({
691
- swiper: e,
692
- runCallbacks: s,
693
- direction: t,
694
- step: "End"
695
- }));
696
- }
697
- var nt = {
698
- setTransition: st,
699
- transitionStart: it,
700
- transitionEnd: rt
701
- };
702
- function at(s = 0, t, e = !0, i, n) {
703
- typeof s == "string" && (s = parseInt(s, 10));
704
- const r = this;
705
- let l = s;
706
- l < 0 && (l = 0);
707
- const {
708
- params: o,
709
- snapGrid: a,
710
- slidesGrid: d,
711
- previousIndex: u,
712
- activeIndex: c,
713
- rtlTranslate: h,
714
- wrapperEl: f,
715
- enabled: p
716
- } = r;
717
- if (!p && !i && !n || r.destroyed || r.animating && o.preventInteractionOnTransition)
718
- return !1;
719
- typeof t == "undefined" && (t = r.params.speed);
720
- const m = Math.min(r.params.slidesPerGroupSkip, l);
721
- let E = m + Math.floor((l - m) / r.params.slidesPerGroup);
722
- E >= a.length && (E = a.length - 1);
723
- const x = -a[E];
724
- if (o.normalizeSlideIndex)
725
- for (let M = 0; M < d.length; M += 1) {
726
- const T = -Math.floor(x * 100), k = Math.floor(d[M] * 100), b = Math.floor(d[M + 1] * 100);
727
- typeof d[M + 1] != "undefined" ? T >= k && T < b - (b - k) / 2 ? l = M : T >= k && T < b && (l = M + 1) : T >= k && (l = M);
728
- }
729
- if (r.initialized && l !== c && (!r.allowSlideNext && (h ? x > r.translate && x > r.minTranslate() : x < r.translate && x < r.minTranslate()) || !r.allowSlidePrev && x > r.translate && x > r.maxTranslate() && (c || 0) !== l))
730
- return !1;
731
- l !== (u || 0) && e && r.emit("beforeSlideChangeStart"), r.updateProgress(x);
732
- let v;
733
- l > c ? v = "next" : l < c ? v = "prev" : v = "reset";
734
- const g = r.virtual && r.params.virtual.enabled;
735
- if (!(g && n) && (h && -x === r.translate || !h && x === r.translate))
736
- return r.updateActiveIndex(l), o.autoHeight && r.updateAutoHeight(), r.updateSlidesClasses(), o.effect !== "slide" && r.setTranslate(x), v !== "reset" && (r.transitionStart(e, v), r.transitionEnd(e, v)), !1;
737
- if (o.cssMode) {
738
- const M = r.isHorizontal(), T = h ? x : -x;
739
- if (t === 0)
740
- g && (r.wrapperEl.style.scrollSnapType = "none", r._immediateVirtual = !0), g && !r._cssModeVirtualInitialSet && r.params.initialSlide > 0 ? (r._cssModeVirtualInitialSet = !0, requestAnimationFrame(() => {
741
- f[M ? "scrollLeft" : "scrollTop"] = T;
742
- })) : f[M ? "scrollLeft" : "scrollTop"] = T, g && requestAnimationFrame(() => {
743
- r.wrapperEl.style.scrollSnapType = "", r._immediateVirtual = !1;
744
- });
745
- else {
746
- if (!r.support.smoothScroll)
747
- return me({
748
- swiper: r,
749
- targetPosition: T,
750
- side: M ? "left" : "top"
751
- }), !0;
752
- f.scrollTo({
753
- [M ? "left" : "top"]: T,
754
- behavior: "smooth"
755
- });
756
- }
757
- return !0;
758
- }
759
- const I = we().isSafari;
760
- return g && !n && I && r.isElement && r.virtual.update(!1, !1, l), r.setTransition(t), r.setTranslate(x), r.updateActiveIndex(l), r.updateSlidesClasses(), r.emit("beforeTransitionStart", t, i), r.transitionStart(e, v), t === 0 ? r.transitionEnd(e, v) : r.animating || (r.animating = !0, r.onSlideToWrapperTransitionEnd || (r.onSlideToWrapperTransitionEnd = function(T) {
761
- !r || r.destroyed || T.target === this && (r.wrapperEl.removeEventListener("transitionend", r.onSlideToWrapperTransitionEnd), r.onSlideToWrapperTransitionEnd = null, delete r.onSlideToWrapperTransitionEnd, r.transitionEnd(e, v));
762
- }), r.wrapperEl.addEventListener("transitionend", r.onSlideToWrapperTransitionEnd)), !0;
763
- }
764
- function lt(s = 0, t, e = !0, i) {
765
- typeof s == "string" && (s = parseInt(s, 10));
766
- const n = this;
767
- if (n.destroyed) return;
768
- typeof t == "undefined" && (t = n.params.speed);
769
- const r = n.grid && n.params.grid && n.params.grid.rows > 1;
770
- let l = s;
771
- if (n.params.loop)
772
- if (n.virtual && n.params.virtual.enabled)
773
- l = l + n.virtual.slidesBefore;
774
- else {
775
- let o;
776
- if (r) {
777
- const m = l * n.params.grid.rows;
778
- o = n.slides.find((E) => E.getAttribute("data-swiper-slide-index") * 1 === m).column;
779
- } else
780
- o = n.getSlideIndexByData(l);
781
- const a = r ? Math.ceil(n.slides.length / n.params.grid.rows) : n.slides.length, {
782
- centeredSlides: d,
783
- slidesOffsetBefore: u,
784
- slidesOffsetAfter: c
785
- } = n.params, h = d || !!u || !!c;
786
- let f = n.params.slidesPerView;
787
- f === "auto" ? f = n.slidesPerViewDynamic() : (f = Math.ceil(parseFloat(n.params.slidesPerView, 10)), h && f % 2 === 0 && (f = f + 1));
788
- let p = a - o < f;
789
- if (h && (p = p || o < Math.ceil(f / 2)), i && h && n.params.slidesPerView !== "auto" && !r && (p = !1), p) {
790
- const m = h ? o < n.activeIndex ? "prev" : "next" : o - n.activeIndex - 1 < n.params.slidesPerView ? "next" : "prev";
791
- n.loopFix({
792
- direction: m,
793
- slideTo: !0,
794
- activeSlideIndex: m === "next" ? o + 1 : o - a + 1,
795
- slideRealIndex: m === "next" ? n.realIndex : void 0
796
- });
797
- }
798
- if (r) {
799
- const m = l * n.params.grid.rows;
800
- l = n.slides.find((E) => E.getAttribute("data-swiper-slide-index") * 1 === m).column;
801
- } else
802
- l = n.getSlideIndexByData(l);
803
- }
804
- return requestAnimationFrame(() => {
805
- n.slideTo(l, t, e, i);
806
- }), n;
807
- }
808
- function ot(s, t = !0, e) {
809
- const i = this, {
810
- enabled: n,
811
- params: r,
812
- animating: l
813
- } = i;
814
- if (!n || i.destroyed) return i;
815
- typeof s == "undefined" && (s = i.params.speed);
816
- let o = r.slidesPerGroup;
817
- r.slidesPerView === "auto" && r.slidesPerGroup === 1 && r.slidesPerGroupAuto && (o = Math.max(i.slidesPerViewDynamic("current", !0), 1));
818
- const a = i.activeIndex < r.slidesPerGroupSkip ? 1 : o, d = i.virtual && r.virtual.enabled;
819
- if (r.loop) {
820
- if (l && !d && r.loopPreventsSliding) return !1;
821
- if (i.loopFix({
822
- direction: "next"
823
- }), i._clientLeft = i.wrapperEl.clientLeft, i.activeIndex === i.slides.length - 1 && r.cssMode)
824
- return requestAnimationFrame(() => {
825
- i.slideTo(i.activeIndex + a, s, t, e);
826
- }), !0;
827
- }
828
- return r.rewind && i.isEnd ? i.slideTo(0, s, t, e) : i.slideTo(i.activeIndex + a, s, t, e);
829
- }
830
- function dt(s, t = !0, e) {
831
- const i = this, {
832
- params: n,
833
- snapGrid: r,
834
- slidesGrid: l,
835
- rtlTranslate: o,
836
- enabled: a,
837
- animating: d
838
- } = i;
839
- if (!a || i.destroyed) return i;
840
- typeof s == "undefined" && (s = i.params.speed);
841
- const u = i.virtual && n.virtual.enabled;
842
- if (n.loop) {
843
- if (d && !u && n.loopPreventsSliding) return !1;
844
- i.loopFix({
845
- direction: "prev"
846
- }), i._clientLeft = i.wrapperEl.clientLeft;
847
- }
848
- const c = o ? i.translate : -i.translate;
849
- function h(v) {
850
- return v < 0 ? -Math.floor(Math.abs(v)) : Math.floor(v);
851
- }
852
- const f = h(c), p = r.map((v) => h(v)), m = n.freeMode && n.freeMode.enabled;
853
- let E = r[p.indexOf(f) - 1];
854
- if (typeof E == "undefined" && (n.cssMode || m)) {
855
- let v;
856
- r.forEach((g, y) => {
857
- f >= g && (v = y);
858
- }), typeof v != "undefined" && (E = m ? r[v] : r[v > 0 ? v - 1 : v]);
859
- }
860
- let x = 0;
861
- if (typeof E != "undefined" && (x = l.indexOf(E), x < 0 && (x = i.activeIndex - 1), n.slidesPerView === "auto" && n.slidesPerGroup === 1 && n.slidesPerGroupAuto && (x = x - i.slidesPerViewDynamic("previous", !0) + 1, x = Math.max(x, 0))), n.rewind && i.isBeginning) {
862
- const v = i.params.virtual && i.params.virtual.enabled && i.virtual ? i.virtual.slides.length - 1 : i.slides.length - 1;
863
- return i.slideTo(v, s, t, e);
864
- } else if (n.loop && i.activeIndex === 0 && n.cssMode)
865
- return requestAnimationFrame(() => {
866
- i.slideTo(x, s, t, e);
867
- }), !0;
868
- return i.slideTo(x, s, t, e);
869
- }
870
- function ct(s, t = !0, e) {
871
- const i = this;
872
- if (!i.destroyed)
873
- return typeof s == "undefined" && (s = i.params.speed), i.slideTo(i.activeIndex, s, t, e);
874
- }
875
- function ft(s, t = !0, e, i = 0.5) {
876
- const n = this;
877
- if (n.destroyed) return;
878
- typeof s == "undefined" && (s = n.params.speed);
879
- let r = n.activeIndex;
880
- const l = Math.min(n.params.slidesPerGroupSkip, r), o = l + Math.floor((r - l) / n.params.slidesPerGroup), a = n.rtlTranslate ? n.translate : -n.translate;
881
- if (a >= n.snapGrid[o]) {
882
- const d = n.snapGrid[o], u = n.snapGrid[o + 1];
883
- a - d > (u - d) * i && (r += n.params.slidesPerGroup);
884
- } else {
885
- const d = n.snapGrid[o - 1], u = n.snapGrid[o];
886
- a - d <= (u - d) * i && (r -= n.params.slidesPerGroup);
887
- }
888
- return r = Math.max(r, 0), r = Math.min(r, n.slidesGrid.length - 1), n.slideTo(r, s, t, e);
889
- }
890
- function ut() {
891
- const s = this;
892
- if (s.destroyed) return;
893
- const {
894
- params: t,
895
- slidesEl: e
896
- } = s, i = t.slidesPerView === "auto" ? s.slidesPerViewDynamic() : t.slidesPerView;
897
- let n = s.getSlideIndexWhenGrid(s.clickedIndex), r;
898
- const l = s.isElement ? "swiper-slide" : `.${t.slideClass}`, o = s.grid && s.params.grid && s.params.grid.rows > 1;
899
- if (t.loop) {
900
- if (s.animating) return;
901
- r = parseInt(s.clickedSlide.getAttribute("data-swiper-slide-index"), 10), t.centeredSlides ? s.slideToLoop(r) : n > (o ? (s.slides.length - i) / 2 - (s.params.grid.rows - 1) : s.slides.length - i) ? (s.loopFix(), n = s.getSlideIndex(B(e, `${l}[data-swiper-slide-index="${r}"]`)[0]), he(() => {
902
- s.slideTo(n);
903
- })) : s.slideTo(n);
904
- } else
905
- s.slideTo(n);
906
- }
907
- var pt = {
908
- slideTo: at,
909
- slideToLoop: lt,
910
- slideNext: ot,
911
- slidePrev: dt,
912
- slideReset: ct,
913
- slideToClosest: ft,
914
- slideToClickedSlide: ut
915
- };
916
- function ht(s, t) {
917
- const e = this, {
918
- params: i,
919
- slidesEl: n
920
- } = e;
921
- if (!i.loop || e.virtual && e.params.virtual.enabled) return;
922
- const r = () => {
923
- B(n, `.${i.slideClass}, swiper-slide`).forEach((p, m) => {
924
- p.setAttribute("data-swiper-slide-index", m);
925
- });
926
- }, l = () => {
927
- const f = B(n, `.${i.slideBlankClass}`);
928
- f.forEach((p) => {
929
- p.remove();
930
- }), f.length > 0 && (e.recalcSlides(), e.updateSlides());
931
- }, o = e.grid && i.grid && i.grid.rows > 1;
932
- i.loopAddBlankSlides && (i.slidesPerGroup > 1 || o) && l();
933
- const a = i.slidesPerGroup * (o ? i.grid.rows : 1), d = e.slides.length % a !== 0, u = o && e.slides.length % i.grid.rows !== 0, c = (f) => {
934
- for (let p = 0; p < f; p += 1) {
935
- const m = e.isElement ? ie("swiper-slide", [i.slideBlankClass]) : ie("div", [i.slideClass, i.slideBlankClass]);
936
- e.slidesEl.append(m);
937
- }
938
- };
939
- if (d) {
940
- if (i.loopAddBlankSlides) {
941
- const f = a - e.slides.length % a;
942
- c(f), e.recalcSlides(), e.updateSlides();
943
- } else
944
- X("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");
945
- r();
946
- } else if (u) {
947
- if (i.loopAddBlankSlides) {
948
- const f = i.grid.rows - e.slides.length % i.grid.rows;
949
- c(f), e.recalcSlides(), e.updateSlides();
950
- } else
951
- X("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");
952
- r();
953
- } else
954
- r();
955
- const h = i.centeredSlides || !!i.slidesOffsetBefore || !!i.slidesOffsetAfter;
956
- e.loopFix({
957
- slideRealIndex: s,
958
- direction: h ? void 0 : "next",
959
- initial: t
960
- });
961
- }
962
- function mt({
963
- slideRealIndex: s,
964
- slideTo: t = !0,
965
- direction: e,
966
- setTranslate: i,
967
- activeSlideIndex: n,
968
- initial: r,
969
- byController: l,
970
- byMousewheel: o
971
- } = {}) {
972
- const a = this;
973
- if (!a.params.loop) return;
974
- a.emit("beforeLoopFix");
975
- const {
976
- slides: d,
977
- allowSlidePrev: u,
978
- allowSlideNext: c,
979
- slidesEl: h,
980
- params: f
981
- } = a, {
982
- centeredSlides: p,
983
- slidesOffsetBefore: m,
984
- slidesOffsetAfter: E,
985
- initialSlide: x
986
- } = f, v = p || !!m || !!E;
987
- if (a.allowSlidePrev = !0, a.allowSlideNext = !0, a.virtual && f.virtual.enabled) {
988
- t && (!v && a.snapIndex === 0 ? a.slideTo(a.virtual.slides.length, 0, !1, !0) : v && a.snapIndex < f.slidesPerView ? a.slideTo(a.virtual.slides.length + a.snapIndex, 0, !1, !0) : a.snapIndex === a.snapGrid.length - 1 && a.slideTo(a.virtual.slidesBefore, 0, !1, !0)), a.allowSlidePrev = u, a.allowSlideNext = c, a.emit("loopFix");
989
- return;
990
- }
991
- let g = f.slidesPerView;
992
- g === "auto" ? g = a.slidesPerViewDynamic() : (g = Math.ceil(parseFloat(f.slidesPerView, 10)), v && g % 2 === 0 && (g = g + 1));
993
- const y = f.slidesPerGroupAuto ? g : f.slidesPerGroup;
994
- let S = v ? Math.max(y, Math.ceil(g / 2)) : y;
995
- S % y !== 0 && (S += y - S % y), S += f.loopAdditionalSlides, a.loopedSlides = S;
996
- const I = a.grid && f.grid && f.grid.rows > 1;
997
- d.length < g + S || a.params.effect === "cards" && d.length < g + S * 2 ? X("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters") : I && f.grid.fill === "row" && X("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");
998
- const M = [], T = [], k = I ? Math.ceil(d.length / f.grid.rows) : d.length, b = r && k - x < g && !v;
999
- let w = b ? x : a.activeIndex;
1000
- typeof n == "undefined" ? n = a.getSlideIndex(d.find((P) => P.classList.contains(f.slideActiveClass))) : w = n;
1001
- const C = e === "next" || !e, L = e === "prev" || !e;
1002
- let z = 0, O = 0;
1003
- const H = (I ? d[n].column : n) + (v && typeof i == "undefined" ? -g / 2 + 0.5 : 0);
1004
- if (H < S) {
1005
- z = Math.max(S - H, y);
1006
- for (let P = 0; P < S - H; P += 1) {
1007
- const A = P - Math.floor(P / k) * k;
1008
- if (I) {
1009
- const G = k - A - 1;
1010
- for (let F = d.length - 1; F >= 0; F -= 1)
1011
- d[F].column === G && M.push(F);
1012
- } else
1013
- M.push(k - A - 1);
1014
- }
1015
- } else if (H + g > k - S) {
1016
- O = Math.max(H - (k - S * 2), y), b && (O = Math.max(O, g - k + x + 1));
1017
- for (let P = 0; P < O; P += 1) {
1018
- const A = P - Math.floor(P / k) * k;
1019
- I ? d.forEach((G, F) => {
1020
- G.column === A && T.push(F);
1021
- }) : T.push(A);
1022
- }
1023
- }
1024
- if (a.__preventObserver__ = !0, requestAnimationFrame(() => {
1025
- a.__preventObserver__ = !1;
1026
- }), a.params.effect === "cards" && d.length < g + S * 2 && (T.includes(n) && T.splice(T.indexOf(n), 1), M.includes(n) && M.splice(M.indexOf(n), 1)), L && M.forEach((P) => {
1027
- d[P].swiperLoopMoveDOM = !0, h.prepend(d[P]), d[P].swiperLoopMoveDOM = !1;
1028
- }), C && T.forEach((P) => {
1029
- d[P].swiperLoopMoveDOM = !0, h.append(d[P]), d[P].swiperLoopMoveDOM = !1;
1030
- }), a.recalcSlides(), f.slidesPerView === "auto" ? a.updateSlides() : I && (M.length > 0 && L || T.length > 0 && C) && a.slides.forEach((P, A) => {
1031
- a.grid.updateSlide(A, P, a.slides);
1032
- }), f.watchSlidesProgress && a.updateSlidesOffset(), t) {
1033
- if (M.length > 0 && L) {
1034
- if (typeof s == "undefined") {
1035
- const P = a.slidesGrid[w], G = a.slidesGrid[w + z] - P;
1036
- o ? a.setTranslate(a.translate - G) : (a.slideTo(w + Math.ceil(z), 0, !1, !0), i && (a.touchEventsData.startTranslate = a.touchEventsData.startTranslate - G, a.touchEventsData.currentTranslate = a.touchEventsData.currentTranslate - G));
1037
- } else if (i) {
1038
- const P = I ? M.length / f.grid.rows : M.length;
1039
- a.slideTo(a.activeIndex + P, 0, !1, !0), a.touchEventsData.currentTranslate = a.translate;
1040
- }
1041
- } else if (T.length > 0 && C)
1042
- if (typeof s == "undefined") {
1043
- const P = a.slidesGrid[w], G = a.slidesGrid[w - O] - P;
1044
- o ? a.setTranslate(a.translate - G) : (a.slideTo(w - O, 0, !1, !0), i && (a.touchEventsData.startTranslate = a.touchEventsData.startTranslate - G, a.touchEventsData.currentTranslate = a.touchEventsData.currentTranslate - G));
1045
- } else {
1046
- const P = I ? T.length / f.grid.rows : T.length;
1047
- a.slideTo(a.activeIndex - P, 0, !1, !0);
1048
- }
1049
- }
1050
- if (a.allowSlidePrev = u, a.allowSlideNext = c, a.controller && a.controller.control && !l) {
1051
- const P = {
1052
- slideRealIndex: s,
1053
- direction: e,
1054
- setTranslate: i,
1055
- activeSlideIndex: n,
1056
- byController: !0
1057
- };
1058
- Array.isArray(a.controller.control) ? a.controller.control.forEach((A) => {
1059
- !A.destroyed && A.params.loop && A.loopFix(U(q({}, P), {
1060
- slideTo: A.params.slidesPerView === f.slidesPerView ? t : !1
1061
- }));
1062
- }) : a.controller.control instanceof a.constructor && a.controller.control.params.loop && a.controller.control.loopFix(U(q({}, P), {
1063
- slideTo: a.controller.control.params.slidesPerView === f.slidesPerView ? t : !1
1064
- }));
1065
- }
1066
- a.emit("loopFix");
1067
- }
1068
- function gt() {
1069
- const s = this, {
1070
- params: t,
1071
- slidesEl: e
1072
- } = s;
1073
- if (!t.loop || !e || s.virtual && s.params.virtual.enabled) return;
1074
- s.recalcSlides();
1075
- const i = [];
1076
- s.slides.forEach((n) => {
1077
- const r = typeof n.swiperSlideIndex == "undefined" ? n.getAttribute("data-swiper-slide-index") * 1 : n.swiperSlideIndex;
1078
- i[r] = n;
1079
- }), s.slides.forEach((n) => {
1080
- n.removeAttribute("data-swiper-slide-index");
1081
- }), i.forEach((n) => {
1082
- e.append(n);
1083
- }), s.recalcSlides(), s.slideTo(s.realIndex, 0);
1084
- }
1085
- var vt = {
1086
- loopCreate: ht,
1087
- loopFix: mt,
1088
- loopDestroy: gt
1089
- };
1090
- function wt(s) {
1091
- const t = this;
1092
- if (!t.params.simulateTouch || t.params.watchOverflow && t.isLocked || t.params.cssMode) return;
1093
- const e = t.params.touchEventsTarget === "container" ? t.el : t.wrapperEl;
1094
- t.isElement && (t.__preventObserver__ = !0), e.style.cursor = "move", e.style.cursor = s ? "grabbing" : "grab", t.isElement && requestAnimationFrame(() => {
1095
- t.__preventObserver__ = !1;
1096
- });
1097
- }
1098
- function St() {
1099
- const s = this;
1100
- s.params.watchOverflow && s.isLocked || s.params.cssMode || (s.isElement && (s.__preventObserver__ = !0), s[s.params.touchEventsTarget === "container" ? "el" : "wrapperEl"].style.cursor = "", s.isElement && requestAnimationFrame(() => {
1101
- s.__preventObserver__ = !1;
1102
- }));
1103
- }
1104
- var Tt = {
1105
- setGrabCursor: wt,
1106
- unsetGrabCursor: St
1107
- };
1108
- function bt(s, t = this) {
1109
- function e(i) {
1110
- if (!i || i === R() || i === $()) return null;
1111
- i.assignedSlot && (i = i.assignedSlot);
1112
- const n = i.closest(s);
1113
- return !n && !i.getRootNode ? null : n || e(i.getRootNode().host);
1114
- }
1115
- return e(t);
1116
- }
1117
- function ce(s, t, e) {
1118
- const i = $(), {
1119
- params: n
1120
- } = s, r = n.edgeSwipeDetection, l = n.edgeSwipeThreshold;
1121
- return r && (e <= l || e >= i.innerWidth - l) ? r === "prevent" ? (t.preventDefault(), !0) : !1 : !0;
1122
- }
1123
- function xt(s) {
1124
- const t = this, e = R();
1125
- let i = s;
1126
- i.originalEvent && (i = i.originalEvent);
1127
- const n = t.touchEventsData;
1128
- if (i.type === "pointerdown") {
1129
- if (n.pointerId !== null && n.pointerId !== i.pointerId)
1130
- return;
1131
- n.pointerId = i.pointerId;
1132
- } else i.type === "touchstart" && i.targetTouches.length === 1 && (n.touchId = i.targetTouches[0].identifier);
1133
- if (i.type === "touchstart") {
1134
- ce(t, i, i.targetTouches[0].pageX);
1135
- return;
1136
- }
1137
- const {
1138
- params: r,
1139
- touches: l,
1140
- enabled: o
1141
- } = t;
1142
- if (!o || !r.simulateTouch && i.pointerType === "mouse" || t.animating && r.preventInteractionOnTransition)
1143
- return;
1144
- !t.animating && r.cssMode && r.loop && t.loopFix();
1145
- let a = i.target;
1146
- if (r.touchEventsTarget === "wrapper" && !ke(a, t.wrapperEl) || "which" in i && i.which === 3 || "button" in i && i.button > 0 || n.isTouched && n.isMoved) return;
1147
- const d = !!r.noSwipingClass && r.noSwipingClass !== "", u = i.composedPath ? i.composedPath() : i.path;
1148
- d && i.target && i.target.shadowRoot && u && (a = u[0]);
1149
- const c = r.noSwipingSelector ? r.noSwipingSelector : `.${r.noSwipingClass}`, h = !!(i.target && i.target.shadowRoot);
1150
- if (r.noSwiping && (h ? bt(c, a) : a.closest(c))) {
1151
- t.allowClick = !0;
1152
- return;
1153
- }
1154
- if (r.swipeHandler && !a.closest(r.swipeHandler))
1155
- return;
1156
- l.currentX = i.pageX, l.currentY = i.pageY;
1157
- const f = l.currentX, p = l.currentY;
1158
- if (!ce(t, i, f))
1159
- return;
1160
- Object.assign(n, {
1161
- isTouched: !0,
1162
- isMoved: !1,
1163
- allowTouchCallbacks: !0,
1164
- isScrolling: void 0,
1165
- startMoving: void 0
1166
- }), l.startX = f, l.startY = p, n.touchStartTime = j(), t.allowClick = !0, t.updateSize(), t.swipeDirection = void 0, r.threshold > 0 && (n.allowThresholdMove = !1);
1167
- let m = !0;
1168
- a.matches(n.focusableElements) && (m = !1, a.nodeName === "SELECT" && (n.isTouched = !1)), e.activeElement && e.activeElement.matches(n.focusableElements) && e.activeElement !== a && (i.pointerType === "mouse" || i.pointerType !== "mouse" && !a.matches(n.focusableElements)) && e.activeElement.blur();
1169
- const E = m && t.allowTouchMove && r.touchStartPreventDefault;
1170
- (r.touchStartForcePreventDefault || E) && !a.isContentEditable && i.preventDefault(), r.freeMode && r.freeMode.enabled && t.freeMode && t.animating && !r.cssMode && t.freeMode.onTouchStart(), t.emit("touchStart", i);
1171
- }
1172
- function yt(s) {
1173
- const t = R(), e = this, i = e.touchEventsData, {
1174
- params: n,
1175
- touches: r,
1176
- rtlTranslate: l,
1177
- enabled: o
1178
- } = e;
1179
- if (!o || !n.simulateTouch && s.pointerType === "mouse") return;
1180
- let a = s;
1181
- if (a.originalEvent && (a = a.originalEvent), a.type === "pointermove" && (i.touchId !== null || a.pointerId !== i.pointerId))
1182
- return;
1183
- let d;
1184
- if (a.type === "touchmove") {
1185
- if (d = [...a.changedTouches].find((S) => S.identifier === i.touchId), !d || d.identifier !== i.touchId) return;
1186
- } else
1187
- d = a;
1188
- if (!i.isTouched) {
1189
- i.startMoving && i.isScrolling && e.emit("touchMoveOpposite", a);
1190
- return;
1191
- }
1192
- const u = d.pageX, c = d.pageY;
1193
- if (a.preventedByNestedSwiper) {
1194
- r.startX = u, r.startY = c;
1195
- return;
1196
- }
1197
- if (!e.allowTouchMove) {
1198
- a.target.matches(i.focusableElements) || (e.allowClick = !1), i.isTouched && (Object.assign(r, {
1199
- startX: u,
1200
- startY: c,
1201
- currentX: u,
1202
- currentY: c
1203
- }), i.touchStartTime = j());
1204
- return;
1205
- }
1206
- if (n.touchReleaseOnEdges && !n.loop)
1207
- if (e.isVertical()) {
1208
- if (c < r.startY && e.translate <= e.maxTranslate() || c > r.startY && e.translate >= e.minTranslate()) {
1209
- i.isTouched = !1, i.isMoved = !1;
1210
- return;
1211
- }
1212
- } else {
1213
- if (l && (u > r.startX && -e.translate <= e.maxTranslate() || u < r.startX && -e.translate >= e.minTranslate()))
1214
- return;
1215
- if (!l && (u < r.startX && e.translate <= e.maxTranslate() || u > r.startX && e.translate >= e.minTranslate()))
1216
- return;
1217
- }
1218
- if (t.activeElement && t.activeElement.matches(i.focusableElements) && t.activeElement !== a.target && a.pointerType !== "mouse" && t.activeElement.blur(), t.activeElement && a.target === t.activeElement && a.target.matches(i.focusableElements)) {
1219
- i.isMoved = !0, e.allowClick = !1;
1220
- return;
1221
- }
1222
- i.allowTouchCallbacks && e.emit("touchMove", a), r.previousX = r.currentX, r.previousY = r.currentY, r.currentX = u, r.currentY = c;
1223
- const h = r.currentX - r.startX, f = r.currentY - r.startY;
1224
- if (e.params.threshold && Math.sqrt(h ** 2 + f ** 2) < e.params.threshold) return;
1225
- if (typeof i.isScrolling == "undefined") {
1226
- let S;
1227
- e.isHorizontal() && r.currentY === r.startY || e.isVertical() && r.currentX === r.startX ? i.isScrolling = !1 : h * h + f * f >= 25 && (S = Math.atan2(Math.abs(f), Math.abs(h)) * 180 / Math.PI, i.isScrolling = e.isHorizontal() ? S > n.touchAngle : 90 - S > n.touchAngle);
1228
- }
1229
- if (i.isScrolling && e.emit("touchMoveOpposite", a), typeof i.startMoving == "undefined" && (r.currentX !== r.startX || r.currentY !== r.startY) && (i.startMoving = !0), i.isScrolling || a.type === "touchmove" && i.preventTouchMoveFromPointerMove) {
1230
- i.isTouched = !1;
1231
- return;
1232
- }
1233
- if (!i.startMoving)
1234
- return;
1235
- e.allowClick = !1, !n.cssMode && a.cancelable && a.preventDefault(), n.touchMoveStopPropagation && !n.nested && a.stopPropagation();
1236
- let p = e.isHorizontal() ? h : f, m = e.isHorizontal() ? r.currentX - r.previousX : r.currentY - r.previousY;
1237
- n.oneWayMovement && (p = Math.abs(p) * (l ? 1 : -1), m = Math.abs(m) * (l ? 1 : -1)), r.diff = p, p *= n.touchRatio, l && (p = -p, m = -m);
1238
- const E = e.touchesDirection;
1239
- e.swipeDirection = p > 0 ? "prev" : "next", e.touchesDirection = m > 0 ? "prev" : "next";
1240
- const x = e.params.loop && !n.cssMode, v = e.touchesDirection === "next" && e.allowSlideNext || e.touchesDirection === "prev" && e.allowSlidePrev;
1241
- if (!i.isMoved) {
1242
- if (x && v && e.loopFix({
1243
- direction: e.swipeDirection
1244
- }), i.startTranslate = e.getTranslate(), e.setTransition(0), e.animating) {
1245
- const S = new window.CustomEvent("transitionend", {
1246
- bubbles: !0,
1247
- cancelable: !0,
1248
- detail: {
1249
- bySwiperTouchMove: !0
1250
- }
1251
- });
1252
- e.wrapperEl.dispatchEvent(S);
1253
- }
1254
- i.allowMomentumBounce = !1, n.grabCursor && (e.allowSlideNext === !0 || e.allowSlidePrev === !0) && e.setGrabCursor(!0), e.emit("sliderFirstMove", a);
1255
- }
1256
- if ((/* @__PURE__ */ new Date()).getTime(), n._loopSwapReset !== !1 && i.isMoved && i.allowThresholdMove && E !== e.touchesDirection && x && v && Math.abs(p) >= 1) {
1257
- Object.assign(r, {
1258
- startX: u,
1259
- startY: c,
1260
- currentX: u,
1261
- currentY: c,
1262
- startTranslate: i.currentTranslate
1263
- }), i.loopSwapReset = !0, i.startTranslate = i.currentTranslate;
1264
- return;
1265
- }
1266
- e.emit("sliderMove", a), i.isMoved = !0, i.currentTranslate = p + i.startTranslate;
1267
- let g = !0, y = n.resistanceRatio;
1268
- if (n.touchReleaseOnEdges && (y = 0), p > 0 ? (x && v && i.allowThresholdMove && i.currentTranslate > (n.centeredSlides ? e.minTranslate() - e.slidesSizesGrid[e.activeIndex + 1] - (n.slidesPerView !== "auto" && e.slides.length - n.slidesPerView >= 2 ? e.slidesSizesGrid[e.activeIndex + 1] + e.params.spaceBetween : 0) - e.params.spaceBetween : e.minTranslate()) && e.loopFix({
1269
- direction: "prev",
1270
- setTranslate: !0,
1271
- activeSlideIndex: 0
1272
- }), i.currentTranslate > e.minTranslate() && (g = !1, n.resistance && (i.currentTranslate = e.minTranslate() - 1 + (-e.minTranslate() + i.startTranslate + p) ** y))) : p < 0 && (x && v && i.allowThresholdMove && i.currentTranslate < (n.centeredSlides ? e.maxTranslate() + e.slidesSizesGrid[e.slidesSizesGrid.length - 1] + e.params.spaceBetween + (n.slidesPerView !== "auto" && e.slides.length - n.slidesPerView >= 2 ? e.slidesSizesGrid[e.slidesSizesGrid.length - 1] + e.params.spaceBetween : 0) : e.maxTranslate()) && e.loopFix({
1273
- direction: "next",
1274
- setTranslate: !0,
1275
- activeSlideIndex: e.slides.length - (n.slidesPerView === "auto" ? e.slidesPerViewDynamic() : Math.ceil(parseFloat(n.slidesPerView, 10)))
1276
- }), i.currentTranslate < e.maxTranslate() && (g = !1, n.resistance && (i.currentTranslate = e.maxTranslate() + 1 - (e.maxTranslate() - i.startTranslate - p) ** y))), g && (a.preventedByNestedSwiper = !0), !e.allowSlideNext && e.swipeDirection === "next" && i.currentTranslate < i.startTranslate && (i.currentTranslate = i.startTranslate), !e.allowSlidePrev && e.swipeDirection === "prev" && i.currentTranslate > i.startTranslate && (i.currentTranslate = i.startTranslate), !e.allowSlidePrev && !e.allowSlideNext && (i.currentTranslate = i.startTranslate), n.threshold > 0)
1277
- if (Math.abs(p) > n.threshold || i.allowThresholdMove) {
1278
- if (!i.allowThresholdMove) {
1279
- i.allowThresholdMove = !0, r.startX = r.currentX, r.startY = r.currentY, i.currentTranslate = i.startTranslate, r.diff = e.isHorizontal() ? r.currentX - r.startX : r.currentY - r.startY;
1280
- return;
1281
- }
1282
- } else {
1283
- i.currentTranslate = i.startTranslate;
1284
- return;
1285
- }
1286
- !n.followFinger || n.cssMode || ((n.freeMode && n.freeMode.enabled && e.freeMode || n.watchSlidesProgress) && (e.updateActiveIndex(), e.updateSlidesClasses()), n.freeMode && n.freeMode.enabled && e.freeMode && e.freeMode.onTouchMove(), e.updateProgress(i.currentTranslate), e.setTranslate(i.currentTranslate));
1287
- }
1288
- function Et(s) {
1289
- const t = this, e = t.touchEventsData;
1290
- let i = s;
1291
- i.originalEvent && (i = i.originalEvent);
1292
- let n;
1293
- if (i.type === "touchend" || i.type === "touchcancel") {
1294
- if (n = [...i.changedTouches].find((S) => S.identifier === e.touchId), !n || n.identifier !== e.touchId) return;
1295
- } else {
1296
- if (e.touchId !== null || i.pointerId !== e.pointerId) return;
1297
- n = i;
1298
- }
1299
- if (["pointercancel", "pointerout", "pointerleave", "contextmenu"].includes(i.type) && !(["pointercancel", "contextmenu"].includes(i.type) && (t.browser.isSafari || t.browser.isWebView)))
1300
- return;
1301
- e.pointerId = null, e.touchId = null;
1302
- const {
1303
- params: l,
1304
- touches: o,
1305
- rtlTranslate: a,
1306
- slidesGrid: d,
1307
- enabled: u
1308
- } = t;
1309
- if (!u || !l.simulateTouch && i.pointerType === "mouse") return;
1310
- if (e.allowTouchCallbacks && t.emit("touchEnd", i), e.allowTouchCallbacks = !1, !e.isTouched) {
1311
- e.isMoved && l.grabCursor && t.setGrabCursor(!1), e.isMoved = !1, e.startMoving = !1;
1312
- return;
1313
- }
1314
- l.grabCursor && e.isMoved && e.isTouched && (t.allowSlideNext === !0 || t.allowSlidePrev === !0) && t.setGrabCursor(!1);
1315
- const c = j(), h = c - e.touchStartTime;
1316
- if (t.allowClick) {
1317
- const S = i.path || i.composedPath && i.composedPath();
1318
- t.updateClickedSlide(S && S[0] || i.target, S), t.emit("tap click", i), h < 300 && c - e.lastClickTime < 300 && t.emit("doubleTap doubleClick", i);
1319
- }
1320
- if (e.lastClickTime = j(), he(() => {
1321
- t.destroyed || (t.allowClick = !0);
1322
- }), !e.isTouched || !e.isMoved || !t.swipeDirection || o.diff === 0 && !e.loopSwapReset || e.currentTranslate === e.startTranslate && !e.loopSwapReset) {
1323
- e.isTouched = !1, e.isMoved = !1, e.startMoving = !1;
1324
- return;
1325
- }
1326
- e.isTouched = !1, e.isMoved = !1, e.startMoving = !1;
1327
- let f;
1328
- if (l.followFinger ? f = a ? t.translate : -t.translate : f = -e.currentTranslate, l.cssMode)
1329
- return;
1330
- if (l.freeMode && l.freeMode.enabled) {
1331
- t.freeMode.onTouchEnd({
1332
- currentPos: f
1333
- });
1334
- return;
1335
- }
1336
- const p = f >= -t.maxTranslate() && !t.params.loop;
1337
- let m = 0, E = t.slidesSizesGrid[0];
1338
- for (let S = 0; S < d.length; S += S < l.slidesPerGroupSkip ? 1 : l.slidesPerGroup) {
1339
- const I = S < l.slidesPerGroupSkip - 1 ? 1 : l.slidesPerGroup;
1340
- typeof d[S + I] != "undefined" ? (p || f >= d[S] && f < d[S + I]) && (m = S, E = d[S + I] - d[S]) : (p || f >= d[S]) && (m = S, E = d[d.length - 1] - d[d.length - 2]);
1341
- }
1342
- let x = null, v = null;
1343
- l.rewind && (t.isBeginning ? v = l.virtual && l.virtual.enabled && t.virtual ? t.virtual.slides.length - 1 : t.slides.length - 1 : t.isEnd && (x = 0));
1344
- const g = (f - d[m]) / E, y = m < l.slidesPerGroupSkip - 1 ? 1 : l.slidesPerGroup;
1345
- if (h > l.longSwipesMs) {
1346
- if (!l.longSwipes) {
1347
- t.slideTo(t.activeIndex);
1348
- return;
1349
- }
1350
- t.swipeDirection === "next" && (g >= l.longSwipesRatio ? t.slideTo(l.rewind && t.isEnd ? x : m + y) : t.slideTo(m)), t.swipeDirection === "prev" && (g > 1 - l.longSwipesRatio ? t.slideTo(m + y) : v !== null && g < 0 && Math.abs(g) > l.longSwipesRatio ? t.slideTo(v) : t.slideTo(m));
1351
- } else {
1352
- if (!l.shortSwipes) {
1353
- t.slideTo(t.activeIndex);
1354
- return;
1355
- }
1356
- t.navigation && (i.target === t.navigation.nextEl || i.target === t.navigation.prevEl) ? i.target === t.navigation.nextEl ? t.slideTo(m + y) : t.slideTo(m) : (t.swipeDirection === "next" && t.slideTo(x !== null ? x : m + y), t.swipeDirection === "prev" && t.slideTo(v !== null ? v : m));
1357
- }
1358
- }
1359
- function fe() {
1360
- const s = this, {
1361
- params: t,
1362
- el: e
1363
- } = s;
1364
- if (e && e.offsetWidth === 0) return;
1365
- t.breakpoints && s.setBreakpoint();
1366
- const {
1367
- allowSlideNext: i,
1368
- allowSlidePrev: n,
1369
- snapGrid: r
1370
- } = s, l = s.virtual && s.params.virtual.enabled;
1371
- s.allowSlideNext = !0, s.allowSlidePrev = !0, s.updateSize(), s.updateSlides(), s.updateSlidesClasses();
1372
- const o = l && t.loop;
1373
- (t.slidesPerView === "auto" || t.slidesPerView > 1) && s.isEnd && !s.isBeginning && !s.params.centeredSlides && !o ? s.slideTo(s.slides.length - 1, 0, !1, !0) : s.params.loop && !l ? s.slideToLoop(s.realIndex, 0, !1, !0) : s.slideTo(s.activeIndex, 0, !1, !0), s.autoplay && s.autoplay.running && s.autoplay.paused && (clearTimeout(s.autoplay.resizeTimeout), s.autoplay.resizeTimeout = setTimeout(() => {
1374
- s.autoplay && s.autoplay.running && s.autoplay.paused && s.autoplay.resume();
1375
- }, 500)), s.allowSlidePrev = n, s.allowSlideNext = i, s.params.watchOverflow && r !== s.snapGrid && s.checkOverflow();
1376
- }
1377
- function Pt(s) {
1378
- const t = this;
1379
- t.enabled && (t.allowClick || (t.params.preventClicks && s.preventDefault(), t.params.preventClicksPropagation && t.animating && (s.stopPropagation(), s.stopImmediatePropagation())));
1380
- }
1381
- function Mt() {
1382
- const s = this, {
1383
- wrapperEl: t,
1384
- rtlTranslate: e,
1385
- enabled: i
1386
- } = s;
1387
- if (!i) return;
1388
- s.previousTranslate = s.translate, s.isHorizontal() ? s.translate = -t.scrollLeft : s.translate = -t.scrollTop, s.translate === 0 && (s.translate = 0), s.updateActiveIndex(), s.updateSlidesClasses();
1389
- let n;
1390
- const r = s.maxTranslate() - s.minTranslate();
1391
- r === 0 ? n = 0 : n = (s.translate - s.minTranslate()) / r, n !== s.progress && s.updateProgress(e ? -s.translate : s.translate), s.emit("setTranslate", s.translate, !1);
1392
- }
1393
- function Ct(s) {
1394
- const t = this;
1395
- Y(t, s.target), !(t.params.cssMode || t.params.slidesPerView !== "auto" && !t.params.autoHeight) && t.update();
1396
- }
1397
- function It() {
1398
- const s = this;
1399
- s.documentTouchHandlerProceeded || (s.documentTouchHandlerProceeded = !0, s.params.touchReleaseOnEdges && (s.el.style.touchAction = "auto"));
1400
- }
1401
- const Te = (s, t) => {
1402
- const e = R(), {
1403
- params: i,
1404
- el: n,
1405
- wrapperEl: r,
1406
- device: l
1407
- } = s, o = !!i.nested, a = t === "on" ? "addEventListener" : "removeEventListener", d = t;
1408
- !n || typeof n == "string" || (e[a]("touchstart", s.onDocumentTouchStart, {
1409
- passive: !1,
1410
- capture: o
1411
- }), n[a]("touchstart", s.onTouchStart, {
1412
- passive: !1
1413
- }), n[a]("pointerdown", s.onTouchStart, {
1414
- passive: !1
1415
- }), e[a]("touchmove", s.onTouchMove, {
1416
- passive: !1,
1417
- capture: o
1418
- }), e[a]("pointermove", s.onTouchMove, {
1419
- passive: !1,
1420
- capture: o
1421
- }), e[a]("touchend", s.onTouchEnd, {
1422
- passive: !0
1423
- }), e[a]("pointerup", s.onTouchEnd, {
1424
- passive: !0
1425
- }), e[a]("pointercancel", s.onTouchEnd, {
1426
- passive: !0
1427
- }), e[a]("touchcancel", s.onTouchEnd, {
1428
- passive: !0
1429
- }), e[a]("pointerout", s.onTouchEnd, {
1430
- passive: !0
1431
- }), e[a]("pointerleave", s.onTouchEnd, {
1432
- passive: !0
1433
- }), e[a]("contextmenu", s.onTouchEnd, {
1434
- passive: !0
1435
- }), (i.preventClicks || i.preventClicksPropagation) && n[a]("click", s.onClick, !0), i.cssMode && r[a]("scroll", s.onScroll), i.updateOnWindowResize ? s[d](l.ios || l.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", fe, !0) : s[d]("observerUpdate", fe, !0), n[a]("load", s.onLoad, {
1436
- capture: !0
1437
- }));
1438
- };
1439
- function Lt() {
1440
- const s = this, {
1441
- params: t
1442
- } = s;
1443
- s.onTouchStart = xt.bind(s), s.onTouchMove = yt.bind(s), s.onTouchEnd = Et.bind(s), s.onDocumentTouchStart = It.bind(s), t.cssMode && (s.onScroll = Mt.bind(s)), s.onClick = Pt.bind(s), s.onLoad = Ct.bind(s), Te(s, "on");
1444
- }
1445
- function zt() {
1446
- Te(this, "off");
1447
- }
1448
- var kt = {
1449
- attachEvents: Lt,
1450
- detachEvents: zt
1451
- };
1452
- const ue = (s, t) => s.grid && t.grid && t.grid.rows > 1;
1453
- function Ot() {
1454
- const s = this, {
1455
- realIndex: t,
1456
- initialized: e,
1457
- params: i,
1458
- el: n
1459
- } = s, r = i.breakpoints;
1460
- if (!r || r && Object.keys(r).length === 0) return;
1461
- const l = R(), o = i.breakpointsBase === "window" || !i.breakpointsBase ? i.breakpointsBase : "container", a = ["window", "container"].includes(i.breakpointsBase) || !i.breakpointsBase ? s.el : l.querySelector(i.breakpointsBase), d = s.getBreakpoint(r, o, a);
1462
- if (!d || s.currentBreakpoint === d) return;
1463
- const c = (d in r ? r[d] : void 0) || s.originalParams, h = ue(s, i), f = ue(s, c), p = s.params.grabCursor, m = c.grabCursor, E = i.enabled;
1464
- h && !f ? (n.classList.remove(`${i.containerModifierClass}grid`, `${i.containerModifierClass}grid-column`), s.emitContainerClasses()) : !h && f && (n.classList.add(`${i.containerModifierClass}grid`), (c.grid.fill && c.grid.fill === "column" || !c.grid.fill && i.grid.fill === "column") && n.classList.add(`${i.containerModifierClass}grid-column`), s.emitContainerClasses()), p && !m ? s.unsetGrabCursor() : !p && m && s.setGrabCursor(), ["navigation", "pagination", "scrollbar"].forEach((I) => {
1465
- if (typeof c[I] == "undefined") return;
1466
- const M = i[I] && i[I].enabled, T = c[I] && c[I].enabled;
1467
- M && !T && s[I].disable(), !M && T && s[I].enable();
1468
- });
1469
- const x = c.direction && c.direction !== i.direction, v = i.loop && (c.slidesPerView !== i.slidesPerView || x), g = i.loop;
1470
- x && e && s.changeDirection(), D(s.params, c);
1471
- const y = s.params.enabled, S = s.params.loop;
1472
- Object.assign(s, {
1473
- allowTouchMove: s.params.allowTouchMove,
1474
- allowSlideNext: s.params.allowSlideNext,
1475
- allowSlidePrev: s.params.allowSlidePrev
1476
- }), E && !y ? s.disable() : !E && y && s.enable(), s.currentBreakpoint = d, s.emit("_beforeBreakpoint", c), e && (v ? (s.loopDestroy(), s.loopCreate(t), s.updateSlides()) : !g && S ? (s.loopCreate(t), s.updateSlides()) : g && !S && s.loopDestroy()), s.emit("breakpoint", c);
1477
- }
1478
- function At(s, t = "window", e) {
1479
- if (!s || t === "container" && !e) return;
1480
- let i = !1;
1481
- const n = $(), r = t === "window" ? n.innerHeight : e.clientHeight, l = Object.keys(s).map((o) => {
1482
- if (typeof o == "string" && o.indexOf("@") === 0) {
1483
- const a = parseFloat(o.substr(1));
1484
- return {
1485
- value: r * a,
1486
- point: o
1487
- };
1488
- }
1489
- return {
1490
- value: o,
1491
- point: o
1492
- };
1493
- });
1494
- l.sort((o, a) => parseInt(o.value, 10) - parseInt(a.value, 10));
1495
- for (let o = 0; o < l.length; o += 1) {
1496
- const {
1497
- point: a,
1498
- value: d
1499
- } = l[o];
1500
- t === "window" ? n.matchMedia(`(min-width: ${d}px)`).matches && (i = a) : d <= e.clientWidth && (i = a);
1501
- }
1502
- return i || "max";
1503
- }
1504
- var Gt = {
1505
- setBreakpoint: Ot,
1506
- getBreakpoint: At
1507
- };
1508
- function Vt(s, t) {
1509
- const e = [];
1510
- return s.forEach((i) => {
1511
- typeof i == "object" ? Object.keys(i).forEach((n) => {
1512
- i[n] && e.push(t + n);
1513
- }) : typeof i == "string" && e.push(t + i);
1514
- }), e;
1515
- }
1516
- function Dt() {
1517
- const s = this, {
1518
- classNames: t,
1519
- params: e,
1520
- rtl: i,
1521
- el: n,
1522
- device: r
1523
- } = s, l = Vt(["initialized", e.direction, {
1524
- "free-mode": s.params.freeMode && e.freeMode.enabled
1525
- }, {
1526
- autoheight: e.autoHeight
1527
- }, {
1528
- rtl: i
1529
- }, {
1530
- grid: e.grid && e.grid.rows > 1
1531
- }, {
1532
- "grid-column": e.grid && e.grid.rows > 1 && e.grid.fill === "column"
1533
- }, {
1534
- android: r.android
1535
- }, {
1536
- ios: r.ios
1537
- }, {
1538
- "css-mode": e.cssMode
1539
- }, {
1540
- centered: e.cssMode && e.centeredSlides
1541
- }, {
1542
- "watch-progress": e.watchSlidesProgress
1543
- }], e.containerModifierClass);
1544
- t.push(...l), n.classList.add(...t), s.emitContainerClasses();
1545
- }
1546
- function Bt() {
1547
- const s = this, {
1548
- el: t,
1549
- classNames: e
1550
- } = s;
1551
- !t || typeof t == "string" || (t.classList.remove(...e), s.emitContainerClasses());
1552
- }
1553
- var _t = {
1554
- addClasses: Dt,
1555
- removeClasses: Bt
1556
- };
1557
- function Ft() {
1558
- const s = this, {
1559
- isLocked: t,
1560
- params: e
1561
- } = s, {
1562
- slidesOffsetBefore: i
1563
- } = e;
1564
- if (i) {
1565
- const n = s.slides.length - 1, r = s.slidesGrid[n] + s.slidesSizesGrid[n] + i * 2;
1566
- s.isLocked = s.size > r;
1567
- } else
1568
- s.isLocked = s.snapGrid.length === 1;
1569
- e.allowSlideNext === !0 && (s.allowSlideNext = !s.isLocked), e.allowSlidePrev === !0 && (s.allowSlidePrev = !s.isLocked), t && t !== s.isLocked && (s.isEnd = !1), t !== s.isLocked && s.emit(s.isLocked ? "lock" : "unlock");
1570
- }
1571
- var Nt = {
1572
- checkOverflow: Ft
1573
- }, pe = {
1574
- init: !0,
1575
- direction: "horizontal",
1576
- oneWayMovement: !1,
1577
- swiperElementNodeName: "SWIPER-CONTAINER",
1578
- touchEventsTarget: "wrapper",
1579
- initialSlide: 0,
1580
- speed: 300,
1581
- cssMode: !1,
1582
- updateOnWindowResize: !0,
1583
- resizeObserver: !0,
1584
- nested: !1,
1585
- createElements: !1,
1586
- eventsPrefix: "swiper",
1587
- enabled: !0,
1588
- focusableElements: "input, select, option, textarea, button, video, label",
1589
- // Overrides
1590
- width: null,
1591
- height: null,
1592
- //
1593
- preventInteractionOnTransition: !1,
1594
- // ssr
1595
- userAgent: null,
1596
- url: null,
1597
- // To support iOS's swipe-to-go-back gesture (when being used in-app).
1598
- edgeSwipeDetection: !1,
1599
- edgeSwipeThreshold: 20,
1600
- // Autoheight
1601
- autoHeight: !1,
1602
- // Set wrapper width
1603
- setWrapperSize: !1,
1604
- // Virtual Translate
1605
- virtualTranslate: !1,
1606
- // Effects
1607
- effect: "slide",
1608
- // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
1609
- // Breakpoints
1610
- breakpoints: void 0,
1611
- breakpointsBase: "window",
1612
- // Slides grid
1613
- spaceBetween: 0,
1614
- slidesPerView: 1,
1615
- slidesPerGroup: 1,
1616
- slidesPerGroupSkip: 0,
1617
- slidesPerGroupAuto: !1,
1618
- centeredSlides: !1,
1619
- centeredSlidesBounds: !1,
1620
- slidesOffsetBefore: 0,
1621
- // in px
1622
- slidesOffsetAfter: 0,
1623
- // in px
1624
- normalizeSlideIndex: !0,
1625
- centerInsufficientSlides: !1,
1626
- snapToSlideEdge: !1,
1627
- // Disable swiper and hide navigation when container not overflow
1628
- watchOverflow: !0,
1629
- // Round length
1630
- roundLengths: !1,
1631
- // Touches
1632
- touchRatio: 1,
1633
- touchAngle: 45,
1634
- simulateTouch: !0,
1635
- shortSwipes: !0,
1636
- longSwipes: !0,
1637
- longSwipesRatio: 0.5,
1638
- longSwipesMs: 300,
1639
- followFinger: !0,
1640
- allowTouchMove: !0,
1641
- threshold: 5,
1642
- touchMoveStopPropagation: !1,
1643
- touchStartPreventDefault: !0,
1644
- touchStartForcePreventDefault: !1,
1645
- touchReleaseOnEdges: !1,
1646
- // Unique Navigation Elements
1647
- uniqueNavElements: !0,
1648
- // Resistance
1649
- resistance: !0,
1650
- resistanceRatio: 0.85,
1651
- // Progress
1652
- watchSlidesProgress: !1,
1653
- // Cursor
1654
- grabCursor: !1,
1655
- // Clicks
1656
- preventClicks: !0,
1657
- preventClicksPropagation: !0,
1658
- slideToClickedSlide: !1,
1659
- // loop
1660
- loop: !1,
1661
- loopAddBlankSlides: !0,
1662
- loopAdditionalSlides: 0,
1663
- loopPreventsSliding: !0,
1664
- // rewind
1665
- rewind: !1,
1666
- // Swiping/no swiping
1667
- allowSlidePrev: !0,
1668
- allowSlideNext: !0,
1669
- swipeHandler: null,
1670
- // '.swipe-handler',
1671
- noSwiping: !0,
1672
- noSwipingClass: "swiper-no-swiping",
1673
- noSwipingSelector: null,
1674
- // Passive Listeners
1675
- passiveListeners: !0,
1676
- maxBackfaceHiddenSlides: 10,
1677
- // NS
1678
- containerModifierClass: "swiper-",
1679
- // NEW
1680
- slideClass: "swiper-slide",
1681
- slideBlankClass: "swiper-slide-blank",
1682
- slideActiveClass: "swiper-slide-active",
1683
- slideVisibleClass: "swiper-slide-visible",
1684
- slideFullyVisibleClass: "swiper-slide-fully-visible",
1685
- slideNextClass: "swiper-slide-next",
1686
- slidePrevClass: "swiper-slide-prev",
1687
- wrapperClass: "swiper-wrapper",
1688
- lazyPreloaderClass: "swiper-lazy-preloader",
1689
- lazyPreloadPrevNext: 0,
1690
- // Callbacks
1691
- runCallbacksOnInit: !0,
1692
- // Internals
1693
- _emitClasses: !1
1694
- };
1695
- function $t(s, t) {
1696
- return function(i = {}) {
1697
- const n = Object.keys(i)[0], r = i[n];
1698
- if (typeof r != "object" || r === null) {
1699
- D(t, i);
1700
- return;
1701
- }
1702
- if (s[n] === !0 && (s[n] = {
1703
- enabled: !0
1704
- }), n === "navigation" && s[n] && s[n].enabled && !s[n].prevEl && !s[n].nextEl && (s[n].auto = !0), ["pagination", "scrollbar"].indexOf(n) >= 0 && s[n] && s[n].enabled && !s[n].el && (s[n].auto = !0), !(n in s && "enabled" in r)) {
1705
- D(t, i);
1706
- return;
1707
- }
1708
- typeof s[n] == "object" && !("enabled" in s[n]) && (s[n].enabled = !0), s[n] || (s[n] = {
1709
- enabled: !1
1710
- }), D(t, i);
1711
- };
1712
- }
1713
- const te = {
1714
- eventsEmitter: _e,
1715
- update: Ue,
1716
- translate: tt,
1717
- transition: nt,
1718
- slide: pt,
1719
- loop: vt,
1720
- grabCursor: Tt,
1721
- events: kt,
1722
- breakpoints: Gt,
1723
- checkOverflow: Nt,
1724
- classes: _t
1725
- }, se = {};
1726
- class V {
1727
- constructor(...t) {
1728
- let e, i;
1729
- t.length === 1 && t[0].constructor && Object.prototype.toString.call(t[0]).slice(8, -1) === "Object" ? i = t[0] : [e, i] = t, i || (i = {}), i = D({}, i), e && !i.el && (i.el = e);
1730
- const n = R();
1731
- if (i.el && typeof i.el == "string" && n.querySelectorAll(i.el).length > 1) {
1732
- const a = [];
1733
- return n.querySelectorAll(i.el).forEach((d) => {
1734
- const u = D({}, i, {
1735
- el: d
1736
- });
1737
- a.push(new V(u));
1738
- }), a;
1739
- }
1740
- const r = this;
1741
- r.__swiper__ = !0, r.support = ge(), r.device = ve({
1742
- userAgent: i.userAgent
1743
- }), r.browser = we(), r.eventsListeners = {}, r.eventsAnyListeners = [], r.modules = [...r.__modules__], i.modules && Array.isArray(i.modules) && i.modules.forEach((a) => {
1744
- typeof a == "function" && r.modules.indexOf(a) < 0 && r.modules.push(a);
1745
- });
1746
- const l = {};
1747
- r.modules.forEach((a) => {
1748
- a({
1749
- params: i,
1750
- swiper: r,
1751
- extendParams: $t(i, l),
1752
- on: r.on.bind(r),
1753
- once: r.once.bind(r),
1754
- off: r.off.bind(r),
1755
- emit: r.emit.bind(r)
1756
- });
1757
- });
1758
- const o = D({}, pe, l);
1759
- return r.params = D({}, o, se, i), r.originalParams = D({}, r.params), r.passedParams = D({}, i), r.params && r.params.on && Object.keys(r.params.on).forEach((a) => {
1760
- r.on(a, r.params.on[a]);
1761
- }), r.params && r.params.onAny && r.onAny(r.params.onAny), Object.assign(r, {
1762
- enabled: r.params.enabled,
1763
- el: e,
1764
- // Classes
1765
- classNames: [],
1766
- // Slides
1767
- slides: [],
1768
- slidesGrid: [],
1769
- snapGrid: [],
1770
- slidesSizesGrid: [],
1771
- // isDirection
1772
- isHorizontal() {
1773
- return r.params.direction === "horizontal";
1774
- },
1775
- isVertical() {
1776
- return r.params.direction === "vertical";
1777
- },
1778
- // Indexes
1779
- activeIndex: 0,
1780
- realIndex: 0,
1781
- //
1782
- isBeginning: !0,
1783
- isEnd: !1,
1784
- // Props
1785
- translate: 0,
1786
- previousTranslate: 0,
1787
- progress: 0,
1788
- velocity: 0,
1789
- animating: !1,
1790
- cssOverflowAdjustment() {
1791
- return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;
1792
- },
1793
- // Locks
1794
- allowSlideNext: r.params.allowSlideNext,
1795
- allowSlidePrev: r.params.allowSlidePrev,
1796
- // Touch Events
1797
- touchEventsData: {
1798
- isTouched: void 0,
1799
- isMoved: void 0,
1800
- allowTouchCallbacks: void 0,
1801
- touchStartTime: void 0,
1802
- isScrolling: void 0,
1803
- currentTranslate: void 0,
1804
- startTranslate: void 0,
1805
- allowThresholdMove: void 0,
1806
- // Form elements to match
1807
- focusableElements: r.params.focusableElements,
1808
- // Last click time
1809
- lastClickTime: 0,
1810
- clickTimeout: void 0,
1811
- // Velocities
1812
- velocities: [],
1813
- allowMomentumBounce: void 0,
1814
- startMoving: void 0,
1815
- pointerId: null,
1816
- touchId: null
1817
- },
1818
- // Clicks
1819
- allowClick: !0,
1820
- // Touches
1821
- allowTouchMove: r.params.allowTouchMove,
1822
- touches: {
1823
- startX: 0,
1824
- startY: 0,
1825
- currentX: 0,
1826
- currentY: 0,
1827
- diff: 0
1828
- },
1829
- // Images
1830
- imagesToLoad: [],
1831
- imagesLoaded: 0
1832
- }), r.emit("_swiper"), r.params.init && r.init(), r;
1833
- }
1834
- getDirectionLabel(t) {
1835
- return this.isHorizontal() ? t : {
1836
- width: "height",
1837
- "margin-top": "margin-left",
1838
- "margin-bottom ": "margin-right",
1839
- "margin-left": "margin-top",
1840
- "margin-right": "margin-bottom",
1841
- "padding-left": "padding-top",
1842
- "padding-right": "padding-bottom",
1843
- marginRight: "marginBottom"
1844
- }[t];
1845
- }
1846
- getSlideIndex(t) {
1847
- const {
1848
- slidesEl: e,
1849
- params: i
1850
- } = this, n = B(e, `.${i.slideClass}, swiper-slide`), r = le(n[0]);
1851
- return le(t) - r;
1852
- }
1853
- getSlideIndexByData(t) {
1854
- return this.getSlideIndex(this.slides.find((e) => e.getAttribute("data-swiper-slide-index") * 1 === t));
1855
- }
1856
- getSlideIndexWhenGrid(t) {
1857
- return this.grid && this.params.grid && this.params.grid.rows > 1 && (this.params.grid.fill === "column" ? t = Math.floor(t / this.params.grid.rows) : this.params.grid.fill === "row" && (t = t % Math.ceil(this.slides.length / this.params.grid.rows))), t;
1858
- }
1859
- recalcSlides() {
1860
- const t = this, {
1861
- slidesEl: e,
1862
- params: i
1863
- } = t;
1864
- t.slides = B(e, `.${i.slideClass}, swiper-slide`);
1865
- }
1866
- enable() {
1867
- const t = this;
1868
- t.enabled || (t.enabled = !0, t.params.grabCursor && t.setGrabCursor(), t.emit("enable"));
1869
- }
1870
- disable() {
1871
- const t = this;
1872
- t.enabled && (t.enabled = !1, t.params.grabCursor && t.unsetGrabCursor(), t.emit("disable"));
1873
- }
1874
- setProgress(t, e) {
1875
- const i = this;
1876
- t = Math.min(Math.max(t, 0), 1);
1877
- const n = i.minTranslate(), l = (i.maxTranslate() - n) * t + n;
1878
- i.translateTo(l, typeof e == "undefined" ? 0 : e), i.updateActiveIndex(), i.updateSlidesClasses();
1879
- }
1880
- emitContainerClasses() {
1881
- const t = this;
1882
- if (!t.params._emitClasses || !t.el) return;
1883
- const e = t.el.className.split(" ").filter((i) => i.indexOf("swiper") === 0 || i.indexOf(t.params.containerModifierClass) === 0);
1884
- t.emit("_containerClasses", e.join(" "));
1885
- }
1886
- getSlideClasses(t) {
1887
- const e = this;
1888
- return e.destroyed ? "" : t.className.split(" ").filter((i) => i.indexOf("swiper-slide") === 0 || i.indexOf(e.params.slideClass) === 0).join(" ");
1889
- }
1890
- emitSlidesClasses() {
1891
- const t = this;
1892
- if (!t.params._emitClasses || !t.el) return;
1893
- const e = [];
1894
- t.slides.forEach((i) => {
1895
- const n = t.getSlideClasses(i);
1896
- e.push({
1897
- slideEl: i,
1898
- classNames: n
1899
- }), t.emit("_slideClass", i, n);
1900
- }), t.emit("_slideClasses", e);
1901
- }
1902
- slidesPerViewDynamic(t = "current", e = !1) {
1903
- const i = this, {
1904
- params: n,
1905
- slides: r,
1906
- slidesGrid: l,
1907
- slidesSizesGrid: o,
1908
- size: a,
1909
- activeIndex: d
1910
- } = i;
1911
- let u = 1;
1912
- if (typeof n.slidesPerView == "number") return n.slidesPerView;
1913
- if (n.centeredSlides) {
1914
- let c = r[d] ? Math.ceil(r[d].swiperSlideSize) : 0, h;
1915
- for (let f = d + 1; f < r.length; f += 1)
1916
- r[f] && !h && (c += Math.ceil(r[f].swiperSlideSize), u += 1, c > a && (h = !0));
1917
- for (let f = d - 1; f >= 0; f -= 1)
1918
- r[f] && !h && (c += r[f].swiperSlideSize, u += 1, c > a && (h = !0));
1919
- } else if (t === "current")
1920
- for (let c = d + 1; c < r.length; c += 1)
1921
- (e ? l[c] + o[c] - l[d] < a : l[c] - l[d] < a) && (u += 1);
1922
- else
1923
- for (let c = d - 1; c >= 0; c -= 1)
1924
- l[d] - l[c] < a && (u += 1);
1925
- return u;
1926
- }
1927
- update() {
1928
- const t = this;
1929
- if (!t || t.destroyed) return;
1930
- const {
1931
- snapGrid: e,
1932
- params: i
1933
- } = t;
1934
- i.breakpoints && t.setBreakpoint(), [...t.el.querySelectorAll('[loading="lazy"]')].forEach((l) => {
1935
- l.complete && Y(t, l);
1936
- }), t.updateSize(), t.updateSlides(), t.updateProgress(), t.updateSlidesClasses();
1937
- function n() {
1938
- const l = t.rtlTranslate ? t.translate * -1 : t.translate, o = Math.min(Math.max(l, t.maxTranslate()), t.minTranslate());
1939
- t.setTranslate(o), t.updateActiveIndex(), t.updateSlidesClasses();
1940
- }
1941
- let r;
1942
- if (i.freeMode && i.freeMode.enabled && !i.cssMode)
1943
- n(), i.autoHeight && t.updateAutoHeight();
1944
- else {
1945
- if ((i.slidesPerView === "auto" || i.slidesPerView > 1) && t.isEnd && !i.centeredSlides) {
1946
- const l = t.virtual && i.virtual.enabled ? t.virtual.slides : t.slides;
1947
- r = t.slideTo(l.length - 1, 0, !1, !0);
1948
- } else
1949
- r = t.slideTo(t.activeIndex, 0, !1, !0);
1950
- r || n();
1951
- }
1952
- i.watchOverflow && e !== t.snapGrid && t.checkOverflow(), t.emit("update");
1953
- }
1954
- changeDirection(t, e = !0) {
1955
- const i = this, n = i.params.direction;
1956
- return t || (t = n === "horizontal" ? "vertical" : "horizontal"), t === n || t !== "horizontal" && t !== "vertical" || (i.el.classList.remove(`${i.params.containerModifierClass}${n}`), i.el.classList.add(`${i.params.containerModifierClass}${t}`), i.emitContainerClasses(), i.params.direction = t, i.slides.forEach((r) => {
1957
- t === "vertical" ? r.style.width = "" : r.style.height = "";
1958
- }), i.emit("changeDirection"), e && i.update()), i;
1959
- }
1960
- changeLanguageDirection(t) {
1961
- const e = this;
1962
- e.rtl && t === "rtl" || !e.rtl && t === "ltr" || (e.rtl = t === "rtl", e.rtlTranslate = e.params.direction === "horizontal" && e.rtl, e.rtl ? (e.el.classList.add(`${e.params.containerModifierClass}rtl`), e.el.dir = "rtl") : (e.el.classList.remove(`${e.params.containerModifierClass}rtl`), e.el.dir = "ltr"), e.update());
1963
- }
1964
- mount(t) {
1965
- const e = this;
1966
- if (e.mounted) return !0;
1967
- let i = t || e.params.el;
1968
- if (typeof i == "string" && (i = document.querySelector(i)), !i)
1969
- return !1;
1970
- i.swiper = e, i.parentNode && i.parentNode.host && i.parentNode.host.nodeName === e.params.swiperElementNodeName.toUpperCase() && (e.isElement = !0);
1971
- const n = () => `.${(e.params.wrapperClass || "").trim().split(" ").join(".")}`;
1972
- let l = i && i.shadowRoot && i.shadowRoot.querySelector ? i.shadowRoot.querySelector(n()) : B(i, n())[0];
1973
- return !l && e.params.createElements && (l = ie("div", e.params.wrapperClass), i.append(l), B(i, `.${e.params.slideClass}`).forEach((o) => {
1974
- l.append(o);
1975
- })), Object.assign(e, {
1976
- el: i,
1977
- wrapperEl: l,
1978
- slidesEl: e.isElement && !i.parentNode.host.slideSlots ? i.parentNode.host : l,
1979
- hostEl: e.isElement ? i.parentNode.host : i,
1980
- mounted: !0,
1981
- // RTL
1982
- rtl: i.dir.toLowerCase() === "rtl" || N(i, "direction") === "rtl",
1983
- rtlTranslate: e.params.direction === "horizontal" && (i.dir.toLowerCase() === "rtl" || N(i, "direction") === "rtl"),
1984
- wrongRTL: N(l, "display") === "-webkit-box"
1985
- }), !0;
1986
- }
1987
- init(t) {
1988
- const e = this;
1989
- if (e.initialized || e.mount(t) === !1) return e;
1990
- e.emit("beforeInit"), e.params.breakpoints && e.setBreakpoint(), e.addClasses(), e.updateSize(), e.updateSlides(), e.params.watchOverflow && e.checkOverflow(), e.params.grabCursor && e.enabled && e.setGrabCursor(), e.params.loop && e.virtual && e.params.virtual.enabled ? e.slideTo(e.params.initialSlide + e.virtual.slidesBefore, 0, e.params.runCallbacksOnInit, !1, !0) : e.slideTo(e.params.initialSlide, 0, e.params.runCallbacksOnInit, !1, !0), e.params.loop && e.loopCreate(void 0, !0), e.attachEvents();
1991
- const n = [...e.el.querySelectorAll('[loading="lazy"]')];
1992
- return e.isElement && n.push(...e.hostEl.querySelectorAll('[loading="lazy"]')), n.forEach((r) => {
1993
- r.complete ? Y(e, r) : r.addEventListener("load", (l) => {
1994
- Y(e, l.target);
1995
- });
1996
- }), re(e), e.initialized = !0, re(e), e.emit("init"), e.emit("afterInit"), e;
1997
- }
1998
- destroy(t = !0, e = !0) {
1999
- const i = this, {
2000
- params: n,
2001
- el: r,
2002
- wrapperEl: l,
2003
- slides: o
2004
- } = i;
2005
- return typeof i.params == "undefined" || i.destroyed || (i.emit("beforeDestroy"), i.initialized = !1, i.detachEvents(), n.loop && i.loopDestroy(), e && (i.removeClasses(), r && typeof r != "string" && r.removeAttribute("style"), l && l.removeAttribute("style"), o && o.length && o.forEach((a) => {
2006
- a.classList.remove(n.slideVisibleClass, n.slideFullyVisibleClass, n.slideActiveClass, n.slideNextClass, n.slidePrevClass), a.removeAttribute("style"), a.removeAttribute("data-swiper-slide-index");
2007
- })), i.emit("destroy"), Object.keys(i.eventsListeners).forEach((a) => {
2008
- i.off(a);
2009
- }), t !== !1 && (i.el && typeof i.el != "string" && (i.el.swiper = null), Ce(i)), i.destroyed = !0), null;
2010
- }
2011
- static extendDefaults(t) {
2012
- D(se, t);
2013
- }
2014
- static get extendedDefaults() {
2015
- return se;
2016
- }
2017
- static get defaults() {
2018
- return pe;
2019
- }
2020
- static installModule(t) {
2021
- V.prototype.__modules__ || (V.prototype.__modules__ = []);
2022
- const e = V.prototype.__modules__;
2023
- typeof t == "function" && e.indexOf(t) < 0 && e.push(t);
2024
- }
2025
- static use(t) {
2026
- return Array.isArray(t) ? (t.forEach((e) => V.installModule(e)), V) : (V.installModule(t), V);
2027
- }
2028
- }
2029
- Object.keys(te).forEach((s) => {
2030
- Object.keys(te[s]).forEach((t) => {
2031
- V.prototype[t] = te[s][t];
2032
- });
2033
- });
2034
- V.use([De, Be]);
2035
- export {
2036
- V as S,
2037
- pe as d
2038
- };