@acrool/react-picker 0.0.2-alpha.2 → 0.0.2-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as An from "react";
2
- import $s, { createContext as Vt, useContext as U, useLayoutEffect as Ho, useEffect as Et, useRef as it, useInsertionEffect as Ks, useCallback as pt, useMemo as Rt, forwardRef as Gs, Fragment as zs, createElement as Yo, useId as Cn, Component as Xo, Children as qo, isValidElement as Zo, useState as Jt } from "react";
2
+ import $s, { createContext as Et, useContext as U, useLayoutEffect as Ho, useEffect as gt, useRef as it, useInsertionEffect as Ks, useCallback as pt, useMemo as Vt, forwardRef as Gs, Fragment as zs, createElement as Yo, useId as Cn, Component as Xo, Children as qo, isValidElement as Zo, useState as Jt } from "react";
3
3
  var jt = /* @__PURE__ */ ((t) => (t.Escape = "Escape", t.Enter = "Enter", t.Tab = "Tab", t.ArrowUp = "ArrowUp", t.ArrowDown = "ArrowDown", t))(jt || {});
4
4
  const le = [
5
5
  "color: #fff",
@@ -48,21 +48,21 @@ function na(t, ...e) {
48
48
  ]).join(";");
49
49
  ce(t, n, ...e);
50
50
  }
