@telegraph/tag 0.0.91 → 0.0.93
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 +19 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +465 -474
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/Tag/Tag.constants.d.ts +2 -2
- package/dist/types/Tag/Tag.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/esm/index.mjs
CHANGED
|
@@ -5,14 +5,14 @@ import { Stack as Ks } from "@telegraph/layout";
|
|
|
5
5
|
import { Tooltip as $s } from "@telegraph/tooltip";
|
|
6
6
|
import { Text as Ws } from "@telegraph/typography";
|
|
7
7
|
import { clsx as js } from "clsx";
|
|
8
|
-
import {
|
|
9
|
-
import G, { createContext as ee, useRef as
|
|
8
|
+
import { X as pn, Check as _s, Copy as Gs } from "lucide-react";
|
|
9
|
+
import G, { createContext as ee, useRef as ue, useLayoutEffect as zs, useEffect as ct, useState as Us, useContext as E, useMemo as De, useCallback as Hs, useInsertionEffect as Ys, forwardRef as Xs, Fragment as mn, createElement as qs } from "react";
|
|
10
10
|
const Zs = ee({});
|
|
11
11
|
function Js(e) {
|
|
12
|
-
const t =
|
|
12
|
+
const t = ue(null);
|
|
13
13
|
return t.current === null && (t.current = e()), t.current;
|
|
14
14
|
}
|
|
15
|
-
const lt = typeof window < "u", Qs = lt ?
|
|
15
|
+
const lt = typeof window < "u", Qs = lt ? zs : ct, gn = /* @__PURE__ */ ee(null);
|
|
16
16
|
function ei(e, t) {
|
|
17
17
|
e.indexOf(t) === -1 && e.push(t);
|
|
18
18
|
}
|
|
@@ -20,13 +20,13 @@ function ti(e, t) {
|
|
|
20
20
|
const n = e.indexOf(t);
|
|
21
21
|
n > -1 && e.splice(n, 1);
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
},
|
|
23
|
+
const H = (e, t, n) => n > t ? t : n < e ? e : n;
|
|
24
|
+
let pe = () => {
|
|
25
|
+
}, Y = () => {
|
|
26
26
|
};
|
|
27
|
-
process.env.NODE_ENV !== "production" && (
|
|
27
|
+
process.env.NODE_ENV !== "production" && (pe = (e, t) => {
|
|
28
28
|
!e && typeof console < "u" && console.warn(t);
|
|
29
|
-
},
|
|
29
|
+
}, Y = (e, t) => {
|
|
30
30
|
if (!e)
|
|
31
31
|
throw new Error(t);
|
|
32
32
|
});
|
|
@@ -40,11 +40,11 @@ function ft(e) {
|
|
|
40
40
|
let t;
|
|
41
41
|
return () => (t === void 0 && (t = e()), t);
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const te = /* @__NO_SIDE_EFFECTS__ */ (e) => e, si = (e, t) => (n) => t(e(n)), Re = (...e) => e.reduce(si), vn = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
|
|
44
44
|
const s = t - e;
|
|
45
45
|
return s === 0 ? 1 : (n - e) / s;
|
|
46
46
|
};
|
|
47
|
-
class
|
|
47
|
+
class Tn {
|
|
48
48
|
constructor() {
|
|
49
49
|
this.subscriptions = [];
|
|
50
50
|
}
|
|
@@ -69,32 +69,32 @@ class vn {
|
|
|
69
69
|
this.subscriptions.length = 0;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const N = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, B = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
|
|
73
73
|
function wn(e, t) {
|
|
74
74
|
return t ? e * (1e3 / t) : 0;
|
|
75
75
|
}
|
|
76
76
|
const kt = /* @__PURE__ */ new Set();
|
|
77
|
-
function
|
|
77
|
+
function Vn(e, t, n) {
|
|
78
78
|
e || kt.has(t) || (console.warn(t), kt.add(t));
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const Sn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, ii = 1e-7, ri = 12;
|
|
81
81
|
function oi(e, t, n, s, i) {
|
|
82
82
|
let r, o, a = 0;
|
|
83
83
|
do
|
|
84
|
-
o = t + (n - t) / 2, r =
|
|
84
|
+
o = t + (n - t) / 2, r = Sn(o, s, i) - e, r > 0 ? n = o : t = o;
|
|
85
85
|
while (Math.abs(r) > ii && ++a < ri);
|
|
86
86
|
return o;
|
|
87
87
|
}
|
|
88
88
|
function me(e, t, n, s) {
|
|
89
89
|
if (e === t && n === s)
|
|
90
|
-
return
|
|
90
|
+
return te;
|
|
91
91
|
const i = (r) => oi(r, 0, 1, e, n);
|
|
92
|
-
return (r) => r === 0 || r === 1 ? r :
|
|
92
|
+
return (r) => r === 0 || r === 1 ? r : Sn(i(r), t, s);
|
|
93
93
|
}
|
|
94
|
-
const xn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, An = (e) => (t) => 1 - e(1 - t), Mn = /* @__PURE__ */ me(0.33, 1.53, 0.69, 0.99), dt = /* @__PURE__ */ An(Mn), Cn = /* @__PURE__ */ xn(dt), Pn = (e) => (e *= 2) < 1 ? 0.5 * dt(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), ht = (e) => 1 - Math.sin(Math.acos(e)), ai = An(ht), Fn = xn(ht), ui = /* @__PURE__ */ me(0.42, 0, 1, 1), ci = /* @__PURE__ */ me(0, 0, 0.58, 1),
|
|
95
|
-
linear:
|
|
94
|
+
const xn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, An = (e) => (t) => 1 - e(1 - t), Mn = /* @__PURE__ */ me(0.33, 1.53, 0.69, 0.99), dt = /* @__PURE__ */ An(Mn), Cn = /* @__PURE__ */ xn(dt), Pn = (e) => (e *= 2) < 1 ? 0.5 * dt(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), ht = (e) => 1 - Math.sin(Math.acos(e)), ai = An(ht), Fn = xn(ht), ui = /* @__PURE__ */ me(0.42, 0, 1, 1), ci = /* @__PURE__ */ me(0, 0, 0.58, 1), Dn = /* @__PURE__ */ me(0.42, 0, 0.58, 1), li = (e) => Array.isArray(e) && typeof e[0] != "number", Rn = (e) => Array.isArray(e) && typeof e[0] == "number", Nt = {
|
|
95
|
+
linear: te,
|
|
96
96
|
easeIn: ui,
|
|
97
|
-
easeInOut:
|
|
97
|
+
easeInOut: Dn,
|
|
98
98
|
easeOut: ci,
|
|
99
99
|
circIn: ht,
|
|
100
100
|
circInOut: Fn,
|
|
@@ -103,15 +103,15 @@ const xn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, An
|
|
|
103
103
|
backInOut: Cn,
|
|
104
104
|
backOut: Mn,
|
|
105
105
|
anticipate: Pn
|
|
106
|
-
}, fi = (e) => typeof e == "string",
|
|
107
|
-
if (
|
|
108
|
-
|
|
106
|
+
}, fi = (e) => typeof e == "string", Lt = (e) => {
|
|
107
|
+
if (Rn(e)) {
|
|
108
|
+
Y(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
109
109
|
const [t, n, s, i] = e;
|
|
110
110
|
return me(t, n, s, i);
|
|
111
111
|
} else if (fi(e))
|
|
112
|
-
return
|
|
112
|
+
return Y(Nt[e] !== void 0, `Invalid easing type '${e}'`), Nt[e];
|
|
113
113
|
return e;
|
|
114
|
-
},
|
|
114
|
+
}, ve = [
|
|
115
115
|
"setup",
|
|
116
116
|
// Compute
|
|
117
117
|
"read",
|
|
@@ -174,41 +174,41 @@ function On(e, t) {
|
|
|
174
174
|
delta: 0,
|
|
175
175
|
timestamp: 0,
|
|
176
176
|
isProcessing: !1
|
|
177
|
-
}, r = () => n = !0, o =
|
|
177
|
+
}, r = () => n = !0, o = ve.reduce((g, x) => (g[x] = di(r), g), {}), { setup: a, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: h, postRender: y } = o, b = () => {
|
|
178
178
|
const g = K.useManualTiming ? i.timestamp : performance.now();
|
|
179
179
|
n = !1, K.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp, hi), 1)), i.timestamp = g, i.isProcessing = !0, a.process(i), c.process(i), l.process(i), u.process(i), d.process(i), f.process(i), h.process(i), y.process(i), i.isProcessing = !1, n && t && (s = !1, e(b));
|
|
180
|
-
},
|
|
180
|
+
}, T = () => {
|
|
181
181
|
n = !0, s = !0, i.isProcessing || e(b);
|
|
182
182
|
};
|
|
183
|
-
return { schedule:
|
|
184
|
-
const
|
|
185
|
-
return g[x] = (
|
|
183
|
+
return { schedule: ve.reduce((g, x) => {
|
|
184
|
+
const v = o[x];
|
|
185
|
+
return g[x] = (S, C = !1, w = !1) => (n || T(), v.schedule(S, C, w)), g;
|
|
186
186
|
}, {}), cancel: (g) => {
|
|
187
|
-
for (let x = 0; x <
|
|
188
|
-
o[
|
|
187
|
+
for (let x = 0; x < ve.length; x++)
|
|
188
|
+
o[ve[x]].cancel(g);
|
|
189
189
|
}, state: i, steps: o };
|
|
190
190
|
}
|
|
191
|
-
const { schedule: k, cancel: ze, state: xe
|
|
192
|
-
let
|
|
191
|
+
const { schedule: k, cancel: ze, state: xe } = /* @__PURE__ */ On(typeof requestAnimationFrame < "u" ? requestAnimationFrame : te, !0);
|
|
192
|
+
let Ve;
|
|
193
193
|
function pi() {
|
|
194
|
-
|
|
194
|
+
Ve = void 0;
|
|
195
195
|
}
|
|
196
196
|
const I = {
|
|
197
|
-
now: () => (
|
|
197
|
+
now: () => (Ve === void 0 && I.set(xe.isProcessing || K.useManualTiming ? xe.timestamp : performance.now()), Ve),
|
|
198
198
|
set: (e) => {
|
|
199
|
-
|
|
199
|
+
Ve = e, queueMicrotask(pi);
|
|
200
200
|
}
|
|
201
|
-
}, In = (e) => (t) => typeof t == "string" && t.startsWith(e), En = /* @__PURE__ */ In("--"), mi = /* @__PURE__ */ In("var(--"), pt = (e) => mi(e) ? gi.test(e.split("/*")[0].trim()) : !1, gi = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,
|
|
201
|
+
}, In = (e) => (t) => typeof t == "string" && t.startsWith(e), En = /* @__PURE__ */ In("--"), mi = /* @__PURE__ */ In("var(--"), pt = (e) => mi(e) ? gi.test(e.split("/*")[0].trim()) : !1, gi = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, ne = {
|
|
202
202
|
test: (e) => typeof e == "number",
|
|
203
203
|
parse: parseFloat,
|
|
204
204
|
transform: (e) => e
|
|
205
|
-
},
|
|
206
|
-
...
|
|
207
|
-
transform: (e) =>
|
|
208
|
-
},
|
|
209
|
-
...
|
|
205
|
+
}, le = {
|
|
206
|
+
...ne,
|
|
207
|
+
transform: (e) => H(0, 1, e)
|
|
208
|
+
}, Te = {
|
|
209
|
+
...ne,
|
|
210
210
|
default: 1
|
|
211
|
-
},
|
|
211
|
+
}, ce = (e) => Math.round(e * 1e5) / 1e5, mt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
212
212
|
function yi(e) {
|
|
213
213
|
return e == null;
|
|
214
214
|
}
|
|
@@ -222,15 +222,15 @@ const bi = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
222
222
|
[n]: parseFloat(o),
|
|
223
223
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
224
224
|
};
|
|
225
|
-
},
|
|
226
|
-
...
|
|
227
|
-
transform: (e) => Math.round(
|
|
228
|
-
},
|
|
225
|
+
}, vi = (e) => H(0, 255, e), Be = {
|
|
226
|
+
...ne,
|
|
227
|
+
transform: (e) => Math.round(vi(e))
|
|
228
|
+
}, j = {
|
|
229
229
|
test: /* @__PURE__ */ gt("rgb", "red"),
|
|
230
230
|
parse: /* @__PURE__ */ kn("red", "green", "blue"),
|
|
231
|
-
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Be.transform(e) + ", " + Be.transform(t) + ", " + Be.transform(n) + ", " + le
|
|
231
|
+
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Be.transform(e) + ", " + Be.transform(t) + ", " + Be.transform(n) + ", " + ce(le.transform(s)) + ")"
|
|
232
232
|
};
|
|
233
|
-
function
|
|
233
|
+
function Ti(e) {
|
|
234
234
|
let t = "", n = "", s = "", i = "";
|
|
235
235
|
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), {
|
|
236
236
|
red: parseInt(t, 16),
|
|
@@ -239,57 +239,57 @@ function vi(e) {
|
|
|
239
239
|
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const Ue = {
|
|
243
243
|
test: /* @__PURE__ */ gt("#"),
|
|
244
|
-
parse:
|
|
245
|
-
transform:
|
|
244
|
+
parse: Ti,
|
|
245
|
+
transform: j.transform
|
|
246
246
|
}, ge = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
247
247
|
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
|
|
248
248
|
parse: parseFloat,
|
|
249
249
|
transform: (t) => `${t}${e}`
|
|
250
|
-
}), $ = /* @__PURE__ */ ge("deg"), J = /* @__PURE__ */ ge("%"), m = /* @__PURE__ */ ge("px"), wi = /* @__PURE__ */ ge("vh"),
|
|
250
|
+
}), $ = /* @__PURE__ */ ge("deg"), J = /* @__PURE__ */ ge("%"), m = /* @__PURE__ */ ge("px"), wi = /* @__PURE__ */ ge("vh"), Vi = /* @__PURE__ */ ge("vw"), Bt = {
|
|
251
251
|
...J,
|
|
252
252
|
parse: (e) => J.parse(e) / 100,
|
|
253
253
|
transform: (e) => J.transform(e * 100)
|
|
254
254
|
}, q = {
|
|
255
255
|
test: /* @__PURE__ */ gt("hsl", "hue"),
|
|
256
256
|
parse: /* @__PURE__ */ kn("hue", "saturation", "lightness"),
|
|
257
|
-
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + J.transform(
|
|
257
|
+
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + J.transform(ce(t)) + ", " + J.transform(ce(n)) + ", " + ce(le.transform(s)) + ")"
|
|
258
258
|
}, M = {
|
|
259
|
-
test: (e) =>
|
|
260
|
-
parse: (e) =>
|
|
261
|
-
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ?
|
|
259
|
+
test: (e) => j.test(e) || Ue.test(e) || q.test(e),
|
|
260
|
+
parse: (e) => j.test(e) ? j.parse(e) : q.test(e) ? q.parse(e) : Ue.parse(e),
|
|
261
|
+
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? j.transform(e) : q.transform(e),
|
|
262
262
|
getAnimatableNone: (e) => {
|
|
263
263
|
const t = M.parse(e);
|
|
264
264
|
return t.alpha = 0, M.transform(t);
|
|
265
265
|
}
|
|
266
|
-
},
|
|
266
|
+
}, Si = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
267
267
|
function xi(e) {
|
|
268
268
|
var t, n;
|
|
269
|
-
return isNaN(e) && typeof e == "string" && (((t = e.match(mt)) == null ? void 0 : t.length) || 0) + (((n = e.match(
|
|
269
|
+
return isNaN(e) && typeof e == "string" && (((t = e.match(mt)) == null ? void 0 : t.length) || 0) + (((n = e.match(Si)) == null ? void 0 : n.length) || 0) > 0;
|
|
270
270
|
}
|
|
271
|
-
const
|
|
272
|
-
function
|
|
271
|
+
const Nn = "number", Ln = "color", Ai = "var", Mi = "var(", Kt = "${}", Ci = /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;
|
|
272
|
+
function fe(e) {
|
|
273
273
|
const t = e.toString(), n = [], s = {
|
|
274
274
|
color: [],
|
|
275
275
|
number: [],
|
|
276
276
|
var: []
|
|
277
277
|
}, i = [];
|
|
278
278
|
let r = 0;
|
|
279
|
-
const a = t.replace(Ci, (c) => (M.test(c) ? (s.color.push(r), i.push(
|
|
279
|
+
const a = t.replace(Ci, (c) => (M.test(c) ? (s.color.push(r), i.push(Ln), n.push(M.parse(c))) : c.startsWith(Mi) ? (s.var.push(r), i.push(Ai), n.push(c)) : (s.number.push(r), i.push(Nn), n.push(parseFloat(c))), ++r, Kt)).split(Kt);
|
|
280
280
|
return { values: n, split: a, indexes: s, types: i };
|
|
281
281
|
}
|
|
282
282
|
function Bn(e) {
|
|
283
|
-
return
|
|
283
|
+
return fe(e).values;
|
|
284
284
|
}
|
|
285
285
|
function Kn(e) {
|
|
286
|
-
const { split: t, types: n } =
|
|
286
|
+
const { split: t, types: n } = fe(e), s = t.length;
|
|
287
287
|
return (i) => {
|
|
288
288
|
let r = "";
|
|
289
289
|
for (let o = 0; o < s; o++)
|
|
290
290
|
if (r += t[o], i[o] !== void 0) {
|
|
291
291
|
const a = n[o];
|
|
292
|
-
a ===
|
|
292
|
+
a === Nn ? r += ce(i[o]) : a === Ln ? r += M.transform(i[o]) : r += i[o];
|
|
293
293
|
}
|
|
294
294
|
return r;
|
|
295
295
|
};
|
|
@@ -299,7 +299,7 @@ function Fi(e) {
|
|
|
299
299
|
const t = Bn(e);
|
|
300
300
|
return Kn(e)(t.map(Pi));
|
|
301
301
|
}
|
|
302
|
-
const
|
|
302
|
+
const se = {
|
|
303
303
|
test: xi,
|
|
304
304
|
parse: Bn,
|
|
305
305
|
createTransformer: Kn,
|
|
@@ -308,7 +308,7 @@ const ie = {
|
|
|
308
308
|
function Ke(e, t, n) {
|
|
309
309
|
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;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Di({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
312
312
|
e /= 360, t /= 100, n /= 100;
|
|
313
313
|
let i = 0, r = 0, o = 0;
|
|
314
314
|
if (!t)
|
|
@@ -330,29 +330,29 @@ function Ae(e, t) {
|
|
|
330
330
|
const Oe = (e, t, n) => e + (t - e) * n, $e = (e, t, n) => {
|
|
331
331
|
const s = e * e, i = n * (t * t - s) + s;
|
|
332
332
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
333
|
-
},
|
|
333
|
+
}, Ri = [Ue, j, q], Oi = (e) => Ri.find((t) => t.test(e));
|
|
334
334
|
function $t(e) {
|
|
335
335
|
const t = Oi(e);
|
|
336
|
-
if (
|
|
336
|
+
if (pe(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`), !t)
|
|
337
337
|
return !1;
|
|
338
338
|
let n = t.parse(e);
|
|
339
|
-
return t === q && (n =
|
|
339
|
+
return t === q && (n = Di(n)), n;
|
|
340
340
|
}
|
|
341
341
|
const Wt = (e, t) => {
|
|
342
342
|
const n = $t(e), s = $t(t);
|
|
343
343
|
if (!n || !s)
|
|
344
344
|
return Ae(e, t);
|
|
345
345
|
const i = { ...n };
|
|
346
|
-
return (r) => (i.red = $e(n.red, s.red, r), i.green = $e(n.green, s.green, r), i.blue = $e(n.blue, s.blue, r), i.alpha = Oe(n.alpha, s.alpha, r),
|
|
347
|
-
},
|
|
346
|
+
return (r) => (i.red = $e(n.red, s.red, r), i.green = $e(n.green, s.green, r), i.blue = $e(n.blue, s.blue, r), i.alpha = Oe(n.alpha, s.alpha, r), j.transform(i));
|
|
347
|
+
}, He = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
348
348
|
function Ii(e, t) {
|
|
349
|
-
return
|
|
349
|
+
return He.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
350
350
|
}
|
|
351
351
|
function Ei(e, t) {
|
|
352
352
|
return (n) => Oe(e, t, n);
|
|
353
353
|
}
|
|
354
354
|
function yt(e) {
|
|
355
|
-
return typeof e == "number" ? Ei : typeof e == "string" ? pt(e) ? Ae : M.test(e) ? Wt :
|
|
355
|
+
return typeof e == "number" ? Ei : typeof e == "string" ? pt(e) ? Ae : M.test(e) ? Wt : Li : Array.isArray(e) ? $n : typeof e == "object" ? M.test(e) ? Wt : ki : Ae;
|
|
356
356
|
}
|
|
357
357
|
function $n(e, t) {
|
|
358
358
|
const n = [...e], s = n.length, i = e.map((r, o) => yt(r)(r, t[o]));
|
|
@@ -372,7 +372,7 @@ function ki(e, t) {
|
|
|
372
372
|
return n;
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Ni(e, t) {
|
|
376
376
|
const n = [], s = { color: 0, var: 0, number: 0 };
|
|
377
377
|
for (let i = 0; i < t.values.length; i++) {
|
|
378
378
|
const r = t.types[i], o = e.indexes[r][s[r]], a = e.values[o] ?? 0;
|
|
@@ -380,9 +380,9 @@ function Li(e, t) {
|
|
|
380
380
|
}
|
|
381
381
|
return n;
|
|
382
382
|
}
|
|
383
|
-
const
|
|
384
|
-
const n =
|
|
385
|
-
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 ?
|
|
383
|
+
const Li = (e, t) => {
|
|
384
|
+
const n = se.createTransformer(t), s = fe(e), i = fe(t);
|
|
385
|
+
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 ? He.has(e) && !i.values.length || He.has(t) && !s.values.length ? Ii(e, t) : Re($n(Ni(s, i), i.values), n) : (pe(!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.`), Ae(e, t));
|
|
386
386
|
};
|
|
387
387
|
function Wn(e, t, n) {
|
|
388
388
|
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? Oe(e, t, n) : yt(e)(e, t);
|
|
@@ -454,26 +454,26 @@ const A = {
|
|
|
454
454
|
// in seconds
|
|
455
455
|
minDamping: 0.05,
|
|
456
456
|
maxDamping: 1
|
|
457
|
-
},
|
|
457
|
+
}, We = 1e-3;
|
|
458
458
|
function Wi({ duration: e = A.duration, bounce: t = A.bounce, velocity: n = A.velocity, mass: s = A.mass }) {
|
|
459
459
|
let i, r;
|
|
460
|
-
|
|
460
|
+
pe(e <= /* @__PURE__ */ N(A.maxDuration), "Spring duration must be 10 seconds or less");
|
|
461
461
|
let o = 1 - t;
|
|
462
|
-
o =
|
|
463
|
-
const u = l * o, d = u * e, f = u - n, h =
|
|
464
|
-
return
|
|
462
|
+
o = H(A.minDamping, A.maxDamping, o), e = H(A.minDuration, A.maxDuration, /* @__PURE__ */ B(e)), o < 1 ? (i = (l) => {
|
|
463
|
+
const u = l * o, d = u * e, f = u - n, h = Ye(l, o), y = Math.exp(-d);
|
|
464
|
+
return We - f / h * y;
|
|
465
465
|
}, r = (l) => {
|
|
466
|
-
const d = l * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(l, 2) * e, y = Math.exp(-d), b =
|
|
467
|
-
return (-i(l) +
|
|
466
|
+
const d = l * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(l, 2) * e, y = Math.exp(-d), b = Ye(Math.pow(l, 2), o);
|
|
467
|
+
return (-i(l) + We > 0 ? -1 : 1) * ((f - h) * y) / b;
|
|
468
468
|
}) : (i = (l) => {
|
|
469
469
|
const u = Math.exp(-l * e), d = (l - n) * e + 1;
|
|
470
|
-
return -
|
|
470
|
+
return -We + u * d;
|
|
471
471
|
}, r = (l) => {
|
|
472
472
|
const u = Math.exp(-l * e), d = (n - l) * (e * e);
|
|
473
473
|
return u * d;
|
|
474
474
|
});
|
|
475
475
|
const a = 5 / e, c = _i(i, r, a);
|
|
476
|
-
if (e = /* @__PURE__ */
|
|
476
|
+
if (e = /* @__PURE__ */ N(e), isNaN(c))
|
|
477
477
|
return {
|
|
478
478
|
stiffness: A.stiffness,
|
|
479
479
|
damping: A.damping,
|
|
@@ -495,11 +495,11 @@ function _i(e, t, n) {
|
|
|
495
495
|
s = s - e(s) / t(s);
|
|
496
496
|
return s;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Ye(e, t) {
|
|
499
499
|
return e * Math.sqrt(1 - t * t);
|
|
500
500
|
}
|
|
501
|
-
const
|
|
502
|
-
function
|
|
501
|
+
const Gi = ["duration", "bounce"], zi = ["stiffness", "damping", "mass"];
|
|
502
|
+
function jt(e, t) {
|
|
503
503
|
return t.some((n) => e[n] !== void 0);
|
|
504
504
|
}
|
|
505
505
|
function Ui(e) {
|
|
@@ -511,9 +511,9 @@ function Ui(e) {
|
|
|
511
511
|
isResolvedFromDuration: !1,
|
|
512
512
|
...e
|
|
513
513
|
};
|
|
514
|
-
if (!
|
|
514
|
+
if (!jt(e, zi) && jt(e, Gi))
|
|
515
515
|
if (e.visualDuration) {
|
|
516
|
-
const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 *
|
|
516
|
+
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);
|
|
517
517
|
t = {
|
|
518
518
|
...t,
|
|
519
519
|
mass: A.mass,
|
|
@@ -540,41 +540,41 @@ function Ce(e = A.visualDuration, t = A.bounce) {
|
|
|
540
540
|
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 } = Ui({
|
|
541
541
|
...n,
|
|
542
542
|
velocity: -/* @__PURE__ */ B(n.velocity || 0)
|
|
543
|
-
}), y = f || 0, b = l / (2 * Math.sqrt(c * u)),
|
|
544
|
-
s || (s =
|
|
543
|
+
}), y = f || 0, b = l / (2 * Math.sqrt(c * u)), T = o - r, p = /* @__PURE__ */ B(Math.sqrt(c / u)), V = Math.abs(T) < 5;
|
|
544
|
+
s || (s = V ? A.restSpeed.granular : A.restSpeed.default), i || (i = V ? A.restDelta.granular : A.restDelta.default);
|
|
545
545
|
let g;
|
|
546
546
|
if (b < 1) {
|
|
547
|
-
const
|
|
548
|
-
g = (
|
|
549
|
-
const C = Math.exp(-b * p *
|
|
550
|
-
return o - C * ((y + b * p *
|
|
547
|
+
const v = Ye(p, b);
|
|
548
|
+
g = (S) => {
|
|
549
|
+
const C = Math.exp(-b * p * S);
|
|
550
|
+
return o - C * ((y + b * p * T) / v * Math.sin(v * S) + T * Math.cos(v * S));
|
|
551
551
|
};
|
|
552
552
|
} else if (b === 1)
|
|
553
|
-
g = (
|
|
553
|
+
g = (v) => o - Math.exp(-p * v) * (T + (y + p * T) * v);
|
|
554
554
|
else {
|
|
555
|
-
const
|
|
556
|
-
g = (
|
|
557
|
-
const C = Math.exp(-b * p *
|
|
558
|
-
return o - C * ((y + b * p *
|
|
555
|
+
const v = p * Math.sqrt(b * b - 1);
|
|
556
|
+
g = (S) => {
|
|
557
|
+
const C = Math.exp(-b * p * S), w = Math.min(v * S, 300);
|
|
558
|
+
return o - C * ((y + b * p * T) * Math.sinh(w) + v * T * Math.cosh(w)) / v;
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
561
|
const x = {
|
|
562
562
|
calculatedDuration: h && d || null,
|
|
563
|
-
next: (
|
|
564
|
-
const
|
|
563
|
+
next: (v) => {
|
|
564
|
+
const S = g(v);
|
|
565
565
|
if (h)
|
|
566
|
-
a.done =
|
|
566
|
+
a.done = v >= d;
|
|
567
567
|
else {
|
|
568
|
-
let C =
|
|
569
|
-
b < 1 && (C =
|
|
570
|
-
const w = Math.abs(C) <= s,
|
|
571
|
-
a.done = w &&
|
|
568
|
+
let C = v === 0 ? y : 0;
|
|
569
|
+
b < 1 && (C = v === 0 ? /* @__PURE__ */ N(y) : _n(g, v, S));
|
|
570
|
+
const w = Math.abs(C) <= s, R = Math.abs(o - S) <= i;
|
|
571
|
+
a.done = w && R;
|
|
572
572
|
}
|
|
573
|
-
return a.value = a.done ? o :
|
|
573
|
+
return a.value = a.done ? o : S, a;
|
|
574
574
|
},
|
|
575
575
|
toString: () => {
|
|
576
|
-
const
|
|
577
|
-
return
|
|
576
|
+
const v = Math.min(bt(x), Me), S = jn((C) => x.next(v * C).value, v, 30);
|
|
577
|
+
return v + "ms " + S;
|
|
578
578
|
},
|
|
579
579
|
toTransition: () => {
|
|
580
580
|
}
|
|
@@ -583,23 +583,23 @@ function Ce(e = A.visualDuration, t = A.bounce) {
|
|
|
583
583
|
}
|
|
584
584
|
Ce.applyToOptions = (e) => {
|
|
585
585
|
const t = Ki(e, 100, Ce);
|
|
586
|
-
return e.ease = t.ease, e.duration = /* @__PURE__ */
|
|
586
|
+
return e.ease = t.ease, e.duration = /* @__PURE__ */ N(t.duration), e.type = "keyframes", e;
|
|
587
587
|
};
|
|
588
|
-
function
|
|
588
|
+
function Xe({ 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 }) {
|
|
589
589
|
const d = e[0], f = {
|
|
590
590
|
done: !1,
|
|
591
591
|
value: d
|
|
592
592
|
}, h = (w) => a !== void 0 && w < a || c !== void 0 && w > c, y = (w) => a === void 0 ? c : c === void 0 || Math.abs(a - w) < Math.abs(c - w) ? a : c;
|
|
593
593
|
let b = n * t;
|
|
594
|
-
const
|
|
595
|
-
p !==
|
|
596
|
-
const
|
|
597
|
-
const
|
|
598
|
-
f.done = Math.abs(
|
|
594
|
+
const T = d + b, p = o === void 0 ? T : o(T);
|
|
595
|
+
p !== T && (b = p - d);
|
|
596
|
+
const V = (w) => -b * Math.exp(-w / s), g = (w) => p + V(w), x = (w) => {
|
|
597
|
+
const R = V(w), O = g(w);
|
|
598
|
+
f.done = Math.abs(R) <= l, f.value = f.done ? p : O;
|
|
599
599
|
};
|
|
600
|
-
let
|
|
600
|
+
let v, S;
|
|
601
601
|
const C = (w) => {
|
|
602
|
-
h(f.value) && (
|
|
602
|
+
h(f.value) && (v = w, S = Ce({
|
|
603
603
|
keyframes: [f.value, y(f.value)],
|
|
604
604
|
velocity: _n(g, w, f.value),
|
|
605
605
|
// TODO: This should be passing * 1000
|
|
@@ -612,8 +612,8 @@ function Ye({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
612
612
|
return C(0), {
|
|
613
613
|
calculatedDuration: null,
|
|
614
614
|
next: (w) => {
|
|
615
|
-
let
|
|
616
|
-
return !
|
|
615
|
+
let R = !1;
|
|
616
|
+
return !S && v === void 0 && (R = !0, x(w), C(w)), v !== void 0 && w >= v ? S.next(w - v) : (!R && x(w), f);
|
|
617
617
|
}
|
|
618
618
|
};
|
|
619
619
|
}
|
|
@@ -622,8 +622,8 @@ function Hi(e, t, n) {
|
|
|
622
622
|
for (let o = 0; o < r; o++) {
|
|
623
623
|
let a = i(e[o], e[o + 1]);
|
|
624
624
|
if (t) {
|
|
625
|
-
const c = Array.isArray(t) ? t[o] ||
|
|
626
|
-
a =
|
|
625
|
+
const c = Array.isArray(t) ? t[o] || te : t;
|
|
626
|
+
a = Re(c, a);
|
|
627
627
|
}
|
|
628
628
|
s.push(a);
|
|
629
629
|
}
|
|
@@ -631,7 +631,7 @@ function Hi(e, t, n) {
|
|
|
631
631
|
}
|
|
632
632
|
function Yi(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
633
633
|
const r = e.length;
|
|
634
|
-
if (
|
|
634
|
+
if (Y(r === t.length, "Both input and output ranges must be the same length"), r === 1)
|
|
635
635
|
return () => t[0];
|
|
636
636
|
if (r === 2 && t[0] === t[1])
|
|
637
637
|
return () => t[1];
|
|
@@ -644,15 +644,15 @@ function Yi(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
644
644
|
if (c > 1)
|
|
645
645
|
for (; d < e.length - 2 && !(u < e[d + 1]); d++)
|
|
646
646
|
;
|
|
647
|
-
const f = /* @__PURE__ */
|
|
647
|
+
const f = /* @__PURE__ */ vn(e[d], e[d + 1], u);
|
|
648
648
|
return a[d](f);
|
|
649
649
|
};
|
|
650
|
-
return n ? (u) => l(
|
|
650
|
+
return n ? (u) => l(H(e[0], e[r - 1], u)) : l;
|
|
651
651
|
}
|
|
652
652
|
function Xi(e, t) {
|
|
653
653
|
const n = e[e.length - 1];
|
|
654
654
|
for (let s = 1; s <= t; s++) {
|
|
655
|
-
const i = /* @__PURE__ */
|
|
655
|
+
const i = /* @__PURE__ */ vn(0, t, s);
|
|
656
656
|
e.push(Oe(n, 1, i));
|
|
657
657
|
}
|
|
658
658
|
}
|
|
@@ -664,10 +664,10 @@ function Zi(e, t) {
|
|
|
664
664
|
return e.map((n) => n * t);
|
|
665
665
|
}
|
|
666
666
|
function Ji(e, t) {
|
|
667
|
-
return e.map(() => t ||
|
|
667
|
+
return e.map(() => t || Dn).splice(0, e.length - 1);
|
|
668
668
|
}
|
|
669
669
|
function Z({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
|
|
670
|
-
const i = li(s) ? s.map(
|
|
670
|
+
const i = li(s) ? s.map(Lt) : Lt(s), r = {
|
|
671
671
|
done: !1,
|
|
672
672
|
value: t[0]
|
|
673
673
|
}, o = Zi(
|
|
@@ -684,21 +684,21 @@ function Z({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" })
|
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
686
|
const Qi = (e) => e !== null;
|
|
687
|
-
function
|
|
687
|
+
function vt(e, { repeat: t, repeatType: n = "loop" }, s, i = 1) {
|
|
688
688
|
const r = e.filter(Qi), a = i < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
|
|
689
689
|
return !a || s === void 0 ? r[a] : s;
|
|
690
690
|
}
|
|
691
691
|
const er = {
|
|
692
|
-
decay:
|
|
693
|
-
inertia:
|
|
692
|
+
decay: Xe,
|
|
693
|
+
inertia: Xe,
|
|
694
694
|
tween: Z,
|
|
695
695
|
keyframes: Z,
|
|
696
696
|
spring: Ce
|
|
697
697
|
};
|
|
698
|
-
function
|
|
698
|
+
function Gn(e) {
|
|
699
699
|
typeof e.type == "string" && (e.type = er[e.type]);
|
|
700
700
|
}
|
|
701
|
-
class
|
|
701
|
+
class Tt {
|
|
702
702
|
constructor() {
|
|
703
703
|
this.updateFinished();
|
|
704
704
|
}
|
|
@@ -723,7 +723,7 @@ class vt {
|
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
725
|
const tr = (e) => e / 100;
|
|
726
|
-
class wt extends
|
|
726
|
+
class wt extends Tt {
|
|
727
727
|
constructor(t) {
|
|
728
728
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
729
729
|
var s, i;
|
|
@@ -733,11 +733,11 @@ class wt extends vt {
|
|
|
733
733
|
}
|
|
734
734
|
initAnimation() {
|
|
735
735
|
const { options: t } = this;
|
|
736
|
-
|
|
736
|
+
Gn(t);
|
|
737
737
|
const { type: n = Z, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = t;
|
|
738
738
|
let { keyframes: a } = t;
|
|
739
739
|
const c = n || Z;
|
|
740
|
-
process.env.NODE_ENV !== "production" && c !== Z &&
|
|
740
|
+
process.env.NODE_ENV !== "production" && c !== Z && Y(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`), c !== Z && typeof a[0] != "number" && (this.mixKeyframes = Re(tr, Wn(a[0], a[1])), a = [0, 100]);
|
|
741
741
|
const l = c({ ...t, keyframes: a });
|
|
742
742
|
r === "mirror" && (this.mirroredGenerator = c({
|
|
743
743
|
...t,
|
|
@@ -755,22 +755,22 @@ class wt extends vt {
|
|
|
755
755
|
const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: c } = this;
|
|
756
756
|
if (this.startTime === null)
|
|
757
757
|
return s.next(0);
|
|
758
|
-
const { delay: l = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: h, type: y, onUpdate: b, finalKeyframe:
|
|
758
|
+
const { delay: l = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: h, type: y, onUpdate: b, finalKeyframe: T } = this.options;
|
|
759
759
|
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);
|
|
760
|
-
const p = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1),
|
|
760
|
+
const p = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), V = this.playbackSpeed >= 0 ? p < 0 : p > i;
|
|
761
761
|
this.currentTime = Math.max(p, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
762
762
|
let g = this.currentTime, x = s;
|
|
763
763
|
if (d) {
|
|
764
764
|
const w = Math.min(this.currentTime, i) / a;
|
|
765
|
-
let
|
|
766
|
-
!O && w >= 1 && (O = 1), O === 1 &&
|
|
765
|
+
let R = Math.floor(w), O = w % 1;
|
|
766
|
+
!O && w >= 1 && (O = 1), O === 1 && R--, R = Math.min(R, d + 1), !!(R % 2) && (f === "reverse" ? (O = 1 - O, h && (O -= h / a)) : f === "mirror" && (x = o)), g = H(0, 1, O) * a;
|
|
767
767
|
}
|
|
768
|
-
const
|
|
769
|
-
r && (
|
|
770
|
-
let { done:
|
|
771
|
-
!
|
|
772
|
-
const C = this.holdTime === null && (this.state === "finished" || this.state === "running" &&
|
|
773
|
-
return C && y !==
|
|
768
|
+
const v = V ? { done: !1, value: u[0] } : x.next(g);
|
|
769
|
+
r && (v.value = r(v.value));
|
|
770
|
+
let { done: S } = v;
|
|
771
|
+
!V && c !== null && (S = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
772
|
+
const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && S);
|
|
773
|
+
return C && y !== Xe && (v.value = vt(u, this.options, T, this.speed)), b && b(v.value), C && this.finish(), v;
|
|
774
774
|
}
|
|
775
775
|
/**
|
|
776
776
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -788,7 +788,7 @@ class wt extends vt {
|
|
|
788
788
|
}
|
|
789
789
|
set time(t) {
|
|
790
790
|
var n;
|
|
791
|
-
t = /* @__PURE__ */
|
|
791
|
+
t = /* @__PURE__ */ N(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), (n = this.driver) == null || n.start(!1);
|
|
792
792
|
}
|
|
793
793
|
get speed() {
|
|
794
794
|
return this.playbackSpeed;
|
|
@@ -839,9 +839,9 @@ function nr(e) {
|
|
|
839
839
|
for (let t = 1; t < e.length; t++)
|
|
840
840
|
e[t] ?? (e[t] = e[t - 1]);
|
|
841
841
|
}
|
|
842
|
-
const
|
|
843
|
-
const t =
|
|
844
|
-
return
|
|
842
|
+
const _ = (e) => e * 180 / Math.PI, qe = (e) => {
|
|
843
|
+
const t = _(Math.atan2(e[1], e[0]));
|
|
844
|
+
return Ze(t);
|
|
845
845
|
}, sr = {
|
|
846
846
|
x: 4,
|
|
847
847
|
y: 5,
|
|
@@ -850,12 +850,12 @@ const z = (e) => e * 180 / Math.PI, Xe = (e) => {
|
|
|
850
850
|
scaleX: 0,
|
|
851
851
|
scaleY: 3,
|
|
852
852
|
scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
|
|
853
|
-
rotate:
|
|
854
|
-
rotateZ:
|
|
855
|
-
skewX: (e) =>
|
|
856
|
-
skewY: (e) =>
|
|
853
|
+
rotate: qe,
|
|
854
|
+
rotateZ: qe,
|
|
855
|
+
skewX: (e) => _(Math.atan(e[1])),
|
|
856
|
+
skewY: (e) => _(Math.atan(e[2])),
|
|
857
857
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
|
|
858
|
-
},
|
|
858
|
+
}, Ze = (e) => (e = e % 360, e < 0 && (e += 360), e), _t = qe, Gt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), zt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), ir = {
|
|
859
859
|
x: 12,
|
|
860
860
|
y: 13,
|
|
861
861
|
z: 14,
|
|
@@ -863,22 +863,22 @@ const z = (e) => e * 180 / Math.PI, Xe = (e) => {
|
|
|
863
863
|
translateY: 13,
|
|
864
864
|
translateZ: 14,
|
|
865
865
|
scaleX: Gt,
|
|
866
|
-
scaleY:
|
|
867
|
-
scale: (e) => (Gt(e) +
|
|
868
|
-
rotateX: (e) =>
|
|
869
|
-
rotateY: (e) =>
|
|
870
|
-
rotateZ:
|
|
871
|
-
rotate:
|
|
872
|
-
skewX: (e) =>
|
|
873
|
-
skewY: (e) =>
|
|
866
|
+
scaleY: zt,
|
|
867
|
+
scale: (e) => (Gt(e) + zt(e)) / 2,
|
|
868
|
+
rotateX: (e) => Ze(_(Math.atan2(e[6], e[5]))),
|
|
869
|
+
rotateY: (e) => Ze(_(Math.atan2(-e[2], e[0]))),
|
|
870
|
+
rotateZ: _t,
|
|
871
|
+
rotate: _t,
|
|
872
|
+
skewX: (e) => _(Math.atan(e[4])),
|
|
873
|
+
skewY: (e) => _(Math.atan(e[1])),
|
|
874
874
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
|
|
875
875
|
};
|
|
876
|
-
function
|
|
876
|
+
function Je(e) {
|
|
877
877
|
return e.includes("scale") ? 1 : 0;
|
|
878
878
|
}
|
|
879
|
-
function
|
|
879
|
+
function Qe(e, t) {
|
|
880
880
|
if (!e || e === "none")
|
|
881
|
-
return
|
|
881
|
+
return Je(t);
|
|
882
882
|
const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
883
883
|
let s, i;
|
|
884
884
|
if (n)
|
|
@@ -888,18 +888,18 @@ function Je(e, t) {
|
|
|
888
888
|
s = sr, i = a;
|
|
889
889
|
}
|
|
890
890
|
if (!i)
|
|
891
|
-
return
|
|
891
|
+
return Je(t);
|
|
892
892
|
const r = s[t], o = i[1].split(",").map(or);
|
|
893
893
|
return typeof r == "function" ? r(o) : o[r];
|
|
894
894
|
}
|
|
895
895
|
const rr = (e, t) => {
|
|
896
896
|
const { transform: n = "none" } = getComputedStyle(e);
|
|
897
|
-
return
|
|
897
|
+
return Qe(n, t);
|
|
898
898
|
};
|
|
899
899
|
function or(e) {
|
|
900
900
|
return parseFloat(e.trim());
|
|
901
901
|
}
|
|
902
|
-
const
|
|
902
|
+
const ie = [
|
|
903
903
|
"transformPerspective",
|
|
904
904
|
"x",
|
|
905
905
|
"y",
|
|
@@ -917,7 +917,7 @@ const re = [
|
|
|
917
917
|
"skew",
|
|
918
918
|
"skewX",
|
|
919
919
|
"skewY"
|
|
920
|
-
],
|
|
920
|
+
], re = new Set(ie), Ut = (e) => e === ne || e === m, ar = /* @__PURE__ */ new Set(["x", "y", "z"]), ur = ie.filter((e) => !ar.has(e));
|
|
921
921
|
function cr(e) {
|
|
922
922
|
const t = [];
|
|
923
923
|
return ur.forEach((n) => {
|
|
@@ -925,7 +925,7 @@ function cr(e) {
|
|
|
925
925
|
s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
926
926
|
}), t;
|
|
927
927
|
}
|
|
928
|
-
const
|
|
928
|
+
const z = {
|
|
929
929
|
// Dimensions
|
|
930
930
|
width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
931
931
|
height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
@@ -934,16 +934,16 @@ const U = {
|
|
|
934
934
|
bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
|
|
935
935
|
right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
|
|
936
936
|
// Transform
|
|
937
|
-
x: (e, { transform: t }) =>
|
|
938
|
-
y: (e, { transform: t }) =>
|
|
937
|
+
x: (e, { transform: t }) => Qe(t, "x"),
|
|
938
|
+
y: (e, { transform: t }) => Qe(t, "y")
|
|
939
939
|
};
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
const
|
|
943
|
-
let
|
|
944
|
-
function
|
|
945
|
-
if (
|
|
946
|
-
const e = Array.from(
|
|
940
|
+
z.translateX = z.x;
|
|
941
|
+
z.translateY = z.y;
|
|
942
|
+
const U = /* @__PURE__ */ new Set();
|
|
943
|
+
let et = !1, tt = !1, nt = !1;
|
|
944
|
+
function zn() {
|
|
945
|
+
if (tt) {
|
|
946
|
+
const e = Array.from(U).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
947
947
|
t.forEach((s) => {
|
|
948
948
|
const i = cr(s);
|
|
949
949
|
i.length && (n.set(s, i), s.render());
|
|
@@ -958,22 +958,22 @@ function Gn() {
|
|
|
958
958
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
959
959
|
});
|
|
960
960
|
}
|
|
961
|
-
|
|
961
|
+
tt = !1, et = !1, U.forEach((e) => e.complete(nt)), U.clear();
|
|
962
962
|
}
|
|
963
963
|
function Un() {
|
|
964
|
-
|
|
965
|
-
e.readKeyframes(), e.needsMeasurement && (
|
|
964
|
+
U.forEach((e) => {
|
|
965
|
+
e.readKeyframes(), e.needsMeasurement && (tt = !0);
|
|
966
966
|
});
|
|
967
967
|
}
|
|
968
968
|
function lr() {
|
|
969
|
-
|
|
969
|
+
nt = !0, Un(), zn(), nt = !1;
|
|
970
970
|
}
|
|
971
|
-
class
|
|
971
|
+
class Vt {
|
|
972
972
|
constructor(t, n, s, i, r, o = !1) {
|
|
973
973
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
|
|
974
974
|
}
|
|
975
975
|
scheduleResolve() {
|
|
976
|
-
this.state = "scheduled", this.isAsync ? (
|
|
976
|
+
this.state = "scheduled", this.isAsync ? (U.add(this), et || (et = !0, k.read(Un), k.resolveKeyframes(zn))) : (this.readKeyframes(), this.complete());
|
|
977
977
|
}
|
|
978
978
|
readKeyframes() {
|
|
979
979
|
const { unresolvedKeyframes: t, name: n, element: s, motionValue: i } = this;
|
|
@@ -998,10 +998,10 @@ class St {
|
|
|
998
998
|
measureEndState() {
|
|
999
999
|
}
|
|
1000
1000
|
complete(t = !1) {
|
|
1001
|
-
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t),
|
|
1001
|
+
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), U.delete(this);
|
|
1002
1002
|
}
|
|
1003
1003
|
cancel() {
|
|
1004
|
-
this.state === "scheduled" && (
|
|
1004
|
+
this.state === "scheduled" && (U.delete(this), this.state = "pending");
|
|
1005
1005
|
}
|
|
1006
1006
|
resume() {
|
|
1007
1007
|
this.state === "pending" && this.scheduleResolve();
|
|
@@ -1023,20 +1023,20 @@ const Hn = /* @__PURE__ */ mr(() => {
|
|
|
1023
1023
|
return !1;
|
|
1024
1024
|
}
|
|
1025
1025
|
return !0;
|
|
1026
|
-
}, "linearEasing"),
|
|
1026
|
+
}, "linearEasing"), ae = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, Ht = {
|
|
1027
1027
|
linear: "linear",
|
|
1028
1028
|
ease: "ease",
|
|
1029
1029
|
easeIn: "ease-in",
|
|
1030
1030
|
easeOut: "ease-out",
|
|
1031
1031
|
easeInOut: "ease-in-out",
|
|
1032
|
-
circIn: /* @__PURE__ */
|
|
1033
|
-
circOut: /* @__PURE__ */
|
|
1034
|
-
backIn: /* @__PURE__ */
|
|
1035
|
-
backOut: /* @__PURE__ */
|
|
1032
|
+
circIn: /* @__PURE__ */ ae([0, 0.65, 0.55, 1]),
|
|
1033
|
+
circOut: /* @__PURE__ */ ae([0.55, 0, 1, 0.45]),
|
|
1034
|
+
backIn: /* @__PURE__ */ ae([0.31, 0.01, 0.66, -0.59]),
|
|
1035
|
+
backOut: /* @__PURE__ */ ae([0.33, 1.53, 0.69, 0.99])
|
|
1036
1036
|
};
|
|
1037
1037
|
function Yn(e, t) {
|
|
1038
1038
|
if (e)
|
|
1039
|
-
return typeof e == "function" ? Hn() ? jn(e, t) : "ease-out" :
|
|
1039
|
+
return typeof e == "function" ? Hn() ? jn(e, t) : "ease-out" : Rn(e) ? ae(e) : Array.isArray(e) ? e.map((n) => Yn(n, t) || Ht.easeOut) : Ht[e];
|
|
1040
1040
|
}
|
|
1041
1041
|
function gr(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times: c } = {}, l = void 0) {
|
|
1042
1042
|
const u = {
|
|
@@ -1061,16 +1061,16 @@ function Xn(e) {
|
|
|
1061
1061
|
function yr({ type: e, ...t }) {
|
|
1062
1062
|
return Xn(e) && Hn() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
|
|
1063
1063
|
}
|
|
1064
|
-
class br extends
|
|
1064
|
+
class br extends Tt {
|
|
1065
1065
|
constructor(t) {
|
|
1066
1066
|
if (super(), this.finishedTime = null, this.isStopped = !1, !t)
|
|
1067
1067
|
return;
|
|
1068
1068
|
const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: c } = t;
|
|
1069
|
-
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = t,
|
|
1069
|
+
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = t, Y(typeof t.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
|
|
1070
1070
|
const l = yr(t);
|
|
1071
1071
|
this.animation = gr(n, s, i, l, r), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1072
1072
|
if (this.finishedTime = this.time, !r) {
|
|
1073
|
-
const u =
|
|
1073
|
+
const u = vt(i, this.options, a, this.speed);
|
|
1074
1074
|
this.updateMotionValue ? this.updateMotionValue(u) : dr(n, s, u), this.animation.cancel();
|
|
1075
1075
|
}
|
|
1076
1076
|
c == null || c(), this.notifyFinished();
|
|
@@ -1124,7 +1124,7 @@ class br extends vt {
|
|
|
1124
1124
|
return /* @__PURE__ */ B(Number(this.animation.currentTime) || 0);
|
|
1125
1125
|
}
|
|
1126
1126
|
set time(t) {
|
|
1127
|
-
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */
|
|
1127
|
+
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ N(t);
|
|
1128
1128
|
}
|
|
1129
1129
|
/**
|
|
1130
1130
|
* The playback speed of the animation.
|
|
@@ -1150,7 +1150,7 @@ class br extends vt {
|
|
|
1150
1150
|
*/
|
|
1151
1151
|
attachTimeline({ timeline: t, observe: n }) {
|
|
1152
1152
|
var s;
|
|
1153
|
-
return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && hr() ? (this.animation.timeline = t,
|
|
1153
|
+
return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && hr() ? (this.animation.timeline = t, te) : n(this);
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
1156
|
const qn = {
|
|
@@ -1158,16 +1158,16 @@ const qn = {
|
|
|
1158
1158
|
backInOut: Cn,
|
|
1159
1159
|
circInOut: Fn
|
|
1160
1160
|
};
|
|
1161
|
-
function
|
|
1161
|
+
function vr(e) {
|
|
1162
1162
|
return e in qn;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1165
|
-
typeof e.ease == "string" &&
|
|
1164
|
+
function Tr(e) {
|
|
1165
|
+
typeof e.ease == "string" && vr(e.ease) && (e.ease = qn[e.ease]);
|
|
1166
1166
|
}
|
|
1167
|
-
const
|
|
1167
|
+
const Yt = 10;
|
|
1168
1168
|
class wr extends br {
|
|
1169
1169
|
constructor(t) {
|
|
1170
|
-
|
|
1170
|
+
Tr(t), Gn(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
|
|
1171
1171
|
}
|
|
1172
1172
|
/**
|
|
1173
1173
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -1188,14 +1188,14 @@ class wr extends br {
|
|
|
1188
1188
|
const a = new wt({
|
|
1189
1189
|
...o,
|
|
1190
1190
|
autoplay: !1
|
|
1191
|
-
}), c = /* @__PURE__ */
|
|
1192
|
-
n.setWithVelocity(a.sample(c -
|
|
1191
|
+
}), c = /* @__PURE__ */ N(this.finishedTime ?? this.time);
|
|
1192
|
+
n.setWithVelocity(a.sample(c - Yt).value, a.sample(c).value, Yt), a.stop();
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
|
-
const
|
|
1196
|
-
(
|
|
1195
|
+
const Xt = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
1196
|
+
(se.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
1197
1197
|
!e.startsWith("url("));
|
|
1198
|
-
function
|
|
1198
|
+
function Vr(e) {
|
|
1199
1199
|
const t = e[0];
|
|
1200
1200
|
if (e.length === 1)
|
|
1201
1201
|
return !0;
|
|
@@ -1203,14 +1203,14 @@ function Sr(e) {
|
|
|
1203
1203
|
if (e[n] !== t)
|
|
1204
1204
|
return !0;
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function Sr(e, t, n, s) {
|
|
1207
1207
|
const i = e[0];
|
|
1208
1208
|
if (i === null)
|
|
1209
1209
|
return !1;
|
|
1210
1210
|
if (t === "display" || t === "visibility")
|
|
1211
1211
|
return !0;
|
|
1212
|
-
const r = e[e.length - 1], o =
|
|
1213
|
-
return
|
|
1212
|
+
const r = e[e.length - 1], o = Xt(i, t), a = Xt(r, t);
|
|
1213
|
+
return pe(o === a, `You are trying to animate ${t} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !o || !a ? !1 : Vr(e) || (n === "spring" || Xn(n)) && s;
|
|
1214
1214
|
}
|
|
1215
1215
|
function Zn(e) {
|
|
1216
1216
|
return ni(e) && "offsetHeight" in e;
|
|
@@ -1236,12 +1236,12 @@ function Mr(e) {
|
|
|
1236
1236
|
!a && !s && i !== "mirror" && r !== 0 && o !== "inertia";
|
|
1237
1237
|
}
|
|
1238
1238
|
const Cr = 40;
|
|
1239
|
-
class Pr extends
|
|
1239
|
+
class Pr extends Tt {
|
|
1240
1240
|
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 }) {
|
|
1241
1241
|
var y;
|
|
1242
1242
|
super(), this.stop = () => {
|
|
1243
|
-
var b,
|
|
1244
|
-
this._animation && (this._animation.stop(), (b = this.stopTimeline) == null || b.call(this)), (
|
|
1243
|
+
var b, T;
|
|
1244
|
+
this._animation && (this._animation.stop(), (b = this.stopTimeline) == null || b.call(this)), (T = this.keyframeResolver) == null || T.cancel();
|
|
1245
1245
|
}, this.createdAt = I.now();
|
|
1246
1246
|
const f = {
|
|
1247
1247
|
autoplay: t,
|
|
@@ -1254,13 +1254,13 @@ class Pr extends vt {
|
|
|
1254
1254
|
motionValue: l,
|
|
1255
1255
|
element: u,
|
|
1256
1256
|
...d
|
|
1257
|
-
}, h = (u == null ? void 0 : u.KeyframeResolver) ||
|
|
1258
|
-
this.keyframeResolver = new h(a, (b,
|
|
1257
|
+
}, h = (u == null ? void 0 : u.KeyframeResolver) || Vt;
|
|
1258
|
+
this.keyframeResolver = new h(a, (b, T, p) => this.onKeyframesResolved(b, T, f, !p), c, l, u), (y = this.keyframeResolver) == null || y.scheduleResolve();
|
|
1259
1259
|
}
|
|
1260
1260
|
onKeyframesResolved(t, n, s, i) {
|
|
1261
1261
|
this.keyframeResolver = void 0;
|
|
1262
1262
|
const { name: r, type: o, velocity: a, delay: c, isHandoff: l, onUpdate: u } = s;
|
|
1263
|
-
this.resolvedAt = I.now(),
|
|
1263
|
+
this.resolvedAt = I.now(), Sr(t, r, o, a) || ((K.instantAnimations || !c) && (u == null || u(vt(t, s, n))), t[0] = t[t.length - 1], s.duration = 0, s.repeat = 0);
|
|
1264
1264
|
const f = {
|
|
1265
1265
|
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Cr ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1266
1266
|
finalKeyframe: n,
|
|
@@ -1270,7 +1270,7 @@ class Pr extends vt {
|
|
|
1270
1270
|
...f,
|
|
1271
1271
|
element: f.motionValue.owner.current
|
|
1272
1272
|
}) : new wt(f);
|
|
1273
|
-
h.finished.then(() => this.notifyFinished()).catch(
|
|
1273
|
+
h.finished.then(() => this.notifyFinished()).catch(te), this.pendingTimeline && (this.stopTimeline = h.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = h;
|
|
1274
1274
|
}
|
|
1275
1275
|
get finished() {
|
|
1276
1276
|
return this._animation ? this.animation.finished : this._finished;
|
|
@@ -1325,17 +1325,17 @@ const Fr = (
|
|
|
1325
1325
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1326
1326
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1327
1327
|
);
|
|
1328
|
-
function
|
|
1328
|
+
function Dr(e) {
|
|
1329
1329
|
const t = Fr.exec(e);
|
|
1330
1330
|
if (!t)
|
|
1331
1331
|
return [,];
|
|
1332
1332
|
const [, n, s, i] = t;
|
|
1333
1333
|
return [`--${n ?? s}`, i];
|
|
1334
1334
|
}
|
|
1335
|
-
const
|
|
1335
|
+
const Rr = 4;
|
|
1336
1336
|
function Jn(e, t, n = 1) {
|
|
1337
|
-
|
|
1338
|
-
const [s, i] =
|
|
1337
|
+
Y(n <= Rr, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
|
|
1338
|
+
const [s, i] = Dr(e);
|
|
1339
1339
|
if (!s)
|
|
1340
1340
|
return;
|
|
1341
1341
|
const r = window.getComputedStyle(t).getPropertyValue(s);
|
|
@@ -1355,11 +1355,11 @@ const es = /* @__PURE__ */ new Set([
|
|
|
1355
1355
|
"left",
|
|
1356
1356
|
"right",
|
|
1357
1357
|
"bottom",
|
|
1358
|
-
...
|
|
1358
|
+
...ie
|
|
1359
1359
|
]), Or = {
|
|
1360
1360
|
test: (e) => e === "auto",
|
|
1361
1361
|
parse: (e) => e
|
|
1362
|
-
}, ts = (e) => (t) => t.test(e), ns = [
|
|
1362
|
+
}, ts = (e) => (t) => t.test(e), ns = [ne, m, J, $, Vi, wi, Or], qt = (e) => ns.find(ts(e));
|
|
1363
1363
|
function Ir(e) {
|
|
1364
1364
|
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || bn(e) : !0;
|
|
1365
1365
|
}
|
|
@@ -1375,24 +1375,24 @@ function kr(e) {
|
|
|
1375
1375
|
let r = Er.has(t) ? 1 : 0;
|
|
1376
1376
|
return s !== n && (r *= 100), t + "(" + r + i + ")";
|
|
1377
1377
|
}
|
|
1378
|
-
const
|
|
1379
|
-
...
|
|
1378
|
+
const Nr = /\b([a-z-]*)\(.*?\)/gu, st = {
|
|
1379
|
+
...se,
|
|
1380
1380
|
getAnimatableNone: (e) => {
|
|
1381
|
-
const t = e.match(
|
|
1381
|
+
const t = e.match(Nr);
|
|
1382
1382
|
return t ? t.map(kr).join(" ") : e;
|
|
1383
1383
|
}
|
|
1384
|
-
},
|
|
1385
|
-
...
|
|
1384
|
+
}, Zt = {
|
|
1385
|
+
...ne,
|
|
1386
1386
|
transform: Math.round
|
|
1387
|
-
},
|
|
1387
|
+
}, Lr = {
|
|
1388
1388
|
rotate: $,
|
|
1389
1389
|
rotateX: $,
|
|
1390
1390
|
rotateY: $,
|
|
1391
1391
|
rotateZ: $,
|
|
1392
|
-
scale:
|
|
1393
|
-
scaleX:
|
|
1394
|
-
scaleY:
|
|
1395
|
-
scaleZ:
|
|
1392
|
+
scale: Te,
|
|
1393
|
+
scaleX: Te,
|
|
1394
|
+
scaleY: Te,
|
|
1395
|
+
scaleZ: Te,
|
|
1396
1396
|
skew: $,
|
|
1397
1397
|
skewX: $,
|
|
1398
1398
|
skewY: $,
|
|
@@ -1405,11 +1405,11 @@ const Lr = /\b([a-z-]*)\(.*?\)/gu, nt = {
|
|
|
1405
1405
|
z: m,
|
|
1406
1406
|
perspective: m,
|
|
1407
1407
|
transformPerspective: m,
|
|
1408
|
-
opacity:
|
|
1408
|
+
opacity: le,
|
|
1409
1409
|
originX: Bt,
|
|
1410
1410
|
originY: Bt,
|
|
1411
1411
|
originZ: m
|
|
1412
|
-
},
|
|
1412
|
+
}, St = {
|
|
1413
1413
|
// Border props
|
|
1414
1414
|
borderWidth: m,
|
|
1415
1415
|
borderTopWidth: m,
|
|
@@ -1445,14 +1445,14 @@ const Lr = /\b([a-z-]*)\(.*?\)/gu, nt = {
|
|
|
1445
1445
|
// Misc
|
|
1446
1446
|
backgroundPositionX: m,
|
|
1447
1447
|
backgroundPositionY: m,
|
|
1448
|
-
...
|
|
1449
|
-
zIndex:
|
|
1448
|
+
...Lr,
|
|
1449
|
+
zIndex: Zt,
|
|
1450
1450
|
// SVG
|
|
1451
|
-
fillOpacity:
|
|
1452
|
-
strokeOpacity:
|
|
1453
|
-
numOctaves:
|
|
1451
|
+
fillOpacity: le,
|
|
1452
|
+
strokeOpacity: le,
|
|
1453
|
+
numOctaves: Zt
|
|
1454
1454
|
}, Br = {
|
|
1455
|
-
...
|
|
1455
|
+
...St,
|
|
1456
1456
|
// Color props
|
|
1457
1457
|
color: M,
|
|
1458
1458
|
backgroundColor: M,
|
|
@@ -1465,25 +1465,25 @@ const Lr = /\b([a-z-]*)\(.*?\)/gu, nt = {
|
|
|
1465
1465
|
borderRightColor: M,
|
|
1466
1466
|
borderBottomColor: M,
|
|
1467
1467
|
borderLeftColor: M,
|
|
1468
|
-
filter:
|
|
1469
|
-
WebkitFilter:
|
|
1468
|
+
filter: st,
|
|
1469
|
+
WebkitFilter: st
|
|
1470
1470
|
}, ss = (e) => Br[e];
|
|
1471
1471
|
function is(e, t) {
|
|
1472
1472
|
let n = ss(e);
|
|
1473
|
-
return n !==
|
|
1473
|
+
return n !== st && (n = se), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
|
|
1474
1474
|
}
|
|
1475
1475
|
const Kr = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1476
1476
|
function $r(e, t, n) {
|
|
1477
1477
|
let s = 0, i;
|
|
1478
1478
|
for (; s < e.length && !i; ) {
|
|
1479
1479
|
const r = e[s];
|
|
1480
|
-
typeof r == "string" && !Kr.has(r) &&
|
|
1480
|
+
typeof r == "string" && !Kr.has(r) && fe(r).values.length && (i = e[s]), s++;
|
|
1481
1481
|
}
|
|
1482
1482
|
if (i && n)
|
|
1483
1483
|
for (const r of t)
|
|
1484
1484
|
e[r] = is(n, i);
|
|
1485
1485
|
}
|
|
1486
|
-
class Wr extends
|
|
1486
|
+
class Wr extends Vt {
|
|
1487
1487
|
constructor(t, n, s, i, r) {
|
|
1488
1488
|
super(t, n, s, i, r, !0);
|
|
1489
1489
|
}
|
|
@@ -1501,14 +1501,14 @@ class Wr extends St {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
if (this.resolveNoneKeyframes(), !es.has(s) || t.length !== 2)
|
|
1503
1503
|
return;
|
|
1504
|
-
const [i, r] = t, o =
|
|
1504
|
+
const [i, r] = t, o = qt(i), a = qt(r);
|
|
1505
1505
|
if (o !== a)
|
|
1506
|
-
if (
|
|
1506
|
+
if (Ut(o) && Ut(a))
|
|
1507
1507
|
for (let c = 0; c < t.length; c++) {
|
|
1508
1508
|
const l = t[c];
|
|
1509
1509
|
typeof l == "string" && (t[c] = parseFloat(l));
|
|
1510
1510
|
}
|
|
1511
|
-
else
|
|
1511
|
+
else z[s] && (this.needsMeasurement = !0);
|
|
1512
1512
|
}
|
|
1513
1513
|
resolveNoneKeyframes() {
|
|
1514
1514
|
const { unresolvedKeyframes: t, name: n } = this, s = [];
|
|
@@ -1520,7 +1520,7 @@ class Wr extends St {
|
|
|
1520
1520
|
const { element: t, unresolvedKeyframes: n, name: s } = this;
|
|
1521
1521
|
if (!t || !t.current)
|
|
1522
1522
|
return;
|
|
1523
|
-
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin =
|
|
1523
|
+
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = z[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
|
|
1524
1524
|
const i = n[n.length - 1];
|
|
1525
1525
|
i !== void 0 && t.getValue(s, i).jump(i, !1);
|
|
1526
1526
|
}
|
|
@@ -1532,7 +1532,7 @@ class Wr extends St {
|
|
|
1532
1532
|
const i = t.getValue(n);
|
|
1533
1533
|
i && i.jump(this.measuredOrigin, !1);
|
|
1534
1534
|
const r = s.length - 1, o = s[r];
|
|
1535
|
-
s[r] =
|
|
1535
|
+
s[r] = z[n](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([c, l]) => {
|
|
1536
1536
|
t.getValue(c).set(l);
|
|
1537
1537
|
}), this.resolveNoneKeyframes();
|
|
1538
1538
|
}
|
|
@@ -1541,13 +1541,14 @@ function jr(e, t, n) {
|
|
|
1541
1541
|
if (e instanceof EventTarget)
|
|
1542
1542
|
return [e];
|
|
1543
1543
|
if (typeof e == "string") {
|
|
1544
|
-
|
|
1544
|
+
let s = document;
|
|
1545
|
+
const i = (n == null ? void 0 : n[e]) ?? s.querySelectorAll(e);
|
|
1545
1546
|
return i ? Array.from(i) : [];
|
|
1546
1547
|
}
|
|
1547
1548
|
return Array.from(e);
|
|
1548
1549
|
}
|
|
1549
|
-
const rs = (e, t) => t && typeof e == "number" ? t.transform(e) : e,
|
|
1550
|
-
class
|
|
1550
|
+
const rs = (e, t) => t && typeof e == "number" ? t.transform(e) : e, Jt = 30, _r = (e) => !isNaN(parseFloat(e));
|
|
1551
|
+
class Gr {
|
|
1551
1552
|
/**
|
|
1552
1553
|
* @param init - The initiating value
|
|
1553
1554
|
* @param config - Optional configuration options
|
|
@@ -1611,10 +1612,10 @@ class zr {
|
|
|
1611
1612
|
* @deprecated
|
|
1612
1613
|
*/
|
|
1613
1614
|
onChange(t) {
|
|
1614
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1615
|
+
return process.env.NODE_ENV !== "production" && Vn(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
1615
1616
|
}
|
|
1616
1617
|
on(t, n) {
|
|
1617
|
-
this.events[t] || (this.events[t] = new
|
|
1618
|
+
this.events[t] || (this.events[t] = new Tn());
|
|
1618
1619
|
const s = this.events[t].add(n);
|
|
1619
1620
|
return t === "change" ? () => {
|
|
1620
1621
|
s(), k.read(() => {
|
|
@@ -1695,9 +1696,9 @@ class zr {
|
|
|
1695
1696
|
*/
|
|
1696
1697
|
getVelocity() {
|
|
1697
1698
|
const t = I.now();
|
|
1698
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt >
|
|
1699
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Jt)
|
|
1699
1700
|
return 0;
|
|
1700
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
1701
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, Jt);
|
|
1701
1702
|
return wn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1702
1703
|
}
|
|
1703
1704
|
/**
|
|
@@ -1751,10 +1752,9 @@ class zr {
|
|
|
1751
1752
|
}
|
|
1752
1753
|
}
|
|
1753
1754
|
function Pe(e, t) {
|
|
1754
|
-
return new
|
|
1755
|
+
return new Gr(e, t);
|
|
1755
1756
|
}
|
|
1756
|
-
const { schedule:
|
|
1757
|
-
x: !1,
|
|
1757
|
+
const { schedule: zr } = /* @__PURE__ */ On(queueMicrotask, !1), Ur = {
|
|
1758
1758
|
y: !1
|
|
1759
1759
|
};
|
|
1760
1760
|
function Hr() {
|
|
@@ -1768,18 +1768,18 @@ function os(e, t) {
|
|
|
1768
1768
|
};
|
|
1769
1769
|
return [n, i, () => s.abort()];
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1771
|
+
function Qt(e) {
|
|
1772
1772
|
return !(e.pointerType === "touch" || Hr());
|
|
1773
1773
|
}
|
|
1774
1774
|
function Yr(e, t, n = {}) {
|
|
1775
1775
|
const [s, i, r] = os(e, n), o = (a) => {
|
|
1776
|
-
if (!
|
|
1776
|
+
if (!Qt(a))
|
|
1777
1777
|
return;
|
|
1778
1778
|
const { target: c } = a, l = t(c, a);
|
|
1779
1779
|
if (typeof l != "function" || !c)
|
|
1780
1780
|
return;
|
|
1781
1781
|
const u = (d) => {
|
|
1782
|
-
|
|
1782
|
+
Qt(d) && (l(d), c.removeEventListener("pointerleave", u));
|
|
1783
1783
|
};
|
|
1784
1784
|
c.addEventListener("pointerleave", u, i);
|
|
1785
1785
|
};
|
|
@@ -1797,41 +1797,41 @@ const as = (e, t) => t ? e === t ? !0 : as(e, t.parentElement) : !1, Xr = (e) =>
|
|
|
1797
1797
|
function Zr(e) {
|
|
1798
1798
|
return qr.has(e.tagName) || e.tabIndex !== -1;
|
|
1799
1799
|
}
|
|
1800
|
-
const
|
|
1801
|
-
function
|
|
1800
|
+
const Se = /* @__PURE__ */ new WeakSet();
|
|
1801
|
+
function en(e) {
|
|
1802
1802
|
return (t) => {
|
|
1803
1803
|
t.key === "Enter" && e(t);
|
|
1804
1804
|
};
|
|
1805
1805
|
}
|
|
1806
|
-
function
|
|
1806
|
+
function je(e, t) {
|
|
1807
1807
|
e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
|
|
1808
1808
|
}
|
|
1809
1809
|
const Jr = (e, t) => {
|
|
1810
1810
|
const n = e.currentTarget;
|
|
1811
1811
|
if (!n)
|
|
1812
1812
|
return;
|
|
1813
|
-
const s =
|
|
1814
|
-
if (
|
|
1813
|
+
const s = en(() => {
|
|
1814
|
+
if (Se.has(n))
|
|
1815
1815
|
return;
|
|
1816
|
-
|
|
1817
|
-
const i =
|
|
1818
|
-
|
|
1819
|
-
}), r = () =>
|
|
1816
|
+
je(n, "down");
|
|
1817
|
+
const i = en(() => {
|
|
1818
|
+
je(n, "up");
|
|
1819
|
+
}), r = () => je(n, "cancel");
|
|
1820
1820
|
n.addEventListener("keyup", i, t), n.addEventListener("blur", r, t);
|
|
1821
1821
|
});
|
|
1822
1822
|
n.addEventListener("keydown", s, t), n.addEventListener("blur", () => n.removeEventListener("keydown", s), t);
|
|
1823
1823
|
};
|
|
1824
|
-
function
|
|
1824
|
+
function tn(e) {
|
|
1825
1825
|
return Xr(e) && !0;
|
|
1826
1826
|
}
|
|
1827
1827
|
function Qr(e, t, n = {}) {
|
|
1828
1828
|
const [s, i, r] = os(e, n), o = (a) => {
|
|
1829
1829
|
const c = a.currentTarget;
|
|
1830
|
-
if (!
|
|
1830
|
+
if (!tn(a))
|
|
1831
1831
|
return;
|
|
1832
|
-
|
|
1832
|
+
Se.add(c);
|
|
1833
1833
|
const l = t(c, a), u = (h, y) => {
|
|
1834
|
-
window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f),
|
|
1834
|
+
window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), Se.has(c) && Se.delete(c), tn(h) && typeof l == "function" && l(h, { success: y });
|
|
1835
1835
|
}, d = (h) => {
|
|
1836
1836
|
u(h, c === window || c === document || n.useGlobalTarget || as(c, h.target));
|
|
1837
1837
|
}, f = (h) => {
|
|
@@ -1843,11 +1843,11 @@ function Qr(e, t, n = {}) {
|
|
|
1843
1843
|
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), Zn(a) && (a.addEventListener("focus", (l) => Jr(l, i)), !Zr(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
1844
1844
|
}), r;
|
|
1845
1845
|
}
|
|
1846
|
-
const
|
|
1846
|
+
const D = (e) => !!(e && e.getVelocity), eo = [...ns, M, se], to = (e) => eo.find(ts(e)), us = ee({
|
|
1847
1847
|
transformPagePoint: (e) => e,
|
|
1848
1848
|
isStatic: !1,
|
|
1849
1849
|
reducedMotion: "never"
|
|
1850
|
-
}), xt = ee({ strict: !1 }),
|
|
1850
|
+
}), xt = ee({ strict: !1 }), nn = {
|
|
1851
1851
|
animation: [
|
|
1852
1852
|
"animate",
|
|
1853
1853
|
"variants",
|
|
@@ -1867,11 +1867,11 @@ const R = (e) => !!(e && e.getVelocity), eo = [...ns, M, ie], to = (e) => eo.fin
|
|
|
1867
1867
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
1868
1868
|
layout: ["layout", "layoutId"]
|
|
1869
1869
|
}, Q = {};
|
|
1870
|
-
for (const e in
|
|
1870
|
+
for (const e in nn)
|
|
1871
1871
|
Q[e] = {
|
|
1872
|
-
isEnabled: (t) =>
|
|
1872
|
+
isEnabled: (t) => nn[e].some((n) => !!t[n])
|
|
1873
1873
|
};
|
|
1874
|
-
function
|
|
1874
|
+
function sn(e) {
|
|
1875
1875
|
for (const t in e)
|
|
1876
1876
|
Q[t] = {
|
|
1877
1877
|
...Q[t],
|
|
@@ -1879,18 +1879,18 @@ function st(e) {
|
|
|
1879
1879
|
};
|
|
1880
1880
|
}
|
|
1881
1881
|
function no({ children: e, features: t, strict: n = !1 }) {
|
|
1882
|
-
const [, s] = Us(!
|
|
1883
|
-
if (!
|
|
1882
|
+
const [, s] = Us(!_e(t)), i = ue(void 0);
|
|
1883
|
+
if (!_e(t)) {
|
|
1884
1884
|
const { renderer: r, ...o } = t;
|
|
1885
|
-
i.current = r,
|
|
1885
|
+
i.current = r, sn(o);
|
|
1886
1886
|
}
|
|
1887
1887
|
return ct(() => {
|
|
1888
|
-
|
|
1889
|
-
|
|
1888
|
+
_e(t) && t().then(({ renderer: r, ...o }) => {
|
|
1889
|
+
sn(o), i.current = r, s(!0);
|
|
1890
1890
|
});
|
|
1891
1891
|
}, []), F(xt.Provider, { value: { renderer: i.current, strict: n }, children: e });
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1893
|
+
function _e(e) {
|
|
1894
1894
|
return typeof e == "function";
|
|
1895
1895
|
}
|
|
1896
1896
|
const so = /* @__PURE__ */ new Set([
|
|
@@ -1947,7 +1947,7 @@ const Ie = /* @__PURE__ */ ee({});
|
|
|
1947
1947
|
function Ee(e) {
|
|
1948
1948
|
return e !== null && typeof e == "object" && typeof e.start == "function";
|
|
1949
1949
|
}
|
|
1950
|
-
function
|
|
1950
|
+
function de(e) {
|
|
1951
1951
|
return typeof e == "string" || Array.isArray(e);
|
|
1952
1952
|
}
|
|
1953
1953
|
const At = [
|
|
@@ -1960,7 +1960,7 @@ const At = [
|
|
|
1960
1960
|
"exit"
|
|
1961
1961
|
], Mt = ["initial", ...At];
|
|
1962
1962
|
function ke(e) {
|
|
1963
|
-
return Ee(e.animate) || Mt.some((t) =>
|
|
1963
|
+
return Ee(e.animate) || Mt.some((t) => de(e[t]));
|
|
1964
1964
|
}
|
|
1965
1965
|
function ls(e) {
|
|
1966
1966
|
return !!(ke(e) || e.variants);
|
|
@@ -1969,15 +1969,15 @@ function oo(e, t) {
|
|
|
1969
1969
|
if (ke(e)) {
|
|
1970
1970
|
const { initial: n, animate: s } = e;
|
|
1971
1971
|
return {
|
|
1972
|
-
initial: n === !1 ||
|
|
1973
|
-
animate:
|
|
1972
|
+
initial: n === !1 || de(n) ? n : void 0,
|
|
1973
|
+
animate: de(s) ? s : void 0
|
|
1974
1974
|
};
|
|
1975
1975
|
}
|
|
1976
1976
|
return e.inherit !== !1 ? t : {};
|
|
1977
1977
|
}
|
|
1978
1978
|
function ao(e) {
|
|
1979
1979
|
const { initial: t, animate: n } = oo(e, E(Ie));
|
|
1980
|
-
return
|
|
1980
|
+
return De(() => ({ initial: t, animate: n }), [rn(t), rn(n)]);
|
|
1981
1981
|
}
|
|
1982
1982
|
function rn(e) {
|
|
1983
1983
|
return Array.isArray(e) ? e.join(" ") : e;
|
|
@@ -2001,8 +2001,8 @@ function co(e, t, n) {
|
|
|
2001
2001
|
}
|
|
2002
2002
|
const Ct = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), lo = "framerAppearId", ds = "data-" + Ct(lo), fo = ee({});
|
|
2003
2003
|
function ho(e, t, n, s, i) {
|
|
2004
|
-
var b,
|
|
2005
|
-
const { visualElement: r } = E(Ie), o = E(xt), a = E(gn), c = E(us).reducedMotion, l =
|
|
2004
|
+
var b, T;
|
|
2005
|
+
const { visualElement: r } = E(Ie), o = E(xt), a = E(gn), c = E(us).reducedMotion, l = ue(null);
|
|
2006
2006
|
s = s || o.renderer, !l.current && s && (l.current = s(e, {
|
|
2007
2007
|
visualState: t,
|
|
2008
2008
|
parent: r,
|
|
@@ -2013,13 +2013,13 @@ function ho(e, t, n, s, i) {
|
|
|
2013
2013
|
}));
|
|
2014
2014
|
const u = l.current, d = E(fo);
|
|
2015
2015
|
u && !u.projection && i && (u.type === "html" || u.type === "svg") && po(l.current, n, i, d);
|
|
2016
|
-
const f =
|
|
2016
|
+
const f = ue(!1);
|
|
2017
2017
|
Ys(() => {
|
|
2018
2018
|
u && f.current && u.update(n, a);
|
|
2019
2019
|
});
|
|
2020
|
-
const h = n[ds], y =
|
|
2020
|
+
const h = n[ds], y = ue(!!h && !((b = window.MotionHandoffIsComplete) != null && b.call(window, h)) && ((T = window.MotionHasOptimisedAnimation) == null ? void 0 : T.call(window, h)));
|
|
2021
2021
|
return Qs(() => {
|
|
2022
|
-
u && (f.current = !0, window.MotionIsMounted = !0, u.updateFeatures(),
|
|
2022
|
+
u && (f.current = !0, window.MotionIsMounted = !0, u.updateFeatures(), zr.render(u.render), y.current && u.animationState && u.animationState.animateChanges());
|
|
2023
2023
|
}), ct(() => {
|
|
2024
2024
|
u && (!y.current && u.animationState && u.animationState.animateChanges(), y.current && (queueMicrotask(() => {
|
|
2025
2025
|
var p;
|
|
@@ -2053,7 +2053,6 @@ function hs(e) {
|
|
|
2053
2053
|
return e.options.allowProjection !== !1 ? e.projection : hs(e.parent);
|
|
2054
2054
|
}
|
|
2055
2055
|
function mo({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVisualState: s, Component: i }) {
|
|
2056
|
-
e && st(e);
|
|
2057
2056
|
function r(a, c) {
|
|
2058
2057
|
let l;
|
|
2059
2058
|
const u = {
|
|
@@ -2077,11 +2076,7 @@ function go({ layoutId: e }) {
|
|
|
2077
2076
|
return t && e !== void 0 ? t + "-" + e : e;
|
|
2078
2077
|
}
|
|
2079
2078
|
function yo(e, t) {
|
|
2080
|
-
|
|
2081
|
-
if (process.env.NODE_ENV !== "production" && t && n) {
|
|
2082
|
-
const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
2083
|
-
e.ignoreStrict ? te(!1, s) : W(!1, s);
|
|
2084
|
-
}
|
|
2079
|
+
E(xt).strict, process.env.NODE_ENV;
|
|
2085
2080
|
}
|
|
2086
2081
|
function bo(e) {
|
|
2087
2082
|
const { drag: t, layout: n } = Q;
|
|
@@ -2093,28 +2088,28 @@ function bo(e) {
|
|
|
2093
2088
|
ProjectionNode: s.ProjectionNode
|
|
2094
2089
|
};
|
|
2095
2090
|
}
|
|
2096
|
-
const
|
|
2091
|
+
const vo = {};
|
|
2097
2092
|
function ps(e, { layout: t, layoutId: n }) {
|
|
2098
|
-
return
|
|
2093
|
+
return re.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!vo[e] || e === "opacity");
|
|
2099
2094
|
}
|
|
2100
|
-
const
|
|
2095
|
+
const To = {
|
|
2101
2096
|
x: "translateX",
|
|
2102
2097
|
y: "translateY",
|
|
2103
2098
|
z: "translateZ",
|
|
2104
2099
|
transformPerspective: "perspective"
|
|
2105
|
-
}, wo =
|
|
2106
|
-
function
|
|
2100
|
+
}, wo = ie.length;
|
|
2101
|
+
function Vo(e, t, n) {
|
|
2107
2102
|
let s = "", i = !0;
|
|
2108
2103
|
for (let r = 0; r < wo; r++) {
|
|
2109
|
-
const o =
|
|
2104
|
+
const o = ie[r], a = e[o];
|
|
2110
2105
|
if (a === void 0)
|
|
2111
2106
|
continue;
|
|
2112
2107
|
let c = !0;
|
|
2113
2108
|
if (typeof a == "number" ? c = a === (o.startsWith("scale") ? 1 : 0) : c = parseFloat(a) === 0, !c || n) {
|
|
2114
|
-
const l = rs(a,
|
|
2109
|
+
const l = rs(a, St[o]);
|
|
2115
2110
|
if (!c) {
|
|
2116
2111
|
i = !1;
|
|
2117
|
-
const u =
|
|
2112
|
+
const u = To[o] || o;
|
|
2118
2113
|
s += `${u}(${l}) `;
|
|
2119
2114
|
}
|
|
2120
2115
|
n && (t[o] = l);
|
|
@@ -2127,18 +2122,18 @@ function Pt(e, t, n) {
|
|
|
2127
2122
|
let o = !1, a = !1;
|
|
2128
2123
|
for (const c in t) {
|
|
2129
2124
|
const l = t[c];
|
|
2130
|
-
if (
|
|
2125
|
+
if (re.has(c)) {
|
|
2131
2126
|
o = !0;
|
|
2132
2127
|
continue;
|
|
2133
2128
|
} else if (En(c)) {
|
|
2134
2129
|
i[c] = l;
|
|
2135
2130
|
continue;
|
|
2136
2131
|
} else {
|
|
2137
|
-
const u = rs(l,
|
|
2132
|
+
const u = rs(l, St[c]);
|
|
2138
2133
|
c.startsWith("origin") ? (a = !0, r[c] = u) : s[c] = u;
|
|
2139
2134
|
}
|
|
2140
2135
|
}
|
|
2141
|
-
if (t.transform || (o || n ? s.transform =
|
|
2136
|
+
if (t.transform || (o || n ? s.transform = Vo(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
2142
2137
|
const { originX: c = "50%", originY: l = "50%", originZ: u = 0 } = r;
|
|
2143
2138
|
s.transformOrigin = `${c} ${l} ${u}`;
|
|
2144
2139
|
}
|
|
@@ -2151,17 +2146,17 @@ const Ft = () => ({
|
|
|
2151
2146
|
});
|
|
2152
2147
|
function ms(e, t, n) {
|
|
2153
2148
|
for (const s in t)
|
|
2154
|
-
!
|
|
2149
|
+
!D(t[s]) && !ps(s, n) && (e[s] = t[s]);
|
|
2155
2150
|
}
|
|
2156
|
-
function
|
|
2157
|
-
return
|
|
2151
|
+
function So({ transformTemplate: e }, t) {
|
|
2152
|
+
return De(() => {
|
|
2158
2153
|
const n = Ft();
|
|
2159
2154
|
return Pt(n, t, e), Object.assign({}, n.vars, n.style);
|
|
2160
2155
|
}, [t]);
|
|
2161
2156
|
}
|
|
2162
2157
|
function xo(e, t) {
|
|
2163
2158
|
const n = e.style || {}, s = {};
|
|
2164
|
-
return ms(s, n, e), Object.assign(s,
|
|
2159
|
+
return ms(s, n, e), Object.assign(s, So(e, t)), s;
|
|
2165
2160
|
}
|
|
2166
2161
|
function Ao(e, t) {
|
|
2167
2162
|
const n = {}, s = xo(e, t);
|
|
@@ -2204,7 +2199,7 @@ const ys = () => ({
|
|
|
2204
2199
|
attrs: {}
|
|
2205
2200
|
}), bs = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
2206
2201
|
function Fo(e, t, n, s) {
|
|
2207
|
-
const i =
|
|
2202
|
+
const i = De(() => {
|
|
2208
2203
|
const r = ys();
|
|
2209
2204
|
return gs(r, t, bs(s), e.transformTemplate, e.style), {
|
|
2210
2205
|
...r.attrs,
|
|
@@ -2217,7 +2212,7 @@ function Fo(e, t, n, s) {
|
|
|
2217
2212
|
}
|
|
2218
2213
|
return i;
|
|
2219
2214
|
}
|
|
2220
|
-
const
|
|
2215
|
+
const Do = [
|
|
2221
2216
|
"animate",
|
|
2222
2217
|
"circle",
|
|
2223
2218
|
"defs",
|
|
@@ -2244,7 +2239,7 @@ const Ro = [
|
|
|
2244
2239
|
"use",
|
|
2245
2240
|
"view"
|
|
2246
2241
|
];
|
|
2247
|
-
function
|
|
2242
|
+
function Dt(e) {
|
|
2248
2243
|
return (
|
|
2249
2244
|
/**
|
|
2250
2245
|
* If it's not a string, it's a custom React component. Currently we only support
|
|
@@ -2257,16 +2252,16 @@ function Rt(e) {
|
|
|
2257
2252
|
/**
|
|
2258
2253
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
2259
2254
|
*/
|
|
2260
|
-
!!(
|
|
2255
|
+
!!(Do.indexOf(e) > -1 || /**
|
|
2261
2256
|
* If it contains a capital letter, it's an SVG component
|
|
2262
2257
|
*/
|
|
2263
2258
|
/[A-Z]/u.test(e))
|
|
2264
2259
|
)
|
|
2265
2260
|
);
|
|
2266
2261
|
}
|
|
2267
|
-
function
|
|
2262
|
+
function Ro(e = !1) {
|
|
2268
2263
|
return (n, s, i, { latestValues: r }, o) => {
|
|
2269
|
-
const c = (
|
|
2264
|
+
const c = (Dt(n) ? Fo : Ao)(s, r, o, n), l = ro(s, typeof n == "string", e), u = n !== mn ? { ...l, ...c, ref: i } : {}, { children: d } = s, f = De(() => D(d) ? d.get() : d, [d]);
|
|
2270
2265
|
return qs(n, {
|
|
2271
2266
|
...u,
|
|
2272
2267
|
children: f
|
|
@@ -2279,7 +2274,7 @@ function on(e) {
|
|
|
2279
2274
|
t[0][s] = n.get(), t[1][s] = n.getVelocity();
|
|
2280
2275
|
}), t;
|
|
2281
2276
|
}
|
|
2282
|
-
function
|
|
2277
|
+
function Rt(e, t, n, s) {
|
|
2283
2278
|
if (typeof t == "function") {
|
|
2284
2279
|
const [i, r] = on(s);
|
|
2285
2280
|
t = t(n !== void 0 ? n : e.custom, i, r);
|
|
@@ -2291,7 +2286,7 @@ function Dt(e, t, n, s) {
|
|
|
2291
2286
|
return t;
|
|
2292
2287
|
}
|
|
2293
2288
|
function Oo(e) {
|
|
2294
|
-
return
|
|
2289
|
+
return D(e) ? e.get() : e;
|
|
2295
2290
|
}
|
|
2296
2291
|
function Io({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, i) {
|
|
2297
2292
|
return {
|
|
@@ -2299,7 +2294,7 @@ function Io({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, i) {
|
|
|
2299
2294
|
renderState: t()
|
|
2300
2295
|
};
|
|
2301
2296
|
}
|
|
2302
|
-
const
|
|
2297
|
+
const vs = (e) => (t, n) => {
|
|
2303
2298
|
const s = E(Ie), i = E(gn), r = () => Io(e, t, s, i);
|
|
2304
2299
|
return n ? r() : Js(r);
|
|
2305
2300
|
};
|
|
@@ -2316,19 +2311,19 @@ function Eo(e, t, n, s) {
|
|
|
2316
2311
|
if (d && typeof d != "boolean" && !Ee(d)) {
|
|
2317
2312
|
const f = Array.isArray(d) ? d : [d];
|
|
2318
2313
|
for (let h = 0; h < f.length; h++) {
|
|
2319
|
-
const y =
|
|
2314
|
+
const y = Rt(e, f[h]);
|
|
2320
2315
|
if (y) {
|
|
2321
|
-
const { transitionEnd: b, transition:
|
|
2322
|
-
for (const
|
|
2323
|
-
let g = p[
|
|
2316
|
+
const { transitionEnd: b, transition: T, ...p } = y;
|
|
2317
|
+
for (const V in p) {
|
|
2318
|
+
let g = p[V];
|
|
2324
2319
|
if (Array.isArray(g)) {
|
|
2325
2320
|
const x = u ? g.length - 1 : 0;
|
|
2326
2321
|
g = g[x];
|
|
2327
2322
|
}
|
|
2328
|
-
g !== null && (i[
|
|
2323
|
+
g !== null && (i[V] = g);
|
|
2329
2324
|
}
|
|
2330
|
-
for (const
|
|
2331
|
-
i[
|
|
2325
|
+
for (const V in b)
|
|
2326
|
+
i[V] = b[V];
|
|
2332
2327
|
}
|
|
2333
2328
|
}
|
|
2334
2329
|
}
|
|
@@ -2338,46 +2333,46 @@ function Ot(e, t, n) {
|
|
|
2338
2333
|
var r;
|
|
2339
2334
|
const { style: s } = e, i = {};
|
|
2340
2335
|
for (const o in s)
|
|
2341
|
-
(
|
|
2336
|
+
(D(s[o]) || t.style && D(t.style[o]) || ps(o, e) || ((r = n == null ? void 0 : n.getValue(o)) == null ? void 0 : r.liveStyle) !== void 0) && (i[o] = s[o]);
|
|
2342
2337
|
return i;
|
|
2343
2338
|
}
|
|
2344
2339
|
const ko = {
|
|
2345
|
-
useVisualState:
|
|
2340
|
+
useVisualState: vs({
|
|
2346
2341
|
scrapeMotionValuesFromProps: Ot,
|
|
2347
2342
|
createRenderState: Ft
|
|
2348
2343
|
})
|
|
2349
2344
|
};
|
|
2350
|
-
function
|
|
2345
|
+
function Ts(e, t, n) {
|
|
2351
2346
|
const s = Ot(e, t, n);
|
|
2352
2347
|
for (const i in e)
|
|
2353
|
-
if (
|
|
2354
|
-
const r =
|
|
2348
|
+
if (D(e[i]) || D(t[i])) {
|
|
2349
|
+
const r = ie.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
2355
2350
|
s[r] = e[i];
|
|
2356
2351
|
}
|
|
2357
2352
|
return s;
|
|
2358
2353
|
}
|
|
2359
|
-
const
|
|
2360
|
-
useVisualState:
|
|
2361
|
-
scrapeMotionValuesFromProps:
|
|
2354
|
+
const No = {
|
|
2355
|
+
useVisualState: vs({
|
|
2356
|
+
scrapeMotionValuesFromProps: Ts,
|
|
2362
2357
|
createRenderState: ys
|
|
2363
2358
|
})
|
|
2364
2359
|
};
|
|
2365
|
-
function
|
|
2360
|
+
function Lo(e, t) {
|
|
2366
2361
|
return function(s, { forwardMotionProps: i } = { forwardMotionProps: !1 }) {
|
|
2367
2362
|
const o = {
|
|
2368
|
-
...
|
|
2363
|
+
...Dt(s) ? No : ko,
|
|
2369
2364
|
preloadedFeatures: e,
|
|
2370
|
-
useRender:
|
|
2365
|
+
useRender: Ro(i),
|
|
2371
2366
|
createVisualElement: t,
|
|
2372
2367
|
Component: s
|
|
2373
2368
|
};
|
|
2374
2369
|
return mo(o);
|
|
2375
2370
|
};
|
|
2376
2371
|
}
|
|
2377
|
-
const Bo = /* @__PURE__ */
|
|
2378
|
-
function
|
|
2372
|
+
const Bo = /* @__PURE__ */ Lo();
|
|
2373
|
+
function he(e, t, n) {
|
|
2379
2374
|
const s = e.getProps();
|
|
2380
|
-
return
|
|
2375
|
+
return Rt(s, t, n !== void 0 ? n : s.custom, e);
|
|
2381
2376
|
}
|
|
2382
2377
|
const it = (e) => Array.isArray(e);
|
|
2383
2378
|
function Ko(e, t, n) {
|
|
@@ -2387,7 +2382,7 @@ function $o(e) {
|
|
|
2387
2382
|
return it(e) ? e[e.length - 1] || 0 : e;
|
|
2388
2383
|
}
|
|
2389
2384
|
function Wo(e, t) {
|
|
2390
|
-
const n =
|
|
2385
|
+
const n = he(e, t);
|
|
2391
2386
|
let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
|
|
2392
2387
|
r = { ...r, ...s };
|
|
2393
2388
|
for (const o in r) {
|
|
@@ -2396,7 +2391,7 @@ function Wo(e, t) {
|
|
|
2396
2391
|
}
|
|
2397
2392
|
}
|
|
2398
2393
|
function jo(e) {
|
|
2399
|
-
return !!(
|
|
2394
|
+
return !!(D(e) && e.add);
|
|
2400
2395
|
}
|
|
2401
2396
|
function _o(e, t) {
|
|
2402
2397
|
const n = e.getValue("willChange");
|
|
@@ -2407,12 +2402,12 @@ function _o(e, t) {
|
|
|
2407
2402
|
e.addValue("willChange", s), s.add(t);
|
|
2408
2403
|
}
|
|
2409
2404
|
}
|
|
2410
|
-
function
|
|
2405
|
+
function Go(e) {
|
|
2411
2406
|
return e.props[ds];
|
|
2412
2407
|
}
|
|
2413
|
-
const
|
|
2408
|
+
const zo = (e) => e !== null;
|
|
2414
2409
|
function Uo(e, { repeat: t, repeatType: n = "loop" }, s) {
|
|
2415
|
-
const i = e.filter(
|
|
2410
|
+
const i = e.filter(zo), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
2416
2411
|
return i[r];
|
|
2417
2412
|
}
|
|
2418
2413
|
const Ho = {
|
|
@@ -2432,14 +2427,14 @@ const Ho = {
|
|
|
2432
2427
|
type: "keyframes",
|
|
2433
2428
|
ease: [0.25, 0.1, 0.35, 1],
|
|
2434
2429
|
duration: 0.3
|
|
2435
|
-
}, Zo = (e, { keyframes: t }) => t.length > 2 ? Xo :
|
|
2430
|
+
}, Zo = (e, { keyframes: t }) => t.length > 2 ? Xo : re.has(e) ? e.startsWith("scale") ? Yo(t[1]) : Ho : qo;
|
|
2436
2431
|
function Jo({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: c, elapsed: l, ...u }) {
|
|
2437
2432
|
return !!Object.keys(u).length;
|
|
2438
2433
|
}
|
|
2439
2434
|
const Qo = (e, t, n, s = {}, i, r) => (o) => {
|
|
2440
2435
|
const a = Qn(s, e) || {}, c = a.delay || s.delay || 0;
|
|
2441
2436
|
let { elapsed: l = 0 } = s;
|
|
2442
|
-
l = l - /* @__PURE__ */
|
|
2437
|
+
l = l - /* @__PURE__ */ N(c);
|
|
2443
2438
|
const u = {
|
|
2444
2439
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
2445
2440
|
ease: "easeOut",
|
|
@@ -2456,7 +2451,7 @@ const Qo = (e, t, n, s = {}, i, r) => (o) => {
|
|
|
2456
2451
|
motionValue: t,
|
|
2457
2452
|
element: r ? void 0 : i
|
|
2458
2453
|
};
|
|
2459
|
-
Jo(a) || Object.assign(u, Zo(e, u)), u.duration && (u.duration = /* @__PURE__ */
|
|
2454
|
+
Jo(a) || Object.assign(u, Zo(e, u)), u.duration && (u.duration = /* @__PURE__ */ N(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ N(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
2460
2455
|
let d = !1;
|
|
2461
2456
|
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (u.duration = 0, u.delay === 0 && (d = !0)), (K.instantAnimations || K.skipAnimations) && (d = !0, u.duration = 0, u.delay = 0), u.allowFlatten = !a.type && !a.ease, d && !r && t.get() !== void 0) {
|
|
2462
2457
|
const f = Uo(u.keyframes, a);
|
|
@@ -2489,15 +2484,15 @@ function ws(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
2489
2484
|
continue;
|
|
2490
2485
|
let b = !1;
|
|
2491
2486
|
if (window.MotionHandoffAnimation) {
|
|
2492
|
-
const p =
|
|
2487
|
+
const p = Go(e);
|
|
2493
2488
|
if (p) {
|
|
2494
|
-
const
|
|
2495
|
-
|
|
2489
|
+
const V = window.MotionHandoffAnimation(p, u, k);
|
|
2490
|
+
V !== null && (h.startTime = V, b = !0);
|
|
2496
2491
|
}
|
|
2497
2492
|
}
|
|
2498
2493
|
_o(e, u), d.start(Qo(u, d, f, e.shouldReduceMotion && es.has(u) ? { type: !1 } : h, e, b));
|
|
2499
|
-
const
|
|
2500
|
-
|
|
2494
|
+
const T = d.animation;
|
|
2495
|
+
T && c.push(T);
|
|
2501
2496
|
}
|
|
2502
2497
|
return o && Promise.all(c).then(() => {
|
|
2503
2498
|
k.update(() => {
|
|
@@ -2507,7 +2502,7 @@ function ws(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
2507
2502
|
}
|
|
2508
2503
|
function rt(e, t, n = {}) {
|
|
2509
2504
|
var c;
|
|
2510
|
-
const s =
|
|
2505
|
+
const s = he(e, t, n.type === "exit" ? (c = e.presenceContext) == null ? void 0 : c.custom : void 0);
|
|
2511
2506
|
let { transition: i = e.getDefaultTransition() || {} } = s || {};
|
|
2512
2507
|
n.transitionOverride && (i = n.transitionOverride);
|
|
2513
2508
|
const r = s ? () => Promise.all(ws(e, s, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (l = 0) => {
|
|
@@ -2544,14 +2539,14 @@ function sa(e, t, n = {}) {
|
|
|
2544
2539
|
} else if (typeof t == "string")
|
|
2545
2540
|
s = rt(e, t, n);
|
|
2546
2541
|
else {
|
|
2547
|
-
const i = typeof t == "function" ?
|
|
2542
|
+
const i = typeof t == "function" ? he(e, t, n.custom) : t;
|
|
2548
2543
|
s = Promise.all(ws(e, i, n));
|
|
2549
2544
|
}
|
|
2550
2545
|
return s.then(() => {
|
|
2551
2546
|
e.notify("AnimationComplete", t);
|
|
2552
2547
|
});
|
|
2553
2548
|
}
|
|
2554
|
-
function
|
|
2549
|
+
function Vs(e, t) {
|
|
2555
2550
|
if (!Array.isArray(t))
|
|
2556
2551
|
return !1;
|
|
2557
2552
|
const n = t.length;
|
|
@@ -2563,17 +2558,17 @@ function Ss(e, t) {
|
|
|
2563
2558
|
return !0;
|
|
2564
2559
|
}
|
|
2565
2560
|
const ia = Mt.length;
|
|
2566
|
-
function
|
|
2561
|
+
function Ss(e) {
|
|
2567
2562
|
if (!e)
|
|
2568
2563
|
return;
|
|
2569
2564
|
if (!e.isControllingVariants) {
|
|
2570
|
-
const n = e.parent ?
|
|
2565
|
+
const n = e.parent ? Ss(e.parent) || {} : {};
|
|
2571
2566
|
return e.props.initial !== void 0 && (n.initial = e.props.initial), n;
|
|
2572
2567
|
}
|
|
2573
2568
|
const t = {};
|
|
2574
2569
|
for (let n = 0; n < ia; n++) {
|
|
2575
2570
|
const s = Mt[n], i = e.props[s];
|
|
2576
|
-
(
|
|
2571
|
+
(de(i) || i === !1) && (t[s] = i);
|
|
2577
2572
|
}
|
|
2578
2573
|
return t;
|
|
2579
2574
|
}
|
|
@@ -2585,7 +2580,7 @@ function ua(e) {
|
|
|
2585
2580
|
let t = aa(e), n = an(), s = !0;
|
|
2586
2581
|
const i = (c) => (l, u) => {
|
|
2587
2582
|
var f;
|
|
2588
|
-
const d =
|
|
2583
|
+
const d = he(e, u, c === "exit" ? (f = e.presenceContext) == null ? void 0 : f.custom : void 0);
|
|
2589
2584
|
if (d) {
|
|
2590
2585
|
const { transition: h, transitionEnd: y, ...b } = d;
|
|
2591
2586
|
l = { ...l, ...b, ...y };
|
|
@@ -2596,54 +2591,54 @@ function ua(e) {
|
|
|
2596
2591
|
t = c(e);
|
|
2597
2592
|
}
|
|
2598
2593
|
function o(c) {
|
|
2599
|
-
const { props: l } = e, u =
|
|
2594
|
+
const { props: l } = e, u = Ss(e.parent) || {}, d = [], f = /* @__PURE__ */ new Set();
|
|
2600
2595
|
let h = {}, y = 1 / 0;
|
|
2601
|
-
for (let
|
|
2602
|
-
const p = ra[
|
|
2603
|
-
|
|
2604
|
-
let
|
|
2605
|
-
if (
|
|
2606
|
-
!
|
|
2607
|
-
!g && !
|
|
2596
|
+
for (let T = 0; T < oa; T++) {
|
|
2597
|
+
const p = ra[T], V = n[p], g = l[p] !== void 0 ? l[p] : u[p], x = de(g), v = p === c ? V.isActive : null;
|
|
2598
|
+
v === !1 && (y = T);
|
|
2599
|
+
let S = g === u[p] && g !== l[p] && x;
|
|
2600
|
+
if (S && s && e.manuallyAnimateOnMount && (S = !1), V.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
|
|
2601
|
+
!V.isActive && v === null || // If we didn't and don't have any defined prop for this animation type
|
|
2602
|
+
!g && !V.prevProp || // Or if the prop doesn't define an animation
|
|
2608
2603
|
Ee(g) || typeof g == "boolean")
|
|
2609
2604
|
continue;
|
|
2610
|
-
const C = ca(
|
|
2605
|
+
const C = ca(V.prevProp, g);
|
|
2611
2606
|
let w = C || // If we're making this variant active, we want to always make it active
|
|
2612
|
-
p === c &&
|
|
2613
|
-
|
|
2607
|
+
p === c && V.isActive && !S && x || // If we removed a higher-priority variant (i is in reverse order)
|
|
2608
|
+
T > y && x, R = !1;
|
|
2614
2609
|
const O = Array.isArray(g) ? g : [g];
|
|
2615
2610
|
let X = O.reduce(i(p), {});
|
|
2616
|
-
|
|
2617
|
-
const { prevResolvedValues: It = {} } =
|
|
2611
|
+
v === !1 && (X = {});
|
|
2612
|
+
const { prevResolvedValues: It = {} } = V, Ls = {
|
|
2618
2613
|
...It,
|
|
2619
2614
|
...X
|
|
2620
2615
|
}, Et = (P) => {
|
|
2621
|
-
w = !0, f.has(P) && (
|
|
2622
|
-
const
|
|
2623
|
-
|
|
2616
|
+
w = !0, f.has(P) && (R = !0, f.delete(P)), V.needsAnimating[P] = !0;
|
|
2617
|
+
const L = e.getValue(P);
|
|
2618
|
+
L && (L.liveStyle = !1);
|
|
2624
2619
|
};
|
|
2625
|
-
for (const P in
|
|
2626
|
-
const
|
|
2620
|
+
for (const P in Ls) {
|
|
2621
|
+
const L = X[P], Ne = It[P];
|
|
2627
2622
|
if (h.hasOwnProperty(P))
|
|
2628
2623
|
continue;
|
|
2629
|
-
let
|
|
2630
|
-
it(
|
|
2624
|
+
let Le = !1;
|
|
2625
|
+
it(L) && it(Ne) ? Le = !Vs(L, Ne) : Le = L !== Ne, Le ? L != null ? Et(P) : f.add(P) : L !== void 0 && f.has(P) ? Et(P) : V.protectedKeys[P] = !0;
|
|
2631
2626
|
}
|
|
2632
|
-
|
|
2627
|
+
V.prevProp = g, V.prevResolvedValues = X, V.isActive && (h = { ...h, ...X }), s && e.blockInitialAnimation && (w = !1), w && (!(S && C) || R) && d.push(...O.map((P) => ({
|
|
2633
2628
|
animation: P,
|
|
2634
2629
|
options: { type: p }
|
|
2635
2630
|
})));
|
|
2636
2631
|
}
|
|
2637
2632
|
if (f.size) {
|
|
2638
|
-
const
|
|
2633
|
+
const T = {};
|
|
2639
2634
|
if (typeof l.initial != "boolean") {
|
|
2640
|
-
const p =
|
|
2641
|
-
p && p.transition && (
|
|
2635
|
+
const p = he(e, Array.isArray(l.initial) ? l.initial[0] : l.initial);
|
|
2636
|
+
p && p.transition && (T.transition = p.transition);
|
|
2642
2637
|
}
|
|
2643
2638
|
f.forEach((p) => {
|
|
2644
|
-
const
|
|
2645
|
-
g && (g.liveStyle = !0),
|
|
2646
|
-
}), d.push({ animation:
|
|
2639
|
+
const V = e.getBaseTarget(p), g = e.getValue(p);
|
|
2640
|
+
g && (g.liveStyle = !0), T[p] = V ?? null;
|
|
2641
|
+
}), d.push({ animation: T });
|
|
2647
2642
|
}
|
|
2648
2643
|
let b = !!d.length;
|
|
2649
2644
|
return s && (l.initial === !1 || l.initial === l.animate) && !e.manuallyAnimateOnMount && (b = !1), s = !1, b ? t(d) : Promise.resolve();
|
|
@@ -2672,9 +2667,9 @@ function ua(e) {
|
|
|
2672
2667
|
};
|
|
2673
2668
|
}
|
|
2674
2669
|
function ca(e, t) {
|
|
2675
|
-
return typeof t == "string" ? t !== e : Array.isArray(t) ? !
|
|
2670
|
+
return typeof t == "string" ? t !== e : Array.isArray(t) ? !Vs(t, e) : !1;
|
|
2676
2671
|
}
|
|
2677
|
-
function
|
|
2672
|
+
function W(e = !1) {
|
|
2678
2673
|
return {
|
|
2679
2674
|
isActive: e,
|
|
2680
2675
|
protectedKeys: {},
|
|
@@ -2684,23 +2679,23 @@ function j(e = !1) {
|
|
|
2684
2679
|
}
|
|
2685
2680
|
function an() {
|
|
2686
2681
|
return {
|
|
2687
|
-
animate:
|
|
2688
|
-
whileInView:
|
|
2689
|
-
whileHover:
|
|
2690
|
-
whileTap:
|
|
2691
|
-
whileDrag:
|
|
2692
|
-
whileFocus:
|
|
2693
|
-
exit:
|
|
2682
|
+
animate: W(!0),
|
|
2683
|
+
whileInView: W(),
|
|
2684
|
+
whileHover: W(),
|
|
2685
|
+
whileTap: W(),
|
|
2686
|
+
whileDrag: W(),
|
|
2687
|
+
whileFocus: W(),
|
|
2688
|
+
exit: W()
|
|
2694
2689
|
};
|
|
2695
2690
|
}
|
|
2696
|
-
class
|
|
2691
|
+
class oe {
|
|
2697
2692
|
constructor(t) {
|
|
2698
2693
|
this.isMounted = !1, this.node = t;
|
|
2699
2694
|
}
|
|
2700
2695
|
update() {
|
|
2701
2696
|
}
|
|
2702
2697
|
}
|
|
2703
|
-
class la extends
|
|
2698
|
+
class la extends oe {
|
|
2704
2699
|
/**
|
|
2705
2700
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
2706
2701
|
* to the underlying animation library. We only want to load that if we load this,
|
|
@@ -2729,7 +2724,7 @@ class la extends ae {
|
|
|
2729
2724
|
}
|
|
2730
2725
|
}
|
|
2731
2726
|
let fa = 0;
|
|
2732
|
-
class da extends
|
|
2727
|
+
class da extends oe {
|
|
2733
2728
|
constructor() {
|
|
2734
2729
|
super(...arguments), this.id = fa++;
|
|
2735
2730
|
}
|
|
@@ -2800,7 +2795,7 @@ function ln(e, t, n) {
|
|
|
2800
2795
|
const i = "onHover" + n, r = s[i];
|
|
2801
2796
|
r && k.postRender(() => r(t, xs(t)));
|
|
2802
2797
|
}
|
|
2803
|
-
class ya extends
|
|
2798
|
+
class ya extends oe {
|
|
2804
2799
|
mount() {
|
|
2805
2800
|
const { current: t } = this.node;
|
|
2806
2801
|
t && (this.unmount = Yr(t, (n, s) => (ln(this.node, s, "Start"), (i) => ln(this.node, i, "End"))));
|
|
@@ -2808,7 +2803,7 @@ class ya extends ae {
|
|
|
2808
2803
|
unmount() {
|
|
2809
2804
|
}
|
|
2810
2805
|
}
|
|
2811
|
-
class ba extends
|
|
2806
|
+
class ba extends oe {
|
|
2812
2807
|
constructor() {
|
|
2813
2808
|
super(...arguments), this.isActive = !1;
|
|
2814
2809
|
}
|
|
@@ -2825,7 +2820,7 @@ class ba extends ae {
|
|
|
2825
2820
|
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
2826
2821
|
}
|
|
2827
2822
|
mount() {
|
|
2828
|
-
this.unmount =
|
|
2823
|
+
this.unmount = Re(un(this.node.current, "focus", () => this.onFocus()), un(this.node.current, "blur", () => this.onBlur()));
|
|
2829
2824
|
}
|
|
2830
2825
|
unmount() {
|
|
2831
2826
|
}
|
|
@@ -2838,7 +2833,7 @@ function fn(e, t, n) {
|
|
|
2838
2833
|
const i = "onTap" + (n === "End" ? "" : n), r = s[i];
|
|
2839
2834
|
r && k.postRender(() => r(t, xs(t)));
|
|
2840
2835
|
}
|
|
2841
|
-
class
|
|
2836
|
+
class va extends oe {
|
|
2842
2837
|
mount() {
|
|
2843
2838
|
const { current: t } = this.node;
|
|
2844
2839
|
t && (this.unmount = Qr(t, (n, s) => (fn(this.node, s, "Start"), (i, { success: r }) => fn(this.node, i, r ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
@@ -2846,20 +2841,20 @@ class Ta extends ae {
|
|
|
2846
2841
|
unmount() {
|
|
2847
2842
|
}
|
|
2848
2843
|
}
|
|
2849
|
-
const ot = /* @__PURE__ */ new WeakMap(),
|
|
2844
|
+
const ot = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), Ta = (e) => {
|
|
2850
2845
|
const t = ot.get(e.target);
|
|
2851
2846
|
t && t(e);
|
|
2852
2847
|
}, wa = (e) => {
|
|
2853
|
-
e.forEach(
|
|
2848
|
+
e.forEach(Ta);
|
|
2854
2849
|
};
|
|
2855
|
-
function
|
|
2850
|
+
function Va({ root: e, ...t }) {
|
|
2856
2851
|
const n = e || document;
|
|
2857
|
-
|
|
2858
|
-
const s =
|
|
2852
|
+
Ge.has(n) || Ge.set(n, {});
|
|
2853
|
+
const s = Ge.get(n), i = JSON.stringify(t);
|
|
2859
2854
|
return s[i] || (s[i] = new IntersectionObserver(wa, { root: e, ...t })), s[i];
|
|
2860
2855
|
}
|
|
2861
|
-
function
|
|
2862
|
-
const s =
|
|
2856
|
+
function Sa(e, t, n) {
|
|
2857
|
+
const s = Va(t);
|
|
2863
2858
|
return ot.set(e, n), s.observe(e), () => {
|
|
2864
2859
|
ot.delete(e), s.unobserve(e);
|
|
2865
2860
|
};
|
|
@@ -2868,7 +2863,7 @@ const xa = {
|
|
|
2868
2863
|
some: 0,
|
|
2869
2864
|
all: 1
|
|
2870
2865
|
};
|
|
2871
|
-
class Aa extends
|
|
2866
|
+
class Aa extends oe {
|
|
2872
2867
|
constructor() {
|
|
2873
2868
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
2874
2869
|
}
|
|
@@ -2886,7 +2881,7 @@ class Aa extends ae {
|
|
|
2886
2881
|
const { onViewportEnter: u, onViewportLeave: d } = this.node.getProps(), f = l ? u : d;
|
|
2887
2882
|
f && f(c);
|
|
2888
2883
|
};
|
|
2889
|
-
return
|
|
2884
|
+
return Sa(this.node.current, o, a);
|
|
2890
2885
|
}
|
|
2891
2886
|
mount() {
|
|
2892
2887
|
this.startObserver();
|
|
@@ -2908,7 +2903,7 @@ const Ca = {
|
|
|
2908
2903
|
Feature: Aa
|
|
2909
2904
|
},
|
|
2910
2905
|
tap: {
|
|
2911
|
-
Feature:
|
|
2906
|
+
Feature: va
|
|
2912
2907
|
},
|
|
2913
2908
|
focus: {
|
|
2914
2909
|
Feature: ba
|
|
@@ -2926,12 +2921,12 @@ function Pa() {
|
|
|
2926
2921
|
at.current = !1;
|
|
2927
2922
|
}
|
|
2928
2923
|
const Fa = /* @__PURE__ */ new WeakMap();
|
|
2929
|
-
function
|
|
2924
|
+
function Da(e, t, n) {
|
|
2930
2925
|
for (const s in t) {
|
|
2931
2926
|
const i = t[s], r = n[s];
|
|
2932
|
-
if (
|
|
2927
|
+
if (D(i))
|
|
2933
2928
|
e.addValue(s, i);
|
|
2934
|
-
else if (
|
|
2929
|
+
else if (D(r))
|
|
2935
2930
|
e.addValue(s, Pe(i, { owner: e }));
|
|
2936
2931
|
else if (r !== i)
|
|
2937
2932
|
if (e.hasValue(s)) {
|
|
@@ -2955,7 +2950,7 @@ const dn = [
|
|
|
2955
2950
|
"LayoutAnimationStart",
|
|
2956
2951
|
"LayoutAnimationComplete"
|
|
2957
2952
|
];
|
|
2958
|
-
class
|
|
2953
|
+
class Ra {
|
|
2959
2954
|
/**
|
|
2960
2955
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
2961
2956
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -2967,7 +2962,7 @@ class Da {
|
|
|
2967
2962
|
return {};
|
|
2968
2963
|
}
|
|
2969
2964
|
constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: o }, a = {}) {
|
|
2970
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
2965
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Vt, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2971
2966
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2972
2967
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2973
2968
|
const f = I.now();
|
|
@@ -2978,11 +2973,11 @@ class Da {
|
|
|
2978
2973
|
const { willChange: u, ...d } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
2979
2974
|
for (const f in d) {
|
|
2980
2975
|
const h = d[f];
|
|
2981
|
-
c[f] !== void 0 &&
|
|
2976
|
+
c[f] !== void 0 && D(h) && h.set(c[f], !1);
|
|
2982
2977
|
}
|
|
2983
2978
|
}
|
|
2984
2979
|
mount(t) {
|
|
2985
|
-
this.current = t, Fa.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((n, s) => this.bindToMotionValue(s, n)), Ms.current || Pa(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : at.current, process.env.NODE_ENV !== "production" &&
|
|
2980
|
+
this.current = t, Fa.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((n, s) => this.bindToMotionValue(s, n)), Ms.current || Pa(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : at.current, process.env.NODE_ENV !== "production" && Vn(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
2986
2981
|
}
|
|
2987
2982
|
unmount() {
|
|
2988
2983
|
this.projection && this.projection.unmount(), ze(this.notifyUpdate), ze(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
@@ -2996,7 +2991,7 @@ class Da {
|
|
|
2996
2991
|
}
|
|
2997
2992
|
bindToMotionValue(t, n) {
|
|
2998
2993
|
this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
|
|
2999
|
-
const s =
|
|
2994
|
+
const s = re.has(t);
|
|
3000
2995
|
s && this.onBindTransform && this.onBindTransform();
|
|
3001
2996
|
const i = n.on("change", (a) => {
|
|
3002
2997
|
this.latestValues[t] = a, this.props.onUpdate && k.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
|
|
@@ -3051,7 +3046,7 @@ class Da {
|
|
|
3051
3046
|
const r = "on" + i, o = t[r];
|
|
3052
3047
|
o && (this.propEventSubscriptions[i] = this.on(i, o));
|
|
3053
3048
|
}
|
|
3054
|
-
this.prevMotionValues =
|
|
3049
|
+
this.prevMotionValues = Da(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
3055
3050
|
}
|
|
3056
3051
|
getProps() {
|
|
3057
3052
|
return this.props;
|
|
@@ -3116,7 +3111,7 @@ class Da {
|
|
|
3116
3111
|
*/
|
|
3117
3112
|
readValue(t, n) {
|
|
3118
3113
|
let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
3119
|
-
return s != null && (typeof s == "string" && (yn(s) || bn(s)) ? s = parseFloat(s) : !to(s) &&
|
|
3114
|
+
return s != null && (typeof s == "string" && (yn(s) || bn(s)) ? s = parseFloat(s) : !to(s) && se.test(n) && (s = is(t, n)), this.setBaseTarget(t, D(s) ? s.get() : s)), D(s) ? s.get() : s;
|
|
3120
3115
|
}
|
|
3121
3116
|
/**
|
|
3122
3117
|
* Set the base target to later animate back to. This is currently
|
|
@@ -3134,22 +3129,22 @@ class Da {
|
|
|
3134
3129
|
const { initial: n } = this.props;
|
|
3135
3130
|
let s;
|
|
3136
3131
|
if (typeof n == "string" || typeof n == "object") {
|
|
3137
|
-
const o =
|
|
3132
|
+
const o = Rt(this.props, n, (r = this.presenceContext) == null ? void 0 : r.custom);
|
|
3138
3133
|
o && (s = o[t]);
|
|
3139
3134
|
}
|
|
3140
3135
|
if (n && s !== void 0)
|
|
3141
3136
|
return s;
|
|
3142
3137
|
const i = this.getBaseTargetFromProps(this.props, t);
|
|
3143
|
-
return i !== void 0 && !
|
|
3138
|
+
return i !== void 0 && !D(i) ? i : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
|
|
3144
3139
|
}
|
|
3145
3140
|
on(t, n) {
|
|
3146
|
-
return this.events[t] || (this.events[t] = new
|
|
3141
|
+
return this.events[t] || (this.events[t] = new Tn()), this.events[t].add(n);
|
|
3147
3142
|
}
|
|
3148
3143
|
notify(t, ...n) {
|
|
3149
3144
|
this.events[t] && this.events[t].notify(...n);
|
|
3150
3145
|
}
|
|
3151
3146
|
}
|
|
3152
|
-
class Cs extends
|
|
3147
|
+
class Cs extends Ra {
|
|
3153
3148
|
constructor() {
|
|
3154
3149
|
super(...arguments), this.KeyframeResolver = Wr;
|
|
3155
3150
|
}
|
|
@@ -3165,7 +3160,7 @@ class Cs extends Da {
|
|
|
3165
3160
|
handleChildMotionValue() {
|
|
3166
3161
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
3167
3162
|
const { children: t } = this.props;
|
|
3168
|
-
|
|
3163
|
+
D(t) && (this.childSubscription = t.on("change", (n) => {
|
|
3169
3164
|
this.current && (this.current.textContent = `${n}`);
|
|
3170
3165
|
}));
|
|
3171
3166
|
}
|
|
@@ -3188,8 +3183,8 @@ class Ia extends Cs {
|
|
|
3188
3183
|
}
|
|
3189
3184
|
readValueFromInstance(t, n) {
|
|
3190
3185
|
var s;
|
|
3191
|
-
if (
|
|
3192
|
-
return (s = this.projection) != null && s.isProjecting ?
|
|
3186
|
+
if (re.has(n))
|
|
3187
|
+
return (s = this.projection) != null && s.isProjecting ? Je(n) : rr(t, n);
|
|
3193
3188
|
{
|
|
3194
3189
|
const i = Oa(t), r = (En(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
3195
3190
|
return typeof r == "string" ? r.trim() : r;
|
|
@@ -3243,14 +3238,14 @@ class ka extends Cs {
|
|
|
3243
3238
|
return t[n];
|
|
3244
3239
|
}
|
|
3245
3240
|
readValueFromInstance(t, n) {
|
|
3246
|
-
if (
|
|
3241
|
+
if (re.has(n)) {
|
|
3247
3242
|
const s = ss(n);
|
|
3248
3243
|
return s && s.default || 0;
|
|
3249
3244
|
}
|
|
3250
3245
|
return n = Fs.has(n) ? n : Ct(n), t.getAttribute(n);
|
|
3251
3246
|
}
|
|
3252
3247
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
3253
|
-
return
|
|
3248
|
+
return Ts(t, n, s);
|
|
3254
3249
|
}
|
|
3255
3250
|
build(t, n, s) {
|
|
3256
3251
|
gs(t, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
@@ -3262,10 +3257,10 @@ class ka extends Cs {
|
|
|
3262
3257
|
this.isSVGTag = bs(t.tagName), super.mount(t);
|
|
3263
3258
|
}
|
|
3264
3259
|
}
|
|
3265
|
-
const
|
|
3260
|
+
const Na = (e, t) => Dt(e) ? new ka(t) : new Ia(t, {
|
|
3266
3261
|
allowProjection: e !== mn
|
|
3267
|
-
}),
|
|
3268
|
-
renderer:
|
|
3262
|
+
}), La = {
|
|
3263
|
+
renderer: Na,
|
|
3269
3264
|
...ha,
|
|
3270
3265
|
...Ca
|
|
3271
3266
|
}, hn = /* @__PURE__ */ Bo("span"), Ba = {
|
|
@@ -3280,15 +3275,15 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3280
3275
|
h: "8"
|
|
3281
3276
|
}
|
|
3282
3277
|
}
|
|
3283
|
-
},
|
|
3278
|
+
}, Ds = {
|
|
3284
3279
|
Root: {
|
|
3285
3280
|
0: "1",
|
|
3286
|
-
1: "
|
|
3281
|
+
1: "1_5",
|
|
3287
3282
|
2: "2"
|
|
3288
3283
|
},
|
|
3289
3284
|
Text: {
|
|
3290
3285
|
0: "1",
|
|
3291
|
-
1: "
|
|
3286
|
+
1: "1_5",
|
|
3292
3287
|
2: "2"
|
|
3293
3288
|
}
|
|
3294
3289
|
}, ye = {
|
|
@@ -3384,7 +3379,7 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3384
3379
|
size: "1",
|
|
3385
3380
|
color: "default",
|
|
3386
3381
|
variant: "soft"
|
|
3387
|
-
}),
|
|
3382
|
+
}), Rs = ({
|
|
3388
3383
|
as: e = "span",
|
|
3389
3384
|
size: t = "1",
|
|
3390
3385
|
color: n = "default",
|
|
@@ -3396,9 +3391,9 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3396
3391
|
{
|
|
3397
3392
|
as: e,
|
|
3398
3393
|
align: "center",
|
|
3399
|
-
rounded: "
|
|
3394
|
+
rounded: "1",
|
|
3400
3395
|
display: "inline-flex",
|
|
3401
|
-
pl:
|
|
3396
|
+
pl: Ds.Root[t],
|
|
3402
3397
|
backgroundColor: ye.Root[s][n],
|
|
3403
3398
|
h: Ba.Root[t].h,
|
|
3404
3399
|
className: js("tgph-tag", i),
|
|
@@ -3420,7 +3415,7 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3420
3415
|
size: r.size,
|
|
3421
3416
|
color: ye.Text[r.variant][r.color],
|
|
3422
3417
|
weight: "medium",
|
|
3423
|
-
mr:
|
|
3418
|
+
mr: Ds.Text[r.size],
|
|
3424
3419
|
maxW: t,
|
|
3425
3420
|
overflow: n,
|
|
3426
3421
|
internal_optionalAs: !0,
|
|
@@ -3439,7 +3434,7 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3439
3434
|
const o = setTimeout(() => r(!1), 2e3);
|
|
3440
3435
|
return () => clearTimeout(o);
|
|
3441
3436
|
}
|
|
3442
|
-
}, [i]), /* @__PURE__ */ F(no, { features:
|
|
3437
|
+
}, [i]), /* @__PURE__ */ F(no, { features: La, children: /* @__PURE__ */ F($s, { label: "Copy text", children: /* @__PURE__ */ ut(
|
|
3443
3438
|
we.Root,
|
|
3444
3439
|
{
|
|
3445
3440
|
onClick: (o) => {
|
|
@@ -3449,8 +3444,8 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3449
3444
|
size: s.size,
|
|
3450
3445
|
color: ye.Button[s.variant][s.color],
|
|
3451
3446
|
variant: s.variant,
|
|
3452
|
-
roundedTopRight: "
|
|
3453
|
-
roundedBottomRight: "
|
|
3447
|
+
roundedTopRight: "1",
|
|
3448
|
+
roundedBottomRight: "1",
|
|
3454
3449
|
roundedTopLeft: "0",
|
|
3455
3450
|
roundedBottomLeft: "0",
|
|
3456
3451
|
position: "relative",
|
|
@@ -3477,7 +3472,7 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3477
3472
|
initial: !1,
|
|
3478
3473
|
animate: { y: i ? "-150%" : 0, opacity: 1 },
|
|
3479
3474
|
transition: { duration: 0.15, type: "spring", bounce: 0 },
|
|
3480
|
-
icon:
|
|
3475
|
+
icon: Gs,
|
|
3481
3476
|
position: "absolute",
|
|
3482
3477
|
alt: "Copy text",
|
|
3483
3478
|
"aria-hidden": i
|
|
@@ -3495,8 +3490,8 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3495
3490
|
color: ye.Button[t.variant][t.color],
|
|
3496
3491
|
variant: t.variant,
|
|
3497
3492
|
icon: { icon: pn, alt: "close" },
|
|
3498
|
-
roundedTopRight: "
|
|
3499
|
-
roundedBottomRight: "
|
|
3493
|
+
roundedTopRight: "1",
|
|
3494
|
+
roundedBottomRight: "1",
|
|
3500
3495
|
roundedTopLeft: "0",
|
|
3501
3496
|
roundedBottomLeft: "0",
|
|
3502
3497
|
...e
|
|
@@ -3516,15 +3511,11 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3516
3511
|
size: i.size,
|
|
3517
3512
|
color: ye.Icon[i.variant][i.color],
|
|
3518
3513
|
mr: "1",
|
|
3519
|
-
roundedTopRight: "3",
|
|
3520
|
-
roundedBottomRight: "3",
|
|
3521
|
-
roundedTopLeft: "0",
|
|
3522
|
-
roundedBottomLeft: "0",
|
|
3523
3514
|
...r,
|
|
3524
3515
|
...s
|
|
3525
3516
|
}
|
|
3526
3517
|
);
|
|
3527
|
-
},
|
|
3518
|
+
}, Ns = ({
|
|
3528
3519
|
color: e = "default",
|
|
3529
3520
|
size: t = "1",
|
|
3530
3521
|
variant: n = "soft",
|
|
@@ -3535,21 +3526,21 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3535
3526
|
textProps: a = { maxW: "40" },
|
|
3536
3527
|
children: c,
|
|
3537
3528
|
...l
|
|
3538
|
-
}) => /* @__PURE__ */ ut(
|
|
3529
|
+
}) => /* @__PURE__ */ ut(Rs, { color: e, size: t, variant: n, ...l, children: [
|
|
3539
3530
|
s && /* @__PURE__ */ F(ks, { ...s }),
|
|
3540
3531
|
/* @__PURE__ */ F(Os, { as: "span", ...a, children: c }),
|
|
3541
3532
|
i && /* @__PURE__ */ F(Es, { onClick: i, icon: { icon: pn, alt: "Remove" } }),
|
|
3542
3533
|
r && /* @__PURE__ */ F(Is, { onClick: r, textToCopy: o })
|
|
3543
3534
|
] });
|
|
3544
|
-
Object.assign(
|
|
3545
|
-
Root:
|
|
3535
|
+
Object.assign(Ns, {
|
|
3536
|
+
Root: Rs,
|
|
3546
3537
|
Button: Es,
|
|
3547
3538
|
Text: Os,
|
|
3548
3539
|
Icon: ks,
|
|
3549
3540
|
CopyButton: Is
|
|
3550
3541
|
});
|
|
3551
|
-
const
|
|
3542
|
+
const qa = Ns;
|
|
3552
3543
|
export {
|
|
3553
|
-
|
|
3544
|
+
qa as Tag
|
|
3554
3545
|
};
|
|
3555
3546
|
//# sourceMappingURL=index.mjs.map
|