motion-v 0.1.0 → 0.2.0

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.
Files changed (41) hide show
  1. package/dist/index.cjs +1 -0
  2. package/dist/index.js +1280 -1097
  3. package/dist/src/components/Motion.d.ts +2 -7
  4. package/dist/src/components/type.d.ts +25 -0
  5. package/dist/src/{state/features → features}/feature.d.ts +1 -1
  6. package/dist/src/{state/features → features}/gestures/base.d.ts +2 -2
  7. package/dist/src/features/gestures/drag/index.d.ts +12 -0
  8. package/dist/src/features/gestures/drag/types.d.ts +144 -0
  9. package/dist/src/{state/features → features}/gestures/hover.d.ts +2 -2
  10. package/dist/src/{state/features → features}/gestures/in-view.d.ts +2 -2
  11. package/dist/src/{state/features → features}/gestures/index.d.ts +1 -0
  12. package/dist/src/{state/features → features}/gestures/press.d.ts +2 -2
  13. package/dist/src/features/gestures/types.d.ts +29 -0
  14. package/dist/src/index.d.ts +1 -0
  15. package/dist/src/state/motion-state.d.ts +4 -3
  16. package/dist/src/state/style.d.ts +2 -1
  17. package/dist/src/state/types.d.ts +22 -3
  18. package/dist/src/state/utils.d.ts +9 -6
  19. package/dist/src/types/framer-motion.d.ts +104 -0
  20. package/dist/src/types/index.d.ts +3 -14
  21. package/dist/src/types/transform.d.ts +47 -0
  22. package/dist/src/utils/events.d.ts +1 -1
  23. package/dist/src/utils/index.d.ts +1 -0
  24. package/dist/src/utils/motion-value.d.ts +2 -0
  25. package/dist/src/utils/use-animation-frame.d.ts +2 -0
  26. package/dist/src/value/index.d.ts +5 -0
  27. package/dist/src/value/use-combine-values.d.ts +6 -0
  28. package/dist/src/value/use-computed.d.ts +2 -0
  29. package/dist/src/value/use-motion-template.d.ts +21 -0
  30. package/dist/src/value/use-motion-value-event.d.ts +3 -0
  31. package/dist/src/value/use-scroll.d.ts +12 -0
  32. package/dist/src/value/use-spring.d.ts +3 -0
  33. package/dist/src/value/use-time.d.ts +1 -0
  34. package/dist/src/value/use-transform.d.ts +58 -0
  35. package/dist/src/value/use-velocity.d.ts +13 -0
  36. package/package.json +10 -4
  37. package/dist/index.umd.cjs +0 -1
  38. package/dist/src/components/utils.d.ts +0 -3
  39. package/dist/src/state/features/gestures/types.d.ts +0 -9
  40. /package/dist/src/{state/features → features}/events.d.ts +0 -0
  41. /package/dist/src/{state/features → features}/index.d.ts +0 -0
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
- import { unref as Cn, ref as Fn, computed as zs, inject as js, provide as Us, Fragment as Hs, defineComponent as Pt, Comment as qs, mergeProps as ee, cloneVNode as Ys, h as Rt, mergeDefaults as Xs, onMounted as Zs, onUnmounted as Qs, onUpdated as Js, openBlock as On, createBlock as Dn, withCtx as Rn, renderSlot as In, toRefs as ti, resolveDynamicComponent as ei, TransitionGroup as ni, Transition as si } from "vue";
2
- function ii(e, t) {
1
+ import { unref as In, ref as Ln, computed as ei, inject as ni, provide as si, Fragment as ii, defineComponent as Ot, Comment as ri, mergeProps as Nn, cloneVNode as oi, h as $t, mergeDefaults as ai, onMounted as $n, onUnmounted as Dt, onUpdated as li, openBlock as Kn, createBlock as Wn, normalizeStyle as ui, withCtx as _n, renderSlot as Gn, toRefs as ci, resolveDynamicComponent as fi, TransitionGroup as hi, Transition as di, onBeforeUpdate as kn, watch as zn, onBeforeUnmount as pi } from "vue";
2
+ function mi(e, t) {
3
3
  e.indexOf(t) === -1 && e.push(t);
4
4
  }
5
- function Bn(e, t) {
5
+ function jn(e, t) {
6
6
  const n = e.indexOf(t);
7
7
  n > -1 && e.splice(n, 1);
8
8
  }
9
- class Ln {
9
+ class Un {
10
10
  constructor() {
11
11
  this.subscriptions = [];
12
12
  }
13
13
  add(t) {
14
- return ii(this.subscriptions, t), () => Bn(this.subscriptions, t);
14
+ return mi(this.subscriptions, t), () => jn(this.subscriptions, t);
15
15
  }
16
16
  notify(t, n, s) {
17
17
  const i = this.subscriptions.length;
@@ -31,18 +31,18 @@ class Ln {
31
31
  this.subscriptions.length = 0;
32
32
  }
33
33
  }
34
- function ne(e, t) {
34
+ function re(e, t) {
35
35
  return t ? e * (1e3 / t) : 0;
36
36
  }
37
- const Ne = /* @__PURE__ */ new Set();
38
- function Ct(e, t, n) {
39
- e || Ne.has(t) || (console.warn(t), Ne.add(t));
37
+ const We = /* @__PURE__ */ new Set();
38
+ function Bt(e, t, n) {
39
+ e || We.has(t) || (console.warn(t), We.add(t));
40
40
  }
41
- const ri = {
41
+ const gi = {
42
42
  skipAnimations: !1,
43
43
  useManualTiming: !1
44
- }, N = (e) => e;
45
- function oi(e) {
44
+ }, K = (e) => e;
45
+ function yi(e) {
46
46
  let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = !1, i = !1;
47
47
  const r = /* @__PURE__ */ new WeakSet();
48
48
  let o = {
@@ -80,7 +80,7 @@ function oi(e) {
80
80
  };
81
81
  return l;
82
82
  }
83
- const J = [
83
+ const nt = [
84
84
  "read",
85
85
  // Read
86
86
  "resolveKeyframes",
@@ -93,39 +93,41 @@ const J = [
93
93
  // Write
94
94
  "postRender"
95
95
  // Compute
96
- ], ai = 40;
97
- function li(e, t) {
96
+ ], vi = 40;
97
+ function bi(e, t) {
98
98
  let n = !1, s = !0;
99
99
  const i = {
100
100
  delta: 0,
101
101
  timestamp: 0,
102
102
  isProcessing: !1
103
- }, r = () => n = !0, o = J.reduce((g, y) => (g[y] = oi(r), g), {}), { read: a, resolveKeyframes: l, update: u, preRender: c, render: f, postRender: h } = o, p = () => {
103
+ }, r = () => n = !0, o = nt.reduce((g, y) => (g[y] = yi(r), g), {}), { read: a, resolveKeyframes: l, update: u, preRender: c, render: f, postRender: h } = o, p = () => {
104
104
  const g = performance.now();
105
- n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp, ai), 1), i.timestamp = g, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), f.process(i), h.process(i), i.isProcessing = !1, n && t && (s = !1, e(p));
105
+ n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp, vi), 1), i.timestamp = g, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), f.process(i), h.process(i), i.isProcessing = !1, n && t && (s = !1, e(p));
106
106
  }, m = () => {
107
107
  n = !0, s = !0, i.isProcessing || e(p);
108
108
  };
109
- return { schedule: J.reduce((g, y) => {
110
- const S = o[y];
111
- return g[y] = (x, T = !1, A = !1) => (n || m(), S.schedule(x, T, A)), g;
109
+ return { schedule: nt.reduce((g, y) => {
110
+ const T = o[y];
111
+ return g[y] = (V, S = !1, A = !1) => (n || m(), T.schedule(V, S, A)), g;
112
112
  }, {}), cancel: (g) => {
113
- for (let y = 0; y < J.length; y++)
114
- o[J[y]].cancel(g);
113
+ for (let y = 0; y < nt.length; y++)
114
+ o[nt[y]].cancel(g);
115
115
  }, state: i, steps: o };
116
116
  }
117
- const { schedule: M, cancel: _, state: st, steps: yl } = li(typeof requestAnimationFrame < "u" ? requestAnimationFrame : N, !0);
118
- let vt;
119
- function ui() {
120
- vt = void 0;
117
+ const { schedule: E, cancel: R, state: Z, steps: Il } = bi(typeof requestAnimationFrame < "u" ? requestAnimationFrame : K, !0);
118
+ let St;
119
+ function wi() {
120
+ St = void 0;
121
121
  }
122
- const B = {
123
- now: () => (vt === void 0 && B.set(st.isProcessing || ri.useManualTiming ? st.timestamp : performance.now()), vt),
122
+ const N = {
123
+ now: () => (St === void 0 && N.set(Z.isProcessing || gi.useManualTiming ? Z.timestamp : performance.now()), St),
124
124
  set: (e) => {
125
- vt = e, queueMicrotask(ui);
125
+ St = e, queueMicrotask(wi);
126
126
  }
127
- }, $e = 30, ci = (e) => !isNaN(parseFloat(e));
128
- class fi {
127
+ }, _e = 30, Si = (e) => !isNaN(parseFloat(e)), G = {
128
+ current: void 0
129
+ };
130
+ class Ti {
129
131
  /**
130
132
  * @param init - The initiating value
131
133
  * @param config - Optional configuration options
@@ -136,12 +138,12 @@ class fi {
136
138
  */
137
139
  constructor(t, n = {}) {
138
140
  this.version = "11.11.11", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s, i = !0) => {
139
- const r = B.now();
141
+ const r = N.now();
140
142
  this.updatedAt !== r && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), i && this.events.renderRequest && this.events.renderRequest.notify(this.current);
141
143
  }, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
142
144
  }
143
145
  setCurrent(t) {
144
- this.current = t, this.updatedAt = B.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = ci(this.current));
146
+ this.current = t, this.updatedAt = N.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = Si(this.current));
145
147
  }
146
148
  setPrevFrameValue(t = this.current) {
147
149
  this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
@@ -187,13 +189,13 @@ class fi {
187
189
  * @deprecated
188
190
  */
189
191
  onChange(t) {
190
- return process.env.NODE_ENV !== "production" && Ct(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
192
+ return process.env.NODE_ENV !== "production" && Bt(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
191
193
  }
192
194
  on(t, n) {
193
- this.events[t] || (this.events[t] = new Ln());
195
+ this.events[t] || (this.events[t] = new Un());
194
196
  const s = this.events[t].add(n);
195
197
  return t === "change" ? () => {
196
- s(), M.read(() => {
198
+ s(), E.read(() => {
197
199
  this.events.change.getSize() || this.stop();
198
200
  });
199
201
  } : s;
@@ -246,7 +248,7 @@ class fi {
246
248
  * @public
247
249
  */
248
250
  get() {
249
- return this.current;
251
+ return G.current && G.current.push(this), this.current;
250
252
  }
251
253
  /**
252
254
  * @public
@@ -262,11 +264,11 @@ class fi {
262
264
  * @public
263
265
  */
264
266
  getVelocity() {
265
- const t = B.now();
266
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > $e)
267
+ const t = N.now();
268
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > _e)
267
269
  return 0;
268
- const n = Math.min(this.updatedAt - this.prevUpdatedAt, $e);
269
- return ne(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
270
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, _e);
271
+ return re(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
270
272
  }
271
273
  /**
272
274
  * Registers a new animation to control this `MotionValue`. Only one
@@ -319,15 +321,15 @@ class fi {
319
321
  this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
320
322
  }
321
323
  }
322
- function it(e, t) {
323
- return new fi(e, t);
324
+ function D(e, t) {
325
+ return new Ti(e, t);
324
326
  }
325
- function Ft(e) {
327
+ function Rt(e) {
326
328
  let t;
327
329
  return () => (t === void 0 && (t = e()), t);
328
330
  }
329
- const Nn = Ft(() => window.ScrollTimeline !== void 0);
330
- class se {
331
+ const Hn = Rt(() => window.ScrollTimeline !== void 0);
332
+ class oe {
331
333
  constructor(t) {
332
334
  this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
333
335
  }
@@ -345,7 +347,7 @@ class se {
345
347
  this.animations[s][t] = n;
346
348
  }
347
349
  attachTimeline(t, n) {
348
- const s = this.animations.map((i) => Nn() && i.attachTimeline ? i.attachTimeline(t) : n(i));
350
+ const s = this.animations.map((i) => Hn() && i.attachTimeline ? i.attachTimeline(t) : n(i));
349
351
  return () => {
350
352
  s.forEach((i, r) => {
351
353
  i && i(), this.animations[r].stop();
@@ -389,38 +391,38 @@ class se {
389
391
  this.runAll("complete");
390
392
  }
391
393
  }
392
- const C = (e) => e * 1e3, D = (e) => e / 1e3, hi = 5;
393
- function $n(e, t, n) {
394
- const s = Math.max(t - hi, 0);
395
- return ne(n - e(s), t - s);
394
+ const P = (e) => e * 1e3, B = (e) => e / 1e3, Vi = 5;
395
+ function Yn(e, t, n) {
396
+ const s = Math.max(t - Vi, 0);
397
+ return re(n - e(s), t - s);
396
398
  }
397
- let ut = N, R = N;
398
- process.env.NODE_ENV !== "production" && (ut = (e, t) => {
399
+ let ft = K, I = K;
400
+ process.env.NODE_ENV !== "production" && (ft = (e, t) => {
399
401
  !e && typeof console < "u" && console.warn(t);
400
- }, R = (e, t) => {
402
+ }, I = (e, t) => {
401
403
  if (!e)
402
404
  throw new Error(t);
403
405
  });
404
- const j = (e, t, n) => n > t ? t : n < e ? e : n, It = 1e-3, di = 0.01, Ke = 10, pi = 0.05, mi = 1;
405
- function gi({ duration: e = 800, bounce: t = 0.25, velocity: n = 0, mass: s = 1 }) {
406
+ const H = (e, t, n) => n > t ? t : n < e ? e : n, Kt = 1e-3, xi = 0.01, Ge = 10, Ai = 0.05, Ei = 1;
407
+ function Mi({ duration: e = 800, bounce: t = 0.25, velocity: n = 0, mass: s = 1 }) {
406
408
  let i, r;
407
- ut(e <= C(Ke), "Spring duration must be 10 seconds or less");
409
+ ft(e <= P(Ge), "Spring duration must be 10 seconds or less");
408
410
  let o = 1 - t;
409
- o = j(pi, mi, o), e = j(di, Ke, D(e)), o < 1 ? (i = (u) => {
410
- const c = u * o, f = c * e, h = c - n, p = _t(u, o), m = Math.exp(-f);
411
- return It - h / p * m;
411
+ o = H(Ai, Ei, o), e = H(xi, Ge, B(e)), o < 1 ? (i = (u) => {
412
+ const c = u * o, f = c * e, h = c - n, p = jt(u, o), m = Math.exp(-f);
413
+ return Kt - h / p * m;
412
414
  }, r = (u) => {
413
- const f = u * o * e, h = f * n + n, p = Math.pow(o, 2) * Math.pow(u, 2) * e, m = Math.exp(-f), w = _t(Math.pow(u, 2), o);
414
- return (-i(u) + It > 0 ? -1 : 1) * ((h - p) * m) / w;
415
+ const f = u * o * e, h = f * n + n, p = Math.pow(o, 2) * Math.pow(u, 2) * e, m = Math.exp(-f), w = jt(Math.pow(u, 2), o);
416
+ return (-i(u) + Kt > 0 ? -1 : 1) * ((h - p) * m) / w;
415
417
  }) : (i = (u) => {
416
418
  const c = Math.exp(-u * e), f = (u - n) * e + 1;
417
- return -It + c * f;
419
+ return -Kt + c * f;
418
420
  }, r = (u) => {
419
421
  const c = Math.exp(-u * e), f = (n - u) * (e * e);
420
422
  return c * f;
421
423
  });
422
- const a = 5 / e, l = vi(i, r, a);
423
- if (e = C(e), isNaN(l))
424
+ const a = 5 / e, l = Pi(i, r, a);
425
+ if (e = P(e), isNaN(l))
424
426
  return {
425
427
  stiffness: 100,
426
428
  damping: 10,
@@ -435,21 +437,21 @@ function gi({ duration: e = 800, bounce: t = 0.25, velocity: n = 0, mass: s = 1
435
437
  };
436
438
  }
437
439
  }
438
- const yi = 12;
439
- function vi(e, t, n) {
440
+ const Ci = 12;
441
+ function Pi(e, t, n) {
440
442
  let s = n;
441
- for (let i = 1; i < yi; i++)
443
+ for (let i = 1; i < Ci; i++)
442
444
  s = s - e(s) / t(s);
443
445
  return s;
444
446
  }
445
- function _t(e, t) {
447
+ function jt(e, t) {
446
448
  return e * Math.sqrt(1 - t * t);
447
449
  }
448
- const bi = ["duration", "bounce"], wi = ["stiffness", "damping", "mass"];
449
- function We(e, t) {
450
+ const Fi = ["duration", "bounce"], Oi = ["stiffness", "damping", "mass"];
451
+ function ke(e, t) {
450
452
  return t.some((n) => e[n] !== void 0);
451
453
  }
452
- function Ti(e) {
454
+ function Di(e) {
453
455
  let t = {
454
456
  velocity: 0,
455
457
  stiffness: 100,
@@ -458,8 +460,8 @@ function Ti(e) {
458
460
  isResolvedFromDuration: !1,
459
461
  ...e
460
462
  };
461
- if (!We(e, wi) && We(e, bi)) {
462
- const n = gi(e);
463
+ if (!ke(e, Oi) && ke(e, Fi)) {
464
+ const n = Mi(e);
463
465
  t = {
464
466
  ...t,
465
467
  ...n,
@@ -468,125 +470,125 @@ function Ti(e) {
468
470
  }
469
471
  return t;
470
472
  }
471
- function ie({ keyframes: e, restDelta: t, restSpeed: n, ...s }) {
472
- const i = e[0], r = e[e.length - 1], o = { done: !1, value: i }, { stiffness: a, damping: l, mass: u, duration: c, velocity: f, isResolvedFromDuration: h } = Ti({
473
+ function ae({ keyframes: e, restDelta: t, restSpeed: n, ...s }) {
474
+ const i = e[0], r = e[e.length - 1], o = { done: !1, value: i }, { stiffness: a, damping: l, mass: u, duration: c, velocity: f, isResolvedFromDuration: h } = Di({
473
475
  ...s,
474
- velocity: -D(s.velocity || 0)
475
- }), p = f || 0, m = l / (2 * Math.sqrt(a * u)), w = r - i, b = D(Math.sqrt(a / u)), g = Math.abs(w) < 5;
476
+ velocity: -B(s.velocity || 0)
477
+ }), p = f || 0, m = l / (2 * Math.sqrt(a * u)), w = r - i, b = B(Math.sqrt(a / u)), g = Math.abs(w) < 5;
476
478
  n || (n = g ? 0.01 : 2), t || (t = g ? 5e-3 : 0.5);
477
479
  let y;
478
480
  if (m < 1) {
479
- const S = _t(b, m);
480
- y = (x) => {
481
- const T = Math.exp(-m * b * x);
482
- return r - T * ((p + m * b * w) / S * Math.sin(S * x) + w * Math.cos(S * x));
481
+ const T = jt(b, m);
482
+ y = (V) => {
483
+ const S = Math.exp(-m * b * V);
484
+ return r - S * ((p + m * b * w) / T * Math.sin(T * V) + w * Math.cos(T * V));
483
485
  };
484
486
  } else if (m === 1)
485
- y = (S) => r - Math.exp(-b * S) * (w + (p + b * w) * S);
487
+ y = (T) => r - Math.exp(-b * T) * (w + (p + b * w) * T);
486
488
  else {
487
- const S = b * Math.sqrt(m * m - 1);
488
- y = (x) => {
489
- const T = Math.exp(-m * b * x), A = Math.min(S * x, 300);
490
- return r - T * ((p + m * b * w) * Math.sinh(A) + S * w * Math.cosh(A)) / S;
489
+ const T = b * Math.sqrt(m * m - 1);
490
+ y = (V) => {
491
+ const S = Math.exp(-m * b * V), A = Math.min(T * V, 300);
492
+ return r - S * ((p + m * b * w) * Math.sinh(A) + T * w * Math.cosh(A)) / T;
491
493
  };
492
494
  }
493
495
  return {
494
496
  calculatedDuration: h && c || null,
495
- next: (S) => {
496
- const x = y(S);
497
+ next: (T) => {
498
+ const V = y(T);
497
499
  if (h)
498
- o.done = S >= c;
500
+ o.done = T >= c;
499
501
  else {
500
- let T = 0;
501
- m < 1 && (T = S === 0 ? C(p) : $n(y, S, x));
502
- const A = Math.abs(T) <= n, F = Math.abs(r - x) <= t;
502
+ let S = 0;
503
+ m < 1 && (S = T === 0 ? P(p) : Yn(y, T, V));
504
+ const A = Math.abs(S) <= n, F = Math.abs(r - V) <= t;
503
505
  o.done = A && F;
504
506
  }
505
- return o.value = o.done ? r : x, o;
507
+ return o.value = o.done ? r : V, o;
506
508
  }
507
509
  };
508
510
  }
509
- const Gt = 2e4;
510
- function Kn(e) {
511
+ const Ut = 2e4;
512
+ function qn(e) {
511
513
  let t = 0;
512
514
  const n = 50;
513
515
  let s = e.next(t);
514
- for (; !s.done && t < Gt; )
516
+ for (; !s.done && t < Ut; )
515
517
  t += n, s = e.next(t);
516
- return t >= Gt ? 1 / 0 : t;
518
+ return t >= Ut ? 1 / 0 : t;
517
519
  }
518
- function Wn(e, t = 100, n) {
519
- const s = n({ ...e, keyframes: [0, t] }), i = Math.min(Kn(s), Gt);
520
+ function Xn(e, t = 100, n) {
521
+ const s = n({ ...e, keyframes: [0, t] }), i = Math.min(qn(s), Ut);
520
522
  return {
521
523
  type: "keyframes",
522
524
  ease: (r) => s.next(i * r).value / t,
523
- duration: D(i)
525
+ duration: B(i)
524
526
  };
525
527
  }
526
- const ct = (e, t, n) => e + (t - e) * n, ft = (e, t, n) => {
528
+ const ht = (e, t, n) => e + (t - e) * n, dt = (e, t, n) => {
527
529
  const s = t - e;
528
530
  return s === 0 ? 1 : (n - e) / s;
529
531
  };
530
- function _n(e, t) {
532
+ function Zn(e, t) {
531
533
  const n = e[e.length - 1];
532
534
  for (let s = 1; s <= t; s++) {
533
- const i = ft(0, t, s);
534
- e.push(ct(n, 1, i));
535
+ const i = dt(0, t, s);
536
+ e.push(ht(n, 1, i));
535
537
  }
536
538
  }
537
- function re(e) {
539
+ function le(e) {
538
540
  const t = [0];
539
- return _n(t, e.length - 1), t;
541
+ return Zn(t, e.length - 1), t;
540
542
  }
541
- const P = (e) => !!(e && e.getVelocity);
542
- function Ot(e, t, n) {
543
+ const C = (e) => !!(e && e.getVelocity);
544
+ function It(e, t, n) {
543
545
  var s;
544
546
  if (typeof e == "string") {
545
547
  let i = document;
546
- t && (R(!!t.current, "Scope provided, but no element detected."), i = t.current), n ? ((s = n[e]) !== null && s !== void 0 || (n[e] = i.querySelectorAll(e)), e = n[e]) : e = i.querySelectorAll(e);
548
+ t && (I(!!t.current, "Scope provided, but no element detected."), i = t.current), n ? ((s = n[e]) !== null && s !== void 0 || (n[e] = i.querySelectorAll(e)), e = n[e]) : e = i.querySelectorAll(e);
547
549
  } else e instanceof Element && (e = [e]);
548
550
  return Array.from(e || []);
549
551
  }
550
- function oe(e) {
552
+ function ue(e) {
551
553
  return typeof e == "object" && !Array.isArray(e);
552
554
  }
553
- function Gn(e, t, n, s) {
554
- return typeof e == "string" && oe(t) ? Ot(e, n, s) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e];
555
+ function Jn(e, t, n, s) {
556
+ return typeof e == "string" && ue(t) ? It(e, n, s) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e];
555
557
  }
556
- function ht(e) {
558
+ function pt(e) {
557
559
  return typeof e == "function";
558
560
  }
559
- function _e(e, t, n, s) {
561
+ function ze(e, t, n, s) {
560
562
  var i;
561
563
  return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : (i = s.get(t)) !== null && i !== void 0 ? i : e;
562
564
  }
563
- const Si = (e, t, n) => {
565
+ const Bi = (e, t, n) => {
564
566
  const s = t - e;
565
567
  return ((n - e) % s + s) % s + e;
566
- }, kn = (e) => Array.isArray(e) && typeof e[0] != "number";
567
- function xi(e, t) {
568
- return kn(e) ? e[Si(0, e.length, t)] : e;
568
+ }, Qn = (e) => Array.isArray(e) && typeof e[0] != "number";
569
+ function Ri(e, t) {
570
+ return Qn(e) ? e[Bi(0, e.length, t)] : e;
569
571
  }
570
- function Vi(e, t, n) {
572
+ function Ii(e, t, n) {
571
573
  for (let s = 0; s < e.length; s++) {
572
574
  const i = e[s];
573
- i.at > t && i.at < n && (Bn(e, i), s--);
575
+ i.at > t && i.at < n && (jn(e, i), s--);
574
576
  }
575
577
  }
576
- function Ai(e, t, n, s, i, r) {
577
- Vi(e, i, r);
578
+ function Li(e, t, n, s, i, r) {
579
+ Ii(e, i, r);
578
580
  for (let o = 0; o < t.length; o++)
579
581
  e.push({
580
582
  value: t[o],
581
- at: ct(i, r, s[o]),
582
- easing: xi(n, o)
583
+ at: ht(i, r, s[o]),
584
+ easing: Ri(n, o)
583
585
  });
584
586
  }
585
- function Ei(e, t) {
587
+ function Ni(e, t) {
586
588
  return e.at === t.at ? e.value === null ? 1 : t.value === null ? -1 : 0 : e.at - t.at;
587
589
  }
588
- const Mi = "easeInOut";
589
- function Pi(e, { defaultTransition: t = {}, ...n } = {}, s, i) {
590
+ const $i = "easeInOut";
591
+ function Ki(e, { defaultTransition: t = {}, ...n } = {}, s, i) {
590
592
  const r = t.duration || 0.3, o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), l = {}, u = /* @__PURE__ */ new Map();
591
593
  let c = 0, f = 0, h = 0;
592
594
  for (let p = 0; p < e.length; p++) {
@@ -595,43 +597,43 @@ function Pi(e, { defaultTransition: t = {}, ...n } = {}, s, i) {
595
597
  u.set(m, f);
596
598
  continue;
597
599
  } else if (!Array.isArray(m)) {
598
- u.set(m.name, _e(f, m.at, c, u));
600
+ u.set(m.name, ze(f, m.at, c, u));
599
601
  continue;
600
602
  }
601
603
  let [w, b, g = {}] = m;
602
- g.at !== void 0 && (f = _e(f, g.at, c, u));
604
+ g.at !== void 0 && (f = ze(f, g.at, c, u));
603
605
  let y = 0;
604
- const S = (x, T, A, F = 0, v = 0) => {
605
- const V = Ci(x), { delay: O = 0, times: G = re(V), type: Dt = "keyframes", ...Gs } = T;
606
- let { ease: Me = t.ease || "easeOut", duration: I } = T;
607
- const Pe = typeof O == "function" ? O(F, v) : O, Ce = V.length, Fe = ht(Dt) ? Dt : i == null ? void 0 : i[Dt];
608
- if (Ce <= 2 && Fe) {
609
- let Ie = 100;
610
- if (Ce === 2 && Di(V)) {
611
- const ks = V[1] - V[0];
612
- Ie = Math.abs(ks);
606
+ const T = (V, S, A, F = 0, v = 0) => {
607
+ const x = Wi(V), { delay: O = 0, times: z = le(x), type: Nt = "keyframes", ...Qs } = S;
608
+ let { ease: Fe = t.ease || "easeOut", duration: L } = S;
609
+ const Oe = typeof O == "function" ? O(F, v) : O, De = x.length, Be = pt(Nt) ? Nt : i == null ? void 0 : i[Nt];
610
+ if (De <= 2 && Be) {
611
+ let Ne = 100;
612
+ if (De === 2 && ki(x)) {
613
+ const ti = x[1] - x[0];
614
+ Ne = Math.abs(ti);
613
615
  }
614
- const Be = { ...Gs };
615
- I !== void 0 && (Be.duration = C(I));
616
- const Le = Wn(Be, Ie, Fe);
617
- Me = Le.ease, I = Le.duration;
616
+ const $e = { ...Qs };
617
+ L !== void 0 && ($e.duration = P(L));
618
+ const Ke = Xn($e, Ne, Be);
619
+ Fe = Ke.ease, L = Ke.duration;
618
620
  }
619
- I ?? (I = r);
620
- const Oe = f + Pe, De = Oe + I;
621
- G.length === 1 && G[0] === 0 && (G[1] = 1);
622
- const Re = G.length - V.length;
623
- Re > 0 && _n(G, Re), V.length === 1 && V.unshift(null), Ai(A, V, Me, G, Oe, De), y = Math.max(Pe + I, y), h = Math.max(De, h);
621
+ L ?? (L = r);
622
+ const Re = f + Oe, Ie = Re + L;
623
+ z.length === 1 && z[0] === 0 && (z[1] = 1);
624
+ const Le = z.length - x.length;
625
+ Le > 0 && Zn(z, Le), x.length === 1 && x.unshift(null), Li(A, x, Fe, z, Re, Ie), y = Math.max(Oe + L, y), h = Math.max(Ie, h);
624
626
  };
625
- if (P(w)) {
626
- const x = Ge(w, a);
627
- S(b, g, ke("default", x));
627
+ if (C(w)) {
628
+ const V = je(w, a);
629
+ T(b, g, Ue("default", V));
628
630
  } else {
629
- const x = Gn(w, b, s, l), T = x.length;
630
- for (let A = 0; A < T; A++) {
631
+ const V = Jn(w, b, s, l), S = V.length;
632
+ for (let A = 0; A < S; A++) {
631
633
  b = b, g = g;
632
- const F = x[A], v = Ge(F, a);
633
- for (const V in b)
634
- S(b[V], Fi(g, V), ke(V, v), A, T);
634
+ const F = V[A], v = je(F, a);
635
+ for (const x in b)
636
+ T(b[x], _i(g, x), Ue(x, v), A, S);
635
637
  }
636
638
  }
637
639
  c = f, f += y;
@@ -639,43 +641,43 @@ function Pi(e, { defaultTransition: t = {}, ...n } = {}, s, i) {
639
641
  return a.forEach((p, m) => {
640
642
  for (const w in p) {
641
643
  const b = p[w];
642
- b.sort(Ei);
643
- const g = [], y = [], S = [];
644
- for (let T = 0; T < b.length; T++) {
645
- const { at: A, value: F, easing: v } = b[T];
646
- g.push(F), y.push(ft(0, h, A)), S.push(v || "easeOut");
644
+ b.sort(Ni);
645
+ const g = [], y = [], T = [];
646
+ for (let S = 0; S < b.length; S++) {
647
+ const { at: A, value: F, easing: v } = b[S];
648
+ g.push(F), y.push(dt(0, h, A)), T.push(v || "easeOut");
647
649
  }
648
- y[0] !== 0 && (y.unshift(0), g.unshift(g[0]), S.unshift(Mi)), y[y.length - 1] !== 1 && (y.push(1), g.push(null)), o.has(m) || o.set(m, {
650
+ y[0] !== 0 && (y.unshift(0), g.unshift(g[0]), T.unshift($i)), y[y.length - 1] !== 1 && (y.push(1), g.push(null)), o.has(m) || o.set(m, {
649
651
  keyframes: {},
650
652
  transition: {}
651
653
  });
652
- const x = o.get(m);
653
- x.keyframes[w] = g, x.transition[w] = {
654
+ const V = o.get(m);
655
+ V.keyframes[w] = g, V.transition[w] = {
654
656
  ...t,
655
657
  duration: h,
656
- ease: S,
658
+ ease: T,
657
659
  times: y,
658
660
  ...n
659
661
  };
660
662
  }
661
663
  }), o;
662
664
  }
663
- function Ge(e, t) {
665
+ function je(e, t) {
664
666
  return !t.has(e) && t.set(e, {}), t.get(e);
665
667
  }
666
- function ke(e, t) {
668
+ function Ue(e, t) {
667
669
  return t[e] || (t[e] = []), t[e];
668
670
  }
669
- function Ci(e) {
671
+ function Wi(e) {
670
672
  return Array.isArray(e) ? e : [e];
671
673
  }
672
- function Fi(e, t) {
674
+ function _i(e, t) {
673
675
  return e && e[t] ? {
674
676
  ...e,
675
677
  ...e[t]
676
678
  } : { ...e };
677
679
  }
678
- const Oi = (e) => typeof e == "number", Di = (e) => e.every(Oi), L = /* @__PURE__ */ new WeakMap(), dt = [
680
+ const Gi = (e) => typeof e == "number", ki = (e) => e.every(Gi), $ = /* @__PURE__ */ new WeakMap(), mt = [
679
681
  "transformPerspective",
680
682
  "x",
681
683
  "y",
@@ -693,93 +695,93 @@ const Oi = (e) => typeof e == "number", Di = (e) => e.every(Oi), L = /* @__PURE_
693
695
  "skew",
694
696
  "skewX",
695
697
  "skewY"
696
- ], U = new Set(dt), Ri = {
698
+ ], Y = new Set(mt), zi = {
697
699
  type: "spring",
698
700
  stiffness: 500,
699
701
  damping: 25,
700
702
  restSpeed: 10
701
- }, Ii = (e) => ({
703
+ }, ji = (e) => ({
702
704
  type: "spring",
703
705
  stiffness: 550,
704
706
  damping: e === 0 ? 2 * Math.sqrt(550) : 30,
705
707
  restSpeed: 10
706
- }), Bi = {
708
+ }), Ui = {
707
709
  type: "keyframes",
708
710
  duration: 0.8
709
- }, Li = {
711
+ }, Hi = {
710
712
  type: "keyframes",
711
713
  ease: [0.25, 0.1, 0.35, 1],
712
714
  duration: 0.3
713
- }, Ni = (e, { keyframes: t }) => t.length > 2 ? Bi : U.has(e) ? e.startsWith("scale") ? Ii(t[1]) : Ri : Li;
714
- function ae(e, t) {
715
+ }, Yi = (e, { keyframes: t }) => t.length > 2 ? Ui : Y.has(e) ? e.startsWith("scale") ? ji(t[1]) : zi : Hi;
716
+ function ce(e, t) {
715
717
  return e ? e[t] || e.default || e : void 0;
716
718
  }
717
- const $i = (e) => e !== null;
718
- function pt(e, { repeat: t, repeatType: n = "loop" }, s) {
719
- const i = e.filter($i), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
719
+ const qi = (e) => e !== null;
720
+ function gt(e, { repeat: t, repeatType: n = "loop" }, s) {
721
+ const i = e.filter(qi), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
720
722
  return !r || s === void 0 ? i[r] : s;
721
723
  }
722
- const zn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Ki = 1e-7, Wi = 12;
723
- function _i(e, t, n, s, i) {
724
+ const ts = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Xi = 1e-7, Zi = 12;
725
+ function Ji(e, t, n, s, i) {
724
726
  let r, o, a = 0;
725
727
  do
726
- o = t + (n - t) / 2, r = zn(o, s, i) - e, r > 0 ? n = o : t = o;
727
- while (Math.abs(r) > Ki && ++a < Wi);
728
+ o = t + (n - t) / 2, r = ts(o, s, i) - e, r > 0 ? n = o : t = o;
729
+ while (Math.abs(r) > Xi && ++a < Zi);
728
730
  return o;
729
731
  }
730
- function mt(e, t, n, s) {
732
+ function yt(e, t, n, s) {
731
733
  if (e === t && n === s)
732
- return N;
733
- const i = (r) => _i(r, 0, 1, e, n);
734
- return (r) => r === 0 || r === 1 ? r : zn(i(r), t, s);
734
+ return K;
735
+ const i = (r) => Ji(r, 0, 1, e, n);
736
+ return (r) => r === 0 || r === 1 ? r : ts(i(r), t, s);
735
737
  }
736
- const jn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Un = (e) => (t) => 1 - e(1 - t), Hn = /* @__PURE__ */ mt(0.33, 1.53, 0.69, 0.99), le = /* @__PURE__ */ Un(Hn), qn = /* @__PURE__ */ jn(le), Yn = (e) => (e *= 2) < 1 ? 0.5 * le(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), ue = (e) => 1 - Math.sin(Math.acos(e)), Gi = Un(ue), Xn = jn(ue), Zn = (e) => /^0[^.\s]+$/u.test(e);
737
- function ki(e) {
738
- return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Zn(e) : !0;
738
+ const es = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, ns = (e) => (t) => 1 - e(1 - t), ss = /* @__PURE__ */ yt(0.33, 1.53, 0.69, 0.99), fe = /* @__PURE__ */ ns(ss), is = /* @__PURE__ */ es(fe), rs = (e) => (e *= 2) < 1 ? 0.5 * fe(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), he = (e) => 1 - Math.sin(Math.acos(e)), Qi = ns(he), os = es(he), as = (e) => /^0[^.\s]+$/u.test(e);
739
+ function tr(e) {
740
+ return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || as(e) : !0;
739
741
  }
740
- const Qn = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e), Jn = (e) => (t) => typeof t == "string" && t.startsWith(e), ts = /* @__PURE__ */ Jn("--"), zi = /* @__PURE__ */ Jn("var(--"), ce = (e) => zi(e) ? ji.test(e.split("/*")[0].trim()) : !1, ji = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Ui = (
742
+ const ls = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e), us = (e) => (t) => typeof t == "string" && t.startsWith(e), cs = /* @__PURE__ */ us("--"), er = /* @__PURE__ */ us("var(--"), de = (e) => er(e) ? nr.test(e.split("/*")[0].trim()) : !1, nr = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, sr = (
741
743
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
742
744
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
743
745
  );
744
- function Hi(e) {
745
- const t = Ui.exec(e);
746
+ function ir(e) {
747
+ const t = sr.exec(e);
746
748
  if (!t)
747
749
  return [,];
748
750
  const [, n, s, i] = t;
749
751
  return [`--${n ?? s}`, i];
750
752
  }
751
- const qi = 4;
752
- function es(e, t, n = 1) {
753
- R(n <= qi, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
754
- const [s, i] = Hi(e);
753
+ const rr = 4;
754
+ function fs(e, t, n = 1) {
755
+ I(n <= rr, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
756
+ const [s, i] = ir(e);
755
757
  if (!s)
756
758
  return;
757
759
  const r = window.getComputedStyle(t).getPropertyValue(s);
758
760
  if (r) {
759
761
  const o = r.trim();
760
- return Qn(o) ? parseFloat(o) : o;
762
+ return ls(o) ? parseFloat(o) : o;
761
763
  }
762
- return ce(i) ? es(i, t, n + 1) : i;
764
+ return de(i) ? fs(i, t, n + 1) : i;
763
765
  }
764
- const X = {
766
+ const Q = {
765
767
  test: (e) => typeof e == "number",
766
768
  parse: parseFloat,
767
769
  transform: (e) => e
768
- }, rt = {
769
- ...X,
770
- transform: (e) => j(0, 1, e)
771
- }, yt = {
772
- ...X,
770
+ }, ot = {
771
+ ...Q,
772
+ transform: (e) => H(0, 1, e)
773
+ }, bt = {
774
+ ...Q,
773
775
  default: 1
774
- }, gt = (e) => ({
776
+ }, vt = (e) => ({
775
777
  test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
776
778
  parse: parseFloat,
777
779
  transform: (t) => `${t}${e}`
778
- }), $ = /* @__PURE__ */ gt("deg"), q = /* @__PURE__ */ gt("%"), d = /* @__PURE__ */ gt("px"), Yi = /* @__PURE__ */ gt("vh"), Xi = /* @__PURE__ */ gt("vw"), ze = {
779
- ...q,
780
- parse: (e) => q.parse(e) / 100,
781
- transform: (e) => q.transform(e * 100)
782
- }, Zi = /* @__PURE__ */ new Set([
780
+ }), W = /* @__PURE__ */ vt("deg"), X = /* @__PURE__ */ vt("%"), d = /* @__PURE__ */ vt("px"), or = /* @__PURE__ */ vt("vh"), ar = /* @__PURE__ */ vt("vw"), He = {
781
+ ...X,
782
+ parse: (e) => X.parse(e) / 100,
783
+ transform: (e) => X.transform(e * 100)
784
+ }, lr = /* @__PURE__ */ new Set([
783
785
  "width",
784
786
  "height",
785
787
  "top",
@@ -790,25 +792,25 @@ const X = {
790
792
  "y",
791
793
  "translateX",
792
794
  "translateY"
793
- ]), je = (e) => e === X || e === d, Ue = (e, t) => parseFloat(e.split(", ")[t]), He = (e, t) => (n, { transform: s }) => {
795
+ ]), Ye = (e) => e === Q || e === d, qe = (e, t) => parseFloat(e.split(", ")[t]), Xe = (e, t) => (n, { transform: s }) => {
794
796
  if (s === "none" || !s)
795
797
  return 0;
796
798
  const i = s.match(/^matrix3d\((.+)\)$/u);
797
799
  if (i)
798
- return Ue(i[1], t);
800
+ return qe(i[1], t);
799
801
  {
800
802
  const r = s.match(/^matrix\((.+)\)$/u);
801
- return r ? Ue(r[1], e) : 0;
803
+ return r ? qe(r[1], e) : 0;
802
804
  }
803
- }, Qi = /* @__PURE__ */ new Set(["x", "y", "z"]), Ji = dt.filter((e) => !Qi.has(e));
804
- function tr(e) {
805
+ }, ur = /* @__PURE__ */ new Set(["x", "y", "z"]), cr = mt.filter((e) => !ur.has(e));
806
+ function fr(e) {
805
807
  const t = [];
806
- return Ji.forEach((n) => {
808
+ return cr.forEach((n) => {
807
809
  const s = e.getValue(n);
808
810
  s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
809
811
  }), t;
810
812
  }
811
- const Y = {
813
+ const J = {
812
814
  // Dimensions
813
815
  width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
814
816
  height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
@@ -817,21 +819,21 @@ const Y = {
817
819
  bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
818
820
  right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
819
821
  // Transform
820
- x: He(4, 13),
821
- y: He(5, 14)
822
+ x: Xe(4, 13),
823
+ y: Xe(5, 14)
822
824
  };
823
- Y.translateX = Y.x;
824
- Y.translateY = Y.y;
825
- const ns = (e) => (t) => t.test(e), er = {
825
+ J.translateX = J.x;
826
+ J.translateY = J.y;
827
+ const hs = (e) => (t) => t.test(e), hr = {
826
828
  test: (e) => e === "auto",
827
829
  parse: (e) => e
828
- }, ss = [X, d, q, $, Xi, Yi, er], qe = (e) => ss.find(ns(e)), z = /* @__PURE__ */ new Set();
829
- let kt = !1, zt = !1;
830
- function is() {
831
- if (zt) {
832
- const e = Array.from(z).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
830
+ }, ds = [Q, d, X, W, ar, or, hr], Ze = (e) => ds.find(hs(e)), U = /* @__PURE__ */ new Set();
831
+ let Ht = !1, Yt = !1;
832
+ function ps() {
833
+ if (Yt) {
834
+ const e = Array.from(U).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
833
835
  t.forEach((s) => {
834
- const i = tr(s);
836
+ const i = fr(s);
835
837
  i.length && (n.set(s, i), s.render());
836
838
  }), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
837
839
  s.render();
@@ -844,22 +846,22 @@ function is() {
844
846
  s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
845
847
  });
846
848
  }
847
- zt = !1, kt = !1, z.forEach((e) => e.complete()), z.clear();
849
+ Yt = !1, Ht = !1, U.forEach((e) => e.complete()), U.clear();
848
850
  }
849
- function rs() {
850
- z.forEach((e) => {
851
- e.readKeyframes(), e.needsMeasurement && (zt = !0);
851
+ function ms() {
852
+ U.forEach((e) => {
853
+ e.readKeyframes(), e.needsMeasurement && (Yt = !0);
852
854
  });
853
855
  }
854
- function nr() {
855
- rs(), is();
856
+ function dr() {
857
+ ms(), ps();
856
858
  }
857
- class fe {
859
+ class pe {
858
860
  constructor(t, n, s, i, r, o = !1) {
859
861
  this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
860
862
  }
861
863
  scheduleResolve() {
862
- this.isScheduled = !0, this.isAsync ? (z.add(this), kt || (kt = !0, M.read(rs), M.resolveKeyframes(is))) : (this.readKeyframes(), this.complete());
864
+ this.isScheduled = !0, this.isAsync ? (U.add(this), Ht || (Ht = !0, E.read(ms), E.resolveKeyframes(ps))) : (this.readKeyframes(), this.complete());
863
865
  }
864
866
  readKeyframes() {
865
867
  const { unresolvedKeyframes: t, name: n, element: s, motionValue: i } = this;
@@ -886,38 +888,38 @@ class fe {
886
888
  measureEndState() {
887
889
  }
888
890
  complete() {
889
- this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe), z.delete(this);
891
+ this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe), U.delete(this);
890
892
  }
891
893
  cancel() {
892
- this.isComplete || (this.isScheduled = !1, z.delete(this));
894
+ this.isComplete || (this.isScheduled = !1, U.delete(this));
893
895
  }
894
896
  resume() {
895
897
  this.isComplete || this.scheduleResolve();
896
898
  }
897
899
  }
898
- const et = (e) => Math.round(e * 1e5) / 1e5, he = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
899
- function sr(e) {
900
+ const it = (e) => Math.round(e * 1e5) / 1e5, me = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
901
+ function pr(e) {
900
902
  return e == null;
901
903
  }
902
- const ir = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, de = (e, t) => (n) => !!(typeof n == "string" && ir.test(n) && n.startsWith(e) || t && !sr(n) && Object.prototype.hasOwnProperty.call(n, t)), os = (e, t, n) => (s) => {
904
+ const mr = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, ge = (e, t) => (n) => !!(typeof n == "string" && mr.test(n) && n.startsWith(e) || t && !pr(n) && Object.prototype.hasOwnProperty.call(n, t)), gs = (e, t, n) => (s) => {
903
905
  if (typeof s != "string")
904
906
  return s;
905
- const [i, r, o, a] = s.match(he);
907
+ const [i, r, o, a] = s.match(me);
906
908
  return {
907
909
  [e]: parseFloat(i),
908
910
  [t]: parseFloat(r),
909
911
  [n]: parseFloat(o),
910
912
  alpha: a !== void 0 ? parseFloat(a) : 1
911
913
  };
912
- }, rr = (e) => j(0, 255, e), Bt = {
913
- ...X,
914
- transform: (e) => Math.round(rr(e))
915
- }, k = {
916
- test: /* @__PURE__ */ de("rgb", "red"),
917
- parse: /* @__PURE__ */ os("red", "green", "blue"),
918
- transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Bt.transform(e) + ", " + Bt.transform(t) + ", " + Bt.transform(n) + ", " + et(rt.transform(s)) + ")"
914
+ }, gr = (e) => H(0, 255, e), Wt = {
915
+ ...Q,
916
+ transform: (e) => Math.round(gr(e))
917
+ }, j = {
918
+ test: /* @__PURE__ */ ge("rgb", "red"),
919
+ parse: /* @__PURE__ */ gs("red", "green", "blue"),
920
+ transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Wt.transform(e) + ", " + Wt.transform(t) + ", " + Wt.transform(n) + ", " + it(ot.transform(s)) + ")"
919
921
  };
920
- function or(e) {
922
+ function yr(e) {
921
923
  let t = "", n = "", s = "", i = "";
922
924
  return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, s += s, i += i), {
923
925
  red: parseInt(t, 16),
@@ -926,78 +928,78 @@ function or(e) {
926
928
  alpha: i ? parseInt(i, 16) / 255 : 1
927
929
  };
928
930
  }
929
- const jt = {
930
- test: /* @__PURE__ */ de("#"),
931
- parse: or,
932
- transform: k.transform
933
- }, H = {
934
- test: /* @__PURE__ */ de("hsl", "hue"),
935
- parse: /* @__PURE__ */ os("hue", "saturation", "lightness"),
936
- transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + q.transform(et(t)) + ", " + q.transform(et(n)) + ", " + et(rt.transform(s)) + ")"
937
- }, E = {
938
- test: (e) => k.test(e) || jt.test(e) || H.test(e),
939
- parse: (e) => k.test(e) ? k.parse(e) : H.test(e) ? H.parse(e) : jt.parse(e),
940
- transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? k.transform(e) : H.transform(e)
941
- }, ar = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
942
- function lr(e) {
931
+ const qt = {
932
+ test: /* @__PURE__ */ ge("#"),
933
+ parse: yr,
934
+ transform: j.transform
935
+ }, q = {
936
+ test: /* @__PURE__ */ ge("hsl", "hue"),
937
+ parse: /* @__PURE__ */ gs("hue", "saturation", "lightness"),
938
+ transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + X.transform(it(t)) + ", " + X.transform(it(n)) + ", " + it(ot.transform(s)) + ")"
939
+ }, M = {
940
+ test: (e) => j.test(e) || qt.test(e) || q.test(e),
941
+ parse: (e) => j.test(e) ? j.parse(e) : q.test(e) ? q.parse(e) : qt.parse(e),
942
+ transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? j.transform(e) : q.transform(e)
943
+ }, vr = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
944
+ function br(e) {
943
945
  var t, n;
944
- return isNaN(e) && typeof e == "string" && (((t = e.match(he)) === null || t === void 0 ? void 0 : t.length) || 0) + (((n = e.match(ar)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
946
+ return isNaN(e) && typeof e == "string" && (((t = e.match(me)) === null || t === void 0 ? void 0 : t.length) || 0) + (((n = e.match(vr)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
945
947
  }
946
- const as = "number", ls = "color", ur = "var", cr = "var(", Ye = "${}", fr = /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;
947
- function ot(e) {
948
+ const ys = "number", vs = "color", wr = "var", Sr = "var(", Je = "${}", Tr = /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;
949
+ function at(e) {
948
950
  const t = e.toString(), n = [], s = {
949
951
  color: [],
950
952
  number: [],
951
953
  var: []
952
954
  }, i = [];
953
955
  let r = 0;
954
- const a = t.replace(fr, (l) => (E.test(l) ? (s.color.push(r), i.push(ls), n.push(E.parse(l))) : l.startsWith(cr) ? (s.var.push(r), i.push(ur), n.push(l)) : (s.number.push(r), i.push(as), n.push(parseFloat(l))), ++r, Ye)).split(Ye);
956
+ const a = t.replace(Tr, (l) => (M.test(l) ? (s.color.push(r), i.push(vs), n.push(M.parse(l))) : l.startsWith(Sr) ? (s.var.push(r), i.push(wr), n.push(l)) : (s.number.push(r), i.push(ys), n.push(parseFloat(l))), ++r, Je)).split(Je);
955
957
  return { values: n, split: a, indexes: s, types: i };
956
958
  }
957
- function us(e) {
958
- return ot(e).values;
959
+ function bs(e) {
960
+ return at(e).values;
959
961
  }
960
- function cs(e) {
961
- const { split: t, types: n } = ot(e), s = t.length;
962
+ function ws(e) {
963
+ const { split: t, types: n } = at(e), s = t.length;
962
964
  return (i) => {
963
965
  let r = "";
964
966
  for (let o = 0; o < s; o++)
965
967
  if (r += t[o], i[o] !== void 0) {
966
968
  const a = n[o];
967
- a === as ? r += et(i[o]) : a === ls ? r += E.transform(i[o]) : r += i[o];
969
+ a === ys ? r += it(i[o]) : a === vs ? r += M.transform(i[o]) : r += i[o];
968
970
  }
969
971
  return r;
970
972
  };
971
973
  }
972
- const hr = (e) => typeof e == "number" ? 0 : e;
973
- function dr(e) {
974
- const t = us(e);
975
- return cs(e)(t.map(hr));
976
- }
977
- const Z = {
978
- test: lr,
979
- parse: us,
980
- createTransformer: cs,
981
- getAnimatableNone: dr
982
- }, pr = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
983
- function mr(e) {
974
+ const Vr = (e) => typeof e == "number" ? 0 : e;
975
+ function xr(e) {
976
+ const t = bs(e);
977
+ return ws(e)(t.map(Vr));
978
+ }
979
+ const tt = {
980
+ test: br,
981
+ parse: bs,
982
+ createTransformer: ws,
983
+ getAnimatableNone: xr
984
+ }, Ar = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
985
+ function Er(e) {
984
986
  const [t, n] = e.slice(0, -1).split("(");
985
987
  if (t === "drop-shadow")
986
988
  return e;
987
- const [s] = n.match(he) || [];
989
+ const [s] = n.match(me) || [];
988
990
  if (!s)
989
991
  return e;
990
992
  const i = n.replace(s, "");
991
- let r = pr.has(t) ? 1 : 0;
993
+ let r = Ar.has(t) ? 1 : 0;
992
994
  return s !== n && (r *= 100), t + "(" + r + i + ")";
993
995
  }
994
- const gr = /\b([a-z-]*)\(.*?\)/gu, Ut = {
995
- ...Z,
996
+ const Mr = /\b([a-z-]*)\(.*?\)/gu, Xt = {
997
+ ...tt,
996
998
  getAnimatableNone: (e) => {
997
- const t = e.match(gr);
998
- return t ? t.map(mr).join(" ") : e;
999
+ const t = e.match(Mr);
1000
+ return t ? t.map(Er).join(" ") : e;
999
1001
  }
1000
- }, Ht = {
1002
+ }, Zt = {
1001
1003
  // Border props
1002
1004
  borderWidth: d,
1003
1005
  borderTopWidth: d,
@@ -1033,18 +1035,18 @@ const gr = /\b([a-z-]*)\(.*?\)/gu, Ut = {
1033
1035
  // Misc
1034
1036
  backgroundPositionX: d,
1035
1037
  backgroundPositionY: d
1036
- }, yr = {
1037
- rotate: $,
1038
- rotateX: $,
1039
- rotateY: $,
1040
- rotateZ: $,
1041
- scale: yt,
1042
- scaleX: yt,
1043
- scaleY: yt,
1044
- scaleZ: yt,
1045
- skew: $,
1046
- skewX: $,
1047
- skewY: $,
1038
+ }, Cr = {
1039
+ rotate: W,
1040
+ rotateX: W,
1041
+ rotateY: W,
1042
+ rotateZ: W,
1043
+ scale: bt,
1044
+ scaleX: bt,
1045
+ scaleY: bt,
1046
+ scaleZ: bt,
1047
+ skew: W,
1048
+ skewX: W,
1049
+ skewY: W,
1048
1050
  distance: d,
1049
1051
  translateX: d,
1050
1052
  translateY: d,
@@ -1054,55 +1056,55 @@ const gr = /\b([a-z-]*)\(.*?\)/gu, Ut = {
1054
1056
  z: d,
1055
1057
  perspective: d,
1056
1058
  transformPerspective: d,
1057
- opacity: rt,
1058
- originX: ze,
1059
- originY: ze,
1059
+ opacity: ot,
1060
+ originX: He,
1061
+ originY: He,
1060
1062
  originZ: d
1061
- }, Xe = {
1062
- ...X,
1063
+ }, Qe = {
1064
+ ...Q,
1063
1065
  transform: Math.round
1064
- }, pe = {
1065
- ...Ht,
1066
- ...yr,
1067
- zIndex: Xe,
1066
+ }, ye = {
1067
+ ...Zt,
1068
+ ...Cr,
1069
+ zIndex: Qe,
1068
1070
  size: d,
1069
1071
  // SVG
1070
- fillOpacity: rt,
1071
- strokeOpacity: rt,
1072
- numOctaves: Xe
1073
- }, vr = {
1074
- ...pe,
1072
+ fillOpacity: ot,
1073
+ strokeOpacity: ot,
1074
+ numOctaves: Qe
1075
+ }, Pr = {
1076
+ ...ye,
1075
1077
  // Color props
1076
- color: E,
1077
- backgroundColor: E,
1078
- outlineColor: E,
1079
- fill: E,
1080
- stroke: E,
1078
+ color: M,
1079
+ backgroundColor: M,
1080
+ outlineColor: M,
1081
+ fill: M,
1082
+ stroke: M,
1081
1083
  // Border props
1082
- borderColor: E,
1083
- borderTopColor: E,
1084
- borderRightColor: E,
1085
- borderBottomColor: E,
1086
- borderLeftColor: E,
1087
- filter: Ut,
1088
- WebkitFilter: Ut
1089
- }, me = (e) => vr[e];
1090
- function fs(e, t) {
1091
- let n = me(e);
1092
- return n !== Ut && (n = Z), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1093
- }
1094
- const br = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1095
- function wr(e, t, n) {
1084
+ borderColor: M,
1085
+ borderTopColor: M,
1086
+ borderRightColor: M,
1087
+ borderBottomColor: M,
1088
+ borderLeftColor: M,
1089
+ filter: Xt,
1090
+ WebkitFilter: Xt
1091
+ }, ve = (e) => Pr[e];
1092
+ function Ss(e, t) {
1093
+ let n = ve(e);
1094
+ return n !== Xt && (n = tt), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1095
+ }
1096
+ const Fr = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1097
+ function Or(e, t, n) {
1096
1098
  let s = 0, i;
1097
1099
  for (; s < e.length && !i; ) {
1098
1100
  const r = e[s];
1099
- typeof r == "string" && !br.has(r) && ot(r).values.length && (i = e[s]), s++;
1101
+ typeof r == "string" && !Fr.has(r) && at(r).values.length && (i = e[s]), s++;
1100
1102
  }
1101
1103
  if (i && n)
1102
1104
  for (const r of t)
1103
- e[r] = fs(n, i);
1105
+ e[r] = Ss(n, i);
1104
1106
  }
1105
- class hs extends fe {
1107
+ class Ts extends pe {
1106
1108
  constructor(t, n, s, i, r) {
1107
1109
  super(t, n, s, i, r, !0);
1108
1110
  }
@@ -1113,16 +1115,16 @@ class hs extends fe {
1113
1115
  super.readKeyframes();
1114
1116
  for (let l = 0; l < t.length; l++) {
1115
1117
  let u = t[l];
1116
- if (typeof u == "string" && (u = u.trim(), ce(u))) {
1117
- const c = es(u, n.current);
1118
+ if (typeof u == "string" && (u = u.trim(), de(u))) {
1119
+ const c = fs(u, n.current);
1118
1120
  c !== void 0 && (t[l] = c), l === t.length - 1 && (this.finalKeyframe = u);
1119
1121
  }
1120
1122
  }
1121
- if (this.resolveNoneKeyframes(), !Zi.has(s) || t.length !== 2)
1123
+ if (this.resolveNoneKeyframes(), !lr.has(s) || t.length !== 2)
1122
1124
  return;
1123
- const [i, r] = t, o = qe(i), a = qe(r);
1125
+ const [i, r] = t, o = Ze(i), a = Ze(r);
1124
1126
  if (o !== a)
1125
- if (je(o) && je(a))
1127
+ if (Ye(o) && Ye(a))
1126
1128
  for (let l = 0; l < t.length; l++) {
1127
1129
  const u = t[l];
1128
1130
  typeof u == "string" && (t[l] = parseFloat(u));
@@ -1133,14 +1135,14 @@ class hs extends fe {
1133
1135
  resolveNoneKeyframes() {
1134
1136
  const { unresolvedKeyframes: t, name: n } = this, s = [];
1135
1137
  for (let i = 0; i < t.length; i++)
1136
- ki(t[i]) && s.push(i);
1137
- s.length && wr(t, s, n);
1138
+ tr(t[i]) && s.push(i);
1139
+ s.length && Or(t, s, n);
1138
1140
  }
1139
1141
  measureInitialState() {
1140
1142
  const { element: t, unresolvedKeyframes: n, name: s } = this;
1141
1143
  if (!t || !t.current)
1142
1144
  return;
1143
- s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = Y[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
1145
+ s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = J[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
1144
1146
  const i = n[n.length - 1];
1145
1147
  i !== void 0 && t.getValue(s, i).jump(i, !1);
1146
1148
  }
@@ -1152,15 +1154,15 @@ class hs extends fe {
1152
1154
  const r = n.getValue(s);
1153
1155
  r && r.jump(this.measuredOrigin, !1);
1154
1156
  const o = i.length - 1, a = i[o];
1155
- i[o] = Y[s](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((t = this.removedTransforms) === null || t === void 0) && t.length && this.removedTransforms.forEach(([l, u]) => {
1157
+ i[o] = J[s](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((t = this.removedTransforms) === null || t === void 0) && t.length && this.removedTransforms.forEach(([l, u]) => {
1156
1158
  n.getValue(l).set(u);
1157
1159
  }), this.resolveNoneKeyframes();
1158
1160
  }
1159
1161
  }
1160
- const Ze = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1161
- (Z.test(e) || e === "0") && // And it contains numbers and/or colors
1162
+ const tn = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1163
+ (tt.test(e) || e === "0") && // And it contains numbers and/or colors
1162
1164
  !e.startsWith("url("));
1163
- function Tr(e) {
1165
+ function Dr(e) {
1164
1166
  const t = e[0];
1165
1167
  if (e.length === 1)
1166
1168
  return !0;
@@ -1168,19 +1170,19 @@ function Tr(e) {
1168
1170
  if (e[n] !== t)
1169
1171
  return !0;
1170
1172
  }
1171
- function Sr(e, t, n, s) {
1173
+ function Br(e, t, n, s) {
1172
1174
  const i = e[0];
1173
1175
  if (i === null)
1174
1176
  return !1;
1175
1177
  if (t === "display" || t === "visibility")
1176
1178
  return !0;
1177
- const r = e[e.length - 1], o = Ze(i, t), a = Ze(r, t);
1178
- return ut(o === a, `You are trying to animate ${t} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !o || !a ? !1 : Tr(e) || (n === "spring" || ht(n)) && s;
1179
+ const r = e[e.length - 1], o = tn(i, t), a = tn(r, t);
1180
+ return ft(o === a, `You are trying to animate ${t} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !o || !a ? !1 : Dr(e) || (n === "spring" || pt(n)) && s;
1179
1181
  }
1180
- const xr = 40;
1181
- class ds {
1182
+ const Rr = 40;
1183
+ class Vs {
1182
1184
  constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", ...a }) {
1183
- this.isStopped = !1, this.hasAttemptedResolve = !1, this.createdAt = B.now(), this.options = {
1185
+ this.isStopped = !1, this.hasAttemptedResolve = !1, this.createdAt = N.now(), this.options = {
1184
1186
  autoplay: t,
1185
1187
  delay: n,
1186
1188
  type: s,
@@ -1201,7 +1203,7 @@ class ds {
1201
1203
  * to avoid a sudden jump into the animation.
1202
1204
  */
1203
1205
  calcStartTime() {
1204
- return this.resolvedAt ? this.resolvedAt - this.createdAt > xr ? this.resolvedAt : this.createdAt : this.createdAt;
1206
+ return this.resolvedAt ? this.resolvedAt - this.createdAt > Rr ? this.resolvedAt : this.createdAt : this.createdAt;
1205
1207
  }
1206
1208
  /**
1207
1209
  * A getter for resolved data. If keyframes are not yet resolved, accessing
@@ -1209,7 +1211,7 @@ class ds {
1209
1211
  * This is a deoptimisation, but at its worst still batches read/writes.
1210
1212
  */
1211
1213
  get resolved() {
1212
- return !this._resolved && !this.hasAttemptedResolve && nr(), this._resolved;
1214
+ return !this._resolved && !this.hasAttemptedResolve && dr(), this._resolved;
1213
1215
  }
1214
1216
  /**
1215
1217
  * A method to be called when the keyframes resolver completes. This method
@@ -1217,13 +1219,13 @@ class ds {
1217
1219
  * Otherwise, it will call initPlayback on the implementing class.
1218
1220
  */
1219
1221
  onKeyframesResolved(t, n) {
1220
- this.resolvedAt = B.now(), this.hasAttemptedResolve = !0;
1222
+ this.resolvedAt = N.now(), this.hasAttemptedResolve = !0;
1221
1223
  const { name: s, type: i, velocity: r, delay: o, onComplete: a, onUpdate: l, isGenerator: u } = this.options;
1222
- if (!u && !Sr(t, s, i, r))
1224
+ if (!u && !Br(t, s, i, r))
1223
1225
  if (o)
1224
1226
  this.options.duration = 0;
1225
1227
  else {
1226
- l == null || l(pt(t, this.options, n)), a == null || a(), this.resolveFinishedPromise();
1228
+ l == null || l(gt(t, this.options, n)), a == null || a(), this.resolveFinishedPromise();
1227
1229
  return;
1228
1230
  }
1229
1231
  const c = this.initPlayback(t, n);
@@ -1249,7 +1251,7 @@ class ds {
1249
1251
  });
1250
1252
  }
1251
1253
  }
1252
- function Qe({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
1254
+ function en({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
1253
1255
  const f = e[0], h = {
1254
1256
  done: !1,
1255
1257
  value: f
@@ -1257,15 +1259,15 @@ function Qe({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
1257
1259
  let w = n * t;
1258
1260
  const b = f + w, g = o === void 0 ? b : o(b);
1259
1261
  g !== b && (w = g - f);
1260
- const y = (v) => -w * Math.exp(-v / s), S = (v) => g + y(v), x = (v) => {
1261
- const V = y(v), O = S(v);
1262
- h.done = Math.abs(V) <= u, h.value = h.done ? g : O;
1262
+ const y = (v) => -w * Math.exp(-v / s), T = (v) => g + y(v), V = (v) => {
1263
+ const x = y(v), O = T(v);
1264
+ h.done = Math.abs(x) <= u, h.value = h.done ? g : O;
1263
1265
  };
1264
- let T, A;
1266
+ let S, A;
1265
1267
  const F = (v) => {
1266
- p(h.value) && (T = v, A = ie({
1268
+ p(h.value) && (S = v, A = ae({
1267
1269
  keyframes: [h.value, m(h.value)],
1268
- velocity: $n(S, v, h.value),
1270
+ velocity: Yn(T, v, h.value),
1269
1271
  // TODO: This should be passing * 1000
1270
1272
  damping: i,
1271
1273
  stiffness: r,
@@ -1276,43 +1278,43 @@ function Qe({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
1276
1278
  return F(0), {
1277
1279
  calculatedDuration: null,
1278
1280
  next: (v) => {
1279
- let V = !1;
1280
- return !A && T === void 0 && (V = !0, x(v), F(v)), T !== void 0 && v >= T ? A.next(v - T) : (!V && x(v), h);
1281
+ let x = !1;
1282
+ return !A && S === void 0 && (x = !0, V(v), F(v)), S !== void 0 && v >= S ? A.next(v - S) : (!x && V(v), h);
1281
1283
  }
1282
1284
  };
1283
1285
  }
1284
- const Vr = /* @__PURE__ */ mt(0.42, 0, 1, 1), Ar = /* @__PURE__ */ mt(0, 0, 0.58, 1), ps = /* @__PURE__ */ mt(0.42, 0, 0.58, 1), ge = (e) => Array.isArray(e) && typeof e[0] == "number", Je = {
1285
- linear: N,
1286
- easeIn: Vr,
1287
- easeInOut: ps,
1288
- easeOut: Ar,
1289
- circIn: ue,
1290
- circInOut: Xn,
1291
- circOut: Gi,
1292
- backIn: le,
1293
- backInOut: qn,
1294
- backOut: Hn,
1295
- anticipate: Yn
1296
- }, qt = (e) => {
1297
- if (ge(e)) {
1298
- R(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
1286
+ const Ir = /* @__PURE__ */ yt(0.42, 0, 1, 1), Lr = /* @__PURE__ */ yt(0, 0, 0.58, 1), xs = /* @__PURE__ */ yt(0.42, 0, 0.58, 1), be = (e) => Array.isArray(e) && typeof e[0] == "number", nn = {
1287
+ linear: K,
1288
+ easeIn: Ir,
1289
+ easeInOut: xs,
1290
+ easeOut: Lr,
1291
+ circIn: he,
1292
+ circInOut: os,
1293
+ circOut: Qi,
1294
+ backIn: fe,
1295
+ backInOut: is,
1296
+ backOut: ss,
1297
+ anticipate: rs
1298
+ }, Jt = (e) => {
1299
+ if (be(e)) {
1300
+ I(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
1299
1301
  const [t, n, s, i] = e;
1300
- return mt(t, n, s, i);
1302
+ return yt(t, n, s, i);
1301
1303
  } else if (typeof e == "string")
1302
- return R(Je[e] !== void 0, `Invalid easing type '${e}'`), Je[e];
1304
+ return I(nn[e] !== void 0, `Invalid easing type '${e}'`), nn[e];
1303
1305
  return e;
1304
- }, Er = (e, t) => (n) => t(e(n)), ye = (...e) => e.reduce(Er);
1305
- function Lt(e, t, n) {
1306
+ }, Nr = (e, t) => (n) => t(e(n)), we = (...e) => e.reduce(Nr);
1307
+ function _t(e, t, n) {
1306
1308
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
1307
1309
  }
1308
- function Mr({ hue: e, saturation: t, lightness: n, alpha: s }) {
1310
+ function $r({ hue: e, saturation: t, lightness: n, alpha: s }) {
1309
1311
  e /= 360, t /= 100, n /= 100;
1310
1312
  let i = 0, r = 0, o = 0;
1311
1313
  if (!t)
1312
1314
  i = r = o = n;
1313
1315
  else {
1314
1316
  const a = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - a;
1315
- i = Lt(l, a, e + 1 / 3), r = Lt(l, a, e), o = Lt(l, a, e - 1 / 3);
1317
+ i = _t(l, a, e + 1 / 3), r = _t(l, a, e), o = _t(l, a, e - 1 / 3);
1316
1318
  }
1317
1319
  return {
1318
1320
  red: Math.round(i * 255),
@@ -1321,55 +1323,55 @@ function Mr({ hue: e, saturation: t, lightness: n, alpha: s }) {
1321
1323
  alpha: s
1322
1324
  };
1323
1325
  }
1324
- function St(e, t) {
1326
+ function At(e, t) {
1325
1327
  return (n) => n > 0 ? t : e;
1326
1328
  }
1327
- const Nt = (e, t, n) => {
1329
+ const Gt = (e, t, n) => {
1328
1330
  const s = e * e, i = n * (t * t - s) + s;
1329
1331
  return i < 0 ? 0 : Math.sqrt(i);
1330
- }, Pr = [jt, k, H], Cr = (e) => Pr.find((t) => t.test(e));
1331
- function tn(e) {
1332
- const t = Cr(e);
1333
- if (ut(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`), !t)
1332
+ }, Kr = [qt, j, q], Wr = (e) => Kr.find((t) => t.test(e));
1333
+ function sn(e) {
1334
+ const t = Wr(e);
1335
+ if (ft(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`), !t)
1334
1336
  return !1;
1335
1337
  let n = t.parse(e);
1336
- return t === H && (n = Mr(n)), n;
1338
+ return t === q && (n = $r(n)), n;
1337
1339
  }
1338
- const en = (e, t) => {
1339
- const n = tn(e), s = tn(t);
1340
+ const rn = (e, t) => {
1341
+ const n = sn(e), s = sn(t);
1340
1342
  if (!n || !s)
1341
- return St(e, t);
1343
+ return At(e, t);
1342
1344
  const i = { ...n };
1343
- return (r) => (i.red = Nt(n.red, s.red, r), i.green = Nt(n.green, s.green, r), i.blue = Nt(n.blue, s.blue, r), i.alpha = ct(n.alpha, s.alpha, r), k.transform(i));
1344
- }, Yt = /* @__PURE__ */ new Set(["none", "hidden"]);
1345
- function Fr(e, t) {
1346
- return Yt.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
1345
+ return (r) => (i.red = Gt(n.red, s.red, r), i.green = Gt(n.green, s.green, r), i.blue = Gt(n.blue, s.blue, r), i.alpha = ht(n.alpha, s.alpha, r), j.transform(i));
1346
+ }, Qt = /* @__PURE__ */ new Set(["none", "hidden"]);
1347
+ function _r(e, t) {
1348
+ return Qt.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
1347
1349
  }
1348
- function Or(e, t) {
1349
- return (n) => ct(e, t, n);
1350
+ function Gr(e, t) {
1351
+ return (n) => ht(e, t, n);
1350
1352
  }
1351
- function ve(e) {
1352
- return typeof e == "number" ? Or : typeof e == "string" ? ce(e) ? St : E.test(e) ? en : Ir : Array.isArray(e) ? ms : typeof e == "object" ? E.test(e) ? en : Dr : St;
1353
+ function Se(e) {
1354
+ return typeof e == "number" ? Gr : typeof e == "string" ? de(e) ? At : M.test(e) ? rn : jr : Array.isArray(e) ? As : typeof e == "object" ? M.test(e) ? rn : kr : At;
1353
1355
  }
1354
- function ms(e, t) {
1355
- const n = [...e], s = n.length, i = e.map((r, o) => ve(r)(r, t[o]));
1356
+ function As(e, t) {
1357
+ const n = [...e], s = n.length, i = e.map((r, o) => Se(r)(r, t[o]));
1356
1358
  return (r) => {
1357
1359
  for (let o = 0; o < s; o++)
1358
1360
  n[o] = i[o](r);
1359
1361
  return n;
1360
1362
  };
1361
1363
  }
1362
- function Dr(e, t) {
1364
+ function kr(e, t) {
1363
1365
  const n = { ...e, ...t }, s = {};
1364
1366
  for (const i in n)
1365
- e[i] !== void 0 && t[i] !== void 0 && (s[i] = ve(e[i])(e[i], t[i]));
1367
+ e[i] !== void 0 && t[i] !== void 0 && (s[i] = Se(e[i])(e[i], t[i]));
1366
1368
  return (i) => {
1367
1369
  for (const r in s)
1368
1370
  n[r] = s[r](i);
1369
1371
  return n;
1370
1372
  };
1371
1373
  }
1372
- function Rr(e, t) {
1374
+ function zr(e, t) {
1373
1375
  var n;
1374
1376
  const s = [], i = { color: 0, var: 0, number: 0 };
1375
1377
  for (let r = 0; r < t.values.length; r++) {
@@ -1378,84 +1380,84 @@ function Rr(e, t) {
1378
1380
  }
1379
1381
  return s;
1380
1382
  }
1381
- const Ir = (e, t) => {
1382
- const n = Z.createTransformer(t), s = ot(e), i = ot(t);
1383
- 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 ? Yt.has(e) && !i.values.length || Yt.has(t) && !s.values.length ? Fr(e, t) : ye(ms(Rr(s, i), i.values), n) : (ut(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), St(e, t));
1383
+ const jr = (e, t) => {
1384
+ const n = tt.createTransformer(t), s = at(e), i = at(t);
1385
+ 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 ? Qt.has(e) && !i.values.length || Qt.has(t) && !s.values.length ? _r(e, t) : we(As(zr(s, i), i.values), n) : (ft(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), At(e, t));
1384
1386
  };
1385
- function gs(e, t, n) {
1386
- return typeof e == "number" && typeof t == "number" && typeof n == "number" ? ct(e, t, n) : ve(e)(e, t);
1387
+ function Es(e, t, n) {
1388
+ return typeof e == "number" && typeof t == "number" && typeof n == "number" ? ht(e, t, n) : Se(e)(e, t);
1387
1389
  }
1388
- function Br(e, t, n) {
1389
- const s = [], i = n || gs, r = e.length - 1;
1390
+ function Ur(e, t, n) {
1391
+ const s = [], i = n || Es, r = e.length - 1;
1390
1392
  for (let o = 0; o < r; o++) {
1391
1393
  let a = i(e[o], e[o + 1]);
1392
1394
  if (t) {
1393
- const l = Array.isArray(t) ? t[o] || N : t;
1394
- a = ye(l, a);
1395
+ const l = Array.isArray(t) ? t[o] || K : t;
1396
+ a = we(l, a);
1395
1397
  }
1396
1398
  s.push(a);
1397
1399
  }
1398
1400
  return s;
1399
1401
  }
1400
- function be(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
1402
+ function Te(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
1401
1403
  const r = e.length;
1402
- if (R(r === t.length, "Both input and output ranges must be the same length"), r === 1)
1404
+ if (I(r === t.length, "Both input and output ranges must be the same length"), r === 1)
1403
1405
  return () => t[0];
1404
1406
  if (r === 2 && e[0] === e[1])
1405
1407
  return () => t[1];
1406
1408
  e[0] > e[r - 1] && (e = [...e].reverse(), t = [...t].reverse());
1407
- const o = Br(t, s, i), a = o.length, l = (u) => {
1409
+ const o = Ur(t, s, i), a = o.length, l = (u) => {
1408
1410
  let c = 0;
1409
1411
  if (a > 1)
1410
1412
  for (; c < e.length - 2 && !(u < e[c + 1]); c++)
1411
1413
  ;
1412
- const f = ft(e[c], e[c + 1], u);
1414
+ const f = dt(e[c], e[c + 1], u);
1413
1415
  return o[c](f);
1414
1416
  };
1415
- return n ? (u) => l(j(e[0], e[r - 1], u)) : l;
1417
+ return n ? (u) => l(H(e[0], e[r - 1], u)) : l;
1416
1418
  }
1417
- function Lr(e, t) {
1419
+ function Hr(e, t) {
1418
1420
  return e.map((n) => n * t);
1419
1421
  }
1420
- function Nr(e, t) {
1421
- return e.map(() => t || ps).splice(0, e.length - 1);
1422
+ function Yr(e, t) {
1423
+ return e.map(() => t || xs).splice(0, e.length - 1);
1422
1424
  }
1423
- function xt({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
1424
- const i = kn(s) ? s.map(qt) : qt(s), r = {
1425
+ function Et({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
1426
+ const i = Qn(s) ? s.map(Jt) : Jt(s), r = {
1425
1427
  done: !1,
1426
1428
  value: t[0]
1427
- }, o = Lr(
1429
+ }, o = Hr(
1428
1430
  // Only use the provided offsets if they're the correct length
1429
1431
  // TODO Maybe we should warn here if there's a length mismatch
1430
- n && n.length === t.length ? n : re(t),
1432
+ n && n.length === t.length ? n : le(t),
1431
1433
  e
1432
- ), a = be(o, t, {
1433
- ease: Array.isArray(i) ? i : Nr(t, i)
1434
+ ), a = Te(o, t, {
1435
+ ease: Array.isArray(i) ? i : Yr(t, i)
1434
1436
  });
1435
1437
  return {
1436
1438
  calculatedDuration: e,
1437
1439
  next: (l) => (r.value = a(l), r.done = l >= e, r)
1438
1440
  };
1439
1441
  }
1440
- const $r = (e) => {
1442
+ const qr = (e) => {
1441
1443
  const t = ({ timestamp: n }) => e(n);
1442
1444
  return {
1443
- start: () => M.update(t, !0),
1444
- stop: () => _(t),
1445
+ start: () => E.update(t, !0),
1446
+ stop: () => R(t),
1445
1447
  /**
1446
1448
  * If we're processing this frame we can use the
1447
1449
  * framelocked timestamp to keep things in sync.
1448
1450
  */
1449
- now: () => st.isProcessing ? st.timestamp : B.now()
1451
+ now: () => Z.isProcessing ? Z.timestamp : N.now()
1450
1452
  };
1451
- }, Kr = {
1452
- decay: Qe,
1453
- inertia: Qe,
1454
- tween: xt,
1455
- keyframes: xt,
1456
- spring: ie
1457
- }, Wr = (e) => e / 100;
1458
- class we extends ds {
1453
+ }, Xr = {
1454
+ decay: en,
1455
+ inertia: en,
1456
+ tween: Et,
1457
+ keyframes: Et,
1458
+ spring: ae
1459
+ }, Zr = (e) => e / 100;
1460
+ class Lt extends Vs {
1459
1461
  constructor(t) {
1460
1462
  super(t), this.holdTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.startTime = null, this.state = "idle", this.stop = () => {
1461
1463
  if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle")
@@ -1464,19 +1466,19 @@ class we extends ds {
1464
1466
  const { onStop: l } = this.options;
1465
1467
  l && l();
1466
1468
  };
1467
- const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = (i == null ? void 0 : i.KeyframeResolver) || fe, a = (l, u) => this.onKeyframesResolved(l, u);
1469
+ const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = (i == null ? void 0 : i.KeyframeResolver) || pe, a = (l, u) => this.onKeyframesResolved(l, u);
1468
1470
  this.resolver = new o(r, a, n, s, i), this.resolver.scheduleResolve();
1469
1471
  }
1470
1472
  initPlayback(t) {
1471
- const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a = ht(n) ? n : Kr[n] || xt;
1473
+ const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a = pt(n) ? n : Xr[n] || Et;
1472
1474
  let l, u;
1473
- a !== xt && typeof t[0] != "number" && (process.env.NODE_ENV !== "production" && R(t.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`), l = ye(Wr, gs(t[0], t[1])), t = [0, 100]);
1475
+ a !== Et && typeof t[0] != "number" && (process.env.NODE_ENV !== "production" && I(t.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`), l = we(Zr, Es(t[0], t[1])), t = [0, 100]);
1474
1476
  const c = a({ ...this.options, keyframes: t });
1475
1477
  r === "mirror" && (u = a({
1476
1478
  ...this.options,
1477
1479
  keyframes: [...t].reverse(),
1478
1480
  velocity: -o
1479
- })), c.calculatedDuration === null && (c.calculatedDuration = Kn(c));
1481
+ })), c.calculatedDuration === null && (c.calculatedDuration = qn(c));
1480
1482
  const { calculatedDuration: f } = c, h = f + i, p = h * (s + 1) - i;
1481
1483
  return {
1482
1484
  generator: c,
@@ -1504,35 +1506,35 @@ class we extends ds {
1504
1506
  this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - c / this.speed, this.startTime)), n ? this.currentTime = t : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(t - this.startTime) * this.speed;
1505
1507
  const g = this.currentTime - h * (this.speed >= 0 ? 1 : -1), y = this.speed >= 0 ? g < 0 : g > c;
1506
1508
  this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = c);
1507
- let S = this.currentTime, x = r;
1509
+ let T = this.currentTime, V = r;
1508
1510
  if (p) {
1509
1511
  const v = Math.min(this.currentTime, c) / f;
1510
- let V = Math.floor(v), O = v % 1;
1511
- !O && v >= 1 && (O = 1), O === 1 && V--, V = Math.min(V, p + 1), !!(V % 2) && (m === "reverse" ? (O = 1 - O, w && (O -= w / f)) : m === "mirror" && (x = o)), S = j(0, 1, O) * f;
1512
+ let x = Math.floor(v), O = v % 1;
1513
+ !O && v >= 1 && (O = 1), O === 1 && x--, x = Math.min(x, p + 1), !!(x % 2) && (m === "reverse" ? (O = 1 - O, w && (O -= w / f)) : m === "mirror" && (V = o)), T = H(0, 1, O) * f;
1512
1514
  }
1513
- const T = y ? { done: !1, value: l[0] } : x.next(S);
1514
- a && (T.value = a(T.value));
1515
- let { done: A } = T;
1515
+ const S = y ? { done: !1, value: l[0] } : V.next(T);
1516
+ a && (S.value = a(S.value));
1517
+ let { done: A } = S;
1516
1518
  !y && u !== null && (A = this.speed >= 0 ? this.currentTime >= c : this.currentTime <= 0);
1517
1519
  const F = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
1518
- return F && i !== void 0 && (T.value = pt(l, this.options, i)), b && b(T.value), F && this.finish(), T;
1520
+ return F && i !== void 0 && (S.value = gt(l, this.options, i)), b && b(S.value), F && this.finish(), S;
1519
1521
  }
1520
1522
  get duration() {
1521
1523
  const { resolved: t } = this;
1522
- return t ? D(t.calculatedDuration) : 0;
1524
+ return t ? B(t.calculatedDuration) : 0;
1523
1525
  }
1524
1526
  get time() {
1525
- return D(this.currentTime);
1527
+ return B(this.currentTime);
1526
1528
  }
1527
1529
  set time(t) {
1528
- t = C(t), this.currentTime = t, this.holdTime !== null || this.speed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.speed);
1530
+ t = P(t), this.currentTime = t, this.holdTime !== null || this.speed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.speed);
1529
1531
  }
1530
1532
  get speed() {
1531
1533
  return this.playbackSpeed;
1532
1534
  }
1533
1535
  set speed(t) {
1534
1536
  const n = this.playbackSpeed !== t;
1535
- this.playbackSpeed = t, n && (this.time = D(this.currentTime));
1537
+ this.playbackSpeed = t, n && (this.time = B(this.currentTime));
1536
1538
  }
1537
1539
  play() {
1538
1540
  if (this.resolver.isScheduled || this.resolver.resume(), !this._resolved) {
@@ -1541,7 +1543,7 @@ class we extends ds {
1541
1543
  }
1542
1544
  if (this.isStopped)
1543
1545
  return;
1544
- const { driver: t = $r, onPlay: n, startTime: s } = this.options;
1546
+ const { driver: t = qr, onPlay: n, startTime: s } = this.options;
1545
1547
  this.driver || (this.driver = t((r) => this.tick(r))), n && n();
1546
1548
  const i = this.driver.now();
1547
1549
  this.holdTime !== null ? this.startTime = i - this.holdTime : this.startTime ? this.state === "finished" && (this.startTime = i) : this.startTime = s ?? this.calcStartTime(), this.state === "finished" && this.updateFinishedPromise(), this.cancelTime = this.startTime, this.holdTime = null, this.state = "running", this.driver.start();
@@ -1575,7 +1577,10 @@ class we extends ds {
1575
1577
  return this.startTime = 0, this.tick(t, !0);
1576
1578
  }
1577
1579
  }
1578
- const _r = /* @__PURE__ */ new Set([
1580
+ function Jr(e) {
1581
+ return new Lt(e);
1582
+ }
1583
+ const Qr = /* @__PURE__ */ new Set([
1579
1584
  "opacity",
1580
1585
  "clipPath",
1581
1586
  "filter",
@@ -1583,23 +1588,23 @@ const _r = /* @__PURE__ */ new Set([
1583
1588
  // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
1584
1589
  // or until we implement support for linear() easing.
1585
1590
  // "background-color"
1586
- ]), Gr = 10, kr = (e, t) => {
1591
+ ]), to = 10, eo = (e, t) => {
1587
1592
  let n = "";
1588
- const s = Math.max(Math.round(t / Gr), 2);
1593
+ const s = Math.max(Math.round(t / to), 2);
1589
1594
  for (let i = 0; i < s; i++)
1590
- n += e(ft(0, s - 1, i)) + ", ";
1595
+ n += e(dt(0, s - 1, i)) + ", ";
1591
1596
  return `linear(${n.substring(0, n.length - 2)})`;
1592
- }, zr = {
1597
+ }, no = {
1593
1598
  linearEasing: void 0
1594
1599
  };
1595
- function jr(e, t) {
1596
- const n = Ft(e);
1600
+ function so(e, t) {
1601
+ const n = Rt(e);
1597
1602
  return () => {
1598
1603
  var s;
1599
- return (s = zr[t]) !== null && s !== void 0 ? s : n();
1604
+ return (s = no[t]) !== null && s !== void 0 ? s : n();
1600
1605
  };
1601
1606
  }
1602
- const at = /* @__PURE__ */ jr(() => {
1607
+ const lt = /* @__PURE__ */ so(() => {
1603
1608
  try {
1604
1609
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1605
1610
  } catch {
@@ -1607,28 +1612,28 @@ const at = /* @__PURE__ */ jr(() => {
1607
1612
  }
1608
1613
  return !0;
1609
1614
  }, "linearEasing");
1610
- function ys(e) {
1611
- return !!(typeof e == "function" && at() || !e || typeof e == "string" && (e in Xt || at()) || ge(e) || Array.isArray(e) && e.every(ys));
1615
+ function Ms(e) {
1616
+ return !!(typeof e == "function" && lt() || !e || typeof e == "string" && (e in te || lt()) || be(e) || Array.isArray(e) && e.every(Ms));
1612
1617
  }
1613
- const tt = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, Xt = {
1618
+ const st = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, te = {
1614
1619
  linear: "linear",
1615
1620
  ease: "ease",
1616
1621
  easeIn: "ease-in",
1617
1622
  easeOut: "ease-out",
1618
1623
  easeInOut: "ease-in-out",
1619
- circIn: /* @__PURE__ */ tt([0, 0.65, 0.55, 1]),
1620
- circOut: /* @__PURE__ */ tt([0.55, 0, 1, 0.45]),
1621
- backIn: /* @__PURE__ */ tt([0.31, 0.01, 0.66, -0.59]),
1622
- backOut: /* @__PURE__ */ tt([0.33, 1.53, 0.69, 0.99])
1624
+ circIn: /* @__PURE__ */ st([0, 0.65, 0.55, 1]),
1625
+ circOut: /* @__PURE__ */ st([0.55, 0, 1, 0.45]),
1626
+ backIn: /* @__PURE__ */ st([0.31, 0.01, 0.66, -0.59]),
1627
+ backOut: /* @__PURE__ */ st([0.33, 1.53, 0.69, 0.99])
1623
1628
  };
1624
- function vs(e, t) {
1629
+ function Cs(e, t) {
1625
1630
  if (e)
1626
- return typeof e == "function" && at() ? kr(e, t) : ge(e) ? tt(e) : Array.isArray(e) ? e.map((n) => vs(n, t) || Xt.easeOut) : Xt[e];
1631
+ return typeof e == "function" && lt() ? eo(e, t) : be(e) ? st(e) : Array.isArray(e) ? e.map((n) => Cs(n, t) || te.easeOut) : te[e];
1627
1632
  }
1628
- function bs(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a, times: l } = {}) {
1633
+ function Ps(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a, times: l } = {}) {
1629
1634
  const u = { [t]: n };
1630
1635
  l && (u.offset = l);
1631
- const c = vs(a, i);
1636
+ const c = Cs(a, i);
1632
1637
  return Array.isArray(c) && (u.easing = c), e.animate(u, {
1633
1638
  delay: s,
1634
1639
  duration: i,
@@ -1638,15 +1643,15 @@ function bs(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatTyp
1638
1643
  direction: o === "reverse" ? "alternate" : "normal"
1639
1644
  });
1640
1645
  }
1641
- function Vt(e, t) {
1646
+ function Mt(e, t) {
1642
1647
  e.timeline = t, e.onfinish = null;
1643
1648
  }
1644
- const ws = /* @__PURE__ */ Ft(() => Object.hasOwnProperty.call(Element.prototype, "animate")), At = 10, Ur = 2e4;
1645
- function Hr(e) {
1646
- return ht(e.type) || e.type === "spring" || !ys(e.ease);
1649
+ const Fs = /* @__PURE__ */ Rt(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Ct = 10, io = 2e4;
1650
+ function ro(e) {
1651
+ return pt(e.type) || e.type === "spring" || !Ms(e.ease);
1647
1652
  }
1648
- function qr(e, t) {
1649
- const n = new we({
1653
+ function oo(e, t) {
1654
+ const n = new Lt({
1650
1655
  ...t,
1651
1656
  keyframes: e,
1652
1657
  repeat: 0,
@@ -1656,42 +1661,42 @@ function qr(e, t) {
1656
1661
  let s = { done: !1, value: e[0] };
1657
1662
  const i = [];
1658
1663
  let r = 0;
1659
- for (; !s.done && r < Ur; )
1660
- s = n.sample(r), i.push(s.value), r += At;
1664
+ for (; !s.done && r < io; )
1665
+ s = n.sample(r), i.push(s.value), r += Ct;
1661
1666
  return {
1662
1667
  times: void 0,
1663
1668
  keyframes: i,
1664
- duration: r - At,
1669
+ duration: r - Ct,
1665
1670
  ease: "linear"
1666
1671
  };
1667
1672
  }
1668
- const Ts = {
1669
- anticipate: Yn,
1670
- backInOut: qn,
1671
- circInOut: Xn
1673
+ const Os = {
1674
+ anticipate: rs,
1675
+ backInOut: is,
1676
+ circInOut: os
1672
1677
  };
1673
- function Yr(e) {
1674
- return e in Ts;
1678
+ function ao(e) {
1679
+ return e in Os;
1675
1680
  }
1676
- class nn extends ds {
1681
+ class on extends Vs {
1677
1682
  constructor(t) {
1678
1683
  super(t);
1679
1684
  const { name: n, motionValue: s, element: i, keyframes: r } = this.options;
1680
- this.resolver = new hs(r, (o, a) => this.onKeyframesResolved(o, a), n, s, i), this.resolver.scheduleResolve();
1685
+ this.resolver = new Ts(r, (o, a) => this.onKeyframesResolved(o, a), n, s, i), this.resolver.scheduleResolve();
1681
1686
  }
1682
1687
  initPlayback(t, n) {
1683
1688
  var s;
1684
1689
  let { duration: i = 300, times: r, ease: o, type: a, motionValue: l, name: u, startTime: c } = this.options;
1685
1690
  if (!(!((s = l.owner) === null || s === void 0) && s.current))
1686
1691
  return !1;
1687
- if (typeof o == "string" && at() && Yr(o) && (o = Ts[o]), Hr(this.options)) {
1688
- const { onComplete: h, onUpdate: p, motionValue: m, element: w, ...b } = this.options, g = qr(t, b);
1692
+ if (typeof o == "string" && lt() && ao(o) && (o = Os[o]), ro(this.options)) {
1693
+ const { onComplete: h, onUpdate: p, motionValue: m, element: w, ...b } = this.options, g = oo(t, b);
1689
1694
  t = g.keyframes, t.length === 1 && (t[1] = t[0]), i = g.duration, r = g.times, o = g.ease, a = "keyframes";
1690
1695
  }
1691
- const f = bs(l.owner.current, u, t, { ...this.options, duration: i, times: r, ease: o });
1692
- return f.startTime = c ?? this.calcStartTime(), this.pendingTimeline ? (Vt(f, this.pendingTimeline), this.pendingTimeline = void 0) : f.onfinish = () => {
1696
+ const f = Ps(l.owner.current, u, t, { ...this.options, duration: i, times: r, ease: o });
1697
+ return f.startTime = c ?? this.calcStartTime(), this.pendingTimeline ? (Mt(f, this.pendingTimeline), this.pendingTimeline = void 0) : f.onfinish = () => {
1693
1698
  const { onComplete: h } = this.options;
1694
- l.set(pt(t, this.options, n)), h && h(), this.cancel(), this.resolveFinishedPromise();
1699
+ l.set(gt(t, this.options, n)), h && h(), this.cancel(), this.resolveFinishedPromise();
1695
1700
  }, {
1696
1701
  animation: f,
1697
1702
  duration: i,
@@ -1706,21 +1711,21 @@ class nn extends ds {
1706
1711
  if (!t)
1707
1712
  return 0;
1708
1713
  const { duration: n } = t;
1709
- return D(n);
1714
+ return B(n);
1710
1715
  }
1711
1716
  get time() {
1712
1717
  const { resolved: t } = this;
1713
1718
  if (!t)
1714
1719
  return 0;
1715
1720
  const { animation: n } = t;
1716
- return D(n.currentTime || 0);
1721
+ return B(n.currentTime || 0);
1717
1722
  }
1718
1723
  set time(t) {
1719
1724
  const { resolved: n } = this;
1720
1725
  if (!n)
1721
1726
  return;
1722
1727
  const { animation: s } = n;
1723
- s.currentTime = C(t);
1728
+ s.currentTime = P(t);
1724
1729
  }
1725
1730
  get speed() {
1726
1731
  const { resolved: t } = this;
@@ -1760,11 +1765,11 @@ class nn extends ds {
1760
1765
  else {
1761
1766
  const { resolved: n } = this;
1762
1767
  if (!n)
1763
- return N;
1768
+ return K;
1764
1769
  const { animation: s } = n;
1765
- Vt(s, t);
1770
+ Mt(s, t);
1766
1771
  }
1767
- return N;
1772
+ return K;
1768
1773
  }
1769
1774
  play() {
1770
1775
  if (this.isStopped)
@@ -1793,7 +1798,7 @@ class nn extends ds {
1793
1798
  if (n.playState === "idle" || n.playState === "finished")
1794
1799
  return;
1795
1800
  if (this.time) {
1796
- const { motionValue: u, onUpdate: c, onComplete: f, element: h, ...p } = this.options, m = new we({
1801
+ const { motionValue: u, onUpdate: c, onComplete: f, element: h, ...p } = this.options, m = new Lt({
1797
1802
  ...p,
1798
1803
  keyframes: s,
1799
1804
  duration: i,
@@ -1801,8 +1806,8 @@ class nn extends ds {
1801
1806
  ease: o,
1802
1807
  times: a,
1803
1808
  isGenerator: !0
1804
- }), w = C(this.time);
1805
- u.setWithVelocity(m.sample(w - At).value, m.sample(w).value, At);
1809
+ }), w = P(this.time);
1810
+ u.setWithVelocity(m.sample(w - Ct).value, m.sample(w).value, Ct);
1806
1811
  }
1807
1812
  const { onStop: l } = this.options;
1808
1813
  l && l(), this.cancel();
@@ -1817,20 +1822,20 @@ class nn extends ds {
1817
1822
  }
1818
1823
  static supports(t) {
1819
1824
  const { motionValue: n, name: s, repeatDelay: i, repeatType: r, damping: o, type: a } = t;
1820
- return ws() && s && _r.has(s) && n && n.owner && n.owner.current instanceof HTMLElement && /**
1825
+ return Fs() && s && Qr.has(s) && n && n.owner && n.owner.current instanceof HTMLElement && /**
1821
1826
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
1822
1827
  * no way to read the value from WAAPI every frame.
1823
1828
  */
1824
1829
  !n.owner.getProps().onUpdate && !i && r !== "mirror" && o !== 0 && a !== "inertia";
1825
1830
  }
1826
1831
  }
1827
- function Xr({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: u, ...c }) {
1832
+ function lo({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: u, ...c }) {
1828
1833
  return !!Object.keys(c).length;
1829
1834
  }
1830
- const Ss = (e, t, n, s = {}, i, r) => (o) => {
1831
- const a = ae(s, e) || {}, l = a.delay || s.delay || 0;
1835
+ const Ds = (e, t, n, s = {}, i, r) => (o) => {
1836
+ const a = ce(s, e) || {}, l = a.delay || s.delay || 0;
1832
1837
  let { elapsed: u = 0 } = s;
1833
- u = u - C(l);
1838
+ u = u - P(l);
1834
1839
  let c = {
1835
1840
  keyframes: Array.isArray(n) ? n : [null, n],
1836
1841
  ease: "easeOut",
@@ -1847,139 +1852,139 @@ const Ss = (e, t, n, s = {}, i, r) => (o) => {
1847
1852
  motionValue: t,
1848
1853
  element: r ? void 0 : i
1849
1854
  };
1850
- Xr(a) || (c = {
1855
+ lo(a) || (c = {
1851
1856
  ...c,
1852
- ...Ni(e, c)
1853
- }), c.duration && (c.duration = C(c.duration)), c.repeatDelay && (c.repeatDelay = C(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
1857
+ ...Yi(e, c)
1858
+ }), c.duration && (c.duration = P(c.duration)), c.repeatDelay && (c.repeatDelay = P(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
1854
1859
  let f = !1;
1855
1860
  if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (f = !0)), f && !r && t.get() !== void 0) {
1856
- const h = pt(c.keyframes, a);
1861
+ const h = gt(c.keyframes, a);
1857
1862
  if (h !== void 0)
1858
- return M.update(() => {
1863
+ return E.update(() => {
1859
1864
  c.onUpdate(h), c.onComplete();
1860
- }), new se([]);
1865
+ }), new oe([]);
1861
1866
  }
1862
- return !r && nn.supports(c) ? new nn(c) : new we(c);
1863
- }, Zr = (e) => Array.isArray(e), Qr = (e) => Zr(e) ? e[e.length - 1] || 0 : e;
1864
- function sn(e) {
1867
+ return !r && on.supports(c) ? new on(c) : new Lt(c);
1868
+ }, uo = (e) => Array.isArray(e), co = (e) => uo(e) ? e[e.length - 1] || 0 : e;
1869
+ function an(e) {
1865
1870
  const t = [{}, {}];
1866
1871
  return e == null || e.values.forEach((n, s) => {
1867
1872
  t[0][s] = n.get(), t[1][s] = n.getVelocity();
1868
1873
  }), t;
1869
1874
  }
1870
- function xs(e, t, n, s) {
1875
+ function Bs(e, t, n, s) {
1871
1876
  if (typeof t == "function") {
1872
- const [i, r] = sn(s);
1877
+ const [i, r] = an(s);
1873
1878
  t = t(n !== void 0 ? n : e.custom, i, r);
1874
1879
  }
1875
1880
  if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
1876
- const [i, r] = sn(s);
1881
+ const [i, r] = an(s);
1877
1882
  t = t(n !== void 0 ? n : e.custom, i, r);
1878
1883
  }
1879
1884
  return t;
1880
1885
  }
1881
- function Jr(e, t, n) {
1886
+ function fo(e, t, n) {
1882
1887
  const s = e.getProps();
1883
- return xs(s, t, s.custom, e);
1888
+ return Bs(s, t, s.custom, e);
1884
1889
  }
1885
- function to(e, t, n) {
1886
- e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, it(n));
1890
+ function ho(e, t, n) {
1891
+ e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, D(n));
1887
1892
  }
1888
- function eo(e, t) {
1889
- const n = Jr(e, t);
1893
+ function po(e, t) {
1894
+ const n = fo(e, t);
1890
1895
  let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
1891
1896
  r = { ...r, ...s };
1892
1897
  for (const o in r) {
1893
- const a = Qr(r[o]);
1894
- to(e, o, a);
1898
+ const a = co(r[o]);
1899
+ ho(e, o, a);
1895
1900
  }
1896
1901
  }
1897
- const Te = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), no = "framerAppearId", so = "data-" + Te(no);
1898
- function io(e) {
1899
- return e.props[so];
1902
+ const Ve = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), mo = "framerAppearId", go = "data-" + Ve(mo);
1903
+ function yo(e) {
1904
+ return e.props[go];
1900
1905
  }
1901
- function ro(e) {
1902
- return !!(P(e) && e.add);
1906
+ function vo(e) {
1907
+ return !!(C(e) && e.add);
1903
1908
  }
1904
- function oo(e, t) {
1909
+ function bo(e, t) {
1905
1910
  const n = e.getValue("willChange");
1906
- if (ro(n))
1911
+ if (vo(n))
1907
1912
  return n.add(t);
1908
1913
  }
1909
- function ao({ protectedKeys: e, needsAnimating: t }, n) {
1914
+ function wo({ protectedKeys: e, needsAnimating: t }, n) {
1910
1915
  const s = e.hasOwnProperty(n) && t[n] !== !0;
1911
1916
  return t[n] = !1, s;
1912
1917
  }
1913
- function lo(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
1918
+ function So(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
1914
1919
  var r;
1915
1920
  let { transition: o = e.getDefaultTransition(), transitionEnd: a, ...l } = t;
1916
1921
  s && (o = s);
1917
1922
  const u = [], c = i && e.animationState && e.animationState.getState()[i];
1918
1923
  for (const f in l) {
1919
1924
  const h = e.getValue(f, (r = e.latestValues[f]) !== null && r !== void 0 ? r : null), p = l[f];
1920
- if (p === void 0 || c && ao(c, f))
1925
+ if (p === void 0 || c && wo(c, f))
1921
1926
  continue;
1922
1927
  const m = {
1923
1928
  delay: n,
1924
- ...ae(o || {}, f)
1929
+ ...ce(o || {}, f)
1925
1930
  };
1926
1931
  let w = !1;
1927
1932
  if (window.MotionHandoffAnimation) {
1928
- const g = io(e);
1933
+ const g = yo(e);
1929
1934
  if (g) {
1930
- const y = window.MotionHandoffAnimation(g, f, M);
1935
+ const y = window.MotionHandoffAnimation(g, f, E);
1931
1936
  y !== null && (m.startTime = y, w = !0);
1932
1937
  }
1933
1938
  }
1934
- oo(e, f), h.start(Ss(f, h, p, e.shouldReduceMotion && U.has(f) ? { type: !1 } : m, e, w));
1939
+ bo(e, f), h.start(Ds(f, h, p, e.shouldReduceMotion && Y.has(f) ? { type: !1 } : m, e, w));
1935
1940
  const b = h.animation;
1936
1941
  b && u.push(b);
1937
1942
  }
1938
1943
  return a && Promise.all(u).then(() => {
1939
- M.update(() => {
1940
- a && eo(e, a);
1944
+ E.update(() => {
1945
+ a && po(e, a);
1941
1946
  });
1942
1947
  }), u;
1943
1948
  }
1944
- function uo(e) {
1949
+ function To(e) {
1945
1950
  return e instanceof SVGElement && e.tagName !== "svg";
1946
1951
  }
1947
- const co = {};
1948
- function fo(e, { layout: t, layoutId: n }) {
1949
- return U.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!co[e] || e === "opacity");
1952
+ const Vo = {};
1953
+ function xo(e, { layout: t, layoutId: n }) {
1954
+ return Y.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!Vo[e] || e === "opacity");
1950
1955
  }
1951
- function Vs(e, t, n) {
1956
+ function Rs(e, t, n) {
1952
1957
  var s;
1953
1958
  const { style: i } = e, r = {};
1954
1959
  for (const o in i)
1955
- (P(i[o]) || t.style && P(t.style[o]) || fo(o, e) || ((s = n == null ? void 0 : n.getValue(o)) === null || s === void 0 ? void 0 : s.liveStyle) !== void 0) && (r[o] = i[o]);
1960
+ (C(i[o]) || t.style && C(t.style[o]) || xo(o, e) || ((s = n == null ? void 0 : n.getValue(o)) === null || s === void 0 ? void 0 : s.liveStyle) !== void 0) && (r[o] = i[o]);
1956
1961
  return r;
1957
1962
  }
1958
- function ho(e, t, n) {
1959
- const s = Vs(e, t, n);
1963
+ function Ao(e, t, n) {
1964
+ const s = Rs(e, t, n);
1960
1965
  for (const i in e)
1961
- if (P(e[i]) || P(t[i])) {
1962
- const r = dt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
1966
+ if (C(e[i]) || C(t[i])) {
1967
+ const r = mt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
1963
1968
  s[r] = e[i];
1964
1969
  }
1965
1970
  return s;
1966
1971
  }
1967
- const po = typeof window < "u", Zt = { current: null }, As = { current: !1 };
1968
- function mo() {
1969
- if (As.current = !0, !!po)
1972
+ const Eo = typeof window < "u", ee = { current: null }, Is = { current: !1 };
1973
+ function Mo() {
1974
+ if (Is.current = !0, !!Eo)
1970
1975
  if (window.matchMedia) {
1971
- const e = window.matchMedia("(prefers-reduced-motion)"), t = () => Zt.current = e.matches;
1976
+ const e = window.matchMedia("(prefers-reduced-motion)"), t = () => ee.current = e.matches;
1972
1977
  e.addListener(t), t();
1973
1978
  } else
1974
- Zt.current = !1;
1979
+ ee.current = !1;
1975
1980
  }
1976
- function go(e) {
1981
+ function Co(e) {
1977
1982
  return e !== null && typeof e == "object" && typeof e.start == "function";
1978
1983
  }
1979
- function yo(e) {
1984
+ function Po(e) {
1980
1985
  return typeof e == "string" || Array.isArray(e);
1981
1986
  }
1982
- const vo = [
1987
+ const Fo = [
1983
1988
  "animate",
1984
1989
  "whileInView",
1985
1990
  "whileFocus",
@@ -1987,34 +1992,34 @@ const vo = [
1987
1992
  "whileTap",
1988
1993
  "whileDrag",
1989
1994
  "exit"
1990
- ], bo = ["initial", ...vo];
1991
- function Es(e) {
1992
- return go(e.animate) || bo.some((t) => yo(e[t]));
1995
+ ], Oo = ["initial", ...Fo];
1996
+ function Ls(e) {
1997
+ return Co(e.animate) || Oo.some((t) => Po(e[t]));
1993
1998
  }
1994
- function wo(e) {
1995
- return !!(Es(e) || e.variants);
1999
+ function Do(e) {
2000
+ return !!(Ls(e) || e.variants);
1996
2001
  }
1997
- function To(e, t, n) {
2002
+ function Bo(e, t, n) {
1998
2003
  for (const s in t) {
1999
2004
  const i = t[s], r = n[s];
2000
- if (P(i))
2001
- e.addValue(s, i), process.env.NODE_ENV === "development" && Ct(i.version === "11.11.11", `Attempting to mix Framer Motion versions ${i.version} with 11.11.11 may not work as expected.`);
2002
- else if (P(r))
2003
- e.addValue(s, it(i, { owner: e }));
2005
+ if (C(i))
2006
+ e.addValue(s, i), process.env.NODE_ENV === "development" && Bt(i.version === "11.11.11", `Attempting to mix Framer Motion versions ${i.version} with 11.11.11 may not work as expected.`);
2007
+ else if (C(r))
2008
+ e.addValue(s, D(i, { owner: e }));
2004
2009
  else if (r !== i)
2005
2010
  if (e.hasValue(s)) {
2006
2011
  const o = e.getValue(s);
2007
2012
  o.liveStyle === !0 ? o.jump(i) : o.hasAnimated || o.set(i);
2008
2013
  } else {
2009
2014
  const o = e.getStaticValue(s);
2010
- e.addValue(s, it(o !== void 0 ? o : i, { owner: e }));
2015
+ e.addValue(s, D(o !== void 0 ? o : i, { owner: e }));
2011
2016
  }
2012
2017
  }
2013
2018
  for (const s in n)
2014
2019
  t[s] === void 0 && e.removeValue(s);
2015
2020
  return t;
2016
2021
  }
2017
- const rn = {
2022
+ const ln = {
2018
2023
  animation: [
2019
2024
  "animate",
2020
2025
  "variants",
@@ -2033,15 +2038,15 @@ const rn = {
2033
2038
  pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
2034
2039
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
2035
2040
  layout: ["layout", "layoutId"]
2036
- }, Qt = {};
2037
- for (const e in rn)
2038
- Qt[e] = {
2039
- isEnabled: (t) => rn[e].some((n) => !!t[n])
2041
+ }, ne = {};
2042
+ for (const e in ln)
2043
+ ne[e] = {
2044
+ isEnabled: (t) => ln[e].some((n) => !!t[n])
2040
2045
  };
2041
- const So = [...ss, E, Z], xo = (e) => So.find(ns(e)), on = () => ({ min: 0, max: 0 }), Se = () => ({
2042
- x: on(),
2043
- y: on()
2044
- }), an = [
2046
+ const Ro = [...ds, M, tt], Io = (e) => Ro.find(hs(e)), un = () => ({ min: 0, max: 0 }), xe = () => ({
2047
+ x: un(),
2048
+ y: un()
2049
+ }), cn = [
2045
2050
  "AnimationStart",
2046
2051
  "AnimationComplete",
2047
2052
  "Update",
@@ -2050,7 +2055,7 @@ const So = [...ss, E, Z], xo = (e) => So.find(ns(e)), on = () => ({ min: 0, max:
2050
2055
  "LayoutAnimationStart",
2051
2056
  "LayoutAnimationComplete"
2052
2057
  ];
2053
- class Ms {
2058
+ class Ns {
2054
2059
  /**
2055
2060
  * This method takes React props and returns found MotionValues. For example, HTML
2056
2061
  * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
@@ -2062,25 +2067,25 @@ class Ms {
2062
2067
  return {};
2063
2068
  }
2064
2069
  constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: o }, a = {}) {
2065
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = fe, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2070
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = pe, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2066
2071
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2067
2072
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2068
- const h = B.now();
2069
- this.renderScheduledAt < h && (this.renderScheduledAt = h, M.render(this.render, !1, !0));
2073
+ const h = N.now();
2074
+ this.renderScheduledAt < h && (this.renderScheduledAt = h, E.render(this.render, !1, !0));
2070
2075
  };
2071
2076
  const { latestValues: l, renderState: u } = o;
2072
- this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = Es(n), this.isVariantNode = wo(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2077
+ this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = Ls(n), this.isVariantNode = Do(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2073
2078
  const { willChange: c, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
2074
2079
  for (const h in f) {
2075
2080
  const p = f[h];
2076
- l[h] !== void 0 && P(p) && p.set(l[h], !1);
2081
+ l[h] !== void 0 && C(p) && p.set(l[h], !1);
2077
2082
  }
2078
2083
  }
2079
2084
  mount(t) {
2080
- this.current = t, L.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), As.current || mo(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Zt.current, process.env.NODE_ENV !== "production" && Ct(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
2085
+ this.current = t, $.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Is.current || Mo(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : ee.current, process.env.NODE_ENV !== "production" && Bt(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
2081
2086
  }
2082
2087
  unmount() {
2083
- L.delete(this.current), this.projection && this.projection.unmount(), _(this.notifyUpdate), _(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
2088
+ $.delete(this.current), this.projection && this.projection.unmount(), R(this.notifyUpdate), R(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
2084
2089
  for (const t in this.events)
2085
2090
  this.events[t].clear();
2086
2091
  for (const t in this.features) {
@@ -2091,8 +2096,8 @@ class Ms {
2091
2096
  }
2092
2097
  bindToMotionValue(t, n) {
2093
2098
  this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
2094
- const s = U.has(t), i = n.on("change", (a) => {
2095
- this.latestValues[t] = a, this.props.onUpdate && M.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
2099
+ const s = Y.has(t), i = n.on("change", (a) => {
2100
+ this.latestValues[t] = a, this.props.onUpdate && E.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
2096
2101
  }), r = n.on("renderRequest", this.scheduleRender);
2097
2102
  let o;
2098
2103
  window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
@@ -2104,8 +2109,8 @@ class Ms {
2104
2109
  }
2105
2110
  updateFeatures() {
2106
2111
  let t = "animation";
2107
- for (t in Qt) {
2108
- const n = Qt[t];
2112
+ for (t in ne) {
2113
+ const n = ne[t];
2109
2114
  if (!n)
2110
2115
  continue;
2111
2116
  const { isEnabled: s, Feature: i } = n;
@@ -2124,7 +2129,7 @@ class Ms {
2124
2129
  * removed with a re-render to work.
2125
2130
  */
2126
2131
  measureViewportBox() {
2127
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Se();
2132
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : xe();
2128
2133
  }
2129
2134
  getStaticValue(t) {
2130
2135
  return this.latestValues[t];
@@ -2138,13 +2143,13 @@ class Ms {
2138
2143
  */
2139
2144
  update(t, n) {
2140
2145
  (t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
2141
- for (let s = 0; s < an.length; s++) {
2142
- const i = an[s];
2146
+ for (let s = 0; s < cn.length; s++) {
2147
+ const i = cn[s];
2143
2148
  this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
2144
2149
  const r = "on" + i, o = t[r];
2145
2150
  o && (this.propEventSubscriptions[i] = this.on(i, o));
2146
2151
  }
2147
- this.prevMotionValues = To(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2152
+ this.prevMotionValues = Bo(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2148
2153
  }
2149
2154
  getProps() {
2150
2155
  return this.props;
@@ -2200,7 +2205,7 @@ class Ms {
2200
2205
  if (this.props.values && this.props.values[t])
2201
2206
  return this.props.values[t];
2202
2207
  let s = this.values.get(t);
2203
- return s === void 0 && n !== void 0 && (s = it(n === null ? void 0 : n, { owner: this }), this.addValue(t, s)), s;
2208
+ return s === void 0 && n !== void 0 && (s = D(n === null ? void 0 : n, { owner: this }), this.addValue(t, s)), s;
2204
2209
  }
2205
2210
  /**
2206
2211
  * If we're trying to animate to a previously unencountered value,
@@ -2210,7 +2215,7 @@ class Ms {
2210
2215
  readValue(t, n) {
2211
2216
  var s;
2212
2217
  let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : (s = this.getBaseTargetFromProps(this.props, t)) !== null && s !== void 0 ? s : this.readValueFromInstance(this.current, t, this.options);
2213
- return i != null && (typeof i == "string" && (Qn(i) || Zn(i)) ? i = parseFloat(i) : !xo(i) && Z.test(n) && (i = fs(t, n)), this.setBaseTarget(t, P(i) ? i.get() : i)), P(i) ? i.get() : i;
2218
+ return i != null && (typeof i == "string" && (ls(i) || as(i)) ? i = parseFloat(i) : !Io(i) && tt.test(n) && (i = Ss(t, n)), this.setBaseTarget(t, C(i) ? i.get() : i)), C(i) ? i.get() : i;
2214
2219
  }
2215
2220
  /**
2216
2221
  * Set the base target to later animate back to. This is currently
@@ -2228,24 +2233,24 @@ class Ms {
2228
2233
  const { initial: s } = this.props;
2229
2234
  let i;
2230
2235
  if (typeof s == "string" || typeof s == "object") {
2231
- const o = xs(this.props, s, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
2236
+ const o = Bs(this.props, s, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
2232
2237
  o && (i = o[t]);
2233
2238
  }
2234
2239
  if (s && i !== void 0)
2235
2240
  return i;
2236
2241
  const r = this.getBaseTargetFromProps(this.props, t);
2237
- return r !== void 0 && !P(r) ? r : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
2242
+ return r !== void 0 && !C(r) ? r : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
2238
2243
  }
2239
2244
  on(t, n) {
2240
- return this.events[t] || (this.events[t] = new Ln()), this.events[t].add(n);
2245
+ return this.events[t] || (this.events[t] = new Un()), this.events[t].add(n);
2241
2246
  }
2242
2247
  notify(t, ...n) {
2243
2248
  this.events[t] && this.events[t].notify(...n);
2244
2249
  }
2245
2250
  }
2246
- class Ps extends Ms {
2251
+ class $s extends Ns {
2247
2252
  constructor() {
2248
- super(...arguments), this.KeyframeResolver = hs;
2253
+ super(...arguments), this.KeyframeResolver = Ts;
2249
2254
  }
2250
2255
  sortInstanceNodePosition(t, n) {
2251
2256
  return t.compareDocumentPosition(n) & 2 ? 1 : -1;
@@ -2257,24 +2262,24 @@ class Ps extends Ms {
2257
2262
  delete n[t], delete s[t];
2258
2263
  }
2259
2264
  }
2260
- const Cs = (e, t) => t && typeof e == "number" ? t.transform(e) : e, Vo = {
2265
+ const Ks = (e, t) => t && typeof e == "number" ? t.transform(e) : e, Lo = {
2261
2266
  x: "translateX",
2262
2267
  y: "translateY",
2263
2268
  z: "translateZ",
2264
2269
  transformPerspective: "perspective"
2265
- }, Ao = dt.length;
2266
- function Eo(e, t, n) {
2270
+ }, No = mt.length;
2271
+ function $o(e, t, n) {
2267
2272
  let s = "", i = !0;
2268
- for (let r = 0; r < Ao; r++) {
2269
- const o = dt[r], a = e[o];
2273
+ for (let r = 0; r < No; r++) {
2274
+ const o = mt[r], a = e[o];
2270
2275
  if (a === void 0)
2271
2276
  continue;
2272
2277
  let l = !0;
2273
2278
  if (typeof a == "number" ? l = a === (o.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
2274
- const u = Cs(a, pe[o]);
2279
+ const u = Ks(a, ye[o]);
2275
2280
  if (!l) {
2276
2281
  i = !1;
2277
- const c = Vo[o] || o;
2282
+ const c = Lo[o] || o;
2278
2283
  s += `${c}(${u}) `;
2279
2284
  }
2280
2285
  n && (t[o] = u);
@@ -2282,49 +2287,49 @@ function Eo(e, t, n) {
2282
2287
  }
2283
2288
  return s = s.trim(), n ? s = n(t, i ? "" : s) : i && (s = "none"), s;
2284
2289
  }
2285
- function Fs(e, t, n) {
2290
+ function Ws(e, t, n) {
2286
2291
  const { style: s, vars: i, transformOrigin: r } = e;
2287
2292
  let o = !1, a = !1;
2288
2293
  for (const l in t) {
2289
2294
  const u = t[l];
2290
- if (U.has(l)) {
2295
+ if (Y.has(l)) {
2291
2296
  o = !0;
2292
2297
  continue;
2293
- } else if (ts(l)) {
2298
+ } else if (cs(l)) {
2294
2299
  i[l] = u;
2295
2300
  continue;
2296
2301
  } else {
2297
- const c = Cs(u, pe[l]);
2302
+ const c = Ks(u, ye[l]);
2298
2303
  l.startsWith("origin") ? (a = !0, r[l] = c) : s[l] = c;
2299
2304
  }
2300
2305
  }
2301
- if (t.transform || (o || n ? s.transform = Eo(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
2306
+ if (t.transform || (o || n ? s.transform = $o(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
2302
2307
  const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = r;
2303
2308
  s.transformOrigin = `${l} ${u} ${c}`;
2304
2309
  }
2305
2310
  }
2306
- function ln(e, t, n) {
2311
+ function fn(e, t, n) {
2307
2312
  return typeof e == "string" ? e : d.transform(t + n * e);
2308
2313
  }
2309
- function Mo(e, t, n) {
2310
- const s = ln(t, e.x, e.width), i = ln(n, e.y, e.height);
2314
+ function Ko(e, t, n) {
2315
+ const s = fn(t, e.x, e.width), i = fn(n, e.y, e.height);
2311
2316
  return `${s} ${i}`;
2312
2317
  }
2313
- const Po = {
2318
+ const Wo = {
2314
2319
  offset: "stroke-dashoffset",
2315
2320
  array: "stroke-dasharray"
2316
- }, Co = {
2321
+ }, _o = {
2317
2322
  offset: "strokeDashoffset",
2318
2323
  array: "strokeDasharray"
2319
2324
  };
2320
- function Fo(e, t, n = 1, s = 0, i = !0) {
2325
+ function Go(e, t, n = 1, s = 0, i = !0) {
2321
2326
  e.pathLength = 1;
2322
- const r = i ? Po : Co;
2327
+ const r = i ? Wo : _o;
2323
2328
  e[r.offset] = d.transform(-s);
2324
2329
  const o = d.transform(t), a = d.transform(n);
2325
2330
  e[r.array] = `${o} ${a}`;
2326
2331
  }
2327
- function Oo(e, {
2332
+ function ko(e, {
2328
2333
  attrX: t,
2329
2334
  attrY: n,
2330
2335
  attrScale: s,
@@ -2336,15 +2341,15 @@ function Oo(e, {
2336
2341
  // This is object creation, which we try to avoid per-frame.
2337
2342
  ...u
2338
2343
  }, c, f) {
2339
- if (Fs(e, u, f), c) {
2344
+ if (Ws(e, u, f), c) {
2340
2345
  e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
2341
2346
  return;
2342
2347
  }
2343
2348
  e.attrs = e.style, e.style = {};
2344
2349
  const { attrs: h, style: p, dimensions: m } = e;
2345
- h.transform && (m && (p.transform = h.transform), delete h.transform), m && (i !== void 0 || r !== void 0 || p.transform) && (p.transformOrigin = Mo(m, i !== void 0 ? i : 0.5, r !== void 0 ? r : 0.5)), t !== void 0 && (h.x = t), n !== void 0 && (h.y = n), s !== void 0 && (h.scale = s), o !== void 0 && Fo(h, o, a, l, !1);
2350
+ h.transform && (m && (p.transform = h.transform), delete h.transform), m && (i !== void 0 || r !== void 0 || p.transform) && (p.transformOrigin = Ko(m, i !== void 0 ? i : 0.5, r !== void 0 ? r : 0.5)), t !== void 0 && (h.x = t), n !== void 0 && (h.y = n), s !== void 0 && (h.scale = s), o !== void 0 && Go(h, o, a, l, !1);
2346
2351
  }
2347
- const Os = /* @__PURE__ */ new Set([
2352
+ const _s = /* @__PURE__ */ new Set([
2348
2353
  "baseFrequency",
2349
2354
  "diffuseConstant",
2350
2355
  "kernelMatrix",
@@ -2369,51 +2374,51 @@ const Os = /* @__PURE__ */ new Set([
2369
2374
  "textLength",
2370
2375
  "lengthAdjust"
2371
2376
  ]);
2372
- function Ds(e, { style: t, vars: n }, s, i) {
2377
+ function Gs(e, { style: t, vars: n }, s, i) {
2373
2378
  Object.assign(e.style, t, i && i.getProjectionStyles(s));
2374
2379
  for (const r in n)
2375
2380
  e.style.setProperty(r, n[r]);
2376
2381
  }
2377
- function Do(e, t, n, s) {
2378
- Ds(e, t, void 0, s);
2382
+ function zo(e, t, n, s) {
2383
+ Gs(e, t, void 0, s);
2379
2384
  for (const i in t.attrs)
2380
- e.setAttribute(Os.has(i) ? i : Te(i), t.attrs[i]);
2385
+ e.setAttribute(_s.has(i) ? i : Ve(i), t.attrs[i]);
2381
2386
  }
2382
- const Ro = (e) => typeof e == "string" && e.toLowerCase() === "svg";
2383
- class Io extends Ps {
2387
+ const jo = (e) => typeof e == "string" && e.toLowerCase() === "svg";
2388
+ class Uo extends $s {
2384
2389
  constructor() {
2385
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Se;
2390
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = xe;
2386
2391
  }
2387
2392
  getBaseTargetFromProps(t, n) {
2388
2393
  return t[n];
2389
2394
  }
2390
2395
  readValueFromInstance(t, n) {
2391
- if (U.has(n)) {
2392
- const s = me(n);
2396
+ if (Y.has(n)) {
2397
+ const s = ve(n);
2393
2398
  return s && s.default || 0;
2394
2399
  }
2395
- return n = Os.has(n) ? n : Te(n), t.getAttribute(n);
2400
+ return n = _s.has(n) ? n : Ve(n), t.getAttribute(n);
2396
2401
  }
2397
2402
  scrapeMotionValuesFromProps(t, n, s) {
2398
- return ho(t, n, s);
2403
+ return Ao(t, n, s);
2399
2404
  }
2400
2405
  build(t, n, s) {
2401
- Oo(t, n, this.isSVGTag, s.transformTemplate);
2406
+ ko(t, n, this.isSVGTag, s.transformTemplate);
2402
2407
  }
2403
2408
  renderInstance(t, n, s, i) {
2404
- Do(t, n, s, i);
2409
+ zo(t, n, s, i);
2405
2410
  }
2406
2411
  mount(t) {
2407
- this.isSVGTag = Ro(t.tagName), super.mount(t);
2412
+ this.isSVGTag = jo(t.tagName), super.mount(t);
2408
2413
  }
2409
2414
  }
2410
- function Bo({ top: e, left: t, right: n, bottom: s }) {
2415
+ function Ho({ top: e, left: t, right: n, bottom: s }) {
2411
2416
  return {
2412
2417
  x: { min: t, max: n },
2413
2418
  y: { min: e, max: s }
2414
2419
  };
2415
2420
  }
2416
- function Lo(e, t) {
2421
+ function Yo(e, t) {
2417
2422
  if (!t)
2418
2423
  return e;
2419
2424
  const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
@@ -2424,51 +2429,51 @@ function Lo(e, t) {
2424
2429
  right: s.x
2425
2430
  };
2426
2431
  }
2427
- function No(e, t) {
2428
- return Bo(Lo(e.getBoundingClientRect(), t));
2432
+ function qo(e, t) {
2433
+ return Ho(Yo(e.getBoundingClientRect(), t));
2429
2434
  }
2430
- function $o(e) {
2435
+ function Xo(e) {
2431
2436
  return window.getComputedStyle(e);
2432
2437
  }
2433
- class Ko extends Ps {
2438
+ class Zo extends $s {
2434
2439
  constructor() {
2435
- super(...arguments), this.type = "html", this.renderInstance = Ds;
2440
+ super(...arguments), this.type = "html", this.renderInstance = Gs;
2436
2441
  }
2437
2442
  readValueFromInstance(t, n) {
2438
- if (U.has(n)) {
2439
- const s = me(n);
2443
+ if (Y.has(n)) {
2444
+ const s = ve(n);
2440
2445
  return s && s.default || 0;
2441
2446
  } else {
2442
- const s = $o(t), i = (ts(n) ? s.getPropertyValue(n) : s[n]) || 0;
2447
+ const s = Xo(t), i = (cs(n) ? s.getPropertyValue(n) : s[n]) || 0;
2443
2448
  return typeof i == "string" ? i.trim() : i;
2444
2449
  }
2445
2450
  }
2446
2451
  measureInstanceViewportBox(t, { transformPagePoint: n }) {
2447
- return No(t, n);
2452
+ return qo(t, n);
2448
2453
  }
2449
2454
  build(t, n, s) {
2450
- Fs(t, n, s.transformTemplate);
2455
+ Ws(t, n, s.transformTemplate);
2451
2456
  }
2452
2457
  scrapeMotionValuesFromProps(t, n, s) {
2453
- return Vs(t, n, s);
2458
+ return Rs(t, n, s);
2454
2459
  }
2455
2460
  handleChildMotionValue() {
2456
2461
  this.childSubscription && (this.childSubscription(), delete this.childSubscription);
2457
2462
  const { children: t } = this.props;
2458
- P(t) && (this.childSubscription = t.on("change", (n) => {
2463
+ C(t) && (this.childSubscription = t.on("change", (n) => {
2459
2464
  this.current && (this.current.textContent = `${n}`);
2460
2465
  }));
2461
2466
  }
2462
2467
  }
2463
- function Wo(e, t) {
2468
+ function Jo(e, t) {
2464
2469
  return e in t;
2465
2470
  }
2466
- class _o extends Ms {
2471
+ class Qo extends Ns {
2467
2472
  constructor() {
2468
2473
  super(...arguments), this.type = "object";
2469
2474
  }
2470
2475
  readValueFromInstance(t, n) {
2471
- if (Wo(n, t)) {
2476
+ if (Jo(n, t)) {
2472
2477
  const s = t[n];
2473
2478
  if (typeof s == "string" || typeof s == "number")
2474
2479
  return s;
@@ -2480,7 +2485,7 @@ class _o extends Ms {
2480
2485
  delete n.output[t];
2481
2486
  }
2482
2487
  measureInstanceViewportBox() {
2483
- return Se();
2488
+ return xe();
2484
2489
  }
2485
2490
  build(t, n) {
2486
2491
  Object.assign(t.output, n);
@@ -2492,7 +2497,7 @@ class _o extends Ms {
2492
2497
  return 0;
2493
2498
  }
2494
2499
  }
2495
- function Rs(e) {
2500
+ function ks(e) {
2496
2501
  const t = {
2497
2502
  presenceContext: null,
2498
2503
  props: {},
@@ -2506,10 +2511,10 @@ function Rs(e) {
2506
2511
  },
2507
2512
  latestValues: {}
2508
2513
  }
2509
- }, n = uo(e) ? new Io(t) : new Ko(t);
2510
- n.mount(e), L.set(e, n);
2514
+ }, n = To(e) ? new Uo(t) : new Zo(t);
2515
+ n.mount(e), $.set(e, n);
2511
2516
  }
2512
- function Go(e) {
2517
+ function ta(e) {
2513
2518
  const t = {
2514
2519
  presenceContext: null,
2515
2520
  props: {},
@@ -2519,105 +2524,105 @@ function Go(e) {
2519
2524
  },
2520
2525
  latestValues: {}
2521
2526
  }
2522
- }, n = new _o(t);
2523
- n.mount(e), L.set(e, n);
2527
+ }, n = new Qo(t);
2528
+ n.mount(e), $.set(e, n);
2524
2529
  }
2525
- function ko(e, t, n) {
2526
- const s = P(e) ? e : it(e);
2527
- return s.start(Ss("", s, t, n)), s.animation;
2530
+ function ea(e, t, n) {
2531
+ const s = C(e) ? e : D(e);
2532
+ return s.start(Ds("", s, t, n)), s.animation;
2528
2533
  }
2529
- function zo(e, t) {
2530
- return P(e) || typeof e == "number" || typeof e == "string" && !oe(t);
2534
+ function na(e, t) {
2535
+ return C(e) || typeof e == "number" || typeof e == "string" && !ue(t);
2531
2536
  }
2532
- function Is(e, t, n, s) {
2537
+ function zs(e, t, n, s) {
2533
2538
  const i = [];
2534
- if (zo(e, t))
2535
- i.push(ko(e, oe(t) && t.default || t, n && (n.default || n)));
2539
+ if (na(e, t))
2540
+ i.push(ea(e, ue(t) && t.default || t, n && (n.default || n)));
2536
2541
  else {
2537
- const r = Gn(e, t, s), o = r.length;
2538
- R(!!o, "No valid elements provided.");
2542
+ const r = Jn(e, t, s), o = r.length;
2543
+ I(!!o, "No valid elements provided.");
2539
2544
  for (let a = 0; a < o; a++) {
2540
- const l = r[a], u = l instanceof Element ? Rs : Go;
2541
- L.has(l) || u(l);
2542
- const c = L.get(l), f = { ...n };
2543
- "delay" in f && typeof f.delay == "function" && (f.delay = f.delay(a, o)), i.push(...lo(c, { ...t, transition: f }, {}));
2545
+ const l = r[a], u = l instanceof Element ? ks : ta;
2546
+ $.has(l) || u(l);
2547
+ const c = $.get(l), f = { ...n };
2548
+ "delay" in f && typeof f.delay == "function" && (f.delay = f.delay(a, o)), i.push(...So(c, { ...t, transition: f }, {}));
2544
2549
  }
2545
2550
  }
2546
2551
  return i;
2547
2552
  }
2548
- function jo(e, t, n) {
2553
+ function sa(e, t, n) {
2549
2554
  const s = [];
2550
- return Pi(e, t, n, { spring: ie }).forEach(({ keyframes: r, transition: o }, a) => {
2551
- s.push(...Is(a, r, o));
2555
+ return Ki(e, t, n, { spring: ae }).forEach(({ keyframes: r, transition: o }, a) => {
2556
+ s.push(...zs(a, r, o));
2552
2557
  }), s;
2553
2558
  }
2554
- function Uo(e) {
2559
+ function ia(e) {
2555
2560
  return Array.isArray(e) && Array.isArray(e[0]);
2556
2561
  }
2557
- function Ho(e) {
2562
+ function ra(e) {
2558
2563
  function t(n, s, i) {
2559
2564
  let r = [];
2560
- Uo(n) ? r = jo(n, s, e) : r = Is(n, s, i, e);
2561
- const o = new se(r);
2565
+ ia(n) ? r = sa(n, s, e) : r = zs(n, s, i, e);
2566
+ const o = new oe(r);
2562
2567
  return e && e.animations.push(o), o;
2563
2568
  }
2564
2569
  return t;
2565
2570
  }
2566
- const qo = Ho();
2567
- function Yo(e, t, n) {
2571
+ const oa = ra();
2572
+ function aa(e, t, n) {
2568
2573
  e.style.setProperty(`--${t}`, n);
2569
2574
  }
2570
- function Xo(e, t, n) {
2575
+ function la(e, t, n) {
2571
2576
  e.style[t] = n;
2572
2577
  }
2573
- const Zo = /* @__PURE__ */ Ft(() => {
2578
+ const ua = /* @__PURE__ */ Rt(() => {
2574
2579
  try {
2575
2580
  document.createElement("div").animate({ opacity: [1] });
2576
2581
  } catch {
2577
2582
  return !1;
2578
2583
  }
2579
2584
  return !0;
2580
- }), bt = /* @__PURE__ */ new WeakMap();
2581
- function Qo(e, t, n) {
2585
+ }), Tt = /* @__PURE__ */ new WeakMap();
2586
+ function ca(e, t, n) {
2582
2587
  for (let s = 0; s < t.length; s++)
2583
- t[s] === null && (t[s] = s === 0 ? n() : t[s - 1]), typeof t[s] == "number" && Ht[e] && (t[s] = Ht[e].transform(t[s]));
2584
- !Zo() && t.length < 2 && t.unshift(n());
2588
+ t[s] === null && (t[s] = s === 0 ? n() : t[s - 1]), typeof t[s] == "number" && Zt[e] && (t[s] = Zt[e].transform(t[s]));
2589
+ !ua() && t.length < 2 && t.unshift(n());
2585
2590
  }
2586
- const un = "easeOut";
2587
- function cn(e) {
2588
- const t = bt.get(e) || /* @__PURE__ */ new Map();
2589
- return bt.set(e, t), bt.get(e);
2591
+ const hn = "easeOut";
2592
+ function dn(e) {
2593
+ const t = Tt.get(e) || /* @__PURE__ */ new Map();
2594
+ return Tt.set(e, t), Tt.get(e);
2590
2595
  }
2591
- class Jo {
2596
+ class fa {
2592
2597
  constructor(t, n, s, i) {
2593
2598
  const r = n.startsWith("--");
2594
- this.setValue = r ? Yo : Xo, this.options = i, this.updateFinishedPromise(), R(typeof i.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "framer-motion"?`);
2595
- const o = cn(t).get(n);
2599
+ this.setValue = r ? aa : la, this.options = i, this.updateFinishedPromise(), I(typeof i.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "framer-motion"?`);
2600
+ const o = dn(t).get(n);
2596
2601
  o && o.stop();
2597
2602
  const a = () => n.startsWith("--") ? t.style.getPropertyValue(n) : window.getComputedStyle(t)[n];
2598
- if (Array.isArray(s) || (s = [s]), Qo(n, s, a), ht(i.type)) {
2599
- const u = Wn(i, 100, i.type);
2600
- i.ease = at() ? u.ease : un, i.duration = C(u.duration), i.type = "keyframes";
2603
+ if (Array.isArray(s) || (s = [s]), ca(n, s, a), pt(i.type)) {
2604
+ const u = Xn(i, 100, i.type);
2605
+ i.ease = lt() ? u.ease : hn, i.duration = P(u.duration), i.type = "keyframes";
2601
2606
  } else
2602
- i.ease = i.ease || un;
2607
+ i.ease = i.ease || hn;
2603
2608
  this.removeAnimation = () => {
2604
2609
  var u;
2605
- return (u = bt.get(t)) === null || u === void 0 ? void 0 : u.delete(n);
2610
+ return (u = Tt.get(t)) === null || u === void 0 ? void 0 : u.delete(n);
2606
2611
  };
2607
2612
  const l = () => {
2608
- this.setValue(t, n, pt(s, this.options)), this.cancel(), this.resolveFinishedPromise();
2613
+ this.setValue(t, n, gt(s, this.options)), this.cancel(), this.resolveFinishedPromise();
2609
2614
  };
2610
- ws() ? (this.animation = bs(t, n, s, i), i.autoplay === !1 && this.animation.pause(), this.animation.onfinish = l, this.pendingTimeline && Vt(this.animation, this.pendingTimeline), cn(t).set(n, this)) : l();
2615
+ Fs() ? (this.animation = Ps(t, n, s, i), i.autoplay === !1 && this.animation.pause(), this.animation.onfinish = l, this.pendingTimeline && Mt(this.animation, this.pendingTimeline), dn(t).set(n, this)) : l();
2611
2616
  }
2612
2617
  get duration() {
2613
- return D(this.options.duration || 300);
2618
+ return B(this.options.duration || 300);
2614
2619
  }
2615
2620
  get time() {
2616
2621
  var t;
2617
- return this.animation ? D(((t = this.animation) === null || t === void 0 ? void 0 : t.currentTime) || 0) : 0;
2622
+ return this.animation ? B(((t = this.animation) === null || t === void 0 ? void 0 : t.currentTime) || 0) : 0;
2618
2623
  }
2619
2624
  set time(t) {
2620
- this.animation && (this.animation.currentTime = C(t));
2625
+ this.animation && (this.animation.currentTime = P(t));
2621
2626
  }
2622
2627
  get speed() {
2623
2628
  return this.animation ? this.animation.playbackRate : 1;
@@ -2664,33 +2669,33 @@ class Jo {
2664
2669
  });
2665
2670
  }
2666
2671
  attachTimeline(t) {
2667
- return this.animation ? Vt(this.animation, t) : this.pendingTimeline = t, N;
2672
+ return this.animation ? Mt(this.animation, t) : this.pendingTimeline = t, K;
2668
2673
  }
2669
2674
  }
2670
- function ta(e, t, n, s) {
2671
- const i = Ot(e, s), r = i.length;
2672
- R(!!r, "No valid element provided.");
2675
+ function ha(e, t, n, s) {
2676
+ const i = It(e, s), r = i.length;
2677
+ I(!!r, "No valid element provided.");
2673
2678
  const o = [];
2674
2679
  for (let a = 0; a < r; a++) {
2675
2680
  const l = i[a], u = { ...n };
2676
2681
  typeof u.delay == "function" && (u.delay = u.delay(a, r));
2677
2682
  for (const c in t) {
2678
2683
  const f = t[c], h = {
2679
- ...ae(n, c)
2684
+ ...ce(n, c)
2680
2685
  };
2681
- h.duration = h.duration ? C(h.duration) : h.duration, h.delay = C(h.delay || 0), o.push(new Jo(l, c, f, h));
2686
+ h.duration = h.duration ? P(h.duration) : h.duration, h.delay = P(h.delay || 0), o.push(new fa(l, c, f, h));
2682
2687
  }
2683
2688
  }
2684
2689
  return o;
2685
2690
  }
2686
- const ea = (e) => {
2691
+ const da = (e) => {
2687
2692
  function t(n, s, i) {
2688
- return new se(ta(n, s, i, e));
2693
+ return new oe(ha(n, s, i, e));
2689
2694
  }
2690
2695
  return t;
2691
- }, vl = /* @__PURE__ */ ea(), wt = /* @__PURE__ */ new WeakMap();
2692
- let K;
2693
- function na(e, t) {
2696
+ }, Ll = /* @__PURE__ */ da(), Vt = /* @__PURE__ */ new WeakMap();
2697
+ let _;
2698
+ function pa(e, t) {
2694
2699
  if (t) {
2695
2700
  const { inlineSize: n, blockSize: s } = t[0];
2696
2701
  return { width: n, height: s };
@@ -2699,41 +2704,41 @@ function na(e, t) {
2699
2704
  height: e.offsetHeight
2700
2705
  };
2701
2706
  }
2702
- function sa({ target: e, contentRect: t, borderBoxSize: n }) {
2707
+ function ma({ target: e, contentRect: t, borderBoxSize: n }) {
2703
2708
  var s;
2704
- (s = wt.get(e)) === null || s === void 0 || s.forEach((i) => {
2709
+ (s = Vt.get(e)) === null || s === void 0 || s.forEach((i) => {
2705
2710
  i({
2706
2711
  target: e,
2707
2712
  contentSize: t,
2708
2713
  get size() {
2709
- return na(e, n);
2714
+ return pa(e, n);
2710
2715
  }
2711
2716
  });
2712
2717
  });
2713
2718
  }
2714
- function ia(e) {
2715
- e.forEach(sa);
2719
+ function ga(e) {
2720
+ e.forEach(ma);
2716
2721
  }
2717
- function ra() {
2718
- typeof ResizeObserver > "u" || (K = new ResizeObserver(ia));
2722
+ function ya() {
2723
+ typeof ResizeObserver > "u" || (_ = new ResizeObserver(ga));
2719
2724
  }
2720
- function oa(e, t) {
2721
- K || ra();
2722
- const n = Ot(e);
2725
+ function va(e, t) {
2726
+ _ || ya();
2727
+ const n = It(e);
2723
2728
  return n.forEach((s) => {
2724
- let i = wt.get(s);
2725
- i || (i = /* @__PURE__ */ new Set(), wt.set(s, i)), i.add(t), K == null || K.observe(s);
2729
+ let i = Vt.get(s);
2730
+ i || (i = /* @__PURE__ */ new Set(), Vt.set(s, i)), i.add(t), _ == null || _.observe(s);
2726
2731
  }), () => {
2727
2732
  n.forEach((s) => {
2728
- const i = wt.get(s);
2729
- i == null || i.delete(t), i != null && i.size || K == null || K.unobserve(s);
2733
+ const i = Vt.get(s);
2734
+ i == null || i.delete(t), i != null && i.size || _ == null || _.unobserve(s);
2730
2735
  });
2731
2736
  };
2732
2737
  }
2733
- const Tt = /* @__PURE__ */ new Set();
2734
- let nt;
2735
- function aa() {
2736
- nt = () => {
2738
+ const xt = /* @__PURE__ */ new Set();
2739
+ let rt;
2740
+ function ba() {
2741
+ rt = () => {
2737
2742
  const e = {
2738
2743
  width: window.innerWidth,
2739
2744
  height: window.innerHeight
@@ -2742,18 +2747,18 @@ function aa() {
2742
2747
  size: e,
2743
2748
  contentSize: e
2744
2749
  };
2745
- Tt.forEach((n) => n(t));
2746
- }, window.addEventListener("resize", nt);
2750
+ xt.forEach((n) => n(t));
2751
+ }, window.addEventListener("resize", rt);
2747
2752
  }
2748
- function la(e) {
2749
- return Tt.add(e), nt || aa(), () => {
2750
- Tt.delete(e), !Tt.size && nt && (nt = void 0);
2753
+ function wa(e) {
2754
+ return xt.add(e), rt || ba(), () => {
2755
+ xt.delete(e), !xt.size && rt && (rt = void 0);
2751
2756
  };
2752
2757
  }
2753
- function ua(e, t) {
2754
- return typeof e == "function" ? la(e) : oa(e, t);
2758
+ function Sa(e, t) {
2759
+ return typeof e == "function" ? wa(e) : va(e, t);
2755
2760
  }
2756
- const ca = 50, fn = () => ({
2761
+ const Ta = 50, pn = () => ({
2757
2762
  current: 0,
2758
2763
  offset: [],
2759
2764
  progress: 0,
@@ -2762,11 +2767,11 @@ const ca = 50, fn = () => ({
2762
2767
  targetLength: 0,
2763
2768
  containerLength: 0,
2764
2769
  velocity: 0
2765
- }), fa = () => ({
2770
+ }), Va = () => ({
2766
2771
  time: 0,
2767
- x: fn(),
2768
- y: fn()
2769
- }), ha = {
2772
+ x: pn(),
2773
+ y: pn()
2774
+ }), xa = {
2770
2775
  x: {
2771
2776
  length: "Width",
2772
2777
  position: "Left"
@@ -2776,16 +2781,16 @@ const ca = 50, fn = () => ({
2776
2781
  position: "Top"
2777
2782
  }
2778
2783
  };
2779
- function hn(e, t, n, s) {
2780
- const i = n[t], { length: r, position: o } = ha[t], a = i.current, l = n.time;
2781
- i.current = e[`scroll${o}`], i.scrollLength = e[`scroll${r}`] - e[`client${r}`], i.offset.length = 0, i.offset[0] = 0, i.offset[1] = i.scrollLength, i.progress = ft(0, i.scrollLength, i.current);
2784
+ function mn(e, t, n, s) {
2785
+ const i = n[t], { length: r, position: o } = xa[t], a = i.current, l = n.time;
2786
+ i.current = e[`scroll${o}`], i.scrollLength = e[`scroll${r}`] - e[`client${r}`], i.offset.length = 0, i.offset[0] = 0, i.offset[1] = i.scrollLength, i.progress = dt(0, i.scrollLength, i.current);
2782
2787
  const u = s - l;
2783
- i.velocity = u > ca ? 0 : ne(i.current - a, u);
2788
+ i.velocity = u > Ta ? 0 : re(i.current - a, u);
2784
2789
  }
2785
- function da(e, t, n) {
2786
- hn(e, "x", t, n), hn(e, "y", t, n), t.time = n;
2790
+ function Aa(e, t, n) {
2791
+ mn(e, "x", t, n), mn(e, "y", t, n), t.time = n;
2787
2792
  }
2788
- function pa(e, t) {
2793
+ function Ea(e, t) {
2789
2794
  const n = { x: 0, y: 0 };
2790
2795
  let s = e;
2791
2796
  for (; s && s !== t; )
@@ -2807,7 +2812,7 @@ function pa(e, t) {
2807
2812
  break;
2808
2813
  return n;
2809
2814
  }
2810
- const ma = {
2815
+ const Ma = {
2811
2816
  Enter: [
2812
2817
  [0, 1],
2813
2818
  [1, 1]
@@ -2824,30 +2829,30 @@ const ma = {
2824
2829
  [0, 0],
2825
2830
  [1, 1]
2826
2831
  ]
2827
- }, Jt = {
2832
+ }, se = {
2828
2833
  start: 0,
2829
2834
  center: 0.5,
2830
2835
  end: 1
2831
2836
  };
2832
- function dn(e, t, n = 0) {
2837
+ function gn(e, t, n = 0) {
2833
2838
  let s = 0;
2834
- if (e in Jt && (e = Jt[e]), typeof e == "string") {
2839
+ if (e in se && (e = se[e]), typeof e == "string") {
2835
2840
  const i = parseFloat(e);
2836
2841
  e.endsWith("px") ? s = i : e.endsWith("%") ? e = i / 100 : e.endsWith("vw") ? s = i / 100 * document.documentElement.clientWidth : e.endsWith("vh") ? s = i / 100 * document.documentElement.clientHeight : e = i;
2837
2842
  }
2838
2843
  return typeof e == "number" && (s = t * e), n + s;
2839
2844
  }
2840
- const ga = [0, 0];
2841
- function ya(e, t, n, s) {
2842
- let i = Array.isArray(e) ? e : ga, r = 0, o = 0;
2843
- return typeof e == "number" ? i = [e, e] : typeof e == "string" && (e = e.trim(), e.includes(" ") ? i = e.split(" ") : i = [e, Jt[e] ? e : "0"]), r = dn(i[0], n, s), o = dn(i[1], t), r - o;
2845
+ const Ca = [0, 0];
2846
+ function Pa(e, t, n, s) {
2847
+ let i = Array.isArray(e) ? e : Ca, r = 0, o = 0;
2848
+ return typeof e == "number" ? i = [e, e] : typeof e == "string" && (e = e.trim(), e.includes(" ") ? i = e.split(" ") : i = [e, se[e] ? e : "0"]), r = gn(i[0], n, s), o = gn(i[1], t), r - o;
2844
2849
  }
2845
- const va = { x: 0, y: 0 };
2846
- function ba(e) {
2850
+ const Fa = { x: 0, y: 0 };
2851
+ function Oa(e) {
2847
2852
  return "getBBox" in e && e.tagName !== "svg" ? e.getBBox() : { width: e.clientWidth, height: e.clientHeight };
2848
2853
  }
2849
- function wa(e, t, n) {
2850
- const { offset: s = ma.All } = n, { target: i = e, axis: r = "y" } = n, o = r === "y" ? "height" : "width", a = i !== e ? pa(i, e) : va, l = i === e ? { width: e.scrollWidth, height: e.scrollHeight } : ba(i), u = {
2854
+ function Da(e, t, n) {
2855
+ const { offset: s = Ma.All } = n, { target: i = e, axis: r = "y" } = n, o = r === "y" ? "height" : "width", a = i !== e ? Ea(i, e) : Fa, l = i === e ? { width: e.scrollWidth, height: e.scrollHeight } : Oa(i), u = {
2851
2856
  width: e.clientWidth,
2852
2857
  height: e.clientHeight
2853
2858
  };
@@ -2855,115 +2860,115 @@ function wa(e, t, n) {
2855
2860
  let c = !t[r].interpolate;
2856
2861
  const f = s.length;
2857
2862
  for (let h = 0; h < f; h++) {
2858
- const p = ya(s[h], u[o], l[o], a[r]);
2863
+ const p = Pa(s[h], u[o], l[o], a[r]);
2859
2864
  !c && p !== t[r].interpolatorOffsets[h] && (c = !0), t[r].offset[h] = p;
2860
2865
  }
2861
- c && (t[r].interpolate = be(t[r].offset, re(s)), t[r].interpolatorOffsets = [...t[r].offset]), t[r].progress = t[r].interpolate(t[r].current);
2866
+ c && (t[r].interpolate = Te(t[r].offset, le(s)), t[r].interpolatorOffsets = [...t[r].offset]), t[r].progress = t[r].interpolate(t[r].current);
2862
2867
  }
2863
- function Ta(e, t = e, n) {
2868
+ function Ba(e, t = e, n) {
2864
2869
  if (n.x.targetOffset = 0, n.y.targetOffset = 0, t !== e) {
2865
2870
  let s = t;
2866
2871
  for (; s && s !== e; )
2867
2872
  n.x.targetOffset += s.offsetLeft, n.y.targetOffset += s.offsetTop, s = s.offsetParent;
2868
2873
  }
2869
- n.x.targetLength = t === e ? t.scrollWidth : t.clientWidth, n.y.targetLength = t === e ? t.scrollHeight : t.clientHeight, n.x.containerLength = e.clientWidth, n.y.containerLength = e.clientHeight, process.env.NODE_ENV !== "production" && e && t && t !== e && Ct(getComputedStyle(e).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.");
2874
+ n.x.targetLength = t === e ? t.scrollWidth : t.clientWidth, n.y.targetLength = t === e ? t.scrollHeight : t.clientHeight, n.x.containerLength = e.clientWidth, n.y.containerLength = e.clientHeight, process.env.NODE_ENV !== "production" && e && t && t !== e && Bt(getComputedStyle(e).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.");
2870
2875
  }
2871
- function Sa(e, t, n, s = {}) {
2876
+ function Ra(e, t, n, s = {}) {
2872
2877
  return {
2873
- measure: () => Ta(e, s.target, n),
2878
+ measure: () => Ba(e, s.target, n),
2874
2879
  update: (i) => {
2875
- da(e, n, i), (s.offset || s.target) && wa(e, n, s);
2880
+ Aa(e, n, i), (s.offset || s.target) && Da(e, n, s);
2876
2881
  },
2877
2882
  notify: () => t(n)
2878
2883
  };
2879
2884
  }
2880
- const Q = /* @__PURE__ */ new WeakMap(), pn = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), mn = (e) => e === document.documentElement ? window : e;
2881
- function xe(e, { container: t = document.documentElement, ...n } = {}) {
2882
- let s = $t.get(t);
2883
- s || (s = /* @__PURE__ */ new Set(), $t.set(t, s));
2884
- const i = fa(), r = Sa(t, e, i, n);
2885
- if (s.add(r), !Q.has(t)) {
2885
+ const et = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), vn = (e) => e === document.documentElement ? window : e;
2886
+ function Ae(e, { container: t = document.documentElement, ...n } = {}) {
2887
+ let s = kt.get(t);
2888
+ s || (s = /* @__PURE__ */ new Set(), kt.set(t, s));
2889
+ const i = Va(), r = Ra(t, e, i, n);
2890
+ if (s.add(r), !et.has(t)) {
2886
2891
  const a = () => {
2887
2892
  for (const h of s)
2888
2893
  h.measure();
2889
2894
  }, l = () => {
2890
2895
  for (const h of s)
2891
- h.update(st.timestamp);
2896
+ h.update(Z.timestamp);
2892
2897
  }, u = () => {
2893
2898
  for (const h of s)
2894
2899
  h.notify();
2895
2900
  }, c = () => {
2896
- M.read(a, !1, !0), M.read(l, !1, !0), M.update(u, !1, !0);
2901
+ E.read(a, !1, !0), E.read(l, !1, !0), E.update(u, !1, !0);
2897
2902
  };
2898
- Q.set(t, c);
2899
- const f = mn(t);
2900
- window.addEventListener("resize", c, { passive: !0 }), t !== document.documentElement && pn.set(t, ua(t, c)), f.addEventListener("scroll", c, { passive: !0 });
2903
+ et.set(t, c);
2904
+ const f = vn(t);
2905
+ window.addEventListener("resize", c, { passive: !0 }), t !== document.documentElement && yn.set(t, Sa(t, c)), f.addEventListener("scroll", c, { passive: !0 });
2901
2906
  }
2902
- const o = Q.get(t);
2903
- return M.read(o, !1, !0), () => {
2907
+ const o = et.get(t);
2908
+ return E.read(o, !1, !0), () => {
2904
2909
  var a;
2905
- _(o);
2906
- const l = $t.get(t);
2910
+ R(o);
2911
+ const l = kt.get(t);
2907
2912
  if (!l || (l.delete(r), l.size))
2908
2913
  return;
2909
- const u = Q.get(t);
2910
- Q.delete(t), u && (mn(t).removeEventListener("scroll", u), (a = pn.get(t)) === null || a === void 0 || a(), window.removeEventListener("resize", u));
2914
+ const u = et.get(t);
2915
+ et.delete(t), u && (vn(t).removeEventListener("scroll", u), (a = yn.get(t)) === null || a === void 0 || a(), window.removeEventListener("resize", u));
2911
2916
  };
2912
2917
  }
2913
- function Bs(e, t) {
2918
+ function js(e, t) {
2914
2919
  let n;
2915
2920
  const s = () => {
2916
2921
  const { currentTime: i } = t, o = (i === null ? 0 : i.value) / 100;
2917
2922
  n !== o && e(o), n = o;
2918
2923
  };
2919
- return M.update(s, !0), () => _(s);
2924
+ return E.update(s, !0), () => R(s);
2920
2925
  }
2921
- function xa({ source: e, container: t, axis: n = "y" }) {
2926
+ function Ia({ source: e, container: t, axis: n = "y" }) {
2922
2927
  e && (t = e);
2923
- const s = { value: 0 }, i = xe((r) => {
2928
+ const s = { value: 0 }, i = Ae((r) => {
2924
2929
  s.value = r[n].progress * 100;
2925
2930
  }, { container: t, axis: n });
2926
2931
  return { currentTime: s, cancel: i };
2927
2932
  }
2928
- const Kt = /* @__PURE__ */ new Map();
2929
- function Ls({ source: e, container: t = document.documentElement, axis: n = "y" } = {}) {
2930
- e && (t = e), Kt.has(t) || Kt.set(t, {});
2931
- const s = Kt.get(t);
2932
- return s[n] || (s[n] = Nn() ? new ScrollTimeline({ source: t, axis: n }) : xa({ source: t, axis: n })), s[n];
2933
+ const zt = /* @__PURE__ */ new Map();
2934
+ function Us({ source: e, container: t = document.documentElement, axis: n = "y" } = {}) {
2935
+ e && (t = e), zt.has(t) || zt.set(t, {});
2936
+ const s = zt.get(t);
2937
+ return s[n] || (s[n] = Hn() ? new ScrollTimeline({ source: t, axis: n }) : Ia({ source: t, axis: n })), s[n];
2933
2938
  }
2934
- function Va(e) {
2939
+ function La(e) {
2935
2940
  return e.length === 2;
2936
2941
  }
2937
- function Ns(e) {
2942
+ function Hs(e) {
2938
2943
  return e && (e.target || e.offset);
2939
2944
  }
2940
- function Aa(e, t) {
2941
- return Va(e) || Ns(t) ? xe((n) => {
2945
+ function Na(e, t) {
2946
+ return La(e) || Hs(t) ? Ae((n) => {
2942
2947
  e(n[t.axis].progress, n);
2943
- }, t) : Bs(e, Ls(t));
2948
+ }, t) : js(e, Us(t));
2944
2949
  }
2945
- function Ea(e, t) {
2946
- if (Ns(t))
2947
- return e.pause(), xe((n) => {
2950
+ function $a(e, t) {
2951
+ if (Hs(t))
2952
+ return e.pause(), Ae((n) => {
2948
2953
  e.time = e.duration * n[t.axis].progress;
2949
2954
  }, t);
2950
2955
  {
2951
- const n = Ls(t);
2952
- return e.attachTimeline(n, (s) => (s.pause(), Bs((i) => {
2956
+ const n = Us(t);
2957
+ return e.attachTimeline(n, (s) => (s.pause(), js((i) => {
2953
2958
  s.time = s.duration * i;
2954
2959
  }, n)));
2955
2960
  }
2956
2961
  }
2957
- function bl(e, { axis: t = "y", ...n } = {}) {
2962
+ function Ka(e, { axis: t = "y", ...n } = {}) {
2958
2963
  const s = { axis: t, ...n };
2959
- return typeof e == "function" ? Aa(e, s) : Ea(e, s);
2964
+ return typeof e == "function" ? Na(e, s) : $a(e, s);
2960
2965
  }
2961
- const Ma = {
2966
+ const Wa = {
2962
2967
  some: 0,
2963
2968
  all: 1
2964
2969
  };
2965
- function Pa(e, t, { root: n, margin: s, amount: i = "some" } = {}) {
2966
- const r = Ot(e), o = /* @__PURE__ */ new WeakMap(), a = (u) => {
2970
+ function _a(e, t, { root: n, margin: s, amount: i = "some" } = {}) {
2971
+ const r = It(e), o = /* @__PURE__ */ new WeakMap(), a = (u) => {
2967
2972
  u.forEach((c) => {
2968
2973
  const f = o.get(c.target);
2969
2974
  if (c.isIntersecting !== !!f)
@@ -2975,18 +2980,18 @@ function Pa(e, t, { root: n, margin: s, amount: i = "some" } = {}) {
2975
2980
  }, l = new IntersectionObserver(a, {
2976
2981
  root: n,
2977
2982
  rootMargin: s,
2978
- threshold: typeof i == "number" ? i : Ma[i]
2983
+ threshold: typeof i == "number" ? i : Wa[i]
2979
2984
  });
2980
2985
  return r.forEach((u) => l.observe(u)), () => l.disconnect();
2981
2986
  }
2982
- function wl(e, t = "end") {
2987
+ function Nl(e, t = "end") {
2983
2988
  return (n) => {
2984
2989
  n = t === "end" ? Math.min(n, 0.999) : Math.max(n, 1e-3);
2985
2990
  const s = n * e, i = t === "end" ? Math.floor(s) : Math.ceil(s);
2986
- return j(0, 1, i / e);
2991
+ return H(0, 1, i / e);
2987
2992
  };
2988
2993
  }
2989
- function Ca(e, t) {
2994
+ function Ga(e, t) {
2990
2995
  if (e === "first")
2991
2996
  return 0;
2992
2997
  {
@@ -2994,65 +2999,65 @@ function Ca(e, t) {
2994
2999
  return e === "last" ? n : n / 2;
2995
3000
  }
2996
3001
  }
2997
- function Tl(e = 0.1, { startDelay: t = 0, from: n = 0, ease: s } = {}) {
3002
+ function $l(e = 0.1, { startDelay: t = 0, from: n = 0, ease: s } = {}) {
2998
3003
  return (i, r) => {
2999
- const o = typeof n == "number" ? n : Ca(n, r), a = Math.abs(o - i);
3004
+ const o = typeof n == "number" ? n : Ga(n, r), a = Math.abs(o - i);
3000
3005
  let l = e * a;
3001
3006
  if (s) {
3002
3007
  const u = r * e;
3003
- l = qt(s)(l / u) * u;
3008
+ l = Jt(s)(l / u) * u;
3004
3009
  }
3005
3010
  return t + l;
3006
3011
  };
3007
3012
  }
3008
- const Fa = (e) => e && typeof e == "object" && e.mix, Oa = (e) => Fa(e) ? e.mix : void 0;
3009
- function Sl(...e) {
3010
- const t = !Array.isArray(e[0]), n = t ? 0 : -1, s = e[0 + n], i = e[1 + n], r = e[2 + n], o = e[3 + n], a = be(i, r, {
3011
- mixer: Oa(r[0]),
3013
+ const ka = (e) => e && typeof e == "object" && e.mix, za = (e) => ka(e) ? e.mix : void 0;
3014
+ function ja(...e) {
3015
+ const t = !Array.isArray(e[0]), n = t ? 0 : -1, s = e[0 + n], i = e[1 + n], r = e[2 + n], o = e[3 + n], a = Te(i, r, {
3016
+ mixer: za(r[0]),
3012
3017
  ...o
3013
3018
  });
3014
3019
  return t ? a(s) : a;
3015
3020
  }
3016
- function Da(e, t) {
3017
- const n = B.now(), s = ({ timestamp: i }) => {
3021
+ function Ua(e, t) {
3022
+ const n = N.now(), s = ({ timestamp: i }) => {
3018
3023
  const r = i - n;
3019
- r >= t && (_(s), e(r - t));
3024
+ r >= t && (R(s), e(r - t));
3020
3025
  };
3021
- return M.read(s, !0), () => _(s);
3026
+ return E.read(s, !0), () => R(s);
3022
3027
  }
3023
- function xl(e, t) {
3024
- return Da(e, C(t));
3028
+ function Kl(e, t) {
3029
+ return Ua(e, P(t));
3025
3030
  }
3026
- const gn = (e, t) => Math.abs(e - t);
3027
- function Vl(e, t) {
3028
- const n = gn(e.x, t.x), s = gn(e.y, t.y);
3031
+ const bn = (e, t) => Math.abs(e - t);
3032
+ function Wl(e, t) {
3033
+ const n = bn(e.x, t.x), s = bn(e.y, t.y);
3029
3034
  return Math.sqrt(n ** 2 + s ** 2);
3030
3035
  }
3031
- const Al = M, El = J.reduce((e, t) => (e[t] = (n) => _(n), e), {});
3032
- function Ra(e) {
3033
- return typeof e == "function" ? e() : Cn(e);
3036
+ const _l = E, Gl = nt.reduce((e, t) => (e[t] = (n) => R(n), e), {});
3037
+ function Ha(e) {
3038
+ return typeof e == "function" ? e() : In(e);
3034
3039
  }
3035
3040
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
3036
- const yn = (e) => typeof e < "u";
3037
- function Ia(e) {
3041
+ const wn = (e) => typeof e < "u";
3042
+ function Ya(e) {
3038
3043
  var t;
3039
- const n = Ra(e);
3044
+ const n = Ha(e);
3040
3045
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
3041
3046
  }
3042
- function Ba() {
3043
- const e = Fn(), t = zs(() => {
3047
+ function qa() {
3048
+ const e = Ln(), t = ei(() => {
3044
3049
  var n, s;
3045
- return ["#text", "#comment"].includes((n = e.value) == null ? void 0 : n.$el.nodeName) ? (s = e.value) == null ? void 0 : s.$el.nextElementSibling : Ia(e);
3050
+ return ["#text", "#comment"].includes((n = e.value) == null ? void 0 : n.$el.nodeName) ? (s = e.value) == null ? void 0 : s.$el.nextElementSibling : Ya(e);
3046
3051
  });
3047
3052
  return {
3048
3053
  primitiveElement: e,
3049
3054
  currentElement: t
3050
3055
  };
3051
3056
  }
3052
- function Ve(e, t) {
3057
+ function Ee(e, t) {
3053
3058
  const n = typeof e == "string" && !t ? `${e}Context` : t, s = Symbol(n);
3054
3059
  return [(o) => {
3055
- const a = js(s, o);
3060
+ const a = ni(s, o);
3056
3061
  if (a || a === null)
3057
3062
  return a;
3058
3063
  throw new Error(
@@ -3060,19 +3065,22 @@ function Ve(e, t) {
3060
3065
  ", "
3061
3066
  )}` : `\`${e}\``}`
3062
3067
  );
3063
- }, (o) => (Us(s, o), o)];
3068
+ }, (o) => (si(s, o), o)];
3069
+ }
3070
+ function ut(e) {
3071
+ return !!(e && e.getVelocity);
3064
3072
  }
3065
- const [La, Na] = Ve("Motion"), [$a, Ml] = Ve("AnimatePresenceContext");
3066
- function vn(e, t) {
3073
+ const [Xa, Za] = Ee("Motion"), [Ja, kl] = Ee("AnimatePresenceContext");
3074
+ function Sn(e, t) {
3067
3075
  if (typeof e == "object")
3068
3076
  return e;
3069
3077
  if (e && t)
3070
3078
  return t[e];
3071
3079
  }
3072
- function Ka(e, t) {
3073
- return typeof e != typeof t ? !0 : Array.isArray(e) && Array.isArray(t) ? !Wa(e, t) : e !== t;
3080
+ function Qa(e, t) {
3081
+ return typeof e != typeof t ? !0 : Array.isArray(e) && Array.isArray(t) ? !tl(e, t) : e !== t;
3074
3082
  }
3075
- function Wa(e, t) {
3083
+ function tl(e, t) {
3076
3084
  const n = t.length;
3077
3085
  if (n !== e.length)
3078
3086
  return !1;
@@ -3081,66 +3089,126 @@ function Wa(e, t) {
3081
3089
  return !1;
3082
3090
  return !0;
3083
3091
  }
3084
- function _a(e, t) {
3092
+ function el(e, t) {
3085
3093
  !e.includes(t) && e.push(t);
3086
3094
  }
3087
- function Ga(e, t) {
3095
+ function nl(e, t) {
3088
3096
  const n = e.indexOf(t);
3089
3097
  n !== -1 && e.splice(n, 1);
3090
3098
  }
3091
- function ka(e, t) {
3099
+ function sl(e, t) {
3092
3100
  return e[t] ? { ...e, ...e[t] } : { ...e };
3093
3101
  }
3094
- function bn(e) {
3102
+ function Tn(e) {
3095
3103
  return e == null ? void 0 : e.startsWith("--");
3096
3104
  }
3097
- function za() {
3105
+ function il() {
3098
3106
  }
3099
- const ja = (e) => e;
3100
- function Ua(e) {
3107
+ const rl = (e) => e;
3108
+ function ol(e) {
3101
3109
  return typeof e == "number";
3102
3110
  }
3103
- const wn = {
3111
+ const al = [
3112
+ "animate",
3113
+ "circle",
3114
+ "defs",
3115
+ "desc",
3116
+ "ellipse",
3117
+ "g",
3118
+ "image",
3119
+ "line",
3120
+ "filter",
3121
+ "marker",
3122
+ "mask",
3123
+ "metadata",
3124
+ "path",
3125
+ "pattern",
3126
+ "polygon",
3127
+ "polyline",
3128
+ "rect",
3129
+ "stop",
3130
+ "svg",
3131
+ "switch",
3132
+ "symbol",
3133
+ "text",
3134
+ "tspan",
3135
+ "use",
3136
+ "view",
3137
+ "clipPath",
3138
+ "feBlend",
3139
+ "feColorMatrix",
3140
+ "feComponentTransfer",
3141
+ "feComposite",
3142
+ "feConvolveMatrix",
3143
+ "feDiffuseLighting",
3144
+ "feDisplacementMap",
3145
+ "feDistantLight",
3146
+ "feDropShadow",
3147
+ "feFlood",
3148
+ "feFuncA",
3149
+ "feFuncB",
3150
+ "feFuncG",
3151
+ "feFuncR",
3152
+ "feGaussianBlur",
3153
+ "feImage",
3154
+ "feMerge",
3155
+ "feMergeNode",
3156
+ "feMorphology",
3157
+ "feOffset",
3158
+ "fePointLight",
3159
+ "feSpecularLighting",
3160
+ "feSpotLight",
3161
+ "feTile",
3162
+ "feTurbulence",
3163
+ "foreignObject",
3164
+ "linearGradient",
3165
+ "radialGradient",
3166
+ "textPath"
3167
+ ], ll = new Set(al);
3168
+ function Vn(e) {
3169
+ return ll.has(e);
3170
+ }
3171
+ const xn = {
3104
3172
  syntax: "<angle>",
3105
3173
  initialValue: "0deg",
3106
3174
  toDefaultUnit: (e) => `${e}deg`
3107
- }, Ha = {
3175
+ }, ul = {
3108
3176
  translate: {
3109
3177
  syntax: "<length-percentage>",
3110
3178
  initialValue: "0px",
3111
3179
  toDefaultUnit: (e) => `${e}px`
3112
3180
  },
3113
- rotate: wn,
3181
+ rotate: xn,
3114
3182
  scale: {
3115
3183
  syntax: "<number>",
3116
3184
  initialValue: 1,
3117
- toDefaultUnit: ja
3185
+ toDefaultUnit: rl
3118
3186
  },
3119
- skew: wn
3120
- }, qa = ["translate", "scale", "rotate", "skew"], Ya = ["", "X", "Y", "Z"], Ae = /* @__PURE__ */ new Map(), Et = ["x", "y", "z"];
3121
- qa.forEach((e) => {
3122
- Ya.forEach((t) => {
3123
- Et.push(e + t), Ae.set(
3187
+ skew: xn
3188
+ }, cl = ["translate", "scale", "rotate", "skew"], fl = ["", "X", "Y", "Z"], Me = /* @__PURE__ */ new Map(), Pt = ["x", "y", "z"];
3189
+ cl.forEach((e) => {
3190
+ fl.forEach((t) => {
3191
+ Pt.push(e + t), Me.set(
3124
3192
  e + t,
3125
- Ha[e]
3193
+ ul[e]
3126
3194
  );
3127
3195
  });
3128
3196
  });
3129
- const Xa = new Set(Et), Za = (e) => Xa.has(e), Tn = {
3197
+ const hl = new Set(Pt), dl = (e) => hl.has(e), An = {
3130
3198
  x: "translateX",
3131
3199
  y: "translateY",
3132
3200
  z: "translateZ"
3133
3201
  };
3134
- function Qa([e], [t]) {
3135
- return Et.indexOf(e) - Et.indexOf(t);
3202
+ function pl([e], [t]) {
3203
+ return Pt.indexOf(e) - Pt.indexOf(t);
3136
3204
  }
3137
- function Ja(e, [t, n]) {
3205
+ function ml(e, [t, n]) {
3138
3206
  return `${e} ${t}(${n})`;
3139
3207
  }
3140
- function tl(e) {
3141
- return e.sort(Qa).reduce(Ja, "").trim();
3208
+ function gl(e) {
3209
+ return e.sort(pl).reduce(ml, "").trim();
3142
3210
  }
3143
- const el = {
3211
+ const yl = {
3144
3212
  translate: [0, 0],
3145
3213
  rotate: 0,
3146
3214
  scale: 1,
@@ -3148,35 +3216,35 @@ const el = {
3148
3216
  x: 0,
3149
3217
  y: 0,
3150
3218
  z: 0
3151
- }, $s = {
3219
+ }, Ys = {
3152
3220
  get: (e, t) => {
3153
- let n = bn(t) ? e.style.getPropertyValue(t) : getComputedStyle(e)[t];
3221
+ let n = Tn(t) ? e.style.getPropertyValue(t) : getComputedStyle(e)[t];
3154
3222
  if (!n && n !== "0") {
3155
- const s = Ae.get(t);
3223
+ const s = Me.get(t);
3156
3224
  s && (n = s.initialValue);
3157
3225
  }
3158
3226
  return n;
3159
3227
  },
3160
3228
  set: (e, t, n) => {
3161
- bn(t) ? e.style.setProperty(t, n) : e.style[t] = n;
3229
+ Tn(t) ? e.style.setProperty(t, n) : e.style[t] = n;
3162
3230
  }
3163
3231
  };
3164
- function Wt(e) {
3232
+ function wt(e) {
3165
3233
  var s;
3166
3234
  const t = {}, n = [];
3167
3235
  for (let i in e) {
3168
- const r = e[i];
3169
- Za(i) && i in Tn && (i = Tn[i]);
3236
+ let r = e[i];
3237
+ r = ut(r) ? r.get() : r, dl(i) && i in An && (i = An[i]);
3170
3238
  let o = Array.isArray(r) ? r[0] : r;
3171
- const a = Ae.get(i);
3172
- a ? (o = Ua(r) ? (s = a.toDefaultUnit) == null ? void 0 : s.call(a, r) : r, n.push([i, o])) : t[i] = o;
3239
+ const a = Me.get(i);
3240
+ a ? (o = ol(r) ? (s = a.toDefaultUnit) == null ? void 0 : s.call(a, r) : r, n.push([i, o])) : t[i] = o;
3173
3241
  }
3174
- return n.length && (t.transform = tl(n)), t;
3242
+ return n.length && (t.transform = gl(n)), t;
3175
3243
  }
3176
- function Ks(e) {
3177
- return e ? e.flatMap((t) => t.type === Hs ? Ks(t.children) : [t]) : [];
3244
+ function qs(e) {
3245
+ return e ? e.flatMap((t) => t.type === ii ? qs(t.children) : [t]) : [];
3178
3246
  }
3179
- const nl = Pt({
3247
+ const vl = Ot({
3180
3248
  name: "PrimitiveSlot",
3181
3249
  inheritAttrs: !1,
3182
3250
  setup(e, { attrs: t, slots: n }) {
@@ -3184,20 +3252,20 @@ const nl = Pt({
3184
3252
  var l, u;
3185
3253
  if (!n.default)
3186
3254
  return null;
3187
- const s = Ks(n.default()), i = s.findIndex((c) => c.type !== qs);
3255
+ const s = qs(n.default()), i = s.findIndex((c) => c.type !== ri);
3188
3256
  if (i === -1)
3189
3257
  return s;
3190
3258
  const r = s[i];
3191
3259
  (l = r.props) == null || delete l.ref;
3192
- const o = r.props ? ee(t, r.props) : t;
3260
+ const o = r.props ? Nn(t, r.props) : t;
3193
3261
  t.class && ((u = r.props) != null && u.class) && delete r.props.class;
3194
- const a = Ys(r, o);
3262
+ const a = oi(r, o);
3195
3263
  for (const c in o)
3196
3264
  c.startsWith("on") && (a.props || (a.props = {}), a.props[c] = o[c]);
3197
3265
  return s.length === 1 ? a : (s[i] = a, s);
3198
3266
  };
3199
3267
  }
3200
- }), sl = Pt({
3268
+ }), bl = Ot({
3201
3269
  name: "Primitive",
3202
3270
  inheritAttrs: !1,
3203
3271
  props: {
@@ -3212,54 +3280,33 @@ const nl = Pt({
3212
3280
  },
3213
3281
  setup(e, { attrs: t, slots: n }) {
3214
3282
  const s = e.asChild ? "template" : e.as;
3215
- return typeof s == "string" && ["area", "img", "input"].includes(s) ? () => Rt(s, t) : s !== "template" ? () => Rt(e.as, t, { default: n.default }) : () => Rt(nl, t, { default: n.default });
3283
+ return typeof s == "string" && ["area", "img", "input"].includes(s) ? () => $t(s, t) : s !== "template" ? () => $t(e.as, t, { default: n.default }) : () => $t(vl, t, { default: n.default });
3216
3284
  }
3217
- }), il = [
3218
- "path",
3219
- "rect",
3220
- "circle",
3221
- "ellipse",
3222
- "line",
3223
- "polyline",
3224
- "polygon",
3225
- "text",
3226
- "g",
3227
- "defs",
3228
- "use",
3229
- "symbol",
3230
- "linearGradient",
3231
- "radialGradient",
3232
- "stop",
3233
- "clipPath",
3234
- "mask",
3235
- "pattern",
3236
- "image",
3237
- "tspan",
3238
- "textPath"
3239
- ];
3240
- function Sn(e) {
3241
- return il.includes(e);
3242
- }
3243
- var Ws = function() {
3285
+ });
3286
+ var Xs = function() {
3287
+ }, Zs = function() {
3244
3288
  };
3245
- process.env.NODE_ENV !== "production" && (Ws = function(e, t) {
3289
+ process.env.NODE_ENV !== "production" && (Xs = function(e, t) {
3290
+ !e && typeof console < "u" && console.warn(t);
3291
+ }, Zs = function(e, t) {
3246
3292
  if (!e)
3247
3293
  throw new Error(t);
3248
3294
  });
3249
- class _s {
3295
+ class Js {
3250
3296
  constructor(t) {
3251
3297
  this.state = t;
3252
3298
  }
3253
3299
  update() {
3254
3300
  }
3255
3301
  }
3256
- class rl {
3302
+ class wl {
3257
3303
  constructor(t) {
3258
3304
  this.features = [], this.features = [
3259
- new ol(t),
3260
- new al(t),
3261
- new ll(t),
3262
- new ul(t)
3305
+ new Sl(t),
3306
+ new Tl(t),
3307
+ new Vl(t),
3308
+ // new DragGesture(state),
3309
+ new xl(t)
3263
3310
  ];
3264
3311
  }
3265
3312
  mount() {
@@ -3272,12 +3319,12 @@ class rl {
3272
3319
  this.features.forEach((t) => t.update());
3273
3320
  }
3274
3321
  }
3275
- function lt(e, t, n) {
3322
+ function ct(e, t, n) {
3276
3323
  e.dispatchEvent(
3277
3324
  new CustomEvent(t, { detail: { originalEvent: n } })
3278
3325
  );
3279
3326
  }
3280
- class Ee extends _s {
3327
+ class Ce extends Js {
3281
3328
  updateGestureSubscriptions() {
3282
3329
  const t = this.isActive();
3283
3330
  t && !this.removeGestureSubscriptions ? this.removeGestureSubscriptions = this.subscribeEvents() : !t && this.removeGestureSubscriptions && (this.removeGestureSubscriptions(), this.removeGestureSubscriptions = void 0);
@@ -3287,20 +3334,20 @@ class Ee extends _s {
3287
3334
  (t = this.removeGestureSubscriptions) == null || t.call(this);
3288
3335
  }
3289
3336
  }
3290
- function xn(e, t, n) {
3337
+ function En(e, t, n) {
3291
3338
  return (s) => {
3292
- s.pointerType && s.pointerType !== "mouse" || (n(), lt(e, t, s));
3339
+ s.pointerType && s.pointerType !== "mouse" || (n(), ct(e, t, s));
3293
3340
  };
3294
3341
  }
3295
- class ol extends Ee {
3342
+ class Sl extends Ce {
3296
3343
  isActive() {
3297
3344
  return !!this.state.getOptions().hover;
3298
3345
  }
3299
3346
  constructor(t) {
3300
3347
  super(t), this.subscribeEvents = () => {
3301
- const n = this.state.getElement(), s = xn(n, "hoverstart", () => {
3348
+ const n = this.state.getElement(), s = En(n, "hoverstart", () => {
3302
3349
  this.state.setActive("hover", !0);
3303
- }), i = xn(n, "hoverend", () => {
3350
+ }), i = En(n, "hoverend", () => {
3304
3351
  this.state.setActive("hover", !1);
3305
3352
  });
3306
3353
  return n.addEventListener("pointerenter", s), n.addEventListener("pointerleave", i), () => {
@@ -3315,16 +3362,16 @@ class ol extends Ee {
3315
3362
  this.updateGestureSubscriptions();
3316
3363
  }
3317
3364
  }
3318
- class al extends Ee {
3365
+ class Tl extends Ce {
3319
3366
  isActive() {
3320
3367
  return !!this.state.getOptions().press;
3321
3368
  }
3322
3369
  constructor(t) {
3323
3370
  super(t), this.subscribeEvents = () => {
3324
3371
  const n = this.state.getElement(), s = (r) => {
3325
- this.state.setActive("press", !1), lt(n, "pressend", r), window.removeEventListener("pointerup", s);
3372
+ this.state.setActive("press", !1), ct(n, "pressend", r), window.removeEventListener("pointerup", s);
3326
3373
  }, i = (r) => {
3327
- this.state.setActive("press", !0), lt(n, "pressstart", r), window.addEventListener("pointerup", s);
3374
+ this.state.setActive("press", !0), ct(n, "pressstart", r), window.addEventListener("pointerup", s);
3328
3375
  };
3329
3376
  return n.addEventListener("pointerdown", i), () => {
3330
3377
  n.removeEventListener("pointerdown", i), window.removeEventListener("pointerup", s);
@@ -3338,7 +3385,7 @@ class al extends Ee {
3338
3385
  this.updateGestureSubscriptions();
3339
3386
  }
3340
3387
  }
3341
- class ll extends Ee {
3388
+ class Vl extends Ce {
3342
3389
  isActive() {
3343
3390
  return !!this.state.getOptions().inView;
3344
3391
  }
@@ -3346,10 +3393,10 @@ class ll extends Ee {
3346
3393
  super(t), this.subscribeEvents = () => {
3347
3394
  var r;
3348
3395
  const n = this.state.getElement(), { once: s, ...i } = ((r = this.state.getOptions()) == null ? void 0 : r.inViewOptions) || {};
3349
- return Pa(n, (o) => {
3350
- if (this.state.setActive("inView", !0), lt(n, "viewenter", o), !s)
3396
+ return _a(n, (o) => {
3397
+ if (this.state.setActive("inView", !0), ct(n, "viewenter", o), !s)
3351
3398
  return (a) => {
3352
- this.state.setActive("inView", !1), lt(n, "viewleave", a);
3399
+ this.state.setActive("inView", !1), ct(n, "viewleave", a);
3353
3400
  };
3354
3401
  }, i);
3355
3402
  };
@@ -3361,7 +3408,7 @@ class ll extends Ee {
3361
3408
  this.updateGestureSubscriptions();
3362
3409
  }
3363
3410
  }
3364
- class ul extends _s {
3411
+ class xl extends Js {
3365
3412
  constructor() {
3366
3413
  super(...arguments), this.handlers = {};
3367
3414
  }
@@ -3410,55 +3457,55 @@ class ul extends _s {
3410
3457
  });
3411
3458
  }
3412
3459
  }
3413
- let W;
3414
- const Vn = (e) => e.next(), cl = (e) => e.animateUpdates();
3415
- function fl() {
3416
- if (!W)
3460
+ let k;
3461
+ const Mn = (e) => e.next(), Al = (e) => e.animateUpdates();
3462
+ function El() {
3463
+ if (!k)
3417
3464
  return;
3418
- const e = W.sort(dl).map(cl);
3419
- e.forEach(Vn), e.forEach(Vn), W = void 0;
3465
+ const e = k.sort(Cl).map(Al);
3466
+ e.forEach(Mn), e.forEach(Mn), k = void 0;
3420
3467
  }
3421
- function An(e) {
3422
- W ? _a(W, e) : (W = [e], requestAnimationFrame(fl));
3468
+ function Cn(e) {
3469
+ k ? el(k, e) : (k = [e], requestAnimationFrame(El));
3423
3470
  }
3424
- function hl(e) {
3425
- W && Ga(W, e);
3471
+ function Ml(e) {
3472
+ k && nl(k, e);
3426
3473
  }
3427
- function dl(e, t) {
3474
+ function Cl(e, t) {
3428
3475
  return e.getDepth() - t.getDepth();
3429
3476
  }
3430
- function En(e, t, n) {
3477
+ function Pn(e, t, n) {
3431
3478
  return new CustomEvent(e, { detail: { target: t, isExit: n } });
3432
3479
  }
3433
- const Mn = ["initial", "animate", "inView", "hover", "press", "exit"], Mt = /* @__PURE__ */ new WeakMap();
3434
- class pl {
3480
+ const Fn = ["initial", "animate", "inView", "hover", "press", "exit", "drag"], Ft = /* @__PURE__ */ new WeakMap();
3481
+ class Pl {
3435
3482
  constructor(t, n) {
3436
3483
  this.element = null, this.context = {}, this.activeStates = {
3437
3484
  initial: !0,
3438
3485
  animate: !0
3439
3486
  }, this.options = t, this.parent = n, this.depth = (n == null ? void 0 : n.depth) + 1 || 0, this.initContext();
3440
3487
  const s = t.initial === !1 ? "animate" : "initial";
3441
- this.featureManager = new rl(this), this.initTarget(s);
3488
+ this.featureManager = new wl(this), this.initTarget(s);
3442
3489
  }
3443
3490
  initContext() {
3444
3491
  var t;
3445
- for (const n of Mn)
3492
+ for (const n of Fn)
3446
3493
  this.context[n] = typeof this.options[n] == "string" ? this.options[n] : (t = this.parent) == null ? void 0 : t.context[n];
3447
3494
  }
3448
3495
  initTarget(t) {
3449
- this.baseTarget = vn(this.options[t] || this.context[t], this.options.variants) || {}, this.target = { ...this.baseTarget };
3496
+ this.baseTarget = Sn(this.options[t] || this.context[t], this.options.variants) || {}, this.target = { ...this.baseTarget };
3450
3497
  }
3451
3498
  get initial() {
3452
- return yn(this.options.initial) ? this.options.initial : this.context.initial;
3499
+ return wn(this.options.initial) ? this.options.initial : this.context.initial;
3453
3500
  }
3454
3501
  mount(t) {
3455
3502
  var s;
3456
- Ws(
3503
+ Zs(
3457
3504
  !!t,
3458
3505
  "Animation state must be mounted with valid Element"
3459
- ), this.element = t, Mt.set(t, this), L.get(t) || Rs(t);
3460
- const n = L.get(t);
3461
- if (n.update(this.options, (s = this.parent) == null ? void 0 : s.context), typeof this.initial == "object")
3506
+ ), this.element = t, Ft.set(t, this), $.get(t) || ks(t);
3507
+ const n = $.get(t);
3508
+ if (this.visualElement = n, n.triggerBuild(), n.update(this.options, (s = this.parent) == null ? void 0 : s.context), typeof this.initial == "object")
3462
3509
  for (const i in this.initial)
3463
3510
  n.setStaticValue(i, this.initial[i]);
3464
3511
  else if (typeof this.initial == "string" && this.options.variants)
@@ -3468,30 +3515,31 @@ class pl {
3468
3515
  }
3469
3516
  unmount() {
3470
3517
  var t;
3471
- Mt.delete(this.element), hl(this), (t = L.get(this.element)) == null || t.unmount(), this.featureManager.unmount();
3518
+ Ft.delete(this.element), Ml(this), (t = $.get(this.element)) == null || t.unmount(), this.featureManager.unmount();
3472
3519
  }
3473
3520
  update(t) {
3474
- this.options = t, this.featureManager.update(), An(this);
3521
+ var n;
3522
+ this.options = t, this.visualElement.update(this.options, (n = this.parent) == null ? void 0 : n.context), this.featureManager.update(), Cn(this);
3475
3523
  }
3476
3524
  setActive(t, n) {
3477
- this.element && (this.activeStates[t] = n, An(this));
3525
+ this.element && (this.activeStates[t] = n, Cn(this));
3478
3526
  }
3479
3527
  *animateUpdates() {
3480
3528
  const t = this.target;
3481
3529
  this.target = {};
3482
3530
  const n = {};
3483
- for (const l of Mn) {
3531
+ for (const l of Fn) {
3484
3532
  if (!this.activeStates[l])
3485
3533
  continue;
3486
- const u = vn(
3487
- yn(this.options[l]) ? this.options[l] : this.context[l],
3534
+ const u = Sn(
3535
+ wn(this.options[l]) ? this.options[l] : this.context[l],
3488
3536
  this.options.variants
3489
3537
  );
3490
3538
  if (!u)
3491
3539
  continue;
3492
3540
  const c = { ...t, ...u };
3493
3541
  for (const f in c)
3494
- f !== "transition" && (this.target[f] = u[f], n[f] = ka(
3542
+ f !== "transition" && (this.target[f] = u[f], n[f] = sl(
3495
3543
  u.transition ?? this.options.transition ?? {},
3496
3544
  f
3497
3545
  ));
@@ -3502,11 +3550,11 @@ class pl {
3502
3550
  ]), i = [];
3503
3551
  s.forEach((l) => {
3504
3552
  var u;
3505
- this.target[l] === void 0 && (this.target[l] = this.baseTarget[l]), Ka(t[l], this.target[l]) && ((u = this.baseTarget)[l] ?? (u[l] = $s.get(this.element, l)), i.push(
3506
- () => qo(
3553
+ this.target[l] === void 0 && (this.target[l] = this.baseTarget[l]), Qa(t[l], this.target[l]) && ((u = this.baseTarget)[l] ?? (u[l] = Ys.get(this.element, l)), i.push(
3554
+ () => oa(
3507
3555
  this.element,
3508
3556
  {
3509
- [l]: this.target[l] === "none" ? el[l] : this.target[l]
3557
+ [l]: this.target[l] === "none" ? yl[l] : this.target[l]
3510
3558
  },
3511
3559
  n[l] || {}
3512
3560
  )
@@ -3516,13 +3564,13 @@ class pl {
3516
3564
  if (!r.length)
3517
3565
  return;
3518
3566
  const o = this.target;
3519
- this.element.dispatchEvent(En("motionstart", o));
3567
+ this.element.dispatchEvent(Pn("motionstart", o));
3520
3568
  const a = this.activeStates.exit;
3521
3569
  Promise.all(r).then(() => {
3522
- this.element.dispatchEvent(En("motioncomplete", {
3570
+ this.element.dispatchEvent(Pn("motioncomplete", {
3523
3571
  ...o
3524
3572
  }, a));
3525
- }).catch(za);
3573
+ }).catch(il);
3526
3574
  }
3527
3575
  isMounted() {
3528
3576
  return !!this.element;
@@ -3540,20 +3588,23 @@ class pl {
3540
3588
  return this.target;
3541
3589
  }
3542
3590
  }
3543
- const Pl = /* @__PURE__ */ Pt({
3591
+ const zl = /* @__PURE__ */ Ot({
3592
+ name: "Motion",
3593
+ inheritAttrs: !0,
3544
3594
  __name: "Motion",
3545
- props: /* @__PURE__ */ Xs({
3595
+ props: /* @__PURE__ */ ai({
3546
3596
  as: {},
3547
3597
  asChild: { type: Boolean },
3548
- style: {},
3549
- hover: {},
3550
- press: {},
3551
- inView: {},
3552
3598
  inViewOptions: {},
3599
+ inView: {},
3600
+ press: {},
3601
+ hover: {},
3553
3602
  initial: { type: [String, Object, Boolean] },
3554
3603
  animate: {},
3555
3604
  exit: {},
3556
3605
  variants: {},
3606
+ style: {},
3607
+ transformTemplate: { type: Function },
3557
3608
  transition: {},
3558
3609
  onMotionStart: { type: Function },
3559
3610
  onMotionComplete: { type: Function },
@@ -3572,62 +3623,49 @@ const Pl = /* @__PURE__ */ Pt({
3572
3623
  inView: void 0
3573
3624
  }),
3574
3625
  setup(e) {
3575
- const t = e, { initial: n } = $a({ initial: Fn(void 0) }), s = La(null), i = new pl(
3626
+ const t = e, { initial: n } = Ja({ initial: Ln(void 0) }), s = Xa(null), i = new Pl(
3576
3627
  {
3577
3628
  ...t
3578
3629
  },
3579
3630
  s
3580
3631
  );
3581
- Na(i);
3582
- const { primitiveElement: r, currentElement: o } = Ba();
3583
- Zs(() => {
3584
- i.mount(o.value), i.update({
3632
+ Za(i);
3633
+ const { primitiveElement: r, currentElement: o } = qa();
3634
+ $n(() => {
3635
+ i.mount(o.value), Vn(t.as) && Ys.set(o.value, "opacity", ""), i.update({
3585
3636
  ...t,
3586
- style: { ...t.style, ...Wt(i.getTarget()) },
3637
+ style: { ...wt(i.getTarget()), ...t.style },
3587
3638
  initial: n.value === !1 ? n.value : t.initial === !0 ? void 0 : t.initial
3588
3639
  });
3589
- }), Qs(() => {
3590
- });
3591
- let a = !1;
3592
- Js(() => {
3593
- if (!a && o.value) {
3594
- a = !0;
3595
- const c = Wt(i.getTarget());
3596
- for (const f in c)
3597
- $s.set(o.value, f, c[f]);
3598
- }
3640
+ }), Dt(() => {
3641
+ }), li(() => {
3599
3642
  i.update({
3600
3643
  ...t,
3601
3644
  initial: n.value === !1 ? n.value : t.initial === !0 ? void 0 : t.initial
3602
3645
  });
3603
3646
  });
3604
- function l() {
3605
- if (!i.isMounted() && Sn(t.as))
3606
- return i.getTarget();
3607
- }
3608
- function u() {
3609
- return Sn(t.as) || i.isMounted() ? t.style : { ...t.style, ...Wt(i.getTarget()) };
3647
+ function a() {
3648
+ return Vn(t.as) && !i.isMounted() ? { opacity: 0 } : i.isMounted() ? wt(t.style) : { ...wt(t.style), ...wt(i.getTarget()) };
3610
3649
  }
3611
- return (c, f) => (On(), Dn(Cn(sl), ee({
3650
+ return (l, u) => (Kn(), Wn(In(bl), {
3612
3651
  ref_key: "primitiveElement",
3613
3652
  ref: r,
3614
- as: c.as,
3615
- "as-child": c.asChild
3616
- }, l(), {
3617
- style: u()
3618
- }), {
3619
- default: Rn(() => [
3620
- In(c.$slots, "default")
3653
+ as: l.as,
3654
+ "as-child": l.asChild,
3655
+ style: ui(a())
3656
+ }, {
3657
+ default: _n(() => [
3658
+ Gn(l.$slots, "default")
3621
3659
  ]),
3622
3660
  _: 3
3623
- }, 16, ["as", "as-child", "style"]));
3661
+ }, 8, ["as", "as-child", "style"]));
3624
3662
  }
3625
- }), te = /* @__PURE__ */ new WeakMap();
3626
- function Pn(e) {
3627
- const t = te.get(e);
3628
- t && e.removeEventListener("motioncomplete", t), te.delete(e);
3663
+ }), ie = /* @__PURE__ */ new WeakMap();
3664
+ function On(e) {
3665
+ const t = ie.get(e);
3666
+ t && e.removeEventListener("motioncomplete", t), ie.delete(e);
3629
3667
  }
3630
- const [Cl, ml] = Ve("AnimatePresenceContext"), Fl = /* @__PURE__ */ Pt({
3668
+ const [jl, Fl] = Ee("AnimatePresenceContext"), Ul = /* @__PURE__ */ Ot({
3631
3669
  name: "AnimatePresence",
3632
3670
  inheritAttrs: !1,
3633
3671
  __name: "AnimatePresence",
@@ -3638,26 +3676,26 @@ const [Cl, ml] = Ve("AnimatePresenceContext"), Fl = /* @__PURE__ */ Pt({
3638
3676
  as: {}
3639
3677
  },
3640
3678
  setup(e) {
3641
- const t = e, { initial: n } = ti(t);
3642
- ml({
3679
+ const t = e, { initial: n } = ci(t);
3680
+ Fl({
3643
3681
  initial: n
3644
3682
  });
3645
3683
  function s(r) {
3646
- const o = Mt.get(r);
3647
- o && (Pn(r), o.setActive("exit", !1));
3684
+ const o = Ft.get(r);
3685
+ o && (On(r), o.setActive("exit", !1));
3648
3686
  }
3649
3687
  function i(r, o) {
3650
- const a = Mt.get(r);
3688
+ const a = Ft.get(r);
3651
3689
  if (!a)
3652
3690
  return o();
3653
- a.setActive("exit", !0), Pn(r);
3691
+ a.setActive("exit", !0), On(r);
3654
3692
  function l(u) {
3655
3693
  var c;
3656
3694
  (c = u == null ? void 0 : u.detail) != null && c.isExit && o();
3657
3695
  }
3658
- te.set(r, l), r.addEventListener("motioncomplete", l);
3696
+ ie.set(r, l), r.addEventListener("motioncomplete", l);
3659
3697
  }
3660
- return (r, o) => (On(), Dn(ei(r.multiple ? ni : si), ee({
3698
+ return (r, o) => (Kn(), Wn(fi(r.multiple ? hi : di), Nn({
3661
3699
  tag: r.multiple ? r.as : void 0,
3662
3700
  css: !1,
3663
3701
  mode: r.mode === "wait" ? "out-in" : void 0
@@ -3665,58 +3703,203 @@ const [Cl, ml] = Ve("AnimatePresenceContext"), Fl = /* @__PURE__ */ Pt({
3665
3703
  onEnter: s,
3666
3704
  onLeave: i
3667
3705
  }), {
3668
- default: Rn(() => [
3669
- In(r.$slots, "default")
3706
+ default: _n(() => [
3707
+ Gn(r.$slots, "default")
3670
3708
  ]),
3671
3709
  _: 3
3672
3710
  }, 16, ["tag", "mode"]));
3673
3711
  }
3674
3712
  });
3713
+ function Pe(e) {
3714
+ const t = D(e()), n = () => t.set(e()), s = () => E.preRender(n, !1, !0);
3715
+ let i;
3716
+ const r = (a) => {
3717
+ i = a.map((l) => l.on("change", s));
3718
+ }, o = () => {
3719
+ i.forEach((a) => a()), R(n);
3720
+ };
3721
+ return Dt(() => {
3722
+ o();
3723
+ }), {
3724
+ subscribe: r,
3725
+ unsubscribe: o,
3726
+ value: t
3727
+ };
3728
+ }
3729
+ function Ol(e) {
3730
+ G.current = [];
3731
+ const { value: t, subscribe: n, unsubscribe: s } = Pe(e);
3732
+ return n(G.current), G.current = void 0, kn(() => {
3733
+ s(), G.current = [], e(), n(G.current), G.current = void 0;
3734
+ }), t;
3735
+ }
3736
+ function Hl(e, t, n, s) {
3737
+ if (typeof e == "function")
3738
+ return Ol(e);
3739
+ const i = typeof t == "function" ? t : ja(t, n, s);
3740
+ return Array.isArray(e) ? Dn(
3741
+ e,
3742
+ i
3743
+ ) : Dn([e], ([r]) => i(r));
3744
+ }
3745
+ function Dn(e, t) {
3746
+ const n = [], { value: s, subscribe: i } = Pe(() => {
3747
+ n.length = 0;
3748
+ const r = e.length;
3749
+ for (let o = 0; o < r; o++)
3750
+ n[o] = e[o].get();
3751
+ return t(n);
3752
+ });
3753
+ return i(e), s;
3754
+ }
3755
+ function Dl(e) {
3756
+ let t = 0;
3757
+ const n = ({ timestamp: i, delta: r }) => {
3758
+ t || (t = i), e(i - t, r);
3759
+ }, s = () => R(n);
3760
+ kn(() => {
3761
+ s(), E.update(n, !0);
3762
+ }), Dt(() => s()), E.update(n, !0);
3763
+ }
3764
+ function Yl() {
3765
+ const e = D(0);
3766
+ return Dl((t) => e.set(t)), e;
3767
+ }
3768
+ function ql(e, ...t) {
3769
+ const n = e.length;
3770
+ function s() {
3771
+ let o = "";
3772
+ for (let a = 0; a < n; a++) {
3773
+ o += e[a];
3774
+ const l = t[a];
3775
+ l && (o += ut(l) ? l.get() : l);
3776
+ }
3777
+ return o;
3778
+ }
3779
+ const { value: i, subscribe: r } = Pe(s);
3780
+ return r(t.filter(ut)), i;
3781
+ }
3782
+ function Bn(e) {
3783
+ return typeof e == "number" ? e : parseFloat(e);
3784
+ }
3785
+ function Xl(e, t = {}) {
3786
+ let n = null;
3787
+ const s = D(
3788
+ ut(e) ? Bn(e.get()) : e
3789
+ );
3790
+ let i = s.get(), r = () => {
3791
+ };
3792
+ const o = () => {
3793
+ n && (n.stop(), n = null);
3794
+ }, a = () => {
3795
+ const l = n;
3796
+ (l == null ? void 0 : l.time) === 0 && l.sample(Z.delta), o(), n = Jr({
3797
+ keyframes: [s.get(), i],
3798
+ velocity: s.getVelocity(),
3799
+ type: "spring",
3800
+ restDelta: 1e-3,
3801
+ restSpeed: 0.01,
3802
+ ...t,
3803
+ onUpdate: r
3804
+ });
3805
+ };
3806
+ return zn(() => JSON.stringify(t), () => {
3807
+ const l = s.attach((u, c) => (i = u, r = c, E.update(a), s.get()), o);
3808
+ pi(() => l());
3809
+ }, { immediate: !0 }), ut(e) && e.on("change", (l) => {
3810
+ s.set(Bn(l));
3811
+ }), s;
3812
+ }
3813
+ function Rn(e, t) {
3814
+ Xs(
3815
+ !!(!t || t.value),
3816
+ `You have defined a ${e} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref.`
3817
+ );
3818
+ }
3819
+ function Bl() {
3820
+ return {
3821
+ scrollX: D(0),
3822
+ scrollY: D(0),
3823
+ scrollXProgress: D(0),
3824
+ scrollYProgress: D(0)
3825
+ };
3826
+ }
3827
+ function Zl({
3828
+ container: e,
3829
+ target: t,
3830
+ ...n
3831
+ } = {}) {
3832
+ const s = Bl();
3833
+ let i;
3834
+ const r = () => {
3835
+ i == null || i(), i = Ka(
3836
+ (o, { x: a, y: l }) => {
3837
+ s.scrollX.set(a.current), s.scrollXProgress.set(a.progress), s.scrollY.set(l.current), s.scrollYProgress.set(l.progress);
3838
+ },
3839
+ {
3840
+ ...n,
3841
+ container: (e == null ? void 0 : e.value) ?? void 0,
3842
+ target: (t == null ? void 0 : t.value) ?? void 0
3843
+ }
3844
+ );
3845
+ };
3846
+ return $n(() => {
3847
+ Rn("target", t), Rn("container", e), r();
3848
+ }), Dt(() => i == null ? void 0 : i()), zn(
3849
+ () => [e == null ? void 0 : e.value, t == null ? void 0 : t.value, n.offset],
3850
+ r
3851
+ ), s;
3852
+ }
3675
3853
  export {
3676
- Fl as AnimatePresence,
3677
- Pl as Motion,
3678
- fi as MotionValue,
3679
- qo as animate,
3680
- vl as animateMini,
3681
- Yn as anticipate,
3682
- le as backIn,
3683
- qn as backInOut,
3684
- Hn as backOut,
3685
- _ as cancelFrame,
3686
- El as cancelSync,
3687
- ue as circIn,
3688
- Xn as circInOut,
3689
- Gi as circOut,
3690
- j as clamp,
3691
- Ho as createScopedAnimate,
3692
- mt as cubicBezier,
3693
- xl as delay,
3694
- gn as distance,
3695
- Vl as distance2D,
3696
- Vr as easeIn,
3697
- ps as easeInOut,
3698
- Ar as easeOut,
3699
- M as frame,
3700
- st as frameData,
3701
- yl as frameSteps,
3702
- Pa as inView,
3703
- Qe as inertia,
3704
- be as interpolate,
3705
- R as invariant,
3706
- xt as keyframes,
3707
- jn as mirrorEasing,
3708
- gs as mix,
3709
- it as motionValue,
3710
- ye as pipe,
3711
- ft as progress,
3712
- Un as reverseEasing,
3713
- bl as scroll,
3714
- xe as scrollInfo,
3715
- ie as spring,
3716
- Tl as stagger,
3717
- wl as steps,
3718
- Al as sync,
3719
- Sl as transform,
3720
- ut as warning,
3721
- Si as wrap
3854
+ Ul as AnimatePresence,
3855
+ zl as Motion,
3856
+ Ti as MotionValue,
3857
+ oa as animate,
3858
+ Ll as animateMini,
3859
+ rs as anticipate,
3860
+ fe as backIn,
3861
+ is as backInOut,
3862
+ ss as backOut,
3863
+ R as cancelFrame,
3864
+ Gl as cancelSync,
3865
+ he as circIn,
3866
+ os as circInOut,
3867
+ Qi as circOut,
3868
+ H as clamp,
3869
+ ra as createScopedAnimate,
3870
+ yt as cubicBezier,
3871
+ Kl as delay,
3872
+ bn as distance,
3873
+ Wl as distance2D,
3874
+ Ir as easeIn,
3875
+ xs as easeInOut,
3876
+ Lr as easeOut,
3877
+ E as frame,
3878
+ Z as frameData,
3879
+ Il as frameSteps,
3880
+ _a as inView,
3881
+ en as inertia,
3882
+ Te as interpolate,
3883
+ I as invariant,
3884
+ Et as keyframes,
3885
+ es as mirrorEasing,
3886
+ Es as mix,
3887
+ D as motionValue,
3888
+ we as pipe,
3889
+ dt as progress,
3890
+ ns as reverseEasing,
3891
+ Ka as scroll,
3892
+ Ae as scrollInfo,
3893
+ ae as spring,
3894
+ $l as stagger,
3895
+ Nl as steps,
3896
+ _l as sync,
3897
+ ja as transform,
3898
+ ql as useMotionTemplate,
3899
+ Zl as useScroll,
3900
+ Xl as useSpring,
3901
+ Yl as useTime,
3902
+ Hl as useTransform,
3903
+ ft as warning,
3904
+ Bi as wrap
3722
3905
  };