@cloudtower/eagle 0.25.15 → 0.25.16

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.
package/dist/esm/index.js CHANGED
@@ -21,11 +21,11 @@ import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
21
21
  import InfoCircleFilled from '@ant-design/icons/InfoCircleFilled';
22
22
  import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
23
23
  import RCNotification from '@cloudtower/rc-notification';
24
- import { combineReducers, createStore } from 'redux';
25
- import { createDispatchHook, createSelectorHook, Provider } from 'react-redux';
26
24
  import { XmarkRemove16SecondaryIcon, XmarkRemove16RegularRedIcon, HandlePoint816SecondaryIcon, HandlePoint816BlueIcon, CheckmarkDoneSuccessCorrect16BlueIcon } from '@cloudtower/icons-react';
27
25
  import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
28
26
  import TimeZones from 'timezones.json';
27
+ import { createDispatchHook, createSelectorHook, Provider } from 'react-redux';
28
+ import { combineReducers, createStore } from 'redux';
29
29
  import dayjs from 'dayjs';
30
30
  import 'recharts';
31
31
  import enUS from 'antd/lib/locale/en_US';
@@ -2591,186 +2591,19 @@ var __spreadValues$k = (a, b) => {
2591
2591
  return a;
2592
2592
  };
2593
2593
  var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
