@telegraph/tag 0.0.92 → 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 +8 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +198 -202
- 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 +3 -3
package/dist/esm/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ 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
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
|
|
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
12
|
const t = ue(null);
|
|
@@ -40,11 +40,11 @@ function ft(e) {
|
|
|
40
40
|
let t;
|
|
41
41
|
return () => (t === void 0 && (t = e()), t);
|
|
42
42
|
}
|
|
43
|
-
const te = /* @__NO_SIDE_EFFECTS__ */ (e) => e, si = (e, t) => (n) => t(e(n)),
|
|
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,7 +69,7 @@ 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
|
}
|
|
@@ -91,10 +91,10 @@ function me(e, t, n, s) {
|
|
|
91
91
|
const i = (r) => oi(r, 0, 1, e, n);
|
|
92
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),
|
|
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
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 (
|
|
106
|
+
}, fi = (e) => typeof e == "string", Lt = (e) => {
|
|
107
|
+
if (Rn(e)) {
|
|
108
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 Y(
|
|
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,18 +174,18 @@ 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] = (S, C = !1, w = !1) => (n ||
|
|
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
191
|
const { schedule: k, cancel: ze, state: xe } = /* @__PURE__ */ On(typeof requestAnimationFrame < "u" ? requestAnimationFrame : te, !0);
|
|
@@ -205,7 +205,7 @@ const I = {
|
|
|
205
205
|
}, le = {
|
|
206
206
|
...ne,
|
|
207
207
|
transform: (e) => H(0, 1, e)
|
|
208
|
-
},
|
|
208
|
+
}, Te = {
|
|
209
209
|
...ne,
|
|
210
210
|
default: 1
|
|
211
211
|
}, ce = (e) => Math.round(e * 1e5) / 1e5, mt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
@@ -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
|
-
},
|
|
225
|
+
}, vi = (e) => H(0, 255, e), Be = {
|
|
226
226
|
...ne,
|
|
227
|
-
transform: (e) => Math.round(
|
|
227
|
+
transform: (e) => Math.round(vi(e))
|
|
228
228
|
}, j = {
|
|
229
229
|
test: /* @__PURE__ */ gt("rgb", "red"),
|
|
230
230
|
parse: /* @__PURE__ */ kn("red", "green", "blue"),
|
|
231
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),
|
|
@@ -241,7 +241,7 @@ function vi(e) {
|
|
|
241
241
|
}
|
|
242
242
|
const Ue = {
|
|
243
243
|
test: /* @__PURE__ */ gt("#"),
|
|
244
|
-
parse:
|
|
244
|
+
parse: Ti,
|
|
245
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,
|
|
@@ -268,7 +268,7 @@ function xi(e) {
|
|
|
268
268
|
var t, n;
|
|
269
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
|
|
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
272
|
function fe(e) {
|
|
273
273
|
const t = e.toString(), n = [], s = {
|
|
274
274
|
color: [],
|
|
@@ -276,7 +276,7 @@ function fe(e) {
|
|
|
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) {
|
|
@@ -289,7 +289,7 @@ function Kn(e) {
|
|
|
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
|
};
|
|
@@ -308,7 +308,7 @@ const se = {
|
|
|
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,13 +330,13 @@ 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
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);
|
|
@@ -352,7 +352,7 @@ 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
|
|
383
|
+
const Li = (e, t) => {
|
|
384
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) :
|
|
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);
|
|
@@ -457,7 +457,7 @@ const A = {
|
|
|
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
|
-
pe(e <= /* @__PURE__ */
|
|
460
|
+
pe(e <= /* @__PURE__ */ N(A.maxDuration), "Spring duration must be 10 seconds or less");
|
|
461
461
|
let o = 1 - t;
|
|
462
462
|
o = H(A.minDamping, A.maxDamping, o), e = H(A.minDuration, A.maxDuration, /* @__PURE__ */ B(e)), o < 1 ? (i = (l) => {
|
|
463
463
|
const u = l * o, d = u * e, f = u - n, h = Ye(l, o), y = Math.exp(-d);
|
|
@@ -473,7 +473,7 @@ function Wi({ duration: e = A.duration, bounce: t = A.bounce, velocity: n = A.ve
|
|
|
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,
|
|
@@ -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)),
|
|
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
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
|
|
547
|
+
const v = Ye(p, b);
|
|
548
548
|
g = (S) => {
|
|
549
549
|
const C = Math.exp(-b * p * S);
|
|
550
|
-
return o - C * ((y + b * p *
|
|
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
|
|
555
|
+
const v = p * Math.sqrt(b * b - 1);
|
|
556
556
|
g = (S) => {
|
|
557
|
-
const C = Math.exp(-b * p * S), w = Math.min(
|
|
558
|
-
return o - C * ((y + b * p *
|
|
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 S = g(
|
|
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
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,7 +583,7 @@ 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
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 = {
|
|
@@ -591,15 +591,15 @@ function Xe({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
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 !==
|
|
594
|
+
const T = d + b, p = o === void 0 ? T : o(T);
|
|
595
|
+
p !== T && (b = p - d);
|
|
596
596
|
const V = (w) => -b * Math.exp(-w / s), g = (w) => p + V(w), x = (w) => {
|
|
597
|
-
const
|
|
598
|
-
f.done = Math.abs(
|
|
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 Xe({ 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 !S &&
|
|
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
|
}
|
|
@@ -623,7 +623,7 @@ function Hi(e, t, n) {
|
|
|
623
623
|
let a = i(e[o], e[o + 1]);
|
|
624
624
|
if (t) {
|
|
625
625
|
const c = Array.isArray(t) ? t[o] || te : t;
|
|
626
|
-
a =
|
|
626
|
+
a = Re(c, a);
|
|
627
627
|
}
|
|
628
628
|
s.push(a);
|
|
629
629
|
}
|
|
@@ -644,7 +644,7 @@ 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
650
|
return n ? (u) => l(H(e[0], e[r - 1], u)) : l;
|
|
@@ -652,7 +652,7 @@ function Yi(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
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,7 +684,7 @@ 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
|
}
|
|
@@ -698,7 +698,7 @@ const er = {
|
|
|
698
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;
|
|
@@ -737,7 +737,7 @@ class wt extends vt {
|
|
|
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 && 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 =
|
|
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
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: S } =
|
|
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
771
|
!V && c !== null && (S = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
772
772
|
const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && S);
|
|
773
|
-
return C && y !== Xe && (
|
|
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;
|
|
@@ -1036,7 +1036,7 @@ const Hn = /* @__PURE__ */ mr(() => {
|
|
|
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,7 +1061,7 @@ 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;
|
|
@@ -1070,7 +1070,7 @@ class br extends vt {
|
|
|
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.
|
|
@@ -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
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,7 +1188,7 @@ class wr extends br {
|
|
|
1188
1188
|
const a = new wt({
|
|
1189
1189
|
...o,
|
|
1190
1190
|
autoplay: !1
|
|
1191
|
-
}), c = /* @__PURE__ */
|
|
1191
|
+
}), c = /* @__PURE__ */ N(this.finishedTime ?? this.time);
|
|
1192
1192
|
n.setWithVelocity(a.sample(c - Yt).value, a.sample(c).value, Yt), a.stop();
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
@@ -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,
|
|
@@ -1255,12 +1255,12 @@ class Pr extends vt {
|
|
|
1255
1255
|
element: u,
|
|
1256
1256
|
...d
|
|
1257
1257
|
}, h = (u == null ? void 0 : u.KeyframeResolver) || Vt;
|
|
1258
|
-
this.keyframeResolver = new h(a, (b,
|
|
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(), Sr(t, r, o, a) || ((K.instantAnimations || !c) && (u == null || u(
|
|
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,
|
|
@@ -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
|
-
Y(n <=
|
|
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);
|
|
@@ -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
|
|
1378
|
+
const Nr = /\b([a-z-]*)\(.*?\)/gu, st = {
|
|
1379
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
1384
|
}, Zt = {
|
|
1385
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: $,
|
|
@@ -1445,7 +1445,7 @@ const Lr = /\b([a-z-]*)\(.*?\)/gu, st = {
|
|
|
1445
1445
|
// Misc
|
|
1446
1446
|
backgroundPositionX: m,
|
|
1447
1447
|
backgroundPositionY: m,
|
|
1448
|
-
...
|
|
1448
|
+
...Lr,
|
|
1449
1449
|
zIndex: Zt,
|
|
1450
1450
|
// SVG
|
|
1451
1451
|
fillOpacity: le,
|
|
@@ -1615,7 +1615,7 @@ class Gr {
|
|
|
1615
1615
|
return process.env.NODE_ENV !== "production" && Vn(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
1616
1616
|
}
|
|
1617
1617
|
on(t, n) {
|
|
1618
|
-
this.events[t] || (this.events[t] = new
|
|
1618
|
+
this.events[t] || (this.events[t] = new Tn());
|
|
1619
1619
|
const s = this.events[t].add(n);
|
|
1620
1620
|
return t === "change" ? () => {
|
|
1621
1621
|
s(), k.read(() => {
|
|
@@ -1843,7 +1843,7 @@ 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"
|
|
@@ -1977,7 +1977,7 @@ function oo(e, 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,7 +2001,7 @@ 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,
|
|
2004
|
+
var b, T;
|
|
2005
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,
|
|
@@ -2017,7 +2017,7 @@ function ho(e, t, n, s, i) {
|
|
|
2017
2017
|
Ys(() => {
|
|
2018
2018
|
u && f.current && u.update(n, a);
|
|
2019
2019
|
});
|
|
2020
|
-
const h = n[ds], y = ue(!!h && !((b = window.MotionHandoffIsComplete) != null && b.call(window, h)) && ((
|
|
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
2022
|
u && (f.current = !0, window.MotionIsMounted = !0, u.updateFeatures(), zr.render(u.render), y.current && u.animationState && u.animationState.animateChanges());
|
|
2023
2023
|
}), ct(() => {
|
|
@@ -2088,11 +2088,11 @@ function bo(e) {
|
|
|
2088
2088
|
ProjectionNode: s.ProjectionNode
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
|
-
const
|
|
2091
|
+
const vo = {};
|
|
2092
2092
|
function ps(e, { layout: t, layoutId: n }) {
|
|
2093
|
-
return re.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!
|
|
2093
|
+
return re.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!vo[e] || e === "opacity");
|
|
2094
2094
|
}
|
|
2095
|
-
const
|
|
2095
|
+
const To = {
|
|
2096
2096
|
x: "translateX",
|
|
2097
2097
|
y: "translateY",
|
|
2098
2098
|
z: "translateZ",
|
|
@@ -2109,7 +2109,7 @@ function Vo(e, t, n) {
|
|
|
2109
2109
|
const l = rs(a, St[o]);
|
|
2110
2110
|
if (!c) {
|
|
2111
2111
|
i = !1;
|
|
2112
|
-
const u =
|
|
2112
|
+
const u = To[o] || o;
|
|
2113
2113
|
s += `${u}(${l}) `;
|
|
2114
2114
|
}
|
|
2115
2115
|
n && (t[o] = l);
|
|
@@ -2146,10 +2146,10 @@ const Ft = () => ({
|
|
|
2146
2146
|
});
|
|
2147
2147
|
function ms(e, t, n) {
|
|
2148
2148
|
for (const s in t)
|
|
2149
|
-
!
|
|
2149
|
+
!D(t[s]) && !ps(s, n) && (e[s] = t[s]);
|
|
2150
2150
|
}
|
|
2151
2151
|
function So({ transformTemplate: e }, t) {
|
|
2152
|
-
return
|
|
2152
|
+
return De(() => {
|
|
2153
2153
|
const n = Ft();
|
|
2154
2154
|
return Pt(n, t, e), Object.assign({}, n.vars, n.style);
|
|
2155
2155
|
}, [t]);
|
|
@@ -2199,7 +2199,7 @@ const ys = () => ({
|
|
|
2199
2199
|
attrs: {}
|
|
2200
2200
|
}), bs = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
2201
2201
|
function Fo(e, t, n, s) {
|
|
2202
|
-
const i =
|
|
2202
|
+
const i = De(() => {
|
|
2203
2203
|
const r = ys();
|
|
2204
2204
|
return gs(r, t, bs(s), e.transformTemplate, e.style), {
|
|
2205
2205
|
...r.attrs,
|
|
@@ -2212,7 +2212,7 @@ function Fo(e, t, n, s) {
|
|
|
2212
2212
|
}
|
|
2213
2213
|
return i;
|
|
2214
2214
|
}
|
|
2215
|
-
const
|
|
2215
|
+
const Do = [
|
|
2216
2216
|
"animate",
|
|
2217
2217
|
"circle",
|
|
2218
2218
|
"defs",
|
|
@@ -2239,7 +2239,7 @@ const Ro = [
|
|
|
2239
2239
|
"use",
|
|
2240
2240
|
"view"
|
|
2241
2241
|
];
|
|
2242
|
-
function
|
|
2242
|
+
function Dt(e) {
|
|
2243
2243
|
return (
|
|
2244
2244
|
/**
|
|
2245
2245
|
* If it's not a string, it's a custom React component. Currently we only support
|
|
@@ -2252,16 +2252,16 @@ function Rt(e) {
|
|
|
2252
2252
|
/**
|
|
2253
2253
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
2254
2254
|
*/
|
|
2255
|
-
!!(
|
|
2255
|
+
!!(Do.indexOf(e) > -1 || /**
|
|
2256
2256
|
* If it contains a capital letter, it's an SVG component
|
|
2257
2257
|
*/
|
|
2258
2258
|
/[A-Z]/u.test(e))
|
|
2259
2259
|
)
|
|
2260
2260
|
);
|
|
2261
2261
|
}
|
|
2262
|
-
function
|
|
2262
|
+
function Ro(e = !1) {
|
|
2263
2263
|
return (n, s, i, { latestValues: r }, o) => {
|
|
2264
|
-
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]);
|
|
2265
2265
|
return qs(n, {
|
|
2266
2266
|
...u,
|
|
2267
2267
|
children: f
|
|
@@ -2274,7 +2274,7 @@ function on(e) {
|
|
|
2274
2274
|
t[0][s] = n.get(), t[1][s] = n.getVelocity();
|
|
2275
2275
|
}), t;
|
|
2276
2276
|
}
|
|
2277
|
-
function
|
|
2277
|
+
function Rt(e, t, n, s) {
|
|
2278
2278
|
if (typeof t == "function") {
|
|
2279
2279
|
const [i, r] = on(s);
|
|
2280
2280
|
t = t(n !== void 0 ? n : e.custom, i, r);
|
|
@@ -2286,7 +2286,7 @@ function Dt(e, t, n, s) {
|
|
|
2286
2286
|
return t;
|
|
2287
2287
|
}
|
|
2288
2288
|
function Oo(e) {
|
|
2289
|
-
return
|
|
2289
|
+
return D(e) ? e.get() : e;
|
|
2290
2290
|
}
|
|
2291
2291
|
function Io({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, i) {
|
|
2292
2292
|
return {
|
|
@@ -2294,7 +2294,7 @@ function Io({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, i) {
|
|
|
2294
2294
|
renderState: t()
|
|
2295
2295
|
};
|
|
2296
2296
|
}
|
|
2297
|
-
const
|
|
2297
|
+
const vs = (e) => (t, n) => {
|
|
2298
2298
|
const s = E(Ie), i = E(gn), r = () => Io(e, t, s, i);
|
|
2299
2299
|
return n ? r() : Js(r);
|
|
2300
2300
|
};
|
|
@@ -2311,9 +2311,9 @@ function Eo(e, t, n, s) {
|
|
|
2311
2311
|
if (d && typeof d != "boolean" && !Ee(d)) {
|
|
2312
2312
|
const f = Array.isArray(d) ? d : [d];
|
|
2313
2313
|
for (let h = 0; h < f.length; h++) {
|
|
2314
|
-
const y =
|
|
2314
|
+
const y = Rt(e, f[h]);
|
|
2315
2315
|
if (y) {
|
|
2316
|
-
const { transitionEnd: b, transition:
|
|
2316
|
+
const { transitionEnd: b, transition: T, ...p } = y;
|
|
2317
2317
|
for (const V in p) {
|
|
2318
2318
|
let g = p[V];
|
|
2319
2319
|
if (Array.isArray(g)) {
|
|
@@ -2333,46 +2333,46 @@ function Ot(e, t, n) {
|
|
|
2333
2333
|
var r;
|
|
2334
2334
|
const { style: s } = e, i = {};
|
|
2335
2335
|
for (const o in s)
|
|
2336
|
-
(
|
|
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]);
|
|
2337
2337
|
return i;
|
|
2338
2338
|
}
|
|
2339
2339
|
const ko = {
|
|
2340
|
-
useVisualState:
|
|
2340
|
+
useVisualState: vs({
|
|
2341
2341
|
scrapeMotionValuesFromProps: Ot,
|
|
2342
2342
|
createRenderState: Ft
|
|
2343
2343
|
})
|
|
2344
2344
|
};
|
|
2345
|
-
function
|
|
2345
|
+
function Ts(e, t, n) {
|
|
2346
2346
|
const s = Ot(e, t, n);
|
|
2347
2347
|
for (const i in e)
|
|
2348
|
-
if (
|
|
2348
|
+
if (D(e[i]) || D(t[i])) {
|
|
2349
2349
|
const r = ie.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
2350
2350
|
s[r] = e[i];
|
|
2351
2351
|
}
|
|
2352
2352
|
return s;
|
|
2353
2353
|
}
|
|
2354
|
-
const
|
|
2355
|
-
useVisualState:
|
|
2356
|
-
scrapeMotionValuesFromProps:
|
|
2354
|
+
const No = {
|
|
2355
|
+
useVisualState: vs({
|
|
2356
|
+
scrapeMotionValuesFromProps: Ts,
|
|
2357
2357
|
createRenderState: ys
|
|
2358
2358
|
})
|
|
2359
2359
|
};
|
|
2360
|
-
function
|
|
2360
|
+
function Lo(e, t) {
|
|
2361
2361
|
return function(s, { forwardMotionProps: i } = { forwardMotionProps: !1 }) {
|
|
2362
2362
|
const o = {
|
|
2363
|
-
...
|
|
2363
|
+
...Dt(s) ? No : ko,
|
|
2364
2364
|
preloadedFeatures: e,
|
|
2365
|
-
useRender:
|
|
2365
|
+
useRender: Ro(i),
|
|
2366
2366
|
createVisualElement: t,
|
|
2367
2367
|
Component: s
|
|
2368
2368
|
};
|
|
2369
2369
|
return mo(o);
|
|
2370
2370
|
};
|
|
2371
2371
|
}
|
|
2372
|
-
const Bo = /* @__PURE__ */
|
|
2372
|
+
const Bo = /* @__PURE__ */ Lo();
|
|
2373
2373
|
function he(e, t, n) {
|
|
2374
2374
|
const s = e.getProps();
|
|
2375
|
-
return
|
|
2375
|
+
return Rt(s, t, n !== void 0 ? n : s.custom, e);
|
|
2376
2376
|
}
|
|
2377
2377
|
const it = (e) => Array.isArray(e);
|
|
2378
2378
|
function Ko(e, t, n) {
|
|
@@ -2391,7 +2391,7 @@ function Wo(e, t) {
|
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
2393
|
function jo(e) {
|
|
2394
|
-
return !!(
|
|
2394
|
+
return !!(D(e) && e.add);
|
|
2395
2395
|
}
|
|
2396
2396
|
function _o(e, t) {
|
|
2397
2397
|
const n = e.getValue("willChange");
|
|
@@ -2434,7 +2434,7 @@ function Jo({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDi
|
|
|
2434
2434
|
const Qo = (e, t, n, s = {}, i, r) => (o) => {
|
|
2435
2435
|
const a = Qn(s, e) || {}, c = a.delay || s.delay || 0;
|
|
2436
2436
|
let { elapsed: l = 0 } = s;
|
|
2437
|
-
l = l - /* @__PURE__ */
|
|
2437
|
+
l = l - /* @__PURE__ */ N(c);
|
|
2438
2438
|
const u = {
|
|
2439
2439
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
2440
2440
|
ease: "easeOut",
|
|
@@ -2451,7 +2451,7 @@ const Qo = (e, t, n, s = {}, i, r) => (o) => {
|
|
|
2451
2451
|
motionValue: t,
|
|
2452
2452
|
element: r ? void 0 : i
|
|
2453
2453
|
};
|
|
2454
|
-
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);
|
|
2455
2455
|
let d = !1;
|
|
2456
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) {
|
|
2457
2457
|
const f = Uo(u.keyframes, a);
|
|
@@ -2491,8 +2491,8 @@ function ws(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
2491
2491
|
}
|
|
2492
2492
|
}
|
|
2493
2493
|
_o(e, u), d.start(Qo(u, d, f, e.shouldReduceMotion && es.has(u) ? { type: !1 } : h, e, b));
|
|
2494
|
-
const
|
|
2495
|
-
|
|
2494
|
+
const T = d.animation;
|
|
2495
|
+
T && c.push(T);
|
|
2496
2496
|
}
|
|
2497
2497
|
return o && Promise.all(c).then(() => {
|
|
2498
2498
|
k.update(() => {
|
|
@@ -2593,52 +2593,52 @@ function ua(e) {
|
|
|
2593
2593
|
function o(c) {
|
|
2594
2594
|
const { props: l } = e, u = Ss(e.parent) || {}, d = [], f = /* @__PURE__ */ new Set();
|
|
2595
2595
|
let h = {}, y = 1 / 0;
|
|
2596
|
-
for (let
|
|
2597
|
-
const p = ra[
|
|
2598
|
-
|
|
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
2599
|
let S = g === u[p] && g !== l[p] && x;
|
|
2600
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 &&
|
|
2601
|
+
!V.isActive && v === null || // If we didn't and don't have any defined prop for this animation type
|
|
2602
2602
|
!g && !V.prevProp || // Or if the prop doesn't define an animation
|
|
2603
2603
|
Ee(g) || typeof g == "boolean")
|
|
2604
2604
|
continue;
|
|
2605
2605
|
const C = ca(V.prevProp, g);
|
|
2606
2606
|
let w = C || // If we're making this variant active, we want to always make it active
|
|
2607
2607
|
p === c && V.isActive && !S && x || // If we removed a higher-priority variant (i is in reverse order)
|
|
2608
|
-
|
|
2608
|
+
T > y && x, R = !1;
|
|
2609
2609
|
const O = Array.isArray(g) ? g : [g];
|
|
2610
2610
|
let X = O.reduce(i(p), {});
|
|
2611
|
-
|
|
2612
|
-
const { prevResolvedValues: It = {} } = V,
|
|
2611
|
+
v === !1 && (X = {});
|
|
2612
|
+
const { prevResolvedValues: It = {} } = V, Ls = {
|
|
2613
2613
|
...It,
|
|
2614
2614
|
...X
|
|
2615
2615
|
}, Et = (P) => {
|
|
2616
|
-
w = !0, f.has(P) && (
|
|
2617
|
-
const
|
|
2618
|
-
|
|
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);
|
|
2619
2619
|
};
|
|
2620
|
-
for (const P in
|
|
2621
|
-
const
|
|
2620
|
+
for (const P in Ls) {
|
|
2621
|
+
const L = X[P], Ne = It[P];
|
|
2622
2622
|
if (h.hasOwnProperty(P))
|
|
2623
2623
|
continue;
|
|
2624
|
-
let
|
|
2625
|
-
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;
|
|
2626
2626
|
}
|
|
2627
|
-
V.prevProp = g, V.prevResolvedValues = X, V.isActive && (h = { ...h, ...X }), s && e.blockInitialAnimation && (w = !1), w && (!(S && C) ||
|
|
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) => ({
|
|
2628
2628
|
animation: P,
|
|
2629
2629
|
options: { type: p }
|
|
2630
2630
|
})));
|
|
2631
2631
|
}
|
|
2632
2632
|
if (f.size) {
|
|
2633
|
-
const
|
|
2633
|
+
const T = {};
|
|
2634
2634
|
if (typeof l.initial != "boolean") {
|
|
2635
2635
|
const p = he(e, Array.isArray(l.initial) ? l.initial[0] : l.initial);
|
|
2636
|
-
p && p.transition && (
|
|
2636
|
+
p && p.transition && (T.transition = p.transition);
|
|
2637
2637
|
}
|
|
2638
2638
|
f.forEach((p) => {
|
|
2639
2639
|
const V = e.getBaseTarget(p), g = e.getValue(p);
|
|
2640
|
-
g && (g.liveStyle = !0),
|
|
2641
|
-
}), d.push({ animation:
|
|
2640
|
+
g && (g.liveStyle = !0), T[p] = V ?? null;
|
|
2641
|
+
}), d.push({ animation: T });
|
|
2642
2642
|
}
|
|
2643
2643
|
let b = !!d.length;
|
|
2644
2644
|
return s && (l.initial === !1 || l.initial === l.animate) && !e.manuallyAnimateOnMount && (b = !1), s = !1, b ? t(d) : Promise.resolve();
|
|
@@ -2820,7 +2820,7 @@ class ba extends oe {
|
|
|
2820
2820
|
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
2821
2821
|
}
|
|
2822
2822
|
mount() {
|
|
2823
|
-
this.unmount =
|
|
2823
|
+
this.unmount = Re(un(this.node.current, "focus", () => this.onFocus()), un(this.node.current, "blur", () => this.onBlur()));
|
|
2824
2824
|
}
|
|
2825
2825
|
unmount() {
|
|
2826
2826
|
}
|
|
@@ -2833,7 +2833,7 @@ function fn(e, t, n) {
|
|
|
2833
2833
|
const i = "onTap" + (n === "End" ? "" : n), r = s[i];
|
|
2834
2834
|
r && k.postRender(() => r(t, xs(t)));
|
|
2835
2835
|
}
|
|
2836
|
-
class
|
|
2836
|
+
class va extends oe {
|
|
2837
2837
|
mount() {
|
|
2838
2838
|
const { current: t } = this.node;
|
|
2839
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 }));
|
|
@@ -2841,11 +2841,11 @@ class Ta extends oe {
|
|
|
2841
2841
|
unmount() {
|
|
2842
2842
|
}
|
|
2843
2843
|
}
|
|
2844
|
-
const ot = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(),
|
|
2844
|
+
const ot = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), Ta = (e) => {
|
|
2845
2845
|
const t = ot.get(e.target);
|
|
2846
2846
|
t && t(e);
|
|
2847
2847
|
}, wa = (e) => {
|
|
2848
|
-
e.forEach(
|
|
2848
|
+
e.forEach(Ta);
|
|
2849
2849
|
};
|
|
2850
2850
|
function Va({ root: e, ...t }) {
|
|
2851
2851
|
const n = e || document;
|
|
@@ -2903,7 +2903,7 @@ const Ca = {
|
|
|
2903
2903
|
Feature: Aa
|
|
2904
2904
|
},
|
|
2905
2905
|
tap: {
|
|
2906
|
-
Feature:
|
|
2906
|
+
Feature: va
|
|
2907
2907
|
},
|
|
2908
2908
|
focus: {
|
|
2909
2909
|
Feature: ba
|
|
@@ -2921,12 +2921,12 @@ function Pa() {
|
|
|
2921
2921
|
at.current = !1;
|
|
2922
2922
|
}
|
|
2923
2923
|
const Fa = /* @__PURE__ */ new WeakMap();
|
|
2924
|
-
function
|
|
2924
|
+
function Da(e, t, n) {
|
|
2925
2925
|
for (const s in t) {
|
|
2926
2926
|
const i = t[s], r = n[s];
|
|
2927
|
-
if (
|
|
2927
|
+
if (D(i))
|
|
2928
2928
|
e.addValue(s, i);
|
|
2929
|
-
else if (
|
|
2929
|
+
else if (D(r))
|
|
2930
2930
|
e.addValue(s, Pe(i, { owner: e }));
|
|
2931
2931
|
else if (r !== i)
|
|
2932
2932
|
if (e.hasValue(s)) {
|
|
@@ -2950,7 +2950,7 @@ const dn = [
|
|
|
2950
2950
|
"LayoutAnimationStart",
|
|
2951
2951
|
"LayoutAnimationComplete"
|
|
2952
2952
|
];
|
|
2953
|
-
class
|
|
2953
|
+
class Ra {
|
|
2954
2954
|
/**
|
|
2955
2955
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
2956
2956
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -2973,7 +2973,7 @@ class Da {
|
|
|
2973
2973
|
const { willChange: u, ...d } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
2974
2974
|
for (const f in d) {
|
|
2975
2975
|
const h = d[f];
|
|
2976
|
-
c[f] !== void 0 &&
|
|
2976
|
+
c[f] !== void 0 && D(h) && h.set(c[f], !1);
|
|
2977
2977
|
}
|
|
2978
2978
|
}
|
|
2979
2979
|
mount(t) {
|
|
@@ -3046,7 +3046,7 @@ class Da {
|
|
|
3046
3046
|
const r = "on" + i, o = t[r];
|
|
3047
3047
|
o && (this.propEventSubscriptions[i] = this.on(i, o));
|
|
3048
3048
|
}
|
|
3049
|
-
this.prevMotionValues =
|
|
3049
|
+
this.prevMotionValues = Da(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
3050
3050
|
}
|
|
3051
3051
|
getProps() {
|
|
3052
3052
|
return this.props;
|
|
@@ -3111,7 +3111,7 @@ class Da {
|
|
|
3111
3111
|
*/
|
|
3112
3112
|
readValue(t, n) {
|
|
3113
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);
|
|
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,
|
|
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;
|
|
3115
3115
|
}
|
|
3116
3116
|
/**
|
|
3117
3117
|
* Set the base target to later animate back to. This is currently
|
|
@@ -3129,22 +3129,22 @@ class Da {
|
|
|
3129
3129
|
const { initial: n } = this.props;
|
|
3130
3130
|
let s;
|
|
3131
3131
|
if (typeof n == "string" || typeof n == "object") {
|
|
3132
|
-
const o =
|
|
3132
|
+
const o = Rt(this.props, n, (r = this.presenceContext) == null ? void 0 : r.custom);
|
|
3133
3133
|
o && (s = o[t]);
|
|
3134
3134
|
}
|
|
3135
3135
|
if (n && s !== void 0)
|
|
3136
3136
|
return s;
|
|
3137
3137
|
const i = this.getBaseTargetFromProps(this.props, t);
|
|
3138
|
-
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];
|
|
3139
3139
|
}
|
|
3140
3140
|
on(t, n) {
|
|
3141
|
-
return this.events[t] || (this.events[t] = new
|
|
3141
|
+
return this.events[t] || (this.events[t] = new Tn()), this.events[t].add(n);
|
|
3142
3142
|
}
|
|
3143
3143
|
notify(t, ...n) {
|
|
3144
3144
|
this.events[t] && this.events[t].notify(...n);
|
|
3145
3145
|
}
|
|
3146
3146
|
}
|
|
3147
|
-
class Cs extends
|
|
3147
|
+
class Cs extends Ra {
|
|
3148
3148
|
constructor() {
|
|
3149
3149
|
super(...arguments), this.KeyframeResolver = Wr;
|
|
3150
3150
|
}
|
|
@@ -3160,7 +3160,7 @@ class Cs extends Da {
|
|
|
3160
3160
|
handleChildMotionValue() {
|
|
3161
3161
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
3162
3162
|
const { children: t } = this.props;
|
|
3163
|
-
|
|
3163
|
+
D(t) && (this.childSubscription = t.on("change", (n) => {
|
|
3164
3164
|
this.current && (this.current.textContent = `${n}`);
|
|
3165
3165
|
}));
|
|
3166
3166
|
}
|
|
@@ -3245,7 +3245,7 @@ class ka extends Cs {
|
|
|
3245
3245
|
return n = Fs.has(n) ? n : Ct(n), t.getAttribute(n);
|
|
3246
3246
|
}
|
|
3247
3247
|
scrapeMotionValuesFromProps(t, n, s) {
|
|
3248
|
-
return
|
|
3248
|
+
return Ts(t, n, s);
|
|
3249
3249
|
}
|
|
3250
3250
|
build(t, n, s) {
|
|
3251
3251
|
gs(t, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
@@ -3257,10 +3257,10 @@ class ka extends Cs {
|
|
|
3257
3257
|
this.isSVGTag = bs(t.tagName), super.mount(t);
|
|
3258
3258
|
}
|
|
3259
3259
|
}
|
|
3260
|
-
const
|
|
3260
|
+
const Na = (e, t) => Dt(e) ? new ka(t) : new Ia(t, {
|
|
3261
3261
|
allowProjection: e !== mn
|
|
3262
|
-
}),
|
|
3263
|
-
renderer:
|
|
3262
|
+
}), La = {
|
|
3263
|
+
renderer: Na,
|
|
3264
3264
|
...ha,
|
|
3265
3265
|
...Ca
|
|
3266
3266
|
}, hn = /* @__PURE__ */ Bo("span"), Ba = {
|
|
@@ -3275,15 +3275,15 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3275
3275
|
h: "8"
|
|
3276
3276
|
}
|
|
3277
3277
|
}
|
|
3278
|
-
},
|
|
3278
|
+
}, Ds = {
|
|
3279
3279
|
Root: {
|
|
3280
3280
|
0: "1",
|
|
3281
|
-
1: "
|
|
3281
|
+
1: "1_5",
|
|
3282
3282
|
2: "2"
|
|
3283
3283
|
},
|
|
3284
3284
|
Text: {
|
|
3285
3285
|
0: "1",
|
|
3286
|
-
1: "
|
|
3286
|
+
1: "1_5",
|
|
3287
3287
|
2: "2"
|
|
3288
3288
|
}
|
|
3289
3289
|
}, ye = {
|
|
@@ -3379,7 +3379,7 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3379
3379
|
size: "1",
|
|
3380
3380
|
color: "default",
|
|
3381
3381
|
variant: "soft"
|
|
3382
|
-
}),
|
|
3382
|
+
}), Rs = ({
|
|
3383
3383
|
as: e = "span",
|
|
3384
3384
|
size: t = "1",
|
|
3385
3385
|
color: n = "default",
|
|
@@ -3391,9 +3391,9 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3391
3391
|
{
|
|
3392
3392
|
as: e,
|
|
3393
3393
|
align: "center",
|
|
3394
|
-
rounded: "
|
|
3394
|
+
rounded: "1",
|
|
3395
3395
|
display: "inline-flex",
|
|
3396
|
-
pl:
|
|
3396
|
+
pl: Ds.Root[t],
|
|
3397
3397
|
backgroundColor: ye.Root[s][n],
|
|
3398
3398
|
h: Ba.Root[t].h,
|
|
3399
3399
|
className: js("tgph-tag", i),
|
|
@@ -3415,7 +3415,7 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3415
3415
|
size: r.size,
|
|
3416
3416
|
color: ye.Text[r.variant][r.color],
|
|
3417
3417
|
weight: "medium",
|
|
3418
|
-
mr:
|
|
3418
|
+
mr: Ds.Text[r.size],
|
|
3419
3419
|
maxW: t,
|
|
3420
3420
|
overflow: n,
|
|
3421
3421
|
internal_optionalAs: !0,
|
|
@@ -3434,7 +3434,7 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3434
3434
|
const o = setTimeout(() => r(!1), 2e3);
|
|
3435
3435
|
return () => clearTimeout(o);
|
|
3436
3436
|
}
|
|
3437
|
-
}, [i]), /* @__PURE__ */ F(no, { features:
|
|
3437
|
+
}, [i]), /* @__PURE__ */ F(no, { features: La, children: /* @__PURE__ */ F($s, { label: "Copy text", children: /* @__PURE__ */ ut(
|
|
3438
3438
|
we.Root,
|
|
3439
3439
|
{
|
|
3440
3440
|
onClick: (o) => {
|
|
@@ -3444,8 +3444,8 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3444
3444
|
size: s.size,
|
|
3445
3445
|
color: ye.Button[s.variant][s.color],
|
|
3446
3446
|
variant: s.variant,
|
|
3447
|
-
roundedTopRight: "
|
|
3448
|
-
roundedBottomRight: "
|
|
3447
|
+
roundedTopRight: "1",
|
|
3448
|
+
roundedBottomRight: "1",
|
|
3449
3449
|
roundedTopLeft: "0",
|
|
3450
3450
|
roundedBottomLeft: "0",
|
|
3451
3451
|
position: "relative",
|
|
@@ -3490,8 +3490,8 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3490
3490
|
color: ye.Button[t.variant][t.color],
|
|
3491
3491
|
variant: t.variant,
|
|
3492
3492
|
icon: { icon: pn, alt: "close" },
|
|
3493
|
-
roundedTopRight: "
|
|
3494
|
-
roundedBottomRight: "
|
|
3493
|
+
roundedTopRight: "1",
|
|
3494
|
+
roundedBottomRight: "1",
|
|
3495
3495
|
roundedTopLeft: "0",
|
|
3496
3496
|
roundedBottomLeft: "0",
|
|
3497
3497
|
...e
|
|
@@ -3511,15 +3511,11 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3511
3511
|
size: i.size,
|
|
3512
3512
|
color: ye.Icon[i.variant][i.color],
|
|
3513
3513
|
mr: "1",
|
|
3514
|
-
roundedTopRight: "3",
|
|
3515
|
-
roundedBottomRight: "3",
|
|
3516
|
-
roundedTopLeft: "0",
|
|
3517
|
-
roundedBottomLeft: "0",
|
|
3518
3514
|
...r,
|
|
3519
3515
|
...s
|
|
3520
3516
|
}
|
|
3521
3517
|
);
|
|
3522
|
-
},
|
|
3518
|
+
}, Ns = ({
|
|
3523
3519
|
color: e = "default",
|
|
3524
3520
|
size: t = "1",
|
|
3525
3521
|
variant: n = "soft",
|
|
@@ -3530,20 +3526,20 @@ const La = (e, t) => Rt(e) ? new ka(t) : new Ia(t, {
|
|
|
3530
3526
|
textProps: a = { maxW: "40" },
|
|
3531
3527
|
children: c,
|
|
3532
3528
|
...l
|
|
3533
|
-
}) => /* @__PURE__ */ ut(
|
|
3529
|
+
}) => /* @__PURE__ */ ut(Rs, { color: e, size: t, variant: n, ...l, children: [
|
|
3534
3530
|
s && /* @__PURE__ */ F(ks, { ...s }),
|
|
3535
3531
|
/* @__PURE__ */ F(Os, { as: "span", ...a, children: c }),
|
|
3536
3532
|
i && /* @__PURE__ */ F(Es, { onClick: i, icon: { icon: pn, alt: "Remove" } }),
|
|
3537
3533
|
r && /* @__PURE__ */ F(Is, { onClick: r, textToCopy: o })
|
|
3538
3534
|
] });
|
|
3539
|
-
Object.assign(
|
|
3540
|
-
Root:
|
|
3535
|
+
Object.assign(Ns, {
|
|
3536
|
+
Root: Rs,
|
|
3541
3537
|
Button: Es,
|
|
3542
3538
|
Text: Os,
|
|
3543
3539
|
Icon: ks,
|
|
3544
3540
|
CopyButton: Is
|
|
3545
3541
|
});
|
|
3546
|
-
const qa =
|
|
3542
|
+
const qa = Ns;
|
|
3547
3543
|
export {
|
|
3548
3544
|
qa as Tag
|
|
3549
3545
|
};
|