@caseparts-org/caseblocks 0.0.173 → 0.0.175
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.
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as an, jsx as ot } from "react/jsx-runtime";
|
|
2
|
+
import ln, { useRef as Gt, useState as Ut, useCallback as fn, useEffect as It } from "react";
|
|
3
3
|
import { getHideAtStyles as dn } from "../../atoms/HideAt.js";
|
|
4
|
-
import { c as
|
|
5
|
-
import { s as
|
|
4
|
+
import { c as $t } from "../../clsx-OuTLNxxd.js";
|
|
5
|
+
import { s as st, P as pn, N as mn } from "../../CarouselArrowButtons-Dx_S017g.js";
|
|
6
6
|
import { useDotButton as gn, DotButton as hn } from "./CarouselDotButton.js";
|
|
7
7
|
import { usePrevNextButtons as yn } from "./usePrevNextButtons.js";
|
|
8
8
|
function Sn(t) {
|
|
9
9
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function qt(t) {
|
|
12
12
|
return Sn(t) || Array.isArray(t);
|
|
13
13
|
}
|
|
14
14
|
function bn() {
|
|
15
15
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
const e = Object.keys(t),
|
|
19
|
-
if (e.length !==
|
|
20
|
-
const c = JSON.stringify(Object.keys(t.breakpoints || {})),
|
|
21
|
-
return c !==
|
|
22
|
-
const u = t[o],
|
|
23
|
-
return typeof u == "function" ? `${u}` == `${
|
|
17
|
+
function Ot(t, n) {
|
|
18
|
+
const e = Object.keys(t), r = Object.keys(n);
|
|
19
|
+
if (e.length !== r.length) return !1;
|
|
20
|
+
const c = JSON.stringify(Object.keys(t.breakpoints || {})), s = JSON.stringify(Object.keys(n.breakpoints || {}));
|
|
21
|
+
return c !== s ? !1 : e.every((o) => {
|
|
22
|
+
const u = t[o], i = n[o];
|
|
23
|
+
return typeof u == "function" ? `${u}` == `${i}` : !qt(u) || !qt(i) ? u === i : Ot(u, i);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function Kt(t) {
|
|
27
27
|
return t.concat().sort((n, e) => n.name > e.name ? 1 : -1).map((n) => n.options);
|
|
28
28
|
}
|
|
29
29
|
function xn(t, n) {
|
|
30
30
|
if (t.length !== n.length) return !1;
|
|
31
|
-
const e =
|
|
32
|
-
return e.every((c,
|
|
33
|
-
const o =
|
|
34
|
-
return
|
|
31
|
+
const e = Kt(t), r = Kt(n);
|
|
32
|
+
return e.every((c, s) => {
|
|
33
|
+
const o = r[s];
|
|
34
|
+
return Ot(c, o);
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function At(t) {
|
|
38
38
|
return typeof t == "number";
|
|
39
39
|
}
|
|
40
40
|
function Tt(t) {
|
|
@@ -43,24 +43,24 @@ function Tt(t) {
|
|
|
43
43
|
function St(t) {
|
|
44
44
|
return typeof t == "boolean";
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function _t(t) {
|
|
47
47
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
48
48
|
}
|
|
49
49
|
function N(t) {
|
|
50
50
|
return Math.abs(t);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function wt(t) {
|
|
53
53
|
return Math.sign(t);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function ft(t, n) {
|
|
56
56
|
return N(t - n);
|
|
57
57
|
}
|
|
58
58
|
function En(t, n) {
|
|
59
59
|
if (t === 0 || n === 0 || N(t) <= N(n)) return 0;
|
|
60
|
-
const e =
|
|
60
|
+
const e = ft(N(t), N(n));
|
|
61
61
|
return N(e / t);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function vn(t) {
|
|
64
64
|
return Math.round(t * 100) / 100;
|
|
65
65
|
}
|
|
66
66
|
function dt(t) {
|
|
@@ -72,41 +72,41 @@ function K(t) {
|
|
|
72
72
|
function gt(t) {
|
|
73
73
|
return Math.max(0, t.length - 1);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Mt(t, n) {
|
|
76
76
|
return n === gt(t);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return Array.from(Array(t), (e,
|
|
78
|
+
function Qt(t, n = 0) {
|
|
79
|
+
return Array.from(Array(t), (e, r) => n + r);
|
|
80
80
|
}
|
|
81
81
|
function pt(t) {
|
|
82
82
|
return Object.keys(t);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
return [t, n].reduce((e,
|
|
86
|
-
const
|
|
87
|
-
e[c] = u ?
|
|
84
|
+
function Jt(t, n) {
|
|
85
|
+
return [t, n].reduce((e, r) => (pt(r).forEach((c) => {
|
|
86
|
+
const s = e[c], o = r[c], u = _t(s) && _t(o);
|
|
87
|
+
e[c] = u ? Jt(s, o) : o;
|
|
88
88
|
}), e), {});
|
|
89
89
|
}
|
|
90
90
|
function Dt(t, n) {
|
|
91
91
|
return typeof n.MouseEvent < "u" && t instanceof n.MouseEvent;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function Ln(t, n) {
|
|
94
94
|
const e = {
|
|
95
|
-
start:
|
|
95
|
+
start: r,
|
|
96
96
|
center: c,
|
|
97
|
-
end:
|
|
97
|
+
end: s
|
|
98
98
|
};
|
|
99
|
-
function
|
|
99
|
+
function r() {
|
|
100
100
|
return 0;
|
|
101
101
|
}
|
|
102
|
-
function c(
|
|
103
|
-
return
|
|
102
|
+
function c(i) {
|
|
103
|
+
return s(i) / 2;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return n -
|
|
105
|
+
function s(i) {
|
|
106
|
+
return n - i;
|
|
107
107
|
}
|
|
108
|
-
function o(
|
|
109
|
-
return Tt(t) ? e[t](
|
|
108
|
+
function o(i, a) {
|
|
109
|
+
return Tt(t) ? e[t](i) : t(n, i, a);
|
|
110
110
|
}
|
|
111
111
|
return {
|
|
112
112
|
measure: o
|
|
@@ -114,54 +114,54 @@ function In(t, n) {
|
|
|
114
114
|
}
|
|
115
115
|
function mt() {
|
|
116
116
|
let t = [];
|
|
117
|
-
function n(c,
|
|
117
|
+
function n(c, s, o, u = {
|
|
118
118
|
passive: !0
|
|
119
119
|
}) {
|
|
120
|
-
let
|
|
120
|
+
let i;
|
|
121
121
|
if ("addEventListener" in c)
|
|
122
|
-
c.addEventListener(
|
|
122
|
+
c.addEventListener(s, o, u), i = () => c.removeEventListener(s, o, u);
|
|
123
123
|
else {
|
|
124
124
|
const a = c;
|
|
125
|
-
a.addListener(o),
|
|
125
|
+
a.addListener(o), i = () => a.removeListener(o);
|
|
126
126
|
}
|
|
127
|
-
return t.push(
|
|
127
|
+
return t.push(i), r;
|
|
128
128
|
}
|
|
129
129
|
function e() {
|
|
130
130
|
t = t.filter((c) => c());
|
|
131
131
|
}
|
|
132
|
-
const
|
|
132
|
+
const r = {
|
|
133
133
|
add: n,
|
|
134
134
|
clear: e
|
|
135
135
|
};
|
|
136
|
-
return
|
|
136
|
+
return r;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
const c = mt(),
|
|
140
|
-
let o = null, u = 0,
|
|
138
|
+
function In(t, n, e, r) {
|
|
139
|
+
const c = mt(), s = 1e3 / 60;
|
|
140
|
+
let o = null, u = 0, i = 0;
|
|
141
141
|
function a() {
|
|
142
142
|
c.add(t, "visibilitychange", () => {
|
|
143
|
-
t.hidden &&
|
|
143
|
+
t.hidden && f();
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
function h() {
|
|
147
147
|
S(), c.clear();
|
|
148
148
|
}
|
|
149
149
|
function d(g) {
|
|
150
|
-
if (!
|
|
150
|
+
if (!i) return;
|
|
151
151
|
o || (o = g, e(), e());
|
|
152
|
-
const
|
|
153
|
-
for (o = g, u +=
|
|
154
|
-
e(), u -=
|
|
155
|
-
const y = u /
|
|
156
|
-
|
|
152
|
+
const l = g - o;
|
|
153
|
+
for (o = g, u += l; u >= s; )
|
|
154
|
+
e(), u -= s;
|
|
155
|
+
const y = u / s;
|
|
156
|
+
r(y), i && (i = n.requestAnimationFrame(d));
|
|
157
157
|
}
|
|
158
158
|
function m() {
|
|
159
|
-
|
|
159
|
+
i || (i = n.requestAnimationFrame(d));
|
|
160
160
|
}
|
|
161
161
|
function S() {
|
|
162
|
-
n.cancelAnimationFrame(
|
|
162
|
+
n.cancelAnimationFrame(i), o = null, u = 0, i = 0;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function f() {
|
|
165
165
|
o = null, u = 0;
|
|
166
166
|
}
|
|
167
167
|
return {
|
|
@@ -170,49 +170,49 @@ function vn(t, n, e, i) {
|
|
|
170
170
|
start: m,
|
|
171
171
|
stop: S,
|
|
172
172
|
update: e,
|
|
173
|
-
render:
|
|
173
|
+
render: r
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
const e = n === "rtl",
|
|
178
|
-
function a(
|
|
176
|
+
function Tn(t, n) {
|
|
177
|
+
const e = n === "rtl", r = t === "y", c = r ? "y" : "x", s = r ? "x" : "y", o = !r && e ? -1 : 1, u = h(), i = d();
|
|
178
|
+
function a(f) {
|
|
179
179
|
const {
|
|
180
180
|
height: p,
|
|
181
181
|
width: g
|
|
182
|
-
} =
|
|
183
|
-
return
|
|
182
|
+
} = f;
|
|
183
|
+
return r ? p : g;
|
|
184
184
|
}
|
|
185
185
|
function h() {
|
|
186
|
-
return
|
|
186
|
+
return r ? "top" : e ? "right" : "left";
|
|
187
187
|
}
|
|
188
188
|
function d() {
|
|
189
|
-
return
|
|
189
|
+
return r ? "bottom" : e ? "left" : "right";
|
|
190
190
|
}
|
|
191
|
-
function m(
|
|
192
|
-
return
|
|
191
|
+
function m(f) {
|
|
192
|
+
return f * o;
|
|
193
193
|
}
|
|
194
194
|
return {
|
|
195
195
|
scroll: c,
|
|
196
|
-
cross:
|
|
196
|
+
cross: s,
|
|
197
197
|
startEdge: u,
|
|
198
|
-
endEdge:
|
|
198
|
+
endEdge: i,
|
|
199
199
|
measureSize: a,
|
|
200
200
|
direction: m
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function rt(t = 0, n = 0) {
|
|
204
204
|
const e = N(t - n);
|
|
205
|
-
function
|
|
205
|
+
function r(a) {
|
|
206
206
|
return a < t;
|
|
207
207
|
}
|
|
208
208
|
function c(a) {
|
|
209
209
|
return a > n;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
return
|
|
211
|
+
function s(a) {
|
|
212
|
+
return r(a) || c(a);
|
|
213
213
|
}
|
|
214
214
|
function o(a) {
|
|
215
|
-
return
|
|
215
|
+
return s(a) ? r(a) ? t : n : a;
|
|
216
216
|
}
|
|
217
217
|
function u(a) {
|
|
218
218
|
return e ? a - e * Math.ceil((a - n) / e) : a;
|
|
@@ -222,97 +222,97 @@ function st(t = 0, n = 0) {
|
|
|
222
222
|
max: n,
|
|
223
223
|
min: t,
|
|
224
224
|
constrain: o,
|
|
225
|
-
reachedAny:
|
|
225
|
+
reachedAny: s,
|
|
226
226
|
reachedMax: c,
|
|
227
|
-
reachedMin:
|
|
227
|
+
reachedMin: r,
|
|
228
228
|
removeOffset: u
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Xt(t, n, e) {
|
|
232
232
|
const {
|
|
233
|
-
constrain:
|
|
234
|
-
} =
|
|
235
|
-
let
|
|
233
|
+
constrain: r
|
|
234
|
+
} = rt(0, t), c = t + 1;
|
|
235
|
+
let s = o(n);
|
|
236
236
|
function o(m) {
|
|
237
|
-
return e ? N((c + m) % c) :
|
|
237
|
+
return e ? N((c + m) % c) : r(m);
|
|
238
238
|
}
|
|
239
239
|
function u() {
|
|
240
|
-
return
|
|
240
|
+
return s;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
return
|
|
242
|
+
function i(m) {
|
|
243
|
+
return s = o(m), d;
|
|
244
244
|
}
|
|
245
245
|
function a(m) {
|
|
246
246
|
return h().set(u() + m);
|
|
247
247
|
}
|
|
248
248
|
function h() {
|
|
249
|
-
return
|
|
249
|
+
return Xt(t, u(), e);
|
|
250
250
|
}
|
|
251
251
|
const d = {
|
|
252
252
|
get: u,
|
|
253
|
-
set:
|
|
253
|
+
set: i,
|
|
254
254
|
add: a,
|
|
255
255
|
clone: h
|
|
256
256
|
};
|
|
257
257
|
return d;
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function Dn(t, n, e, r, c, s, o, u, i, a, h, d, m, S, f, p, g, l, y) {
|
|
260
260
|
const {
|
|
261
261
|
cross: b,
|
|
262
|
-
direction:
|
|
263
|
-
} = t, D = ["INPUT", "SELECT", "TEXTAREA"],
|
|
262
|
+
direction: L
|
|
263
|
+
} = t, D = ["INPUT", "SELECT", "TEXTAREA"], I = {
|
|
264
264
|
passive: !1
|
|
265
|
-
},
|
|
265
|
+
}, E = mt(), v = mt(), T = rt(50, 225).constrain(S.measure(20)), P = {
|
|
266
266
|
mouse: 300,
|
|
267
267
|
touch: 400
|
|
268
|
-
},
|
|
268
|
+
}, O = {
|
|
269
269
|
mouse: 500,
|
|
270
270
|
touch: 600
|
|
271
|
-
},
|
|
272
|
-
let U = !1, A = 0,
|
|
271
|
+
}, k = f ? 43 : 25;
|
|
272
|
+
let U = !1, A = 0, F = 0, z = !1, H = !1, $ = !1, q = !1;
|
|
273
273
|
function _(x) {
|
|
274
274
|
if (!y) return;
|
|
275
275
|
function w(j) {
|
|
276
276
|
(St(y) || y(x, j)) && ut(j);
|
|
277
277
|
}
|
|
278
278
|
const C = n;
|
|
279
|
-
|
|
280
|
-
},
|
|
279
|
+
E.add(C, "dragstart", (j) => j.preventDefault(), I).add(C, "touchmove", () => {
|
|
280
|
+
}, I).add(C, "touchend", () => {
|
|
281
281
|
}).add(C, "touchstart", w).add(C, "mousedown", w).add(C, "touchcancel", B).add(C, "contextmenu", B).add(C, "click", Z, !0);
|
|
282
282
|
}
|
|
283
283
|
function R() {
|
|
284
|
-
|
|
284
|
+
E.clear(), v.clear();
|
|
285
285
|
}
|
|
286
286
|
function J() {
|
|
287
287
|
const x = q ? e : n;
|
|
288
|
-
|
|
288
|
+
v.add(x, "touchmove", V, I).add(x, "touchend", B).add(x, "mousemove", V, I).add(x, "mouseup", B);
|
|
289
289
|
}
|
|
290
290
|
function X(x) {
|
|
291
291
|
const w = x.nodeName || "";
|
|
292
292
|
return D.includes(w);
|
|
293
293
|
}
|
|
294
294
|
function Y() {
|
|
295
|
-
return (
|
|
295
|
+
return (f ? O : P)[q ? "mouse" : "touch"];
|
|
296
296
|
}
|
|
297
297
|
function ct(x, w) {
|
|
298
|
-
const C = d.add(
|
|
299
|
-
return
|
|
298
|
+
const C = d.add(wt(x) * -1), j = h.byDistance(x, !f).distance;
|
|
299
|
+
return f || N(x) < T ? j : g && w ? j * 0.5 : h.byIndex(C.get(), 0).distance;
|
|
300
300
|
}
|
|
301
301
|
function ut(x) {
|
|
302
|
-
const w = Dt(x,
|
|
303
|
-
q = w, $ =
|
|
302
|
+
const w = Dt(x, r);
|
|
303
|
+
q = w, $ = f && w && !x.buttons && U, U = ft(c.get(), o.get()) >= 2, !(w && x.button !== 0) && (X(x.target) || (z = !0, s.pointerDown(x), a.useFriction(0).useDuration(0), c.set(o), J(), A = s.readPoint(x), F = s.readPoint(x, b), m.emit("pointerDown")));
|
|
304
304
|
}
|
|
305
305
|
function V(x) {
|
|
306
|
-
if (!Dt(x,
|
|
307
|
-
const C =
|
|
306
|
+
if (!Dt(x, r) && x.touches.length >= 2) return B(x);
|
|
307
|
+
const C = s.readPoint(x), j = s.readPoint(x, b), Q = ft(C, A), W = ft(j, F);
|
|
308
308
|
if (!H && !q && (!x.cancelable || (H = Q > W, !H)))
|
|
309
309
|
return B(x);
|
|
310
|
-
const nt =
|
|
311
|
-
Q > p && ($ = !0), a.useFriction(0.3).useDuration(0.75), u.start(), c.add(
|
|
310
|
+
const nt = s.pointerMove(x);
|
|
311
|
+
Q > p && ($ = !0), a.useFriction(0.3).useDuration(0.75), u.start(), c.add(L(nt)), x.preventDefault();
|
|
312
312
|
}
|
|
313
313
|
function B(x) {
|
|
314
|
-
const C = h.byDistance(0, !1).index !== d.get(), j =
|
|
315
|
-
H = !1, z = !1,
|
|
314
|
+
const C = h.byDistance(0, !1).index !== d.get(), j = s.pointerUp(x) * Y(), Q = ct(L(j), C), W = En(j, Q), nt = k - 10 * W, tt = l + W / 50;
|
|
315
|
+
H = !1, z = !1, v.clear(), a.useDuration(nt).useFriction(tt), i.distance(Q, !f), q = !1, m.emit("pointerUp");
|
|
316
316
|
}
|
|
317
317
|
function Z(x) {
|
|
318
318
|
$ && (x.stopPropagation(), x.preventDefault(), $ = !1);
|
|
@@ -326,30 +326,30 @@ function Tn(t, n, e, i, c, r, o, u, s, a, h, d, m, S, l, p, g, f, y) {
|
|
|
326
326
|
pointerDown: G
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
let
|
|
331
|
-
function
|
|
329
|
+
function On(t, n) {
|
|
330
|
+
let r, c;
|
|
331
|
+
function s(d) {
|
|
332
332
|
return d.timeStamp;
|
|
333
333
|
}
|
|
334
334
|
function o(d, m) {
|
|
335
|
-
const
|
|
336
|
-
return (Dt(d, n) ? d : d.touches[0])[
|
|
335
|
+
const f = `client${(m || t.scroll) === "x" ? "X" : "Y"}`;
|
|
336
|
+
return (Dt(d, n) ? d : d.touches[0])[f];
|
|
337
337
|
}
|
|
338
338
|
function u(d) {
|
|
339
|
-
return
|
|
339
|
+
return r = d, c = d, o(d);
|
|
340
340
|
}
|
|
341
|
-
function
|
|
342
|
-
const m = o(d) - o(c), S =
|
|
343
|
-
return c = d, S && (
|
|
341
|
+
function i(d) {
|
|
342
|
+
const m = o(d) - o(c), S = s(d) - s(r) > 170;
|
|
343
|
+
return c = d, S && (r = d), m;
|
|
344
344
|
}
|
|
345
345
|
function a(d) {
|
|
346
|
-
if (!
|
|
347
|
-
const m = o(c) - o(
|
|
348
|
-
return S && !
|
|
346
|
+
if (!r || !c) return 0;
|
|
347
|
+
const m = o(c) - o(r), S = s(d) - s(r), f = s(d) - s(c) > 170, p = m / S;
|
|
348
|
+
return S && !f && N(p) > 0.1 ? p : 0;
|
|
349
349
|
}
|
|
350
350
|
return {
|
|
351
351
|
pointerDown: u,
|
|
352
|
-
pointerMove:
|
|
352
|
+
pointerMove: i,
|
|
353
353
|
pointerUp: a,
|
|
354
354
|
readPoint: o
|
|
355
355
|
};
|
|
@@ -357,17 +357,17 @@ function Dn(t, n) {
|
|
|
357
357
|
function An() {
|
|
358
358
|
function t(e) {
|
|
359
359
|
const {
|
|
360
|
-
offsetTop:
|
|
360
|
+
offsetTop: r,
|
|
361
361
|
offsetLeft: c,
|
|
362
|
-
offsetWidth:
|
|
362
|
+
offsetWidth: s,
|
|
363
363
|
offsetHeight: o
|
|
364
364
|
} = e;
|
|
365
365
|
return {
|
|
366
|
-
top:
|
|
367
|
-
right: c +
|
|
368
|
-
bottom:
|
|
366
|
+
top: r,
|
|
367
|
+
right: c + s,
|
|
368
|
+
bottom: r + o,
|
|
369
369
|
left: c,
|
|
370
|
-
width:
|
|
370
|
+
width: s,
|
|
371
371
|
height: o
|
|
372
372
|
};
|
|
373
373
|
}
|
|
@@ -376,59 +376,59 @@ function An() {
|
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
378
|
function wn(t) {
|
|
379
|
-
function n(
|
|
380
|
-
return t * (
|
|
379
|
+
function n(r) {
|
|
380
|
+
return t * (r / 100);
|
|
381
381
|
}
|
|
382
382
|
return {
|
|
383
383
|
measure: n
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
|
-
function Mn(t, n, e,
|
|
387
|
-
const u = [t].concat(
|
|
388
|
-
let
|
|
386
|
+
function Mn(t, n, e, r, c, s, o) {
|
|
387
|
+
const u = [t].concat(r);
|
|
388
|
+
let i, a, h = [], d = !1;
|
|
389
389
|
function m(g) {
|
|
390
390
|
return c.measureSize(o.measure(g));
|
|
391
391
|
}
|
|
392
392
|
function S(g) {
|
|
393
|
-
if (!
|
|
394
|
-
a = m(t), h =
|
|
395
|
-
function
|
|
393
|
+
if (!s) return;
|
|
394
|
+
a = m(t), h = r.map(m);
|
|
395
|
+
function l(y) {
|
|
396
396
|
for (const b of y) {
|
|
397
397
|
if (d) return;
|
|
398
|
-
const
|
|
399
|
-
if (N(
|
|
398
|
+
const L = b.target === t, D = r.indexOf(b.target), I = L ? a : h[D], E = m(L ? t : r[D]);
|
|
399
|
+
if (N(E - I) >= 0.5) {
|
|
400
400
|
g.reInit(), n.emit("resize");
|
|
401
401
|
break;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
-
|
|
406
|
-
(St(
|
|
405
|
+
i = new ResizeObserver((y) => {
|
|
406
|
+
(St(s) || s(g, y)) && l(y);
|
|
407
407
|
}), e.requestAnimationFrame(() => {
|
|
408
|
-
u.forEach((y) =>
|
|
408
|
+
u.forEach((y) => i.observe(y));
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
d = !0,
|
|
411
|
+
function f() {
|
|
412
|
+
d = !0, i && i.disconnect();
|
|
413
413
|
}
|
|
414
414
|
return {
|
|
415
415
|
init: S,
|
|
416
|
-
destroy:
|
|
416
|
+
destroy: f
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
function Nn(t, n, e,
|
|
420
|
-
let o = 0, u = 0,
|
|
419
|
+
function Nn(t, n, e, r, c, s) {
|
|
420
|
+
let o = 0, u = 0, i = c, a = s, h = t.get(), d = 0;
|
|
421
421
|
function m() {
|
|
422
|
-
const
|
|
423
|
-
let
|
|
424
|
-
return
|
|
422
|
+
const I = r.get() - t.get(), E = !i;
|
|
423
|
+
let v = 0;
|
|
424
|
+
return E ? (o = 0, e.set(r), t.set(r), v = I) : (e.set(t), o += I / i, o *= a, h += o, t.add(o), v = h - d), u = wt(v), d = h, D;
|
|
425
425
|
}
|
|
426
426
|
function S() {
|
|
427
|
-
const
|
|
428
|
-
return N(
|
|
427
|
+
const I = r.get() - n.get();
|
|
428
|
+
return N(I) < 1e-3;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
return
|
|
430
|
+
function f() {
|
|
431
|
+
return i;
|
|
432
432
|
}
|
|
433
433
|
function p() {
|
|
434
434
|
return u;
|
|
@@ -436,44 +436,44 @@ function Nn(t, n, e, i, c, r) {
|
|
|
436
436
|
function g() {
|
|
437
437
|
return o;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function l() {
|
|
440
440
|
return b(c);
|
|
441
441
|
}
|
|
442
442
|
function y() {
|
|
443
|
-
return
|
|
443
|
+
return L(s);
|
|
444
444
|
}
|
|
445
|
-
function b(
|
|
446
|
-
return
|
|
445
|
+
function b(I) {
|
|
446
|
+
return i = I, D;
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
return a =
|
|
448
|
+
function L(I) {
|
|
449
|
+
return a = I, D;
|
|
450
450
|
}
|
|
451
451
|
const D = {
|
|
452
452
|
direction: p,
|
|
453
|
-
duration:
|
|
453
|
+
duration: f,
|
|
454
454
|
velocity: g,
|
|
455
455
|
seek: m,
|
|
456
456
|
settled: S,
|
|
457
457
|
useBaseFriction: y,
|
|
458
|
-
useBaseDuration:
|
|
459
|
-
useFriction:
|
|
458
|
+
useBaseDuration: l,
|
|
459
|
+
useFriction: L,
|
|
460
460
|
useDuration: b
|
|
461
461
|
};
|
|
462
462
|
return D;
|
|
463
463
|
}
|
|
464
|
-
function Pn(t, n, e,
|
|
465
|
-
const
|
|
466
|
-
let
|
|
464
|
+
function Pn(t, n, e, r, c) {
|
|
465
|
+
const s = c.measure(10), o = c.measure(50), u = rt(0.1, 0.99);
|
|
466
|
+
let i = !1;
|
|
467
467
|
function a() {
|
|
468
|
-
return !(
|
|
468
|
+
return !(i || !t.reachedAny(e.get()) || !t.reachedAny(n.get()));
|
|
469
469
|
}
|
|
470
470
|
function h(S) {
|
|
471
471
|
if (!a()) return;
|
|
472
|
-
const
|
|
473
|
-
e.subtract(g *
|
|
472
|
+
const f = t.reachedMin(n.get()) ? "min" : "max", p = N(t[f] - n.get()), g = e.get() - n.get(), l = u.constrain(p / o);
|
|
473
|
+
e.subtract(g * l), !S && N(g) < s && (e.set(t.constrain(e.get())), r.useDuration(25).useBaseFriction());
|
|
474
474
|
}
|
|
475
475
|
function d(S) {
|
|
476
|
-
|
|
476
|
+
i = !S;
|
|
477
477
|
}
|
|
478
478
|
return {
|
|
479
479
|
shouldConstrain: a,
|
|
@@ -481,56 +481,56 @@ function Pn(t, n, e, i, c) {
|
|
|
481
481
|
toggleActive: d
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
|
-
function Cn(t, n, e,
|
|
485
|
-
const
|
|
486
|
-
function a(
|
|
487
|
-
return
|
|
484
|
+
function Cn(t, n, e, r, c) {
|
|
485
|
+
const s = rt(-n + t, 0), o = d(), u = h(), i = m();
|
|
486
|
+
function a(f, p) {
|
|
487
|
+
return ft(f, p) <= 1;
|
|
488
488
|
}
|
|
489
489
|
function h() {
|
|
490
|
-
const
|
|
491
|
-
return
|
|
490
|
+
const f = o[0], p = K(o), g = o.lastIndexOf(f), l = o.indexOf(p) + 1;
|
|
491
|
+
return rt(g, l);
|
|
492
492
|
}
|
|
493
493
|
function d() {
|
|
494
|
-
return e.map((
|
|
494
|
+
return e.map((f, p) => {
|
|
495
495
|
const {
|
|
496
496
|
min: g,
|
|
497
|
-
max:
|
|
498
|
-
} =
|
|
499
|
-
return b ?
|
|
500
|
-
}).map((
|
|
497
|
+
max: l
|
|
498
|
+
} = s, y = s.constrain(f), b = !p, L = Mt(e, p);
|
|
499
|
+
return b ? l : L || a(g, y) ? g : a(l, y) ? l : y;
|
|
500
|
+
}).map((f) => parseFloat(f.toFixed(3)));
|
|
501
501
|
}
|
|
502
502
|
function m() {
|
|
503
|
-
if (n <= t + c) return [
|
|
504
|
-
if (
|
|
503
|
+
if (n <= t + c) return [s.max];
|
|
504
|
+
if (r === "keepSnaps") return o;
|
|
505
505
|
const {
|
|
506
|
-
min:
|
|
506
|
+
min: f,
|
|
507
507
|
max: p
|
|
508
508
|
} = u;
|
|
509
|
-
return o.slice(
|
|
509
|
+
return o.slice(f, p);
|
|
510
510
|
}
|
|
511
511
|
return {
|
|
512
|
-
snapsContained:
|
|
512
|
+
snapsContained: i,
|
|
513
513
|
scrollContainLimit: u
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
|
-
function
|
|
517
|
-
const
|
|
516
|
+
function kn(t, n, e) {
|
|
517
|
+
const r = n[0], c = e ? r - t : K(n);
|
|
518
518
|
return {
|
|
519
|
-
limit:
|
|
519
|
+
limit: rt(c, r)
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
const
|
|
522
|
+
function Fn(t, n, e, r) {
|
|
523
|
+
const s = n.min + 0.1, o = n.max + 0.1, {
|
|
524
524
|
reachedMin: u,
|
|
525
|
-
reachedMax:
|
|
526
|
-
} =
|
|
525
|
+
reachedMax: i
|
|
526
|
+
} = rt(s, o);
|
|
527
527
|
function a(m) {
|
|
528
|
-
return m === 1 ?
|
|
528
|
+
return m === 1 ? i(e.get()) : m === -1 ? u(e.get()) : !1;
|
|
529
529
|
}
|
|
530
530
|
function h(m) {
|
|
531
531
|
if (!a(m)) return;
|
|
532
532
|
const S = t * (m * -1);
|
|
533
|
-
|
|
533
|
+
r.forEach((f) => f.add(S));
|
|
534
534
|
}
|
|
535
535
|
return {
|
|
536
536
|
loop: h
|
|
@@ -541,108 +541,108 @@ function Bn(t) {
|
|
|
541
541
|
max: n,
|
|
542
542
|
length: e
|
|
543
543
|
} = t;
|
|
544
|
-
function
|
|
545
|
-
const o =
|
|
544
|
+
function r(s) {
|
|
545
|
+
const o = s - n;
|
|
546
546
|
return e ? o / -e : 0;
|
|
547
547
|
}
|
|
548
548
|
return {
|
|
549
|
-
get:
|
|
549
|
+
get: r
|
|
550
550
|
};
|
|
551
551
|
}
|
|
552
|
-
function jn(t, n, e,
|
|
552
|
+
function jn(t, n, e, r, c) {
|
|
553
553
|
const {
|
|
554
|
-
startEdge:
|
|
554
|
+
startEdge: s,
|
|
555
555
|
endEdge: o
|
|
556
556
|
} = t, {
|
|
557
557
|
groupSlides: u
|
|
558
|
-
} = c,
|
|
558
|
+
} = c, i = d().map(n.measure), a = m(), h = S();
|
|
559
559
|
function d() {
|
|
560
|
-
return u(
|
|
560
|
+
return u(r).map((p) => K(p)[o] - p[0][s]).map(N);
|
|
561
561
|
}
|
|
562
562
|
function m() {
|
|
563
|
-
return
|
|
563
|
+
return r.map((p) => e[s] - p[s]).map((p) => -N(p));
|
|
564
564
|
}
|
|
565
565
|
function S() {
|
|
566
|
-
return u(a).map((p) => p[0]).map((p, g) => p +
|
|
566
|
+
return u(a).map((p) => p[0]).map((p, g) => p + i[g]);
|
|
567
567
|
}
|
|
568
568
|
return {
|
|
569
569
|
snaps: a,
|
|
570
570
|
snapsAligned: h
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
|
-
function Vn(t, n, e,
|
|
573
|
+
function Vn(t, n, e, r, c, s) {
|
|
574
574
|
const {
|
|
575
575
|
groupSlides: o
|
|
576
576
|
} = c, {
|
|
577
577
|
min: u,
|
|
578
|
-
max:
|
|
579
|
-
} =
|
|
578
|
+
max: i
|
|
579
|
+
} = r, a = h();
|
|
580
580
|
function h() {
|
|
581
|
-
const m = o(
|
|
582
|
-
return e.length === 1 ? [
|
|
583
|
-
const
|
|
584
|
-
if (
|
|
581
|
+
const m = o(s), S = !t || n === "keepSnaps";
|
|
582
|
+
return e.length === 1 ? [s] : S ? m : m.slice(u, i).map((f, p, g) => {
|
|
583
|
+
const l = !p, y = Mt(g, p);
|
|
584
|
+
if (l) {
|
|
585
585
|
const b = K(g[0]) + 1;
|
|
586
|
-
return
|
|
586
|
+
return Qt(b);
|
|
587
587
|
}
|
|
588
588
|
if (y) {
|
|
589
|
-
const b = gt(
|
|
590
|
-
return
|
|
589
|
+
const b = gt(s) - K(g)[0] + 1;
|
|
590
|
+
return Qt(b, K(g)[0]);
|
|
591
591
|
}
|
|
592
|
-
return
|
|
592
|
+
return f;
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
595
|
return {
|
|
596
596
|
slideRegistry: a
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
|
-
function zn(t, n, e,
|
|
599
|
+
function zn(t, n, e, r, c) {
|
|
600
600
|
const {
|
|
601
|
-
reachedAny:
|
|
601
|
+
reachedAny: s,
|
|
602
602
|
removeOffset: o,
|
|
603
603
|
constrain: u
|
|
604
|
-
} =
|
|
605
|
-
function
|
|
606
|
-
return
|
|
604
|
+
} = r;
|
|
605
|
+
function i(f) {
|
|
606
|
+
return f.concat().sort((p, g) => N(p) - N(g))[0];
|
|
607
607
|
}
|
|
608
|
-
function a(
|
|
609
|
-
const p = t ? o(
|
|
608
|
+
function a(f) {
|
|
609
|
+
const p = t ? o(f) : u(f), g = n.map((y, b) => ({
|
|
610
610
|
diff: h(y - p, 0),
|
|
611
611
|
index: b
|
|
612
612
|
})).sort((y, b) => N(y.diff) - N(b.diff)), {
|
|
613
|
-
index:
|
|
613
|
+
index: l
|
|
614
614
|
} = g[0];
|
|
615
615
|
return {
|
|
616
|
-
index:
|
|
616
|
+
index: l,
|
|
617
617
|
distance: p
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
|
-
function h(
|
|
621
|
-
const g = [
|
|
622
|
-
if (!t) return
|
|
623
|
-
if (!p) return
|
|
624
|
-
const
|
|
625
|
-
return
|
|
620
|
+
function h(f, p) {
|
|
621
|
+
const g = [f, f + e, f - e];
|
|
622
|
+
if (!t) return f;
|
|
623
|
+
if (!p) return i(g);
|
|
624
|
+
const l = g.filter((y) => wt(y) === p);
|
|
625
|
+
return l.length ? i(l) : K(g) - e;
|
|
626
626
|
}
|
|
627
|
-
function d(
|
|
628
|
-
const g = n[
|
|
627
|
+
function d(f, p) {
|
|
628
|
+
const g = n[f] - c.get(), l = h(g, p);
|
|
629
629
|
return {
|
|
630
|
-
index:
|
|
631
|
-
distance:
|
|
630
|
+
index: f,
|
|
631
|
+
distance: l
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
|
-
function m(
|
|
635
|
-
const g = c.get() +
|
|
636
|
-
index:
|
|
634
|
+
function m(f, p) {
|
|
635
|
+
const g = c.get() + f, {
|
|
636
|
+
index: l,
|
|
637
637
|
distance: y
|
|
638
|
-
} = a(g), b = !t &&
|
|
638
|
+
} = a(g), b = !t && s(g);
|
|
639
639
|
if (!p || b) return {
|
|
640
|
-
index:
|
|
641
|
-
distance:
|
|
640
|
+
index: l,
|
|
641
|
+
distance: f
|
|
642
642
|
};
|
|
643
|
-
const
|
|
643
|
+
const L = n[l] - y, D = f + h(L, 0);
|
|
644
644
|
return {
|
|
645
|
-
index:
|
|
645
|
+
index: l,
|
|
646
646
|
distance: D
|
|
647
647
|
};
|
|
648
648
|
}
|
|
@@ -652,42 +652,42 @@ function zn(t, n, e, i, c) {
|
|
|
652
652
|
shortcut: h
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
|
-
function Hn(t, n, e,
|
|
655
|
+
function Hn(t, n, e, r, c, s, o) {
|
|
656
656
|
function u(d) {
|
|
657
657
|
const m = d.distance, S = d.index !== n.get();
|
|
658
|
-
|
|
658
|
+
s.add(m), m && (r.duration() ? t.start() : (t.update(), t.render(1), t.update())), S && (e.set(n.get()), n.set(d.index), o.emit("select"));
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function i(d, m) {
|
|
661
661
|
const S = c.byDistance(d, m);
|
|
662
662
|
u(S);
|
|
663
663
|
}
|
|
664
664
|
function a(d, m) {
|
|
665
|
-
const S = n.clone().set(d),
|
|
666
|
-
u(
|
|
665
|
+
const S = n.clone().set(d), f = c.byIndex(S.get(), m);
|
|
666
|
+
u(f);
|
|
667
667
|
}
|
|
668
668
|
return {
|
|
669
|
-
distance:
|
|
669
|
+
distance: i,
|
|
670
670
|
index: a
|
|
671
671
|
};
|
|
672
672
|
}
|
|
673
|
-
function Rn(t, n, e,
|
|
674
|
-
const
|
|
673
|
+
function Rn(t, n, e, r, c, s, o, u) {
|
|
674
|
+
const i = {
|
|
675
675
|
passive: !0,
|
|
676
676
|
capture: !0
|
|
677
677
|
};
|
|
678
678
|
let a = 0;
|
|
679
679
|
function h(S) {
|
|
680
680
|
if (!u) return;
|
|
681
|
-
function
|
|
681
|
+
function f(p) {
|
|
682
682
|
if ((/* @__PURE__ */ new Date()).getTime() - a > 10) return;
|
|
683
683
|
o.emit("slideFocusStart"), t.scrollLeft = 0;
|
|
684
684
|
const y = e.findIndex((b) => b.includes(p));
|
|
685
|
-
|
|
685
|
+
At(y) && (c.useDuration(0), r.index(y, 0), o.emit("slideFocus"));
|
|
686
686
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
(St(u) || u(S,
|
|
690
|
-
},
|
|
687
|
+
s.add(document, "keydown", d, !1), n.forEach((p, g) => {
|
|
688
|
+
s.add(p, "focus", (l) => {
|
|
689
|
+
(St(u) || u(S, l)) && f(g);
|
|
690
|
+
}, i);
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
693
|
function d(S) {
|
|
@@ -697,174 +697,174 @@ function Rn(t, n, e, i, c, r, o, u) {
|
|
|
697
697
|
init: h
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function lt(t) {
|
|
701
701
|
let n = t;
|
|
702
702
|
function e() {
|
|
703
703
|
return n;
|
|
704
704
|
}
|
|
705
|
-
function i
|
|
706
|
-
n = o(
|
|
705
|
+
function r(i) {
|
|
706
|
+
n = o(i);
|
|
707
707
|
}
|
|
708
|
-
function c(
|
|
709
|
-
n += o(
|
|
708
|
+
function c(i) {
|
|
709
|
+
n += o(i);
|
|
710
710
|
}
|
|
711
|
-
function
|
|
712
|
-
n -= o(
|
|
711
|
+
function s(i) {
|
|
712
|
+
n -= o(i);
|
|
713
713
|
}
|
|
714
|
-
function o(
|
|
715
|
-
return
|
|
714
|
+
function o(i) {
|
|
715
|
+
return At(i) ? i : i.get();
|
|
716
716
|
}
|
|
717
717
|
return {
|
|
718
718
|
get: e,
|
|
719
|
-
set:
|
|
719
|
+
set: r,
|
|
720
720
|
add: c,
|
|
721
|
-
subtract:
|
|
721
|
+
subtract: s
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
const e = t.scroll === "x" ? o : u,
|
|
726
|
-
let c = null,
|
|
724
|
+
function Yt(t, n) {
|
|
725
|
+
const e = t.scroll === "x" ? o : u, r = n.style;
|
|
726
|
+
let c = null, s = !1;
|
|
727
727
|
function o(m) {
|
|
728
728
|
return `translate3d(${m}px,0px,0px)`;
|
|
729
729
|
}
|
|
730
730
|
function u(m) {
|
|
731
731
|
return `translate3d(0px,${m}px,0px)`;
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
if (
|
|
735
|
-
const S =
|
|
736
|
-
S !== c && (
|
|
733
|
+
function i(m) {
|
|
734
|
+
if (s) return;
|
|
735
|
+
const S = vn(t.direction(m));
|
|
736
|
+
S !== c && (r.transform = e(S), c = S);
|
|
737
737
|
}
|
|
738
738
|
function a(m) {
|
|
739
|
-
|
|
739
|
+
s = !m;
|
|
740
740
|
}
|
|
741
741
|
function h() {
|
|
742
|
-
|
|
742
|
+
s || (r.transform = "", n.getAttribute("style") || n.removeAttribute("style"));
|
|
743
743
|
}
|
|
744
744
|
return {
|
|
745
745
|
clear: h,
|
|
746
|
-
to:
|
|
746
|
+
to: i,
|
|
747
747
|
toggleActive: a
|
|
748
748
|
};
|
|
749
749
|
}
|
|
750
|
-
function Gn(t, n, e,
|
|
751
|
-
const h = dt(c), d = dt(c).reverse(), m =
|
|
752
|
-
function S(
|
|
753
|
-
return
|
|
754
|
-
}
|
|
755
|
-
function
|
|
756
|
-
return
|
|
757
|
-
}
|
|
758
|
-
function p(
|
|
759
|
-
return
|
|
760
|
-
start:
|
|
761
|
-
end:
|
|
750
|
+
function Gn(t, n, e, r, c, s, o, u, i) {
|
|
751
|
+
const h = dt(c), d = dt(c).reverse(), m = l().concat(y());
|
|
752
|
+
function S(E, v) {
|
|
753
|
+
return E.reduce((T, P) => T - c[P], v);
|
|
754
|
+
}
|
|
755
|
+
function f(E, v) {
|
|
756
|
+
return E.reduce((T, P) => S(T, v) > 0 ? T.concat([P]) : T, []);
|
|
757
|
+
}
|
|
758
|
+
function p(E) {
|
|
759
|
+
return s.map((v, T) => ({
|
|
760
|
+
start: v - r[T] + 0.5 + E,
|
|
761
|
+
end: v + n - 0.5 + E
|
|
762
762
|
}));
|
|
763
763
|
}
|
|
764
|
-
function g(
|
|
765
|
-
const P = p(
|
|
766
|
-
return
|
|
767
|
-
const
|
|
764
|
+
function g(E, v, T) {
|
|
765
|
+
const P = p(v);
|
|
766
|
+
return E.map((O) => {
|
|
767
|
+
const k = T ? 0 : -e, U = T ? e : 0, A = T ? "end" : "start", F = P[O][A];
|
|
768
768
|
return {
|
|
769
|
-
index:
|
|
770
|
-
loopPoint:
|
|
771
|
-
slideLocation:
|
|
772
|
-
translate:
|
|
773
|
-
target: () => u.get() >
|
|
769
|
+
index: O,
|
|
770
|
+
loopPoint: F,
|
|
771
|
+
slideLocation: lt(-1),
|
|
772
|
+
translate: Yt(t, i[O]),
|
|
773
|
+
target: () => u.get() > F ? k : U
|
|
774
774
|
};
|
|
775
775
|
});
|
|
776
776
|
}
|
|
777
|
-
function
|
|
778
|
-
const
|
|
779
|
-
return g(
|
|
777
|
+
function l() {
|
|
778
|
+
const E = o[0], v = f(d, E);
|
|
779
|
+
return g(v, e, !1);
|
|
780
780
|
}
|
|
781
781
|
function y() {
|
|
782
|
-
const
|
|
783
|
-
return g(
|
|
782
|
+
const E = n - o[0] - 1, v = f(h, E);
|
|
783
|
+
return g(v, -e, !0);
|
|
784
784
|
}
|
|
785
785
|
function b() {
|
|
786
786
|
return m.every(({
|
|
787
|
-
index:
|
|
787
|
+
index: E
|
|
788
788
|
}) => {
|
|
789
|
-
const
|
|
790
|
-
return S(
|
|
789
|
+
const v = h.filter((T) => T !== E);
|
|
790
|
+
return S(v, n) <= 0.1;
|
|
791
791
|
});
|
|
792
792
|
}
|
|
793
|
-
function
|
|
794
|
-
m.forEach((
|
|
793
|
+
function L() {
|
|
794
|
+
m.forEach((E) => {
|
|
795
795
|
const {
|
|
796
|
-
target:
|
|
797
|
-
translate:
|
|
796
|
+
target: v,
|
|
797
|
+
translate: T,
|
|
798
798
|
slideLocation: P
|
|
799
|
-
} =
|
|
800
|
-
|
|
799
|
+
} = E, O = v();
|
|
800
|
+
O !== P.get() && (T.to(O), P.set(O));
|
|
801
801
|
});
|
|
802
802
|
}
|
|
803
803
|
function D() {
|
|
804
|
-
m.forEach((
|
|
804
|
+
m.forEach((E) => E.translate.clear());
|
|
805
805
|
}
|
|
806
806
|
return {
|
|
807
807
|
canLoop: b,
|
|
808
808
|
clear: D,
|
|
809
|
-
loop:
|
|
809
|
+
loop: L,
|
|
810
810
|
loopPoints: m
|
|
811
811
|
};
|
|
812
812
|
}
|
|
813
813
|
function Un(t, n, e) {
|
|
814
|
-
let
|
|
815
|
-
function
|
|
814
|
+
let r, c = !1;
|
|
815
|
+
function s(i) {
|
|
816
816
|
if (!e) return;
|
|
817
817
|
function a(h) {
|
|
818
818
|
for (const d of h)
|
|
819
819
|
if (d.type === "childList") {
|
|
820
|
-
|
|
820
|
+
i.reInit(), n.emit("slidesChanged");
|
|
821
821
|
break;
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
|
|
825
|
-
c || (St(e) || e(
|
|
826
|
-
}),
|
|
824
|
+
r = new MutationObserver((h) => {
|
|
825
|
+
c || (St(e) || e(i, h)) && a(h);
|
|
826
|
+
}), r.observe(t, {
|
|
827
827
|
childList: !0
|
|
828
828
|
});
|
|
829
829
|
}
|
|
830
830
|
function o() {
|
|
831
|
-
|
|
831
|
+
r && r.disconnect(), c = !0;
|
|
832
832
|
}
|
|
833
833
|
return {
|
|
834
|
-
init:
|
|
834
|
+
init: s,
|
|
835
835
|
destroy: o
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
|
-
function $n(t, n, e,
|
|
838
|
+
function $n(t, n, e, r) {
|
|
839
839
|
const c = {};
|
|
840
|
-
let
|
|
840
|
+
let s = null, o = null, u, i = !1;
|
|
841
841
|
function a() {
|
|
842
|
-
u = new IntersectionObserver((
|
|
843
|
-
|
|
842
|
+
u = new IntersectionObserver((f) => {
|
|
843
|
+
i || (f.forEach((p) => {
|
|
844
844
|
const g = n.indexOf(p.target);
|
|
845
845
|
c[g] = p;
|
|
846
|
-
}),
|
|
846
|
+
}), s = null, o = null, e.emit("slidesInView"));
|
|
847
847
|
}, {
|
|
848
848
|
root: t.parentElement,
|
|
849
|
-
threshold:
|
|
850
|
-
}), n.forEach((
|
|
849
|
+
threshold: r
|
|
850
|
+
}), n.forEach((f) => u.observe(f));
|
|
851
851
|
}
|
|
852
852
|
function h() {
|
|
853
|
-
u && u.disconnect(),
|
|
853
|
+
u && u.disconnect(), i = !0;
|
|
854
854
|
}
|
|
855
|
-
function d(
|
|
855
|
+
function d(f) {
|
|
856
856
|
return pt(c).reduce((p, g) => {
|
|
857
|
-
const
|
|
857
|
+
const l = parseInt(g), {
|
|
858
858
|
isIntersecting: y
|
|
859
|
-
} = c[
|
|
860
|
-
return (
|
|
859
|
+
} = c[l];
|
|
860
|
+
return (f && y || !f && !y) && p.push(l), p;
|
|
861
861
|
}, []);
|
|
862
862
|
}
|
|
863
|
-
function m(
|
|
864
|
-
if (
|
|
865
|
-
if (!
|
|
866
|
-
const p = d(
|
|
867
|
-
return
|
|
863
|
+
function m(f = !0) {
|
|
864
|
+
if (f && s) return s;
|
|
865
|
+
if (!f && o) return o;
|
|
866
|
+
const p = d(f);
|
|
867
|
+
return f && (s = p), f || (o = p), p;
|
|
868
868
|
}
|
|
869
869
|
return {
|
|
870
870
|
init: a,
|
|
@@ -872,26 +872,26 @@ function $n(t, n, e, i) {
|
|
|
872
872
|
get: m
|
|
873
873
|
};
|
|
874
874
|
}
|
|
875
|
-
function qn(t, n, e,
|
|
875
|
+
function qn(t, n, e, r, c, s) {
|
|
876
876
|
const {
|
|
877
877
|
measureSize: o,
|
|
878
878
|
startEdge: u,
|
|
879
|
-
endEdge:
|
|
880
|
-
} = t, a = e[0] && c, h =
|
|
881
|
-
function
|
|
879
|
+
endEdge: i
|
|
880
|
+
} = t, a = e[0] && c, h = f(), d = p(), m = e.map(o), S = g();
|
|
881
|
+
function f() {
|
|
882
882
|
if (!a) return 0;
|
|
883
883
|
const y = e[0];
|
|
884
884
|
return N(n[u] - y[u]);
|
|
885
885
|
}
|
|
886
886
|
function p() {
|
|
887
887
|
if (!a) return 0;
|
|
888
|
-
const y =
|
|
889
|
-
return parseFloat(y.getPropertyValue(`margin-${
|
|
888
|
+
const y = s.getComputedStyle(K(r));
|
|
889
|
+
return parseFloat(y.getPropertyValue(`margin-${i}`));
|
|
890
890
|
}
|
|
891
891
|
function g() {
|
|
892
|
-
return e.map((y, b,
|
|
893
|
-
const D = !b,
|
|
894
|
-
return D ? m[b] + h :
|
|
892
|
+
return e.map((y, b, L) => {
|
|
893
|
+
const D = !b, I = Mt(L, b);
|
|
894
|
+
return D ? m[b] + h : I ? m[b] + d : L[b + 1][u] - y[u];
|
|
895
895
|
}).map(N);
|
|
896
896
|
}
|
|
897
897
|
return {
|
|
@@ -901,102 +901,102 @@ function qn(t, n, e, i, c, r) {
|
|
|
901
901
|
endGap: d
|
|
902
902
|
};
|
|
903
903
|
}
|
|
904
|
-
function Kn(t, n, e,
|
|
904
|
+
function Kn(t, n, e, r, c, s, o, u, i) {
|
|
905
905
|
const {
|
|
906
906
|
startEdge: a,
|
|
907
907
|
endEdge: h,
|
|
908
908
|
direction: d
|
|
909
|
-
} = t, m =
|
|
910
|
-
function S(
|
|
911
|
-
return dt(
|
|
912
|
-
}
|
|
913
|
-
function l
|
|
914
|
-
return
|
|
915
|
-
const D = K(y) || 0,
|
|
916
|
-
return
|
|
917
|
-
}, []).map((y, b,
|
|
918
|
-
const D = Math.max(
|
|
919
|
-
return
|
|
909
|
+
} = t, m = At(e);
|
|
910
|
+
function S(l, y) {
|
|
911
|
+
return dt(l).filter((b) => b % y === 0).map((b) => l.slice(b, b + y));
|
|
912
|
+
}
|
|
913
|
+
function f(l) {
|
|
914
|
+
return l.length ? dt(l).reduce((y, b, L) => {
|
|
915
|
+
const D = K(y) || 0, I = D === 0, E = b === gt(l), v = c[a] - s[D][a], T = c[a] - s[b][h], P = !r && I ? d(o) : 0, O = !r && E ? d(u) : 0, k = N(T - O - (v + P));
|
|
916
|
+
return L && k > n + i && y.push(b), E && y.push(l.length), y;
|
|
917
|
+
}, []).map((y, b, L) => {
|
|
918
|
+
const D = Math.max(L[b - 1] || 0);
|
|
919
|
+
return l.slice(D, y);
|
|
920
920
|
}) : [];
|
|
921
921
|
}
|
|
922
|
-
function p(
|
|
923
|
-
return m ? S(
|
|
922
|
+
function p(l) {
|
|
923
|
+
return m ? S(l, e) : f(l);
|
|
924
924
|
}
|
|
925
925
|
return {
|
|
926
926
|
groupSlides: p
|
|
927
927
|
};
|
|
928
928
|
}
|
|
929
|
-
function _n(t, n, e,
|
|
929
|
+
function _n(t, n, e, r, c, s, o) {
|
|
930
930
|
const {
|
|
931
931
|
align: u,
|
|
932
|
-
axis:
|
|
932
|
+
axis: i,
|
|
933
933
|
direction: a,
|
|
934
934
|
startIndex: h,
|
|
935
935
|
loop: d,
|
|
936
936
|
duration: m,
|
|
937
937
|
dragFree: S,
|
|
938
|
-
dragThreshold:
|
|
938
|
+
dragThreshold: f,
|
|
939
939
|
inViewThreshold: p,
|
|
940
940
|
slidesToScroll: g,
|
|
941
|
-
skipSnaps:
|
|
941
|
+
skipSnaps: l,
|
|
942
942
|
containScroll: y,
|
|
943
943
|
watchResize: b,
|
|
944
|
-
watchSlides:
|
|
944
|
+
watchSlides: L,
|
|
945
945
|
watchDrag: D,
|
|
946
|
-
watchFocus:
|
|
947
|
-
} =
|
|
946
|
+
watchFocus: I
|
|
947
|
+
} = s, E = 2, v = An(), T = v.measure(n), P = e.map(v.measure), O = Tn(i, a), k = O.measureSize(T), U = wn(k), A = Ln(u, k), F = !d && !!y, z = d || !!y, {
|
|
948
948
|
slideSizes: H,
|
|
949
949
|
slideSizesWithGaps: $,
|
|
950
950
|
startGap: q,
|
|
951
951
|
endGap: _
|
|
952
|
-
} = qn(
|
|
952
|
+
} = qn(O, T, P, e, z, c), R = Kn(O, k, g, d, T, P, q, _, E), {
|
|
953
953
|
snaps: J,
|
|
954
954
|
snapsAligned: X
|
|
955
|
-
} = jn(
|
|
955
|
+
} = jn(O, A, T, P, R), Y = -K(J) + K($), {
|
|
956
956
|
snapsContained: ct,
|
|
957
957
|
scrollContainLimit: ut
|
|
958
|
-
} = Cn(
|
|
958
|
+
} = Cn(k, Y, X, y, E), V = F ? ct : X, {
|
|
959
959
|
limit: B
|
|
960
|
-
} =
|
|
960
|
+
} = kn(Y, V, d), Z = Xt(gt(V), h, d), G = Z.clone(), M = dt(e), x = ({
|
|
961
961
|
dragHandler: it,
|
|
962
|
-
scrollBody:
|
|
963
|
-
scrollBounds:
|
|
962
|
+
scrollBody: vt,
|
|
963
|
+
scrollBounds: Lt,
|
|
964
964
|
options: {
|
|
965
965
|
loop: ht
|
|
966
966
|
}
|
|
967
967
|
}) => {
|
|
968
|
-
ht ||
|
|
968
|
+
ht || Lt.constrain(it.pointerDown()), vt.seek();
|
|
969
969
|
}, w = ({
|
|
970
970
|
scrollBody: it,
|
|
971
|
-
translate:
|
|
972
|
-
location:
|
|
971
|
+
translate: vt,
|
|
972
|
+
location: Lt,
|
|
973
973
|
offsetLocation: ht,
|
|
974
|
-
previousLocation:
|
|
975
|
-
scrollLooper:
|
|
976
|
-
slideLooper:
|
|
977
|
-
dragHandler:
|
|
974
|
+
previousLocation: tn,
|
|
975
|
+
scrollLooper: nn,
|
|
976
|
+
slideLooper: en,
|
|
977
|
+
dragHandler: on,
|
|
978
978
|
animation: sn,
|
|
979
|
-
eventHandler:
|
|
980
|
-
scrollBounds:
|
|
979
|
+
eventHandler: Bt,
|
|
980
|
+
scrollBounds: rn,
|
|
981
981
|
options: {
|
|
982
|
-
loop:
|
|
982
|
+
loop: jt
|
|
983
983
|
}
|
|
984
|
-
},
|
|
985
|
-
const
|
|
986
|
-
|
|
987
|
-
const
|
|
988
|
-
ht.set(
|
|
989
|
-
}, C =
|
|
990
|
-
slideRegistry:
|
|
991
|
-
} = Vn(
|
|
992
|
-
ownerDocument:
|
|
984
|
+
}, Vt) => {
|
|
985
|
+
const zt = it.settled(), cn = !rn.shouldConstrain(), Ht = jt ? zt : zt && cn, Rt = Ht && !on.pointerDown();
|
|
986
|
+
Rt && sn.stop();
|
|
987
|
+
const un = Lt.get() * Vt + tn.get() * (1 - Vt);
|
|
988
|
+
ht.set(un), jt && (nn.loop(it.direction()), en.loop()), vt.to(ht.get()), Rt && Bt.emit("settle"), Ht || Bt.emit("scroll");
|
|
989
|
+
}, C = In(r, c, () => x(Et), (it) => w(Et, it)), j = 0.68, Q = V[Z.get()], W = lt(Q), nt = lt(Q), tt = lt(Q), et = lt(Q), at = Nn(W, tt, nt, et, m, j), bt = zn(d, V, Y, B, et), xt = Hn(C, Z, G, at, bt, et, o), Ct = Bn(B), kt = mt(), Zt = $n(n, e, o, p), {
|
|
990
|
+
slideRegistry: Ft
|
|
991
|
+
} = Vn(F, y, V, ut, R, M), Wt = Rn(t, e, Ft, xt, at, kt, o, I), Et = {
|
|
992
|
+
ownerDocument: r,
|
|
993
993
|
ownerWindow: c,
|
|
994
994
|
eventHandler: o,
|
|
995
|
-
containerRect:
|
|
995
|
+
containerRect: T,
|
|
996
996
|
slideRects: P,
|
|
997
997
|
animation: C,
|
|
998
|
-
axis:
|
|
999
|
-
dragHandler:
|
|
998
|
+
axis: O,
|
|
999
|
+
dragHandler: Dn(O, t, r, c, et, On(O, c), W, C, xt, at, bt, Z, o, U, S, f, l, j, D),
|
|
1000
1000
|
eventStore: kt,
|
|
1001
1001
|
percentOfView: U,
|
|
1002
1002
|
index: Z,
|
|
@@ -1005,25 +1005,25 @@ function _n(t, n, e, i, c, r, o) {
|
|
|
1005
1005
|
location: W,
|
|
1006
1006
|
offsetLocation: tt,
|
|
1007
1007
|
previousLocation: nt,
|
|
1008
|
-
options:
|
|
1009
|
-
resizeHandler: Mn(n, o, c, e,
|
|
1008
|
+
options: s,
|
|
1009
|
+
resizeHandler: Mn(n, o, c, e, O, b, v),
|
|
1010
1010
|
scrollBody: at,
|
|
1011
1011
|
scrollBounds: Pn(B, tt, et, at, U),
|
|
1012
|
-
scrollLooper:
|
|
1013
|
-
scrollProgress:
|
|
1014
|
-
scrollSnapList: V.map(
|
|
1012
|
+
scrollLooper: Fn(Y, B, tt, [W, tt, nt, et]),
|
|
1013
|
+
scrollProgress: Ct,
|
|
1014
|
+
scrollSnapList: V.map(Ct.get),
|
|
1015
1015
|
scrollSnaps: V,
|
|
1016
1016
|
scrollTarget: bt,
|
|
1017
1017
|
scrollTo: xt,
|
|
1018
|
-
slideLooper: Gn(
|
|
1019
|
-
slideFocus:
|
|
1020
|
-
slidesHandler: Un(n, o,
|
|
1021
|
-
slidesInView:
|
|
1018
|
+
slideLooper: Gn(O, k, Y, H, $, J, V, tt, e),
|
|
1019
|
+
slideFocus: Wt,
|
|
1020
|
+
slidesHandler: Un(n, o, L),
|
|
1021
|
+
slidesInView: Zt,
|
|
1022
1022
|
slideIndexes: M,
|
|
1023
|
-
slideRegistry:
|
|
1023
|
+
slideRegistry: Ft,
|
|
1024
1024
|
slidesToScroll: R,
|
|
1025
1025
|
target: et,
|
|
1026
|
-
translate:
|
|
1026
|
+
translate: Yt(O, n)
|
|
1027
1027
|
};
|
|
1028
1028
|
return Et;
|
|
1029
1029
|
}
|
|
@@ -1032,29 +1032,29 @@ function Qn() {
|
|
|
1032
1032
|
function e(a) {
|
|
1033
1033
|
n = a;
|
|
1034
1034
|
}
|
|
1035
|
-
function
|
|
1035
|
+
function r(a) {
|
|
1036
1036
|
return t[a] || [];
|
|
1037
1037
|
}
|
|
1038
1038
|
function c(a) {
|
|
1039
|
-
return
|
|
1039
|
+
return r(a).forEach((h) => h(n, a)), i;
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1042
|
-
return t[a] =
|
|
1041
|
+
function s(a, h) {
|
|
1042
|
+
return t[a] = r(a).concat([h]), i;
|
|
1043
1043
|
}
|
|
1044
1044
|
function o(a, h) {
|
|
1045
|
-
return t[a] =
|
|
1045
|
+
return t[a] = r(a).filter((d) => d !== h), i;
|
|
1046
1046
|
}
|
|
1047
1047
|
function u() {
|
|
1048
1048
|
t = {};
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1050
|
+
const i = {
|
|
1051
1051
|
init: e,
|
|
1052
1052
|
emit: c,
|
|
1053
1053
|
off: o,
|
|
1054
|
-
on:
|
|
1054
|
+
on: s,
|
|
1055
1055
|
clear: u
|
|
1056
1056
|
};
|
|
1057
|
-
return
|
|
1057
|
+
return i;
|
|
1058
1058
|
}
|
|
1059
1059
|
const Jn = {
|
|
1060
1060
|
align: "center",
|
|
@@ -1079,135 +1079,135 @@ const Jn = {
|
|
|
1079
1079
|
watchFocus: !0
|
|
1080
1080
|
};
|
|
1081
1081
|
function Xn(t) {
|
|
1082
|
-
function n(
|
|
1083
|
-
return
|
|
1082
|
+
function n(s, o) {
|
|
1083
|
+
return Jt(s, o || {});
|
|
1084
1084
|
}
|
|
1085
|
-
function e(
|
|
1086
|
-
const o =
|
|
1087
|
-
return n(
|
|
1085
|
+
function e(s) {
|
|
1086
|
+
const o = s.breakpoints || {}, u = pt(o).filter((i) => t.matchMedia(i).matches).map((i) => o[i]).reduce((i, a) => n(i, a), {});
|
|
1087
|
+
return n(s, u);
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1090
|
-
return
|
|
1089
|
+
function r(s) {
|
|
1090
|
+
return s.map((o) => pt(o.breakpoints || {})).reduce((o, u) => o.concat(u), []).map(t.matchMedia);
|
|
1091
1091
|
}
|
|
1092
1092
|
return {
|
|
1093
1093
|
mergeOptions: n,
|
|
1094
1094
|
optionsAtMedia: e,
|
|
1095
|
-
optionsMediaQueries:
|
|
1095
|
+
optionsMediaQueries: r
|
|
1096
1096
|
};
|
|
1097
1097
|
}
|
|
1098
1098
|
function Yn(t) {
|
|
1099
1099
|
let n = [];
|
|
1100
|
-
function e(
|
|
1100
|
+
function e(s, o) {
|
|
1101
1101
|
return n = o.filter(({
|
|
1102
1102
|
options: u
|
|
1103
|
-
}) => t.optionsAtMedia(u).active !== !1), n.forEach((u) => u.init(
|
|
1104
|
-
[
|
|
1103
|
+
}) => t.optionsAtMedia(u).active !== !1), n.forEach((u) => u.init(s, t)), o.reduce((u, i) => Object.assign(u, {
|
|
1104
|
+
[i.name]: i
|
|
1105
1105
|
}), {});
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1108
|
-
n = n.filter((
|
|
1107
|
+
function r() {
|
|
1108
|
+
n = n.filter((s) => s.destroy());
|
|
1109
1109
|
}
|
|
1110
1110
|
return {
|
|
1111
1111
|
init: e,
|
|
1112
|
-
destroy:
|
|
1112
|
+
destroy: r
|
|
1113
1113
|
};
|
|
1114
1114
|
}
|
|
1115
1115
|
function yt(t, n, e) {
|
|
1116
|
-
const
|
|
1116
|
+
const r = t.ownerDocument, c = r.defaultView, s = Xn(c), o = Yn(s), u = mt(), i = Qn(), {
|
|
1117
1117
|
mergeOptions: a,
|
|
1118
1118
|
optionsAtMedia: h,
|
|
1119
1119
|
optionsMediaQueries: d
|
|
1120
|
-
} =
|
|
1120
|
+
} = s, {
|
|
1121
1121
|
on: m,
|
|
1122
1122
|
off: S,
|
|
1123
|
-
emit:
|
|
1124
|
-
} =
|
|
1125
|
-
let g = !1,
|
|
1126
|
-
function
|
|
1123
|
+
emit: f
|
|
1124
|
+
} = i, p = O;
|
|
1125
|
+
let g = !1, l, y = a(Jn, yt.globalOptions), b = a(y), L = [], D, I, E;
|
|
1126
|
+
function v() {
|
|
1127
1127
|
const {
|
|
1128
1128
|
container: M,
|
|
1129
1129
|
slides: x
|
|
1130
1130
|
} = b;
|
|
1131
|
-
|
|
1132
|
-
const C = Tt(x) ?
|
|
1133
|
-
|
|
1131
|
+
I = (Tt(M) ? t.querySelector(M) : M) || t.children[0];
|
|
1132
|
+
const C = Tt(x) ? I.querySelectorAll(x) : x;
|
|
1133
|
+
E = [].slice.call(C || I.children);
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1136
|
-
const x = _n(t,
|
|
1135
|
+
function T(M) {
|
|
1136
|
+
const x = _n(t, I, E, r, c, M, i);
|
|
1137
1137
|
if (M.loop && !x.slideLooper.canLoop()) {
|
|
1138
1138
|
const w = Object.assign({}, M, {
|
|
1139
1139
|
loop: !1
|
|
1140
1140
|
});
|
|
1141
|
-
return
|
|
1141
|
+
return T(w);
|
|
1142
1142
|
}
|
|
1143
1143
|
return x;
|
|
1144
1144
|
}
|
|
1145
1145
|
function P(M, x) {
|
|
1146
|
-
g || (y = a(y, M), b = h(y),
|
|
1146
|
+
g || (y = a(y, M), b = h(y), L = x || L, v(), l = T(b), d([y, ...L.map(({
|
|
1147
1147
|
options: w
|
|
1148
|
-
}) => w)]).forEach((w) => u.add(w, "change",
|
|
1148
|
+
}) => w)]).forEach((w) => u.add(w, "change", O)), b.active && (l.translate.to(l.location.get()), l.animation.init(), l.slidesInView.init(), l.slideFocus.init(G), l.eventHandler.init(G), l.resizeHandler.init(G), l.slidesHandler.init(G), l.options.loop && l.slideLooper.loop(), I.offsetParent && E.length && l.dragHandler.init(G), D = o.init(G, L)));
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1150
|
+
function O(M, x) {
|
|
1151
1151
|
const w = R();
|
|
1152
|
-
|
|
1152
|
+
k(), P(a({
|
|
1153
1153
|
startIndex: w
|
|
1154
|
-
}, M), x),
|
|
1154
|
+
}, M), x), i.emit("reInit");
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1157
|
-
|
|
1156
|
+
function k() {
|
|
1157
|
+
l.dragHandler.destroy(), l.eventStore.clear(), l.translate.clear(), l.slideLooper.clear(), l.resizeHandler.destroy(), l.slidesHandler.destroy(), l.slidesInView.destroy(), l.animation.destroy(), o.destroy(), u.clear();
|
|
1158
1158
|
}
|
|
1159
1159
|
function U() {
|
|
1160
|
-
g || (g = !0, u.clear(),
|
|
1160
|
+
g || (g = !0, u.clear(), k(), i.emit("destroy"), i.clear());
|
|
1161
1161
|
}
|
|
1162
1162
|
function A(M, x, w) {
|
|
1163
|
-
!b.active || g || (
|
|
1163
|
+
!b.active || g || (l.scrollBody.useBaseFriction().useDuration(x === !0 ? 0 : b.duration), l.scrollTo.index(M, w || 0));
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1166
|
-
const x =
|
|
1165
|
+
function F(M) {
|
|
1166
|
+
const x = l.index.add(1).get();
|
|
1167
1167
|
A(x, M, -1);
|
|
1168
1168
|
}
|
|
1169
1169
|
function z(M) {
|
|
1170
|
-
const x =
|
|
1170
|
+
const x = l.index.add(-1).get();
|
|
1171
1171
|
A(x, M, 1);
|
|
1172
1172
|
}
|
|
1173
1173
|
function H() {
|
|
1174
|
-
return
|
|
1174
|
+
return l.index.add(1).get() !== R();
|
|
1175
1175
|
}
|
|
1176
1176
|
function $() {
|
|
1177
|
-
return
|
|
1177
|
+
return l.index.add(-1).get() !== R();
|
|
1178
1178
|
}
|
|
1179
1179
|
function q() {
|
|
1180
|
-
return
|
|
1180
|
+
return l.scrollSnapList;
|
|
1181
1181
|
}
|
|
1182
1182
|
function _() {
|
|
1183
|
-
return
|
|
1183
|
+
return l.scrollProgress.get(l.offsetLocation.get());
|
|
1184
1184
|
}
|
|
1185
1185
|
function R() {
|
|
1186
|
-
return
|
|
1186
|
+
return l.index.get();
|
|
1187
1187
|
}
|
|
1188
1188
|
function J() {
|
|
1189
|
-
return
|
|
1189
|
+
return l.indexPrevious.get();
|
|
1190
1190
|
}
|
|
1191
1191
|
function X() {
|
|
1192
|
-
return
|
|
1192
|
+
return l.slidesInView.get();
|
|
1193
1193
|
}
|
|
1194
1194
|
function Y() {
|
|
1195
|
-
return
|
|
1195
|
+
return l.slidesInView.get(!1);
|
|
1196
1196
|
}
|
|
1197
1197
|
function ct() {
|
|
1198
1198
|
return D;
|
|
1199
1199
|
}
|
|
1200
1200
|
function ut() {
|
|
1201
|
-
return
|
|
1201
|
+
return l;
|
|
1202
1202
|
}
|
|
1203
1203
|
function V() {
|
|
1204
1204
|
return t;
|
|
1205
1205
|
}
|
|
1206
1206
|
function B() {
|
|
1207
|
-
return
|
|
1207
|
+
return I;
|
|
1208
1208
|
}
|
|
1209
1209
|
function Z() {
|
|
1210
|
-
return
|
|
1210
|
+
return E;
|
|
1211
1211
|
}
|
|
1212
1212
|
const G = {
|
|
1213
1213
|
canScrollNext: H,
|
|
@@ -1217,12 +1217,12 @@ function yt(t, n, e) {
|
|
|
1217
1217
|
destroy: U,
|
|
1218
1218
|
off: S,
|
|
1219
1219
|
on: m,
|
|
1220
|
-
emit:
|
|
1220
|
+
emit: f,
|
|
1221
1221
|
plugins: ct,
|
|
1222
1222
|
previousScrollSnap: J,
|
|
1223
1223
|
reInit: p,
|
|
1224
1224
|
rootNode: V,
|
|
1225
|
-
scrollNext:
|
|
1225
|
+
scrollNext: F,
|
|
1226
1226
|
scrollPrev: z,
|
|
1227
1227
|
scrollProgress: _,
|
|
1228
1228
|
scrollSnapList: q,
|
|
@@ -1232,27 +1232,27 @@ function yt(t, n, e) {
|
|
|
1232
1232
|
slidesInView: X,
|
|
1233
1233
|
slidesNotInView: Y
|
|
1234
1234
|
};
|
|
1235
|
-
return P(n, e), setTimeout(() =>
|
|
1235
|
+
return P(n, e), setTimeout(() => i.emit("init"), 0), G;
|
|
1236
1236
|
}
|
|
1237
1237
|
yt.globalOptions = void 0;
|
|
1238
|
-
function
|
|
1239
|
-
const e =
|
|
1240
|
-
c && c.reInit(e.current,
|
|
1238
|
+
function Nt(t = {}, n = []) {
|
|
1239
|
+
const e = Gt(t), r = Gt(n), [c, s] = Ut(), [o, u] = Ut(), i = fn(() => {
|
|
1240
|
+
c && c.reInit(e.current, r.current);
|
|
1241
1241
|
}, [c]);
|
|
1242
|
-
return
|
|
1243
|
-
|
|
1244
|
-
}, [t,
|
|
1245
|
-
xn(
|
|
1246
|
-
}, [n,
|
|
1242
|
+
return It(() => {
|
|
1243
|
+
Ot(e.current, t) || (e.current = t, i());
|
|
1244
|
+
}, [t, i]), It(() => {
|
|
1245
|
+
xn(r.current, n) || (r.current = n, i());
|
|
1246
|
+
}, [n, i]), It(() => {
|
|
1247
1247
|
if (bn() && o) {
|
|
1248
|
-
yt.globalOptions =
|
|
1249
|
-
const a = yt(o, e.current,
|
|
1250
|
-
return
|
|
1248
|
+
yt.globalOptions = Nt.globalOptions;
|
|
1249
|
+
const a = yt(o, e.current, r.current);
|
|
1250
|
+
return s(a), () => a.destroy();
|
|
1251
1251
|
} else
|
|
1252
|
-
|
|
1253
|
-
}, [o,
|
|
1252
|
+
s(void 0);
|
|
1253
|
+
}, [o, s]), [u, c];
|
|
1254
1254
|
}
|
|
1255
|
-
|
|
1255
|
+
Nt.globalOptions = void 0;
|
|
1256
1256
|
const Zn = {
|
|
1257
1257
|
active: !0,
|
|
1258
1258
|
breakpoints: {},
|
|
@@ -1273,39 +1273,39 @@ function te(t, n) {
|
|
|
1273
1273
|
const e = t.rootNode();
|
|
1274
1274
|
return n && n(e) || e;
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1277
|
-
let n, e,
|
|
1278
|
-
function d(A,
|
|
1276
|
+
function Pt(t = {}) {
|
|
1277
|
+
let n, e, r, c, s = null, o = 0, u = !1, i = !1, a = !1, h = !1;
|
|
1278
|
+
function d(A, F) {
|
|
1279
1279
|
e = A;
|
|
1280
1280
|
const {
|
|
1281
1281
|
mergeOptions: z,
|
|
1282
1282
|
optionsAtMedia: H
|
|
1283
|
-
} =
|
|
1283
|
+
} = F, $ = z(Zn, Pt.globalOptions), q = z($, t);
|
|
1284
1284
|
if (n = H(q), e.scrollSnapList().length <= 1) return;
|
|
1285
|
-
h = n.jump,
|
|
1285
|
+
h = n.jump, r = !1, c = Wn(e, n.delay);
|
|
1286
1286
|
const {
|
|
1287
1287
|
eventStore: _,
|
|
1288
1288
|
ownerDocument: R
|
|
1289
1289
|
} = e.internalEngine(), J = !!e.internalEngine().options.watchDrag, X = te(e, n.rootNode);
|
|
1290
|
-
_.add(R, "visibilitychange",
|
|
1290
|
+
_.add(R, "visibilitychange", l), J && e.on("pointerDown", b), J && !n.stopOnInteraction && e.on("pointerUp", L), n.stopOnMouseEnter && _.add(X, "mouseenter", D), n.stopOnMouseEnter && !n.stopOnInteraction && _.add(X, "mouseleave", I), n.stopOnFocusIn && e.on("slideFocusStart", g), n.stopOnFocusIn && !n.stopOnInteraction && _.add(e.containerNode(), "focusout", p), n.playOnInit && p();
|
|
1291
1291
|
}
|
|
1292
1292
|
function m() {
|
|
1293
|
-
e.off("pointerDown", b).off("pointerUp",
|
|
1293
|
+
e.off("pointerDown", b).off("pointerUp", L).off("slideFocusStart", g), g(), r = !0, u = !1;
|
|
1294
1294
|
}
|
|
1295
1295
|
function S() {
|
|
1296
1296
|
const {
|
|
1297
1297
|
ownerWindow: A
|
|
1298
1298
|
} = e.internalEngine();
|
|
1299
|
-
A.clearTimeout(o), o = A.setTimeout(
|
|
1299
|
+
A.clearTimeout(o), o = A.setTimeout(O, c[e.selectedScrollSnap()]), s = (/* @__PURE__ */ new Date()).getTime(), e.emit("autoplay:timerset");
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1301
|
+
function f() {
|
|
1302
1302
|
const {
|
|
1303
1303
|
ownerWindow: A
|
|
1304
1304
|
} = e.internalEngine();
|
|
1305
|
-
A.clearTimeout(o), o = 0,
|
|
1305
|
+
A.clearTimeout(o), o = 0, s = null, e.emit("autoplay:timerstopped");
|
|
1306
1306
|
}
|
|
1307
1307
|
function p() {
|
|
1308
|
-
if (!
|
|
1308
|
+
if (!r) {
|
|
1309
1309
|
if (y()) {
|
|
1310
1310
|
a = !0;
|
|
1311
1311
|
return;
|
|
@@ -1314,9 +1314,9 @@ function Ct(t = {}) {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
1316
|
function g() {
|
|
1317
|
-
|
|
1317
|
+
r || (u && e.emit("autoplay:stop"), f(), u = !1);
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function l() {
|
|
1320
1320
|
if (y())
|
|
1321
1321
|
return a = u, g();
|
|
1322
1322
|
a && p();
|
|
@@ -1328,106 +1328,108 @@ function Ct(t = {}) {
|
|
|
1328
1328
|
return A.visibilityState === "hidden";
|
|
1329
1329
|
}
|
|
1330
1330
|
function b() {
|
|
1331
|
-
|
|
1331
|
+
i || g();
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1334
|
-
|
|
1333
|
+
function L() {
|
|
1334
|
+
i || p();
|
|
1335
1335
|
}
|
|
1336
1336
|
function D() {
|
|
1337
|
-
|
|
1337
|
+
i = !0, g();
|
|
1338
1338
|
}
|
|
1339
|
-
function
|
|
1340
|
-
|
|
1339
|
+
function I() {
|
|
1340
|
+
i = !1, p();
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function E(A) {
|
|
1343
1343
|
typeof A < "u" && (h = A), p();
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function v() {
|
|
1346
1346
|
u && g();
|
|
1347
1347
|
}
|
|
1348
|
-
function
|
|
1348
|
+
function T() {
|
|
1349
1349
|
u && p();
|
|
1350
1350
|
}
|
|
1351
1351
|
function P() {
|
|
1352
1352
|
return u;
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function O() {
|
|
1355
1355
|
const {
|
|
1356
1356
|
index: A
|
|
1357
|
-
} = e.internalEngine(),
|
|
1357
|
+
} = e.internalEngine(), F = A.clone().add(1).get(), z = e.scrollSnapList().length - 1, H = n.stopOnLastSnap && F === z;
|
|
1358
1358
|
if (e.canScrollNext() ? e.scrollNext(h) : e.scrollTo(0, h), e.emit("autoplay:select"), H) return g();
|
|
1359
1359
|
p();
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1362
|
-
if (!
|
|
1363
|
-
const A = c[e.selectedScrollSnap()],
|
|
1364
|
-
return A -
|
|
1361
|
+
function k() {
|
|
1362
|
+
if (!s) return null;
|
|
1363
|
+
const A = c[e.selectedScrollSnap()], F = (/* @__PURE__ */ new Date()).getTime() - s;
|
|
1364
|
+
return A - F;
|
|
1365
1365
|
}
|
|
1366
1366
|
return {
|
|
1367
1367
|
name: "autoplay",
|
|
1368
1368
|
options: t,
|
|
1369
1369
|
init: d,
|
|
1370
1370
|
destroy: m,
|
|
1371
|
-
play:
|
|
1372
|
-
stop:
|
|
1373
|
-
reset:
|
|
1371
|
+
play: E,
|
|
1372
|
+
stop: v,
|
|
1373
|
+
reset: T,
|
|
1374
1374
|
isPlaying: P,
|
|
1375
|
-
timeUntilNext:
|
|
1375
|
+
timeUntilNext: k
|
|
1376
1376
|
};
|
|
1377
1377
|
}
|
|
1378
|
-
|
|
1378
|
+
Pt.globalOptions = void 0;
|
|
1379
1379
|
function ue({
|
|
1380
1380
|
slides: t,
|
|
1381
1381
|
className: n,
|
|
1382
1382
|
hideAt: e,
|
|
1383
|
-
loop:
|
|
1383
|
+
loop: r = !0,
|
|
1384
1384
|
autoplay: c = !0,
|
|
1385
|
-
autoplayDelay:
|
|
1385
|
+
autoplayDelay: s = 4e3,
|
|
1386
1386
|
autoplayStopOnInteraction: o = !0
|
|
1387
1387
|
}) {
|
|
1388
|
-
const u =
|
|
1389
|
-
|
|
1390
|
-
delay:
|
|
1388
|
+
const u = ln.useMemo(() => c ? [
|
|
1389
|
+
Pt({
|
|
1390
|
+
delay: s,
|
|
1391
1391
|
stopOnInteraction: o,
|
|
1392
|
-
stopOnMouseEnter:
|
|
1392
|
+
stopOnMouseEnter: o,
|
|
1393
|
+
stopOnFocusIn: o
|
|
1393
1394
|
})
|
|
1394
|
-
] : [], [c,
|
|
1395
|
-
|
|
1396
|
-
[u]
|
|
1397
|
-
), [a, h] = Pt({ loop: !!i }, u);
|
|
1398
|
-
vt.useEffect(() => {
|
|
1399
|
-
h && s && c && s.play();
|
|
1400
|
-
}, [h, s, c]);
|
|
1401
|
-
const { selectedIndex: d, scrollSnaps: m, onDotButtonClick: S } = gn(h), {
|
|
1402
|
-
prevBtnDisabled: l,
|
|
1395
|
+
] : [], [c, s, o]), [i, a] = Nt({ loop: !!r }, u), h = a == null ? void 0 : a.plugins().autoplay, { selectedIndex: d, scrollSnaps: m, onDotButtonClick: S } = gn(a), {
|
|
1396
|
+
prevBtnDisabled: f,
|
|
1403
1397
|
nextBtnDisabled: p,
|
|
1404
1398
|
onPrevButtonClick: g,
|
|
1405
|
-
onNextButtonClick:
|
|
1406
|
-
} = yn(
|
|
1407
|
-
c &&
|
|
1399
|
+
onNextButtonClick: l
|
|
1400
|
+
} = yn(a), y = () => {
|
|
1401
|
+
c && h && !o && h.play();
|
|
1402
|
+
}, b = () => {
|
|
1403
|
+
g(), y();
|
|
1404
|
+
}, L = () => {
|
|
1405
|
+
l(), y();
|
|
1406
|
+
}, D = (E) => {
|
|
1407
|
+
S(E), y();
|
|
1408
|
+
}, I = () => {
|
|
1409
|
+
c && h && o && h.play();
|
|
1408
1410
|
};
|
|
1409
|
-
return /* @__PURE__ */
|
|
1411
|
+
return /* @__PURE__ */ an("section", { className: $t(st.main, n, dn(e)), children: [
|
|
1410
1412
|
/* @__PURE__ */ ot(
|
|
1411
1413
|
"div",
|
|
1412
1414
|
{
|
|
1413
|
-
ref:
|
|
1414
|
-
className:
|
|
1415
|
-
onMouseLeave:
|
|
1416
|
-
children: /* @__PURE__ */ ot("div", { className:
|
|
1415
|
+
ref: i,
|
|
1416
|
+
className: st.viewport,
|
|
1417
|
+
onMouseLeave: o ? I : void 0,
|
|
1418
|
+
children: /* @__PURE__ */ ot("div", { className: st.track, children: t.map((E, v) => /* @__PURE__ */ ot("div", { className: st.slide, children: E }, v)) })
|
|
1417
1419
|
}
|
|
1418
1420
|
),
|
|
1419
|
-
/* @__PURE__ */ ot(pn, { onClick:
|
|
1420
|
-
/* @__PURE__ */ ot(mn, { onClick:
|
|
1421
|
-
/* @__PURE__ */ ot("div", { className:
|
|
1421
|
+
/* @__PURE__ */ ot(pn, { onClick: b, disabled: f }),
|
|
1422
|
+
/* @__PURE__ */ ot(mn, { onClick: L, disabled: p }),
|
|
1423
|
+
/* @__PURE__ */ ot("div", { className: st.carouselDots, children: m.map((E, v) => /* @__PURE__ */ ot(
|
|
1422
1424
|
hn,
|
|
1423
1425
|
{
|
|
1424
|
-
onClick: () =>
|
|
1425
|
-
className:
|
|
1426
|
-
|
|
1427
|
-
|
|
1426
|
+
onClick: () => D(v),
|
|
1427
|
+
className: $t(
|
|
1428
|
+
st.dot,
|
|
1429
|
+
v === d ? st.dotSelected : null
|
|
1428
1430
|
)
|
|
1429
1431
|
},
|
|
1430
|
-
|
|
1432
|
+
v
|
|
1431
1433
|
)) })
|
|
1432
1434
|
] });
|
|
1433
1435
|
}
|