@eclass/ui-kit 1.51.2 → 1.51.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 React from "react";
2
- import React__default, { forwardRef as forwardRef$1, useContext, createContext as createContext$1, createElement, useRef, useLayoutEffect, useState, useMemo, Fragment as Fragment$1, useEffect, useCallback, cloneElement, Children, isValidElement, PureComponent } from "react";
2
+ import React__default, { forwardRef as forwardRef$1, useContext, createContext as createContext$1, createElement, useRef, useLayoutEffect, useState, useEffect, useMemo, Fragment as Fragment$1, useCallback, cloneElement, Children, isValidElement as isValidElement$1, PureComponent } from "react";
3
3
  var isDevelopment$1 = false;
4
4
  function sheetForTag(tag2) {
5
5
  if (tag2.sheet) {
@@ -729,15 +729,15 @@ var createCache = function createCache2(options) {
729
729
  cache.sheet.hydrate(nodesToHydrate);
730
730
  return cache;
731
731
  };
732
- function _extends$h() {
733
- return _extends$h = Object.assign ? Object.assign.bind() : function(n2) {
732
+ function _extends$k() {
733
+ return _extends$k = Object.assign ? Object.assign.bind() : function(n2) {
734
734
  for (var e2 = 1; e2 < arguments.length; e2++) {
735
735
  var t2 = arguments[e2];
736
736
  for (var r2 in t2)
737
737
  ({}).hasOwnProperty.call(t2, r2) && (n2[r2] = t2[r2]);
738
738
  }
739
739
  return n2;
740
- }, _extends$h.apply(null, arguments);
740
+ }, _extends$k.apply(null, arguments);
741
741
  }
742
742
  var weakMemoize = function weakMemoize2(func) {
743
743
  var cache = /* @__PURE__ */ new WeakMap();
@@ -1161,7 +1161,7 @@ var getTheme = function getTheme2(outerTheme, theme2) {
1161
1161
  var mergedTheme = theme2(outerTheme);
1162
1162
  return mergedTheme;
1163
1163
  }
1164
- return _extends$h({}, outerTheme, theme2);
1164
+ return _extends$k({}, outerTheme, theme2);
1165
1165
  };
1166
1166
  var createCacheWithTheme = /* @__PURE__ */ weakMemoize(function(outerTheme) {
1167
1167
  return weakMemoize(function(theme2) {
@@ -2203,6 +2203,34 @@ function getLastItem(array) {
2203
2203
  var length2 = array == null ? 0 : array.length;
2204
2204
  return length2 ? array[length2 - 1] : void 0;
2205
2205
  }
2206
+ function getNextItemFromSearch(items, searchString, itemToString, currentItem) {
2207
+ if (searchString == null) {
2208
+ return currentItem;
2209
+ }
2210
+ if (!currentItem) {
2211
+ var foundItem = items.find(function(item) {
2212
+ return itemToString(item).toLowerCase().startsWith(searchString.toLowerCase());
2213
+ });
2214
+ return foundItem;
2215
+ }
2216
+ var matchingItems = items.filter(function(item) {
2217
+ return itemToString(item).toLowerCase().startsWith(searchString.toLowerCase());
2218
+ });
2219
+ if (matchingItems.length > 0) {
2220
+ var nextIndex;
2221
+ if (matchingItems.includes(currentItem)) {
2222
+ var currentIndex = matchingItems.indexOf(currentItem);
2223
+ nextIndex = currentIndex + 1;
2224
+ if (nextIndex === matchingItems.length) {
2225
+ nextIndex = 0;
2226
+ }
2227
+ return matchingItems[nextIndex];
2228
+ }
2229
+ nextIndex = items.indexOf(matchingItems[0]);
2230
+ return items[nextIndex];
2231
+ }
2232
+ return currentItem;
2233
+ }
2206
2234
  function isNumber(value) {
2207
2235
  return typeof value === "number";
2208
2236
  }
@@ -2416,20 +2444,24 @@ function analyzeBreakpoints(breakpoints2) {
2416
2444
  }
2417
2445
  };
2418
2446
  }
2419
- function isElement$1(el) {
2447
+ function isElement$2(el) {
2420
2448
  return el != null && typeof el == "object" && "nodeType" in el && el.nodeType === Node.ELEMENT_NODE;
2421
2449
  }
2422
2450
  function isHTMLElement$1(el) {
2423
2451
  var _el$ownerDocument$def;
2424
- if (!isElement$1(el)) {
2452
+ if (!isElement$2(el)) {
2425
2453
  return false;
2426
2454
  }
2427
2455
  var win2 = (_el$ownerDocument$def = el.ownerDocument.defaultView) != null ? _el$ownerDocument$def : window;
2428
2456
  return el instanceof win2.HTMLElement;
2429
2457
  }
2458
+ function getOwnerWindow(node2) {
2459
+ var _getOwnerDocument$def, _getOwnerDocument;
2460
+ return isElement$2(node2) ? (_getOwnerDocument$def = (_getOwnerDocument = getOwnerDocument(node2)) == null ? void 0 : _getOwnerDocument.defaultView) != null ? _getOwnerDocument$def : window : window;
2461
+ }
2430
2462
  function getOwnerDocument(node2) {
2431
2463
  var _node$ownerDocument;
2432
- return isElement$1(node2) ? (_node$ownerDocument = node2.ownerDocument) != null ? _node$ownerDocument : document : document;
2464
+ return isElement$2(node2) ? (_node$ownerDocument = node2.ownerDocument) != null ? _node$ownerDocument : document : document;
2433
2465
  }
2434
2466
  function canUseDOM() {
2435
2467
  return !!(typeof window !== "undefined" && window.document && window.document.createElement);
@@ -2444,9 +2476,30 @@ var cx = function cx2() {
2444
2476
  }
2445
2477
  return classNames2.filter(Boolean).join(" ");
2446
2478
  };
2479
+ function getActiveElement(node2) {
2480
+ var doc2 = getOwnerDocument(node2);
2481
+ return doc2 == null ? void 0 : doc2.activeElement;
2482
+ }
2483
+ function contains$1(parent, child) {
2484
+ if (!parent)
2485
+ return false;
2486
+ return parent === child || parent.contains(child);
2487
+ }
2488
+ function normalizeEventKey(event) {
2489
+ var key = event.key, keyCode = event.keyCode;
2490
+ var isArrowKey = keyCode >= 37 && keyCode <= 40 && key.indexOf("Arrow") !== 0;
2491
+ var eventKey = isArrowKey ? "Arrow" + key : key;
2492
+ return eventKey;
2493
+ }
2494
+ function isRightClick(event) {
2495
+ return event.button !== 0;
2496
+ }
2447
2497
  var hasTabIndex = function hasTabIndex2(element) {
2448
2498
  return element.hasAttribute("tabindex");
2449
2499
  };
2500
+ var hasNegativeTabIndex = function hasNegativeTabIndex2(element) {
2501
+ return hasTabIndex(element) && element.tabIndex === -1;
2502
+ };
2450
2503
  function isDisabled(element) {
2451
2504
  return Boolean(element.getAttribute("disabled")) === true || Boolean(element.getAttribute("aria-disabled")) === true;
2452
2505
  }
@@ -2492,6 +2545,11 @@ function isFocusable(element) {
2492
2545
  return true;
2493
2546
  return hasTabIndex(element);
2494
2547
  }
2548
+ function isTabbable(element) {
2549
+ if (!element)
2550
+ return false;
2551
+ return isHTMLElement$1(element) && isFocusable(element) && !hasNegativeTabIndex(element);
2552
+ }
2495
2553
  var focusableElList = ["input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])", "embed", "iframe", "object", "a[href]", "area[href]", "button:not([disabled])", "[tabindex]", "audio[controls]", "video[controls]", "*[tabindex]:not([aria-disabled])", "*[contenteditable]"];
2496
2554
  var focusableElSelector = focusableElList.join();
2497
2555
  function getAllFocusable(container2) {
@@ -2559,6 +2617,16 @@ function callAllHandlers() {
2559
2617
  });
2560
2618
  };
2561
2619
  }
2620
+ function callAll() {
2621
+ for (var _len3 = arguments.length, fns = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
2622
+ fns[_key3] = arguments[_key3];
2623
+ }
2624
+ return function mergedFn(arg) {
2625
+ fns.forEach(function(fn6) {
2626
+ fn6 == null ? void 0 : fn6(arg);
2627
+ });
2628
+ };
2629
+ }
2562
2630
  function once(fn6) {
2563
2631
  var result;
2564
2632
  return function func() {
@@ -2698,6 +2766,16 @@ function flatten(target, maxDepth) {
2698
2766
  return result;
2699
2767
  }, {});
2700
2768
  }
2769
+ function determineLazyBehavior(options) {
2770
+ var hasBeenSelected = options.hasBeenSelected, isLazy = options.isLazy, isSelected = options.isSelected, _options$lazyBehavior = options.lazyBehavior, lazyBehavior = _options$lazyBehavior === void 0 ? "unmount" : _options$lazyBehavior;
2771
+ if (!isLazy)
2772
+ return true;
2773
+ if (isSelected)
2774
+ return true;
2775
+ if (lazyBehavior === "keepMounted" && hasBeenSelected)
2776
+ return true;
2777
+ return false;
2778
+ }
2701
2779
  function valueToPercent(value, min2, max2) {
2702
2780
  return (value - min2) * 100 / (max2 - min2);
2703
2781
  }
@@ -2769,13 +2847,13 @@ function getValidChildren(children) {
2769
2847
  return /* @__PURE__ */ React.isValidElement(child);
2770
2848
  });
2771
2849
  }
2772
- var useSafeLayoutEffect$1 = isBrowser$1 ? React.useLayoutEffect : React.useEffect;
2850
+ var useSafeLayoutEffect$2 = isBrowser$1 ? React.useLayoutEffect : React.useEffect;
2773
2851
  function useCallbackRef$1(fn6, deps) {
2774
2852
  if (deps === void 0) {
2775
2853
  deps = [];
2776
2854
  }
2777
2855
  var ref = React.useRef(fn6);
2778
- useSafeLayoutEffect$1(function() {
2856
+ useSafeLayoutEffect$2(function() {
2779
2857
  ref.current = fn6;
2780
2858
  });
2781
2859
  return React.useCallback(function() {
@@ -2804,13 +2882,41 @@ function useEventListener(event, handler, env, options) {
2804
2882
  node2.removeEventListener(event, listener, options);
2805
2883
  };
2806
2884
  }
2885
+ function useAnimationState(props) {
2886
+ var isOpen = props.isOpen, ref = props.ref;
2887
+ var _useState = useState(isOpen), mounted = _useState[0], setMounted = _useState[1];
2888
+ var _useState2 = useState(false), once2 = _useState2[0], setOnce = _useState2[1];
2889
+ useEffect(function() {
2890
+ if (!once2) {
2891
+ setMounted(isOpen);
2892
+ setOnce(true);
2893
+ }
2894
+ }, [isOpen, once2, mounted]);
2895
+ useEventListener("animationend", function() {
2896
+ setMounted(isOpen);
2897
+ }, function() {
2898
+ return ref.current;
2899
+ });
2900
+ var hidden = isOpen ? false : !mounted;
2901
+ return {
2902
+ present: !hidden,
2903
+ onComplete: function onComplete() {
2904
+ var _ref$current;
2905
+ var win2 = getOwnerWindow(ref.current);
2906
+ var evt = new win2.CustomEvent("animationend", {
2907
+ bubbles: true
2908
+ });
2909
+ (_ref$current = ref.current) == null ? void 0 : _ref$current.dispatchEvent(evt);
2910
+ }
2911
+ };
2912
+ }
2807
2913
  function useControllableProp(prop2, state2) {
2808
2914
  var isControlled = prop2 !== void 0;
2809
2915
  var value = isControlled && typeof prop2 !== "undefined" ? prop2 : state2;
2810
2916
  return [isControlled, value];
2811
2917
  }
2812
- function _extends$g() {
2813
- _extends$g = Object.assign || function(target) {
2918
+ function _extends$j() {
2919
+ _extends$j = Object.assign || function(target) {
2814
2920
  for (var i2 = 1; i2 < arguments.length; i2++) {
2815
2921
  var source = arguments[i2];
2816
2922
  for (var key in source) {
@@ -2821,7 +2927,7 @@ function _extends$g() {
2821
2927
  }
2822
2928
  return target;
2823
2929
  };
2824
- return _extends$g.apply(this, arguments);
2930
+ return _extends$j.apply(this, arguments);
2825
2931
  }
2826
2932
  var defaultIdContext = {
2827
2933
  current: 1
@@ -2895,7 +3001,7 @@ function useDisclosure(props) {
2895
3001
  if (props2 === void 0) {
2896
3002
  props2 = {};
2897
3003
  }
2898
- return _extends$g({}, props2, {
3004
+ return _extends$j({}, props2, {
2899
3005
  "aria-expanded": "true",
2900
3006
  "aria-controls": id2,
2901
3007
  onClick: callAllHandlers(props2.onClick, onToggle)
@@ -2905,13 +3011,54 @@ function useDisclosure(props) {
2905
3011
  if (props2 === void 0) {
2906
3012
  props2 = {};
2907
3013
  }
2908
- return _extends$g({}, props2, {
3014
+ return _extends$j({}, props2, {
2909
3015
  hidden: !isOpen,
2910
3016
  id: id2
2911
3017
  });
2912
3018
  }
2913
3019
  };
2914
3020
  }
3021
+ var useUpdateEffect = function useUpdateEffect2(effect5, deps) {
3022
+ var mounted = React.useRef(false);
3023
+ React.useEffect(function() {
3024
+ if (mounted.current) {
3025
+ return effect5();
3026
+ }
3027
+ mounted.current = true;
3028
+ return void 0;
3029
+ }, deps);
3030
+ return mounted.current;
3031
+ };
3032
+ function preventReturnFocus(containerRef) {
3033
+ var el = containerRef.current;
3034
+ if (!el)
3035
+ return false;
3036
+ var activeElement = getActiveElement(el);
3037
+ if (!activeElement)
3038
+ return false;
3039
+ if (contains$1(el, activeElement))
3040
+ return false;
3041
+ if (isTabbable(activeElement))
3042
+ return true;
3043
+ return false;
3044
+ }
3045
+ function useFocusOnHide(containerRef, options) {
3046
+ var shouldFocusProp = options.shouldFocus, visible = options.visible, focusRef = options.focusRef;
3047
+ var shouldFocus = shouldFocusProp && !visible;
3048
+ useUpdateEffect(function() {
3049
+ if (!shouldFocus)
3050
+ return;
3051
+ if (preventReturnFocus(containerRef)) {
3052
+ return;
3053
+ }
3054
+ var el = (focusRef == null ? void 0 : focusRef.current) || containerRef.current;
3055
+ if (el) {
3056
+ focus(el, {
3057
+ nextTick: true
3058
+ });
3059
+ }
3060
+ }, [shouldFocus, containerRef, focusRef]);
3061
+ }
2915
3062
  function useUnmountEffect$1(fn6, deps) {
2916
3063
  if (deps === void 0) {
2917
3064
  deps = [];
@@ -2968,6 +3115,115 @@ function useMergeRefs$1() {
2968
3115
  };
2969
3116
  }, refs);
2970
3117
  }
3118
+ function useOutsideClick(props) {
3119
+ var ref = props.ref, handler = props.handler, _props$enabled = props.enabled, enabled = _props$enabled === void 0 ? true : _props$enabled;
3120
+ var savedHandler = useCallbackRef$1(handler);
3121
+ var stateRef = useRef({
3122
+ isPointerDown: false,
3123
+ ignoreEmulatedMouseEvents: false
3124
+ });
3125
+ var state2 = stateRef.current;
3126
+ useEffect(function() {
3127
+ if (!enabled)
3128
+ return;
3129
+ var onPointerDown = function onPointerDown2(e2) {
3130
+ if (isValidEvent(e2, ref)) {
3131
+ state2.isPointerDown = true;
3132
+ }
3133
+ };
3134
+ var onMouseUp = function onMouseUp2(event) {
3135
+ if (state2.ignoreEmulatedMouseEvents) {
3136
+ state2.ignoreEmulatedMouseEvents = false;
3137
+ return;
3138
+ }
3139
+ if (state2.isPointerDown && handler && isValidEvent(event, ref)) {
3140
+ state2.isPointerDown = false;
3141
+ savedHandler(event);
3142
+ }
3143
+ };
3144
+ var onTouchEnd = function onTouchEnd2(event) {
3145
+ state2.ignoreEmulatedMouseEvents = true;
3146
+ if (handler && state2.isPointerDown && isValidEvent(event, ref)) {
3147
+ state2.isPointerDown = false;
3148
+ savedHandler(event);
3149
+ }
3150
+ };
3151
+ var doc2 = getOwnerDocument(ref.current);
3152
+ doc2.addEventListener("mousedown", onPointerDown, true);
3153
+ doc2.addEventListener("mouseup", onMouseUp, true);
3154
+ doc2.addEventListener("touchstart", onPointerDown, true);
3155
+ doc2.addEventListener("touchend", onTouchEnd, true);
3156
+ return function() {
3157
+ doc2.removeEventListener("mousedown", onPointerDown, true);
3158
+ doc2.removeEventListener("mouseup", onMouseUp, true);
3159
+ doc2.removeEventListener("touchstart", onPointerDown, true);
3160
+ doc2.removeEventListener("touchend", onTouchEnd, true);
3161
+ };
3162
+ }, [handler, ref, savedHandler, state2, enabled]);
3163
+ }
3164
+ function isValidEvent(event, ref) {
3165
+ var _ref$current;
3166
+ var target = event.target;
3167
+ if (event.button > 0)
3168
+ return false;
3169
+ if (target) {
3170
+ var doc2 = getOwnerDocument(target);
3171
+ if (!doc2.body.contains(target))
3172
+ return false;
3173
+ }
3174
+ return !((_ref$current = ref.current) != null && _ref$current.contains(target));
3175
+ }
3176
+ function isPrintableCharacter(event) {
3177
+ var key = event.key;
3178
+ return key.length === 1 || key.length > 1 && /[^a-zA-Z0-9]/.test(key);
3179
+ }
3180
+ function useShortcut(props) {
3181
+ if (props === void 0) {
3182
+ props = {};
3183
+ }
3184
+ var _props = props, _props$timeout = _props.timeout, timeout = _props$timeout === void 0 ? 300 : _props$timeout, _props$preventDefault = _props.preventDefault, preventDefault = _props$preventDefault === void 0 ? function() {
3185
+ return true;
3186
+ } : _props$preventDefault;
3187
+ var _React$useState = React.useState([]), keys2 = _React$useState[0], setKeys = _React$useState[1];
3188
+ var timeoutRef = React.useRef();
3189
+ var flush = function flush2() {
3190
+ if (timeoutRef.current) {
3191
+ clearTimeout(timeoutRef.current);
3192
+ timeoutRef.current = null;
3193
+ }
3194
+ };
3195
+ var clearKeysAfterDelay = function clearKeysAfterDelay2() {
3196
+ flush();
3197
+ timeoutRef.current = setTimeout(function() {
3198
+ setKeys([]);
3199
+ timeoutRef.current = null;
3200
+ }, timeout);
3201
+ };
3202
+ React.useEffect(function() {
3203
+ return flush;
3204
+ }, []);
3205
+ function onKeyDown(fn6) {
3206
+ return function(event) {
3207
+ if (event.key === "Backspace") {
3208
+ var keysCopy = [].concat(keys2);
3209
+ keysCopy.pop();
3210
+ setKeys(keysCopy);
3211
+ return;
3212
+ }
3213
+ if (isPrintableCharacter(event)) {
3214
+ var _keysCopy = keys2.concat(event.key);
3215
+ if (preventDefault(event)) {
3216
+ event.preventDefault();
3217
+ event.stopPropagation();
3218
+ }
3219
+ setKeys(_keysCopy);
3220
+ fn6(_keysCopy.join(""));
3221
+ clearKeysAfterDelay();
3222
+ }
3223
+ };
3224
+ }
3225
+ return onKeyDown;
3226
+ }
2971
3227
  var reactDom = { exports: {} };
2972
3228
  var reactDom_production_min = {};
2973
3229
  /*
@@ -9526,8 +9782,8 @@ function PortalManager(props) {
9526
9782
  }
9527
9783
  }, children);
9528
9784
  }
9529
- function _extends$f() {
9530
- _extends$f = Object.assign || function(target) {
9785
+ function _extends$i() {
9786
+ _extends$i = Object.assign || function(target) {
9531
9787
  for (var i2 = 1; i2 < arguments.length; i2++) {
9532
9788
  var source = arguments[i2];
9533
9789
  for (var key in source) {
@@ -9538,9 +9794,9 @@ function _extends$f() {
9538
9794
  }
9539
9795
  return target;
9540
9796
  };
9541
- return _extends$f.apply(this, arguments);
9797
+ return _extends$i.apply(this, arguments);
9542
9798
  }
9543
- function _objectWithoutPropertiesLoose$e(source, excluded) {
9799
+ function _objectWithoutPropertiesLoose$g(source, excluded) {
9544
9800
  if (source == null)
9545
9801
  return {};
9546
9802
  var target = {};
@@ -9555,10 +9811,10 @@ function _objectWithoutPropertiesLoose$e(source, excluded) {
9555
9811
  return target;
9556
9812
  }
9557
9813
  var _excluded$g = ["containerRef"];
9558
- var _createContext$5 = createContext({
9814
+ var _createContext$7 = createContext({
9559
9815
  strict: false,
9560
9816
  name: "PortalContext"
9561
- }), PortalContextProvider = _createContext$5[0], usePortalContext = _createContext$5[1];
9817
+ }), PortalContextProvider = _createContext$7[0], usePortalContext = _createContext$7[1];
9562
9818
  var PORTAL_CLASSNAME = "chakra-portal";
9563
9819
  var PORTAL_SELECTOR = ".chakra-portal";
9564
9820
  var Container = function Container2(props) {
@@ -9580,7 +9836,7 @@ var DefaultPortal = function DefaultPortal2(props) {
9580
9836
  var forceUpdate = useForceUpdate$1();
9581
9837
  var parentPortal = usePortalContext();
9582
9838
  var manager2 = usePortalManager();
9583
- useSafeLayoutEffect$1(function() {
9839
+ useSafeLayoutEffect$2(function() {
9584
9840
  if (!tempNode.current)
9585
9841
  return;
9586
9842
  var doc2 = tempNode.current.ownerDocument;
@@ -9618,10 +9874,10 @@ var ContainerPortal = function ContainerPortal2(props) {
9618
9874
  return node2;
9619
9875
  }, [containerEl]);
9620
9876
  var forceUpdate = useForceUpdate$1();
9621
- useSafeLayoutEffect$1(function() {
9877
+ useSafeLayoutEffect$2(function() {
9622
9878
  forceUpdate();
9623
9879
  }, []);
9624
- useSafeLayoutEffect$1(function() {
9880
+ useSafeLayoutEffect$2(function() {
9625
9881
  if (!portal || !host)
9626
9882
  return;
9627
9883
  host.appendChild(portal);
@@ -9637,8 +9893,8 @@ var ContainerPortal = function ContainerPortal2(props) {
9637
9893
  return null;
9638
9894
  };
9639
9895
  function Portal(props) {
9640
- var containerRef = props.containerRef, rest = _objectWithoutPropertiesLoose$e(props, _excluded$g);
9641
- return containerRef ? /* @__PURE__ */ React.createElement(ContainerPortal, _extends$f({
9896
+ var containerRef = props.containerRef, rest = _objectWithoutPropertiesLoose$g(props, _excluded$g);
9897
+ return containerRef ? /* @__PURE__ */ React.createElement(ContainerPortal, _extends$i({
9642
9898
  containerRef
9643
9899
  }, rest)) : /* @__PURE__ */ React.createElement(DefaultPortal, rest);
9644
9900
  }
@@ -9974,8 +10230,8 @@ function ColorModeProvider(props) {
9974
10230
  value: context
9975
10231
  }, children);
9976
10232
  }
9977
- function _extends$e() {
9978
- _extends$e = Object.assign || function(target) {
10233
+ function _extends$h() {
10234
+ _extends$h = Object.assign || function(target) {
9979
10235
  for (var i2 = 1; i2 < arguments.length; i2++) {
9980
10236
  var source = arguments[i2];
9981
10237
  for (var key in source) {
@@ -9986,7 +10242,7 @@ function _extends$e() {
9986
10242
  }
9987
10243
  return target;
9988
10244
  };
9989
- return _extends$e.apply(this, arguments);
10245
+ return _extends$h.apply(this, arguments);
9990
10246
  }
9991
10247
  var tokenToCSSVar = function tokenToCSSVar2(scale2, value) {
9992
10248
  return function(theme2) {
@@ -10330,7 +10586,7 @@ var t$1 = {
10330
10586
  };
10331
10587
  },
10332
10588
  prop: function prop(property, scale2, transform10) {
10333
- return _extends$e({
10589
+ return _extends$h({
10334
10590
  property,
10335
10591
  scale: scale2
10336
10592
  }, scale2 && {
@@ -11076,7 +11332,7 @@ var pseudoPropNames = objectKeys(pseudoSelectors);
11076
11332
  var systemProps = mergeWith({}, background, border, color$1, flexbox, layout, filter$1, ring2, interactivity, grid, others, position, effect$3, space$1, scroll, typography$2, textDecoration, transform8, list$1, transition$1);
11077
11333
  Object.assign({}, space$1, layout, flexbox, grid, position);
11078
11334
  var propNames = [].concat(objectKeys(systemProps), pseudoPropNames);
11079
- var styleProps = _extends$e({}, systemProps, pseudoSelectors);
11335
+ var styleProps = _extends$h({}, systemProps, pseudoSelectors);
11080
11336
  var isStyleProp = function isStyleProp2(prop2) {
11081
11337
  return prop2 in styleProps;
11082
11338
  };
@@ -11396,7 +11652,7 @@ function createThemeVars(flatTokens, options) {
11396
11652
  cssMap
11397
11653
  };
11398
11654
  }
11399
- function _objectWithoutPropertiesLoose$d(source, excluded) {
11655
+ function _objectWithoutPropertiesLoose$f(source, excluded) {
11400
11656
  if (source == null)
11401
11657
  return {};
11402
11658
  var target = {};
@@ -11423,7 +11679,7 @@ function omitVars(rawTheme) {
11423
11679
  rawTheme.__cssMap;
11424
11680
  rawTheme.__cssVars;
11425
11681
  rawTheme.__breakpoints;
11426
- var cleanTheme = _objectWithoutPropertiesLoose$d(rawTheme, _excluded$f);
11682
+ var cleanTheme = _objectWithoutPropertiesLoose$f(rawTheme, _excluded$f);
11427
11683
  return cleanTheme;
11428
11684
  }
11429
11685
  function flattenTokens(_ref2) {
@@ -11471,7 +11727,7 @@ function toCSSVar(rawTheme) {
11471
11727
  "--chakra-space-y-reverse": "0"
11472
11728
  };
11473
11729
  Object.assign(theme2, {
11474
- __cssVars: _extends$e({}, defaultCssVars, cssVars2),
11730
+ __cssVars: _extends$h({}, defaultCssVars, cssVars2),
11475
11731
  __cssMap: cssMap,
11476
11732
  __breakpoints: analyzeBreakpoints(theme2.breakpoints)
11477
11733
  });
@@ -11688,7 +11944,7 @@ var createStyled = function createStyled2(tag2, options) {
11688
11944
  }
11689
11945
  });
11690
11946
  Styled.withComponent = function(nextTag, nextOptions) {
11691
- return createStyled2(nextTag, _extends$h({}, options, nextOptions, {
11947
+ return createStyled2(nextTag, _extends$k({}, options, nextOptions, {
11692
11948
  shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
11693
11949
  })).apply(void 0, styles2);
11694
11950
  };
@@ -11835,8 +12091,8 @@ var newStyled = createStyled.bind();
11835
12091
  tags.forEach(function(tagName) {
11836
12092
  newStyled[tagName] = newStyled(tagName);
11837
12093
  });
11838
- function _extends$d() {
11839
- _extends$d = Object.assign || function(target) {
12094
+ function _extends$g() {
12095
+ _extends$g = Object.assign || function(target) {
11840
12096
  for (var i2 = 1; i2 < arguments.length; i2++) {
11841
12097
  var source = arguments[i2];
11842
12098
  for (var key in source) {
@@ -11847,7 +12103,7 @@ function _extends$d() {
11847
12103
  }
11848
12104
  return target;
11849
12105
  };
11850
- return _extends$d.apply(this, arguments);
12106
+ return _extends$g.apply(this, arguments);
11851
12107
  }
11852
12108
  var ThemeProvider2 = function ThemeProvider3(props) {
11853
12109
  var cssVarsRoot = props.cssVarsRoot, theme2 = props.theme, children = props.children;
@@ -11877,10 +12133,10 @@ function useTheme() {
11877
12133
  }
11878
12134
  return theme2;
11879
12135
  }
11880
- var _createContext$4 = createContext({
12136
+ var _createContext$6 = createContext({
11881
12137
  name: "StylesContext",
11882
12138
  errorMessage: "useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "
11883
- }), StylesProvider$1 = _createContext$4[0], useStyles$1 = _createContext$4[1];
12139
+ }), StylesProvider$1 = _createContext$6[0], useStyles$1 = _createContext$6[1];
11884
12140
  var GlobalStyle = function GlobalStyle2() {
11885
12141
  var _useColorMode = useColorMode(), colorMode = _useColorMode.colorMode;
11886
12142
  return /* @__PURE__ */ React.createElement(Global, {
@@ -11903,11 +12159,11 @@ function omitThemingProps(props) {
11903
12159
  function useChakra() {
11904
12160
  var colorModeResult = useColorMode();
11905
12161
  var theme2 = useTheme();
11906
- return _extends$d({}, colorModeResult, {
12162
+ return _extends$g({}, colorModeResult, {
11907
12163
  theme: theme2
11908
12164
  });
11909
12165
  }
11910
- function _objectWithoutPropertiesLoose$c(source, excluded) {
12166
+ function _objectWithoutPropertiesLoose$e(source, excluded) {
11911
12167
  if (source == null)
11912
12168
  return {};
11913
12169
  var target = {};
@@ -11926,12 +12182,12 @@ var validHTMLProps = /* @__PURE__ */ new Set(["htmlWidth", "htmlHeight", "htmlSi
11926
12182
  var shouldForwardProp = function shouldForwardProp2(prop2) {
11927
12183
  return validHTMLProps.has(prop2) || !allPropNames.has(prop2);
11928
12184
  };
11929
- var _excluded$1$4 = ["theme", "css", "__css", "sx"], _excluded2$4 = ["baseStyle"];
12185
+ var _excluded$1$5 = ["theme", "css", "__css", "sx"], _excluded2$5 = ["baseStyle"];
11930
12186
  var toCSSObject = function toCSSObject2(_ref2) {
11931
12187
  var baseStyle22 = _ref2.baseStyle;
11932
12188
  return function(props) {
11933
12189
  props.theme;
11934
- var cssProp = props.css, __css = props.__css, sx = props.sx, rest = _objectWithoutPropertiesLoose$c(props, _excluded$1$4);
12190
+ var cssProp = props.css, __css = props.__css, sx = props.sx, rest = _objectWithoutPropertiesLoose$e(props, _excluded$1$5);
11935
12191
  var styleProps2 = objectFilter(rest, function(_2, prop2) {
11936
12192
  return isStyleProp(prop2);
11937
12193
  });
@@ -11942,7 +12198,7 @@ var toCSSObject = function toCSSObject2(_ref2) {
11942
12198
  };
11943
12199
  };
11944
12200
  function styled(component, options) {
11945
- var _ref2 = options != null ? options : {}, baseStyle22 = _ref2.baseStyle, styledOptions = _objectWithoutPropertiesLoose$c(_ref2, _excluded2$4);
12201
+ var _ref2 = options != null ? options : {}, baseStyle22 = _ref2.baseStyle, styledOptions = _objectWithoutPropertiesLoose$e(_ref2, _excluded2$5);
11946
12202
  if (!styledOptions.shouldForwardProp) {
11947
12203
  styledOptions.shouldForwardProp = shouldForwardProp;
11948
12204
  }
@@ -11963,7 +12219,7 @@ function useStyleConfig(themeKey, props, opts) {
11963
12219
  if (opts === void 0) {
11964
12220
  opts = {};
11965
12221
  }
11966
- var _props = props, styleConfigProp = _props.styleConfig, rest = _objectWithoutPropertiesLoose$c(_props, _excluded$e);
12222
+ var _props = props, styleConfigProp = _props.styleConfig, rest = _objectWithoutPropertiesLoose$e(_props, _excluded$e);
11967
12223
  var _useChakra = useChakra(), theme2 = _useChakra.theme, colorMode = _useChakra.colorMode;
11968
12224
  var themeStyleConfig = memoizedGet(theme2, "components." + themeKey);
11969
12225
  var styleConfig = styleConfigProp || themeStyleConfig;
@@ -12061,8 +12317,8 @@ var spacing = {
12061
12317
  80: "20rem",
12062
12318
  96: "24rem"
12063
12319
  };
12064
- function _extends$c() {
12065
- _extends$c = Object.assign || function(target) {
12320
+ function _extends$f() {
12321
+ _extends$f = Object.assign || function(target) {
12066
12322
  for (var i2 = 1; i2 < arguments.length; i2++) {
12067
12323
  var source = arguments[i2];
12068
12324
  for (var key in source) {
@@ -12073,7 +12329,7 @@ function _extends$c() {
12073
12329
  }
12074
12330
  return target;
12075
12331
  };
12076
- return _extends$c.apply(this, arguments);
12332
+ return _extends$f.apply(this, arguments);
12077
12333
  }
12078
12334
  var largeSizes = {
12079
12335
  max: "max-content",
@@ -12100,7 +12356,7 @@ var container$1 = {
12100
12356
  lg: "1024px",
12101
12357
  xl: "1280px"
12102
12358
  };
12103
- var sizes$l = _extends$c({}, spacing, largeSizes, {
12359
+ var sizes$l = _extends$f({}, spacing, largeSizes, {
12104
12360
  container: container$1
12105
12361
  });
12106
12362
  function bound01(n2, max2) {
@@ -13332,8 +13588,8 @@ function orient(options) {
13332
13588
  return {};
13333
13589
  return orientation === "vertical" ? vertical : horizontal;
13334
13590
  }
13335
- function _extends$b() {
13336
- _extends$b = Object.assign || function(target) {
13591
+ function _extends$e() {
13592
+ _extends$e = Object.assign || function(target) {
13337
13593
  for (var i2 = 1; i2 < arguments.length; i2++) {
13338
13594
  var source = arguments[i2];
13339
13595
  for (var key in source) {
@@ -13344,14 +13600,14 @@ function _extends$b() {
13344
13600
  }
13345
13601
  return target;
13346
13602
  };
13347
- return _extends$b.apply(this, arguments);
13603
+ return _extends$e.apply(this, arguments);
13348
13604
  }
13349
13605
  var createBreakpoints = function createBreakpoints2(config2) {
13350
13606
  warn({
13351
13607
  condition: true,
13352
13608
  message: ["[chakra-ui]: createBreakpoints(...) will be deprecated pretty soon", "simply pass the breakpoints as an object. Remove the createBreakpoint(..) call"].join("")
13353
13609
  });
13354
- return _extends$b({
13610
+ return _extends$e({
13355
13611
  base: "0em"
13356
13612
  }, config2);
13357
13613
  };
@@ -13986,7 +14242,7 @@ var variantGhost = function variantGhost2(props) {
13986
14242
  var variantOutline$1 = function variantOutline2(props) {
13987
14243
  var c2 = props.colorScheme;
13988
14244
  var borderColor = mode("gray.200", "whiteAlpha.300")(props);
13989
- return _extends$c({
14245
+ return _extends$f({
13990
14246
  border: "1px solid",
13991
14247
  borderColor: c2 === "gray" ? borderColor : "currentColor"
13992
14248
  }, variantGhost(props));
@@ -14331,7 +14587,7 @@ var baseStyleDialogContainer$1 = {
14331
14587
  };
14332
14588
  var baseStyleDialog$1 = function baseStyleDialog(props) {
14333
14589
  var isFullHeight = props.isFullHeight;
14334
- return _extends$c({}, isFullHeight && {
14590
+ return _extends$f({}, isFullHeight && {
14335
14591
  height: "100vh"
14336
14592
  }, {
14337
14593
  zIndex: "modal",
@@ -14999,7 +15255,7 @@ function getSize(size2) {
14999
15255
  var _fontSize = (_sizeStyle$field$font = (_sizeStyle$field = sizeStyle.field) == null ? void 0 : _sizeStyle$field.fontSize) != null ? _sizeStyle$field$font : "md";
15000
15256
  var fontSize = typography$1.fontSizes[_fontSize.toString()];
15001
15257
  return {
15002
- field: _extends$c({}, sizeStyle.field, {
15258
+ field: _extends$f({}, sizeStyle.field, {
15003
15259
  paddingInlineEnd: $inputPadding.reference,
15004
15260
  verticalAlign: "top"
15005
15261
  }),
@@ -15030,7 +15286,7 @@ var numberInput = {
15030
15286
  defaultProps: defaultProps$b
15031
15287
  };
15032
15288
  var _Input$variants$unsty$1;
15033
- var baseStyle$f = _extends$c({}, Input.baseStyle.field, {
15289
+ var baseStyle$f = _extends$f({}, Input.baseStyle.field, {
15034
15290
  textAlign: "center"
15035
15291
  });
15036
15292
  var sizes$b = {
@@ -15138,7 +15394,7 @@ function filledStyle(props) {
15138
15394
  var bgColor = mode(c2 + ".500", c2 + ".200")(props);
15139
15395
  var gradient = "linear-gradient(\n to right,\n transparent 0%,\n " + getColor(t2, bgColor) + " 50%,\n transparent 100%\n )";
15140
15396
  var addStripe = !isIndeterminate && hasStripe;
15141
- return _extends$c({}, addStripe && stripeStyle, isIndeterminate ? {
15397
+ return _extends$f({}, addStripe && stripeStyle, isIndeterminate ? {
15142
15398
  bgImage: gradient
15143
15399
  } : {
15144
15400
  bgColor
@@ -15156,7 +15412,7 @@ var baseStyleTrack$2 = function baseStyleTrack(props) {
15156
15412
  };
15157
15413
  };
15158
15414
  var baseStyleFilledTrack$1 = function baseStyleFilledTrack(props) {
15159
- return _extends$c({
15415
+ return _extends$f({
15160
15416
  transitionProperty: "common",
15161
15417
  transitionDuration: "slow"
15162
15418
  }, filledStyle(props));
@@ -15202,9 +15458,9 @@ var progress$1 = {
15202
15458
  };
15203
15459
  var baseStyleControl2 = function baseStyleControl3(props) {
15204
15460
  var _Checkbox$baseStyle = Checkbox.baseStyle(props), _Checkbox$baseStyle$c = _Checkbox$baseStyle.control, control = _Checkbox$baseStyle$c === void 0 ? {} : _Checkbox$baseStyle$c;
15205
- return _extends$c({}, control, {
15461
+ return _extends$f({}, control, {
15206
15462
  borderRadius: "full",
15207
- _checked: _extends$c({}, control["_checked"], {
15463
+ _checked: _extends$f({}, control["_checked"], {
15208
15464
  _before: {
15209
15465
  content: '""',
15210
15466
  display: "inline-block",
@@ -15264,7 +15520,7 @@ var radio = {
15264
15520
  defaultProps: defaultProps$8
15265
15521
  };
15266
15522
  var baseStyleField = function baseStyleField2(props) {
15267
- return _extends$c({}, Input.baseStyle.field, {
15523
+ return _extends$f({}, Input.baseStyle.field, {
15268
15524
  bg: mode("white", "gray.700")(props),
15269
15525
  appearance: "none",
15270
15526
  paddingBottom: "1px",
@@ -15385,7 +15641,7 @@ function thumbOrientation(props) {
15385
15641
  }
15386
15642
  var baseStyleContainer$1 = function baseStyleContainer2(props) {
15387
15643
  var orientation = props.orientation;
15388
- return _extends$c({
15644
+ return _extends$f({
15389
15645
  display: "inline-block",
15390
15646
  position: "relative",
15391
15647
  cursor: "pointer",
@@ -15415,7 +15671,7 @@ var baseStyleTrack$1 = function baseStyleTrack2(props) {
15415
15671
  };
15416
15672
  };
15417
15673
  var baseStyleThumb$1 = function baseStyleThumb(props) {
15418
- return _extends$c({
15674
+ return _extends$f({
15419
15675
  display: "flex",
15420
15676
  alignItems: "center",
15421
15677
  justifyContent: "center",
@@ -15685,12 +15941,12 @@ var numericStyles = {
15685
15941
  var variantSimple = function variantSimple2(props) {
15686
15942
  var c2 = props.colorScheme;
15687
15943
  return {
15688
- th: _extends$c({
15944
+ th: _extends$f({
15689
15945
  color: mode("gray.600", "gray.400")(props),
15690
15946
  borderBottom: "1px",
15691
15947
  borderColor: mode(c2 + ".100", c2 + ".700")(props)
15692
15948
  }, numericStyles),
15693
- td: _extends$c({
15949
+ td: _extends$f({
15694
15950
  borderBottom: "1px",
15695
15951
  borderColor: mode(c2 + ".100", c2 + ".700")(props)
15696
15952
  }, numericStyles),
@@ -15711,12 +15967,12 @@ var variantSimple = function variantSimple2(props) {
15711
15967
  var variantStripe = function variantStripe2(props) {
15712
15968
  var c2 = props.colorScheme;
15713
15969
  return {
15714
- th: _extends$c({
15970
+ th: _extends$f({
15715
15971
  color: mode("gray.600", "gray.400")(props),
15716
15972
  borderBottom: "1px",
15717
15973
  borderColor: mode(c2 + ".100", c2 + ".700")(props)
15718
15974
  }, numericStyles),
15719
- td: _extends$c({
15975
+ td: _extends$f({
15720
15976
  borderBottom: "1px",
15721
15977
  borderColor: mode(c2 + ".100", c2 + ".700")(props)
15722
15978
  }, numericStyles),
@@ -16104,7 +16360,7 @@ var tag = {
16104
16360
  defaultProps: defaultProps$1
16105
16361
  };
16106
16362
  var _Input$variants$unsty, _Input$sizes$xs$field, _Input$sizes$sm$field, _Input$sizes$md$field, _Input$sizes$lg$field;
16107
- var baseStyle$1 = _extends$c({}, Input.baseStyle.field, {
16363
+ var baseStyle$1 = _extends$f({}, Input.baseStyle.field, {
16108
16364
  paddingY: "8px",
16109
16365
  minHeight: "80px",
16110
16366
  lineHeight: "short",
@@ -16505,7 +16761,7 @@ var blur2 = {
16505
16761
  "2xl": "40px",
16506
16762
  "3xl": "64px"
16507
16763
  };
16508
- var foundations = _extends$c({
16764
+ var foundations = _extends$f({
16509
16765
  breakpoints,
16510
16766
  zIndices,
16511
16767
  radii: radii$1,
@@ -16555,15 +16811,15 @@ var config = {
16555
16811
  initialColorMode: "light",
16556
16812
  cssVarPrefix: "chakra"
16557
16813
  };
16558
- var theme$1 = _extends$c({
16814
+ var theme$1 = _extends$f({
16559
16815
  direction
16560
16816
  }, foundations, {
16561
16817
  components,
16562
16818
  styles: styles$1$1,
16563
16819
  config
16564
16820
  });
16565
- function _extends$a() {
16566
- _extends$a = Object.assign || function(target) {
16821
+ function _extends$d() {
16822
+ _extends$d = Object.assign || function(target) {
16567
16823
  for (var i2 = 1; i2 < arguments.length; i2++) {
16568
16824
  var source = arguments[i2];
16569
16825
  for (var key in source) {
@@ -16574,9 +16830,9 @@ function _extends$a() {
16574
16830
  }
16575
16831
  return target;
16576
16832
  };
16577
- return _extends$a.apply(this, arguments);
16833
+ return _extends$d.apply(this, arguments);
16578
16834
  }
16579
- function _objectWithoutPropertiesLoose$b(source, excluded) {
16835
+ function _objectWithoutPropertiesLoose$d(source, excluded) {
16580
16836
  if (source == null)
16581
16837
  return {};
16582
16838
  var target = {};
@@ -16613,9 +16869,9 @@ var fallbackIcon = {
16613
16869
  viewBox: "0 0 24 24"
16614
16870
  };
16615
16871
  var Icon = /* @__PURE__ */ forwardRef(function(props, ref) {
16616
- var element = props.as, viewBox = props.viewBox, _props$color = props.color, color2 = _props$color === void 0 ? "currentColor" : _props$color, _props$focusable = props.focusable, focusable = _props$focusable === void 0 ? false : _props$focusable, children = props.children, className = props.className, __css = props.__css, rest = _objectWithoutPropertiesLoose$b(props, _excluded$d);
16872
+ var element = props.as, viewBox = props.viewBox, _props$color = props.color, color2 = _props$color === void 0 ? "currentColor" : _props$color, _props$focusable = props.focusable, focusable = _props$focusable === void 0 ? false : _props$focusable, children = props.children, className = props.className, __css = props.__css, rest = _objectWithoutPropertiesLoose$d(props, _excluded$d);
16617
16873
  var _className = cx("chakra-icon", className);
16618
- var styles2 = _extends$a({
16874
+ var styles2 = _extends$d({
16619
16875
  w: "1em",
16620
16876
  h: "1em",
16621
16877
  display: "inline-block",
@@ -16631,12 +16887,12 @@ var Icon = /* @__PURE__ */ forwardRef(function(props, ref) {
16631
16887
  };
16632
16888
  var _viewBox = viewBox != null ? viewBox : fallbackIcon.viewBox;
16633
16889
  if (element && typeof element !== "string") {
16634
- return /* @__PURE__ */ React.createElement(chakra.svg, _extends$a({
16890
+ return /* @__PURE__ */ React.createElement(chakra.svg, _extends$d({
16635
16891
  as: element
16636
16892
  }, shared, rest));
16637
16893
  }
16638
16894
  var _path = children != null ? children : fallbackIcon.path;
16639
- return /* @__PURE__ */ React.createElement(chakra.svg, _extends$a({
16895
+ return /* @__PURE__ */ React.createElement(chakra.svg, _extends$d({
16640
16896
  verticalAlign: "middle",
16641
16897
  viewBox: _viewBox
16642
16898
  }, shared, rest), _path);
@@ -22816,7 +23072,7 @@ function updateChildLookup(children, allChildren) {
22816
23072
  function onlyElements(children) {
22817
23073
  var filtered = [];
22818
23074
  Children.forEach(children, function(child) {
22819
- if (isValidElement(child))
23075
+ if (isValidElement$1(child))
22820
23076
  filtered.push(child);
22821
23077
  });
22822
23078
  return filtered;
@@ -22894,7 +23150,7 @@ var AnimatePresence = function(_a) {
22894
23150
  return cloneElement(child);
22895
23151
  }));
22896
23152
  };
22897
- function _objectWithoutPropertiesLoose$a(source, excluded) {
23153
+ function _objectWithoutPropertiesLoose$c(source, excluded) {
22898
23154
  if (source == null)
22899
23155
  return {};
22900
23156
  var target = {};
@@ -22908,8 +23164,8 @@ function _objectWithoutPropertiesLoose$a(source, excluded) {
22908
23164
  }
22909
23165
  return target;
22910
23166
  }
22911
- function _extends$9() {
22912
- _extends$9 = Object.assign || function(target) {
23167
+ function _extends$c() {
23168
+ _extends$c = Object.assign || function(target) {
22913
23169
  for (var i2 = 1; i2 < arguments.length; i2++) {
22914
23170
  var source = arguments[i2];
22915
23171
  for (var key in source) {
@@ -22920,7 +23176,7 @@ function _extends$9() {
22920
23176
  }
22921
23177
  return target;
22922
23178
  };
22923
- return _extends$9.apply(this, arguments);
23179
+ return _extends$c.apply(this, arguments);
22924
23180
  }
22925
23181
  var TransitionEasings = {
22926
23182
  ease: [0.25, 0.1, 0.25, 1],
@@ -23070,12 +23326,12 @@ var TransitionDefaults = {
23070
23326
  };
23071
23327
  var withDelay = {
23072
23328
  enter: function enter(transition2, delay) {
23073
- return _extends$9({}, transition2, {
23329
+ return _extends$c({}, transition2, {
23074
23330
  delay: isNumber(delay) ? delay : delay == null ? void 0 : delay["enter"]
23075
23331
  });
23076
23332
  },
23077
23333
  exit: function exit(transition2, delay) {
23078
- return _extends$9({}, transition2, {
23334
+ return _extends$c({}, transition2, {
23079
23335
  delay: isNumber(delay) ? delay : delay == null ? void 0 : delay["exit"]
23080
23336
  });
23081
23337
  }
@@ -23110,13 +23366,13 @@ var variants$2 = {
23110
23366
  exit: function exit3(_ref2) {
23111
23367
  var _transition$exit;
23112
23368
  var reverse = _ref2.reverse, initialScale = _ref2.initialScale, transition2 = _ref2.transition, transitionEnd = _ref2.transitionEnd, delay = _ref2.delay;
23113
- return _extends$9({
23369
+ return _extends$c({
23114
23370
  opacity: 0
23115
23371
  }, reverse ? {
23116
23372
  scale: initialScale,
23117
23373
  transitionEnd: transitionEnd == null ? void 0 : transitionEnd.exit
23118
23374
  } : {
23119
- transitionEnd: _extends$9({
23375
+ transitionEnd: _extends$c({
23120
23376
  scale: initialScale
23121
23377
  }, transitionEnd == null ? void 0 : transitionEnd.exit)
23122
23378
  }, {
@@ -23140,7 +23396,7 @@ var scaleFadeConfig = {
23140
23396
  exit: "exit",
23141
23397
  variants: variants$2
23142
23398
  };
23143
- var _excluded$1$3 = ["direction", "style", "unmountOnExit", "in", "className", "transition", "transitionEnd", "delay"];
23399
+ var _excluded$1$4 = ["direction", "style", "unmountOnExit", "in", "className", "transition", "transitionEnd", "delay"];
23144
23400
  var defaultTransition = {
23145
23401
  exit: {
23146
23402
  duration: 0.15,
@@ -23159,7 +23415,7 @@ var variants$1 = {
23159
23415
  var _slideTransition = slideTransition({
23160
23416
  direction: direction2
23161
23417
  }), exitStyles = _slideTransition.exit;
23162
- return _extends$9({}, exitStyles, {
23418
+ return _extends$c({}, exitStyles, {
23163
23419
  transition: (_transition$exit = transition2 == null ? void 0 : transition2.exit) != null ? _transition$exit : withDelay.exit(defaultTransition.exit, delay),
23164
23420
  transitionEnd: transitionEnd == null ? void 0 : transitionEnd.exit
23165
23421
  });
@@ -23170,14 +23426,14 @@ var variants$1 = {
23170
23426
  var _slideTransition2 = slideTransition({
23171
23427
  direction: direction2
23172
23428
  }), enterStyles = _slideTransition2.enter;
23173
- return _extends$9({}, enterStyles, {
23429
+ return _extends$c({}, enterStyles, {
23174
23430
  transition: (_transition$enter = transition2 == null ? void 0 : transition2.enter) != null ? _transition$enter : withDelay.enter(defaultTransition.enter, delay),
23175
23431
  transitionEnd: transitionEnd == null ? void 0 : transitionEnd.enter
23176
23432
  });
23177
23433
  }
23178
23434
  };
23179
23435
  var Slide = /* @__PURE__ */ React.forwardRef(function(props, ref) {
23180
- var _props$direction = props.direction, direction2 = _props$direction === void 0 ? "right" : _props$direction, style = props.style, unmountOnExit = props.unmountOnExit, isOpen = props["in"], className = props.className, transition2 = props.transition, transitionEnd = props.transitionEnd, delay = props.delay, rest = _objectWithoutPropertiesLoose$a(props, _excluded$1$3);
23436
+ var _props$direction = props.direction, direction2 = _props$direction === void 0 ? "right" : _props$direction, style = props.style, unmountOnExit = props.unmountOnExit, isOpen = props["in"], className = props.className, transition2 = props.transition, transitionEnd = props.transitionEnd, delay = props.delay, rest = _objectWithoutPropertiesLoose$c(props, _excluded$1$4);
23181
23437
  var transitionStyles = slideTransition({
23182
23438
  direction: direction2
23183
23439
  });
@@ -23194,7 +23450,7 @@ var Slide = /* @__PURE__ */ React.forwardRef(function(props, ref) {
23194
23450
  };
23195
23451
  return /* @__PURE__ */ React.createElement(AnimatePresence, {
23196
23452
  custom
23197
- }, show && /* @__PURE__ */ React.createElement(motion.div, _extends$9({}, rest, {
23453
+ }, show && /* @__PURE__ */ React.createElement(motion.div, _extends$c({}, rest, {
23198
23454
  ref,
23199
23455
  initial: "exit",
23200
23456
  className: cx("chakra-slide", className),
@@ -23235,13 +23491,13 @@ var variants = {
23235
23491
  x: offsetX,
23236
23492
  y: offsetY
23237
23493
  };
23238
- return _extends$9({
23494
+ return _extends$c({
23239
23495
  opacity: 0,
23240
23496
  transition: (_transition$exit2 = transition2 == null ? void 0 : transition2.exit) != null ? _transition$exit2 : withDelay.exit(TransitionDefaults.exit, delay)
23241
- }, reverse ? _extends$9({}, offset2, {
23497
+ }, reverse ? _extends$c({}, offset2, {
23242
23498
  transitionEnd: transitionEnd == null ? void 0 : transitionEnd.exit
23243
23499
  }) : {
23244
- transitionEnd: _extends$9({}, offset2, transitionEnd == null ? void 0 : transitionEnd.exit)
23500
+ transitionEnd: _extends$c({}, offset2, transitionEnd == null ? void 0 : transitionEnd.exit)
23245
23501
  });
23246
23502
  }
23247
23503
  };
@@ -23251,8 +23507,8 @@ var slideFadeConfig = {
23251
23507
  exit: "exit",
23252
23508
  variants
23253
23509
  };
23254
- function _extends$8() {
23255
- _extends$8 = Object.assign || function(target) {
23510
+ function _extends$b() {
23511
+ _extends$b = Object.assign || function(target) {
23256
23512
  for (var i2 = 1; i2 < arguments.length; i2++) {
23257
23513
  var source = arguments[i2];
23258
23514
  for (var key in source) {
@@ -23263,9 +23519,249 @@ function _extends$8() {
23263
23519
  }
23264
23520
  return target;
23265
23521
  };
23266
- return _extends$8.apply(this, arguments);
23522
+ return _extends$b.apply(this, arguments);
23267
23523
  }
23268
- function _objectWithoutPropertiesLoose$9(source, excluded) {
23524
+ function sortNodes(nodes) {
23525
+ return nodes.sort(function(a2, b2) {
23526
+ var compare = a2.compareDocumentPosition(b2);
23527
+ if (compare & Node.DOCUMENT_POSITION_FOLLOWING || compare & Node.DOCUMENT_POSITION_CONTAINED_BY) {
23528
+ return -1;
23529
+ }
23530
+ if (compare & Node.DOCUMENT_POSITION_PRECEDING || compare & Node.DOCUMENT_POSITION_CONTAINS) {
23531
+ return 1;
23532
+ }
23533
+ if (compare & Node.DOCUMENT_POSITION_DISCONNECTED || compare & Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC) {
23534
+ throw Error("Cannot sort the given nodes.");
23535
+ } else {
23536
+ return 0;
23537
+ }
23538
+ });
23539
+ }
23540
+ var isElement$1 = function isElement(el) {
23541
+ return typeof el == "object" && "nodeType" in el && el.nodeType === Node.ELEMENT_NODE;
23542
+ };
23543
+ function getNextIndex(current, max2, loop) {
23544
+ var next2 = current + 1;
23545
+ if (loop && next2 >= max2)
23546
+ next2 = 0;
23547
+ return next2;
23548
+ }
23549
+ function getPrevIndex(current, max2, loop) {
23550
+ var next2 = current - 1;
23551
+ if (loop && next2 < 0)
23552
+ next2 = max2;
23553
+ return next2;
23554
+ }
23555
+ var useSafeLayoutEffect$1 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
23556
+ var cast = function cast2(value) {
23557
+ return value;
23558
+ };
23559
+ var DescendantsManager = function DescendantsManager2() {
23560
+ var _this = this;
23561
+ this.descendants = /* @__PURE__ */ new Map();
23562
+ this.register = function(nodeOrOptions) {
23563
+ if (nodeOrOptions == null)
23564
+ return;
23565
+ if (isElement$1(nodeOrOptions)) {
23566
+ return _this.registerNode(nodeOrOptions);
23567
+ }
23568
+ return function(node2) {
23569
+ _this.registerNode(node2, nodeOrOptions);
23570
+ };
23571
+ };
23572
+ this.unregister = function(node2) {
23573
+ _this.descendants["delete"](node2);
23574
+ var sorted = sortNodes(Array.from(_this.descendants.keys()));
23575
+ _this.assignIndex(sorted);
23576
+ };
23577
+ this.destroy = function() {
23578
+ _this.descendants.clear();
23579
+ };
23580
+ this.assignIndex = function(descendants) {
23581
+ _this.descendants.forEach(function(descendant) {
23582
+ var index2 = descendants.indexOf(descendant.node);
23583
+ descendant.index = index2;
23584
+ descendant.node.dataset["index"] = descendant.index.toString();
23585
+ });
23586
+ };
23587
+ this.count = function() {
23588
+ return _this.descendants.size;
23589
+ };
23590
+ this.enabledCount = function() {
23591
+ return _this.enabledValues().length;
23592
+ };
23593
+ this.values = function() {
23594
+ var values = Array.from(_this.descendants.values());
23595
+ return values.sort(function(a2, b2) {
23596
+ return a2.index - b2.index;
23597
+ });
23598
+ };
23599
+ this.enabledValues = function() {
23600
+ return _this.values().filter(function(descendant) {
23601
+ return !descendant.disabled;
23602
+ });
23603
+ };
23604
+ this.item = function(index2) {
23605
+ if (_this.count() === 0)
23606
+ return void 0;
23607
+ return _this.values()[index2];
23608
+ };
23609
+ this.enabledItem = function(index2) {
23610
+ if (_this.enabledCount() === 0)
23611
+ return void 0;
23612
+ return _this.enabledValues()[index2];
23613
+ };
23614
+ this.first = function() {
23615
+ return _this.item(0);
23616
+ };
23617
+ this.firstEnabled = function() {
23618
+ return _this.enabledItem(0);
23619
+ };
23620
+ this.last = function() {
23621
+ return _this.item(_this.descendants.size - 1);
23622
+ };
23623
+ this.lastEnabled = function() {
23624
+ var lastIndex = _this.enabledValues().length - 1;
23625
+ return _this.enabledItem(lastIndex);
23626
+ };
23627
+ this.indexOf = function(node2) {
23628
+ var _this$descendants$get, _this$descendants$get2;
23629
+ if (!node2)
23630
+ return -1;
23631
+ return (_this$descendants$get = (_this$descendants$get2 = _this.descendants.get(node2)) == null ? void 0 : _this$descendants$get2.index) != null ? _this$descendants$get : -1;
23632
+ };
23633
+ this.enabledIndexOf = function(node2) {
23634
+ if (node2 == null)
23635
+ return -1;
23636
+ return _this.enabledValues().findIndex(function(i2) {
23637
+ return i2.node.isSameNode(node2);
23638
+ });
23639
+ };
23640
+ this.next = function(index2, loop) {
23641
+ if (loop === void 0) {
23642
+ loop = true;
23643
+ }
23644
+ var next2 = getNextIndex(index2, _this.count(), loop);
23645
+ return _this.item(next2);
23646
+ };
23647
+ this.nextEnabled = function(index2, loop) {
23648
+ if (loop === void 0) {
23649
+ loop = true;
23650
+ }
23651
+ var item = _this.item(index2);
23652
+ if (!item)
23653
+ return;
23654
+ var enabledIndex = _this.enabledIndexOf(item.node);
23655
+ var nextEnabledIndex = getNextIndex(enabledIndex, _this.enabledCount(), loop);
23656
+ return _this.enabledItem(nextEnabledIndex);
23657
+ };
23658
+ this.prev = function(index2, loop) {
23659
+ if (loop === void 0) {
23660
+ loop = true;
23661
+ }
23662
+ var prev2 = getPrevIndex(index2, _this.count() - 1, loop);
23663
+ return _this.item(prev2);
23664
+ };
23665
+ this.prevEnabled = function(index2, loop) {
23666
+ if (loop === void 0) {
23667
+ loop = true;
23668
+ }
23669
+ var item = _this.item(index2);
23670
+ if (!item)
23671
+ return;
23672
+ var enabledIndex = _this.enabledIndexOf(item.node);
23673
+ var prevEnabledIndex = getPrevIndex(enabledIndex, _this.enabledCount() - 1, loop);
23674
+ return _this.enabledItem(prevEnabledIndex);
23675
+ };
23676
+ this.registerNode = function(node2, options) {
23677
+ if (!node2 || _this.descendants.has(node2))
23678
+ return;
23679
+ var keys2 = Array.from(_this.descendants.keys()).concat(node2);
23680
+ var sorted = sortNodes(keys2);
23681
+ if (options != null && options.disabled) {
23682
+ options.disabled = !!options.disabled;
23683
+ }
23684
+ var descendant = _extends$b({
23685
+ node: node2,
23686
+ index: -1
23687
+ }, options);
23688
+ _this.descendants.set(node2, descendant);
23689
+ _this.assignIndex(sorted);
23690
+ };
23691
+ };
23692
+ function useDescendants() {
23693
+ var descendants = useRef(new DescendantsManager());
23694
+ useSafeLayoutEffect$1(function() {
23695
+ return function() {
23696
+ return descendants.current.destroy();
23697
+ };
23698
+ });
23699
+ return descendants.current;
23700
+ }
23701
+ var _createContext$5 = createContext({
23702
+ name: "DescendantsProvider",
23703
+ errorMessage: "useDescendantsContext must be used within DescendantsProvider"
23704
+ }), DescendantsContextProvider = _createContext$5[0], useDescendantsContext = _createContext$5[1];
23705
+ function useDescendant(options) {
23706
+ var descendants = useDescendantsContext();
23707
+ var _useState = useState(-1), index2 = _useState[0], setIndex = _useState[1];
23708
+ var ref = useRef(null);
23709
+ useSafeLayoutEffect$1(function() {
23710
+ return function() {
23711
+ if (!ref.current)
23712
+ return;
23713
+ descendants.unregister(ref.current);
23714
+ };
23715
+ }, []);
23716
+ useSafeLayoutEffect$1(function() {
23717
+ if (!ref.current)
23718
+ return;
23719
+ var dataIndex = Number(ref.current.dataset["index"]);
23720
+ if (index2 != dataIndex && !Number.isNaN(dataIndex)) {
23721
+ setIndex(dataIndex);
23722
+ }
23723
+ });
23724
+ var refCallback = options ? cast(descendants.register(options)) : cast(descendants.register);
23725
+ return {
23726
+ descendants,
23727
+ index: index2,
23728
+ enabledIndex: descendants.enabledIndexOf(ref.current),
23729
+ register: mergeRefs(refCallback, ref)
23730
+ };
23731
+ }
23732
+ function createDescendantContext() {
23733
+ var ContextProvider = cast(DescendantsContextProvider);
23734
+ var _useDescendantsContext = function _useDescendantsContext2() {
23735
+ return cast(useDescendantsContext());
23736
+ };
23737
+ var _useDescendant = function _useDescendant2(options) {
23738
+ return useDescendant(options);
23739
+ };
23740
+ var _useDescendants = function _useDescendants2() {
23741
+ return useDescendants();
23742
+ };
23743
+ return [
23744
+ ContextProvider,
23745
+ _useDescendantsContext,
23746
+ _useDescendants,
23747
+ _useDescendant
23748
+ ];
23749
+ }
23750
+ function _extends$a() {
23751
+ _extends$a = Object.assign || function(target) {
23752
+ for (var i2 = 1; i2 < arguments.length; i2++) {
23753
+ var source = arguments[i2];
23754
+ for (var key in source) {
23755
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
23756
+ target[key] = source[key];
23757
+ }
23758
+ }
23759
+ }
23760
+ return target;
23761
+ };
23762
+ return _extends$a.apply(this, arguments);
23763
+ }
23764
+ function _objectWithoutPropertiesLoose$b(source, excluded) {
23269
23765
  if (source == null)
23270
23766
  return {};
23271
23767
  var target = {};
@@ -23319,7 +23815,7 @@ function useImage(props) {
23319
23815
  imageRef.current = null;
23320
23816
  }
23321
23817
  };
23322
- useSafeLayoutEffect$1(function() {
23818
+ useSafeLayoutEffect$2(function() {
23323
23819
  if (ignoreFallback)
23324
23820
  return void 0;
23325
23821
  if (status === "loading") {
@@ -23331,10 +23827,10 @@ function useImage(props) {
23331
23827
  }, [status, load, ignoreFallback]);
23332
23828
  return ignoreFallback ? "loaded" : status;
23333
23829
  }
23334
- var _excluded$c = ["htmlWidth", "htmlHeight", "alt"], _excluded2$3 = ["fallbackSrc", "fallback", "src", "srcSet", "align", "fit", "loading", "ignoreFallback", "crossOrigin"];
23830
+ var _excluded$c = ["htmlWidth", "htmlHeight", "alt"], _excluded2$4 = ["fallbackSrc", "fallback", "src", "srcSet", "align", "fit", "loading", "ignoreFallback", "crossOrigin"];
23335
23831
  var NativeImage = /* @__PURE__ */ React.forwardRef(function(props, ref) {
23336
- var htmlWidth = props.htmlWidth, htmlHeight = props.htmlHeight, alt = props.alt, rest = _objectWithoutPropertiesLoose$9(props, _excluded$c);
23337
- return /* @__PURE__ */ React.createElement("img", _extends$8({
23832
+ var htmlWidth = props.htmlWidth, htmlHeight = props.htmlHeight, alt = props.alt, rest = _objectWithoutPropertiesLoose$b(props, _excluded$c);
23833
+ return /* @__PURE__ */ React.createElement("img", _extends$a({
23338
23834
  width: htmlWidth,
23339
23835
  height: htmlHeight,
23340
23836
  ref,
@@ -23342,12 +23838,12 @@ var NativeImage = /* @__PURE__ */ React.forwardRef(function(props, ref) {
23342
23838
  }, rest));
23343
23839
  });
23344
23840
  var Image$1 = /* @__PURE__ */ forwardRef(function(props, ref) {
23345
- var fallbackSrc = props.fallbackSrc, fallback = props.fallback, src = props.src, srcSet = props.srcSet, align = props.align, fit = props.fit, loading = props.loading, ignoreFallback = props.ignoreFallback, crossOrigin = props.crossOrigin, rest = _objectWithoutPropertiesLoose$9(props, _excluded2$3);
23841
+ var fallbackSrc = props.fallbackSrc, fallback = props.fallback, src = props.src, srcSet = props.srcSet, align = props.align, fit = props.fit, loading = props.loading, ignoreFallback = props.ignoreFallback, crossOrigin = props.crossOrigin, rest = _objectWithoutPropertiesLoose$b(props, _excluded2$4);
23346
23842
  var shouldIgnore = loading != null || ignoreFallback || fallbackSrc === void 0 && fallback === void 0;
23347
- var status = useImage(_extends$8({}, props, {
23843
+ var status = useImage(_extends$a({}, props, {
23348
23844
  ignoreFallback: shouldIgnore
23349
23845
  }));
23350
- var shared = _extends$8({
23846
+ var shared = _extends$a({
23351
23847
  ref,
23352
23848
  objectFit: fit,
23353
23849
  objectPosition: align
@@ -23355,13 +23851,13 @@ var Image$1 = /* @__PURE__ */ forwardRef(function(props, ref) {
23355
23851
  if (status !== "loaded") {
23356
23852
  if (fallback)
23357
23853
  return fallback;
23358
- return /* @__PURE__ */ React.createElement(chakra.img, _extends$8({
23854
+ return /* @__PURE__ */ React.createElement(chakra.img, _extends$a({
23359
23855
  as: NativeImage,
23360
23856
  className: "chakra-image__placeholder",
23361
23857
  src: fallbackSrc
23362
23858
  }, shared));
23363
23859
  }
23364
- return /* @__PURE__ */ React.createElement(chakra.img, _extends$8({
23860
+ return /* @__PURE__ */ React.createElement(chakra.img, _extends$a({
23365
23861
  as: NativeImage,
23366
23862
  src,
23367
23863
  srcSet,
@@ -23387,8 +23883,8 @@ var VisuallyHidden = chakra("span", {
23387
23883
  chakra("input", {
23388
23884
  baseStyle: visuallyHiddenStyle
23389
23885
  });
23390
- function _extends$7() {
23391
- _extends$7 = Object.assign || function(target) {
23886
+ function _extends$9() {
23887
+ _extends$9 = Object.assign || function(target) {
23392
23888
  for (var i2 = 1; i2 < arguments.length; i2++) {
23393
23889
  var source = arguments[i2];
23394
23890
  for (var key in source) {
@@ -23399,9 +23895,9 @@ function _extends$7() {
23399
23895
  }
23400
23896
  return target;
23401
23897
  };
23402
- return _extends$7.apply(this, arguments);
23898
+ return _extends$9.apply(this, arguments);
23403
23899
  }
23404
- function _objectWithoutPropertiesLoose$8(source, excluded) {
23900
+ function _objectWithoutPropertiesLoose$a(source, excluded) {
23405
23901
  if (source == null)
23406
23902
  return {};
23407
23903
  var target = {};
@@ -23426,9 +23922,9 @@ var spin$1 = keyframes$2({
23426
23922
  });
23427
23923
  var Spinner = /* @__PURE__ */ forwardRef(function(props, ref) {
23428
23924
  var styles2 = useStyleConfig("Spinner", props);
23429
- var _omitThemingProps = omitThemingProps(props), _omitThemingProps$lab = _omitThemingProps.label, label = _omitThemingProps$lab === void 0 ? "Loading..." : _omitThemingProps$lab, _omitThemingProps$thi = _omitThemingProps.thickness, thickness = _omitThemingProps$thi === void 0 ? "2px" : _omitThemingProps$thi, _omitThemingProps$spe = _omitThemingProps.speed, speed = _omitThemingProps$spe === void 0 ? "0.45s" : _omitThemingProps$spe, _omitThemingProps$emp = _omitThemingProps.emptyColor, emptyColor = _omitThemingProps$emp === void 0 ? "transparent" : _omitThemingProps$emp, className = _omitThemingProps.className, rest = _objectWithoutPropertiesLoose$8(_omitThemingProps, _excluded$b);
23925
+ var _omitThemingProps = omitThemingProps(props), _omitThemingProps$lab = _omitThemingProps.label, label = _omitThemingProps$lab === void 0 ? "Loading..." : _omitThemingProps$lab, _omitThemingProps$thi = _omitThemingProps.thickness, thickness = _omitThemingProps$thi === void 0 ? "2px" : _omitThemingProps$thi, _omitThemingProps$spe = _omitThemingProps.speed, speed = _omitThemingProps$spe === void 0 ? "0.45s" : _omitThemingProps$spe, _omitThemingProps$emp = _omitThemingProps.emptyColor, emptyColor = _omitThemingProps$emp === void 0 ? "transparent" : _omitThemingProps$emp, className = _omitThemingProps.className, rest = _objectWithoutPropertiesLoose$a(_omitThemingProps, _excluded$b);
23430
23926
  var _className = cx("chakra-spinner", className);
23431
- var spinnerStyles = _extends$7({
23927
+ var spinnerStyles = _extends$9({
23432
23928
  display: "inline-block",
23433
23929
  borderColor: "currentColor",
23434
23930
  borderStyle: "solid",
@@ -23438,13 +23934,13 @@ var Spinner = /* @__PURE__ */ forwardRef(function(props, ref) {
23438
23934
  borderLeftColor: emptyColor,
23439
23935
  animation: spin$1 + " " + speed + " linear infinite"
23440
23936
  }, styles2);
23441
- return /* @__PURE__ */ React.createElement(chakra.div, _extends$7({
23937
+ return /* @__PURE__ */ React.createElement(chakra.div, _extends$9({
23442
23938
  ref,
23443
23939
  __css: spinnerStyles,
23444
23940
  className: _className
23445
23941
  }, rest), label && /* @__PURE__ */ React.createElement(VisuallyHidden, null, label));
23446
23942
  });
23447
- function _objectWithoutPropertiesLoose$7(source, excluded) {
23943
+ function _objectWithoutPropertiesLoose$9(source, excluded) {
23448
23944
  if (source == null)
23449
23945
  return {};
23450
23946
  var target = {};
@@ -23458,8 +23954,8 @@ function _objectWithoutPropertiesLoose$7(source, excluded) {
23458
23954
  }
23459
23955
  return target;
23460
23956
  }
23461
- function _extends$6() {
23462
- _extends$6 = Object.assign || function(target) {
23957
+ function _extends$8() {
23958
+ _extends$8 = Object.assign || function(target) {
23463
23959
  for (var i2 = 1; i2 < arguments.length; i2++) {
23464
23960
  var source = arguments[i2];
23465
23961
  for (var key in source) {
@@ -23470,30 +23966,30 @@ function _extends$6() {
23470
23966
  }
23471
23967
  return target;
23472
23968
  };
23473
- return _extends$6.apply(this, arguments);
23969
+ return _extends$8.apply(this, arguments);
23474
23970
  }
23475
- var _createContext$3 = createContext({
23971
+ var _createContext$4 = createContext({
23476
23972
  strict: false,
23477
23973
  name: "ButtonGroupContext"
23478
- }), useButtonGroup = _createContext$3[1];
23974
+ }), useButtonGroup = _createContext$4[1];
23479
23975
  var _excluded$3$2 = ["label", "placement", "spacing", "children", "className", "__css"];
23480
23976
  var ButtonSpinner = function ButtonSpinner2(props) {
23481
23977
  var label = props.label, placement = props.placement, _props$spacing = props.spacing, spacing2 = _props$spacing === void 0 ? "0.5rem" : _props$spacing, _props$children = props.children, children = _props$children === void 0 ? /* @__PURE__ */ React.createElement(Spinner, {
23482
23978
  color: "currentColor",
23483
23979
  width: "1em",
23484
23980
  height: "1em"
23485
- }) : _props$children, className = props.className, __css = props.__css, rest = _objectWithoutPropertiesLoose$7(props, _excluded$3$2);
23981
+ }) : _props$children, className = props.className, __css = props.__css, rest = _objectWithoutPropertiesLoose$9(props, _excluded$3$2);
23486
23982
  var _className = cx("chakra-button__spinner", className);
23487
23983
  var marginProp = placement === "start" ? "marginEnd" : "marginStart";
23488
23984
  var spinnerStyles = React.useMemo(function() {
23489
23985
  var _extends2;
23490
- return _extends$6((_extends2 = {
23986
+ return _extends$8((_extends2 = {
23491
23987
  display: "flex",
23492
23988
  alignItems: "center",
23493
23989
  position: label ? "relative" : "absolute"
23494
23990
  }, _extends2[marginProp] = label ? spacing2 : 0, _extends2.fontSize = "1em", _extends2.lineHeight = "normal", _extends2), __css);
23495
23991
  }, [__css, label, marginProp, spacing2]);
23496
- return /* @__PURE__ */ React.createElement(chakra.div, _extends$6({
23992
+ return /* @__PURE__ */ React.createElement(chakra.div, _extends$8({
23497
23993
  className: _className
23498
23994
  }, rest, {
23499
23995
  __css: spinnerStyles
@@ -23501,13 +23997,13 @@ var ButtonSpinner = function ButtonSpinner2(props) {
23501
23997
  };
23502
23998
  var _excluded$2$2 = ["children", "className"];
23503
23999
  var ButtonIcon = function ButtonIcon2(props) {
23504
- var children = props.children, className = props.className, rest = _objectWithoutPropertiesLoose$7(props, _excluded$2$2);
24000
+ var children = props.children, className = props.className, rest = _objectWithoutPropertiesLoose$9(props, _excluded$2$2);
23505
24001
  var _children = /* @__PURE__ */ React.isValidElement(children) ? /* @__PURE__ */ React.cloneElement(children, {
23506
24002
  "aria-hidden": true,
23507
24003
  focusable: false
23508
24004
  }) : children;
23509
24005
  var _className = cx("chakra-button__icon", className);
23510
- return /* @__PURE__ */ React.createElement(chakra.span, _extends$6({
24006
+ return /* @__PURE__ */ React.createElement(chakra.span, _extends$8({
23511
24007
  display: "inline-flex",
23512
24008
  alignSelf: "center",
23513
24009
  flexShrink: 0
@@ -23528,17 +24024,17 @@ function useButtonType(value) {
23528
24024
  type
23529
24025
  };
23530
24026
  }
23531
- var _excluded$1$2 = ["isDisabled", "isLoading", "isActive", "isFullWidth", "children", "leftIcon", "rightIcon", "loadingText", "iconSpacing", "type", "spinner", "spinnerPlacement", "className", "as"];
24027
+ var _excluded$1$3 = ["isDisabled", "isLoading", "isActive", "isFullWidth", "children", "leftIcon", "rightIcon", "loadingText", "iconSpacing", "type", "spinner", "spinnerPlacement", "className", "as"];
23532
24028
  var Button = /* @__PURE__ */ forwardRef(function(props, ref) {
23533
24029
  var group = useButtonGroup();
23534
- var styles2 = useStyleConfig("Button", _extends$6({}, group, props));
23535
- var _omitThemingProps = omitThemingProps(props), _omitThemingProps$isD = _omitThemingProps.isDisabled, isDisabled2 = _omitThemingProps$isD === void 0 ? group == null ? void 0 : group.isDisabled : _omitThemingProps$isD, isLoading = _omitThemingProps.isLoading, isActive = _omitThemingProps.isActive, isFullWidth = _omitThemingProps.isFullWidth, children = _omitThemingProps.children, leftIcon = _omitThemingProps.leftIcon, rightIcon = _omitThemingProps.rightIcon, loadingText = _omitThemingProps.loadingText, _omitThemingProps$ico = _omitThemingProps.iconSpacing, iconSpacing2 = _omitThemingProps$ico === void 0 ? "0.5rem" : _omitThemingProps$ico, type = _omitThemingProps.type, spinner2 = _omitThemingProps.spinner, _omitThemingProps$spi = _omitThemingProps.spinnerPlacement, spinnerPlacement = _omitThemingProps$spi === void 0 ? "start" : _omitThemingProps$spi, className = _omitThemingProps.className, as = _omitThemingProps.as, rest = _objectWithoutPropertiesLoose$7(_omitThemingProps, _excluded$1$2);
24030
+ var styles2 = useStyleConfig("Button", _extends$8({}, group, props));
24031
+ var _omitThemingProps = omitThemingProps(props), _omitThemingProps$isD = _omitThemingProps.isDisabled, isDisabled2 = _omitThemingProps$isD === void 0 ? group == null ? void 0 : group.isDisabled : _omitThemingProps$isD, isLoading = _omitThemingProps.isLoading, isActive = _omitThemingProps.isActive, isFullWidth = _omitThemingProps.isFullWidth, children = _omitThemingProps.children, leftIcon = _omitThemingProps.leftIcon, rightIcon = _omitThemingProps.rightIcon, loadingText = _omitThemingProps.loadingText, _omitThemingProps$ico = _omitThemingProps.iconSpacing, iconSpacing2 = _omitThemingProps$ico === void 0 ? "0.5rem" : _omitThemingProps$ico, type = _omitThemingProps.type, spinner2 = _omitThemingProps.spinner, _omitThemingProps$spi = _omitThemingProps.spinnerPlacement, spinnerPlacement = _omitThemingProps$spi === void 0 ? "start" : _omitThemingProps$spi, className = _omitThemingProps.className, as = _omitThemingProps.as, rest = _objectWithoutPropertiesLoose$9(_omitThemingProps, _excluded$1$3);
23536
24032
  var buttonStyles = React.useMemo(function() {
23537
24033
  var _styles$_focus;
23538
24034
  var _focus = mergeWith({}, (_styles$_focus = styles2 == null ? void 0 : styles2["_focus"]) != null ? _styles$_focus : {}, {
23539
24035
  zIndex: 1
23540
24036
  });
23541
- return _extends$6({
24037
+ return _extends$8({
23542
24038
  display: "inline-flex",
23543
24039
  appearance: "none",
23544
24040
  alignItems: "center",
@@ -23560,7 +24056,7 @@ var Button = /* @__PURE__ */ forwardRef(function(props, ref) {
23560
24056
  iconSpacing: iconSpacing2,
23561
24057
  children
23562
24058
  };
23563
- return /* @__PURE__ */ React.createElement(chakra.button, _extends$6({
24059
+ return /* @__PURE__ */ React.createElement(chakra.button, _extends$8({
23564
24060
  disabled: isDisabled2 || isLoading,
23565
24061
  ref: useMergeRefs$1(ref, _ref2),
23566
24062
  as,
@@ -23591,7 +24087,7 @@ function ButtonContent(props) {
23591
24087
  marginStart: iconSpacing2
23592
24088
  }, rightIcon));
23593
24089
  }
23594
- function _objectWithoutPropertiesLoose$6(source, excluded) {
24090
+ function _objectWithoutPropertiesLoose$8(source, excluded) {
23595
24091
  if (source == null)
23596
24092
  return {};
23597
24093
  var target = {};
@@ -23605,8 +24101,8 @@ function _objectWithoutPropertiesLoose$6(source, excluded) {
23605
24101
  }
23606
24102
  return target;
23607
24103
  }
23608
- function _extends$5() {
23609
- _extends$5 = Object.assign || function(target) {
24104
+ function _extends$7() {
24105
+ _extends$7 = Object.assign || function(target) {
23610
24106
  for (var i2 = 1; i2 < arguments.length; i2++) {
23611
24107
  var source = arguments[i2];
23612
24108
  for (var key in source) {
@@ -23617,11 +24113,11 @@ function _extends$5() {
23617
24113
  }
23618
24114
  return target;
23619
24115
  };
23620
- return _extends$5.apply(this, arguments);
24116
+ return _extends$7.apply(this, arguments);
23621
24117
  }
23622
24118
  var _excluded$9 = ["children", "isDisabled", "__css"];
23623
24119
  var CloseIcon = function CloseIcon2(props) {
23624
- return /* @__PURE__ */ React.createElement(Icon, _extends$5({
24120
+ return /* @__PURE__ */ React.createElement(Icon, _extends$7({
23625
24121
  focusable: "false",
23626
24122
  "aria-hidden": true
23627
24123
  }, props), /* @__PURE__ */ React.createElement("path", {
@@ -23631,7 +24127,7 @@ var CloseIcon = function CloseIcon2(props) {
23631
24127
  };
23632
24128
  var CloseButton = /* @__PURE__ */ forwardRef(function(props, ref) {
23633
24129
  var styles2 = useStyleConfig("CloseButton", props);
23634
- var _omitThemingProps = omitThemingProps(props), children = _omitThemingProps.children, isDisabled2 = _omitThemingProps.isDisabled, __css = _omitThemingProps.__css, rest = _objectWithoutPropertiesLoose$6(_omitThemingProps, _excluded$9);
24130
+ var _omitThemingProps = omitThemingProps(props), children = _omitThemingProps.children, isDisabled2 = _omitThemingProps.isDisabled, __css = _omitThemingProps.__css, rest = _objectWithoutPropertiesLoose$8(_omitThemingProps, _excluded$9);
23635
24131
  var baseStyle22 = {
23636
24132
  outline: 0,
23637
24133
  display: "flex",
@@ -23639,19 +24135,19 @@ var CloseButton = /* @__PURE__ */ forwardRef(function(props, ref) {
23639
24135
  justifyContent: "center",
23640
24136
  flexShrink: 0
23641
24137
  };
23642
- return /* @__PURE__ */ React.createElement(chakra.button, _extends$5({
24138
+ return /* @__PURE__ */ React.createElement(chakra.button, _extends$7({
23643
24139
  type: "button",
23644
24140
  "aria-label": "Close",
23645
24141
  ref,
23646
24142
  disabled: isDisabled2,
23647
- __css: _extends$5({}, baseStyle22, styles2, __css)
24143
+ __css: _extends$7({}, baseStyle22, styles2, __css)
23648
24144
  }, rest), children || /* @__PURE__ */ React.createElement(CloseIcon, {
23649
24145
  width: "1em",
23650
24146
  height: "1em"
23651
24147
  }));
23652
24148
  });
23653
- function _extends$4() {
23654
- _extends$4 = Object.assign || function(target) {
24149
+ function _extends$6() {
24150
+ _extends$6 = Object.assign || function(target) {
23655
24151
  for (var i2 = 1; i2 < arguments.length; i2++) {
23656
24152
  var source = arguments[i2];
23657
24153
  for (var key in source) {
@@ -23662,9 +24158,9 @@ function _extends$4() {
23662
24158
  }
23663
24159
  return target;
23664
24160
  };
23665
- return _extends$4.apply(this, arguments);
24161
+ return _extends$6.apply(this, arguments);
23666
24162
  }
23667
- function _objectWithoutPropertiesLoose$5(source, excluded) {
24163
+ function _objectWithoutPropertiesLoose$7(source, excluded) {
23668
24164
  if (source == null)
23669
24165
  return {};
23670
24166
  var target = {};
@@ -23688,7 +24184,7 @@ var Center = chakra("div", {
23688
24184
  });
23689
24185
  var _excluded$a = ["direction", "align", "justify", "wrap", "basis", "grow", "shrink"];
23690
24186
  var Flex = /* @__PURE__ */ forwardRef(function(props, ref) {
23691
- var direction2 = props.direction, align = props.align, justify = props.justify, wrap3 = props.wrap, basis = props.basis, grow = props.grow, shrink = props.shrink, rest = _objectWithoutPropertiesLoose$5(props, _excluded$a);
24187
+ var direction2 = props.direction, align = props.align, justify = props.justify, wrap3 = props.wrap, basis = props.basis, grow = props.grow, shrink = props.shrink, rest = _objectWithoutPropertiesLoose$7(props, _excluded$a);
23692
24188
  var styles2 = {
23693
24189
  display: "flex",
23694
24190
  flexDirection: direction2,
@@ -23699,7 +24195,7 @@ var Flex = /* @__PURE__ */ forwardRef(function(props, ref) {
23699
24195
  flexGrow: grow,
23700
24196
  flexShrink: shrink
23701
24197
  };
23702
- return /* @__PURE__ */ React.createElement(chakra.div, _extends$4({
24198
+ return /* @__PURE__ */ React.createElement(chakra.div, _extends$6({
23703
24199
  ref,
23704
24200
  __css: styles2
23705
24201
  }, rest));
@@ -23709,19 +24205,19 @@ var Heading = /* @__PURE__ */ forwardRef(function(props, ref) {
23709
24205
  var styles2 = useStyleConfig("Heading", props);
23710
24206
  var _omitThemingProps = omitThemingProps(props);
23711
24207
  _omitThemingProps.className;
23712
- var rest = _objectWithoutPropertiesLoose$5(_omitThemingProps, _excluded$8);
23713
- return /* @__PURE__ */ React.createElement(chakra.h2, _extends$4({
24208
+ var rest = _objectWithoutPropertiesLoose$7(_omitThemingProps, _excluded$8);
24209
+ return /* @__PURE__ */ React.createElement(chakra.h2, _extends$6({
23714
24210
  ref,
23715
24211
  className: cx("chakra-heading", props.className)
23716
24212
  }, rest, {
23717
24213
  __css: styles2
23718
24214
  }));
23719
24215
  });
23720
- var _excluded$6 = ["className", "isExternal"];
24216
+ var _excluded$6$1 = ["className", "isExternal"];
23721
24217
  var Link = /* @__PURE__ */ forwardRef(function(props, ref) {
23722
24218
  var styles2 = useStyleConfig("Link", props);
23723
- var _omitThemingProps = omitThemingProps(props), className = _omitThemingProps.className, isExternal = _omitThemingProps.isExternal, rest = _objectWithoutPropertiesLoose$5(_omitThemingProps, _excluded$6);
23724
- return /* @__PURE__ */ React.createElement(chakra.a, _extends$4({
24219
+ var _omitThemingProps = omitThemingProps(props), className = _omitThemingProps.className, isExternal = _omitThemingProps.isExternal, rest = _objectWithoutPropertiesLoose$7(_omitThemingProps, _excluded$6$1);
24220
+ return /* @__PURE__ */ React.createElement(chakra.a, _extends$6({
23725
24221
  target: isExternal ? "_blank" : void 0,
23726
24222
  rel: isExternal ? "noopener" : void 0,
23727
24223
  ref,
@@ -23730,15 +24226,15 @@ var Link = /* @__PURE__ */ forwardRef(function(props, ref) {
23730
24226
  __css: styles2
23731
24227
  }));
23732
24228
  });
23733
- var _excluded$5 = ["children", "styleType", "stylePosition", "spacing"];
23734
- var _createContext$2 = createContext({
24229
+ var _excluded$5$1 = ["children", "styleType", "stylePosition", "spacing"];
24230
+ var _createContext$3 = createContext({
23735
24231
  name: "StylesContext",
23736
24232
  errorMessage: "useStyles: `styles` is undefined. Seems you forgot to wrap the components in a `<*List />` "
23737
- }), StylesProvider = _createContext$2[0], useStyles = _createContext$2[1];
24233
+ }), StylesProvider = _createContext$3[0], useStyles = _createContext$3[1];
23738
24234
  var List = /* @__PURE__ */ forwardRef(function(props, ref) {
23739
24235
  var _ref2;
23740
24236
  var styles2 = useMultiStyleConfig("List", props);
23741
- var _omitThemingProps = omitThemingProps(props), children = _omitThemingProps.children, _omitThemingProps$sty = _omitThemingProps.styleType, styleType = _omitThemingProps$sty === void 0 ? "none" : _omitThemingProps$sty, stylePosition = _omitThemingProps.stylePosition, spacing2 = _omitThemingProps.spacing, rest = _objectWithoutPropertiesLoose$5(_omitThemingProps, _excluded$5);
24237
+ var _omitThemingProps = omitThemingProps(props), children = _omitThemingProps.children, _omitThemingProps$sty = _omitThemingProps.styleType, styleType = _omitThemingProps$sty === void 0 ? "none" : _omitThemingProps$sty, stylePosition = _omitThemingProps.stylePosition, spacing2 = _omitThemingProps.spacing, rest = _objectWithoutPropertiesLoose$7(_omitThemingProps, _excluded$5$1);
23742
24238
  var validChildren = getValidChildren(children);
23743
24239
  var selector2 = "& > *:not(style) ~ *:not(style)";
23744
24240
  var spacingStyle = spacing2 ? (_ref2 = {}, _ref2[selector2] = {
@@ -23746,17 +24242,17 @@ var List = /* @__PURE__ */ forwardRef(function(props, ref) {
23746
24242
  }, _ref2) : {};
23747
24243
  return /* @__PURE__ */ React.createElement(StylesProvider, {
23748
24244
  value: styles2
23749
- }, /* @__PURE__ */ React.createElement(chakra.ul, _extends$4({
24245
+ }, /* @__PURE__ */ React.createElement(chakra.ul, _extends$6({
23750
24246
  ref,
23751
24247
  listStyleType: styleType,
23752
24248
  listStylePosition: stylePosition,
23753
24249
  role: "list",
23754
- __css: _extends$4({}, styles2.container, spacingStyle)
24250
+ __css: _extends$6({}, styles2.container, spacingStyle)
23755
24251
  }, rest), validChildren));
23756
24252
  });
23757
24253
  var ListItem = /* @__PURE__ */ forwardRef(function(props, ref) {
23758
24254
  var styles2 = useStyles();
23759
- return /* @__PURE__ */ React.createElement(chakra.li, _extends$4({
24255
+ return /* @__PURE__ */ React.createElement(chakra.li, _extends$6({
23760
24256
  ref
23761
24257
  }, props, {
23762
24258
  __css: styles2.item
@@ -23841,10 +24337,10 @@ function getDividerStyles(options) {
23841
24337
  }
23842
24338
  var _excluded$3$1 = ["isInline", "direction", "align", "justify", "spacing", "wrap", "children", "divider", "className", "shouldWrapChildren"];
23843
24339
  var StackItem = function StackItem2(props) {
23844
- return /* @__PURE__ */ React.createElement(chakra.div, _extends$4({
24340
+ return /* @__PURE__ */ React.createElement(chakra.div, _extends$6({
23845
24341
  className: "chakra-stack__item"
23846
24342
  }, props, {
23847
- __css: _extends$4({
24343
+ __css: _extends$6({
23848
24344
  display: "inline-block",
23849
24345
  flex: "0 0 auto",
23850
24346
  minWidth: 0
@@ -23853,7 +24349,7 @@ var StackItem = function StackItem2(props) {
23853
24349
  };
23854
24350
  var Stack = /* @__PURE__ */ forwardRef(function(props, ref) {
23855
24351
  var _ref2;
23856
- var isInline = props.isInline, directionProp = props.direction, align = props.align, justify = props.justify, _props$spacing = props.spacing, spacing2 = _props$spacing === void 0 ? "0.5rem" : _props$spacing, wrap3 = props.wrap, children = props.children, divider2 = props.divider, className = props.className, shouldWrapChildren = props.shouldWrapChildren, rest = _objectWithoutPropertiesLoose$5(props, _excluded$3$1);
24352
+ var isInline = props.isInline, directionProp = props.direction, align = props.align, justify = props.justify, _props$spacing = props.spacing, spacing2 = _props$spacing === void 0 ? "0.5rem" : _props$spacing, wrap3 = props.wrap, children = props.children, divider2 = props.divider, className = props.className, shouldWrapChildren = props.shouldWrapChildren, rest = _objectWithoutPropertiesLoose$7(props, _excluded$3$1);
23857
24353
  var direction2 = isInline ? "row" : directionProp != null ? directionProp : "column";
23858
24354
  var styles2 = React.useMemo(function() {
23859
24355
  return getStackStyles({
@@ -23888,7 +24384,7 @@ var Stack = /* @__PURE__ */ forwardRef(function(props, ref) {
23888
24384
  }, _child, _divider);
23889
24385
  });
23890
24386
  var _className = cx("chakra-stack", className);
23891
- return /* @__PURE__ */ React.createElement(chakra.div, _extends$4({
24387
+ return /* @__PURE__ */ React.createElement(chakra.div, _extends$6({
23892
24388
  ref,
23893
24389
  display: "flex",
23894
24390
  alignItems: align,
@@ -23900,7 +24396,7 @@ var Stack = /* @__PURE__ */ forwardRef(function(props, ref) {
23900
24396
  }, rest), clones);
23901
24397
  });
23902
24398
  var HStack = /* @__PURE__ */ forwardRef(function(props, ref) {
23903
- return /* @__PURE__ */ React.createElement(Stack, _extends$4({
24399
+ return /* @__PURE__ */ React.createElement(Stack, _extends$6({
23904
24400
  align: "center"
23905
24401
  }, props, {
23906
24402
  direction: "row",
@@ -23915,23 +24411,23 @@ var Text = /* @__PURE__ */ forwardRef(function(props, ref) {
23915
24411
  _omitThemingProps.align;
23916
24412
  _omitThemingProps.decoration;
23917
24413
  _omitThemingProps.casing;
23918
- var rest = _objectWithoutPropertiesLoose$5(_omitThemingProps, _excluded$2$1);
24414
+ var rest = _objectWithoutPropertiesLoose$7(_omitThemingProps, _excluded$2$1);
23919
24415
  var aliasedProps = filterUndefined({
23920
24416
  textAlign: props.align,
23921
24417
  textDecoration: props.decoration,
23922
24418
  textTransform: props.casing
23923
24419
  });
23924
- return /* @__PURE__ */ React.createElement(chakra.p, _extends$4({
24420
+ return /* @__PURE__ */ React.createElement(chakra.p, _extends$6({
23925
24421
  ref,
23926
24422
  className: cx("chakra-text", props.className)
23927
24423
  }, aliasedProps, rest, {
23928
24424
  __css: styles2
23929
24425
  }));
23930
24426
  });
23931
- var _excluded$7 = ["isExternal", "target", "rel", "className"], _excluded2$2 = ["className"];
24427
+ var _excluded$7 = ["isExternal", "target", "rel", "className"], _excluded2$3 = ["className"];
23932
24428
  var LinkOverlay = /* @__PURE__ */ forwardRef(function(props, ref) {
23933
- var isExternal = props.isExternal, target = props.target, rel = props.rel, className = props.className, rest = _objectWithoutPropertiesLoose$5(props, _excluded$7);
23934
- return /* @__PURE__ */ React.createElement(chakra.a, _extends$4({}, rest, {
24429
+ var isExternal = props.isExternal, target = props.target, rel = props.rel, className = props.className, rest = _objectWithoutPropertiesLoose$7(props, _excluded$7);
24430
+ return /* @__PURE__ */ React.createElement(chakra.a, _extends$6({}, rest, {
23935
24431
  ref,
23936
24432
  className: cx("chakra-linkbox__overlay", className),
23937
24433
  rel: isExternal ? "noopener noreferrer" : rel,
@@ -23953,8 +24449,8 @@ var LinkOverlay = /* @__PURE__ */ forwardRef(function(props, ref) {
23953
24449
  }));
23954
24450
  });
23955
24451
  var LinkBox = /* @__PURE__ */ forwardRef(function(props, ref) {
23956
- var className = props.className, rest = _objectWithoutPropertiesLoose$5(props, _excluded2$2);
23957
- return /* @__PURE__ */ React.createElement(chakra.div, _extends$4({
24452
+ var className = props.className, rest = _objectWithoutPropertiesLoose$7(props, _excluded2$3);
24453
+ return /* @__PURE__ */ React.createElement(chakra.div, _extends$6({
23958
24454
  ref,
23959
24455
  position: "relative"
23960
24456
  }, rest, {
@@ -24013,6 +24509,213 @@ function useMediaQuery(query) {
24013
24509
  }, []);
24014
24510
  return matches;
24015
24511
  }
24512
+ function _extends$5() {
24513
+ _extends$5 = Object.assign || function(target) {
24514
+ for (var i2 = 1; i2 < arguments.length; i2++) {
24515
+ var source = arguments[i2];
24516
+ for (var key in source) {
24517
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
24518
+ target[key] = source[key];
24519
+ }
24520
+ }
24521
+ }
24522
+ return target;
24523
+ };
24524
+ return _extends$5.apply(this, arguments);
24525
+ }
24526
+ function _objectWithoutPropertiesLoose$6(source, excluded) {
24527
+ if (source == null)
24528
+ return {};
24529
+ var target = {};
24530
+ var sourceKeys = Object.keys(source);
24531
+ var key, i2;
24532
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
24533
+ key = sourceKeys[i2];
24534
+ if (excluded.indexOf(key) >= 0)
24535
+ continue;
24536
+ target[key] = source[key];
24537
+ }
24538
+ return target;
24539
+ }
24540
+ function useEventListeners() {
24541
+ var listeners = React.useRef(/* @__PURE__ */ new Map());
24542
+ var currentListeners = listeners.current;
24543
+ var add4 = React.useCallback(function(el, type, listener, options) {
24544
+ listeners.current.set(listener, {
24545
+ type,
24546
+ el,
24547
+ options
24548
+ });
24549
+ el.addEventListener(type, listener, options);
24550
+ }, []);
24551
+ var remove2 = React.useCallback(function(el, type, listener, options) {
24552
+ el.removeEventListener(type, listener, options);
24553
+ listeners.current["delete"](listener);
24554
+ }, []);
24555
+ React.useEffect(function() {
24556
+ return function() {
24557
+ currentListeners.forEach(function(value, key) {
24558
+ remove2(value.el, value.type, key, value.options);
24559
+ });
24560
+ };
24561
+ }, [remove2, currentListeners]);
24562
+ return {
24563
+ add: add4,
24564
+ remove: remove2
24565
+ };
24566
+ }
24567
+ var _excluded$6 = ["ref", "isDisabled", "isFocusable", "clickOnEnter", "clickOnSpace", "onMouseDown", "onMouseUp", "onClick", "onKeyDown", "onKeyUp", "tabIndex", "onMouseOver", "onMouseLeave"];
24568
+ function isValidElement(event) {
24569
+ var element = event.target;
24570
+ var tagName = element.tagName, isContentEditable2 = element.isContentEditable;
24571
+ return tagName !== "INPUT" && tagName !== "TEXTAREA" && isContentEditable2 !== true;
24572
+ }
24573
+ function useClickable(props) {
24574
+ if (props === void 0) {
24575
+ props = {};
24576
+ }
24577
+ var _props = props, htmlRef = _props.ref, isDisabled2 = _props.isDisabled, isFocusable2 = _props.isFocusable, _props$clickOnEnter = _props.clickOnEnter, clickOnEnter = _props$clickOnEnter === void 0 ? true : _props$clickOnEnter, _props$clickOnSpace = _props.clickOnSpace, clickOnSpace = _props$clickOnSpace === void 0 ? true : _props$clickOnSpace, onMouseDown = _props.onMouseDown, onMouseUp = _props.onMouseUp, onClick = _props.onClick, onKeyDown = _props.onKeyDown, onKeyUp = _props.onKeyUp, tabIndexProp = _props.tabIndex, onMouseOver = _props.onMouseOver, onMouseLeave = _props.onMouseLeave, htmlProps = _objectWithoutPropertiesLoose$6(_props, _excluded$6);
24578
+ var _React$useState = React.useState(true), isButton = _React$useState[0], setIsButton = _React$useState[1];
24579
+ var _React$useState2 = React.useState(false), isPressed = _React$useState2[0], setIsPressed = _React$useState2[1];
24580
+ var listeners = useEventListeners();
24581
+ var refCallback = function refCallback2(node2) {
24582
+ if (!node2)
24583
+ return;
24584
+ if (node2.tagName !== "BUTTON") {
24585
+ setIsButton(false);
24586
+ }
24587
+ };
24588
+ var tabIndex = isButton ? tabIndexProp : tabIndexProp || 0;
24589
+ var trulyDisabled = isDisabled2 && !isFocusable2;
24590
+ var handleClick = React.useCallback(function(event) {
24591
+ if (isDisabled2) {
24592
+ event.stopPropagation();
24593
+ event.preventDefault();
24594
+ return;
24595
+ }
24596
+ var self2 = event.currentTarget;
24597
+ self2.focus();
24598
+ onClick == null ? void 0 : onClick(event);
24599
+ }, [isDisabled2, onClick]);
24600
+ var onDocumentKeyUp = React.useCallback(function(e2) {
24601
+ if (isPressed && isValidElement(e2)) {
24602
+ e2.preventDefault();
24603
+ e2.stopPropagation();
24604
+ setIsPressed(false);
24605
+ listeners.remove(document, "keyup", onDocumentKeyUp, false);
24606
+ }
24607
+ }, [isPressed, listeners]);
24608
+ var handleKeyDown = React.useCallback(function(event) {
24609
+ onKeyDown == null ? void 0 : onKeyDown(event);
24610
+ if (isDisabled2 || event.defaultPrevented || event.metaKey) {
24611
+ return;
24612
+ }
24613
+ if (!isValidElement(event.nativeEvent) || isButton)
24614
+ return;
24615
+ var shouldClickOnEnter = clickOnEnter && event.key === "Enter";
24616
+ var shouldClickOnSpace = clickOnSpace && event.key === " ";
24617
+ if (shouldClickOnSpace) {
24618
+ event.preventDefault();
24619
+ setIsPressed(true);
24620
+ }
24621
+ if (shouldClickOnEnter) {
24622
+ event.preventDefault();
24623
+ var self2 = event.currentTarget;
24624
+ self2.click();
24625
+ }
24626
+ listeners.add(document, "keyup", onDocumentKeyUp, false);
24627
+ }, [isDisabled2, isButton, onKeyDown, clickOnEnter, clickOnSpace, listeners, onDocumentKeyUp]);
24628
+ var handleKeyUp = React.useCallback(function(event) {
24629
+ onKeyUp == null ? void 0 : onKeyUp(event);
24630
+ if (isDisabled2 || event.defaultPrevented || event.metaKey)
24631
+ return;
24632
+ if (!isValidElement(event.nativeEvent) || isButton)
24633
+ return;
24634
+ var shouldClickOnSpace = clickOnSpace && event.key === " ";
24635
+ if (shouldClickOnSpace) {
24636
+ event.preventDefault();
24637
+ setIsPressed(false);
24638
+ var self2 = event.currentTarget;
24639
+ self2.click();
24640
+ }
24641
+ }, [clickOnSpace, isButton, isDisabled2, onKeyUp]);
24642
+ var onDocumentMouseUp = React.useCallback(function(event) {
24643
+ if (event.button !== 0)
24644
+ return;
24645
+ setIsPressed(false);
24646
+ listeners.remove(document, "mouseup", onDocumentMouseUp, false);
24647
+ }, [listeners]);
24648
+ var handleMouseDown = React.useCallback(function(event) {
24649
+ if (isRightClick(event))
24650
+ return;
24651
+ if (isDisabled2) {
24652
+ event.stopPropagation();
24653
+ event.preventDefault();
24654
+ return;
24655
+ }
24656
+ if (!isButton) {
24657
+ setIsPressed(true);
24658
+ }
24659
+ var target = event.currentTarget;
24660
+ target.focus({
24661
+ preventScroll: true
24662
+ });
24663
+ listeners.add(document, "mouseup", onDocumentMouseUp, false);
24664
+ onMouseDown == null ? void 0 : onMouseDown(event);
24665
+ }, [isDisabled2, isButton, onMouseDown, listeners, onDocumentMouseUp]);
24666
+ var handleMouseUp = React.useCallback(function(event) {
24667
+ if (isRightClick(event))
24668
+ return;
24669
+ if (!isButton) {
24670
+ setIsPressed(false);
24671
+ }
24672
+ onMouseUp == null ? void 0 : onMouseUp(event);
24673
+ }, [onMouseUp, isButton]);
24674
+ var handleMouseOver = React.useCallback(function(event) {
24675
+ if (isDisabled2) {
24676
+ event.preventDefault();
24677
+ return;
24678
+ }
24679
+ onMouseOver == null ? void 0 : onMouseOver(event);
24680
+ }, [isDisabled2, onMouseOver]);
24681
+ var handleMouseLeave = React.useCallback(function(event) {
24682
+ if (isPressed) {
24683
+ event.preventDefault();
24684
+ setIsPressed(false);
24685
+ }
24686
+ onMouseLeave == null ? void 0 : onMouseLeave(event);
24687
+ }, [isPressed, onMouseLeave]);
24688
+ var ref = mergeRefs(htmlRef, refCallback);
24689
+ if (isButton) {
24690
+ return _extends$5({}, htmlProps, {
24691
+ ref,
24692
+ type: "button",
24693
+ "aria-disabled": trulyDisabled ? void 0 : isDisabled2,
24694
+ disabled: trulyDisabled,
24695
+ onClick: handleClick,
24696
+ onMouseDown,
24697
+ onMouseUp,
24698
+ onKeyUp,
24699
+ onKeyDown,
24700
+ onMouseOver,
24701
+ onMouseLeave
24702
+ });
24703
+ }
24704
+ return _extends$5({}, htmlProps, {
24705
+ ref,
24706
+ role: "button",
24707
+ "data-active": dataAttr(isPressed),
24708
+ "aria-disabled": isDisabled2 ? "true" : void 0,
24709
+ tabIndex: trulyDisabled ? void 0 : tabIndex,
24710
+ onClick: handleClick,
24711
+ onMouseDown: handleMouseDown,
24712
+ onMouseUp: handleMouseUp,
24713
+ onKeyUp: handleKeyUp,
24714
+ onKeyDown: handleKeyDown,
24715
+ onMouseOver: handleMouseOver,
24716
+ onMouseLeave: handleMouseLeave
24717
+ });
24718
+ }
24016
24719
  var top = "top";
24017
24720
  var bottom = "bottom";
24018
24721
  var right = "right";
@@ -24054,7 +24757,7 @@ function getWindow(node2) {
24054
24757
  }
24055
24758
  return node2;
24056
24759
  }
24057
- function isElement(node2) {
24760
+ function isElement2(node2) {
24058
24761
  var OwnElement = getWindow(node2).Element;
24059
24762
  return node2 instanceof OwnElement || node2 instanceof Element;
24060
24763
  }
@@ -24167,7 +24870,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
24167
24870
  scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
24168
24871
  scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
24169
24872
  }
24170
- var _ref2 = isElement(element) ? getWindow(element) : window, visualViewport = _ref2.visualViewport;
24873
+ var _ref2 = isElement2(element) ? getWindow(element) : window, visualViewport = _ref2.visualViewport;
24171
24874
  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
24172
24875
  var x2 = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
24173
24876
  var y2 = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
@@ -24223,7 +24926,7 @@ function isTableElement(element) {
24223
24926
  return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0;
24224
24927
  }
24225
24928
  function getDocumentElement(element) {
24226
- return ((isElement(element) ? element.ownerDocument : element.document) || window.document).documentElement;
24929
+ return ((isElement2(element) ? element.ownerDocument : element.document) || window.document).documentElement;
24227
24930
  }
24228
24931
  function getParentNode(element) {
24229
24932
  if (getNodeName(element) === "html") {
@@ -24631,17 +25334,17 @@ function getInnerBoundingClientRect(element, strategy) {
24631
25334
  return rect;
24632
25335
  }
24633
25336
  function getClientRectFromMixedType(element, clippingParent, strategy) {
24634
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
25337
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement2(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
24635
25338
  }
24636
25339
  function getClippingParents(element) {
24637
25340
  var clippingParents2 = listScrollParents(getParentNode(element));
24638
25341
  var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle$1(element).position) >= 0;
24639
25342
  var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
24640
- if (!isElement(clipperElement)) {
25343
+ if (!isElement2(clipperElement)) {
24641
25344
  return [];
24642
25345
  }
24643
25346
  return clippingParents2.filter(function(clippingParent) {
24644
- return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body";
25347
+ return isElement2(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body";
24645
25348
  });
24646
25349
  }
24647
25350
  function getClippingRect(element, boundary, rootBoundary, strategy) {
@@ -24723,7 +25426,7 @@ function detectOverflow(state2, options) {
24723
25426
  var altContext = elementContext === popper ? reference : popper;
24724
25427
  var popperRect = state2.rects.popper;
24725
25428
  var element = state2.elements[altBoundary ? altContext : elementContext];
24726
- var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state2.elements.popper), boundary, rootBoundary, strategy);
25429
+ var clippingClientRect = getClippingRect(isElement2(element) ? element : element.contextElement || getDocumentElement(state2.elements.popper), boundary, rootBoundary, strategy);
24727
25430
  var referenceClientRect = getBoundingClientRect(state2.elements.reference);
24728
25431
  var popperOffsets2 = computeOffsets({
24729
25432
  reference: referenceClientRect,
@@ -25240,7 +25943,7 @@ function popperGenerator(generatorOptions) {
25240
25943
  cleanupModifierEffects();
25241
25944
  state2.options = Object.assign({}, defaultOptions, state2.options, options2);
25242
25945
  state2.scrollParents = {
25243
- reference: isElement(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [],
25946
+ reference: isElement2(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [],
25244
25947
  popper: listScrollParents(popper2)
25245
25948
  };
25246
25949
  var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state2.options.modifiers)));
@@ -25332,7 +26035,7 @@ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyS
25332
26035
  var createPopper = /* @__PURE__ */ popperGenerator({
25333
26036
  defaultModifiers
25334
26037
  });
25335
- function _objectWithoutPropertiesLoose$4(source, excluded) {
26038
+ function _objectWithoutPropertiesLoose$5(source, excluded) {
25336
26039
  if (source == null)
25337
26040
  return {};
25338
26041
  var target = {};
@@ -25346,8 +26049,8 @@ function _objectWithoutPropertiesLoose$4(source, excluded) {
25346
26049
  }
25347
26050
  return target;
25348
26051
  }
25349
- function _extends$3() {
25350
- _extends$3 = Object.assign || function(target) {
26052
+ function _extends$4() {
26053
+ _extends$4 = Object.assign || function(target) {
25351
26054
  for (var i2 = 1; i2 < arguments.length; i2++) {
25352
26055
  var source = arguments[i2];
25353
26056
  for (var key in source) {
@@ -25358,7 +26061,7 @@ function _extends$3() {
25358
26061
  }
25359
26062
  return target;
25360
26063
  };
25361
- return _extends$3.apply(this, arguments);
26064
+ return _extends$4.apply(this, arguments);
25362
26065
  }
25363
26066
  var toVar = function toVar2(value, fallback) {
25364
26067
  return {
@@ -25410,7 +26113,7 @@ function getEventListenerOptions(value) {
25410
26113
  if (typeof value === "object") {
25411
26114
  eventListeners2 = {
25412
26115
  enabled: true,
25413
- options: _extends$3({}, defaultEventListeners, value)
26116
+ options: _extends$4({}, defaultEventListeners, value)
25414
26117
  };
25415
26118
  } else {
25416
26119
  eventListeners2 = {
@@ -25582,7 +26285,7 @@ function getPopperPlacement(placement, dir) {
25582
26285
  return value;
25583
26286
  return (_opposites$placement = opposites[placement]) != null ? _opposites$placement : value;
25584
26287
  }
25585
- var _excluded$4 = ["size", "shadowColor", "bg", "style"];
26288
+ var _excluded$5 = ["size", "shadowColor", "bg", "style"];
25586
26289
  function usePopper(props) {
25587
26290
  if (props === void 0) {
25588
26291
  props = {};
@@ -25600,9 +26303,9 @@ function usePopper(props) {
25600
26303
  cleanup.current == null ? void 0 : cleanup.current();
25601
26304
  instance.current = createPopper(reference2.current, popper2.current, {
25602
26305
  placement,
25603
- modifiers: [innerArrow, positionArrow, transformOrigin, _extends$3({}, matchWidth, {
26306
+ modifiers: [innerArrow, positionArrow, transformOrigin, _extends$4({}, matchWidth, {
25604
26307
  enabled: !!matchWidth$1
25605
- }), _extends$3({
26308
+ }), _extends$4({
25606
26309
  name: "eventListeners"
25607
26310
  }, getEventListenerOptions(eventListeners2)), {
25608
26311
  name: "arrow",
@@ -25652,7 +26355,7 @@ function usePopper(props) {
25652
26355
  if (ref === void 0) {
25653
26356
  ref = null;
25654
26357
  }
25655
- return _extends$3({}, props2, {
26358
+ return _extends$4({}, props2, {
25656
26359
  ref: mergeRefs(referenceRef, ref)
25657
26360
  });
25658
26361
  }, [referenceRef]);
@@ -25667,9 +26370,9 @@ function usePopper(props) {
25667
26370
  if (ref === void 0) {
25668
26371
  ref = null;
25669
26372
  }
25670
- return _extends$3({}, props2, {
26373
+ return _extends$4({}, props2, {
25671
26374
  ref: mergeRefs(popperRef, ref),
25672
- style: _extends$3({}, props2.style, {
26375
+ style: _extends$4({}, props2.style, {
25673
26376
  position: strategy,
25674
26377
  minWidth: "max-content",
25675
26378
  inset: "0 auto auto 0"
@@ -25688,8 +26391,8 @@ function usePopper(props) {
25688
26391
  _props2.shadowColor;
25689
26392
  _props2.bg;
25690
26393
  _props2.style;
25691
- var rest = _objectWithoutPropertiesLoose$4(_props2, _excluded$4);
25692
- return _extends$3({}, rest, {
26394
+ var rest = _objectWithoutPropertiesLoose$5(_props2, _excluded$5);
26395
+ return _extends$4({}, rest, {
25693
26396
  ref,
25694
26397
  "data-popper-arrow": "",
25695
26398
  style: getArrowStyle2(props2)
@@ -25702,7 +26405,7 @@ function usePopper(props) {
25702
26405
  if (ref === void 0) {
25703
26406
  ref = null;
25704
26407
  }
25705
- return _extends$3({}, props2, {
26408
+ return _extends$4({}, props2, {
25706
26409
  ref,
25707
26410
  "data-popper-arrow-inner": ""
25708
26411
  });
@@ -25727,7 +26430,7 @@ function usePopper(props) {
25727
26430
  }
25728
26431
  function getArrowStyle2(props) {
25729
26432
  var size2 = props.size, shadowColor = props.shadowColor, bg2 = props.bg, style = props.style;
25730
- var computedStyle = _extends$3({}, style, {
26433
+ var computedStyle = _extends$4({}, style, {
25731
26434
  position: "absolute"
25732
26435
  });
25733
26436
  if (size2) {
@@ -25741,6 +26444,579 @@ function getArrowStyle2(props) {
25741
26444
  }
25742
26445
  return computedStyle;
25743
26446
  }
26447
+ function _extends$3() {
26448
+ _extends$3 = Object.assign || function(target) {
26449
+ for (var i2 = 1; i2 < arguments.length; i2++) {
26450
+ var source = arguments[i2];
26451
+ for (var key in source) {
26452
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
26453
+ target[key] = source[key];
26454
+ }
26455
+ }
26456
+ }
26457
+ return target;
26458
+ };
26459
+ return _extends$3.apply(this, arguments);
26460
+ }
26461
+ function _objectWithoutPropertiesLoose$4(source, excluded) {
26462
+ if (source == null)
26463
+ return {};
26464
+ var target = {};
26465
+ var sourceKeys = Object.keys(source);
26466
+ var key, i2;
26467
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
26468
+ key = sourceKeys[i2];
26469
+ if (excluded.indexOf(key) >= 0)
26470
+ continue;
26471
+ target[key] = source[key];
26472
+ }
26473
+ return target;
26474
+ }
26475
+ var _excluded$1$2 = ["id", "closeOnSelect", "closeOnBlur", "autoSelect", "isLazy", "isOpen", "defaultIsOpen", "onClose", "onOpen", "placement", "lazyBehavior", "direction", "computePositionOnMount"], _excluded2$1$2 = ["onMouseEnter", "onMouseMove", "onMouseLeave", "onClick", "isDisabled", "isFocusable", "closeOnSelect", "type"], _excluded3$1 = ["type", "isChecked"];
26476
+ var _createDescendantCont = createDescendantContext(), MenuDescendantsProvider = _createDescendantCont[0], useMenuDescendantsContext = _createDescendantCont[1], useMenuDescendants = _createDescendantCont[2], useMenuDescendant = _createDescendantCont[3];
26477
+ var _createContext$2 = createContext({
26478
+ strict: false,
26479
+ name: "MenuContext"
26480
+ }), MenuProvider = _createContext$2[0], useMenuContext = _createContext$2[1];
26481
+ function useMenu(props) {
26482
+ if (props === void 0) {
26483
+ props = {};
26484
+ }
26485
+ var _props = props, id2 = _props.id, _props$closeOnSelect = _props.closeOnSelect, closeOnSelect = _props$closeOnSelect === void 0 ? true : _props$closeOnSelect, _props$closeOnBlur = _props.closeOnBlur, closeOnBlur = _props$closeOnBlur === void 0 ? true : _props$closeOnBlur, _props$autoSelect = _props.autoSelect, autoSelect = _props$autoSelect === void 0 ? true : _props$autoSelect, isLazy = _props.isLazy, isOpenProp = _props.isOpen, defaultIsOpen = _props.defaultIsOpen, onCloseProp = _props.onClose, onOpenProp = _props.onOpen, _props$placement = _props.placement, placement = _props$placement === void 0 ? "bottom-start" : _props$placement, _props$lazyBehavior = _props.lazyBehavior, lazyBehavior = _props$lazyBehavior === void 0 ? "unmount" : _props$lazyBehavior, direction2 = _props.direction, _props$computePositio = _props.computePositionOnMount, computePositionOnMount = _props$computePositio === void 0 ? false : _props$computePositio, popperProps = _objectWithoutPropertiesLoose$4(_props, _excluded$1$2);
26486
+ var menuRef = React.useRef(null);
26487
+ var buttonRef = React.useRef(null);
26488
+ var descendants = useMenuDescendants();
26489
+ var focusMenu = React.useCallback(function() {
26490
+ focus(menuRef.current, {
26491
+ nextTick: true,
26492
+ selectTextIfInput: false
26493
+ });
26494
+ }, []);
26495
+ var focusFirstItem = React.useCallback(function() {
26496
+ var id3 = setTimeout(function() {
26497
+ var first = descendants.firstEnabled();
26498
+ if (first)
26499
+ setFocusedIndex(first.index);
26500
+ });
26501
+ timeoutIds.current.add(id3);
26502
+ }, [descendants]);
26503
+ var focusLastItem = React.useCallback(function() {
26504
+ var id3 = setTimeout(function() {
26505
+ var last = descendants.lastEnabled();
26506
+ if (last)
26507
+ setFocusedIndex(last.index);
26508
+ });
26509
+ timeoutIds.current.add(id3);
26510
+ }, [descendants]);
26511
+ var onOpenInternal = React.useCallback(function() {
26512
+ onOpenProp == null ? void 0 : onOpenProp();
26513
+ if (autoSelect) {
26514
+ focusFirstItem();
26515
+ } else {
26516
+ focusMenu();
26517
+ }
26518
+ }, [autoSelect, focusFirstItem, focusMenu, onOpenProp]);
26519
+ var _useDisclosure = useDisclosure({
26520
+ isOpen: isOpenProp,
26521
+ defaultIsOpen,
26522
+ onClose: onCloseProp,
26523
+ onOpen: onOpenInternal
26524
+ }), isOpen = _useDisclosure.isOpen, onOpen = _useDisclosure.onOpen, onClose = _useDisclosure.onClose, onToggle = _useDisclosure.onToggle;
26525
+ useOutsideClick({
26526
+ enabled: isOpen && closeOnBlur,
26527
+ ref: menuRef,
26528
+ handler: function handler(event) {
26529
+ var _buttonRef$current;
26530
+ if (!((_buttonRef$current = buttonRef.current) != null && _buttonRef$current.contains(event.target))) {
26531
+ onClose();
26532
+ }
26533
+ }
26534
+ });
26535
+ var popper2 = usePopper(_extends$3({}, popperProps, {
26536
+ enabled: isOpen || computePositionOnMount,
26537
+ placement,
26538
+ direction: direction2
26539
+ }));
26540
+ var _React$useState = React.useState(-1), focusedIndex = _React$useState[0], setFocusedIndex = _React$useState[1];
26541
+ useUpdateEffect(function() {
26542
+ if (!isOpen) {
26543
+ setFocusedIndex(-1);
26544
+ }
26545
+ }, [isOpen]);
26546
+ useFocusOnHide(menuRef, {
26547
+ focusRef: buttonRef,
26548
+ visible: isOpen,
26549
+ shouldFocus: true
26550
+ });
26551
+ var animationState = useAnimationState({
26552
+ isOpen,
26553
+ ref: menuRef
26554
+ });
26555
+ var _useIds = useIds(id2, "menu-button", "menu-list"), buttonId = _useIds[0], menuId = _useIds[1];
26556
+ var openAndFocusMenu = React.useCallback(function() {
26557
+ onOpen();
26558
+ focusMenu();
26559
+ }, [onOpen, focusMenu]);
26560
+ var timeoutIds = React.useRef(/* @__PURE__ */ new Set([]));
26561
+ useUnmountEffect$1(function() {
26562
+ timeoutIds.current.forEach(function(id3) {
26563
+ return clearTimeout(id3);
26564
+ });
26565
+ timeoutIds.current.clear();
26566
+ });
26567
+ var openAndFocusFirstItem = React.useCallback(function() {
26568
+ onOpen();
26569
+ focusFirstItem();
26570
+ }, [focusFirstItem, onOpen]);
26571
+ var openAndFocusLastItem = React.useCallback(function() {
26572
+ onOpen();
26573
+ focusLastItem();
26574
+ }, [onOpen, focusLastItem]);
26575
+ var refocus = React.useCallback(function() {
26576
+ var _menuRef$current, _descendants$item;
26577
+ var doc2 = getOwnerDocument(menuRef.current);
26578
+ var hasFocusWithin = (_menuRef$current = menuRef.current) == null ? void 0 : _menuRef$current.contains(doc2.activeElement);
26579
+ var shouldRefocus = isOpen && !hasFocusWithin;
26580
+ if (!shouldRefocus)
26581
+ return;
26582
+ var node2 = (_descendants$item = descendants.item(focusedIndex)) == null ? void 0 : _descendants$item.node;
26583
+ if (node2) {
26584
+ focus(node2, {
26585
+ selectTextIfInput: false,
26586
+ preventScroll: false
26587
+ });
26588
+ }
26589
+ }, [isOpen, focusedIndex, descendants]);
26590
+ return {
26591
+ openAndFocusMenu,
26592
+ openAndFocusFirstItem,
26593
+ openAndFocusLastItem,
26594
+ onTransitionEnd: refocus,
26595
+ unstable__animationState: animationState,
26596
+ descendants,
26597
+ popper: popper2,
26598
+ buttonId,
26599
+ menuId,
26600
+ forceUpdate: popper2.forceUpdate,
26601
+ orientation: "vertical",
26602
+ isOpen,
26603
+ onToggle,
26604
+ onOpen,
26605
+ onClose,
26606
+ menuRef,
26607
+ buttonRef,
26608
+ focusedIndex,
26609
+ closeOnSelect,
26610
+ closeOnBlur,
26611
+ autoSelect,
26612
+ setFocusedIndex,
26613
+ isLazy,
26614
+ lazyBehavior
26615
+ };
26616
+ }
26617
+ function useMenuButton(props, externalRef) {
26618
+ if (props === void 0) {
26619
+ props = {};
26620
+ }
26621
+ if (externalRef === void 0) {
26622
+ externalRef = null;
26623
+ }
26624
+ var menu2 = useMenuContext();
26625
+ var onToggle = menu2.onToggle, popper2 = menu2.popper, openAndFocusFirstItem = menu2.openAndFocusFirstItem, openAndFocusLastItem = menu2.openAndFocusLastItem;
26626
+ var onKeyDown = React.useCallback(function(event) {
26627
+ var eventKey = normalizeEventKey(event);
26628
+ var keyMap = {
26629
+ Enter: openAndFocusFirstItem,
26630
+ ArrowDown: openAndFocusFirstItem,
26631
+ ArrowUp: openAndFocusLastItem
26632
+ };
26633
+ var action = keyMap[eventKey];
26634
+ if (action) {
26635
+ event.preventDefault();
26636
+ event.stopPropagation();
26637
+ action(event);
26638
+ }
26639
+ }, [openAndFocusFirstItem, openAndFocusLastItem]);
26640
+ return _extends$3({}, props, {
26641
+ ref: mergeRefs(menu2.buttonRef, externalRef, popper2.referenceRef),
26642
+ id: menu2.buttonId,
26643
+ "data-active": dataAttr(menu2.isOpen),
26644
+ "aria-expanded": menu2.isOpen,
26645
+ "aria-haspopup": "menu",
26646
+ "aria-controls": menu2.menuId,
26647
+ onClick: callAllHandlers(props.onClick, onToggle),
26648
+ onKeyDown: callAllHandlers(props.onKeyDown, onKeyDown)
26649
+ });
26650
+ }
26651
+ function isTargetMenuItem(target) {
26652
+ var _target$getAttribute;
26653
+ return isHTMLElement$1(target) && !!((_target$getAttribute = target.getAttribute("role")) != null && _target$getAttribute.startsWith("menuitem"));
26654
+ }
26655
+ function useMenuList(props, ref) {
26656
+ if (props === void 0) {
26657
+ props = {};
26658
+ }
26659
+ if (ref === void 0) {
26660
+ ref = null;
26661
+ }
26662
+ var menu2 = useMenuContext();
26663
+ if (!menu2) {
26664
+ throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within <Menu>");
26665
+ }
26666
+ var focusedIndex = menu2.focusedIndex, setFocusedIndex = menu2.setFocusedIndex, menuRef = menu2.menuRef, isOpen = menu2.isOpen, onClose = menu2.onClose, menuId = menu2.menuId, isLazy = menu2.isLazy, lazyBehavior = menu2.lazyBehavior, animated = menu2.unstable__animationState;
26667
+ var descendants = useMenuDescendantsContext();
26668
+ var createTypeaheadHandler = useShortcut({
26669
+ preventDefault: function preventDefault(event) {
26670
+ return event.key !== " " && isTargetMenuItem(event.target);
26671
+ }
26672
+ });
26673
+ var onKeyDown = React.useCallback(function(event) {
26674
+ var eventKey = normalizeEventKey(event);
26675
+ var keyMap = {
26676
+ Tab: function Tab(event2) {
26677
+ return event2.preventDefault();
26678
+ },
26679
+ Escape: onClose,
26680
+ ArrowDown: function ArrowDown() {
26681
+ var next2 = descendants.nextEnabled(focusedIndex);
26682
+ if (next2)
26683
+ setFocusedIndex(next2.index);
26684
+ },
26685
+ ArrowUp: function ArrowUp() {
26686
+ var prev2 = descendants.prevEnabled(focusedIndex);
26687
+ if (prev2)
26688
+ setFocusedIndex(prev2.index);
26689
+ }
26690
+ };
26691
+ var fn6 = keyMap[eventKey];
26692
+ if (fn6) {
26693
+ event.preventDefault();
26694
+ fn6(event);
26695
+ return;
26696
+ }
26697
+ var onTypeahead = createTypeaheadHandler(function(character2) {
26698
+ var nextItem = getNextItemFromSearch(descendants.values(), character2, function(item) {
26699
+ var _item$node$textConten, _item$node;
26700
+ return (_item$node$textConten = item == null ? void 0 : (_item$node = item.node) == null ? void 0 : _item$node.textContent) != null ? _item$node$textConten : "";
26701
+ }, descendants.item(focusedIndex));
26702
+ if (nextItem) {
26703
+ var index2 = descendants.indexOf(nextItem.node);
26704
+ setFocusedIndex(index2);
26705
+ }
26706
+ });
26707
+ if (isTargetMenuItem(event.target)) {
26708
+ onTypeahead(event);
26709
+ }
26710
+ }, [descendants, focusedIndex, createTypeaheadHandler, onClose, setFocusedIndex]);
26711
+ var hasBeenOpened = React.useRef(false);
26712
+ if (isOpen) {
26713
+ hasBeenOpened.current = true;
26714
+ }
26715
+ var shouldRenderChildren = determineLazyBehavior({
26716
+ hasBeenSelected: hasBeenOpened.current,
26717
+ isLazy,
26718
+ lazyBehavior,
26719
+ isSelected: animated.present
26720
+ });
26721
+ return _extends$3({}, props, {
26722
+ ref: mergeRefs(menuRef, ref),
26723
+ children: shouldRenderChildren ? props.children : null,
26724
+ tabIndex: -1,
26725
+ role: "menu",
26726
+ id: menuId,
26727
+ style: _extends$3({}, props.style, {
26728
+ transformOrigin: "var(--popper-transform-origin)"
26729
+ }),
26730
+ "aria-orientation": "vertical",
26731
+ onKeyDown: callAllHandlers(props.onKeyDown, onKeyDown)
26732
+ });
26733
+ }
26734
+ function useMenuPositioner(props) {
26735
+ if (props === void 0) {
26736
+ props = {};
26737
+ }
26738
+ var _useMenuContext = useMenuContext(), popper2 = _useMenuContext.popper, isOpen = _useMenuContext.isOpen;
26739
+ return popper2.getPopperProps(_extends$3({}, props, {
26740
+ style: _extends$3({
26741
+ visibility: isOpen ? "visible" : "hidden"
26742
+ }, props.style)
26743
+ }));
26744
+ }
26745
+ function useMenuItem(props, externalRef) {
26746
+ if (props === void 0) {
26747
+ props = {};
26748
+ }
26749
+ if (externalRef === void 0) {
26750
+ externalRef = null;
26751
+ }
26752
+ var _props2 = props, onMouseEnterProp = _props2.onMouseEnter, onMouseMoveProp = _props2.onMouseMove, onMouseLeaveProp = _props2.onMouseLeave, onClickProp = _props2.onClick, isDisabled2 = _props2.isDisabled, isFocusable2 = _props2.isFocusable, closeOnSelect = _props2.closeOnSelect, typeProp = _props2.type, htmlProps = _objectWithoutPropertiesLoose$4(_props2, _excluded2$1$2);
26753
+ var menu2 = useMenuContext();
26754
+ var setFocusedIndex = menu2.setFocusedIndex, focusedIndex = menu2.focusedIndex, menuCloseOnSelect = menu2.closeOnSelect, onClose = menu2.onClose, menuRef = menu2.menuRef, isOpen = menu2.isOpen, menuId = menu2.menuId;
26755
+ var ref = React.useRef(null);
26756
+ var id2 = menuId + "-menuitem-" + useId$1();
26757
+ var _useMenuDescendant = useMenuDescendant({
26758
+ disabled: isDisabled2 && !isFocusable2
26759
+ }), index2 = _useMenuDescendant.index, register = _useMenuDescendant.register;
26760
+ var onMouseEnter = React.useCallback(function(event) {
26761
+ onMouseEnterProp == null ? void 0 : onMouseEnterProp(event);
26762
+ if (isDisabled2)
26763
+ return;
26764
+ setFocusedIndex(index2);
26765
+ }, [setFocusedIndex, index2, isDisabled2, onMouseEnterProp]);
26766
+ var onMouseMove = React.useCallback(function(event) {
26767
+ onMouseMoveProp == null ? void 0 : onMouseMoveProp(event);
26768
+ if (ref.current && !isActiveElement(ref.current)) {
26769
+ onMouseEnter(event);
26770
+ }
26771
+ }, [onMouseEnter, onMouseMoveProp]);
26772
+ var onMouseLeave = React.useCallback(function(event) {
26773
+ onMouseLeaveProp == null ? void 0 : onMouseLeaveProp(event);
26774
+ if (isDisabled2)
26775
+ return;
26776
+ setFocusedIndex(-1);
26777
+ }, [setFocusedIndex, isDisabled2, onMouseLeaveProp]);
26778
+ var onClick = React.useCallback(function(event) {
26779
+ onClickProp == null ? void 0 : onClickProp(event);
26780
+ if (!isTargetMenuItem(event.currentTarget))
26781
+ return;
26782
+ if (closeOnSelect != null ? closeOnSelect : menuCloseOnSelect) {
26783
+ onClose();
26784
+ }
26785
+ }, [onClose, onClickProp, menuCloseOnSelect, closeOnSelect]);
26786
+ var isFocused = index2 === focusedIndex;
26787
+ var trulyDisabled = isDisabled2 && !isFocusable2;
26788
+ useUpdateEffect(function() {
26789
+ if (!isOpen)
26790
+ return;
26791
+ if (isFocused && !trulyDisabled && ref.current) {
26792
+ focus(ref.current, {
26793
+ nextTick: true,
26794
+ selectTextIfInput: false,
26795
+ preventScroll: false
26796
+ });
26797
+ } else if (menuRef.current && !isActiveElement(menuRef.current)) {
26798
+ focus(menuRef.current, {
26799
+ preventScroll: false
26800
+ });
26801
+ }
26802
+ }, [isFocused, trulyDisabled, menuRef, isOpen]);
26803
+ var clickableProps = useClickable({
26804
+ onClick,
26805
+ onMouseEnter,
26806
+ onMouseMove,
26807
+ onMouseLeave,
26808
+ ref: mergeRefs(register, ref, externalRef),
26809
+ isDisabled: isDisabled2,
26810
+ isFocusable: isFocusable2
26811
+ });
26812
+ return _extends$3({}, htmlProps, clickableProps, {
26813
+ type: typeProp != null ? typeProp : clickableProps.type,
26814
+ id: id2,
26815
+ role: "menuitem",
26816
+ tabIndex: isFocused ? 0 : -1
26817
+ });
26818
+ }
26819
+ function useMenuOption(props, ref) {
26820
+ if (props === void 0) {
26821
+ props = {};
26822
+ }
26823
+ if (ref === void 0) {
26824
+ ref = null;
26825
+ }
26826
+ var _props3 = props, _props3$type = _props3.type, type = _props3$type === void 0 ? "radio" : _props3$type, isChecked = _props3.isChecked, rest = _objectWithoutPropertiesLoose$4(_props3, _excluded3$1);
26827
+ var ownProps = useMenuItem(rest, ref);
26828
+ return _extends$3({}, ownProps, {
26829
+ role: "menuitem" + type,
26830
+ "aria-checked": isChecked
26831
+ });
26832
+ }
26833
+ var _excluded$4 = ["descendants"], _excluded2$2 = ["children", "as"], _excluded3$2 = ["rootProps"], _excluded4$1 = ["type"], _excluded6$1 = ["icon", "iconSpacing"], _excluded8 = ["title", "children", "className"], _excluded9 = ["className", "children"];
26834
+ var Menu = function Menu2(props) {
26835
+ var children = props.children;
26836
+ var styles2 = useMultiStyleConfig("Menu", props);
26837
+ var ownProps = omitThemingProps(props);
26838
+ var _useTheme = useTheme(), direction2 = _useTheme.direction;
26839
+ var _useMenu = useMenu(_extends$3({}, ownProps, {
26840
+ direction: direction2
26841
+ })), descendants = _useMenu.descendants, ctx = _objectWithoutPropertiesLoose$4(_useMenu, _excluded$4);
26842
+ var context = React.useMemo(function() {
26843
+ return ctx;
26844
+ }, [ctx]);
26845
+ var isOpen = context.isOpen, onClose = context.onClose, forceUpdate = context.forceUpdate;
26846
+ return /* @__PURE__ */ React.createElement(MenuDescendantsProvider, {
26847
+ value: descendants
26848
+ }, /* @__PURE__ */ React.createElement(MenuProvider, {
26849
+ value: context
26850
+ }, /* @__PURE__ */ React.createElement(StylesProvider$1, {
26851
+ value: styles2
26852
+ }, runIfFn(children, {
26853
+ isOpen,
26854
+ onClose,
26855
+ forceUpdate
26856
+ }))));
26857
+ };
26858
+ var StyledMenuButton = /* @__PURE__ */ forwardRef(function(props, ref) {
26859
+ var styles2 = useStyles$1();
26860
+ return /* @__PURE__ */ React.createElement(chakra.button, _extends$3({
26861
+ ref
26862
+ }, props, {
26863
+ __css: _extends$3({
26864
+ display: "inline-flex",
26865
+ appearance: "none",
26866
+ alignItems: "center",
26867
+ outline: 0
26868
+ }, styles2.button)
26869
+ }));
26870
+ });
26871
+ var MenuButton = /* @__PURE__ */ forwardRef(function(props, ref) {
26872
+ props.children;
26873
+ var As = props.as, rest = _objectWithoutPropertiesLoose$4(props, _excluded2$2);
26874
+ var buttonProps = useMenuButton(rest, ref);
26875
+ var Element2 = As || StyledMenuButton;
26876
+ return /* @__PURE__ */ React.createElement(Element2, _extends$3({}, buttonProps, {
26877
+ className: cx("chakra-menu__menu-button", props.className)
26878
+ }), /* @__PURE__ */ React.createElement(chakra.span, {
26879
+ __css: {
26880
+ pointerEvents: "none",
26881
+ flex: "1 1 auto",
26882
+ minW: 0
26883
+ }
26884
+ }, props.children));
26885
+ });
26886
+ var motionVariants = {
26887
+ enter: {
26888
+ visibility: "visible",
26889
+ opacity: 1,
26890
+ scale: 1,
26891
+ transition: {
26892
+ duration: 0.2,
26893
+ ease: [0.4, 0, 0.2, 1]
26894
+ }
26895
+ },
26896
+ exit: {
26897
+ transitionEnd: {
26898
+ visibility: "hidden"
26899
+ },
26900
+ opacity: 0,
26901
+ scale: 0.8,
26902
+ transition: {
26903
+ duration: 0.1,
26904
+ easings: "easeOut"
26905
+ }
26906
+ }
26907
+ };
26908
+ function __motion(el) {
26909
+ var m2 = motion;
26910
+ if ("custom" in m2 && typeof m2.custom === "function") {
26911
+ return m2.custom(el);
26912
+ }
26913
+ return m2(el);
26914
+ }
26915
+ var MenuTransition = __motion(chakra.div);
26916
+ var MenuList = /* @__PURE__ */ forwardRef(function(props, ref) {
26917
+ var _props$zIndex, _styles$list;
26918
+ var rootProps = props.rootProps, rest = _objectWithoutPropertiesLoose$4(props, _excluded3$2);
26919
+ var _useMenuContext = useMenuContext(), isOpen = _useMenuContext.isOpen, onTransitionEnd = _useMenuContext.onTransitionEnd, animated = _useMenuContext.unstable__animationState;
26920
+ var ownProps = useMenuList(rest, ref);
26921
+ var positionerProps = useMenuPositioner(rootProps);
26922
+ var styles2 = useStyles$1();
26923
+ return /* @__PURE__ */ React.createElement(chakra.div, _extends$3({}, positionerProps, {
26924
+ __css: {
26925
+ zIndex: (_props$zIndex = props.zIndex) != null ? _props$zIndex : (_styles$list = styles2.list) == null ? void 0 : _styles$list.zIndex
26926
+ }
26927
+ }), /* @__PURE__ */ React.createElement(MenuTransition, _extends$3({}, ownProps, {
26928
+ onUpdate: onTransitionEnd,
26929
+ onAnimationComplete: callAll(animated.onComplete, ownProps.onAnimationComplete),
26930
+ className: cx("chakra-menu__menu-list", ownProps.className),
26931
+ variants: motionVariants,
26932
+ initial: false,
26933
+ animate: isOpen ? "enter" : "exit",
26934
+ __css: _extends$3({
26935
+ outline: 0
26936
+ }, styles2.list)
26937
+ })));
26938
+ });
26939
+ var StyledMenuItem = /* @__PURE__ */ forwardRef(function(props, ref) {
26940
+ var type = props.type, rest = _objectWithoutPropertiesLoose$4(props, _excluded4$1);
26941
+ var styles2 = useStyles$1();
26942
+ var btnType = rest.as || type ? type != null ? type : void 0 : "button";
26943
+ var buttonStyles = React.useMemo(function() {
26944
+ return _extends$3({
26945
+ textDecoration: "none",
26946
+ color: "inherit",
26947
+ userSelect: "none",
26948
+ display: "flex",
26949
+ width: "100%",
26950
+ alignItems: "center",
26951
+ textAlign: "start",
26952
+ flex: "0 0 auto",
26953
+ outline: 0
26954
+ }, styles2.item);
26955
+ }, [styles2.item]);
26956
+ return /* @__PURE__ */ React.createElement(chakra.button, _extends$3({
26957
+ ref,
26958
+ type: btnType
26959
+ }, rest, {
26960
+ __css: buttonStyles
26961
+ }));
26962
+ });
26963
+ var CheckIcon = function CheckIcon2(props) {
26964
+ return /* @__PURE__ */ React.createElement("svg", _extends$3({
26965
+ viewBox: "0 0 14 14",
26966
+ width: "1em",
26967
+ height: "1em"
26968
+ }, props), /* @__PURE__ */ React.createElement("polygon", {
26969
+ fill: "currentColor",
26970
+ points: "5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"
26971
+ }));
26972
+ };
26973
+ var MenuItemOption = /* @__PURE__ */ forwardRef(function(props, ref) {
26974
+ var icon = props.icon, _props$iconSpacing2 = props.iconSpacing, iconSpacing2 = _props$iconSpacing2 === void 0 ? "0.75rem" : _props$iconSpacing2, rest = _objectWithoutPropertiesLoose$4(props, _excluded6$1);
26975
+ var optionProps = useMenuOption(rest, ref);
26976
+ return /* @__PURE__ */ React.createElement(StyledMenuItem, _extends$3({}, optionProps, {
26977
+ className: cx("chakra-menu__menuitem-option", rest.className)
26978
+ }), icon !== null && /* @__PURE__ */ React.createElement(MenuIcon, {
26979
+ fontSize: "0.8em",
26980
+ marginEnd: iconSpacing2,
26981
+ opacity: props.isChecked ? 1 : 0
26982
+ }, icon || /* @__PURE__ */ React.createElement(CheckIcon, null)), /* @__PURE__ */ React.createElement("span", {
26983
+ style: {
26984
+ flex: 1
26985
+ }
26986
+ }, optionProps.children));
26987
+ });
26988
+ MenuItemOption.id = "MenuItemOption";
26989
+ var MenuGroup = /* @__PURE__ */ forwardRef(function(props, ref) {
26990
+ var title = props.title, children = props.children, className = props.className, rest = _objectWithoutPropertiesLoose$4(props, _excluded8);
26991
+ var _className = cx("chakra-menu__group__title", className);
26992
+ var styles2 = useStyles$1();
26993
+ return /* @__PURE__ */ React.createElement("div", {
26994
+ ref,
26995
+ className: "chakra-menu__group",
26996
+ role: "group"
26997
+ }, title && /* @__PURE__ */ React.createElement(chakra.p, _extends$3({
26998
+ className: _className
26999
+ }, rest, {
27000
+ __css: styles2.groupTitle
27001
+ }), title), children);
27002
+ });
27003
+ var MenuIcon = function MenuIcon2(props) {
27004
+ var className = props.className, children = props.children, rest = _objectWithoutPropertiesLoose$4(props, _excluded9);
27005
+ var child = React.Children.only(children);
27006
+ var clone = /* @__PURE__ */ React.isValidElement(child) ? /* @__PURE__ */ React.cloneElement(child, {
27007
+ focusable: "false",
27008
+ "aria-hidden": true,
27009
+ className: cx("chakra-menu__icon", child.props.className)
27010
+ }) : null;
27011
+ var _className = cx("chakra-menu__icon-wrapper", className);
27012
+ return /* @__PURE__ */ React.createElement(chakra.span, _extends$3({
27013
+ className: _className
27014
+ }, rest, {
27015
+ __css: {
27016
+ flexShrink: 0
27017
+ }
27018
+ }), clone);
27019
+ };
25744
27020
  function _objectWithoutPropertiesLoose$3(r2, e2) {
25745
27021
  if (null == r2)
25746
27022
  return {};
@@ -26047,7 +27323,7 @@ var FocusLock$2 = /* @__PURE__ */ React.forwardRef(function FocusLockUI(props, p
26047
27323
  setObserved(newObserved);
26048
27324
  }
26049
27325
  }, []);
26050
- var lockProps = _extends$h((_extends2 = {}, _extends2[FOCUS_DISABLED] = disabled2 && "disabled", _extends2[FOCUS_GROUP] = group, _extends2), containerProps);
27326
+ var lockProps = _extends$k((_extends2 = {}, _extends2[FOCUS_DISABLED] = disabled2 && "disabled", _extends2[FOCUS_GROUP] = group, _extends2), containerProps);
26051
27327
  var hasLeadingGuards = noFocusGuards !== true;
26052
27328
  var hasTailingGuards = hasLeadingGuards && noFocusGuards !== "tail";
26053
27329
  var mergedRef = useMergeRefs([parentRef, setObserveNode]);
@@ -26077,7 +27353,7 @@ var FocusLock$2 = /* @__PURE__ */ React.forwardRef(function FocusLockUI(props, p
26077
27353
  onActivation,
26078
27354
  onDeactivation,
26079
27355
  returnFocus
26080
- }), /* @__PURE__ */ React.createElement(Container3, _extends$h({
27356
+ }), /* @__PURE__ */ React.createElement(Container3, _extends$k({
26081
27357
  ref: mergedRef
26082
27358
  }, lockProps, {
26083
27359
  className,
@@ -26790,7 +28066,7 @@ mediumEffect.assignMedium(function(cb2) {
26790
28066
  });
26791
28067
  var FocusTrap = withSideEffect(reducePropsToState, handleStateChangeOnClient)(FocusWatcher);
26792
28068
  var FocusLockCombination = /* @__PURE__ */ React.forwardRef(function FocusLockUICombination(props, ref) {
26793
- return /* @__PURE__ */ React.createElement(FocusLockUI2, _extends$h({
28069
+ return /* @__PURE__ */ React.createElement(FocusLockUI2, _extends$k({
26794
28070
  sideCar: FocusTrap,
26795
28071
  ref
26796
28072
  }, props));
@@ -30030,7 +31306,7 @@ function UserWayCookie() {
30030
31306
  });
30031
31307
  }
30032
31308
  const STUDENT = 4;
30033
- function Header() {
31309
+ function Header$1() {
30034
31310
  var _a;
30035
31311
  const {
30036
31312
  background: background2,
@@ -30111,7 +31387,7 @@ function Header() {
30111
31387
  })]
30112
31388
  });
30113
31389
  }
30114
- Header.displayName = "Header";
31390
+ Header$1.displayName = "Header";
30115
31391
  function DateStatus({
30116
31392
  date
30117
31393
  }) {
@@ -31372,7 +32648,7 @@ function BoxTraditional({
31372
32648
  children: [!data.hasFinanzeFreezed && isCourseActive((_e = (_d = data.action) == null ? void 0 : _d.enabled) != null ? _e : false, (_f = data.Profile) == null ? void 0 : _f.id) && /* @__PURE__ */ jsx(LinkOverlay, {
31373
32649
  href: (_g = data.action) == null ? void 0 : _g.href,
31374
32650
  isExternal: (_h = data.action) == null ? void 0 : _h.targetBlank
31375
- }), /* @__PURE__ */ jsx(Header, {}), /* @__PURE__ */ jsx(Section, {})]
32651
+ }), /* @__PURE__ */ jsx(Header$1, {}), /* @__PURE__ */ jsx(Section, {})]
31376
32652
  }), /* @__PURE__ */ jsx(Footer, {
31377
32653
  modalPaymentText
31378
32654
  })]
@@ -32200,7 +33476,7 @@ function ModalAlert({
32200
33476
  });
32201
33477
  }
32202
33478
  ModalAlert.displayName = "ModalAlert";
32203
- const Calendar = ({
33479
+ const Calendar$1 = ({
32204
33480
  color: color2 = "white"
32205
33481
  }) => {
32206
33482
  return /* @__PURE__ */ jsxs(Icon, {
@@ -32233,7 +33509,7 @@ const Calendar = ({
32233
33509
  })]
32234
33510
  });
32235
33511
  };
32236
- const Clock = ({
33512
+ const Clock$1 = ({
32237
33513
  color: color2 = "white"
32238
33514
  }) => {
32239
33515
  return /* @__PURE__ */ jsx(Icon, {
@@ -32310,7 +33586,7 @@ const LargeBox = ({
32310
33586
  display: "flex",
32311
33587
  alignItems: "center",
32312
33588
  gap: "4px",
32313
- children: [/* @__PURE__ */ jsx(Calendar, {
33589
+ children: [/* @__PURE__ */ jsx(Calendar$1, {
32314
33590
  color: vars("colors-main-ziggurat")
32315
33591
  }), /* @__PURE__ */ jsx(Text, {
32316
33592
  fontWeight: "400",
@@ -32322,7 +33598,7 @@ const LargeBox = ({
32322
33598
  m: "0px",
32323
33599
  p: "0px",
32324
33600
  children: "|"
32325
- }), /* @__PURE__ */ jsx(Clock, {
33601
+ }), /* @__PURE__ */ jsx(Clock$1, {
32326
33602
  color: vars("colors-main-ziggurat")
32327
33603
  }), /* @__PURE__ */ jsx(Text, {
32328
33604
  m: "0px",
@@ -32411,14 +33687,14 @@ const SmallBox = ({
32411
33687
  display: "flex",
32412
33688
  alignItems: "center",
32413
33689
  gap: "4px",
32414
- children: [/* @__PURE__ */ jsx(Calendar, {}), /* @__PURE__ */ jsx(Text, {
33690
+ children: [/* @__PURE__ */ jsx(Calendar$1, {}), /* @__PURE__ */ jsx(Text, {
32415
33691
  fontWeight: "400",
32416
33692
  m: "0px",
32417
33693
  children: startDate
32418
33694
  }), /* @__PURE__ */ jsx(Text, {
32419
33695
  m: "0px",
32420
33696
  children: "|"
32421
- }), /* @__PURE__ */ jsx(Clock, {}), /* @__PURE__ */ jsx(Text, {
33697
+ }), /* @__PURE__ */ jsx(Clock$1, {}), /* @__PURE__ */ jsx(Text, {
32422
33698
  m: "0px",
32423
33699
  children: startTime
32424
33700
  })]
@@ -33633,5 +34909,883 @@ const Resources = ({
33633
34909
  })
33634
34910
  });
33635
34911
  };
33636
- export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CourseList, CourseStatus, Eventos, FlashNotification, index as Icons, Label, ModalAlert, NewTooltip, Progress, Resources, Ripples, TinyAlert, UserWay, UserWayCookie, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
34912
+ const millisecondsInMinute = 6e4;
34913
+ const millisecondsInHour = 36e5;
34914
+ const constructFromSymbol = Symbol.for("constructDateFrom");
34915
+ function constructFrom(date, value) {
34916
+ if (typeof date === "function")
34917
+ return date(value);
34918
+ if (date && typeof date === "object" && constructFromSymbol in date)
34919
+ return date[constructFromSymbol](value);
34920
+ if (date instanceof Date)
34921
+ return new date.constructor(value);
34922
+ return new Date(value);
34923
+ }
34924
+ function toDate(argument, context) {
34925
+ return constructFrom(context || argument, argument);
34926
+ }
34927
+ function addDays(date, amount, options) {
34928
+ const _date = toDate(date, options == null ? void 0 : options.in);
34929
+ if (isNaN(amount))
34930
+ return constructFrom((options == null ? void 0 : options.in) || date, NaN);
34931
+ if (!amount)
34932
+ return _date;
34933
+ _date.setDate(_date.getDate() + amount);
34934
+ return _date;
34935
+ }
34936
+ function normalizeDates(context, ...dates) {
34937
+ const normalize2 = constructFrom.bind(
34938
+ null,
34939
+ context || dates.find((date) => typeof date === "object")
34940
+ );
34941
+ return dates.map(normalize2);
34942
+ }
34943
+ function startOfDay(date, options) {
34944
+ const _date = toDate(date, options == null ? void 0 : options.in);
34945
+ _date.setHours(0, 0, 0, 0);
34946
+ return _date;
34947
+ }
34948
+ function isSameDay(laterDate, earlierDate, options) {
34949
+ const [dateLeft_, dateRight_] = normalizeDates(
34950
+ options == null ? void 0 : options.in,
34951
+ laterDate,
34952
+ earlierDate
34953
+ );
34954
+ return +startOfDay(dateLeft_) === +startOfDay(dateRight_);
34955
+ }
34956
+ function isAfter(date, dateToCompare) {
34957
+ return +toDate(date) > +toDate(dateToCompare);
34958
+ }
34959
+ function parseISO(argument, options) {
34960
+ var _a;
34961
+ const invalidDate = () => constructFrom(options == null ? void 0 : options.in, NaN);
34962
+ const additionalDigits = (_a = options == null ? void 0 : options.additionalDigits) != null ? _a : 2;
34963
+ const dateStrings = splitDateString(argument);
34964
+ let date;
34965
+ if (dateStrings.date) {
34966
+ const parseYearResult = parseYear(dateStrings.date, additionalDigits);
34967
+ date = parseDate(parseYearResult.restDateString, parseYearResult.year);
34968
+ }
34969
+ if (!date || isNaN(+date))
34970
+ return invalidDate();
34971
+ const timestamp = +date;
34972
+ let time = 0;
34973
+ let offset2;
34974
+ if (dateStrings.time) {
34975
+ time = parseTime(dateStrings.time);
34976
+ if (isNaN(time))
34977
+ return invalidDate();
34978
+ }
34979
+ if (dateStrings.timezone) {
34980
+ offset2 = parseTimezone(dateStrings.timezone);
34981
+ if (isNaN(offset2))
34982
+ return invalidDate();
34983
+ } else {
34984
+ const tmpDate = new Date(timestamp + time);
34985
+ const result = toDate(0, options == null ? void 0 : options.in);
34986
+ result.setFullYear(
34987
+ tmpDate.getUTCFullYear(),
34988
+ tmpDate.getUTCMonth(),
34989
+ tmpDate.getUTCDate()
34990
+ );
34991
+ result.setHours(
34992
+ tmpDate.getUTCHours(),
34993
+ tmpDate.getUTCMinutes(),
34994
+ tmpDate.getUTCSeconds(),
34995
+ tmpDate.getUTCMilliseconds()
34996
+ );
34997
+ return result;
34998
+ }
34999
+ return toDate(timestamp + time + offset2, options == null ? void 0 : options.in);
35000
+ }
35001
+ const patterns = {
35002
+ dateTimeDelimiter: /[T ]/,
35003
+ timeZoneDelimiter: /[Z ]/i,
35004
+ timezone: /([Z+-].*)$/
35005
+ };
35006
+ const dateRegex = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/;
35007
+ const timeRegex = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/;
35008
+ const timezoneRegex = /^([+-])(\d{2})(?::?(\d{2}))?$/;
35009
+ function splitDateString(dateString) {
35010
+ const dateStrings = {};
35011
+ const array = dateString.split(patterns.dateTimeDelimiter);
35012
+ let timeString;
35013
+ if (array.length > 2) {
35014
+ return dateStrings;
35015
+ }
35016
+ if (/:/.test(array[0])) {
35017
+ timeString = array[0];
35018
+ } else {
35019
+ dateStrings.date = array[0];
35020
+ timeString = array[1];
35021
+ if (patterns.timeZoneDelimiter.test(dateStrings.date)) {
35022
+ dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];
35023
+ timeString = dateString.substr(
35024
+ dateStrings.date.length,
35025
+ dateString.length
35026
+ );
35027
+ }
35028
+ }
35029
+ if (timeString) {
35030
+ const token2 = patterns.timezone.exec(timeString);
35031
+ if (token2) {
35032
+ dateStrings.time = timeString.replace(token2[1], "");
35033
+ dateStrings.timezone = token2[1];
35034
+ } else {
35035
+ dateStrings.time = timeString;
35036
+ }
35037
+ }
35038
+ return dateStrings;
35039
+ }
35040
+ function parseYear(dateString, additionalDigits) {
35041
+ const regex = new RegExp(
35042
+ "^(?:(\\d{4}|[+-]\\d{" + (4 + additionalDigits) + "})|(\\d{2}|[+-]\\d{" + (2 + additionalDigits) + "})$)"
35043
+ );
35044
+ const captures = dateString.match(regex);
35045
+ if (!captures)
35046
+ return { year: NaN, restDateString: "" };
35047
+ const year = captures[1] ? parseInt(captures[1]) : null;
35048
+ const century = captures[2] ? parseInt(captures[2]) : null;
35049
+ return {
35050
+ year: century === null ? year : century * 100,
35051
+ restDateString: dateString.slice((captures[1] || captures[2]).length)
35052
+ };
35053
+ }
35054
+ function parseDate(dateString, year) {
35055
+ if (year === null)
35056
+ return new Date(NaN);
35057
+ const captures = dateString.match(dateRegex);
35058
+ if (!captures)
35059
+ return new Date(NaN);
35060
+ const isWeekDate = !!captures[4];
35061
+ const dayOfYear = parseDateUnit(captures[1]);
35062
+ const month = parseDateUnit(captures[2]) - 1;
35063
+ const day = parseDateUnit(captures[3]);
35064
+ const week = parseDateUnit(captures[4]);
35065
+ const dayOfWeek = parseDateUnit(captures[5]) - 1;
35066
+ if (isWeekDate) {
35067
+ if (!validateWeekDate(year, week, dayOfWeek)) {
35068
+ return new Date(NaN);
35069
+ }
35070
+ return dayOfISOWeekYear(year, week, dayOfWeek);
35071
+ } else {
35072
+ const date = new Date(0);
35073
+ if (!validateDate(year, month, day) || !validateDayOfYearDate(year, dayOfYear)) {
35074
+ return new Date(NaN);
35075
+ }
35076
+ date.setUTCFullYear(year, month, Math.max(dayOfYear, day));
35077
+ return date;
35078
+ }
35079
+ }
35080
+ function parseDateUnit(value) {
35081
+ return value ? parseInt(value) : 1;
35082
+ }
35083
+ function parseTime(timeString) {
35084
+ const captures = timeString.match(timeRegex);
35085
+ if (!captures)
35086
+ return NaN;
35087
+ const hours = parseTimeUnit(captures[1]);
35088
+ const minutes = parseTimeUnit(captures[2]);
35089
+ const seconds = parseTimeUnit(captures[3]);
35090
+ if (!validateTime(hours, minutes, seconds)) {
35091
+ return NaN;
35092
+ }
35093
+ return hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1e3;
35094
+ }
35095
+ function parseTimeUnit(value) {
35096
+ return value && parseFloat(value.replace(",", ".")) || 0;
35097
+ }
35098
+ function parseTimezone(timezoneString) {
35099
+ if (timezoneString === "Z")
35100
+ return 0;
35101
+ const captures = timezoneString.match(timezoneRegex);
35102
+ if (!captures)
35103
+ return 0;
35104
+ const sign = captures[1] === "+" ? -1 : 1;
35105
+ const hours = parseInt(captures[2]);
35106
+ const minutes = captures[3] && parseInt(captures[3]) || 0;
35107
+ if (!validateTimezone(hours, minutes)) {
35108
+ return NaN;
35109
+ }
35110
+ return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);
35111
+ }
35112
+ function dayOfISOWeekYear(isoWeekYear, week, day) {
35113
+ const date = new Date(0);
35114
+ date.setUTCFullYear(isoWeekYear, 0, 4);
35115
+ const fourthOfJanuaryDay = date.getUTCDay() || 7;
35116
+ const diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;
35117
+ date.setUTCDate(date.getUTCDate() + diff);
35118
+ return date;
35119
+ }
35120
+ const daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
35121
+ function isLeapYearIndex(year) {
35122
+ return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;
35123
+ }
35124
+ function validateDate(year, month, date) {
35125
+ return month >= 0 && month <= 11 && date >= 1 && date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28));
35126
+ }
35127
+ function validateDayOfYearDate(year, dayOfYear) {
35128
+ return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);
35129
+ }
35130
+ function validateWeekDate(_year, week, day) {
35131
+ return week >= 1 && week <= 53 && day >= 0 && day <= 6;
35132
+ }
35133
+ function validateTime(hours, minutes, seconds) {
35134
+ if (hours === 24) {
35135
+ return minutes === 0 && seconds === 0;
35136
+ }
35137
+ return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25;
35138
+ }
35139
+ function validateTimezone(_hours, minutes) {
35140
+ return minutes >= 0 && minutes <= 59;
35141
+ }
35142
+ const STORAGE_TODAY_EVENT = "todayEvents";
35143
+ const STORAGE_SEEN_EVENT = "seenEvents";
35144
+ const STORAGE_HAS_NEW = "hasNewEvents";
35145
+ const useParseEvents = (events, now) => {
35146
+ const [todayEvents, setTodayEvents] = useState([]);
35147
+ const [tomorrowEvents, setTomorrowEvents] = useState([]);
35148
+ const [nextEvents, setNextEvents] = useState([]);
35149
+ const [hasNew, setHasNew] = useState(false);
35150
+ useEffect(() => {
35151
+ var _a, _b;
35152
+ const parseNow = parseISO(now);
35153
+ const today = startOfDay(parseNow);
35154
+ const tomorrow = addDays(today, 1);
35155
+ const storedTodayEvent = JSON.parse((_a = localStorage.getItem(STORAGE_TODAY_EVENT)) != null ? _a : "[]");
35156
+ const storedSeenEvent = JSON.parse((_b = localStorage.getItem(STORAGE_SEEN_EVENT)) != null ? _b : "[]");
35157
+ let newEvents = false;
35158
+ const todayList = [];
35159
+ const tomorrowList = [];
35160
+ const nextList = [];
35161
+ events.forEach((event) => {
35162
+ const eventStart = parseISO(event.start);
35163
+ if (isSameDay(eventStart, today)) {
35164
+ const seen = storedSeenEvent.includes(event.id);
35165
+ if (!seen) {
35166
+ newEvents = true;
35167
+ if (!storedTodayEvent.includes(event.id)) {
35168
+ storedTodayEvent.push(event.id);
35169
+ }
35170
+ }
35171
+ todayList.push({ ...event, isNew: !seen });
35172
+ } else if (isSameDay(eventStart, tomorrow)) {
35173
+ tomorrowList.push(event);
35174
+ } else if (isAfter(eventStart, today)) {
35175
+ nextList.push(event);
35176
+ }
35177
+ });
35178
+ setTodayEvents(todayList);
35179
+ setTomorrowEvents(tomorrowList);
35180
+ let next2 = [...nextList];
35181
+ if (nextList.length > 5) {
35182
+ next2 = next2.slice(0, 5);
35183
+ }
35184
+ setNextEvents(next2);
35185
+ setHasNew(newEvents);
35186
+ localStorage.setItem(STORAGE_TODAY_EVENT, JSON.stringify(storedTodayEvent));
35187
+ localStorage.setItem(STORAGE_HAS_NEW, JSON.stringify(newEvents));
35188
+ }, [events, now]);
35189
+ const closeAndMarkSeen = () => {
35190
+ var _a;
35191
+ const storedSeenEvent = JSON.parse((_a = localStorage.getItem(STORAGE_SEEN_EVENT)) != null ? _a : "[]");
35192
+ const updatedSeenEvents = Array.from(
35193
+ /* @__PURE__ */ new Set([...storedSeenEvent, ...todayEvents.map((e2) => e2.id)])
35194
+ );
35195
+ localStorage.setItem(STORAGE_SEEN_EVENT, JSON.stringify(updatedSeenEvents));
35196
+ localStorage.setItem(STORAGE_HAS_NEW, JSON.stringify(false));
35197
+ setTimeout(() => {
35198
+ setTodayEvents(todayEvents.map((el) => ({ ...el, isNew: false })));
35199
+ }, 300);
35200
+ setHasNew(false);
35201
+ };
35202
+ const empty = false;
35203
+ return {
35204
+ today: todayEvents,
35205
+ tomorrow: tomorrowEvents,
35206
+ next: nextEvents,
35207
+ hasNew,
35208
+ closeAndMarkSeen,
35209
+ empty
35210
+ };
35211
+ };
35212
+ const CalendarButtonIcon = () => /* @__PURE__ */ jsxs("svg", {
35213
+ width: 16,
35214
+ height: 16,
35215
+ fill: "none",
35216
+ children: [/* @__PURE__ */ jsx("path", {
35217
+ fill: "#fff",
35218
+ d: "M15 2h-2V0h-2v2H9V0H7v2H5V0H3v2H1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1Zm-1 12H2V5h12v9Z"
35219
+ }), /* @__PURE__ */ jsx("path", {
35220
+ fill: "#fff",
35221
+ d: "M6 7H4v2h2V7ZM9 7H7v2h2V7ZM6 10H4v2h2v-2ZM9 10H7v2h2v-2ZM12 7h-2v2h2V7ZM12 10h-2v2h2v-2Z"
35222
+ })]
35223
+ });
35224
+ const NotificationIcon = () => /* @__PURE__ */ jsx("svg", {
35225
+ xmlns: "http://www.w3.org/2000/svg",
35226
+ width: 8,
35227
+ height: 9,
35228
+ fill: "none",
35229
+ className: "notification",
35230
+ children: /* @__PURE__ */ jsx("circle", {
35231
+ cx: 4,
35232
+ cy: 4.5,
35233
+ r: 4,
35234
+ fill: "#FF7A14"
35235
+ })
35236
+ });
35237
+ const GoToCalendar = ({
35238
+ hasNew,
35239
+ text,
35240
+ tooltipDisabled
35241
+ }) => {
35242
+ return /* @__PURE__ */ jsx(NewTooltip, {
35243
+ label: text != null ? text : "Calendario",
35244
+ m: "2px 0 0 0",
35245
+ isDisabled: tooltipDisabled,
35246
+ children: /* @__PURE__ */ jsxs(MenuButton, {
35247
+ background: "#60798E",
35248
+ border: "1px solid transparent",
35249
+ borderRadius: "100%",
35250
+ height: "30px",
35251
+ width: "30px",
35252
+ position: "relative",
35253
+ sx: {
35254
+ ">span": {
35255
+ justifyItems: "center",
35256
+ alignContent: "center"
35257
+ },
35258
+ ".notification": {
35259
+ position: "absolute",
35260
+ top: "-1px",
35261
+ right: "-1px"
35262
+ }
35263
+ },
35264
+ children: [/* @__PURE__ */ jsx(CalendarButtonIcon, {}), hasNew && /* @__PURE__ */ jsx(NotificationIcon, {})]
35265
+ })
35266
+ });
35267
+ };
35268
+ const Header = ({
35269
+ text,
35270
+ isMobile
35271
+ }) => {
35272
+ return /* @__PURE__ */ jsxs(Fragment, {
35273
+ children: [/* @__PURE__ */ jsx(Box, {
35274
+ as: "header",
35275
+ bg: "#5C5C5C",
35276
+ borderRadius: isMobile ? "none" : "10px 10px 0 0",
35277
+ color: "#FFFFFF",
35278
+ fontSize: "14px",
35279
+ fontWeight: "500",
35280
+ lineHeight: "normal",
35281
+ padding: "16px",
35282
+ position: "absolute",
35283
+ width: isMobile ? "100vw" : "100%",
35284
+ top: 0,
35285
+ zIndex: "1",
35286
+ children: text != null ? text : "Pr\xF3ximas fechas importantes de tus cursos"
35287
+ }), /* @__PURE__ */ jsx(Box, {
35288
+ className: "arrow",
35289
+ "aria-hidden": true,
35290
+ borderBottom: "12px solid #5C5C5C",
35291
+ borderLeft: "14px solid transparent",
35292
+ borderRight: "14px solid transparent",
35293
+ display: isMobile ? "none" : "block",
35294
+ height: "0",
35295
+ position: "fixed",
35296
+ right: isMobile ? "71px" : "-437px",
35297
+ top: isMobile ? "54px" : "-9px",
35298
+ width: "0"
35299
+ })]
35300
+ });
35301
+ };
35302
+ const NoEventsIcon = () => /* @__PURE__ */ jsxs("svg", {
35303
+ width: 197,
35304
+ height: 197,
35305
+ fill: "none",
35306
+ children: [/* @__PURE__ */ jsxs("g", {
35307
+ clipPath: "url(#a)",
35308
+ children: [/* @__PURE__ */ jsx("path", {
35309
+ fill: "#F4F4F4",
35310
+ d: "M98.5 197c54.4 0 98.5-44.1 98.5-98.5S152.9 0 98.5 0 0 44.1 0 98.5 44.1 197 98.5 197Z"
35311
+ }), /* @__PURE__ */ jsx("rect", {
35312
+ width: 74,
35313
+ height: 29,
35314
+ x: 106,
35315
+ y: 12,
35316
+ fill: "#FF554D",
35317
+ rx: 5
35318
+ }), /* @__PURE__ */ jsx("rect", {
35319
+ width: 40,
35320
+ height: 6,
35321
+ x: 125,
35322
+ y: 24,
35323
+ fill: "#08044F",
35324
+ rx: 3
35325
+ }), /* @__PURE__ */ jsx("rect", {
35326
+ width: 6,
35327
+ height: 6,
35328
+ x: 114,
35329
+ y: 24,
35330
+ fill: "#08044F",
35331
+ rx: 3
35332
+ }), /* @__PURE__ */ jsx("rect", {
35333
+ width: 106,
35334
+ height: 29,
35335
+ x: 11,
35336
+ y: 159,
35337
+ fill: "#1EBDAF",
35338
+ rx: 5
35339
+ }), /* @__PURE__ */ jsx("rect", {
35340
+ width: 67,
35341
+ height: 6,
35342
+ x: 21,
35343
+ y: 170,
35344
+ fill: "#08044F",
35345
+ rx: 3
35346
+ }), /* @__PURE__ */ jsx("rect", {
35347
+ width: 6,
35348
+ height: 6,
35349
+ x: 99,
35350
+ y: 170,
35351
+ fill: "#08044F",
35352
+ rx: 3
35353
+ }), /* @__PURE__ */ jsx("rect", {
35354
+ width: 123,
35355
+ height: 82,
35356
+ x: 37,
35357
+ y: 66,
35358
+ fill: "#0189FF",
35359
+ rx: 5
35360
+ }), /* @__PURE__ */ jsx("rect", {
35361
+ width: 16,
35362
+ height: 6,
35363
+ x: 131,
35364
+ y: 93,
35365
+ fill: "#F4F4F4",
35366
+ rx: 3
35367
+ }), /* @__PURE__ */ jsx("rect", {
35368
+ width: 16,
35369
+ height: 6,
35370
+ x: 131,
35371
+ y: 110,
35372
+ fill: "#F4F4F4",
35373
+ rx: 3
35374
+ }), /* @__PURE__ */ jsx("path", {
35375
+ stroke: "#FFBC27",
35376
+ strokeLinecap: "round",
35377
+ strokeWidth: 13,
35378
+ d: "M68.5 56.5v19M132.5 56.5v19"
35379
+ }), /* @__PURE__ */ jsx("rect", {
35380
+ width: 16,
35381
+ height: 6,
35382
+ x: 50,
35383
+ y: 93,
35384
+ fill: "#F4F4F4",
35385
+ rx: 3
35386
+ }), /* @__PURE__ */ jsx("rect", {
35387
+ width: 16,
35388
+ height: 6,
35389
+ x: 50,
35390
+ y: 110,
35391
+ fill: "#F4F4F4",
35392
+ rx: 3
35393
+ }), /* @__PURE__ */ jsx("rect", {
35394
+ width: 16,
35395
+ height: 6,
35396
+ x: 50,
35397
+ y: 127,
35398
+ fill: "#F4F4F4",
35399
+ rx: 3
35400
+ }), /* @__PURE__ */ jsx("rect", {
35401
+ width: 16,
35402
+ height: 6,
35403
+ x: 77,
35404
+ y: 93,
35405
+ fill: "#F4F4F4",
35406
+ rx: 3
35407
+ }), /* @__PURE__ */ jsx("rect", {
35408
+ width: 16,
35409
+ height: 6,
35410
+ x: 104,
35411
+ y: 93,
35412
+ fill: "#F4F4F4",
35413
+ rx: 3
35414
+ }), /* @__PURE__ */ jsx("rect", {
35415
+ width: 16,
35416
+ height: 6,
35417
+ x: 104,
35418
+ y: 110,
35419
+ fill: "#F4F4F4",
35420
+ rx: 3
35421
+ }), /* @__PURE__ */ jsx("rect", {
35422
+ width: 16,
35423
+ height: 6,
35424
+ x: 104,
35425
+ y: 127,
35426
+ fill: "#F4F4F4",
35427
+ rx: 3
35428
+ })]
35429
+ }), /* @__PURE__ */ jsx("defs", {
35430
+ children: /* @__PURE__ */ jsx("clipPath", {
35431
+ id: "a",
35432
+ children: /* @__PURE__ */ jsx("path", {
35433
+ fill: "#fff",
35434
+ d: "M0 0h197v197H0z"
35435
+ })
35436
+ })
35437
+ })]
35438
+ });
35439
+ const Empty = ({
35440
+ text
35441
+ }) => {
35442
+ return /* @__PURE__ */ jsxs(Box, {
35443
+ alignItems: "center",
35444
+ display: "flex",
35445
+ flexDirection: "column",
35446
+ gap: "24px",
35447
+ padding: "104px 0px 64px",
35448
+ children: [/* @__PURE__ */ jsx(NoEventsIcon, {}), /* @__PURE__ */ jsx(Box, {
35449
+ fontSize: "20px",
35450
+ fontWeight: 700,
35451
+ color: "#2F2F2F",
35452
+ children: text != null ? text : "A\xFAn no tienes eventos en tu calendario"
35453
+ })]
35454
+ });
35455
+ };
35456
+ function Calendar(props) {
35457
+ return /* @__PURE__ */ jsx(Base, {
35458
+ ...props,
35459
+ title: "Calendar",
35460
+ children: /* @__PURE__ */ jsxs("g", {
35461
+ fill: "#B0CFE0",
35462
+ children: [/* @__PURE__ */ jsx("path", {
35463
+ fill: "#B0CFE0",
35464
+ d: "M15 2h-2V0h-2v2H9V0H7v2H5V0H3v2H1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1zm-1 12H2V5h12v9z"
35465
+ }), /* @__PURE__ */ jsx("path", {
35466
+ d: "M4 7h2v2H4zM7 7h2v2H7zM4 10h2v2H4zM7 10h2v2H7zM10 7h2v2h-2zM10 10h2v2h-2z"
35467
+ })]
35468
+ })
35469
+ });
35470
+ }
35471
+ Calendar.displayName = "Calendar";
35472
+ function Clock(props) {
35473
+ return /* @__PURE__ */ jsx(Base, {
35474
+ ...props,
35475
+ title: "Clock",
35476
+ children: /* @__PURE__ */ jsx("path", {
35477
+ fill: "#B0CFE0",
35478
+ d: "M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 9H7V4h2v3h3v2z"
35479
+ })
35480
+ });
35481
+ }
35482
+ Clock.displayName = "Clock";
35483
+ const EventsList = ({
35484
+ hasNotification,
35485
+ isDropdown,
35486
+ name,
35487
+ courseName,
35488
+ color: color2,
35489
+ text,
35490
+ date,
35491
+ hours
35492
+ }) => {
35493
+ const border2 = "1px solid #E8E8E8";
35494
+ const bgColor = color2 || "#82504A";
35495
+ return /* @__PURE__ */ jsx(Box, {
35496
+ className: "eventsList",
35497
+ borderTop: border2,
35498
+ padding: "16px 24px",
35499
+ children: /* @__PURE__ */ jsxs(Box, {
35500
+ display: "flex",
35501
+ flexDirection: "column",
35502
+ gap: "8px",
35503
+ children: [/* @__PURE__ */ jsxs(Box, {
35504
+ lineHeight: "21px",
35505
+ display: "flex",
35506
+ justifyContent: "space-between",
35507
+ alignItems: "center",
35508
+ fontSize: "16px",
35509
+ children: [name, " ", hasNotification && /* @__PURE__ */ jsx(NotificationIcon, {})]
35510
+ }), /* @__PURE__ */ jsxs(Box, {
35511
+ display: "flex",
35512
+ lineHeight: "19px",
35513
+ fontSize: "14px",
35514
+ sx: {
35515
+ svg: {
35516
+ marginRight: "4px"
35517
+ },
35518
+ span: {
35519
+ verticalAlign: "middle"
35520
+ }
35521
+ },
35522
+ children: [/* @__PURE__ */ jsxs(Box, {
35523
+ paddingRight: "8px",
35524
+ borderRight: border2,
35525
+ children: [/* @__PURE__ */ jsx(Calendar, {}), /* @__PURE__ */ jsx("span", {
35526
+ children: date
35527
+ })]
35528
+ }), /* @__PURE__ */ jsxs(Box, {
35529
+ paddingLeft: "8px",
35530
+ children: [/* @__PURE__ */ jsx(Clock, {}), /* @__PURE__ */ jsx("span", {
35531
+ children: hours
35532
+ })]
35533
+ })]
35534
+ }), isDropdown && /* @__PURE__ */ jsxs(Box, {
35535
+ display: "flex",
35536
+ alignItems: "center",
35537
+ gap: "4px",
35538
+ lineHeight: "19px",
35539
+ children: [/* @__PURE__ */ jsx(Box, {
35540
+ h: "10px",
35541
+ w: "10px",
35542
+ bg: bgColor,
35543
+ borderRadius: "50%",
35544
+ display: "block",
35545
+ alignSelf: "flex-start",
35546
+ mt: "4px"
35547
+ }), /* @__PURE__ */ jsxs(Box, {
35548
+ as: "span",
35549
+ color: "#808080",
35550
+ fontSize: "14px",
35551
+ children: [/* @__PURE__ */ jsxs("strong", {
35552
+ children: [text != null ? text : "Curso", ":"]
35553
+ }), " ", courseName]
35554
+ })]
35555
+ })]
35556
+ })
35557
+ });
35558
+ };
35559
+ const Events = ({
35560
+ events,
35561
+ text,
35562
+ redirecToCalendar,
35563
+ isMobile,
35564
+ colors: colors2
35565
+ }) => {
35566
+ var _a, _b, _c, _d, _e, _f, _g;
35567
+ const {
35568
+ today,
35569
+ tomorrow,
35570
+ next: next2
35571
+ } = events;
35572
+ return /* @__PURE__ */ jsxs(Box, {
35573
+ borderRadius: "10px",
35574
+ color: "#1C1818",
35575
+ h: isMobile ? "auto" : "552px",
35576
+ overflowY: "scroll",
35577
+ pb: "32px",
35578
+ sx: {
35579
+ ".calendar-events-group": {
35580
+ borderBottom: "1px solid #E8E8E8"
35581
+ }
35582
+ },
35583
+ children: [redirecToCalendar && /* @__PURE__ */ jsx(Box, {
35584
+ sx: {
35585
+ button: {
35586
+ p: "8px ",
35587
+ fontSize: "14px",
35588
+ lineHeight: "14px",
35589
+ minW: "fit-content",
35590
+ minH: "fit-content"
35591
+ }
35592
+ },
35593
+ children: /* @__PURE__ */ jsx(BtnSecondary, {
35594
+ onClick: redirecToCalendar,
35595
+ m: "72px 0 0 24px",
35596
+ children: (_a = text == null ? void 0 : text.buttonCalendar) != null ? _a : "Ir a Mi Calendario"
35597
+ })
35598
+ }), /* @__PURE__ */ jsx(EventsGroup, {
35599
+ colors: colors2,
35600
+ text: text.course,
35601
+ title: (_c = (_b = text == null ? void 0 : text.events) == null ? void 0 : _b.today) != null ? _c : "Hoy",
35602
+ events: today
35603
+ }), /* @__PURE__ */ jsx(EventsGroup, {
35604
+ colors: colors2,
35605
+ text: text.course,
35606
+ title: (_e = (_d = text == null ? void 0 : text.events) == null ? void 0 : _d.tomorrow) != null ? _e : "Ma\xF1ana",
35607
+ events: tomorrow
35608
+ }), /* @__PURE__ */ jsx(EventsGroup, {
35609
+ colors: colors2,
35610
+ text: text.course,
35611
+ title: (_g = (_f = text == null ? void 0 : text.events) == null ? void 0 : _f.next) != null ? _g : "Pr\xF3ximos",
35612
+ events: next2
35613
+ })]
35614
+ });
35615
+ };
35616
+ const EventsGroup = ({
35617
+ title,
35618
+ events,
35619
+ text,
35620
+ colors: colors2
35621
+ }) => {
35622
+ if (!events || events && events.length === 0)
35623
+ return /* @__PURE__ */ jsx(Fragment, {});
35624
+ return /* @__PURE__ */ jsx(Box, {
35625
+ className: "calendar-events-group",
35626
+ _focus: {
35627
+ background: "none !important",
35628
+ border: "1px solid #0189FF"
35629
+ },
35630
+ sx: {
35631
+ ".chakra-menu__menuitem > div": {
35632
+ w: "100%"
35633
+ }
35634
+ },
35635
+ children: /* @__PURE__ */ jsx(MenuGroup, {
35636
+ title,
35637
+ children: events.map((event) => {
35638
+ return /* @__PURE__ */ jsx(
35639
+ Box,
35640
+ {
35641
+ bg: "#FFFFFF",
35642
+ border: "none",
35643
+ cursor: "default",
35644
+ padding: "0",
35645
+ _hover: {
35646
+ boxShadow: "none !important",
35647
+ cursor: "default !important",
35648
+ bg: "none !important"
35649
+ },
35650
+ _focus: {
35651
+ background: "none !important",
35652
+ boxShadow: "none !important"
35653
+ },
35654
+ children: /* @__PURE__ */ jsx(EventsList, {
35655
+ name: event.associated_resource.name || "",
35656
+ courseName: event.course.name,
35657
+ date: event.formatedDate.start,
35658
+ hours: event.formatedDate.hours,
35659
+ color: event.course_id && (colors2 == null ? void 0 : colors2[event.course_id]),
35660
+ text,
35661
+ hasNotification: event.isNew,
35662
+ isDropdown: true
35663
+ }, event.id)
35664
+ },
35665
+ event.id
35666
+ );
35667
+ })
35668
+ })
35669
+ });
35670
+ };
35671
+ const CalendarDropdownContainer = ({
35672
+ events,
35673
+ loading,
35674
+ text,
35675
+ now,
35676
+ redirectToCalendar,
35677
+ courseColors: colors2
35678
+ }) => {
35679
+ const [isMobile] = useMediaQuery("(max-width: 577px)");
35680
+ const {
35681
+ closeAndMarkSeen,
35682
+ empty,
35683
+ hasNew,
35684
+ ...all
35685
+ } = useParseEvents(events, now);
35686
+ const [isTooltipDisabled, setTooltipDisabled] = useState(false);
35687
+ const [isMenuOpen, setMenuOpen] = useState(false);
35688
+ useEffect(() => {
35689
+ if (isMenuOpen) {
35690
+ setTooltipDisabled(true);
35691
+ } else {
35692
+ const timer = setTimeout(() => setTooltipDisabled(false), 300);
35693
+ return () => clearTimeout(timer);
35694
+ }
35695
+ }, [isMenuOpen]);
35696
+ const onClose = () => {
35697
+ closeAndMarkSeen();
35698
+ setMenuOpen(false);
35699
+ };
35700
+ return /* @__PURE__ */ jsx(Box, {
35701
+ zIndex: 4,
35702
+ className: "calendarDropdown",
35703
+ mr: "24px",
35704
+ position: "relative",
35705
+ sx: {
35706
+ ">div": {
35707
+ position: isMobile ? "fixed !important" : "absolute",
35708
+ left: isMobile ? "0 !important" : "auto",
35709
+ top: isMobile ? "62px !important" : "auto",
35710
+ transform: isMobile ? "none !important" : "translate3d(-409px, 38px, 0px) !important"
35711
+ },
35712
+ ".chakra-menu__menu-list": {
35713
+ padding: "0",
35714
+ position: "absolute",
35715
+ width: isMobile ? "100vw" : "500px",
35716
+ maxHeight: isMobile ? "calc(100vh - 62px)" : "auto",
35717
+ overflowY: isMobile ? "auto" : "hidden",
35718
+ borderRadius: isMobile ? "0" : "10px",
35719
+ boxShadow: isMobile ? "none" : "rgba(47, 47, 47, 0.2) -1px 6px 40px 0px",
35720
+ animation: "none !important",
35721
+ transition: "none !important",
35722
+ transform: "none !important",
35723
+ opacity: "1 !important"
35724
+ },
35725
+ ".chakra-menu__group__title": {
35726
+ fontSize: "18px",
35727
+ lineHeight: "31px",
35728
+ margin: "32px 0 0",
35729
+ padding: "0 0 8px 24px"
35730
+ },
35731
+ ".react-ripples": {
35732
+ width: "inherit"
35733
+ }
35734
+ },
35735
+ children: /* @__PURE__ */ jsx(Menu, {
35736
+ autoSelect: false,
35737
+ onOpen: () => setMenuOpen(true),
35738
+ onClose,
35739
+ children: /* @__PURE__ */ jsxs(Fragment, {
35740
+ children: [/* @__PURE__ */ jsx(GoToCalendar, {
35741
+ hasNew: hasNew != null ? hasNew : false,
35742
+ text: (text == null ? void 0 : text.tooltip) || "Ir a Mi Calendario",
35743
+ tooltipDisabled: isTooltipDisabled
35744
+ }), /* @__PURE__ */ jsxs(MenuList, {
35745
+ children: [/* @__PURE__ */ jsx(Header, {
35746
+ text: (text == null ? void 0 : text.header) || "Pr\xF3ximas fechas importantes de tus cursos",
35747
+ isMobile
35748
+ }), loading ? /* @__PURE__ */ jsx(Loading, {
35749
+ text: (text == null ? void 0 : text.loading) || "Cargando"
35750
+ }) : events.length === 0 || empty ? /* @__PURE__ */ jsx(Empty, {
35751
+ text: (text == null ? void 0 : text.empty) || "A\xFAn no tienes eventos en tu calendario"
35752
+ }) : /* @__PURE__ */ jsx(Events, {
35753
+ colors: colors2,
35754
+ events: all,
35755
+ text,
35756
+ redirecToCalendar: redirectToCalendar,
35757
+ isMobile
35758
+ })]
35759
+ })]
35760
+ })
35761
+ })
35762
+ });
35763
+ };
35764
+ const Loading = ({
35765
+ text
35766
+ }) => {
35767
+ return /* @__PURE__ */ jsx("div", {
35768
+ children: text != null ? text : "Loading..."
35769
+ });
35770
+ };
35771
+ const CalendarDropdown = ({
35772
+ redirectToCalendar,
35773
+ text,
35774
+ courseColors,
35775
+ now,
35776
+ events,
35777
+ loading
35778
+ }) => {
35779
+ const date = new Date(now);
35780
+ const isoDate = date.toISOString();
35781
+ return /* @__PURE__ */ jsx(CalendarDropdownContainer, {
35782
+ events,
35783
+ loading,
35784
+ now: isoDate,
35785
+ courseColors,
35786
+ redirectToCalendar,
35787
+ text
35788
+ });
35789
+ };
35790
+ export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CalendarDropdown, CourseList, CourseStatus, Eventos, EventsList, FlashNotification, index as Icons, Label, ModalAlert, NewTooltip, Progress, Resources, Ripples, TinyAlert, UserWay, UserWayCookie, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
33637
35791
  //# sourceMappingURL=eclass-ui-kit.es.js.map