@marimo-team/islands 0.12.1-dev2 → 0.12.1-dev20

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 (92) hide show
  1. package/dist/{ConnectedDataExplorerComponent-BUkHSSQ3.js → ConnectedDataExplorerComponent-DrB42Ltx.js} +8 -8
  2. package/dist/{VegaLite-D2gsHKuf.js → VegaLite-CmJd6vKK.js} +2456 -2455
  3. package/dist/{_baseUniq-CGdEI3Nv.js → _baseUniq-BRD0dagZ.js} +1 -1
  4. package/dist/{any-language-editor-CKyudq2-.js → any-language-editor-BbNUky0-.js} +176 -177
  5. package/dist/architectureDiagram-IEHRJDOE-DhnXVv17.js +4634 -0
  6. package/dist/assets/{save-worker-J2nVA3vw.js → save-worker-CYdkP5Ic.js} +5 -5
  7. package/dist/assets/{worker-6ypxTHEH.js → worker-CH7zxkMA.js} +5 -5
  8. package/dist/assets/{worker-0hM8VAjI.js → worker-DEw2ZetQ.js} +5 -5
  9. package/dist/{blockDiagram-ZHA2E4KO-BlCDChLH.js → blockDiagram-JOT3LUYC-Cv1F9gn3.js} +4 -4
  10. package/dist/{c4Diagram-6F5ED5ID-niLscHfK.js → c4Diagram-VJAJSXHY-BO7WubW0.js} +2 -2
  11. package/dist/{channel-Bt8mGm9q.js → channel-qQb96Yjz.js} +1 -1
  12. package/dist/{chunk-TMUBEWPD-CQLP9BEl.js → chunk-4BMEZGHF-zLZwgbdT.js} +1 -1
  13. package/dist/chunk-A2AXSNBT-DN8sBnBM.js +1372 -0
  14. package/dist/chunk-AEK57VVT-Bv1vDb3w.js +1415 -0
  15. package/dist/{chunk-ASOPGD6M-DCxLLtgf.js → chunk-D6G4REZN-CtZmJ4y9.js} +1 -1
  16. package/dist/{chunk-5HRBRIJM-DjjlC6eW.js → chunk-RZ5BOZE2-CbtrWPou.js} +1 -1
  17. package/dist/{chunk-KFBOBJHC-DPkQurpv.js → chunk-XZIHB7SX-Jf6S52aQ.js} +1 -1
  18. package/dist/classDiagram-GIVACNV2-Dor92o7v.js +16 -0
  19. package/dist/classDiagram-v2-COTLJTTW-Dor92o7v.js +16 -0
  20. package/dist/{clike-BLr83cjT.js → clike-BUuHEmgZ.js} +19 -17
  21. package/dist/{clone-COI_V4qE.js → clone-r8RIzFje.js} +1 -1
  22. package/dist/{dagre-4EVJKHTY-DPsWdzds.js → dagre-OKDRZEBW-DaOAdB42.js} +46 -46
  23. package/dist/{data-editor-D2rMsHxb.js → data-editor-CtRRu7X_.js} +27 -22
  24. package/dist/diagram-SSKATNLV-C3BG8Adv.js +221 -0
  25. package/dist/{diagram-QW4FP2JN-D4dzrYii.js → diagram-VNBRO52H-C2S2DS5g.js} +28 -28
  26. package/dist/{dockerfile-CFG_IPGn.js → dockerfile-DIy8NleC.js} +1 -1
  27. package/dist/erDiagram-Q7BY3M3F-DkSXLaW-.js +841 -0
  28. package/dist/{factor-DJHfQ4a1.js → factor-DDOC7X6P.js} +1 -1
  29. package/dist/flowDiagram-4HSFHLVR-B-y8O-4p.js +1622 -0
  30. package/dist/ganttDiagram-APWFNJXF-D4WSPaIC.js +1681 -0
  31. package/dist/{gitGraphDiagram-NRZ2UAAF-CO9Yfk-1.js → gitGraphDiagram-7IBYFJ6S-Z4kfmi3A.js} +55 -55
  32. package/dist/{graph-j21MX5m5.js → graph-BukPlGkS.js} +3 -3
  33. package/dist/{groovy-CdgvOO23.js → groovy-DZeT_VM-.js} +1 -1
  34. package/dist/{index-_v--1fvH.js → index-BFPFpqz-.js} +1 -1
  35. package/dist/{index-DwhNQhNY.js → index-C1IyiRTQ.js} +1 -1
  36. package/dist/{index-Ec1JnxMr.js → index-CATa3hnq.js} +1 -1
  37. package/dist/{index-D83p58Zi.js → index-CifC8eSy.js} +1 -1
  38. package/dist/{index-CxqVUOhW.js → index-Cjk-oVVJ.js} +1 -1
  39. package/dist/{index-DATq7mzH.js → index-CmTcouUB.js} +1 -1
  40. package/dist/{index-VZAogpU3.js → index-Cu_mRQU1.js} +1 -1
  41. package/dist/{index-CqtUFj8g.js → index-CvR12W2C.js} +1 -1
  42. package/dist/{index-CZoype9l.js → index-CxsdGv7M.js} +1 -1
  43. package/dist/{index-CNYIP8n0.js → index-DdpwC_0t.js} +1 -1
  44. package/dist/{index-C-FP0asF.js → index-Dr4bEEHT.js} +1 -1
  45. package/dist/{index-B8argTgS.js → index-DwXjDBMG.js} +1 -1
  46. package/dist/{index-Cr0IVnKP.js → index-WPnMsIB3.js} +3 -3
  47. package/dist/{index-4YXC3aOd.js → index-_A14t0NJ.js} +1 -1
  48. package/dist/{index-Wlh2yRsy.js → index-oupOMLFn.js} +1 -1
  49. package/dist/{infoDiagram-A4XQUW5V-D6HtVB0K.js → infoDiagram-PH2N3AL5-B0fggNlB.js} +5 -5
  50. package/dist/{journeyDiagram-G5WM74LC-DMj7UaUs.js → journeyDiagram-U35MCT3I-BBcFWHD9.js} +34 -35
  51. package/dist/{kanban-definition-QRCXZQQD-C9sAvwvv.js → kanban-definition-NDS4AKOZ-wbmHuTdJ.js} +26 -25
  52. package/dist/{layout-DnpJ8ssh.js → layout-BUxJzt_e.js} +4 -4
  53. package/dist/{linear-C7S_zUSg.js → linear-CqGFC_cC.js} +1 -1
  54. package/dist/{main-jjvPwD9F.js → main-K6D-5yHL.js} +31084 -30575
  55. package/dist/main.js +1 -1
  56. package/dist/mermaid-Do2RDVev.js +11991 -0
  57. package/dist/{min-DNi_26db.js → min-Cm1S2mX0.js} +2 -2
  58. package/dist/{mindmap-definition-GWI6TPTV-Bbg64FAI.js → mindmap-definition-ALO5MXBD-DbemxsIQ.js} +3 -2
  59. package/dist/{nsis-BtA0qkjU.js → nsis-fePjrhq7.js} +1 -1
  60. package/dist/{pascal-ixanSKUz.js → pascal-De0D6mP7.js} +1 -1
  61. package/dist/{pieDiagram-YF2LJOPJ-Cr3o9epk.js → pieDiagram-IB7DONF6-DIkqNUPu.js} +38 -38
  62. package/dist/{quadrantDiagram-OS5C2QUG-CTdokV-X.js → quadrantDiagram-7GDLP6J5-Bb9xQI4-.js} +2 -2
  63. package/dist/{gitGraph-YCYPL57B-C6vjpJLv.js → radar-MK3ICKWK-BoS--Wsl.js} +3259 -2897
  64. package/dist/{react-plotly-D7fFNQUF.js → react-plotly-DmjslQLK.js} +1 -1
  65. package/dist/requirementDiagram-KVF5MWMF-CcMrkav_.js +851 -0
  66. package/dist/{sankeyDiagram-Y46BX6SQ-CtGs7dt9.js → sankeyDiagram-QLVOVGJD-BpA5SRt8.js} +152 -149
  67. package/dist/sequenceDiagram-X6HHIX6F-CyEfBV_1.js +2281 -0
  68. package/dist/{simple-mode-HGTvdazT.js → simple-mode-B0dvCdAA.js} +15 -14
  69. package/dist/slides-component-DGJQyDfR.js +3782 -0
  70. package/dist/{stateDiagram-MAYHULR4-HCOwrhPJ.js → stateDiagram-DGXRK772-CZF7vnrM.js} +41 -39
  71. package/dist/stateDiagram-v2-YXO3MK2T-B61esXMn.js +16 -0
  72. package/dist/style.css +1 -1
  73. package/dist/{time-Cf454IRV.js → time-BPRHWhkS.js} +2 -2
  74. package/dist/{timeline-definition-U7ZMHBDA-AcXJneLr.js → timeline-definition-BDJGKUSR-w1btbtha.js} +25 -25
  75. package/dist/{vega-component-DN01b8IT.js → vega-component-DlfUHH6O.js} +2 -2
  76. package/dist/{xquery-xQxle02u.js → xquery-BUQdORAS.js} +72 -76
  77. package/dist/{xychartDiagram-6QU3TZC5-B3SwzwIL.js → xychartDiagram-VJFVF3MP-mEkXtR2U.js} +11 -11
  78. package/package.json +25 -23
  79. package/dist/architectureDiagram-UYN6MBPD-C8FCwy4e.js +0 -4595
  80. package/dist/chunk-7U56Z5CX-D1T9hvBU.js +0 -1215
  81. package/dist/chunk-T2TOU4HS-DcM_xxju.js +0 -1303
  82. package/dist/classDiagram-LNE6IOMH-XbDq3sOW.js +0 -14
  83. package/dist/classDiagram-v2-MQ7JQ4JX-XbDq3sOW.js +0 -14
  84. package/dist/erDiagram-6RL3IURR-13ULGiOU.js +0 -938
  85. package/dist/flowDiagram-7ASYPVHJ-CMtLojGE.js +0 -1484
  86. package/dist/ganttDiagram-NTVNEXSI-Crv4rrPG.js +0 -1679
  87. package/dist/mermaid-BwpuxK20.js +0 -12937
  88. package/dist/requirementDiagram-MIRIMTAZ-Bz15K_7J.js +0 -769
  89. package/dist/sequenceDiagram-G6AWOVSC-D0hnYjDZ.js +0 -2274
  90. package/dist/slides-component-DM7nuuqG.js +0 -3776
  91. package/dist/stateDiagram-v2-4JROLMXI-Cj6uqksM.js +0 -14
  92. package/dist/stex-92raWT1r.js +0 -129
