@konstructio/ui 0.1.2-alpha.54 → 0.1.2-alpha.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/components/Button/Button.variants.js +7 -1
  2. package/dist/components/ButtonGroup/ButtonGroup.d.ts +34 -0
  3. package/dist/components/ButtonGroup/ButtonGroup.js +118 -0
  4. package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +92 -0
  5. package/dist/components/ButtonGroup/ButtonGroup.variants.d.ts +13 -0
  6. package/dist/components/ButtonGroup/ButtonGroup.variants.js +31 -0
  7. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.d.ts +3 -0
  8. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +263 -0
  9. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +21 -0
  10. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +26 -0
  11. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +89 -0
  12. package/dist/components/ButtonGroup/components/ButtonGroupItem/index.d.ts +2 -0
  13. package/dist/components/ButtonGroup/components/ButtonGroupItem/index.js +4 -0
  14. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.d.ts +3 -0
  15. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +45 -0
  16. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +8 -0
  17. package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.d.ts +2 -0
  18. package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.js +4 -0
  19. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.d.ts +3 -0
  20. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +37 -0
  21. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +6 -0
  22. package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.d.ts +2 -0
  23. package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.js +4 -0
  24. package/dist/components/ButtonGroup/components/index.d.ts +3 -0
  25. package/dist/components/ButtonGroup/components/index.js +8 -0
  26. package/dist/components/ButtonGroup/hooks/index.d.ts +2 -0
  27. package/dist/components/ButtonGroup/hooks/index.js +4 -0
  28. package/dist/components/ButtonGroup/hooks/useButtonGroup.d.ts +3 -0
  29. package/dist/components/ButtonGroup/hooks/useButtonGroup.js +67 -0
  30. package/dist/components/ButtonGroup/hooks/useButtonGroup.types.d.ts +18 -0
  31. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
  32. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
  33. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +11 -11
  34. package/dist/components/Drawer/Drawer.d.ts +36 -0
  35. package/dist/components/Drawer/Drawer.js +134 -0
  36. package/dist/components/Drawer/Drawer.types.d.ts +65 -0
  37. package/dist/components/Drawer/Drawer.variants.d.ts +8 -0
  38. package/dist/components/Drawer/Drawer.variants.js +92 -0
  39. package/dist/components/Drawer/components/Body/Body.d.ts +3 -0
  40. package/dist/components/Drawer/components/Body/Body.js +24 -0
  41. package/dist/components/Drawer/components/Body/Body.types.d.ts +7 -0
  42. package/dist/components/Drawer/components/Body/index.d.ts +2 -0
  43. package/dist/components/Drawer/components/Body/index.js +4 -0
  44. package/dist/components/Drawer/components/Footer/Footer.d.ts +3 -0
  45. package/dist/components/Drawer/components/Footer/Footer.js +26 -0
  46. package/dist/components/Drawer/components/Footer/Footer.types.d.ts +7 -0
  47. package/dist/components/Drawer/components/Footer/index.d.ts +2 -0
  48. package/dist/components/Drawer/components/Footer/index.js +4 -0
  49. package/dist/components/Drawer/components/Header/Header.d.ts +3 -0
  50. package/dist/components/Drawer/components/Header/Header.js +27 -0
  51. package/dist/components/Drawer/components/Header/Header.types.d.ts +9 -0
  52. package/dist/components/Drawer/components/Header/index.d.ts +2 -0
  53. package/dist/components/Drawer/components/Header/index.js +4 -0
  54. package/dist/components/Drawer/components/index.d.ts +3 -0
  55. package/dist/components/Drawer/components/index.js +8 -0
  56. package/dist/components/Drawer/constants/index.d.ts +6 -0
  57. package/dist/components/Drawer/constants/index.js +9 -0
  58. package/dist/components/Drawer/contexts/Drawer.context.d.ts +7 -0
  59. package/dist/components/Drawer/contexts/Drawer.context.js +6 -0
  60. package/dist/components/Drawer/contexts/index.d.ts +2 -0
  61. package/dist/components/Drawer/contexts/index.js +5 -0
  62. package/dist/components/Drawer/hooks/index.d.ts +2 -0
  63. package/dist/components/Drawer/hooks/index.js +4 -0
  64. package/dist/components/Drawer/hooks/useDrawer.d.ts +2 -0
  65. package/dist/components/Drawer/hooks/useDrawer.js +66 -0
  66. package/dist/components/Drawer/hooks/useDrawer.types.d.ts +30 -0
  67. package/dist/components/PhoneNumberInput/components/Wrapper.js +116 -116
  68. package/dist/components/RadioGroup/RadioGroup.js +34 -33
  69. package/dist/components/RadioGroup/RadioGroup.types.d.ts +3 -1
  70. package/dist/components/Stepper/Stepper.js +29 -25
  71. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.d.ts +1 -2
  72. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +96 -91
  73. package/dist/components/Stepper/components/StepConnector/StepConnector.d.ts +1 -2
  74. package/dist/components/Stepper/components/StepConnector/StepConnector.js +10 -9
  75. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.d.ts +1 -2
  76. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +13 -19
  77. package/dist/components/Stepper/components/StepItem/StepItem.d.ts +1 -2
  78. package/dist/components/Stepper/components/StepItem/StepItem.js +6 -5
  79. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.d.ts +1 -2
  80. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +65 -60
  81. package/dist/components/Stepper/constants/index.d.ts +3 -0
  82. package/dist/components/Stepper/constants/index.js +13 -0
  83. package/dist/components/Stepper/hooks/index.d.ts +1 -0
  84. package/dist/components/Stepper/hooks/index.js +4 -0
  85. package/dist/components/Stepper/hooks/useStepItemLogic.d.ts +2 -0
  86. package/dist/components/Stepper/hooks/useStepItemLogic.js +27 -0
  87. package/dist/components/Stepper/hooks/useStepItemLogic.types.d.ts +16 -0
  88. package/dist/components/Stepper/utils/index.d.ts +3 -0
  89. package/dist/components/Stepper/utils/index.js +13 -0
  90. package/dist/components/Tooltip/Tooltip.variants.d.ts +2 -2
  91. package/dist/components/index.d.ts +2 -0
  92. package/dist/components/index.js +113 -109
  93. package/dist/index.js +115 -111
  94. package/dist/package.json +18 -17
  95. package/dist/{proxy-Drz23HDt.js → proxy-i19-YB39.js} +1044 -1035
  96. package/dist/styles.css +1 -1
  97. package/package.json +15 -16
@@ -1,11 +1,11 @@
1
- import { createContext as yt, useRef as it, useLayoutEffect as br, useEffect as Ue, useContext as O, useId as Ar, useCallback as Is, useMemo as Zt, createElement as Vr, Fragment as Os, useInsertionEffect as js, forwardRef as Dr, Component as Mr } from "react";
2
- import { jsxs as Cr, jsx as Ns } from "react/jsx-runtime";
1
+ import { createContext as yt, useRef as it, useLayoutEffect as Ao, useEffect as Ue, useContext as O, useId as Vo, useCallback as Is, useMemo as Zt, createElement as Do, Fragment as Os, useInsertionEffect as js, forwardRef as Mo, Component as Co } from "react";
2
+ import { jsxs as Eo, jsx as Ns } from "react/jsx-runtime";
3
3
  const Us = yt({});
4
- function Er(t) {
4
+ function Ro(t) {
5
5
  const e = it(null);
6
6
  return e.current === null && (e.current = t()), e.current;
7
7
  }
8
- const Ws = typeof window < "u", Rr = Ws ? br : Ue, We = /* @__PURE__ */ yt(null);
8
+ const Ws = typeof window < "u", Lo = Ws ? Ao : Ue, We = /* @__PURE__ */ yt(null);
9
9
  function Ke(t, e) {
10
10
  t.indexOf(e) === -1 && t.push(e);
11
11
  }
@@ -36,7 +36,7 @@ function Ge(t) {
36
36
  let e;
37
37
  return () => (e === void 0 && (e = t()), e);
38
38
  }
39
- const K = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Lr = (t, e) => (n) => e(t(n)), kt = (...t) => t.reduce(Lr), Mt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
39
+ const K = /* @__NO_SIDE_EFFECTS__ */ (t) => t, ko = (t, e) => (n) => e(t(n)), kt = (...t) => t.reduce(ko), Mt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
40
40
  const s = e - t;
41
41
  return s === 0 ? 1 : (n - t) / s;
42
42
  };
