@vezham/start 0.2.1 → 0.3.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.
@@ -1,20 +1,15 @@
1
- import { r as bt, t as Tt, a as bn, m as Q, i as O, b as Tn, n as q, c as De, d as Vt, e as k, p as ge, f as Vn, g as St, h as F, j as Fe, k as Y, l as Sn, v as An, q as xn, w as ie, s as ee, x as wn, y as He, z as ye, A as Mn, B as re, M as Cn, C as At, D as xt, E as wt, F as We, G as Mt, H as Pn, I as Ct, J as Dn, K as Fn, L as ze, S as Rn, N as In, O as On, P as En, Q as Kn, R as Nn, T as Bn, U as Ln, V as _n, W as kn, X as Gn, Y as Un, Z as $n } from "./index-BsvrQ2Uq.mjs";
2
- import { Fragment as jn } from "react";
1
+ import { r as wn, a as xt, t as wt, b as Mn, m as ee, i as R, c as Pn, n as q, d as Re, e as Mt, f as G, p as ye, g as Cn, h as Pt, j as F, k as Ee, l as X, q as Dn, v as Fn, s as On, w as re, x as te, y as In, z as Ye, A as ve, B as Rn, C as oe, M as En, D as Ct, E as Dt, F as Ft, G as qe, H as Ot, I as Kn, J as It, K as Nn, L as Bn, N as Xe, S as kn, O as Ln, P as _n, Q as Gn, R as Un, T as $n, U as jn, V as Hn, W as Wn, X as zn, Y as Yn, Z as qn, _ as Xn } from "./index-BSmv-Jo5.mjs";
2
+ import { Fragment as Zn } from "react";
3
3
  // @__NO_SIDE_EFFECTS__