@@ -1,3776 +0,0 @@
1
- import { D as R, R as V, W as St, bc as Et, K as Ue, J as he, M as bt } from "./main-jjvPwD9F.js";
2
- function Ke(t) {
3
- return t !== null && typeof t == "object" && "constructor" in t && t.constructor === Object;
4
- }
5
- function Fe(t, e) {
6
- t === void 0 && (t = {}), e === void 0 && (e = {});
7
- const i = ["__proto__", "constructor", "prototype"];
8
- Object.keys(e).filter((s) => i.indexOf(s) < 0).forEach((s) => {
9
- typeof t[s] > "u" ? t[s] = e[s] : Ke(e[s]) && Ke(t[s]) && Object.keys(e[s]).length > 0 && Fe(t[s], e[s]);
10
- });
11
- }
12
- const it = {
13
- body: {},
14
- addEventListener() {
15
- },
16
- removeEventListener() {
17
- },
18
- activeElement: {
19
- blur() {
20
- },
21
- nodeName: ""
22
- },
23
- querySelector() {
24
- return null;
25
- },
26
- querySelectorAll() {
27
- return [];
28
- },
29
- getElementById() {
30
- return null;
31
- },
32
- createEvent() {
33
- return {
34
- initEvent() {
35
- }
36
- };
37
- },
38
- createElement() {
39
- return {
40
- children: [],
41
- childNodes: [],
42
- style: {},
43
- setAttribute() {
44
- },
45
- getElementsByTagName() {
46
- return [];
47
- }
48
- };
49
- },
50
- createElementNS() {
51
- return {};
52
- },
53
- importNode() {
54
- return null;
55
- },
56
- location: {
57
- hash: "",
58
- host: "",
59
- hostname: "",
60
- href: "",
61
- origin: "",
62
- pathname: "",
63
- protocol: "",
64
- search: ""
65
- }
66
- };
67
- function K() {
68
- const t = typeof document < "u" ? document : {};
69
- return Fe(t, it), t;
70
- }
71
- const xt = {
72
- document: it,
73
- navigator: {
74
- userAgent: ""
75
- },
76
- location: {
77
- hash: "",
78
- host: "",
79
- hostname: "",
80
- href: "",
81
- origin: "",
82
- pathname: "",
83
- protocol: "",
84
- search: ""
85
- },
86
- history: {
87
- replaceState() {
88
- },
89
- pushState() {
90
- },
91
- go() {
92
- },
93
- back() {
94
- }
95
- },
96
- CustomEvent: function() {
97
- return this;
98
- },
99
- addEventListener() {
100
- },
101
- removeEventListener() {
102
- },
103
- getComputedStyle() {
104
- return {
105
- getPropertyValue() {
106
- return "";
107
- }
108
- };
109
- },
110
- Image() {
111
- },
112
- Date() {
113
- },
114
- screen: {},
115
- setTimeout() {
116
- },
117
- clearTimeout() {
118
- },
119
- matchMedia() {
120
- return {};
121
- },
122
- requestAnimationFrame(t) {
123
- return typeof setTimeout > "u" ? (t(), null) : setTimeout(t, 0);
124
- },
125
- cancelAnimationFrame(t) {
126
- typeof setTimeout > "u" || clearTimeout(t);
127
- }
128
- };
129
- function X() {
130
- const t = typeof window < "u" ? window : {};
131
- return Fe(t, xt), t;
132
- }
133
- function yt(t) {
134
- return t === void 0 && (t = ""), t.trim().split(" ").filter((e) => !!e.trim());
135
- }
136
- function Tt(t) {
137
- const e = t;
138
- Object.keys(e).forEach((i) => {
139
- try {
140
- e[i] = null;
141
- } catch {
142
- }
143
- try {
144
- delete e[i];
145
- } catch {
146
- }
147
- });
148
- }
149
- function Ye(t, e) {
150
- return e === void 0 && (e = 0), setTimeout(t, e);
151
- }
152
- function Ce() {
153
- return Date.now();
154
- }
155
- function Ct(t) {
156
- const e = X();
157
- let i;
158
- return e.getComputedStyle && (i = e.getComputedStyle(t, null)), !i && t.currentStyle && (i = t.currentStyle), i || (i = t.style), i;
159
- }
160
- function We(t, e) {
161
- e === void 0 && (e = "x");
162
- const i = X();
163
- let s, r, n;
164
- const c = Ct(t);
165
- return i.WebKitCSSMatrix ? (r = c.transform || c.webkitTransform, r.split(",").length > 6 && (r = r.split(", ").map((d) => d.replace(",", ".")).join(", ")), n = new i.WebKitCSSMatrix(r === "none" ? "" : r)) : (n = c.MozTransform || c.OTransform || c.MsTransform || c.msTransform || c.transform || c.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"), s = n.toString().split(",")), e === "x" && (i.WebKitCSSMatrix ? r = n.m41 : s.length === 16 ? r = parseFloat(s[12]) : r = parseFloat(s[4])), e === "y" && (i.WebKitCSSMatrix ? r = n.m42 : s.length === 16 ? r = parseFloat(s[13]) : r = parseFloat(s[5])), r || 0;
166
- }
167
- function ye(t) {
168
- return typeof t == "object" && t !== null && t.constructor && Object.prototype.toString.call(t).slice(8, -1) === "Object";
169
- }
170
- function Mt(t) {
171
- return typeof window < "u" && typeof window.HTMLElement < "u" ? t instanceof HTMLElement : t && (t.nodeType === 1 || t.nodeType === 11);
172
- }
173
- function j() {
174
- const t = Object(arguments.length <= 0 ? void 0 : arguments[0]), e = ["__proto__", "constructor", "prototype"];
175
- for (let i = 1; i < arguments.length; i += 1) {
176
- const s = i < 0 || arguments.length <= i ? void 0 : arguments[i];
177
- if (s != null && !Mt(s)) {
178
- const r = Object.keys(Object(s)).filter((n) => e.indexOf(n) < 0);
179
- for (let n = 0, c = r.length; n < c; n += 1) {
180
- const d = r[n], a = Object.getOwnPropertyDescriptor(s, d);
181
- a !== void 0 && a.enumerable && (ye(t[d]) && ye(s[d]) ? s[d].__swiper__ ? t[d] = s[d] : j(t[d], s[d]) : !ye(t[d]) && ye(s[d]) ? (t[d] = {}, s[d].__swiper__ ? t[d] = s[d] : j(t[d], s[d])) : t[d] = s[d]);
182
- }
183
- }
184
- }
185
- return t;
186
- }
187
- function ve(t, e, i) {
188
- t.style.setProperty(e, i);
189
- }
190
- function st(t) {
191
- let {
192
- swiper: e,
193
- targetPosition: i,
194
- side: s
195
- } = t;
196
- const r = X(), n = -e.translate;
197
- let c = null, d;
198
- const a = e.params.speed;
199
- e.wrapperEl.style.scrollSnapType = "none", r.cancelAnimationFrame(e.cssModeFrameID);
200
- const m = i > n ? "next" : "prev", u = (w, g) => m === "next" && w >= g || m === "prev" && w <= g, p = () => {
201
- d = (/* @__PURE__ */ new Date()).getTime(), c === null && (c = d);
202
- const w = Math.max(Math.min((d - c) / a, 1), 0), g = 0.5 - Math.cos(w * Math.PI) / 2;
203
- let l = n + g * (i - n);
204
- if (u(l, i) && (l = i), e.wrapperEl.scrollTo({
205
- [s]: l
206
- }), u(l, i)) {
207
- e.wrapperEl.style.overflow = "hidden", e.wrapperEl.style.scrollSnapType = "", setTimeout(() => {
208
- e.wrapperEl.style.overflow = "", e.wrapperEl.scrollTo({
209
- [s]: l
210
- });
211
- }), r.cancelAnimationFrame(e.cssModeFrameID);
212
- return;
213
- }
214
- e.cssModeFrameID = r.requestAnimationFrame(p);
215
- };
216
- p();
217
- }
218
- function q(t, e) {
219
- e === void 0 && (e = "");
220
- const i = X(), s = [...t.children];
221
- return i.HTMLSlotElement && t instanceof HTMLSlotElement && s.push(...t.assignedElements()), e ? s.filter((r) => r.matches(e)) : s;
222
- }
223
- function Pt(t, e) {
224
- const i = [e];
225
- for (; i.length > 0; ) {
226
- const s = i.shift();
227
- if (t === s)
228
- return !0;
229
- i.push(...s.children, ...s.shadowRoot ? s.shadowRoot.children : [], ...s.assignedElements ? s.assignedElements() : []);
230
- }
231
- }
232
- function Lt(t, e) {
233
- const i = X();
234
- let s = e.contains(t);
235
- return !s && i.HTMLSlotElement && e instanceof HTMLSlotElement && (s = [...e.assignedElements()].includes(t), s || (s = Pt(t, e))), s;
236
- }
237
- function Me(t) {
238
- try {
239
- console.warn(t);
240
- return;
241
- } catch {
242
- }
243
- }
244
- function oe(t, e) {
245
- e === void 0 && (e = []);
246
- const i = document.createElement(t);
247
- return i.classList.add(...Array.isArray(e) ? e : yt(e)), i;
248
- }
249
- function Xe(t) {
250
- const e = X(), i = K(), s = t.getBoundingClientRect(), r = i.body, n = t.clientTop || r.clientTop || 0, c = t.clientLeft || r.clientLeft || 0, d = t === e ? e.scrollY : t.scrollTop, a = t === e ? e.scrollX : t.scrollLeft;
251
- return {
252
- top: s.top + d - n,
253
- left: s.left + a - c
254
- };
255
- }
256
- function zt(t, e) {
257
- const i = [];
258
- for (; t.previousElementSibling; ) {
259
- const s = t.previousElementSibling;
260
- e ? s.matches(e) && i.push(s) : i.push(s), t = s;
261
- }
262
- return i;
263
- }
264
- function It(t, e) {
265
- const i = [];
266
- for (; t.nextElementSibling; ) {
267
- const s = t.nextElementSibling;
268
- e ? s.matches(e) && i.push(s) : i.push(s), t = s;
269
- }
270
- return i;
271
- }
272
- function ne(t, e) {
273
- return X().getComputedStyle(t, null).getPropertyValue(e);
274
- }
275
- function Pe(t) {
276
- let e = t, i;
277
- if (e) {
278
- for (i = 0; (e = e.previousSibling) !== null; )
279
- e.nodeType === 1 && (i += 1);
280
- return i;
281
- }
282
- }
283
- function re(t, e) {
284
- const i = [];
285
- let s = t.parentElement;
286
- for (; s; )
287
- e ? s.matches(e) && i.push(s) : i.push(s), s = s.parentElement;
288
- return i;
289
- }
290
- function ke(t, e, i) {
291
- const s = X();
292
- return t[e === "width" ? "offsetWidth" : "offsetHeight"] + parseFloat(s.getComputedStyle(t, null).getPropertyValue(e === "width" ? "margin-right" : "margin-top")) + parseFloat(s.getComputedStyle(t, null).getPropertyValue(e === "width" ? "margin-left" : "margin-bottom"));
293
- }
294
- function W(t) {
295
- return (Array.isArray(t) ? t : [t]).filter((e) => !!e);
296
- }
297
- let De;
298
- function Ot() {
299
- const t = X(), e = K();
300
- return {
301
- smoothScroll: e.documentElement && e.documentElement.style && "scrollBehavior" in e.documentElement.style,
302
- touch: !!("ontouchstart" in t || t.DocumentTouch && e instanceof t.DocumentTouch)
303
- };
304
- }
305
- function nt() {
306
- return De || (De = Ot()), De;
307
- }
308
- let $e;
309
- function At(t) {
310
- let {
311
- userAgent: e
312
- } = t === void 0 ? {} : t;
313
- const i = nt(), s = X(), r = s.navigator.platform, n = e || s.navigator.userAgent, c = {
314
- ios: !1,
315
- android: !1
316
- }, d = s.screen.width, a = s.screen.height, m = n.match(/(Android);?[\s\/]+([\d.]+)?/);
317
- let u = n.match(/(iPad).*OS\s([\d_]+)/);
318
- const p = n.match(/(iPod)(.*OS\s([\d_]+))?/), w = !u && n.match(/(iPhone\sOS|iOS)\s([\d_]+)/), g = r === "Win32";
319
- let l = r === "MacIntel";
320
- const o = ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"];
321
- return !u && l && i.touch && o.indexOf(`${d}x${a}`) >= 0 && (u = n.match(/(Version)\/([\d.]+)/), u || (u = [0, 1, "13_0_0"]), l = !1), m && !g && (c.os = "android", c.android = !0), (u || w || p) && (c.os = "ios", c.ios = !0), c;
322
- }
323
- function rt(t) {
324
- return t === void 0 && (t = {}), $e || ($e = At(t)), $e;
325
- }
326
- let _e;
327
- function Dt() {
328
- const t = X(), e = rt();
329
- let i = !1;
330
- function s() {
331
- const d = t.navigator.userAgent.toLowerCase();
332
- return d.indexOf("safari") >= 0 && d.indexOf("chrome") < 0 && d.indexOf("android") < 0;
333
- }
334
- if (s()) {
335
- const d = String(t.navigator.userAgent);
336
- if (d.includes("Version/")) {
337
- const [a, m] = d.split("Version/")[1].split(" ")[0].split(".").map((u) => Number(u));
338
- i = a < 16 || a === 16 && m < 2;
339
- }
340
- }
341
- const r = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent), n = s(), c = n || r && e.ios;
342
- return {
343
- isSafari: i || n,
344
- needPerspectiveFix: i,
345
- need3dFix: c,
346
- isWebView: r
347
- };
348
- }
349
- function at() {
350
- return _e || (_e = Dt()), _e;
351
- }
352
- function $t(t) {
353
- let {
354
- swiper: e,
355
- on: i,
356
- emit: s
357
- } = t;
358
- const r = X();
359
- let n = null, c = null;
360
- const d = () => {
361
- !e || e.destroyed || !e.initialized || (s("beforeResize"), s("resize"));
362
- }, a = () => {
363
- !e || e.destroyed || !e.initialized || (n = new ResizeObserver((p) => {
364
- c = r.requestAnimationFrame(() => {
365
- const {
366
- width: w,
367
- height: g
368
- } = e;
369
- let l = w, o = g;
370
- p.forEach((S) => {
371
- let {
372
- contentBoxSize: v,
373
- contentRect: f,
374
- target: h
375
- } = S;
376
- h && h !== e.el || (l = f ? f.width : (v[0] || v).inlineSize, o = f ? f.height : (v[0] || v).blockSize);
377
- }), (l !== w || o !== g) && d();
378
- });
379
- }), n.observe(e.el));
380
- }, m = () => {
381
- c && r.cancelAnimationFrame(c), n && n.unobserve && e.el && (n.unobserve(e.el), n = null);
382
- }, u = () => {
383
- !e || e.destroyed || !e.initialized || s("orientationchange");
384
- };
385
- i("init", () => {
386
- if (e.params.resizeObserver && typeof r.ResizeObserver < "u") {
387
- a();
388
- return;
389
- }
390
- r.addEventListener("resize", d), r.addEventListener("orientationchange", u);
391
- }), i("destroy", () => {
392
- m(), r.removeEventListener("resize", d), r.removeEventListener("orientationchange", u);
393
- });
394
- }
395
- function _t(t) {
396
- let {
397
- swiper: e,
398
- extendParams: i,
399
- on: s,
400
- emit: r
401
- } = t;
402
- const n = [], c = X(), d = function(u, p) {
403
- p === void 0 && (p = {});
404
- const w = c.MutationObserver || c.WebkitMutationObserver, g = new w((l) => {
405
- if (e.__preventObserver__) return;
406
- if (l.length === 1) {
407
- r("observerUpdate", l[0]);
408
- return;
409
- }
410
- const o = function() {
411
- r("observerUpdate", l[0]);
412
- };
413
- c.requestAnimationFrame ? c.requestAnimationFrame(o) : c.setTimeout(o, 0);
414
- });
415
- g.observe(u, {
416
- attributes: typeof p.attributes > "u" ? !0 : p.attributes,
417
- childList: e.isElement || (typeof p.childList > "u" ? !0 : p).childList,
418
- characterData: typeof p.characterData > "u" ? !0 : p.characterData
419
- }), n.push(g);
420
- }, a = () => {
421
- if (e.params.observer) {
422
- if (e.params.observeParents) {
423
- const u = re(e.hostEl);
424
- for (let p = 0; p < u.length; p += 1)
425
- d(u[p]);
426
- }
427
- d(e.hostEl, {
428
- childList: e.params.observeSlideChildren
429
- }), d(e.wrapperEl, {
430
- attributes: !1
431
- });
432
- }
433
- }, m = () => {
434
- n.forEach((u) => {
435
- u.disconnect();
436
- }), n.splice(0, n.length);
437
- };
438
- i({
439
- observer: !1,
440
- observeParents: !1,
441
- observeSlideChildren: !1
442
- }), s("init", a), s("destroy", m);
443
- }
444
- var Gt = {
445
- on(t, e, i) {
446
- const s = this;
447
- if (!s.eventsListeners || s.destroyed || typeof e != "function") return s;
448
- const r = i ? "unshift" : "push";
449
- return t.split(" ").forEach((n) => {
450
- s.eventsListeners[n] || (s.eventsListeners[n] = []), s.eventsListeners[n][r](e);
451
- }), s;
452
- },
453
- once(t, e, i) {
454
- const s = this;
455
- if (!s.eventsListeners || s.destroyed || typeof e != "function") return s;
456
- function r() {
457
- s.off(t, r), r.__emitterProxy && delete r.__emitterProxy;
458
- for (var n = arguments.length, c = new Array(n), d = 0; d < n; d++)
459
- c[d] = arguments[d];
460
- e.apply(s, c);
461
- }
462
- return r.__emitterProxy = e, s.on(t, r, i);
463
- },
464
- onAny(t, e) {
465
- const i = this;
466
- if (!i.eventsListeners || i.destroyed || typeof t != "function") return i;
467
- const s = e ? "unshift" : "push";
468
- return i.eventsAnyListeners.indexOf(t) < 0 && i.eventsAnyListeners[s](t), i;
469
- },
470
- offAny(t) {
471
- const e = this;
472
- if (!e.eventsListeners || e.destroyed || !e.eventsAnyListeners) return e;
473
- const i = e.eventsAnyListeners.indexOf(t);
474
- return i >= 0 && e.eventsAnyListeners.splice(i, 1), e;
475
- },
476
- off(t, e) {
477
- const i = this;
478
- return !i.eventsListeners || i.destroyed || !i.eventsListeners || t.split(" ").forEach((s) => {
479
- typeof e > "u" ? i.eventsListeners[s] = [] : i.eventsListeners[s] && i.eventsListeners[s].forEach((r, n) => {
480
- (r === e || r.__emitterProxy && r.__emitterProxy === e) && i.eventsListeners[s].splice(n, 1);
481
- });
482
- }), i;
483
- },
484
- emit() {
485
- const t = this;
486
- if (!t.eventsListeners || t.destroyed || !t.eventsListeners) return t;
487
- let e, i, s;
488
- for (var r = arguments.length, n = new Array(r), c = 0; c < r; c++)
489
- n[c] = arguments[c];
490
- return typeof n[0] == "string" || Array.isArray(n[0]) ? (e = n[0], i = n.slice(1, n.length), s = t) : (e = n[0].events, i = n[0].data, s = n[0].context || t), i.unshift(s), (Array.isArray(e) ? e : e.split(" ")).forEach((a) => {
491
- t.eventsAnyListeners && t.eventsAnyListeners.length && t.eventsAnyListeners.forEach((m) => {
492
- m.apply(s, [a, ...i]);
493
- }), t.eventsListeners && t.eventsListeners[a] && t.eventsListeners[a].forEach((m) => {
494
- m.apply(s, i);
495
- });
496
- }), t;
497
- }
498
- };
499
- function Bt() {
500
- const t = this;
501
- let e, i;
502
- const s = t.el;
503
- typeof t.params.width < "u" && t.params.width !== null ? e = t.params.width : e = s.clientWidth, typeof t.params.height < "u" && t.params.height !== null ? i = t.params.height : i = s.clientHeight, !(e === 0 && t.isHorizontal() || i === 0 && t.isVertical()) && (e = e - parseInt(ne(s, "padding-left") || 0, 10) - parseInt(ne(s, "padding-right") || 0, 10), i = i - parseInt(ne(s, "padding-top") || 0, 10) - parseInt(ne(s, "padding-bottom") || 0, 10), Number.isNaN(e) && (e = 0), Number.isNaN(i) && (i = 0), Object.assign(t, {
504
- width: e,
505
- height: i,
506
- size: t.isHorizontal() ? e : i
507
- }));
508
- }
509
- function Rt() {
510
- const t = this;
511
- function e(x, P) {
512
- return parseFloat(x.getPropertyValue(t.getDirectionLabel(P)) || 0);
513
- }
514
- const i = t.params, {
515
- wrapperEl: s,
516
- slidesEl: r,
517
- size: n,
518
- rtlTranslate: c,
519
- wrongRTL: d
520
- } = t, a = t.virtual && i.virtual.enabled, m = a ? t.virtual.slides.length : t.slides.length, u = q(r, `.${t.params.slideClass}, swiper-slide`), p = a ? t.virtual.slides.length : u.length;
521
- let w = [];
522
- const g = [], l = [];
523
- let o = i.slidesOffsetBefore;
524
- typeof o == "function" && (o = i.slidesOffsetBefore.call(t));
525
- let S = i.slidesOffsetAfter;
526
- typeof S == "function" && (S = i.slidesOffsetAfter.call(t));
527
- const v = t.snapGrid.length, f = t.slidesGrid.length;
528
- let h = i.spaceBetween, E = -o, b = 0, I = 0;
529
- if (typeof n > "u")
530
- return;
531
- typeof h == "string" && h.indexOf("%") >= 0 ? h = parseFloat(h.replace("%", "")) / 100 * n : typeof h == "string" && (h = parseFloat(h)), t.virtualSize = -h, u.forEach((x) => {
532
- c ? x.style.marginLeft = "" : x.style.marginRight = "", x.style.marginBottom = "", x.style.marginTop = "";
533
- }), i.centeredSlides && i.cssMode && (ve(s, "--swiper-centered-offset-before", ""), ve(s, "--swiper-centered-offset-after", ""));
534
- const O = i.grid && i.grid.rows > 1 && t.grid;
535
- O ? t.grid.initSlides(u) : t.grid && t.grid.unsetSlides();
536
- let z;
537
- const T = i.slidesPerView === "auto" && i.breakpoints && Object.keys(i.breakpoints).filter((x) => typeof i.breakpoints[x].slidesPerView < "u").length > 0;
538
- for (let x = 0; x < p; x += 1) {
539
- z = 0;
540
- let P;
541
- if (u[x] && (P = u[x]), O && t.grid.updateSlide(x, P, u), !(u[x] && ne(P, "display") === "none")) {
542
- if (i.slidesPerView === "auto") {
543
- T && (u[x].style[t.getDirectionLabel("width")] = "");
544
- const A = getComputedStyle(P), L = P.style.transform, D = P.style.webkitTransform;
545
- if (L && (P.style.transform = "none"), D && (P.style.webkitTransform = "none"), i.roundLengths)
546
- z = t.isHorizontal() ? ke(P, "width") : ke(P, "height");
547
- else {
548
- const $ = e(A, "width"), G = e(A, "padding-left"), Y = e(A, "padding-right"), H = e(A, "margin-left"), B = e(A, "margin-right"), k = A.getPropertyValue("box-sizing");
549
- if (k && k === "border-box")
550
- z = $ + H + B;
551
- else {
552
- const {
553
- clientWidth: U,
554
- offsetWidth: ee
555
- } = P;
556
- z = $ + G + Y + H + B + (ee - U);
557
- }
558
- }
559
- L && (P.style.transform = L), D && (P.style.webkitTransform = D), i.roundLengths && (z = Math.floor(z));
560
- } else
561
- z = (n - (i.slidesPerView - 1) * h) / i.slidesPerView, i.roundLengths && (z = Math.floor(z)), u[x] && (u[x].style[t.getDirectionLabel("width")] = `${z}px`);
562
- u[x] && (u[x].swiperSlideSize = z), l.push(z), i.centeredSlides ? (E = E + z / 2 + b / 2 + h, b === 0 && x !== 0 && (E = E - n / 2 - h), x === 0 && (E = E - n / 2 - h), Math.abs(E) < 1 / 1e3 && (E = 0), i.roundLengths && (E = Math.floor(E)), I % i.slidesPerGroup === 0 && w.push(E), g.push(E)) : (i.roundLengths && (E = Math.floor(E)), (I - Math.min(t.params.slidesPerGroupSkip, I)) % t.params.slidesPerGroup === 0 && w.push(E), g.push(E), E = E + z + h), t.virtualSize += z + h, b = z, I += 1;
563
- }
564
- }
565
- if (t.virtualSize = Math.max(t.virtualSize, n) + S, c && d && (i.effect === "slide" || i.effect === "coverflow") && (s.style.width = `${t.virtualSize + h}px`), i.setWrapperSize && (s.style[t.getDirectionLabel("width")] = `${t.virtualSize + h}px`), O && t.grid.updateWrapperSize(z, w), !i.centeredSlides) {
566
- const x = [];
567
- for (let P = 0; P < w.length; P += 1) {
568
- let A = w[P];
569
- i.roundLengths && (A = Math.floor(A)), w[P] <= t.virtualSize - n && x.push(A);
570
- }
571
- w = x, Math.floor(t.virtualSize - n) - Math.floor(w[w.length - 1]) > 1 && w.push(t.virtualSize - n);
572
- }
573
- if (a && i.loop) {
574
- const x = l[0] + h;
575
- if (i.slidesPerGroup > 1) {
576
- const P = Math.ceil((t.virtual.slidesBefore + t.virtual.slidesAfter) / i.slidesPerGroup), A = x * i.slidesPerGroup;
577
- for (let L = 0; L < P; L += 1)
578
- w.push(w[w.length - 1] + A);
579
- }
580
- for (let P = 0; P < t.virtual.slidesBefore + t.virtual.slidesAfter; P += 1)
581
- i.slidesPerGroup === 1 && w.push(w[w.length - 1] + x), g.push(g[g.length - 1] + x), t.virtualSize += x;
582
- }
583
- if (w.length === 0 && (w = [0]), h !== 0) {
584
- const x = t.isHorizontal() && c ? "marginLeft" : t.getDirectionLabel("marginRight");
585
- u.filter((P, A) => !i.cssMode || i.loop ? !0 : A !== u.length - 1).forEach((P) => {
586
- P.style[x] = `${h}px`;
587
- });
588
- }
589
- if (i.centeredSlides && i.centeredSlidesBounds) {
590
- let x = 0;
591
- l.forEach((A) => {
592
- x += A + (h || 0);
593
- }), x -= h;
594
- const P = x > n ? x - n : 0;
595
- w = w.map((A) => A <= 0 ? -o : A > P ? P + S : A);
596
- }
597
- if (i.centerInsufficientSlides) {
598
- let x = 0;
599
- l.forEach((A) => {
600
- x += A + (h || 0);
601
- }), x -= h;
602
- const P = (i.slidesOffsetBefore || 0) + (i.slidesOffsetAfter || 0);
603
- if (x + P < n) {
604
- const A = (n - x - P) / 2;
605
- w.forEach((L, D) => {
606
- w[D] = L - A;
607
- }), g.forEach((L, D) => {
608
- g[D] = L + A;
609
- });
610
- }
611
- }
612
- if (Object.assign(t, {
613
- slides: u,
614
- snapGrid: w,
615
- slidesGrid: g,
616
- slidesSizesGrid: l
617
- }), i.centeredSlides && i.cssMode && !i.centeredSlidesBounds) {
618
- ve(s, "--swiper-centered-offset-before", `${-w[0]}px`), ve(s, "--swiper-centered-offset-after", `${t.size / 2 - l[l.length - 1] / 2}px`);
619
- const x = -t.snapGrid[0], P = -t.slidesGrid[0];
620
- t.snapGrid = t.snapGrid.map((A) => A + x), t.slidesGrid = t.slidesGrid.map((A) => A + P);
621
- }
622
- if (p !== m && t.emit("slidesLengthChange"), w.length !== v && (t.params.watchOverflow && t.checkOverflow(), t.emit("snapGridLengthChange")), g.length !== f && t.emit("slidesGridLengthChange"), i.watchSlidesProgress && t.updateSlidesOffset(), t.emit("slidesUpdated"), !a && !i.cssMode && (i.effect === "slide" || i.effect === "fade")) {
623
- const x = `${i.containerModifierClass}backface-hidden`, P = t.el.classList.contains(x);
624
- p <= i.maxBackfaceHiddenSlides ? P || t.el.classList.add(x) : P && t.el.classList.remove(x);
625
- }
626
- }
627
- function Vt(t) {
628
- const e = this, i = [], s = e.virtual && e.params.virtual.enabled;
629
- let r = 0, n;
630
- typeof t == "number" ? e.setTransition(t) : t === !0 && e.setTransition(e.params.speed);
631
- const c = (d) => s ? e.slides[e.getSlideIndexByData(d)] : e.slides[d];
632
- if (e.params.slidesPerView !== "auto" && e.params.slidesPerView > 1)
633
- if (e.params.centeredSlides)
634
- (e.visibleSlides || []).forEach((d) => {
635
- i.push(d);
636
- });
637
- else
638
- for (n = 0; n < Math.ceil(e.params.slidesPerView); n += 1) {
639
- const d = e.activeIndex + n;
640
- if (d > e.slides.length && !s) break;
641
- i.push(c(d));
642
- }
643
- else
644
- i.push(c(e.activeIndex));
645
- for (n = 0; n < i.length; n += 1)
646
- if (typeof i[n] < "u") {
647
- const d = i[n].offsetHeight;
648
- r = d > r ? d : r;
649
- }
650
- (r || r === 0) && (e.wrapperEl.style.height = `${r}px`);
651
- }
652
- function Yt() {
653
- const t = this, e = t.slides, i = t.isElement ? t.isHorizontal() ? t.wrapperEl.offsetLeft : t.wrapperEl.offsetTop : 0;
654
- for (let s = 0; s < e.length; s += 1)
655
- e[s].swiperSlideOffset = (t.isHorizontal() ? e[s].offsetLeft : e[s].offsetTop) - i - t.cssOverflowAdjustment();
656
- }
657
- const Ze = (t, e, i) => {
658
- e && !t.classList.contains(i) ? t.classList.add(i) : !e && t.classList.contains(i) && t.classList.remove(i);
659
- };
660
- function Wt(t) {
661
- t === void 0 && (t = this && this.translate || 0);
662
- const e = this, i = e.params, {
663
- slides: s,
664
- rtlTranslate: r,
665
- snapGrid: n
666
- } = e;
667
- if (s.length === 0) return;
668
- typeof s[0].swiperSlideOffset > "u" && e.updateSlidesOffset();
669
- let c = -t;
670
- r && (c = t), e.visibleSlidesIndexes = [], e.visibleSlides = [];
671
- let d = i.spaceBetween;
672
- typeof d == "string" && d.indexOf("%") >= 0 ? d = parseFloat(d.replace("%", "")) / 100 * e.size : typeof d == "string" && (d = parseFloat(d));
673
- for (let a = 0; a < s.length; a += 1) {
674
- const m = s[a];
675
- let u = m.swiperSlideOffset;
676
- i.cssMode && i.centeredSlides && (u -= s[0].swiperSlideOffset);
677
- const p = (c + (i.centeredSlides ? e.minTranslate() : 0) - u) / (m.swiperSlideSize + d), w = (c - n[0] + (i.centeredSlides ? e.minTranslate() : 0) - u) / (m.swiperSlideSize + d), g = -(c - u), l = g + e.slidesSizesGrid[a], o = g >= 0 && g <= e.size - e.slidesSizesGrid[a], S = g >= 0 && g < e.size - 1 || l > 1 && l <= e.size || g <= 0 && l >= e.size;
678
- S && (e.visibleSlides.push(m), e.visibleSlidesIndexes.push(a)), Ze(m, S, i.slideVisibleClass), Ze(m, o, i.slideFullyVisibleClass), m.progress = r ? -p : p, m.originalProgress = r ? -w : w;
679
- }
680
- }
681
- function Xt(t) {
682
- const e = this;
683
- if (typeof t > "u") {
684
- const u = e.rtlTranslate ? -1 : 1;
685
- t = e && e.translate && e.translate * u || 0;
686
- }
687
- const i = e.params, s = e.maxTranslate() - e.minTranslate();
688
- let {
689
- progress: r,
690
- isBeginning: n,
691
- isEnd: c,
692
- progressLoop: d
693
- } = e;
694
- const a = n, m = c;
695
- if (s === 0)
696
- r = 0, n = !0, c = !0;
697
- else {
698
- r = (t - e.minTranslate()) / s;
699
- const u = Math.abs(t - e.minTranslate()) < 1, p = Math.abs(t - e.maxTranslate()) < 1;
700
- n = u || r <= 0, c = p || r >= 1, u && (r = 0), p && (r = 1);
701
- }
702
- if (i.loop) {
703
- const u = e.getSlideIndexByData(0), p = e.getSlideIndexByData(e.slides.length - 1), w = e.slidesGrid[u], g = e.slidesGrid[p], l = e.slidesGrid[e.slidesGrid.length - 1], o = Math.abs(t);
704
- o >= w ? d = (o - w) / l : d = (o + l - g) / l, d > 1 && (d -= 1);
705
- }
706
- Object.assign(e, {
707
- progress: r,
708
- progressLoop: d,
709
- isBeginning: n,
710
- isEnd: c
711
- }), (i.watchSlidesProgress || i.centeredSlides && i.autoHeight) && e.updateSlidesProgress(t), n && !a && e.emit("reachBeginning toEdge"), c && !m && e.emit("reachEnd toEdge"), (a && !n || m && !c) && e.emit("fromEdge"), e.emit("progress", r);
712
- }
713
- const Ge = (t, e, i) => {
714
- e && !t.classList.contains(i) ? t.classList.add(i) : !e && t.classList.contains(i) && t.classList.remove(i);
715
- };
716
- function kt() {
717
- const t = this, {
718
- slides: e,
719
- params: i,
720
- slidesEl: s,
721
- activeIndex: r
722
- } = t, n = t.virtual && i.virtual.enabled, c = t.grid && i.grid && i.grid.rows > 1, d = (p) => q(s, `.${i.slideClass}${p}, swiper-slide${p}`)[0];
723
- let a, m, u;
724
- if (n)
725
- if (i.loop) {
726
- let p = r - t.virtual.slidesBefore;
727
- p < 0 && (p = t.virtual.slides.length + p), p >= t.virtual.slides.length && (p -= t.virtual.slides.length), a = d(`[data-swiper-slide-index="${p}"]`);
728
- } else
729
- a = d(`[data-swiper-slide-index="${r}"]`);
730
- else
731
- c ? (a = e.find((p) => p.column === r), u = e.find((p) => p.column === r + 1), m = e.find((p) => p.column === r - 1)) : a = e[r];
732
- a && (c || (u = It(a, `.${i.slideClass}, swiper-slide`)[0], i.loop && !u && (u = e[0]), m = zt(a, `.${i.slideClass}, swiper-slide`)[0], i.loop && !m === 0 && (m = e[e.length - 1]))), e.forEach((p) => {
733
- Ge(p, p === a, i.slideActiveClass), Ge(p, p === u, i.slideNextClass), Ge(p, p === m, i.slidePrevClass);
734
- }), t.emitSlidesClasses();
735
- }
736
- const Te = (t, e) => {
737
- if (!t || t.destroyed || !t.params) return;
738
- const i = () => t.isElement ? "swiper-slide" : `.${t.params.slideClass}`, s = e.closest(i());
739
- if (s) {
740
- let r = s.querySelector(`.${t.params.lazyPreloaderClass}`);
741
- !r && t.isElement && (s.shadowRoot ? r = s.shadowRoot.querySelector(`.${t.params.lazyPreloaderClass}`) : requestAnimationFrame(() => {
742
- s.shadowRoot && (r = s.shadowRoot.querySelector(`.${t.params.lazyPreloaderClass}`), r && r.remove());
743
- })), r && r.remove();
744
- }
745
- }, Be = (t, e) => {
746
- if (!t.slides[e]) return;
747
- const i = t.slides[e].querySelector('[loading="lazy"]');
748
- i && i.removeAttribute("loading");
749
- }, He = (t) => {
750
- if (!t || t.destroyed || !t.params) return;
751
- let e = t.params.lazyPreloadPrevNext;
752
- const i = t.slides.length;
753
- if (!i || !e || e < 0) return;
754
- e = Math.min(e, i);
755
- const s = t.params.slidesPerView === "auto" ? t.slidesPerViewDynamic() : Math.ceil(t.params.slidesPerView), r = t.activeIndex;
756
- if (t.params.grid && t.params.grid.rows > 1) {
757
- const c = r, d = [c - e];
758
- d.push(...Array.from({
759
- length: e
760
- }).map((a, m) => c + s + m)), t.slides.forEach((a, m) => {
761
- d.includes(a.column) && Be(t, m);
762
- });
763
- return;
764
- }
765
- const n = r + s - 1;
766
- if (t.params.rewind || t.params.loop)
767
- for (let c = r - e; c <= n + e; c += 1) {
768
- const d = (c % i + i) % i;
769
- (d < r || d > n) && Be(t, d);
770
- }
771
- else
772
- for (let c = Math.max(r - e, 0); c <= Math.min(n + e, i - 1); c += 1)
773
- c !== r && (c > n || c < r) && Be(t, c);
774
- };
775
- function Ht(t) {
776
- const {
777
- slidesGrid: e,
778
- params: i
779
- } = t, s = t.rtlTranslate ? t.translate : -t.translate;
780
- let r;
781
- for (let n = 0; n < e.length; n += 1)
782
- typeof e[n + 1] < "u" ? s >= e[n] && s < e[n + 1] - (e[n + 1] - e[n]) / 2 ? r = n : s >= e[n] && s < e[n + 1] && (r = n + 1) : s >= e[n] && (r = n);
783
- return i.normalizeSlideIndex && (r < 0 || typeof r > "u") && (r = 0), r;
784
- }
785
- function Nt(t) {
786
- const e = this, i = e.rtlTranslate ? e.translate : -e.translate, {
787
- snapGrid: s,
788
- params: r,
789
- activeIndex: n,
790
- realIndex: c,
791
- snapIndex: d
792
- } = e;
793
- let a = t, m;
794
- const u = (g) => {
795
- let l = g - e.virtual.slidesBefore;
796
- return l < 0 && (l = e.virtual.slides.length + l), l >= e.virtual.slides.length && (l -= e.virtual.slides.length), l;
797
- };
798
- if (typeof a > "u" && (a = Ht(e)), s.indexOf(i) >= 0)
799
- m = s.indexOf(i);
800
- else {
801
- const g = Math.min(r.slidesPerGroupSkip, a);
802
- m = g + Math.floor((a - g) / r.slidesPerGroup);
803
- }
804
- if (m >= s.length && (m = s.length - 1), a === n && !e.params.loop) {
805
- m !== d && (e.snapIndex = m, e.emit("snapIndexChange"));
806
- return;
807
- }
808
- if (a === n && e.params.loop && e.virtual && e.params.virtual.enabled) {
809
- e.realIndex = u(a);
810
- return;
811
- }
812
- const p = e.grid && r.grid && r.grid.rows > 1;
813
- let w;
814
- if (e.virtual && r.virtual.enabled && r.loop)
815
- w = u(a);
816
- else if (p) {
817
- const g = e.slides.find((o) => o.column === a);
818
- let l = parseInt(g.getAttribute("data-swiper-slide-index"), 10);
819
- Number.isNaN(l) && (l = Math.max(e.slides.indexOf(g), 0)), w = Math.floor(l / r.grid.rows);
820
- } else if (e.slides[a]) {
821
- const g = e.slides[a].getAttribute("data-swiper-slide-index");
822
- g ? w = parseInt(g, 10) : w = a;
823
- } else
824
- w = a;
825
- Object.assign(e, {
826
- previousSnapIndex: d,
827
- snapIndex: m,
828
- previousRealIndex: c,
829
- realIndex: w,
830
- previousIndex: n,
831
- activeIndex: a
832
- }), e.initialized && He(e), e.emit("activeIndexChange"), e.emit("snapIndexChange"), (e.initialized || e.params.runCallbacksOnInit) && (c !== w && e.emit("realIndexChange"), e.emit("slideChange"));
833
- }
834
- function Ft(t, e) {
835
- const i = this, s = i.params;
836
- let r = t.closest(`.${s.slideClass}, swiper-slide`);
837
- !r && i.isElement && e && e.length > 1 && e.includes(t) && [...e.slice(e.indexOf(t) + 1, e.length)].forEach((d) => {
838
- !r && d.matches && d.matches(`.${s.slideClass}, swiper-slide`) && (r = d);
839
- });
840
- let n = !1, c;
841
- if (r) {
842
- for (let d = 0; d < i.slides.length; d += 1)
843
- if (i.slides[d] === r) {
844
- n = !0, c = d;
845
- break;
846
- }
847
- }
848
- if (r && n)
849
- i.clickedSlide = r, i.virtual && i.params.virtual.enabled ? i.clickedIndex = parseInt(r.getAttribute("data-swiper-slide-index"), 10) : i.clickedIndex = c;
850
- else {
851
- i.clickedSlide = void 0, i.clickedIndex = void 0;
852
- return;
853
- }
854
- s.slideToClickedSlide && i.clickedIndex !== void 0 && i.clickedIndex !== i.activeIndex && i.slideToClickedSlide();
855
- }
856
- var jt = {
857
- updateSize: Bt,
858
- updateSlides: Rt,
859
- updateAutoHeight: Vt,
860
- updateSlidesOffset: Yt,
861
- updateSlidesProgress: Wt,
862
- updateProgress: Xt,
863
- updateSlidesClasses: kt,
864
- updateActiveIndex: Nt,
865
- updateClickedSlide: Ft
866
- };
867
- function qt(t) {
868
- t === void 0 && (t = this.isHorizontal() ? "x" : "y");
869
- const e = this, {
870
- params: i,
871
- rtlTranslate: s,
872
- translate: r,
873
- wrapperEl: n
874
- } = e;
875
- if (i.virtualTranslate)
876
- return s ? -r : r;
877
- if (i.cssMode)
878
- return r;
879
- let c = We(n, t);
880
- return c += e.cssOverflowAdjustment(), s && (c = -c), c || 0;
881
- }
882
- function Ut(t, e) {
883
- const i = this, {
884
- rtlTranslate: s,
885
- params: r,
886
- wrapperEl: n,
887
- progress: c
888
- } = i;
889
- let d = 0, a = 0;
890
- const m = 0;
891
- i.isHorizontal() ? d = s ? -t : t : a = t, r.roundLengths && (d = Math.floor(d), a = Math.floor(a)), i.previousTranslate = i.translate, i.translate = i.isHorizontal() ? d : a, r.cssMode ? n[i.isHorizontal() ? "scrollLeft" : "scrollTop"] = i.isHorizontal() ? -d : -a : r.virtualTranslate || (i.isHorizontal() ? d -= i.cssOverflowAdjustment() : a -= i.cssOverflowAdjustment(), n.style.transform = `translate3d(${d}px, ${a}px, ${m}px)`);
892
- let u;
893
- const p = i.maxTranslate() - i.minTranslate();
894
- p === 0 ? u = 0 : u = (t - i.minTranslate()) / p, u !== c && i.updateProgress(t), i.emit("setTranslate", i.translate, e);
895
- }
896
- function Kt() {
897
- return -this.snapGrid[0];
898
- }
899
- function Zt() {
900
- return -this.snapGrid[this.snapGrid.length - 1];
901
- }
902
- function Jt(t, e, i, s, r) {
903
- t === void 0 && (t = 0), e === void 0 && (e = this.params.speed), i === void 0 && (i = !0), s === void 0 && (s = !0);
904
- const n = this, {
905
- params: c,
906
- wrapperEl: d
907
- } = n;
908
- if (n.animating && c.preventInteractionOnTransition)
909
- return !1;
910
- const a = n.minTranslate(), m = n.maxTranslate();
911
- let u;
912
- if (s && t > a ? u = a : s && t < m ? u = m : u = t, n.updateProgress(u), c.cssMode) {
913
- const p = n.isHorizontal();
914
- if (e === 0)
915
- d[p ? "scrollLeft" : "scrollTop"] = -u;
916
- else {
917
- if (!n.support.smoothScroll)
918
- return st({
919
- swiper: n,
920
- targetPosition: -u,
921
- side: p ? "left" : "top"
922
- }), !0;
923
- d.scrollTo({
924
- [p ? "left" : "top"]: -u,
925
- behavior: "smooth"
926
- });
927
- }
928
- return !0;
929
- }
930
- return e === 0 ? (n.setTransition(0), n.setTranslate(u), i && (n.emit("beforeTransitionStart", e, r), n.emit("transitionEnd"))) : (n.setTransition(e), n.setTranslate(u), i && (n.emit("beforeTransitionStart", e, r), n.emit("transitionStart")), n.animating || (n.animating = !0, n.onTranslateToWrapperTransitionEnd || (n.onTranslateToWrapperTransitionEnd = function(w) {
931
- !n || n.destroyed || w.target === this && (n.wrapperEl.removeEventListener("transitionend", n.onTranslateToWrapperTransitionEnd), n.onTranslateToWrapperTransitionEnd = null, delete n.onTranslateToWrapperTransitionEnd, n.animating = !1, i && n.emit("transitionEnd"));
932
- }), n.wrapperEl.addEventListener("transitionend", n.onTranslateToWrapperTransitionEnd))), !0;
933
- }
934
- var Qt = {
935
- getTranslate: qt,
936
- setTranslate: Ut,
937
- minTranslate: Kt,
938
- maxTranslate: Zt,
939
- translateTo: Jt
940
- };
941
- function ei(t, e) {
942
- const i = this;
943
- i.params.cssMode || (i.wrapperEl.style.transitionDuration = `${t}ms`, i.wrapperEl.style.transitionDelay = t === 0 ? "0ms" : ""), i.emit("setTransition", t, e);
944
- }
945
- function lt(t) {
946
- let {
947
- swiper: e,
948
- runCallbacks: i,
949
- direction: s,
950
- step: r
951
- } = t;
952
- const {
953
- activeIndex: n,
954
- previousIndex: c
955
- } = e;
956
- let d = s;
957
- if (d || (n > c ? d = "next" : n < c ? d = "prev" : d = "reset"), e.emit(`transition${r}`), i && n !== c) {
958
- if (d === "reset") {
959
- e.emit(`slideResetTransition${r}`);
960
- return;
961
- }
962
- e.emit(`slideChangeTransition${r}`), d === "next" ? e.emit(`slideNextTransition${r}`) : e.emit(`slidePrevTransition${r}`);
963
- }
964
- }
965
- function ti(t, e) {
966
- t === void 0 && (t = !0);
967
- const i = this, {
968
- params: s
969
- } = i;
970
- s.cssMode || (s.autoHeight && i.updateAutoHeight(), lt({
971
- swiper: i,
972
- runCallbacks: t,
973
- direction: e,
974
- step: "Start"
975
- }));
976
- }
977
- function ii(t, e) {
978
- t === void 0 && (t = !0);
979
- const i = this, {
980
- params: s
981
- } = i;
982
- i.animating = !1, !s.cssMode && (i.setTransition(0), lt({
983
- swiper: i,
984
- runCallbacks: t,
985
- direction: e,
986
- step: "End"
987
- }));
988
- }
989
- var si = {
990
- setTransition: ei,
991
- transitionStart: ti,
992
- transitionEnd: ii
993
- };
994
- function ni(t, e, i, s, r) {
995
- t === void 0 && (t = 0), i === void 0 && (i = !0), typeof t == "string" && (t = parseInt(t, 10));
996
- const n = this;
997
- let c = t;
998
- c < 0 && (c = 0);
999
- const {
1000
- params: d,
1001
- snapGrid: a,
1002
- slidesGrid: m,
1003
- previousIndex: u,
1004
- activeIndex: p,
1005
- rtlTranslate: w,
1006
- wrapperEl: g,
1007
- enabled: l
1008
- } = n;
1009
- if (!l && !s && !r || n.destroyed || n.animating && d.preventInteractionOnTransition)
1010
- return !1;
1011
- typeof e > "u" && (e = n.params.speed);
1012
- const o = Math.min(n.params.slidesPerGroupSkip, c);
1013
- let S = o + Math.floor((c - o) / n.params.slidesPerGroup);
1014
- S >= a.length && (S = a.length - 1);
1015
- const v = -a[S];
1016
- if (d.normalizeSlideIndex)
1017
- for (let O = 0; O < m.length; O += 1) {
1018
- const z = -Math.floor(v * 100), T = Math.floor(m[O] * 100), x = Math.floor(m[O + 1] * 100);
1019
- typeof m[O + 1] < "u" ? z >= T && z < x - (x - T) / 2 ? c = O : z >= T && z < x && (c = O + 1) : z >= T && (c = O);
1020
- }
1021
- if (n.initialized && c !== p && (!n.allowSlideNext && (w ? v > n.translate && v > n.minTranslate() : v < n.translate && v < n.minTranslate()) || !n.allowSlidePrev && v > n.translate && v > n.maxTranslate() && (p || 0) !== c))
1022
- return !1;
1023
- c !== (u || 0) && i && n.emit("beforeSlideChangeStart"), n.updateProgress(v);
1024
- let f;
1025
- c > p ? f = "next" : c < p ? f = "prev" : f = "reset";
1026
- const h = n.virtual && n.params.virtual.enabled;
1027
- if (!(h && r) && (w && -v === n.translate || !w && v === n.translate))
1028
- return n.updateActiveIndex(c), d.autoHeight && n.updateAutoHeight(), n.updateSlidesClasses(), d.effect !== "slide" && n.setTranslate(v), f !== "reset" && (n.transitionStart(i, f), n.transitionEnd(i, f)), !1;
1029
- if (d.cssMode) {
1030
- const O = n.isHorizontal(), z = w ? v : -v;
1031
- if (e === 0)
1032
- h && (n.wrapperEl.style.scrollSnapType = "none", n._immediateVirtual = !0), h && !n._cssModeVirtualInitialSet && n.params.initialSlide > 0 ? (n._cssModeVirtualInitialSet = !0, requestAnimationFrame(() => {
1033
- g[O ? "scrollLeft" : "scrollTop"] = z;
1034
- })) : g[O ? "scrollLeft" : "scrollTop"] = z, h && requestAnimationFrame(() => {
1035
- n.wrapperEl.style.scrollSnapType = "", n._immediateVirtual = !1;
1036
- });
1037
- else {
1038
- if (!n.support.smoothScroll)
1039
- return st({
1040
- swiper: n,
1041
- targetPosition: z,
1042
- side: O ? "left" : "top"
1043
- }), !0;
1044
- g.scrollTo({
1045
- [O ? "left" : "top"]: z,
1046
- behavior: "smooth"
1047
- });
1048
- }
1049
- return !0;
1050
- }
1051
- const I = at().isSafari;
1052
- return h && !r && I && n.isElement && n.virtual.update(!1, !1, c), n.setTransition(e), n.setTranslate(v), n.updateActiveIndex(c), n.updateSlidesClasses(), n.emit("beforeTransitionStart", e, s), n.transitionStart(i, f), e === 0 ? n.transitionEnd(i, f) : n.animating || (n.animating = !0, n.onSlideToWrapperTransitionEnd || (n.onSlideToWrapperTransitionEnd = function(z) {
1053
- !n || n.destroyed || z.target === this && (n.wrapperEl.removeEventListener("transitionend", n.onSlideToWrapperTransitionEnd), n.onSlideToWrapperTransitionEnd = null, delete n.onSlideToWrapperTransitionEnd, n.transitionEnd(i, f));
1054
- }), n.wrapperEl.addEventListener("transitionend", n.onSlideToWrapperTransitionEnd)), !0;
1055
- }
1056
- function ri(t, e, i, s) {
1057
- t === void 0 && (t = 0), i === void 0 && (i = !0), typeof t == "string" && (t = parseInt(t, 10));
1058
- const r = this;
1059
- if (r.destroyed) return;
1060
- typeof e > "u" && (e = r.params.speed);
1061
- const n = r.grid && r.params.grid && r.params.grid.rows > 1;
1062
- let c = t;
1063
- if (r.params.loop)
1064
- if (r.virtual && r.params.virtual.enabled)
1065
- c = c + r.virtual.slidesBefore;
1066
- else {
1067
- let d;
1068
- if (n) {
1069
- const w = c * r.params.grid.rows;
1070
- d = r.slides.find((g) => g.getAttribute("data-swiper-slide-index") * 1 === w).column;
1071
- } else
1072
- d = r.getSlideIndexByData(c);
1073
- const a = n ? Math.ceil(r.slides.length / r.params.grid.rows) : r.slides.length, {
1074
- centeredSlides: m
1075
- } = r.params;
1076
- let u = r.params.slidesPerView;
1077
- u === "auto" ? u = r.slidesPerViewDynamic() : (u = Math.ceil(parseFloat(r.params.slidesPerView, 10)), m && u % 2 === 0 && (u = u + 1));
1078
- let p = a - d < u;
1079
- if (m && (p = p || d < Math.ceil(u / 2)), s && m && r.params.slidesPerView !== "auto" && !n && (p = !1), p) {
1080
- const w = m ? d < r.activeIndex ? "prev" : "next" : d - r.activeIndex - 1 < r.params.slidesPerView ? "next" : "prev";
1081
- r.loopFix({
1082
- direction: w,
1083
- slideTo: !0,
1084
- activeSlideIndex: w === "next" ? d + 1 : d - a + 1,
1085
- slideRealIndex: w === "next" ? r.realIndex : void 0
1086
- });
1087
- }
1088
- if (n) {
1089
- const w = c * r.params.grid.rows;
1090
- c = r.slides.find((g) => g.getAttribute("data-swiper-slide-index") * 1 === w).column;
1091
- } else
1092
- c = r.getSlideIndexByData(c);
1093
- }
1094
- return requestAnimationFrame(() => {
1095
- r.slideTo(c, e, i, s);
1096
- }), r;
1097
- }
1098
- function ai(t, e, i) {
1099
- e === void 0 && (e = !0);
1100
- const s = this, {
1101
- enabled: r,
1102
- params: n,
1103
- animating: c
1104
- } = s;
1105
- if (!r || s.destroyed) return s;
1106
- typeof t > "u" && (t = s.params.speed);
1107
- let d = n.slidesPerGroup;
1108
- n.slidesPerView === "auto" && n.slidesPerGroup === 1 && n.slidesPerGroupAuto && (d = Math.max(s.slidesPerViewDynamic("current", !0), 1));
1109
- const a = s.activeIndex < n.slidesPerGroupSkip ? 1 : d, m = s.virtual && n.virtual.enabled;
1110
- if (n.loop) {
1111
- if (c && !m && n.loopPreventsSliding) return !1;
1112
- if (s.loopFix({
1113
- direction: "next"
1114
- }), s._clientLeft = s.wrapperEl.clientLeft, s.activeIndex === s.slides.length - 1 && n.cssMode)
1115
- return requestAnimationFrame(() => {
1116
- s.slideTo(s.activeIndex + a, t, e, i);
1117
- }), !0;
1118
- }
1119
- return n.rewind && s.isEnd ? s.slideTo(0, t, e, i) : s.slideTo(s.activeIndex + a, t, e, i);
1120
- }
1121
- function li(t, e, i) {
1122
- e === void 0 && (e = !0);
1123
- const s = this, {
1124
- params: r,
1125
- snapGrid: n,
1126
- slidesGrid: c,
1127
- rtlTranslate: d,
1128
- enabled: a,
1129
- animating: m
1130
- } = s;
1131
- if (!a || s.destroyed) return s;
1132
- typeof t > "u" && (t = s.params.speed);
1133
- const u = s.virtual && r.virtual.enabled;
1134
- if (r.loop) {
1135
- if (m && !u && r.loopPreventsSliding) return !1;
1136
- s.loopFix({
1137
- direction: "prev"
1138
- }), s._clientLeft = s.wrapperEl.clientLeft;
1139
- }
1140
- const p = d ? s.translate : -s.translate;
1141
- function w(f) {
1142
- return f < 0 ? -Math.floor(Math.abs(f)) : Math.floor(f);
1143
- }
1144
- const g = w(p), l = n.map((f) => w(f)), o = r.freeMode && r.freeMode.enabled;
1145
- let S = n[l.indexOf(g) - 1];
1146
- if (typeof S > "u" && (r.cssMode || o)) {
1147
- let f;
1148
- n.forEach((h, E) => {
1149
- g >= h && (f = E);
1150
- }), typeof f < "u" && (S = o ? n[f] : n[f > 0 ? f - 1 : f]);
1151
- }
1152
- let v = 0;
1153
- if (typeof S < "u" && (v = c.indexOf(S), v < 0 && (v = s.activeIndex - 1), r.slidesPerView === "auto" && r.slidesPerGroup === 1 && r.slidesPerGroupAuto && (v = v - s.slidesPerViewDynamic("previous", !0) + 1, v = Math.max(v, 0))), r.rewind && s.isBeginning) {
1154
- const f = s.params.virtual && s.params.virtual.enabled && s.virtual ? s.virtual.slides.length - 1 : s.slides.length - 1;
1155
- return s.slideTo(f, t, e, i);
1156
- } else if (r.loop && s.activeIndex === 0 && r.cssMode)
1157
- return requestAnimationFrame(() => {
1158
- s.slideTo(v, t, e, i);
1159
- }), !0;
1160
- return s.slideTo(v, t, e, i);
1161
- }
1162
- function oi(t, e, i) {
1163
- e === void 0 && (e = !0);
1164
- const s = this;
1165
- if (!s.destroyed)
1166
- return typeof t > "u" && (t = s.params.speed), s.slideTo(s.activeIndex, t, e, i);
1167
- }
1168
- function di(t, e, i, s) {
1169
- e === void 0 && (e = !0), s === void 0 && (s = 0.5);
1170
- const r = this;
1171
- if (r.destroyed) return;
1172
- typeof t > "u" && (t = r.params.speed);
1173
- let n = r.activeIndex;
1174
- const c = Math.min(r.params.slidesPerGroupSkip, n), d = c + Math.floor((n - c) / r.params.slidesPerGroup), a = r.rtlTranslate ? r.translate : -r.translate;
1175
- if (a >= r.snapGrid[d]) {
1176
- const m = r.snapGrid[d], u = r.snapGrid[d + 1];
1177
- a - m > (u - m) * s && (n += r.params.slidesPerGroup);
1178
- } else {
1179
- const m = r.snapGrid[d - 1], u = r.snapGrid[d];
1180
- a - m <= (u - m) * s && (n -= r.params.slidesPerGroup);
1181
- }
1182
- return n = Math.max(n, 0), n = Math.min(n, r.slidesGrid.length - 1), r.slideTo(n, t, e, i);
1183
- }
1184
- function ci() {
1185
- const t = this;
1186
- if (t.destroyed) return;
1187
- const {
1188
- params: e,
1189
- slidesEl: i
1190
- } = t, s = e.slidesPerView === "auto" ? t.slidesPerViewDynamic() : e.slidesPerView;
1191
- let r = t.clickedIndex, n;
1192
- const c = t.isElement ? "swiper-slide" : `.${e.slideClass}`;
1193
- if (e.loop) {
1194
- if (t.animating) return;
1195
- n = parseInt(t.clickedSlide.getAttribute("data-swiper-slide-index"), 10), e.centeredSlides ? r < t.loopedSlides - s / 2 || r > t.slides.length - t.loopedSlides + s / 2 ? (t.loopFix(), r = t.getSlideIndex(q(i, `${c}[data-swiper-slide-index="${n}"]`)[0]), Ye(() => {
1196
- t.slideTo(r);
1197
- })) : t.slideTo(r) : r > t.slides.length - s ? (t.loopFix(), r = t.getSlideIndex(q(i, `${c}[data-swiper-slide-index="${n}"]`)[0]), Ye(() => {
1198
- t.slideTo(r);
1199
- })) : t.slideTo(r);
1200
- } else
1201
- t.slideTo(r);
1202
- }
1203
- var fi = {
1204
- slideTo: ni,
1205
- slideToLoop: ri,
1206
- slideNext: ai,
1207
- slidePrev: li,
1208
- slideReset: oi,
1209
- slideToClosest: di,
1210
- slideToClickedSlide: ci
1211
- };
1212
- function ui(t) {
1213
- const e = this, {
1214
- params: i,
1215
- slidesEl: s
1216
- } = e;
1217
- if (!i.loop || e.virtual && e.params.virtual.enabled) return;
1218
- const r = () => {
1219
- q(s, `.${i.slideClass}, swiper-slide`).forEach((p, w) => {
1220
- p.setAttribute("data-swiper-slide-index", w);
1221
- });
1222
- }, n = e.grid && i.grid && i.grid.rows > 1, c = i.slidesPerGroup * (n ? i.grid.rows : 1), d = e.slides.length % c !== 0, a = n && e.slides.length % i.grid.rows !== 0, m = (u) => {
1223
- for (let p = 0; p < u; p += 1) {
1224
- const w = e.isElement ? oe("swiper-slide", [i.slideBlankClass]) : oe("div", [i.slideClass, i.slideBlankClass]);
1225
- e.slidesEl.append(w);
1226
- }
1227
- };
1228
- if (d) {
1229
- if (i.loopAddBlankSlides) {
1230
- const u = c - e.slides.length % c;
1231
- m(u), e.recalcSlides(), e.updateSlides();
1232
- } else
1233
- Me("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)");
1234
- r();
1235
- } else if (a) {
1236
- if (i.loopAddBlankSlides) {
1237
- const u = i.grid.rows - e.slides.length % i.grid.rows;
1238
- m(u), e.recalcSlides(), e.updateSlides();
1239
- } else
1240
- Me("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)");
1241
- r();
1242
- } else
1243
- r();
1244
- e.loopFix({
1245
- slideRealIndex: t,
1246
- direction: i.centeredSlides ? void 0 : "next"
1247
- });
1248
- }
1249
- function pi(t) {
1250
- let {
1251
- slideRealIndex: e,
1252
- slideTo: i = !0,
1253
- direction: s,
1254
- setTranslate: r,
1255
- activeSlideIndex: n,
1256
- byController: c,
1257
- byMousewheel: d
1258
- } = t === void 0 ? {} : t;
1259
- const a = this;
1260
- if (!a.params.loop) return;
1261
- a.emit("beforeLoopFix");
1262
- const {
1263
- slides: m,
1264
- allowSlidePrev: u,
1265
- allowSlideNext: p,
1266
- slidesEl: w,
1267
- params: g
1268
- } = a, {
1269
- centeredSlides: l
1270
- } = g;
1271
- if (a.allowSlidePrev = !0, a.allowSlideNext = !0, a.virtual && g.virtual.enabled) {
1272
- i && (!g.centeredSlides && a.snapIndex === 0 ? a.slideTo(a.virtual.slides.length, 0, !1, !0) : g.centeredSlides && a.snapIndex < g.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 = p, a.emit("loopFix");
1273
- return;
1274
- }
1275
- let o = g.slidesPerView;
1276
- o === "auto" ? o = a.slidesPerViewDynamic() : (o = Math.ceil(parseFloat(g.slidesPerView, 10)), l && o % 2 === 0 && (o = o + 1));
1277
- const S = g.slidesPerGroupAuto ? o : g.slidesPerGroup;
1278
- let v = S;
1279
- v % S !== 0 && (v += S - v % S), v += g.loopAdditionalSlides, a.loopedSlides = v;
1280
- const f = a.grid && g.grid && g.grid.rows > 1;
1281
- m.length < o + v ? Me("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters") : f && g.grid.fill === "row" && Me("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");
1282
- const h = [], E = [];
1283
- let b = a.activeIndex;
1284
- typeof n > "u" ? n = a.getSlideIndex(m.find((L) => L.classList.contains(g.slideActiveClass))) : b = n;
1285
- const I = s === "next" || !s, O = s === "prev" || !s;
1286
- let z = 0, T = 0;
1287
- const x = f ? Math.ceil(m.length / g.grid.rows) : m.length, A = (f ? m[n].column : n) + (l && typeof r > "u" ? -o / 2 + 0.5 : 0);
1288
- if (A < v) {
1289
- z = Math.max(v - A, S);
1290
- for (let L = 0; L < v - A; L += 1) {
1291
- const D = L - Math.floor(L / x) * x;
1292
- if (f) {
1293
- const $ = x - D - 1;
1294
- for (let G = m.length - 1; G >= 0; G -= 1)
1295
- m[G].column === $ && h.push(G);
1296
- } else
1297
- h.push(x - D - 1);
1298
- }
1299
- } else if (A + o > x - v) {
1300
- T = Math.max(A - (x - v * 2), S);
1301
- for (let L = 0; L < T; L += 1) {
1302
- const D = L - Math.floor(L / x) * x;
1303
- f ? m.forEach(($, G) => {
1304
- $.column === D && E.push(G);
1305
- }) : E.push(D);
1306
- }
1307
- }
1308
- if (a.__preventObserver__ = !0, requestAnimationFrame(() => {
1309
- a.__preventObserver__ = !1;
1310
- }), O && h.forEach((L) => {
1311
- m[L].swiperLoopMoveDOM = !0, w.prepend(m[L]), m[L].swiperLoopMoveDOM = !1;
1312
- }), I && E.forEach((L) => {
1313
- m[L].swiperLoopMoveDOM = !0, w.append(m[L]), m[L].swiperLoopMoveDOM = !1;
1314
- }), a.recalcSlides(), g.slidesPerView === "auto" ? a.updateSlides() : f && (h.length > 0 && O || E.length > 0 && I) && a.slides.forEach((L, D) => {
1315
- a.grid.updateSlide(D, L, a.slides);
1316
- }), g.watchSlidesProgress && a.updateSlidesOffset(), i) {
1317
- if (h.length > 0 && O) {
1318
- if (typeof e > "u") {
1319
- const L = a.slidesGrid[b], $ = a.slidesGrid[b + z] - L;
1320
- d ? a.setTranslate(a.translate - $) : (a.slideTo(b + Math.ceil(z), 0, !1, !0), r && (a.touchEventsData.startTranslate = a.touchEventsData.startTranslate - $, a.touchEventsData.currentTranslate = a.touchEventsData.currentTranslate - $));
1321
- } else if (r) {
1322
- const L = f ? h.length / g.grid.rows : h.length;
1323
- a.slideTo(a.activeIndex + L, 0, !1, !0), a.touchEventsData.currentTranslate = a.translate;
1324
- }
1325
- } else if (E.length > 0 && I)
1326
- if (typeof e > "u") {
1327
- const L = a.slidesGrid[b], $ = a.slidesGrid[b - T] - L;
1328
- d ? a.setTranslate(a.translate - $) : (a.slideTo(b - T, 0, !1, !0), r && (a.touchEventsData.startTranslate = a.touchEventsData.startTranslate - $, a.touchEventsData.currentTranslate = a.touchEventsData.currentTranslate - $));
1329
- } else {
1330
- const L = f ? E.length / g.grid.rows : E.length;
1331
- a.slideTo(a.activeIndex - L, 0, !1, !0);
1332
- }
1333
- }
1334
- if (a.allowSlidePrev = u, a.allowSlideNext = p, a.controller && a.controller.control && !c) {
1335
- const L = {
1336
- slideRealIndex: e,
1337
- direction: s,
1338
- setTranslate: r,
1339
- activeSlideIndex: n,
1340
- byController: !0
1341
- };
1342
- Array.isArray(a.controller.control) ? a.controller.control.forEach((D) => {
1343
- !D.destroyed && D.params.loop && D.loopFix({
1344
- ...L,
1345
- slideTo: D.params.slidesPerView === g.slidesPerView ? i : !1
1346
- });
1347
- }) : a.controller.control instanceof a.constructor && a.controller.control.params.loop && a.controller.control.loopFix({
1348
- ...L,
1349
- slideTo: a.controller.control.params.slidesPerView === g.slidesPerView ? i : !1
1350
- });
1351
- }
1352
- a.emit("loopFix");
1353
- }
1354
- function mi() {
1355
- const t = this, {
1356
- params: e,
1357
- slidesEl: i
1358
- } = t;
1359
- if (!e.loop || t.virtual && t.params.virtual.enabled) return;
1360
- t.recalcSlides();
1361
- const s = [];
1362
- t.slides.forEach((r) => {
1363
- const n = typeof r.swiperSlideIndex > "u" ? r.getAttribute("data-swiper-slide-index") * 1 : r.swiperSlideIndex;
1364
- s[n] = r;
1365
- }), t.slides.forEach((r) => {
1366
- r.removeAttribute("data-swiper-slide-index");
1367
- }), s.forEach((r) => {
1368
- i.append(r);
1369
- }), t.recalcSlides(), t.slideTo(t.realIndex, 0);
1370
- }
1371
- var hi = {
1372
- loopCreate: ui,
1373
- loopFix: pi,
1374
- loopDestroy: mi
1375
- };
1376
- function gi(t) {
1377
- const e = this;
1378
- if (!e.params.simulateTouch || e.params.watchOverflow && e.isLocked || e.params.cssMode) return;
1379
- const i = e.params.touchEventsTarget === "container" ? e.el : e.wrapperEl;
1380
- e.isElement && (e.__preventObserver__ = !0), i.style.cursor = "move", i.style.cursor = t ? "grabbing" : "grab", e.isElement && requestAnimationFrame(() => {
1381
- e.__preventObserver__ = !1;
1382
- });
1383
- }
1384
- function vi() {
1385
- const t = this;
1386
- t.params.watchOverflow && t.isLocked || t.params.cssMode || (t.isElement && (t.__preventObserver__ = !0), t[t.params.touchEventsTarget === "container" ? "el" : "wrapperEl"].style.cursor = "", t.isElement && requestAnimationFrame(() => {
1387
- t.__preventObserver__ = !1;
1388
- }));
1389
- }
1390
- var wi = {
1391
- setGrabCursor: gi,
1392
- unsetGrabCursor: vi
1393
- };
1394
- function Si(t, e) {
1395
- e === void 0 && (e = this);
1396
- function i(s) {
1397
- if (!s || s === K() || s === X()) return null;
1398
- s.assignedSlot && (s = s.assignedSlot);
1399
- const r = s.closest(t);
1400
- return !r && !s.getRootNode ? null : r || i(s.getRootNode().host);
1401
- }
1402
- return i(e);
1403
- }
1404
- function Je(t, e, i) {
1405
- const s = X(), {
1406
- params: r
1407
- } = t, n = r.edgeSwipeDetection, c = r.edgeSwipeThreshold;
1408
- return n && (i <= c || i >= s.innerWidth - c) ? n === "prevent" ? (e.preventDefault(), !0) : !1 : !0;
1409
- }
1410
- function Ei(t) {
1411
- const e = this, i = K();
1412
- let s = t;
1413
- s.originalEvent && (s = s.originalEvent);
1414
- const r = e.touchEventsData;
1415
- if (s.type === "pointerdown") {
1416
- if (r.pointerId !== null && r.pointerId !== s.pointerId)
1417
- return;
1418
- r.pointerId = s.pointerId;
1419
- } else s.type === "touchstart" && s.targetTouches.length === 1 && (r.touchId = s.targetTouches[0].identifier);
1420
- if (s.type === "touchstart") {
1421
- Je(e, s, s.targetTouches[0].pageX);
1422
- return;
1423
- }
1424
- const {
1425
- params: n,
1426
- touches: c,
1427
- enabled: d
1428
- } = e;
1429
- if (!d || !n.simulateTouch && s.pointerType === "mouse" || e.animating && n.preventInteractionOnTransition)
1430
- return;
1431
- !e.animating && n.cssMode && n.loop && e.loopFix();
1432
- let a = s.target;
1433
- if (n.touchEventsTarget === "wrapper" && !Lt(a, e.wrapperEl) || "which" in s && s.which === 3 || "button" in s && s.button > 0 || r.isTouched && r.isMoved) return;
1434
- const m = !!n.noSwipingClass && n.noSwipingClass !== "", u = s.composedPath ? s.composedPath() : s.path;
1435
- m && s.target && s.target.shadowRoot && u && (a = u[0]);
1436
- const p = n.noSwipingSelector ? n.noSwipingSelector : `.${n.noSwipingClass}`, w = !!(s.target && s.target.shadowRoot);
1437
- if (n.noSwiping && (w ? Si(p, a) : a.closest(p))) {
1438
- e.allowClick = !0;
1439
- return;
1440
- }
1441
- if (n.swipeHandler && !a.closest(n.swipeHandler))
1442
- return;
1443
- c.currentX = s.pageX, c.currentY = s.pageY;
1444
- const g = c.currentX, l = c.currentY;
1445
- if (!Je(e, s, g))
1446
- return;
1447
- Object.assign(r, {
1448
- isTouched: !0,
1449
- isMoved: !1,
1450
- allowTouchCallbacks: !0,
1451
- isScrolling: void 0,
1452
- startMoving: void 0
1453
- }), c.startX = g, c.startY = l, r.touchStartTime = Ce(), e.allowClick = !0, e.updateSize(), e.swipeDirection = void 0, n.threshold > 0 && (r.allowThresholdMove = !1);
1454
- let o = !0;
1455
- a.matches(r.focusableElements) && (o = !1, a.nodeName === "SELECT" && (r.isTouched = !1)), i.activeElement && i.activeElement.matches(r.focusableElements) && i.activeElement !== a && (s.pointerType === "mouse" || s.pointerType !== "mouse" && !a.matches(r.focusableElements)) && i.activeElement.blur();
1456
- const S = o && e.allowTouchMove && n.touchStartPreventDefault;
1457
- (n.touchStartForcePreventDefault || S) && !a.isContentEditable && s.preventDefault(), n.freeMode && n.freeMode.enabled && e.freeMode && e.animating && !n.cssMode && e.freeMode.onTouchStart(), e.emit("touchStart", s);
1458
- }
1459
- function bi(t) {
1460
- const e = K(), i = this, s = i.touchEventsData, {
1461
- params: r,
1462
- touches: n,
1463
- rtlTranslate: c,
1464
- enabled: d
1465
- } = i;
1466
- if (!d || !r.simulateTouch && t.pointerType === "mouse") return;
1467
- let a = t;
1468
- if (a.originalEvent && (a = a.originalEvent), a.type === "pointermove" && (s.touchId !== null || a.pointerId !== s.pointerId))
1469
- return;
1470
- let m;
1471
- if (a.type === "touchmove") {
1472
- if (m = [...a.changedTouches].find((b) => b.identifier === s.touchId), !m || m.identifier !== s.touchId) return;
1473
- } else
1474
- m = a;
1475
- if (!s.isTouched) {
1476
- s.startMoving && s.isScrolling && i.emit("touchMoveOpposite", a);
1477
- return;
1478
- }
1479
- const u = m.pageX, p = m.pageY;
1480
- if (a.preventedByNestedSwiper) {
1481
- n.startX = u, n.startY = p;
1482
- return;
1483
- }
1484
- if (!i.allowTouchMove) {
1485
- a.target.matches(s.focusableElements) || (i.allowClick = !1), s.isTouched && (Object.assign(n, {
1486
- startX: u,
1487
- startY: p,
1488
- currentX: u,
1489
- currentY: p
1490
- }), s.touchStartTime = Ce());
1491
- return;
1492
- }
1493
- if (r.touchReleaseOnEdges && !r.loop) {
1494
- if (i.isVertical()) {
1495
- if (p < n.startY && i.translate <= i.maxTranslate() || p > n.startY && i.translate >= i.minTranslate()) {
1496
- s.isTouched = !1, s.isMoved = !1;
1497
- return;
1498
- }
1499
- } else if (u < n.startX && i.translate <= i.maxTranslate() || u > n.startX && i.translate >= i.minTranslate())
1500
- return;
1501
- }
1502
- if (e.activeElement && e.activeElement.matches(s.focusableElements) && e.activeElement !== a.target && a.pointerType !== "mouse" && e.activeElement.blur(), e.activeElement && a.target === e.activeElement && a.target.matches(s.focusableElements)) {
1503
- s.isMoved = !0, i.allowClick = !1;
1504
- return;
1505
- }
1506
- s.allowTouchCallbacks && i.emit("touchMove", a), n.previousX = n.currentX, n.previousY = n.currentY, n.currentX = u, n.currentY = p;
1507
- const w = n.currentX - n.startX, g = n.currentY - n.startY;
1508
- if (i.params.threshold && Math.sqrt(w ** 2 + g ** 2) < i.params.threshold) return;
1509
- if (typeof s.isScrolling > "u") {
1510
- let b;
1511
- i.isHorizontal() && n.currentY === n.startY || i.isVertical() && n.currentX === n.startX ? s.isScrolling = !1 : w * w + g * g >= 25 && (b = Math.atan2(Math.abs(g), Math.abs(w)) * 180 / Math.PI, s.isScrolling = i.isHorizontal() ? b > r.touchAngle : 90 - b > r.touchAngle);
1512
- }
1513
- if (s.isScrolling && i.emit("touchMoveOpposite", a), typeof s.startMoving > "u" && (n.currentX !== n.startX || n.currentY !== n.startY) && (s.startMoving = !0), s.isScrolling || a.type === "touchmove" && s.preventTouchMoveFromPointerMove) {
1514
- s.isTouched = !1;
1515
- return;
1516
- }
1517
- if (!s.startMoving)
1518
- return;
1519
- i.allowClick = !1, !r.cssMode && a.cancelable && a.preventDefault(), r.touchMoveStopPropagation && !r.nested && a.stopPropagation();
1520
- let l = i.isHorizontal() ? w : g, o = i.isHorizontal() ? n.currentX - n.previousX : n.currentY - n.previousY;
1521
- r.oneWayMovement && (l = Math.abs(l) * (c ? 1 : -1), o = Math.abs(o) * (c ? 1 : -1)), n.diff = l, l *= r.touchRatio, c && (l = -l, o = -o);
1522
- const S = i.touchesDirection;
1523
- i.swipeDirection = l > 0 ? "prev" : "next", i.touchesDirection = o > 0 ? "prev" : "next";
1524
- const v = i.params.loop && !r.cssMode, f = i.touchesDirection === "next" && i.allowSlideNext || i.touchesDirection === "prev" && i.allowSlidePrev;
1525
- if (!s.isMoved) {
1526
- if (v && f && i.loopFix({
1527
- direction: i.swipeDirection
1528
- }), s.startTranslate = i.getTranslate(), i.setTransition(0), i.animating) {
1529
- const b = new window.CustomEvent("transitionend", {
1530
- bubbles: !0,
1531
- cancelable: !0,
1532
- detail: {
1533
- bySwiperTouchMove: !0
1534
- }
1535
- });
1536
- i.wrapperEl.dispatchEvent(b);
1537
- }
1538
- s.allowMomentumBounce = !1, r.grabCursor && (i.allowSlideNext === !0 || i.allowSlidePrev === !0) && i.setGrabCursor(!0), i.emit("sliderFirstMove", a);
1539
- }
1540
- if ((/* @__PURE__ */ new Date()).getTime(), r._loopSwapReset !== !1 && s.isMoved && s.allowThresholdMove && S !== i.touchesDirection && v && f && Math.abs(l) >= 1) {
1541
- Object.assign(n, {
1542
- startX: u,
1543
- startY: p,
1544
- currentX: u,
1545
- currentY: p,
1546
- startTranslate: s.currentTranslate
1547
- }), s.loopSwapReset = !0, s.startTranslate = s.currentTranslate;
1548
- return;
1549
- }
1550
- i.emit("sliderMove", a), s.isMoved = !0, s.currentTranslate = l + s.startTranslate;
1551
- let h = !0, E = r.resistanceRatio;
1552
- if (r.touchReleaseOnEdges && (E = 0), l > 0 ? (v && f && s.allowThresholdMove && s.currentTranslate > (r.centeredSlides ? i.minTranslate() - i.slidesSizesGrid[i.activeIndex + 1] - (r.slidesPerView !== "auto" && i.slides.length - r.slidesPerView >= 2 ? i.slidesSizesGrid[i.activeIndex + 1] + i.params.spaceBetween : 0) - i.params.spaceBetween : i.minTranslate()) && i.loopFix({
1553
- direction: "prev",
1554
- setTranslate: !0,
1555
- activeSlideIndex: 0
1556
- }), s.currentTranslate > i.minTranslate() && (h = !1, r.resistance && (s.currentTranslate = i.minTranslate() - 1 + (-i.minTranslate() + s.startTranslate + l) ** E))) : l < 0 && (v && f && s.allowThresholdMove && s.currentTranslate < (r.centeredSlides ? i.maxTranslate() + i.slidesSizesGrid[i.slidesSizesGrid.length - 1] + i.params.spaceBetween + (r.slidesPerView !== "auto" && i.slides.length - r.slidesPerView >= 2 ? i.slidesSizesGrid[i.slidesSizesGrid.length - 1] + i.params.spaceBetween : 0) : i.maxTranslate()) && i.loopFix({
1557
- direction: "next",
1558
- setTranslate: !0,
1559
- activeSlideIndex: i.slides.length - (r.slidesPerView === "auto" ? i.slidesPerViewDynamic() : Math.ceil(parseFloat(r.slidesPerView, 10)))
1560
- }), s.currentTranslate < i.maxTranslate() && (h = !1, r.resistance && (s.currentTranslate = i.maxTranslate() + 1 - (i.maxTranslate() - s.startTranslate - l) ** E))), h && (a.preventedByNestedSwiper = !0), !i.allowSlideNext && i.swipeDirection === "next" && s.currentTranslate < s.startTranslate && (s.currentTranslate = s.startTranslate), !i.allowSlidePrev && i.swipeDirection === "prev" && s.currentTranslate > s.startTranslate && (s.currentTranslate = s.startTranslate), !i.allowSlidePrev && !i.allowSlideNext && (s.currentTranslate = s.startTranslate), r.threshold > 0)
1561
- if (Math.abs(l) > r.threshold || s.allowThresholdMove) {
1562
- if (!s.allowThresholdMove) {
1563
- s.allowThresholdMove = !0, n.startX = n.currentX, n.startY = n.currentY, s.currentTranslate = s.startTranslate, n.diff = i.isHorizontal() ? n.currentX - n.startX : n.currentY - n.startY;
1564
- return;
1565
- }
1566
- } else {
1567
- s.currentTranslate = s.startTranslate;
1568
- return;
1569
- }
1570
- !r.followFinger || r.cssMode || ((r.freeMode && r.freeMode.enabled && i.freeMode || r.watchSlidesProgress) && (i.updateActiveIndex(), i.updateSlidesClasses()), r.freeMode && r.freeMode.enabled && i.freeMode && i.freeMode.onTouchMove(), i.updateProgress(s.currentTranslate), i.setTranslate(s.currentTranslate));
1571
- }
1572
- function xi(t) {
1573
- const e = this, i = e.touchEventsData;
1574
- let s = t;
1575
- s.originalEvent && (s = s.originalEvent);
1576
- let r;
1577
- if (s.type === "touchend" || s.type === "touchcancel") {
1578
- if (r = [...s.changedTouches].find((b) => b.identifier === i.touchId), !r || r.identifier !== i.touchId) return;
1579
- } else {
1580
- if (i.touchId !== null || s.pointerId !== i.pointerId) return;
1581
- r = s;
1582
- }
1583
- if (["pointercancel", "pointerout", "pointerleave", "contextmenu"].includes(s.type) && !(["pointercancel", "contextmenu"].includes(s.type) && (e.browser.isSafari || e.browser.isWebView)))
1584
- return;
1585
- i.pointerId = null, i.touchId = null;
1586
- const {
1587
- params: c,
1588
- touches: d,
1589
- rtlTranslate: a,
1590
- slidesGrid: m,
1591
- enabled: u
1592
- } = e;
1593
- if (!u || !c.simulateTouch && s.pointerType === "mouse") return;
1594
- if (i.allowTouchCallbacks && e.emit("touchEnd", s), i.allowTouchCallbacks = !1, !i.isTouched) {
1595
- i.isMoved && c.grabCursor && e.setGrabCursor(!1), i.isMoved = !1, i.startMoving = !1;
1596
- return;
1597
- }
1598
- c.grabCursor && i.isMoved && i.isTouched && (e.allowSlideNext === !0 || e.allowSlidePrev === !0) && e.setGrabCursor(!1);
1599
- const p = Ce(), w = p - i.touchStartTime;
1600
- if (e.allowClick) {
1601
- const b = s.path || s.composedPath && s.composedPath();
1602
- e.updateClickedSlide(b && b[0] || s.target, b), e.emit("tap click", s), w < 300 && p - i.lastClickTime < 300 && e.emit("doubleTap doubleClick", s);
1603
- }
1604
- if (i.lastClickTime = Ce(), Ye(() => {
1605
- e.destroyed || (e.allowClick = !0);
1606
- }), !i.isTouched || !i.isMoved || !e.swipeDirection || d.diff === 0 && !i.loopSwapReset || i.currentTranslate === i.startTranslate && !i.loopSwapReset) {
1607
- i.isTouched = !1, i.isMoved = !1, i.startMoving = !1;
1608
- return;
1609
- }
1610
- i.isTouched = !1, i.isMoved = !1, i.startMoving = !1;
1611
- let g;
1612
- if (c.followFinger ? g = a ? e.translate : -e.translate : g = -i.currentTranslate, c.cssMode)
1613
- return;
1614
- if (c.freeMode && c.freeMode.enabled) {
1615
- e.freeMode.onTouchEnd({
1616
- currentPos: g
1617
- });
1618
- return;
1619
- }
1620
- const l = g >= -e.maxTranslate() && !e.params.loop;
1621
- let o = 0, S = e.slidesSizesGrid[0];
1622
- for (let b = 0; b < m.length; b += b < c.slidesPerGroupSkip ? 1 : c.slidesPerGroup) {
1623
- const I = b < c.slidesPerGroupSkip - 1 ? 1 : c.slidesPerGroup;
1624
- typeof m[b + I] < "u" ? (l || g >= m[b] && g < m[b + I]) && (o = b, S = m[b + I] - m[b]) : (l || g >= m[b]) && (o = b, S = m[m.length - 1] - m[m.length - 2]);
1625
- }
1626
- let v = null, f = null;
1627
- c.rewind && (e.isBeginning ? f = c.virtual && c.virtual.enabled && e.virtual ? e.virtual.slides.length - 1 : e.slides.length - 1 : e.isEnd && (v = 0));
1628
- const h = (g - m[o]) / S, E = o < c.slidesPerGroupSkip - 1 ? 1 : c.slidesPerGroup;
1629
- if (w > c.longSwipesMs) {
1630
- if (!c.longSwipes) {
1631
- e.slideTo(e.activeIndex);
1632
- return;
1633
- }
1634
- e.swipeDirection === "next" && (h >= c.longSwipesRatio ? e.slideTo(c.rewind && e.isEnd ? v : o + E) : e.slideTo(o)), e.swipeDirection === "prev" && (h > 1 - c.longSwipesRatio ? e.slideTo(o + E) : f !== null && h < 0 && Math.abs(h) > c.longSwipesRatio ? e.slideTo(f) : e.slideTo(o));
1635
- } else {
1636
- if (!c.shortSwipes) {
1637
- e.slideTo(e.activeIndex);
1638
- return;
1639
- }
1640
- e.navigation && (s.target === e.navigation.nextEl || s.target === e.navigation.prevEl) ? s.target === e.navigation.nextEl ? e.slideTo(o + E) : e.slideTo(o) : (e.swipeDirection === "next" && e.slideTo(v !== null ? v : o + E), e.swipeDirection === "prev" && e.slideTo(f !== null ? f : o));
1641
- }
1642
- }
1643
- function Qe() {
1644
- const t = this, {
1645
- params: e,
1646
- el: i
1647
- } = t;
1648
- if (i && i.offsetWidth === 0) return;
1649
- e.breakpoints && t.setBreakpoint();
1650
- const {
1651
- allowSlideNext: s,
1652
- allowSlidePrev: r,
1653
- snapGrid: n
1654
- } = t, c = t.virtual && t.params.virtual.enabled;
1655
- t.allowSlideNext = !0, t.allowSlidePrev = !0, t.updateSize(), t.updateSlides(), t.updateSlidesClasses();
1656
- const d = c && e.loop;
1657
- (e.slidesPerView === "auto" || e.slidesPerView > 1) && t.isEnd && !t.isBeginning && !t.params.centeredSlides && !d ? t.slideTo(t.slides.length - 1, 0, !1, !0) : t.params.loop && !c ? t.slideToLoop(t.realIndex, 0, !1, !0) : t.slideTo(t.activeIndex, 0, !1, !0), t.autoplay && t.autoplay.running && t.autoplay.paused && (clearTimeout(t.autoplay.resizeTimeout), t.autoplay.resizeTimeout = setTimeout(() => {
1658
- t.autoplay && t.autoplay.running && t.autoplay.paused && t.autoplay.resume();
1659
- }, 500)), t.allowSlidePrev = r, t.allowSlideNext = s, t.params.watchOverflow && n !== t.snapGrid && t.checkOverflow();
1660
- }
1661
- function yi(t) {
1662
- const e = this;
1663
- e.enabled && (e.allowClick || (e.params.preventClicks && t.preventDefault(), e.params.preventClicksPropagation && e.animating && (t.stopPropagation(), t.stopImmediatePropagation())));
1664
- }
1665
- function Ti() {
1666
- const t = this, {
1667
- wrapperEl: e,
1668
- rtlTranslate: i,
1669
- enabled: s
1670
- } = t;
1671
- if (!s) return;
1672
- t.previousTranslate = t.translate, t.isHorizontal() ? t.translate = -e.scrollLeft : t.translate = -e.scrollTop, t.translate === 0 && (t.translate = 0), t.updateActiveIndex(), t.updateSlidesClasses();
1673
- let r;
1674
- const n = t.maxTranslate() - t.minTranslate();
1675
- n === 0 ? r = 0 : r = (t.translate - t.minTranslate()) / n, r !== t.progress && t.updateProgress(i ? -t.translate : t.translate), t.emit("setTranslate", t.translate, !1);
1676
- }
1677
- function Ci(t) {
1678
- const e = this;
1679
- Te(e, t.target), !(e.params.cssMode || e.params.slidesPerView !== "auto" && !e.params.autoHeight) && e.update();
1680
- }
1681
- function Mi() {
1682
- const t = this;
1683
- t.documentTouchHandlerProceeded || (t.documentTouchHandlerProceeded = !0, t.params.touchReleaseOnEdges && (t.el.style.touchAction = "auto"));
1684
- }
1685
- const ot = (t, e) => {
1686
- const i = K(), {
1687
- params: s,
1688
- el: r,
1689
- wrapperEl: n,
1690
- device: c
1691
- } = t, d = !!s.nested, a = e === "on" ? "addEventListener" : "removeEventListener", m = e;
1692
- !r || typeof r == "string" || (i[a]("touchstart", t.onDocumentTouchStart, {
1693
- passive: !1,
1694
- capture: d
1695
- }), r[a]("touchstart", t.onTouchStart, {
1696
- passive: !1
1697
- }), r[a]("pointerdown", t.onTouchStart, {
1698
- passive: !1
1699
- }), i[a]("touchmove", t.onTouchMove, {
1700
- passive: !1,
1701
- capture: d
1702
- }), i[a]("pointermove", t.onTouchMove, {
1703
- passive: !1,
1704
- capture: d
1705
- }), i[a]("touchend", t.onTouchEnd, {
1706
- passive: !0
1707
- }), i[a]("pointerup", t.onTouchEnd, {
1708
- passive: !0
1709
- }), i[a]("pointercancel", t.onTouchEnd, {
1710
- passive: !0
1711
- }), i[a]("touchcancel", t.onTouchEnd, {
1712
- passive: !0
1713
- }), i[a]("pointerout", t.onTouchEnd, {
1714
- passive: !0
1715
- }), i[a]("pointerleave", t.onTouchEnd, {
1716
- passive: !0
1717
- }), i[a]("contextmenu", t.onTouchEnd, {
1718
- passive: !0
1719
- }), (s.preventClicks || s.preventClicksPropagation) && r[a]("click", t.onClick, !0), s.cssMode && n[a]("scroll", t.onScroll), s.updateOnWindowResize ? t[m](c.ios || c.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", Qe, !0) : t[m]("observerUpdate", Qe, !0), r[a]("load", t.onLoad, {
1720
- capture: !0
1721
- }));
1722
- };
1723
- function Pi() {
1724
- const t = this, {
1725
- params: e
1726
- } = t;
1727
- t.onTouchStart = Ei.bind(t), t.onTouchMove = bi.bind(t), t.onTouchEnd = xi.bind(t), t.onDocumentTouchStart = Mi.bind(t), e.cssMode && (t.onScroll = Ti.bind(t)), t.onClick = yi.bind(t), t.onLoad = Ci.bind(t), ot(t, "on");
1728
- }
1729
- function Li() {
1730
- ot(this, "off");
1731
- }
1732
- var zi = {
1733
- attachEvents: Pi,
1734
- detachEvents: Li
1735
- };
1736
- const et = (t, e) => t.grid && e.grid && e.grid.rows > 1;
1737
- function Ii() {
1738
- const t = this, {
1739
- realIndex: e,
1740
- initialized: i,
1741
- params: s,
1742
- el: r
1743
- } = t, n = s.breakpoints;
1744
- if (!n || n && Object.keys(n).length === 0) return;
1745
- const c = K(), d = s.breakpointsBase === "window" || !s.breakpointsBase ? s.breakpointsBase : "container", a = ["window", "container"].includes(s.breakpointsBase) || !s.breakpointsBase ? t.el : c.querySelector(s.breakpointsBase), m = t.getBreakpoint(n, d, a);
1746
- if (!m || t.currentBreakpoint === m) return;
1747
- const p = (m in n ? n[m] : void 0) || t.originalParams, w = et(t, s), g = et(t, p), l = t.params.grabCursor, o = p.grabCursor, S = s.enabled;
1748
- w && !g ? (r.classList.remove(`${s.containerModifierClass}grid`, `${s.containerModifierClass}grid-column`), t.emitContainerClasses()) : !w && g && (r.classList.add(`${s.containerModifierClass}grid`), (p.grid.fill && p.grid.fill === "column" || !p.grid.fill && s.grid.fill === "column") && r.classList.add(`${s.containerModifierClass}grid-column`), t.emitContainerClasses()), l && !o ? t.unsetGrabCursor() : !l && o && t.setGrabCursor(), ["navigation", "pagination", "scrollbar"].forEach((I) => {
1749
- if (typeof p[I] > "u") return;
1750
- const O = s[I] && s[I].enabled, z = p[I] && p[I].enabled;
1751
- O && !z && t[I].disable(), !O && z && t[I].enable();
1752
- });
1753
- const v = p.direction && p.direction !== s.direction, f = s.loop && (p.slidesPerView !== s.slidesPerView || v), h = s.loop;
1754
- v && i && t.changeDirection(), j(t.params, p);
1755
- const E = t.params.enabled, b = t.params.loop;
1756
- Object.assign(t, {
1757
- allowTouchMove: t.params.allowTouchMove,
1758
- allowSlideNext: t.params.allowSlideNext,
1759
- allowSlidePrev: t.params.allowSlidePrev
1760
- }), S && !E ? t.disable() : !S && E && t.enable(), t.currentBreakpoint = m, t.emit("_beforeBreakpoint", p), i && (f ? (t.loopDestroy(), t.loopCreate(e), t.updateSlides()) : !h && b ? (t.loopCreate(e), t.updateSlides()) : h && !b && t.loopDestroy()), t.emit("breakpoint", p);
1761
- }
1762
- function Oi(t, e, i) {
1763
- if (e === void 0 && (e = "window"), !t || e === "container" && !i) return;
1764
- let s = !1;
1765
- const r = X(), n = e === "window" ? r.innerHeight : i.clientHeight, c = Object.keys(t).map((d) => {
1766
- if (typeof d == "string" && d.indexOf("@") === 0) {
1767
- const a = parseFloat(d.substr(1));
1768
- return {
1769
- value: n * a,
1770
- point: d
1771
- };
1772
- }
1773
- return {
1774
- value: d,
1775
- point: d
1776
- };
1777
- });
1778
- c.sort((d, a) => parseInt(d.value, 10) - parseInt(a.value, 10));
1779
- for (let d = 0; d < c.length; d += 1) {
1780
- const {
1781
- point: a,
1782
- value: m
1783
- } = c[d];
1784
- e === "window" ? r.matchMedia(`(min-width: ${m}px)`).matches && (s = a) : m <= i.clientWidth && (s = a);
1785
- }
1786
- return s || "max";
1787
- }
1788
- var Ai = {
1789
- setBreakpoint: Ii,
1790
- getBreakpoint: Oi
1791
- };
1792
- function Di(t, e) {
1793
- const i = [];
1794
- return t.forEach((s) => {
1795
- typeof s == "object" ? Object.keys(s).forEach((r) => {
1796
- s[r] && i.push(e + r);
1797
- }) : typeof s == "string" && i.push(e + s);
1798
- }), i;
1799
- }
1800
- function $i() {
1801
- const t = this, {
1802
- classNames: e,
1803
- params: i,
1804
- rtl: s,
1805
- el: r,
1806
- device: n
1807
- } = t, c = Di(["initialized", i.direction, {
1808
- "free-mode": t.params.freeMode && i.freeMode.enabled
1809
- }, {
1810
- autoheight: i.autoHeight
1811
- }, {
1812
- rtl: s
1813
- }, {
1814
- grid: i.grid && i.grid.rows > 1
1815
- }, {
1816
- "grid-column": i.grid && i.grid.rows > 1 && i.grid.fill === "column"
1817
- }, {
1818
- android: n.android
1819
- }, {
1820
- ios: n.ios
1821
- }, {
1822
- "css-mode": i.cssMode
1823
- }, {
1824
- centered: i.cssMode && i.centeredSlides
1825
- }, {
1826
- "watch-progress": i.watchSlidesProgress
1827
- }], i.containerModifierClass);
1828
- e.push(...c), r.classList.add(...e), t.emitContainerClasses();
1829
- }
1830
- function _i() {
1831
- const t = this, {
1832
- el: e,
1833
- classNames: i
1834
- } = t;
1835
- !e || typeof e == "string" || (e.classList.remove(...i), t.emitContainerClasses());
1836
- }
1837
- var Gi = {
1838
- addClasses: $i,
1839
- removeClasses: _i
1840
- };
1841
- function Bi() {
1842
- const t = this, {
1843
- isLocked: e,
1844
- params: i
1845
- } = t, {
1846
- slidesOffsetBefore: s
1847
- } = i;
1848
- if (s) {
1849
- const r = t.slides.length - 1, n = t.slidesGrid[r] + t.slidesSizesGrid[r] + s * 2;
1850
- t.isLocked = t.size > n;
1851
- } else
1852
- t.isLocked = t.snapGrid.length === 1;
1853
- i.allowSlideNext === !0 && (t.allowSlideNext = !t.isLocked), i.allowSlidePrev === !0 && (t.allowSlidePrev = !t.isLocked), e && e !== t.isLocked && (t.isEnd = !1), e !== t.isLocked && t.emit(t.isLocked ? "lock" : "unlock");
1854
- }
1855
- var Ri = {
1856
- checkOverflow: Bi
1857
- }, Ne = {
1858
- init: !0,
1859
- direction: "horizontal",
1860
- oneWayMovement: !1,
1861
- swiperElementNodeName: "SWIPER-CONTAINER",
1862
- touchEventsTarget: "wrapper",
1863
- initialSlide: 0,
1864
- speed: 300,
1865
- cssMode: !1,
1866
- updateOnWindowResize: !0,
1867
- resizeObserver: !0,
1868
- nested: !1,
1869
- createElements: !1,
1870
- eventsPrefix: "swiper",
1871
- enabled: !0,
1872
- focusableElements: "input, select, option, textarea, button, video, label",
1873
- // Overrides
1874
- width: null,
1875
- height: null,
1876
- //
1877
- preventInteractionOnTransition: !1,
1878
- // ssr
1879
- userAgent: null,
1880
- url: null,
1881
- // To support iOS's swipe-to-go-back gesture (when being used in-app).
1882
- edgeSwipeDetection: !1,
1883
- edgeSwipeThreshold: 20,
1884
- // Autoheight
1885
- autoHeight: !1,
1886
- // Set wrapper width
1887
- setWrapperSize: !1,
1888
- // Virtual Translate
1889
- virtualTranslate: !1,
1890
- // Effects
1891
- effect: "slide",
1892
- // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
1893
- // Breakpoints
1894
- breakpoints: void 0,
1895
- breakpointsBase: "window",
1896
- // Slides grid
1897
- spaceBetween: 0,
1898
- slidesPerView: 1,
1899
- slidesPerGroup: 1,
1900
- slidesPerGroupSkip: 0,
1901
- slidesPerGroupAuto: !1,
1902
- centeredSlides: !1,
1903
- centeredSlidesBounds: !1,
1904
- slidesOffsetBefore: 0,
1905
- // in px
1906
- slidesOffsetAfter: 0,
1907
- // in px
1908
- normalizeSlideIndex: !0,
1909
- centerInsufficientSlides: !1,
1910
- // Disable swiper and hide navigation when container not overflow
1911
- watchOverflow: !0,
1912
- // Round length
1913
- roundLengths: !1,
1914
- // Touches
1915
- touchRatio: 1,
1916
- touchAngle: 45,
1917
- simulateTouch: !0,
1918
- shortSwipes: !0,
1919
- longSwipes: !0,
1920
- longSwipesRatio: 0.5,
1921
- longSwipesMs: 300,
1922
- followFinger: !0,
1923
- allowTouchMove: !0,
1924
- threshold: 5,
1925
- touchMoveStopPropagation: !1,
1926
- touchStartPreventDefault: !0,
1927
- touchStartForcePreventDefault: !1,
1928
- touchReleaseOnEdges: !1,
1929
- // Unique Navigation Elements
1930
- uniqueNavElements: !0,
1931
- // Resistance
1932
- resistance: !0,
1933
- resistanceRatio: 0.85,
1934
- // Progress
1935
- watchSlidesProgress: !1,
1936
- // Cursor
1937
- grabCursor: !1,
1938
- // Clicks
1939
- preventClicks: !0,
1940
- preventClicksPropagation: !0,
1941
- slideToClickedSlide: !1,
1942
- // loop
1943
- loop: !1,
1944
- loopAddBlankSlides: !0,
1945
- loopAdditionalSlides: 0,
1946
- loopPreventsSliding: !0,
1947
- // rewind
1948
- rewind: !1,
1949
- // Swiping/no swiping
1950
- allowSlidePrev: !0,
1951
- allowSlideNext: !0,
1952
- swipeHandler: null,
1953
- // '.swipe-handler',
1954
- noSwiping: !0,
1955
- noSwipingClass: "swiper-no-swiping",
1956
- noSwipingSelector: null,
1957
- // Passive Listeners
1958
- passiveListeners: !0,
1959
- maxBackfaceHiddenSlides: 10,
1960
- // NS
1961
- containerModifierClass: "swiper-",
1962
- // NEW
1963
- slideClass: "swiper-slide",
1964
- slideBlankClass: "swiper-slide-blank",
1965
- slideActiveClass: "swiper-slide-active",
1966
- slideVisibleClass: "swiper-slide-visible",
1967
- slideFullyVisibleClass: "swiper-slide-fully-visible",
1968
- slideNextClass: "swiper-slide-next",
1969
- slidePrevClass: "swiper-slide-prev",
1970
- wrapperClass: "swiper-wrapper",
1971
- lazyPreloaderClass: "swiper-lazy-preloader",
1972
- lazyPreloadPrevNext: 0,
1973
- // Callbacks
1974
- runCallbacksOnInit: !0,
1975
- // Internals
1976
- _emitClasses: !1
1977
- };
1978
- function Vi(t, e) {
1979
- return function(s) {
1980
- s === void 0 && (s = {});
1981
- const r = Object.keys(s)[0], n = s[r];
1982
- if (typeof n != "object" || n === null) {
1983
- j(e, s);
1984
- return;
1985
- }
1986
- if (t[r] === !0 && (t[r] = {
1987
- enabled: !0
1988
- }), r === "navigation" && t[r] && t[r].enabled && !t[r].prevEl && !t[r].nextEl && (t[r].auto = !0), ["pagination", "scrollbar"].indexOf(r) >= 0 && t[r] && t[r].enabled && !t[r].el && (t[r].auto = !0), !(r in t && "enabled" in n)) {
1989
- j(e, s);
1990
- return;
1991
- }
1992
- typeof t[r] == "object" && !("enabled" in t[r]) && (t[r].enabled = !0), t[r] || (t[r] = {
1993
- enabled: !1
1994
- }), j(e, s);
1995
- };
1996
- }
1997
- const Re = {
1998
- eventsEmitter: Gt,
1999
- update: jt,
2000
- translate: Qt,
2001
- transition: si,
2002
- slide: fi,
2003
- loop: hi,
2004
- grabCursor: wi,
2005
- events: zi,
2006
- breakpoints: Ai,
2007
- checkOverflow: Ri,
2008
- classes: Gi
2009
- }, Ve = {};
2010
- let je = class Q {
2011
- constructor() {
2012
- let e, i;
2013
- for (var s = arguments.length, r = new Array(s), n = 0; n < s; n++)
2014
- r[n] = arguments[n];
2015
- r.length === 1 && r[0].constructor && Object.prototype.toString.call(r[0]).slice(8, -1) === "Object" ? i = r[0] : [e, i] = r, i || (i = {}), i = j({}, i), e && !i.el && (i.el = e);
2016
- const c = K();
2017
- if (i.el && typeof i.el == "string" && c.querySelectorAll(i.el).length > 1) {
2018
- const u = [];
2019
- return c.querySelectorAll(i.el).forEach((p) => {
2020
- const w = j({}, i, {
2021
- el: p
2022
- });
2023
- u.push(new Q(w));
2024
- }), u;
2025
- }
2026
- const d = this;
2027
- d.__swiper__ = !0, d.support = nt(), d.device = rt({
2028
- userAgent: i.userAgent
2029
- }), d.browser = at(), d.eventsListeners = {}, d.eventsAnyListeners = [], d.modules = [...d.__modules__], i.modules && Array.isArray(i.modules) && d.modules.push(...i.modules);
2030
- const a = {};
2031
- d.modules.forEach((u) => {
2032
- u({
2033
- params: i,
2034
- swiper: d,
2035
- extendParams: Vi(i, a),
2036
- on: d.on.bind(d),
2037
- once: d.once.bind(d),
2038
- off: d.off.bind(d),
2039
- emit: d.emit.bind(d)
2040
- });
2041
- });
2042
- const m = j({}, Ne, a);
2043
- return d.params = j({}, m, Ve, i), d.originalParams = j({}, d.params), d.passedParams = j({}, i), d.params && d.params.on && Object.keys(d.params.on).forEach((u) => {
2044
- d.on(u, d.params.on[u]);
2045
- }), d.params && d.params.onAny && d.onAny(d.params.onAny), Object.assign(d, {
2046
- enabled: d.params.enabled,
2047
- el: e,
2048
- // Classes
2049
- classNames: [],
2050
- // Slides
2051
- slides: [],
2052
- slidesGrid: [],
2053
- snapGrid: [],
2054
- slidesSizesGrid: [],
2055
- // isDirection
2056
- isHorizontal() {
2057
- return d.params.direction === "horizontal";
2058
- },
2059
- isVertical() {
2060
- return d.params.direction === "vertical";
2061
- },
2062
- // Indexes
2063
- activeIndex: 0,
2064
- realIndex: 0,
2065
- //
2066
- isBeginning: !0,
2067
- isEnd: !1,
2068
- // Props
2069
- translate: 0,
2070
- previousTranslate: 0,
2071
- progress: 0,
2072
- velocity: 0,
2073
- animating: !1,
2074
- cssOverflowAdjustment() {
2075
- return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;
2076
- },
2077
- // Locks
2078
- allowSlideNext: d.params.allowSlideNext,
2079
- allowSlidePrev: d.params.allowSlidePrev,
2080
- // Touch Events
2081
- touchEventsData: {
2082
- isTouched: void 0,
2083
- isMoved: void 0,
2084
- allowTouchCallbacks: void 0,
2085
- touchStartTime: void 0,
2086
- isScrolling: void 0,
2087
- currentTranslate: void 0,
2088
- startTranslate: void 0,
2089
- allowThresholdMove: void 0,
2090
- // Form elements to match
2091
- focusableElements: d.params.focusableElements,
2092
- // Last click time
2093
- lastClickTime: 0,
2094
- clickTimeout: void 0,
2095
- // Velocities
2096
- velocities: [],
2097
- allowMomentumBounce: void 0,
2098
- startMoving: void 0,
2099
- pointerId: null,
2100
- touchId: null
2101
- },
2102
- // Clicks
2103
- allowClick: !0,
2104
- // Touches
2105
- allowTouchMove: d.params.allowTouchMove,
2106
- touches: {
2107
- startX: 0,
2108
- startY: 0,
2109
- currentX: 0,
2110
- currentY: 0,
2111
- diff: 0
2112
- },
2113
- // Images
2114
- imagesToLoad: [],
2115
- imagesLoaded: 0
2116
- }), d.emit("_swiper"), d.params.init && d.init(), d;
2117
- }
2118
- getDirectionLabel(e) {
2119
- return this.isHorizontal() ? e : {
2120
- width: "height",
2121
- "margin-top": "margin-left",
2122
- "margin-bottom ": "margin-right",
2123
- "margin-left": "margin-top",
2124
- "margin-right": "margin-bottom",
2125
- "padding-left": "padding-top",
2126
- "padding-right": "padding-bottom",
2127
- marginRight: "marginBottom"
2128
- }[e];
2129
- }
2130
- getSlideIndex(e) {
2131
- const {
2132
- slidesEl: i,
2133
- params: s
2134
- } = this, r = q(i, `.${s.slideClass}, swiper-slide`), n = Pe(r[0]);
2135
- return Pe(e) - n;
2136
- }
2137
- getSlideIndexByData(e) {
2138
- return this.getSlideIndex(this.slides.find((i) => i.getAttribute("data-swiper-slide-index") * 1 === e));
2139
- }
2140
- recalcSlides() {
2141
- const e = this, {
2142
- slidesEl: i,
2143
- params: s
2144
- } = e;
2145
- e.slides = q(i, `.${s.slideClass}, swiper-slide`);
2146
- }
2147
- enable() {
2148
- const e = this;
2149
- e.enabled || (e.enabled = !0, e.params.grabCursor && e.setGrabCursor(), e.emit("enable"));
2150
- }
2151
- disable() {
2152
- const e = this;
2153
- e.enabled && (e.enabled = !1, e.params.grabCursor && e.unsetGrabCursor(), e.emit("disable"));
2154
- }
2155
- setProgress(e, i) {
2156
- const s = this;
2157
- e = Math.min(Math.max(e, 0), 1);
2158
- const r = s.minTranslate(), c = (s.maxTranslate() - r) * e + r;
2159
- s.translateTo(c, typeof i > "u" ? 0 : i), s.updateActiveIndex(), s.updateSlidesClasses();
2160
- }
2161
- emitContainerClasses() {
2162
- const e = this;
2163
- if (!e.params._emitClasses || !e.el) return;
2164
- const i = e.el.className.split(" ").filter((s) => s.indexOf("swiper") === 0 || s.indexOf(e.params.containerModifierClass) === 0);
2165
- e.emit("_containerClasses", i.join(" "));
2166
- }
2167
- getSlideClasses(e) {
2168
- const i = this;
2169
- return i.destroyed ? "" : e.className.split(" ").filter((s) => s.indexOf("swiper-slide") === 0 || s.indexOf(i.params.slideClass) === 0).join(" ");
2170
- }
2171
- emitSlidesClasses() {
2172
- const e = this;
2173
- if (!e.params._emitClasses || !e.el) return;
2174
- const i = [];
2175
- e.slides.forEach((s) => {
2176
- const r = e.getSlideClasses(s);
2177
- i.push({
2178
- slideEl: s,
2179
- classNames: r
2180
- }), e.emit("_slideClass", s, r);
2181
- }), e.emit("_slideClasses", i);
2182
- }
2183
- slidesPerViewDynamic(e, i) {
2184
- e === void 0 && (e = "current"), i === void 0 && (i = !1);
2185
- const s = this, {
2186
- params: r,
2187
- slides: n,
2188
- slidesGrid: c,
2189
- slidesSizesGrid: d,
2190
- size: a,
2191
- activeIndex: m
2192
- } = s;
2193
- let u = 1;
2194
- if (typeof r.slidesPerView == "number") return r.slidesPerView;
2195
- if (r.centeredSlides) {
2196
- let p = n[m] ? Math.ceil(n[m].swiperSlideSize) : 0, w;
2197
- for (let g = m + 1; g < n.length; g += 1)
2198
- n[g] && !w && (p += Math.ceil(n[g].swiperSlideSize), u += 1, p > a && (w = !0));
2199
- for (let g = m - 1; g >= 0; g -= 1)
2200
- n[g] && !w && (p += n[g].swiperSlideSize, u += 1, p > a && (w = !0));
2201
- } else if (e === "current")
2202
- for (let p = m + 1; p < n.length; p += 1)
2203
- (i ? c[p] + d[p] - c[m] < a : c[p] - c[m] < a) && (u += 1);
2204
- else
2205
- for (let p = m - 1; p >= 0; p -= 1)
2206
- c[m] - c[p] < a && (u += 1);
2207
- return u;
2208
- }
2209
- update() {
2210
- const e = this;
2211
- if (!e || e.destroyed) return;
2212
- const {
2213
- snapGrid: i,
2214
- params: s
2215
- } = e;
2216
- s.breakpoints && e.setBreakpoint(), [...e.el.querySelectorAll('[loading="lazy"]')].forEach((c) => {
2217
- c.complete && Te(e, c);
2218
- }), e.updateSize(), e.updateSlides(), e.updateProgress(), e.updateSlidesClasses();
2219
- function r() {
2220
- const c = e.rtlTranslate ? e.translate * -1 : e.translate, d = Math.min(Math.max(c, e.maxTranslate()), e.minTranslate());
2221
- e.setTranslate(d), e.updateActiveIndex(), e.updateSlidesClasses();
2222
- }
2223
- let n;
2224
- if (s.freeMode && s.freeMode.enabled && !s.cssMode)
2225
- r(), s.autoHeight && e.updateAutoHeight();
2226
- else {
2227
- if ((s.slidesPerView === "auto" || s.slidesPerView > 1) && e.isEnd && !s.centeredSlides) {
2228
- const c = e.virtual && s.virtual.enabled ? e.virtual.slides : e.slides;
2229
- n = e.slideTo(c.length - 1, 0, !1, !0);
2230
- } else
2231
- n = e.slideTo(e.activeIndex, 0, !1, !0);
2232
- n || r();
2233
- }
2234
- s.watchOverflow && i !== e.snapGrid && e.checkOverflow(), e.emit("update");
2235
- }
2236
- changeDirection(e, i) {
2237
- i === void 0 && (i = !0);
2238
- const s = this, r = s.params.direction;
2239
- return e || (e = r === "horizontal" ? "vertical" : "horizontal"), e === r || e !== "horizontal" && e !== "vertical" || (s.el.classList.remove(`${s.params.containerModifierClass}${r}`), s.el.classList.add(`${s.params.containerModifierClass}${e}`), s.emitContainerClasses(), s.params.direction = e, s.slides.forEach((n) => {
2240
- e === "vertical" ? n.style.width = "" : n.style.height = "";
2241
- }), s.emit("changeDirection"), i && s.update()), s;
2242
- }
2243
- changeLanguageDirection(e) {
2244
- const i = this;
2245
- i.rtl && e === "rtl" || !i.rtl && e === "ltr" || (i.rtl = e === "rtl", i.rtlTranslate = i.params.direction === "horizontal" && i.rtl, i.rtl ? (i.el.classList.add(`${i.params.containerModifierClass}rtl`), i.el.dir = "rtl") : (i.el.classList.remove(`${i.params.containerModifierClass}rtl`), i.el.dir = "ltr"), i.update());
2246
- }
2247
- mount(e) {
2248
- const i = this;
2249
- if (i.mounted) return !0;
2250
- let s = e || i.params.el;
2251
- if (typeof s == "string" && (s = document.querySelector(s)), !s)
2252
- return !1;
2253
- s.swiper = i, s.parentNode && s.parentNode.host && s.parentNode.host.nodeName === i.params.swiperElementNodeName.toUpperCase() && (i.isElement = !0);
2254
- const r = () => `.${(i.params.wrapperClass || "").trim().split(" ").join(".")}`;
2255
- let c = s && s.shadowRoot && s.shadowRoot.querySelector ? s.shadowRoot.querySelector(r()) : q(s, r())[0];
2256
- return !c && i.params.createElements && (c = oe("div", i.params.wrapperClass), s.append(c), q(s, `.${i.params.slideClass}`).forEach((d) => {
2257
- c.append(d);
2258
- })), Object.assign(i, {
2259
- el: s,
2260
- wrapperEl: c,
2261
- slidesEl: i.isElement && !s.parentNode.host.slideSlots ? s.parentNode.host : c,
2262
- hostEl: i.isElement ? s.parentNode.host : s,
2263
- mounted: !0,
2264
- // RTL
2265
- rtl: s.dir.toLowerCase() === "rtl" || ne(s, "direction") === "rtl",
2266
- rtlTranslate: i.params.direction === "horizontal" && (s.dir.toLowerCase() === "rtl" || ne(s, "direction") === "rtl"),
2267
- wrongRTL: ne(c, "display") === "-webkit-box"
2268
- }), !0;
2269
- }
2270
- init(e) {
2271
- const i = this;
2272
- if (i.initialized || i.mount(e) === !1) return i;
2273
- i.emit("beforeInit"), i.params.breakpoints && i.setBreakpoint(), i.addClasses(), i.updateSize(), i.updateSlides(), i.params.watchOverflow && i.checkOverflow(), i.params.grabCursor && i.enabled && i.setGrabCursor(), i.params.loop && i.virtual && i.params.virtual.enabled ? i.slideTo(i.params.initialSlide + i.virtual.slidesBefore, 0, i.params.runCallbacksOnInit, !1, !0) : i.slideTo(i.params.initialSlide, 0, i.params.runCallbacksOnInit, !1, !0), i.params.loop && i.loopCreate(), i.attachEvents();
2274
- const r = [...i.el.querySelectorAll('[loading="lazy"]')];
2275
- return i.isElement && r.push(...i.hostEl.querySelectorAll('[loading="lazy"]')), r.forEach((n) => {
2276
- n.complete ? Te(i, n) : n.addEventListener("load", (c) => {
2277
- Te(i, c.target);
2278
- });
2279
- }), He(i), i.initialized = !0, He(i), i.emit("init"), i.emit("afterInit"), i;
2280
- }
2281
- destroy(e, i) {
2282
- e === void 0 && (e = !0), i === void 0 && (i = !0);
2283
- const s = this, {
2284
- params: r,
2285
- el: n,
2286
- wrapperEl: c,
2287
- slides: d
2288
- } = s;
2289
- return typeof s.params > "u" || s.destroyed || (s.emit("beforeDestroy"), s.initialized = !1, s.detachEvents(), r.loop && s.loopDestroy(), i && (s.removeClasses(), n && typeof n != "string" && n.removeAttribute("style"), c && c.removeAttribute("style"), d && d.length && d.forEach((a) => {
2290
- a.classList.remove(r.slideVisibleClass, r.slideFullyVisibleClass, r.slideActiveClass, r.slideNextClass, r.slidePrevClass), a.removeAttribute("style"), a.removeAttribute("data-swiper-slide-index");
2291
- })), s.emit("destroy"), Object.keys(s.eventsListeners).forEach((a) => {
2292
- s.off(a);
2293
- }), e !== !1 && (s.el && typeof s.el != "string" && (s.el.swiper = null), Tt(s)), s.destroyed = !0), null;
2294
- }
2295
- static extendDefaults(e) {
2296
- j(Ve, e);
2297
- }
2298
- static get extendedDefaults() {
2299
- return Ve;
2300
- }
2301
- static get defaults() {
2302
- return Ne;
2303
- }
2304
- static installModule(e) {
2305
- Q.prototype.__modules__ || (Q.prototype.__modules__ = []);
2306
- const i = Q.prototype.__modules__;
2307
- typeof e == "function" && i.indexOf(e) < 0 && i.push(e);
2308
- }
2309
- static use(e) {
2310
- return Array.isArray(e) ? (e.forEach((i) => Q.installModule(i)), Q) : (Q.installModule(e), Q);
2311
- }
2312
- };
2313
- Object.keys(Re).forEach((t) => {
2314
- Object.keys(Re[t]).forEach((e) => {
2315
- je.prototype[e] = Re[t][e];
2316
- });
2317
- });
2318
- je.use([$t, _t]);
2319
- const dt = [
2320
- "eventsPrefix",
2321
- "injectStyles",
2322
- "injectStylesUrls",
2323
- "modules",
2324
- "init",
2325
- "_direction",
2326
- "oneWayMovement",
2327
- "swiperElementNodeName",
2328
- "touchEventsTarget",
2329
- "initialSlide",
2330
- "_speed",
2331
- "cssMode",
2332
- "updateOnWindowResize",
2333
- "resizeObserver",
2334
- "nested",
2335
- "focusableElements",
2336
- "_enabled",
2337
- "_width",
2338
- "_height",
2339
- "preventInteractionOnTransition",
2340
- "userAgent",
2341
- "url",
2342
- "_edgeSwipeDetection",
2343
- "_edgeSwipeThreshold",
2344
- "_freeMode",
2345
- "_autoHeight",
2346
- "setWrapperSize",
2347
- "virtualTranslate",
2348
- "_effect",
2349
- "breakpoints",
2350
- "breakpointsBase",
2351
- "_spaceBetween",
2352
- "_slidesPerView",
2353
- "maxBackfaceHiddenSlides",
2354
- "_grid",
2355
- "_slidesPerGroup",
2356
- "_slidesPerGroupSkip",
2357
- "_slidesPerGroupAuto",
2358
- "_centeredSlides",
2359
- "_centeredSlidesBounds",
2360
- "_slidesOffsetBefore",
2361
- "_slidesOffsetAfter",
2362
- "normalizeSlideIndex",
2363
- "_centerInsufficientSlides",
2364
- "_watchOverflow",
2365
- "roundLengths",
2366
- "touchRatio",
2367
- "touchAngle",
2368
- "simulateTouch",
2369
- "_shortSwipes",
2370
- "_longSwipes",
2371
- "longSwipesRatio",
2372
- "longSwipesMs",
2373
- "_followFinger",
2374
- "allowTouchMove",
2375
- "_threshold",
2376
- "touchMoveStopPropagation",
2377
- "touchStartPreventDefault",
2378
- "touchStartForcePreventDefault",
2379
- "touchReleaseOnEdges",
2380
- "uniqueNavElements",
2381
- "_resistance",
2382
- "_resistanceRatio",
2383
- "_watchSlidesProgress",
2384
- "_grabCursor",
2385
- "preventClicks",
2386
- "preventClicksPropagation",
2387
- "_slideToClickedSlide",
2388
- "_loop",
2389
- "loopAdditionalSlides",
2390
- "loopAddBlankSlides",
2391
- "loopPreventsSliding",
2392
- "_rewind",
2393
- "_allowSlidePrev",
2394
- "_allowSlideNext",
2395
- "_swipeHandler",
2396
- "_noSwiping",
2397
- "noSwipingClass",
2398
- "noSwipingSelector",
2399
- "passiveListeners",
2400
- "containerModifierClass",
2401
- "slideClass",
2402
- "slideActiveClass",
2403
- "slideVisibleClass",
2404
- "slideFullyVisibleClass",
2405
- "slideNextClass",
2406
- "slidePrevClass",
2407
- "slideBlankClass",
2408
- "wrapperClass",
2409
- "lazyPreloaderClass",
2410
- "lazyPreloadPrevNext",
2411
- "runCallbacksOnInit",
2412
- "observer",
2413
- "observeParents",
2414
- "observeSlideChildren",
2415
- // modules
2416
- "a11y",
2417
- "_autoplay",
2418
- "_controller",
2419
- "coverflowEffect",
2420
- "cubeEffect",
2421
- "fadeEffect",
2422
- "flipEffect",
2423
- "creativeEffect",
2424
- "cardsEffect",
2425
- "hashNavigation",
2426
- "history",
2427
- "keyboard",
2428
- "mousewheel",
2429
- "_navigation",
2430
- "_pagination",
2431
- "parallax",
2432
- "_scrollbar",
2433
- "_thumbs",
2434
- "virtual",
2435
- "zoom",
2436
- "control"
2437
- ];
2438
- function ae(t) {
2439
- return typeof t == "object" && t !== null && t.constructor && Object.prototype.toString.call(t).slice(8, -1) === "Object" && !t.__swiper__;
2440
- }
2441
- function le(t, e) {
2442
- const i = ["__proto__", "constructor", "prototype"];
2443
- Object.keys(e).filter((s) => i.indexOf(s) < 0).forEach((s) => {
2444
- typeof t[s] > "u" ? t[s] = e[s] : ae(e[s]) && ae(t[s]) && Object.keys(e[s]).length > 0 ? e[s].__swiper__ ? t[s] = e[s] : le(t[s], e[s]) : t[s] = e[s];
2445
- });
2446
- }
2447
- function ct(t) {
2448
- return t === void 0 && (t = {}), t.navigation && typeof t.navigation.nextEl > "u" && typeof t.navigation.prevEl > "u";
2449
- }
2450
- function ft(t) {
2451
- return t === void 0 && (t = {}), t.pagination && typeof t.pagination.el > "u";
2452
- }
2453
- function ut(t) {
2454
- return t === void 0 && (t = {}), t.scrollbar && typeof t.scrollbar.el > "u";
2455
- }
2456
- function pt(t) {
2457
- t === void 0 && (t = "");
2458
- const e = t.split(" ").map((s) => s.trim()).filter((s) => !!s), i = [];
2459
- return e.forEach((s) => {
2460
- i.indexOf(s) < 0 && i.push(s);
2461
- }), i.join(" ");
2462
- }
2463
- function Yi(t) {
2464
- return t === void 0 && (t = ""), t ? t.includes("swiper-wrapper") ? t : `swiper-wrapper ${t}` : "swiper-wrapper";
2465
- }
2466
- function Wi(t) {
2467
- let {
2468
- swiper: e,
2469
- slides: i,
2470
- passedParams: s,
2471
- changedParams: r,
2472
- nextEl: n,
2473
- prevEl: c,
2474
- scrollbarEl: d,
2475
- paginationEl: a
2476
- } = t;
2477
- const m = r.filter((T) => T !== "children" && T !== "direction" && T !== "wrapperClass"), {
2478
- params: u,
2479
- pagination: p,
2480
- navigation: w,
2481
- scrollbar: g,
2482
- virtual: l,
2483
- thumbs: o
2484
- } = e;
2485
- let S, v, f, h, E, b, I, O;
2486
- r.includes("thumbs") && s.thumbs && s.thumbs.swiper && !s.thumbs.swiper.destroyed && u.thumbs && (!u.thumbs.swiper || u.thumbs.swiper.destroyed) && (S = !0), r.includes("controller") && s.controller && s.controller.control && u.controller && !u.controller.control && (v = !0), r.includes("pagination") && s.pagination && (s.pagination.el || a) && (u.pagination || u.pagination === !1) && p && !p.el && (f = !0), r.includes("scrollbar") && s.scrollbar && (s.scrollbar.el || d) && (u.scrollbar || u.scrollbar === !1) && g && !g.el && (h = !0), r.includes("navigation") && s.navigation && (s.navigation.prevEl || c) && (s.navigation.nextEl || n) && (u.navigation || u.navigation === !1) && w && !w.prevEl && !w.nextEl && (E = !0);
2487
- const z = (T) => {
2488
- e[T] && (e[T].destroy(), T === "navigation" ? (e.isElement && (e[T].prevEl.remove(), e[T].nextEl.remove()), u[T].prevEl = void 0, u[T].nextEl = void 0, e[T].prevEl = void 0, e[T].nextEl = void 0) : (e.isElement && e[T].el.remove(), u[T].el = void 0, e[T].el = void 0));
2489
- };
2490
- r.includes("loop") && e.isElement && (u.loop && !s.loop ? b = !0 : !u.loop && s.loop ? I = !0 : O = !0), m.forEach((T) => {
2491
- if (ae(u[T]) && ae(s[T]))
2492
- Object.assign(u[T], s[T]), (T === "navigation" || T === "pagination" || T === "scrollbar") && "enabled" in s[T] && !s[T].enabled && z(T);
2493
- else {
2494
- const x = s[T];
2495
- (x === !0 || x === !1) && (T === "navigation" || T === "pagination" || T === "scrollbar") ? x === !1 && z(T) : u[T] = s[T];
2496
- }
2497
- }), m.includes("controller") && !v && e.controller && e.controller.control && u.controller && u.controller.control && (e.controller.control = u.controller.control), r.includes("children") && i && l && u.virtual.enabled ? (l.slides = i, l.update(!0)) : r.includes("virtual") && l && u.virtual.enabled && (i && (l.slides = i), l.update(!0)), r.includes("children") && i && u.loop && (O = !0), S && o.init() && o.update(!0), v && (e.controller.control = u.controller.control), f && (e.isElement && (!a || typeof a == "string") && (a = document.createElement("div"), a.classList.add("swiper-pagination"), a.part.add("pagination"), e.el.appendChild(a)), a && (u.pagination.el = a), p.init(), p.render(), p.update()), h && (e.isElement && (!d || typeof d == "string") && (d = document.createElement("div"), d.classList.add("swiper-scrollbar"), d.part.add("scrollbar"), e.el.appendChild(d)), d && (u.scrollbar.el = d), g.init(), g.updateSize(), g.setTranslate()), E && (e.isElement && ((!n || typeof n == "string") && (n = document.createElement("div"), n.classList.add("swiper-button-next"), n.innerHTML = e.hostEl.constructor.nextButtonSvg, n.part.add("button-next"), e.el.appendChild(n)), (!c || typeof c == "string") && (c = document.createElement("div"), c.classList.add("swiper-button-prev"), c.innerHTML = e.hostEl.constructor.prevButtonSvg, c.part.add("button-prev"), e.el.appendChild(c))), n && (u.navigation.nextEl = n), c && (u.navigation.prevEl = c), w.init(), w.update()), r.includes("allowSlideNext") && (e.allowSlideNext = s.allowSlideNext), r.includes("allowSlidePrev") && (e.allowSlidePrev = s.allowSlidePrev), r.includes("direction") && e.changeDirection(s.direction, !1), (b || O) && e.loopDestroy(), (I || O) && e.loopCreate(), e.update();
2498
- }
2499
- function Xi(t, e) {
2500
- t === void 0 && (t = {}), e === void 0 && (e = !0);
2501
- const i = {
2502
- on: {}
2503
- }, s = {}, r = {};
2504
- le(i, Ne), i._emitClasses = !0, i.init = !1;
2505
- const n = {}, c = dt.map((a) => a.replace(/_/, "")), d = Object.assign({}, t);
2506
- return Object.keys(d).forEach((a) => {
2507
- typeof t[a] > "u" || (c.indexOf(a) >= 0 ? ae(t[a]) ? (i[a] = {}, r[a] = {}, le(i[a], t[a]), le(r[a], t[a])) : (i[a] = t[a], r[a] = t[a]) : a.search(/on[A-Z]/) === 0 && typeof t[a] == "function" ? e ? s[`${a[2].toLowerCase()}${a.substr(3)}`] = t[a] : i.on[`${a[2].toLowerCase()}${a.substr(3)}`] = t[a] : n[a] = t[a]);
2508
- }), ["navigation", "pagination", "scrollbar"].forEach((a) => {
2509
- i[a] === !0 && (i[a] = {}), i[a] === !1 && delete i[a];
2510
- }), {
2511
- params: i,
2512
- passedParams: r,
2513
- rest: n,
2514
- events: s
2515
- };
2516
- }
2517
- function ki(t, e) {
2518
- let {
2519
- el: i,
2520
- nextEl: s,
2521
- prevEl: r,
2522
- paginationEl: n,
2523
- scrollbarEl: c,
2524
- swiper: d
2525
- } = t;
2526
- ct(e) && s && r && (d.params.navigation.nextEl = s, d.originalParams.navigation.nextEl = s, d.params.navigation.prevEl = r, d.originalParams.navigation.prevEl = r), ft(e) && n && (d.params.pagination.el = n, d.originalParams.pagination.el = n), ut(e) && c && (d.params.scrollbar.el = c, d.originalParams.scrollbar.el = c), d.init(i);
2527
- }
2528
- function Hi(t, e, i, s, r) {
2529
- const n = [];
2530
- if (!e) return n;
2531
- const c = (a) => {
2532
- n.indexOf(a) < 0 && n.push(a);
2533
- };
2534
- if (i && s) {
2535
- const a = s.map(r), m = i.map(r);
2536
- a.join("") !== m.join("") && c("children"), s.length !== i.length && c("children");
2537
- }
2538
- return dt.filter((a) => a[0] === "_").map((a) => a.replace(/_/, "")).forEach((a) => {
2539
- if (a in t && a in e)
2540
- if (ae(t[a]) && ae(e[a])) {
2541
- const m = Object.keys(t[a]), u = Object.keys(e[a]);
2542
- m.length !== u.length ? c(a) : (m.forEach((p) => {
2543
- t[a][p] !== e[a][p] && c(a);
2544
- }), u.forEach((p) => {
2545
- t[a][p] !== e[a][p] && c(a);
2546
- }));
2547
- } else t[a] !== e[a] && c(a);
2548
- }), n;
2549
- }
2550
- const Ni = (t) => {
2551
- !t || t.destroyed || !t.params.virtual || t.params.virtual && !t.params.virtual.enabled || (t.updateSlides(), t.updateProgress(), t.updateSlidesClasses(), t.parallax && t.params.parallax && t.params.parallax.enabled && t.parallax.setTranslate());
2552
- };
2553
- function Le() {
2554
- return Le = Object.assign ? Object.assign.bind() : function(t) {
2555
- for (var e = 1; e < arguments.length; e++) {
2556
- var i = arguments[e];
2557
- for (var s in i)
2558
- Object.prototype.hasOwnProperty.call(i, s) && (t[s] = i[s]);
2559
- }
2560
- return t;
2561
- }, Le.apply(this, arguments);
2562
- }
2563
- function mt(t) {
2564
- return t.type && t.type.displayName && t.type.displayName.includes("SwiperSlide");
2565
- }
2566
- function ht(t) {
2567
- const e = [];
2568
- return V.Children.toArray(t).forEach((i) => {
2569
- mt(i) ? e.push(i) : i.props && i.props.children && ht(i.props.children).forEach((s) => e.push(s));
2570
- }), e;
2571
- }
2572
- function Fi(t) {
2573
- const e = [], i = {
2574
- "container-start": [],
2575
- "container-end": [],
2576
- "wrapper-start": [],
2577
- "wrapper-end": []
2578
- };
2579
- return V.Children.toArray(t).forEach((s) => {
2580
- if (mt(s))
2581
- e.push(s);
2582
- else if (s.props && s.props.slot && i[s.props.slot])
2583
- i[s.props.slot].push(s);
2584
- else if (s.props && s.props.children) {
2585
- const r = ht(s.props.children);
2586
- r.length > 0 ? r.forEach((n) => e.push(n)) : i["container-end"].push(s);
2587
- } else
2588
- i["container-end"].push(s);
2589
- }), {
2590
- slides: e,
2591
- slots: i
2592
- };
2593
- }
2594
- function ji(t, e, i) {
2595
- if (!i) return null;
2596
- const s = (u) => {
2597
- let p = u;
2598
- return u < 0 ? p = e.length + u : p >= e.length && (p = p - e.length), p;
2599
- }, r = t.isHorizontal() ? {
2600
- [t.rtlTranslate ? "right" : "left"]: `${i.offset}px`
2601
- } : {
2602
- top: `${i.offset}px`
2603
- }, {
2604
- from: n,
2605
- to: c
2606
- } = i, d = t.params.loop ? -e.length : 0, a = t.params.loop ? e.length * 2 : e.length, m = [];
2607
- for (let u = d; u < a; u += 1)
2608
- u >= n && u <= c && m.push(e[s(u)]);
2609
- return m.map((u, p) => /* @__PURE__ */ V.cloneElement(u, {
2610
- swiper: t,
2611
- style: r,
2612
- key: u.props.virtualIndex || u.key || `slide-${p}`
2613
- }));
2614
- }
2615
- function we(t, e) {
2616
- return typeof window > "u" ? R.useEffect(t, e) : R.useLayoutEffect(t, e);
2617
- }
2618
- const tt = /* @__PURE__ */ R.createContext(null), qi = /* @__PURE__ */ R.createContext(null), gt = /* @__PURE__ */ R.forwardRef(function(t, e) {
2619
- let {
2620
- className: i,
2621
- tag: s = "div",
2622
- wrapperTag: r = "div",
2623
- children: n,
2624
- onSwiper: c,
2625
- ...d
2626
- } = t === void 0 ? {} : t, a = !1;
2627
- const [m, u] = R.useState("swiper"), [p, w] = R.useState(null), [g, l] = R.useState(!1), o = R.useRef(!1), S = R.useRef(null), v = R.useRef(null), f = R.useRef(null), h = R.useRef(null), E = R.useRef(null), b = R.useRef(null), I = R.useRef(null), O = R.useRef(null), {
2628
- params: z,
2629
- passedParams: T,
2630
- rest: x,
2631
- events: P
2632
- } = Xi(d), {
2633
- slides: A,
2634
- slots: L
2635
- } = Fi(n), D = () => {
2636
- l(!g);
2637
- };
2638
- Object.assign(z.on, {
2639
- _containerClasses(B, k) {
2640
- u(k);
2641
- }
2642
- });
2643
- const $ = () => {
2644
- Object.assign(z.on, P), a = !0;
2645
- const B = {
2646
- ...z
2647
- };
2648
- if (delete B.wrapperClass, v.current = new je(B), v.current.virtual && v.current.params.virtual.enabled) {
2649
- v.current.virtual.slides = A;
2650
- const k = {
2651
- cache: !1,
2652
- slides: A,
2653
- renderExternal: w,
2654
- renderExternalUpdate: !1
2655
- };
2656
- le(v.current.params.virtual, k), le(v.current.originalParams.virtual, k);
2657
- }
2658
- };
2659
- S.current || $(), v.current && v.current.on("_beforeBreakpoint", D);
2660
- const G = () => {
2661
- a || !P || !v.current || Object.keys(P).forEach((B) => {
2662
- v.current.on(B, P[B]);
2663
- });
2664
- }, Y = () => {
2665
- !P || !v.current || Object.keys(P).forEach((B) => {
2666
- v.current.off(B, P[B]);
2667
- });
2668
- };
2669
- R.useEffect(() => () => {
2670
- v.current && v.current.off("_beforeBreakpoint", D);
2671
- }), R.useEffect(() => {
2672
- !o.current && v.current && (v.current.emitSlidesClasses(), o.current = !0);
2673
- }), we(() => {
2674
- if (e && (e.current = S.current), !!S.current)
2675
- return v.current.destroyed && $(), ki({
2676
- el: S.current,
2677
- nextEl: E.current,
2678
- prevEl: b.current,
2679
- paginationEl: I.current,
2680
- scrollbarEl: O.current,
2681
- swiper: v.current
2682
- }, z), c && !v.current.destroyed && c(v.current), () => {
2683
- v.current && !v.current.destroyed && v.current.destroy(!0, !1);
2684
- };
2685
- }, []), we(() => {
2686
- G();
2687
- const B = Hi(T, f.current, A, h.current, (k) => k.key);
2688
- return f.current = T, h.current = A, B.length && v.current && !v.current.destroyed && Wi({
2689
- swiper: v.current,
2690
- slides: A,
2691
- passedParams: T,
2692
- changedParams: B,
2693
- nextEl: E.current,
2694
- prevEl: b.current,
2695
- scrollbarEl: O.current,
2696
- paginationEl: I.current
2697
- }), () => {
2698
- Y();
2699
- };
2700
- }), we(() => {
2701
- Ni(v.current);
2702
- }, [p]);
2703
- function H() {
2704
- return z.virtual ? ji(v.current, A, p) : A.map((B, k) => /* @__PURE__ */ V.cloneElement(B, {
2705
- swiper: v.current,
2706
- swiperSlideIndex: k
2707
- }));
2708
- }
2709
- return /* @__PURE__ */ V.createElement(s, Le({
2710
- ref: S,
2711
- className: pt(`${m}${i ? ` ${i}` : ""}`)
2712
- }, x), /* @__PURE__ */ V.createElement(qi.Provider, {
2713
- value: v.current
2714
- }, L["container-start"], /* @__PURE__ */ V.createElement(r, {
2715
- className: Yi(z.wrapperClass)
2716
- }, L["wrapper-start"], H(), L["wrapper-end"]), ct(z) && /* @__PURE__ */ V.createElement(V.Fragment, null, /* @__PURE__ */ V.createElement("div", {
2717
- ref: b,
2718
- className: "swiper-button-prev"
2719
- }), /* @__PURE__ */ V.createElement("div", {
2720
- ref: E,
2721
- className: "swiper-button-next"
2722
- })), ut(z) && /* @__PURE__ */ V.createElement("div", {
2723
- ref: O,
2724
- className: "swiper-scrollbar"
2725
- }), ft(z) && /* @__PURE__ */ V.createElement("div", {
2726
- ref: I,
2727
- className: "swiper-pagination"
2728
- }), L["container-end"]));
2729
- });
2730
- gt.displayName = "Swiper";
2731
- const vt = /* @__PURE__ */ R.forwardRef(function(t, e) {
2732
- let {
2733
- tag: i = "div",
2734
- children: s,
2735
- className: r = "",
2736
- swiper: n,
2737
- zoom: c,
2738
- lazy: d,
2739
- virtualIndex: a,
2740
- swiperSlideIndex: m,
2741
- ...u
2742
- } = t === void 0 ? {} : t;
2743
- const p = R.useRef(null), [w, g] = R.useState("swiper-slide"), [l, o] = R.useState(!1);
2744
- function S(E, b, I) {
2745
- b === p.current && g(I);
2746
- }
2747
- we(() => {
2748
- if (typeof m < "u" && (p.current.swiperSlideIndex = m), e && (e.current = p.current), !(!p.current || !n)) {
2749
- if (n.destroyed) {
2750
- w !== "swiper-slide" && g("swiper-slide");
2751
- return;
2752
- }
2753
- return n.on("_slideClass", S), () => {
2754
- n && n.off("_slideClass", S);
2755
- };
2756
- }
2757
- }), we(() => {
2758
- n && p.current && !n.destroyed && g(n.getSlideClasses(p.current));
2759
- }, [n]);
2760
- const v = {
2761
- isActive: w.indexOf("swiper-slide-active") >= 0,
2762
- isVisible: w.indexOf("swiper-slide-visible") >= 0,
2763
- isPrev: w.indexOf("swiper-slide-prev") >= 0,
2764
- isNext: w.indexOf("swiper-slide-next") >= 0
2765
- }, f = () => typeof s == "function" ? s(v) : s, h = () => {
2766
- o(!0);
2767
- };
2768
- return /* @__PURE__ */ V.createElement(i, Le({
2769
- ref: p,
2770
- className: pt(`${w}${r ? ` ${r}` : ""}`),
2771
- "data-swiper-slide-index": a,
2772
- onLoad: h
2773
- }, u), c && /* @__PURE__ */ V.createElement(tt.Provider, {
2774
- value: v
2775
- }, /* @__PURE__ */ V.createElement("div", {
2776
- className: "swiper-zoom-container",
2777
- "data-swiper-zoom": typeof c == "number" ? c : void 0
2778
- }, f(), d && !l && /* @__PURE__ */ V.createElement("div", {
2779
- className: "swiper-lazy-preloader"
2780
- }))), !c && /* @__PURE__ */ V.createElement(tt.Provider, {
2781
- value: v
2782
- }, f(), d && !l && /* @__PURE__ */ V.createElement("div", {
2783
- className: "swiper-lazy-preloader"
2784
- })));
2785
- });
2786
- vt.displayName = "SwiperSlide";
2787
- function Ui(t) {
2788
- let {
2789
- swiper: e,
2790
- extendParams: i,
2791
- on: s,
2792
- emit: r
2793
- } = t;
2794
- i({
2795
- virtual: {
2796
- enabled: !1,
2797
- slides: [],
2798
- cache: !0,
2799
- renderSlide: null,
2800
- renderExternal: null,
2801
- renderExternalUpdate: !0,
2802
- addSlidesBefore: 0,
2803
- addSlidesAfter: 0
2804
- }
2805
- });
2806
- let n;
2807
- const c = K();
2808
- e.virtual = {
2809
- cache: {},
2810
- from: void 0,
2811
- to: void 0,
2812
- slides: [],
2813
- offset: 0,
2814
- slidesGrid: []
2815
- };
2816
- const d = c.createElement("div");
2817
- function a(l, o) {
2818
- const S = e.params.virtual;
2819
- if (S.cache && e.virtual.cache[o])
2820
- return e.virtual.cache[o];
2821
- let v;
2822
- return S.renderSlide ? (v = S.renderSlide.call(e, l, o), typeof v == "string" && (d.innerHTML = v, v = d.children[0])) : e.isElement ? v = oe("swiper-slide") : v = oe("div", e.params.slideClass), v.setAttribute("data-swiper-slide-index", o), S.renderSlide || (v.innerHTML = l), S.cache && (e.virtual.cache[o] = v), v;
2823
- }
2824
- function m(l, o, S) {
2825
- const {
2826
- slidesPerView: v,
2827
- slidesPerGroup: f,
2828
- centeredSlides: h,
2829
- loop: E,
2830
- initialSlide: b
2831
- } = e.params;
2832
- if (o && !E && b > 0)
2833
- return;
2834
- const {
2835
- addSlidesBefore: I,
2836
- addSlidesAfter: O
2837
- } = e.params.virtual, {
2838
- from: z,
2839
- to: T,
2840
- slides: x,
2841
- slidesGrid: P,
2842
- offset: A
2843
- } = e.virtual;
2844
- e.params.cssMode || e.updateActiveIndex();
2845
- const L = typeof S > "u" ? e.activeIndex || 0 : S;
2846
- let D;
2847
- e.rtlTranslate ? D = "right" : D = e.isHorizontal() ? "left" : "top";
2848
- let $, G;
2849
- h ? ($ = Math.floor(v / 2) + f + O, G = Math.floor(v / 2) + f + I) : ($ = v + (f - 1) + O, G = (E ? v : f) + I);
2850
- let Y = L - G, H = L + $;
2851
- E || (Y = Math.max(Y, 0), H = Math.min(H, x.length - 1));
2852
- let B = (e.slidesGrid[Y] || 0) - (e.slidesGrid[0] || 0);
2853
- E && L >= G ? (Y -= G, h || (B += e.slidesGrid[0])) : E && L < G && (Y = -G, h && (B += e.slidesGrid[0])), Object.assign(e.virtual, {
2854
- from: Y,
2855
- to: H,
2856
- offset: B,
2857
- slidesGrid: e.slidesGrid,
2858
- slidesBefore: G,
2859
- slidesAfter: $
2860
- });
2861
- function k() {
2862
- e.updateSlides(), e.updateProgress(), e.updateSlidesClasses(), r("virtualUpdate");
2863
- }
2864
- if (z === Y && T === H && !l) {
2865
- e.slidesGrid !== P && B !== A && e.slides.forEach((y) => {
2866
- y.style[D] = `${B - Math.abs(e.cssOverflowAdjustment())}px`;
2867
- }), e.updateProgress(), r("virtualUpdate");
2868
- return;
2869
- }
2870
- if (e.params.virtual.renderExternal) {
2871
- e.params.virtual.renderExternal.call(e, {
2872
- offset: B,
2873
- from: Y,
2874
- to: H,
2875
- slides: function() {
2876
- const M = [];
2877
- for (let _ = Y; _ <= H; _ += 1)
2878
- M.push(x[_]);
2879
- return M;
2880
- }()
2881
- }), e.params.virtual.renderExternalUpdate ? k() : r("virtualUpdate");
2882
- return;
2883
- }
2884
- const U = [], ee = [], de = (y) => {
2885
- let M = y;
2886
- return y < 0 ? M = x.length + y : M >= x.length && (M = M - x.length), M;
2887
- };
2888
- if (l)
2889
- e.slides.filter((y) => y.matches(`.${e.params.slideClass}, swiper-slide`)).forEach((y) => {
2890
- y.remove();
2891
- });
2892
- else
2893
- for (let y = z; y <= T; y += 1)
2894
- if (y < Y || y > H) {
2895
- const M = de(y);
2896
- e.slides.filter((_) => _.matches(`.${e.params.slideClass}[data-swiper-slide-index="${M}"], swiper-slide[data-swiper-slide-index="${M}"]`)).forEach((_) => {
2897
- _.remove();
2898
- });
2899
- }
2900
- const Se = E ? -x.length : 0, C = E ? x.length * 2 : x.length;
2901
- for (let y = Se; y < C; y += 1)
2902
- if (y >= Y && y <= H) {
2903
- const M = de(y);
2904
- typeof T > "u" || l ? ee.push(M) : (y > T && ee.push(M), y < z && U.push(M));
2905
- }
2906
- if (ee.forEach((y) => {
2907
- e.slidesEl.append(a(x[y], y));
2908
- }), E)
2909
- for (let y = U.length - 1; y >= 0; y -= 1) {
2910
- const M = U[y];
2911
- e.slidesEl.prepend(a(x[M], M));
2912
- }
2913
- else
2914
- U.sort((y, M) => M - y), U.forEach((y) => {
2915
- e.slidesEl.prepend(a(x[y], y));
2916
- });
2917
- q(e.slidesEl, ".swiper-slide, swiper-slide").forEach((y) => {
2918
- y.style[D] = `${B - Math.abs(e.cssOverflowAdjustment())}px`;
2919
- }), k();
2920
- }
2921
- function u(l) {
2922
- if (typeof l == "object" && "length" in l)
2923
- for (let o = 0; o < l.length; o += 1)
2924
- l[o] && e.virtual.slides.push(l[o]);
2925
- else
2926
- e.virtual.slides.push(l);
2927
- m(!0);
2928
- }
2929
- function p(l) {
2930
- const o = e.activeIndex;
2931
- let S = o + 1, v = 1;
2932
- if (Array.isArray(l)) {
2933
- for (let f = 0; f < l.length; f += 1)
2934
- l[f] && e.virtual.slides.unshift(l[f]);
2935
- S = o + l.length, v = l.length;
2936
- } else
2937
- e.virtual.slides.unshift(l);
2938
- if (e.params.virtual.cache) {
2939
- const f = e.virtual.cache, h = {};
2940
- Object.keys(f).forEach((E) => {
2941
- const b = f[E], I = b.getAttribute("data-swiper-slide-index");
2942
- I && b.setAttribute("data-swiper-slide-index", parseInt(I, 10) + v), h[parseInt(E, 10) + v] = b;
2943
- }), e.virtual.cache = h;
2944
- }
2945
- m(!0), e.slideTo(S, 0);
2946
- }
2947
- function w(l) {
2948
- if (typeof l > "u" || l === null) return;
2949
- let o = e.activeIndex;
2950
- if (Array.isArray(l))
2951
- for (let S = l.length - 1; S >= 0; S -= 1)
2952
- e.params.virtual.cache && (delete e.virtual.cache[l[S]], Object.keys(e.virtual.cache).forEach((v) => {
2953
- v > l && (e.virtual.cache[v - 1] = e.virtual.cache[v], e.virtual.cache[v - 1].setAttribute("data-swiper-slide-index", v - 1), delete e.virtual.cache[v]);
2954
- })), e.virtual.slides.splice(l[S], 1), l[S] < o && (o -= 1), o = Math.max(o, 0);
2955
- else
2956
- e.params.virtual.cache && (delete e.virtual.cache[l], Object.keys(e.virtual.cache).forEach((S) => {
2957
- S > l && (e.virtual.cache[S - 1] = e.virtual.cache[S], e.virtual.cache[S - 1].setAttribute("data-swiper-slide-index", S - 1), delete e.virtual.cache[S]);
2958
- })), e.virtual.slides.splice(l, 1), l < o && (o -= 1), o = Math.max(o, 0);
2959
- m(!0), e.slideTo(o, 0);
2960
- }
2961
- function g() {
2962
- e.virtual.slides = [], e.params.virtual.cache && (e.virtual.cache = {}), m(!0), e.slideTo(0, 0);
2963
- }
2964
- s("beforeInit", () => {
2965
- if (!e.params.virtual.enabled) return;
2966
- let l;
2967
- if (typeof e.passedParams.virtual.slides > "u") {
2968
- const o = [...e.slidesEl.children].filter((S) => S.matches(`.${e.params.slideClass}, swiper-slide`));
2969
- o && o.length && (e.virtual.slides = [...o], l = !0, o.forEach((S, v) => {
2970
- S.setAttribute("data-swiper-slide-index", v), e.virtual.cache[v] = S, S.remove();
2971
- }));
2972
- }
2973
- l || (e.virtual.slides = e.params.virtual.slides), e.classNames.push(`${e.params.containerModifierClass}virtual`), e.params.watchSlidesProgress = !0, e.originalParams.watchSlidesProgress = !0, m(!1, !0);
2974
- }), s("setTranslate", () => {
2975
- e.params.virtual.enabled && (e.params.cssMode && !e._immediateVirtual ? (clearTimeout(n), n = setTimeout(() => {
2976
- m();
2977
- }, 100)) : m());
2978
- }), s("init update resize", () => {
2979
- e.params.virtual.enabled && e.params.cssMode && ve(e.wrapperEl, "--swiper-virtual-size", `${e.virtualSize}px`);
2980
- }), Object.assign(e.virtual, {
2981
- appendSlide: u,
2982
- prependSlide: p,
2983
- removeSlide: w,
2984
- removeAllSlides: g,
2985
- update: m
2986
- });
2987
- }
2988
- function Ki(t) {
2989
- let {
2990
- swiper: e,
2991
- extendParams: i,
2992
- on: s,
2993
- emit: r
2994
- } = t;
2995
- const n = K(), c = X();
2996
- e.keyboard = {
2997
- enabled: !1
2998
- }, i({
2999
- keyboard: {
3000
- enabled: !1,
3001
- onlyInViewport: !0,
3002
- pageUpDown: !0
3003
- }
3004
- });
3005
- function d(u) {
3006
- if (!e.enabled) return;
3007
- const {
3008
- rtlTranslate: p
3009
- } = e;
3010
- let w = u;
3011
- w.originalEvent && (w = w.originalEvent);
3012
- const g = w.keyCode || w.charCode, l = e.params.keyboard.pageUpDown, o = l && g === 33, S = l && g === 34, v = g === 37, f = g === 39, h = g === 38, E = g === 40;
3013
- if (!e.allowSlideNext && (e.isHorizontal() && f || e.isVertical() && E || S) || !e.allowSlidePrev && (e.isHorizontal() && v || e.isVertical() && h || o))
3014
- return !1;
3015
- if (!(w.shiftKey || w.altKey || w.ctrlKey || w.metaKey) && !(n.activeElement && n.activeElement.nodeName && (n.activeElement.nodeName.toLowerCase() === "input" || n.activeElement.nodeName.toLowerCase() === "textarea"))) {
3016
- if (e.params.keyboard.onlyInViewport && (o || S || v || f || h || E)) {
3017
- let b = !1;
3018
- if (re(e.el, `.${e.params.slideClass}, swiper-slide`).length > 0 && re(e.el, `.${e.params.slideActiveClass}`).length === 0)
3019
- return;
3020
- const I = e.el, O = I.clientWidth, z = I.clientHeight, T = c.innerWidth, x = c.innerHeight, P = Xe(I);
3021
- p && (P.left -= I.scrollLeft);
3022
- const A = [[P.left, P.top], [P.left + O, P.top], [P.left, P.top + z], [P.left + O, P.top + z]];
3023
- for (let L = 0; L < A.length; L += 1) {
3024
- const D = A[L];
3025
- if (D[0] >= 0 && D[0] <= T && D[1] >= 0 && D[1] <= x) {
3026
- if (D[0] === 0 && D[1] === 0) continue;
3027
- b = !0;
3028
- }
3029
- }
3030
- if (!b) return;
3031
- }
3032
- e.isHorizontal() ? ((o || S || v || f) && (w.preventDefault ? w.preventDefault() : w.returnValue = !1), ((S || f) && !p || (o || v) && p) && e.slideNext(), ((o || v) && !p || (S || f) && p) && e.slidePrev()) : ((o || S || h || E) && (w.preventDefault ? w.preventDefault() : w.returnValue = !1), (S || E) && e.slideNext(), (o || h) && e.slidePrev()), r("keyPress", g);
3033
- }
3034
- }
3035
- function a() {
3036
- e.keyboard.enabled || (n.addEventListener("keydown", d), e.keyboard.enabled = !0);
3037
- }
3038
- function m() {
3039
- e.keyboard.enabled && (n.removeEventListener("keydown", d), e.keyboard.enabled = !1);
3040
- }
3041
- s("init", () => {
3042
- e.params.keyboard.enabled && a();
3043
- }), s("destroy", () => {
3044
- e.keyboard.enabled && m();
3045
- }), Object.assign(e.keyboard, {
3046
- enable: a,
3047
- disable: m
3048
- });
3049
- }
3050
- function wt(t, e, i, s) {
3051
- return t.params.createElements && Object.keys(s).forEach((r) => {
3052
- if (!i[r] && i.auto === !0) {
3053
- let n = q(t.el, `.${s[r]}`)[0];
3054
- n || (n = oe("div", s[r]), n.className = s[r], t.el.append(n)), i[r] = n, e[r] = n;
3055
- }
3056
- }), i;
3057
- }
3058
- function Zi(t) {
3059
- let {
3060
- swiper: e,
3061
- extendParams: i,
3062
- on: s,
3063
- emit: r
3064
- } = t;
3065
- i({
3066
- navigation: {
3067
- nextEl: null,
3068
- prevEl: null,
3069
- hideOnClick: !1,
3070
- disabledClass: "swiper-button-disabled",
3071
- hiddenClass: "swiper-button-hidden",
3072
- lockClass: "swiper-button-lock",
3073
- navigationDisabledClass: "swiper-navigation-disabled"
3074
- }
3075
- }), e.navigation = {
3076
- nextEl: null,
3077
- prevEl: null
3078
- };
3079
- function n(l) {
3080
- let o;
3081
- return l && typeof l == "string" && e.isElement && (o = e.el.querySelector(l) || e.hostEl.querySelector(l), o) ? o : (l && (typeof l == "string" && (o = [...document.querySelectorAll(l)]), e.params.uniqueNavElements && typeof l == "string" && o && o.length > 1 && e.el.querySelectorAll(l).length === 1 ? o = e.el.querySelector(l) : o && o.length === 1 && (o = o[0])), l && !o ? l : o);
3082
- }
3083
- function c(l, o) {
3084
- const S = e.params.navigation;
3085
- l = W(l), l.forEach((v) => {
3086
- v && (v.classList[o ? "add" : "remove"](...S.disabledClass.split(" ")), v.tagName === "BUTTON" && (v.disabled = o), e.params.watchOverflow && e.enabled && v.classList[e.isLocked ? "add" : "remove"](S.lockClass));
3087
- });
3088
- }
3089
- function d() {
3090
- const {
3091
- nextEl: l,
3092
- prevEl: o
3093
- } = e.navigation;
3094
- if (e.params.loop) {
3095
- c(o, !1), c(l, !1);
3096
- return;
3097
- }
3098
- c(o, e.isBeginning && !e.params.rewind), c(l, e.isEnd && !e.params.rewind);
3099
- }
3100
- function a(l) {
3101
- l.preventDefault(), !(e.isBeginning && !e.params.loop && !e.params.rewind) && (e.slidePrev(), r("navigationPrev"));
3102
- }
3103
- function m(l) {
3104
- l.preventDefault(), !(e.isEnd && !e.params.loop && !e.params.rewind) && (e.slideNext(), r("navigationNext"));
3105
- }
3106
- function u() {
3107
- const l = e.params.navigation;
3108
- if (e.params.navigation = wt(e, e.originalParams.navigation, e.params.navigation, {
3109
- nextEl: "swiper-button-next",
3110
- prevEl: "swiper-button-prev"
3111
- }), !(l.nextEl || l.prevEl)) return;
3112
- let o = n(l.nextEl), S = n(l.prevEl);
3113
- Object.assign(e.navigation, {
3114
- nextEl: o,
3115
- prevEl: S
3116
- }), o = W(o), S = W(S);
3117
- const v = (f, h) => {
3118
- f && f.addEventListener("click", h === "next" ? m : a), !e.enabled && f && f.classList.add(...l.lockClass.split(" "));
3119
- };
3120
- o.forEach((f) => v(f, "next")), S.forEach((f) => v(f, "prev"));
3121
- }
3122
- function p() {
3123
- let {
3124
- nextEl: l,
3125
- prevEl: o
3126
- } = e.navigation;
3127
- l = W(l), o = W(o);
3128
- const S = (v, f) => {
3129
- v.removeEventListener("click", f === "next" ? m : a), v.classList.remove(...e.params.navigation.disabledClass.split(" "));
3130
- };
3131
- l.forEach((v) => S(v, "next")), o.forEach((v) => S(v, "prev"));
3132
- }
3133
- s("init", () => {
3134
- e.params.navigation.enabled === !1 ? g() : (u(), d());
3135
- }), s("toEdge fromEdge lock unlock", () => {
3136
- d();
3137
- }), s("destroy", () => {
3138
- p();
3139
- }), s("enable disable", () => {
3140
- let {
3141
- nextEl: l,
3142
- prevEl: o
3143
- } = e.navigation;
3144
- if (l = W(l), o = W(o), e.enabled) {
3145
- d();
3146
- return;
3147
- }
3148
- [...l, ...o].filter((S) => !!S).forEach((S) => S.classList.add(e.params.navigation.lockClass));
3149
- }), s("click", (l, o) => {
3150
- let {
3151
- nextEl: S,
3152
- prevEl: v
3153
- } = e.navigation;
3154
- S = W(S), v = W(v);
3155
- const f = o.target;
3156
- let h = v.includes(f) || S.includes(f);
3157
- if (e.isElement && !h) {
3158
- const E = o.path || o.composedPath && o.composedPath();
3159
- E && (h = E.find((b) => S.includes(b) || v.includes(b)));
3160
- }
3161
- if (e.params.navigation.hideOnClick && !h) {
3162
- if (e.pagination && e.params.pagination && e.params.pagination.clickable && (e.pagination.el === f || e.pagination.el.contains(f))) return;
3163
- let E;
3164
- S.length ? E = S[0].classList.contains(e.params.navigation.hiddenClass) : v.length && (E = v[0].classList.contains(e.params.navigation.hiddenClass)), r(E === !0 ? "navigationShow" : "navigationHide"), [...S, ...v].filter((b) => !!b).forEach((b) => b.classList.toggle(e.params.navigation.hiddenClass));
3165
- }
3166
- });
3167
- const w = () => {
3168
- e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")), u(), d();
3169
- }, g = () => {
3170
- e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")), p();
3171
- };
3172
- Object.assign(e.navigation, {
3173
- enable: w,
3174
- disable: g,
3175
- update: d,
3176
- init: u,
3177
- destroy: p
3178
- });
3179
- }
3180
- function ge(t) {
3181
- return t === void 0 && (t = ""), `.${t.trim().replace(/([\.:!+\/])/g, "\\$1").replace(/ /g, ".")}`;
3182
- }
3183
- function Ji(t) {
3184
- let {
3185
- swiper: e,
3186
- extendParams: i,
3187
- on: s,
3188
- emit: r
3189
- } = t;
3190
- const n = "swiper-pagination";
3191
- i({
3192
- pagination: {
3193
- el: null,
3194
- bulletElement: "span",
3195
- clickable: !1,
3196
- hideOnClick: !1,
3197
- renderBullet: null,
3198
- renderProgressbar: null,
3199
- renderFraction: null,
3200
- renderCustom: null,
3201
- progressbarOpposite: !1,
3202
- type: "bullets",
3203
- // 'bullets' or 'progressbar' or 'fraction' or 'custom'
3204
- dynamicBullets: !1,
3205
- dynamicMainBullets: 1,
3206
- formatFractionCurrent: (f) => f,
3207
- formatFractionTotal: (f) => f,
3208
- bulletClass: `${n}-bullet`,
3209
- bulletActiveClass: `${n}-bullet-active`,
3210
- modifierClass: `${n}-`,
3211
- currentClass: `${n}-current`,
3212
- totalClass: `${n}-total`,
3213
- hiddenClass: `${n}-hidden`,
3214
- progressbarFillClass: `${n}-progressbar-fill`,
3215
- progressbarOppositeClass: `${n}-progressbar-opposite`,
3216
- clickableClass: `${n}-clickable`,
3217
- lockClass: `${n}-lock`,
3218
- horizontalClass: `${n}-horizontal`,
3219
- verticalClass: `${n}-vertical`,
3220
- paginationDisabledClass: `${n}-disabled`
3221
- }
3222
- }), e.pagination = {
3223
- el: null,
3224
- bullets: []
3225
- };
3226
- let c, d = 0;
3227
- function a() {
3228
- return !e.params.pagination.el || !e.pagination.el || Array.isArray(e.pagination.el) && e.pagination.el.length === 0;
3229
- }
3230
- function m(f, h) {
3231
- const {
3232
- bulletActiveClass: E
3233
- } = e.params.pagination;
3234
- f && (f = f[`${h === "prev" ? "previous" : "next"}ElementSibling`], f && (f.classList.add(`${E}-${h}`), f = f[`${h === "prev" ? "previous" : "next"}ElementSibling`], f && f.classList.add(`${E}-${h}-${h}`)));
3235
- }
3236
- function u(f, h, E) {
3237
- if (f = f % E, h = h % E, h === f + 1)
3238
- return "next";
3239
- if (h === f - 1)
3240
- return "previous";
3241
- }
3242
- function p(f) {
3243
- const h = f.target.closest(ge(e.params.pagination.bulletClass));
3244
- if (!h)
3245
- return;
3246
- f.preventDefault();
3247
- const E = Pe(h) * e.params.slidesPerGroup;
3248
- if (e.params.loop) {
3249
- if (e.realIndex === E) return;
3250
- const b = u(e.realIndex, E, e.slides.length);
3251
- b === "next" ? e.slideNext() : b === "previous" ? e.slidePrev() : e.slideToLoop(E);
3252
- } else
3253
- e.slideTo(E);
3254
- }
3255
- function w() {
3256
- const f = e.rtl, h = e.params.pagination;
3257
- if (a()) return;
3258
- let E = e.pagination.el;
3259
- E = W(E);
3260
- let b, I;
3261
- const O = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, z = e.params.loop ? Math.ceil(O / e.params.slidesPerGroup) : e.snapGrid.length;
3262
- if (e.params.loop ? (I = e.previousRealIndex || 0, b = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (b = e.snapIndex, I = e.previousSnapIndex) : (I = e.previousIndex || 0, b = e.activeIndex || 0), h.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
3263
- const T = e.pagination.bullets;
3264
- let x, P, A;
3265
- if (h.dynamicBullets && (c = ke(T[0], e.isHorizontal() ? "width" : "height"), E.forEach((L) => {
3266
- L.style[e.isHorizontal() ? "width" : "height"] = `${c * (h.dynamicMainBullets + 4)}px`;
3267
- }), h.dynamicMainBullets > 1 && I !== void 0 && (d += b - (I || 0), d > h.dynamicMainBullets - 1 ? d = h.dynamicMainBullets - 1 : d < 0 && (d = 0)), x = Math.max(b - d, 0), P = x + (Math.min(T.length, h.dynamicMainBullets) - 1), A = (P + x) / 2), T.forEach((L) => {
3268
- const D = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map(($) => `${h.bulletActiveClass}${$}`)].map(($) => typeof $ == "string" && $.includes(" ") ? $.split(" ") : $).flat();
3269
- L.classList.remove(...D);
3270
- }), E.length > 1)
3271
- T.forEach((L) => {
3272
- const D = Pe(L);
3273
- D === b ? L.classList.add(...h.bulletActiveClass.split(" ")) : e.isElement && L.setAttribute("part", "bullet"), h.dynamicBullets && (D >= x && D <= P && L.classList.add(...`${h.bulletActiveClass}-main`.split(" ")), D === x && m(L, "prev"), D === P && m(L, "next"));
3274
- });
3275
- else {
3276
- const L = T[b];
3277
- if (L && L.classList.add(...h.bulletActiveClass.split(" ")), e.isElement && T.forEach((D, $) => {
3278
- D.setAttribute("part", $ === b ? "bullet-active" : "bullet");
3279
- }), h.dynamicBullets) {
3280
- const D = T[x], $ = T[P];
3281
- for (let G = x; G <= P; G += 1)
3282
- T[G] && T[G].classList.add(...`${h.bulletActiveClass}-main`.split(" "));
3283
- m(D, "prev"), m($, "next");
3284
- }
3285
- }
3286
- if (h.dynamicBullets) {
3287
- const L = Math.min(T.length, h.dynamicMainBullets + 4), D = (c * L - c) / 2 - A * c, $ = f ? "right" : "left";
3288
- T.forEach((G) => {
3289
- G.style[e.isHorizontal() ? $ : "top"] = `${D}px`;
3290
- });
3291
- }
3292
- }
3293
- E.forEach((T, x) => {
3294
- if (h.type === "fraction" && (T.querySelectorAll(ge(h.currentClass)).forEach((P) => {
3295
- P.textContent = h.formatFractionCurrent(b + 1);
3296
- }), T.querySelectorAll(ge(h.totalClass)).forEach((P) => {
3297
- P.textContent = h.formatFractionTotal(z);
3298
- })), h.type === "progressbar") {
3299
- let P;
3300
- h.progressbarOpposite ? P = e.isHorizontal() ? "vertical" : "horizontal" : P = e.isHorizontal() ? "horizontal" : "vertical";
3301
- const A = (b + 1) / z;
3302
- let L = 1, D = 1;
3303
- P === "horizontal" ? L = A : D = A, T.querySelectorAll(ge(h.progressbarFillClass)).forEach(($) => {
3304
- $.style.transform = `translate3d(0,0,0) scaleX(${L}) scaleY(${D})`, $.style.transitionDuration = `${e.params.speed}ms`;
3305
- });
3306
- }
3307
- h.type === "custom" && h.renderCustom ? (T.innerHTML = h.renderCustom(e, b + 1, z), x === 0 && r("paginationRender", T)) : (x === 0 && r("paginationRender", T), r("paginationUpdate", T)), e.params.watchOverflow && e.enabled && T.classList[e.isLocked ? "add" : "remove"](h.lockClass);
3308
- });
3309
- }
3310
- function g() {
3311
- const f = e.params.pagination;
3312
- if (a()) return;
3313
- const h = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.grid && e.params.grid.rows > 1 ? e.slides.length / Math.ceil(e.params.grid.rows) : e.slides.length;
3314
- let E = e.pagination.el;
3315
- E = W(E);
3316
- let b = "";
3317
- if (f.type === "bullets") {
3318
- let I = e.params.loop ? Math.ceil(h / e.params.slidesPerGroup) : e.snapGrid.length;
3319
- e.params.freeMode && e.params.freeMode.enabled && I > h && (I = h);
3320
- for (let O = 0; O < I; O += 1)
3321
- f.renderBullet ? b += f.renderBullet.call(e, O, f.bulletClass) : b += `<${f.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${f.bulletClass}"></${f.bulletElement}>`;
3322
- }
3323
- f.type === "fraction" && (f.renderFraction ? b = f.renderFraction.call(e, f.currentClass, f.totalClass) : b = `<span class="${f.currentClass}"></span> / <span class="${f.totalClass}"></span>`), f.type === "progressbar" && (f.renderProgressbar ? b = f.renderProgressbar.call(e, f.progressbarFillClass) : b = `<span class="${f.progressbarFillClass}"></span>`), e.pagination.bullets = [], E.forEach((I) => {
3324
- f.type !== "custom" && (I.innerHTML = b || ""), f.type === "bullets" && e.pagination.bullets.push(...I.querySelectorAll(ge(f.bulletClass)));
3325
- }), f.type !== "custom" && r("paginationRender", E[0]);
3326
- }
3327
- function l() {
3328
- e.params.pagination = wt(e, e.originalParams.pagination, e.params.pagination, {
3329
- el: "swiper-pagination"
3330
- });
3331
- const f = e.params.pagination;
3332
- if (!f.el) return;
3333
- let h;
3334
- typeof f.el == "string" && e.isElement && (h = e.el.querySelector(f.el)), !h && typeof f.el == "string" && (h = [...document.querySelectorAll(f.el)]), h || (h = f.el), !(!h || h.length === 0) && (e.params.uniqueNavElements && typeof f.el == "string" && Array.isArray(h) && h.length > 1 && (h = [...e.el.querySelectorAll(f.el)], h.length > 1 && (h = h.find((E) => re(E, ".swiper")[0] === e.el))), Array.isArray(h) && h.length === 1 && (h = h[0]), Object.assign(e.pagination, {
3335
- el: h
3336
- }), h = W(h), h.forEach((E) => {
3337
- f.type === "bullets" && f.clickable && E.classList.add(...(f.clickableClass || "").split(" ")), E.classList.add(f.modifierClass + f.type), E.classList.add(e.isHorizontal() ? f.horizontalClass : f.verticalClass), f.type === "bullets" && f.dynamicBullets && (E.classList.add(`${f.modifierClass}${f.type}-dynamic`), d = 0, f.dynamicMainBullets < 1 && (f.dynamicMainBullets = 1)), f.type === "progressbar" && f.progressbarOpposite && E.classList.add(f.progressbarOppositeClass), f.clickable && E.addEventListener("click", p), e.enabled || E.classList.add(f.lockClass);
3338
- }));
3339
- }
3340
- function o() {
3341
- const f = e.params.pagination;
3342
- if (a()) return;
3343
- let h = e.pagination.el;
3344
- h && (h = W(h), h.forEach((E) => {
3345
- E.classList.remove(f.hiddenClass), E.classList.remove(f.modifierClass + f.type), E.classList.remove(e.isHorizontal() ? f.horizontalClass : f.verticalClass), f.clickable && (E.classList.remove(...(f.clickableClass || "").split(" ")), E.removeEventListener("click", p));
3346
- })), e.pagination.bullets && e.pagination.bullets.forEach((E) => E.classList.remove(...f.bulletActiveClass.split(" ")));
3347
- }
3348
- s("changeDirection", () => {
3349
- if (!e.pagination || !e.pagination.el) return;
3350
- const f = e.params.pagination;
3351
- let {
3352
- el: h
3353
- } = e.pagination;
3354
- h = W(h), h.forEach((E) => {
3355
- E.classList.remove(f.horizontalClass, f.verticalClass), E.classList.add(e.isHorizontal() ? f.horizontalClass : f.verticalClass);
3356
- });
3357
- }), s("init", () => {
3358
- e.params.pagination.enabled === !1 ? v() : (l(), g(), w());
3359
- }), s("activeIndexChange", () => {
3360
- typeof e.snapIndex > "u" && w();
3361
- }), s("snapIndexChange", () => {
3362
- w();
3363
- }), s("snapGridLengthChange", () => {
3364
- g(), w();
3365
- }), s("destroy", () => {
3366
- o();
3367
- }), s("enable disable", () => {
3368
- let {
3369
- el: f
3370
- } = e.pagination;
3371
- f && (f = W(f), f.forEach((h) => h.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
3372
- }), s("lock unlock", () => {
3373
- w();
3374
- }), s("click", (f, h) => {
3375
- const E = h.target, b = W(e.pagination.el);
3376
- if (e.params.pagination.el && e.params.pagination.hideOnClick && b && b.length > 0 && !E.classList.contains(e.params.pagination.bulletClass)) {
3377
- if (e.navigation && (e.navigation.nextEl && E === e.navigation.nextEl || e.navigation.prevEl && E === e.navigation.prevEl)) return;
3378
- const I = b[0].classList.contains(e.params.pagination.hiddenClass);
3379
- r(I === !0 ? "paginationShow" : "paginationHide"), b.forEach((O) => O.classList.toggle(e.params.pagination.hiddenClass));
3380
- }
3381
- });
3382
- const S = () => {
3383
- e.el.classList.remove(e.params.pagination.paginationDisabledClass);
3384
- let {
3385
- el: f
3386
- } = e.pagination;
3387
- f && (f = W(f), f.forEach((h) => h.classList.remove(e.params.pagination.paginationDisabledClass))), l(), g(), w();
3388
- }, v = () => {
3389
- e.el.classList.add(e.params.pagination.paginationDisabledClass);
3390
- let {
3391
- el: f
3392
- } = e.pagination;
3393
- f && (f = W(f), f.forEach((h) => h.classList.add(e.params.pagination.paginationDisabledClass))), o();
3394
- };
3395
- Object.assign(e.pagination, {
3396
- enable: S,
3397
- disable: v,
3398
- render: g,
3399
- update: w,
3400
- init: l,
3401
- destroy: o
3402
- });
3403
- }
3404
- function Qi(t) {
3405
- let {
3406
- swiper: e,
3407
- extendParams: i,
3408
- on: s,
3409
- emit: r
3410
- } = t;
3411
- const n = X();
3412
- i({
3413
- zoom: {
3414
- enabled: !1,
3415
- limitToOriginalSize: !1,
3416
- maxRatio: 3,
3417
- minRatio: 1,
3418
- panOnMouseMove: !1,
3419
- toggle: !0,
3420
- containerClass: "swiper-zoom-container",
3421
- zoomedSlideClass: "swiper-slide-zoomed"
3422
- }
3423
- }), e.zoom = {
3424
- enabled: !1
3425
- };
3426
- let c = 1, d = !1, a = !1, m = {
3427
- x: 0,
3428
- y: 0
3429
- };
3430
- const u = -3;
3431
- let p, w;
3432
- const g = [], l = {
3433
- originX: 0,
3434
- originY: 0,
3435
- slideEl: void 0,
3436
- slideWidth: void 0,
3437
- slideHeight: void 0,
3438
- imageEl: void 0,
3439
- imageWrapEl: void 0,
3440
- maxRatio: 3
3441
- }, o = {
3442
- isTouched: void 0,
3443
- isMoved: void 0,
3444
- currentX: void 0,
3445
- currentY: void 0,
3446
- minX: void 0,
3447
- minY: void 0,
3448
- maxX: void 0,
3449
- maxY: void 0,
3450
- width: void 0,
3451
- height: void 0,
3452
- startX: void 0,
3453
- startY: void 0,
3454
- touchesStart: {},
3455
- touchesCurrent: {}
3456
- }, S = {
3457
- x: void 0,
3458
- y: void 0,
3459
- prevPositionX: void 0,
3460
- prevPositionY: void 0,
3461
- prevTime: void 0
3462
- };
3463
- let v = 1;
3464
- Object.defineProperty(e.zoom, "scale", {
3465
- get() {
3466
- return v;
3467
- },
3468
- set(C) {
3469
- if (v !== C) {
3470
- const y = l.imageEl, M = l.slideEl;
3471
- r("zoomChange", C, y, M);
3472
- }
3473
- v = C;
3474
- }
3475
- });
3476
- function f() {
3477
- if (g.length < 2) return 1;
3478
- const C = g[0].pageX, y = g[0].pageY, M = g[1].pageX, _ = g[1].pageY;
3479
- return Math.sqrt((M - C) ** 2 + (_ - y) ** 2);
3480
- }
3481
- function h() {
3482
- const C = e.params.zoom, y = l.imageWrapEl.getAttribute("data-swiper-zoom") || C.maxRatio;
3483
- if (C.limitToOriginalSize && l.imageEl && l.imageEl.naturalWidth) {
3484
- const M = l.imageEl.naturalWidth / l.imageEl.offsetWidth;
3485
- return Math.min(M, y);
3486
- }
3487
- return y;
3488
- }
3489
- function E() {
3490
- if (g.length < 2) return {
3491
- x: null,
3492
- y: null
3493
- };
3494
- const C = l.imageEl.getBoundingClientRect();
3495
- return [(g[0].pageX + (g[1].pageX - g[0].pageX) / 2 - C.x - n.scrollX) / c, (g[0].pageY + (g[1].pageY - g[0].pageY) / 2 - C.y - n.scrollY) / c];
3496
- }
3497
- function b() {
3498
- return e.isElement ? "swiper-slide" : `.${e.params.slideClass}`;
3499
- }
3500
- function I(C) {
3501
- const y = b();
3502
- return !!(C.target.matches(y) || e.slides.filter((M) => M.contains(C.target)).length > 0);
3503
- }
3504
- function O(C) {
3505
- const y = `.${e.params.zoom.containerClass}`;
3506
- return !!(C.target.matches(y) || [...e.hostEl.querySelectorAll(y)].filter((M) => M.contains(C.target)).length > 0);
3507
- }
3508
- function z(C) {
3509
- if (C.pointerType === "mouse" && g.splice(0, g.length), !I(C)) return;
3510
- const y = e.params.zoom;
3511
- if (p = !1, w = !1, g.push(C), !(g.length < 2)) {
3512
- if (p = !0, l.scaleStart = f(), !l.slideEl) {
3513
- l.slideEl = C.target.closest(`.${e.params.slideClass}, swiper-slide`), l.slideEl || (l.slideEl = e.slides[e.activeIndex]);
3514
- let M = l.slideEl.querySelector(`.${y.containerClass}`);
3515
- if (M && (M = M.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]), l.imageEl = M, M ? l.imageWrapEl = re(l.imageEl, `.${y.containerClass}`)[0] : l.imageWrapEl = void 0, !l.imageWrapEl) {
3516
- l.imageEl = void 0;
3517
- return;
3518
- }
3519
- l.maxRatio = h();
3520
- }
3521
- if (l.imageEl) {
3522
- const [M, _] = E();
3523
- l.originX = M, l.originY = _, l.imageEl.style.transitionDuration = "0ms";
3524
- }
3525
- d = !0;
3526
- }
3527
- }
3528
- function T(C) {
3529
- if (!I(C)) return;
3530
- const y = e.params.zoom, M = e.zoom, _ = g.findIndex((N) => N.pointerId === C.pointerId);
3531
- _ >= 0 && (g[_] = C), !(g.length < 2) && (w = !0, l.scaleMove = f(), l.imageEl && (M.scale = l.scaleMove / l.scaleStart * c, M.scale > l.maxRatio && (M.scale = l.maxRatio - 1 + (M.scale - l.maxRatio + 1) ** 0.5), M.scale < y.minRatio && (M.scale = y.minRatio + 1 - (y.minRatio - M.scale + 1) ** 0.5), l.imageEl.style.transform = `translate3d(0,0,0) scale(${M.scale})`));
3532
- }
3533
- function x(C) {
3534
- if (!I(C) || C.pointerType === "mouse" && C.type === "pointerout") return;
3535
- const y = e.params.zoom, M = e.zoom, _ = g.findIndex((N) => N.pointerId === C.pointerId);
3536
- _ >= 0 && g.splice(_, 1), !(!p || !w) && (p = !1, w = !1, l.imageEl && (M.scale = Math.max(Math.min(M.scale, l.maxRatio), y.minRatio), l.imageEl.style.transitionDuration = `${e.params.speed}ms`, l.imageEl.style.transform = `translate3d(0,0,0) scale(${M.scale})`, c = M.scale, d = !1, M.scale > 1 && l.slideEl ? l.slideEl.classList.add(`${y.zoomedSlideClass}`) : M.scale <= 1 && l.slideEl && l.slideEl.classList.remove(`${y.zoomedSlideClass}`), M.scale === 1 && (l.originX = 0, l.originY = 0, l.slideEl = void 0)));
3537
- }
3538
- let P;
3539
- function A() {
3540
- e.touchEventsData.preventTouchMoveFromPointerMove = !1;
3541
- }
3542
- function L() {
3543
- clearTimeout(P), e.touchEventsData.preventTouchMoveFromPointerMove = !0, P = setTimeout(() => {
3544
- e.destroyed || A();
3545
- });
3546
- }
3547
- function D(C) {
3548
- const y = e.device;
3549
- if (!l.imageEl || o.isTouched) return;
3550
- y.android && C.cancelable && C.preventDefault(), o.isTouched = !0;
3551
- const M = g.length > 0 ? g[0] : C;
3552
- o.touchesStart.x = M.pageX, o.touchesStart.y = M.pageY;
3553
- }
3554
- function $(C) {
3555
- const M = C.pointerType === "mouse" && e.params.zoom.panOnMouseMove;
3556
- if (!I(C) || !O(C))
3557
- return;
3558
- const _ = e.zoom;
3559
- if (!l.imageEl)
3560
- return;
3561
- if (!o.isTouched || !l.slideEl) {
3562
- M && H(C);
3563
- return;
3564
- }
3565
- if (M) {
3566
- H(C);
3567
- return;
3568
- }
3569
- o.isMoved || (o.width = l.imageEl.offsetWidth || l.imageEl.clientWidth, o.height = l.imageEl.offsetHeight || l.imageEl.clientHeight, o.startX = We(l.imageWrapEl, "x") || 0, o.startY = We(l.imageWrapEl, "y") || 0, l.slideWidth = l.slideEl.offsetWidth, l.slideHeight = l.slideEl.offsetHeight, l.imageWrapEl.style.transitionDuration = "0ms");
3570
- const N = o.width * _.scale, te = o.height * _.scale;
3571
- if (o.minX = Math.min(l.slideWidth / 2 - N / 2, 0), o.maxX = -o.minX, o.minY = Math.min(l.slideHeight / 2 - te / 2, 0), o.maxY = -o.minY, o.touchesCurrent.x = g.length > 0 ? g[0].pageX : C.pageX, o.touchesCurrent.y = g.length > 0 ? g[0].pageY : C.pageY, Math.max(Math.abs(o.touchesCurrent.x - o.touchesStart.x), Math.abs(o.touchesCurrent.y - o.touchesStart.y)) > 5 && (e.allowClick = !1), !o.isMoved && !d) {
3572
- if (e.isHorizontal() && (Math.floor(o.minX) === Math.floor(o.startX) && o.touchesCurrent.x < o.touchesStart.x || Math.floor(o.maxX) === Math.floor(o.startX) && o.touchesCurrent.x > o.touchesStart.x)) {
3573
- o.isTouched = !1, A();
3574
- return;
3575
- }
3576
- if (!e.isHorizontal() && (Math.floor(o.minY) === Math.floor(o.startY) && o.touchesCurrent.y < o.touchesStart.y || Math.floor(o.maxY) === Math.floor(o.startY) && o.touchesCurrent.y > o.touchesStart.y)) {
3577
- o.isTouched = !1, A();
3578
- return;
3579
- }
3580
- }
3581
- C.cancelable && C.preventDefault(), C.stopPropagation(), L(), o.isMoved = !0;
3582
- const Z = (_.scale - c) / (l.maxRatio - e.params.zoom.minRatio), {
3583
- originX: se,
3584
- originY: F
3585
- } = l;
3586
- o.currentX = o.touchesCurrent.x - o.touchesStart.x + o.startX + Z * (o.width - se * 2), o.currentY = o.touchesCurrent.y - o.touchesStart.y + o.startY + Z * (o.height - F * 2), o.currentX < o.minX && (o.currentX = o.minX + 1 - (o.minX - o.currentX + 1) ** 0.8), o.currentX > o.maxX && (o.currentX = o.maxX - 1 + (o.currentX - o.maxX + 1) ** 0.8), o.currentY < o.minY && (o.currentY = o.minY + 1 - (o.minY - o.currentY + 1) ** 0.8), o.currentY > o.maxY && (o.currentY = o.maxY - 1 + (o.currentY - o.maxY + 1) ** 0.8), S.prevPositionX || (S.prevPositionX = o.touchesCurrent.x), S.prevPositionY || (S.prevPositionY = o.touchesCurrent.y), S.prevTime || (S.prevTime = Date.now()), S.x = (o.touchesCurrent.x - S.prevPositionX) / (Date.now() - S.prevTime) / 2, S.y = (o.touchesCurrent.y - S.prevPositionY) / (Date.now() - S.prevTime) / 2, Math.abs(o.touchesCurrent.x - S.prevPositionX) < 2 && (S.x = 0), Math.abs(o.touchesCurrent.y - S.prevPositionY) < 2 && (S.y = 0), S.prevPositionX = o.touchesCurrent.x, S.prevPositionY = o.touchesCurrent.y, S.prevTime = Date.now(), l.imageWrapEl.style.transform = `translate3d(${o.currentX}px, ${o.currentY}px,0)`;
3587
- }
3588
- function G() {
3589
- const C = e.zoom;
3590
- if (g.length = 0, !l.imageEl) return;
3591
- if (!o.isTouched || !o.isMoved) {
3592
- o.isTouched = !1, o.isMoved = !1;
3593
- return;
3594
- }
3595
- o.isTouched = !1, o.isMoved = !1;
3596
- let y = 300, M = 300;
3597
- const _ = S.x * y, N = o.currentX + _, te = S.y * M, ie = o.currentY + te;
3598
- S.x !== 0 && (y = Math.abs((N - o.currentX) / S.x)), S.y !== 0 && (M = Math.abs((ie - o.currentY) / S.y));
3599
- const Z = Math.max(y, M);
3600
- o.currentX = N, o.currentY = ie;
3601
- const se = o.width * C.scale, F = o.height * C.scale;
3602
- o.minX = Math.min(l.slideWidth / 2 - se / 2, 0), o.maxX = -o.minX, o.minY = Math.min(l.slideHeight / 2 - F / 2, 0), o.maxY = -o.minY, o.currentX = Math.max(Math.min(o.currentX, o.maxX), o.minX), o.currentY = Math.max(Math.min(o.currentY, o.maxY), o.minY), l.imageWrapEl.style.transitionDuration = `${Z}ms`, l.imageWrapEl.style.transform = `translate3d(${o.currentX}px, ${o.currentY}px,0)`;
3603
- }
3604
- function Y() {
3605
- const C = e.zoom;
3606
- l.slideEl && e.activeIndex !== e.slides.indexOf(l.slideEl) && (l.imageEl && (l.imageEl.style.transform = "translate3d(0,0,0) scale(1)"), l.imageWrapEl && (l.imageWrapEl.style.transform = "translate3d(0,0,0)"), l.slideEl.classList.remove(`${e.params.zoom.zoomedSlideClass}`), C.scale = 1, c = 1, l.slideEl = void 0, l.imageEl = void 0, l.imageWrapEl = void 0, l.originX = 0, l.originY = 0);
3607
- }
3608
- function H(C) {
3609
- if (c <= 1 || !l.imageWrapEl || !I(C) || !O(C)) return;
3610
- const y = n.getComputedStyle(l.imageWrapEl).transform, M = new n.DOMMatrix(y);
3611
- if (!a) {
3612
- a = !0, m.x = C.clientX, m.y = C.clientY, o.startX = M.e, o.startY = M.f, o.width = l.imageEl.offsetWidth || l.imageEl.clientWidth, o.height = l.imageEl.offsetHeight || l.imageEl.clientHeight, l.slideWidth = l.slideEl.offsetWidth, l.slideHeight = l.slideEl.offsetHeight;
3613
- return;
3614
- }
3615
- const _ = (C.clientX - m.x) * u, N = (C.clientY - m.y) * u, te = o.width * c, ie = o.height * c, Z = l.slideWidth, se = l.slideHeight, F = Math.min(Z / 2 - te / 2, 0), J = -F, ce = Math.min(se / 2 - ie / 2, 0), Ee = -ce, fe = Math.max(Math.min(o.startX + _, J), F), ue = Math.max(Math.min(o.startY + N, Ee), ce);
3616
- l.imageWrapEl.style.transitionDuration = "0ms", l.imageWrapEl.style.transform = `translate3d(${fe}px, ${ue}px, 0)`, m.x = C.clientX, m.y = C.clientY, o.startX = fe, o.startY = ue;
3617
- }
3618
- function B(C) {
3619
- const y = e.zoom, M = e.params.zoom;
3620
- if (!l.slideEl) {
3621
- C && C.target && (l.slideEl = C.target.closest(`.${e.params.slideClass}, swiper-slide`)), l.slideEl || (e.params.virtual && e.params.virtual.enabled && e.virtual ? l.slideEl = q(e.slidesEl, `.${e.params.slideActiveClass}`)[0] : l.slideEl = e.slides[e.activeIndex]);
3622
- let me = l.slideEl.querySelector(`.${M.containerClass}`);
3623
- me && (me = me.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]), l.imageEl = me, me ? l.imageWrapEl = re(l.imageEl, `.${M.containerClass}`)[0] : l.imageWrapEl = void 0;
3624
- }
3625
- if (!l.imageEl || !l.imageWrapEl) return;
3626
- e.params.cssMode && (e.wrapperEl.style.overflow = "hidden", e.wrapperEl.style.touchAction = "none"), l.slideEl.classList.add(`${M.zoomedSlideClass}`);
3627
- let _, N, te, ie, Z, se, F, J, ce, Ee, fe, ue, be, xe, ze, Ie, Oe, Ae;
3628
- typeof o.touchesStart.x > "u" && C ? (_ = C.pageX, N = C.pageY) : (_ = o.touchesStart.x, N = o.touchesStart.y);
3629
- const pe = typeof C == "number" ? C : null;
3630
- c === 1 && pe && (_ = void 0, N = void 0, o.touchesStart.x = void 0, o.touchesStart.y = void 0);
3631
- const qe = h();
3632
- y.scale = pe || qe, c = pe || qe, C && !(c === 1 && pe) ? (Oe = l.slideEl.offsetWidth, Ae = l.slideEl.offsetHeight, te = Xe(l.slideEl).left + n.scrollX, ie = Xe(l.slideEl).top + n.scrollY, Z = te + Oe / 2 - _, se = ie + Ae / 2 - N, ce = l.imageEl.offsetWidth || l.imageEl.clientWidth, Ee = l.imageEl.offsetHeight || l.imageEl.clientHeight, fe = ce * y.scale, ue = Ee * y.scale, be = Math.min(Oe / 2 - fe / 2, 0), xe = Math.min(Ae / 2 - ue / 2, 0), ze = -be, Ie = -xe, F = Z * y.scale, J = se * y.scale, F < be && (F = be), F > ze && (F = ze), J < xe && (J = xe), J > Ie && (J = Ie)) : (F = 0, J = 0), pe && y.scale === 1 && (l.originX = 0, l.originY = 0), l.imageWrapEl.style.transitionDuration = "300ms", l.imageWrapEl.style.transform = `translate3d(${F}px, ${J}px,0)`, l.imageEl.style.transitionDuration = "300ms", l.imageEl.style.transform = `translate3d(0,0,0) scale(${y.scale})`;
3633
- }
3634
- function k() {
3635
- const C = e.zoom, y = e.params.zoom;
3636
- if (!l.slideEl) {
3637
- e.params.virtual && e.params.virtual.enabled && e.virtual ? l.slideEl = q(e.slidesEl, `.${e.params.slideActiveClass}`)[0] : l.slideEl = e.slides[e.activeIndex];
3638
- let M = l.slideEl.querySelector(`.${y.containerClass}`);
3639
- M && (M = M.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]), l.imageEl = M, M ? l.imageWrapEl = re(l.imageEl, `.${y.containerClass}`)[0] : l.imageWrapEl = void 0;
3640
- }
3641
- !l.imageEl || !l.imageWrapEl || (e.params.cssMode && (e.wrapperEl.style.overflow = "", e.wrapperEl.style.touchAction = ""), C.scale = 1, c = 1, o.touchesStart.x = void 0, o.touchesStart.y = void 0, l.imageWrapEl.style.transitionDuration = "300ms", l.imageWrapEl.style.transform = "translate3d(0,0,0)", l.imageEl.style.transitionDuration = "300ms", l.imageEl.style.transform = "translate3d(0,0,0) scale(1)", l.slideEl.classList.remove(`${y.zoomedSlideClass}`), l.slideEl = void 0, l.originX = 0, l.originY = 0, e.params.zoom.panOnMouseMove && (m = {
3642
- x: 0,
3643
- y: 0
3644
- }, a && (a = !1, o.startX = 0, o.startY = 0)));
3645
- }
3646
- function U(C) {
3647
- const y = e.zoom;
3648
- y.scale && y.scale !== 1 ? k() : B(C);
3649
- }
3650
- function ee() {
3651
- const C = e.params.passiveListeners ? {
3652
- passive: !0,
3653
- capture: !1
3654
- } : !1, y = e.params.passiveListeners ? {
3655
- passive: !1,
3656
- capture: !0
3657
- } : !0;
3658
- return {
3659
- passiveListener: C,
3660
- activeListenerWithCapture: y
3661
- };
3662
- }
3663
- function de() {
3664
- const C = e.zoom;
3665
- if (C.enabled) return;
3666
- C.enabled = !0;
3667
- const {
3668
- passiveListener: y,
3669
- activeListenerWithCapture: M
3670
- } = ee();
3671
- e.wrapperEl.addEventListener("pointerdown", z, y), e.wrapperEl.addEventListener("pointermove", T, M), ["pointerup", "pointercancel", "pointerout"].forEach((_) => {
3672
- e.wrapperEl.addEventListener(_, x, y);
3673
- }), e.wrapperEl.addEventListener("pointermove", $, M);
3674
- }
3675
- function Se() {
3676
- const C = e.zoom;
3677
- if (!C.enabled) return;
3678
- C.enabled = !1;
3679
- const {
3680
- passiveListener: y,
3681
- activeListenerWithCapture: M
3682
- } = ee();
3683
- e.wrapperEl.removeEventListener("pointerdown", z, y), e.wrapperEl.removeEventListener("pointermove", T, M), ["pointerup", "pointercancel", "pointerout"].forEach((_) => {
3684
- e.wrapperEl.removeEventListener(_, x, y);
3685
- }), e.wrapperEl.removeEventListener("pointermove", $, M);
3686
- }
3687
- s("init", () => {
3688
- e.params.zoom.enabled && de();
3689
- }), s("destroy", () => {
3690
- Se();
3691
- }), s("touchStart", (C, y) => {
3692
- e.zoom.enabled && D(y);
3693
- }), s("touchEnd", (C, y) => {
3694
- e.zoom.enabled && G();
3695
- }), s("doubleTap", (C, y) => {
3696
- !e.animating && e.params.zoom.enabled && e.zoom.enabled && e.params.zoom.toggle && U(y);
3697
- }), s("transitionEnd", () => {
3698
- e.zoom.enabled && e.params.zoom.enabled && Y();
3699
- }), s("slideChange", () => {
3700
- e.zoom.enabled && e.params.zoom.enabled && e.params.cssMode && Y();
3701
- }), Object.assign(e.zoom, {
3702
- enable: de,
3703
- disable: Se,
3704
- in: B,
3705
- out: k,
3706
- toggle: U
3707
- });
3708
- }
3709
- const ns = (t) => {
3710
- const e = St.c(26), {
3711
- className: i,
3712
- children: s,
3713
- height: r,
3714
- forceKeyboardNavigation: n
3715
- } = t, c = n === void 0 ? !1 : n, d = V.useRef(null), [a, m] = V.useState(!1);
3716
- let u;
3717
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (u = () => {
3718
- var T, x;
3719
- document.fullscreenElement ? (T = d.current) == null || T.swiper.keyboard.enable() : (x = d.current) == null || x.swiper.keyboard.disable(), m(!!document.fullscreenElement);
3720
- }, e[0] = u) : u = e[0], Et(document, "fullscreenchange", u);
3721
- let p;
3722
- e[1] !== a ? (p = [a], e[1] = a, e[2] = p) : p = e[2], R.useEffect(ts, p);
3723
- let w;
3724
- e[3] !== i ? (w = Ue("relative w-full border rounded bg-background mo-slides-theme prose-slides", i), e[3] = i, e[4] = w) : w = e[4];
3725
- const g = a ? "100%" : r || "550px";
3726
- let l;
3727
- e[5] !== g ? (l = {
3728
- height: g
3729
- }, e[5] = g, e[6] = l) : l = e[6];
3730
- let o, S;
3731
- e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = [Ui, Ki, Ji, Qi, Zi], S = {
3732
- maxRatio: 5
3733
- }, e[7] = o, e[8] = S) : (o = e[7], S = e[8]);
3734
- const v = a || c;
3735
- let f;
3736
- e[9] !== v ? (f = {
3737
- enabled: v
3738
- }, e[9] = v, e[10] = f) : f = e[10];
3739
- let h;
3740
- e[11] === Symbol.for("react.memo_cache_sentinel") ? (h = {
3741
- clickable: !0
3742
- }, e[11] = h) : h = e[11];
3743
- let E;
3744
- if (e[12] !== s || e[13] !== a) {
3745
- let T;
3746
- e[15] !== a ? (T = (x, P) => x == null ? null : /* @__PURE__ */ he.jsx(vt, { children: /* @__PURE__ */ he.jsx("div", { onKeyDown: is, className: Ue("h-full w-full flex box-border overflow-y-auto overflow-x-hidden", a ? "p-20" : "p-6"), children: /* @__PURE__ */ he.jsx("div", { className: "m-auto max-w-full", children: x }) }) }, P), e[15] = a, e[16] = T) : T = e[16], E = V.Children.map(s, T), e[12] = s, e[13] = a, e[14] = E;
3747
- } else
3748
- E = e[14];
3749
- let b;
3750
- e[17] === Symbol.for("react.memo_cache_sentinel") ? (b = async () => {
3751
- if (!d.current)
3752
- return;
3753
- const T = d.current;
3754
- document.fullscreenElement ? (await document.exitFullscreen(), m(!1)) : (await T.requestFullscreen(), m(!0));
3755
- }, e[17] = b) : b = e[17];
3756
- const I = a ? "Exit Fullscreen" : "Fullscreen";
3757
- let O;
3758
- e[18] !== I ? (O = /* @__PURE__ */ he.jsx(bt, { variant: "link", size: "sm", "data-testid": "marimo-plugin-slides-fullscreen", onClick: b, className: "absolute bottom-0 right-0 z-10 mx-1 mb-0", children: I }), e[18] = I, e[19] = O) : O = e[19];
3759
- let z;
3760
- return e[20] !== f || e[21] !== E || e[22] !== O || e[23] !== w || e[24] !== l ? (z = /* @__PURE__ */ he.jsxs(gt, { ref: d, className: w, spaceBetween: 50, style: l, slidesPerView: 1, modules: o, zoom: S, simulateTouch: !1, keyboard: f, navigation: !0, pagination: h, virtual: !0, children: [
3761
- E,
3762
- O
3763
- ] }), e[20] = f, e[21] = E, e[22] = O, e[23] = w, e[24] = l, e[25] = z) : z = e[25], z;
3764
- };
3765
- function es() {
3766
- window.dispatchEvent(new Event("resize"));
3767
- }
3768
- function ts() {
3769
- requestAnimationFrame(es);
3770
- }
3771
- function is(t) {
3772
- t.target instanceof HTMLElement && t.target.tagName.toLocaleLowerCase().startsWith("marimo-") && t.stopPropagation();
3773
- }
3774
- export {
3775
- ns as default
3776
- };