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