4
- function Re(t) {
4
+ function Ke(t) {
5
5
  let e;
6
6
  return () => (e === void 0 && (e = t()), e);
7
7
  }
8
- const Ie = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
8
+ const Ne = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
9
9
  const s = e - t;
10
10
  return s === 0 ? 1 : (n - t) / s;
11
- }, I = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, E = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
12
- function X(t, e, n) {
13
- const s = t.getProps();
14
- return bt(s, e, n !== void 0 ? n : s.custom, t);
15
- }
16
- const Hn = /* @__PURE__ */ Re(() => window.ScrollTimeline !== void 0);
17
- class Wn {
11
+ }, I = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, E = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3, Jn = /* @__PURE__ */ Ke(() => window.ScrollTimeline !== void 0);
12
+ class Qn {
18
13
  constructor(e) {
19
14
  this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
20
15
  }
@@ -33,7 +28,7 @@ class Wn {
33
28
  }
34
29
  attachTimeline(e, n) {
35
30
  const s = this.animations.map((i) => {
36
- if (Hn() && i.attachTimeline)
31
+ if (Jn() && i.attachTimeline)
37
32
  return i.attachTimeline(e);
38
33
  if (typeof n == "function")
39
34
  return n(i);
@@ -84,108 +79,97 @@ class Wn {
84
79
  this.runAll("complete");
85
80
  }
86
81
  }
87
- class zn extends Wn {
82
+ class es extends Qn {
88
83
  then(e, n) {
89
84
  return Promise.all(this.animations).then(e).catch(n);
90
85
  }
91
86
  }
92
- function Pt(t, e) {
87
+ function Rt(t, e) {
93
88
  return t ? t[e] || t.default || t : void 0;
94
89
  }
95
- const ve = 2e4;
96
- function Dt(t) {
90
+ const be = 2e4;
91
+ function Et(t) {
97
92
  let e = 0;
98
93
  const n = 50;
99
94
  let s = t.next(e);
100
- for (; !s.done && e < ve; )
95
+ for (; !s.done && e < be; )
101
96
  e += n, s = t.next(e);
102
- return e >= ve ? 1 / 0 : e;
97
+ return e >= be ? 1 / 0 : e;
103
98
  }
104
- function Oe(t) {
99
+ function Be(t) {
105
100
  return typeof t == "function";
106
101
  }
107
- function qe(t, e) {
102
+ function Ze(t, e) {
108
103
  t.timeline = e, t.onfinish = null;
109
104
  }
110
- const Ee = (t) => Array.isArray(t) && typeof t[0] == "number", qn = {
105
+ const ke = (t) => Array.isArray(t) && typeof t[0] == "number", ts = {
111
106
  linearEasing: void 0
112
107
  };
113
- function Yn(t, e) {
114
- const n = /* @__PURE__ */ Re(t);
108
+ function ns(t, e) {
109
+ const n = /* @__PURE__ */ Ke(t);
115
110
  return () => {
116
111
  var s;
117
- return (s = qn[e]) !== null && s !== void 0 ? s : n();
112
+ return (s = ts[e]) !== null && s !== void 0 ? s : n();
118
113
  };
119
114
  }
120
- const te = /* @__PURE__ */ Yn(() => {
115
+ const ne = /* @__PURE__ */ ns(() => {
121
116
  try {
122
117
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
123
118
  } catch {
124
119
  return !1;
125
120
  }
126
121
  return !0;
127
- }, "linearEasing"), Ft = (t, e, n = 10) => {
122
+ }, "linearEasing"), Kt = (t, e, n = 10) => {
128
123
  let s = "";
129
124
  const i = Math.max(Math.round(e / n), 2);
130
125
  for (let r = 0; r < i; r++)
131
- s += t(/* @__PURE__ */ Ie(0, i - 1, r)) + ", ";
126
+ s += t(/* @__PURE__ */ Ne(0, i - 1, r)) + ", ";
132
127
  return `linear(${s.substring(0, s.length - 2)})`;
133
128
  };
134
- function Rt(t) {
135
- return !!(typeof t == "function" && te() || !t || typeof t == "string" && (t in be || te()) || Ee(t) || Array.isArray(t) && t.every(Rt));
129
+ function Nt(t) {
130
+ return !!(typeof t == "function" && ne() || !t || typeof t == "string" && (t in Te || ne()) || ke(t) || Array.isArray(t) && t.every(Nt));
136
131
  }
137
- const j = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, be = {
132
+ const H = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, Te = {
138
133
  linear: "linear",
139
134
  ease: "ease",
140
135
  easeIn: "ease-in",
141
136
  easeOut: "ease-out",
142
137
  easeInOut: "ease-in-out",
143
- circIn: /* @__PURE__ */ j([0, 0.65, 0.55, 1]),
144
- circOut: /* @__PURE__ */ j([0.55, 0, 1, 0.45]),
145
- backIn: /* @__PURE__ */ j([0.31, 0.01, 0.66, -0.59]),
146
- backOut: /* @__PURE__ */ j([0.33, 1.53, 0.69, 0.99])
138
+ circIn: /* @__PURE__ */ H([0, 0.65, 0.55, 1]),
139
+ circOut: /* @__PURE__ */ H([0.55, 0, 1, 0.45]),
140
+ backIn: /* @__PURE__ */ H([0.31, 0.01, 0.66, -0.59]),
141
+ backOut: /* @__PURE__ */ H([0.33, 1.53, 0.69, 0.99])
147
142
  };
148
- function It(t, e) {
143
+ function Bt(t, e) {
149
144
  if (t)
150
- return typeof t == "function" && te() ? Ft(t, e) : Ee(t) ? j(t) : Array.isArray(t) ? t.map((n) => It(n, e) || be.easeOut) : be[t];
145
+ return typeof t == "function" && ne() ? Kt(t, e) : ke(t) ? H(t) : Array.isArray(t) ? t.map((n) => Bt(n, e) || Te.easeOut) : Te[t];
151
146
  }
152
- const Xn = {
147
+ const ss = {
153
148
  y: !1
154
149
  };
155
- function Zn() {
156
- return Xn.y;
157
- }
158
- function Jn(t, e, n) {
159
- var s;
160
- if (t instanceof EventTarget)
161
- return [t];
162
- if (typeof t == "string") {
163
- let i = document;
164
- const r = (s = void 0) !== null && s !== void 0 ? s : i.querySelectorAll(t);
165
- return r ? Array.from(r) : [];
166
- }
167
- return Array.from(t);
150
+ function is() {
151
+ return ss.y;
168
152
  }
169
- function Ot(t, e) {
170
- const n = Jn(t), s = new AbortController(), i = {
153
+ function kt(t, e) {
154
+ const n = wn(t), s = new AbortController(), i = {
171
155
  passive: !0,
172
156
  ...e,
173
157
  signal: s.signal
174
158
  };
175
159
  return [n, i, () => s.abort()];
176
160
  }
177
- function Ye(t) {
178
- return !(t.pointerType === "touch" || Zn());
161
+ function Je(t) {
162
+ return !(t.pointerType === "touch" || is());
179
163
  }
180
- function Qn(t, e, n = {}) {
181
- const [s, i, r] = Ot(t, n), o = (a) => {
182
- if (!Ye(a))
164
+ function rs(t, e, n = {}) {
165
+ const [s, i, r] = kt(t, n), o = (a) => {
166
+ if (!Je(a))
183
167
  return;
184
168
  const { target: l } = a, u = e(l, a);
185
169
  if (typeof u != "function" || !l)
186
170
  return;
187
171
  const c = (d) => {
188
- Ye(d) && (u(d), l.removeEventListener("pointerleave", c));
172
+ Je(d) && (u(d), l.removeEventListener("pointerleave", c));
189
173
  };
190
174
  l.addEventListener("pointerleave", c, i);
191
175
  };
@@ -193,7 +177,7 @@ function Qn(t, e, n = {}) {
193
177
  a.addEventListener("pointerenter", o, i);
194
178
  }), r;
195
179
  }
196
- function Xe(t, e) {
180
+ function Qe(t, e) {
197
181
  const n = `${e}PointerCapture`;
198
182
  if (t.target instanceof Element && n in t.target && t.pointerId !== void 0)
199
183
  try {
@@ -201,58 +185,58 @@ function Xe(t, e) {
201
185
  } catch {
202
186
  }
203
187
  }
204
- const Et = (t, e) => e ? t === e ? !0 : Et(t, e.parentElement) : !1, es = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, ts = /* @__PURE__ */ new Set([
188
+ const Lt = (t, e) => e ? t === e ? !0 : Lt(t, e.parentElement) : !1, os = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, as = /* @__PURE__ */ new Set([
205
189
  "BUTTON",
206
190
  "INPUT",
207
191
  "SELECT",
208
192
  "TEXTAREA",
209
193
  "A"
210
194
  ]);
211
- function ns(t) {
212
- return ts.has(t.tagName) || t.tabIndex !== -1;
195
+ function ls(t) {
196
+ return as.has(t.tagName) || t.tabIndex !== -1;
213
197
  }
214
- const H = /* @__PURE__ */ new WeakSet();
215
- function Ze(t) {
198
+ const W = /* @__PURE__ */ new WeakSet();
199
+ function et(t) {
216
200
  return (e) => {
217
201
  e.key === "Enter" && t(e);
218
202
  };
219
203
  }
220
- function de(t, e) {
204
+ function he(t, e) {
221
205
  t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
222
206
  }
223
- const ss = (t, e) => {
207
+ const us = (t, e) => {
224
208
  const n = t.currentTarget;
225
209
  if (!n)
226
210
  return;
227
- const s = Ze(() => {
228
- if (H.has(n))
211
+ const s = et(() => {
212
+ if (W.has(n))
229
213
  return;
230
- de(n, "down");
231
- const i = Ze(() => {
232
- de(n, "up");
233
- }), r = () => de(n, "cancel");
214
+ he(n, "down");
215
+ const i = et(() => {
216
+ he(n, "up");
217
+ }), r = () => he(n, "cancel");
234
218
  n.addEventListener("keyup", i, e), n.addEventListener("blur", r, e);
235
219
  });
236
220
  n.addEventListener("keydown", s, e), n.addEventListener("blur", () => n.removeEventListener("keydown", s), e);
237
221
  };
238
- function Je(t) {
239
- return es(t) && !0;
222
+ function tt(t) {
223
+ return os(t) && !0;
240
224
  }
241
- function is(t, e, n = {}) {
242
- const [s, i, r] = Ot(t, n), o = (a) => {
225
+ function cs(t, e, n = {}) {
226
+ const [s, i, r] = kt(t, n), o = (a) => {
243
227
  const l = a.currentTarget;
244
- if (!l || !Je(a) || H.has(l))
228
+ if (!l || !tt(a) || W.has(l))
245
229
  return;
246
- H.add(l), Xe(a, "set");
230
+ W.add(l), Qe(a, "set");
247
231
  const u = e(l, a), c = (f, b) => {
248
- l.removeEventListener("pointerup", d), l.removeEventListener("pointercancel", h), Xe(f, "release"), !(!Je(f) || !H.has(l)) && (H.delete(l), typeof u == "function" && u(f, { success: b }));
232
+ l.removeEventListener("pointerup", d), l.removeEventListener("pointercancel", h), Qe(f, "release"), !(!tt(f) || !W.has(l)) && (W.delete(l), typeof u == "function" && u(f, { success: b }));
249
233
  }, d = (f) => {
250
- (f.isTrusted ? rs(f, l instanceof Element ? l.getBoundingClientRect() : {
234
+ (f.isTrusted ? ds(f, l instanceof Element ? l.getBoundingClientRect() : {
251
235
  left: 0,
252
236
  top: 0,
253
237
  right: window.innerWidth,
254
238
  bottom: window.innerHeight
255
- }) : !1) ? c(f, !1) : c(f, !(l instanceof Element) || Et(l, f.target));
239
+ }) : !1) ? c(f, !1) : c(f, !(l instanceof Element) || Lt(l, f.target));
256
240
  }, h = (f) => {
257
241
  c(f, !1);
258
242
  };
@@ -261,85 +245,89 @@ function is(t, e, n = {}) {
261
245
  return s.forEach((a) => {
262
246
  a = n.useGlobalTarget ? window : a;
263
247
  let l = !1;
264
- a instanceof HTMLElement && (l = !0, !ns(a) && a.getAttribute("tabindex") === null && (a.tabIndex = 0)), a.addEventListener("pointerdown", o, i), l && a.addEventListener("focus", (u) => ss(u, i), i);
248
+ a instanceof HTMLElement && (l = !0, !ls(a) && a.getAttribute("tabindex") === null && (a.tabIndex = 0)), a.addEventListener("pointerdown", o, i), l && a.addEventListener("focus", (u) => us(u, i), i);
265
249
  }), r;
266
250
  }
267
- function rs(t, e) {
251
+ function ds(t, e) {
268
252
  return t.clientX < e.left || t.clientX > e.right || t.clientY < e.top || t.clientY > e.bottom;
269
253
  }
270
- const Kt = /* @__PURE__ */ new Set([
254
+ function Z(t, e, n) {
255
+ const s = t.getProps();
256
+ return xt(s, e, n !== void 0 ? n : s.custom, t);
257
+ }
258
+ const _t = /* @__PURE__ */ new Set([
271
259
  "width",
272
260
  "height",
273
261
  "top",
274
262
  "left",
275
263
  "right",
276
264
  "bottom",
277
- ...Tt
265
+ ...wt
278
266
  ]);
279
- function os(t, e, n) {
280
- t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Q(n));
267
+ function hs(t, e, n) {
268
+ t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, ee(n));
281
269
  }
282
- function as(t, e) {
283
- const n = X(t, e);
270
+ function fs(t, e) {
271
+ const n = Z(t, e);
284
272
  let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
285
273
  r = { ...r, ...s };
286
274
  for (const o in r) {
287
- const a = bn(r[o]);
288
- os(t, o, a);
275
+ const a = Mn(r[o]);
276
+ hs(t, o, a);
289
277
  }
290
278
  }
291
- function ls(t) {
292
- return !!(O(t) && t.add);
279
+ function ps(t) {
280
+ return !!(R(t) && t.add);
293
281
  }
294
- function us(t, e) {
282
+ function ms(t, e) {
295
283
  const n = t.getValue("willChange");
296
- if (ls(n))
284
+ if (ps(n))
297
285
  return n.add(e);
298
286
  }
299
- function cs(t) {
300
- return t.props[Tn];
287
+ function gs(t) {
288
+ return t.props[Pn];
301
289
  }
302
- const Nt = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, ds = 1e-7, hs = 12;
303
- function fs(t, e, n, s, i) {
290
+ const Gt = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, ys = 1e-7, vs = 12;
291
+ function bs(t, e, n, s, i) {
304
292
  let r, o, a = 0;
305
293
  do
306
- o = e + (n - e) / 2, r = Nt(o, s, i) - t, r > 0 ? n = o : e = o;
307
- while (Math.abs(r) > ds && ++a < hs);
294
+ o = e + (n - e) / 2, r = Gt(o, s, i) - t, r > 0 ? n = o : e = o;
295
+ while (Math.abs(r) > ys && ++a < vs);
308
296
  return o;
309
297
  }
310
- function J(t, e, n, s) {
298
+ function Q(t, e, n, s) {
311
299
  if (t === e && n === s)
312
300
  return q;
313
- const i = (r) => fs(r, 0, 1, t, n);
314
- return (r) => r === 0 || r === 1 ? r : Nt(i(r), e, s);
301
+ const i = (r) => bs(r, 0, 1, t, n);
302
+ return (r) => r === 0 || r === 1 ? r : Gt(i(r), e, s);
315
303
  }
316
- const Bt = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Lt = (t) => (e) => 1 - t(1 - e), _t = /* @__PURE__ */ J(0.33, 1.53, 0.69, 0.99), Ke = /* @__PURE__ */ Lt(_t), kt = /* @__PURE__ */ Bt(Ke), Gt = (t) => (t *= 2) < 1 ? 0.5 * Ke(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Ne = (t) => 1 - Math.sin(Math.acos(t)), ps = Lt(Ne), Ut = Bt(Ne), $t = (t) => /^0[^.\s]+$/u.test(t);
317
- function ms(t) {
318
- return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || $t(t) : !0;
304
+ const Ut = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, $t = (t) => (e) => 1 - t(1 - e), jt = /* @__PURE__ */ Q(0.33, 1.53, 0.69, 0.99), Le = /* @__PURE__ */ $t(jt), Ht = /* @__PURE__ */ Ut(Le), Wt = (t) => (t *= 2) < 1 ? 0.5 * Le(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), _e = (t) => 1 - Math.sin(Math.acos(t)), Ts = $t(_e), zt = Ut(_e), Yt = (t) => /^0[^.\s]+$/u.test(t);
305
+ function Vs(t) {
306
+ return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Yt(t) : !0;
319
307
  }
320
- const W = (t) => Math.round(t * 1e5) / 1e5, Be = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
321
- function gs(t) {
308
+ const z = (t) => Math.round(t * 1e5) / 1e5, Ge = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
309
+ function Ss(t) {
322
310
  return t == null;
323
311
  }
324
- const ys = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Le = (t, e) => (n) => !!(typeof n == "string" && ys.test(n) && n.startsWith(t) || e && !gs(n) && Object.prototype.hasOwnProperty.call(n, e)), jt = (t, e, n) => (s) => {
312
+ const As = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Ue = (t, e) => (n) => !!(typeof n == "string" && As.test(n) && n.startsWith(t) || e && !Ss(n) && Object.prototype.hasOwnProperty.call(n, e)), qt = (t, e, n) => (s) => {
325
313
  if (typeof s != "string")
326
314
  return s;
327
- const [i, r, o, a] = s.match(Be);
315
+ const [i, r, o, a] = s.match(Ge);
328
316
  return {
329
317
  [t]: parseFloat(i),
330
318
  [e]: parseFloat(r),
331
319
  [n]: parseFloat(o),
332
320
  alpha: a !== void 0 ? parseFloat(a) : 1
333
321
  };
334
- }, vs = (t) => k(0, 255, t), he = {
335
- ...De,
336
- transform: (t) => Math.round(vs(t))
322
+ }, xs = (t) => G(0, 255, t), fe = {
323
+ ...Re,
324
+ transform: (t) => Math.round(xs(t))
337
325
  }, N = {
338
- test: /* @__PURE__ */ Le("rgb", "red"),
339
- parse: /* @__PURE__ */ jt("red", "green", "blue"),
340
- transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + he.transform(t) + ", " + he.transform(e) + ", " + he.transform(n) + ", " + W(Vt.transform(s)) + ")"
326
+ test: /* @__PURE__ */ Ue("rgb", "red"),
327
+ parse: /* @__PURE__ */ qt("red", "green", "blue"),
328
+ transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + fe.transform(t) + ", " + fe.transform(e) + ", " + fe.transform(n) + ", " + z(Mt.transform(s)) + ")"
341
329
  };
342
- function bs(t) {
330
+ function ws(t) {
343
331
  let e = "", n = "", s = "", i = "";
344
332
  return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), {
345
333
  red: parseInt(e, 16),
@@ -348,79 +336,79 @@ function bs(t) {
348
336
  alpha: i ? parseInt(i, 16) / 255 : 1
349
337
  };
350
338
  }
351
- const Te = {
352
- test: /* @__PURE__ */ Le("#"),
353
- parse: bs,
339
+ const Ve = {
340
+ test: /* @__PURE__ */ Ue("#"),
341
+ parse: ws,
354
342
  transform: N.transform
355
343
  }, _ = {
356
- test: /* @__PURE__ */ Le("hsl", "hue"),
357
- parse: /* @__PURE__ */ jt("hue", "saturation", "lightness"),
358
- transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + ge.transform(W(e)) + ", " + ge.transform(W(n)) + ", " + W(Vt.transform(s)) + ")"
344
+ test: /* @__PURE__ */ Ue("hsl", "hue"),
345
+ parse: /* @__PURE__ */ qt("hue", "saturation", "lightness"),
346
+ transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + ye.transform(z(e)) + ", " + ye.transform(z(n)) + ", " + z(Mt.transform(s)) + ")"
359
347
  }, w = {
360
- test: (t) => N.test(t) || Te.test(t) || _.test(t),
361
- parse: (t) => N.test(t) ? N.parse(t) : _.test(t) ? _.parse(t) : Te.parse(t),
348
+ test: (t) => N.test(t) || Ve.test(t) || _.test(t),
349
+ parse: (t) => N.test(t) ? N.parse(t) : _.test(t) ? _.parse(t) : Ve.parse(t),
362
350
  transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? N.transform(t) : _.transform(t)
363
- }, Ts = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
364
- function Vs(t) {
351
+ }, Ms = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
352
+ function Ps(t) {
365
353
  var e, n;
366
- return isNaN(t) && typeof t == "string" && (((e = t.match(Be)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(Ts)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
354
+ return isNaN(t) && typeof t == "string" && (((e = t.match(Ge)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(Ms)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
367
355
  }
368
- const Ht = "number", Wt = "color", Ss = "var", As = "var(", Qe = "${}", xs = /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;
369
- function Z(t) {
356
+ const Xt = "number", Zt = "color", Cs = "var", Ds = "var(", nt = "${}", Fs = /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;
357
+ function J(t) {
370
358
  const e = t.toString(), n = [], s = {
371
359
  color: [],
372
360
  number: [],
373
361
  var: []
374
362
  }, i = [];
375
363
  let r = 0;
376
- const a = e.replace(xs, (l) => (w.test(l) ? (s.color.push(r), i.push(Wt), n.push(w.parse(l))) : l.startsWith(As) ? (s.var.push(r), i.push(Ss), n.push(l)) : (s.number.push(r), i.push(Ht), n.push(parseFloat(l))), ++r, Qe)).split(Qe);
364
+ const a = e.replace(Fs, (l) => (w.test(l) ? (s.color.push(r), i.push(Zt), n.push(w.parse(l))) : l.startsWith(Ds) ? (s.var.push(r), i.push(Cs), n.push(l)) : (s.number.push(r), i.push(Xt), n.push(parseFloat(l))), ++r, nt)).split(nt);
377
365
  return { values: n, split: a, indexes: s, types: i };
378
366
  }
379
- function zt(t) {
380
- return Z(t).values;
367
+ function Jt(t) {
368
+ return J(t).values;
381
369
  }
382
- function qt(t) {
383
- const { split: e, types: n } = Z(t), s = e.length;
370
+ function Qt(t) {
371
+ const { split: e, types: n } = J(t), s = e.length;
384
372
  return (i) => {
385
373
  let r = "";
386
374
  for (let o = 0; o < s; o++)
387
375
  if (r += e[o], i[o] !== void 0) {
388
376
  const a = n[o];
389
- a === Ht ? r += W(i[o]) : a === Wt ? r += w.transform(i[o]) : r += i[o];
377
+ a === Xt ? r += z(i[o]) : a === Zt ? r += w.transform(i[o]) : r += i[o];
390
378
  }
391
379
  return r;
392
380
  };
393
381
  }
394
- const ws = (t) => typeof t == "number" ? 0 : t;
395
- function Ms(t) {
396
- const e = zt(t);
397
- return qt(t)(e.map(ws));
398
- }
399
- const U = {
400
- test: Vs,
401
- parse: zt,
402
- createTransformer: qt,
403
- getAnimatableNone: Ms
404
- }, Cs = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
405
- function Ps(t) {
382
+ const Os = (t) => typeof t == "number" ? 0 : t;
383
+ function Is(t) {
384
+ const e = Jt(t);
385
+ return Qt(t)(e.map(Os));
386
+ }
387
+ const $ = {
388
+ test: Ps,
389
+ parse: Jt,
390
+ createTransformer: Qt,
391
+ getAnimatableNone: Is
392
+ }, Rs = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
393
+ function Es(t) {
406
394
  const [e, n] = t.slice(0, -1).split("(");
407
395
  if (e === "drop-shadow")
408
396
  return t;
409
- const [s] = n.match(Be) || [];
397
+ const [s] = n.match(Ge) || [];
410
398
  if (!s)
411
399
  return t;
412
400
  const i = n.replace(s, "");
413
- let r = Cs.has(e) ? 1 : 0;
401
+ let r = Rs.has(e) ? 1 : 0;
414
402
  return s !== n && (r *= 100), e + "(" + r + i + ")";
415
403
  }
416
- const Ds = /\b([a-z-]*)\(.*?\)/gu, Ve = {
417
- ...U,
404
+ const Ks = /\b([a-z-]*)\(.*?\)/gu, Se = {
405
+ ...$,
418
406
  getAnimatableNone: (t) => {
419
- const e = t.match(Ds);
420
- return e ? e.map(Ps).join(" ") : t;
407
+ const e = t.match(Ks);
408
+ return e ? e.map(Es).join(" ") : t;
421
409
  }
422
- }, Fs = {
423
- ...Vn,
410
+ }, Ns = {
411
+ ...Cn,
424
412
  // Color props
425
413
  color: w,
426
414
  backgroundColor: w,
@@ -433,43 +421,93 @@ const Ds = /\b([a-z-]*)\(.*?\)/gu, Ve = {
433
421
  borderRightColor: w,
434
422
  borderBottomColor: w,
435
423
  borderLeftColor: w,
436
- filter: Ve,
437
- WebkitFilter: Ve
438
- }, _e = (t) => Fs[t];
439
- function Yt(t, e) {
440
- let n = _e(t);
441
- return n !== Ve && (n = U), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
442
- }
443
- const Rs = /* @__PURE__ */ new Set(["auto", "none", "0"]);
444
- function Is(t, e, n) {
424
+ filter: Se,
425
+ WebkitFilter: Se
426
+ }, en = (t) => Ns[t];
427
+ function tn(t, e) {
428
+ let n = en(t);
429
+ return n !== Se && (n = $), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
430
+ }
431
+ const Bs = /* @__PURE__ */ new Set(["auto", "none", "0"]);
432
+ function ks(t, e, n) {
445
433
  let s = 0, i;
446
434
  for (; s < t.length && !i; ) {
447
435
  const r = t[s];
448
- typeof r == "string" && !Rs.has(r) && Z(r).values.length && (i = t[s]), s++;
436
+ typeof r == "string" && !Bs.has(r) && J(r).values.length && (i = t[s]), s++;
449
437
  }
450
438
  if (i && n)
451
439
  for (const r of e)
452
- t[r] = Yt(n, i);
453
- }
454
- const et = (t) => t === De || t === St, tt = (t, e) => parseFloat(t.split(", ")[e]), nt = (t, e) => (n, { transform: s }) => {
455
- if (s === "none" || !s)
456
- return 0;
457
- const i = s.match(/^matrix3d\((.+)\)$/u);
458
- if (i)
459
- return tt(i[1], e);
460
- {
461
- const r = s.match(/^matrix\((.+)\)$/u);
462
- return r ? tt(r[1], t) : 0;
440
+ t[r] = tn(n, i);
441
+ }
442
+ const B = (t) => t * 180 / Math.PI, Ae = (t) => {
443
+ const e = B(Math.atan2(t[1], t[0]));
444
+ return xe(e);
445
+ }, Ls = {
446
+ x: 4,
447
+ y: 5,
448
+ translateX: 4,
449
+ translateY: 5,
450
+ scaleX: 0,
451
+ scaleY: 3,
452
+ scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
453
+ rotate: Ae,
454
+ rotateZ: Ae,
455
+ skewX: (t) => B(Math.atan(t[1])),
456
+ skewY: (t) => B(Math.atan(t[2])),
457
+ skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
458
+ }, xe = (t) => (t = t % 360, t < 0 && (t += 360), t), st = Ae, it = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), rt = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), _s = {
459
+ x: 12,
460
+ y: 13,
461
+ z: 14,
462
+ translateX: 12,
463
+ translateY: 13,
464
+ translateZ: 14,
465
+ scaleX: it,
466
+ scaleY: rt,
467
+ scale: (t) => (it(t) + rt(t)) / 2,
468
+ rotateX: (t) => xe(B(Math.atan2(t[6], t[5]))),
469
+ rotateY: (t) => xe(B(Math.atan2(-t[2], t[0]))),
470
+ rotateZ: st,
471
+ rotate: st,
472
+ skewX: (t) => B(Math.atan(t[4])),
473
+ skewY: (t) => B(Math.atan(t[1])),
474
+ skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
475
+ };
476
+ function ot(t) {
477
+ return t.includes("scale") ? 1 : 0;
478
+ }
479
+ function we(t, e) {
480
+ if (!t || t === "none")
481
+ return ot(e);
482
+ const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
483
+ let s, i;
484
+ if (n)
485
+ s = _s, i = n;
486
+ else {
487
+ const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
488
+ s = Ls, i = a;
463
489
  }
464
- }, Os = /* @__PURE__ */ new Set(["x", "y", "z"]), Es = Tt.filter((t) => !Os.has(t));
465
- function Ks(t) {
490
+ if (!i)
491
+ return ot(e);
492
+ const r = s[e], o = i[1].split(",").map(Us);
493
+ return typeof r == "function" ? r(o) : o[r];
494
+ }
495
+ const Gs = (t, e) => {
496
+ const { transform: n = "none" } = getComputedStyle(t);
497
+ return we(n, e);
498
+ };
499
+ function Us(t) {
500
+ return parseFloat(t.trim());
501
+ }
502
+ const at = (t) => t === Re || t === Pt, $s = /* @__PURE__ */ new Set(["x", "y", "z"]), js = wt.filter((t) => !$s.has(t));
503
+ function Hs(t) {
466
504
  const e = [];
467
- return Es.forEach((n) => {
505
+ return js.forEach((n) => {
468
506
  const s = t.getValue(n);
469
507
  s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
470
508
  }), e;
471
509
  }
472
- const G = {
510
+ const U = {
473
511
  // Dimensions
474
512
  width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
475
513
  height: ({ y: t }, { paddingTop: e = "0", paddingBottom: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
@@ -478,18 +516,18 @@ const G = {
478
516
  bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
479
517
  right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
480
518
  // Transform
481
- x: nt(4, 13),
482
- y: nt(5, 14)
519
+ x: (t, { transform: e }) => we(e, "x"),
520
+ y: (t, { transform: e }) => we(e, "y")
483
521
  };
484
- G.translateX = G.x;
485
- G.translateY = G.y;
486
- const B = /* @__PURE__ */ new Set();
487
- let Se = !1, Ae = !1;
488
- function Xt() {
489
- if (Ae) {
490
- const t = Array.from(B).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
522
+ U.translateX = U.x;
523
+ U.translateY = U.y;
524
+ const k = /* @__PURE__ */ new Set();
525
+ let Me = !1, Pe = !1;
526
+ function nn() {
527
+ if (Pe) {
528
+ const t = Array.from(k).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
491
529
  e.forEach((s) => {
492
- const i = Ks(s);
530
+ const i = Hs(s);
493
531
  i.length && (n.set(s, i), s.render());
494
532
  }), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
495
533
  s.render();
@@ -502,22 +540,22 @@ function Xt() {
502
540
  s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
503
541
  });
504
542
  }
505
- Ae = !1, Se = !1, B.forEach((t) => t.complete()), B.clear();
543
+ Pe = !1, Me = !1, k.forEach((t) => t.complete()), k.clear();
506
544
  }
507
- function Zt() {
508
- B.forEach((t) => {
509
- t.readKeyframes(), t.needsMeasurement && (Ae = !0);
545
+ function sn() {
546
+ k.forEach((t) => {
547
+ t.readKeyframes(), t.needsMeasurement && (Pe = !0);
510
548
  });
511
549
  }
512
- function Ns() {
513
- Zt(), Xt();
550
+ function Ws() {
551
+ sn(), nn();
514
552
  }
515
- class ke {
553
+ class $e {
516
554
  constructor(e, n, s, i, r, o = !1) {
517
555
  this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
518
556
  }
519
557
  scheduleResolve() {
520
- this.isScheduled = !0, this.isAsync ? (B.add(this), Se || (Se = !0, F.read(Zt), F.resolveKeyframes(Xt))) : (this.readKeyframes(), this.complete());
558
+ this.isScheduled = !0, this.isAsync ? (k.add(this), Me || (Me = !0, F.read(sn), F.resolveKeyframes(nn))) : (this.readKeyframes(), this.complete());
521
559
  }
522
560
  readKeyframes() {
523
561
  const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
@@ -544,44 +582,44 @@ class ke {
544
582
  measureEndState() {
545
583
  }
546
584
  complete() {
547
- this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe), B.delete(this);
585
+ this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe), k.delete(this);
548
586
  }
549
587
  cancel() {
550
- this.isComplete || (this.isScheduled = !1, B.delete(this));
588
+ this.isComplete || (this.isScheduled = !1, k.delete(this));
551
589
  }
552
590
  resume() {
553
591
  this.isComplete || this.scheduleResolve();
554
592
  }
555
593
  }
556
- const Jt = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), Bs = (
594
+ const rn = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), zs = (
557
595
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
558
596
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
559
597
  );
560
- function Ls(t) {
561
- const e = Bs.exec(t);
598
+ function Ys(t) {
599
+ const e = zs.exec(t);
562
600
  if (!e)
563
601
  return [,];
564
602
  const [, n, s, i] = e;
565
603
  return [`--${n ?? s}`, i];
566
604
  }
567
- const _s = 4;
568
- function Qt(t, e, n = 1) {
569
- Y(n <= _s, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
570
- const [s, i] = Ls(t);
605
+ const qs = 4;
606
+ function on(t, e, n = 1) {
607
+ X(n <= qs, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
608
+ const [s, i] = Ys(t);
571
609
  if (!s)
572
610
  return;
573
611
  const r = window.getComputedStyle(e).getPropertyValue(s);
574
612
  if (r) {
575
613
  const o = r.trim();
576
- return Jt(o) ? parseFloat(o) : o;
614
+ return rn(o) ? parseFloat(o) : o;
577
615
  }
578
- return Fe(i) ? Qt(i, e, n + 1) : i;
616
+ return Ee(i) ? on(i, e, n + 1) : i;
579
617
  }
580
- const en = (t) => (e) => e.test(t), ks = {
618
+ const an = (t) => (e) => e.test(t), Xs = {
581
619
  test: (t) => t === "auto",
582
620
  parse: (t) => t
583
- }, tn = [De, St, ge, Sn, An, xn, ks], st = (t) => tn.find(en(t));
584
- class nn extends ke {
621
+ }, ln = [Re, Pt, ye, Dn, Fn, On, Xs], lt = (t) => ln.find(an(t));
622
+ class un extends $e {
585
623
  constructor(e, n, s, i, r) {
586
624
  super(e, n, s, i, r, !0);
587
625
  }
@@ -592,16 +630,16 @@ class nn extends ke {
592
630
  super.readKeyframes();
593
631
  for (let l = 0; l < e.length; l++) {
594
632
  let u = e[l];
595
- if (typeof u == "string" && (u = u.trim(), Fe(u))) {
596
- const c = Qt(u, n.current);
633
+ if (typeof u == "string" && (u = u.trim(), Ee(u))) {
634
+ const c = on(u, n.current);
597
635
  c !== void 0 && (e[l] = c), l === e.length - 1 && (this.finalKeyframe = u);
598
636
  }
599
637
  }
600
- if (this.resolveNoneKeyframes(), !Kt.has(s) || e.length !== 2)
638
+ if (this.resolveNoneKeyframes(), !_t.has(s) || e.length !== 2)
601
639
  return;
602
- const [i, r] = e, o = st(i), a = st(r);
640
+ const [i, r] = e, o = lt(i), a = lt(r);
603
641
  if (o !== a)
604
- if (et(o) && et(a))
642
+ if (at(o) && at(a))
605
643
  for (let l = 0; l < e.length; l++) {
606
644
  const u = e[l];
607
645
  typeof u == "string" && (e[l] = parseFloat(u));
@@ -612,14 +650,14 @@ class nn extends ke {
612
650
  resolveNoneKeyframes() {
613
651
  const { unresolvedKeyframes: e, name: n } = this, s = [];
614
652
  for (let i = 0; i < e.length; i++)
615
- ms(e[i]) && s.push(i);
616
- s.length && Is(e, s, n);
653
+ Vs(e[i]) && s.push(i);
654
+ s.length && ks(e, s, n);
617
655
  }
618
656
  measureInitialState() {
619
657
  const { element: e, unresolvedKeyframes: n, name: s } = this;
620
658
  if (!e || !e.current)
621
659
  return;
622
- s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = G[s](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
660
+ s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = U[s](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
623
661
  const i = n[n.length - 1];
624
662
  i !== void 0 && e.getValue(s, i).jump(i, !1);
625
663
  }
@@ -631,15 +669,15 @@ class nn extends ke {
631
669
  const r = n.getValue(s);
632
670
  r && r.jump(this.measuredOrigin, !1);
633
671
  const o = i.length - 1, a = i[o];
634
- i[o] = G[s](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([l, u]) => {
672
+ i[o] = U[s](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([l, u]) => {
635
673
  n.getValue(l).set(u);
636
674
  }), this.resolveNoneKeyframes();
637
675
  }
638
676
  }
639
- const it = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
640
- (U.test(t) || t === "0") && // And it contains numbers and/or colors
677
+ const ut = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
678
+ ($.test(t) || t === "0") && // And it contains numbers and/or colors
641
679
  !t.startsWith("url("));
642
- function Gs(t) {
680
+ function Zs(t) {
643
681
  const e = t[0];
644
682
  if (t.length === 1)
645
683
  return !0;
@@ -647,24 +685,24 @@ function Gs(t) {
647
685
  if (t[n] !== e)
648
686
  return !0;
649
687
  }
650
- function Us(t, e, n, s) {
688
+ function Js(t, e, n, s) {
651
689
  const i = t[0];
652
690
  if (i === null)
653
691
  return !1;
654
692
  if (e === "display" || e === "visibility")
655
693
  return !0;
656
- const r = t[t.length - 1], o = it(i, e), a = it(r, e);
657
- return ie(o === a, `You are trying to animate ${e} 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 : Gs(t) || (n === "spring" || Oe(n)) && s;
694
+ const r = t[t.length - 1], o = ut(i, e), a = ut(r, e);
695
+ return re(o === a, `You are trying to animate ${e} 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 : Zs(t) || (n === "spring" || Be(n)) && s;
658
696
  }
659
- const $s = (t) => t !== null;
660
- function oe(t, { repeat: e, repeatType: n = "loop" }, s) {
661
- const i = t.filter($s), r = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
697
+ const Qs = (t) => t !== null;
698
+ function ae(t, { repeat: e, repeatType: n = "loop" }, s) {
699
+ const i = t.filter(Qs), r = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
662
700
  return !r || s === void 0 ? i[r] : s;
663
701
  }
664
- const js = 40;
665
- class sn {
702
+ const ei = 40;
703
+ class cn {
666
704
  constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", ...a }) {
667
- this.isStopped = !1, this.hasAttemptedResolve = !1, this.createdAt = ee.now(), this.options = {
705
+ this.isStopped = !1, this.hasAttemptedResolve = !1, this.createdAt = te.now(), this.options = {
668
706
  autoplay: e,
669
707
  delay: n,
670
708
  type: s,
@@ -685,7 +723,7 @@ class sn {
685
723
  * to avoid a sudden jump into the animation.
686
724
  */
687
725
  calcStartTime() {
688
- return this.resolvedAt ? this.resolvedAt - this.createdAt > js ? this.resolvedAt : this.createdAt : this.createdAt;
726
+ return this.resolvedAt ? this.resolvedAt - this.createdAt > ei ? this.resolvedAt : this.createdAt : this.createdAt;
689
727
  }
690
728
  /**
691
729
  * A getter for resolved data. If keyframes are not yet resolved, accessing
@@ -693,7 +731,7 @@ class sn {
693
731
  * This is a deoptimisation, but at its worst still batches read/writes.
694
732
  */
695
733
  get resolved() {
696
- return !this._resolved && !this.hasAttemptedResolve && Ns(), this._resolved;
734
+ return !this._resolved && !this.hasAttemptedResolve && Ws(), this._resolved;
697
735
  }
698
736
  /**
699
737
  * A method to be called when the keyframes resolver completes. This method
@@ -701,13 +739,13 @@ class sn {
701
739
  * Otherwise, it will call initPlayback on the implementing class.
702
740
  */
703
741
  onKeyframesResolved(e, n) {
704
- this.resolvedAt = ee.now(), this.hasAttemptedResolve = !0;
742
+ this.resolvedAt = te.now(), this.hasAttemptedResolve = !0;
705
743
  const { name: s, type: i, velocity: r, delay: o, onComplete: a, onUpdate: l, isGenerator: u } = this.options;
706
- if (!u && !Us(e, s, i, r))
744
+ if (!u && !Js(e, s, i, r))
707
745
  if (o)
708
746
  this.options.duration = 0;
709
747
  else {
710
- l && l(oe(e, this.options, n)), a && a(), this.resolveFinishedPromise();
748
+ l && l(ae(e, this.options, n)), a && a(), this.resolveFinishedPromise();
711
749
  return;
712
750
  }
713
751
  const c = this.initPlayback(e, n);
@@ -728,7 +766,7 @@ class sn {
728
766
  return this.currentFinishedPromise.then(e, n);
729
767
  }
730
768
  flatten() {
731
- this.options.type = "keyframes", this.options.ease = "linear";
769
+ this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear");
732
770
  }
733
771
  updateFinishedPromise() {
734
772
  this.currentFinishedPromise = new Promise((e) => {
@@ -736,18 +774,18 @@ class sn {
736
774
  });
737
775
  }
738
776
  }
739
- const ae = (t, e, n) => t + (e - t) * n;
740
- function fe(t, e, n) {
777
+ const le = (t, e, n) => t + (e - t) * n;
778
+ function pe(t, e, n) {
741
779
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
742
780
  }
743
- function Hs({ hue: t, saturation: e, lightness: n, alpha: s }) {
781
+ function ti({ hue: t, saturation: e, lightness: n, alpha: s }) {
744
782
  t /= 360, e /= 100, n /= 100;
745
783
  let i = 0, r = 0, o = 0;
746
784
  if (!e)
747
785
  i = r = o = n;
748
786
  else {
749
787
  const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
750
- i = fe(l, a, t + 1 / 3), r = fe(l, a, t), o = fe(l, a, t - 1 / 3);
788
+ i = pe(l, a, t + 1 / 3), r = pe(l, a, t), o = pe(l, a, t - 1 / 3);
751
789
  }
752
790
  return {
753
791
  red: Math.round(i * 255),
@@ -756,55 +794,55 @@ function Hs({ hue: t, saturation: e, lightness: n, alpha: s }) {
756
794
  alpha: s
757
795
  };
758
796
  }
759
- function ne(t, e) {
797
+ function se(t, e) {
760
798
  return (n) => n > 0 ? e : t;
761
799
  }
762
- const pe = (t, e, n) => {
800
+ const me = (t, e, n) => {
763
801
  const s = t * t, i = n * (e * e - s) + s;
764
802
  return i < 0 ? 0 : Math.sqrt(i);
765
- }, Ws = [Te, N, _], zs = (t) => Ws.find((e) => e.test(t));
766
- function rt(t) {
767
- const e = zs(t);
768
- if (ie(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
803
+ }, ni = [Ve, N, _], si = (t) => ni.find((e) => e.test(t));
804
+ function ct(t) {
805
+ const e = si(t);
806
+ if (re(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
769
807
  return !1;
770
808
  let n = e.parse(t);
771
- return e === _ && (n = Hs(n)), n;
809
+ return e === _ && (n = ti(n)), n;
772
810
  }
773
- const ot = (t, e) => {
774
- const n = rt(t), s = rt(e);
811
+ const dt = (t, e) => {
812
+ const n = ct(t), s = ct(e);
775
813
  if (!n || !s)
776
- return ne(t, e);
814
+ return se(t, e);
777
815
  const i = { ...n };
778
- return (r) => (i.red = pe(n.red, s.red, r), i.green = pe(n.green, s.green, r), i.blue = pe(n.blue, s.blue, r), i.alpha = ae(n.alpha, s.alpha, r), N.transform(i));
779
- }, qs = (t, e) => (n) => e(t(n)), le = (...t) => t.reduce(qs), xe = /* @__PURE__ */ new Set(["none", "hidden"]);
780
- function Ys(t, e) {
781
- return xe.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
816
+ return (r) => (i.red = me(n.red, s.red, r), i.green = me(n.green, s.green, r), i.blue = me(n.blue, s.blue, r), i.alpha = le(n.alpha, s.alpha, r), N.transform(i));
817
+ }, ii = (t, e) => (n) => e(t(n)), ue = (...t) => t.reduce(ii), Ce = /* @__PURE__ */ new Set(["none", "hidden"]);
818
+ function ri(t, e) {
819
+ return Ce.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
782
820
  }
783
- function Xs(t, e) {
784
- return (n) => ae(t, e, n);
821
+ function oi(t, e) {
822
+ return (n) => le(t, e, n);
785
823
  }
786
- function Ge(t) {
787
- return typeof t == "number" ? Xs : typeof t == "string" ? Fe(t) ? ne : w.test(t) ? ot : Qs : Array.isArray(t) ? rn : typeof t == "object" ? w.test(t) ? ot : Zs : ne;
824
+ function je(t) {
825
+ return typeof t == "number" ? oi : typeof t == "string" ? Ee(t) ? se : w.test(t) ? dt : ui : Array.isArray(t) ? dn : typeof t == "object" ? w.test(t) ? dt : ai : se;
788
826
  }
789
- function rn(t, e) {
790
- const n = [...t], s = n.length, i = t.map((r, o) => Ge(r)(r, e[o]));
827
+ function dn(t, e) {
828
+ const n = [...t], s = n.length, i = t.map((r, o) => je(r)(r, e[o]));
791
829
  return (r) => {
792
830
  for (let o = 0; o < s; o++)
793
831
  n[o] = i[o](r);
794
832
  return n;
795
833
  };
796
834
  }
797
- function Zs(t, e) {
835
+ function ai(t, e) {
798
836
  const n = { ...t, ...e }, s = {};
799
837
  for (const i in n)
800
- t[i] !== void 0 && e[i] !== void 0 && (s[i] = Ge(t[i])(t[i], e[i]));
838
+ t[i] !== void 0 && e[i] !== void 0 && (s[i] = je(t[i])(t[i], e[i]));
801
839
  return (i) => {
802
840
  for (const r in s)
803
841
  n[r] = s[r](i);
804
842
  return n;
805
843
  };
806
844
  }
807
- function Js(t, e) {
845
+ function li(t, e) {
808
846
  var n;
809
847
  const s = [], i = { color: 0, var: 0, number: 0 };
810
848
  for (let r = 0; r < e.values.length; r++) {
@@ -813,17 +851,17 @@ function Js(t, e) {
813
851
  }
814
852
  return s;
815
853
  }
816
- const Qs = (t, e) => {
817
- const n = U.createTransformer(e), s = Z(t), i = Z(e);
818
- 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 ? xe.has(t) && !i.values.length || xe.has(e) && !s.values.length ? Ys(t, e) : le(rn(Js(s, i), i.values), n) : (ie(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), ne(t, e));
854
+ const ui = (t, e) => {
855
+ const n = $.createTransformer(e), s = J(t), i = J(e);
856
+ 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 ? Ce.has(t) && !i.values.length || Ce.has(e) && !s.values.length ? ri(t, e) : ue(dn(li(s, i), i.values), n) : (re(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), se(t, e));
819
857
  };
820
- function on(t, e, n) {
821
- return typeof t == "number" && typeof e == "number" && typeof n == "number" ? ae(t, e, n) : Ge(t)(t, e);
858
+ function hn(t, e, n) {
859
+ return typeof t == "number" && typeof e == "number" && typeof n == "number" ? le(t, e, n) : je(t)(t, e);
822
860
  }
823
- const ei = 5;
824
- function an(t, e, n) {
825
- const s = Math.max(e - ei, 0);
826
- return wn(n - t(s), e - s);
861
+ const ci = 5;
862
+ function fn(t, e, n) {
863
+ const s = Math.max(e - ci, 0);
864
+ return In(n - t(s), e - s);
827
865
  }
828
866
  const A = {
829
867
  // Default spring physics
@@ -853,17 +891,17 @@ const A = {
853
891
  // in seconds
854
892
  minDamping: 0.05,
855
893
  maxDamping: 1
856
- }, at = 1e-3;
857
- function ti({ duration: t = A.duration, bounce: e = A.bounce, velocity: n = A.velocity, mass: s = A.mass }) {
894
+ }, ht = 1e-3;
895
+ function di({ duration: t = A.duration, bounce: e = A.bounce, velocity: n = A.velocity, mass: s = A.mass }) {
858
896
  let i, r;
859
- ie(t <= /* @__PURE__ */ I(A.maxDuration), "Spring duration must be 10 seconds or less");
897
+ re(t <= /* @__PURE__ */ I(A.maxDuration), "Spring duration must be 10 seconds or less");
860
898
  let o = 1 - e;
861
- o = k(A.minDamping, A.maxDamping, o), t = k(A.minDuration, A.maxDuration, /* @__PURE__ */ E(t)), o < 1 ? (i = (u) => {
862
- const c = u * o, d = c * t, h = c - n, f = we(u, o), b = Math.exp(-d);
863
- return at - h / f * b;
899
+ o = G(A.minDamping, A.maxDamping, o), t = G(A.minDuration, A.maxDuration, /* @__PURE__ */ E(t)), o < 1 ? (i = (u) => {
900
+ const c = u * o, d = c * t, h = c - n, f = De(u, o), b = Math.exp(-d);
901
+ return ht - h / f * b;
864
902
  }, r = (u) => {
865
- const d = u * o * t, h = d * n + n, f = Math.pow(o, 2) * Math.pow(u, 2) * t, b = Math.exp(-d), v = we(Math.pow(u, 2), o);
866
- return (-i(u) + at > 0 ? -1 : 1) * ((h - f) * b) / v;
903
+ const d = u * o * t, h = d * n + n, f = Math.pow(o, 2) * Math.pow(u, 2) * t, b = Math.exp(-d), v = De(Math.pow(u, 2), o);
904
+ return (-i(u) + ht > 0 ? -1 : 1) * ((h - f) * b) / v;
867
905
  }) : (i = (u) => {
868
906
  const c = Math.exp(-u * t), d = (u - n) * t + 1;
869
907
  return -1e-3 + c * d;
@@ -871,7 +909,7 @@ function ti({ duration: t = A.duration, bounce: e = A.bounce, velocity: n = A.ve
871
909
  const c = Math.exp(-u * t), d = (n - u) * (t * t);
872
910
  return c * d;
873
911
  });
874
- const a = 5 / t, l = si(i, r, a);
912
+ const a = 5 / t, l = fi(i, r, a);
875
913
  if (t = /* @__PURE__ */ I(t), isNaN(l))
876
914
  return {
877
915
  stiffness: A.stiffness,
@@ -887,21 +925,21 @@ function ti({ duration: t = A.duration, bounce: e = A.bounce, velocity: n = A.ve
887
925
  };
888
926
  }
889
927
  }
890
- const ni = 12;
891
- function si(t, e, n) {
928
+ const hi = 12;
929
+ function fi(t, e, n) {
892
930
  let s = n;
893
- for (let i = 1; i < ni; i++)
931
+ for (let i = 1; i < hi; i++)
894
932
  s = s - t(s) / e(s);
895
933
  return s;
896
934
  }
897
- function we(t, e) {
935
+ function De(t, e) {
898
936
  return t * Math.sqrt(1 - e * e);
899
937
  }
900
- const ii = ["duration", "bounce"], ri = ["stiffness", "damping", "mass"];
901
- function lt(t, e) {
938
+ const pi = ["duration", "bounce"], mi = ["stiffness", "damping", "mass"];
939
+ function ft(t, e) {
902
940
  return e.some((n) => t[n] !== void 0);
903
941
  }
904
- function oi(t) {
942
+ function gi(t) {
905
943
  let e = {
906
944
  velocity: A.velocity,
907
945
  stiffness: A.stiffness,
@@ -910,9 +948,9 @@ function oi(t) {
910
948
  isResolvedFromDuration: !1,
911
949
  ...t
912
950
  };
913
- if (!lt(t, ri) && lt(t, ii))
951
+ if (!ft(t, mi) && ft(t, pi))
914
952
  if (t.visualDuration) {
915
- const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * k(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
953
+ const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * G(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
916
954
  e = {
917
955
  ...e,
918
956
  mass: A.mass,
@@ -920,7 +958,7 @@ function oi(t) {
920
958
  damping: r
921
959
  };
922
960
  } else {
923
- const n = ti(t);
961
+ const n = di(t);
924
962
  e = {
925
963
  ...e,
926
964
  ...n,
@@ -929,21 +967,21 @@ function oi(t) {
929
967
  }
930
968
  return e;
931
969
  }
932
- function ln(t = A.visualDuration, e = A.bounce) {
970
+ function pn(t = A.visualDuration, e = A.bounce) {
933
971
  const n = typeof t != "object" ? {
934
972
  visualDuration: t,
935
973
  keyframes: [0, 1],
936
974
  bounce: e
937
975
  } : t;
938
976
  let { restSpeed: s, restDelta: i } = n;
939
- const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: l, damping: u, mass: c, duration: d, velocity: h, isResolvedFromDuration: f } = oi({
977
+ const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: l, damping: u, mass: c, duration: d, velocity: h, isResolvedFromDuration: f } = gi({
940
978
  ...n,
941
979
  velocity: -/* @__PURE__ */ E(n.velocity || 0)
942
980
  }), b = h || 0, v = u / (2 * Math.sqrt(l * c)), y = o - r, p = /* @__PURE__ */ E(Math.sqrt(l / c)), T = Math.abs(y) < 5;
943
981
  s || (s = T ? A.restSpeed.granular : A.restSpeed.default), i || (i = T ? A.restDelta.granular : A.restDelta.default);
944
982
  let V;
945
983
  if (v < 1) {
946
- const g = we(p, v);
984
+ const g = De(p, v);
947
985
  V = (S) => {
948
986
  const x = Math.exp(-v * p * S);
949
987
  return o - x * ((b + v * p * y) / g * Math.sin(g * S) + y * Math.cos(g * S));
@@ -957,7 +995,7 @@ function ln(t = A.visualDuration, e = A.bounce) {
957
995
  return o - x * ((b + v * p * y) * Math.sinh(m) + g * y * Math.cosh(m)) / g;
958
996
  };
959
997
  }
960
- const P = {
998
+ const C = {
961
999
  calculatedDuration: f && d || null,
962
1000
  next: (g) => {
963
1001
  const S = V(g);
@@ -965,20 +1003,20 @@ function ln(t = A.visualDuration, e = A.bounce) {
965
1003
  a.done = g >= d;
966
1004
  else {
967
1005
  let x = 0;
968
- v < 1 && (x = g === 0 ? /* @__PURE__ */ I(b) : an(V, g, S));
969
- const m = Math.abs(x) <= s, C = Math.abs(o - S) <= i;
970
- a.done = m && C;
1006
+ v < 1 && (x = g === 0 ? /* @__PURE__ */ I(b) : fn(V, g, S));
1007
+ const m = Math.abs(x) <= s, P = Math.abs(o - S) <= i;
1008
+ a.done = m && P;
971
1009
  }
972
1010
  return a.value = a.done ? o : S, a;
973
1011
  },
974
1012
  toString: () => {
975
- const g = Math.min(Dt(P), ve), S = Ft((x) => P.next(g * x).value, g, 30);
1013
+ const g = Math.min(Et(C), be), S = Kt((x) => C.next(g * x).value, g, 30);
976
1014
  return g + "ms " + S;
977
1015
  }
978
1016
  };
979
- return P;
1017
+ return C;
980
1018
  }
981
- function ut({ keyframes: t, velocity: e = 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 }) {
1019
+ function pt({ keyframes: t, velocity: e = 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 }) {
982
1020
  const d = t[0], h = {
983
1021
  done: !1,
984
1022
  value: d
@@ -986,15 +1024,15 @@ function ut({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
986
1024
  let v = n * e;
987
1025
  const y = d + v, p = o === void 0 ? y : o(y);
988
1026
  p !== y && (v = p - d);
989
- const T = (m) => -v * Math.exp(-m / s), V = (m) => p + T(m), P = (m) => {
990
- const C = T(m), D = V(m);
991
- h.done = Math.abs(C) <= u, h.value = h.done ? p : D;
1027
+ const T = (m) => -v * Math.exp(-m / s), V = (m) => p + T(m), C = (m) => {
1028
+ const P = T(m), D = V(m);
1029
+ h.done = Math.abs(P) <= u, h.value = h.done ? p : D;
992
1030
  };
993
1031
  let g, S;
994
1032
  const x = (m) => {
995
- f(h.value) && (g = m, S = ln({
1033
+ f(h.value) && (g = m, S = pn({
996
1034
  keyframes: [h.value, b(h.value)],
997
- velocity: an(V, m, h.value),
1035
+ velocity: fn(V, m, h.value),
998
1036
  // TODO: This should be passing * 1000
999
1037
  damping: i,
1000
1038
  stiffness: r,
@@ -1005,117 +1043,117 @@ function ut({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
1005
1043
  return x(0), {
1006
1044
  calculatedDuration: null,
1007
1045
  next: (m) => {
1008
- let C = !1;
1009
- return !S && g === void 0 && (C = !0, P(m), x(m)), g !== void 0 && m >= g ? S.next(m - g) : (!C && P(m), h);
1046
+ let P = !1;
1047
+ return !S && g === void 0 && (P = !0, C(m), x(m)), g !== void 0 && m >= g ? S.next(m - g) : (!P && C(m), h);
1010
1048
  }
1011
1049
  };
1012
1050
  }
1013
- const ai = /* @__PURE__ */ J(0.42, 0, 1, 1), li = /* @__PURE__ */ J(0, 0, 0.58, 1), un = /* @__PURE__ */ J(0.42, 0, 0.58, 1), ui = (t) => Array.isArray(t) && typeof t[0] != "number", ct = {
1051
+ const yi = /* @__PURE__ */ Q(0.42, 0, 1, 1), vi = /* @__PURE__ */ Q(0, 0, 0.58, 1), mn = /* @__PURE__ */ Q(0.42, 0, 0.58, 1), bi = (t) => Array.isArray(t) && typeof t[0] != "number", mt = {
1014
1052
  linear: q,
1015
- easeIn: ai,
1016
- easeInOut: un,
1017
- easeOut: li,
1018
- circIn: Ne,
1019
- circInOut: Ut,
1020
- circOut: ps,
1021
- backIn: Ke,
1022
- backInOut: kt,
1023
- backOut: _t,
1024
- anticipate: Gt
1025
- }, dt = (t) => {
1026
- if (Ee(t)) {
1027
- Y(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
1053
+ easeIn: yi,
1054
+ easeInOut: mn,
1055
+ easeOut: vi,
1056
+ circIn: _e,
1057
+ circInOut: zt,
1058
+ circOut: Ts,
1059
+ backIn: Le,
1060
+ backInOut: Ht,
1061
+ backOut: jt,
1062
+ anticipate: Wt
1063
+ }, gt = (t) => {
1064
+ if (ke(t)) {
1065
+ X(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
1028
1066
  const [e, n, s, i] = t;
1029
- return J(e, n, s, i);
1067
+ return Q(e, n, s, i);
1030
1068
  } else if (typeof t == "string")
1031
- return Y(ct[t] !== void 0, `Invalid easing type '${t}'`), ct[t];
1069
+ return X(mt[t] !== void 0, `Invalid easing type '${t}'`), mt[t];
1032
1070
  return t;
1033
1071
  };
1034
- function ci(t, e, n) {
1035
- const s = [], i = n || on, r = t.length - 1;
1072
+ function Ti(t, e, n) {
1073
+ const s = [], i = n || hn, r = t.length - 1;
1036
1074
  for (let o = 0; o < r; o++) {
1037
1075
  let a = i(t[o], t[o + 1]);
1038
1076
  if (e) {
1039
1077
  const l = Array.isArray(e) ? e[o] || q : e;
1040
- a = le(l, a);
1078
+ a = ue(l, a);
1041
1079
  }
1042
1080
  s.push(a);
1043
1081
  }
1044
1082
  return s;
1045
1083
  }
1046
- function di(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
1084
+ function Vi(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
1047
1085
  const r = t.length;
1048
- if (Y(r === e.length, "Both input and output ranges must be the same length"), r === 1)
1086
+ if (X(r === e.length, "Both input and output ranges must be the same length"), r === 1)
1049
1087
  return () => e[0];
1050
1088
  if (r === 2 && e[0] === e[1])
1051
1089
  return () => e[1];
1052
1090
  const o = t[0] === t[1];
1053
1091
  t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
1054
- const a = ci(e, s, i), l = a.length, u = (c) => {
1092
+ const a = Ti(e, s, i), l = a.length, u = (c) => {
1055
1093
  if (o && c < t[0])
1056
1094
  return e[0];
1057
1095
  let d = 0;
1058
1096
  if (l > 1)
1059
1097
  for (; d < t.length - 2 && !(c < t[d + 1]); d++)
1060
1098
  ;
1061
- const h = /* @__PURE__ */ Ie(t[d], t[d + 1], c);
1099
+ const h = /* @__PURE__ */ Ne(t[d], t[d + 1], c);
1062
1100
  return a[d](h);
1063
1101
  };
1064
- return n ? (c) => u(k(t[0], t[r - 1], c)) : u;
1102
+ return n ? (c) => u(G(t[0], t[r - 1], c)) : u;
1065
1103
  }
1066
- function hi(t, e) {
1104
+ function Si(t, e) {
1067
1105
  const n = t[t.length - 1];
1068
1106
  for (let s = 1; s <= e; s++) {
1069
- const i = /* @__PURE__ */ Ie(0, e, s);
1070
- t.push(ae(n, 1, i));
1107
+ const i = /* @__PURE__ */ Ne(0, e, s);
1108
+ t.push(le(n, 1, i));
1071
1109
  }
1072
1110
  }
1073
- function fi(t) {
1111
+ function Ai(t) {
1074
1112
  const e = [0];
1075
- return hi(e, t.length - 1), e;
1113
+ return Si(e, t.length - 1), e;
1076
1114
  }
1077
- function pi(t, e) {
1115
+ function xi(t, e) {
1078
1116
  return t.map((n) => n * e);
1079
1117
  }
1080
- function mi(t, e) {
1081
- return t.map(() => e || un).splice(0, t.length - 1);
1118
+ function wi(t, e) {
1119
+ return t.map(() => e || mn).splice(0, t.length - 1);
1082
1120
  }
1083
- function z({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
1084
- const i = ui(s) ? s.map(dt) : dt(s), r = {
1121
+ function Y({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
1122
+ const i = bi(s) ? s.map(gt) : gt(s), r = {
1085
1123
  done: !1,
1086
1124
  value: e[0]
1087
- }, o = pi(
1125
+ }, o = xi(
1088
1126
  // Only use the provided offsets if they're the correct length
1089
1127
  // TODO Maybe we should warn here if there's a length mismatch
1090
- n && n.length === e.length ? n : fi(e),
1128
+ n && n.length === e.length ? n : Ai(e),
1091
1129
  t
1092
- ), a = di(o, e, {
1093
- ease: Array.isArray(i) ? i : mi(e, i)
1130
+ ), a = Vi(o, e, {
1131
+ ease: Array.isArray(i) ? i : wi(e, i)
1094
1132
  });
1095
1133
  return {
1096
1134
  calculatedDuration: t,
1097
1135
  next: (l) => (r.value = a(l), r.done = l >= t, r)
1098
1136
  };
1099
1137
  }
1100
- const gi = (t) => {
1138
+ const Mi = (t) => {
1101
1139
  const e = ({ timestamp: n }) => t(n);
1102
1140
  return {
1103
1141
  start: () => F.update(e, !0),
1104
- stop: () => ye(e),
1142
+ stop: () => ve(e),
1105
1143
  /**
1106
1144
  * If we're processing this frame we can use the
1107
1145
  * framelocked timestamp to keep things in sync.
1108
1146
  */
1109
- now: () => He.isProcessing ? He.timestamp : ee.now()
1147
+ now: () => Ye.isProcessing ? Ye.timestamp : te.now()
1110
1148
  };
1111
- }, yi = {
1112
- decay: ut,
1113
- inertia: ut,
1114
- tween: z,
1115
- keyframes: z,
1116
- spring: ln
1117
- }, vi = (t) => t / 100;
1118
- class Ue extends sn {
1149
+ }, Pi = {
1150
+ decay: pt,
1151
+ inertia: pt,
1152
+ tween: Y,
1153
+ keyframes: Y,
1154
+ spring: pn
1155
+ }, Ci = (t) => t / 100;
1156
+ class He extends cn {
1119
1157
  constructor(e) {
1120
1158
  super(e), this.holdTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.startTime = null, this.state = "idle", this.stop = () => {
1121
1159
  if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle")
@@ -1124,22 +1162,22 @@ class Ue extends sn {
1124
1162
  const { onStop: l } = this.options;
1125
1163
  l && l();
1126
1164
  };
1127
- const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = (i == null ? void 0 : i.KeyframeResolver) || ke, a = (l, u) => this.onKeyframesResolved(l, u);
1165
+ const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = (i == null ? void 0 : i.KeyframeResolver) || $e, a = (l, u) => this.onKeyframesResolved(l, u);
1128
1166
  this.resolver = new o(r, a, n, s, i), this.resolver.scheduleResolve();
1129
1167
  }
1130
1168
  flatten() {
1131
1169
  super.flatten(), this._resolved && Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
1132
1170
  }
1133
1171
  initPlayback(e) {
1134
- const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a = Oe(n) ? n : yi[n] || z;
1172
+ const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a = Be(n) ? n : Pi[n] || Y;
1135
1173
  let l, u;
1136
- process.env.NODE_ENV !== "production" && a !== z && Y(e.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), a !== z && typeof e[0] != "number" && (l = le(vi, on(e[0], e[1])), e = [0, 100]);
1174
+ process.env.NODE_ENV !== "production" && a !== Y && X(e.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), a !== Y && typeof e[0] != "number" && (l = ue(Ci, hn(e[0], e[1])), e = [0, 100]);
1137
1175
  const c = a({ ...this.options, keyframes: e });
1138
1176
  r === "mirror" && (u = a({
1139
1177
  ...this.options,
1140
1178
  keyframes: [...e].reverse(),
1141
1179
  velocity: -o
1142
- })), c.calculatedDuration === null && (c.calculatedDuration = Dt(c));
1180
+ })), c.calculatedDuration === null && (c.calculatedDuration = Et(c));
1143
1181
  const { calculatedDuration: d } = c, h = d + i, f = h * (s + 1) - i;
1144
1182
  return {
1145
1183
  generator: c,
@@ -1167,18 +1205,18 @@ class Ue extends sn {
1167
1205
  this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - c / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
1168
1206
  const p = this.currentTime - h * (this.speed >= 0 ? 1 : -1), T = this.speed >= 0 ? p < 0 : p > c;
1169
1207
  this.currentTime = Math.max(p, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = c);
1170
- let V = this.currentTime, P = r;
1208
+ let V = this.currentTime, C = r;
1171
1209
  if (f) {
1172
1210
  const m = Math.min(this.currentTime, c) / d;
1173
- let C = Math.floor(m), D = m % 1;
1174
- !D && m >= 1 && (D = 1), D === 1 && C--, C = Math.min(C, f + 1), !!(C % 2) && (b === "reverse" ? (D = 1 - D, v && (D -= v / d)) : b === "mirror" && (P = o)), V = k(0, 1, D) * d;
1211
+ let P = Math.floor(m), D = m % 1;
1212
+ !D && m >= 1 && (D = 1), D === 1 && P--, P = Math.min(P, f + 1), !!(P % 2) && (b === "reverse" ? (D = 1 - D, v && (D -= v / d)) : b === "mirror" && (C = o)), V = G(0, 1, D) * d;
1175
1213
  }
1176
- const g = T ? { done: !1, value: l[0] } : P.next(V);
1214
+ const g = T ? { done: !1, value: l[0] } : C.next(V);
1177
1215
  a && (g.value = a(g.value));
1178
1216
  let { done: S } = g;
1179
1217
  !T && u !== null && (S = this.speed >= 0 ? this.currentTime >= c : this.currentTime <= 0);
1180
1218
  const x = this.holdTime === null && (this.state === "finished" || this.state === "running" && S);
1181
- return x && i !== void 0 && (g.value = oe(l, this.options, i)), y && y(g.value), x && this.finish(), g;
1219
+ return x && i !== void 0 && (g.value = ae(l, this.options, i)), y && y(g.value), x && this.finish(), g;
1182
1220
  }
1183
1221
  get duration() {
1184
1222
  const { resolved: e } = this;
@@ -1204,7 +1242,7 @@ class Ue extends sn {
1204
1242
  }
1205
1243
  if (this.isStopped)
1206
1244
  return;
1207
- const { driver: e = gi, onPlay: n, startTime: s } = this.options;
1245
+ const { driver: e = Mi, onPlay: n, startTime: s } = this.options;
1208
1246
  this.driver || (this.driver = e((r) => this.tick(r))), n && n();
1209
1247
  const i = this.driver.now();
1210
1248
  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();
@@ -1238,10 +1276,10 @@ class Ue extends sn {
1238
1276
  return this.startTime = 0, this.tick(e, !0);
1239
1277
  }
1240
1278
  }
1241
- function bi(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeInOut", times: l } = {}) {
1279
+ function Di(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeInOut", times: l } = {}) {
1242
1280
  const u = { [e]: n };
1243
1281
  l && (u.offset = l);
1244
- const c = It(a, i);
1282
+ const c = Bt(a, i);
1245
1283
  return Array.isArray(c) && (u.easing = c), t.animate(u, {
1246
1284
  delay: s,
1247
1285
  duration: i,
@@ -1251,12 +1289,12 @@ function bi(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatTyp
1251
1289
  direction: o === "reverse" ? "alternate" : "normal"
1252
1290
  });
1253
1291
  }
1254
- const Ti = /* @__PURE__ */ Re(() => Object.hasOwnProperty.call(Element.prototype, "animate")), se = 10, Vi = 2e4;
1255
- function Si(t) {
1256
- return Oe(t.type) || t.type === "spring" || !Rt(t.ease);
1292
+ const Fi = /* @__PURE__ */ Ke(() => Object.hasOwnProperty.call(Element.prototype, "animate")), ie = 10, Oi = 2e4;
1293
+ function Ii(t) {
1294
+ return Be(t.type) || t.type === "spring" || !Nt(t.ease);
1257
1295
  }
1258
- function Ai(t, e) {
1259
- const n = new Ue({
1296
+ function Ri(t, e) {
1297
+ const n = new He({
1260
1298
  ...e,
1261
1299
  keyframes: t,
1262
1300
  repeat: 0,
@@ -1266,41 +1304,41 @@ function Ai(t, e) {
1266
1304
  let s = { done: !1, value: t[0] };
1267
1305
  const i = [];
1268
1306
  let r = 0;
1269
- for (; !s.done && r < Vi; )
1270
- s = n.sample(r), i.push(s.value), r += se;
1307
+ for (; !s.done && r < Oi; )
1308
+ s = n.sample(r), i.push(s.value), r += ie;
1271
1309
  return {
1272
1310
  times: void 0,
1273
1311
  keyframes: i,
1274
- duration: r - se,
1312
+ duration: r - ie,
1275
1313
  ease: "linear"
1276
1314
  };
1277
1315
  }
1278
- const cn = {
1279
- anticipate: Gt,
1280
- backInOut: kt,
1281
- circInOut: Ut
1316
+ const gn = {
1317
+ anticipate: Wt,
1318
+ backInOut: Ht,
1319
+ circInOut: zt
1282
1320
  };
1283
- function xi(t) {
1284
- return t in cn;
1321
+ function Ei(t) {
1322
+ return t in gn;
1285
1323
  }
1286
- class ht extends sn {
1324
+ class yt extends cn {
1287
1325
  constructor(e) {
1288
1326
  super(e);
1289
1327
  const { name: n, motionValue: s, element: i, keyframes: r } = this.options;
1290
- this.resolver = new nn(r, (o, a) => this.onKeyframesResolved(o, a), n, s, i), this.resolver.scheduleResolve();
1328
+ this.resolver = new un(r, (o, a) => this.onKeyframesResolved(o, a), n, s, i), this.resolver.scheduleResolve();
1291
1329
  }
1292
1330
  initPlayback(e, n) {
1293
1331
  let { duration: s = 300, times: i, ease: r, type: o, motionValue: a, name: l, startTime: u } = this.options;
1294
1332
  if (!a.owner || !a.owner.current)
1295
1333
  return !1;
1296
- if (typeof r == "string" && te() && xi(r) && (r = cn[r]), Si(this.options)) {
1297
- const { onComplete: d, onUpdate: h, motionValue: f, element: b, ...v } = this.options, y = Ai(e, v);
1334
+ if (typeof r == "string" && ne() && Ei(r) && (r = gn[r]), Ii(this.options)) {
1335
+ const { onComplete: d, onUpdate: h, motionValue: f, element: b, ...v } = this.options, y = Ri(e, v);
1298
1336
  e = y.keyframes, e.length === 1 && (e[1] = e[0]), s = y.duration, i = y.times, r = y.ease, o = "keyframes";
1299
1337
  }
1300
- const c = bi(a.owner.current, l, e, { ...this.options, duration: s, times: i, ease: r });
1301
- return c.startTime = u ?? this.calcStartTime(), this.pendingTimeline ? (qe(c, this.pendingTimeline), this.pendingTimeline = void 0) : c.onfinish = () => {
1338
+ const c = Di(a.owner.current, l, e, { ...this.options, duration: s, times: i, ease: r });
1339
+ return c.startTime = u ?? this.calcStartTime(), this.pendingTimeline ? (Ze(c, this.pendingTimeline), this.pendingTimeline = void 0) : c.onfinish = () => {
1302
1340
  const { onComplete: d } = this.options;
1303
- a.set(oe(e, this.options, n)), d && d(), this.cancel(), this.resolveFinishedPromise();
1341
+ a.set(ae(e, this.options, n)), d && d(), this.cancel(), this.resolveFinishedPromise();
1304
1342
  }, {
1305
1343
  animation: c,
1306
1344
  duration: s,
@@ -1371,7 +1409,7 @@ class ht extends sn {
1371
1409
  if (!n)
1372
1410
  return q;
1373
1411
  const { animation: s } = n;
1374
- qe(s, e);
1412
+ Ze(s, e);
1375
1413
  }
1376
1414
  return q;
1377
1415
  }
@@ -1402,7 +1440,7 @@ class ht extends sn {
1402
1440
  if (n.playState === "idle" || n.playState === "finished")
1403
1441
  return;
1404
1442
  if (this.time) {
1405
- const { motionValue: u, onUpdate: c, onComplete: d, element: h, ...f } = this.options, b = new Ue({
1443
+ const { motionValue: u, onUpdate: c, onComplete: d, element: h, ...f } = this.options, b = new He({
1406
1444
  ...f,
1407
1445
  keyframes: s,
1408
1446
  duration: i,
@@ -1411,7 +1449,7 @@ class ht extends sn {
1411
1449
  times: a,
1412
1450
  isGenerator: !0
1413
1451
  }), v = /* @__PURE__ */ I(this.time);
1414
- u.setWithVelocity(b.sample(v - se).value, b.sample(v).value, se);
1452
+ u.setWithVelocity(b.sample(v - ie).value, b.sample(v).value, ie);
1415
1453
  }
1416
1454
  const { onStop: l } = this.options;
1417
1455
  l && l(), this.cancel();
@@ -1429,36 +1467,36 @@ class ht extends sn {
1429
1467
  if (!n || !n.owner || !(n.owner.current instanceof HTMLElement))
1430
1468
  return !1;
1431
1469
  const { onUpdate: l, transformTemplate: u } = n.owner.getProps();
1432
- return Ti() && s && Mn.has(s) && /**
1470
+ return Fi() && s && Rn.has(s) && /**
1433
1471
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
1434
1472
  * no way to read the value from WAAPI every frame.
1435
1473
  */
1436
1474
  !l && !u && !i && r !== "mirror" && o !== 0 && a !== "inertia";
1437
1475
  }
1438
1476
  }
1439
- const wi = {
1477
+ const Ki = {
1440
1478
  type: "spring",
1441
1479
  stiffness: 500,
1442
1480
  damping: 25,
1443
1481
  restSpeed: 10
1444
- }, Mi = (t) => ({
1482
+ }, Ni = (t) => ({
1445
1483
  type: "spring",
1446
1484
  stiffness: 550,
1447
1485
  damping: t === 0 ? 2 * Math.sqrt(550) : 30,
1448
1486
  restSpeed: 10
1449
- }), Ci = {
1487
+ }), Bi = {
1450
1488
  type: "keyframes",
1451
1489
  duration: 0.8
1452
- }, Pi = {
1490
+ }, ki = {
1453
1491
  type: "keyframes",
1454
1492
  ease: [0.25, 0.1, 0.35, 1],
1455
1493
  duration: 0.3
1456
- }, Di = (t, { keyframes: e }) => e.length > 2 ? Ci : re.has(t) ? t.startsWith("scale") ? Mi(e[1]) : wi : Pi;
1457
- function Fi({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: u, ...c }) {
1494
+ }, Li = (t, { keyframes: e }) => e.length > 2 ? Bi : oe.has(t) ? t.startsWith("scale") ? Ni(e[1]) : Ki : ki;
1495
+ function _i({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: u, ...c }) {
1458
1496
  return !!Object.keys(c).length;
1459
1497
  }
1460
- const Ri = (t, e, n, s = {}, i, r) => (o) => {
1461
- const a = Pt(s, t) || {}, l = a.delay || s.delay || 0;
1498
+ const Gi = (t, e, n, s = {}, i, r) => (o) => {
1499
+ const a = Rt(s, t) || {}, l = a.delay || s.delay || 0;
1462
1500
  let { elapsed: u = 0 } = s;
1463
1501
  u = u - /* @__PURE__ */ I(l);
1464
1502
  let c = {
@@ -1477,63 +1515,63 @@ const Ri = (t, e, n, s = {}, i, r) => (o) => {
1477
1515
  motionValue: e,
1478
1516
  element: r ? void 0 : i
1479
1517
  };
1480
- Fi(a) || (c = {
1518
+ _i(a) || (c = {
1481
1519
  ...c,
1482
- ...Di(t, c)
1520
+ ...Li(t, c)
1483
1521
  }), c.duration && (c.duration = /* @__PURE__ */ I(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ I(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
1484
1522
  let d = !1;
1485
- if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (d = !0)), Cn.skipAnimations && (d = !0, c.duration = 0, c.delay = 0), d && !r && e.get() !== void 0) {
1486
- const h = oe(c.keyframes, a);
1523
+ if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (d = !0)), En.skipAnimations && (d = !0, c.duration = 0, c.delay = 0), c.allowFlatten = !a.type && !a.ease, d && !r && e.get() !== void 0) {
1524
+ const h = ae(c.keyframes, a);
1487
1525
  if (h !== void 0)
1488
1526
  return F.update(() => {
1489
1527
  c.onUpdate(h), c.onComplete();
1490
- }), new zn([]);
1528
+ }), new es([]);
1491
1529
  }
1492
- return !r && ht.supports(c) ? new ht(c) : new Ue(c);
1530
+ return !r && yt.supports(c) ? new yt(c) : new He(c);
1493
1531
  };
1494
- function Ii({ protectedKeys: t, needsAnimating: e }, n) {
1532
+ function Ui({ protectedKeys: t, needsAnimating: e }, n) {
1495
1533
  const s = t.hasOwnProperty(n) && e[n] !== !0;
1496
1534
  return e[n] = !1, s;
1497
1535
  }
1498
- function dn(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
1536
+ function yn(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
1499
1537
  var r;
1500
1538
  let { transition: o = t.getDefaultTransition(), transitionEnd: a, ...l } = e;
1501
1539
  s && (o = s);
1502
1540
  const u = [], c = i && t.animationState && t.animationState.getState()[i];
1503
1541
  for (const d in l) {
1504
1542
  const h = t.getValue(d, (r = t.latestValues[d]) !== null && r !== void 0 ? r : null), f = l[d];
1505
- if (f === void 0 || c && Ii(c, d))
1543
+ if (f === void 0 || c && Ui(c, d))
1506
1544
  continue;
1507
1545
  const b = {
1508
1546
  delay: n,
1509
- ...Pt(o || {}, d)
1547
+ ...Rt(o || {}, d)
1510
1548
  };
1511
1549
  let v = !1;
1512
1550
  if (window.MotionHandoffAnimation) {
1513
- const p = cs(t);
1551
+ const p = gs(t);
1514
1552
  if (p) {
1515
1553
  const T = window.MotionHandoffAnimation(p, d, F);
1516
1554
  T !== null && (b.startTime = T, v = !0);
1517
1555
  }
1518
1556
  }
1519
- us(t, d), h.start(Ri(d, h, f, t.shouldReduceMotion && Kt.has(d) ? { type: !1 } : b, t, v));
1557
+ ms(t, d), h.start(Gi(d, h, f, t.shouldReduceMotion && _t.has(d) ? { type: !1 } : b, t, v));
1520
1558
  const y = h.animation;
1521
1559
  y && u.push(y);
1522
1560
  }
1523
1561
  return a && Promise.all(u).then(() => {
1524
1562
  F.update(() => {
1525
- a && as(t, a);
1563
+ a && fs(t, a);
1526
1564
  });
1527
1565
  }), u;
1528
1566
  }
1529
- function Me(t, e, n = {}) {
1567
+ function Fe(t, e, n = {}) {
1530
1568
  var s;
1531
- const i = X(t, e, n.type === "exit" ? (s = t.presenceContext) === null || s === void 0 ? void 0 : s.custom : void 0);
1569
+ const i = Z(t, e, n.type === "exit" ? (s = t.presenceContext) === null || s === void 0 ? void 0 : s.custom : void 0);
1532
1570
  let { transition: r = t.getDefaultTransition() || {} } = i || {};
1533
1571
  n.transitionOverride && (r = n.transitionOverride);
1534
- const o = i ? () => Promise.all(dn(t, i, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (u = 0) => {
1572
+ const o = i ? () => Promise.all(yn(t, i, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (u = 0) => {
1535
1573
  const { delayChildren: c = 0, staggerChildren: d, staggerDirection: h } = r;
1536
- return Oi(t, e, c + u, d, h, n);
1574
+ return $i(t, e, c + u, d, h, n);
1537
1575
  } : () => Promise.resolve(), { when: l } = r;
1538
1576
  if (l) {
1539
1577
  const [u, c] = l === "beforeChildren" ? [o, a] : [a, o];
@@ -1541,35 +1579,35 @@ function Me(t, e, n = {}) {
1541
1579
  } else
1542
1580
  return Promise.all([o(), a(n.delay)]);
1543
1581
  }
1544
- function Oi(t, e, n = 0, s = 0, i = 1, r) {
1582
+ function $i(t, e, n = 0, s = 0, i = 1, r) {
1545
1583
  const o = [], a = (t.variantChildren.size - 1) * s, l = i === 1 ? (u = 0) => u * s : (u = 0) => a - u * s;
1546
- return Array.from(t.variantChildren).sort(Ei).forEach((u, c) => {
1547
- u.notify("AnimationStart", e), o.push(Me(u, e, {
1584
+ return Array.from(t.variantChildren).sort(ji).forEach((u, c) => {
1585
+ u.notify("AnimationStart", e), o.push(Fe(u, e, {
1548
1586
  ...r,
1549
1587
  delay: n + l(c)
1550
1588
  }).then(() => u.notify("AnimationComplete", e)));
1551
1589
  }), Promise.all(o);
1552
1590
  }
1553
- function Ei(t, e) {
1591
+ function ji(t, e) {
1554
1592
  return t.sortNodePosition(e);
1555
1593
  }
1556
- function Ki(t, e, n = {}) {
1594
+ function Hi(t, e, n = {}) {
1557
1595
  t.notify("AnimationStart", e);
1558
1596
  let s;
1559
1597
  if (Array.isArray(e)) {
1560
- const i = e.map((r) => Me(t, r, n));
1598
+ const i = e.map((r) => Fe(t, r, n));
1561
1599
  s = Promise.all(i);
1562
1600
  } else if (typeof e == "string")
1563
- s = Me(t, e, n);
1601
+ s = Fe(t, e, n);
1564
1602
  else {
1565
- const i = typeof e == "function" ? X(t, e, n.custom) : e;
1566
- s = Promise.all(dn(t, i, n));
1603
+ const i = typeof e == "function" ? Z(t, e, n.custom) : e;
1604
+ s = Promise.all(yn(t, i, n));
1567
1605
  }
1568
1606
  return s.then(() => {
1569
1607
  t.notify("AnimationComplete", e);
1570
1608
  });
1571
1609
  }
1572
- function hn(t, e) {
1610
+ function vn(t, e) {
1573
1611
  if (!Array.isArray(e))
1574
1612
  return !1;
1575
1613
  const n = e.length;
@@ -1580,30 +1618,30 @@ function hn(t, e) {
1580
1618
  return !1;
1581
1619
  return !0;
1582
1620
  }
1583
- const Ni = xt.length;
1584
- function fn(t) {
1621
+ const Wi = Dt.length;
1622
+ function bn(t) {
1585
1623
  if (!t)
1586
1624
  return;
1587
1625
  if (!t.isControllingVariants) {
1588
- const n = t.parent ? fn(t.parent) || {} : {};
1626
+ const n = t.parent ? bn(t.parent) || {} : {};
1589
1627
  return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
1590
1628
  }
1591
1629
  const e = {};
1592
- for (let n = 0; n < Ni; n++) {
1593
- const s = xt[n], i = t.props[s];
1594
- (At(i) || i === !1) && (e[s] = i);
1630
+ for (let n = 0; n < Wi; n++) {
1631
+ const s = Dt[n], i = t.props[s];
1632
+ (Ct(i) || i === !1) && (e[s] = i);
1595
1633
  }
1596
1634
  return e;
1597
1635
  }
1598
- const Bi = [...Mt].reverse(), Li = Mt.length;
1599
- function _i(t) {
1600
- return (e) => Promise.all(e.map(({ animation: n, options: s }) => Ki(t, n, s)));
1636
+ const zi = [...Ot].reverse(), Yi = Ot.length;
1637
+ function qi(t) {
1638
+ return (e) => Promise.all(e.map(({ animation: n, options: s }) => Hi(t, n, s)));
1601
1639
  }
1602
- function ki(t) {
1603
- let e = _i(t), n = ft(), s = !0;
1640
+ function Xi(t) {
1641
+ let e = qi(t), n = vt(), s = !0;
1604
1642
  const i = (l) => (u, c) => {
1605
1643
  var d;
1606
- const h = X(t, c, l === "exit" ? (d = t.presenceContext) === null || d === void 0 ? void 0 : d.custom : void 0);
1644
+ const h = Z(t, c, l === "exit" ? (d = t.presenceContext) === null || d === void 0 ? void 0 : d.custom : void 0);
1607
1645
  if (h) {
1608
1646
  const { transition: f, transitionEnd: b, ...v } = h;
1609
1647
  u = { ...u, ...v, ...b };
@@ -1614,40 +1652,40 @@ function ki(t) {
1614
1652
  e = l(t);
1615
1653
  }
1616
1654
  function o(l) {
1617
- const { props: u } = t, c = fn(t.parent) || {}, d = [], h = /* @__PURE__ */ new Set();
1655
+ const { props: u } = t, c = bn(t.parent) || {}, d = [], h = /* @__PURE__ */ new Set();
1618
1656
  let f = {}, b = 1 / 0;
1619
- for (let y = 0; y < Li; y++) {
1620
- const p = Bi[y], T = n[p], V = u[p] !== void 0 ? u[p] : c[p], P = At(V), g = p === l ? T.isActive : null;
1657
+ for (let y = 0; y < Yi; y++) {
1658
+ const p = zi[y], T = n[p], V = u[p] !== void 0 ? u[p] : c[p], C = Ct(V), g = p === l ? T.isActive : null;
1621
1659
  g === !1 && (b = y);
1622
- let S = V === c[p] && V !== u[p] && P;
1660
+ let S = V === c[p] && V !== u[p] && C;
1623
1661
  if (S && s && t.manuallyAnimateOnMount && (S = !1), T.protectedKeys = { ...f }, // If it isn't active and hasn't *just* been set as inactive
1624
1662
  !T.isActive && g === null || // If we didn't and don't have any defined prop for this animation type
1625
1663
  !V && !T.prevProp || // Or if the prop doesn't define an animation
1626
- wt(V) || typeof V == "boolean")
1664
+ Ft(V) || typeof V == "boolean")
1627
1665
  continue;
1628
- const x = Gi(T.prevProp, V);
1666
+ const x = Zi(T.prevProp, V);
1629
1667
  let m = x || // If we're making this variant active, we want to always make it active
1630
- p === l && T.isActive && !S && P || // If we removed a higher-priority variant (i is in reverse order)
1631
- y > b && P, C = !1;
1668
+ p === l && T.isActive && !S && C || // If we removed a higher-priority variant (i is in reverse order)
1669
+ y > b && C, P = !1;
1632
1670
  const D = Array.isArray(V) ? V : [V];
1633
1671
  let L = D.reduce(i(p), {});
1634
1672
  g === !1 && (L = {});
1635
- const { prevResolvedValues: $e = {} } = T, vn = {
1636
- ...$e,
1673
+ const { prevResolvedValues: We = {} } = T, xn = {
1674
+ ...We,
1637
1675
  ...L
1638
- }, je = (M) => {
1639
- m = !0, h.has(M) && (C = !0, h.delete(M)), T.needsAnimating[M] = !0;
1640
- const R = t.getValue(M);
1641
- R && (R.liveStyle = !1);
1676
+ }, ze = (M) => {
1677
+ m = !0, h.has(M) && (P = !0, h.delete(M)), T.needsAnimating[M] = !0;
1678
+ const O = t.getValue(M);
1679
+ O && (O.liveStyle = !1);
1642
1680
  };
1643
- for (const M in vn) {
1644
- const R = L[M], ue = $e[M];
1681
+ for (const M in xn) {
1682
+ const O = L[M], ce = We[M];
1645
1683
  if (f.hasOwnProperty(M))
1646
1684
  continue;
1647
- let ce = !1;
1648
- We(R) && We(ue) ? ce = !hn(R, ue) : ce = R !== ue, ce ? R != null ? je(M) : h.add(M) : R !== void 0 && h.has(M) ? je(M) : T.protectedKeys[M] = !0;
1685
+ let de = !1;
1686
+ qe(O) && qe(ce) ? de = !vn(O, ce) : de = O !== ce, de ? O != null ? ze(M) : h.add(M) : O !== void 0 && h.has(M) ? ze(M) : T.protectedKeys[M] = !0;
1649
1687
  }
1650
- T.prevProp = V, T.prevResolvedValues = L, T.isActive && (f = { ...f, ...L }), s && t.blockInitialAnimation && (m = !1), m && (!(S && x) || C) && d.push(...D.map((M) => ({
1688
+ T.prevProp = V, T.prevResolvedValues = L, T.isActive && (f = { ...f, ...L }), s && t.blockInitialAnimation && (m = !1), m && (!(S && x) || P) && d.push(...D.map((M) => ({
1651
1689
  animation: M,
1652
1690
  options: { type: p }
1653
1691
  })));
@@ -1655,7 +1693,7 @@ function ki(t) {
1655
1693
  if (h.size) {
1656
1694
  const y = {};
1657
1695
  if (typeof u.initial != "boolean") {
1658
- const p = X(t, Array.isArray(u.initial) ? u.initial[0] : u.initial);
1696
+ const p = Z(t, Array.isArray(u.initial) ? u.initial[0] : u.initial);
1659
1697
  p && p.transition && (y.transition = p.transition);
1660
1698
  }
1661
1699
  h.forEach((p) => {
@@ -1685,12 +1723,12 @@ function ki(t) {
1685
1723
  setAnimateFunction: r,
1686
1724
  getState: () => n,
1687
1725
  reset: () => {
1688
- n = ft(), s = !0;
1726
+ n = vt(), s = !0;
1689
1727
  }
1690
1728
  };
1691
1729
  }
1692
- function Gi(t, e) {
1693
- return typeof e == "string" ? e !== t : Array.isArray(e) ? !hn(e, t) : !1;
1730
+ function Zi(t, e) {
1731
+ return typeof e == "string" ? e !== t : Array.isArray(e) ? !vn(e, t) : !1;
1694
1732
  }
1695
1733
  function K(t = !1) {
1696
1734
  return {
@@ -1700,7 +1738,7 @@ function K(t = !1) {
1700
1738
  prevResolvedValues: {}
1701
1739
  };
1702
1740
  }
1703
- function ft() {
1741
+ function vt() {
1704
1742
  return {
1705
1743
  animate: K(!0),
1706
1744
  whileInView: K(),
@@ -1711,25 +1749,25 @@ function ft() {
1711
1749
  exit: K()
1712
1750
  };
1713
1751
  }
1714
- class $ {
1752
+ class j {
1715
1753
  constructor(e) {
1716
1754
  this.isMounted = !1, this.node = e;
1717
1755
  }
1718
1756
  update() {
1719
1757
  }
1720
1758
  }
1721
- class Ui extends $ {
1759
+ class Ji extends j {
1722
1760
  /**
1723
1761
  * We dynamically generate the AnimationState manager as it contains a reference
1724
1762
  * to the underlying animation library. We only want to load that if we load this,
1725
1763
  * so people can optionally code split it out using the `m` component.
1726
1764
  */
1727
1765
  constructor(e) {
1728
- super(e), e.animationState || (e.animationState = ki(e));
1766
+ super(e), e.animationState || (e.animationState = Xi(e));
1729
1767
  }
1730
1768
  updateAnimationControlsSubscription() {
1731
1769
  const { animate: e } = this.node.getProps();
1732
- wt(e) && (this.unmountControls = e.subscribe(this.node));
1770
+ Ft(e) && (this.unmountControls = e.subscribe(this.node));
1733
1771
  }
1734
1772
  /**
1735
1773
  * Subscribe any provided AnimationControls to the component's VisualElement
@@ -1746,10 +1784,10 @@ class Ui extends $ {
1746
1784
  this.node.animationState.reset(), (e = this.unmountControls) === null || e === void 0 || e.call(this);
1747
1785
  }
1748
1786
  }
1749
- let $i = 0;
1750
- class ji extends $ {
1787
+ let Qi = 0;
1788
+ class er extends j {
1751
1789
  constructor() {
1752
- super(...arguments), this.id = $i++;
1790
+ super(...arguments), this.id = Qi++;
1753
1791
  }
1754
1792
  update() {
1755
1793
  if (!this.node.presenceContext)
@@ -1769,18 +1807,18 @@ class ji extends $ {
1769
1807
  unmount() {
1770
1808
  }
1771
1809
  }
1772
- const Hi = {
1810
+ const tr = {
1773
1811
  animation: {
1774
- Feature: Ui
1812
+ Feature: Ji
1775
1813
  },
1776
1814
  exit: {
1777
- Feature: ji
1815
+ Feature: er
1778
1816
  }
1779
1817
  };
1780
- function pt(t, e, n, s = { passive: !0 }) {
1818
+ function bt(t, e, n, s = { passive: !0 }) {
1781
1819
  return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
1782
1820
  }
1783
- function pn(t) {
1821
+ function Tn(t) {
1784
1822
  return {
1785
1823
  point: {
1786
1824
  x: t.pageX,
@@ -1788,13 +1826,13 @@ function pn(t) {
1788
1826
  }
1789
1827
  };
1790
1828
  }
1791
- function Wi({ top: t, left: e, right: n, bottom: s }) {
1829
+ function nr({ top: t, left: e, right: n, bottom: s }) {
1792
1830
  return {
1793
1831
  x: { min: e, max: n },
1794
1832
  y: { min: t, max: s }
1795
1833
  };
1796
1834
  }
1797
- function zi(t, e) {
1835
+ function sr(t, e) {
1798
1836
  if (!e)
1799
1837
  return t;
1800
1838
  const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
@@ -1805,28 +1843,28 @@ function zi(t, e) {
1805
1843
  right: s.x
1806
1844
  };
1807
1845
  }
1808
- const mt = () => ({ min: 0, max: 0 }), mn = () => ({
1809
- x: mt(),
1810
- y: mt()
1846
+ const Tt = () => ({ min: 0, max: 0 }), Vn = () => ({
1847
+ x: Tt(),
1848
+ y: Tt()
1811
1849
  });
1812
- function qi(t, e) {
1813
- return Wi(zi(t.getBoundingClientRect(), e));
1850
+ function ir(t, e) {
1851
+ return nr(sr(t.getBoundingClientRect(), e));
1814
1852
  }
1815
- function gt(t, e, n) {
1853
+ function Vt(t, e, n) {
1816
1854
  const { props: s } = t;
1817
1855
  t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
1818
1856
  const i = "onHover" + n, r = s[i];
1819
- r && F.postRender(() => r(e, pn(e)));
1857
+ r && F.postRender(() => r(e, Tn(e)));
1820
1858
  }
1821
- class Yi extends $ {
1859
+ class rr extends j {
1822
1860
  mount() {
1823
1861
  const { current: e } = this.node;
1824
- e && (this.unmount = Qn(e, (n, s) => (gt(this.node, s, "Start"), (i) => gt(this.node, i, "End"))));
1862
+ e && (this.unmount = rs(e, (n, s) => (Vt(this.node, s, "Start"), (i) => Vt(this.node, i, "End"))));
1825
1863
  }
1826
1864
  unmount() {
1827
1865
  }
1828
1866
  }
1829
- class Xi extends $ {
1867
+ class or extends j {
1830
1868
  constructor() {
1831
1869
  super(...arguments), this.isActive = !1;
1832
1870
  }
@@ -1843,50 +1881,50 @@ class Xi extends $ {
1843
1881
  !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
1844
1882
  }
1845
1883
  mount() {
1846
- this.unmount = le(pt(this.node.current, "focus", () => this.onFocus()), pt(this.node.current, "blur", () => this.onBlur()));
1884
+ this.unmount = ue(bt(this.node.current, "focus", () => this.onFocus()), bt(this.node.current, "blur", () => this.onBlur()));
1847
1885
  }
1848
1886
  unmount() {
1849
1887
  }
1850
1888
  }
1851
- function yt(t, e, n) {
1889
+ function St(t, e, n) {
1852
1890
  const { props: s } = t;
1853
1891
  if (t.current instanceof HTMLButtonElement && t.current.disabled)
1854
1892
  return;
1855
1893
  t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
1856
1894
  const i = "onTap" + (n === "End" ? "" : n), r = s[i];
1857
- r && F.postRender(() => r(e, pn(e)));
1895
+ r && F.postRender(() => r(e, Tn(e)));
1858
1896
  }
1859
- class Zi extends $ {
1897
+ class ar extends j {
1860
1898
  mount() {
1861
1899
  const { current: e } = this.node;
1862
- e && (this.unmount = is(e, (n, s) => (yt(this.node, s, "Start"), (i, { success: r }) => yt(this.node, i, r ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
1900
+ e && (this.unmount = cs(e, (n, s) => (St(this.node, s, "Start"), (i, { success: r }) => St(this.node, i, r ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
1863
1901
  }
1864
1902
  unmount() {
1865
1903
  }
1866
1904
  }
1867
- const Ce = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), Ji = (t) => {
1868
- const e = Ce.get(t.target);
1905
+ const Oe = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), lr = (t) => {
1906
+ const e = Oe.get(t.target);
1869
1907
  e && e(t);
1870
- }, Qi = (t) => {
1871
- t.forEach(Ji);
1908
+ }, ur = (t) => {
1909
+ t.forEach(lr);
1872
1910
  };
1873
- function er({ root: t, ...e }) {
1911
+ function cr({ root: t, ...e }) {
1874
1912
  const n = t || document;
1875
- me.has(n) || me.set(n, {});
1876
- const s = me.get(n), i = JSON.stringify(e);
1877
- return s[i] || (s[i] = new IntersectionObserver(Qi, { root: t, ...e })), s[i];
1878
- }
1879
- function tr(t, e, n) {
1880
- const s = er(e);
1881
- return Ce.set(t, n), s.observe(t), () => {
1882
- Ce.delete(t), s.unobserve(t);
1913
+ ge.has(n) || ge.set(n, {});
1914
+ const s = ge.get(n), i = JSON.stringify(e);
1915
+ return s[i] || (s[i] = new IntersectionObserver(ur, { root: t, ...e })), s[i];
1916
+ }
1917
+ function dr(t, e, n) {
1918
+ const s = cr(e);
1919
+ return Oe.set(t, n), s.observe(t), () => {
1920
+ Oe.delete(t), s.unobserve(t);
1883
1921
  };
1884
1922
  }
1885
- const nr = {
1923
+ const hr = {
1886
1924
  some: 0,
1887
1925
  all: 1
1888
1926
  };
1889
- class sr extends $ {
1927
+ class fr extends j {
1890
1928
  constructor() {
1891
1929
  super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
1892
1930
  }
@@ -1895,7 +1933,7 @@ class sr extends $ {
1895
1933
  const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = e, o = {
1896
1934
  root: n ? n.current : void 0,
1897
1935
  rootMargin: s,
1898
- threshold: typeof i == "number" ? i : nr[i]
1936
+ threshold: typeof i == "number" ? i : hr[i]
1899
1937
  }, a = (l) => {
1900
1938
  const { isIntersecting: u } = l;
1901
1939
  if (this.isInView === u || (this.isInView = u, r && !u && this.hasEnteredView))
@@ -1904,7 +1942,7 @@ class sr extends $ {
1904
1942
  const { onViewportEnter: c, onViewportLeave: d } = this.node.getProps(), h = u ? c : d;
1905
1943
  h && h(l);
1906
1944
  };
1907
- return tr(this.node.current, o, a);
1945
+ return dr(this.node.current, o, a);
1908
1946
  }
1909
1947
  mount() {
1910
1948
  this.startObserver();
@@ -1913,58 +1951,58 @@ class sr extends $ {
1913
1951
  if (typeof IntersectionObserver > "u")
1914
1952
  return;
1915
1953
  const { props: e, prevProps: n } = this.node;
1916
- ["amount", "margin", "root"].some(ir(e, n)) && this.startObserver();
1954
+ ["amount", "margin", "root"].some(pr(e, n)) && this.startObserver();
1917
1955
  }
1918
1956
  unmount() {
1919
1957
  }
1920
1958
  }
1921
- function ir({ viewport: t = {} }, { viewport: e = {} } = {}) {
1959
+ function pr({ viewport: t = {} }, { viewport: e = {} } = {}) {
1922
1960
  return (n) => t[n] !== e[n];
1923
1961
  }
1924
- const rr = {
1962
+ const mr = {
1925
1963
  inView: {
1926
- Feature: sr
1964
+ Feature: fr
1927
1965
  },
1928
1966
  tap: {
1929
- Feature: Zi
1967
+ Feature: ar
1930
1968
  },
1931
1969
  focus: {
1932
- Feature: Xi
1970
+ Feature: or
1933
1971
  },
1934
1972
  hover: {
1935
- Feature: Yi
1973
+ Feature: rr
1936
1974
  }
1937
- }, Pe = { current: null }, gn = { current: !1 };
1938
- function or() {
1939
- if (gn.current = !0, !!Pn)
1975
+ }, Ie = { current: null }, Sn = { current: !1 };
1976
+ function gr() {
1977
+ if (Sn.current = !0, !!Kn)
1940
1978
  if (window.matchMedia) {
1941
- const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Pe.current = t.matches;
1979
+ const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Ie.current = t.matches;
1942
1980
  t.addListener(e), e();
1943
1981
  } else
1944
- Pe.current = !1;
1982
+ Ie.current = !1;
1945
1983
  }
1946
- const ar = [...tn, w, U], lr = (t) => ar.find(en(t)), ur = /* @__PURE__ */ new WeakMap();
1947
- function cr(t, e, n) {
1984
+ const yr = [...ln, w, $], vr = (t) => yr.find(an(t)), br = /* @__PURE__ */ new WeakMap();
1985
+ function Tr(t, e, n) {
1948
1986
  for (const s in e) {
1949
1987
  const i = e[s], r = n[s];
1950
- if (O(i))
1951
- t.addValue(s, i), process.env.NODE_ENV === "development" && Ct(i.version === "12.4.10", `Attempting to mix Motion versions ${i.version} with 12.4.10 may not work as expected.`);
1952
- else if (O(r))
1953
- t.addValue(s, Q(i, { owner: t }));
1988
+ if (R(i))
1989
+ t.addValue(s, i), process.env.NODE_ENV === "development" && It(i.version === "12.5.0", `Attempting to mix Motion versions ${i.version} with 12.5.0 may not work as expected.`);
1990
+ else if (R(r))
1991
+ t.addValue(s, ee(i, { owner: t }));
1954
1992
  else if (r !== i)
1955
1993
  if (t.hasValue(s)) {
1956
1994
  const o = t.getValue(s);
1957
1995
  o.liveStyle === !0 ? o.jump(i) : o.hasAnimated || o.set(i);
1958
1996
  } else {
1959
1997
  const o = t.getStaticValue(s);
1960
- t.addValue(s, Q(o !== void 0 ? o : i, { owner: t }));
1998
+ t.addValue(s, ee(o !== void 0 ? o : i, { owner: t }));
1961
1999
  }
1962
2000
  }
1963
2001
  for (const s in n)
1964
2002
  e[s] === void 0 && t.removeValue(s);
1965
2003
  return e;
1966
2004
  }
1967
- const vt = [
2005
+ const At = [
1968
2006
  "AnimationStart",
1969
2007
  "AnimationComplete",
1970
2008
  "Update",
@@ -1973,7 +2011,7 @@ const vt = [
1973
2011
  "LayoutAnimationStart",
1974
2012
  "LayoutAnimationComplete"
1975
2013
  ];
1976
- class dr {
2014
+ class Vr {
1977
2015
  /**
1978
2016
  * This method takes React props and returns found MotionValues. For example, HTML
1979
2017
  * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
@@ -1985,25 +2023,25 @@ class dr {
1985
2023
  return {};
1986
2024
  }
1987
2025
  constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: o }, a = {}) {
1988
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = ke, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2026
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = $e, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
1989
2027
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
1990
2028
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
1991
- const f = ee.now();
2029
+ const f = te.now();
1992
2030
  this.renderScheduledAt < f && (this.renderScheduledAt = f, F.render(this.render, !1, !0));
1993
2031
  };
1994
2032
  const { latestValues: l, renderState: u, onUpdate: c } = o;
1995
- this.onUpdate = c, this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = Dn(n), this.isVariantNode = Fn(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2033
+ this.onUpdate = c, this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = Nn(n), this.isVariantNode = Bn(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
1996
2034
  const { willChange: d, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
1997
2035
  for (const f in h) {
1998
2036
  const b = h[f];
1999
- l[f] !== void 0 && O(b) && b.set(l[f], !1);
2037
+ l[f] !== void 0 && R(b) && b.set(l[f], !1);
2000
2038
  }
2001
2039
  }
2002
2040
  mount(e) {
2003
- this.current = e, ur.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), gn.current || or(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Pe.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);
2041
+ this.current = e, br.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Sn.current || gr(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Ie.current, process.env.NODE_ENV !== "production" && It(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);
2004
2042
  }
2005
2043
  unmount() {
2006
- this.projection && this.projection.unmount(), ye(this.notifyUpdate), ye(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
2044
+ this.projection && this.projection.unmount(), ve(this.notifyUpdate), ve(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
2007
2045
  for (const e in this.events)
2008
2046
  this.events[e].clear();
2009
2047
  for (const e in this.features) {
@@ -2014,7 +2052,7 @@ class dr {
2014
2052
  }
2015
2053
  bindToMotionValue(e, n) {
2016
2054
  this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
2017
- const s = re.has(e);
2055
+ const s = oe.has(e);
2018
2056
  s && this.onBindTransform && this.onBindTransform();
2019
2057
  const i = n.on("change", (a) => {
2020
2058
  this.latestValues[e] = a, this.props.onUpdate && F.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
@@ -2029,8 +2067,8 @@ class dr {
2029
2067
  }
2030
2068
  updateFeatures() {
2031
2069
  let e = "animation";
2032
- for (e in ze) {
2033
- const n = ze[e];
2070
+ for (e in Xe) {
2071
+ const n = Xe[e];
2034
2072
  if (!n)
2035
2073
  continue;
2036
2074
  const { isEnabled: s, Feature: i } = n;
@@ -2049,7 +2087,7 @@ class dr {
2049
2087
  * removed with a re-render to work.
2050
2088
  */
2051
2089
  measureViewportBox() {
2052
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : mn();
2090
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Vn();
2053
2091
  }
2054
2092
  getStaticValue(e) {
2055
2093
  return this.latestValues[e];
@@ -2063,13 +2101,13 @@ class dr {
2063
2101
  */
2064
2102
  update(e, n) {
2065
2103
  (e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
2066
- for (let s = 0; s < vt.length; s++) {
2067
- const i = vt[s];
2104
+ for (let s = 0; s < At.length; s++) {
2105
+ const i = At[s];
2068
2106
  this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
2069
2107
  const r = "on" + i, o = e[r];
2070
2108
  o && (this.propEventSubscriptions[i] = this.on(i, o));
2071
2109
  }
2072
- this.prevMotionValues = cr(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue(), this.onUpdate && this.onUpdate(this);
2110
+ this.prevMotionValues = Tr(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue(), this.onUpdate && this.onUpdate(this);
2073
2111
  }
2074
2112
  getProps() {
2075
2113
  return this.props;
@@ -2125,7 +2163,7 @@ class dr {
2125
2163
  if (this.props.values && this.props.values[e])
2126
2164
  return this.props.values[e];
2127
2165
  let s = this.values.get(e);
2128
- return s === void 0 && n !== void 0 && (s = Q(n === null ? void 0 : n, { owner: this }), this.addValue(e, s)), s;
2166
+ return s === void 0 && n !== void 0 && (s = ee(n === null ? void 0 : n, { owner: this }), this.addValue(e, s)), s;
2129
2167
  }
2130
2168
  /**
2131
2169
  * If we're trying to animate to a previously unencountered value,
@@ -2135,7 +2173,7 @@ class dr {
2135
2173
  readValue(e, n) {
2136
2174
  var s;
2137
2175
  let i = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (s = this.getBaseTargetFromProps(this.props, e)) !== null && s !== void 0 ? s : this.readValueFromInstance(this.current, e, this.options);
2138
- return i != null && (typeof i == "string" && (Jt(i) || $t(i)) ? i = parseFloat(i) : !lr(i) && U.test(n) && (i = Yt(e, n)), this.setBaseTarget(e, O(i) ? i.get() : i)), O(i) ? i.get() : i;
2176
+ return i != null && (typeof i == "string" && (rn(i) || Yt(i)) ? i = parseFloat(i) : !vr(i) && $.test(n) && (i = tn(e, n)), this.setBaseTarget(e, R(i) ? i.get() : i)), R(i) ? i.get() : i;
2139
2177
  }
2140
2178
  /**
2141
2179
  * Set the base target to later animate back to. This is currently
@@ -2153,24 +2191,24 @@ class dr {
2153
2191
  const { initial: s } = this.props;
2154
2192
  let i;
2155
2193
  if (typeof s == "string" || typeof s == "object") {
2156
- const o = bt(this.props, s, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
2194
+ const o = xt(this.props, s, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
2157
2195
  o && (i = o[e]);
2158
2196
  }
2159
2197
  if (s && i !== void 0)
2160
2198
  return i;
2161
2199
  const r = this.getBaseTargetFromProps(this.props, e);
2162
- return r !== void 0 && !O(r) ? r : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
2200
+ return r !== void 0 && !R(r) ? r : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
2163
2201
  }
2164
2202
  on(e, n) {
2165
- return this.events[e] || (this.events[e] = new Rn()), this.events[e].add(n);
2203
+ return this.events[e] || (this.events[e] = new kn()), this.events[e].add(n);
2166
2204
  }
2167
2205
  notify(e, ...n) {
2168
2206
  this.events[e] && this.events[e].notify(...n);
2169
2207
  }
2170
2208
  }
2171
- class yn extends dr {
2209
+ class An extends Vr {
2172
2210
  constructor() {
2173
- super(...arguments), this.KeyframeResolver = nn;
2211
+ super(...arguments), this.KeyframeResolver = un;
2174
2212
  }
2175
2213
  sortInstanceNodePosition(e, n) {
2176
2214
  return e.compareDocumentPosition(n) & 2 ? 1 : -1;
@@ -2184,77 +2222,76 @@ class yn extends dr {
2184
2222
  handleChildMotionValue() {
2185
2223
  this.childSubscription && (this.childSubscription(), delete this.childSubscription);
2186
2224
  const { children: e } = this.props;
2187
- O(e) && (this.childSubscription = e.on("change", (n) => {
2225
+ R(e) && (this.childSubscription = e.on("change", (n) => {
2188
2226
  this.current && (this.current.textContent = `${n}`);
2189
2227
  }));
2190
2228
  }
2191
2229
  }
2192
- function hr(t) {
2230
+ function Sr(t) {
2193
2231
  return window.getComputedStyle(t);
2194
2232
  }
2195
- class fr extends yn {
2233
+ class Ar extends An {
2196
2234
  constructor() {
2197
- super(...arguments), this.type = "html", this.renderInstance = In;
2235
+ super(...arguments), this.type = "html", this.renderInstance = Ln;
2198
2236
  }
2199
2237
  readValueFromInstance(e, n) {
2200
- if (re.has(n)) {
2201
- const s = _e(n);
2202
- return s && s.default || 0;
2203
- } else {
2204
- const s = hr(e), i = (On(n) ? s.getPropertyValue(n) : s[n]) || 0;
2238
+ if (oe.has(n))
2239
+ return Gs(e, n);
2240
+ {
2241
+ const s = Sr(e), i = (_n(n) ? s.getPropertyValue(n) : s[n]) || 0;
2205
2242
  return typeof i == "string" ? i.trim() : i;
2206
2243
  }
2207
2244
  }
2208
2245
  measureInstanceViewportBox(e, { transformPagePoint: n }) {
2209
- return qi(e, n);
2246
+ return ir(e, n);
2210
2247
  }
2211
2248
  build(e, n, s) {
2212
- En(e, n, s.transformTemplate);
2249
+ Gn(e, n, s.transformTemplate);
2213
2250
  }
2214
2251
  scrapeMotionValuesFromProps(e, n, s) {
2215
- return Kn(e, n, s);
2252
+ return Un(e, n, s);
2216
2253
  }
2217
2254
  }
2218
- class pr extends yn {
2255
+ class xr extends An {
2219
2256
  constructor() {
2220
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = mn, this.updateDimensions = () => {
2221
- this.current && !this.renderState.dimensions && Nn(this.current, this.renderState);
2257
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Vn, this.updateDimensions = () => {
2258
+ this.current && !this.renderState.dimensions && $n(this.current, this.renderState);
2222
2259
  };
2223
2260
  }
2224
2261
  getBaseTargetFromProps(e, n) {
2225
2262
  return e[n];
2226
2263
  }
2227
2264
  readValueFromInstance(e, n) {
2228
- if (re.has(n)) {
2229
- const s = _e(n);
2265
+ if (oe.has(n)) {
2266
+ const s = en(n);
2230
2267
  return s && s.default || 0;
2231
2268
  }
2232
- return n = Ln.has(n) ? n : Bn(n), e.getAttribute(n);
2269
+ return n = Hn.has(n) ? n : jn(n), e.getAttribute(n);
2233
2270
  }
2234
2271
  scrapeMotionValuesFromProps(e, n, s) {
2235
- return _n(e, n, s);
2272
+ return Wn(e, n, s);
2236
2273
  }
2237
2274
  onBindTransform() {
2238
2275
  this.current && !this.renderState.dimensions && F.postRender(this.updateDimensions);
2239
2276
  }
2240
2277
  build(e, n, s) {
2241
- kn(e, n, this.isSVGTag, s.transformTemplate);
2278
+ zn(e, n, this.isSVGTag, s.transformTemplate);
2242
2279
  }
2243
2280
  renderInstance(e, n, s, i) {
2244
- Gn(e, n, s, i);
2281
+ Yn(e, n, s, i);
2245
2282
  }
2246
2283
  mount(e) {
2247
- this.isSVGTag = Un(e.tagName), super.mount(e);
2284
+ this.isSVGTag = qn(e.tagName), super.mount(e);
2248
2285
  }
2249
2286
  }
2250
- const mr = (t, e) => $n(t) ? new pr(e) : new fr(e, {
2251
- allowProjection: t !== jn
2252
- }), gr = {
2253
- renderer: mr,
2254
- ...Hi,
2255
- ...rr
2287
+ const wr = (t, e) => Xn(t) ? new xr(e) : new Ar(e, {
2288
+ allowProjection: t !== Zn
2289
+ }), Mr = {
2290
+ renderer: wr,
2291
+ ...tr,
2292
+ ...mr
2256
2293
  };
2257
- var Vr = gr;
2294
+ var Or = Mr;
2258
2295
  export {
2259
- Vr as default
2296
+ Or as default
2260
2297
  };