2594
- const initialChartState = {
2595
- pointers: {},
2596
- resourceData: {},
2597
- averageData: {}
2598
- };
2599
- const chartReducer = (state = initialChartState, action) => {
2600
- switch (action.type) {
2601
- case "SET_POINTER" /* SET_POINTER */: {
2602
- const { uuid, left, text, visible, value } = action.payload;
2603
- return __spreadProps$e(__spreadValues$k({}, state), {
2604
- pointers: __spreadProps$e(__spreadValues$k({}, state.pointers), {
2605
- [uuid]: {
2606
- left,
2607
- text,
2608
- visible,
2609
- value
2610
- }
2611
- })
2612
- });
2613
- }
2614
- case "SET_RESOURCE_DATA" /* SET_RESOURCE_DATA */: {
2615
- const { uuid, data } = action.payload;
2616
- return __spreadProps$e(__spreadValues$k({}, state), {
2617
- resourceData: __spreadProps$e(__spreadValues$k({}, state.resourceData), {
2618
- [uuid]: data
2619
- })
2620
- });
2621
- }
2622
- case "SET_AVERAGE_DATA" /* SET_AVERAGE_DATA */: {
2623
- const { uuid, average } = action.payload;
2624
- return __spreadProps$e(__spreadValues$k({}, state), {
2625
- averageData: __spreadProps$e(__spreadValues$k({}, state.averageData), {
2626
- [uuid]: average
2627
- })
2628
- });
2629
- }
2630
- default: {
2631
- return state;
2632
- }
2633
- }
2634
- };
2635
-
2636
- var __defProp$j = Object.defineProperty;
2637
- var __defProps$d = Object.defineProperties;
2638
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
2639
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
2640
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
2641
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
2642
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2643
- var __spreadValues$j = (a, b) => {
2644
- for (var prop in b || (b = {}))
2645
- if (__hasOwnProp$j.call(b, prop))
2646
- __defNormalProp$j(a, prop, b[prop]);
2647
- if (__getOwnPropSymbols$j)
2648
- for (var prop of __getOwnPropSymbols$j(b)) {
2649
- if (__propIsEnum$j.call(b, prop))
2650
- __defNormalProp$j(a, prop, b[prop]);
2651
- }
2652
- return a;
2653
- };
2654
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
2655
- var ModalActions = /* @__PURE__ */ ((ModalActions2) => {
2656
- ModalActions2["PUSH_MODAL"] = "PUSH_MODAL";
2657
- ModalActions2["POP_MODAL"] = "POP_MODAL";
2658
- ModalActions2["REMOVE_MODAL"] = "REMOVE_MODAL";
2659
- ModalActions2["CLOSE_MODAL"] = "CLOSE_MODAL";
2660
- return ModalActions2;
2661
- })(ModalActions || {});
2662
- const initialModalState = {
2663
- stack: [],
2664
- closeId: 0
2665
- };
2666
- let MODAL_ID = 1;
2667
- const modalReducer = (state = initialModalState, action) => {
2668
- switch (action.type) {
2669
- case "PUSH_MODAL" /* PUSH_MODAL */:
2670
- if (state.stack.some(
2671
- (modal) => modal.component === action.payload.component
2672
- )) {
2673
- return state;
2674
- }
2675
- return __spreadProps$d(__spreadValues$j({}, state), {
2676
- stack: state.stack.concat(__spreadProps$d(__spreadValues$j({}, action.payload), {
2677
- id: MODAL_ID++
2678
- }))
2679
- });
2680
- case "POP_MODAL" /* POP_MODAL */:
2681
- return __spreadProps$d(__spreadValues$j({}, state), {
2682
- stack: state.stack.slice(0, -1)
2683
- });
2684
- case "REMOVE_MODAL" /* REMOVE_MODAL */:
2685
- return __spreadProps$d(__spreadValues$j({}, state), {
2686
- closeId: 0,
2687
- stack: state.stack.filter((m) => m.id !== action.id)
2688
- });
2689
- case "CLOSE_MODAL" /* CLOSE_MODAL */:
2690
- return __spreadProps$d(__spreadValues$j({}, state), {
2691
- closeId: action.id
2692
- });
2693
- default:
2694
- return state;
2695
- }
2696
- };
2697
-
2698
- const appReducer = combineReducers({
2699
- chart: chartReducer,
2700
- modal: modalReducer
2701
- });
2702
- const rootReducer = (state, action) => {
2703
- if (action.type === "RESET_UI_KIT_STORE") {
2704
- state = {
2705
- modal: initialModalState,
2706
- chart: initialChartState
2707
- };
2708
- }
2709
- return appReducer(state, action);
2710
- };
2711
- const UIKitStore = createStore(rootReducer);
2712
- function pushModal(modal) {
2713
- UIKitStore.dispatch({
2714
- type: ModalActions.PUSH_MODAL,
2715
- payload: modal
2716
- });
2717
- }
2718
- function popModal() {
2719
- UIKitStore.dispatch({
2720
- type: ModalActions.POP_MODAL
2721
- });
2722
- }
2723
- function closeModal(id) {
2724
- UIKitStore.dispatch({
2725
- type: ModalActions.CLOSE_MODAL,
2726
- id
2727
- });
2728
- }
2729
-
2730
- const ctx = createContext({
2731
- store: UIKitStore,
2732
- storeState: UIKitStore.getState()
2733
- });
2734
- const KitStoreProvider = (props) => {
2735
- const { children } = props;
2736
- return /* @__PURE__ */ React__default.createElement(Provider, { context: ctx, store: UIKitStore }, children);
2737
- };
2738
- const useKitDispatch = createDispatchHook(ctx);
2739
- const useKitSelector = createSelectorHook(ctx);
2740
-
2741
- var __defProp$i = Object.defineProperty;
2742
- var __defProps$c = Object.defineProperties;
2743
- var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
2744
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
2745
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
2746
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
2747
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2748
- var __spreadValues$i = (a, b) => {
2749
- for (var prop in b || (b = {}))
2750
- if (__hasOwnProp$i.call(b, prop))
2751
- __defNormalProp$i(a, prop, b[prop]);
2752
- if (__getOwnPropSymbols$i)
2753
- for (var prop of __getOwnPropSymbols$i(b)) {
2754
- if (__propIsEnum$i.call(b, prop))
2755
- __defNormalProp$i(a, prop, b[prop]);
2756
- }
2757
- return a;
2758
- };
2759
- var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
2760
2594
  var __objRest$5 = (source, exclude) => {
2761
2595
  var target = {};
2762
2596
  for (var prop in source)
2763
- if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
2597
+ if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
2764
2598
  target[prop] = source[prop];
2765
- if (source != null && __getOwnPropSymbols$i)
2766
- for (var prop of __getOwnPropSymbols$i(source)) {
2767
- if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
2599
+ if (source != null && __getOwnPropSymbols$k)
2600
+ for (var prop of __getOwnPropSymbols$k(source)) {
2601
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
2768
2602
  target[prop] = source[prop];
2769
2603
  }
2770
2604
  return target;
2771
2605
  };
2772
2606
  const Modal = (props) => {
2773
- var _b;
2774
2607
  const { t } = useParrotTranslation();
2775
2608
  const _a = props, {
2776
2609
  error,
@@ -2790,7 +2623,9 @@ const Modal = (props) => {
2790
2623
  width,
2791
2624
  showCancel = true,
2792
2625
  showOk = true,
2793
- afterClose
2626
+ afterClose,
2627
+ removeModal,
2628
+ visible
2794
2629
  } = _a, restProps = __objRest$5(_a, [
2795
2630
  "error",
2796
2631
  "okText",
@@ -2809,16 +2644,10 @@ const Modal = (props) => {
2809
2644
  "width",
2810
2645
  "showCancel",
2811
2646
  "showOk",
2812
- "afterClose"
2647
+ "afterClose",
2648
+ "removeModal",
2649
+ "visible"
2813
2650
  ]);
2814
- const stack = useKitSelector(
2815
- (state) => state.modal.stack
2816
- );
2817
- const id = useKitSelector(
2818
- (state) => state.modal.closeId
2819
- );
2820
- const dispatch = useKitDispatch();
2821
- const idRef = useRef((_b = stack[stack.length - 1]) == null ? void 0 : _b.id);
2822
2651
  const transitionClass = useRef(fullscreen ? "fullscreen-modal" : "modal-zoom");
2823
2652
  const confirmText = useMemo(() => {
2824
2653
  let text = (okButtonProps == null ? void 0 : okButtonProps.children) || okText;
@@ -2846,7 +2675,7 @@ const Modal = (props) => {
2846
2675
  }
2847
2676
  return /* @__PURE__ */ React__default.createElement(
2848
2677
  Modal$1,
2849
- __spreadProps$c(__spreadValues$i({
2678
+ __spreadProps$e(__spreadValues$k({
2850
2679
  maskClosable,
2851
2680
  className: cs(
2852
2681
  className,
@@ -2866,9 +2695,9 @@ const Modal = (props) => {
2866
2695
  }, restProps), {
2867
2696
  afterClose: () => {
2868
2697
  afterClose == null ? void 0 : afterClose();
2869
- dispatch({ type: ModalActions.REMOVE_MODAL, id: idRef.current });
2698
+ removeModal();
2870
2699
  },
2871
- visible: idRef.current !== id,
2700
+ visible,
2872
2701
  footer: /* @__PURE__ */ React__default.createElement("div", { className: "footer-content" }, footer === void 0 ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: "modal-footer-left" }, wizard && typeof wizard === "object" && !wizard.disablePrevStep && wizard.step !== 0 && /* @__PURE__ */ React__default.createElement(
2873
2702
  "span",
2874
2703
  {
@@ -2881,7 +2710,7 @@ const Modal = (props) => {
2881
2710
  prevText
2882
2711
  ), error && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("span", { className: "modal-error" }, error))), /* @__PURE__ */ React__default.createElement("div", { className: "modal-footer-btn-group" }, showCancel && /* @__PURE__ */ React__default.createElement(
2883
2712
  Button,
2884
- __spreadValues$i({
2713
+ __spreadValues$k({
2885
2714
  type: "quiet",
2886
2715
  onMouseDown: (e) => {
2887
2716
  e.preventDefault();
@@ -2895,12 +2724,12 @@ const Modal = (props) => {
2895
2724
  cancelText
2896
2725
  ), showOk && /* @__PURE__ */ React__default.createElement(
2897
2726
  Button,
2898
- __spreadValues$i({
2727
+ __spreadValues$k({
2899
2728
  onClick: (e) => {
2900
- var _a2, _b2;
2729
+ var _a2, _b;
2901
2730
  onOk == null ? void 0 : onOk(e);
2902
2731
  if (typeof wizard === "object" && wizard.steps[wizard.step]) {
2903
- (_b2 = (_a2 = wizard.steps[wizard.step]).onOk) == null ? void 0 : _b2.call(_a2, e);
2732
+ (_b = (_a2 = wizard.steps[wizard.step]).onOk) == null ? void 0 : _b.call(_a2, e);
2904
2733
  }
2905
2734
  transitionClass.current = fullscreen ? "" : "modal-send";
2906
2735
  },
@@ -3047,19 +2876,19 @@ const Pagination = props => {
3047
2876
  }))));
3048
2877
  };
3049
2878
 
3050
- var __defProp$h = Object.defineProperty;
3051
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
3052
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
3053
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
3054
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3055
- var __spreadValues$h = (a, b) => {
2879
+ var __defProp$j = Object.defineProperty;
2880
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
2881
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
2882
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
2883
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2884
+ var __spreadValues$j = (a, b) => {
3056
2885
  for (var prop in b || (b = {}))
3057
- if (__hasOwnProp$h.call(b, prop))
3058
- __defNormalProp$h(a, prop, b[prop]);
3059
- if (__getOwnPropSymbols$h)
3060
- for (var prop of __getOwnPropSymbols$h(b)) {
3061
- if (__propIsEnum$h.call(b, prop))
3062
- __defNormalProp$h(a, prop, b[prop]);
2886
+ if (__hasOwnProp$j.call(b, prop))
2887
+ __defNormalProp$j(a, prop, b[prop]);
2888
+ if (__getOwnPropSymbols$j)
2889
+ for (var prop of __getOwnPropSymbols$j(b)) {
2890
+ if (__propIsEnum$j.call(b, prop))
2891
+ __defNormalProp$j(a, prop, b[prop]);
3063
2892
  }
3064
2893
  return a;
3065
2894
  };
@@ -3071,52 +2900,52 @@ const Percent = ({
3071
2900
  emptyProps
3072
2901
  }) => {
3073
2902
  if (isEmpty(rawValue)) {
3074
- return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues$h({}, emptyProps));
2903
+ return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues$j({}, emptyProps));
3075
2904
  }
3076
2905
  const { value, unit } = formatPercent(rawValue, decimals);
3077
2906
  return /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("span", { className: cx("value", valueClassName) }, value), /* @__PURE__ */ React__default.createElement("span", { className: cx("unit", unitClassName) }, unit));
3078
2907
  };
3079
2908
 
3080
- var __defProp$g = Object.defineProperty;
3081
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
3082
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
3083
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
3084
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3085
- var __spreadValues$g = (a, b) => {
2909
+ var __defProp$i = Object.defineProperty;
2910
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
2911
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
2912
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
2913
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2914
+ var __spreadValues$i = (a, b) => {
3086
2915
  for (var prop in b || (b = {}))
3087
- if (__hasOwnProp$g.call(b, prop))
3088
- __defNormalProp$g(a, prop, b[prop]);
3089
- if (__getOwnPropSymbols$g)
3090
- for (var prop of __getOwnPropSymbols$g(b)) {
3091
- if (__propIsEnum$g.call(b, prop))
3092
- __defNormalProp$g(a, prop, b[prop]);
2916
+ if (__hasOwnProp$i.call(b, prop))
2917
+ __defNormalProp$i(a, prop, b[prop]);
2918
+ if (__getOwnPropSymbols$i)
2919
+ for (var prop of __getOwnPropSymbols$i(b)) {
2920
+ if (__propIsEnum$i.call(b, prop))
2921
+ __defNormalProp$i(a, prop, b[prop]);
3093
2922
  }
3094
2923
  return a;
3095
2924
  };
3096
- const Progress = (props) => /* @__PURE__ */ React__default.createElement(Progress$1, __spreadValues$g({}, props));
2925
+ const Progress = (props) => /* @__PURE__ */ React__default.createElement(Progress$1, __spreadValues$i({}, props));
3097
2926
 
3098
- var __defProp$f = Object.defineProperty;
3099
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
3100
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
3101
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
3102
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, {
2927
+ var __defProp$h = Object.defineProperty;
2928
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
2929
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
2930
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
2931
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, {
3103
2932
  enumerable: true,
3104
2933
  configurable: true,
3105
2934
  writable: true,
3106
2935
  value
3107
2936
  }) : obj[key] = value;
3108
- var __spreadValues$f = (a, b) => {
3109
- for (var prop in b || (b = {})) if (__hasOwnProp$f.call(b, prop)) __defNormalProp$f(a, prop, b[prop]);
3110
- if (__getOwnPropSymbols$f) for (var prop of __getOwnPropSymbols$f(b)) {
3111
- if (__propIsEnum$f.call(b, prop)) __defNormalProp$f(a, prop, b[prop]);
2937
+ var __spreadValues$h = (a, b) => {
2938
+ for (var prop in b || (b = {})) if (__hasOwnProp$h.call(b, prop)) __defNormalProp$h(a, prop, b[prop]);
2939
+ if (__getOwnPropSymbols$h) for (var prop of __getOwnPropSymbols$h(b)) {
2940
+ if (__propIsEnum$h.call(b, prop)) __defNormalProp$h(a, prop, b[prop]);
3112
2941
  }
3113
2942
  return a;
3114
2943
  };
3115
2944
  var __objRest$4 = (source, exclude) => {
3116
2945
  var target = {};
3117
- for (var prop in source) if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
3118
- if (source != null && __getOwnPropSymbols$f) for (var prop of __getOwnPropSymbols$f(source)) {
3119
- if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop)) target[prop] = source[prop];
2946
+ for (var prop in source) if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
2947
+ if (source != null && __getOwnPropSymbols$h) for (var prop of __getOwnPropSymbols$h(source)) {
2948
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop)) target[prop] = source[prop];
3120
2949
  }
3121
2950
  return target;
3122
2951
  };
@@ -3142,7 +2971,7 @@ const Radio = _a => {
3142
2971
  className: cx("radio-description", Typo.Label.l4_regular)
3143
2972
  }, description));
3144
2973
  }
3145
- return /* @__PURE__ */React__default.createElement(React__default.Fragment, null, /* @__PURE__ */React__default.createElement(Radio$1, __spreadValues$f({
2974
+ return /* @__PURE__ */React__default.createElement(React__default.Fragment, null, /* @__PURE__ */React__default.createElement(Radio$1, __spreadValues$h({
3146
2975
  className: cx(className, RadioStyle, compact && "compact"),
3147
2976
  checked: checked || false,
3148
2977
  "data-test": context.name ? `${context.name}-${String(props.value)}` : String(props.value)
@@ -3160,7 +2989,7 @@ const RadioGroup = _c => {
3160
2989
  disabled: props.disabled,
3161
2990
  name: props.name
3162
2991
  }
3163
- }, /* @__PURE__ */React__default.createElement(Radio$1.Group, __spreadValues$f({
2992
+ }, /* @__PURE__ */React__default.createElement(Radio$1.Group, __spreadValues$h({
3164
2993
  className: cx(className, RadioGroupStyle)
3165
2994
  }, props), children ? children : null));
3166
2995
  };
@@ -3216,36 +3045,36 @@ const RadioButton = _e => {
3216
3045
  className: "ant-radio-button-input-label"
3217
3046
  }, typeof children === "string" ? children : ""));
3218
3047
  };
3219
- return /* @__PURE__ */React__default.createElement(Radio$1.Button, __spreadValues$f({
3048
+ return /* @__PURE__ */React__default.createElement(Radio$1.Button, __spreadValues$h({
3220
3049
  className: cx(className, RadioButtonStyle),
3221
3050
  value: radioButtonValue
3222
3051
  }, props), renderChildren());
3223
3052
  };
3224
3053
 
3225
- var __defProp$e = Object.defineProperty;
3226
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
3227
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
3228
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
3229
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3230
- var __spreadValues$e = (a, b) => {
3054
+ var __defProp$g = Object.defineProperty;
3055
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
3056
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
3057
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
3058
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3059
+ var __spreadValues$g = (a, b) => {
3231
3060
  for (var prop in b || (b = {}))
3232
- if (__hasOwnProp$e.call(b, prop))
3233
- __defNormalProp$e(a, prop, b[prop]);
3234
- if (__getOwnPropSymbols$e)
3235
- for (var prop of __getOwnPropSymbols$e(b)) {
3236
- if (__propIsEnum$e.call(b, prop))
3237
- __defNormalProp$e(a, prop, b[prop]);
3061
+ if (__hasOwnProp$g.call(b, prop))
3062
+ __defNormalProp$g(a, prop, b[prop]);
3063
+ if (__getOwnPropSymbols$g)
3064
+ for (var prop of __getOwnPropSymbols$g(b)) {
3065
+ if (__propIsEnum$g.call(b, prop))
3066
+ __defNormalProp$g(a, prop, b[prop]);
3238
3067
  }
3239
3068
  return a;
3240
3069
  };
3241
3070
  var __objRest$3 = (source, exclude) => {
3242
3071
  var target = {};
3243
3072
  for (var prop in source)
3244
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
3073
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
3245
3074
  target[prop] = source[prop];
3246
- if (source != null && __getOwnPropSymbols$e)
3247
- for (var prop of __getOwnPropSymbols$e(source)) {
3248
- if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
3075
+ if (source != null && __getOwnPropSymbols$g)
3076
+ for (var prop of __getOwnPropSymbols$g(source)) {
3077
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
3249
3078
  target[prop] = source[prop];
3250
3079
  }
3251
3080
  return target;
@@ -3255,7 +3084,7 @@ const SearchInput = (props) => {
3255
3084
  const onSearch = _.debounce(onChange, debounceWait);
3256
3085
  return /* @__PURE__ */ React__default.createElement(
3257
3086
  Input,
3258
- __spreadValues$e({
3087
+ __spreadValues$g({
3259
3088
  style: { width: 276 },
3260
3089
  prefix: /* @__PURE__ */ React__default.createElement(SearchOutlined, null),
3261
3090
  onChange: (e) => onSearch(e.target.value)
@@ -3263,19 +3092,19 @@ const SearchInput = (props) => {
3263
3092
  );
3264
3093
  };
3265
3094
 
3266
- var __defProp$d = Object.defineProperty;
3267
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
3268
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
3269
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
3270
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3271
- var __spreadValues$d = (a, b) => {
3095
+ var __defProp$f = Object.defineProperty;
3096
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
3097
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
3098
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
3099
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3100
+ var __spreadValues$f = (a, b) => {
3272
3101
  for (var prop in b || (b = {}))
3273
- if (__hasOwnProp$d.call(b, prop))
3274
- __defNormalProp$d(a, prop, b[prop]);
3275
- if (__getOwnPropSymbols$d)
3276
- for (var prop of __getOwnPropSymbols$d(b)) {
3277
- if (__propIsEnum$d.call(b, prop))
3278
- __defNormalProp$d(a, prop, b[prop]);
3102
+ if (__hasOwnProp$f.call(b, prop))
3103
+ __defNormalProp$f(a, prop, b[prop]);
3104
+ if (__getOwnPropSymbols$f)
3105
+ for (var prop of __getOwnPropSymbols$f(b)) {
3106
+ if (__propIsEnum$f.call(b, prop))
3107
+ __defNormalProp$f(a, prop, b[prop]);
3279
3108
  }
3280
3109
  return a;
3281
3110
  };
@@ -3289,7 +3118,7 @@ const Second = ({
3289
3118
  }) => {
3290
3119
  const { t } = useParrotTranslation();
3291
3120
  if (isEmpty(rawValue)) {
3292
- return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues$d({}, emptyProps));
3121
+ return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues$f({}, emptyProps));
3293
3122
  }
3294
3123
  const { value, unit } = formatSeconds(rawValue, decimals);
3295
3124
  return /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("span", { className: cx("value", valueClassName) }, value, " "), /* @__PURE__ */ React__default.createElement("span", { className: cx("unit", unitClassName) }, t(`common.${abbreviate ? `${unit}_abbreviation` : unit}`)));
@@ -3371,19 +3200,19 @@ const SimplePagination = props => {
3371
3200
  })));
3372
3201
  };
3373
3202
 
3374
- var __defProp$c = Object.defineProperty;
3375
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
3376
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
3377
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
3378
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3379
- var __spreadValues$c = (a, b) => {
3380
- for (var prop in b || (b = {}))
3381
- if (__hasOwnProp$c.call(b, prop))
3382
- __defNormalProp$c(a, prop, b[prop]);
3383
- if (__getOwnPropSymbols$c)
3384
- for (var prop of __getOwnPropSymbols$c(b)) {
3385
- if (__propIsEnum$c.call(b, prop))
3386
- __defNormalProp$c(a, prop, b[prop]);
3203
+ var __defProp$e = Object.defineProperty;
3204
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
3205
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
3206
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
3207
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3208
+ var __spreadValues$e = (a, b) => {
3209
+ for (var prop in b || (b = {}))
3210
+ if (__hasOwnProp$e.call(b, prop))
3211
+ __defNormalProp$e(a, prop, b[prop]);
3212
+ if (__getOwnPropSymbols$e)
3213
+ for (var prop of __getOwnPropSymbols$e(b)) {
3214
+ if (__propIsEnum$e.call(b, prop))
3215
+ __defNormalProp$e(a, prop, b[prop]);
3387
3216
  }
3388
3217
  return a;
3389
3218
  };
@@ -3395,37 +3224,37 @@ const Speed = ({
3395
3224
  emptyProps
3396
3225
  }) => {
3397
3226
  if (isEmpty(rawValue)) {
3398
- return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues$c({}, emptyProps));
3227
+ return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues$e({}, emptyProps));
3399
3228
  }
3400
3229
  const { value, unit } = formatSpeed(rawValue, decimals);
3401
3230
  return /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("span", { className: cx("value", valueClassName) }, value), /* @__PURE__ */ React__default.createElement("span", { className: cx("unit", unitClassName) }, ` ${unit}`));
3402
3231
  };
3403
3232
 
3404
- var __defProp$b = Object.defineProperty;
3405
- var __defProps$b = Object.defineProperties;
3406
- var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
3407
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
3408
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
3409
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
3410
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, {
3233
+ var __defProp$d = Object.defineProperty;
3234
+ var __defProps$d = Object.defineProperties;
3235
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
3236
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
3237
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
3238
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
3239
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, {
3411
3240
  enumerable: true,
3412
3241
  configurable: true,
3413
3242
  writable: true,
3414
3243
  value
3415
3244
  }) : obj[key] = value;
3416
- var __spreadValues$b = (a, b) => {
3417
- for (var prop in b || (b = {})) if (__hasOwnProp$b.call(b, prop)) __defNormalProp$b(a, prop, b[prop]);
3418
- if (__getOwnPropSymbols$b) for (var prop of __getOwnPropSymbols$b(b)) {
3419
- if (__propIsEnum$b.call(b, prop)) __defNormalProp$b(a, prop, b[prop]);
3245
+ var __spreadValues$d = (a, b) => {
3246
+ for (var prop in b || (b = {})) if (__hasOwnProp$d.call(b, prop)) __defNormalProp$d(a, prop, b[prop]);
3247
+ if (__getOwnPropSymbols$d) for (var prop of __getOwnPropSymbols$d(b)) {
3248
+ if (__propIsEnum$d.call(b, prop)) __defNormalProp$d(a, prop, b[prop]);
3420
3249
  }
3421
3250
  return a;
3422
3251
  };
3423
- var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
3252
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
3424
3253
  var __objRest$2 = (source, exclude) => {
3425
3254
  var target = {};
3426
- for (var prop in source) if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
3427
- if (source != null && __getOwnPropSymbols$b) for (var prop of __getOwnPropSymbols$b(source)) {
3428
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop)) target[prop] = source[prop];
3255
+ for (var prop in source) if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
3256
+ if (source != null && __getOwnPropSymbols$d) for (var prop of __getOwnPropSymbols$d(source)) {
3257
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop)) target[prop] = source[prop];
3429
3258
  }
3430
3259
  return target;
3431
3260
  };
@@ -3447,40 +3276,40 @@ const Steps = props => {
3447
3276
  }, count) : null, _step.title);
3448
3277
  return /* @__PURE__ */React__default.createElement(StepsContainer, {
3449
3278
  className: containerClassname
3450
- }, /* @__PURE__ */React__default.createElement(Steps$1, __spreadProps$b(__spreadValues$b({}, stepsProps), {
3279
+ }, /* @__PURE__ */React__default.createElement(Steps$1, __spreadProps$d(__spreadValues$d({}, stepsProps), {
3451
3280
  type: "default"
3452
- }), (stepsConfig == null ? void 0 : stepsConfig.length) ? stepsConfig.map((step, index) => /* @__PURE__ */React__default.createElement(Steps$1.Step, __spreadProps$b(__spreadValues$b({
3281
+ }), (stepsConfig == null ? void 0 : stepsConfig.length) ? stepsConfig.map((step, index) => /* @__PURE__ */React__default.createElement(Steps$1.Step, __spreadProps$d(__spreadValues$d({
3453
3282
  key: index
3454
3283
  }, step), {
3455
3284
  title: titleWithCount(step, index + 1)
3456
3285
  }))) : props.children));
3457
3286
  };
3458
3287
 
3459
- var __defProp$a = Object.defineProperty;
3460
- var __defProps$a = Object.defineProperties;
3461
- var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
3462
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
3463
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
3464
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
3465
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, {
3288
+ var __defProp$c = Object.defineProperty;
3289
+ var __defProps$c = Object.defineProperties;
3290
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
3291
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
3292
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
3293
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
3294
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, {
3466
3295
  enumerable: true,
3467
3296
  configurable: true,
3468
3297
  writable: true,
3469
3298
  value
3470
3299
  }) : obj[key] = value;
3471
- var __spreadValues$a = (a, b) => {
3472
- for (var prop in b || (b = {})) if (__hasOwnProp$a.call(b, prop)) __defNormalProp$a(a, prop, b[prop]);
3473
- if (__getOwnPropSymbols$a) for (var prop of __getOwnPropSymbols$a(b)) {
3474
- if (__propIsEnum$a.call(b, prop)) __defNormalProp$a(a, prop, b[prop]);
3300
+ var __spreadValues$c = (a, b) => {
3301
+ for (var prop in b || (b = {})) if (__hasOwnProp$c.call(b, prop)) __defNormalProp$c(a, prop, b[prop]);
3302
+ if (__getOwnPropSymbols$c) for (var prop of __getOwnPropSymbols$c(b)) {
3303
+ if (__propIsEnum$c.call(b, prop)) __defNormalProp$c(a, prop, b[prop]);
3475
3304
  }
3476
3305
  return a;
3477
3306
  };
3478
- var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
3307
+ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
3479
3308
  var __objRest$1 = (source, exclude) => {
3480
3309
  var target = {};
3481
- for (var prop in source) if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
3482
- if (source != null && __getOwnPropSymbols$a) for (var prop of __getOwnPropSymbols$a(source)) {
3483
- if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop)) target[prop] = source[prop];
3310
+ for (var prop in source) if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
3311
+ if (source != null && __getOwnPropSymbols$c) for (var prop of __getOwnPropSymbols$c(source)) {
3312
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop)) target[prop] = source[prop];
3484
3313
  }
3485
3314
  return target;
3486
3315
  };
@@ -3500,7 +3329,7 @@ const Switch = _a => {
3500
3329
  });
3501
3330
  const classNames = [className, SwitchStyle, "switch"];
3502
3331
  if (props.size === "large") classNames.push("ant-switch-large");
3503
- return /* @__PURE__ */React__default.createElement(React__default.Fragment, null, /* @__PURE__ */React__default.createElement(Switch$1, __spreadProps$a(__spreadValues$a({
3332
+ return /* @__PURE__ */React__default.createElement(React__default.Fragment, null, /* @__PURE__ */React__default.createElement(Switch$1, __spreadProps$c(__spreadValues$c({
3504
3333
  className: cx(...classNames),
3505
3334
  checked: checked || false
3506
3335
  }, props), {
@@ -3586,26 +3415,26 @@ const ColumnTitle = props => {
3586
3415
  }));
3587
3416
  };
3588
3417
 
3589
- var __defProp$9 = Object.defineProperty;
3590
- var __defProps$9 = Object.defineProperties;
3591
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
3592
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
3593
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
3594
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
3595
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, {
3418
+ var __defProp$b = Object.defineProperty;
3419
+ var __defProps$b = Object.defineProperties;
3420
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
3421
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
3422
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
3423
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
3424
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, {
3596
3425
  enumerable: true,
3597
3426
  configurable: true,
3598
3427
  writable: true,
3599
3428
  value
3600
3429
  }) : obj[key] = value;
3601
- var __spreadValues$9 = (a, b) => {
3602
- for (var prop in b || (b = {})) if (__hasOwnProp$9.call(b, prop)) __defNormalProp$9(a, prop, b[prop]);
3603
- if (__getOwnPropSymbols$9) for (var prop of __getOwnPropSymbols$9(b)) {
3604
- if (__propIsEnum$9.call(b, prop)) __defNormalProp$9(a, prop, b[prop]);
3430
+ var __spreadValues$b = (a, b) => {
3431
+ for (var prop in b || (b = {})) if (__hasOwnProp$b.call(b, prop)) __defNormalProp$b(a, prop, b[prop]);
3432
+ if (__getOwnPropSymbols$b) for (var prop of __getOwnPropSymbols$b(b)) {
3433
+ if (__propIsEnum$b.call(b, prop)) __defNormalProp$b(a, prop, b[prop]);
3605
3434
  }
3606
3435
  return a;
3607
3436
  };
3608
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
3437
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
3609
3438
  const TableContainerStyle = "t1upn1sz";
3610
3439
  const tableStyleCover = "tta5kd2";
3611
3440
  const Table = props => {
@@ -3631,7 +3460,7 @@ const Table = props => {
3631
3460
  const orderRef = useRef(null);
3632
3461
  const hasScrollBard = useTableBodyHasScrollBar(wrapper, dataSource);
3633
3462
  const _columns = useMemo(() => columns.map(column => {
3634
- const _column = __spreadValues$9({}, column);
3463
+ const _column = __spreadValues$b({}, column);
3635
3464
  if (_column.sorter) {
3636
3465
  _column.title = /* @__PURE__ */React__default.createElement(ColumnTitle, {
3637
3466
  title: column.title,
@@ -3673,7 +3502,7 @@ const Table = props => {
3673
3502
  }),
3674
3503
  rowClassName,
3675
3504
  scroll,
3676
- rowSelection: rowSelection && __spreadProps$9(__spreadValues$9({}, rowSelection), {
3505
+ rowSelection: rowSelection && __spreadProps$b(__spreadValues$b({}, rowSelection), {
3677
3506
  columnWidth: 32
3678
3507
  }),
3679
3508
  showSorterTooltip: false
@@ -3735,33 +3564,33 @@ const moveItemInArray = (array, fromIndex, toIndex) => {
3735
3564
  return sortArr;
3736
3565
  };
3737
3566
 
3738
- var __defProp$8 = Object.defineProperty;
3739
- var __defProps$8 = Object.defineProperties;
3740
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
3741
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
3742
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
3743
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
3744
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3745
- var __spreadValues$8 = (a, b) => {
3567
+ var __defProp$a = Object.defineProperty;
3568
+ var __defProps$a = Object.defineProperties;
3569
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
3570
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
3571
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
3572
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
3573
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3574
+ var __spreadValues$a = (a, b) => {
3746
3575
  for (var prop in b || (b = {}))
3747
- if (__hasOwnProp$8.call(b, prop))
3748
- __defNormalProp$8(a, prop, b[prop]);
3749
- if (__getOwnPropSymbols$8)
3750
- for (var prop of __getOwnPropSymbols$8(b)) {
3751
- if (__propIsEnum$8.call(b, prop))
3752
- __defNormalProp$8(a, prop, b[prop]);
3576
+ if (__hasOwnProp$a.call(b, prop))
3577
+ __defNormalProp$a(a, prop, b[prop]);
3578
+ if (__getOwnPropSymbols$a)
3579
+ for (var prop of __getOwnPropSymbols$a(b)) {
3580
+ if (__propIsEnum$a.call(b, prop))
3581
+ __defNormalProp$a(a, prop, b[prop]);
3753
3582
  }
3754
3583
  return a;
3755
3584
  };
3756
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
3585
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
3757
3586
  var __objRest = (source, exclude) => {
3758
3587
  var target = {};
3759
3588
  for (var prop in source)
3760
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
3589
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
3761
3590
  target[prop] = source[prop];
3762
- if (source != null && __getOwnPropSymbols$8)
3763
- for (var prop of __getOwnPropSymbols$8(source)) {
3764
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
3591
+ if (source != null && __getOwnPropSymbols$a)
3592
+ for (var prop of __getOwnPropSymbols$a(source)) {
3593
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
3765
3594
  target[prop] = source[prop];
3766
3595
  }
3767
3596
  return target;
@@ -3802,9 +3631,9 @@ const AddRowButton = (props) => {
3802
3631
  if (!columns.length) {
3803
3632
  return null;
3804
3633
  }
3805
- return CustomizedButton ? /* @__PURE__ */ React__default.createElement(CustomizedButton, __spreadValues$8({}, props)) : /* @__PURE__ */ React__default.createElement(AddRowButtonWrapper, { className }, /* @__PURE__ */ React__default.createElement(
3634
+ return CustomizedButton ? /* @__PURE__ */ React__default.createElement(CustomizedButton, __spreadValues$a({}, props)) : /* @__PURE__ */ React__default.createElement(AddRowButtonWrapper, { className }, /* @__PURE__ */ React__default.createElement(
3806
3635
  Button,
3807
- __spreadProps$8(__spreadValues$8({}, restButtonProps), {
3636
+ __spreadProps$a(__spreadValues$a({}, restButtonProps), {
3808
3637
  type: restButtonProps.type || "ordinary",
3809
3638
  size: restButtonProps.size || "small",
3810
3639
  icon: restButtonProps.icon || /* @__PURE__ */ React__default.createElement(PlusOutlined, null),
@@ -3899,25 +3728,25 @@ const CheckboxColumnBodyCell = ({ data, column, index, onChange }) => {
3899
3728
  );
3900
3729
  };
3901
3730
 
3902
- var __defProp$7 = Object.defineProperty;
3903
- var __defProps$7 = Object.defineProperties;
3904
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
3905
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
3906
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
3907
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
3908
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3909
- var __spreadValues$7 = (a, b) => {
3731
+ var __defProp$9 = Object.defineProperty;
3732
+ var __defProps$9 = Object.defineProperties;
3733
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
3734
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
3735
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
3736
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
3737
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3738
+ var __spreadValues$9 = (a, b) => {
3910
3739
  for (var prop in b || (b = {}))
3911
- if (__hasOwnProp$7.call(b, prop))
3912
- __defNormalProp$7(a, prop, b[prop]);
3913
- if (__getOwnPropSymbols$7)
3914
- for (var prop of __getOwnPropSymbols$7(b)) {
3915
- if (__propIsEnum$7.call(b, prop))
3916
- __defNormalProp$7(a, prop, b[prop]);
3740
+ if (__hasOwnProp$9.call(b, prop))
3741
+ __defNormalProp$9(a, prop, b[prop]);
3742
+ if (__getOwnPropSymbols$9)
3743
+ for (var prop of __getOwnPropSymbols$9(b)) {
3744
+ if (__propIsEnum$9.call(b, prop))
3745
+ __defNormalProp$9(a, prop, b[prop]);
3917
3746
  }
3918
3747
  return a;
3919
3748
  };
3920
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
3749
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
3921
3750
  const InputPassword = (props) => {
3922
3751
  const [showPassword, setShowPassword] = useState(false);
3923
3752
  useEffect(() => {
@@ -3933,7 +3762,7 @@ const InputPassword = (props) => {
3933
3762
  const inputType = showPassword ? "text" : "password";
3934
3763
  return /* @__PURE__ */ React__default.createElement(
3935
3764
  Input$1,
3936
- __spreadProps$7(__spreadValues$7({}, props), {
3765
+ __spreadProps$9(__spreadValues$9({}, props), {
3937
3766
  type: inputType,
3938
3767
  suffix: showPassword ? /* @__PURE__ */ React__default.createElement(
3939
3768
  EyeOutlined,
@@ -3953,9 +3782,9 @@ const InputPassword = (props) => {
3953
3782
  };
3954
3783
  const CustomInput = (props) => {
3955
3784
  if (props.type === "password") {
3956
- return /* @__PURE__ */ React__default.createElement(InputPassword, __spreadValues$7({}, props));
3785
+ return /* @__PURE__ */ React__default.createElement(InputPassword, __spreadValues$9({}, props));
3957
3786
  }
3958
- return /* @__PURE__ */ React__default.createElement(Input$1, __spreadValues$7({}, props));
3787
+ return /* @__PURE__ */ React__default.createElement(Input$1, __spreadValues$9({}, props));
3959
3788
  };
3960
3789
  const InputColumnHeaderCell = ({ disabled, column, onChange, onBlur, onVisibleChange }) => {
3961
3790
  const _onChange = (e) => {
@@ -4077,25 +3906,25 @@ var ValidateTriggerType = /* @__PURE__ */ ((ValidateTriggerType2) => {
4077
3906
  return ValidateTriggerType2;
4078
3907
  })(ValidateTriggerType || {});
4079
3908
 
4080
- var __defProp$6 = Object.defineProperty;
4081
- var __defProps$6 = Object.defineProperties;
4082
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
4083
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
4084
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
4085
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
4086
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4087
- var __spreadValues$6 = (a, b) => {
3909
+ var __defProp$8 = Object.defineProperty;
3910
+ var __defProps$8 = Object.defineProperties;
3911
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
3912
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
3913
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
3914
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
3915
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3916
+ var __spreadValues$8 = (a, b) => {
4088
3917
  for (var prop in b || (b = {}))
4089
- if (__hasOwnProp$6.call(b, prop))
4090
- __defNormalProp$6(a, prop, b[prop]);
4091
- if (__getOwnPropSymbols$6)
4092
- for (var prop of __getOwnPropSymbols$6(b)) {
4093
- if (__propIsEnum$6.call(b, prop))
4094
- __defNormalProp$6(a, prop, b[prop]);
3918
+ if (__hasOwnProp$8.call(b, prop))
3919
+ __defNormalProp$8(a, prop, b[prop]);
3920
+ if (__getOwnPropSymbols$8)
3921
+ for (var prop of __getOwnPropSymbols$8(b)) {
3922
+ if (__propIsEnum$8.call(b, prop))
3923
+ __defNormalProp$8(a, prop, b[prop]);
4095
3924
  }
4096
3925
  return a;
4097
3926
  };
4098
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
3927
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
4099
3928
  const TableFormBodyCell = (props) => {
4100
3929
  const {
4101
3930
  column,
@@ -4117,7 +3946,7 @@ const TableFormBodyCell = (props) => {
4117
3946
  (currentValue) => {
4118
3947
  var _a;
4119
3948
  const value = currentValue || data[rowIndex][column.key];
4120
- const rowData = __spreadProps$6(__spreadValues$6({}, data[rowIndex]), { [column.key]: value });
3949
+ const rowData = __spreadProps$8(__spreadValues$8({}, data[rowIndex]), { [column.key]: value });
4121
3950
  const rowValidateRes = getRowValidateResult(rowData);
4122
3951
  if (rowValidateRes) {
4123
3952
  return;
@@ -4140,7 +3969,7 @@ const TableFormBodyCell = (props) => {
4140
3969
  }, [validateAll, triggerValidate]);
4141
3970
  const _onChange = (value, data2) => {
4142
3971
  const newData = data2.map(
4143
- (row, i) => i === rowIndex ? __spreadProps$6(__spreadValues$6({}, row), { [column.key]: value }) : row
3972
+ (row, i) => i === rowIndex ? __spreadProps$8(__spreadValues$8({}, row), { [column.key]: value }) : row
4144
3973
  );
4145
3974
  onChange == null ? void 0 : onChange(newData, rowIndex, column.key);
4146
3975
  if (validateTriggerType === ValidateTriggerType.Normal && isTouched.current || validateTriggerType === ValidateTriggerType.Aggressive) {
@@ -4217,25 +4046,25 @@ const TableFormBodyCell = (props) => {
4217
4046
  );
4218
4047
  };
4219
4048
 
4220
- var __defProp$5 = Object.defineProperty;
4221
- var __defProps$5 = Object.defineProperties;
4222
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
4223
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
4224
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
4225
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
4226
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4227
- var __spreadValues$5 = (a, b) => {
4049
+ var __defProp$7 = Object.defineProperty;
4050
+ var __defProps$7 = Object.defineProperties;
4051
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
4052
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
4053
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
4054
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
4055
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4056
+ var __spreadValues$7 = (a, b) => {
4228
4057
  for (var prop in b || (b = {}))
4229
- if (__hasOwnProp$5.call(b, prop))
4230
- __defNormalProp$5(a, prop, b[prop]);
4231
- if (__getOwnPropSymbols$5)
4232
- for (var prop of __getOwnPropSymbols$5(b)) {
4233
- if (__propIsEnum$5.call(b, prop))
4234
- __defNormalProp$5(a, prop, b[prop]);
4058
+ if (__hasOwnProp$7.call(b, prop))
4059
+ __defNormalProp$7(a, prop, b[prop]);
4060
+ if (__getOwnPropSymbols$7)
4061
+ for (var prop of __getOwnPropSymbols$7(b)) {
4062
+ if (__propIsEnum$7.call(b, prop))
4063
+ __defNormalProp$7(a, prop, b[prop]);
4235
4064
  }
4236
4065
  return a;
4237
4066
  };
4238
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
4067
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
4239
4068
  const TableFormRow = (props) => {
4240
4069
  const {
4241
4070
  data,
@@ -4318,7 +4147,7 @@ const TableFormRow = (props) => {
4318
4147
  );
4319
4148
  });
4320
4149
  const DraggableHandle = useMemo(
4321
- () => draggable && provided ? /* @__PURE__ */ React__default.createElement(DraggableHandleWrapper, __spreadValues$5({}, provided.dragHandleProps), /* @__PURE__ */ React__default.createElement(
4150
+ () => draggable && provided ? /* @__PURE__ */ React__default.createElement(DraggableHandleWrapper, __spreadValues$7({}, provided.dragHandleProps), /* @__PURE__ */ React__default.createElement(
4322
4151
  Icon,
4323
4152
  {
4324
4153
  src: HandlePoint816SecondaryIcon,
@@ -4367,7 +4196,7 @@ const TableFormBodyRows = memo((props) => {
4367
4196
  );
4368
4197
  return draggable ? /* @__PURE__ */ React__default.createElement(DragDropContext, { onDragEnd }, /* @__PURE__ */ React__default.createElement(Droppable, { droppableId: "droppable" }, (provided) => /* @__PURE__ */ React__default.createElement(
4369
4198
  "div",
4370
- __spreadValues$5({
4199
+ __spreadValues$7({
4371
4200
  className: "draggable-container",
4372
4201
  ref: provided.innerRef
4373
4202
  }, provided.droppableProps),
@@ -4378,9 +4207,9 @@ const TableFormBodyRows = memo((props) => {
4378
4207
  key: `draggable-id-${i}`,
4379
4208
  index: i
4380
4209
  },
4381
- (provided2, snapshot) => /* @__PURE__ */ React__default.createElement("div", __spreadValues$5({ ref: provided2.innerRef }, provided2.draggableProps), /* @__PURE__ */ React__default.createElement(
4210
+ (provided2, snapshot) => /* @__PURE__ */ React__default.createElement("div", __spreadValues$7({ ref: provided2.innerRef }, provided2.draggableProps), /* @__PURE__ */ React__default.createElement(
4382
4211
  TableFormRow,
4383
- __spreadProps$5(__spreadValues$5({}, props), {
4212
+ __spreadProps$7(__spreadValues$7({}, props), {
4384
4213
  rowIndex: i,
4385
4214
  provided: provided2,
4386
4215
  snapshot
@@ -4388,28 +4217,28 @@ const TableFormBodyRows = memo((props) => {
4388
4217
  ))
4389
4218
  )),
4390
4219
  provided.placeholder
4391
- ))) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, data.map((_d, i) => /* @__PURE__ */ React__default.createElement(TableFormRow, __spreadProps$5(__spreadValues$5({}, props), { rowIndex: i, key: `table-row-${i}` }))));
4220
+ ))) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, data.map((_d, i) => /* @__PURE__ */ React__default.createElement(TableFormRow, __spreadProps$7(__spreadValues$7({}, props), { rowIndex: i, key: `table-row-${i}` }))));
4392
4221
  });
4393
4222
 
4394
- var __defProp$4 = Object.defineProperty;
4395
- var __defProps$4 = Object.defineProperties;
4396
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
4397
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
4398
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
4399
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
4400
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4401
- var __spreadValues$4 = (a, b) => {
4223
+ var __defProp$6 = Object.defineProperty;
4224
+ var __defProps$6 = Object.defineProperties;
4225
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
4226
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
4227
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
4228
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
4229
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4230
+ var __spreadValues$6 = (a, b) => {
4402
4231
  for (var prop in b || (b = {}))
4403
- if (__hasOwnProp$4.call(b, prop))
4404
- __defNormalProp$4(a, prop, b[prop]);
4405
- if (__getOwnPropSymbols$4)
4406
- for (var prop of __getOwnPropSymbols$4(b)) {
4407
- if (__propIsEnum$4.call(b, prop))
4408
- __defNormalProp$4(a, prop, b[prop]);
4232
+ if (__hasOwnProp$6.call(b, prop))
4233
+ __defNormalProp$6(a, prop, b[prop]);
4234
+ if (__getOwnPropSymbols$6)
4235
+ for (var prop of __getOwnPropSymbols$6(b)) {
4236
+ if (__propIsEnum$6.call(b, prop))
4237
+ __defNormalProp$6(a, prop, b[prop]);
4409
4238
  }
4410
4239
  return a;
4411
4240
  };
4412
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
4241
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
4413
4242
  const BatchInputListHeaderCell = (props) => {
4414
4243
  const { column, disabled, data, disableBatchFilling, onBlur, onChange } = props;
4415
4244
  const [errMsg, setErrMsg] = useState();
@@ -4421,7 +4250,7 @@ const BatchInputListHeaderCell = (props) => {
4421
4250
  setErrMsg(err || void 0);
4422
4251
  const shouldAutoIncrease = column.type !== "password" && column.autoIncrease;
4423
4252
  const newData = data.map((cell, rowIndex) => {
4424
- return __spreadProps$4(__spreadValues$4({}, cell), {
4253
+ return __spreadProps$6(__spreadValues$6({}, cell), {
4425
4254
  [column.key]: shouldAutoIncrease && typeof value === "string" ? increaseLastNumber(value, rowIndex) : value
4426
4255
  });
4427
4256
  });
@@ -4438,7 +4267,7 @@ const BatchInputListHeaderCell = (props) => {
4438
4267
  const CellComponent = ColumnHeaderImpls[column.type];
4439
4268
  return /* @__PURE__ */ React__default.createElement(
4440
4269
  CellComponent,
4441
- __spreadProps$4(__spreadValues$4({}, props), {
4270
+ __spreadProps$6(__spreadValues$6({}, props), {
4442
4271
  column,
4443
4272
  onChange: headerOnChange,
4444
4273
  onBlur: _onBlur
@@ -4473,25 +4302,25 @@ const BatchInputListHeaderCell = (props) => {
4473
4302
  );
4474
4303
  };
4475
4304
 
4476
- var __defProp$3 = Object.defineProperty;
4477
- var __defProps$3 = Object.defineProperties;
4478
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
4479
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
4480
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
4481
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
4482
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4483
- var __spreadValues$3 = (a, b) => {
4305
+ var __defProp$5 = Object.defineProperty;
4306
+ var __defProps$5 = Object.defineProperties;
4307
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
4308
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
4309
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
4310
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
4311
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4312
+ var __spreadValues$5 = (a, b) => {
4484
4313
  for (var prop in b || (b = {}))
4485
- if (__hasOwnProp$3.call(b, prop))
4486
- __defNormalProp$3(a, prop, b[prop]);
4487
- if (__getOwnPropSymbols$3)
4488
- for (var prop of __getOwnPropSymbols$3(b)) {
4489
- if (__propIsEnum$3.call(b, prop))
4490
- __defNormalProp$3(a, prop, b[prop]);
4314
+ if (__hasOwnProp$5.call(b, prop))
4315
+ __defNormalProp$5(a, prop, b[prop]);
4316
+ if (__getOwnPropSymbols$5)
4317
+ for (var prop of __getOwnPropSymbols$5(b)) {
4318
+ if (__propIsEnum$5.call(b, prop))
4319
+ __defNormalProp$5(a, prop, b[prop]);
4491
4320
  }
4492
4321
  return a;
4493
4322
  };
4494
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
4323
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
4495
4324
  const DEFAULT_ROW_COUNT = 3;
4496
4325
  const TableForm = React__default.forwardRef(
4497
4326
  ({
@@ -4548,7 +4377,7 @@ const TableForm = React__default.forwardRef(
4548
4377
  (key, error) => {
4549
4378
  if (error) {
4550
4379
  const newData = latestData.map((cell) => {
4551
- return __spreadProps$3(__spreadValues$3({}, cell), {
4380
+ return __spreadProps$5(__spreadValues$5({}, cell), {
4552
4381
  [key]: ""
4553
4382
  });
4554
4383
  });
@@ -4926,6 +4755,172 @@ const FailedLoad = props => {
4926
4755
  }, refetchText || t("common.retry")));
4927
4756
  };
4928
4757
 
4758
+ var __defProp$4 = Object.defineProperty;
4759
+ var __defProps$4 = Object.defineProperties;
4760
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
4761
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
4762
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
4763
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
4764
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4765
+ var __spreadValues$4 = (a, b) => {
4766
+ for (var prop in b || (b = {}))
4767
+ if (__hasOwnProp$4.call(b, prop))
4768
+ __defNormalProp$4(a, prop, b[prop]);
4769
+ if (__getOwnPropSymbols$4)
4770
+ for (var prop of __getOwnPropSymbols$4(b)) {
4771
+ if (__propIsEnum$4.call(b, prop))
4772
+ __defNormalProp$4(a, prop, b[prop]);
4773
+ }
4774
+ return a;
4775
+ };
4776
+ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
4777
+ const initialChartState = {
4778
+ pointers: {},
4779
+ resourceData: {},
4780
+ averageData: {}
4781
+ };
4782
+ const chartReducer = (state = initialChartState, action) => {
4783
+ switch (action.type) {
4784
+ case "SET_POINTER" /* SET_POINTER */: {
4785
+ const { uuid, left, text, visible, value } = action.payload;
4786
+ return __spreadProps$4(__spreadValues$4({}, state), {
4787
+ pointers: __spreadProps$4(__spreadValues$4({}, state.pointers), {
4788
+ [uuid]: {
4789
+ left,
4790
+ text,
4791
+ visible,
4792
+ value
4793
+ }
4794
+ })
4795
+ });
4796
+ }
4797
+ case "SET_RESOURCE_DATA" /* SET_RESOURCE_DATA */: {
4798
+ const { uuid, data } = action.payload;
4799
+ return __spreadProps$4(__spreadValues$4({}, state), {
4800
+ resourceData: __spreadProps$4(__spreadValues$4({}, state.resourceData), {
4801
+ [uuid]: data
4802
+ })
4803
+ });
4804
+ }
4805
+ case "SET_AVERAGE_DATA" /* SET_AVERAGE_DATA */: {
4806
+ const { uuid, average } = action.payload;
4807
+ return __spreadProps$4(__spreadValues$4({}, state), {
4808
+ averageData: __spreadProps$4(__spreadValues$4({}, state.averageData), {
4809
+ [uuid]: average
4810
+ })
4811
+ });
4812
+ }
4813
+ default: {
4814
+ return state;
4815
+ }
4816
+ }
4817
+ };
4818
+
4819
+ var __defProp$3 = Object.defineProperty;
4820
+ var __defProps$3 = Object.defineProperties;
4821
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
4822
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
4823
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
4824
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
4825
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4826
+ var __spreadValues$3 = (a, b) => {
4827
+ for (var prop in b || (b = {}))
4828
+ if (__hasOwnProp$3.call(b, prop))
4829
+ __defNormalProp$3(a, prop, b[prop]);
4830
+ if (__getOwnPropSymbols$3)
4831
+ for (var prop of __getOwnPropSymbols$3(b)) {
4832
+ if (__propIsEnum$3.call(b, prop))
4833
+ __defNormalProp$3(a, prop, b[prop]);
4834
+ }
4835
+ return a;
4836
+ };
4837
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
4838
+ var ModalActions = /* @__PURE__ */ ((ModalActions2) => {
4839
+ ModalActions2["PUSH_MODAL"] = "PUSH_MODAL";
4840
+ ModalActions2["POP_MODAL"] = "POP_MODAL";
4841
+ ModalActions2["REMOVE_MODAL"] = "REMOVE_MODAL";
4842
+ ModalActions2["CLOSE_MODAL"] = "CLOSE_MODAL";
4843
+ return ModalActions2;
4844
+ })(ModalActions || {});
4845
+ const initialModalState = {
4846
+ stack: [],
4847
+ closeId: 0
4848
+ };
4849
+ let MODAL_ID = 1;
4850
+ const modalReducer = (state = initialModalState, action) => {
4851
+ switch (action.type) {
4852
+ case "PUSH_MODAL" /* PUSH_MODAL */:
4853
+ if (state.stack.some(
4854
+ (modal) => modal.component === action.payload.component
4855
+ )) {
4856
+ return state;
4857
+ }
4858
+ return __spreadProps$3(__spreadValues$3({}, state), {
4859
+ stack: state.stack.concat(__spreadProps$3(__spreadValues$3({}, action.payload), {
4860
+ id: MODAL_ID++
4861
+ }))
4862
+ });
4863
+ case "POP_MODAL" /* POP_MODAL */:
4864
+ return __spreadProps$3(__spreadValues$3({}, state), {
4865
+ stack: state.stack.slice(0, -1)
4866
+ });
4867
+ case "REMOVE_MODAL" /* REMOVE_MODAL */:
4868
+ return __spreadProps$3(__spreadValues$3({}, state), {
4869
+ closeId: 0,
4870
+ stack: state.stack.filter((m) => m.id !== action.id)
4871
+ });
4872
+ case "CLOSE_MODAL" /* CLOSE_MODAL */:
4873
+ return __spreadProps$3(__spreadValues$3({}, state), {
4874
+ closeId: action.id
4875
+ });
4876
+ default:
4877
+ return state;
4878
+ }
4879
+ };
4880
+
4881
+ const appReducer = combineReducers({
4882
+ chart: chartReducer,
4883
+ modal: modalReducer
4884
+ });
4885
+ const rootReducer = (state, action) => {
4886
+ if (action.type === "RESET_UI_KIT_STORE") {
4887
+ state = {
4888
+ modal: initialModalState,
4889
+ chart: initialChartState
4890
+ };
4891
+ }
4892
+ return appReducer(state, action);
4893
+ };
4894
+ const UIKitStore = createStore(rootReducer);
4895
+ function pushModal(modal) {
4896
+ UIKitStore.dispatch({
4897
+ type: ModalActions.PUSH_MODAL,
4898
+ payload: modal
4899
+ });
4900
+ }
4901
+ function popModal() {
4902
+ UIKitStore.dispatch({
4903
+ type: ModalActions.POP_MODAL
4904
+ });
4905
+ }
4906
+ function closeModal(id) {
4907
+ UIKitStore.dispatch({
4908
+ type: ModalActions.CLOSE_MODAL,
4909
+ id
4910
+ });
4911
+ }
4912
+
4913
+ const ctx = createContext({
4914
+ store: UIKitStore,
4915
+ storeState: UIKitStore.getState()
4916
+ });
4917
+ const KitStoreProvider = (props) => {
4918
+ const { children } = props;
4919
+ return /* @__PURE__ */ React__default.createElement(Provider, { context: ctx, store: UIKitStore }, children);
4920
+ };
4921
+ const useKitDispatch = createDispatchHook(ctx);
4922
+ const useKitSelector = createSelectorHook(ctx);
4923
+
4929
4924
  var __defProp$2 = Object.defineProperty;
4930
4925
  var __defProps$2 = Object.defineProperties;
4931
4926
  var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
@@ -5098,6 +5093,10 @@ const ModalStack = () => {
5098
5093
  const stack = useKitSelector(
5099
5094
  (state) => state.modal.stack
5100
5095
  );
5096
+ const dispatch = useKitDispatch();
5097
+ const closeId = useKitSelector(
5098
+ (state) => state.modal.closeId
5099
+ );
5101
5100
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, stack.map((modal) => /* @__PURE__ */ React__default.createElement(
5102
5101
  modal.component,
5103
5102
  __spreadProps$1(__spreadValues$1({}, modal.props), {
@@ -5109,7 +5108,11 @@ const ModalStack = () => {
5109
5108
  }
5110
5109
  closeModal(modal.id);
5111
5110
  },
5112
- key: modal.id
5111
+ key: modal.id,
5112
+ removeModal: () => {
5113
+ dispatch({ type: ModalActions.REMOVE_MODAL, id: modal.id });
5114
+ },
5115
+ visible: closeId !== modal.id
5113
5116
  })
5114
5117
  )));
5115
5118
  };