@janbox/storefront-builder 1.0.4 → 1.0.6
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/README.md +480 -0
- package/dist/editor/hooks/use-editor-state.d.ts +13 -1
- package/dist/editor/lib/index.d.ts +4 -1
- package/dist/editor/ui/dialog/dialog/helpers.d.ts +1 -1
- package/dist/editor/ui/dialog/dialog-close/dialog-close.d.ts +1 -1
- package/dist/editor.js +356 -351
- package/dist/{index-CBDllFpx.js → index-BU9pvpw_.js} +263 -256
- package/dist/index.js +428 -419
- package/dist/lib/accordion/README.md +39 -0
- package/dist/lib/accordion-content/README.md +36 -0
- package/dist/lib/accordion-group/README.md +106 -0
- package/dist/lib/accordion-summary/README.md +37 -0
- package/dist/lib/box/README.md +107 -0
- package/dist/lib/button/README.md +94 -0
- package/dist/lib/cell/README.md +119 -0
- package/dist/lib/countdown-timer/README.md +157 -0
- package/dist/lib/flex-item/README.md +111 -0
- package/dist/lib/flexbox/README.md +120 -0
- package/dist/lib/grid/README.md +133 -0
- package/dist/lib/heading/README.md +53 -0
- package/dist/lib/icon/README.md +98 -0
- package/dist/lib/image/README.md +107 -0
- package/dist/lib/link/README.md +111 -0
- package/dist/lib/list-item/README.md +31 -0
- package/dist/lib/marquee/README.md +111 -0
- package/dist/lib/marquee-item/README.md +31 -0
- package/dist/lib/paragraph/README.md +82 -0
- package/dist/lib/root/README.md +33 -0
- package/dist/lib/swiper/README.md +108 -0
- package/dist/lib/swiper-slide/README.md +32 -0
- package/dist/lib/tab/README.md +35 -0
- package/dist/lib/tab-content/README.md +35 -0
- package/dist/lib/tab-list/README.md +35 -0
- package/dist/lib/tab-panel/README.md +35 -0
- package/dist/lib/tabs/README.md +90 -0
- package/dist/lib/text/README.md +90 -0
- package/dist/lib/unknown/README.md +48 -0
- package/dist/lib/unordered-list/README.md +82 -0
- package/dist/lib/video/README.md +91 -0
- package/package.json +4 -10
- package/dist/editor/lib/events.d.ts +0 -5
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Fragment as le, useSyncExternalStore as Jo, forwardRef as ft, Suspense as Qo, lazy as tr, Children as ce, isValidElement as _t, cloneElement as
|
|
2
|
-
import { useQueryParams as rr, useControllableState as
|
|
1
|
+
import { Fragment as le, useSyncExternalStore as Jo, forwardRef as ft, Suspense as Qo, lazy as tr, Children as ce, isValidElement as _t, cloneElement as Ze, useRef as ut, useState as Je, useContext as B, createContext as it, useMemo as Y, useId as er, useEffect as Pt, useCallback as si, useLayoutEffect as nr, useInsertionEffect as sr, createElement as ir, Component as or } from "react";
|
|
2
|
+
import { useQueryParams as rr, useControllableState as Qe } from "@janbox/storefront-ui/hooks";
|
|
3
3
|
import { screens as ar, FLOATING_Z_INDEX as lr } from "@janbox/storefront-ui/theme";
|
|
4
4
|
import { getResponsiveProp as cr } from "@janbox/storefront-ui/utils";
|
|
5
5
|
import { jsx as x, Fragment as ii, jsxs as ht } from "@emotion/react/jsx-runtime";
|
|
6
|
-
import { u as St, x as oi, J as ue, D as C, c as L, W as ur, i as
|
|
7
|
-
import { isFunction as Or, merge as ri, set as Ur, isNil as Wt, isString as
|
|
6
|
+
import { u as St, x as oi, J as ue, D as C, c as L, W as ur, i as Fn, b as Bn, t as dr, k as hr, h as fr, f as pr, A as mr, s as gr, r as yr, q as vr, p as wr, T as xr, m as br, M as Tr, l as Pr, S as Sr, L as Cr, n as Ar, V as Vr, I as Mr, d as Dr, e as kr, F as Er, C as Rr, G as Lr, H as Nr, j as Fr, o as Br, a as Ir, N as jr, B as In } from "./countdown-timer.node-CAsCNVin.js";
|
|
7
|
+
import { isFunction as Or, merge as ri, set as Ur, isNil as Wt, isString as Le, isUndefined as Ne, get as ai } from "lodash-es";
|
|
8
8
|
import { OverlayScrollbarsComponent as _r } from "overlayscrollbars-react";
|
|
9
9
|
import { jsxs as Wr, jsx as li } from "react/jsx-runtime";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useMergeRefs as de, useFloating as ci, autoUpdate as ui, offset as di, flip as hi, size as $r, useClick as Kr, useHover as Hr, safePolygon as zr, useDismiss as Gr, useRole as qr, useInteractions as Xr, useFloatingParentNodeId as Yr, FloatingTree as Zr, FloatingPortal as fi } from "@floating-ui/react";
|
|
11
|
+
import { useNode as tt, ROOT_NODE as Jr, Frame as Qr, Editor as ta, DefaultEventHandlers as ea } from "@craftjs/core";
|
|
12
12
|
import { useUpdateEffect as na } from "react-use";
|
|
13
13
|
import { useFrame as sa } from "react-frame-component";
|
|
14
14
|
import { Button as ia, UnorderedList as oa, ListItem as ra } from "@janbox/storefront-ui";
|
|
@@ -88,19 +88,26 @@ ue(mi, {
|
|
|
88
88
|
displayName: "Unknown"
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
const ca = (
|
|
92
|
-
let
|
|
93
|
-
const
|
|
94
|
-
return { getSnapshot: () =>
|
|
95
|
-
|
|
91
|
+
const ca = () => {
|
|
92
|
+
let t;
|
|
93
|
+
const e = /* @__PURE__ */ new Set();
|
|
94
|
+
return { getSnapshot: () => {
|
|
95
|
+
if (!t)
|
|
96
|
+
throw new Error("useEditor must be initialized with initialState before use.");
|
|
97
|
+
return t;
|
|
98
|
+
}, subscribe: (o) => (e.add(o), () => e.delete(o)), initialize: (o) => {
|
|
99
|
+
t = o, e.forEach((a) => a());
|
|
100
|
+
}, setState: (o) => {
|
|
101
|
+
if (!t)
|
|
102
|
+
throw new Error("useEditor must be initialized before setState.");
|
|
103
|
+
t = { ...t, ...o }, e.forEach((a) => a());
|
|
96
104
|
} };
|
|
97
|
-
}, Gt = ca(
|
|
98
|
-
let
|
|
99
|
-
const bh = (t) => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}, Th = () => {
|
|
105
|
+
}, Gt = ca();
|
|
106
|
+
let jn = !1;
|
|
107
|
+
const bh = (t) => (t && !jn && (jn = !0, Gt.initialize(t)), {
|
|
108
|
+
...Jo(Gt.subscribe, Gt.getSnapshot),
|
|
109
|
+
setState: Gt.setState
|
|
110
|
+
}), Th = () => {
|
|
104
111
|
const {
|
|
105
112
|
queryParams: { screen: t }
|
|
106
113
|
} = ua();
|
|
@@ -228,7 +235,7 @@ const bh = (t) => {
|
|
|
228
235
|
className: i,
|
|
229
236
|
...r
|
|
230
237
|
}) => {
|
|
231
|
-
const [o, a] =
|
|
238
|
+
const [o, a] = Qe({
|
|
232
239
|
defaultValue: e ?? null,
|
|
233
240
|
value: n
|
|
234
241
|
}), l = ce.toArray(t).filter(
|
|
@@ -238,7 +245,7 @@ const bh = (t) => {
|
|
|
238
245
|
d !== o && (a(d), s?.(d, u));
|
|
239
246
|
};
|
|
240
247
|
return /* @__PURE__ */ x("div", { className: L("tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", i), ...r, children: l.map(
|
|
241
|
-
(u) =>
|
|
248
|
+
(u) => Ze(u, {
|
|
242
249
|
onClick(d) {
|
|
243
250
|
c(d), u.props.onClick?.(d);
|
|
244
251
|
},
|
|
@@ -301,7 +308,7 @@ const bh = (t) => {
|
|
|
301
308
|
ref: d,
|
|
302
309
|
children: [
|
|
303
310
|
r,
|
|
304
|
-
|
|
311
|
+
Le(a) ? /* @__PURE__ */ x("span", { children: a }) : a,
|
|
305
312
|
o,
|
|
306
313
|
l && /* @__PURE__ */ x("div", { className: "tw:absolute tw:inset-0 tw:flex tw:items-center tw:justify-center tw:!visible", children: /* @__PURE__ */ x(Zt, { source: ga, size: 16, className: "tw:animate-spin" }) }),
|
|
307
314
|
e === "outlined" && /* @__PURE__ */ x("div", { className: "tw:absolute tw:rounded-lg tw:inset-0 tw:border tw:border-transparent tw:pointer-events-none" })
|
|
@@ -328,7 +335,7 @@ const bh = (t) => {
|
|
|
328
335
|
selectOnFocus: y = !1,
|
|
329
336
|
...g
|
|
330
337
|
}) => {
|
|
331
|
-
const p = ut(null), [v, w] =
|
|
338
|
+
const p = ut(null), [v, w] = Je(), S = ut(""), b = {
|
|
332
339
|
height: Number(i)
|
|
333
340
|
}, V = (A, O = !1) => {
|
|
334
341
|
A.target.value = r ? r(A.target.value) : A.target.value, p.current && clearTimeout(p.current);
|
|
@@ -338,11 +345,11 @@ const bh = (t) => {
|
|
|
338
345
|
return;
|
|
339
346
|
}
|
|
340
347
|
if (c === "onBlur") {
|
|
341
|
-
|
|
348
|
+
Ne(d) || w(A.target.value);
|
|
342
349
|
return;
|
|
343
350
|
}
|
|
344
351
|
if (u > 0) {
|
|
345
|
-
|
|
352
|
+
Ne(d) || w(A.target.value), p.current = setTimeout(() => {
|
|
346
353
|
l?.(A);
|
|
347
354
|
}, u);
|
|
348
355
|
return;
|
|
@@ -412,7 +419,7 @@ const bh = (t) => {
|
|
|
412
419
|
trigger: o = "click",
|
|
413
420
|
offset: a = 4
|
|
414
421
|
}) => {
|
|
415
|
-
const [l, c] =
|
|
422
|
+
const [l, c] = Qe({
|
|
416
423
|
defaultValue: !1,
|
|
417
424
|
value: t
|
|
418
425
|
}), d = ci({
|
|
@@ -424,7 +431,7 @@ const bh = (t) => {
|
|
|
424
431
|
middleware: [
|
|
425
432
|
di(a),
|
|
426
433
|
hi(),
|
|
427
|
-
|
|
434
|
+
$r({
|
|
428
435
|
apply({ elements: S }) {
|
|
429
436
|
const b = {
|
|
430
437
|
zIndex: `${lr}`,
|
|
@@ -435,12 +442,12 @@ const bh = (t) => {
|
|
|
435
442
|
})
|
|
436
443
|
],
|
|
437
444
|
whileElementsMounted: ui
|
|
438
|
-
}), { context: h, refs: f } = d, m =
|
|
445
|
+
}), { context: h, refs: f } = d, m = Kr(h, {
|
|
439
446
|
enabled: o === "click"
|
|
440
|
-
}), y =
|
|
447
|
+
}), y = Hr(h, {
|
|
441
448
|
enabled: o === "hover",
|
|
442
|
-
handleClose:
|
|
443
|
-
}), g =
|
|
449
|
+
handleClose: zr()
|
|
450
|
+
}), g = Gr(
|
|
444
451
|
h,
|
|
445
452
|
ri(
|
|
446
453
|
{
|
|
@@ -448,7 +455,7 @@ const bh = (t) => {
|
|
|
448
455
|
},
|
|
449
456
|
s
|
|
450
457
|
)
|
|
451
|
-
), p =
|
|
458
|
+
), p = qr(h), v = Xr([m, g, p, y]), w = Y(
|
|
452
459
|
() => ({
|
|
453
460
|
...d,
|
|
454
461
|
...v
|
|
@@ -456,11 +463,11 @@ const bh = (t) => {
|
|
|
456
463
|
[d, v]
|
|
457
464
|
);
|
|
458
465
|
return na(() => {
|
|
459
|
-
|
|
466
|
+
Ne(r) || (f.setReference?.(r), h.onOpenChange(!Wt(r)));
|
|
460
467
|
}, [r]), /* @__PURE__ */ x(gi.Provider, { value: w, children: i });
|
|
461
|
-
}, va = (t) =>
|
|
468
|
+
}, va = (t) => Yr() ? /* @__PURE__ */ x(Un, { ...t }) : /* @__PURE__ */ x(Zr, { children: /* @__PURE__ */ x(Un, { ...t }) }), wa = ft(({ children: t, ...e }, n) => {
|
|
462
469
|
const { getReferenceProps: s, context: i } = yi(), r = de([i.refs.setReference, ai(t, "ref"), n]);
|
|
463
|
-
return _t(t) ?
|
|
470
|
+
return _t(t) ? Ze(
|
|
464
471
|
t,
|
|
465
472
|
s({
|
|
466
473
|
...t.props ?? {},
|
|
@@ -546,14 +553,14 @@ const bh = (t) => {
|
|
|
546
553
|
),
|
|
547
554
|
...s,
|
|
548
555
|
children: i.map(
|
|
549
|
-
(r, o) =>
|
|
556
|
+
(r, o) => Ze(r, {
|
|
550
557
|
"data-tab-index": o
|
|
551
558
|
})
|
|
552
559
|
)
|
|
553
560
|
}
|
|
554
561
|
);
|
|
555
562
|
}, Dh = ({ defaultIndex: t, activeIndex: e, children: n, onTabChange: s, className: i, ...r }) => {
|
|
556
|
-
const o = ce.toArray(n).filter((f) => _t(f)), a = o.find((f) => f.type === Ca), [l, c] =
|
|
563
|
+
const o = ce.toArray(n).filter((f) => _t(f)), a = o.find((f) => f.type === Ca), [l, c] = Qe({
|
|
557
564
|
defaultValue: t ?? 0,
|
|
558
565
|
value: e
|
|
559
566
|
}), u = o.find((f) => f.type === Pa), d = (f) => {
|
|
@@ -586,13 +593,13 @@ function Va(t) {
|
|
|
586
593
|
const e = ut(null);
|
|
587
594
|
return e.current === null && (e.current = t()), e.current;
|
|
588
595
|
}
|
|
589
|
-
const
|
|
596
|
+
const tn = it(null), bi = it({
|
|
590
597
|
transformPagePoint: (t) => t,
|
|
591
598
|
isStatic: !1,
|
|
592
599
|
reducedMotion: "never"
|
|
593
600
|
});
|
|
594
601
|
function Ma(t = !0) {
|
|
595
|
-
const e = B(
|
|
602
|
+
const e = B(tn);
|
|
596
603
|
if (e === null)
|
|
597
604
|
return [!0, null];
|
|
598
605
|
const { isPresent: n, onExitComplete: s, register: i } = e, r = er();
|
|
@@ -602,7 +609,7 @@ function Ma(t = !0) {
|
|
|
602
609
|
const o = si(() => t && s && s(r), [r, s, t]);
|
|
603
610
|
return !n && s ? [!1, o] : [!0];
|
|
604
611
|
}
|
|
605
|
-
const
|
|
612
|
+
const en = typeof window < "u", Da = en ? nr : Pt, U = /* @__NO_SIDE_EFFECTS__ */ (t) => t;
|
|
606
613
|
let Ct = U, et = U;
|
|
607
614
|
process.env.NODE_ENV !== "production" && (Ct = (t, e) => {
|
|
608
615
|
!t && typeof console < "u" && console.warn(e);
|
|
@@ -685,7 +692,7 @@ function Ti(t, e) {
|
|
|
685
692
|
o[qt[v]].cancel(p);
|
|
686
693
|
}, state: i, steps: o };
|
|
687
694
|
}
|
|
688
|
-
const { schedule: M, cancel: nt, state: N, steps:
|
|
695
|
+
const { schedule: M, cancel: nt, state: N, steps: xe } = Ti(typeof requestAnimationFrame < "u" ? requestAnimationFrame : U, !0), Pi = it({ strict: !1 }), _n = {
|
|
689
696
|
animation: [
|
|
690
697
|
"animate",
|
|
691
698
|
"variants",
|
|
@@ -790,7 +797,7 @@ function Bt(t) {
|
|
|
790
797
|
function pe(t) {
|
|
791
798
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
792
799
|
}
|
|
793
|
-
const
|
|
800
|
+
const nn = [
|
|
794
801
|
"animate",
|
|
795
802
|
"whileInView",
|
|
796
803
|
"whileFocus",
|
|
@@ -798,9 +805,9 @@ const sn = [
|
|
|
798
805
|
"whileTap",
|
|
799
806
|
"whileDrag",
|
|
800
807
|
"exit"
|
|
801
|
-
],
|
|
808
|
+
], sn = ["initial", ...nn];
|
|
802
809
|
function me(t) {
|
|
803
|
-
return pe(t.animate) ||
|
|
810
|
+
return pe(t.animate) || sn.some((e) => Bt(t[e]));
|
|
804
811
|
}
|
|
805
812
|
function Ci(t) {
|
|
806
813
|
return !!(me(t) || t.variants);
|
|
@@ -839,10 +846,10 @@ function _a(t, e, n) {
|
|
|
839
846
|
[e]
|
|
840
847
|
);
|
|
841
848
|
}
|
|
842
|
-
const
|
|
849
|
+
const on = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Wa = "framerAppearId", Ai = "data-" + on(Wa), { schedule: rn } = Ti(queueMicrotask, !1), Vi = it({});
|
|
843
850
|
function $a(t, e, n, s, i) {
|
|
844
851
|
var r, o;
|
|
845
|
-
const { visualElement: a } = B(fe), l = B(Pi), c = B(
|
|
852
|
+
const { visualElement: a } = B(fe), l = B(Pi), c = B(tn), u = B(bi).reducedMotion, d = ut(null);
|
|
846
853
|
s = s || l.renderer, !d.current && s && (d.current = s(t, {
|
|
847
854
|
visualState: e,
|
|
848
855
|
parent: a,
|
|
@@ -859,7 +866,7 @@ function $a(t, e, n, s, i) {
|
|
|
859
866
|
});
|
|
860
867
|
const y = n[Ai], g = ut(!!y && !(!((r = window.MotionHandoffIsComplete) === null || r === void 0) && r.call(window, y)) && ((o = window.MotionHasOptimisedAnimation) === null || o === void 0 ? void 0 : o.call(window, y)));
|
|
861
868
|
return Da(() => {
|
|
862
|
-
h && (m.current = !0, window.MotionIsMounted = !0, h.updateFeatures(),
|
|
869
|
+
h && (m.current = !0, window.MotionIsMounted = !0, h.updateFeatures(), rn.render(h.render), g.current && h.animationState && h.animationState.animateChanges());
|
|
863
870
|
}), Pt(() => {
|
|
864
871
|
h && (!g.current && h.animationState && h.animationState.animateChanges(), g.current && (queueMicrotask(() => {
|
|
865
872
|
var p;
|
|
@@ -901,7 +908,7 @@ function Ha({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
|
|
|
901
908
|
...c,
|
|
902
909
|
layoutId: za(c)
|
|
903
910
|
}, { isStatic: f } = h, m = Oa(c), y = s(c, f);
|
|
904
|
-
if (!f &&
|
|
911
|
+
if (!f && en) {
|
|
905
912
|
Ga(h, t);
|
|
906
913
|
const g = qa(h);
|
|
907
914
|
d = g.MeasureLayout, m.visualElement = $a(i, y, h, e, g.ProjectionNode);
|
|
@@ -960,7 +967,7 @@ const Xa = [
|
|
|
960
967
|
"use",
|
|
961
968
|
"view"
|
|
962
969
|
];
|
|
963
|
-
function
|
|
970
|
+
function an(t) {
|
|
964
971
|
return (
|
|
965
972
|
/**
|
|
966
973
|
* If it's not a string, it's a custom React component. Currently we only support
|
|
@@ -986,7 +993,7 @@ function Kn(t) {
|
|
|
986
993
|
e[0][s] = n.get(), e[1][s] = n.getVelocity();
|
|
987
994
|
}), e;
|
|
988
995
|
}
|
|
989
|
-
function
|
|
996
|
+
function ln(t, e, n, s) {
|
|
990
997
|
if (typeof e == "function") {
|
|
991
998
|
const [i, r] = Kn(s);
|
|
992
999
|
e = e(n !== void 0 ? n : t.custom, i, r);
|
|
@@ -997,7 +1004,7 @@ function cn(t, e, n, s) {
|
|
|
997
1004
|
}
|
|
998
1005
|
return e;
|
|
999
1006
|
}
|
|
1000
|
-
const
|
|
1007
|
+
const Fe = (t) => Array.isArray(t), Ya = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), Za = (t) => Fe(t) ? t[t.length - 1] || 0 : t, I = (t) => !!(t && t.getVelocity);
|
|
1001
1008
|
function Jt(t) {
|
|
1002
1009
|
const e = I(t) ? t.get() : t;
|
|
1003
1010
|
return Ya(e) ? e.toValue() : e;
|
|
@@ -1010,7 +1017,7 @@ function Ja({ scrapeMotionValuesFromProps: t, createRenderState: e, onUpdate: n
|
|
|
1010
1017
|
return n && (o.onMount = (a) => n({ props: s, current: a, ...o }), o.onUpdate = (a) => n(a)), o;
|
|
1011
1018
|
}
|
|
1012
1019
|
const Di = (t) => (e, n) => {
|
|
1013
|
-
const s = B(fe), i = B(
|
|
1020
|
+
const s = B(fe), i = B(tn), r = () => Ja(t, e, s, i);
|
|
1014
1021
|
return n ? r() : Va(r);
|
|
1015
1022
|
};
|
|
1016
1023
|
function Qa(t, e, n, s) {
|
|
@@ -1026,7 +1033,7 @@ function Qa(t, e, n, s) {
|
|
|
1026
1033
|
if (d && typeof d != "boolean" && !pe(d)) {
|
|
1027
1034
|
const h = Array.isArray(d) ? d : [d];
|
|
1028
1035
|
for (let f = 0; f < h.length; f++) {
|
|
1029
|
-
const m =
|
|
1036
|
+
const m = ln(t, h[f]);
|
|
1030
1037
|
if (m) {
|
|
1031
1038
|
const { transitionEnd: y, transition: g, ...p } = m;
|
|
1032
1039
|
for (const v in p) {
|
|
@@ -1062,7 +1069,7 @@ const At = [
|
|
|
1062
1069
|
"skew",
|
|
1063
1070
|
"skewX",
|
|
1064
1071
|
"skewY"
|
|
1065
|
-
], pt = new Set(At), ki = (t) => (e) => typeof e == "string" && e.startsWith(t), Ei = /* @__PURE__ */ ki("--"), tl = /* @__PURE__ */ ki("var(--"),
|
|
1072
|
+
], pt = new Set(At), ki = (t) => (e) => typeof e == "string" && e.startsWith(t), Ei = /* @__PURE__ */ ki("--"), tl = /* @__PURE__ */ ki("var(--"), cn = (t) => tl(t) ? el.test(t.split("/*")[0].trim()) : !1, el = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Ri = (t, e) => e && typeof t == "number" ? e.transform(t) : t, Z = (t, e, n) => n > e ? e : n < t ? t : n, Vt = {
|
|
1066
1073
|
test: (t) => typeof t == "number",
|
|
1067
1074
|
parse: parseFloat,
|
|
1068
1075
|
transform: (t) => t
|
|
@@ -1144,7 +1151,7 @@ const At = [
|
|
|
1144
1151
|
}, zn = {
|
|
1145
1152
|
...Vt,
|
|
1146
1153
|
transform: Math.round
|
|
1147
|
-
},
|
|
1154
|
+
}, un = {
|
|
1148
1155
|
...il,
|
|
1149
1156
|
...ol,
|
|
1150
1157
|
zIndex: zn,
|
|
@@ -1167,7 +1174,7 @@ function ll(t, e, n) {
|
|
|
1167
1174
|
continue;
|
|
1168
1175
|
let l = !0;
|
|
1169
1176
|
if (typeof a == "number" ? l = a === (o.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
|
|
1170
|
-
const c = Ri(a,
|
|
1177
|
+
const c = Ri(a, un[o]);
|
|
1171
1178
|
if (!l) {
|
|
1172
1179
|
i = !1;
|
|
1173
1180
|
const u = rl[o] || o;
|
|
@@ -1178,7 +1185,7 @@ function ll(t, e, n) {
|
|
|
1178
1185
|
}
|
|
1179
1186
|
return s = s.trim(), n ? s = n(e, i ? "" : s) : i && (s = "none"), s;
|
|
1180
1187
|
}
|
|
1181
|
-
function
|
|
1188
|
+
function dn(t, e, n) {
|
|
1182
1189
|
const { style: s, vars: i, transformOrigin: r } = t;
|
|
1183
1190
|
let o = !1, a = !1;
|
|
1184
1191
|
for (const l in e) {
|
|
@@ -1190,7 +1197,7 @@ function hn(t, e, n) {
|
|
|
1190
1197
|
i[l] = c;
|
|
1191
1198
|
continue;
|
|
1192
1199
|
} else {
|
|
1193
|
-
const u = Ri(c,
|
|
1200
|
+
const u = Ri(c, un[l]);
|
|
1194
1201
|
l.startsWith("origin") ? (a = !0, r[l] = u) : s[l] = u;
|
|
1195
1202
|
}
|
|
1196
1203
|
}
|
|
@@ -1220,7 +1227,7 @@ function hl(t, e, n) {
|
|
|
1220
1227
|
const s = Gn(e, t.x, t.width), i = Gn(n, t.y, t.height);
|
|
1221
1228
|
return `${s} ${i}`;
|
|
1222
1229
|
}
|
|
1223
|
-
function
|
|
1230
|
+
function hn(t, {
|
|
1224
1231
|
attrX: e,
|
|
1225
1232
|
attrY: n,
|
|
1226
1233
|
attrScale: s,
|
|
@@ -1232,7 +1239,7 @@ function fn(t, {
|
|
|
1232
1239
|
// This is object creation, which we try to avoid per-frame.
|
|
1233
1240
|
...c
|
|
1234
1241
|
}, u, d) {
|
|
1235
|
-
if (
|
|
1242
|
+
if (dn(t, c, d), u) {
|
|
1236
1243
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
1237
1244
|
return;
|
|
1238
1245
|
}
|
|
@@ -1240,15 +1247,15 @@ function fn(t, {
|
|
|
1240
1247
|
const { attrs: h, style: f, dimensions: m } = t;
|
|
1241
1248
|
h.transform && (m && (f.transform = h.transform), delete h.transform), m && (i !== void 0 || r !== void 0 || f.transform) && (f.transformOrigin = hl(m, i !== void 0 ? i : 0.5, r !== void 0 ? r : 0.5)), e !== void 0 && (h.x = e), n !== void 0 && (h.y = n), s !== void 0 && (h.scale = s), o !== void 0 && dl(h, o, a, l, !1);
|
|
1242
1249
|
}
|
|
1243
|
-
const
|
|
1250
|
+
const fn = () => ({
|
|
1244
1251
|
style: {},
|
|
1245
1252
|
transform: {},
|
|
1246
1253
|
transformOrigin: {},
|
|
1247
1254
|
vars: {}
|
|
1248
1255
|
}), Li = () => ({
|
|
1249
|
-
...
|
|
1256
|
+
...fn(),
|
|
1250
1257
|
attrs: {}
|
|
1251
|
-
}),
|
|
1258
|
+
}), pn = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
1252
1259
|
function Ni(t, { style: e, vars: n }, s, i) {
|
|
1253
1260
|
Object.assign(t.style, e, i && i.getProjectionStyles(s));
|
|
1254
1261
|
for (const r in n)
|
|
@@ -1282,7 +1289,7 @@ const Fi = /* @__PURE__ */ new Set([
|
|
|
1282
1289
|
function Bi(t, e, n, s) {
|
|
1283
1290
|
Ni(t, e, void 0, s);
|
|
1284
1291
|
for (const i in e.attrs)
|
|
1285
|
-
t.setAttribute(Fi.has(i) ? i :
|
|
1292
|
+
t.setAttribute(Fi.has(i) ? i : on(i), e.attrs[i]);
|
|
1286
1293
|
}
|
|
1287
1294
|
const ne = {};
|
|
1288
1295
|
function fl(t) {
|
|
@@ -1291,7 +1298,7 @@ function fl(t) {
|
|
|
1291
1298
|
function Ii(t, { layout: e, layoutId: n }) {
|
|
1292
1299
|
return pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!ne[t] || t === "opacity");
|
|
1293
1300
|
}
|
|
1294
|
-
function
|
|
1301
|
+
function mn(t, e, n) {
|
|
1295
1302
|
var s;
|
|
1296
1303
|
const { style: i } = t, r = {};
|
|
1297
1304
|
for (const o in i)
|
|
@@ -1299,7 +1306,7 @@ function gn(t, e, n) {
|
|
|
1299
1306
|
return r;
|
|
1300
1307
|
}
|
|
1301
1308
|
function ji(t, e, n) {
|
|
1302
|
-
const s =
|
|
1309
|
+
const s = mn(t, e, n);
|
|
1303
1310
|
for (const i in t)
|
|
1304
1311
|
if (I(t[i]) || I(e[i])) {
|
|
1305
1312
|
const r = At.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
@@ -1344,15 +1351,15 @@ const qn = ["x", "y", "width", "height", "cx", "cy", "r"], ml = {
|
|
|
1344
1351
|
}
|
|
1345
1352
|
o && M.read(() => {
|
|
1346
1353
|
pl(n, s), M.render(() => {
|
|
1347
|
-
|
|
1354
|
+
hn(s, i, pn(n.tagName), t.transformTemplate), Bi(n, s);
|
|
1348
1355
|
});
|
|
1349
1356
|
});
|
|
1350
1357
|
}
|
|
1351
1358
|
})
|
|
1352
1359
|
}, gl = {
|
|
1353
1360
|
useVisualState: Di({
|
|
1354
|
-
scrapeMotionValuesFromProps:
|
|
1355
|
-
createRenderState:
|
|
1361
|
+
scrapeMotionValuesFromProps: mn,
|
|
1362
|
+
createRenderState: fn
|
|
1356
1363
|
})
|
|
1357
1364
|
};
|
|
1358
1365
|
function Oi(t, e, n) {
|
|
@@ -1361,8 +1368,8 @@ function Oi(t, e, n) {
|
|
|
1361
1368
|
}
|
|
1362
1369
|
function yl({ transformTemplate: t }, e) {
|
|
1363
1370
|
return Y(() => {
|
|
1364
|
-
const n =
|
|
1365
|
-
return
|
|
1371
|
+
const n = fn();
|
|
1372
|
+
return dn(n, e, t), Object.assign({}, n.vars, n.style);
|
|
1366
1373
|
}, [e]);
|
|
1367
1374
|
}
|
|
1368
1375
|
function vl(t, e) {
|
|
@@ -1376,7 +1383,7 @@ function wl(t, e) {
|
|
|
1376
1383
|
function xl(t, e, n, s) {
|
|
1377
1384
|
const i = Y(() => {
|
|
1378
1385
|
const r = Li();
|
|
1379
|
-
return
|
|
1386
|
+
return hn(r, e, pn(s), t.transformTemplate), {
|
|
1380
1387
|
...r.attrs,
|
|
1381
1388
|
style: { ...r.style }
|
|
1382
1389
|
};
|
|
@@ -1389,7 +1396,7 @@ function xl(t, e, n, s) {
|
|
|
1389
1396
|
}
|
|
1390
1397
|
function bl(t = !1) {
|
|
1391
1398
|
return (n, s, i, { latestValues: r }, o) => {
|
|
1392
|
-
const l = (
|
|
1399
|
+
const l = (an(n) ? xl : wl)(s, r, o, n), c = Ba(s, typeof n == "string", t), u = n !== le ? { ...c, ...l, ref: i } : {}, { children: d } = s, h = Y(() => I(d) ? d.get() : d, [d]);
|
|
1393
1400
|
return ir(n, {
|
|
1394
1401
|
...u,
|
|
1395
1402
|
children: h
|
|
@@ -1399,7 +1406,7 @@ function bl(t = !1) {
|
|
|
1399
1406
|
function Tl(t, e) {
|
|
1400
1407
|
return function(s, { forwardMotionProps: i } = { forwardMotionProps: !1 }) {
|
|
1401
1408
|
const o = {
|
|
1402
|
-
...
|
|
1409
|
+
...an(s) ? ml : gl,
|
|
1403
1410
|
preloadedFeatures: t,
|
|
1404
1411
|
useRender: bl(i),
|
|
1405
1412
|
createVisualElement: e,
|
|
@@ -1421,9 +1428,9 @@ function Ui(t, e) {
|
|
|
1421
1428
|
}
|
|
1422
1429
|
function ge(t, e, n) {
|
|
1423
1430
|
const s = t.getProps();
|
|
1424
|
-
return
|
|
1431
|
+
return ln(s, e, n !== void 0 ? n : s.custom, t);
|
|
1425
1432
|
}
|
|
1426
|
-
function
|
|
1433
|
+
function gn(t, e) {
|
|
1427
1434
|
return t ? t[e] || t.default || t : void 0;
|
|
1428
1435
|
}
|
|
1429
1436
|
const _i = /* @__PURE__ */ new Set([
|
|
@@ -1445,19 +1452,19 @@ const z = {
|
|
|
1445
1452
|
Qt = t, queueMicrotask(Pl);
|
|
1446
1453
|
}
|
|
1447
1454
|
};
|
|
1448
|
-
function
|
|
1455
|
+
function yn(t, e) {
|
|
1449
1456
|
t.indexOf(e) === -1 && t.push(e);
|
|
1450
1457
|
}
|
|
1451
|
-
function
|
|
1458
|
+
function vn(t, e) {
|
|
1452
1459
|
const n = t.indexOf(e);
|
|
1453
1460
|
n > -1 && t.splice(n, 1);
|
|
1454
1461
|
}
|
|
1455
|
-
class
|
|
1462
|
+
class wn {
|
|
1456
1463
|
constructor() {
|
|
1457
1464
|
this.subscriptions = [];
|
|
1458
1465
|
}
|
|
1459
1466
|
add(e) {
|
|
1460
|
-
return
|
|
1467
|
+
return yn(this.subscriptions, e), () => vn(this.subscriptions, e);
|
|
1461
1468
|
}
|
|
1462
1469
|
notify(e, n, s) {
|
|
1463
1470
|
const i = this.subscriptions.length;
|
|
@@ -1546,7 +1553,7 @@ class Cl {
|
|
|
1546
1553
|
return process.env.NODE_ENV !== "production" && he(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
1547
1554
|
}
|
|
1548
1555
|
on(e, n) {
|
|
1549
|
-
this.events[e] || (this.events[e] = new
|
|
1556
|
+
this.events[e] || (this.events[e] = new wn());
|
|
1550
1557
|
const s = this.events[e].add(n);
|
|
1551
1558
|
return e === "change" ? () => {
|
|
1552
1559
|
s(), M.read(() => {
|
|
@@ -1693,7 +1700,7 @@ function Vl(t, e) {
|
|
|
1693
1700
|
function Ml(t) {
|
|
1694
1701
|
return !!(I(t) && t.add);
|
|
1695
1702
|
}
|
|
1696
|
-
function
|
|
1703
|
+
function Be(t, e) {
|
|
1697
1704
|
const n = t.getValue("willChange");
|
|
1698
1705
|
if (Ml(n))
|
|
1699
1706
|
return n.add(e);
|
|
@@ -1702,11 +1709,11 @@ function $i(t) {
|
|
|
1702
1709
|
return t.props[Ai];
|
|
1703
1710
|
}
|
|
1704
1711
|
// @__NO_SIDE_EFFECTS__
|
|
1705
|
-
function
|
|
1712
|
+
function xn(t) {
|
|
1706
1713
|
let e;
|
|
1707
1714
|
return () => (e === void 0 && (e = t()), e);
|
|
1708
1715
|
}
|
|
1709
|
-
const Dl = /* @__PURE__ */
|
|
1716
|
+
const Dl = /* @__PURE__ */ xn(() => window.ScrollTimeline !== void 0);
|
|
1710
1717
|
class kl {
|
|
1711
1718
|
constructor(e) {
|
|
1712
1719
|
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
|
|
@@ -1783,17 +1790,17 @@ class El extends kl {
|
|
|
1783
1790
|
}
|
|
1784
1791
|
}
|
|
1785
1792
|
const G = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, X = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
|
|
1786
|
-
function
|
|
1793
|
+
function bn(t) {
|
|
1787
1794
|
return typeof t == "function";
|
|
1788
1795
|
}
|
|
1789
1796
|
function Yn(t, e) {
|
|
1790
1797
|
t.timeline = e, t.onfinish = null;
|
|
1791
1798
|
}
|
|
1792
|
-
const
|
|
1799
|
+
const Tn = (t) => Array.isArray(t) && typeof t[0] == "number", Rl = {
|
|
1793
1800
|
linearEasing: void 0
|
|
1794
1801
|
};
|
|
1795
1802
|
function Ll(t, e) {
|
|
1796
|
-
const n = /* @__PURE__ */
|
|
1803
|
+
const n = /* @__PURE__ */ xn(t);
|
|
1797
1804
|
return () => {
|
|
1798
1805
|
var s;
|
|
1799
1806
|
return (s = Rl[e]) !== null && s !== void 0 ? s : n();
|
|
@@ -1817,9 +1824,9 @@ const se = /* @__PURE__ */ Ll(() => {
|
|
|
1817
1824
|
return `linear(${s.substring(0, s.length - 2)})`;
|
|
1818
1825
|
};
|
|
1819
1826
|
function Hi(t) {
|
|
1820
|
-
return !!(typeof t == "function" && se() || !t || typeof t == "string" && (t in
|
|
1827
|
+
return !!(typeof t == "function" && se() || !t || typeof t == "string" && (t in Ie || se()) || Tn(t) || Array.isArray(t) && t.every(Hi));
|
|
1821
1828
|
}
|
|
1822
|
-
const Dt = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`,
|
|
1829
|
+
const Dt = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, Ie = {
|
|
1823
1830
|
linear: "linear",
|
|
1824
1831
|
ease: "ease",
|
|
1825
1832
|
easeIn: "ease-in",
|
|
@@ -1832,7 +1839,7 @@ const Dt = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, je = {
|
|
|
1832
1839
|
};
|
|
1833
1840
|
function zi(t, e) {
|
|
1834
1841
|
if (t)
|
|
1835
|
-
return typeof t == "function" && se() ? Ki(t, e) :
|
|
1842
|
+
return typeof t == "function" && se() ? Ki(t, e) : Tn(t) ? Dt(t) : Array.isArray(t) ? t.map((n) => zi(n, e) || Ie.easeOut) : Ie[t];
|
|
1836
1843
|
}
|
|
1837
1844
|
const Gi = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Nl = 1e-7, Fl = 12;
|
|
1838
1845
|
function Bl(t, e, n, s, i) {
|
|
@@ -1848,31 +1855,31 @@ function Kt(t, e, n, s) {
|
|
|
1848
1855
|
const i = (r) => Bl(r, 0, 1, t, n);
|
|
1849
1856
|
return (r) => r === 0 || r === 1 ? r : Gi(i(r), e, s);
|
|
1850
1857
|
}
|
|
1851
|
-
const qi = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Xi = (t) => (e) => 1 - t(1 - e), Yi = /* @__PURE__ */ Kt(0.33, 1.53, 0.69, 0.99),
|
|
1858
|
+
const qi = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Xi = (t) => (e) => 1 - t(1 - e), Yi = /* @__PURE__ */ Kt(0.33, 1.53, 0.69, 0.99), Pn = /* @__PURE__ */ Xi(Yi), Zi = /* @__PURE__ */ qi(Pn), Ji = (t) => (t *= 2) < 1 ? 0.5 * Pn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Sn = (t) => 1 - Math.sin(Math.acos(t)), Qi = Xi(Sn), to = qi(Sn), eo = (t) => /^0[^.\s]+$/u.test(t);
|
|
1852
1859
|
function Il(t) {
|
|
1853
1860
|
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || eo(t) : !0;
|
|
1854
1861
|
}
|
|
1855
|
-
const Rt = (t) => Math.round(t * 1e5) / 1e5,
|
|
1862
|
+
const Rt = (t) => Math.round(t * 1e5) / 1e5, Cn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
1856
1863
|
function jl(t) {
|
|
1857
1864
|
return t == null;
|
|
1858
1865
|
}
|
|
1859
|
-
const Ol = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,
|
|
1866
|
+
const Ol = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, An = (t, e) => (n) => !!(typeof n == "string" && Ol.test(n) && n.startsWith(t) || e && !jl(n) && Object.prototype.hasOwnProperty.call(n, e)), no = (t, e, n) => (s) => {
|
|
1860
1867
|
if (typeof s != "string")
|
|
1861
1868
|
return s;
|
|
1862
|
-
const [i, r, o, a] = s.match(
|
|
1869
|
+
const [i, r, o, a] = s.match(Cn);
|
|
1863
1870
|
return {
|
|
1864
1871
|
[t]: parseFloat(i),
|
|
1865
1872
|
[e]: parseFloat(r),
|
|
1866
1873
|
[n]: parseFloat(o),
|
|
1867
1874
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
1868
1875
|
};
|
|
1869
|
-
}, Ul = (t) => Z(0, 255, t),
|
|
1876
|
+
}, Ul = (t) => Z(0, 255, t), be = {
|
|
1870
1877
|
...Vt,
|
|
1871
1878
|
transform: (t) => Math.round(Ul(t))
|
|
1872
1879
|
}, ct = {
|
|
1873
|
-
test: /* @__PURE__ */
|
|
1880
|
+
test: /* @__PURE__ */ An("rgb", "red"),
|
|
1874
1881
|
parse: /* @__PURE__ */ no("red", "green", "blue"),
|
|
1875
|
-
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" +
|
|
1882
|
+
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + be.transform(t) + ", " + be.transform(e) + ", " + be.transform(n) + ", " + Rt(It.transform(s)) + ")"
|
|
1876
1883
|
};
|
|
1877
1884
|
function _l(t) {
|
|
1878
1885
|
let e = "", n = "", s = "", i = "";
|
|
@@ -1883,22 +1890,22 @@ function _l(t) {
|
|
|
1883
1890
|
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
1884
1891
|
};
|
|
1885
1892
|
}
|
|
1886
|
-
const
|
|
1887
|
-
test: /* @__PURE__ */
|
|
1893
|
+
const je = {
|
|
1894
|
+
test: /* @__PURE__ */ An("#"),
|
|
1888
1895
|
parse: _l,
|
|
1889
1896
|
transform: ct.transform
|
|
1890
1897
|
}, gt = {
|
|
1891
|
-
test: /* @__PURE__ */
|
|
1898
|
+
test: /* @__PURE__ */ An("hsl", "hue"),
|
|
1892
1899
|
parse: /* @__PURE__ */ no("hue", "saturation", "lightness"),
|
|
1893
1900
|
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + H.transform(Rt(e)) + ", " + H.transform(Rt(n)) + ", " + Rt(It.transform(s)) + ")"
|
|
1894
1901
|
}, F = {
|
|
1895
|
-
test: (t) => ct.test(t) ||
|
|
1896
|
-
parse: (t) => ct.test(t) ? ct.parse(t) : gt.test(t) ? gt.parse(t) :
|
|
1902
|
+
test: (t) => ct.test(t) || je.test(t) || gt.test(t),
|
|
1903
|
+
parse: (t) => ct.test(t) ? ct.parse(t) : gt.test(t) ? gt.parse(t) : je.parse(t),
|
|
1897
1904
|
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? ct.transform(t) : gt.transform(t)
|
|
1898
1905
|
}, Wl = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
1899
1906
|
function $l(t) {
|
|
1900
1907
|
var e, n;
|
|
1901
|
-
return isNaN(t) && typeof t == "string" && (((e = t.match(
|
|
1908
|
+
return isNaN(t) && typeof t == "string" && (((e = t.match(Cn)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(Wl)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
1902
1909
|
}
|
|
1903
1910
|
const so = "number", io = "color", Kl = "var", Hl = "var(", Zn = "${}", zl = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
1904
1911
|
function Ot(t) {
|
|
@@ -1941,21 +1948,21 @@ function Yl(t) {
|
|
|
1941
1948
|
const [e, n] = t.slice(0, -1).split("(");
|
|
1942
1949
|
if (e === "drop-shadow")
|
|
1943
1950
|
return t;
|
|
1944
|
-
const [s] = n.match(
|
|
1951
|
+
const [s] = n.match(Cn) || [];
|
|
1945
1952
|
if (!s)
|
|
1946
1953
|
return t;
|
|
1947
1954
|
const i = n.replace(s, "");
|
|
1948
1955
|
let r = Xl.has(e) ? 1 : 0;
|
|
1949
1956
|
return s !== n && (r *= 100), e + "(" + r + i + ")";
|
|
1950
1957
|
}
|
|
1951
|
-
const Zl = /\b([a-z-]*)\(.*?\)/gu,
|
|
1958
|
+
const Zl = /\b([a-z-]*)\(.*?\)/gu, Oe = {
|
|
1952
1959
|
...st,
|
|
1953
1960
|
getAnimatableNone: (t) => {
|
|
1954
1961
|
const e = t.match(Zl);
|
|
1955
1962
|
return e ? e.map(Yl).join(" ") : t;
|
|
1956
1963
|
}
|
|
1957
1964
|
}, Jl = {
|
|
1958
|
-
...
|
|
1965
|
+
...un,
|
|
1959
1966
|
// Color props
|
|
1960
1967
|
color: F,
|
|
1961
1968
|
backgroundColor: F,
|
|
@@ -1968,12 +1975,12 @@ const Zl = /\b([a-z-]*)\(.*?\)/gu, Ue = {
|
|
|
1968
1975
|
borderRightColor: F,
|
|
1969
1976
|
borderBottomColor: F,
|
|
1970
1977
|
borderLeftColor: F,
|
|
1971
|
-
filter:
|
|
1972
|
-
WebkitFilter:
|
|
1973
|
-
},
|
|
1978
|
+
filter: Oe,
|
|
1979
|
+
WebkitFilter: Oe
|
|
1980
|
+
}, Vn = (t) => Jl[t];
|
|
1974
1981
|
function ao(t, e) {
|
|
1975
|
-
let n =
|
|
1976
|
-
return n !==
|
|
1982
|
+
let n = Vn(t);
|
|
1983
|
+
return n !== Oe && (n = st), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
1977
1984
|
}
|
|
1978
1985
|
const Ql = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1979
1986
|
function tc(t, e, n) {
|
|
@@ -2019,9 +2026,9 @@ const Tt = {
|
|
|
2019
2026
|
Tt.translateX = Tt.x;
|
|
2020
2027
|
Tt.translateY = Tt.y;
|
|
2021
2028
|
const dt = /* @__PURE__ */ new Set();
|
|
2022
|
-
let
|
|
2029
|
+
let Ue = !1, _e = !1;
|
|
2023
2030
|
function lo() {
|
|
2024
|
-
if (
|
|
2031
|
+
if (_e) {
|
|
2025
2032
|
const t = Array.from(dt).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
2026
2033
|
e.forEach((s) => {
|
|
2027
2034
|
const i = sc(s);
|
|
@@ -2037,22 +2044,22 @@ function lo() {
|
|
|
2037
2044
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
2038
2045
|
});
|
|
2039
2046
|
}
|
|
2040
|
-
|
|
2047
|
+
_e = !1, Ue = !1, dt.forEach((t) => t.complete()), dt.clear();
|
|
2041
2048
|
}
|
|
2042
2049
|
function co() {
|
|
2043
2050
|
dt.forEach((t) => {
|
|
2044
|
-
t.readKeyframes(), t.needsMeasurement && (
|
|
2051
|
+
t.readKeyframes(), t.needsMeasurement && (_e = !0);
|
|
2045
2052
|
});
|
|
2046
2053
|
}
|
|
2047
2054
|
function ic() {
|
|
2048
2055
|
co(), lo();
|
|
2049
2056
|
}
|
|
2050
|
-
class
|
|
2057
|
+
class Mn {
|
|
2051
2058
|
constructor(e, n, s, i, r, o = !1) {
|
|
2052
2059
|
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
|
|
2053
2060
|
}
|
|
2054
2061
|
scheduleResolve() {
|
|
2055
|
-
this.isScheduled = !0, this.isAsync ? (dt.add(this),
|
|
2062
|
+
this.isScheduled = !0, this.isAsync ? (dt.add(this), Ue || (Ue = !0, M.read(co), M.resolveKeyframes(lo))) : (this.readKeyframes(), this.complete());
|
|
2056
2063
|
}
|
|
2057
2064
|
readKeyframes() {
|
|
2058
2065
|
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
@@ -2110,13 +2117,13 @@ function ho(t, e, n = 1) {
|
|
|
2110
2117
|
const o = r.trim();
|
|
2111
2118
|
return uo(o) ? parseFloat(o) : o;
|
|
2112
2119
|
}
|
|
2113
|
-
return
|
|
2120
|
+
return cn(i) ? ho(i, e, n + 1) : i;
|
|
2114
2121
|
}
|
|
2115
2122
|
const fo = (t) => (e) => e.test(t), lc = {
|
|
2116
2123
|
test: (t) => t === "auto",
|
|
2117
2124
|
parse: (t) => t
|
|
2118
2125
|
}, po = [Vt, T, H, Q, sl, nl, lc], es = (t) => po.find(fo(t));
|
|
2119
|
-
class mo extends
|
|
2126
|
+
class mo extends Mn {
|
|
2120
2127
|
constructor(e, n, s, i, r) {
|
|
2121
2128
|
super(e, n, s, i, r, !0);
|
|
2122
2129
|
}
|
|
@@ -2127,7 +2134,7 @@ class mo extends Dn {
|
|
|
2127
2134
|
super.readKeyframes();
|
|
2128
2135
|
for (let l = 0; l < e.length; l++) {
|
|
2129
2136
|
let c = e[l];
|
|
2130
|
-
if (typeof c == "string" && (c = c.trim(),
|
|
2137
|
+
if (typeof c == "string" && (c = c.trim(), cn(c))) {
|
|
2131
2138
|
const u = ho(c, n.current);
|
|
2132
2139
|
u !== void 0 && (e[l] = u), l === e.length - 1 && (this.finalKeyframe = c);
|
|
2133
2140
|
}
|
|
@@ -2189,7 +2196,7 @@ function uc(t, e, n, s) {
|
|
|
2189
2196
|
if (e === "display" || e === "visibility")
|
|
2190
2197
|
return !0;
|
|
2191
2198
|
const r = t[t.length - 1], o = ns(i, e), a = ns(r, e);
|
|
2192
|
-
return Ct(o === a, `You are trying to animate ${e} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !o || !a ? !1 : cc(t) || (n === "spring" ||
|
|
2199
|
+
return Ct(o === a, `You are trying to animate ${e} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !o || !a ? !1 : cc(t) || (n === "spring" || bn(n)) && s;
|
|
2193
2200
|
}
|
|
2194
2201
|
const dc = (t) => t !== null;
|
|
2195
2202
|
function ye(t, { repeat: e, repeatType: n = "loop" }, s) {
|
|
@@ -2271,17 +2278,17 @@ class go {
|
|
|
2271
2278
|
});
|
|
2272
2279
|
}
|
|
2273
2280
|
}
|
|
2274
|
-
const
|
|
2281
|
+
const We = 2e4;
|
|
2275
2282
|
function yo(t) {
|
|
2276
2283
|
let e = 0;
|
|
2277
2284
|
const n = 50;
|
|
2278
2285
|
let s = t.next(e);
|
|
2279
|
-
for (; !s.done && e <
|
|
2286
|
+
for (; !s.done && e < We; )
|
|
2280
2287
|
e += n, s = t.next(e);
|
|
2281
|
-
return e >=
|
|
2288
|
+
return e >= We ? 1 / 0 : e;
|
|
2282
2289
|
}
|
|
2283
2290
|
const k = (t, e, n) => t + (e - t) * n;
|
|
2284
|
-
function
|
|
2291
|
+
function Te(t, e, n) {
|
|
2285
2292
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
|
|
2286
2293
|
}
|
|
2287
2294
|
function fc({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
@@ -2291,7 +2298,7 @@ function fc({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
2291
2298
|
i = r = o = n;
|
|
2292
2299
|
else {
|
|
2293
2300
|
const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
|
|
2294
|
-
i =
|
|
2301
|
+
i = Te(l, a, t + 1 / 3), r = Te(l, a, t), o = Te(l, a, t - 1 / 3);
|
|
2295
2302
|
}
|
|
2296
2303
|
return {
|
|
2297
2304
|
red: Math.round(i * 255),
|
|
@@ -2303,10 +2310,10 @@ function fc({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
2303
2310
|
function ie(t, e) {
|
|
2304
2311
|
return (n) => n > 0 ? e : t;
|
|
2305
2312
|
}
|
|
2306
|
-
const
|
|
2313
|
+
const Pe = (t, e, n) => {
|
|
2307
2314
|
const s = t * t, i = n * (e * e - s) + s;
|
|
2308
2315
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
2309
|
-
}, pc = [
|
|
2316
|
+
}, pc = [je, ct, gt], mc = (t) => pc.find((e) => e.test(t));
|
|
2310
2317
|
function ss(t) {
|
|
2311
2318
|
const e = mc(t);
|
|
2312
2319
|
if (Ct(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
|
|
@@ -2319,19 +2326,19 @@ const is = (t, e) => {
|
|
|
2319
2326
|
if (!n || !s)
|
|
2320
2327
|
return ie(t, e);
|
|
2321
2328
|
const i = { ...n };
|
|
2322
|
-
return (r) => (i.red =
|
|
2323
|
-
}, gc = (t, e) => (n) => e(t(n)), Ht = (...t) => t.reduce(gc),
|
|
2329
|
+
return (r) => (i.red = Pe(n.red, s.red, r), i.green = Pe(n.green, s.green, r), i.blue = Pe(n.blue, s.blue, r), i.alpha = k(n.alpha, s.alpha, r), ct.transform(i));
|
|
2330
|
+
}, gc = (t, e) => (n) => e(t(n)), Ht = (...t) => t.reduce(gc), $e = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
2324
2331
|
function yc(t, e) {
|
|
2325
|
-
return
|
|
2332
|
+
return $e.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
2326
2333
|
}
|
|
2327
2334
|
function vc(t, e) {
|
|
2328
2335
|
return (n) => k(t, e, n);
|
|
2329
2336
|
}
|
|
2330
|
-
function
|
|
2331
|
-
return typeof t == "number" ? vc : typeof t == "string" ?
|
|
2337
|
+
function Dn(t) {
|
|
2338
|
+
return typeof t == "number" ? vc : typeof t == "string" ? cn(t) ? ie : F.test(t) ? is : bc : Array.isArray(t) ? vo : typeof t == "object" ? F.test(t) ? is : wc : ie;
|
|
2332
2339
|
}
|
|
2333
2340
|
function vo(t, e) {
|
|
2334
|
-
const n = [...t], s = n.length, i = t.map((r, o) =>
|
|
2341
|
+
const n = [...t], s = n.length, i = t.map((r, o) => Dn(r)(r, e[o]));
|
|
2335
2342
|
return (r) => {
|
|
2336
2343
|
for (let o = 0; o < s; o++)
|
|
2337
2344
|
n[o] = i[o](r);
|
|
@@ -2341,7 +2348,7 @@ function vo(t, e) {
|
|
|
2341
2348
|
function wc(t, e) {
|
|
2342
2349
|
const n = { ...t, ...e }, s = {};
|
|
2343
2350
|
for (const i in n)
|
|
2344
|
-
t[i] !== void 0 && e[i] !== void 0 && (s[i] =
|
|
2351
|
+
t[i] !== void 0 && e[i] !== void 0 && (s[i] = Dn(t[i])(t[i], e[i]));
|
|
2345
2352
|
return (i) => {
|
|
2346
2353
|
for (const r in s)
|
|
2347
2354
|
n[r] = s[r](i);
|
|
@@ -2359,10 +2366,10 @@ function xc(t, e) {
|
|
|
2359
2366
|
}
|
|
2360
2367
|
const bc = (t, e) => {
|
|
2361
2368
|
const n = st.createTransformer(e), s = Ot(t), i = Ot(e);
|
|
2362
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ?
|
|
2369
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? $e.has(t) && !i.values.length || $e.has(e) && !s.values.length ? yc(t, e) : Ht(vo(xc(s, i), i.values), n) : (Ct(!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.`), ie(t, e));
|
|
2363
2370
|
};
|
|
2364
2371
|
function wo(t, e, n) {
|
|
2365
|
-
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? k(t, e, n) :
|
|
2372
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? k(t, e, n) : Dn(t)(t, e);
|
|
2366
2373
|
}
|
|
2367
2374
|
const Tc = 5;
|
|
2368
2375
|
function xo(t, e, n) {
|
|
@@ -2397,20 +2404,20 @@ const D = {
|
|
|
2397
2404
|
// in seconds
|
|
2398
2405
|
minDamping: 0.05,
|
|
2399
2406
|
maxDamping: 1
|
|
2400
|
-
},
|
|
2407
|
+
}, Se = 1e-3;
|
|
2401
2408
|
function Pc({ duration: t = D.duration, bounce: e = D.bounce, velocity: n = D.velocity, mass: s = D.mass }) {
|
|
2402
2409
|
let i, r;
|
|
2403
2410
|
Ct(t <= /* @__PURE__ */ G(D.maxDuration), "Spring duration must be 10 seconds or less");
|
|
2404
2411
|
let o = 1 - e;
|
|
2405
2412
|
o = Z(D.minDamping, D.maxDamping, o), t = Z(D.minDuration, D.maxDuration, /* @__PURE__ */ X(t)), o < 1 ? (i = (c) => {
|
|
2406
|
-
const u = c * o, d = u * t, h = u - n, f =
|
|
2407
|
-
return
|
|
2413
|
+
const u = c * o, d = u * t, h = u - n, f = Ke(c, o), m = Math.exp(-d);
|
|
2414
|
+
return Se - h / f * m;
|
|
2408
2415
|
}, r = (c) => {
|
|
2409
|
-
const d = c * o * t, h = d * n + n, f = Math.pow(o, 2) * Math.pow(c, 2) * t, m = Math.exp(-d), y =
|
|
2410
|
-
return (-i(c) +
|
|
2416
|
+
const d = c * o * t, h = d * n + n, f = Math.pow(o, 2) * Math.pow(c, 2) * t, m = Math.exp(-d), y = Ke(Math.pow(c, 2), o);
|
|
2417
|
+
return (-i(c) + Se > 0 ? -1 : 1) * ((h - f) * m) / y;
|
|
2411
2418
|
}) : (i = (c) => {
|
|
2412
2419
|
const u = Math.exp(-c * t), d = (c - n) * t + 1;
|
|
2413
|
-
return -
|
|
2420
|
+
return -Se + u * d;
|
|
2414
2421
|
}, r = (c) => {
|
|
2415
2422
|
const u = Math.exp(-c * t), d = (n - c) * (t * t);
|
|
2416
2423
|
return u * d;
|
|
@@ -2438,7 +2445,7 @@ function Cc(t, e, n) {
|
|
|
2438
2445
|
s = s - t(s) / e(s);
|
|
2439
2446
|
return s;
|
|
2440
2447
|
}
|
|
2441
|
-
function
|
|
2448
|
+
function Ke(t, e) {
|
|
2442
2449
|
return t * Math.sqrt(1 - e * e);
|
|
2443
2450
|
}
|
|
2444
2451
|
const Ac = ["duration", "bounce"], Vc = ["stiffness", "damping", "mass"];
|
|
@@ -2487,7 +2494,7 @@ function bo(t = D.visualDuration, e = D.bounce) {
|
|
|
2487
2494
|
s || (s = v ? D.restSpeed.granular : D.restSpeed.default), i || (i = v ? D.restDelta.granular : D.restDelta.default);
|
|
2488
2495
|
let w;
|
|
2489
2496
|
if (y < 1) {
|
|
2490
|
-
const b =
|
|
2497
|
+
const b = Ke(p, y);
|
|
2491
2498
|
w = (V) => {
|
|
2492
2499
|
const R = Math.exp(-y * p * V);
|
|
2493
2500
|
return o - R * ((m + y * p * g) / b * Math.sin(b * V) + g * Math.cos(b * V));
|
|
@@ -2516,7 +2523,7 @@ function bo(t = D.visualDuration, e = D.bounce) {
|
|
|
2516
2523
|
return a.value = a.done ? o : V, a;
|
|
2517
2524
|
},
|
|
2518
2525
|
toString: () => {
|
|
2519
|
-
const b = Math.min(yo(S),
|
|
2526
|
+
const b = Math.min(yo(S), We), V = Ki((R) => S.next(b * R).value, b, 30);
|
|
2520
2527
|
return b + "ms " + V;
|
|
2521
2528
|
}
|
|
2522
2529
|
};
|
|
@@ -2559,15 +2566,15 @@ const Dc = /* @__PURE__ */ Kt(0.42, 0, 1, 1), kc = /* @__PURE__ */ Kt(0, 0, 0.58
|
|
|
2559
2566
|
easeIn: Dc,
|
|
2560
2567
|
easeInOut: To,
|
|
2561
2568
|
easeOut: kc,
|
|
2562
|
-
circIn:
|
|
2569
|
+
circIn: Sn,
|
|
2563
2570
|
circInOut: to,
|
|
2564
2571
|
circOut: Qi,
|
|
2565
|
-
backIn:
|
|
2572
|
+
backIn: Pn,
|
|
2566
2573
|
backInOut: Zi,
|
|
2567
2574
|
backOut: Yi,
|
|
2568
2575
|
anticipate: Ji
|
|
2569
2576
|
}, ls = (t) => {
|
|
2570
|
-
if (
|
|
2577
|
+
if (Tn(t)) {
|
|
2571
2578
|
et(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
2572
2579
|
const [e, n, s, i] = t;
|
|
2573
2580
|
return Kt(e, n, s, i);
|
|
@@ -2659,7 +2666,7 @@ const jc = (t) => {
|
|
|
2659
2666
|
keyframes: oe,
|
|
2660
2667
|
spring: bo
|
|
2661
2668
|
}, Uc = (t) => t / 100;
|
|
2662
|
-
class
|
|
2669
|
+
class kn extends go {
|
|
2663
2670
|
constructor(e) {
|
|
2664
2671
|
super(e), this.holdTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.startTime = null, this.state = "idle", this.stop = () => {
|
|
2665
2672
|
if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle")
|
|
@@ -2668,14 +2675,14 @@ class En extends go {
|
|
|
2668
2675
|
const { onStop: l } = this.options;
|
|
2669
2676
|
l && l();
|
|
2670
2677
|
};
|
|
2671
|
-
const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = i?.KeyframeResolver ||
|
|
2678
|
+
const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = i?.KeyframeResolver || Mn, a = (l, c) => this.onKeyframesResolved(l, c);
|
|
2672
2679
|
this.resolver = new o(r, a, n, s, i), this.resolver.scheduleResolve();
|
|
2673
2680
|
}
|
|
2674
2681
|
flatten() {
|
|
2675
2682
|
super.flatten(), this._resolved && Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
|
|
2676
2683
|
}
|
|
2677
2684
|
initPlayback(e) {
|
|
2678
|
-
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a =
|
|
2685
|
+
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a = bn(n) ? n : Oc[n] || oe;
|
|
2679
2686
|
let l, c;
|
|
2680
2687
|
a !== oe && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && et(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = Ht(Uc, wo(e[0], e[1])), e = [0, 100]);
|
|
2681
2688
|
const u = a({ ...this.options, keyframes: e });
|
|
@@ -2804,12 +2811,12 @@ function Wc(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatTyp
|
|
|
2804
2811
|
direction: o === "reverse" ? "alternate" : "normal"
|
|
2805
2812
|
});
|
|
2806
2813
|
}
|
|
2807
|
-
const $c = /* @__PURE__ */
|
|
2814
|
+
const $c = /* @__PURE__ */ xn(() => Object.hasOwnProperty.call(Element.prototype, "animate")), re = 10, Kc = 2e4;
|
|
2808
2815
|
function Hc(t) {
|
|
2809
|
-
return
|
|
2816
|
+
return bn(t.type) || t.type === "spring" || !Hi(t.ease);
|
|
2810
2817
|
}
|
|
2811
2818
|
function zc(t, e) {
|
|
2812
|
-
const n = new
|
|
2819
|
+
const n = new kn({
|
|
2813
2820
|
...e,
|
|
2814
2821
|
keyframes: t,
|
|
2815
2822
|
repeat: 0,
|
|
@@ -2955,7 +2962,7 @@ class cs extends go {
|
|
|
2955
2962
|
if (n.playState === "idle" || n.playState === "finished")
|
|
2956
2963
|
return;
|
|
2957
2964
|
if (this.time) {
|
|
2958
|
-
const { motionValue: c, onUpdate: u, onComplete: d, element: h, ...f } = this.options, m = new
|
|
2965
|
+
const { motionValue: c, onUpdate: u, onComplete: d, element: h, ...f } = this.options, m = new kn({
|
|
2959
2966
|
...f,
|
|
2960
2967
|
keyframes: s,
|
|
2961
2968
|
duration: i,
|
|
@@ -3010,8 +3017,8 @@ const qc = {
|
|
|
3010
3017
|
function Qc({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: c, ...u }) {
|
|
3011
3018
|
return !!Object.keys(u).length;
|
|
3012
3019
|
}
|
|
3013
|
-
const
|
|
3014
|
-
const a =
|
|
3020
|
+
const En = (t, e, n, s = {}, i, r) => (o) => {
|
|
3021
|
+
const a = gn(s, t) || {}, l = a.delay || s.delay || 0;
|
|
3015
3022
|
let { elapsed: c = 0 } = s;
|
|
3016
3023
|
c = c - /* @__PURE__ */ G(l);
|
|
3017
3024
|
let u = {
|
|
@@ -3042,7 +3049,7 @@ const Rn = (t, e, n, s = {}, i, r) => (o) => {
|
|
|
3042
3049
|
u.onUpdate(h), u.onComplete();
|
|
3043
3050
|
}), new El([]);
|
|
3044
3051
|
}
|
|
3045
|
-
return !r && cs.supports(u) ? new cs(u) : new
|
|
3052
|
+
return !r && cs.supports(u) ? new cs(u) : new kn(u);
|
|
3046
3053
|
};
|
|
3047
3054
|
function tu({ protectedKeys: t, needsAnimating: e }, n) {
|
|
3048
3055
|
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
@@ -3059,7 +3066,7 @@ function So(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
3059
3066
|
continue;
|
|
3060
3067
|
const m = {
|
|
3061
3068
|
delay: n,
|
|
3062
|
-
...
|
|
3069
|
+
...gn(o || {}, d)
|
|
3063
3070
|
};
|
|
3064
3071
|
let y = !1;
|
|
3065
3072
|
if (window.MotionHandoffAnimation) {
|
|
@@ -3069,7 +3076,7 @@ function So(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
3069
3076
|
v !== null && (m.startTime = v, y = !0);
|
|
3070
3077
|
}
|
|
3071
3078
|
}
|
|
3072
|
-
|
|
3079
|
+
Be(t, d), h.start(En(d, h, f, t.shouldReduceMotion && _i.has(d) ? { type: !1 } : m, t, y));
|
|
3073
3080
|
const g = h.animation;
|
|
3074
3081
|
g && c.push(g);
|
|
3075
3082
|
}
|
|
@@ -3079,7 +3086,7 @@ function So(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
3079
3086
|
});
|
|
3080
3087
|
}), c;
|
|
3081
3088
|
}
|
|
3082
|
-
function
|
|
3089
|
+
function He(t, e, n = {}) {
|
|
3083
3090
|
var s;
|
|
3084
3091
|
const i = ge(t, e, n.type === "exit" ? (s = t.presenceContext) === null || s === void 0 ? void 0 : s.custom : void 0);
|
|
3085
3092
|
let { transition: r = t.getDefaultTransition() || {} } = i || {};
|
|
@@ -3097,7 +3104,7 @@ function ze(t, e, n = {}) {
|
|
|
3097
3104
|
function eu(t, e, n = 0, s = 0, i = 1, r) {
|
|
3098
3105
|
const o = [], a = (t.variantChildren.size - 1) * s, l = i === 1 ? (c = 0) => c * s : (c = 0) => a - c * s;
|
|
3099
3106
|
return Array.from(t.variantChildren).sort(nu).forEach((c, u) => {
|
|
3100
|
-
c.notify("AnimationStart", e), o.push(
|
|
3107
|
+
c.notify("AnimationStart", e), o.push(He(c, e, {
|
|
3101
3108
|
...r,
|
|
3102
3109
|
delay: n + l(u)
|
|
3103
3110
|
}).then(() => c.notify("AnimationComplete", e)));
|
|
@@ -3110,10 +3117,10 @@ function su(t, e, n = {}) {
|
|
|
3110
3117
|
t.notify("AnimationStart", e);
|
|
3111
3118
|
let s;
|
|
3112
3119
|
if (Array.isArray(e)) {
|
|
3113
|
-
const i = e.map((r) =>
|
|
3120
|
+
const i = e.map((r) => He(t, r, n));
|
|
3114
3121
|
s = Promise.all(i);
|
|
3115
3122
|
} else if (typeof e == "string")
|
|
3116
|
-
s =
|
|
3123
|
+
s = He(t, e, n);
|
|
3117
3124
|
else {
|
|
3118
3125
|
const i = typeof e == "function" ? ge(t, e, n.custom) : e;
|
|
3119
3126
|
s = Promise.all(So(t, i, n));
|
|
@@ -3122,7 +3129,7 @@ function su(t, e, n = {}) {
|
|
|
3122
3129
|
t.notify("AnimationComplete", e);
|
|
3123
3130
|
});
|
|
3124
3131
|
}
|
|
3125
|
-
const iu =
|
|
3132
|
+
const iu = sn.length;
|
|
3126
3133
|
function Co(t) {
|
|
3127
3134
|
if (!t)
|
|
3128
3135
|
return;
|
|
@@ -3132,12 +3139,12 @@ function Co(t) {
|
|
|
3132
3139
|
}
|
|
3133
3140
|
const e = {};
|
|
3134
3141
|
for (let n = 0; n < iu; n++) {
|
|
3135
|
-
const s =
|
|
3142
|
+
const s = sn[n], i = t.props[s];
|
|
3136
3143
|
(Bt(i) || i === !1) && (e[s] = i);
|
|
3137
3144
|
}
|
|
3138
3145
|
return e;
|
|
3139
3146
|
}
|
|
3140
|
-
const ou = [...
|
|
3147
|
+
const ou = [...nn].reverse(), ru = nn.length;
|
|
3141
3148
|
function au(t) {
|
|
3142
3149
|
return (e) => Promise.all(e.map(({ animation: n, options: s }) => su(t, n, s)));
|
|
3143
3150
|
}
|
|
@@ -3174,20 +3181,20 @@ function lu(t) {
|
|
|
3174
3181
|
const O = Array.isArray(w) ? w : [w];
|
|
3175
3182
|
let J = O.reduce(i(p), {});
|
|
3176
3183
|
b === !1 && (J = {});
|
|
3177
|
-
const { prevResolvedValues:
|
|
3178
|
-
...
|
|
3184
|
+
const { prevResolvedValues: Ln = {} } = v, Zo = {
|
|
3185
|
+
...Ln,
|
|
3179
3186
|
...J
|
|
3180
|
-
},
|
|
3187
|
+
}, Nn = (j) => {
|
|
3181
3188
|
P = !0, h.has(j) && (A = !0, h.delete(j)), v.needsAnimating[j] = !0;
|
|
3182
3189
|
const q = t.getValue(j);
|
|
3183
3190
|
q && (q.liveStyle = !1);
|
|
3184
3191
|
};
|
|
3185
3192
|
for (const j in Zo) {
|
|
3186
|
-
const q = J[j], ve =
|
|
3193
|
+
const q = J[j], ve = Ln[j];
|
|
3187
3194
|
if (f.hasOwnProperty(j))
|
|
3188
3195
|
continue;
|
|
3189
3196
|
let we = !1;
|
|
3190
|
-
|
|
3197
|
+
Fe(q) && Fe(ve) ? we = !Ui(q, ve) : we = q !== ve, we ? q != null ? Nn(j) : h.add(j) : q !== void 0 && h.has(j) ? Nn(j) : v.protectedKeys[j] = !0;
|
|
3191
3198
|
}
|
|
3192
3199
|
v.prevProp = w, v.prevResolvedValues = J, v.isActive && (f = { ...f, ...J }), s && t.blockInitialAnimation && (P = !1), P && (!(V && R) || A) && d.push(...O.map((j) => ({
|
|
3193
3200
|
animation: j,
|
|
@@ -3326,7 +3333,7 @@ function pu(t) {
|
|
|
3326
3333
|
K.x = K.y = !1;
|
|
3327
3334
|
});
|
|
3328
3335
|
}
|
|
3329
|
-
const
|
|
3336
|
+
const Rn = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1;
|
|
3330
3337
|
function Ut(t, e, n, s = { passive: !0 }) {
|
|
3331
3338
|
return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
|
|
3332
3339
|
}
|
|
@@ -3338,7 +3345,7 @@ function zt(t) {
|
|
|
3338
3345
|
}
|
|
3339
3346
|
};
|
|
3340
3347
|
}
|
|
3341
|
-
const mu = (t) => (e) =>
|
|
3348
|
+
const mu = (t) => (e) => Rn(e) && t(e, zt(e));
|
|
3342
3349
|
function Lt(t, e, n, s) {
|
|
3343
3350
|
return Ut(t, e, mu(n), s);
|
|
3344
3351
|
}
|
|
@@ -3352,7 +3359,7 @@ class Vo {
|
|
|
3352
3359
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
3353
3360
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3354
3361
|
return;
|
|
3355
|
-
const d =
|
|
3362
|
+
const d = Ae(this.lastMoveEventInfo, this.history), h = this.startEvent !== null, f = gu(d.offset, { x: 0, y: 0 }) >= 3;
|
|
3356
3363
|
if (!h && !f)
|
|
3357
3364
|
return;
|
|
3358
3365
|
const { point: m } = d, { timestamp: y } = N;
|
|
@@ -3360,21 +3367,21 @@ class Vo {
|
|
|
3360
3367
|
const { onStart: g, onMove: p } = this.handlers;
|
|
3361
3368
|
h || (g && g(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), p && p(this.lastMoveEvent, d);
|
|
3362
3369
|
}, this.handlePointerMove = (d, h) => {
|
|
3363
|
-
this.lastMoveEvent = d, this.lastMoveEventInfo =
|
|
3370
|
+
this.lastMoveEvent = d, this.lastMoveEventInfo = Ce(h, this.transformPagePoint), M.update(this.updatePoint, !0);
|
|
3364
3371
|
}, this.handlePointerUp = (d, h) => {
|
|
3365
3372
|
this.end();
|
|
3366
3373
|
const { onEnd: f, onSessionEnd: m, resumeAnimation: y } = this.handlers;
|
|
3367
3374
|
if (this.dragSnapToOrigin && y && y(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3368
3375
|
return;
|
|
3369
|
-
const g =
|
|
3376
|
+
const g = Ae(d.type === "pointercancel" ? this.lastMoveEventInfo : Ce(h, this.transformPagePoint), this.history);
|
|
3370
3377
|
this.startEvent && f && f(d, g), m && m(d, g);
|
|
3371
|
-
}, !
|
|
3378
|
+
}, !Rn(e))
|
|
3372
3379
|
return;
|
|
3373
3380
|
this.dragSnapToOrigin = r, this.handlers = n, this.transformPagePoint = s, this.contextWindow = i || window;
|
|
3374
|
-
const o = zt(e), a =
|
|
3381
|
+
const o = zt(e), a = Ce(o, this.transformPagePoint), { point: l } = a, { timestamp: c } = N;
|
|
3375
3382
|
this.history = [{ ...l, timestamp: c }];
|
|
3376
3383
|
const { onSessionStart: u } = n;
|
|
3377
|
-
u && u(e,
|
|
3384
|
+
u && u(e, Ae(a, this.history)), this.removeListeners = Ht(Lt(this.contextWindow, "pointermove", this.handlePointerMove), Lt(this.contextWindow, "pointerup", this.handlePointerUp), Lt(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
3378
3385
|
}
|
|
3379
3386
|
updateHandlers(e) {
|
|
3380
3387
|
this.handlers = e;
|
|
@@ -3383,13 +3390,13 @@ class Vo {
|
|
|
3383
3390
|
this.removeListeners && this.removeListeners(), nt(this.updatePoint);
|
|
3384
3391
|
}
|
|
3385
3392
|
}
|
|
3386
|
-
function
|
|
3393
|
+
function Ce(t, e) {
|
|
3387
3394
|
return e ? { point: e(t.point) } : t;
|
|
3388
3395
|
}
|
|
3389
3396
|
function hs(t, e) {
|
|
3390
3397
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
3391
3398
|
}
|
|
3392
|
-
function
|
|
3399
|
+
function Ae({ point: t }, e) {
|
|
3393
3400
|
return {
|
|
3394
3401
|
point: t,
|
|
3395
3402
|
delta: hs(t, Mo(e)),
|
|
@@ -3480,9 +3487,9 @@ function Du(t, e) {
|
|
|
3480
3487
|
const n = {};
|
|
3481
3488
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
3482
3489
|
}
|
|
3483
|
-
const
|
|
3484
|
-
function ku(t =
|
|
3485
|
-
return t === !1 ? t = 0 : t === !0 && (t =
|
|
3490
|
+
const ze = 0.35;
|
|
3491
|
+
function ku(t = ze) {
|
|
3492
|
+
return t === !1 ? t = 0 : t === !0 && (t = ze), {
|
|
3486
3493
|
x: vs(t, "left", "right"),
|
|
3487
3494
|
y: vs(t, "top", "bottom")
|
|
3488
3495
|
};
|
|
@@ -3531,14 +3538,14 @@ function Ru(t, e) {
|
|
|
3531
3538
|
right: s.x
|
|
3532
3539
|
};
|
|
3533
3540
|
}
|
|
3534
|
-
function
|
|
3541
|
+
function Ve(t) {
|
|
3535
3542
|
return t === void 0 || t === 1;
|
|
3536
3543
|
}
|
|
3537
|
-
function
|
|
3538
|
-
return !
|
|
3544
|
+
function Ge({ scale: t, scaleX: e, scaleY: n }) {
|
|
3545
|
+
return !Ve(t) || !Ve(e) || !Ve(n);
|
|
3539
3546
|
}
|
|
3540
3547
|
function at(t) {
|
|
3541
|
-
return
|
|
3548
|
+
return Ge(t) || Ro(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
3542
3549
|
}
|
|
3543
3550
|
function Ro(t) {
|
|
3544
3551
|
return Ts(t.x) || Ts(t.y);
|
|
@@ -3553,11 +3560,11 @@ function ae(t, e, n) {
|
|
|
3553
3560
|
function Ps(t, e, n, s, i) {
|
|
3554
3561
|
return i !== void 0 && (t = ae(t, i, s)), ae(t, n, s) + e;
|
|
3555
3562
|
}
|
|
3556
|
-
function
|
|
3563
|
+
function qe(t, e = 0, n = 1, s, i) {
|
|
3557
3564
|
t.min = Ps(t.min, e, n, s, i), t.max = Ps(t.max, e, n, s, i);
|
|
3558
3565
|
}
|
|
3559
3566
|
function Lo(t, { x: e, y: n }) {
|
|
3560
|
-
|
|
3567
|
+
qe(t.x, e.translate, e.scale, e.originPoint), qe(t.y, n.translate, n.scale, n.originPoint);
|
|
3561
3568
|
}
|
|
3562
3569
|
const Ss = 0.999999999999, Cs = 1.0000000000001;
|
|
3563
3570
|
function Lu(t, e, n, s = !1) {
|
|
@@ -3581,7 +3588,7 @@ function vt(t, e) {
|
|
|
3581
3588
|
}
|
|
3582
3589
|
function As(t, e, n, s, i = 0.5) {
|
|
3583
3590
|
const r = k(t.min, t.max, i);
|
|
3584
|
-
|
|
3591
|
+
qe(t, e, n, r, s);
|
|
3585
3592
|
}
|
|
3586
3593
|
function wt(t, e) {
|
|
3587
3594
|
As(t.x, e.x, e.scaleX, e.scale, e.originX), As(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
@@ -3619,7 +3626,7 @@ class Bu {
|
|
|
3619
3626
|
}
|
|
3620
3627
|
}
|
|
3621
3628
|
this.originPoint[g] = p;
|
|
3622
|
-
}), m && M.postRender(() => m(u, d)),
|
|
3629
|
+
}), m && M.postRender(() => m(u, d)), Be(this.visualElement, "transform");
|
|
3623
3630
|
const { animationState: y } = this.visualElement;
|
|
3624
3631
|
y && y.setActive("whileDrag", !0);
|
|
3625
3632
|
}, o = (u, d) => {
|
|
@@ -3719,7 +3726,7 @@ class Bu {
|
|
|
3719
3726
|
}
|
|
3720
3727
|
startAxisValueAnimation(e, n) {
|
|
3721
3728
|
const s = this.getAxisMotionValue(e);
|
|
3722
|
-
return
|
|
3729
|
+
return Be(this.visualElement, e), s.start(En(e, s, 0, n, this.visualElement, !1));
|
|
3723
3730
|
}
|
|
3724
3731
|
stopAnimation() {
|
|
3725
3732
|
$((e) => this.getAxisMotionValue(e).stop());
|
|
@@ -3807,7 +3814,7 @@ class Bu {
|
|
|
3807
3814
|
};
|
|
3808
3815
|
}
|
|
3809
3816
|
getProps() {
|
|
3810
|
-
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: r = !1, dragElastic: o =
|
|
3817
|
+
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: r = !1, dragElastic: o = ze, dragMomentum: a = !0 } = e;
|
|
3811
3818
|
return {
|
|
3812
3819
|
...e,
|
|
3813
3820
|
drag: n,
|
|
@@ -3934,7 +3941,7 @@ class _u extends or {
|
|
|
3934
3941
|
}
|
|
3935
3942
|
componentDidUpdate() {
|
|
3936
3943
|
const { projection: e } = this.props.visualElement;
|
|
3937
|
-
e && (e.root.didUpdate(),
|
|
3944
|
+
e && (e.root.didUpdate(), rn.postRender(() => {
|
|
3938
3945
|
!e.currentAnimation && e.isLead() && this.safeToRemove();
|
|
3939
3946
|
}));
|
|
3940
3947
|
}
|
|
@@ -3972,7 +3979,7 @@ const Wu = {
|
|
|
3972
3979
|
};
|
|
3973
3980
|
function $u(t, e, n) {
|
|
3974
3981
|
const s = I(t) ? t : jt(t);
|
|
3975
|
-
return s.start(
|
|
3982
|
+
return s.start(En("", s, e, n)), s.animation;
|
|
3976
3983
|
}
|
|
3977
3984
|
function Ku(t) {
|
|
3978
3985
|
return t instanceof SVGElement && t.tagName !== "svg";
|
|
@@ -3983,10 +3990,10 @@ class zu {
|
|
|
3983
3990
|
this.children = [], this.isDirty = !1;
|
|
3984
3991
|
}
|
|
3985
3992
|
add(e) {
|
|
3986
|
-
|
|
3993
|
+
yn(this.children, e), this.isDirty = !0;
|
|
3987
3994
|
}
|
|
3988
3995
|
remove(e) {
|
|
3989
|
-
|
|
3996
|
+
vn(this.children, e), this.isDirty = !0;
|
|
3990
3997
|
}
|
|
3991
3998
|
forEach(e) {
|
|
3992
3999
|
this.isDirty && this.children.sort(Hu), this.isDirty = !1, this.children.forEach(e);
|
|
@@ -4077,10 +4084,10 @@ class nd {
|
|
|
4077
4084
|
this.members = [];
|
|
4078
4085
|
}
|
|
4079
4086
|
add(e) {
|
|
4080
|
-
|
|
4087
|
+
yn(this.members, e), e.scheduleRender();
|
|
4081
4088
|
}
|
|
4082
4089
|
remove(e) {
|
|
4083
|
-
if (
|
|
4090
|
+
if (vn(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
|
|
4084
4091
|
const n = this.members[this.members.length - 1];
|
|
4085
4092
|
n && this.promote(n);
|
|
4086
4093
|
}
|
|
@@ -4141,9 +4148,9 @@ const lt = {
|
|
|
4141
4148
|
totalNodes: 0,
|
|
4142
4149
|
resolvedTargetDeltas: 0,
|
|
4143
4150
|
recalculatedProjection: 0
|
|
4144
|
-
}, kt = typeof window < "u" && window.MotionDebug !== void 0,
|
|
4151
|
+
}, kt = typeof window < "u" && window.MotionDebug !== void 0, Me = ["", "X", "Y", "Z"], id = { visibility: "hidden" }, Ws = 1e3;
|
|
4145
4152
|
let od = 0;
|
|
4146
|
-
function
|
|
4153
|
+
function De(t, e, n, s) {
|
|
4147
4154
|
const { latestValues: i } = e;
|
|
4148
4155
|
i[t] && (n[t] = i[t], e.setStaticValue(t, 0), s && (s[t] = 0));
|
|
4149
4156
|
}
|
|
@@ -4174,7 +4181,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4174
4181
|
this.root === this && (this.nodes = new zu());
|
|
4175
4182
|
}
|
|
4176
4183
|
addEventListener(o, a) {
|
|
4177
|
-
return this.eventHandlers.has(o) || this.eventHandlers.set(o, new
|
|
4184
|
+
return this.eventHandlers.has(o) || this.eventHandlers.set(o, new wn()), this.eventHandlers.get(o).add(a);
|
|
4178
4185
|
}
|
|
4179
4186
|
notifyListeners(o, ...a) {
|
|
4180
4187
|
const l = this.eventHandlers.get(o);
|
|
@@ -4207,7 +4214,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4207
4214
|
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || w || h && (v || !this.currentAnimation)) {
|
|
4208
4215
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(d, w);
|
|
4209
4216
|
const S = {
|
|
4210
|
-
...
|
|
4217
|
+
...gn(y, "layout"),
|
|
4211
4218
|
onPlay: g,
|
|
4212
4219
|
onComplete: p
|
|
4213
4220
|
};
|
|
@@ -4268,10 +4275,10 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4268
4275
|
}
|
|
4269
4276
|
this.isUpdating || this.nodes.forEach(dd), this.isUpdating = !1, this.nodes.forEach(hd), this.nodes.forEach(rd), this.nodes.forEach(ad), this.clearAllSnapshots();
|
|
4270
4277
|
const a = z.now();
|
|
4271
|
-
N.delta = Z(0, 1e3 / 60, a - N.timestamp), N.timestamp = a, N.isProcessing = !0,
|
|
4278
|
+
N.delta = Z(0, 1e3 / 60, a - N.timestamp), N.timestamp = a, N.isProcessing = !0, xe.update.process(N), xe.preRender.process(N), xe.render.process(N), N.isProcessing = !1;
|
|
4272
4279
|
}
|
|
4273
4280
|
didUpdate() {
|
|
4274
|
-
this.updateScheduled || (this.updateScheduled = !0,
|
|
4281
|
+
this.updateScheduled || (this.updateScheduled = !0, rn.read(this.scheduleUpdate));
|
|
4275
4282
|
}
|
|
4276
4283
|
clearAllSnapshots() {
|
|
4277
4284
|
this.nodes.forEach(ud), this.sharedNodes.forEach(gd);
|
|
@@ -4373,7 +4380,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4373
4380
|
const c = this.path[l];
|
|
4374
4381
|
if (!c.instance || !at(c.latestValues))
|
|
4375
4382
|
continue;
|
|
4376
|
-
|
|
4383
|
+
Ge(c.latestValues) && c.updateSnapshot();
|
|
4377
4384
|
const u = E(), d = c.measurePageBox();
|
|
4378
4385
|
W(u, d), Bs(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
|
|
4379
4386
|
}
|
|
@@ -4419,7 +4426,7 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4419
4426
|
}
|
|
4420
4427
|
}
|
|
4421
4428
|
getClosestProjectingParent() {
|
|
4422
|
-
if (!(!this.parent ||
|
|
4429
|
+
if (!(!this.parent || Ge(this.parent.latestValues) || Ro(this.parent.latestValues)))
|
|
4423
4430
|
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
4424
4431
|
}
|
|
4425
4432
|
isProjecting() {
|
|
@@ -4551,9 +4558,9 @@ function Wo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4551
4558
|
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
|
|
4552
4559
|
return;
|
|
4553
4560
|
const c = {};
|
|
4554
|
-
l.z &&
|
|
4555
|
-
for (let u = 0; u <
|
|
4556
|
-
|
|
4561
|
+
l.z && De("z", o, c, this.animationValues);
|
|
4562
|
+
for (let u = 0; u < Me.length; u++)
|
|
4563
|
+
De(`rotate${Me[u]}`, o, c, this.animationValues), De(`skew${Me[u]}`, o, c, this.animationValues);
|
|
4557
4564
|
o.render();
|
|
4558
4565
|
for (const u in c)
|
|
4559
4566
|
o.setStaticValue(u, c[u]), this.animationValues && (this.animationValues[u] = c[u]);
|
|
@@ -4721,7 +4728,7 @@ const Td = Wo({
|
|
|
4721
4728
|
y: document.documentElement.scrollTop || document.body.scrollTop
|
|
4722
4729
|
}),
|
|
4723
4730
|
checkIsScrollRoot: () => !0
|
|
4724
|
-
}),
|
|
4731
|
+
}), ke = {
|
|
4725
4732
|
current: void 0
|
|
4726
4733
|
}, Ko = Wo({
|
|
4727
4734
|
measureScroll: (t) => ({
|
|
@@ -4729,11 +4736,11 @@ const Td = Wo({
|
|
|
4729
4736
|
y: t.scrollTop
|
|
4730
4737
|
}),
|
|
4731
4738
|
defaultParent: () => {
|
|
4732
|
-
if (!
|
|
4739
|
+
if (!ke.current) {
|
|
4733
4740
|
const t = new Td({});
|
|
4734
|
-
t.mount(window), t.setOptions({ layoutScroll: !0 }),
|
|
4741
|
+
t.mount(window), t.setOptions({ layoutScroll: !0 }), ke.current = t;
|
|
4735
4742
|
}
|
|
4736
|
-
return
|
|
4743
|
+
return ke.current;
|
|
4737
4744
|
},
|
|
4738
4745
|
resetTransform: (t, e) => {
|
|
4739
4746
|
t.style.transform = e !== void 0 ? e : "none";
|
|
@@ -4839,7 +4846,7 @@ function Js(t) {
|
|
|
4839
4846
|
e.key === "Enter" && t(e);
|
|
4840
4847
|
};
|
|
4841
4848
|
}
|
|
4842
|
-
function
|
|
4849
|
+
function Ee(t, e) {
|
|
4843
4850
|
t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
|
|
4844
4851
|
}
|
|
4845
4852
|
const kd = (t, e) => {
|
|
@@ -4849,16 +4856,16 @@ const kd = (t, e) => {
|
|
|
4849
4856
|
const s = Js(() => {
|
|
4850
4857
|
if (Et.has(n))
|
|
4851
4858
|
return;
|
|
4852
|
-
|
|
4859
|
+
Ee(n, "down");
|
|
4853
4860
|
const i = Js(() => {
|
|
4854
|
-
|
|
4855
|
-
}), r = () =>
|
|
4861
|
+
Ee(n, "up");
|
|
4862
|
+
}), r = () => Ee(n, "cancel");
|
|
4856
4863
|
n.addEventListener("keyup", i, e), n.addEventListener("blur", r, e);
|
|
4857
4864
|
});
|
|
4858
4865
|
n.addEventListener("keydown", s, e), n.addEventListener("blur", () => n.removeEventListener("keydown", s), e);
|
|
4859
4866
|
};
|
|
4860
4867
|
function Qs(t) {
|
|
4861
|
-
return
|
|
4868
|
+
return Rn(t) && !Ao();
|
|
4862
4869
|
}
|
|
4863
4870
|
function Ed(t, e, n = {}) {
|
|
4864
4871
|
const [s, i, r] = Ho(t, n), o = (a) => {
|
|
@@ -4893,22 +4900,22 @@ class Rd extends ot {
|
|
|
4893
4900
|
unmount() {
|
|
4894
4901
|
}
|
|
4895
4902
|
}
|
|
4896
|
-
const
|
|
4897
|
-
const e =
|
|
4903
|
+
const Xe = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Ld = (t) => {
|
|
4904
|
+
const e = Xe.get(t.target);
|
|
4898
4905
|
e && e(t);
|
|
4899
4906
|
}, Nd = (t) => {
|
|
4900
4907
|
t.forEach(Ld);
|
|
4901
4908
|
};
|
|
4902
4909
|
function Fd({ root: t, ...e }) {
|
|
4903
4910
|
const n = t || document;
|
|
4904
|
-
|
|
4905
|
-
const s =
|
|
4911
|
+
Re.has(n) || Re.set(n, {});
|
|
4912
|
+
const s = Re.get(n), i = JSON.stringify(e);
|
|
4906
4913
|
return s[i] || (s[i] = new IntersectionObserver(Nd, { root: t, ...e })), s[i];
|
|
4907
4914
|
}
|
|
4908
4915
|
function Bd(t, e, n) {
|
|
4909
4916
|
const s = Fd(e);
|
|
4910
|
-
return
|
|
4911
|
-
|
|
4917
|
+
return Xe.set(t, n), s.observe(t), () => {
|
|
4918
|
+
Xe.delete(t), s.unobserve(t);
|
|
4912
4919
|
};
|
|
4913
4920
|
}
|
|
4914
4921
|
const Id = {
|
|
@@ -4968,14 +4975,14 @@ const Ud = {
|
|
|
4968
4975
|
ProjectionNode: Ko,
|
|
4969
4976
|
MeasureLayout: Bo
|
|
4970
4977
|
}
|
|
4971
|
-
},
|
|
4978
|
+
}, Ye = { current: null }, Go = { current: !1 };
|
|
4972
4979
|
function Wd() {
|
|
4973
|
-
if (Go.current = !0, !!
|
|
4980
|
+
if (Go.current = !0, !!en)
|
|
4974
4981
|
if (window.matchMedia) {
|
|
4975
|
-
const t = window.matchMedia("(prefers-reduced-motion)"), e = () =>
|
|
4982
|
+
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Ye.current = t.matches;
|
|
4976
4983
|
t.addListener(e), e();
|
|
4977
4984
|
} else
|
|
4978
|
-
|
|
4985
|
+
Ye.current = !1;
|
|
4979
4986
|
}
|
|
4980
4987
|
const $d = [...po, F, st], Kd = (t) => $d.find(fo(t)), ei = /* @__PURE__ */ new WeakMap();
|
|
4981
4988
|
function Hd(t, e, n) {
|
|
@@ -5019,7 +5026,7 @@ class zd {
|
|
|
5019
5026
|
return {};
|
|
5020
5027
|
}
|
|
5021
5028
|
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: o }, a = {}) {
|
|
5022
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
5029
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Mn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
5023
5030
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
5024
5031
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
5025
5032
|
const f = z.now();
|
|
@@ -5034,7 +5041,7 @@ class zd {
|
|
|
5034
5041
|
}
|
|
5035
5042
|
}
|
|
5036
5043
|
mount(e) {
|
|
5037
|
-
this.current = e, ei.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Go.current || Wd(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 :
|
|
5044
|
+
this.current = e, ei.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Go.current || Wd(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Ye.current, process.env.NODE_ENV !== "production" && he(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
5038
5045
|
}
|
|
5039
5046
|
unmount() {
|
|
5040
5047
|
ei.delete(this.current), this.projection && this.projection.unmount(), nt(this.notifyUpdate), nt(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
@@ -5185,7 +5192,7 @@ class zd {
|
|
|
5185
5192
|
const { initial: s } = this.props;
|
|
5186
5193
|
let i;
|
|
5187
5194
|
if (typeof s == "string" || typeof s == "object") {
|
|
5188
|
-
const o =
|
|
5195
|
+
const o = ln(this.props, s, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
|
|
5189
5196
|
o && (i = o[e]);
|
|
5190
5197
|
}
|
|
5191
5198
|
if (s && i !== void 0)
|
|
@@ -5194,7 +5201,7 @@ class zd {
|
|
|
5194
5201
|
return r !== void 0 && !I(r) ? r : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
|
|
5195
5202
|
}
|
|
5196
5203
|
on(e, n) {
|
|
5197
|
-
return this.events[e] || (this.events[e] = new
|
|
5204
|
+
return this.events[e] || (this.events[e] = new wn()), this.events[e].add(n);
|
|
5198
5205
|
}
|
|
5199
5206
|
notify(e, ...n) {
|
|
5200
5207
|
this.events[e] && this.events[e].notify(...n);
|
|
@@ -5230,7 +5237,7 @@ class qd extends qo {
|
|
|
5230
5237
|
}
|
|
5231
5238
|
readValueFromInstance(e, n) {
|
|
5232
5239
|
if (pt.has(n)) {
|
|
5233
|
-
const s =
|
|
5240
|
+
const s = Vn(n);
|
|
5234
5241
|
return s && s.default || 0;
|
|
5235
5242
|
} else {
|
|
5236
5243
|
const s = Gd(e), i = (Ei(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
@@ -5241,10 +5248,10 @@ class qd extends qo {
|
|
|
5241
5248
|
return No(e, n);
|
|
5242
5249
|
}
|
|
5243
5250
|
build(e, n, s) {
|
|
5244
|
-
|
|
5251
|
+
dn(e, n, s.transformTemplate);
|
|
5245
5252
|
}
|
|
5246
5253
|
scrapeMotionValuesFromProps(e, n, s) {
|
|
5247
|
-
return
|
|
5254
|
+
return mn(e, n, s);
|
|
5248
5255
|
}
|
|
5249
5256
|
}
|
|
5250
5257
|
class Xd extends qo {
|
|
@@ -5256,25 +5263,25 @@ class Xd extends qo {
|
|
|
5256
5263
|
}
|
|
5257
5264
|
readValueFromInstance(e, n) {
|
|
5258
5265
|
if (pt.has(n)) {
|
|
5259
|
-
const s =
|
|
5266
|
+
const s = Vn(n);
|
|
5260
5267
|
return s && s.default || 0;
|
|
5261
5268
|
}
|
|
5262
|
-
return n = Fi.has(n) ? n :
|
|
5269
|
+
return n = Fi.has(n) ? n : on(n), e.getAttribute(n);
|
|
5263
5270
|
}
|
|
5264
5271
|
scrapeMotionValuesFromProps(e, n, s) {
|
|
5265
5272
|
return ji(e, n, s);
|
|
5266
5273
|
}
|
|
5267
5274
|
build(e, n, s) {
|
|
5268
|
-
|
|
5275
|
+
hn(e, n, this.isSVGTag, s.transformTemplate);
|
|
5269
5276
|
}
|
|
5270
5277
|
renderInstance(e, n, s, i) {
|
|
5271
5278
|
Bi(e, n, s, i);
|
|
5272
5279
|
}
|
|
5273
5280
|
mount(e) {
|
|
5274
|
-
this.isSVGTag =
|
|
5281
|
+
this.isSVGTag = pn(e.tagName), super.mount(e);
|
|
5275
5282
|
}
|
|
5276
5283
|
}
|
|
5277
|
-
const Yd = (t, e) =>
|
|
5284
|
+
const Yd = (t, e) => an(t) ? new Xd(e) : new qd(e, {
|
|
5278
5285
|
allowProjection: t !== le
|
|
5279
5286
|
}), Zd = /* @__PURE__ */ Tl({
|
|
5280
5287
|
...fu,
|
|
@@ -5328,7 +5335,7 @@ const Yd = (t, e) => ln(t) ? new Xd(e) : new qd(e, {
|
|
|
5328
5335
|
<path d="M8.56997 11L8.99997 17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5329
5336
|
</svg>
|
|
5330
5337
|
`, Nh = () => {
|
|
5331
|
-
const { id: t } = tt(), { actions: e, query: n } = St(), [s, i] =
|
|
5338
|
+
const { id: t } = tt(), { actions: e, query: n } = St(), [s, i] = Je(!1), {
|
|
5332
5339
|
dom: r,
|
|
5333
5340
|
name: o,
|
|
5334
5341
|
moveable: a,
|
|
@@ -5338,16 +5345,16 @@ const Yd = (t, e) => ln(t) ? new Xd(e) : new qd(e, {
|
|
|
5338
5345
|
selectable: d
|
|
5339
5346
|
} = tt((g) => {
|
|
5340
5347
|
let p = g.data.parent ? n.node(g.data.parent).get() : null;
|
|
5341
|
-
for (; p && !
|
|
5342
|
-
p = p.data.parent && p.data.parent !==
|
|
5348
|
+
for (; p && !Fn(p); )
|
|
5349
|
+
p = p.data.parent && p.data.parent !== Jr ? n.node(p.data.parent).get() : null;
|
|
5343
5350
|
return {
|
|
5344
5351
|
dom: g.dom,
|
|
5345
|
-
name:
|
|
5352
|
+
name: Bn(g),
|
|
5346
5353
|
moveable: n.node(g.id).isDraggable(),
|
|
5347
5354
|
deletable: n.node(g.id).isDeletable() && !!(g.data.custom?.deletable ?? !0),
|
|
5348
5355
|
parentSelectableNode: p,
|
|
5349
5356
|
parentNode: g.data.parent,
|
|
5350
|
-
selectable:
|
|
5357
|
+
selectable: Fn(g)
|
|
5351
5358
|
};
|
|
5352
5359
|
}), { floatingStyles: h, refs: f } = ci({
|
|
5353
5360
|
open: !0,
|
|
@@ -5402,7 +5409,7 @@ const Yd = (t, e) => ln(t) ? new Xd(e) : new qd(e, {
|
|
|
5402
5409
|
children: o
|
|
5403
5410
|
}
|
|
5404
5411
|
) }),
|
|
5405
|
-
!!u && /* @__PURE__ */ x(xa, { children: /* @__PURE__ */ x(ba, { onClick: m, value: u.id, children:
|
|
5412
|
+
!!u && /* @__PURE__ */ x(xa, { children: /* @__PURE__ */ x(ba, { onClick: m, value: u.id, children: Bn(u) }) })
|
|
5406
5413
|
] }),
|
|
5407
5414
|
l && /* @__PURE__ */ x(On, { onClick: y, className: "tw:cursor-grab", size: "20", children: /* @__PURE__ */ x(Zt, { size: 16, source: th }) })
|
|
5408
5415
|
]
|
|
@@ -5411,7 +5418,7 @@ const Yd = (t, e) => ln(t) ? new Xd(e) : new qd(e, {
|
|
|
5411
5418
|
}, Fh = () => {
|
|
5412
5419
|
const { dom: t } = tt((i) => ({
|
|
5413
5420
|
dom: i.dom
|
|
5414
|
-
})), { window: e } = sa(), [n, s] =
|
|
5421
|
+
})), { window: e } = sa(), [n, s] = Je(null);
|
|
5415
5422
|
return Pt(() => {
|
|
5416
5423
|
if (!t || !e) return;
|
|
5417
5424
|
let i = null, r = !1;
|
|
@@ -5479,15 +5486,15 @@ const Bh = ({ children: t, data: e }) => {
|
|
|
5479
5486
|
resolver: i.options.resolver
|
|
5480
5487
|
})), s = Y(() => {
|
|
5481
5488
|
if (Wt(e)) return e;
|
|
5482
|
-
const i =
|
|
5489
|
+
const i = Le(e) ? JSON.parse(e) : e;
|
|
5483
5490
|
return Object.entries(i).forEach(([, r]) => {
|
|
5484
|
-
const o =
|
|
5491
|
+
const o = Le(r.type) ? r.type : r.type.resolvedName;
|
|
5485
5492
|
n[o] || (console.error(`Unknown node: ${o}`), r.type = {
|
|
5486
5493
|
resolvedName: C.Unknown
|
|
5487
5494
|
});
|
|
5488
5495
|
}), i;
|
|
5489
5496
|
}, [e, n]);
|
|
5490
|
-
return /* @__PURE__ */ x(
|
|
5497
|
+
return /* @__PURE__ */ x(Qr, { data: s, children: t });
|
|
5491
5498
|
}, eh = {
|
|
5492
5499
|
// Root
|
|
5493
5500
|
[C.Root]: pi,
|
|
@@ -5532,7 +5539,7 @@ const Bh = ({ children: t, data: e }) => {
|
|
|
5532
5539
|
// Timer
|
|
5533
5540
|
[C.CountdownTimer]: dr
|
|
5534
5541
|
}, Ih = ({ resolver: t, children: e, ...n }) => /* @__PURE__ */ x(
|
|
5535
|
-
|
|
5542
|
+
ta,
|
|
5536
5543
|
{
|
|
5537
5544
|
enabled: !1,
|
|
5538
5545
|
onRender: nh,
|
|
@@ -5555,13 +5562,13 @@ const Bh = ({ children: t, data: e }) => {
|
|
|
5555
5562
|
);
|
|
5556
5563
|
}, [e, n]), t;
|
|
5557
5564
|
};
|
|
5558
|
-
class sh extends
|
|
5565
|
+
class sh extends ea {
|
|
5559
5566
|
handlers() {
|
|
5560
5567
|
const e = super.handlers();
|
|
5561
5568
|
return {
|
|
5562
5569
|
...e,
|
|
5563
5570
|
select(n, s) {
|
|
5564
|
-
return (n.getAttribute(jr.DATA_NODE_SELECTABLE) ??
|
|
5571
|
+
return (n.getAttribute(jr.DATA_NODE_SELECTABLE) ?? In.True) === In.True ? e.select(n, s) : () => {
|
|
5565
5572
|
};
|
|
5566
5573
|
}
|
|
5567
5574
|
};
|