@carto/ps-react-ui 4.5.1 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/{download-config-DemuQ3Jm.js → download-config-C3I0jWIL.js} +2 -2
  2. package/dist/{download-config-DemuQ3Jm.js.map → download-config-C3I0jWIL.js.map} +1 -1
  3. package/dist/{row-D4VOhcNI.js → row-DZSP99LW.js} +2 -2
  4. package/dist/{row-D4VOhcNI.js.map → row-DZSP99LW.js.map} +1 -1
  5. package/dist/{series-Bola3CmD.js → series-DLNHDWs0.js} +3 -3
  6. package/dist/{series-Bola3CmD.js.map → series-DLNHDWs0.js.map} +1 -1
  7. package/dist/types/hooks/index.d.ts +0 -1
  8. package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +3 -0
  9. package/dist/types/widgets/actions/index.d.ts +4 -4
  10. package/dist/types/widgets/actions/lock-selection/types.d.ts +2 -0
  11. package/dist/types/widgets/actions/relative-data/relative-data.d.ts +7 -2
  12. package/dist/types/widgets/actions/relative-data/types.d.ts +2 -0
  13. package/dist/types/widgets/actions/zoom-toggle/zoom-toggle.d.ts +4 -0
  14. package/dist/types/widgets/category/index.d.ts +10 -2
  15. package/dist/types/widgets/no-data/no-data.d.ts +3 -2
  16. package/dist/types/widgets/no-data/types.d.ts +5 -1
  17. package/dist/types/widgets/stores/index.d.ts +1 -1
  18. package/dist/types/widgets/stores/types.d.ts +10 -10
  19. package/dist/types/widgets/stores/widget-store.d.ts +2 -3
  20. package/dist/types/widgets/table/index.d.ts +6 -2
  21. package/dist/{use-widget-ref-BFazQvJK.js → use-widget-ref-Ddr_SlJJ.js} +2 -2
  22. package/dist/{use-widget-ref-BFazQvJK.js.map → use-widget-ref-Ddr_SlJJ.js.map} +1 -1
  23. package/dist/{use-widget-selector-DqRmWQ1K.js → use-widget-selector-DFl2hW0R.js} +2 -2
  24. package/dist/{use-widget-selector-DqRmWQ1K.js.map → use-widget-selector-DFl2hW0R.js.map} +1 -1
  25. package/dist/{widget-store-CIrb9RKP.js → widget-store-Bw5zRUGg.js} +93 -95
  26. package/dist/widget-store-Bw5zRUGg.js.map +1 -0
  27. package/dist/widgets/actions.js +770 -755
  28. package/dist/widgets/actions.js.map +1 -1
  29. package/dist/widgets/bar.js +2 -2
  30. package/dist/widgets/category.js +3 -3
  31. package/dist/widgets/category.js.map +1 -1
  32. package/dist/widgets/echart.js +2 -2
  33. package/dist/widgets/error.js +37 -2
  34. package/dist/widgets/error.js.map +1 -1
  35. package/dist/widgets/formula.js +5 -5
  36. package/dist/widgets/histogram.js +1 -1
  37. package/dist/widgets/loader.js +1 -1
  38. package/dist/widgets/markdown.js +2 -2
  39. package/dist/widgets/no-data.js +58 -2
  40. package/dist/widgets/no-data.js.map +1 -1
  41. package/dist/widgets/note.js +121 -2
  42. package/dist/widgets/note.js.map +1 -1
  43. package/dist/widgets/pie.js +2 -2
  44. package/dist/widgets/range.js +3 -3
  45. package/dist/widgets/scatterplot.js +2 -2
  46. package/dist/widgets/skeleton-loader.js +1 -1
  47. package/dist/widgets/spread.js +5 -5
  48. package/dist/widgets/stores.js +2 -2
  49. package/dist/widgets/table.js +3 -3
  50. package/dist/widgets/timeseries.js +2 -2
  51. package/dist/widgets/utils.js +1 -1
  52. package/dist/widgets/wrapper.js +2 -2
  53. package/package.json +2 -6
  54. package/src/hooks/index.ts +0 -1
  55. package/src/widgets/actions/brush-toggle/brush-toggle.tsx +18 -22
  56. package/src/widgets/actions/change-column/change-column.test.tsx +1 -1
  57. package/src/widgets/actions/download/download.test.tsx +1 -1
  58. package/src/widgets/actions/index.ts +11 -2
  59. package/src/widgets/actions/lock-selection/lock-selection.test.tsx +14 -0
  60. package/src/widgets/actions/lock-selection/lock-selection.tsx +18 -11
  61. package/src/widgets/actions/lock-selection/types.ts +2 -0
  62. package/src/widgets/actions/relative-data/relative-data.test.tsx +211 -20
  63. package/src/widgets/actions/relative-data/relative-data.tsx +65 -34
  64. package/src/widgets/actions/relative-data/types.ts +2 -0
  65. package/src/widgets/actions/searcher/searcher.tsx +28 -30
  66. package/src/widgets/actions/stack-toggle/stack-toggle.tsx +11 -2
  67. package/src/widgets/actions/zoom-toggle/zoom-toggle.tsx +53 -45
  68. package/src/widgets/category/category-ui.tsx +4 -6
  69. package/src/widgets/category/index.ts +13 -14
  70. package/src/widgets/no-data/no-data.test.tsx +90 -40
  71. package/src/widgets/no-data/no-data.tsx +7 -5
  72. package/src/widgets/no-data/types.ts +5 -1
  73. package/src/widgets/stores/index.ts +2 -0
  74. package/src/widgets/stores/types.ts +10 -18
  75. package/src/widgets/stores/widget-store.test.ts +132 -13
  76. package/src/widgets/stores/widget-store.ts +29 -35
  77. package/src/widgets/table/index.ts +6 -4
  78. package/dist/error-Cj8eUMrl.js +0 -40
  79. package/dist/error-Cj8eUMrl.js.map +0 -1
  80. package/dist/no-data-DkIt7Qt1.js +0 -61
  81. package/dist/no-data-DkIt7Qt1.js.map +0 -1
  82. package/dist/note-t51drNe0.js +0 -124
  83. package/dist/note-t51drNe0.js.map +0 -1
  84. package/dist/types/hooks/use-debounce.d.ts +0 -19
  85. package/dist/types/widgets/category/components/index.d.ts +0 -10
  86. package/dist/types/widgets/index.d.ts +0 -9
  87. package/dist/types/widgets/table/hooks/index.d.ts +0 -6
  88. package/dist/widget-store-CIrb9RKP.js.map +0 -1
  89. package/dist/widgets.js +0 -13
  90. package/dist/widgets.js.map +0 -1
  91. package/src/hooks/use-debounce.ts +0 -55
  92. package/src/widgets/category/components/index.ts +0 -14
  93. package/src/widgets/index.ts +0 -25
  94. package/src/widgets/table/hooks/index.ts +0 -7
@@ -1,19 +1,19 @@
1
- import { jsx as g, jsxs as ne, Fragment as he } from "react/jsx-runtime";
2
- import { c as V } from "react/compiler-runtime";
3
- import { IconButton as N, DialogContent as $e, Dialog as ze, Typography as Ae, DialogTitle as Be, CircularProgress as Re, MenuItem as xe, ListItemIcon as Pe, ListItemText as Ce, Menu as Ee, useTheme as Fe, Box as ke, TextField as Me, InputAdornment as pe, SvgIcon as We } from "@mui/material";
4
- import { w as x } from "../widget-store-CIrb9RKP.js";
5
- import { u as q } from "../use-widget-selector-DqRmWQ1K.js";
6
- import { FullscreenOutlined as Ge, Close as Ze, FileDownloadOutlined as Ve, PercentOutlined as He, SubdirectoryArrowLeftOutlined as Ne, ZoomInOutlined as Ue, CheckBoxOutlined as je, SearchOutlined as Le, ClearOutlined as Ke, HighlightAltOutlined as Ye } from "@mui/icons-material";
7
- import { useState as me, useRef as se, useEffect as Z } from "react";
8
- import { a as Tn, d as vn } from "../exports-Cr43OCul.js";
1
+ import { jsx as b, jsxs as ne, Fragment as he } from "react/jsx-runtime";
2
+ import { c as U } from "react/compiler-runtime";
3
+ import { IconButton as K, DialogContent as Ae, Dialog as Pe, Typography as We, DialogTitle as Be, CircularProgress as Re, MenuItem as xe, ListItemIcon as $e, ListItemText as Ee, Menu as Ce, useTheme as Fe, Box as ke, TextField as Me, InputAdornment as be, SvgIcon as Ge } from "@mui/material";
4
+ import { w as g } from "../widget-store-Bw5zRUGg.js";
5
+ import { u as Q } from "../use-widget-selector-DFl2hW0R.js";
6
+ import { FullscreenOutlined as Ze, Close as Ve, FileDownloadOutlined as He, PercentOutlined as Ne, SubdirectoryArrowLeftOutlined as je, ZoomInOutlined as Ue, CheckBoxOutlined as Ke, SearchOutlined as Le, ClearOutlined as Ye, HighlightAltOutlined as qe } from "@mui/icons-material";
7
+ import { useState as ge, useRef as le, useEffect as $ } from "react";
8
+ import { a as gn, d as hn } from "../exports-Cr43OCul.js";
9
9
  import "../lasso-tool-BYbxrJ-7.js";
10
10
  import "../cjs-D4KH3azB.js";
11
11
  import { T as ee } from "../tooltip-BDnrRKrp.js";
12
- import { b as qe, a as Je, D as Qe, g as be } from "../utils-BOhInag6.js";
13
- import { useSensors as Xe, useSensor as Se, PointerSensor as et, KeyboardSensor as tt, DndContext as nt, closestCenter as ot } from "@dnd-kit/core";
14
- import { useSortable as lt, sortableKeyboardCoordinates as rt, arrayMove as st, SortableContext as it, verticalListSortingStrategy as at } from "@dnd-kit/sortable";
15
- import { CSS as ct } from "@dnd-kit/utilities";
16
- const Te = {
12
+ import { b as Je, a as Qe, D as Xe, g as pe } from "../utils-BOhInag6.js";
13
+ import { useSensors as et, useSensor as Se, PointerSensor as tt, KeyboardSensor as nt, DndContext as ot, closestCenter as lt } from "@dnd-kit/core";
14
+ import { useSortable as rt, sortableKeyboardCoordinates as st, arrayMove as it, SortableContext as at, verticalListSortingStrategy as ct } from "@dnd-kit/sortable";
15
+ import { CSS as dt } from "@dnd-kit/utilities";
16
+ const ve = {
17
17
  title: {
18
18
  container: {
19
19
  display: "flex",
@@ -29,284 +29,297 @@ const Te = {
29
29
  spacing: n
30
30
  }) => n(1)
31
31
  }
32
- }, dt = {};
33
- function sn(n) {
34
- const e = V(42), {
32
+ }, ut = {};
33
+ function tn(n) {
34
+ const e = U(42), {
35
35
  id: t,
36
- labels: d,
37
- children: h,
38
- Icon: a,
39
- IconButtonProps: p,
40
- DialogContentProps: I,
41
- DialogProps: T
42
- } = n, o = I === void 0 ? dt : I;
36
+ labels: f,
37
+ children: p,
38
+ Icon: m,
39
+ IconButtonProps: S,
40
+ DialogContentProps: _,
41
+ DialogProps: y
42
+ } = n, o = _ === void 0 ? ut : _;
43
43
  let l, r;
44
44
  e[0] !== o ? ({
45
45
  sx: r,
46
46
  ...l
47
47
  } = o, e[0] = o, e[1] = l, e[2] = r) : (l = e[1], r = e[2]);
48
48
  const {
49
- isFullScreen: f,
50
- title: c
51
- } = q(t, ut);
52
- let s;
53
- e[3] !== t ? (s = (z) => {
54
- x.setWidget(t, {
55
- isFullScreen: z.isFullScreen
56
- });
57
- }, e[3] = t, e[4] = s) : s = e[4];
58
- const i = s;
49
+ isFullScreen: s,
50
+ title: a
51
+ } = Q(t, ft);
59
52
  let u;
60
- e[5] !== i ? (u = () => i({
53
+ e[3] !== t ? (u = (P) => {
54
+ g.setWidget(t, {
55
+ isFullScreen: P.isFullScreen
56
+ });
57
+ }, e[3] = t, e[4] = u) : u = e[4];
58
+ const i = u;
59
+ let c;
60
+ e[5] !== i ? (c = () => i({
61
61
  isFullScreen: !0
62
- }), e[5] = i, e[6] = u) : u = e[6];
63
- let m;
64
- e[7] !== a ? (m = a ?? /* @__PURE__ */ g(Ge, {}), e[7] = a, e[8] = m) : m = e[8];
65
- let b;
66
- e[9] !== p || e[10] !== u || e[11] !== m ? (b = /* @__PURE__ */ g(N, { ...p, onClick: u, children: m }), e[9] = p, e[10] = u, e[11] = m, e[12] = b) : b = e[12];
67
- const C = !!f, E = d?.ariaLabel ?? `fullscreen-dialog-title-${t}`;
68
- let _;
69
- e[13] !== i ? (_ = () => i({
70
- isFullScreen: !1
71
- }), e[13] = i, e[14] = _) : _ = e[14];
72
- const D = `fullscreen-dialog-title-${t}`;
73
- let L;
74
- e[15] !== c ? (L = /* @__PURE__ */ g(Ae, { variant: "subtitle1", component: "span", children: c }), e[15] = c, e[16] = L) : L = e[16];
75
- let y;
76
- e[17] !== i ? (y = () => i({
77
- isFullScreen: !1
78
- }), e[17] = i, e[18] = y) : y = e[18];
62
+ }), e[5] = i, e[6] = c) : c = e[6];
63
+ let d;
64
+ e[7] !== m ? (d = m ?? /* @__PURE__ */ b(Ze, {}), e[7] = m, e[8] = d) : d = e[8];
79
65
  let v;
80
- e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ g(Ze, {}), e[19] = v) : v = e[19];
66
+ e[9] !== S || e[10] !== c || e[11] !== d ? (v = /* @__PURE__ */ b(K, { ...S, onClick: c, children: d }), e[9] = S, e[10] = c, e[11] = d, e[12] = v) : v = e[12];
67
+ const O = !!s, C = f?.ariaLabel ?? `fullscreen-dialog-title-${t}`;
68
+ let k;
69
+ e[13] !== i ? (k = () => i({
70
+ isFullScreen: !1
71
+ }), e[13] = i, e[14] = k) : k = e[14];
72
+ const A = `fullscreen-dialog-title-${t}`;
81
73
  let w;
