@carto/ps-react-ui 4.9.1 → 4.11.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 (207) hide show
  1. package/dist/category-Dnd2_j0x.js +719 -0
  2. package/dist/category-Dnd2_j0x.js.map +1 -0
  3. package/dist/change-column-DjjwoPt1.js +1143 -0
  4. package/dist/change-column-DjjwoPt1.js.map +1 -0
  5. package/dist/chat.js +1507 -0
  6. package/dist/chat.js.map +1 -0
  7. package/dist/components.js +122 -120
  8. package/dist/components.js.map +1 -1
  9. package/dist/copy-button-DGL1tyli.js +26 -0
  10. package/dist/copy-button-DGL1tyli.js.map +1 -0
  11. package/dist/{data-zoom-layout-0QSptXG_.js → data-zoom-layout-CkVnm6ej.js} +3 -3
  12. package/dist/{data-zoom-layout-0QSptXG_.js.map → data-zoom-layout-CkVnm6ej.js.map} +1 -1
  13. package/dist/{download-config-CzmjOT2T.js → download-config-oJIFZ2WC.js} +9 -8
  14. package/dist/{download-config-CzmjOT2T.js.map → download-config-oJIFZ2WC.js.map} +1 -1
  15. package/dist/{png-item-CS4z1iSH.js → png-item-BE9uEqlD.js} +2 -2
  16. package/dist/png-item-BE9uEqlD.js.map +1 -0
  17. package/dist/{spread-Y9R1f5dm.js → spread-DYNpzgh_.js} +10 -11
  18. package/dist/{spread-Y9R1f5dm.js.map → spread-DYNpzgh_.js.map} +1 -1
  19. package/dist/{table-CQCAnDLb.js → table-C9IMbTr0.js} +50 -53
  20. package/dist/table-C9IMbTr0.js.map +1 -0
  21. package/dist/types/chat/bubbles/chat-error-message.d.ts +2 -0
  22. package/dist/types/chat/bubbles/chat-suggestion-button.d.ts +2 -0
  23. package/dist/types/chat/bubbles/chat-user-message.d.ts +2 -0
  24. package/dist/types/chat/bubbles/index.d.ts +4 -0
  25. package/dist/types/chat/const.d.ts +4 -0
  26. package/dist/types/chat/containers/chat-content.d.ts +2 -0
  27. package/dist/types/chat/containers/chat-footer.d.ts +2 -0
  28. package/dist/types/chat/containers/chat-header.d.ts +2 -0
  29. package/dist/types/chat/containers/chat-starter.d.ts +2 -0
  30. package/dist/types/chat/containers/index.d.ts +4 -0
  31. package/dist/types/chat/containers/styles.d.ts +93 -0
  32. package/dist/types/chat/feedback/chat-loader.d.ts +2 -0
  33. package/dist/types/chat/feedback/chat-rating-action.d.ts +2 -0
  34. package/dist/types/chat/feedback/chat-thinking.d.ts +2 -0
  35. package/dist/types/chat/feedback/chat-tool-code-area.d.ts +2 -0
  36. package/dist/types/chat/feedback/chat-tool-full-view-dialog.d.ts +2 -0
  37. package/dist/types/chat/feedback/chat-tool-group.d.ts +2 -0
  38. package/dist/types/chat/feedback/chat-tool-trace.d.ts +3 -0
  39. package/dist/types/chat/feedback/get-tool-label.d.ts +2 -0
  40. package/dist/types/chat/feedback/index.d.ts +8 -0
  41. package/dist/types/chat/feedback/styles.d.ts +211 -0
  42. package/dist/types/chat/index.d.ts +20 -0
  43. package/dist/types/chat/types.d.ts +184 -0
  44. package/dist/types/chat/use-typewriter.d.ts +30 -0
  45. package/dist/types/components/copy-button/copy-button.d.ts +2 -0
  46. package/dist/types/components/copy-button/types.d.ts +6 -0
  47. package/dist/types/components/index.d.ts +2 -0
  48. package/dist/types/widgets/actions/brush-toggle/style.d.ts +1 -1
  49. package/dist/types/widgets/actions/shared/styles.d.ts +1 -1
  50. package/dist/types/widgets/actions/zoom-toggle/style.d.ts +1 -1
  51. package/dist/types/widgets/echart/types.d.ts +1 -1
  52. package/dist/types/widgets/toolbar-actions/styles.d.ts +1 -1
  53. package/dist/types/widgets-v2/actions/brush-toggle/style.d.ts +1 -1
  54. package/dist/types/widgets-v2/actions/change-column/style.d.ts +1 -1
  55. package/dist/types/widgets-v2/actions/fullscreen/style.d.ts +1 -1
  56. package/dist/types/widgets-v2/actions/index.d.ts +1 -0
  57. package/dist/types/widgets-v2/actions/lock-selection/style.d.ts +1 -1
  58. package/dist/types/widgets-v2/actions/relative-data/style.d.ts +1 -1
  59. package/dist/types/widgets-v2/actions/searcher/style.d.ts +1 -1
  60. package/dist/types/widgets-v2/actions/show-all/index.d.ts +2 -0
  61. package/dist/types/widgets-v2/actions/show-all/labels.d.ts +5 -0
  62. package/dist/types/widgets-v2/actions/show-all/show-all.d.ts +33 -0
  63. package/dist/types/widgets-v2/actions/show-all/style.d.ts +8 -0
  64. package/dist/types/widgets-v2/actions/stack-toggle/style.d.ts +1 -1
  65. package/dist/types/widgets-v2/actions/zoom-toggle/style.d.ts +1 -1
  66. package/dist/types/widgets-v2/category/category-ui.d.ts +9 -2
  67. package/dist/types/widgets-v2/category/category.d.ts +9 -2
  68. package/dist/types/widgets-v2/category/components/category-row-other.d.ts +19 -6
  69. package/dist/types/widgets-v2/category/style.d.ts +21 -2
  70. package/dist/types/widgets-v2/category/types.d.ts +2 -0
  71. package/dist/types/widgets-v2/index.d.ts +3 -2
  72. package/dist/types/widgets-v2/selection-summary/labels.d.ts +7 -2
  73. package/dist/types/widgets-v2/selection-summary/selection-summary.d.ts +13 -6
  74. package/dist/types/widgets-v2/selection-summary/style.d.ts +15 -0
  75. package/dist/widgets/actions.js +115 -114
  76. package/dist/widgets/actions.js.map +1 -1
  77. package/dist/widgets/bar.js +1 -1
  78. package/dist/widgets/category.js +9 -8
  79. package/dist/widgets/category.js.map +1 -1
  80. package/dist/widgets/formula.js +11 -10
  81. package/dist/widgets/formula.js.map +1 -1
  82. package/dist/widgets/histogram.js +7 -6
  83. package/dist/widgets/histogram.js.map +1 -1
  84. package/dist/widgets/markdown.js +9 -8
  85. package/dist/widgets/markdown.js.map +1 -1
  86. package/dist/widgets/pie.js +1 -1
  87. package/dist/widgets/scatterplot.js +1 -1
  88. package/dist/widgets/spread.js +9 -8
  89. package/dist/widgets/spread.js.map +1 -1
  90. package/dist/widgets/table.js +17 -16
  91. package/dist/widgets/table.js.map +1 -1
  92. package/dist/widgets/timeseries.js +1 -1
  93. package/dist/widgets/utils.js +1 -1
  94. package/dist/widgets/wrapper.js +3 -2
  95. package/dist/widgets/wrapper.js.map +1 -1
  96. package/dist/widgets-v2/actions.js +41 -37
  97. package/dist/widgets-v2/bar.js +9 -10
  98. package/dist/widgets-v2/bar.js.map +1 -1
  99. package/dist/widgets-v2/category.js +25 -26
  100. package/dist/widgets-v2/category.js.map +1 -1
  101. package/dist/widgets-v2/formula.js +3 -3
  102. package/dist/widgets-v2/histogram.js +11 -13
  103. package/dist/widgets-v2/histogram.js.map +1 -1
  104. package/dist/widgets-v2/markdown.js +26 -27
  105. package/dist/widgets-v2/markdown.js.map +1 -1
  106. package/dist/widgets-v2/pie.js +8 -10
  107. package/dist/widgets-v2/pie.js.map +1 -1
  108. package/dist/widgets-v2/scatterplot.js +10 -12
  109. package/dist/widgets-v2/scatterplot.js.map +1 -1
  110. package/dist/widgets-v2/spread.js +15 -16
  111. package/dist/widgets-v2/spread.js.map +1 -1
  112. package/dist/widgets-v2/table.js +39 -40
  113. package/dist/widgets-v2/table.js.map +1 -1
  114. package/dist/widgets-v2/timeseries.js +9 -11
  115. package/dist/widgets-v2/timeseries.js.map +1 -1
  116. package/dist/widgets-v2/utils.js +1 -1
  117. package/dist/widgets-v2.js +284 -282
  118. package/dist/widgets-v2.js.map +1 -1
  119. package/package.json +5 -1
  120. package/src/chat/bubbles/chat-agent-message.test.tsx +30 -0
  121. package/src/chat/bubbles/chat-agent-message.tsx +11 -0
  122. package/src/chat/bubbles/chat-error-message.test.tsx +40 -0
  123. package/src/chat/bubbles/chat-error-message.tsx +47 -0
  124. package/src/chat/bubbles/chat-suggestion-button.test.tsx +24 -0
  125. package/src/chat/bubbles/chat-suggestion-button.tsx +27 -0
  126. package/src/chat/bubbles/chat-user-message.test.tsx +27 -0
  127. package/src/chat/bubbles/chat-user-message.tsx +27 -0
  128. package/src/chat/bubbles/index.ts +4 -0
  129. package/src/chat/bubbles/styles.ts +148 -0
  130. package/src/chat/const.ts +4 -0
  131. package/src/chat/containers/chat-content.test.tsx +269 -0
  132. package/src/chat/containers/chat-content.tsx +142 -0
  133. package/src/chat/containers/chat-footer.test.tsx +34 -0
  134. package/src/chat/containers/chat-footer.tsx +78 -0
  135. package/src/chat/containers/chat-header.test.tsx +28 -0
  136. package/src/chat/containers/chat-header.tsx +29 -0
  137. package/src/chat/containers/chat-starter.test.tsx +32 -0
  138. package/src/chat/containers/chat-starter.tsx +75 -0
  139. package/src/chat/containers/index.ts +4 -0
  140. package/src/chat/containers/styles.ts +96 -0
  141. package/src/chat/feedback/chat-actions-container.test.tsx +64 -0
  142. package/src/chat/feedback/chat-actions-container.tsx +7 -0
  143. package/src/chat/feedback/chat-loader.test.tsx +10 -0
  144. package/src/chat/feedback/chat-loader.tsx +31 -0
  145. package/src/chat/feedback/chat-rating-action.tsx +43 -0
  146. package/src/chat/feedback/chat-thinking.test.tsx +15 -0
  147. package/src/chat/feedback/chat-thinking.tsx +23 -0
  148. package/src/chat/feedback/chat-tool-code-area.test.tsx +23 -0
  149. package/src/chat/feedback/chat-tool-code-area.tsx +71 -0
  150. package/src/chat/feedback/chat-tool-full-view-dialog.test.tsx +39 -0
  151. package/src/chat/feedback/chat-tool-full-view-dialog.tsx +121 -0
  152. package/src/chat/feedback/chat-tool-group.test.tsx +84 -0
  153. package/src/chat/feedback/chat-tool-group.tsx +156 -0
  154. package/src/chat/feedback/chat-tool-trace.test.tsx +81 -0
  155. package/src/chat/feedback/chat-tool-trace.tsx +192 -0
  156. package/src/chat/feedback/get-tool-label.test.tsx +91 -0
  157. package/src/chat/feedback/get-tool-label.ts +13 -0
  158. package/src/chat/feedback/index.ts +8 -0
  159. package/src/chat/feedback/styles.ts +229 -0
  160. package/src/chat/index.ts +59 -0
  161. package/src/chat/types.ts +215 -0
  162. package/src/chat/use-typewriter.test.tsx +38 -0
  163. package/src/chat/use-typewriter.ts +82 -0
  164. package/src/components/copy-button/copy-button.test.tsx +41 -0
  165. package/src/components/copy-button/copy-button.tsx +31 -0
  166. package/src/components/copy-button/types.ts +10 -0
  167. package/src/components/index.ts +3 -0
  168. package/src/widgets/echart/types.ts +1 -1
  169. package/src/widgets-v2/actions/brush-toggle/brush-toggle.tsx +1 -1
  170. package/src/widgets-v2/actions/change-column/sortable-column-item.tsx +1 -1
  171. package/src/widgets-v2/actions/download/download.tsx +1 -1
  172. package/src/widgets-v2/actions/download/icons.tsx +1 -1
  173. package/src/widgets-v2/actions/fullscreen/fullscreen.tsx +3 -3
  174. package/src/widgets-v2/actions/index.ts +8 -0
  175. package/src/widgets-v2/actions/lock-selection/lock-selection.tsx +2 -2
  176. package/src/widgets-v2/actions/relative-data/relative-data.tsx +1 -1
  177. package/src/widgets-v2/actions/searcher/searcher-toggle.tsx +1 -1
  178. package/src/widgets-v2/actions/searcher/searcher.tsx +2 -2
  179. package/src/widgets-v2/actions/show-all/index.ts +7 -0
  180. package/src/widgets-v2/actions/show-all/labels.ts +8 -0
  181. package/src/widgets-v2/actions/show-all/show-all.test.tsx +50 -0
  182. package/src/widgets-v2/actions/show-all/show-all.tsx +72 -0
  183. package/src/widgets-v2/actions/show-all/style.ts +8 -0
  184. package/src/widgets-v2/actions/stack-toggle/stack-toggle.tsx +1 -1
  185. package/src/widgets-v2/actions/zoom-toggle/zoom-toggle.tsx +1 -1
  186. package/src/widgets-v2/category/category-ui.test.tsx +26 -10
  187. package/src/widgets-v2/category/category-ui.tsx +13 -3
  188. package/src/widgets-v2/category/category.test.tsx +4 -4
  189. package/src/widgets-v2/category/category.tsx +10 -1
  190. package/src/widgets-v2/category/components/category-row-other.test.tsx +36 -7
  191. package/src/widgets-v2/category/components/category-row-other.tsx +64 -13
  192. package/src/widgets-v2/category/style.ts +35 -4
  193. package/src/widgets-v2/category/types.ts +2 -0
  194. package/src/widgets-v2/index.ts +3 -0
  195. package/src/widgets-v2/selection-summary/labels.ts +8 -4
  196. package/src/widgets-v2/selection-summary/selection-summary.test.tsx +15 -9
  197. package/src/widgets-v2/selection-summary/selection-summary.tsx +42 -22
  198. package/src/widgets-v2/selection-summary/style.ts +15 -0
  199. package/src/widgets-v2/table/table-ui.tsx +4 -4
  200. package/src/widgets-v2/toolbox/toolbox.tsx +1 -1
  201. package/src/widgets-v2/wrapper/widget-wrapper.tsx +1 -1
  202. package/dist/category-DwaeYjpX.js +0 -656
  203. package/dist/category-DwaeYjpX.js.map +0 -1
  204. package/dist/change-column-B4IT0rh6.js +0 -1110
  205. package/dist/change-column-B4IT0rh6.js.map +0 -1
  206. package/dist/png-item-CS4z1iSH.js.map +0 -1
  207. package/dist/table-CQCAnDLb.js.map +0 -1
