@telegraph/tag 0.1.1 → 0.1.2
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/CHANGELOG.md +6 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +893 -764
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/Tag/Tag.constants.d.ts +37 -14
- package/dist/types/Tag/Tag.constants.d.ts.map +1 -1
- package/dist/types/Tag/Tag.d.ts +1 -1
- package/dist/types/Tag/Tag.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -1,41 +1,136 @@
|
|
|
1
1
|
import { jsx as F, jsxs as ht } from "react/jsx-runtime";
|
|
2
2
|
import { Button as xe } from "@telegraph/button";
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { Stack as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { Icon as ei } from "@telegraph/icon";
|
|
4
|
+
import { Stack as ti } from "@telegraph/layout";
|
|
5
|
+
import G, { createContext as re, useRef as W, useLayoutEffect as ni, useEffect as pt, useState as si, useContext as E, useMemo as Oe, Fragment as Tn, createElement as ii, useInsertionEffect as Vn, useCallback as ri, forwardRef as oi } from "react";
|
|
6
|
+
import { Tooltip as ai } from "@telegraph/tooltip";
|
|
7
|
+
import { Text as ui } from "@telegraph/typography";
|
|
8
|
+
import { clsx as ci } from "clsx";
|
|
9
|
+
import { X as Sn, Check as li, Copy as fi } from "lucide-react";
|
|
10
|
+
const di = (e) => {
|
|
11
|
+
const t = [];
|
|
12
|
+
let n = "", s = 0;
|
|
13
|
+
for (let i = 0; i < e.length; i++) {
|
|
14
|
+
const r = e[i];
|
|
15
|
+
r === "(" ? (s++, n += r) : r === ")" ? (s--, n += r) : r === " " && s === 0 ? n && (t.push(n), n = "") : n += r;
|
|
16
|
+
}
|
|
17
|
+
for (n && t.push(n); t.length < 4; )
|
|
18
|
+
t.push("0");
|
|
19
|
+
return [
|
|
20
|
+
t[0] || "0",
|
|
21
|
+
t[1] || "0",
|
|
22
|
+
t[2] || "0",
|
|
23
|
+
t[3] || "0"
|
|
24
|
+
];
|
|
25
|
+
}, hi = ({
|
|
26
|
+
currentValueOfCssVar: e = "0 0 0 0",
|
|
27
|
+
value: t,
|
|
28
|
+
direction: n
|
|
29
|
+
}) => {
|
|
30
|
+
const [s, i, r, o] = di(e), a = {
|
|
31
|
+
top: s,
|
|
32
|
+
right: i,
|
|
33
|
+
bottom: r,
|
|
34
|
+
left: o
|
|
35
|
+
};
|
|
36
|
+
return n === "top" && (a.top = t), n === "right" && (a.right = t), n === "bottom" && (a.bottom = t), n === "left" && (a.left = t), n === "all" && (a.top = t, a.right = t, a.bottom = t, a.left = t), n === "x" && (a.left = t, a.right = t), n === "y" && (a.top = t, a.bottom = t), n === "side-top" && (a.top = t, a.right = t), n === "side-bottom" && (a.bottom = t, a.left = t), n === "side-left" && (a.top = t, a.left = t), n === "side-right" && (a.right = t, a.bottom = t), Object.values(a).join(" ");
|
|
37
|
+
}, pi = ({
|
|
38
|
+
currentValueOfCssVar: e = "visible visible",
|
|
39
|
+
value: t,
|
|
40
|
+
axis: n
|
|
41
|
+
}) => {
|
|
42
|
+
const [s, i] = e.split(" ");
|
|
43
|
+
return n === "x" ? `${t} ${i}` : n === "y" ? `${s} ${t}` : `${t} ${t}`;
|
|
44
|
+
}, mi = (e) => {
|
|
45
|
+
const { cssVars: t } = e;
|
|
46
|
+
if (!(e != null && e.props) || Object.keys(e.props).length === 0)
|
|
47
|
+
return { styleProp: {}, otherProps: {}, interactive: !1 };
|
|
48
|
+
const { style: n = {}, ...s } = e.props;
|
|
49
|
+
let i = n;
|
|
50
|
+
const r = {};
|
|
51
|
+
let o = !1;
|
|
52
|
+
return Object.keys(s).forEach((a) => {
|
|
53
|
+
const c = a, l = c, u = t == null ? void 0 : t[l];
|
|
54
|
+
if (!u) {
|
|
55
|
+
Object.assign(r, { [c]: s[c] });
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const d = s == null ? void 0 : s[c];
|
|
59
|
+
if (!d) {
|
|
60
|
+
Object.assign(i, { [c]: s[c] });
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
let f;
|
|
64
|
+
if (typeof d == "string" && d.startsWith("-")) {
|
|
65
|
+
const p = d.slice(1);
|
|
66
|
+
f = `calc(-1 * ${u.value.replace(
|
|
67
|
+
"VARIABLE",
|
|
68
|
+
p
|
|
69
|
+
)})`;
|
|
70
|
+
} else
|
|
71
|
+
f = u.value.replace(
|
|
72
|
+
"VARIABLE",
|
|
73
|
+
d
|
|
74
|
+
);
|
|
75
|
+
const h = u.cssVar;
|
|
76
|
+
if (u.interactive && (o = !0), u.direction) {
|
|
77
|
+
const p = i == null ? void 0 : i[h], y = hi({
|
|
78
|
+
currentValueOfCssVar: p,
|
|
79
|
+
value: f,
|
|
80
|
+
direction: u.direction
|
|
81
|
+
});
|
|
82
|
+
i = {
|
|
83
|
+
...i,
|
|
84
|
+
[h]: y
|
|
85
|
+
};
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (u.axis) {
|
|
89
|
+
const p = i == null ? void 0 : i[h], y = pi({
|
|
90
|
+
currentValueOfCssVar: p,
|
|
91
|
+
value: f,
|
|
92
|
+
axis: u.axis
|
|
93
|
+
});
|
|
94
|
+
i = {
|
|
95
|
+
...i,
|
|
96
|
+
[h]: y
|
|
97
|
+
};
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
i = {
|
|
101
|
+
...i,
|
|
102
|
+
[h]: f
|
|
103
|
+
};
|
|
104
|
+
}), { styleProp: i, otherProps: r, interactive: o };
|
|
105
|
+
}, gi = (e) => G.useMemo(() => mi(e), [e]), yi = re({});
|
|
106
|
+
function bi(e) {
|
|
107
|
+
const t = W(null);
|
|
13
108
|
return t.current === null && (t.current = e()), t.current;
|
|
14
109
|
}
|
|
15
|
-
const xn = typeof window < "u",
|
|
16
|
-
function
|
|
110
|
+
const xn = typeof window < "u", vi = xn ? ni : pt, An = /* @__PURE__ */ re(null);
|
|
111
|
+
function wi(e, t) {
|
|
17
112
|
e.indexOf(t) === -1 && e.push(t);
|
|
18
113
|
}
|
|
19
|
-
function
|
|
114
|
+
function Ti(e, t) {
|
|
20
115
|
const n = e.indexOf(t);
|
|
21
116
|
n > -1 && e.splice(n, 1);
|
|
22
117
|
}
|
|
23
|
-
const
|
|
118
|
+
const H = (e, t, n) => n > t ? t : n < e ? e : n;
|
|
24
119
|
function Ue(e, t) {
|
|
25
120
|
return t ? `${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}` : e;
|
|
26
121
|
}
|
|
27
|
-
let
|
|
122
|
+
let ye = () => {
|
|
28
123
|
}, Z = () => {
|
|
29
124
|
};
|
|
30
|
-
var
|
|
31
|
-
typeof process < "u" && ((
|
|
125
|
+
var wn;
|
|
126
|
+
typeof process < "u" && ((wn = process.env) == null ? void 0 : wn.NODE_ENV) !== "production" && (ye = (e, t, n) => {
|
|
32
127
|
!e && typeof console < "u" && console.warn(Ue(t, n));
|
|
33
128
|
}, Z = (e, t, n) => {
|
|
34
129
|
if (!e)
|
|
35
130
|
throw new Error(Ue(t, n));
|
|
36
131
|
});
|
|
37
132
|
const $ = {}, Mn = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
|
|
38
|
-
function
|
|
133
|
+
function Vi(e) {
|
|
39
134
|
return typeof e == "object" && e !== null;
|
|
40
135
|
}
|
|
41
136
|
const Cn = (e) => /^0[^.\s]+$/u.test(e);
|
|
@@ -44,7 +139,7 @@ function Pn(e) {
|
|
|
44
139
|
let t;
|
|
45
140
|
return () => (t === void 0 && (t = e()), t);
|
|
46
141
|
}
|
|
47
|
-
const
|
|
142
|
+
const oe = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Si = (e, t) => (n) => t(e(n)), Ee = (...e) => e.reduce(Si), Fn = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
|
|
48
143
|
const s = t - e;
|
|
49
144
|
return s === 0 ? 1 : (n - e) / s;
|
|
50
145
|
};
|
|
@@ -53,7 +148,7 @@ class Rn {
|
|
|
53
148
|
this.subscriptions = [];
|
|
54
149
|
}
|
|
55
150
|
add(t) {
|
|
56
|
-
return
|
|
151
|
+
return wi(this.subscriptions, t), () => Ti(this.subscriptions, t);
|
|
57
152
|
}
|
|
58
153
|
notify(t, n, s) {
|
|
59
154
|
const i = this.subscriptions.length;
|
|
@@ -78,44 +173,44 @@ function Dn(e, t) {
|
|
|
78
173
|
return t ? e * (1e3 / t) : 0;
|
|
79
174
|
}
|
|
80
175
|
const Kt = /* @__PURE__ */ new Set();
|
|
81
|
-
function
|
|
176
|
+
function In(e, t, n) {
|
|
82
177
|
e || Kt.has(t) || (console.warn(Ue(t, n)), Kt.add(t));
|
|
83
178
|
}
|
|
84
|
-
const
|
|
85
|
-
function
|
|
179
|
+
const kn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, xi = 1e-7, Ai = 12;
|
|
180
|
+
function Mi(e, t, n, s, i) {
|
|
86
181
|
let r, o, a = 0;
|
|
87
182
|
do
|
|
88
|
-
o = t + (n - t) / 2, r =
|
|
89
|
-
while (Math.abs(r) >
|
|
183
|
+
o = t + (n - t) / 2, r = kn(o, s, i) - e, r > 0 ? n = o : t = o;
|
|
184
|
+
while (Math.abs(r) > xi && ++a < Ai);
|
|
90
185
|
return o;
|
|
91
186
|
}
|
|
92
|
-
function
|
|
187
|
+
function be(e, t, n, s) {
|
|
93
188
|
if (e === t && n === s)
|
|
94
|
-
return
|
|
95
|
-
const i = (r) =>
|
|
96
|
-
return (r) => r === 0 || r === 1 ? r :
|
|
189
|
+
return oe;
|
|
190
|
+
const i = (r) => Mi(r, 0, 1, e, n);
|
|
191
|
+
return (r) => r === 0 || r === 1 ? r : kn(i(r), t, s);
|
|
97
192
|
}
|
|
98
|
-
const On = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, En = (e) => (t) => 1 - e(1 - t), Bn = /* @__PURE__ */
|
|
99
|
-
linear:
|
|
100
|
-
easeIn:
|
|
193
|
+
const On = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, En = (e) => (t) => 1 - e(1 - t), Bn = /* @__PURE__ */ be(0.33, 1.53, 0.69, 0.99), mt = /* @__PURE__ */ En(Bn), Ln = /* @__PURE__ */ On(mt), Nn = (e) => (e *= 2) < 1 ? 0.5 * mt(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), gt = (e) => 1 - Math.sin(Math.acos(e)), Ci = En(gt), Kn = On(gt), Pi = /* @__PURE__ */ be(0.42, 0, 1, 1), Fi = /* @__PURE__ */ be(0, 0, 0.58, 1), $n = /* @__PURE__ */ be(0.42, 0, 0.58, 1), Ri = (e) => Array.isArray(e) && typeof e[0] != "number", jn = (e) => Array.isArray(e) && typeof e[0] == "number", $t = {
|
|
194
|
+
linear: oe,
|
|
195
|
+
easeIn: Pi,
|
|
101
196
|
easeInOut: $n,
|
|
102
|
-
easeOut:
|
|
197
|
+
easeOut: Fi,
|
|
103
198
|
circIn: gt,
|
|
104
199
|
circInOut: Kn,
|
|
105
|
-
circOut:
|
|
200
|
+
circOut: Ci,
|
|
106
201
|
backIn: mt,
|
|
107
202
|
backInOut: Ln,
|
|
108
203
|
backOut: Bn,
|
|
109
204
|
anticipate: Nn
|
|
110
|
-
},
|
|
111
|
-
if (
|
|
205
|
+
}, Di = (e) => typeof e == "string", jt = (e) => {
|
|
206
|
+
if (jn(e)) {
|
|
112
207
|
Z(e.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
113
208
|
const [t, n, s, i] = e;
|
|
114
|
-
return
|
|
115
|
-
} else if (
|
|
209
|
+
return be(t, n, s, i);
|
|
210
|
+
} else if (Di(e))
|
|
116
211
|
return Z($t[e] !== void 0, `Invalid easing type '${e}'`, "invalid-easing-type"), $t[e];
|
|
117
212
|
return e;
|
|
118
|
-
},
|
|
213
|
+
}, Ve = [
|
|
119
214
|
"setup",
|
|
120
215
|
// Compute
|
|
121
216
|
"read",
|
|
@@ -133,7 +228,7 @@ const On = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, En
|
|
|
133
228
|
"postRender"
|
|
134
229
|
// Compute
|
|
135
230
|
];
|
|
136
|
-
function
|
|
231
|
+
function Ii(e, t) {
|
|
137
232
|
let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, r = !1;
|
|
138
233
|
const o = /* @__PURE__ */ new WeakSet();
|
|
139
234
|
let a = {
|
|
@@ -171,56 +266,56 @@ function Mi(e, t) {
|
|
|
171
266
|
};
|
|
172
267
|
return l;
|
|
173
268
|
}
|
|
174
|
-
const
|
|
175
|
-
function
|
|
269
|
+
const ki = 40;
|
|
270
|
+
function Wn(e, t) {
|
|
176
271
|
let n = !1, s = !0;
|
|
177
272
|
const i = {
|
|
178
273
|
delta: 0,
|
|
179
274
|
timestamp: 0,
|
|
180
275
|
isProcessing: !1
|
|
181
|
-
}, r = () => n = !0, o =
|
|
182
|
-
const
|
|
183
|
-
n = !1, $.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(
|
|
184
|
-
},
|
|
185
|
-
n = !0, s = !0, i.isProcessing || e(
|
|
276
|
+
}, r = () => n = !0, o = Ve.reduce((v, S) => (v[S] = Ii(r), v), {}), { setup: a, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: h, postRender: p } = o, y = () => {
|
|
277
|
+
const v = $.useManualTiming ? i.timestamp : performance.now();
|
|
278
|
+
n = !1, $.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(v - i.timestamp, ki), 1)), i.timestamp = v, i.isProcessing = !0, a.process(i), c.process(i), l.process(i), u.process(i), d.process(i), f.process(i), h.process(i), p.process(i), i.isProcessing = !1, n && t && (s = !1, e(y));
|
|
279
|
+
}, b = () => {
|
|
280
|
+
n = !0, s = !0, i.isProcessing || e(y);
|
|
186
281
|
};
|
|
187
|
-
return { schedule:
|
|
188
|
-
const
|
|
189
|
-
return
|
|
190
|
-
}, {}), cancel: (
|
|
191
|
-
for (let
|
|
192
|
-
o[
|
|
282
|
+
return { schedule: Ve.reduce((v, S) => {
|
|
283
|
+
const w = o[S];
|
|
284
|
+
return v[S] = (x, C = !1, V = !1) => (n || b(), w.schedule(x, C, V)), v;
|
|
285
|
+
}, {}), cancel: (v) => {
|
|
286
|
+
for (let S = 0; S < Ve.length; S++)
|
|
287
|
+
o[Ve[S]].cancel(v);
|
|
193
288
|
}, state: i, steps: o };
|
|
194
289
|
}
|
|
195
|
-
const { schedule: N, cancel: Ye, state: Ce } = /* @__PURE__ */
|
|
290
|
+
const { schedule: N, cancel: Ye, state: Ce } = /* @__PURE__ */ Wn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : oe, !0);
|
|
196
291
|
let Ae;
|
|
197
|
-
function
|
|
292
|
+
function Oi() {
|
|
198
293
|
Ae = void 0;
|
|
199
294
|
}
|
|
200
|
-
const
|
|
201
|
-
now: () => (Ae === void 0 &&
|
|
295
|
+
const I = {
|
|
296
|
+
now: () => (Ae === void 0 && I.set(Ce.isProcessing || $.useManualTiming ? Ce.timestamp : performance.now()), Ae),
|
|
202
297
|
set: (e) => {
|
|
203
|
-
Ae = e, queueMicrotask(
|
|
298
|
+
Ae = e, queueMicrotask(Oi);
|
|
204
299
|
}
|
|
205
|
-
}, _n = (e) => (t) => typeof t == "string" && t.startsWith(e), Gn = /* @__PURE__ */ _n("--"),
|
|
206
|
-
function
|
|
300
|
+
}, _n = (e) => (t) => typeof t == "string" && t.startsWith(e), Gn = /* @__PURE__ */ _n("--"), Ei = /* @__PURE__ */ _n("var(--"), yt = (e) => Ei(e) ? Bi.test(e.split("/*")[0].trim()) : !1, Bi = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
301
|
+
function Wt(e) {
|
|
207
302
|
return typeof e != "string" ? !1 : e.split("/*")[0].includes("var(--");
|
|
208
303
|
}
|
|
209
|
-
const
|
|
304
|
+
const ae = {
|
|
210
305
|
test: (e) => typeof e == "number",
|
|
211
306
|
parse: parseFloat,
|
|
212
307
|
transform: (e) => e
|
|
213
|
-
},
|
|
214
|
-
...
|
|
215
|
-
transform: (e) =>
|
|
216
|
-
},
|
|
217
|
-
...
|
|
308
|
+
}, pe = {
|
|
309
|
+
...ae,
|
|
310
|
+
transform: (e) => H(0, 1, e)
|
|
311
|
+
}, Se = {
|
|
312
|
+
...ae,
|
|
218
313
|
default: 1
|
|
219
|
-
},
|
|
220
|
-
function
|
|
314
|
+
}, he = (e) => Math.round(e * 1e5) / 1e5, bt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
315
|
+
function Li(e) {
|
|
221
316
|
return e == null;
|
|
222
317
|
}
|
|
223
|
-
const
|
|
318
|
+
const Ni = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, vt = (e, t) => (n) => !!(typeof n == "string" && Ni.test(n) && n.startsWith(e) || t && !Li(n) && Object.prototype.hasOwnProperty.call(n, t)), Hn = (e, t, n) => (s) => {
|
|
224
319
|
if (typeof s != "string")
|
|
225
320
|
return s;
|
|
226
321
|
const [i, r, o, a] = s.match(bt);
|
|
@@ -230,15 +325,15 @@ const ki = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
230
325
|
[n]: parseFloat(o),
|
|
231
326
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
232
327
|
};
|
|
233
|
-
},
|
|
234
|
-
...
|
|
235
|
-
transform: (e) => Math.round(
|
|
236
|
-
},
|
|
237
|
-
test: /* @__PURE__ */
|
|
328
|
+
}, Ki = (e) => H(0, 255, e), Ke = {
|
|
329
|
+
...ae,
|
|
330
|
+
transform: (e) => Math.round(Ki(e))
|
|
331
|
+
}, Y = {
|
|
332
|
+
test: /* @__PURE__ */ vt("rgb", "red"),
|
|
238
333
|
parse: /* @__PURE__ */ Hn("red", "green", "blue"),
|
|
239
|
-
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Ke.transform(e) + ", " + Ke.transform(t) + ", " + Ke.transform(n) + ", " +
|
|
334
|
+
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Ke.transform(e) + ", " + Ke.transform(t) + ", " + Ke.transform(n) + ", " + he(pe.transform(s)) + ")"
|
|
240
335
|
};
|
|
241
|
-
function
|
|
336
|
+
function $i(e) {
|
|
242
337
|
let t = "", n = "", s = "", i = "";
|
|
243
338
|
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, s += s, i += i), {
|
|
244
339
|
red: parseInt(t, 16),
|
|
@@ -248,75 +343,75 @@ function Oi(e) {
|
|
|
248
343
|
};
|
|
249
344
|
}
|
|
250
345
|
const Xe = {
|
|
251
|
-
test: /* @__PURE__ */
|
|
252
|
-
parse:
|
|
253
|
-
transform:
|
|
254
|
-
},
|
|
346
|
+
test: /* @__PURE__ */ vt("#"),
|
|
347
|
+
parse: $i,
|
|
348
|
+
transform: Y.transform
|
|
349
|
+
}, ve = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
255
350
|
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
|
|
256
351
|
parse: parseFloat,
|
|
257
352
|
transform: (t) => `${t}${e}`
|
|
258
|
-
}),
|
|
353
|
+
}), j = /* @__PURE__ */ ve("deg"), ne = /* @__PURE__ */ ve("%"), m = /* @__PURE__ */ ve("px"), ji = /* @__PURE__ */ ve("vh"), Wi = /* @__PURE__ */ ve("vw"), _t = {
|
|
259
354
|
...ne,
|
|
260
355
|
parse: (e) => ne.parse(e) / 100,
|
|
261
356
|
transform: (e) => ne.transform(e * 100)
|
|
262
357
|
}, ee = {
|
|
263
|
-
test: /* @__PURE__ */
|
|
358
|
+
test: /* @__PURE__ */ vt("hsl", "hue"),
|
|
264
359
|
parse: /* @__PURE__ */ Hn("hue", "saturation", "lightness"),
|
|
265
|
-
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + ne.transform(
|
|
360
|
+
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + ne.transform(he(t)) + ", " + ne.transform(he(n)) + ", " + he(pe.transform(s)) + ")"
|
|
266
361
|
}, M = {
|
|
267
|
-
test: (e) =>
|
|
268
|
-
parse: (e) =>
|
|
269
|
-
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ?
|
|
362
|
+
test: (e) => Y.test(e) || Xe.test(e) || ee.test(e),
|
|
363
|
+
parse: (e) => Y.test(e) ? Y.parse(e) : ee.test(e) ? ee.parse(e) : Xe.parse(e),
|
|
364
|
+
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Y.transform(e) : ee.transform(e),
|
|
270
365
|
getAnimatableNone: (e) => {
|
|
271
366
|
const t = M.parse(e);
|
|
272
367
|
return t.alpha = 0, M.transform(t);
|
|
273
368
|
}
|
|
274
|
-
},
|
|
275
|
-
function
|
|
369
|
+
}, _i = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
370
|
+
function Gi(e) {
|
|
276
371
|
var t, n;
|
|
277
|
-
return isNaN(e) && typeof e == "string" && (((t = e.match(bt)) == null ? void 0 : t.length) || 0) + (((n = e.match(
|
|
372
|
+
return isNaN(e) && typeof e == "string" && (((t = e.match(bt)) == null ? void 0 : t.length) || 0) + (((n = e.match(_i)) == null ? void 0 : n.length) || 0) > 0;
|
|
278
373
|
}
|
|
279
|
-
const zn = "number", Un = "color",
|
|
280
|
-
function
|
|
374
|
+
const zn = "number", Un = "color", Hi = "var", zi = "var(", Gt = "${}", Ui = /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;
|
|
375
|
+
function me(e) {
|
|
281
376
|
const t = e.toString(), n = [], s = {
|
|
282
377
|
color: [],
|
|
283
378
|
number: [],
|
|
284
379
|
var: []
|
|
285
380
|
}, i = [];
|
|
286
381
|
let r = 0;
|
|
287
|
-
const a = t.replace(
|
|
382
|
+
const a = t.replace(Ui, (c) => (M.test(c) ? (s.color.push(r), i.push(Un), n.push(M.parse(c))) : c.startsWith(zi) ? (s.var.push(r), i.push(Hi), n.push(c)) : (s.number.push(r), i.push(zn), n.push(parseFloat(c))), ++r, Gt)).split(Gt);
|
|
288
383
|
return { values: n, split: a, indexes: s, types: i };
|
|
289
384
|
}
|
|
290
385
|
function Yn(e) {
|
|
291
|
-
return
|
|
386
|
+
return me(e).values;
|
|
292
387
|
}
|
|
293
388
|
function Xn(e) {
|
|
294
|
-
const { split: t, types: n } =
|
|
389
|
+
const { split: t, types: n } = me(e), s = t.length;
|
|
295
390
|
return (i) => {
|
|
296
391
|
let r = "";
|
|
297
392
|
for (let o = 0; o < s; o++)
|
|
298
393
|
if (r += t[o], i[o] !== void 0) {
|
|
299
394
|
const a = n[o];
|
|
300
|
-
a === zn ? r +=
|
|
395
|
+
a === zn ? r += he(i[o]) : a === Un ? r += M.transform(i[o]) : r += i[o];
|
|
301
396
|
}
|
|
302
397
|
return r;
|
|
303
398
|
};
|
|
304
399
|
}
|
|
305
|
-
const
|
|
306
|
-
function
|
|
400
|
+
const Yi = (e) => typeof e == "number" ? 0 : M.test(e) ? M.getAnimatableNone(e) : e;
|
|
401
|
+
function Xi(e) {
|
|
307
402
|
const t = Yn(e);
|
|
308
|
-
return Xn(e)(t.map(
|
|
403
|
+
return Xn(e)(t.map(Yi));
|
|
309
404
|
}
|
|
310
405
|
const L = {
|
|
311
|
-
test:
|
|
406
|
+
test: Gi,
|
|
312
407
|
parse: Yn,
|
|
313
408
|
createTransformer: Xn,
|
|
314
|
-
getAnimatableNone:
|
|
409
|
+
getAnimatableNone: Xi
|
|
315
410
|
};
|
|
316
411
|
function $e(e, t, n) {
|
|
317
412
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
318
413
|
}
|
|
319
|
-
function
|
|
414
|
+
function qi({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
320
415
|
e /= 360, t /= 100, n /= 100;
|
|
321
416
|
let i = 0, r = 0, o = 0;
|
|
322
417
|
if (!t)
|
|
@@ -335,52 +430,52 @@ function Gi({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
|
335
430
|
function Pe(e, t) {
|
|
336
431
|
return (n) => n > 0 ? t : e;
|
|
337
432
|
}
|
|
338
|
-
const we = (e, t, n) => e + (t - e) * n,
|
|
433
|
+
const we = (e, t, n) => e + (t - e) * n, je = (e, t, n) => {
|
|
339
434
|
const s = e * e, i = n * (t * t - s) + s;
|
|
340
435
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
341
|
-
},
|
|
436
|
+
}, Zi = [Xe, Y, ee], Ji = (e) => Zi.find((t) => t.test(e));
|
|
342
437
|
function Ht(e) {
|
|
343
|
-
const t =
|
|
344
|
-
if (
|
|
438
|
+
const t = Ji(e);
|
|
439
|
+
if (ye(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !t)
|
|
345
440
|
return !1;
|
|
346
441
|
let n = t.parse(e);
|
|
347
|
-
return t === ee && (n =
|
|
442
|
+
return t === ee && (n = qi(n)), n;
|
|
348
443
|
}
|
|
349
444
|
const zt = (e, t) => {
|
|
350
445
|
const n = Ht(e), s = Ht(t);
|
|
351
446
|
if (!n || !s)
|
|
352
447
|
return Pe(e, t);
|
|
353
448
|
const i = { ...n };
|
|
354
|
-
return (r) => (i.red =
|
|
449
|
+
return (r) => (i.red = je(n.red, s.red, r), i.green = je(n.green, s.green, r), i.blue = je(n.blue, s.blue, r), i.alpha = we(n.alpha, s.alpha, r), Y.transform(i));
|
|
355
450
|
}, qe = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
356
|
-
function
|
|
451
|
+
function Qi(e, t) {
|
|
357
452
|
return qe.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
358
453
|
}
|
|
359
|
-
function
|
|
454
|
+
function er(e, t) {
|
|
360
455
|
return (n) => we(e, t, n);
|
|
361
456
|
}
|
|
362
|
-
function
|
|
363
|
-
return typeof e == "number" ?
|
|
457
|
+
function wt(e) {
|
|
458
|
+
return typeof e == "number" ? er : typeof e == "string" ? yt(e) ? Pe : M.test(e) ? zt : sr : Array.isArray(e) ? qn : typeof e == "object" ? M.test(e) ? zt : tr : Pe;
|
|
364
459
|
}
|
|
365
460
|
function qn(e, t) {
|
|
366
|
-
const n = [...e], s = n.length, i = e.map((r, o) =>
|
|
461
|
+
const n = [...e], s = n.length, i = e.map((r, o) => wt(r)(r, t[o]));
|
|
367
462
|
return (r) => {
|
|
368
463
|
for (let o = 0; o < s; o++)
|
|
369
464
|
n[o] = i[o](r);
|
|
370
465
|
return n;
|
|
371
466
|
};
|
|
372
467
|
}
|
|
373
|
-
function
|
|
468
|
+
function tr(e, t) {
|
|
374
469
|
const n = { ...e, ...t }, s = {};
|
|
375
470
|
for (const i in n)
|
|
376
|
-
e[i] !== void 0 && t[i] !== void 0 && (s[i] =
|
|
471
|
+
e[i] !== void 0 && t[i] !== void 0 && (s[i] = wt(e[i])(e[i], t[i]));
|
|
377
472
|
return (i) => {
|
|
378
473
|
for (const r in s)
|
|
379
474
|
n[r] = s[r](i);
|
|
380
475
|
return n;
|
|
381
476
|
};
|
|
382
477
|
}
|
|
383
|
-
function
|
|
478
|
+
function nr(e, t) {
|
|
384
479
|
const n = [], s = { color: 0, var: 0, number: 0 };
|
|
385
480
|
for (let i = 0; i < t.values.length; i++) {
|
|
386
481
|
const r = t.types[i], o = e.indexes[r][s[r]], a = e.values[o] ?? 0;
|
|
@@ -388,14 +483,14 @@ function qi(e, t) {
|
|
|
388
483
|
}
|
|
389
484
|
return n;
|
|
390
485
|
}
|
|
391
|
-
const
|
|
392
|
-
const n = L.createTransformer(t), s =
|
|
393
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? qe.has(e) && !i.values.length || qe.has(t) && !s.values.length ?
|
|
486
|
+
const sr = (e, t) => {
|
|
487
|
+
const n = L.createTransformer(t), s = me(e), i = me(t);
|
|
488
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? qe.has(e) && !i.values.length || qe.has(t) && !s.values.length ? Qi(e, t) : Ee(qn(nr(s, i), i.values), n) : (ye(!0, `Complex values '${e}' and '${t}' 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"), Pe(e, t));
|
|
394
489
|
};
|
|
395
490
|
function Zn(e, t, n) {
|
|
396
|
-
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? we(e, t, n) :
|
|
491
|
+
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? we(e, t, n) : wt(e)(e, t);
|
|
397
492
|
}
|
|
398
|
-
const
|
|
493
|
+
const ir = (e) => {
|
|
399
494
|
const t = ({ timestamp: n }) => e(n);
|
|
400
495
|
return {
|
|
401
496
|
start: (n = !0) => N.update(t, n),
|
|
@@ -404,7 +499,7 @@ const Ji = (e) => {
|
|
|
404
499
|
* If we're processing this frame we can use the
|
|
405
500
|
* framelocked timestamp to keep things in sync.
|
|
406
501
|
*/
|
|
407
|
-
now: () => Ce.isProcessing ? Ce.timestamp :
|
|
502
|
+
now: () => Ce.isProcessing ? Ce.timestamp : I.now()
|
|
408
503
|
};
|
|
409
504
|
}, Jn = (e, t, n = 10) => {
|
|
410
505
|
let s = "";
|
|
@@ -413,7 +508,7 @@ const Ji = (e) => {
|
|
|
413
508
|
s += Math.round(e(r / (i - 1)) * 1e4) / 1e4 + ", ";
|
|
414
509
|
return `linear(${s.substring(0, s.length - 2)})`;
|
|
415
510
|
}, Fe = 2e4;
|
|
416
|
-
function
|
|
511
|
+
function Tt(e) {
|
|
417
512
|
let t = 0;
|
|
418
513
|
const n = 50;
|
|
419
514
|
let s = e.next(t);
|
|
@@ -421,17 +516,17 @@ function vt(e) {
|
|
|
421
516
|
t += n, s = e.next(t);
|
|
422
517
|
return t >= Fe ? 1 / 0 : t;
|
|
423
518
|
}
|
|
424
|
-
function
|
|
425
|
-
const s = n({ ...e, keyframes: [0, t] }), i = Math.min(
|
|
519
|
+
function rr(e, t = 100, n) {
|
|
520
|
+
const s = n({ ...e, keyframes: [0, t] }), i = Math.min(Tt(s), Fe);
|
|
426
521
|
return {
|
|
427
522
|
type: "keyframes",
|
|
428
523
|
ease: (r) => s.next(i * r).value / t,
|
|
429
524
|
duration: /* @__PURE__ */ B(i)
|
|
430
525
|
};
|
|
431
526
|
}
|
|
432
|
-
const
|
|
527
|
+
const or = 5;
|
|
433
528
|
function Qn(e, t, n) {
|
|
434
|
-
const s = Math.max(t -
|
|
529
|
+
const s = Math.max(t - or, 0);
|
|
435
530
|
return Dn(n - e(s), t - s);
|
|
436
531
|
}
|
|
437
532
|
const A = {
|
|
@@ -462,25 +557,25 @@ const A = {
|
|
|
462
557
|
// in seconds
|
|
463
558
|
minDamping: 0.05,
|
|
464
559
|
maxDamping: 1
|
|
465
|
-
},
|
|
466
|
-
function
|
|
560
|
+
}, We = 1e-3;
|
|
561
|
+
function ar({ duration: e = A.duration, bounce: t = A.bounce, velocity: n = A.velocity, mass: s = A.mass }) {
|
|
467
562
|
let i, r;
|
|
468
|
-
|
|
563
|
+
ye(e <= /* @__PURE__ */ K(A.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
469
564
|
let o = 1 - t;
|
|
470
|
-
o =
|
|
565
|
+
o = H(A.minDamping, A.maxDamping, o), e = H(A.minDuration, A.maxDuration, /* @__PURE__ */ B(e)), o < 1 ? (i = (l) => {
|
|
471
566
|
const u = l * o, d = u * e, f = u - n, h = Ze(l, o), p = Math.exp(-d);
|
|
472
|
-
return
|
|
567
|
+
return We - f / h * p;
|
|
473
568
|
}, r = (l) => {
|
|
474
|
-
const d = l * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(l, 2) * e, p = Math.exp(-d),
|
|
475
|
-
return (-i(l) +
|
|
569
|
+
const d = l * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(l, 2) * e, p = Math.exp(-d), y = Ze(Math.pow(l, 2), o);
|
|
570
|
+
return (-i(l) + We > 0 ? -1 : 1) * ((f - h) * p) / y;
|
|
476
571
|
}) : (i = (l) => {
|
|
477
572
|
const u = Math.exp(-l * e), d = (l - n) * e + 1;
|
|
478
|
-
return -
|
|
573
|
+
return -We + u * d;
|
|
479
574
|
}, r = (l) => {
|
|
480
575
|
const u = Math.exp(-l * e), d = (n - l) * (e * e);
|
|
481
576
|
return u * d;
|
|
482
577
|
});
|
|
483
|
-
const a = 5 / e, c =
|
|
578
|
+
const a = 5 / e, c = cr(i, r, a);
|
|
484
579
|
if (e = /* @__PURE__ */ K(e), isNaN(c))
|
|
485
580
|
return {
|
|
486
581
|
stiffness: A.stiffness,
|
|
@@ -496,21 +591,21 @@ function tr({ duration: e = A.duration, bounce: t = A.bounce, velocity: n = A.ve
|
|
|
496
591
|
};
|
|
497
592
|
}
|
|
498
593
|
}
|
|
499
|
-
const
|
|
500
|
-
function
|
|
594
|
+
const ur = 12;
|
|
595
|
+
function cr(e, t, n) {
|
|
501
596
|
let s = n;
|
|
502
|
-
for (let i = 1; i <
|
|
597
|
+
for (let i = 1; i < ur; i++)
|
|
503
598
|
s = s - e(s) / t(s);
|
|
504
599
|
return s;
|
|
505
600
|
}
|
|
506
601
|
function Ze(e, t) {
|
|
507
602
|
return e * Math.sqrt(1 - t * t);
|
|
508
603
|
}
|
|
509
|
-
const
|
|
604
|
+
const lr = ["duration", "bounce"], fr = ["stiffness", "damping", "mass"];
|
|
510
605
|
function Ut(e, t) {
|
|
511
606
|
return t.some((n) => e[n] !== void 0);
|
|
512
607
|
}
|
|
513
|
-
function
|
|
608
|
+
function dr(e) {
|
|
514
609
|
let t = {
|
|
515
610
|
velocity: A.velocity,
|
|
516
611
|
stiffness: A.stiffness,
|
|
@@ -519,9 +614,9 @@ function or(e) {
|
|
|
519
614
|
isResolvedFromDuration: !1,
|
|
520
615
|
...e
|
|
521
616
|
};
|
|
522
|
-
if (!Ut(e,
|
|
617
|
+
if (!Ut(e, fr) && Ut(e, lr))
|
|
523
618
|
if (t.velocity = 0, e.visualDuration) {
|
|
524
|
-
const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 *
|
|
619
|
+
const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * H(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
|
|
525
620
|
t = {
|
|
526
621
|
...t,
|
|
527
622
|
mass: A.mass,
|
|
@@ -529,7 +624,7 @@ function or(e) {
|
|
|
529
624
|
damping: r
|
|
530
625
|
};
|
|
531
626
|
} else {
|
|
532
|
-
const n =
|
|
627
|
+
const n = ar({ ...e, velocity: 0 });
|
|
533
628
|
t = {
|
|
534
629
|
...t,
|
|
535
630
|
...n,
|
|
@@ -545,71 +640,71 @@ function Re(e = A.visualDuration, t = A.bounce) {
|
|
|
545
640
|
bounce: t
|
|
546
641
|
} : e;
|
|
547
642
|
let { restSpeed: s, restDelta: i } = n;
|
|
548
|
-
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: c, damping: l, mass: u, duration: d, velocity: f, isResolvedFromDuration: h } =
|
|
643
|
+
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: c, damping: l, mass: u, duration: d, velocity: f, isResolvedFromDuration: h } = dr({
|
|
549
644
|
...n,
|
|
550
645
|
velocity: -/* @__PURE__ */ B(n.velocity || 0)
|
|
551
|
-
}), p = f || 0,
|
|
552
|
-
s || (s =
|
|
553
|
-
let
|
|
554
|
-
if (
|
|
555
|
-
const
|
|
556
|
-
|
|
557
|
-
const C = Math.exp(-
|
|
558
|
-
return o - C * ((p +
|
|
646
|
+
}), p = f || 0, y = l / (2 * Math.sqrt(c * u)), b = o - r, g = /* @__PURE__ */ B(Math.sqrt(c / u)), T = Math.abs(b) < 5;
|
|
647
|
+
s || (s = T ? A.restSpeed.granular : A.restSpeed.default), i || (i = T ? A.restDelta.granular : A.restDelta.default);
|
|
648
|
+
let v;
|
|
649
|
+
if (y < 1) {
|
|
650
|
+
const w = Ze(g, y);
|
|
651
|
+
v = (x) => {
|
|
652
|
+
const C = Math.exp(-y * g * x);
|
|
653
|
+
return o - C * ((p + y * g * b) / w * Math.sin(w * x) + b * Math.cos(w * x));
|
|
559
654
|
};
|
|
560
|
-
} else if (
|
|
561
|
-
|
|
655
|
+
} else if (y === 1)
|
|
656
|
+
v = (w) => o - Math.exp(-g * w) * (b + (p + g * b) * w);
|
|
562
657
|
else {
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
const C = Math.exp(-
|
|
566
|
-
return o - C * ((p +
|
|
658
|
+
const w = g * Math.sqrt(y * y - 1);
|
|
659
|
+
v = (x) => {
|
|
660
|
+
const C = Math.exp(-y * g * x), V = Math.min(w * x, 300);
|
|
661
|
+
return o - C * ((p + y * g * b) * Math.sinh(V) + w * b * Math.cosh(V)) / w;
|
|
567
662
|
};
|
|
568
663
|
}
|
|
569
|
-
const
|
|
664
|
+
const S = {
|
|
570
665
|
calculatedDuration: h && d || null,
|
|
571
|
-
next: (
|
|
572
|
-
const x = w
|
|
666
|
+
next: (w) => {
|
|
667
|
+
const x = v(w);
|
|
573
668
|
if (h)
|
|
574
|
-
a.done =
|
|
669
|
+
a.done = w >= d;
|
|
575
670
|
else {
|
|
576
|
-
let C =
|
|
577
|
-
|
|
578
|
-
const
|
|
579
|
-
a.done =
|
|
671
|
+
let C = w === 0 ? p : 0;
|
|
672
|
+
y < 1 && (C = w === 0 ? /* @__PURE__ */ K(p) : Qn(v, w, x));
|
|
673
|
+
const V = Math.abs(C) <= s, D = Math.abs(o - x) <= i;
|
|
674
|
+
a.done = V && D;
|
|
580
675
|
}
|
|
581
676
|
return a.value = a.done ? o : x, a;
|
|
582
677
|
},
|
|
583
678
|
toString: () => {
|
|
584
|
-
const
|
|
585
|
-
return
|
|
679
|
+
const w = Math.min(Tt(S), Fe), x = Jn((C) => S.next(w * C).value, w, 30);
|
|
680
|
+
return w + "ms " + x;
|
|
586
681
|
},
|
|
587
682
|
toTransition: () => {
|
|
588
683
|
}
|
|
589
684
|
};
|
|
590
|
-
return
|
|
685
|
+
return S;
|
|
591
686
|
}
|
|
592
687
|
Re.applyToOptions = (e) => {
|
|
593
|
-
const t =
|
|
688
|
+
const t = rr(e, 100, Re);
|
|
594
689
|
return e.ease = t.ease, e.duration = /* @__PURE__ */ K(t.duration), e.type = "keyframes", e;
|
|
595
690
|
};
|
|
596
691
|
function Je({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: c, restDelta: l = 0.5, restSpeed: u }) {
|
|
597
692
|
const d = e[0], f = {
|
|
598
693
|
done: !1,
|
|
599
694
|
value: d
|
|
600
|
-
}, h = (
|
|
601
|
-
let
|
|
602
|
-
const
|
|
603
|
-
g !==
|
|
604
|
-
const
|
|
605
|
-
const D =
|
|
606
|
-
f.done = Math.abs(D) <= l, f.value = f.done ? g :
|
|
695
|
+
}, h = (V) => a !== void 0 && V < a || c !== void 0 && V > c, p = (V) => a === void 0 ? c : c === void 0 || Math.abs(a - V) < Math.abs(c - V) ? a : c;
|
|
696
|
+
let y = n * t;
|
|
697
|
+
const b = d + y, g = o === void 0 ? b : o(b);
|
|
698
|
+
g !== b && (y = g - d);
|
|
699
|
+
const T = (V) => -y * Math.exp(-V / s), v = (V) => g + T(V), S = (V) => {
|
|
700
|
+
const D = T(V), k = v(V);
|
|
701
|
+
f.done = Math.abs(D) <= l, f.value = f.done ? g : k;
|
|
607
702
|
};
|
|
608
|
-
let
|
|
609
|
-
const C = (
|
|
610
|
-
h(f.value) && (
|
|
703
|
+
let w, x;
|
|
704
|
+
const C = (V) => {
|
|
705
|
+
h(f.value) && (w = V, x = Re({
|
|
611
706
|
keyframes: [f.value, p(f.value)],
|
|
612
|
-
velocity: Qn(
|
|
707
|
+
velocity: Qn(v, V, f.value),
|
|
613
708
|
// TODO: This should be passing * 1000
|
|
614
709
|
damping: i,
|
|
615
710
|
stiffness: r,
|
|
@@ -619,25 +714,25 @@ function Je({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
619
714
|
};
|
|
620
715
|
return C(0), {
|
|
621
716
|
calculatedDuration: null,
|
|
622
|
-
next: (
|
|
717
|
+
next: (V) => {
|
|
623
718
|
let D = !1;
|
|
624
|
-
return !x &&
|
|
719
|
+
return !x && w === void 0 && (D = !0, S(V), C(V)), w !== void 0 && V >= w ? x.next(V - w) : (!D && S(V), f);
|
|
625
720
|
}
|
|
626
721
|
};
|
|
627
722
|
}
|
|
628
|
-
function
|
|
723
|
+
function hr(e, t, n) {
|
|
629
724
|
const s = [], i = n || $.mix || Zn, r = e.length - 1;
|
|
630
725
|
for (let o = 0; o < r; o++) {
|
|
631
726
|
let a = i(e[o], e[o + 1]);
|
|
632
727
|
if (t) {
|
|
633
|
-
const c = Array.isArray(t) ? t[o] ||
|
|
728
|
+
const c = Array.isArray(t) ? t[o] || oe : t;
|
|
634
729
|
a = Ee(c, a);
|
|
635
730
|
}
|
|
636
731
|
s.push(a);
|
|
637
732
|
}
|
|
638
733
|
return s;
|
|
639
734
|
}
|
|
640
|
-
function
|
|
735
|
+
function pr(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
641
736
|
const r = e.length;
|
|
642
737
|
if (Z(r === t.length, "Both input and output ranges must be the same length", "range-length"), r === 1)
|
|
643
738
|
return () => t[0];
|
|
@@ -645,7 +740,7 @@ function ur(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
645
740
|
return () => t[1];
|
|
646
741
|
const o = e[0] === e[1];
|
|
647
742
|
e[0] > e[r - 1] && (e = [...e].reverse(), t = [...t].reverse());
|
|
648
|
-
const a =
|
|
743
|
+
const a = hr(t, s, i), c = a.length, l = (u) => {
|
|
649
744
|
if (o && u < e[0])
|
|
650
745
|
return t[0];
|
|
651
746
|
let d = 0;
|
|
@@ -655,48 +750,48 @@ function ur(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
655
750
|
const f = /* @__PURE__ */ Fn(e[d], e[d + 1], u);
|
|
656
751
|
return a[d](f);
|
|
657
752
|
};
|
|
658
|
-
return n ? (u) => l(
|
|
753
|
+
return n ? (u) => l(H(e[0], e[r - 1], u)) : l;
|
|
659
754
|
}
|
|
660
|
-
function
|
|
755
|
+
function mr(e, t) {
|
|
661
756
|
const n = e[e.length - 1];
|
|
662
757
|
for (let s = 1; s <= t; s++) {
|
|
663
758
|
const i = /* @__PURE__ */ Fn(0, t, s);
|
|
664
759
|
e.push(we(n, 1, i));
|
|
665
760
|
}
|
|
666
761
|
}
|
|
667
|
-
function
|
|
762
|
+
function gr(e) {
|
|
668
763
|
const t = [0];
|
|
669
|
-
return
|
|
764
|
+
return mr(t, e.length - 1), t;
|
|
670
765
|
}
|
|
671
|
-
function
|
|
766
|
+
function yr(e, t) {
|
|
672
767
|
return e.map((n) => n * t);
|
|
673
768
|
}
|
|
674
|
-
function
|
|
769
|
+
function br(e, t) {
|
|
675
770
|
return e.map(() => t || $n).splice(0, e.length - 1);
|
|
676
771
|
}
|
|
677
772
|
function te({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
|
|
678
|
-
const i =
|
|
773
|
+
const i = Ri(s) ? s.map(jt) : jt(s), r = {
|
|
679
774
|
done: !1,
|
|
680
775
|
value: t[0]
|
|
681
|
-
}, o =
|
|
776
|
+
}, o = yr(
|
|
682
777
|
// Only use the provided offsets if they're the correct length
|
|
683
778
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
684
|
-
n && n.length === t.length ? n :
|
|
779
|
+
n && n.length === t.length ? n : gr(t),
|
|
685
780
|
e
|
|
686
|
-
), a =
|
|
687
|
-
ease: Array.isArray(i) ? i :
|
|
781
|
+
), a = pr(o, t, {
|
|
782
|
+
ease: Array.isArray(i) ? i : br(t, i)
|
|
688
783
|
});
|
|
689
784
|
return {
|
|
690
785
|
calculatedDuration: e,
|
|
691
786
|
next: (c) => (r.value = a(c), r.done = c >= e, r)
|
|
692
787
|
};
|
|
693
788
|
}
|
|
694
|
-
const
|
|
695
|
-
function
|
|
696
|
-
const r = e.filter(
|
|
789
|
+
const vr = (e) => e !== null;
|
|
790
|
+
function Vt(e, { repeat: t, repeatType: n = "loop" }, s, i = 1) {
|
|
791
|
+
const r = e.filter(vr), a = i < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
|
|
697
792
|
return !a || s === void 0 ? r[a] : s;
|
|
698
793
|
}
|
|
699
|
-
const
|
|
794
|
+
const wr = {
|
|
700
795
|
decay: Je,
|
|
701
796
|
inertia: Je,
|
|
702
797
|
tween: te,
|
|
@@ -704,9 +799,9 @@ const pr = {
|
|
|
704
799
|
spring: Re
|
|
705
800
|
};
|
|
706
801
|
function es(e) {
|
|
707
|
-
typeof e.type == "string" && (e.type =
|
|
802
|
+
typeof e.type == "string" && (e.type = wr[e.type]);
|
|
708
803
|
}
|
|
709
|
-
class
|
|
804
|
+
class St {
|
|
710
805
|
constructor() {
|
|
711
806
|
this.updateFinished();
|
|
712
807
|
}
|
|
@@ -730,13 +825,13 @@ class Vt {
|
|
|
730
825
|
return this.finished.then(t, n);
|
|
731
826
|
}
|
|
732
827
|
}
|
|
733
|
-
const
|
|
734
|
-
class xt extends
|
|
828
|
+
const Tr = (e) => e / 100;
|
|
829
|
+
class xt extends St {
|
|
735
830
|
constructor(t) {
|
|
736
831
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
737
832
|
var s, i;
|
|
738
833
|
const { motionValue: n } = this.options;
|
|
739
|
-
n && n.updatedAt !==
|
|
834
|
+
n && n.updatedAt !== I.now() && this.tick(I.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (i = (s = this.options).onStop) == null || i.call(s));
|
|
740
835
|
}, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
|
|
741
836
|
}
|
|
742
837
|
initAnimation() {
|
|
@@ -745,13 +840,13 @@ class xt extends Vt {
|
|
|
745
840
|
const { type: n = te, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = t;
|
|
746
841
|
let { keyframes: a } = t;
|
|
747
842
|
const c = n || te;
|
|
748
|
-
process.env.NODE_ENV !== "production" && c !== te && Z(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), c !== te && typeof a[0] != "number" && (this.mixKeyframes = Ee(
|
|
843
|
+
process.env.NODE_ENV !== "production" && c !== te && Z(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), c !== te && typeof a[0] != "number" && (this.mixKeyframes = Ee(Tr, Zn(a[0], a[1])), a = [0, 100]);
|
|
749
844
|
const l = c({ ...t, keyframes: a });
|
|
750
845
|
r === "mirror" && (this.mirroredGenerator = c({
|
|
751
846
|
...t,
|
|
752
847
|
keyframes: [...a].reverse(),
|
|
753
848
|
velocity: -o
|
|
754
|
-
})), l.calculatedDuration === null && (l.calculatedDuration =
|
|
849
|
+
})), l.calculatedDuration === null && (l.calculatedDuration = Tt(l));
|
|
755
850
|
const { calculatedDuration: u } = l;
|
|
756
851
|
this.calculatedDuration = u, this.resolvedDuration = u + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = l;
|
|
757
852
|
}
|
|
@@ -763,22 +858,22 @@ class xt extends Vt {
|
|
|
763
858
|
const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: c } = this;
|
|
764
859
|
if (this.startTime === null)
|
|
765
860
|
return s.next(0);
|
|
766
|
-
const { delay: l = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: h, type: p, onUpdate:
|
|
861
|
+
const { delay: l = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: h, type: p, onUpdate: y, finalKeyframe: b } = this.options;
|
|
767
862
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - i / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
|
|
768
|
-
const g = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1),
|
|
863
|
+
const g = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), T = this.playbackSpeed >= 0 ? g < 0 : g > i;
|
|
769
864
|
this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
770
|
-
let
|
|
865
|
+
let v = this.currentTime, S = s;
|
|
771
866
|
if (d) {
|
|
772
|
-
const
|
|
773
|
-
let D = Math.floor(
|
|
774
|
-
!
|
|
867
|
+
const V = Math.min(this.currentTime, i) / a;
|
|
868
|
+
let D = Math.floor(V), k = V % 1;
|
|
869
|
+
!k && V >= 1 && (k = 1), k === 1 && D--, D = Math.min(D, d + 1), !!(D % 2) && (f === "reverse" ? (k = 1 - k, h && (k -= h / a)) : f === "mirror" && (S = o)), v = H(0, 1, k) * a;
|
|
775
870
|
}
|
|
776
|
-
const
|
|
777
|
-
r && (
|
|
778
|
-
let { done: x } =
|
|
779
|
-
!
|
|
871
|
+
const w = T ? { done: !1, value: u[0] } : S.next(v);
|
|
872
|
+
r && (w.value = r(w.value));
|
|
873
|
+
let { done: x } = w;
|
|
874
|
+
!T && c !== null && (x = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
780
875
|
const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && x);
|
|
781
|
-
return C && p !== Je && (
|
|
876
|
+
return C && p !== Je && (w.value = Vt(u, this.options, b, this.speed)), y && y(w.value), C && this.finish(), w;
|
|
782
877
|
}
|
|
783
878
|
/**
|
|
784
879
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -806,7 +901,7 @@ class xt extends Vt {
|
|
|
806
901
|
return this.playbackSpeed;
|
|
807
902
|
}
|
|
808
903
|
set speed(t) {
|
|
809
|
-
this.updateTime(
|
|
904
|
+
this.updateTime(I.now());
|
|
810
905
|
const n = this.playbackSpeed !== t;
|
|
811
906
|
this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ B(this.currentTime));
|
|
812
907
|
}
|
|
@@ -814,13 +909,13 @@ class xt extends Vt {
|
|
|
814
909
|
var i, r;
|
|
815
910
|
if (this.isStopped)
|
|
816
911
|
return;
|
|
817
|
-
const { driver: t =
|
|
912
|
+
const { driver: t = ir, startTime: n } = this.options;
|
|
818
913
|
this.driver || (this.driver = t((o) => this.tick(o))), (r = (i = this.options).onPlay) == null || r.call(i);
|
|
819
914
|
const s = this.driver.now();
|
|
820
915
|
this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
821
916
|
}
|
|
822
917
|
pause() {
|
|
823
|
-
this.state = "paused", this.updateTime(
|
|
918
|
+
this.state = "paused", this.updateTime(I.now()), this.holdTime = this.currentTime;
|
|
824
919
|
}
|
|
825
920
|
complete() {
|
|
826
921
|
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
@@ -847,14 +942,14 @@ class xt extends Vt {
|
|
|
847
942
|
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(), t.observe(this);
|
|
848
943
|
}
|
|
849
944
|
}
|
|
850
|
-
function
|
|
945
|
+
function Vr(e) {
|
|
851
946
|
for (let t = 1; t < e.length; t++)
|
|
852
947
|
e[t] ?? (e[t] = e[t - 1]);
|
|
853
948
|
}
|
|
854
|
-
const
|
|
855
|
-
const t =
|
|
949
|
+
const X = (e) => e * 180 / Math.PI, Qe = (e) => {
|
|
950
|
+
const t = X(Math.atan2(e[1], e[0]));
|
|
856
951
|
return et(t);
|
|
857
|
-
},
|
|
952
|
+
}, Sr = {
|
|
858
953
|
x: 4,
|
|
859
954
|
y: 5,
|
|
860
955
|
translateX: 4,
|
|
@@ -864,10 +959,10 @@ const Y = (e) => e * 180 / Math.PI, Qe = (e) => {
|
|
|
864
959
|
scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
|
|
865
960
|
rotate: Qe,
|
|
866
961
|
rotateZ: Qe,
|
|
867
|
-
skewX: (e) =>
|
|
868
|
-
skewY: (e) =>
|
|
962
|
+
skewX: (e) => X(Math.atan(e[1])),
|
|
963
|
+
skewY: (e) => X(Math.atan(e[2])),
|
|
869
964
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
|
|
870
|
-
}, et = (e) => (e = e % 360, e < 0 && (e += 360), e), Yt = Qe, Xt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), qt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]),
|
|
965
|
+
}, et = (e) => (e = e % 360, e < 0 && (e += 360), e), Yt = Qe, Xt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), qt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), xr = {
|
|
871
966
|
x: 12,
|
|
872
967
|
y: 13,
|
|
873
968
|
z: 14,
|
|
@@ -877,12 +972,12 @@ const Y = (e) => e * 180 / Math.PI, Qe = (e) => {
|
|
|
877
972
|
scaleX: Xt,
|
|
878
973
|
scaleY: qt,
|
|
879
974
|
scale: (e) => (Xt(e) + qt(e)) / 2,
|
|
880
|
-
rotateX: (e) => et(
|
|
881
|
-
rotateY: (e) => et(
|
|
975
|
+
rotateX: (e) => et(X(Math.atan2(e[6], e[5]))),
|
|
976
|
+
rotateY: (e) => et(X(Math.atan2(-e[2], e[0]))),
|
|
882
977
|
rotateZ: Yt,
|
|
883
978
|
rotate: Yt,
|
|
884
|
-
skewX: (e) =>
|
|
885
|
-
skewY: (e) =>
|
|
979
|
+
skewX: (e) => X(Math.atan(e[4])),
|
|
980
|
+
skewY: (e) => X(Math.atan(e[1])),
|
|
886
981
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
|
|
887
982
|
};
|
|
888
983
|
function tt(e) {
|
|
@@ -894,24 +989,24 @@ function nt(e, t) {
|
|
|
894
989
|
const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
895
990
|
let s, i;
|
|
896
991
|
if (n)
|
|
897
|
-
s =
|
|
992
|
+
s = xr, i = n;
|
|
898
993
|
else {
|
|
899
994
|
const a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
900
|
-
s =
|
|
995
|
+
s = Sr, i = a;
|
|
901
996
|
}
|
|
902
997
|
if (!i)
|
|
903
998
|
return tt(t);
|
|
904
|
-
const r = s[t], o = i[1].split(",").map(
|
|
999
|
+
const r = s[t], o = i[1].split(",").map(Mr);
|
|
905
1000
|
return typeof r == "function" ? r(o) : o[r];
|
|
906
1001
|
}
|
|
907
|
-
const
|
|
1002
|
+
const Ar = (e, t) => {
|
|
908
1003
|
const { transform: n = "none" } = getComputedStyle(e);
|
|
909
1004
|
return nt(n, t);
|
|
910
1005
|
};
|
|
911
|
-
function
|
|
1006
|
+
function Mr(e) {
|
|
912
1007
|
return parseFloat(e.trim());
|
|
913
1008
|
}
|
|
914
|
-
const
|
|
1009
|
+
const ue = [
|
|
915
1010
|
"transformPerspective",
|
|
916
1011
|
"x",
|
|
917
1012
|
"y",
|
|
@@ -929,10 +1024,10 @@ const ae = [
|
|
|
929
1024
|
"skew",
|
|
930
1025
|
"skewX",
|
|
931
1026
|
"skewY"
|
|
932
|
-
],
|
|
933
|
-
function
|
|
1027
|
+
], ce = new Set(ue), Zt = (e) => e === ae || e === m, Cr = /* @__PURE__ */ new Set(["x", "y", "z"]), Pr = ue.filter((e) => !Cr.has(e));
|
|
1028
|
+
function Fr(e) {
|
|
934
1029
|
const t = [];
|
|
935
|
-
return
|
|
1030
|
+
return Pr.forEach((n) => {
|
|
936
1031
|
const s = e.getValue(n);
|
|
937
1032
|
s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
938
1033
|
}), t;
|
|
@@ -957,7 +1052,7 @@ function ts() {
|
|
|
957
1052
|
if (it) {
|
|
958
1053
|
const e = Array.from(q).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
959
1054
|
t.forEach((s) => {
|
|
960
|
-
const i =
|
|
1055
|
+
const i = Fr(s);
|
|
961
1056
|
i.length && (n.set(s, i), s.render());
|
|
962
1057
|
}), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
|
|
963
1058
|
s.render();
|
|
@@ -977,7 +1072,7 @@ function ns() {
|
|
|
977
1072
|
e.readKeyframes(), e.needsMeasurement && (it = !0);
|
|
978
1073
|
});
|
|
979
1074
|
}
|
|
980
|
-
function
|
|
1075
|
+
function Rr() {
|
|
981
1076
|
rt = !0, ns(), ts(), rt = !1;
|
|
982
1077
|
}
|
|
983
1078
|
class At {
|
|
@@ -999,7 +1094,7 @@ class At {
|
|
|
999
1094
|
}
|
|
1000
1095
|
t[0] === void 0 && (t[0] = o), i && r === void 0 && i.set(t[0]);
|
|
1001
1096
|
}
|
|
1002
|
-
|
|
1097
|
+
Vr(t);
|
|
1003
1098
|
}
|
|
1004
1099
|
setFinalKeyframe() {
|
|
1005
1100
|
}
|
|
@@ -1019,38 +1114,38 @@ class At {
|
|
|
1019
1114
|
this.state === "pending" && this.scheduleResolve();
|
|
1020
1115
|
}
|
|
1021
1116
|
}
|
|
1022
|
-
const
|
|
1023
|
-
function
|
|
1024
|
-
|
|
1117
|
+
const Dr = (e) => e.startsWith("--");
|
|
1118
|
+
function Ir(e, t, n) {
|
|
1119
|
+
Dr(t) ? e.style.setProperty(t, n) : e.style[t] = n;
|
|
1025
1120
|
}
|
|
1026
|
-
const
|
|
1121
|
+
const kr = {};
|
|
1027
1122
|
function ss(e, t) {
|
|
1028
1123
|
const n = /* @__PURE__ */ Pn(e);
|
|
1029
|
-
return () =>
|
|
1124
|
+
return () => kr[t] ?? n();
|
|
1030
1125
|
}
|
|
1031
|
-
const
|
|
1126
|
+
const Or = /* @__PURE__ */ ss(() => window.ScrollTimeline !== void 0, "scrollTimeline"), is = /* @__PURE__ */ ss(() => {
|
|
1032
1127
|
try {
|
|
1033
1128
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1034
1129
|
} catch {
|
|
1035
1130
|
return !1;
|
|
1036
1131
|
}
|
|
1037
1132
|
return !0;
|
|
1038
|
-
}, "linearEasing"),
|
|
1133
|
+
}, "linearEasing"), de = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, Jt = {
|
|
1039
1134
|
linear: "linear",
|
|
1040
1135
|
ease: "ease",
|
|
1041
1136
|
easeIn: "ease-in",
|
|
1042
1137
|
easeOut: "ease-out",
|
|
1043
1138
|
easeInOut: "ease-in-out",
|
|
1044
|
-
circIn: /* @__PURE__ */
|
|
1045
|
-
circOut: /* @__PURE__ */
|
|
1046
|
-
backIn: /* @__PURE__ */
|
|
1047
|
-
backOut: /* @__PURE__ */
|
|
1139
|
+
circIn: /* @__PURE__ */ de([0, 0.65, 0.55, 1]),
|
|
1140
|
+
circOut: /* @__PURE__ */ de([0.55, 0, 1, 0.45]),
|
|
1141
|
+
backIn: /* @__PURE__ */ de([0.31, 0.01, 0.66, -0.59]),
|
|
1142
|
+
backOut: /* @__PURE__ */ de([0.33, 1.53, 0.69, 0.99])
|
|
1048
1143
|
};
|
|
1049
1144
|
function rs(e, t) {
|
|
1050
1145
|
if (e)
|
|
1051
|
-
return typeof e == "function" ? is() ? Jn(e, t) : "ease-out" :
|
|
1146
|
+
return typeof e == "function" ? is() ? Jn(e, t) : "ease-out" : jn(e) ? de(e) : Array.isArray(e) ? e.map((n) => rs(n, t) || Jt.easeOut) : Jt[e];
|
|
1052
1147
|
}
|
|
1053
|
-
function
|
|
1148
|
+
function Er(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times: c } = {}, l = void 0) {
|
|
1054
1149
|
const u = {
|
|
1055
1150
|
[t]: n
|
|
1056
1151
|
};
|
|
@@ -1070,20 +1165,20 @@ function Fr(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatTyp
|
|
|
1070
1165
|
function os(e) {
|
|
1071
1166
|
return typeof e == "function" && "applyToOptions" in e;
|
|
1072
1167
|
}
|
|
1073
|
-
function
|
|
1168
|
+
function Br({ type: e, ...t }) {
|
|
1074
1169
|
return os(e) && is() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
|
|
1075
1170
|
}
|
|
1076
|
-
class as extends
|
|
1171
|
+
class as extends St {
|
|
1077
1172
|
constructor(t) {
|
|
1078
1173
|
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t)
|
|
1079
1174
|
return;
|
|
1080
1175
|
const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: c } = t;
|
|
1081
1176
|
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = t, Z(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1082
|
-
const l =
|
|
1083
|
-
this.animation =
|
|
1177
|
+
const l = Br(t);
|
|
1178
|
+
this.animation = Er(n, s, i, l, r), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1084
1179
|
if (this.finishedTime = this.time, !r) {
|
|
1085
|
-
const u =
|
|
1086
|
-
this.updateMotionValue ? this.updateMotionValue(u) :
|
|
1180
|
+
const u = Vt(i, this.options, a, this.speed);
|
|
1181
|
+
this.updateMotionValue ? this.updateMotionValue(u) : Ir(n, s, u), this.animation.cancel();
|
|
1087
1182
|
}
|
|
1088
1183
|
c == null || c(), this.notifyFinished();
|
|
1089
1184
|
};
|
|
@@ -1167,7 +1262,7 @@ class as extends Vt {
|
|
|
1167
1262
|
*/
|
|
1168
1263
|
attachTimeline({ timeline: t, observe: n }) {
|
|
1169
1264
|
var s;
|
|
1170
|
-
return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t &&
|
|
1265
|
+
return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && Or() ? (this.animation.timeline = t, oe) : n(this);
|
|
1171
1266
|
}
|
|
1172
1267
|
}
|
|
1173
1268
|
const us = {
|
|
@@ -1175,16 +1270,16 @@ const us = {
|
|
|
1175
1270
|
backInOut: Ln,
|
|
1176
1271
|
circInOut: Kn
|
|
1177
1272
|
};
|
|
1178
|
-
function
|
|
1273
|
+
function Lr(e) {
|
|
1179
1274
|
return e in us;
|
|
1180
1275
|
}
|
|
1181
|
-
function
|
|
1182
|
-
typeof e.ease == "string" &&
|
|
1276
|
+
function Nr(e) {
|
|
1277
|
+
typeof e.ease == "string" && Lr(e.ease) && (e.ease = us[e.ease]);
|
|
1183
1278
|
}
|
|
1184
1279
|
const _e = 10;
|
|
1185
|
-
class
|
|
1280
|
+
class Kr extends as {
|
|
1186
1281
|
constructor(t) {
|
|
1187
|
-
|
|
1282
|
+
Nr(t), es(t), super(t), t.startTime !== void 0 && (this.startTime = t.startTime), this.options = t;
|
|
1188
1283
|
}
|
|
1189
1284
|
/**
|
|
1190
1285
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -1205,14 +1300,14 @@ class Ir extends as {
|
|
|
1205
1300
|
const a = new xt({
|
|
1206
1301
|
...o,
|
|
1207
1302
|
autoplay: !1
|
|
1208
|
-
}), c = Math.max(_e,
|
|
1303
|
+
}), c = Math.max(_e, I.now() - this.startTime), l = H(0, _e, c - _e);
|
|
1209
1304
|
n.setWithVelocity(a.sample(Math.max(0, c - l)).value, a.sample(c).value, l), a.stop();
|
|
1210
1305
|
}
|
|
1211
1306
|
}
|
|
1212
1307
|
const Qt = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
1213
1308
|
(L.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
1214
1309
|
!e.startsWith("url("));
|
|
1215
|
-
function
|
|
1310
|
+
function $r(e) {
|
|
1216
1311
|
const t = e[0];
|
|
1217
1312
|
if (e.length === 1)
|
|
1218
1313
|
return !0;
|
|
@@ -1220,46 +1315,46 @@ function Or(e) {
|
|
|
1220
1315
|
if (e[n] !== t)
|
|
1221
1316
|
return !0;
|
|
1222
1317
|
}
|
|
1223
|
-
function
|
|
1318
|
+
function jr(e, t, n, s) {
|
|
1224
1319
|
const i = e[0];
|
|
1225
1320
|
if (i === null)
|
|
1226
1321
|
return !1;
|
|
1227
1322
|
if (t === "display" || t === "visibility")
|
|
1228
1323
|
return !0;
|
|
1229
1324
|
const r = e[e.length - 1], o = Qt(i, t), a = Qt(r, t);
|
|
1230
|
-
return
|
|
1325
|
+
return ye(o === a, `You are trying to animate ${t} from "${i}" to "${r}". "${o ? r : i}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 : $r(e) || (n === "spring" || os(n)) && s;
|
|
1231
1326
|
}
|
|
1232
1327
|
function ot(e) {
|
|
1233
1328
|
e.duration = 0, e.type = "keyframes";
|
|
1234
1329
|
}
|
|
1235
|
-
const
|
|
1330
|
+
const Wr = /* @__PURE__ */ new Set([
|
|
1236
1331
|
"opacity",
|
|
1237
1332
|
"clipPath",
|
|
1238
1333
|
"filter",
|
|
1239
1334
|
"transform"
|
|
1240
1335
|
// TODO: Could be re-enabled now we have support for linear() easing
|
|
1241
1336
|
// "background-color"
|
|
1242
|
-
]),
|
|
1243
|
-
function
|
|
1337
|
+
]), _r = /* @__PURE__ */ Pn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1338
|
+
function Gr(e) {
|
|
1244
1339
|
var u;
|
|
1245
1340
|
const { motionValue: t, name: n, repeatDelay: s, repeatType: i, damping: r, type: o } = e;
|
|
1246
1341
|
if (!(((u = t == null ? void 0 : t.owner) == null ? void 0 : u.current) instanceof HTMLElement))
|
|
1247
1342
|
return !1;
|
|
1248
1343
|
const { onUpdate: c, transformTemplate: l } = t.owner.getProps();
|
|
1249
|
-
return
|
|
1344
|
+
return _r() && n && Wr.has(n) && (n !== "transform" || !l) && /**
|
|
1250
1345
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1251
1346
|
* no way to read the value from WAAPI every frame.
|
|
1252
1347
|
*/
|
|
1253
1348
|
!c && !s && i !== "mirror" && r !== 0 && o !== "inertia";
|
|
1254
1349
|
}
|
|
1255
|
-
const
|
|
1256
|
-
class
|
|
1350
|
+
const Hr = 40;
|
|
1351
|
+
class zr extends St {
|
|
1257
1352
|
constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", keyframes: a, name: c, motionValue: l, element: u, ...d }) {
|
|
1258
1353
|
var p;
|
|
1259
1354
|
super(), this.stop = () => {
|
|
1260
|
-
var
|
|
1261
|
-
this._animation && (this._animation.stop(), (
|
|
1262
|
-
}, this.createdAt =
|
|
1355
|
+
var y, b;
|
|
1356
|
+
this._animation && (this._animation.stop(), (y = this.stopTimeline) == null || y.call(this)), (b = this.keyframeResolver) == null || b.cancel();
|
|
1357
|
+
}, this.createdAt = I.now();
|
|
1263
1358
|
const f = {
|
|
1264
1359
|
autoplay: t,
|
|
1265
1360
|
delay: n,
|
|
@@ -1272,25 +1367,25 @@ class $r extends Vt {
|
|
|
1272
1367
|
element: u,
|
|
1273
1368
|
...d
|
|
1274
1369
|
}, h = (u == null ? void 0 : u.KeyframeResolver) || At;
|
|
1275
|
-
this.keyframeResolver = new h(a, (
|
|
1370
|
+
this.keyframeResolver = new h(a, (y, b, g) => this.onKeyframesResolved(y, b, f, !g), c, l, u), (p = this.keyframeResolver) == null || p.scheduleResolve();
|
|
1276
1371
|
}
|
|
1277
1372
|
onKeyframesResolved(t, n, s, i) {
|
|
1278
|
-
var
|
|
1373
|
+
var b, g;
|
|
1279
1374
|
this.keyframeResolver = void 0;
|
|
1280
1375
|
const { name: r, type: o, velocity: a, delay: c, isHandoff: l, onUpdate: u } = s;
|
|
1281
|
-
this.resolvedAt =
|
|
1376
|
+
this.resolvedAt = I.now(), jr(t, r, o, a) || (($.instantAnimations || !c) && (u == null || u(Vt(t, s, n))), t[0] = t[t.length - 1], ot(s), s.repeat = 0);
|
|
1282
1377
|
const f = {
|
|
1283
|
-
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
1378
|
+
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Hr ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1284
1379
|
finalKeyframe: n,
|
|
1285
1380
|
...s,
|
|
1286
1381
|
keyframes: t
|
|
1287
|
-
}, h = !l &&
|
|
1382
|
+
}, h = !l && Gr(f), p = (g = (b = f.motionValue) == null ? void 0 : b.owner) == null ? void 0 : g.current, y = h ? new Kr({
|
|
1288
1383
|
...f,
|
|
1289
1384
|
element: p
|
|
1290
1385
|
}) : new xt(f);
|
|
1291
|
-
|
|
1386
|
+
y.finished.then(() => {
|
|
1292
1387
|
this.notifyFinished();
|
|
1293
|
-
}).catch(
|
|
1388
|
+
}).catch(oe), this.pendingTimeline && (this.stopTimeline = y.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = y;
|
|
1294
1389
|
}
|
|
1295
1390
|
get finished() {
|
|
1296
1391
|
return this._animation ? this.animation.finished : this._finished;
|
|
@@ -1301,7 +1396,7 @@ class $r extends Vt {
|
|
|
1301
1396
|
}
|
|
1302
1397
|
get animation() {
|
|
1303
1398
|
var t;
|
|
1304
|
-
return this._animation || ((t = this.keyframeResolver) == null || t.resume(),
|
|
1399
|
+
return this._animation || ((t = this.keyframeResolver) == null || t.resume(), Rr()), this._animation;
|
|
1305
1400
|
}
|
|
1306
1401
|
get duration() {
|
|
1307
1402
|
return this.animation.duration;
|
|
@@ -1348,21 +1443,21 @@ function cs(e, t, n, s = 0, i = 1) {
|
|
|
1348
1443
|
const r = Array.from(e).sort((l, u) => l.sortNodePosition(u)).indexOf(t), o = e.size, a = (o - 1) * s;
|
|
1349
1444
|
return typeof n == "function" ? n(r, o) : i === 1 ? r * s : a - r * s;
|
|
1350
1445
|
}
|
|
1351
|
-
const
|
|
1446
|
+
const Ur = (
|
|
1352
1447
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1353
1448
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1354
1449
|
);
|
|
1355
|
-
function
|
|
1356
|
-
const t =
|
|
1450
|
+
function Yr(e) {
|
|
1451
|
+
const t = Ur.exec(e);
|
|
1357
1452
|
if (!t)
|
|
1358
1453
|
return [,];
|
|
1359
1454
|
const [, n, s, i] = t;
|
|
1360
1455
|
return [`--${n ?? s}`, i];
|
|
1361
1456
|
}
|
|
1362
|
-
const
|
|
1457
|
+
const Xr = 4;
|
|
1363
1458
|
function ls(e, t, n = 1) {
|
|
1364
|
-
Z(n <=
|
|
1365
|
-
const [s, i] =
|
|
1459
|
+
Z(n <= Xr, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1460
|
+
const [s, i] = Yr(e);
|
|
1366
1461
|
if (!s)
|
|
1367
1462
|
return;
|
|
1368
1463
|
const r = window.getComputedStyle(t).getPropertyValue(s);
|
|
@@ -1372,26 +1467,26 @@ function ls(e, t, n = 1) {
|
|
|
1372
1467
|
}
|
|
1373
1468
|
return yt(i) ? ls(i, t, n + 1) : i;
|
|
1374
1469
|
}
|
|
1375
|
-
const
|
|
1470
|
+
const qr = {
|
|
1376
1471
|
type: "spring",
|
|
1377
1472
|
stiffness: 500,
|
|
1378
1473
|
damping: 25,
|
|
1379
1474
|
restSpeed: 10
|
|
1380
|
-
},
|
|
1475
|
+
}, Zr = (e) => ({
|
|
1381
1476
|
type: "spring",
|
|
1382
1477
|
stiffness: 550,
|
|
1383
1478
|
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
|
|
1384
1479
|
restSpeed: 10
|
|
1385
|
-
}),
|
|
1480
|
+
}), Jr = {
|
|
1386
1481
|
type: "keyframes",
|
|
1387
1482
|
duration: 0.8
|
|
1388
|
-
},
|
|
1483
|
+
}, Qr = {
|
|
1389
1484
|
type: "keyframes",
|
|
1390
1485
|
ease: [0.25, 0.1, 0.35, 1],
|
|
1391
1486
|
duration: 0.3
|
|
1392
|
-
},
|
|
1393
|
-
function
|
|
1394
|
-
const i = e.filter(
|
|
1487
|
+
}, eo = (e, { keyframes: t }) => t.length > 2 ? Jr : ce.has(e) ? e.startsWith("scale") ? Zr(t[1]) : qr : Qr, to = (e) => e !== null;
|
|
1488
|
+
function no(e, { repeat: t, repeatType: n = "loop" }, s) {
|
|
1489
|
+
const i = e.filter(to), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
1395
1490
|
return i[r];
|
|
1396
1491
|
}
|
|
1397
1492
|
function fs(e, t) {
|
|
@@ -1405,10 +1500,10 @@ function ds(e, t) {
|
|
|
1405
1500
|
const n = (e == null ? void 0 : e[t]) ?? (e == null ? void 0 : e.default) ?? e;
|
|
1406
1501
|
return n !== e ? fs(n, e) : n;
|
|
1407
1502
|
}
|
|
1408
|
-
function
|
|
1503
|
+
function so({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: c, elapsed: l, ...u }) {
|
|
1409
1504
|
return !!Object.keys(u).length;
|
|
1410
1505
|
}
|
|
1411
|
-
const
|
|
1506
|
+
const io = (e, t, n, s = {}, i, r) => (o) => {
|
|
1412
1507
|
const a = ds(s, e) || {}, c = a.delay || s.delay || 0;
|
|
1413
1508
|
let { elapsed: l = 0 } = s;
|
|
1414
1509
|
l = l - /* @__PURE__ */ K(c);
|
|
@@ -1428,10 +1523,10 @@ const Jr = (e, t, n, s = {}, i, r) => (o) => {
|
|
|
1428
1523
|
motionValue: t,
|
|
1429
1524
|
element: r ? void 0 : i
|
|
1430
1525
|
};
|
|
1431
|
-
|
|
1526
|
+
so(a) || Object.assign(u, eo(e, u)), u.duration && (u.duration = /* @__PURE__ */ K(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ K(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
1432
1527
|
let d = !1;
|
|
1433
1528
|
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (ot(u), u.delay === 0 && (d = !0)), ($.instantAnimations || $.skipAnimations || i != null && i.shouldSkipAnimations) && (d = !0, ot(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, d && !r && t.get() !== void 0) {
|
|
1434
|
-
const f =
|
|
1529
|
+
const f = no(u.keyframes, a);
|
|
1435
1530
|
if (f !== void 0) {
|
|
1436
1531
|
N.update(() => {
|
|
1437
1532
|
u.onUpdate(f), u.onComplete();
|
|
@@ -1439,7 +1534,7 @@ const Jr = (e, t, n, s = {}, i, r) => (o) => {
|
|
|
1439
1534
|
return;
|
|
1440
1535
|
}
|
|
1441
1536
|
}
|
|
1442
|
-
return a.isSync ? new xt(u) : new
|
|
1537
|
+
return a.isSync ? new xt(u) : new zr(u);
|
|
1443
1538
|
};
|
|
1444
1539
|
function en(e) {
|
|
1445
1540
|
const t = [{}, {}];
|
|
@@ -1469,9 +1564,9 @@ const hs = /* @__PURE__ */ new Set([
|
|
|
1469
1564
|
"left",
|
|
1470
1565
|
"right",
|
|
1471
1566
|
"bottom",
|
|
1472
|
-
...
|
|
1473
|
-
]), tn = 30,
|
|
1474
|
-
class
|
|
1567
|
+
...ue
|
|
1568
|
+
]), tn = 30, ro = (e) => !isNaN(parseFloat(e));
|
|
1569
|
+
class oo {
|
|
1475
1570
|
/**
|
|
1476
1571
|
* @param init - The initiating value
|
|
1477
1572
|
* @param config - Optional configuration options
|
|
@@ -1481,14 +1576,14 @@ class eo {
|
|
|
1481
1576
|
constructor(t, n = {}) {
|
|
1482
1577
|
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s) => {
|
|
1483
1578
|
var r;
|
|
1484
|
-
const i =
|
|
1579
|
+
const i = I.now();
|
|
1485
1580
|
if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && ((r = this.events.change) == null || r.notify(this.current), this.dependents))
|
|
1486
1581
|
for (const o of this.dependents)
|
|
1487
1582
|
o.dirty();
|
|
1488
1583
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
|
|
1489
1584
|
}
|
|
1490
1585
|
setCurrent(t) {
|
|
1491
|
-
this.current = t, this.updatedAt =
|
|
1586
|
+
this.current = t, this.updatedAt = I.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = ro(this.current));
|
|
1492
1587
|
}
|
|
1493
1588
|
setPrevFrameValue(t = this.current) {
|
|
1494
1589
|
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -1534,7 +1629,7 @@ class eo {
|
|
|
1534
1629
|
* @deprecated
|
|
1535
1630
|
*/
|
|
1536
1631
|
onChange(t) {
|
|
1537
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1632
|
+
return process.env.NODE_ENV !== "production" && In(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
1538
1633
|
}
|
|
1539
1634
|
on(t, n) {
|
|
1540
1635
|
this.events[t] || (this.events[t] = new Rn());
|
|
@@ -1617,7 +1712,7 @@ class eo {
|
|
|
1617
1712
|
* @public
|
|
1618
1713
|
*/
|
|
1619
1714
|
getVelocity() {
|
|
1620
|
-
const t =
|
|
1715
|
+
const t = I.now();
|
|
1621
1716
|
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > tn)
|
|
1622
1717
|
return 0;
|
|
1623
1718
|
const n = Math.min(this.updatedAt - this.prevUpdatedAt, tn);
|
|
@@ -1674,31 +1769,31 @@ class eo {
|
|
|
1674
1769
|
}
|
|
1675
1770
|
}
|
|
1676
1771
|
function De(e, t) {
|
|
1677
|
-
return new
|
|
1772
|
+
return new oo(e, t);
|
|
1678
1773
|
}
|
|
1679
1774
|
const at = (e) => Array.isArray(e);
|
|
1680
|
-
function
|
|
1775
|
+
function ao(e, t, n) {
|
|
1681
1776
|
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, De(n));
|
|
1682
1777
|
}
|
|
1683
|
-
function
|
|
1778
|
+
function uo(e) {
|
|
1684
1779
|
return at(e) ? e[e.length - 1] || 0 : e;
|
|
1685
1780
|
}
|
|
1686
|
-
function
|
|
1781
|
+
function co(e, t) {
|
|
1687
1782
|
const n = se(e, t);
|
|
1688
1783
|
let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
|
|
1689
1784
|
r = { ...r, ...s };
|
|
1690
1785
|
for (const o in r) {
|
|
1691
|
-
const a =
|
|
1692
|
-
|
|
1786
|
+
const a = uo(r[o]);
|
|
1787
|
+
ao(e, o, a);
|
|
1693
1788
|
}
|
|
1694
1789
|
}
|
|
1695
1790
|
const R = (e) => !!(e && e.getVelocity);
|
|
1696
|
-
function
|
|
1791
|
+
function lo(e) {
|
|
1697
1792
|
return !!(R(e) && e.add);
|
|
1698
1793
|
}
|
|
1699
|
-
function
|
|
1794
|
+
function fo(e, t) {
|
|
1700
1795
|
const n = e.getValue("willChange");
|
|
1701
|
-
if (
|
|
1796
|
+
if (lo(n))
|
|
1702
1797
|
return n.add(t);
|
|
1703
1798
|
if (!n && $.WillChange) {
|
|
1704
1799
|
const s = new $.WillChange("auto");
|
|
@@ -1708,11 +1803,11 @@ function ro(e, t) {
|
|
|
1708
1803
|
function Ct(e) {
|
|
1709
1804
|
return e.replace(/([A-Z])/g, (t) => `-${t.toLowerCase()}`);
|
|
1710
1805
|
}
|
|
1711
|
-
const
|
|
1712
|
-
function
|
|
1806
|
+
const ho = "framerAppearId", ps = "data-" + Ct(ho);
|
|
1807
|
+
function po(e) {
|
|
1713
1808
|
return e.props[ps];
|
|
1714
1809
|
}
|
|
1715
|
-
function
|
|
1810
|
+
function mo({ protectedKeys: e, needsAnimating: t }, n) {
|
|
1716
1811
|
const s = e.hasOwnProperty(n) && t[n] !== !0;
|
|
1717
1812
|
return t[n] = !1, s;
|
|
1718
1813
|
}
|
|
@@ -1725,31 +1820,31 @@ function ms(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
1725
1820
|
const u = [], d = i && e.animationState && e.animationState.getState()[i];
|
|
1726
1821
|
for (const f in a) {
|
|
1727
1822
|
const h = e.getValue(f, e.latestValues[f] ?? null), p = a[f];
|
|
1728
|
-
if (p === void 0 || d &&
|
|
1823
|
+
if (p === void 0 || d && mo(d, f))
|
|
1729
1824
|
continue;
|
|
1730
|
-
const
|
|
1825
|
+
const y = {
|
|
1731
1826
|
delay: n,
|
|
1732
1827
|
...ds(r || {}, f)
|
|
1733
|
-
},
|
|
1734
|
-
if (
|
|
1828
|
+
}, b = h.get();
|
|
1829
|
+
if (b !== void 0 && !h.isAnimating && !Array.isArray(p) && p === b && !y.velocity)
|
|
1735
1830
|
continue;
|
|
1736
1831
|
let g = !1;
|
|
1737
1832
|
if (window.MotionHandoffAnimation) {
|
|
1738
|
-
const
|
|
1739
|
-
if (
|
|
1740
|
-
const
|
|
1741
|
-
|
|
1833
|
+
const S = po(e);
|
|
1834
|
+
if (S) {
|
|
1835
|
+
const w = window.MotionHandoffAnimation(S, f, N);
|
|
1836
|
+
w !== null && (y.startTime = w, g = !0);
|
|
1742
1837
|
}
|
|
1743
1838
|
}
|
|
1744
|
-
|
|
1745
|
-
const
|
|
1746
|
-
h.start(
|
|
1747
|
-
const
|
|
1748
|
-
|
|
1839
|
+
fo(e, f);
|
|
1840
|
+
const T = l ?? e.shouldReduceMotion;
|
|
1841
|
+
h.start(io(f, h, p, T && hs.has(f) ? { type: !1 } : y, e, g));
|
|
1842
|
+
const v = h.animation;
|
|
1843
|
+
v && u.push(v);
|
|
1749
1844
|
}
|
|
1750
1845
|
if (o) {
|
|
1751
1846
|
const f = () => N.update(() => {
|
|
1752
|
-
o &&
|
|
1847
|
+
o && co(e, o);
|
|
1753
1848
|
});
|
|
1754
1849
|
u.length ? Promise.all(u).then(f) : f();
|
|
1755
1850
|
}
|
|
@@ -1762,7 +1857,7 @@ function ut(e, t, n = {}) {
|
|
|
1762
1857
|
n.transitionOverride && (i = n.transitionOverride);
|
|
1763
1858
|
const r = s ? () => Promise.all(ms(e, s, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (l = 0) => {
|
|
1764
1859
|
const { delayChildren: u = 0, staggerChildren: d, staggerDirection: f } = i;
|
|
1765
|
-
return
|
|
1860
|
+
return go(e, t, l, u, d, f, n);
|
|
1766
1861
|
} : () => Promise.resolve(), { when: a } = i;
|
|
1767
1862
|
if (a) {
|
|
1768
1863
|
const [l, u] = a === "beforeChildren" ? [r, o] : [o, r];
|
|
@@ -1770,7 +1865,7 @@ function ut(e, t, n = {}) {
|
|
|
1770
1865
|
} else
|
|
1771
1866
|
return Promise.all([r(), o(n.delay)]);
|
|
1772
1867
|
}
|
|
1773
|
-
function
|
|
1868
|
+
function go(e, t, n = 0, s = 0, i = 0, r = 1, o) {
|
|
1774
1869
|
const a = [];
|
|
1775
1870
|
for (const c of e.variantChildren)
|
|
1776
1871
|
c.notify("AnimationStart", t), a.push(ut(c, t, {
|
|
@@ -1779,7 +1874,7 @@ function co(e, t, n = 0, s = 0, i = 0, r = 1, o) {
|
|
|
1779
1874
|
}).then(() => c.notify("AnimationComplete", t)));
|
|
1780
1875
|
return Promise.all(a);
|
|
1781
1876
|
}
|
|
1782
|
-
function
|
|
1877
|
+
function yo(e, t, n = {}) {
|
|
1783
1878
|
e.notify("AnimationStart", t);
|
|
1784
1879
|
let s;
|
|
1785
1880
|
if (Array.isArray(t)) {
|
|
@@ -1795,15 +1890,15 @@ function lo(e, t, n = {}) {
|
|
|
1795
1890
|
e.notify("AnimationComplete", t);
|
|
1796
1891
|
});
|
|
1797
1892
|
}
|
|
1798
|
-
const
|
|
1893
|
+
const bo = {
|
|
1799
1894
|
test: (e) => e === "auto",
|
|
1800
1895
|
parse: (e) => e
|
|
1801
|
-
}, gs = (e) => (t) => t.test(e), ys = [
|
|
1802
|
-
function
|
|
1896
|
+
}, gs = (e) => (t) => t.test(e), ys = [ae, m, ne, j, Wi, ji, bo], nn = (e) => ys.find(gs(e));
|
|
1897
|
+
function vo(e) {
|
|
1803
1898
|
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Cn(e) : !0;
|
|
1804
1899
|
}
|
|
1805
|
-
const
|
|
1806
|
-
function
|
|
1900
|
+
const wo = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1901
|
+
function To(e) {
|
|
1807
1902
|
const [t, n] = e.slice(0, -1).split("(");
|
|
1808
1903
|
if (t === "drop-shadow")
|
|
1809
1904
|
return e;
|
|
@@ -1811,14 +1906,14 @@ function mo(e) {
|
|
|
1811
1906
|
if (!s)
|
|
1812
1907
|
return e;
|
|
1813
1908
|
const i = n.replace(s, "");
|
|
1814
|
-
let r =
|
|
1909
|
+
let r = wo.has(t) ? 1 : 0;
|
|
1815
1910
|
return s !== n && (r *= 100), t + "(" + r + i + ")";
|
|
1816
1911
|
}
|
|
1817
|
-
const
|
|
1912
|
+
const Vo = /\b([a-z-]*)\(.*?\)/gu, ct = {
|
|
1818
1913
|
...L,
|
|
1819
1914
|
getAnimatableNone: (e) => {
|
|
1820
|
-
const t = e.match(
|
|
1821
|
-
return t ? t.map(
|
|
1915
|
+
const t = e.match(Vo);
|
|
1916
|
+
return t ? t.map(To).join(" ") : e;
|
|
1822
1917
|
}
|
|
1823
1918
|
}, lt = {
|
|
1824
1919
|
...L,
|
|
@@ -1827,20 +1922,20 @@ const go = /\b([a-z-]*)\(.*?\)/gu, ct = {
|
|
|
1827
1922
|
return L.createTransformer(e)(t.map((s) => typeof s == "number" ? 0 : typeof s == "object" ? { ...s, alpha: 1 } : s));
|
|
1828
1923
|
}
|
|
1829
1924
|
}, sn = {
|
|
1830
|
-
...
|
|
1925
|
+
...ae,
|
|
1831
1926
|
transform: Math.round
|
|
1832
|
-
},
|
|
1833
|
-
rotate:
|
|
1834
|
-
rotateX:
|
|
1835
|
-
rotateY:
|
|
1836
|
-
rotateZ:
|
|
1837
|
-
scale:
|
|
1838
|
-
scaleX:
|
|
1839
|
-
scaleY:
|
|
1840
|
-
scaleZ:
|
|
1841
|
-
skew:
|
|
1842
|
-
skewX:
|
|
1843
|
-
skewY:
|
|
1927
|
+
}, So = {
|
|
1928
|
+
rotate: j,
|
|
1929
|
+
rotateX: j,
|
|
1930
|
+
rotateY: j,
|
|
1931
|
+
rotateZ: j,
|
|
1932
|
+
scale: Se,
|
|
1933
|
+
scaleX: Se,
|
|
1934
|
+
scaleY: Se,
|
|
1935
|
+
scaleZ: Se,
|
|
1936
|
+
skew: j,
|
|
1937
|
+
skewX: j,
|
|
1938
|
+
skewY: j,
|
|
1844
1939
|
distance: m,
|
|
1845
1940
|
translateX: m,
|
|
1846
1941
|
translateY: m,
|
|
@@ -1850,7 +1945,7 @@ const go = /\b([a-z-]*)\(.*?\)/gu, ct = {
|
|
|
1850
1945
|
z: m,
|
|
1851
1946
|
perspective: m,
|
|
1852
1947
|
transformPerspective: m,
|
|
1853
|
-
opacity:
|
|
1948
|
+
opacity: pe,
|
|
1854
1949
|
originX: _t,
|
|
1855
1950
|
originY: _t,
|
|
1856
1951
|
originZ: m
|
|
@@ -1910,13 +2005,13 @@ const go = /\b([a-z-]*)\(.*?\)/gu, ct = {
|
|
|
1910
2005
|
// Misc
|
|
1911
2006
|
backgroundPositionX: m,
|
|
1912
2007
|
backgroundPositionY: m,
|
|
1913
|
-
...
|
|
2008
|
+
...So,
|
|
1914
2009
|
zIndex: sn,
|
|
1915
2010
|
// SVG
|
|
1916
|
-
fillOpacity:
|
|
1917
|
-
strokeOpacity:
|
|
2011
|
+
fillOpacity: pe,
|
|
2012
|
+
strokeOpacity: pe,
|
|
1918
2013
|
numOctaves: sn
|
|
1919
|
-
},
|
|
2014
|
+
}, xo = {
|
|
1920
2015
|
...Pt,
|
|
1921
2016
|
// Color props
|
|
1922
2017
|
color: M,
|
|
@@ -1934,23 +2029,23 @@ const go = /\b([a-z-]*)\(.*?\)/gu, ct = {
|
|
|
1934
2029
|
WebkitFilter: ct,
|
|
1935
2030
|
mask: lt,
|
|
1936
2031
|
WebkitMask: lt
|
|
1937
|
-
}, bs = (e) =>
|
|
1938
|
-
function
|
|
2032
|
+
}, bs = (e) => xo[e], Ao = /* @__PURE__ */ new Set([ct, lt]);
|
|
2033
|
+
function vs(e, t) {
|
|
1939
2034
|
let n = bs(e);
|
|
1940
|
-
return
|
|
2035
|
+
return Ao.has(n) || (n = L), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
|
|
1941
2036
|
}
|
|
1942
|
-
const
|
|
1943
|
-
function
|
|
2037
|
+
const Mo = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
2038
|
+
function Co(e, t, n) {
|
|
1944
2039
|
let s = 0, i;
|
|
1945
2040
|
for (; s < e.length && !i; ) {
|
|
1946
2041
|
const r = e[s];
|
|
1947
|
-
typeof r == "string" && !
|
|
2042
|
+
typeof r == "string" && !Mo.has(r) && me(r).values.length && (i = e[s]), s++;
|
|
1948
2043
|
}
|
|
1949
2044
|
if (i && n)
|
|
1950
2045
|
for (const r of t)
|
|
1951
|
-
e[r] =
|
|
2046
|
+
e[r] = vs(n, i);
|
|
1952
2047
|
}
|
|
1953
|
-
class
|
|
2048
|
+
class Po extends At {
|
|
1954
2049
|
constructor(t, n, s, i, r) {
|
|
1955
2050
|
super(t, n, s, i, r, !0);
|
|
1956
2051
|
}
|
|
@@ -1968,7 +2063,7 @@ class So extends At {
|
|
|
1968
2063
|
}
|
|
1969
2064
|
if (this.resolveNoneKeyframes(), !hs.has(s) || t.length !== 2)
|
|
1970
2065
|
return;
|
|
1971
|
-
const [i, r] = t, o = nn(i), a = nn(r), c =
|
|
2066
|
+
const [i, r] = t, o = nn(i), a = nn(r), c = Wt(i), l = Wt(r);
|
|
1972
2067
|
if (c !== l && _[s]) {
|
|
1973
2068
|
this.needsMeasurement = !0;
|
|
1974
2069
|
return;
|
|
@@ -1984,8 +2079,8 @@ class So extends At {
|
|
|
1984
2079
|
resolveNoneKeyframes() {
|
|
1985
2080
|
const { unresolvedKeyframes: t, name: n } = this, s = [];
|
|
1986
2081
|
for (let i = 0; i < t.length; i++)
|
|
1987
|
-
(t[i] === null ||
|
|
1988
|
-
s.length &&
|
|
2082
|
+
(t[i] === null || vo(t[i])) && s.push(i);
|
|
2083
|
+
s.length && Co(t, s, n);
|
|
1989
2084
|
}
|
|
1990
2085
|
measureInitialState() {
|
|
1991
2086
|
const { element: t, unresolvedKeyframes: n, name: s } = this;
|
|
@@ -2008,7 +2103,7 @@ class So extends At {
|
|
|
2008
2103
|
}), this.resolveNoneKeyframes();
|
|
2009
2104
|
}
|
|
2010
2105
|
}
|
|
2011
|
-
const
|
|
2106
|
+
const Fo = /* @__PURE__ */ new Set([
|
|
2012
2107
|
"opacity",
|
|
2013
2108
|
"clipPath",
|
|
2014
2109
|
"filter",
|
|
@@ -2017,7 +2112,7 @@ const Vo = /* @__PURE__ */ new Set([
|
|
|
2017
2112
|
// or until we implement support for linear() easing.
|
|
2018
2113
|
// "background-color"
|
|
2019
2114
|
]);
|
|
2020
|
-
function
|
|
2115
|
+
function Ro(e, t, n) {
|
|
2021
2116
|
if (e == null)
|
|
2022
2117
|
return [];
|
|
2023
2118
|
if (e instanceof EventTarget)
|
|
@@ -2029,66 +2124,66 @@ function xo(e, t, n) {
|
|
|
2029
2124
|
}
|
|
2030
2125
|
return Array.from(e).filter((s) => s != null);
|
|
2031
2126
|
}
|
|
2032
|
-
const
|
|
2033
|
-
function
|
|
2034
|
-
return
|
|
2127
|
+
const ws = (e, t) => t && typeof e == "number" ? t.transform(e) : e;
|
|
2128
|
+
function Do(e) {
|
|
2129
|
+
return Vi(e) && "offsetHeight" in e;
|
|
2035
2130
|
}
|
|
2036
|
-
const { schedule:
|
|
2131
|
+
const { schedule: Io } = /* @__PURE__ */ Wn(queueMicrotask, !1), ko = {
|
|
2037
2132
|
y: !1
|
|
2038
2133
|
};
|
|
2039
|
-
function
|
|
2040
|
-
return
|
|
2134
|
+
function Oo() {
|
|
2135
|
+
return ko.y;
|
|
2041
2136
|
}
|
|
2042
|
-
function
|
|
2043
|
-
const n =
|
|
2137
|
+
function Ts(e, t) {
|
|
2138
|
+
const n = Ro(e), s = new AbortController(), i = {
|
|
2044
2139
|
passive: !0,
|
|
2045
2140
|
...t,
|
|
2046
2141
|
signal: s.signal
|
|
2047
2142
|
};
|
|
2048
2143
|
return [n, i, () => s.abort()];
|
|
2049
2144
|
}
|
|
2050
|
-
function
|
|
2051
|
-
return !(e.pointerType === "touch" ||
|
|
2145
|
+
function Eo(e) {
|
|
2146
|
+
return !(e.pointerType === "touch" || Oo());
|
|
2052
2147
|
}
|
|
2053
|
-
function
|
|
2054
|
-
const [s, i, r] =
|
|
2148
|
+
function Bo(e, t, n = {}) {
|
|
2149
|
+
const [s, i, r] = Ts(e, n);
|
|
2055
2150
|
return s.forEach((o) => {
|
|
2056
2151
|
let a = !1, c = !1, l;
|
|
2057
2152
|
const u = () => {
|
|
2058
2153
|
o.removeEventListener("pointerleave", p);
|
|
2059
|
-
}, d = (
|
|
2060
|
-
l && (l(
|
|
2061
|
-
}, f = (
|
|
2062
|
-
a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), c && (c = !1, d(
|
|
2154
|
+
}, d = (b) => {
|
|
2155
|
+
l && (l(b), l = void 0), u();
|
|
2156
|
+
}, f = (b) => {
|
|
2157
|
+
a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), c && (c = !1, d(b));
|
|
2063
2158
|
}, h = () => {
|
|
2064
2159
|
a = !0, window.addEventListener("pointerup", f, i), window.addEventListener("pointercancel", f, i);
|
|
2065
|
-
}, p = (
|
|
2066
|
-
if (
|
|
2160
|
+
}, p = (b) => {
|
|
2161
|
+
if (b.pointerType !== "touch") {
|
|
2067
2162
|
if (a) {
|
|
2068
2163
|
c = !0;
|
|
2069
2164
|
return;
|
|
2070
2165
|
}
|
|
2071
|
-
d(
|
|
2166
|
+
d(b);
|
|
2072
2167
|
}
|
|
2073
|
-
},
|
|
2074
|
-
if (!
|
|
2168
|
+
}, y = (b) => {
|
|
2169
|
+
if (!Eo(b))
|
|
2075
2170
|
return;
|
|
2076
2171
|
c = !1;
|
|
2077
|
-
const g = t(o,
|
|
2172
|
+
const g = t(o, b);
|
|
2078
2173
|
typeof g == "function" && (l = g, o.addEventListener("pointerleave", p, i));
|
|
2079
2174
|
};
|
|
2080
|
-
o.addEventListener("pointerenter",
|
|
2175
|
+
o.addEventListener("pointerenter", y, i), o.addEventListener("pointerdown", h, i);
|
|
2081
2176
|
}), r;
|
|
2082
2177
|
}
|
|
2083
|
-
const
|
|
2178
|
+
const Vs = (e, t) => t ? e === t ? !0 : Vs(e, t.parentElement) : !1, Lo = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, No = /* @__PURE__ */ new Set([
|
|
2084
2179
|
"BUTTON",
|
|
2085
2180
|
"INPUT",
|
|
2086
2181
|
"SELECT",
|
|
2087
2182
|
"TEXTAREA",
|
|
2088
2183
|
"A"
|
|
2089
2184
|
]);
|
|
2090
|
-
function
|
|
2091
|
-
return
|
|
2185
|
+
function Ko(e) {
|
|
2186
|
+
return No.has(e.tagName) || e.isContentEditable === !0;
|
|
2092
2187
|
}
|
|
2093
2188
|
const Me = /* @__PURE__ */ new WeakSet();
|
|
2094
2189
|
function rn(e) {
|
|
@@ -2099,7 +2194,7 @@ function rn(e) {
|
|
|
2099
2194
|
function Ge(e, t) {
|
|
2100
2195
|
e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
|
|
2101
2196
|
}
|
|
2102
|
-
const
|
|
2197
|
+
const $o = (e, t) => {
|
|
2103
2198
|
const n = e.currentTarget;
|
|
2104
2199
|
if (!n)
|
|
2105
2200
|
return;
|
|
@@ -2115,11 +2210,11 @@ const Oo = (e, t) => {
|
|
|
2115
2210
|
n.addEventListener("keydown", s, t), n.addEventListener("blur", () => n.removeEventListener("keydown", s), t);
|
|
2116
2211
|
};
|
|
2117
2212
|
function on(e) {
|
|
2118
|
-
return
|
|
2213
|
+
return Lo(e) && !0;
|
|
2119
2214
|
}
|
|
2120
2215
|
const an = /* @__PURE__ */ new WeakSet();
|
|
2121
|
-
function
|
|
2122
|
-
const [s, i, r] =
|
|
2216
|
+
function jo(e, t, n = {}) {
|
|
2217
|
+
const [s, i, r] = Ts(e, n), o = (a) => {
|
|
2123
2218
|
const c = a.currentTarget;
|
|
2124
2219
|
if (!on(a) || an.has(a))
|
|
2125
2220
|
return;
|
|
@@ -2127,24 +2222,24 @@ function Eo(e, t, n = {}) {
|
|
|
2127
2222
|
const l = t(c, a), u = (h, p) => {
|
|
2128
2223
|
window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), Me.has(c) && Me.delete(c), on(h) && typeof l == "function" && l(h, { success: p });
|
|
2129
2224
|
}, d = (h) => {
|
|
2130
|
-
u(h, c === window || c === document || n.useGlobalTarget ||
|
|
2225
|
+
u(h, c === window || c === document || n.useGlobalTarget || Vs(c, h.target));
|
|
2131
2226
|
}, f = (h) => {
|
|
2132
2227
|
u(h, !1);
|
|
2133
2228
|
};
|
|
2134
2229
|
window.addEventListener("pointerup", d, i), window.addEventListener("pointercancel", f, i);
|
|
2135
2230
|
};
|
|
2136
2231
|
return s.forEach((a) => {
|
|
2137
|
-
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i),
|
|
2232
|
+
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), Do(a) && (a.addEventListener("focus", (l) => $o(l, i)), !Ko(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
2138
2233
|
}), r;
|
|
2139
2234
|
}
|
|
2140
|
-
const
|
|
2235
|
+
const Wo = [...ys, M, L], _o = (e) => Wo.find(gs(e)), un = () => ({ min: 0, max: 0 }), Ss = () => ({
|
|
2141
2236
|
x: un(),
|
|
2142
2237
|
y: un()
|
|
2143
|
-
}),
|
|
2238
|
+
}), Go = /* @__PURE__ */ new WeakMap();
|
|
2144
2239
|
function Be(e) {
|
|
2145
2240
|
return e !== null && typeof e == "object" && typeof e.start == "function";
|
|
2146
2241
|
}
|
|
2147
|
-
function
|
|
2242
|
+
function ge(e) {
|
|
2148
2243
|
return typeof e == "string" || Array.isArray(e);
|
|
2149
2244
|
}
|
|
2150
2245
|
const Ft = [
|
|
@@ -2157,12 +2252,12 @@ const Ft = [
|
|
|
2157
2252
|
"exit"
|
|
2158
2253
|
], Rt = ["initial", ...Ft];
|
|
2159
2254
|
function Le(e) {
|
|
2160
|
-
return Be(e.animate) || Rt.some((t) =>
|
|
2255
|
+
return Be(e.animate) || Rt.some((t) => ge(e[t]));
|
|
2161
2256
|
}
|
|
2162
2257
|
function xs(e) {
|
|
2163
2258
|
return !!(Le(e) || e.variants);
|
|
2164
2259
|
}
|
|
2165
|
-
function
|
|
2260
|
+
function Ho(e, t, n) {
|
|
2166
2261
|
for (const s in t) {
|
|
2167
2262
|
const i = t[s], r = n[s];
|
|
2168
2263
|
if (R(i))
|
|
@@ -2182,9 +2277,9 @@ function Ko(e, t, n) {
|
|
|
2182
2277
|
t[s] === void 0 && e.removeValue(s);
|
|
2183
2278
|
return t;
|
|
2184
2279
|
}
|
|
2185
|
-
const ft = { current: null }, As = { current: !1 },
|
|
2186
|
-
function
|
|
2187
|
-
if (As.current = !0,
|
|
2280
|
+
const ft = { current: null }, As = { current: !1 }, zo = typeof window < "u";
|
|
2281
|
+
function Uo() {
|
|
2282
|
+
if (As.current = !0, !!zo)
|
|
2188
2283
|
if (window.matchMedia) {
|
|
2189
2284
|
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => ft.current = e.matches;
|
|
2190
2285
|
e.addEventListener("change", t), t();
|
|
@@ -2200,14 +2295,14 @@ const cn = [
|
|
|
2200
2295
|
"LayoutAnimationStart",
|
|
2201
2296
|
"LayoutAnimationComplete"
|
|
2202
2297
|
];
|
|
2203
|
-
let
|
|
2298
|
+
let Ie = {};
|
|
2204
2299
|
function Ms(e) {
|
|
2205
|
-
|
|
2300
|
+
Ie = e;
|
|
2206
2301
|
}
|
|
2207
|
-
function
|
|
2208
|
-
return
|
|
2302
|
+
function Yo() {
|
|
2303
|
+
return Ie;
|
|
2209
2304
|
}
|
|
2210
|
-
class
|
|
2305
|
+
class Xo {
|
|
2211
2306
|
/**
|
|
2212
2307
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
2213
2308
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -2222,7 +2317,7 @@ class _o {
|
|
|
2222
2317
|
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = At, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2223
2318
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2224
2319
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2225
|
-
const h =
|
|
2320
|
+
const h = I.now();
|
|
2226
2321
|
this.renderScheduledAt < h && (this.renderScheduledAt = h, N.render(this.render, !1, !0));
|
|
2227
2322
|
};
|
|
2228
2323
|
const { latestValues: l, renderState: u } = a;
|
|
@@ -2238,7 +2333,7 @@ class _o {
|
|
|
2238
2333
|
if (this.hasBeenMounted)
|
|
2239
2334
|
for (const i in this.initialValues)
|
|
2240
2335
|
(n = this.values.get(i)) == null || n.jump(this.initialValues[i]), this.latestValues[i] = this.initialValues[i];
|
|
2241
|
-
this.current = t,
|
|
2336
|
+
this.current = t, Go.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((i, r) => this.bindToMotionValue(r, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (As.current || Uo(), this.shouldReduceMotion = ft.current), process.env.NODE_ENV !== "production" && In(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, (s = this.parent) == null || s.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
|
|
2242
2337
|
}
|
|
2243
2338
|
unmount() {
|
|
2244
2339
|
var t;
|
|
@@ -2258,7 +2353,7 @@ class _o {
|
|
|
2258
2353
|
this.children.delete(t), this.enteringChildren && this.enteringChildren.delete(t);
|
|
2259
2354
|
}
|
|
2260
2355
|
bindToMotionValue(t, n) {
|
|
2261
|
-
if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), n.accelerate &&
|
|
2356
|
+
if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), n.accelerate && Fo.has(t) && this.current instanceof HTMLElement) {
|
|
2262
2357
|
const { factory: o, keyframes: a, times: c, ease: l, duration: u } = n.accelerate, d = new as({
|
|
2263
2358
|
element: this.current,
|
|
2264
2359
|
name: t,
|
|
@@ -2272,7 +2367,7 @@ class _o {
|
|
|
2272
2367
|
});
|
|
2273
2368
|
return;
|
|
2274
2369
|
}
|
|
2275
|
-
const s =
|
|
2370
|
+
const s = ce.has(t);
|
|
2276
2371
|
s && this.onBindTransform && this.onBindTransform();
|
|
2277
2372
|
const i = n.on("change", (o) => {
|
|
2278
2373
|
this.latestValues[t] = o, this.props.onUpdate && N.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
@@ -2287,8 +2382,8 @@ class _o {
|
|
|
2287
2382
|
}
|
|
2288
2383
|
updateFeatures() {
|
|
2289
2384
|
let t = "animation";
|
|
2290
|
-
for (t in
|
|
2291
|
-
const n =
|
|
2385
|
+
for (t in Ie) {
|
|
2386
|
+
const n = Ie[t];
|
|
2292
2387
|
if (!n)
|
|
2293
2388
|
continue;
|
|
2294
2389
|
const { isEnabled: s, Feature: i } = n;
|
|
@@ -2307,7 +2402,7 @@ class _o {
|
|
|
2307
2402
|
* removed with a re-render to work.
|
|
2308
2403
|
*/
|
|
2309
2404
|
measureViewportBox() {
|
|
2310
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) :
|
|
2405
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Ss();
|
|
2311
2406
|
}
|
|
2312
2407
|
getStaticValue(t) {
|
|
2313
2408
|
return this.latestValues[t];
|
|
@@ -2327,7 +2422,7 @@ class _o {
|
|
|
2327
2422
|
const r = "on" + i, o = t[r];
|
|
2328
2423
|
o && (this.propEventSubscriptions[i] = this.on(i, o));
|
|
2329
2424
|
}
|
|
2330
|
-
this.prevMotionValues =
|
|
2425
|
+
this.prevMotionValues = Ho(this, this.scrapeMotionValuesFromProps(t, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2331
2426
|
}
|
|
2332
2427
|
getProps() {
|
|
2333
2428
|
return this.props;
|
|
@@ -2392,7 +2487,7 @@ class _o {
|
|
|
2392
2487
|
*/
|
|
2393
2488
|
readValue(t, n) {
|
|
2394
2489
|
let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
2395
|
-
return s != null && (typeof s == "string" && (Mn(s) || Cn(s)) ? s = parseFloat(s) : !
|
|
2490
|
+
return s != null && (typeof s == "string" && (Mn(s) || Cn(s)) ? s = parseFloat(s) : !_o(s) && L.test(n) && (s = vs(t, n)), this.setBaseTarget(t, R(s) ? s.get() : s)), R(s) ? s.get() : s;
|
|
2396
2491
|
}
|
|
2397
2492
|
/**
|
|
2398
2493
|
* Set the base target to later animate back to. This is currently
|
|
@@ -2425,12 +2520,12 @@ class _o {
|
|
|
2425
2520
|
this.events[t] && this.events[t].notify(...n);
|
|
2426
2521
|
}
|
|
2427
2522
|
scheduleRenderMicrotask() {
|
|
2428
|
-
|
|
2523
|
+
Io.render(this.render);
|
|
2429
2524
|
}
|
|
2430
2525
|
}
|
|
2431
|
-
class Cs extends
|
|
2526
|
+
class Cs extends Xo {
|
|
2432
2527
|
constructor() {
|
|
2433
|
-
super(...arguments), this.KeyframeResolver =
|
|
2528
|
+
super(...arguments), this.KeyframeResolver = Po;
|
|
2434
2529
|
}
|
|
2435
2530
|
sortInstanceNodePosition(t, n) {
|
|
2436
2531
|
return t.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
@@ -2450,20 +2545,20 @@ class Cs extends _o {
|
|
|
2450
2545
|
}));
|
|
2451
2546
|
}
|
|
2452
2547
|
}
|
|
2453
|
-
class
|
|
2548
|
+
class le {
|
|
2454
2549
|
constructor(t) {
|
|
2455
2550
|
this.isMounted = !1, this.node = t;
|
|
2456
2551
|
}
|
|
2457
2552
|
update() {
|
|
2458
2553
|
}
|
|
2459
2554
|
}
|
|
2460
|
-
function
|
|
2555
|
+
function qo({ top: e, left: t, right: n, bottom: s }) {
|
|
2461
2556
|
return {
|
|
2462
2557
|
x: { min: t, max: n },
|
|
2463
2558
|
y: { min: e, max: s }
|
|
2464
2559
|
};
|
|
2465
2560
|
}
|
|
2466
|
-
function
|
|
2561
|
+
function Zo(e, t) {
|
|
2467
2562
|
if (!t)
|
|
2468
2563
|
return e;
|
|
2469
2564
|
const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
|
|
@@ -2474,19 +2569,19 @@ function Ho(e, t) {
|
|
|
2474
2569
|
right: s.x
|
|
2475
2570
|
};
|
|
2476
2571
|
}
|
|
2477
|
-
function
|
|
2478
|
-
return
|
|
2572
|
+
function Jo(e, t) {
|
|
2573
|
+
return qo(Zo(e.getBoundingClientRect(), t));
|
|
2479
2574
|
}
|
|
2480
|
-
const
|
|
2575
|
+
const Qo = {
|
|
2481
2576
|
x: "translateX",
|
|
2482
2577
|
y: "translateY",
|
|
2483
2578
|
z: "translateZ",
|
|
2484
2579
|
transformPerspective: "perspective"
|
|
2485
|
-
},
|
|
2486
|
-
function
|
|
2580
|
+
}, ea = ue.length;
|
|
2581
|
+
function ta(e, t, n) {
|
|
2487
2582
|
let s = "", i = !0;
|
|
2488
|
-
for (let r = 0; r <
|
|
2489
|
-
const o =
|
|
2583
|
+
for (let r = 0; r < ea; r++) {
|
|
2584
|
+
const o = ue[r], a = e[o];
|
|
2490
2585
|
if (a === void 0)
|
|
2491
2586
|
continue;
|
|
2492
2587
|
let c = !0;
|
|
@@ -2497,10 +2592,10 @@ function Xo(e, t, n) {
|
|
|
2497
2592
|
c = o.startsWith("scale") ? l === 1 : l === 0;
|
|
2498
2593
|
}
|
|
2499
2594
|
if (!c || n) {
|
|
2500
|
-
const l =
|
|
2595
|
+
const l = ws(a, Pt[o]);
|
|
2501
2596
|
if (!c) {
|
|
2502
2597
|
i = !1;
|
|
2503
|
-
const u =
|
|
2598
|
+
const u = Qo[o] || o;
|
|
2504
2599
|
s += `${u}(${l}) `;
|
|
2505
2600
|
}
|
|
2506
2601
|
n && (t[o] = l);
|
|
@@ -2513,18 +2608,18 @@ function Dt(e, t, n) {
|
|
|
2513
2608
|
let o = !1, a = !1;
|
|
2514
2609
|
for (const c in t) {
|
|
2515
2610
|
const l = t[c];
|
|
2516
|
-
if (
|
|
2611
|
+
if (ce.has(c)) {
|
|
2517
2612
|
o = !0;
|
|
2518
2613
|
continue;
|
|
2519
2614
|
} else if (Gn(c)) {
|
|
2520
2615
|
i[c] = l;
|
|
2521
2616
|
continue;
|
|
2522
2617
|
} else {
|
|
2523
|
-
const u =
|
|
2618
|
+
const u = ws(l, Pt[c]);
|
|
2524
2619
|
c.startsWith("origin") ? (a = !0, r[c] = u) : s[c] = u;
|
|
2525
2620
|
}
|
|
2526
2621
|
}
|
|
2527
|
-
if (t.transform || (o || n ? s.transform =
|
|
2622
|
+
if (t.transform || (o || n ? s.transform = ta(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
2528
2623
|
const { originX: c = "50%", originY: l = "50%", originZ: u = 0 } = r;
|
|
2529
2624
|
s.transformOrigin = `${c} ${l} ${u}`;
|
|
2530
2625
|
}
|
|
@@ -2541,7 +2636,7 @@ function Ps(e, { style: t, vars: n }, s, i) {
|
|
|
2541
2636
|
function ln(e, t) {
|
|
2542
2637
|
return t.max === t.min ? 0 : e / (t.max - t.min) * 100;
|
|
2543
2638
|
}
|
|
2544
|
-
const
|
|
2639
|
+
const fe = {
|
|
2545
2640
|
correct: (e, t) => {
|
|
2546
2641
|
if (!t.target)
|
|
2547
2642
|
return e;
|
|
@@ -2553,7 +2648,7 @@ const le = {
|
|
|
2553
2648
|
const n = ln(e, t.target.x), s = ln(e, t.target.y);
|
|
2554
2649
|
return `${n}% ${s}%`;
|
|
2555
2650
|
}
|
|
2556
|
-
},
|
|
2651
|
+
}, na = {
|
|
2557
2652
|
correct: (e, { treeScale: t, projectionDelta: n }) => {
|
|
2558
2653
|
const s = e, i = L.parse(e);
|
|
2559
2654
|
if (i.length > 5)
|
|
@@ -2563,9 +2658,9 @@ const le = {
|
|
|
2563
2658
|
const l = we(a, c, 0.5);
|
|
2564
2659
|
return typeof i[2 + o] == "number" && (i[2 + o] /= l), typeof i[3 + o] == "number" && (i[3 + o] /= l), r(i);
|
|
2565
2660
|
}
|
|
2566
|
-
},
|
|
2661
|
+
}, sa = {
|
|
2567
2662
|
borderRadius: {
|
|
2568
|
-
...
|
|
2663
|
+
...fe,
|
|
2569
2664
|
applyTo: [
|
|
2570
2665
|
"borderTopLeftRadius",
|
|
2571
2666
|
"borderTopRightRadius",
|
|
@@ -2573,16 +2668,16 @@ const le = {
|
|
|
2573
2668
|
"borderBottomRightRadius"
|
|
2574
2669
|
]
|
|
2575
2670
|
},
|
|
2576
|
-
borderTopLeftRadius:
|
|
2577
|
-
borderTopRightRadius:
|
|
2578
|
-
borderBottomLeftRadius:
|
|
2579
|
-
borderBottomRightRadius:
|
|
2580
|
-
boxShadow:
|
|
2671
|
+
borderTopLeftRadius: fe,
|
|
2672
|
+
borderTopRightRadius: fe,
|
|
2673
|
+
borderBottomLeftRadius: fe,
|
|
2674
|
+
borderBottomRightRadius: fe,
|
|
2675
|
+
boxShadow: na
|
|
2581
2676
|
};
|
|
2582
2677
|
function Fs(e, { layout: t, layoutId: n }) {
|
|
2583
|
-
return
|
|
2678
|
+
return ce.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!sa[e] || e === "opacity");
|
|
2584
2679
|
}
|
|
2585
|
-
function
|
|
2680
|
+
function It(e, t, n) {
|
|
2586
2681
|
var o;
|
|
2587
2682
|
const s = e.style, i = t == null ? void 0 : t.style, r = {};
|
|
2588
2683
|
if (!s)
|
|
@@ -2591,45 +2686,45 @@ function kt(e, t, n) {
|
|
|
2591
2686
|
(R(s[a]) || i && R(i[a]) || Fs(a, e) || ((o = n == null ? void 0 : n.getValue(a)) == null ? void 0 : o.liveStyle) !== void 0) && (r[a] = s[a]);
|
|
2592
2687
|
return r;
|
|
2593
2688
|
}
|
|
2594
|
-
function
|
|
2689
|
+
function ia(e) {
|
|
2595
2690
|
return window.getComputedStyle(e);
|
|
2596
2691
|
}
|
|
2597
|
-
class
|
|
2692
|
+
class ra extends Cs {
|
|
2598
2693
|
constructor() {
|
|
2599
2694
|
super(...arguments), this.type = "html", this.renderInstance = Ps;
|
|
2600
2695
|
}
|
|
2601
2696
|
readValueFromInstance(t, n) {
|
|
2602
2697
|
var s;
|
|
2603
|
-
if (
|
|
2604
|
-
return (s = this.projection) != null && s.isProjecting ? tt(n) :
|
|
2698
|
+
if (ce.has(n))
|
|
2699
|
+
return (s = this.projection) != null && s.isProjecting ? tt(n) : Ar(t, n);
|
|
2605
2700
|
{
|
|
2606
|
-
const i =
|
|
2701
|
+
const i = ia(t), r = (Gn(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
2607
2702
|
return typeof r == "string" ? r.trim() : r;
|
|
2608
2703
|
}
|
|
2609
2704
|
}
|
|
2610
2705
|
measureInstanceViewportBox(t, { transformPagePoint: n }) {
|
|
2611
|
-
return
|
|
2706
|
+
return Jo(t, n);
|
|
2612
2707
|
}
|
|
2613
2708
|
build(t, n, s) {
|
|
2614
2709
|
Dt(t, n, s.transformTemplate);
|
|
2615
2710
|
}
|
|
2616
2711
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
2617
|
-
return
|
|
2712
|
+
return It(t, n, s);
|
|
2618
2713
|
}
|
|
2619
2714
|
}
|
|
2620
|
-
const
|
|
2715
|
+
const oa = {
|
|
2621
2716
|
offset: "stroke-dashoffset",
|
|
2622
2717
|
array: "stroke-dasharray"
|
|
2623
|
-
},
|
|
2718
|
+
}, aa = {
|
|
2624
2719
|
offset: "strokeDashoffset",
|
|
2625
2720
|
array: "strokeDasharray"
|
|
2626
2721
|
};
|
|
2627
|
-
function
|
|
2722
|
+
function ua(e, t, n = 1, s = 0, i = !0) {
|
|
2628
2723
|
e.pathLength = 1;
|
|
2629
|
-
const r = i ?
|
|
2724
|
+
const r = i ? oa : aa;
|
|
2630
2725
|
e[r.offset] = `${-s}`, e[r.array] = `${t} ${n}`;
|
|
2631
2726
|
}
|
|
2632
|
-
const
|
|
2727
|
+
const ca = [
|
|
2633
2728
|
"offsetDistance",
|
|
2634
2729
|
"offsetPath",
|
|
2635
2730
|
"offsetRotate",
|
|
@@ -2652,9 +2747,9 @@ function Rs(e, {
|
|
|
2652
2747
|
e.attrs = e.style, e.style = {};
|
|
2653
2748
|
const { attrs: d, style: f } = e;
|
|
2654
2749
|
d.transform && (f.transform = d.transform, delete d.transform), (f.transform || d.transformOrigin) && (f.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), f.transform && (f.transformBox = (u == null ? void 0 : u.transformBox) ?? "fill-box", delete d.transformBox);
|
|
2655
|
-
for (const h of
|
|
2750
|
+
for (const h of ca)
|
|
2656
2751
|
d[h] !== void 0 && (f[h] = d[h], delete d[h]);
|
|
2657
|
-
t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), i !== void 0 &&
|
|
2752
|
+
t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), i !== void 0 && ua(d, i, r, o, !1);
|
|
2658
2753
|
}
|
|
2659
2754
|
const Ds = /* @__PURE__ */ new Set([
|
|
2660
2755
|
"baseFrequency",
|
|
@@ -2680,49 +2775,49 @@ const Ds = /* @__PURE__ */ new Set([
|
|
|
2680
2775
|
"startOffset",
|
|
2681
2776
|
"textLength",
|
|
2682
2777
|
"lengthAdjust"
|
|
2683
|
-
]),
|
|
2684
|
-
function
|
|
2778
|
+
]), Is = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
2779
|
+
function la(e, t, n, s) {
|
|
2685
2780
|
Ps(e, t, void 0, s);
|
|
2686
2781
|
for (const i in t.attrs)
|
|
2687
2782
|
e.setAttribute(Ds.has(i) ? i : Ct(i), t.attrs[i]);
|
|
2688
2783
|
}
|
|
2689
|
-
function
|
|
2690
|
-
const s =
|
|
2784
|
+
function ks(e, t, n) {
|
|
2785
|
+
const s = It(e, t, n);
|
|
2691
2786
|
for (const i in e)
|
|
2692
2787
|
if (R(e[i]) || R(t[i])) {
|
|
2693
|
-
const r =
|
|
2788
|
+
const r = ue.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
2694
2789
|
s[r] = e[i];
|
|
2695
2790
|
}
|
|
2696
2791
|
return s;
|
|
2697
2792
|
}
|
|
2698
|
-
class
|
|
2793
|
+
class fa extends Cs {
|
|
2699
2794
|
constructor() {
|
|
2700
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox =
|
|
2795
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Ss;
|
|
2701
2796
|
}
|
|
2702
2797
|
getBaseTargetFromProps(t, n) {
|
|
2703
2798
|
return t[n];
|
|
2704
2799
|
}
|
|
2705
2800
|
readValueFromInstance(t, n) {
|
|
2706
|
-
if (
|
|
2801
|
+
if (ce.has(n)) {
|
|
2707
2802
|
const s = bs(n);
|
|
2708
2803
|
return s && s.default || 0;
|
|
2709
2804
|
}
|
|
2710
2805
|
return n = Ds.has(n) ? n : Ct(n), t.getAttribute(n);
|
|
2711
2806
|
}
|
|
2712
2807
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
2713
|
-
return
|
|
2808
|
+
return ks(t, n, s);
|
|
2714
2809
|
}
|
|
2715
2810
|
build(t, n, s) {
|
|
2716
2811
|
Rs(t, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
2717
2812
|
}
|
|
2718
2813
|
renderInstance(t, n, s, i) {
|
|
2719
|
-
|
|
2814
|
+
la(t, n, s, i);
|
|
2720
2815
|
}
|
|
2721
2816
|
mount(t) {
|
|
2722
|
-
this.isSVGTag =
|
|
2817
|
+
this.isSVGTag = Is(t.tagName), super.mount(t);
|
|
2723
2818
|
}
|
|
2724
2819
|
}
|
|
2725
|
-
const
|
|
2820
|
+
const da = Rt.length;
|
|
2726
2821
|
function Os(e) {
|
|
2727
2822
|
if (!e)
|
|
2728
2823
|
return;
|
|
@@ -2731,9 +2826,9 @@ function Os(e) {
|
|
|
2731
2826
|
return e.props.initial !== void 0 && (n.initial = e.props.initial), n;
|
|
2732
2827
|
}
|
|
2733
2828
|
const t = {};
|
|
2734
|
-
for (let n = 0; n <
|
|
2829
|
+
for (let n = 0; n < da; n++) {
|
|
2735
2830
|
const s = Rt[n], i = e.props[s];
|
|
2736
|
-
(
|
|
2831
|
+
(ge(i) || i === !1) && (t[s] = i);
|
|
2737
2832
|
}
|
|
2738
2833
|
return t;
|
|
2739
2834
|
}
|
|
@@ -2748,18 +2843,18 @@ function Es(e, t) {
|
|
|
2748
2843
|
return !1;
|
|
2749
2844
|
return !0;
|
|
2750
2845
|
}
|
|
2751
|
-
const
|
|
2752
|
-
function
|
|
2753
|
-
return (t) => Promise.all(t.map(({ animation: n, options: s }) =>
|
|
2846
|
+
const ha = [...Ft].reverse(), pa = Ft.length;
|
|
2847
|
+
function ma(e) {
|
|
2848
|
+
return (t) => Promise.all(t.map(({ animation: n, options: s }) => yo(e, n, s)));
|
|
2754
2849
|
}
|
|
2755
|
-
function
|
|
2756
|
-
let t =
|
|
2850
|
+
function ga(e) {
|
|
2851
|
+
let t = ma(e), n = fn(), s = !0;
|
|
2757
2852
|
const i = (c) => (l, u) => {
|
|
2758
2853
|
var f;
|
|
2759
2854
|
const d = se(e, u, c === "exit" ? (f = e.presenceContext) == null ? void 0 : f.custom : void 0);
|
|
2760
2855
|
if (d) {
|
|
2761
|
-
const { transition: h, transitionEnd: p, ...
|
|
2762
|
-
l = { ...l, ...
|
|
2856
|
+
const { transition: h, transitionEnd: p, ...y } = d;
|
|
2857
|
+
l = { ...l, ...y, ...p };
|
|
2763
2858
|
}
|
|
2764
2859
|
return l;
|
|
2765
2860
|
};
|
|
@@ -2769,53 +2864,53 @@ function la(e) {
|
|
|
2769
2864
|
function o(c) {
|
|
2770
2865
|
const { props: l } = e, u = Os(e.parent) || {}, d = [], f = /* @__PURE__ */ new Set();
|
|
2771
2866
|
let h = {}, p = 1 / 0;
|
|
2772
|
-
for (let
|
|
2773
|
-
const g =
|
|
2774
|
-
|
|
2775
|
-
let x =
|
|
2776
|
-
if (x && s && e.manuallyAnimateOnMount && (x = !1),
|
|
2777
|
-
!
|
|
2778
|
-
!
|
|
2779
|
-
Be(
|
|
2867
|
+
for (let b = 0; b < pa; b++) {
|
|
2868
|
+
const g = ha[b], T = n[g], v = l[g] !== void 0 ? l[g] : u[g], S = ge(v), w = g === c ? T.isActive : null;
|
|
2869
|
+
w === !1 && (p = b);
|
|
2870
|
+
let x = v === u[g] && v !== l[g] && S;
|
|
2871
|
+
if (x && s && e.manuallyAnimateOnMount && (x = !1), T.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
|
|
2872
|
+
!T.isActive && w === null || // If we didn't and don't have any defined prop for this animation type
|
|
2873
|
+
!v && !T.prevProp || // Or if the prop doesn't define an animation
|
|
2874
|
+
Be(v) || typeof v == "boolean")
|
|
2780
2875
|
continue;
|
|
2781
|
-
if (g === "exit" &&
|
|
2782
|
-
|
|
2876
|
+
if (g === "exit" && T.isActive && w !== !0) {
|
|
2877
|
+
T.prevResolvedValues && (h = {
|
|
2783
2878
|
...h,
|
|
2784
|
-
...
|
|
2879
|
+
...T.prevResolvedValues
|
|
2785
2880
|
});
|
|
2786
2881
|
continue;
|
|
2787
2882
|
}
|
|
2788
|
-
const C =
|
|
2789
|
-
let
|
|
2790
|
-
g === c &&
|
|
2791
|
-
|
|
2792
|
-
const
|
|
2793
|
-
let J =
|
|
2794
|
-
|
|
2795
|
-
const { prevResolvedValues: Bt = {} } =
|
|
2883
|
+
const C = ya(T.prevProp, v);
|
|
2884
|
+
let V = C || // If we're making this variant active, we want to always make it active
|
|
2885
|
+
g === c && T.isActive && !x && S || // If we removed a higher-priority variant (i is in reverse order)
|
|
2886
|
+
b > p && S, D = !1;
|
|
2887
|
+
const k = Array.isArray(v) ? v : [v];
|
|
2888
|
+
let J = k.reduce(i(g), {});
|
|
2889
|
+
w === !1 && (J = {});
|
|
2890
|
+
const { prevResolvedValues: Bt = {} } = T, Js = {
|
|
2796
2891
|
...Bt,
|
|
2797
2892
|
...J
|
|
2798
2893
|
}, Lt = (P) => {
|
|
2799
|
-
|
|
2894
|
+
V = !0, f.has(P) && (D = !0, f.delete(P)), T.needsAnimating[P] = !0;
|
|
2800
2895
|
const O = e.getValue(P);
|
|
2801
2896
|
O && (O.liveStyle = !1);
|
|
2802
2897
|
};
|
|
2803
|
-
for (const P in
|
|
2804
|
-
const O = J[P],
|
|
2898
|
+
for (const P in Js) {
|
|
2899
|
+
const O = J[P], z = Bt[P];
|
|
2805
2900
|
if (h.hasOwnProperty(P))
|
|
2806
2901
|
continue;
|
|
2807
2902
|
let Q = !1;
|
|
2808
|
-
at(O) && at(
|
|
2903
|
+
at(O) && at(z) ? Q = !Es(O, z) : Q = O !== z, Q ? O != null ? Lt(P) : f.add(P) : O !== void 0 && f.has(P) ? Lt(P) : T.protectedKeys[P] = !0;
|
|
2809
2904
|
}
|
|
2810
|
-
|
|
2905
|
+
T.prevProp = v, T.prevResolvedValues = J, T.isActive && (h = { ...h, ...J }), s && e.blockInitialAnimation && (V = !1);
|
|
2811
2906
|
const Nt = x && C;
|
|
2812
|
-
|
|
2907
|
+
V && (!Nt || D) && d.push(...k.map((P) => {
|
|
2813
2908
|
const O = { type: g };
|
|
2814
2909
|
if (typeof P == "string" && s && !Nt && e.manuallyAnimateOnMount && e.parent) {
|
|
2815
|
-
const { parent:
|
|
2816
|
-
if (
|
|
2817
|
-
const { delayChildren:
|
|
2818
|
-
O.delay = cs(
|
|
2910
|
+
const { parent: z } = e, Q = se(z, P);
|
|
2911
|
+
if (z.enteringChildren && Q) {
|
|
2912
|
+
const { delayChildren: Qs } = Q.transition || {};
|
|
2913
|
+
O.delay = cs(z.enteringChildren, e, Qs);
|
|
2819
2914
|
}
|
|
2820
2915
|
}
|
|
2821
2916
|
return {
|
|
@@ -2825,18 +2920,18 @@ function la(e) {
|
|
|
2825
2920
|
}));
|
|
2826
2921
|
}
|
|
2827
2922
|
if (f.size) {
|
|
2828
|
-
const
|
|
2923
|
+
const b = {};
|
|
2829
2924
|
if (typeof l.initial != "boolean") {
|
|
2830
2925
|
const g = se(e, Array.isArray(l.initial) ? l.initial[0] : l.initial);
|
|
2831
|
-
g && g.transition && (
|
|
2926
|
+
g && g.transition && (b.transition = g.transition);
|
|
2832
2927
|
}
|
|
2833
2928
|
f.forEach((g) => {
|
|
2834
|
-
const
|
|
2835
|
-
|
|
2836
|
-
}), d.push({ animation:
|
|
2929
|
+
const T = e.getBaseTarget(g), v = e.getValue(g);
|
|
2930
|
+
v && (v.liveStyle = !0), b[g] = T ?? null;
|
|
2931
|
+
}), d.push({ animation: b });
|
|
2837
2932
|
}
|
|
2838
|
-
let
|
|
2839
|
-
return s && (l.initial === !1 || l.initial === l.animate) && !e.manuallyAnimateOnMount && (
|
|
2933
|
+
let y = !!d.length;
|
|
2934
|
+
return s && (l.initial === !1 || l.initial === l.animate) && !e.manuallyAnimateOnMount && (y = !1), s = !1, y ? t(d) : Promise.resolve();
|
|
2840
2935
|
}
|
|
2841
2936
|
function a(c, l) {
|
|
2842
2937
|
var d;
|
|
@@ -2861,10 +2956,10 @@ function la(e) {
|
|
|
2861
2956
|
}
|
|
2862
2957
|
};
|
|
2863
2958
|
}
|
|
2864
|
-
function
|
|
2959
|
+
function ya(e, t) {
|
|
2865
2960
|
return typeof t == "string" ? t !== e : Array.isArray(t) ? !Es(t, e) : !1;
|
|
2866
2961
|
}
|
|
2867
|
-
function
|
|
2962
|
+
function U(e = !1) {
|
|
2868
2963
|
return {
|
|
2869
2964
|
isActive: e,
|
|
2870
2965
|
protectedKeys: {},
|
|
@@ -2874,26 +2969,26 @@ function z(e = !1) {
|
|
|
2874
2969
|
}
|
|
2875
2970
|
function fn() {
|
|
2876
2971
|
return {
|
|
2877
|
-
animate:
|
|
2878
|
-
whileInView:
|
|
2879
|
-
whileHover:
|
|
2880
|
-
whileTap:
|
|
2881
|
-
whileDrag:
|
|
2882
|
-
whileFocus:
|
|
2883
|
-
exit:
|
|
2972
|
+
animate: U(!0),
|
|
2973
|
+
whileInView: U(),
|
|
2974
|
+
whileHover: U(),
|
|
2975
|
+
whileTap: U(),
|
|
2976
|
+
whileDrag: U(),
|
|
2977
|
+
whileFocus: U(),
|
|
2978
|
+
exit: U()
|
|
2884
2979
|
};
|
|
2885
2980
|
}
|
|
2886
2981
|
function dn(e, t, n, s = { passive: !0 }) {
|
|
2887
2982
|
return e.addEventListener(t, n, s), () => e.removeEventListener(t, n);
|
|
2888
2983
|
}
|
|
2889
|
-
function
|
|
2984
|
+
function ba(e) {
|
|
2890
2985
|
return R(e) ? e.get() : e;
|
|
2891
2986
|
}
|
|
2892
|
-
const Bs =
|
|
2987
|
+
const Bs = re({
|
|
2893
2988
|
transformPagePoint: (e) => e,
|
|
2894
2989
|
isStatic: !1,
|
|
2895
2990
|
reducedMotion: "never"
|
|
2896
|
-
}),
|
|
2991
|
+
}), kt = re({ strict: !1 }), hn = {
|
|
2897
2992
|
animation: [
|
|
2898
2993
|
"animate",
|
|
2899
2994
|
"variants",
|
|
@@ -2914,7 +3009,7 @@ const Bs = ie({
|
|
|
2914
3009
|
layout: ["layout", "layoutId"]
|
|
2915
3010
|
};
|
|
2916
3011
|
let pn = !1;
|
|
2917
|
-
function
|
|
3012
|
+
function va() {
|
|
2918
3013
|
if (pn)
|
|
2919
3014
|
return;
|
|
2920
3015
|
const e = {};
|
|
@@ -2925,7 +3020,7 @@ function ha() {
|
|
|
2925
3020
|
Ms(e), pn = !0;
|
|
2926
3021
|
}
|
|
2927
3022
|
function Ls() {
|
|
2928
|
-
return
|
|
3023
|
+
return va(), Yo();
|
|
2929
3024
|
}
|
|
2930
3025
|
function mn(e) {
|
|
2931
3026
|
const t = Ls();
|
|
@@ -2936,8 +3031,8 @@ function mn(e) {
|
|
|
2936
3031
|
};
|
|
2937
3032
|
Ms(t);
|
|
2938
3033
|
}
|
|
2939
|
-
function
|
|
2940
|
-
const [, s] =
|
|
3034
|
+
function wa({ children: e, features: t, strict: n = !1 }) {
|
|
3035
|
+
const [, s] = si(!He(t)), i = W(void 0);
|
|
2941
3036
|
if (!He(t)) {
|
|
2942
3037
|
const { renderer: r, ...o } = t;
|
|
2943
3038
|
i.current = r, mn(o);
|
|
@@ -2946,12 +3041,12 @@ function pa({ children: e, features: t, strict: n = !1 }) {
|
|
|
2946
3041
|
He(t) && t().then(({ renderer: r, ...o }) => {
|
|
2947
3042
|
mn(o), i.current = r, s(!0);
|
|
2948
3043
|
});
|
|
2949
|
-
}, []), F(
|
|
3044
|
+
}, []), F(kt.Provider, { value: { renderer: i.current, strict: n }, children: e });
|
|
2950
3045
|
}
|
|
2951
3046
|
function He(e) {
|
|
2952
3047
|
return typeof e == "function";
|
|
2953
3048
|
}
|
|
2954
|
-
const
|
|
3049
|
+
const Ta = /* @__PURE__ */ new Set([
|
|
2955
3050
|
"animate",
|
|
2956
3051
|
"exit",
|
|
2957
3052
|
"variants",
|
|
@@ -2984,37 +3079,37 @@ const ma = /* @__PURE__ */ new Set([
|
|
|
2984
3079
|
"ignoreStrict",
|
|
2985
3080
|
"viewport"
|
|
2986
3081
|
]);
|
|
2987
|
-
function
|
|
2988
|
-
return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") ||
|
|
3082
|
+
function ke(e) {
|
|
3083
|
+
return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || Ta.has(e);
|
|
2989
3084
|
}
|
|
2990
|
-
let Ns = (e) => !
|
|
2991
|
-
function
|
|
2992
|
-
typeof e == "function" && (Ns = (t) => t.startsWith("on") ? !
|
|
3085
|
+
let Ns = (e) => !ke(e);
|
|
3086
|
+
function Va(e) {
|
|
3087
|
+
typeof e == "function" && (Ns = (t) => t.startsWith("on") ? !ke(t) : e(t));
|
|
2993
3088
|
}
|
|
2994
3089
|
try {
|
|
2995
|
-
|
|
3090
|
+
Va(require("@emotion/is-prop-valid").default);
|
|
2996
3091
|
} catch {
|
|
2997
3092
|
}
|
|
2998
|
-
function
|
|
3093
|
+
function Sa(e, t, n) {
|
|
2999
3094
|
const s = {};
|
|
3000
3095
|
for (const i in e)
|
|
3001
|
-
i === "values" && typeof e.values == "object" || (Ns(i) || n === !0 &&
|
|
3096
|
+
i === "values" && typeof e.values == "object" || (Ns(i) || n === !0 && ke(i) || !t && !ke(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
3002
3097
|
e.draggable && i.startsWith("onDrag")) && (s[i] = e[i]);
|
|
3003
3098
|
return s;
|
|
3004
3099
|
}
|
|
3005
|
-
const Ne = /* @__PURE__ */
|
|
3006
|
-
function
|
|
3100
|
+
const Ne = /* @__PURE__ */ re({});
|
|
3101
|
+
function xa(e, t) {
|
|
3007
3102
|
if (Le(e)) {
|
|
3008
3103
|
const { initial: n, animate: s } = e;
|
|
3009
3104
|
return {
|
|
3010
|
-
initial: n === !1 ||
|
|
3011
|
-
animate:
|
|
3105
|
+
initial: n === !1 || ge(n) ? n : void 0,
|
|
3106
|
+
animate: ge(s) ? s : void 0
|
|
3012
3107
|
};
|
|
3013
3108
|
}
|
|
3014
3109
|
return e.inherit !== !1 ? t : {};
|
|
3015
3110
|
}
|
|
3016
|
-
function
|
|
3017
|
-
const { initial: t, animate: n } =
|
|
3111
|
+
function Aa(e) {
|
|
3112
|
+
const { initial: t, animate: n } = xa(e, E(Ne));
|
|
3018
3113
|
return Oe(() => ({ initial: t, animate: n }), [gn(t), gn(n)]);
|
|
3019
3114
|
}
|
|
3020
3115
|
function gn(e) {
|
|
@@ -3030,28 +3125,28 @@ function Ks(e, t, n) {
|
|
|
3030
3125
|
for (const s in t)
|
|
3031
3126
|
!R(t[s]) && !Fs(s, n) && (e[s] = t[s]);
|
|
3032
3127
|
}
|
|
3033
|
-
function
|
|
3128
|
+
function Ma({ transformTemplate: e }, t) {
|
|
3034
3129
|
return Oe(() => {
|
|
3035
3130
|
const n = Ot();
|
|
3036
3131
|
return Dt(n, t, e), Object.assign({}, n.vars, n.style);
|
|
3037
3132
|
}, [t]);
|
|
3038
3133
|
}
|
|
3039
|
-
function
|
|
3134
|
+
function Ca(e, t) {
|
|
3040
3135
|
const n = e.style || {}, s = {};
|
|
3041
|
-
return Ks(s, n, e), Object.assign(s,
|
|
3136
|
+
return Ks(s, n, e), Object.assign(s, Ma(e, t)), s;
|
|
3042
3137
|
}
|
|
3043
|
-
function
|
|
3044
|
-
const n = {}, s =
|
|
3138
|
+
function Pa(e, t) {
|
|
3139
|
+
const n = {}, s = Ca(e, t);
|
|
3045
3140
|
return e.drag && e.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = s, n;
|
|
3046
3141
|
}
|
|
3047
3142
|
const $s = () => ({
|
|
3048
3143
|
...Ot(),
|
|
3049
3144
|
attrs: {}
|
|
3050
3145
|
});
|
|
3051
|
-
function
|
|
3146
|
+
function Fa(e, t, n, s) {
|
|
3052
3147
|
const i = Oe(() => {
|
|
3053
3148
|
const r = $s();
|
|
3054
|
-
return Rs(r, t,
|
|
3149
|
+
return Rs(r, t, Is(s), e.transformTemplate, e.style), {
|
|
3055
3150
|
...r.attrs,
|
|
3056
3151
|
style: { ...r.style }
|
|
3057
3152
|
};
|
|
@@ -3062,7 +3157,7 @@ function Va(e, t, n, s) {
|
|
|
3062
3157
|
}
|
|
3063
3158
|
return i;
|
|
3064
3159
|
}
|
|
3065
|
-
const
|
|
3160
|
+
const Ra = [
|
|
3066
3161
|
"animate",
|
|
3067
3162
|
"circle",
|
|
3068
3163
|
"defs",
|
|
@@ -3102,30 +3197,30 @@ function Et(e) {
|
|
|
3102
3197
|
/**
|
|
3103
3198
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
3104
3199
|
*/
|
|
3105
|
-
!!(
|
|
3200
|
+
!!(Ra.indexOf(e) > -1 || /**
|
|
3106
3201
|
* If it contains a capital letter, it's an SVG component
|
|
3107
3202
|
*/
|
|
3108
3203
|
/[A-Z]/u.test(e))
|
|
3109
3204
|
)
|
|
3110
3205
|
);
|
|
3111
3206
|
}
|
|
3112
|
-
function
|
|
3113
|
-
const c = (o ?? Et(e) ?
|
|
3114
|
-
return
|
|
3207
|
+
function Da(e, t, n, { latestValues: s }, i, r = !1, o) {
|
|
3208
|
+
const c = (o ?? Et(e) ? Fa : Pa)(t, s, i, e), l = Sa(t, typeof e == "string", r), u = e !== Tn ? { ...l, ...c, ref: n } : {}, { children: d } = t, f = Oe(() => R(d) ? d.get() : d, [d]);
|
|
3209
|
+
return ii(e, {
|
|
3115
3210
|
...u,
|
|
3116
3211
|
children: f
|
|
3117
3212
|
});
|
|
3118
3213
|
}
|
|
3119
|
-
function
|
|
3214
|
+
function Ia({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, i) {
|
|
3120
3215
|
return {
|
|
3121
|
-
latestValues:
|
|
3216
|
+
latestValues: ka(n, s, i, e),
|
|
3122
3217
|
renderState: t()
|
|
3123
3218
|
};
|
|
3124
3219
|
}
|
|
3125
|
-
function
|
|
3220
|
+
function ka(e, t, n, s) {
|
|
3126
3221
|
const i = {}, r = s(e, {});
|
|
3127
3222
|
for (const f in r)
|
|
3128
|
-
i[f] =
|
|
3223
|
+
i[f] = ba(r[f]);
|
|
3129
3224
|
let { initial: o, animate: a } = e;
|
|
3130
3225
|
const c = Le(e), l = xs(e);
|
|
3131
3226
|
t && l && !c && e.inherit !== !1 && (o === void 0 && (o = t.initial), a === void 0 && (a = t.animate));
|
|
@@ -3137,39 +3232,39 @@ function Ca(e, t, n, s) {
|
|
|
3137
3232
|
for (let h = 0; h < f.length; h++) {
|
|
3138
3233
|
const p = Mt(e, f[h]);
|
|
3139
3234
|
if (p) {
|
|
3140
|
-
const { transitionEnd:
|
|
3141
|
-
for (const
|
|
3142
|
-
let
|
|
3143
|
-
if (Array.isArray(
|
|
3144
|
-
const
|
|
3145
|
-
|
|
3235
|
+
const { transitionEnd: y, transition: b, ...g } = p;
|
|
3236
|
+
for (const T in g) {
|
|
3237
|
+
let v = g[T];
|
|
3238
|
+
if (Array.isArray(v)) {
|
|
3239
|
+
const S = u ? v.length - 1 : 0;
|
|
3240
|
+
v = v[S];
|
|
3146
3241
|
}
|
|
3147
|
-
|
|
3242
|
+
v !== null && (i[T] = v);
|
|
3148
3243
|
}
|
|
3149
|
-
for (const
|
|
3150
|
-
i[
|
|
3244
|
+
for (const T in y)
|
|
3245
|
+
i[T] = y[T];
|
|
3151
3246
|
}
|
|
3152
3247
|
}
|
|
3153
3248
|
}
|
|
3154
3249
|
return i;
|
|
3155
3250
|
}
|
|
3156
|
-
const
|
|
3157
|
-
const s = E(Ne), i = E(An), r = () =>
|
|
3158
|
-
return n ? r() :
|
|
3159
|
-
},
|
|
3160
|
-
scrapeMotionValuesFromProps:
|
|
3251
|
+
const js = (e) => (t, n) => {
|
|
3252
|
+
const s = E(Ne), i = E(An), r = () => Ia(e, t, s, i);
|
|
3253
|
+
return n ? r() : bi(r);
|
|
3254
|
+
}, Oa = /* @__PURE__ */ js({
|
|
3255
|
+
scrapeMotionValuesFromProps: It,
|
|
3161
3256
|
createRenderState: Ot
|
|
3162
|
-
}),
|
|
3163
|
-
scrapeMotionValuesFromProps:
|
|
3257
|
+
}), Ea = /* @__PURE__ */ js({
|
|
3258
|
+
scrapeMotionValuesFromProps: ks,
|
|
3164
3259
|
createRenderState: $s
|
|
3165
|
-
}),
|
|
3166
|
-
function
|
|
3167
|
-
const s =
|
|
3260
|
+
}), Ba = Symbol.for("motionComponentSymbol");
|
|
3261
|
+
function La(e, t, n) {
|
|
3262
|
+
const s = W(n);
|
|
3168
3263
|
Vn(() => {
|
|
3169
3264
|
s.current = n;
|
|
3170
3265
|
});
|
|
3171
|
-
const i =
|
|
3172
|
-
return
|
|
3266
|
+
const i = W(null);
|
|
3267
|
+
return ri((r) => {
|
|
3173
3268
|
var a;
|
|
3174
3269
|
r && ((a = e.onMount) == null || a.call(e, r)), t && (r ? t.mount(r) : t.unmount());
|
|
3175
3270
|
const o = s.current;
|
|
@@ -3181,13 +3276,13 @@ function Da(e, t, n) {
|
|
|
3181
3276
|
else o && (o.current = r);
|
|
3182
3277
|
}, [t]);
|
|
3183
3278
|
}
|
|
3184
|
-
const
|
|
3185
|
-
function
|
|
3279
|
+
const Na = re({});
|
|
3280
|
+
function Ka(e) {
|
|
3186
3281
|
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
|
|
3187
3282
|
}
|
|
3188
|
-
function
|
|
3189
|
-
var
|
|
3190
|
-
const { visualElement: o } = E(Ne), a = E(
|
|
3283
|
+
function $a(e, t, n, s, i, r) {
|
|
3284
|
+
var v, S;
|
|
3285
|
+
const { visualElement: o } = E(Ne), a = E(kt), c = E(An), l = E(Bs), u = l.reducedMotion, d = l.skipAnimations, f = W(null), h = W(!1);
|
|
3191
3286
|
s = s || a.renderer, !f.current && s && (f.current = s(e, {
|
|
3192
3287
|
visualState: t,
|
|
3193
3288
|
parent: o,
|
|
@@ -3198,28 +3293,28 @@ function Oa(e, t, n, s, i, r) {
|
|
|
3198
3293
|
skipAnimations: d,
|
|
3199
3294
|
isSVG: r
|
|
3200
3295
|
}), h.current && f.current && (f.current.manuallyAnimateOnMount = !0));
|
|
3201
|
-
const p = f.current,
|
|
3202
|
-
p && !p.projection && i && (p.type === "html" || p.type === "svg") &&
|
|
3203
|
-
const
|
|
3296
|
+
const p = f.current, y = E(Na);
|
|
3297
|
+
p && !p.projection && i && (p.type === "html" || p.type === "svg") && ja(f.current, n, i, y);
|
|
3298
|
+
const b = W(!1);
|
|
3204
3299
|
Vn(() => {
|
|
3205
|
-
p &&
|
|
3300
|
+
p && b.current && p.update(n, c);
|
|
3206
3301
|
});
|
|
3207
|
-
const g = n[ps],
|
|
3208
|
-
return
|
|
3209
|
-
h.current = !0, p && (
|
|
3302
|
+
const g = n[ps], T = W(!!g && !((v = window.MotionHandoffIsComplete) != null && v.call(window, g)) && ((S = window.MotionHasOptimisedAnimation) == null ? void 0 : S.call(window, g)));
|
|
3303
|
+
return vi(() => {
|
|
3304
|
+
h.current = !0, p && (b.current = !0, window.MotionIsMounted = !0, p.updateFeatures(), p.scheduleRenderMicrotask(), T.current && p.animationState && p.animationState.animateChanges());
|
|
3210
3305
|
}), pt(() => {
|
|
3211
|
-
p && (!
|
|
3212
|
-
var
|
|
3213
|
-
(
|
|
3214
|
-
}),
|
|
3306
|
+
p && (!T.current && p.animationState && p.animationState.animateChanges(), T.current && (queueMicrotask(() => {
|
|
3307
|
+
var w;
|
|
3308
|
+
(w = window.MotionHandoffMarkAsComplete) == null || w.call(window, g);
|
|
3309
|
+
}), T.current = !1), p.enteringChildren = void 0);
|
|
3215
3310
|
}), p;
|
|
3216
3311
|
}
|
|
3217
|
-
function
|
|
3312
|
+
function ja(e, t, n, s) {
|
|
3218
3313
|
const { layoutId: i, layout: r, drag: o, dragConstraints: a, layoutScroll: c, layoutRoot: l, layoutCrossfade: u } = t;
|
|
3219
|
-
e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 :
|
|
3314
|
+
e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : Ws(e.parent)), e.projection.setOptions({
|
|
3220
3315
|
layoutId: i,
|
|
3221
3316
|
layout: r,
|
|
3222
|
-
alwaysMeasureLayout: !!o || a &&
|
|
3317
|
+
alwaysMeasureLayout: !!o || a && Ka(a),
|
|
3223
3318
|
visualElement: e,
|
|
3224
3319
|
/**
|
|
3225
3320
|
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
@@ -3235,38 +3330,38 @@ function Ea(e, t, n, s) {
|
|
|
3235
3330
|
layoutRoot: l
|
|
3236
3331
|
});
|
|
3237
3332
|
}
|
|
3238
|
-
function
|
|
3333
|
+
function Ws(e) {
|
|
3239
3334
|
if (e)
|
|
3240
|
-
return e.options.allowProjection !== !1 ? e.projection :
|
|
3335
|
+
return e.options.allowProjection !== !1 ? e.projection : Ws(e.parent);
|
|
3241
3336
|
}
|
|
3242
|
-
function
|
|
3243
|
-
const r = n ? n === "svg" : Et(e), o = r ?
|
|
3337
|
+
function Wa(e, { forwardMotionProps: t = !1, type: n } = {}, s, i) {
|
|
3338
|
+
const r = n ? n === "svg" : Et(e), o = r ? Ea : Oa;
|
|
3244
3339
|
function a(l, u) {
|
|
3245
3340
|
let d;
|
|
3246
3341
|
const f = {
|
|
3247
3342
|
...E(Bs),
|
|
3248
3343
|
...l,
|
|
3249
|
-
layoutId:
|
|
3250
|
-
}, { isStatic: h } = f, p =
|
|
3344
|
+
layoutId: _a(l)
|
|
3345
|
+
}, { isStatic: h } = f, p = Aa(l), y = o(l, h);
|
|
3251
3346
|
if (!h && xn) {
|
|
3252
|
-
|
|
3253
|
-
const
|
|
3254
|
-
d =
|
|
3347
|
+
Ga(f, s);
|
|
3348
|
+
const b = Ha(f);
|
|
3349
|
+
d = b.MeasureLayout, p.visualElement = $a(e, y, f, i, b.ProjectionNode, r);
|
|
3255
3350
|
}
|
|
3256
|
-
return ht(Ne.Provider, { value: p, children: [d && p.visualElement ? F(d, { visualElement: p.visualElement, ...f }) : null,
|
|
3351
|
+
return ht(Ne.Provider, { value: p, children: [d && p.visualElement ? F(d, { visualElement: p.visualElement, ...f }) : null, Da(e, l, La(y, p.visualElement, u), y, h, t, r)] });
|
|
3257
3352
|
}
|
|
3258
3353
|
a.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
|
|
3259
|
-
const c =
|
|
3260
|
-
return c[
|
|
3354
|
+
const c = oi(a);
|
|
3355
|
+
return c[Ba] = e, c;
|
|
3261
3356
|
}
|
|
3262
|
-
function
|
|
3263
|
-
const t = E(
|
|
3357
|
+
function _a({ layoutId: e }) {
|
|
3358
|
+
const t = E(yi).id;
|
|
3264
3359
|
return t && e !== void 0 ? t + "-" + e : e;
|
|
3265
3360
|
}
|
|
3266
|
-
function
|
|
3267
|
-
E(
|
|
3361
|
+
function Ga(e, t) {
|
|
3362
|
+
E(kt).strict, process.env.NODE_ENV;
|
|
3268
3363
|
}
|
|
3269
|
-
function
|
|
3364
|
+
function Ha(e) {
|
|
3270
3365
|
const t = Ls(), { drag: n, layout: s } = t;
|
|
3271
3366
|
if (!n && !s)
|
|
3272
3367
|
return {};
|
|
@@ -3276,17 +3371,17 @@ function Ka(e) {
|
|
|
3276
3371
|
ProjectionNode: i.ProjectionNode
|
|
3277
3372
|
};
|
|
3278
3373
|
}
|
|
3279
|
-
const
|
|
3280
|
-
allowProjection: e !==
|
|
3374
|
+
const za = (e, t) => t.isSVG ?? Et(e) ? new fa(t) : new ra(t, {
|
|
3375
|
+
allowProjection: e !== Tn
|
|
3281
3376
|
});
|
|
3282
|
-
class
|
|
3377
|
+
class Ua extends le {
|
|
3283
3378
|
/**
|
|
3284
3379
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3285
3380
|
* to the underlying animation library. We only want to load that if we load this,
|
|
3286
3381
|
* so people can optionally code split it out using the `m` component.
|
|
3287
3382
|
*/
|
|
3288
3383
|
constructor(t) {
|
|
3289
|
-
super(t), t.animationState || (t.animationState =
|
|
3384
|
+
super(t), t.animationState || (t.animationState = ga(t));
|
|
3290
3385
|
}
|
|
3291
3386
|
updateAnimationControlsSubscription() {
|
|
3292
3387
|
const { animate: t } = this.node.getProps();
|
|
@@ -3307,10 +3402,10 @@ class Wa extends ce {
|
|
|
3307
3402
|
this.node.animationState.reset(), (t = this.unmountControls) == null || t.call(this);
|
|
3308
3403
|
}
|
|
3309
3404
|
}
|
|
3310
|
-
let
|
|
3311
|
-
class
|
|
3405
|
+
let Ya = 0;
|
|
3406
|
+
class Xa extends le {
|
|
3312
3407
|
constructor() {
|
|
3313
|
-
super(...arguments), this.id =
|
|
3408
|
+
super(...arguments), this.id = Ya++;
|
|
3314
3409
|
}
|
|
3315
3410
|
update() {
|
|
3316
3411
|
if (!this.node.presenceContext)
|
|
@@ -3330,12 +3425,12 @@ class _a extends ce {
|
|
|
3330
3425
|
unmount() {
|
|
3331
3426
|
}
|
|
3332
3427
|
}
|
|
3333
|
-
const
|
|
3428
|
+
const qa = {
|
|
3334
3429
|
animation: {
|
|
3335
|
-
Feature:
|
|
3430
|
+
Feature: Ua
|
|
3336
3431
|
},
|
|
3337
3432
|
exit: {
|
|
3338
|
-
Feature:
|
|
3433
|
+
Feature: Xa
|
|
3339
3434
|
}
|
|
3340
3435
|
};
|
|
3341
3436
|
function _s(e) {
|
|
@@ -3352,15 +3447,15 @@ function yn(e, t, n) {
|
|
|
3352
3447
|
const i = "onHover" + n, r = s[i];
|
|
3353
3448
|
r && N.postRender(() => r(t, _s(t)));
|
|
3354
3449
|
}
|
|
3355
|
-
class
|
|
3450
|
+
class Za extends le {
|
|
3356
3451
|
mount() {
|
|
3357
3452
|
const { current: t } = this.node;
|
|
3358
|
-
t && (this.unmount =
|
|
3453
|
+
t && (this.unmount = Bo(t, (n, s) => (yn(this.node, s, "Start"), (i) => yn(this.node, i, "End"))));
|
|
3359
3454
|
}
|
|
3360
3455
|
unmount() {
|
|
3361
3456
|
}
|
|
3362
3457
|
}
|
|
3363
|
-
class
|
|
3458
|
+
class Ja extends le {
|
|
3364
3459
|
constructor() {
|
|
3365
3460
|
super(...arguments), this.isActive = !1;
|
|
3366
3461
|
}
|
|
@@ -3390,13 +3485,13 @@ function bn(e, t, n) {
|
|
|
3390
3485
|
const i = "onTap" + (n === "End" ? "" : n), r = s[i];
|
|
3391
3486
|
r && N.postRender(() => r(t, _s(t)));
|
|
3392
3487
|
}
|
|
3393
|
-
class
|
|
3488
|
+
class Qa extends le {
|
|
3394
3489
|
mount() {
|
|
3395
3490
|
const { current: t } = this.node;
|
|
3396
3491
|
if (!t)
|
|
3397
3492
|
return;
|
|
3398
3493
|
const { globalTapTarget: n, propagate: s } = this.node.props;
|
|
3399
|
-
this.unmount =
|
|
3494
|
+
this.unmount = jo(t, (i, r) => (bn(this.node, r, "Start"), (o, { success: a }) => bn(this.node, o, a ? "End" : "Cancel")), {
|
|
3400
3495
|
useGlobalTarget: n,
|
|
3401
3496
|
stopPropagation: (s == null ? void 0 : s.tap) === !1
|
|
3402
3497
|
});
|
|
@@ -3404,29 +3499,29 @@ class Ua extends ce {
|
|
|
3404
3499
|
unmount() {
|
|
3405
3500
|
}
|
|
3406
3501
|
}
|
|
3407
|
-
const dt = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(),
|
|
3502
|
+
const dt = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), eu = (e) => {
|
|
3408
3503
|
const t = dt.get(e.target);
|
|
3409
3504
|
t && t(e);
|
|
3410
|
-
},
|
|
3411
|
-
e.forEach(
|
|
3505
|
+
}, tu = (e) => {
|
|
3506
|
+
e.forEach(eu);
|
|
3412
3507
|
};
|
|
3413
|
-
function
|
|
3508
|
+
function nu({ root: e, ...t }) {
|
|
3414
3509
|
const n = e || document;
|
|
3415
3510
|
ze.has(n) || ze.set(n, {});
|
|
3416
3511
|
const s = ze.get(n), i = JSON.stringify(t);
|
|
3417
|
-
return s[i] || (s[i] = new IntersectionObserver(
|
|
3512
|
+
return s[i] || (s[i] = new IntersectionObserver(tu, { root: e, ...t })), s[i];
|
|
3418
3513
|
}
|
|
3419
|
-
function
|
|
3420
|
-
const s =
|
|
3514
|
+
function su(e, t, n) {
|
|
3515
|
+
const s = nu(t);
|
|
3421
3516
|
return dt.set(e, n), s.observe(e), () => {
|
|
3422
3517
|
dt.delete(e), s.unobserve(e);
|
|
3423
3518
|
};
|
|
3424
3519
|
}
|
|
3425
|
-
const
|
|
3520
|
+
const iu = {
|
|
3426
3521
|
some: 0,
|
|
3427
3522
|
all: 1
|
|
3428
3523
|
};
|
|
3429
|
-
class
|
|
3524
|
+
class ru extends le {
|
|
3430
3525
|
constructor() {
|
|
3431
3526
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
3432
3527
|
}
|
|
@@ -3435,7 +3530,7 @@ class Qa extends ce {
|
|
|
3435
3530
|
const { viewport: t = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = t, o = {
|
|
3436
3531
|
root: n ? n.current : void 0,
|
|
3437
3532
|
rootMargin: s,
|
|
3438
|
-
threshold: typeof i == "number" ? i :
|
|
3533
|
+
threshold: typeof i == "number" ? i : iu[i]
|
|
3439
3534
|
}, a = (c) => {
|
|
3440
3535
|
const { isIntersecting: l } = c;
|
|
3441
3536
|
if (this.isInView === l || (this.isInView = l, r && !l && this.hasEnteredView))
|
|
@@ -3444,7 +3539,7 @@ class Qa extends ce {
|
|
|
3444
3539
|
const { onViewportEnter: u, onViewportLeave: d } = this.node.getProps(), f = l ? u : d;
|
|
3445
3540
|
f && f(c);
|
|
3446
3541
|
};
|
|
3447
|
-
return
|
|
3542
|
+
return su(this.node.current, o, a);
|
|
3448
3543
|
}
|
|
3449
3544
|
mount() {
|
|
3450
3545
|
this.startObserver();
|
|
@@ -3453,36 +3548,36 @@ class Qa extends ce {
|
|
|
3453
3548
|
if (typeof IntersectionObserver > "u")
|
|
3454
3549
|
return;
|
|
3455
3550
|
const { props: t, prevProps: n } = this.node;
|
|
3456
|
-
["amount", "margin", "root"].some(
|
|
3551
|
+
["amount", "margin", "root"].some(ou(t, n)) && this.startObserver();
|
|
3457
3552
|
}
|
|
3458
3553
|
unmount() {
|
|
3459
3554
|
}
|
|
3460
3555
|
}
|
|
3461
|
-
function
|
|
3556
|
+
function ou({ viewport: e = {} }, { viewport: t = {} } = {}) {
|
|
3462
3557
|
return (n) => e[n] !== t[n];
|
|
3463
3558
|
}
|
|
3464
|
-
const
|
|
3559
|
+
const au = {
|
|
3465
3560
|
inView: {
|
|
3466
|
-
Feature:
|
|
3561
|
+
Feature: ru
|
|
3467
3562
|
},
|
|
3468
3563
|
tap: {
|
|
3469
|
-
Feature:
|
|
3564
|
+
Feature: Qa
|
|
3470
3565
|
},
|
|
3471
3566
|
focus: {
|
|
3472
|
-
Feature:
|
|
3567
|
+
Feature: Ja
|
|
3473
3568
|
},
|
|
3474
3569
|
hover: {
|
|
3475
|
-
Feature:
|
|
3570
|
+
Feature: Za
|
|
3476
3571
|
}
|
|
3477
|
-
},
|
|
3478
|
-
renderer:
|
|
3479
|
-
...
|
|
3480
|
-
...
|
|
3572
|
+
}, uu = {
|
|
3573
|
+
renderer: za,
|
|
3574
|
+
...qa,
|
|
3575
|
+
...au
|
|
3481
3576
|
};
|
|
3482
|
-
function
|
|
3483
|
-
return
|
|
3577
|
+
function cu(e, t) {
|
|
3578
|
+
return Wa(e, t);
|
|
3484
3579
|
}
|
|
3485
|
-
const
|
|
3580
|
+
const vn = /* @__PURE__ */ cu("span"), lu = {
|
|
3486
3581
|
Root: {
|
|
3487
3582
|
0: {
|
|
3488
3583
|
h: "5"
|
|
@@ -3496,16 +3591,16 @@ const wn = /* @__PURE__ */ su("span"), iu = {
|
|
|
3496
3591
|
}
|
|
3497
3592
|
}, Gs = {
|
|
3498
3593
|
Root: {
|
|
3499
|
-
0: "
|
|
3500
|
-
1: "
|
|
3501
|
-
2: "
|
|
3594
|
+
0: "1_5",
|
|
3595
|
+
1: "2",
|
|
3596
|
+
2: "2_5"
|
|
3502
3597
|
},
|
|
3503
3598
|
Text: {
|
|
3504
|
-
0: "
|
|
3505
|
-
1: "
|
|
3506
|
-
2: "
|
|
3599
|
+
0: "1_5",
|
|
3600
|
+
1: "2",
|
|
3601
|
+
2: "2_5"
|
|
3507
3602
|
}
|
|
3508
|
-
},
|
|
3603
|
+
}, ie = {
|
|
3509
3604
|
Root: {
|
|
3510
3605
|
solid: {
|
|
3511
3606
|
default: "gray-12",
|
|
@@ -3518,14 +3613,26 @@ const wn = /* @__PURE__ */ su("span"), iu = {
|
|
|
3518
3613
|
purple: "purple-9"
|
|
3519
3614
|
},
|
|
3520
3615
|
soft: {
|
|
3521
|
-
default: "gray-
|
|
3522
|
-
accent: "accent-
|
|
3523
|
-
gray: "gray-
|
|
3524
|
-
red: "red-
|
|
3525
|
-
blue: "blue-
|
|
3526
|
-
green: "green-
|
|
3527
|
-
yellow: "yellow-
|
|
3528
|
-
purple: "purple-
|
|
3616
|
+
default: "gray-2",
|
|
3617
|
+
accent: "accent-2",
|
|
3618
|
+
gray: "gray-2",
|
|
3619
|
+
red: "red-2",
|
|
3620
|
+
blue: "blue-2",
|
|
3621
|
+
green: "green-2",
|
|
3622
|
+
yellow: "yellow-2",
|
|
3623
|
+
purple: "purple-2"
|
|
3624
|
+
}
|
|
3625
|
+
},
|
|
3626
|
+
Border: {
|
|
3627
|
+
soft: {
|
|
3628
|
+
default: "gray-4",
|
|
3629
|
+
accent: "accent-4",
|
|
3630
|
+
gray: "gray-4",
|
|
3631
|
+
red: "red-4",
|
|
3632
|
+
blue: "blue-4",
|
|
3633
|
+
green: "green-4",
|
|
3634
|
+
yellow: "yellow-4",
|
|
3635
|
+
purple: "purple-4"
|
|
3529
3636
|
}
|
|
3530
3637
|
},
|
|
3531
3638
|
Icon: {
|
|
@@ -3594,45 +3701,68 @@ const wn = /* @__PURE__ */ su("span"), iu = {
|
|
|
3594
3701
|
purple: "purple"
|
|
3595
3702
|
}
|
|
3596
3703
|
}
|
|
3597
|
-
},
|
|
3704
|
+
}, Hs = {
|
|
3705
|
+
Button: {
|
|
3706
|
+
solid: "solid",
|
|
3707
|
+
soft: "ghost"
|
|
3708
|
+
}
|
|
3709
|
+
}, fu = {
|
|
3710
|
+
tagBorderColor: {
|
|
3711
|
+
cssVar: "--box-shadow",
|
|
3712
|
+
value: "inset 0 0 0 1px var(--tgph-VARIABLE)"
|
|
3713
|
+
}
|
|
3714
|
+
}, Te = G.createContext({
|
|
3598
3715
|
size: "1",
|
|
3599
3716
|
color: "default",
|
|
3600
3717
|
variant: "soft"
|
|
3601
|
-
}),
|
|
3718
|
+
}), zs = ({
|
|
3602
3719
|
as: e = "span",
|
|
3603
3720
|
size: t = "1",
|
|
3604
3721
|
color: n = "default",
|
|
3605
3722
|
variant: s = "soft",
|
|
3606
3723
|
className: i,
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
{
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3724
|
+
style: r,
|
|
3725
|
+
...o
|
|
3726
|
+
}) => {
|
|
3727
|
+
const { styleProp: a, otherProps: c } = gi({
|
|
3728
|
+
props: {
|
|
3729
|
+
...s === "soft" ? { tagBorderColor: ie.Border.soft[n] } : {},
|
|
3730
|
+
style: r
|
|
3731
|
+
},
|
|
3732
|
+
cssVars: fu
|
|
3733
|
+
});
|
|
3734
|
+
return /* @__PURE__ */ F(Te.Provider, { value: { size: t, color: n, variant: s }, children: /* @__PURE__ */ F(
|
|
3735
|
+
ti,
|
|
3736
|
+
{
|
|
3737
|
+
as: e,
|
|
3738
|
+
align: "center",
|
|
3739
|
+
rounded: "full",
|
|
3740
|
+
overflow: "hidden",
|
|
3741
|
+
display: "inline-flex",
|
|
3742
|
+
pl: Gs.Root[t],
|
|
3743
|
+
backgroundColor: ie.Root[s][n],
|
|
3744
|
+
h: lu.Root[t].h,
|
|
3745
|
+
className: ci("tgph-tag", i),
|
|
3746
|
+
style: a,
|
|
3747
|
+
...c,
|
|
3748
|
+
...o,
|
|
3749
|
+
"data-tag": !0
|
|
3750
|
+
}
|
|
3751
|
+
) });
|
|
3752
|
+
}, Us = ({
|
|
3623
3753
|
as: e = "span",
|
|
3624
3754
|
maxW: t = "40",
|
|
3625
3755
|
overflow: n = "hidden",
|
|
3626
3756
|
style: s,
|
|
3627
3757
|
...i
|
|
3628
3758
|
}) => {
|
|
3629
|
-
const r =
|
|
3759
|
+
const r = G.useContext(Te);
|
|
3630
3760
|
return /* @__PURE__ */ F(
|
|
3631
|
-
|
|
3761
|
+
ui,
|
|
3632
3762
|
{
|
|
3633
3763
|
as: e,
|
|
3634
3764
|
size: r.size,
|
|
3635
|
-
color:
|
|
3765
|
+
color: ie.Text[r.variant][r.color],
|
|
3636
3766
|
weight: "medium",
|
|
3637
3767
|
mr: Gs.Text[r.size],
|
|
3638
3768
|
maxW: t,
|
|
@@ -3646,14 +3776,14 @@ const wn = /* @__PURE__ */ su("span"), iu = {
|
|
|
3646
3776
|
...i
|
|
3647
3777
|
}
|
|
3648
3778
|
);
|
|
3649
|
-
},
|
|
3650
|
-
const s =
|
|
3651
|
-
return
|
|
3779
|
+
}, Ys = ({ onClick: e, textToCopy: t, ...n }) => {
|
|
3780
|
+
const s = G.useContext(Te), [i, r] = G.useState(!1);
|
|
3781
|
+
return G.useEffect(() => {
|
|
3652
3782
|
if (i) {
|
|
3653
3783
|
const o = setTimeout(() => r(!1), 2e3);
|
|
3654
3784
|
return () => clearTimeout(o);
|
|
3655
3785
|
}
|
|
3656
|
-
}, [i]), /* @__PURE__ */ F(
|
|
3786
|
+
}, [i]), /* @__PURE__ */ F(wa, { features: uu, children: /* @__PURE__ */ F(ai, { label: "Copy text", children: /* @__PURE__ */ ht(
|
|
3657
3787
|
xe.Root,
|
|
3658
3788
|
{
|
|
3659
3789
|
onClick: (o) => {
|
|
@@ -3661,25 +3791,21 @@ const wn = /* @__PURE__ */ su("span"), iu = {
|
|
|
3661
3791
|
e == null || e(o), r(!0), t && navigator.clipboard.writeText(t), (a = o.currentTarget) == null || a.blur();
|
|
3662
3792
|
},
|
|
3663
3793
|
size: s.size,
|
|
3664
|
-
color:
|
|
3665
|
-
variant: s.variant,
|
|
3666
|
-
|
|
3667
|
-
roundedBottomRight: "1",
|
|
3668
|
-
roundedTopLeft: "0",
|
|
3669
|
-
roundedBottomLeft: "0",
|
|
3794
|
+
color: ie.Button[s.variant][s.color],
|
|
3795
|
+
variant: Hs.Button[s.variant],
|
|
3796
|
+
rounded: "0",
|
|
3670
3797
|
position: "relative",
|
|
3671
3798
|
overflow: "hidden",
|
|
3672
|
-
p: "2",
|
|
3673
3799
|
...n,
|
|
3674
3800
|
children: [
|
|
3675
3801
|
/* @__PURE__ */ F(
|
|
3676
3802
|
xe.Icon,
|
|
3677
3803
|
{
|
|
3678
|
-
as:
|
|
3804
|
+
as: vn,
|
|
3679
3805
|
initial: !1,
|
|
3680
3806
|
animate: { y: i ? 0 : "150%", opacity: 1 },
|
|
3681
3807
|
transition: { duration: 0.15, type: "spring", bounce: 0 },
|
|
3682
|
-
icon:
|
|
3808
|
+
icon: li,
|
|
3683
3809
|
alt: "Copied text",
|
|
3684
3810
|
"aria-hidden": !i
|
|
3685
3811
|
}
|
|
@@ -3687,11 +3813,11 @@ const wn = /* @__PURE__ */ su("span"), iu = {
|
|
|
3687
3813
|
/* @__PURE__ */ F(
|
|
3688
3814
|
xe.Icon,
|
|
3689
3815
|
{
|
|
3690
|
-
as:
|
|
3816
|
+
as: vn,
|
|
3691
3817
|
initial: !1,
|
|
3692
3818
|
animate: { y: i ? "-150%" : 0, opacity: 1 },
|
|
3693
3819
|
transition: { duration: 0.15, type: "spring", bounce: 0 },
|
|
3694
|
-
icon:
|
|
3820
|
+
icon: fi,
|
|
3695
3821
|
position: "absolute",
|
|
3696
3822
|
alt: "Copy text",
|
|
3697
3823
|
"aria-hidden": i
|
|
@@ -3700,41 +3826,38 @@ const wn = /* @__PURE__ */ su("span"), iu = {
|
|
|
3700
3826
|
]
|
|
3701
3827
|
}
|
|
3702
3828
|
) }) });
|
|
3703
|
-
},
|
|
3704
|
-
const t =
|
|
3829
|
+
}, Xs = ({ ...e }) => {
|
|
3830
|
+
const t = G.useContext(Te);
|
|
3705
3831
|
return /* @__PURE__ */ F(
|
|
3706
3832
|
xe,
|
|
3707
3833
|
{
|
|
3708
3834
|
size: t.size,
|
|
3709
|
-
color:
|
|
3710
|
-
variant: t.variant,
|
|
3711
|
-
icon: { icon:
|
|
3712
|
-
|
|
3713
|
-
roundedBottomRight: "1",
|
|
3714
|
-
roundedTopLeft: "0",
|
|
3715
|
-
roundedBottomLeft: "0",
|
|
3835
|
+
color: ie.Button[t.variant][t.color],
|
|
3836
|
+
variant: Hs.Button[t.variant],
|
|
3837
|
+
icon: { icon: Sn, alt: "close" },
|
|
3838
|
+
rounded: "0",
|
|
3716
3839
|
...e
|
|
3717
3840
|
}
|
|
3718
3841
|
);
|
|
3719
|
-
},
|
|
3842
|
+
}, qs = ({
|
|
3720
3843
|
icon: e,
|
|
3721
3844
|
alt: t,
|
|
3722
3845
|
"aria-hidden": n,
|
|
3723
3846
|
...s
|
|
3724
3847
|
}) => {
|
|
3725
|
-
const i =
|
|
3848
|
+
const i = G.useContext(Te), r = t ? { alt: t } : { "aria-hidden": n };
|
|
3726
3849
|
return /* @__PURE__ */ F(
|
|
3727
|
-
|
|
3850
|
+
ei,
|
|
3728
3851
|
{
|
|
3729
3852
|
icon: e,
|
|
3730
3853
|
size: i.size,
|
|
3731
|
-
color:
|
|
3854
|
+
color: ie.Icon[i.variant][i.color],
|
|
3732
3855
|
mr: "1",
|
|
3733
3856
|
...r,
|
|
3734
3857
|
...s
|
|
3735
3858
|
}
|
|
3736
3859
|
);
|
|
3737
|
-
},
|
|
3860
|
+
}, Zs = ({
|
|
3738
3861
|
color: e = "default",
|
|
3739
3862
|
size: t = "1",
|
|
3740
3863
|
variant: n = "soft",
|
|
@@ -3745,21 +3868,27 @@ const wn = /* @__PURE__ */ su("span"), iu = {
|
|
|
3745
3868
|
textProps: a = { maxW: "40" },
|
|
3746
3869
|
children: c,
|
|
3747
3870
|
...l
|
|
3748
|
-
}) =>
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3871
|
+
}) => {
|
|
3872
|
+
const d = {
|
|
3873
|
+
...a,
|
|
3874
|
+
...!!(i || r) ? { mr: "0" } : {}
|
|
3875
|
+
};
|
|
3876
|
+
return /* @__PURE__ */ ht(zs, { color: e, size: t, variant: n, ...l, children: [
|
|
3877
|
+
s && /* @__PURE__ */ F(qs, { ...s }),
|
|
3878
|
+
/* @__PURE__ */ F(Us, { as: "span", ...d, children: c }),
|
|
3879
|
+
i && /* @__PURE__ */ F(Xs, { onClick: i, icon: { icon: Sn, alt: "Remove" } }),
|
|
3880
|
+
r && /* @__PURE__ */ F(Ys, { onClick: r, textToCopy: o })
|
|
3881
|
+
] });
|
|
3882
|
+
};
|
|
3883
|
+
Object.assign(Zs, {
|
|
3884
|
+
Root: zs,
|
|
3885
|
+
Button: Xs,
|
|
3886
|
+
Text: Us,
|
|
3887
|
+
Icon: qs,
|
|
3888
|
+
CopyButton: Ys
|
|
3760
3889
|
});
|
|
3761
|
-
const
|
|
3890
|
+
const Vu = Zs;
|
|
3762
3891
|
export {
|
|
3763
|
-
|
|
3892
|
+
Vu as Tag
|
|
3764
3893
|
};
|
|
3765
3894
|
//# sourceMappingURL=index.mjs.map
|