82
- e[20] !== y ? (w = /* @__PURE__ */ g(N, { onClick: y, children: v }), e[20] = y, e[21] = w) : w = e[21];
83
- let $;
84
- e[22] !== D || e[23] !== L || e[24] !== w ? ($ = /* @__PURE__ */ ne(Be, { id: D, sx: Te.title.container, children: [
85
- L,
86
- w
87
- ] }), e[22] = D, e[23] = L, e[24] = w, e[25] = $) : $ = e[25];
88
- let B;
89
- e[26] !== r ? (B = {
90
- ...Te.content,
74
+ e[15] !== a ? (w = /* @__PURE__ */ b(We, { variant: "subtitle1", component: "span", children: a }), e[15] = a, e[16] = w) : w = e[16];
75
+ let D;
76
+ e[17] !== i ? (D = () => i({
77
+ isFullScreen: !1
78
+ }), e[17] = i, e[18] = D) : D = e[18];
79
+ let x;
80
+ e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ b(Ve, {}), e[19] = x) : x = e[19];
81
+ let E;
82
+ e[20] !== D ? (E = /* @__PURE__ */ b(K, { onClick: D, children: x }), e[20] = D, e[21] = E) : E = e[21];
83
+ let z;
84
+ e[22] !== A || e[23] !== w || e[24] !== E ? (z = /* @__PURE__ */ ne(Be, { id: A, sx: ve.title.container, children: [
85
+ w,
86
+ E
87
+ ] }), e[22] = A, e[23] = w, e[24] = E, e[25] = z) : z = e[25];
88
+ let T;
89
+ e[26] !== r ? (T = {
90
+ ...ve.content,
91
91
  ...r
92
- }, e[26] = r, e[27] = B) : B = e[27];
93
- let S;
94
- e[28] !== l || e[29] !== h || e[30] !== B ? (S = /* @__PURE__ */ g($e, { sx: B, ...l, children: h }), e[28] = l, e[29] = h, e[30] = B, e[31] = S) : S = e[31];
95
- let O;
96
- e[32] !== T || e[33] !== $ || e[34] !== S || e[35] !== C || e[36] !== E || e[37] !== _ ? (O = /* @__PURE__ */ ne(ze, { maxWidth: !1, open: C, keepMounted: !0, "aria-labelledby": E, ...T, onClose: _, children: [
97
- $,
98
- S
99
- ] }), e[32] = T, e[33] = $, e[34] = S, e[35] = C, e[36] = E, e[37] = _, e[38] = O) : O = e[38];
100
- let k;
101
- return e[39] !== O || e[40] !== b ? (k = /* @__PURE__ */ ne(he, { children: [
102
- b,
103
- O
104
- ] }), e[39] = O, e[40] = b, e[41] = k) : k = e[41], k;
92
+ }, e[26] = r, e[27] = T) : T = e[27];
93
+ let h;
94
+ e[28] !== l || e[29] !== p || e[30] !== T ? (h = /* @__PURE__ */ b(Ae, { sx: T, ...l, children: p }), e[28] = l, e[29] = p, e[30] = T, e[31] = h) : h = e[31];
95
+ let I;
96
+ e[32] !== y || e[33] !== z || e[34] !== h || e[35] !== O || e[36] !== C || e[37] !== k ? (I = /* @__PURE__ */ ne(Pe, { maxWidth: !1, open: O, keepMounted: !0, "aria-labelledby": C, ...y, onClose: k, children: [
97
+ z,
98
+ h
99
+ ] }), e[32] = y, e[33] = z, e[34] = h, e[35] = O, e[36] = C, e[37] = k, e[38] = I) : I = e[38];
100
+ let L;
101
+ return e[39] !== I || e[40] !== v ? (L = /* @__PURE__ */ ne(he, { children: [
102
+ v,
103
+ I
104
+ ] }), e[39] = I, e[40] = v, e[41] = L) : L = e[41], L;
105
105
  }
106
- function ut(n) {
106
+ function ft(n) {
107
107
  return {
108
108
  isFullScreen: n?.isFullScreen,
109
109
  title: n?.title
110
110
  };
111
111
  }
112
- const ft = {};
113
- function an(n) {
114
- const e = V(31), {
112
+ const mt = {};
113
+ function nn(n) {
114
+ const e = U(31), {
115
115
  id: t,
116
- items: d,
117
- labels: h,
118
- Icon: a,
119
- IconButtonProps: p
120
- } = n, I = h === void 0 ? ft : h, {
121
- data: T
122
- } = q(t, mt), [o, l] = me(!1), [r, f] = me(null);
123
- let c;
124
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = (z) => {
125
- z.stopPropagation(), f(z.currentTarget);
126
- }, e[0] = c) : c = e[0];
127
- const s = c;
116
+ items: f,
117
+ labels: p,
118
+ Icon: m,
119
+ IconButtonProps: S
120
+ } = n, _ = p === void 0 ? mt : p, {
121
+ data: y
122
+ } = Q(t, gt), [o, l] = ge(!1), [r, s] = ge(null);
123
+ let a;
124
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = (P) => {
125
+ P.stopPropagation(), s(P.currentTarget);
126
+ }, e[0] = a) : a = e[0];
127
+ const u = a;
128
128
  let i;
129
- e[1] !== t ? (i = (z, R) => {
130
- const A = document.createElement("a");
131
- A.href = z, A.download = R.filename ?? t, A.style.display = "none", document.body.appendChild(A), A.click(), document.body.removeChild(A), R.callback?.(A.href);
129
+ e[1] !== t ? (i = (P, W) => {
130
+ const B = document.createElement("a");
131
+ B.href = P, B.download = W.filename ?? t, B.style.display = "none", document.body.appendChild(B), B.click(), document.body.removeChild(B), W.callback?.(B.href);
132
132
  }, e[1] = t, e[2] = i) : i = e[2];
133
- const u = i;
134
- let m;
135
- e[3] !== T || e[4] !== u ? (m = async (z, R) => {
136
- z.stopPropagation(), l(!0), f(null);
137
- const A = await R.modifier(T);
138
- if (!A) {
133
+ const c = i;
134
+ let d;
135
+ e[3] !== y || e[4] !== c ? (d = async (P, W) => {
136
+ P.stopPropagation(), l(!0), s(null);
137
+ const B = await W.modifier(y);
138
+ if (!B) {
139
139
  l(!1);
140
140
  return;
141
141
  }
142
- u(A, R), l(!1);
143
- }, e[3] = T, e[4] = u, e[5] = m) : m = e[5];
144
- const b = m, C = I.ariaLabel ?? "download options", E = o || d.length === 0, _ = o || r ? "active" : "";
145
- let D;
146
- e[6] !== a || e[7] !== o ? (D = o ? /* @__PURE__ */ g(Re, { size: 18, color: "inherit" }) : a ?? /* @__PURE__ */ g(Ve, {}), e[6] = a, e[7] = o, e[8] = D) : D = e[8];
147
- let L;
148
- e[9] !== p || e[10] !== C || e[11] !== E || e[12] !== _ || e[13] !== D ? (L = /* @__PURE__ */ g(N, { size: "small", "aria-label": C, "aria-controls": "options-menu", "aria-haspopup": "true", onClick: s, ...p, disabled: E, className: _, children: D }), e[9] = p, e[10] = C, e[11] = E, e[12] = _, e[13] = D, e[14] = L) : L = e[14];
149
- let y, v;
150
- e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = {
142
+ c(B, W), l(!1);
143
+ }, e[3] = y, e[4] = c, e[5] = d) : d = e[5];
144
+ const v = d, O = _.ariaLabel ?? "download options", C = o || f.length === 0, k = o || r ? "active" : "";
145
+ let A;
146
+ e[6] !== m || e[7] !== o ? (A = o ? /* @__PURE__ */ b(Re, { size: 18, color: "inherit" }) : m ?? /* @__PURE__ */ b(He, {}), e[6] = m, e[7] = o, e[8] = A) : A = e[8];
147
+ let w;
148
+ e[9] !== S || e[10] !== O || e[11] !== C || e[12] !== k || e[13] !== A ? (w = /* @__PURE__ */ b(K, { size: "small", "aria-label": O, "aria-controls": "options-menu", "aria-haspopup": "true", onClick: u, ...S, disabled: C, className: k, children: A }), e[9] = S, e[10] = O, e[11] = C, e[12] = k, e[13] = A, e[14] = w) : w = e[14];
149
+ let D, x;
150
+ e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = {
151
151
  vertical: "bottom",
152
152
  horizontal: "right"
153
- }, v = {
153
+ }, x = {
154
154
  vertical: "top",
155
155
  horizontal: "right"
156
- }, e[15] = y, e[16] = v) : (y = e[15], v = e[16]);
157
- const w = !!r;
158
- let $, B;
159
- e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = () => f(null), B = {
156
+ }, e[15] = D, e[16] = x) : (D = e[15], x = e[16]);
157
+ const E = !!r;
158
+ let z, T;
159
+ e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = () => s(null), T = {
160
160
  sx: {
161
161
  paddingBottom: 0
162
162
  }
163
- }, e[17] = $, e[18] = B) : ($ = e[17], B = e[18]);
164
- let S;
165
- if (e[19] !== b || e[20] !== d) {
166
- let z;
167
- e[22] !== b ? (z = (R) => /* @__PURE__ */ ne(xe, { disabled: R.disabled, onClick: (A) => {
168
- b(A, R);
163
+ }, e[17] = z, e[18] = T) : (z = e[17], T = e[18]);
164
+ let h;
165
+ if (e[19] !== v || e[20] !== f) {
166
+ let P;
167
+ e[22] !== v ? (P = (W) => /* @__PURE__ */ ne(xe, { disabled: W.disabled, onClick: (B) => {
168
+ v(B, W);
169
169
  }, children: [
170
- R.icon && /* @__PURE__ */ g(Pe, { sx: {
170
+ W.icon && /* @__PURE__ */ b($e, { sx: {
171
171
  color: "text.primary"
172
- }, children: R.icon }),
173
- /* @__PURE__ */ g(Ce, { children: R.label })
174
- ] }, R.id), e[22] = b, e[23] = z) : z = e[23], S = d.map(z), e[19] = b, e[20] = d, e[21] = S;
172
+ }, children: W.icon }),
173
+ /* @__PURE__ */ b(Ee, { children: W.label })
174
+ ] }, W.id), e[22] = v, e[23] = P) : P = e[23], h = f.map(P), e[19] = v, e[20] = f, e[21] = h;
175
175
  } else
176
- S = e[21];
177
- let O;
178
- e[24] !== r || e[25] !== w || e[26] !== S ? (O = /* @__PURE__ */ g(Ee, { variant: "menu", elevation: 8, anchorOrigin: y, transformOrigin: v, anchorEl: r, open: w, onClose: $, MenuListProps: B, children: S }), e[24] = r, e[25] = w, e[26] = S, e[27] = O) : O = e[27];
179
- let k;
180
- return e[28] !== O || e[29] !== L ? (k = /* @__PURE__ */ ne(he, { children: [
181
- L,
182
- O
183
- ] }), e[28] = O, e[29] = L, e[30] = k) : k = e[30], k;
176
+ h = e[21];
177
+ let I;
178
+ e[24] !== r || e[25] !== E || e[26] !== h ? (I = /* @__PURE__ */ b(Ce, { variant: "menu", elevation: 8, anchorOrigin: D, transformOrigin: x, anchorEl: r, open: E, onClose: z, MenuListProps: T, children: h }), e[24] = r, e[25] = E, e[26] = h, e[27] = I) : I = e[27];
179
+ let L;
180
+ return e[28] !== I || e[29] !== w ? (L = /* @__PURE__ */ ne(he, { children: [
181
+ w,
182
+ I
183
+ ] }), e[28] = I, e[29] = w, e[30] = L) : L = e[30], L;
184
184
  }