@@ -53,9 +53,9 @@ class _e {
53
53
  if (i === 1)
54
54
  this.subscriptions[0](e, n, s);
55
55
  else
56
- for (let o = 0; o < i; o++) {
57
- const r = this.subscriptions[o];
58
- r && r(e, n, s);
56
+ for (let r = 0; r < i; r++) {
57
+ const o = this.subscriptions[r];
58
+ o && o(e, n, s);
59
59
  }
60
60
  }
61
61
  getSize() {
@@ -69,29 +69,29 @@ const _ = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, W = /* @__NO_SIDE_EFFECTS__
69
69
  function _s(t, e) {
70
70
  return e ? t * (1e3 / e) : 0;
71
71
  }
72
- const Pn = /* @__PURE__ */ new Set();
72
+ const Sn = /* @__PURE__ */ new Set();
73
73
  function He(t, e, n) {
74
- t || Pn.has(e) || (console.warn(ye(e, n)), Pn.add(e));
74
+ t || Sn.has(e) || (console.warn(ye(e, n)), Sn.add(e));
75
75
  }
76
- const Hs = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, kr = 1e-7, Fr = 12;
77
- function Br(t, e, n, s, i) {
78
- let o, r, a = 0;
76
+ const Hs = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Fo = 1e-7, Bo = 12;
77
+ function Io(t, e, n, s, i) {
78
+ let r, o, a = 0;
79
79
  do
80
- r = e + (n - e) / 2, o = Hs(r, s, i) - t, o > 0 ? n = r : e = r;
81
- while (Math.abs(o) > kr && ++a < Fr);
82
- return r;
80
+ o = e + (n - e) / 2, r = Hs(o, s, i) - t, r > 0 ? n = o : e = o;
81
+ while (Math.abs(r) > Fo && ++a < Bo);
82
+ return o;
83
83
  }
84
84
  function Ft(t, e, n, s) {
85
85
  if (t === e && n === s)
86
86
  return K;
87
- const i = (o) => Br(o, 0, 1, t, n);
88
- return (o) => o === 0 || o === 1 ? o : Hs(i(o), e, s);
87
+ const i = (r) => Io(r, 0, 1, t, n);
88
+ return (r) => r === 0 || r === 1 ? r : Hs(i(r), e, s);
89
89
  }
90
- const zs = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Ys = (t) => (e) => 1 - t(1 - e), Xs = /* @__PURE__ */ Ft(0.33, 1.53, 0.69, 0.99), ze = /* @__PURE__ */ Ys(Xs), qs = /* @__PURE__ */ zs(ze), Zs = (t) => (t *= 2) < 1 ? 0.5 * ze(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Ye = (t) => 1 - Math.sin(Math.acos(t)), Js = Ys(Ye), Qs = zs(Ye), Ir = /* @__PURE__ */ Ft(0.42, 0, 1, 1), Or = /* @__PURE__ */ Ft(0, 0, 0.58, 1), ti = /* @__PURE__ */ Ft(0.42, 0, 0.58, 1), jr = (t) => Array.isArray(t) && typeof t[0] != "number", ei = (t) => Array.isArray(t) && typeof t[0] == "number", Sn = {
90
+ const zs = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Ys = (t) => (e) => 1 - t(1 - e), Xs = /* @__PURE__ */ Ft(0.33, 1.53, 0.69, 0.99), ze = /* @__PURE__ */ Ys(Xs), qs = /* @__PURE__ */ zs(ze), Zs = (t) => (t *= 2) < 1 ? 0.5 * ze(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Ye = (t) => 1 - Math.sin(Math.acos(t)), Js = Ys(Ye), Qs = zs(Ye), Oo = /* @__PURE__ */ Ft(0.42, 0, 1, 1), jo = /* @__PURE__ */ Ft(0, 0, 0.58, 1), ti = /* @__PURE__ */ Ft(0.42, 0, 0.58, 1), No = (t) => Array.isArray(t) && typeof t[0] != "number", ei = (t) => Array.isArray(t) && typeof t[0] == "number", Pn = {
91
91
  linear: K,
92
- easeIn: Ir,
92
+ easeIn: Oo,
93
93
  easeInOut: ti,
94
- easeOut: Or,
94
+ easeOut: jo,
95
95
  circIn: Ye,
96
96
  circInOut: Qs,
97
97
  circOut: Js,
@@ -99,13 +99,13 @@ const zs = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Ys
99
99
  backInOut: qs,
100
100
  backOut: Xs,
101
101
  anticipate: Zs
102
- }, Nr = (t) => typeof t == "string", wn = (t) => {
102
+ }, Uo = (t) => typeof t == "string", wn = (t) => {
103
103
  if (ei(t)) {
104
104
  Y(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
105
105
  const [e, n, s, i] = t;
106
106
  return Ft(e, n, s, i);
107
- } else if (Nr(t))
108
- return Y(Sn[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Sn[t];
107
+ } else if (Uo(t))
108
+ return Y(Pn[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Pn[t];
109
109
  return t;
110
110
  }, Ot = [
111
111
  "setup",
@@ -125,76 +125,76 @@ const zs = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Ys
125
125
  "postRender"
126
126
  // Compute
127
127
  ];
128
- function Ur(t, e) {
129
- let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, o = !1;
130
- const r = /* @__PURE__ */ new WeakSet();
128
+ function Wo(t, e) {
129
+ let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, r = !1;
130
+ const o = /* @__PURE__ */ new WeakSet();
131
131
  let a = {
132
132
  delta: 0,
133
133
  timestamp: 0,
134
134
  isProcessing: !1
135
135
  };
136
- function l(c) {
137
- r.has(c) && (u.schedule(c), t()), c(a);
136
+ function l(u) {
137
+ o.has(u) && (c.schedule(u), t()), u(a);
138
138
  }
139
- const u = {
139
+ const c = {
140
140
  /**
141
141
  * Schedule a process to run on the next frame.
142
142
  */
143
- schedule: (c, h = !1, f = !1) => {
143
+ schedule: (u, h = !1, f = !1) => {
144
144
  const m = f && i ? n : s;
145
- return h && r.add(c), m.has(c) || m.add(c), c;
145
+ return h && o.add(u), m.has(u) || m.add(u), u;
146
146
  },
147
147
  /**
148
148
  * Cancel the provided callback from running on the next frame.
149
149
  */
150
- cancel: (c) => {
151
- s.delete(c), r.delete(c);
150
+ cancel: (u) => {
151
+ s.delete(u), o.delete(u);
152
152
  },
153
153
  /**
154
154
  * Execute all schedule callbacks.
155
155
  */
156
- process: (c) => {
157
- if (a = c, i) {
158
- o = !0;
156
+ process: (u) => {
157
+ if (a = u, i) {
158
+ r = !0;
159
159
  return;
160
160
  }
161
- i = !0, [n, s] = [s, n], n.forEach(l), n.clear(), i = !1, o && (o = !1, u.process(c));
161
+ i = !0, [n, s] = [s, n], n.forEach(l), n.clear(), i = !1, r && (r = !1, c.process(u));
162
162
  }
163
163
  };
164
- return u;
164
+ return c;
165
165
  }
166
- const Wr = 40;
166
+ const Ko = 40;
167
167
  function ni(t, e) {
168
168
  let n = !1, s = !0;
169
169
  const i = {
170
170
  delta: 0,
171
171
  timestamp: 0,
172
172
  isProcessing: !1
173
- }, o = () => n = !0, r = Ot.reduce((p, S) => (p[S] = Ur(o), p), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: h, preRender: f, render: d, postRender: m } = r, g = () => {
174
- const p = X.useManualTiming ? i.timestamp : performance.now();
175
- n = !1, X.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(p - i.timestamp, Wr), 1)), i.timestamp = p, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), h.process(i), f.process(i), d.process(i), m.process(i), i.isProcessing = !1, n && e && (s = !1, t(g));
173
+ }, r = () => n = !0, o = Ot.reduce((g, P) => (g[P] = Wo(r), g), {}), { setup: a, read: l, resolveKeyframes: c, preUpdate: u, update: h, preRender: f, render: d, postRender: m } = o, v = () => {
174
+ const g = X.useManualTiming ? i.timestamp : performance.now();
175
+ n = !1, X.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp, Ko), 1)), i.timestamp = g, i.isProcessing = !0, a.process(i), l.process(i), c.process(i), u.process(i), h.process(i), f.process(i), d.process(i), m.process(i), i.isProcessing = !1, n && e && (s = !1, t(v));
176
176
  }, T = () => {
177
- n = !0, s = !0, i.isProcessing || t(g);
177
+ n = !0, s = !0, i.isProcessing || t(v);
178
178
  };
179
- return { schedule: Ot.reduce((p, S) => {
180
- const P = r[S];
181
- return p[S] = (b, C = !1, w = !1) => (n || T(), P.schedule(b, C, w)), p;
182
- }, {}), cancel: (p) => {
183
- for (let S = 0; S < Ot.length; S++)
184
- r[Ot[S]].cancel(p);
185
- }, state: i, steps: r };
179
+ return { schedule: Ot.reduce((g, P) => {
180
+ const S = o[P];
181
+ return g[P] = (b, C = !1, w = !1) => (n || T(), S.schedule(b, C, w)), g;
182
+ }, {}), cancel: (g) => {
183
+ for (let P = 0; P < Ot.length; P++)
184
+ o[Ot[P]].cancel(g);
185
+ }, state: i, steps: o };
186
186
  }
187
187
  const { schedule: A, cancel: J, state: L, steps: ee } = /* @__PURE__ */ ni(typeof requestAnimationFrame < "u" ? requestAnimationFrame : K, !0);
188
188
  let Ut;
189
- function Kr() {
189
+ function $o() {
190
190
  Ut = void 0;
191
191
  }
192
192
  const F = {
193
193
  now: () => (Ut === void 0 && F.set(L.isProcessing || X.useManualTiming ? L.timestamp : performance.now()), Ut),
194
194
  set: (t) => {
195
- Ut = t, queueMicrotask(Kr);
195
+ Ut = t, queueMicrotask($o);
196
196
  }
197
- }, si = (t) => (e) => typeof e == "string" && e.startsWith(t), ii = /* @__PURE__ */ si("--"), $r = /* @__PURE__ */ si("var(--"), Xe = (t) => $r(t) ? Gr.test(t.split("/*")[0].trim()) : !1, Gr = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
197
+ }, si = (t) => (e) => typeof e == "string" && e.startsWith(t), ii = /* @__PURE__ */ si("--"), Go = /* @__PURE__ */ si("var(--"), Xe = (t) => Go(t) ? _o.test(t.split("/*")[0].trim()) : !1, _o = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
198
198
  function bn(t) {
199
199
  return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
200
200
  }
@@ -209,28 +209,28 @@ const Tt = {
209
209
  ...Tt,
210
210
  default: 1
211
211
  }, At = (t) => Math.round(t * 1e5) / 1e5, qe = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
212
- function _r(t) {
212
+ function Ho(t) {
213
213
  return t == null;
214
214
  }
215
- const Hr = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Ze = (t, e) => (n) => !!(typeof n == "string" && Hr.test(n) && n.startsWith(t) || e && !_r(n) && Object.prototype.hasOwnProperty.call(n, e)), ri = (t, e, n) => (s) => {
215
+ const zo = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Ze = (t, e) => (n) => !!(typeof n == "string" && zo.test(n) && n.startsWith(t) || e && !Ho(n) && Object.prototype.hasOwnProperty.call(n, e)), oi = (t, e, n) => (s) => {
216
216
  if (typeof s != "string")
217
217
  return s;
218
- const [i, o, r, a] = s.match(qe);
218
+ const [i, r, o, a] = s.match(qe);
219
219
  return {
220
220
  [t]: parseFloat(i),
221
- [e]: parseFloat(o),
222
- [n]: parseFloat(r),
221
+ [e]: parseFloat(r),
222
+ [n]: parseFloat(o),
223
223
  alpha: a !== void 0 ? parseFloat(a) : 1
224
224
  };
225
- }, zr = (t) => z(0, 255, t), ne = {
225
+ }, Yo = (t) => z(0, 255, t), ne = {
226
226
  ...Tt,
227
- transform: (t) => Math.round(zr(t))
228
- }, rt = {
227
+ transform: (t) => Math.round(Yo(t))
228
+ }, ot = {
229
229
  test: /* @__PURE__ */ Ze("rgb", "red"),
230
- parse: /* @__PURE__ */ ri("red", "green", "blue"),
230
+ parse: /* @__PURE__ */ oi("red", "green", "blue"),
231
231
  transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + ne.transform(t) + ", " + ne.transform(e) + ", " + ne.transform(n) + ", " + At(Ct.transform(s)) + ")"
232
232
  };
233
- function Yr(t) {
233
+ function Xo(t) {
234
234
  let e = "", n = "", s = "", i = "";
235
235
  return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), {
236
236
  red: parseInt(e, 16),
@@ -241,41 +241,41 @@ function Yr(t) {
241
241
  }
242
242
  const ve = {
243
243
  test: /* @__PURE__ */ Ze("#"),
244
- parse: Yr,
245
- transform: rt.transform
244
+ parse: Xo,
245
+ transform: ot.transform
246
246
  }, Bt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
247
247
  test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
248
248
  parse: parseFloat,
249
249
  transform: (e) => `${e}${t}`
250
- }), q = /* @__PURE__ */ Bt("deg"), H = /* @__PURE__ */ Bt("%"), y = /* @__PURE__ */ Bt("px"), Xr = /* @__PURE__ */ Bt("vh"), qr = /* @__PURE__ */ Bt("vw"), An = {
250
+ }), q = /* @__PURE__ */ Bt("deg"), H = /* @__PURE__ */ Bt("%"), y = /* @__PURE__ */ Bt("px"), qo = /* @__PURE__ */ Bt("vh"), Zo = /* @__PURE__ */ Bt("vw"), An = {
251
251
  ...H,
252
252
  parse: (t) => H.parse(t) / 100,
253
253
  transform: (t) => H.transform(t * 100)
254
254
  }, ut = {
255
255
  test: /* @__PURE__ */ Ze("hsl", "hue"),
256
- parse: /* @__PURE__ */ ri("hue", "saturation", "lightness"),
256
+ parse: /* @__PURE__ */ oi("hue", "saturation", "lightness"),
257
257
  transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + H.transform(At(e)) + ", " + H.transform(At(n)) + ", " + At(Ct.transform(s)) + ")"
258
258
  }, M = {
259
- test: (t) => rt.test(t) || ve.test(t) || ut.test(t),
260
- parse: (t) => rt.test(t) ? rt.parse(t) : ut.test(t) ? ut.parse(t) : ve.parse(t),
261
- transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? rt.transform(t) : ut.transform(t),
259
+ test: (t) => ot.test(t) || ve.test(t) || ut.test(t),
260
+ parse: (t) => ot.test(t) ? ot.parse(t) : ut.test(t) ? ut.parse(t) : ve.parse(t),
261
+ transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? ot.transform(t) : ut.transform(t),
262
262
  getAnimatableNone: (t) => {
263
263
  const e = M.parse(t);
264
264
  return e.alpha = 0, M.transform(e);
265
265
  }
266
- }, Zr = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
267
- function Jr(t) {
268
- return isNaN(t) && typeof t == "string" && (t.match(qe)?.length || 0) + (t.match(Zr)?.length || 0) > 0;
266
+ }, Jo = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
267
+ function Qo(t) {
268
+ return isNaN(t) && typeof t == "string" && (t.match(qe)?.length || 0) + (t.match(Jo)?.length || 0) > 0;
269
269
  }
270
- const oi = "number", ai = "color", Qr = "var", to = "var(", Vn = "${}", eo = /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;
270
+ const ri = "number", ai = "color", tr = "var", er = "var(", Vn = "${}", nr = /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;
271
271
  function Et(t) {
272
272
  const e = t.toString(), n = [], s = {
273
273
  color: [],
274
274
  number: [],
275
275
  var: []
276
276
  }, i = [];
277
- let o = 0;
278
- const a = e.replace(eo, (l) => (M.test(l) ? (s.color.push(o), i.push(ai), n.push(M.parse(l))) : l.startsWith(to) ? (s.var.push(o), i.push(Qr), n.push(l)) : (s.number.push(o), i.push(oi), n.push(parseFloat(l))), ++o, Vn)).split(Vn);
277
+ let r = 0;
278
+ const a = e.replace(nr, (l) => (M.test(l) ? (s.color.push(r), i.push(ai), n.push(M.parse(l))) : l.startsWith(er) ? (s.var.push(r), i.push(tr), n.push(l)) : (s.number.push(r), i.push(ri), n.push(parseFloat(l))), ++r, Vn)).split(Vn);
279
279
  return { values: n, split: a, indexes: s, types: i };
280
280
  }
281
281
  function li(t) {
@@ -284,42 +284,42 @@ function li(t) {
284
284
  function ci(t) {
285
285
  const { split: e, types: n } = Et(t), s = e.length;
286
286
  return (i) => {
287
- let o = "";
288
- for (let r = 0; r < s; r++)
289
- if (o += e[r], i[r] !== void 0) {
290
- const a = n[r];
291
- a === oi ? o += At(i[r]) : a === ai ? o += M.transform(i[r]) : o += i[r];
287
+ let r = "";
288
+ for (let o = 0; o < s; o++)
289
+ if (r += e[o], i[o] !== void 0) {
290
+ const a = n[o];
291
+ a === ri ? r += At(i[o]) : a === ai ? r += M.transform(i[o]) : r += i[o];
292
292
  }
293
- return o;
293
+ return r;
294
294
  };
295
295
  }
296
- const no = (t) => typeof t == "number" ? 0 : M.test(t) ? M.getAnimatableNone(t) : t;
297
- function so(t) {
296
+ const sr = (t) => typeof t == "number" ? 0 : M.test(t) ? M.getAnimatableNone(t) : t;
297
+ function ir(t) {
298
298
  const e = li(t);
299
- return ci(t)(e.map(no));
299
+ return ci(t)(e.map(sr));
300
300
  }
301
301
  const Q = {
302
- test: Jr,
302
+ test: Qo,
303
303
  parse: li,
304
304
  createTransformer: ci,
305
- getAnimatableNone: so
305
+ getAnimatableNone: ir
306
306
  };
307
307
  function se(t, e, n) {
308
308
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
309
309
  }
310
- function io({ hue: t, saturation: e, lightness: n, alpha: s }) {
310
+ function or({ hue: t, saturation: e, lightness: n, alpha: s }) {
311
311
  t /= 360, e /= 100, n /= 100;
312
- let i = 0, o = 0, r = 0;
312
+ let i = 0, r = 0, o = 0;
313
313
  if (!e)
314
- i = o = r = n;
314
+ i = r = o = n;
315
315
  else {
316
316
  const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
317
- i = se(l, a, t + 1 / 3), o = se(l, a, t), r = se(l, a, t - 1 / 3);
317
+ i = se(l, a, t + 1 / 3), r = se(l, a, t), o = se(l, a, t - 1 / 3);
318
318
  }
319
319
  return {
320
320
  red: Math.round(i * 255),
321
- green: Math.round(o * 255),
322
- blue: Math.round(r * 255),
321
+ green: Math.round(r * 255),
322
+ blue: Math.round(o * 255),
323
323
  alpha: s
324
324
  };
325
325
  }
@@ -329,64 +329,64 @@ function Gt(t, e) {
329
329
  const D = (t, e, n) => t + (e - t) * n, ie = (t, e, n) => {
330
330
  const s = t * t, i = n * (e * e - s) + s;
331
331
  return i < 0 ? 0 : Math.sqrt(i);
332
- }, ro = [ve, rt, ut], oo = (t) => ro.find((e) => e.test(t));
332
+ }, rr = [ve, ot, ut], ar = (t) => rr.find((e) => e.test(t));
333
333
  function Dn(t) {
334
- const e = oo(t);
334
+ const e = ar(t);
335
335
  if (vt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
336
336
  return !1;
337
337
  let n = e.parse(t);
338
- return e === ut && (n = io(n)), n;
338
+ return e === ut && (n = or(n)), n;
339
339
  }
340
340
  const Mn = (t, e) => {
341
341
  const n = Dn(t), s = Dn(e);
342
342
  if (!n || !s)
343
343
  return Gt(t, e);
344
344
  const i = { ...n };
345
- return (o) => (i.red = ie(n.red, s.red, o), i.green = ie(n.green, s.green, o), i.blue = ie(n.blue, s.blue, o), i.alpha = D(n.alpha, s.alpha, o), rt.transform(i));
345
+ return (r) => (i.red = ie(n.red, s.red, r), i.green = ie(n.green, s.green, r), i.blue = ie(n.blue, s.blue, r), i.alpha = D(n.alpha, s.alpha, r), ot.transform(i));
346
346
  }, Te = /* @__PURE__ */ new Set(["none", "hidden"]);
347
- function ao(t, e) {
347
+ function lr(t, e) {
348
348
  return Te.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
349
349
  }
350
- function lo(t, e) {
350
+ function cr(t, e) {
351
351
  return (n) => D(t, e, n);
352
352
  }
353
353
  function Je(t) {
354
- return typeof t == "number" ? lo : typeof t == "string" ? Xe(t) ? Gt : M.test(t) ? Mn : ho : Array.isArray(t) ? ui : typeof t == "object" ? M.test(t) ? Mn : co : Gt;
354
+ return typeof t == "number" ? cr : typeof t == "string" ? Xe(t) ? Gt : M.test(t) ? Mn : fr : Array.isArray(t) ? ui : typeof t == "object" ? M.test(t) ? Mn : ur : Gt;
355
355
  }
356
356
  function ui(t, e) {
357
- const n = [...t], s = n.length, i = t.map((o, r) => Je(o)(o, e[r]));
358
- return (o) => {
359
- for (let r = 0; r < s; r++)
360
- n[r] = i[r](o);
357
+ const n = [...t], s = n.length, i = t.map((r, o) => Je(r)(r, e[o]));
358
+ return (r) => {
359
+ for (let o = 0; o < s; o++)
360
+ n[o] = i[o](r);
361
361
  return n;
362
362
  };
363
363
  }
364
- function co(t, e) {
364
+ function ur(t, e) {
365
365
  const n = { ...t, ...e }, s = {};
366
366
  for (const i in n)
367
367
  t[i] !== void 0 && e[i] !== void 0 && (s[i] = Je(t[i])(t[i], e[i]));
368
368
  return (i) => {
369
- for (const o in s)
370
- n[o] = s[o](i);
369
+ for (const r in s)
370
+ n[r] = s[r](i);
371
371
  return n;
372
372
  };
373
373
  }
374
- function uo(t, e) {
374
+ function hr(t, e) {
375
375
  const n = [], s = { color: 0, var: 0, number: 0 };
376
376
  for (let i = 0; i < e.values.length; i++) {
377
- const o = e.types[i], r = t.indexes[o][s[o]], a = t.values[r] ?? 0;
378
- n[i] = a, s[o]++;
377
+ const r = e.types[i], o = t.indexes[r][s[r]], a = t.values[o] ?? 0;
378
+ n[i] = a, s[r]++;
379
379
  }
380
380
  return n;
381
381
  }
382
- const ho = (t, e) => {
382
+ const fr = (t, e) => {
383
383
  const n = Q.createTransformer(e), s = Et(t), i = Et(e);
384
- return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Te.has(t) && !i.values.length || Te.has(e) && !s.values.length ? ao(t, e) : kt(ui(uo(s, i), i.values), n) : (vt(!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"), Gt(t, e));
384
+ return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Te.has(t) && !i.values.length || Te.has(e) && !s.values.length ? lr(t, e) : kt(ui(hr(s, i), i.values), n) : (vt(!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"), Gt(t, e));
385
385
  };
386
386
  function hi(t, e, n) {
387
387
  return typeof t == "number" && typeof e == "number" && typeof n == "number" ? D(t, e, n) : Je(t)(t, e);
388
388
  }
389
- const fo = (t) => {
389
+ const dr = (t) => {
390
390
  const e = ({ timestamp: n }) => t(n);
391
391
  return {
392
392
  start: (n = !0) => A.update(e, n),
@@ -400,8 +400,8 @@ const fo = (t) => {
400
400
  }, fi = (t, e, n = 10) => {
401
401
  let s = "";
402
402
  const i = Math.max(Math.round(e / n), 2);
403
- for (let o = 0; o < i; o++)
404
- s += Math.round(t(o / (i - 1)) * 1e4) / 1e4 + ", ";
403
+ for (let r = 0; r < i; r++)
404
+ s += Math.round(t(r / (i - 1)) * 1e4) / 1e4 + ", ";
405
405
  return `linear(${s.substring(0, s.length - 2)})`;
406
406
  }, _t = 2e4;
407
407
  function Qe(t) {
@@ -412,17 +412,17 @@ function Qe(t) {
412
412
  e += n, s = t.next(e);
413
413
  return e >= _t ? 1 / 0 : e;
414
414
  }
415
- function mo(t, e = 100, n) {
415
+ function mr(t, e = 100, n) {
416
416
  const s = n({ ...t, keyframes: [0, e] }), i = Math.min(Qe(s), _t);
417
417
  return {
418
418
  type: "keyframes",
419
- ease: (o) => s.next(i * o).value / e,
419
+ ease: (r) => s.next(i * r).value / e,
420
420
  duration: /* @__PURE__ */ W(i)
421
421
  };
422
422
  }
423
- const po = 5;
423
+ const pr = 5;
424
424
  function di(t, e, n) {
425
- const s = Math.max(e - po, 0);
425
+ const s = Math.max(e - pr, 0);
426
426
  return _s(n - t(s), e - s);
427
427
  }
428
428
  const V = {
@@ -453,25 +453,25 @@ const V = {
453
453
  // in seconds
454
454
  minDamping: 0.05,
455
455
  maxDamping: 1
456
- }, re = 1e-3;
457
- function go({ duration: t = V.duration, bounce: e = V.bounce, velocity: n = V.velocity, mass: s = V.mass }) {
458
- let i, o;
456
+ }, oe = 1e-3;
457
+ function gr({ duration: t = V.duration, bounce: e = V.bounce, velocity: n = V.velocity, mass: s = V.mass }) {
458
+ let i, r;
459
459
  vt(t <= /* @__PURE__ */ _(V.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
460
- let r = 1 - e;
461
- r = z(V.minDamping, V.maxDamping, r), t = z(V.minDuration, V.maxDuration, /* @__PURE__ */ W(t)), r < 1 ? (i = (u) => {
462
- const c = u * r, h = c * t, f = c - n, d = xe(u, r), m = Math.exp(-h);
463
- return re - f / d * m;
464
- }, o = (u) => {
465
- const h = u * r * t, f = h * n + n, d = Math.pow(r, 2) * Math.pow(u, 2) * t, m = Math.exp(-h), g = xe(Math.pow(u, 2), r);
466
- return (-i(u) + re > 0 ? -1 : 1) * ((f - d) * m) / g;
467
- }) : (i = (u) => {
468
- const c = Math.exp(-u * t), h = (u - n) * t + 1;
469
- return -re + c * h;
470
- }, o = (u) => {
471
- const c = Math.exp(-u * t), h = (n - u) * (t * t);
472
- return c * h;
460
+ let o = 1 - e;
461
+ o = z(V.minDamping, V.maxDamping, o), t = z(V.minDuration, V.maxDuration, /* @__PURE__ */ W(t)), o < 1 ? (i = (c) => {
462
+ const u = c * o, h = u * t, f = u - n, d = xe(c, o), m = Math.exp(-h);
463
+ return oe - f / d * m;
464
+ }, r = (c) => {
465
+ const h = c * o * t, f = h * n + n, d = Math.pow(o, 2) * Math.pow(c, 2) * t, m = Math.exp(-h), v = xe(Math.pow(c, 2), o);
466
+ return (-i(c) + oe > 0 ? -1 : 1) * ((f - d) * m) / v;
467
+ }) : (i = (c) => {
468
+ const u = Math.exp(-c * t), h = (c - n) * t + 1;
469
+ return -oe + u * h;
470
+ }, r = (c) => {
471
+ const u = Math.exp(-c * t), h = (n - c) * (t * t);
472
+ return u * h;
473
473
  });
474
- const a = 5 / t, l = vo(i, o, a);
474
+ const a = 5 / t, l = vr(i, r, a);
475
475
  if (t = /* @__PURE__ */ _(t), isNaN(l))
476
476
  return {
477
477
  stiffness: V.stiffness,
@@ -479,29 +479,29 @@ function go({ duration: t = V.duration, bounce: e = V.bounce, velocity: n = V.ve
479
479
  duration: t
480
480
  };
481
481
  {
482
- const u = Math.pow(l, 2) * s;
482
+ const c = Math.pow(l, 2) * s;
483
483
  return {
484
- stiffness: u,
485
- damping: r * 2 * Math.sqrt(s * u),
484
+ stiffness: c,
485
+ damping: o * 2 * Math.sqrt(s * c),
486
486
  duration: t
487
487
  };
488
488
  }
489
489
  }
490
- const yo = 12;
491
- function vo(t, e, n) {
490
+ const yr = 12;
491
+ function vr(t, e, n) {
492
492
  let s = n;
493
- for (let i = 1; i < yo; i++)
493
+ for (let i = 1; i < yr; i++)
494
494
  s = s - t(s) / e(s);
495
495
  return s;
496
496
  }
497
497
  function xe(t, e) {
498
498
  return t * Math.sqrt(1 - e * e);
499
499
  }
500
- const To = ["duration", "bounce"], xo = ["stiffness", "damping", "mass"];
500
+ const Tr = ["duration", "bounce"], xr = ["stiffness", "damping", "mass"];
501
501
  function Cn(t, e) {
502
502
  return e.some((n) => t[n] !== void 0);
503
503
  }
504
- function Po(t) {
504
+ function Sr(t) {
505
505
  let e = {
506
506
  velocity: V.velocity,
507
507
  stiffness: V.stiffness,
@@ -510,17 +510,17 @@ function Po(t) {
510
510
  isResolvedFromDuration: !1,
511
511
  ...t
512
512
  };
513
- if (!Cn(t, xo) && Cn(t, To))
513
+ if (!Cn(t, xr) && Cn(t, Tr))
514
514
  if (t.visualDuration) {
515
- const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, o = 2 * z(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
515
+ const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * z(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
516
516
  e = {
517
517
  ...e,
518
518
  mass: V.mass,
519
519
  stiffness: i,
520
- damping: o
520
+ damping: r
521
521
  };
522
522
  } else {
523
- const n = go(t);
523
+ const n = gr(t);
524
524
  e = {
525
525
  ...e,
526
526
  ...n,
@@ -536,166 +536,166 @@ function Ht(t = V.visualDuration, e = V.bounce) {
536
536
  bounce: e
537
537
  } : t;
538
538
  let { restSpeed: s, restDelta: i } = n;
539
- 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 } = Po({
539
+ const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: l, damping: c, mass: u, duration: h, velocity: f, isResolvedFromDuration: d } = Sr({
540
540
  ...n,
541
541
  velocity: -/* @__PURE__ */ W(n.velocity || 0)
542
- }), m = f || 0, g = u / (2 * Math.sqrt(l * c)), T = r - o, v = /* @__PURE__ */ W(Math.sqrt(l / c)), x = Math.abs(T) < 5;
542
+ }), m = f || 0, v = c / (2 * Math.sqrt(l * u)), T = o - r, p = /* @__PURE__ */ W(Math.sqrt(l / u)), x = Math.abs(T) < 5;
543
543
  s || (s = x ? V.restSpeed.granular : V.restSpeed.default), i || (i = x ? V.restDelta.granular : V.restDelta.default);
544
- let p;
545
- if (g < 1) {
546
- const P = xe(v, g);
547
- p = (b) => {
548
- const C = Math.exp(-g * v * b);
549
- return r - C * ((m + g * v * T) / P * Math.sin(P * b) + T * Math.cos(P * b));
544
+ let g;
545
+ if (v < 1) {
546
+ const S = xe(p, v);
547
+ g = (b) => {
548
+ const C = Math.exp(-v * p * b);
549
+ return o - C * ((m + v * p * T) / S * Math.sin(S * b) + T * Math.cos(S * b));
550
550
  };
551
- } else if (g === 1)
552
- p = (P) => r - Math.exp(-v * P) * (T + (m + v * T) * P);
551
+ } else if (v === 1)
552
+ g = (S) => o - Math.exp(-p * S) * (T + (m + p * T) * S);
553
553
  else {
554
- const P = v * Math.sqrt(g * g - 1);
555
- p = (b) => {
556
- const C = Math.exp(-g * v * b), w = Math.min(P * b, 300);
557
- return r - C * ((m + g * v * T) * Math.sinh(w) + P * T * Math.cosh(w)) / P;
554
+ const S = p * Math.sqrt(v * v - 1);
555
+ g = (b) => {
556
+ const C = Math.exp(-v * p * b), w = Math.min(S * b, 300);
557
+ return o - C * ((m + v * p * T) * Math.sinh(w) + S * T * Math.cosh(w)) / S;
558
558
  };
559
559
  }
560
- const S = {
560
+ const P = {
561
561
  calculatedDuration: d && h || null,
562
- next: (P) => {
563
- const b = p(P);
562
+ next: (S) => {
563
+ const b = g(S);
564
564
  if (d)
565
- a.done = P >= h;
565
+ a.done = S >= h;
566
566
  else {
567
- let C = P === 0 ? m : 0;
568
- g < 1 && (C = P === 0 ? /* @__PURE__ */ _(m) : di(p, P, b));
569
- const w = Math.abs(C) <= s, I = Math.abs(r - b) <= i;
567
+ let C = S === 0 ? m : 0;
568
+ v < 1 && (C = S === 0 ? /* @__PURE__ */ _(m) : di(g, S, b));
569
+ const w = Math.abs(C) <= s, I = Math.abs(o - b) <= i;
570
570
  a.done = w && I;
571
571
  }
572
- return a.value = a.done ? r : b, a;
572
+ return a.value = a.done ? o : b, a;
573
573
  },
574
574
  toString: () => {
575
- const P = Math.min(Qe(S), _t), b = fi((C) => S.next(P * C).value, P, 30);
576
- return P + "ms " + b;
575
+ const S = Math.min(Qe(P), _t), b = fi((C) => P.next(S * C).value, S, 30);
576
+ return S + "ms " + b;
577
577
  },
578
578
  toTransition: () => {
579
579
  }
580
580
  };
581
- return S;
581
+ return P;
582
582
  }
583
583
  Ht.applyToOptions = (t) => {
584
- const e = mo(t, 100, Ht);
584
+ const e = mr(t, 100, Ht);
585
585
  return t.ease = e.ease, t.duration = /* @__PURE__ */ _(e.duration), t.type = "keyframes", t;
586
586
  };
587
- function Pe({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
587
+ function Se({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
588
588
  const h = t[0], f = {
589
589
  done: !1,
590
590
  value: h
591
591
  }, 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;
592
- let g = n * e;
593
- const T = h + g, v = r === void 0 ? T : r(T);
594
- v !== T && (g = v - h);
595
- const x = (w) => -g * Math.exp(-w / s), p = (w) => v + x(w), S = (w) => {
596
- const I = x(w), j = p(w);
597
- f.done = Math.abs(I) <= u, f.value = f.done ? v : j;
592
+ let v = n * e;
593
+ const T = h + v, p = o === void 0 ? T : o(T);
594
+ p !== T && (v = p - h);
595
+ const x = (w) => -v * Math.exp(-w / s), g = (w) => p + x(w), P = (w) => {
596
+ const I = x(w), j = g(w);
597
+ f.done = Math.abs(I) <= c, f.value = f.done ? p : j;
598
598
  };
599
- let P, b;
599
+ let S, b;
600
600
  const C = (w) => {
601
- d(f.value) && (P = w, b = Ht({
601
+ d(f.value) && (S = w, b = Ht({
602
602
  keyframes: [f.value, m(f.value)],
603
- velocity: di(p, w, f.value),
603
+ velocity: di(g, w, f.value),
604
604
  // TODO: This should be passing * 1000
605
605
  damping: i,
606
- stiffness: o,
607
- restDelta: u,
608
- restSpeed: c
606
+ stiffness: r,
607
+ restDelta: c,
608
+ restSpeed: u
609
609
  }));
610
610
  };
611
611
  return C(0), {
612
612
  calculatedDuration: null,
613
613
  next: (w) => {
614
614
  let I = !1;
615
- return !b && P === void 0 && (I = !0, S(w), C(w)), P !== void 0 && w >= P ? b.next(w - P) : (!I && S(w), f);
615
+ return !b && S === void 0 && (I = !0, P(w), C(w)), S !== void 0 && w >= S ? b.next(w - S) : (!I && P(w), f);
616
616
  }
617
617
  };
618
618
  }
619
- function So(t, e, n) {
620
- const s = [], i = n || X.mix || hi, o = t.length - 1;
621
- for (let r = 0; r < o; r++) {
622
- let a = i(t[r], t[r + 1]);
619
+ function Pr(t, e, n) {
620
+ const s = [], i = n || X.mix || hi, r = t.length - 1;
621
+ for (let o = 0; o < r; o++) {
622
+ let a = i(t[o], t[o + 1]);
623
623
  if (e) {
624
- const l = Array.isArray(e) ? e[r] || K : e;
624
+ const l = Array.isArray(e) ? e[o] || K : e;
625
625
  a = kt(l, a);
626
626
  }
627
627
  s.push(a);
628
628
  }
629
629
  return s;
630
630
  }
631
- function wo(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
632
- const o = t.length;
633
- if (Y(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1)
631
+ function wr(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
632
+ const r = t.length;
633
+ if (Y(r === e.length, "Both input and output ranges must be the same length", "range-length"), r === 1)
634
634
  return () => e[0];
635
- if (o === 2 && e[0] === e[1])
635
+ if (r === 2 && e[0] === e[1])
636
636
  return () => e[1];
637
- const r = t[0] === t[1];
638
- t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
639
- const a = So(e, s, i), l = a.length, u = (c) => {
640
- if (r && c < t[0])
637
+ const o = t[0] === t[1];
638
+ t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
639
+ const a = Pr(e, s, i), l = a.length, c = (u) => {
640
+ if (o && u < t[0])
641
641
  return e[0];
642
642
  let h = 0;
643
643
  if (l > 1)
644
- for (; h < t.length - 2 && !(c < t[h + 1]); h++)
644
+ for (; h < t.length - 2 && !(u < t[h + 1]); h++)
645
645
  ;
646
- const f = /* @__PURE__ */ Mt(t[h], t[h + 1], c);
646
+ const f = /* @__PURE__ */ Mt(t[h], t[h + 1], u);
647
647
  return a[h](f);
648
648
  };
649
- return n ? (c) => u(z(t[0], t[o - 1], c)) : u;
649
+ return n ? (u) => c(z(t[0], t[r - 1], u)) : c;
650
650
  }
651
- function bo(t, e) {
651
+ function br(t, e) {
652
652
  const n = t[t.length - 1];
653
653
  for (let s = 1; s <= e; s++) {
654
654
  const i = /* @__PURE__ */ Mt(0, e, s);
655
655
  t.push(D(n, 1, i));
656
656
  }
657
657
  }
658
- function Ao(t) {
658
+ function Ar(t) {
659
659
  const e = [0];
660
- return bo(e, t.length - 1), e;
660
+ return br(e, t.length - 1), e;
661
661
  }
662
- function Vo(t, e) {
662
+ function Vr(t, e) {
663
663
  return t.map((n) => n * e);
664
664
  }
665
- function Do(t, e) {
665
+ function Dr(t, e) {
666
666
  return t.map(() => e || ti).splice(0, t.length - 1);
667
667
  }
668
668
  function ht({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
669
- const i = jr(s) ? s.map(wn) : wn(s), o = {
669
+ const i = No(s) ? s.map(wn) : wn(s), r = {
670
670
  done: !1,
671
671
  value: e[0]
672
- }, r = Vo(
672
+ }, o = Vr(
673
673
  // Only use the provided offsets if they're the correct length
674
674
  // TODO Maybe we should warn here if there's a length mismatch
675
- n && n.length === e.length ? n : Ao(e),
675
+ n && n.length === e.length ? n : Ar(e),
676
676
  t
677
- ), a = wo(r, e, {
678
- ease: Array.isArray(i) ? i : Do(e, i)
677
+ ), a = wr(o, e, {
678
+ ease: Array.isArray(i) ? i : Dr(e, i)
679
679
  });
680
680
  return {
681
681
  calculatedDuration: t,
682
- next: (l) => (o.value = a(l), o.done = l >= t, o)
682
+ next: (l) => (r.value = a(l), r.done = l >= t, r)
683
683
  };
684
684
  }
685
- const Mo = (t) => t !== null;
685
+ const Mr = (t) => t !== null;
686
686
  function tn(t, { repeat: e, repeatType: n = "loop" }, s, i = 1) {
687
- const o = t.filter(Mo), a = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
688
- return !a || s === void 0 ? o[a] : s;
687
+ const r = t.filter(Mr), a = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : r.length - 1;
688
+ return !a || s === void 0 ? r[a] : s;
689
689
  }
690
- const Co = {
691
- decay: Pe,
692
- inertia: Pe,
690
+ const Cr = {
691
+ decay: Se,
692
+ inertia: Se,
693
693
  tween: ht,
694
694
  keyframes: ht,
695
695
  spring: Ht
696
696
  };
697
697
  function mi(t) {
698
- typeof t.type == "string" && (t.type = Co[t.type]);
698
+ typeof t.type == "string" && (t.type = Cr[t.type]);
699
699
  }
700
700
  class en {
701
701
  constructor() {
@@ -721,7 +721,7 @@ class en {
721
721
  return this.finished.then(e, n);
722
722
  }
723
723
  }
724
- const Eo = (t) => t / 100;
724
+ const Er = (t) => t / 100;
725
725
  class nn extends en {
726
726
  constructor(e) {
727
727
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
@@ -732,43 +732,43 @@ class nn extends en {
732
732
  initAnimation() {
733
733
  const { options: e } = this;
734
734
  mi(e);
735
- const { type: n = ht, repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = e;
735
+ const { type: n = ht, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = e;
736
736
  let { keyframes: a } = e;
737
737
  const l = n || ht;
738
- process.env.NODE_ENV !== "production" && l !== ht && Y(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== ht && typeof a[0] != "number" && (this.mixKeyframes = kt(Eo, hi(a[0], a[1])), a = [0, 100]);
739
- const u = l({ ...e, keyframes: a });
740
- o === "mirror" && (this.mirroredGenerator = l({
738
+ process.env.NODE_ENV !== "production" && l !== ht && Y(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== ht && typeof a[0] != "number" && (this.mixKeyframes = kt(Er, hi(a[0], a[1])), a = [0, 100]);
739
+ const c = l({ ...e, keyframes: a });
740
+ r === "mirror" && (this.mirroredGenerator = l({
741
741
  ...e,
742
742
  keyframes: [...a].reverse(),
743
- velocity: -r
744
- })), u.calculatedDuration === null && (u.calculatedDuration = Qe(u));
745
- const { calculatedDuration: c } = u;
746
- this.calculatedDuration = c, this.resolvedDuration = c + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = u;
743
+ velocity: -o
744
+ })), c.calculatedDuration === null && (c.calculatedDuration = Qe(c));
745
+ const { calculatedDuration: u } = c;
746
+ this.calculatedDuration = u, this.resolvedDuration = u + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = c;
747
747
  }
748
748
  updateTime(e) {
749
749
  const n = Math.round(e - this.startTime) * this.playbackSpeed;
750
750
  this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
751
751
  }
752
752
  tick(e, n = !1) {
753
- const { generator: s, totalDuration: i, mixKeyframes: o, mirroredGenerator: r, resolvedDuration: a, calculatedDuration: l } = this;
753
+ const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: l } = this;
754
754
  if (this.startTime === null)
755
755
  return s.next(0);
756
- const { delay: u = 0, keyframes: c, repeat: h, repeatType: f, repeatDelay: d, type: m, onUpdate: g, finalKeyframe: T } = this.options;
756
+ const { delay: c = 0, keyframes: u, repeat: h, repeatType: f, repeatDelay: d, type: m, onUpdate: v, finalKeyframe: T } = this.options;
757
757
  this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
758
- const v = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), x = this.playbackSpeed >= 0 ? v < 0 : v > i;
759
- this.currentTime = Math.max(v, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
760
- let p = this.currentTime, S = s;
758
+ const p = this.currentTime - c * (this.playbackSpeed >= 0 ? 1 : -1), x = this.playbackSpeed >= 0 ? p < 0 : p > i;
759
+ this.currentTime = Math.max(p, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
760
+ let g = this.currentTime, P = s;
761
761
  if (h) {
762
762
  const w = Math.min(this.currentTime, i) / a;
763
763
  let I = Math.floor(w), j = w % 1;
764
- !j && w >= 1 && (j = 1), j === 1 && I--, I = Math.min(I, h + 1), I % 2 && (f === "reverse" ? (j = 1 - j, d && (j -= d / a)) : f === "mirror" && (S = r)), p = z(0, 1, j) * a;
764
+ !j && w >= 1 && (j = 1), j === 1 && I--, I = Math.min(I, h + 1), I % 2 && (f === "reverse" ? (j = 1 - j, d && (j -= d / a)) : f === "mirror" && (P = o)), g = z(0, 1, j) * a;
765
765
  }
766
- const P = x ? { done: !1, value: c[0] } : S.next(p);
767
- o && (P.value = o(P.value));
768
- let { done: b } = P;
766
+ const S = x ? { done: !1, value: u[0] } : P.next(g);
767
+ r && (S.value = r(S.value));
768
+ let { done: b } = S;
769
769
  !x && l !== null && (b = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
770
770
  const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && b);
771
- return C && m !== Pe && (P.value = tn(c, this.options, T, this.speed)), g && g(P.value), C && this.finish(), P;
771
+ return C && m !== Se && (S.value = tn(u, this.options, T, this.speed)), v && v(S.value), C && this.finish(), S;
772
772
  }
773
773
  /**
774
774
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -802,7 +802,7 @@ class nn extends en {
802
802
  play() {
803
803
  if (this.isStopped)
804
804
  return;
805
- const { driver: e = fo, startTime: n } = this.options;
805
+ const { driver: e = dr, startTime: n } = this.options;
806
806
  this.driver || (this.driver = e((i) => this.tick(i))), this.options.onPlay?.();
807
807
  const s = this.driver.now();
808
808
  this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
@@ -832,14 +832,14 @@ class nn extends en {
832
832
  return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), e.observe(this);
833
833
  }
834
834
  }
835
- function Ro(t) {
835
+ function Rr(t) {
836
836
  for (let e = 1; e < t.length; e++)
837
837
  t[e] ?? (t[e] = t[e - 1]);
838
838
  }
839
- const ot = (t) => t * 180 / Math.PI, Se = (t) => {
840
- const e = ot(Math.atan2(t[1], t[0]));
839
+ const rt = (t) => t * 180 / Math.PI, Pe = (t) => {
840
+ const e = rt(Math.atan2(t[1], t[0]));
841
841
  return we(e);
842
- }, Lo = {
842
+ }, Lr = {
843
843
  x: 4,
844
844
  y: 5,
845
845
  translateX: 4,
@@ -847,12 +847,12 @@ const ot = (t) => t * 180 / Math.PI, Se = (t) => {
847
847
  scaleX: 0,
848
848
  scaleY: 3,
849
849
  scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
850
- rotate: Se,
851
- rotateZ: Se,
852
- skewX: (t) => ot(Math.atan(t[1])),
853
- skewY: (t) => ot(Math.atan(t[2])),
850
+ rotate: Pe,
851
+ rotateZ: Pe,
852
+ skewX: (t) => rt(Math.atan(t[1])),
853
+ skewY: (t) => rt(Math.atan(t[2])),
854
854
  skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
855
- }, we = (t) => (t = t % 360, t < 0 && (t += 360), t), En = Se, Rn = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Ln = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), ko = {
855
+ }, we = (t) => (t = t % 360, t < 0 && (t += 360), t), En = Pe, Rn = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Ln = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), kr = {
856
856
  x: 12,
857
857
  y: 13,
858
858
  z: 14,
@@ -862,12 +862,12 @@ const ot = (t) => t * 180 / Math.PI, Se = (t) => {
862
862
  scaleX: Rn,
863
863
  scaleY: Ln,
864
864
  scale: (t) => (Rn(t) + Ln(t)) / 2,
865
- rotateX: (t) => we(ot(Math.atan2(t[6], t[5]))),
866
- rotateY: (t) => we(ot(Math.atan2(-t[2], t[0]))),
865
+ rotateX: (t) => we(rt(Math.atan2(t[6], t[5]))),
866
+ rotateY: (t) => we(rt(Math.atan2(-t[2], t[0]))),
867
867
  rotateZ: En,
868
868
  rotate: En,
869
- skewX: (t) => ot(Math.atan(t[4])),
870
- skewY: (t) => ot(Math.atan(t[1])),
869
+ skewX: (t) => rt(Math.atan(t[4])),
870
+ skewY: (t) => rt(Math.atan(t[1])),
871
871
  skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
872
872
  };
873
873
  function be(t) {
@@ -879,21 +879,21 @@ function Ae(t, e) {
879
879
  const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
880
880
  let s, i;
881
881
  if (n)
882
- s = ko, i = n;
882
+ s = kr, i = n;
883
883
  else {
884
884
  const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
885
- s = Lo, i = a;
885
+ s = Lr, i = a;
886
886
  }
887
887
  if (!i)
888
888
  return be(e);
889
- const o = s[e], r = i[1].split(",").map(Bo);
890
- return typeof o == "function" ? o(r) : r[o];
889
+ const r = s[e], o = i[1].split(",").map(Br);
890
+ return typeof r == "function" ? r(o) : o[r];
891
891
  }
892
- const Fo = (t, e) => {
892
+ const Fr = (t, e) => {
893
893
  const { transform: n = "none" } = getComputedStyle(t);
894
894
  return Ae(n, e);
895
895
  };
896
- function Bo(t) {
896
+ function Br(t) {
897
897
  return parseFloat(t.trim());
898
898
  }
899
899
  const xt = [
@@ -914,10 +914,10 @@ const xt = [
914
914
  "skew",
915
915
  "skewX",
916
916
  "skewY"
917
- ], Pt = new Set(xt), kn = (t) => t === Tt || t === y, Io = /* @__PURE__ */ new Set(["x", "y", "z"]), Oo = xt.filter((t) => !Io.has(t));
918
- function jo(t) {
917
+ ], St = new Set(xt), kn = (t) => t === Tt || t === y, Ir = /* @__PURE__ */ new Set(["x", "y", "z"]), Or = xt.filter((t) => !Ir.has(t));
918
+ function jr(t) {
919
919
  const e = [];
920
- return Oo.forEach((n) => {
920
+ return Or.forEach((n) => {
921
921
  const s = t.getValue(n);
922
922
  s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
923
923
  }), e;
@@ -942,13 +942,13 @@ function pi() {
942
942
  if (De) {
943
943
  const t = Array.from(at).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
944
944
  e.forEach((s) => {
945
- const i = jo(s);
945
+ const i = jr(s);
946
946
  i.length && (n.set(s, i), s.render());
947
947
  }), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
948
948
  s.render();
949
949
  const i = n.get(s);
950
- i && i.forEach(([o, r]) => {
951
- s.getValue(o)?.set(r);
950
+ i && i.forEach(([r, o]) => {
951
+ s.getValue(r)?.set(o);
952
952
  });
953
953
  }), t.forEach((s) => s.measureEndState()), t.forEach((s) => {
954
954
  s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
@@ -961,12 +961,12 @@ function gi() {
961
961
  t.readKeyframes(), t.needsMeasurement && (De = !0);
962
962
  });
963
963
  }
964
- function No() {
964
+ function Nr() {
965
965
  Me = !0, gi(), pi(), Me = !1;
966
966
  }
967
967
  class sn {
968
- constructor(e, n, s, i, o, r = !1) {
969
- this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = o, this.isAsync = r;
968
+ constructor(e, n, s, i, r, o = !1) {
969
+ this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
970
970
  }
971
971
  scheduleResolve() {
972
972
  this.state = "scheduled", this.isAsync ? (at.add(this), Ve || (Ve = !0, A.read(gi), A.resolveKeyframes(pi))) : (this.readKeyframes(), this.complete());
@@ -974,16 +974,16 @@ class sn {
974
974
  readKeyframes() {
975
975
  const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
976
976
  if (e[0] === null) {
977
- const o = i?.get(), r = e[e.length - 1];
978
- if (o !== void 0)
979
- e[0] = o;
977
+ const r = i?.get(), o = e[e.length - 1];
978
+ if (r !== void 0)
979
+ e[0] = r;
980
980
  else if (s && n) {
981
- const a = s.readValue(n, r);
981
+ const a = s.readValue(n, o);
982
982
  a != null && (e[0] = a);
983
983
  }
984
- e[0] === void 0 && (e[0] = r), i && o === void 0 && i.set(e[0]);
984
+ e[0] === void 0 && (e[0] = o), i && r === void 0 && i.set(e[0]);
985
985
  }
986
- Ro(e);
986
+ Rr(e);
987
987
  }
988
988
  setFinalKeyframe() {
989
989
  }
@@ -1003,16 +1003,16 @@ class sn {
1003
1003
  this.state === "pending" && this.scheduleResolve();
1004
1004
  }
1005
1005
  }
1006
- const Uo = (t) => t.startsWith("--");
1007
- function Wo(t, e, n) {
1008
- Uo(e) ? t.style.setProperty(e, n) : t.style[e] = n;
1006
+ const Ur = (t) => t.startsWith("--");
1007
+ function Wr(t, e, n) {
1008
+ Ur(e) ? t.style.setProperty(e, n) : t.style[e] = n;
1009
1009
  }
1010
- const Ko = /* @__PURE__ */ Ge(() => window.ScrollTimeline !== void 0), $o = {};
1011
- function Go(t, e) {
1010
+ const Kr = /* @__PURE__ */ Ge(() => window.ScrollTimeline !== void 0), $r = {};
1011
+ function Gr(t, e) {
1012
1012
  const n = /* @__PURE__ */ Ge(t);
1013
- return () => $o[e] ?? n();
1013
+ return () => $r[e] ?? n();
1014
1014
  }
1015
- const yi = /* @__PURE__ */ Go(() => {
1015
+ const yi = /* @__PURE__ */ Gr(() => {
1016
1016
  try {
1017
1017
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1018
1018
  } catch {
@@ -1034,40 +1034,40 @@ function vi(t, e) {
1034
1034
  if (t)
1035
1035
  return typeof t == "function" ? yi() ? fi(t, e) : "ease-out" : ei(t) ? wt(t) : Array.isArray(t) ? t.map((n) => vi(n, e) || Fn.easeOut) : Fn[t];
1036
1036
  }
1037
- function _o(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
1038
- const c = {
1037
+ function _r(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times: l } = {}, c = void 0) {
1038
+ const u = {
1039
1039
  [e]: n
1040
1040
  };
1041
- l && (c.offset = l);
1041
+ l && (u.offset = l);
1042
1042
  const h = vi(a, i);
1043
- Array.isArray(h) && (c.easing = h);
1043
+ Array.isArray(h) && (u.easing = h);
1044
1044
  const f = {
1045
1045
  delay: s,
1046
1046
  duration: i,
1047
1047
  easing: Array.isArray(h) ? "linear" : h,
1048
1048
  fill: "both",
1049
- iterations: o + 1,
1050
- direction: r === "reverse" ? "alternate" : "normal"
1049
+ iterations: r + 1,
1050
+ direction: o === "reverse" ? "alternate" : "normal"
1051
1051
  };
1052
- return u && (f.pseudoElement = u), t.animate(c, f);
1052
+ return c && (f.pseudoElement = c), t.animate(u, f);
1053
1053
  }
1054
1054
  function Ti(t) {
1055
1055
  return typeof t == "function" && "applyToOptions" in t;
1056
1056
  }
1057
- function Ho({ type: t, ...e }) {
1057
+ function Hr({ type: t, ...e }) {
1058
1058
  return Ti(t) && yi() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
1059
1059
  }
1060
- class zo extends en {
1060
+ class zr extends en {
1061
1061
  constructor(e) {
1062
1062
  if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !e)
1063
1063
  return;
1064
- const { element: n, name: s, keyframes: i, pseudoElement: o, allowFlatten: r = !1, finalKeyframe: a, onComplete: l } = e;
1065
- this.isPseudoElement = !!o, this.allowFlatten = r, this.options = e, Y(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
1066
- const u = Ho(e);
1067
- this.animation = _o(n, s, i, u, o), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1068
- if (this.finishedTime = this.time, !o) {
1069
- const c = tn(i, this.options, a, this.speed);
1070
- this.updateMotionValue ? this.updateMotionValue(c) : Wo(n, s, c), this.animation.cancel();
1064
+ const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: l } = e;
1065
+ this.isPseudoElement = !!r, this.allowFlatten = o, this.options = e, Y(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
1066
+ const c = Hr(e);
1067
+ this.animation = _r(n, s, i, c, r), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1068
+ if (this.finishedTime = this.time, !r) {
1069
+ const u = tn(i, this.options, a, this.speed);
1070
+ this.updateMotionValue ? this.updateMotionValue(u) : Wr(n, s, u), this.animation.cancel();
1071
1071
  }
1072
1072
  l?.(), this.notifyFinished();
1073
1073
  };
@@ -1107,7 +1107,8 @@ class zo extends en {
1107
1107
  * while deferring the commit until the next animation frame.
1108
1108
  */
1109
1109
  commitStyles() {
1110
- this.isPseudoElement || this.animation.commitStyles?.();
1110
+ const e = this.options?.element;
1111
+ !this.isPseudoElement && e?.isConnected && this.animation.commitStyles?.();
1111
1112
  }
1112
1113
  get duration() {
1113
1114
  const e = this.animation.effect?.getComputedTiming?.().duration || 0;
@@ -1146,7 +1147,7 @@ class zo extends en {
1146
1147
  * Attaches a timeline to the animation, for instance the `ScrollTimeline`.
1147
1148
  */
1148
1149
  attachTimeline({ timeline: e, observe: n }) {
1149
- return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && Ko() ? (this.animation.timeline = e, K) : n(this);
1150
+ return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && Kr() ? (this.animation.timeline = e, K) : n(this);
1150
1151
  }
1151
1152
  }
1152
1153
  const xi = {
@@ -1154,16 +1155,16 @@ const xi = {
1154
1155
  backInOut: qs,
1155
1156
  circInOut: Qs
1156
1157
  };
1157
- function Yo(t) {
1158
+ function Yr(t) {
1158
1159
  return t in xi;
1159
1160
  }
1160
- function Xo(t) {
1161
- typeof t.ease == "string" && Yo(t.ease) && (t.ease = xi[t.ease]);
1161
+ function Xr(t) {
1162
+ typeof t.ease == "string" && Yr(t.ease) && (t.ease = xi[t.ease]);
1162
1163
  }
1163
- const oe = 10;
1164
- class qo extends zo {
1164
+ const re = 10;
1165
+ class qr extends zr {
1165
1166
  constructor(e) {
1166
- Xo(e), mi(e), super(e), e.startTime !== void 0 && (this.startTime = e.startTime), this.options = e;
1167
+ Xr(e), mi(e), super(e), e.startTime !== void 0 && (this.startTime = e.startTime), this.options = e;
1167
1168
  }
1168
1169
  /**
1169
1170
  * WAAPI doesn't natively have any interruption capabilities.
@@ -1174,7 +1175,7 @@ class qo extends zo {
1174
1175
  * Motion to calculate velocity for any subsequent animation.
1175
1176
  */
1176
1177
  updateMotionValue(e) {
1177
- const { motionValue: n, onUpdate: s, onComplete: i, element: o, ...r } = this.options;
1178
+ const { motionValue: n, onUpdate: s, onComplete: i, element: r, ...o } = this.options;
1178
1179
  if (!n)
1179
1180
  return;
1180
1181
  if (e !== void 0) {
@@ -1182,16 +1183,16 @@ class qo extends zo {
1182
1183
  return;
1183
1184
  }
1184
1185
  const a = new nn({
1185
- ...r,
1186
+ ...o,
1186
1187
  autoplay: !1
1187
- }), l = Math.max(oe, F.now() - this.startTime), u = z(0, oe, l - oe);
1188
- n.setWithVelocity(a.sample(Math.max(0, l - u)).value, a.sample(l).value, u), a.stop();
1188
+ }), l = Math.max(re, F.now() - this.startTime), c = z(0, re, l - re);
1189
+ n.setWithVelocity(a.sample(Math.max(0, l - c)).value, a.sample(l).value, c), a.stop();
1189
1190
  }
1190
1191
  }
1191
1192
  const Bn = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
1192
1193
  (Q.test(t) || t === "0") && // And it contains numbers and/or colors
1193
1194
  !t.startsWith("url("));
1194
- function Zo(t) {
1195
+ function Zr(t) {
1195
1196
  const e = t[0];
1196
1197
  if (t.length === 1)
1197
1198
  return !0;
@@ -1199,19 +1200,19 @@ function Zo(t) {
1199
1200
  if (t[n] !== e)
1200
1201
  return !0;
1201
1202
  }
1202
- function Jo(t, e, n, s) {
1203
+ function Jr(t, e, n, s) {
1203
1204
  const i = t[0];
1204
1205
  if (i === null)
1205
1206
  return !1;
1206
1207
  if (e === "display" || e === "visibility")
1207
1208
  return !0;
1208
- const o = t[t.length - 1], r = Bn(i, e), a = Bn(o, e);
1209
- return vt(r === a, `You are trying to animate ${e} from "${i}" to "${o}". "${r ? o : i}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : Zo(t) || (n === "spring" || Ti(n)) && s;
1209
+ const r = t[t.length - 1], o = Bn(i, e), a = Bn(r, e);
1210
+ return vt(o === a, `You are trying to animate ${e} from "${i}" to "${r}". "${o ? r : i}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 : Zr(t) || (n === "spring" || Ti(n)) && s;
1210
1211
  }
1211
1212
  function Ce(t) {
1212
1213
  t.duration = 0, t.type = "keyframes";
1213
1214
  }
1214
- const Qo = /* @__PURE__ */ new Set([
1215
+ const Qr = /* @__PURE__ */ new Set([
1215
1216
  "opacity",
1216
1217
  "clipPath",
1217
1218
  "filter",
@@ -1220,19 +1221,19 @@ const Qo = /* @__PURE__ */ new Set([
1220
1221
  // "background-color"
1221
1222
  ]), ta = /* @__PURE__ */ Ge(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1222
1223
  function ea(t) {
1223
- const { motionValue: e, name: n, repeatDelay: s, repeatType: i, damping: o, type: r } = t;
1224
+ const { motionValue: e, name: n, repeatDelay: s, repeatType: i, damping: r, type: o } = t;
1224
1225
  if (!(e?.owner?.current instanceof HTMLElement))
1225
1226
  return !1;
1226
- const { onUpdate: l, transformTemplate: u } = e.owner.getProps();
1227
- return ta() && n && Qo.has(n) && (n !== "transform" || !u) && /**
1227
+ const { onUpdate: l, transformTemplate: c } = e.owner.getProps();
1228
+ return ta() && n && Qr.has(n) && (n !== "transform" || !c) && /**
1228
1229
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
1229
1230
  * no way to read the value from WAAPI every frame.
1230
1231
  */
1231
- !l && !s && i !== "mirror" && o !== 0 && r !== "inertia";
1232
+ !l && !s && i !== "mirror" && r !== 0 && o !== "inertia";
1232
1233
  }
1233
1234
  const na = 40;
1234
1235
  class sa extends en {
1235
- constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: o = 0, repeatType: r = "loop", keyframes: a, name: l, motionValue: u, element: c, ...h }) {
1236
+ constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", keyframes: a, name: l, motionValue: c, element: u, ...h }) {
1236
1237
  super(), this.stop = () => {
1237
1238
  this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
1238
1239
  }, this.createdAt = F.now();
@@ -1241,31 +1242,31 @@ class sa extends en {
1241
1242
  delay: n,
1242
1243
  type: s,
1243
1244
  repeat: i,
1244
- repeatDelay: o,
1245
- repeatType: r,
1245
+ repeatDelay: r,
1246
+ repeatType: o,
1246
1247
  name: l,
1247
- motionValue: u,
1248
- element: c,
1248
+ motionValue: c,
1249
+ element: u,
1249
1250
  ...h
1250
- }, d = c?.KeyframeResolver || sn;
1251
- this.keyframeResolver = new d(a, (m, g, T) => this.onKeyframesResolved(m, g, f, !T), l, u, c), this.keyframeResolver?.scheduleResolve();
1251
+ }, d = u?.KeyframeResolver || sn;
1252
+ this.keyframeResolver = new d(a, (m, v, T) => this.onKeyframesResolved(m, v, f, !T), l, c, u), this.keyframeResolver?.scheduleResolve();
1252
1253
  }
1253
1254
  onKeyframesResolved(e, n, s, i) {
1254
1255
  this.keyframeResolver = void 0;
1255
- const { name: o, type: r, velocity: a, delay: l, isHandoff: u, onUpdate: c } = s;
1256
- this.resolvedAt = F.now(), Jo(e, o, r, a) || ((X.instantAnimations || !l) && c?.(tn(e, s, n)), e[0] = e[e.length - 1], Ce(s), s.repeat = 0);
1256
+ const { name: r, type: o, velocity: a, delay: l, isHandoff: c, onUpdate: u } = s;
1257
+ this.resolvedAt = F.now(), Jr(e, r, o, a) || ((X.instantAnimations || !l) && u?.(tn(e, s, n)), e[0] = e[e.length - 1], Ce(s), s.repeat = 0);
1257
1258
  const f = {
1258
1259
  startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > na ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1259
1260
  finalKeyframe: n,
1260
1261
  ...s,
1261
1262
  keyframes: e
1262
- }, d = !u && ea(f), m = f.motionValue?.owner?.current, g = d ? new qo({
1263
+ }, d = !c && ea(f), m = f.motionValue?.owner?.current, v = d ? new qr({
1263
1264
  ...f,
1264
1265
  element: m
1265
1266
  }) : new nn(f);
1266
- g.finished.then(() => {
1267
+ v.finished.then(() => {
1267
1268
  this.notifyFinished();
1268
- }).catch(K), this.pendingTimeline && (this.stopTimeline = g.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = g;
1269
+ }).catch(K), this.pendingTimeline && (this.stopTimeline = v.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = v;
1269
1270
  }
1270
1271
  get finished() {
1271
1272
  return this._animation ? this.animation.finished : this._finished;
@@ -1275,7 +1276,7 @@ class sa extends en {
1275
1276
  });
1276
1277
  }
1277
1278
  get animation() {
1278
- return this._animation || (this.keyframeResolver?.resume(), No()), this._animation;
1279
+ return this._animation || (this.keyframeResolver?.resume(), Nr()), this._animation;
1279
1280
  }
1280
1281
  get duration() {
1281
1282
  return this.animation.duration;
@@ -1317,33 +1318,33 @@ class sa extends en {
1317
1318
  this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
1318
1319
  }
1319
1320
  }
1320
- function Pi(t, e, n, s = 0, i = 1) {
1321
- const o = Array.from(t).sort((u, c) => u.sortNodePosition(c)).indexOf(e), r = t.size, a = (r - 1) * s;
1322
- return typeof n == "function" ? n(o, r) : i === 1 ? o * s : a - o * s;
1321
+ function Si(t, e, n, s = 0, i = 1) {
1322
+ const r = Array.from(t).sort((c, u) => c.sortNodePosition(u)).indexOf(e), o = t.size, a = (o - 1) * s;
1323
+ return typeof n == "function" ? n(r, o) : i === 1 ? r * s : a - r * s;
1323
1324
  }
1324
1325
  const ia = (
1325
1326
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1326
1327
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1327
1328
  );
1328
- function ra(t) {
1329
+ function oa(t) {
1329
1330
  const e = ia.exec(t);
1330
1331
  if (!e)
1331
1332
  return [,];
1332
1333
  const [, n, s, i] = e;
1333
1334
  return [`--${n ?? s}`, i];
1334
1335
  }
1335
- const oa = 4;
1336
- function Si(t, e, n = 1) {
1337
- Y(n <= oa, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1338
- const [s, i] = ra(t);
1336
+ const ra = 4;
1337
+ function Pi(t, e, n = 1) {
1338
+ Y(n <= ra, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1339
+ const [s, i] = oa(t);
1339
1340
  if (!s)
1340
1341
  return;
1341
- const o = window.getComputedStyle(e).getPropertyValue(s);
1342
- if (o) {
1343
- const r = o.trim();
1344
- return Ks(r) ? parseFloat(r) : r;
1342
+ const r = window.getComputedStyle(e).getPropertyValue(s);
1343
+ if (r) {
1344
+ const o = r.trim();
1345
+ return Ks(o) ? parseFloat(o) : o;
1345
1346
  }
1346
- return Xe(i) ? Si(i, e, n + 1) : i;
1347
+ return Xe(i) ? Pi(i, e, n + 1) : i;
1347
1348
  }
1348
1349
  const aa = {
1349
1350
  type: "spring",
@@ -1362,49 +1363,49 @@ const aa = {
1362
1363
  type: "keyframes",
1363
1364
  ease: [0.25, 0.1, 0.35, 1],
1364
1365
  duration: 0.3
1365
- }, ha = (t, { keyframes: e }) => e.length > 2 ? ca : Pt.has(t) ? t.startsWith("scale") ? la(e[1]) : aa : ua, fa = (t) => t !== null;
1366
+ }, ha = (t, { keyframes: e }) => e.length > 2 ? ca : St.has(t) ? t.startsWith("scale") ? la(e[1]) : aa : ua, fa = (t) => t !== null;
1366
1367
  function da(t, { repeat: e, repeatType: n = "loop" }, s) {
1367
- const i = t.filter(fa), o = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
1368
- return i[o];
1368
+ const i = t.filter(fa), r = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
1369
+ return i[r];
1369
1370
  }
1370
- function rn(t, e) {
1371
+ function on(t, e) {
1371
1372
  return t?.[e] ?? t?.default ?? t;
1372
1373
  }
1373
- function ma({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
1374
- return !!Object.keys(c).length;
1374
+ function ma({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: c, ...u }) {
1375
+ return !!Object.keys(u).length;
1375
1376
  }
1376
- const on = (t, e, n, s = {}, i, o) => (r) => {
1377
- const a = rn(s, t) || {}, l = a.delay || s.delay || 0;
1378
- let { elapsed: u = 0 } = s;
1379
- u = u - /* @__PURE__ */ _(l);
1380
- const c = {
1377
+ const rn = (t, e, n, s = {}, i, r) => (o) => {
1378
+ const a = on(s, t) || {}, l = a.delay || s.delay || 0;
1379
+ let { elapsed: c = 0 } = s;
1380
+ c = c - /* @__PURE__ */ _(l);
1381
+ const u = {
1381
1382
  keyframes: Array.isArray(n) ? n : [null, n],
1382
1383
  ease: "easeOut",
1383
1384
  velocity: e.getVelocity(),
1384
1385
  ...a,
1385
- delay: -u,
1386
+ delay: -c,
1386
1387
  onUpdate: (f) => {
1387
1388
  e.set(f), a.onUpdate && a.onUpdate(f);
1388
1389
  },
1389
1390
  onComplete: () => {
1390
- r(), a.onComplete && a.onComplete();
1391
+ o(), a.onComplete && a.onComplete();
1391
1392
  },
1392
1393
  name: t,
1393
1394
  motionValue: e,
1394
- element: o ? void 0 : i
1395
+ element: r ? void 0 : i
1395
1396
  };
1396
- ma(a) || Object.assign(c, ha(t, c)), c.duration && (c.duration = /* @__PURE__ */ _(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ _(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
1397
+ ma(a) || Object.assign(u, ha(t, u)), u.duration && (u.duration = /* @__PURE__ */ _(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ _(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
1397
1398
  let h = !1;
1398
- if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (Ce(c), c.delay === 0 && (h = !0)), (X.instantAnimations || X.skipAnimations) && (h = !0, Ce(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
1399
- const f = da(c.keyframes, a);
1399
+ if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (Ce(u), u.delay === 0 && (h = !0)), (X.instantAnimations || X.skipAnimations || i?.shouldSkipAnimations) && (h = !0, Ce(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, h && !r && e.get() !== void 0) {
1400
+ const f = da(u.keyframes, a);
1400
1401
  if (f !== void 0) {
1401
1402
  A.update(() => {
1402
- c.onUpdate(f), c.onComplete();
1403
+ u.onUpdate(f), u.onComplete();
1403
1404
  });
1404
1405
  return;
1405
1406
  }
1406
1407
  }
1407
- return a.isSync ? new nn(c) : new sa(c);
1408
+ return a.isSync ? new nn(u) : new sa(u);
1408
1409
  };
1409
1410
  function In(t) {
1410
1411
  const e = [{}, {}];
@@ -1414,12 +1415,12 @@ function In(t) {
1414
1415
  }
1415
1416
  function an(t, e, n, s) {
1416
1417
  if (typeof e == "function") {
1417
- const [i, o] = In(s);
1418
- e = e(n !== void 0 ? n : t.custom, i, o);
1418
+ const [i, r] = In(s);
1419
+ e = e(n !== void 0 ? n : t.custom, i, r);
1419
1420
  }
1420
1421
  if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
1421
- const [i, o] = In(s);
1422
- e = e(n !== void 0 ? n : t.custom, i, o);
1422
+ const [i, r] = In(s);
1423
+ e = e(n !== void 0 ? n : t.custom, i, r);
1423
1424
  }
1424
1425
  return e;
1425
1426
  }
@@ -1447,8 +1448,8 @@ class ga {
1447
1448
  this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s) => {
1448
1449
  const i = F.now();
1449
1450
  if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
1450
- for (const o of this.dependents)
1451
- o.dirty();
1451
+ for (const r of this.dependents)
1452
+ r.dirty();
1452
1453
  }, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
1453
1454
  }
1454
1455
  setCurrent(e) {
@@ -1647,11 +1648,11 @@ function va(t) {
1647
1648
  }
1648
1649
  function Ta(t, e) {
1649
1650
  const n = pt(t, e);
1650
- let { transitionEnd: s = {}, transition: i = {}, ...o } = n || {};
1651
- o = { ...o, ...s };
1652
- for (const r in o) {
1653
- const a = va(o[r]);
1654
- ya(t, r, a);
1651
+ let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
1652
+ r = { ...r, ...s };
1653
+ for (const o in r) {
1654
+ const a = va(r[o]);
1655
+ ya(t, o, a);
1655
1656
  }
1656
1657
  }
1657
1658
  const k = (t) => !!(t && t.getVelocity);
@@ -1670,69 +1671,69 @@ function Re(t, e) {
1670
1671
  function ln(t) {
1671
1672
  return t.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
1672
1673
  }
1673
- const Pa = "framerAppearId", bi = "data-" + ln(Pa);
1674
+ const Sa = "framerAppearId", bi = "data-" + ln(Sa);
1674
1675
  function Ai(t) {
1675
1676
  return t.props[bi];
1676
1677
  }
1677
- function Sa({ protectedKeys: t, needsAnimating: e }, n) {
1678
+ function Pa({ protectedKeys: t, needsAnimating: e }, n) {
1678
1679
  const s = t.hasOwnProperty(n) && e[n] !== !0;
1679
1680
  return e[n] = !1, s;
1680
1681
  }
1681
1682
  function Vi(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
1682
- let { transition: o = t.getDefaultTransition(), transitionEnd: r, ...a } = e;
1683
- const l = o?.reduceMotion;
1684
- s && (o = s);
1685
- const u = [], c = i && t.animationState && t.animationState.getState()[i];
1683
+ let { transition: r = t.getDefaultTransition(), transitionEnd: o, ...a } = e;
1684
+ const l = r?.reduceMotion;
1685
+ s && (r = s);
1686
+ const c = [], u = i && t.animationState && t.animationState.getState()[i];
1686
1687
  for (const h in a) {
1687
1688
  const f = t.getValue(h, t.latestValues[h] ?? null), d = a[h];
1688
- if (d === void 0 || c && Sa(c, h))
1689
+ if (d === void 0 || u && Pa(u, h))
1689
1690
  continue;
1690
1691
  const m = {
1691
1692
  delay: n,
1692
- ...rn(o || {}, h)
1693
- }, g = f.get();
1694
- if (g !== void 0 && !f.isAnimating && !Array.isArray(d) && d === g && !m.velocity)
1693
+ ...on(r || {}, h)
1694
+ }, v = f.get();
1695
+ if (v !== void 0 && !f.isAnimating && !Array.isArray(d) && d === v && !m.velocity)
1695
1696
  continue;
1696
1697
  let T = !1;
1697
1698
  if (window.MotionHandoffAnimation) {
1698
- const p = Ai(t);
1699
- if (p) {
1700
- const S = window.MotionHandoffAnimation(p, h, A);
1701
- S !== null && (m.startTime = S, T = !0);
1699
+ const g = Ai(t);
1700
+ if (g) {
1701
+ const P = window.MotionHandoffAnimation(g, h, A);
1702
+ P !== null && (m.startTime = P, T = !0);
1702
1703
  }
1703
1704
  }
1704
1705
  Re(t, h);
1705
- const v = l ?? t.shouldReduceMotion;
1706
- f.start(on(h, f, d, v && wi.has(h) ? { type: !1 } : m, t, T));
1706
+ const p = l ?? t.shouldReduceMotion;
1707
+ f.start(rn(h, f, d, p && wi.has(h) ? { type: !1 } : m, t, T));
1707
1708
  const x = f.animation;
1708
- x && u.push(x);
1709
+ x && c.push(x);
1709
1710
  }
1710
- return r && Promise.all(u).then(() => {
1711
+ return o && Promise.all(c).then(() => {
1711
1712
  A.update(() => {
1712
- r && Ta(t, r);
1713
+ o && Ta(t, o);
1713
1714
  });
1714
- }), u;
1715
+ }), c;
1715
1716
  }
1716
1717
  function Le(t, e, n = {}) {
1717
1718
  const s = pt(t, e, n.type === "exit" ? t.presenceContext?.custom : void 0);
1718
1719
  let { transition: i = t.getDefaultTransition() || {} } = s || {};
1719
1720
  n.transitionOverride && (i = n.transitionOverride);
1720
- const o = s ? () => Promise.all(Vi(t, s, n)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (l = 0) => {
1721
- const { delayChildren: u = 0, staggerChildren: c, staggerDirection: h } = i;
1722
- return wa(t, e, l, u, c, h, n);
1721
+ const r = s ? () => Promise.all(Vi(t, s, n)) : () => Promise.resolve(), o = t.variantChildren && t.variantChildren.size ? (l = 0) => {
1722
+ const { delayChildren: c = 0, staggerChildren: u, staggerDirection: h } = i;
1723
+ return wa(t, e, l, c, u, h, n);
1723
1724
  } : () => Promise.resolve(), { when: a } = i;
1724
1725
  if (a) {
1725
- const [l, u] = a === "beforeChildren" ? [o, r] : [r, o];
1726
- return l().then(() => u());
1726
+ const [l, c] = a === "beforeChildren" ? [r, o] : [o, r];
1727
+ return l().then(() => c());
1727
1728
  } else
1728
- return Promise.all([o(), r(n.delay)]);
1729
+ return Promise.all([r(), o(n.delay)]);
1729
1730
  }
1730
- function wa(t, e, n = 0, s = 0, i = 0, o = 1, r) {
1731
+ function wa(t, e, n = 0, s = 0, i = 0, r = 1, o) {
1731
1732
  const a = [];
1732
1733
  for (const l of t.variantChildren)
1733
1734
  l.notify("AnimationStart", e), a.push(Le(l, e, {
1734
- ...r,
1735
- delay: n + (typeof s == "function" ? 0 : s) + Pi(t.variantChildren, l, s, i, o)
1735
+ ...o,
1736
+ delay: n + (typeof s == "function" ? 0 : s) + Si(t.variantChildren, l, s, i, r)
1736
1737
  }).then(() => l.notify("AnimationComplete", e)));
1737
1738
  return Promise.all(a);
1738
1739
  }
@@ -1740,7 +1741,7 @@ function ba(t, e, n = {}) {
1740
1741
  t.notify("AnimationStart", e);
1741
1742
  let s;
1742
1743
  if (Array.isArray(e)) {
1743
- const i = e.map((o) => Le(t, o, n));
1744
+ const i = e.map((r) => Le(t, r, n));
1744
1745
  s = Promise.all(i);
1745
1746
  } else if (typeof e == "string")
1746
1747
  s = Le(t, e, n);
@@ -1755,7 +1756,7 @@ function ba(t, e, n = {}) {
1755
1756
  const Aa = {
1756
1757
  test: (t) => t === "auto",
1757
1758
  parse: (t) => t
1758
- }, Di = (t) => (e) => e.test(t), Mi = [Tt, y, H, q, qr, Xr, Aa], jn = (t) => Mi.find(Di(t));
1759
+ }, Di = (t) => (e) => e.test(t), Mi = [Tt, y, H, q, Zo, qo, Aa], jn = (t) => Mi.find(Di(t));
1759
1760
  function Va(t) {
1760
1761
  return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Gs(t) : !0;
1761
1762
  }
@@ -1768,8 +1769,8 @@ function Ma(t) {
1768
1769
  if (!s)
1769
1770
  return t;
1770
1771
  const i = n.replace(s, "");
1771
- let o = Da.has(e) ? 1 : 0;
1772
- return s !== n && (o *= 100), e + "(" + o + i + ")";
1772
+ let r = Da.has(e) ? 1 : 0;
1773
+ return s !== n && (r *= 100), e + "(" + r + i + ")";
1773
1774
  }
1774
1775
  const Ca = /\b([a-z-]*)\(.*?\)/gu, ke = {
1775
1776
  ...Q,
@@ -1892,41 +1893,41 @@ const La = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1892
1893
  function ka(t, e, n) {
1893
1894
  let s = 0, i;
1894
1895
  for (; s < t.length && !i; ) {
1895
- const o = t[s];
1896
- typeof o == "string" && !La.has(o) && Et(o).values.length && (i = t[s]), s++;
1896
+ const r = t[s];
1897
+ typeof r == "string" && !La.has(r) && Et(r).values.length && (i = t[s]), s++;
1897
1898
  }
1898
1899
  if (i && n)
1899
- for (const o of e)
1900
- t[o] = Ei(n, i);
1900
+ for (const r of e)
1901
+ t[r] = Ei(n, i);
1901
1902
  }
1902
1903
  class Fa extends sn {
1903
- constructor(e, n, s, i, o) {
1904
- super(e, n, s, i, o, !0);
1904
+ constructor(e, n, s, i, r) {
1905
+ super(e, n, s, i, r, !0);
1905
1906
  }
1906
1907
  readKeyframes() {
1907
1908
  const { unresolvedKeyframes: e, element: n, name: s } = this;
1908
1909
  if (!n || !n.current)
1909
1910
  return;
1910
1911
  super.readKeyframes();
1911
- for (let c = 0; c < e.length; c++) {
1912
- let h = e[c];
1912
+ for (let u = 0; u < e.length; u++) {
1913
+ let h = e[u];
1913
1914
  if (typeof h == "string" && (h = h.trim(), Xe(h))) {
1914
- const f = Si(h, n.current);
1915
- f !== void 0 && (e[c] = f), c === e.length - 1 && (this.finalKeyframe = h);
1915
+ const f = Pi(h, n.current);
1916
+ f !== void 0 && (e[u] = f), u === e.length - 1 && (this.finalKeyframe = h);
1916
1917
  }
1917
1918
  }
1918
1919
  if (this.resolveNoneKeyframes(), !wi.has(s) || e.length !== 2)
1919
1920
  return;
1920
- const [i, o] = e, r = jn(i), a = jn(o), l = bn(i), u = bn(o);
1921
- if (l !== u && Z[s]) {
1921
+ const [i, r] = e, o = jn(i), a = jn(r), l = bn(i), c = bn(r);
1922
+ if (l !== c && Z[s]) {
1922
1923
  this.needsMeasurement = !0;
1923
1924
  return;
1924
1925
  }
1925
- if (r !== a)
1926
- if (kn(r) && kn(a))
1927
- for (let c = 0; c < e.length; c++) {
1928
- const h = e[c];
1929
- typeof h == "string" && (e[c] = parseFloat(h));
1926
+ if (o !== a)
1927
+ if (kn(o) && kn(a))
1928
+ for (let u = 0; u < e.length; u++) {
1929
+ const h = e[u];
1930
+ typeof h == "string" && (e[u] = parseFloat(h));
1930
1931
  }
1931
1932
  else Z[s] && (this.needsMeasurement = !0);
1932
1933
  }
@@ -1950,8 +1951,8 @@ class Fa extends sn {
1950
1951
  return;
1951
1952
  const i = e.getValue(n);
1952
1953
  i && i.jump(this.measuredOrigin, !1);
1953
- const o = s.length - 1, r = s[o];
1954
- s[o] = Z[n](e.measureViewportBox(), window.getComputedStyle(e.current)), r !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = r), this.removedTransforms?.length && this.removedTransforms.forEach(([a, l]) => {
1954
+ const r = s.length - 1, o = s[r];
1955
+ s[r] = Z[n](e.measureViewportBox(), window.getComputedStyle(e.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), this.removedTransforms?.length && this.removedTransforms.forEach(([a, l]) => {
1955
1956
  e.getValue(a).set(l);
1956
1957
  }), this.resolveNoneKeyframes();
1957
1958
  }
@@ -1998,20 +1999,20 @@ function Un(t) {
1998
1999
  return !(t.pointerType === "touch" || Li());
1999
2000
  }
2000
2001
  function ja(t, e, n = {}) {
2001
- const [s, i, o] = ki(t, n), r = (a) => {
2002
+ const [s, i, r] = ki(t, n), o = (a) => {
2002
2003
  if (!Un(a))
2003
2004
  return;
2004
- const { target: l } = a, u = e(l, a);
2005
- if (typeof u != "function" || !l)
2005
+ const { target: l } = a, c = e(l, a);
2006
+ if (typeof c != "function" || !l)
2006
2007
  return;
2007
- const c = (h) => {
2008
- Un(h) && (u(h), l.removeEventListener("pointerleave", c));
2008
+ const u = (h) => {
2009
+ Un(h) && (c(h), l.removeEventListener("pointerleave", u));
2009
2010
  };
2010
- l.addEventListener("pointerleave", c, i);
2011
+ l.addEventListener("pointerleave", u, i);
2011
2012
  };
2012
2013
  return s.forEach((a) => {
2013
- a.addEventListener("pointerenter", r, i);
2014
- }), o;
2014
+ a.addEventListener("pointerenter", o, i);
2015
+ }), r;
2015
2016
  }
2016
2017
  const Fi = (t, e) => e ? t === e ? !0 : Fi(t, e.parentElement) : !1, hn = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, Na = /* @__PURE__ */ new Set([
2017
2018
  "BUTTON",
@@ -2042,8 +2043,8 @@ const Ua = (t, e) => {
2042
2043
  ae(n, "down");
2043
2044
  const i = Wn(() => {
2044
2045
  ae(n, "up");
2045
- }), o = () => ae(n, "cancel");
2046
- n.addEventListener("keyup", i, e), n.addEventListener("blur", o, e);
2046
+ }), r = () => ae(n, "cancel");
2047
+ n.addEventListener("keyup", i, e), n.addEventListener("blur", r, e);
2047
2048
  });
2048
2049
  n.addEventListener("keydown", s, e), n.addEventListener("blur", () => n.removeEventListener("keydown", s), e);
2049
2050
  };
@@ -2051,23 +2052,23 @@ function Kn(t) {
2051
2052
  return hn(t) && !Li();
2052
2053
  }
2053
2054
  function Wa(t, e, n = {}) {
2054
- const [s, i, o] = ki(t, n), r = (a) => {
2055
+ const [s, i, r] = ki(t, n), o = (a) => {
2055
2056
  const l = a.currentTarget;
2056
2057
  if (!Kn(a))
2057
2058
  return;
2058
2059
  Wt.add(l);
2059
- const u = e(l, a), c = (d, m) => {
2060
- window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), Wt.has(l) && Wt.delete(l), Kn(d) && typeof u == "function" && u(d, { success: m });
2060
+ const c = e(l, a), u = (d, m) => {
2061
+ window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), Wt.has(l) && Wt.delete(l), Kn(d) && typeof c == "function" && c(d, { success: m });
2061
2062
  }, h = (d) => {
2062
- c(d, l === window || l === document || n.useGlobalTarget || Fi(l, d.target));
2063
+ u(d, l === window || l === document || n.useGlobalTarget || Fi(l, d.target));
2063
2064
  }, f = (d) => {
2064
- c(d, !1);
2065
+ u(d, !1);
2065
2066
  };
2066
2067
  window.addEventListener("pointerup", h, i), window.addEventListener("pointercancel", f, i);
2067
2068
  };
2068
2069
  return s.forEach((a) => {
2069
- (n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, i), Ia(a) && (a.addEventListener("focus", (u) => Ua(u, i)), !Bi(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
2070
- }), o;
2070
+ (n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), Ia(a) && (a.addEventListener("focus", (c) => Ua(c, i)), !Bi(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
2071
+ }), r;
2071
2072
  }
2072
2073
  function Ii(t) {
2073
2074
  return $s(t) && "ownerSVGElement" in t;
@@ -2119,18 +2120,18 @@ function ji(t) {
2119
2120
  }
2120
2121
  function Ya(t, e, n) {
2121
2122
  for (const s in e) {
2122
- const i = e[s], o = n[s];
2123
+ const i = e[s], r = n[s];
2123
2124
  if (k(i))
2124
2125
  t.addValue(s, i);
2125
- else if (k(o))
2126
+ else if (k(r))
2126
2127
  t.addValue(s, gt(i, { owner: t }));
2127
- else if (o !== i)
2128
+ else if (r !== i)
2128
2129
  if (t.hasValue(s)) {
2129
- const r = t.getValue(s);
2130
- r.liveStyle === !0 ? r.jump(i) : r.hasAnimated || r.set(i);
2130
+ const o = t.getValue(s);
2131
+ o.liveStyle === !0 ? o.jump(i) : o.hasAnimated || o.set(i);
2131
2132
  } else {
2132
- const r = t.getStaticValue(s);
2133
- t.addValue(s, gt(r !== void 0 ? r : i, { owner: t }));
2133
+ const o = t.getStaticValue(s);
2134
+ t.addValue(s, gt(o !== void 0 ? o : i, { owner: t }));
2134
2135
  }
2135
2136
  }
2136
2137
  for (const s in n)
@@ -2164,23 +2165,23 @@ class qa {
2164
2165
  scrapeMotionValuesFromProps(e, n, s) {
2165
2166
  return {};
2166
2167
  }
2167
- constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: o, visualState: r }, a = {}) {
2168
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = sn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2168
+ constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, skipAnimations: r, blockInitialAnimation: o, visualState: a }, l = {}) {
2169
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = sn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2169
2170
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2170
2171
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2171
- const f = F.now();
2172
- this.renderScheduledAt < f && (this.renderScheduledAt = f, A.render(this.render, !1, !0));
2172
+ const d = F.now();
2173
+ this.renderScheduledAt < d && (this.renderScheduledAt = d, A.render(this.render, !1, !0));
2173
2174
  };
2174
- const { latestValues: l, renderState: u } = r;
2175
- this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = Qt(n), this.isVariantNode = ji(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2176
- const { willChange: c, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
2177
- for (const f in h) {
2178
- const d = h[f];
2179
- l[f] !== void 0 && k(d) && d.set(l[f]);
2175
+ const { latestValues: c, renderState: u } = a;
2176
+ this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = n.initial ? { ...c } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.skipAnimationsConfig = r, this.options = l, this.blockInitialAnimation = !!o, this.isControllingVariants = Qt(n), this.isVariantNode = ji(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2177
+ const { willChange: h, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
2178
+ for (const d in f) {
2179
+ const m = f[d];
2180
+ c[d] !== void 0 && k(m) && m.set(c[d]);
2180
2181
  }
2181
2182
  }
2182
2183
  mount(e) {
2183
- this.current = e, za.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Oi.current || Ha(), this.shouldReduceMotion = Fe.current), process.env.NODE_ENV !== "production" && He(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.parent?.addChild(this), this.update(this.props, this.presenceContext);
2184
+ this.current = e, za.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Oi.current || Ha(), this.shouldReduceMotion = Fe.current), process.env.NODE_ENV !== "production" && He(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext);
2184
2185
  }
2185
2186
  unmount() {
2186
2187
  this.projection && this.projection.unmount(), J(this.notifyUpdate), J(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
@@ -2200,14 +2201,14 @@ class qa {
2200
2201
  }
2201
2202
  bindToMotionValue(e, n) {
2202
2203
  this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
2203
- const s = Pt.has(e);
2204
+ const s = St.has(e);
2204
2205
  s && this.onBindTransform && this.onBindTransform();
2205
- const i = n.on("change", (r) => {
2206
- this.latestValues[e] = r, this.props.onUpdate && A.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
2206
+ const i = n.on("change", (o) => {
2207
+ this.latestValues[e] = o, this.props.onUpdate && A.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
2207
2208
  });
2208
- let o;
2209
- typeof window < "u" && window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
2210
- i(), o && o(), n.owner && n.stop();
2209
+ let r;
2210
+ typeof window < "u" && window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
2211
+ i(), r && r(), n.owner && n.stop();
2211
2212
  });
2212
2213
  }
2213
2214
  sortNodePosition(e) {
@@ -2221,8 +2222,8 @@ class qa {
2221
2222
  continue;
2222
2223
  const { isEnabled: s, Feature: i } = n;
2223
2224
  if (!this.features[e] && i && s(this.props) && (this.features[e] = new i(this)), this.features[e]) {
2224
- const o = this.features[e];
2225
- o.isMounted ? o.update() : (o.mount(), o.isMounted = !0);
2225
+ const r = this.features[e];
2226
+ r.isMounted ? r.update() : (r.mount(), r.isMounted = !0);
2226
2227
  }
2227
2228
  }
2228
2229
  }
@@ -2252,8 +2253,8 @@ class qa {
2252
2253
  for (let s = 0; s < _n.length; s++) {
2253
2254
  const i = _n[s];
2254
2255
  this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
2255
- const o = "on" + i, r = e[o];
2256
- r && (this.propEventSubscriptions[i] = this.on(i, r));
2256
+ const r = "on" + i, o = e[r];
2257
+ o && (this.propEventSubscriptions[i] = this.on(i, o));
2257
2258
  }
2258
2259
  this.prevMotionValues = Ya(this, this.scrapeMotionValuesFromProps(e, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2259
2260
  }
@@ -2337,8 +2338,8 @@ class qa {
2337
2338
  const { initial: n } = this.props;
2338
2339
  let s;
2339
2340
  if (typeof n == "string" || typeof n == "object") {
2340
- const o = an(this.props, n, this.presenceContext?.custom);
2341
- o && (s = o[e]);
2341
+ const r = an(this.props, n, this.presenceContext?.custom);
2342
+ r && (s = r[e]);
2342
2343
  }
2343
2344
  if (n && s !== void 0)
2344
2345
  return s;
@@ -2438,14 +2439,14 @@ function Qa(t, e, n, s = !1) {
2438
2439
  if (!i)
2439
2440
  return;
2440
2441
  e.x = e.y = 1;
2441
- let o, r;
2442
+ let r, o;
2442
2443
  for (let a = 0; a < i; a++) {
2443
- o = n[a], r = o.projectionDelta;
2444
- const { visualElement: l } = o.options;
2445
- l && l.props.style && l.props.style.display === "contents" || (s && o.options.layoutScroll && o.scroll && o !== o.root && mt(t, {
2446
- x: -o.scroll.offset.x,
2447
- y: -o.scroll.offset.y
2448
- }), r && (e.x *= r.x.scale, e.y *= r.y.scale, $i(t, r)), s && st(o.latestValues) && mt(t, o.latestValues));
2444
+ r = n[a], o = r.projectionDelta;
2445
+ const { visualElement: l } = r.options;
2446
+ l && l.props.style && l.props.style.display === "contents" || (s && r.options.layoutScroll && r.scroll && r !== r.root && mt(t, {
2447
+ x: -r.scroll.offset.x,
2448
+ y: -r.scroll.offset.y
2449
+ }), o && (e.x *= o.x.scale, e.y *= o.y.scale, $i(t, o)), s && st(r.latestValues) && mt(t, r.latestValues));
2449
2450
  }
2450
2451
  e.x < Xn && e.x > Yn && (e.x = 1), e.y < Xn && e.y > Yn && (e.y = 1);
2451
2452
  }
@@ -2453,8 +2454,8 @@ function dt(t, e) {
2453
2454
  t.min = t.min + e, t.max = t.max + e;
2454
2455
  }
2455
2456
  function qn(t, e, n, s, i = 0.5) {
2456
- const o = D(t.min, t.max, i);
2457
- Ie(t, e, n, o, s);
2457
+ const r = D(t.min, t.max, i);
2458
+ Ie(t, e, n, r, s);
2458
2459
  }
2459
2460
  function mt(t, e) {
2460
2461
  qn(t.x, e.x, e.scaleX, e.scale, e.originX), qn(t.y, e.y, e.scaleY, e.scale, e.originY);
@@ -2474,63 +2475,63 @@ const el = {
2474
2475
  }, nl = xt.length;
2475
2476
  function sl(t, e, n) {
2476
2477
  let s = "", i = !0;
2477
- for (let o = 0; o < nl; o++) {
2478
- const r = xt[o], a = t[r];
2478
+ for (let r = 0; r < nl; r++) {
2479
+ const o = xt[r], a = t[o];
2479
2480
  if (a === void 0)
2480
2481
  continue;
2481
2482
  let l = !0;
2482
2483
  if (typeof a == "number")
2483
- l = a === (r.startsWith("scale") ? 1 : 0);
2484
+ l = a === (o.startsWith("scale") ? 1 : 0);
2484
2485
  else {
2485
- const u = parseFloat(a);
2486
- l = r.startsWith("scale") ? u === 1 : u === 0;
2486
+ const c = parseFloat(a);
2487
+ l = o.startsWith("scale") ? c === 1 : c === 0;
2487
2488
  }
2488
2489
  if (!l || n) {
2489
- const u = Ri(a, cn[r]);
2490
+ const c = Ri(a, cn[o]);
2490
2491
  if (!l) {
2491
2492
  i = !1;
2492
- const c = el[r] || r;
2493
- s += `${c}(${u}) `;
2493
+ const u = el[o] || o;
2494
+ s += `${u}(${c}) `;
2494
2495
  }
2495
- n && (e[r] = u);
2496
+ n && (e[o] = c);
2496
2497
  }
2497
2498
  }
2498
2499
  return s = s.trim(), n ? s = n(e, i ? "" : s) : i && (s = "none"), s;
2499
2500
  }
2500
2501
  function mn(t, e, n) {
2501
- const { style: s, vars: i, transformOrigin: o } = t;
2502
- let r = !1, a = !1;
2502
+ const { style: s, vars: i, transformOrigin: r } = t;
2503
+ let o = !1, a = !1;
2503
2504
  for (const l in e) {
2504
- const u = e[l];
2505
- if (Pt.has(l)) {
2506
- r = !0;
2505
+ const c = e[l];
2506
+ if (St.has(l)) {
2507
+ o = !0;
2507
2508
  continue;
2508
2509
  } else if (ii(l)) {
2509
- i[l] = u;
2510
+ i[l] = c;
2510
2511
  continue;
2511
2512
  } else {
2512
- const c = Ri(u, cn[l]);
2513
- l.startsWith("origin") ? (a = !0, o[l] = c) : s[l] = c;
2513
+ const u = Ri(c, cn[l]);
2514
+ l.startsWith("origin") ? (a = !0, r[l] = u) : s[l] = u;
2514
2515
  }
2515
2516
  }
2516
- if (e.transform || (r || n ? s.transform = sl(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
2517
- const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = o;
2518
- s.transformOrigin = `${l} ${u} ${c}`;
2517
+ if (e.transform || (o || n ? s.transform = sl(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
2518
+ const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = r;
2519
+ s.transformOrigin = `${l} ${c} ${u}`;
2519
2520
  }
2520
2521
  }
2521
2522
  function _i(t, { style: e, vars: n }, s, i) {
2522
- const o = t.style;
2523
- let r;
2524
- for (r in e)
2525
- o[r] = e[r];
2526
- i?.applyProjectionStyles(o, s);
2527
- for (r in n)
2528
- o.setProperty(r, n[r]);
2523
+ const r = t.style;
2524
+ let o;
2525
+ for (o in e)
2526
+ r[o] = e[o];
2527
+ i?.applyProjectionStyles(r, s);
2528
+ for (o in n)
2529
+ r.setProperty(o, n[o]);
2529
2530
  }
2530
2531
  function Zn(t, e) {
2531
2532
  return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
2532
2533
  }
2533
- const St = {
2534
+ const Pt = {
2534
2535
  correct: (t, e) => {
2535
2536
  if (!e.target)
2536
2537
  return t;
@@ -2547,14 +2548,14 @@ const St = {
2547
2548
  const s = t, i = Q.parse(t);
2548
2549
  if (i.length > 5)
2549
2550
  return s;
2550
- const o = Q.createTransformer(t), r = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
2551
- i[0 + r] /= a, i[1 + r] /= l;
2552
- const u = D(a, l, 0.5);
2553
- return typeof i[2 + r] == "number" && (i[2 + r] /= u), typeof i[3 + r] == "number" && (i[3 + r] /= u), o(i);
2551
+ const r = Q.createTransformer(t), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
2552
+ i[0 + o] /= a, i[1 + o] /= l;
2553
+ const c = D(a, l, 0.5);
2554
+ return typeof i[2 + o] == "number" && (i[2 + o] /= c), typeof i[3 + o] == "number" && (i[3 + o] /= c), r(i);
2554
2555
  }
2555
2556
  }, Oe = {
2556
2557
  borderRadius: {
2557
- ...St,
2558
+ ...Pt,
2558
2559
  applyTo: [
2559
2560
  "borderTopLeftRadius",
2560
2561
  "borderTopRightRadius",
@@ -2562,35 +2563,35 @@ const St = {
2562
2563
  "borderBottomRightRadius"
2563
2564
  ]
2564
2565
  },
2565
- borderTopLeftRadius: St,
2566
- borderTopRightRadius: St,
2567
- borderBottomLeftRadius: St,
2568
- borderBottomRightRadius: St,
2566
+ borderTopLeftRadius: Pt,
2567
+ borderTopRightRadius: Pt,
2568
+ borderBottomLeftRadius: Pt,
2569
+ borderBottomRightRadius: Pt,
2569
2570
  boxShadow: il
2570
2571
  };
2571
2572
  function Hi(t, { layout: e, layoutId: n }) {
2572
- return Pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Oe[t] || t === "opacity");
2573
+ return St.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Oe[t] || t === "opacity");
2573
2574
  }
2574
2575
  function pn(t, e, n) {
2575
- const s = t.style, i = e?.style, o = {};
2576
+ const s = t.style, i = e?.style, r = {};
2576
2577
  if (!s)
2577
- return o;
2578
- for (const r in s)
2579
- (k(s[r]) || i && k(i[r]) || Hi(r, t) || n?.getValue(r)?.liveStyle !== void 0) && (o[r] = s[r]);
2580
- return o;
2578
+ return r;
2579
+ for (const o in s)
2580
+ (k(s[o]) || i && k(i[o]) || Hi(o, t) || n?.getValue(o)?.liveStyle !== void 0) && (r[o] = s[o]);
2581
+ return r;
2581
2582
  }
2582
- function rl(t) {
2583
+ function ol(t) {
2583
2584
  return window.getComputedStyle(t);
2584
2585
  }
2585
- class ol extends Ui {
2586
+ class rl extends Ui {
2586
2587
  constructor() {
2587
2588
  super(...arguments), this.type = "html", this.renderInstance = _i;
2588
2589
  }
2589
2590
  readValueFromInstance(e, n) {
2590
- if (Pt.has(n))
2591
- return this.projection?.isProjecting ? be(n) : Fo(e, n);
2591
+ if (St.has(n))
2592
+ return this.projection?.isProjecting ? be(n) : Fr(e, n);
2592
2593
  {
2593
- const s = rl(e), i = (ii(n) ? s.getPropertyValue(n) : s[n]) || 0;
2594
+ const s = ol(e), i = (ii(n) ? s.getPropertyValue(n) : s[n]) || 0;
2594
2595
  return typeof i == "string" ? i.trim() : i;
2595
2596
  }
2596
2597
  }
@@ -2613,8 +2614,8 @@ const al = {
2613
2614
  };
2614
2615
  function cl(t, e, n = 1, s = 0, i = !0) {
2615
2616
  t.pathLength = 1;
2616
- const o = i ? al : ll;
2617
- t[o.offset] = `${-s}`, t[o.array] = `${e} ${n}`;
2617
+ const r = i ? al : ll;
2618
+ t[r.offset] = `${-s}`, t[r.array] = `${e} ${n}`;
2618
2619
  }
2619
2620
  const ul = [
2620
2621
  "offsetDistance",
@@ -2627,21 +2628,21 @@ function zi(t, {
2627
2628
  attrY: n,
2628
2629
  attrScale: s,
2629
2630
  pathLength: i,
2630
- pathSpacing: o = 1,
2631
- pathOffset: r = 0,
2631
+ pathSpacing: r = 1,
2632
+ pathOffset: o = 0,
2632
2633
  // This is object creation, which we try to avoid per-frame.
2633
2634
  ...a
2634
- }, l, u, c) {
2635
- if (mn(t, a, u), l) {
2635
+ }, l, c, u) {
2636
+ if (mn(t, a, c), l) {
2636
2637
  t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
2637
2638
  return;
2638
2639
  }
2639
2640
  t.attrs = t.style, t.style = {};
2640
2641
  const { attrs: h, style: f } = t;
2641
- 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?.transformBox ?? "fill-box", delete h.transformBox);
2642
+ 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 = u?.transformBox ?? "fill-box", delete h.transformBox);
2642
2643
  for (const d of ul)
2643
2644
  h[d] !== void 0 && (f[d] = h[d], delete h[d]);
2644
- e !== void 0 && (h.x = e), n !== void 0 && (h.y = n), s !== void 0 && (h.scale = s), i !== void 0 && cl(h, i, o, r, !1);
2645
+ e !== void 0 && (h.x = e), n !== void 0 && (h.y = n), s !== void 0 && (h.scale = s), i !== void 0 && cl(h, i, r, o, !1);
2645
2646
  }
2646
2647
  const Yi = /* @__PURE__ */ new Set([
2647
2648
  "baseFrequency",
@@ -2677,8 +2678,8 @@ function qi(t, e, n) {
2677
2678
  const s = pn(t, e, n);
2678
2679
  for (const i in t)
2679
2680
  if (k(t[i]) || k(e[i])) {
2680
- const o = xt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
2681
- s[o] = t[i];
2681
+ const r = xt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
2682
+ s[r] = t[i];
2682
2683
  }
2683
2684
  return s;
2684
2685
  }
@@ -2690,7 +2691,7 @@ class fl extends Ui {
2690
2691
  return e[n];
2691
2692
  }
2692
2693
  readValueFromInstance(e, n) {
2693
- if (Pt.has(n)) {
2694
+ if (St.has(n)) {
2694
2695
  const s = Ci(n);
2695
2696
  return s && s.default || 0;
2696
2697
  }
@@ -2741,37 +2742,37 @@ function gl(t) {
2741
2742
  }
2742
2743
  function yl(t) {
2743
2744
  let e = gl(t), n = Jn(), s = !0;
2744
- const i = (l) => (u, c) => {
2745
- const h = pt(t, c, l === "exit" ? t.presenceContext?.custom : void 0);
2745
+ const i = (l) => (c, u) => {
2746
+ const h = pt(t, u, l === "exit" ? t.presenceContext?.custom : void 0);
2746
2747
  if (h) {
2747
2748
  const { transition: f, transitionEnd: d, ...m } = h;
2748
- u = { ...u, ...m, ...d };
2749
+ c = { ...c, ...m, ...d };
2749
2750
  }
2750
- return u;
2751
+ return c;
2751
2752
  };
2752
- function o(l) {
2753
+ function r(l) {
2753
2754
  e = l(t);
2754
2755
  }
2755
- function r(l) {
2756
- const { props: u } = t, c = Zi(t.parent) || {}, h = [], f = /* @__PURE__ */ new Set();
2756
+ function o(l) {
2757
+ const { props: c } = t, u = Zi(t.parent) || {}, h = [], f = /* @__PURE__ */ new Set();
2757
2758
  let d = {}, m = 1 / 0;
2758
2759
  for (let T = 0; T < pl; T++) {
2759
- const v = ml[T], x = n[v], p = u[v] !== void 0 ? u[v] : c[v], S = Rt(p), P = v === l ? x.isActive : null;
2760
- P === !1 && (m = T);
2761
- let b = p === c[v] && p !== u[v] && S;
2760
+ const p = ml[T], x = n[p], g = c[p] !== void 0 ? c[p] : u[p], P = Rt(g), S = p === l ? x.isActive : null;
2761
+ S === !1 && (m = T);
2762
+ let b = g === u[p] && g !== c[p] && P;
2762
2763
  if (b && s && t.manuallyAnimateOnMount && (b = !1), x.protectedKeys = { ...d }, // If it isn't active and hasn't *just* been set as inactive
2763
- !x.isActive && P === null || // If we didn't and don't have any defined prop for this animation type
2764
- !p && !x.prevProp || // Or if the prop doesn't define an animation
2765
- Jt(p) || typeof p == "boolean")
2764
+ !x.isActive && S === null || // If we didn't and don't have any defined prop for this animation type
2765
+ !g && !x.prevProp || // Or if the prop doesn't define an animation
2766
+ Jt(g) || typeof g == "boolean")
2766
2767
  continue;
2767
- const C = vl(x.prevProp, p);
2768
+ const C = vl(x.prevProp, g);
2768
2769
  let w = C || // If we're making this variant active, we want to always make it active
2769
- v === l && x.isActive && !b && S || // If we removed a higher-priority variant (i is in reverse order)
2770
- T > m && S, I = !1;
2771
- const j = Array.isArray(p) ? p : [p];
2772
- let lt = j.reduce(i(v), {});
2773
- P === !1 && (lt = {});
2774
- const { prevResolvedValues: vn = {} } = x, Sr = {
2770
+ p === l && x.isActive && !b && P || // If we removed a higher-priority variant (i is in reverse order)
2771
+ T > m && P, I = !1;
2772
+ const j = Array.isArray(g) ? g : [g];
2773
+ let lt = j.reduce(i(p), {});
2774
+ S === !1 && (lt = {});
2775
+ const { prevResolvedValues: vn = {} } = x, wo = {
2775
2776
  ...vn,
2776
2777
  ...lt
2777
2778
  }, Tn = (R) => {
@@ -2779,22 +2780,22 @@ function yl(t) {
2779
2780
  const N = t.getValue(R);
2780
2781
  N && (N.liveStyle = !1);
2781
2782
  };
2782
- for (const R in Sr) {
2783
+ for (const R in wo) {
2783
2784
  const N = lt[R], et = vn[R];
2784
2785
  if (d.hasOwnProperty(R))
2785
2786
  continue;
2786
2787
  let ct = !1;
2787
2788
  Ee(N) && Ee(et) ? ct = !Ji(N, et) : ct = N !== et, ct ? N != null ? Tn(R) : f.add(R) : N !== void 0 && f.has(R) ? Tn(R) : x.protectedKeys[R] = !0;
2788
2789
  }
2789
- x.prevProp = p, x.prevResolvedValues = lt, x.isActive && (d = { ...d, ...lt }), s && t.blockInitialAnimation && (w = !1);
2790
+ x.prevProp = g, x.prevResolvedValues = lt, x.isActive && (d = { ...d, ...lt }), s && t.blockInitialAnimation && (w = !1);
2790
2791
  const xn = b && C;
2791
2792
  w && (!xn || I) && h.push(...j.map((R) => {
2792
- const N = { type: v };
2793
+ const N = { type: p };
2793
2794
  if (typeof R == "string" && s && !xn && t.manuallyAnimateOnMount && t.parent) {
2794
2795
  const { parent: et } = t, ct = pt(et, R);
2795
2796
  if (et.enteringChildren && ct) {
2796
- const { delayChildren: wr } = ct.transition || {};
2797
- N.delay = Pi(et.enteringChildren, t, wr);
2797
+ const { delayChildren: bo } = ct.transition || {};
2798
+ N.delay = Si(et.enteringChildren, t, bo);
2798
2799
  }
2799
2800
  }
2800
2801
  return {
@@ -2805,31 +2806,31 @@ function yl(t) {
2805
2806
  }
2806
2807
  if (f.size) {
2807
2808
  const T = {};
2808
- if (typeof u.initial != "boolean") {
2809
- const v = pt(t, Array.isArray(u.initial) ? u.initial[0] : u.initial);
2810
- v && v.transition && (T.transition = v.transition);
2809
+ if (typeof c.initial != "boolean") {
2810
+ const p = pt(t, Array.isArray(c.initial) ? c.initial[0] : c.initial);
2811
+ p && p.transition && (T.transition = p.transition);
2811
2812
  }
2812
- f.forEach((v) => {
2813
- const x = t.getBaseTarget(v), p = t.getValue(v);
2814
- p && (p.liveStyle = !0), T[v] = x ?? null;
2813
+ f.forEach((p) => {
2814
+ const x = t.getBaseTarget(p), g = t.getValue(p);
2815
+ g && (g.liveStyle = !0), T[p] = x ?? null;
2815
2816
  }), h.push({ animation: T });
2816
2817
  }
2817
- let g = !!h.length;
2818
- return s && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (g = !1), s = !1, g ? e(h) : Promise.resolve();
2818
+ let v = !!h.length;
2819
+ return s && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (v = !1), s = !1, v ? e(h) : Promise.resolve();
2819
2820
  }
2820
- function a(l, u) {
2821
- if (n[l].isActive === u)
2821
+ function a(l, c) {
2822
+ if (n[l].isActive === c)
2822
2823
  return Promise.resolve();
2823
- t.variantChildren?.forEach((h) => h.animationState?.setActive(l, u)), n[l].isActive = u;
2824
- const c = r(l);
2824
+ t.variantChildren?.forEach((h) => h.animationState?.setActive(l, c)), n[l].isActive = c;
2825
+ const u = o(l);
2825
2826
  for (const h in n)
2826
2827
  n[h].protectedKeys = {};
2827
- return c;
2828
+ return u;
2828
2829
  }
2829
2830
  return {
2830
- animateChanges: r,
2831
+ animateChanges: o,
2831
2832
  setActive: a,
2832
- setAnimateFunction: o,
2833
+ setAnimateFunction: r,
2833
2834
  getState: () => n,
2834
2835
  reset: () => {
2835
2836
  n = Jn();
@@ -2867,7 +2868,7 @@ function $(t, e) {
2867
2868
  function ts(t, e) {
2868
2869
  t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
2869
2870
  }
2870
- const Qi = 1e-4, Tl = 1 - Qi, xl = 1 + Qi, tr = 0.01, Pl = 0 - tr, Sl = 0 + tr;
2871
+ const Qi = 1e-4, Tl = 1 - Qi, xl = 1 + Qi, to = 0.01, Sl = 0 - to, Pl = 0 + to;
2871
2872
  function B(t) {
2872
2873
  return t.max - t.min;
2873
2874
  }
@@ -2875,7 +2876,7 @@ function wl(t, e, n) {
2875
2876
  return Math.abs(t - e) <= n;
2876
2877
  }
2877
2878
  function es(t, e, n, s = 0.5) {
2878
- t.origin = s, t.originPoint = D(e.min, e.max, t.origin), t.scale = B(n) / B(e), t.translate = D(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Tl && t.scale <= xl || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Pl && t.translate <= Sl || isNaN(t.translate)) && (t.translate = 0);
2879
+ t.origin = s, t.originPoint = D(e.min, e.max, t.origin), t.scale = B(n) / B(e), t.translate = D(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Tl && t.scale <= xl || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Sl && t.translate <= Pl || isNaN(t.translate)) && (t.translate = 0);
2879
2880
  }
2880
2881
  function Vt(t, e, n, s) {
2881
2882
  es(t.x, e.x, n.x, s ? s.originX : void 0), es(t.y, e.y, n.y, s ? s.originY : void 0);
@@ -2895,23 +2896,23 @@ function Xt(t, e, n) {
2895
2896
  function is(t, e, n, s, i) {
2896
2897
  return t -= e, t = Yt(t, 1 / n, s), i !== void 0 && (t = Yt(t, 1 / i, s)), t;
2897
2898
  }
2898
- function Al(t, e = 0, n = 1, s = 0.5, i, o = t, r = t) {
2899
- if (H.test(e) && (e = parseFloat(e), e = D(r.min, r.max, e / 100) - r.min), typeof e != "number")
2899
+ function Al(t, e = 0, n = 1, s = 0.5, i, r = t, o = t) {
2900
+ if (H.test(e) && (e = parseFloat(e), e = D(o.min, o.max, e / 100) - o.min), typeof e != "number")
2900
2901
  return;
2901
- let a = D(o.min, o.max, s);
2902
- t === o && (a -= e), t.min = is(t.min, e, n, a, i), t.max = is(t.max, e, n, a, i);
2902
+ let a = D(r.min, r.max, s);
2903
+ t === r && (a -= e), t.min = is(t.min, e, n, a, i), t.max = is(t.max, e, n, a, i);
2903
2904
  }
2904
- function rs(t, e, [n, s, i], o, r) {
2905
- Al(t, e[n], e[s], e[i], e.scale, o, r);
2905
+ function os(t, e, [n, s, i], r, o) {
2906
+ Al(t, e[n], e[s], e[i], e.scale, r, o);
2906
2907
  }
2907
2908
  const Vl = ["x", "scaleX", "originX"], Dl = ["y", "scaleY", "originY"];
2908
- function os(t, e, n, s) {
2909
- rs(t.x, e, Vl, n ? n.x : void 0, s ? s.x : void 0), rs(t.y, e, Dl, n ? n.y : void 0, s ? s.y : void 0);
2909
+ function rs(t, e, n, s) {
2910
+ os(t.x, e, Vl, n ? n.x : void 0, s ? s.x : void 0), os(t.y, e, Dl, n ? n.y : void 0, s ? s.y : void 0);
2910
2911
  }
2911
2912
  function as(t) {
2912
2913
  return t.translate === 0 && t.scale === 1;
2913
2914
  }
2914
- function er(t) {
2915
+ function eo(t) {
2915
2916
  return as(t.x) && as(t.y);
2916
2917
  }
2917
2918
  function ls(t, e) {
@@ -2923,7 +2924,7 @@ function Ml(t, e) {
2923
2924
  function cs(t, e) {
2924
2925
  return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
2925
2926
  }
2926
- function nr(t, e) {
2927
+ function no(t, e) {
2927
2928
  return cs(t.x, e.x) && cs(t.y, e.y);
2928
2929
  }
2929
2930
  function us(t) {
@@ -2937,36 +2938,36 @@ function U(t) {
2937
2938
  }
2938
2939
  function Cl(t, e, n) {
2939
2940
  let s = "";
2940
- const i = t.x.translate / e.x, o = t.y.translate / e.y, r = n?.z || 0;
2941
- if ((i || o || r) && (s = `translate3d(${i}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
2942
- const { transformPerspective: u, rotate: c, rotateX: h, rotateY: f, skewX: d, skewY: m } = n;
2943
- u && (s = `perspective(${u}px) ${s}`), c && (s += `rotate(${c}deg) `), h && (s += `rotateX(${h}deg) `), f && (s += `rotateY(${f}deg) `), d && (s += `skewX(${d}deg) `), m && (s += `skewY(${m}deg) `);
2941
+ const i = t.x.translate / e.x, r = t.y.translate / e.y, o = n?.z || 0;
2942
+ if ((i || r || o) && (s = `translate3d(${i}px, ${r}px, ${o}px) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
2943
+ const { transformPerspective: c, rotate: u, rotateX: h, rotateY: f, skewX: d, skewY: m } = n;
2944
+ c && (s = `perspective(${c}px) ${s}`), u && (s += `rotate(${u}deg) `), h && (s += `rotateX(${h}deg) `), f && (s += `rotateY(${f}deg) `), d && (s += `skewX(${d}deg) `), m && (s += `skewY(${m}deg) `);
2944
2945
  }
2945
2946
  const a = t.x.scale * e.x, l = t.y.scale * e.y;
2946
2947
  return (a !== 1 || l !== 1) && (s += `scale(${a}, ${l})`), s || "none";
2947
2948
  }
2948
- const sr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], El = sr.length, fs = (t) => typeof t == "string" ? parseFloat(t) : t, ds = (t) => typeof t == "number" || y.test(t);
2949
- function Rl(t, e, n, s, i, o) {
2950
- i ? (t.opacity = D(0, n.opacity ?? 1, Ll(s)), t.opacityExit = D(e.opacity ?? 1, 0, kl(s))) : o && (t.opacity = D(e.opacity ?? 1, n.opacity ?? 1, s));
2951
- for (let r = 0; r < El; r++) {
2952
- const a = `border${sr[r]}Radius`;
2953
- let l = ms(e, a), u = ms(n, a);
2954
- if (l === void 0 && u === void 0)
2949
+ const so = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], El = so.length, fs = (t) => typeof t == "string" ? parseFloat(t) : t, ds = (t) => typeof t == "number" || y.test(t);
2950
+ function Rl(t, e, n, s, i, r) {
2951
+ i ? (t.opacity = D(0, n.opacity ?? 1, Ll(s)), t.opacityExit = D(e.opacity ?? 1, 0, kl(s))) : r && (t.opacity = D(e.opacity ?? 1, n.opacity ?? 1, s));
2952
+ for (let o = 0; o < El; o++) {
2953
+ const a = `border${so[o]}Radius`;
2954
+ let l = ms(e, a), c = ms(n, a);
2955
+ if (l === void 0 && c === void 0)
2955
2956
  continue;
2956
- l || (l = 0), u || (u = 0), l === 0 || u === 0 || ds(l) === ds(u) ? (t[a] = Math.max(D(fs(l), fs(u), s), 0), (H.test(u) || H.test(l)) && (t[a] += "%")) : t[a] = u;
2957
+ l || (l = 0), c || (c = 0), l === 0 || c === 0 || ds(l) === ds(c) ? (t[a] = Math.max(D(fs(l), fs(c), s), 0), (H.test(c) || H.test(l)) && (t[a] += "%")) : t[a] = c;
2957
2958
  }
2958
2959
  (e.rotate || n.rotate) && (t.rotate = D(e.rotate || 0, n.rotate || 0, s));
2959
2960
  }
2960
2961
  function ms(t, e) {
2961
2962
  return t[e] !== void 0 ? t[e] : t.borderRadius;
2962
2963
  }
2963
- const Ll = /* @__PURE__ */ ir(0, 0.5, Js), kl = /* @__PURE__ */ ir(0.5, 0.95, K);
2964
- function ir(t, e, n) {
2964
+ const Ll = /* @__PURE__ */ io(0, 0.5, Js), kl = /* @__PURE__ */ io(0.5, 0.95, K);
2965
+ function io(t, e, n) {
2965
2966
  return (s) => s < t ? 0 : s > e ? 1 : n(/* @__PURE__ */ Mt(t, e, s));
2966
2967
  }
2967
2968
  function Fl(t, e, n) {
2968
2969
  const s = k(t) ? t : gt(t);
2969
- return s.start(on("", s, e, n)), s.animation;
2970
+ return s.start(rn("", s, e, n)), s.animation;
2970
2971
  }
2971
2972
  function Lt(t, e, n, s = { passive: !0 }) {
2972
2973
  return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
@@ -2988,8 +2989,8 @@ class Il {
2988
2989
  }
2989
2990
  function Ol(t, e) {
2990
2991
  const n = F.now(), s = ({ timestamp: i }) => {
2991
- const o = i - n;
2992
- o >= e && (J(s), t(o - e));
2992
+ const r = i - n;
2993
+ r >= e && (J(s), t(r - e));
2993
2994
  };
2994
2995
  return A.setup(s, !0), () => J(s);
2995
2996
  }
@@ -3015,9 +3016,9 @@ class jl {
3015
3016
  return !1;
3016
3017
  let s;
3017
3018
  for (let i = n; i >= 0; i--) {
3018
- const o = this.members[i];
3019
- if (o.isPresent !== !1) {
3020
- s = o;
3019
+ const r = this.members[i];
3020
+ if (r.isPresent !== !1) {
3021
+ s = r;
3021
3022
  break;
3022
3023
  }
3023
3024
  }
@@ -3027,8 +3028,8 @@ class jl {
3027
3028
  const s = this.lead;
3028
3029
  if (e !== s && (this.prevLead = s, this.lead = e, e.show(), s)) {
3029
3030
  s.instance && s.scheduleRender(), e.scheduleRender();
3030
- const i = s.options.layoutDependency, o = e.options.layoutDependency;
3031
- i !== void 0 && o !== void 0 && i === o || (e.resumeFrom = s, n && (e.resumeFrom.preserveOpacity = !0), s.snapshot && (e.snapshot = s.snapshot, e.snapshot.latestValues = s.animationValues || s.latestValues), e.root && e.root.isUpdating && (e.isLayoutDirty = !0));
3031
+ const i = s.options.layoutDependency, r = e.options.layoutDependency;
3032
+ i !== void 0 && r !== void 0 && i === r || (e.resumeFrom = s, n && (e.resumeFrom.preserveOpacity = !0), s.snapshot && (e.snapshot = s.snapshot, e.snapshot.latestValues = s.animationValues || s.latestValues), e.root && e.root.isUpdating && (e.isLayoutDirty = !0));
3032
3033
  const { crossfade: a } = e.options;
3033
3034
  a === !1 && s.hide();
3034
3035
  }
@@ -3069,7 +3070,7 @@ function ue(t, e, n, s) {
3069
3070
  const { latestValues: i } = e;
3070
3071
  i[t] && (n[t] = i[t], e.setStaticValue(t, 0), s && (s[t] = 0));
3071
3072
  }
3072
- function rr(t) {
3073
+ function oo(t) {
3073
3074
  if (t.hasCheckedOptimisedAppear = !0, t.root === t)
3074
3075
  return;
3075
3076
  const { visualElement: e } = t.options;
@@ -3077,66 +3078,66 @@ function rr(t) {
3077
3078
  return;
3078
3079
  const n = Ai(e);
3079
3080
  if (window.MotionHasOptimisedAnimation(n, "transform")) {
3080
- const { layout: i, layoutId: o } = t.options;
3081
- window.MotionCancelOptimisedAnimation(n, "transform", A, !(i || o));
3081
+ const { layout: i, layoutId: r } = t.options;
3082
+ window.MotionCancelOptimisedAnimation(n, "transform", A, !(i || r));
3082
3083
  }
3083
3084
  const { parent: s } = t;
3084
- s && !s.hasCheckedOptimisedAppear && rr(s);
3085
+ s && !s.hasCheckedOptimisedAppear && oo(s);
3085
3086
  }
3086
- function or({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
3087
+ function ro({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
3087
3088
  return class {
3088
- constructor(r = {}, a = e?.()) {
3089
+ constructor(o = {}, a = e?.()) {
3089
3090
  this.id = Ul++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
3090
3091
  this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
3091
3092
  }, this.updateProjection = () => {
3092
3093
  this.projectionUpdateScheduled = !1, this.nodes.forEach($l), this.nodes.forEach(zl), this.nodes.forEach(Yl), this.nodes.forEach(Gl);
3093
- }, 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;
3094
+ }, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = o, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
3094
3095
  for (let l = 0; l < this.path.length; l++)
3095
3096
  this.path[l].shouldResetTransform = !0;
3096
3097
  this.root === this && (this.nodes = new Il());
3097
3098
  }
3098
- addEventListener(r, a) {
3099
- return this.eventHandlers.has(r) || this.eventHandlers.set(r, new _e()), this.eventHandlers.get(r).add(a);
3099
+ addEventListener(o, a) {
3100
+ return this.eventHandlers.has(o) || this.eventHandlers.set(o, new _e()), this.eventHandlers.get(o).add(a);
3100
3101
  }
3101
- notifyListeners(r, ...a) {
3102
- const l = this.eventHandlers.get(r);
3102
+ notifyListeners(o, ...a) {
3103
+ const l = this.eventHandlers.get(o);
3103
3104
  l && l.notify(...a);
3104
3105
  }
3105
- hasListeners(r) {
3106
- return this.eventHandlers.has(r);
3106
+ hasListeners(o) {
3107
+ return this.eventHandlers.has(o);
3107
3108
  }
3108
3109
  /**
3109
3110
  * Lifecycles
3110
3111
  */
3111
- mount(r) {
3112
+ mount(o) {
3112
3113
  if (this.instance)
3113
3114
  return;
3114
- this.isSVG = Ii(r) && !Ka(r), this.instance = r;
3115
- const { layoutId: a, layout: l, visualElement: u } = this.options;
3116
- 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) {
3117
- let c, h = 0;
3115
+ this.isSVG = Ii(o) && !Ka(o), this.instance = o;
3116
+ const { layoutId: a, layout: l, visualElement: c } = this.options;
3117
+ if (c && !c.current && c.mount(o), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
3118
+ let u, h = 0;
3118
3119
  const f = () => this.root.updateBlockedByResize = !1;
3119
3120
  A.read(() => {
3120
3121
  h = window.innerWidth;
3121
- }), t(r, () => {
3122
+ }), t(o, () => {
3122
3123
  const d = window.innerWidth;
3123
- d !== h && (h = d, this.root.updateBlockedByResize = !0, c && c(), c = Ol(f, 250), $t.hasAnimatedSinceResize && ($t.hasAnimatedSinceResize = !1, this.nodes.forEach(ys)));
3124
+ d !== h && (h = d, this.root.updateBlockedByResize = !0, u && u(), u = Ol(f, 250), $t.hasAnimatedSinceResize && ($t.hasAnimatedSinceResize = !1, this.nodes.forEach(ys)));
3124
3125
  });
3125
3126
  }
3126
- a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a || l) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: d }) => {
3127
+ a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && c && (a || l) && this.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: d }) => {
3127
3128
  if (this.isTreeAnimationBlocked()) {
3128
3129
  this.target = void 0, this.relativeTarget = void 0;
3129
3130
  return;
3130
3131
  }
3131
- const m = this.options.transition || u.getDefaultTransition() || Ql, { onLayoutAnimationStart: g, onLayoutAnimationComplete: T } = u.getProps(), v = !this.targetLayout || !nr(this.targetLayout, d), x = !h && f;
3132
- if (this.options.layoutRoot || this.resumeFrom || x || h && (v || !this.currentAnimation)) {
3132
+ const m = this.options.transition || c.getDefaultTransition() || Ql, { onLayoutAnimationStart: v, onLayoutAnimationComplete: T } = c.getProps(), p = !this.targetLayout || !no(this.targetLayout, d), x = !h && f;
3133
+ if (this.options.layoutRoot || this.resumeFrom || x || h && (p || !this.currentAnimation)) {
3133
3134
  this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
3134
- const p = {
3135
- ...rn(m, "layout"),
3136
- onPlay: g,
3135
+ const g = {
3136
+ ...on(m, "layout"),
3137
+ onPlay: v,
3137
3138
  onComplete: T
3138
3139
  };
3139
- (u.shouldReduceMotion || this.options.layoutRoot) && (p.delay = 0, p.type = !1), this.startAnimation(p), this.setAnimationOrigin(c, x);
3140
+ (c.shouldReduceMotion || this.options.layoutRoot) && (g.delay = 0, g.type = !1), this.startAnimation(g), this.setAnimationOrigin(u, x);
3140
3141
  } else
3141
3142
  h || ys(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
3142
3143
  this.targetLayout = d;
@@ -3144,8 +3145,8 @@ function or({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3144
3145
  }
3145
3146
  unmount() {
3146
3147
  this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
3147
- const r = this.getStack();
3148
- r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), J(this.updateProjection);
3148
+ const o = this.getStack();
3149
+ o && o.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), J(this.updateProjection);
3149
3150
  }
3150
3151
  // only on the root
3151
3152
  blockUpdate() {
@@ -3165,26 +3166,26 @@ function or({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3165
3166
  this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(Xl), this.animationId++);
3166
3167
  }
3167
3168
  getTransformTemplate() {
3168
- const { visualElement: r } = this.options;
3169
- return r && r.getProps().transformTemplate;
3169
+ const { visualElement: o } = this.options;
3170
+ return o && o.getProps().transformTemplate;
3170
3171
  }
3171
- willUpdate(r = !0) {
3172
+ willUpdate(o = !0) {
3172
3173
  if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
3173
3174
  this.options.onExitComplete && this.options.onExitComplete();
3174
3175
  return;
3175
3176
  }
3176
- if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && rr(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
3177
+ if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && oo(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
3177
3178
  return;
3178
3179
  this.isLayoutDirty = !0;
3179
- for (let c = 0; c < this.path.length; c++) {
3180
- const h = this.path[c];
3180
+ for (let u = 0; u < this.path.length; u++) {
3181
+ const h = this.path[u];
3181
3182
  h.shouldResetTransform = !0, h.updateScroll("snapshot"), h.options.layoutRoot && h.willUpdate(!1);
3182
3183
  }
3183
3184
  const { layoutId: a, layout: l } = this.options;
3184
3185
  if (a === void 0 && !l)
3185
3186
  return;
3186
- const u = this.getTransformTemplate();
3187
- this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0, this.updateSnapshot(), r && this.notifyListeners("willUpdate");
3187
+ const c = this.getTransformTemplate();
3188
+ this.prevTransformTemplateValue = c ? c(this.latestValues, "") : void 0, this.updateSnapshot(), o && this.notifyListeners("willUpdate");
3188
3189
  }
3189
3190
  update() {
3190
3191
  if (this.updateScheduled = !1, this.isUpdateBlocked()) {
@@ -3225,18 +3226,18 @@ function or({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3225
3226
  if (this.resumeFrom && !this.resumeFrom.instance)
3226
3227
  for (let l = 0; l < this.path.length; l++)
3227
3228
  this.path[l].updateScroll();
3228
- const r = this.layout;
3229
+ const o = this.layout;
3229
3230
  this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected = E(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
3230
3231
  const { visualElement: a } = this.options;
3231
- a && a.notify("LayoutMeasure", this.layout.layoutBox, r ? r.layoutBox : void 0);
3232
+ a && a.notify("LayoutMeasure", this.layout.layoutBox, o ? o.layoutBox : void 0);
3232
3233
  }
3233
- updateScroll(r = "measure") {
3234
+ updateScroll(o = "measure") {
3234
3235
  let a = !!(this.options.layoutScroll && this.instance);
3235
- if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === r && (a = !1), a && this.instance) {
3236
+ if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === o && (a = !1), a && this.instance) {
3236
3237
  const l = s(this.instance);
3237
3238
  this.scroll = {
3238
3239
  animationId: this.root.animationId,
3239
- phase: r,
3240
+ phase: o,
3240
3241
  isRoot: l,
3241
3242
  offset: n(this.instance),
3242
3243
  wasRoot: this.scroll ? this.scroll.isRoot : l
@@ -3246,13 +3247,13 @@ function or({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3246
3247
  resetTransform() {
3247
3248
  if (!i)
3248
3249
  return;
3249
- const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !er(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
3250
- r && this.instance && (a || st(this.latestValues) || c) && (i(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
3250
+ const o = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !eo(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
3251
+ o && this.instance && (a || st(this.latestValues) || u) && (i(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
3251
3252
  }
3252
- measure(r = !0) {
3253
+ measure(o = !0) {
3253
3254
  const a = this.measurePageBox();
3254
3255
  let l = this.removeElementScroll(a);
3255
- return r && (l = this.removeTransform(l)), tc(l), {
3256
+ return o && (l = this.removeTransform(l)), tc(l), {
3256
3257
  animationId: this.root.animationId,
3257
3258
  measuredBox: a,
3258
3259
  layoutBox: l,
@@ -3261,59 +3262,59 @@ function or({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3261
3262
  };
3262
3263
  }
3263
3264
  measurePageBox() {
3264
- const { visualElement: r } = this.options;
3265
- if (!r)
3265
+ const { visualElement: o } = this.options;
3266
+ if (!o)
3266
3267
  return E();
3267
- const a = r.measureViewportBox();
3268
+ const a = o.measureViewportBox();
3268
3269
  if (!(this.scroll?.wasRoot || this.path.some(ec))) {
3269
- const { scroll: u } = this.root;
3270
- u && (dt(a.x, u.offset.x), dt(a.y, u.offset.y));
3270
+ const { scroll: c } = this.root;
3271
+ c && (dt(a.x, c.offset.x), dt(a.y, c.offset.y));
3271
3272
  }
3272
3273
  return a;
3273
3274
  }
3274
- removeElementScroll(r) {
3275
+ removeElementScroll(o) {
3275
3276
  const a = E();
3276
- if ($(a, r), this.scroll?.wasRoot)
3277
+ if ($(a, o), this.scroll?.wasRoot)
3277
3278
  return a;
3278
3279
  for (let l = 0; l < this.path.length; l++) {
3279
- const u = this.path[l], { scroll: c, options: h } = u;
3280
- u !== this.root && c && h.layoutScroll && (c.wasRoot && $(a, r), dt(a.x, c.offset.x), dt(a.y, c.offset.y));
3280
+ const c = this.path[l], { scroll: u, options: h } = c;
3281
+ c !== this.root && u && h.layoutScroll && (u.wasRoot && $(a, o), dt(a.x, u.offset.x), dt(a.y, u.offset.y));
3281
3282
  }
3282
3283
  return a;
3283
3284
  }
3284
- applyTransform(r, a = !1) {
3285
+ applyTransform(o, a = !1) {
3285
3286
  const l = E();
3286
- $(l, r);
3287
- for (let u = 0; u < this.path.length; u++) {
3288
- const c = this.path[u];
3289
- !a && c.options.layoutScroll && c.scroll && c !== c.root && mt(l, {
3290
- x: -c.scroll.offset.x,
3291
- y: -c.scroll.offset.y
3292
- }), st(c.latestValues) && mt(l, c.latestValues);
3287
+ $(l, o);
3288
+ for (let c = 0; c < this.path.length; c++) {
3289
+ const u = this.path[c];
3290
+ !a && u.options.layoutScroll && u.scroll && u !== u.root && mt(l, {
3291
+ x: -u.scroll.offset.x,
3292
+ y: -u.scroll.offset.y
3293
+ }), st(u.latestValues) && mt(l, u.latestValues);
3293
3294
  }
3294
3295
  return st(this.latestValues) && mt(l, this.latestValues), l;
3295
3296
  }
3296
- removeTransform(r) {
3297
+ removeTransform(o) {
3297
3298
  const a = E();
3298
- $(a, r);
3299
+ $(a, o);
3299
3300
  for (let l = 0; l < this.path.length; l++) {
3300
- const u = this.path[l];
3301
- if (!u.instance || !st(u.latestValues))
3301
+ const c = this.path[l];
3302
+ if (!c.instance || !st(c.latestValues))
3302
3303
  continue;
3303
- Be(u.latestValues) && u.updateSnapshot();
3304
- const c = E(), h = u.measurePageBox();
3305
- $(c, h), os(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
3304
+ Be(c.latestValues) && c.updateSnapshot();
3305
+ const u = E(), h = c.measurePageBox();
3306
+ $(u, h), rs(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
3306
3307
  }
3307
- return st(this.latestValues) && os(a, this.latestValues), a;
3308
+ return st(this.latestValues) && rs(a, this.latestValues), a;
3308
3309
  }
3309
- setTargetDelta(r) {
3310
- this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
3310
+ setTargetDelta(o) {
3311
+ this.targetDelta = o, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
3311
3312
  }
3312
- setOptions(r) {
3313
+ setOptions(o) {
3313
3314
  this.options = {
3314
3315
  ...this.options,
3315
- ...r,
3316
- crossfade: r.crossfade !== void 0 ? r.crossfade : !0
3316
+ ...o,
3317
+ crossfade: o.crossfade !== void 0 ? o.crossfade : !0
3317
3318
  };
3318
3319
  }
3319
3320
  clearMeasurements() {
@@ -3322,14 +3323,14 @@ function or({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3322
3323
  forceRelativeParentToResolveTarget() {
3323
3324
  this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== L.timestamp && this.relativeParent.resolveTargetDelta(!0);
3324
3325
  }
3325
- resolveTargetDelta(r = !1) {
3326
+ resolveTargetDelta(o = !1) {
3326
3327
  const a = this.getLead();
3327
3328
  this.isProjectionDirty || (this.isProjectionDirty = a.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = a.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = a.isSharedProjectionDirty);
3328
3329
  const l = !!this.resumingFrom || this !== a;
3329
- if (!(r || l && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
3330
+ if (!(o || l && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
3330
3331
  return;
3331
- const { layout: c, layoutId: h } = this.options;
3332
- if (!this.layout || !(c || h))
3332
+ const { layout: u, layoutId: h } = this.options;
3333
+ if (!this.layout || !(u || h))
3333
3334
  return;
3334
3335
  this.resolvedRelativeTargetAt = L.timestamp;
3335
3336
  const f = this.getClosestProjectingParent();
@@ -3342,24 +3343,24 @@ function or({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3342
3343
  isProjecting() {
3343
3344
  return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
3344
3345
  }
3345
- createRelativeTarget(r, a, l) {
3346
- this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = E(), this.relativeTargetOrigin = E(), Xt(this.relativeTargetOrigin, a, l), $(this.relativeTarget, this.relativeTargetOrigin);
3346
+ createRelativeTarget(o, a, l) {
3347
+ this.relativeParent = o, this.linkedParentVersion = o.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = E(), this.relativeTargetOrigin = E(), Xt(this.relativeTargetOrigin, a, l), $(this.relativeTarget, this.relativeTargetOrigin);
3347
3348
  }
3348
3349
  removeRelativeTarget() {
3349
3350
  this.relativeParent = this.relativeTarget = void 0;
3350
3351
  }
3351
3352
  calcProjection() {
3352
- const r = this.getLead(), a = !!this.resumingFrom || this !== r;
3353
+ const o = this.getLead(), a = !!this.resumingFrom || this !== o;
3353
3354
  let l = !0;
3354
3355
  if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === L.timestamp && (l = !1), l)
3355
3356
  return;
3356
- const { layout: u, layoutId: c } = this.options;
3357
- if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || c))
3357
+ const { layout: c, layoutId: u } = this.options;
3358
+ if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || u))
3358
3359
  return;
3359
3360
  $(this.layoutCorrected, this.layout.layoutBox);
3360
3361
  const h = this.treeScale.x, f = this.treeScale.y;
3361
- Qa(this.layoutCorrected, this.treeScale, this.path, a), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = E());
3362
- const { target: d } = r;
3362
+ Qa(this.layoutCorrected, this.treeScale, this.path, a), o.layout && !o.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (o.target = o.layout.layoutBox, o.targetWithTransforms = E());
3363
+ const { target: d } = o;
3363
3364
  if (!d) {
3364
3365
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
3365
3366
  return;
@@ -3372,8 +3373,8 @@ function or({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3372
3373
  show() {
3373
3374
  this.isVisible = !0;
3374
3375
  }
3375
- scheduleRender(r = !0) {
3376
- if (this.options.visualElement?.scheduleRender(), r) {
3376
+ scheduleRender(o = !0) {
3377
+ if (this.options.visualElement?.scheduleRender(), o) {
3377
3378
  const a = this.getStack();
3378
3379
  a && a.scheduleRender();
3379
3380
  }
@@ -3382,149 +3383,149 @@ function or({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3382
3383
  createProjectionDeltas() {
3383
3384
  this.prevProjectionDelta = ft(), this.projectionDelta = ft(), this.projectionDeltaWithTransform = ft();
3384
3385
  }
3385
- setAnimationOrigin(r, a = !1) {
3386
- const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, h = ft();
3386
+ setAnimationOrigin(o, a = !1) {
3387
+ const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, h = ft();
3387
3388
  (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
3388
- const f = E(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, g = d !== m, T = this.getStack(), v = !T || T.members.length <= 1, x = !!(g && !v && this.options.crossfade === !0 && !this.path.some(Jl));
3389
+ const f = E(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, v = d !== m, T = this.getStack(), p = !T || T.members.length <= 1, x = !!(v && !p && this.options.crossfade === !0 && !this.path.some(Jl));
3389
3390
  this.animationProgress = 0;
3390
- let p;
3391
- this.mixTargetDelta = (S) => {
3392
- const P = S / 1e3;
3393
- vs(h.x, r.x, P), vs(h.y, r.y, P), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Xt(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Zl(this.relativeTarget, this.relativeTargetOrigin, f, P), p && Ml(this.relativeTarget, p) && (this.isProjectionDirty = !1), p || (p = E()), $(p, this.relativeTarget)), g && (this.animationValues = c, Rl(c, u, this.latestValues, P, x, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = P;
3391
+ let g;
3392
+ this.mixTargetDelta = (P) => {
3393
+ const S = P / 1e3;
3394
+ vs(h.x, o.x, S), vs(h.y, o.y, S), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Xt(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Zl(this.relativeTarget, this.relativeTargetOrigin, f, S), g && Ml(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = E()), $(g, this.relativeTarget)), v && (this.animationValues = u, Rl(u, c, this.latestValues, S, x, p)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = S;
3394
3395
  }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
3395
3396
  }
3396
- startAnimation(r) {
3397
+ startAnimation(o) {
3397
3398
  this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (J(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = A.update(() => {
3398
3399
  $t.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = gt(0)), this.currentAnimation = Fl(this.motionValue, [0, 1e3], {
3399
- ...r,
3400
+ ...o,
3400
3401
  velocity: 0,
3401
3402
  isSync: !0,
3402
3403
  onUpdate: (a) => {
3403
- this.mixTargetDelta(a), r.onUpdate && r.onUpdate(a);
3404
+ this.mixTargetDelta(a), o.onUpdate && o.onUpdate(a);
3404
3405
  },
3405
3406
  onStop: () => {
3406
3407
  },
3407
3408
  onComplete: () => {
3408
- r.onComplete && r.onComplete(), this.completeAnimation();
3409
+ o.onComplete && o.onComplete(), this.completeAnimation();
3409
3410
  }
3410
3411
  }), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
3411
3412
  });
3412
3413
  }
3413
3414
  completeAnimation() {
3414
3415
  this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
3415
- const r = this.getStack();
3416
- r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
3416
+ const o = this.getStack();
3417
+ o && o.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
3417
3418
  }
3418
3419
  finishAnimation() {
3419
3420
  this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(Nl), this.currentAnimation.stop()), this.completeAnimation();
3420
3421
  }
3421
3422
  applyTransformsToTarget() {
3422
- const r = this.getLead();
3423
- let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = r;
3424
- if (!(!a || !l || !u)) {
3425
- if (this !== r && this.layout && u && ar(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
3423
+ const o = this.getLead();
3424
+ let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = o;
3425
+ if (!(!a || !l || !c)) {
3426
+ if (this !== o && this.layout && c && ao(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
3426
3427
  l = this.target || E();
3427
3428
  const h = B(this.layout.layoutBox.x);
3428
- l.x.min = r.target.x.min, l.x.max = l.x.min + h;
3429
+ l.x.min = o.target.x.min, l.x.max = l.x.min + h;
3429
3430
  const f = B(this.layout.layoutBox.y);
3430
- l.y.min = r.target.y.min, l.y.max = l.y.min + f;
3431
+ l.y.min = o.target.y.min, l.y.max = l.y.min + f;
3431
3432
  }
3432
- $(a, l), mt(a, c), Vt(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
3433
+ $(a, l), mt(a, u), Vt(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
3433
3434
  }
3434
3435
  }
3435
- registerSharedNode(r, a) {
3436
- this.sharedNodes.has(r) || this.sharedNodes.set(r, new jl()), this.sharedNodes.get(r).add(a);
3437
- const u = a.options.initialPromotionConfig;
3436
+ registerSharedNode(o, a) {
3437
+ this.sharedNodes.has(o) || this.sharedNodes.set(o, new jl()), this.sharedNodes.get(o).add(a);
3438
+ const c = a.options.initialPromotionConfig;
3438
3439
  a.promote({
3439
- transition: u ? u.transition : void 0,
3440
- preserveFollowOpacity: u && u.shouldPreserveFollowOpacity ? u.shouldPreserveFollowOpacity(a) : void 0
3440
+ transition: c ? c.transition : void 0,
3441
+ preserveFollowOpacity: c && c.shouldPreserveFollowOpacity ? c.shouldPreserveFollowOpacity(a) : void 0
3441
3442
  });
3442
3443
  }
3443
3444
  isLead() {
3444
- const r = this.getStack();
3445
- return r ? r.lead === this : !0;
3445
+ const o = this.getStack();
3446
+ return o ? o.lead === this : !0;
3446
3447
  }
3447
3448
  getLead() {
3448
- const { layoutId: r } = this.options;
3449
- return r ? this.getStack()?.lead || this : this;
3449
+ const { layoutId: o } = this.options;
3450
+ return o ? this.getStack()?.lead || this : this;
3450
3451
  }
3451
3452
  getPrevLead() {
3452
- const { layoutId: r } = this.options;
3453
- return r ? this.getStack()?.prevLead : void 0;
3453
+ const { layoutId: o } = this.options;
3454
+ return o ? this.getStack()?.prevLead : void 0;
3454
3455
  }
3455
3456
  getStack() {
3456
- const { layoutId: r } = this.options;
3457
- if (r)
3458
- return this.root.sharedNodes.get(r);
3457
+ const { layoutId: o } = this.options;
3458
+ if (o)
3459
+ return this.root.sharedNodes.get(o);
3459
3460
  }
3460
- promote({ needsReset: r, transition: a, preserveFollowOpacity: l } = {}) {
3461
- const u = this.getStack();
3462
- u && u.promote(this, l), r && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
3461
+ promote({ needsReset: o, transition: a, preserveFollowOpacity: l } = {}) {
3462
+ const c = this.getStack();
3463
+ c && c.promote(this, l), o && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
3463
3464
  }
3464
3465
  relegate() {
3465
- const r = this.getStack();
3466
- return r ? r.relegate(this) : !1;
3466
+ const o = this.getStack();
3467
+ return o ? o.relegate(this) : !1;
3467
3468
  }
3468
3469
  resetSkewAndRotation() {
3469
- const { visualElement: r } = this.options;
3470
- if (!r)
3470
+ const { visualElement: o } = this.options;
3471
+ if (!o)
3471
3472
  return;
3472
3473
  let a = !1;
3473
- const { latestValues: l } = r;
3474
+ const { latestValues: l } = o;
3474
3475
  if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
3475
3476
  return;
3476
- const u = {};
3477
- l.z && ue("z", r, u, this.animationValues);
3478
- for (let c = 0; c < ce.length; c++)
3479
- ue(`rotate${ce[c]}`, r, u, this.animationValues), ue(`skew${ce[c]}`, r, u, this.animationValues);
3480
- r.render();
3481
- for (const c in u)
3482
- r.setStaticValue(c, u[c]), this.animationValues && (this.animationValues[c] = u[c]);
3483
- r.scheduleRender();
3477
+ const c = {};
3478
+ l.z && ue("z", o, c, this.animationValues);
3479
+ for (let u = 0; u < ce.length; u++)
3480
+ ue(`rotate${ce[u]}`, o, c, this.animationValues), ue(`skew${ce[u]}`, o, c, this.animationValues);
3481
+ o.render();
3482
+ for (const u in c)
3483
+ o.setStaticValue(u, c[u]), this.animationValues && (this.animationValues[u] = c[u]);
3484
+ o.scheduleRender();
3484
3485
  }
3485
- applyProjectionStyles(r, a) {
3486
+ applyProjectionStyles(o, a) {
3486
3487
  if (!this.instance || this.isSVG)
3487
3488
  return;
3488
3489
  if (!this.isVisible) {
3489
- r.visibility = "hidden";
3490
+ o.visibility = "hidden";
3490
3491
  return;
3491
3492
  }
3492
3493
  const l = this.getTransformTemplate();
3493
3494
  if (this.needsReset) {
3494
- this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = Kt(a?.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
3495
+ this.needsReset = !1, o.visibility = "", o.opacity = "", o.pointerEvents = Kt(a?.pointerEvents) || "", o.transform = l ? l(this.latestValues, "") : "none";
3495
3496
  return;
3496
3497
  }
3497
- const u = this.getLead();
3498
- if (!this.projectionDelta || !this.layout || !u.target) {
3499
- this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = Kt(a?.pointerEvents) || ""), this.hasProjected && !st(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
3498
+ const c = this.getLead();
3499
+ if (!this.projectionDelta || !this.layout || !c.target) {
3500
+ this.options.layoutId && (o.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, o.pointerEvents = Kt(a?.pointerEvents) || ""), this.hasProjected && !st(this.latestValues) && (o.transform = l ? l({}, "") : "none", this.hasProjected = !1);
3500
3501
  return;
3501
3502
  }
3502
- r.visibility = "";
3503
- const c = u.animationValues || u.latestValues;
3503
+ o.visibility = "";
3504
+ const u = c.animationValues || c.latestValues;
3504
3505
  this.applyTransformsToTarget();
3505
- let h = Cl(this.projectionDeltaWithTransform, this.treeScale, c);
3506
- l && (h = l(c, h)), r.transform = h;
3506
+ let h = Cl(this.projectionDeltaWithTransform, this.treeScale, u);
3507
+ l && (h = l(u, h)), o.transform = h;
3507
3508
  const { x: f, y: d } = this.projectionDelta;
3508
- 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;
3509
+ o.transformOrigin = `${f.origin * 100}% ${d.origin * 100}% 0`, c.animationValues ? o.opacity = c === this ? u.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : u.opacityExit : o.opacity = c === this ? u.opacity !== void 0 ? u.opacity : "" : u.opacityExit !== void 0 ? u.opacityExit : 0;
3509
3510
  for (const m in Oe) {
3510
- if (c[m] === void 0)
3511
+ if (u[m] === void 0)
3511
3512
  continue;
3512
- const { correct: g, applyTo: T, isCSSVariable: v } = Oe[m], x = h === "none" ? c[m] : g(c[m], u);
3513
+ const { correct: v, applyTo: T, isCSSVariable: p } = Oe[m], x = h === "none" ? u[m] : v(u[m], c);
3513
3514
  if (T) {
3514
- const p = T.length;
3515
- for (let S = 0; S < p; S++)
3516
- r[T[S]] = x;
3515
+ const g = T.length;
3516
+ for (let P = 0; P < g; P++)
3517
+ o[T[P]] = x;
3517
3518
  } else
3518
- v ? this.options.visualElement.renderState.vars[m] = x : r[m] = x;
3519
+ p ? this.options.visualElement.renderState.vars[m] = x : o[m] = x;
3519
3520
  }
3520
- this.options.layoutId && (r.pointerEvents = u === this ? Kt(a?.pointerEvents) || "" : "none");
3521
+ this.options.layoutId && (o.pointerEvents = c === this ? Kt(a?.pointerEvents) || "" : "none");
3521
3522
  }
3522
3523
  clearSnapshot() {
3523
3524
  this.resumeFrom = this.snapshot = void 0;
3524
3525
  }
3525
3526
  // Only run on root
3526
3527
  resetTree() {
3527
- this.root.nodes.forEach((r) => r.currentAnimation?.stop()), this.root.nodes.forEach(ps), this.root.sharedNodes.clear();
3528
+ this.root.nodes.forEach((o) => o.currentAnimation?.stop()), this.root.nodes.forEach(ps), this.root.sharedNodes.clear();
3528
3529
  }
3529
3530
  };
3530
3531
  }
@@ -3534,29 +3535,29 @@ function Wl(t) {
3534
3535
  function Kl(t) {
3535
3536
  const e = t.resumeFrom?.snapshot || t.snapshot;
3536
3537
  if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
3537
- const { layoutBox: n, measuredBox: s } = t.layout, { animationType: i } = t.options, o = e.source !== t.layout.source;
3538
- i === "size" ? U((c) => {
3539
- const h = o ? e.measuredBox[c] : e.layoutBox[c], f = B(h);
3540
- h.min = n[c].min, h.max = h.min + f;
3541
- }) : ar(i, e.layoutBox, n) && U((c) => {
3542
- const h = o ? e.measuredBox[c] : e.layoutBox[c], f = B(n[c]);
3543
- h.max = h.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[c].max = t.relativeTarget[c].min + f);
3538
+ const { layoutBox: n, measuredBox: s } = t.layout, { animationType: i } = t.options, r = e.source !== t.layout.source;
3539
+ i === "size" ? U((u) => {
3540
+ const h = r ? e.measuredBox[u] : e.layoutBox[u], f = B(h);
3541
+ h.min = n[u].min, h.max = h.min + f;
3542
+ }) : ao(i, e.layoutBox, n) && U((u) => {
3543
+ const h = r ? e.measuredBox[u] : e.layoutBox[u], f = B(n[u]);
3544
+ h.max = h.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[u].max = t.relativeTarget[u].min + f);
3544
3545
  });
3545
- const r = ft();
3546
- Vt(r, n, e.layoutBox);
3546
+ const o = ft();
3547
+ Vt(o, n, e.layoutBox);
3547
3548
  const a = ft();
3548
- o ? Vt(a, t.applyTransform(s, !0), e.measuredBox) : Vt(a, n, e.layoutBox);
3549
- const l = !er(r);
3550
- let u = !1;
3549
+ r ? Vt(a, t.applyTransform(s, !0), e.measuredBox) : Vt(a, n, e.layoutBox);
3550
+ const l = !eo(o);
3551
+ let c = !1;
3551
3552
  if (!t.resumeFrom) {
3552
- const c = t.getClosestProjectingParent();
3553
- if (c && !c.resumeFrom) {
3554
- const { snapshot: h, layout: f } = c;
3553
+ const u = t.getClosestProjectingParent();
3554
+ if (u && !u.resumeFrom) {
3555
+ const { snapshot: h, layout: f } = u;
3555
3556
  if (h && f) {
3556
3557
  const d = E();
3557
3558
  Xt(d, e.layoutBox, h.layoutBox);
3558
3559
  const m = E();
3559
- Xt(m, n, f.layoutBox), nr(d, m) || (u = !0), c.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = d, t.relativeParent = c);
3560
+ Xt(m, n, f.layoutBox), no(d, m) || (c = !0), u.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = d, t.relativeParent = u);
3560
3561
  }
3561
3562
  }
3562
3563
  }
@@ -3564,9 +3565,9 @@ function Kl(t) {
3564
3565
  layout: n,
3565
3566
  snapshot: e,
3566
3567
  delta: a,
3567
- layoutDelta: r,
3568
+ layoutDelta: o,
3568
3569
  hasLayoutChanged: l,
3569
- hasRelativeLayoutChanged: u
3570
+ hasRelativeLayoutChanged: c
3570
3571
  });
3571
3572
  } else if (t.isLead()) {
3572
3573
  const { onExitComplete: n } = t.options;
@@ -3623,20 +3624,20 @@ function Jl(t) {
3623
3624
  const Ql = {
3624
3625
  duration: 0.45,
3625
3626
  ease: [0.4, 0, 0.1, 1]
3626
- }, xs = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Ps = xs("applewebkit/") && !xs("chrome/") ? Math.round : K;
3627
- function Ss(t) {
3628
- t.min = Ps(t.min), t.max = Ps(t.max);
3627
+ }, xs = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Ss = xs("applewebkit/") && !xs("chrome/") ? Math.round : K;
3628
+ function Ps(t) {
3629
+ t.min = Ss(t.min), t.max = Ss(t.max);
3629
3630
  }
3630
3631
  function tc(t) {
3631
- Ss(t.x), Ss(t.y);
3632
+ Ps(t.x), Ps(t.y);
3632
3633
  }
3633
- function ar(t, e, n) {
3634
+ function ao(t, e, n) {
3634
3635
  return t === "position" || t === "preserve-aspect" && !wl(us(e), us(n), 0.2);
3635
3636
  }
3636
3637
  function ec(t) {
3637
3638
  return t !== t.root && t.scroll?.wasRoot;
3638
3639
  }
3639
- const nc = or({
3640
+ const nc = ro({
3640
3641
  attachResizeListener: (t, e) => Lt(t, "resize", e),
3641
3642
  measureScroll: () => ({
3642
3643
  x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
@@ -3645,7 +3646,7 @@ const nc = or({
3645
3646
  checkIsScrollRoot: () => !0
3646
3647
  }), he = {
3647
3648
  current: void 0
3648
- }, lr = or({
3649
+ }, lo = ro({
3649
3650
  measureScroll: (t) => ({
3650
3651
  x: t.scrollLeft,
3651
3652
  y: t.scrollTop
@@ -3661,7 +3662,7 @@ const nc = or({
3661
3662
  t.style.transform = e !== void 0 ? e : "none";
3662
3663
  },
3663
3664
  checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
3664
- }), cr = yt({
3665
+ }), co = yt({
3665
3666
  transformPagePoint: (t) => t,
3666
3667
  isStatic: !1,
3667
3668
  reducedMotion: "never"
@@ -3670,15 +3671,15 @@ function sc(t = !0) {
3670
3671
  const e = O(We);
3671
3672
  if (e === null)
3672
3673
  return [!0, null];
3673
- const { isPresent: n, onExitComplete: s, register: i } = e, o = Ar();
3674
+ const { isPresent: n, onExitComplete: s, register: i } = e, r = Vo();
3674
3675
  Ue(() => {
3675
3676
  if (t)
3676
- return i(o);
3677
+ return i(r);
3677
3678
  }, [t]);
3678
- const r = Is(() => t && s && s(o), [o, s, t]);
3679
- return !n && s ? [!1, r] : [!0];
3679
+ const o = Is(() => t && s && s(r), [r, s, t]);
3680
+ return !n && s ? [!1, o] : [!0];
3680
3681
  }
3681
- const ur = yt({ strict: !1 }), ws = {
3682
+ const uo = yt({ strict: !1 }), ws = {
3682
3683
  animation: [
3683
3684
  "animate",
3684
3685
  "variants",
@@ -3709,11 +3710,11 @@ function ic() {
3709
3710
  };
3710
3711
  Ni(t), bs = !0;
3711
3712
  }
3712
- function hr() {
3713
+ function ho() {
3713
3714
  return ic(), Xa();
3714
3715
  }
3715
- function rc(t) {
3716
- const e = hr();
3716
+ function oc(t) {
3717
+ const e = ho();
3717
3718
  for (const n in t)
3718
3719
  e[n] = {
3719
3720
  ...e[n],
@@ -3721,7 +3722,7 @@ function rc(t) {
3721
3722
  };
3722
3723
  Ni(e);
3723
3724
  }
3724
- const oc = /* @__PURE__ */ new Set([
3725
+ const rc = /* @__PURE__ */ new Set([
3725
3726
  "animate",
3726
3727
  "exit",
3727
3728
  "variants",
@@ -3754,11 +3755,11 @@ const oc = /* @__PURE__ */ new Set([
3754
3755
  "viewport"
3755
3756
  ]);
3756
3757
  function qt(t) {
3757
- return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || oc.has(t);
3758
+ return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || rc.has(t);
3758
3759
  }
3759
- let fr = (t) => !qt(t);
3760
+ let fo = (t) => !qt(t);
3760
3761
  function ac(t) {
3761
- typeof t == "function" && (fr = (e) => e.startsWith("on") ? !qt(e) : t(e));
3762
+ typeof t == "function" && (fo = (e) => e.startsWith("on") ? !qt(e) : t(e));
3762
3763
  }
3763
3764
  try {
3764
3765
  ac(require("@emotion/is-prop-valid").default);
@@ -3767,7 +3768,7 @@ try {
3767
3768
  function lc(t, e, n) {
3768
3769
  const s = {};
3769
3770
  for (const i in t)
3770
- i === "values" && typeof t.values == "object" || (fr(i) || n === !0 && qt(i) || !e && !qt(i) || // If trying to use native HTML drag events, forward drag listeners
3771
+ i === "values" && typeof t.values == "object" || (fo(i) || n === !0 && qt(i) || !e && !qt(i) || // If trying to use native HTML drag events, forward drag listeners
3771
3772
  t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
3772
3773
  return s;
3773
3774
  }
@@ -3795,7 +3796,7 @@ const gn = () => ({
3795
3796
  transformOrigin: {},
3796
3797
  vars: {}
3797
3798
  });
3798
- function dr(t, e, n) {
3799
+ function mo(t, e, n) {
3799
3800
  for (const s in e)
3800
3801
  !k(e[s]) && !Hi(s, n) && (t[s] = e[s]);
3801
3802
  }
@@ -3807,27 +3808,27 @@ function hc({ transformTemplate: t }, e) {
3807
3808
  }
3808
3809
  function fc(t, e) {
3809
3810
  const n = t.style || {}, s = {};
3810
- return dr(s, n, t), Object.assign(s, hc(t, e)), s;
3811
+ return mo(s, n, t), Object.assign(s, hc(t, e)), s;
3811
3812
  }
3812
3813
  function dc(t, e) {
3813
3814
  const n = {}, s = fc(t, e);
3814
3815
  return t.drag && t.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.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 = s, n;
3815
3816
  }
3816
- const mr = () => ({
3817
+ const po = () => ({
3817
3818
  ...gn(),
3818
3819
  attrs: {}
3819
3820
  });
3820
3821
  function mc(t, e, n, s) {
3821
3822
  const i = Zt(() => {
3822
- const o = mr();
3823
- return zi(o, e, Xi(s), t.transformTemplate, t.style), {
3824
- ...o.attrs,
3825
- style: { ...o.style }
3823
+ const r = po();
3824
+ return zi(r, e, Xi(s), t.transformTemplate, t.style), {
3825
+ ...r.attrs,
3826
+ style: { ...r.style }
3826
3827
  };
3827
3828
  }, [e]);
3828
3829
  if (t.style) {
3829
- const o = {};
3830
- dr(o, t.style, t), i.style = { ...o, ...i.style };
3830
+ const r = {};
3831
+ mo(r, t.style, t), i.style = { ...r, ...i.style };
3831
3832
  }
3832
3833
  return i;
3833
3834
  }
@@ -3878,10 +3879,10 @@ function yn(t) {
3878
3879
  )
3879
3880
  );
3880
3881
  }
3881
- function gc(t, e, n, { latestValues: s }, i, o = !1, r) {
3882
- const l = (r ?? yn(t) ? mc : dc)(e, s, i, t), u = lc(e, typeof t == "string", o), c = t !== Os ? { ...u, ...l, ref: n } : {}, { children: h } = e, f = Zt(() => k(h) ? h.get() : h, [h]);
3883
- return Vr(t, {
3884
- ...c,
3882
+ function gc(t, e, n, { latestValues: s }, i, r = !1, o) {
3883
+ const l = (o ?? yn(t) ? mc : dc)(e, s, i, t), c = lc(e, typeof t == "string", r), u = t !== Os ? { ...c, ...l, ref: n } : {}, { children: h } = e, f = Zt(() => k(h) ? h.get() : h, [h]);
3884
+ return Do(t, {
3885
+ ...u,
3885
3886
  children: f
3886
3887
  });
3887
3888
  }
@@ -3892,99 +3893,100 @@ function yc({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
3892
3893
  };
3893
3894
  }
3894
3895
  function vc(t, e, n, s) {
3895
- const i = {}, o = s(t, {});
3896
- for (const f in o)
3897
- i[f] = Kt(o[f]);
3898
- let { initial: r, animate: a } = t;
3899
- const l = Qt(t), u = ji(t);
3900
- e && u && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
3901
- let c = n ? n.initial === !1 : !1;
3902
- c = c || r === !1;
3903
- const h = c ? a : r;
3896
+ const i = {}, r = s(t, {});
3897
+ for (const f in r)
3898
+ i[f] = Kt(r[f]);
3899
+ let { initial: o, animate: a } = t;
3900
+ const l = Qt(t), c = ji(t);
3901
+ e && c && !l && t.inherit !== !1 && (o === void 0 && (o = e.initial), a === void 0 && (a = e.animate));
3902
+ let u = n ? n.initial === !1 : !1;
3903
+ u = u || o === !1;
3904
+ const h = u ? a : o;
3904
3905
  if (h && typeof h != "boolean" && !Jt(h)) {
3905
3906
  const f = Array.isArray(h) ? h : [h];
3906
3907
  for (let d = 0; d < f.length; d++) {
3907
3908
  const m = an(t, f[d]);
3908
3909
  if (m) {
3909
- const { transitionEnd: g, transition: T, ...v } = m;
3910
- for (const x in v) {
3911
- let p = v[x];
3912
- if (Array.isArray(p)) {
3913
- const S = c ? p.length - 1 : 0;
3914
- p = p[S];
3910
+ const { transitionEnd: v, transition: T, ...p } = m;
3911
+ for (const x in p) {
3912
+ let g = p[x];
3913
+ if (Array.isArray(g)) {
3914
+ const P = u ? g.length - 1 : 0;
3915
+ g = g[P];
3915
3916
  }
3916
- p !== null && (i[x] = p);
3917
+ g !== null && (i[x] = g);
3917
3918
  }
3918
- for (const x in g)
3919
- i[x] = g[x];
3919
+ for (const x in v)
3920
+ i[x] = v[x];
3920
3921
  }
3921
3922
  }
3922
3923
  }
3923
3924
  return i;
3924
3925
  }
3925
- const pr = (t) => (e, n) => {
3926
- const s = O(te), i = O(We), o = () => yc(t, e, s, i);
3927
- return n ? o() : Er(o);
3928
- }, Tc = /* @__PURE__ */ pr({
3926
+ const go = (t) => (e, n) => {
3927
+ const s = O(te), i = O(We), r = () => yc(t, e, s, i);
3928
+ return n ? r() : Ro(r);
3929
+ }, Tc = /* @__PURE__ */ go({
3929
3930
  scrapeMotionValuesFromProps: pn,
3930
3931
  createRenderState: gn
3931
- }), xc = /* @__PURE__ */ pr({
3932
+ }), xc = /* @__PURE__ */ go({
3932
3933
  scrapeMotionValuesFromProps: qi,
3933
- createRenderState: mr
3934
- }), Pc = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
3935
- function Sc(t, e, n) {
3934
+ createRenderState: po
3935
+ }), Sc = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
3936
+ function Pc(t, e, n) {
3936
3937
  const s = it(n);
3937
3938
  js(() => {
3938
3939
  s.current = n;
3939
3940
  });
3940
3941
  const i = it(null);
3941
- return Is((o) => {
3942
- o && t.onMount?.(o), e && (o ? e.mount(o) : e.unmount());
3943
- const r = s.current;
3944
- if (typeof r == "function")
3945
- if (o) {
3946
- const a = r(o);
3942
+ return Is((r) => {
3943
+ r && t.onMount?.(r), e && (r ? e.mount(r) : e.unmount());
3944
+ const o = s.current;
3945
+ if (typeof o == "function")
3946
+ if (r) {
3947
+ const a = o(r);
3947
3948
  typeof a == "function" && (i.current = a);
3948
- } else i.current ? (i.current(), i.current = null) : r(o);
3949
- else r && (r.current = o);
3949
+ } else i.current ? (i.current(), i.current = null) : o(r);
3950
+ else o && (o.current = r);
3950
3951
  }, [e]);
3951
3952
  }
3952
- const gr = yt({});
3953
+ const yo = yt({});
3953
3954
  function bt(t) {
3954
3955
  return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
3955
3956
  }
3956
- function wc(t, e, n, s, i, o) {
3957
- const { visualElement: r } = O(te), a = O(ur), l = O(We), u = O(cr).reducedMotion, c = it(null), h = it(!1);
3958
- s = s || a.renderer, !c.current && s && (c.current = s(t, {
3957
+ function wc(t, e, n, s, i, r) {
3958
+ const { visualElement: o } = O(te), a = O(uo), l = O(We), c = O(co), u = c.reducedMotion, h = c.skipAnimations, f = it(null), d = it(!1);
3959
+ s = s || a.renderer, !f.current && s && (f.current = s(t, {
3959
3960
  visualState: e,
3960
- parent: r,
3961
+ parent: o,
3961
3962
  props: n,
3962
3963
  presenceContext: l,
3963
3964
  blockInitialAnimation: l ? l.initial === !1 : !1,
3964
3965
  reducedMotionConfig: u,
3965
- isSVG: o
3966
- }), h.current && c.current && (c.current.manuallyAnimateOnMount = !0));
3967
- const f = c.current, d = O(gr);
3968
- f && !f.projection && i && (f.type === "html" || f.type === "svg") && bc(c.current, n, i, d);
3969
- const m = it(!1);
3966
+ skipAnimations: h,
3967
+ isSVG: r
3968
+ }), d.current && f.current && (f.current.manuallyAnimateOnMount = !0));
3969
+ const m = f.current, v = O(yo);
3970
+ m && !m.projection && i && (m.type === "html" || m.type === "svg") && bc(f.current, n, i, v);
3971
+ const T = it(!1);
3970
3972
  js(() => {
3971
- f && m.current && f.update(n, l);
3973
+ m && T.current && m.update(n, l);
3972
3974
  });
3973
- const g = n[bi], T = it(!!g && !window.MotionHandoffIsComplete?.(g) && window.MotionHasOptimisedAnimation?.(g));
3974
- return Rr(() => {
3975
- h.current = !0, f && (m.current = !0, window.MotionIsMounted = !0, f.updateFeatures(), f.scheduleRenderMicrotask(), T.current && f.animationState && f.animationState.animateChanges());
3975
+ const p = n[bi], x = it(!!p && !window.MotionHandoffIsComplete?.(p) && window.MotionHasOptimisedAnimation?.(p));
3976
+ return Lo(() => {
3977
+ d.current = !0, m && (T.current = !0, window.MotionIsMounted = !0, m.updateFeatures(), m.scheduleRenderMicrotask(), x.current && m.animationState && m.animationState.animateChanges());
3976
3978
  }), Ue(() => {
3977
- f && (!T.current && f.animationState && f.animationState.animateChanges(), T.current && (queueMicrotask(() => {
3978
- window.MotionHandoffMarkAsComplete?.(g);
3979
- }), T.current = !1), f.enteringChildren = void 0);
3980
- }), f;
3979
+ m && (!x.current && m.animationState && m.animationState.animateChanges(), x.current && (queueMicrotask(() => {
3980
+ window.MotionHandoffMarkAsComplete?.(p);
3981
+ }), x.current = !1), m.enteringChildren = void 0);
3982
+ }), m;
3981
3983
  }
3982
3984
  function bc(t, e, n, s) {
3983
- const { layoutId: i, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: u, layoutCrossfade: c } = e;
3984
- t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : yr(t.parent)), t.projection.setOptions({
3985
+ const { layoutId: i, layout: r, drag: o, dragConstraints: a, layoutScroll: l, layoutRoot: c, layoutCrossfade: u } = e;
3986
+ t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : vo(t.parent)), t.projection.setOptions({
3985
3987
  layoutId: i,
3986
- layout: o,
3987
- alwaysMeasureLayout: !!r || a && bt(a),
3988
+ layout: r,
3989
+ alwaysMeasureLayout: !!o || a && bt(a),
3988
3990
  visualElement: t,
3989
3991
  /**
3990
3992
  * TODO: Update options in an effect. This could be tricky as it'll be too late
@@ -3993,51 +3995,51 @@ function bc(t, e, n, s) {
3993
3995
  * ensuring it gets called if there's no potential layout animations.
3994
3996
  *
3995
3997
  */
3996
- animationType: typeof o == "string" ? o : "both",
3998
+ animationType: typeof r == "string" ? r : "both",
3997
3999
  initialPromotionConfig: s,
3998
- crossfade: c,
4000
+ crossfade: u,
3999
4001
  layoutScroll: l,
4000
- layoutRoot: u
4002
+ layoutRoot: c
4001
4003
  });
4002
4004
  }
4003
- function yr(t) {
4005
+ function vo(t) {
4004
4006
  if (t)
4005
- return t.options.allowProjection !== !1 ? t.projection : yr(t.parent);
4007
+ return t.options.allowProjection !== !1 ? t.projection : vo(t.parent);
4006
4008
  }
4007
4009
  function fe(t, { forwardMotionProps: e = !1, type: n } = {}, s, i) {
4008
- s && rc(s);
4009
- const o = n ? n === "svg" : yn(t), r = o ? xc : Tc;
4010
- function a(u, c) {
4010
+ s && oc(s);
4011
+ const r = n ? n === "svg" : yn(t), o = r ? xc : Tc;
4012
+ function a(c, u) {
4011
4013
  let h;
4012
4014
  const f = {
4013
- ...O(cr),
4014
- ...u,
4015
- layoutId: Ac(u)
4016
- }, { isStatic: d } = f, m = uc(u), g = r(u, d);
4015
+ ...O(co),
4016
+ ...c,
4017
+ layoutId: Ac(c)
4018
+ }, { isStatic: d } = f, m = uc(c), v = o(c, d);
4017
4019
  if (!d && Ws) {
4018
4020
  Vc(f, s);
4019
4021
  const T = Dc(f);
4020
- h = T.MeasureLayout, m.visualElement = wc(t, g, f, i, T.ProjectionNode, o);
4022
+ h = T.MeasureLayout, m.visualElement = wc(t, v, f, i, T.ProjectionNode, r);
4021
4023
  }
4022
- return Cr(te.Provider, { value: m, children: [h && m.visualElement ? Ns(h, { visualElement: m.visualElement, ...f }) : null, gc(t, u, Sc(g, m.visualElement, c), g, d, e, o)] });
4024
+ return Eo(te.Provider, { value: m, children: [h && m.visualElement ? Ns(h, { visualElement: m.visualElement, ...f }) : null, gc(t, c, Pc(v, m.visualElement, u), v, d, e, r)] });
4023
4025
  }
4024
4026
  a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
4025
- const l = Dr(a);
4026
- return l[Pc] = t, l;
4027
+ const l = Mo(a);
4028
+ return l[Sc] = t, l;
4027
4029
  }
4028
4030
  function Ac({ layoutId: t }) {
4029
4031
  const e = O(Us).id;
4030
4032
  return e && t !== void 0 ? e + "-" + t : t;
4031
4033
  }
4032
4034
  function Vc(t, e) {
4033
- const n = O(ur).strict;
4035
+ const n = O(uo).strict;
4034
4036
  if (process.env.NODE_ENV !== "production" && e && n) {
4035
4037
  const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
4036
4038
  t.ignoreStrict ? vt(!1, s, "lazy-strict-mode") : Y(!1, s, "lazy-strict-mode");
4037
4039
  }
4038
4040
  }
4039
4041
  function Dc(t) {
4040
- const e = hr(), { drag: n, layout: s } = e;
4042
+ const e = ho(), { drag: n, layout: s } = e;
4041
4043
  if (!n && !s)
4042
4044
  return {};
4043
4045
  const i = { ...n, ...s };
@@ -4049,17 +4051,17 @@ function Dc(t) {
4049
4051
  function Mc(t, e) {
4050
4052
  if (typeof Proxy > "u")
4051
4053
  return fe;
4052
- const n = /* @__PURE__ */ new Map(), s = (o, r) => fe(o, r, t, e), i = (o, r) => (process.env.NODE_ENV !== "production" && He(!1, "motion() is deprecated. Use motion.create() instead."), s(o, r));
4054
+ const n = /* @__PURE__ */ new Map(), s = (r, o) => fe(r, o, t, e), i = (r, o) => (process.env.NODE_ENV !== "production" && He(!1, "motion() is deprecated. Use motion.create() instead."), s(r, o));
4053
4055
  return new Proxy(i, {
4054
4056
  /**
4055
4057
  * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
4056
4058
  * The prop name is passed through as `key` and we can use that to generate a `motion`
4057
4059
  * DOM component with that name.
4058
4060
  */
4059
- get: (o, r) => r === "create" ? s : (n.has(r) || n.set(r, fe(r, void 0, t, e)), n.get(r))
4061
+ get: (r, o) => o === "create" ? s : (n.has(o) || n.set(o, fe(o, void 0, t, e)), n.get(o))
4060
4062
  });
4061
4063
  }
4062
- const Cc = (t, e) => e.isSVG ?? yn(t) ? new fl(e) : new ol(e, {
4064
+ const Cc = (t, e) => e.isSVG ?? yn(t) ? new fl(e) : new rl(e, {
4063
4065
  allowProjection: t !== Os
4064
4066
  });
4065
4067
  class Ec extends tt {
@@ -4132,14 +4134,14 @@ const Fc = (t) => (e) => hn(e) && t(e, It(e));
4132
4134
  function Dt(t, e, n, s) {
4133
4135
  return Lt(t, e, Fc(n), s);
4134
4136
  }
4135
- const vr = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Vs = (t, e) => Math.abs(t - e);
4137
+ const To = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Vs = (t, e) => Math.abs(t - e);
4136
4138
  function Bc(t, e) {
4137
4139
  const n = Vs(t.x, e.x), s = Vs(t.y, e.y);
4138
4140
  return Math.sqrt(n ** 2 + s ** 2);
4139
4141
  }
4140
4142
  const Ds = /* @__PURE__ */ new Set(["auto", "scroll"]);
4141
- class Tr {
4142
- constructor(e, n, { transformPagePoint: s, contextWindow: i = window, dragSnapToOrigin: o = !1, distanceThreshold: r = 3, element: a } = {}) {
4143
+ class xo {
4144
+ constructor(e, n, { transformPagePoint: s, contextWindow: i = window, dragSnapToOrigin: r = !1, distanceThreshold: o = 3, element: a } = {}) {
4143
4145
  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) => {
4144
4146
  this.handleScroll(d.target);
4145
4147
  }, this.onWindowScroll = () => {
@@ -4147,29 +4149,29 @@ class Tr {
4147
4149
  }, this.updatePoint = () => {
4148
4150
  if (!(this.lastMoveEvent && this.lastMoveEventInfo))
4149
4151
  return;
4150
- const d = me(this.lastMoveEventInfo, this.history), m = this.startEvent !== null, g = Bc(d.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
4151
- if (!m && !g)
4152
+ const d = me(this.lastMoveEventInfo, this.history), m = this.startEvent !== null, v = Bc(d.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
4153
+ if (!m && !v)
4152
4154
  return;
4153
- const { point: T } = d, { timestamp: v } = L;
4154
- this.history.push({ ...T, timestamp: v });
4155
- const { onStart: x, onMove: p } = this.handlers;
4156
- m || (x && x(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), p && p(this.lastMoveEvent, d);
4155
+ const { point: T } = d, { timestamp: p } = L;
4156
+ this.history.push({ ...T, timestamp: p });
4157
+ const { onStart: x, onMove: g } = this.handlers;
4158
+ m || (x && x(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), g && g(this.lastMoveEvent, d);
4157
4159
  }, this.handlePointerMove = (d, m) => {
4158
4160
  this.lastMoveEvent = d, this.lastMoveEventInfo = de(m, this.transformPagePoint), A.update(this.updatePoint, !0);
4159
4161
  }, this.handlePointerUp = (d, m) => {
4160
4162
  this.end();
4161
- const { onEnd: g, onSessionEnd: T, resumeAnimation: v } = this.handlers;
4162
- if ((this.dragSnapToOrigin || !this.startEvent) && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo))
4163
+ const { onEnd: v, onSessionEnd: T, resumeAnimation: p } = this.handlers;
4164
+ if ((this.dragSnapToOrigin || !this.startEvent) && p && p(), !(this.lastMoveEvent && this.lastMoveEventInfo))
4163
4165
  return;
4164
4166
  const x = me(d.type === "pointercancel" ? this.lastMoveEventInfo : de(m, this.transformPagePoint), this.history);
4165
- this.startEvent && g && g(d, x), T && T(d, x);
4167
+ this.startEvent && v && v(d, x), T && T(d, x);
4166
4168
  }, !hn(e))
4167
4169
  return;
4168
- this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = s, this.distanceThreshold = r, this.contextWindow = i || window;
4169
- const l = It(e), u = de(l, this.transformPagePoint), { point: c } = u, { timestamp: h } = L;
4170
- this.history = [{ ...c, timestamp: h }];
4170
+ this.dragSnapToOrigin = r, this.handlers = n, this.transformPagePoint = s, this.distanceThreshold = o, this.contextWindow = i || window;
4171
+ const l = It(e), c = de(l, this.transformPagePoint), { point: u } = c, { timestamp: h } = L;
4172
+ this.history = [{ ...u, timestamp: h }];
4171
4173
  const { onSessionStart: f } = n;
4172
- f && f(e, me(u, this.history)), this.removeListeners = kt(Dt(this.contextWindow, "pointermove", this.handlePointerMove), Dt(this.contextWindow, "pointerup", this.handlePointerUp), Dt(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
4174
+ f && f(e, me(c, this.history)), this.removeListeners = kt(Dt(this.contextWindow, "pointermove", this.handlePointerMove), Dt(this.contextWindow, "pointerup", this.handlePointerUp), Dt(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
4173
4175
  }
4174
4176
  /**
4175
4177
  * Start tracking scroll on ancestors and window.
@@ -4210,8 +4212,8 @@ class Tr {
4210
4212
  const s = e === window, i = s ? { x: window.scrollX, y: window.scrollY } : {
4211
4213
  x: e.scrollLeft,
4212
4214
  y: e.scrollTop
4213
- }, o = { x: i.x - n.x, y: i.y - n.y };
4214
- o.x === 0 && o.y === 0 || (s ? 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, i), A.update(this.updatePoint, !0));
4215
+ }, r = { x: i.x - n.x, y: i.y - n.y };
4216
+ r.x === 0 && r.y === 0 || (s ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += r.x, this.lastMoveEventInfo.point.y += r.y) : this.history.length > 0 && (this.history[0].x -= r.x, this.history[0].y -= r.y), this.scrollPositions.set(e, i), A.update(this.updatePoint, !0));
4215
4217
  }
4216
4218
  updateHandlers(e) {
4217
4219
  this.handlers = e;
@@ -4229,7 +4231,7 @@ function Ms(t, e) {
4229
4231
  function me({ point: t }, e) {
4230
4232
  return {
4231
4233
  point: t,
4232
- delta: Ms(t, xr(e)),
4234
+ delta: Ms(t, So(e)),
4233
4235
  offset: Ms(t, Ic(e)),
4234
4236
  velocity: Oc(e, 0.1)
4235
4237
  };
@@ -4237,26 +4239,26 @@ function me({ point: t }, e) {
4237
4239
  function Ic(t) {
4238
4240
  return t[0];
4239
4241
  }
4240
- function xr(t) {
4242
+ function So(t) {
4241
4243
  return t[t.length - 1];
4242
4244
  }
4243
4245
  function Oc(t, e) {
4244
4246
  if (t.length < 2)
4245
4247
  return { x: 0, y: 0 };
4246
4248
  let n = t.length - 1, s = null;
4247
- const i = xr(t);
4249
+ const i = So(t);
4248
4250
  for (; n >= 0 && (s = t[n], !(i.timestamp - s.timestamp > /* @__PURE__ */ _(e))); )
4249
4251
  n--;
4250
4252
  if (!s)
4251
4253
  return { x: 0, y: 0 };
4252
- const o = /* @__PURE__ */ W(i.timestamp - s.timestamp);
4253
- if (o === 0)
4254
+ const r = /* @__PURE__ */ W(i.timestamp - s.timestamp);
4255
+ if (r === 0)
4254
4256
  return { x: 0, y: 0 };
4255
- const r = {
4256
- x: (i.x - s.x) / o,
4257
- y: (i.y - s.y) / o
4257
+ const o = {
4258
+ x: (i.x - s.x) / r,
4259
+ y: (i.y - s.y) / r
4258
4260
  };
4259
- return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
4261
+ return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o;
4260
4262
  }
4261
4263
  function jc(t, { min: e, max: n }, s) {
4262
4264
  return e !== void 0 && t < e ? t = s ? D(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? D(n, t, s.max) : Math.min(t, n)), t;
@@ -4317,51 +4319,51 @@ class _c {
4317
4319
  const { presenceContext: i } = this.visualElement;
4318
4320
  if (i && i.isPresent === !1)
4319
4321
  return;
4320
- const o = (h) => {
4322
+ const r = (h) => {
4321
4323
  n ? (this.stopAnimation(), this.snapToCursor(It(h).point)) : this.pauseAnimation();
4322
- }, r = (h, f) => {
4324
+ }, o = (h, f) => {
4323
4325
  this.stopAnimation();
4324
- const { drag: d, dragPropagation: m, onDragStart: g } = this.getProps();
4326
+ const { drag: d, dragPropagation: m, onDragStart: v } = this.getProps();
4325
4327
  if (d && !m && (this.openDragLock && this.openDragLock(), this.openDragLock = Oa(d), !this.openDragLock))
4326
4328
  return;
4327
- 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), U((v) => {
4328
- let x = this.getAxisMotionValue(v).get() || 0;
4329
+ 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), U((p) => {
4330
+ let x = this.getAxisMotionValue(p).get() || 0;
4329
4331
  if (H.test(x)) {
4330
- const { projection: p } = this.visualElement;
4331
- if (p && p.layout) {
4332
- const S = p.layout.layoutBox[v];
4333
- S && (x = B(S) * (parseFloat(x) / 100));
4332
+ const { projection: g } = this.visualElement;
4333
+ if (g && g.layout) {
4334
+ const P = g.layout.layoutBox[p];
4335
+ P && (x = B(P) * (parseFloat(x) / 100));
4334
4336
  }
4335
4337
  }
4336
- this.originPoint[v] = x;
4337
- }), g && A.postRender(() => g(h, f)), Re(this.visualElement, "transform");
4338
+ this.originPoint[p] = x;
4339
+ }), v && A.postRender(() => v(h, f)), Re(this.visualElement, "transform");
4338
4340
  const { animationState: T } = this.visualElement;
4339
4341
  T && T.setActive("whileDrag", !0);
4340
4342
  }, a = (h, f) => {
4341
4343
  this.latestPointerEvent = h, this.latestPanInfo = f;
4342
- const { dragPropagation: d, dragDirectionLock: m, onDirectionLock: g, onDrag: T } = this.getProps();
4344
+ const { dragPropagation: d, dragDirectionLock: m, onDirectionLock: v, onDrag: T } = this.getProps();
4343
4345
  if (!d && !this.openDragLock)
4344
4346
  return;
4345
- const { offset: v } = f;
4347
+ const { offset: p } = f;
4346
4348
  if (m && this.currentDirection === null) {
4347
- this.currentDirection = Hc(v), this.currentDirection !== null && g && g(this.currentDirection);
4349
+ this.currentDirection = Hc(p), this.currentDirection !== null && v && v(this.currentDirection);
4348
4350
  return;
4349
4351
  }
4350
- this.updateAxis("x", f.point, v), this.updateAxis("y", f.point, v), this.visualElement.render(), T && T(h, f);
4352
+ this.updateAxis("x", f.point, p), this.updateAxis("y", f.point, p), this.visualElement.render(), T && T(h, f);
4351
4353
  }, l = (h, f) => {
4352
4354
  this.latestPointerEvent = h, this.latestPanInfo = f, this.stop(h, f), this.latestPointerEvent = null, this.latestPanInfo = null;
4353
- }, u = () => U((h) => this.getAnimationState(h) === "paused" && this.getAxisMotionValue(h).animation?.play()), { dragSnapToOrigin: c } = this.getProps();
4354
- this.panSession = new Tr(e, {
4355
- onSessionStart: o,
4356
- onStart: r,
4355
+ }, c = () => U((h) => this.getAnimationState(h) === "paused" && this.getAxisMotionValue(h).animation?.play()), { dragSnapToOrigin: u } = this.getProps();
4356
+ this.panSession = new xo(e, {
4357
+ onSessionStart: r,
4358
+ onStart: o,
4357
4359
  onMove: a,
4358
4360
  onSessionEnd: l,
4359
- resumeAnimation: u
4361
+ resumeAnimation: c
4360
4362
  }, {
4361
4363
  transformPagePoint: this.visualElement.getTransformPagePoint(),
4362
- dragSnapToOrigin: c,
4364
+ dragSnapToOrigin: u,
4363
4365
  distanceThreshold: s,
4364
- contextWindow: vr(this.visualElement),
4366
+ contextWindow: To(this.visualElement),
4365
4367
  element: this.visualElement.current
4366
4368
  });
4367
4369
  }
@@ -4369,11 +4371,11 @@ class _c {
4369
4371
  * @internal
4370
4372
  */
4371
4373
  stop(e, n) {
4372
- const s = e || this.latestPointerEvent, i = n || this.latestPanInfo, o = this.isDragging;
4373
- if (this.cancel(), !o || !i || !s)
4374
+ const s = e || this.latestPointerEvent, i = n || this.latestPanInfo, r = this.isDragging;
4375
+ if (this.cancel(), !r || !i || !s)
4374
4376
  return;
4375
- const { velocity: r } = i;
4376
- this.startAnimation(r);
4377
+ const { velocity: o } = i;
4378
+ this.startAnimation(o);
4377
4379
  const { onDragEnd: a } = this.getProps();
4378
4380
  a && A.postRender(() => a(s, i));
4379
4381
  }
@@ -4400,14 +4402,14 @@ class _c {
4400
4402
  const { drag: i } = this.getProps();
4401
4403
  if (!s || !Nt(e, i, this.currentDirection))
4402
4404
  return;
4403
- const o = this.getAxisMotionValue(e);
4404
- let r = this.originPoint[e] + s[e];
4405
- this.constraints && this.constraints[e] && (r = jc(r, this.constraints[e], this.elastic[e])), o.set(r);
4405
+ const r = this.getAxisMotionValue(e);
4406
+ let o = this.originPoint[e] + s[e];
4407
+ this.constraints && this.constraints[e] && (o = jc(o, this.constraints[e], this.elastic[e])), r.set(o);
4406
4408
  }
4407
4409
  resolveConstraints() {
4408
4410
  const { dragConstraints: e, dragElastic: n } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, i = this.constraints;
4409
- e && bt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints = Nc(s.layoutBox, e) : this.constraints = !1, this.elastic = $c(n), i !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && U((o) => {
4410
- this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = Kc(s.layoutBox[o], this.constraints[o]));
4411
+ e && bt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints = Nc(s.layoutBox, e) : this.constraints = !1, this.elastic = $c(n), i !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && U((r) => {
4412
+ this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = Kc(s.layoutBox[r], this.constraints[r]));
4411
4413
  });
4412
4414
  }
4413
4415
  resolveRefConstraints() {
@@ -4419,38 +4421,38 @@ class _c {
4419
4421
  const { projection: i } = this.visualElement;
4420
4422
  if (!i || !i.layout)
4421
4423
  return !1;
4422
- const o = tl(s, i.root, this.visualElement.getTransformPagePoint());
4423
- let r = Uc(i.layout.layoutBox, o);
4424
+ const r = tl(s, i.root, this.visualElement.getTransformPagePoint());
4425
+ let o = Uc(i.layout.layoutBox, r);
4424
4426
  if (n) {
4425
- const a = n(Za(r));
4426
- this.hasMutatedConstraints = !!a, a && (r = Wi(a));
4427
+ const a = n(Za(o));
4428
+ this.hasMutatedConstraints = !!a, a && (o = Wi(a));
4427
4429
  }
4428
- return r;
4430
+ return o;
4429
4431
  }
4430
4432
  startAnimation(e) {
4431
- const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = U((c) => {
4432
- if (!Nt(c, n, this.currentDirection))
4433
+ const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c = U((u) => {
4434
+ if (!Nt(u, n, this.currentDirection))
4433
4435
  return;
4434
- let h = l && l[c] || {};
4435
- r && (h = { min: 0, max: 0 });
4436
+ let h = l && l[u] || {};
4437
+ o && (h = { min: 0, max: 0 });
4436
4438
  const f = i ? 200 : 1e6, d = i ? 40 : 1e7, m = {
4437
4439
  type: "inertia",
4438
- velocity: s ? e[c] : 0,
4440
+ velocity: s ? e[u] : 0,
4439
4441
  bounceStiffness: f,
4440
4442
  bounceDamping: d,
4441
4443
  timeConstant: 750,
4442
4444
  restDelta: 1,
4443
4445
  restSpeed: 10,
4444
- ...o,
4446
+ ...r,
4445
4447
  ...h
4446
4448
  };
4447
- return this.startAxisValueAnimation(c, m);
4449
+ return this.startAxisValueAnimation(u, m);
4448
4450
  });
4449
- return Promise.all(u).then(a);
4451
+ return Promise.all(c).then(a);
4450
4452
  }
4451
4453
  startAxisValueAnimation(e, n) {
4452
4454
  const s = this.getAxisMotionValue(e);
4453
- return Re(this.visualElement, e), s.start(on(e, s, 0, n, this.visualElement, !1));
4455
+ return Re(this.visualElement, e), s.start(rn(e, s, 0, n, this.visualElement, !1));
4454
4456
  }
4455
4457
  stopAnimation() {
4456
4458
  U((e) => this.getAxisMotionValue(e).stop());
@@ -4476,10 +4478,10 @@ class _c {
4476
4478
  const { drag: s } = this.getProps();
4477
4479
  if (!Nt(n, s, this.currentDirection))
4478
4480
  return;
4479
- const { projection: i } = this.visualElement, o = this.getAxisMotionValue(n);
4481
+ const { projection: i } = this.visualElement, r = this.getAxisMotionValue(n);
4480
4482
  if (i && i.layout) {
4481
- const { min: r, max: a } = i.layout.layoutBox[n], l = o.get() || 0;
4482
- o.set(e[n] - D(r, a, 0.5) + l);
4483
+ const { min: o, max: a } = i.layout.layoutBox[n], l = r.get() || 0;
4484
+ r.set(e[n] - D(o, a, 0.5) + l);
4483
4485
  }
4484
4486
  });
4485
4487
  }
@@ -4496,19 +4498,19 @@ class _c {
4496
4498
  return;
4497
4499
  this.stopAnimation();
4498
4500
  const i = { x: 0, y: 0 };
4499
- U((r) => {
4500
- const a = this.getAxisMotionValue(r);
4501
+ U((o) => {
4502
+ const a = this.getAxisMotionValue(o);
4501
4503
  if (a && this.constraints !== !1) {
4502
4504
  const l = a.get();
4503
- i[r] = Wc({ min: l, max: l }, this.constraints[r]);
4505
+ i[o] = Wc({ min: l, max: l }, this.constraints[o]);
4504
4506
  }
4505
4507
  });
4506
- const { transformTemplate: o } = this.visualElement.getProps();
4507
- this.visualElement.current.style.transform = o ? o({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), U((r) => {
4508
- if (!Nt(r, e, null))
4508
+ const { transformTemplate: r } = this.visualElement.getProps();
4509
+ this.visualElement.current.style.transform = r ? r({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), U((o) => {
4510
+ if (!Nt(o, e, null))
4509
4511
  return;
4510
- const a = this.getAxisMotionValue(r), { min: l, max: u } = this.constraints[r];
4511
- a.set(D(l, u, i[r]));
4512
+ const a = this.getAxisMotionValue(o), { min: l, max: c } = this.constraints[o];
4513
+ a.set(D(l, c, i[o]));
4512
4514
  });
4513
4515
  }
4514
4516
  addListeners() {
@@ -4516,32 +4518,32 @@ class _c {
4516
4518
  return;
4517
4519
  Gc.set(this.visualElement, this);
4518
4520
  const e = this.visualElement.current, n = Dt(e, "pointerdown", (l) => {
4519
- const { drag: u, dragListener: c = !0 } = this.getProps(), h = l.target, f = h !== e && Bi(h);
4520
- u && c && !f && this.start(l);
4521
+ const { drag: c, dragListener: u = !0 } = this.getProps(), h = l.target, f = h !== e && Bi(h);
4522
+ c && u && !f && this.start(l);
4521
4523
  }), s = () => {
4522
4524
  const { dragConstraints: l } = this.getProps();
4523
4525
  bt(l) && l.current && (this.constraints = this.resolveRefConstraints());
4524
- }, { projection: i } = this.visualElement, o = i.addEventListener("measure", s);
4526
+ }, { projection: i } = this.visualElement, r = i.addEventListener("measure", s);
4525
4527
  i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), A.read(s);
4526
- const r = Lt(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: u }) => {
4527
- this.isDragging && u && (U((c) => {
4528
- const h = this.getAxisMotionValue(c);
4529
- h && (this.originPoint[c] += l[c].translate, h.set(h.get() + l[c].translate));
4528
+ const o = Lt(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: c }) => {
4529
+ this.isDragging && c && (U((u) => {
4530
+ const h = this.getAxisMotionValue(u);
4531
+ h && (this.originPoint[u] += l[u].translate, h.set(h.get() + l[u].translate));
4530
4532
  }), this.visualElement.render());
4531
4533
  }));
4532
4534
  return () => {
4533
- r(), n(), o(), a && a();
4535
+ o(), n(), r(), a && a();
4534
4536
  };
4535
4537
  }
4536
4538
  getProps() {
4537
- const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: o = !1, dragElastic: r = je, dragMomentum: a = !0 } = e;
4539
+ const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: r = !1, dragElastic: o = je, dragMomentum: a = !0 } = e;
4538
4540
  return {
4539
4541
  ...e,
4540
4542
  drag: n,
4541
4543
  dragDirectionLock: s,
4542
4544
  dragPropagation: i,
4543
- dragConstraints: o,
4544
- dragElastic: r,
4545
+ dragConstraints: r,
4546
+ dragElastic: o,
4545
4547
  dragMomentum: a
4546
4548
  };
4547
4549
  }
@@ -4577,9 +4579,9 @@ class Yc extends tt {
4577
4579
  super(...arguments), this.removePointerDownListener = K;
4578
4580
  }
4579
4581
  onPointerDown(e) {
4580
- this.session = new Tr(e, this.createPanHandlers(), {
4582
+ this.session = new xo(e, this.createPanHandlers(), {
4581
4583
  transformPagePoint: this.node.getTransformPagePoint(),
4582
- contextWindow: vr(this.node)
4584
+ contextWindow: To(this.node)
4583
4585
  });
4584
4586
  }
4585
4587
  createPanHandlers() {
@@ -4588,8 +4590,8 @@ class Yc extends tt {
4588
4590
  onSessionStart: ks(e),
4589
4591
  onStart: ks(n),
4590
4592
  onMove: s,
4591
- onEnd: (o, r) => {
4592
- delete this.session, i && A.postRender(() => i(o, r));
4593
+ onEnd: (r, o) => {
4594
+ delete this.session, i && A.postRender(() => i(r, o));
4593
4595
  }
4594
4596
  };
4595
4597
  }
@@ -4604,29 +4606,29 @@ class Yc extends tt {
4604
4606
  }
4605
4607
  }
4606
4608
  let pe = !1;
4607
- class Xc extends Mr {
4609
+ class Xc extends Co {
4608
4610
  /**
4609
4611
  * This only mounts projection nodes for components that
4610
4612
  * need measuring, we might want to do it for all components
4611
4613
  * in order to incorporate transforms
4612
4614
  */
4613
4615
  componentDidMount() {
4614
- const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: o } = e;
4615
- o && (n.group && n.group.add(o), s && s.register && i && s.register(o), pe && o.root.didUpdate(), o.addEventListener("animationComplete", () => {
4616
+ const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: r } = e;
4617
+ r && (n.group && n.group.add(r), s && s.register && i && s.register(r), pe && r.root.didUpdate(), r.addEventListener("animationComplete", () => {
4616
4618
  this.safeToRemove();
4617
- }), o.setOptions({
4618
- ...o.options,
4619
+ }), r.setOptions({
4620
+ ...r.options,
4619
4621
  layoutDependency: this.props.layoutDependency,
4620
4622
  onExitComplete: () => this.safeToRemove()
4621
4623
  })), $t.hasEverUpdated = !0;
4622
4624
  }
4623
4625
  getSnapshotBeforeUpdate(e) {
4624
- const { layoutDependency: n, visualElement: s, drag: i, isPresent: o } = this.props, { projection: r } = s;
4625
- return r && (r.isPresent = o, e.layoutDependency !== n && r.setOptions({
4626
- ...r.options,
4626
+ const { layoutDependency: n, visualElement: s, drag: i, isPresent: r } = this.props, { projection: o } = s;
4627
+ return o && (o.isPresent = r, e.layoutDependency !== n && o.setOptions({
4628
+ ...o.options,
4627
4629
  layoutDependency: n
4628
- }), pe = !0, i || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || A.postRender(() => {
4629
- const a = r.getStack();
4630
+ }), pe = !0, i || e.layoutDependency !== n || n === void 0 || e.isPresent !== r ? o.willUpdate() : this.safeToRemove(), e.isPresent !== r && (r ? o.promote() : o.relegate() || A.postRender(() => {
4631
+ const a = o.getStack();
4630
4632
  (!a || !a.members.length) && this.safeToRemove();
4631
4633
  }))), null;
4632
4634
  }
@@ -4648,9 +4650,9 @@ class Xc extends Mr {
4648
4650
  return null;
4649
4651
  }
4650
4652
  }
4651
- function Pr(t) {
4653
+ function Po(t) {
4652
4654
  const [e, n] = sc(), s = O(Us);
4653
- return Ns(Xc, { ...t, layoutGroup: s, switchLayoutGroup: O(gr), isPresent: e, safeToRemove: n });
4655
+ return Ns(Xc, { ...t, layoutGroup: s, switchLayoutGroup: O(yo), isPresent: e, safeToRemove: n });
4654
4656
  }
4655
4657
  const qc = {
4656
4658
  pan: {
@@ -4658,15 +4660,15 @@ const qc = {
4658
4660
  },
4659
4661
  drag: {
4660
4662
  Feature: zc,
4661
- ProjectionNode: lr,
4662
- MeasureLayout: Pr
4663
+ ProjectionNode: lo,
4664
+ MeasureLayout: Po
4663
4665
  }
4664
4666
  };
4665
4667
  function Fs(t, e, n) {
4666
4668
  const { props: s } = t;
4667
4669
  t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
4668
- const i = "onHover" + n, o = s[i];
4669
- o && A.postRender(() => o(e, It(e)));
4670
+ const i = "onHover" + n, r = s[i];
4671
+ r && A.postRender(() => r(e, It(e)));
4670
4672
  }
4671
4673
  class Zc extends tt {
4672
4674
  mount() {
@@ -4703,13 +4705,13 @@ function Bs(t, e, n) {
4703
4705
  if (t.current instanceof HTMLButtonElement && t.current.disabled)
4704
4706
  return;
4705
4707
  t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
4706
- const i = "onTap" + (n === "End" ? "" : n), o = s[i];
4707
- o && A.postRender(() => o(e, It(e)));
4708
+ const i = "onTap" + (n === "End" ? "" : n), r = s[i];
4709
+ r && A.postRender(() => r(e, It(e)));
4708
4710
  }
4709
4711
  class Qc extends tt {
4710
4712
  mount() {
4711
4713
  const { current: e } = this.node;
4712
- e && (this.unmount = Wa(e, (n, s) => (Bs(this.node, s, "Start"), (i, { success: o }) => Bs(this.node, i, o ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
4714
+ e && (this.unmount = Wa(e, (n, s) => (Bs(this.node, s, "Start"), (i, { success: r }) => Bs(this.node, i, r ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
4713
4715
  }
4714
4716
  unmount() {
4715
4717
  }
@@ -4736,25 +4738,25 @@ const iu = {
4736
4738
  some: 0,
4737
4739
  all: 1
4738
4740
  };
4739
- class ru extends tt {
4741
+ class ou extends tt {
4740
4742
  constructor() {
4741
4743
  super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
4742
4744
  }
4743
4745
  startObserver() {
4744
4746
  this.unmount();
4745
- const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: o } = e, r = {
4747
+ const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = e, o = {
4746
4748
  root: n ? n.current : void 0,
4747
4749
  rootMargin: s,
4748
4750
  threshold: typeof i == "number" ? i : iu[i]
4749
4751
  }, a = (l) => {
4750
- const { isIntersecting: u } = l;
4751
- if (this.isInView === u || (this.isInView = u, o && !u && this.hasEnteredView))
4752
+ const { isIntersecting: c } = l;
4753
+ if (this.isInView === c || (this.isInView = c, r && !c && this.hasEnteredView))
4752
4754
  return;
4753
- u && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", u);
4754
- const { onViewportEnter: c, onViewportLeave: h } = this.node.getProps(), f = u ? c : h;
4755
+ c && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", c);
4756
+ const { onViewportEnter: u, onViewportLeave: h } = this.node.getProps(), f = c ? u : h;
4755
4757
  f && f(l);
4756
4758
  };
4757
- return su(this.node.current, r, a);
4759
+ return su(this.node.current, o, a);
4758
4760
  }
4759
4761
  mount() {
4760
4762
  this.startObserver();
@@ -4763,17 +4765,17 @@ class ru extends tt {
4763
4765
  if (typeof IntersectionObserver > "u")
4764
4766
  return;
4765
4767
  const { props: e, prevProps: n } = this.node;
4766
- ["amount", "margin", "root"].some(ou(e, n)) && this.startObserver();
4768
+ ["amount", "margin", "root"].some(ru(e, n)) && this.startObserver();
4767
4769
  }
4768
4770
  unmount() {
4769
4771
  }
4770
4772
  }
4771
- function ou({ viewport: t = {} }, { viewport: e = {} } = {}) {
4773
+ function ru({ viewport: t = {} }, { viewport: e = {} } = {}) {
4772
4774
  return (n) => t[n] !== e[n];
4773
4775
  }
4774
4776
  const au = {
4775
4777
  inView: {
4776
- Feature: ru
4778
+ Feature: ou
4777
4779
  },
4778
4780
  tap: {
4779
4781
  Feature: Qc
@@ -4786,8 +4788,8 @@ const au = {
4786
4788
  }
4787
4789
  }, lu = {
4788
4790
  layout: {
4789
- ProjectionNode: lr,
4790
- MeasureLayout: Pr
4791
+ ProjectionNode: lo,
4792
+ MeasureLayout: Po
4791
4793
  }
4792
4794
  }, cu = {
4793
4795
  ...kc,
@@ -4796,5 +4798,12 @@ const au = {
4796
4798
  ...lu
4797
4799
  }, mu = /* @__PURE__ */ Mc(cu, Cc);
4798
4800
  export {
4799
- mu as m
4801
+ Us as L,
4802
+ co as M,
4803
+ We as P,
4804
+ sc as a,
4805
+ Lo as b,
4806
+ Ia as i,
4807
+ mu as m,
4808
+ Ro as u
4800
4809
  };