@danielcruzcode/ui-core 0.1.2 → 0.1.4

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