185
- function mt(n) {
185
+ function gt(n) {
186
186
  return {
187
187
  data: n?.data
188
188
  };
189
189
  }
190
- const ae = {
190
+ const re = {
191
191
  trigger: {
192
192
  '&[data-active="true"]': {
193
193
  background: (n) => n.palette.primary.relatedLight
194
194
  }
195
195
  }
196
196
  };
197
- function gt(n) {
198
- return n.reduce((e, t) => t.reduce((d, h) => {
199
- if (Array.isArray(h)) {
200
- const a = h.at(-1);
201
- return typeof a == "number" ? d + a : d;
197
+ function ht(n) {
198
+ return n.reduce((e, t) => t.reduce((f, p) => {
199
+ if (Array.isArray(p)) {
200
+ const m = p.at(-1);
201
+ return typeof m == "number" ? f + m : f;
202
202
  }
203
- return Object.entries(h).reduce((a, [p, I]) => p === "name" ? a : typeof I == "number" ? a + I : a, d);
203
+ return Object.entries(p).reduce((m, [S, _]) => S === "name" ? m : typeof _ == "number" ? m + _ : m, f);
204
204
  }, e), 0);
205
205
  }
206
- function ht(n, e) {
207
- return e === 0 ? n : n.map((t) => t.map((d) => {
208
- if (Array.isArray(d))
209
- return d.map((a, p) => p === d.length - 1 && typeof a == "number" ? a / e * 100 : a);
210
- const h = {};
211
- for (const [a, p] of Object.entries(d)) {
212
- if (a === "name") {
213
- h[a] = p;
206
+ function bt(n, e) {
207
+ return e === 0 ? n : n.map((t) => t.map((f) => {
208
+ if (Array.isArray(f))
209
+ return f.map((m, S) => S === f.length - 1 && typeof m == "number" ? m / e * 100 : m);
210
+ const p = {};
211
+ for (const [m, S] of Object.entries(f)) {
212
+ if (m === "name") {
213
+ p[m] = S;
214
214
  continue;
215
215
  }
216
- h[a] = typeof p == "number" ? p / e * 100 : p;
216
+ p[m] = typeof S == "number" ? S / e * 100 : S;
217
217
  }
218
- return h;
218
+ return p;
219
219
  }));
220
220
  }
221
- const fe = "relative-data", re = "relative-data-config";
222
- function cn(n) {
223
- const e = V(24), {
221
+ const ce = "relative-data", Ie = "relative-data-config";
222
+ function on(n) {
223
+ const e = U(36), {
224
224
  id: t,
225
- order: d,
226
- defaultIsRelative: h,
227
- labels: a,
228
- Icon: p,
229
- IconButtonProps: I
230
- } = n, T = d === void 0 ? 10 : d, o = h === void 0 ? !1 : h, l = se(void 0), {
231
- storeIsRelative: r
232
- } = q(t, bt), f = r ?? o;
233
- let c, s;
234
- e[0] !== o || e[1] !== t || e[2] !== T ? (c = () => (x.registerTool(t, {
235
- id: fe,
236
- order: T,
225
+ order: f,
226
+ defaultIsRelative: p,
227
+ labels: m,
228
+ Icon: S,
229
+ IconButtonProps: _
230
+ } = n, y = f === void 0 ? 10 : f, o = p === void 0 ? !1 : p, l = le(void 0);
231
+ let r;
232
+ e[0] !== o ? (r = (T) => ({
233
+ isRelative: T?.isRelative ?? o
234
+ }), e[0] = o, e[1] = r) : r = e[1];
235
+ const {
236
+ isRelative: s
237
+ } = Q(t, r);
238
+ let a, u;
239
+ e[2] !== o || e[3] !== t ? (a = () => {
240
+ g.getWidget(t)?.isRelative === void 0 && g.setWidget(t, {
241
+ isRelative: o
242
+ });
243
+ }, u = [t, o], e[2] = o, e[3] = t, e[4] = a, e[5] = u) : (a = e[4], u = e[5]), $(a, u);
244
+ let i, c;
245
+ e[6] !== o || e[7] !== t || e[8] !== y ? (i = () => (g.registerTool(t, {
246
+ id: ce,
247
+ order: y,
237
248
  enabled: o,
238
249
  fn: pt
239
- }), () => x.unregisterTool(t, fe)), s = [t, T, o], e[0] = o, e[1] = t, e[2] = T, e[3] = c, e[4] = s) : (c = e[3], s = e[4]), Z(c, s);
240
- let i, u;
241
- e[5] !== o || e[6] !== t || e[7] !== T ? (i = () => (x.registerTool(t, {
242
- id: re,
250
+ }), () => g.unregisterTool(t, ce)), c = [t, y, o], e[6] = o, e[7] = t, e[8] = y, e[9] = i, e[10] = c) : (i = e[9], c = e[10]), $(i, c);
251
+ let d, v;
252
+ e[11] !== t || e[12] !== s ? (d = () => {
253
+ g.setToolEnabled(t, ce, s);
254
+ }, v = [t, s], e[11] = t, e[12] = s, e[13] = d, e[14] = v) : (d = e[13], v = e[14]), $(d, v);
255
+ let O;
256
+ e[15] !== t || e[16] !== y ? (O = () => (g.registerTool(t, {
257
+ id: Ie,
243
258
  type: "config",
244
- order: T,
259
+ order: y,
245
260
  enabled: !0,
246
- fn: (y, v) => {
247
- const w = y;
248
- if (v?.isRelative) {
261
+ fn: (T) => {
262
+ const h = T, I = g.getWidget(t), L = I?.sourceData != null && !(Array.isArray(I.sourceData) && I.sourceData.length === 0);
263
+ if (I?.isRelative) {
264
+ if (!L)
265
+ return h;
249
266
  if (!l.current) {
250
- const $ = v?.locale;
251
- l.current = (B) => new Intl.NumberFormat($, {
267
+ const P = I?.locale;
268
+ l.current = (W) => new Intl.NumberFormat(P, {
252
269
  style: "percent",
253
270
  minimumFractionDigits: 1,
254
271
  maximumFractionDigits: 1
255
- }).format(B / 100);
272
+ }).format(W / 100);
256
273
  }
257
274
  return {
258
- ...w,
275
+ ...h,
259
276
  formatter: l.current,
260
277
  max: 100
261
278
  };
262
279
  }
263
- return l.current = void 0, v && "originalFormatter" in v ? {
264
- ...w,
265
- formatter: v.originalFormatter,
266
- max: v.originalMax
267
- } : w;
268
- },
269
- config: {
270
- isRelative: o
280
+ return l.current = void 0, I != null && "originalFormatter" in I ? {
281
+ ...h,
282
+ formatter: I.originalFormatter,
283
+ max: I.originalMax
284
+ } : h;
271
285
  }
272
- }), () => x.unregisterTool(t, re)), u = [t, T, o], e[5] = o, e[6] = t, e[7] = T, e[8] = i, e[9] = u) : (i = e[8], u = e[9]), Z(i, u);
273
- let m;
274
- e[10] !== t || e[11] !== f ? (m = () => {
275
- const y = !f;
276
- if (x.setToolEnabled(t, fe, y), y) {
277
- const v = x.getWidget(t);
278
- x.updateToolConfig(t, re, {
286
+ }), () => {
287
+ const T = g.getWidget(t);
288
+ T?.isRelative && "originalFormatter" in T && g.setWidget(t, {
289
+ formatter: T.originalFormatter,
290
+ max: T.originalMax
291
+ }), l.current = void 0, g.unregisterTool(t, Ie);
292
+ }), e[15] = t, e[16] = y, e[17] = O) : O = e[17];
293
+ let C;
294
+ e[18] !== o || e[19] !== t || e[20] !== y ? (C = [t, y, o], e[18] = o, e[19] = t, e[20] = y, e[21] = C) : C = e[21], $(O, C);
295
+ let k;
296
+ e[22] !== t || e[23] !== s ? (k = () => {
297
+ const T = !s;
298
+ if (l.current = void 0, T) {
299
+ const h = g.getWidget(t);
300
+ g.setWidget(t, {
279
301
  isRelative: !0,
280
- originalFormatter: v?.formatter,
281
- originalMax: v?.max,
282
- locale: v?.locale
302
+ originalFormatter: h?.formatter,
303
+ originalMax: h?.max
283
304
  });
284
305
  } else
285
- l.current = void 0, x.updateToolConfig(t, re, {
306
+ g.setWidget(t, {
286
307
  isRelative: !1
287
308
  });
288
- }, e[10] = t, e[11] = f, e[12] = m) : m = e[12];
289
- const b = m, C = f ? a?.absolute ?? "Show absolute values" : a?.relative ?? "Show relative values", E = a?.ariaLabel ?? C;
290
- let _;
291
- e[13] !== p ? (_ = p ?? /* @__PURE__ */ g(He, {}), e[13] = p, e[14] = _) : _ = e[14];
292
- let D;
293
- e[15] !== I || e[16] !== b || e[17] !== f || e[18] !== E || e[19] !== _ ? (D = /* @__PURE__ */ g(N, { size: "small", "aria-label": E, onClick: b, sx: ae.trigger, "data-active": f, ...I, children: _ }), e[15] = I, e[16] = b, e[17] = f, e[18] = E, e[19] = _, e[20] = D) : D = e[20];
294
- let L;
295
- return e[21] !== D || e[22] !== C ? (L = /* @__PURE__ */ g(ee, { title: C, children: D }), e[21] = D, e[22] = C, e[23] = L) : L = e[23], L;
309
+ }, e[22] = t, e[23] = s, e[24] = k) : k = e[24];
310
+ const A = k, w = s ? m?.absolute ?? "Show absolute values" : m?.relative ?? "Show relative values", D = m?.ariaLabel ?? w;
311
+ let x;
312
+ e[25] !== S ? (x = S ?? /* @__PURE__ */ b(Ne, {}), e[25] = S, e[26] = x) : x = e[26];
313
+ let E;
314
+ e[27] !== _ || e[28] !== A || e[29] !== s || e[30] !== D || e[31] !== x ? (E = /* @__PURE__ */ b(K, { size: "small", "aria-label": D, onClick: A, sx: re.trigger, "data-active": s, ..._, children: x }), e[27] = _, e[28] = A, e[29] = s, e[30] = D, e[31] = x, e[32] = E) : E = e[32];
315
+ let z;
316
+ return e[33] !== E || e[34] !== w ? (z = /* @__PURE__ */ b(ee, { title: w, children: E }), e[33] = E, e[34] = w, e[35] = z) : z = e[35], z;
296
317
  }
297
318
  function pt(n) {
298
- const e = n, t = gt(e);
299
- return ht(e, t);
300
- }
301
- function bt(n) {
302
- return {
303
- storeIsRelative: n?.registeredTools?.find(St)?.config?.isRelative
304
- };
319
+ const e = n, t = ht(e);
320
+ return bt(e, t);
305
321
  }
306
- function St(n) {
307
- return n.id === re;
308
- }
309
- const ve = {
322
+ const ye = {
310
323
  container: {
311
324
  display: "flex",
312
325
  alignItems: "center",
@@ -319,588 +332,596 @@ const ve = {
319
332
  background: (n) => n.palette.primary.relatedLight
320
333
  }
321
334
  }
322
- }, Y = "zoom-toggle";
323
- function dn(n) {
324
- const e = V(43), {
335
+ }, de = "zoom-toggle";
336
+ function ln(n) {
337
+ const e = U(63), {
325
338
  id: t,
326
- defaultZoom: d,
327
- defaultZoomStart: h,
328
- defaultZoomEnd: a,
329
- labels: p,
330
- Icon: I,
331
- ResetIcon: T,
339
+ defaultZoom: f,
340
+ defaultZoomStart: p,
341
+ defaultZoomEnd: m,
342
+ labels: S,
343
+ Icon: _,
344
+ ResetIcon: y,
332
345
  IconButtonProps: o
333
- } = n, l = d === void 0 ? !1 : d, r = h === void 0 ? 0 : h, f = a === void 0 ? 100 : a, c = Fe();
334
- let s;
335
- e[0] !== l || e[1] !== f || e[2] !== r ? (s = (P) => {
336
- const F = P?.registeredTools?.find(vt);
337
- return {
338
- zoom: F?.enabled ?? l,
339
- zoomStart: F?.config?.start ?? r,
340
- zoomEnd: F?.config?.end ?? f
341
- };
342
- }, e[0] = l, e[1] = f, e[2] = r, e[3] = s) : s = e[3];
346
+ } = n, l = f === void 0 ? !1 : f, r = p === void 0 ? 0 : p, s = m === void 0 ? 100 : m, a = Fe();
347
+ let u;
348
+ e[0] !== l || e[1] !== s || e[2] !== r ? (u = (R) => ({
349
+ zoom: R?.zoom ?? l,
350
+ zoomStart: R?.zoomStart ?? r,
351
+ zoomEnd: R?.zoomEnd ?? s
352
+ }), e[0] = l, e[1] = s, e[2] = r, e[3] = u) : u = e[3];
343
353
  const {
344
354
  zoom: i,
345
- zoomStart: u,
346
- zoomEnd: m
347
- } = q(t, s);
348
- let b;
349
- e[4] !== t ? (b = (P) => {
350
- const F = P, W = F.start ?? F.batch?.[0]?.start, U = F.end ?? F.batch?.[0]?.end;
351
- W !== void 0 && U !== void 0 && (x.setToolEnabled(t, Y, !0), x.updateToolConfig(t, Y, {
352
- start: W,
353
- end: U
354
- }));
355
- }, e[4] = t, e[5] = b) : b = e[5];
356
- const C = b;
357
- let E, _;
358
- e[6] !== l || e[7] !== f || e[8] !== r || e[9] !== C || e[10] !== t || e[11] !== c ? (E = () => {
359
- const P = x.getWidget(t)?.registeredTools?.find(Tt), F = P?.enabled ?? l, W = P?.config?.start ?? r, U = P?.config?.end ?? f;
360
- return x.registerTool(t, {
361
- id: Y,
362
- type: "config",
363
- order: 20,
364
- enabled: F,
365
- fn: (H, oe) => {
366
- const G = H, J = G.option, j = G.onEvents ?? {}, Q = oe?.start ?? 0, le = oe?.end ?? 100, X = J?.legend, ue = X?.show !== !1 && X !== void 0, K = parseInt(c?.spacing?.(4) ?? "32"), Oe = qe({
367
- start: Q,
368
- end: le
369
- }, {
370
- inside: !0,
371
- xSlider: !0,
372
- ySlider: !1,
373
- bottomOffset: ue ? 28 : 0
374
- }, c), ce = J?.grid, De = (typeof ce?.bottom == "number" ? ce.bottom : parseInt(ce?.bottom ?? "24")) + K + 8;
375
- ({
376
- ...j
377
- });
378
- const we = {
379
- ...j,
380
- dataZoom: C
381
- };
382
- return {
383
- ...G,
384
- option: {
385
- ...J,
386
- ...Oe,
387
- grid: {
388
- ...ce,
389
- bottom: De
390
- }
391
- },
392
- onEvents: we
393
- };
394
- },
395
- config: {
396
- start: W,
397
- end: U
398
- }
399
- }), () => x.unregisterTool(t, Y);
400
- }, _ = [t, c, C, l, r, f], e[6] = l, e[7] = f, e[8] = r, e[9] = C, e[10] = t, e[11] = c, e[12] = E, e[13] = _) : (E = e[12], _ = e[13]), Z(E, _);
401
- let D;
402
- e[14] !== t || e[15] !== i || e[16] !== m || e[17] !== u ? (D = () => {
403
- const P = !i;
404
- x.setToolEnabled(t, Y, P), x.updateToolConfig(t, Y, {
405
- start: P ? u : 0,
406
- end: P ? m : 100
355
+ zoomStart: c,
356
+ zoomEnd: d
357
+ } = Q(t, u);
358
+ let v, O;
359
+ e[4] !== l || e[5] !== s || e[6] !== r || e[7] !== t ? (v = () => {
360
+ g.getWidget(t)?.zoom === void 0 && g.setWidget(t, {
361
+ zoom: l,
362
+ zoomStart: r,
363
+ zoomEnd: s
407
364
  });
408
- }, e[14] = t, e[15] = i, e[16] = m, e[17] = u, e[18] = D) : D = e[18];
409
- const L = D;
410
- let y;
411
- e[19] !== f || e[20] !== r || e[21] !== t ? (y = () => {
412
- x.setToolEnabled(t, Y, !0), x.updateToolConfig(t, Y, {
413
- start: r,
414
- end: f
365
+ }, O = [t, l, r, s], e[4] = l, e[5] = s, e[6] = r, e[7] = t, e[8] = v, e[9] = O) : (v = e[8], O = e[9]), $(v, O);
366
+ let C;
367
+ e[10] !== t ? (C = (R) => {
368
+ const j = R, N = j.start ?? j.batch?.[0]?.start, Y = j.end ?? j.batch?.[0]?.end;
369
+ N !== void 0 && Y !== void 0 && g.setWidget(t, {
370
+ zoom: !0,
371
+ zoomStart: N,
372
+ zoomEnd: Y
415
373
  });
416
- }, e[19] = f, e[20] = r, e[21] = t, e[22] = y) : y = e[22];
417
- const v = y, w = p?.enable ?? "Enable zoom", $ = p?.disable ?? "Disable zoom", B = p?.reset ?? "Reset zoom", S = i ? $ : w, O = p?.ariaLabel ?? S;
418
- let k;
419
- e[23] !== I ? (k = I ?? /* @__PURE__ */ g(Ue, {}), e[23] = I, e[24] = k) : k = e[24];
420
- let z;
421
- e[25] !== o || e[26] !== L || e[27] !== O || e[28] !== k || e[29] !== i ? (z = /* @__PURE__ */ g(N, { size: "small", "aria-label": O, onClick: L, sx: ve.trigger, "data-active": i, ...o, children: k }), e[25] = o, e[26] = L, e[27] = O, e[28] = k, e[29] = i, e[30] = z) : z = e[30];
422
- let R;
423
- e[31] !== z || e[32] !== S ? (R = /* @__PURE__ */ g(ee, { title: S, children: z }), e[31] = z, e[32] = S, e[33] = R) : R = e[33];
374
+ }, e[10] = t, e[11] = C) : C = e[11];
375
+ const k = C;
424
376
  let A;
425
- e[34] !== o || e[35] !== T || e[36] !== v || e[37] !== B || e[38] !== i ? (A = i && /* @__PURE__ */ g(ee, { title: B, children: /* @__PURE__ */ g(N, { size: "small", "aria-label": B, onClick: v, ...o, children: T ?? /* @__PURE__ */ g(Ne, {}) }) }), e[34] = o, e[35] = T, e[36] = v, e[37] = B, e[38] = i, e[39] = A) : A = e[39];
377
+ e[12] !== l || e[13] !== k || e[14] !== t || e[15] !== a ? (A = () => (g.registerTool(t, {
378
+ id: de,
379
+ type: "config",
380
+ order: 20,
381
+ enabled: l,
382
+ fn: (R) => {
383
+ const j = R, N = j.option, Y = j.onEvents ?? {}, oe = g.getWidget(t), te = oe?.zoomStart ?? 0, ae = oe?.zoomEnd ?? 100, q = N?.legend, X = q?.show !== !1 && q !== void 0, Oe = parseInt(a?.spacing?.(4) ?? "32"), ze = Je({
384
+ start: te,
385
+ end: ae
386
+ }, {
387
+ inside: !0,
388
+ xSlider: !0,
389
+ ySlider: !1,
390
+ bottomOffset: X ? 28 : 0
391
+ }, a), se = N?.grid, De = (typeof se?.bottom == "number" ? se.bottom : parseInt(se?.bottom ?? "24")) + Oe + 8, we = {
392
+ ...Y,
393
+ dataZoom: k
394
+ };
395
+ return {
396
+ ...j,
397
+ option: {
398
+ ...N,
399
+ ...ze,
400
+ grid: {
401
+ ...se,
402
+ bottom: De
403
+ }
404
+ },
405
+ onEvents: we
406
+ };
407
+ }
408
+ }), () => g.unregisterTool(t, de)), e[12] = l, e[13] = k, e[14] = t, e[15] = a, e[16] = A) : A = e[16];
409
+ let w;
410
+ e[17] !== l || e[18] !== s || e[19] !== r || e[20] !== k || e[21] !== t || e[22] !== a ? (w = [t, a, k, l, r, s], e[17] = l, e[18] = s, e[19] = r, e[20] = k, e[21] = t, e[22] = a, e[23] = w) : w = e[23], $(A, w);
411
+ let D, x;
412
+ e[24] !== t || e[25] !== i ? (D = () => {
413
+ g.setToolEnabled(t, de, i);
414
+ }, x = [t, i], e[24] = t, e[25] = i, e[26] = D, e[27] = x) : (D = e[26], x = e[27]), $(D, x);
415
+ let E;
416
+ e[28] !== t ? (E = () => {
417
+ g.triggerToolPipeline(t);
418
+ }, e[28] = t, e[29] = E) : E = e[29];
419
+ let z;
420
+ e[30] !== t || e[31] !== d || e[32] !== c ? (z = [t, c, d], e[30] = t, e[31] = d, e[32] = c, e[33] = z) : z = e[33], $(E, z);
421
+ let T;
422
+ e[34] !== t || e[35] !== i || e[36] !== d || e[37] !== c ? (T = () => {
423
+ const R = !i;
424
+ g.setWidget(t, {
425
+ zoom: R,
426
+ zoomStart: R ? c : 0,
427
+ zoomEnd: R ? d : 100
428
+ });
429
+ }, e[34] = t, e[35] = i, e[36] = d, e[37] = c, e[38] = T) : T = e[38];
430
+ const h = T;
431
+ let I;
432
+ e[39] !== s || e[40] !== r || e[41] !== t ? (I = () => {
433
+ g.setWidget(t, {
434
+ zoom: !0,
435
+ zoomStart: r,
436
+ zoomEnd: s
437
+ });
438
+ }, e[39] = s, e[40] = r, e[41] = t, e[42] = I) : I = e[42];
439
+ const L = I, P = S?.enable ?? "Enable zoom", W = S?.disable ?? "Disable zoom", B = S?.reset ?? "Reset zoom", H = i ? W : P, Z = S?.ariaLabel ?? H;
440
+ let F;
441
+ e[43] !== _ ? (F = _ ?? /* @__PURE__ */ b(Ue, {}), e[43] = _, e[44] = F) : F = e[44];
442
+ let G;
443
+ e[45] !== o || e[46] !== h || e[47] !== Z || e[48] !== F || e[49] !== i ? (G = /* @__PURE__ */ b(K, { size: "small", "aria-label": Z, onClick: h, sx: ye.trigger, "data-active": i, ...o, children: F }), e[45] = o, e[46] = h, e[47] = Z, e[48] = F, e[49] = i, e[50] = G) : G = e[50];
444
+ let V;
445
+ e[51] !== G || e[52] !== H ? (V = /* @__PURE__ */ b(ee, { title: H, children: G }), e[51] = G, e[52] = H, e[53] = V) : V = e[53];
426
446
  let M;
427
- return e[40] !== R || e[41] !== A ? (M = /* @__PURE__ */ ne(ke, { sx: ve.container, children: [
428
- R,
429
- A
430
- ] }), e[40] = R, e[41] = A, e[42] = M) : M = e[42], M;
447
+ e[54] !== o || e[55] !== y || e[56] !== L || e[57] !== B || e[58] !== i ? (M = i && /* @__PURE__ */ b(ee, { title: B, children: /* @__PURE__ */ b(K, { size: "small", "aria-label": B, onClick: L, ...o, children: y ?? /* @__PURE__ */ b(je, {}) }) }), e[54] = o, e[55] = y, e[56] = L, e[57] = B, e[58] = i, e[59] = M) : M = e[59];
448
+ let J;
449
+ return e[60] !== V || e[61] !== M ? (J = /* @__PURE__ */ ne(ke, { sx: ye.container, children: [
450
+ V,
451
+ M
452
+ ] }), e[60] = V, e[61] = M, e[62] = J) : J = e[62], J;
431
453
  }
432
- function Tt(n) {
433
- return n.id === Y;
434
- }
435
- function vt(n) {
436
- return n.id === Y;
437
- }
438
- const It = () => {
439
- const n = V(1);
454
+ const St = () => {
455
+ const n = U(1);
440
456
  let e;
441
- return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ g("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ g("path", { d: "M4 20V8H8V20H4ZM9 20V13H13V20H9ZM16 20V4H20V20H16Z", fill: "currentColor" }) }), n[0] = e) : e = n[0], e;
442
- }, Ie = "stack-toggle";
443
- function un(n) {
444
- const e = V(32), {
457
+ return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ b("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ b("path", { d: "M4 20V8H8V20H4ZM9 20V13H13V20H9ZM16 20V4H20V20H16Z", fill: "currentColor" }) }), n[0] = e) : e = n[0], e;
458
+ }, ue = "stack-toggle";
459
+ function rn(n) {
460
+ const e = U(35), {
445
461
  id: t,
446
- defaultIsStacked: d,
447
- labels: h,
448
- Icon: a,
449
- IconButtonProps: p
450
- } = n, I = d === void 0 ? !1 : d, {
451
- storeIsStacked: T,
462
+ defaultIsStacked: f,
463
+ labels: p,
464
+ Icon: m,
465
+ IconButtonProps: S
466
+ } = n, _ = f === void 0 ? !1 : f, {
467
+ storeIsStacked: y,
452
468
  option: o
453
- } = q(t, Ct);
469
+ } = Q(t, Tt);
454
470
  let l;
455
471
  e: {
456
472
  if (!o) {
457
- let k;
458
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = {
473
+ let W;
474
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (W = {
459
475
  hasMultiSeries: !1,
460
476
  hasStackInSeries: !1
461
- }, e[0] = k) : k = e[0], l = k;
477
+ }, e[0] = W) : W = e[0], l = W;
462
478
  break e;
463
479
  }
464
- let w;
465
- e[1] !== o.series ? (w = Array.isArray(o.series) ? o.series : [o.series], e[1] = o.series, e[2] = w) : w = e[2];
466
- const $ = w, B = $.length > 1;
467
- let S;
468
- e[3] !== $ ? (S = $.some(xt), e[3] = $, e[4] = S) : S = e[4];
469
- let O;
470
- e[5] !== B || e[6] !== S ? (O = {
471
- hasMultiSeries: B,
472
- hasStackInSeries: S
473
- }, e[5] = B, e[6] = S, e[7] = O) : O = e[7], l = O;
480
+ let T;
481
+ e[1] !== o.series ? (T = Array.isArray(o.series) ? o.series : [o.series], e[1] = o.series, e[2] = T) : T = e[2];
482
+ const h = T, I = h.length > 1;
483
+ let L;
484
+ e[3] !== h ? (L = h.some(yt), e[3] = h, e[4] = L) : L = e[4];
485
+ let P;
486
+ e[5] !== I || e[6] !== L ? (P = {
487
+ hasMultiSeries: I,
488
+ hasStackInSeries: L
489
+ }, e[5] = I, e[6] = L, e[7] = P) : P = e[7], l = P;
474
490
  }
475
491
  const {
476
492
  hasMultiSeries: r,
477
- hasStackInSeries: f
478
- } = l, c = f || I, s = T ?? c;
479
- let i, u;
480
- e[8] !== r || e[9] !== t || e[10] !== s ? (i = () => (x.registerTool(t, {
481
- id: Ie,
493
+ hasStackInSeries: s
494
+ } = l, a = s || _, u = y ?? a;
495
+ let i, c;
496
+ e[8] !== t ? (i = () => (g.registerTool(t, {
497
+ id: ue,
482
498
  type: "config",
483
499
  order: 10,
484
- enabled: s && r,
485
- fn: _t
486
- }), () => x.unregisterTool(t, Ie)), u = [t, s, r], e[8] = r, e[9] = t, e[10] = s, e[11] = i, e[12] = u) : (i = e[11], u = e[12]), Z(i, u);
487
- let m, b;
488
- e[13] !== c || e[14] !== t || e[15] !== T ? (m = () => {
489
- T === void 0 && x.setWidget(t, {
490
- isStacked: c
500
+ enabled: !1,
501
+ fn: vt
502
+ }), () => g.unregisterTool(t, ue)), c = [t], e[8] = t, e[9] = i, e[10] = c) : (i = e[9], c = e[10]), $(i, c);
503
+ let d, v;
504
+ e[11] !== r || e[12] !== t || e[13] !== u ? (d = () => {
505
+ g.setToolEnabled(t, ue, u && r);
506
+ }, v = [t, u, r], e[11] = r, e[12] = t, e[13] = u, e[14] = d, e[15] = v) : (d = e[14], v = e[15]), $(d, v);
507
+ let O, C;
508
+ e[16] !== a || e[17] !== t || e[18] !== y ? (O = () => {
509
+ y === void 0 && g.setWidget(t, {
510
+ isStacked: a
491
511
  });
492
- }, b = [c, t, T], e[13] = c, e[14] = t, e[15] = T, e[16] = m, e[17] = b) : (m = e[16], b = e[17]), Z(m, b);
493
- let C;
494
- e[18] !== t || e[19] !== s ? (C = () => {
495
- x.setWidget(t, {
496
- isStacked: !s
512
+ }, C = [a, t, y], e[16] = a, e[17] = t, e[18] = y, e[19] = O, e[20] = C) : (O = e[19], C = e[20]), $(O, C);
513
+ let k;
514
+ e[21] !== t || e[22] !== u ? (k = () => {
515
+ g.setWidget(t, {
516
+ isStacked: !u
497
517
  });
498
- }, e[18] = t, e[19] = s, e[20] = C) : C = e[20];
499
- const E = C, _ = s ? h?.unstacked ?? "Disable stacking" : h?.stacked ?? "Enable stacking";
518
+ }, e[21] = t, e[22] = u, e[23] = k) : k = e[23];
519
+ const A = k, w = u ? p?.unstacked ?? "Disable stacking" : p?.stacked ?? "Enable stacking";
500
520
  if (!r)
501
521
  return null;
502
- const D = h?.ariaLabel ?? _;
503
- let L;
504
- e[21] !== a ? (L = a ?? /* @__PURE__ */ g(It, {}), e[21] = a, e[22] = L) : L = e[22];
505
- let y;
506
- e[23] !== p || e[24] !== E || e[25] !== s || e[26] !== D || e[27] !== L ? (y = /* @__PURE__ */ g(N, { size: "small", "aria-label": D, onClick: E, sx: ae.trigger, "data-active": s, ...p, children: L }), e[23] = p, e[24] = E, e[25] = s, e[26] = D, e[27] = L, e[28] = y) : y = e[28];
507
- let v;
508
- return e[29] !== y || e[30] !== _ ? (v = /* @__PURE__ */ g(ee, { title: _, children: y }), e[29] = y, e[30] = _, e[31] = v) : v = e[31], v;
522
+ const D = p?.ariaLabel ?? w;
523
+ let x;
524
+ e[24] !== m ? (x = m ?? /* @__PURE__ */ b(St, {}), e[24] = m, e[25] = x) : x = e[25];
525
+ let E;
526
+ e[26] !== S || e[27] !== A || e[28] !== u || e[29] !== D || e[30] !== x ? (E = /* @__PURE__ */ b(K, { size: "small", "aria-label": D, onClick: A, sx: re.trigger, "data-active": u, ...S, children: x }), e[26] = S, e[27] = A, e[28] = u, e[29] = D, e[30] = x, e[31] = E) : E = e[31];
527
+ let z;
528
+ return e[32] !== E || e[33] !== w ? (z = /* @__PURE__ */ b(ee, { title: w, children: E }), e[32] = E, e[33] = w, e[34] = z) : z = e[34], z;
509
529
  }
510
- function _t(n) {
530
+ function vt(n) {
511
531
  const e = n, t = e.option;
512
532
  if (!t)
513
533
  return n;
514
- const h = (Array.isArray(t.series) ? t.series : [t.series]).map(yt);
534
+ const p = (Array.isArray(t.series) ? t.series : [t.series]).map(It);
515
535
  return {
516
536
  ...e,
517
537
  option: {
518
538
  ...t,
519
- series: h
539
+ series: p
520
540
  }
521
541
  };
522
542
  }
523
- function yt(n) {
543
+ function It(n) {
524
544
  const e = n?.stack;
525
545
  return {
526
546
  ...n,
527
- ...Je(typeof e == "string" ? e : Qe)
547
+ ...Qe(typeof e == "string" ? e : Xe)
528
548
  };
529
549
  }
530
- function xt(n) {
550
+ function yt(n) {
531
551
  return n?.stack;
532
552
  }
533
- function Ct(n) {
553
+ function Tt(n) {
534
554
  return {
535
555
  storeIsStacked: n?.isStacked,
536
556
  option: n?.option
537
557
  };
538
558
  }
539
- const ge = "lock-selection";
540
- function fn(n) {
541
- const e = V(24), {
559
+ const ie = "lock-selection";
560
+ function sn(n) {
561
+ const e = U(24), {
542
562
  id: t,
543
- selectedItems: d,
544
- order: h,
545
- labels: a,
546
- Icon: p,
547
- IconButtonProps: I
548
- } = n, T = h === void 0 ? 30 : h, {
563
+ selectedItems: f,
564
+ order: p,
565
+ labels: m,
566
+ Icon: S,
567
+ IconButtonProps: _
568
+ } = n, y = p === void 0 ? 30 : p, {
549
569
  storeIsLocked: o
550
- } = q(t, kt), l = o ?? !1;
551
- let r;
552
- e[0] !== l || e[1] !== d ? (r = l ? d : [], e[0] = l, e[1] = d, e[2] = r) : r = e[2];
553
- const f = r;
554
- let c, s;
555
- e[3] !== t || e[4] !== l || e[5] !== f || e[6] !== T ? (c = () => (x.registerTool(t, {
556
- id: ge,
557
- order: T,
558
- enabled: l,
559
- fn: Et,
560
- config: {
561
- lockedItems: f
570
+ } = Q(t, _t), l = o ?? !1;
571
+ let r, s;
572
+ e[0] !== t || e[1] !== y ? (r = () => (g.registerTool(t, {
573
+ id: ie,
574
+ order: y,
575
+ enabled: !1,
576
+ fn: (A) => {
577
+ const D = g.getWidget(t)?.lockedItems ?? [];
578
+ return D.length === 0 ? A : xt(A, D);
562
579
  }
563
- }), () => x.unregisterTool(t, ge)), s = [t, T, l, f], e[3] = t, e[4] = l, e[5] = f, e[6] = T, e[7] = c, e[8] = s) : (c = e[7], s = e[8]), Z(c, s);
580
+ }), () => g.unregisterTool(t, ie)), s = [t, y], e[0] = t, e[1] = y, e[2] = r, e[3] = s) : (r = e[2], s = e[3]), $(r, s);
581
+ let a, u;
582
+ e[4] !== t || e[5] !== l || e[6] !== f.length ? (a = () => {
583
+ if (l && f.length === 0) {
584
+ g.setWidget(t, {
585
+ isLocked: !1,
586
+ lockedItems: []
587
+ });
588
+ return;
589
+ }
590
+ g.setToolEnabled(t, ie, l);
591
+ }, u = [t, l, f.length], e[4] = t, e[5] = l, e[6] = f.length, e[7] = a, e[8] = u) : (a = e[7], u = e[8]), $(a, u);
564
592
  let i;
565
- e[9] !== t || e[10] !== l || e[11] !== d ? (i = () => {
566
- l ? x.setWidget(t, {
593
+ e[9] !== t || e[10] !== l || e[11] !== f ? (i = () => {
594
+ l ? g.setWidget(t, {
567
595
  isLocked: !1,
568
596
  lockedItems: []
569
- }) : x.setWidget(t, {
597
+ }) : g.setWidget(t, {
570
598
  isLocked: !0,
571
- lockedItems: d
599
+ lockedItems: f
572
600
  });
573
- }, e[9] = t, e[10] = l, e[11] = d, e[12] = i) : i = e[12];
574
- const u = i;
575
- if (d.length === 0)
601
+ }, e[9] = t, e[10] = l, e[11] = f, e[12] = i) : i = e[12];
602
+ const c = i;
603
+ if (f.length === 0)
576
604
  return null;
577
- const m = l ? a?.unlock ?? "Unlock selection" : a?.lock ?? "Lock selection", b = a?.ariaLabel ?? m;
605
+ const d = l ? m?.unlock ?? "Unlock selection" : m?.lock ?? "Lock selection", v = m?.ariaLabel ?? d;
606
+ let O;
607
+ e[13] !== S ? (O = S ?? /* @__PURE__ */ b(Ke, { fontSize: "small" }), e[13] = S, e[14] = O) : O = e[14];
578
608
  let C;
579
- e[13] !== p ? (C = p ?? /* @__PURE__ */ g(je, { fontSize: "small" }), e[13] = p, e[14] = C) : C = e[14];
580
- let E;
581
- e[15] !== I || e[16] !== b || e[17] !== u || e[18] !== l || e[19] !== C ? (E = /* @__PURE__ */ g(N, { size: "small", "aria-label": b, onClick: u, sx: ae.trigger, "data-active": l, ...I, children: C }), e[15] = I, e[16] = b, e[17] = u, e[18] = l, e[19] = C, e[20] = E) : E = e[20];
582
- let _;
583
- return e[21] !== E || e[22] !== m ? (_ = /* @__PURE__ */ g(ee, { title: m, children: E }), e[21] = E, e[22] = m, e[23] = _) : _ = e[23], _;
584
- }
585
- function Et(n, e) {
586
- const t = e?.lockedItems || [];
587
- return t.length === 0 ? n : Lt(n, t);
609
+ e[15] !== _ || e[16] !== v || e[17] !== c || e[18] !== l || e[19] !== O ? (C = /* @__PURE__ */ b(K, { size: "small", "aria-label": v, onClick: c, sx: re.trigger, "data-active": l, ..._, children: O }), e[15] = _, e[16] = v, e[17] = c, e[18] = l, e[19] = O, e[20] = C) : C = e[20];
610
+ let k;
611
+ return e[21] !== C || e[22] !== d ? (k = /* @__PURE__ */ b(ee, { title: d, children: C }), e[21] = C, e[22] = d, e[23] = k) : k = e[23], k;
588
612
  }
589
- function kt(n) {
613
+ function _t(n) {
590
614
  return {
591
615
  storeIsLocked: n?.isLocked
592
616
  };
593
617
  }
594
- function Lt(n, e) {
595
- return n.map((t) => t.filter((d) => {
596
- const h = d.name;
597
- return typeof h == "string" && e.includes(h);
618
+ function xt(n, e) {
619
+ return n.map((t) => t.filter((f) => {
620
+ const p = f.name;
621
+ return typeof p == "string" && e.includes(p);
598
622
  }));
599
623
  }
600
- const de = "searcher", Ot = 300;
601
- function mn(n) {
602
- const e = V(37), {
624
+ const fe = "searcher", Et = 300;
625
+ function an(n) {
626
+ const e = U(39), {
603
627
  id: t,
604
- filterFn: d,
605
- order: h,
606
- labels: a,
607
- TextFieldProps: p,
608
- ClearIcon: I,
609
- debounceDelay: T
610
- } = n, o = h === void 0 ? 20 : h, l = T === void 0 ? Ot : T, r = se(null), f = se(null), {
611
- enabled: c,
612
- searchText: s
613
- } = q(t, Dt), i = se(c), u = d ?? wt;
614
- let m;
615
- e[0] !== t ? (m = (F) => {
616
- x.setWidget(t, {
617
- searchText: F
628
+ filterFn: f,
629
+ order: p,
630
+ labels: m,
631
+ TextFieldProps: S,
632
+ ClearIcon: _,
633
+ debounceDelay: y
634
+ } = n, o = p === void 0 ? 20 : p, l = y === void 0 ? Et : y, r = le(null), s = le(null), {
635
+ enabled: a,
636
+ searchText: u
637
+ } = Q(t, Ct), i = le(a), c = f ?? kt;
638
+ let d;
639
+ e[0] !== t ? (d = (V) => {
640
+ g.setWidget(t, {
641
+ searchText: V
618
642
  });
619
- }, e[0] = t, e[1] = m) : m = e[1];
620
- const b = m;
621
- let C, E;
622
- e[2] !== c || e[3] !== u || e[4] !== t || e[5] !== o || e[6] !== s ? (C = () => (x.registerTool(t, {
623
- id: de,
643
+ }, e[0] = t, e[1] = d) : d = e[1];
644
+ const v = d;
645
+ let O, C;
646
+ e[2] !== c || e[3] !== t || e[4] !== o ? (O = () => (g.registerTool(t, {
647
+ id: fe,
624
648
  order: o,
625
- enabled: c,
626
- fn: async (F, W) => {
627
- const U = W?.searchText || "";
628
- return u(F, U);
649
+ enabled: !1,
650
+ fn: async (V) => {
651
+ const J = g.getWidget(t)?.searchText ?? "";
652
+ return c(V, J);
629
653
  },
630
- config: {
631
- searchText: s
632
- },
633
- disables: [ge]
634
- }), () => x.unregisterTool(t, de)), E = [t, o, c, s, u], e[2] = c, e[3] = u, e[4] = t, e[5] = o, e[6] = s, e[7] = C, e[8] = E) : (C = e[7], E = e[8]), Z(C, E);
635
- let _;
636
- e[9] !== l || e[10] !== t ? (_ = (F) => {
637
- f.current && clearTimeout(f.current), f.current = setTimeout(() => {
638
- x.updateToolConfig(t, de, {
639
- searchText: F
640
- });
654
+ disables: [ie]
655
+ }), () => g.unregisterTool(t, fe)), C = [t, o, c], e[2] = c, e[3] = t, e[4] = o, e[5] = O, e[6] = C) : (O = e[5], C = e[6]), $(O, C);
656
+ let k, A;
657
+ e[7] !== a || e[8] !== t ? (k = () => {
658
+ g.setToolEnabled(t, fe, a);
659
+ }, A = [t, a], e[7] = a, e[8] = t, e[9] = k, e[10] = A) : (k = e[9], A = e[10]), $(k, A);
660
+ let w;
661
+ e[11] !== l || e[12] !== t ? (w = () => {
662
+ s.current && clearTimeout(s.current), s.current = setTimeout(() => {
663
+ g.triggerToolPipeline(t);
641
664
  }, l);
642
- }, e[9] = l, e[10] = t, e[11] = _) : _ = e[11];
643
- const D = _;
644
- let L, y;
645
- e[12] !== c ? (L = () => {
646
- c && !i.current && r.current && r.current.focus(), i.current = c;
647
- }, y = [c], e[12] = c, e[13] = L, e[14] = y) : (L = e[13], y = e[14]), Z(L, y);
648
- let v, w;
649
- e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = () => () => {
650
- f.current && clearTimeout(f.current);
651
- }, v = [], e[15] = v, e[16] = w) : (v = e[15], w = e[16]), Z(w, v);
652
- let $;
653
- e[17] !== D || e[18] !== b ? ($ = (F) => {
654
- const W = F.target.value;
655
- b(W), D(W);
656
- }, e[17] = D, e[18] = b, e[19] = $) : $ = e[19];
657
- const B = $;
658
- let S;
659
- e[20] !== t || e[21] !== b ? (S = () => {
660
- b(""), x.updateToolConfig(t, de, {
661
- searchText: ""
662
- }), r.current && r.current.focus();
663
- }, e[20] = t, e[21] = b, e[22] = S) : S = e[22];
664
- const O = S;
665
- if (!c)
665
+ }, e[11] = l, e[12] = t, e[13] = w) : w = e[13];
666
+ const D = w;
667
+ let x, E;
668
+ e[14] !== a ? (E = () => {
669
+ a && !i.current && r.current && r.current.focus(), i.current = a;
670
+ }, x = [a], e[14] = a, e[15] = x, e[16] = E) : (x = e[15], E = e[16]), $(E, x);
671
+ let z, T;
672
+ e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = () => () => {
673
+ s.current && clearTimeout(s.current);
674
+ }, T = [], e[17] = z, e[18] = T) : (z = e[17], T = e[18]), $(z, T);
675
+ let h;
676
+ e[19] !== D || e[20] !== v ? (h = (V) => {
677
+ const M = V.target.value;
678
+ v(M), D();
679
+ }, e[19] = D, e[20] = v, e[21] = h) : h = e[21];
680
+ const I = h;
681
+ let L;
682
+ e[22] !== t || e[23] !== v ? (L = () => {
683
+ v(""), g.triggerToolPipeline(t), r.current && r.current.focus();
684
+ }, e[22] = t, e[23] = v, e[24] = L) : L = e[24];
685
+ const P = L;
686
+ if (!a)
666
687
  return null;
667
- const k = a?.placeholder ?? "Search...", z = a?.clearAriaLabel ?? "Clear search";
668
- let R;
669
- e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ g(pe, { position: "start", children: /* @__PURE__ */ g(Le, {}) }), e[23] = R) : R = e[23];
670
- let A;
671
- e[24] !== I || e[25] !== z || e[26] !== O || e[27] !== s ? (A = s ? /* @__PURE__ */ g(pe, { position: "end", children: /* @__PURE__ */ g(N, { size: "small", "aria-label": z, onClick: O, edge: "end", children: I ?? /* @__PURE__ */ g(Ke, { fontSize: "small" }) }) }) : null, e[24] = I, e[25] = z, e[26] = O, e[27] = s, e[28] = A) : A = e[28];
672
- let M;
673
- e[29] !== A ? (M = {
674
- startAdornment: R,
675
- endAdornment: A
676
- }, e[29] = A, e[30] = M) : M = e[30];
677
- let P;
678
- return e[31] !== p || e[32] !== B || e[33] !== k || e[34] !== s || e[35] !== M ? (P = /* @__PURE__ */ g(Me, { inputRef: r, size: "small", fullWidth: !0, variant: "filled", placeholder: k, value: s, onChange: B, InputProps: M, ...p }), e[31] = p, e[32] = B, e[33] = k, e[34] = s, e[35] = M, e[36] = P) : P = e[36], P;
688
+ const W = m?.placeholder ?? "Search...", B = m?.clearAriaLabel ?? "Clear search";
689
+ let H;
690
+ e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ b(be, { position: "start", children: /* @__PURE__ */ b(Le, {}) }), e[25] = H) : H = e[25];
691
+ let Z;
692
+ e[26] !== _ || e[27] !== B || e[28] !== P || e[29] !== u ? (Z = u ? /* @__PURE__ */ b(be, { position: "end", children: /* @__PURE__ */ b(K, { size: "small", "aria-label": B, onClick: P, edge: "end", children: _ ?? /* @__PURE__ */ b(Ye, { fontSize: "small" }) }) }) : null, e[26] = _, e[27] = B, e[28] = P, e[29] = u, e[30] = Z) : Z = e[30];
693
+ let F;
694
+ e[31] !== Z ? (F = {
695
+ startAdornment: H,
696
+ endAdornment: Z
697
+ }, e[31] = Z, e[32] = F) : F = e[32];
698
+ let G;
699
+ return e[33] !== S || e[34] !== I || e[35] !== W || e[36] !== u || e[37] !== F ? (G = /* @__PURE__ */ b(Me, { inputRef: r, size: "small", fullWidth: !0, variant: "filled", placeholder: W, value: u, onChange: I, InputProps: F, ...S }), e[33] = S, e[34] = I, e[35] = W, e[36] = u, e[37] = F, e[38] = G) : G = e[38], G;
679
700
  }
680
- function Dt(n) {
701
+ function Ct(n) {
681
702
  return {
682
703
  enabled: n?.isSearchEnabled ?? !1,
683
704
  searchText: n?.searchText ?? ""
684
705
  };
685
706
  }
686
- const wt = (n, e) => {
707
+ const kt = (n, e) => {
687
708
  if (!e.trim()) return Promise.resolve(n);
688
709
  const t = e.toLowerCase();
689
- return Promise.resolve(n.map((d) => d.filter((h) => Object.values(h).some((a) => typeof a == "string" && a.toLowerCase().includes(t)))));
710
+ return Promise.resolve(n.map((f) => f.filter((p) => Object.values(p).some((m) => String(m).toLowerCase().includes(t)))));
690
711
  };
691
- function gn(n) {
692
- const e = V(18), {
712
+ function cn(n) {
713
+ const e = U(18), {
693
714
  id: t,
694
- defaultEnabled: d,
695
- labels: h,
696
- Icon: a,
697
- IconButtonProps: p
698
- } = n, I = d === void 0 ? !1 : d, {
699
- storeIsEnabled: T
700
- } = q(t, $t), o = T ?? I;
715
+ defaultEnabled: f,
716
+ labels: p,
717
+ Icon: m,
718
+ IconButtonProps: S
719
+ } = n, _ = f === void 0 ? !1 : f, {
720
+ storeIsEnabled: y
721
+ } = Q(t, Lt), o = y ?? _;
701
722
  let l, r;
702
- e[0] !== I || e[1] !== t ? (l = () => {
703
- x.getWidget(t)?.isSearchEnabled === void 0 && x.setWidget(t, {
704
- isSearchEnabled: I
723
+ e[0] !== _ || e[1] !== t ? (l = () => {
724
+ g.getWidget(t)?.isSearchEnabled === void 0 && g.setWidget(t, {
725
+ isSearchEnabled: _
705
726
  });
706
- }, r = [I, t], e[0] = I, e[1] = t, e[2] = l, e[3] = r) : (l = e[2], r = e[3]), Z(l, r);
707
- let f;
708
- e[4] !== t || e[5] !== o ? (f = () => {
709
- x.setWidget(t, {
727
+ }, r = [_, t], e[0] = _, e[1] = t, e[2] = l, e[3] = r) : (l = e[2], r = e[3]), $(l, r);
728
+ let s;
729
+ e[4] !== t || e[5] !== o ? (s = () => {
730
+ g.setWidget(t, {
710
731
  isSearchEnabled: !o
711
732
  });
712
- }, e[4] = t, e[5] = o, e[6] = f) : f = e[6];
713
- const c = f, s = o ? h?.disable ?? "Disable search" : h?.enable ?? "Enable search", i = h?.ariaLabel ?? s;
714
- let u;
715
- e[7] !== a ? (u = a ?? /* @__PURE__ */ g(Le, { fontSize: "small" }), e[7] = a, e[8] = u) : u = e[8];
716
- let m;
717
- e[9] !== p || e[10] !== i || e[11] !== c || e[12] !== o || e[13] !== u ? (m = /* @__PURE__ */ g(N, { size: "small", "aria-label": i, onClick: c, sx: ae.trigger, "data-active": o, ...p, children: u }), e[9] = p, e[10] = i, e[11] = c, e[12] = o, e[13] = u, e[14] = m) : m = e[14];
718
- let b;
719
- return e[15] !== m || e[16] !== s ? (b = /* @__PURE__ */ g(ee, { title: s, children: m }), e[15] = m, e[16] = s, e[17] = b) : b = e[17], b;
733
+ }, e[4] = t, e[5] = o, e[6] = s) : s = e[6];
734
+ const a = s, u = o ? p?.disable ?? "Disable search" : p?.enable ?? "Enable search", i = p?.ariaLabel ?? u;
735
+ let c;
736
+ e[7] !== m ? (c = m ?? /* @__PURE__ */ b(Le, { fontSize: "small" }), e[7] = m, e[8] = c) : c = e[8];
737
+ let d;
738
+ e[9] !== S || e[10] !== i || e[11] !== a || e[12] !== o || e[13] !== c ? (d = /* @__PURE__ */ b(K, { size: "small", "aria-label": i, onClick: a, sx: re.trigger, "data-active": o, ...S, children: c }), e[9] = S, e[10] = i, e[11] = a, e[12] = o, e[13] = c, e[14] = d) : d = e[14];
739
+ let v;
740
+ return e[15] !== d || e[16] !== u ? (v = /* @__PURE__ */ b(ee, { title: u, children: d }), e[15] = d, e[16] = u, e[17] = v) : v = e[17], v;
720
741
  }
721
- function $t(n) {
742
+ function Lt(n) {
722
743
  return {
723
744
  storeIsEnabled: n?.isSearchEnabled
724
745
  };
725
746
  }
726
- const zt = () => {
727
- const n = V(1);
747
+ const Ot = () => {
748
+ const n = U(1);
728
749
  let e;
729
- return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 18 18", children: /* @__PURE__ */ g("path", { fill: "currentColor", fillRule: "evenodd", d: "M14.25 2.25H3.75c-.825 0-1.5.675-1.5 1.5v10.5c0 .825.675 1.5 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5V3.75c0-.825-.675-1.5-1.5-1.5m-3.75 12h-3V3.75h3zM3.75 3.75H6v10.5H3.75zM12 14.25V3.75h2.25v10.5z", clipRule: "evenodd" }) }), n[0] = e) : e = n[0], e;
750
+ return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ b("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 18 18", children: /* @__PURE__ */ b("path", { fill: "currentColor", fillRule: "evenodd", d: "M14.25 2.25H3.75c-.825 0-1.5.675-1.5 1.5v10.5c0 .825.675 1.5 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5V3.75c0-.825-.675-1.5-1.5-1.5m-3.75 12h-3V3.75h3zM3.75 3.75H6v10.5H3.75zM12 14.25V3.75h2.25v10.5z", clipRule: "evenodd" }) }), n[0] = e) : e = n[0], e;
730
751
  };
731
- function At(n) {
732
- const e = V(18), {
752
+ function zt(n) {
753
+ const e = U(18), {
733
754
  column: t
734
755
  } = n;
735
- let d;
736
- e[0] !== t.id ? (d = {
756
+ let f;
757
+ e[0] !== t.id ? (f = {
737
758
  id: t.id
738
- }, e[0] = t.id, e[1] = d) : d = e[1];
759
+ }, e[0] = t.id, e[1] = f) : f = e[1];
739
760
  const {
740
- attributes: h,
741
- listeners: a,
742
- setNodeRef: p,
743
- transform: I,
744
- transition: T,
761
+ attributes: p,
762
+ listeners: m,
763
+ setNodeRef: S,
764
+ transform: _,
765
+ transition: y,
745
766
  isDragging: o
746
- } = lt(d);
767
+ } = rt(f);
747
768
  let l;
748
- e[2] !== I ? (l = ct.Transform.toString(I ? {
749
- ...I,
769
+ e[2] !== _ ? (l = dt.Transform.toString(_ ? {
770
+ ..._,
750
771
  x: 0
751
- } : null), e[2] = I, e[3] = l) : l = e[3];
752
- const r = o ? 0.5 : 1, f = o ? "grabbing" : "grab";
753
- let c;
754
- e[4] !== l || e[5] !== r || e[6] !== f || e[7] !== T ? (c = {
772
+ } : null), e[2] = _, e[3] = l) : l = e[3];
773
+ const r = o ? 0.5 : 1, s = o ? "grabbing" : "grab";
774
+ let a;
775
+ e[4] !== l || e[5] !== r || e[6] !== s || e[7] !== y ? (a = {
755
776
  transform: l,
756
- transition: T,
777
+ transition: y,
757
778
  opacity: r,
758
- cursor: f
759
- }, e[4] = l, e[5] = r, e[6] = f, e[7] = T, e[8] = c) : c = e[8];
760
- const s = c;
779
+ cursor: s
780
+ }, e[4] = l, e[5] = r, e[6] = s, e[7] = y, e[8] = a) : a = e[8];
781
+ const u = a;
761
782
  let i;
762
783
  e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
763
784
  "&:focus-visible": {
764
- outline: Bt,
785
+ outline: Dt,
765
786
  outlineOffset: -2
766
787
  }
767
788
  }, e[9] = i) : i = e[9];
768
- let u;
769
- e[10] !== t.label ? (u = /* @__PURE__ */ g(Ce, { children: t.label }), e[10] = t.label, e[11] = u) : u = e[11];
770
- let m;
771
- return e[12] !== h || e[13] !== a || e[14] !== p || e[15] !== s || e[16] !== u ? (m = /* @__PURE__ */ g(xe, { ref: p, style: s, ...h, ...a, role: "menuitem", tabIndex: 0, sx: i, children: u }), e[12] = h, e[13] = a, e[14] = p, e[15] = s, e[16] = u, e[17] = m) : m = e[17], m;
789
+ let c;
790
+ e[10] !== t.label ? (c = /* @__PURE__ */ b(Ee, { children: t.label }), e[10] = t.label, e[11] = c) : c = e[11];
791
+ let d;
792
+ return e[12] !== p || e[13] !== m || e[14] !== S || e[15] !== u || e[16] !== c ? (d = /* @__PURE__ */ b(xe, { ref: S, style: u, ...p, ...m, role: "menuitem", tabIndex: 0, sx: i, children: c }), e[12] = p, e[13] = m, e[14] = S, e[15] = u, e[16] = c, e[17] = d) : d = e[17], d;
772
793
  }
773
- function Bt(n) {
794
+ function Dt(n) {
774
795
  return `2px solid ${n.palette.primary.main}`;
775
796
  }
776
- const _e = "change-column";
777
- function hn(n) {
778
- const e = V(46), {
797
+ const Te = "change-column";
798
+ function dn(n) {
799
+ const e = U(46), {
779
800
  id: t,
780
- labels: d,
781
- Icon: h,
782
- IconButtonProps: a,
783
- MenuProps: p
784
- } = n, [I, T] = me(null), {
801
+ labels: f,
802
+ Icon: p,
803
+ IconButtonProps: m,
804
+ MenuProps: S
805
+ } = n, [_, y] = ge(null), {
785
806
  columns: o
786
- } = q(t, Mt);
807
+ } = Q(t, Wt);
787
808
  let l;
788
- e[0] !== t ? (l = (H) => {
789
- const G = x.getWidget(t)?.columns;
790
- if (!G || G.length === 0)
791
- return H;
792
- const J = H, j = J.columns;
793
- if (!j || j.length === 0 || j.length === G.length && j.every((K, te) => K.id === G[te]?.id))
794
- return H;
795
- const le = new Map(j.map(Ft)), X = [];
796
- for (const K of G) {
797
- const te = le.get(K.id);
798
- te && (X.push(te), le.delete(K.id));
809
+ e[0] !== t ? (l = (M) => {
810
+ const R = g.getWidget(t)?.columns;
811
+ if (!R || R.length === 0)
812
+ return M;
813
+ const j = M, N = j.columns;
814
+ if (!N || N.length === 0 || N.length === R.length && N.every((q, X) => q.id === R[X]?.id))
815
+ return M;
816
+ const oe = new Map(N.map(Pt)), te = [];
817
+ for (const q of R) {
818
+ const X = oe.get(q.id);
819
+ X && (te.push(X), oe.delete(q.id));
799
820
  }
800
- for (const K of le.values())
801
- X.push(K);
802
- const ue = X.length === G.length && X.every((K, te) => K.id === G[te]?.id);
821
+ for (const q of oe.values())
822
+ te.push(q);
823
+ const ae = te.length === R.length && te.every((q, X) => q.id === R[X]?.id);
803
824
  return {
804
- ...J,
805
- columns: ue ? G : X
825
+ ...j,
826
+ columns: ae ? R : te
806
827
  };
807
828
  }, e[0] = t, e[1] = l) : l = e[1];
808
829
  const r = l;
809
- let f;
810
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = {
811
- coordinateGetter: rt
812
- }, e[2] = f) : f = e[2];
813
- const c = Xe(Se(et), Se(tt, f));
814
830
  let s;
815
- e[3] !== o ? (s = o?.map(Pt) ?? [], e[3] = o, e[4] = s) : s = e[4];
816
- const i = s;
817
- let u, m;
818
- e[5] !== t || e[6] !== r ? (u = () => (x.registerTool(t, {
819
- id: _e,
831
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = {
832
+ coordinateGetter: st
833
+ }, e[2] = s) : s = e[2];
834
+ const a = et(Se(tt), Se(nt, s));
835
+ let u;
836
+ e[3] !== o ? (u = o?.map(At) ?? [], e[3] = o, e[4] = u) : u = e[4];
837
+ const i = u;
838
+ let c, d;
839
+ e[5] !== t || e[6] !== r ? (c = () => (g.registerTool(t, {
840
+ id: Te,
820
841
  type: "config",
821
842
  order: 100,
822
843
  enabled: !0,
823
844
  fn: r
824
- }), () => x.unregisterTool(t, _e)), m = [t, r], e[5] = t, e[6] = r, e[7] = u, e[8] = m) : (u = e[7], m = e[8]), Z(u, m);
825
- let b;
826
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = (H) => {
827
- H.stopPropagation(), T(H.currentTarget);
828
- }, e[9] = b) : b = e[9];
829
- const C = b;
830
- let E;
831
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = () => {
832
- T(null);
833
- }, e[10] = E) : E = e[10];
834
- const _ = E;
835
- let D;
836
- e[11] !== o || e[12] !== t ? (D = (H) => {
845
+ }), () => g.unregisterTool(t, Te)), d = [t, r], e[5] = t, e[6] = r, e[7] = c, e[8] = d) : (c = e[7], d = e[8]), $(c, d);
846
+ let v;
847
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = (M) => {
848
+ M.stopPropagation(), y(M.currentTarget);
849
+ }, e[9] = v) : v = e[9];
850
+ const O = v;
851
+ let C;
852
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = () => {
853
+ y(null);
854
+ }, e[10] = C) : C = e[10];
855
+ const k = C;
856
+ let A;
857
+ e[11] !== o || e[12] !== t ? (A = (M) => {
837
858
  const {
838
- active: oe,
839
- over: G
840
- } = H;
841
- if (!G || oe.id === G.id || !o)
859
+ active: J,
860
+ over: R
861
+ } = M;
862
+ if (!R || J.id === R.id || !o)
842
863
  return;
843
- const J = o.findIndex((Q) => Q.id === oe.id), j = o.findIndex((Q) => Q.id === G.id);
844
- if (J !== -1 && j !== -1) {
845
- const Q = st(o, J, j);
846
- x.setWidget(t, {
847
- columns: Q
864
+ const j = o.findIndex((Y) => Y.id === J.id), N = o.findIndex((Y) => Y.id === R.id);
865
+ if (j !== -1 && N !== -1) {
866
+ const Y = it(o, j, N);
867
+ g.setWidget(t, {
868
+ columns: Y
848
869
  });
849
870
  }
850
- }, e[11] = o, e[12] = t, e[13] = D) : D = e[13];
851
- const L = D;
871
+ }, e[11] = o, e[12] = t, e[13] = A) : A = e[13];
872
+ const w = A;
852
873
  if (!o || o.length < 2)
853
874
  return null;
854
- const y = d?.tooltip ?? "Change column", v = !!I, w = d?.ariaLabel ?? y, $ = v ? "change-column-menu" : void 0, B = v ? "true" : void 0;
855
- let S;
856
- e[14] !== h ? (S = h ?? /* @__PURE__ */ g(We, { children: /* @__PURE__ */ g(zt, {}) }), e[14] = h, e[15] = S) : S = e[15];
857
- let O;
858
- e[16] !== a || e[17] !== v || e[18] !== $ || e[19] !== B || e[20] !== S || e[21] !== w ? (O = /* @__PURE__ */ g(N, { size: "small", "aria-label": w, "aria-controls": $, "aria-haspopup": "true", "aria-expanded": B, onClick: C, "data-active": v, sx: ae.trigger, ...a, children: S }), e[16] = a, e[17] = v, e[18] = $, e[19] = B, e[20] = S, e[21] = w, e[22] = O) : O = e[22];
859
- let k;
860
- e[23] !== O || e[24] !== y ? (k = /* @__PURE__ */ g(ee, { title: y, children: O }), e[23] = O, e[24] = y, e[25] = k) : k = e[25];
861
- let z, R, A;
862
- e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = {
875
+ const D = f?.tooltip ?? "Change column", x = !!_, E = f?.ariaLabel ?? D, z = x ? "change-column-menu" : void 0, T = x ? "true" : void 0;
876
+ let h;
877
+ e[14] !== p ? (h = p ?? /* @__PURE__ */ b(Ge, { children: /* @__PURE__ */ b(Ot, {}) }), e[14] = p, e[15] = h) : h = e[15];
878
+ let I;
879
+ e[16] !== m || e[17] !== x || e[18] !== z || e[19] !== T || e[20] !== h || e[21] !== E ? (I = /* @__PURE__ */ b(K, { size: "small", "aria-label": E, "aria-controls": z, "aria-haspopup": "true", "aria-expanded": T, onClick: O, "data-active": x, sx: re.trigger, ...m, children: h }), e[16] = m, e[17] = x, e[18] = z, e[19] = T, e[20] = h, e[21] = E, e[22] = I) : I = e[22];
880
+ let L;
881
+ e[23] !== I || e[24] !== D ? (L = /* @__PURE__ */ b(ee, { title: D, children: I }), e[23] = I, e[24] = D, e[25] = L) : L = e[25];
882
+ let P, W, B;
883
+ e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
863
884
  vertical: "bottom",
864
885
  horizontal: "right"
865
- }, R = {
886
+ }, W = {
866
887
  vertical: "top",
867
888
  horizontal: "right"
868
- }, A = {
889
+ }, B = {
869
890
  paper: {
870
891
  sx: {
871
892
  overflow: "hidden"
872
893
  }
873
894
  }
874
- }, e[26] = z, e[27] = R, e[28] = A) : (z = e[26], R = e[27], A = e[28]);
875
- let M;
876
- e[29] !== o ? (M = o.map(Rt), e[29] = o, e[30] = M) : M = e[30];
877
- let P;
878
- e[31] !== i || e[32] !== M ? (P = /* @__PURE__ */ g(it, { items: i, strategy: at, children: M }), e[31] = i, e[32] = M, e[33] = P) : P = e[33];
895
+ }, e[26] = P, e[27] = W, e[28] = B) : (P = e[26], W = e[27], B = e[28]);
896
+ let H;
897
+ e[29] !== o ? (H = o.map(wt), e[29] = o, e[30] = H) : H = e[30];
898
+ let Z;
899
+ e[31] !== i || e[32] !== H ? (Z = /* @__PURE__ */ b(at, { items: i, strategy: ct, children: H }), e[31] = i, e[32] = H, e[33] = Z) : Z = e[33];
879
900
  let F;
880
- e[34] !== p || e[35] !== I || e[36] !== v || e[37] !== P ? (F = /* @__PURE__ */ g(Ee, { id: "change-column-menu", anchorEl: I, open: v, onClose: _, anchorOrigin: z, transformOrigin: R, slotProps: A, ...p, children: P }), e[34] = p, e[35] = I, e[36] = v, e[37] = P, e[38] = F) : F = e[38];
881
- let W;
882
- e[39] !== L || e[40] !== c || e[41] !== F ? (W = /* @__PURE__ */ g(nt, { sensors: c, collisionDetection: ot, onDragEnd: L, children: F }), e[39] = L, e[40] = c, e[41] = F, e[42] = W) : W = e[42];
883
- let U;
884
- return e[43] !== k || e[44] !== W ? (U = /* @__PURE__ */ ne(he, { children: [
885
- k,
886
- W
887
- ] }), e[43] = k, e[44] = W, e[45] = U) : U = e[45], U;
901
+ e[34] !== S || e[35] !== _ || e[36] !== x || e[37] !== Z ? (F = /* @__PURE__ */ b(Ce, { id: "change-column-menu", anchorEl: _, open: x, onClose: k, anchorOrigin: P, transformOrigin: W, slotProps: B, ...S, children: Z }), e[34] = S, e[35] = _, e[36] = x, e[37] = Z, e[38] = F) : F = e[38];
902
+ let G;
903
+ e[39] !== w || e[40] !== a || e[41] !== F ? (G = /* @__PURE__ */ b(ot, { sensors: a, collisionDetection: lt, onDragEnd: w, children: F }), e[39] = w, e[40] = a, e[41] = F, e[42] = G) : G = e[42];
904
+ let V;
905
+ return e[43] !== L || e[44] !== G ? (V = /* @__PURE__ */ ne(he, { children: [
906
+ L,
907
+ G
908
+ ] }), e[43] = L, e[44] = G, e[45] = V) : V = e[45], V;
888
909
  }
889
- function Rt(n) {
890
- return /* @__PURE__ */ g(At, { column: n }, n.id);
910
+ function wt(n) {
911
+ return /* @__PURE__ */ b(zt, { column: n }, n.id);
891
912
  }
892
- function Pt(n) {
913
+ function At(n) {
893
914
  return n.id;
894
915
  }
895
- function Ft(n) {
916
+ function Pt(n) {
896
917
  return [n.id, n];
897
918
  }
898
- function Mt(n) {
919
+ function Wt(n) {
899
920
  return {
900
921
  columns: n?.columns
901
922
  };
902
923
  }
903
- const ye = {
924
+ const _e = {
904
925
  container: {
905
926
  display: "flex",
906
927
  alignItems: "center",
@@ -913,151 +934,145 @@ const ye = {
913
934
  background: (n) => n.palette.primary.relatedLight
914
935
  }
915
936
  }
916
- }, ie = "brush-toggle";
917
- function pn(n) {
918
- const e = V(30), {
937
+ }, me = "brush-toggle";
938
+ function un(n) {
939
+ const e = U(32), {
919
940
  id: t,
920
- onBrushSelected: d,
921
- labels: h,
922
- Icon: a,
923
- IconButtonProps: p
941
+ onBrushSelected: f,
942
+ labels: p,
943
+ Icon: m,
944
+ IconButtonProps: S
924
945
  } = n;
925
- let I;
926
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = {
946
+ let _;
947
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = {
927
948
  dataIndex: [],
928
949
  seriesIndex: 0
929
- }, e[0] = I) : I = e[0];
930
- const T = se(I), {
950
+ }, e[0] = _) : _ = e[0];
951
+ const y = le(_), {
931
952
  brush: o
932
- } = q(t, Vt);
953
+ } = Q(t, $t);
933
954
  let l;
934
- e[1] !== t ? (l = (S) => {
935
- x.setToolEnabled(t, ie, S);
936
- }, e[1] = t, e[2] = l) : l = e[2];
937
- const r = l;
938
- let f;
939
- e[3] !== o || e[4] !== d || e[5] !== r ? (f = () => {
940
- const S = !o;
941
- r(S), S && d?.({
955
+ e[1] !== o || e[2] !== t || e[3] !== f ? (l = () => {
956
+ const h = !o;
957
+ g.setWidget(t, {
958
+ brush: h
959
+ }), h && f?.({
942
960
  dataIndex: [],
943
961
  seriesIndex: 0
944
962
  });
945
- }, e[3] = o, e[4] = d, e[5] = r, e[6] = f) : f = e[6];
946
- const c = f;
947
- let s, i;
948
- e[7] !== o || e[8] !== t ? (s = () => {
963
+ }, e[1] = o, e[2] = t, e[3] = f, e[4] = l) : l = e[4];
964
+ const r = l;
965
+ let s, a;
966
+ e[5] !== o || e[6] !== t ? (s = () => {
949
967
  if (!o)
950
968
  return;
951
- const S = x.getWidget(t)?.instance?.current;
952
- if (!S)
969
+ const h = g.getWidget(t)?.instance?.current;
970
+ if (!h)
953
971
  return;
954
- const O = () => {
955
- const k = be();
956
- S.dispatchAction({
972
+ const I = () => {
973
+ const L = pe();
974
+ h.dispatchAction({
957
975
  type: "takeGlobalCursor",
958
976
  key: "brush",
959
977
  brushOption: {
960
- brushType: k.brush.brushType,
961
- brushMode: k.brush.brushMode
978
+ brushType: L.brush.brushType,
979
+ brushMode: L.brush.brushMode
962
980
  }
963
981
  });
964
982
  };
965
- return O(), S.on("rendered", O), () => {
966
- S.off("rendered", O);
983
+ return I(), h.on("rendered", I), () => {
984
+ h.off("rendered", I);
967
985
  };
968
- }, i = [o, t], e[7] = o, e[8] = t, e[9] = s, e[10] = i) : (s = e[9], i = e[10]), Z(s, i);
986
+ }, a = [o, t], e[5] = o, e[6] = t, e[7] = s, e[8] = a) : (s = e[7], a = e[8]), $(s, a);
969
987
  let u;
970
- e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = (S) => {
971
- const k = S.batch?.flatMap(Zt) ?? [];
972
- if (!k.length) {
973
- T.current = {
988
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = (h) => {
989
+ const L = h.batch?.flatMap(Rt) ?? [];
990
+ if (!L.length) {
991
+ y.current = {
974
992
  dataIndex: [],
975
993
  seriesIndex: 0
976
994
  };
977
995
  return;
978
996
  }
979
- const z = k[0]?.seriesIndex ?? 0, R = Array.from(new Set(k.filter((A) => A.seriesIndex === void 0 || A.seriesIndex === z).flatMap(Gt)));
980
- T.current = {
981
- dataIndex: R,
982
- seriesIndex: z
997
+ const P = L[0]?.seriesIndex ?? 0, W = Array.from(new Set(L.filter((B) => B.seriesIndex === void 0 || B.seriesIndex === P).flatMap(Bt)));
998
+ y.current = {
999
+ dataIndex: W,
1000
+ seriesIndex: P
983
1001
  };
984
- }, e[11] = u) : u = e[11];
985
- const m = u;
986
- let b;
987
- e[12] !== d || e[13] !== r ? (b = () => {
988
- d?.(T.current), r(!1);
989
- }, e[12] = d, e[13] = r, e[14] = b) : b = e[14];
990
- const C = b;
991
- let E, _;
992
- e[15] !== C || e[16] !== t ? (E = () => {
993
- const O = x.getWidget(t)?.registeredTools?.find(Wt)?.enabled ?? !1;
994
- return x.registerTool(t, {
995
- id: ie,
996
- type: "config",
997
- order: 25,
998
- enabled: O,
999
- fn: (k) => {
1000
- const z = k, R = z.option, A = z.onEvents ?? {}, M = be(), P = {
1001
- ...A,
1002
- brushSelected: m,
1003
- brushEnd: C
1004
- };
1005
- return {
1006
- ...z,
1007
- option: {
1008
- ...R,
1009
- ...M
1010
- },
1011
- onEvents: P
1012
- };
1013
- }
1014
- }), () => x.unregisterTool(t, ie);
1015
- }, _ = [t, m, C], e[15] = C, e[16] = t, e[17] = E, e[18] = _) : (E = e[17], _ = e[18]), Z(E, _);
1016
- const D = h?.enable ?? "Enable brush selection", L = h?.disable ?? "Disable brush selection", y = o ? L : D, v = h?.ariaLabel ?? y;
1017
- let w;
1018
- e[19] !== a ? (w = a ?? /* @__PURE__ */ g(Ye, {}), e[19] = a, e[20] = w) : w = e[20];
1019
- let $;
1020
- e[21] !== p || e[22] !== o || e[23] !== c || e[24] !== v || e[25] !== w ? ($ = /* @__PURE__ */ g(N, { size: "small", "aria-label": v, onClick: c, sx: ye.trigger, "data-active": o, ...p, children: w }), e[21] = p, e[22] = o, e[23] = c, e[24] = v, e[25] = w, e[26] = $) : $ = e[26];
1021
- let B;
1022
- return e[27] !== $ || e[28] !== y ? (B = /* @__PURE__ */ g(ke, { sx: ye.container, children: /* @__PURE__ */ g(ee, { title: y, children: $ }) }), e[27] = $, e[28] = y, e[29] = B) : B = e[29], B;
1023
- }
1024
- function Wt(n) {
1025
- return n.id === ie;
1002
+ }, e[9] = u) : u = e[9];
1003
+ const i = u;
1004
+ let c;
1005
+ e[10] !== t || e[11] !== f ? (c = () => {
1006
+ f?.(y.current), g.setWidget(t, {
1007
+ brush: !1
1008
+ });
1009
+ }, e[10] = t, e[11] = f, e[12] = c) : c = e[12];
1010
+ const d = c;
1011
+ let v, O;
1012
+ e[13] !== d || e[14] !== t ? (v = () => (g.registerTool(t, {
1013
+ id: me,
1014
+ type: "config",
1015
+ order: 25,
1016
+ enabled: !1,
1017
+ fn: (h) => {
1018
+ const I = h, L = I.option, P = I.onEvents ?? {}, W = pe(), B = {
1019
+ ...P,
1020
+ brushSelected: i,
1021
+ brushEnd: d
1022
+ };
1023
+ return {
1024
+ ...I,
1025
+ option: {
1026
+ ...L,
1027
+ ...W
1028
+ },
1029
+ onEvents: B
1030
+ };
1031
+ }
1032
+ }), () => g.unregisterTool(t, me)), O = [t, i, d], e[13] = d, e[14] = t, e[15] = v, e[16] = O) : (v = e[15], O = e[16]), $(v, O);
1033
+ let C, k;
1034
+ e[17] !== o || e[18] !== t ? (k = () => {
1035
+ g.setToolEnabled(t, me, o);
1036
+ }, C = [t, o], e[17] = o, e[18] = t, e[19] = C, e[20] = k) : (C = e[19], k = e[20]), $(k, C);
1037
+ const A = p?.enable ?? "Enable brush selection", w = p?.disable ?? "Disable brush selection", D = o ? w : A, x = p?.ariaLabel ?? D;
1038
+ let E;
1039
+ e[21] !== m ? (E = m ?? /* @__PURE__ */ b(qe, {}), e[21] = m, e[22] = E) : E = e[22];
1040
+ let z;
1041
+ e[23] !== S || e[24] !== o || e[25] !== r || e[26] !== x || e[27] !== E ? (z = /* @__PURE__ */ b(K, { size: "small", "aria-label": x, onClick: r, sx: _e.trigger, "data-active": o, ...S, children: E }), e[23] = S, e[24] = o, e[25] = r, e[26] = x, e[27] = E, e[28] = z) : z = e[28];
1042
+ let T;
1043
+ return e[29] !== z || e[30] !== D ? (T = /* @__PURE__ */ b(ke, { sx: _e.container, children: /* @__PURE__ */ b(ee, { title: D, children: z }) }), e[29] = z, e[30] = D, e[31] = T) : T = e[31], T;
1026
1044
  }
1027
- function Gt(n) {
1045
+ function Bt(n) {
1028
1046
  return n.dataIndex ?? [];
1029
1047
  }
1030
- function Zt(n) {
1048
+ function Rt(n) {
1031
1049
  return n.selected ?? [];
1032
1050
  }
1033
- function Vt(n) {
1051
+ function $t(n) {
1034
1052
  return {
1035
- brush: n?.registeredTools?.find(Ht)?.enabled
1053
+ brush: n?.brush ?? !1
1036
1054
  };
1037
1055
  }
1038
- function Ht(n) {
1039
- return n.id === ie;
1040
- }
1041
1056
  export {
1042
- ie as BRUSH_TOGGLE_TOOL_ID,
1043
- pn as BrushToggle,
1044
- _e as CHANGE_COLUMN_TOOL_ID,
1045
- hn as ChangeColumn,
1046
- an as Download,
1047
- sn as FullScreen,
1048
- ge as LOCK_SELECTION_TOOL_ID,
1049
- fn as LockSelection,
1050
- re as RELATIVE_DATA_CONFIG_TOOL_ID,
1051
- fe as RELATIVE_DATA_TOOL_ID,
1052
- cn as RelativeData,
1053
- de as SEARCHER_TOOL_ID,
1054
- Ie as STACK_TOGGLE_TOOL_ID,
1055
- mn as Searcher,
1056
- gn as SearcherToggle,
1057
- un as StackToggle,
1058
- Y as ZOOM_TOGGLE_TOOL_ID,
1059
- dn as ZoomToggle,
1060
- Tn as downloadToCSV,
1061
- vn as downloadToPNG
1057
+ me as BRUSH_TOGGLE_TOOL_ID,
1058
+ un as BrushToggle,
1059
+ Te as CHANGE_COLUMN_TOOL_ID,
1060
+ dn as ChangeColumn,
1061
+ nn as Download,
1062
+ tn as FullScreen,
1063
+ ie as LOCK_SELECTION_TOOL_ID,
1064
+ sn as LockSelection,
1065
+ Ie as RELATIVE_DATA_CONFIG_TOOL_ID,
1066
+ ce as RELATIVE_DATA_TOOL_ID,
1067
+ on as RelativeData,
1068
+ fe as SEARCHER_TOOL_ID,
1069
+ ue as STACK_TOGGLE_TOOL_ID,
1070
+ an as Searcher,
1071
+ cn as SearcherToggle,
1072
+ rn as StackToggle,
1073
+ de as ZOOM_TOGGLE_TOOL_ID,
1074
+ ln as ZoomToggle,
1075
+ gn as downloadToCSV,
1076
+ hn as downloadToPNG
1062
1077
  };
1063
1078
  //# sourceMappingURL=actions.js.map