@prefecthq/prefab-ui-docs 0.18.2 → 0.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_renderer/carousel-BNjNObvx.mjs +2153 -0
- package/dist/_renderer/{charts-DqUwASBd.mjs → charts-DHY77d3D.mjs} +1 -1
- package/dist/_renderer/{compound-calendar-D1lEoF6R.mjs → compound-calendar-CJm0hGtG.mjs} +1 -1
- package/dist/_renderer/{content-CZhRMTZ5.mjs → content-D43Zyoz5.mjs} +1 -1
- package/dist/_renderer/{embed-DguKmtmL.mjs → embed-Drh-jnF_.mjs} +6 -6
- package/dist/_renderer/embed.mjs +1 -1
- package/dist/_renderer/{mermaid-Bn2NtSqv.mjs → mermaid-D6jqHNxI.mjs} +1 -1
- package/dist/_renderer/{svg-Ch6XFjVN.mjs → svg-qt7aUS-5.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_renderer/carousel-DtQ-l7Gc.mjs +0 -2021
|
@@ -0,0 +1,2153 @@
|
|
|
1
|
+
import { j as H, c as Jt } from "./embed-Drh-jnF_.mjs";
|
|
2
|
+
import { r as K, R as Tt, C as dn, a as pn, b as gn, c as mn } from "./icons-z7UO1VFZ.mjs";
|
|
3
|
+
function hn(t) {
|
|
4
|
+
return Object.prototype.toString.call(t) === "[object Object]";
|
|
5
|
+
}
|
|
6
|
+
function qt(t) {
|
|
7
|
+
return hn(t) || Array.isArray(t);
|
|
8
|
+
}
|
|
9
|
+
function yn() {
|
|
10
|
+
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
11
|
+
}
|
|
12
|
+
function Ct(t, n) {
|
|
13
|
+
const e = Object.keys(t), i = Object.keys(n);
|
|
14
|
+
if (e.length !== i.length) return !1;
|
|
15
|
+
const o = JSON.stringify(Object.keys(t.breakpoints || {})), r = JSON.stringify(Object.keys(n.breakpoints || {}));
|
|
16
|
+
return o !== r ? !1 : e.every((s) => {
|
|
17
|
+
const c = t[s], l = n[s];
|
|
18
|
+
return typeof c == "function" ? `${c}` == `${l}` : !qt(c) || !qt(l) ? c === l : Ct(c, l);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function Yt(t) {
|
|
22
|
+
return t.concat().sort((n, e) => n.name > e.name ? 1 : -1).map((n) => n.options);
|
|
23
|
+
}
|
|
24
|
+
function Sn(t, n) {
|
|
25
|
+
if (t.length !== n.length) return !1;
|
|
26
|
+
const e = Yt(t), i = Yt(n);
|
|
27
|
+
return e.every((o, r) => {
|
|
28
|
+
const s = i[r];
|
|
29
|
+
return Ct(o, s);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function Ft(t) {
|
|
33
|
+
return typeof t == "number";
|
|
34
|
+
}
|
|
35
|
+
function Pt(t) {
|
|
36
|
+
return typeof t == "string";
|
|
37
|
+
}
|
|
38
|
+
function wt(t) {
|
|
39
|
+
return typeof t == "boolean";
|
|
40
|
+
}
|
|
41
|
+
function Kt(t) {
|
|
42
|
+
return Object.prototype.toString.call(t) === "[object Object]";
|
|
43
|
+
}
|
|
44
|
+
function X(t) {
|
|
45
|
+
return Math.abs(t);
|
|
46
|
+
}
|
|
47
|
+
function jt(t) {
|
|
48
|
+
return Math.sign(t);
|
|
49
|
+
}
|
|
50
|
+
function ht(t, n) {
|
|
51
|
+
return X(t - n);
|
|
52
|
+
}
|
|
53
|
+
function bn(t, n) {
|
|
54
|
+
if (t === 0 || n === 0 || X(t) <= X(n)) return 0;
|
|
55
|
+
const e = ht(X(t), X(n));
|
|
56
|
+
return X(e / t);
|
|
57
|
+
}
|
|
58
|
+
function xn(t) {
|
|
59
|
+
return Math.round(t * 100) / 100;
|
|
60
|
+
}
|
|
61
|
+
function yt(t) {
|
|
62
|
+
return St(t).map(Number);
|
|
63
|
+
}
|
|
64
|
+
function it(t) {
|
|
65
|
+
return t[xt(t)];
|
|
66
|
+
}
|
|
67
|
+
function xt(t) {
|
|
68
|
+
return Math.max(0, t.length - 1);
|
|
69
|
+
}
|
|
70
|
+
function kt(t, n) {
|
|
71
|
+
return n === xt(t);
|
|
72
|
+
}
|
|
73
|
+
function Xt(t, n = 0) {
|
|
74
|
+
return Array.from(Array(t), (e, i) => n + i);
|
|
75
|
+
}
|
|
76
|
+
function St(t) {
|
|
77
|
+
return Object.keys(t);
|
|
78
|
+
}
|
|
79
|
+
function Zt(t, n) {
|
|
80
|
+
return [t, n].reduce((e, i) => (St(i).forEach((o) => {
|
|
81
|
+
const r = e[o], s = i[o], c = Kt(r) && Kt(s);
|
|
82
|
+
e[o] = c ? Zt(r, s) : s;
|
|
83
|
+
}), e), {});
|
|
84
|
+
}
|
|
85
|
+
function At(t, n) {
|
|
86
|
+
return typeof n.MouseEvent < "u" && t instanceof n.MouseEvent;
|
|
87
|
+
}
|
|
88
|
+
function vn(t, n) {
|
|
89
|
+
const e = {
|
|
90
|
+
start: i,
|
|
91
|
+
center: o,
|
|
92
|
+
end: r
|
|
93
|
+
};
|
|
94
|
+
function i() {
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
97
|
+
function o(l) {
|
|
98
|
+
return r(l) / 2;
|
|
99
|
+
}
|
|
100
|
+
function r(l) {
|
|
101
|
+
return n - l;
|
|
102
|
+
}
|
|
103
|
+
function s(l, a) {
|
|
104
|
+
return Pt(t) ? e[t](l) : t(n, l, a);
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
measure: s
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function bt() {
|
|
111
|
+
let t = [];
|
|
112
|
+
function n(o, r, s, c = {
|
|
113
|
+
passive: !0
|
|
114
|
+
}) {
|
|
115
|
+
let l;
|
|
116
|
+
if ("addEventListener" in o)
|
|
117
|
+
o.addEventListener(r, s, c), l = () => o.removeEventListener(r, s, c);
|
|
118
|
+
else {
|
|
119
|
+
const a = o;
|
|
120
|
+
a.addListener(s), l = () => a.removeListener(s);
|
|
121
|
+
}
|
|
122
|
+
return t.push(l), i;
|
|
123
|
+
}
|
|
124
|
+
function e() {
|
|
125
|
+
t = t.filter((o) => o());
|
|
126
|
+
}
|
|
127
|
+
const i = {
|
|
128
|
+
add: n,
|
|
129
|
+
clear: e
|
|
130
|
+
};
|
|
131
|
+
return i;
|
|
132
|
+
}
|
|
133
|
+
function En(t, n, e, i) {
|
|
134
|
+
const o = bt(), r = 1e3 / 60;
|
|
135
|
+
let s = null, c = 0, l = 0;
|
|
136
|
+
function a() {
|
|
137
|
+
o.add(t, "visibilitychange", () => {
|
|
138
|
+
t.hidden && p();
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function y() {
|
|
142
|
+
x(), o.clear();
|
|
143
|
+
}
|
|
144
|
+
function f(m) {
|
|
145
|
+
if (!l) return;
|
|
146
|
+
s || (s = m, e(), e());
|
|
147
|
+
const u = m - s;
|
|
148
|
+
for (s = m, c += u; c >= r; )
|
|
149
|
+
e(), c -= r;
|
|
150
|
+
const S = c / r;
|
|
151
|
+
i(S), l && (l = n.requestAnimationFrame(f));
|
|
152
|
+
}
|
|
153
|
+
function d() {
|
|
154
|
+
l || (l = n.requestAnimationFrame(f));
|
|
155
|
+
}
|
|
156
|
+
function x() {
|
|
157
|
+
n.cancelAnimationFrame(l), s = null, c = 0, l = 0;
|
|
158
|
+
}
|
|
159
|
+
function p() {
|
|
160
|
+
s = null, c = 0;
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
init: a,
|
|
164
|
+
destroy: y,
|
|
165
|
+
start: d,
|
|
166
|
+
stop: x,
|
|
167
|
+
update: e,
|
|
168
|
+
render: i
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function On(t, n) {
|
|
172
|
+
const e = n === "rtl", i = t === "y", o = i ? "y" : "x", r = i ? "x" : "y", s = !i && e ? -1 : 1, c = y(), l = f();
|
|
173
|
+
function a(p) {
|
|
174
|
+
const {
|
|
175
|
+
height: g,
|
|
176
|
+
width: m
|
|
177
|
+
} = p;
|
|
178
|
+
return i ? g : m;
|
|
179
|
+
}
|
|
180
|
+
function y() {
|
|
181
|
+
return i ? "top" : e ? "right" : "left";
|
|
182
|
+
}
|
|
183
|
+
function f() {
|
|
184
|
+
return i ? "bottom" : e ? "left" : "right";
|
|
185
|
+
}
|
|
186
|
+
function d(p) {
|
|
187
|
+
return p * s;
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
scroll: o,
|
|
191
|
+
cross: r,
|
|
192
|
+
startEdge: c,
|
|
193
|
+
endEdge: l,
|
|
194
|
+
measureSize: a,
|
|
195
|
+
direction: d
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function ut(t = 0, n = 0) {
|
|
199
|
+
const e = X(t - n);
|
|
200
|
+
function i(a) {
|
|
201
|
+
return a < t;
|
|
202
|
+
}
|
|
203
|
+
function o(a) {
|
|
204
|
+
return a > n;
|
|
205
|
+
}
|
|
206
|
+
function r(a) {
|
|
207
|
+
return i(a) || o(a);
|
|
208
|
+
}
|
|
209
|
+
function s(a) {
|
|
210
|
+
return r(a) ? i(a) ? t : n : a;
|
|
211
|
+
}
|
|
212
|
+
function c(a) {
|
|
213
|
+
return e ? a - e * Math.ceil((a - n) / e) : a;
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
length: e,
|
|
217
|
+
max: n,
|
|
218
|
+
min: t,
|
|
219
|
+
constrain: s,
|
|
220
|
+
reachedAny: r,
|
|
221
|
+
reachedMax: o,
|
|
222
|
+
reachedMin: i,
|
|
223
|
+
removeOffset: c
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function Wt(t, n, e) {
|
|
227
|
+
const {
|
|
228
|
+
constrain: i
|
|
229
|
+
} = ut(0, t), o = t + 1;
|
|
230
|
+
let r = s(n);
|
|
231
|
+
function s(d) {
|
|
232
|
+
return e ? X((o + d) % o) : i(d);
|
|
233
|
+
}
|
|
234
|
+
function c() {
|
|
235
|
+
return r;
|
|
236
|
+
}
|
|
237
|
+
function l(d) {
|
|
238
|
+
return r = s(d), f;
|
|
239
|
+
}
|
|
240
|
+
function a(d) {
|
|
241
|
+
return y().set(c() + d);
|
|
242
|
+
}
|
|
243
|
+
function y() {
|
|
244
|
+
return Wt(t, c(), e);
|
|
245
|
+
}
|
|
246
|
+
const f = {
|
|
247
|
+
get: c,
|
|
248
|
+
set: l,
|
|
249
|
+
add: a,
|
|
250
|
+
clone: y
|
|
251
|
+
};
|
|
252
|
+
return f;
|
|
253
|
+
}
|
|
254
|
+
function wn(t, n, e, i, o, r, s, c, l, a, y, f, d, x, p, g, m, u, S) {
|
|
255
|
+
const {
|
|
256
|
+
cross: v,
|
|
257
|
+
direction: A
|
|
258
|
+
} = t, F = ["INPUT", "SELECT", "TEXTAREA"], D = {
|
|
259
|
+
passive: !1
|
|
260
|
+
}, M = bt(), P = bt(), w = ut(50, 225).constrain(x.measure(20)), h = {
|
|
261
|
+
mouse: 300,
|
|
262
|
+
touch: 400
|
|
263
|
+
}, L = {
|
|
264
|
+
mouse: 500,
|
|
265
|
+
touch: 600
|
|
266
|
+
}, U = p ? 43 : 25;
|
|
267
|
+
let G = !1, b = 0, O = 0, T = !1, I = !1, C = !1, j = !1;
|
|
268
|
+
function N(E) {
|
|
269
|
+
if (!S) return;
|
|
270
|
+
function z(W) {
|
|
271
|
+
(wt(S) || S(E, W)) && ot(W);
|
|
272
|
+
}
|
|
273
|
+
const q = n;
|
|
274
|
+
M.add(q, "dragstart", (W) => W.preventDefault(), D).add(q, "touchmove", () => {
|
|
275
|
+
}, D).add(q, "touchend", () => {
|
|
276
|
+
}).add(q, "touchstart", z).add(q, "mousedown", z).add(q, "touchcancel", V).add(q, "contextmenu", V).add(q, "click", nt, !0);
|
|
277
|
+
}
|
|
278
|
+
function k() {
|
|
279
|
+
M.clear(), P.clear();
|
|
280
|
+
}
|
|
281
|
+
function R() {
|
|
282
|
+
const E = j ? e : n;
|
|
283
|
+
P.add(E, "touchmove", Z, D).add(E, "touchend", V).add(E, "mousemove", Z, D).add(E, "mouseup", V);
|
|
284
|
+
}
|
|
285
|
+
function $(E) {
|
|
286
|
+
const z = E.nodeName || "";
|
|
287
|
+
return F.includes(z);
|
|
288
|
+
}
|
|
289
|
+
function _() {
|
|
290
|
+
return (p ? L : h)[j ? "mouse" : "touch"];
|
|
291
|
+
}
|
|
292
|
+
function J(E, z) {
|
|
293
|
+
const q = f.add(jt(E) * -1), W = y.byDistance(E, !p).distance;
|
|
294
|
+
return p || X(E) < w ? W : m && z ? W * 0.5 : y.byIndex(q.get(), 0).distance;
|
|
295
|
+
}
|
|
296
|
+
function ot(E) {
|
|
297
|
+
const z = At(E, i);
|
|
298
|
+
j = z, C = p && z && !E.buttons && G, G = ht(o.get(), s.get()) >= 2, !(z && E.button !== 0) && ($(E.target) || (T = !0, r.pointerDown(E), a.useFriction(0).useDuration(0), o.set(s), R(), b = r.readPoint(E), O = r.readPoint(E, v), d.emit("pointerDown")));
|
|
299
|
+
}
|
|
300
|
+
function Z(E) {
|
|
301
|
+
if (!At(E, i) && E.touches.length >= 2) return V(E);
|
|
302
|
+
const q = r.readPoint(E), W = r.readPoint(E, v), rt = ht(q, b), st = ht(W, O);
|
|
303
|
+
if (!I && !j && (!E.cancelable || (I = rt > st, !I)))
|
|
304
|
+
return V(E);
|
|
305
|
+
const ct = r.pointerMove(E);
|
|
306
|
+
rt > g && (C = !0), a.useFriction(0.3).useDuration(0.75), c.start(), o.add(A(ct)), E.preventDefault();
|
|
307
|
+
}
|
|
308
|
+
function V(E) {
|
|
309
|
+
const q = y.byDistance(0, !1).index !== f.get(), W = r.pointerUp(E) * _(), rt = J(A(W), q), st = bn(W, rt), ct = U - 10 * st, lt = u + st / 50;
|
|
310
|
+
I = !1, T = !1, P.clear(), a.useDuration(ct).useFriction(lt), l.distance(rt, !p), j = !1, d.emit("pointerUp");
|
|
311
|
+
}
|
|
312
|
+
function nt(E) {
|
|
313
|
+
C && (E.stopPropagation(), E.preventDefault(), C = !1);
|
|
314
|
+
}
|
|
315
|
+
function Q() {
|
|
316
|
+
return T;
|
|
317
|
+
}
|
|
318
|
+
return {
|
|
319
|
+
init: N,
|
|
320
|
+
destroy: k,
|
|
321
|
+
pointerDown: Q
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
function In(t, n) {
|
|
325
|
+
let i, o;
|
|
326
|
+
function r(f) {
|
|
327
|
+
return f.timeStamp;
|
|
328
|
+
}
|
|
329
|
+
function s(f, d) {
|
|
330
|
+
const p = `client${(d || t.scroll) === "x" ? "X" : "Y"}`;
|
|
331
|
+
return (At(f, n) ? f : f.touches[0])[p];
|
|
332
|
+
}
|
|
333
|
+
function c(f) {
|
|
334
|
+
return i = f, o = f, s(f);
|
|
335
|
+
}
|
|
336
|
+
function l(f) {
|
|
337
|
+
const d = s(f) - s(o), x = r(f) - r(i) > 170;
|
|
338
|
+
return o = f, x && (i = f), d;
|
|
339
|
+
}
|
|
340
|
+
function a(f) {
|
|
341
|
+
if (!i || !o) return 0;
|
|
342
|
+
const d = s(o) - s(i), x = r(f) - r(i), p = r(f) - r(o) > 170, g = d / x;
|
|
343
|
+
return x && !p && X(g) > 0.1 ? g : 0;
|
|
344
|
+
}
|
|
345
|
+
return {
|
|
346
|
+
pointerDown: c,
|
|
347
|
+
pointerMove: l,
|
|
348
|
+
pointerUp: a,
|
|
349
|
+
readPoint: s
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
function Dn() {
|
|
353
|
+
function t(e) {
|
|
354
|
+
const {
|
|
355
|
+
offsetTop: i,
|
|
356
|
+
offsetLeft: o,
|
|
357
|
+
offsetWidth: r,
|
|
358
|
+
offsetHeight: s
|
|
359
|
+
} = e;
|
|
360
|
+
return {
|
|
361
|
+
top: i,
|
|
362
|
+
right: o + r,
|
|
363
|
+
bottom: i + s,
|
|
364
|
+
left: o,
|
|
365
|
+
width: r,
|
|
366
|
+
height: s
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
return {
|
|
370
|
+
measure: t
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
function Ln(t) {
|
|
374
|
+
function n(i) {
|
|
375
|
+
return t * (i / 100);
|
|
376
|
+
}
|
|
377
|
+
return {
|
|
378
|
+
measure: n
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
function Tn(t, n, e, i, o, r, s) {
|
|
382
|
+
const c = [t].concat(i);
|
|
383
|
+
let l, a, y = [], f = !1;
|
|
384
|
+
function d(m) {
|
|
385
|
+
return o.measureSize(s.measure(m));
|
|
386
|
+
}
|
|
387
|
+
function x(m) {
|
|
388
|
+
if (!r) return;
|
|
389
|
+
a = d(t), y = i.map(d);
|
|
390
|
+
function u(S) {
|
|
391
|
+
for (const v of S) {
|
|
392
|
+
if (f) return;
|
|
393
|
+
const A = v.target === t, F = i.indexOf(v.target), D = A ? a : y[F], M = d(A ? t : i[F]);
|
|
394
|
+
if (X(M - D) >= 0.5) {
|
|
395
|
+
m.reInit(), n.emit("resize");
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
l = new ResizeObserver((S) => {
|
|
401
|
+
(wt(r) || r(m, S)) && u(S);
|
|
402
|
+
}), e.requestAnimationFrame(() => {
|
|
403
|
+
c.forEach((S) => l.observe(S));
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
function p() {
|
|
407
|
+
f = !0, l && l.disconnect();
|
|
408
|
+
}
|
|
409
|
+
return {
|
|
410
|
+
init: x,
|
|
411
|
+
destroy: p
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
function Mn(t, n, e, i, o, r) {
|
|
415
|
+
let s = 0, c = 0, l = o, a = r, y = t.get(), f = 0;
|
|
416
|
+
function d() {
|
|
417
|
+
const D = i.get() - t.get(), M = !l;
|
|
418
|
+
let P = 0;
|
|
419
|
+
return M ? (s = 0, e.set(i), t.set(i), P = D) : (e.set(t), s += D / l, s *= a, y += s, t.add(s), P = y - f), c = jt(P), f = y, F;
|
|
420
|
+
}
|
|
421
|
+
function x() {
|
|
422
|
+
const D = i.get() - n.get();
|
|
423
|
+
return X(D) < 1e-3;
|
|
424
|
+
}
|
|
425
|
+
function p() {
|
|
426
|
+
return l;
|
|
427
|
+
}
|
|
428
|
+
function g() {
|
|
429
|
+
return c;
|
|
430
|
+
}
|
|
431
|
+
function m() {
|
|
432
|
+
return s;
|
|
433
|
+
}
|
|
434
|
+
function u() {
|
|
435
|
+
return v(o);
|
|
436
|
+
}
|
|
437
|
+
function S() {
|
|
438
|
+
return A(r);
|
|
439
|
+
}
|
|
440
|
+
function v(D) {
|
|
441
|
+
return l = D, F;
|
|
442
|
+
}
|
|
443
|
+
function A(D) {
|
|
444
|
+
return a = D, F;
|
|
445
|
+
}
|
|
446
|
+
const F = {
|
|
447
|
+
direction: g,
|
|
448
|
+
duration: p,
|
|
449
|
+
velocity: m,
|
|
450
|
+
seek: d,
|
|
451
|
+
settled: x,
|
|
452
|
+
useBaseFriction: S,
|
|
453
|
+
useBaseDuration: u,
|
|
454
|
+
useFriction: A,
|
|
455
|
+
useDuration: v
|
|
456
|
+
};
|
|
457
|
+
return F;
|
|
458
|
+
}
|
|
459
|
+
function Pn(t, n, e, i, o) {
|
|
460
|
+
const r = o.measure(10), s = o.measure(50), c = ut(0.1, 0.99);
|
|
461
|
+
let l = !1;
|
|
462
|
+
function a() {
|
|
463
|
+
return !(l || !t.reachedAny(e.get()) || !t.reachedAny(n.get()));
|
|
464
|
+
}
|
|
465
|
+
function y(x) {
|
|
466
|
+
if (!a()) return;
|
|
467
|
+
const p = t.reachedMin(n.get()) ? "min" : "max", g = X(t[p] - n.get()), m = e.get() - n.get(), u = c.constrain(g / s);
|
|
468
|
+
e.subtract(m * u), !x && X(m) < r && (e.set(t.constrain(e.get())), i.useDuration(25).useBaseFriction());
|
|
469
|
+
}
|
|
470
|
+
function f(x) {
|
|
471
|
+
l = !x;
|
|
472
|
+
}
|
|
473
|
+
return {
|
|
474
|
+
shouldConstrain: a,
|
|
475
|
+
constrain: y,
|
|
476
|
+
toggleActive: f
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
function An(t, n, e, i, o) {
|
|
480
|
+
const r = ut(-n + t, 0), s = f(), c = y(), l = d();
|
|
481
|
+
function a(p, g) {
|
|
482
|
+
return ht(p, g) <= 1;
|
|
483
|
+
}
|
|
484
|
+
function y() {
|
|
485
|
+
const p = s[0], g = it(s), m = s.lastIndexOf(p), u = s.indexOf(g) + 1;
|
|
486
|
+
return ut(m, u);
|
|
487
|
+
}
|
|
488
|
+
function f() {
|
|
489
|
+
return e.map((p, g) => {
|
|
490
|
+
const {
|
|
491
|
+
min: m,
|
|
492
|
+
max: u
|
|
493
|
+
} = r, S = r.constrain(p), v = !g, A = kt(e, g);
|
|
494
|
+
return v ? u : A || a(m, S) ? m : a(u, S) ? u : S;
|
|
495
|
+
}).map((p) => parseFloat(p.toFixed(3)));
|
|
496
|
+
}
|
|
497
|
+
function d() {
|
|
498
|
+
if (n <= t + o) return [r.max];
|
|
499
|
+
if (i === "keepSnaps") return s;
|
|
500
|
+
const {
|
|
501
|
+
min: p,
|
|
502
|
+
max: g
|
|
503
|
+
} = c;
|
|
504
|
+
return s.slice(p, g);
|
|
505
|
+
}
|
|
506
|
+
return {
|
|
507
|
+
snapsContained: l,
|
|
508
|
+
scrollContainLimit: c
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
function Cn(t, n, e) {
|
|
512
|
+
const i = n[0], o = e ? i - t : it(n);
|
|
513
|
+
return {
|
|
514
|
+
limit: ut(o, i)
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function Fn(t, n, e, i) {
|
|
518
|
+
const r = n.min + 0.1, s = n.max + 0.1, {
|
|
519
|
+
reachedMin: c,
|
|
520
|
+
reachedMax: l
|
|
521
|
+
} = ut(r, s);
|
|
522
|
+
function a(d) {
|
|
523
|
+
return d === 1 ? l(e.get()) : d === -1 ? c(e.get()) : !1;
|
|
524
|
+
}
|
|
525
|
+
function y(d) {
|
|
526
|
+
if (!a(d)) return;
|
|
527
|
+
const x = t * (d * -1);
|
|
528
|
+
i.forEach((p) => p.add(x));
|
|
529
|
+
}
|
|
530
|
+
return {
|
|
531
|
+
loop: y
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
function jn(t) {
|
|
535
|
+
const {
|
|
536
|
+
max: n,
|
|
537
|
+
length: e
|
|
538
|
+
} = t;
|
|
539
|
+
function i(r) {
|
|
540
|
+
const s = r - n;
|
|
541
|
+
return e ? s / -e : 0;
|
|
542
|
+
}
|
|
543
|
+
return {
|
|
544
|
+
get: i
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
function kn(t, n, e, i, o) {
|
|
548
|
+
const {
|
|
549
|
+
startEdge: r,
|
|
550
|
+
endEdge: s
|
|
551
|
+
} = t, {
|
|
552
|
+
groupSlides: c
|
|
553
|
+
} = o, l = f().map(n.measure), a = d(), y = x();
|
|
554
|
+
function f() {
|
|
555
|
+
return c(i).map((g) => it(g)[s] - g[0][r]).map(X);
|
|
556
|
+
}
|
|
557
|
+
function d() {
|
|
558
|
+
return i.map((g) => e[r] - g[r]).map((g) => -X(g));
|
|
559
|
+
}
|
|
560
|
+
function x() {
|
|
561
|
+
return c(a).map((g) => g[0]).map((g, m) => g + l[m]);
|
|
562
|
+
}
|
|
563
|
+
return {
|
|
564
|
+
snaps: a,
|
|
565
|
+
snapsAligned: y
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
function Nn(t, n, e, i, o, r) {
|
|
569
|
+
const {
|
|
570
|
+
groupSlides: s
|
|
571
|
+
} = o, {
|
|
572
|
+
min: c,
|
|
573
|
+
max: l
|
|
574
|
+
} = i, a = y();
|
|
575
|
+
function y() {
|
|
576
|
+
const d = s(r), x = !t || n === "keepSnaps";
|
|
577
|
+
return e.length === 1 ? [r] : x ? d : d.slice(c, l).map((p, g, m) => {
|
|
578
|
+
const u = !g, S = kt(m, g);
|
|
579
|
+
if (u) {
|
|
580
|
+
const v = it(m[0]) + 1;
|
|
581
|
+
return Xt(v);
|
|
582
|
+
}
|
|
583
|
+
if (S) {
|
|
584
|
+
const v = xt(r) - it(m)[0] + 1;
|
|
585
|
+
return Xt(v, it(m)[0]);
|
|
586
|
+
}
|
|
587
|
+
return p;
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
return {
|
|
591
|
+
slideRegistry: a
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
function Bn(t, n, e, i, o) {
|
|
595
|
+
const {
|
|
596
|
+
reachedAny: r,
|
|
597
|
+
removeOffset: s,
|
|
598
|
+
constrain: c
|
|
599
|
+
} = i;
|
|
600
|
+
function l(p) {
|
|
601
|
+
return p.concat().sort((g, m) => X(g) - X(m))[0];
|
|
602
|
+
}
|
|
603
|
+
function a(p) {
|
|
604
|
+
const g = t ? s(p) : c(p), m = n.map((S, v) => ({
|
|
605
|
+
diff: y(S - g, 0),
|
|
606
|
+
index: v
|
|
607
|
+
})).sort((S, v) => X(S.diff) - X(v.diff)), {
|
|
608
|
+
index: u
|
|
609
|
+
} = m[0];
|
|
610
|
+
return {
|
|
611
|
+
index: u,
|
|
612
|
+
distance: g
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
function y(p, g) {
|
|
616
|
+
const m = [p, p + e, p - e];
|
|
617
|
+
if (!t) return p;
|
|
618
|
+
if (!g) return l(m);
|
|
619
|
+
const u = m.filter((S) => jt(S) === g);
|
|
620
|
+
return u.length ? l(u) : it(m) - e;
|
|
621
|
+
}
|
|
622
|
+
function f(p, g) {
|
|
623
|
+
const m = n[p] - o.get(), u = y(m, g);
|
|
624
|
+
return {
|
|
625
|
+
index: p,
|
|
626
|
+
distance: u
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
function d(p, g) {
|
|
630
|
+
const m = o.get() + p, {
|
|
631
|
+
index: u,
|
|
632
|
+
distance: S
|
|
633
|
+
} = a(m), v = !t && r(m);
|
|
634
|
+
if (!g || v) return {
|
|
635
|
+
index: u,
|
|
636
|
+
distance: p
|
|
637
|
+
};
|
|
638
|
+
const A = n[u] - S, F = p + y(A, 0);
|
|
639
|
+
return {
|
|
640
|
+
index: u,
|
|
641
|
+
distance: F
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
return {
|
|
645
|
+
byDistance: d,
|
|
646
|
+
byIndex: f,
|
|
647
|
+
shortcut: y
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
function Rn(t, n, e, i, o, r, s) {
|
|
651
|
+
function c(f) {
|
|
652
|
+
const d = f.distance, x = f.index !== n.get();
|
|
653
|
+
r.add(d), d && (i.duration() ? t.start() : (t.update(), t.render(1), t.update())), x && (e.set(n.get()), n.set(f.index), s.emit("select"));
|
|
654
|
+
}
|
|
655
|
+
function l(f, d) {
|
|
656
|
+
const x = o.byDistance(f, d);
|
|
657
|
+
c(x);
|
|
658
|
+
}
|
|
659
|
+
function a(f, d) {
|
|
660
|
+
const x = n.clone().set(f), p = o.byIndex(x.get(), d);
|
|
661
|
+
c(p);
|
|
662
|
+
}
|
|
663
|
+
return {
|
|
664
|
+
distance: l,
|
|
665
|
+
index: a
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
function zn(t, n, e, i, o, r, s, c) {
|
|
669
|
+
const l = {
|
|
670
|
+
passive: !0,
|
|
671
|
+
capture: !0
|
|
672
|
+
};
|
|
673
|
+
let a = 0;
|
|
674
|
+
function y(x) {
|
|
675
|
+
if (!c) return;
|
|
676
|
+
function p(g) {
|
|
677
|
+
if ((/* @__PURE__ */ new Date()).getTime() - a > 10) return;
|
|
678
|
+
s.emit("slideFocusStart"), t.scrollLeft = 0;
|
|
679
|
+
const S = e.findIndex((v) => v.includes(g));
|
|
680
|
+
Ft(S) && (o.useDuration(0), i.index(S, 0), s.emit("slideFocus"));
|
|
681
|
+
}
|
|
682
|
+
r.add(document, "keydown", f, !1), n.forEach((g, m) => {
|
|
683
|
+
r.add(g, "focus", (u) => {
|
|
684
|
+
(wt(c) || c(x, u)) && p(m);
|
|
685
|
+
}, l);
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
function f(x) {
|
|
689
|
+
x.code === "Tab" && (a = (/* @__PURE__ */ new Date()).getTime());
|
|
690
|
+
}
|
|
691
|
+
return {
|
|
692
|
+
init: y
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
function mt(t) {
|
|
696
|
+
let n = t;
|
|
697
|
+
function e() {
|
|
698
|
+
return n;
|
|
699
|
+
}
|
|
700
|
+
function i(l) {
|
|
701
|
+
n = s(l);
|
|
702
|
+
}
|
|
703
|
+
function o(l) {
|
|
704
|
+
n += s(l);
|
|
705
|
+
}
|
|
706
|
+
function r(l) {
|
|
707
|
+
n -= s(l);
|
|
708
|
+
}
|
|
709
|
+
function s(l) {
|
|
710
|
+
return Ft(l) ? l : l.get();
|
|
711
|
+
}
|
|
712
|
+
return {
|
|
713
|
+
get: e,
|
|
714
|
+
set: i,
|
|
715
|
+
add: o,
|
|
716
|
+
subtract: r
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
function tn(t, n) {
|
|
720
|
+
const e = t.scroll === "x" ? s : c, i = n.style;
|
|
721
|
+
let o = null, r = !1;
|
|
722
|
+
function s(d) {
|
|
723
|
+
return `translate3d(${d}px,0px,0px)`;
|
|
724
|
+
}
|
|
725
|
+
function c(d) {
|
|
726
|
+
return `translate3d(0px,${d}px,0px)`;
|
|
727
|
+
}
|
|
728
|
+
function l(d) {
|
|
729
|
+
if (r) return;
|
|
730
|
+
const x = xn(t.direction(d));
|
|
731
|
+
x !== o && (i.transform = e(x), o = x);
|
|
732
|
+
}
|
|
733
|
+
function a(d) {
|
|
734
|
+
r = !d;
|
|
735
|
+
}
|
|
736
|
+
function y() {
|
|
737
|
+
r || (i.transform = "", n.getAttribute("style") || n.removeAttribute("style"));
|
|
738
|
+
}
|
|
739
|
+
return {
|
|
740
|
+
clear: y,
|
|
741
|
+
to: l,
|
|
742
|
+
toggleActive: a
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
function Hn(t, n, e, i, o, r, s, c, l) {
|
|
746
|
+
const y = yt(o), f = yt(o).reverse(), d = u().concat(S());
|
|
747
|
+
function x(M, P) {
|
|
748
|
+
return M.reduce((w, h) => w - o[h], P);
|
|
749
|
+
}
|
|
750
|
+
function p(M, P) {
|
|
751
|
+
return M.reduce((w, h) => x(w, P) > 0 ? w.concat([h]) : w, []);
|
|
752
|
+
}
|
|
753
|
+
function g(M) {
|
|
754
|
+
return r.map((P, w) => ({
|
|
755
|
+
start: P - i[w] + 0.5 + M,
|
|
756
|
+
end: P + n - 0.5 + M
|
|
757
|
+
}));
|
|
758
|
+
}
|
|
759
|
+
function m(M, P, w) {
|
|
760
|
+
const h = g(P);
|
|
761
|
+
return M.map((L) => {
|
|
762
|
+
const U = w ? 0 : -e, G = w ? e : 0, b = w ? "end" : "start", O = h[L][b];
|
|
763
|
+
return {
|
|
764
|
+
index: L,
|
|
765
|
+
loopPoint: O,
|
|
766
|
+
slideLocation: mt(-1),
|
|
767
|
+
translate: tn(t, l[L]),
|
|
768
|
+
target: () => c.get() > O ? U : G
|
|
769
|
+
};
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
function u() {
|
|
773
|
+
const M = s[0], P = p(f, M);
|
|
774
|
+
return m(P, e, !1);
|
|
775
|
+
}
|
|
776
|
+
function S() {
|
|
777
|
+
const M = n - s[0] - 1, P = p(y, M);
|
|
778
|
+
return m(P, -e, !0);
|
|
779
|
+
}
|
|
780
|
+
function v() {
|
|
781
|
+
return d.every(({
|
|
782
|
+
index: M
|
|
783
|
+
}) => {
|
|
784
|
+
const P = y.filter((w) => w !== M);
|
|
785
|
+
return x(P, n) <= 0.1;
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
function A() {
|
|
789
|
+
d.forEach((M) => {
|
|
790
|
+
const {
|
|
791
|
+
target: P,
|
|
792
|
+
translate: w,
|
|
793
|
+
slideLocation: h
|
|
794
|
+
} = M, L = P();
|
|
795
|
+
L !== h.get() && (w.to(L), h.set(L));
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
function F() {
|
|
799
|
+
d.forEach((M) => M.translate.clear());
|
|
800
|
+
}
|
|
801
|
+
return {
|
|
802
|
+
canLoop: v,
|
|
803
|
+
clear: F,
|
|
804
|
+
loop: A,
|
|
805
|
+
loopPoints: d
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
function Un(t, n, e) {
|
|
809
|
+
let i, o = !1;
|
|
810
|
+
function r(l) {
|
|
811
|
+
if (!e) return;
|
|
812
|
+
function a(y) {
|
|
813
|
+
for (const f of y)
|
|
814
|
+
if (f.type === "childList") {
|
|
815
|
+
l.reInit(), n.emit("slidesChanged");
|
|
816
|
+
break;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
i = new MutationObserver((y) => {
|
|
820
|
+
o || (wt(e) || e(l, y)) && a(y);
|
|
821
|
+
}), i.observe(t, {
|
|
822
|
+
childList: !0
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
function s() {
|
|
826
|
+
i && i.disconnect(), o = !0;
|
|
827
|
+
}
|
|
828
|
+
return {
|
|
829
|
+
init: r,
|
|
830
|
+
destroy: s
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
function $n(t, n, e, i) {
|
|
834
|
+
const o = {};
|
|
835
|
+
let r = null, s = null, c, l = !1;
|
|
836
|
+
function a() {
|
|
837
|
+
c = new IntersectionObserver((p) => {
|
|
838
|
+
l || (p.forEach((g) => {
|
|
839
|
+
const m = n.indexOf(g.target);
|
|
840
|
+
o[m] = g;
|
|
841
|
+
}), r = null, s = null, e.emit("slidesInView"));
|
|
842
|
+
}, {
|
|
843
|
+
root: t.parentElement,
|
|
844
|
+
threshold: i
|
|
845
|
+
}), n.forEach((p) => c.observe(p));
|
|
846
|
+
}
|
|
847
|
+
function y() {
|
|
848
|
+
c && c.disconnect(), l = !0;
|
|
849
|
+
}
|
|
850
|
+
function f(p) {
|
|
851
|
+
return St(o).reduce((g, m) => {
|
|
852
|
+
const u = parseInt(m), {
|
|
853
|
+
isIntersecting: S
|
|
854
|
+
} = o[u];
|
|
855
|
+
return (p && S || !p && !S) && g.push(u), g;
|
|
856
|
+
}, []);
|
|
857
|
+
}
|
|
858
|
+
function d(p = !0) {
|
|
859
|
+
if (p && r) return r;
|
|
860
|
+
if (!p && s) return s;
|
|
861
|
+
const g = f(p);
|
|
862
|
+
return p && (r = g), p || (s = g), g;
|
|
863
|
+
}
|
|
864
|
+
return {
|
|
865
|
+
init: a,
|
|
866
|
+
destroy: y,
|
|
867
|
+
get: d
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
function Vn(t, n, e, i, o, r) {
|
|
871
|
+
const {
|
|
872
|
+
measureSize: s,
|
|
873
|
+
startEdge: c,
|
|
874
|
+
endEdge: l
|
|
875
|
+
} = t, a = e[0] && o, y = p(), f = g(), d = e.map(s), x = m();
|
|
876
|
+
function p() {
|
|
877
|
+
if (!a) return 0;
|
|
878
|
+
const S = e[0];
|
|
879
|
+
return X(n[c] - S[c]);
|
|
880
|
+
}
|
|
881
|
+
function g() {
|
|
882
|
+
if (!a) return 0;
|
|
883
|
+
const S = r.getComputedStyle(it(i));
|
|
884
|
+
return parseFloat(S.getPropertyValue(`margin-${l}`));
|
|
885
|
+
}
|
|
886
|
+
function m() {
|
|
887
|
+
return e.map((S, v, A) => {
|
|
888
|
+
const F = !v, D = kt(A, v);
|
|
889
|
+
return F ? d[v] + y : D ? d[v] + f : A[v + 1][c] - S[c];
|
|
890
|
+
}).map(X);
|
|
891
|
+
}
|
|
892
|
+
return {
|
|
893
|
+
slideSizes: d,
|
|
894
|
+
slideSizesWithGaps: x,
|
|
895
|
+
startGap: y,
|
|
896
|
+
endGap: f
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
function Gn(t, n, e, i, o, r, s, c, l) {
|
|
900
|
+
const {
|
|
901
|
+
startEdge: a,
|
|
902
|
+
endEdge: y,
|
|
903
|
+
direction: f
|
|
904
|
+
} = t, d = Ft(e);
|
|
905
|
+
function x(u, S) {
|
|
906
|
+
return yt(u).filter((v) => v % S === 0).map((v) => u.slice(v, v + S));
|
|
907
|
+
}
|
|
908
|
+
function p(u) {
|
|
909
|
+
return u.length ? yt(u).reduce((S, v, A) => {
|
|
910
|
+
const F = it(S) || 0, D = F === 0, M = v === xt(u), P = o[a] - r[F][a], w = o[a] - r[v][y], h = !i && D ? f(s) : 0, L = !i && M ? f(c) : 0, U = X(w - L - (P + h));
|
|
911
|
+
return A && U > n + l && S.push(v), M && S.push(u.length), S;
|
|
912
|
+
}, []).map((S, v, A) => {
|
|
913
|
+
const F = Math.max(A[v - 1] || 0);
|
|
914
|
+
return u.slice(F, S);
|
|
915
|
+
}) : [];
|
|
916
|
+
}
|
|
917
|
+
function g(u) {
|
|
918
|
+
return d ? x(u, e) : p(u);
|
|
919
|
+
}
|
|
920
|
+
return {
|
|
921
|
+
groupSlides: g
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
function _n(t, n, e, i, o, r, s) {
|
|
925
|
+
const {
|
|
926
|
+
align: c,
|
|
927
|
+
axis: l,
|
|
928
|
+
direction: a,
|
|
929
|
+
startIndex: y,
|
|
930
|
+
loop: f,
|
|
931
|
+
duration: d,
|
|
932
|
+
dragFree: x,
|
|
933
|
+
dragThreshold: p,
|
|
934
|
+
inViewThreshold: g,
|
|
935
|
+
slidesToScroll: m,
|
|
936
|
+
skipSnaps: u,
|
|
937
|
+
containScroll: S,
|
|
938
|
+
watchResize: v,
|
|
939
|
+
watchSlides: A,
|
|
940
|
+
watchDrag: F,
|
|
941
|
+
watchFocus: D
|
|
942
|
+
} = r, M = 2, P = Dn(), w = P.measure(n), h = e.map(P.measure), L = On(l, a), U = L.measureSize(w), G = Ln(U), b = vn(c, U), O = !f && !!S, T = f || !!S, {
|
|
943
|
+
slideSizes: I,
|
|
944
|
+
slideSizesWithGaps: C,
|
|
945
|
+
startGap: j,
|
|
946
|
+
endGap: N
|
|
947
|
+
} = Vn(L, w, h, e, T, o), k = Gn(L, U, m, f, w, h, j, N, M), {
|
|
948
|
+
snaps: R,
|
|
949
|
+
snapsAligned: $
|
|
950
|
+
} = kn(L, b, w, h, k), _ = -it(R) + it(C), {
|
|
951
|
+
snapsContained: J,
|
|
952
|
+
scrollContainLimit: ot
|
|
953
|
+
} = An(U, _, $, S, M), Z = O ? J : $, {
|
|
954
|
+
limit: V
|
|
955
|
+
} = Cn(_, Z, f), nt = Wt(xt(Z), y, f), Q = nt.clone(), B = yt(e), E = ({
|
|
956
|
+
dragHandler: ft,
|
|
957
|
+
scrollBody: Dt,
|
|
958
|
+
scrollBounds: Lt,
|
|
959
|
+
options: {
|
|
960
|
+
loop: Et
|
|
961
|
+
}
|
|
962
|
+
}) => {
|
|
963
|
+
Et || Lt.constrain(ft.pointerDown()), Dt.seek();
|
|
964
|
+
}, z = ({
|
|
965
|
+
scrollBody: ft,
|
|
966
|
+
translate: Dt,
|
|
967
|
+
location: Lt,
|
|
968
|
+
offsetLocation: Et,
|
|
969
|
+
previousLocation: on,
|
|
970
|
+
scrollLooper: sn,
|
|
971
|
+
slideLooper: rn,
|
|
972
|
+
dragHandler: cn,
|
|
973
|
+
animation: ln,
|
|
974
|
+
eventHandler: Ht,
|
|
975
|
+
scrollBounds: an,
|
|
976
|
+
options: {
|
|
977
|
+
loop: Ut
|
|
978
|
+
}
|
|
979
|
+
}, $t) => {
|
|
980
|
+
const Vt = ft.settled(), un = !an.shouldConstrain(), Gt = Ut ? Vt : Vt && un, _t = Gt && !cn.pointerDown();
|
|
981
|
+
_t && ln.stop();
|
|
982
|
+
const fn = Lt.get() * $t + on.get() * (1 - $t);
|
|
983
|
+
Et.set(fn), Ut && (sn.loop(ft.direction()), rn.loop()), Dt.to(Et.get()), _t && Ht.emit("settle"), Gt || Ht.emit("scroll");
|
|
984
|
+
}, q = En(i, o, () => E(gt), (ft) => z(gt, ft)), W = 0.68, rt = Z[nt.get()], st = mt(rt), ct = mt(rt), lt = mt(rt), et = mt(rt), at = Mn(st, lt, ct, et, d, W), dt = Bn(f, Z, _, V, et), pt = Rn(q, nt, Q, at, dt, et, s), tt = jn(V), Y = bt(), zt = $n(n, e, s, g), {
|
|
985
|
+
slideRegistry: vt
|
|
986
|
+
} = Nn(O, S, Z, ot, k, B), It = zn(t, e, vt, pt, at, Y, s, D), gt = {
|
|
987
|
+
ownerDocument: i,
|
|
988
|
+
ownerWindow: o,
|
|
989
|
+
eventHandler: s,
|
|
990
|
+
containerRect: w,
|
|
991
|
+
slideRects: h,
|
|
992
|
+
animation: q,
|
|
993
|
+
axis: L,
|
|
994
|
+
dragHandler: wn(L, t, i, o, et, In(L, o), st, q, pt, at, dt, nt, s, G, x, p, u, W, F),
|
|
995
|
+
eventStore: Y,
|
|
996
|
+
percentOfView: G,
|
|
997
|
+
index: nt,
|
|
998
|
+
indexPrevious: Q,
|
|
999
|
+
limit: V,
|
|
1000
|
+
location: st,
|
|
1001
|
+
offsetLocation: lt,
|
|
1002
|
+
previousLocation: ct,
|
|
1003
|
+
options: r,
|
|
1004
|
+
resizeHandler: Tn(n, s, o, e, L, v, P),
|
|
1005
|
+
scrollBody: at,
|
|
1006
|
+
scrollBounds: Pn(V, lt, et, at, G),
|
|
1007
|
+
scrollLooper: Fn(_, V, lt, [st, lt, ct, et]),
|
|
1008
|
+
scrollProgress: tt,
|
|
1009
|
+
scrollSnapList: Z.map(tt.get),
|
|
1010
|
+
scrollSnaps: Z,
|
|
1011
|
+
scrollTarget: dt,
|
|
1012
|
+
scrollTo: pt,
|
|
1013
|
+
slideLooper: Hn(L, U, _, I, C, R, Z, lt, e),
|
|
1014
|
+
slideFocus: It,
|
|
1015
|
+
slidesHandler: Un(n, s, A),
|
|
1016
|
+
slidesInView: zt,
|
|
1017
|
+
slideIndexes: B,
|
|
1018
|
+
slideRegistry: vt,
|
|
1019
|
+
slidesToScroll: k,
|
|
1020
|
+
target: et,
|
|
1021
|
+
translate: tn(L, n)
|
|
1022
|
+
};
|
|
1023
|
+
return gt;
|
|
1024
|
+
}
|
|
1025
|
+
function qn() {
|
|
1026
|
+
let t = {}, n;
|
|
1027
|
+
function e(a) {
|
|
1028
|
+
n = a;
|
|
1029
|
+
}
|
|
1030
|
+
function i(a) {
|
|
1031
|
+
return t[a] || [];
|
|
1032
|
+
}
|
|
1033
|
+
function o(a) {
|
|
1034
|
+
return i(a).forEach((y) => y(n, a)), l;
|
|
1035
|
+
}
|
|
1036
|
+
function r(a, y) {
|
|
1037
|
+
return t[a] = i(a).concat([y]), l;
|
|
1038
|
+
}
|
|
1039
|
+
function s(a, y) {
|
|
1040
|
+
return t[a] = i(a).filter((f) => f !== y), l;
|
|
1041
|
+
}
|
|
1042
|
+
function c() {
|
|
1043
|
+
t = {};
|
|
1044
|
+
}
|
|
1045
|
+
const l = {
|
|
1046
|
+
init: e,
|
|
1047
|
+
emit: o,
|
|
1048
|
+
off: s,
|
|
1049
|
+
on: r,
|
|
1050
|
+
clear: c
|
|
1051
|
+
};
|
|
1052
|
+
return l;
|
|
1053
|
+
}
|
|
1054
|
+
const Yn = {
|
|
1055
|
+
align: "center",
|
|
1056
|
+
axis: "x",
|
|
1057
|
+
container: null,
|
|
1058
|
+
slides: null,
|
|
1059
|
+
containScroll: "trimSnaps",
|
|
1060
|
+
direction: "ltr",
|
|
1061
|
+
slidesToScroll: 1,
|
|
1062
|
+
inViewThreshold: 0,
|
|
1063
|
+
breakpoints: {},
|
|
1064
|
+
dragFree: !1,
|
|
1065
|
+
dragThreshold: 10,
|
|
1066
|
+
loop: !1,
|
|
1067
|
+
skipSnaps: !1,
|
|
1068
|
+
duration: 25,
|
|
1069
|
+
startIndex: 0,
|
|
1070
|
+
active: !0,
|
|
1071
|
+
watchDrag: !0,
|
|
1072
|
+
watchResize: !0,
|
|
1073
|
+
watchSlides: !0,
|
|
1074
|
+
watchFocus: !0
|
|
1075
|
+
};
|
|
1076
|
+
function Kn(t) {
|
|
1077
|
+
function n(r, s) {
|
|
1078
|
+
return Zt(r, s || {});
|
|
1079
|
+
}
|
|
1080
|
+
function e(r) {
|
|
1081
|
+
const s = r.breakpoints || {}, c = St(s).filter((l) => t.matchMedia(l).matches).map((l) => s[l]).reduce((l, a) => n(l, a), {});
|
|
1082
|
+
return n(r, c);
|
|
1083
|
+
}
|
|
1084
|
+
function i(r) {
|
|
1085
|
+
return r.map((s) => St(s.breakpoints || {})).reduce((s, c) => s.concat(c), []).map(t.matchMedia);
|
|
1086
|
+
}
|
|
1087
|
+
return {
|
|
1088
|
+
mergeOptions: n,
|
|
1089
|
+
optionsAtMedia: e,
|
|
1090
|
+
optionsMediaQueries: i
|
|
1091
|
+
};
|
|
1092
|
+
}
|
|
1093
|
+
function Xn(t) {
|
|
1094
|
+
let n = [];
|
|
1095
|
+
function e(r, s) {
|
|
1096
|
+
return n = s.filter(({
|
|
1097
|
+
options: c
|
|
1098
|
+
}) => t.optionsAtMedia(c).active !== !1), n.forEach((c) => c.init(r, t)), s.reduce((c, l) => Object.assign(c, {
|
|
1099
|
+
[l.name]: l
|
|
1100
|
+
}), {});
|
|
1101
|
+
}
|
|
1102
|
+
function i() {
|
|
1103
|
+
n = n.filter((r) => r.destroy());
|
|
1104
|
+
}
|
|
1105
|
+
return {
|
|
1106
|
+
init: e,
|
|
1107
|
+
destroy: i
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1110
|
+
function Ot(t, n, e) {
|
|
1111
|
+
const i = t.ownerDocument, o = i.defaultView, r = Kn(o), s = Xn(r), c = bt(), l = qn(), {
|
|
1112
|
+
mergeOptions: a,
|
|
1113
|
+
optionsAtMedia: y,
|
|
1114
|
+
optionsMediaQueries: f
|
|
1115
|
+
} = r, {
|
|
1116
|
+
on: d,
|
|
1117
|
+
off: x,
|
|
1118
|
+
emit: p
|
|
1119
|
+
} = l, g = L;
|
|
1120
|
+
let m = !1, u, S = a(Yn, Ot.globalOptions), v = a(S), A = [], F, D, M;
|
|
1121
|
+
function P() {
|
|
1122
|
+
const {
|
|
1123
|
+
container: B,
|
|
1124
|
+
slides: E
|
|
1125
|
+
} = v;
|
|
1126
|
+
D = (Pt(B) ? t.querySelector(B) : B) || t.children[0];
|
|
1127
|
+
const q = Pt(E) ? D.querySelectorAll(E) : E;
|
|
1128
|
+
M = [].slice.call(q || D.children);
|
|
1129
|
+
}
|
|
1130
|
+
function w(B) {
|
|
1131
|
+
const E = _n(t, D, M, i, o, B, l);
|
|
1132
|
+
if (B.loop && !E.slideLooper.canLoop()) {
|
|
1133
|
+
const z = Object.assign({}, B, {
|
|
1134
|
+
loop: !1
|
|
1135
|
+
});
|
|
1136
|
+
return w(z);
|
|
1137
|
+
}
|
|
1138
|
+
return E;
|
|
1139
|
+
}
|
|
1140
|
+
function h(B, E) {
|
|
1141
|
+
m || (S = a(S, B), v = y(S), A = E || A, P(), u = w(v), f([S, ...A.map(({
|
|
1142
|
+
options: z
|
|
1143
|
+
}) => z)]).forEach((z) => c.add(z, "change", L)), v.active && (u.translate.to(u.location.get()), u.animation.init(), u.slidesInView.init(), u.slideFocus.init(Q), u.eventHandler.init(Q), u.resizeHandler.init(Q), u.slidesHandler.init(Q), u.options.loop && u.slideLooper.loop(), D.offsetParent && M.length && u.dragHandler.init(Q), F = s.init(Q, A)));
|
|
1144
|
+
}
|
|
1145
|
+
function L(B, E) {
|
|
1146
|
+
const z = k();
|
|
1147
|
+
U(), h(a({
|
|
1148
|
+
startIndex: z
|
|
1149
|
+
}, B), E), l.emit("reInit");
|
|
1150
|
+
}
|
|
1151
|
+
function U() {
|
|
1152
|
+
u.dragHandler.destroy(), u.eventStore.clear(), u.translate.clear(), u.slideLooper.clear(), u.resizeHandler.destroy(), u.slidesHandler.destroy(), u.slidesInView.destroy(), u.animation.destroy(), s.destroy(), c.clear();
|
|
1153
|
+
}
|
|
1154
|
+
function G() {
|
|
1155
|
+
m || (m = !0, c.clear(), U(), l.emit("destroy"), l.clear());
|
|
1156
|
+
}
|
|
1157
|
+
function b(B, E, z) {
|
|
1158
|
+
!v.active || m || (u.scrollBody.useBaseFriction().useDuration(E === !0 ? 0 : v.duration), u.scrollTo.index(B, z || 0));
|
|
1159
|
+
}
|
|
1160
|
+
function O(B) {
|
|
1161
|
+
const E = u.index.add(1).get();
|
|
1162
|
+
b(E, B, -1);
|
|
1163
|
+
}
|
|
1164
|
+
function T(B) {
|
|
1165
|
+
const E = u.index.add(-1).get();
|
|
1166
|
+
b(E, B, 1);
|
|
1167
|
+
}
|
|
1168
|
+
function I() {
|
|
1169
|
+
return u.index.add(1).get() !== k();
|
|
1170
|
+
}
|
|
1171
|
+
function C() {
|
|
1172
|
+
return u.index.add(-1).get() !== k();
|
|
1173
|
+
}
|
|
1174
|
+
function j() {
|
|
1175
|
+
return u.scrollSnapList;
|
|
1176
|
+
}
|
|
1177
|
+
function N() {
|
|
1178
|
+
return u.scrollProgress.get(u.offsetLocation.get());
|
|
1179
|
+
}
|
|
1180
|
+
function k() {
|
|
1181
|
+
return u.index.get();
|
|
1182
|
+
}
|
|
1183
|
+
function R() {
|
|
1184
|
+
return u.indexPrevious.get();
|
|
1185
|
+
}
|
|
1186
|
+
function $() {
|
|
1187
|
+
return u.slidesInView.get();
|
|
1188
|
+
}
|
|
1189
|
+
function _() {
|
|
1190
|
+
return u.slidesInView.get(!1);
|
|
1191
|
+
}
|
|
1192
|
+
function J() {
|
|
1193
|
+
return F;
|
|
1194
|
+
}
|
|
1195
|
+
function ot() {
|
|
1196
|
+
return u;
|
|
1197
|
+
}
|
|
1198
|
+
function Z() {
|
|
1199
|
+
return t;
|
|
1200
|
+
}
|
|
1201
|
+
function V() {
|
|
1202
|
+
return D;
|
|
1203
|
+
}
|
|
1204
|
+
function nt() {
|
|
1205
|
+
return M;
|
|
1206
|
+
}
|
|
1207
|
+
const Q = {
|
|
1208
|
+
canScrollNext: I,
|
|
1209
|
+
canScrollPrev: C,
|
|
1210
|
+
containerNode: V,
|
|
1211
|
+
internalEngine: ot,
|
|
1212
|
+
destroy: G,
|
|
1213
|
+
off: x,
|
|
1214
|
+
on: d,
|
|
1215
|
+
emit: p,
|
|
1216
|
+
plugins: J,
|
|
1217
|
+
previousScrollSnap: R,
|
|
1218
|
+
reInit: g,
|
|
1219
|
+
rootNode: Z,
|
|
1220
|
+
scrollNext: O,
|
|
1221
|
+
scrollPrev: T,
|
|
1222
|
+
scrollProgress: N,
|
|
1223
|
+
scrollSnapList: j,
|
|
1224
|
+
scrollTo: b,
|
|
1225
|
+
selectedScrollSnap: k,
|
|
1226
|
+
slideNodes: nt,
|
|
1227
|
+
slidesInView: $,
|
|
1228
|
+
slidesNotInView: _
|
|
1229
|
+
};
|
|
1230
|
+
return h(n, e), setTimeout(() => l.emit("init"), 0), Q;
|
|
1231
|
+
}
|
|
1232
|
+
Ot.globalOptions = void 0;
|
|
1233
|
+
function Nt(t = {}, n = []) {
|
|
1234
|
+
const e = K.useRef(t), i = K.useRef(n), [o, r] = K.useState(), [s, c] = K.useState(), l = K.useCallback(() => {
|
|
1235
|
+
o && o.reInit(e.current, i.current);
|
|
1236
|
+
}, [o]);
|
|
1237
|
+
return K.useEffect(() => {
|
|
1238
|
+
Ct(e.current, t) || (e.current = t, l());
|
|
1239
|
+
}, [t, l]), K.useEffect(() => {
|
|
1240
|
+
Sn(i.current, n) || (i.current = n, l());
|
|
1241
|
+
}, [n, l]), K.useEffect(() => {
|
|
1242
|
+
if (yn() && s) {
|
|
1243
|
+
Ot.globalOptions = Nt.globalOptions;
|
|
1244
|
+
const a = Ot(s, e.current, i.current);
|
|
1245
|
+
return r(a), () => a.destroy();
|
|
1246
|
+
} else
|
|
1247
|
+
r(void 0);
|
|
1248
|
+
}, [s, r]), [c, o];
|
|
1249
|
+
}
|
|
1250
|
+
Nt.globalOptions = void 0;
|
|
1251
|
+
const Qn = {
|
|
1252
|
+
active: !0,
|
|
1253
|
+
breakpoints: {},
|
|
1254
|
+
delay: 4e3,
|
|
1255
|
+
jump: !1,
|
|
1256
|
+
playOnInit: !0,
|
|
1257
|
+
stopOnFocusIn: !0,
|
|
1258
|
+
stopOnInteraction: !0,
|
|
1259
|
+
stopOnMouseEnter: !1,
|
|
1260
|
+
stopOnLastSnap: !1,
|
|
1261
|
+
rootNode: null
|
|
1262
|
+
};
|
|
1263
|
+
function Jn(t, n) {
|
|
1264
|
+
const e = t.scrollSnapList();
|
|
1265
|
+
return typeof n == "number" ? e.map(() => n) : n(e, t);
|
|
1266
|
+
}
|
|
1267
|
+
function Zn(t, n) {
|
|
1268
|
+
const e = t.rootNode();
|
|
1269
|
+
return n && n(e) || e;
|
|
1270
|
+
}
|
|
1271
|
+
function Bt(t = {}) {
|
|
1272
|
+
let n, e, i, o, r = null, s = 0, c = !1, l = !1, a = !1, y = !1;
|
|
1273
|
+
function f(b, O) {
|
|
1274
|
+
e = b;
|
|
1275
|
+
const {
|
|
1276
|
+
mergeOptions: T,
|
|
1277
|
+
optionsAtMedia: I
|
|
1278
|
+
} = O, C = T(Qn, Bt.globalOptions), j = T(C, t);
|
|
1279
|
+
if (n = I(j), e.scrollSnapList().length <= 1) return;
|
|
1280
|
+
y = n.jump, i = !1, o = Jn(e, n.delay);
|
|
1281
|
+
const {
|
|
1282
|
+
eventStore: N,
|
|
1283
|
+
ownerDocument: k
|
|
1284
|
+
} = e.internalEngine(), R = !!e.internalEngine().options.watchDrag, $ = Zn(e, n.rootNode);
|
|
1285
|
+
N.add(k, "visibilitychange", u), R && e.on("pointerDown", v), R && !n.stopOnInteraction && e.on("pointerUp", A), n.stopOnMouseEnter && N.add($, "mouseenter", F), n.stopOnMouseEnter && !n.stopOnInteraction && N.add($, "mouseleave", D), n.stopOnFocusIn && e.on("slideFocusStart", m), n.stopOnFocusIn && !n.stopOnInteraction && N.add(e.containerNode(), "focusout", g), n.playOnInit && g();
|
|
1286
|
+
}
|
|
1287
|
+
function d() {
|
|
1288
|
+
e.off("pointerDown", v).off("pointerUp", A).off("slideFocusStart", m), m(), i = !0, c = !1;
|
|
1289
|
+
}
|
|
1290
|
+
function x() {
|
|
1291
|
+
const {
|
|
1292
|
+
ownerWindow: b
|
|
1293
|
+
} = e.internalEngine();
|
|
1294
|
+
b.clearTimeout(s), s = b.setTimeout(L, o[e.selectedScrollSnap()]), r = (/* @__PURE__ */ new Date()).getTime(), e.emit("autoplay:timerset");
|
|
1295
|
+
}
|
|
1296
|
+
function p() {
|
|
1297
|
+
const {
|
|
1298
|
+
ownerWindow: b
|
|
1299
|
+
} = e.internalEngine();
|
|
1300
|
+
b.clearTimeout(s), s = 0, r = null, e.emit("autoplay:timerstopped");
|
|
1301
|
+
}
|
|
1302
|
+
function g() {
|
|
1303
|
+
if (!i) {
|
|
1304
|
+
if (S()) {
|
|
1305
|
+
a = !0;
|
|
1306
|
+
return;
|
|
1307
|
+
}
|
|
1308
|
+
c || e.emit("autoplay:play"), x(), c = !0;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
function m() {
|
|
1312
|
+
i || (c && e.emit("autoplay:stop"), p(), c = !1);
|
|
1313
|
+
}
|
|
1314
|
+
function u() {
|
|
1315
|
+
if (S())
|
|
1316
|
+
return a = c, m();
|
|
1317
|
+
a && g();
|
|
1318
|
+
}
|
|
1319
|
+
function S() {
|
|
1320
|
+
const {
|
|
1321
|
+
ownerDocument: b
|
|
1322
|
+
} = e.internalEngine();
|
|
1323
|
+
return b.visibilityState === "hidden";
|
|
1324
|
+
}
|
|
1325
|
+
function v() {
|
|
1326
|
+
l || m();
|
|
1327
|
+
}
|
|
1328
|
+
function A() {
|
|
1329
|
+
l || g();
|
|
1330
|
+
}
|
|
1331
|
+
function F() {
|
|
1332
|
+
l = !0, m();
|
|
1333
|
+
}
|
|
1334
|
+
function D() {
|
|
1335
|
+
l = !1, g();
|
|
1336
|
+
}
|
|
1337
|
+
function M(b) {
|
|
1338
|
+
typeof b < "u" && (y = b), g();
|
|
1339
|
+
}
|
|
1340
|
+
function P() {
|
|
1341
|
+
c && m();
|
|
1342
|
+
}
|
|
1343
|
+
function w() {
|
|
1344
|
+
c && g();
|
|
1345
|
+
}
|
|
1346
|
+
function h() {
|
|
1347
|
+
return c;
|
|
1348
|
+
}
|
|
1349
|
+
function L() {
|
|
1350
|
+
const {
|
|
1351
|
+
index: b
|
|
1352
|
+
} = e.internalEngine(), O = b.clone().add(1).get(), T = e.scrollSnapList().length - 1, I = n.stopOnLastSnap && O === T;
|
|
1353
|
+
if (e.canScrollNext() ? e.scrollNext(y) : e.scrollTo(0, y), e.emit("autoplay:select"), I) return m();
|
|
1354
|
+
g();
|
|
1355
|
+
}
|
|
1356
|
+
function U() {
|
|
1357
|
+
if (!r) return null;
|
|
1358
|
+
const b = o[e.selectedScrollSnap()], O = (/* @__PURE__ */ new Date()).getTime() - r;
|
|
1359
|
+
return b - O;
|
|
1360
|
+
}
|
|
1361
|
+
return {
|
|
1362
|
+
name: "autoplay",
|
|
1363
|
+
options: t,
|
|
1364
|
+
init: f,
|
|
1365
|
+
destroy: d,
|
|
1366
|
+
play: M,
|
|
1367
|
+
stop: P,
|
|
1368
|
+
reset: w,
|
|
1369
|
+
isPlaying: h,
|
|
1370
|
+
timeUntilNext: U
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1373
|
+
Bt.globalOptions = void 0;
|
|
1374
|
+
const Wn = {
|
|
1375
|
+
direction: "forward",
|
|
1376
|
+
speed: 2,
|
|
1377
|
+
startDelay: 1e3,
|
|
1378
|
+
active: !0,
|
|
1379
|
+
breakpoints: {},
|
|
1380
|
+
playOnInit: !0,
|
|
1381
|
+
stopOnFocusIn: !0,
|
|
1382
|
+
stopOnInteraction: !0,
|
|
1383
|
+
stopOnMouseEnter: !1,
|
|
1384
|
+
rootNode: null
|
|
1385
|
+
};
|
|
1386
|
+
function te(t, n) {
|
|
1387
|
+
const e = t.rootNode();
|
|
1388
|
+
return n && n(e) || e;
|
|
1389
|
+
}
|
|
1390
|
+
function Rt(t = {}) {
|
|
1391
|
+
let n, e, i, o, r = 0, s = !1, c = !1, l;
|
|
1392
|
+
function a(w, h) {
|
|
1393
|
+
e = w;
|
|
1394
|
+
const {
|
|
1395
|
+
mergeOptions: L,
|
|
1396
|
+
optionsAtMedia: U
|
|
1397
|
+
} = h, G = L(Wn, Rt.globalOptions), b = L(G, t);
|
|
1398
|
+
if (n = U(b), e.scrollSnapList().length <= 1) return;
|
|
1399
|
+
o = n.startDelay, i = !1, l = e.internalEngine().scrollBody;
|
|
1400
|
+
const {
|
|
1401
|
+
eventStore: O
|
|
1402
|
+
} = e.internalEngine(), T = !!e.internalEngine().options.watchDrag, I = te(e, n.rootNode);
|
|
1403
|
+
T && e.on("pointerDown", p), T && !n.stopOnInteraction && e.on("pointerUp", g), n.stopOnMouseEnter && O.add(I, "mouseenter", m), n.stopOnMouseEnter && !n.stopOnInteraction && O.add(I, "mouseleave", u), n.stopOnFocusIn && e.on("slideFocusStart", d), n.stopOnFocusIn && !n.stopOnInteraction && O.add(e.containerNode(), "focusout", f), n.playOnInit && f();
|
|
1404
|
+
}
|
|
1405
|
+
function y() {
|
|
1406
|
+
e.off("pointerDown", p).off("pointerUp", g).off("slideFocusStart", d).off("settle", S), d(), i = !0, s = !1;
|
|
1407
|
+
}
|
|
1408
|
+
function f() {
|
|
1409
|
+
if (i || s) return;
|
|
1410
|
+
e.emit("autoScroll:play");
|
|
1411
|
+
const w = e.internalEngine(), {
|
|
1412
|
+
ownerWindow: h
|
|
1413
|
+
} = w;
|
|
1414
|
+
r = h.setTimeout(() => {
|
|
1415
|
+
w.scrollBody = x(w), w.animation.start();
|
|
1416
|
+
}, o), s = !0;
|
|
1417
|
+
}
|
|
1418
|
+
function d() {
|
|
1419
|
+
if (i || !s) return;
|
|
1420
|
+
e.emit("autoScroll:stop");
|
|
1421
|
+
const w = e.internalEngine(), {
|
|
1422
|
+
ownerWindow: h
|
|
1423
|
+
} = w;
|
|
1424
|
+
w.scrollBody = l, h.clearTimeout(r), r = 0, s = !1;
|
|
1425
|
+
}
|
|
1426
|
+
function x(w) {
|
|
1427
|
+
const {
|
|
1428
|
+
location: h,
|
|
1429
|
+
previousLocation: L,
|
|
1430
|
+
offsetLocation: U,
|
|
1431
|
+
target: G,
|
|
1432
|
+
scrollTarget: b,
|
|
1433
|
+
index: O,
|
|
1434
|
+
indexPrevious: T,
|
|
1435
|
+
limit: {
|
|
1436
|
+
reachedMin: I,
|
|
1437
|
+
reachedMax: C,
|
|
1438
|
+
constrain: j
|
|
1439
|
+
},
|
|
1440
|
+
options: {
|
|
1441
|
+
loop: N
|
|
1442
|
+
}
|
|
1443
|
+
} = w, k = n.direction === "forward" ? -1 : 1, R = () => nt;
|
|
1444
|
+
let $ = 0, _ = 0, J = h.get(), ot = 0, Z = !1;
|
|
1445
|
+
function V() {
|
|
1446
|
+
let Q = 0;
|
|
1447
|
+
L.set(h), $ = k * n.speed, J += $, h.add($), G.set(h), Q = J - ot, _ = Math.sign(Q), ot = J;
|
|
1448
|
+
const B = b.byDistance(0, !1).index;
|
|
1449
|
+
O.get() !== B && (T.set(O.get()), O.set(B), e.emit("select"));
|
|
1450
|
+
const E = n.direction === "forward" ? I(U.get()) : C(U.get());
|
|
1451
|
+
if (!N && E) {
|
|
1452
|
+
Z = !0;
|
|
1453
|
+
const z = j(h.get());
|
|
1454
|
+
h.set(z), G.set(h), d();
|
|
1455
|
+
}
|
|
1456
|
+
return nt;
|
|
1457
|
+
}
|
|
1458
|
+
const nt = {
|
|
1459
|
+
direction: () => _,
|
|
1460
|
+
duration: () => -1,
|
|
1461
|
+
velocity: () => $,
|
|
1462
|
+
settled: () => Z,
|
|
1463
|
+
seek: V,
|
|
1464
|
+
useBaseFriction: R,
|
|
1465
|
+
useBaseDuration: R,
|
|
1466
|
+
useFriction: R,
|
|
1467
|
+
useDuration: R
|
|
1468
|
+
};
|
|
1469
|
+
return nt;
|
|
1470
|
+
}
|
|
1471
|
+
function p() {
|
|
1472
|
+
c || d();
|
|
1473
|
+
}
|
|
1474
|
+
function g() {
|
|
1475
|
+
c || v();
|
|
1476
|
+
}
|
|
1477
|
+
function m() {
|
|
1478
|
+
c = !0, d();
|
|
1479
|
+
}
|
|
1480
|
+
function u() {
|
|
1481
|
+
c = !1, f();
|
|
1482
|
+
}
|
|
1483
|
+
function S() {
|
|
1484
|
+
e.off("settle", S), f();
|
|
1485
|
+
}
|
|
1486
|
+
function v() {
|
|
1487
|
+
e.on("settle", S);
|
|
1488
|
+
}
|
|
1489
|
+
function A(w) {
|
|
1490
|
+
typeof w < "u" && (o = w), f();
|
|
1491
|
+
}
|
|
1492
|
+
function F() {
|
|
1493
|
+
s && d();
|
|
1494
|
+
}
|
|
1495
|
+
function D() {
|
|
1496
|
+
s && (d(), v());
|
|
1497
|
+
}
|
|
1498
|
+
function M() {
|
|
1499
|
+
return s;
|
|
1500
|
+
}
|
|
1501
|
+
return {
|
|
1502
|
+
name: "autoScroll",
|
|
1503
|
+
options: t,
|
|
1504
|
+
init: a,
|
|
1505
|
+
destroy: y,
|
|
1506
|
+
play: A,
|
|
1507
|
+
stop: F,
|
|
1508
|
+
reset: D,
|
|
1509
|
+
isPlaying: M
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
Rt.globalOptions = void 0;
|
|
1513
|
+
function Qt(t, n, e) {
|
|
1514
|
+
return Math.min(Math.max(t, n), e);
|
|
1515
|
+
}
|
|
1516
|
+
function Mt(t) {
|
|
1517
|
+
return typeof t == "number" && !isNaN(t);
|
|
1518
|
+
}
|
|
1519
|
+
function nn(t = {}) {
|
|
1520
|
+
let o, r = [], s, c = 0, l = 0, a = 0, y = !1, f, d;
|
|
1521
|
+
function x(b) {
|
|
1522
|
+
o = b;
|
|
1523
|
+
const O = o.selectedScrollSnap(), {
|
|
1524
|
+
scrollBody: T,
|
|
1525
|
+
containerRect: I,
|
|
1526
|
+
axis: C
|
|
1527
|
+
} = o.internalEngine(), j = C.measureSize(I);
|
|
1528
|
+
s = Qt(j * 0.75, 200, 500), y = !1, r = o.scrollSnapList().map((N, k) => k === O ? 1 : 0), f = T.settled, d = o.scrollProgress, T.settled = L, o.scrollProgress = U, o.on("select", S).on("slideFocus", g).on("pointerDown", u).on("pointerUp", m), A(), g();
|
|
1529
|
+
}
|
|
1530
|
+
function p() {
|
|
1531
|
+
const {
|
|
1532
|
+
scrollBody: b
|
|
1533
|
+
} = o.internalEngine();
|
|
1534
|
+
b.settled = f, o.scrollProgress = d, o.off("select", S).off("slideFocus", g).off("pointerDown", u).off("pointerUp", m), o.slideNodes().forEach((O) => {
|
|
1535
|
+
const T = O.style;
|
|
1536
|
+
T.opacity = "", T.transform = "", T.pointerEvents = "", O.getAttribute("style") || O.removeAttribute("style");
|
|
1537
|
+
});
|
|
1538
|
+
}
|
|
1539
|
+
function g() {
|
|
1540
|
+
const b = o.selectedScrollSnap();
|
|
1541
|
+
D(b, 1);
|
|
1542
|
+
}
|
|
1543
|
+
function m() {
|
|
1544
|
+
y = !1;
|
|
1545
|
+
}
|
|
1546
|
+
function u() {
|
|
1547
|
+
y = !1, c = 0, l = 0;
|
|
1548
|
+
}
|
|
1549
|
+
function S() {
|
|
1550
|
+
const b = o.internalEngine().scrollBody.duration();
|
|
1551
|
+
l = b ? 0 : 1, y = !0, b || g();
|
|
1552
|
+
}
|
|
1553
|
+
function v(b) {
|
|
1554
|
+
const {
|
|
1555
|
+
axis: O
|
|
1556
|
+
} = o.internalEngine();
|
|
1557
|
+
return `translate${O.scroll.toUpperCase()}(${O.direction(b)}px)`;
|
|
1558
|
+
}
|
|
1559
|
+
function A() {
|
|
1560
|
+
const {
|
|
1561
|
+
translate: b,
|
|
1562
|
+
slideLooper: O
|
|
1563
|
+
} = o.internalEngine();
|
|
1564
|
+
b.clear(), b.toggleActive(!1), O.loopPoints.forEach(({
|
|
1565
|
+
translate: T
|
|
1566
|
+
}) => {
|
|
1567
|
+
T.clear(), T.toggleActive(!1);
|
|
1568
|
+
});
|
|
1569
|
+
}
|
|
1570
|
+
function F(b) {
|
|
1571
|
+
const {
|
|
1572
|
+
scrollSnaps: O,
|
|
1573
|
+
location: T,
|
|
1574
|
+
target: I
|
|
1575
|
+
} = o.internalEngine();
|
|
1576
|
+
!Mt(b) || r[b] < 0.5 || (T.set(O[b]), I.set(T));
|
|
1577
|
+
}
|
|
1578
|
+
function D(b, O) {
|
|
1579
|
+
o.scrollSnapList().forEach((I, C) => {
|
|
1580
|
+
const j = Math.abs(O), N = r[C], k = C === b, R = k ? N + j : N - j, $ = Qt(R, 0, 1);
|
|
1581
|
+
r[C] = $;
|
|
1582
|
+
const _ = k && y, J = o.previousScrollSnap();
|
|
1583
|
+
_ && (r[J] = 1 - $), k && P(b, $), M(C);
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
function M(b) {
|
|
1587
|
+
const O = o.internalEngine().slideRegistry[b], {
|
|
1588
|
+
scrollSnaps: T,
|
|
1589
|
+
containerRect: I
|
|
1590
|
+
} = o.internalEngine(), C = r[b];
|
|
1591
|
+
O.forEach((j) => {
|
|
1592
|
+
const N = o.slideNodes()[j].style, k = parseFloat(C.toFixed(2)), R = k > 0, $ = R ? T[b] : I.width + 2, _ = v($);
|
|
1593
|
+
R && (N.transform = _), N.opacity = k.toString(), N.pointerEvents = C > 0.5 ? "auto" : "none", R || (N.transform = _);
|
|
1594
|
+
});
|
|
1595
|
+
}
|
|
1596
|
+
function P(b, O) {
|
|
1597
|
+
const {
|
|
1598
|
+
index: T,
|
|
1599
|
+
dragHandler: I,
|
|
1600
|
+
scrollSnaps: C
|
|
1601
|
+
} = o.internalEngine(), j = I.pointerDown(), N = 1 / (C.length - 1);
|
|
1602
|
+
let k = b, R = j ? o.selectedScrollSnap() : o.previousScrollSnap();
|
|
1603
|
+
if (j && k === R) {
|
|
1604
|
+
const J = Math.sign(c) * -1;
|
|
1605
|
+
k = R, R = T.clone().set(R).add(J).get();
|
|
1606
|
+
}
|
|
1607
|
+
const $ = R * N, _ = (k - R) * N;
|
|
1608
|
+
a = $ + _ * O;
|
|
1609
|
+
}
|
|
1610
|
+
function w() {
|
|
1611
|
+
const {
|
|
1612
|
+
dragHandler: b,
|
|
1613
|
+
index: O,
|
|
1614
|
+
scrollBody: T
|
|
1615
|
+
} = o.internalEngine(), I = o.selectedScrollSnap();
|
|
1616
|
+
if (!b.pointerDown()) return I;
|
|
1617
|
+
const C = Math.sign(T.velocity()), j = Math.sign(c), N = O.clone().set(I).add(C * -1).get();
|
|
1618
|
+
return !C || !j ? null : j === C ? N : I;
|
|
1619
|
+
}
|
|
1620
|
+
function h(b) {
|
|
1621
|
+
const {
|
|
1622
|
+
dragHandler: O,
|
|
1623
|
+
scrollBody: T
|
|
1624
|
+
} = b.internalEngine(), I = O.pointerDown(), C = T.velocity(), j = T.duration(), N = w(), k = !Mt(N);
|
|
1625
|
+
if (I) {
|
|
1626
|
+
if (!C) return;
|
|
1627
|
+
c += C, l = Math.abs(C / s), F(N);
|
|
1628
|
+
}
|
|
1629
|
+
if (!I) {
|
|
1630
|
+
if (!j || k) return;
|
|
1631
|
+
l += (1 - r[N]) / j, l *= 0.68;
|
|
1632
|
+
}
|
|
1633
|
+
k || D(N, l);
|
|
1634
|
+
}
|
|
1635
|
+
function L() {
|
|
1636
|
+
const {
|
|
1637
|
+
target: b,
|
|
1638
|
+
location: O
|
|
1639
|
+
} = o.internalEngine(), T = b.get() - O.get(), I = Math.abs(T) >= 1, C = w(), j = !Mt(C);
|
|
1640
|
+
return h(o), j || I ? !1 : r[C] > 0.999;
|
|
1641
|
+
}
|
|
1642
|
+
function U() {
|
|
1643
|
+
return a;
|
|
1644
|
+
}
|
|
1645
|
+
return {
|
|
1646
|
+
name: "fade",
|
|
1647
|
+
options: t,
|
|
1648
|
+
init: x,
|
|
1649
|
+
destroy: p
|
|
1650
|
+
};
|
|
1651
|
+
}
|
|
1652
|
+
nn.globalOptions = void 0;
|
|
1653
|
+
function ne(t, n, e) {
|
|
1654
|
+
return e === "fade" ? 1 : t !== void 0 ? t : n ? null : 1;
|
|
1655
|
+
}
|
|
1656
|
+
function ee(t, n, e) {
|
|
1657
|
+
return n === "fade" && e === 1 ? 0 : t;
|
|
1658
|
+
}
|
|
1659
|
+
function en(t) {
|
|
1660
|
+
return t == null || t <= 1 ? 0 : Math.ceil(t) - 1;
|
|
1661
|
+
}
|
|
1662
|
+
function oe(t, n, e) {
|
|
1663
|
+
if (t != null)
|
|
1664
|
+
return n == null || n <= 0 ? t : t * n + en(n) * e;
|
|
1665
|
+
}
|
|
1666
|
+
function se(t, n, e) {
|
|
1667
|
+
return (t - en(n) * e) / n;
|
|
1668
|
+
}
|
|
1669
|
+
function re({
|
|
1670
|
+
loop: t,
|
|
1671
|
+
continuous: n,
|
|
1672
|
+
visibleCount: e,
|
|
1673
|
+
childCount: i
|
|
1674
|
+
}) {
|
|
1675
|
+
if (!t || n || e == null || e <= 1 || i <= 0) return 1;
|
|
1676
|
+
const o = Math.ceil(e) + 1;
|
|
1677
|
+
return i >= o ? 1 : Math.ceil(o / i);
|
|
1678
|
+
}
|
|
1679
|
+
function ie(t, n) {
|
|
1680
|
+
const [e, i] = K.useState(void 0);
|
|
1681
|
+
return [K.useCallback(
|
|
1682
|
+
(r) => {
|
|
1683
|
+
if (!r || !t || n != null) return;
|
|
1684
|
+
const s = r.firstElementChild;
|
|
1685
|
+
s && s.offsetHeight > 0 ? i(s.offsetHeight) : requestAnimationFrame(() => {
|
|
1686
|
+
const c = r.firstElementChild;
|
|
1687
|
+
c && c.offsetHeight > 0 && i(c.offsetHeight);
|
|
1688
|
+
});
|
|
1689
|
+
},
|
|
1690
|
+
[t, n]
|
|
1691
|
+
), n ?? e];
|
|
1692
|
+
}
|
|
1693
|
+
function ue({
|
|
1694
|
+
visible: t,
|
|
1695
|
+
gap: n = 0,
|
|
1696
|
+
height: e,
|
|
1697
|
+
direction: i = "left",
|
|
1698
|
+
loop: o = !0,
|
|
1699
|
+
autoAdvance: r = 0,
|
|
1700
|
+
continuous: s = !1,
|
|
1701
|
+
speed: c = 2,
|
|
1702
|
+
effect: l = "slide",
|
|
1703
|
+
dimInactive: a = !1,
|
|
1704
|
+
showControls: y = !0,
|
|
1705
|
+
controlsPosition: f = "outside",
|
|
1706
|
+
showDots: d = !1,
|
|
1707
|
+
pauseOnHover: x = !0,
|
|
1708
|
+
align: p = "start",
|
|
1709
|
+
slidesToScroll: g = 1,
|
|
1710
|
+
drag: m = !0,
|
|
1711
|
+
className: u,
|
|
1712
|
+
cssClass: S,
|
|
1713
|
+
children: v
|
|
1714
|
+
}) {
|
|
1715
|
+
const A = i === "up" || i === "down", F = ne(t, s, l), D = K.Children.toArray(v).filter(
|
|
1716
|
+
(I) => I != null && I !== ""
|
|
1717
|
+
), [M, P] = ie(A, e), w = !A || P != null, h = F != null && F > 0 ? F : null, L = ee(n, l, h), U = A ? e ?? oe(P, h, L) : void 0, G = L > 0 ? L / 2 : 0, b = h != null ? A && U != null ? `${se(
|
|
1718
|
+
U,
|
|
1719
|
+
h,
|
|
1720
|
+
L
|
|
1721
|
+
)}px` : `${100 / h}%` : void 0;
|
|
1722
|
+
let O = D;
|
|
1723
|
+
if (o && s)
|
|
1724
|
+
O = [
|
|
1725
|
+
...D,
|
|
1726
|
+
...D.map(
|
|
1727
|
+
(I, C) => Tt.cloneElement(I, { key: `dup1-${C}` })
|
|
1728
|
+
),
|
|
1729
|
+
...D.map(
|
|
1730
|
+
(I, C) => Tt.cloneElement(I, { key: `dup2-${C}` })
|
|
1731
|
+
)
|
|
1732
|
+
];
|
|
1733
|
+
else if (o && h != null && h > 1 && D.length > 0) {
|
|
1734
|
+
const I = re({
|
|
1735
|
+
loop: o,
|
|
1736
|
+
continuous: s,
|
|
1737
|
+
visibleCount: h,
|
|
1738
|
+
childCount: D.length
|
|
1739
|
+
});
|
|
1740
|
+
I > 1 && (O = Array.from(
|
|
1741
|
+
{ length: I },
|
|
1742
|
+
(C, j) => D.map(
|
|
1743
|
+
(N, k) => Tt.cloneElement(N, {
|
|
1744
|
+
key: `loopdup-${j}-${k}`
|
|
1745
|
+
})
|
|
1746
|
+
)
|
|
1747
|
+
).flat());
|
|
1748
|
+
}
|
|
1749
|
+
const T = D.length;
|
|
1750
|
+
return w ? /* @__PURE__ */ H.jsx(
|
|
1751
|
+
ce,
|
|
1752
|
+
{
|
|
1753
|
+
isVertical: A,
|
|
1754
|
+
viewportHeight: U,
|
|
1755
|
+
validChildren: O,
|
|
1756
|
+
realSlideCount: T,
|
|
1757
|
+
slideBasis: b,
|
|
1758
|
+
effectiveGap: L,
|
|
1759
|
+
halfGap: G,
|
|
1760
|
+
loop: o,
|
|
1761
|
+
align: p,
|
|
1762
|
+
slidesToScroll: g,
|
|
1763
|
+
continuous: s,
|
|
1764
|
+
drag: m,
|
|
1765
|
+
effect: l,
|
|
1766
|
+
autoAdvance: r,
|
|
1767
|
+
speed: c,
|
|
1768
|
+
direction: i,
|
|
1769
|
+
pauseOnHover: x,
|
|
1770
|
+
dimInactive: a,
|
|
1771
|
+
showControls: y,
|
|
1772
|
+
controlsPosition: f,
|
|
1773
|
+
showDots: d,
|
|
1774
|
+
className: u,
|
|
1775
|
+
cssClass: S
|
|
1776
|
+
}
|
|
1777
|
+
) : /* @__PURE__ */ H.jsx(
|
|
1778
|
+
"div",
|
|
1779
|
+
{
|
|
1780
|
+
ref: M,
|
|
1781
|
+
className: Jt(u, S),
|
|
1782
|
+
style: { overflow: "hidden", height: 0, position: "relative" },
|
|
1783
|
+
children: D[0]
|
|
1784
|
+
}
|
|
1785
|
+
);
|
|
1786
|
+
}
|
|
1787
|
+
function ce({
|
|
1788
|
+
isVertical: t,
|
|
1789
|
+
viewportHeight: n,
|
|
1790
|
+
validChildren: e,
|
|
1791
|
+
realSlideCount: i,
|
|
1792
|
+
slideBasis: o,
|
|
1793
|
+
effectiveGap: r,
|
|
1794
|
+
halfGap: s,
|
|
1795
|
+
loop: c,
|
|
1796
|
+
align: l,
|
|
1797
|
+
slidesToScroll: a,
|
|
1798
|
+
continuous: y,
|
|
1799
|
+
drag: f,
|
|
1800
|
+
effect: d,
|
|
1801
|
+
autoAdvance: x,
|
|
1802
|
+
speed: p,
|
|
1803
|
+
direction: g,
|
|
1804
|
+
pauseOnHover: m,
|
|
1805
|
+
dimInactive: u,
|
|
1806
|
+
showControls: S,
|
|
1807
|
+
controlsPosition: v,
|
|
1808
|
+
showDots: A,
|
|
1809
|
+
className: F,
|
|
1810
|
+
cssClass: D
|
|
1811
|
+
}) {
|
|
1812
|
+
const M = {
|
|
1813
|
+
axis: t ? "y" : "x",
|
|
1814
|
+
loop: c,
|
|
1815
|
+
align: l,
|
|
1816
|
+
slidesToScroll: a,
|
|
1817
|
+
dragFree: y,
|
|
1818
|
+
watchDrag: f
|
|
1819
|
+
}, P = [];
|
|
1820
|
+
d === "fade" && P.push(nn()), y ? P.push(
|
|
1821
|
+
Rt({
|
|
1822
|
+
speed: p,
|
|
1823
|
+
direction: g === "right" || g === "down" ? "backward" : "forward",
|
|
1824
|
+
playOnInit: !0,
|
|
1825
|
+
stopOnMouseEnter: m,
|
|
1826
|
+
stopOnInteraction: !1
|
|
1827
|
+
})
|
|
1828
|
+
) : x > 0 && P.push(
|
|
1829
|
+
Bt({
|
|
1830
|
+
delay: x,
|
|
1831
|
+
playOnInit: !0,
|
|
1832
|
+
stopOnMouseEnter: m,
|
|
1833
|
+
stopOnInteraction: !1
|
|
1834
|
+
})
|
|
1835
|
+
);
|
|
1836
|
+
const [w, h] = Nt(M, P);
|
|
1837
|
+
K.useEffect(() => {
|
|
1838
|
+
if (!h) return;
|
|
1839
|
+
const tt = window;
|
|
1840
|
+
tt.__emblaDebug || (tt.__emblaDebug = []), tt.__emblaDebug.push(h), console.log(
|
|
1841
|
+
"[Carousel] init axis=" + (t ? "y" : "x") + " snaps=" + h.scrollSnapList().length + " canNext=" + h.canScrollNext() + " canPrev=" + h.canScrollPrev() + " slides=" + h.slideNodes().length
|
|
1842
|
+
);
|
|
1843
|
+
}, [h]);
|
|
1844
|
+
const [L, U] = K.useState(!1), [G, b] = K.useState(!1), [O, T] = K.useState(0), [I, C] = K.useState(0), [j, N] = K.useState([]), k = K.useCallback(() => h == null ? void 0 : h.scrollPrev(), [h]), R = K.useCallback(() => h == null ? void 0 : h.scrollNext(), [h]), $ = K.useCallback(
|
|
1845
|
+
(tt) => h == null ? void 0 : h.scrollTo(tt),
|
|
1846
|
+
[h]
|
|
1847
|
+
), _ = K.useCallback(() => {
|
|
1848
|
+
if (!h) return;
|
|
1849
|
+
U(h.canScrollPrev()), b(h.canScrollNext());
|
|
1850
|
+
const tt = h.selectedScrollSnap();
|
|
1851
|
+
T(i > 0 ? tt % i : tt);
|
|
1852
|
+
}, [h, i]), J = K.useCallback((tt) => {
|
|
1853
|
+
const Y = tt.scrollProgress(), vt = tt.scrollSnapList().map((It) => {
|
|
1854
|
+
const gt = Math.abs(Y - It);
|
|
1855
|
+
return Math.max(0.3, 1 - gt * 2);
|
|
1856
|
+
});
|
|
1857
|
+
N(vt);
|
|
1858
|
+
}, []);
|
|
1859
|
+
K.useEffect(() => {
|
|
1860
|
+
if (h)
|
|
1861
|
+
return C(i), _(), h.on("select", _), h.on("reInit", _), u && (J(h), h.on("scroll", J), h.on("reInit", J)), () => {
|
|
1862
|
+
h.off("select", _), h.off("reInit", _), u && (h.off("scroll", J), h.off("reInit", J));
|
|
1863
|
+
};
|
|
1864
|
+
}, [h, _, u, J, i]);
|
|
1865
|
+
const ot = t ? dn : pn, Z = t ? gn : mn, V = S && !y, nt = v === "outside", Q = v === "gutter", B = A && I > 1, E = B && t && !Q, z = B && !t && !Q, q = 32, W = q + 8, st = Q && (V || B) ? q + 12 : 20, ct = t && Q && (V || B), lt = !t && Q && (V || B), et = {
|
|
1866
|
+
zIndex: 10,
|
|
1867
|
+
display: "flex",
|
|
1868
|
+
alignItems: "center",
|
|
1869
|
+
justifyContent: "center",
|
|
1870
|
+
width: q,
|
|
1871
|
+
height: q,
|
|
1872
|
+
borderRadius: "50%",
|
|
1873
|
+
border: "1px solid var(--border, #e5e7eb)",
|
|
1874
|
+
background: "var(--background, #fff)",
|
|
1875
|
+
boxShadow: "0 1px 3px rgba(0,0,0,.1)",
|
|
1876
|
+
cursor: "pointer",
|
|
1877
|
+
transition: "opacity 150ms"
|
|
1878
|
+
}, at = {
|
|
1879
|
+
position: "relative",
|
|
1880
|
+
...V && nt ? t ? { paddingTop: W, paddingBottom: W } : { paddingLeft: W, paddingRight: W } : {},
|
|
1881
|
+
...t && (E || ct) ? { paddingRight: st } : {}
|
|
1882
|
+
}, dt = nt ? t ? { top: 0, left: "50%", transform: "translateX(-50%)" } : { left: 0, top: "50%", transform: "translateY(-50%)" } : t ? { top: 8, right: 8 } : { left: 8, top: "50%", transform: "translateY(-50%)" }, pt = nt ? t ? { bottom: 0, left: "50%", transform: "translateX(-50%)" } : { right: 0, top: "50%", transform: "translateY(-50%)" } : t ? { bottom: 8, right: 8 } : { right: 8, top: "50%", transform: "translateY(-50%)" };
|
|
1883
|
+
return /* @__PURE__ */ H.jsxs("div", { className: Jt(F, D), style: { position: "relative" }, children: [
|
|
1884
|
+
/* @__PURE__ */ H.jsxs("div", { style: at, children: [
|
|
1885
|
+
/* @__PURE__ */ H.jsx(
|
|
1886
|
+
"div",
|
|
1887
|
+
{
|
|
1888
|
+
ref: w,
|
|
1889
|
+
style: {
|
|
1890
|
+
overflow: "hidden",
|
|
1891
|
+
// For vertical: set height on the viewport so Embla knows the
|
|
1892
|
+
// visible area. This was measured before this component mounted.
|
|
1893
|
+
...t && n != null ? { height: n } : {}
|
|
1894
|
+
},
|
|
1895
|
+
children: /* @__PURE__ */ H.jsx(
|
|
1896
|
+
"div",
|
|
1897
|
+
{
|
|
1898
|
+
style: {
|
|
1899
|
+
display: "flex",
|
|
1900
|
+
flexDirection: t ? "column" : "row",
|
|
1901
|
+
// For vertical carousels, Embla measures the container rect for
|
|
1902
|
+
// view size. Keep container height fixed to the viewport height.
|
|
1903
|
+
...t && n != null ? { height: n } : {},
|
|
1904
|
+
touchAction: t ? "pan-x pinch-zoom" : "pan-y pinch-zoom",
|
|
1905
|
+
...r > 0 ? t ? { marginTop: -r } : { marginLeft: -s, marginRight: -s } : {},
|
|
1906
|
+
...d === "fade" ? { position: "relative" } : {}
|
|
1907
|
+
},
|
|
1908
|
+
children: e.map((tt, Y) => /* @__PURE__ */ H.jsx(
|
|
1909
|
+
"div",
|
|
1910
|
+
{
|
|
1911
|
+
role: "group",
|
|
1912
|
+
"aria-roledescription": "slide",
|
|
1913
|
+
style: {
|
|
1914
|
+
flexShrink: 0,
|
|
1915
|
+
flexGrow: 0,
|
|
1916
|
+
...t ? { minHeight: 0, boxSizing: "content-box" } : { minWidth: 0 },
|
|
1917
|
+
...o != null ? { flexBasis: o } : {},
|
|
1918
|
+
...r > 0 ? t ? { paddingTop: r } : { paddingLeft: s, paddingRight: s } : {},
|
|
1919
|
+
...u && j[Y] != null ? {
|
|
1920
|
+
opacity: j[Y],
|
|
1921
|
+
transition: "opacity 300ms ease"
|
|
1922
|
+
} : {}
|
|
1923
|
+
},
|
|
1924
|
+
children: tt
|
|
1925
|
+
},
|
|
1926
|
+
Y
|
|
1927
|
+
))
|
|
1928
|
+
}
|
|
1929
|
+
)
|
|
1930
|
+
}
|
|
1931
|
+
),
|
|
1932
|
+
V && !Q && /* @__PURE__ */ H.jsxs(H.Fragment, { children: [
|
|
1933
|
+
/* @__PURE__ */ H.jsx(
|
|
1934
|
+
"button",
|
|
1935
|
+
{
|
|
1936
|
+
onClick: k,
|
|
1937
|
+
disabled: !c && !L,
|
|
1938
|
+
style: {
|
|
1939
|
+
...et,
|
|
1940
|
+
position: "absolute",
|
|
1941
|
+
opacity: !c && !L ? 0 : 1,
|
|
1942
|
+
...dt
|
|
1943
|
+
},
|
|
1944
|
+
children: /* @__PURE__ */ H.jsx(ot, { style: { width: 16, height: 16 } })
|
|
1945
|
+
}
|
|
1946
|
+
),
|
|
1947
|
+
/* @__PURE__ */ H.jsx(
|
|
1948
|
+
"button",
|
|
1949
|
+
{
|
|
1950
|
+
onClick: R,
|
|
1951
|
+
disabled: !c && !G,
|
|
1952
|
+
style: {
|
|
1953
|
+
...et,
|
|
1954
|
+
position: "absolute",
|
|
1955
|
+
opacity: !c && !G ? 0 : 1,
|
|
1956
|
+
...pt
|
|
1957
|
+
},
|
|
1958
|
+
children: /* @__PURE__ */ H.jsx(Z, { style: { width: 16, height: 16 } })
|
|
1959
|
+
}
|
|
1960
|
+
)
|
|
1961
|
+
] }),
|
|
1962
|
+
E && /* @__PURE__ */ H.jsx(
|
|
1963
|
+
"div",
|
|
1964
|
+
{
|
|
1965
|
+
style: {
|
|
1966
|
+
position: "absolute",
|
|
1967
|
+
top: "50%",
|
|
1968
|
+
right: 0,
|
|
1969
|
+
transform: "translateY(-50%)",
|
|
1970
|
+
display: "flex",
|
|
1971
|
+
flexDirection: "column",
|
|
1972
|
+
alignItems: "center",
|
|
1973
|
+
justifyContent: "center",
|
|
1974
|
+
gap: 6
|
|
1975
|
+
},
|
|
1976
|
+
children: Array.from({ length: I }, (tt, Y) => /* @__PURE__ */ H.jsx(
|
|
1977
|
+
"button",
|
|
1978
|
+
{
|
|
1979
|
+
onClick: () => $(Y),
|
|
1980
|
+
style: {
|
|
1981
|
+
width: 8,
|
|
1982
|
+
height: 8,
|
|
1983
|
+
borderRadius: "50%",
|
|
1984
|
+
border: "none",
|
|
1985
|
+
cursor: "pointer",
|
|
1986
|
+
transition: "opacity 150ms",
|
|
1987
|
+
background: "var(--foreground, #000)",
|
|
1988
|
+
opacity: Y === O ? 1 : 0.2
|
|
1989
|
+
}
|
|
1990
|
+
},
|
|
1991
|
+
Y
|
|
1992
|
+
))
|
|
1993
|
+
}
|
|
1994
|
+
),
|
|
1995
|
+
ct && /* @__PURE__ */ H.jsxs(
|
|
1996
|
+
"div",
|
|
1997
|
+
{
|
|
1998
|
+
style: {
|
|
1999
|
+
position: "absolute",
|
|
2000
|
+
top: "50%",
|
|
2001
|
+
right: 0,
|
|
2002
|
+
transform: "translateY(-50%)",
|
|
2003
|
+
display: "flex",
|
|
2004
|
+
flexDirection: "column",
|
|
2005
|
+
alignItems: "center",
|
|
2006
|
+
justifyContent: "center",
|
|
2007
|
+
gap: 8,
|
|
2008
|
+
width: st
|
|
2009
|
+
},
|
|
2010
|
+
children: [
|
|
2011
|
+
V && /* @__PURE__ */ H.jsx(
|
|
2012
|
+
"button",
|
|
2013
|
+
{
|
|
2014
|
+
onClick: k,
|
|
2015
|
+
disabled: !c && !L,
|
|
2016
|
+
style: {
|
|
2017
|
+
...et,
|
|
2018
|
+
opacity: !c && !L ? 0 : 1
|
|
2019
|
+
},
|
|
2020
|
+
children: /* @__PURE__ */ H.jsx(ot, { style: { width: 16, height: 16 } })
|
|
2021
|
+
}
|
|
2022
|
+
),
|
|
2023
|
+
B && Array.from({ length: I }, (tt, Y) => /* @__PURE__ */ H.jsx(
|
|
2024
|
+
"button",
|
|
2025
|
+
{
|
|
2026
|
+
onClick: () => $(Y),
|
|
2027
|
+
style: {
|
|
2028
|
+
width: 8,
|
|
2029
|
+
height: 8,
|
|
2030
|
+
borderRadius: "50%",
|
|
2031
|
+
border: "none",
|
|
2032
|
+
cursor: "pointer",
|
|
2033
|
+
transition: "opacity 150ms",
|
|
2034
|
+
background: "var(--foreground, #000)",
|
|
2035
|
+
opacity: Y === O ? 1 : 0.2
|
|
2036
|
+
}
|
|
2037
|
+
},
|
|
2038
|
+
Y
|
|
2039
|
+
)),
|
|
2040
|
+
V && /* @__PURE__ */ H.jsx(
|
|
2041
|
+
"button",
|
|
2042
|
+
{
|
|
2043
|
+
onClick: R,
|
|
2044
|
+
disabled: !c && !G,
|
|
2045
|
+
style: {
|
|
2046
|
+
...et,
|
|
2047
|
+
opacity: !c && !G ? 0 : 1
|
|
2048
|
+
},
|
|
2049
|
+
children: /* @__PURE__ */ H.jsx(Z, { style: { width: 16, height: 16 } })
|
|
2050
|
+
}
|
|
2051
|
+
)
|
|
2052
|
+
]
|
|
2053
|
+
}
|
|
2054
|
+
)
|
|
2055
|
+
] }),
|
|
2056
|
+
z && /* @__PURE__ */ H.jsx(
|
|
2057
|
+
"div",
|
|
2058
|
+
{
|
|
2059
|
+
style: {
|
|
2060
|
+
display: "flex",
|
|
2061
|
+
justifyContent: "center",
|
|
2062
|
+
gap: 6,
|
|
2063
|
+
marginTop: 12
|
|
2064
|
+
},
|
|
2065
|
+
children: Array.from({ length: I }, (tt, Y) => /* @__PURE__ */ H.jsx(
|
|
2066
|
+
"button",
|
|
2067
|
+
{
|
|
2068
|
+
onClick: () => $(Y),
|
|
2069
|
+
style: {
|
|
2070
|
+
width: 8,
|
|
2071
|
+
height: 8,
|
|
2072
|
+
borderRadius: "50%",
|
|
2073
|
+
border: "none",
|
|
2074
|
+
cursor: "pointer",
|
|
2075
|
+
transition: "opacity 150ms",
|
|
2076
|
+
background: "var(--foreground, #000)",
|
|
2077
|
+
opacity: Y === O ? 1 : 0.2
|
|
2078
|
+
}
|
|
2079
|
+
},
|
|
2080
|
+
Y
|
|
2081
|
+
))
|
|
2082
|
+
}
|
|
2083
|
+
),
|
|
2084
|
+
lt && /* @__PURE__ */ H.jsxs(
|
|
2085
|
+
"div",
|
|
2086
|
+
{
|
|
2087
|
+
style: {
|
|
2088
|
+
display: "flex",
|
|
2089
|
+
alignItems: "center",
|
|
2090
|
+
justifyContent: "center",
|
|
2091
|
+
gap: 12,
|
|
2092
|
+
marginTop: 12
|
|
2093
|
+
},
|
|
2094
|
+
children: [
|
|
2095
|
+
V && /* @__PURE__ */ H.jsx(
|
|
2096
|
+
"button",
|
|
2097
|
+
{
|
|
2098
|
+
onClick: k,
|
|
2099
|
+
disabled: !c && !L,
|
|
2100
|
+
style: {
|
|
2101
|
+
...et,
|
|
2102
|
+
opacity: !c && !L ? 0 : 1
|
|
2103
|
+
},
|
|
2104
|
+
children: /* @__PURE__ */ H.jsx(ot, { style: { width: 16, height: 16 } })
|
|
2105
|
+
}
|
|
2106
|
+
),
|
|
2107
|
+
B && /* @__PURE__ */ H.jsx(
|
|
2108
|
+
"div",
|
|
2109
|
+
{
|
|
2110
|
+
style: {
|
|
2111
|
+
display: "flex",
|
|
2112
|
+
justifyContent: "center",
|
|
2113
|
+
gap: 6
|
|
2114
|
+
},
|
|
2115
|
+
children: Array.from({ length: I }, (tt, Y) => /* @__PURE__ */ H.jsx(
|
|
2116
|
+
"button",
|
|
2117
|
+
{
|
|
2118
|
+
onClick: () => $(Y),
|
|
2119
|
+
style: {
|
|
2120
|
+
width: 8,
|
|
2121
|
+
height: 8,
|
|
2122
|
+
borderRadius: "50%",
|
|
2123
|
+
border: "none",
|
|
2124
|
+
cursor: "pointer",
|
|
2125
|
+
transition: "opacity 150ms",
|
|
2126
|
+
background: "var(--foreground, #000)",
|
|
2127
|
+
opacity: Y === O ? 1 : 0.2
|
|
2128
|
+
}
|
|
2129
|
+
},
|
|
2130
|
+
Y
|
|
2131
|
+
))
|
|
2132
|
+
}
|
|
2133
|
+
),
|
|
2134
|
+
V && /* @__PURE__ */ H.jsx(
|
|
2135
|
+
"button",
|
|
2136
|
+
{
|
|
2137
|
+
onClick: R,
|
|
2138
|
+
disabled: !c && !G,
|
|
2139
|
+
style: {
|
|
2140
|
+
...et,
|
|
2141
|
+
opacity: !c && !G ? 0 : 1
|
|
2142
|
+
},
|
|
2143
|
+
children: /* @__PURE__ */ H.jsx(Z, { style: { width: 16, height: 16 } })
|
|
2144
|
+
}
|
|
2145
|
+
)
|
|
2146
|
+
]
|
|
2147
|
+
}
|
|
2148
|
+
)
|
|
2149
|
+
] });
|
|
2150
|
+
}
|
|
2151
|
+
export {
|
|
2152
|
+
ue as PrefabCarousel
|
|
2153
|
+
};
|