@@ -1,1110 +0,0 @@
1
- import { jsx as S, jsxs as ee, Fragment as fe } from "react/jsx-runtime";
2
- import { c as M } from "react/compiler-runtime";
3
- import { useRef as Ce, useState as Y, useEffect as ae, useLayoutEffect as Te } from "react";
4
- import { IconButton as j, InputAdornment as de, TextField as ke, useTheme as De, CircularProgress as ze, MenuItem as ye, ListItemIcon as Oe, ListItemText as Ee, Menu as xe, Box as we, Typography as Fe, DialogTitle as Pe, DialogContent as Re, Dialog as $e, SvgIcon as Be } from "@mui/material";
5
- import Ae from "@mui/icons-material/Search";
6
- import Me from "@mui/icons-material/Clear";
7
- import { debounce as He } from "@carto/ps-utils";
8
- import { u as W } from "./widget-context-DTGO0Yta.js";
9
- import { v as ne, i as re, h as Ne } from "./widget-store-registry-_W4Z4xp-.js";
10
- import "zustand";
11
- import "./lasso-tool-CDFj4zKY.js";
12
- import "./cjs-D4KH3azB.js";
13
- import { T as Z } from "./tooltip-BDnrRKrp.js";
14
- import "@mui/icons-material";
15
- import { a as ie, u as Ue, b as je } from "./use-transform-DXPN3nY7.js";
16
- import Ge from "@mui/icons-material/StackedBarChart";
17
- import "zustand/vanilla";
18
- import "zustand/middleware";
19
- import "zustand/react/shallow";
20
- import We from "@mui/icons-material/ZoomIn";
21
- import { c as Ze } from "./transforms-Cdx4fkU5.js";
22
- import Ke from "@mui/icons-material/HighlightAlt";
23
- import Ve from "@mui/icons-material/Percent";
24
- import Xe from "@mui/icons-material/FileDownload";
25
- import { b as Ye } from "./exports-Cx-f6m6U.js";
26
- import { createPortal as qe } from "react-dom";
27
- import Je from "@mui/icons-material/Fullscreen";
28
- import Qe from "@mui/icons-material/FullscreenExit";
29
- import et from "@mui/icons-material/Close";
30
- import tt from "@mui/icons-material/Lock";
31
- import ot from "@mui/icons-material/LockOpen";
32
- import { useSensors as lt, useSensor as ue, PointerSensor as nt, KeyboardSensor as rt, DndContext as it, closestCenter as st } from "@dnd-kit/core";
33
- import { useSortable as at, sortableKeyboardCoordinates as ct, arrayMove as ft, SortableContext as dt, verticalListSortingStrategy as ut } from "@dnd-kit/sortable";
34
- import { CSS as gt } from "@dnd-kit/utilities";
35
- import mt from "@mui/icons-material/DragIndicator";
36
- function pt(t, e) {
37
- if (!e) return t;
38
- const l = e.toLowerCase();
39
- return Array.isArray(t) ? t.map((s) => Array.isArray(s) ? s.filter((c) => {
40
- if (c == null) return !1;
41
- if (typeof c == "object" && "name" in c) {
42
- const f = c.name;
43
- return (f == null ? "" : ge(f)).toLowerCase().includes(l);
44
- }
45
- return ge(c).toLowerCase().includes(l);
46
- }) : s) : t;
47
- }
48
- function ge(t) {
49
- return typeof t == "string" ? t : typeof t == "number" || typeof t == "boolean" ? String(t) : "";
50
- }
51
- const Ie = {
52
- toggle: "Search",
53
- placeholder: "Search…",
54
- clearAriaLabel: "Clear search",
55
- noResults: "No matches."
56
- }, ce = {
57
- toggle: {
58
- p: 0.5,
59
- "& .MuiSvgIcon-root": {
60
- fontSize: 20
61
- }
62
- },
63
- toggleActive: {
64
- background: (t) => t.palette.primary.relatedLight
65
- },
66
- input: {
67
- width: "100%",
68
- mb: 1
69
- }
70
- }, ht = {
71
- id: "searcher",
72
- type: "data",
73
- order: 20,
74
- disables: ["lock-selection"]
75
- };
76
- function Fo(t) {
77
- const e = M(20), {
78
- labels: l,
79
- icon: s,
80
- iconProps: c,
81
- initialEnabled: f
82
- } = t, b = s === void 0 ? Ae : s, A = f === void 0 ? !1 : f, x = W();
83
- let y;
84
- e[0] !== l ? (y = {
85
- ...Ie,
86
- ...l
87
- }, e[0] = l, e[1] = y) : y = e[1];
88
- const u = y, i = ne(x, bt);
89
- let m;
90
- e[2] !== i ? (m = (E) => pt(E, i), e[2] = i, e[3] = m) : m = e[3];
91
- const v = m;
92
- let o;
93
- e[4] !== A ? (o = {
94
- initialEnabled: A
95
- }, e[4] = A, e[5] = o) : o = e[5];
96
- const {
97
- enabled: p,
98
- toggle: g
99
- } = ie(x, ht, v, o), r = p && ce.toggleActive;
100
- let a;
101
- e[6] !== r ? (a = {
102
- ...ce.toggle,
103
- ...r
104
- }, e[6] = r, e[7] = a) : a = e[7];
105
- let n;
106
- e[8] !== b || e[9] !== c ? (n = /* @__PURE__ */ S(b, { fontSize: "small", ...c }), e[8] = b, e[9] = c, e[10] = n) : n = e[10];
107
- let d;
108
- e[11] !== p || e[12] !== u.toggle || e[13] !== a || e[14] !== n || e[15] !== g ? (d = /* @__PURE__ */ S(j, { size: "small", "aria-label": u.toggle, "aria-pressed": p, onClick: g, sx: a, children: n }), e[11] = p, e[12] = u.toggle, e[13] = a, e[14] = n, e[15] = g, e[16] = d) : d = e[16];
109
- let h;
110
- return e[17] !== u.toggle || e[18] !== d ? (h = /* @__PURE__ */ S(Z, { title: u.toggle, children: d }), e[17] = u.toggle, e[18] = d, e[19] = h) : h = e[19], h;
111
- }
112
- function bt(t) {
113
- return t.transformStates.searcher?.searchText ?? "";
114
- }
115
- function me(t, e) {
116
- re(t).setState((l) => ({
117
- transformStates: {
118
- ...l.transformStates,
119
- searcher: {
120
- enabled: l.transformStates.searcher?.enabled ?? !1,
121
- ...l.transformStates.searcher,
122
- searchText: e
123
- }
124
- }
125
- }));
126
- }
127
- const St = 300;
128
- function Po(t) {
129
- const e = M(26), {
130
- labels: l,
131
- debounceMs: s
132
- } = t, c = s === void 0 ? St : s, f = W();
133
- let b;
134
- e[0] !== l ? (b = {
135
- ...Ie,
136
- ...l
137
- }, e[0] = l, e[1] = b) : b = e[1];
138
- const A = b, x = ne(f, vt), y = Ce(null);
139
- let u;
140
- e[2] !== f ? (u = () => re(f).getState().transformStates.searcher?.searchText ?? "", e[2] = f, e[3] = u) : u = e[3];
141
- const [i, m] = Y(u);
142
- let v;
143
- e[4] !== f ? (v = (I) => me(f, I), e[4] = f, e[5] = v) : v = e[5];
144
- let o;
145
- e[6] !== c || e[7] !== v ? (o = He(v, c), e[6] = c, e[7] = v, e[8] = o) : o = e[8];
146
- const p = o;
147
- let g;
148
- e[9] !== p ? (g = (I) => {
149
- const k = I.target.value;
150
- m(k), p(k);
151
- }, e[9] = p, e[10] = g) : g = e[10];
152
- const r = g;
153
- let a;
154
- e[11] !== p || e[12] !== f ? (a = () => {
155
- m(""), me(f, ""), p(""), y.current?.focus();
156
- }, e[11] = p, e[12] = f, e[13] = a) : a = e[13];
157
- const n = a;
158
- if (!x)
159
- return null;
160
- let d;
161
- e[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ S(de, { position: "start", children: /* @__PURE__ */ S(Ae, { fontSize: "small" }) }), e[14] = d) : d = e[14];
162
- let h;
163
- e[15] !== n || e[16] !== i || e[17] !== A.clearAriaLabel ? (h = i ? /* @__PURE__ */ S(de, { position: "end", children: /* @__PURE__ */ S(j, { size: "small", edge: "end", "aria-label": A.clearAriaLabel, onClick: n, children: /* @__PURE__ */ S(Me, { fontSize: "small" }) }) }) : null, e[15] = n, e[16] = i, e[17] = A.clearAriaLabel, e[18] = h) : h = e[18];
164
- let E;
165
- e[19] !== h ? (E = {
166
- startAdornment: d,
167
- endAdornment: h
168
- }, e[19] = h, e[20] = E) : E = e[20];
169
- let C;
170
- return e[21] !== r || e[22] !== i || e[23] !== A.placeholder || e[24] !== E ? (C = /* @__PURE__ */ S(ke, { inputRef: y, size: "small", fullWidth: !0, variant: "filled", placeholder: A.placeholder, value: i, onChange: r, autoFocus: !0, "aria-label": A.placeholder, sx: ce.input, InputProps: E }), e[21] = r, e[22] = i, e[23] = A.placeholder, e[24] = E, e[25] = C) : C = e[25], C;
171
- }
172
- function vt(t) {
173
- return t.transformStates.searcher?.enabled ?? !1;
174
- }
175
- const yt = (t) => {
176
- if (t == null || typeof t != "object") return t;
177
- const e = t, l = Array.isArray(e.series) ? e.series : [], s = l.length === 0 ? [{
178
- stack: "total"
179
- }] : l.map((c) => c == null || typeof c != "object" ? c : {
180
- ...c,
181
- stack: "total"
182
- });
183
- return {
184
- ...e,
185
- series: s
186
- };
187
- }, Et = {
188
- on: "Unstack series",
189
- off: "Stack series"
190
- }, pe = {
191
- toggle: {
192
- p: 0.5,
193
- "& .MuiSvgIcon-root": {
194
- fontSize: 20
195
- }
196
- },
197
- toggleActive: {
198
- background: (t) => t.palette.primary.relatedLight
199
- }
200
- }, xt = {
201
- id: "stack-toggle",
202
- type: "config",
203
- order: 30
204
- };
205
- function Ro(t) {
206
- const e = M(18), {
207
- initialEnabled: l,
208
- labels: s,
209
- icon: c,
210
- iconProps: f
211
- } = t, b = l === void 0 ? !1 : l, A = c === void 0 ? Ge : c, x = W();
212
- let y;
213
- e[0] !== s ? (y = {
214
- ...Et,
215
- ...s
216
- }, e[0] = s, e[1] = y) : y = e[1];
217
- const u = y;
218
- let i;
219
- e[2] !== b ? (i = {
220
- initialEnabled: b
221
- }, e[2] = b, e[3] = i) : i = e[3];
222
- const {
223
- enabled: m,
224
- toggle: v
225
- } = ie(x, xt, yt, i), o = m ? u.on : u.off, p = m && pe.toggleActive;
226
- let g;
227
- e[4] !== p ? (g = {
228
- ...pe.toggle,
229
- ...p
230
- }, e[4] = p, e[5] = g) : g = e[5];
231
- let r;
232
- e[6] !== A || e[7] !== f ? (r = /* @__PURE__ */ S(A, { fontSize: "small", ...f }), e[6] = A, e[7] = f, e[8] = r) : r = e[8];
233
- let a;
234
- e[9] !== m || e[10] !== g || e[11] !== r || e[12] !== v || e[13] !== o ? (a = /* @__PURE__ */ S(j, { size: "small", "aria-label": o, "aria-pressed": m, onClick: v, sx: g, children: r }), e[9] = m, e[10] = g, e[11] = r, e[12] = v, e[13] = o, e[14] = a) : a = e[14];
235
- let n;
236
- return e[15] !== a || e[16] !== o ? (n = /* @__PURE__ */ S(Z, { title: o, children: a }), e[15] = a, e[16] = o, e[17] = n) : n = e[17], n;
237
- }
238
- const At = {
239
- on: "Disable zoom",
240
- off: "Enable zoom"
241
- }, he = {
242
- toggle: {
243
- p: 0.5,
244
- "& .MuiSvgIcon-root": {
245
- fontSize: 20
246
- }
247
- },
248
- toggleActive: {
249
- background: (t) => t.palette.primary.relatedLight
250
- }
251
- }, It = {
252
- id: "zoom-toggle",
253
- type: "config",
254
- order: 20
255
- };
256
- function $o(t) {
257
- const e = M(31), {
258
- initialEnabled: l,
259
- labels: s,
260
- icon: c,
261
- iconProps: f,
262
- axes: b
263
- } = t, A = l === void 0 ? !1 : l, x = c === void 0 ? We : c, y = W(), u = De();
264
- let i;
265
- e[0] !== s ? (i = {
266
- ...At,
267
- ...s
268
- }, e[0] = s, e[1] = i) : i = e[1];
269
- const m = i;
270
- let v;
271
- e[2] !== b ? (v = b ? b.includes("x") : !0, e[2] = b, e[3] = v) : v = e[3];
272
- const o = v;
273
- let p;
274
- e[4] !== b ? (p = b ? b.includes("y") : !1, e[4] = b, e[5] = p) : p = e[5];
275
- const g = p;
276
- let r;
277
- if (e[6] !== o || e[7] !== g || e[8] !== u) {
278
- const O = [];
279
- o && O.push("x"), g && O.push("y"), r = Ze(u, {
280
- axes: O
281
- }), e[6] = o, e[7] = g, e[8] = u, e[9] = r;
282
- } else
283
- r = e[9];
284
- const a = r;
285
- let n;
286
- e[10] !== A ? (n = {
287
- initialEnabled: A
288
- }, e[10] = A, e[11] = n) : n = e[11];
289
- const {
290
- enabled: d,
291
- toggle: h
292
- } = ie(y, It, a, n);
293
- let E;
294
- e[12] !== d || e[13] !== y || e[14] !== h ? (E = () => {
295
- d && Ne(y)?.setOption({}, {
296
- replaceMerge: ["dataZoom"]
297
- }), h();
298
- }, e[12] = d, e[13] = y, e[14] = h, e[15] = E) : E = e[15];
299
- const C = E, I = d ? m.on : m.off, k = d ? "active" : void 0, D = d && he.toggleActive;
300
- let z;
301
- e[16] !== D ? (z = {
302
- ...he.toggle,
303
- ...D
304
- }, e[16] = D, e[17] = z) : z = e[17];
305
- let _;
306
- e[18] !== x || e[19] !== f ? (_ = /* @__PURE__ */ S(x, { fontSize: "small", ...f }), e[18] = x, e[19] = f, e[20] = _) : _ = e[20];
307
- let L;
308
- e[21] !== d || e[22] !== C || e[23] !== z || e[24] !== _ || e[25] !== k || e[26] !== I ? (L = /* @__PURE__ */ S(j, { size: "small", "aria-label": I, "aria-pressed": d, onClick: C, className: k, sx: z, children: _ }), e[21] = d, e[22] = C, e[23] = z, e[24] = _, e[25] = k, e[26] = I, e[27] = L) : L = e[27];
309
- let T;
310
- return e[28] !== L || e[29] !== I ? (T = /* @__PURE__ */ S(Z, { title: I, children: L }), e[28] = L, e[29] = I, e[30] = T) : T = e[30], T;
311
- }
312
- const _t = (t) => {
313
- if (t == null || typeof t != "object") return t;
314
- const e = t;
315
- return {
316
- ...e,
317
- brush: {
318
- toolbox: ["rect", "clear"],
319
- xAxisIndex: "all",
320
- brushLink: "all",
321
- outOfBrush: {
322
- colorAlpha: 0.15
323
- }
324
- },
325
- toolbox: {
326
- ...e.toolbox ?? {},
327
- show: !1,
328
- feature: {
329
- ...e.toolbox?.feature ?? {},
330
- brush: {
331
- type: ["rect", "clear"]
332
- }
333
- }
334
- }
335
- };
336
- }, Lt = {
337
- on: "Disable brush selection",
338
- off: "Enable brush selection"
339
- }, be = {
340
- toggle: {
341
- p: 0.5,
342
- "& .MuiSvgIcon-root": {
343
- fontSize: 20
344
- }
345
- },
346
- toggleActive: {
347
- background: (t) => t.palette.primary.relatedLight
348
- }
349
- }, Ct = {
350
- id: "brush-toggle",
351
- type: "config",
352
- order: 25
353
- };
354
- function Bo(t) {
355
- const e = M(33), {
356
- initialEnabled: l,
357
- brushType: s,
358
- brushMode: c,
359
- selection: f,
360
- labels: b,
361
- icon: A,
362
- iconProps: x
363
- } = t, y = l === void 0 ? !1 : l, u = s === void 0 ? "lineX" : s, i = c === void 0 ? "multiple" : c, m = A === void 0 ? Ke : A, v = W();
364
- let o;
365
- e[0] !== b ? (o = {
366
- ...Lt,
367
- ...b
368
- }, e[0] = b, e[1] = o) : o = e[1];
369
- const p = o;
370
- let g;
371
- e[2] !== y ? (g = {
372
- initialEnabled: y
373
- }, e[2] = y, e[3] = g) : g = e[3];
374
- const {
375
- enabled: r,
376
- toggle: a
377
- } = ie(v, Ct, _t, g), n = Ue(v);
378
- let d, h;
379
- e[4] !== i || e[5] !== u || e[6] !== n || e[7] !== r ? (d = () => {
380
- if (!n)
381
- return;
382
- if (!r) {
383
- n.dispatchAction({
384
- type: "takeGlobalCursor"
385
- }), n.dispatchAction({
386
- type: "brush",
387
- areas: []
388
- });
389
- return;
390
- }
391
- const O = () => {
392
- n.dispatchAction({
393
- type: "takeGlobalCursor",
394
- key: "brush",
395
- brushOption: {
396
- brushType: u,
397
- brushMode: i
398
- }
399
- });
400
- }, w = () => O();
401
- return n.on("finished", w), O(), () => {
402
- n.off("finished", w);
403
- };
404
- }, h = [n, r, u, i], e[4] = i, e[5] = u, e[6] = n, e[7] = r, e[8] = d, e[9] = h) : (d = e[8], h = e[9]), ae(d, h);
405
- let E;
406
- e[10] !== n || e[11] !== r || e[12] !== f?.length ? (E = () => {
407
- !n || !r || f?.length === 0 && n.dispatchAction({
408
- type: "brush",
409
- areas: []
410
- });
411
- }, e[10] = n, e[11] = r, e[12] = f?.length, e[13] = E) : E = e[13];
412
- let C;
413
- e[14] !== n || e[15] !== r || e[16] !== f ? (C = [n, r, f], e[14] = n, e[15] = r, e[16] = f, e[17] = C) : C = e[17], ae(E, C);
414
- const I = r ? p.on : p.off, k = r ? "active" : void 0, D = r && be.toggleActive;
415
- let z;
416
- e[18] !== D ? (z = {
417
- ...be.toggle,
418
- ...D
419
- }, e[18] = D, e[19] = z) : z = e[19];
420
- let _;
421
- e[20] !== m || e[21] !== x ? (_ = /* @__PURE__ */ S(m, { fontSize: "small", ...x }), e[20] = m, e[21] = x, e[22] = _) : _ = e[22];
422
- let L;
423
- e[23] !== r || e[24] !== k || e[25] !== z || e[26] !== _ || e[27] !== a || e[28] !== I ? (L = /* @__PURE__ */ S(j, { size: "small", "aria-label": I, "aria-pressed": r, onClick: a, className: k, sx: z, children: _ }), e[23] = r, e[24] = k, e[25] = z, e[26] = _, e[27] = a, e[28] = I, e[29] = L) : L = e[29];
424
- let T;
425
- return e[30] !== L || e[31] !== I ? (T = /* @__PURE__ */ S(Z, { title: I, children: L }), e[30] = L, e[31] = I, e[32] = T) : T = e[32], T;
426
- }
427
- function Tt(t) {
428
- return Array.isArray(t) ? t.every((e) => e != null && typeof e == "object" && "value" in e && typeof e.value == "number") : !1;
429
- }
430
- const kt = (t) => Array.isArray(t) ? t.map((e) => {
431
- if (!Tt(e)) return e;
432
- const l = e.reduce((s, c) => s + Math.abs(c.value), 0);
433
- return l <= 0 ? e : e.map((s) => ({
434
- ...s,
435
- value: s.value / l * 100
436
- }));
437
- }) : t;
438
- function Dt(t) {
439
- const e = new Intl.NumberFormat(t, {
440
- style: "percent",
441
- minimumFractionDigits: 0,
442
- maximumFractionDigits: 2
443
- });
444
- return (l) => typeof l != "number" || !Number.isFinite(l) ? String(l) : e.format(l / 100);
445
- }
446
- const zt = {
447
- on: "Show absolute values",
448
- off: "Show relative values"
449
- }, Se = {
450
- toggle: {
451
- p: 0.5,
452
- "& .MuiSvgIcon-root": {
453
- fontSize: 20
454
- }
455
- },
456
- toggleActive: {
457
- background: (t) => t.palette.primary.relatedLight
458
- }
459
- }, Ot = {
460
- id: "relative-data",
461
- type: "data",
462
- order: 15
463
- };
464
- function Mo(t) {
465
- const e = M(26), {
466
- initialEnabled: l,
467
- locale: s,
468
- labels: c,
469
- icon: f,
470
- iconProps: b,
471
- transform: A
472
- } = t, x = l === void 0 ? !1 : l, y = f === void 0 ? Ve : f, u = W();
473
- let i;
474
- e[0] !== c ? (i = {
475
- ...zt,
476
- ...c
477
- }, e[0] = c, e[1] = i) : i = e[1];
478
- const m = i;
479
- let v;
480
- e[2] !== x ? (v = {
481
- initialEnabled: x
482
- }, e[2] = x, e[3] = v) : v = e[3];
483
- const {
484
- enabled: o,
485
- toggle: p
486
- } = ie(u, Ot, A ?? kt, v);
487
- let g;
488
- e[4] !== s ? (g = Dt(s), e[4] = s, e[5] = g) : g = e[5];
489
- const r = g, a = ne(u, wt);
490
- let n, d;
491
- e[6] !== o || e[7] !== u || e[8] !== r || e[9] !== a ? (n = () => {
492
- re(u).setState({
493
- formatter: o ? r : a
494
- });
495
- }, d = [u, o, r, a], e[6] = o, e[7] = u, e[8] = r, e[9] = a, e[10] = n, e[11] = d) : (n = e[10], d = e[11]), ae(n, d);
496
- const h = o ? m.on : m.off, E = o && Se.toggleActive;
497
- let C;
498
- e[12] !== E ? (C = {
499
- ...Se.toggle,
500
- ...E
501
- }, e[12] = E, e[13] = C) : C = e[13];
502
- let I;
503
- e[14] !== y || e[15] !== b ? (I = /* @__PURE__ */ S(y, { fontSize: "small", ...b }), e[14] = y, e[15] = b, e[16] = I) : I = e[16];
504
- let k;
505
- e[17] !== o || e[18] !== I || e[19] !== C || e[20] !== p || e[21] !== h ? (k = /* @__PURE__ */ S(j, { size: "small", "aria-label": h, "aria-pressed": o, onClick: p, sx: C, children: I }), e[17] = o, e[18] = I, e[19] = C, e[20] = p, e[21] = h, e[22] = k) : k = e[22];
506
- let D;
507
- return e[23] !== k || e[24] !== h ? (D = /* @__PURE__ */ S(Z, { title: h, children: k }), e[23] = k, e[24] = h, e[25] = D) : D = e[25], D;
508
- }
509
- function wt(t) {
510
- return t.rawFormatter;
511
- }
512
- const Ft = {
513
- trigger: "Download",
514
- loading: "Downloading…",
515
- error: "Download failed"
516
- };
517
- function Ho(t) {
518
- const e = M(36), {
519
- items: l,
520
- labels: s,
521
- icon: c,
522
- iconProps: f,
523
- onError: b
524
- } = t, A = c === void 0 ? Xe : c;
525
- let x;
526
- e[0] !== s ? (x = {
527
- ...Ft,
528
- ...s
529
- }, e[0] = s, e[1] = x) : x = e[1];
530
- const y = x, [u, i] = Y(null), [m, v] = Y(!1), [o, p] = Y(null);
531
- let g;
532
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = ($) => {
533
- p(null), i($.currentTarget);
534
- }, e[2] = g) : g = e[2];
535
- const r = g;
536
- let a;
537
- e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = () => i(null), e[3] = a) : a = e[3];
538
- const n = a;
539
- let d;
540
- e[4] !== m || e[5] !== b ? (d = ($) => {
541
- $.disabled || m || (n(), v(!0), p(null), $.resolve().then((P) => {
542
- const {
543
- url: U,
544
- filename: X,
545
- revoke: V
546
- } = P;
547
- Ye({
548
- url: U,
549
- filename: $.filename ?? X
550
- }), V && setTimeout(V, 0);
551
- }).catch((P) => {
552
- const U = P instanceof Error ? P : new Error(String(P));
553
- p(U), b?.(U);
554
- }).finally(() => {
555
- v(!1);
556
- }));
557
- }, e[4] = m, e[5] = b, e[6] = d) : d = e[6];
558
- const h = d, E = m ? y.loading : o ? y.error : y.trigger, C = !!u || m, I = u ? "true" : void 0, k = m || void 0, D = o ? "true" : void 0, z = m || l.length === 0, _ = C ? "active" : void 0;
559
- let L;
560
- e[7] !== A || e[8] !== f || e[9] !== m ? (L = m ? /* @__PURE__ */ S(ze, { size: 18, color: "inherit" }) : /* @__PURE__ */ S(A, { fontSize: "small", ...f }), e[7] = A, e[8] = f, e[9] = m, e[10] = L) : L = e[10];
561
- let T;
562
- e[11] !== _ || e[12] !== L || e[13] !== I || e[14] !== k || e[15] !== D || e[16] !== z || e[17] !== E ? (T = /* @__PURE__ */ S(j, { size: "small", "aria-label": E, "aria-haspopup": "true", "aria-expanded": I, "aria-busy": k, "data-error": D, disabled: z, onClick: r, className: _, children: L }), e[11] = _, e[12] = L, e[13] = I, e[14] = k, e[15] = D, e[16] = z, e[17] = E, e[18] = T) : T = e[18];
563
- let O;
564
- e[19] !== T || e[20] !== E ? (O = /* @__PURE__ */ S(Z, { title: E, children: T }), e[19] = T, e[20] = E, e[21] = O) : O = e[21];
565
- const w = !!u;
566
- let R, F;
567
- e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = {
568
- vertical: "bottom",
569
- horizontal: "right"
570
- }, F = {
571
- vertical: "top",
572
- horizontal: "right"
573
- }, e[22] = R, e[23] = F) : (R = e[22], F = e[23]);
574
- let H;
575
- if (e[24] !== l || e[25] !== h) {
576
- let $;
577
- e[27] !== h ? ($ = (P) => /* @__PURE__ */ ee(ye, { disabled: P.disabled, onClick: () => {
578
- h(P);
579
- }, children: [
580
- P.icon && /* @__PURE__ */ S(Oe, { sx: {
581
- color: "text.primary"
582
- }, children: P.icon }),
583
- /* @__PURE__ */ S(Ee, { children: P.label })
584
- ] }, P.id), e[27] = h, e[28] = $) : $ = e[28], H = l.map($), e[24] = l, e[25] = h, e[26] = H;
585
- } else
586
- H = e[26];
587
- let N;
588
- e[29] !== u || e[30] !== w || e[31] !== H ? (N = /* @__PURE__ */ S(xe, { anchorEl: u, open: w, onClose: n, variant: "menu", elevation: 8, anchorOrigin: R, transformOrigin: F, children: H }), e[29] = u, e[30] = w, e[31] = H, e[32] = N) : N = e[32];
589
- let K;
590
- return e[33] !== O || e[34] !== N ? (K = /* @__PURE__ */ ee(fe, { children: [
591
- O,
592
- N
593
- ] }), e[33] = O, e[34] = N, e[35] = K) : K = e[35], K;
594
- }
595
- const _e = {
596
- open: "Open in full screen",
597
- close: "Exit full screen"
598
- }, Q = {
599
- // Inline shell where the portaled body lives when fullscreen is closed.
600
- // Real flex-column box (not `display: contents`) so that:
601
- // 1. when the body is moved into the modal, we can pin a `min-height`
602
- // to keep the widget card from collapsing — the inline shell is
603
- // empty for that interval, and a layout-less wrapper would make
604
- // the card squish a frame before the modal covers it (visible
605
- // blink).
606
- // 2. nested `flex: 1` (e.g. Widget.State's CaptureBox) still grows —
607
- // this shell preserves the column-flex inheritance it would have
608
- // had directly under `Widget.Content`.
609
- // `gap: 1` mirrors `Widget.Content`'s gap so the body's siblings
610
- // (Subheader / capture box / note) keep their spacing.
611
- inlineSlot: {
612
- display: "flex",
613
- flexDirection: "column",
614
- flex: 1,
615
- minHeight: 0,
616
- gap: 1
617
- },
618
- trigger: {
619
- p: 0.5,
620
- "& .MuiSvgIcon-root": {
621
- fontSize: 20
622
- }
623
- },
624
- triggerActive: {
625
- background: (t) => t.palette.primary.relatedLight
626
- },
627
- dialogPaper: {
628
- width: "90vw",
629
- height: "90vh",
630
- maxWidth: "none",
631
- maxHeight: "none"
632
- },
633
- dialogTitle: {
634
- display: "flex",
635
- alignItems: "center",
636
- justifyContent: "space-between",
637
- gap: 1,
638
- py: 3,
639
- pr: 3,
640
- pb: 2
641
- },
642
- titleText: {
643
- minWidth: 0,
644
- overflow: "hidden",
645
- textOverflow: "ellipsis",
646
- whiteSpace: "nowrap"
647
- },
648
- dialogContent: {
649
- display: "flex",
650
- flexDirection: "column",
651
- gap: 1,
652
- py: 3,
653
- px: 2.5,
654
- overflow: "auto"
655
- }
656
- };
657
- function Pt(t) {
658
- const e = M(20), {
659
- labels: l,
660
- enterIcon: s,
661
- exitIcon: c,
662
- iconProps: f
663
- } = t, b = s === void 0 ? Je : s, A = c === void 0 ? Qe : c, x = W();
664
- let y;
665
- e[0] !== l ? (y = {
666
- ..._e,
667
- ...l
668
- }, e[0] = l, e[1] = y) : y = e[1];
669
- const u = y, i = ne(x, Rt);
670
- let m;
671
- e[2] !== x || e[3] !== i ? (m = () => {
672
- re(x).setState({
673
- isFullScreen: !i
674
- });
675
- }, e[2] = x, e[3] = i, e[4] = m) : m = e[4];
676
- const v = m, o = i ? u.close : u.open, p = i ? A : b, g = i ? "active" : void 0, r = i && Q.triggerActive;
677
- let a;
678
- e[5] !== r ? (a = {
679
- ...Q.trigger,
680
- ...r
681
- }, e[5] = r, e[6] = a) : a = e[6];
682
- let n;
683
- e[7] !== p || e[8] !== f ? (n = /* @__PURE__ */ S(p, { fontSize: "small", ...f }), e[7] = p, e[8] = f, e[9] = n) : n = e[9];
684
- let d;
685
- e[10] !== v || e[11] !== i || e[12] !== g || e[13] !== a || e[14] !== n || e[15] !== o ? (d = /* @__PURE__ */ S(j, { size: "small", "aria-label": o, "aria-pressed": i, onClick: v, className: g, sx: a, children: n }), e[10] = v, e[11] = i, e[12] = g, e[13] = a, e[14] = n, e[15] = o, e[16] = d) : d = e[16];
686
- let h;
687
- return e[17] !== d || e[18] !== o ? (h = /* @__PURE__ */ S(Z, { title: o, children: d }), e[17] = d, e[18] = o, e[19] = h) : h = e[19], h;
688
- }
689
- function Rt(t) {
690
- return t.isFullScreen ?? !1;
691
- }
692
- function $t(t) {
693
- const e = M(44), {
694
- children: l,
695
- title: s,
696
- labels: c,
697
- closeIcon: f,
698
- iconProps: b
699
- } = t, A = f === void 0 ? et : f, x = W();
700
- let y;
701
- e[0] !== c ? (y = {
702
- ..._e,
703
- ...c
704
- }, e[0] = c, e[1] = y) : y = e[1];
705
- const u = y, i = ne(x, Ht), [m, v] = Y(null), [o, p] = Y(null), [g] = Y(Mt);
706
- let r;
707
- e[2] !== x ? (r = () => {
708
- re(x).setState({
709
- isFullScreen: !1
710
- });
711
- }, e[2] = x, e[3] = r) : r = e[3];
712
- const a = r;
713
- let n, d;
714
- e[4] !== o || e[5] !== m || e[6] !== i || e[7] !== g ? (n = () => {
715
- if (!g || !m)
716
- return;
717
- const F = i ? o : m;
718
- F && g.parentNode !== F && F.appendChild(g), i || Nt(m);
719
- }, d = [i, m, o, g], e[4] = o, e[5] = m, e[6] = i, e[7] = g, e[8] = n, e[9] = d) : (n = e[8], d = e[9]), Te(n, d);
720
- const h = `widget-fullscreen-title-${x}`;
721
- let E, C;
722
- if (e[10] !== l || e[11] !== i || e[12] !== g) {
723
- const F = l(i);
724
- e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ S(we, { ref: v, sx: Q.inlineSlot }), e[15] = E) : E = e[15], C = g ? qe(F, g) : null, e[10] = l, e[11] = i, e[12] = g, e[13] = E, e[14] = C;
725
- } else
726
- E = e[13], C = e[14];
727
- let I;
728
- e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = {
729
- sx: Q.dialogPaper
730
- }, e[16] = I) : I = e[16];
731
- let k;
732
- e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = {
733
- zIndex: Bt
734
- }, e[17] = k) : k = e[17];
735
- let D;
736
- e[18] !== s ? (D = /* @__PURE__ */ S(Fe, { variant: "subtitle1", component: "span", sx: Q.titleText, children: s }), e[18] = s, e[19] = D) : D = e[19];
737
- let z;
738
- e[20] !== A || e[21] !== b ? (z = /* @__PURE__ */ S(A, { fontSize: "small", ...b }), e[20] = A, e[21] = b, e[22] = z) : z = e[22];
739
- let _;
740
- e[23] !== u.close || e[24] !== a || e[25] !== z ? (_ = /* @__PURE__ */ S(j, { size: "medium", "aria-label": u.close, onClick: a, children: z }), e[23] = u.close, e[24] = a, e[25] = z, e[26] = _) : _ = e[26];
741
- let L;
742
- e[27] !== u.close || e[28] !== _ ? (L = /* @__PURE__ */ S(Z, { title: u.close, children: _ }), e[27] = u.close, e[28] = _, e[29] = L) : L = e[29];
743
- let T;
744
- e[30] !== D || e[31] !== L || e[32] !== h ? (T = /* @__PURE__ */ ee(Pe, { id: h, component: "div", sx: Q.dialogTitle, children: [
745
- D,
746
- L
747
- ] }), e[30] = D, e[31] = L, e[32] = h, e[33] = T) : T = e[33];
748
- let O;
749
- e[34] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ S(Re, { ref: p, sx: Q.dialogContent }), e[34] = O) : O = e[34];
750
- let w;
751
- e[35] !== a || e[36] !== i || e[37] !== T || e[38] !== h ? (w = /* @__PURE__ */ ee($e, { open: i, onClose: a, PaperProps: I, "aria-labelledby": h, sx: k, children: [
752
- T,
753
- O
754
- ] }), e[35] = a, e[36] = i, e[37] = T, e[38] = h, e[39] = w) : w = e[39];
755
- let R;
756
- return e[40] !== w || e[41] !== E || e[42] !== C ? (R = /* @__PURE__ */ ee(fe, { children: [
757
- E,
758
- C,
759
- w
760
- ] }), e[40] = w, e[41] = E, e[42] = C, e[43] = R) : R = e[43], R;
761
- }
762
- function Bt(t) {
763
- return t.zIndex.tooltip + 1;
764
- }
765
- function Mt() {
766
- if (typeof document > "u")
767
- return null;
768
- const t = document.createElement("div");
769
- return t.style.display = "contents", t;
770
- }
771
- function Ht(t) {
772
- return t.isFullScreen ?? !1;
773
- }
774
- function Nt(t) {
775
- t.style.minHeight = "";
776
- const e = t.getBoundingClientRect().height;
777
- e > 0 && (t.style.minHeight = `${e}px`);
778
- }
779
- const No = {
780
- Trigger: Pt,
781
- Slot: $t
782
- };
783
- function Ut(t, e) {
784
- if (e.length === 0 || !Array.isArray(t)) return t;
785
- const l = new Set(e);
786
- return t.map((s) => Array.isArray(s) ? s.filter((c) => {
787
- if (c == null) return !1;
788
- if (typeof c == "object" && "name" in c) {
789
- const f = c.name;
790
- return typeof f == "string" || typeof f == "number" ? l.has(f) : !1;
791
- }
792
- return !1;
793
- }) : s);
794
- }
795
- const jt = {
796
- lock: "Lock selection",
797
- unlock: "Unlock selection",
798
- disabled: "Select rows to lock"
799
- }, ve = {
800
- toggle: {
801
- p: 0.5,
802
- "& .MuiSvgIcon-root": {
803
- fontSize: 20
804
- }
805
- },
806
- toggleActive: {
807
- background: (t) => t.palette.primary.relatedLight
808
- }
809
- }, Gt = {
810
- id: "lock-selection",
811
- type: "data",
812
- order: 30
813
- };
814
- function Uo(t) {
815
- const e = M(28), {
816
- selection: l,
817
- lockedItems: s,
818
- onLockChange: c,
819
- labels: f,
820
- lockIcon: b,
821
- unlockIcon: A,
822
- iconProps: x
823
- } = t, y = b === void 0 ? tt : b, u = A === void 0 ? ot : A, i = W();
824
- let m;
825
- e[0] !== f ? (m = {
826
- ...jt,
827
- ...f
828
- }, e[0] = f, e[1] = m) : m = e[1];
829
- const v = m, o = s.length > 0, p = o || l.length > 0, g = Wt(s);
830
- let r;
831
- e[2] !== o ? (r = {
832
- initialEnabled: o
833
- }, e[2] = o, e[3] = r) : r = e[3];
834
- const {
835
- enabled: a,
836
- setEnabled: n
837
- } = je(i, g, r);
838
- let d, h;
839
- e[4] !== a || e[5] !== o || e[6] !== n ? (d = () => {
840
- a !== o && n(o);
841
- }, h = [a, o, n], e[4] = a, e[5] = o, e[6] = n, e[7] = d, e[8] = h) : (d = e[7], h = e[8]), ae(d, h);
842
- let E;
843
- e[9] !== o || e[10] !== c || e[11] !== l ? (E = () => {
844
- c(o ? [] : [...l]);
845
- }, e[9] = o, e[10] = c, e[11] = l, e[12] = E) : E = e[12];
846
- const C = E, I = p ? o ? v.unlock : v.lock : v.disabled, k = o ? u : y, D = !p, z = o && ve.toggleActive;
847
- let _;
848
- e[13] !== z ? (_ = {
849
- ...ve.toggle,
850
- ...z
851
- }, e[13] = z, e[14] = _) : _ = e[14];
852
- let L;
853
- e[15] !== k || e[16] !== x ? (L = /* @__PURE__ */ S(k, { fontSize: "small", ...x }), e[15] = k, e[16] = x, e[17] = L) : L = e[17];
854
- let T;
855
- e[18] !== C || e[19] !== o || e[20] !== _ || e[21] !== L || e[22] !== D || e[23] !== I ? (T = /* @__PURE__ */ S("span", { children: /* @__PURE__ */ S(j, { size: "small", "aria-label": I, "aria-pressed": o, disabled: D, onClick: C, sx: _, children: L }) }), e[18] = C, e[19] = o, e[20] = _, e[21] = L, e[22] = D, e[23] = I, e[24] = T) : T = e[24];
856
- let O;
857
- return e[25] !== T || e[26] !== I ? (O = /* @__PURE__ */ S(Z, { title: I, children: T }), e[25] = T, e[26] = I, e[27] = O) : O = e[27], O;
858
- }
859
- function Wt(t) {
860
- const e = M(4);
861
- let l;
862
- e[0] !== t ? (l = (f) => Ut(f, t), e[0] = t, e[1] = l) : l = e[1];
863
- const s = l;
864
- let c;
865
- return e[2] !== s ? (c = [{
866
- descriptor: Gt,
867
- fn: s
868
- }], e[2] = s, e[3] = c) : c = e[3], c;
869
- }
870
- function Zt(t) {
871
- const e = M(3);
872
- let l;
873
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ S("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" }), e[0] = l) : l = e[0];
874
- let s;
875
- return e[1] !== t ? (s = /* @__PURE__ */ S(Be, { viewBox: "0 0 18 18", ...t, children: l }), e[1] = t, e[2] = s) : s = e[2], s;
876
- }
877
- const Kt = {
878
- trigger: "Change column order",
879
- reset: "Reset to default"
880
- }, le = {
881
- toggle: {
882
- p: 0.5,
883
- "& .MuiSvgIcon-root": {
884
- fontSize: 20
885
- }
886
- },
887
- toggleActive: {
888
- background: (t) => t.palette.primary.relatedLight
889
- },
890
- menuPaper: {
891
- overflow: "hidden",
892
- minWidth: 220
893
- },
894
- item: {
895
- cursor: "grab",
896
- "&:focus-visible": {
897
- outline: "2px solid",
898
- outlineColor: "primary.main",
899
- outlineOffset: -2
900
- }
901
- },
902
- itemDragging: {
903
- opacity: 0.5,
904
- cursor: "grabbing"
905
- },
906
- dragHandle: {
907
- color: "text.secondary",
908
- mr: 1,
909
- fontSize: 18
910
- }
911
- };
912
- function Vt(t) {
913
- const e = M(21), {
914
- id: l,
915
- label: s,
916
- dragHandleIcon: c
917
- } = t, f = c === void 0 ? mt : c;
918
- let b;
919
- e[0] !== l ? (b = {
920
- id: l
921
- }, e[0] = l, e[1] = b) : b = e[1];
922
- const {
923
- attributes: A,
924
- listeners: x,
925
- setNodeRef: y,
926
- transform: u,
927
- transition: i,
928
- isDragging: m
929
- } = at(b);
930
- let v;
931
- e[2] !== u ? (v = gt.Transform.toString(u ? {
932
- ...u,
933
- x: 0
934
- } : null), e[2] = u, e[3] = v) : v = e[3];
935
- let o;
936
- e[4] !== v || e[5] !== i ? (o = {
937
- transform: v,
938
- transition: i
939
- }, e[4] = v, e[5] = i, e[6] = o) : o = e[6];
940
- const p = o, g = m && le.itemDragging;
941
- let r;
942
- e[7] !== g ? (r = {
943
- ...le.item,
944
- ...g
945
- }, e[7] = g, e[8] = r) : r = e[8];
946
- let a;
947
- e[9] !== f ? (a = /* @__PURE__ */ S(f, { sx: le.dragHandle }), e[9] = f, e[10] = a) : a = e[10];
948
- let n;
949
- e[11] !== s ? (n = /* @__PURE__ */ S(Ee, { children: s }), e[11] = s, e[12] = n) : n = e[12];
950
- let d;
951
- return e[13] !== A || e[14] !== x || e[15] !== y || e[16] !== r || e[17] !== a || e[18] !== n || e[19] !== p ? (d = /* @__PURE__ */ ee(ye, { ref: y, style: p, ...A, ...x, role: "menuitem", tabIndex: 0, sx: r, children: [
952
- a,
953
- n
954
- ] }), e[13] = A, e[14] = x, e[15] = y, e[16] = r, e[17] = a, e[18] = n, e[19] = p, e[20] = d) : d = e[20], d;
955
- }
956
- function jo(t) {
957
- const e = M(52), {
958
- columns: l,
959
- labels: s,
960
- icon: c,
961
- iconProps: f,
962
- dragHandleIcon: b
963
- } = t, A = c === void 0 ? Zt : c, x = W();
964
- let y;
965
- e[0] !== s ? (y = {
966
- ...Kt,
967
- ...s
968
- }, e[0] = s, e[1] = y) : y = e[1];
969
- const u = y, [i, m] = Y(null), v = ne(x, qt);
970
- let o;
971
- if (e[2] !== v || e[3] !== l) {
972
- e: {
973
- const B = l.map(Yt);
974
- if (!v || v.length === 0) {
975
- o = B;
976
- break e;
977
- }
978
- const q = new Set(B), J = /* @__PURE__ */ new Set(), oe = [];
979
- for (const G of v)
980
- q.has(G) && !J.has(G) && (oe.push(G), J.add(G));
981
- for (const G of B)
982
- J.has(G) || oe.push(G);
983
- o = oe;
984
- }
985
- e[2] = v, e[3] = l, e[4] = o;
986
- } else
987
- o = e[4];
988
- const p = o;
989
- let g;
990
- e[5] !== l ? (g = new Map(l.map(Xt)), e[5] = l, e[6] = g) : g = e[6];
991
- const r = g;
992
- let a;
993
- if (e[7] !== r || e[8] !== p) {
994
- a = [];
995
- for (const B of p) {
996
- const q = r.get(B);
997
- q != null && a.push(q);
998
- }
999
- e[7] = r, e[8] = p, e[9] = a;
1000
- } else
1001
- a = e[9];
1002
- const n = a;
1003
- let d;
1004
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
1005
- coordinateGetter: ct
1006
- }, e[10] = d) : d = e[10];
1007
- const h = lt(ue(nt), ue(rt, d));
1008
- let E;
1009
- e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = (B) => {
1010
- B.stopPropagation(), m(B.currentTarget);
1011
- }, e[11] = E) : E = e[11];
1012
- const C = E;
1013
- let I;
1014
- e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = () => m(null), e[12] = I) : I = e[12];
1015
- const k = I;
1016
- let D;
1017
- e[13] !== x || e[14] !== p ? (D = (B) => {
1018
- const {
1019
- active: q,
1020
- over: J
1021
- } = B;
1022
- if (!J || q.id === J.id)
1023
- return;
1024
- const oe = p.indexOf(String(q.id)), G = p.indexOf(String(J.id));
1025
- if (oe === -1 || G === -1)
1026
- return;
1027
- const Le = ft([...p], oe, G);
1028
- re(x).setState({
1029
- columnOrder: Le
1030
- });
1031
- }, e[13] = x, e[14] = p, e[15] = D) : D = e[15];
1032
- const z = D;
1033
- if (l.length < 2)
1034
- return null;
1035
- const _ = !!i, L = _ ? "change-column-menu" : void 0, T = _ ? "true" : void 0, O = _ ? "active" : void 0, w = _ && le.toggleActive;
1036
- let R;
1037
- e[16] !== w ? (R = {
1038
- ...le.toggle,
1039
- ...w
1040
- }, e[16] = w, e[17] = R) : R = e[17];
1041
- let F;
1042
- e[18] !== A || e[19] !== f ? (F = /* @__PURE__ */ S(A, { fontSize: "small", ...f }), e[18] = A, e[19] = f, e[20] = F) : F = e[20];
1043
- let H;
1044
- e[21] !== u.trigger || e[22] !== _ || e[23] !== T || e[24] !== O || e[25] !== R || e[26] !== F || e[27] !== L ? (H = /* @__PURE__ */ S(j, { size: "small", "aria-label": u.trigger, "aria-pressed": _, "aria-haspopup": "true", "aria-controls": L, "aria-expanded": T, onClick: C, className: O, sx: R, children: F }), e[21] = u.trigger, e[22] = _, e[23] = T, e[24] = O, e[25] = R, e[26] = F, e[27] = L, e[28] = H) : H = e[28];
1045
- let N;
1046
- e[29] !== u.trigger || e[30] !== H ? (N = /* @__PURE__ */ S(Z, { title: u.trigger, children: H }), e[29] = u.trigger, e[30] = H, e[31] = N) : N = e[31];
1047
- let K, $, P;
1048
- e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (K = {
1049
- vertical: "bottom",
1050
- horizontal: "right"
1051
- }, $ = {
1052
- vertical: "top",
1053
- horizontal: "right"
1054
- }, P = {
1055
- paper: {
1056
- sx: le.menuPaper
1057
- }
1058
- }, e[32] = K, e[33] = $, e[34] = P) : (K = e[32], $ = e[33], P = e[34]);
1059
- let U;
1060
- e[35] !== b || e[36] !== n ? (U = n.map((B) => /* @__PURE__ */ S(Vt, { id: B.id, label: B.label, dragHandleIcon: b }, B.id)), e[35] = b, e[36] = n, e[37] = U) : U = e[37];
1061
- let X;
1062
- e[38] !== p || e[39] !== U ? (X = /* @__PURE__ */ S(dt, { items: p, strategy: ut, children: U }), e[38] = p, e[39] = U, e[40] = X) : X = e[40];
1063
- let V;
1064
- e[41] !== i || e[42] !== _ || e[43] !== X ? (V = /* @__PURE__ */ S(xe, { id: "change-column-menu", anchorEl: i, open: _, onClose: k, anchorOrigin: K, transformOrigin: $, slotProps: P, children: X }), e[41] = i, e[42] = _, e[43] = X, e[44] = V) : V = e[44];
1065
- let te;
1066
- e[45] !== z || e[46] !== h || e[47] !== V ? (te = /* @__PURE__ */ S(it, { sensors: h, collisionDetection: st, onDragEnd: z, children: V }), e[45] = z, e[46] = h, e[47] = V, e[48] = te) : te = e[48];
1067
- let se;
1068
- return e[49] !== N || e[50] !== te ? (se = /* @__PURE__ */ ee(fe, { children: [
1069
- N,
1070
- te
1071
- ] }), e[49] = N, e[50] = te, e[51] = se) : se = e[51], se;
1072
- }
1073
- function Xt(t) {
1074
- return [t.id, t];
1075
- }
1076
- function Yt(t) {
1077
- return t.id;
1078
- }
1079
- function qt(t) {
1080
- return t.columnOrder;
1081
- }
1082
- export {
1083
- Bo as B,
1084
- jo as C,
1085
- Lt as D,
1086
- No as F,
1087
- Uo as L,
1088
- Mo as R,
1089
- Po as S,
1090
- $o as Z,
1091
- Kt as a,
1092
- Ft as b,
1093
- _e as c,
1094
- jt as d,
1095
- zt as e,
1096
- Ie as f,
1097
- Et as g,
1098
- At as h,
1099
- Ho as i,
1100
- Fo as j,
1101
- Ro as k,
1102
- _t as l,
1103
- yt as m,
1104
- Dt as n,
1105
- Ut as o,
1106
- pt as p,
1107
- me as s,
1108
- kt as t
1109
- };
1110
- //# sourceMappingURL=change-column-B4IT0rh6.js.map