@maycolem/stories 20.0.0 → 21.0.0
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/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +390 -389
- package/dist/index.esm.js.map +1 -1
- package/dist/stories.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as b, jsxs as q, Fragment as qn } from "react/jsx-runtime";
|
|
2
2
|
import * as En from "react";
|
|
3
|
-
import E, { useState as
|
|
3
|
+
import E, { useState as _t, useRef as Z, useCallback as pe, createContext as Ht, useMemo as qe, useEffect as k, Fragment as Wo, useContext as st, useLayoutEffect as Ia, forwardRef as Aa, createElement as Ma } from "react";
|
|
4
4
|
import Ra from "react-dom";
|
|
5
5
|
const La = "_ScrollMenu_hnfum_9", Ba = "_scrollContainerClassName_hnfum_16", Oa = "_itemClassName_hnfum_28", sn = {
|
|
6
6
|
ScrollMenu: La,
|
|
7
7
|
scrollContainerClassName: Ba,
|
|
8
8
|
itemClassName: Oa
|
|
9
|
-
}, Da = "_ProfileStory_bmzly_1", Na = "_ProfileStoryWrap_bmzly_12", Fa = "_ProfileStory__wrapImage_bmzly_26", ja = "_ProfileStory__image_bmzly_35", ka = "_ProfileStory__title_bmzly_50", $a = "_hasSeenAllStories_bmzly_59",
|
|
9
|
+
}, Da = "_ProfileStory_bmzly_1", Na = "_ProfileStoryWrap_bmzly_12", Fa = "_ProfileStory__wrapImage_bmzly_26", ja = "_ProfileStory__image_bmzly_35", ka = "_ProfileStory__title_bmzly_50", $a = "_hasSeenAllStories_bmzly_59", Gt = {
|
|
10
10
|
ProfileStory: Da,
|
|
11
11
|
ProfileStoryWrap: Na,
|
|
12
12
|
ProfileStory__wrapImage: Fa,
|
|
@@ -57,9 +57,9 @@ function Ua() {
|
|
|
57
57
|
}(un)), un.exports;
|
|
58
58
|
}
|
|
59
59
|
var Wa = Ua();
|
|
60
|
-
const
|
|
60
|
+
const Wt = /* @__PURE__ */ Ho(Wa);
|
|
61
61
|
function Ha() {
|
|
62
|
-
const [t, e] =
|
|
62
|
+
const [t, e] = _t({ width: 0, height: 0 }), n = Z();
|
|
63
63
|
return [pe((o) => {
|
|
64
64
|
n.current && n.current.disconnect(), o && (n.current = new ResizeObserver((a) => {
|
|
65
65
|
const i = a[0];
|
|
@@ -69,9 +69,9 @@ function Ha() {
|
|
|
69
69
|
}), n.current.observe(o));
|
|
70
70
|
}, []), t];
|
|
71
71
|
}
|
|
72
|
-
var ln,
|
|
72
|
+
var ln, _r;
|
|
73
73
|
function za() {
|
|
74
|
-
return
|
|
74
|
+
return _r || (_r = 1, ln = { hexToRGB: (r) => {
|
|
75
75
|
let o = r;
|
|
76
76
|
return o.length === 4 && (o = o[0] + o[1] + o[1] + o[2] + o[2] + o[3] + o[3]), {
|
|
77
77
|
r: parseInt(o.substring(1, 3), 16),
|
|
@@ -80,10 +80,10 @@ function za() {
|
|
|
80
80
|
};
|
|
81
81
|
}, formatRGB: ({ r, g: o, b: a }) => `rgb(${r},${o},${a})`, formatRGBA: ({ r, g: o, b: a }, i) => `rgba(${r},${o},${a},${i})` }), ln;
|
|
82
82
|
}
|
|
83
|
-
var cn,
|
|
83
|
+
var cn, Pr;
|
|
84
84
|
function Ga() {
|
|
85
|
-
if (
|
|
86
|
-
|
|
85
|
+
if (Pr) return cn;
|
|
86
|
+
Pr = 1;
|
|
87
87
|
const { hexToRGB: t, formatRGB: e, formatRGBA: n } = za();
|
|
88
88
|
return cn = (o, a) => {
|
|
89
89
|
const i = t(o);
|
|
@@ -101,11 +101,11 @@ const Ya = /* @__PURE__ */ Ho(Ka), zo = ({
|
|
|
101
101
|
hasSeenAllStories: i
|
|
102
102
|
}) => {
|
|
103
103
|
const [s, { width: u, height: l }] = Ha();
|
|
104
|
-
return /* @__PURE__ */
|
|
104
|
+
return /* @__PURE__ */ b("div", { ref: s, children: /* @__PURE__ */ q(
|
|
105
105
|
"div",
|
|
106
106
|
{
|
|
107
|
-
className:
|
|
108
|
-
[
|
|
107
|
+
className: Wt(Gt.ProfileStory, r, {
|
|
108
|
+
[Gt.hasSeenAllStories]: i
|
|
109
109
|
}),
|
|
110
110
|
onClick: o,
|
|
111
111
|
style: {
|
|
@@ -114,8 +114,8 @@ const Ya = /* @__PURE__ */ Ho(Ka), zo = ({
|
|
|
114
114
|
"--story-width": a ?? `${u}px`
|
|
115
115
|
},
|
|
116
116
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
e && /* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ b("div", { className: Gt.ProfileStoryWrap, children: /* @__PURE__ */ b("div", { className: Gt.ProfileStory__wrapImage, children: /* @__PURE__ */ b("div", { className: Gt.ProfileStory__image, children: /* @__PURE__ */ b("img", { src: t, alt: "", draggable: !1 }) }) }) }),
|
|
118
|
+
e && /* @__PURE__ */ b("div", { className: Gt.ProfileStory__title, children: e })
|
|
119
119
|
]
|
|
120
120
|
}
|
|
121
121
|
) });
|
|
@@ -175,7 +175,7 @@ let is = class {
|
|
|
175
175
|
}, this.getVisible = () => this.filter((e) => e[1].visible), this.observer = new is(), this.firstRun = !0;
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
|
-
const
|
|
178
|
+
const wr = (t) => typeof t == "object" && t != null && t.nodeType === 1, xr = (t, e) => (!e || t !== "hidden") && t !== "visible" && t !== "clip", fn = (t, e) => {
|
|
179
179
|
if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
|
|
180
180
|
const n = getComputedStyle(t, null);
|
|
181
181
|
return xr(n.overflowY, e) || xr(n.overflowX, e) || ((r) => {
|
|
@@ -198,31 +198,31 @@ const _r = (t) => typeof t == "object" && t != null && t.nodeType === 1, xr = (t
|
|
|
198
198
|
var n, r, o, a;
|
|
199
199
|
if (typeof document > "u") return [];
|
|
200
200
|
const { scrollMode: i, block: s, inline: u, boundary: l, skipOverflowHiddenElements: c } = e, f = typeof l == "function" ? l : (Q) => Q !== l;
|
|
201
|
-
if (!
|
|
201
|
+
if (!wr(t)) throw new TypeError("Invalid target");
|
|
202
202
|
const d = document.scrollingElement || document.documentElement, p = [];
|
|
203
203
|
let v = t;
|
|
204
|
-
for (;
|
|
204
|
+
for (; wr(v) && f(v); ) {
|
|
205
205
|
if (v = ss(v), v === d) {
|
|
206
206
|
p.push(v);
|
|
207
207
|
break;
|
|
208
208
|
}
|
|
209
209
|
v != null && v === document.body && fn(v) && !fn(document.documentElement) || v != null && fn(v, c) && p.push(v);
|
|
210
210
|
}
|
|
211
|
-
const m = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, y = (a = (o = window.visualViewport) == null ? void 0 : o.height) != null ? a : innerHeight, { scrollX: h, scrollY: S } = window, { height: g, width:
|
|
211
|
+
const m = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, y = (a = (o = window.visualViewport) == null ? void 0 : o.height) != null ? a : innerHeight, { scrollX: h, scrollY: S } = window, { height: g, width: P, top: x, right: T, bottom: R, left: O } = t.getBoundingClientRect(), { top: V, right: F, bottom: J, left: $ } = ((Q) => {
|
|
212
212
|
const M = window.getComputedStyle(Q);
|
|
213
213
|
return { top: parseFloat(M.scrollMarginTop) || 0, right: parseFloat(M.scrollMarginRight) || 0, bottom: parseFloat(M.scrollMarginBottom) || 0, left: parseFloat(M.scrollMarginLeft) || 0 };
|
|
214
214
|
})(t);
|
|
215
|
-
let j = s === "start" || s === "nearest" ? x - V : s === "end" ? R + J : x + g / 2 - V + J, I = u === "center" ? O +
|
|
215
|
+
let j = s === "start" || s === "nearest" ? x - V : s === "end" ? R + J : x + g / 2 - V + J, I = u === "center" ? O + P / 2 - $ + F : u === "end" ? T + F : O - $;
|
|
216
216
|
const G = [];
|
|
217
217
|
for (let Q = 0; Q < p.length; Q++) {
|
|
218
218
|
const M = p[Q], { height: it, width: at, top: ut, right: U, bottom: X, left: D } = M.getBoundingClientRect();
|
|
219
219
|
if (i === "if-needed" && x >= 0 && O >= 0 && R <= y && T <= m && x >= ut && R <= X && O >= D && T <= U) return G;
|
|
220
|
-
const
|
|
220
|
+
const w = getComputedStyle(M), C = parseInt(w.borderLeftWidth, 10), B = parseInt(w.borderTopWidth, 10), L = parseInt(w.borderRightWidth, 10), N = parseInt(w.borderBottomWidth, 10);
|
|
221
221
|
let W = 0, rt = 0;
|
|
222
222
|
const ot = "offsetWidth" in M ? M.offsetWidth - M.clientWidth - C - L : 0, et = "offsetHeight" in M ? M.offsetHeight - M.clientHeight - B - N : 0, Ct = "offsetWidth" in M ? M.offsetWidth === 0 ? 0 : at / M.offsetWidth : 0, ee = "offsetHeight" in M ? M.offsetHeight === 0 ? 0 : it / M.offsetHeight : 0;
|
|
223
|
-
if (d === M) W = s === "start" ? j : s === "end" ? j - y : s === "nearest" ? Ee(S, S + y, y, B, N, S + j, S + j + g, g) : j - y / 2, rt = u === "start" ? I : u === "center" ? I - m / 2 : u === "end" ? I - m : Ee(h, h + m, m, C, L, h + I, h + I +
|
|
223
|
+
if (d === M) W = s === "start" ? j : s === "end" ? j - y : s === "nearest" ? Ee(S, S + y, y, B, N, S + j, S + j + g, g) : j - y / 2, rt = u === "start" ? I : u === "center" ? I - m / 2 : u === "end" ? I - m : Ee(h, h + m, m, C, L, h + I, h + I + P, P), W = Math.max(0, W + S), rt = Math.max(0, rt + h);
|
|
224
224
|
else {
|
|
225
|
-
W = s === "start" ? j - ut - B : s === "end" ? j - X + N + et : s === "nearest" ? Ee(ut, X, it, B, N + et, j, j + g, g) : j - (ut + it / 2) + et / 2, rt = u === "start" ? I - D - C : u === "center" ? I - (D + at / 2) + ot / 2 : u === "end" ? I - U + L + ot : Ee(D, U, at, C, L + ot, I, I +
|
|
225
|
+
W = s === "start" ? j - ut - B : s === "end" ? j - X + N + et : s === "nearest" ? Ee(ut, X, it, B, N + et, j, j + g, g) : j - (ut + it / 2) + et / 2, rt = u === "start" ? I - D - C : u === "center" ? I - (D + at / 2) + ot / 2 : u === "end" ? I - U + L + ot : Ee(D, U, at, C, L + ot, I, I + P, P);
|
|
226
226
|
const { scrollLeft: ne, scrollTop: re } = M;
|
|
227
227
|
W = ee === 0 ? 0 : Math.max(0, Math.min(re + W / ee, M.scrollHeight - it / ee + et)), rt = Ct === 0 ? 0 : Math.max(0, Math.min(ne + rt / Ct, M.scrollWidth - at / Ct + ot)), j += re - W, I += ne - rt;
|
|
228
228
|
}
|
|
@@ -328,7 +328,7 @@ function ys({ items: t, itemsChanged: e, refs: n, options: r }) {
|
|
|
328
328
|
}
|
|
329
329
|
const Ss = (t) => E.Children.toArray(t).map(Xo).filter(Boolean), Er = { ratio: 0.9, rootMargin: "5px", threshold: [0.05, 0.5, 0.75, 0.95] }, bs = { current: {} }, Ie = () => {
|
|
330
330
|
};
|
|
331
|
-
function
|
|
331
|
+
function _s({ LeftArrow: t, RightArrow: e, children: n, Header: r, Footer: o, transitionDuration: a = 500, transitionBehavior: i, onInit: s = Ie, onUpdate: u = Ie, onMouseDown: l, onMouseLeave: c, onMouseUp: f, onMouseMove: d, onScroll: p = Ie, onTouchMove: v, onTouchStart: m, onTouchEnd: y, onWheel: h = Ie, options: S = Er, scrollContainerClassName: g = pt, containerRef: P = os, itemClassName: x = pt, wrapperClassName: T = pt, apiRef: R = bs, RTL: O, noPolyfill: V }) {
|
|
332
332
|
const F = Ve(t), J = Ve(e), $ = Ve(r), j = Ve(o), I = E.useRef(null), [G] = E.useState({}), Q = E.useMemo(() => Object.assign(Object.assign(Object.assign({}, Er), S), { root: I.current }), [S]), M = E.useRef(new as()).current, it = function(L, N) {
|
|
333
333
|
const [W, rt] = E.useState(pt), ot = E.useMemo(() => Ss(L), [L]);
|
|
334
334
|
return E.useEffect(() => {
|
|
@@ -357,21 +357,21 @@ function Ps({ LeftArrow: t, RightArrow: e, children: n, Header: r, Footer: o, tr
|
|
|
357
357
|
var K;
|
|
358
358
|
return (K = L.find((ft) => String(ft[1].index) === String(H))) === null || K === void 0 ? void 0 : K[1];
|
|
359
359
|
}, getItemElementByIndex: ds, getNextElement: Sr, getPrevElement: re, isFirstItemVisible: Ct, isItemVisible: (H) => L.getVisible().map((K) => K[0]).includes(String(H)), isLastItem: (H) => L.last() === ne(H), isLastItemVisible: ee, scrollNext: (H, K, ft, { duration: Et, boundary: gt = an } = {}) => {
|
|
360
|
-
const
|
|
361
|
-
return vn(Sr(),
|
|
360
|
+
const Pt = H ?? (N == null ? void 0 : N.behavior);
|
|
361
|
+
return vn(Sr(), Pt, K || "start", ft || "nearest", { boundary: gt, duration: Et ?? (N == null ? void 0 : N.duration) }, W);
|
|
362
362
|
}, scrollPrev: (H, K, ft, { duration: Et, boundary: gt = an } = {}) => {
|
|
363
|
-
const
|
|
364
|
-
return vn(re(),
|
|
363
|
+
const Pt = H ?? (N == null ? void 0 : N.behavior);
|
|
364
|
+
return vn(re(), Pt, K || "end", ft || "nearest", { boundary: gt, duration: Et ?? (N == null ? void 0 : N.duration) }, W);
|
|
365
365
|
}, useIsVisible: (H, K = !1) => {
|
|
366
|
-
const [ft, Et] = E.useState(K), gt = E.useCallback((
|
|
367
|
-
Et(!!(
|
|
366
|
+
const [ft, Et] = E.useState(K), gt = E.useCallback((Pt) => {
|
|
367
|
+
Et(!!(Pt != null && Pt.visible));
|
|
368
368
|
}, []);
|
|
369
369
|
return E.useEffect(() => (L.subscribe(H, gt), () => {
|
|
370
370
|
L.unsubscribe(H, gt);
|
|
371
371
|
}), [H, gt]), ft;
|
|
372
372
|
}, scrollToItem: (H, K, ft, Et, gt) => {
|
|
373
|
-
var
|
|
374
|
-
return vn(H, K ?? (N == null ? void 0 : N.behavior), ft, Et, Object.assign(Object.assign({ boundary: an }, gt), { duration: (
|
|
373
|
+
var Pt;
|
|
374
|
+
return vn(H, K ?? (N == null ? void 0 : N.behavior), ft, Et, Object.assign(Object.assign({ boundary: an }, gt), { duration: (Pt = gt == null ? void 0 : gt.duration) !== null && Pt !== void 0 ? Pt : N == null ? void 0 : N.duration }), W);
|
|
375
375
|
} };
|
|
376
376
|
}(M, { duration: a, behavior: i, boundary: I }, V), [M, a, i, V]), ut = E.useCallback(() => Object.assign(Object.assign({}, at), { items: M, scrollContainer: I }), [at, M, I]), [U, X] = E.useState(() => ut());
|
|
377
377
|
(({ context: L, onInit: N, onUpdate: W }) => {
|
|
@@ -382,12 +382,12 @@ function Ps({ LeftArrow: t, RightArrow: e, children: n, Header: r, Footer: o, tr
|
|
|
382
382
|
})({ context: U, onInit: s, onUpdate: u }), E.useEffect(() => X(ut()), [ut]), E.useEffect(() => {
|
|
383
383
|
Vn(R) ? R.current = U : R(U);
|
|
384
384
|
}, [U, R]);
|
|
385
|
-
const D = E.useCallback((L) => p(U, L), [p, U]),
|
|
386
|
-
return E.createElement("div", { className: C, onWheel:
|
|
385
|
+
const D = E.useCallback((L) => p(U, L), [p, U]), w = E.useCallback((L) => h(U, L), [h, U]), C = E.useMemo(() => `${Za} ${T}`, [T]), B = E.useMemo(() => `${g}${O ? " rtl" : pt}`, [O, g]);
|
|
386
|
+
return E.createElement("div", { className: C, onWheel: w, onMouseDown: l == null ? void 0 : l(U), onMouseLeave: c == null ? void 0 : c(U), onMouseUp: f == null ? void 0 : f(U), onMouseMove: d == null ? void 0 : d(U), onTouchStart: m == null ? void 0 : m(U), onTouchMove: v == null ? void 0 : v(U), onTouchEnd: y == null ? void 0 : y(U) }, E.createElement(hs.Provider, { value: U }, E.createElement("div", { className: Qa }, $), E.createElement("div", { className: Ja }, E.createElement("div", { className: ts }, F), E.createElement(ms, { className: B, onScroll: D, scrollRef: I, containerRef: P }, E.createElement(ps, { refs: G, itemClassName: x }, n)), E.createElement("div", { className: es }, J)), E.createElement("div", { className: ns }, j)));
|
|
387
387
|
}
|
|
388
|
-
const
|
|
389
|
-
StoryPlayer:
|
|
390
|
-
Overlay:
|
|
388
|
+
const Ps = "_StoryPlayer_om2md_1", ws = "_Overlay_om2md_15", xs = "_StoryPlayer__Wrap_om2md_25", Ts = "_progressContainer_om2md_37", Cs = "_CloseIcon_om2md_41", Es = "_inline_om2md_57", Vs = "_progressBarContainer_om2md_75", Is = "_progressBar_om2md_75", Rt = {
|
|
389
|
+
StoryPlayer: Ps,
|
|
390
|
+
Overlay: ws,
|
|
391
391
|
StoryPlayer__Wrap: xs,
|
|
392
392
|
progressContainer: Ts,
|
|
393
393
|
CloseIcon: Cs,
|
|
@@ -400,9 +400,9 @@ var Y = function() {
|
|
|
400
400
|
for (var e, n = 1, r = arguments.length; n < r; n++) for (var o in e = arguments[n]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
401
401
|
return t;
|
|
402
402
|
}, Y.apply(this, arguments);
|
|
403
|
-
}, Zo =
|
|
403
|
+
}, Zo = Ht({ stories: [], width: "100%", height: "100%", defaultDuration: 1e4, isPaused: !1 }), pn = Object.freeze({ LEFT: "left", RIGHT: "right" }), As = "Actions-styles_left__eky50", Ms = "Actions-styles_right__zguoH";
|
|
404
404
|
function Rs(t) {
|
|
405
|
-
var e = t.onNextClick, n = t.onPrevClick, r = t.onPause, o = t.onResume, a =
|
|
405
|
+
var e = t.onNextClick, n = t.onPrevClick, r = t.onPause, o = t.onResume, a = _t(!1), i = a[0], s = a[1], u = Z(null);
|
|
406
406
|
function l(d) {
|
|
407
407
|
d.stopPropagation(), d.preventDefault(), clearTimeout(u.current), u.current = setTimeout(function() {
|
|
408
408
|
r(), s(!0);
|
|
@@ -423,14 +423,14 @@ function Rs(t) {
|
|
|
423
423
|
return l(p);
|
|
424
424
|
} };
|
|
425
425
|
}
|
|
426
|
-
return q(Wo, { children: [
|
|
426
|
+
return q(Wo, { children: [b("div", Y({ className: As }, f(pn.LEFT))), b("div", Y({ className: Ms }, f(pn.RIGHT)))] });
|
|
427
427
|
}
|
|
428
428
|
function Xe() {
|
|
429
429
|
return st(Zo);
|
|
430
430
|
}
|
|
431
431
|
var Ls = "ProgressBar-styles_wrapper__oqUCo", Bs = "ProgressBar-styles_bar__x0O50", Vr = 0, Ir = 0.1;
|
|
432
432
|
function Os(t) {
|
|
433
|
-
var e, n, r, o, a, i = Xe(), s = i.defaultDuration, u = i.classNames, l = Z(null), c = Z(null), f =
|
|
433
|
+
var e, n, r, o, a, i = Xe(), s = i.defaultDuration, u = i.classNames, l = Z(null), c = Z(null), f = _t(!1), d = f[0], p = f[1];
|
|
434
434
|
return k(function() {
|
|
435
435
|
!t.isPaused && t.isActive && t.isActive ? p(!0) : p(!1);
|
|
436
436
|
}, [t.isActive, t.isPaused]), k(function() {
|
|
@@ -453,20 +453,20 @@ function Os(t) {
|
|
|
453
453
|
}) : function() {
|
|
454
454
|
r.current && (r.current = null), cancelAnimationFrame(r.current), o.current = null;
|
|
455
455
|
};
|
|
456
|
-
}, [n]),
|
|
456
|
+
}, [n]), b("div", Y({ className: "".concat(Ls, " ").concat((u == null ? void 0 : u.progressBarContainer) || ""), ref: c }, { children: b("div", { className: "".concat(Bs, " ").concat((u == null ? void 0 : u.progressBar) || ""), ref: l }) }));
|
|
457
457
|
}
|
|
458
458
|
var Ds = "progress-styles_wrapper__qQPyW";
|
|
459
459
|
function Ns(t) {
|
|
460
460
|
var e = Xe(), n = e.stories, r = e.classNames;
|
|
461
|
-
return
|
|
462
|
-
return
|
|
461
|
+
return b("div", Y({ className: "".concat(Ds, " ").concat((r == null ? void 0 : r.progressContainer) || ""), style: { gridTemplateColumns: "repeat(".concat(n.length, ",1fr)") } }, { children: n.map(function(o) {
|
|
462
|
+
return b(Os, { hasStoryPassed: o.index < t.activeStoryIndex, isActive: o.index === t.activeStoryIndex, story: o, isPaused: o.index === t.activeStoryIndex && t.isPaused }, o.index);
|
|
463
463
|
}) }));
|
|
464
464
|
}
|
|
465
465
|
var mn = Object.freeze({ IMAGE: "image", VIDEO: "video", COMPONENT: "component" }), Fs = "Story-styles_wrapper__oJP7j", js = "Story-styles_header__-rnWL", ks = "Image-styles_image__gnfW1";
|
|
466
466
|
function $s(t) {
|
|
467
467
|
return k(function() {
|
|
468
468
|
t.onPause();
|
|
469
|
-
}, []),
|
|
469
|
+
}, []), b("img", { className: ks, src: t.story.url, alt: "story", onLoad: function() {
|
|
470
470
|
setTimeout(function() {
|
|
471
471
|
t.onResume();
|
|
472
472
|
}, 4);
|
|
@@ -474,11 +474,11 @@ function $s(t) {
|
|
|
474
474
|
}
|
|
475
475
|
var hn, Us = "Video-styles_video__BykuO", Ws = "Video-styles_loaderWrapper__TqVWk", Hs = "Video-styles_loader__FxxSV", zs = "Video-styles_soundIcon__ZvYXE";
|
|
476
476
|
function Gs(t) {
|
|
477
|
-
return t.type === "off" ?
|
|
477
|
+
return t.type === "off" ? b("svg", Y({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "white" }, { children: b("path", { d: "M3 9v6h-1v-6h1zm13-7l-9 5v2.288l7-3.889v13.202l-7-3.889v2.288l9 5v-20zm-11 5h-5v10h5v-10zm17.324 4.993l1.646-1.659-1.324-1.324-1.651 1.67-1.665-1.648-1.316 1.318 1.67 1.657-1.65 1.669 1.318 1.317 1.658-1.672 1.666 1.653 1.324-1.325-1.676-1.656z" }) })) : b("svg", Y({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "white" }, { children: b("path", { d: "M22 0v24l-11-6v-2.278l9 4.909v-17.262l-9 4.91v-2.279l11-6zm-13 6v12h-7v-12h7zm-2 2h-3v8h3v-8z" }) }));
|
|
478
478
|
}
|
|
479
479
|
var In = "RSIsMute", Kt = typeof window > "u" ? {} : window;
|
|
480
480
|
function Ks(t) {
|
|
481
|
-
var e, n = Xe().isPaused, r =
|
|
481
|
+
var e, n = Xe().isPaused, r = _t(((e = Kt == null ? void 0 : Kt.localStorage) === null || e === void 0 ? void 0 : e.getItem(In)) === "true"), o = r[0], a = r[1], i = _t(!1), s = i[0], u = i[1], l = Z(null);
|
|
482
482
|
function c(f) {
|
|
483
483
|
var d;
|
|
484
484
|
(d = Kt == null ? void 0 : Kt.localStorage) === null || d === void 0 || d.setItem(In, String(f)), a(f);
|
|
@@ -494,40 +494,40 @@ function Ks(t) {
|
|
|
494
494
|
setTimeout(function() {
|
|
495
495
|
t.onResume(), u(!1);
|
|
496
496
|
}, 4);
|
|
497
|
-
}, muted: o }, { children: [
|
|
497
|
+
}, muted: o }, { children: [b("source", { src: t.story.url, type: "video/mp4" }), b("source", { src: t.story.url, type: "video/webm" }), b("source", { src: t.story.url, type: "video/ogg" }), b("p", { children: "Video not supported" })] })), b("div", Y({ className: zs, onClick: function() {
|
|
498
498
|
return c(!o);
|
|
499
|
-
} }, { children:
|
|
499
|
+
} }, { children: b(Gs, { type: o ? "off" : "on" }) })), s && b("div", Y({ className: Ws }, { children: b("div", { className: Hs }) }))] });
|
|
500
500
|
}
|
|
501
501
|
(hn = Kt == null ? void 0 : Kt.localStorage) === null || hn === void 0 || hn.setItem(In, "true");
|
|
502
502
|
var Ys = "CustomComponents-styles_component__w87Wx";
|
|
503
503
|
function qs(t) {
|
|
504
|
-
return
|
|
504
|
+
return b("div", Y({ className: Ys }, { children: b(t.story.component, { pause: t.onPause, resume: t.onResume, story: t.story, isPaused: t.isPaused }) }));
|
|
505
505
|
}
|
|
506
506
|
var Xs = "SeeMore-styles_seeMoreWrapper__kwjif", Zs = "SeeMore-styles_defaultSeeMore__-B1QW";
|
|
507
507
|
function Js(t) {
|
|
508
|
-
return t.story.seeMore ?
|
|
508
|
+
return t.story.seeMore ? b("button", Y({ type: "button", onClick: function() {
|
|
509
509
|
t.onSeeMoreClick();
|
|
510
510
|
}, className: Xs }, { children: function() {
|
|
511
511
|
var e = t.story.seeMore, n = typeof e;
|
|
512
512
|
if (["string", "boolean"].includes(n)) {
|
|
513
513
|
var r = n === "string" ? e : "See More";
|
|
514
|
-
return q("div", Y({ className: Zs }, { children: [
|
|
514
|
+
return q("div", Y({ className: Zs }, { children: [b("span", { children: "^" }), b("p", { children: r })] }));
|
|
515
515
|
}
|
|
516
|
-
return n === "function" ?
|
|
516
|
+
return n === "function" ? b(t.story.seeMore, {}) : t.story.seeMore;
|
|
517
517
|
}() })) : null;
|
|
518
518
|
}
|
|
519
519
|
var Qs = "SeeMoreComponent-styles_seeMoreComponentWrapper__0T6Ap", tu = "SeeMoreComponent-styles_closeIcon__LMm3b";
|
|
520
520
|
function eu(t) {
|
|
521
|
-
return t.story.seeMore && t.story.seeMoreComponent ? q("div", Y({ className: Qs }, { children: [
|
|
521
|
+
return t.story.seeMore && t.story.seeMoreComponent ? q("div", Y({ className: Qs }, { children: [b("button", Y({ className: tu, onClick: t.onClose }, { children: "✕" })), typeof t.story.seeMoreComponent == "function" ? b(t.story.seeMoreComponent, {}) : t.story.seeMoreComponent] })) : null;
|
|
522
522
|
}
|
|
523
523
|
function nu(t) {
|
|
524
|
-
var e =
|
|
524
|
+
var e = _t(!1), n = e[0], r = e[1], o = Xe().classNames;
|
|
525
525
|
return k(function() {
|
|
526
526
|
r(!1);
|
|
527
|
-
}, [t.story]), q("div", Y({ className: "".concat(Fs, " ").concat((o == null ? void 0 : o.storyContainer) || "") }, { children: [t.story.type === mn.IMAGE ?
|
|
527
|
+
}, [t.story]), q("div", Y({ className: "".concat(Fs, " ").concat((o == null ? void 0 : o.storyContainer) || "") }, { children: [t.story.type === mn.IMAGE ? b($s, Y({}, t)) : t.story.type === mn.VIDEO ? b(Ks, Y({}, t)) : t.story.type === mn.COMPONENT ? b(qs, Y({}, t)) : null, t.story.header && b("div", Y({ className: js }, { children: typeof t.story.header == "function" ? b(t.story.header, {}) : t.story.header })), b(Js, { onSeeMoreClick: function() {
|
|
528
528
|
var a, i;
|
|
529
529
|
t.onPause(), r(!0), (i = (a = t.story).onSeeMoreClick) === null || i === void 0 || i.call(a, t.story.index);
|
|
530
|
-
}, story: t.story }), n &&
|
|
530
|
+
}, story: t.story }), n && b(eu, { story: t.story, onClose: function() {
|
|
531
531
|
t.onResume(), r(!1);
|
|
532
532
|
} })] }));
|
|
533
533
|
}
|
|
@@ -537,8 +537,8 @@ function Ar(t) {
|
|
|
537
537
|
}
|
|
538
538
|
function ou(t) {
|
|
539
539
|
var e, n, r, o, a, i, s, u = t.stories, l = u === void 0 ? [] : u, c = t.width, f = c === void 0 ? "100%" : c, d = t.height, p = d === void 0 ? "100%" : d, v = t.onStoryChange, m = v === void 0 ? function() {
|
|
540
|
-
} : v, y = t.currentIndex, h = y === void 0 ? 0 : y, S = t.defaultDuration, g = S === void 0 ? 1e4 : S,
|
|
541
|
-
} :
|
|
540
|
+
} : v, y = t.currentIndex, h = y === void 0 ? 0 : y, S = t.defaultDuration, g = S === void 0 ? 1e4 : S, P = t.onAllStoriesEnd, x = P === void 0 ? function() {
|
|
541
|
+
} : P, T = t.onStoriesStart, R = T === void 0 ? function() {
|
|
542
542
|
} : T, O = t.classNames, V = O === void 0 ? {} : O, F = t.pauseStoryWhenInActiveWindow, J = F === void 0 || F, $ = qe(function() {
|
|
543
543
|
return function(B, L) {
|
|
544
544
|
var N = 0;
|
|
@@ -547,7 +547,7 @@ function ou(t) {
|
|
|
547
547
|
return et === N && (et = ot + Ar(6)), N = et, Y(Y({}, W), { index: rt, calculatedDuration: et });
|
|
548
548
|
});
|
|
549
549
|
}(l, g);
|
|
550
|
-
}, [l, g]), j =
|
|
550
|
+
}, [l, g]), j = _t(), I = j[0], G = j[1], Q = l.length - 1, M = _t(!1), it = M[0], at = M[1], ut = Z(!1), U = Z(!1);
|
|
551
551
|
function X() {
|
|
552
552
|
ut.current || (I == null ? void 0 : I.index) !== Q || (x(), ut.current = !0), (I == null ? void 0 : I.index) !== Q && G(function(B) {
|
|
553
553
|
if (!B) return $[0];
|
|
@@ -558,7 +558,7 @@ function ou(t) {
|
|
|
558
558
|
function D() {
|
|
559
559
|
at(!0);
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function w() {
|
|
562
562
|
at(!1);
|
|
563
563
|
}
|
|
564
564
|
k(function() {
|
|
@@ -607,13 +607,13 @@ function ou(t) {
|
|
|
607
607
|
J && at(!B);
|
|
608
608
|
});
|
|
609
609
|
var C = { stories: $, width: f, height: p, defaultDuration: g, isPaused: it, classNames: V };
|
|
610
|
-
return I ?
|
|
610
|
+
return I ? b(Zo.Provider, Y({ value: C }, { children: q("div", Y({ className: "".concat(ru, " ").concat(V.main || ""), style: { width: f, height: p } }, { children: [b(Ns, { activeStoryIndex: I.index, isPaused: it }), b(nu, { onPause: D, onResume: w, story: I, isPaused: it }, I.index), b(Rs, { onNextClick: X, onPrevClick: function() {
|
|
611
611
|
(I == null ? void 0 : I.index) !== 0 && G(function(B) {
|
|
612
612
|
if (!B) return $[0];
|
|
613
613
|
var L = (B == null ? void 0 : B.index) - 1;
|
|
614
614
|
return $[L];
|
|
615
615
|
});
|
|
616
|
-
}, onPause: D, onResume:
|
|
616
|
+
}, onPause: D, onResume: w })] })) })) : null;
|
|
617
617
|
}
|
|
618
618
|
var An = function(t, e) {
|
|
619
619
|
return An = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
@@ -631,14 +631,14 @@ function Jo(t, e) {
|
|
|
631
631
|
}
|
|
632
632
|
t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
|
|
633
633
|
}
|
|
634
|
-
var
|
|
635
|
-
return
|
|
634
|
+
var _ = function() {
|
|
635
|
+
return _ = Object.assign || function(e) {
|
|
636
636
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
637
637
|
n = arguments[r];
|
|
638
638
|
for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
639
639
|
}
|
|
640
640
|
return e;
|
|
641
|
-
},
|
|
641
|
+
}, _.apply(this, arguments);
|
|
642
642
|
};
|
|
643
643
|
function ht(t, e) {
|
|
644
644
|
var n = {};
|
|
@@ -711,16 +711,16 @@ function iu(t) {
|
|
|
711
711
|
for (var e in t)
|
|
712
712
|
t[e] !== null && (e === "projectionNodeConstructor" ? me.projectionNodeConstructor = t[e] : me[e].Component = t[e]);
|
|
713
713
|
}
|
|
714
|
-
var
|
|
714
|
+
var _e = function() {
|
|
715
715
|
}, vt = function() {
|
|
716
716
|
};
|
|
717
|
-
process.env.NODE_ENV !== "production" && (
|
|
717
|
+
process.env.NODE_ENV !== "production" && (_e = function(t, e) {
|
|
718
718
|
!t && typeof console < "u" && console.warn(e);
|
|
719
719
|
}, vt = function(t, e) {
|
|
720
720
|
if (!t)
|
|
721
721
|
throw new Error(e);
|
|
722
722
|
});
|
|
723
|
-
var ti =
|
|
723
|
+
var ti = Ht({ strict: !1 }), ei = Object.keys(me), au = ei.length;
|
|
724
724
|
function su(t, e, n) {
|
|
725
725
|
var r = [], o = st(ti);
|
|
726
726
|
if (!e)
|
|
@@ -728,21 +728,21 @@ function su(t, e, n) {
|
|
|
728
728
|
Qo !== "production" && n && o.strict && vt(!1, "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");
|
|
729
729
|
for (var a = 0; a < au; a++) {
|
|
730
730
|
var i = ei[a], s = me[i], u = s.isEnabled, l = s.Component;
|
|
731
|
-
u(t) && l && r.push(En.createElement(l,
|
|
731
|
+
u(t) && l && r.push(En.createElement(l, _({ key: i }, t, { visualElement: e })));
|
|
732
732
|
}
|
|
733
733
|
return r;
|
|
734
734
|
}
|
|
735
|
-
var Xn =
|
|
735
|
+
var Xn = Ht({
|
|
736
736
|
transformPagePoint: function(t) {
|
|
737
737
|
return t;
|
|
738
738
|
},
|
|
739
739
|
isStatic: !1,
|
|
740
740
|
reducedMotion: "never"
|
|
741
|
-
}), Ze =
|
|
741
|
+
}), Ze = Ht({});
|
|
742
742
|
function uu() {
|
|
743
743
|
return st(Ze).visualElement;
|
|
744
744
|
}
|
|
745
|
-
var Je =
|
|
745
|
+
var Je = Ht(null), te = typeof document < "u", Rr = te ? Ia : k, Mn = { current: null }, ni = !1;
|
|
746
746
|
function lu() {
|
|
747
747
|
if (ni = !0, !!te)
|
|
748
748
|
if (window.matchMedia) {
|
|
@@ -755,7 +755,7 @@ function lu() {
|
|
|
755
755
|
}
|
|
756
756
|
function cu() {
|
|
757
757
|
!ni && lu();
|
|
758
|
-
var t = nt(
|
|
758
|
+
var t = nt(_t(Mn.current), 1), e = t[0];
|
|
759
759
|
return e;
|
|
760
760
|
}
|
|
761
761
|
function fu() {
|
|
@@ -853,7 +853,7 @@ function gu(t) {
|
|
|
853
853
|
function Lr(t) {
|
|
854
854
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function Pe(t) {
|
|
857
857
|
var e = Z(null);
|
|
858
858
|
return e.current === null && (e.current = t()), e.current;
|
|
859
859
|
}
|
|
@@ -870,12 +870,12 @@ var ae = {
|
|
|
870
870
|
hasEverUpdated: !1
|
|
871
871
|
}, yu = 1;
|
|
872
872
|
function Su() {
|
|
873
|
-
return
|
|
873
|
+
return Pe(function() {
|
|
874
874
|
if (ae.hasEverUpdated)
|
|
875
875
|
return yu++;
|
|
876
876
|
});
|
|
877
877
|
}
|
|
878
|
-
var ai =
|
|
878
|
+
var ai = Ht({}), si = Ht({});
|
|
879
879
|
function bu(t, e, n, r) {
|
|
880
880
|
var o, a = e.layoutId, i = e.layout, s = e.drag, u = e.dragConstraints, l = e.layoutScroll, c = st(si);
|
|
881
881
|
!r || !n || n != null && n.projection || (n.projection = new r(t, n.getLatestValues(), (o = n.parent) === null || o === void 0 ? void 0 : o.projection), n.projection.setOptions({
|
|
@@ -898,7 +898,7 @@ function bu(t, e, n, r) {
|
|
|
898
898
|
layoutScroll: l
|
|
899
899
|
}));
|
|
900
900
|
}
|
|
901
|
-
var
|
|
901
|
+
var _u = (
|
|
902
902
|
/** @class */
|
|
903
903
|
function(t) {
|
|
904
904
|
Jo(e, t);
|
|
@@ -916,29 +916,29 @@ var Pu = (
|
|
|
916
916
|
}, e;
|
|
917
917
|
}(E.Component)
|
|
918
918
|
);
|
|
919
|
-
function
|
|
919
|
+
function Pu(t) {
|
|
920
920
|
var e = t.preloadedFeatures, n = t.createVisualElement, r = t.projectionNodeConstructor, o = t.useRender, a = t.useVisualState, i = t.Component;
|
|
921
921
|
e && iu(e);
|
|
922
922
|
function s(u, l) {
|
|
923
|
-
var c =
|
|
924
|
-
u =
|
|
923
|
+
var c = wu(u);
|
|
924
|
+
u = _(_({}, u), { layoutId: c });
|
|
925
925
|
var f = st(Xn), d = null, p = gu(u), v = f.isStatic ? void 0 : Su(), m = a(u, f.isStatic);
|
|
926
|
-
return !f.isStatic && te && (p.visualElement = du(i, m,
|
|
927
|
-
|
|
928
|
-
{ visualElement: p.visualElement, props:
|
|
926
|
+
return !f.isStatic && te && (p.visualElement = du(i, m, _(_({}, f), u), n), bu(v, u, p.visualElement, r || me.projectionNodeConstructor), d = su(u, p.visualElement, e)), En.createElement(
|
|
927
|
+
_u,
|
|
928
|
+
{ visualElement: p.visualElement, props: _(_({}, f), u) },
|
|
929
929
|
d,
|
|
930
930
|
En.createElement(Ze.Provider, { value: p }, o(i, u, v, vu(m, p.visualElement, l), m, f.isStatic, p.visualElement))
|
|
931
931
|
);
|
|
932
932
|
}
|
|
933
933
|
return Aa(s);
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function wu(t) {
|
|
936
936
|
var e, n = t.layoutId, r = (e = st(ai)) === null || e === void 0 ? void 0 : e.id;
|
|
937
937
|
return r && n !== void 0 ? r + "-" + n : n;
|
|
938
938
|
}
|
|
939
939
|
function xu(t) {
|
|
940
940
|
function e(r, o) {
|
|
941
|
-
return o === void 0 && (o = {}),
|
|
941
|
+
return o === void 0 && (o = {}), Pu(t(r, o));
|
|
942
942
|
}
|
|
943
943
|
if (typeof Proxy > "u")
|
|
944
944
|
return e;
|
|
@@ -1015,7 +1015,7 @@ function Vu(t, e) {
|
|
|
1015
1015
|
return he.indexOf(t) - he.indexOf(e);
|
|
1016
1016
|
}
|
|
1017
1017
|
var Iu = new Set(he);
|
|
1018
|
-
function
|
|
1018
|
+
function we(t) {
|
|
1019
1019
|
return Iu.has(t);
|
|
1020
1020
|
}
|
|
1021
1021
|
var Au = /* @__PURE__ */ new Set(["originX", "originY", "originZ"]);
|
|
@@ -1024,7 +1024,7 @@ function ui(t) {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
function li(t, e) {
|
|
1026
1026
|
var n = e.layout, r = e.layoutId;
|
|
1027
|
-
return
|
|
1027
|
+
return we(t) || ui(t) || (n || r !== void 0) && (!!ke[t] || t === "opacity");
|
|
1028
1028
|
}
|
|
1029
1029
|
var It = function(t) {
|
|
1030
1030
|
return !!(t !== null && typeof t == "object" && t.getVelocity);
|
|
@@ -1057,11 +1057,11 @@ const fi = (t, e) => (n) => Math.max(Math.min(n, e), t), se = (t) => t % 1 ? Num
|
|
|
1057
1057
|
function xe(t) {
|
|
1058
1058
|
return typeof t == "string";
|
|
1059
1059
|
}
|
|
1060
|
-
const
|
|
1060
|
+
const zt = {
|
|
1061
1061
|
test: (t) => typeof t == "number",
|
|
1062
1062
|
parse: parseFloat,
|
|
1063
1063
|
transform: (t) => t
|
|
1064
|
-
}, ue = Object.assign(Object.assign({},
|
|
1064
|
+
}, ue = Object.assign(Object.assign({}, zt), { transform: fi(0, 1) }), Ae = Object.assign(Object.assign({}, zt), { default: 1 }), Te = (t) => ({
|
|
1065
1065
|
test: (e) => xe(e) && e.endsWith(t) && e.split(" ").length === 1,
|
|
1066
1066
|
parse: parseFloat,
|
|
1067
1067
|
transform: (e) => `${e}${t}`
|
|
@@ -1075,11 +1075,11 @@ const Ht = {
|
|
|
1075
1075
|
[n]: parseFloat(i),
|
|
1076
1076
|
alpha: s !== void 0 ? parseFloat(s) : 1
|
|
1077
1077
|
};
|
|
1078
|
-
},
|
|
1078
|
+
}, Ut = {
|
|
1079
1079
|
test: Jn("hsl", "hue"),
|
|
1080
1080
|
parse: di("hue", "saturation", "lightness"),
|
|
1081
1081
|
transform: ({ hue: t, saturation: e, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(t) + ", " + xt.transform(se(e)) + ", " + xt.transform(se(n)) + ", " + se(ue.transform(r)) + ")"
|
|
1082
|
-
}, Fu = fi(0, 255), gn = Object.assign(Object.assign({},
|
|
1082
|
+
}, Fu = fi(0, 255), gn = Object.assign(Object.assign({}, zt), { transform: (t) => Math.round(Fu(t)) }), Dt = {
|
|
1083
1083
|
test: Jn("rgb", "red"),
|
|
1084
1084
|
parse: di("red", "green", "blue"),
|
|
1085
1085
|
transform: ({ red: t, green: e, blue: n, alpha: r = 1 }) => "rgba(" + gn.transform(t) + ", " + gn.transform(e) + ", " + gn.transform(n) + ", " + se(ue.transform(r)) + ")"
|
|
@@ -1098,9 +1098,9 @@ const Bn = {
|
|
|
1098
1098
|
parse: ju,
|
|
1099
1099
|
transform: Dt.transform
|
|
1100
1100
|
}, ct = {
|
|
1101
|
-
test: (t) => Dt.test(t) || Bn.test(t) ||
|
|
1102
|
-
parse: (t) => Dt.test(t) ? Dt.parse(t) :
|
|
1103
|
-
transform: (t) => xe(t) ? t : t.hasOwnProperty("red") ? Dt.transform(t) :
|
|
1101
|
+
test: (t) => Dt.test(t) || Bn.test(t) || Ut.test(t),
|
|
1102
|
+
parse: (t) => Dt.test(t) ? Dt.parse(t) : Ut.test(t) ? Ut.parse(t) : Bn.parse(t),
|
|
1103
|
+
transform: (t) => xe(t) ? t : t.hasOwnProperty("red") ? Dt.transform(t) : Ut.transform(t)
|
|
1104
1104
|
}, vi = "${c}", pi = "${n}";
|
|
1105
1105
|
function ku(t) {
|
|
1106
1106
|
var e, n, r, o;
|
|
@@ -1113,7 +1113,7 @@ function mi(t) {
|
|
|
1113
1113
|
const r = t.match(Ln);
|
|
1114
1114
|
r && (n = r.length, t = t.replace(Ln, vi), e.push(...r.map(ct.parse)));
|
|
1115
1115
|
const o = t.match(ge);
|
|
1116
|
-
return o && (t = t.replace(ge, pi), e.push(...o.map(
|
|
1116
|
+
return o && (t = t.replace(ge, pi), e.push(...o.map(zt.parse))), { values: e, numColors: n, tokenised: t };
|
|
1117
1117
|
}
|
|
1118
1118
|
function hi(t) {
|
|
1119
1119
|
return mi(t).values;
|
|
@@ -1148,7 +1148,7 @@ const zu = /([a-z-]*)\(.*?\)/g, On = Object.assign(Object.assign({}, At), { getA
|
|
|
1148
1148
|
const e = t.match(zu);
|
|
1149
1149
|
return e ? e.map(Hu).join(" ") : t;
|
|
1150
1150
|
} });
|
|
1151
|
-
var Or =
|
|
1151
|
+
var Or = _(_({}, zt), { transform: Math.round }), yi = {
|
|
1152
1152
|
// Border props
|
|
1153
1153
|
borderWidth: A,
|
|
1154
1154
|
borderTopWidth: A,
|
|
@@ -1225,7 +1225,7 @@ function Qn(t, e, n, r) {
|
|
|
1225
1225
|
continue;
|
|
1226
1226
|
}
|
|
1227
1227
|
var m = yi[p], y = Bu(v, m);
|
|
1228
|
-
if (
|
|
1228
|
+
if (we(p)) {
|
|
1229
1229
|
if (c = !0, s[p] = y, u.push(p), !d)
|
|
1230
1230
|
continue;
|
|
1231
1231
|
v !== ((o = m.default) !== null && o !== void 0 ? o : 0) && (d = !1);
|
|
@@ -1252,7 +1252,7 @@ function Gu(t, e, n) {
|
|
|
1252
1252
|
var o = tr();
|
|
1253
1253
|
Qn(o, e, { enableHardwareAcceleration: !n }, r);
|
|
1254
1254
|
var a = o.vars, i = o.style;
|
|
1255
|
-
return
|
|
1255
|
+
return _(_({}, a), i);
|
|
1256
1256
|
}, [e]);
|
|
1257
1257
|
}
|
|
1258
1258
|
function Ku(t, e, n) {
|
|
@@ -1367,32 +1367,32 @@ function er(t, e, n, r) {
|
|
|
1367
1367
|
var v = t.attrs, m = t.style, y = t.dimensions;
|
|
1368
1368
|
v.transform && (y && (m.transform = v.transform), delete v.transform), y && (i !== void 0 || s !== void 0 || m.transform) && (m.transformOrigin = Ju(y, i !== void 0 ? i : 0.5, s !== void 0 ? s : 0.5)), o !== void 0 && (v.x = o), a !== void 0 && (v.y = a), u !== void 0 && tl(v, u, c, d);
|
|
1369
1369
|
}
|
|
1370
|
-
var
|
|
1371
|
-
return
|
|
1370
|
+
var _i = function() {
|
|
1371
|
+
return _(_({}, tr()), { attrs: {} });
|
|
1372
1372
|
};
|
|
1373
1373
|
function el(t, e) {
|
|
1374
1374
|
var n = qe(function() {
|
|
1375
|
-
var o =
|
|
1376
|
-
return er(o, e, { enableHardwareAcceleration: !1 }, t.transformTemplate),
|
|
1375
|
+
var o = _i();
|
|
1376
|
+
return er(o, e, { enableHardwareAcceleration: !1 }, t.transformTemplate), _(_({}, o.attrs), { style: _({}, o.style) });
|
|
1377
1377
|
}, [e]);
|
|
1378
1378
|
if (t.style) {
|
|
1379
1379
|
var r = {};
|
|
1380
|
-
Si(r, t.style, t), n.style =
|
|
1380
|
+
Si(r, t.style, t), n.style = _(_({}, r), n.style);
|
|
1381
1381
|
}
|
|
1382
1382
|
return n;
|
|
1383
1383
|
}
|
|
1384
1384
|
function nl(t) {
|
|
1385
1385
|
t === void 0 && (t = !1);
|
|
1386
1386
|
var e = function(n, r, o, a, i, s) {
|
|
1387
|
-
var u = i.latestValues, l = Zn(n) ? el : Yu, c = l(r, u, s), f = Zu(r, typeof n == "string", t), d =
|
|
1387
|
+
var u = i.latestValues, l = Zn(n) ? el : Yu, c = l(r, u, s), f = Zu(r, typeof n == "string", t), d = _(_(_({}, f), c), { ref: a });
|
|
1388
1388
|
return o && (d["data-projection-id"] = o), Ma(n, d);
|
|
1389
1389
|
};
|
|
1390
1390
|
return e;
|
|
1391
1391
|
}
|
|
1392
|
-
var rl = /([a-z])([A-Z])/g, ol = "$1-$2",
|
|
1392
|
+
var rl = /([a-z])([A-Z])/g, ol = "$1-$2", Pi = function(t) {
|
|
1393
1393
|
return t.replace(rl, ol).toLowerCase();
|
|
1394
1394
|
};
|
|
1395
|
-
function
|
|
1395
|
+
function wi(t, e, n, r) {
|
|
1396
1396
|
var o = e.style, a = e.vars;
|
|
1397
1397
|
Object.assign(t.style, o, r && r.getProjectionStyles(n));
|
|
1398
1398
|
for (var i in a)
|
|
@@ -1421,9 +1421,9 @@ var xi = /* @__PURE__ */ new Set([
|
|
|
1421
1421
|
"pathLength"
|
|
1422
1422
|
]);
|
|
1423
1423
|
function Ti(t, e, n, r) {
|
|
1424
|
-
|
|
1424
|
+
wi(t, e, void 0, r);
|
|
1425
1425
|
for (var o in e.attrs)
|
|
1426
|
-
t.setAttribute(xi.has(o) ? o :
|
|
1426
|
+
t.setAttribute(xi.has(o) ? o : Pi(o), e.attrs[o]);
|
|
1427
1427
|
}
|
|
1428
1428
|
function nr(t) {
|
|
1429
1429
|
var e = t.style, n = {};
|
|
@@ -1466,7 +1466,7 @@ function Nr(t, e, n, r) {
|
|
|
1466
1466
|
var Vi = function(t) {
|
|
1467
1467
|
return function(e, n) {
|
|
1468
1468
|
var r = st(Ze), o = st(Je);
|
|
1469
|
-
return n ? Nr(t, e, r, o) :
|
|
1469
|
+
return n ? Nr(t, e, r, o) : Pe(function() {
|
|
1470
1470
|
return Nr(t, e, r, o);
|
|
1471
1471
|
});
|
|
1472
1472
|
};
|
|
@@ -1487,12 +1487,12 @@ function al(t, e, n, r) {
|
|
|
1487
1487
|
y.transition;
|
|
1488
1488
|
var S = ht(y, ["transitionEnd", "transition"]);
|
|
1489
1489
|
for (var g in S) {
|
|
1490
|
-
var
|
|
1491
|
-
if (Array.isArray(
|
|
1492
|
-
var x = d ?
|
|
1493
|
-
|
|
1490
|
+
var P = S[g];
|
|
1491
|
+
if (Array.isArray(P)) {
|
|
1492
|
+
var x = d ? P.length - 1 : 0;
|
|
1493
|
+
P = P[x];
|
|
1494
1494
|
}
|
|
1495
|
-
|
|
1495
|
+
P !== null && (o[g] = P);
|
|
1496
1496
|
}
|
|
1497
1497
|
for (var g in h)
|
|
1498
1498
|
o[g] = h[g];
|
|
@@ -1504,7 +1504,7 @@ function al(t, e, n, r) {
|
|
|
1504
1504
|
var sl = {
|
|
1505
1505
|
useVisualState: Vi({
|
|
1506
1506
|
scrapeMotionValuesFromProps: Ci,
|
|
1507
|
-
createRenderState:
|
|
1507
|
+
createRenderState: _i,
|
|
1508
1508
|
onMount: function(t, e, n) {
|
|
1509
1509
|
var r = n.renderState, o = n.latestValues;
|
|
1510
1510
|
try {
|
|
@@ -1528,7 +1528,7 @@ var sl = {
|
|
|
1528
1528
|
};
|
|
1529
1529
|
function ll(t, e, n, r, o) {
|
|
1530
1530
|
var a = e.forwardMotionProps, i = a === void 0 ? !1 : a, s = Zn(t) ? sl : ul;
|
|
1531
|
-
return
|
|
1531
|
+
return _(_({}, s), { preloadedFeatures: n, useRender: nl(i), createVisualElement: r, projectionNodeConstructor: o, Component: t });
|
|
1532
1532
|
}
|
|
1533
1533
|
var z;
|
|
1534
1534
|
(function(t) {
|
|
@@ -1673,12 +1673,12 @@ function Ni(t) {
|
|
|
1673
1673
|
};
|
|
1674
1674
|
}, []);
|
|
1675
1675
|
}
|
|
1676
|
-
const We = (t, e, n) => Math.min(Math.max(n, t), e), $r = 1e-3,
|
|
1676
|
+
const We = (t, e, n) => Math.min(Math.max(n, t), e), $r = 1e-3, _l = 0.01, Ur = 10, Pl = 0.05, wl = 1;
|
|
1677
1677
|
function xl({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: r = 1 }) {
|
|
1678
1678
|
let o, a;
|
|
1679
|
-
|
|
1679
|
+
_e(t <= Ur * 1e3, "Spring duration must be 10 seconds or less");
|
|
1680
1680
|
let i = 1 - e;
|
|
1681
|
-
i = We(
|
|
1681
|
+
i = We(Pl, wl, i), t = We(_l, Ur, t / 1e3), i < 1 ? (o = (l) => {
|
|
1682
1682
|
const c = l * i, f = c * t, d = c - n, p = Nn(l, i), v = Math.exp(-f);
|
|
1683
1683
|
return $r - d / p * v;
|
|
1684
1684
|
}, a = (l) => {
|
|
@@ -1736,21 +1736,21 @@ function ir(t) {
|
|
|
1736
1736
|
function m() {
|
|
1737
1737
|
const y = c ? -(c / 1e3) : 0, h = n - e, S = u / (2 * Math.sqrt(s * l)), g = Math.sqrt(s / l) / 1e3;
|
|
1738
1738
|
if (o === void 0 && (o = Math.min(Math.abs(n - e) / 100, 0.4)), S < 1) {
|
|
1739
|
-
const
|
|
1739
|
+
const P = Nn(g, S);
|
|
1740
1740
|
p = (x) => {
|
|
1741
1741
|
const T = Math.exp(-S * g * x);
|
|
1742
|
-
return n - T * ((y + S * g * h) /
|
|
1742
|
+
return n - T * ((y + S * g * h) / P * Math.sin(P * x) + h * Math.cos(P * x));
|
|
1743
1743
|
}, v = (x) => {
|
|
1744
1744
|
const T = Math.exp(-S * g * x);
|
|
1745
|
-
return S * g * T * (Math.sin(
|
|
1745
|
+
return S * g * T * (Math.sin(P * x) * (y + S * g * h) / P + h * Math.cos(P * x)) - T * (Math.cos(P * x) * (y + S * g * h) - P * h * Math.sin(P * x));
|
|
1746
1746
|
};
|
|
1747
1747
|
} else if (S === 1)
|
|
1748
|
-
p = (
|
|
1748
|
+
p = (P) => n - Math.exp(-g * P) * (h + (y + g * h) * P);
|
|
1749
1749
|
else {
|
|
1750
|
-
const
|
|
1750
|
+
const P = g * Math.sqrt(S * S - 1);
|
|
1751
1751
|
p = (x) => {
|
|
1752
|
-
const T = Math.exp(-S * g * x), R = Math.min(
|
|
1753
|
-
return n - T * ((y + S * g * h) * Math.sinh(R) +
|
|
1752
|
+
const T = Math.exp(-S * g * x), R = Math.min(P * x, 300);
|
|
1753
|
+
return n - T * ((y + S * g * h) * Math.sinh(R) + P * h * Math.cosh(R)) / P;
|
|
1754
1754
|
};
|
|
1755
1755
|
}
|
|
1756
1756
|
}
|
|
@@ -1760,8 +1760,8 @@ function ir(t) {
|
|
|
1760
1760
|
if (d)
|
|
1761
1761
|
i.done = y >= f;
|
|
1762
1762
|
else {
|
|
1763
|
-
const S = v(y) * 1e3, g = Math.abs(S) <= r,
|
|
1764
|
-
i.done = g &&
|
|
1763
|
+
const S = v(y) * 1e3, g = Math.abs(S) <= r, P = Math.abs(n - h) <= o;
|
|
1764
|
+
i.done = g && P;
|
|
1765
1765
|
}
|
|
1766
1766
|
return i.value = i.done ? n : h, i;
|
|
1767
1767
|
},
|
|
@@ -1797,11 +1797,11 @@ function zr({ hue: t, saturation: e, lightness: n, alpha: r }) {
|
|
|
1797
1797
|
const Al = (t, e, n) => {
|
|
1798
1798
|
const r = t * t, o = e * e;
|
|
1799
1799
|
return Math.sqrt(Math.max(0, n * (o - r) + r));
|
|
1800
|
-
}, Ml = [Bn, Dt,
|
|
1800
|
+
}, Ml = [Bn, Dt, Ut], Gr = (t) => Ml.find((e) => e.test(t)), Kr = (t) => `'${t}' is not an animatable color. Use the equivalent color code instead.`, Fi = (t, e) => {
|
|
1801
1801
|
let n = Gr(t), r = Gr(e);
|
|
1802
1802
|
vt(!!n, Kr(t)), vt(!!r, Kr(e));
|
|
1803
1803
|
let o = n.parse(t), a = r.parse(e);
|
|
1804
|
-
n ===
|
|
1804
|
+
n === Ut && (o = zr(o), n = Dt), r === Ut && (a = zr(a), r = Dt);
|
|
1805
1805
|
const i = Object.assign({}, o);
|
|
1806
1806
|
return (s) => {
|
|
1807
1807
|
for (const u in i)
|
|
@@ -1838,7 +1838,7 @@ function Yr(t) {
|
|
|
1838
1838
|
}
|
|
1839
1839
|
const $i = (t, e) => {
|
|
1840
1840
|
const n = At.createTransformer(e), r = Yr(t), o = Yr(e);
|
|
1841
|
-
return r.numHSL === o.numHSL && r.numRGB === o.numRGB && r.numNumbers >= o.numNumbers ? nn(ki(r.parsed, o.parsed), n) : (
|
|
1841
|
+
return r.numHSL === o.numHSL && r.numRGB === o.numRGB && r.numNumbers >= o.numNumbers ? nn(ki(r.parsed, o.parsed), n) : (_e(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), (i) => `${i > 0 ? e : t}`);
|
|
1842
1842
|
}, Bl = (t, e) => (n) => tt(t, e, n);
|
|
1843
1843
|
function Ol(t) {
|
|
1844
1844
|
if (typeof t == "number")
|
|
@@ -2005,7 +2005,7 @@ const dc = (t) => {
|
|
|
2005
2005
|
};
|
|
2006
2006
|
function Zi(t) {
|
|
2007
2007
|
var e, n, { from: r, autoplay: o = !0, driver: a = dc, elapsed: i = 0, repeat: s = 0, repeatType: u = "loop", repeatDelay: l = 0, onPlay: c, onStop: f, onComplete: d, onRepeat: p, onUpdate: v } = t, m = ht(t, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]);
|
|
2008
|
-
let { to: y } = m, h, S = 0, g = m.duration,
|
|
2008
|
+
let { to: y } = m, h, S = 0, g = m.duration, P, x = !1, T = !0, R;
|
|
2009
2009
|
const O = oc(m);
|
|
2010
2010
|
!((n = (e = O).needsInterpolation) === null || n === void 0) && n.call(e, r, y) && (R = Ui([0, 100], [r, y], {
|
|
2011
2011
|
clamp: !1
|
|
@@ -2020,9 +2020,9 @@ function Zi(t) {
|
|
|
2020
2020
|
function $(I) {
|
|
2021
2021
|
if (T || (I = -I), i += I, !x) {
|
|
2022
2022
|
const G = V.next(Math.max(0, i));
|
|
2023
|
-
|
|
2023
|
+
P = G.value, R && (P = R(P)), x = T ? G.done : i <= 0;
|
|
2024
2024
|
}
|
|
2025
|
-
v == null || v(
|
|
2025
|
+
v == null || v(P), x && (S === 0 && (g ?? (g = i)), S < s ? fc(i, g, l, T) && F() : J());
|
|
2026
2026
|
}
|
|
2027
2027
|
function j() {
|
|
2028
2028
|
c == null || c(), h = a($), h.start();
|
|
@@ -2047,9 +2047,9 @@ function vc({ from: t = 0, velocity: e = 0, min: n, max: r, power: o = 0.8, time
|
|
|
2047
2047
|
function h(g) {
|
|
2048
2048
|
v == null || v.stop(), v = Zi(Object.assign(Object.assign({}, g), {
|
|
2049
2049
|
driver: c,
|
|
2050
|
-
onUpdate: (
|
|
2050
|
+
onUpdate: (P) => {
|
|
2051
2051
|
var x;
|
|
2052
|
-
f == null || f(
|
|
2052
|
+
f == null || f(P), (x = g.onUpdate) === null || x === void 0 || x.call(g, P);
|
|
2053
2053
|
},
|
|
2054
2054
|
onComplete: d,
|
|
2055
2055
|
onStop: p
|
|
@@ -2063,10 +2063,10 @@ function vc({ from: t = 0, velocity: e = 0, min: n, max: r, power: o = 0.8, time
|
|
|
2063
2063
|
else {
|
|
2064
2064
|
let g = o * e + t;
|
|
2065
2065
|
typeof l < "u" && (g = l(g));
|
|
2066
|
-
const
|
|
2066
|
+
const P = y(g), x = P === n ? -1 : 1;
|
|
2067
2067
|
let T, R;
|
|
2068
2068
|
const O = (V) => {
|
|
2069
|
-
T = R, R = V, e = Ji(V - T, ze().delta), (x === 1 && V >
|
|
2069
|
+
T = R, R = V, e = Ji(V - T, ze().delta), (x === 1 && V > P || x === -1 && V < P) && S({ from: V, to: P, velocity: e });
|
|
2070
2070
|
};
|
|
2071
2071
|
h({
|
|
2072
2072
|
type: "decay",
|
|
@@ -2129,7 +2129,7 @@ function bc(t, e, n, r) {
|
|
|
2129
2129
|
}
|
|
2130
2130
|
return (i) => i === 0 || i === 1 ? i : Ge(a(i), e, r);
|
|
2131
2131
|
}
|
|
2132
|
-
function
|
|
2132
|
+
function _c(t) {
|
|
2133
2133
|
var e = t.onTap, n = t.onTapStart, r = t.onTapCancel, o = t.whileTap, a = t.visualElement, i = e || n || r || o, s = Z(!1), u = Z(null), l = {
|
|
2134
2134
|
passive: !(n || e || r || v)
|
|
2135
2135
|
};
|
|
@@ -2157,17 +2157,17 @@ var Zr = /* @__PURE__ */ new Set();
|
|
|
2157
2157
|
function oa(t, e, n) {
|
|
2158
2158
|
t || Zr.has(e) || (console.warn(e), Zr.add(e));
|
|
2159
2159
|
}
|
|
2160
|
-
var Un = /* @__PURE__ */ new WeakMap(), bn = /* @__PURE__ */ new WeakMap(),
|
|
2160
|
+
var Un = /* @__PURE__ */ new WeakMap(), bn = /* @__PURE__ */ new WeakMap(), Pc = function(t) {
|
|
2161
2161
|
var e;
|
|
2162
2162
|
(e = Un.get(t.target)) === null || e === void 0 || e(t);
|
|
2163
|
-
},
|
|
2164
|
-
t.forEach(
|
|
2163
|
+
}, wc = function(t) {
|
|
2164
|
+
t.forEach(Pc);
|
|
2165
2165
|
};
|
|
2166
2166
|
function xc(t) {
|
|
2167
2167
|
var e = t.root, n = ht(t, ["root"]), r = e || document;
|
|
2168
2168
|
bn.has(r) || bn.set(r, {});
|
|
2169
2169
|
var o = bn.get(r), a = JSON.stringify(n);
|
|
2170
|
-
return o[a] || (o[a] = new IntersectionObserver(
|
|
2170
|
+
return o[a] || (o[a] = new IntersectionObserver(wc, _({ root: e }, n))), o[a];
|
|
2171
2171
|
}
|
|
2172
2172
|
function Tc(t, e, n) {
|
|
2173
2173
|
var r = xc(e);
|
|
@@ -2225,13 +2225,13 @@ var Nt = function(t) {
|
|
|
2225
2225
|
};
|
|
2226
2226
|
}, Ac = {
|
|
2227
2227
|
inView: Nt(Cc),
|
|
2228
|
-
tap: Nt(
|
|
2228
|
+
tap: Nt(_c),
|
|
2229
2229
|
focus: Nt(cl),
|
|
2230
2230
|
hover: Nt(bl)
|
|
2231
2231
|
}, Mc = 0, Rc = function() {
|
|
2232
2232
|
return Mc++;
|
|
2233
2233
|
}, Lc = function() {
|
|
2234
|
-
return
|
|
2234
|
+
return Pe(Rc);
|
|
2235
2235
|
};
|
|
2236
2236
|
function ia() {
|
|
2237
2237
|
var t = st(Je);
|
|
@@ -2302,7 +2302,7 @@ var Ke = function(t) {
|
|
|
2302
2302
|
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
2303
2303
|
restSpeed: 10
|
|
2304
2304
|
};
|
|
2305
|
-
},
|
|
2305
|
+
}, _n = function() {
|
|
2306
2306
|
return {
|
|
2307
2307
|
type: "keyframes",
|
|
2308
2308
|
ease: "linear",
|
|
@@ -2325,14 +2325,14 @@ var Ke = function(t) {
|
|
|
2325
2325
|
scaleX: Le,
|
|
2326
2326
|
scaleY: Le,
|
|
2327
2327
|
scale: Le,
|
|
2328
|
-
opacity:
|
|
2329
|
-
backgroundColor:
|
|
2330
|
-
color:
|
|
2328
|
+
opacity: _n,
|
|
2329
|
+
backgroundColor: _n,
|
|
2330
|
+
color: _n,
|
|
2331
2331
|
default: Le
|
|
2332
2332
|
}, Dc = function(t, e) {
|
|
2333
2333
|
var n;
|
|
2334
|
-
return ye(e) ? n = Oc : n = eo[t] || eo.default,
|
|
2335
|
-
}, Nc =
|
|
2334
|
+
return ye(e) ? n = Oc : n = eo[t] || eo.default, _({ to: e }, n(e));
|
|
2335
|
+
}, Nc = _(_({}, yi), {
|
|
2336
2336
|
// Color props
|
|
2337
2337
|
color: ct,
|
|
2338
2338
|
backgroundColor: ct,
|
|
@@ -2361,8 +2361,8 @@ function Fc(t) {
|
|
|
2361
2361
|
}
|
|
2362
2362
|
var no = !1;
|
|
2363
2363
|
function jc(t) {
|
|
2364
|
-
var e = t.ease, n = t.times, r = t.yoyo, o = t.flip, a = t.loop, i = ht(t, ["ease", "times", "yoyo", "flip", "loop"]), s =
|
|
2365
|
-
return n && (s.offset = n), i.duration && (s.duration = Ke(i.duration)), i.repeatDelay && (s.repeatDelay = Ke(i.repeatDelay)), e && (s.ease = Bc(e) ? e.map(Qr) : Qr(e)), i.type === "tween" && (s.type = "keyframes"), (r || a || o) && (
|
|
2364
|
+
var e = t.ease, n = t.times, r = t.yoyo, o = t.flip, a = t.loop, i = ht(t, ["ease", "times", "yoyo", "flip", "loop"]), s = _({}, i);
|
|
2365
|
+
return n && (s.offset = n), i.duration && (s.duration = Ke(i.duration)), i.repeatDelay && (s.repeatDelay = Ke(i.repeatDelay)), e && (s.ease = Bc(e) ? e.map(Qr) : Qr(e)), i.type === "tween" && (s.type = "keyframes"), (r || a || o) && (_e(!no, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."), no = !0, r ? s.repeatType = "reverse" : a ? s.repeatType = "loop" : o && (s.repeatType = "mirror"), s.repeat = a || r || o || i.repeat), i.type !== "spring" && (s.type = "keyframes"), s;
|
|
2366
2366
|
}
|
|
2367
2367
|
function kc(t, e) {
|
|
2368
2368
|
var n, r, o = vr(t, e) || {};
|
|
@@ -2373,13 +2373,13 @@ function $c(t) {
|
|
|
2373
2373
|
}
|
|
2374
2374
|
function Uc(t, e, n) {
|
|
2375
2375
|
var r;
|
|
2376
|
-
return Array.isArray(e.to) && ((r = t.duration) !== null && r !== void 0 || (t.duration = 0.8)), $c(e), Fc(t) || (t =
|
|
2376
|
+
return Array.isArray(e.to) && ((r = t.duration) !== null && r !== void 0 || (t.duration = 0.8)), $c(e), Fc(t) || (t = _(_({}, t), Dc(n, e.to))), _(_({}, e), jc(t));
|
|
2377
2377
|
}
|
|
2378
2378
|
function Wc(t, e, n, r, o) {
|
|
2379
2379
|
var a, i = vr(r, t), s = (a = i.from) !== null && a !== void 0 ? a : e.get(), u = to(t, n);
|
|
2380
2380
|
s === "none" && u && typeof n == "string" ? s = dr(t, n) : ro(s) && typeof n == "string" ? s = oo(n) : !Array.isArray(n) && ro(n) && typeof s == "string" && (n = oo(s));
|
|
2381
2381
|
var l = to(t, s);
|
|
2382
|
-
|
|
2382
|
+
_e(l === u, "You are trying to animate ".concat(t, ' from "').concat(s, '" to "').concat(n, '". ').concat(s, " is not an animatable value - to enable this animation set ").concat(s, " to a value animatable to ").concat(n, " via the `style` property."));
|
|
2383
2383
|
function c() {
|
|
2384
2384
|
var d = {
|
|
2385
2385
|
from: s,
|
|
@@ -2390,7 +2390,7 @@ function Wc(t, e, n, r, o) {
|
|
|
2390
2390
|
return e.set(p);
|
|
2391
2391
|
}
|
|
2392
2392
|
};
|
|
2393
|
-
return i.type === "inertia" || i.type === "decay" ? vc(
|
|
2393
|
+
return i.type === "inertia" || i.type === "decay" ? vc(_(_({}, d), i)) : Zi(_(_({}, Uc(i, d, t)), { onUpdate: function(p) {
|
|
2394
2394
|
var v;
|
|
2395
2395
|
d.onUpdate(p), (v = i.onUpdate) === null || v === void 0 || v.call(i, p);
|
|
2396
2396
|
}, onComplete: function() {
|
|
@@ -2532,7 +2532,7 @@ var sa = function(t) {
|
|
|
2532
2532
|
parse: function(t) {
|
|
2533
2533
|
return t;
|
|
2534
2534
|
}
|
|
2535
|
-
}, ua = [
|
|
2535
|
+
}, ua = [zt, A, xt, Lt, Nu, Du, Yc], oe = function(t) {
|
|
2536
2536
|
return ua.find(sa(t));
|
|
2537
2537
|
}, qc = mt(mt([], nt(ua), !1), [ct, At], !1), Xc = function(t) {
|
|
2538
2538
|
return qc.find(sa(t));
|
|
@@ -2544,7 +2544,7 @@ function gr(t, e) {
|
|
|
2544
2544
|
var n = Qe(t, e), r = n ? t.makeTargetAnimatable(n, !1) : {}, o = r.transitionEnd, a = o === void 0 ? {} : o;
|
|
2545
2545
|
r.transition;
|
|
2546
2546
|
var i = ht(r, ["transitionEnd", "transition"]);
|
|
2547
|
-
i =
|
|
2547
|
+
i = _(_({}, i), a);
|
|
2548
2548
|
for (var s in i) {
|
|
2549
2549
|
var u = Ei(i[s]);
|
|
2550
2550
|
Zc(t, s, u);
|
|
@@ -2635,10 +2635,10 @@ function ca(t, e, n) {
|
|
|
2635
2635
|
for (var y in p) {
|
|
2636
2636
|
var h = t.getValue(y), S = p[y];
|
|
2637
2637
|
if (!(!h || S === void 0 || m && af(m, y))) {
|
|
2638
|
-
var g =
|
|
2639
|
-
t.shouldReduceMotion &&
|
|
2640
|
-
var
|
|
2641
|
-
v.push(
|
|
2638
|
+
var g = _({ delay: i }, f);
|
|
2639
|
+
t.shouldReduceMotion && we(y) && (g = _(_({}, g), { type: !1, delay: 0 }));
|
|
2640
|
+
var P = pr(y, h, S, g);
|
|
2641
|
+
v.push(P);
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
2644
2644
|
return Promise.all(v).then(function() {
|
|
@@ -2653,7 +2653,7 @@ function nf(t, e, n, r, o, a) {
|
|
|
2653
2653
|
return l === void 0 && (l = 0), s - l * r;
|
|
2654
2654
|
};
|
|
2655
2655
|
return Array.from(t.variantChildren).sort(of).forEach(function(l, c) {
|
|
2656
|
-
i.push(Hn(l, e,
|
|
2656
|
+
i.push(Hn(l, e, _(_({}, a), { delay: n + u(c) })).then(function() {
|
|
2657
2657
|
return l.notifyAnimationComplete(e);
|
|
2658
2658
|
}));
|
|
2659
2659
|
}), Promise.all(i);
|
|
@@ -2693,7 +2693,7 @@ function cf(t) {
|
|
|
2693
2693
|
if (d) {
|
|
2694
2694
|
d.transition;
|
|
2695
2695
|
var p = d.transitionEnd, v = ht(d, ["transition", "transitionEnd"]);
|
|
2696
|
-
c =
|
|
2696
|
+
c = _(_(_({}, c), v), p);
|
|
2697
2697
|
}
|
|
2698
2698
|
return c;
|
|
2699
2699
|
};
|
|
@@ -2708,7 +2708,7 @@ function cf(t) {
|
|
|
2708
2708
|
var O = sf[R], V = n[O], F = (d = p[O]) !== null && d !== void 0 ? d : v[O], J = St(F), $ = O === f ? V.isActive : null;
|
|
2709
2709
|
$ === !1 && (S = R);
|
|
2710
2710
|
var j = F === v[O] && F !== p[O] && J;
|
|
2711
|
-
if (j && o && t.manuallyAnimateOnMount && (j = !1), V.protectedKeys =
|
|
2711
|
+
if (j && o && t.manuallyAnimateOnMount && (j = !1), V.protectedKeys = _({}, h), // If it isn't active and hasn't *just* been set as inactive
|
|
2712
2712
|
!V.isActive && $ === null || // If we didn't and don't have any defined prop for this animation type
|
|
2713
2713
|
!F && !V.prevProp || // Or if the prop doesn't define an animation
|
|
2714
2714
|
rr(F) || typeof F == "boolean")
|
|
@@ -2717,22 +2717,22 @@ function cf(t) {
|
|
|
2717
2717
|
O === f && V.isActive && !j && J || // If we removed a higher-priority variant (i is in reverse order)
|
|
2718
2718
|
R > S && J, Q = Array.isArray(F) ? F : [F], M = Q.reduce(a, {});
|
|
2719
2719
|
$ === !1 && (M = {});
|
|
2720
|
-
var it = V.prevResolvedValues, at = it === void 0 ? {} : it, ut =
|
|
2720
|
+
var it = V.prevResolvedValues, at = it === void 0 ? {} : it, ut = _(_({}, at), M), U = function(C) {
|
|
2721
2721
|
G = !0, y.delete(C), V.needsAnimating[C] = !0;
|
|
2722
2722
|
};
|
|
2723
2723
|
for (var X in ut) {
|
|
2724
|
-
var D = M[X],
|
|
2725
|
-
h.hasOwnProperty(X) || (D !==
|
|
2724
|
+
var D = M[X], w = at[X];
|
|
2725
|
+
h.hasOwnProperty(X) || (D !== w ? ye(D) && ye(w) ? !aa(D, w) || I ? U(X) : V.protectedKeys[X] = !0 : D !== void 0 ? U(X) : y.add(X) : D !== void 0 && y.has(X) ? U(X) : V.protectedKeys[X] = !0);
|
|
2726
2726
|
}
|
|
2727
|
-
V.prevProp = F, V.prevResolvedValues = M, V.isActive && (h =
|
|
2727
|
+
V.prevProp = F, V.prevResolvedValues = M, V.isActive && (h = _(_({}, h), M)), o && t.blockInitialAnimation && (G = !1), G && !j && m.push.apply(m, mt([], nt(Q.map(function(C) {
|
|
2728
2728
|
return {
|
|
2729
2729
|
animation: C,
|
|
2730
|
-
options:
|
|
2730
|
+
options: _({ type: O }, c)
|
|
2731
2731
|
};
|
|
2732
2732
|
})), !1));
|
|
2733
|
-
},
|
|
2734
|
-
g(
|
|
2735
|
-
if (r =
|
|
2733
|
+
}, P = 0; P < uf; P++)
|
|
2734
|
+
g(P);
|
|
2735
|
+
if (r = _({}, h), y.size) {
|
|
2736
2736
|
var x = {};
|
|
2737
2737
|
y.forEach(function(R) {
|
|
2738
2738
|
var O = t.getBaseTarget(R);
|
|
@@ -2803,30 +2803,30 @@ var vf = {
|
|
|
2803
2803
|
var o = this, a = r === void 0 ? {} : r, i = a.transformPagePoint;
|
|
2804
2804
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.updatePoint = function() {
|
|
2805
2805
|
if (o.lastMoveEvent && o.lastMoveEventInfo) {
|
|
2806
|
-
var d =
|
|
2806
|
+
var d = wn(o.lastMoveEventInfo, o.history), p = o.startEvent !== null, v = Qi(d.offset, { x: 0, y: 0 }) >= 3;
|
|
2807
2807
|
if (!(!p && !v)) {
|
|
2808
2808
|
var m = d.point, y = ze().timestamp;
|
|
2809
|
-
o.history.push(
|
|
2809
|
+
o.history.push(_(_({}, m), { timestamp: y }));
|
|
2810
2810
|
var h = o.handlers, S = h.onStart, g = h.onMove;
|
|
2811
2811
|
p || (S && S(o.lastMoveEvent, d), o.startEvent = o.lastMoveEvent), g && g(o.lastMoveEvent, d);
|
|
2812
2812
|
}
|
|
2813
2813
|
}
|
|
2814
2814
|
}, this.handlePointerMove = function(d, p) {
|
|
2815
|
-
if (o.lastMoveEvent = d, o.lastMoveEventInfo =
|
|
2815
|
+
if (o.lastMoveEvent = d, o.lastMoveEventInfo = Pn(p, o.transformPagePoint), Ii(d) && d.buttons === 0) {
|
|
2816
2816
|
o.handlePointerUp(d, p);
|
|
2817
2817
|
return;
|
|
2818
2818
|
}
|
|
2819
2819
|
Tt.update(o.updatePoint, !0);
|
|
2820
2820
|
}, this.handlePointerUp = function(d, p) {
|
|
2821
2821
|
o.end();
|
|
2822
|
-
var v = o.handlers, m = v.onEnd, y = v.onSessionEnd, h =
|
|
2822
|
+
var v = o.handlers, m = v.onEnd, y = v.onSessionEnd, h = wn(Pn(p, o.transformPagePoint), o.history);
|
|
2823
2823
|
o.startEvent && m && m(d, h), y && y(d, h);
|
|
2824
2824
|
}, !(Ai(e) && e.touches.length > 1)) {
|
|
2825
2825
|
this.handlers = n, this.transformPagePoint = i;
|
|
2826
|
-
var s = or(e), u =
|
|
2827
|
-
this.history = [
|
|
2826
|
+
var s = or(e), u = Pn(s, this.transformPagePoint), l = u.point, c = ze().timestamp;
|
|
2827
|
+
this.history = [_(_({}, l), { timestamp: c })];
|
|
2828
2828
|
var f = n.onSessionStart;
|
|
2829
|
-
f && f(e,
|
|
2829
|
+
f && f(e, wn(u, this.history)), this.removeListeners = nn(Xt(window, "pointermove", this.handlePointerMove), Xt(window, "pointerup", this.handlePointerUp), Xt(window, "pointercancel", this.handlePointerUp));
|
|
2830
2830
|
}
|
|
2831
2831
|
}
|
|
2832
2832
|
return t.prototype.updateHandlers = function(e) {
|
|
@@ -2836,13 +2836,13 @@ var vf = {
|
|
|
2836
2836
|
}, t;
|
|
2837
2837
|
}()
|
|
2838
2838
|
);
|
|
2839
|
-
function
|
|
2839
|
+
function Pn(t, e) {
|
|
2840
2840
|
return e ? { point: e(t.point) } : t;
|
|
2841
2841
|
}
|
|
2842
2842
|
function io(t, e) {
|
|
2843
2843
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
2844
2844
|
}
|
|
2845
|
-
function
|
|
2845
|
+
function wn(t, e) {
|
|
2846
2846
|
var n = t.point;
|
|
2847
2847
|
return {
|
|
2848
2848
|
point: n,
|
|
@@ -2928,12 +2928,12 @@ function bf(t, e) {
|
|
|
2928
2928
|
var n = 0.5, r = Mt(t), o = Mt(e);
|
|
2929
2929
|
return o > r ? n = Se(e.min, e.max - r, t.min) : r > o && (n = Se(t.min, t.max - o, e.min)), We(0, 1, n);
|
|
2930
2930
|
}
|
|
2931
|
-
function
|
|
2931
|
+
function _f(t, e) {
|
|
2932
2932
|
var n = {};
|
|
2933
2933
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
2934
2934
|
}
|
|
2935
2935
|
var zn = 0.35;
|
|
2936
|
-
function
|
|
2936
|
+
function Pf(t) {
|
|
2937
2937
|
return t === void 0 && (t = zn), t === !1 ? t = 0 : t === !0 && (t = zn), {
|
|
2938
2938
|
x: vo(t, "left", "right"),
|
|
2939
2939
|
y: vo(t, "top", "bottom")
|
|
@@ -2969,7 +2969,7 @@ var mo = function() {
|
|
|
2969
2969
|
y: ho()
|
|
2970
2970
|
};
|
|
2971
2971
|
};
|
|
2972
|
-
function
|
|
2972
|
+
function wt(t) {
|
|
2973
2973
|
return [t("x"), t("y")];
|
|
2974
2974
|
}
|
|
2975
2975
|
function va(t) {
|
|
@@ -2979,7 +2979,7 @@ function va(t) {
|
|
|
2979
2979
|
y: { min: e, max: o }
|
|
2980
2980
|
};
|
|
2981
2981
|
}
|
|
2982
|
-
function
|
|
2982
|
+
function wf(t) {
|
|
2983
2983
|
var e = t.x, n = t.y;
|
|
2984
2984
|
return { top: n.min, right: e.max, bottom: n.max, left: e.min };
|
|
2985
2985
|
}
|
|
@@ -3062,10 +3062,10 @@ var If = /* @__PURE__ */ new WeakMap(), Af = (
|
|
|
3062
3062
|
r.stopAnimation(), i && r.snapToCursor(or(f, "page").point);
|
|
3063
3063
|
}, u = function(f, d) {
|
|
3064
3064
|
var p, v = r.getProps(), m = v.drag, y = v.dragPropagation, h = v.onDragStart;
|
|
3065
|
-
m && !y && (r.openGlobalLock && r.openGlobalLock(), r.openGlobalLock = Bi(m), !r.openGlobalLock) || (r.isDragging = !0, r.currentDirection = null, r.resolveConstraints(), r.visualElement.projection && (r.visualElement.projection.isAnimationBlocked = !0, r.visualElement.projection.target = void 0),
|
|
3066
|
-
var g,
|
|
3065
|
+
m && !y && (r.openGlobalLock && r.openGlobalLock(), r.openGlobalLock = Bi(m), !r.openGlobalLock) || (r.isDragging = !0, r.currentDirection = null, r.resolveConstraints(), r.visualElement.projection && (r.visualElement.projection.isAnimationBlocked = !0, r.visualElement.projection.target = void 0), wt(function(S) {
|
|
3066
|
+
var g, P, x = r.getAxisMotionValue(S).get() || 0;
|
|
3067
3067
|
if (xt.test(x)) {
|
|
3068
|
-
var T = (
|
|
3068
|
+
var T = (P = (g = r.visualElement.projection) === null || g === void 0 ? void 0 : g.layout) === null || P === void 0 ? void 0 : P.actual[S];
|
|
3069
3069
|
if (T) {
|
|
3070
3070
|
var R = Mt(T);
|
|
3071
3071
|
x = R * (parseFloat(x) / 100);
|
|
@@ -3114,8 +3114,8 @@ var If = /* @__PURE__ */ new WeakMap(), Af = (
|
|
|
3114
3114
|
}
|
|
3115
3115
|
}, t.prototype.resolveConstraints = function() {
|
|
3116
3116
|
var e = this, n = this.getProps(), r = n.dragConstraints, o = n.dragElastic, a = (this.visualElement.projection || {}).layout, i = this.constraints;
|
|
3117
|
-
r && Yt(r) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : r && a ? this.constraints = yf(a.actual, r) : this.constraints = !1, this.elastic =
|
|
3118
|
-
e.getAxisMotionValue(s) && (e.constraints[s] =
|
|
3117
|
+
r && Yt(r) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : r && a ? this.constraints = yf(a.actual, r) : this.constraints = !1, this.elastic = Pf(o), i !== this.constraints && a && this.constraints && !this.hasMutatedConstraints && wt(function(s) {
|
|
3118
|
+
e.getAxisMotionValue(s) && (e.constraints[s] = _f(a.actual[s], e.constraints[s]));
|
|
3119
3119
|
});
|
|
3120
3120
|
}, t.prototype.resolveRefConstraints = function() {
|
|
3121
3121
|
var e = this.getProps(), n = e.dragConstraints, r = e.onMeasureDragConstraints;
|
|
@@ -3128,17 +3128,17 @@ var If = /* @__PURE__ */ new WeakMap(), Af = (
|
|
|
3128
3128
|
return !1;
|
|
3129
3129
|
var i = Vf(o, a.root, this.visualElement.getTransformPagePoint()), s = Sf(a.layout.actual, i);
|
|
3130
3130
|
if (r) {
|
|
3131
|
-
var u = r(
|
|
3131
|
+
var u = r(wf(s));
|
|
3132
3132
|
this.hasMutatedConstraints = !!u, u && (s = va(u));
|
|
3133
3133
|
}
|
|
3134
3134
|
return s;
|
|
3135
3135
|
}, t.prototype.startAnimation = function(e) {
|
|
3136
|
-
var n = this, r = this.getProps(), o = r.drag, a = r.dragMomentum, i = r.dragElastic, s = r.dragTransition, u = r.dragSnapToOrigin, l = r.onDragTransitionEnd, c = this.constraints || {}, f =
|
|
3136
|
+
var n = this, r = this.getProps(), o = r.drag, a = r.dragMomentum, i = r.dragElastic, s = r.dragTransition, u = r.dragSnapToOrigin, l = r.onDragTransitionEnd, c = this.constraints || {}, f = wt(function(d) {
|
|
3137
3137
|
var p;
|
|
3138
3138
|
if (Be(d, o, n.currentDirection)) {
|
|
3139
3139
|
var v = (p = c == null ? void 0 : c[d]) !== null && p !== void 0 ? p : {};
|
|
3140
3140
|
u && (v = { min: 0, max: 0 });
|
|
3141
|
-
var m = i ? 200 : 1e6, y = i ? 40 : 1e7, h =
|
|
3141
|
+
var m = i ? 200 : 1e6, y = i ? 40 : 1e7, h = _(_({ type: "inertia", velocity: a ? e[d] : 0, bounceStiffness: m, bounceDamping: y, timeConstant: 750, restDelta: 1, restSpeed: 10 }, s), v);
|
|
3142
3142
|
return n.startAxisValueAnimation(d, h);
|
|
3143
3143
|
}
|
|
3144
3144
|
});
|
|
@@ -3148,7 +3148,7 @@ var If = /* @__PURE__ */ new WeakMap(), Af = (
|
|
|
3148
3148
|
return pr(e, r, 0, n);
|
|
3149
3149
|
}, t.prototype.stopAnimation = function() {
|
|
3150
3150
|
var e = this;
|
|
3151
|
-
|
|
3151
|
+
wt(function(n) {
|
|
3152
3152
|
return e.getAxisMotionValue(n).stop();
|
|
3153
3153
|
});
|
|
3154
3154
|
}, t.prototype.getAxisMotionValue = function(e) {
|
|
@@ -3156,7 +3156,7 @@ var If = /* @__PURE__ */ new WeakMap(), Af = (
|
|
|
3156
3156
|
return a || this.visualElement.getValue(e, (r = (n = this.visualElement.getProps().initial) === null || n === void 0 ? void 0 : n[e]) !== null && r !== void 0 ? r : 0);
|
|
3157
3157
|
}, t.prototype.snapToCursor = function(e) {
|
|
3158
3158
|
var n = this;
|
|
3159
|
-
|
|
3159
|
+
wt(function(r) {
|
|
3160
3160
|
var o = n.getProps().drag;
|
|
3161
3161
|
if (Be(r, o, n.currentDirection)) {
|
|
3162
3162
|
var a = n.visualElement.projection, i = n.getAxisMotionValue(r);
|
|
@@ -3171,7 +3171,7 @@ var If = /* @__PURE__ */ new WeakMap(), Af = (
|
|
|
3171
3171
|
if (!(!Yt(a) || !i || !this.constraints)) {
|
|
3172
3172
|
this.stopAnimation();
|
|
3173
3173
|
var s = { x: 0, y: 0 };
|
|
3174
|
-
|
|
3174
|
+
wt(function(l) {
|
|
3175
3175
|
var c = e.getAxisMotionValue(l);
|
|
3176
3176
|
if (c) {
|
|
3177
3177
|
var f = c.get();
|
|
@@ -3179,7 +3179,7 @@ var If = /* @__PURE__ */ new WeakMap(), Af = (
|
|
|
3179
3179
|
}
|
|
3180
3180
|
});
|
|
3181
3181
|
var u = this.visualElement.getProps().transformTemplate;
|
|
3182
|
-
this.visualElement.getInstance().style.transform = u ? u({}, "") : "none", (n = i.root) === null || n === void 0 || n.updateScroll(), i.updateLayout(), this.resolveConstraints(),
|
|
3182
|
+
this.visualElement.getInstance().style.transform = u ? u({}, "") : "none", (n = i.root) === null || n === void 0 || n.updateScroll(), i.updateLayout(), this.resolveConstraints(), wt(function(l) {
|
|
3183
3183
|
if (Be(l, o, null)) {
|
|
3184
3184
|
var c = e.getAxisMotionValue(l), f = e.constraints[l], d = f.min, p = f.max;
|
|
3185
3185
|
c.set(tt(d, p, s[l]));
|
|
@@ -3202,7 +3202,7 @@ var If = /* @__PURE__ */ new WeakMap(), Af = (
|
|
|
3202
3202
|
});
|
|
3203
3203
|
return i.addEventListener("didUpdate", function(l) {
|
|
3204
3204
|
var c = l.delta, f = l.hasLayoutChanged;
|
|
3205
|
-
e.isDragging && f && (
|
|
3205
|
+
e.isDragging && f && (wt(function(d) {
|
|
3206
3206
|
var p = e.getAxisMotionValue(d);
|
|
3207
3207
|
p && (e.originPoint[d] += c[d].translate, p.set(p.get() + c[d].translate));
|
|
3208
3208
|
}), e.visualElement.syncRender());
|
|
@@ -3211,7 +3211,7 @@ var If = /* @__PURE__ */ new WeakMap(), Af = (
|
|
|
3211
3211
|
};
|
|
3212
3212
|
}, t.prototype.getProps = function() {
|
|
3213
3213
|
var e = this.visualElement.getProps(), n = e.drag, r = n === void 0 ? !1 : n, o = e.dragDirectionLock, a = o === void 0 ? !1 : o, i = e.dragPropagation, s = i === void 0 ? !1 : i, u = e.dragConstraints, l = u === void 0 ? !1 : u, c = e.dragElastic, f = c === void 0 ? zn : c, d = e.dragMomentum, p = d === void 0 ? !0 : d;
|
|
3214
|
-
return
|
|
3214
|
+
return _(_({}, e), { drag: r, dragDirectionLock: a, dragPropagation: s, dragConstraints: l, dragElastic: f, dragMomentum: p });
|
|
3215
3215
|
}, t;
|
|
3216
3216
|
}()
|
|
3217
3217
|
);
|
|
@@ -3224,7 +3224,7 @@ function Mf(t, e) {
|
|
|
3224
3224
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
3225
3225
|
}
|
|
3226
3226
|
function Rf(t) {
|
|
3227
|
-
var e = t.dragControls, n = t.visualElement, r =
|
|
3227
|
+
var e = t.dragControls, n = t.visualElement, r = Pe(function() {
|
|
3228
3228
|
return new Af(n);
|
|
3229
3229
|
});
|
|
3230
3230
|
k(function() {
|
|
@@ -3321,9 +3321,9 @@ var ga = function(t) {
|
|
|
3321
3321
|
return function(d, p) {
|
|
3322
3322
|
var v = d.parent, m = d.props, y = d.presenceId, h = d.blockInitialAnimation, S = d.visualState, g = d.shouldReduceMotion;
|
|
3323
3323
|
p === void 0 && (p = {});
|
|
3324
|
-
var
|
|
3324
|
+
var P = !1, x = S.latestValues, T = S.renderState, R, O = Of(), V = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), J = {}, $ = _({}, x), j;
|
|
3325
3325
|
function I() {
|
|
3326
|
-
!R || !
|
|
3326
|
+
!R || !P || (G(), s(R, T, m.style, D.projection));
|
|
3327
3327
|
}
|
|
3328
3328
|
function G() {
|
|
3329
3329
|
r(D, T, x, p, m);
|
|
@@ -3331,11 +3331,11 @@ var ga = function(t) {
|
|
|
3331
3331
|
function Q() {
|
|
3332
3332
|
O.notifyUpdate(x);
|
|
3333
3333
|
}
|
|
3334
|
-
function M(
|
|
3334
|
+
function M(w, C) {
|
|
3335
3335
|
var B = C.onChange(function(N) {
|
|
3336
|
-
x[
|
|
3336
|
+
x[w] = N, m.onUpdate && Tt.update(Q, !1, !0);
|
|
3337
3337
|
}), L = C.onRenderRequest(D.scheduleRender);
|
|
3338
|
-
F.set(
|
|
3338
|
+
F.set(w, function() {
|
|
3339
3339
|
B(), L();
|
|
3340
3340
|
});
|
|
3341
3341
|
}
|
|
@@ -3344,7 +3344,7 @@ var ga = function(t) {
|
|
|
3344
3344
|
var ut = it[at];
|
|
3345
3345
|
x[at] !== void 0 && It(ut) && ut.set(x[at], !1);
|
|
3346
3346
|
}
|
|
3347
|
-
var U = tn(m), X = ii(m), D =
|
|
3347
|
+
var U = tn(m), X = ii(m), D = _(_({
|
|
3348
3348
|
treeType: n,
|
|
3349
3349
|
/**
|
|
3350
3350
|
* This is a mirror of the internal instance prop, which keeps
|
|
@@ -3397,8 +3397,8 @@ var ga = function(t) {
|
|
|
3397
3397
|
isMounted: function() {
|
|
3398
3398
|
return !!R;
|
|
3399
3399
|
},
|
|
3400
|
-
mount: function(
|
|
3401
|
-
|
|
3400
|
+
mount: function(w) {
|
|
3401
|
+
P = !0, R = D.current = w, D.projection && D.projection.mount(w), X && v && !U && (j = v == null ? void 0 : v.addVariantChild(D)), V.forEach(function(C, B) {
|
|
3402
3402
|
return M(B, C);
|
|
3403
3403
|
}), v == null || v.children.add(D), D.setProps(m);
|
|
3404
3404
|
},
|
|
@@ -3406,23 +3406,23 @@ var ga = function(t) {
|
|
|
3406
3406
|
*
|
|
3407
3407
|
*/
|
|
3408
3408
|
unmount: function() {
|
|
3409
|
-
var
|
|
3410
|
-
(
|
|
3409
|
+
var w;
|
|
3410
|
+
(w = D.projection) === null || w === void 0 || w.unmount(), Jt.update(Q), Jt.render(I), F.forEach(function(C) {
|
|
3411
3411
|
return C();
|
|
3412
|
-
}), j == null || j(), v == null || v.children.delete(D), O.clearAllListeners(), R = void 0,
|
|
3412
|
+
}), j == null || j(), v == null || v.children.delete(D), O.clearAllListeners(), R = void 0, P = !1;
|
|
3413
3413
|
},
|
|
3414
3414
|
/**
|
|
3415
3415
|
* Add a child visual element to our set of children.
|
|
3416
3416
|
*/
|
|
3417
|
-
addVariantChild: function(
|
|
3417
|
+
addVariantChild: function(w) {
|
|
3418
3418
|
var C, B = D.getClosestVariantNode();
|
|
3419
3419
|
if (B)
|
|
3420
|
-
return (C = B.variantChildren) === null || C === void 0 || C.add(
|
|
3421
|
-
return B.variantChildren.delete(
|
|
3420
|
+
return (C = B.variantChildren) === null || C === void 0 || C.add(w), function() {
|
|
3421
|
+
return B.variantChildren.delete(w);
|
|
3422
3422
|
};
|
|
3423
3423
|
},
|
|
3424
|
-
sortNodePosition: function(
|
|
3425
|
-
return !c || n !==
|
|
3424
|
+
sortNodePosition: function(w) {
|
|
3425
|
+
return !c || n !== w.treeType ? 0 : c(D.getInstance(), w.getInstance());
|
|
3426
3426
|
},
|
|
3427
3427
|
/**
|
|
3428
3428
|
* Returns the closest variant node in the tree starting from
|
|
@@ -3446,11 +3446,11 @@ var ga = function(t) {
|
|
|
3446
3446
|
/**
|
|
3447
3447
|
* Get/set the latest static values.
|
|
3448
3448
|
*/
|
|
3449
|
-
getStaticValue: function(
|
|
3450
|
-
return x[
|
|
3449
|
+
getStaticValue: function(w) {
|
|
3450
|
+
return x[w];
|
|
3451
3451
|
},
|
|
3452
|
-
setStaticValue: function(
|
|
3453
|
-
return x[
|
|
3452
|
+
setStaticValue: function(w, C) {
|
|
3453
|
+
return x[w] = C;
|
|
3454
3454
|
},
|
|
3455
3455
|
/**
|
|
3456
3456
|
* Returns the latest motion value state. Currently only used to take
|
|
@@ -3464,8 +3464,8 @@ var ga = function(t) {
|
|
|
3464
3464
|
* Set the visiblity of the visual element. If it's changed, schedule
|
|
3465
3465
|
* a render to reflect these changes.
|
|
3466
3466
|
*/
|
|
3467
|
-
setVisibility: function(
|
|
3468
|
-
D.isVisible !==
|
|
3467
|
+
setVisibility: function(w) {
|
|
3468
|
+
D.isVisible !== w && (D.isVisible = w, D.scheduleRender());
|
|
3469
3469
|
},
|
|
3470
3470
|
/**
|
|
3471
3471
|
* Make a target animatable by Popmotion. For instance, if we're
|
|
@@ -3474,8 +3474,8 @@ var ga = function(t) {
|
|
|
3474
3474
|
* pluggable to support Framer's custom value types like Color,
|
|
3475
3475
|
* and CSS variables.
|
|
3476
3476
|
*/
|
|
3477
|
-
makeTargetAnimatable: function(
|
|
3478
|
-
return C === void 0 && (C = !0), a(D,
|
|
3477
|
+
makeTargetAnimatable: function(w, C) {
|
|
3478
|
+
return C === void 0 && (C = !0), a(D, w, m, C);
|
|
3479
3479
|
},
|
|
3480
3480
|
/**
|
|
3481
3481
|
* Measure the current viewport box with or without transforms.
|
|
@@ -3489,63 +3489,63 @@ var ga = function(t) {
|
|
|
3489
3489
|
/**
|
|
3490
3490
|
* Add a motion value and bind it to this visual element.
|
|
3491
3491
|
*/
|
|
3492
|
-
addValue: function(
|
|
3493
|
-
D.hasValue(
|
|
3492
|
+
addValue: function(w, C) {
|
|
3493
|
+
D.hasValue(w) && D.removeValue(w), V.set(w, C), x[w] = C.get(), M(w, C);
|
|
3494
3494
|
},
|
|
3495
3495
|
/**
|
|
3496
3496
|
* Remove a motion value and unbind any active subscriptions.
|
|
3497
3497
|
*/
|
|
3498
|
-
removeValue: function(
|
|
3498
|
+
removeValue: function(w) {
|
|
3499
3499
|
var C;
|
|
3500
|
-
V.delete(
|
|
3500
|
+
V.delete(w), (C = F.get(w)) === null || C === void 0 || C(), F.delete(w), delete x[w], l(w, T);
|
|
3501
3501
|
},
|
|
3502
3502
|
/**
|
|
3503
3503
|
* Check whether we have a motion value for this key
|
|
3504
3504
|
*/
|
|
3505
|
-
hasValue: function(
|
|
3506
|
-
return V.has(
|
|
3505
|
+
hasValue: function(w) {
|
|
3506
|
+
return V.has(w);
|
|
3507
3507
|
},
|
|
3508
3508
|
/**
|
|
3509
3509
|
* Get a motion value for this key. If called with a default
|
|
3510
3510
|
* value, we'll create one if none exists.
|
|
3511
3511
|
*/
|
|
3512
|
-
getValue: function(
|
|
3513
|
-
var B = V.get(
|
|
3514
|
-
return B === void 0 && C !== void 0 && (B = Qt(C), D.addValue(
|
|
3512
|
+
getValue: function(w, C) {
|
|
3513
|
+
var B = V.get(w);
|
|
3514
|
+
return B === void 0 && C !== void 0 && (B = Qt(C), D.addValue(w, B)), B;
|
|
3515
3515
|
},
|
|
3516
3516
|
/**
|
|
3517
3517
|
* Iterate over our motion values.
|
|
3518
3518
|
*/
|
|
3519
|
-
forEachValue: function(
|
|
3520
|
-
return V.forEach(
|
|
3519
|
+
forEachValue: function(w) {
|
|
3520
|
+
return V.forEach(w);
|
|
3521
3521
|
},
|
|
3522
3522
|
/**
|
|
3523
3523
|
* If we're trying to animate to a previously unencountered value,
|
|
3524
3524
|
* we need to check for it in our state and as a last resort read it
|
|
3525
3525
|
* directly from the instance (which might have performance implications).
|
|
3526
3526
|
*/
|
|
3527
|
-
readValue: function(
|
|
3527
|
+
readValue: function(w) {
|
|
3528
3528
|
var C;
|
|
3529
|
-
return (C = x[
|
|
3529
|
+
return (C = x[w]) !== null && C !== void 0 ? C : u(R, w, p);
|
|
3530
3530
|
},
|
|
3531
3531
|
/**
|
|
3532
3532
|
* Set the base target to later animate back to. This is currently
|
|
3533
3533
|
* only hydrated on creation and when we first read a value.
|
|
3534
3534
|
*/
|
|
3535
|
-
setBaseTarget: function(
|
|
3536
|
-
$[
|
|
3535
|
+
setBaseTarget: function(w, C) {
|
|
3536
|
+
$[w] = C;
|
|
3537
3537
|
},
|
|
3538
3538
|
/**
|
|
3539
3539
|
* Find the base target for a value thats been removed from all animation
|
|
3540
3540
|
* props.
|
|
3541
3541
|
*/
|
|
3542
|
-
getBaseTarget: function(
|
|
3542
|
+
getBaseTarget: function(w) {
|
|
3543
3543
|
if (o) {
|
|
3544
|
-
var C = o(m,
|
|
3544
|
+
var C = o(m, w);
|
|
3545
3545
|
if (C !== void 0 && !It(C))
|
|
3546
3546
|
return C;
|
|
3547
3547
|
}
|
|
3548
|
-
return $[
|
|
3548
|
+
return $[w];
|
|
3549
3549
|
}
|
|
3550
3550
|
}, O), {
|
|
3551
3551
|
/**
|
|
@@ -3571,8 +3571,8 @@ var ga = function(t) {
|
|
|
3571
3571
|
* Update the provided props. Ensure any newly-added motion values are
|
|
3572
3572
|
* added to our map, old ones removed, and listeners updated.
|
|
3573
3573
|
*/
|
|
3574
|
-
setProps: function(
|
|
3575
|
-
(
|
|
3574
|
+
setProps: function(w) {
|
|
3575
|
+
(w.transformTemplate || m.transformTemplate) && D.scheduleRender(), m = w, O.updatePropListeners(w), J = Df(D, f(m), J);
|
|
3576
3576
|
},
|
|
3577
3577
|
getProps: function() {
|
|
3578
3578
|
return m;
|
|
@@ -3581,9 +3581,9 @@ var ga = function(t) {
|
|
|
3581
3581
|
/**
|
|
3582
3582
|
* Returns the variant definition with a given name.
|
|
3583
3583
|
*/
|
|
3584
|
-
getVariant: function(
|
|
3584
|
+
getVariant: function(w) {
|
|
3585
3585
|
var C;
|
|
3586
|
-
return (C = m.variants) === null || C === void 0 ? void 0 : C[
|
|
3586
|
+
return (C = m.variants) === null || C === void 0 ? void 0 : C[w];
|
|
3587
3587
|
},
|
|
3588
3588
|
/**
|
|
3589
3589
|
* Returns the defined default transition on this component.
|
|
@@ -3597,8 +3597,8 @@ var ga = function(t) {
|
|
|
3597
3597
|
/**
|
|
3598
3598
|
* Used by child variant nodes to get the closest ancestor variant props.
|
|
3599
3599
|
*/
|
|
3600
|
-
getVariantContext: function(
|
|
3601
|
-
if (
|
|
3600
|
+
getVariantContext: function(w) {
|
|
3601
|
+
if (w === void 0 && (w = !1), w)
|
|
3602
3602
|
return v == null ? void 0 : v.getVariantContext();
|
|
3603
3603
|
if (!U) {
|
|
3604
3604
|
var C = (v == null ? void 0 : v.getVariantContext()) || {};
|
|
@@ -3638,7 +3638,7 @@ function kf(t, e, n) {
|
|
|
3638
3638
|
var r, o = ht(e, []), a = t.getInstance();
|
|
3639
3639
|
if (!(a instanceof Element))
|
|
3640
3640
|
return { target: o, transitionEnd: n };
|
|
3641
|
-
n && (n =
|
|
3641
|
+
n && (n = _({}, n)), t.forEachValue(function(l) {
|
|
3642
3642
|
var c = l.get();
|
|
3643
3643
|
if (Kn(c)) {
|
|
3644
3644
|
var f = Yn(c, a);
|
|
@@ -3667,26 +3667,26 @@ var $f = /* @__PURE__ */ new Set([
|
|
|
3667
3667
|
return $f.has(t);
|
|
3668
3668
|
}, Uf = function(t) {
|
|
3669
3669
|
return Object.keys(t).some(ba);
|
|
3670
|
-
},
|
|
3670
|
+
}, _a = function(t, e) {
|
|
3671
3671
|
t.set(e, !1), t.set(e);
|
|
3672
3672
|
}, De = function(t) {
|
|
3673
|
-
return t ===
|
|
3673
|
+
return t === zt || t === A;
|
|
3674
3674
|
}, bo;
|
|
3675
3675
|
(function(t) {
|
|
3676
3676
|
t.width = "width", t.height = "height", t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom";
|
|
3677
3677
|
})(bo || (bo = {}));
|
|
3678
|
-
var
|
|
3678
|
+
var _o = function(t, e) {
|
|
3679
3679
|
return parseFloat(t.split(", ")[e]);
|
|
3680
|
-
},
|
|
3680
|
+
}, Po = function(t, e) {
|
|
3681
3681
|
return function(n, r) {
|
|
3682
3682
|
var o = r.transform;
|
|
3683
3683
|
if (o === "none" || !o)
|
|
3684
3684
|
return 0;
|
|
3685
3685
|
var a = o.match(/^matrix3d\((.+)\)$/);
|
|
3686
3686
|
if (a)
|
|
3687
|
-
return
|
|
3687
|
+
return _o(a[1], e);
|
|
3688
3688
|
var i = o.match(/^matrix\((.+)\)$/);
|
|
3689
|
-
return i ?
|
|
3689
|
+
return i ? _o(i[1], t) : 0;
|
|
3690
3690
|
};
|
|
3691
3691
|
}, Wf = /* @__PURE__ */ new Set(["x", "y", "z"]), Hf = he.filter(function(t) {
|
|
3692
3692
|
return !Wf.has(t);
|
|
@@ -3698,7 +3698,7 @@ function zf(t) {
|
|
|
3698
3698
|
r !== void 0 && (e.push([n, r.get()]), r.set(n.startsWith("scale") ? 1 : 0));
|
|
3699
3699
|
}), e.length && t.syncRender(), e;
|
|
3700
3700
|
}
|
|
3701
|
-
var
|
|
3701
|
+
var wo = {
|
|
3702
3702
|
// Dimensions
|
|
3703
3703
|
width: function(t, e) {
|
|
3704
3704
|
var n = t.x, r = e.paddingLeft, o = r === void 0 ? "0" : r, a = e.paddingRight, i = a === void 0 ? "0" : a;
|
|
@@ -3725,20 +3725,20 @@ var _o = {
|
|
|
3725
3725
|
return parseFloat(r) + (n.max - n.min);
|
|
3726
3726
|
},
|
|
3727
3727
|
// Transform
|
|
3728
|
-
x:
|
|
3729
|
-
y:
|
|
3728
|
+
x: Po(4, 13),
|
|
3729
|
+
y: Po(5, 14)
|
|
3730
3730
|
}, Gf = function(t, e, n) {
|
|
3731
3731
|
var r = e.measureViewportBox(), o = e.getInstance(), a = getComputedStyle(o), i = a.display, s = {};
|
|
3732
3732
|
i === "none" && e.setStaticValue("display", t.display || "block"), n.forEach(function(l) {
|
|
3733
|
-
s[l] =
|
|
3733
|
+
s[l] = wo[l](r, a);
|
|
3734
3734
|
}), e.syncRender();
|
|
3735
3735
|
var u = e.measureViewportBox();
|
|
3736
3736
|
return n.forEach(function(l) {
|
|
3737
3737
|
var c = e.getValue(l);
|
|
3738
|
-
|
|
3738
|
+
_a(c, s[l]), t[l] = wo[l](u, a);
|
|
3739
3739
|
}), t;
|
|
3740
3740
|
}, Kf = function(t, e, n, r) {
|
|
3741
|
-
n === void 0 && (n = {}), r === void 0 && (r = {}), e =
|
|
3741
|
+
n === void 0 && (n = {}), r === void 0 && (r = {}), e = _({}, e), r = _({}, r);
|
|
3742
3742
|
var o = Object.keys(e).filter(ba), a = [], i = !1, s = [];
|
|
3743
3743
|
if (o.forEach(function(c) {
|
|
3744
3744
|
var f = t.getValue(c);
|
|
@@ -3755,7 +3755,7 @@ var _o = {
|
|
|
3755
3755
|
if (De(p) && De(m)) {
|
|
3756
3756
|
var g = f.get();
|
|
3757
3757
|
typeof g == "string" && f.set(parseFloat(g)), typeof v == "string" ? e[c] = parseFloat(v) : Array.isArray(v) && m === A && (e[c] = v.map(parseFloat));
|
|
3758
|
-
} else p != null && p.transform && (m != null && m.transform) && (d === 0 || v === 0) ? d === 0 ? f.set(m.transform(d)) : e[c] = p.transform(v) : (i || (a = zf(t), i = !0), s.push(c), r[c] = r[c] !== void 0 ? r[c] : e[c],
|
|
3758
|
+
} else p != null && p.transform && (m != null && m.transform) && (d === 0 || v === 0) ? d === 0 ? f.set(m.transform(d)) : e[c] = p.transform(v) : (i || (a = zf(t), i = !0), s.push(c), r[c] = r[c] !== void 0 ? r[c] : e[c], _a(f, v));
|
|
3759
3759
|
}
|
|
3760
3760
|
}), s.length) {
|
|
3761
3761
|
var u = s.indexOf("height") >= 0 ? window.pageYOffset : null, l = Gf(e, t, s);
|
|
@@ -3776,10 +3776,10 @@ var qf = function(t, e, n, r) {
|
|
|
3776
3776
|
function Xf(t) {
|
|
3777
3777
|
return window.getComputedStyle(t);
|
|
3778
3778
|
}
|
|
3779
|
-
var
|
|
3779
|
+
var Pa = {
|
|
3780
3780
|
treeType: "dom",
|
|
3781
3781
|
readValueFromInstance: function(t, e) {
|
|
3782
|
-
if (
|
|
3782
|
+
if (we(e)) {
|
|
3783
3783
|
var n = fr(e);
|
|
3784
3784
|
return n && n.default || 0;
|
|
3785
3785
|
} else {
|
|
@@ -3829,18 +3829,18 @@ var wa = {
|
|
|
3829
3829
|
var l = qf(t, s, u, i);
|
|
3830
3830
|
i = l.transitionEnd, s = l.target;
|
|
3831
3831
|
}
|
|
3832
|
-
return
|
|
3832
|
+
return _({ transition: a, transitionEnd: i }, s);
|
|
3833
3833
|
},
|
|
3834
3834
|
scrapeMotionValuesFromProps: nr,
|
|
3835
3835
|
build: function(t, e, n, r, o) {
|
|
3836
3836
|
t.isVisible !== void 0 && (e.style.visibility = t.isVisible ? "visible" : "hidden"), Qn(e, n, r, o.transformTemplate);
|
|
3837
3837
|
},
|
|
3838
|
-
render:
|
|
3839
|
-
}, Zf = ga(
|
|
3838
|
+
render: wi
|
|
3839
|
+
}, Zf = ga(Pa), Jf = ga(_(_({}, Pa), { getBaseTarget: function(t, e) {
|
|
3840
3840
|
return t[e];
|
|
3841
3841
|
}, readValueFromInstance: function(t, e) {
|
|
3842
3842
|
var n;
|
|
3843
|
-
return
|
|
3843
|
+
return we(e) ? ((n = fr(e)) === null || n === void 0 ? void 0 : n.default) || 0 : (e = xi.has(e) ? e : Pi(e), t.getAttribute(e));
|
|
3844
3844
|
}, scrapeMotionValuesFromProps: Ci, build: function(t, e, n, r, o) {
|
|
3845
3845
|
er(e, n, r, o.transformTemplate);
|
|
3846
3846
|
}, render: Ti })), Qf = function(t, e) {
|
|
@@ -3895,7 +3895,7 @@ var ie = {
|
|
|
3895
3895
|
var n = this, r = this.props, o = r.visualElement, a = r.layoutGroup, i = r.switchLayoutGroup, s = r.layoutId, u = o.projection;
|
|
3896
3896
|
Cu(rd), u && (a != null && a.group && a.group.add(u), i != null && i.register && s && i.register(u), u.root.didUpdate(), u.addEventListener("animationComplete", function() {
|
|
3897
3897
|
n.safeToRemove();
|
|
3898
|
-
}), u.setOptions(
|
|
3898
|
+
}), u.setOptions(_(_({}, u.options), { onExitComplete: function() {
|
|
3899
3899
|
return n.safeToRemove();
|
|
3900
3900
|
} }))), ae.hasEverUpdated = !0;
|
|
3901
3901
|
}, e.prototype.getSnapshotBeforeUpdate = function(n) {
|
|
@@ -3920,10 +3920,10 @@ var ie = {
|
|
|
3920
3920
|
);
|
|
3921
3921
|
function nd(t) {
|
|
3922
3922
|
var e = nt(ia(), 2), n = e[0], r = e[1], o = st(ai);
|
|
3923
|
-
return E.createElement(ed,
|
|
3923
|
+
return E.createElement(ed, _({}, t, { layoutGroup: o, switchLayoutGroup: st(si), isPresent: n, safeToRemove: r }));
|
|
3924
3924
|
}
|
|
3925
3925
|
var rd = {
|
|
3926
|
-
borderRadius:
|
|
3926
|
+
borderRadius: _(_({}, ie), { applyTo: [
|
|
3927
3927
|
"borderTopLeftRadius",
|
|
3928
3928
|
"borderTopRightRadius",
|
|
3929
3929
|
"borderBottomLeftRadius",
|
|
@@ -3949,7 +3949,7 @@ function id(t, e, n) {
|
|
|
3949
3949
|
}
|
|
3950
3950
|
};
|
|
3951
3951
|
}
|
|
3952
|
-
var
|
|
3952
|
+
var wa = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], ad = wa.length, Co = function(t) {
|
|
3953
3953
|
return typeof t == "string" ? parseFloat(t) : t;
|
|
3954
3954
|
}, Eo = function(t) {
|
|
3955
3955
|
return typeof t == "number" || A.test(t);
|
|
@@ -3964,7 +3964,7 @@ function sd(t, e, n, r, o, a) {
|
|
|
3964
3964
|
ud(r)
|
|
3965
3965
|
), t.opacityExit = tt((s = e.opacity) !== null && s !== void 0 ? s : 1, 0, ld(r))) : a && (t.opacity = tt((u = e.opacity) !== null && u !== void 0 ? u : 1, (l = n.opacity) !== null && l !== void 0 ? l : 1, r));
|
|
3966
3966
|
for (var c = 0; c < ad; c++) {
|
|
3967
|
-
var f = "border".concat(
|
|
3967
|
+
var f = "border".concat(wa[c], "Radius"), d = Vo(e, f), p = Vo(n, f);
|
|
3968
3968
|
if (!(d === void 0 && p === void 0)) {
|
|
3969
3969
|
d || (d = 0), p || (p = 0);
|
|
3970
3970
|
var v = d === 0 || p === 0 || Eo(d) === Eo(p);
|
|
@@ -4104,7 +4104,7 @@ function Ea(t) {
|
|
|
4104
4104
|
u === void 0 && (u = {}), l === void 0 && (l = n == null ? void 0 : n()), this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.potentialNodes = /* @__PURE__ */ new Map(), this.checkUpdateFailed = function() {
|
|
4105
4105
|
c.isUpdating && (c.isUpdating = !1, c.clearAllSnapshots());
|
|
4106
4106
|
}, this.updateProjection = function() {
|
|
4107
|
-
c.nodes.forEach(
|
|
4107
|
+
c.nodes.forEach(Pd), c.nodes.forEach(wd);
|
|
4108
4108
|
}, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.id = s, this.latestValues = u, this.root = l ? l.root || l : this, this.path = l ? mt(mt([], nt(l.path), !1), [l], !1) : [], this.parent = l, this.depth = l ? l.depth + 1 : 0, s && this.root.registerPotentialNode(s, this);
|
|
4109
4109
|
for (var f = 0; f < this.path.length; f++)
|
|
4110
4110
|
this.path[f].shouldResetTransform = !0;
|
|
@@ -4131,19 +4131,19 @@ function Ea(t) {
|
|
|
4131
4131
|
return l.root.updateBlockedByResize = !1;
|
|
4132
4132
|
};
|
|
4133
4133
|
e(s, function() {
|
|
4134
|
-
l.root.updateBlockedByResize = !0, clearTimeout(m), m = window.setTimeout(y, 250), ae.hasAnimatedSinceResize && (ae.hasAnimatedSinceResize = !1, l.nodes.forEach(
|
|
4134
|
+
l.root.updateBlockedByResize = !0, clearTimeout(m), m = window.setTimeout(y, 250), ae.hasAnimatedSinceResize && (ae.hasAnimatedSinceResize = !1, l.nodes.forEach(_d));
|
|
4135
4135
|
});
|
|
4136
4136
|
}
|
|
4137
4137
|
d && this.root.registerSharedNode(d, this), this.options.animate !== !1 && v && (d || p) && this.addEventListener("didUpdate", function(h) {
|
|
4138
|
-
var S, g,
|
|
4138
|
+
var S, g, P, x, T, R = h.delta, O = h.hasLayoutChanged, V = h.hasRelativeTargetChanged, F = h.layout;
|
|
4139
4139
|
if (l.isTreeAnimationBlocked()) {
|
|
4140
4140
|
l.target = void 0, l.relativeTarget = void 0;
|
|
4141
4141
|
return;
|
|
4142
4142
|
}
|
|
4143
4143
|
var J = (g = (S = l.options.transition) !== null && S !== void 0 ? S : v.getDefaultTransition()) !== null && g !== void 0 ? g : Vd, $ = v.getProps(), j = $.onLayoutAnimationStart, I = $.onLayoutAnimationComplete, G = !l.targetLayout || !Ca(l.targetLayout, F) || V, Q = !O && V;
|
|
4144
|
-
if (!((
|
|
4144
|
+
if (!((P = l.resumeFrom) === null || P === void 0) && P.instance || Q || O && (G || !l.currentAnimation)) {
|
|
4145
4145
|
l.resumeFrom && (l.resumingFrom = l.resumeFrom, l.resumingFrom.resumingFrom = void 0), l.setAnimationOrigin(R, Q);
|
|
4146
|
-
var M =
|
|
4146
|
+
var M = _(_({}, vr(J, "layout")), { onPlay: j, onComplete: I });
|
|
4147
4147
|
v.shouldReduceMotion && (M.delay = 0, M.type = !1), l.startAnimation(M);
|
|
4148
4148
|
} else
|
|
4149
4149
|
!O && l.animationProgress === 0 && l.finishAnimation(), l.isLead() && ((T = (x = l.options).onExitComplete) === null || T === void 0 || T.call(x));
|
|
@@ -4281,7 +4281,7 @@ function Ea(t) {
|
|
|
4281
4281
|
this.targetDelta = s, this.root.scheduleUpdateProjection();
|
|
4282
4282
|
}, i.prototype.setOptions = function(s) {
|
|
4283
4283
|
var u;
|
|
4284
|
-
this.options =
|
|
4284
|
+
this.options = _(_(_({}, this.options), s), { crossfade: (u = s.crossfade) !== null && u !== void 0 ? u : !0 });
|
|
4285
4285
|
}, i.prototype.clearMeasurements = function() {
|
|
4286
4286
|
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
|
|
4287
4287
|
}, i.prototype.resolveTargetDelta = function() {
|
|
@@ -4312,17 +4312,17 @@ function Ea(t) {
|
|
|
4312
4312
|
}, i.prototype.setAnimationOrigin = function(s, u) {
|
|
4313
4313
|
var l = this, c;
|
|
4314
4314
|
u === void 0 && (u = !1);
|
|
4315
|
-
var f = this.snapshot, d = (f == null ? void 0 : f.latestValues) || {}, p =
|
|
4315
|
+
var f = this.snapshot, d = (f == null ? void 0 : f.latestValues) || {}, p = _({}, this.latestValues), v = de();
|
|
4316
4316
|
this.relativeTarget = this.relativeTargetOrigin = void 0, this.attemptToResolveRelativeTarget = !u;
|
|
4317
4317
|
var m = lt(), y = f == null ? void 0 : f.isShared, h = (((c = this.getStack()) === null || c === void 0 ? void 0 : c.members.length) || 0) <= 1, S = !!(y && !h && this.options.crossfade === !0 && !this.path.some(Ed));
|
|
4318
4318
|
this.animationProgress = 0, this.mixTargetDelta = function(g) {
|
|
4319
|
-
var
|
|
4320
|
-
No(v.x, s.x, x), No(v.y, s.y, x), l.setTargetDelta(v), l.relativeTarget && l.relativeTargetOrigin && l.layout && (!((
|
|
4319
|
+
var P, x = g / 1e3;
|
|
4320
|
+
No(v.x, s.x, x), No(v.y, s.y, x), l.setTargetDelta(v), l.relativeTarget && l.relativeTargetOrigin && l.layout && (!((P = l.relativeParent) === null || P === void 0) && P.layout) && (fe(m, l.layout.actual, l.relativeParent.layout.actual), Cd(l.relativeTarget, l.relativeTargetOrigin, m, x)), y && (l.animationValues = p, sd(p, d, l.latestValues, x, S, h)), l.root.scheduleUpdateProjection(), l.scheduleRender(), l.animationProgress = x;
|
|
4321
4321
|
}, this.mixTargetDelta(0);
|
|
4322
4322
|
}, i.prototype.startAnimation = function(s) {
|
|
4323
4323
|
var u = this, l, c;
|
|
4324
4324
|
this.notifyListeners("animationStart"), (l = this.currentAnimation) === null || l === void 0 || l.stop(), this.resumingFrom && ((c = this.resumingFrom.currentAnimation) === null || c === void 0 || c.stop()), this.pendingAnimation && (Jt.update(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = Tt.update(function() {
|
|
4325
|
-
ae.hasAnimatedSinceResize = !0, u.currentAnimation = id(0, Oo,
|
|
4325
|
+
ae.hasAnimatedSinceResize = !0, u.currentAnimation = id(0, Oo, _(_({}, s), { onUpdate: function(f) {
|
|
4326
4326
|
var d;
|
|
4327
4327
|
u.mixTargetDelta(f), (d = s.onUpdate) === null || d === void 0 || d.call(s, f);
|
|
4328
4328
|
}, onComplete: function() {
|
|
@@ -4400,8 +4400,8 @@ function Ea(t) {
|
|
|
4400
4400
|
}
|
|
4401
4401
|
var S = y.animationValues || y.latestValues;
|
|
4402
4402
|
this.applyTransformsToTarget(), v.transform = Bo(this.projectionDeltaWithTransform, this.treeScale, S), m && (v.transform = m(S, v.transform));
|
|
4403
|
-
var g = this.projectionDelta,
|
|
4404
|
-
v.transformOrigin = "".concat(
|
|
4403
|
+
var g = this.projectionDelta, P = g.x, x = g.y;
|
|
4404
|
+
v.transformOrigin = "".concat(P.origin * 100, "% ").concat(x.origin * 100, "% 0"), y.animationValues ? v.opacity = y === this ? (f = (c = S.opacity) !== null && c !== void 0 ? c : this.latestValues.opacity) !== null && f !== void 0 ? f : 1 : this.preserveOpacity ? this.latestValues.opacity : S.opacityExit : v.opacity = y === this ? (d = S.opacity) !== null && d !== void 0 ? d : "" : (p = S.opacityExit) !== null && p !== void 0 ? p : 0;
|
|
4405
4405
|
for (var T in ke)
|
|
4406
4406
|
if (S[T] !== void 0) {
|
|
4407
4407
|
var R = ke[T], O = R.correct, V = R.applyTo, F = O(S[T], y);
|
|
@@ -4430,12 +4430,12 @@ function yd(t) {
|
|
|
4430
4430
|
var e, n, r, o, a = (n = (e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) !== null && n !== void 0 ? n : t.snapshot;
|
|
4431
4431
|
if (t.isLead() && t.layout && a && t.hasListeners("didUpdate")) {
|
|
4432
4432
|
var i = t.layout, s = i.actual, u = i.measured;
|
|
4433
|
-
t.options.animationType === "size" ?
|
|
4434
|
-
var g = a.isShared ? a.measured[S] : a.layout[S],
|
|
4435
|
-
g.min = s[S].min, g.max = g.min +
|
|
4436
|
-
}) : t.options.animationType === "position" &&
|
|
4437
|
-
var g = a.isShared ? a.measured[S] : a.layout[S],
|
|
4438
|
-
g.max = g.min +
|
|
4433
|
+
t.options.animationType === "size" ? wt(function(S) {
|
|
4434
|
+
var g = a.isShared ? a.measured[S] : a.layout[S], P = Mt(g);
|
|
4435
|
+
g.min = s[S].min, g.max = g.min + P;
|
|
4436
|
+
}) : t.options.animationType === "position" && wt(function(S) {
|
|
4437
|
+
var g = a.isShared ? a.measured[S] : a.layout[S], P = Mt(s[S]);
|
|
4438
|
+
g.max = g.min + P;
|
|
4439
4439
|
});
|
|
4440
4440
|
var l = de();
|
|
4441
4441
|
ce(l, s, a.layout);
|
|
@@ -4472,13 +4472,13 @@ function bd(t) {
|
|
|
4472
4472
|
var e = t.options.visualElement;
|
|
4473
4473
|
e != null && e.getProps().onBeforeLayoutMeasure && e.notifyBeforeLayoutMeasure(), t.resetTransform();
|
|
4474
4474
|
}
|
|
4475
|
-
function
|
|
4475
|
+
function _d(t) {
|
|
4476
4476
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0;
|
|
4477
4477
|
}
|
|
4478
|
-
function
|
|
4478
|
+
function Pd(t) {
|
|
4479
4479
|
t.resolveTargetDelta();
|
|
4480
4480
|
}
|
|
4481
|
-
function
|
|
4481
|
+
function wd(t) {
|
|
4482
4482
|
t.calcProjection();
|
|
4483
4483
|
}
|
|
4484
4484
|
function xd(t) {
|
|
@@ -4553,7 +4553,7 @@ var Ad = Ea({
|
|
|
4553
4553
|
checkIsScrollRoot: function(t) {
|
|
4554
4554
|
return window.getComputedStyle(t).position === "fixed";
|
|
4555
4555
|
}
|
|
4556
|
-
}), Rd =
|
|
4556
|
+
}), Rd = _(_(_(_({}, vf), Ac), Bf), od), Ld = /* @__PURE__ */ xu(function(t, e) {
|
|
4557
4557
|
return ll(t, e, Rd, Qf, Md);
|
|
4558
4558
|
});
|
|
4559
4559
|
function Bd() {
|
|
@@ -4601,7 +4601,7 @@ function Bd() {
|
|
|
4601
4601
|
return r;
|
|
4602
4602
|
}
|
|
4603
4603
|
function Od() {
|
|
4604
|
-
var t =
|
|
4604
|
+
var t = Pe(Bd);
|
|
4605
4605
|
return k(t.mount, []), t;
|
|
4606
4606
|
}
|
|
4607
4607
|
var Dd = Od;
|
|
@@ -4619,7 +4619,7 @@ const Nd = ({
|
|
|
4619
4619
|
transition: { type: "spring", stiffness: 300, damping: 30 }
|
|
4620
4620
|
});
|
|
4621
4621
|
};
|
|
4622
|
-
return /* @__PURE__ */
|
|
4622
|
+
return /* @__PURE__ */ b(
|
|
4623
4623
|
Ld.div,
|
|
4624
4624
|
{
|
|
4625
4625
|
ref: r,
|
|
@@ -4639,7 +4639,7 @@ const Nd = ({
|
|
|
4639
4639
|
height: e = "100%",
|
|
4640
4640
|
fill: n = "white",
|
|
4641
4641
|
...r
|
|
4642
|
-
}) => /* @__PURE__ */
|
|
4642
|
+
}) => /* @__PURE__ */ b(
|
|
4643
4643
|
"svg",
|
|
4644
4644
|
{
|
|
4645
4645
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4648,7 +4648,7 @@ const Nd = ({
|
|
|
4648
4648
|
fill: "none",
|
|
4649
4649
|
viewBox: "0 0 24 24",
|
|
4650
4650
|
...r,
|
|
4651
|
-
children: /* @__PURE__ */
|
|
4651
|
+
children: /* @__PURE__ */ b(
|
|
4652
4652
|
"path",
|
|
4653
4653
|
{
|
|
4654
4654
|
fill: n,
|
|
@@ -4669,24 +4669,24 @@ const Nd = ({
|
|
|
4669
4669
|
onClose: s,
|
|
4670
4670
|
className: u = ""
|
|
4671
4671
|
}) => {
|
|
4672
|
-
const [l, c] =
|
|
4672
|
+
const [l, c] = _t(0), f = () => {
|
|
4673
4673
|
c((v) => v + 1);
|
|
4674
4674
|
}, d = () => {
|
|
4675
4675
|
n && n(), i && f();
|
|
4676
4676
|
};
|
|
4677
|
-
if ((t == null ? void 0 : t.length) == 0) return /* @__PURE__ */
|
|
4677
|
+
if ((t == null ? void 0 : t.length) == 0) return /* @__PURE__ */ b(qn, {});
|
|
4678
4678
|
const p = a ? ({ children: v }) => v : Nd;
|
|
4679
4679
|
return /* @__PURE__ */ q(
|
|
4680
4680
|
"div",
|
|
4681
4681
|
{
|
|
4682
|
-
className:
|
|
4682
|
+
className: Wt(Rt.StoryPlayer, u, {
|
|
4683
4683
|
[Rt.inline]: a
|
|
4684
4684
|
}),
|
|
4685
4685
|
children: [
|
|
4686
|
-
/* @__PURE__ */
|
|
4687
|
-
/* @__PURE__ */
|
|
4688
|
-
/* @__PURE__ */
|
|
4689
|
-
/* @__PURE__ */
|
|
4686
|
+
/* @__PURE__ */ b("div", { className: Rt.Overlay, onClick: r }),
|
|
4687
|
+
/* @__PURE__ */ b("div", { className: Rt.StoryPlayer__Wrap, children: /* @__PURE__ */ q(p, { onClose: s, children: [
|
|
4688
|
+
/* @__PURE__ */ b("div", { className: Rt.CloseIcon, onClick: s, children: /* @__PURE__ */ b(Fd, {}) }),
|
|
4689
|
+
/* @__PURE__ */ b(
|
|
4690
4690
|
ou,
|
|
4691
4691
|
{
|
|
4692
4692
|
onStoryChange: o,
|
|
@@ -4727,8 +4727,8 @@ class zd {
|
|
|
4727
4727
|
static fromRaw(e) {
|
|
4728
4728
|
var i, s, u;
|
|
4729
4729
|
const n = ((s = (i = e == null ? void 0 : e.stakes) == null ? void 0 : i.find((l) => l.isEnabled)) == null ? void 0 : s.preciseValue) ?? 0, r = (u = e == null ? void 0 : e.selections) == null ? void 0 : u.map((l) => {
|
|
4730
|
-
var y, h, S, g,
|
|
4731
|
-
const c = parseFloat((h = (y = l == null ? void 0 : l.odd) == null ? void 0 : y.price) == null ? void 0 : h.toFixed(2)), f = Hd((S = l == null ? void 0 : l.event) == null ? void 0 : S.startDate), d = (
|
|
4730
|
+
var y, h, S, g, P, x;
|
|
4731
|
+
const c = parseFloat((h = (y = l == null ? void 0 : l.odd) == null ? void 0 : y.price) == null ? void 0 : h.toFixed(2)), f = Hd((S = l == null ? void 0 : l.event) == null ? void 0 : S.startDate), d = (P = (g = l == null ? void 0 : l.odd) == null ? void 0 : g.offers) == null ? void 0 : P.find((T) => T.type === 0), v = l.market.name, m = (x = l == null ? void 0 : l.bbSelections) == null ? void 0 : x.map((T) => {
|
|
4732
4732
|
var F, J, $, j, I;
|
|
4733
4733
|
const R = (F = T == null ? void 0 : T.odd) == null ? void 0 : F.price, O = parseFloat(R.toFixed(2)), V = ($ = (J = T == null ? void 0 : T.odd) == null ? void 0 : J.offers) == null ? void 0 : $.find((G) => G.type === 0);
|
|
4734
4734
|
return {
|
|
@@ -4755,57 +4755,58 @@ class zd {
|
|
|
4755
4755
|
return { selections: r, stake: n, cuotaTotal: o, gananciaTotal: a };
|
|
4756
4756
|
}
|
|
4757
4757
|
}
|
|
4758
|
-
const Gd = "
|
|
4758
|
+
const Gd = "_BetSlip_z8bgq_1", Kd = "_BetSlip_Title_z8bgq_14", Yd = "_SelectionItemWrap_z8bgq_21", qd = "_BetSlip_ButtonWrap_z8bgq_35", Xd = "_BetSlip_BtnText_z8bgq_52", Zd = "_BetSlip_BtnText__Text_z8bgq_62", Jd = "_BetSlip__NextIcon_z8bgq_65", $t = {
|
|
4759
4759
|
BetSlip: Gd,
|
|
4760
4760
|
BetSlip_Title: Kd,
|
|
4761
4761
|
SelectionItemWrap: Yd,
|
|
4762
4762
|
BetSlip_ButtonWrap: qd,
|
|
4763
4763
|
BetSlip_BtnText: Xd,
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4764
|
+
BetSlip_BtnText__Text: Zd,
|
|
4765
|
+
BetSlip__NextIcon: Jd
|
|
4766
|
+
}, Qd = "_SelectionItem_1ut02_1", tv = "_SelectionItemGrid_1ut02_11", ev = "_SelectionItem_name_1ut02_17", nv = "_SelectionItem_marketName_1ut02_21", rv = "_SelectionItem_hasPA_1ut02_28", ov = "_SelectionItem_fechahora_1ut02_37", iv = "_SelectionItem__Wrap_1ut02_42", av = "_SelectionItem__BB_1ut02_47", sv = "_SelectionItem__BB__mn_1ut02_80", dt = {
|
|
4767
|
+
SelectionItem: Qd,
|
|
4768
|
+
SelectionItemGrid: tv,
|
|
4769
|
+
SelectionItem_name: ev,
|
|
4770
|
+
SelectionItem_marketName: nv,
|
|
4771
|
+
SelectionItem_hasPA: rv,
|
|
4772
|
+
SelectionItem_fechahora: ov,
|
|
4773
|
+
SelectionItem__Wrap: iv,
|
|
4774
|
+
SelectionItem__BB: av,
|
|
4775
|
+
SelectionItem__BB__mn: sv
|
|
4776
|
+
}, uv = ({ selection: t }) => {
|
|
4776
4777
|
var e, n;
|
|
4777
4778
|
return /* @__PURE__ */ q("div", { className: dt.SelectionItem, children: [
|
|
4778
4779
|
/* @__PURE__ */ q("div", { className: dt.SelectionItemGrid, children: [
|
|
4779
|
-
/* @__PURE__ */
|
|
4780
|
-
/* @__PURE__ */
|
|
4780
|
+
/* @__PURE__ */ b("div", { className: dt.SelectionItem_name, children: t != null && t.subSelections ? "Crear Apuesta" : t.name }),
|
|
4781
|
+
/* @__PURE__ */ b("div", { className: dt.SelectionItem_sc, children: t.cuota.toFixed(2) })
|
|
4781
4782
|
] }),
|
|
4782
|
-
t != null && t.subSelections ? null : /* @__PURE__ */
|
|
4783
|
-
/* @__PURE__ */
|
|
4784
|
-
t.hasPA && /* @__PURE__ */
|
|
4783
|
+
t != null && t.subSelections ? null : /* @__PURE__ */ b("div", { className: dt.SelectionItemGrid, children: /* @__PURE__ */ q("div", { className: dt.SelectionItem_marketName, children: [
|
|
4784
|
+
/* @__PURE__ */ b("div", { children: t.marketName }),
|
|
4785
|
+
t.hasPA && /* @__PURE__ */ b("div", { className: dt.SelectionItem_hasPA, children: "PA" })
|
|
4785
4786
|
] }) }),
|
|
4786
4787
|
/* @__PURE__ */ q("div", { className: dt.SelectionItemGrid, children: [
|
|
4787
|
-
/* @__PURE__ */
|
|
4788
|
-
/* @__PURE__ */
|
|
4788
|
+
/* @__PURE__ */ b("div", { className: dt.SelectionItem_event, children: t.event }),
|
|
4789
|
+
/* @__PURE__ */ b("div", { className: dt.SelectionItem_fechahora, children: t.fechaHora })
|
|
4789
4790
|
] }),
|
|
4790
|
-
t != null && t.subSelections && ((e = t == null ? void 0 : t.subSelections) == null ? void 0 : e.length) > 0 ? /* @__PURE__ */
|
|
4791
|
-
/* @__PURE__ */
|
|
4792
|
-
/* @__PURE__ */
|
|
4793
|
-
] }, o)) }) : /* @__PURE__ */
|
|
4791
|
+
t != null && t.subSelections && ((e = t == null ? void 0 : t.subSelections) == null ? void 0 : e.length) > 0 ? /* @__PURE__ */ b("div", { className: dt.SelectionItem__Wrap, children: (n = t.subSelections) == null ? void 0 : n.map((r, o) => /* @__PURE__ */ q("div", { className: dt.SelectionItem__BB, children: [
|
|
4792
|
+
/* @__PURE__ */ b("div", { className: dt.SelectionItem__BB__mn, children: r == null ? void 0 : r.marketName }),
|
|
4793
|
+
/* @__PURE__ */ b("div", { children: r == null ? void 0 : r.name })
|
|
4794
|
+
] }, o)) }) : /* @__PURE__ */ b(qn, {})
|
|
4794
4795
|
] });
|
|
4795
|
-
},
|
|
4796
|
-
PulseButton:
|
|
4797
|
-
PulseButton_BG:
|
|
4798
|
-
},
|
|
4799
|
-
Button:
|
|
4796
|
+
}, lv = "_PulseButton_1o75u_1", cv = "_PulseButton_BG_1o75u_10", $o = {
|
|
4797
|
+
PulseButton: lv,
|
|
4798
|
+
PulseButton_BG: cv
|
|
4799
|
+
}, fv = "_Button_hwpwf_1", dv = {
|
|
4800
|
+
Button: fv
|
|
4800
4801
|
}, Va = ({ children: t, href: e }) => /* @__PURE__ */ q("div", { className: $o.PulseButton, children: [
|
|
4801
|
-
/* @__PURE__ */
|
|
4802
|
-
/* @__PURE__ */
|
|
4803
|
-
] }),
|
|
4802
|
+
/* @__PURE__ */ b("div", { className: $o.PulseButton_BG }),
|
|
4803
|
+
/* @__PURE__ */ b("a", { className: dv.Button, href: e, children: t })
|
|
4804
|
+
] }), vv = ({
|
|
4804
4805
|
width: t = "100%",
|
|
4805
4806
|
height: e = "100%",
|
|
4806
4807
|
fill: n = "white",
|
|
4807
4808
|
...r
|
|
4808
|
-
}) => /* @__PURE__ */
|
|
4809
|
+
}) => /* @__PURE__ */ b(
|
|
4809
4810
|
"svg",
|
|
4810
4811
|
{
|
|
4811
4812
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4813,7 +4814,7 @@ const Gd = "_BetSlip_10597_1", Kd = "_BetSlip_Title_10597_14", Yd = "_SelectionI
|
|
|
4813
4814
|
height: e,
|
|
4814
4815
|
fill: n,
|
|
4815
4816
|
...r,
|
|
4816
|
-
children: /* @__PURE__ */
|
|
4817
|
+
children: /* @__PURE__ */ b(
|
|
4817
4818
|
"path",
|
|
4818
4819
|
{
|
|
4819
4820
|
fill: "#fff",
|
|
@@ -4821,25 +4822,25 @@ const Gd = "_BetSlip_10597_1", Kd = "_BetSlip_Title_10597_14", Yd = "_SelectionI
|
|
|
4821
4822
|
}
|
|
4822
4823
|
)
|
|
4823
4824
|
}
|
|
4824
|
-
),
|
|
4825
|
+
), pv = ({ slip: t, title: e }) => {
|
|
4825
4826
|
var n;
|
|
4826
|
-
return /* @__PURE__ */ q("div", { className:
|
|
4827
|
-
/* @__PURE__ */ q("div", { className:
|
|
4828
|
-
e ? /* @__PURE__ */
|
|
4829
|
-
(n = t == null ? void 0 : t.selections) == null ? void 0 : n.map((r, o) => /* @__PURE__ */
|
|
4827
|
+
return /* @__PURE__ */ q("div", { className: $t.BetSlip, children: [
|
|
4828
|
+
/* @__PURE__ */ q("div", { className: $t.SelectionItemWrap, children: [
|
|
4829
|
+
e ? /* @__PURE__ */ b("div", { className: $t.BetSlip_Title, children: e }) : null,
|
|
4830
|
+
(n = t == null ? void 0 : t.selections) == null ? void 0 : n.map((r, o) => /* @__PURE__ */ b(uv, { selection: r }, `${Date.now()}-${o}`))
|
|
4830
4831
|
] }),
|
|
4831
|
-
/* @__PURE__ */
|
|
4832
|
+
/* @__PURE__ */ b("div", { className: Wt($t.BetSlip_ButtonWrap), children: /* @__PURE__ */ b(
|
|
4832
4833
|
Va,
|
|
4833
4834
|
{
|
|
4834
4835
|
href: "https://www.apuestatotal.com/apuestas-deportivas/?reservationCode=HHHH",
|
|
4835
|
-
children: /* @__PURE__ */ q("div", { className:
|
|
4836
|
-
t == null ? void 0 : t.cuotaTotal,
|
|
4837
|
-
/* @__PURE__ */
|
|
4836
|
+
children: /* @__PURE__ */ q("div", { className: $t.BetSlip_BtnText, children: [
|
|
4837
|
+
/* @__PURE__ */ b("div", { className: $t.BetSlip_BtnText__Text, children: t == null ? void 0 : t.cuotaTotal }),
|
|
4838
|
+
/* @__PURE__ */ b("div", { className: $t.BetSlip__NextIcon, children: /* @__PURE__ */ b(vv, {}) })
|
|
4838
4839
|
] })
|
|
4839
4840
|
}
|
|
4840
4841
|
) })
|
|
4841
4842
|
] });
|
|
4842
|
-
},
|
|
4843
|
+
}, mv = {
|
|
4843
4844
|
stakes: [
|
|
4844
4845
|
{
|
|
4845
4846
|
value: 10,
|
|
@@ -5037,38 +5038,38 @@ const Gd = "_BetSlip_10597_1", Kd = "_BetSlip_Title_10597_14", Yd = "_SelectionI
|
|
|
5037
5038
|
betType: 1,
|
|
5038
5039
|
stakeAdjustment: { type: 0, value: 0 },
|
|
5039
5040
|
fullCoverData: { type: 1, label: null }
|
|
5040
|
-
},
|
|
5041
|
+
}, hv = ({ story: t }) => {
|
|
5041
5042
|
let e = Uo;
|
|
5042
|
-
return (t == null ? void 0 : t.type) == "promo" && (e = Uo), (t == null ? void 0 : t.type) == "betting" && (e =
|
|
5043
|
-
}, Uo = ({ story: t }) => /* @__PURE__ */ q("div", { className:
|
|
5044
|
-
/* @__PURE__ */
|
|
5045
|
-
t != null && t.btn_text && (t != null && t.btn_url) ? /* @__PURE__ */
|
|
5043
|
+
return (t == null ? void 0 : t.type) == "promo" && (e = Uo), (t == null ? void 0 : t.type) == "betting" && (e = gv), /* @__PURE__ */ b(e, { story: t });
|
|
5044
|
+
}, Uo = ({ story: t }) => /* @__PURE__ */ q("div", { className: Wt(ve.story), children: [
|
|
5045
|
+
/* @__PURE__ */ b("img", { src: t == null ? void 0 : t.image, alt: "" }),
|
|
5046
|
+
t != null && t.btn_text && (t != null && t.btn_url) ? /* @__PURE__ */ b("div", { className: Wt(ve.BetSlip_Wrapper), children: /* @__PURE__ */ b("div", { className: ve.BetSlip_ButtonWrap, children: /* @__PURE__ */ q(Va, { href: t == null ? void 0 : t.btn_url, children: [
|
|
5046
5047
|
" ",
|
|
5047
5048
|
t == null ? void 0 : t.btn_text
|
|
5048
5049
|
] }) }) }) : null
|
|
5049
|
-
] }),
|
|
5050
|
-
const e =
|
|
5051
|
-
return /* @__PURE__ */ q("div", { className:
|
|
5052
|
-
/* @__PURE__ */
|
|
5053
|
-
/* @__PURE__ */
|
|
5054
|
-
|
|
5050
|
+
] }), gv = ({ story: t }) => {
|
|
5051
|
+
const e = mv;
|
|
5052
|
+
return /* @__PURE__ */ q("div", { className: Wt(ve.story), children: [
|
|
5053
|
+
/* @__PURE__ */ b("img", { src: t == null ? void 0 : t.image, alt: "" }),
|
|
5054
|
+
/* @__PURE__ */ b("div", { className: ve.BetSlip_Wrapper, children: /* @__PURE__ */ b(
|
|
5055
|
+
pv,
|
|
5055
5056
|
{
|
|
5056
5057
|
slip: zd.fromRaw(e),
|
|
5057
5058
|
title: t == null ? void 0 : t.coupon_title
|
|
5058
5059
|
}
|
|
5059
5060
|
) })
|
|
5060
5061
|
] });
|
|
5061
|
-
},
|
|
5062
|
-
StoryHeaderPlayer:
|
|
5063
|
-
StoryHeaderPlayer__ProfileStory:
|
|
5064
|
-
StoryHeaderPlayer__title:
|
|
5065
|
-
},
|
|
5062
|
+
}, yv = "_StoryHeaderPlayer_1oqtd_1", Sv = "_StoryHeaderPlayer__ProfileStory_1oqtd_18", bv = "_StoryHeaderPlayer__title_1oqtd_24", Cn = {
|
|
5063
|
+
StoryHeaderPlayer: yv,
|
|
5064
|
+
StoryHeaderPlayer__ProfileStory: Sv,
|
|
5065
|
+
StoryHeaderPlayer__title: bv
|
|
5066
|
+
}, _v = ({
|
|
5066
5067
|
story: t,
|
|
5067
5068
|
onProfileClick: e = () => null,
|
|
5068
5069
|
color: n,
|
|
5069
5070
|
image: r
|
|
5070
5071
|
}) => /* @__PURE__ */ q("div", { className: Cn.StoryHeaderPlayer, children: [
|
|
5071
|
-
/* @__PURE__ */
|
|
5072
|
+
/* @__PURE__ */ b(
|
|
5072
5073
|
zo,
|
|
5073
5074
|
{
|
|
5074
5075
|
className: Cn.StoryHeaderPlayer__ProfileStory,
|
|
@@ -5077,7 +5078,7 @@ const Gd = "_BetSlip_10597_1", Kd = "_BetSlip_Title_10597_14", Yd = "_SelectionI
|
|
|
5077
5078
|
image: r
|
|
5078
5079
|
}
|
|
5079
5080
|
),
|
|
5080
|
-
/* @__PURE__ */
|
|
5081
|
+
/* @__PURE__ */ b("div", { className: Cn.StoryHeaderPlayer__title, children: t == null ? void 0 : t.title })
|
|
5081
5082
|
] }), Pv = ({ container: t = "HOME" } = {}) => {
|
|
5082
5083
|
const e = "apuestotal-stories-" + t;
|
|
5083
5084
|
function n() {
|
|
@@ -5149,7 +5150,7 @@ function wv(t, e) {
|
|
|
5149
5150
|
};
|
|
5150
5151
|
}, [t, n]);
|
|
5151
5152
|
}
|
|
5152
|
-
function
|
|
5153
|
+
function xv({ scroll: t, targets: e }) {
|
|
5153
5154
|
const n = Z([]), r = pe((a) => {
|
|
5154
5155
|
n.current.forEach(({ el: i, originalOverflow: s }) => {
|
|
5155
5156
|
i.style.overflow = s;
|
|
@@ -5187,9 +5188,9 @@ function _v({ scroll: t, targets: e }) {
|
|
|
5187
5188
|
}
|
|
5188
5189
|
}, [t]), { disableScroll: r, enableScroll: o };
|
|
5189
5190
|
}
|
|
5190
|
-
const
|
|
5191
|
+
const Av = ({ className: t = "", data: e, isPortal: n = !0 }) => {
|
|
5191
5192
|
var y;
|
|
5192
|
-
const [r, o] =
|
|
5193
|
+
const [r, o] = _t(null), a = (h) => o(h), {
|
|
5193
5194
|
markStorySeen: i,
|
|
5194
5195
|
hasSeenAllStories: s,
|
|
5195
5196
|
getNextUnseenStoryIndex: u,
|
|
@@ -5201,7 +5202,7 @@ const Iv = ({ className: t = "", data: e, isPortal: n = !0 }) => {
|
|
|
5201
5202
|
f.current = c;
|
|
5202
5203
|
}, [c]);
|
|
5203
5204
|
const d = e == null ? void 0 : e.find((h) => (h == null ? void 0 : h.id) == r), p = ((y = e == null ? void 0 : e.find((h) => (h == null ? void 0 : h.id) == r)) == null ? void 0 : y.stories) ?? [];
|
|
5204
|
-
wv(r, () => o(null)),
|
|
5205
|
+
wv(r, () => o(null)), xv({
|
|
5205
5206
|
targets: [document],
|
|
5206
5207
|
scroll: r ? "OFF" : "ON"
|
|
5207
5208
|
});
|
|
@@ -5211,10 +5212,10 @@ const Iv = ({ className: t = "", data: e, isPortal: n = !0 }) => {
|
|
|
5211
5212
|
if (!r) return null;
|
|
5212
5213
|
const h = p.map((g) => ({
|
|
5213
5214
|
type: "component",
|
|
5214
|
-
component: ({ pause:
|
|
5215
|
+
component: ({ pause: P, resume: x, story: T, isPaused: R }) => (i(d == null ? void 0 : d.id, g.id), /* @__PURE__ */ b(hv, { story: g })),
|
|
5215
5216
|
duration: g != null && g.duration ? (g == null ? void 0 : g.duration) * 1e3 : 7e3,
|
|
5216
|
-
header: () => /* @__PURE__ */
|
|
5217
|
-
|
|
5217
|
+
header: () => /* @__PURE__ */ b(
|
|
5218
|
+
_v,
|
|
5218
5219
|
{
|
|
5219
5220
|
color: d == null ? void 0 : d.color,
|
|
5220
5221
|
image: d == null ? void 0 : d.avatar,
|
|
@@ -5222,7 +5223,7 @@ const Iv = ({ className: t = "", data: e, isPortal: n = !0 }) => {
|
|
|
5222
5223
|
},
|
|
5223
5224
|
g == null ? void 0 : g.id
|
|
5224
5225
|
)
|
|
5225
|
-
})), S = /* @__PURE__ */
|
|
5226
|
+
})), S = /* @__PURE__ */ b(
|
|
5226
5227
|
jd,
|
|
5227
5228
|
{
|
|
5228
5229
|
onClose: v,
|
|
@@ -5233,10 +5234,10 @@ const Iv = ({ className: t = "", data: e, isPortal: n = !0 }) => {
|
|
|
5233
5234
|
var x;
|
|
5234
5235
|
const g = f.current.findIndex(
|
|
5235
5236
|
(T) => T.id == r
|
|
5236
|
-
),
|
|
5237
|
+
), P = f.current.filter(
|
|
5237
5238
|
(T) => T.id !== r
|
|
5238
5239
|
);
|
|
5239
|
-
f.current =
|
|
5240
|
+
f.current = P, (x = f.current[g]) != null && x.id ? o(f.current[g].id) : (o(null), f.current = c);
|
|
5240
5241
|
},
|
|
5241
5242
|
currentIndex: d ? u(d) : 0,
|
|
5242
5243
|
stories: h
|
|
@@ -5246,13 +5247,13 @@ const Iv = ({ className: t = "", data: e, isPortal: n = !0 }) => {
|
|
|
5246
5247
|
return n ? Ra.createPortal(S, document.body) : S;
|
|
5247
5248
|
};
|
|
5248
5249
|
return /* @__PURE__ */ q(qn, { children: [
|
|
5249
|
-
/* @__PURE__ */
|
|
5250
|
-
|
|
5250
|
+
/* @__PURE__ */ b(
|
|
5251
|
+
_s,
|
|
5251
5252
|
{
|
|
5252
|
-
wrapperClassName:
|
|
5253
|
+
wrapperClassName: Wt(sn.ScrollMenu, t),
|
|
5253
5254
|
scrollContainerClassName: sn.scrollContainerClassName,
|
|
5254
5255
|
itemClassName: sn.itemClassName,
|
|
5255
|
-
children: c.map((h, S) => /* @__PURE__ */
|
|
5256
|
+
children: c.map((h, S) => /* @__PURE__ */ b(
|
|
5256
5257
|
zo,
|
|
5257
5258
|
{
|
|
5258
5259
|
hasSeenAllStories: s(h),
|
|
@@ -5269,10 +5270,10 @@ const Iv = ({ className: t = "", data: e, isPortal: n = !0 }) => {
|
|
|
5269
5270
|
] });
|
|
5270
5271
|
};
|
|
5271
5272
|
export {
|
|
5272
|
-
|
|
5273
|
-
|
|
5273
|
+
hv as ManagmentStoryComponent,
|
|
5274
|
+
Av as ProfileStories,
|
|
5274
5275
|
zo as ProfileStory,
|
|
5275
|
-
|
|
5276
|
+
_v as StoryHeaderPlayer,
|
|
5276
5277
|
jd as StoryPlayer
|
|
5277
5278
|
};
|
|
5278
5279
|
//# sourceMappingURL=index.esm.js.map
|