@mobielnl/elements 0.0.1

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.
@@ -0,0 +1,2597 @@
1
+ "use client";
2
+ import { i as q, n as Ue, a as Pt, c as Y, p as Ve, w as he, b as $e, d as Ft, t as Dt, e as Kn, v as Bn, f as Ln, g as _n, h as Et, j as Un, k as $n, l as k, m as Gn, o as jn, q as fe, r as st, s as Ot, u as Wn, x as Hn, y as zn, z as It, A as qn, B as Yn, C as Xn, D as Zn, E as Jn, F as Rt, G as Nt, H as kt, I as Kt } from "./index-CSe9vMR8.js";
3
+ import { Fragment as Qn } from "react";
4
+ var _e = typeof globalThis < "u" && globalThis.process ? globalThis.process : { env: { NODE_ENV: "production" } };
5
+ function es(t, e) {
6
+ t.indexOf(e) === -1 && t.push(e);
7
+ }
8
+ function ts(t, e) {
9
+ const n = t.indexOf(e);
10
+ n > -1 && t.splice(n, 1);
11
+ }
12
+ const N = {}, Bt = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), Lt = (t) => /^0[^.\s]+$/u.test(t);
13
+ // @__NO_SIDE_EFFECTS__
14
+ function Ge(t) {
15
+ let e;
16
+ return () => (e === void 0 && (e = t()), e);
17
+ }
18
+ const X = /* @__NO_SIDE_EFFECTS__ */ (t) => t, ns = (t, e) => (n) => e(t(n)), de = (...t) => t.reduce(ns), _t = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
19
+ const s = e - t;
20
+ return s === 0 ? 1 : (n - t) / s;
21
+ };
22
+ class Ut {
23
+ constructor() {
24
+ this.subscriptions = [];
25
+ }
26
+ add(e) {
27
+ return es(this.subscriptions, e), () => ts(this.subscriptions, e);
28
+ }
29
+ notify(e, n, s) {
30
+ const i = this.subscriptions.length;
31
+ if (i)
32
+ if (i === 1)
33
+ this.subscriptions[0](e, n, s);
34
+ else
35
+ for (let r = 0; r < i; r++) {
36
+ const a = this.subscriptions[r];
37
+ a && a(e, n, s);
38
+ }
39
+ }
40
+ getSize() {
41
+ return this.subscriptions.length;
42
+ }
43
+ clear() {
44
+ this.subscriptions.length = 0;
45
+ }
46
+ }
47
+ const I = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, R = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
48
+ function $t(t, e) {
49
+ return e ? t * (1e3 / e) : 0;
50
+ }
51
+ const Gt = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, ss = 1e-7, is = 12;
52
+ function rs(t, e, n, s, i) {
53
+ let r, a, o = 0;
54
+ do
55
+ a = e + (n - e) / 2, r = Gt(a, s, i) - t, r > 0 ? n = a : e = a;
56
+ while (Math.abs(r) > ss && ++o < is);
57
+ return a;
58
+ }
59
+ function ne(t, e, n, s) {
60
+ if (t === e && n === s)
61
+ return X;
62
+ const i = (r) => rs(r, 0, 1, t, n);
63
+ return (r) => r === 0 || r === 1 ? r : Gt(i(r), e, s);
64
+ }
65
+ const jt = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Wt = (t) => (e) => 1 - t(1 - e), Ht = /* @__PURE__ */ ne(0.33, 1.53, 0.69, 0.99), je = /* @__PURE__ */ Wt(Ht), zt = /* @__PURE__ */ jt(je), qt = (t) => (t *= 2) < 1 ? 0.5 * je(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), We = (t) => 1 - Math.sin(Math.acos(t)), as = Wt(We), Yt = jt(We), os = /* @__PURE__ */ ne(0.42, 0, 1, 1), us = /* @__PURE__ */ ne(0, 0, 0.58, 1), Xt = /* @__PURE__ */ ne(0.42, 0, 0.58, 1), ls = (t) => Array.isArray(t) && typeof t[0] != "number", Zt = (t) => Array.isArray(t) && typeof t[0] == "number", it = {
66
+ linear: X,
67
+ easeIn: os,
68
+ easeInOut: Xt,
69
+ easeOut: us,
70
+ circIn: We,
71
+ circInOut: Yt,
72
+ circOut: as,
73
+ backIn: je,
74
+ backInOut: zt,
75
+ backOut: Ht,
76
+ anticipate: qt
77
+ }, cs = (t) => typeof t == "string", rt = (t) => {
78
+ if (Zt(t)) {
79
+ q(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
80
+ const [e, n, s, i] = t;
81
+ return ne(e, n, s, i);
82
+ } else if (cs(t))
83
+ return q(it[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), it[t];
84
+ return t;
85
+ }, se = [
86
+ "setup",
87
+ // Compute
88
+ "read",
89
+ // Read
90
+ "resolveKeyframes",
91
+ // Write/Read/Write/Read
92
+ "preUpdate",
93
+ // Compute
94
+ "update",
95
+ // Compute
96
+ "preRender",
97
+ // Compute
98
+ "render",
99
+ // Write
100
+ "postRender"
101
+ // Compute
102
+ ];
103
+ function hs(t, e) {
104
+ let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, r = !1;
105
+ const a = /* @__PURE__ */ new WeakSet();
106
+ let o = {
107
+ delta: 0,
108
+ timestamp: 0,
109
+ isProcessing: !1
110
+ };
111
+ function u(l) {
112
+ a.has(l) && (c.schedule(l), t()), l(o);
113
+ }
114
+ const c = {
115
+ /**
116
+ * Schedule a process to run on the next frame.
117
+ */
118
+ schedule: (l, h = !1, f = !1) => {
119
+ const v = f && i ? n : s;
120
+ return h && a.add(l), v.has(l) || v.add(l), l;
121
+ },
122
+ /**
123
+ * Cancel the provided callback from running on the next frame.
124
+ */
125
+ cancel: (l) => {
126
+ s.delete(l), a.delete(l);
127
+ },
128
+ /**
129
+ * Execute all schedule callbacks.
130
+ */
131
+ process: (l) => {
132
+ if (o = l, i) {
133
+ r = !0;
134
+ return;
135
+ }
136
+ i = !0, [n, s] = [s, n], n.forEach(u), n.clear(), i = !1, r && (r = !1, c.process(l));
137
+ }
138
+ };
139
+ return c;
140
+ }
141
+ const fs = 40;
142
+ function Jt(t, e) {
143
+ let n = !1, s = !0;
144
+ const i = {
145
+ delta: 0,
146
+ timestamp: 0,
147
+ isProcessing: !1
148
+ }, r = () => n = !0, a = se.reduce((g, S) => (g[S] = hs(r), g), {}), { setup: o, read: u, resolveKeyframes: c, preUpdate: l, update: h, preRender: f, render: d, postRender: v } = a, T = () => {
149
+ const g = N.useManualTiming ? i.timestamp : performance.now();
150
+ n = !1, N.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp, fs), 1)), i.timestamp = g, i.isProcessing = !0, o.process(i), u.process(i), c.process(i), l.process(i), h.process(i), f.process(i), d.process(i), v.process(i), i.isProcessing = !1, n && e && (s = !1, t(T));
151
+ }, b = () => {
152
+ n = !0, s = !0, i.isProcessing || t(T);
153
+ };
154
+ return { schedule: se.reduce((g, S) => {
155
+ const m = a[S];
156
+ return g[S] = (A, M = !1, y = !1) => (n || b(), m.schedule(A, M, y)), g;
157
+ }, {}), cancel: (g) => {
158
+ for (let S = 0; S < se.length; S++)
159
+ a[se[S]].cancel(g);
160
+ }, state: i, steps: a };
161
+ }
162
+ const { schedule: O, cancel: Ae, state: ae } = /* @__PURE__ */ Jt(typeof requestAnimationFrame < "u" ? requestAnimationFrame : X, !0);
163
+ let ie;
164
+ function ds() {
165
+ ie = void 0;
166
+ }
167
+ const E = {
168
+ now: () => (ie === void 0 && E.set(ae.isProcessing || N.useManualTiming ? ae.timestamp : performance.now()), ie),
169
+ set: (t) => {
170
+ ie = t, queueMicrotask(ds);
171
+ }
172
+ }, ee = (t) => Math.round(t * 1e5) / 1e5, He = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
173
+ function ps(t) {
174
+ return t == null;
175
+ }
176
+ const ms = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, ze = (t, e) => (n) => !!(typeof n == "string" && ms.test(n) && n.startsWith(t) || e && !ps(n) && Object.prototype.hasOwnProperty.call(n, e)), Qt = (t, e, n) => (s) => {
177
+ if (typeof s != "string")
178
+ return s;
179
+ const [i, r, a, o] = s.match(He);
180
+ return {
181
+ [t]: parseFloat(i),
182
+ [e]: parseFloat(r),
183
+ [n]: parseFloat(a),
184
+ alpha: o !== void 0 ? parseFloat(o) : 1
185
+ };
186
+ }, gs = (t) => Y(0, 255, t), me = {
187
+ ...Ue,
188
+ transform: (t) => Math.round(gs(t))
189
+ }, L = {
190
+ test: /* @__PURE__ */ ze("rgb", "red"),
191
+ parse: /* @__PURE__ */ Qt("red", "green", "blue"),
192
+ transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + me.transform(t) + ", " + me.transform(e) + ", " + me.transform(n) + ", " + ee(Pt.transform(s)) + ")"
193
+ };
194
+ function ys(t) {
195
+ let e = "", n = "", s = "", i = "";
196
+ return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), {
197
+ red: parseInt(e, 16),
198
+ green: parseInt(n, 16),
199
+ blue: parseInt(s, 16),
200
+ alpha: i ? parseInt(i, 16) / 255 : 1
201
+ };
202
+ }
203
+ const we = {
204
+ test: /* @__PURE__ */ ze("#"),
205
+ parse: ys,
206
+ transform: L.transform
207
+ }, W = {
208
+ test: /* @__PURE__ */ ze("hsl", "hue"),
209
+ parse: /* @__PURE__ */ Qt("hue", "saturation", "lightness"),
210
+ transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + Ve.transform(ee(e)) + ", " + Ve.transform(ee(n)) + ", " + ee(Pt.transform(s)) + ")"
211
+ }, x = {
212
+ test: (t) => L.test(t) || we.test(t) || W.test(t),
213
+ parse: (t) => L.test(t) ? L.parse(t) : W.test(t) ? W.parse(t) : we.parse(t),
214
+ transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? L.transform(t) : W.transform(t),
215
+ getAnimatableNone: (t) => {
216
+ const e = x.parse(t);
217
+ return e.alpha = 0, x.transform(e);
218
+ }
219
+ }, bs = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
220
+ function vs(t) {
221
+ return isNaN(t) && typeof t == "string" && (t.match(He)?.length || 0) + (t.match(bs)?.length || 0) > 0;
222
+ }
223
+ const en = "number", tn = "color", Ts = "var", Vs = "var(", at = "${}", As = /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;
224
+ function te(t) {
225
+ const e = t.toString(), n = [], s = {
226
+ color: [],
227
+ number: [],
228
+ var: []
229
+ }, i = [];
230
+ let r = 0;
231
+ const o = e.replace(As, (u) => (x.test(u) ? (s.color.push(r), i.push(tn), n.push(x.parse(u))) : u.startsWith(Vs) ? (s.var.push(r), i.push(Ts), n.push(u)) : (s.number.push(r), i.push(en), n.push(parseFloat(u))), ++r, at)).split(at);
232
+ return { values: n, split: o, indexes: s, types: i };
233
+ }
234
+ function nn(t) {
235
+ return te(t).values;
236
+ }
237
+ function sn(t) {
238
+ const { split: e, types: n } = te(t), s = e.length;
239
+ return (i) => {
240
+ let r = "";
241
+ for (let a = 0; a < s; a++)
242
+ if (r += e[a], i[a] !== void 0) {
243
+ const o = n[a];
244
+ o === en ? r += ee(i[a]) : o === tn ? r += x.transform(i[a]) : r += i[a];
245
+ }
246
+ return r;
247
+ };
248
+ }
249
+ const ws = (t) => typeof t == "number" ? 0 : x.test(t) ? x.getAnimatableNone(t) : t;
250
+ function Ss(t) {
251
+ const e = nn(t);
252
+ return sn(t)(e.map(ws));
253
+ }
254
+ const Z = {
255
+ test: vs,
256
+ parse: nn,
257
+ createTransformer: sn,
258
+ getAnimatableNone: Ss
259
+ };
260
+ function ge(t, e, n) {
261
+ return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
262
+ }
263
+ function xs({ hue: t, saturation: e, lightness: n, alpha: s }) {
264
+ t /= 360, e /= 100, n /= 100;
265
+ let i = 0, r = 0, a = 0;
266
+ if (!e)
267
+ i = r = a = n;
268
+ else {
269
+ const o = n < 0.5 ? n * (1 + e) : n + e - n * e, u = 2 * n - o;
270
+ i = ge(u, o, t + 1 / 3), r = ge(u, o, t), a = ge(u, o, t - 1 / 3);
271
+ }
272
+ return {
273
+ red: Math.round(i * 255),
274
+ green: Math.round(r * 255),
275
+ blue: Math.round(a * 255),
276
+ alpha: s
277
+ };
278
+ }
279
+ function oe(t, e) {
280
+ return (n) => n > 0 ? e : t;
281
+ }
282
+ const pe = (t, e, n) => t + (e - t) * n, ye = (t, e, n) => {
283
+ const s = t * t, i = n * (e * e - s) + s;
284
+ return i < 0 ? 0 : Math.sqrt(i);
285
+ }, Ms = [we, L, W], Cs = (t) => Ms.find((e) => e.test(t));
286
+ function ot(t) {
287
+ const e = Cs(t);
288
+ if (he(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
289
+ return !1;
290
+ let n = e.parse(t);
291
+ return e === W && (n = xs(n)), n;
292
+ }
293
+ const ut = (t, e) => {
294
+ const n = ot(t), s = ot(e);
295
+ if (!n || !s)
296
+ return oe(t, e);
297
+ const i = { ...n };
298
+ return (r) => (i.red = ye(n.red, s.red, r), i.green = ye(n.green, s.green, r), i.blue = ye(n.blue, s.blue, r), i.alpha = pe(n.alpha, s.alpha, r), L.transform(i));
299
+ }, Se = /* @__PURE__ */ new Set(["none", "hidden"]);
300
+ function Ps(t, e) {
301
+ return Se.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
302
+ }
303
+ function Fs(t, e) {
304
+ return (n) => pe(t, e, n);
305
+ }
306
+ function qe(t) {
307
+ return typeof t == "number" ? Fs : typeof t == "string" ? $e(t) ? oe : x.test(t) ? ut : Os : Array.isArray(t) ? rn : typeof t == "object" ? x.test(t) ? ut : Ds : oe;
308
+ }
309
+ function rn(t, e) {
310
+ const n = [...t], s = n.length, i = t.map((r, a) => qe(r)(r, e[a]));
311
+ return (r) => {
312
+ for (let a = 0; a < s; a++)
313
+ n[a] = i[a](r);
314
+ return n;
315
+ };
316
+ }
317
+ function Ds(t, e) {
318
+ const n = { ...t, ...e }, s = {};
319
+ for (const i in n)
320
+ t[i] !== void 0 && e[i] !== void 0 && (s[i] = qe(t[i])(t[i], e[i]));
321
+ return (i) => {
322
+ for (const r in s)
323
+ n[r] = s[r](i);
324
+ return n;
325
+ };
326
+ }
327
+ function Es(t, e) {
328
+ const n = [], s = { color: 0, var: 0, number: 0 };
329
+ for (let i = 0; i < e.values.length; i++) {
330
+ const r = e.types[i], a = t.indexes[r][s[r]], o = t.values[a] ?? 0;
331
+ n[i] = o, s[r]++;
332
+ }
333
+ return n;
334
+ }
335
+ const Os = (t, e) => {
336
+ const n = Z.createTransformer(e), s = te(t), i = te(e);
337
+ 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 ? Se.has(t) && !i.values.length || Se.has(e) && !s.values.length ? Ps(t, e) : de(rn(Es(s, i), i.values), n) : (he(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), oe(t, e));
338
+ };
339
+ function an(t, e, n) {
340
+ return typeof t == "number" && typeof e == "number" && typeof n == "number" ? pe(t, e, n) : qe(t)(t, e);
341
+ }
342
+ const Is = (t) => {
343
+ const e = ({ timestamp: n }) => t(n);
344
+ return {
345
+ start: (n = !0) => O.update(e, n),
346
+ stop: () => Ae(e),
347
+ /**
348
+ * If we're processing this frame we can use the
349
+ * framelocked timestamp to keep things in sync.
350
+ */
351
+ now: () => ae.isProcessing ? ae.timestamp : E.now()
352
+ };
353
+ }, on = (t, e, n = 10) => {
354
+ let s = "";
355
+ const i = Math.max(Math.round(e / n), 2);
356
+ for (let r = 0; r < i; r++)
357
+ s += Math.round(t(r / (i - 1)) * 1e4) / 1e4 + ", ";
358
+ return `linear(${s.substring(0, s.length - 2)})`;
359
+ }, ue = 2e4;
360
+ function Ye(t) {
361
+ let e = 0;
362
+ const n = 50;
363
+ let s = t.next(e);
364
+ for (; !s.done && e < ue; )
365
+ e += n, s = t.next(e);
366
+ return e >= ue ? 1 / 0 : e;
367
+ }
368
+ function Rs(t, e = 100, n) {
369
+ const s = n({ ...t, keyframes: [0, e] }), i = Math.min(Ye(s), ue);
370
+ return {
371
+ type: "keyframes",
372
+ ease: (r) => s.next(i * r).value / e,
373
+ duration: /* @__PURE__ */ R(i)
374
+ };
375
+ }
376
+ const Ns = 5;
377
+ function un(t, e, n) {
378
+ const s = Math.max(e - Ns, 0);
379
+ return $t(n - t(s), e - s);
380
+ }
381
+ const w = {
382
+ // Default spring physics
383
+ stiffness: 100,
384
+ damping: 10,
385
+ mass: 1,
386
+ velocity: 0,
387
+ // Default duration/bounce-based options
388
+ duration: 800,
389
+ // in ms
390
+ bounce: 0.3,
391
+ visualDuration: 0.3,
392
+ // in seconds
393
+ // Rest thresholds
394
+ restSpeed: {
395
+ granular: 0.01,
396
+ default: 2
397
+ },
398
+ restDelta: {
399
+ granular: 5e-3,
400
+ default: 0.5
401
+ },
402
+ // Limits
403
+ minDuration: 0.01,
404
+ // in seconds
405
+ maxDuration: 10,
406
+ // in seconds
407
+ minDamping: 0.05,
408
+ maxDamping: 1
409
+ }, be = 1e-3;
410
+ function ks({ duration: t = w.duration, bounce: e = w.bounce, velocity: n = w.velocity, mass: s = w.mass }) {
411
+ let i, r;
412
+ he(t <= /* @__PURE__ */ I(w.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
413
+ let a = 1 - e;
414
+ a = Y(w.minDamping, w.maxDamping, a), t = Y(w.minDuration, w.maxDuration, /* @__PURE__ */ R(t)), a < 1 ? (i = (c) => {
415
+ const l = c * a, h = l * t, f = l - n, d = xe(c, a), v = Math.exp(-h);
416
+ return be - f / d * v;
417
+ }, r = (c) => {
418
+ const h = c * a * t, f = h * n + n, d = Math.pow(a, 2) * Math.pow(c, 2) * t, v = Math.exp(-h), T = xe(Math.pow(c, 2), a);
419
+ return (-i(c) + be > 0 ? -1 : 1) * ((f - d) * v) / T;
420
+ }) : (i = (c) => {
421
+ const l = Math.exp(-c * t), h = (c - n) * t + 1;
422
+ return -be + l * h;
423
+ }, r = (c) => {
424
+ const l = Math.exp(-c * t), h = (n - c) * (t * t);
425
+ return l * h;
426
+ });
427
+ const o = 5 / t, u = Bs(i, r, o);
428
+ if (t = /* @__PURE__ */ I(t), isNaN(u))
429
+ return {
430
+ stiffness: w.stiffness,
431
+ damping: w.damping,
432
+ duration: t
433
+ };
434
+ {
435
+ const c = Math.pow(u, 2) * s;
436
+ return {
437
+ stiffness: c,
438
+ damping: a * 2 * Math.sqrt(s * c),
439
+ duration: t
440
+ };
441
+ }
442
+ }
443
+ const Ks = 12;
444
+ function Bs(t, e, n) {
445
+ let s = n;
446
+ for (let i = 1; i < Ks; i++)
447
+ s = s - t(s) / e(s);
448
+ return s;
449
+ }
450
+ function xe(t, e) {
451
+ return t * Math.sqrt(1 - e * e);
452
+ }
453
+ const Ls = ["duration", "bounce"], _s = ["stiffness", "damping", "mass"];
454
+ function lt(t, e) {
455
+ return e.some((n) => t[n] !== void 0);
456
+ }
457
+ function Us(t) {
458
+ let e = {
459
+ velocity: w.velocity,
460
+ stiffness: w.stiffness,
461
+ damping: w.damping,
462
+ mass: w.mass,
463
+ isResolvedFromDuration: !1,
464
+ ...t
465
+ };
466
+ if (!lt(t, _s) && lt(t, Ls))
467
+ if (t.visualDuration) {
468
+ const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * Y(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
469
+ e = {
470
+ ...e,
471
+ mass: w.mass,
472
+ stiffness: i,
473
+ damping: r
474
+ };
475
+ } else {
476
+ const n = ks(t);
477
+ e = {
478
+ ...e,
479
+ ...n,
480
+ mass: w.mass
481
+ }, e.isResolvedFromDuration = !0;
482
+ }
483
+ return e;
484
+ }
485
+ function le(t = w.visualDuration, e = w.bounce) {
486
+ const n = typeof t != "object" ? {
487
+ visualDuration: t,
488
+ keyframes: [0, 1],
489
+ bounce: e
490
+ } : t;
491
+ let { restSpeed: s, restDelta: i } = n;
492
+ const r = n.keyframes[0], a = n.keyframes[n.keyframes.length - 1], o = { done: !1, value: r }, { stiffness: u, damping: c, mass: l, duration: h, velocity: f, isResolvedFromDuration: d } = Us({
493
+ ...n,
494
+ velocity: -/* @__PURE__ */ R(n.velocity || 0)
495
+ }), v = f || 0, T = c / (2 * Math.sqrt(u * l)), b = a - r, p = /* @__PURE__ */ R(Math.sqrt(u / l)), V = Math.abs(b) < 5;
496
+ s || (s = V ? w.restSpeed.granular : w.restSpeed.default), i || (i = V ? w.restDelta.granular : w.restDelta.default);
497
+ let g;
498
+ if (T < 1) {
499
+ const m = xe(p, T);
500
+ g = (A) => {
501
+ const M = Math.exp(-T * p * A);
502
+ return a - M * ((v + T * p * b) / m * Math.sin(m * A) + b * Math.cos(m * A));
503
+ };
504
+ } else if (T === 1)
505
+ g = (m) => a - Math.exp(-p * m) * (b + (v + p * b) * m);
506
+ else {
507
+ const m = p * Math.sqrt(T * T - 1);
508
+ g = (A) => {
509
+ const M = Math.exp(-T * p * A), y = Math.min(m * A, 300);
510
+ return a - M * ((v + T * p * b) * Math.sinh(y) + m * b * Math.cosh(y)) / m;
511
+ };
512
+ }
513
+ const S = {
514
+ calculatedDuration: d && h || null,
515
+ next: (m) => {
516
+ const A = g(m);
517
+ if (d)
518
+ o.done = m >= h;
519
+ else {
520
+ let M = m === 0 ? v : 0;
521
+ T < 1 && (M = m === 0 ? /* @__PURE__ */ I(v) : un(g, m, A));
522
+ const y = Math.abs(M) <= s, P = Math.abs(a - A) <= i;
523
+ o.done = y && P;
524
+ }
525
+ return o.value = o.done ? a : A, o;
526
+ },
527
+ toString: () => {
528
+ const m = Math.min(Ye(S), ue), A = on((M) => S.next(m * M).value, m, 30);
529
+ return m + "ms " + A;
530
+ },
531
+ toTransition: () => {
532
+ }
533
+ };
534
+ return S;
535
+ }
536
+ le.applyToOptions = (t) => {
537
+ const e = Rs(t, 100, le);
538
+ return t.ease = e.ease, t.duration = /* @__PURE__ */ I(e.duration), t.type = "keyframes", t;
539
+ };
540
+ function Me({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: a, min: o, max: u, restDelta: c = 0.5, restSpeed: l }) {
541
+ const h = t[0], f = {
542
+ done: !1,
543
+ value: h
544
+ }, d = (y) => o !== void 0 && y < o || u !== void 0 && y > u, v = (y) => o === void 0 ? u : u === void 0 || Math.abs(o - y) < Math.abs(u - y) ? o : u;
545
+ let T = n * e;
546
+ const b = h + T, p = a === void 0 ? b : a(b);
547
+ p !== b && (T = p - h);
548
+ const V = (y) => -T * Math.exp(-y / s), g = (y) => p + V(y), S = (y) => {
549
+ const P = V(y), F = g(y);
550
+ f.done = Math.abs(P) <= c, f.value = f.done ? p : F;
551
+ };
552
+ let m, A;
553
+ const M = (y) => {
554
+ d(f.value) && (m = y, A = le({
555
+ keyframes: [f.value, v(f.value)],
556
+ velocity: un(g, y, f.value),
557
+ // TODO: This should be passing * 1000
558
+ damping: i,
559
+ stiffness: r,
560
+ restDelta: c,
561
+ restSpeed: l
562
+ }));
563
+ };
564
+ return M(0), {
565
+ calculatedDuration: null,
566
+ next: (y) => {
567
+ let P = !1;
568
+ return !A && m === void 0 && (P = !0, S(y), M(y)), m !== void 0 && y >= m ? A.next(y - m) : (!P && S(y), f);
569
+ }
570
+ };
571
+ }
572
+ function $s(t, e, n) {
573
+ const s = [], i = n || N.mix || an, r = t.length - 1;
574
+ for (let a = 0; a < r; a++) {
575
+ let o = i(t[a], t[a + 1]);
576
+ if (e) {
577
+ const u = Array.isArray(e) ? e[a] || X : e;
578
+ o = de(u, o);
579
+ }
580
+ s.push(o);
581
+ }
582
+ return s;
583
+ }
584
+ function Gs(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
585
+ const r = t.length;
586
+ if (q(r === e.length, "Both input and output ranges must be the same length", "range-length"), r === 1)
587
+ return () => e[0];
588
+ if (r === 2 && e[0] === e[1])
589
+ return () => e[1];
590
+ const a = t[0] === t[1];
591
+ t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
592
+ const o = $s(e, s, i), u = o.length, c = (l) => {
593
+ if (a && l < t[0])
594
+ return e[0];
595
+ let h = 0;
596
+ if (u > 1)
597
+ for (; h < t.length - 2 && !(l < t[h + 1]); h++)
598
+ ;
599
+ const f = /* @__PURE__ */ _t(t[h], t[h + 1], l);
600
+ return o[h](f);
601
+ };
602
+ return n ? (l) => c(Y(t[0], t[r - 1], l)) : c;
603
+ }
604
+ function js(t, e) {
605
+ const n = t[t.length - 1];
606
+ for (let s = 1; s <= e; s++) {
607
+ const i = /* @__PURE__ */ _t(0, e, s);
608
+ t.push(pe(n, 1, i));
609
+ }
610
+ }
611
+ function Ws(t) {
612
+ const e = [0];
613
+ return js(e, t.length - 1), e;
614
+ }
615
+ function Hs(t, e) {
616
+ return t.map((n) => n * e);
617
+ }
618
+ function zs(t, e) {
619
+ return t.map(() => e || Xt).splice(0, t.length - 1);
620
+ }
621
+ function H({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
622
+ const i = ls(s) ? s.map(rt) : rt(s), r = {
623
+ done: !1,
624
+ value: e[0]
625
+ }, a = Hs(
626
+ // Only use the provided offsets if they're the correct length
627
+ // TODO Maybe we should warn here if there's a length mismatch
628
+ n && n.length === e.length ? n : Ws(e),
629
+ t
630
+ ), o = Gs(a, e, {
631
+ ease: Array.isArray(i) ? i : zs(e, i)
632
+ });
633
+ return {
634
+ calculatedDuration: t,
635
+ next: (u) => (r.value = o(u), r.done = u >= t, r)
636
+ };
637
+ }
638
+ const qs = (t) => t !== null;
639
+ function Xe(t, { repeat: e, repeatType: n = "loop" }, s, i = 1) {
640
+ const r = t.filter(qs), o = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : r.length - 1;
641
+ return !o || s === void 0 ? r[o] : s;
642
+ }
643
+ const Ys = {
644
+ decay: Me,
645
+ inertia: Me,
646
+ tween: H,
647
+ keyframes: H,
648
+ spring: le
649
+ };
650
+ function ln(t) {
651
+ typeof t.type == "string" && (t.type = Ys[t.type]);
652
+ }
653
+ class Ze {
654
+ constructor() {
655
+ this.updateFinished();
656
+ }
657
+ get finished() {
658
+ return this._finished;
659
+ }
660
+ updateFinished() {
661
+ this._finished = new Promise((e) => {
662
+ this.resolve = e;
663
+ });
664
+ }
665
+ notifyFinished() {
666
+ this.resolve();
667
+ }
668
+ /**
669
+ * Allows the animation to be awaited.
670
+ *
671
+ * @deprecated Use `finished` instead.
672
+ */
673
+ then(e, n) {
674
+ return this.finished.then(e, n);
675
+ }
676
+ }
677
+ const Xs = (t) => t / 100;
678
+ class Je extends Ze {
679
+ constructor(e) {
680
+ super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
681
+ const { motionValue: n } = this.options;
682
+ n && n.updatedAt !== E.now() && this.tick(E.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
683
+ }, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
684
+ }
685
+ initAnimation() {
686
+ const { options: e } = this;
687
+ ln(e);
688
+ const { type: n = H, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: a = 0 } = e;
689
+ let { keyframes: o } = e;
690
+ const u = n || H;
691
+ _e.env.NODE_ENV !== "production" && u !== H && q(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`, "spring-two-frames"), u !== H && typeof o[0] != "number" && (this.mixKeyframes = de(Xs, an(o[0], o[1])), o = [0, 100]);
692
+ const c = u({ ...e, keyframes: o });
693
+ r === "mirror" && (this.mirroredGenerator = u({
694
+ ...e,
695
+ keyframes: [...o].reverse(),
696
+ velocity: -a
697
+ })), c.calculatedDuration === null && (c.calculatedDuration = Ye(c));
698
+ const { calculatedDuration: l } = c;
699
+ this.calculatedDuration = l, this.resolvedDuration = l + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = c;
700
+ }
701
+ updateTime(e) {
702
+ const n = Math.round(e - this.startTime) * this.playbackSpeed;
703
+ this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
704
+ }
705
+ tick(e, n = !1) {
706
+ const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: a, resolvedDuration: o, calculatedDuration: u } = this;
707
+ if (this.startTime === null)
708
+ return s.next(0);
709
+ const { delay: c = 0, keyframes: l, repeat: h, repeatType: f, repeatDelay: d, type: v, onUpdate: T, finalKeyframe: b } = this.options;
710
+ this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
711
+ const p = this.currentTime - c * (this.playbackSpeed >= 0 ? 1 : -1), V = this.playbackSpeed >= 0 ? p < 0 : p > i;
712
+ this.currentTime = Math.max(p, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
713
+ let g = this.currentTime, S = s;
714
+ if (h) {
715
+ const y = Math.min(this.currentTime, i) / o;
716
+ let P = Math.floor(y), F = y % 1;
717
+ !F && y >= 1 && (F = 1), F === 1 && P--, P = Math.min(P, h + 1), !!(P % 2) && (f === "reverse" ? (F = 1 - F, d && (F -= d / o)) : f === "mirror" && (S = a)), g = Y(0, 1, F) * o;
718
+ }
719
+ const m = V ? { done: !1, value: l[0] } : S.next(g);
720
+ r && (m.value = r(m.value));
721
+ let { done: A } = m;
722
+ !V && u !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
723
+ const M = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
724
+ return M && v !== Me && (m.value = Xe(l, this.options, b, this.speed)), T && T(m.value), M && this.finish(), m;
725
+ }
726
+ /**
727
+ * Allows the returned animation to be awaited or promise-chained. Currently
728
+ * resolves when the animation finishes at all but in a future update could/should
729
+ * reject if its cancels.
730
+ */
731
+ then(e, n) {
732
+ return this.finished.then(e, n);
733
+ }
734
+ get duration() {
735
+ return /* @__PURE__ */ R(this.calculatedDuration);
736
+ }
737
+ get time() {
738
+ return /* @__PURE__ */ R(this.currentTime);
739
+ }
740
+ set time(e) {
741
+ e = /* @__PURE__ */ I(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver?.start(!1);
742
+ }
743
+ get speed() {
744
+ return this.playbackSpeed;
745
+ }
746
+ set speed(e) {
747
+ this.updateTime(E.now());
748
+ const n = this.playbackSpeed !== e;
749
+ this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ R(this.currentTime));
750
+ }
751
+ play() {
752
+ if (this.isStopped)
753
+ return;
754
+ const { driver: e = Is, startTime: n } = this.options;
755
+ this.driver || (this.driver = e((i) => this.tick(i))), this.options.onPlay?.();
756
+ const s = this.driver.now();
757
+ this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
758
+ }
759
+ pause() {
760
+ this.state = "paused", this.updateTime(E.now()), this.holdTime = this.currentTime;
761
+ }
762
+ complete() {
763
+ this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
764
+ }
765
+ finish() {
766
+ this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
767
+ }
768
+ cancel() {
769
+ this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
770
+ }
771
+ teardown() {
772
+ this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
773
+ }
774
+ stopDriver() {
775
+ this.driver && (this.driver.stop(), this.driver = void 0);
776
+ }
777
+ sample(e) {
778
+ return this.startTime = 0, this.tick(e, !0);
779
+ }
780
+ attachTimeline(e) {
781
+ return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), e.observe(this);
782
+ }
783
+ }
784
+ function Zs(t) {
785
+ for (let e = 1; e < t.length; e++)
786
+ t[e] ?? (t[e] = t[e - 1]);
787
+ }
788
+ const _ = (t) => t * 180 / Math.PI, Ce = (t) => {
789
+ const e = _(Math.atan2(t[1], t[0]));
790
+ return Pe(e);
791
+ }, Js = {
792
+ x: 4,
793
+ y: 5,
794
+ translateX: 4,
795
+ translateY: 5,
796
+ scaleX: 0,
797
+ scaleY: 3,
798
+ scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
799
+ rotate: Ce,
800
+ rotateZ: Ce,
801
+ skewX: (t) => _(Math.atan(t[1])),
802
+ skewY: (t) => _(Math.atan(t[2])),
803
+ skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
804
+ }, Pe = (t) => (t = t % 360, t < 0 && (t += 360), t), ct = Ce, ht = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), ft = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), Qs = {
805
+ x: 12,
806
+ y: 13,
807
+ z: 14,
808
+ translateX: 12,
809
+ translateY: 13,
810
+ translateZ: 14,
811
+ scaleX: ht,
812
+ scaleY: ft,
813
+ scale: (t) => (ht(t) + ft(t)) / 2,
814
+ rotateX: (t) => Pe(_(Math.atan2(t[6], t[5]))),
815
+ rotateY: (t) => Pe(_(Math.atan2(-t[2], t[0]))),
816
+ rotateZ: ct,
817
+ rotate: ct,
818
+ skewX: (t) => _(Math.atan(t[4])),
819
+ skewY: (t) => _(Math.atan(t[1])),
820
+ skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
821
+ };
822
+ function Fe(t) {
823
+ return t.includes("scale") ? 1 : 0;
824
+ }
825
+ function De(t, e) {
826
+ if (!t || t === "none")
827
+ return Fe(e);
828
+ const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
829
+ let s, i;
830
+ if (n)
831
+ s = Qs, i = n;
832
+ else {
833
+ const o = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
834
+ s = Js, i = o;
835
+ }
836
+ if (!i)
837
+ return Fe(e);
838
+ const r = s[e], a = i[1].split(",").map(ti);
839
+ return typeof r == "function" ? r(a) : a[r];
840
+ }
841
+ const ei = (t, e) => {
842
+ const { transform: n = "none" } = getComputedStyle(t);
843
+ return De(n, e);
844
+ };
845
+ function ti(t) {
846
+ return parseFloat(t.trim());
847
+ }
848
+ const dt = (t) => t === Ue || t === Ft, ni = /* @__PURE__ */ new Set(["x", "y", "z"]), si = Dt.filter((t) => !ni.has(t));
849
+ function ii(t) {
850
+ const e = [];
851
+ return si.forEach((n) => {
852
+ const s = t.getValue(n);
853
+ s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
854
+ }), e;
855
+ }
856
+ const U = {
857
+ // Dimensions
858
+ width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
859
+ height: ({ y: t }, { paddingTop: e = "0", paddingBottom: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
860
+ top: (t, { top: e }) => parseFloat(e),
861
+ left: (t, { left: e }) => parseFloat(e),
862
+ bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
863
+ right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
864
+ // Transform
865
+ x: (t, { transform: e }) => De(e, "x"),
866
+ y: (t, { transform: e }) => De(e, "y")
867
+ };
868
+ U.translateX = U.x;
869
+ U.translateY = U.y;
870
+ const $ = /* @__PURE__ */ new Set();
871
+ let Ee = !1, Oe = !1, Ie = !1;
872
+ function cn() {
873
+ if (Oe) {
874
+ const t = Array.from($).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
875
+ e.forEach((s) => {
876
+ const i = ii(s);
877
+ i.length && (n.set(s, i), s.render());
878
+ }), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
879
+ s.render();
880
+ const i = n.get(s);
881
+ i && i.forEach(([r, a]) => {
882
+ s.getValue(r)?.set(a);
883
+ });
884
+ }), t.forEach((s) => s.measureEndState()), t.forEach((s) => {
885
+ s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
886
+ });
887
+ }
888
+ Oe = !1, Ee = !1, $.forEach((t) => t.complete(Ie)), $.clear();
889
+ }
890
+ function hn() {
891
+ $.forEach((t) => {
892
+ t.readKeyframes(), t.needsMeasurement && (Oe = !0);
893
+ });
894
+ }
895
+ function ri() {
896
+ Ie = !0, hn(), cn(), Ie = !1;
897
+ }
898
+ class Qe {
899
+ constructor(e, n, s, i, r, a = !1) {
900
+ this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = a;
901
+ }
902
+ scheduleResolve() {
903
+ this.state = "scheduled", this.isAsync ? ($.add(this), Ee || (Ee = !0, O.read(hn), O.resolveKeyframes(cn))) : (this.readKeyframes(), this.complete());
904
+ }
905
+ readKeyframes() {
906
+ const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
907
+ if (e[0] === null) {
908
+ const r = i?.get(), a = e[e.length - 1];
909
+ if (r !== void 0)
910
+ e[0] = r;
911
+ else if (s && n) {
912
+ const o = s.readValue(n, a);
913
+ o != null && (e[0] = o);
914
+ }
915
+ e[0] === void 0 && (e[0] = a), i && r === void 0 && i.set(e[0]);
916
+ }
917
+ Zs(e);
918
+ }
919
+ setFinalKeyframe() {
920
+ }
921
+ measureInitialState() {
922
+ }
923
+ renderEndStyles() {
924
+ }
925
+ measureEndState() {
926
+ }
927
+ complete(e = !1) {
928
+ this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), $.delete(this);
929
+ }
930
+ cancel() {
931
+ this.state === "scheduled" && ($.delete(this), this.state = "pending");
932
+ }
933
+ resume() {
934
+ this.state === "pending" && this.scheduleResolve();
935
+ }
936
+ }
937
+ const ai = (t) => t.startsWith("--");
938
+ function oi(t, e, n) {
939
+ ai(e) ? t.style.setProperty(e, n) : t.style[e] = n;
940
+ }
941
+ const ui = /* @__PURE__ */ Ge(() => window.ScrollTimeline !== void 0), li = {};
942
+ function ci(t, e) {
943
+ const n = /* @__PURE__ */ Ge(t);
944
+ return () => li[e] ?? n();
945
+ }
946
+ const fn = /* @__PURE__ */ ci(() => {
947
+ try {
948
+ document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
949
+ } catch {
950
+ return !1;
951
+ }
952
+ return !0;
953
+ }, "linearEasing"), Q = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, pt = {
954
+ linear: "linear",
955
+ ease: "ease",
956
+ easeIn: "ease-in",
957
+ easeOut: "ease-out",
958
+ easeInOut: "ease-in-out",
959
+ circIn: /* @__PURE__ */ Q([0, 0.65, 0.55, 1]),
960
+ circOut: /* @__PURE__ */ Q([0.55, 0, 1, 0.45]),
961
+ backIn: /* @__PURE__ */ Q([0.31, 0.01, 0.66, -0.59]),
962
+ backOut: /* @__PURE__ */ Q([0.33, 1.53, 0.69, 0.99])
963
+ };
964
+ function dn(t, e) {
965
+ if (t)
966
+ return typeof t == "function" ? fn() ? on(t, e) : "ease-out" : Zt(t) ? Q(t) : Array.isArray(t) ? t.map((n) => dn(n, e) || pt.easeOut) : pt[t];
967
+ }
968
+ function hi(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: a = "loop", ease: o = "easeOut", times: u } = {}, c = void 0) {
969
+ const l = {
970
+ [e]: n
971
+ };
972
+ u && (l.offset = u);
973
+ const h = dn(o, i);
974
+ Array.isArray(h) && (l.easing = h);
975
+ const f = {
976
+ delay: s,
977
+ duration: i,
978
+ easing: Array.isArray(h) ? "linear" : h,
979
+ fill: "both",
980
+ iterations: r + 1,
981
+ direction: a === "reverse" ? "alternate" : "normal"
982
+ };
983
+ return c && (f.pseudoElement = c), t.animate(l, f);
984
+ }
985
+ function pn(t) {
986
+ return typeof t == "function" && "applyToOptions" in t;
987
+ }
988
+ function fi({ type: t, ...e }) {
989
+ return pn(t) && fn() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
990
+ }
991
+ class di extends Ze {
992
+ constructor(e) {
993
+ if (super(), this.finishedTime = null, this.isStopped = !1, !e)
994
+ return;
995
+ const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: a = !1, finalKeyframe: o, onComplete: u } = e;
996
+ this.isPseudoElement = !!r, this.allowFlatten = a, this.options = e, q(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
997
+ const c = fi(e);
998
+ this.animation = hi(n, s, i, c, r), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
999
+ if (this.finishedTime = this.time, !r) {
1000
+ const l = Xe(i, this.options, o, this.speed);
1001
+ this.updateMotionValue ? this.updateMotionValue(l) : oi(n, s, l), this.animation.cancel();
1002
+ }
1003
+ u?.(), this.notifyFinished();
1004
+ };
1005
+ }
1006
+ play() {
1007
+ this.isStopped || (this.animation.play(), this.state === "finished" && this.updateFinished());
1008
+ }
1009
+ pause() {
1010
+ this.animation.pause();
1011
+ }
1012
+ complete() {
1013
+ this.animation.finish?.();
1014
+ }
1015
+ cancel() {
1016
+ try {
1017
+ this.animation.cancel();
1018
+ } catch {
1019
+ }
1020
+ }
1021
+ stop() {
1022
+ if (this.isStopped)
1023
+ return;
1024
+ this.isStopped = !0;
1025
+ const { state: e } = this;
1026
+ e === "idle" || e === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
1027
+ }
1028
+ /**
1029
+ * WAAPI doesn't natively have any interruption capabilities.
1030
+ *
1031
+ * In this method, we commit styles back to the DOM before cancelling
1032
+ * the animation.
1033
+ *
1034
+ * This is designed to be overridden by NativeAnimationExtended, which
1035
+ * will create a renderless JS animation and sample it twice to calculate
1036
+ * its current value, "previous" value, and therefore allow
1037
+ * Motion to also correctly calculate velocity for any subsequent animation
1038
+ * while deferring the commit until the next animation frame.
1039
+ */
1040
+ commitStyles() {
1041
+ this.isPseudoElement || this.animation.commitStyles?.();
1042
+ }
1043
+ get duration() {
1044
+ const e = this.animation.effect?.getComputedTiming?.().duration || 0;
1045
+ return /* @__PURE__ */ R(Number(e));
1046
+ }
1047
+ get time() {
1048
+ return /* @__PURE__ */ R(Number(this.animation.currentTime) || 0);
1049
+ }
1050
+ set time(e) {
1051
+ this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ I(e);
1052
+ }
1053
+ /**
1054
+ * The playback speed of the animation.
1055
+ * 1 = normal speed, 2 = double speed, 0.5 = half speed.
1056
+ */
1057
+ get speed() {
1058
+ return this.animation.playbackRate;
1059
+ }
1060
+ set speed(e) {
1061
+ e < 0 && (this.finishedTime = null), this.animation.playbackRate = e;
1062
+ }
1063
+ get state() {
1064
+ return this.finishedTime !== null ? "finished" : this.animation.playState;
1065
+ }
1066
+ get startTime() {
1067
+ return Number(this.animation.startTime);
1068
+ }
1069
+ set startTime(e) {
1070
+ this.animation.startTime = e;
1071
+ }
1072
+ /**
1073
+ * Attaches a timeline to the animation, for instance the `ScrollTimeline`.
1074
+ */
1075
+ attachTimeline({ timeline: e, observe: n }) {
1076
+ return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && ui() ? (this.animation.timeline = e, X) : n(this);
1077
+ }
1078
+ }
1079
+ const mn = {
1080
+ anticipate: qt,
1081
+ backInOut: zt,
1082
+ circInOut: Yt
1083
+ };
1084
+ function pi(t) {
1085
+ return t in mn;
1086
+ }
1087
+ function mi(t) {
1088
+ typeof t.ease == "string" && pi(t.ease) && (t.ease = mn[t.ease]);
1089
+ }
1090
+ const mt = 10;
1091
+ class gi extends di {
1092
+ constructor(e) {
1093
+ mi(e), ln(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
1094
+ }
1095
+ /**
1096
+ * WAAPI doesn't natively have any interruption capabilities.
1097
+ *
1098
+ * Rather than read commited styles back out of the DOM, we can
1099
+ * create a renderless JS animation and sample it twice to calculate
1100
+ * its current value, "previous" value, and therefore allow
1101
+ * Motion to calculate velocity for any subsequent animation.
1102
+ */
1103
+ updateMotionValue(e) {
1104
+ const { motionValue: n, onUpdate: s, onComplete: i, element: r, ...a } = this.options;
1105
+ if (!n)
1106
+ return;
1107
+ if (e !== void 0) {
1108
+ n.set(e);
1109
+ return;
1110
+ }
1111
+ const o = new Je({
1112
+ ...a,
1113
+ autoplay: !1
1114
+ }), u = /* @__PURE__ */ I(this.finishedTime ?? this.time);
1115
+ n.setWithVelocity(o.sample(u - mt).value, o.sample(u).value, mt), o.stop();
1116
+ }
1117
+ }
1118
+ const gt = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
1119
+ (Z.test(t) || t === "0") && // And it contains numbers and/or colors
1120
+ !t.startsWith("url("));
1121
+ function yi(t) {
1122
+ const e = t[0];
1123
+ if (t.length === 1)
1124
+ return !0;
1125
+ for (let n = 0; n < t.length; n++)
1126
+ if (t[n] !== e)
1127
+ return !0;
1128
+ }
1129
+ function bi(t, e, n, s) {
1130
+ const i = t[0];
1131
+ if (i === null)
1132
+ return !1;
1133
+ if (e === "display" || e === "visibility")
1134
+ return !0;
1135
+ const r = t[t.length - 1], a = gt(i, e), o = gt(r, e);
1136
+ return he(a === o, `You are trying to animate ${e} from "${i}" to "${r}". "${a ? r : i}" is not an animatable value.`, "value-not-animatable"), !a || !o ? !1 : yi(t) || (n === "spring" || pn(n)) && s;
1137
+ }
1138
+ function Re(t) {
1139
+ t.duration = 0, t.type;
1140
+ }
1141
+ const vi = /* @__PURE__ */ new Set([
1142
+ "opacity",
1143
+ "clipPath",
1144
+ "filter",
1145
+ "transform"
1146
+ // TODO: Could be re-enabled now we have support for linear() easing
1147
+ // "background-color"
1148
+ ]), Ti = /* @__PURE__ */ Ge(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1149
+ function Vi(t) {
1150
+ const { motionValue: e, name: n, repeatDelay: s, repeatType: i, damping: r, type: a } = t;
1151
+ if (!(e?.owner?.current instanceof HTMLElement))
1152
+ return !1;
1153
+ const { onUpdate: u, transformTemplate: c } = e.owner.getProps();
1154
+ return Ti() && n && vi.has(n) && (n !== "transform" || !c) && /**
1155
+ * If we're outputting values to onUpdate then we can't use WAAPI as there's
1156
+ * no way to read the value from WAAPI every frame.
1157
+ */
1158
+ !u && !s && i !== "mirror" && r !== 0 && a !== "inertia";
1159
+ }
1160
+ const Ai = 40;
1161
+ class wi extends Ze {
1162
+ constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: a = "loop", keyframes: o, name: u, motionValue: c, element: l, ...h }) {
1163
+ super(), this.stop = () => {
1164
+ this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
1165
+ }, this.createdAt = E.now();
1166
+ const f = {
1167
+ autoplay: e,
1168
+ delay: n,
1169
+ type: s,
1170
+ repeat: i,
1171
+ repeatDelay: r,
1172
+ repeatType: a,
1173
+ name: u,
1174
+ motionValue: c,
1175
+ element: l,
1176
+ ...h
1177
+ }, d = l?.KeyframeResolver || Qe;
1178
+ this.keyframeResolver = new d(o, (v, T, b) => this.onKeyframesResolved(v, T, f, !b), u, c, l), this.keyframeResolver?.scheduleResolve();
1179
+ }
1180
+ onKeyframesResolved(e, n, s, i) {
1181
+ this.keyframeResolver = void 0;
1182
+ const { name: r, type: a, velocity: o, delay: u, isHandoff: c, onUpdate: l } = s;
1183
+ this.resolvedAt = E.now(), bi(e, r, a, o) || ((N.instantAnimations || !u) && l?.(Xe(e, s, n)), e[0] = e[e.length - 1], Re(s), s.repeat = 0);
1184
+ const f = {
1185
+ startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Ai ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1186
+ finalKeyframe: n,
1187
+ ...s,
1188
+ keyframes: e
1189
+ }, d = !c && Vi(f) ? new gi({
1190
+ ...f,
1191
+ element: f.motionValue.owner.current
1192
+ }) : new Je(f);
1193
+ d.finished.then(() => this.notifyFinished()).catch(X), this.pendingTimeline && (this.stopTimeline = d.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = d;
1194
+ }
1195
+ get finished() {
1196
+ return this._animation ? this.animation.finished : this._finished;
1197
+ }
1198
+ then(e, n) {
1199
+ return this.finished.finally(e).then(() => {
1200
+ });
1201
+ }
1202
+ get animation() {
1203
+ return this._animation || (this.keyframeResolver?.resume(), ri()), this._animation;
1204
+ }
1205
+ get duration() {
1206
+ return this.animation.duration;
1207
+ }
1208
+ get time() {
1209
+ return this.animation.time;
1210
+ }
1211
+ set time(e) {
1212
+ this.animation.time = e;
1213
+ }
1214
+ get speed() {
1215
+ return this.animation.speed;
1216
+ }
1217
+ get state() {
1218
+ return this.animation.state;
1219
+ }
1220
+ set speed(e) {
1221
+ this.animation.speed = e;
1222
+ }
1223
+ get startTime() {
1224
+ return this.animation.startTime;
1225
+ }
1226
+ attachTimeline(e) {
1227
+ return this._animation ? this.stopTimeline = this.animation.attachTimeline(e) : this.pendingTimeline = e, () => this.stop();
1228
+ }
1229
+ play() {
1230
+ this.animation.play();
1231
+ }
1232
+ pause() {
1233
+ this.animation.pause();
1234
+ }
1235
+ complete() {
1236
+ this.animation.complete();
1237
+ }
1238
+ cancel() {
1239
+ this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
1240
+ }
1241
+ }
1242
+ const Si = (
1243
+ // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1244
+ /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1245
+ );
1246
+ function xi(t) {
1247
+ const e = Si.exec(t);
1248
+ if (!e)
1249
+ return [,];
1250
+ const [, n, s, i] = e;
1251
+ return [`--${n ?? s}`, i];
1252
+ }
1253
+ const Mi = 4;
1254
+ function gn(t, e, n = 1) {
1255
+ q(n <= Mi, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1256
+ const [s, i] = xi(t);
1257
+ if (!s)
1258
+ return;
1259
+ const r = window.getComputedStyle(e).getPropertyValue(s);
1260
+ if (r) {
1261
+ const a = r.trim();
1262
+ return Bt(a) ? parseFloat(a) : a;
1263
+ }
1264
+ return $e(i) ? gn(i, e, n + 1) : i;
1265
+ }
1266
+ function yn(t, e) {
1267
+ return t?.[e] ?? t?.default ?? t;
1268
+ }
1269
+ const bn = /* @__PURE__ */ new Set([
1270
+ "width",
1271
+ "height",
1272
+ "top",
1273
+ "left",
1274
+ "right",
1275
+ "bottom",
1276
+ ...Dt
1277
+ ]), Ci = {
1278
+ test: (t) => t === "auto",
1279
+ parse: (t) => t
1280
+ }, vn = (t) => (e) => e.test(t), Tn = [Ue, Ft, Ve, Kn, Bn, Ln, Ci], yt = (t) => Tn.find(vn(t));
1281
+ function Pi(t) {
1282
+ return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Lt(t) : !0;
1283
+ }
1284
+ const Fi = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1285
+ function Di(t) {
1286
+ const [e, n] = t.slice(0, -1).split("(");
1287
+ if (e === "drop-shadow")
1288
+ return t;
1289
+ const [s] = n.match(He) || [];
1290
+ if (!s)
1291
+ return t;
1292
+ const i = n.replace(s, "");
1293
+ let r = Fi.has(e) ? 1 : 0;
1294
+ return s !== n && (r *= 100), e + "(" + r + i + ")";
1295
+ }
1296
+ const Ei = /\b([a-z-]*)\(.*?\)/gu, Ne = {
1297
+ ...Z,
1298
+ getAnimatableNone: (t) => {
1299
+ const e = t.match(Ei);
1300
+ return e ? e.map(Di).join(" ") : t;
1301
+ }
1302
+ }, Oi = {
1303
+ ..._n,
1304
+ // Color props
1305
+ color: x,
1306
+ backgroundColor: x,
1307
+ outlineColor: x,
1308
+ fill: x,
1309
+ stroke: x,
1310
+ // Border props
1311
+ borderColor: x,
1312
+ borderTopColor: x,
1313
+ borderRightColor: x,
1314
+ borderBottomColor: x,
1315
+ borderLeftColor: x,
1316
+ filter: Ne,
1317
+ WebkitFilter: Ne
1318
+ }, Vn = (t) => Oi[t];
1319
+ function An(t, e) {
1320
+ let n = Vn(t);
1321
+ return n !== Ne && (n = Z), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
1322
+ }
1323
+ const Ii = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1324
+ function Ri(t, e, n) {
1325
+ let s = 0, i;
1326
+ for (; s < t.length && !i; ) {
1327
+ const r = t[s];
1328
+ typeof r == "string" && !Ii.has(r) && te(r).values.length && (i = t[s]), s++;
1329
+ }
1330
+ if (i && n)
1331
+ for (const r of e)
1332
+ t[r] = An(n, i);
1333
+ }
1334
+ class Ni extends Qe {
1335
+ constructor(e, n, s, i, r) {
1336
+ super(e, n, s, i, r, !0);
1337
+ }
1338
+ readKeyframes() {
1339
+ const { unresolvedKeyframes: e, element: n, name: s } = this;
1340
+ if (!n || !n.current)
1341
+ return;
1342
+ super.readKeyframes();
1343
+ for (let u = 0; u < e.length; u++) {
1344
+ let c = e[u];
1345
+ if (typeof c == "string" && (c = c.trim(), $e(c))) {
1346
+ const l = gn(c, n.current);
1347
+ l !== void 0 && (e[u] = l), u === e.length - 1 && (this.finalKeyframe = c);
1348
+ }
1349
+ }
1350
+ if (this.resolveNoneKeyframes(), !bn.has(s) || e.length !== 2)
1351
+ return;
1352
+ const [i, r] = e, a = yt(i), o = yt(r);
1353
+ if (a !== o)
1354
+ if (dt(a) && dt(o))
1355
+ for (let u = 0; u < e.length; u++) {
1356
+ const c = e[u];
1357
+ typeof c == "string" && (e[u] = parseFloat(c));
1358
+ }
1359
+ else U[s] && (this.needsMeasurement = !0);
1360
+ }
1361
+ resolveNoneKeyframes() {
1362
+ const { unresolvedKeyframes: e, name: n } = this, s = [];
1363
+ for (let i = 0; i < e.length; i++)
1364
+ (e[i] === null || Pi(e[i])) && s.push(i);
1365
+ s.length && Ri(e, s, n);
1366
+ }
1367
+ measureInitialState() {
1368
+ const { element: e, unresolvedKeyframes: n, name: s } = this;
1369
+ if (!e || !e.current)
1370
+ return;
1371
+ s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = U[s](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
1372
+ const i = n[n.length - 1];
1373
+ i !== void 0 && e.getValue(s, i).jump(i, !1);
1374
+ }
1375
+ measureEndState() {
1376
+ const { element: e, name: n, unresolvedKeyframes: s } = this;
1377
+ if (!e || !e.current)
1378
+ return;
1379
+ const i = e.getValue(n);
1380
+ i && i.jump(this.measuredOrigin, !1);
1381
+ const r = s.length - 1, a = s[r];
1382
+ s[r] = U[n](e.measureViewportBox(), window.getComputedStyle(e.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), this.removedTransforms?.length && this.removedTransforms.forEach(([o, u]) => {
1383
+ e.getValue(o).set(u);
1384
+ }), this.resolveNoneKeyframes();
1385
+ }
1386
+ }
1387
+ function ki(t, e, n) {
1388
+ if (t instanceof EventTarget)
1389
+ return [t];
1390
+ if (typeof t == "string") {
1391
+ let s = document;
1392
+ const i = n?.[t] ?? s.querySelectorAll(t);
1393
+ return i ? Array.from(i) : [];
1394
+ }
1395
+ return Array.from(t);
1396
+ }
1397
+ const bt = 30, Ki = (t) => !isNaN(parseFloat(t));
1398
+ class Bi {
1399
+ /**
1400
+ * @param init - The initiating value
1401
+ * @param config - Optional configuration options
1402
+ *
1403
+ * - `transformer`: A function to transform incoming values with.
1404
+ */
1405
+ constructor(e, n = {}) {
1406
+ this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s) => {
1407
+ const i = E.now();
1408
+ if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
1409
+ for (const r of this.dependents)
1410
+ r.dirty();
1411
+ }, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
1412
+ }
1413
+ setCurrent(e) {
1414
+ this.current = e, this.updatedAt = E.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Ki(this.current));
1415
+ }
1416
+ setPrevFrameValue(e = this.current) {
1417
+ this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
1418
+ }
1419
+ /**
1420
+ * Adds a function that will be notified when the `MotionValue` is updated.
1421
+ *
1422
+ * It returns a function that, when called, will cancel the subscription.
1423
+ *
1424
+ * When calling `onChange` inside a React component, it should be wrapped with the
1425
+ * `useEffect` hook. As it returns an unsubscribe function, this should be returned
1426
+ * from the `useEffect` function to ensure you don't add duplicate subscribers..
1427
+ *
1428
+ * ```jsx
1429
+ * export const MyComponent = () => {
1430
+ * const x = useMotionValue(0)
1431
+ * const y = useMotionValue(0)
1432
+ * const opacity = useMotionValue(1)
1433
+ *
1434
+ * useEffect(() => {
1435
+ * function updateOpacity() {
1436
+ * const maxXY = Math.max(x.get(), y.get())
1437
+ * const newOpacity = transform(maxXY, [0, 100], [1, 0])
1438
+ * opacity.set(newOpacity)
1439
+ * }
1440
+ *
1441
+ * const unsubscribeX = x.on("change", updateOpacity)
1442
+ * const unsubscribeY = y.on("change", updateOpacity)
1443
+ *
1444
+ * return () => {
1445
+ * unsubscribeX()
1446
+ * unsubscribeY()
1447
+ * }
1448
+ * }, [])
1449
+ *
1450
+ * return <motion.div style={{ x }} />
1451
+ * }
1452
+ * ```
1453
+ *
1454
+ * @param subscriber - A function that receives the latest value.
1455
+ * @returns A function that, when called, will cancel this subscription.
1456
+ *
1457
+ * @deprecated
1458
+ */
1459
+ onChange(e) {
1460
+ return _e.env.NODE_ENV !== "production" && Et(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
1461
+ }
1462
+ on(e, n) {
1463
+ this.events[e] || (this.events[e] = new Ut());
1464
+ const s = this.events[e].add(n);
1465
+ return e === "change" ? () => {
1466
+ s(), O.read(() => {
1467
+ this.events.change.getSize() || this.stop();
1468
+ });
1469
+ } : s;
1470
+ }
1471
+ clearListeners() {
1472
+ for (const e in this.events)
1473
+ this.events[e].clear();
1474
+ }
1475
+ /**
1476
+ * Attaches a passive effect to the `MotionValue`.
1477
+ */
1478
+ attach(e, n) {
1479
+ this.passiveEffect = e, this.stopPassiveEffect = n;
1480
+ }
1481
+ /**
1482
+ * Sets the state of the `MotionValue`.
1483
+ *
1484
+ * @remarks
1485
+ *
1486
+ * ```jsx
1487
+ * const x = useMotionValue(0)
1488
+ * x.set(10)
1489
+ * ```
1490
+ *
1491
+ * @param latest - Latest value to set.
1492
+ * @param render - Whether to notify render subscribers. Defaults to `true`
1493
+ *
1494
+ * @public
1495
+ */
1496
+ set(e) {
1497
+ this.passiveEffect ? this.passiveEffect(e, this.updateAndNotify) : this.updateAndNotify(e);
1498
+ }
1499
+ setWithVelocity(e, n, s) {
1500
+ this.set(n), this.prev = void 0, this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt - s;
1501
+ }
1502
+ /**
1503
+ * Set the state of the `MotionValue`, stopping any active animations,
1504
+ * effects, and resets velocity to `0`.
1505
+ */
1506
+ jump(e, n = !0) {
1507
+ this.updateAndNotify(e), this.prev = e, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1508
+ }
1509
+ dirty() {
1510
+ this.events.change?.notify(this.current);
1511
+ }
1512
+ addDependent(e) {
1513
+ this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(e);
1514
+ }
1515
+ removeDependent(e) {
1516
+ this.dependents && this.dependents.delete(e);
1517
+ }
1518
+ /**
1519
+ * Returns the latest state of `MotionValue`
1520
+ *
1521
+ * @returns - The latest state of `MotionValue`
1522
+ *
1523
+ * @public
1524
+ */
1525
+ get() {
1526
+ return this.current;
1527
+ }
1528
+ /**
1529
+ * @public
1530
+ */
1531
+ getPrevious() {
1532
+ return this.prev;
1533
+ }
1534
+ /**
1535
+ * Returns the latest velocity of `MotionValue`
1536
+ *
1537
+ * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
1538
+ *
1539
+ * @public
1540
+ */
1541
+ getVelocity() {
1542
+ const e = E.now();
1543
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > bt)
1544
+ return 0;
1545
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, bt);
1546
+ return $t(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1547
+ }
1548
+ /**
1549
+ * Registers a new animation to control this `MotionValue`. Only one
1550
+ * animation can drive a `MotionValue` at one time.
1551
+ *
1552
+ * ```jsx
1553
+ * value.start()
1554
+ * ```
1555
+ *
1556
+ * @param animation - A function that starts the provided animation
1557
+ */
1558
+ start(e) {
1559
+ return this.stop(), new Promise((n) => {
1560
+ this.hasAnimated = !0, this.animation = e(n), this.events.animationStart && this.events.animationStart.notify();
1561
+ }).then(() => {
1562
+ this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
1563
+ });
1564
+ }
1565
+ /**
1566
+ * Stop the currently active animation.
1567
+ *
1568
+ * @public
1569
+ */
1570
+ stop() {
1571
+ this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
1572
+ }
1573
+ /**
1574
+ * Returns `true` if this value is currently animating.
1575
+ *
1576
+ * @public
1577
+ */
1578
+ isAnimating() {
1579
+ return !!this.animation;
1580
+ }
1581
+ clearAnimation() {
1582
+ delete this.animation;
1583
+ }
1584
+ /**
1585
+ * Destroy and clean up subscribers to this `MotionValue`.
1586
+ *
1587
+ * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
1588
+ * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
1589
+ * created a `MotionValue` via the `motionValue` function.
1590
+ *
1591
+ * @public
1592
+ */
1593
+ destroy() {
1594
+ this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1595
+ }
1596
+ }
1597
+ function ce(t, e) {
1598
+ return new Bi(t, e);
1599
+ }
1600
+ const { schedule: Li } = /* @__PURE__ */ Jt(queueMicrotask, !1), _i = {
1601
+ y: !1
1602
+ };
1603
+ function Ui() {
1604
+ return _i.y;
1605
+ }
1606
+ function wn(t, e) {
1607
+ const n = ki(t), s = new AbortController(), i = {
1608
+ passive: !0,
1609
+ ...e,
1610
+ signal: s.signal
1611
+ };
1612
+ return [n, i, () => s.abort()];
1613
+ }
1614
+ function vt(t) {
1615
+ return !(t.pointerType === "touch" || Ui());
1616
+ }
1617
+ function $i(t, e, n = {}) {
1618
+ const [s, i, r] = wn(t, n), a = (o) => {
1619
+ if (!vt(o))
1620
+ return;
1621
+ const { target: u } = o, c = e(u, o);
1622
+ if (typeof c != "function" || !u)
1623
+ return;
1624
+ const l = (h) => {
1625
+ vt(h) && (c(h), u.removeEventListener("pointerleave", l));
1626
+ };
1627
+ u.addEventListener("pointerleave", l, i);
1628
+ };
1629
+ return s.forEach((o) => {
1630
+ o.addEventListener("pointerenter", a, i);
1631
+ }), r;
1632
+ }
1633
+ const Sn = (t, e) => e ? t === e ? !0 : Sn(t, e.parentElement) : !1, Gi = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, ji = /* @__PURE__ */ new Set([
1634
+ "BUTTON",
1635
+ "INPUT",
1636
+ "SELECT",
1637
+ "TEXTAREA",
1638
+ "A"
1639
+ ]);
1640
+ function Wi(t) {
1641
+ return ji.has(t.tagName) || t.tabIndex !== -1;
1642
+ }
1643
+ const re = /* @__PURE__ */ new WeakSet();
1644
+ function Tt(t) {
1645
+ return (e) => {
1646
+ e.key === "Enter" && t(e);
1647
+ };
1648
+ }
1649
+ function ve(t, e) {
1650
+ t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
1651
+ }
1652
+ const Hi = (t, e) => {
1653
+ const n = t.currentTarget;
1654
+ if (!n)
1655
+ return;
1656
+ const s = Tt(() => {
1657
+ if (re.has(n))
1658
+ return;
1659
+ ve(n, "down");
1660
+ const i = Tt(() => {
1661
+ ve(n, "up");
1662
+ }), r = () => ve(n, "cancel");
1663
+ n.addEventListener("keyup", i, e), n.addEventListener("blur", r, e);
1664
+ });
1665
+ n.addEventListener("keydown", s, e), n.addEventListener("blur", () => n.removeEventListener("keydown", s), e);
1666
+ };
1667
+ function Vt(t) {
1668
+ return Gi(t) && !0;
1669
+ }
1670
+ function zi(t, e, n = {}) {
1671
+ const [s, i, r] = wn(t, n), a = (o) => {
1672
+ const u = o.currentTarget;
1673
+ if (!Vt(o))
1674
+ return;
1675
+ re.add(u);
1676
+ const c = e(u, o), l = (d, v) => {
1677
+ window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), re.has(u) && re.delete(u), Vt(d) && typeof c == "function" && c(d, { success: v });
1678
+ }, h = (d) => {
1679
+ l(d, u === window || u === document || n.useGlobalTarget || Sn(u, d.target));
1680
+ }, f = (d) => {
1681
+ l(d, !1);
1682
+ };
1683
+ window.addEventListener("pointerup", h, i), window.addEventListener("pointercancel", f, i);
1684
+ };
1685
+ return s.forEach((o) => {
1686
+ (n.useGlobalTarget ? window : o).addEventListener("pointerdown", a, i), Un(o) && (o.addEventListener("focus", (c) => Hi(c, i)), !Wi(o) && !o.hasAttribute("tabindex") && (o.tabIndex = 0));
1687
+ }), r;
1688
+ }
1689
+ const qi = [...Tn, x, Z], Yi = (t) => qi.find(vn(t));
1690
+ function Xi({ top: t, left: e, right: n, bottom: s }) {
1691
+ return {
1692
+ x: { min: e, max: n },
1693
+ y: { min: t, max: s }
1694
+ };
1695
+ }
1696
+ function Zi(t, e) {
1697
+ if (!e)
1698
+ return t;
1699
+ const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
1700
+ return {
1701
+ top: n.y,
1702
+ left: n.x,
1703
+ bottom: s.y,
1704
+ right: s.x
1705
+ };
1706
+ }
1707
+ function Ji(t, e) {
1708
+ return Xi(Zi(t.getBoundingClientRect(), e));
1709
+ }
1710
+ const At = () => ({ min: 0, max: 0 }), xn = () => ({
1711
+ x: At(),
1712
+ y: At()
1713
+ }), ke = { current: null }, Mn = { current: !1 };
1714
+ function Qi() {
1715
+ if (Mn.current = !0, !!$n)
1716
+ if (window.matchMedia) {
1717
+ const t = window.matchMedia("(prefers-reduced-motion)"), e = () => ke.current = t.matches;
1718
+ t.addEventListener("change", e), e();
1719
+ } else
1720
+ ke.current = !1;
1721
+ }
1722
+ const er = /* @__PURE__ */ new WeakMap();
1723
+ function tr(t, e, n) {
1724
+ for (const s in e) {
1725
+ const i = e[s], r = n[s];
1726
+ if (k(i))
1727
+ t.addValue(s, i);
1728
+ else if (k(r))
1729
+ t.addValue(s, ce(i, { owner: t }));
1730
+ else if (r !== i)
1731
+ if (t.hasValue(s)) {
1732
+ const a = t.getValue(s);
1733
+ a.liveStyle === !0 ? a.jump(i) : a.hasAnimated || a.set(i);
1734
+ } else {
1735
+ const a = t.getStaticValue(s);
1736
+ t.addValue(s, ce(a !== void 0 ? a : i, { owner: t }));
1737
+ }
1738
+ }
1739
+ for (const s in n)
1740
+ e[s] === void 0 && t.removeValue(s);
1741
+ return e;
1742
+ }
1743
+ const wt = [
1744
+ "AnimationStart",
1745
+ "AnimationComplete",
1746
+ "Update",
1747
+ "BeforeLayoutMeasure",
1748
+ "LayoutMeasure",
1749
+ "LayoutAnimationStart",
1750
+ "LayoutAnimationComplete"
1751
+ ];
1752
+ class nr {
1753
+ /**
1754
+ * This method takes React props and returns found MotionValues. For example, HTML
1755
+ * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
1756
+ *
1757
+ * This isn't an abstract method as it needs calling in the constructor, but it is
1758
+ * intended to be one.
1759
+ */
1760
+ scrapeMotionValuesFromProps(e, n, s) {
1761
+ return {};
1762
+ }
1763
+ constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: a }, o = {}) {
1764
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Qe, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
1765
+ this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
1766
+ }, this.renderScheduledAt = 0, this.scheduleRender = () => {
1767
+ const f = E.now();
1768
+ this.renderScheduledAt < f && (this.renderScheduledAt = f, O.render(this.render, !1, !0));
1769
+ };
1770
+ const { latestValues: u, renderState: c } = a;
1771
+ this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = n.initial ? { ...u } : {}, this.renderState = c, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.blockInitialAnimation = !!r, this.isControllingVariants = Gn(n), this.isVariantNode = jn(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
1772
+ const { willChange: l, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
1773
+ for (const f in h) {
1774
+ const d = h[f];
1775
+ u[f] !== void 0 && k(d) && d.set(u[f]);
1776
+ }
1777
+ }
1778
+ mount(e) {
1779
+ this.current = e, er.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Mn.current || Qi(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : ke.current, _e.env.NODE_ENV !== "production" && Et(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.parent?.addChild(this), this.update(this.props, this.presenceContext);
1780
+ }
1781
+ unmount() {
1782
+ this.projection && this.projection.unmount(), Ae(this.notifyUpdate), Ae(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
1783
+ for (const e in this.events)
1784
+ this.events[e].clear();
1785
+ for (const e in this.features) {
1786
+ const n = this.features[e];
1787
+ n && (n.unmount(), n.isMounted = !1);
1788
+ }
1789
+ this.current = null;
1790
+ }
1791
+ addChild(e) {
1792
+ this.children.add(e), this.enteringChildren ?? (this.enteringChildren = /* @__PURE__ */ new Set()), this.enteringChildren.add(e);
1793
+ }
1794
+ removeChild(e) {
1795
+ this.children.delete(e), this.enteringChildren && this.enteringChildren.delete(e);
1796
+ }
1797
+ bindToMotionValue(e, n) {
1798
+ this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
1799
+ const s = fe.has(e);
1800
+ s && this.onBindTransform && this.onBindTransform();
1801
+ const i = n.on("change", (a) => {
1802
+ this.latestValues[e] = a, this.props.onUpdate && O.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
1803
+ });
1804
+ let r;
1805
+ window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
1806
+ i(), r && r(), n.owner && n.stop();
1807
+ });
1808
+ }
1809
+ sortNodePosition(e) {
1810
+ return !this.current || !this.sortInstanceNodePosition || this.type !== e.type ? 0 : this.sortInstanceNodePosition(this.current, e.current);
1811
+ }
1812
+ updateFeatures() {
1813
+ let e = "animation";
1814
+ for (e in st) {
1815
+ const n = st[e];
1816
+ if (!n)
1817
+ continue;
1818
+ const { isEnabled: s, Feature: i } = n;
1819
+ if (!this.features[e] && i && s(this.props) && (this.features[e] = new i(this)), this.features[e]) {
1820
+ const r = this.features[e];
1821
+ r.isMounted ? r.update() : (r.mount(), r.isMounted = !0);
1822
+ }
1823
+ }
1824
+ }
1825
+ triggerBuild() {
1826
+ this.build(this.renderState, this.latestValues, this.props);
1827
+ }
1828
+ /**
1829
+ * Measure the current viewport box with or without transforms.
1830
+ * Only measures axis-aligned boxes, rotate and skew must be manually
1831
+ * removed with a re-render to work.
1832
+ */
1833
+ measureViewportBox() {
1834
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : xn();
1835
+ }
1836
+ getStaticValue(e) {
1837
+ return this.latestValues[e];
1838
+ }
1839
+ setStaticValue(e, n) {
1840
+ this.latestValues[e] = n;
1841
+ }
1842
+ /**
1843
+ * Update the provided props. Ensure any newly-added motion values are
1844
+ * added to our map, old ones removed, and listeners updated.
1845
+ */
1846
+ update(e, n) {
1847
+ (e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
1848
+ for (let s = 0; s < wt.length; s++) {
1849
+ const i = wt[s];
1850
+ this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
1851
+ const r = "on" + i, a = e[r];
1852
+ a && (this.propEventSubscriptions[i] = this.on(i, a));
1853
+ }
1854
+ this.prevMotionValues = tr(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
1855
+ }
1856
+ getProps() {
1857
+ return this.props;
1858
+ }
1859
+ /**
1860
+ * Returns the variant definition with a given name.
1861
+ */
1862
+ getVariant(e) {
1863
+ return this.props.variants ? this.props.variants[e] : void 0;
1864
+ }
1865
+ /**
1866
+ * Returns the defined default transition on this component.
1867
+ */
1868
+ getDefaultTransition() {
1869
+ return this.props.transition;
1870
+ }
1871
+ getTransformPagePoint() {
1872
+ return this.props.transformPagePoint;
1873
+ }
1874
+ getClosestVariantNode() {
1875
+ return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
1876
+ }
1877
+ /**
1878
+ * Add a child visual element to our set of children.
1879
+ */
1880
+ addVariantChild(e) {
1881
+ const n = this.getClosestVariantNode();
1882
+ if (n)
1883
+ return n.variantChildren && n.variantChildren.add(e), () => n.variantChildren.delete(e);
1884
+ }
1885
+ /**
1886
+ * Add a motion value and bind it to this visual element.
1887
+ */
1888
+ addValue(e, n) {
1889
+ const s = this.values.get(e);
1890
+ n !== s && (s && this.removeValue(e), this.bindToMotionValue(e, n), this.values.set(e, n), this.latestValues[e] = n.get());
1891
+ }
1892
+ /**
1893
+ * Remove a motion value and unbind any active subscriptions.
1894
+ */
1895
+ removeValue(e) {
1896
+ this.values.delete(e);
1897
+ const n = this.valueSubscriptions.get(e);
1898
+ n && (n(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState);
1899
+ }
1900
+ /**
1901
+ * Check whether we have a motion value for this key
1902
+ */
1903
+ hasValue(e) {
1904
+ return this.values.has(e);
1905
+ }
1906
+ getValue(e, n) {
1907
+ if (this.props.values && this.props.values[e])
1908
+ return this.props.values[e];
1909
+ let s = this.values.get(e);
1910
+ return s === void 0 && n !== void 0 && (s = ce(n === null ? void 0 : n, { owner: this }), this.addValue(e, s)), s;
1911
+ }
1912
+ /**
1913
+ * If we're trying to animate to a previously unencountered value,
1914
+ * we need to check for it in our state and as a last resort read it
1915
+ * directly from the instance (which might have performance implications).
1916
+ */
1917
+ readValue(e, n) {
1918
+ let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
1919
+ return s != null && (typeof s == "string" && (Bt(s) || Lt(s)) ? s = parseFloat(s) : !Yi(s) && Z.test(n) && (s = An(e, n)), this.setBaseTarget(e, k(s) ? s.get() : s)), k(s) ? s.get() : s;
1920
+ }
1921
+ /**
1922
+ * Set the base target to later animate back to. This is currently
1923
+ * only hydrated on creation and when we first read a value.
1924
+ */
1925
+ setBaseTarget(e, n) {
1926
+ this.baseTarget[e] = n;
1927
+ }
1928
+ /**
1929
+ * Find the base target for a value thats been removed from all animation
1930
+ * props.
1931
+ */
1932
+ getBaseTarget(e) {
1933
+ const { initial: n } = this.props;
1934
+ let s;
1935
+ if (typeof n == "string" || typeof n == "object") {
1936
+ const r = Ot(this.props, n, this.presenceContext?.custom);
1937
+ r && (s = r[e]);
1938
+ }
1939
+ if (n && s !== void 0)
1940
+ return s;
1941
+ const i = this.getBaseTargetFromProps(this.props, e);
1942
+ return i !== void 0 && !k(i) ? i : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
1943
+ }
1944
+ on(e, n) {
1945
+ return this.events[e] || (this.events[e] = new Ut()), this.events[e].add(n);
1946
+ }
1947
+ notify(e, ...n) {
1948
+ this.events[e] && this.events[e].notify(...n);
1949
+ }
1950
+ scheduleRenderMicrotask() {
1951
+ Li.render(this.render);
1952
+ }
1953
+ }
1954
+ class Cn extends nr {
1955
+ constructor() {
1956
+ super(...arguments), this.KeyframeResolver = Ni;
1957
+ }
1958
+ sortInstanceNodePosition(e, n) {
1959
+ return e.compareDocumentPosition(n) & 2 ? 1 : -1;
1960
+ }
1961
+ getBaseTargetFromProps(e, n) {
1962
+ return e.style ? e.style[n] : void 0;
1963
+ }
1964
+ removeValueFromRenderState(e, { vars: n, style: s }) {
1965
+ delete n[e], delete s[e];
1966
+ }
1967
+ handleChildMotionValue() {
1968
+ this.childSubscription && (this.childSubscription(), delete this.childSubscription);
1969
+ const { children: e } = this.props;
1970
+ k(e) && (this.childSubscription = e.on("change", (n) => {
1971
+ this.current && (this.current.textContent = `${n}`);
1972
+ }));
1973
+ }
1974
+ }
1975
+ function Pn(t, { style: e, vars: n }, s, i) {
1976
+ const r = t.style;
1977
+ let a;
1978
+ for (a in e)
1979
+ r[a] = e[a];
1980
+ i?.applyProjectionStyles(r, s);
1981
+ for (a in n)
1982
+ r.setProperty(a, n[a]);
1983
+ }
1984
+ function sr(t) {
1985
+ return window.getComputedStyle(t);
1986
+ }
1987
+ class ir extends Cn {
1988
+ constructor() {
1989
+ super(...arguments), this.type = "html", this.renderInstance = Pn;
1990
+ }
1991
+ readValueFromInstance(e, n) {
1992
+ if (fe.has(n))
1993
+ return this.projection?.isProjecting ? Fe(n) : ei(e, n);
1994
+ {
1995
+ const s = sr(e), i = (Wn(n) ? s.getPropertyValue(n) : s[n]) || 0;
1996
+ return typeof i == "string" ? i.trim() : i;
1997
+ }
1998
+ }
1999
+ measureInstanceViewportBox(e, { transformPagePoint: n }) {
2000
+ return Ji(e, n);
2001
+ }
2002
+ build(e, n, s) {
2003
+ Hn(e, n, s.transformTemplate);
2004
+ }
2005
+ scrapeMotionValuesFromProps(e, n, s) {
2006
+ return zn(e, n, s);
2007
+ }
2008
+ }
2009
+ const Fn = /* @__PURE__ */ new Set([
2010
+ "baseFrequency",
2011
+ "diffuseConstant",
2012
+ "kernelMatrix",
2013
+ "kernelUnitLength",
2014
+ "keySplines",
2015
+ "keyTimes",
2016
+ "limitingConeAngle",
2017
+ "markerHeight",
2018
+ "markerWidth",
2019
+ "numOctaves",
2020
+ "targetX",
2021
+ "targetY",
2022
+ "surfaceScale",
2023
+ "specularConstant",
2024
+ "specularExponent",
2025
+ "stdDeviation",
2026
+ "tableValues",
2027
+ "viewBox",
2028
+ "gradientTransform",
2029
+ "pathLength",
2030
+ "startOffset",
2031
+ "textLength",
2032
+ "lengthAdjust"
2033
+ ]);
2034
+ function rr(t, e, n, s) {
2035
+ Pn(t, e, void 0, s);
2036
+ for (const i in e.attrs)
2037
+ t.setAttribute(Fn.has(i) ? i : It(i), e.attrs[i]);
2038
+ }
2039
+ class ar extends Cn {
2040
+ constructor() {
2041
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = xn;
2042
+ }
2043
+ getBaseTargetFromProps(e, n) {
2044
+ return e[n];
2045
+ }
2046
+ readValueFromInstance(e, n) {
2047
+ if (fe.has(n)) {
2048
+ const s = Vn(n);
2049
+ return s && s.default || 0;
2050
+ }
2051
+ return n = Fn.has(n) ? n : It(n), e.getAttribute(n);
2052
+ }
2053
+ scrapeMotionValuesFromProps(e, n, s) {
2054
+ return qn(e, n, s);
2055
+ }
2056
+ build(e, n, s) {
2057
+ Yn(e, n, this.isSVGTag, s.transformTemplate, s.style);
2058
+ }
2059
+ renderInstance(e, n, s, i) {
2060
+ rr(e, n, s, i);
2061
+ }
2062
+ mount(e) {
2063
+ this.isSVGTag = Xn(e.tagName), super.mount(e);
2064
+ }
2065
+ }
2066
+ const or = (t, e) => Zn(t) ? new ar(e) : new ir(e, {
2067
+ allowProjection: t !== Qn
2068
+ });
2069
+ function z(t, e, n) {
2070
+ const s = t.getProps();
2071
+ return Ot(s, e, n !== void 0 ? n : s.custom, t);
2072
+ }
2073
+ const Ke = (t) => Array.isArray(t);
2074
+ function ur(t, e, n) {
2075
+ t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, ce(n));
2076
+ }
2077
+ function lr(t) {
2078
+ return Ke(t) ? t[t.length - 1] || 0 : t;
2079
+ }
2080
+ function cr(t, e) {
2081
+ const n = z(t, e);
2082
+ let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
2083
+ r = { ...r, ...s };
2084
+ for (const a in r) {
2085
+ const o = lr(r[a]);
2086
+ ur(t, a, o);
2087
+ }
2088
+ }
2089
+ function hr(t) {
2090
+ return !!(k(t) && t.add);
2091
+ }
2092
+ function fr(t, e) {
2093
+ const n = t.getValue("willChange");
2094
+ if (hr(n))
2095
+ return n.add(e);
2096
+ if (!n && N.WillChange) {
2097
+ const s = new N.WillChange("auto");
2098
+ t.addValue("willChange", s), s.add(e);
2099
+ }
2100
+ }
2101
+ function dr(t) {
2102
+ return t.props[Jn];
2103
+ }
2104
+ const pr = (t) => t !== null;
2105
+ function mr(t, { repeat: e, repeatType: n = "loop" }, s) {
2106
+ const i = t.filter(pr), r = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
2107
+ return i[r];
2108
+ }
2109
+ const gr = {
2110
+ type: "spring",
2111
+ stiffness: 500,
2112
+ damping: 25,
2113
+ restSpeed: 10
2114
+ }, yr = (t) => ({
2115
+ type: "spring",
2116
+ stiffness: 550,
2117
+ damping: t === 0 ? 2 * Math.sqrt(550) : 30,
2118
+ restSpeed: 10
2119
+ }), br = {
2120
+ type: "keyframes",
2121
+ duration: 0.8
2122
+ }, vr = {
2123
+ type: "keyframes",
2124
+ ease: [0.25, 0.1, 0.35, 1],
2125
+ duration: 0.3
2126
+ }, Tr = (t, { keyframes: e }) => e.length > 2 ? br : fe.has(t) ? t.startsWith("scale") ? yr(e[1]) : gr : vr;
2127
+ function Vr({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: a, repeatDelay: o, from: u, elapsed: c, ...l }) {
2128
+ return !!Object.keys(l).length;
2129
+ }
2130
+ const Ar = (t, e, n, s = {}, i, r) => (a) => {
2131
+ const o = yn(s, t) || {}, u = o.delay || s.delay || 0;
2132
+ let { elapsed: c = 0 } = s;
2133
+ c = c - /* @__PURE__ */ I(u);
2134
+ const l = {
2135
+ keyframes: Array.isArray(n) ? n : [null, n],
2136
+ ease: "easeOut",
2137
+ velocity: e.getVelocity(),
2138
+ ...o,
2139
+ delay: -c,
2140
+ onUpdate: (f) => {
2141
+ e.set(f), o.onUpdate && o.onUpdate(f);
2142
+ },
2143
+ onComplete: () => {
2144
+ a(), o.onComplete && o.onComplete();
2145
+ },
2146
+ name: t,
2147
+ motionValue: e,
2148
+ element: r ? void 0 : i
2149
+ };
2150
+ Vr(o) || Object.assign(l, Tr(t, l)), l.duration && (l.duration = /* @__PURE__ */ I(l.duration)), l.repeatDelay && (l.repeatDelay = /* @__PURE__ */ I(l.repeatDelay)), l.from !== void 0 && (l.keyframes[0] = l.from);
2151
+ let h = !1;
2152
+ if ((l.type === !1 || l.duration === 0 && !l.repeatDelay) && (Re(l), l.delay === 0 && (h = !0)), (N.instantAnimations || N.skipAnimations) && (h = !0, Re(l), l.delay = 0), l.allowFlatten = !o.type && !o.ease, h && !r && e.get() !== void 0) {
2153
+ const f = mr(l.keyframes, o);
2154
+ if (f !== void 0) {
2155
+ O.update(() => {
2156
+ l.onUpdate(f), l.onComplete();
2157
+ });
2158
+ return;
2159
+ }
2160
+ }
2161
+ return o.isSync ? new Je(l) : new wi(l);
2162
+ };
2163
+ function wr({ protectedKeys: t, needsAnimating: e }, n) {
2164
+ const s = t.hasOwnProperty(n) && e[n] !== !0;
2165
+ return e[n] = !1, s;
2166
+ }
2167
+ function Dn(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
2168
+ let { transition: r = t.getDefaultTransition(), transitionEnd: a, ...o } = e;
2169
+ s && (r = s);
2170
+ const u = [], c = i && t.animationState && t.animationState.getState()[i];
2171
+ for (const l in o) {
2172
+ const h = t.getValue(l, t.latestValues[l] ?? null), f = o[l];
2173
+ if (f === void 0 || c && wr(c, l))
2174
+ continue;
2175
+ const d = {
2176
+ delay: n,
2177
+ ...yn(r || {}, l)
2178
+ }, v = h.get();
2179
+ if (v !== void 0 && !h.isAnimating && !Array.isArray(f) && f === v && !d.velocity)
2180
+ continue;
2181
+ let T = !1;
2182
+ if (window.MotionHandoffAnimation) {
2183
+ const p = dr(t);
2184
+ if (p) {
2185
+ const V = window.MotionHandoffAnimation(p, l, O);
2186
+ V !== null && (d.startTime = V, T = !0);
2187
+ }
2188
+ }
2189
+ fr(t, l), h.start(Ar(l, h, f, t.shouldReduceMotion && bn.has(l) ? { type: !1 } : d, t, T));
2190
+ const b = h.animation;
2191
+ b && u.push(b);
2192
+ }
2193
+ return a && Promise.all(u).then(() => {
2194
+ O.update(() => {
2195
+ a && cr(t, a);
2196
+ });
2197
+ }), u;
2198
+ }
2199
+ function En(t, e, n, s = 0, i = 1) {
2200
+ const r = Array.from(t).sort((c, l) => c.sortNodePosition(l)).indexOf(e), a = t.size, o = (a - 1) * s;
2201
+ return typeof n == "function" ? n(r, a) : i === 1 ? r * s : o - r * s;
2202
+ }
2203
+ function Be(t, e, n = {}) {
2204
+ const s = z(t, e, n.type === "exit" ? t.presenceContext?.custom : void 0);
2205
+ let { transition: i = t.getDefaultTransition() || {} } = s || {};
2206
+ n.transitionOverride && (i = n.transitionOverride);
2207
+ const r = s ? () => Promise.all(Dn(t, s, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (u = 0) => {
2208
+ const { delayChildren: c = 0, staggerChildren: l, staggerDirection: h } = i;
2209
+ return Sr(t, e, u, c, l, h, n);
2210
+ } : () => Promise.resolve(), { when: o } = i;
2211
+ if (o) {
2212
+ const [u, c] = o === "beforeChildren" ? [r, a] : [a, r];
2213
+ return u().then(() => c());
2214
+ } else
2215
+ return Promise.all([r(), a(n.delay)]);
2216
+ }
2217
+ function Sr(t, e, n = 0, s = 0, i = 0, r = 1, a) {
2218
+ const o = [];
2219
+ for (const u of t.variantChildren)
2220
+ u.notify("AnimationStart", e), o.push(Be(u, e, {
2221
+ ...a,
2222
+ delay: n + (typeof s == "function" ? 0 : s) + En(t.variantChildren, u, s, i, r)
2223
+ }).then(() => u.notify("AnimationComplete", e)));
2224
+ return Promise.all(o);
2225
+ }
2226
+ function xr(t, e, n = {}) {
2227
+ t.notify("AnimationStart", e);
2228
+ let s;
2229
+ if (Array.isArray(e)) {
2230
+ const i = e.map((r) => Be(t, r, n));
2231
+ s = Promise.all(i);
2232
+ } else if (typeof e == "string")
2233
+ s = Be(t, e, n);
2234
+ else {
2235
+ const i = typeof e == "function" ? z(t, e, n.custom) : e;
2236
+ s = Promise.all(Dn(t, i, n));
2237
+ }
2238
+ return s.then(() => {
2239
+ t.notify("AnimationComplete", e);
2240
+ });
2241
+ }
2242
+ function On(t, e) {
2243
+ if (!Array.isArray(e))
2244
+ return !1;
2245
+ const n = e.length;
2246
+ if (n !== t.length)
2247
+ return !1;
2248
+ for (let s = 0; s < n; s++)
2249
+ if (e[s] !== t[s])
2250
+ return !1;
2251
+ return !0;
2252
+ }
2253
+ const Mr = Nt.length;
2254
+ function In(t) {
2255
+ if (!t)
2256
+ return;
2257
+ if (!t.isControllingVariants) {
2258
+ const n = t.parent ? In(t.parent) || {} : {};
2259
+ return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
2260
+ }
2261
+ const e = {};
2262
+ for (let n = 0; n < Mr; n++) {
2263
+ const s = Nt[n], i = t.props[s];
2264
+ (Rt(i) || i === !1) && (e[s] = i);
2265
+ }
2266
+ return e;
2267
+ }
2268
+ const Cr = [...Kt].reverse(), Pr = Kt.length;
2269
+ function Fr(t) {
2270
+ return (e) => Promise.all(e.map(({ animation: n, options: s }) => xr(t, n, s)));
2271
+ }
2272
+ function Dr(t) {
2273
+ let e = Fr(t), n = St(), s = !0;
2274
+ const i = (u) => (c, l) => {
2275
+ const h = z(t, l, u === "exit" ? t.presenceContext?.custom : void 0);
2276
+ if (h) {
2277
+ const { transition: f, transitionEnd: d, ...v } = h;
2278
+ c = { ...c, ...v, ...d };
2279
+ }
2280
+ return c;
2281
+ };
2282
+ function r(u) {
2283
+ e = u(t);
2284
+ }
2285
+ function a(u) {
2286
+ const { props: c } = t, l = In(t.parent) || {}, h = [], f = /* @__PURE__ */ new Set();
2287
+ let d = {}, v = 1 / 0;
2288
+ for (let b = 0; b < Pr; b++) {
2289
+ const p = Cr[b], V = n[p], g = c[p] !== void 0 ? c[p] : l[p], S = Rt(g), m = p === u ? V.isActive : null;
2290
+ m === !1 && (v = b);
2291
+ let A = g === l[p] && g !== c[p] && S;
2292
+ if (A && s && t.manuallyAnimateOnMount && (A = !1), V.protectedKeys = { ...d }, // If it isn't active and hasn't *just* been set as inactive
2293
+ !V.isActive && m === null || // If we didn't and don't have any defined prop for this animation type
2294
+ !g && !V.prevProp || // Or if the prop doesn't define an animation
2295
+ kt(g) || typeof g == "boolean")
2296
+ continue;
2297
+ const M = Er(V.prevProp, g);
2298
+ let y = M || // If we're making this variant active, we want to always make it active
2299
+ p === u && V.isActive && !A && S || // If we removed a higher-priority variant (i is in reverse order)
2300
+ b > v && S, P = !1;
2301
+ const F = Array.isArray(g) ? g : [g];
2302
+ let G = F.reduce(i(p), {});
2303
+ m === !1 && (G = {});
2304
+ const { prevResolvedValues: et = {} } = V, Nn = {
2305
+ ...et,
2306
+ ...G
2307
+ }, tt = (C) => {
2308
+ y = !0, f.has(C) && (P = !0, f.delete(C)), V.needsAnimating[C] = !0;
2309
+ const D = t.getValue(C);
2310
+ D && (D.liveStyle = !1);
2311
+ };
2312
+ for (const C in Nn) {
2313
+ const D = G[C], K = et[C];
2314
+ if (d.hasOwnProperty(C))
2315
+ continue;
2316
+ let j = !1;
2317
+ Ke(D) && Ke(K) ? j = !On(D, K) : j = D !== K, j ? D != null ? tt(C) : f.add(C) : D !== void 0 && f.has(C) ? tt(C) : V.protectedKeys[C] = !0;
2318
+ }
2319
+ V.prevProp = g, V.prevResolvedValues = G, V.isActive && (d = { ...d, ...G }), s && t.blockInitialAnimation && (y = !1);
2320
+ const nt = A && M;
2321
+ y && (!nt || P) && h.push(...F.map((C) => {
2322
+ const D = { type: p };
2323
+ if (typeof C == "string" && s && !nt && t.manuallyAnimateOnMount && t.parent) {
2324
+ const { parent: K } = t, j = z(K, C);
2325
+ if (K.enteringChildren && j) {
2326
+ const { delayChildren: kn } = j.transition || {};
2327
+ D.delay = En(K.enteringChildren, t, kn);
2328
+ }
2329
+ }
2330
+ return {
2331
+ animation: C,
2332
+ options: D
2333
+ };
2334
+ }));
2335
+ }
2336
+ if (f.size) {
2337
+ const b = {};
2338
+ if (typeof c.initial != "boolean") {
2339
+ const p = z(t, Array.isArray(c.initial) ? c.initial[0] : c.initial);
2340
+ p && p.transition && (b.transition = p.transition);
2341
+ }
2342
+ f.forEach((p) => {
2343
+ const V = t.getBaseTarget(p), g = t.getValue(p);
2344
+ g && (g.liveStyle = !0), b[p] = V ?? null;
2345
+ }), h.push({ animation: b });
2346
+ }
2347
+ let T = !!h.length;
2348
+ return s && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (T = !1), s = !1, T ? e(h) : Promise.resolve();
2349
+ }
2350
+ function o(u, c) {
2351
+ if (n[u].isActive === c)
2352
+ return Promise.resolve();
2353
+ t.variantChildren?.forEach((h) => h.animationState?.setActive(u, c)), n[u].isActive = c;
2354
+ const l = a(u);
2355
+ for (const h in n)
2356
+ n[h].protectedKeys = {};
2357
+ return l;
2358
+ }
2359
+ return {
2360
+ animateChanges: a,
2361
+ setActive: o,
2362
+ setAnimateFunction: r,
2363
+ getState: () => n,
2364
+ reset: () => {
2365
+ n = St(), s = !0;
2366
+ }
2367
+ };
2368
+ }
2369
+ function Er(t, e) {
2370
+ return typeof e == "string" ? e !== t : Array.isArray(e) ? !On(e, t) : !1;
2371
+ }
2372
+ function B(t = !1) {
2373
+ return {
2374
+ isActive: t,
2375
+ protectedKeys: {},
2376
+ needsAnimating: {},
2377
+ prevResolvedValues: {}
2378
+ };
2379
+ }
2380
+ function St() {
2381
+ return {
2382
+ animate: B(!0),
2383
+ whileInView: B(),
2384
+ whileHover: B(),
2385
+ whileTap: B(),
2386
+ whileDrag: B(),
2387
+ whileFocus: B(),
2388
+ exit: B()
2389
+ };
2390
+ }
2391
+ class J {
2392
+ constructor(e) {
2393
+ this.isMounted = !1, this.node = e;
2394
+ }
2395
+ update() {
2396
+ }
2397
+ }
2398
+ class Or extends J {
2399
+ /**
2400
+ * We dynamically generate the AnimationState manager as it contains a reference
2401
+ * to the underlying animation library. We only want to load that if we load this,
2402
+ * so people can optionally code split it out using the `m` component.
2403
+ */
2404
+ constructor(e) {
2405
+ super(e), e.animationState || (e.animationState = Dr(e));
2406
+ }
2407
+ updateAnimationControlsSubscription() {
2408
+ const { animate: e } = this.node.getProps();
2409
+ kt(e) && (this.unmountControls = e.subscribe(this.node));
2410
+ }
2411
+ /**
2412
+ * Subscribe any provided AnimationControls to the component's VisualElement
2413
+ */
2414
+ mount() {
2415
+ this.updateAnimationControlsSubscription();
2416
+ }
2417
+ update() {
2418
+ const { animate: e } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
2419
+ e !== n && this.updateAnimationControlsSubscription();
2420
+ }
2421
+ unmount() {
2422
+ this.node.animationState.reset(), this.unmountControls?.();
2423
+ }
2424
+ }
2425
+ let Ir = 0;
2426
+ class Rr extends J {
2427
+ constructor() {
2428
+ super(...arguments), this.id = Ir++;
2429
+ }
2430
+ update() {
2431
+ if (!this.node.presenceContext)
2432
+ return;
2433
+ const { isPresent: e, onExitComplete: n } = this.node.presenceContext, { isPresent: s } = this.node.prevPresenceContext || {};
2434
+ if (!this.node.animationState || e === s)
2435
+ return;
2436
+ const i = this.node.animationState.setActive("exit", !e);
2437
+ n && !e && i.then(() => {
2438
+ n(this.id);
2439
+ });
2440
+ }
2441
+ mount() {
2442
+ const { register: e, onExitComplete: n } = this.node.presenceContext || {};
2443
+ n && n(this.id), e && (this.unmount = e(this.id));
2444
+ }
2445
+ unmount() {
2446
+ }
2447
+ }
2448
+ const Nr = {
2449
+ animation: {
2450
+ Feature: Or
2451
+ },
2452
+ exit: {
2453
+ Feature: Rr
2454
+ }
2455
+ };
2456
+ function xt(t, e, n, s = { passive: !0 }) {
2457
+ return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
2458
+ }
2459
+ function Rn(t) {
2460
+ return {
2461
+ point: {
2462
+ x: t.pageX,
2463
+ y: t.pageY
2464
+ }
2465
+ };
2466
+ }
2467
+ function Mt(t, e, n) {
2468
+ const { props: s } = t;
2469
+ t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
2470
+ const i = "onHover" + n, r = s[i];
2471
+ r && O.postRender(() => r(e, Rn(e)));
2472
+ }
2473
+ class kr extends J {
2474
+ mount() {
2475
+ const { current: e } = this.node;
2476
+ e && (this.unmount = $i(e, (n, s) => (Mt(this.node, s, "Start"), (i) => Mt(this.node, i, "End"))));
2477
+ }
2478
+ unmount() {
2479
+ }
2480
+ }
2481
+ class Kr extends J {
2482
+ constructor() {
2483
+ super(...arguments), this.isActive = !1;
2484
+ }
2485
+ onFocus() {
2486
+ let e = !1;
2487
+ try {
2488
+ e = this.node.current.matches(":focus-visible");
2489
+ } catch {
2490
+ e = !0;
2491
+ }
2492
+ !e || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
2493
+ }
2494
+ onBlur() {
2495
+ !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
2496
+ }
2497
+ mount() {
2498
+ this.unmount = de(xt(this.node.current, "focus", () => this.onFocus()), xt(this.node.current, "blur", () => this.onBlur()));
2499
+ }
2500
+ unmount() {
2501
+ }
2502
+ }
2503
+ function Ct(t, e, n) {
2504
+ const { props: s } = t;
2505
+ if (t.current instanceof HTMLButtonElement && t.current.disabled)
2506
+ return;
2507
+ t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
2508
+ const i = "onTap" + (n === "End" ? "" : n), r = s[i];
2509
+ r && O.postRender(() => r(e, Rn(e)));
2510
+ }
2511
+ class Br extends J {
2512
+ mount() {
2513
+ const { current: e } = this.node;
2514
+ e && (this.unmount = zi(e, (n, s) => (Ct(this.node, s, "Start"), (i, { success: r }) => Ct(this.node, i, r ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
2515
+ }
2516
+ unmount() {
2517
+ }
2518
+ }
2519
+ const Le = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Lr = (t) => {
2520
+ const e = Le.get(t.target);
2521
+ e && e(t);
2522
+ }, _r = (t) => {
2523
+ t.forEach(Lr);
2524
+ };
2525
+ function Ur({ root: t, ...e }) {
2526
+ const n = t || document;
2527
+ Te.has(n) || Te.set(n, {});
2528
+ const s = Te.get(n), i = JSON.stringify(e);
2529
+ return s[i] || (s[i] = new IntersectionObserver(_r, { root: t, ...e })), s[i];
2530
+ }
2531
+ function $r(t, e, n) {
2532
+ const s = Ur(e);
2533
+ return Le.set(t, n), s.observe(t), () => {
2534
+ Le.delete(t), s.unobserve(t);
2535
+ };
2536
+ }
2537
+ const Gr = {
2538
+ some: 0,
2539
+ all: 1
2540
+ };
2541
+ class jr extends J {
2542
+ constructor() {
2543
+ super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
2544
+ }
2545
+ startObserver() {
2546
+ this.unmount();
2547
+ const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = e, a = {
2548
+ root: n ? n.current : void 0,
2549
+ rootMargin: s,
2550
+ threshold: typeof i == "number" ? i : Gr[i]
2551
+ }, o = (u) => {
2552
+ const { isIntersecting: c } = u;
2553
+ if (this.isInView === c || (this.isInView = c, r && !c && this.hasEnteredView))
2554
+ return;
2555
+ c && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", c);
2556
+ const { onViewportEnter: l, onViewportLeave: h } = this.node.getProps(), f = c ? l : h;
2557
+ f && f(u);
2558
+ };
2559
+ return $r(this.node.current, a, o);
2560
+ }
2561
+ mount() {
2562
+ this.startObserver();
2563
+ }
2564
+ update() {
2565
+ if (typeof IntersectionObserver > "u")
2566
+ return;
2567
+ const { props: e, prevProps: n } = this.node;
2568
+ ["amount", "margin", "root"].some(Wr(e, n)) && this.startObserver();
2569
+ }
2570
+ unmount() {
2571
+ }
2572
+ }
2573
+ function Wr({ viewport: t = {} }, { viewport: e = {} } = {}) {
2574
+ return (n) => t[n] !== e[n];
2575
+ }
2576
+ const Hr = {
2577
+ inView: {
2578
+ Feature: jr
2579
+ },
2580
+ tap: {
2581
+ Feature: Br
2582
+ },
2583
+ focus: {
2584
+ Feature: Kr
2585
+ },
2586
+ hover: {
2587
+ Feature: kr
2588
+ }
2589
+ }, zr = {
2590
+ renderer: or,
2591
+ ...Nr,
2592
+ ...Hr
2593
+ };
2594
+ var Zr = zr;
2595
+ export {
2596
+ Zr as default
2597
+ };