@konstructio/ui 0.1.2-alpha.105 → 0.1.2-alpha.106
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/{AlertDialogTrigger-BGo_acd5.js → AlertDialogTrigger-BOrb536P.js} +39 -39
- package/dist/{Breadcrumb-Cp3abB2w.js → Breadcrumb-DVBxqgW_.js} +2 -2
- package/dist/Checkbox-B20uoUKD.js +249 -0
- package/dist/{CommandInput-BLq69pOT.js → CommandInput-BWt6-vUK.js} +3 -3
- package/dist/{Counter-BV680M5r.js → Counter-DiQb-he2.js} +2 -2
- package/dist/{DayPicker-kweJz134.js → DayPicker-C22j0Y-u.js} +539 -518
- package/dist/{DropdownButton-DfNojmCW.js → DropdownButton-hCVYZ1LA.js} +5 -5
- package/dist/{FlagSelectorList-CkTR3j6O.js → FlagSelectorList-CnJjnsp6.js} +11 -8
- package/dist/{HamburgerTrigger-DRylBL2d.js → HamburgerTrigger-BT2yUUJ-.js} +2 -2
- package/dist/{ImageUpload-DiwymQcU.js → ImageUpload-DgCBCa5X.js} +1 -1
- package/dist/{Input-Cf44DzfE.js → Input-wp-rsCmX.js} +2 -2
- package/dist/{Modal-Dyn088X7.js → Modal-CkAf9UY7.js} +3 -3
- package/dist/{Switch-aPhL5rNG.js → Switch-CyJXptgc.js} +80 -77
- package/dist/{Toast-3NEz7LLa.js → Toast-DLJDExxw.js} +7 -6
- package/dist/{Wrapper-DP6Sxngx.js → Wrapper-B8Ja3k4j.js} +63 -63
- package/dist/{Wrapper-CVJSuYWx.js → Wrapper-CvDRHgN4.js} +3 -3
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +27 -25
- package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -3
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/BackButton/BackButton.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +1 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +30 -28
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +23 -21
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1 -1
- package/dist/components/Drawer/Drawer.js +27 -25
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +51 -36
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +40 -38
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +42 -40
- package/dist/components/Filter/utils/index.js +1 -1
- package/dist/components/ImageUpload/ImageUpload.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/LineChart/LineChart.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +11 -11
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +2 -2
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +3 -3
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/PieChart/PieChart.js +30 -27
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Select/Select.js +36 -33
- package/dist/components/Select/components/List/List.js +31 -31
- package/dist/components/Select/hooks/useNavigationList.js +2 -3
- package/dist/components/Select/hooks/useSelect.js +8 -8
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Switch/Switch.variants.js +15 -7
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/TagSelect/hooks/useTagSelect.js +11 -11
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +16 -16
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Typography/Typography.js +19 -16
- package/dist/components/VirtualizedTable/VirtualizedTable.js +1 -1
- package/dist/components/VirtualizedTable/components/Body/Body.js +1 -1
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +3 -3
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +2 -2
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +10 -10
- package/dist/{components-Cf345jTv.js → components-MnxnhLqM.js} +1 -1
- package/dist/{constants-CxJJRVK3.js → constants-CSsr7_YV.js} +1 -1
- package/dist/{debounce-C5Ycjilj.js → debounce-BdyZeJQk.js} +2 -2
- package/dist/{dist-BaPW7qXd2.js → dist-B6ExqXM_2.js} +1 -1
- package/dist/{dist-BZNE2Tnx.js → dist-BbX4Nrk2.js} +1 -1
- package/dist/{dist-BdobXn93.js → dist-C87gsBDM.js} +1 -1
- package/dist/{dist-DDck_2lb.js → dist-CqNOgbfR.js} +117 -116
- package/dist/{dist-C3YVLapk.js → dist-DO3apbIh.js} +24 -24
- package/dist/{dist-CzKqHuqJ2.js → dist-DwxO2RoR2.js} +38 -38
- package/dist/{dist-DFCz63oC2.js → dist-Z0F27ATp2.js} +157 -158
- package/dist/{dist-AihTpWdF.js → dist-iUAHw-3y.js} +272 -272
- package/dist/{dist-tGUUcv8n.js → dist-oJzmvhAb.js} +114 -115
- package/dist/{dist-BlPTJNIm.js → dist-ut_BEHii.js} +1 -1
- package/dist/es2015-B_07N-UL.js +796 -0
- package/dist/index.js +10 -10
- package/dist/{isObject-BeFFiVJK.js → isObject-pLoSfdr0.js} +1 -1
- package/dist/lib/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/lib/components/Checkbox/Checkbox.types.d.ts +2 -1
- package/dist/lib/components/Switch/Switch.variants.d.ts +3 -1
- package/dist/{libphonenumber-hGupNnJu.js → libphonenumber-BMq3Thej.js} +356 -347
- package/dist/package.json +21 -21
- package/dist/{phone-number.provider-BxQCTxp8.js → phone-number.provider-Dkq_p1Gi.js} +2 -2
- package/dist/{prop-types-CfEYxTbR.js → prop-types-BCUW56rg.js} +1 -1
- package/dist/{react-CvUtBTMg.js → react-B6Nc0Fib.js} +835 -827
- package/dist/{rolldown-runtime-Ck3dxwZt.js → rolldown-runtime-Dw9YIBcH.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table.provider-B0BafHuU.js → table.provider-DfZ74xMZ.js} +95 -95
- package/dist/{useBreadcrumb-DYfZL_2p.js → useBreadcrumb-Ds_9BeFz.js} +7 -6
- package/dist/{utils-B-BTGYA5.js → utils-DVYdP0CJ.js} +2 -3
- package/dist/{x-BI9jmc7e.js → x-Ierxf0uI.js} +2 -2
- package/package.json +21 -21
- package/dist/Checkbox-B_ngk9Dj.js +0 -249
- package/dist/es2015-DigR3dar.js +0 -795
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as Qn, jsxs as Gr } from "react/jsx-runtime";
|
|
1
|
+
import { Component as jr, Fragment as qn, createContext as Vt, createElement as Nr, forwardRef as Ur, useCallback as Zn, useContext as U, useEffect as ni, useId as Wr, useInsertionEffect as Jn, useLayoutEffect as $r, useMemo as he, useRef as ft } from "react";
|
|
2
|
+
import { jsx as Qn, jsxs as Kr } from "react/jsx-runtime";
|
|
4
3
|
var ts = Vt({});
|
|
5
|
-
function
|
|
4
|
+
function zr(t) {
|
|
6
5
|
const e = ft(null);
|
|
7
6
|
return e.current === null && (e.current = t()), e.current;
|
|
8
7
|
}
|
|
9
|
-
var
|
|
8
|
+
var Hr = typeof window < "u", Gr = Hr ? $r : ni, si = /* @__PURE__ */ Vt(null);
|
|
10
9
|
function ri(t, e) {
|
|
11
10
|
t.indexOf(e) === -1 && t.push(e);
|
|
12
11
|
}
|
|
@@ -19,11 +18,11 @@ function Re(t, e) {
|
|
|
19
18
|
return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
|
|
20
19
|
}
|
|
21
20
|
var Mt = () => {
|
|
22
|
-
},
|
|
21
|
+
}, tt = () => {
|
|
23
22
|
};
|
|
24
23
|
typeof process < "u" && process.env.NODE_ENV !== "production" && (Mt = (t, e, i) => {
|
|
25
24
|
!t && typeof console < "u" && console.warn(Re(e, i));
|
|
26
|
-
},
|
|
25
|
+
}, tt = (t, e, i) => {
|
|
27
26
|
if (!t) throw new Error(Re(e, i));
|
|
28
27
|
});
|
|
29
28
|
var st = {}, es = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), is = (t) => typeof t == "object" && t !== null, ns = (t) => /^0[^.\s]+$/u.test(t);
|
|
@@ -32,7 +31,7 @@ function ss(t) {
|
|
|
32
31
|
let e;
|
|
33
32
|
return () => (e === void 0 && (e = t()), e);
|
|
34
33
|
}
|
|
35
|
-
var
|
|
34
|
+
var z = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Ut = (...t) => t.reduce((e, i) => (n) => i(e(n))), It = /* @__NO_SIDE_EFFECTS__ */ (t, e, i) => {
|
|
36
35
|
const n = e - t;
|
|
37
36
|
return n ? (i - t) / n : 1;
|
|
38
37
|
}, oi = class {
|
|
@@ -61,25 +60,25 @@ var _ = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Ut = (...t) => t.reduce((e, i) => (
|
|
|
61
60
|
function ai(t, e, i) {
|
|
62
61
|
t || Ri.has(e) || (console.warn(Re(e, i)), Ri.add(e));
|
|
63
62
|
}
|
|
64
|
-
var os = (t, e, i) => (((1 - 3 * i + 3 * e) * t + (3 * i - 6 * e)) * t + 3 * e) * t,
|
|
65
|
-
function
|
|
63
|
+
var os = (t, e, i) => (((1 - 3 * i + 3 * e) * t + (3 * i - 6 * e)) * t + 3 * e) * t, _r = 1e-7, Xr = 12;
|
|
64
|
+
function Yr(t, e, i, n, s) {
|
|
66
65
|
let o, r, a = 0;
|
|
67
66
|
do
|
|
68
67
|
r = e + (i - e) / 2, o = os(r, n, s) - t, o > 0 ? i = r : e = r;
|
|
69
|
-
while (Math.abs(o) >
|
|
68
|
+
while (Math.abs(o) > _r && ++a < Xr);
|
|
70
69
|
return r;
|
|
71
70
|
}
|
|
72
71
|
// @__NO_SIDE_EFFECTS__
|
|
73
72
|
function Wt(t, e, i, n) {
|
|
74
|
-
if (t === e && i === n) return
|
|
75
|
-
const s = (o) =>
|
|
73
|
+
if (t === e && i === n) return z;
|
|
74
|
+
const s = (o) => Yr(o, 0, 1, t, i);
|
|
76
75
|
return (o) => o === 0 || o === 1 ? o : os(s(o), e, n);
|
|
77
76
|
}
|
|
78
|
-
var as = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, ls = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => 1 - t(1 - e), us = /* @__PURE__ */ Wt(0.33, 1.53, 0.69, 0.99), li = /* @__PURE__ */ ls(us), cs = /* @__PURE__ */ as(li), hs = (t) => t >= 1 ? 1 : (t *= 2) < 1 ? 0.5 * li(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), ui = (t) => 1 - Math.sin(Math.acos(t)), fs = ls(ui), ds = as(ui),
|
|
79
|
-
linear:
|
|
80
|
-
easeIn:
|
|
77
|
+
var as = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, ls = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => 1 - t(1 - e), us = /* @__PURE__ */ Wt(0.33, 1.53, 0.69, 0.99), li = /* @__PURE__ */ ls(us), cs = /* @__PURE__ */ as(li), hs = (t) => t >= 1 ? 1 : (t *= 2) < 1 ? 0.5 * li(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), ui = (t) => 1 - Math.sin(Math.acos(t)), fs = ls(ui), ds = as(ui), qr = /* @__PURE__ */ Wt(0.42, 0, 1, 1), Zr = /* @__PURE__ */ Wt(0, 0, 0.58, 1), ps = /* @__PURE__ */ Wt(0.42, 0, 0.58, 1), Jr = /* @__NO_SIDE_EFFECTS__ */ (t) => Array.isArray(t) && typeof t[0] != "number", ms = /* @__NO_SIDE_EFFECTS__ */ (t) => Array.isArray(t) && typeof t[0] == "number", Li = {
|
|
78
|
+
linear: z,
|
|
79
|
+
easeIn: qr,
|
|
81
80
|
easeInOut: ps,
|
|
82
|
-
easeOut:
|
|
81
|
+
easeOut: Zr,
|
|
83
82
|
circIn: ui,
|
|
84
83
|
circInOut: ds,
|
|
85
84
|
circOut: fs,
|
|
@@ -87,15 +86,15 @@ var as = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 -
|
|
|
87
86
|
backInOut: cs,
|
|
88
87
|
backOut: us,
|
|
89
88
|
anticipate: hs
|
|
90
|
-
},
|
|
89
|
+
}, Qr = (t) => typeof t == "string", ki = (t) => {
|
|
91
90
|
if (ms(t)) {
|
|
92
|
-
|
|
91
|
+
tt(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
93
92
|
const [e, i, n, s] = t;
|
|
94
93
|
return /* @__PURE__ */ Wt(e, i, n, s);
|
|
95
|
-
} else if (
|
|
96
|
-
return
|
|
94
|
+
} else if (Qr(t))
|
|
95
|
+
return tt(Li[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Li[t];
|
|
97
96
|
return t;
|
|
98
|
-
},
|
|
97
|
+
}, zt = [
|
|
99
98
|
"setup",
|
|
100
99
|
"read",
|
|
101
100
|
"resolveKeyframes",
|
|
@@ -105,7 +104,7 @@ var as = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 -
|
|
|
105
104
|
"render",
|
|
106
105
|
"postRender"
|
|
107
106
|
];
|
|
108
|
-
function
|
|
107
|
+
function to(t) {
|
|
109
108
|
let e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), n = !1, s = !1;
|
|
110
109
|
const o = /* @__PURE__ */ new WeakSet();
|
|
111
110
|
let r = {
|
|
@@ -136,41 +135,41 @@ function so(t) {
|
|
|
136
135
|
};
|
|
137
136
|
return l;
|
|
138
137
|
}
|
|
139
|
-
var
|
|
138
|
+
var eo = 40;
|
|
140
139
|
function vs(t, e) {
|
|
141
140
|
let i = !1, n = !0;
|
|
142
141
|
const s = {
|
|
143
142
|
delta: 0,
|
|
144
143
|
timestamp: 0,
|
|
145
144
|
isProcessing: !1
|
|
146
|
-
}, o = () => i = !0, r =
|
|
145
|
+
}, o = () => i = !0, r = zt.reduce((x, w) => (x[w] = to(o), x), {}), { setup: a, read: l, resolveKeyframes: c, preUpdate: u, update: h, preRender: f, render: p, postRender: d } = r, m = () => {
|
|
147
146
|
const x = st.useManualTiming, w = x ? s.timestamp : performance.now();
|
|
148
|
-
i = !1, x || (s.delta = n ? 1e3 / 60 : Math.max(Math.min(w - s.timestamp,
|
|
149
|
-
},
|
|
147
|
+
i = !1, x || (s.delta = n ? 1e3 / 60 : Math.max(Math.min(w - s.timestamp, eo), 1)), s.timestamp = w, s.isProcessing = !0, a.process(s), l.process(s), c.process(s), u.process(s), h.process(s), f.process(s), p.process(s), d.process(s), s.isProcessing = !1, i && e && (n = !1, t(m));
|
|
148
|
+
}, g = () => {
|
|
150
149
|
i = !0, n = !0, s.isProcessing || t(m);
|
|
151
150
|
};
|
|
152
151
|
return {
|
|
153
|
-
schedule:
|
|
152
|
+
schedule: zt.reduce((x, w) => {
|
|
154
153
|
const P = r[w];
|
|
155
|
-
return x[w] = (A, D = !1, S = !1) => (i ||
|
|
154
|
+
return x[w] = (A, D = !1, S = !1) => (i || g(), P.schedule(A, D, S)), x;
|
|
156
155
|
}, {}),
|
|
157
156
|
cancel: (x) => {
|
|
158
|
-
for (let w = 0; w <
|
|
157
|
+
for (let w = 0; w < zt.length; w++) r[zt[w]].cancel(x);
|
|
159
158
|
},
|
|
160
159
|
state: s,
|
|
161
160
|
steps: r
|
|
162
161
|
};
|
|
163
162
|
}
|
|
164
|
-
var { schedule: M, cancel: rt, state:
|
|
165
|
-
function
|
|
163
|
+
var { schedule: M, cancel: rt, state: F, steps: ve } = /* @__PURE__ */ vs(typeof requestAnimationFrame < "u" ? requestAnimationFrame : z, !0), Xt;
|
|
164
|
+
function io() {
|
|
166
165
|
Xt = void 0;
|
|
167
166
|
}
|
|
168
167
|
var O = {
|
|
169
|
-
now: () => (Xt === void 0 && O.set(
|
|
168
|
+
now: () => (Xt === void 0 && O.set(F.isProcessing || st.useManualTiming ? F.timestamp : performance.now()), Xt),
|
|
170
169
|
set: (t) => {
|
|
171
|
-
Xt = t, queueMicrotask(
|
|
170
|
+
Xt = t, queueMicrotask(io);
|
|
172
171
|
}
|
|
173
|
-
}, gs = (t) => (e) => typeof e == "string" && e.startsWith(t), ys = /* @__PURE__ */ gs("--"),
|
|
172
|
+
}, gs = (t) => (e) => typeof e == "string" && e.startsWith(t), ys = /* @__PURE__ */ gs("--"), no = /* @__PURE__ */ gs("var(--"), ci = (t) => no(t) ? so.test(t.split("/*")[0].trim()) : !1, so = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
174
173
|
function Bi(t) {
|
|
175
174
|
return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
|
|
176
175
|
}
|
|
@@ -181,14 +180,14 @@ var Ct = {
|
|
|
181
180
|
}, Ot = {
|
|
182
181
|
...Ct,
|
|
183
182
|
transform: (t) => Q(0, 1, t)
|
|
184
|
-
},
|
|
183
|
+
}, Ht = {
|
|
185
184
|
...Ct,
|
|
186
185
|
default: 1
|
|
187
186
|
}, kt = (t) => Math.round(t * 1e5) / 1e5, hi = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
188
|
-
function
|
|
187
|
+
function ro(t) {
|
|
189
188
|
return t == null;
|
|
190
189
|
}
|
|
191
|
-
var
|
|
190
|
+
var oo = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, fi = (t, e) => (i) => !!(typeof i == "string" && oo.test(i) && i.startsWith(t) || e && !ro(i) && Object.prototype.hasOwnProperty.call(i, e)), Ts = (t, e, i) => (n) => {
|
|
192
191
|
if (typeof n != "string") return n;
|
|
193
192
|
const [s, o, r, a] = n.match(hi);
|
|
194
193
|
return {
|
|
@@ -197,15 +196,15 @@ var co = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(
|
|
|
197
196
|
[i]: parseFloat(r),
|
|
198
197
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
199
198
|
};
|
|
200
|
-
},
|
|
199
|
+
}, ao = (t) => Q(0, 255, t), ge = {
|
|
201
200
|
...Ct,
|
|
202
|
-
transform: (t) => Math.round(
|
|
201
|
+
transform: (t) => Math.round(ao(t))
|
|
203
202
|
}, dt = {
|
|
204
203
|
test: /* @__PURE__ */ fi("rgb", "red"),
|
|
205
204
|
parse: /* @__PURE__ */ Ts("red", "green", "blue"),
|
|
206
205
|
transform: ({ red: t, green: e, blue: i, alpha: n = 1 }) => "rgba(" + ge.transform(t) + ", " + ge.transform(e) + ", " + ge.transform(i) + ", " + kt(Ot.transform(n)) + ")"
|
|
207
206
|
};
|
|
208
|
-
function
|
|
207
|
+
function lo(t) {
|
|
209
208
|
let e = "", i = "", n = "", s = "";
|
|
210
209
|
return t.length > 5 ? (e = t.substring(1, 3), i = t.substring(3, 5), n = t.substring(5, 7), s = t.substring(7, 9)) : (e = t.substring(1, 2), i = t.substring(2, 3), n = t.substring(3, 4), s = t.substring(4, 5), e += e, i += i, n += n, s += s), {
|
|
211
210
|
red: parseInt(e, 16),
|
|
@@ -216,13 +215,13 @@ function fo(t) {
|
|
|
216
215
|
}
|
|
217
216
|
var Le = {
|
|
218
217
|
test: /* @__PURE__ */ fi("#"),
|
|
219
|
-
parse:
|
|
218
|
+
parse: lo,
|
|
220
219
|
transform: dt.transform
|
|
221
220
|
}, $t = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
222
221
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
223
222
|
parse: parseFloat,
|
|
224
223
|
transform: (e) => `${e}${t}`
|
|
225
|
-
}),
|
|
224
|
+
}), it = /* @__PURE__ */ $t("deg"), J = /* @__PURE__ */ $t("%"), y = /* @__PURE__ */ $t("px"), uo = /* @__PURE__ */ $t("vh"), co = /* @__PURE__ */ $t("vw"), Fi = {
|
|
226
225
|
...J,
|
|
227
226
|
parse: (t) => J.parse(t) / 100,
|
|
228
227
|
transform: (t) => J.transform(t * 100)
|
|
@@ -238,11 +237,11 @@ var Le = {
|
|
|
238
237
|
const e = R.parse(t);
|
|
239
238
|
return e.alpha = 0, R.transform(e);
|
|
240
239
|
}
|
|
241
|
-
},
|
|
242
|
-
function
|
|
243
|
-
return isNaN(t) && typeof t == "string" && (t.match(hi)?.length || 0) + (t.match(
|
|
240
|
+
}, ho = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
241
|
+
function fo(t) {
|
|
242
|
+
return isNaN(t) && typeof t == "string" && (t.match(hi)?.length || 0) + (t.match(ho)?.length || 0) > 0;
|
|
244
243
|
}
|
|
245
|
-
var xs = "number", ws = "color",
|
|
244
|
+
var xs = "number", ws = "color", po = "var", mo = "var(", Ii = "${}", vo = /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;
|
|
246
245
|
function bt(t) {
|
|
247
246
|
const e = t.toString(), i = [], n = {
|
|
248
247
|
color: [],
|
|
@@ -252,12 +251,12 @@ function bt(t) {
|
|
|
252
251
|
let o = 0;
|
|
253
252
|
return {
|
|
254
253
|
values: i,
|
|
255
|
-
split: e.replace(
|
|
254
|
+
split: e.replace(vo, (r) => (R.test(r) ? (n.color.push(o), s.push(ws), i.push(R.parse(r))) : r.startsWith(mo) ? (n.var.push(o), s.push(po), i.push(r)) : (n.number.push(o), s.push(xs), i.push(parseFloat(r))), ++o, Ii)).split(Ii),
|
|
256
255
|
indexes: n,
|
|
257
256
|
types: s
|
|
258
257
|
};
|
|
259
258
|
}
|
|
260
|
-
function
|
|
259
|
+
function go(t) {
|
|
261
260
|
return bt(t).values;
|
|
262
261
|
}
|
|
263
262
|
function Ps({ split: t, types: e }) {
|
|
@@ -272,24 +271,24 @@ function Ps({ split: t, types: e }) {
|
|
|
272
271
|
return s;
|
|
273
272
|
};
|
|
274
273
|
}
|
|
275
|
-
function
|
|
274
|
+
function yo(t) {
|
|
276
275
|
return Ps(bt(t));
|
|
277
276
|
}
|
|
278
|
-
var
|
|
279
|
-
function
|
|
277
|
+
var To = (t) => typeof t == "number" ? 0 : R.test(t) ? R.getAnimatableNone(t) : t, xo = (t, e) => typeof t == "number" ? e?.trim().endsWith("/") ? t : 0 : To(t);
|
|
278
|
+
function wo(t) {
|
|
280
279
|
const e = bt(t);
|
|
281
|
-
return Ps(e)(e.values.map((i, n) =>
|
|
280
|
+
return Ps(e)(e.values.map((i, n) => xo(i, e.split[n])));
|
|
282
281
|
}
|
|
283
|
-
var
|
|
284
|
-
test:
|
|
285
|
-
parse:
|
|
286
|
-
createTransformer:
|
|
287
|
-
getAnimatableNone:
|
|
282
|
+
var _ = {
|
|
283
|
+
test: fo,
|
|
284
|
+
parse: go,
|
|
285
|
+
createTransformer: yo,
|
|
286
|
+
getAnimatableNone: wo
|
|
288
287
|
};
|
|
289
288
|
function ye(t, e, i) {
|
|
290
289
|
return i < 0 && (i += 1), i > 1 && (i -= 1), i < 1 / 6 ? t + (e - t) * 6 * i : i < 1 / 2 ? e : i < 2 / 3 ? t + (e - t) * (2 / 3 - i) * 6 : t;
|
|
291
290
|
}
|
|
292
|
-
function
|
|
291
|
+
function Po({ hue: t, saturation: e, lightness: i, alpha: n }) {
|
|
293
292
|
t /= 360, e /= 100, i /= 100;
|
|
294
293
|
let s = 0, o = 0, r = 0;
|
|
295
294
|
if (!e) s = o = r = i;
|
|
@@ -310,16 +309,16 @@ function ne(t, e) {
|
|
|
310
309
|
var V = (t, e, i) => t + (e - t) * i, Te = (t, e, i) => {
|
|
311
310
|
const n = t * t, s = i * (e * e - n) + n;
|
|
312
311
|
return s < 0 ? 0 : Math.sqrt(s);
|
|
313
|
-
},
|
|
312
|
+
}, So = [
|
|
314
313
|
Le,
|
|
315
314
|
dt,
|
|
316
315
|
xt
|
|
317
|
-
],
|
|
316
|
+
], bo = (t) => So.find((e) => e.test(t));
|
|
318
317
|
function Oi(t) {
|
|
319
|
-
const e =
|
|
318
|
+
const e = bo(t);
|
|
320
319
|
if (Mt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e) return !1;
|
|
321
320
|
let i = e.parse(t);
|
|
322
|
-
return e === xt && (i =
|
|
321
|
+
return e === xt && (i = Po(i)), i;
|
|
323
322
|
}
|
|
324
323
|
var ji = (t, e) => {
|
|
325
324
|
const i = Oi(t), n = Oi(e);
|
|
@@ -327,14 +326,14 @@ var ji = (t, e) => {
|
|
|
327
326
|
const s = { ...i };
|
|
328
327
|
return (o) => (s.red = Te(i.red, n.red, o), s.green = Te(i.green, n.green, o), s.blue = Te(i.blue, n.blue, o), s.alpha = V(i.alpha, n.alpha, o), dt.transform(s));
|
|
329
328
|
}, ke = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
330
|
-
function
|
|
329
|
+
function Ao(t, e) {
|
|
331
330
|
return ke.has(t) ? (i) => i <= 0 ? t : e : (i) => i >= 1 ? e : t;
|
|
332
331
|
}
|
|
333
|
-
function
|
|
332
|
+
function Vo(t, e) {
|
|
334
333
|
return (i) => V(t, e, i);
|
|
335
334
|
}
|
|
336
335
|
function di(t) {
|
|
337
|
-
return typeof t == "number" ?
|
|
336
|
+
return typeof t == "number" ? Vo : typeof t == "string" ? ci(t) ? ne : R.test(t) ? ji : Do : Array.isArray(t) ? Ss : typeof t == "object" ? R.test(t) ? ji : Mo : ne;
|
|
338
337
|
}
|
|
339
338
|
function Ss(t, e) {
|
|
340
339
|
const i = [...t], n = i.length, s = t.map((o, r) => di(o)(o, e[r]));
|
|
@@ -343,7 +342,7 @@ function Ss(t, e) {
|
|
|
343
342
|
return i;
|
|
344
343
|
};
|
|
345
344
|
}
|
|
346
|
-
function
|
|
345
|
+
function Mo(t, e) {
|
|
347
346
|
const i = {
|
|
348
347
|
...t,
|
|
349
348
|
...e
|
|
@@ -354,31 +353,31 @@ function Ro(t, e) {
|
|
|
354
353
|
return i;
|
|
355
354
|
};
|
|
356
355
|
}
|
|
357
|
-
function
|
|
356
|
+
function Co(t, e) {
|
|
358
357
|
const i = [], n = {
|
|
359
358
|
color: 0,
|
|
360
359
|
var: 0,
|
|
361
360
|
number: 0
|
|
362
361
|
};
|
|
363
362
|
for (let s = 0; s < e.values.length; s++) {
|
|
364
|
-
const o = e.types[s], r = t.indexes[o][n[o]];
|
|
365
|
-
i[s] =
|
|
363
|
+
const o = e.types[s], r = t.indexes[o][n[o]], a = t.values[r] ?? 0;
|
|
364
|
+
i[s] = a, n[o]++;
|
|
366
365
|
}
|
|
367
366
|
return i;
|
|
368
367
|
}
|
|
369
|
-
var
|
|
370
|
-
const i =
|
|
371
|
-
return n.indexes.var.length === s.indexes.var.length && n.indexes.color.length === s.indexes.color.length && n.indexes.number.length >= s.indexes.number.length ? ke.has(t) && !s.values.length || ke.has(e) && !n.values.length ?
|
|
368
|
+
var Do = (t, e) => {
|
|
369
|
+
const i = _.createTransformer(e), n = bt(t), s = bt(e);
|
|
370
|
+
return n.indexes.var.length === s.indexes.var.length && n.indexes.color.length === s.indexes.color.length && n.indexes.number.length >= s.indexes.number.length ? ke.has(t) && !s.values.length || ke.has(e) && !n.values.length ? Ao(t, e) : Ut(Ss(Co(n, s), s.values), i) : (Mt(!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.`, "complex-values-different"), ne(t, e));
|
|
372
371
|
};
|
|
373
372
|
function bs(t, e, i) {
|
|
374
373
|
return typeof t == "number" && typeof e == "number" && typeof i == "number" ? V(t, e, i) : di(t)(t, e);
|
|
375
374
|
}
|
|
376
|
-
var
|
|
375
|
+
var Eo = (t) => {
|
|
377
376
|
const e = ({ timestamp: i }) => t(i);
|
|
378
377
|
return {
|
|
379
378
|
start: (i = !0) => M.update(e, i),
|
|
380
379
|
stop: () => rt(e),
|
|
381
|
-
now: () =>
|
|
380
|
+
now: () => F.isProcessing ? F.timestamp : O.now()
|
|
382
381
|
};
|
|
383
382
|
}, As = (t, e, i = 10) => {
|
|
384
383
|
let n = "";
|
|
@@ -394,7 +393,7 @@ function pi(t) {
|
|
|
394
393
|
e += i, n = t.next(e);
|
|
395
394
|
return e >= 2e4 ? 1 / 0 : e;
|
|
396
395
|
}
|
|
397
|
-
function
|
|
396
|
+
function Ro(t, e = 100, i) {
|
|
398
397
|
const n = i({
|
|
399
398
|
...t,
|
|
400
399
|
keyframes: [0, e]
|
|
@@ -429,14 +428,14 @@ var C = {
|
|
|
429
428
|
function Be(t, e) {
|
|
430
429
|
return t * Math.sqrt(1 - e * e);
|
|
431
430
|
}
|
|
432
|
-
var
|
|
433
|
-
function
|
|
431
|
+
var Lo = 12;
|
|
432
|
+
function ko(t, e, i) {
|
|
434
433
|
let n = i;
|
|
435
|
-
for (let s = 1; s <
|
|
434
|
+
for (let s = 1; s < Lo; s++) n = n - t(n) / e(n);
|
|
436
435
|
return n;
|
|
437
436
|
}
|
|
438
437
|
var Ni = 1e-3;
|
|
439
|
-
function
|
|
438
|
+
function Bo({ duration: t = C.duration, bounce: e = C.bounce, velocity: i = C.velocity, mass: n = C.mass }) {
|
|
440
439
|
let s, o;
|
|
441
440
|
Mt(t <= W(C.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
442
441
|
let r = 1 - e;
|
|
@@ -447,7 +446,7 @@ function jo({ duration: t = C.duration, bounce: e = C.bounce, velocity: i = C.ve
|
|
|
447
446
|
const u = c * r * t, h = u * i + i, f = Math.pow(r, 2) * Math.pow(c, 2) * t, p = Math.exp(-u), d = Be(Math.pow(c, 2), r);
|
|
448
447
|
return (-s(c) + Ni > 0 ? -1 : 1) * ((h - f) * p) / d;
|
|
449
448
|
}) : (s = (c) => -1e-3 + Math.exp(-c * t) * ((c - i) * t + 1), o = (c) => Math.exp(-c * t) * ((i - c) * (t * t)));
|
|
450
|
-
const a = 5 / t, l =
|
|
449
|
+
const a = 5 / t, l = ko(s, o, a);
|
|
451
450
|
if (t = W(t), isNaN(l)) return {
|
|
452
451
|
stiffness: C.stiffness,
|
|
453
452
|
damping: C.damping,
|
|
@@ -462,7 +461,7 @@ function jo({ duration: t = C.duration, bounce: e = C.bounce, velocity: i = C.ve
|
|
|
462
461
|
};
|
|
463
462
|
}
|
|
464
463
|
}
|
|
465
|
-
var
|
|
464
|
+
var Fo = ["duration", "bounce"], Io = [
|
|
466
465
|
"stiffness",
|
|
467
466
|
"damping",
|
|
468
467
|
"mass"
|
|
@@ -470,7 +469,7 @@ var No = ["duration", "bounce"], Uo = [
|
|
|
470
469
|
function Ui(t, e) {
|
|
471
470
|
return e.some((i) => t[i] !== void 0);
|
|
472
471
|
}
|
|
473
|
-
function
|
|
472
|
+
function Oo(t) {
|
|
474
473
|
let e = {
|
|
475
474
|
velocity: C.velocity,
|
|
476
475
|
stiffness: C.stiffness,
|
|
@@ -479,7 +478,7 @@ function Wo(t) {
|
|
|
479
478
|
isResolvedFromDuration: !1,
|
|
480
479
|
...t
|
|
481
480
|
};
|
|
482
|
-
if (!Ui(t,
|
|
481
|
+
if (!Ui(t, Io) && Ui(t, Fo))
|
|
483
482
|
if (e.velocity = 0, t.visualDuration) {
|
|
484
483
|
const i = t.visualDuration, n = 2 * Math.PI / (i * 1.2), s = n * n, o = 2 * Q(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(s);
|
|
485
484
|
e = {
|
|
@@ -489,7 +488,7 @@ function Wo(t) {
|
|
|
489
488
|
damping: o
|
|
490
489
|
};
|
|
491
490
|
} else {
|
|
492
|
-
const i =
|
|
491
|
+
const i = Bo({
|
|
493
492
|
...t,
|
|
494
493
|
velocity: 0
|
|
495
494
|
});
|
|
@@ -511,31 +510,31 @@ function se(t = C.visualDuration, e = C.bounce) {
|
|
|
511
510
|
const o = i.keyframes[0], r = i.keyframes[i.keyframes.length - 1], a = {
|
|
512
511
|
done: !1,
|
|
513
512
|
value: o
|
|
514
|
-
}, { stiffness: l, damping: c, mass: u, duration: h, velocity: f, isResolvedFromDuration: p } =
|
|
513
|
+
}, { stiffness: l, damping: c, mass: u, duration: h, velocity: f, isResolvedFromDuration: p } = Oo({
|
|
515
514
|
...i,
|
|
516
515
|
velocity: -K(i.velocity || 0)
|
|
517
|
-
}), d = f || 0, m = c / (2 * Math.sqrt(l * u)),
|
|
516
|
+
}), d = f || 0, m = c / (2 * Math.sqrt(l * u)), g = r - o, v = K(Math.sqrt(l / u)), T = Math.abs(g) < 5;
|
|
518
517
|
n || (n = T ? C.restSpeed.granular : C.restSpeed.default), s || (s = T ? C.restDelta.granular : C.restDelta.default);
|
|
519
518
|
let x, w, P, A, D, S;
|
|
520
519
|
if (m < 1)
|
|
521
|
-
P = Be(
|
|
522
|
-
const k = Math.exp(-m *
|
|
523
|
-
return r - k * (A * Math.sin(P * b) +
|
|
524
|
-
}, D = m *
|
|
520
|
+
P = Be(v, m), A = (d + m * v * g) / P, x = (b) => {
|
|
521
|
+
const k = Math.exp(-m * v * b);
|
|
522
|
+
return r - k * (A * Math.sin(P * b) + g * Math.cos(P * b));
|
|
523
|
+
}, D = m * v * A + g * P, S = m * v * g - A * P, w = (b) => Math.exp(-m * v * b) * (D * Math.sin(P * b) + S * Math.cos(P * b));
|
|
525
524
|
else if (m === 1) {
|
|
526
|
-
x = (k) => r - Math.exp(-
|
|
527
|
-
const b = d +
|
|
528
|
-
w = (k) => Math.exp(-
|
|
525
|
+
x = (k) => r - Math.exp(-v * k) * (g + (d + v * g) * k);
|
|
526
|
+
const b = d + v * g;
|
|
527
|
+
w = (k) => Math.exp(-v * k) * (v * b * k - d);
|
|
529
528
|
} else {
|
|
530
|
-
const b =
|
|
529
|
+
const b = v * Math.sqrt(m * m - 1);
|
|
531
530
|
x = (X) => {
|
|
532
|
-
const
|
|
533
|
-
return r -
|
|
531
|
+
const et = Math.exp(-m * v * X), Y = Math.min(b * X, 300);
|
|
532
|
+
return r - et * ((d + m * v * g) * Math.sinh(Y) + b * g * Math.cosh(Y)) / b;
|
|
534
533
|
};
|
|
535
|
-
const k = (d + m *
|
|
534
|
+
const k = (d + m * v * g) / b, N = m * v * k - g * b, at = m * v * g - k * b;
|
|
536
535
|
w = (X) => {
|
|
537
|
-
const
|
|
538
|
-
return
|
|
536
|
+
const et = Math.exp(-m * v * X), Y = Math.min(b * X, 300);
|
|
537
|
+
return et * (N * Math.sinh(Y) + at * Math.cosh(Y));
|
|
539
538
|
};
|
|
540
539
|
}
|
|
541
540
|
const E = {
|
|
@@ -543,8 +542,8 @@ function se(t = C.visualDuration, e = C.bounce) {
|
|
|
543
542
|
velocity: (b) => W(w(b)),
|
|
544
543
|
next: (b) => {
|
|
545
544
|
if (!p && m < 1) {
|
|
546
|
-
const N = Math.exp(-m *
|
|
547
|
-
return a.done = Math.abs(Y) <= n && Math.abs(r -
|
|
545
|
+
const N = Math.exp(-m * v * b), at = Math.sin(P * b), X = Math.cos(P * b), et = r - N * (A * at + g * X), Y = W(N * (D * at + S * X));
|
|
546
|
+
return a.done = Math.abs(Y) <= n && Math.abs(r - et) <= s, a.value = a.done ? r : et, a;
|
|
548
547
|
}
|
|
549
548
|
const k = x(b);
|
|
550
549
|
if (p)
|
|
@@ -565,25 +564,25 @@ function se(t = C.visualDuration, e = C.bounce) {
|
|
|
565
564
|
return E;
|
|
566
565
|
}
|
|
567
566
|
se.applyToOptions = (t) => {
|
|
568
|
-
const e =
|
|
567
|
+
const e = Ro(t, 100, se);
|
|
569
568
|
return t.ease = e.ease, t.duration = W(e.duration), t.type = "keyframes", t;
|
|
570
569
|
};
|
|
571
|
-
var
|
|
570
|
+
var jo = 5;
|
|
572
571
|
function Ms(t, e, i) {
|
|
573
|
-
const n = Math.max(e -
|
|
572
|
+
const n = Math.max(e - jo, 0);
|
|
574
573
|
return rs(i - t(n), e - n);
|
|
575
574
|
}
|
|
576
|
-
function
|
|
575
|
+
function Fe({ keyframes: t, velocity: e = 0, power: i = 0.8, timeConstant: n = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
|
|
577
576
|
const h = t[0], f = {
|
|
578
577
|
done: !1,
|
|
579
578
|
value: h
|
|
580
579
|
}, p = (S) => a !== void 0 && S < a || l !== void 0 && S > l, d = (S) => a === void 0 ? l : l === void 0 || Math.abs(a - S) < Math.abs(l - S) ? a : l;
|
|
581
580
|
let m = i * e;
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
const T = (S) => -m * Math.exp(-S / n), x = (S) =>
|
|
581
|
+
const g = h + m, v = r === void 0 ? g : r(g);
|
|
582
|
+
v !== g && (m = v - h);
|
|
583
|
+
const T = (S) => -m * Math.exp(-S / n), x = (S) => v + T(S), w = (S) => {
|
|
585
584
|
const E = T(S), b = x(S);
|
|
586
|
-
f.done = Math.abs(E) <= c, f.value = f.done ?
|
|
585
|
+
f.done = Math.abs(E) <= c, f.value = f.done ? v : b;
|
|
587
586
|
};
|
|
588
587
|
let P, A;
|
|
589
588
|
const D = (S) => {
|
|
@@ -604,71 +603,75 @@ function Ie({ keyframes: t, velocity: e = 0, power: i = 0.8, timeConstant: n = 3
|
|
|
604
603
|
}
|
|
605
604
|
};
|
|
606
605
|
}
|
|
607
|
-
function
|
|
606
|
+
function No(t, e, i) {
|
|
608
607
|
const n = [], s = i || st.mix || bs, o = t.length - 1;
|
|
609
608
|
for (let r = 0; r < o; r++) {
|
|
610
609
|
let a = s(t[r], t[r + 1]);
|
|
611
|
-
|
|
610
|
+
if (e) {
|
|
611
|
+
const l = Array.isArray(e) ? e[r] || z : e;
|
|
612
|
+
a = Ut(l, a);
|
|
613
|
+
}
|
|
614
|
+
n.push(a);
|
|
612
615
|
}
|
|
613
616
|
return n;
|
|
614
617
|
}
|
|
615
|
-
function
|
|
618
|
+
function Uo(t, e, { clamp: i = !0, ease: n, mixer: s } = {}) {
|
|
616
619
|
const o = t.length;
|
|
617
|
-
if (
|
|
620
|
+
if (tt(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1) return () => e[0];
|
|
618
621
|
if (o === 2 && e[0] === e[1]) return () => e[1];
|
|
619
622
|
const r = t[0] === t[1];
|
|
620
623
|
t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
621
|
-
const a =
|
|
624
|
+
const a = No(e, n, s), l = a.length, c = (u) => {
|
|
622
625
|
if (r && u < t[0]) return e[0];
|
|
623
626
|
let h = 0;
|
|
624
627
|
if (l > 1)
|
|
625
628
|
for (; h < t.length - 2 && !(u < t[h + 1]); h++) ;
|
|
626
|
-
const f =
|
|
629
|
+
const f = It(t[h], t[h + 1], u);
|
|
627
630
|
return a[h](f);
|
|
628
631
|
};
|
|
629
632
|
return i ? (u) => c(Q(t[0], t[o - 1], u)) : c;
|
|
630
633
|
}
|
|
631
|
-
function
|
|
634
|
+
function Wo(t, e) {
|
|
632
635
|
const i = t[t.length - 1];
|
|
633
636
|
for (let n = 1; n <= e; n++) {
|
|
634
|
-
const s =
|
|
637
|
+
const s = It(0, e, n);
|
|
635
638
|
t.push(V(i, 1, s));
|
|
636
639
|
}
|
|
637
640
|
}
|
|
638
|
-
function
|
|
641
|
+
function $o(t) {
|
|
639
642
|
const e = [0];
|
|
640
|
-
return
|
|
643
|
+
return Wo(e, t.length - 1), e;
|
|
641
644
|
}
|
|
642
|
-
function
|
|
645
|
+
function Ko(t, e) {
|
|
643
646
|
return t.map((i) => i * e);
|
|
644
647
|
}
|
|
645
|
-
function
|
|
648
|
+
function zo(t, e) {
|
|
646
649
|
return t.map(() => e || ps).splice(0, t.length - 1);
|
|
647
650
|
}
|
|
648
651
|
function wt({ duration: t = 300, keyframes: e, times: i, ease: n = "easeInOut" }) {
|
|
649
|
-
const s =
|
|
652
|
+
const s = Jr(n) ? n.map(ki) : ki(n), o = {
|
|
650
653
|
done: !1,
|
|
651
654
|
value: e[0]
|
|
652
|
-
}, r =
|
|
655
|
+
}, r = Ko(i && i.length === e.length ? i : $o(e), t), a = Uo(r, e, { ease: Array.isArray(s) ? s : zo(e, s) });
|
|
653
656
|
return {
|
|
654
657
|
calculatedDuration: t,
|
|
655
|
-
next: (
|
|
658
|
+
next: (l) => (o.value = a(l), o.done = l >= t, o)
|
|
656
659
|
};
|
|
657
660
|
}
|
|
658
|
-
var
|
|
661
|
+
var Ho = (t) => t !== null;
|
|
659
662
|
function fe(t, { repeat: e, repeatType: i = "loop" }, n, s = 1) {
|
|
660
|
-
const o = t.filter(
|
|
663
|
+
const o = t.filter(Ho), r = s < 0 || e && i !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
|
|
661
664
|
return !r || n === void 0 ? o[r] : n;
|
|
662
665
|
}
|
|
663
|
-
var
|
|
664
|
-
decay:
|
|
665
|
-
inertia:
|
|
666
|
+
var Go = {
|
|
667
|
+
decay: Fe,
|
|
668
|
+
inertia: Fe,
|
|
666
669
|
tween: wt,
|
|
667
670
|
keyframes: wt,
|
|
668
671
|
spring: se
|
|
669
672
|
};
|
|
670
673
|
function Cs(t) {
|
|
671
|
-
typeof t.type == "string" && (t.type =
|
|
674
|
+
typeof t.type == "string" && (t.type = Go[t.type]);
|
|
672
675
|
}
|
|
673
676
|
var mi = class {
|
|
674
677
|
constructor() {
|
|
@@ -688,7 +691,7 @@ var mi = class {
|
|
|
688
691
|
then(t, e) {
|
|
689
692
|
return this.finished.then(t, e);
|
|
690
693
|
}
|
|
691
|
-
},
|
|
694
|
+
}, _o = (t) => t / 100, re = class extends mi {
|
|
692
695
|
constructor(t) {
|
|
693
696
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
|
|
694
697
|
done: !1,
|
|
@@ -704,7 +707,7 @@ var mi = class {
|
|
|
704
707
|
const { type: e = wt, repeat: i = 0, repeatDelay: n = 0, repeatType: s, velocity: o = 0 } = t;
|
|
705
708
|
let { keyframes: r } = t;
|
|
706
709
|
const a = e || wt;
|
|
707
|
-
process.env.NODE_ENV !== "production" && a !== wt &&
|
|
710
|
+
process.env.NODE_ENV !== "production" && a !== wt && tt(r.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`, "spring-two-frames"), a !== wt && typeof r[0] != "number" && (this.mixKeyframes = Ut(_o, bs(r[0], r[1])), r = [0, 100]);
|
|
708
711
|
const l = a({
|
|
709
712
|
...t,
|
|
710
713
|
keyframes: r
|
|
@@ -726,8 +729,8 @@ var mi = class {
|
|
|
726
729
|
if (this.startTime === null) return i.next(0);
|
|
727
730
|
const { delay: l = 0, keyframes: c, repeat: u, repeatType: h, repeatDelay: f, type: p, onUpdate: d, finalKeyframe: m } = this.options;
|
|
728
731
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - n / this.speed, this.startTime)), e ? this.currentTime = t : this.updateTime(t);
|
|
729
|
-
const
|
|
730
|
-
this.currentTime = Math.max(
|
|
732
|
+
const g = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), v = this.playbackSpeed >= 0 ? g < 0 : g > n;
|
|
733
|
+
this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = n);
|
|
731
734
|
let T = this.currentTime, x = i;
|
|
732
735
|
if (u) {
|
|
733
736
|
const D = Math.min(this.currentTime, n) / r;
|
|
@@ -735,11 +738,11 @@ var mi = class {
|
|
|
735
738
|
!E && D >= 1 && (E = 1), E === 1 && S--, S = Math.min(S, u + 1), S % 2 && (h === "reverse" ? (E = 1 - E, f && (E -= f / r)) : h === "mirror" && (x = o)), T = Q(0, 1, E) * r;
|
|
736
739
|
}
|
|
737
740
|
let w;
|
|
738
|
-
|
|
741
|
+
v ? (this.delayState.value = c[0], w = this.delayState) : w = x.next(T), s && !v && (w.value = s(w.value));
|
|
739
742
|
let { done: P } = w;
|
|
740
|
-
!
|
|
743
|
+
!v && a !== null && (P = this.playbackSpeed >= 0 ? this.currentTime >= n : this.currentTime <= 0);
|
|
741
744
|
const A = this.holdTime === null && (this.state === "finished" || this.state === "running" && P);
|
|
742
|
-
return A && p !==
|
|
745
|
+
return A && p !== Fe && (w.value = fe(c, this.options, m, this.speed)), d && d(w.value), A && this.finish(), w;
|
|
743
746
|
}
|
|
744
747
|
then(t, e) {
|
|
745
748
|
return this.finished.then(t, e);
|
|
@@ -773,7 +776,7 @@ var mi = class {
|
|
|
773
776
|
}
|
|
774
777
|
play() {
|
|
775
778
|
if (this.isStopped) return;
|
|
776
|
-
const { driver: t =
|
|
779
|
+
const { driver: t = Eo, startTime: e } = this.options;
|
|
777
780
|
this.driver || (this.driver = t((n) => this.tick(n))), this.options.onPlay?.();
|
|
778
781
|
const i = this.driver.now();
|
|
779
782
|
this.state === "finished" ? (this.updateFinished(), this.startTime = i) : this.holdTime !== null ? this.startTime = i - this.holdTime : this.startTime || (this.startTime = e ?? i), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
@@ -803,13 +806,13 @@ var mi = class {
|
|
|
803
806
|
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), t.observe(this);
|
|
804
807
|
}
|
|
805
808
|
};
|
|
806
|
-
function
|
|
809
|
+
function Xo(t) {
|
|
807
810
|
for (let e = 1; e < t.length; e++) t[e] ?? (t[e] = t[e - 1]);
|
|
808
811
|
}
|
|
809
|
-
var pt = (t) => t * 180 / Math.PI,
|
|
812
|
+
var pt = (t) => t * 180 / Math.PI, Ie = (t) => {
|
|
810
813
|
const e = pt(Math.atan2(t[1], t[0]));
|
|
811
814
|
return Oe(e);
|
|
812
|
-
},
|
|
815
|
+
}, Yo = {
|
|
813
816
|
x: 4,
|
|
814
817
|
y: 5,
|
|
815
818
|
translateX: 4,
|
|
@@ -817,12 +820,12 @@ var pt = (t) => t * 180 / Math.PI, Fe = (t) => {
|
|
|
817
820
|
scaleX: 0,
|
|
818
821
|
scaleY: 3,
|
|
819
822
|
scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
|
|
820
|
-
rotate:
|
|
821
|
-
rotateZ:
|
|
823
|
+
rotate: Ie,
|
|
824
|
+
rotateZ: Ie,
|
|
822
825
|
skewX: (t) => pt(Math.atan(t[1])),
|
|
823
826
|
skewY: (t) => pt(Math.atan(t[2])),
|
|
824
827
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
825
|
-
}, Oe = (t) => (t = t % 360, t < 0 && (t += 360), t), Wi =
|
|
828
|
+
}, Oe = (t) => (t = t % 360, t < 0 && (t += 360), t), Wi = Ie, $i = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Ki = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), qo = {
|
|
826
829
|
x: 12,
|
|
827
830
|
y: 13,
|
|
828
831
|
z: 14,
|
|
@@ -848,20 +851,20 @@ function Ne(t, e) {
|
|
|
848
851
|
const i = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
849
852
|
let n, s;
|
|
850
853
|
if (i)
|
|
851
|
-
n =
|
|
854
|
+
n = qo, s = i;
|
|
852
855
|
else {
|
|
853
856
|
const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
854
|
-
n =
|
|
857
|
+
n = Yo, s = a;
|
|
855
858
|
}
|
|
856
859
|
if (!s) return je(e);
|
|
857
|
-
const o = n[e], r = s[1].split(",").map(
|
|
860
|
+
const o = n[e], r = s[1].split(",").map(Jo);
|
|
858
861
|
return typeof o == "function" ? o(r) : r[o];
|
|
859
862
|
}
|
|
860
|
-
var
|
|
863
|
+
var Zo = (t, e) => {
|
|
861
864
|
const { transform: i = "none" } = getComputedStyle(t);
|
|
862
865
|
return Ne(i, e);
|
|
863
866
|
};
|
|
864
|
-
function
|
|
867
|
+
function Jo(t) {
|
|
865
868
|
return parseFloat(t.trim());
|
|
866
869
|
}
|
|
867
870
|
var Dt = [
|
|
@@ -882,14 +885,14 @@ var Dt = [
|
|
|
882
885
|
"skew",
|
|
883
886
|
"skewX",
|
|
884
887
|
"skewY"
|
|
885
|
-
], Et = /* @__PURE__ */ new Set([...Dt, "pathRotation"]),
|
|
888
|
+
], Et = /* @__PURE__ */ new Set([...Dt, "pathRotation"]), zi = (t) => t === Ct || t === y, Qo = /* @__PURE__ */ new Set([
|
|
886
889
|
"x",
|
|
887
890
|
"y",
|
|
888
891
|
"z"
|
|
889
|
-
]),
|
|
890
|
-
function
|
|
892
|
+
]), ta = Dt.filter((t) => !Qo.has(t));
|
|
893
|
+
function ea(t) {
|
|
891
894
|
const e = [];
|
|
892
|
-
return
|
|
895
|
+
return ta.forEach((i) => {
|
|
893
896
|
const n = t.getValue(i);
|
|
894
897
|
n !== void 0 && (e.push([i, n.get()]), n.set(i.startsWith("scale") ? 1 : 0));
|
|
895
898
|
}), e;
|
|
@@ -917,7 +920,7 @@ function Ds() {
|
|
|
917
920
|
if (We) {
|
|
918
921
|
const t = Array.from(mt).filter((n) => n.needsMeasurement), e = new Set(t.map((n) => n.element)), i = /* @__PURE__ */ new Map();
|
|
919
922
|
e.forEach((n) => {
|
|
920
|
-
const s =
|
|
923
|
+
const s = ea(n);
|
|
921
924
|
s.length && (i.set(n, s), n.render());
|
|
922
925
|
}), t.forEach((n) => n.measureInitialState()), e.forEach((n) => {
|
|
923
926
|
n.render();
|
|
@@ -936,7 +939,7 @@ function Es() {
|
|
|
936
939
|
t.readKeyframes(), t.needsMeasurement && (We = !0);
|
|
937
940
|
});
|
|
938
941
|
}
|
|
939
|
-
function
|
|
942
|
+
function ia() {
|
|
940
943
|
$e = !0, Es(), Ds(), $e = !1;
|
|
941
944
|
}
|
|
942
945
|
var vi = class {
|
|
@@ -957,7 +960,7 @@ var vi = class {
|
|
|
957
960
|
}
|
|
958
961
|
t[0] === void 0 && (t[0] = o), n && s === void 0 && n.set(t[0]);
|
|
959
962
|
}
|
|
960
|
-
|
|
963
|
+
Xo(t);
|
|
961
964
|
}
|
|
962
965
|
setFinalKeyframe() {
|
|
963
966
|
}
|
|
@@ -976,23 +979,23 @@ var vi = class {
|
|
|
976
979
|
resume() {
|
|
977
980
|
this.state === "pending" && this.scheduleResolve();
|
|
978
981
|
}
|
|
979
|
-
},
|
|
982
|
+
}, na = (t) => t.startsWith("--");
|
|
980
983
|
function Rs(t, e, i) {
|
|
981
|
-
|
|
984
|
+
na(e) ? t.style.setProperty(e, i) : t.style[e] = i;
|
|
982
985
|
}
|
|
983
|
-
var
|
|
986
|
+
var sa = {};
|
|
984
987
|
function Ls(t, e) {
|
|
985
988
|
const i = /* @__PURE__ */ ss(t);
|
|
986
|
-
return () =>
|
|
989
|
+
return () => sa[e] ?? i();
|
|
987
990
|
}
|
|
988
|
-
var
|
|
991
|
+
var ra = /* @__PURE__ */ Ls(() => window.ScrollTimeline !== void 0, "scrollTimeline"), ks = /* @__PURE__ */ Ls(() => {
|
|
989
992
|
try {
|
|
990
993
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
991
994
|
} catch {
|
|
992
995
|
return !1;
|
|
993
996
|
}
|
|
994
997
|
return !0;
|
|
995
|
-
}, "linearEasing"), Lt = ([t, e, i, n]) => `cubic-bezier(${t}, ${e}, ${i}, ${n})`,
|
|
998
|
+
}, "linearEasing"), Lt = ([t, e, i, n]) => `cubic-bezier(${t}, ${e}, ${i}, ${n})`, Hi = {
|
|
996
999
|
linear: "linear",
|
|
997
1000
|
ease: "ease",
|
|
998
1001
|
easeIn: "ease-in",
|
|
@@ -1024,9 +1027,9 @@ var ua = /* @__PURE__ */ Ls(() => window.ScrollTimeline !== void 0, "scrollTimel
|
|
|
1024
1027
|
])
|
|
1025
1028
|
};
|
|
1026
1029
|
function Bs(t, e) {
|
|
1027
|
-
if (t) return typeof t == "function" ? ks() ? As(t, e) : "ease-out" : ms(t) ? Lt(t) : Array.isArray(t) ? t.map((i) => Bs(i, e) ||
|
|
1030
|
+
if (t) return typeof t == "function" ? ks() ? As(t, e) : "ease-out" : ms(t) ? Lt(t) : Array.isArray(t) ? t.map((i) => Bs(i, e) || Hi.easeOut) : Hi[t];
|
|
1028
1031
|
}
|
|
1029
|
-
function
|
|
1032
|
+
function oa(t, e, i, { delay: n = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, c = void 0) {
|
|
1030
1033
|
const u = { [e]: i };
|
|
1031
1034
|
l && (u.offset = l);
|
|
1032
1035
|
const h = Bs(a, s);
|
|
@@ -1041,19 +1044,19 @@ function ca(t, e, i, { delay: n = 0, duration: s = 300, repeat: o = 0, repeatTyp
|
|
|
1041
1044
|
};
|
|
1042
1045
|
return c && (f.pseudoElement = c), t.animate(u, f);
|
|
1043
1046
|
}
|
|
1044
|
-
function
|
|
1047
|
+
function Fs(t) {
|
|
1045
1048
|
return typeof t == "function" && "applyToOptions" in t;
|
|
1046
1049
|
}
|
|
1047
|
-
function
|
|
1048
|
-
return
|
|
1050
|
+
function aa({ type: t, ...e }) {
|
|
1051
|
+
return Fs(t) && ks() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
|
|
1049
1052
|
}
|
|
1050
|
-
var
|
|
1053
|
+
var Is = class extends mi {
|
|
1051
1054
|
constructor(t) {
|
|
1052
1055
|
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t) return;
|
|
1053
1056
|
const { element: e, name: i, keyframes: n, pseudoElement: s, allowFlatten: o = !1, finalKeyframe: r, onComplete: a } = t;
|
|
1054
|
-
this.isPseudoElement = !!s, this.allowFlatten = o, this.options = t,
|
|
1055
|
-
const l =
|
|
1056
|
-
this.animation =
|
|
1057
|
+
this.isPseudoElement = !!s, this.allowFlatten = o, this.options = t, tt(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1058
|
+
const l = aa(t);
|
|
1059
|
+
this.animation = oa(e, i, n, l, s), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1057
1060
|
if (this.finishedTime = this.time, !s) {
|
|
1058
1061
|
const c = fe(n, this.options, r, this.speed);
|
|
1059
1062
|
this.updateMotionValue && this.updateMotionValue(c), Rs(e, i, c), this.animation.cancel();
|
|
@@ -1117,22 +1120,22 @@ var Fs = class extends mi {
|
|
|
1117
1120
|
this.manualStartTime = this.animation.startTime = t;
|
|
1118
1121
|
}
|
|
1119
1122
|
attachTimeline({ timeline: t, rangeStart: e, rangeEnd: i, observe: n }) {
|
|
1120
|
-
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t &&
|
|
1123
|
+
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && ra() ? (this.animation.timeline = t, e && (this.animation.rangeStart = e), i && (this.animation.rangeEnd = i), z) : n(this);
|
|
1121
1124
|
}
|
|
1122
1125
|
}, Os = {
|
|
1123
1126
|
anticipate: hs,
|
|
1124
1127
|
backInOut: cs,
|
|
1125
1128
|
circInOut: ds
|
|
1126
1129
|
};
|
|
1127
|
-
function
|
|
1130
|
+
function la(t) {
|
|
1128
1131
|
return t in Os;
|
|
1129
1132
|
}
|
|
1130
|
-
function
|
|
1131
|
-
typeof t.ease == "string" &&
|
|
1133
|
+
function ua(t) {
|
|
1134
|
+
typeof t.ease == "string" && la(t.ease) && (t.ease = Os[t.ease]);
|
|
1132
1135
|
}
|
|
1133
|
-
var xe = 10,
|
|
1136
|
+
var xe = 10, ca = class extends Is {
|
|
1134
1137
|
constructor(t) {
|
|
1135
|
-
|
|
1138
|
+
ua(t), Cs(t), super(t), t.startTime !== void 0 && t.autoplay !== !1 && (this.startTime = t.startTime), this.options = t;
|
|
1136
1139
|
}
|
|
1137
1140
|
updateMotionValue(t) {
|
|
1138
1141
|
const { motionValue: e, onUpdate: i, onComplete: n, element: s, ...o } = this.options;
|
|
@@ -1147,18 +1150,18 @@ var xe = 10, pa = class extends Fs {
|
|
|
1147
1150
|
}), a = Math.max(xe, O.now() - this.startTime), l = Q(0, xe, a - xe), c = r.sample(a).value, { name: u } = this.options;
|
|
1148
1151
|
s && u && Rs(s, u, c), e.setWithVelocity(r.sample(Math.max(0, a - l)).value, c, l), r.stop();
|
|
1149
1152
|
}
|
|
1150
|
-
},
|
|
1151
|
-
function
|
|
1153
|
+
}, Gi = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && (_.test(t) || t === "0") && !t.startsWith("url("));
|
|
1154
|
+
function ha(t) {
|
|
1152
1155
|
const e = t[0];
|
|
1153
1156
|
if (t.length === 1) return !0;
|
|
1154
1157
|
for (let i = 0; i < t.length; i++) if (t[i] !== e) return !0;
|
|
1155
1158
|
}
|
|
1156
|
-
function
|
|
1159
|
+
function fa(t, e, i, n) {
|
|
1157
1160
|
const s = t[0];
|
|
1158
1161
|
if (s === null) return !1;
|
|
1159
1162
|
if (e === "display" || e === "visibility") return !0;
|
|
1160
|
-
const o = t[t.length - 1], r =
|
|
1161
|
-
return Mt(r === a, `You are trying to animate ${e} from "${s}" to "${o}". "${r ? o : s}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 :
|
|
1163
|
+
const o = t[t.length - 1], r = Gi(s, e), a = Gi(o, e);
|
|
1164
|
+
return Mt(r === a, `You are trying to animate ${e} from "${s}" to "${o}". "${r ? o : s}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : ha(t) || (i === "spring" || Fs(i)) && n;
|
|
1162
1165
|
}
|
|
1163
1166
|
function Ke(t) {
|
|
1164
1167
|
t.duration = 0, t.type = "keyframes";
|
|
@@ -1167,13 +1170,14 @@ var js = /* @__PURE__ */ new Set([
|
|
|
1167
1170
|
"opacity",
|
|
1168
1171
|
"clipPath",
|
|
1169
1172
|
"filter",
|
|
1170
|
-
"transform"
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1173
|
+
"transform",
|
|
1174
|
+
"backgroundColor"
|
|
1175
|
+
]), da = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
|
|
1176
|
+
function pa(t) {
|
|
1177
|
+
for (let e = 0; e < t.length; e++) if (typeof t[e] == "string" && da.test(t[e])) return !0;
|
|
1174
1178
|
return !1;
|
|
1175
1179
|
}
|
|
1176
|
-
var
|
|
1180
|
+
var ma = /* @__PURE__ */ new Set([
|
|
1177
1181
|
"color",
|
|
1178
1182
|
"backgroundColor",
|
|
1179
1183
|
"outlineColor",
|
|
@@ -1184,14 +1188,14 @@ var Ta = /* @__PURE__ */ new Set([
|
|
|
1184
1188
|
"borderRightColor",
|
|
1185
1189
|
"borderBottomColor",
|
|
1186
1190
|
"borderLeftColor"
|
|
1187
|
-
]),
|
|
1188
|
-
function
|
|
1189
|
-
const { motionValue: e, name: i, repeatDelay: n, repeatType: s, damping: o, type: r, keyframes: a } = t;
|
|
1190
|
-
if (!(
|
|
1191
|
-
const { onUpdate:
|
|
1192
|
-
return
|
|
1193
|
-
}
|
|
1194
|
-
var
|
|
1191
|
+
]), va = /* @__PURE__ */ ss(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1192
|
+
function ga(t) {
|
|
1193
|
+
const { motionValue: e, name: i, repeatDelay: n, repeatType: s, damping: o, type: r, keyframes: a } = t, l = e?.owner?.current;
|
|
1194
|
+
if (!(l instanceof HTMLElement) && !(l instanceof SVGElement)) return !1;
|
|
1195
|
+
const { onUpdate: c, transformTemplate: u } = e.owner.getProps();
|
|
1196
|
+
return va() && i && (js.has(i) || ma.has(i) && pa(a)) && (i !== "transform" || !u) && !c && !n && s !== "mirror" && o !== 0 && r !== "inertia";
|
|
1197
|
+
}
|
|
1198
|
+
var ya = 40, Ta = class extends mi {
|
|
1195
1199
|
constructor({ autoplay: t = !0, delay: e = 0, type: i = "keyframes", repeat: n = 0, repeatDelay: s = 0, repeatType: o = "loop", keyframes: r, name: a, motionValue: l, element: c, ...u }) {
|
|
1196
1200
|
super(), this.stop = () => {
|
|
1197
1201
|
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
@@ -1215,16 +1219,16 @@ var Pa = 40, Sa = class extends mi {
|
|
|
1215
1219
|
const { name: s, type: o, velocity: r, delay: a, isHandoff: l, onUpdate: c } = i;
|
|
1216
1220
|
this.resolvedAt = O.now();
|
|
1217
1221
|
let u = !0;
|
|
1218
|
-
|
|
1222
|
+
fa(t, s, o, r) || (u = !1, (st.instantAnimations || !a) && c?.(fe(t, i, e)), t[0] = t[t.length - 1], Ke(i), i.repeat = 0);
|
|
1219
1223
|
const h = {
|
|
1220
|
-
startTime: n ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
1224
|
+
startTime: n ? this.resolvedAt ? this.resolvedAt - this.createdAt > ya ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1221
1225
|
finalKeyframe: e,
|
|
1222
1226
|
...i,
|
|
1223
1227
|
keyframes: t
|
|
1224
|
-
}, f = u && !l &&
|
|
1228
|
+
}, f = u && !l && ga(h), p = h.motionValue?.owner?.current;
|
|
1225
1229
|
let d;
|
|
1226
1230
|
if (f) try {
|
|
1227
|
-
d = new
|
|
1231
|
+
d = new ca({
|
|
1228
1232
|
...h,
|
|
1229
1233
|
element: p
|
|
1230
1234
|
});
|
|
@@ -1234,7 +1238,7 @@ var Pa = 40, Sa = class extends mi {
|
|
|
1234
1238
|
else d = new re(h);
|
|
1235
1239
|
d.finished.then(() => {
|
|
1236
1240
|
this.notifyFinished();
|
|
1237
|
-
}).catch(
|
|
1241
|
+
}).catch(z), this.pendingTimeline && (this.stopTimeline = d.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = d;
|
|
1238
1242
|
}
|
|
1239
1243
|
get finished() {
|
|
1240
1244
|
return this._animation ? this.animation.finished : this._finished;
|
|
@@ -1244,7 +1248,7 @@ var Pa = 40, Sa = class extends mi {
|
|
|
1244
1248
|
});
|
|
1245
1249
|
}
|
|
1246
1250
|
get animation() {
|
|
1247
|
-
return this._animation || (this.keyframeResolver?.resume(),
|
|
1251
|
+
return this._animation || (this.keyframeResolver?.resume(), ia()), this._animation;
|
|
1248
1252
|
}
|
|
1249
1253
|
get duration() {
|
|
1250
1254
|
return this.animation.duration;
|
|
@@ -1290,7 +1294,7 @@ function Ns(t, e, i, n = 0, s = 1) {
|
|
|
1290
1294
|
const o = Array.from(t).sort((l, c) => l.sortNodePosition(c)).indexOf(e), r = t.size, a = (r - 1) * n;
|
|
1291
1295
|
return typeof i == "function" ? i(o, r) : s === 1 ? o * n : a - o * n;
|
|
1292
1296
|
}
|
|
1293
|
-
var
|
|
1297
|
+
var _i = 30, xa = (t) => !isNaN(parseFloat(t)), Xi = { current: void 0 }, wa = class {
|
|
1294
1298
|
constructor(t, e = {}) {
|
|
1295
1299
|
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (i) => {
|
|
1296
1300
|
const n = O.now();
|
|
@@ -1299,7 +1303,7 @@ var Gi = 30, ba = (t) => !isNaN(parseFloat(t)), Xi = { current: void 0 }, Aa = c
|
|
|
1299
1303
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = e.owner;
|
|
1300
1304
|
}
|
|
1301
1305
|
setCurrent(t) {
|
|
1302
|
-
this.current = t, this.updatedAt = O.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity =
|
|
1306
|
+
this.current = t, this.updatedAt = O.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = xa(this.current));
|
|
1303
1307
|
}
|
|
1304
1308
|
setPrevFrameValue(t = this.current) {
|
|
1305
1309
|
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -1348,8 +1352,8 @@ var Gi = 30, ba = (t) => !isNaN(parseFloat(t)), Xi = { current: void 0 }, Aa = c
|
|
|
1348
1352
|
}
|
|
1349
1353
|
getVelocity() {
|
|
1350
1354
|
const t = O.now();
|
|
1351
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt >
|
|
1352
|
-
const e = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
1355
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > _i) return 0;
|
|
1356
|
+
const e = Math.min(this.updatedAt - this.prevUpdatedAt, _i);
|
|
1353
1357
|
return rs(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
|
|
1354
1358
|
}
|
|
1355
1359
|
start(t) {
|
|
@@ -1373,7 +1377,7 @@ var Gi = 30, ba = (t) => !isNaN(parseFloat(t)), Xi = { current: void 0 }, Aa = c
|
|
|
1373
1377
|
}
|
|
1374
1378
|
};
|
|
1375
1379
|
function At(t, e) {
|
|
1376
|
-
return new
|
|
1380
|
+
return new wa(t, e);
|
|
1377
1381
|
}
|
|
1378
1382
|
function Us(t, e) {
|
|
1379
1383
|
if (t?.inherit && e) {
|
|
@@ -1389,20 +1393,20 @@ function gi(t, e) {
|
|
|
1389
1393
|
const i = t?.[e] ?? t?.default ?? t;
|
|
1390
1394
|
return i !== t ? Us(i, t) : i;
|
|
1391
1395
|
}
|
|
1392
|
-
var
|
|
1396
|
+
var Pa = {
|
|
1393
1397
|
type: "spring",
|
|
1394
1398
|
stiffness: 500,
|
|
1395
1399
|
damping: 25,
|
|
1396
1400
|
restSpeed: 10
|
|
1397
|
-
},
|
|
1401
|
+
}, Sa = (t) => ({
|
|
1398
1402
|
type: "spring",
|
|
1399
1403
|
stiffness: 550,
|
|
1400
1404
|
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
1401
1405
|
restSpeed: 10
|
|
1402
|
-
}),
|
|
1406
|
+
}), ba = {
|
|
1403
1407
|
type: "keyframes",
|
|
1404
1408
|
duration: 0.8
|
|
1405
|
-
},
|
|
1409
|
+
}, Aa = {
|
|
1406
1410
|
type: "keyframes",
|
|
1407
1411
|
ease: [
|
|
1408
1412
|
0.25,
|
|
@@ -1411,7 +1415,7 @@ var Va = {
|
|
|
1411
1415
|
1
|
|
1412
1416
|
],
|
|
1413
1417
|
duration: 0.3
|
|
1414
|
-
},
|
|
1418
|
+
}, Va = (t, { keyframes: e }) => e.length > 2 ? ba : Et.has(t) ? t.startsWith("scale") ? Sa(e[1]) : Pa : Aa, Ma = /* @__PURE__ */ new Set([
|
|
1415
1419
|
"when",
|
|
1416
1420
|
"delay",
|
|
1417
1421
|
"delayChildren",
|
|
@@ -1423,8 +1427,8 @@ var Va = {
|
|
|
1423
1427
|
"from",
|
|
1424
1428
|
"elapsed"
|
|
1425
1429
|
]);
|
|
1426
|
-
function
|
|
1427
|
-
for (const e in t) if (!
|
|
1430
|
+
function Ca(t) {
|
|
1431
|
+
for (const e in t) if (!Ma.has(e)) return !0;
|
|
1428
1432
|
return !1;
|
|
1429
1433
|
}
|
|
1430
1434
|
var yi = (t, e, i, n = {}, s, o) => (r) => {
|
|
@@ -1447,7 +1451,7 @@ var yi = (t, e, i, n = {}, s, o) => (r) => {
|
|
|
1447
1451
|
motionValue: e,
|
|
1448
1452
|
element: o ? void 0 : s
|
|
1449
1453
|
};
|
|
1450
|
-
|
|
1454
|
+
Ca(a) || Object.assign(u, Va(t, u)), u.duration && (u.duration = W(u.duration)), u.repeatDelay && (u.repeatDelay = W(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
1451
1455
|
let h = !1;
|
|
1452
1456
|
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (Ke(u), u.delay === 0 && (h = !0)), (st.instantAnimations || st.skipAnimations || s?.shouldSkipAnimations || a.skipAnimations) && (h = !0, Ke(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
|
|
1453
1457
|
const f = fe(u.keyframes, a);
|
|
@@ -1458,18 +1462,18 @@ var yi = (t, e, i, n = {}, s, o) => (r) => {
|
|
|
1458
1462
|
return;
|
|
1459
1463
|
}
|
|
1460
1464
|
}
|
|
1461
|
-
return a.isSync ? new re(u) : new
|
|
1462
|
-
},
|
|
1463
|
-
function
|
|
1464
|
-
const e =
|
|
1465
|
+
return a.isSync ? new re(u) : new Ta(u);
|
|
1466
|
+
}, Da = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
|
|
1467
|
+
function Ea(t) {
|
|
1468
|
+
const e = Da.exec(t);
|
|
1465
1469
|
if (!e) return [,];
|
|
1466
1470
|
const [, i, n, s] = e;
|
|
1467
1471
|
return [`--${i ?? n}`, s];
|
|
1468
1472
|
}
|
|
1469
|
-
var
|
|
1473
|
+
var Ra = 4;
|
|
1470
1474
|
function Ws(t, e, i = 1) {
|
|
1471
|
-
|
|
1472
|
-
const [n, s] =
|
|
1475
|
+
tt(i <= Ra, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1476
|
+
const [n, s] = Ea(t);
|
|
1473
1477
|
if (!n) return;
|
|
1474
1478
|
const o = window.getComputedStyle(e).getPropertyValue(n);
|
|
1475
1479
|
if (o) {
|
|
@@ -1507,28 +1511,28 @@ var $s = /* @__PURE__ */ new Set([
|
|
|
1507
1511
|
"right",
|
|
1508
1512
|
"bottom",
|
|
1509
1513
|
...Dt
|
|
1510
|
-
]),
|
|
1511
|
-
function
|
|
1514
|
+
]), ze = (t) => Array.isArray(t);
|
|
1515
|
+
function La(t, e, i) {
|
|
1512
1516
|
t.hasValue(e) ? t.getValue(e).set(i) : t.addValue(e, At(i));
|
|
1513
1517
|
}
|
|
1514
|
-
function
|
|
1515
|
-
return
|
|
1518
|
+
function ka(t) {
|
|
1519
|
+
return ze(t) ? t[t.length - 1] || 0 : t;
|
|
1516
1520
|
}
|
|
1517
|
-
function
|
|
1521
|
+
function Ba(t, e) {
|
|
1518
1522
|
let { transitionEnd: i = {}, transition: n = {}, ...s } = vt(t, e) || {};
|
|
1519
1523
|
s = {
|
|
1520
1524
|
...s,
|
|
1521
1525
|
...i
|
|
1522
1526
|
};
|
|
1523
|
-
for (const o in s)
|
|
1527
|
+
for (const o in s) La(t, o, ka(s[o]));
|
|
1524
1528
|
}
|
|
1525
|
-
var
|
|
1526
|
-
function
|
|
1527
|
-
return !!(
|
|
1529
|
+
var I = (t) => !!(t && t.getVelocity);
|
|
1530
|
+
function Fa(t) {
|
|
1531
|
+
return !!(I(t) && t.add);
|
|
1528
1532
|
}
|
|
1529
|
-
function
|
|
1533
|
+
function He(t, e) {
|
|
1530
1534
|
const i = t.getValue("willChange");
|
|
1531
|
-
if (
|
|
1535
|
+
if (Fa(i)) return i.add(e);
|
|
1532
1536
|
if (!i && st.WillChange) {
|
|
1533
1537
|
const n = new st.WillChange("auto");
|
|
1534
1538
|
t.addValue("willChange", n), n.add(e);
|
|
@@ -1537,15 +1541,15 @@ function ze(t, e) {
|
|
|
1537
1541
|
function xi(t) {
|
|
1538
1542
|
return t.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
|
|
1539
1543
|
}
|
|
1540
|
-
var
|
|
1541
|
-
function
|
|
1544
|
+
var Ia = "framerAppearId", Ks = "data-" + xi(Ia);
|
|
1545
|
+
function zs(t) {
|
|
1542
1546
|
return t.props[Ks];
|
|
1543
1547
|
}
|
|
1544
|
-
function
|
|
1548
|
+
function Oa({ protectedKeys: t, needsAnimating: e }, i) {
|
|
1545
1549
|
const n = t.hasOwnProperty(i) && e[i] !== !0;
|
|
1546
1550
|
return e[i] = !1, n;
|
|
1547
1551
|
}
|
|
1548
|
-
function
|
|
1552
|
+
function Hs(t, e, { delay: i = 0, transitionOverride: n, type: s } = {}) {
|
|
1549
1553
|
let { transition: o, transitionEnd: r, ...a } = e;
|
|
1550
1554
|
const l = t.getDefaultTransition();
|
|
1551
1555
|
o = o ? Us(o, l) : l;
|
|
@@ -1554,118 +1558,118 @@ function zs(t, e, { delay: i = 0, transitionOverride: n, type: s } = {}) {
|
|
|
1554
1558
|
const h = [], f = s && t.animationState && t.animationState.getState()[s], p = o?.path;
|
|
1555
1559
|
p && p.animateVisualElement(t, a, o, i, h);
|
|
1556
1560
|
for (const d in a) {
|
|
1557
|
-
const m = t.getValue(d, t.latestValues[d] ?? null),
|
|
1558
|
-
if (
|
|
1559
|
-
const
|
|
1561
|
+
const m = t.getValue(d, t.latestValues[d] ?? null), g = a[d];
|
|
1562
|
+
if (g === void 0 || f && Oa(f, d)) continue;
|
|
1563
|
+
const v = {
|
|
1560
1564
|
delay: i,
|
|
1561
1565
|
...gi(o || {}, d)
|
|
1562
1566
|
};
|
|
1563
|
-
u && (
|
|
1567
|
+
u && (v.skipAnimations = !0);
|
|
1564
1568
|
const T = m.get();
|
|
1565
|
-
if (T !== void 0 && !m.isAnimating() && !Array.isArray(
|
|
1566
|
-
M.update(() => m.set(
|
|
1569
|
+
if (T !== void 0 && !m.isAnimating() && !Array.isArray(g) && g === T && !v.velocity) {
|
|
1570
|
+
M.update(() => m.set(g));
|
|
1567
1571
|
continue;
|
|
1568
1572
|
}
|
|
1569
1573
|
let x = !1;
|
|
1570
1574
|
if (window.MotionHandoffAnimation) {
|
|
1571
|
-
const A =
|
|
1575
|
+
const A = zs(t);
|
|
1572
1576
|
if (A) {
|
|
1573
1577
|
const D = window.MotionHandoffAnimation(A, d, M);
|
|
1574
|
-
D !== null && (
|
|
1578
|
+
D !== null && (v.startTime = D, x = !0);
|
|
1575
1579
|
}
|
|
1576
1580
|
}
|
|
1577
|
-
|
|
1581
|
+
He(t, d);
|
|
1578
1582
|
const w = c ?? t.shouldReduceMotion;
|
|
1579
|
-
m.start(yi(d, m,
|
|
1583
|
+
m.start(yi(d, m, g, w && $s.has(d) ? { type: !1 } : v, t, x));
|
|
1580
1584
|
const P = m.animation;
|
|
1581
1585
|
P && h.push(P);
|
|
1582
1586
|
}
|
|
1583
1587
|
if (r) {
|
|
1584
1588
|
const d = () => M.update(() => {
|
|
1585
|
-
r &&
|
|
1589
|
+
r && Ba(t, r);
|
|
1586
1590
|
});
|
|
1587
1591
|
h.length ? Promise.all(h).then(d) : d();
|
|
1588
1592
|
}
|
|
1589
1593
|
return h;
|
|
1590
1594
|
}
|
|
1591
|
-
function
|
|
1595
|
+
function Ge(t, e, i = {}) {
|
|
1592
1596
|
const n = vt(t, e, i.type === "exit" ? t.presenceContext?.custom : void 0);
|
|
1593
1597
|
let { transition: s = t.getDefaultTransition() || {} } = n || {};
|
|
1594
1598
|
i.transitionOverride && (s = i.transitionOverride);
|
|
1595
|
-
const o = n ? () => Promise.all(
|
|
1599
|
+
const o = n ? () => Promise.all(Hs(t, n, i)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (l = 0) => {
|
|
1596
1600
|
const { delayChildren: c = 0, staggerChildren: u, staggerDirection: h } = s;
|
|
1597
|
-
return
|
|
1601
|
+
return ja(t, e, l, c, u, h, i);
|
|
1598
1602
|
} : () => Promise.resolve(), { when: a } = s;
|
|
1599
1603
|
if (a) {
|
|
1600
1604
|
const [l, c] = a === "beforeChildren" ? [o, r] : [r, o];
|
|
1601
1605
|
return l().then(() => c());
|
|
1602
1606
|
} else return Promise.all([o(), r(i.delay)]);
|
|
1603
1607
|
}
|
|
1604
|
-
function
|
|
1608
|
+
function ja(t, e, i = 0, n = 0, s = 0, o = 1, r) {
|
|
1605
1609
|
const a = [];
|
|
1606
1610
|
for (const l of t.variantChildren)
|
|
1607
|
-
l.notify("AnimationStart", e), a.push(
|
|
1611
|
+
l.notify("AnimationStart", e), a.push(Ge(l, e, {
|
|
1608
1612
|
...r,
|
|
1609
1613
|
delay: i + (typeof n == "function" ? 0 : n) + Ns(t.variantChildren, l, n, s, o)
|
|
1610
1614
|
}).then(() => l.notify("AnimationComplete", e)));
|
|
1611
1615
|
return Promise.all(a);
|
|
1612
1616
|
}
|
|
1613
|
-
function
|
|
1617
|
+
function Na(t, e, i = {}) {
|
|
1614
1618
|
t.notify("AnimationStart", e);
|
|
1615
1619
|
let n;
|
|
1616
1620
|
if (Array.isArray(e)) {
|
|
1617
|
-
const s = e.map((o) =>
|
|
1621
|
+
const s = e.map((o) => Ge(t, o, i));
|
|
1618
1622
|
n = Promise.all(s);
|
|
1619
|
-
} else if (typeof e == "string") n =
|
|
1623
|
+
} else if (typeof e == "string") n = Ge(t, e, i);
|
|
1620
1624
|
else {
|
|
1621
1625
|
const s = typeof e == "function" ? vt(t, e, i.custom) : e;
|
|
1622
|
-
n = Promise.all(
|
|
1626
|
+
n = Promise.all(Hs(t, s, i));
|
|
1623
1627
|
}
|
|
1624
1628
|
return n.then(() => {
|
|
1625
1629
|
t.notify("AnimationComplete", e);
|
|
1626
1630
|
});
|
|
1627
1631
|
}
|
|
1628
|
-
var
|
|
1632
|
+
var Ua = {
|
|
1629
1633
|
test: (t) => t === "auto",
|
|
1630
1634
|
parse: (t) => t
|
|
1631
|
-
},
|
|
1635
|
+
}, Gs = (t) => (e) => e.test(t), _s = [
|
|
1632
1636
|
Ct,
|
|
1633
1637
|
y,
|
|
1634
1638
|
J,
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
], qi = (t) =>
|
|
1640
|
-
function
|
|
1639
|
+
it,
|
|
1640
|
+
co,
|
|
1641
|
+
uo,
|
|
1642
|
+
Ua
|
|
1643
|
+
], qi = (t) => _s.find(Gs(t));
|
|
1644
|
+
function Wa(t) {
|
|
1641
1645
|
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || ns(t) : !0;
|
|
1642
1646
|
}
|
|
1643
|
-
var
|
|
1647
|
+
var $a = /* @__PURE__ */ new Set([
|
|
1644
1648
|
"brightness",
|
|
1645
1649
|
"contrast",
|
|
1646
1650
|
"saturate",
|
|
1647
1651
|
"opacity"
|
|
1648
1652
|
]);
|
|
1649
|
-
function
|
|
1653
|
+
function Ka(t) {
|
|
1650
1654
|
const [e, i] = t.slice(0, -1).split("(");
|
|
1651
1655
|
if (e === "drop-shadow") return t;
|
|
1652
1656
|
const [n] = i.match(hi) || [];
|
|
1653
1657
|
if (!n) return t;
|
|
1654
1658
|
const s = i.replace(n, "");
|
|
1655
|
-
let o =
|
|
1659
|
+
let o = $a.has(e) ? 1 : 0;
|
|
1656
1660
|
return n !== i && (o *= 100), e + "(" + o + s + ")";
|
|
1657
1661
|
}
|
|
1658
|
-
var
|
|
1659
|
-
...
|
|
1662
|
+
var za = /\b([a-z-]*)\(.*?\)/gu, _e = {
|
|
1663
|
+
..._,
|
|
1660
1664
|
getAnimatableNone: (t) => {
|
|
1661
|
-
const e = t.match(
|
|
1662
|
-
return e ? e.map(
|
|
1665
|
+
const e = t.match(za);
|
|
1666
|
+
return e ? e.map(Ka).join(" ") : t;
|
|
1663
1667
|
}
|
|
1664
1668
|
}, Xe = {
|
|
1665
|
-
...
|
|
1669
|
+
..._,
|
|
1666
1670
|
getAnimatableNone: (t) => {
|
|
1667
|
-
const e =
|
|
1668
|
-
return
|
|
1671
|
+
const e = _.parse(t);
|
|
1672
|
+
return _.createTransformer(t)(e.map((i) => typeof i == "number" ? 0 : typeof i == "object" ? {
|
|
1669
1673
|
...i,
|
|
1670
1674
|
alpha: 1
|
|
1671
1675
|
} : i));
|
|
@@ -1673,19 +1677,19 @@ var Xa = /\b([a-z-]*)\(.*?\)/gu, Ge = {
|
|
|
1673
1677
|
}, Zi = {
|
|
1674
1678
|
...Ct,
|
|
1675
1679
|
transform: Math.round
|
|
1676
|
-
},
|
|
1677
|
-
rotate:
|
|
1678
|
-
pathRotation:
|
|
1679
|
-
rotateX:
|
|
1680
|
-
rotateY:
|
|
1681
|
-
rotateZ:
|
|
1682
|
-
scale:
|
|
1683
|
-
scaleX:
|
|
1684
|
-
scaleY:
|
|
1685
|
-
scaleZ:
|
|
1686
|
-
skew:
|
|
1687
|
-
skewX:
|
|
1688
|
-
skewY:
|
|
1680
|
+
}, Ha = {
|
|
1681
|
+
rotate: it,
|
|
1682
|
+
pathRotation: it,
|
|
1683
|
+
rotateX: it,
|
|
1684
|
+
rotateY: it,
|
|
1685
|
+
rotateZ: it,
|
|
1686
|
+
scale: Ht,
|
|
1687
|
+
scaleX: Ht,
|
|
1688
|
+
scaleY: Ht,
|
|
1689
|
+
scaleZ: Ht,
|
|
1690
|
+
skew: it,
|
|
1691
|
+
skewX: it,
|
|
1692
|
+
skewY: it,
|
|
1689
1693
|
distance: y,
|
|
1690
1694
|
translateX: y,
|
|
1691
1695
|
translateY: y,
|
|
@@ -1696,8 +1700,8 @@ var Xa = /\b([a-z-]*)\(.*?\)/gu, Ge = {
|
|
|
1696
1700
|
perspective: y,
|
|
1697
1701
|
transformPerspective: y,
|
|
1698
1702
|
opacity: Ot,
|
|
1699
|
-
originX:
|
|
1700
|
-
originY:
|
|
1703
|
+
originX: Fi,
|
|
1704
|
+
originY: Fi,
|
|
1701
1705
|
originZ: y
|
|
1702
1706
|
}, oe = {
|
|
1703
1707
|
borderWidth: y,
|
|
@@ -1750,12 +1754,12 @@ var Xa = /\b([a-z-]*)\(.*?\)/gu, Ge = {
|
|
|
1750
1754
|
fontSize: y,
|
|
1751
1755
|
backgroundPositionX: y,
|
|
1752
1756
|
backgroundPositionY: y,
|
|
1753
|
-
...
|
|
1757
|
+
...Ha,
|
|
1754
1758
|
zIndex: Zi,
|
|
1755
1759
|
fillOpacity: Ot,
|
|
1756
1760
|
strokeOpacity: Ot,
|
|
1757
1761
|
numOctaves: Zi
|
|
1758
|
-
},
|
|
1762
|
+
}, Ga = {
|
|
1759
1763
|
...oe,
|
|
1760
1764
|
color: R,
|
|
1761
1765
|
backgroundColor: R,
|
|
@@ -1767,29 +1771,29 @@ var Xa = /\b([a-z-]*)\(.*?\)/gu, Ge = {
|
|
|
1767
1771
|
borderRightColor: R,
|
|
1768
1772
|
borderBottomColor: R,
|
|
1769
1773
|
borderLeftColor: R,
|
|
1770
|
-
filter:
|
|
1771
|
-
WebkitFilter:
|
|
1774
|
+
filter: _e,
|
|
1775
|
+
WebkitFilter: _e,
|
|
1772
1776
|
mask: Xe,
|
|
1773
1777
|
WebkitMask: Xe
|
|
1774
|
-
}, Xs = (t) =>
|
|
1778
|
+
}, Xs = (t) => Ga[t], _a = /* @__PURE__ */ new Set([_e, Xe]);
|
|
1775
1779
|
function Ys(t, e) {
|
|
1776
1780
|
let i = Xs(t);
|
|
1777
|
-
return
|
|
1781
|
+
return _a.has(i) || (i = _), i.getAnimatableNone ? i.getAnimatableNone(e) : void 0;
|
|
1778
1782
|
}
|
|
1779
|
-
var
|
|
1783
|
+
var Xa = /* @__PURE__ */ new Set([
|
|
1780
1784
|
"auto",
|
|
1781
1785
|
"none",
|
|
1782
1786
|
"0"
|
|
1783
1787
|
]);
|
|
1784
|
-
function
|
|
1788
|
+
function Ya(t, e, i) {
|
|
1785
1789
|
let n = 0, s;
|
|
1786
1790
|
for (; n < t.length && !s; ) {
|
|
1787
1791
|
const o = t[n];
|
|
1788
|
-
typeof o == "string" && !
|
|
1792
|
+
typeof o == "string" && !Xa.has(o) && bt(o).values.length && (s = t[n]), n++;
|
|
1789
1793
|
}
|
|
1790
1794
|
if (s && i) for (const o of e) t[o] = Ys(i, s);
|
|
1791
1795
|
}
|
|
1792
|
-
var
|
|
1796
|
+
var qa = class extends vi {
|
|
1793
1797
|
constructor(t, e, i, n, s) {
|
|
1794
1798
|
super(t, e, i, n, s, !0);
|
|
1795
1799
|
}
|
|
@@ -1811,7 +1815,7 @@ var tl = class extends vi {
|
|
|
1811
1815
|
return;
|
|
1812
1816
|
}
|
|
1813
1817
|
if (o !== r)
|
|
1814
|
-
if (
|
|
1818
|
+
if (zi(o) && zi(r)) for (let a = 0; a < t.length; a++) {
|
|
1815
1819
|
const l = t[a];
|
|
1816
1820
|
typeof l == "string" && (t[a] = parseFloat(l));
|
|
1817
1821
|
}
|
|
@@ -1819,8 +1823,8 @@ var tl = class extends vi {
|
|
|
1819
1823
|
}
|
|
1820
1824
|
resolveNoneKeyframes() {
|
|
1821
1825
|
const { unresolvedKeyframes: t, name: e } = this, i = [];
|
|
1822
|
-
for (let n = 0; n < t.length; n++) (t[n] === null ||
|
|
1823
|
-
i.length &&
|
|
1826
|
+
for (let n = 0; n < t.length; n++) (t[n] === null || Wa(t[n])) && i.push(n);
|
|
1827
|
+
i.length && Ya(t, i, e);
|
|
1824
1828
|
}
|
|
1825
1829
|
measureInitialState() {
|
|
1826
1830
|
const { element: t, unresolvedKeyframes: e, name: i } = this;
|
|
@@ -1857,21 +1861,21 @@ function qs(t, e, i) {
|
|
|
1857
1861
|
return Array.from(t).filter((n) => n != null);
|
|
1858
1862
|
}
|
|
1859
1863
|
var Ye = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
|
|
1860
|
-
function
|
|
1864
|
+
function Za(t) {
|
|
1861
1865
|
return is(t) && "offsetHeight" in t && !("ownerSVGElement" in t);
|
|
1862
1866
|
}
|
|
1863
|
-
var { schedule: Pi, cancel:
|
|
1867
|
+
var { schedule: Pi, cancel: $c } = /* @__PURE__ */ vs(queueMicrotask, !1), G = {
|
|
1864
1868
|
x: !1,
|
|
1865
1869
|
y: !1
|
|
1866
1870
|
};
|
|
1867
1871
|
function Zs() {
|
|
1868
|
-
return
|
|
1872
|
+
return G.x || G.y;
|
|
1869
1873
|
}
|
|
1870
|
-
function
|
|
1871
|
-
return t === "x" || t === "y" ?
|
|
1872
|
-
|
|
1873
|
-
}) :
|
|
1874
|
-
|
|
1874
|
+
function Ja(t) {
|
|
1875
|
+
return t === "x" || t === "y" ? G[t] ? null : (G[t] = !0, () => {
|
|
1876
|
+
G[t] = !1;
|
|
1877
|
+
}) : G.x || G.y ? null : (G.x = G.y = !0, () => {
|
|
1878
|
+
G.x = G.y = !1;
|
|
1875
1879
|
});
|
|
1876
1880
|
}
|
|
1877
1881
|
function Js(t, e) {
|
|
@@ -1886,55 +1890,55 @@ function Js(t, e) {
|
|
|
1886
1890
|
() => n.abort()
|
|
1887
1891
|
];
|
|
1888
1892
|
}
|
|
1889
|
-
function
|
|
1893
|
+
function Qa(t) {
|
|
1890
1894
|
return !(t.pointerType === "touch" || Zs());
|
|
1891
1895
|
}
|
|
1892
|
-
function
|
|
1896
|
+
function tl(t, e, i = {}) {
|
|
1893
1897
|
const [n, s, o] = Js(t, i);
|
|
1894
1898
|
return n.forEach((r) => {
|
|
1895
1899
|
let a = !1, l = !1, c;
|
|
1896
1900
|
const u = () => {
|
|
1897
1901
|
r.removeEventListener("pointerleave", d);
|
|
1898
|
-
}, h = (
|
|
1899
|
-
c && (c(
|
|
1900
|
-
}, f = (
|
|
1901
|
-
a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), l && (l = !1, h(
|
|
1902
|
+
}, h = (g) => {
|
|
1903
|
+
c && (c(g), c = void 0), u();
|
|
1904
|
+
}, f = (g) => {
|
|
1905
|
+
a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), l && (l = !1, h(g));
|
|
1902
1906
|
}, p = () => {
|
|
1903
1907
|
a = !0, window.addEventListener("pointerup", f, s), window.addEventListener("pointercancel", f, s);
|
|
1904
|
-
}, d = (
|
|
1905
|
-
if (
|
|
1908
|
+
}, d = (g) => {
|
|
1909
|
+
if (g.pointerType !== "touch") {
|
|
1906
1910
|
if (a) {
|
|
1907
1911
|
l = !0;
|
|
1908
1912
|
return;
|
|
1909
1913
|
}
|
|
1910
|
-
h(
|
|
1914
|
+
h(g);
|
|
1911
1915
|
}
|
|
1912
|
-
}, m = (
|
|
1913
|
-
if (!
|
|
1916
|
+
}, m = (g) => {
|
|
1917
|
+
if (!Qa(g)) return;
|
|
1914
1918
|
l = !1;
|
|
1915
|
-
const
|
|
1916
|
-
typeof
|
|
1919
|
+
const v = e(r, g);
|
|
1920
|
+
typeof v == "function" && (c = v, r.addEventListener("pointerleave", d, s));
|
|
1917
1921
|
};
|
|
1918
1922
|
r.addEventListener("pointerenter", m, s), r.addEventListener("pointerdown", p, s);
|
|
1919
1923
|
}), o;
|
|
1920
1924
|
}
|
|
1921
|
-
var Qs = (t, e) => e ? t === e ? !0 : Qs(t, e.parentElement) : !1, Si = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1,
|
|
1925
|
+
var Qs = (t, e) => e ? t === e ? !0 : Qs(t, e.parentElement) : !1, Si = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, el = /* @__PURE__ */ new Set([
|
|
1922
1926
|
"BUTTON",
|
|
1923
1927
|
"INPUT",
|
|
1924
1928
|
"SELECT",
|
|
1925
1929
|
"TEXTAREA",
|
|
1926
1930
|
"A"
|
|
1927
1931
|
]);
|
|
1928
|
-
function
|
|
1929
|
-
return
|
|
1932
|
+
function il(t) {
|
|
1933
|
+
return el.has(t.tagName) || t.isContentEditable === !0;
|
|
1930
1934
|
}
|
|
1931
|
-
var
|
|
1935
|
+
var nl = /* @__PURE__ */ new Set([
|
|
1932
1936
|
"INPUT",
|
|
1933
1937
|
"SELECT",
|
|
1934
1938
|
"TEXTAREA"
|
|
1935
1939
|
]);
|
|
1936
|
-
function
|
|
1937
|
-
return
|
|
1940
|
+
function sl(t) {
|
|
1941
|
+
return nl.has(t.tagName) || t.isContentEditable === !0;
|
|
1938
1942
|
}
|
|
1939
1943
|
var Yt = /* @__PURE__ */ new WeakSet();
|
|
1940
1944
|
function Ji(t) {
|
|
@@ -1948,7 +1952,7 @@ function we(t, e) {
|
|
|
1948
1952
|
bubbles: !0
|
|
1949
1953
|
}));
|
|
1950
1954
|
}
|
|
1951
|
-
var
|
|
1955
|
+
var rl = (t, e) => {
|
|
1952
1956
|
const i = t.currentTarget;
|
|
1953
1957
|
if (!i) return;
|
|
1954
1958
|
const n = Ji(() => {
|
|
@@ -1965,7 +1969,7 @@ function Qi(t) {
|
|
|
1965
1969
|
return Si(t) && !Zs();
|
|
1966
1970
|
}
|
|
1967
1971
|
var tn = /* @__PURE__ */ new WeakSet();
|
|
1968
|
-
function
|
|
1972
|
+
function ol(t, e, i = {}) {
|
|
1969
1973
|
const [n, s, o] = Js(t, i), r = (a) => {
|
|
1970
1974
|
const l = a.currentTarget;
|
|
1971
1975
|
if (!Qi(a) || tn.has(a)) return;
|
|
@@ -1983,33 +1987,33 @@ function cl(t, e, i = {}) {
|
|
|
1983
1987
|
window.addEventListener("pointerup", f, u), window.addEventListener("pointercancel", p, u);
|
|
1984
1988
|
};
|
|
1985
1989
|
return n.forEach((a) => {
|
|
1986
|
-
(i.useGlobalTarget ? window : a).addEventListener("pointerdown", r, s),
|
|
1990
|
+
(i.useGlobalTarget ? window : a).addEventListener("pointerdown", r, s), Za(a) && (a.addEventListener("focus", (l) => rl(l, s)), !il(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
1987
1991
|
}), o;
|
|
1988
1992
|
}
|
|
1989
1993
|
function bi(t) {
|
|
1990
1994
|
return is(t) && "ownerSVGElement" in t;
|
|
1991
1995
|
}
|
|
1992
|
-
var qt = /* @__PURE__ */ new WeakMap(), Zt, tr = (t, e, i) => (n, s) => s && s[0] ? s[0][t + "Size"] : bi(n) && "getBBox" in n ? n.getBBox()[e] : n[i],
|
|
1993
|
-
function
|
|
1996
|
+
var qt = /* @__PURE__ */ new WeakMap(), Zt, tr = (t, e, i) => (n, s) => s && s[0] ? s[0][t + "Size"] : bi(n) && "getBBox" in n ? n.getBBox()[e] : n[i], al = /* @__PURE__ */ tr("inline", "width", "offsetWidth"), ll = /* @__PURE__ */ tr("block", "height", "offsetHeight");
|
|
1997
|
+
function ul({ target: t, borderBoxSize: e }) {
|
|
1994
1998
|
qt.get(t)?.forEach((i) => {
|
|
1995
1999
|
i(t, {
|
|
1996
2000
|
get width() {
|
|
1997
|
-
return
|
|
2001
|
+
return al(t, e);
|
|
1998
2002
|
},
|
|
1999
2003
|
get height() {
|
|
2000
|
-
return
|
|
2004
|
+
return ll(t, e);
|
|
2001
2005
|
}
|
|
2002
2006
|
});
|
|
2003
2007
|
});
|
|
2004
2008
|
}
|
|
2005
|
-
function
|
|
2006
|
-
t.forEach(
|
|
2009
|
+
function cl(t) {
|
|
2010
|
+
t.forEach(ul);
|
|
2007
2011
|
}
|
|
2008
|
-
function
|
|
2009
|
-
typeof ResizeObserver > "u" || (Zt = new ResizeObserver(
|
|
2012
|
+
function hl() {
|
|
2013
|
+
typeof ResizeObserver > "u" || (Zt = new ResizeObserver(cl));
|
|
2010
2014
|
}
|
|
2011
|
-
function
|
|
2012
|
-
Zt ||
|
|
2015
|
+
function fl(t, e) {
|
|
2016
|
+
Zt || hl();
|
|
2013
2017
|
const i = qs(t);
|
|
2014
2018
|
return i.forEach((n) => {
|
|
2015
2019
|
let s = qt.get(n);
|
|
@@ -2022,7 +2026,7 @@ function vl(t, e) {
|
|
|
2022
2026
|
};
|
|
2023
2027
|
}
|
|
2024
2028
|
var Jt = /* @__PURE__ */ new Set(), Pt;
|
|
2025
|
-
function
|
|
2029
|
+
function dl() {
|
|
2026
2030
|
Pt = () => {
|
|
2027
2031
|
const t = {
|
|
2028
2032
|
get width() {
|
|
@@ -2035,26 +2039,26 @@ function gl() {
|
|
|
2035
2039
|
Jt.forEach((e) => e(t));
|
|
2036
2040
|
}, window.addEventListener("resize", Pt);
|
|
2037
2041
|
}
|
|
2038
|
-
function
|
|
2039
|
-
return Jt.add(t), Pt ||
|
|
2042
|
+
function pl(t) {
|
|
2043
|
+
return Jt.add(t), Pt || dl(), () => {
|
|
2040
2044
|
Jt.delete(t), !Jt.size && typeof Pt == "function" && (window.removeEventListener("resize", Pt), Pt = void 0);
|
|
2041
2045
|
};
|
|
2042
2046
|
}
|
|
2043
2047
|
function en(t, e) {
|
|
2044
|
-
return typeof t == "function" ?
|
|
2048
|
+
return typeof t == "function" ? pl(t) : fl(t, e);
|
|
2045
2049
|
}
|
|
2046
2050
|
var yt = {
|
|
2047
2051
|
value: null,
|
|
2048
2052
|
addProjectionMetrics: null
|
|
2049
2053
|
};
|
|
2050
|
-
function
|
|
2054
|
+
function ml(t) {
|
|
2051
2055
|
return bi(t) && t.tagName === "svg";
|
|
2052
2056
|
}
|
|
2053
|
-
var
|
|
2054
|
-
...
|
|
2057
|
+
var vl = [
|
|
2058
|
+
..._s,
|
|
2055
2059
|
R,
|
|
2056
|
-
|
|
2057
|
-
],
|
|
2060
|
+
_
|
|
2061
|
+
], gl = (t) => vl.find(Gs(t)), nn = () => ({
|
|
2058
2062
|
translate: 0,
|
|
2059
2063
|
scale: 1,
|
|
2060
2064
|
origin: 0,
|
|
@@ -2068,7 +2072,7 @@ var xl = [
|
|
|
2068
2072
|
}), L = () => ({
|
|
2069
2073
|
x: sn(),
|
|
2070
2074
|
y: sn()
|
|
2071
|
-
}),
|
|
2075
|
+
}), yl = /* @__PURE__ */ new WeakMap();
|
|
2072
2076
|
function de(t) {
|
|
2073
2077
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
2074
2078
|
}
|
|
@@ -2090,25 +2094,26 @@ function pe(t) {
|
|
|
2090
2094
|
function er(t) {
|
|
2091
2095
|
return !!(pe(t) || t.variants);
|
|
2092
2096
|
}
|
|
2093
|
-
function
|
|
2097
|
+
function Tl(t, e, i) {
|
|
2094
2098
|
for (const n in e) {
|
|
2095
2099
|
const s = e[n], o = i[n];
|
|
2096
|
-
if (
|
|
2097
|
-
else if (
|
|
2098
|
-
else if (o !== s)
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2100
|
+
if (I(s)) t.addValue(n, s);
|
|
2101
|
+
else if (I(o)) t.addValue(n, At(s, { owner: t }));
|
|
2102
|
+
else if (o !== s)
|
|
2103
|
+
if (t.hasValue(n)) {
|
|
2104
|
+
const r = t.getValue(n);
|
|
2105
|
+
r.liveStyle === !0 ? r.jump(s) : r.hasAnimated || r.set(s);
|
|
2106
|
+
} else {
|
|
2107
|
+
const r = t.getStaticValue(n);
|
|
2108
|
+
t.addValue(n, At(r !== void 0 ? r : s, { owner: t }));
|
|
2109
|
+
}
|
|
2105
2110
|
}
|
|
2106
2111
|
for (const n in i) e[n] === void 0 && t.removeValue(n);
|
|
2107
2112
|
return e;
|
|
2108
2113
|
}
|
|
2109
|
-
var qe = { current: null }, ir = { current: !1 },
|
|
2110
|
-
function
|
|
2111
|
-
if (ir.current = !0, !!
|
|
2114
|
+
var qe = { current: null }, ir = { current: !1 }, xl = typeof window < "u";
|
|
2115
|
+
function wl() {
|
|
2116
|
+
if (ir.current = !0, !!xl)
|
|
2112
2117
|
if (window.matchMedia) {
|
|
2113
2118
|
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => qe.current = t.matches;
|
|
2114
2119
|
t.addEventListener("change", e), e();
|
|
@@ -2126,10 +2131,10 @@ var rn = [
|
|
|
2126
2131
|
function nr(t) {
|
|
2127
2132
|
ae = t;
|
|
2128
2133
|
}
|
|
2129
|
-
function
|
|
2134
|
+
function Pl() {
|
|
2130
2135
|
return ae;
|
|
2131
2136
|
}
|
|
2132
|
-
var
|
|
2137
|
+
var Sl = class {
|
|
2133
2138
|
scrapeMotionValuesFromProps(t, e, i) {
|
|
2134
2139
|
return {};
|
|
2135
2140
|
}
|
|
@@ -2145,13 +2150,13 @@ var Ml = class {
|
|
|
2145
2150
|
const { willChange: u, ...h } = this.scrapeMotionValuesFromProps(e, {}, this);
|
|
2146
2151
|
for (const f in h) {
|
|
2147
2152
|
const p = h[f];
|
|
2148
|
-
l[f] !== void 0 &&
|
|
2153
|
+
l[f] !== void 0 && I(p) && p.set(l[f]);
|
|
2149
2154
|
}
|
|
2150
2155
|
}
|
|
2151
2156
|
mount(t) {
|
|
2152
2157
|
if (this.hasBeenMounted) for (const e in this.initialValues)
|
|
2153
2158
|
this.values.get(e)?.jump(this.initialValues[e]), this.latestValues[e] = this.initialValues[e];
|
|
2154
|
-
this.current = t,
|
|
2159
|
+
this.current = t, yl.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, i) => this.bindToMotionValue(i, e)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (ir.current || wl(), this.shouldReduceMotion = qe.current), process.env.NODE_ENV !== "production" && ai(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
|
|
2155
2160
|
}
|
|
2156
2161
|
unmount() {
|
|
2157
2162
|
this.projection && this.projection.unmount(), rt(this.notifyUpdate), rt(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
|
|
@@ -2170,7 +2175,7 @@ var Ml = class {
|
|
|
2170
2175
|
}
|
|
2171
2176
|
bindToMotionValue(t, e) {
|
|
2172
2177
|
if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), e.accelerate && js.has(t) && this.current instanceof HTMLElement) {
|
|
2173
|
-
const { factory: o, keyframes: r, times: a, ease: l, duration: c } = e.accelerate, u = new
|
|
2178
|
+
const { factory: o, keyframes: r, times: a, ease: l, duration: c } = e.accelerate, u = new Is({
|
|
2174
2179
|
element: this.current,
|
|
2175
2180
|
name: t,
|
|
2176
2181
|
keyframes: r,
|
|
@@ -2228,7 +2233,7 @@ var Ml = class {
|
|
|
2228
2233
|
const s = t["on" + n];
|
|
2229
2234
|
s && (this.propEventSubscriptions[n] = this.on(n, s));
|
|
2230
2235
|
}
|
|
2231
|
-
this.prevMotionValues =
|
|
2236
|
+
this.prevMotionValues = Tl(this, this.scrapeMotionValuesFromProps(t, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2232
2237
|
}
|
|
2233
2238
|
getProps() {
|
|
2234
2239
|
return this.props;
|
|
@@ -2269,7 +2274,7 @@ var Ml = class {
|
|
|
2269
2274
|
}
|
|
2270
2275
|
readValue(t, e) {
|
|
2271
2276
|
let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
2272
|
-
return i != null && (typeof i == "string" && (es(i) || ns(i)) ? i = parseFloat(i) : !
|
|
2277
|
+
return i != null && (typeof i == "string" && (es(i) || ns(i)) ? i = parseFloat(i) : !gl(i) && _.test(e) && (i = Ys(t, e)), this.setBaseTarget(t, I(i) ? i.get() : i)), I(i) ? i.get() : i;
|
|
2273
2278
|
}
|
|
2274
2279
|
setBaseTarget(t, e) {
|
|
2275
2280
|
this.baseTarget[t] = e;
|
|
@@ -2283,7 +2288,7 @@ var Ml = class {
|
|
|
2283
2288
|
}
|
|
2284
2289
|
if (e && i !== void 0) return i;
|
|
2285
2290
|
const n = this.getBaseTargetFromProps(this.props, t);
|
|
2286
|
-
return n !== void 0 && !
|
|
2291
|
+
return n !== void 0 && !I(n) ? n : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
|
|
2287
2292
|
}
|
|
2288
2293
|
on(t, e) {
|
|
2289
2294
|
return this.events[t] || (this.events[t] = new oi()), this.events[t].add(e);
|
|
@@ -2294,9 +2299,9 @@ var Ml = class {
|
|
|
2294
2299
|
scheduleRenderMicrotask() {
|
|
2295
2300
|
Pi.render(this.render);
|
|
2296
2301
|
}
|
|
2297
|
-
}, sr = class extends
|
|
2302
|
+
}, sr = class extends Sl {
|
|
2298
2303
|
constructor() {
|
|
2299
|
-
super(...arguments), this.KeyframeResolver =
|
|
2304
|
+
super(...arguments), this.KeyframeResolver = qa;
|
|
2300
2305
|
}
|
|
2301
2306
|
sortInstanceNodePosition(t, e) {
|
|
2302
2307
|
return t.compareDocumentPosition(e) & 2 ? 1 : -1;
|
|
@@ -2311,7 +2316,7 @@ var Ml = class {
|
|
|
2311
2316
|
handleChildMotionValue() {
|
|
2312
2317
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
2313
2318
|
const { children: t } = this.props;
|
|
2314
|
-
|
|
2319
|
+
I(t) && (this.childSubscription = t.on("change", (e) => {
|
|
2315
2320
|
this.current && (this.current.textContent = `${e}`);
|
|
2316
2321
|
}));
|
|
2317
2322
|
}
|
|
@@ -2334,7 +2339,7 @@ function rr({ top: t, left: e, right: i, bottom: n }) {
|
|
|
2334
2339
|
}
|
|
2335
2340
|
};
|
|
2336
2341
|
}
|
|
2337
|
-
function
|
|
2342
|
+
function bl({ x: t, y: e }) {
|
|
2338
2343
|
return {
|
|
2339
2344
|
top: e.min,
|
|
2340
2345
|
right: t.max,
|
|
@@ -2342,7 +2347,7 @@ function Cl({ x: t, y: e }) {
|
|
|
2342
2347
|
left: t.min
|
|
2343
2348
|
};
|
|
2344
2349
|
}
|
|
2345
|
-
function
|
|
2350
|
+
function Al(t, e) {
|
|
2346
2351
|
if (!e) return t;
|
|
2347
2352
|
const i = e({
|
|
2348
2353
|
x: t.left,
|
|
@@ -2386,7 +2391,7 @@ function ar(t, { x: e, y: i }) {
|
|
|
2386
2391
|
Je(t.x, e.translate, e.scale, e.originPoint), Je(t.y, i.translate, i.scale, i.originPoint);
|
|
2387
2392
|
}
|
|
2388
2393
|
var ln = 0.999999999999, un = 1.0000000000001;
|
|
2389
|
-
function
|
|
2394
|
+
function Vl(t, e, i, n = !1) {
|
|
2390
2395
|
const s = i.length;
|
|
2391
2396
|
if (!s) return;
|
|
2392
2397
|
e.x = e.y = 1;
|
|
@@ -2412,21 +2417,21 @@ function Qt(t, e, i) {
|
|
|
2412
2417
|
cn(t.x, hn(e.x, n.x), e.scaleX, e.scale, e.originX), cn(t.y, hn(e.y, n.y), e.scaleY, e.scale, e.originY);
|
|
2413
2418
|
}
|
|
2414
2419
|
function lr(t, e) {
|
|
2415
|
-
return rr(
|
|
2420
|
+
return rr(Al(t.getBoundingClientRect(), e));
|
|
2416
2421
|
}
|
|
2417
|
-
function
|
|
2422
|
+
function Ml(t, e, i) {
|
|
2418
2423
|
const n = lr(t, i), { scroll: s } = e;
|
|
2419
2424
|
return s && (Z(n.x, s.offset.x), Z(n.y, s.offset.y)), n;
|
|
2420
2425
|
}
|
|
2421
|
-
var
|
|
2426
|
+
var Cl = {
|
|
2422
2427
|
x: "translateX",
|
|
2423
2428
|
y: "translateY",
|
|
2424
2429
|
z: "translateZ",
|
|
2425
2430
|
transformPerspective: "perspective"
|
|
2426
|
-
},
|
|
2427
|
-
function
|
|
2431
|
+
}, Dl = Dt.length;
|
|
2432
|
+
function El(t, e, i) {
|
|
2428
2433
|
let n = "", s = !0;
|
|
2429
|
-
for (let r = 0; r <
|
|
2434
|
+
for (let r = 0; r < Dl; r++) {
|
|
2430
2435
|
const a = Dt[r], l = t[a];
|
|
2431
2436
|
if (l === void 0) continue;
|
|
2432
2437
|
let c = !0;
|
|
@@ -2439,7 +2444,7 @@ function Bl(t, e, i) {
|
|
|
2439
2444
|
const u = Ye(l, oe[a]);
|
|
2440
2445
|
if (!c) {
|
|
2441
2446
|
s = !1;
|
|
2442
|
-
const h =
|
|
2447
|
+
const h = Cl[a] || a;
|
|
2443
2448
|
n += `${h}(${u}) `;
|
|
2444
2449
|
}
|
|
2445
2450
|
i && (e[a] = u);
|
|
@@ -2464,7 +2469,7 @@ function Mi(t, e, i) {
|
|
|
2464
2469
|
l.startsWith("origin") ? (a = !0, o[l] = u) : n[l] = u;
|
|
2465
2470
|
}
|
|
2466
2471
|
}
|
|
2467
|
-
if (e.transform || (r || i ? n.transform =
|
|
2472
|
+
if (e.transform || (r || i ? n.transform = El(e, t.transform, i) : n.transform && (n.transform = "none")), a) {
|
|
2468
2473
|
const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = o;
|
|
2469
2474
|
n.transformOrigin = `${l} ${c} ${u}`;
|
|
2470
2475
|
}
|
|
@@ -2481,13 +2486,14 @@ function fn(t, e) {
|
|
|
2481
2486
|
}
|
|
2482
2487
|
var Rt = { correct: (t, e) => {
|
|
2483
2488
|
if (!e.target) return t;
|
|
2484
|
-
if (typeof t == "string")
|
|
2485
|
-
|
|
2489
|
+
if (typeof t == "string")
|
|
2490
|
+
if (y.test(t)) t = parseFloat(t);
|
|
2491
|
+
else return t;
|
|
2486
2492
|
return `${fn(t, e.target.x)}% ${fn(t, e.target.y)}%`;
|
|
2487
|
-
} },
|
|
2488
|
-
const n = t, s =
|
|
2493
|
+
} }, Rl = { correct: (t, { treeScale: e, projectionDelta: i }) => {
|
|
2494
|
+
const n = t, s = _.parse(t);
|
|
2489
2495
|
if (s.length > 5) return n;
|
|
2490
|
-
const o =
|
|
2496
|
+
const o = _.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = i.x.scale * e.x, l = i.y.scale * e.y;
|
|
2491
2497
|
s[0 + r] /= a, s[1 + r] /= l;
|
|
2492
2498
|
const c = V(a, l, 0.5);
|
|
2493
2499
|
return typeof s[2 + r] == "number" && (s[2 + r] /= c), typeof s[3 + r] == "number" && (s[3 + r] /= c), o(s);
|
|
@@ -2500,7 +2506,7 @@ var Rt = { correct: (t, e) => {
|
|
|
2500
2506
|
borderTopRightRadius: Rt,
|
|
2501
2507
|
borderBottomLeftRadius: Rt,
|
|
2502
2508
|
borderBottomRightRadius: Rt,
|
|
2503
|
-
boxShadow:
|
|
2509
|
+
boxShadow: Rl
|
|
2504
2510
|
};
|
|
2505
2511
|
function cr(t, { layout: e, layoutId: i }) {
|
|
2506
2512
|
return Et.has(t) || t.startsWith("origin") || (e || i !== void 0) && (!!Qe[t] || t === "opacity");
|
|
@@ -2508,20 +2514,23 @@ function cr(t, { layout: e, layoutId: i }) {
|
|
|
2508
2514
|
function Ci(t, e, i) {
|
|
2509
2515
|
const n = t.style, s = e?.style, o = {};
|
|
2510
2516
|
if (!n) return o;
|
|
2511
|
-
for (const r in n) (
|
|
2517
|
+
for (const r in n) (I(n[r]) || s && I(s[r]) || cr(r, t) || i?.getValue(r)?.liveStyle !== void 0) && (o[r] = n[r]);
|
|
2512
2518
|
return o;
|
|
2513
2519
|
}
|
|
2514
|
-
function
|
|
2520
|
+
function Ll(t) {
|
|
2515
2521
|
return window.getComputedStyle(t);
|
|
2516
2522
|
}
|
|
2517
|
-
var
|
|
2523
|
+
var kl = class extends sr {
|
|
2518
2524
|
constructor() {
|
|
2519
2525
|
super(...arguments), this.type = "html", this.renderInstance = ur;
|
|
2520
2526
|
}
|
|
2527
|
+
mount(t) {
|
|
2528
|
+
tt(!!t.style, "motion.create() components must forward their ref to a HTML or SVG element", "custom-component-ref"), super.mount(t);
|
|
2529
|
+
}
|
|
2521
2530
|
readValueFromInstance(t, e) {
|
|
2522
|
-
if (Et.has(e)) return this.projection?.isProjecting ? je(e) :
|
|
2531
|
+
if (Et.has(e)) return this.projection?.isProjecting ? je(e) : Zo(t, e);
|
|
2523
2532
|
{
|
|
2524
|
-
const i =
|
|
2533
|
+
const i = Ll(t), n = (ys(e) ? i.getPropertyValue(e) : i[e]) || 0;
|
|
2525
2534
|
return typeof n == "string" ? n.trim() : n;
|
|
2526
2535
|
}
|
|
2527
2536
|
}
|
|
@@ -2534,36 +2543,37 @@ var Ol = class extends sr {
|
|
|
2534
2543
|
scrapeMotionValuesFromProps(t, e, i) {
|
|
2535
2544
|
return Ci(t, e, i);
|
|
2536
2545
|
}
|
|
2537
|
-
},
|
|
2546
|
+
}, Bl = {
|
|
2538
2547
|
offset: "stroke-dashoffset",
|
|
2539
2548
|
array: "stroke-dasharray"
|
|
2540
|
-
},
|
|
2549
|
+
}, Fl = {
|
|
2541
2550
|
offset: "strokeDashoffset",
|
|
2542
2551
|
array: "strokeDasharray"
|
|
2543
2552
|
};
|
|
2544
|
-
function
|
|
2553
|
+
function Il(t, e, i = 1, n = 0, s = !0) {
|
|
2545
2554
|
t.pathLength = 1;
|
|
2546
|
-
const o = s ?
|
|
2555
|
+
const o = s ? Bl : Fl;
|
|
2547
2556
|
t[o.offset] = `${-n}`, t[o.array] = `${e} ${i}`;
|
|
2548
2557
|
}
|
|
2549
|
-
var
|
|
2558
|
+
var hr = [
|
|
2559
|
+
"transform",
|
|
2560
|
+
"opacity",
|
|
2550
2561
|
"offsetDistance",
|
|
2551
2562
|
"offsetPath",
|
|
2552
2563
|
"offsetRotate",
|
|
2553
2564
|
"offsetAnchor"
|
|
2554
2565
|
];
|
|
2555
|
-
function
|
|
2566
|
+
function fr(t, { attrX: e, attrY: i, attrScale: n, pathLength: s, pathSpacing: o = 1, pathOffset: r = 0, ...a }, l, c, u) {
|
|
2556
2567
|
if (Mi(t, a, c), l) {
|
|
2557
2568
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
2558
2569
|
return;
|
|
2559
2570
|
}
|
|
2560
2571
|
t.attrs = t.style, t.style = {};
|
|
2561
2572
|
const { attrs: h, style: f } = t;
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
e !== void 0 && (h.x = e), i !== void 0 && (h.y = i), n !== void 0 && (h.scale = n), s !== void 0 && Ul(h, s, o, r, !1);
|
|
2573
|
+
for (const p of hr) h[p] !== void 0 && (f[p] = h[p], delete h[p]);
|
|
2574
|
+
(f.transform || h.transformOrigin) && (f.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), f.transform && (f.transformBox = u?.transformBox ?? "fill-box", delete h.transformBox), e !== void 0 && (h.x = e), i !== void 0 && (h.y = i), n !== void 0 && (h.scale = n), s !== void 0 && Il(h, s, o, r, !1);
|
|
2565
2575
|
}
|
|
2566
|
-
var
|
|
2576
|
+
var dr = /* @__PURE__ */ new Set([
|
|
2567
2577
|
"baseFrequency",
|
|
2568
2578
|
"diffuseConstant",
|
|
2569
2579
|
"kernelMatrix",
|
|
@@ -2587,20 +2597,20 @@ var fr = /* @__PURE__ */ new Set([
|
|
|
2587
2597
|
"startOffset",
|
|
2588
2598
|
"textLength",
|
|
2589
2599
|
"lengthAdjust"
|
|
2590
|
-
]),
|
|
2591
|
-
function
|
|
2600
|
+
]), pr = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
2601
|
+
function Ol(t, e, i, n) {
|
|
2592
2602
|
ur(t, e, void 0, n);
|
|
2593
|
-
for (const s in e.attrs) t.setAttribute(
|
|
2603
|
+
for (const s in e.attrs) t.setAttribute(dr.has(s) ? s : xi(s), e.attrs[s]);
|
|
2594
2604
|
}
|
|
2595
|
-
function
|
|
2605
|
+
function mr(t, e, i) {
|
|
2596
2606
|
const n = Ci(t, e, i);
|
|
2597
|
-
for (const s in t) if (
|
|
2607
|
+
for (const s in t) if (I(t[s]) || I(e[s])) {
|
|
2598
2608
|
const o = Dt.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
2599
2609
|
n[o] = t[s];
|
|
2600
2610
|
}
|
|
2601
2611
|
return n;
|
|
2602
2612
|
}
|
|
2603
|
-
var
|
|
2613
|
+
var jl = class extends sr {
|
|
2604
2614
|
constructor() {
|
|
2605
2615
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = L;
|
|
2606
2616
|
}
|
|
@@ -2612,47 +2622,51 @@ var Kl = class extends sr {
|
|
|
2612
2622
|
const i = Xs(e);
|
|
2613
2623
|
return i && i.default || 0;
|
|
2614
2624
|
}
|
|
2615
|
-
|
|
2625
|
+
if (hr.includes(e)) {
|
|
2626
|
+
const i = getComputedStyle(t)[e];
|
|
2627
|
+
if (typeof i == "string" && i) return i.trim();
|
|
2628
|
+
}
|
|
2629
|
+
return e = dr.has(e) ? e : xi(e), t.getAttribute(e);
|
|
2616
2630
|
}
|
|
2617
2631
|
scrapeMotionValuesFromProps(t, e, i) {
|
|
2618
|
-
return
|
|
2632
|
+
return mr(t, e, i);
|
|
2619
2633
|
}
|
|
2620
2634
|
build(t, e, i) {
|
|
2621
|
-
|
|
2635
|
+
fr(t, e, this.isSVGTag, i.transformTemplate, i.style);
|
|
2622
2636
|
}
|
|
2623
2637
|
renderInstance(t, e, i, n) {
|
|
2624
|
-
|
|
2638
|
+
Ol(t, e, i, n);
|
|
2625
2639
|
}
|
|
2626
2640
|
mount(t) {
|
|
2627
|
-
this.isSVGTag =
|
|
2641
|
+
this.isSVGTag = pr(t.tagName), super.mount(t);
|
|
2628
2642
|
}
|
|
2629
|
-
},
|
|
2630
|
-
function
|
|
2643
|
+
}, Nl = Vi.length;
|
|
2644
|
+
function vr(t) {
|
|
2631
2645
|
if (!t) return;
|
|
2632
2646
|
if (!t.isControllingVariants) {
|
|
2633
|
-
const i = t.parent ?
|
|
2647
|
+
const i = t.parent ? vr(t.parent) || {} : {};
|
|
2634
2648
|
return t.props.initial !== void 0 && (i.initial = t.props.initial), i;
|
|
2635
2649
|
}
|
|
2636
2650
|
const e = {};
|
|
2637
|
-
for (let i = 0; i <
|
|
2651
|
+
for (let i = 0; i < Nl; i++) {
|
|
2638
2652
|
const n = Vi[i], s = t.props[n];
|
|
2639
2653
|
(jt(s) || s === !1) && (e[n] = s);
|
|
2640
2654
|
}
|
|
2641
2655
|
return e;
|
|
2642
2656
|
}
|
|
2643
|
-
function
|
|
2657
|
+
function gr(t, e) {
|
|
2644
2658
|
if (!Array.isArray(e)) return !1;
|
|
2645
2659
|
const i = e.length;
|
|
2646
2660
|
if (i !== t.length) return !1;
|
|
2647
2661
|
for (let n = 0; n < i; n++) if (e[n] !== t[n]) return !1;
|
|
2648
2662
|
return !0;
|
|
2649
2663
|
}
|
|
2650
|
-
var
|
|
2651
|
-
function
|
|
2652
|
-
return (e) => Promise.all(e.map(({ animation: i, options: n }) =>
|
|
2664
|
+
var Ul = [...Ai].reverse(), Wl = Ai.length;
|
|
2665
|
+
function $l(t) {
|
|
2666
|
+
return (e) => Promise.all(e.map(({ animation: i, options: n }) => Na(t, i, n)));
|
|
2653
2667
|
}
|
|
2654
|
-
function
|
|
2655
|
-
let e =
|
|
2668
|
+
function Kl(t) {
|
|
2669
|
+
let e = $l(t), i = dn(), n = !0, s = !1;
|
|
2656
2670
|
const o = (c) => (u, h) => {
|
|
2657
2671
|
const f = vt(t, h, c === "exit" ? t.presenceContext?.custom : void 0);
|
|
2658
2672
|
if (f) {
|
|
@@ -2669,11 +2683,11 @@ function Xl(t) {
|
|
|
2669
2683
|
e = c(t);
|
|
2670
2684
|
}
|
|
2671
2685
|
function a(c) {
|
|
2672
|
-
const { props: u } = t, h =
|
|
2686
|
+
const { props: u } = t, h = vr(t.parent) || {}, f = [], p = /* @__PURE__ */ new Set();
|
|
2673
2687
|
let d = {}, m = 1 / 0;
|
|
2674
|
-
for (let
|
|
2675
|
-
const T =
|
|
2676
|
-
A === !1 && (m =
|
|
2688
|
+
for (let v = 0; v < Wl; v++) {
|
|
2689
|
+
const T = Ul[v], x = i[T], w = u[T] !== void 0 ? u[T] : h[T], P = jt(w), A = T === c ? x.isActive : null;
|
|
2690
|
+
A === !1 && (m = v);
|
|
2677
2691
|
let D = w === h[T] && w !== u[T] && P;
|
|
2678
2692
|
if (D && (n || s) && t.manuallyAnimateOnMount && (D = !1), x.protectedKeys = { ...d }, !x.isActive && A === null || !w && !x.prevProp || de(w) || typeof w == "boolean") continue;
|
|
2679
2693
|
if (T === "exit" && x.isActive && A !== !0) {
|
|
@@ -2683,15 +2697,15 @@ function Xl(t) {
|
|
|
2683
2697
|
});
|
|
2684
2698
|
continue;
|
|
2685
2699
|
}
|
|
2686
|
-
const S =
|
|
2687
|
-
let E = S || T === c && x.isActive && !D && P ||
|
|
2700
|
+
const S = zl(x.prevProp, w);
|
|
2701
|
+
let E = S || T === c && x.isActive && !D && P || v > m && P, b = !1;
|
|
2688
2702
|
const k = Array.isArray(w) ? w : [w];
|
|
2689
2703
|
let N = k.reduce(o(T), {});
|
|
2690
2704
|
A === !1 && (N = {});
|
|
2691
2705
|
const { prevResolvedValues: at = {} } = x, X = {
|
|
2692
2706
|
...at,
|
|
2693
2707
|
...N
|
|
2694
|
-
},
|
|
2708
|
+
}, et = (B) => {
|
|
2695
2709
|
E = !0, p.has(B) && (b = !0, p.delete(B)), x.needsAnimating[B] = !0;
|
|
2696
2710
|
const $ = t.getValue(B);
|
|
2697
2711
|
$ && ($.liveStyle = !1);
|
|
@@ -2700,7 +2714,7 @@ function Xl(t) {
|
|
|
2700
2714
|
const $ = N[B], lt = at[B];
|
|
2701
2715
|
if (d.hasOwnProperty(B)) continue;
|
|
2702
2716
|
let gt = !1;
|
|
2703
|
-
|
|
2717
|
+
ze($) && ze(lt) ? gt = !gr($, lt) || S : gt = $ !== lt, gt ? $ != null ? et(B) : p.add(B) : $ !== void 0 && p.has(B) ? et(B) : x.protectedKeys[B] = !0;
|
|
2704
2718
|
}
|
|
2705
2719
|
x.prevProp = w, x.prevResolvedValues = N, x.isActive && (d = {
|
|
2706
2720
|
...d,
|
|
@@ -2712,8 +2726,8 @@ function Xl(t) {
|
|
|
2712
2726
|
if (typeof B == "string" && (n || s) && !Y && t.manuallyAnimateOnMount && t.parent) {
|
|
2713
2727
|
const { parent: lt } = t, gt = vt(lt, B);
|
|
2714
2728
|
if (lt.enteringChildren && gt) {
|
|
2715
|
-
const { delayChildren:
|
|
2716
|
-
$.delay = Ns(lt.enteringChildren, t,
|
|
2729
|
+
const { delayChildren: Or } = gt.transition || {};
|
|
2730
|
+
$.delay = Ns(lt.enteringChildren, t, Or);
|
|
2717
2731
|
}
|
|
2718
2732
|
}
|
|
2719
2733
|
return {
|
|
@@ -2723,18 +2737,18 @@ function Xl(t) {
|
|
|
2723
2737
|
}));
|
|
2724
2738
|
}
|
|
2725
2739
|
if (p.size) {
|
|
2726
|
-
const
|
|
2740
|
+
const v = {};
|
|
2727
2741
|
if (typeof u.initial != "boolean") {
|
|
2728
2742
|
const T = vt(t, Array.isArray(u.initial) ? u.initial[0] : u.initial);
|
|
2729
|
-
T && T.transition && (
|
|
2743
|
+
T && T.transition && (v.transition = T.transition);
|
|
2730
2744
|
}
|
|
2731
2745
|
p.forEach((T) => {
|
|
2732
2746
|
const x = t.getBaseTarget(T), w = t.getValue(T);
|
|
2733
|
-
w && (w.liveStyle = !0),
|
|
2734
|
-
}), f.push({ animation:
|
|
2747
|
+
w && (w.liveStyle = !0), v[T] = x ?? null;
|
|
2748
|
+
}), f.push({ animation: v });
|
|
2735
2749
|
}
|
|
2736
|
-
let
|
|
2737
|
-
return n && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (
|
|
2750
|
+
let g = !!f.length;
|
|
2751
|
+
return n && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (g = !1), n = !1, s = !1, g ? e(f) : Promise.resolve();
|
|
2738
2752
|
}
|
|
2739
2753
|
function l(c, u) {
|
|
2740
2754
|
if (i[c].isActive === u) return Promise.resolve();
|
|
@@ -2753,8 +2767,8 @@ function Xl(t) {
|
|
|
2753
2767
|
}
|
|
2754
2768
|
};
|
|
2755
2769
|
}
|
|
2756
|
-
function
|
|
2757
|
-
return typeof e == "string" ? e !== t : Array.isArray(e) ? !
|
|
2770
|
+
function zl(t, e) {
|
|
2771
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !gr(e, t) : !1;
|
|
2758
2772
|
}
|
|
2759
2773
|
function ut(t = !1) {
|
|
2760
2774
|
return {
|
|
@@ -2778,21 +2792,21 @@ function dn() {
|
|
|
2778
2792
|
function ti(t, e) {
|
|
2779
2793
|
t.min = e.min, t.max = e.max;
|
|
2780
2794
|
}
|
|
2781
|
-
function
|
|
2795
|
+
function H(t, e) {
|
|
2782
2796
|
ti(t.x, e.x), ti(t.y, e.y);
|
|
2783
2797
|
}
|
|
2784
2798
|
function pn(t, e) {
|
|
2785
2799
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
2786
2800
|
}
|
|
2787
|
-
var
|
|
2801
|
+
var Hl = 0.9999, Gl = 1.0001, _l = -0.01, Xl = 0.01;
|
|
2788
2802
|
function j(t) {
|
|
2789
2803
|
return t.max - t.min;
|
|
2790
2804
|
}
|
|
2791
|
-
function
|
|
2805
|
+
function Yl(t, e, i) {
|
|
2792
2806
|
return Math.abs(t - e) <= i;
|
|
2793
2807
|
}
|
|
2794
2808
|
function mn(t, e, i, n = 0.5) {
|
|
2795
|
-
t.origin = n, t.originPoint = V(e.min, e.max, t.origin), t.scale = j(i) / j(e), t.translate = V(i.min, i.max, t.origin) - t.originPoint, (t.scale >=
|
|
2809
|
+
t.origin = n, t.originPoint = V(e.min, e.max, t.origin), t.scale = j(i) / j(e), t.translate = V(i.min, i.max, t.origin) - t.originPoint, (t.scale >= Hl && t.scale <= Gl || isNaN(t.scale)) && (t.scale = 1), (t.translate >= _l && t.translate <= Xl || isNaN(t.translate)) && (t.translate = 0);
|
|
2796
2810
|
}
|
|
2797
2811
|
function Bt(t, e, i, n) {
|
|
2798
2812
|
mn(t.x, e.x, i.x, n ? n.originX : void 0), mn(t.y, e.y, i.y, n ? n.originY : void 0);
|
|
@@ -2800,7 +2814,7 @@ function Bt(t, e, i, n) {
|
|
|
2800
2814
|
function vn(t, e, i, n = 0) {
|
|
2801
2815
|
t.min = (n ? V(i.min, i.max, n) : i.min) + e.min, t.max = t.min + j(e);
|
|
2802
2816
|
}
|
|
2803
|
-
function
|
|
2817
|
+
function ql(t, e, i, n) {
|
|
2804
2818
|
vn(t.x, e.x, i.x, n?.x), vn(t.y, e.y, i.y, n?.y);
|
|
2805
2819
|
}
|
|
2806
2820
|
function gn(t, e, i, n = 0) {
|
|
@@ -2813,42 +2827,42 @@ function ue(t, e, i, n) {
|
|
|
2813
2827
|
function yn(t, e, i, n, s) {
|
|
2814
2828
|
return t -= e, t = le(t, 1 / i, n), s !== void 0 && (t = le(t, 1 / s, n)), t;
|
|
2815
2829
|
}
|
|
2816
|
-
function
|
|
2830
|
+
function Zl(t, e = 0, i = 1, n = 0.5, s, o = t, r = t) {
|
|
2817
2831
|
if (J.test(e) && (e = parseFloat(e), e = V(r.min, r.max, e / 100) - r.min), typeof e != "number") return;
|
|
2818
2832
|
let a = V(o.min, o.max, n);
|
|
2819
2833
|
t === o && (a -= e), t.min = yn(t.min, e, i, a, s), t.max = yn(t.max, e, i, a, s);
|
|
2820
2834
|
}
|
|
2821
2835
|
function Tn(t, e, [i, n, s], o, r) {
|
|
2822
|
-
|
|
2836
|
+
Zl(t, e[i], e[n], e[s], e.scale, o, r);
|
|
2823
2837
|
}
|
|
2824
|
-
var
|
|
2838
|
+
var Jl = [
|
|
2825
2839
|
"x",
|
|
2826
2840
|
"scaleX",
|
|
2827
2841
|
"originX"
|
|
2828
|
-
],
|
|
2842
|
+
], Ql = [
|
|
2829
2843
|
"y",
|
|
2830
2844
|
"scaleY",
|
|
2831
2845
|
"originY"
|
|
2832
2846
|
];
|
|
2833
2847
|
function xn(t, e, i, n) {
|
|
2834
|
-
Tn(t.x, e,
|
|
2848
|
+
Tn(t.x, e, Jl, i ? i.x : void 0, n ? n.x : void 0), Tn(t.y, e, Ql, i ? i.y : void 0, n ? n.y : void 0);
|
|
2835
2849
|
}
|
|
2836
2850
|
function wn(t) {
|
|
2837
2851
|
return t.translate === 0 && t.scale === 1;
|
|
2838
2852
|
}
|
|
2839
|
-
function
|
|
2853
|
+
function yr(t) {
|
|
2840
2854
|
return wn(t.x) && wn(t.y);
|
|
2841
2855
|
}
|
|
2842
2856
|
function Pn(t, e) {
|
|
2843
2857
|
return t.min === e.min && t.max === e.max;
|
|
2844
2858
|
}
|
|
2845
|
-
function
|
|
2859
|
+
function tu(t, e) {
|
|
2846
2860
|
return Pn(t.x, e.x) && Pn(t.y, e.y);
|
|
2847
2861
|
}
|
|
2848
2862
|
function Sn(t, e) {
|
|
2849
2863
|
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
2850
2864
|
}
|
|
2851
|
-
function
|
|
2865
|
+
function Tr(t, e) {
|
|
2852
2866
|
return Sn(t.x, e.x) && Sn(t.y, e.y);
|
|
2853
2867
|
}
|
|
2854
2868
|
function bn(t) {
|
|
@@ -2860,7 +2874,7 @@ function An(t, e) {
|
|
|
2860
2874
|
function q(t) {
|
|
2861
2875
|
return [t("x"), t("y")];
|
|
2862
2876
|
}
|
|
2863
|
-
function
|
|
2877
|
+
function eu(t, e, i) {
|
|
2864
2878
|
let n = "";
|
|
2865
2879
|
const s = t.x.translate / e.x, o = t.y.translate / e.y, r = i?.z || 0;
|
|
2866
2880
|
if ((s || o || r) && (n = `translate3d(${s}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (n += `scale(${1 / e.x}, ${1 / e.y}) `), i) {
|
|
@@ -2870,10 +2884,10 @@ function ou(t, e, i) {
|
|
|
2870
2884
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
2871
2885
|
return (a !== 1 || l !== 1) && (n += `scale(${a}, ${l})`), n || "none";
|
|
2872
2886
|
}
|
|
2873
|
-
var
|
|
2874
|
-
function
|
|
2875
|
-
s ? (t.opacity = V(0, i.opacity ?? 1,
|
|
2876
|
-
for (let r = 0; r <
|
|
2887
|
+
var iu = wi.length, Vn = (t) => typeof t == "string" ? parseFloat(t) : t, Mn = (t) => typeof t == "number" || y.test(t);
|
|
2888
|
+
function nu(t, e, i, n, s, o) {
|
|
2889
|
+
s ? (t.opacity = V(0, i.opacity ?? 1, su(n)), t.opacityExit = V(e.opacity ?? 1, 0, ru(n))) : o && (t.opacity = V(e.opacity ?? 1, i.opacity ?? 1, n));
|
|
2890
|
+
for (let r = 0; r < iu; r++) {
|
|
2877
2891
|
const a = wi[r];
|
|
2878
2892
|
let l = Cn(e, a), c = Cn(i, a);
|
|
2879
2893
|
l === void 0 && c === void 0 || (l || (l = 0), c || (c = 0), l === 0 || c === 0 || Mn(l) === Mn(c) ? (t[a] = Math.max(V(Vn(l), Vn(c), n), 0), (J.test(c) || J.test(l)) && (t[a] += "%")) : t[a] = c);
|
|
@@ -2883,18 +2897,18 @@ function lu(t, e, i, n, s, o) {
|
|
|
2883
2897
|
function Cn(t, e) {
|
|
2884
2898
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
2885
2899
|
}
|
|
2886
|
-
var
|
|
2887
|
-
function
|
|
2888
|
-
return (n) => n < t ? 0 : n > e ? 1 : i(
|
|
2900
|
+
var su = /* @__PURE__ */ xr(0, 0.5, fs), ru = /* @__PURE__ */ xr(0.5, 0.95, z);
|
|
2901
|
+
function xr(t, e, i) {
|
|
2902
|
+
return (n) => n < t ? 0 : n > e ? 1 : i(It(t, e, n));
|
|
2889
2903
|
}
|
|
2890
|
-
function
|
|
2891
|
-
const n =
|
|
2904
|
+
function ou(t, e, i) {
|
|
2905
|
+
const n = I(t) ? t : At(t);
|
|
2892
2906
|
return n.start(yi("", n, e, i)), n.animation;
|
|
2893
2907
|
}
|
|
2894
2908
|
function Nt(t, e, i, n = { passive: !0 }) {
|
|
2895
2909
|
return t.addEventListener(e, i, n), () => t.removeEventListener(e, i, n);
|
|
2896
2910
|
}
|
|
2897
|
-
var
|
|
2911
|
+
var au = (t, e) => t.depth - e.depth, lu = class {
|
|
2898
2912
|
constructor() {
|
|
2899
2913
|
this.children = [], this.isDirty = !1;
|
|
2900
2914
|
}
|
|
@@ -2905,10 +2919,10 @@ var fu = (t, e) => t.depth - e.depth, du = class {
|
|
|
2905
2919
|
ie(this.children, t), this.isDirty = !0;
|
|
2906
2920
|
}
|
|
2907
2921
|
forEach(t) {
|
|
2908
|
-
this.isDirty && this.children.sort(
|
|
2922
|
+
this.isDirty && this.children.sort(au), this.isDirty = !1, this.children.forEach(t);
|
|
2909
2923
|
}
|
|
2910
2924
|
};
|
|
2911
|
-
function
|
|
2925
|
+
function uu(t, e) {
|
|
2912
2926
|
const i = O.now(), n = ({ timestamp: s }) => {
|
|
2913
2927
|
const o = s - i;
|
|
2914
2928
|
o >= e && (rt(n), t(o - e));
|
|
@@ -2916,9 +2930,9 @@ function pu(t, e) {
|
|
|
2916
2930
|
return M.setup(n, !0), () => rt(n);
|
|
2917
2931
|
}
|
|
2918
2932
|
function te(t) {
|
|
2919
|
-
return
|
|
2933
|
+
return I(t) ? t.get() : t;
|
|
2920
2934
|
}
|
|
2921
|
-
var
|
|
2935
|
+
var cu = class {
|
|
2922
2936
|
constructor() {
|
|
2923
2937
|
this.members = [];
|
|
2924
2938
|
}
|
|
@@ -2977,36 +2991,36 @@ var mu = class {
|
|
|
2977
2991
|
"X",
|
|
2978
2992
|
"Y",
|
|
2979
2993
|
"Z"
|
|
2980
|
-
],
|
|
2994
|
+
], hu = 1e3, fu = 0;
|
|
2981
2995
|
function be(t, e, i, n) {
|
|
2982
2996
|
const { latestValues: s } = e;
|
|
2983
2997
|
s[t] && (i[t] = s[t], e.setStaticValue(t, 0), n && (n[t] = 0));
|
|
2984
2998
|
}
|
|
2985
|
-
function
|
|
2999
|
+
function wr(t) {
|
|
2986
3000
|
if (t.hasCheckedOptimisedAppear = !0, t.root === t) return;
|
|
2987
3001
|
const { visualElement: e } = t.options;
|
|
2988
3002
|
if (!e) return;
|
|
2989
|
-
const i =
|
|
3003
|
+
const i = zs(e);
|
|
2990
3004
|
if (window.MotionHasOptimisedAnimation(i, "transform")) {
|
|
2991
3005
|
const { layout: s, layoutId: o } = t.options;
|
|
2992
3006
|
window.MotionCancelOptimisedAnimation(i, "transform", M, !(s || o));
|
|
2993
3007
|
}
|
|
2994
3008
|
const { parent: n } = t;
|
|
2995
|
-
n && !n.hasCheckedOptimisedAppear &&
|
|
3009
|
+
n && !n.hasCheckedOptimisedAppear && wr(n);
|
|
2996
3010
|
}
|
|
2997
|
-
function
|
|
3011
|
+
function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, checkIsScrollRoot: n, resetTransform: s }) {
|
|
2998
3012
|
return class {
|
|
2999
3013
|
constructor(r = {}, a = e?.()) {
|
|
3000
|
-
this.id =
|
|
3014
|
+
this.id = fu++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = {
|
|
3001
3015
|
x: 1,
|
|
3002
3016
|
y: 1
|
|
3003
3017
|
}, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
3004
3018
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
3005
3019
|
}, this.updateProjection = () => {
|
|
3006
|
-
this.projectionUpdateScheduled = !1, yt.value && (ht.nodes = ht.calculatedTargetDeltas = ht.calculatedProjections = 0), this.nodes.forEach(
|
|
3020
|
+
this.projectionUpdateScheduled = !1, yt.value && (ht.nodes = ht.calculatedTargetDeltas = ht.calculatedProjections = 0), this.nodes.forEach(mu), this.nodes.forEach(wu), this.nodes.forEach(Pu), this.nodes.forEach(vu), yt.addProjectionMetrics && yt.addProjectionMetrics(ht);
|
|
3007
3021
|
}, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
3008
3022
|
for (let l = 0; l < this.path.length; l++) this.path[l].shouldResetTransform = !0;
|
|
3009
|
-
this.root === this && (this.nodes = new
|
|
3023
|
+
this.root === this && (this.nodes = new lu());
|
|
3010
3024
|
}
|
|
3011
3025
|
addEventListener(r, a) {
|
|
3012
3026
|
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new oi()), this.eventHandlers.get(r).add(a);
|
|
@@ -3020,7 +3034,7 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3020
3034
|
}
|
|
3021
3035
|
mount(r) {
|
|
3022
3036
|
if (this.instance) return;
|
|
3023
|
-
this.isSVG = bi(r) && !
|
|
3037
|
+
this.isSVG = bi(r) && !ml(r), this.instance = r;
|
|
3024
3038
|
const { layoutId: a, layout: l, visualElement: c } = this.options;
|
|
3025
3039
|
if (c && !c.current && c.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
|
|
3026
3040
|
let u, h = 0;
|
|
@@ -3029,7 +3043,7 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3029
3043
|
h = window.innerWidth;
|
|
3030
3044
|
}), t(r, () => {
|
|
3031
3045
|
const p = window.innerWidth;
|
|
3032
|
-
p !== h && (h = p, this.root.updateBlockedByResize = !0, u && u(), u =
|
|
3046
|
+
p !== h && (h = p, this.root.updateBlockedByResize = !0, u && u(), u = uu(f, 250), ee.hasAnimatedSinceResize && (ee.hasAnimatedSinceResize = !1, this.nodes.forEach(Rn)));
|
|
3033
3047
|
});
|
|
3034
3048
|
}
|
|
3035
3049
|
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && c && (a || l) && this.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: p }) => {
|
|
@@ -3037,13 +3051,13 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3037
3051
|
this.target = void 0, this.relativeTarget = void 0;
|
|
3038
3052
|
return;
|
|
3039
3053
|
}
|
|
3040
|
-
const d = this.options.transition || c.getDefaultTransition() ||
|
|
3041
|
-
if (this.options.layoutRoot || this.resumeFrom || T || h && (
|
|
3054
|
+
const d = this.options.transition || c.getDefaultTransition() || Mu, { onLayoutAnimationStart: m, onLayoutAnimationComplete: g } = c.getProps(), v = !this.targetLayout || !Tr(this.targetLayout, p), T = !h && f;
|
|
3055
|
+
if (this.options.layoutRoot || this.resumeFrom || T || h && (v || !this.currentAnimation)) {
|
|
3042
3056
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
3043
3057
|
const x = {
|
|
3044
3058
|
...gi(d, "layout"),
|
|
3045
3059
|
onPlay: m,
|
|
3046
|
-
onComplete:
|
|
3060
|
+
onComplete: g
|
|
3047
3061
|
};
|
|
3048
3062
|
(c.shouldReduceMotion || this.options.layoutRoot) && (x.delay = 0, x.type = !1), this.startAnimation(x), this.setAnimationOrigin(u, T, x.path);
|
|
3049
3063
|
} else
|
|
@@ -3069,7 +3083,7 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3069
3083
|
return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
|
|
3070
3084
|
}
|
|
3071
3085
|
startUpdate() {
|
|
3072
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
3086
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(Su), this.animationId++);
|
|
3073
3087
|
}
|
|
3074
3088
|
getTransformTemplate() {
|
|
3075
3089
|
const { visualElement: r } = this.options;
|
|
@@ -3080,7 +3094,7 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3080
3094
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
3081
3095
|
return;
|
|
3082
3096
|
}
|
|
3083
|
-
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear &&
|
|
3097
|
+
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && wr(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return;
|
|
3084
3098
|
this.isLayoutDirty = !0;
|
|
3085
3099
|
for (let u = 0; u < this.path.length; u++) {
|
|
3086
3100
|
const h = this.path[u];
|
|
@@ -3094,22 +3108,22 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3094
3108
|
update() {
|
|
3095
3109
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
3096
3110
|
const a = this.updateBlockedByResize;
|
|
3097
|
-
this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), a && this.nodes.forEach(
|
|
3111
|
+
this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), a && this.nodes.forEach(yu), this.nodes.forEach(Dn);
|
|
3098
3112
|
return;
|
|
3099
3113
|
}
|
|
3100
3114
|
if (this.animationId <= this.animationCommitId) {
|
|
3101
3115
|
this.nodes.forEach(En);
|
|
3102
3116
|
return;
|
|
3103
3117
|
}
|
|
3104
|
-
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(
|
|
3118
|
+
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Tu), this.nodes.forEach(xu), this.nodes.forEach(du), this.nodes.forEach(pu)) : this.nodes.forEach(En), this.clearAllSnapshots();
|
|
3105
3119
|
const r = O.now();
|
|
3106
|
-
|
|
3120
|
+
F.delta = Q(0, 1e3 / 60, r - F.timestamp), F.timestamp = r, F.isProcessing = !0, ve.update.process(F), ve.preRender.process(F), ve.render.process(F), F.isProcessing = !1;
|
|
3107
3121
|
}
|
|
3108
3122
|
didUpdate() {
|
|
3109
3123
|
this.updateScheduled || (this.updateScheduled = !0, Pi.read(this.scheduleUpdate));
|
|
3110
3124
|
}
|
|
3111
3125
|
clearAllSnapshots() {
|
|
3112
|
-
this.nodes.forEach(
|
|
3126
|
+
this.nodes.forEach(gu), this.sharedNodes.forEach(bu);
|
|
3113
3127
|
}
|
|
3114
3128
|
scheduleUpdateProjection() {
|
|
3115
3129
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, M.preRender(this.updateProjection, !1, !0));
|
|
@@ -3145,13 +3159,13 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3145
3159
|
}
|
|
3146
3160
|
resetTransform() {
|
|
3147
3161
|
if (!s) return;
|
|
3148
|
-
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !
|
|
3162
|
+
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !yr(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
|
|
3149
3163
|
r && this.instance && (a || ct(this.latestValues) || u) && (s(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
3150
3164
|
}
|
|
3151
3165
|
measure(r = !0) {
|
|
3152
3166
|
const a = this.measurePageBox();
|
|
3153
3167
|
let l = this.removeElementScroll(a);
|
|
3154
|
-
return r && (l = this.removeTransform(l)),
|
|
3168
|
+
return r && (l = this.removeTransform(l)), Cu(l), {
|
|
3155
3169
|
animationId: this.root.animationId,
|
|
3156
3170
|
measuredBox: a,
|
|
3157
3171
|
layoutBox: l,
|
|
@@ -3163,7 +3177,7 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3163
3177
|
const { visualElement: r } = this.options;
|
|
3164
3178
|
if (!r) return L();
|
|
3165
3179
|
const a = r.measureViewportBox();
|
|
3166
|
-
if (!(this.scroll?.wasRoot || this.path.some(
|
|
3180
|
+
if (!(this.scroll?.wasRoot || this.path.some(Du))) {
|
|
3167
3181
|
const { scroll: l } = this.root;
|
|
3168
3182
|
l && (Z(a.x, l.offset.x), Z(a.y, l.offset.y));
|
|
3169
3183
|
}
|
|
@@ -3171,16 +3185,16 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3171
3185
|
}
|
|
3172
3186
|
removeElementScroll(r) {
|
|
3173
3187
|
const a = L();
|
|
3174
|
-
if (
|
|
3188
|
+
if (H(a, r), this.scroll?.wasRoot) return a;
|
|
3175
3189
|
for (let l = 0; l < this.path.length; l++) {
|
|
3176
3190
|
const c = this.path[l], { scroll: u, options: h } = c;
|
|
3177
|
-
c !== this.root && u && h.layoutScroll && (u.wasRoot &&
|
|
3191
|
+
c !== this.root && u && h.layoutScroll && (u.wasRoot && H(a, r), Z(a.x, u.offset.x), Z(a.y, u.offset.y));
|
|
3178
3192
|
}
|
|
3179
3193
|
return a;
|
|
3180
3194
|
}
|
|
3181
3195
|
applyTransform(r, a = !1, l) {
|
|
3182
3196
|
const c = l || L();
|
|
3183
|
-
|
|
3197
|
+
H(c, r);
|
|
3184
3198
|
for (let u = 0; u < this.path.length; u++) {
|
|
3185
3199
|
const h = this.path[u];
|
|
3186
3200
|
!a && h.options.layoutScroll && h.scroll && h !== h.root && (Z(c.x, -h.scroll.offset.x), Z(c.y, -h.scroll.offset.y)), ct(h.latestValues) && Qt(c, h.latestValues, h.layout?.layoutBox);
|
|
@@ -3189,12 +3203,12 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3189
3203
|
}
|
|
3190
3204
|
removeTransform(r) {
|
|
3191
3205
|
const a = L();
|
|
3192
|
-
|
|
3206
|
+
H(a, r);
|
|
3193
3207
|
for (let l = 0; l < this.path.length; l++) {
|
|
3194
3208
|
const c = this.path[l];
|
|
3195
3209
|
if (!ct(c.latestValues)) continue;
|
|
3196
3210
|
let u;
|
|
3197
|
-
c.instance && (Ze(c.latestValues) && c.updateSnapshot(), u = L(),
|
|
3211
|
+
c.instance && (Ze(c.latestValues) && c.updateSnapshot(), u = L(), H(u, c.measurePageBox())), xn(a, c.latestValues, c.snapshot?.layoutBox, u);
|
|
3198
3212
|
}
|
|
3199
3213
|
return ct(this.latestValues) && xn(a, this.latestValues), a;
|
|
3200
3214
|
}
|
|
@@ -3212,7 +3226,7 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3212
3226
|
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;
|
|
3213
3227
|
}
|
|
3214
3228
|
forceRelativeParentToResolveTarget() {
|
|
3215
|
-
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !==
|
|
3229
|
+
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== F.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
3216
3230
|
}
|
|
3217
3231
|
resolveTargetDelta(r = !1) {
|
|
3218
3232
|
const a = this.getLead();
|
|
@@ -3221,9 +3235,9 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3221
3235
|
if (!(r || l && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize)) return;
|
|
3222
3236
|
const { layout: c, layoutId: u } = this.options;
|
|
3223
3237
|
if (!this.layout || !(c || u)) return;
|
|
3224
|
-
this.resolvedRelativeTargetAt =
|
|
3238
|
+
this.resolvedRelativeTargetAt = F.timestamp;
|
|
3225
3239
|
const h = this.getClosestProjectingParent();
|
|
3226
|
-
h && this.linkedParentVersion !== h.layoutVersion && !h.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && h && h.layout ? this.createRelativeTarget(h, this.layout.layoutBox, h.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = L(), this.targetWithTransforms = L()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(),
|
|
3240
|
+
h && this.linkedParentVersion !== h.layoutVersion && !h.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && h && h.layout ? this.createRelativeTarget(h, this.layout.layoutBox, h.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = L(), this.targetWithTransforms = L()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), ql(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : H(this.target, this.layout.layoutBox), ar(this.target, this.targetDelta)) : H(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && h && !!h.resumingFrom == !!this.resumingFrom && !h.options.layoutScroll && h.target && this.animationProgress !== 1 ? this.createRelativeTarget(h, this.target, h.target) : this.relativeParent = this.relativeTarget = void 0), yt.value && ht.calculatedTargetDeltas++);
|
|
3227
3241
|
}
|
|
3228
3242
|
getClosestProjectingParent() {
|
|
3229
3243
|
if (!(!this.parent || Ze(this.parent.latestValues) || or(this.parent.latestValues)))
|
|
@@ -3233,7 +3247,7 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3233
3247
|
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
|
|
3234
3248
|
}
|
|
3235
3249
|
createRelativeTarget(r, a, l) {
|
|
3236
|
-
this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = L(), this.relativeTargetOrigin = L(), ue(this.relativeTargetOrigin, a, l, this.options.layoutAnchor || void 0),
|
|
3250
|
+
this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = L(), this.relativeTargetOrigin = L(), ue(this.relativeTargetOrigin, a, l, this.options.layoutAnchor || void 0), H(this.relativeTarget, this.relativeTargetOrigin);
|
|
3237
3251
|
}
|
|
3238
3252
|
removeRelativeTarget() {
|
|
3239
3253
|
this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -3241,12 +3255,12 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3241
3255
|
calcProjection() {
|
|
3242
3256
|
const r = this.getLead(), a = !!this.resumingFrom || this !== r;
|
|
3243
3257
|
let l = !0;
|
|
3244
|
-
if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt ===
|
|
3258
|
+
if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === F.timestamp && (l = !1), l) return;
|
|
3245
3259
|
const { layout: c, layoutId: u } = this.options;
|
|
3246
3260
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || u)) return;
|
|
3247
|
-
|
|
3261
|
+
H(this.layoutCorrected, this.layout.layoutBox);
|
|
3248
3262
|
const h = this.treeScale.x, f = this.treeScale.y;
|
|
3249
|
-
|
|
3263
|
+
Vl(this.layoutCorrected, this.treeScale, this.path, a), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = L());
|
|
3250
3264
|
const { target: p } = r;
|
|
3251
3265
|
if (!p) {
|
|
3252
3266
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
@@ -3273,18 +3287,18 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3273
3287
|
setAnimationOrigin(r, a = !1, l) {
|
|
3274
3288
|
const c = this.snapshot, u = c ? c.latestValues : {}, h = { ...this.latestValues }, f = St();
|
|
3275
3289
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
3276
|
-
const p = L(), d = (c ? c.source : void 0) !== (this.layout ? this.layout.source : void 0), m = this.getStack(),
|
|
3290
|
+
const p = L(), d = (c ? c.source : void 0) !== (this.layout ? this.layout.source : void 0), m = this.getStack(), g = !m || m.members.length <= 1, v = !!(d && !g && this.options.crossfade === !0 && !this.path.some(Vu));
|
|
3277
3291
|
this.animationProgress = 0;
|
|
3278
3292
|
let T;
|
|
3279
3293
|
const x = l?.interpolateProjection(r);
|
|
3280
3294
|
this.mixTargetDelta = (w) => {
|
|
3281
3295
|
const P = w / 1e3, A = x?.(P);
|
|
3282
|
-
A ? (f.x.translate = A.x, f.x.scale = V(r.x.scale, 1, P), f.x.origin = r.x.origin, f.x.originPoint = r.x.originPoint, f.y.translate = A.y, f.y.scale = V(r.y.scale, 1, P), f.y.origin = r.y.origin, f.y.originPoint = r.y.originPoint) : (Ln(f.x, r.x, P), Ln(f.y, r.y, P)), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ue(p, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0),
|
|
3296
|
+
A ? (f.x.translate = A.x, f.x.scale = V(r.x.scale, 1, P), f.x.origin = r.x.origin, f.x.originPoint = r.x.originPoint, f.y.translate = A.y, f.y.scale = V(r.y.scale, 1, P), f.y.origin = r.y.origin, f.y.originPoint = r.y.originPoint) : (Ln(f.x, r.x, P), Ln(f.y, r.y, P)), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ue(p, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), Au(this.relativeTarget, this.relativeTargetOrigin, p, P), T && tu(this.relativeTarget, T) && (this.isProjectionDirty = !1), T || (T = L()), H(T, this.relativeTarget)), d && (this.animationValues = h, nu(h, u, this.latestValues, P, v, g)), A && A.rotate !== void 0 && (this.animationValues || (this.animationValues = h), this.animationValues.pathRotation = A.rotate), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = P;
|
|
3283
3297
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
3284
3298
|
}
|
|
3285
3299
|
startAnimation(r) {
|
|
3286
3300
|
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (rt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = M.update(() => {
|
|
3287
|
-
ee.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = At(0)), this.motionValue.jump(0, !1), this.currentAnimation =
|
|
3301
|
+
ee.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = At(0)), this.motionValue.jump(0, !1), this.currentAnimation = ou(this.motionValue, [0, 1e3], {
|
|
3288
3302
|
...r,
|
|
3289
3303
|
velocity: 0,
|
|
3290
3304
|
isSync: !0,
|
|
@@ -3303,24 +3317,24 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3303
3317
|
r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
3304
3318
|
}
|
|
3305
3319
|
finishAnimation() {
|
|
3306
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
3320
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(hu), this.currentAnimation.stop()), this.completeAnimation();
|
|
3307
3321
|
}
|
|
3308
3322
|
applyTransformsToTarget() {
|
|
3309
3323
|
const r = this.getLead();
|
|
3310
3324
|
let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = r;
|
|
3311
3325
|
if (!(!a || !l || !c)) {
|
|
3312
|
-
if (this !== r && this.layout && c &&
|
|
3326
|
+
if (this !== r && this.layout && c && Sr(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
3313
3327
|
l = this.target || L();
|
|
3314
3328
|
const h = j(this.layout.layoutBox.x);
|
|
3315
3329
|
l.x.min = r.target.x.min, l.x.max = l.x.min + h;
|
|
3316
3330
|
const f = j(this.layout.layoutBox.y);
|
|
3317
3331
|
l.y.min = r.target.y.min, l.y.max = l.y.min + f;
|
|
3318
3332
|
}
|
|
3319
|
-
|
|
3333
|
+
H(a, l), Qt(a, u), Bt(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
|
|
3320
3334
|
}
|
|
3321
3335
|
}
|
|
3322
3336
|
registerSharedNode(r, a) {
|
|
3323
|
-
this.sharedNodes.has(r) || this.sharedNodes.set(r, new
|
|
3337
|
+
this.sharedNodes.has(r) || this.sharedNodes.set(r, new cu()), this.sharedNodes.get(r).add(a);
|
|
3324
3338
|
const l = a.options.initialPromotionConfig;
|
|
3325
3339
|
a.promote({
|
|
3326
3340
|
transition: l ? l.transition : void 0,
|
|
@@ -3385,17 +3399,17 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3385
3399
|
r.visibility = "";
|
|
3386
3400
|
const u = c.animationValues || c.latestValues;
|
|
3387
3401
|
this.applyTransformsToTarget();
|
|
3388
|
-
let h =
|
|
3402
|
+
let h = eu(this.projectionDeltaWithTransform, this.treeScale, u);
|
|
3389
3403
|
l && (h = l(u, h)), r.transform = h;
|
|
3390
3404
|
const { x: f, y: p } = this.projectionDelta;
|
|
3391
3405
|
r.transformOrigin = `${f.origin * 100}% ${p.origin * 100}% 0`, c.animationValues ? r.opacity = c === this ? u.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : u.opacityExit : r.opacity = c === this ? u.opacity !== void 0 ? u.opacity : "" : u.opacityExit !== void 0 ? u.opacityExit : 0;
|
|
3392
3406
|
for (const d in Qe) {
|
|
3393
3407
|
if (u[d] === void 0) continue;
|
|
3394
|
-
const { correct: m, applyTo:
|
|
3395
|
-
if (
|
|
3396
|
-
const x =
|
|
3397
|
-
for (let w = 0; w < x; w++) r[
|
|
3398
|
-
} else
|
|
3408
|
+
const { correct: m, applyTo: g, isCSSVariable: v } = Qe[d], T = h === "none" ? u[d] : m(u[d], c);
|
|
3409
|
+
if (g) {
|
|
3410
|
+
const x = g.length;
|
|
3411
|
+
for (let w = 0; w < x; w++) r[g[w]] = T;
|
|
3412
|
+
} else v ? this.options.visualElement.renderState.vars[d] = T : r[d] = T;
|
|
3399
3413
|
}
|
|
3400
3414
|
this.options.layoutId && (r.pointerEvents = c === this ? te(a?.pointerEvents) || "" : "none");
|
|
3401
3415
|
}
|
|
@@ -3407,10 +3421,10 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3407
3421
|
}
|
|
3408
3422
|
};
|
|
3409
3423
|
}
|
|
3410
|
-
function
|
|
3424
|
+
function du(t) {
|
|
3411
3425
|
t.updateLayout();
|
|
3412
3426
|
}
|
|
3413
|
-
function
|
|
3427
|
+
function pu(t) {
|
|
3414
3428
|
const e = t.resumeFrom?.snapshot || t.snapshot;
|
|
3415
3429
|
if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
|
|
3416
3430
|
const { layoutBox: i, measuredBox: n } = t.layout, { animationType: s } = t.options, o = e.source !== t.layout.source;
|
|
@@ -3421,7 +3435,7 @@ function Tu(t) {
|
|
|
3421
3435
|
else if (s === "x" || s === "y") {
|
|
3422
3436
|
const u = s === "x" ? "y" : "x";
|
|
3423
3437
|
ti(o ? e.measuredBox[u] : e.layoutBox[u], i[u]);
|
|
3424
|
-
} else
|
|
3438
|
+
} else Sr(s, e.layoutBox, i) && q((u) => {
|
|
3425
3439
|
const h = o ? e.measuredBox[u] : e.layoutBox[u], f = j(i[u]);
|
|
3426
3440
|
h.max = h.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[u].max = t.relativeTarget[u].min + f);
|
|
3427
3441
|
});
|
|
@@ -3429,7 +3443,7 @@ function Tu(t) {
|
|
|
3429
3443
|
Bt(r, i, e.layoutBox);
|
|
3430
3444
|
const a = St();
|
|
3431
3445
|
o ? Bt(a, t.applyTransform(n, !0), e.measuredBox) : Bt(a, i, e.layoutBox);
|
|
3432
|
-
const l = !
|
|
3446
|
+
const l = !yr(r);
|
|
3433
3447
|
let c = !1;
|
|
3434
3448
|
if (!t.resumeFrom) {
|
|
3435
3449
|
const u = t.getClosestProjectingParent();
|
|
@@ -3439,7 +3453,7 @@ function Tu(t) {
|
|
|
3439
3453
|
const p = t.options.layoutAnchor || void 0, d = L();
|
|
3440
3454
|
ue(d, e.layoutBox, h.layoutBox, p);
|
|
3441
3455
|
const m = L();
|
|
3442
|
-
ue(m, i, f.layoutBox, p),
|
|
3456
|
+
ue(m, i, f.layoutBox, p), Tr(d, m) || (c = !0), u.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = d, t.relativeParent = u);
|
|
3443
3457
|
}
|
|
3444
3458
|
}
|
|
3445
3459
|
}
|
|
@@ -3457,44 +3471,44 @@ function Tu(t) {
|
|
|
3457
3471
|
}
|
|
3458
3472
|
t.options.transition = void 0;
|
|
3459
3473
|
}
|
|
3460
|
-
function
|
|
3474
|
+
function mu(t) {
|
|
3461
3475
|
yt.value && ht.nodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
3462
3476
|
}
|
|
3463
|
-
function
|
|
3477
|
+
function vu(t) {
|
|
3464
3478
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
3465
3479
|
}
|
|
3466
|
-
function
|
|
3480
|
+
function gu(t) {
|
|
3467
3481
|
t.clearSnapshot();
|
|
3468
3482
|
}
|
|
3469
3483
|
function Dn(t) {
|
|
3470
3484
|
t.clearMeasurements();
|
|
3471
3485
|
}
|
|
3472
|
-
function
|
|
3486
|
+
function yu(t) {
|
|
3473
3487
|
t.isLayoutDirty = !0, t.updateLayout();
|
|
3474
3488
|
}
|
|
3475
3489
|
function En(t) {
|
|
3476
3490
|
t.isLayoutDirty = !1;
|
|
3477
3491
|
}
|
|
3478
|
-
function
|
|
3492
|
+
function Tu(t) {
|
|
3479
3493
|
t.isAnimationBlocked && t.layout && !t.isLayoutDirty && (t.snapshot = t.layout, t.isLayoutDirty = !0);
|
|
3480
3494
|
}
|
|
3481
|
-
function
|
|
3495
|
+
function xu(t) {
|
|
3482
3496
|
const { visualElement: e } = t.options;
|
|
3483
3497
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
3484
3498
|
}
|
|
3485
3499
|
function Rn(t) {
|
|
3486
3500
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
3487
3501
|
}
|
|
3488
|
-
function
|
|
3502
|
+
function wu(t) {
|
|
3489
3503
|
t.resolveTargetDelta();
|
|
3490
3504
|
}
|
|
3491
|
-
function
|
|
3505
|
+
function Pu(t) {
|
|
3492
3506
|
t.calcProjection();
|
|
3493
3507
|
}
|
|
3494
|
-
function
|
|
3508
|
+
function Su(t) {
|
|
3495
3509
|
t.resetSkewAndRotation();
|
|
3496
3510
|
}
|
|
3497
|
-
function
|
|
3511
|
+
function bu(t) {
|
|
3498
3512
|
t.removeLeadSnapshot();
|
|
3499
3513
|
}
|
|
3500
3514
|
function Ln(t, e, i) {
|
|
@@ -3503,13 +3517,13 @@ function Ln(t, e, i) {
|
|
|
3503
3517
|
function kn(t, e, i, n) {
|
|
3504
3518
|
t.min = V(e.min, i.min, n), t.max = V(e.max, i.max, n);
|
|
3505
3519
|
}
|
|
3506
|
-
function
|
|
3520
|
+
function Au(t, e, i, n) {
|
|
3507
3521
|
kn(t.x, e.x, i.x, n), kn(t.y, e.y, i.y, n);
|
|
3508
3522
|
}
|
|
3509
|
-
function
|
|
3523
|
+
function Vu(t) {
|
|
3510
3524
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
3511
3525
|
}
|
|
3512
|
-
var
|
|
3526
|
+
var Mu = {
|
|
3513
3527
|
duration: 0.45,
|
|
3514
3528
|
ease: [
|
|
3515
3529
|
0.4,
|
|
@@ -3517,34 +3531,34 @@ var Lu = {
|
|
|
3517
3531
|
0.1,
|
|
3518
3532
|
1
|
|
3519
3533
|
]
|
|
3520
|
-
}, Bn = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t),
|
|
3521
|
-
function
|
|
3522
|
-
t.min =
|
|
3534
|
+
}, Bn = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Fn = Bn("applewebkit/") && !Bn("chrome/") ? Math.round : z;
|
|
3535
|
+
function In(t) {
|
|
3536
|
+
t.min = Fn(t.min), t.max = Fn(t.max);
|
|
3523
3537
|
}
|
|
3524
|
-
function
|
|
3525
|
-
|
|
3538
|
+
function Cu(t) {
|
|
3539
|
+
In(t.x), In(t.y);
|
|
3526
3540
|
}
|
|
3527
|
-
function
|
|
3528
|
-
return t === "position" || t === "preserve-aspect" && !
|
|
3541
|
+
function Sr(t, e, i) {
|
|
3542
|
+
return t === "position" || t === "preserve-aspect" && !Yl(bn(e), bn(i), 0.2);
|
|
3529
3543
|
}
|
|
3530
|
-
function
|
|
3544
|
+
function Du(t) {
|
|
3531
3545
|
return t !== t.root && t.scroll?.wasRoot;
|
|
3532
3546
|
}
|
|
3533
|
-
var
|
|
3547
|
+
var Eu = Pr({
|
|
3534
3548
|
attachResizeListener: (t, e) => Nt(t, "resize", e),
|
|
3535
3549
|
measureScroll: () => ({
|
|
3536
3550
|
x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
|
|
3537
3551
|
y: document.documentElement.scrollTop || document.body?.scrollTop || 0
|
|
3538
3552
|
}),
|
|
3539
3553
|
checkIsScrollRoot: () => !0
|
|
3540
|
-
}), Ae = { current: void 0 },
|
|
3554
|
+
}), Ae = { current: void 0 }, br = Pr({
|
|
3541
3555
|
measureScroll: (t) => ({
|
|
3542
3556
|
x: t.scrollLeft,
|
|
3543
3557
|
y: t.scrollTop
|
|
3544
3558
|
}),
|
|
3545
3559
|
defaultParent: () => {
|
|
3546
3560
|
if (!Ae.current) {
|
|
3547
|
-
const t = new
|
|
3561
|
+
const t = new Eu({});
|
|
3548
3562
|
t.mount(window), t.setOptions({ layoutScroll: !0 }), Ae.current = t;
|
|
3549
3563
|
}
|
|
3550
3564
|
return Ae.current;
|
|
@@ -3553,15 +3567,15 @@ var Iu = wr({
|
|
|
3553
3567
|
t.style.transform = e !== void 0 ? e : "none";
|
|
3554
3568
|
},
|
|
3555
3569
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
3556
|
-
}),
|
|
3570
|
+
}), Ar = Vt({
|
|
3557
3571
|
transformPagePoint: (t) => t,
|
|
3558
3572
|
isStatic: !1,
|
|
3559
3573
|
reducedMotion: "never"
|
|
3560
3574
|
});
|
|
3561
|
-
function
|
|
3575
|
+
function Ru(t = !0) {
|
|
3562
3576
|
const e = U(si);
|
|
3563
3577
|
if (e === null) return [!0, null];
|
|
3564
|
-
const { isPresent: i, onExitComplete: n, register: s } = e, o =
|
|
3578
|
+
const { isPresent: i, onExitComplete: n, register: s } = e, o = Wr();
|
|
3565
3579
|
ni(() => {
|
|
3566
3580
|
if (t) return s(o);
|
|
3567
3581
|
}, [t]);
|
|
@@ -3572,7 +3586,7 @@ function Fu(t = !0) {
|
|
|
3572
3586
|
]);
|
|
3573
3587
|
return !i && n ? [!1, r] : [!0];
|
|
3574
3588
|
}
|
|
3575
|
-
var
|
|
3589
|
+
var Vr = Vt({ strict: !1 }), On = {
|
|
3576
3590
|
animation: [
|
|
3577
3591
|
"animate",
|
|
3578
3592
|
"variants",
|
|
@@ -3610,77 +3624,25 @@ var Ar = Vt({ strict: !1 }), On = {
|
|
|
3610
3624
|
],
|
|
3611
3625
|
layout: ["layout", "layoutId"]
|
|
3612
3626
|
}, jn = !1;
|
|
3613
|
-
function
|
|
3627
|
+
function Lu() {
|
|
3614
3628
|
if (jn) return;
|
|
3615
3629
|
const t = {};
|
|
3616
3630
|
for (const e in On) t[e] = { isEnabled: (i) => On[e].some((n) => !!i[n]) };
|
|
3617
3631
|
nr(t), jn = !0;
|
|
3618
3632
|
}
|
|
3619
|
-
function
|
|
3620
|
-
return
|
|
3633
|
+
function Mr() {
|
|
3634
|
+
return Lu(), Pl();
|
|
3621
3635
|
}
|
|
3622
|
-
function
|
|
3623
|
-
const e =
|
|
3636
|
+
function ku(t) {
|
|
3637
|
+
const e = Mr();
|
|
3624
3638
|
for (const i in t) e[i] = {
|
|
3625
3639
|
...e[i],
|
|
3626
3640
|
...t[i]
|
|
3627
3641
|
};
|
|
3628
3642
|
nr(e);
|
|
3629
3643
|
}
|
|
3630
|
-
var Nu = /* @__PURE__ */ new Set([
|
|
3631
|
-
"animate",
|
|
3632
|
-
"exit",
|
|
3633
|
-
"variants",
|
|
3634
|
-
"initial",
|
|
3635
|
-
"style",
|
|
3636
|
-
"values",
|
|
3637
|
-
"variants",
|
|
3638
|
-
"transition",
|
|
3639
|
-
"transformTemplate",
|
|
3640
|
-
"custom",
|
|
3641
|
-
"inherit",
|
|
3642
|
-
"onBeforeLayoutMeasure",
|
|
3643
|
-
"onAnimationStart",
|
|
3644
|
-
"onAnimationComplete",
|
|
3645
|
-
"onUpdate",
|
|
3646
|
-
"onDragStart",
|
|
3647
|
-
"onDrag",
|
|
3648
|
-
"onDragEnd",
|
|
3649
|
-
"onMeasureDragConstraints",
|
|
3650
|
-
"onDirectionLock",
|
|
3651
|
-
"onDragTransitionEnd",
|
|
3652
|
-
"_dragX",
|
|
3653
|
-
"_dragY",
|
|
3654
|
-
"onHoverStart",
|
|
3655
|
-
"onHoverEnd",
|
|
3656
|
-
"onViewportEnter",
|
|
3657
|
-
"onViewportLeave",
|
|
3658
|
-
"globalTapTarget",
|
|
3659
|
-
"propagate",
|
|
3660
|
-
"ignoreStrict",
|
|
3661
|
-
"viewport"
|
|
3662
|
-
]);
|
|
3663
|
-
function ce(t) {
|
|
3664
|
-
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Nu.has(t);
|
|
3665
|
-
}
|
|
3666
|
-
var Uu = /* @__PURE__ */ Wr({ default: () => Mr }), Mr, Wu = Ur((() => {
|
|
3667
|
-
throw Mr = {}, new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?');
|
|
3668
|
-
})), Cr = (t) => !ce(t);
|
|
3669
|
-
function $u(t) {
|
|
3670
|
-
typeof t == "function" && (Cr = (e) => e.startsWith("on") ? !ce(e) : t(e));
|
|
3671
|
-
}
|
|
3672
|
-
try {
|
|
3673
|
-
$u((Wu(), Nr(Uu)).default);
|
|
3674
|
-
} catch {
|
|
3675
|
-
}
|
|
3676
|
-
function Ku(t, e, i) {
|
|
3677
|
-
const n = {};
|
|
3678
|
-
for (const s in t)
|
|
3679
|
-
s === "values" && typeof t.values == "object" || F(t[s]) || (Cr(s) || i === !0 && ce(s) || !e && !ce(s) || t.draggable && s.startsWith("onDrag")) && (n[s] = t[s]);
|
|
3680
|
-
return n;
|
|
3681
|
-
}
|
|
3682
3644
|
var me = /* @__PURE__ */ Vt({});
|
|
3683
|
-
function
|
|
3645
|
+
function Bu(t, e) {
|
|
3684
3646
|
if (pe(t)) {
|
|
3685
3647
|
const { initial: i, animate: n } = t;
|
|
3686
3648
|
return {
|
|
@@ -3690,8 +3652,8 @@ function _u(t, e) {
|
|
|
3690
3652
|
}
|
|
3691
3653
|
return t.inherit !== !1 ? e : {};
|
|
3692
3654
|
}
|
|
3693
|
-
function
|
|
3694
|
-
const { initial: e, animate: i } =
|
|
3655
|
+
function Fu(t) {
|
|
3656
|
+
const { initial: e, animate: i } = Bu(t, U(me));
|
|
3695
3657
|
return he(() => ({
|
|
3696
3658
|
initial: e,
|
|
3697
3659
|
animate: i
|
|
@@ -3706,45 +3668,90 @@ var Di = () => ({
|
|
|
3706
3668
|
transformOrigin: {},
|
|
3707
3669
|
vars: {}
|
|
3708
3670
|
});
|
|
3709
|
-
function
|
|
3710
|
-
for (const n in e) !
|
|
3671
|
+
function Cr(t, e, i) {
|
|
3672
|
+
for (const n in e) !I(e[n]) && !cr(n, i) && (t[n] = e[n]);
|
|
3711
3673
|
}
|
|
3712
|
-
function
|
|
3674
|
+
function Iu({ transformTemplate: t }, e) {
|
|
3713
3675
|
return he(() => {
|
|
3714
3676
|
const i = Di();
|
|
3715
3677
|
return Mi(i, e, t), Object.assign({}, i.vars, i.style);
|
|
3716
3678
|
}, [e]);
|
|
3717
3679
|
}
|
|
3718
|
-
function
|
|
3680
|
+
function Ou(t, e) {
|
|
3719
3681
|
const i = t.style || {}, n = {};
|
|
3720
|
-
return
|
|
3682
|
+
return Cr(n, i, t), Object.assign(n, Iu(t, e)), n;
|
|
3721
3683
|
}
|
|
3722
|
-
function
|
|
3723
|
-
const i = {}, n =
|
|
3684
|
+
function ju(t, e) {
|
|
3685
|
+
const i = {}, n = Ou(t, e);
|
|
3724
3686
|
return t.drag && t.dragListener !== !1 && (i.draggable = !1, n.userSelect = n.WebkitUserSelect = n.WebkitTouchCallout = "none", n.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (i.tabIndex = 0), i.style = n, i;
|
|
3725
3687
|
}
|
|
3726
|
-
var
|
|
3688
|
+
var Dr = () => ({
|
|
3727
3689
|
...Di(),
|
|
3728
3690
|
attrs: {}
|
|
3729
3691
|
});
|
|
3730
|
-
function
|
|
3692
|
+
function Nu(t, e, i, n) {
|
|
3731
3693
|
const s = he(() => {
|
|
3732
|
-
const o =
|
|
3733
|
-
return
|
|
3694
|
+
const o = Dr();
|
|
3695
|
+
return fr(o, e, pr(n), t.transformTemplate, t.style), {
|
|
3734
3696
|
...o.attrs,
|
|
3735
3697
|
style: { ...o.style }
|
|
3736
3698
|
};
|
|
3737
3699
|
}, [e]);
|
|
3738
3700
|
if (t.style) {
|
|
3739
3701
|
const o = {};
|
|
3740
|
-
|
|
3702
|
+
Cr(o, t.style, t), s.style = {
|
|
3741
3703
|
...o,
|
|
3742
3704
|
...s.style
|
|
3743
3705
|
};
|
|
3744
3706
|
}
|
|
3745
3707
|
return s;
|
|
3746
3708
|
}
|
|
3747
|
-
var
|
|
3709
|
+
var Uu = /* @__PURE__ */ new Set([
|
|
3710
|
+
"animate",
|
|
3711
|
+
"exit",
|
|
3712
|
+
"variants",
|
|
3713
|
+
"initial",
|
|
3714
|
+
"style",
|
|
3715
|
+
"values",
|
|
3716
|
+
"variants",
|
|
3717
|
+
"transition",
|
|
3718
|
+
"transformTemplate",
|
|
3719
|
+
"custom",
|
|
3720
|
+
"inherit",
|
|
3721
|
+
"onBeforeLayoutMeasure",
|
|
3722
|
+
"onAnimationStart",
|
|
3723
|
+
"onAnimationComplete",
|
|
3724
|
+
"onUpdate",
|
|
3725
|
+
"onDragStart",
|
|
3726
|
+
"onDrag",
|
|
3727
|
+
"onDragEnd",
|
|
3728
|
+
"onMeasureDragConstraints",
|
|
3729
|
+
"onDirectionLock",
|
|
3730
|
+
"onDragTransitionEnd",
|
|
3731
|
+
"_dragX",
|
|
3732
|
+
"_dragY",
|
|
3733
|
+
"onHoverStart",
|
|
3734
|
+
"onHoverEnd",
|
|
3735
|
+
"onViewportEnter",
|
|
3736
|
+
"onViewportLeave",
|
|
3737
|
+
"globalTapTarget",
|
|
3738
|
+
"propagate",
|
|
3739
|
+
"ignoreStrict",
|
|
3740
|
+
"viewport"
|
|
3741
|
+
]);
|
|
3742
|
+
function ce(t) {
|
|
3743
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Uu.has(t);
|
|
3744
|
+
}
|
|
3745
|
+
function Wu(t, e) {
|
|
3746
|
+
return t.startsWith("on") ? !ce(t) : e?.(t) ?? !ce(t);
|
|
3747
|
+
}
|
|
3748
|
+
function $u(t, e, i, n) {
|
|
3749
|
+
const s = {};
|
|
3750
|
+
for (const o in t)
|
|
3751
|
+
o === "values" && typeof t.values == "object" || I(t[o]) || (Wu(o, n) || i === !0 && ce(o) || !e && !ce(o) || t.draggable && o.startsWith("onDrag")) && (s[o] = t[o]);
|
|
3752
|
+
return s;
|
|
3753
|
+
}
|
|
3754
|
+
var Ku = [
|
|
3748
3755
|
"animate",
|
|
3749
3756
|
"circle",
|
|
3750
3757
|
"defs",
|
|
@@ -3772,26 +3779,26 @@ var qu = [
|
|
|
3772
3779
|
"view"
|
|
3773
3780
|
];
|
|
3774
3781
|
function Ei(t) {
|
|
3775
|
-
return typeof t != "string" || t.includes("-") ? !1 : !!(
|
|
3782
|
+
return typeof t != "string" || t.includes("-") ? !1 : !!(Ku.indexOf(t) > -1 || /[A-Z]/u.test(t));
|
|
3776
3783
|
}
|
|
3777
|
-
function
|
|
3778
|
-
const
|
|
3784
|
+
function zu(t, e, i, { latestValues: n }, s, o = !1, r, a) {
|
|
3785
|
+
const l = (r ?? Ei(t) ? Nu : ju)(e, n, s, t), c = $u(e, typeof t == "string", o, a), u = t !== qn ? {
|
|
3786
|
+
...c,
|
|
3779
3787
|
...l,
|
|
3780
|
-
...a,
|
|
3781
3788
|
ref: i
|
|
3782
|
-
} : {}, { children:
|
|
3783
|
-
return
|
|
3784
|
-
...
|
|
3785
|
-
children:
|
|
3789
|
+
} : {}, { children: h } = e, f = he(() => I(h) ? h.get() : h, [h]);
|
|
3790
|
+
return Nr(t, {
|
|
3791
|
+
...u,
|
|
3792
|
+
children: f
|
|
3786
3793
|
});
|
|
3787
3794
|
}
|
|
3788
|
-
function
|
|
3795
|
+
function Hu({ scrapeMotionValuesFromProps: t, createRenderState: e }, i, n, s) {
|
|
3789
3796
|
return {
|
|
3790
|
-
latestValues:
|
|
3797
|
+
latestValues: Gu(i, n, s, t),
|
|
3791
3798
|
renderState: e()
|
|
3792
3799
|
};
|
|
3793
3800
|
}
|
|
3794
|
-
function
|
|
3801
|
+
function Gu(t, e, i, n) {
|
|
3795
3802
|
const s = {}, o = n(t, {});
|
|
3796
3803
|
for (const f in o) s[f] = te(o[f]);
|
|
3797
3804
|
let { initial: r, animate: a } = t;
|
|
@@ -3805,9 +3812,9 @@ function Qu(t, e, i, n) {
|
|
|
3805
3812
|
for (let p = 0; p < f.length; p++) {
|
|
3806
3813
|
const d = Ti(t, f[p]);
|
|
3807
3814
|
if (d) {
|
|
3808
|
-
const { transitionEnd: m, transition:
|
|
3809
|
-
for (const T in
|
|
3810
|
-
let x =
|
|
3815
|
+
const { transitionEnd: m, transition: g, ...v } = d;
|
|
3816
|
+
for (const T in v) {
|
|
3817
|
+
let x = v[T];
|
|
3811
3818
|
if (Array.isArray(x)) {
|
|
3812
3819
|
const w = u ? x.length - 1 : 0;
|
|
3813
3820
|
x = x[w];
|
|
@@ -3820,17 +3827,17 @@ function Qu(t, e, i, n) {
|
|
|
3820
3827
|
}
|
|
3821
3828
|
return s;
|
|
3822
3829
|
}
|
|
3823
|
-
var
|
|
3824
|
-
const n = U(me), s = U(si), o = () =>
|
|
3825
|
-
return i ? o() :
|
|
3826
|
-
},
|
|
3830
|
+
var Er = (t) => (e, i) => {
|
|
3831
|
+
const n = U(me), s = U(si), o = () => Hu(t, e, n, s);
|
|
3832
|
+
return i ? o() : zr(o);
|
|
3833
|
+
}, _u = /* @__PURE__ */ Er({
|
|
3827
3834
|
scrapeMotionValuesFromProps: Ci,
|
|
3828
3835
|
createRenderState: Di
|
|
3829
|
-
}),
|
|
3830
|
-
scrapeMotionValuesFromProps:
|
|
3831
|
-
createRenderState:
|
|
3832
|
-
}),
|
|
3833
|
-
function
|
|
3836
|
+
}), Xu = /* @__PURE__ */ Er({
|
|
3837
|
+
scrapeMotionValuesFromProps: mr,
|
|
3838
|
+
createRenderState: Dr
|
|
3839
|
+
}), Yu = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
|
|
3840
|
+
function qu(t, e, i) {
|
|
3834
3841
|
const n = ft(i);
|
|
3835
3842
|
Jn(() => {
|
|
3836
3843
|
n.current = i;
|
|
@@ -3839,19 +3846,20 @@ function nc(t, e, i) {
|
|
|
3839
3846
|
return Zn((o) => {
|
|
3840
3847
|
o && t.onMount?.(o), e && (o ? e.mount(o) : e.unmount());
|
|
3841
3848
|
const r = n.current;
|
|
3842
|
-
if (typeof r == "function")
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3849
|
+
if (typeof r == "function")
|
|
3850
|
+
if (o) {
|
|
3851
|
+
const a = r(o);
|
|
3852
|
+
typeof a == "function" && (s.current = a);
|
|
3853
|
+
} else s.current ? (s.current(), s.current = null) : r(o);
|
|
3846
3854
|
else r && (r.current = o);
|
|
3847
3855
|
}, [e]);
|
|
3848
3856
|
}
|
|
3849
|
-
var
|
|
3857
|
+
var Rr = Vt({});
|
|
3850
3858
|
function Tt(t) {
|
|
3851
3859
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
3852
3860
|
}
|
|
3853
|
-
function
|
|
3854
|
-
const { visualElement: r } = U(me), a = U(
|
|
3861
|
+
function Zu(t, e, i, n, s, o) {
|
|
3862
|
+
const { visualElement: r } = U(me), a = U(Vr), l = U(si), c = U(Ar), u = c.reducedMotion, h = c.skipAnimations, f = ft(null), p = ft(!1);
|
|
3855
3863
|
n = n || a.renderer, !f.current && n && (f.current = n(t, {
|
|
3856
3864
|
visualState: e,
|
|
3857
3865
|
parent: r,
|
|
@@ -3862,24 +3870,24 @@ function sc(t, e, i, n, s, o) {
|
|
|
3862
3870
|
skipAnimations: h,
|
|
3863
3871
|
isSVG: o
|
|
3864
3872
|
}), p.current && f.current && (f.current.manuallyAnimateOnMount = !0));
|
|
3865
|
-
const d = f.current, m = U(
|
|
3866
|
-
d && !d.projection && s && (d.type === "html" || d.type === "svg") &&
|
|
3867
|
-
const
|
|
3873
|
+
const d = f.current, m = U(Rr);
|
|
3874
|
+
d && !d.projection && s && (d.type === "html" || d.type === "svg") && Ju(f.current, i, s, m);
|
|
3875
|
+
const g = ft(!1);
|
|
3868
3876
|
Jn(() => {
|
|
3869
|
-
d &&
|
|
3877
|
+
d && g.current && d.update(i, l);
|
|
3870
3878
|
});
|
|
3871
|
-
const
|
|
3872
|
-
return
|
|
3873
|
-
p.current = !0, d && (
|
|
3879
|
+
const v = i[Ks], T = ft(!!v && typeof window < "u" && !window.MotionHandoffIsComplete?.(v) && window.MotionHasOptimisedAnimation?.(v));
|
|
3880
|
+
return Gr(() => {
|
|
3881
|
+
p.current = !0, d && (g.current = !0, window.MotionIsMounted = !0, d.updateFeatures(), d.scheduleRenderMicrotask(), T.current && d.animationState && d.animationState.animateChanges());
|
|
3874
3882
|
}), ni(() => {
|
|
3875
3883
|
d && (!T.current && d.animationState && d.animationState.animateChanges(), T.current && (queueMicrotask(() => {
|
|
3876
|
-
window.MotionHandoffMarkAsComplete?.(
|
|
3884
|
+
window.MotionHandoffMarkAsComplete?.(v);
|
|
3877
3885
|
}), T.current = !1), d.enteringChildren = void 0);
|
|
3878
3886
|
}), d;
|
|
3879
3887
|
}
|
|
3880
|
-
function
|
|
3888
|
+
function Ju(t, e, i, n) {
|
|
3881
3889
|
const { layoutId: s, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: c, layoutAnchor: u, layoutCrossfade: h } = e;
|
|
3882
|
-
t.projection = new i(t.latestValues, e["data-framer-portal-id"] ? void 0 :
|
|
3890
|
+
t.projection = new i(t.latestValues, e["data-framer-portal-id"] ? void 0 : Lr(t.parent)), t.projection.setOptions({
|
|
3883
3891
|
layoutId: s,
|
|
3884
3892
|
layout: o,
|
|
3885
3893
|
alwaysMeasureLayout: !!r || a && Tt(a),
|
|
@@ -3892,50 +3900,50 @@ function rc(t, e, i, n) {
|
|
|
3892
3900
|
layoutAnchor: u
|
|
3893
3901
|
});
|
|
3894
3902
|
}
|
|
3895
|
-
function
|
|
3903
|
+
function Lr(t) {
|
|
3896
3904
|
if (t)
|
|
3897
|
-
return t.options.allowProjection !== !1 ? t.projection :
|
|
3905
|
+
return t.options.allowProjection !== !1 ? t.projection : Lr(t.parent);
|
|
3898
3906
|
}
|
|
3899
3907
|
function Ve(t, { forwardMotionProps: e = !1, type: i } = {}, n, s) {
|
|
3900
|
-
n &&
|
|
3901
|
-
const o = i ? i === "svg" : Ei(t), r = o ?
|
|
3908
|
+
n && ku(n);
|
|
3909
|
+
const o = i ? i === "svg" : Ei(t), r = o ? Xu : _u;
|
|
3902
3910
|
function a(c, u) {
|
|
3903
3911
|
let h;
|
|
3904
3912
|
const f = {
|
|
3905
|
-
...U(
|
|
3913
|
+
...U(Ar),
|
|
3906
3914
|
...c,
|
|
3907
|
-
layoutId:
|
|
3908
|
-
}, { isStatic: p } = f,
|
|
3915
|
+
layoutId: Qu(c)
|
|
3916
|
+
}, { isStatic: p, isValidProp: d } = f, m = Fu(c), g = r(c, p);
|
|
3909
3917
|
if (!p && typeof window < "u") {
|
|
3910
|
-
|
|
3911
|
-
const v =
|
|
3912
|
-
h = v.MeasureLayout,
|
|
3918
|
+
tc(f, n);
|
|
3919
|
+
const v = ec(f);
|
|
3920
|
+
h = v.MeasureLayout, m.visualElement = Zu(t, g, f, s, v.ProjectionNode, o);
|
|
3913
3921
|
}
|
|
3914
|
-
return
|
|
3915
|
-
value:
|
|
3916
|
-
children: [h &&
|
|
3917
|
-
visualElement:
|
|
3922
|
+
return Kr(me.Provider, {
|
|
3923
|
+
value: m,
|
|
3924
|
+
children: [h && m.visualElement ? Qn(h, {
|
|
3925
|
+
visualElement: m.visualElement,
|
|
3918
3926
|
...f
|
|
3919
|
-
}) : null,
|
|
3927
|
+
}) : null, zu(t, c, qu(g, m.visualElement, u), g, p, e, o, d)]
|
|
3920
3928
|
});
|
|
3921
3929
|
}
|
|
3922
3930
|
a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
3923
|
-
const l =
|
|
3924
|
-
return l[
|
|
3931
|
+
const l = Ur(a);
|
|
3932
|
+
return l[Yu] = t, l;
|
|
3925
3933
|
}
|
|
3926
|
-
function
|
|
3934
|
+
function Qu({ layoutId: t }) {
|
|
3927
3935
|
const e = U(ts).id;
|
|
3928
3936
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
3929
3937
|
}
|
|
3930
|
-
function
|
|
3931
|
-
const i = U(
|
|
3938
|
+
function tc(t, e) {
|
|
3939
|
+
const i = U(Vr).strict;
|
|
3932
3940
|
if (process.env.NODE_ENV !== "production" && e && i) {
|
|
3933
3941
|
const n = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
3934
|
-
t.ignoreStrict ? Mt(!1, n, "lazy-strict-mode") :
|
|
3942
|
+
t.ignoreStrict ? Mt(!1, n, "lazy-strict-mode") : tt(!1, n, "lazy-strict-mode");
|
|
3935
3943
|
}
|
|
3936
3944
|
}
|
|
3937
|
-
function
|
|
3938
|
-
const { drag: e, layout: i } =
|
|
3945
|
+
function ec(t) {
|
|
3946
|
+
const { drag: e, layout: i } = Mr();
|
|
3939
3947
|
if (!e && !i) return {};
|
|
3940
3948
|
const n = {
|
|
3941
3949
|
...e,
|
|
@@ -3946,14 +3954,14 @@ function lc(t) {
|
|
|
3946
3954
|
ProjectionNode: n.ProjectionNode
|
|
3947
3955
|
};
|
|
3948
3956
|
}
|
|
3949
|
-
function
|
|
3957
|
+
function ic(t, e) {
|
|
3950
3958
|
if (typeof Proxy > "u") return Ve;
|
|
3951
3959
|
const i = /* @__PURE__ */ new Map(), n = (o, r) => Ve(o, r, t, e), s = (o, r) => (process.env.NODE_ENV !== "production" && ai(!1, "motion() is deprecated. Use motion.create() instead."), n(o, r));
|
|
3952
3960
|
return new Proxy(s, { get: (o, r) => r === "create" ? n : (i.has(r) || i.set(r, Ve(r, void 0, t, e)), i.get(r)) });
|
|
3953
3961
|
}
|
|
3954
|
-
var
|
|
3962
|
+
var nc = (t, e) => e.isSVG ?? Ei(t) ? new jl(e) : new kl(e, { allowProjection: t !== qn }), sc = class extends ot {
|
|
3955
3963
|
constructor(t) {
|
|
3956
|
-
super(t), t.animationState || (t.animationState =
|
|
3964
|
+
super(t), t.animationState || (t.animationState = Kl(t));
|
|
3957
3965
|
}
|
|
3958
3966
|
updateAnimationControlsSubscription() {
|
|
3959
3967
|
const { animate: t } = this.node.getProps();
|
|
@@ -3969,9 +3977,9 @@ var cc = (t, e) => e.isSVG ?? Ei(t) ? new Kl(e) : new Ol(e, { allowProjection: t
|
|
|
3969
3977
|
unmount() {
|
|
3970
3978
|
this.node.animationState.reset(), this.unmountControls?.();
|
|
3971
3979
|
}
|
|
3972
|
-
},
|
|
3980
|
+
}, rc = 0, oc = class extends ot {
|
|
3973
3981
|
constructor() {
|
|
3974
|
-
super(...arguments), this.id =
|
|
3982
|
+
super(...arguments), this.id = rc++, this.isExitComplete = !1;
|
|
3975
3983
|
}
|
|
3976
3984
|
update() {
|
|
3977
3985
|
if (!this.node.presenceContext) return;
|
|
@@ -4003,9 +4011,9 @@ var cc = (t, e) => e.isSVG ?? Ei(t) ? new Kl(e) : new Ol(e, { allowProjection: t
|
|
|
4003
4011
|
}
|
|
4004
4012
|
unmount() {
|
|
4005
4013
|
}
|
|
4006
|
-
},
|
|
4007
|
-
animation: { Feature:
|
|
4008
|
-
exit: { Feature:
|
|
4014
|
+
}, ac = {
|
|
4015
|
+
animation: { Feature: sc },
|
|
4016
|
+
exit: { Feature: oc }
|
|
4009
4017
|
};
|
|
4010
4018
|
function Kt(t) {
|
|
4011
4019
|
return { point: {
|
|
@@ -4013,16 +4021,16 @@ function Kt(t) {
|
|
|
4013
4021
|
y: t.pageY
|
|
4014
4022
|
} };
|
|
4015
4023
|
}
|
|
4016
|
-
var
|
|
4017
|
-
function
|
|
4018
|
-
return Nt(t, e,
|
|
4024
|
+
var lc = (t) => (e) => Si(e) && t(e, Kt(e));
|
|
4025
|
+
function Ft(t, e, i, n) {
|
|
4026
|
+
return Nt(t, e, lc(i), n);
|
|
4019
4027
|
}
|
|
4020
|
-
var
|
|
4021
|
-
function
|
|
4028
|
+
var kr = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Un = (t, e) => Math.abs(t - e);
|
|
4029
|
+
function uc(t, e) {
|
|
4022
4030
|
const i = Un(t.x, e.x), n = Un(t.y, e.y);
|
|
4023
4031
|
return Math.sqrt(i ** 2 + n ** 2);
|
|
4024
4032
|
}
|
|
4025
|
-
var Wn = /* @__PURE__ */ new Set(["auto", "scroll"]),
|
|
4033
|
+
var Wn = /* @__PURE__ */ new Set(["auto", "scroll"]), Br = class {
|
|
4026
4034
|
constructor(t, e, { transformPagePoint: i, contextWindow: n = window, dragSnapToOrigin: s = !1, distanceThreshold: o = 3, element: r } = {}) {
|
|
4027
4035
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.lastRawMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (f) => {
|
|
4028
4036
|
this.handleScroll(f.target);
|
|
@@ -4030,30 +4038,30 @@ var Wn = /* @__PURE__ */ new Set(["auto", "scroll"]), Ir = class {
|
|
|
4030
4038
|
this.handleScroll(window);
|
|
4031
4039
|
}, this.updatePoint = () => {
|
|
4032
4040
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return;
|
|
4033
|
-
this.lastRawMoveEventInfo && (this.lastMoveEventInfo =
|
|
4034
|
-
const f = Me(this.lastMoveEventInfo, this.history), p = this.startEvent !== null, d =
|
|
4041
|
+
this.lastRawMoveEventInfo && (this.lastMoveEventInfo = Gt(this.lastRawMoveEventInfo, this.transformPagePoint));
|
|
4042
|
+
const f = Me(this.lastMoveEventInfo, this.history), p = this.startEvent !== null, d = uc(f.offset, {
|
|
4035
4043
|
x: 0,
|
|
4036
4044
|
y: 0
|
|
4037
4045
|
}) >= this.distanceThreshold;
|
|
4038
4046
|
if (!p && !d) return;
|
|
4039
|
-
const { point: m } = f, { timestamp:
|
|
4047
|
+
const { point: m } = f, { timestamp: g } = F;
|
|
4040
4048
|
this.history.push({
|
|
4041
4049
|
...m,
|
|
4042
|
-
timestamp:
|
|
4050
|
+
timestamp: g
|
|
4043
4051
|
});
|
|
4044
|
-
const { onStart:
|
|
4045
|
-
p || (
|
|
4052
|
+
const { onStart: v, onMove: T } = this.handlers;
|
|
4053
|
+
p || (v && v(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), T && T(this.lastMoveEvent, f);
|
|
4046
4054
|
}, this.handlePointerMove = (f, p) => {
|
|
4047
|
-
this.lastMoveEvent = f, this.lastRawMoveEventInfo = p, this.lastMoveEventInfo =
|
|
4055
|
+
this.lastMoveEvent = f, this.lastRawMoveEventInfo = p, this.lastMoveEventInfo = Gt(p, this.transformPagePoint), M.update(this.updatePoint, !0);
|
|
4048
4056
|
}, this.handlePointerUp = (f, p) => {
|
|
4049
4057
|
this.end();
|
|
4050
|
-
const { onEnd: d, onSessionEnd: m, resumeAnimation:
|
|
4051
|
-
if ((this.dragSnapToOrigin || !this.startEvent) &&
|
|
4052
|
-
const
|
|
4053
|
-
this.startEvent && d && d(f,
|
|
4058
|
+
const { onEnd: d, onSessionEnd: m, resumeAnimation: g } = this.handlers;
|
|
4059
|
+
if ((this.dragSnapToOrigin || !this.startEvent) && g && g(), !(this.lastMoveEvent && this.lastMoveEventInfo)) return;
|
|
4060
|
+
const v = Me(f.type === "pointercancel" ? this.lastMoveEventInfo : Gt(p, this.transformPagePoint), this.history);
|
|
4061
|
+
this.startEvent && d && d(f, v), m && m(f, v);
|
|
4054
4062
|
}, !Si(t)) return;
|
|
4055
4063
|
this.dragSnapToOrigin = s, this.handlers = e, this.transformPagePoint = i, this.distanceThreshold = o, this.contextWindow = n || window;
|
|
4056
|
-
const a =
|
|
4064
|
+
const a = Gt(Kt(t), this.transformPagePoint), { point: l } = a, { timestamp: c } = F;
|
|
4057
4065
|
this.history = [{
|
|
4058
4066
|
...l,
|
|
4059
4067
|
timestamp: c
|
|
@@ -4064,7 +4072,7 @@ var Wn = /* @__PURE__ */ new Set(["auto", "scroll"]), Ir = class {
|
|
|
4064
4072
|
passive: !0,
|
|
4065
4073
|
capture: !0
|
|
4066
4074
|
};
|
|
4067
|
-
this.removeListeners = Ut(
|
|
4075
|
+
this.removeListeners = Ut(Ft(this.contextWindow, "pointermove", this.handlePointerMove, h), Ft(this.contextWindow, "pointerup", this.handlePointerUp, h), Ft(this.contextWindow, "pointercancel", this.handlePointerUp, h)), r && this.startScrollTracking(r);
|
|
4068
4076
|
}
|
|
4069
4077
|
startScrollTracking(t) {
|
|
4070
4078
|
let e = t.parentElement;
|
|
@@ -4104,7 +4112,7 @@ var Wn = /* @__PURE__ */ new Set(["auto", "scroll"]), Ir = class {
|
|
|
4104
4112
|
this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), rt(this.updatePoint);
|
|
4105
4113
|
}
|
|
4106
4114
|
};
|
|
4107
|
-
function
|
|
4115
|
+
function Gt(t, e) {
|
|
4108
4116
|
return e ? { point: e(t.point) } : t;
|
|
4109
4117
|
}
|
|
4110
4118
|
function $n(t, e) {
|
|
@@ -4117,17 +4125,17 @@ function Me({ point: t }, e) {
|
|
|
4117
4125
|
return {
|
|
4118
4126
|
point: t,
|
|
4119
4127
|
delta: $n(t, Fr(e)),
|
|
4120
|
-
offset: $n(t,
|
|
4121
|
-
velocity:
|
|
4128
|
+
offset: $n(t, cc(e)),
|
|
4129
|
+
velocity: hc(e, 0.1)
|
|
4122
4130
|
};
|
|
4123
4131
|
}
|
|
4124
|
-
function
|
|
4132
|
+
function cc(t) {
|
|
4125
4133
|
return t[0];
|
|
4126
4134
|
}
|
|
4127
4135
|
function Fr(t) {
|
|
4128
4136
|
return t[t.length - 1];
|
|
4129
4137
|
}
|
|
4130
|
-
function
|
|
4138
|
+
function hc(t, e) {
|
|
4131
4139
|
if (t.length < 2) return {
|
|
4132
4140
|
x: 0,
|
|
4133
4141
|
y: 0
|
|
@@ -4152,7 +4160,7 @@ function yc(t, e) {
|
|
|
4152
4160
|
};
|
|
4153
4161
|
return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
|
|
4154
4162
|
}
|
|
4155
|
-
function
|
|
4163
|
+
function fc(t, { min: e, max: i }, n) {
|
|
4156
4164
|
return e !== void 0 && t < e ? t = n ? V(e, t, n.min) : Math.max(t, e) : i !== void 0 && t > i && (t = n ? V(i, t, n.max) : Math.min(t, i)), t;
|
|
4157
4165
|
}
|
|
4158
4166
|
function Kn(t, e, i) {
|
|
@@ -4161,51 +4169,51 @@ function Kn(t, e, i) {
|
|
|
4161
4169
|
max: i !== void 0 ? t.max + i - (t.max - t.min) : void 0
|
|
4162
4170
|
};
|
|
4163
4171
|
}
|
|
4164
|
-
function
|
|
4172
|
+
function dc(t, { top: e, left: i, bottom: n, right: s }) {
|
|
4165
4173
|
return {
|
|
4166
4174
|
x: Kn(t.x, i, s),
|
|
4167
4175
|
y: Kn(t.y, e, n)
|
|
4168
4176
|
};
|
|
4169
4177
|
}
|
|
4170
|
-
function
|
|
4178
|
+
function zn(t, e) {
|
|
4171
4179
|
let i = e.min - t.min, n = e.max - t.max;
|
|
4172
4180
|
return e.max - e.min < t.max - t.min && ([i, n] = [n, i]), {
|
|
4173
4181
|
min: i,
|
|
4174
4182
|
max: n
|
|
4175
4183
|
};
|
|
4176
4184
|
}
|
|
4177
|
-
function
|
|
4185
|
+
function pc(t, e) {
|
|
4178
4186
|
return {
|
|
4179
|
-
x:
|
|
4180
|
-
y:
|
|
4187
|
+
x: zn(t.x, e.x),
|
|
4188
|
+
y: zn(t.y, e.y)
|
|
4181
4189
|
};
|
|
4182
4190
|
}
|
|
4183
|
-
function
|
|
4191
|
+
function mc(t, e) {
|
|
4184
4192
|
let i = 0.5;
|
|
4185
4193
|
const n = j(t), s = j(e);
|
|
4186
|
-
return s > n ? i =
|
|
4194
|
+
return s > n ? i = It(e.min, e.max - n, t.min) : n > s && (i = It(t.min, t.max - s, e.min)), Q(0, 1, i);
|
|
4187
4195
|
}
|
|
4188
|
-
function
|
|
4196
|
+
function vc(t, e) {
|
|
4189
4197
|
const i = {};
|
|
4190
4198
|
return e.min !== void 0 && (i.min = e.min - t.min), e.max !== void 0 && (i.max = e.max - t.min), i;
|
|
4191
4199
|
}
|
|
4192
4200
|
var ei = 0.35;
|
|
4193
|
-
function
|
|
4201
|
+
function gc(t = ei) {
|
|
4194
4202
|
return t === !1 ? t = 0 : t === !0 && (t = ei), {
|
|
4195
|
-
x:
|
|
4196
|
-
y:
|
|
4203
|
+
x: Hn(t, "left", "right"),
|
|
4204
|
+
y: Hn(t, "top", "bottom")
|
|
4197
4205
|
};
|
|
4198
4206
|
}
|
|
4199
|
-
function
|
|
4207
|
+
function Hn(t, e, i) {
|
|
4200
4208
|
return {
|
|
4201
|
-
min:
|
|
4202
|
-
max:
|
|
4209
|
+
min: Gn(t, e),
|
|
4210
|
+
max: Gn(t, i)
|
|
4203
4211
|
};
|
|
4204
4212
|
}
|
|
4205
|
-
function
|
|
4213
|
+
function Gn(t, e) {
|
|
4206
4214
|
return typeof t == "number" ? t : t[e] || 0;
|
|
4207
4215
|
}
|
|
4208
|
-
var
|
|
4216
|
+
var yc = /* @__PURE__ */ new WeakMap(), Tc = class {
|
|
4209
4217
|
constructor(t) {
|
|
4210
4218
|
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = {
|
|
4211
4219
|
x: 0,
|
|
@@ -4219,31 +4227,31 @@ var Ac = /* @__PURE__ */ new WeakMap(), Vc = class {
|
|
|
4219
4227
|
e && this.snapToCursor(Kt(u).point), this.stopAnimation();
|
|
4220
4228
|
}, o = (u, h) => {
|
|
4221
4229
|
const { drag: f, dragPropagation: p, onDragStart: d } = this.getProps();
|
|
4222
|
-
if (f && !p && (this.openDragLock && this.openDragLock(), this.openDragLock =
|
|
4230
|
+
if (f && !p && (this.openDragLock && this.openDragLock(), this.openDragLock = Ja(f), !this.openDragLock))
|
|
4223
4231
|
return;
|
|
4224
|
-
this.latestPointerEvent = u, this.latestPanInfo = h, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), q((
|
|
4225
|
-
let
|
|
4226
|
-
if (J.test(
|
|
4232
|
+
this.latestPointerEvent = u, this.latestPanInfo = h, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), q((g) => {
|
|
4233
|
+
let v = this.getAxisMotionValue(g).get() || 0;
|
|
4234
|
+
if (J.test(v)) {
|
|
4227
4235
|
const { projection: T } = this.visualElement;
|
|
4228
4236
|
if (T && T.layout) {
|
|
4229
|
-
const x = T.layout.layoutBox[
|
|
4230
|
-
x && (
|
|
4237
|
+
const x = T.layout.layoutBox[g];
|
|
4238
|
+
x && (v = j(x) * (parseFloat(v) / 100));
|
|
4231
4239
|
}
|
|
4232
4240
|
}
|
|
4233
|
-
this.originPoint[
|
|
4234
|
-
}), d && M.update(() => d(u, h), !1, !0),
|
|
4241
|
+
this.originPoint[g] = v;
|
|
4242
|
+
}), d && M.update(() => d(u, h), !1, !0), He(this.visualElement, "transform");
|
|
4235
4243
|
const { animationState: m } = this.visualElement;
|
|
4236
4244
|
m && m.setActive("whileDrag", !0);
|
|
4237
4245
|
}, r = (u, h) => {
|
|
4238
4246
|
this.latestPointerEvent = u, this.latestPanInfo = h;
|
|
4239
4247
|
const { dragPropagation: f, dragDirectionLock: p, onDirectionLock: d, onDrag: m } = this.getProps();
|
|
4240
4248
|
if (!f && !this.openDragLock) return;
|
|
4241
|
-
const { offset:
|
|
4249
|
+
const { offset: g } = h;
|
|
4242
4250
|
if (p && this.currentDirection === null) {
|
|
4243
|
-
this.currentDirection =
|
|
4251
|
+
this.currentDirection = wc(g), this.currentDirection !== null && d && d(this.currentDirection);
|
|
4244
4252
|
return;
|
|
4245
4253
|
}
|
|
4246
|
-
this.updateAxis("x", h.point,
|
|
4254
|
+
this.updateAxis("x", h.point, g), this.updateAxis("y", h.point, g), this.visualElement.render(), m && M.update(() => m(u, h), !1, !0);
|
|
4247
4255
|
}, a = (u, h) => {
|
|
4248
4256
|
this.latestPointerEvent = u, this.latestPanInfo = h, this.stop(u, h), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
4249
4257
|
}, l = () => {
|
|
@@ -4253,7 +4261,7 @@ var Ac = /* @__PURE__ */ new WeakMap(), Vc = class {
|
|
|
4253
4261
|
y: 0
|
|
4254
4262
|
});
|
|
4255
4263
|
}, { dragSnapToOrigin: c } = this.getProps();
|
|
4256
|
-
this.panSession = new
|
|
4264
|
+
this.panSession = new Br(t, {
|
|
4257
4265
|
onSessionStart: s,
|
|
4258
4266
|
onStart: o,
|
|
4259
4267
|
onMove: r,
|
|
@@ -4263,7 +4271,7 @@ var Ac = /* @__PURE__ */ new WeakMap(), Vc = class {
|
|
|
4263
4271
|
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
4264
4272
|
dragSnapToOrigin: c,
|
|
4265
4273
|
distanceThreshold: i,
|
|
4266
|
-
contextWindow:
|
|
4274
|
+
contextWindow: kr(this.visualElement),
|
|
4267
4275
|
element: this.visualElement.current
|
|
4268
4276
|
});
|
|
4269
4277
|
}
|
|
@@ -4287,36 +4295,36 @@ var Ac = /* @__PURE__ */ new WeakMap(), Vc = class {
|
|
|
4287
4295
|
}
|
|
4288
4296
|
updateAxis(t, e, i) {
|
|
4289
4297
|
const { drag: n } = this.getProps();
|
|
4290
|
-
if (!i || !
|
|
4298
|
+
if (!i || !_t(t, n, this.currentDirection)) return;
|
|
4291
4299
|
const s = this.getAxisMotionValue(t);
|
|
4292
4300
|
let o = this.originPoint[t] + i[t];
|
|
4293
|
-
this.constraints && this.constraints[t] && (o =
|
|
4301
|
+
this.constraints && this.constraints[t] && (o = fc(o, this.constraints[t], this.elastic[t])), s.set(o);
|
|
4294
4302
|
}
|
|
4295
4303
|
resolveConstraints() {
|
|
4296
4304
|
const { dragConstraints: t, dragElastic: e } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, n = this.constraints;
|
|
4297
|
-
t && Tt(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && i ? this.constraints =
|
|
4298
|
-
this.constraints !== !1 && this.getAxisMotionValue(s) && (this.constraints[s] =
|
|
4305
|
+
t && Tt(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && i ? this.constraints = dc(i.layoutBox, t) : this.constraints = !1, this.elastic = gc(e), n !== this.constraints && !Tt(t) && i && this.constraints && !this.hasMutatedConstraints && q((s) => {
|
|
4306
|
+
this.constraints !== !1 && this.getAxisMotionValue(s) && (this.constraints[s] = vc(i.layoutBox[s], this.constraints[s]));
|
|
4299
4307
|
});
|
|
4300
4308
|
}
|
|
4301
4309
|
resolveRefConstraints() {
|
|
4302
4310
|
const { dragConstraints: t, onMeasureDragConstraints: e } = this.getProps();
|
|
4303
4311
|
if (!t || !Tt(t)) return !1;
|
|
4304
4312
|
const i = t.current;
|
|
4305
|
-
|
|
4313
|
+
tt(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
|
|
4306
4314
|
const { projection: n } = this.visualElement;
|
|
4307
4315
|
if (!n || !n.layout) return !1;
|
|
4308
4316
|
n.root && (n.root.scroll = void 0, n.root.updateScroll());
|
|
4309
|
-
const s =
|
|
4310
|
-
let o =
|
|
4317
|
+
const s = Ml(i, n.root, this.visualElement.getTransformPagePoint());
|
|
4318
|
+
let o = pc(n.layout.layoutBox, s);
|
|
4311
4319
|
if (e) {
|
|
4312
|
-
const r = e(
|
|
4320
|
+
const r = e(bl(o));
|
|
4313
4321
|
this.hasMutatedConstraints = !!r, r && (o = rr(r));
|
|
4314
4322
|
}
|
|
4315
4323
|
return o;
|
|
4316
4324
|
}
|
|
4317
4325
|
startAnimation(t) {
|
|
4318
4326
|
const { drag: e, dragMomentum: i, dragElastic: n, dragTransition: s, dragSnapToOrigin: o, onDragTransitionEnd: r } = this.getProps(), a = this.constraints || {}, l = q((c) => {
|
|
4319
|
-
if (!
|
|
4327
|
+
if (!_t(c, e, this.currentDirection)) return;
|
|
4320
4328
|
let u = a && a[c] || {};
|
|
4321
4329
|
(o === !0 || o === c) && (u = {
|
|
4322
4330
|
min: 0,
|
|
@@ -4339,7 +4347,7 @@ var Ac = /* @__PURE__ */ new WeakMap(), Vc = class {
|
|
|
4339
4347
|
}
|
|
4340
4348
|
startAxisValueAnimation(t, e) {
|
|
4341
4349
|
const i = this.getAxisMotionValue(t);
|
|
4342
|
-
return
|
|
4350
|
+
return He(this.visualElement, t), i.start(yi(t, i, 0, e, this.visualElement, !1));
|
|
4343
4351
|
}
|
|
4344
4352
|
stopAnimation() {
|
|
4345
4353
|
q((t) => this.getAxisMotionValue(t).stop());
|
|
@@ -4351,7 +4359,7 @@ var Ac = /* @__PURE__ */ new WeakMap(), Vc = class {
|
|
|
4351
4359
|
snapToCursor(t) {
|
|
4352
4360
|
q((e) => {
|
|
4353
4361
|
const { drag: i } = this.getProps();
|
|
4354
|
-
if (!
|
|
4362
|
+
if (!_t(e, i, this.currentDirection)) return;
|
|
4355
4363
|
const { projection: n } = this.visualElement, s = this.getAxisMotionValue(e);
|
|
4356
4364
|
if (n && n.layout) {
|
|
4357
4365
|
const { min: o, max: r } = n.layout.layoutBox[e], a = s.get() || 0;
|
|
@@ -4372,7 +4380,7 @@ var Ac = /* @__PURE__ */ new WeakMap(), Vc = class {
|
|
|
4372
4380
|
const r = this.getAxisMotionValue(o);
|
|
4373
4381
|
if (r && this.constraints !== !1) {
|
|
4374
4382
|
const a = r.get();
|
|
4375
|
-
n[o] =
|
|
4383
|
+
n[o] = mc({
|
|
4376
4384
|
min: a,
|
|
4377
4385
|
max: a
|
|
4378
4386
|
}, this.constraints[o]);
|
|
@@ -4380,22 +4388,22 @@ var Ac = /* @__PURE__ */ new WeakMap(), Vc = class {
|
|
|
4380
4388
|
});
|
|
4381
4389
|
const { transformTemplate: s } = this.visualElement.getProps();
|
|
4382
4390
|
this.visualElement.current.style.transform = s ? s({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.constraints = !1, this.resolveConstraints(), q((o) => {
|
|
4383
|
-
if (!
|
|
4391
|
+
if (!_t(o, t, null)) return;
|
|
4384
4392
|
const r = this.getAxisMotionValue(o), { min: a, max: l } = this.constraints[o];
|
|
4385
4393
|
r.set(V(a, l, n[o]));
|
|
4386
4394
|
}), this.visualElement.render();
|
|
4387
4395
|
}
|
|
4388
4396
|
addListeners() {
|
|
4389
4397
|
if (!this.visualElement.current) return;
|
|
4390
|
-
|
|
4391
|
-
const t = this.visualElement.current, e =
|
|
4392
|
-
const { drag: c, dragListener: u = !0 } = this.getProps(), h = l.target, f = h !== t &&
|
|
4398
|
+
yc.set(this.visualElement, this);
|
|
4399
|
+
const t = this.visualElement.current, e = Ft(t, "pointerdown", (l) => {
|
|
4400
|
+
const { drag: c, dragListener: u = !0 } = this.getProps(), h = l.target, f = h !== t && sl(h);
|
|
4393
4401
|
c && u && !f && this.start(l);
|
|
4394
4402
|
});
|
|
4395
4403
|
let i;
|
|
4396
4404
|
const n = () => {
|
|
4397
4405
|
const { dragConstraints: l } = this.getProps();
|
|
4398
|
-
Tt(l) && l.current && (this.constraints = this.resolveRefConstraints(), i || (i =
|
|
4406
|
+
Tt(l) && l.current && (this.constraints = this.resolveRefConstraints(), i || (i = xc(t, l.current, () => this.scalePositionWithinConstraints())));
|
|
4399
4407
|
}, { projection: s } = this.visualElement, o = s.addEventListener("measure", n);
|
|
4400
4408
|
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), M.read(n);
|
|
4401
4409
|
const r = Nt(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: c }) => {
|
|
@@ -4421,7 +4429,7 @@ var Ac = /* @__PURE__ */ new WeakMap(), Vc = class {
|
|
|
4421
4429
|
};
|
|
4422
4430
|
}
|
|
4423
4431
|
};
|
|
4424
|
-
function
|
|
4432
|
+
function _n(t) {
|
|
4425
4433
|
let e = !0;
|
|
4426
4434
|
return () => {
|
|
4427
4435
|
if (e) {
|
|
@@ -4431,26 +4439,26 @@ function Gn(t) {
|
|
|
4431
4439
|
t();
|
|
4432
4440
|
};
|
|
4433
4441
|
}
|
|
4434
|
-
function
|
|
4435
|
-
const n = en(t,
|
|
4442
|
+
function xc(t, e, i) {
|
|
4443
|
+
const n = en(t, _n(i)), s = en(e, _n(i));
|
|
4436
4444
|
return () => {
|
|
4437
4445
|
n(), s();
|
|
4438
4446
|
};
|
|
4439
4447
|
}
|
|
4440
|
-
function
|
|
4448
|
+
function _t(t, e, i) {
|
|
4441
4449
|
return (e === !0 || e === t) && (i === null || i === t);
|
|
4442
4450
|
}
|
|
4443
|
-
function
|
|
4451
|
+
function wc(t, e = 10) {
|
|
4444
4452
|
let i = null;
|
|
4445
4453
|
return Math.abs(t.y) > e ? i = "y" : Math.abs(t.x) > e && (i = "x"), i;
|
|
4446
4454
|
}
|
|
4447
|
-
var
|
|
4455
|
+
var Pc = class extends ot {
|
|
4448
4456
|
constructor(t) {
|
|
4449
|
-
super(t), this.removeGroupControls =
|
|
4457
|
+
super(t), this.removeGroupControls = z, this.removeListeners = z, this.controls = new Tc(t);
|
|
4450
4458
|
}
|
|
4451
4459
|
mount() {
|
|
4452
4460
|
const { dragControls: t } = this.node.getProps();
|
|
4453
|
-
t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() ||
|
|
4461
|
+
t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || z;
|
|
4454
4462
|
}
|
|
4455
4463
|
update() {
|
|
4456
4464
|
const { dragControls: t } = this.node.getProps(), { dragControls: e } = this.node.prevProps || {};
|
|
@@ -4461,14 +4469,14 @@ var Dc = class extends ot {
|
|
|
4461
4469
|
}
|
|
4462
4470
|
}, Ce = (t) => (e, i) => {
|
|
4463
4471
|
t && M.update(() => t(e, i), !1, !0);
|
|
4464
|
-
},
|
|
4472
|
+
}, Sc = class extends ot {
|
|
4465
4473
|
constructor() {
|
|
4466
|
-
super(...arguments), this.removePointerDownListener =
|
|
4474
|
+
super(...arguments), this.removePointerDownListener = z;
|
|
4467
4475
|
}
|
|
4468
4476
|
onPointerDown(t) {
|
|
4469
|
-
this.session = new
|
|
4477
|
+
this.session = new Br(t, this.createPanHandlers(), {
|
|
4470
4478
|
transformPagePoint: this.node.getTransformPagePoint(),
|
|
4471
|
-
contextWindow:
|
|
4479
|
+
contextWindow: kr(this.node)
|
|
4472
4480
|
});
|
|
4473
4481
|
}
|
|
4474
4482
|
createPanHandlers() {
|
|
@@ -4483,7 +4491,7 @@ var Dc = class extends ot {
|
|
|
4483
4491
|
};
|
|
4484
4492
|
}
|
|
4485
4493
|
mount() {
|
|
4486
|
-
this.removePointerDownListener =
|
|
4494
|
+
this.removePointerDownListener = Ft(this.node.current, "pointerdown", (t) => this.onPointerDown(t));
|
|
4487
4495
|
}
|
|
4488
4496
|
update() {
|
|
4489
4497
|
this.session && this.session.updateHandlers(this.createPanHandlers());
|
|
@@ -4491,7 +4499,7 @@ var Dc = class extends ot {
|
|
|
4491
4499
|
unmount() {
|
|
4492
4500
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
4493
4501
|
}
|
|
4494
|
-
}, De = !1,
|
|
4502
|
+
}, De = !1, bc = class extends jr {
|
|
4495
4503
|
componentDidMount() {
|
|
4496
4504
|
const { visualElement: t, layoutGroup: e, switchLayoutGroup: i, layoutId: n } = this.props, { projection: s } = t;
|
|
4497
4505
|
s && (e.group && e.group.add(s), i && i.register && n && i.register(s), De && s.root.didUpdate(), s.addEventListener("animationComplete", () => {
|
|
@@ -4530,22 +4538,22 @@ var Dc = class extends ot {
|
|
|
4530
4538
|
return null;
|
|
4531
4539
|
}
|
|
4532
4540
|
};
|
|
4533
|
-
function
|
|
4534
|
-
const [e, i] =
|
|
4535
|
-
return Qn(
|
|
4541
|
+
function Ir(t) {
|
|
4542
|
+
const [e, i] = Ru(), n = U(ts);
|
|
4543
|
+
return Qn(bc, {
|
|
4536
4544
|
...t,
|
|
4537
4545
|
layoutGroup: n,
|
|
4538
|
-
switchLayoutGroup: U(
|
|
4546
|
+
switchLayoutGroup: U(Rr),
|
|
4539
4547
|
isPresent: e,
|
|
4540
4548
|
safeToRemove: i
|
|
4541
4549
|
});
|
|
4542
4550
|
}
|
|
4543
|
-
var
|
|
4544
|
-
pan: { Feature:
|
|
4551
|
+
var Ac = {
|
|
4552
|
+
pan: { Feature: Sc },
|
|
4545
4553
|
drag: {
|
|
4546
|
-
Feature:
|
|
4547
|
-
ProjectionNode:
|
|
4548
|
-
MeasureLayout:
|
|
4554
|
+
Feature: Pc,
|
|
4555
|
+
ProjectionNode: br,
|
|
4556
|
+
MeasureLayout: Ir
|
|
4549
4557
|
}
|
|
4550
4558
|
};
|
|
4551
4559
|
function Xn(t, e, i) {
|
|
@@ -4554,14 +4562,14 @@ function Xn(t, e, i) {
|
|
|
4554
4562
|
const s = n["onHover" + i];
|
|
4555
4563
|
s && M.postRender(() => s(e, Kt(e)));
|
|
4556
4564
|
}
|
|
4557
|
-
var
|
|
4565
|
+
var Vc = class extends ot {
|
|
4558
4566
|
mount() {
|
|
4559
4567
|
const { current: t } = this.node;
|
|
4560
|
-
t && (this.unmount =
|
|
4568
|
+
t && (this.unmount = tl(t, (e, i) => (Xn(this.node, i, "Start"), (n) => Xn(this.node, n, "End"))));
|
|
4561
4569
|
}
|
|
4562
4570
|
unmount() {
|
|
4563
4571
|
}
|
|
4564
|
-
},
|
|
4572
|
+
}, Mc = class extends ot {
|
|
4565
4573
|
constructor() {
|
|
4566
4574
|
super(...arguments), this.isActive = !1;
|
|
4567
4575
|
}
|
|
@@ -4590,43 +4598,43 @@ function Yn(t, e, i) {
|
|
|
4590
4598
|
const s = n["onTap" + (i === "End" ? "" : i)];
|
|
4591
4599
|
s && M.postRender(() => s(e, Kt(e)));
|
|
4592
4600
|
}
|
|
4593
|
-
var
|
|
4601
|
+
var Cc = class extends ot {
|
|
4594
4602
|
mount() {
|
|
4595
4603
|
const { current: t } = this.node;
|
|
4596
4604
|
if (!t) return;
|
|
4597
4605
|
const { globalTapTarget: e, propagate: i } = this.node.props;
|
|
4598
|
-
this.unmount =
|
|
4606
|
+
this.unmount = ol(t, (n, s) => (Yn(this.node, s, "Start"), (o, { success: r }) => Yn(this.node, o, r ? "End" : "Cancel")), {
|
|
4599
4607
|
useGlobalTarget: e,
|
|
4600
4608
|
stopPropagation: i?.tap === !1
|
|
4601
4609
|
});
|
|
4602
4610
|
}
|
|
4603
4611
|
unmount() {
|
|
4604
4612
|
}
|
|
4605
|
-
}, ii = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(),
|
|
4613
|
+
}, ii = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), Dc = (t) => {
|
|
4606
4614
|
const e = ii.get(t.target);
|
|
4607
4615
|
e && e(t);
|
|
4608
|
-
},
|
|
4609
|
-
t.forEach(
|
|
4616
|
+
}, Ec = (t) => {
|
|
4617
|
+
t.forEach(Dc);
|
|
4610
4618
|
};
|
|
4611
|
-
function
|
|
4619
|
+
function Rc({ root: t, ...e }) {
|
|
4612
4620
|
const i = t || document;
|
|
4613
4621
|
Ee.has(i) || Ee.set(i, {});
|
|
4614
4622
|
const n = Ee.get(i), s = JSON.stringify(e);
|
|
4615
|
-
return n[s] || (n[s] = new IntersectionObserver(
|
|
4623
|
+
return n[s] || (n[s] = new IntersectionObserver(Ec, {
|
|
4616
4624
|
root: t,
|
|
4617
4625
|
...e
|
|
4618
4626
|
})), n[s];
|
|
4619
4627
|
}
|
|
4620
|
-
function
|
|
4621
|
-
const n =
|
|
4628
|
+
function Lc(t, e, i) {
|
|
4629
|
+
const n = Rc(e);
|
|
4622
4630
|
return ii.set(t, i), n.observe(t), () => {
|
|
4623
4631
|
ii.delete(t), n.unobserve(t);
|
|
4624
4632
|
};
|
|
4625
4633
|
}
|
|
4626
|
-
var
|
|
4634
|
+
var kc = {
|
|
4627
4635
|
some: 0,
|
|
4628
4636
|
all: 1
|
|
4629
|
-
},
|
|
4637
|
+
}, Bc = class extends ot {
|
|
4630
4638
|
constructor() {
|
|
4631
4639
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
4632
4640
|
}
|
|
@@ -4635,7 +4643,7 @@ var Uc = {
|
|
|
4635
4643
|
const { viewport: t = {} } = this.node.getProps(), { root: e, margin: i, amount: n = "some", once: s } = t, o = {
|
|
4636
4644
|
root: e ? e.current : void 0,
|
|
4637
4645
|
rootMargin: i,
|
|
4638
|
-
threshold: typeof n == "number" ? n :
|
|
4646
|
+
threshold: typeof n == "number" ? n : kc[n]
|
|
4639
4647
|
}, r = (a) => {
|
|
4640
4648
|
const { isIntersecting: l } = a;
|
|
4641
4649
|
if (this.isInView === l || (this.isInView = l, s && !l && this.hasEnteredView)) return;
|
|
@@ -4643,7 +4651,7 @@ var Uc = {
|
|
|
4643
4651
|
const { onViewportEnter: c, onViewportLeave: u } = this.node.getProps(), h = l ? c : u;
|
|
4644
4652
|
h && h(a);
|
|
4645
4653
|
};
|
|
4646
|
-
this.stopObserver =
|
|
4654
|
+
this.stopObserver = Lc(this.node.current, o, r);
|
|
4647
4655
|
}
|
|
4648
4656
|
mount() {
|
|
4649
4657
|
this.startObserver();
|
|
@@ -4655,29 +4663,29 @@ var Uc = {
|
|
|
4655
4663
|
"amount",
|
|
4656
4664
|
"margin",
|
|
4657
4665
|
"root"
|
|
4658
|
-
].some(
|
|
4666
|
+
].some(Fc(t, e)) && this.startObserver();
|
|
4659
4667
|
}
|
|
4660
4668
|
unmount() {
|
|
4661
4669
|
this.stopObserver?.(), this.hasEnteredView = !1, this.isInView = !1;
|
|
4662
4670
|
}
|
|
4663
4671
|
};
|
|
4664
|
-
function
|
|
4672
|
+
function Fc({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
4665
4673
|
return (i) => t[i] !== e[i];
|
|
4666
4674
|
}
|
|
4667
|
-
var
|
|
4668
|
-
inView: { Feature:
|
|
4669
|
-
tap: { Feature:
|
|
4670
|
-
focus: { Feature:
|
|
4671
|
-
hover: { Feature:
|
|
4672
|
-
},
|
|
4673
|
-
ProjectionNode:
|
|
4674
|
-
MeasureLayout:
|
|
4675
|
-
} },
|
|
4676
|
-
...
|
|
4677
|
-
...
|
|
4678
|
-
...
|
|
4679
|
-
...
|
|
4680
|
-
},
|
|
4675
|
+
var Ic = {
|
|
4676
|
+
inView: { Feature: Bc },
|
|
4677
|
+
tap: { Feature: Cc },
|
|
4678
|
+
focus: { Feature: Mc },
|
|
4679
|
+
hover: { Feature: Vc }
|
|
4680
|
+
}, Oc = { layout: {
|
|
4681
|
+
ProjectionNode: br,
|
|
4682
|
+
MeasureLayout: Ir
|
|
4683
|
+
} }, jc = {
|
|
4684
|
+
...ac,
|
|
4685
|
+
...Ic,
|
|
4686
|
+
...Ac,
|
|
4687
|
+
...Oc
|
|
4688
|
+
}, Nc = /* @__PURE__ */ ic(jc, nc), zc = Nc;
|
|
4681
4689
|
export {
|
|
4682
|
-
|
|
4690
|
+
zc as t
|
|
4683
4691
|
};
|