@acrool/react-picker 0.1.0 → 0.1.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { RefObject } from 'react';
2
- import { EVertical } from '../types';
2
+ import { EVertical, IPosition } from '../types';
3
3
  /**
4
4
  * Get the closest scrollable parent of an element.
5
5
  * Caches results for performance.
@@ -9,6 +9,7 @@ export declare function getScrollParent(element: HTMLElement): HTMLElement | Win
9
9
  * Update the position of the picker element relative to the anchor element.
10
10
  * @param anchorRef Reference to the anchor element.
11
11
  * @param pickerRef Reference to the picker element.
12
- * @param setVertical Callback to set vertical alignment.
12
+ * @param importantPosition 強制指定位置
13
+ * @param setVertical 設定垂直(top/bottom, 讓選擇棄可以決定順序
13
14
  */
14
- export declare const updatePosition: (anchorRef: RefObject<HTMLElement>, pickerRef: RefObject<HTMLElement>, setVertical: (vertical: EVertical) => void) => void;
15
+ export declare const updatePosition: (anchorRef: RefObject<HTMLElement>, pickerRef: RefObject<HTMLElement>, setVertical: (vertical: EVertical) => void, importantPosition?: IPosition) => void;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { EVertical } from './types';
2
+ import { EVertical, IPosition } from './types';
3
3
  interface IContextProps<T = any> {
4
4
  hide: () => void;
5
5
  show: () => void;
@@ -9,6 +9,7 @@ interface IContextProps<T = any> {
9
9
  inputBlur: () => void;
10
10
  isInputFocus: boolean;
11
11
  value?: T;
12
+ importantPosition?: IPosition;
12
13
  vertical: EVertical;
13
14
  setVertical: (vertical: EVertical) => void;
14
15
  onChange: (value: T) => void;
@@ -108,29 +108,29 @@ var qt = {};
108
108
  var ki;
109
109
  function ga() {
110
110
  return ki || (ki = 1, process.env.NODE_ENV !== "production" && function() {
111
- var t = Ln, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), m = Symbol.iterator, x = "@@iterator";
112
- function b(h) {
111
+ var t = Ln, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, v = "@@iterator";
112
+ function T(h) {
113
113
  if (h === null || typeof h != "object")
114
114
  return null;
115
- var g = m && h[m] || h[x];
116
- return typeof g == "function" ? g : null;
115
+ var m = g && h[g] || h[v];
116
+ return typeof m == "function" ? m : null;
117
117
  }
118
118
  var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
119
119
  function y(h) {
120
120
  {
121
- for (var g = arguments.length, T = new Array(g > 1 ? g - 1 : 0), C = 1; C < g; C++)
122
- T[C - 1] = arguments[C];
123
- v("error", h, T);
121
+ for (var m = arguments.length, b = new Array(m > 1 ? m - 1 : 0), C = 1; C < m; C++)
122
+ b[C - 1] = arguments[C];
123
+ x("error", h, b);
124
124
  }
125
125
  }
126
- function v(h, g, T) {
126
+ function x(h, m, b) {
127
127
  {
128
128
  var C = P.ReactDebugCurrentFrame, k = C.getStackAddendum();
129
- k !== "" && (g += "%s", T = T.concat([k]));
130
- var O = T.map(function(E) {
129
+ k !== "" && (m += "%s", b = b.concat([k]));
130
+ var O = b.map(function(E) {
131
131
  return String(E);
132
132
  });
133
- O.unshift("Warning: " + g), Function.prototype.apply.call(console[h], console, O);
133
+ O.unshift("Warning: " + m), Function.prototype.apply.call(console[h], console, O);
134
134
  }
135
135
  }
136
136
  var w = !1, A = !1, j = !1, q = !1, R = !1, W;
@@ -142,12 +142,12 @@ function ga() {
142
142
  // with.
143
143
  h.$$typeof === W || h.getModuleId !== void 0));
144
144
  }
145
- function rt(h, g, T) {
145
+ function rt(h, m, b) {
146
146
  var C = h.displayName;
147
147
  if (C)
148
148
  return C;
149
- var k = g.displayName || g.name || "";
150
- return k !== "" ? T + "(" + k + ")" : T;
149
+ var k = m.displayName || m.name || "";
150
+ return k !== "" ? b + "(" + k + ")" : b;
151
151
  }
152
152
  function wt(h) {
153
153
  return h.displayName || "Context";
@@ -176,11 +176,11 @@ function ga() {
176
176
  if (typeof h == "object")
177
177
  switch (h.$$typeof) {
178
178
  case a:
179
- var g = h;
180
- return wt(g) + ".Consumer";
179
+ var m = h;
180
+ return wt(m) + ".Consumer";
181
181
  case r:
182
- var T = h;
183
- return wt(T._context) + ".Provider";
182
+ var b = h;
183
+ return wt(b._context) + ".Provider";
184
184
  case l:
185
185
  return rt(h, h.render, "ForwardRef");
186
186
  case f:
@@ -260,7 +260,7 @@ function ga() {
260
260
  }
261
261
  }
262
262
  var ze = P.ReactCurrentDispatcher, Ye;
263
- function ve(h, g, T) {
263
+ function ve(h, m, b) {
264
264
  {
265
265
  if (Ye === void 0)
266
266
  try {
@@ -278,13 +278,13 @@ function ga() {
278
278
  var ko = typeof WeakMap == "function" ? WeakMap : Map;
279
279
  Pe = new ko();
280
280
  }
281
- function yi(h, g) {
281
+ function yi(h, m) {
282
282
  if (!h || Xe)
283
283
  return "";
284
284
  {
285
- var T = Pe.get(h);
286
- if (T !== void 0)
287
- return T;
285
+ var b = Pe.get(h);
286
+ if (b !== void 0)
287
+ return b;
288
288
  }
289
289
  var C;
290
290
  Xe = !0;
@@ -293,7 +293,7 @@ function ga() {
293
293
  var O;
294
294
  O = ze.current, ze.current = null, Do();
295
295
  try {
296
- if (g) {
296
+ if (m) {
297
297
  var E = function() {
298
298
  throw Error();
299
299
  };
@@ -349,14 +349,14 @@ function ga() {
349
349
  var Ft = h ? h.displayName || h.name : "", St = Ft ? ve(Ft) : "";
350
350
  return typeof h == "function" && Pe.set(h, St), St;
351
351
  }
352
- function Lo(h, g, T) {
352
+ function Lo(h, m, b) {
353
353
  return yi(h, !1);
354
354
  }
355
355
  function Oo(h) {
356
- var g = h.prototype;
357
- return !!(g && g.isReactComponent);
356
+ var m = h.prototype;
357
+ return !!(m && m.isReactComponent);
358
358
  }
359
- function xe(h, g, T) {
359
+ function xe(h, m, b) {
360
360
  if (h == null)
361
361
  return "";
362
362
  if (typeof h == "function")
@@ -374,11 +374,11 @@ function ga() {
374
374
  case l:
375
375
  return Lo(h.render);
376
376
  case f:
377
- return xe(h.type, g, T);
377
+ return xe(h.type, m, b);
378
378
  case d: {
379
379
  var C = h, k = C._payload, O = C._init;
380
380
  try {
381
- return xe(O(k), g, T);
381
+ return xe(O(k), m, b);
382
382
  } catch {
383
383
  }
384
384
  }
@@ -388,12 +388,12 @@ function ga() {
388
388
  var zt = Object.prototype.hasOwnProperty, vi = {}, Pi = P.ReactDebugCurrentFrame;
389
389
  function be(h) {
390
390
  if (h) {
391
- var g = h._owner, T = xe(h.type, h._source, g ? g.type : null);
392
- Pi.setExtraStackFrame(T);
391
+ var m = h._owner, b = xe(h.type, h._source, m ? m.type : null);
392
+ Pi.setExtraStackFrame(b);
393
393
  } else
394
394
  Pi.setExtraStackFrame(null);
395
395
  }
396
- function jo(h, g, T, C, k) {
396
+ function jo(h, m, b, C, k) {
397
397
  {
398
398
  var O = Function.call.bind(zt);
399
399
  for (var E in h)
@@ -401,14 +401,14 @@ function ga() {
401
401
  var V = void 0;
402
402
  try {
403
403
  if (typeof h[E] != "function") {
404
- var X = Error((C || "React class") + ": " + T + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
404
+ var X = Error((C || "React class") + ": " + b + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
405
405
  throw X.name = "Invariant Violation", X;
406
406
  }
407
- V = h[E](g, E, C, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
407
+ V = h[E](m, E, C, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
408
408
  } catch (B) {
409
409
  V = B;
410
410
  }
411
- V && !(V instanceof Error) && (be(k), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", T, E, typeof V), be(null)), V instanceof Error && !(V.message in vi) && (vi[V.message] = !0, be(k), y("Failed %s type: %s", T, V.message), be(null));
411
+ V && !(V instanceof Error) && (be(k), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", b, E, typeof V), be(null)), V instanceof Error && !(V.message in vi) && (vi[V.message] = !0, be(k), y("Failed %s type: %s", b, V.message), be(null));
412
412
  }
413
413
  }
414
414
  }
@@ -418,8 +418,8 @@ function ga() {
418
418
  }
419
419
  function _o(h) {
420
420
  {
421
- var g = typeof Symbol == "function" && Symbol.toStringTag, T = g && h[Symbol.toStringTag] || h.constructor.name || "Object";
422
- return T;
421
+ var m = typeof Symbol == "function" && Symbol.toStringTag, b = m && h[Symbol.toStringTag] || h.constructor.name || "Object";
422
+ return b;
423
423
  }
424
424
  }
425
425
  function Bo(h) {
@@ -445,56 +445,56 @@ function ga() {
445
445
  Ze = {};
446
446
  function No(h) {
447
447
  if (zt.call(h, "ref")) {
448
- var g = Object.getOwnPropertyDescriptor(h, "ref").get;
449
- if (g && g.isReactWarning)
448
+ var m = Object.getOwnPropertyDescriptor(h, "ref").get;
449
+ if (m && m.isReactWarning)
450
450
  return !1;
451
451
  }
452
452
  return h.ref !== void 0;
453
453
  }
454
454
  function Uo(h) {
455
455
  if (zt.call(h, "key")) {
456
- var g = Object.getOwnPropertyDescriptor(h, "key").get;
457
- if (g && g.isReactWarning)
456
+ var m = Object.getOwnPropertyDescriptor(h, "key").get;
457
+ if (m && m.isReactWarning)
458
458
  return !1;
459
459
  }
460
460
  return h.key !== void 0;
461
461
  }
462
- function Wo(h, g) {
463
- if (typeof h.ref == "string" && Yt.current && g && Yt.current.stateNode !== g) {
464
- var T = Z(Yt.current.type);
465
- Ze[T] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Z(Yt.current.type), h.ref), Ze[T] = !0);
462
+ function Wo(h, m) {
463
+ if (typeof h.ref == "string" && Yt.current && m && Yt.current.stateNode !== m) {
464
+ var b = Z(Yt.current.type);
465
+ Ze[b] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Z(Yt.current.type), h.ref), Ze[b] = !0);
466
466
  }
467
467
  }
468
- function $o(h, g) {
468
+ function $o(h, m) {
469
469
  {
470
- var T = function() {
471
- Ti || (Ti = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", g));
470
+ var b = function() {
471
+ Ti || (Ti = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
472
472
  };
473
- T.isReactWarning = !0, Object.defineProperty(h, "key", {
474
- get: T,
473
+ b.isReactWarning = !0, Object.defineProperty(h, "key", {
474
+ get: b,
475
475
  configurable: !0
476
476
  });
477
477
  }
478
478
  }
479
- function Ko(h, g) {
479
+ function Ko(h, m) {
480
480
  {
481
- var T = function() {
482
- wi || (wi = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", g));
481
+ var b = function() {
482
+ wi || (wi = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
483
483
  };
484
- T.isReactWarning = !0, Object.defineProperty(h, "ref", {
485
- get: T,
484
+ b.isReactWarning = !0, Object.defineProperty(h, "ref", {
485
+ get: b,
486
486
  configurable: !0
487
487
  });
488
488
  }
489
489
  }
490
- var Go = function(h, g, T, C, k, O, E) {
490
+ var Go = function(h, m, b, C, k, O, E) {
491
491
  var V = {
492
492
  // This tag allows us to uniquely identify this as a React Element
493
493
  $$typeof: e,
494
494
  // Built-in properties that belong on the element
495
495
  type: h,
496
- key: g,
497
- ref: T,
496
+ key: m,
497
+ ref: b,
498
498
  props: E,
499
499
  // Record the component responsible for creating this element.
500
500
  _owner: O
@@ -516,12 +516,12 @@ function ga() {
516
516
  value: k
517
517
  }), Object.freeze && (Object.freeze(V.props), Object.freeze(V)), V;
518
518
  };
519
- function Ho(h, g, T, C, k) {
519
+ function Ho(h, m, b, C, k) {
520
520
  {
521
521
  var O, E = {}, V = null, X = null;
522
- T !== void 0 && (bi(T), V = "" + T), Uo(g) && (bi(g.key), V = "" + g.key), No(g) && (X = g.ref, Wo(g, k));
523
- for (O in g)
524
- zt.call(g, O) && !Io.hasOwnProperty(O) && (E[O] = g[O]);
522
+ b !== void 0 && (bi(b), V = "" + b), Uo(m) && (bi(m.key), V = "" + m.key), No(m) && (X = m.ref, Wo(m, k));
523
+ for (O in m)
524
+ zt.call(m, O) && !Io.hasOwnProperty(O) && (E[O] = m[O]);
525
525
  if (h && h.defaultProps) {
526
526
  var B = h.defaultProps;
527
527
  for (O in B)
@@ -537,8 +537,8 @@ function ga() {
537
537
  var Je = P.ReactCurrentOwner, Si = P.ReactDebugCurrentFrame;
538
538
  function jt(h) {
539
539
  if (h) {
540
- var g = h._owner, T = xe(h.type, h._source, g ? g.type : null);
541
- Si.setExtraStackFrame(T);
540
+ var m = h._owner, b = xe(h.type, h._source, m ? m.type : null);
541
+ Si.setExtraStackFrame(b);
542
542
  } else
543
543
  Si.setExtraStackFrame(null);
544
544
  }
@@ -562,10 +562,10 @@ Check the render method of \`` + h + "`.";
562
562
  function zo(h) {
563
563
  {
564
564
  if (h !== void 0) {
565
- var g = h.fileName.replace(/^.*[\\\/]/, ""), T = h.lineNumber;
565
+ var m = h.fileName.replace(/^.*[\\\/]/, ""), b = h.lineNumber;
566
566
  return `
567
567
 
568
- Check your code at ` + g + ":" + T + ".";
568
+ Check your code at ` + m + ":" + b + ".";
569
569
  }
570
570
  return "";
571
571
  }
@@ -573,77 +573,77 @@ Check your code at ` + g + ":" + T + ".";
573
573
  var Ai = {};
574
574
  function Yo(h) {
575
575
  {
576
- var g = Ci();
577
- if (!g) {
578
- var T = typeof h == "string" ? h : h.displayName || h.name;
579
- T && (g = `
576
+ var m = Ci();
577
+ if (!m) {
578
+ var b = typeof h == "string" ? h : h.displayName || h.name;
579
+ b && (m = `
580
580
 
581
- Check the top-level render call using <` + T + ">.");
581
+ Check the top-level render call using <` + b + ">.");
582
582
  }
583
- return g;
583
+ return m;
584
584
  }
585
585
  }
586
- function Ri(h, g) {
586
+ function Ri(h, m) {
587
587
  {
588
588
  if (!h._store || h._store.validated || h.key != null)
589
589
  return;
590
590
  h._store.validated = !0;
591
- var T = Yo(g);
592
- if (Ai[T])
591
+ var b = Yo(m);
592
+ if (Ai[b])
593
593
  return;
594
- Ai[T] = !0;
594
+ Ai[b] = !0;
595
595
  var C = "";
596
- h && h._owner && h._owner !== Je.current && (C = " It was passed a child from " + Z(h._owner.type) + "."), jt(h), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, C), jt(null);
596
+ h && h._owner && h._owner !== Je.current && (C = " It was passed a child from " + Z(h._owner.type) + "."), jt(h), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, C), jt(null);
597
597
  }
598
598
  }
599
- function Vi(h, g) {
599
+ function Vi(h, m) {
600
600
  {
601
601
  if (typeof h != "object")
602
602
  return;
603
603
  if (qe(h))
604
- for (var T = 0; T < h.length; T++) {
605
- var C = h[T];
606
- tn(C) && Ri(C, g);
604
+ for (var b = 0; b < h.length; b++) {
605
+ var C = h[b];
606
+ tn(C) && Ri(C, m);
607
607
  }
608
608
  else if (tn(h))
609
609
  h._store && (h._store.validated = !0);
610
610
  else if (h) {
611
- var k = b(h);
611
+ var k = T(h);
612
612
  if (typeof k == "function" && k !== h.entries)
613
613
  for (var O = k.call(h), E; !(E = O.next()).done; )
614
- tn(E.value) && Ri(E.value, g);
614
+ tn(E.value) && Ri(E.value, m);
615
615
  }
616
616
  }
617
617
  }
618
618
  function Xo(h) {
619
619
  {
620
- var g = h.type;
621
- if (g == null || typeof g == "string")
620
+ var m = h.type;
621
+ if (m == null || typeof m == "string")
622
622
  return;
623
- var T;
624
- if (typeof g == "function")
625
- T = g.propTypes;
626
- else if (typeof g == "object" && (g.$$typeof === l || // Note: Memo only checks outer props here.
623
+ var b;
624
+ if (typeof m == "function")
625
+ b = m.propTypes;
626
+ else if (typeof m == "object" && (m.$$typeof === l || // Note: Memo only checks outer props here.
627
627
  // Inner props are checked in the reconciler.
628
- g.$$typeof === f))
629
- T = g.propTypes;
628
+ m.$$typeof === f))
629
+ b = m.propTypes;
630
630
  else
631
631
  return;
632
- if (T) {
633
- var C = Z(g);
634
- jo(T, h.props, "prop", C, h);
635
- } else if (g.PropTypes !== void 0 && !Qe) {
632
+ if (b) {
633
+ var C = Z(m);
634
+ jo(b, h.props, "prop", C, h);
635
+ } else if (m.PropTypes !== void 0 && !Qe) {
636
636
  Qe = !0;
637
- var k = Z(g);
637
+ var k = Z(m);
638
638
  y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
639
639
  }
640
- typeof g.getDefaultProps == "function" && !g.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
640
+ typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
641
641
  }
642
642
  }
643
643
  function qo(h) {
644
644
  {
645
- for (var g = Object.keys(h.props), T = 0; T < g.length; T++) {
646
- var C = g[T];
645
+ for (var m = Object.keys(h.props), b = 0; b < m.length; b++) {
646
+ var C = m[b];
647
647
  if (C !== "children" && C !== "key") {
648
648
  jt(h), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), jt(null);
649
649
  break;
@@ -653,7 +653,7 @@ Check the top-level render call using <` + T + ">.");
653
653
  }
654
654
  }
655
655
  var Ei = {};
656
- function Di(h, g, T, C, k, O) {
656
+ function Di(h, m, b, C, k, O) {
657
657
  {
658
658
  var E = H(h);
659
659
  if (!E) {
@@ -664,11 +664,11 @@ Check the top-level render call using <` + T + ">.");
664
664
  var B;
665
665
  h === null ? B = "null" : qe(h) ? B = "array" : h !== void 0 && h.$$typeof === e ? (B = "<" + (Z(h.type) || "Unknown") + " />", V = " Did you accidentally export a JSX literal instead of a component?") : B = typeof h, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", B, V);
666
666
  }
667
- var N = Ho(h, g, T, k, O);
667
+ var N = Ho(h, m, b, k, O);
668
668
  if (N == null)
669
669
  return N;
670
670
  if (E) {
671
- var tt = g.children;
671
+ var tt = m.children;
672
672
  if (tt !== void 0)
673
673
  if (C)
674
674
  if (qe(tt)) {
@@ -680,8 +680,8 @@ Check the top-level render call using <` + T + ">.");
680
680
  else
681
681
  Vi(tt, h);
682
682
  }
683
- if (zt.call(g, "key")) {
684
- var St = Z(h), J = Object.keys(g).filter(function(na) {
683
+ if (zt.call(m, "key")) {
684
+ var St = Z(h), J = Object.keys(m).filter(function(na) {
685
685
  return na !== "key";
686
686
  }), en = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
687
687
  if (!Ei[St + en]) {
@@ -697,11 +697,11 @@ React keys must be passed directly to JSX without using spread:
697
697
  return h === i ? qo(N) : Xo(N), N;
698
698
  }
699
699
  }
700
- function Zo(h, g, T) {
701
- return Di(h, g, T, !0);
700
+ function Zo(h, m, b) {
701
+ return Di(h, m, b, !0);
702
702
  }
703
- function Jo(h, g, T) {
704
- return Di(h, g, T, !1);
703
+ function Jo(h, m, b) {
704
+ return Di(h, m, b, !1);
705
705
  }
706
706
  var Qo = Jo, ta = Zo;
707
707
  qt.Fragment = i, qt.jsx = Qo, qt.jsxs = ta;
@@ -805,12 +805,12 @@ function rr(t, e) {
805
805
  }, o = () => n = !0, r = Te.reduce((P, y) => (P[y] = ba(o), P), {}), { read: a, resolveKeyframes: l, update: c, preRender: u, render: f, postRender: d } = r, p = () => {
806
806
  const P = performance.now();
807
807
  n = !1, s.delta = i ? 1e3 / 60 : Math.max(Math.min(P - s.timestamp, Ta), 1), s.timestamp = P, s.isProcessing = !0, a.process(s), l.process(s), c.process(s), u.process(s), f.process(s), d.process(s), s.isProcessing = !1, n && e && (i = !1, t(p));
808
- }, m = () => {
808
+ }, g = () => {
809
809
  n = !0, i = !0, s.isProcessing || t(p);
810
810
  };
811
811
  return { schedule: Te.reduce((P, y) => {
812
- const v = r[y];
813
- return P[y] = (w, A = !1, j = !1) => (n || m(), v.schedule(w, A, j)), P;
812
+ const x = r[y];
813
+ return P[y] = (w, A = !1, j = !1) => (n || g(), x.schedule(w, A, j)), P;
814
814
  }, {}), cancel: (P) => {
815
815
  for (let y = 0; y < Te.length; y++)
816
816
  r[Te[y]].cancel(P);
@@ -971,8 +971,8 @@ function Ma({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
971
971
  }, { isStatic: f } = u, d = Va(a), p = i(a, f);
972
972
  if (!f && _n) {
973
973
  La(u, t);
974
- const m = Oa(u);
975
- c = m.MeasureLayout, d.visualElement = wa(s, p, u, e, m.ProjectionNode);
974
+ const g = Oa(u);
975
+ c = g.MeasureLayout, d.visualElement = wa(s, p, u, e, g.ProjectionNode);
976
976
  }
977
977
  return _.jsxs(Be.Provider, { value: d, children: [c && d.visualElement ? _.jsx(c, { visualElement: d.visualElement, ...u }) : null, n(s, a, Aa(p, d.visualElement, l), p, f, d.visualElement)] });
978
978
  }
@@ -1343,8 +1343,8 @@ function Yn(t, {
1343
1343
  return;
1344
1344
  }
1345
1345
  t.attrs = t.style, t.style = {};
1346
- const { attrs: d, style: p, dimensions: m } = t;
1347
- d.transform && (m && (p.transform = d.transform), delete d.transform), m && (s !== void 0 || o !== void 0 || p.transform) && (p.transformOrigin = tl(m, s !== void 0 ? s : 0.5, o !== void 0 ? o : 0.5)), e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), i !== void 0 && (d.scale = i), r !== void 0 && il(d, r, a, l, !1);
1346
+ const { attrs: d, style: p, dimensions: g } = t;
1347
+ d.transform && (g && (p.transform = d.transform), delete d.transform), g && (s !== void 0 || o !== void 0 || p.transform) && (p.transformOrigin = tl(g, s !== void 0 ? s : 0.5, o !== void 0 ? o : 0.5)), e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), i !== void 0 && (d.scale = i), r !== void 0 && il(d, r, a, l, !1);
1348
1348
  }
1349
1349
  const mr = () => ({
1350
1350
  ...zn(),
@@ -1500,27 +1500,27 @@ function Ni(t, e, n) {
1500
1500
  function ul(t, e, n, i, s) {
1501
1501
  var o;
1502
1502
  const r = {}, a = [], l = i && ((o = t.style) === null || o === void 0 ? void 0 : o.willChange) === void 0, c = s(t, {});
1503
- for (const b in c)
1504
- r[b] = Re(c[b]);
1503
+ for (const T in c)
1504
+ r[T] = Re(c[T]);
1505
1505
  let { initial: u, animate: f } = t;
1506
1506
  const d = Ue(t), p = lr(t);
1507
1507
  e && p && !d && t.inherit !== !1 && (u === void 0 && (u = e.initial), f === void 0 && (f = e.animate));
1508
- let m = n ? n.initial === !1 : !1;
1509
- m = m || u === !1;
1510
- const x = m ? f : u;
1511
- return x && typeof x != "boolean" && !ae(x) && Ni(t, x, (b, P) => {
1512
- for (const y in b) {
1513
- let v = b[y];
1514
- if (Array.isArray(v)) {
1515
- const w = m ? v.length - 1 : 0;
1516
- v = v[w];
1508
+ let g = n ? n.initial === !1 : !1;
1509
+ g = g || u === !1;
1510
+ const v = g ? f : u;
1511
+ return v && typeof v != "boolean" && !ae(v) && Ni(t, v, (T, P) => {
1512
+ for (const y in T) {
1513
+ let x = T[y];
1514
+ if (Array.isArray(x)) {
1515
+ const w = g ? x.length - 1 : 0;
1516
+ x = x[w];
1517
1517
  }
1518
- v !== null && (r[y] = v);
1518
+ x !== null && (r[y] = x);
1519
1519
  }
1520
1520
  for (const y in P)
1521
1521
  r[y] = P[y];
1522
- }), l && (f && u !== !1 && !ae(f) && Ni(t, f, (b) => {
1523
- for (const P in b)
1522
+ }), l && (f && u !== !1 && !ae(f) && Ni(t, f, (T) => {
1523
+ for (const P in T)
1524
1524
  cl(a, P);
1525
1525
  }), a.length && (r.willChange = a.join(","))), r;
1526
1526
  }
@@ -2271,11 +2271,11 @@ function fc({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1
2271
2271
  Gt(t <= ht(qi), "Spring duration must be 10 seconds or less");
2272
2272
  let r = 1 - e;
2273
2273
  r = Pt(cc, uc, r), t = Pt(lc, qi, dt(t)), r < 1 ? (s = (c) => {
2274
- const u = c * r, f = u * t, d = u - n, p = Sn(c, r), m = Math.exp(-f);
2275
- return an - d / p * m;
2274
+ const u = c * r, f = u * t, d = u - n, p = Sn(c, r), g = Math.exp(-f);
2275
+ return an - d / p * g;
2276
2276
  }, o = (c) => {
2277
- const f = c * r * t, d = f * n + n, p = Math.pow(r, 2) * Math.pow(c, 2) * t, m = Math.exp(-f), x = Sn(Math.pow(c, 2), r);
2278
- return (-s(c) + an > 0 ? -1 : 1) * ((d - p) * m) / x;
2277
+ const f = c * r * t, d = f * n + n, p = Math.pow(r, 2) * Math.pow(c, 2) * t, g = Math.exp(-f), v = Sn(Math.pow(c, 2), r);
2278
+ return (-s(c) + an > 0 ? -1 : 1) * ((d - p) * g) / v;
2279
2279
  }) : (s = (c) => {
2280
2280
  const u = Math.exp(-c * t), f = (c - n) * t + 1;
2281
2281
  return -an + u * f;
@@ -2336,33 +2336,33 @@ function zr({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
2336
2336
  const s = t[0], o = t[t.length - 1], r = { done: !1, value: s }, { stiffness: a, damping: l, mass: c, duration: u, velocity: f, isResolvedFromDuration: d } = gc({
2337
2337
  ...i,
2338
2338
  velocity: -dt(i.velocity || 0)
2339
- }), p = f || 0, m = l / (2 * Math.sqrt(a * c)), x = o - s, b = dt(Math.sqrt(a / c)), P = Math.abs(x) < 5;
2339
+ }), p = f || 0, g = l / (2 * Math.sqrt(a * c)), v = o - s, T = dt(Math.sqrt(a / c)), P = Math.abs(v) < 5;
2340
2340
  n || (n = P ? 0.01 : 2), e || (e = P ? 5e-3 : 0.5);
2341
2341
  let y;
2342
- if (m < 1) {
2343
- const v = Sn(b, m);
2342
+ if (g < 1) {
2343
+ const x = Sn(T, g);
2344
2344
  y = (w) => {
2345
- const A = Math.exp(-m * b * w);
2346
- return o - A * ((p + m * b * x) / v * Math.sin(v * w) + x * Math.cos(v * w));
2345
+ const A = Math.exp(-g * T * w);
2346
+ return o - A * ((p + g * T * v) / x * Math.sin(x * w) + v * Math.cos(x * w));
2347
2347
  };
2348
- } else if (m === 1)
2349
- y = (v) => o - Math.exp(-b * v) * (x + (p + b * x) * v);
2348
+ } else if (g === 1)
2349
+ y = (x) => o - Math.exp(-T * x) * (v + (p + T * v) * x);
2350
2350
  else {
2351
- const v = b * Math.sqrt(m * m - 1);
2351
+ const x = T * Math.sqrt(g * g - 1);
2352
2352
  y = (w) => {
2353
- const A = Math.exp(-m * b * w), j = Math.min(v * w, 300);
2354
- return o - A * ((p + m * b * x) * Math.sinh(j) + v * x * Math.cosh(j)) / v;
2353
+ const A = Math.exp(-g * T * w), j = Math.min(x * w, 300);
2354
+ return o - A * ((p + g * T * v) * Math.sinh(j) + x * v * Math.cosh(j)) / x;
2355
2355
  };
2356
2356
  }
2357
2357
  return {
2358
2358
  calculatedDuration: d && u || null,
2359
- next: (v) => {
2360
- const w = y(v);
2359
+ next: (x) => {
2360
+ const w = y(x);
2361
2361
  if (d)
2362
- r.done = v >= u;
2362
+ r.done = x >= u;
2363
2363
  else {
2364
2364
  let A = p;
2365
- v !== 0 && (m < 1 ? A = Hr(y, v, w) : A = 0);
2365
+ x !== 0 && (g < 1 ? A = Hr(y, x, w) : A = 0);
2366
2366
  const j = Math.abs(A) <= n, q = Math.abs(o - w) <= e;
2367
2367
  r.done = j && q;
2368
2368
  }
@@ -2374,19 +2374,19 @@ function Ji({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
2374
2374
  const f = t[0], d = {
2375
2375
  done: !1,
2376
2376
  value: f
2377
- }, p = (R) => a !== void 0 && R < a || l !== void 0 && R > l, m = (R) => a === void 0 ? l : l === void 0 || Math.abs(a - R) < Math.abs(l - R) ? a : l;
2378
- let x = n * e;
2379
- const b = f + x, P = r === void 0 ? b : r(b);
2380
- P !== b && (x = P - f);
2381
- const y = (R) => -x * Math.exp(-R / i), v = (R) => P + y(R), w = (R) => {
2382
- const W = y(R), H = v(R);
2377
+ }, p = (R) => a !== void 0 && R < a || l !== void 0 && R > l, g = (R) => a === void 0 ? l : l === void 0 || Math.abs(a - R) < Math.abs(l - R) ? a : l;
2378
+ let v = n * e;
2379
+ const T = f + v, P = r === void 0 ? T : r(T);
2380
+ P !== T && (v = P - f);
2381
+ const y = (R) => -v * Math.exp(-R / i), x = (R) => P + y(R), w = (R) => {
2382
+ const W = y(R), H = x(R);
2383
2383
  d.done = Math.abs(W) <= c, d.value = d.done ? P : H;
2384
2384
  };
2385
2385
  let A, j;
2386
2386
  const q = (R) => {
2387
2387
  p(d.value) && (A = R, j = zr({
2388
- keyframes: [d.value, m(d.value)],
2389
- velocity: Hr(v, R, d.value),
2388
+ keyframes: [d.value, g(d.value)],
2389
+ velocity: Hr(x, R, d.value),
2390
2390
  // TODO: This should be passing * 1000
2391
2391
  damping: s,
2392
2392
  stiffness: o,
@@ -2658,22 +2658,22 @@ class oi extends Kr {
2658
2658
  const { finalKeyframe: s, generator: o, mirroredGenerator: r, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: c, totalDuration: u, resolvedDuration: f } = i;
2659
2659
  if (this.startTime === null)
2660
2660
  return o.next(0);
2661
- const { delay: d, repeat: p, repeatType: m, repeatDelay: x, onUpdate: b } = this.options;
2661
+ const { delay: d, repeat: p, repeatType: g, repeatDelay: v, onUpdate: T } = this.options;
2662
2662
  this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - u / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
2663
2663
  const P = this.currentTime - d * (this.speed >= 0 ? 1 : -1), y = this.speed >= 0 ? P < 0 : P > u;
2664
2664
  this.currentTime = Math.max(P, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = u);
2665
- let v = this.currentTime, w = o;
2665
+ let x = this.currentTime, w = o;
2666
2666
  if (p) {
2667
2667
  const R = Math.min(this.currentTime, u) / f;
2668
2668
  let W = Math.floor(R), H = R % 1;
2669
- !H && R >= 1 && (H = 1), H === 1 && W--, W = Math.min(W, p + 1), !!(W % 2) && (m === "reverse" ? (H = 1 - H, x && (H -= x / f)) : m === "mirror" && (w = r)), v = Pt(0, 1, H) * f;
2669
+ !H && R >= 1 && (H = 1), H === 1 && W--, W = Math.min(W, p + 1), !!(W % 2) && (g === "reverse" ? (H = 1 - H, v && (H -= v / f)) : g === "mirror" && (w = r)), x = Pt(0, 1, H) * f;
2670
2670
  }
2671
- const A = y ? { done: !1, value: l[0] } : w.next(v);
2671
+ const A = y ? { done: !1, value: l[0] } : w.next(x);
2672
2672
  a && (A.value = a(A.value));
2673
2673
  let { done: j } = A;
2674
2674
  !y && c !== null && (j = this.speed >= 0 ? this.currentTime >= u : this.currentTime <= 0);
2675
2675
  const q = this.holdTime === null && (this.state === "finished" || this.state === "running" && j);
2676
- return q && s !== void 0 && (A.value = He(l, this.options, s)), b && b(A.value), q && this.finish(), A;
2676
+ return q && s !== void 0 && (A.value = He(l, this.options, s)), T && T(A.value), q && this.finish(), A;
2677
2677
  }
2678
2678
  get duration() {
2679
2679
  const { resolved: e } = this;
@@ -2804,8 +2804,8 @@ class ss extends Kr {
2804
2804
  if (!(!((i = l.owner) === null || i === void 0) && i.current))
2805
2805
  return !1;
2806
2806
  if (Yc(this.options)) {
2807
- const { onComplete: f, onUpdate: d, motionValue: p, ...m } = this.options, x = Xc(e, m);
2808
- e = x.keyframes, e.length === 1 && (e[1] = e[0]), s = x.duration, o = x.times, r = x.ease, a = "keyframes";
2807
+ const { onComplete: f, onUpdate: d, motionValue: p, ...g } = this.options, v = Xc(e, g);
2808
+ e = v.keyframes, e.length === 1 && (e[1] = e[0]), s = v.duration, o = v.times, r = v.ease, a = "keyframes";
2809
2809
  }
2810
2810
  const u = Gc(l.owner.current, c, e, { ...this.options, duration: s, times: o, ease: r });
2811
2811
  return u.startTime = vt.now(), this.pendingTimeline ? (u.timeline = this.pendingTimeline, this.pendingTimeline = void 0) : u.onfinish = () => {
@@ -2913,8 +2913,8 @@ class ss extends Kr {
2913
2913
  ease: r,
2914
2914
  times: a,
2915
2915
  isGenerator: !0
2916
- }), m = ht(this.time);
2917
- c.setWithVelocity(p.sample(m - Fe).value, p.sample(m).value, Fe);
2916
+ }), g = ht(this.time);
2917
+ c.setWithVelocity(p.sample(g - Fe).value, p.sample(g).value, Fe);
2918
2918
  }
2919
2919
  const { onStop: l } = this.options;
2920
2920
  l && l(), this.cancel();
@@ -3335,22 +3335,22 @@ function ao(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
3335
3335
  const d = t.getValue(f, (o = t.latestValues[f]) !== null && o !== void 0 ? o : null), p = l[f];
3336
3336
  if (p === void 0 || u && su(u, f))
3337
3337
  continue;
3338
- const m = {
3338
+ const g = {
3339
3339
  delay: n,
3340
3340
  elapsed: 0,
3341
3341
  ...Qn(r || {}, f)
3342
3342
  };
3343
- let x = !1;
3343
+ let v = !1;
3344
3344
  if (window.HandoffAppearAnimations) {
3345
3345
  const P = oo(t);
3346
3346
  if (P) {
3347
3347
  const y = window.HandoffAppearAnimations(P, f, d, L);
3348
- y !== null && (m.elapsed = y, x = !0);
3348
+ y !== null && (g.elapsed = y, v = !0);
3349
3349
  }
3350
3350
  }
3351
- d.start(li(f, d, p, t.shouldReduceMotion && bt.has(f) ? { type: !1 } : m, t, x, An(t, f)));
3352
- const b = d.animation;
3353
- b && c.push(b);
3351
+ d.start(li(f, d, p, t.shouldReduceMotion && bt.has(f) ? { type: !1 } : g, t, v, An(t, f)));
3352
+ const T = d.animation;
3353
+ T && c.push(T);
3354
3354
  }
3355
3355
  return a && Promise.all(c).then(() => {
3356
3356
  L.update(() => {
@@ -3411,8 +3411,8 @@ function fu(t) {
3411
3411
  var f;
3412
3412
  const d = Ge(t, u, l === "exit" ? (f = t.presenceContext) === null || f === void 0 ? void 0 : f.custom : void 0);
3413
3413
  if (d) {
3414
- const { transition: p, transitionEnd: m, ...x } = d;
3415
- c = { ...c, ...x, ...m };
3414
+ const { transition: p, transitionEnd: g, ...v } = d;
3415
+ c = { ...c, ...v, ...g };
3416
3416
  }
3417
3417
  return c;
3418
3418
  };
@@ -3421,20 +3421,20 @@ function fu(t) {
3421
3421
  }
3422
3422
  function r(l) {
3423
3423
  const c = t.getProps(), u = t.getVariantContext(!0) || {}, f = [], d = /* @__PURE__ */ new Set();
3424
- let p = {}, m = 1 / 0;
3425
- for (let b = 0; b < cu; b++) {
3426
- const P = lu[b], y = n[P], v = c[P] !== void 0 ? c[P] : u[P], w = oe(v), A = P === l ? y.isActive : null;
3427
- A === !1 && (m = b);
3428
- let j = v === u[P] && v !== c[P] && w;
3424
+ let p = {}, g = 1 / 0;
3425
+ for (let T = 0; T < cu; T++) {
3426
+ const P = lu[T], y = n[P], x = c[P] !== void 0 ? c[P] : u[P], w = oe(x), A = P === l ? y.isActive : null;
3427
+ A === !1 && (g = T);
3428
+ let j = x === u[P] && x !== c[P] && w;
3429
3429
  if (j && i && t.manuallyAnimateOnMount && (j = !1), y.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
3430
3430
  !y.isActive && A === null || // If we didn't and don't have any defined prop for this animation type
3431
- !v && !y.prevProp || // Or if the prop doesn't define an animation
3432
- ae(v) || typeof v == "boolean")
3431
+ !x && !y.prevProp || // Or if the prop doesn't define an animation
3432
+ ae(x) || typeof x == "boolean")
3433
3433
  continue;
3434
- let R = hu(y.prevProp, v) || // If we're making this variant active, we want to always make it active
3434
+ let R = hu(y.prevProp, x) || // If we're making this variant active, we want to always make it active
3435
3435
  P === l && y.isActive && !j && w || // If we removed a higher-priority variant (i is in reverse order)
3436
- b > m && w, W = !1;
3437
- const H = Array.isArray(v) ? v : [v];
3436
+ T > g && w, W = !1;
3437
+ const H = Array.isArray(x) ? x : [x];
3438
3438
  let rt = H.reduce(s(P), {});
3439
3439
  A === !1 && (rt = {});
3440
3440
  const { prevResolvedValues: wt = {} } = y, Z = {
@@ -3452,20 +3452,20 @@ function fu(t) {
3452
3452
  let Ot = !1;
3453
3453
  vn(U) && vn(Lt) ? Ot = !Vr(U, Lt) : Ot = U !== Lt, Ot ? U != null ? M(D) : d.add(D) : U !== void 0 && d.has(D) ? M(D) : y.protectedKeys[D] = !0;
3454
3454
  }
3455
- y.prevProp = v, y.prevResolvedValues = rt, y.isActive && (p = { ...p, ...rt }), i && t.blockInitialAnimation && (R = !1), R && (!j || W) && f.push(...H.map((D) => ({
3455
+ y.prevProp = x, y.prevResolvedValues = rt, y.isActive && (p = { ...p, ...rt }), i && t.blockInitialAnimation && (R = !1), R && (!j || W) && f.push(...H.map((D) => ({
3456
3456
  animation: D,
3457
3457
  options: { type: P }
3458
3458
  })));
3459
3459
  }
3460
3460
  if (d.size) {
3461
- const b = {};
3461
+ const T = {};
3462
3462
  d.forEach((P) => {
3463
- const y = t.getBaseTarget(P), v = t.getValue(P);
3464
- v && (v.liveStyle = !0), b[P] = y ?? null;
3465
- }), f.push({ animation: b });
3463
+ const y = t.getBaseTarget(P), x = t.getValue(P);
3464
+ x && (x.liveStyle = !0), T[P] = y ?? null;
3465
+ }), f.push({ animation: T });
3466
3466
  }
3467
- let x = !!f.length;
3468
- return i && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (x = !1), i = !1, x ? e(f) : Promise.resolve();
3467
+ let v = !!f.length;
3468
+ return i && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (v = !1), i = !1, v ? e(f) : Promise.resolve();
3469
3469
  }
3470
3470
  function a(l, c) {
3471
3471
  var u;
@@ -3581,19 +3581,19 @@ class lo {
3581
3581
  const f = fn(this.lastMoveEventInfo, this.history), d = this.startEvent !== null, p = yu(f.offset, { x: 0, y: 0 }) >= 3;
3582
3582
  if (!d && !p)
3583
3583
  return;
3584
- const { point: m } = f, { timestamp: x } = $;
3585
- this.history.push({ ...m, timestamp: x });
3586
- const { onStart: b, onMove: P } = this.handlers;
3587
- d || (b && b(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), P && P(this.lastMoveEvent, f);
3584
+ const { point: g } = f, { timestamp: v } = $;
3585
+ this.history.push({ ...g, timestamp: v });
3586
+ const { onStart: T, onMove: P } = this.handlers;
3587
+ d || (T && T(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), P && P(this.lastMoveEvent, f);
3588
3588
  }, this.handlePointerMove = (f, d) => {
3589
3589
  this.lastMoveEvent = f, this.lastMoveEventInfo = un(d, this.transformPagePoint), L.update(this.updatePoint, !0);
3590
3590
  }, this.handlePointerUp = (f, d) => {
3591
3591
  this.end();
3592
- const { onEnd: p, onSessionEnd: m, resumeAnimation: x } = this.handlers;
3593
- if (this.dragSnapToOrigin && x && x(), !(this.lastMoveEvent && this.lastMoveEventInfo))
3592
+ const { onEnd: p, onSessionEnd: g, resumeAnimation: v } = this.handlers;
3593
+ if (this.dragSnapToOrigin && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo))
3594
3594
  return;
3595
- const b = fn(f.type === "pointercancel" ? this.lastMoveEventInfo : un(d, this.transformPagePoint), this.history);
3596
- this.startEvent && p && p(f, b), m && m(f, b);
3595
+ const T = fn(f.type === "pointercancel" ? this.lastMoveEventInfo : un(d, this.transformPagePoint), this.history);
3596
+ this.startEvent && p && p(f, T), g && g(f, T);
3597
3597
  }, !wr(e))
3598
3598
  return;
3599
3599
  this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = i, this.contextWindow = s || window;
@@ -3833,32 +3833,32 @@ class _u {
3833
3833
  f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(Ke(u, "page").point);
3834
3834
  }, o = (u, f) => {
3835
3835
  var d;
3836
- const { drag: p, dragPropagation: m, onDragStart: x } = this.getProps();
3837
- if (p && !m && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = Cr(p), !this.openGlobalLock))
3836
+ const { drag: p, dragPropagation: g, onDragStart: v } = this.getProps();
3837
+ if (p && !g && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = Cr(p), !this.openGlobalLock))
3838
3838
  return;
3839
3839
  this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), nt((P) => {
3840
3840
  let y = this.getAxisMotionValue(P).get() || 0;
3841
3841
  if (ot.test(y)) {
3842
- const { projection: v } = this.visualElement;
3843
- if (v && v.layout) {
3844
- const w = v.layout.layoutBox[P];
3842
+ const { projection: x } = this.visualElement;
3843
+ if (x && x.layout) {
3844
+ const w = x.layout.layoutBox[P];
3845
3845
  w && (y = Q(w) * (parseFloat(y) / 100));
3846
3846
  }
3847
3847
  }
3848
3848
  this.originPoint[P] = y;
3849
- }), x && L.postRender(() => x(u, f)), (d = this.removeWillChange) === null || d === void 0 || d.call(this), this.removeWillChange = An(this.visualElement, "transform");
3850
- const { animationState: b } = this.visualElement;
3851
- b && b.setActive("whileDrag", !0);
3849
+ }), v && L.postRender(() => v(u, f)), (d = this.removeWillChange) === null || d === void 0 || d.call(this), this.removeWillChange = An(this.visualElement, "transform");
3850
+ const { animationState: T } = this.visualElement;
3851
+ T && T.setActive("whileDrag", !0);
3852
3852
  }, r = (u, f) => {
3853
- const { dragPropagation: d, dragDirectionLock: p, onDirectionLock: m, onDrag: x } = this.getProps();
3853
+ const { dragPropagation: d, dragDirectionLock: p, onDirectionLock: g, onDrag: v } = this.getProps();
3854
3854
  if (!d && !this.openGlobalLock)
3855
3855
  return;
3856
- const { offset: b } = f;
3856
+ const { offset: T } = f;
3857
3857
  if (p && this.currentDirection === null) {
3858
- this.currentDirection = Bu(b), this.currentDirection !== null && m && m(this.currentDirection);
3858
+ this.currentDirection = Bu(T), this.currentDirection !== null && g && g(this.currentDirection);
3859
3859
  return;
3860
3860
  }
3861
- this.updateAxis("x", f.point, b), this.updateAxis("y", f.point, b), this.visualElement.render(), x && x(u, f);
3861
+ this.updateAxis("x", f.point, T), this.updateAxis("y", f.point, T), this.visualElement.render(), v && v(u, f);
3862
3862
  }, a = (u, f) => this.stop(u, f), l = () => nt((u) => {
3863
3863
  var f;
3864
3864
  return this.getAnimationState(u) === "paused" && ((f = this.getAxisMotionValue(u).animation) === null || f === void 0 ? void 0 : f.play());
@@ -3931,7 +3931,7 @@ class _u {
3931
3931
  return;
3932
3932
  let f = l && l[u] || {};
3933
3933
  r && (f = { min: 0, max: 0 });
3934
- const d = s ? 200 : 1e6, p = s ? 40 : 1e7, m = {
3934
+ const d = s ? 200 : 1e6, p = s ? 40 : 1e7, g = {
3935
3935
  type: "inertia",
3936
3936
  velocity: i ? e[u] : 0,
3937
3937
  bounceStiffness: d,
@@ -3942,7 +3942,7 @@ class _u {
3942
3942
  ...o,
3943
3943
  ...f
3944
3944
  };
3945
- return this.startAxisValueAnimation(u, m);
3945
+ return this.startAxisValueAnimation(u, g);
3946
3946
  });
3947
3947
  return Promise.all(c).then(a);
3948
3948
  }
@@ -4338,8 +4338,8 @@ function tf(t, e, n) {
4338
4338
  let i = "";
4339
4339
  const s = t.x.translate / e.x, o = t.y.translate / e.y, r = (n == null ? void 0 : n.z) || 0;
4340
4340
  if ((s || o || r) && (i = `translate3d(${s}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (i += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
4341
- const { transformPerspective: c, rotate: u, rotateX: f, rotateY: d, skewX: p, skewY: m } = n;
4342
- c && (i = `perspective(${c}px) ${i}`), u && (i += `rotate(${u}deg) `), f && (i += `rotateX(${f}deg) `), d && (i += `rotateY(${d}deg) `), p && (i += `skewX(${p}deg) `), m && (i += `skewY(${m}deg) `);
4341
+ const { transformPerspective: c, rotate: u, rotateX: f, rotateY: d, skewX: p, skewY: g } = n;
4342
+ c && (i = `perspective(${c}px) ${i}`), u && (i += `rotate(${u}deg) `), f && (i += `rotateX(${f}deg) `), d && (i += `rotateY(${d}deg) `), p && (i += `skewX(${p}deg) `), g && (i += `skewY(${g}deg) `);
4343
4343
  }
4344
4344
  const a = t.x.scale * e.x, l = t.y.scale * e.y;
4345
4345
  return (a !== 1 || l !== 1) && (i += `scale(${a}, ${l})`), i || "none";
@@ -4427,23 +4427,23 @@ function So({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4427
4427
  this.root.updateBlockedByResize = !0, f && f(), f = sf(d, 250), Ee.hasAnimatedSinceResize && (Ee.hasAnimatedSinceResize = !1, this.nodes.forEach(Us));
4428
4428
  });
4429
4429
  }
4430
- l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: f, hasLayoutChanged: d, hasRelativeTargetChanged: p, layout: m }) => {
4430
+ l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: f, hasLayoutChanged: d, hasRelativeTargetChanged: p, layout: g }) => {
4431
4431
  if (this.isTreeAnimationBlocked()) {
4432
4432
  this.target = void 0, this.relativeTarget = void 0;
4433
4433
  return;
4434
4434
  }
4435
- const x = this.options.transition || u.getDefaultTransition() || Tf, { onLayoutAnimationStart: b, onLayoutAnimationComplete: P } = u.getProps(), y = !this.targetLayout || !To(this.targetLayout, m) || p, v = !d && p;
4436
- if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || v || d && (y || !this.currentAnimation)) {
4437
- this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(f, v);
4435
+ const v = this.options.transition || u.getDefaultTransition() || Tf, { onLayoutAnimationStart: T, onLayoutAnimationComplete: P } = u.getProps(), y = !this.targetLayout || !To(this.targetLayout, g) || p, x = !d && p;
4436
+ if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || x || d && (y || !this.currentAnimation)) {
4437
+ this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(f, x);
4438
4438
  const w = {
4439
- ...Qn(x, "layout"),
4440
- onPlay: b,
4439
+ ...Qn(v, "layout"),
4440
+ onPlay: T,
4441
4441
  onComplete: P
4442
4442
  };
4443
4443
  (u.shouldReduceMotion || this.options.layoutRoot) && (w.delay = 0, w.type = !1), this.startAnimation(w);
4444
4444
  } else
4445
4445
  d || Us(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
4446
- this.targetLayout = m;
4446
+ this.targetLayout = g;
4447
4447
  });
4448
4448
  }
4449
4449
  unmount() {
@@ -4666,12 +4666,12 @@ function So({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4666
4666
  et(this.layoutCorrected, this.layout.layoutBox);
4667
4667
  const d = this.treeScale.x, p = this.treeScale.y;
4668
4668
  Ou(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms = I());
4669
- const { target: m } = a;
4670
- if (!m) {
4669
+ const { target: g } = a;
4670
+ if (!g) {
4671
4671
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
4672
4672
  return;
4673
4673
  }
4674
- !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Ds(this.prevProjectionDelta.x, this.projectionDelta.x), Ds(this.prevProjectionDelta.y, this.projectionDelta.y)), ie(this.projectionDelta, this.layoutCorrected, m, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Bs(this.projectionDelta.x, this.prevProjectionDelta.x) || !Bs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", m)), te && Rt.recalculatedProjection++;
4674
+ !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Ds(this.prevProjectionDelta.x, this.projectionDelta.x), Ds(this.prevProjectionDelta.y, this.projectionDelta.y)), ie(this.projectionDelta, this.layoutCorrected, g, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Bs(this.projectionDelta.x, this.prevProjectionDelta.x) || !Bs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), te && Rt.recalculatedProjection++;
4675
4675
  }
4676
4676
  hide() {
4677
4677
  this.isVisible = !1;
@@ -4693,12 +4693,12 @@ function So({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4693
4693
  setAnimationOrigin(r, a = !1) {
4694
4694
  const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, f = Nt();
4695
4695
  (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
4696
- const d = I(), p = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, x = p !== m, b = this.getStack(), P = !b || b.members.length <= 1, y = !!(x && !P && this.options.crossfade === !0 && !this.path.some(bf));
4696
+ const d = I(), p = l ? l.source : void 0, g = this.layout ? this.layout.source : void 0, v = p !== g, T = this.getStack(), P = !T || T.members.length <= 1, y = !!(v && !P && this.options.crossfade === !0 && !this.path.some(bf));
4697
4697
  this.animationProgress = 0;
4698
- let v;
4698
+ let x;
4699
4699
  this.mixTargetDelta = (w) => {
4700
4700
  const A = w / 1e3;
4701
- Ws(f.x, r.x, A), Ws(f.y, r.y, A), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (se(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), xf(this.relativeTarget, this.relativeTargetOrigin, d, A), v && Ju(this.relativeTarget, v) && (this.isProjectionDirty = !1), v || (v = I()), et(v, this.relativeTarget)), x && (this.animationValues = u, Hu(u, c, this.latestValues, A, y, P)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = A;
4701
+ Ws(f.x, r.x, A), Ws(f.y, r.y, A), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (se(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), xf(this.relativeTarget, this.relativeTargetOrigin, d, A), x && Ju(this.relativeTarget, x) && (this.isProjectionDirty = !1), x || (x = I()), et(x, this.relativeTarget)), v && (this.animationValues = u, Hu(u, c, this.latestValues, A, y, P)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = A;
4702
4702
  }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
4703
4703
  }
4704
4704
  startAnimation(r) {
@@ -4801,23 +4801,23 @@ function So({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4801
4801
  return this.needsReset = !1, c.opacity = "", c.pointerEvents = Re(r == null ? void 0 : r.pointerEvents) || "", c.transform = u ? u(this.latestValues, "") : "none", c;
4802
4802
  const f = this.getLead();
4803
4803
  if (!this.projectionDelta || !this.layout || !f.target) {
4804
- const x = {};
4805
- return this.options.layoutId && (x.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, x.pointerEvents = Re(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !At(this.latestValues) && (x.transform = u ? u({}, "") : "none", this.hasProjected = !1), x;
4804
+ const v = {};
4805
+ return this.options.layoutId && (v.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, v.pointerEvents = Re(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !At(this.latestValues) && (v.transform = u ? u({}, "") : "none", this.hasProjected = !1), v;
4806
4806
  }
4807
4807
  const d = f.animationValues || f.latestValues;
4808
4808
  this.applyTransformsToTarget(), c.transform = tf(this.projectionDeltaWithTransform, this.treeScale, d), u && (c.transform = u(d, c.transform));
4809
- const { x: p, y: m } = this.projectionDelta;
4810
- c.transformOrigin = `${p.origin * 100}% ${m.origin * 100}% 0`, f.animationValues ? c.opacity = f === this ? (l = (a = d.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : d.opacityExit : c.opacity = f === this ? d.opacity !== void 0 ? d.opacity : "" : d.opacityExit !== void 0 ? d.opacityExit : 0;
4811
- for (const x in ke) {
4812
- if (d[x] === void 0)
4809
+ const { x: p, y: g } = this.projectionDelta;
4810
+ c.transformOrigin = `${p.origin * 100}% ${g.origin * 100}% 0`, f.animationValues ? c.opacity = f === this ? (l = (a = d.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : d.opacityExit : c.opacity = f === this ? d.opacity !== void 0 ? d.opacity : "" : d.opacityExit !== void 0 ? d.opacityExit : 0;
4811
+ for (const v in ke) {
4812
+ if (d[v] === void 0)
4813
4813
  continue;
4814
- const { correct: b, applyTo: P } = ke[x], y = c.transform === "none" ? d[x] : b(d[x], f);
4814
+ const { correct: T, applyTo: P } = ke[v], y = c.transform === "none" ? d[v] : T(d[v], f);
4815
4815
  if (P) {
4816
- const v = P.length;
4817
- for (let w = 0; w < v; w++)
4816
+ const x = P.length;
4817
+ for (let w = 0; w < x; w++)
4818
4818
  c[P[w]] = y;
4819
4819
  } else
4820
- c[x] = y;
4820
+ c[v] = y;
4821
4821
  }
4822
4822
  return this.options.layoutId && (c.pointerEvents = f === this ? Re(r == null ? void 0 : r.pointerEvents) || "" : "none"), c;
4823
4823
  }
@@ -4859,10 +4859,10 @@ function uf(t) {
4859
4859
  if (f && !f.resumeFrom) {
4860
4860
  const { snapshot: d, layout: p } = f;
4861
4861
  if (d && p) {
4862
- const m = I();
4863
- se(m, n.layoutBox, d.layoutBox);
4864
- const x = I();
4865
- se(x, i, p.layoutBox), To(m, x) || (u = !0), f.options.layoutRoot && (t.relativeTarget = x, t.relativeTargetOrigin = m, t.relativeParent = f);
4862
+ const g = I();
4863
+ se(g, n.layoutBox, d.layoutBox);
4864
+ const v = I();
4865
+ se(v, i, p.layoutBox), To(g, v) || (u = !0), f.options.layoutRoot && (t.relativeTarget = v, t.relativeTargetOrigin = g, t.relativeParent = f);
4866
4866
  }
4867
4867
  }
4868
4868
  }
@@ -5027,7 +5027,7 @@ class kf {
5027
5027
  return {};
5028
5028
  }
5029
5029
  constructor({ parent: e, props: n, presenceContext: i, reducedMotionConfig: s, blockInitialAnimation: o, visualState: r }, a = {}) {
5030
- this.applyWillChange = !1, this.resolveKeyframes = (d, p, m, x) => new this.KeyframeResolver(d, p, m, x, this), this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = ti, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
5030
+ this.applyWillChange = !1, this.resolveKeyframes = (d, p, g, v) => new this.KeyframeResolver(d, p, g, v, this), this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = ti, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
5031
5031
  this.isRenderScheduled = !1, this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
5032
5032
  }, this.isRenderScheduled = !1, this.scheduleRender = () => {
5033
5033
  this.isRenderScheduled || (this.isRenderScheduled = !0, L.render(this.render, !1, !0));
@@ -5391,38 +5391,38 @@ function Xs(t) {
5391
5391
  }
5392
5392
  const Kf = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: r = "sync" }) => {
5393
5393
  pt(!e, "Replace exitBeforeEnter with mode='wait'");
5394
- const a = Mt(() => Xs(t), [t]), l = a.map(Ce), c = st(!0), u = st(a), f = Jn(() => /* @__PURE__ */ new Map()), [d, p] = _t(a), [m, x] = _t(a);
5394
+ const a = Mt(() => Xs(t), [t]), l = a.map(Ce), c = st(!0), u = st(a), f = Jn(() => /* @__PURE__ */ new Map()), [d, p] = _t(a), [g, v] = _t(a);
5395
5395
  nr(() => {
5396
5396
  c.current = !1, u.current = a;
5397
- for (let y = 0; y < m.length; y++) {
5398
- const v = Ce(m[y]);
5399
- l.includes(v) ? f.delete(v) : f.get(v) !== !0 && f.set(v, !1);
5397
+ for (let y = 0; y < g.length; y++) {
5398
+ const x = Ce(g[y]);
5399
+ l.includes(x) ? f.delete(x) : f.get(x) !== !0 && f.set(x, !1);
5400
5400
  }
5401
- }, [m, l.length, l.join("-")]);
5402
- const b = [];
5401
+ }, [g, l.length, l.join("-")]);
5402
+ const T = [];
5403
5403
  if (a !== d) {
5404
5404
  let y = [...a];
5405
- for (let v = 0; v < m.length; v++) {
5406
- const w = m[v], A = Ce(w);
5407
- l.includes(A) || (y.splice(v, 0, w), b.push(w));
5405
+ for (let x = 0; x < g.length; x++) {
5406
+ const w = g[x], A = Ce(w);
5407
+ l.includes(A) || (y.splice(x, 0, w), T.push(w));
5408
5408
  }
5409
- r === "wait" && b.length && (y = b), x(Xs(y)), p(a);
5409
+ r === "wait" && T.length && (y = T), v(Xs(y)), p(a);
5410
5410
  return;
5411
5411
  }
5412
- process.env.NODE_ENV !== "production" && r === "wait" && m.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
5412
+ process.env.NODE_ENV !== "production" && r === "wait" && g.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
5413
5413
  const { forceRender: P } = K(Un);
5414
- return _.jsx(_.Fragment, { children: m.map((y) => {
5415
- const v = Ce(y), w = a === m || l.includes(v), A = () => {
5416
- if (f.has(v))
5417
- f.set(v, !0);
5414
+ return _.jsx(_.Fragment, { children: g.map((y) => {
5415
+ const x = Ce(y), w = a === g || l.includes(x), A = () => {
5416
+ if (f.has(x))
5417
+ f.set(x, !0);
5418
5418
  else
5419
5419
  return;
5420
5420
  let j = !0;
5421
5421
  f.forEach((q) => {
5422
5422
  q || (j = !1);
5423
- }), j && (P == null || P(), x(u.current), s && s());
5423
+ }), j && (P == null || P(), v(u.current), s && s());
5424
5424
  };
5425
- return _.jsx(Wf, { isPresent: w, initial: !c.current || i ? void 0 : !1, custom: w ? void 0 : n, presenceAffectsLayout: o, mode: r, onExitComplete: w ? void 0 : A, children: y }, v);
5425
+ return _.jsx(Wf, { isPresent: w, initial: !c.current || i ? void 0 : !1, custom: w ? void 0 : n, presenceAffectsLayout: o, mode: r, onExitComplete: w ? void 0 : A, children: y }, x);
5426
5426
  }) });
5427
5427
  };
5428
5428
  function De(t) {
@@ -5516,16 +5516,16 @@ function sh(t) {
5516
5516
  }
5517
5517
  return Ae.set(t, window), window;
5518
5518
  }
5519
- const rh = (t, e, n) => {
5520
- var w;
5521
- const i = (w = t.current) == null ? void 0 : w.firstChild, s = e.current;
5522
- if (!i || !s)
5519
+ const rh = (t, e, n, i) => {
5520
+ var A;
5521
+ const s = (A = t.current) == null ? void 0 : A.firstChild, o = e.current;
5522
+ if (!s || !o)
5523
5523
  return;
5524
- const o = s.getBoundingClientRect(), r = i.getBoundingClientRect(), a = window.innerHeight, l = window.innerWidth, c = window.pageYOffset || document.documentElement.scrollTop, u = window.pageXOffset || document.documentElement.scrollLeft, f = 8, d = r.top - f, p = a - r.bottom - f;
5525
- let m = p >= d ? at.bottom : at.top, x = m === at.bottom ? p : d;
5526
- const b = o.width, P = r.left + b < l, y = r.right - b > 0;
5527
- let v = Jt.left;
5528
- !P && y ? v = Jt.right : !P && !y && (v = Jt.left), n(m), s.style.top = m === at.bottom ? `${r.bottom + c}px` : `${r.top + c - x}px`, s.style.left = v === Jt.left ? `${r.left + u}px` : `${r.right + u - b}px`, s.style.minWidth = `${r.width}px`, s.style.height = `${x}px`, s.style.transformOrigin = m === at.bottom ? "top" : "bottom", s.style.flexDirection = m === at.bottom ? "column" : "column-reverse";
5524
+ const r = o.getBoundingClientRect(), a = s.getBoundingClientRect(), l = window.innerHeight, c = window.innerWidth, u = window.pageYOffset || document.documentElement.scrollTop, f = window.pageXOffset || document.documentElement.scrollLeft, d = 8, p = a.top - d, g = l - a.bottom - d;
5525
+ let v = (i == null ? void 0 : i.vertical) ?? (g >= p ? at.bottom : at.top), T = v === at.bottom ? g : p;
5526
+ const P = r.width, y = a.left + P < c, x = a.right - P > 0;
5527
+ let w = (i == null ? void 0 : i.horizontal) ?? Jt.left;
5528
+ !y && x ? w = Jt.right : !y && !x && (w = Jt.left), n(v), o.style.top = v === at.bottom ? `${a.bottom + u}px` : `${a.top + u - T}px`, o.style.left = w === Jt.left ? `${a.left + f}px` : `${a.right + f - P}px`, o.style.minWidth = `${a.width}px`, o.style.height = `${T}px`, o.style.transformOrigin = v === at.bottom ? "top" : "bottom", o.style.flexDirection = v === at.bottom ? "column" : "column-reverse";
5529
5529
  }, oh = {
5530
5530
  variants: {
5531
5531
  initial: { position: "absolute", zIndex: 999, opacity: 0, transition: { type: "spring" } },
@@ -5548,8 +5548,13 @@ const rh = (t, e, n) => {
5548
5548
  onKeyDown: i
5549
5549
  }, s) => {
5550
5550
  const o = st(null), r = pa(), a = it(() => {
5551
- rh(n, o, r.setVertical);
5552
- }, [r.setVertical]);
5551
+ rh(
5552
+ n,
5553
+ o,
5554
+ r.setVertical,
5555
+ r.importantPosition
5556
+ );
5557
+ }, []);
5553
5558
  return ct(() => {
5554
5559
  if (n.current && o.current) {
5555
5560
  const l = sh(n.current);
@@ -5580,13 +5585,13 @@ const rh = (t, e, n) => {
5580
5585
  function ph(t, e, n) {
5581
5586
  const i = Me(t);
5582
5587
  return Me((o, r) => {
5583
- const [a, l] = _t(!1), [c, u] = _t(!1), [f, d] = _t(at.bottom), [p, m] = _t(), x = st(null), b = st(null), P = st(null), y = st(p), v = (n == null ? void 0 : n.isEnableClickOutSiteHidden) !== !1, w = (n == null ? void 0 : n.isEnableHideSave) !== !1;
5588
+ const [a, l] = _t(!1), [c, u] = _t(!1), [f, d] = _t(at.bottom), [p, g] = _t(), v = st(null), T = st(null), P = st(null), y = st(p), x = (n == null ? void 0 : n.isEnableClickOutSiteHidden) !== !1, w = (n == null ? void 0 : n.isEnableHideSave) !== !1;
5584
5589
  ct(() => {
5585
- m(o.value);
5590
+ g(o.value);
5586
5591
  }, [JSON.stringify(o.value)]), ct(() => {
5587
5592
  y.current = p;
5588
5593
  }, [p]), ct(() => {
5589
- a && m(o.value);
5594
+ a && g(o.value);
5590
5595
  }, [a, o.value]);
5591
5596
  const A = it((M) => {
5592
5597
  switch (M.key) {
@@ -5605,27 +5610,27 @@ function ph(t, e, n) {
5605
5610
  }
5606
5611
  }, [a]), j = it((M) => (D) => {
5607
5612
  var U;
5608
- M && (D.stopPropagation(), D.preventDefault(), (U = b.current) == null || U.focus(), l(!1));
5613
+ M && (D.stopPropagation(), D.preventDefault(), (U = T.current) == null || U.focus(), l(!1));
5609
5614
  }, []), q = it((M) => {
5610
5615
  var D;
5611
- (D = b.current) == null || D.focus(), l(!1), u(!1);
5616
+ (D = T.current) == null || D.focus(), l(!1), u(!1);
5612
5617
  }, []), R = it((M) => {
5613
5618
  M.preventDefault(), l(!0);
5614
5619
  }, []), W = it(() => {
5615
5620
  requestAnimationFrame(() => {
5616
5621
  var M;
5617
- (M = b.current) == null || M.focus(), l(!1);
5622
+ (M = T.current) == null || M.focus(), l(!1);
5618
5623
  });
5619
5624
  }, []), H = it(() => {
5620
5625
  l((M) => (M && requestAnimationFrame(() => {
5621
5626
  var D;
5622
- (D = b.current) == null || D.focus();
5627
+ (D = T.current) == null || D.focus();
5623
5628
  }), !M));
5624
5629
  }, []), rt = it((M) => {
5625
- !x.current && P.current && !P.current.contains(M.target) && u(!1);
5630
+ !v.current && P.current && !P.current.contains(M.target) && u(!1);
5626
5631
  }, []), wt = it((M) => {
5627
5632
  var U;
5628
- const D = (U = x.current) == null ? void 0 : U.firstChild;
5633
+ const D = (U = v.current) == null ? void 0 : U.firstChild;
5629
5634
  D && !D.contains(M.target) && P.current && !P.current.contains(M.target) && (l(!1), u(!1));
5630
5635
  }, []), Z = it(() => {
5631
5636
  if (typeof (o == null ? void 0 : o.onChange) > "u") {
@@ -5646,7 +5651,8 @@ function ph(t, e, n) {
5646
5651
  inputBlur: () => u(!1),
5647
5652
  isInputFocus: c,
5648
5653
  value: p,
5649
- onChange: m,
5654
+ onChange: g,
5655
+ importantPosition: n == null ? void 0 : n.importantPosition,
5650
5656
  vertical: f,
5651
5657
  setVertical: d
5652
5658
  },
@@ -5661,7 +5667,7 @@ function ph(t, e, n) {
5661
5667
  i,
5662
5668
  {
5663
5669
  ...o,
5664
- ref: Eo(r, b)
5670
+ ref: Eo(r, T)
5665
5671
  }
5666
5672
  )
5667
5673
  }
@@ -5674,7 +5680,7 @@ function ph(t, e, n) {
5674
5680
  children: /* @__PURE__ */ _.jsx(
5675
5681
  lh,
5676
5682
  {
5677
- ref: x,
5683
+ ref: v,
5678
5684
  anchorRef: P,
5679
5685
  isDebug: n == null ? void 0 : n.isDebug,
5680
5686
  onKeyDown: A,
@@ -5684,7 +5690,7 @@ function ph(t, e, n) {
5684
5690
  }
5685
5691
  ) }),
5686
5692
  a && /* @__PURE__ */ _.jsx(Qf, { onPickerHide: Z }),
5687
- v && a && /* @__PURE__ */ _.jsx(Zs, { onMousedown: wt }),
5693
+ x && a && /* @__PURE__ */ _.jsx(Zs, { onMousedown: wt }),
5688
5694
  c && /* @__PURE__ */ _.jsx(Zs, { onMousedown: rt })
5689
5695
  ] })
5690
5696
  }
package/dist/types.d.ts CHANGED
@@ -9,6 +9,10 @@ export declare enum EHorizontal {
9
9
  left = "left",
10
10
  right = "right"
11
11
  }
12
+ export interface IPosition {
13
+ vertical: EVertical;
14
+ horizontal: EHorizontal;
15
+ }
12
16
  export interface IPickerOptions {
13
17
  variants?: TAnimationVariants;
14
18
  transition?: Transition;
@@ -23,5 +27,6 @@ export interface IPickerOption {
23
27
  isEnableHideSave?: boolean;
24
28
  isEnableClickOutSiteHidden?: boolean;
25
29
  isDebug?: boolean;
30
+ importantPosition?: IPosition;
26
31
  }
27
32
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrool/react-picker",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-alpha.0",
4
4
  "description": "This is a react method to quickly combine buttons with Picker",
5
5
  "keywords": [
6
6
  "acrool",