51
- const bt = {
51
+ const wt = {
52
52
  primary: Jo,
53
53
  success: Qo,
54
54
  info: ta,
55
55
  warning: ea,
56
56
  danger: na
57
- }, Rn = Vt({
58
- hide: () => bt.warning("No hide method detected, did you embed your app with Acrool/PickerPortal?"),
59
- show: () => bt.warning("No show method detected, did you embed your app with Acrool/PickerPortal?"),
60
- toggle: () => bt.warning("No toggle method detected, did you embed your app with Acrool/PickerPortal?"),
57
+ }, Rn = Et({
58
+ hide: () => wt.warning("No hide method detected, did you embed your app with Acrool/PickerPortal?"),
59
+ show: () => wt.warning("No show method detected, did you embed your app with Acrool/PickerPortal?"),
60
+ toggle: () => wt.warning("No toggle method detected, did you embed your app with Acrool/PickerPortal?"),
61
61
  isVisible: !1,
62
- inputFocus: () => bt.warning("No focus method detected, did you embed your app with Acrool/PickerPortal?"),
63
- inputBlur: () => bt.warning("No blur method detected, did you embed your app with Acrool/PickerPortal?"),
62
+ inputFocus: () => wt.warning("No focus method detected, did you embed your app with Acrool/PickerPortal?"),
63
+ inputBlur: () => wt.warning("No blur method detected, did you embed your app with Acrool/PickerPortal?"),
64
64
  isInputFocus: !1,
65
- onChange: () => bt.warning("No onChange method detected, did you embed your app with Acrool/PickerPortal?")
65
+ onChange: () => wt.warning("No onChange method detected, did you embed your app with Acrool/PickerPortal?")
66
66
  }), Uh = Rn.Consumer, Wh = () => U(Rn);
67
67
  var cn = { exports: {} }, Ht = {};
68
68
  /**
@@ -343,8 +343,8 @@ function sa() {
343
343
  } finally {
344
344
  $e = !1, Ue.current = k, To(), Error.prepareStackTrace = D;
345
345
  }
346
- var Lt = f ? f.displayName || f.name : "", xt = Lt ? me(Lt) : "";
347
- return typeof f == "function" && ge.set(f, xt), xt;
346
+ var Lt = f ? f.displayName || f.name : "", Tt = Lt ? me(Lt) : "";
347
+ return typeof f == "function" && ge.set(f, Tt), Tt;
348
348
  }
349
349
  function wo(f, m, T) {
350
350
  return ai(f, !1);
@@ -678,17 +678,17 @@ Check the top-level render call using <` + T + ">.");
678
678
  vi(Q, f);
679
679
  }
680
680
  if (Gt.call(m, "key")) {
681
- var xt = Z(f), Y = Object.keys(m).filter(function(zo) {
681
+ var Tt = Z(f), Y = Object.keys(m).filter(function(zo) {
682
682
  return zo !== "key";
683
683
  }), Xe = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
684
- if (!Pi[xt + Xe]) {
684
+ if (!Pi[Tt + Xe]) {
685
685
  var Go = Y.length > 0 ? "{" + Y.join(": ..., ") + ": ...}" : "{}";
686
686
  v(`A props object containing a "key" prop is being spread into JSX:
687
687
  let props = %s;
688
688
  <%s {...props} />
689
689
  React keys must be passed directly to JSX without using spread:
690
690
  let props = %s;
691
- <%s key={someKey} {...props} />`, Xe, xt, Go, xt), Pi[xt + Xe] = !0;
691
+ <%s key={someKey} {...props} />`, Xe, Tt, Go, Tt), Pi[Tt + Xe] = !0;
692
692
  }
693
693
  }
694
694
  return f === i ? No(I) : Io(I), I;
@@ -706,11 +706,11 @@ React keys must be passed directly to JSX without using spread:
706
706
  }
707
707
  process.env.NODE_ENV === "production" ? cn.exports = ia() : cn.exports = sa();
708
708
  var O = cn.exports;
709
- const Vn = Vt({
709
+ const Vn = Et({
710
710
  transformPagePoint: (t) => t,
711
711
  isStatic: !1,
712
712
  reducedMotion: "never"
713
- }), ke = Vt({}), Le = Vt(null), En = typeof window < "u", Hs = En ? Ho : Et, Ys = Vt({ strict: !1 }), je = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ra = "framerAppearId", Xs = "data-" + je(ra), oa = {
713
+ }), ke = Et({}), Le = Et(null), En = typeof window < "u", Hs = En ? Ho : gt, Ys = Et({ strict: !1 }), je = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ra = "framerAppearId", Xs = "data-" + je(ra), oa = {
714
714
  skipAnimations: !1,
715
715
  useManualTiming: !1
716
716
  };
@@ -790,7 +790,7 @@ const { schedule: Dn, cancel: $h } = qs(queueMicrotask, !1);
790
790
  function Ot(t) {
791
791
  return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
792
792
  }
793
- const Zs = Vt({});
793
+ const Zs = Et({});
794
794
  let wi = !1;
795
795
  function ua(t, e, n, i, s) {
796
796
  const { visualElement: o } = U(ke), r = U(Ys), a = U(Le), l = U(Vn).reducedMotion, u = it();
@@ -809,7 +809,7 @@ function ua(t, e, n, i, s) {
809
809
  const d = it(!!(n[Xs] && !window.HandoffComplete));
810
810
  return Hs(() => {
811
811
  c && (c.updateFeatures(), Dn.render(c.render), d.current && c.animationState && c.animationState.animateChanges());
812
- }), Et(() => {
812
+ }), gt(() => {
813
813
  c && (!d.current && c.animationState && c.animationState.animateChanges(), d.current && (d.current = !1, wi || (wi = !0, queueMicrotask(ca))));
814
814
  }), c;
815
815
  }
@@ -886,7 +886,7 @@ function da(t, e) {
886
886
  }
887
887
  function pa(t) {
888
888
  const { initial: e, animate: n } = da(t, U(ke));
889
- return Rt(() => ({ initial: e, animate: n }), [Si(e), Si(n)]);
889
+ return Vt(() => ({ initial: e, animate: n }), [Si(e), Si(n)]);
890
890
  }
891
891
  function Si(t) {
892
892
  return Array.isArray(t) ? t.join(" ") : t;
@@ -922,7 +922,7 @@ function ma(t) {
922
922
  ...t[e]
923
923
  };
924
924
  }
925
- const Ln = Vt({}), ga = Symbol.for("motionComponentSymbol"), W = (t) => t;
925
+ const Ln = Et({}), ga = Symbol.for("motionComponentSymbol"), W = (t) => t;
926
926
  let Wt = W, ct = W;
927
927
  process.env.NODE_ENV !== "production" && (Wt = (t, e) => {
928
928
  !t && typeof console < "u" && console.warn(e);
@@ -1055,9 +1055,9 @@ const he = [
1055
1055
  "skew",
1056
1056
  "skewX",
1057
1057
  "skewY"
1058
- ], vt = new Set(he);
1058
+ ], Pt = new Set(he);
1059
1059
  function tr(t, { layout: e, layoutId: n }) {
1060
- return vt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Ce[t] || t === "opacity");
1060
+ return Pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Ce[t] || t === "opacity");
1061
1061
  }
1062
1062
  const K = (t) => !!(t && t.getVelocity), Sa = {
1063
1063
  x: "translateX",
@@ -1076,13 +1076,13 @@ function Ca(t, e, n) {
1076
1076
  }
1077
1077
  return i = i.trim(), n ? i = n(t, e ? "" : i) : e && (i = "none"), i;
1078
1078
  }
1079
- const er = (t) => (e) => typeof e == "string" && e.startsWith(t), nr = er("--"), Ra = er("var(--"), On = (t) => Ra(t) ? Va.test(t.split("/*")[0].trim()) : !1, Va = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Ea = (t, e) => e && typeof t == "number" ? e.transform(t) : t, gt = (t, e, n) => n > e ? e : n < t ? t : n, $t = {
1079
+ const er = (t) => (e) => typeof e == "string" && e.startsWith(t), nr = er("--"), Ra = er("var(--"), On = (t) => Ra(t) ? Va.test(t.split("/*")[0].trim()) : !1, Va = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Ea = (t, e) => e && typeof t == "number" ? e.transform(t) : t, yt = (t, e, n) => n > e ? e : n < t ? t : n, $t = {
1080
1080
  test: (t) => typeof t == "number",
1081
1081
  parse: parseFloat,
1082
1082
  transform: (t) => t
1083
1083
  }, Qt = {
1084
1084
  ...$t,
1085
- transform: (t) => gt(0, 1, t)
1085
+ transform: (t) => yt(0, 1, t)
1086
1086
  }, xe = {
1087
1087
  ...$t,
1088
1088
  default: 1
@@ -1182,7 +1182,7 @@ function _n(t, e, n) {
1182
1182
  continue;
1183
1183
  }
1184
1184
  const d = ir[c], p = Ea(h, d);
1185
- if (vt.has(c)) {
1185
+ if (Pt.has(c)) {
1186
1186
  if (a = !0, o[c] = p, !u)
1187
1187
  continue;
1188
1188
  h !== (d.default || 0) && (u = !1);
@@ -1205,7 +1205,7 @@ function sr(t, e, n) {
1205
1205
  !K(e[i]) && !tr(i, n) && (t[i] = e[i]);
1206
1206
  }
1207
1207
  function Oa({ transformTemplate: t }, e) {
1208
- return Rt(() => {
1208
+ return Vt(() => {
1209
1209
  const n = Bn();
1210
1210
  return _n(n, e, t), Object.assign({}, n.vars, n.style);
1211
1211
  }, [e]);
@@ -1314,7 +1314,7 @@ const or = () => ({
1314
1314
  attrs: {}
1315
1315
  }), Nn = (t) => typeof t == "string" && t.toLowerCase() === "svg";
1316
1316
  function Ga(t, e, n, i) {
1317
- const s = Rt(() => {
1317
+ const s = Vt(() => {
1318
1318
  const o = or();
1319
1319
  return In(o, e, Nn(i), t.transformTemplate), {
1320
1320
  ...o.attrs,
@@ -1329,7 +1329,7 @@ function Ga(t, e, n, i) {
1329
1329
  }
1330
1330
  function za(t = !1) {
1331
1331
  return (n, i, s, { latestValues: o }, r) => {
1332
- const l = (jn(n) ? Ga : _a)(i, o, r, n), u = Na(i, typeof n == "string", t), c = n !== zs ? { ...u, ...l, ref: s } : {}, { children: h } = i, d = Rt(() => K(h) ? h.get() : h, [h]);
1332
+ const l = (jn(n) ? Ga : _a)(i, o, r, n), u = Na(i, typeof n == "string", t), c = n !== zs ? { ...u, ...l, ref: s } : {}, { children: h } = i, d = Vt(() => K(h) ? h.get() : h, [h]);
1333
1333
  return Yo(n, {
1334
1334
  ...c,
1335
1335
  children: d
@@ -1423,7 +1423,7 @@ const hr = /* @__PURE__ */ new Set([
1423
1423
  // "background-color"
1424
1424
  ]);
1425
1425
  function fr(t) {
1426
- if (vt.has(t))
1426
+ if (Pt.has(t))
1427
1427
  return "transform";
1428
1428
  if (hr.has(t))
1429
1429
  return je(t);
@@ -1569,7 +1569,7 @@ function yr() {
1569
1569
  const t = gr(!0);
1570
1570
  return t ? (t(), !1) : !0;
1571
1571
  }
1572
- class Pt {
1572
+ class xt {
1573
1573
  constructor(e) {
1574
1574
  this.isMounted = !1, this.node = e;
1575
1575
  }
@@ -1589,14 +1589,14 @@ function Li(t, e) {
1589
1589
  passive: !t.getProps()[i]
1590
1590
  });
1591
1591
  }
1592
- class il extends Pt {
1592
+ class il extends xt {
1593
1593
  mount() {
1594
1594
  this.unmount = at(Li(this.node, !0), Li(this.node, !1));
1595
1595
  }
1596
1596
  unmount() {
1597
1597
  }
1598
1598
  }
1599
- class sl extends Pt {
1599
+ class sl extends xt {
1600
1600
  constructor() {
1601
1601
  super(...arguments), this.isActive = !1;
1602
1602
  }
@@ -1625,7 +1625,7 @@ function Ze(t, e) {
1625
1625
  const n = new PointerEvent("pointer" + t);
1626
1626
  e(n, Be(n));
1627
1627
  }
1628
- class rl extends Pt {
1628
+ class rl extends xt {
1629
1629
  constructor() {
1630
1630
  super(...arguments), this.removeStartListeners = W, this.removeEndListeners = W, this.removeAccessibleListeners = W, this.startPointerPress = (e, n) => {
1631
1631
  if (this.isPressing)
@@ -1707,7 +1707,7 @@ const cl = {
1707
1707
  some: 0,
1708
1708
  all: 1
1709
1709
  };
1710
- class hl extends Pt {
1710
+ class hl extends xt {
1711
1711
  constructor() {
1712
1712
  super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
1713
1713
  }
@@ -1788,7 +1788,7 @@ const lt = (t) => t * 1e3, ut = (t) => t / 1e3, pl = {
1788
1788
  type: "keyframes",
1789
1789
  ease: [0.25, 0.1, 0.35, 1],
1790
1790
  duration: 0.3
1791
- }, vl = (t, { keyframes: e }) => e.length > 2 ? gl : vt.has(t) ? t.startsWith("scale") ? ml(e[1]) : pl : yl;
1791
+ }, vl = (t, { keyframes: e }) => e.length > 2 ? gl : Pt.has(t) ? t.startsWith("scale") ? ml(e[1]) : pl : yl;
1792
1792
  function Pl({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
1793
1793
  return !!Object.keys(c).length;
1794
1794
  }
@@ -1883,11 +1883,11 @@ Ut.translateY = Ut.y;
1883
1883
  const wr = (t) => (e) => e.test(t), Dl = {
1884
1884
  test: (t) => t === "auto",
1885
1885
  parse: (t) => t
1886
- }, Sr = [$t, w, st, dt, ja, La, Dl], _i = (t) => Sr.find(wr(t)), Ct = /* @__PURE__ */ new Set();
1886
+ }, Sr = [$t, w, st, dt, ja, La, Dl], _i = (t) => Sr.find(wr(t)), Rt = /* @__PURE__ */ new Set();
1887
1887
  let dn = !1, pn = !1;
1888
1888
  function Ar() {
1889
1889
  if (pn) {
1890
- const t = Array.from(Ct).filter((i) => i.needsMeasurement), e = new Set(t.map((i) => i.element)), n = /* @__PURE__ */ new Map();
1890
+ const t = Array.from(Rt).filter((i) => i.needsMeasurement), e = new Set(t.map((i) => i.element)), n = /* @__PURE__ */ new Map();
1891
1891
  e.forEach((i) => {
1892
1892
  const s = El(i);
1893
1893
  s.length && (n.set(i, s), i.render());
@@ -1902,10 +1902,10 @@ function Ar() {
1902
1902
  i.suspendedScrollY !== void 0 && window.scrollTo(0, i.suspendedScrollY);
1903
1903
  });
1904
1904
  }
1905
- pn = !1, dn = !1, Ct.forEach((t) => t.complete()), Ct.clear();
1905
+ pn = !1, dn = !1, Rt.forEach((t) => t.complete()), Rt.clear();
1906
1906
  }
1907
1907
  function Cr() {
1908
- Ct.forEach((t) => {
1908
+ Rt.forEach((t) => {
1909
1909
  t.readKeyframes(), t.needsMeasurement && (pn = !0);
1910
1910
  });
1911
1911
  }
@@ -1917,7 +1917,7 @@ class Gn {
1917
1917
  this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = i, this.motionValue = s, this.element = o, this.isAsync = r;
1918
1918
  }
1919
1919
  scheduleResolve() {
1920
- this.isScheduled = !0, this.isAsync ? (Ct.add(this), dn || (dn = !0, M.read(Cr), M.resolveKeyframes(Ar))) : (this.readKeyframes(), this.complete());
1920
+ this.isScheduled = !0, this.isAsync ? (Rt.add(this), dn || (dn = !0, M.read(Cr), M.resolveKeyframes(Ar))) : (this.readKeyframes(), this.complete());
1921
1921
  }
1922
1922
  readKeyframes() {
1923
1923
  const { unresolvedKeyframes: e, name: n, element: i, motionValue: s } = this;
@@ -1944,10 +1944,10 @@ class Gn {
1944
1944
  measureEndState() {
1945
1945
  }
1946
1946
  complete() {
1947
- this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe), Ct.delete(this);
1947
+ this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe), Rt.delete(this);
1948
1948
  }
1949
1949
  cancel() {
1950
- this.isComplete || (this.isScheduled = !1, Ct.delete(this));
1950
+ this.isComplete || (this.isScheduled = !1, Rt.delete(this));
1951
1951
  }
1952
1952
  resume() {
1953
1953
  this.isComplete || this.scheduleResolve();
@@ -1963,10 +1963,10 @@ const zn = (t, e) => (n) => !!(fe(n) && Ma.test(n) && n.startsWith(t) || e && !k
1963
1963
  [n]: parseFloat(r),
1964
1964
  alpha: a !== void 0 ? parseFloat(a) : 1
1965
1965
  };
1966
- }, kl = (t) => gt(0, 255, t), Qe = {
1966
+ }, kl = (t) => yt(0, 255, t), Qe = {
1967
1967
  ...$t,
1968
1968
  transform: (t) => Math.round(kl(t))
1969
- }, At = {
1969
+ }, Ct = {
1970
1970
  test: zn("rgb", "red"),
1971
1971
  parse: Rr("red", "green", "blue"),
1972
1972
  transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + Qe.transform(t) + ", " + Qe.transform(e) + ", " + Qe.transform(n) + ", " + te(Qt.transform(i)) + ")"
@@ -1983,15 +1983,15 @@ function Ll(t) {
1983
1983
  const mn = {
1984
1984
  test: zn("#"),
1985
1985
  parse: Ll,
1986
- transform: At.transform
1986
+ transform: Ct.transform
1987
1987
  }, Ft = {
1988
1988
  test: zn("hsl", "hue"),
1989
1989
  parse: Rr("hue", "saturation", "lightness"),
1990
1990
  transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + st.transform(te(e)) + ", " + st.transform(te(n)) + ", " + te(Qt.transform(i)) + ")"
1991
1991
  }, $ = {
1992
- test: (t) => At.test(t) || mn.test(t) || Ft.test(t),
1993
- parse: (t) => At.test(t) ? At.parse(t) : Ft.test(t) ? Ft.parse(t) : mn.parse(t),
1994
- transform: (t) => fe(t) ? t : t.hasOwnProperty("red") ? At.transform(t) : Ft.transform(t)
1992
+ test: (t) => Ct.test(t) || mn.test(t) || Ft.test(t),
1993
+ parse: (t) => Ct.test(t) ? Ct.parse(t) : Ft.test(t) ? Ft.parse(t) : mn.parse(t),
1994
+ transform: (t) => fe(t) ? t : t.hasOwnProperty("red") ? Ct.transform(t) : Ft.transform(t)
1995
1995
  };
1996
1996
  function jl(t) {
1997
1997
  var e, n;
@@ -2028,7 +2028,7 @@ function Il(t) {
2028
2028
  const e = Dr(t);
2029
2029
  return Mr(t)(e.map(Bl));
2030
2030
  }
2031
- const yt = {
2031
+ const vt = {
2032
2032
  test: jl,
2033
2033
  parse: Dr,
2034
2034
  createTransformer: Mr,
@@ -2046,7 +2046,7 @@ function Ul(t) {
2046
2046
  return i !== n && (o *= 100), e + "(" + o + s + ")";
2047
2047
  }
2048
2048
  const Wl = /\b([a-z-]*)\(.*?\)/gu, gn = {
2049
- ...yt,
2049
+ ...vt,
2050
2050
  getAnimatableNone: (t) => {
2051
2051
  const e = t.match(Wl);
2052
2052
  return e ? e.map(Ul).join(" ") : t;
@@ -2070,7 +2070,7 @@ const Wl = /\b([a-z-]*)\(.*?\)/gu, gn = {
2070
2070
  }, Hn = (t) => $l[t];
2071
2071
  function kr(t, e) {
2072
2072
  let n = Hn(t);
2073
- return n !== gn && (n = yt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
2073
+ return n !== gn && (n = vt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
2074
2074
  }
2075
2075
  const Kl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
2076
2076
  function Gl(t, e, n) {
@@ -2143,7 +2143,7 @@ function jr(t) {
2143
2143
  return () => (e === void 0 && (e = t()), e);
2144
2144
  }
2145
2145
  const Ii = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
2146
- (yt.test(t) || t === "0") && // And it contains numbers and/or colors
2146
+ (vt.test(t) || t === "0") && // And it contains numbers and/or colors
2147
2147
  !t.startsWith("url("));
2148
2148
  function zl(t) {
2149
2149
  const e = t[0];
@@ -2233,7 +2233,7 @@ function Jl({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1
2233
2233
  let s, o;
2234
2234
  Wt(t <= lt(Ni), "Spring duration must be 10 seconds or less");
2235
2235
  let r = 1 - e;
2236
- r = gt(ql, Zl, r), t = gt(Xl, Ni, ut(t)), r < 1 ? (s = (u) => {
2236
+ r = yt(ql, Zl, r), t = yt(Xl, Ni, ut(t)), r < 1 ? (s = (u) => {
2237
2237
  const c = u * r, h = c * t, d = c - n, p = yn(u, r), y = Math.exp(-h);
2238
2238
  return tn - d / p * y;
2239
2239
  }, o = (u) => {
@@ -2428,7 +2428,7 @@ function Ve(t, e) {
2428
2428
  const nn = (t, e, n) => {
2429
2429
  const i = t * t, s = n * (e * e - i) + i;
2430
2430
  return s < 0 ? 0 : Math.sqrt(s);
2431
- }, pu = [mn, At, Ft], mu = (t) => pu.find((e) => e.test(t));
2431
+ }, pu = [mn, Ct, Ft], mu = (t) => pu.find((e) => e.test(t));
2432
2432
  function Gi(t) {
2433
2433
  const e = mu(t);
2434
2434
  if (Wt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
@@ -2441,7 +2441,7 @@ const zi = (t, e) => {
2441
2441
  if (!n || !i)
2442
2442
  return Ve(t, e);
2443
2443
  const s = { ...n };
2444
- return (o) => (s.red = nn(n.red, i.red, o), s.green = nn(n.green, i.green, o), s.blue = nn(n.blue, i.blue, o), s.alpha = j(n.alpha, i.alpha, o), At.transform(s));
2444
+ return (o) => (s.red = nn(n.red, i.red, o), s.green = nn(n.green, i.green, o), s.blue = nn(n.blue, i.blue, o), s.alpha = j(n.alpha, i.alpha, o), Ct.transform(s));
2445
2445
  }, vn = /* @__PURE__ */ new Set(["none", "hidden"]);
2446
2446
  function gu(t, e) {
2447
2447
  return vn.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
@@ -2480,7 +2480,7 @@ function Pu(t, e) {
2480
2480
  return i;
2481
2481
  }
2482
2482
  const xu = (t, e) => {
2483
- const n = yt.createTransformer(e), i = re(t), s = re(e);
2483
+ const n = vt.createTransformer(e), i = re(t), s = re(e);
2484
2484
  return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? vn.has(t) && !s.values.length || vn.has(e) && !i.values.length ? gu(t, e) : at(Gr(Pu(i, s), s.values), n) : (Wt(!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.`), Ve(t, e));
2485
2485
  };
2486
2486
  function zr(t, e, n) {
@@ -2513,7 +2513,7 @@ function bu(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
2513
2513
  const h = oe(t[c], t[c + 1], u);
2514
2514
  return r[c](h);
2515
2515
  };
2516
- return n ? (u) => l(gt(t[0], t[o - 1], u)) : l;
2516
+ return n ? (u) => l(yt(t[0], t[o - 1], u)) : l;
2517
2517
  }
2518
2518
  function wu(t, e) {
2519
2519
  const n = t[t.length - 1];
@@ -2629,7 +2629,7 @@ class Zn extends Or {
2629
2629
  if (p) {
2630
2630
  const V = Math.min(this.currentTime, c) / h;
2631
2631
  let G = Math.floor(V), H = V % 1;
2632
- !H && V >= 1 && (H = 1), H === 1 && G--, G = Math.min(G, p + 1), !!(G % 2) && (y === "reverse" ? (H = 1 - H, P && (H -= P / h)) : y === "mirror" && (S = r)), g = gt(0, 1, H) * h;
2632
+ !H && V >= 1 && (H = 1), H === 1 && G--, G = Math.min(G, p + 1), !!(G % 2) && (y === "reverse" ? (H = 1 - H, P && (H -= P / h)) : y === "mirror" && (S = r)), g = yt(0, 1, H) * h;
2633
2633
  }
2634
2634
  const C = v ? { done: !1, value: l[0] } : S.next(g);
2635
2635
  a && (C.value = a(C.value));
@@ -3311,7 +3311,7 @@ function Jr(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
3311
3311
  v !== null && (y.elapsed = v, P = !0);
3312
3312
  }
3313
3313
  }
3314
- d.start(Qn(h, d, p, t.shouldReduceMotion && vt.has(h) ? { type: !1 } : y, t, P, Pn(t, h)));
3314
+ d.start(Qn(h, d, p, t.shouldReduceMotion && Pt.has(h) ? { type: !1 } : y, t, P, Pn(t, h)));
3315
3315
  const b = d.animation;
3316
3316
  b && u.push(b);
3317
3317
  }
@@ -3456,7 +3456,7 @@ function Ju(t) {
3456
3456
  function Qu(t, e) {
3457
3457
  return typeof e == "string" ? e !== t : Array.isArray(e) ? !Pr(e, t) : !1;
3458
3458
  }
3459
- function Tt(t = !1) {
3459
+ function bt(t = !1) {
3460
3460
  return {
3461
3461
  isActive: t,
3462
3462
  protectedKeys: {},
@@ -3466,16 +3466,16 @@ function Tt(t = !1) {
3466
3466
  }
3467
3467
  function Zi() {
3468
3468
  return {
3469
- animate: Tt(!0),
3470
- whileInView: Tt(),
3471
- whileHover: Tt(),
3472
- whileTap: Tt(),
3473
- whileDrag: Tt(),
3474
- whileFocus: Tt(),
3475
- exit: Tt()
3469
+ animate: bt(!0),
3470
+ whileInView: bt(),
3471
+ whileHover: bt(),
3472
+ whileTap: bt(),
3473
+ whileDrag: bt(),
3474
+ whileFocus: bt(),
3475
+ exit: bt()
3476
3476
  };
3477
3477
  }
3478
- class tc extends Pt {
3478
+ class tc extends xt {
3479
3479
  /**
3480
3480
  * We dynamically generate the AnimationState manager as it contains a reference
3481
3481
  * to the underlying animation library. We only want to load that if we load this,
@@ -3504,7 +3504,7 @@ class tc extends Pt {
3504
3504
  }
3505
3505
  }
3506
3506
  let ec = 0;
3507
- class nc extends Pt {
3507
+ class nc extends xt {
3508
3508
  constructor() {
3509
3509
  super(...arguments), this.id = ec++;
3510
3510
  }
@@ -3663,7 +3663,7 @@ function mc(t, e) {
3663
3663
  function gc(t, e) {
3664
3664
  let n = 0.5;
3665
3665
  const i = X(t), s = X(e);
3666
- return s > i ? n = oe(e.min, e.max - i, t.min) : i > s && (n = oe(t.min, t.max - s, e.min)), gt(0, 1, n);
3666
+ return s > i ? n = oe(e.min, e.max - i, t.min) : i > s && (n = oe(t.min, t.max - s, e.min)), yt(0, 1, n);
3667
3667
  }
3668
3668
  function yc(t, e) {
3669
3669
  const n = {};
@@ -3726,7 +3726,7 @@ function on(t) {
3726
3726
  function bn({ scale: t, scaleX: e, scaleY: n }) {
3727
3727
  return !on(t) || !on(e) || !on(n);
3728
3728
  }
3729
- function wt(t) {
3729
+ function St(t) {
3730
3730
  return bn(t) || so(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
3731
3731
  }
3732
3732
  function so(t) {
@@ -3761,7 +3761,7 @@ function Tc(t, e, n, i = !1) {
3761
3761
  l && l.props.style && l.props.style.display === "contents" || (i && o.options.layoutScroll && o.scroll && o !== o.root && It(t, {
3762
3762
  x: -o.scroll.offset.x,
3763
3763
  y: -o.scroll.offset.y
3764
- }), r && (e.x *= r.x.scale, e.y *= r.y.scale, ro(t, r)), i && wt(o.latestValues) && It(t, o.latestValues));
3764
+ }), r && (e.x *= r.x.scale, e.y *= r.y.scale, ro(t, r)), i && St(o.latestValues) && It(t, o.latestValues));
3765
3765
  }
3766
3766
  e.x < fs && e.x > hs && (e.x = 1), e.y < fs && e.y > hs && (e.y = 1);
3767
3767
  }
@@ -4018,7 +4018,7 @@ function Ac(t, e = 10) {
4018
4018
  let n = null;
4019
4019
  return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
4020
4020
  }
4021
- class Cc extends Pt {
4021
+ class Cc extends xt {
4022
4022
  constructor(e) {
4023
4023
  super(e), this.removeGroupControls = W, this.removeListeners = W, this.controls = new Sc(e);
4024
4024
  }
@@ -4033,7 +4033,7 @@ class Cc extends Pt {
4033
4033
  const ps = (t) => (e, n) => {
4034
4034
  t && M.postRender(() => t(e, n));
4035
4035
  };
4036
- class Rc extends Pt {
4036
+ class Rc extends xt {
4037
4037
  constructor() {
4038
4038
  super(...arguments), this.removePointerDownListener = W;
4039
4039
  }
@@ -4069,7 +4069,7 @@ function Vc() {
4069
4069
  if (t === null)
4070
4070
  return [!0, null];
4071
4071
  const { isPresent: e, onExitComplete: n, register: i } = t, s = Cn();
4072
- Et(() => i(s), []);
4072
+ gt(() => i(s), []);
4073
4073
  const o = pt(() => n && n(s), [s, n]);
4074
4074
  return !e && n ? [!1, o] : [!0];
4075
4075
  }
@@ -4102,10 +4102,10 @@ const Xt = {
4102
4102
  }
4103
4103
  }, Ec = {
4104
4104
  correct: (t, { treeScale: e, projectionDelta: n }) => {
4105
- const i = t, s = yt.parse(t);
4105
+ const i = t, s = vt.parse(t);
4106
4106
  if (s.length > 5)
4107
4107
  return i;
4108
- const o = yt.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
4108
+ const o = vt.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
4109
4109
  s[0 + r] /= a, s[1 + r] /= l;
4110
4110
  const u = j(a, l, 0.5);
4111
4111
  return typeof s[2 + r] == "number" && (s[2 + r] /= u), typeof s[3 + r] == "number" && (s[3 + r] /= u), o(s);
@@ -4336,7 +4336,7 @@ function zc(t, e, n) {
4336
4336
  const i = K(t) ? t : ae(t);
4337
4337
  return i.start(Qn("", i, e, n)), i.animation;
4338
4338
  }
4339
- const St = {
4339
+ const At = {
4340
4340
  type: "projectionFrame",
4341
4341
  totalNodes: 0,
4342
4342
  resolvedTargetDeltas: 0,
@@ -4359,7 +4359,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4359
4359
  this.id = Yc++, this.animationId = 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.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
4360
4360
  this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
4361
4361
  }, this.updateProjection = () => {
4362
- this.projectionUpdateScheduled = !1, Zt && (St.totalNodes = St.resolvedTargetDeltas = St.recalculatedProjection = 0), this.nodes.forEach(Zc), this.nodes.forEach(nh), this.nodes.forEach(ih), this.nodes.forEach(Jc), Zt && window.MotionDebug.record(St);
4362
+ this.projectionUpdateScheduled = !1, Zt && (At.totalNodes = At.resolvedTargetDeltas = At.recalculatedProjection = 0), this.nodes.forEach(Zc), this.nodes.forEach(nh), this.nodes.forEach(ih), this.nodes.forEach(Jc), Zt && window.MotionDebug.record(At);
4363
4363
  }, this.resolvedRelativeTargetAt = 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;
4364
4364
  for (let l = 0; l < this.path.length; l++)
4365
4365
  this.path[l].shouldResetTransform = !0;
@@ -4460,7 +4460,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4460
4460
  }
4461
4461
  this.isUpdating || this.nodes.forEach(th), this.isUpdating = !1, this.nodes.forEach(eh), this.nodes.forEach(Xc), this.nodes.forEach(qc), this.clearAllSnapshots();
4462
4462
  const a = mt.now();
4463
- N.delta = gt(0, 1e3 / 60, a - N.timestamp), N.timestamp = a, N.isProcessing = !0, qe.update.process(N), qe.preRender.process(N), qe.render.process(N), N.isProcessing = !1;
4463
+ N.delta = yt(0, 1e3 / 60, a - N.timestamp), N.timestamp = a, N.isProcessing = !0, qe.update.process(N), qe.preRender.process(N), qe.render.process(N), N.isProcessing = !1;
4464
4464
  }
4465
4465
  didUpdate() {
4466
4466
  this.updateScheduled || (this.updateScheduled = !0, Dn.read(this.scheduleUpdate));
@@ -4510,7 +4510,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4510
4510
  if (!s)
4511
4511
  return;
4512
4512
  const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !ho(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
4513
- r && (a || wt(this.latestValues) || c) && (s(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
4513
+ r && (a || St(this.latestValues) || c) && (s(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
4514
4514
  }
4515
4515
  measure(r = !0) {
4516
4516
  const a = this.measurePageBox();
@@ -4554,22 +4554,22 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4554
4554
  !a && c.options.layoutScroll && c.scroll && c !== c.root && It(l, {
4555
4555
  x: -c.scroll.offset.x,
4556
4556
  y: -c.scroll.offset.y
4557
- }), wt(c.latestValues) && It(l, c.latestValues);
4557
+ }), St(c.latestValues) && It(l, c.latestValues);
4558
4558
  }
4559
- return wt(this.latestValues) && It(l, this.latestValues), l;
4559
+ return St(this.latestValues) && It(l, this.latestValues), l;
4560
4560
  }
4561
4561
  removeTransform(r) {
4562
4562
  const a = B();
4563
4563
  tt(a, r);
4564
4564
  for (let l = 0; l < this.path.length; l++) {
4565
4565
  const u = this.path[l];
4566
- if (!u.instance || !wt(u.latestValues))
4566
+ if (!u.instance || !St(u.latestValues))
4567
4567
  continue;
4568
4568
  bn(u.latestValues) && u.updateSnapshot();
4569
4569
  const c = B(), h = u.measurePageBox();
4570
4570
  tt(c, h), ws(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
4571
4571
  }
4572
- return wt(this.latestValues) && ws(a, this.latestValues), a;
4572
+ return St(this.latestValues) && ws(a, this.latestValues), a;
4573
4573
  }
4574
4574
  setTargetDelta(r) {
4575
4575
  this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
@@ -4606,7 +4606,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4606
4606
  const p = this.getClosestProjectingParent();
4607
4607
  p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), ne(this.relativeTargetOrigin, this.target, p.target), tt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
4608
4608
  }
4609
- Zt && St.resolvedTargetDeltas++;
4609
+ Zt && At.resolvedTargetDeltas++;
4610
4610
  }
4611
4611
  }
4612
4612
  }
@@ -4634,7 +4634,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4634
4634
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
4635
4635
  return;
4636
4636
  }
4637
- !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (xs(this.prevProjectionDelta.x, this.projectionDelta.x), xs(this.prevProjectionDelta.y, this.projectionDelta.y)), ee(this.projectionDelta, this.layoutCorrected, y, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Vs(this.projectionDelta.x, this.prevProjectionDelta.x) || !Vs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", y)), Zt && St.recalculatedProjection++;
4637
+ !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (xs(this.prevProjectionDelta.x, this.projectionDelta.x), xs(this.prevProjectionDelta.y, this.projectionDelta.y)), ee(this.projectionDelta, this.layoutCorrected, y, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Vs(this.projectionDelta.x, this.prevProjectionDelta.x) || !Vs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", y)), Zt && At.recalculatedProjection++;
4638
4638
  }
4639
4639
  hide() {
4640
4640
  this.isVisible = !1;
@@ -4765,7 +4765,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4765
4765
  const h = this.getLead();
4766
4766
  if (!this.projectionDelta || !this.layout || !h.target) {
4767
4767
  const P = {};
4768
- return this.options.layoutId && (P.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, P.pointerEvents = we(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !wt(this.latestValues) && (P.transform = c ? c({}, "") : "none", this.hasProjected = !1), P;
4768
+ return this.options.layoutId && (P.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, P.pointerEvents = we(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !St(this.latestValues) && (P.transform = c ? c({}, "") : "none", this.hasProjected = !1), P;
4769
4769
  }
4770
4770
  const d = h.animationValues || h.latestValues;
4771
4771
  this.applyTransformsToTarget(), u.transform = Uc(this.projectionDeltaWithTransform, this.treeScale, d), c && (u.transform = c(d, u.transform));
@@ -4844,7 +4844,7 @@ function qc(t) {
4844
4844
  t.options.transition = void 0;
4845
4845
  }
4846
4846
  function Zc(t) {
4847
- Zt && St.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
4847
+ Zt && At.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
4848
4848
  }
4849
4849
  function Jc(t) {
4850
4850
  t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
@@ -4969,7 +4969,7 @@ function ph(t, e, n) {
4969
4969
  e[i] === void 0 && t.removeValue(i);
4970
4970
  return e;
4971
4971
  }
4972
- const _s = /* @__PURE__ */ new WeakMap(), mh = [...Sr, $, yt], gh = (t) => mh.find(wr(t)), Bs = [
4972
+ const _s = /* @__PURE__ */ new WeakMap(), mh = [...Sr, $, vt], gh = (t) => mh.find(wr(t)), Bs = [
4973
4973
  "AnimationStart",
4974
4974
  "AnimationComplete",
4975
4975
  "Update",
@@ -5017,7 +5017,7 @@ class vh {
5017
5017
  this.current = null;
5018
5018
  }
5019
5019
  bindToMotionValue(e, n) {
5020
- const i = vt.has(e), s = n.on("change", (r) => {
5020
+ const i = Pt.has(e), s = n.on("change", (r) => {
5021
5021
  this.latestValues[e] = r, this.props.onUpdate && M.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0);
5022
5022
  }), o = n.on("renderRequest", this.scheduleRender);
5023
5023
  this.valueSubscriptions.set(e, () => {
@@ -5149,7 +5149,7 @@ class vh {
5149
5149
  readValue(e, n) {
5150
5150
  var i;
5151
5151
  let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (i = this.getBaseTargetFromProps(this.props, e)) !== null && i !== void 0 ? i : this.readValueFromInstance(this.current, e, this.options);
5152
- return s != null && (typeof s == "string" && (Tr(s) || xr(s)) ? s = parseFloat(s) : !gh(s) && yt.test(n) && (s = kr(e, n)), this.setBaseTarget(e, K(s) ? s.get() : s)), K(s) ? s.get() : s;
5152
+ return s != null && (typeof s == "string" && (Tr(s) || xr(s)) ? s = parseFloat(s) : !gh(s) && vt.test(n) && (s = kr(e, n)), this.setBaseTarget(e, K(s) ? s.get() : s)), K(s) ? s.get() : s;
5153
5153
  }
5154
5154
  /**
5155
5155
  * Set the base target to later animate back to. This is currently
@@ -5204,7 +5204,7 @@ class xh extends Po {
5204
5204
  super(...arguments), this.type = "html", this.applyWillChange = !0, this.renderInstance = ar;
5205
5205
  }
5206
5206
  readValueFromInstance(e, n) {
5207
- if (vt.has(n)) {
5207
+ if (Pt.has(n)) {
5208
5208
  const i = Hn(n);
5209
5209
  return i && i.default || 0;
5210
5210
  } else {
@@ -5237,7 +5237,7 @@ class Th extends Po {
5237
5237
  return e[n];
5238
5238
  }
5239
5239
  readValueFromInstance(e, n) {
5240
- if (vt.has(n)) {
5240
+ if (Pt.has(n)) {
5241
5241
  const i = Hn(n);
5242
5242
  return i && i.default || 0;
5243
5243
  }
@@ -5314,7 +5314,7 @@ function Rh({ children: t, isPresent: e }) {
5314
5314
  }, [e]), O.jsx(Ch, { isPresent: e, childRef: i, sizeRef: s, children: An.cloneElement(t, { ref: i }) });
5315
5315
  }
5316
5316
  const Vh = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r }) => {
5317
- const a = $n(Eh), l = Cn(), u = Rt(
5317
+ const a = $n(Eh), l = Cn(), u = Vt(
5318
5318
  () => ({
5319
5319
  id: l,
5320
5320
  initial: e,
@@ -5336,7 +5336,7 @@ const Vh = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom:
5336
5336
  */
5337
5337
  o ? [Math.random()] : [n]
5338
5338
  );
5339
- return Rt(() => {
5339
+ return Vt(() => {
5340
5340
  a.forEach((c, h) => a.set(h, !1));
5341
5341
  }, [n]), An.useEffect(() => {
5342
5342
  !n && !a.size && i && i();
@@ -5354,7 +5354,7 @@ function Is(t) {
5354
5354
  }
5355
5355
  const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: r = "sync" }) => {
5356
5356
  ct(!e, "Replace exitBeforeEnter with mode='wait'");
5357
- const a = Rt(() => Is(t), [t]), l = a.map(be), u = it(!0), c = it(a), h = $n(() => /* @__PURE__ */ new Map()), [d, p] = Jt(a), [y, P] = Jt(a);
5357
+ const a = Vt(() => Is(t), [t]), l = a.map(be), u = it(!0), c = it(a), h = $n(() => /* @__PURE__ */ new Map()), [d, p] = Jt(a), [y, P] = Jt(a);
5358
5358
  Hs(() => {
5359
5359
  u.current = !1, c.current = a;
5360
5360
  for (let v = 0; v < y.length; v++) {
@@ -5389,15 +5389,15 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
5389
5389
  }) });
5390
5390
  }, Ns = ({
5391
5391
  onKeydown: t
5392
- }) => (Et(() => (document.addEventListener("keydown", t), () => {
5392
+ }) => (gt(() => (document.addEventListener("keydown", t), () => {
5393
5393
  document.removeEventListener("keydown", t);
5394
5394
  }), []), null), Us = ({
5395
5395
  onMousedown: t
5396
- }) => (Et(() => (document.addEventListener("mousedown", t), () => {
5396
+ }) => (gt(() => (document.addEventListener("mousedown", t), () => {
5397
5397
  document.removeEventListener("mousedown", t);
5398
5398
  }), []), null), Mh = ({
5399
5399
  onPickerHide: t
5400
- }) => (Et(() => () => {
5400
+ }) => (gt(() => () => {
5401
5401
  t();
5402
5402
  }, []), null), kh = "acrool-react-picker__root", Lh = "acrool-react-picker__main-el", Ws = {
5403
5403
  root: kh,
@@ -5454,7 +5454,9 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
5454
5454
  function Gh(t, e) {
5455
5455
  return (i) => {
5456
5456
  const [s, o] = Jt(!1), [r, a] = Jt(!1), [l, u] = Jt(), c = it(null), h = it(null), d = it(l);
5457
- Et(() => {
5457
+ gt(() => {
5458
+ u(i.value);
5459
+ }, [JSON.stringify(i.value)]), gt(() => {
5458
5460
  d.current = l;
5459
5461
  }, [l]);
5460
5462
  const p = pt((g) => {
@@ -5466,8 +5468,8 @@ function Gh(t, e) {
5466
5468
  }, []), b = pt((g) => {
5467
5469
  c.current && !c.current.contains(g.target) && h.current && !h.current.contains(g.target) && (o(!1), a(!1));
5468
5470
  }, []), x = pt(() => {
5469
- if (typeof i.onChange > "u") {
5470
- bt.warning("@acrool/react-picker: createPicker component props onChange is undefined, is no call");
5471
+ if (typeof (i == null ? void 0 : i.onChange) > "u") {
5472
+ wt.warning("@acrool/react-picker", "createPicker component props onChange is undefined, is no call");
5471
5473
  return;
5472
5474
  }
5473
5475
  d.current && JSON.stringify(l) !== JSON.stringify(d.current) && i.onChange(d.current);
package/dist/types.d.ts CHANGED
@@ -9,7 +9,7 @@ export interface IPickerOptions {
9
9
  }
10
10
  export interface IValueChange<T = string> {
11
11
  value?: T;
12
- onChange: (value: T) => void;
12
+ onChange?: (value: T) => void;
13
13
  }
14
14
  export interface IPosition {
15
15
  vertical: 'top' | 'bottom';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrool/react-picker",
3
- "version": "0.0.2-alpha.2",
3
+ "version": "0.0.2-alpha.4",
4
4
  "description": "Picker library based for Reactjs",
5
5
  "keywords": [
6
6
  "acrool",