@clubmed/usg-chat-ui 1.5.1 → 1.6.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,9 +1,9 @@
1
1
  "use client";
2
- import { jsx as C, Fragment as Zi, jsxs as Q } from "react/jsx-runtime";
2
+ import { jsx as M, Fragment as Ji, jsxs as Q } from "react/jsx-runtime";
3
3
  import { useCanvasStore as jr } from "../../utils/canvas-store.js";
4
4
  import { cn as Nr } from "../../utils/cn.js";
5
- import * as se from "react";
6
- import { createContext as bt, useRef as U, useLayoutEffect as Ur, useEffect as kt, useId as qe, useContext as B, useInsertionEffect as Ze, useMemo as ht, useCallback as Ji, Children as Wr, isValidElement as $r, useState as Ln, Fragment as Qi, createElement as Kr, forwardRef as zr, Component as _r } from "react";
5
+ import * as re from "react";
6
+ import { createContext as bt, useRef as W, useLayoutEffect as Wr, useEffect as Ft, useId as Ze, useContext as B, useInsertionEffect as Je, useMemo as ft, useCallback as Qi, Children as Ur, isValidElement as $r, useState as kn, Fragment as ts, createElement as Kr, forwardRef as zr, Component as _r } from "react";
7
7
  import { useChatLabels as Gr } from "../../contexts/ChatLabelsContext.js";
8
8
  import { c as Hr } from "../../chunks/createLucideIcon.js";
9
9
  import { M as Xr } from "../../chunks/maximize-2.js";
@@ -19,53 +19,53 @@ const qr = [
19
19
  ["path", { d: "M20 10h-6V4", key: "mjg0md" }],
20
20
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
21
21
  ["path", { d: "M4 14h6v6", key: "rmj7iw" }]
22
- ], Zr = Hr("minimize-2", qr), Je = bt({});
23
- function Qe(t) {
24
- const e = U(null);
22
+ ], Zr = Hr("minimize-2", qr), Qe = bt({});
23
+ function tn(t) {
24
+ const e = W(null);
25
25
  return e.current === null && (e.current = t()), e.current;
26
26
  }
27
- const ts = typeof window < "u", es = ts ? Ur : kt, re = /* @__PURE__ */ bt(null);
28
- function tn(t, e) {
27
+ const es = typeof window < "u", ns = es ? Wr : Ft, oe = /* @__PURE__ */ bt(null);
28
+ function en(t, e) {
29
29
  t.indexOf(e) === -1 && t.push(e);
30
30
  }
31
- function en(t, e) {
31
+ function nn(t, e) {
32
32
  const n = t.indexOf(e);
33
33
  n > -1 && t.splice(n, 1);
34
34
  }
35
35
  const q = (t, e, n) => n > e ? e : n < t ? t : n;
36
- function Me(t, e) {
36
+ function Ce(t, e) {
37
37
  return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
38
38
  }
39
39
  let St = () => {
40
40
  }, Z = () => {
41
41
  };
42
- var qi;
43
- typeof process < "u" && ((qi = process.env) == null ? void 0 : qi.NODE_ENV) !== "production" && (St = (t, e, n) => {
44
- !t && typeof console < "u" && console.warn(Me(e, n));
42
+ var Zi;
43
+ typeof process < "u" && ((Zi = process.env) == null ? void 0 : Zi.NODE_ENV) !== "production" && (St = (t, e, n) => {
44
+ !t && typeof console < "u" && console.warn(Ce(e, n));
45
45
  }, Z = (t, e, n) => {
46
46
  if (!t)
47
- throw new Error(Me(e, n));
47
+ throw new Error(Ce(e, n));
48
48
  });
49
- const J = {}, ns = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
50
- function is(t) {
49
+ const J = {}, is = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
50
+ function ss(t) {
51
51
  return typeof t == "object" && t !== null;
52
52
  }
53
- const ss = (t) => /^0[^.\s]+$/u.test(t);
53
+ const rs = (t) => /^0[^.\s]+$/u.test(t);
54
54
  // @__NO_SIDE_EFFECTS__
55
- function nn(t) {
55
+ function sn(t) {
56
56
  let e;
57
57
  return () => (e === void 0 && (e = t()), e);
58
58
  }
59
- const z = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Jr = (t, e) => (n) => e(t(n)), Nt = (...t) => t.reduce(Jr), Ft = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
59
+ const _ = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Jr = (t, e) => (n) => e(t(n)), Wt = (...t) => t.reduce(Jr), It = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
60
60
  const i = e - t;
61
61
  return i === 0 ? 1 : (n - t) / i;
62
62
  };
63
- class sn {
63
+ class rn {
64
64
  constructor() {
65
65
  this.subscriptions = [];
66
66
  }
67
67
  add(e) {
68
- return tn(this.subscriptions, e), () => en(this.subscriptions, e);
68
+ return en(this.subscriptions, e), () => nn(this.subscriptions, e);
69
69
  }
70
70
  notify(e, n, i) {
71
71
  const s = this.subscriptions.length;
@@ -85,49 +85,49 @@ class sn {
85
85
  this.subscriptions.length = 0;
86
86
  }
87
87
  }
88
- const X = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, K = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
89
- function rs(t, e) {
88
+ const X = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, z = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
89
+ function os(t, e) {
90
90
  return e ? t * (1e3 / e) : 0;
91
91
  }
92
- const kn = /* @__PURE__ */ new Set();
93
- function rn(t, e, n) {
94
- t || kn.has(e) || (console.warn(Me(e, n)), kn.add(e));
92
+ const Fn = /* @__PURE__ */ new Set();
93
+ function on(t, e, n) {
94
+ t || Fn.has(e) || (console.warn(Ce(e, n)), Fn.add(e));
95
95
  }
96
- const os = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Qr = 1e-7, to = 12;
96
+ const as = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Qr = 1e-7, to = 12;
97
97
  function eo(t, e, n, i, s) {
98
98
  let o, r, a = 0;
99
99
  do
100
- r = e + (n - e) / 2, o = os(r, i, s) - t, o > 0 ? n = r : e = r;
100
+ r = e + (n - e) / 2, o = as(r, i, s) - t, o > 0 ? n = r : e = r;
101
101
  while (Math.abs(o) > Qr && ++a < to);
102
102
  return r;
103
103
  }
104
104
  function Ut(t, e, n, i) {
105
105
  if (t === e && n === i)
106
- return z;
106
+ return _;
107
107
  const s = (o) => eo(o, 0, 1, t, n);
108
- return (o) => o === 0 || o === 1 ? o : os(s(o), e, i);
108
+ return (o) => o === 0 || o === 1 ? o : as(s(o), e, i);
109
109
  }
110
- const as = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, ls = (t) => (e) => 1 - t(1 - e), cs = /* @__PURE__ */ Ut(0.33, 1.53, 0.69, 0.99), on = /* @__PURE__ */ ls(cs), us = /* @__PURE__ */ as(on), hs = (t) => (t *= 2) < 1 ? 0.5 * on(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), an = (t) => 1 - Math.sin(Math.acos(t)), fs = ls(an), ds = as(an), no = /* @__PURE__ */ Ut(0.42, 0, 1, 1), io = /* @__PURE__ */ Ut(0, 0, 0.58, 1), ms = /* @__PURE__ */ Ut(0.42, 0, 0.58, 1), so = (t) => Array.isArray(t) && typeof t[0] != "number", ps = (t) => Array.isArray(t) && typeof t[0] == "number", Fn = {
111
- linear: z,
110
+ const ls = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, cs = (t) => (e) => 1 - t(1 - e), us = /* @__PURE__ */ Ut(0.33, 1.53, 0.69, 0.99), an = /* @__PURE__ */ cs(us), hs = /* @__PURE__ */ ls(an), fs = (t) => (t *= 2) < 1 ? 0.5 * an(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), ln = (t) => 1 - Math.sin(Math.acos(t)), ds = cs(ln), ms = ls(ln), no = /* @__PURE__ */ Ut(0.42, 0, 1, 1), io = /* @__PURE__ */ Ut(0, 0, 0.58, 1), ps = /* @__PURE__ */ Ut(0.42, 0, 0.58, 1), so = (t) => Array.isArray(t) && typeof t[0] != "number", gs = (t) => Array.isArray(t) && typeof t[0] == "number", In = {
111
+ linear: _,
112
112
  easeIn: no,
113
- easeInOut: ms,
113
+ easeInOut: ps,
114
114
  easeOut: io,
115
- circIn: an,
116
- circInOut: ds,
117
- circOut: fs,
118
- backIn: on,
119
- backInOut: us,
120
- backOut: cs,
121
- anticipate: hs
122
- }, ro = (t) => typeof t == "string", In = (t) => {
123
- if (ps(t)) {
115
+ circIn: ln,
116
+ circInOut: ms,
117
+ circOut: ds,
118
+ backIn: an,
119
+ backInOut: hs,
120
+ backOut: us,
121
+ anticipate: fs
122
+ }, ro = (t) => typeof t == "string", Bn = (t) => {
123
+ if (gs(t)) {
124
124
  Z(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
125
125
  const [e, n, i, s] = t;
126
126
  return Ut(e, n, i, s);
127
127
  } else if (ro(t))
128
- return Z(Fn[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Fn[t];
128
+ return Z(In[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), In[t];
129
129
  return t;
130
- }, Kt = [
130
+ }, zt = [
131
131
  "setup",
132
132
  // Compute
133
133
  "read",
@@ -184,58 +184,58 @@ function oo(t, e) {
184
184
  return u;
185
185
  }
186
186
  const ao = 40;
187
- function gs(t, e) {
187
+ function ys(t, e) {
188
188
  let n = !1, i = !0;
189
189
  const s = {
190
190
  delta: 0,
191
191
  timestamp: 0,
192
192
  isProcessing: !1
193
- }, o = () => n = !0, r = Kt.reduce((y, S) => (y[S] = oo(o), y), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: h, preRender: f, render: d, postRender: m } = r, p = () => {
194
- const y = J.useManualTiming ? s.timestamp : performance.now();
195
- n = !1, J.useManualTiming || (s.delta = i ? 1e3 / 60 : Math.max(Math.min(y - s.timestamp, ao), 1)), s.timestamp = y, s.isProcessing = !0, a.process(s), l.process(s), u.process(s), c.process(s), h.process(s), f.process(s), d.process(s), m.process(s), s.isProcessing = !1, n && e && (i = !1, t(p));
196
- }, v = () => {
193
+ }, o = () => n = !0, r = zt.reduce((v, S) => (v[S] = oo(o), v), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: h, preRender: f, render: d, postRender: m } = r, p = () => {
194
+ const v = J.useManualTiming ? s.timestamp : performance.now();
195
+ n = !1, J.useManualTiming || (s.delta = i ? 1e3 / 60 : Math.max(Math.min(v - s.timestamp, ao), 1)), s.timestamp = v, s.isProcessing = !0, a.process(s), l.process(s), u.process(s), c.process(s), h.process(s), f.process(s), d.process(s), m.process(s), s.isProcessing = !1, n && e && (i = !1, t(p));
196
+ }, y = () => {
197
197
  n = !0, i = !0, s.isProcessing || t(p);
198
198
  };
199
- return { schedule: Kt.reduce((y, S) => {
200
- const b = r[S];
201
- return y[S] = (A, P = !1, w = !1) => (n || v(), b.schedule(A, P, w)), y;
202
- }, {}), cancel: (y) => {
203
- for (let S = 0; S < Kt.length; S++)
204
- r[Kt[S]].cancel(y);
199
+ return { schedule: zt.reduce((v, S) => {
200
+ const w = r[S];
201
+ return v[S] = (A, V = !1, b = !1) => (n || y(), w.schedule(A, V, b)), v;
202
+ }, {}), cancel: (v) => {
203
+ for (let S = 0; S < zt.length; S++)
204
+ r[zt[S]].cancel(v);
205
205
  }, state: s, steps: r };
206
206
  }
207
- const { schedule: V, cancel: nt, state: I, steps: ue } = /* @__PURE__ */ gs(typeof requestAnimationFrame < "u" ? requestAnimationFrame : z, !0);
208
- let Ht;
207
+ const { schedule: C, cancel: nt, state: I, steps: ue } = /* @__PURE__ */ ys(typeof requestAnimationFrame < "u" ? requestAnimationFrame : _, !0);
208
+ let Xt;
209
209
  function lo() {
210
- Ht = void 0;
210
+ Xt = void 0;
211
211
  }
212
212
  const j = {
213
- now: () => (Ht === void 0 && j.set(I.isProcessing || J.useManualTiming ? I.timestamp : performance.now()), Ht),
213
+ now: () => (Xt === void 0 && j.set(I.isProcessing || J.useManualTiming ? I.timestamp : performance.now()), Xt),
214
214
  set: (t) => {
215
- Ht = t, queueMicrotask(lo);
215
+ Xt = t, queueMicrotask(lo);
216
216
  }
217
- }, ys = (t) => (e) => typeof e == "string" && e.startsWith(t), vs = /* @__PURE__ */ ys("--"), co = /* @__PURE__ */ ys("var(--"), ln = (t) => co(t) ? uo.test(t.split("/*")[0].trim()) : !1, uo = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
218
- function Bn(t) {
217
+ }, vs = (t) => (e) => typeof e == "string" && e.startsWith(t), xs = /* @__PURE__ */ vs("--"), co = /* @__PURE__ */ vs("var(--"), cn = (t) => co(t) ? uo.test(t.split("/*")[0].trim()) : !1, uo = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
218
+ function On(t) {
219
219
  return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
220
220
  }
221
221
  const Pt = {
222
222
  test: (t) => typeof t == "number",
223
223
  parse: parseFloat,
224
224
  transform: (t) => t
225
- }, It = {
225
+ }, Bt = {
226
226
  ...Pt,
227
227
  transform: (t) => q(0, 1, t)
228
- }, zt = {
228
+ }, _t = {
229
229
  ...Pt,
230
230
  default: 1
231
- }, Et = (t) => Math.round(t * 1e5) / 1e5, cn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
231
+ }, Rt = (t) => Math.round(t * 1e5) / 1e5, un = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
232
232
  function ho(t) {
233
233
  return t == null;
234
234
  }
235
- const fo = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, un = (t, e) => (n) => !!(typeof n == "string" && fo.test(n) && n.startsWith(t) || e && !ho(n) && Object.prototype.hasOwnProperty.call(n, e)), xs = (t, e, n) => (i) => {
235
+ const fo = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, hn = (t, e) => (n) => !!(typeof n == "string" && fo.test(n) && n.startsWith(t) || e && !ho(n) && Object.prototype.hasOwnProperty.call(n, e)), Ts = (t, e, n) => (i) => {
236
236
  if (typeof i != "string")
237
237
  return i;
238
- const [s, o, r, a] = i.match(cn);
238
+ const [s, o, r, a] = i.match(un);
239
239
  return {
240
240
  [t]: parseFloat(s),
241
241
  [e]: parseFloat(o),
@@ -245,10 +245,10 @@ const fo = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
245
245
  }, mo = (t) => q(0, 255, t), he = {
246
246
  ...Pt,
247
247
  transform: (t) => Math.round(mo(t))
248
- }, lt = {
249
- test: /* @__PURE__ */ un("rgb", "red"),
250
- parse: /* @__PURE__ */ xs("red", "green", "blue"),
251
- transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + he.transform(t) + ", " + he.transform(e) + ", " + he.transform(n) + ", " + Et(It.transform(i)) + ")"
248
+ }, ct = {
249
+ test: /* @__PURE__ */ hn("rgb", "red"),
250
+ parse: /* @__PURE__ */ Ts("red", "green", "blue"),
251
+ transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + he.transform(t) + ", " + he.transform(e) + ", " + he.transform(n) + ", " + Rt(Bt.transform(i)) + ")"
252
252
  };
253
253
  function po(t) {
254
254
  let e = "", n = "", i = "", s = "";
@@ -259,70 +259,70 @@ function po(t) {
259
259
  alpha: s ? parseInt(s, 16) / 255 : 1
260
260
  };
261
261
  }
262
- const Ce = {
263
- test: /* @__PURE__ */ un("#"),
262
+ const Me = {
263
+ test: /* @__PURE__ */ hn("#"),
264
264
  parse: po,
265
- transform: lt.transform
266
- }, Wt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
265
+ transform: ct.transform
266
+ }, $t = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
267
267
  test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
268
268
  parse: parseFloat,
269
269
  transform: (e) => `${e}${t}`
270
- }), tt = /* @__PURE__ */ Wt("deg"), Y = /* @__PURE__ */ Wt("%"), x = /* @__PURE__ */ Wt("px"), go = /* @__PURE__ */ Wt("vh"), yo = /* @__PURE__ */ Wt("vw"), On = {
270
+ }), tt = /* @__PURE__ */ $t("deg"), Y = /* @__PURE__ */ $t("%"), x = /* @__PURE__ */ $t("px"), go = /* @__PURE__ */ $t("vh"), yo = /* @__PURE__ */ $t("vw"), jn = {
271
271
  ...Y,
272
272
  parse: (t) => Y.parse(t) / 100,
273
273
  transform: (t) => Y.transform(t * 100)
274
274
  }, pt = {
275
- test: /* @__PURE__ */ un("hsl", "hue"),
276
- parse: /* @__PURE__ */ xs("hue", "saturation", "lightness"),
277
- transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + Y.transform(Et(e)) + ", " + Y.transform(Et(n)) + ", " + Et(It.transform(i)) + ")"
278
- }, R = {
279
- test: (t) => lt.test(t) || Ce.test(t) || pt.test(t),
280
- parse: (t) => lt.test(t) ? lt.parse(t) : pt.test(t) ? pt.parse(t) : Ce.parse(t),
281
- transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? lt.transform(t) : pt.transform(t),
275
+ test: /* @__PURE__ */ hn("hsl", "hue"),
276
+ parse: /* @__PURE__ */ Ts("hue", "saturation", "lightness"),
277
+ transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + Y.transform(Rt(e)) + ", " + Y.transform(Rt(n)) + ", " + Rt(Bt.transform(i)) + ")"
278
+ }, L = {
279
+ test: (t) => ct.test(t) || Me.test(t) || pt.test(t),
280
+ parse: (t) => ct.test(t) ? ct.parse(t) : pt.test(t) ? pt.parse(t) : Me.parse(t),
281
+ transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? ct.transform(t) : pt.transform(t),
282
282
  getAnimatableNone: (t) => {
283
- const e = R.parse(t);
284
- return e.alpha = 0, R.transform(e);
283
+ const e = L.parse(t);
284
+ return e.alpha = 0, L.transform(e);
285
285
  }
286
286
  }, vo = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
287
287
  function xo(t) {
288
288
  var e, n;
289
- return isNaN(t) && typeof t == "string" && (((e = t.match(cn)) == null ? void 0 : e.length) || 0) + (((n = t.match(vo)) == null ? void 0 : n.length) || 0) > 0;
289
+ return isNaN(t) && typeof t == "string" && (((e = t.match(un)) == null ? void 0 : e.length) || 0) + (((n = t.match(vo)) == null ? void 0 : n.length) || 0) > 0;
290
290
  }
291
- const Ts = "number", ws = "color", To = "var", wo = "var(", jn = "${}", bo = /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;
292
- function Bt(t) {
291
+ const ws = "number", bs = "color", To = "var", wo = "var(", Nn = "${}", bo = /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;
292
+ function Ot(t) {
293
293
  const e = t.toString(), n = [], i = {
294
294
  color: [],
295
295
  number: [],
296
296
  var: []
297
297
  }, s = [];
298
298
  let o = 0;
299
- const a = e.replace(bo, (l) => (R.test(l) ? (i.color.push(o), s.push(ws), n.push(R.parse(l))) : l.startsWith(wo) ? (i.var.push(o), s.push(To), n.push(l)) : (i.number.push(o), s.push(Ts), n.push(parseFloat(l))), ++o, jn)).split(jn);
299
+ const a = e.replace(bo, (l) => (L.test(l) ? (i.color.push(o), s.push(bs), n.push(L.parse(l))) : l.startsWith(wo) ? (i.var.push(o), s.push(To), n.push(l)) : (i.number.push(o), s.push(ws), n.push(parseFloat(l))), ++o, Nn)).split(Nn);
300
300
  return { values: n, split: a, indexes: i, types: s };
301
301
  }
302
- function bs(t) {
303
- return Bt(t).values;
304
- }
305
302
  function Ss(t) {
306
- const { split: e, types: n } = Bt(t), i = e.length;
303
+ return Ot(t).values;
304
+ }
305
+ function Ps(t) {
306
+ const { split: e, types: n } = Ot(t), i = e.length;
307
307
  return (s) => {
308
308
  let o = "";
309
309
  for (let r = 0; r < i; r++)
310
310
  if (o += e[r], s[r] !== void 0) {
311
311
  const a = n[r];
312
- a === Ts ? o += Et(s[r]) : a === ws ? o += R.transform(s[r]) : o += s[r];
312
+ a === ws ? o += Rt(s[r]) : a === bs ? o += L.transform(s[r]) : o += s[r];
313
313
  }
314
314
  return o;
315
315
  };
316
316
  }
317
- const So = (t) => typeof t == "number" ? 0 : R.test(t) ? R.getAnimatableNone(t) : t;
317
+ const So = (t) => typeof t == "number" ? 0 : L.test(t) ? L.getAnimatableNone(t) : t;
318
318
  function Po(t) {
319
- const e = bs(t);
320
- return Ss(t)(e.map(So));
319
+ const e = Ss(t);
320
+ return Ps(t)(e.map(So));
321
321
  }
322
322
  const it = {
323
323
  test: xo,
324
- parse: bs,
325
- createTransformer: Ss,
324
+ parse: Ss,
325
+ createTransformer: Ps,
326
326
  getAnimatableNone: Po
327
327
  };
328
328
  function fe(t, e, n) {
@@ -344,38 +344,38 @@ function Ao({ hue: t, saturation: e, lightness: n, alpha: i }) {
344
344
  alpha: i
345
345
  };
346
346
  }
347
- function Zt(t, e) {
347
+ function Jt(t, e) {
348
348
  return (n) => n > 0 ? e : t;
349
349
  }
350
350
  const E = (t, e, n) => t + (e - t) * n, de = (t, e, n) => {
351
351
  const i = t * t, s = n * (e * e - i) + i;
352
352
  return s < 0 ? 0 : Math.sqrt(s);
353
- }, Vo = [Ce, lt, pt], Mo = (t) => Vo.find((e) => e.test(t));
354
- function Nn(t) {
355
- const e = Mo(t);
353
+ }, Vo = [Me, ct, pt], Co = (t) => Vo.find((e) => e.test(t));
354
+ function Wn(t) {
355
+ const e = Co(t);
356
356
  if (St(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
357
357
  return !1;
358
358
  let n = e.parse(t);
359
359
  return e === pt && (n = Ao(n)), n;
360
360
  }
361
361
  const Un = (t, e) => {
362
- const n = Nn(t), i = Nn(e);
362
+ const n = Wn(t), i = Wn(e);
363
363
  if (!n || !i)
364
- return Zt(t, e);
364
+ return Jt(t, e);
365
365
  const s = { ...n };
366
- return (o) => (s.red = de(n.red, i.red, o), s.green = de(n.green, i.green, o), s.blue = de(n.blue, i.blue, o), s.alpha = E(n.alpha, i.alpha, o), lt.transform(s));
366
+ return (o) => (s.red = de(n.red, i.red, o), s.green = de(n.green, i.green, o), s.blue = de(n.blue, i.blue, o), s.alpha = E(n.alpha, i.alpha, o), ct.transform(s));
367
367
  }, De = /* @__PURE__ */ new Set(["none", "hidden"]);
368
- function Co(t, e) {
368
+ function Mo(t, e) {
369
369
  return De.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
370
370
  }
371
371
  function Do(t, e) {
372
372
  return (n) => E(t, e, n);
373
373
  }
374
- function hn(t) {
375
- return typeof t == "number" ? Do : typeof t == "string" ? ln(t) ? Zt : R.test(t) ? Un : Lo : Array.isArray(t) ? Ps : typeof t == "object" ? R.test(t) ? Un : Eo : Zt;
374
+ function fn(t) {
375
+ return typeof t == "number" ? Do : typeof t == "string" ? cn(t) ? Jt : L.test(t) ? Un : Lo : Array.isArray(t) ? As : typeof t == "object" ? L.test(t) ? Un : Eo : Jt;
376
376
  }
377
- function Ps(t, e) {
378
- const n = [...t], i = n.length, s = t.map((o, r) => hn(o)(o, e[r]));
377
+ function As(t, e) {
378
+ const n = [...t], i = n.length, s = t.map((o, r) => fn(o)(o, e[r]));
379
379
  return (o) => {
380
380
  for (let r = 0; r < i; r++)
381
381
  n[r] = s[r](o);
@@ -385,7 +385,7 @@ function Ps(t, e) {
385
385
  function Eo(t, e) {
386
386
  const n = { ...t, ...e }, i = {};
387
387
  for (const s in n)
388
- t[s] !== void 0 && e[s] !== void 0 && (i[s] = hn(t[s])(t[s], e[s]));
388
+ t[s] !== void 0 && e[s] !== void 0 && (i[s] = fn(t[s])(t[s], e[s]));
389
389
  return (s) => {
390
390
  for (const o in i)
391
391
  n[o] = i[o](s);
@@ -401,16 +401,16 @@ function Ro(t, e) {
401
401
  return n;
402
402
  }
403
403
  const Lo = (t, e) => {
404
- const n = it.createTransformer(e), i = Bt(t), s = Bt(e);
405
- return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? De.has(t) && !s.values.length || De.has(e) && !i.values.length ? Co(t, e) : Nt(Ps(Ro(i, s), s.values), n) : (St(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), Zt(t, e));
404
+ const n = it.createTransformer(e), i = Ot(t), s = Ot(e);
405
+ return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? De.has(t) && !s.values.length || De.has(e) && !i.values.length ? Mo(t, e) : Wt(As(Ro(i, s), s.values), n) : (St(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), Jt(t, e));
406
406
  };
407
- function As(t, e, n) {
408
- return typeof t == "number" && typeof e == "number" && typeof n == "number" ? E(t, e, n) : hn(t)(t, e);
407
+ function Vs(t, e, n) {
408
+ return typeof t == "number" && typeof e == "number" && typeof n == "number" ? E(t, e, n) : fn(t)(t, e);
409
409
  }
410
410
  const ko = (t) => {
411
411
  const e = ({ timestamp: n }) => t(n);
412
412
  return {
413
- start: (n = !0) => V.update(e, n),
413
+ start: (n = !0) => C.update(e, n),
414
414
  stop: () => nt(e),
415
415
  /**
416
416
  * If we're processing this frame we can use the
@@ -418,33 +418,33 @@ const ko = (t) => {
418
418
  */
419
419
  now: () => I.isProcessing ? I.timestamp : j.now()
420
420
  };
421
- }, Vs = (t, e, n = 10) => {
421
+ }, Cs = (t, e, n = 10) => {
422
422
  let i = "";
423
423
  const s = Math.max(Math.round(e / n), 2);
424
424
  for (let o = 0; o < s; o++)
425
425
  i += Math.round(t(o / (s - 1)) * 1e4) / 1e4 + ", ";
426
426
  return `linear(${i.substring(0, i.length - 2)})`;
427
- }, Jt = 2e4;
428
- function fn(t) {
427
+ }, Qt = 2e4;
428
+ function dn(t) {
429
429
  let e = 0;
430
430
  const n = 50;
431
431
  let i = t.next(e);
432
- for (; !i.done && e < Jt; )
432
+ for (; !i.done && e < Qt; )
433
433
  e += n, i = t.next(e);
434
- return e >= Jt ? 1 / 0 : e;
434
+ return e >= Qt ? 1 / 0 : e;
435
435
  }
436
436
  function Fo(t, e = 100, n) {
437
- const i = n({ ...t, keyframes: [0, e] }), s = Math.min(fn(i), Jt);
437
+ const i = n({ ...t, keyframes: [0, e] }), s = Math.min(dn(i), Qt);
438
438
  return {
439
439
  type: "keyframes",
440
440
  ease: (o) => i.next(s * o).value / e,
441
- duration: /* @__PURE__ */ K(s)
441
+ duration: /* @__PURE__ */ z(s)
442
442
  };
443
443
  }
444
444
  const Io = 5;
445
445
  function Ms(t, e, n) {
446
446
  const i = Math.max(e - Io, 0);
447
- return rs(n - t(i), e - i);
447
+ return os(n - t(i), e - i);
448
448
  }
449
449
  const D = {
450
450
  // Default spring physics
@@ -479,7 +479,7 @@ function Bo({ duration: t = D.duration, bounce: e = D.bounce, velocity: n = D.ve
479
479
  let s, o;
480
480
  St(t <= /* @__PURE__ */ X(D.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
481
481
  let r = 1 - e;
482
- r = q(D.minDamping, D.maxDamping, r), t = q(D.minDuration, D.maxDuration, /* @__PURE__ */ K(t)), r < 1 ? (s = (u) => {
482
+ r = q(D.minDamping, D.maxDamping, r), t = q(D.minDuration, D.maxDuration, /* @__PURE__ */ z(t)), r < 1 ? (s = (u) => {
483
483
  const c = u * r, h = c * t, f = c - n, d = Ee(u, r), m = Math.exp(-h);
484
484
  return me - f / d * m;
485
485
  }, o = (u) => {
@@ -518,11 +518,11 @@ function jo(t, e, n) {
518
518
  function Ee(t, e) {
519
519
  return t * Math.sqrt(1 - e * e);
520
520
  }
521
- const No = ["duration", "bounce"], Uo = ["stiffness", "damping", "mass"];
522
- function Wn(t, e) {
521
+ const No = ["duration", "bounce"], Wo = ["stiffness", "damping", "mass"];
522
+ function $n(t, e) {
523
523
  return e.some((n) => t[n] !== void 0);
524
524
  }
525
- function Wo(t) {
525
+ function Uo(t) {
526
526
  let e = {
527
527
  velocity: D.velocity,
528
528
  stiffness: D.stiffness,
@@ -531,7 +531,7 @@ function Wo(t) {
531
531
  isResolvedFromDuration: !1,
532
532
  ...t
533
533
  };
534
- if (!Wn(t, Uo) && Wn(t, No))
534
+ if (!$n(t, Wo) && $n(t, No))
535
535
  if (t.visualDuration) {
536
536
  const n = t.visualDuration, i = 2 * Math.PI / (n * 1.2), s = i * i, o = 2 * q(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(s);
537
537
  e = {
@@ -550,78 +550,78 @@ function Wo(t) {
550
550
  }
551
551
  return e;
552
552
  }
553
- function Qt(t = D.visualDuration, e = D.bounce) {
553
+ function te(t = D.visualDuration, e = D.bounce) {
554
554
  const n = typeof t != "object" ? {
555
555
  visualDuration: t,
556
556
  keyframes: [0, 1],
557
557
  bounce: e
558
558
  } : t;
559
559
  let { restSpeed: i, restDelta: s } = n;
560
- const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: u, mass: c, duration: h, velocity: f, isResolvedFromDuration: d } = Wo({
560
+ const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: u, mass: c, duration: h, velocity: f, isResolvedFromDuration: d } = Uo({
561
561
  ...n,
562
- velocity: -/* @__PURE__ */ K(n.velocity || 0)
563
- }), m = f || 0, p = u / (2 * Math.sqrt(l * c)), v = r - o, g = /* @__PURE__ */ K(Math.sqrt(l / c)), T = Math.abs(v) < 5;
562
+ velocity: -/* @__PURE__ */ z(n.velocity || 0)
563
+ }), m = f || 0, p = u / (2 * Math.sqrt(l * c)), y = r - o, g = /* @__PURE__ */ z(Math.sqrt(l / c)), T = Math.abs(y) < 5;
564
564
  i || (i = T ? D.restSpeed.granular : D.restSpeed.default), s || (s = T ? D.restDelta.granular : D.restDelta.default);
565
- let y;
565
+ let v;
566
566
  if (p < 1) {
567
- const b = Ee(g, p);
568
- y = (A) => {
569
- const P = Math.exp(-p * g * A);
570
- return r - P * ((m + p * g * v) / b * Math.sin(b * A) + v * Math.cos(b * A));
567
+ const w = Ee(g, p);
568
+ v = (A) => {
569
+ const V = Math.exp(-p * g * A);
570
+ return r - V * ((m + p * g * y) / w * Math.sin(w * A) + y * Math.cos(w * A));
571
571
  };
572
572
  } else if (p === 1)
573
- y = (b) => r - Math.exp(-g * b) * (v + (m + g * v) * b);
573
+ v = (w) => r - Math.exp(-g * w) * (y + (m + g * y) * w);
574
574
  else {
575
- const b = g * Math.sqrt(p * p - 1);
576
- y = (A) => {
577
- const P = Math.exp(-p * g * A), w = Math.min(b * A, 300);
578
- return r - P * ((m + p * g * v) * Math.sinh(w) + b * v * Math.cosh(w)) / b;
575
+ const w = g * Math.sqrt(p * p - 1);
576
+ v = (A) => {
577
+ const V = Math.exp(-p * g * A), b = Math.min(w * A, 300);
578
+ return r - V * ((m + p * g * y) * Math.sinh(b) + w * y * Math.cosh(b)) / w;
579
579
  };
580
580
  }
581
581
  const S = {
582
582
  calculatedDuration: d && h || null,
583
- next: (b) => {
584
- const A = y(b);
583
+ next: (w) => {
584
+ const A = v(w);
585
585
  if (d)
586
- a.done = b >= h;
586
+ a.done = w >= h;
587
587
  else {
588
- let P = b === 0 ? m : 0;
589
- p < 1 && (P = b === 0 ? /* @__PURE__ */ X(m) : Ms(y, b, A));
590
- const w = Math.abs(P) <= i, M = Math.abs(r - A) <= s;
591
- a.done = w && M;
588
+ let V = w === 0 ? m : 0;
589
+ p < 1 && (V = w === 0 ? /* @__PURE__ */ X(m) : Ms(v, w, A));
590
+ const b = Math.abs(V) <= i, P = Math.abs(r - A) <= s;
591
+ a.done = b && P;
592
592
  }
593
593
  return a.value = a.done ? r : A, a;
594
594
  },
595
595
  toString: () => {
596
- const b = Math.min(fn(S), Jt), A = Vs((P) => S.next(b * P).value, b, 30);
597
- return b + "ms " + A;
596
+ const w = Math.min(dn(S), Qt), A = Cs((V) => S.next(w * V).value, w, 30);
597
+ return w + "ms " + A;
598
598
  },
599
599
  toTransition: () => {
600
600
  }
601
601
  };
602
602
  return S;
603
603
  }
604
- Qt.applyToOptions = (t) => {
605
- const e = Fo(t, 100, Qt);
604
+ te.applyToOptions = (t) => {
605
+ const e = Fo(t, 100, te);
606
606
  return t.ease = e.ease, t.duration = /* @__PURE__ */ X(e.duration), t.type = "keyframes", t;
607
607
  };
608
608
  function Re({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
609
609
  const h = t[0], f = {
610
610
  done: !1,
611
611
  value: h
612
- }, d = (w) => a !== void 0 && w < a || l !== void 0 && w > l, m = (w) => a === void 0 ? l : l === void 0 || Math.abs(a - w) < Math.abs(l - w) ? a : l;
612
+ }, d = (b) => a !== void 0 && b < a || l !== void 0 && b > l, m = (b) => a === void 0 ? l : l === void 0 || Math.abs(a - b) < Math.abs(l - b) ? a : l;
613
613
  let p = n * e;
614
- const v = h + p, g = r === void 0 ? v : r(v);
615
- g !== v && (p = g - h);
616
- const T = (w) => -p * Math.exp(-w / i), y = (w) => g + T(w), S = (w) => {
617
- const M = T(w), L = y(w);
618
- f.done = Math.abs(M) <= u, f.value = f.done ? g : L;
614
+ const y = h + p, g = r === void 0 ? y : r(y);
615
+ g !== y && (p = g - h);
616
+ const T = (b) => -p * Math.exp(-b / i), v = (b) => g + T(b), S = (b) => {
617
+ const P = T(b), R = v(b);
618
+ f.done = Math.abs(P) <= u, f.value = f.done ? g : R;
619
619
  };
620
- let b, A;
621
- const P = (w) => {
622
- d(f.value) && (b = w, A = Qt({
620
+ let w, A;
621
+ const V = (b) => {
622
+ d(f.value) && (w = b, A = te({
623
623
  keyframes: [f.value, m(f.value)],
624
- velocity: Ms(y, w, f.value),
624
+ velocity: Ms(v, b, f.value),
625
625
  // TODO: This should be passing * 1000
626
626
  damping: s,
627
627
  stiffness: o,
@@ -629,21 +629,21 @@ function Re({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
629
629
  restSpeed: c
630
630
  }));
631
631
  };
632
- return P(0), {
632
+ return V(0), {
633
633
  calculatedDuration: null,
634
- next: (w) => {
635
- let M = !1;
636
- return !A && b === void 0 && (M = !0, S(w), P(w)), b !== void 0 && w >= b ? A.next(w - b) : (!M && S(w), f);
634
+ next: (b) => {
635
+ let P = !1;
636
+ return !A && w === void 0 && (P = !0, S(b), V(b)), w !== void 0 && b >= w ? A.next(b - w) : (!P && S(b), f);
637
637
  }
638
638
  };
639
639
  }
640
640
  function $o(t, e, n) {
641
- const i = [], s = n || J.mix || As, o = t.length - 1;
641
+ const i = [], s = n || J.mix || Vs, o = t.length - 1;
642
642
  for (let r = 0; r < o; r++) {
643
643
  let a = s(t[r], t[r + 1]);
644
644
  if (e) {
645
- const l = Array.isArray(e) ? e[r] || z : e;
646
- a = Nt(l, a);
645
+ const l = Array.isArray(e) ? e[r] || _ : e;
646
+ a = Wt(l, a);
647
647
  }
648
648
  i.push(a);
649
649
  }
@@ -664,7 +664,7 @@ function Ko(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
664
664
  if (l > 1)
665
665
  for (; h < t.length - 2 && !(c < t[h + 1]); h++)
666
666
  ;
667
- const f = /* @__PURE__ */ Ft(t[h], t[h + 1], c);
667
+ const f = /* @__PURE__ */ It(t[h], t[h + 1], c);
668
668
  return a[h](f);
669
669
  };
670
670
  return n ? (c) => u(q(t[0], t[o - 1], c)) : u;
@@ -672,7 +672,7 @@ function Ko(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
672
672
  function zo(t, e) {
673
673
  const n = t[t.length - 1];
674
674
  for (let i = 1; i <= e; i++) {
675
- const s = /* @__PURE__ */ Ft(0, e, i);
675
+ const s = /* @__PURE__ */ It(0, e, i);
676
676
  t.push(E(n, 1, s));
677
677
  }
678
678
  }
@@ -684,10 +684,10 @@ function Go(t, e) {
684
684
  return t.map((n) => n * e);
685
685
  }
686
686
  function Ho(t, e) {
687
- return t.map(() => e || ms).splice(0, t.length - 1);
687
+ return t.map(() => e || ps).splice(0, t.length - 1);
688
688
  }
689
689
  function gt({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }) {
690
- const s = so(i) ? i.map(In) : In(i), o = {
690
+ const s = so(i) ? i.map(Bn) : Bn(i), o = {
691
691
  done: !1,
692
692
  value: e[0]
693
693
  }, r = Go(
@@ -704,7 +704,7 @@ function gt({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }
704
704
  };
705
705
  }
706
706
  const Xo = (t) => t !== null;
707
- function dn(t, { repeat: e, repeatType: n = "loop" }, i, s = 1) {
707
+ function mn(t, { repeat: e, repeatType: n = "loop" }, i, s = 1) {
708
708
  const o = t.filter(Xo), a = s < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
709
709
  return !a || i === void 0 ? o[a] : i;
710
710
  }
@@ -713,12 +713,12 @@ const Yo = {
713
713
  inertia: Re,
714
714
  tween: gt,
715
715
  keyframes: gt,
716
- spring: Qt
716
+ spring: te
717
717
  };
718
- function Cs(t) {
718
+ function Ds(t) {
719
719
  typeof t.type == "string" && (t.type = Yo[t.type]);
720
720
  }
721
- class mn {
721
+ class pn {
722
722
  constructor() {
723
723
  this.updateFinished();
724
724
  }
@@ -743,7 +743,7 @@ class mn {
743
743
  }
744
744
  }
745
745
  const qo = (t) => t / 100;
746
- class pn extends mn {
746
+ class gn extends pn {
747
747
  constructor(e) {
748
748
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
749
749
  var i, s;
@@ -753,17 +753,17 @@ class pn extends mn {
753
753
  }
754
754
  initAnimation() {
755
755
  const { options: e } = this;
756
- Cs(e);
756
+ Ds(e);
757
757
  const { type: n = gt, repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = e;
758
758
  let { keyframes: a } = e;
759
759
  const l = n || gt;
760
- process.env.NODE_ENV !== "production" && l !== gt && Z(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== gt && typeof a[0] != "number" && (this.mixKeyframes = Nt(qo, As(a[0], a[1])), a = [0, 100]);
760
+ process.env.NODE_ENV !== "production" && l !== gt && Z(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== gt && typeof a[0] != "number" && (this.mixKeyframes = Wt(qo, Vs(a[0], a[1])), a = [0, 100]);
761
761
  const u = l({ ...e, keyframes: a });
762
762
  o === "mirror" && (this.mirroredGenerator = l({
763
763
  ...e,
764
764
  keyframes: [...a].reverse(),
765
765
  velocity: -r
766
- })), u.calculatedDuration === null && (u.calculatedDuration = fn(u));
766
+ })), u.calculatedDuration === null && (u.calculatedDuration = dn(u));
767
767
  const { calculatedDuration: c } = u;
768
768
  this.calculatedDuration = c, this.resolvedDuration = c + s, this.totalDuration = this.resolvedDuration * (i + 1) - s, this.generator = u;
769
769
  }
@@ -775,22 +775,22 @@ class pn extends mn {
775
775
  const { generator: i, totalDuration: s, mixKeyframes: o, mirroredGenerator: r, resolvedDuration: a, calculatedDuration: l } = this;
776
776
  if (this.startTime === null)
777
777
  return i.next(0);
778
- const { delay: u = 0, keyframes: c, repeat: h, repeatType: f, repeatDelay: d, type: m, onUpdate: p, finalKeyframe: v } = this.options;
778
+ const { delay: u = 0, keyframes: c, repeat: h, repeatType: f, repeatDelay: d, type: m, onUpdate: p, finalKeyframe: y } = this.options;
779
779
  this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - s / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
780
780
  const g = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), T = this.playbackSpeed >= 0 ? g < 0 : g > s;
781
781
  this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = s);
782
- let y = this.currentTime, S = i;
782
+ let v = this.currentTime, S = i;
783
783
  if (h) {
784
- const w = Math.min(this.currentTime, s) / a;
785
- let M = Math.floor(w), L = w % 1;
786
- !L && w >= 1 && (L = 1), L === 1 && M--, M = Math.min(M, h + 1), !!(M % 2) && (f === "reverse" ? (L = 1 - L, d && (L -= d / a)) : f === "mirror" && (S = r)), y = q(0, 1, L) * a;
784
+ const b = Math.min(this.currentTime, s) / a;
785
+ let P = Math.floor(b), R = b % 1;
786
+ !R && b >= 1 && (R = 1), R === 1 && P--, P = Math.min(P, h + 1), !!(P % 2) && (f === "reverse" ? (R = 1 - R, d && (R -= d / a)) : f === "mirror" && (S = r)), v = q(0, 1, R) * a;
787
787
  }
788
- const b = T ? { done: !1, value: c[0] } : S.next(y);
789
- o && (b.value = o(b.value));
790
- let { done: A } = b;
788
+ const w = T ? { done: !1, value: c[0] } : S.next(v);
789
+ o && (w.value = o(w.value));
790
+ let { done: A } = w;
791
791
  !T && l !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= s : this.currentTime <= 0);
792
- const P = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
793
- return P && m !== Re && (b.value = dn(c, this.options, v, this.speed)), p && p(b.value), P && this.finish(), b;
792
+ const V = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
793
+ return V && m !== Re && (w.value = mn(c, this.options, y, this.speed)), p && p(w.value), V && this.finish(), w;
794
794
  }
795
795
  /**
796
796
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -801,14 +801,14 @@ class pn extends mn {
801
801
  return this.finished.then(e, n);
802
802
  }
803
803
  get duration() {
804
- return /* @__PURE__ */ K(this.calculatedDuration);
804
+ return /* @__PURE__ */ z(this.calculatedDuration);
805
805
  }
806
806
  get iterationDuration() {
807
807
  const { delay: e = 0 } = this.options || {};
808
- return this.duration + /* @__PURE__ */ K(e);
808
+ return this.duration + /* @__PURE__ */ z(e);
809
809
  }
810
810
  get time() {
811
- return /* @__PURE__ */ K(this.currentTime);
811
+ return /* @__PURE__ */ z(this.currentTime);
812
812
  }
813
813
  set time(e) {
814
814
  var n;
@@ -820,7 +820,7 @@ class pn extends mn {
820
820
  set speed(e) {
821
821
  this.updateTime(j.now());
822
822
  const n = this.playbackSpeed !== e;
823
- this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ K(this.currentTime));
823
+ this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ z(this.currentTime));
824
824
  }
825
825
  play() {
826
826
  var s, o;
@@ -863,8 +863,8 @@ function Zo(t) {
863
863
  for (let e = 1; e < t.length; e++)
864
864
  t[e] ?? (t[e] = t[e - 1]);
865
865
  }
866
- const ct = (t) => t * 180 / Math.PI, Le = (t) => {
867
- const e = ct(Math.atan2(t[1], t[0]));
866
+ const ut = (t) => t * 180 / Math.PI, Le = (t) => {
867
+ const e = ut(Math.atan2(t[1], t[0]));
868
868
  return ke(e);
869
869
  }, Jo = {
870
870
  x: 4,
@@ -876,25 +876,25 @@ const ct = (t) => t * 180 / Math.PI, Le = (t) => {
876
876
  scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
877
877
  rotate: Le,
878
878
  rotateZ: Le,
879
- skewX: (t) => ct(Math.atan(t[1])),
880
- skewY: (t) => ct(Math.atan(t[2])),
879
+ skewX: (t) => ut(Math.atan(t[1])),
880
+ skewY: (t) => ut(Math.atan(t[2])),
881
881
  skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
882
- }, ke = (t) => (t = t % 360, t < 0 && (t += 360), t), $n = Le, Kn = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), zn = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), Qo = {
882
+ }, ke = (t) => (t = t % 360, t < 0 && (t += 360), t), Kn = Le, zn = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), _n = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), Qo = {
883
883
  x: 12,
884
884
  y: 13,
885
885
  z: 14,
886
886
  translateX: 12,
887
887
  translateY: 13,
888
888
  translateZ: 14,
889
- scaleX: Kn,
890
- scaleY: zn,
891
- scale: (t) => (Kn(t) + zn(t)) / 2,
892
- rotateX: (t) => ke(ct(Math.atan2(t[6], t[5]))),
893
- rotateY: (t) => ke(ct(Math.atan2(-t[2], t[0]))),
894
- rotateZ: $n,
895
- rotate: $n,
896
- skewX: (t) => ct(Math.atan(t[4])),
897
- skewY: (t) => ct(Math.atan(t[1])),
889
+ scaleX: zn,
890
+ scaleY: _n,
891
+ scale: (t) => (zn(t) + _n(t)) / 2,
892
+ rotateX: (t) => ke(ut(Math.atan2(t[6], t[5]))),
893
+ rotateY: (t) => ke(ut(Math.atan2(-t[2], t[0]))),
894
+ rotateZ: Kn,
895
+ rotate: Kn,
896
+ skewX: (t) => ut(Math.atan(t[4])),
897
+ skewY: (t) => ut(Math.atan(t[1])),
898
898
  skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
899
899
  };
900
900
  function Fe(t) {
@@ -941,7 +941,7 @@ const At = [
941
941
  "skew",
942
942
  "skewX",
943
943
  "skewY"
944
- ], Vt = new Set(At), _n = (t) => t === Pt || t === x, na = /* @__PURE__ */ new Set(["x", "y", "z"]), ia = At.filter((t) => !na.has(t));
944
+ ], Vt = new Set(At), Gn = (t) => t === Pt || t === x, na = /* @__PURE__ */ new Set(["x", "y", "z"]), ia = At.filter((t) => !na.has(t));
945
945
  function sa(t) {
946
946
  const e = [];
947
947
  return ia.forEach((n) => {
@@ -963,11 +963,11 @@ const et = {
963
963
  };
964
964
  et.translateX = et.x;
965
965
  et.translateY = et.y;
966
- const ut = /* @__PURE__ */ new Set();
966
+ const ht = /* @__PURE__ */ new Set();
967
967
  let Be = !1, Oe = !1, je = !1;
968
- function Ds() {
968
+ function Es() {
969
969
  if (Oe) {
970
- const t = Array.from(ut).filter((i) => i.needsMeasurement), e = new Set(t.map((i) => i.element)), n = /* @__PURE__ */ new Map();
970
+ const t = Array.from(ht).filter((i) => i.needsMeasurement), e = new Set(t.map((i) => i.element)), n = /* @__PURE__ */ new Map();
971
971
  e.forEach((i) => {
972
972
  const s = sa(i);
973
973
  s.length && (n.set(i, s), i.render());
@@ -982,22 +982,22 @@ function Ds() {
982
982
  i.suspendedScrollY !== void 0 && window.scrollTo(0, i.suspendedScrollY);
983
983
  });
984
984
  }
985
- Oe = !1, Be = !1, ut.forEach((t) => t.complete(je)), ut.clear();
985
+ Oe = !1, Be = !1, ht.forEach((t) => t.complete(je)), ht.clear();
986
986
  }
987
- function Es() {
988
- ut.forEach((t) => {
987
+ function Rs() {
988
+ ht.forEach((t) => {
989
989
  t.readKeyframes(), t.needsMeasurement && (Oe = !0);
990
990
  });
991
991
  }
992
992
  function ra() {
993
- je = !0, Es(), Ds(), je = !1;
993
+ je = !0, Rs(), Es(), je = !1;
994
994
  }
995
- class gn {
995
+ class yn {
996
996
  constructor(e, n, i, s, o, r = !1) {
997
997
  this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = i, this.motionValue = s, this.element = o, this.isAsync = r;
998
998
  }
999
999
  scheduleResolve() {
1000
- this.state = "scheduled", this.isAsync ? (ut.add(this), Be || (Be = !0, V.read(Es), V.resolveKeyframes(Ds))) : (this.readKeyframes(), this.complete());
1000
+ this.state = "scheduled", this.isAsync ? (ht.add(this), Be || (Be = !0, C.read(Rs), C.resolveKeyframes(Es))) : (this.readKeyframes(), this.complete());
1001
1001
  }
1002
1002
  readKeyframes() {
1003
1003
  const { unresolvedKeyframes: e, name: n, element: i, motionValue: s } = this;
@@ -1022,10 +1022,10 @@ class gn {
1022
1022
  measureEndState() {
1023
1023
  }
1024
1024
  complete(e = !1) {
1025
- this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), ut.delete(this);
1025
+ this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), ht.delete(this);
1026
1026
  }
1027
1027
  cancel() {
1028
- this.state === "scheduled" && (ut.delete(this), this.state = "pending");
1028
+ this.state === "scheduled" && (ht.delete(this), this.state = "pending");
1029
1029
  }
1030
1030
  resume() {
1031
1031
  this.state === "pending" && this.scheduleResolve();
@@ -1035,39 +1035,39 @@ const oa = (t) => t.startsWith("--");
1035
1035
  function aa(t, e, n) {
1036
1036
  oa(e) ? t.style.setProperty(e, n) : t.style[e] = n;
1037
1037
  }
1038
- const la = /* @__PURE__ */ nn(() => window.ScrollTimeline !== void 0), ca = {};
1038
+ const la = /* @__PURE__ */ sn(() => window.ScrollTimeline !== void 0), ca = {};
1039
1039
  function ua(t, e) {
1040
- const n = /* @__PURE__ */ nn(t);
1040
+ const n = /* @__PURE__ */ sn(t);
1041
1041
  return () => ca[e] ?? n();
1042
1042
  }
1043
- const Rs = /* @__PURE__ */ ua(() => {
1043
+ const Ls = /* @__PURE__ */ ua(() => {
1044
1044
  try {
1045
1045
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1046
1046
  } catch {
1047
1047
  return !1;
1048
1048
  }
1049
1049
  return !0;
1050
- }, "linearEasing"), Ct = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, Gn = {
1050
+ }, "linearEasing"), Dt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, Hn = {
1051
1051
  linear: "linear",
1052
1052
  ease: "ease",
1053
1053
  easeIn: "ease-in",
1054
1054
  easeOut: "ease-out",
1055
1055
  easeInOut: "ease-in-out",
1056
- circIn: /* @__PURE__ */ Ct([0, 0.65, 0.55, 1]),
1057
- circOut: /* @__PURE__ */ Ct([0.55, 0, 1, 0.45]),
1058
- backIn: /* @__PURE__ */ Ct([0.31, 0.01, 0.66, -0.59]),
1059
- backOut: /* @__PURE__ */ Ct([0.33, 1.53, 0.69, 0.99])
1056
+ circIn: /* @__PURE__ */ Dt([0, 0.65, 0.55, 1]),
1057
+ circOut: /* @__PURE__ */ Dt([0.55, 0, 1, 0.45]),
1058
+ backIn: /* @__PURE__ */ Dt([0.31, 0.01, 0.66, -0.59]),
1059
+ backOut: /* @__PURE__ */ Dt([0.33, 1.53, 0.69, 0.99])
1060
1060
  };
1061
- function Ls(t, e) {
1061
+ function ks(t, e) {
1062
1062
  if (t)
1063
- return typeof t == "function" ? Rs() ? Vs(t, e) : "ease-out" : ps(t) ? Ct(t) : Array.isArray(t) ? t.map((n) => Ls(n, e) || Gn.easeOut) : Gn[t];
1063
+ return typeof t == "function" ? Ls() ? Cs(t, e) : "ease-out" : gs(t) ? Dt(t) : Array.isArray(t) ? t.map((n) => ks(n, e) || Hn.easeOut) : Hn[t];
1064
1064
  }
1065
1065
  function ha(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
1066
1066
  const c = {
1067
1067
  [e]: n
1068
1068
  };
1069
1069
  l && (c.offset = l);
1070
- const h = Ls(a, s);
1070
+ const h = ks(a, s);
1071
1071
  Array.isArray(h) && (c.easing = h);
1072
1072
  const f = {
1073
1073
  delay: i,
@@ -1079,13 +1079,13 @@ function ha(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatTyp
1079
1079
  };
1080
1080
  return u && (f.pseudoElement = u), t.animate(c, f);
1081
1081
  }
1082
- function ks(t) {
1082
+ function Fs(t) {
1083
1083
  return typeof t == "function" && "applyToOptions" in t;
1084
1084
  }
1085
1085
  function fa({ type: t, ...e }) {
1086
- return ks(t) && Rs() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
1086
+ return Fs(t) && Ls() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
1087
1087
  }
1088
- class da extends mn {
1088
+ class da extends pn {
1089
1089
  constructor(e) {
1090
1090
  if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !e)
1091
1091
  return;
@@ -1094,7 +1094,7 @@ class da extends mn {
1094
1094
  const u = fa(e);
1095
1095
  this.animation = ha(n, i, s, u, o), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1096
1096
  if (this.finishedTime = this.time, !o) {
1097
- const c = dn(s, this.options, a, this.speed);
1097
+ const c = mn(s, this.options, a, this.speed);
1098
1098
  this.updateMotionValue ? this.updateMotionValue(c) : aa(n, i, c), this.animation.cancel();
1099
1099
  }
1100
1100
  l == null || l(), this.notifyFinished();
@@ -1142,14 +1142,14 @@ class da extends mn {
1142
1142
  get duration() {
1143
1143
  var n, i;
1144
1144
  const e = ((i = (n = this.animation.effect) == null ? void 0 : n.getComputedTiming) == null ? void 0 : i.call(n).duration) || 0;
1145
- return /* @__PURE__ */ K(Number(e));
1145
+ return /* @__PURE__ */ z(Number(e));
1146
1146
  }
1147
1147
  get iterationDuration() {
1148
1148
  const { delay: e = 0 } = this.options || {};
1149
- return this.duration + /* @__PURE__ */ K(e);
1149
+ return this.duration + /* @__PURE__ */ z(e);
1150
1150
  }
1151
1151
  get time() {
1152
- return /* @__PURE__ */ K(Number(this.animation.currentTime) || 0);
1152
+ return /* @__PURE__ */ z(Number(this.animation.currentTime) || 0);
1153
1153
  }
1154
1154
  set time(e) {
1155
1155
  this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ X(e);
@@ -1178,24 +1178,24 @@ class da extends mn {
1178
1178
  */
1179
1179
  attachTimeline({ timeline: e, observe: n }) {
1180
1180
  var i;
1181
- return this.allowFlatten && ((i = this.animation.effect) == null || i.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && la() ? (this.animation.timeline = e, z) : n(this);
1181
+ return this.allowFlatten && ((i = this.animation.effect) == null || i.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && la() ? (this.animation.timeline = e, _) : n(this);
1182
1182
  }
1183
1183
  }
1184
- const Fs = {
1185
- anticipate: hs,
1186
- backInOut: us,
1187
- circInOut: ds
1184
+ const Is = {
1185
+ anticipate: fs,
1186
+ backInOut: hs,
1187
+ circInOut: ms
1188
1188
  };
1189
1189
  function ma(t) {
1190
- return t in Fs;
1190
+ return t in Is;
1191
1191
  }
1192
1192
  function pa(t) {
1193
- typeof t.ease == "string" && ma(t.ease) && (t.ease = Fs[t.ease]);
1193
+ typeof t.ease == "string" && ma(t.ease) && (t.ease = Is[t.ease]);
1194
1194
  }
1195
1195
  const pe = 10;
1196
1196
  class ga extends da {
1197
1197
  constructor(e) {
1198
- pa(e), Cs(e), super(e), e.startTime !== void 0 && (this.startTime = e.startTime), this.options = e;
1198
+ pa(e), Ds(e), super(e), e.startTime !== void 0 && (this.startTime = e.startTime), this.options = e;
1199
1199
  }
1200
1200
  /**
1201
1201
  * WAAPI doesn't natively have any interruption capabilities.
@@ -1213,14 +1213,14 @@ class ga extends da {
1213
1213
  n.set(e);
1214
1214
  return;
1215
1215
  }
1216
- const a = new pn({
1216
+ const a = new gn({
1217
1217
  ...r,
1218
1218
  autoplay: !1
1219
1219
  }), l = Math.max(pe, j.now() - this.startTime), u = q(0, pe, l - pe);
1220
1220
  n.setWithVelocity(a.sample(Math.max(0, l - u)).value, a.sample(l).value, u), a.stop();
1221
1221
  }
1222
1222
  }
1223
- const Hn = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
1223
+ const Xn = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
1224
1224
  (it.test(t) || t === "0") && // And it contains numbers and/or colors
1225
1225
  !t.startsWith("url("));
1226
1226
  function ya(t) {
@@ -1237,8 +1237,8 @@ function va(t, e, n, i) {
1237
1237
  return !1;
1238
1238
  if (e === "display" || e === "visibility")
1239
1239
  return !0;
1240
- const o = t[t.length - 1], r = Hn(s, e), a = Hn(o, e);
1241
- return St(r === a, `You are trying to animate ${e} from "${s}" to "${o}". "${r ? o : s}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : ya(t) || (n === "spring" || ks(n)) && i;
1240
+ const o = t[t.length - 1], r = Xn(s, e), a = Xn(o, e);
1241
+ return St(r === a, `You are trying to animate ${e} from "${s}" to "${o}". "${r ? o : s}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : ya(t) || (n === "spring" || Fs(n)) && i;
1242
1242
  }
1243
1243
  function Ne(t) {
1244
1244
  t.duration = 0, t.type = "keyframes";
@@ -1250,7 +1250,7 @@ const xa = /* @__PURE__ */ new Set([
1250
1250
  "transform"
1251
1251
  // TODO: Could be re-enabled now we have support for linear() easing
1252
1252
  // "background-color"
1253
- ]), Ta = /* @__PURE__ */ nn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1253
+ ]), Ta = /* @__PURE__ */ sn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1254
1254
  function wa(t) {
1255
1255
  var c;
1256
1256
  const { motionValue: e, name: n, repeatDelay: i, repeatType: s, damping: o, type: r } = t;
@@ -1264,12 +1264,12 @@ function wa(t) {
1264
1264
  !l && !i && s !== "mirror" && o !== 0 && r !== "inertia";
1265
1265
  }
1266
1266
  const ba = 40;
1267
- class Sa extends mn {
1267
+ class Sa extends pn {
1268
1268
  constructor({ autoplay: e = !0, delay: n = 0, type: i = "keyframes", repeat: s = 0, repeatDelay: o = 0, repeatType: r = "loop", keyframes: a, name: l, motionValue: u, element: c, ...h }) {
1269
1269
  var m;
1270
1270
  super(), this.stop = () => {
1271
- var p, v;
1272
- this._animation && (this._animation.stop(), (p = this.stopTimeline) == null || p.call(this)), (v = this.keyframeResolver) == null || v.cancel();
1271
+ var p, y;
1272
+ this._animation && (this._animation.stop(), (p = this.stopTimeline) == null || p.call(this)), (y = this.keyframeResolver) == null || y.cancel();
1273
1273
  }, this.createdAt = j.now();
1274
1274
  const f = {
1275
1275
  autoplay: e,
@@ -1282,23 +1282,26 @@ class Sa extends mn {
1282
1282
  motionValue: u,
1283
1283
  element: c,
1284
1284
  ...h
1285
- }, d = (c == null ? void 0 : c.KeyframeResolver) || gn;
1286
- this.keyframeResolver = new d(a, (p, v, g) => this.onKeyframesResolved(p, v, f, !g), l, u, c), (m = this.keyframeResolver) == null || m.scheduleResolve();
1285
+ }, d = (c == null ? void 0 : c.KeyframeResolver) || yn;
1286
+ this.keyframeResolver = new d(a, (p, y, g) => this.onKeyframesResolved(p, y, f, !g), l, u, c), (m = this.keyframeResolver) == null || m.scheduleResolve();
1287
1287
  }
1288
1288
  onKeyframesResolved(e, n, i, s) {
1289
+ var y, g;
1289
1290
  this.keyframeResolver = void 0;
1290
1291
  const { name: o, type: r, velocity: a, delay: l, isHandoff: u, onUpdate: c } = i;
1291
- this.resolvedAt = j.now(), va(e, o, r, a) || ((J.instantAnimations || !l) && (c == null || c(dn(e, i, n))), e[0] = e[e.length - 1], Ne(i), i.repeat = 0);
1292
+ this.resolvedAt = j.now(), va(e, o, r, a) || ((J.instantAnimations || !l) && (c == null || c(mn(e, i, n))), e[0] = e[e.length - 1], Ne(i), i.repeat = 0);
1292
1293
  const f = {
1293
1294
  startTime: s ? this.resolvedAt ? this.resolvedAt - this.createdAt > ba ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1294
1295
  finalKeyframe: n,
1295
1296
  ...i,
1296
1297
  keyframes: e
1297
- }, d = !u && wa(f) ? new ga({
1298
+ }, d = !u && wa(f), m = (g = (y = f.motionValue) == null ? void 0 : y.owner) == null ? void 0 : g.current, p = d ? new ga({
1298
1299
  ...f,
1299
- element: f.motionValue.owner.current
1300
- }) : new pn(f);
1301
- d.finished.then(() => this.notifyFinished()).catch(z), this.pendingTimeline && (this.stopTimeline = d.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = d;
1300
+ element: m
1301
+ }) : new gn(f);
1302
+ p.finished.then(() => {
1303
+ this.notifyFinished();
1304
+ }).catch(_), this.pendingTimeline && (this.stopTimeline = p.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = p;
1302
1305
  }
1303
1306
  get finished() {
1304
1307
  return this._animation ? this.animation.finished : this._finished;
@@ -1352,6 +1355,10 @@ class Sa extends mn {
1352
1355
  this._animation && this.animation.cancel(), (e = this.keyframeResolver) == null || e.cancel();
1353
1356
  }
1354
1357
  }
1358
+ function Bs(t, e, n, i = 0, s = 1) {
1359
+ const o = Array.from(t).sort((u, c) => u.sortNodePosition(c)).indexOf(e), r = t.size, a = (r - 1) * i;
1360
+ return typeof n == "function" ? n(o, r) : s === 1 ? o * i : a - o * i;
1361
+ }
1355
1362
  const Pa = (
1356
1363
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1357
1364
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
@@ -1364,7 +1371,7 @@ function Aa(t) {
1364
1371
  return [`--${n ?? i}`, s];
1365
1372
  }
1366
1373
  const Va = 4;
1367
- function Is(t, e, n = 1) {
1374
+ function Os(t, e, n = 1) {
1368
1375
  Z(n <= Va, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1369
1376
  const [i, s] = Aa(t);
1370
1377
  if (!i)
@@ -1372,19 +1379,16 @@ function Is(t, e, n = 1) {
1372
1379
  const o = window.getComputedStyle(e).getPropertyValue(i);
1373
1380
  if (o) {
1374
1381
  const r = o.trim();
1375
- return ns(r) ? parseFloat(r) : r;
1382
+ return is(r) ? parseFloat(r) : r;
1376
1383
  }
1377
- return ln(s) ? Is(s, e, n + 1) : s;
1384
+ return cn(s) ? Os(s, e, n + 1) : s;
1378
1385
  }
1379
- function yn(t, e) {
1380
- return (t == null ? void 0 : t[e]) ?? (t == null ? void 0 : t.default) ?? t;
1381
- }
1382
- const Ma = {
1386
+ const Ca = {
1383
1387
  type: "spring",
1384
1388
  stiffness: 500,
1385
1389
  damping: 25,
1386
1390
  restSpeed: 10
1387
- }, Ca = (t) => ({
1391
+ }, Ma = (t) => ({
1388
1392
  type: "spring",
1389
1393
  stiffness: 550,
1390
1394
  damping: t === 0 ? 2 * Math.sqrt(550) : 30,
@@ -1396,21 +1400,19 @@ const Ma = {
1396
1400
  type: "keyframes",
1397
1401
  ease: [0.25, 0.1, 0.35, 1],
1398
1402
  duration: 0.3
1399
- }, Ra = (t, { keyframes: e }) => e.length > 2 ? Da : Vt.has(t) ? t.startsWith("scale") ? Ca(e[1]) : Ma : Ea;
1400
- function La({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
1401
- return !!Object.keys(c).length;
1402
- }
1403
- const ka = (t) => t !== null;
1404
- function Fa(t, { repeat: e, repeatType: n = "loop" }, i) {
1405
- const s = t.filter(ka), o = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
1403
+ }, Ra = (t, { keyframes: e }) => e.length > 2 ? Da : Vt.has(t) ? t.startsWith("scale") ? Ma(e[1]) : Ca : Ea, La = (t) => t !== null;
1404
+ function ka(t, { repeat: e, repeatType: n = "loop" }, i) {
1405
+ const s = t.filter(La), o = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
1406
1406
  return s[o];
1407
1407
  }
1408
- function Bs(t, e, n, i = 0, s = 1) {
1409
- const o = Array.from(t).sort((u, c) => u.sortNodePosition(c)).indexOf(e), r = t.size, a = (r - 1) * i;
1410
- return typeof n == "function" ? n(o, r) : s === 1 ? o * i : a - o * i;
1408
+ function vn(t, e) {
1409
+ return (t == null ? void 0 : t[e]) ?? (t == null ? void 0 : t.default) ?? t;
1410
+ }
1411
+ function Fa({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
1412
+ return !!Object.keys(c).length;
1411
1413
  }
1412
- const vn = (t, e, n, i = {}, s, o) => (r) => {
1413
- const a = yn(i, t) || {}, l = a.delay || i.delay || 0;
1414
+ const xn = (t, e, n, i = {}, s, o) => (r) => {
1415
+ const a = vn(i, t) || {}, l = a.delay || i.delay || 0;
1414
1416
  let { elapsed: u = 0 } = i;
1415
1417
  u = u - /* @__PURE__ */ X(l);
1416
1418
  const c = {
@@ -1429,19 +1431,41 @@ const vn = (t, e, n, i = {}, s, o) => (r) => {
1429
1431
  motionValue: e,
1430
1432
  element: o ? void 0 : s
1431
1433
  };
1432
- La(a) || Object.assign(c, Ra(t, c)), c.duration && (c.duration = /* @__PURE__ */ X(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ X(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
1434
+ Fa(a) || Object.assign(c, Ra(t, c)), c.duration && (c.duration = /* @__PURE__ */ X(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ X(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
1433
1435
  let h = !1;
1434
1436
  if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (Ne(c), c.delay === 0 && (h = !0)), (J.instantAnimations || J.skipAnimations) && (h = !0, Ne(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
1435
- const f = Fa(c.keyframes, a);
1437
+ const f = ka(c.keyframes, a);
1436
1438
  if (f !== void 0) {
1437
- V.update(() => {
1439
+ C.update(() => {
1438
1440
  c.onUpdate(f), c.onComplete();
1439
1441
  });
1440
1442
  return;
1441
1443
  }
1442
1444
  }
1443
- return a.isSync ? new pn(c) : new Sa(c);
1444
- }, Os = /* @__PURE__ */ new Set([
1445
+ return a.isSync ? new gn(c) : new Sa(c);
1446
+ };
1447
+ function Yn(t) {
1448
+ const e = [{}, {}];
1449
+ return t == null || t.values.forEach((n, i) => {
1450
+ e[0][i] = n.get(), e[1][i] = n.getVelocity();
1451
+ }), e;
1452
+ }
1453
+ function Tn(t, e, n, i) {
1454
+ if (typeof e == "function") {
1455
+ const [s, o] = Yn(i);
1456
+ e = e(n !== void 0 ? n : t.custom, s, o);
1457
+ }
1458
+ if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
1459
+ const [s, o] = Yn(i);
1460
+ e = e(n !== void 0 ? n : t.custom, s, o);
1461
+ }
1462
+ return e;
1463
+ }
1464
+ function Tt(t, e, n) {
1465
+ const i = t.getProps();
1466
+ return Tn(i, e, n !== void 0 ? n : i.custom, t);
1467
+ }
1468
+ const js = /* @__PURE__ */ new Set([
1445
1469
  "width",
1446
1470
  "height",
1447
1471
  "top",
@@ -1449,7 +1473,7 @@ const vn = (t, e, n, i = {}, s, o) => (r) => {
1449
1473
  "right",
1450
1474
  "bottom",
1451
1475
  ...At
1452
- ]), Xn = 30, Ia = (t) => !isNaN(parseFloat(t));
1476
+ ]), qn = 30, Ia = (t) => !isNaN(parseFloat(t));
1453
1477
  class Ba {
1454
1478
  /**
1455
1479
  * @param init - The initiating value
@@ -1513,13 +1537,13 @@ class Ba {
1513
1537
  * @deprecated
1514
1538
  */
1515
1539
  onChange(e) {
1516
- return process.env.NODE_ENV !== "production" && rn(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
1540
+ return process.env.NODE_ENV !== "production" && on(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
1517
1541
  }
1518
1542
  on(e, n) {
1519
- this.events[e] || (this.events[e] = new sn());
1543
+ this.events[e] || (this.events[e] = new rn());
1520
1544
  const i = this.events[e].add(n);
1521
1545
  return e === "change" ? () => {
1522
- i(), V.read(() => {
1546
+ i(), C.read(() => {
1523
1547
  this.events.change.getSize() || this.stop();
1524
1548
  });
1525
1549
  } : i;
@@ -1597,10 +1621,10 @@ class Ba {
1597
1621
  */
1598
1622
  getVelocity() {
1599
1623
  const e = j.now();
1600
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Xn)
1624
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > qn)
1601
1625
  return 0;
1602
- const n = Math.min(this.updatedAt - this.prevUpdatedAt, Xn);
1603
- return rs(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1626
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, qn);
1627
+ return os(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1604
1628
  }
1605
1629
  /**
1606
1630
  * Registers a new animation to control this `MotionValue`. Only one
@@ -1655,33 +1679,12 @@ class Ba {
1655
1679
  function wt(t, e) {
1656
1680
  return new Ba(t, e);
1657
1681
  }
1658
- function Yn(t) {
1659
- const e = [{}, {}];
1660
- return t == null || t.values.forEach((n, i) => {
1661
- e[0][i] = n.get(), e[1][i] = n.getVelocity();
1662
- }), e;
1663
- }
1664
- function xn(t, e, n, i) {
1665
- if (typeof e == "function") {
1666
- const [s, o] = Yn(i);
1667
- e = e(n !== void 0 ? n : t.custom, s, o);
1668
- }
1669
- if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
1670
- const [s, o] = Yn(i);
1671
- e = e(n !== void 0 ? n : t.custom, s, o);
1672
- }
1673
- return e;
1674
- }
1675
- function Tt(t, e, n) {
1676
- const i = t.getProps();
1677
- return xn(i, e, n !== void 0 ? n : i.custom, t);
1678
- }
1679
- const Ue = (t) => Array.isArray(t);
1682
+ const We = (t) => Array.isArray(t);
1680
1683
  function Oa(t, e, n) {
1681
1684
  t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, wt(n));
1682
1685
  }
1683
1686
  function ja(t) {
1684
- return Ue(t) ? t[t.length - 1] || 0 : t;
1687
+ return We(t) ? t[t.length - 1] || 0 : t;
1685
1688
  }
1686
1689
  function Na(t, e) {
1687
1690
  const n = Tt(t, e);
@@ -1693,24 +1696,24 @@ function Na(t, e) {
1693
1696
  }
1694
1697
  }
1695
1698
  const O = (t) => !!(t && t.getVelocity);
1696
- function Ua(t) {
1699
+ function Wa(t) {
1697
1700
  return !!(O(t) && t.add);
1698
1701
  }
1699
- function We(t, e) {
1702
+ function Ue(t, e) {
1700
1703
  const n = t.getValue("willChange");
1701
- if (Ua(n))
1704
+ if (Wa(n))
1702
1705
  return n.add(e);
1703
1706
  if (!n && J.WillChange) {
1704
1707
  const i = new J.WillChange("auto");
1705
1708
  t.addValue("willChange", i), i.add(e);
1706
1709
  }
1707
1710
  }
1708
- function Tn(t) {
1711
+ function wn(t) {
1709
1712
  return t.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
1710
1713
  }
1711
- const Wa = "framerAppearId", js = "data-" + Tn(Wa);
1712
- function Ns(t) {
1713
- return t.props[js];
1714
+ const Ua = "framerAppearId", Ns = "data-" + wn(Ua);
1715
+ function Ws(t) {
1716
+ return t.props[Ns];
1714
1717
  }
1715
1718
  function $a({ protectedKeys: t, needsAnimating: e }, n) {
1716
1719
  const i = t.hasOwnProperty(n) && e[n] !== !0;
@@ -1726,24 +1729,24 @@ function Us(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
1726
1729
  continue;
1727
1730
  const d = {
1728
1731
  delay: n,
1729
- ...yn(o || {}, c)
1732
+ ...vn(o || {}, c)
1730
1733
  }, m = h.get();
1731
1734
  if (m !== void 0 && !h.isAnimating && !Array.isArray(f) && f === m && !d.velocity)
1732
1735
  continue;
1733
1736
  let p = !1;
1734
1737
  if (window.MotionHandoffAnimation) {
1735
- const g = Ns(t);
1738
+ const g = Ws(t);
1736
1739
  if (g) {
1737
- const T = window.MotionHandoffAnimation(g, c, V);
1740
+ const T = window.MotionHandoffAnimation(g, c, C);
1738
1741
  T !== null && (d.startTime = T, p = !0);
1739
1742
  }
1740
1743
  }
1741
- We(t, c), h.start(vn(c, h, f, t.shouldReduceMotion && Os.has(c) ? { type: !1 } : d, t, p));
1742
- const v = h.animation;
1743
- v && l.push(v);
1744
+ Ue(t, c), h.start(xn(c, h, f, t.shouldReduceMotion && js.has(c) ? { type: !1 } : d, t, p));
1745
+ const y = h.animation;
1746
+ y && l.push(y);
1744
1747
  }
1745
1748
  return r && Promise.all(l).then(() => {
1746
- V.update(() => {
1749
+ C.update(() => {
1747
1750
  r && Na(t, r);
1748
1751
  });
1749
1752
  }), l;
@@ -1791,16 +1794,16 @@ function za(t, e, n = {}) {
1791
1794
  const _a = {
1792
1795
  test: (t) => t === "auto",
1793
1796
  parse: (t) => t
1794
- }, Ws = (t) => (e) => e.test(t), $s = [Pt, x, Y, tt, yo, go, _a], qn = (t) => $s.find(Ws(t));
1797
+ }, $s = (t) => (e) => e.test(t), Ks = [Pt, x, Y, tt, yo, go, _a], Zn = (t) => Ks.find($s(t));
1795
1798
  function Ga(t) {
1796
- return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || ss(t) : !0;
1799
+ return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || rs(t) : !0;
1797
1800
  }
1798
1801
  const Ha = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1799
1802
  function Xa(t) {
1800
1803
  const [e, n] = t.slice(0, -1).split("(");
1801
1804
  if (e === "drop-shadow")
1802
1805
  return t;
1803
- const [i] = n.match(cn) || [];
1806
+ const [i] = n.match(un) || [];
1804
1807
  if (!i)
1805
1808
  return t;
1806
1809
  const s = n.replace(i, "");
@@ -1813,7 +1816,7 @@ const Ya = /\b([a-z-]*)\(.*?\)/gu, Ke = {
1813
1816
  const e = t.match(Ya);
1814
1817
  return e ? e.map(Xa).join(" ") : t;
1815
1818
  }
1816
- }, Zn = {
1819
+ }, Jn = {
1817
1820
  ...Pt,
1818
1821
  transform: Math.round
1819
1822
  }, qa = {
@@ -1821,10 +1824,10 @@ const Ya = /\b([a-z-]*)\(.*?\)/gu, Ke = {
1821
1824
  rotateX: tt,
1822
1825
  rotateY: tt,
1823
1826
  rotateZ: tt,
1824
- scale: zt,
1825
- scaleX: zt,
1826
- scaleY: zt,
1827
- scaleZ: zt,
1827
+ scale: _t,
1828
+ scaleX: _t,
1829
+ scaleY: _t,
1830
+ scaleZ: _t,
1828
1831
  skew: tt,
1829
1832
  skewX: tt,
1830
1833
  skewY: tt,
@@ -1837,11 +1840,11 @@ const Ya = /\b([a-z-]*)\(.*?\)/gu, Ke = {
1837
1840
  z: x,
1838
1841
  perspective: x,
1839
1842
  transformPerspective: x,
1840
- opacity: It,
1841
- originX: On,
1842
- originY: On,
1843
+ opacity: Bt,
1844
+ originX: jn,
1845
+ originY: jn,
1843
1846
  originZ: x
1844
- }, wn = {
1847
+ }, bn = {
1845
1848
  // Border props
1846
1849
  borderWidth: x,
1847
1850
  borderTopWidth: x,
@@ -1897,30 +1900,30 @@ const Ya = /\b([a-z-]*)\(.*?\)/gu, Ke = {
1897
1900
  backgroundPositionX: x,
1898
1901
  backgroundPositionY: x,
1899
1902
  ...qa,
1900
- zIndex: Zn,
1903
+ zIndex: Jn,
1901
1904
  // SVG
1902
- fillOpacity: It,
1903
- strokeOpacity: It,
1904
- numOctaves: Zn
1905
+ fillOpacity: Bt,
1906
+ strokeOpacity: Bt,
1907
+ numOctaves: Jn
1905
1908
  }, Za = {
1906
- ...wn,
1909
+ ...bn,
1907
1910
  // Color props
1908
- color: R,
1909
- backgroundColor: R,
1910
- outlineColor: R,
1911
- fill: R,
1912
- stroke: R,
1911
+ color: L,
1912
+ backgroundColor: L,
1913
+ outlineColor: L,
1914
+ fill: L,
1915
+ stroke: L,
1913
1916
  // Border props
1914
- borderColor: R,
1915
- borderTopColor: R,
1916
- borderRightColor: R,
1917
- borderBottomColor: R,
1918
- borderLeftColor: R,
1917
+ borderColor: L,
1918
+ borderTopColor: L,
1919
+ borderRightColor: L,
1920
+ borderBottomColor: L,
1921
+ borderLeftColor: L,
1919
1922
  filter: Ke,
1920
1923
  WebkitFilter: Ke
1921
- }, Ks = (t) => Za[t];
1922
- function zs(t, e) {
1923
- let n = Ks(t);
1924
+ }, zs = (t) => Za[t];
1925
+ function _s(t, e) {
1926
+ let n = zs(t);
1924
1927
  return n !== Ke && (n = it), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
1925
1928
  }
1926
1929
  const Ja = /* @__PURE__ */ new Set(["auto", "none", "0"]);
@@ -1928,13 +1931,13 @@ function Qa(t, e, n) {
1928
1931
  let i = 0, s;
1929
1932
  for (; i < t.length && !s; ) {
1930
1933
  const o = t[i];
1931
- typeof o == "string" && !Ja.has(o) && Bt(o).values.length && (s = t[i]), i++;
1934
+ typeof o == "string" && !Ja.has(o) && Ot(o).values.length && (s = t[i]), i++;
1932
1935
  }
1933
1936
  if (s && n)
1934
1937
  for (const o of e)
1935
- t[o] = zs(n, s);
1938
+ t[o] = _s(n, s);
1936
1939
  }
1937
- class tl extends gn {
1940
+ class tl extends yn {
1938
1941
  constructor(e, n, i, s, o) {
1939
1942
  super(e, n, i, s, o, !0);
1940
1943
  }
@@ -1945,20 +1948,20 @@ class tl extends gn {
1945
1948
  super.readKeyframes();
1946
1949
  for (let c = 0; c < e.length; c++) {
1947
1950
  let h = e[c];
1948
- if (typeof h == "string" && (h = h.trim(), ln(h))) {
1949
- const f = Is(h, n.current);
1951
+ if (typeof h == "string" && (h = h.trim(), cn(h))) {
1952
+ const f = Os(h, n.current);
1950
1953
  f !== void 0 && (e[c] = f), c === e.length - 1 && (this.finalKeyframe = h);
1951
1954
  }
1952
1955
  }
1953
- if (this.resolveNoneKeyframes(), !Os.has(i) || e.length !== 2)
1956
+ if (this.resolveNoneKeyframes(), !js.has(i) || e.length !== 2)
1954
1957
  return;
1955
- const [s, o] = e, r = qn(s), a = qn(o), l = Bn(s), u = Bn(o);
1958
+ const [s, o] = e, r = Zn(s), a = Zn(o), l = On(s), u = On(o);
1956
1959
  if (l !== u && et[i]) {
1957
1960
  this.needsMeasurement = !0;
1958
1961
  return;
1959
1962
  }
1960
1963
  if (r !== a)
1961
- if (_n(r) && _n(a))
1964
+ if (Gn(r) && Gn(a))
1962
1965
  for (let c = 0; c < e.length; c++) {
1963
1966
  const h = e[c];
1964
1967
  typeof h == "string" && (e[c] = parseFloat(h));
@@ -1993,6 +1996,8 @@ class tl extends gn {
1993
1996
  }
1994
1997
  }
1995
1998
  function el(t, e, n) {
1999
+ if (t == null)
2000
+ return [];
1996
2001
  if (t instanceof EventTarget)
1997
2002
  return [t];
1998
2003
  if (typeof t == "string") {
@@ -2000,13 +2005,13 @@ function el(t, e, n) {
2000
2005
  const s = (n == null ? void 0 : n[t]) ?? i.querySelectorAll(t);
2001
2006
  return s ? Array.from(s) : [];
2002
2007
  }
2003
- return Array.from(t);
2008
+ return Array.from(t).filter((i) => i != null);
2004
2009
  }
2005
- const _s = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
2006
- function Gs(t) {
2007
- return is(t) && "offsetHeight" in t;
2010
+ const Gs = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
2011
+ function ze(t) {
2012
+ return ss(t) && "offsetHeight" in t;
2008
2013
  }
2009
- const { schedule: bn } = /* @__PURE__ */ gs(queueMicrotask, !1), H = {
2014
+ const { schedule: Sn } = /* @__PURE__ */ ys(queueMicrotask, !1), H = {
2010
2015
  x: !1,
2011
2016
  y: !1
2012
2017
  };
@@ -2028,18 +2033,18 @@ function Xs(t, e) {
2028
2033
  };
2029
2034
  return [n, s, () => i.abort()];
2030
2035
  }
2031
- function Jn(t) {
2036
+ function Qn(t) {
2032
2037
  return !(t.pointerType === "touch" || Hs());
2033
2038
  }
2034
2039
  function il(t, e, n = {}) {
2035
2040
  const [i, s, o] = Xs(t, n), r = (a) => {
2036
- if (!Jn(a))
2041
+ if (!Qn(a))
2037
2042
  return;
2038
2043
  const { target: l } = a, u = e(l, a);
2039
2044
  if (typeof u != "function" || !l)
2040
2045
  return;
2041
2046
  const c = (h) => {
2042
- Jn(h) && (u(h), l.removeEventListener("pointerleave", c));
2047
+ Qn(h) && (u(h), l.removeEventListener("pointerleave", c));
2043
2048
  };
2044
2049
  l.addEventListener("pointerleave", c, s);
2045
2050
  };
@@ -2047,7 +2052,7 @@ function il(t, e, n = {}) {
2047
2052
  a.addEventListener("pointerenter", r, s);
2048
2053
  }), o;
2049
2054
  }
2050
- const Ys = (t, e) => e ? t === e ? !0 : Ys(t, e.parentElement) : !1, Sn = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, sl = /* @__PURE__ */ new Set([
2055
+ const Ys = (t, e) => e ? t === e ? !0 : Ys(t, e.parentElement) : !1, Pn = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, sl = /* @__PURE__ */ new Set([
2051
2056
  "BUTTON",
2052
2057
  "INPUT",
2053
2058
  "SELECT",
@@ -2057,8 +2062,8 @@ const Ys = (t, e) => e ? t === e ? !0 : Ys(t, e.parentElement) : !1, Sn = (t) =>
2057
2062
  function qs(t) {
2058
2063
  return sl.has(t.tagName) || t.isContentEditable === !0;
2059
2064
  }
2060
- const Xt = /* @__PURE__ */ new WeakSet();
2061
- function Qn(t) {
2065
+ const Yt = /* @__PURE__ */ new WeakSet();
2066
+ function ti(t) {
2062
2067
  return (e) => {
2063
2068
  e.key === "Enter" && t(e);
2064
2069
  };
@@ -2070,28 +2075,28 @@ const rl = (t, e) => {
2070
2075
  const n = t.currentTarget;
2071
2076
  if (!n)
2072
2077
  return;
2073
- const i = Qn(() => {
2074
- if (Xt.has(n))
2078
+ const i = ti(() => {
2079
+ if (Yt.has(n))
2075
2080
  return;
2076
2081
  ge(n, "down");
2077
- const s = Qn(() => {
2082
+ const s = ti(() => {
2078
2083
  ge(n, "up");
2079
2084
  }), o = () => ge(n, "cancel");
2080
2085
  n.addEventListener("keyup", s, e), n.addEventListener("blur", o, e);
2081
2086
  });
2082
2087
  n.addEventListener("keydown", i, e), n.addEventListener("blur", () => n.removeEventListener("keydown", i), e);
2083
2088
  };
2084
- function ti(t) {
2085
- return Sn(t) && !Hs();
2089
+ function ei(t) {
2090
+ return Pn(t) && !Hs();
2086
2091
  }
2087
2092
  function ol(t, e, n = {}) {
2088
2093
  const [i, s, o] = Xs(t, n), r = (a) => {
2089
2094
  const l = a.currentTarget;
2090
- if (!ti(a))
2095
+ if (!ei(a))
2091
2096
  return;
2092
- Xt.add(l);
2097
+ Yt.add(l);
2093
2098
  const u = e(l, a), c = (d, m) => {
2094
- window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), Xt.has(l) && Xt.delete(l), ti(d) && typeof u == "function" && u(d, { success: m });
2099
+ window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), Yt.has(l) && Yt.delete(l), ei(d) && typeof u == "function" && u(d, { success: m });
2095
2100
  }, h = (d) => {
2096
2101
  c(d, l === window || l === document || n.useGlobalTarget || Ys(l, d.target));
2097
2102
  }, f = (d) => {
@@ -2100,43 +2105,43 @@ function ol(t, e, n = {}) {
2100
2105
  window.addEventListener("pointerup", h, s), window.addEventListener("pointercancel", f, s);
2101
2106
  };
2102
2107
  return i.forEach((a) => {
2103
- (n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, s), Gs(a) && (a.addEventListener("focus", (u) => rl(u, s)), !qs(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
2108
+ (n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, s), ze(a) && (a.addEventListener("focus", (u) => rl(u, s)), !qs(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
2104
2109
  }), o;
2105
2110
  }
2106
2111
  function Zs(t) {
2107
- return is(t) && "ownerSVGElement" in t;
2112
+ return ss(t) && "ownerSVGElement" in t;
2108
2113
  }
2109
2114
  function al(t) {
2110
2115
  return Zs(t) && t.tagName === "svg";
2111
2116
  }
2112
- const ll = [...$s, R, it], cl = (t) => ll.find(Ws(t)), ei = () => ({
2117
+ const ll = [...Ks, L, it], cl = (t) => ll.find($s(t)), ni = () => ({
2113
2118
  translate: 0,
2114
2119
  scale: 1,
2115
2120
  origin: 0,
2116
2121
  originPoint: 0
2117
2122
  }), yt = () => ({
2118
- x: ei(),
2119
- y: ei()
2120
- }), ni = () => ({ min: 0, max: 0 }), k = () => ({
2121
2123
  x: ni(),
2122
2124
  y: ni()
2123
- }), ze = { current: null }, Js = { current: !1 }, ul = typeof window < "u";
2125
+ }), ii = () => ({ min: 0, max: 0 }), k = () => ({
2126
+ x: ii(),
2127
+ y: ii()
2128
+ }), _e = { current: null }, Js = { current: !1 }, ul = typeof window < "u";
2124
2129
  function hl() {
2125
2130
  if (Js.current = !0, !!ul)
2126
2131
  if (window.matchMedia) {
2127
- const t = window.matchMedia("(prefers-reduced-motion)"), e = () => ze.current = t.matches;
2132
+ const t = window.matchMedia("(prefers-reduced-motion)"), e = () => _e.current = t.matches;
2128
2133
  t.addEventListener("change", e), e();
2129
2134
  } else
2130
- ze.current = !1;
2135
+ _e.current = !1;
2131
2136
  }
2132
2137
  const fl = /* @__PURE__ */ new WeakMap();
2133
- function oe(t) {
2138
+ function ae(t) {
2134
2139
  return t !== null && typeof t == "object" && typeof t.start == "function";
2135
2140
  }
2136
- function Ot(t) {
2141
+ function jt(t) {
2137
2142
  return typeof t == "string" || Array.isArray(t);
2138
2143
  }
2139
- const Pn = [
2144
+ const An = [
2140
2145
  "animate",
2141
2146
  "whileInView",
2142
2147
  "whileFocus",
@@ -2144,12 +2149,12 @@ const Pn = [
2144
2149
  "whileTap",
2145
2150
  "whileDrag",
2146
2151
  "exit"
2147
- ], An = ["initial", ...Pn];
2148
- function ae(t) {
2149
- return oe(t.animate) || An.some((e) => Ot(t[e]));
2152
+ ], Vn = ["initial", ...An];
2153
+ function le(t) {
2154
+ return ae(t.animate) || Vn.some((e) => jt(t[e]));
2150
2155
  }
2151
2156
  function Qs(t) {
2152
- return !!(ae(t) || t.variants);
2157
+ return !!(le(t) || t.variants);
2153
2158
  }
2154
2159
  function dl(t, e, n) {
2155
2160
  for (const i in e) {
@@ -2171,7 +2176,7 @@ function dl(t, e, n) {
2171
2176
  e[i] === void 0 && t.removeValue(i);
2172
2177
  return e;
2173
2178
  }
2174
- const ii = [
2179
+ const si = [
2175
2180
  "AnimationStart",
2176
2181
  "AnimationComplete",
2177
2182
  "Update",
@@ -2180,12 +2185,12 @@ const ii = [
2180
2185
  "LayoutAnimationStart",
2181
2186
  "LayoutAnimationComplete"
2182
2187
  ];
2183
- let te = {};
2188
+ let ee = {};
2184
2189
  function tr(t) {
2185
- te = t;
2190
+ ee = t;
2186
2191
  }
2187
2192
  function ml() {
2188
- return te;
2193
+ return ee;
2189
2194
  }
2190
2195
  class pl {
2191
2196
  /**
@@ -2199,14 +2204,14 @@ class pl {
2199
2204
  return {};
2200
2205
  }
2201
2206
  constructor({ parent: e, props: n, presenceContext: i, reducedMotionConfig: s, blockInitialAnimation: o, visualState: r }, a = {}) {
2202
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = gn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2207
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = yn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2203
2208
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2204
2209
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2205
2210
  const f = j.now();
2206
- this.renderScheduledAt < f && (this.renderScheduledAt = f, V.render(this.render, !1, !0));
2211
+ this.renderScheduledAt < f && (this.renderScheduledAt = f, C.render(this.render, !1, !0));
2207
2212
  };
2208
2213
  const { latestValues: l, renderState: u } = r;
2209
- this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = ae(n), this.isVariantNode = Qs(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2214
+ this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = le(n), this.isVariantNode = Qs(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2210
2215
  const { willChange: c, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
2211
2216
  for (const f in h) {
2212
2217
  const d = h[f];
@@ -2215,7 +2220,7 @@ class pl {
2215
2220
  }
2216
2221
  mount(e) {
2217
2222
  var n;
2218
- this.current = e, fl.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((i, s) => this.bindToMotionValue(s, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Js.current || hl(), this.shouldReduceMotion = ze.current), process.env.NODE_ENV !== "production" && rn(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), (n = this.parent) == null || n.addChild(this), this.update(this.props, this.presenceContext);
2223
+ this.current = e, fl.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((i, s) => this.bindToMotionValue(s, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Js.current || hl(), this.shouldReduceMotion = _e.current), process.env.NODE_ENV !== "production" && on(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), (n = this.parent) == null || n.addChild(this), this.update(this.props, this.presenceContext);
2219
2224
  }
2220
2225
  unmount() {
2221
2226
  var e;
@@ -2239,7 +2244,7 @@ class pl {
2239
2244
  const i = Vt.has(e);
2240
2245
  i && this.onBindTransform && this.onBindTransform();
2241
2246
  const s = n.on("change", (r) => {
2242
- this.latestValues[e] = r, this.props.onUpdate && V.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
2247
+ this.latestValues[e] = r, this.props.onUpdate && C.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
2243
2248
  });
2244
2249
  let o;
2245
2250
  typeof window < "u" && window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
@@ -2251,8 +2256,8 @@ class pl {
2251
2256
  }
2252
2257
  updateFeatures() {
2253
2258
  let e = "animation";
2254
- for (e in te) {
2255
- const n = te[e];
2259
+ for (e in ee) {
2260
+ const n = ee[e];
2256
2261
  if (!n)
2257
2262
  continue;
2258
2263
  const { isEnabled: i, Feature: s } = n;
@@ -2285,8 +2290,8 @@ class pl {
2285
2290
  */
2286
2291
  update(e, n) {
2287
2292
  (e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
2288
- for (let i = 0; i < ii.length; i++) {
2289
- const s = ii[i];
2293
+ for (let i = 0; i < si.length; i++) {
2294
+ const s = si[i];
2290
2295
  this.propEventSubscriptions[s] && (this.propEventSubscriptions[s](), delete this.propEventSubscriptions[s]);
2291
2296
  const o = "on" + s, r = e[o];
2292
2297
  r && (this.propEventSubscriptions[s] = this.on(s, r));
@@ -2356,7 +2361,7 @@ class pl {
2356
2361
  */
2357
2362
  readValue(e, n) {
2358
2363
  let i = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
2359
- return i != null && (typeof i == "string" && (ns(i) || ss(i)) ? i = parseFloat(i) : !cl(i) && it.test(n) && (i = zs(e, n)), this.setBaseTarget(e, O(i) ? i.get() : i)), O(i) ? i.get() : i;
2364
+ return i != null && (typeof i == "string" && (is(i) || rs(i)) ? i = parseFloat(i) : !cl(i) && it.test(n) && (i = _s(e, n)), this.setBaseTarget(e, O(i) ? i.get() : i)), O(i) ? i.get() : i;
2360
2365
  }
2361
2366
  /**
2362
2367
  * Set the base target to later animate back to. This is currently
@@ -2374,7 +2379,7 @@ class pl {
2374
2379
  const { initial: n } = this.props;
2375
2380
  let i;
2376
2381
  if (typeof n == "string" || typeof n == "object") {
2377
- const r = xn(this.props, n, (o = this.presenceContext) == null ? void 0 : o.custom);
2382
+ const r = Tn(this.props, n, (o = this.presenceContext) == null ? void 0 : o.custom);
2378
2383
  r && (i = r[e]);
2379
2384
  }
2380
2385
  if (n && i !== void 0)
@@ -2383,20 +2388,13 @@ class pl {
2383
2388
  return s !== void 0 && !O(s) ? s : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
2384
2389
  }
2385
2390
  on(e, n) {
2386
- return this.events[e] || (this.events[e] = new sn()), this.events[e].add(n);
2391
+ return this.events[e] || (this.events[e] = new rn()), this.events[e].add(n);
2387
2392
  }
2388
2393
  notify(e, ...n) {
2389
2394
  this.events[e] && this.events[e].notify(...n);
2390
2395
  }
2391
2396
  scheduleRenderMicrotask() {
2392
- bn.render(this.render);
2393
- }
2394
- }
2395
- class st {
2396
- constructor(e) {
2397
- this.isMounted = !1, this.node = e;
2398
- }
2399
- update() {
2397
+ Sn.render(this.render);
2400
2398
  }
2401
2399
  }
2402
2400
  class er extends pl {
@@ -2421,6 +2419,13 @@ class er extends pl {
2421
2419
  }));
2422
2420
  }
2423
2421
  }
2422
+ class st {
2423
+ constructor(e) {
2424
+ this.isMounted = !1, this.node = e;
2425
+ }
2426
+ update() {
2427
+ }
2428
+ }
2424
2429
  function nr({ top: t, left: e, right: n, bottom: i }) {
2425
2430
  return {
2426
2431
  x: { min: e, max: n },
@@ -2444,32 +2449,32 @@ function yl(t, e) {
2444
2449
  function ye(t) {
2445
2450
  return t === void 0 || t === 1;
2446
2451
  }
2447
- function _e({ scale: t, scaleX: e, scaleY: n }) {
2452
+ function Ge({ scale: t, scaleX: e, scaleY: n }) {
2448
2453
  return !ye(t) || !ye(e) || !ye(n);
2449
2454
  }
2450
- function at(t) {
2451
- return _e(t) || ir(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
2455
+ function lt(t) {
2456
+ return Ge(t) || ir(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
2452
2457
  }
2453
2458
  function ir(t) {
2454
- return si(t.x) || si(t.y);
2459
+ return ri(t.x) || ri(t.y);
2455
2460
  }
2456
- function si(t) {
2461
+ function ri(t) {
2457
2462
  return t && t !== "0%";
2458
2463
  }
2459
- function ee(t, e, n) {
2464
+ function ne(t, e, n) {
2460
2465
  const i = t - n, s = e * i;
2461
2466
  return n + s;
2462
2467
  }
2463
- function ri(t, e, n, i, s) {
2464
- return s !== void 0 && (t = ee(t, s, i)), ee(t, n, i) + e;
2468
+ function oi(t, e, n, i, s) {
2469
+ return s !== void 0 && (t = ne(t, s, i)), ne(t, n, i) + e;
2465
2470
  }
2466
- function Ge(t, e = 0, n = 1, i, s) {
2467
- t.min = ri(t.min, e, n, i, s), t.max = ri(t.max, e, n, i, s);
2471
+ function He(t, e = 0, n = 1, i, s) {
2472
+ t.min = oi(t.min, e, n, i, s), t.max = oi(t.max, e, n, i, s);
2468
2473
  }
2469
2474
  function sr(t, { x: e, y: n }) {
2470
- Ge(t.x, e.translate, e.scale, e.originPoint), Ge(t.y, n.translate, n.scale, n.originPoint);
2475
+ He(t.x, e.translate, e.scale, e.originPoint), He(t.y, n.translate, n.scale, n.originPoint);
2471
2476
  }
2472
- const oi = 0.999999999999, ai = 1.0000000000001;
2477
+ const ai = 0.999999999999, li = 1.0000000000001;
2473
2478
  function vl(t, e, n, i = !1) {
2474
2479
  const s = n.length;
2475
2480
  if (!s)
@@ -2482,19 +2487,19 @@ function vl(t, e, n, i = !1) {
2482
2487
  l && l.props.style && l.props.style.display === "contents" || (i && o.options.layoutScroll && o.scroll && o !== o.root && xt(t, {
2483
2488
  x: -o.scroll.offset.x,
2484
2489
  y: -o.scroll.offset.y
2485
- }), r && (e.x *= r.x.scale, e.y *= r.y.scale, sr(t, r)), i && at(o.latestValues) && xt(t, o.latestValues));
2490
+ }), r && (e.x *= r.x.scale, e.y *= r.y.scale, sr(t, r)), i && lt(o.latestValues) && xt(t, o.latestValues));
2486
2491
  }
2487
- e.x < ai && e.x > oi && (e.x = 1), e.y < ai && e.y > oi && (e.y = 1);
2492
+ e.x < li && e.x > ai && (e.x = 1), e.y < li && e.y > ai && (e.y = 1);
2488
2493
  }
2489
2494
  function vt(t, e) {
2490
2495
  t.min = t.min + e, t.max = t.max + e;
2491
2496
  }
2492
- function li(t, e, n, i, s = 0.5) {
2497
+ function ci(t, e, n, i, s = 0.5) {
2493
2498
  const o = E(t.min, t.max, s);
2494
- Ge(t, e, n, o, i);
2499
+ He(t, e, n, o, i);
2495
2500
  }
2496
2501
  function xt(t, e) {
2497
- li(t.x, e.x, e.scaleX, e.scale, e.originX), li(t.y, e.y, e.scaleY, e.scale, e.originY);
2502
+ ci(t.x, e.x, e.scaleX, e.scale, e.originX), ci(t.y, e.y, e.scaleY, e.scale, e.originY);
2498
2503
  }
2499
2504
  function rr(t, e) {
2500
2505
  return nr(yl(t.getBoundingClientRect(), e));
@@ -2516,8 +2521,14 @@ function bl(t, e, n) {
2516
2521
  if (a === void 0)
2517
2522
  continue;
2518
2523
  let l = !0;
2519
- if (typeof a == "number" ? l = a === (r.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
2520
- const u = _s(a, wn[r]);
2524
+ if (typeof a == "number")
2525
+ l = a === (r.startsWith("scale") ? 1 : 0);
2526
+ else {
2527
+ const u = parseFloat(a);
2528
+ l = r.startsWith("scale") ? u === 1 : u === 0;
2529
+ }
2530
+ if (!l || n) {
2531
+ const u = Gs(a, bn[r]);
2521
2532
  if (!l) {
2522
2533
  s = !1;
2523
2534
  const c = Tl[r] || r;
@@ -2528,7 +2539,7 @@ function bl(t, e, n) {
2528
2539
  }
2529
2540
  return i = i.trim(), n ? i = n(e, s ? "" : i) : s && (i = "none"), i;
2530
2541
  }
2531
- function Vn(t, e, n) {
2542
+ function Cn(t, e, n) {
2532
2543
  const { style: i, vars: s, transformOrigin: o } = t;
2533
2544
  let r = !1, a = !1;
2534
2545
  for (const l in e) {
@@ -2536,11 +2547,11 @@ function Vn(t, e, n) {
2536
2547
  if (Vt.has(l)) {
2537
2548
  r = !0;
2538
2549
  continue;
2539
- } else if (vs(l)) {
2550
+ } else if (xs(l)) {
2540
2551
  s[l] = u;
2541
2552
  continue;
2542
2553
  } else {
2543
- const c = _s(u, wn[l]);
2554
+ const c = Gs(u, bn[l]);
2544
2555
  l.startsWith("origin") ? (a = !0, o[l] = c) : i[l] = c;
2545
2556
  }
2546
2557
  }
@@ -2558,7 +2569,7 @@ function or(t, { style: e, vars: n }, i, s) {
2558
2569
  for (r in n)
2559
2570
  o.setProperty(r, n[r]);
2560
2571
  }
2561
- function ci(t, e) {
2572
+ function ui(t, e) {
2562
2573
  return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
2563
2574
  }
2564
2575
  const Mt = {
@@ -2570,7 +2581,7 @@ const Mt = {
2570
2581
  t = parseFloat(t);
2571
2582
  else
2572
2583
  return t;
2573
- const n = ci(t, e.target.x), i = ci(t, e.target.y);
2584
+ const n = ui(t, e.target.x), i = ui(t, e.target.y);
2574
2585
  return `${n}% ${i}%`;
2575
2586
  }
2576
2587
  }, Sl = {
@@ -2583,7 +2594,7 @@ const Mt = {
2583
2594
  const u = E(a, l, 0.5);
2584
2595
  return typeof s[2 + r] == "number" && (s[2 + r] /= u), typeof s[3 + r] == "number" && (s[3 + r] /= u), o(s);
2585
2596
  }
2586
- }, He = {
2597
+ }, Xe = {
2587
2598
  borderRadius: {
2588
2599
  ...Mt,
2589
2600
  applyTo: [
@@ -2600,7 +2611,7 @@ const Mt = {
2600
2611
  boxShadow: Sl
2601
2612
  };
2602
2613
  function ar(t, { layout: e, layoutId: n }) {
2603
- return Vt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!He[t] || t === "opacity");
2614
+ return Vt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Xe[t] || t === "opacity");
2604
2615
  }
2605
2616
  function Mn(t, e, n) {
2606
2617
  var r;
@@ -2623,7 +2634,7 @@ class Al extends er {
2623
2634
  if (Vt.has(n))
2624
2635
  return (i = this.projection) != null && i.isProjecting ? Fe(n) : ta(e, n);
2625
2636
  {
2626
- const s = Pl(e), o = (vs(n) ? s.getPropertyValue(n) : s[n]) || 0;
2637
+ const s = Pl(e), o = (xs(n) ? s.getPropertyValue(n) : s[n]) || 0;
2627
2638
  return typeof o == "string" ? o.trim() : o;
2628
2639
  }
2629
2640
  }
@@ -2631,7 +2642,7 @@ class Al extends er {
2631
2642
  return rr(e, n);
2632
2643
  }
2633
2644
  build(e, n, i) {
2634
- Vn(e, n, i.transformTemplate);
2645
+ Cn(e, n, i.transformTemplate);
2635
2646
  }
2636
2647
  scrapeMotionValuesFromProps(e, n, i) {
2637
2648
  return Mn(e, n, i);
@@ -2640,16 +2651,14 @@ class Al extends er {
2640
2651
  const Vl = {
2641
2652
  offset: "stroke-dashoffset",
2642
2653
  array: "stroke-dasharray"
2643
- }, Ml = {
2654
+ }, Cl = {
2644
2655
  offset: "strokeDashoffset",
2645
2656
  array: "strokeDasharray"
2646
2657
  };
2647
- function Cl(t, e, n = 1, i = 0, s = !0) {
2658
+ function Ml(t, e, n = 1, i = 0, s = !0) {
2648
2659
  t.pathLength = 1;
2649
- const o = s ? Vl : Ml;
2650
- t[o.offset] = x.transform(-i);
2651
- const r = x.transform(e), a = x.transform(n);
2652
- t[o.array] = `${r} ${a}`;
2660
+ const o = s ? Vl : Cl;
2661
+ t[o.offset] = `${-i}`, t[o.array] = `${e} ${n}`;
2653
2662
  }
2654
2663
  const Dl = [
2655
2664
  "offsetDistance",
@@ -2667,7 +2676,7 @@ function lr(t, {
2667
2676
  // This is object creation, which we try to avoid per-frame.
2668
2677
  ...a
2669
2678
  }, l, u, c) {
2670
- if (Vn(t, a, u), l) {
2679
+ if (Cn(t, a, u), l) {
2671
2680
  t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
2672
2681
  return;
2673
2682
  }
@@ -2676,7 +2685,7 @@ function lr(t, {
2676
2685
  h.transform && (f.transform = h.transform, delete h.transform), (f.transform || h.transformOrigin) && (f.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), f.transform && (f.transformBox = (c == null ? void 0 : c.transformBox) ?? "fill-box", delete h.transformBox);
2677
2686
  for (const d of Dl)
2678
2687
  h[d] !== void 0 && (f[d] = h[d], delete h[d]);
2679
- e !== void 0 && (h.x = e), n !== void 0 && (h.y = n), i !== void 0 && (h.scale = i), s !== void 0 && Cl(h, s, o, r, !1);
2688
+ e !== void 0 && (h.x = e), n !== void 0 && (h.y = n), i !== void 0 && (h.scale = i), s !== void 0 && Ml(h, s, o, r, !1);
2680
2689
  }
2681
2690
  const cr = /* @__PURE__ */ new Set([
2682
2691
  "baseFrequency",
@@ -2706,7 +2715,7 @@ const cr = /* @__PURE__ */ new Set([
2706
2715
  function El(t, e, n, i) {
2707
2716
  or(t, e, void 0, i);
2708
2717
  for (const s in e.attrs)
2709
- t.setAttribute(cr.has(s) ? s : Tn(s), e.attrs[s]);
2718
+ t.setAttribute(cr.has(s) ? s : wn(s), e.attrs[s]);
2710
2719
  }
2711
2720
  function hr(t, e, n) {
2712
2721
  const i = Mn(t, e, n);
@@ -2726,10 +2735,10 @@ class Rl extends er {
2726
2735
  }
2727
2736
  readValueFromInstance(e, n) {
2728
2737
  if (Vt.has(n)) {
2729
- const i = Ks(n);
2738
+ const i = zs(n);
2730
2739
  return i && i.default || 0;
2731
2740
  }
2732
- return n = cr.has(n) ? n : Tn(n), e.getAttribute(n);
2741
+ return n = cr.has(n) ? n : wn(n), e.getAttribute(n);
2733
2742
  }
2734
2743
  scrapeMotionValuesFromProps(e, n, i) {
2735
2744
  return hr(e, n, i);
@@ -2744,7 +2753,7 @@ class Rl extends er {
2744
2753
  this.isSVGTag = ur(e.tagName), super.mount(e);
2745
2754
  }
2746
2755
  }
2747
- const Ll = An.length;
2756
+ const Ll = Vn.length;
2748
2757
  function fr(t) {
2749
2758
  if (!t)
2750
2759
  return;
@@ -2754,8 +2763,8 @@ function fr(t) {
2754
2763
  }
2755
2764
  const e = {};
2756
2765
  for (let n = 0; n < Ll; n++) {
2757
- const i = An[n], s = t.props[i];
2758
- (Ot(s) || s === !1) && (e[i] = s);
2766
+ const i = Vn[n], s = t.props[i];
2767
+ (jt(s) || s === !1) && (e[i] = s);
2759
2768
  }
2760
2769
  return e;
2761
2770
  }
@@ -2770,12 +2779,12 @@ function dr(t, e) {
2770
2779
  return !1;
2771
2780
  return !0;
2772
2781
  }
2773
- const kl = [...Pn].reverse(), Fl = Pn.length;
2782
+ const kl = [...An].reverse(), Fl = An.length;
2774
2783
  function Il(t) {
2775
2784
  return (e) => Promise.all(e.map(({ animation: n, options: i }) => za(t, n, i)));
2776
2785
  }
2777
2786
  function Bl(t) {
2778
- let e = Il(t), n = ui(), i = !0;
2787
+ let e = Il(t), n = hi(), i = !0;
2779
2788
  const s = (l) => (u, c) => {
2780
2789
  var f;
2781
2790
  const h = Tt(t, c, l === "exit" ? (f = t.presenceContext) == null ? void 0 : f.custom : void 0);
@@ -2791,64 +2800,64 @@ function Bl(t) {
2791
2800
  function r(l) {
2792
2801
  const { props: u } = t, c = fr(t.parent) || {}, h = [], f = /* @__PURE__ */ new Set();
2793
2802
  let d = {}, m = 1 / 0;
2794
- for (let v = 0; v < Fl; v++) {
2795
- const g = kl[v], T = n[g], y = u[g] !== void 0 ? u[g] : c[g], S = Ot(y), b = g === l ? T.isActive : null;
2796
- b === !1 && (m = v);
2797
- let A = y === c[g] && y !== u[g] && S;
2803
+ for (let y = 0; y < Fl; y++) {
2804
+ const g = kl[y], T = n[g], v = u[g] !== void 0 ? u[g] : c[g], S = jt(v), w = g === l ? T.isActive : null;
2805
+ w === !1 && (m = y);
2806
+ let A = v === c[g] && v !== u[g] && S;
2798
2807
  if (A && i && t.manuallyAnimateOnMount && (A = !1), T.protectedKeys = { ...d }, // If it isn't active and hasn't *just* been set as inactive
2799
- !T.isActive && b === null || // If we didn't and don't have any defined prop for this animation type
2800
- !y && !T.prevProp || // Or if the prop doesn't define an animation
2801
- oe(y) || typeof y == "boolean")
2808
+ !T.isActive && w === null || // If we didn't and don't have any defined prop for this animation type
2809
+ !v && !T.prevProp || // Or if the prop doesn't define an animation
2810
+ ae(v) || typeof v == "boolean")
2802
2811
  continue;
2803
- const P = Ol(T.prevProp, y);
2804
- let w = P || // If we're making this variant active, we want to always make it active
2812
+ const V = Ol(T.prevProp, v);
2813
+ let b = V || // If we're making this variant active, we want to always make it active
2805
2814
  g === l && T.isActive && !A && S || // If we removed a higher-priority variant (i is in reverse order)
2806
- v > m && S, M = !1;
2807
- const L = Array.isArray(y) ? y : [y];
2808
- let _ = L.reduce(s(g), {});
2809
- b === !1 && (_ = {});
2810
- const { prevResolvedValues: ft = {} } = T, ce = {
2811
- ...ft,
2812
- ..._
2815
+ y > m && S, P = !1;
2816
+ const R = Array.isArray(v) ? v : [v];
2817
+ let U = R.reduce(s(g), {});
2818
+ w === !1 && (U = {});
2819
+ const { prevResolvedValues: rt = {} } = T, Ct = {
2820
+ ...rt,
2821
+ ...U
2813
2822
  }, dt = (F) => {
2814
- w = !0, f.has(F) && (M = !0, f.delete(F)), T.needsAnimating[F] = !0;
2815
- const W = t.getValue(F);
2816
- W && (W.liveStyle = !1);
2823
+ b = !0, f.has(F) && (P = !0, f.delete(F)), T.needsAnimating[F] = !0;
2824
+ const $ = t.getValue(F);
2825
+ $ && ($.liveStyle = !1);
2817
2826
  };
2818
- for (const F in ce) {
2819
- const W = _[F], rt = ft[F];
2827
+ for (const F in Ct) {
2828
+ const $ = U[F], ot = rt[F];
2820
2829
  if (d.hasOwnProperty(F))
2821
2830
  continue;
2822
2831
  let mt = !1;
2823
- Ue(W) && Ue(rt) ? mt = !dr(W, rt) : mt = W !== rt, mt ? W != null ? dt(F) : f.add(F) : W !== void 0 && f.has(F) ? dt(F) : T.protectedKeys[F] = !0;
2832
+ We($) && We(ot) ? mt = !dr($, ot) : mt = $ !== ot, mt ? $ != null ? dt(F) : f.add(F) : $ !== void 0 && f.has(F) ? dt(F) : T.protectedKeys[F] = !0;
2824
2833
  }
2825
- T.prevProp = y, T.prevResolvedValues = _, T.isActive && (d = { ...d, ..._ }), i && t.blockInitialAnimation && (w = !1);
2826
- const Rn = A && P;
2827
- w && (!Rn || M) && h.push(...L.map((F) => {
2828
- const W = { type: g };
2829
- if (typeof F == "string" && i && !Rn && t.manuallyAnimateOnMount && t.parent) {
2830
- const { parent: rt } = t, mt = Tt(rt, F);
2831
- if (rt.enteringChildren && mt) {
2834
+ T.prevProp = v, T.prevResolvedValues = U, T.isActive && (d = { ...d, ...U }), i && t.blockInitialAnimation && (b = !1);
2835
+ const Ln = A && V;
2836
+ b && (!Ln || P) && h.push(...R.map((F) => {
2837
+ const $ = { type: g };
2838
+ if (typeof F == "string" && i && !Ln && t.manuallyAnimateOnMount && t.parent) {
2839
+ const { parent: ot } = t, mt = Tt(ot, F);
2840
+ if (ot.enteringChildren && mt) {
2832
2841
  const { delayChildren: Or } = mt.transition || {};
2833
- W.delay = Bs(rt.enteringChildren, t, Or);
2842
+ $.delay = Bs(ot.enteringChildren, t, Or);
2834
2843
  }
2835
2844
  }
2836
2845
  return {
2837
2846
  animation: F,
2838
- options: W
2847
+ options: $
2839
2848
  };
2840
2849
  }));
2841
2850
  }
2842
2851
  if (f.size) {
2843
- const v = {};
2852
+ const y = {};
2844
2853
  if (typeof u.initial != "boolean") {
2845
2854
  const g = Tt(t, Array.isArray(u.initial) ? u.initial[0] : u.initial);
2846
- g && g.transition && (v.transition = g.transition);
2855
+ g && g.transition && (y.transition = g.transition);
2847
2856
  }
2848
2857
  f.forEach((g) => {
2849
- const T = t.getBaseTarget(g), y = t.getValue(g);
2850
- y && (y.liveStyle = !0), v[g] = T ?? null;
2851
- }), h.push({ animation: v });
2858
+ const T = t.getBaseTarget(g), v = t.getValue(g);
2859
+ v && (v.liveStyle = !0), y[g] = T ?? null;
2860
+ }), h.push({ animation: y });
2852
2861
  }
2853
2862
  let p = !!h.length;
2854
2863
  return i && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (p = !1), i = !1, p ? e(h) : Promise.resolve();
@@ -2872,14 +2881,14 @@ function Bl(t) {
2872
2881
  setAnimateFunction: o,
2873
2882
  getState: () => n,
2874
2883
  reset: () => {
2875
- n = ui();
2884
+ n = hi();
2876
2885
  }
2877
2886
  };
2878
2887
  }
2879
2888
  function Ol(t, e) {
2880
2889
  return typeof e == "string" ? e !== t : Array.isArray(e) ? !dr(e, t) : !1;
2881
2890
  }
2882
- function ot(t = !1) {
2891
+ function at(t = !1) {
2883
2892
  return {
2884
2893
  isActive: t,
2885
2894
  protectedKeys: {},
@@ -2887,92 +2896,92 @@ function ot(t = !1) {
2887
2896
  prevResolvedValues: {}
2888
2897
  };
2889
2898
  }
2890
- function ui() {
2899
+ function hi() {
2891
2900
  return {
2892
- animate: ot(!0),
2893
- whileInView: ot(),
2894
- whileHover: ot(),
2895
- whileTap: ot(),
2896
- whileDrag: ot(),
2897
- whileFocus: ot(),
2898
- exit: ot()
2901
+ animate: at(!0),
2902
+ whileInView: at(),
2903
+ whileHover: at(),
2904
+ whileTap: at(),
2905
+ whileDrag: at(),
2906
+ whileFocus: at(),
2907
+ exit: at()
2899
2908
  };
2900
2909
  }
2901
- const mr = 1e-4, jl = 1 - mr, Nl = 1 + mr, pr = 0.01, Ul = 0 - pr, Wl = 0 + pr;
2910
+ function fi(t, e) {
2911
+ t.min = e.min, t.max = e.max;
2912
+ }
2913
+ function G(t, e) {
2914
+ fi(t.x, e.x), fi(t.y, e.y);
2915
+ }
2916
+ function di(t, e) {
2917
+ t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
2918
+ }
2919
+ const mr = 1e-4, jl = 1 - mr, Nl = 1 + mr, pr = 0.01, Wl = 0 - pr, Ul = 0 + pr;
2902
2920
  function N(t) {
2903
2921
  return t.max - t.min;
2904
2922
  }
2905
2923
  function $l(t, e, n) {
2906
2924
  return Math.abs(t - e) <= n;
2907
2925
  }
2908
- function hi(t, e, n, i = 0.5) {
2909
- t.origin = i, t.originPoint = E(e.min, e.max, t.origin), t.scale = N(n) / N(e), t.translate = E(n.min, n.max, t.origin) - t.originPoint, (t.scale >= jl && t.scale <= Nl || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Ul && t.translate <= Wl || isNaN(t.translate)) && (t.translate = 0);
2926
+ function mi(t, e, n, i = 0.5) {
2927
+ t.origin = i, t.originPoint = E(e.min, e.max, t.origin), t.scale = N(n) / N(e), t.translate = E(n.min, n.max, t.origin) - t.originPoint, (t.scale >= jl && t.scale <= Nl || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Wl && t.translate <= Ul || isNaN(t.translate)) && (t.translate = 0);
2910
2928
  }
2911
- function Rt(t, e, n, i) {
2912
- hi(t.x, e.x, n.x, i ? i.originX : void 0), hi(t.y, e.y, n.y, i ? i.originY : void 0);
2929
+ function Lt(t, e, n, i) {
2930
+ mi(t.x, e.x, n.x, i ? i.originX : void 0), mi(t.y, e.y, n.y, i ? i.originY : void 0);
2913
2931
  }
2914
- function fi(t, e, n) {
2932
+ function pi(t, e, n) {
2915
2933
  t.min = n.min + e.min, t.max = t.min + N(e);
2916
2934
  }
2917
2935
  function Kl(t, e, n) {
2918
- fi(t.x, e.x, n.x), fi(t.y, e.y, n.y);
2936
+ pi(t.x, e.x, n.x), pi(t.y, e.y, n.y);
2919
2937
  }
2920
- function di(t, e, n) {
2938
+ function gi(t, e, n) {
2921
2939
  t.min = e.min - n.min, t.max = t.min + N(e);
2922
2940
  }
2923
- function ne(t, e, n) {
2924
- di(t.x, e.x, n.x), di(t.y, e.y, n.y);
2941
+ function ie(t, e, n) {
2942
+ gi(t.x, e.x, n.x), gi(t.y, e.y, n.y);
2925
2943
  }
2926
- function mi(t, e, n, i, s) {
2927
- return t -= e, t = ee(t, 1 / n, i), s !== void 0 && (t = ee(t, 1 / s, i)), t;
2944
+ function yi(t, e, n, i, s) {
2945
+ return t -= e, t = ne(t, 1 / n, i), s !== void 0 && (t = ne(t, 1 / s, i)), t;
2928
2946
  }
2929
2947
  function zl(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
2930
2948
  if (Y.test(e) && (e = parseFloat(e), e = E(r.min, r.max, e / 100) - r.min), typeof e != "number")
2931
2949
  return;
2932
2950
  let a = E(o.min, o.max, i);
2933
- t === o && (a -= e), t.min = mi(t.min, e, n, a, s), t.max = mi(t.max, e, n, a, s);
2951
+ t === o && (a -= e), t.min = yi(t.min, e, n, a, s), t.max = yi(t.max, e, n, a, s);
2934
2952
  }
2935
- function pi(t, e, [n, i, s], o, r) {
2953
+ function vi(t, e, [n, i, s], o, r) {
2936
2954
  zl(t, e[n], e[i], e[s], e.scale, o, r);
2937
2955
  }
2938
2956
  const _l = ["x", "scaleX", "originX"], Gl = ["y", "scaleY", "originY"];
2939
- function gi(t, e, n, i) {
2940
- pi(t.x, e, _l, n ? n.x : void 0, i ? i.x : void 0), pi(t.y, e, Gl, n ? n.y : void 0, i ? i.y : void 0);
2957
+ function xi(t, e, n, i) {
2958
+ vi(t.x, e, _l, n ? n.x : void 0, i ? i.x : void 0), vi(t.y, e, Gl, n ? n.y : void 0, i ? i.y : void 0);
2941
2959
  }
2942
- function yi(t, e) {
2943
- t.min = e.min, t.max = e.max;
2944
- }
2945
- function G(t, e) {
2946
- yi(t.x, e.x), yi(t.y, e.y);
2947
- }
2948
- function vi(t, e) {
2949
- t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
2950
- }
2951
- function xi(t) {
2960
+ function Ti(t) {
2952
2961
  return t.translate === 0 && t.scale === 1;
2953
2962
  }
2954
2963
  function gr(t) {
2955
- return xi(t.x) && xi(t.y);
2964
+ return Ti(t.x) && Ti(t.y);
2956
2965
  }
2957
- function Ti(t, e) {
2966
+ function wi(t, e) {
2958
2967
  return t.min === e.min && t.max === e.max;
2959
2968
  }
2960
2969
  function Hl(t, e) {
2961
- return Ti(t.x, e.x) && Ti(t.y, e.y);
2970
+ return wi(t.x, e.x) && wi(t.y, e.y);
2962
2971
  }
2963
- function wi(t, e) {
2972
+ function bi(t, e) {
2964
2973
  return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
2965
2974
  }
2966
2975
  function yr(t, e) {
2967
- return wi(t.x, e.x) && wi(t.y, e.y);
2976
+ return bi(t.x, e.x) && bi(t.y, e.y);
2968
2977
  }
2969
- function bi(t) {
2978
+ function Si(t) {
2970
2979
  return N(t.x) / N(t.y);
2971
2980
  }
2972
- function Si(t, e) {
2981
+ function Pi(t, e) {
2973
2982
  return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
2974
2983
  }
2975
- function $(t) {
2984
+ function K(t) {
2976
2985
  return [t("x"), t("y")];
2977
2986
  }
2978
2987
  function Xl(t, e, n) {
@@ -2985,66 +2994,66 @@ function Xl(t, e, n) {
2985
2994
  const a = t.x.scale * e.x, l = t.y.scale * e.y;
2986
2995
  return (a !== 1 || l !== 1) && (i += `scale(${a}, ${l})`), i || "none";
2987
2996
  }
2988
- const vr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Yl = vr.length, Pi = (t) => typeof t == "string" ? parseFloat(t) : t, Ai = (t) => typeof t == "number" || x.test(t);
2997
+ const vr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Yl = vr.length, Ai = (t) => typeof t == "string" ? parseFloat(t) : t, Vi = (t) => typeof t == "number" || x.test(t);
2989
2998
  function ql(t, e, n, i, s, o) {
2990
2999
  s ? (t.opacity = E(0, n.opacity ?? 1, Zl(i)), t.opacityExit = E(e.opacity ?? 1, 0, Jl(i))) : o && (t.opacity = E(e.opacity ?? 1, n.opacity ?? 1, i));
2991
3000
  for (let r = 0; r < Yl; r++) {
2992
3001
  const a = `border${vr[r]}Radius`;
2993
- let l = Vi(e, a), u = Vi(n, a);
3002
+ let l = Ci(e, a), u = Ci(n, a);
2994
3003
  if (l === void 0 && u === void 0)
2995
3004
  continue;
2996
- l || (l = 0), u || (u = 0), l === 0 || u === 0 || Ai(l) === Ai(u) ? (t[a] = Math.max(E(Pi(l), Pi(u), i), 0), (Y.test(u) || Y.test(l)) && (t[a] += "%")) : t[a] = u;
3005
+ l || (l = 0), u || (u = 0), l === 0 || u === 0 || Vi(l) === Vi(u) ? (t[a] = Math.max(E(Ai(l), Ai(u), i), 0), (Y.test(u) || Y.test(l)) && (t[a] += "%")) : t[a] = u;
2997
3006
  }
2998
3007
  (e.rotate || n.rotate) && (t.rotate = E(e.rotate || 0, n.rotate || 0, i));
2999
3008
  }
3000
- function Vi(t, e) {
3009
+ function Ci(t, e) {
3001
3010
  return t[e] !== void 0 ? t[e] : t.borderRadius;
3002
3011
  }
3003
- const Zl = /* @__PURE__ */ xr(0, 0.5, fs), Jl = /* @__PURE__ */ xr(0.5, 0.95, z);
3012
+ const Zl = /* @__PURE__ */ xr(0, 0.5, ds), Jl = /* @__PURE__ */ xr(0.5, 0.95, _);
3004
3013
  function xr(t, e, n) {
3005
- return (i) => i < t ? 0 : i > e ? 1 : n(/* @__PURE__ */ Ft(t, e, i));
3014
+ return (i) => i < t ? 0 : i > e ? 1 : n(/* @__PURE__ */ It(t, e, i));
3006
3015
  }
3007
- function Ql(t, e) {
3008
- const n = j.now(), i = ({ timestamp: s }) => {
3009
- const o = s - n;
3010
- o >= e && (nt(i), t(o - e));
3011
- };
3012
- return V.setup(i, !0), () => nt(i);
3016
+ function Ql(t, e, n) {
3017
+ const i = O(t) ? t : wt(t);
3018
+ return i.start(xn("", i, e, n)), i.animation;
3013
3019
  }
3014
- function jt(t, e, n, i = { passive: !0 }) {
3020
+ function Nt(t, e, n, i = { passive: !0 }) {
3015
3021
  return t.addEventListener(e, n, i), () => t.removeEventListener(e, n);
3016
3022
  }
3017
- function Yt(t) {
3018
- return O(t) ? t.get() : t;
3019
- }
3020
- function tc(t, e, n) {
3021
- const i = O(t) ? t : wt(t);
3022
- return i.start(vn("", i, e, n)), i.animation;
3023
- }
3024
- const ec = (t, e) => t.depth - e.depth;
3025
- class nc {
3023
+ const tc = (t, e) => t.depth - e.depth;
3024
+ class ec {
3026
3025
  constructor() {
3027
3026
  this.children = [], this.isDirty = !1;
3028
3027
  }
3029
3028
  add(e) {
3030
- tn(this.children, e), this.isDirty = !0;
3029
+ en(this.children, e), this.isDirty = !0;
3031
3030
  }
3032
3031
  remove(e) {
3033
- en(this.children, e), this.isDirty = !0;
3032
+ nn(this.children, e), this.isDirty = !0;
3034
3033
  }
3035
3034
  forEach(e) {
3036
- this.isDirty && this.children.sort(ec), this.isDirty = !1, this.children.forEach(e);
3035
+ this.isDirty && this.children.sort(tc), this.isDirty = !1, this.children.forEach(e);
3037
3036
  }
3038
3037
  }
3038
+ function nc(t, e) {
3039
+ const n = j.now(), i = ({ timestamp: s }) => {
3040
+ const o = s - n;
3041
+ o >= e && (nt(i), t(o - e));
3042
+ };
3043
+ return C.setup(i, !0), () => nt(i);
3044
+ }
3045
+ function qt(t) {
3046
+ return O(t) ? t.get() : t;
3047
+ }
3039
3048
  class ic {
3040
3049
  constructor() {
3041
3050
  this.members = [];
3042
3051
  }
3043
3052
  add(e) {
3044
- tn(this.members, e), e.scheduleRender();
3053
+ en(this.members, e), e.scheduleRender();
3045
3054
  }
3046
3055
  remove(e) {
3047
- if (en(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
3056
+ if (nn(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
3048
3057
  const n = this.members[this.members.length - 1];
3049
3058
  n && this.promote(n);
3050
3059
  }
@@ -3090,7 +3099,7 @@ class ic {
3090
3099
  this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
3091
3100
  }
3092
3101
  }
3093
- const qt = {
3102
+ const Zt = {
3094
3103
  /**
3095
3104
  * Global flag as to whether the tree has animated since the last time
3096
3105
  * we resized the window
@@ -3113,10 +3122,10 @@ function Tr(t) {
3113
3122
  const { visualElement: e } = t.options;
3114
3123
  if (!e)
3115
3124
  return;
3116
- const n = Ns(e);
3125
+ const n = Ws(e);
3117
3126
  if (window.MotionHasOptimisedAnimation(n, "transform")) {
3118
3127
  const { layout: s, layoutId: o } = t.options;
3119
- window.MotionCancelOptimisedAnimation(n, "transform", V, !(s || o));
3128
+ window.MotionCancelOptimisedAnimation(n, "transform", C, !(s || o));
3120
3129
  }
3121
3130
  const { parent: i } = t;
3122
3131
  i && !i.hasCheckedOptimisedAppear && Tr(i);
@@ -3131,10 +3140,10 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3131
3140
  }, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
3132
3141
  for (let l = 0; l < this.path.length; l++)
3133
3142
  this.path[l].shouldResetTransform = !0;
3134
- this.root === this && (this.nodes = new nc());
3143
+ this.root === this && (this.nodes = new ec());
3135
3144
  }
3136
3145
  addEventListener(r, a) {
3137
- return this.eventHandlers.has(r) || this.eventHandlers.set(r, new sn()), this.eventHandlers.get(r).add(a);
3146
+ return this.eventHandlers.has(r) || this.eventHandlers.set(r, new rn()), this.eventHandlers.get(r).add(a);
3138
3147
  }
3139
3148
  notifyListeners(r, ...a) {
3140
3149
  const l = this.eventHandlers.get(r);
@@ -3154,11 +3163,11 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3154
3163
  if (u && !u.current && u.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
3155
3164
  let c, h = 0;
3156
3165
  const f = () => this.root.updateBlockedByResize = !1;
3157
- V.read(() => {
3166
+ C.read(() => {
3158
3167
  h = window.innerWidth;
3159
3168
  }), t(r, () => {
3160
3169
  const d = window.innerWidth;
3161
- d !== h && (h = d, this.root.updateBlockedByResize = !0, c && c(), c = Ql(f, 250), qt.hasAnimatedSinceResize && (qt.hasAnimatedSinceResize = !1, this.nodes.forEach(Di)));
3170
+ d !== h && (h = d, this.root.updateBlockedByResize = !0, c && c(), c = nc(f, 250), Zt.hasAnimatedSinceResize && (Zt.hasAnimatedSinceResize = !1, this.nodes.forEach(Ei)));
3162
3171
  });
3163
3172
  }
3164
3173
  a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a || l) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: d }) => {
@@ -3166,17 +3175,17 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3166
3175
  this.target = void 0, this.relativeTarget = void 0;
3167
3176
  return;
3168
3177
  }
3169
- const m = this.options.transition || u.getDefaultTransition() || vc, { onLayoutAnimationStart: p, onLayoutAnimationComplete: v } = u.getProps(), g = !this.targetLayout || !yr(this.targetLayout, d), T = !h && f;
3178
+ const m = this.options.transition || u.getDefaultTransition() || vc, { onLayoutAnimationStart: p, onLayoutAnimationComplete: y } = u.getProps(), g = !this.targetLayout || !yr(this.targetLayout, d), T = !h && f;
3170
3179
  if (this.options.layoutRoot || this.resumeFrom || T || h && (g || !this.currentAnimation)) {
3171
3180
  this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
3172
- const y = {
3173
- ...yn(m, "layout"),
3181
+ const v = {
3182
+ ...vn(m, "layout"),
3174
3183
  onPlay: p,
3175
- onComplete: v
3184
+ onComplete: y
3176
3185
  };
3177
- (u.shouldReduceMotion || this.options.layoutRoot) && (y.delay = 0, y.type = !1), this.startAnimation(y), this.setAnimationOrigin(c, T);
3186
+ (u.shouldReduceMotion || this.options.layoutRoot) && (v.delay = 0, v.type = !1), this.startAnimation(v), this.setAnimationOrigin(c, T);
3178
3187
  } else
3179
- h || Di(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
3188
+ h || Ei(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
3180
3189
  this.targetLayout = d;
3181
3190
  });
3182
3191
  }
@@ -3230,24 +3239,24 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3230
3239
  return;
3231
3240
  }
3232
3241
  if (this.animationId <= this.animationCommitId) {
3233
- this.nodes.forEach(Ci);
3242
+ this.nodes.forEach(Di);
3234
3243
  return;
3235
3244
  }
3236
- this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(hc), this.nodes.forEach(oc), this.nodes.forEach(ac)) : this.nodes.forEach(Ci), this.clearAllSnapshots();
3245
+ this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(hc), this.nodes.forEach(oc), this.nodes.forEach(ac)) : this.nodes.forEach(Di), this.clearAllSnapshots();
3237
3246
  const a = j.now();
3238
3247
  I.delta = q(0, 1e3 / 60, a - I.timestamp), I.timestamp = a, I.isProcessing = !0, ue.update.process(I), ue.preRender.process(I), ue.render.process(I), I.isProcessing = !1;
3239
3248
  }
3240
3249
  didUpdate() {
3241
- this.updateScheduled || (this.updateScheduled = !0, bn.read(this.scheduleUpdate));
3250
+ this.updateScheduled || (this.updateScheduled = !0, Sn.read(this.scheduleUpdate));
3242
3251
  }
3243
3252
  clearAllSnapshots() {
3244
3253
  this.nodes.forEach(uc), this.sharedNodes.forEach(pc);
3245
3254
  }
3246
3255
  scheduleUpdateProjection() {
3247
- this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, V.preRender(this.updateProjection, !1, !0));
3256
+ this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, C.preRender(this.updateProjection, !1, !0));
3248
3257
  }
3249
3258
  scheduleCheckAfterUnmount() {
3250
- V.postRender(() => {
3259
+ C.postRender(() => {
3251
3260
  this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
3252
3261
  });
3253
3262
  }
@@ -3285,7 +3294,7 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3285
3294
  if (!s)
3286
3295
  return;
3287
3296
  const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !gr(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
3288
- r && this.instance && (a || at(this.latestValues) || c) && (s(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
3297
+ r && this.instance && (a || lt(this.latestValues) || c) && (s(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
3289
3298
  }
3290
3299
  measure(r = !0) {
3291
3300
  const a = this.measurePageBox();
@@ -3329,22 +3338,22 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3329
3338
  !a && c.options.layoutScroll && c.scroll && c !== c.root && xt(l, {
3330
3339
  x: -c.scroll.offset.x,
3331
3340
  y: -c.scroll.offset.y
3332
- }), at(c.latestValues) && xt(l, c.latestValues);
3341
+ }), lt(c.latestValues) && xt(l, c.latestValues);
3333
3342
  }
3334
- return at(this.latestValues) && xt(l, this.latestValues), l;
3343
+ return lt(this.latestValues) && xt(l, this.latestValues), l;
3335
3344
  }
3336
3345
  removeTransform(r) {
3337
3346
  const a = k();
3338
3347
  G(a, r);
3339
3348
  for (let l = 0; l < this.path.length; l++) {
3340
3349
  const u = this.path[l];
3341
- if (!u.instance || !at(u.latestValues))
3350
+ if (!u.instance || !lt(u.latestValues))
3342
3351
  continue;
3343
- _e(u.latestValues) && u.updateSnapshot();
3352
+ Ge(u.latestValues) && u.updateSnapshot();
3344
3353
  const c = k(), h = u.measurePageBox();
3345
- G(c, h), gi(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
3354
+ G(c, h), xi(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
3346
3355
  }
3347
- return at(this.latestValues) && gi(a, this.latestValues), a;
3356
+ return lt(this.latestValues) && xi(a, this.latestValues), a;
3348
3357
  }
3349
3358
  setTargetDelta(r) {
3350
3359
  this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
@@ -3377,14 +3386,14 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3377
3386
  f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = k(), this.targetWithTransforms = k()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Kl(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : G(this.target, this.layout.layoutBox), sr(this.target, this.targetDelta)) : G(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
3378
3387
  }
3379
3388
  getClosestProjectingParent() {
3380
- if (!(!this.parent || _e(this.parent.latestValues) || ir(this.parent.latestValues)))
3389
+ if (!(!this.parent || Ge(this.parent.latestValues) || ir(this.parent.latestValues)))
3381
3390
  return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
3382
3391
  }
3383
3392
  isProjecting() {
3384
3393
  return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
3385
3394
  }
3386
3395
  createRelativeTarget(r, a, l) {
3387
- this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = k(), this.relativeTargetOrigin = k(), ne(this.relativeTargetOrigin, a, l), G(this.relativeTarget, this.relativeTargetOrigin);
3396
+ this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = k(), this.relativeTargetOrigin = k(), ie(this.relativeTargetOrigin, a, l), G(this.relativeTarget, this.relativeTargetOrigin);
3388
3397
  }
3389
3398
  removeRelativeTarget() {
3390
3399
  this.relativeParent = this.relativeTarget = void 0;
@@ -3406,7 +3415,7 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3406
3415
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
3407
3416
  return;
3408
3417
  }
3409
- !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (vi(this.prevProjectionDelta.x, this.projectionDelta.x), vi(this.prevProjectionDelta.y, this.projectionDelta.y)), Rt(this.projectionDelta, this.layoutCorrected, d, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== f || !Si(this.projectionDelta.x, this.prevProjectionDelta.x) || !Si(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", d));
3418
+ !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (di(this.prevProjectionDelta.x, this.projectionDelta.x), di(this.prevProjectionDelta.y, this.projectionDelta.y)), Lt(this.projectionDelta, this.layoutCorrected, d, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== f || !Pi(this.projectionDelta.x, this.prevProjectionDelta.x) || !Pi(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", d));
3410
3419
  }
3411
3420
  hide() {
3412
3421
  this.isVisible = !1;
@@ -3428,18 +3437,18 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3428
3437
  setAnimationOrigin(r, a = !1) {
3429
3438
  const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, h = yt();
3430
3439
  (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
3431
- const f = k(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, p = d !== m, v = this.getStack(), g = !v || v.members.length <= 1, T = !!(p && !g && this.options.crossfade === !0 && !this.path.some(yc));
3440
+ const f = k(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, p = d !== m, y = this.getStack(), g = !y || y.members.length <= 1, T = !!(p && !g && this.options.crossfade === !0 && !this.path.some(yc));
3432
3441
  this.animationProgress = 0;
3433
- let y;
3442
+ let v;
3434
3443
  this.mixTargetDelta = (S) => {
3435
- const b = S / 1e3;
3436
- Ei(h.x, r.x, b), Ei(h.y, r.y, b), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ne(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), gc(this.relativeTarget, this.relativeTargetOrigin, f, b), y && Hl(this.relativeTarget, y) && (this.isProjectionDirty = !1), y || (y = k()), G(y, this.relativeTarget)), p && (this.animationValues = c, ql(c, u, this.latestValues, b, T, g)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = b;
3444
+ const w = S / 1e3;
3445
+ Ri(h.x, r.x, w), Ri(h.y, r.y, w), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ie(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), gc(this.relativeTarget, this.relativeTargetOrigin, f, w), v && Hl(this.relativeTarget, v) && (this.isProjectionDirty = !1), v || (v = k()), G(v, this.relativeTarget)), p && (this.animationValues = c, ql(c, u, this.latestValues, w, T, g)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = w;
3437
3446
  }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
3438
3447
  }
3439
3448
  startAnimation(r) {
3440
3449
  var a, l, u;
3441
- this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (u = (l = this.resumingFrom) == null ? void 0 : l.currentAnimation) == null || u.stop(), this.pendingAnimation && (nt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = V.update(() => {
3442
- qt.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = wt(0)), this.currentAnimation = tc(this.motionValue, [0, 1e3], {
3450
+ this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (u = (l = this.resumingFrom) == null ? void 0 : l.currentAnimation) == null || u.stop(), this.pendingAnimation && (nt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = C.update(() => {
3451
+ Zt.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = wt(0)), this.currentAnimation = Ql(this.motionValue, [0, 1e3], {
3443
3452
  ...r,
3444
3453
  velocity: 0,
3445
3454
  isSync: !0,
@@ -3473,7 +3482,7 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3473
3482
  const f = N(this.layout.layoutBox.y);
3474
3483
  l.y.min = r.target.y.min, l.y.max = l.y.min + f;
3475
3484
  }
3476
- G(a, l), xt(a, c), Rt(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
3485
+ G(a, l), xt(a, c), Lt(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
3477
3486
  }
3478
3487
  }
3479
3488
  registerSharedNode(r, a) {
@@ -3537,12 +3546,12 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3537
3546
  }
3538
3547
  const l = this.getTransformTemplate();
3539
3548
  if (this.needsReset) {
3540
- this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = Yt(a == null ? void 0 : a.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
3549
+ this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = qt(a == null ? void 0 : a.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
3541
3550
  return;
3542
3551
  }
3543
3552
  const u = this.getLead();
3544
3553
  if (!this.projectionDelta || !this.layout || !u.target) {
3545
- this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = Yt(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !at(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
3554
+ this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = qt(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !lt(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
3546
3555
  return;
3547
3556
  }
3548
3557
  r.visibility = "";
@@ -3552,18 +3561,18 @@ function wr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3552
3561
  l && (h = l(c, h)), r.transform = h;
3553
3562
  const { x: f, y: d } = this.projectionDelta;
3554
3563
  r.transformOrigin = `${f.origin * 100}% ${d.origin * 100}% 0`, u.animationValues ? r.opacity = u === this ? c.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : c.opacityExit : r.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
3555
- for (const m in He) {
3564
+ for (const m in Xe) {
3556
3565
  if (c[m] === void 0)
3557
3566
  continue;
3558
- const { correct: p, applyTo: v, isCSSVariable: g } = He[m], T = h === "none" ? c[m] : p(c[m], u);
3559
- if (v) {
3560
- const y = v.length;
3561
- for (let S = 0; S < y; S++)
3562
- r[v[S]] = T;
3567
+ const { correct: p, applyTo: y, isCSSVariable: g } = Xe[m], T = h === "none" ? c[m] : p(c[m], u);
3568
+ if (y) {
3569
+ const v = y.length;
3570
+ for (let S = 0; S < v; S++)
3571
+ r[y[S]] = T;
3563
3572
  } else
3564
3573
  g ? this.options.visualElement.renderState.vars[m] = T : r[m] = T;
3565
3574
  }
3566
- this.options.layoutId && (r.pointerEvents = u === this ? Yt(a == null ? void 0 : a.pointerEvents) || "" : "none");
3575
+ this.options.layoutId && (r.pointerEvents = u === this ? qt(a == null ? void 0 : a.pointerEvents) || "" : "none");
3567
3576
  }
3568
3577
  clearSnapshot() {
3569
3578
  this.resumeFrom = this.snapshot = void 0;
@@ -3585,17 +3594,17 @@ function ac(t) {
3585
3594
  const e = ((n = t.resumeFrom) == null ? void 0 : n.snapshot) || t.snapshot;
3586
3595
  if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
3587
3596
  const { layoutBox: i, measuredBox: s } = t.layout, { animationType: o } = t.options, r = e.source !== t.layout.source;
3588
- o === "size" ? $((h) => {
3597
+ o === "size" ? K((h) => {
3589
3598
  const f = r ? e.measuredBox[h] : e.layoutBox[h], d = N(f);
3590
3599
  f.min = i[h].min, f.max = f.min + d;
3591
- }) : br(o, e.layoutBox, i) && $((h) => {
3600
+ }) : br(o, e.layoutBox, i) && K((h) => {
3592
3601
  const f = r ? e.measuredBox[h] : e.layoutBox[h], d = N(i[h]);
3593
3602
  f.max = f.min + d, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + d);
3594
3603
  });
3595
3604
  const a = yt();
3596
- Rt(a, i, e.layoutBox);
3605
+ Lt(a, i, e.layoutBox);
3597
3606
  const l = yt();
3598
- r ? Rt(l, t.applyTransform(s, !0), e.measuredBox) : Rt(l, i, e.layoutBox);
3607
+ r ? Lt(l, t.applyTransform(s, !0), e.measuredBox) : Lt(l, i, e.layoutBox);
3599
3608
  const u = !gr(a);
3600
3609
  let c = !1;
3601
3610
  if (!t.resumeFrom) {
@@ -3604,9 +3613,9 @@ function ac(t) {
3604
3613
  const { snapshot: f, layout: d } = h;
3605
3614
  if (f && d) {
3606
3615
  const m = k();
3607
- ne(m, e.layoutBox, f.layoutBox);
3616
+ ie(m, e.layoutBox, f.layoutBox);
3608
3617
  const p = k();
3609
- ne(p, i, d.layoutBox), yr(m, p) || (c = !0), h.options.layoutRoot && (t.relativeTarget = p, t.relativeTargetOrigin = m, t.relativeParent = h);
3618
+ ie(p, i, d.layoutBox), yr(m, p) || (c = !0), h.options.layoutRoot && (t.relativeTarget = p, t.relativeTargetOrigin = m, t.relativeParent = h);
3610
3619
  }
3611
3620
  }
3612
3621
  }
@@ -3636,14 +3645,14 @@ function uc(t) {
3636
3645
  function Mi(t) {
3637
3646
  t.clearMeasurements();
3638
3647
  }
3639
- function Ci(t) {
3648
+ function Di(t) {
3640
3649
  t.isLayoutDirty = !1;
3641
3650
  }
3642
3651
  function hc(t) {
3643
3652
  const { visualElement: e } = t.options;
3644
3653
  e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
3645
3654
  }
3646
- function Di(t) {
3655
+ function Ei(t) {
3647
3656
  t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
3648
3657
  }
3649
3658
  function fc(t) {
@@ -3658,14 +3667,14 @@ function mc(t) {
3658
3667
  function pc(t) {
3659
3668
  t.removeLeadSnapshot();
3660
3669
  }
3661
- function Ei(t, e, n) {
3670
+ function Ri(t, e, n) {
3662
3671
  t.translate = E(e.translate, 0, n), t.scale = E(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
3663
3672
  }
3664
- function Ri(t, e, n, i) {
3673
+ function Li(t, e, n, i) {
3665
3674
  t.min = E(e.min, n.min, i), t.max = E(e.max, n.max, i);
3666
3675
  }
3667
3676
  function gc(t, e, n, i) {
3668
- Ri(t.x, e.x, n.x, i), Ri(t.y, e.y, n.y, i);
3677
+ Li(t.x, e.x, n.x, i), Li(t.y, e.y, n.y, i);
3669
3678
  }
3670
3679
  function yc(t) {
3671
3680
  return t.animationValues && t.animationValues.opacityExit !== void 0;
@@ -3673,26 +3682,29 @@ function yc(t) {
3673
3682
  const vc = {
3674
3683
  duration: 0.45,
3675
3684
  ease: [0.4, 0, 0.1, 1]
3676
- }, Li = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), ki = Li("applewebkit/") && !Li("chrome/") ? Math.round : z;
3677
- function Fi(t) {
3678
- t.min = ki(t.min), t.max = ki(t.max);
3685
+ }, ki = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Fi = ki("applewebkit/") && !ki("chrome/") ? Math.round : _;
3686
+ function Ii(t) {
3687
+ t.min = Fi(t.min), t.max = Fi(t.max);
3679
3688
  }
3680
3689
  function xc(t) {
3681
- Fi(t.x), Fi(t.y);
3690
+ Ii(t.x), Ii(t.y);
3682
3691
  }
3683
3692
  function br(t, e, n) {
3684
- return t === "position" || t === "preserve-aspect" && !$l(bi(e), bi(n), 0.2);
3693
+ return t === "position" || t === "preserve-aspect" && !$l(Si(e), Si(n), 0.2);
3685
3694
  }
3686
3695
  function Tc(t) {
3687
3696
  var e;
3688
3697
  return t !== t.root && ((e = t.scroll) == null ? void 0 : e.wasRoot);
3689
3698
  }
3690
3699
  const wc = wr({
3691
- attachResizeListener: (t, e) => jt(t, "resize", e),
3692
- measureScroll: () => ({
3693
- x: document.documentElement.scrollLeft || document.body.scrollLeft,
3694
- y: document.documentElement.scrollTop || document.body.scrollTop
3695
- }),
3700
+ attachResizeListener: (t, e) => Nt(t, "resize", e),
3701
+ measureScroll: () => {
3702
+ var t, e;
3703
+ return {
3704
+ x: document.documentElement.scrollLeft || ((t = document.body) == null ? void 0 : t.scrollLeft) || 0,
3705
+ y: document.documentElement.scrollTop || ((e = document.body) == null ? void 0 : e.scrollTop) || 0
3706
+ };
3707
+ },
3696
3708
  checkIsScrollRoot: () => !0
3697
3709
  }), Te = {
3698
3710
  current: void 0
@@ -3712,12 +3724,12 @@ const wc = wr({
3712
3724
  t.style.transform = e !== void 0 ? e : "none";
3713
3725
  },
3714
3726
  checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
3715
- }), Cn = bt({
3727
+ }), Dn = bt({
3716
3728
  transformPagePoint: (t) => t,
3717
3729
  isStatic: !1,
3718
3730
  reducedMotion: "never"
3719
3731
  });
3720
- function Ii(t, e) {
3732
+ function Bi(t, e) {
3721
3733
  if (typeof t == "function")
3722
3734
  return t(e);
3723
3735
  t != null && (t.current = e);
@@ -3726,27 +3738,27 @@ function bc(...t) {
3726
3738
  return (e) => {
3727
3739
  let n = !1;
3728
3740
  const i = t.map((s) => {
3729
- const o = Ii(s, e);
3741
+ const o = Bi(s, e);
3730
3742
  return !n && typeof o == "function" && (n = !0), o;
3731
3743
  });
3732
3744
  if (n)
3733
3745
  return () => {
3734
3746
  for (let s = 0; s < i.length; s++) {
3735
3747
  const o = i[s];
3736
- typeof o == "function" ? o() : Ii(t[s], null);
3748
+ typeof o == "function" ? o() : Bi(t[s], null);
3737
3749
  }
3738
3750
  };
3739
3751
  };
3740
3752
  }
3741
3753
  function Sc(...t) {
3742
- return se.useCallback(bc(...t), t);
3754
+ return re.useCallback(bc(...t), t);
3743
3755
  }
3744
- class Pc extends se.Component {
3756
+ class Pc extends re.Component {
3745
3757
  getSnapshotBeforeUpdate(e) {
3746
3758
  const n = this.props.childRef.current;
3747
3759
  if (n && e.isPresent && !this.props.isPresent) {
3748
- const i = n.offsetParent, s = Gs(i) && i.offsetWidth || 0, o = this.props.sizeRef.current;
3749
- o.height = n.offsetHeight || 0, o.width = n.offsetWidth || 0, o.top = n.offsetTop, o.left = n.offsetLeft, o.right = s - o.width - o.left;
3760
+ const i = n.offsetParent, s = ze(i) && i.offsetWidth || 0, o = ze(i) && i.offsetHeight || 0, r = this.props.sizeRef.current;
3761
+ r.height = n.offsetHeight || 0, r.width = n.offsetWidth || 0, r.top = n.offsetTop, r.left = n.offsetLeft, r.right = s - r.width - r.left, r.bottom = o - r.height - r.top;
3750
3762
  }
3751
3763
  return null;
3752
3764
  }
@@ -3759,117 +3771,118 @@ class Pc extends se.Component {
3759
3771
  return this.props.children;
3760
3772
  }
3761
3773
  }
3762
- function Ac({ children: t, isPresent: e, anchorX: n, root: i }) {
3763
- var c;
3764
- const s = qe(), o = U(null), r = U({
3774
+ function Ac({ children: t, isPresent: e, anchorX: n, anchorY: i, root: s }) {
3775
+ var h;
3776
+ const o = Ze(), r = W(null), a = W({
3765
3777
  width: 0,
3766
3778
  height: 0,
3767
3779
  top: 0,
3768
3780
  left: 0,
3769
- right: 0
3770
- }), { nonce: a } = B(Cn), l = ((c = t.props) == null ? void 0 : c.ref) ?? (t == null ? void 0 : t.ref), u = Sc(o, l);
3771
- return Ze(() => {
3772
- const { width: h, height: f, top: d, left: m, right: p } = r.current;
3773
- if (e || !o.current || !h || !f)
3781
+ right: 0,
3782
+ bottom: 0
3783
+ }), { nonce: l } = B(Dn), u = ((h = t.props) == null ? void 0 : h.ref) ?? (t == null ? void 0 : t.ref), c = Sc(r, u);
3784
+ return Je(() => {
3785
+ const { width: f, height: d, top: m, left: p, right: y, bottom: g } = a.current;
3786
+ if (e || !r.current || !f || !d)
3774
3787
  return;
3775
- const v = n === "left" ? `left: ${m}` : `right: ${p}`;
3776
- o.current.dataset.motionPopId = s;
3777
- const g = document.createElement("style");
3778
- a && (g.nonce = a);
3779
- const T = i ?? document.head;
3780
- return T.appendChild(g), g.sheet && g.sheet.insertRule(`
3781
- [data-motion-pop-id="${s}"] {
3788
+ const T = n === "left" ? `left: ${p}` : `right: ${y}`, v = i === "bottom" ? `bottom: ${g}` : `top: ${m}`;
3789
+ r.current.dataset.motionPopId = o;
3790
+ const S = document.createElement("style");
3791
+ l && (S.nonce = l);
3792
+ const w = s ?? document.head;
3793
+ return w.appendChild(S), S.sheet && S.sheet.insertRule(`
3794
+ [data-motion-pop-id="${o}"] {
3782
3795
  position: absolute !important;
3783
- width: ${h}px !important;
3784
- height: ${f}px !important;
3796
+ width: ${f}px !important;
3797
+ height: ${d}px !important;
3798
+ ${T}px !important;
3785
3799
  ${v}px !important;
3786
- top: ${d}px !important;
3787
3800
  }
3788
3801
  `), () => {
3789
- T.contains(g) && T.removeChild(g);
3802
+ w.contains(S) && w.removeChild(S);
3790
3803
  };
3791
- }, [e]), C(Pc, { isPresent: e, childRef: o, sizeRef: r, children: se.cloneElement(t, { ref: u }) });
3804
+ }, [e]), M(Pc, { isPresent: e, childRef: r, sizeRef: a, children: re.cloneElement(t, { ref: c }) });
3792
3805
  }
3793
- const Vc = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r, anchorX: a, root: l }) => {
3794
- const u = Qe(Mc), c = qe();
3795
- let h = !0, f = ht(() => (h = !1, {
3796
- id: c,
3806
+ const Vc = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r, anchorX: a, anchorY: l, root: u }) => {
3807
+ const c = tn(Cc), h = Ze();
3808
+ let f = !0, d = ft(() => (f = !1, {
3809
+ id: h,
3797
3810
  initial: e,
3798
3811
  isPresent: n,
3799
3812
  custom: s,
3800
- onExitComplete: (d) => {
3801
- u.set(d, !0);
3802
- for (const m of u.values())
3803
- if (!m)
3813
+ onExitComplete: (m) => {
3814
+ c.set(m, !0);
3815
+ for (const p of c.values())
3816
+ if (!p)
3804
3817
  return;
3805
3818
  i && i();
3806
3819
  },
3807
- register: (d) => (u.set(d, !1), () => u.delete(d))
3808
- }), [n, u, i]);
3809
- return o && h && (f = { ...f }), ht(() => {
3810
- u.forEach((d, m) => u.set(m, !1));
3811
- }, [n]), se.useEffect(() => {
3812
- !n && !u.size && i && i();
3813
- }, [n]), r === "popLayout" && (t = C(Ac, { isPresent: n, anchorX: a, root: l, children: t })), C(re.Provider, { value: f, children: t });
3820
+ register: (m) => (c.set(m, !1), () => c.delete(m))
3821
+ }), [n, c, i]);
3822
+ return o && f && (d = { ...d }), ft(() => {
3823
+ c.forEach((m, p) => c.set(p, !1));
3824
+ }, [n]), re.useEffect(() => {
3825
+ !n && !c.size && i && i();
3826
+ }, [n]), r === "popLayout" && (t = M(Ac, { isPresent: n, anchorX: a, anchorY: l, root: u, children: t })), M(oe.Provider, { value: d, children: t });
3814
3827
  };
3815
- function Mc() {
3828
+ function Cc() {
3816
3829
  return /* @__PURE__ */ new Map();
3817
3830
  }
3818
3831
  function Pr(t = !0) {
3819
- const e = B(re);
3832
+ const e = B(oe);
3820
3833
  if (e === null)
3821
3834
  return [!0, null];
3822
- const { isPresent: n, onExitComplete: i, register: s } = e, o = qe();
3823
- kt(() => {
3835
+ const { isPresent: n, onExitComplete: i, register: s } = e, o = Ze();
3836
+ Ft(() => {
3824
3837
  if (t)
3825
3838
  return s(o);
3826
3839
  }, [t]);
3827
- const r = Ji(() => t && i && i(o), [o, i, t]);
3840
+ const r = Qi(() => t && i && i(o), [o, i, t]);
3828
3841
  return !n && i ? [!1, r] : [!0];
3829
3842
  }
3830
- const _t = (t) => t.key || "";
3831
- function Bi(t) {
3843
+ const Gt = (t) => t.key || "";
3844
+ function Oi(t) {
3832
3845
  const e = [];
3833
- return Wr.forEach(t, (n) => {
3846
+ return Ur.forEach(t, (n) => {
3834
3847
  $r(n) && e.push(n);
3835
3848
  }), e;
3836
3849
  }
3837
- const Cc = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presenceAffectsLayout: s = !0, mode: o = "sync", propagate: r = !1, anchorX: a = "left", root: l }) => {
3838
- const [u, c] = Pr(r), h = ht(() => Bi(t), [t]), f = r && !u ? [] : h.map(_t), d = U(!0), m = U(h), p = Qe(() => /* @__PURE__ */ new Map()), v = U(/* @__PURE__ */ new Set()), [g, T] = Ln(h), [y, S] = Ln(h);
3839
- es(() => {
3840
- d.current = !1, m.current = h;
3841
- for (let P = 0; P < y.length; P++) {
3842
- const w = _t(y[P]);
3843
- f.includes(w) ? (p.delete(w), v.current.delete(w)) : p.get(w) !== !0 && p.set(w, !1);
3850
+ const Mc = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presenceAffectsLayout: s = !0, mode: o = "sync", propagate: r = !1, anchorX: a = "left", anchorY: l = "top", root: u }) => {
3851
+ const [c, h] = Pr(r), f = ft(() => Oi(t), [t]), d = r && !c ? [] : f.map(Gt), m = W(!0), p = W(f), y = tn(() => /* @__PURE__ */ new Map()), g = W(/* @__PURE__ */ new Set()), [T, v] = kn(f), [S, w] = kn(f);
3852
+ ns(() => {
3853
+ m.current = !1, p.current = f;
3854
+ for (let b = 0; b < S.length; b++) {
3855
+ const P = Gt(S[b]);
3856
+ d.includes(P) ? (y.delete(P), g.current.delete(P)) : y.get(P) !== !0 && y.set(P, !1);
3844
3857
  }
3845
- }, [y, f.length, f.join("-")]);
3846
- const b = [];
3847
- if (h !== g) {
3848
- let P = [...h];
3849
- for (let w = 0; w < y.length; w++) {
3850
- const M = y[w], L = _t(M);
3851
- f.includes(L) || (P.splice(w, 0, M), b.push(M));
3858
+ }, [S, d.length, d.join("-")]);
3859
+ const A = [];
3860
+ if (f !== T) {
3861
+ let b = [...f];
3862
+ for (let P = 0; P < S.length; P++) {
3863
+ const R = S[P], U = Gt(R);
3864
+ d.includes(U) || (b.splice(P, 0, R), A.push(R));
3852
3865
  }
3853
- return o === "wait" && b.length && (P = b), S(Bi(P)), T(h), null;
3866
+ return o === "wait" && A.length && (b = A), w(Oi(b)), v(f), null;
3854
3867
  }
3855
- process.env.NODE_ENV !== "production" && o === "wait" && y.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
3856
- const { forceRender: A } = B(Je);
3857
- return C(Zi, { children: y.map((P) => {
3858
- const w = _t(P), M = r && !u ? !1 : h === y || f.includes(w), L = () => {
3859
- if (v.current.has(w))
3868
+ process.env.NODE_ENV !== "production" && o === "wait" && S.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
3869
+ const { forceRender: V } = B(Qe);
3870
+ return M(Ji, { children: S.map((b) => {
3871
+ const P = Gt(b), R = r && !c ? !1 : f === S || d.includes(P), U = () => {
3872
+ if (g.current.has(P))
3860
3873
  return;
3861
- if (v.current.add(w), p.has(w))
3862
- p.set(w, !0);
3874
+ if (g.current.add(P), y.has(P))
3875
+ y.set(P, !0);
3863
3876
  else
3864
3877
  return;
3865
- let _ = !0;
3866
- p.forEach((ft) => {
3867
- ft || (_ = !1);
3868
- }), _ && (A == null || A(), S(m.current), r && (c == null || c()), i && i());
3878
+ let rt = !0;
3879
+ y.forEach((Ct) => {
3880
+ Ct || (rt = !1);
3881
+ }), rt && (V == null || V(), w(p.current), r && (h == null || h()), i && i());
3869
3882
  };
3870
- return C(Vc, { isPresent: M, initial: !d.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: s, mode: o, root: l, onExitComplete: M ? void 0 : L, anchorX: a, children: P }, w);
3883
+ return M(Vc, { isPresent: R, initial: !m.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: s, mode: o, root: u, onExitComplete: R ? void 0 : U, anchorX: a, anchorY: l, children: b }, P);
3871
3884
  }) });
3872
- }, Ar = bt({ strict: !1 }), Oi = {
3885
+ }, Ar = bt({ strict: !1 }), ji = {
3873
3886
  animation: [
3874
3887
  "animate",
3875
3888
  "variants",
@@ -3889,16 +3902,16 @@ const Cc = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presen
3889
3902
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
3890
3903
  layout: ["layout", "layoutId"]
3891
3904
  };
3892
- let ji = !1;
3905
+ let Ni = !1;
3893
3906
  function Dc() {
3894
- if (ji)
3907
+ if (Ni)
3895
3908
  return;
3896
3909
  const t = {};
3897
- for (const e in Oi)
3910
+ for (const e in ji)
3898
3911
  t[e] = {
3899
- isEnabled: (n) => Oi[e].some((i) => !!n[i])
3912
+ isEnabled: (n) => ji[e].some((i) => !!n[i])
3900
3913
  };
3901
- tr(t), ji = !0;
3914
+ tr(t), Ni = !0;
3902
3915
  }
3903
3916
  function Vr() {
3904
3917
  return Dc(), ml();
@@ -3944,12 +3957,12 @@ const Rc = /* @__PURE__ */ new Set([
3944
3957
  "ignoreStrict",
3945
3958
  "viewport"
3946
3959
  ]);
3947
- function ie(t) {
3960
+ function se(t) {
3948
3961
  return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Rc.has(t);
3949
3962
  }
3950
- let Mr = (t) => !ie(t);
3963
+ let Cr = (t) => !se(t);
3951
3964
  function Lc(t) {
3952
- typeof t == "function" && (Mr = (e) => e.startsWith("on") ? !ie(e) : t(e));
3965
+ typeof t == "function" && (Cr = (e) => e.startsWith("on") ? !se(e) : t(e));
3953
3966
  }
3954
3967
  try {
3955
3968
  Lc(require("@emotion/is-prop-valid").default);
@@ -3958,58 +3971,58 @@ try {
3958
3971
  function kc(t, e, n) {
3959
3972
  const i = {};
3960
3973
  for (const s in t)
3961
- s === "values" && typeof t.values == "object" || (Mr(s) || n === !0 && ie(s) || !e && !ie(s) || // If trying to use native HTML drag events, forward drag listeners
3974
+ s === "values" && typeof t.values == "object" || (Cr(s) || n === !0 && se(s) || !e && !se(s) || // If trying to use native HTML drag events, forward drag listeners
3962
3975
  t.draggable && s.startsWith("onDrag")) && (i[s] = t[s]);
3963
3976
  return i;
3964
3977
  }
3965
- const le = /* @__PURE__ */ bt({});
3978
+ const ce = /* @__PURE__ */ bt({});
3966
3979
  function Fc(t, e) {
3967
- if (ae(t)) {
3980
+ if (le(t)) {
3968
3981
  const { initial: n, animate: i } = t;
3969
3982
  return {
3970
- initial: n === !1 || Ot(n) ? n : void 0,
3971
- animate: Ot(i) ? i : void 0
3983
+ initial: n === !1 || jt(n) ? n : void 0,
3984
+ animate: jt(i) ? i : void 0
3972
3985
  };
3973
3986
  }
3974
3987
  return t.inherit !== !1 ? e : {};
3975
3988
  }
3976
3989
  function Ic(t) {
3977
- const { initial: e, animate: n } = Fc(t, B(le));
3978
- return ht(() => ({ initial: e, animate: n }), [Ni(e), Ni(n)]);
3990
+ const { initial: e, animate: n } = Fc(t, B(ce));
3991
+ return ft(() => ({ initial: e, animate: n }), [Wi(e), Wi(n)]);
3979
3992
  }
3980
- function Ni(t) {
3993
+ function Wi(t) {
3981
3994
  return Array.isArray(t) ? t.join(" ") : t;
3982
3995
  }
3983
- const Dn = () => ({
3996
+ const En = () => ({
3984
3997
  style: {},
3985
3998
  transform: {},
3986
3999
  transformOrigin: {},
3987
4000
  vars: {}
3988
4001
  });
3989
- function Cr(t, e, n) {
4002
+ function Mr(t, e, n) {
3990
4003
  for (const i in e)
3991
4004
  !O(e[i]) && !ar(i, n) && (t[i] = e[i]);
3992
4005
  }
3993
4006
  function Bc({ transformTemplate: t }, e) {
3994
- return ht(() => {
3995
- const n = Dn();
3996
- return Vn(n, e, t), Object.assign({}, n.vars, n.style);
4007
+ return ft(() => {
4008
+ const n = En();
4009
+ return Cn(n, e, t), Object.assign({}, n.vars, n.style);
3997
4010
  }, [e]);
3998
4011
  }
3999
4012
  function Oc(t, e) {
4000
4013
  const n = t.style || {}, i = {};
4001
- return Cr(i, n, t), Object.assign(i, Bc(t, e)), i;
4014
+ return Mr(i, n, t), Object.assign(i, Bc(t, e)), i;
4002
4015
  }
4003
4016
  function jc(t, e) {
4004
4017
  const n = {}, i = Oc(t, e);
4005
4018
  return t.drag && t.dragListener !== !1 && (n.draggable = !1, i.userSelect = i.WebkitUserSelect = i.WebkitTouchCallout = "none", i.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = i, n;
4006
4019
  }
4007
4020
  const Dr = () => ({
4008
- ...Dn(),
4021
+ ...En(),
4009
4022
  attrs: {}
4010
4023
  });
4011
4024
  function Nc(t, e, n, i) {
4012
- const s = ht(() => {
4025
+ const s = ft(() => {
4013
4026
  const o = Dr();
4014
4027
  return lr(o, e, ur(i), t.transformTemplate, t.style), {
4015
4028
  ...o.attrs,
@@ -4018,11 +4031,11 @@ function Nc(t, e, n, i) {
4018
4031
  }, [e]);
4019
4032
  if (t.style) {
4020
4033
  const o = {};
4021
- Cr(o, t.style, t), s.style = { ...o, ...s.style };
4034
+ Mr(o, t.style, t), s.style = { ...o, ...s.style };
4022
4035
  }
4023
4036
  return s;
4024
4037
  }
4025
- const Uc = [
4038
+ const Wc = [
4026
4039
  "animate",
4027
4040
  "circle",
4028
4041
  "defs",
@@ -4049,7 +4062,7 @@ const Uc = [
4049
4062
  "use",
4050
4063
  "view"
4051
4064
  ];
4052
- function En(t) {
4065
+ function Rn(t) {
4053
4066
  return (
4054
4067
  /**
4055
4068
  * If it's not a string, it's a custom React component. Currently we only support
@@ -4062,15 +4075,15 @@ function En(t) {
4062
4075
  /**
4063
4076
  * If it's in our list of lowercase SVG tags, it's an SVG component
4064
4077
  */
4065
- !!(Uc.indexOf(t) > -1 || /**
4078
+ !!(Wc.indexOf(t) > -1 || /**
4066
4079
  * If it contains a capital letter, it's an SVG component
4067
4080
  */
4068
4081
  /[A-Z]/u.test(t))
4069
4082
  )
4070
4083
  );
4071
4084
  }
4072
- function Wc(t, e, n, { latestValues: i }, s, o = !1, r) {
4073
- const l = (r ?? En(t) ? Nc : jc)(e, i, s, t), u = kc(e, typeof t == "string", o), c = t !== Qi ? { ...u, ...l, ref: n } : {}, { children: h } = e, f = ht(() => O(h) ? h.get() : h, [h]);
4085
+ function Uc(t, e, n, { latestValues: i }, s, o = !1, r) {
4086
+ const l = (r ?? Rn(t) ? Nc : jc)(e, i, s, t), u = kc(e, typeof t == "string", o), c = t !== ts ? { ...u, ...l, ref: n } : {}, { children: h } = e, f = ft(() => O(h) ? h.get() : h, [h]);
4074
4087
  return Kr(t, {
4075
4088
  ...c,
4076
4089
  children: f
@@ -4085,26 +4098,26 @@ function $c({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, i, s) {
4085
4098
  function Kc(t, e, n, i) {
4086
4099
  const s = {}, o = i(t, {});
4087
4100
  for (const f in o)
4088
- s[f] = Yt(o[f]);
4101
+ s[f] = qt(o[f]);
4089
4102
  let { initial: r, animate: a } = t;
4090
- const l = ae(t), u = Qs(t);
4103
+ const l = le(t), u = Qs(t);
4091
4104
  e && u && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
4092
4105
  let c = n ? n.initial === !1 : !1;
4093
4106
  c = c || r === !1;
4094
4107
  const h = c ? a : r;
4095
- if (h && typeof h != "boolean" && !oe(h)) {
4108
+ if (h && typeof h != "boolean" && !ae(h)) {
4096
4109
  const f = Array.isArray(h) ? h : [h];
4097
4110
  for (let d = 0; d < f.length; d++) {
4098
- const m = xn(t, f[d]);
4111
+ const m = Tn(t, f[d]);
4099
4112
  if (m) {
4100
- const { transitionEnd: p, transition: v, ...g } = m;
4113
+ const { transitionEnd: p, transition: y, ...g } = m;
4101
4114
  for (const T in g) {
4102
- let y = g[T];
4103
- if (Array.isArray(y)) {
4104
- const S = c ? y.length - 1 : 0;
4105
- y = y[S];
4115
+ let v = g[T];
4116
+ if (Array.isArray(v)) {
4117
+ const S = c ? v.length - 1 : 0;
4118
+ v = v[S];
4106
4119
  }
4107
- y !== null && (s[T] = y);
4120
+ v !== null && (s[T] = v);
4108
4121
  }
4109
4122
  for (const T in p)
4110
4123
  s[T] = p[T];
@@ -4114,22 +4127,22 @@ function Kc(t, e, n, i) {
4114
4127
  return s;
4115
4128
  }
4116
4129
  const Er = (t) => (e, n) => {
4117
- const i = B(le), s = B(re), o = () => $c(t, e, i, s);
4118
- return n ? o() : Qe(o);
4130
+ const i = B(ce), s = B(oe), o = () => $c(t, e, i, s);
4131
+ return n ? o() : tn(o);
4119
4132
  }, zc = /* @__PURE__ */ Er({
4120
4133
  scrapeMotionValuesFromProps: Mn,
4121
- createRenderState: Dn
4134
+ createRenderState: En
4122
4135
  }), _c = /* @__PURE__ */ Er({
4123
4136
  scrapeMotionValuesFromProps: hr,
4124
4137
  createRenderState: Dr
4125
4138
  }), Gc = Symbol.for("motionComponentSymbol");
4126
4139
  function Hc(t, e, n) {
4127
- const i = U(n);
4128
- Ze(() => {
4140
+ const i = W(n);
4141
+ Je(() => {
4129
4142
  i.current = n;
4130
4143
  });
4131
- const s = U(null);
4132
- return Ji((o) => {
4144
+ const s = W(null);
4145
+ return Qi((o) => {
4133
4146
  var a;
4134
4147
  o && ((a = t.onMount) == null || a.call(t, o)), e && (o ? e.mount(o) : e.unmount());
4135
4148
  const r = i.current;
@@ -4142,12 +4155,12 @@ function Hc(t, e, n) {
4142
4155
  }, [e]);
4143
4156
  }
4144
4157
  const Rr = bt({});
4145
- function Dt(t) {
4158
+ function Et(t) {
4146
4159
  return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
4147
4160
  }
4148
4161
  function Xc(t, e, n, i, s, o) {
4149
- var v, g;
4150
- const { visualElement: r } = B(le), a = B(Ar), l = B(re), u = B(Cn).reducedMotion, c = U(null);
4162
+ var y, g;
4163
+ const { visualElement: r } = B(ce), a = B(Ar), l = B(oe), u = B(Dn).reducedMotion, c = W(null);
4151
4164
  i = i || a.renderer, !c.current && i && (c.current = i(t, {
4152
4165
  visualState: e,
4153
4166
  parent: r,
@@ -4159,14 +4172,14 @@ function Xc(t, e, n, i, s, o) {
4159
4172
  }));
4160
4173
  const h = c.current, f = B(Rr);
4161
4174
  h && !h.projection && s && (h.type === "html" || h.type === "svg") && Yc(c.current, n, s, f);
4162
- const d = U(!1);
4163
- Ze(() => {
4175
+ const d = W(!1);
4176
+ Je(() => {
4164
4177
  h && d.current && h.update(n, l);
4165
4178
  });
4166
- const m = n[js], p = U(!!m && !((v = window.MotionHandoffIsComplete) != null && v.call(window, m)) && ((g = window.MotionHasOptimisedAnimation) == null ? void 0 : g.call(window, m)));
4167
- return es(() => {
4179
+ const m = n[Ns], p = W(!!m && !((y = window.MotionHandoffIsComplete) != null && y.call(window, m)) && ((g = window.MotionHasOptimisedAnimation) == null ? void 0 : g.call(window, m)));
4180
+ return ns(() => {
4168
4181
  h && (d.current = !0, window.MotionIsMounted = !0, h.updateFeatures(), h.scheduleRenderMicrotask(), p.current && h.animationState && h.animationState.animateChanges());
4169
- }), kt(() => {
4182
+ }), Ft(() => {
4170
4183
  h && (!p.current && h.animationState && h.animationState.animateChanges(), p.current && (queueMicrotask(() => {
4171
4184
  var T;
4172
4185
  (T = window.MotionHandoffMarkAsComplete) == null || T.call(window, m);
@@ -4178,7 +4191,7 @@ function Yc(t, e, n, i) {
4178
4191
  t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Lr(t.parent)), t.projection.setOptions({
4179
4192
  layoutId: s,
4180
4193
  layout: o,
4181
- alwaysMeasureLayout: !!r || a && Dt(a),
4194
+ alwaysMeasureLayout: !!r || a && Et(a),
4182
4195
  visualElement: t,
4183
4196
  /**
4184
4197
  * TODO: Update options in an effect. This could be tricky as it'll be too late
@@ -4200,27 +4213,27 @@ function Lr(t) {
4200
4213
  }
4201
4214
  function we(t, { forwardMotionProps: e = !1, type: n } = {}, i, s) {
4202
4215
  i && Ec(i);
4203
- const o = n ? n === "svg" : En(t), r = o ? _c : zc;
4216
+ const o = n ? n === "svg" : Rn(t), r = o ? _c : zc;
4204
4217
  function a(u, c) {
4205
4218
  let h;
4206
4219
  const f = {
4207
- ...B(Cn),
4220
+ ...B(Dn),
4208
4221
  ...u,
4209
4222
  layoutId: qc(u)
4210
4223
  }, { isStatic: d } = f, m = Ic(u), p = r(u, d);
4211
- if (!d && ts) {
4224
+ if (!d && es) {
4212
4225
  Zc(f, i);
4213
- const v = Jc(f);
4214
- h = v.MeasureLayout, m.visualElement = Xc(t, p, f, s, v.ProjectionNode, o);
4226
+ const y = Jc(f);
4227
+ h = y.MeasureLayout, m.visualElement = Xc(t, p, f, s, y.ProjectionNode, o);
4215
4228
  }
4216
- return Q(le.Provider, { value: m, children: [h && m.visualElement ? C(h, { visualElement: m.visualElement, ...f }) : null, Wc(t, u, Hc(p, m.visualElement, c), p, d, e, o)] });
4229
+ return Q(ce.Provider, { value: m, children: [h && m.visualElement ? M(h, { visualElement: m.visualElement, ...f }) : null, Uc(t, u, Hc(p, m.visualElement, c), p, d, e, o)] });
4217
4230
  }
4218
4231
  a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
4219
4232
  const l = zr(a);
4220
4233
  return l[Gc] = t, l;
4221
4234
  }
4222
4235
  function qc({ layoutId: t }) {
4223
- const e = B(Je).id;
4236
+ const e = B(Qe).id;
4224
4237
  return e && t !== void 0 ? e + "-" + t : t;
4225
4238
  }
4226
4239
  function Zc(t, e) {
@@ -4243,7 +4256,7 @@ function Jc(t) {
4243
4256
  function Qc(t, e) {
4244
4257
  if (typeof Proxy > "u")
4245
4258
  return we;
4246
- const n = /* @__PURE__ */ new Map(), i = (o, r) => we(o, r, t, e), s = (o, r) => (process.env.NODE_ENV !== "production" && rn(!1, "motion() is deprecated. Use motion.create() instead."), i(o, r));
4259
+ const n = /* @__PURE__ */ new Map(), i = (o, r) => we(o, r, t, e), s = (o, r) => (process.env.NODE_ENV !== "production" && on(!1, "motion() is deprecated. Use motion.create() instead."), i(o, r));
4247
4260
  return new Proxy(s, {
4248
4261
  /**
4249
4262
  * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
@@ -4253,8 +4266,8 @@ function Qc(t, e) {
4253
4266
  get: (o, r) => r === "create" ? i : (n.has(r) || n.set(r, we(r, void 0, t, e)), n.get(r))
4254
4267
  });
4255
4268
  }
4256
- const tu = (t, e) => e.isSVG ?? En(t) ? new Rl(e) : new Al(e, {
4257
- allowProjection: t !== Qi
4269
+ const tu = (t, e) => e.isSVG ?? Rn(t) ? new Rl(e) : new Al(e, {
4270
+ allowProjection: t !== ts
4258
4271
  });
4259
4272
  class eu extends st {
4260
4273
  /**
@@ -4267,7 +4280,7 @@ class eu extends st {
4267
4280
  }
4268
4281
  updateAnimationControlsSubscription() {
4269
4282
  const { animate: e } = this.node.getProps();
4270
- oe(e) && (this.unmountControls = e.subscribe(this.node));
4283
+ ae(e) && (this.unmountControls = e.subscribe(this.node));
4271
4284
  }
4272
4285
  /**
4273
4286
  * Subscribe any provided AnimationControls to the component's VisualElement
@@ -4315,7 +4328,7 @@ const su = {
4315
4328
  Feature: iu
4316
4329
  }
4317
4330
  };
4318
- function $t(t) {
4331
+ function Kt(t) {
4319
4332
  return {
4320
4333
  point: {
4321
4334
  x: t.pageX,
@@ -4323,16 +4336,16 @@ function $t(t) {
4323
4336
  }
4324
4337
  };
4325
4338
  }
4326
- const ru = (t) => (e) => Sn(e) && t(e, $t(e));
4327
- function Lt(t, e, n, i) {
4328
- return jt(t, e, ru(n), i);
4339
+ const ru = (t) => (e) => Pn(e) && t(e, Kt(e));
4340
+ function kt(t, e, n, i) {
4341
+ return Nt(t, e, ru(n), i);
4329
4342
  }
4330
4343
  const kr = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Ui = (t, e) => Math.abs(t - e);
4331
4344
  function ou(t, e) {
4332
4345
  const n = Ui(t.x, e.x), i = Ui(t.y, e.y);
4333
4346
  return Math.sqrt(n ** 2 + i ** 2);
4334
4347
  }
4335
- const Wi = /* @__PURE__ */ new Set(["auto", "scroll"]);
4348
+ const $i = /* @__PURE__ */ new Set(["auto", "scroll"]);
4336
4349
  class Fr {
4337
4350
  constructor(e, n, { transformPagePoint: i, contextWindow: s = window, dragSnapToOrigin: o = !1, distanceThreshold: r = 3, element: a } = {}) {
4338
4351
  if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (d) => {
@@ -4345,26 +4358,26 @@ class Fr {
4345
4358
  const d = Se(this.lastMoveEventInfo, this.history), m = this.startEvent !== null, p = ou(d.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
4346
4359
  if (!m && !p)
4347
4360
  return;
4348
- const { point: v } = d, { timestamp: g } = I;
4349
- this.history.push({ ...v, timestamp: g });
4350
- const { onStart: T, onMove: y } = this.handlers;
4351
- m || (T && T(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), y && y(this.lastMoveEvent, d);
4361
+ const { point: y } = d, { timestamp: g } = I;
4362
+ this.history.push({ ...y, timestamp: g });
4363
+ const { onStart: T, onMove: v } = this.handlers;
4364
+ m || (T && T(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), v && v(this.lastMoveEvent, d);
4352
4365
  }, this.handlePointerMove = (d, m) => {
4353
- this.lastMoveEvent = d, this.lastMoveEventInfo = be(m, this.transformPagePoint), V.update(this.updatePoint, !0);
4366
+ this.lastMoveEvent = d, this.lastMoveEventInfo = be(m, this.transformPagePoint), C.update(this.updatePoint, !0);
4354
4367
  }, this.handlePointerUp = (d, m) => {
4355
4368
  this.end();
4356
- const { onEnd: p, onSessionEnd: v, resumeAnimation: g } = this.handlers;
4369
+ const { onEnd: p, onSessionEnd: y, resumeAnimation: g } = this.handlers;
4357
4370
  if ((this.dragSnapToOrigin || !this.startEvent) && g && g(), !(this.lastMoveEvent && this.lastMoveEventInfo))
4358
4371
  return;
4359
4372
  const T = Se(d.type === "pointercancel" ? this.lastMoveEventInfo : be(m, this.transformPagePoint), this.history);
4360
- this.startEvent && p && p(d, T), v && v(d, T);
4361
- }, !Sn(e))
4373
+ this.startEvent && p && p(d, T), y && y(d, T);
4374
+ }, !Pn(e))
4362
4375
  return;
4363
4376
  this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = i, this.distanceThreshold = r, this.contextWindow = s || window;
4364
- const l = $t(e), u = be(l, this.transformPagePoint), { point: c } = u, { timestamp: h } = I;
4377
+ const l = Kt(e), u = be(l, this.transformPagePoint), { point: c } = u, { timestamp: h } = I;
4365
4378
  this.history = [{ ...c, timestamp: h }];
4366
4379
  const { onSessionStart: f } = n;
4367
- f && f(e, Se(u, this.history)), this.removeListeners = Nt(Lt(this.contextWindow, "pointermove", this.handlePointerMove), Lt(this.contextWindow, "pointerup", this.handlePointerUp), Lt(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
4380
+ f && f(e, Se(u, this.history)), this.removeListeners = Wt(kt(this.contextWindow, "pointermove", this.handlePointerMove), kt(this.contextWindow, "pointerup", this.handlePointerUp), kt(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
4368
4381
  }
4369
4382
  /**
4370
4383
  * Start tracking scroll on ancestors and window.
@@ -4373,7 +4386,7 @@ class Fr {
4373
4386
  let n = e.parentElement;
4374
4387
  for (; n; ) {
4375
4388
  const i = getComputedStyle(n);
4376
- (Wi.has(i.overflowX) || Wi.has(i.overflowY)) && this.scrollPositions.set(n, {
4389
+ ($i.has(i.overflowX) || $i.has(i.overflowY)) && this.scrollPositions.set(n, {
4377
4390
  x: n.scrollLeft,
4378
4391
  y: n.scrollTop
4379
4392
  }), n = n.parentElement;
@@ -4406,7 +4419,7 @@ class Fr {
4406
4419
  x: e.scrollLeft,
4407
4420
  y: e.scrollTop
4408
4421
  }, o = { x: s.x - n.x, y: s.y - n.y };
4409
- o.x === 0 && o.y === 0 || (i ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += o.x, this.lastMoveEventInfo.point.y += o.y) : this.history.length > 0 && (this.history[0].x -= o.x, this.history[0].y -= o.y), this.scrollPositions.set(e, s), V.update(this.updatePoint, !0));
4422
+ o.x === 0 && o.y === 0 || (i ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += o.x, this.lastMoveEventInfo.point.y += o.y) : this.history.length > 0 && (this.history[0].x -= o.x, this.history[0].y -= o.y), this.scrollPositions.set(e, s), C.update(this.updatePoint, !0));
4410
4423
  }
4411
4424
  updateHandlers(e) {
4412
4425
  this.handlers = e;
@@ -4418,14 +4431,14 @@ class Fr {
4418
4431
  function be(t, e) {
4419
4432
  return e ? { point: e(t.point) } : t;
4420
4433
  }
4421
- function $i(t, e) {
4434
+ function Ki(t, e) {
4422
4435
  return { x: t.x - e.x, y: t.y - e.y };
4423
4436
  }
4424
4437
  function Se({ point: t }, e) {
4425
4438
  return {
4426
4439
  point: t,
4427
- delta: $i(t, Ir(e)),
4428
- offset: $i(t, au(e)),
4440
+ delta: Ki(t, Ir(e)),
4441
+ offset: Ki(t, au(e)),
4429
4442
  velocity: lu(e, 0.1)
4430
4443
  };
4431
4444
  }
@@ -4444,7 +4457,7 @@ function lu(t, e) {
4444
4457
  n--;
4445
4458
  if (!i)
4446
4459
  return { x: 0, y: 0 };
4447
- const o = /* @__PURE__ */ K(s.timestamp - i.timestamp);
4460
+ const o = /* @__PURE__ */ z(s.timestamp - i.timestamp);
4448
4461
  if (o === 0)
4449
4462
  return { x: 0, y: 0 };
4450
4463
  const r = {
@@ -4456,7 +4469,7 @@ function lu(t, e) {
4456
4469
  function cu(t, { min: e, max: n }, i) {
4457
4470
  return e !== void 0 && t < e ? t = i ? E(e, t, i.min) : Math.max(t, e) : n !== void 0 && t > n && (t = i ? E(n, t, i.max) : Math.min(t, n)), t;
4458
4471
  }
4459
- function Ki(t, e, n) {
4472
+ function zi(t, e, n) {
4460
4473
  return {
4461
4474
  min: e !== void 0 ? t.min + e : void 0,
4462
4475
  max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
@@ -4464,43 +4477,43 @@ function Ki(t, e, n) {
4464
4477
  }
4465
4478
  function uu(t, { top: e, left: n, bottom: i, right: s }) {
4466
4479
  return {
4467
- x: Ki(t.x, n, s),
4468
- y: Ki(t.y, e, i)
4480
+ x: zi(t.x, n, s),
4481
+ y: zi(t.y, e, i)
4469
4482
  };
4470
4483
  }
4471
- function zi(t, e) {
4484
+ function _i(t, e) {
4472
4485
  let n = e.min - t.min, i = e.max - t.max;
4473
4486
  return e.max - e.min < t.max - t.min && ([n, i] = [i, n]), { min: n, max: i };
4474
4487
  }
4475
4488
  function hu(t, e) {
4476
4489
  return {
4477
- x: zi(t.x, e.x),
4478
- y: zi(t.y, e.y)
4490
+ x: _i(t.x, e.x),
4491
+ y: _i(t.y, e.y)
4479
4492
  };
4480
4493
  }
4481
4494
  function fu(t, e) {
4482
4495
  let n = 0.5;
4483
4496
  const i = N(t), s = N(e);
4484
- return s > i ? n = /* @__PURE__ */ Ft(e.min, e.max - i, t.min) : i > s && (n = /* @__PURE__ */ Ft(t.min, t.max - s, e.min)), q(0, 1, n);
4497
+ return s > i ? n = /* @__PURE__ */ It(e.min, e.max - i, t.min) : i > s && (n = /* @__PURE__ */ It(t.min, t.max - s, e.min)), q(0, 1, n);
4485
4498
  }
4486
4499
  function du(t, e) {
4487
4500
  const n = {};
4488
4501
  return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
4489
4502
  }
4490
- const Xe = 0.35;
4491
- function mu(t = Xe) {
4492
- return t === !1 ? t = 0 : t === !0 && (t = Xe), {
4493
- x: _i(t, "left", "right"),
4494
- y: _i(t, "top", "bottom")
4503
+ const Ye = 0.35;
4504
+ function mu(t = Ye) {
4505
+ return t === !1 ? t = 0 : t === !0 && (t = Ye), {
4506
+ x: Gi(t, "left", "right"),
4507
+ y: Gi(t, "top", "bottom")
4495
4508
  };
4496
4509
  }
4497
- function _i(t, e, n) {
4510
+ function Gi(t, e, n) {
4498
4511
  return {
4499
- min: Gi(t, e),
4500
- max: Gi(t, n)
4512
+ min: Hi(t, e),
4513
+ max: Hi(t, n)
4501
4514
  };
4502
4515
  }
4503
- function Gi(t, e) {
4516
+ function Hi(t, e) {
4504
4517
  return typeof t == "number" ? t : t[e] || 0;
4505
4518
  }
4506
4519
  const pu = /* @__PURE__ */ new WeakMap();
@@ -4513,28 +4526,28 @@ class gu {
4513
4526
  if (s && s.isPresent === !1)
4514
4527
  return;
4515
4528
  const o = (h) => {
4516
- n ? (this.stopAnimation(), this.snapToCursor($t(h).point)) : this.pauseAnimation();
4529
+ n ? (this.stopAnimation(), this.snapToCursor(Kt(h).point)) : this.pauseAnimation();
4517
4530
  }, r = (h, f) => {
4518
4531
  this.stopAnimation();
4519
4532
  const { drag: d, dragPropagation: m, onDragStart: p } = this.getProps();
4520
4533
  if (d && !m && (this.openDragLock && this.openDragLock(), this.openDragLock = nl(d), !this.openDragLock))
4521
4534
  return;
4522
- this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), $((g) => {
4535
+ this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), K((g) => {
4523
4536
  let T = this.getAxisMotionValue(g).get() || 0;
4524
4537
  if (Y.test(T)) {
4525
- const { projection: y } = this.visualElement;
4526
- if (y && y.layout) {
4527
- const S = y.layout.layoutBox[g];
4538
+ const { projection: v } = this.visualElement;
4539
+ if (v && v.layout) {
4540
+ const S = v.layout.layoutBox[g];
4528
4541
  S && (T = N(S) * (parseFloat(T) / 100));
4529
4542
  }
4530
4543
  }
4531
4544
  this.originPoint[g] = T;
4532
- }), p && V.postRender(() => p(h, f)), We(this.visualElement, "transform");
4533
- const { animationState: v } = this.visualElement;
4534
- v && v.setActive("whileDrag", !0);
4545
+ }), p && C.postRender(() => p(h, f)), Ue(this.visualElement, "transform");
4546
+ const { animationState: y } = this.visualElement;
4547
+ y && y.setActive("whileDrag", !0);
4535
4548
  }, a = (h, f) => {
4536
4549
  this.latestPointerEvent = h, this.latestPanInfo = f;
4537
- const { dragPropagation: d, dragDirectionLock: m, onDirectionLock: p, onDrag: v } = this.getProps();
4550
+ const { dragPropagation: d, dragDirectionLock: m, onDirectionLock: p, onDrag: y } = this.getProps();
4538
4551
  if (!d && !this.openDragLock)
4539
4552
  return;
4540
4553
  const { offset: g } = f;
@@ -4542,10 +4555,10 @@ class gu {
4542
4555
  this.currentDirection = yu(g), this.currentDirection !== null && p && p(this.currentDirection);
4543
4556
  return;
4544
4557
  }
4545
- this.updateAxis("x", f.point, g), this.updateAxis("y", f.point, g), this.visualElement.render(), v && v(h, f);
4558
+ this.updateAxis("x", f.point, g), this.updateAxis("y", f.point, g), this.visualElement.render(), y && y(h, f);
4546
4559
  }, l = (h, f) => {
4547
4560
  this.latestPointerEvent = h, this.latestPanInfo = f, this.stop(h, f), this.latestPointerEvent = null, this.latestPanInfo = null;
4548
- }, u = () => $((h) => {
4561
+ }, u = () => K((h) => {
4549
4562
  var f;
4550
4563
  return this.getAnimationState(h) === "paused" && ((f = this.getAxisMotionValue(h).animation) == null ? void 0 : f.play());
4551
4564
  }), { dragSnapToOrigin: c } = this.getProps();
@@ -4573,7 +4586,7 @@ class gu {
4573
4586
  const { velocity: r } = s;
4574
4587
  this.startAnimation(r);
4575
4588
  const { onDragEnd: a } = this.getProps();
4576
- a && V.postRender(() => a(i, s));
4589
+ a && C.postRender(() => a(i, s));
4577
4590
  }
4578
4591
  /**
4579
4592
  * @internal
@@ -4581,13 +4594,22 @@ class gu {
4581
4594
  cancel() {
4582
4595
  this.isDragging = !1;
4583
4596
  const { projection: e, animationState: n } = this.visualElement;
4584
- e && (e.isAnimationBlocked = !1), this.panSession && this.panSession.end(), this.panSession = void 0;
4597
+ e && (e.isAnimationBlocked = !1), this.endPanSession();
4585
4598
  const { dragPropagation: i } = this.getProps();
4586
4599
  !i && this.openDragLock && (this.openDragLock(), this.openDragLock = null), n && n.setActive("whileDrag", !1);
4587
4600
  }
4601
+ /**
4602
+ * Clean up the pan session without modifying other drag state.
4603
+ * This is used during unmount to ensure event listeners are removed
4604
+ * without affecting projection animations or drag locks.
4605
+ * @internal
4606
+ */
4607
+ endPanSession() {
4608
+ this.panSession && this.panSession.end(), this.panSession = void 0;
4609
+ }
4588
4610
  updateAxis(e, n, i) {
4589
4611
  const { drag: s } = this.getProps();
4590
- if (!i || !Gt(e, s, this.currentDirection))
4612
+ if (!i || !Ht(e, s, this.currentDirection))
4591
4613
  return;
4592
4614
  const o = this.getAxisMotionValue(e);
4593
4615
  let r = this.originPoint[e] + i[e];
@@ -4596,13 +4618,13 @@ class gu {
4596
4618
  resolveConstraints() {
4597
4619
  var o;
4598
4620
  const { dragConstraints: e, dragElastic: n } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (o = this.visualElement.projection) == null ? void 0 : o.layout, s = this.constraints;
4599
- e && Dt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && i ? this.constraints = uu(i.layoutBox, e) : this.constraints = !1, this.elastic = mu(n), s !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && $((r) => {
4621
+ e && Et(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && i ? this.constraints = uu(i.layoutBox, e) : this.constraints = !1, this.elastic = mu(n), s !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && K((r) => {
4600
4622
  this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = du(i.layoutBox[r], this.constraints[r]));
4601
4623
  });
4602
4624
  }
4603
4625
  resolveRefConstraints() {
4604
4626
  const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
4605
- if (!e || !Dt(e))
4627
+ if (!e || !Et(e))
4606
4628
  return !1;
4607
4629
  const i = e.current;
4608
4630
  Z(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
@@ -4618,8 +4640,8 @@ class gu {
4618
4640
  return r;
4619
4641
  }
4620
4642
  startAnimation(e) {
4621
- const { drag: n, dragMomentum: i, dragElastic: s, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = $((c) => {
4622
- if (!Gt(c, n, this.currentDirection))
4643
+ const { drag: n, dragMomentum: i, dragElastic: s, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = K((c) => {
4644
+ if (!Ht(c, n, this.currentDirection))
4623
4645
  return;
4624
4646
  let h = l && l[c] || {};
4625
4647
  r && (h = { min: 0, max: 0 });
@@ -4640,13 +4662,13 @@ class gu {
4640
4662
  }
4641
4663
  startAxisValueAnimation(e, n) {
4642
4664
  const i = this.getAxisMotionValue(e);
4643
- return We(this.visualElement, e), i.start(vn(e, i, 0, n, this.visualElement, !1));
4665
+ return Ue(this.visualElement, e), i.start(xn(e, i, 0, n, this.visualElement, !1));
4644
4666
  }
4645
4667
  stopAnimation() {
4646
- $((e) => this.getAxisMotionValue(e).stop());
4668
+ K((e) => this.getAxisMotionValue(e).stop());
4647
4669
  }
4648
4670
  pauseAnimation() {
4649
- $((e) => {
4671
+ K((e) => {
4650
4672
  var n;
4651
4673
  return (n = this.getAxisMotionValue(e).animation) == null ? void 0 : n.pause();
4652
4674
  });
@@ -4666,9 +4688,9 @@ class gu {
4666
4688
  return s || this.visualElement.getValue(e, (i.initial ? i.initial[e] : void 0) || 0);
4667
4689
  }
4668
4690
  snapToCursor(e) {
4669
- $((n) => {
4691
+ K((n) => {
4670
4692
  const { drag: i } = this.getProps();
4671
- if (!Gt(n, i, this.currentDirection))
4693
+ if (!Ht(n, i, this.currentDirection))
4672
4694
  return;
4673
4695
  const { projection: s } = this.visualElement, o = this.getAxisMotionValue(n);
4674
4696
  if (s && s.layout) {
@@ -4686,11 +4708,11 @@ class gu {
4686
4708
  if (!this.visualElement.current)
4687
4709
  return;
4688
4710
  const { drag: e, dragConstraints: n } = this.getProps(), { projection: i } = this.visualElement;
4689
- if (!Dt(n) || !i || !this.constraints)
4711
+ if (!Et(n) || !i || !this.constraints)
4690
4712
  return;
4691
4713
  this.stopAnimation();
4692
4714
  const s = { x: 0, y: 0 };
4693
- $((r) => {
4715
+ K((r) => {
4694
4716
  const a = this.getAxisMotionValue(r);
4695
4717
  if (a && this.constraints !== !1) {
4696
4718
  const l = a.get();
@@ -4698,8 +4720,8 @@ class gu {
4698
4720
  }
4699
4721
  });
4700
4722
  const { transformTemplate: o } = this.visualElement.getProps();
4701
- this.visualElement.current.style.transform = o ? o({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.resolveConstraints(), $((r) => {
4702
- if (!Gt(r, e, null))
4723
+ this.visualElement.current.style.transform = o ? o({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.resolveConstraints(), K((r) => {
4724
+ if (!Ht(r, e, null))
4703
4725
  return;
4704
4726
  const a = this.getAxisMotionValue(r), { min: l, max: u } = this.constraints[r];
4705
4727
  a.set(E(l, u, s[r]));
@@ -4709,16 +4731,16 @@ class gu {
4709
4731
  if (!this.visualElement.current)
4710
4732
  return;
4711
4733
  pu.set(this.visualElement, this);
4712
- const e = this.visualElement.current, n = Lt(e, "pointerdown", (l) => {
4713
- const { drag: u, dragListener: c = !0 } = this.getProps();
4714
- u && c && !qs(l.target) && this.start(l);
4734
+ const e = this.visualElement.current, n = kt(e, "pointerdown", (l) => {
4735
+ const { drag: u, dragListener: c = !0 } = this.getProps(), h = l.target, f = h !== e && qs(h);
4736
+ u && c && !f && this.start(l);
4715
4737
  }), i = () => {
4716
4738
  const { dragConstraints: l } = this.getProps();
4717
- Dt(l) && l.current && (this.constraints = this.resolveRefConstraints());
4739
+ Et(l) && l.current && (this.constraints = this.resolveRefConstraints());
4718
4740
  }, { projection: s } = this.visualElement, o = s.addEventListener("measure", i);
4719
- s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), V.read(i);
4720
- const r = jt(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: u }) => {
4721
- this.isDragging && u && ($((c) => {
4741
+ s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), C.read(i);
4742
+ const r = Nt(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: u }) => {
4743
+ this.isDragging && u && (K((c) => {
4722
4744
  const h = this.getAxisMotionValue(c);
4723
4745
  h && (this.originPoint[c] += l[c].translate, h.set(h.get() + l[c].translate));
4724
4746
  }), this.visualElement.render());
@@ -4728,7 +4750,7 @@ class gu {
4728
4750
  };
4729
4751
  }
4730
4752
  getProps() {
4731
- const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: i = !1, dragPropagation: s = !1, dragConstraints: o = !1, dragElastic: r = Xe, dragMomentum: a = !0 } = e;
4753
+ const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: i = !1, dragPropagation: s = !1, dragConstraints: o = !1, dragElastic: r = Ye, dragMomentum: a = !0 } = e;
4732
4754
  return {
4733
4755
  ...e,
4734
4756
  drag: n,
@@ -4740,7 +4762,7 @@ class gu {
4740
4762
  };
4741
4763
  }
4742
4764
  }
4743
- function Gt(t, e, n) {
4765
+ function Ht(t, e, n) {
4744
4766
  return (e === !0 || e === t) && (n === null || n === t);
4745
4767
  }
4746
4768
  function yu(t, e = 10) {
@@ -4749,26 +4771,26 @@ function yu(t, e = 10) {
4749
4771
  }
4750
4772
  class vu extends st {
4751
4773
  constructor(e) {
4752
- super(e), this.removeGroupControls = z, this.removeListeners = z, this.controls = new gu(e);
4774
+ super(e), this.removeGroupControls = _, this.removeListeners = _, this.controls = new gu(e);
4753
4775
  }
4754
4776
  mount() {
4755
4777
  const { dragControls: e } = this.node.getProps();
4756
- e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || z;
4778
+ e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || _;
4757
4779
  }
4758
4780
  update() {
4759
4781
  const { dragControls: e } = this.node.getProps(), { dragControls: n } = this.node.prevProps || {};
4760
4782
  e !== n && (this.removeGroupControls(), e && (this.removeGroupControls = e.subscribe(this.controls)));
4761
4783
  }
4762
4784
  unmount() {
4763
- this.removeGroupControls(), this.removeListeners();
4785
+ this.removeGroupControls(), this.removeListeners(), this.controls.endPanSession();
4764
4786
  }
4765
4787
  }
4766
- const Hi = (t) => (e, n) => {
4767
- t && V.postRender(() => t(e, n));
4788
+ const Xi = (t) => (e, n) => {
4789
+ t && C.postRender(() => t(e, n));
4768
4790
  };
4769
4791
  class xu extends st {
4770
4792
  constructor() {
4771
- super(...arguments), this.removePointerDownListener = z;
4793
+ super(...arguments), this.removePointerDownListener = _;
4772
4794
  }
4773
4795
  onPointerDown(e) {
4774
4796
  this.session = new Fr(e, this.createPanHandlers(), {
@@ -4779,16 +4801,16 @@ class xu extends st {
4779
4801
  createPanHandlers() {
4780
4802
  const { onPanSessionStart: e, onPanStart: n, onPan: i, onPanEnd: s } = this.node.getProps();
4781
4803
  return {
4782
- onSessionStart: Hi(e),
4783
- onStart: Hi(n),
4804
+ onSessionStart: Xi(e),
4805
+ onStart: Xi(n),
4784
4806
  onMove: i,
4785
4807
  onEnd: (o, r) => {
4786
- delete this.session, s && V.postRender(() => s(o, r));
4808
+ delete this.session, s && C.postRender(() => s(o, r));
4787
4809
  }
4788
4810
  };
4789
4811
  }
4790
4812
  mount() {
4791
- this.removePointerDownListener = Lt(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
4813
+ this.removePointerDownListener = kt(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
4792
4814
  }
4793
4815
  update() {
4794
4816
  this.session && this.session.updateHandlers(this.createPanHandlers());
@@ -4811,18 +4833,18 @@ class Tu extends _r {
4811
4833
  }), o.setOptions({
4812
4834
  ...o.options,
4813
4835
  onExitComplete: () => this.safeToRemove()
4814
- })), qt.hasEverUpdated = !0;
4836
+ })), Zt.hasEverUpdated = !0;
4815
4837
  }
4816
4838
  getSnapshotBeforeUpdate(e) {
4817
4839
  const { layoutDependency: n, visualElement: i, drag: s, isPresent: o } = this.props, { projection: r } = i;
4818
- return r && (r.isPresent = o, Pe = !0, s || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || V.postRender(() => {
4840
+ return r && (r.isPresent = o, Pe = !0, s || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || C.postRender(() => {
4819
4841
  const a = r.getStack();
4820
4842
  (!a || !a.members.length) && this.safeToRemove();
4821
4843
  }))), null;
4822
4844
  }
4823
4845
  componentDidUpdate() {
4824
4846
  const { projection: e } = this.props.visualElement;
4825
- e && (e.root.didUpdate(), bn.postRender(() => {
4847
+ e && (e.root.didUpdate(), Sn.postRender(() => {
4826
4848
  !e.currentAnimation && e.isLead() && this.safeToRemove();
4827
4849
  }));
4828
4850
  }
@@ -4839,8 +4861,8 @@ class Tu extends _r {
4839
4861
  }
4840
4862
  }
4841
4863
  function Br(t) {
4842
- const [e, n] = Pr(), i = B(Je);
4843
- return C(Tu, { ...t, layoutGroup: i, switchLayoutGroup: B(Rr), isPresent: e, safeToRemove: n });
4864
+ const [e, n] = Pr(), i = B(Qe);
4865
+ return M(Tu, { ...t, layoutGroup: i, switchLayoutGroup: B(Rr), isPresent: e, safeToRemove: n });
4844
4866
  }
4845
4867
  const wu = {
4846
4868
  pan: {
@@ -4852,16 +4874,16 @@ const wu = {
4852
4874
  MeasureLayout: Br
4853
4875
  }
4854
4876
  };
4855
- function Xi(t, e, n) {
4877
+ function Yi(t, e, n) {
4856
4878
  const { props: i } = t;
4857
4879
  t.animationState && i.whileHover && t.animationState.setActive("whileHover", n === "Start");
4858
4880
  const s = "onHover" + n, o = i[s];
4859
- o && V.postRender(() => o(e, $t(e)));
4881
+ o && C.postRender(() => o(e, Kt(e)));
4860
4882
  }
4861
4883
  class bu extends st {
4862
4884
  mount() {
4863
4885
  const { current: e } = this.node;
4864
- e && (this.unmount = il(e, (n, i) => (Xi(this.node, i, "Start"), (s) => Xi(this.node, s, "End"))));
4886
+ e && (this.unmount = il(e, (n, i) => (Yi(this.node, i, "Start"), (s) => Yi(this.node, s, "End"))));
4865
4887
  }
4866
4888
  unmount() {
4867
4889
  }
@@ -4883,43 +4905,43 @@ class Su extends st {
4883
4905
  !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
4884
4906
  }
4885
4907
  mount() {
4886
- this.unmount = Nt(jt(this.node.current, "focus", () => this.onFocus()), jt(this.node.current, "blur", () => this.onBlur()));
4908
+ this.unmount = Wt(Nt(this.node.current, "focus", () => this.onFocus()), Nt(this.node.current, "blur", () => this.onBlur()));
4887
4909
  }
4888
4910
  unmount() {
4889
4911
  }
4890
4912
  }
4891
- function Yi(t, e, n) {
4913
+ function qi(t, e, n) {
4892
4914
  const { props: i } = t;
4893
4915
  if (t.current instanceof HTMLButtonElement && t.current.disabled)
4894
4916
  return;
4895
4917
  t.animationState && i.whileTap && t.animationState.setActive("whileTap", n === "Start");
4896
4918
  const s = "onTap" + (n === "End" ? "" : n), o = i[s];
4897
- o && V.postRender(() => o(e, $t(e)));
4919
+ o && C.postRender(() => o(e, Kt(e)));
4898
4920
  }
4899
4921
  class Pu extends st {
4900
4922
  mount() {
4901
4923
  const { current: e } = this.node;
4902
- e && (this.unmount = ol(e, (n, i) => (Yi(this.node, i, "Start"), (s, { success: o }) => Yi(this.node, s, o ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
4924
+ e && (this.unmount = ol(e, (n, i) => (qi(this.node, i, "Start"), (s, { success: o }) => qi(this.node, s, o ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
4903
4925
  }
4904
4926
  unmount() {
4905
4927
  }
4906
4928
  }
4907
- const Ye = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Au = (t) => {
4908
- const e = Ye.get(t.target);
4929
+ const qe = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Au = (t) => {
4930
+ const e = qe.get(t.target);
4909
4931
  e && e(t);
4910
4932
  }, Vu = (t) => {
4911
4933
  t.forEach(Au);
4912
4934
  };
4913
- function Mu({ root: t, ...e }) {
4935
+ function Cu({ root: t, ...e }) {
4914
4936
  const n = t || document;
4915
4937
  Ae.has(n) || Ae.set(n, {});
4916
4938
  const i = Ae.get(n), s = JSON.stringify(e);
4917
4939
  return i[s] || (i[s] = new IntersectionObserver(Vu, { root: t, ...e })), i[s];
4918
4940
  }
4919
- function Cu(t, e, n) {
4920
- const i = Mu(e);
4921
- return Ye.set(t, n), i.observe(t), () => {
4922
- Ye.delete(t), i.unobserve(t);
4941
+ function Mu(t, e, n) {
4942
+ const i = Cu(e);
4943
+ return qe.set(t, n), i.observe(t), () => {
4944
+ qe.delete(t), i.unobserve(t);
4923
4945
  };
4924
4946
  }
4925
4947
  const Du = {
@@ -4944,7 +4966,7 @@ class Eu extends st {
4944
4966
  const { onViewportEnter: c, onViewportLeave: h } = this.node.getProps(), f = u ? c : h;
4945
4967
  f && f(l);
4946
4968
  };
4947
- return Cu(this.node.current, r, a);
4969
+ return Mu(this.node.current, r, a);
4948
4970
  }
4949
4971
  mount() {
4950
4972
  this.startObserver();
@@ -4998,34 +5020,34 @@ function _u({ children: t }) {
4998
5020
  setIsResizing: u,
4999
5021
  resizeWidth: c,
5000
5022
  setResizeWidth: h
5001
- } = jr(), f = U(null), d = U(null), { get: m } = Gr(), p = m("canvasReduceAriaLabel", "Réduire le canvas"), v = m("canvasExpandAriaLabel", "Agrandir le canvas"), g = m("canvasCloseAriaLabel", "Fermer le canvas");
5002
- kt(() => {
5003
- const P = (M) => {
5023
+ } = jr(), f = W(null), d = W(null), { get: m } = Gr(), p = m("canvasReduceAriaLabel", "Réduire le canvas"), y = m("canvasExpandAriaLabel", "Agrandir le canvas"), g = m("canvasCloseAriaLabel", "Fermer le canvas");
5024
+ Ft(() => {
5025
+ const V = (P) => {
5004
5026
  if (!l) return;
5005
- const L = window.innerWidth, _ = L - M.clientX, ft = 300, ce = L - 100, dt = Math.max(ft, Math.min(ce, _));
5027
+ const R = window.innerWidth, U = R - P.clientX, rt = 300, Ct = R - 100, dt = Math.max(rt, Math.min(Ct, U));
5006
5028
  d.current && (d.current.style.width = `${dt}px`), h(dt), a(dt);
5007
- }, w = () => {
5029
+ }, b = () => {
5008
5030
  u(!1), setTimeout(() => {
5009
5031
  h(null);
5010
5032
  }, 50);
5011
5033
  };
5012
- return l && (document.addEventListener("mousemove", P), document.addEventListener("mouseup", w), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none"), () => {
5013
- document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", w), document.body.style.cursor = "", document.body.style.userSelect = "";
5034
+ return l && (document.addEventListener("mousemove", V), document.addEventListener("mouseup", b), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none"), () => {
5035
+ document.removeEventListener("mousemove", V), document.removeEventListener("mouseup", b), document.body.style.cursor = "", document.body.style.userSelect = "";
5014
5036
  };
5015
- }, [l, a, h, u]), kt(() => {
5037
+ }, [l, a, h, u]), Ft(() => {
5016
5038
  if (l || !d.current) return;
5017
5039
  if (s) {
5018
5040
  d.current.style.width = "100%";
5019
5041
  return;
5020
5042
  }
5021
- const P = r !== null ? r : typeof window < "u" ? window.innerWidth / 2 : 0;
5022
- d.current.style.width = `${P}px`;
5043
+ const V = r !== null ? r : typeof window < "u" ? window.innerWidth / 2 : 0;
5044
+ d.current.style.width = `${V}px`;
5023
5045
  }, [l, r, s]);
5024
- const T = (P) => {
5025
- P.preventDefault();
5026
- const w = r !== null ? r : typeof window < "u" ? window.innerWidth / 2 : 0;
5027
- h(w), d.current && (d.current.style.width = `${w}px`), u(!0);
5028
- }, y = () => s ? "100%" : l && c !== null ? `${c}px` : r !== null ? `${r}px` : "50%", S = () => {
5046
+ const T = (V) => {
5047
+ V.preventDefault();
5048
+ const b = r !== null ? r : typeof window < "u" ? window.innerWidth / 2 : 0;
5049
+ h(b), d.current && (d.current.style.width = `${b}px`), u(!0);
5050
+ }, v = () => s ? "100%" : l && c !== null ? `${c}px` : r !== null ? `${r}px` : "50%", S = () => {
5029
5051
  switch (i) {
5030
5052
  case "story":
5031
5053
  return "📝";
@@ -5036,7 +5058,7 @@ function _u({ children: t }) {
5036
5058
  default:
5037
5059
  return "📄";
5038
5060
  }
5039
- }, b = () => {
5061
+ }, w = () => {
5040
5062
  switch (i) {
5041
5063
  case "story":
5042
5064
  return "User Story";
@@ -5059,8 +5081,8 @@ function _u({ children: t }) {
5059
5081
  return "Content view";
5060
5082
  }
5061
5083
  };
5062
- return /* @__PURE__ */ C(Cc, { mode: "wait", children: e && /* @__PURE__ */ Q(Zi, { children: [
5063
- /* @__PURE__ */ C(
5084
+ return /* @__PURE__ */ M(Mc, { mode: "wait", children: e && /* @__PURE__ */ Q(Ji, { children: [
5085
+ /* @__PURE__ */ M(
5064
5086
  Ve.div,
5065
5087
  {
5066
5088
  initial: { opacity: 0 },
@@ -5081,10 +5103,10 @@ function _u({ children: t }) {
5081
5103
  className: "fixed lg:relative right-0 top-0 h-screen w-full bg-card shadow-2xl lg:shadow-none z-50 overflow-hidden flex flex-col lg:border-l border-border",
5082
5104
  ref: d,
5083
5105
  style: {
5084
- width: e && typeof window < "u" && window.innerWidth >= 1024 ? y() : "100%"
5106
+ width: e && typeof window < "u" && window.innerWidth >= 1024 ? v() : "100%"
5085
5107
  },
5086
5108
  children: [
5087
- !s && /* @__PURE__ */ C(
5109
+ !s && /* @__PURE__ */ M(
5088
5110
  "div",
5089
5111
  {
5090
5112
  ref: f,
@@ -5094,42 +5116,42 @@ function _u({ children: t }) {
5094
5116
  "bg-transparent hover:bg-primary/20 group",
5095
5117
  l && "bg-primary/30"
5096
5118
  ),
5097
- children: /* @__PURE__ */ C("div", { className: "absolute inset-y-0 left-1/2 -translate-x-1/2 w-0.5 group-hover:w-1 bg-border group-hover:bg-primary transition-all" })
5119
+ children: /* @__PURE__ */ M("div", { className: "absolute inset-y-0 left-1/2 -translate-x-1/2 w-0.5 group-hover:w-1 bg-border group-hover:bg-primary transition-all" })
5098
5120
  }
5099
5121
  ),
5100
5122
  /* @__PURE__ */ Q("div", { className: "h-16 flex items-center justify-between border-b border-border bg-card/95 backdrop-blur-xl px-4 sm:px-6", children: [
5101
5123
  /* @__PURE__ */ Q("div", { className: "flex items-center gap-3 sm:gap-4", children: [
5102
5124
  /* @__PURE__ */ Q("div", { className: "relative group", children: [
5103
- /* @__PURE__ */ C("div", { className: "absolute inset-0 bg-foreground/10 blur-lg opacity-0 group-hover:opacity-100 transition-opacity duration-500" }),
5104
- /* @__PURE__ */ C("div", { className: "relative flex h-9 w-9 sm:h-10 sm:w-10 items-center justify-center rounded-lg bg-foreground shadow-md ring-1 ring-border/40 transition-transform group-hover:scale-105 duration-300", children: /* @__PURE__ */ C("span", { className: "text-base sm:text-lg", children: S() }) })
5125
+ /* @__PURE__ */ M("div", { className: "absolute inset-0 bg-foreground/10 blur-lg opacity-0 group-hover:opacity-100 transition-opacity duration-500" }),
5126
+ /* @__PURE__ */ M("div", { className: "relative flex h-9 w-9 sm:h-10 sm:w-10 items-center justify-center rounded-lg bg-foreground shadow-md ring-1 ring-border/40 transition-transform group-hover:scale-105 duration-300", children: /* @__PURE__ */ M("span", { className: "text-base sm:text-lg", children: S() }) })
5105
5127
  ] }),
5106
5128
  /* @__PURE__ */ Q("div", { className: "flex flex-col min-w-0", children: [
5107
- /* @__PURE__ */ C("h2", { className: "text-sm sm:text-base font-semibold text-foreground tracking-tight truncate", children: b() }),
5108
- /* @__PURE__ */ C("p", { className: "text-xs text-muted-foreground font-medium hidden sm:block", children: A() })
5129
+ /* @__PURE__ */ M("h2", { className: "text-sm sm:text-base font-semibold text-foreground tracking-tight truncate", children: w() }),
5130
+ /* @__PURE__ */ M("p", { className: "text-xs text-muted-foreground font-medium hidden sm:block", children: A() })
5109
5131
  ] })
5110
5132
  ] }),
5111
5133
  /* @__PURE__ */ Q("div", { className: "flex items-center gap-2", children: [
5112
- /* @__PURE__ */ C(
5134
+ /* @__PURE__ */ M(
5113
5135
  "button",
5114
5136
  {
5115
5137
  onClick: o,
5116
5138
  className: "group relative flex h-9 w-9 sm:h-10 sm:w-10 items-center justify-center rounded-lg border border-border bg-card hover:bg-muted transition-all duration-200 hover:scale-105 hover:shadow-md focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background",
5117
- "aria-label": s ? p : v,
5118
- children: s ? /* @__PURE__ */ C(Zr, { className: "h-4 w-4 sm:h-5 sm:w-5 text-muted-foreground group-hover:scale-110 transition-transform duration-300" }) : /* @__PURE__ */ C(Xr, { className: "h-4 w-4 sm:h-5 sm:w-5 text-muted-foreground group-hover:scale-110 transition-transform duration-300" })
5139
+ "aria-label": s ? p : y,
5140
+ children: s ? /* @__PURE__ */ M(Zr, { className: "h-4 w-4 sm:h-5 sm:w-5 text-muted-foreground group-hover:scale-110 transition-transform duration-300" }) : /* @__PURE__ */ M(Xr, { className: "h-4 w-4 sm:h-5 sm:w-5 text-muted-foreground group-hover:scale-110 transition-transform duration-300" })
5119
5141
  }
5120
5142
  ),
5121
- /* @__PURE__ */ C(
5143
+ /* @__PURE__ */ M(
5122
5144
  "button",
5123
5145
  {
5124
5146
  onClick: n,
5125
5147
  className: "group relative flex h-9 w-9 sm:h-10 sm:w-10 items-center justify-center rounded-lg border border-border bg-card hover:bg-muted transition-all duration-200 hover:scale-105 hover:shadow-md focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background",
5126
5148
  "aria-label": g,
5127
- children: /* @__PURE__ */ C(Yr, { className: "h-4 w-4 sm:h-5 sm:w-5 text-muted-foreground group-hover:rotate-90 transition-transform duration-300" })
5149
+ children: /* @__PURE__ */ M(Yr, { className: "h-4 w-4 sm:h-5 sm:w-5 text-muted-foreground group-hover:rotate-90 transition-transform duration-300" })
5128
5150
  }
5129
5151
  )
5130
5152
  ] })
5131
5153
  ] }),
5132
- /* @__PURE__ */ C("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ C(
5154
+ /* @__PURE__ */ M("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ M(
5133
5155
  Ve.div,
5134
5156
  {
5135
5157
  initial: { opacity: 0, y: 20 },