@carto/meridian-ds 1.4.2-multiple-selectall.1 → 1.4.3-alpha-codemirror.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 (65) hide show
  1. package/CHANGELOG.md +8 -2
  2. package/dist/{Alert-hBzSt1O0.cjs → Alert-Bcn_9-oO.cjs} +1 -1
  3. package/dist/{Alert-CZgNmICd.js → Alert-mpNEqtBu.js} +1 -1
  4. package/dist/OpenDiagonallyRight-BkCaUpcr.js +56 -0
  5. package/dist/OpenDiagonallyRight-DqSU7b6o.cjs +1 -0
  6. package/dist/TablePaginationActions-BfAn9gSh.cjs +9 -0
  7. package/dist/{TablePaginationActions-EDxBCxpG.js → TablePaginationActions-Cj_BbjKR.js} +363 -333
  8. package/dist/components/index.cjs +2 -1
  9. package/dist/components/index.js +2419 -1336
  10. package/dist/custom-icons/index.cjs +1 -1
  11. package/dist/custom-icons/index.js +694 -705
  12. package/dist/theme/index.cjs +1 -1
  13. package/dist/theme/index.js +2 -2
  14. package/dist/types/components/molecules/Copy/CopiableComponent.d.ts +20 -0
  15. package/dist/types/components/molecules/Copy/CopiableComponent.d.ts.map +1 -0
  16. package/dist/types/components/molecules/Copy/copyString.d.ts +3 -0
  17. package/dist/types/components/molecules/Copy/copyString.d.ts.map +1 -0
  18. package/dist/types/components/molecules/Copy/index.d.ts +5 -0
  19. package/dist/types/components/molecules/Copy/index.d.ts.map +1 -0
  20. package/dist/types/components/molecules/Copy/useCopyValue.d.ts +5 -0
  21. package/dist/types/components/molecules/Copy/useCopyValue.d.ts.map +1 -0
  22. package/dist/types/components/molecules/index.d.ts +2 -0
  23. package/dist/types/components/molecules/index.d.ts.map +1 -1
  24. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts +16 -0
  25. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialog.d.ts.map +1 -0
  26. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogConfirmation.d.ts +16 -0
  27. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogConfirmation.d.ts.map +1 -0
  28. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogContent.d.ts +10 -0
  29. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogContent.d.ts.map +1 -0
  30. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogError.d.ts +8 -0
  31. package/dist/types/components/organisms/CodeArea/CodeAreaDialog/CodeAreaDialogError.d.ts.map +1 -0
  32. package/dist/types/components/organisms/CodeArea/CodeAreaField.d.ts +4 -0
  33. package/dist/types/components/organisms/CodeArea/CodeAreaField.d.ts.map +1 -0
  34. package/dist/types/components/organisms/CodeArea/CodeAreaFooter.d.ts +13 -0
  35. package/dist/types/components/organisms/CodeArea/CodeAreaFooter.d.ts.map +1 -0
  36. package/dist/types/components/organisms/CodeArea/CodeAreaHeader.d.ts +9 -0
  37. package/dist/types/components/organisms/CodeArea/CodeAreaHeader.d.ts.map +1 -0
  38. package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts +27 -0
  39. package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts.map +1 -0
  40. package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts +7 -0
  41. package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts.map +1 -0
  42. package/dist/types/components/organisms/CodeArea/index.d.ts +4 -0
  43. package/dist/types/components/organisms/CodeArea/index.d.ts.map +1 -0
  44. package/dist/types/components/organisms/CodeArea/types.d.ts +39 -0
  45. package/dist/types/components/organisms/CodeArea/types.d.ts.map +1 -0
  46. package/dist/types/components/organisms/CodeArea/utils.d.ts +5 -0
  47. package/dist/types/components/organisms/CodeArea/utils.d.ts.map +1 -0
  48. package/dist/types/components/organisms/index.d.ts +2 -0
  49. package/dist/types/components/organisms/index.d.ts.map +1 -1
  50. package/dist/types/custom-icons/DataFilter.d.ts +4 -0
  51. package/dist/types/custom-icons/DataFilter.d.ts.map +1 -0
  52. package/dist/types/custom-icons/index.d.ts +1 -0
  53. package/dist/types/custom-icons/index.d.ts.map +1 -1
  54. package/dist/types/localization/en.d.ts +10 -0
  55. package/dist/types/localization/en.d.ts.map +1 -1
  56. package/dist/types/localization/es.d.ts +10 -0
  57. package/dist/types/localization/es.d.ts.map +1 -1
  58. package/dist/types/localization/id.d.ts +10 -0
  59. package/dist/types/localization/id.d.ts.map +1 -1
  60. package/dist/types/localization/index.d.ts +30 -0
  61. package/dist/types/localization/index.d.ts.map +1 -1
  62. package/dist/widgets/index.cjs +1 -1
  63. package/dist/widgets/index.js +2 -2
  64. package/package.json +7 -3
  65. package/dist/TablePaginationActions-V8ultBUz.cjs +0 -9
@@ -1,20 +1,45 @@
1
- import { jsx as i, jsxs as y, Fragment as V } from "react/jsx-runtime";
2
- import { forwardRef as T, useState as $, useEffect as _, useMemo as pt, useRef as Y, Fragment as Ot, useImperativeHandle as Lt, useCallback as nt } from "react";
3
- import { styled as g, Box as v, Button as gt, CircularProgress as P, TextField as ft, InputAdornment as q, IconButton as W, Tooltip as H, Select as Wt, MenuItem as mt, FormControl as Et, InputLabel as Ht, FormHelperText as ht, ToggleButtonGroup as _t, Menu as Pt, MenuList as Gt, Link as jt, Checkbox as z, ListItemText as bt, Autocomplete as Z, Divider as j, ListItemIcon as Vt, createFilterOptions as Nt, Accordion as Ut, AccordionSummary as Yt, AccordionDetails as qt, Avatar as zt, Snackbar as Zt, Portal as Jt, Fade as Xt, Slide as xt, alpha as Kt, useTheme as N, Toolbar as Qt, AppBar as te, Paper as ee, Dialog as ne, DialogTitle as oe, Chip as ie, DialogContent as ae, DialogActions as re } from "@mui/material";
4
- import { T as S, c as G, u as R, N as ot, A as le } from "../TablePaginationActions-EDxBCxpG.js";
5
- import { a as Vo } from "../TablePaginationActions-EDxBCxpG.js";
6
- import { useIntl as F } from "react-intl";
7
- import { VisibilityOffOutlined as ce, VisibilityOutlined as se, Cancel as yt, AddCircleOutlineOutlined as de, CloseOutlined as Mt, MenuOutlined as ue, HelpOutline as J, TodayOutlined as pe, Check as ge } from "@mui/icons-material";
8
- import { A as Ct } from "../Alert-CZgNmICd.js";
1
+ import { jsx as n, jsxs as x, Fragment as H } from "react/jsx-runtime";
2
+ import { forwardRef as O, useState as B, useEffect as z, useMemo as At, useRef as Z, Fragment as te, useCallback as ot, useImperativeHandle as ee } from "react";
3
+ import { styled as m, Box as D, Button as St, CircularProgress as G, TextField as It, InputAdornment as it, IconButton as W, Tooltip as P, Select as oe, MenuItem as $t, FormControl as Bt, InputLabel as Tt, FormHelperText as J, ToggleButtonGroup as re, Menu as ne, MenuList as ie, Link as ae, Checkbox as at, ListItemText as U, Autocomplete as lt, Divider as _, ListItemIcon as rt, createFilterOptions as le, Accordion as ce, AccordionSummary as de, AccordionDetails as se, Avatar as ue, Snackbar as pe, Portal as ge, Fade as fe, Slide as Rt, alpha as Ot, useTheme as j, Toolbar as me, AppBar as be, Paper as he, Dialog as xe, DialogTitle as ye, Chip as Ce, DialogContent as Me, DialogActions as ke } from "@mui/material";
4
+ import { T as F, c as N, u as T, N as ft, A as ve } from "../TablePaginationActions-Cj_BbjKR.js";
5
+ import { a as ei } from "../TablePaginationActions-Cj_BbjKR.js";
6
+ import { useIntl as R } from "react-intl";
7
+ import { VisibilityOffOutlined as we, VisibilityOutlined as De, Cancel as Ft, AddCircleOutlineOutlined as Ae, ContentCopyOutlined as Lt, CloseOutlined as Wt, MenuOutlined as Se, HelpOutline as K, TodayOutlined as Ie, MoreVertOutlined as $e, ErrorOutline as Be, Check as Te } from "@mui/icons-material";
8
+ import { A as Et } from "../Alert-mpNEqtBu.js";
9
9
  import "cartocolor";
10
- import { M as vt } from "../MenuItem-Cd34y6F3.js";
11
- import { A as X } from "../ArrowDown-CMhYkZ2p.js";
12
- import { DatePicker as fe } from "@mui/x-date-pickers/DatePicker";
13
- import { PickersDay as me } from "@mui/x-date-pickers";
14
- import { TimePicker as he } from "@mui/x-date-pickers/TimePicker";
15
- import { DateTimePicker as be } from "@mui/x-date-pickers/DateTimePicker";
16
- import xe from "@mui/material/ClickAwayListener";
17
- const ye = g(v)({
10
+ import { M as Y } from "../MenuItem-Cd34y6F3.js";
11
+ import { A as ct } from "../ArrowDown-CMhYkZ2p.js";
12
+ import { DatePicker as Re } from "@mui/x-date-pickers/DatePicker";
13
+ import { PickersDay as Oe } from "@mui/x-date-pickers";
14
+ import { TimePicker as Fe } from "@mui/x-date-pickers/TimePicker";
15
+ import { DateTimePicker as Le } from "@mui/x-date-pickers/DateTimePicker";
16
+ import { O as mt, C as We } from "../OpenDiagonallyRight-BkCaUpcr.js";
17
+ import { Controlled as Ee, UnControlled as He } from "react-codemirror2";
18
+ import { lime as bt, blue as tt, purple as Pe, teal as ze, red as Ne, indigo as _e } from "@mui/material/colors";
19
+ import "codemirror/lib/codemirror.css";
20
+ import "codemirror/lib/codemirror.js";
21
+ import "codemirror/mode/sql/sql.js";
22
+ import "codemirror/mode/javascript/javascript.js";
23
+ import "codemirror/mode/htmlmixed/htmlmixed.js";
24
+ import "codemirror/mode/markdown/markdown.js";
25
+ import "codemirror/mode/shell/shell.js";
26
+ import "codemirror/mode/python/python.js";
27
+ import "codemirror/addon/display/placeholder";
28
+ import "codemirror/addon/hint/sql-hint.js";
29
+ import "codemirror/addon/hint/show-hint.css";
30
+ import "codemirror/addon/hint/show-hint.js";
31
+ import "codemirror/addon/selection/active-line.js";
32
+ import "codemirror/addon/edit/matchbrackets.js";
33
+ import "codemirror/addon/fold/foldcode.js";
34
+ import "codemirror/addon/fold/foldgutter.js";
35
+ import "codemirror/addon/fold/foldgutter.css";
36
+ import "codemirror/addon/fold/brace-fold.js";
37
+ import "codemirror/addon/fold/xml-fold.js";
38
+ import "codemirror/addon/fold/indent-fold.js";
39
+ import "codemirror/addon/fold/markdown-fold.js";
40
+ import "codemirror/addon/fold/comment-fold.js";
41
+ import Ge from "@mui/material/ClickAwayListener";
42
+ const je = m(D)({
18
43
  position: "absolute",
19
44
  top: 0,
20
45
  left: 0,
@@ -23,53 +48,53 @@ const ye = g(v)({
23
48
  display: "flex",
24
49
  alignItems: "center",
25
50
  justifyContent: "center"
26
- }), Me = g(v)({
51
+ }), Ve = m(D)({
27
52
  visibility: "hidden",
28
53
  pointerEvents: "none"
29
54
  });
30
- function Ce({
55
+ function Ue({
31
56
  children: t,
32
57
  loading: e,
33
- disabled: n,
34
- startIcon: o,
35
- endIcon: a,
36
- loadingPosition: r,
37
- ...l
38
- }, s) {
39
- const c = /* @__PURE__ */ i(P, { size: 18, color: "inherit" }), p = e && r === void 0, h = () => p ? /* @__PURE__ */ y(v, { sx: { position: "relative" }, children: [
40
- /* @__PURE__ */ i(ye, { children: c }),
41
- /* @__PURE__ */ i(Me, { children: t })
42
- ] }) : t, d = (m) => {
43
- if (!p)
44
- return e && r !== void 0 ? r === m ? c : void 0 : m === "start" ? o : a;
58
+ disabled: o,
59
+ startIcon: r,
60
+ endIcon: i,
61
+ loadingPosition: l,
62
+ ...a
63
+ }, c) {
64
+ const d = /* @__PURE__ */ n(G, { size: 18, color: "inherit" }), u = e && l === void 0, p = () => u ? /* @__PURE__ */ x(D, { sx: { position: "relative" }, children: [
65
+ /* @__PURE__ */ n(je, { children: d }),
66
+ /* @__PURE__ */ n(Ve, { children: t })
67
+ ] }) : t, s = (b) => {
68
+ if (!u)
69
+ return e && l !== void 0 ? l === b ? d : void 0 : b === "start" ? r : i;
45
70
  };
46
- return /* @__PURE__ */ i(
47
- gt,
71
+ return /* @__PURE__ */ n(
72
+ St,
48
73
  {
49
- disabled: e || n,
50
- startIcon: d("start"),
51
- endIcon: d("end"),
52
- ...l,
53
- role: l.href ? "link" : "button",
54
- ref: s,
55
- children: /* @__PURE__ */ i(S, { variant: "inherit", color: "inherit", noWrap: !0, component: "span", children: h() })
74
+ disabled: e || o,
75
+ startIcon: s("start"),
76
+ endIcon: s("end"),
77
+ ...a,
78
+ role: a.href ? "link" : "button",
79
+ ref: c,
80
+ children: /* @__PURE__ */ n(F, { variant: "inherit", color: "inherit", noWrap: !0, component: "span", children: p() })
56
81
  }
57
82
  );
58
83
  }
59
- const bo = T(Ce), ve = g(v)(({ theme: t }) => ({
84
+ const nt = O(Ue), Ye = m(D)(({ theme: t }) => ({
60
85
  display: "flex",
61
86
  alignItems: "center",
62
87
  gap: t.spacing(0.5)
63
- })), ke = g(S)(({ theme: t }) => ({
88
+ })), qe = m(F)(({ theme: t }) => ({
64
89
  ".Mui-disabled &": {
65
90
  color: t.palette.text.disabled
66
91
  }
67
- })), De = g(v)(({ theme: t }) => ({
92
+ })), Ze = m(D)(({ theme: t }) => ({
68
93
  display: "flex",
69
94
  svg: {
70
- width: G,
71
- height: G,
72
- fontSize: G,
95
+ width: N,
96
+ height: N,
97
+ fontSize: N,
73
98
  path: {
74
99
  fill: t.palette.text.secondary,
75
100
  ".Mui-disabled &": {
@@ -78,58 +103,58 @@ const bo = T(Ce), ve = g(v)(({ theme: t }) => ({
78
103
  }
79
104
  }
80
105
  }));
81
- function K({
106
+ function X({
82
107
  label: t,
83
108
  type: e,
84
- icon: n,
85
- inheritSize: o
109
+ icon: o,
110
+ inheritSize: r
86
111
  }) {
87
- return /* @__PURE__ */ y(ve, { children: [
112
+ return /* @__PURE__ */ x(Ye, { children: [
88
113
  t,
89
- e && /* @__PURE__ */ i(
90
- ke,
114
+ e && /* @__PURE__ */ n(
115
+ qe,
91
116
  {
92
117
  component: "span",
93
- variant: o ? "inherit" : "caption",
118
+ variant: r ? "inherit" : "caption",
94
119
  color: "textSecondary",
95
120
  weight: "regular",
96
121
  children: e === "required" ? "(required)" : "(optional)"
97
122
  }
98
123
  ),
99
- n && /* @__PURE__ */ i(De, { children: n })
124
+ o && /* @__PURE__ */ n(Ze, { children: o })
100
125
  ] });
101
126
  }
102
- function Ae({ InputProps: t, size: e = "small", ...n }, o) {
103
- const a = F(), r = R(a), [l, s] = $(!1);
104
- return /* @__PURE__ */ i(
105
- ft,
127
+ function Je({ InputProps: t, size: e = "small", ...o }, r) {
128
+ const i = R(), l = T(i), [a, c] = B(!1);
129
+ return /* @__PURE__ */ n(
130
+ It,
106
131
  {
107
- ...n,
108
- ref: o,
109
- type: l ? "text" : "password",
132
+ ...o,
133
+ ref: r,
134
+ type: a ? "text" : "password",
110
135
  size: e,
111
136
  InputProps: {
112
137
  ...t,
113
- endAdornment: /* @__PURE__ */ i(q, { position: "end", children: /* @__PURE__ */ i(W, { size: e, onClick: () => s(!l), children: /* @__PURE__ */ i(
114
- H,
138
+ endAdornment: /* @__PURE__ */ n(it, { position: "end", children: /* @__PURE__ */ n(W, { size: e, onClick: () => c(!a), children: /* @__PURE__ */ n(
139
+ P,
115
140
  {
116
- title: r.formatMessage({
117
- id: `c4r.form.${l ? "hidePassword" : "showPassword"}`
141
+ title: l.formatMessage({
142
+ id: `c4r.form.${a ? "hidePassword" : "showPassword"}`
118
143
  }),
119
- children: l ? /* @__PURE__ */ i(ce, {}) : /* @__PURE__ */ i(se, {})
144
+ children: a ? /* @__PURE__ */ n(we, {}) : /* @__PURE__ */ n(De, {})
120
145
  }
121
146
  ) }) })
122
147
  }
123
148
  }
124
149
  );
125
150
  }
126
- const xo = T(Ae), U = {};
127
- function Ie(t = "$lodash$") {
128
- U[t] || (U[t] = 0);
129
- const e = ++U[t];
151
+ const Ln = O(Je), et = {};
152
+ function Ke(t = "$lodash$") {
153
+ et[t] || (et[t] = 0);
154
+ const e = ++et[t];
130
155
  return t === "$lodash$" ? `${e}` : `${t}${e}`;
131
156
  }
132
- const we = g(Wt)(({ theme: t }) => ({
157
+ const Xe = m(oe)(({ theme: t }) => ({
133
158
  "& .MuiInputAdornment-positionStart": {
134
159
  paddingLeft: t.spacing(2),
135
160
  "&.MuiInputAdornment-sizeSmall": {
@@ -145,64 +170,64 @@ const we = g(Wt)(({ theme: t }) => ({
145
170
  "&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple": {
146
171
  paddingRight: t.spacing(7)
147
172
  }
148
- })), Be = g(mt)(() => ({
173
+ })), Qe = m($t)(() => ({
149
174
  display: "none"
150
175
  }));
151
- function Se({
176
+ function to({
152
177
  children: t,
153
178
  placeholder: e,
154
- size: n = "small",
155
- displayEmpty: o,
156
- menuProps: a,
157
- inputProps: r,
158
- labelId: l,
159
- label: s,
160
- labelSecondary: c,
161
- helperText: p,
162
- name: h,
163
- error: d,
164
- focused: m,
165
- disabled: u,
179
+ size: o = "small",
180
+ displayEmpty: r,
181
+ menuProps: i,
182
+ inputProps: l,
183
+ labelId: a,
184
+ label: c,
185
+ labelSecondary: d,
186
+ helperText: u,
187
+ name: p,
188
+ error: s,
189
+ focused: b,
190
+ disabled: g,
166
191
  fullWidth: f,
167
- required: M,
168
- "aria-label": b,
169
- ...I
170
- }, k) {
171
- const D = n === "small", [x] = $(() => Ie("select-label-")), C = s ? l ?? x : void 0;
172
- return /* @__PURE__ */ y(
173
- Et,
192
+ required: y,
193
+ "aria-label": h,
194
+ ...w
195
+ }, M) {
196
+ const A = o === "small", [C] = B(() => Ke("select-label-")), k = c ? a ?? C : void 0;
197
+ return /* @__PURE__ */ x(
198
+ Bt,
174
199
  {
175
- size: n,
176
- error: d,
177
- focused: m,
178
- disabled: u,
200
+ size: o,
201
+ error: s,
202
+ focused: b,
203
+ disabled: g,
179
204
  fullWidth: f,
180
- required: M,
205
+ required: y,
181
206
  "data-name": "select-field",
182
- "data-size": n,
207
+ "data-size": o,
183
208
  children: [
184
- /* @__PURE__ */ y(v, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
185
- s && /* @__PURE__ */ i(Ht, { shrink: !0, id: C, children: s }),
186
- c && /* @__PURE__ */ i(v, { display: "flex", alignItems: "center", ml: 2, mb: 0.5, children: c })
209
+ /* @__PURE__ */ x(D, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
210
+ c && /* @__PURE__ */ n(Tt, { shrink: !0, id: k, children: c }),
211
+ d && /* @__PURE__ */ n(D, { display: "flex", alignItems: "center", ml: 2, mb: 0.5, children: d })
187
212
  ] }),
188
- /* @__PURE__ */ y(
189
- we,
213
+ /* @__PURE__ */ x(
214
+ Xe,
190
215
  {
191
- ...I,
192
- labelId: C,
193
- name: h,
194
- ref: k,
195
- size: n,
216
+ ...w,
217
+ labelId: k,
218
+ name: p,
219
+ ref: M,
220
+ size: o,
196
221
  fullWidth: f,
197
- displayEmpty: o ?? !!e,
222
+ displayEmpty: r ?? !!e,
198
223
  inputProps: {
199
- ...r,
200
- "aria-label": b
224
+ ...l,
225
+ "aria-label": h
201
226
  },
202
227
  MenuProps: {
203
- ...a,
228
+ ...i,
204
229
  PopoverClasses: {
205
- paper: D ? "MuiMenu-paper-sizeSmall" : void 0
230
+ paper: A ? "MuiMenu-paper-sizeSmall" : void 0
206
231
  },
207
232
  anchorOrigin: {
208
233
  vertical: "bottom",
@@ -214,10 +239,10 @@ function Se({
214
239
  }
215
240
  },
216
241
  children: [
217
- e && /* @__PURE__ */ i(Be, { disabled: !0, value: "", children: /* @__PURE__ */ i(
218
- S,
242
+ e && /* @__PURE__ */ n(Qe, { disabled: !0, value: "", children: /* @__PURE__ */ n(
243
+ F,
219
244
  {
220
- variant: D ? "body2" : "body1",
245
+ variant: A ? "body2" : "body1",
221
246
  color: "text.hint",
222
247
  component: "span",
223
248
  children: e
@@ -227,30 +252,30 @@ function Se({
227
252
  ]
228
253
  }
229
254
  ),
230
- p && /* @__PURE__ */ i(ht, { "aria-label": `${h}-helper`, children: p })
255
+ u && /* @__PURE__ */ n(J, { "aria-label": `${p}-helper`, children: u })
231
256
  ]
232
257
  }
233
258
  );
234
259
  }
235
- const Te = T(Se), $e = g(_t, {
260
+ const eo = O(to), oo = m(re, {
236
261
  shouldForwardProp: (t) => t !== "variant" && t !== "backgroundColor"
237
- })(({ variant: t, backgroundColor: e, theme: n }) => ({
262
+ })(({ variant: t, backgroundColor: e, theme: o }) => ({
238
263
  // Variants
239
264
  ...t === "contained" && {
240
265
  boxShadow: "none"
241
266
  },
242
267
  ...t === "unbounded" && {
243
268
  boxShadow: "none",
244
- borderRadius: n.spacing(0.5),
269
+ borderRadius: o.spacing(0.5),
245
270
  "& .MuiDivider-root": {
246
- height: n.spacing(4),
271
+ height: o.spacing(4),
247
272
  "&.MuiToggleButtonGroup-groupedHorizontal": {
248
- height: n.spacing(4)
273
+ height: o.spacing(4)
249
274
  },
250
275
  "&.MuiToggleButtonGroup-groupedVertical": {
251
276
  height: "auto",
252
- width: n.spacing(4),
253
- margin: `${n.spacing(0.5, 0, 1)} !important`,
277
+ width: o.spacing(4),
278
+ margin: `${o.spacing(0.5, 0, 1)} !important`,
254
279
  borderRadius: "0 !important"
255
280
  }
256
281
  },
@@ -260,11 +285,11 @@ const Te = T(Se), $e = g(_t, {
260
285
  margin: 0
261
286
  },
262
287
  "& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal": {
263
- height: n.spacing(3)
288
+ height: o.spacing(3)
264
289
  },
265
290
  "& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical": {
266
291
  height: "auto",
267
- width: n.spacing(3)
292
+ width: o.spacing(3)
268
293
  }
269
294
  },
270
295
  ".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)": {
@@ -273,17 +298,17 @@ const Te = T(Se), $e = g(_t, {
273
298
  marginLeft: 0
274
299
  },
275
300
  "&:not(:last-of-type)": {
276
- marginRight: n.spacing(0.5)
301
+ marginRight: o.spacing(0.5)
277
302
  }
278
303
  },
279
304
  "&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)": {
280
305
  ".MuiToggleButtonGroup-grouped": {
281
- margin: n.spacing(0, 0.5)
306
+ margin: o.spacing(0, 0.5)
282
307
  }
283
308
  },
284
309
  "&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)": {
285
310
  ".MuiToggleButtonGroup-grouped": {
286
- margin: n.spacing(0, 0, 0.5),
311
+ margin: o.spacing(0, 0, 0.5),
287
312
  "&:not(:last-of-type)": {
288
313
  marginRight: 0
289
314
  },
@@ -295,32 +320,32 @@ const Te = T(Se), $e = g(_t, {
295
320
  },
296
321
  // Colors
297
322
  ...e === "primary" && {
298
- backgroundColor: n.palette.background.paper
323
+ backgroundColor: o.palette.background.paper
299
324
  },
300
325
  ...e === "secondary" && {
301
- backgroundColor: n.palette.background.default
326
+ backgroundColor: o.palette.background.default
302
327
  },
303
328
  ...e === "transparent" && {
304
329
  backgroundColor: "transparent"
305
330
  }
306
331
  }));
307
- function yo({
332
+ function Wn({
308
333
  children: t,
309
334
  variant: e = "floating",
310
- backgroundColor: n,
311
- ...o
335
+ backgroundColor: o,
336
+ ...r
312
337
  }) {
313
- return /* @__PURE__ */ i(
314
- $e,
338
+ return /* @__PURE__ */ n(
339
+ oo,
315
340
  {
316
- ...o,
341
+ ...r,
317
342
  variant: e,
318
- backgroundColor: n ?? (e === "unbounded" ? "transparent" : "primary"),
343
+ backgroundColor: o ?? (e === "unbounded" ? "transparent" : "primary"),
319
344
  children: t
320
345
  }
321
346
  );
322
347
  }
323
- const Re = g("div")(({ theme: t }) => ({
348
+ const ro = m("div")(({ theme: t }) => ({
324
349
  position: "relative",
325
350
  display: "inline-flex",
326
351
  // TODO: Remove this once we have a better way to handle the spacing between icon buttons:
@@ -328,7 +353,7 @@ const Re = g("div")(({ theme: t }) => ({
328
353
  "& + &, & + .optionIconButton": {
329
354
  marginLeft: t.spacing(0.5)
330
355
  }
331
- })), Fe = g(W, {
356
+ })), no = m(W, {
332
357
  shouldForwardProp: (t) => !["active"].includes(t)
333
358
  })(({ active: t, theme: e }) => ({
334
359
  ...t && {
@@ -339,122 +364,122 @@ const Re = g("div")(({ theme: t }) => ({
339
364
  }
340
365
  }
341
366
  }));
342
- function Oe({
367
+ function io({
343
368
  tooltip: t,
344
369
  tooltipPlacement: e = "top",
345
- icon: n,
346
- size: o = "medium",
347
- variant: a = "icon",
348
- color: r = "default",
349
- sx: l,
350
- className: s,
351
- loading: c,
352
- disabled: p,
353
- active: h,
354
- ...d
355
- }, m) {
356
- return /* @__PURE__ */ i(H, { placement: e, title: t ?? "", children: /* @__PURE__ */ i(
357
- Re,
370
+ icon: o,
371
+ size: r = "medium",
372
+ variant: i = "icon",
373
+ color: l = "default",
374
+ sx: a,
375
+ className: c,
376
+ loading: d,
377
+ disabled: u,
378
+ active: p,
379
+ ...s
380
+ }, b) {
381
+ return /* @__PURE__ */ n(P, { placement: e, title: t ?? "", children: /* @__PURE__ */ n(
382
+ ro,
358
383
  {
359
- className: `optionIconButton ${s ?? ""}`,
360
- sx: l,
384
+ className: `optionIconButton ${c ?? ""}`,
385
+ sx: a,
361
386
  "data-testid": "icon-button",
362
- children: /* @__PURE__ */ i(
363
- Fe,
387
+ children: /* @__PURE__ */ n(
388
+ no,
364
389
  {
365
- ...d,
366
- ref: m,
367
- size: o,
368
- variant: a,
369
- color: r,
370
- active: h,
371
- disabled: p || c,
390
+ ...s,
391
+ ref: b,
392
+ size: r,
393
+ variant: i,
394
+ color: l,
395
+ active: p,
396
+ disabled: u || d,
372
397
  role: "button",
373
- children: c ? /* @__PURE__ */ i(P, { size: 18, color: "inherit" }) : n
398
+ children: d ? /* @__PURE__ */ n(G, { size: 18, color: "inherit" }) : o
374
399
  }
375
400
  )
376
401
  }
377
402
  ) });
378
403
  }
379
- const Le = T(Oe), We = g(Pt, {
404
+ const q = O(io), ao = m(ne, {
380
405
  shouldForwardProp: (t) => !["extended", "width", "height"].includes(t)
381
- })(({ theme: t, extended: e, width: n, height: o }) => ({
406
+ })(({ theme: t, extended: e, width: o, height: r }) => ({
382
407
  ...e && {
383
408
  ".MuiMenuItem-root": {
384
409
  minHeight: t.spacing(6)
385
410
  }
386
411
  },
387
- ...n && {
412
+ ...o && {
388
413
  ".MuiList-root": {
389
- width: n,
390
- minWidth: n
414
+ width: o,
415
+ minWidth: o
391
416
  }
392
417
  },
393
- ...o && {
418
+ ...r && {
394
419
  ".MuiMenu-paper": {
395
420
  overflow: "hidden"
396
421
  },
397
422
  ".MuiList-root": {
398
- maxHeight: o
423
+ maxHeight: r
399
424
  }
400
425
  }
401
426
  }));
402
- function Ee({ extended: t, width: e, height: n, MenuListProps: o, ...a }, r) {
403
- return /* @__PURE__ */ i(
404
- We,
427
+ function lo({ extended: t, width: e, height: o, MenuListProps: r, ...i }, l) {
428
+ return /* @__PURE__ */ n(
429
+ ao,
405
430
  {
406
- ...a,
407
- ref: r,
431
+ ...i,
432
+ ref: l,
408
433
  "data-name": "menu",
409
434
  width: e,
410
- height: n,
435
+ height: o,
411
436
  extended: t,
412
437
  MenuListProps: {
413
- ...o,
438
+ ...r,
414
439
  "data-width": e,
415
- "data-height": n,
440
+ "data-height": o,
416
441
  "data-extended": t
417
442
  }
418
443
  }
419
444
  );
420
445
  }
421
- const Mo = T(Ee), He = g(Gt, {
446
+ const co = O(lo), so = m(ie, {
422
447
  shouldForwardProp: (t) => !["extended", "width", "height"].includes(t)
423
- })(({ theme: t, extended: e, width: n, height: o }) => ({
448
+ })(({ theme: t, extended: e, width: o, height: r }) => ({
424
449
  ...e && {
425
450
  ".MuiMenuItem-root": {
426
451
  minHeight: t.spacing(6)
427
452
  }
428
453
  },
429
454
  "&.MuiList-root": {
430
- ...n && {
431
- width: n,
432
- minWidth: n
433
- },
434
455
  ...o && {
435
- maxHeight: o
456
+ width: o,
457
+ minWidth: o
458
+ },
459
+ ...r && {
460
+ maxHeight: r
436
461
  }
437
462
  }
438
463
  }));
439
- function _e({ extended: t, width: e, height: n, ...o }, a) {
440
- return /* @__PURE__ */ i(
441
- He,
464
+ function uo({ extended: t, width: e, height: o, ...r }, i) {
465
+ return /* @__PURE__ */ n(
466
+ so,
442
467
  {
443
- ...o,
444
- ref: a,
468
+ ...r,
469
+ ref: i,
445
470
  width: e,
446
- height: n,
471
+ height: o,
447
472
  extended: t,
448
473
  "data-name": "menu-list",
449
474
  "data-width": e,
450
- "data-height": n,
475
+ "data-height": o,
451
476
  "data-extended": t
452
477
  }
453
478
  );
454
479
  }
455
- const Co = T(_e), Pe = g(vt)(() => ({
480
+ const En = O(uo), po = m(Y)(() => ({
456
481
  marginTop: "0 !important"
457
- })), Ge = g(jt)(
482
+ })), go = m(ae)(
458
483
  ({ disabled: t, theme: e }) => ({
459
484
  display: "flex",
460
485
  alignItems: "center",
@@ -467,87 +492,87 @@ const Co = T(_e), Pe = g(vt)(() => ({
467
492
  }
468
493
  })
469
494
  );
470
- function je({
495
+ function fo({
471
496
  areAllSelected: t,
472
497
  areAnySelected: e,
473
- selectAll: n,
474
- selectAllDisabled: o,
475
- "aria-label": a,
476
- "data-testid": r
477
- }, l) {
478
- const s = F(), c = R(s);
479
- return /* @__PURE__ */ i(
480
- Pe,
498
+ selectAll: o,
499
+ selectAllDisabled: r,
500
+ "aria-label": i,
501
+ "data-testid": l
502
+ }, a) {
503
+ const c = R(), d = T(c);
504
+ return /* @__PURE__ */ n(
505
+ po,
481
506
  {
482
- ref: l,
507
+ ref: a,
483
508
  fixed: !0,
484
509
  "data-name": "menu-filter",
485
- "aria-label": a,
486
- "data-testid": r,
487
- children: /* @__PURE__ */ y(
488
- Ge,
510
+ "aria-label": i,
511
+ "data-testid": l,
512
+ children: /* @__PURE__ */ x(
513
+ go,
489
514
  {
490
515
  variant: "body2",
491
516
  color: "textPrimary",
492
517
  component: "button",
493
518
  underline: "none",
494
- disabled: !!o,
495
- onClick: n,
519
+ disabled: !!r,
520
+ onClick: o,
496
521
  tabIndex: 0,
497
522
  children: [
498
- /* @__PURE__ */ i(
499
- z,
523
+ /* @__PURE__ */ n(
524
+ at,
500
525
  {
501
526
  checked: t,
502
527
  indeterminate: e && !t,
503
- disabled: o
528
+ disabled: r
504
529
  }
505
530
  ),
506
- c.formatMessage({ id: "c4r.form.selectAll" })
531
+ d.formatMessage({ id: "c4r.form.selectAll" })
507
532
  ]
508
533
  }
509
534
  )
510
535
  }
511
536
  );
512
537
  }
513
- const kt = T(je);
514
- function Ve({
538
+ const Ht = O(fo);
539
+ function mo({
515
540
  selectedOptions: t,
516
541
  options: e,
517
- onChange: n
542
+ onChange: o
518
543
  }) {
519
- const [o, a] = $(t ?? []), r = e.length === o.length, l = o.length > 0;
520
- return _(() => {
521
- o !== t && a(o);
544
+ const [r, i] = B(t ?? []), l = e.length === r.length, a = r.length > 0;
545
+ return z(() => {
546
+ r !== t && i(r);
522
547
  }, [t]), {
523
- areAllSelected: r,
524
- areAnySelected: l,
525
- currentOptions: o,
526
- handleChange: (h) => {
548
+ areAllSelected: l,
549
+ areAnySelected: a,
550
+ currentOptions: r,
551
+ handleChange: (p) => {
527
552
  const {
528
- target: { value: d }
529
- } = h, m = typeof d == "string" ? d.split(",") : d.filter((u) => u !== void 0);
530
- a(m), n(m);
553
+ target: { value: s }
554
+ } = p, b = typeof s == "string" ? s.split(",") : s.filter((g) => g !== void 0);
555
+ i(b), o(b);
531
556
  },
532
557
  selectAll: () => {
533
- const h = e == null ? void 0 : e.filter(({ disabled: d }) => !d).map(({ value: d }) => d);
534
- h && (h.every(
535
- (m) => o.includes(m)
536
- ) ? (a([]), n([])) : (a(h), n(h)));
558
+ const p = e == null ? void 0 : e.filter(({ disabled: s }) => !s).map(({ value: s }) => s);
559
+ p && (p.every(
560
+ (b) => r.includes(b)
561
+ ) ? (i([]), o([])) : (i(p), o(p)));
537
562
  },
538
563
  unselectAll: () => {
539
- a([]), n([]);
564
+ i([]), o([]);
540
565
  }
541
566
  };
542
567
  }
543
- const Ne = g(mt)(({ theme: t }) => ({
568
+ const bo = m($t)(({ theme: t }) => ({
544
569
  "&.Mui-disabled": {
545
570
  pointerEvents: "auto",
546
571
  "&:hover": {
547
572
  backgroundColor: `${t.palette.background.default} !important`
548
573
  }
549
574
  }
550
- })), Ue = g(q, {
575
+ })), ho = m(it, {
551
576
  shouldForwardProp: (t) => t !== "size"
552
577
  })(({ theme: t, size: e }) => ({
553
578
  display: "none",
@@ -564,86 +589,86 @@ const Ne = g(mt)(({ theme: t }) => ({
564
589
  top: t.spacing(3),
565
590
  right: t.spacing(5)
566
591
  }
567
- })), Ye = [], qe = () => {
592
+ })), xo = [], yo = () => {
568
593
  };
569
- function ze({
570
- options: t = Ye,
594
+ function Co({
595
+ options: t = xo,
571
596
  selectedOptions: e,
572
- size: n = "small",
573
- placeholder: o,
574
- showCounter: a,
575
- showFilters: r = !0,
576
- onChange: l = qe,
577
- selectAllDisabled: s,
578
- tooltipPlacement: c,
579
- variant: p,
580
- ...h
581
- }, d) {
597
+ size: o = "small",
598
+ placeholder: r,
599
+ showCounter: i,
600
+ showFilters: l = !0,
601
+ onChange: a = yo,
602
+ selectAllDisabled: c,
603
+ tooltipPlacement: d,
604
+ variant: u,
605
+ ...p
606
+ }, s) {
582
607
  const {
583
- areAllSelected: m,
584
- areAnySelected: u,
608
+ areAllSelected: b,
609
+ areAnySelected: g,
585
610
  currentOptions: f,
586
- handleChange: M,
587
- selectAll: b,
588
- unselectAll: I
589
- } = Ve({
611
+ handleChange: y,
612
+ selectAll: h,
613
+ unselectAll: w
614
+ } = mo({
590
615
  options: t,
591
616
  selectedOptions: e,
592
- onChange: l
593
- }), k = n === "small", D = k || p === "standard" ? 0 : 2, x = F(), C = R(x), B = `${f.length} ${C.formatMessage({
617
+ onChange: a
618
+ }), M = o === "small", A = M || u === "standard" ? 0 : 2, C = R(), k = T(C), v = `${f.length} ${k.formatMessage({
594
619
  id: "c4r.form.selected"
595
- })}`, O = pt(() => m ? /* @__PURE__ */ i(
596
- S,
620
+ })}`, $ = At(() => b ? /* @__PURE__ */ n(
621
+ F,
597
622
  {
598
623
  component: "span",
599
- variant: k ? "body2" : "body1",
624
+ variant: M ? "body2" : "body1",
600
625
  color: "textPrimary",
601
- ml: D,
602
- children: C.formatMessage({ id: "c4r.form.allSelected" })
626
+ ml: A,
627
+ children: k.formatMessage({ id: "c4r.form.allSelected" })
603
628
  }
604
- ) : u ? /* @__PURE__ */ i(
605
- S,
629
+ ) : g ? /* @__PURE__ */ n(
630
+ F,
606
631
  {
607
632
  component: "span",
608
- variant: k ? "body2" : "body1",
633
+ variant: M ? "body2" : "body1",
609
634
  color: "textPrimary",
610
- ml: D,
611
- children: a && f.length > 1 ? B : f.join(", ")
635
+ ml: A,
636
+ children: i && f.length > 1 ? v : f.join(", ")
612
637
  }
613
- ) : /* @__PURE__ */ i(
614
- S,
638
+ ) : /* @__PURE__ */ n(
639
+ F,
615
640
  {
616
641
  component: "span",
617
- variant: k ? "body2" : "body1",
642
+ variant: M ? "body2" : "body1",
618
643
  color: "text.hint",
619
- ml: D,
620
- children: o ?? C.formatMessage({ id: "c4r.form.noneSelected" })
644
+ ml: A,
645
+ children: r ?? k.formatMessage({ id: "c4r.form.noneSelected" })
621
646
  }
622
647
  ), [
623
- m,
624
- u,
625
- B,
648
+ b,
649
+ g,
650
+ v,
626
651
  f,
627
- C,
628
652
  k,
629
- D,
630
- o,
631
- a
653
+ M,
654
+ A,
655
+ r,
656
+ i
632
657
  ]);
633
- return /* @__PURE__ */ y(
634
- Te,
658
+ return /* @__PURE__ */ x(
659
+ eo,
635
660
  {
636
- ...h,
637
- ref: d,
661
+ ...p,
662
+ ref: s,
638
663
  multiple: !0,
639
664
  displayEmpty: !0,
640
- placeholder: o,
665
+ placeholder: r,
641
666
  value: f,
642
- renderValue: () => O,
643
- onChange: M,
644
- size: n,
645
- variant: p,
646
- endAdornment: r && u && /* @__PURE__ */ i(Ue, { position: "end", size: n, children: /* @__PURE__ */ i(W, { onClick: I, size: n, children: /* @__PURE__ */ i(yt, {}) }) }),
667
+ renderValue: () => $,
668
+ onChange: y,
669
+ size: o,
670
+ variant: u,
671
+ endAdornment: l && g && /* @__PURE__ */ n(ho, { position: "end", size: o, children: /* @__PURE__ */ n(W, { onClick: w, size: o, children: /* @__PURE__ */ n(Ft, {}) }) }),
647
672
  menuProps: {
648
673
  PaperProps: {
649
674
  sx: {
@@ -654,50 +679,50 @@ function ze({
654
679
  }
655
680
  },
656
681
  children: [
657
- r && /* @__PURE__ */ i(
658
- kt,
682
+ l && /* @__PURE__ */ n(
683
+ Ht,
659
684
  {
660
- areAllSelected: m,
661
- areAnySelected: u,
662
- selectAll: b,
663
- selectAllDisabled: s
685
+ areAllSelected: b,
686
+ areAnySelected: g,
687
+ selectAll: h,
688
+ selectAllDisabled: c
664
689
  }
665
690
  ),
666
- t == null ? void 0 : t.map((w) => {
667
- const E = /* @__PURE__ */ y(
668
- Ne,
691
+ t == null ? void 0 : t.map((I) => {
692
+ const E = /* @__PURE__ */ x(
693
+ bo,
669
694
  {
670
- value: w.value,
671
- disabled: w.disabled,
695
+ value: I.value,
696
+ disabled: I.disabled,
672
697
  tabIndex: 0,
673
698
  children: [
674
- /* @__PURE__ */ i(
675
- z,
699
+ /* @__PURE__ */ n(
700
+ at,
676
701
  {
677
- disabled: w.disabled,
678
- checked: f.includes(w.value)
702
+ disabled: I.disabled,
703
+ checked: f.includes(I.value)
679
704
  }
680
705
  ),
681
- /* @__PURE__ */ i(bt, { primary: w.label })
706
+ /* @__PURE__ */ n(U, { primary: I.label })
682
707
  ]
683
708
  },
684
- w.value
709
+ I.value
685
710
  );
686
- return w.tooltip ? /* @__PURE__ */ i(
687
- H,
711
+ return I.tooltip ? /* @__PURE__ */ n(
712
+ P,
688
713
  {
689
- title: w.tooltip,
690
- placement: c,
714
+ title: I.tooltip,
715
+ placement: d,
691
716
  children: E
692
717
  },
693
- w.value
718
+ I.value
694
719
  ) : E;
695
720
  })
696
721
  ]
697
722
  }
698
723
  );
699
724
  }
700
- const vo = T(ze), Ze = g(ft, {
725
+ const Hn = O(Co), Mo = m(It, {
701
726
  shouldForwardProp: (t) => t !== "cursor"
702
727
  })(
703
728
  ({ cursor: t, theme: e }) => ({
@@ -725,402 +750,402 @@ const vo = T(ze), Ze = g(ft, {
725
750
  }
726
751
  })
727
752
  );
728
- function Je({
753
+ function ko({
729
754
  buttonText: t,
730
755
  hasFiles: e,
731
- size: n,
732
- error: o,
733
- disabled: a,
734
- handleReset: r,
735
- handleOpen: l,
736
- inProgress: s
756
+ size: o,
757
+ error: r,
758
+ disabled: i,
759
+ handleReset: l,
760
+ handleOpen: a,
761
+ inProgress: c
737
762
  }) {
738
- return /* @__PURE__ */ i(q, { position: "end", children: s ? /* @__PURE__ */ i(W, { "aria-label": "Loading", disabled: !0, size: n, children: /* @__PURE__ */ i(P, { size: 18 }) }) : e ? /* @__PURE__ */ i(
763
+ return /* @__PURE__ */ n(it, { position: "end", children: c ? /* @__PURE__ */ n(W, { "aria-label": "Loading", disabled: !0, size: o, children: /* @__PURE__ */ n(G, { size: 18 }) }) : e ? /* @__PURE__ */ n(
739
764
  W,
740
765
  {
741
- onClick: r,
742
- size: n,
766
+ onClick: l,
767
+ size: o,
743
768
  "aria-label": "Delete",
744
- disabled: a,
745
- children: /* @__PURE__ */ i(yt, {})
769
+ disabled: i,
770
+ children: /* @__PURE__ */ n(Ft, {})
746
771
  }
747
- ) : /* @__PURE__ */ i(
748
- gt,
772
+ ) : /* @__PURE__ */ n(
773
+ St,
749
774
  {
750
- onClick: l,
751
- size: n,
775
+ onClick: a,
776
+ size: o,
752
777
  variant: "text",
753
- color: o ? "default" : "primary",
754
- disabled: a,
778
+ color: r ? "default" : "primary",
779
+ disabled: i,
755
780
  children: t
756
781
  }
757
782
  ) });
758
783
  }
759
- function Xe({
784
+ function vo({
760
785
  name: t,
761
786
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
762
787
  multiple: e,
763
788
  // multiple prop defined here for compatibility with cloud-native but not used in the component
764
- handleReset: n,
765
- handleOpen: o,
766
- dragOver: a,
767
- error: r,
768
- placeholder: l,
769
- focused: s,
770
- buttonText: c = "Browse",
771
- inProgress: p,
772
- InputProps: h,
773
- size: d = "small",
774
- hasFiles: m,
775
- cursor: u = "pointer",
789
+ handleReset: o,
790
+ handleOpen: r,
791
+ dragOver: i,
792
+ error: l,
793
+ placeholder: a,
794
+ focused: c,
795
+ buttonText: d = "Browse",
796
+ inProgress: u,
797
+ InputProps: p,
798
+ size: s = "small",
799
+ hasFiles: b,
800
+ cursor: g = "pointer",
776
801
  ...f
777
802
  }) {
778
- return /* @__PURE__ */ i(
779
- Ze,
803
+ return /* @__PURE__ */ n(
804
+ Mo,
780
805
  {
781
806
  ...f,
782
- size: d,
783
- error: r,
784
- placeholder: l,
785
- focused: s ?? a,
786
- cursor: u,
807
+ size: s,
808
+ error: l,
809
+ placeholder: a,
810
+ focused: c ?? i,
811
+ cursor: g,
787
812
  InputProps: {
788
- ...h,
813
+ ...p,
789
814
  name: t,
790
815
  // multiple prop cannot be used here because it is not a valid prop for TextField InputProps
791
816
  // not used for any UI logic
792
817
  readOnly: !0,
793
- endAdornment: /* @__PURE__ */ i(
794
- Je,
818
+ endAdornment: /* @__PURE__ */ n(
819
+ ko,
795
820
  {
796
- buttonText: c,
797
- hasFiles: m,
798
- size: d,
799
- error: r,
800
- disabled: !!a,
801
- handleReset: n,
802
- handleOpen: o,
803
- inProgress: p
821
+ buttonText: d,
822
+ hasFiles: b,
823
+ size: s,
824
+ error: l,
825
+ disabled: !!i,
826
+ handleReset: o,
827
+ handleOpen: r,
828
+ inProgress: u
804
829
  }
805
830
  )
806
831
  }
807
832
  }
808
833
  );
809
834
  }
810
- function Ke({
835
+ function wo({
811
836
  onChange: t,
812
837
  files: e,
813
- multiple: n,
814
- placeholder: o,
815
- uploadInputRef: a
838
+ multiple: o,
839
+ placeholder: r,
840
+ uploadInputRef: i
816
841
  }) {
817
- const r = F(), l = R(r), [s, c] = $(""), [p, h] = $(!1);
818
- _(() => {
819
- !e || e.length === 0 ? c("") : e.length === 1 ? c(e[0].name) : c(
820
- l.formatMessage(
842
+ const l = R(), a = T(l), [c, d] = B(""), [u, p] = B(!1);
843
+ z(() => {
844
+ !e || e.length === 0 ? d("") : e.length === 1 ? d(e[0].name) : d(
845
+ a.formatMessage(
821
846
  { id: "c4r.form.filesSelected" },
822
847
  { count: e.length }
823
848
  )
824
849
  );
825
- }, [e, l]);
826
- const d = () => {
827
- var x;
828
- (x = a.current) == null || x.click();
829
- }, m = (x) => {
830
- x.preventDefault(), h(!0);
831
- }, u = (x) => {
832
- x.preventDefault(), h(!1);
833
- }, f = (x) => {
834
- x.preventDefault(), h(!1);
835
- const C = x.dataTransfer.items, B = M(C);
836
- t == null || t(B);
837
- }, M = (x) => {
838
- const C = [];
839
- for (const B of Array.from(x))
840
- if (B.kind === "file") {
841
- const O = B.getAsFile();
842
- C.push(O);
850
+ }, [e, a]);
851
+ const s = () => {
852
+ var C;
853
+ (C = i.current) == null || C.click();
854
+ }, b = (C) => {
855
+ C.preventDefault(), p(!0);
856
+ }, g = (C) => {
857
+ C.preventDefault(), p(!1);
858
+ }, f = (C) => {
859
+ C.preventDefault(), p(!1);
860
+ const k = C.dataTransfer.items, v = y(k);
861
+ t == null || t(v);
862
+ }, y = (C) => {
863
+ const k = [];
864
+ for (const v of Array.from(C))
865
+ if (v.kind === "file") {
866
+ const $ = v.getAsFile();
867
+ k.push($);
843
868
  }
844
- return C;
845
- }, b = (x) => {
846
- const C = Array.from(x.target.files);
847
- t == null || t(C);
848
- }, I = (x) => {
849
- x.stopPropagation(), c("");
850
- }, k = pt(() => {
851
- const x = l.formatMessage(
869
+ return k;
870
+ }, h = (C) => {
871
+ const k = Array.from(C.target.files);
872
+ t == null || t(k);
873
+ }, w = (C) => {
874
+ C.stopPropagation(), d("");
875
+ }, M = At(() => {
876
+ const C = a.formatMessage(
852
877
  { id: "c4r.form.dragPlaceholder" },
853
- { count: n ? 0 : 1 }
854
- ), C = l.formatMessage(
878
+ { count: o ? 0 : 1 }
879
+ ), k = a.formatMessage(
855
880
  { id: "c4r.form.dragActivePlaceholder" },
856
- { count: n ? 0 : 1 }
881
+ { count: o ? 0 : 1 }
857
882
  );
858
- let B = "";
859
- return p ? B = C : B = o ?? x, B;
860
- }, [p, n, o, l]);
883
+ let v = "";
884
+ return u ? v = k : v = r ?? C, v;
885
+ }, [u, o, r, a]);
861
886
  return {
862
- filesText: s,
863
- getPlaceholder: k,
864
- dragOver: p,
887
+ filesText: c,
888
+ getPlaceholder: M,
889
+ dragOver: u,
865
890
  inputEvents: {
866
- onDragOver: m,
867
- onDragLeave: u,
891
+ onDragOver: b,
892
+ onDragLeave: g,
868
893
  onDrop: f,
869
- onClick: d
894
+ onClick: s
870
895
  },
871
- handleFiles: b,
872
- handleReset: I
896
+ handleFiles: h,
897
+ handleReset: w
873
898
  };
874
899
  }
875
- const Qe = ["application/JSON"];
876
- function ko({
900
+ const Do = ["application/JSON"];
901
+ function Pn({
877
902
  name: t,
878
903
  buttonText: e,
879
- accept: n,
880
- files: o,
881
- inProgress: a,
882
- onChange: r,
883
- multiple: l,
884
- placeholder: s,
885
- error: c,
886
- focused: p,
887
- nativeInputProps: h,
888
- ...d
904
+ accept: o,
905
+ files: r,
906
+ inProgress: i,
907
+ onChange: l,
908
+ multiple: a,
909
+ placeholder: c,
910
+ error: d,
911
+ focused: u,
912
+ nativeInputProps: p,
913
+ ...s
889
914
  }) {
890
- const m = n ?? Qe, u = Y(null), {
915
+ const b = o ?? Do, g = Z(null), {
891
916
  filesText: f,
892
- getPlaceholder: M,
893
- dragOver: b,
894
- inputEvents: I,
895
- handleFiles: k,
896
- handleReset: D
897
- } = Ke({
898
- uploadInputRef: u,
899
- files: o,
900
- onChange: r,
901
- multiple: l,
902
- placeholder: s
917
+ getPlaceholder: y,
918
+ dragOver: h,
919
+ inputEvents: w,
920
+ handleFiles: M,
921
+ handleReset: A
922
+ } = wo({
923
+ uploadInputRef: g,
924
+ files: r,
925
+ onChange: l,
926
+ multiple: a,
927
+ placeholder: c
903
928
  });
904
- return /* @__PURE__ */ y(V, { children: [
905
- /* @__PURE__ */ i(
906
- Xe,
929
+ return /* @__PURE__ */ x(H, { children: [
930
+ /* @__PURE__ */ n(
931
+ vo,
907
932
  {
908
- ...d,
909
- placeholder: M,
933
+ ...s,
934
+ placeholder: y,
910
935
  value: f,
911
- error: c,
912
- focused: p ?? b,
913
- handleReset: D,
914
- dragOver: b,
915
- inProgress: a,
936
+ error: d,
937
+ focused: u ?? h,
938
+ handleReset: A,
939
+ dragOver: h,
940
+ inProgress: i,
916
941
  hasFiles: !!f,
917
- InputProps: I,
942
+ InputProps: w,
918
943
  buttonText: e
919
944
  }
920
945
  ),
921
- /* @__PURE__ */ i(
946
+ /* @__PURE__ */ n(
922
947
  "input",
923
948
  {
924
- ...h,
925
- ref: u,
949
+ ...p,
950
+ ref: g,
926
951
  style: { display: "none" },
927
952
  type: "file",
928
953
  "aria-label": t,
929
954
  name: t,
930
- accept: String(m),
931
- multiple: l,
932
- onChange: k
955
+ accept: String(b),
956
+ multiple: a,
957
+ onChange: M
933
958
  }
934
959
  )
935
960
  ] });
936
961
  }
937
- function tn({
962
+ function Ao({
938
963
  disabled: t,
939
964
  loading: e,
940
- ...n
941
- }, o) {
942
- return /* @__PURE__ */ i(
943
- Z,
965
+ ...o
966
+ }, r) {
967
+ return /* @__PURE__ */ n(
968
+ lt,
944
969
  {
945
- ...n,
946
- ref: o,
970
+ ...o,
971
+ ref: r,
947
972
  disabled: t || e,
948
- popupIcon: e ? /* @__PURE__ */ i(P, { size: 18, color: "inherit" }) : /* @__PURE__ */ i(X, {}),
973
+ popupIcon: e ? /* @__PURE__ */ n(G, { size: 18, color: "inherit" }) : /* @__PURE__ */ n(ct, {}),
949
974
  "data-name": "autocomplete",
950
975
  ListboxProps: {
951
976
  "aria-multiselectable": !1,
952
- ...n.ListboxProps
977
+ ...o.ListboxProps
953
978
  }
954
979
  }
955
980
  );
956
981
  }
957
- const Do = T(tn), Dt = (t) => t && typeof t == "object" ? t.title ?? String(t) : String(t), At = (t, e) => typeof t != "object" || t === null ? { value: t, multiple: e } : { ...t, multiple: e }, It = (t) => /* @__PURE__ */ i("span", { "data-testid": "more-options-tag", children: `+${t}` });
958
- function wt() {
959
- return { renderOption: (e, n, o, a, r) => {
982
+ const zn = O(Ao), Pt = (t) => t && typeof t == "object" ? t.title ?? String(t) : String(t), zt = (t, e) => typeof t != "object" || t === null ? { value: t, multiple: e } : { ...t, multiple: e }, Nt = (t) => /* @__PURE__ */ n("span", { "data-testid": "more-options-tag", children: `+${t}` });
983
+ function _t() {
984
+ return { renderOption: (e, o, r, i, l) => {
960
985
  const {
961
- title: l,
962
- inputValue: s,
963
- divider: c,
964
- fixed: p,
965
- extended: h,
966
- dense: d,
967
- destructive: m,
968
- disabled: u,
986
+ title: a,
987
+ inputValue: c,
988
+ divider: d,
989
+ fixed: u,
990
+ extended: p,
991
+ dense: s,
992
+ destructive: b,
993
+ disabled: g,
969
994
  subtitle: f,
970
- iconColor: M,
971
- startAdornment: b,
972
- endAdornment: I,
973
- alternativeTitle: k,
974
- secondaryText: D,
975
- multiple: x
976
- } = n, { key: C, ...B } = e, O = typeof n == "string" || typeof n == "number", w = (E, A, L, et) => L || et || (A && typeof A == "object" && "value" in A ? String(A.value) : E(A));
977
- return /* @__PURE__ */ i(Ot, { children: c ? /* @__PURE__ */ i(j, {}) : /* @__PURE__ */ y(V, { children: [
978
- s && /* @__PURE__ */ i(j, {}),
979
- /* @__PURE__ */ y(
980
- vt,
995
+ iconColor: y,
996
+ startAdornment: h,
997
+ endAdornment: w,
998
+ alternativeTitle: M,
999
+ secondaryText: A,
1000
+ multiple: C
1001
+ } = o, { key: k, ...v } = e, $ = typeof o == "string" || typeof o == "number", I = (E, S, L, V) => L || V || (S && typeof S == "object" && "value" in S ? String(S.value) : E(S));
1002
+ return /* @__PURE__ */ n(te, { children: d ? /* @__PURE__ */ n(_, {}) : /* @__PURE__ */ x(H, { children: [
1003
+ c && /* @__PURE__ */ n(_, {}),
1004
+ /* @__PURE__ */ x(
1005
+ Y,
981
1006
  {
982
- ...B,
983
- ...!O && {
984
- fixed: p,
985
- extended: h,
986
- dense: d,
987
- destructive: m,
988
- disabled: u,
1007
+ ...v,
1008
+ ...!$ && {
1009
+ fixed: u,
1010
+ extended: p,
1011
+ dense: s,
1012
+ destructive: b,
1013
+ disabled: g,
989
1014
  subtitle: f,
990
- iconColor: M
1015
+ iconColor: y
991
1016
  },
992
- "aria-disabled": f || u,
993
- "aria-selected": o.selected,
1017
+ "aria-disabled": f || g,
1018
+ "aria-selected": r.selected,
994
1019
  children: [
995
- !f && (b || x || r) && /* @__PURE__ */ y(Vt, { children: [
996
- r || x && /* @__PURE__ */ i(z, { checked: o.selected }),
997
- b
1020
+ !f && (h || C || l) && /* @__PURE__ */ x(rt, { children: [
1021
+ l || C && /* @__PURE__ */ n(at, { checked: r.selected }),
1022
+ h
998
1023
  ] }),
999
- /* @__PURE__ */ y(bt, { children: [
1000
- w(
1001
- a ?? Dt,
1002
- n,
1003
- k,
1004
- l
1024
+ /* @__PURE__ */ x(U, { children: [
1025
+ I(
1026
+ i ?? Pt,
1027
+ o,
1028
+ M,
1029
+ a
1005
1030
  ),
1006
- D && /* @__PURE__ */ i(
1007
- S,
1031
+ A && /* @__PURE__ */ n(
1032
+ F,
1008
1033
  {
1009
1034
  component: "p",
1010
1035
  variant: "caption",
1011
1036
  color: "text.secondary",
1012
- children: D
1037
+ children: A
1013
1038
  }
1014
1039
  )
1015
1040
  ] }),
1016
- !f && I
1041
+ !f && w
1017
1042
  ]
1018
1043
  }
1019
1044
  )
1020
- ] }) }, C);
1045
+ ] }) }, k);
1021
1046
  } };
1022
1047
  }
1023
- function en({
1048
+ function So({
1024
1049
  getOptionLabel: t,
1025
1050
  newItemLabel: e,
1026
- newItemIcon: n,
1027
- multiple: o
1051
+ newItemIcon: o,
1052
+ multiple: r
1028
1053
  }) {
1029
- const a = F(), r = R(a), l = Nt(), { renderOption: s } = wt();
1054
+ const i = R(), l = T(i), a = le(), { renderOption: c } = _t();
1030
1055
  return {
1031
- creatableFilterOptions: (d, m) => {
1032
- const u = l(
1033
- d,
1034
- m
1035
- ), { inputValue: f } = m, M = d.some(
1036
- (b) => f === t(b)
1056
+ creatableFilterOptions: (s, b) => {
1057
+ const g = a(
1058
+ s,
1059
+ b
1060
+ ), { inputValue: f } = b, y = s.some(
1061
+ (h) => f === t(h)
1037
1062
  );
1038
- if (f.length > 1 && f !== "" && !M) {
1039
- let b;
1040
- typeof e == "function" ? b = e(f) : e ? b = `${e} "${f}"` : b = `${r.formatMessage({ id: "c4r.form.add" })} "${f}"`, u.push({
1063
+ if (f.length > 1 && f !== "" && !y) {
1064
+ let h;
1065
+ typeof e == "function" ? h = e(f) : e ? h = `${e} "${f}"` : h = `${l.formatMessage({ id: "c4r.form.add" })} "${f}"`, g.push({
1041
1066
  inputValue: f,
1042
- title: b
1067
+ title: h
1043
1068
  });
1044
1069
  }
1045
- return u;
1070
+ return g;
1046
1071
  },
1047
- creatableOptionLabel: (d) => typeof d == "string" ? d : d.inputValue ? d.inputValue : t(d),
1048
- creatableRenderOption: (d, m, u) => {
1049
- const f = m.inputValue ? n ?? /* @__PURE__ */ i(de, {}) : void 0, M = At(m, !!o);
1050
- return s(
1051
- d,
1052
- M,
1053
- u,
1072
+ creatableOptionLabel: (s) => typeof s == "string" ? s : s.inputValue ? s.inputValue : t(s),
1073
+ creatableRenderOption: (s, b, g) => {
1074
+ const f = b.inputValue ? o ?? /* @__PURE__ */ n(Ae, {}) : void 0, y = zt(b, !!r);
1075
+ return c(
1076
+ s,
1077
+ y,
1078
+ g,
1054
1079
  t,
1055
1080
  f
1056
1081
  );
1057
1082
  }
1058
1083
  };
1059
1084
  }
1060
- function Bt({
1085
+ function Gt({
1061
1086
  options: t,
1062
1087
  value: e,
1063
- onChange: n,
1064
- getOptionLabel: o
1088
+ onChange: o,
1089
+ getOptionLabel: r
1065
1090
  }) {
1066
- const [a, r] = $(
1091
+ const [i, l] = B(
1067
1092
  Array.isArray(e) ? e : e ? [e] : []
1068
- ), { renderOption: l } = wt();
1069
- _(() => {
1070
- const m = Array.isArray(e) ? e : e ? [e] : [];
1071
- r(m);
1093
+ ), { renderOption: a } = _t();
1094
+ z(() => {
1095
+ const b = Array.isArray(e) ? e : e ? [e] : [];
1096
+ l(b);
1072
1097
  }, [e]);
1073
- const s = a.length === t.length, c = a.length > 0 && a.length < t.length;
1098
+ const c = i.length === t.length, d = i.length > 0 && i.length < t.length;
1074
1099
  return {
1075
- multipleValue: a,
1076
- allSelected: s,
1077
- someSelected: c,
1078
- handleSelectAll: (m) => {
1079
- const u = s ? [] : [...t];
1080
- r(u), n == null || n(
1081
- m,
1082
- u,
1100
+ multipleValue: i,
1101
+ allSelected: c,
1102
+ someSelected: d,
1103
+ handleSelectAll: (b) => {
1104
+ const g = c ? [] : [...t];
1105
+ l(g), o == null || o(
1106
+ b,
1107
+ g,
1083
1108
  "selectOption"
1084
1109
  );
1085
1110
  },
1086
- handleChange: (m, u, f) => {
1087
- r(u === null ? [] : u), n == null || n(m, u, f);
1111
+ handleChange: (b, g, f) => {
1112
+ l(g === null ? [] : g), o == null || o(b, g, f);
1088
1113
  },
1089
- multipleRenderOption: (m, u, f) => {
1090
- const M = At(u, !0);
1091
- return l(
1092
- m,
1093
- M,
1114
+ multipleRenderOption: (b, g, f) => {
1115
+ const y = zt(g, !0);
1116
+ return a(
1117
+ b,
1118
+ y,
1094
1119
  f,
1095
- o
1120
+ r
1096
1121
  );
1097
1122
  }
1098
1123
  };
1099
1124
  }
1100
- function nn({
1125
+ function Io({
1101
1126
  children: t,
1102
1127
  showFilters: e,
1103
- allSelected: n,
1104
- someSelected: o,
1105
- handleSelectAll: a = () => {
1128
+ allSelected: o,
1129
+ someSelected: r,
1130
+ handleSelectAll: i = () => {
1106
1131
  },
1107
- multiple: r,
1108
- ...l
1109
- }, s) {
1110
- return /* @__PURE__ */ y(
1132
+ multiple: l,
1133
+ ...a
1134
+ }, c) {
1135
+ return /* @__PURE__ */ x(
1111
1136
  "ul",
1112
1137
  {
1113
- ref: s,
1114
- ...l,
1138
+ ref: c,
1139
+ ...a,
1115
1140
  role: "listbox",
1116
- "aria-multiselectable": r,
1141
+ "aria-multiselectable": l,
1117
1142
  children: [
1118
- e && r && /* @__PURE__ */ i(
1119
- kt,
1143
+ e && l && /* @__PURE__ */ n(
1144
+ Ht,
1120
1145
  {
1121
- areAllSelected: !!n,
1122
- areAnySelected: !!o,
1123
- selectAll: a
1146
+ areAllSelected: !!o,
1147
+ areAnySelected: !!r,
1148
+ selectAll: i
1124
1149
  }
1125
1150
  ),
1126
1151
  t
@@ -1128,127 +1153,206 @@ function nn({
1128
1153
  }
1129
1154
  );
1130
1155
  }
1131
- const St = T(nn);
1132
- function on({
1156
+ const jt = O(Io);
1157
+ function $o({
1133
1158
  newItemLabel: t,
1134
1159
  newItemIcon: e,
1135
- getOptionLabel: n = Dt,
1136
- multiple: o,
1137
- disableCloseOnSelect: a,
1138
- disabled: r,
1139
- loading: l,
1140
- showFilters: s,
1141
- options: c = [],
1142
- value: p,
1143
- onChange: h,
1144
- getLimitTagsText: d,
1145
- ...m
1146
- }, u) {
1147
- const { freeSolo: f = !0, ...M } = m, {
1148
- multipleValue: b,
1149
- allSelected: I,
1150
- someSelected: k,
1151
- handleSelectAll: D,
1152
- handleChange: x
1153
- } = Bt({
1154
- options: c,
1155
- value: p,
1156
- onChange: h
1160
+ getOptionLabel: o = Pt,
1161
+ multiple: r,
1162
+ disableCloseOnSelect: i,
1163
+ disabled: l,
1164
+ loading: a,
1165
+ showFilters: c,
1166
+ options: d = [],
1167
+ value: u,
1168
+ onChange: p,
1169
+ getLimitTagsText: s,
1170
+ ...b
1171
+ }, g) {
1172
+ const { freeSolo: f = !0, ...y } = b, {
1173
+ multipleValue: h,
1174
+ allSelected: w,
1175
+ someSelected: M,
1176
+ handleSelectAll: A,
1177
+ handleChange: C
1178
+ } = Gt({
1179
+ options: d,
1180
+ value: u,
1181
+ onChange: p
1157
1182
  }), {
1158
- creatableFilterOptions: C,
1159
- creatableOptionLabel: B,
1160
- creatableRenderOption: O
1161
- } = en({
1162
- getOptionLabel: n,
1183
+ creatableFilterOptions: k,
1184
+ creatableOptionLabel: v,
1185
+ creatableRenderOption: $
1186
+ } = So({
1187
+ getOptionLabel: o,
1163
1188
  newItemLabel: t,
1164
1189
  newItemIcon: e,
1165
- multiple: o
1190
+ multiple: r
1166
1191
  });
1167
- return /* @__PURE__ */ i(
1168
- Z,
1192
+ return /* @__PURE__ */ n(
1193
+ lt,
1169
1194
  {
1170
- ...M,
1171
- ref: u,
1172
- options: c,
1173
- value: o ? b : p,
1174
- onChange: x,
1175
- filterOptions: C,
1176
- getOptionLabel: B,
1177
- renderOption: O,
1195
+ ...y,
1196
+ ref: g,
1197
+ options: d,
1198
+ value: r ? h : u,
1199
+ onChange: C,
1200
+ filterOptions: k,
1201
+ getOptionLabel: v,
1202
+ renderOption: $,
1178
1203
  freeSolo: f,
1179
1204
  forcePopupIcon: !0,
1180
- multiple: o,
1181
- disableCloseOnSelect: a ?? o,
1182
- ListboxComponent: St,
1205
+ multiple: r,
1206
+ disableCloseOnSelect: i ?? r,
1207
+ ListboxComponent: jt,
1183
1208
  ListboxProps: {
1184
- showFilters: s,
1185
- allSelected: I,
1186
- someSelected: k,
1187
- handleSelectAll: D,
1188
- multiple: o
1209
+ showFilters: c,
1210
+ allSelected: w,
1211
+ someSelected: M,
1212
+ handleSelectAll: A,
1213
+ multiple: r
1189
1214
  },
1190
- getLimitTagsText: d ?? It,
1191
- disabled: r || l,
1192
- popupIcon: l ? /* @__PURE__ */ i(P, { size: 18, color: "inherit" }) : /* @__PURE__ */ i(X, {}),
1215
+ getLimitTagsText: s ?? Nt,
1216
+ disabled: l || a,
1217
+ popupIcon: a ? /* @__PURE__ */ n(G, { size: 18, color: "inherit" }) : /* @__PURE__ */ n(ct, {}),
1193
1218
  "data-name": "creatable-autocomplete"
1194
1219
  }
1195
1220
  );
1196
1221
  }
1197
- const Ao = T(on);
1198
- function an({
1222
+ const Nn = O($o);
1223
+ function Bo({
1199
1224
  renderOption: t,
1200
1225
  disableCloseOnSelect: e = !0,
1201
- disabled: n,
1202
- loading: o,
1203
- showFilters: a,
1204
- options: r,
1205
- value: l,
1206
- onChange: s,
1207
- getOptionLabel: c,
1208
- getLimitTagsText: p,
1209
- ...h
1210
- }, d) {
1226
+ disabled: o,
1227
+ loading: r,
1228
+ showFilters: i,
1229
+ options: l,
1230
+ value: a,
1231
+ onChange: c,
1232
+ getOptionLabel: d,
1233
+ getLimitTagsText: u,
1234
+ ...p
1235
+ }, s) {
1211
1236
  const {
1212
- multipleValue: m,
1213
- allSelected: u,
1237
+ multipleValue: b,
1238
+ allSelected: g,
1214
1239
  someSelected: f,
1215
- handleSelectAll: M,
1216
- handleChange: b,
1217
- multipleRenderOption: I
1218
- } = Bt({
1219
- options: r,
1220
- value: l,
1221
- onChange: s,
1222
- getOptionLabel: c
1240
+ handleSelectAll: y,
1241
+ handleChange: h,
1242
+ multipleRenderOption: w
1243
+ } = Gt({
1244
+ options: l,
1245
+ value: a,
1246
+ onChange: c,
1247
+ getOptionLabel: d
1223
1248
  });
1224
- return /* @__PURE__ */ i(
1225
- Z,
1249
+ return /* @__PURE__ */ n(
1250
+ lt,
1226
1251
  {
1227
- ...h,
1228
- ref: d,
1229
- options: r,
1230
- value: m,
1231
- onChange: b,
1232
- getOptionLabel: c,
1233
- renderOption: t ?? I,
1234
- ListboxComponent: St,
1252
+ ...p,
1253
+ ref: s,
1254
+ options: l,
1255
+ value: b,
1256
+ onChange: h,
1257
+ getOptionLabel: d,
1258
+ renderOption: t ?? w,
1259
+ ListboxComponent: jt,
1235
1260
  ListboxProps: {
1236
- showFilters: a,
1237
- allSelected: u,
1261
+ showFilters: i,
1262
+ allSelected: g,
1238
1263
  someSelected: f,
1239
- handleSelectAll: M,
1264
+ handleSelectAll: y,
1240
1265
  multiple: !0
1241
1266
  },
1242
1267
  multiple: !0,
1243
- getLimitTagsText: p ?? It,
1268
+ getLimitTagsText: u ?? Nt,
1244
1269
  disableCloseOnSelect: e,
1245
- disabled: n || o,
1246
- popupIcon: o ? /* @__PURE__ */ i(P, { size: 18, color: "inherit" }) : /* @__PURE__ */ i(X, {}),
1270
+ disabled: o || r,
1271
+ popupIcon: r ? /* @__PURE__ */ n(G, { size: 18, color: "inherit" }) : /* @__PURE__ */ n(ct, {}),
1247
1272
  "data-name": "multiple-autocomplete"
1248
1273
  }
1249
1274
  );
1250
1275
  }
1251
- const Io = T(an), rn = g("div", {
1276
+ const _n = O(Bo), To = ({
1277
+ children: t,
1278
+ disabled: e,
1279
+ value: o,
1280
+ onCopied: r,
1281
+ copyText: i = "c4r.button.copy",
1282
+ copiedText: l = "c4r.notifications.copiedToClipboard",
1283
+ button: a,
1284
+ buttonLabel: c,
1285
+ buttonProps: d,
1286
+ ariaLabel: u,
1287
+ dataTestId: p,
1288
+ tooltipPlacement: s = "top",
1289
+ ...b
1290
+ }, g) => {
1291
+ const f = R(), y = T(f), [h, w] = B(!1), { copy: M } = Vt(i, l), A = (C) => {
1292
+ C.preventDefault(), M(o).then(() => {
1293
+ r == null || r(), w(!0);
1294
+ }).catch(console.error);
1295
+ };
1296
+ return /* @__PURE__ */ x(H, { children: [
1297
+ /* @__PURE__ */ n(
1298
+ P,
1299
+ {
1300
+ title: y.formatMessage({ id: i }),
1301
+ leaveDelay: 0,
1302
+ placement: s,
1303
+ children: /* @__PURE__ */ x(
1304
+ D,
1305
+ {
1306
+ ...b,
1307
+ sx: { cursor: e ? void 0 : "pointer" },
1308
+ onClick: A,
1309
+ "data-name": "copiable",
1310
+ ref: g,
1311
+ children: [
1312
+ t,
1313
+ a && /* @__PURE__ */ n(
1314
+ q,
1315
+ {
1316
+ ...d,
1317
+ disabled: e,
1318
+ icon: /* @__PURE__ */ n(Lt, {}),
1319
+ "data-testid": p,
1320
+ "aria-label": u || c,
1321
+ sx: {
1322
+ display: "flex"
1323
+ }
1324
+ }
1325
+ )
1326
+ ]
1327
+ }
1328
+ )
1329
+ }
1330
+ ),
1331
+ /* @__PURE__ */ n(
1332
+ dt,
1333
+ {
1334
+ open: h,
1335
+ autoWidth: !0,
1336
+ closeable: !1,
1337
+ autoHideDuration: 4e3,
1338
+ onClose: () => w(!1),
1339
+ children: y.formatMessage({ id: l })
1340
+ }
1341
+ )
1342
+ ] });
1343
+ }, Ro = O(To);
1344
+ async function Oo(t) {
1345
+ return await navigator.clipboard.writeText(t);
1346
+ }
1347
+ const Vt = (t = "c4r.button.copy", e = "c4r.notifications.copiedToClipboard") => {
1348
+ const [o, r] = B(t);
1349
+ return {
1350
+ message: o,
1351
+ copy: async (l) => {
1352
+ await Oo(l), r(e), setTimeout(() => r(t), 1e3);
1353
+ }
1354
+ };
1355
+ }, Fo = m("div", {
1252
1356
  shouldForwardProp: (t) => t !== "variant"
1253
1357
  })(({ variant: t, theme: e }) => ({
1254
1358
  width: "100%",
@@ -1258,42 +1362,42 @@ const Io = T(an), rn = g("div", {
1258
1362
  boxShadow: `inset 0 0 0 1px ${e.palette.divider}`
1259
1363
  }
1260
1364
  }));
1261
- function wo({
1365
+ function Gn({
1262
1366
  variant: t = "standard",
1263
1367
  items: e,
1264
- ...n
1368
+ ...o
1265
1369
  }) {
1266
- return /* @__PURE__ */ i(rn, { ...n, variant: t, children: e.map((o, a) => /* @__PURE__ */ y(
1267
- Ut,
1370
+ return /* @__PURE__ */ n(Fo, { ...o, variant: t, children: e.map((r, i) => /* @__PURE__ */ x(
1371
+ ce,
1268
1372
  {
1269
- disabled: o.disabled,
1270
- defaultExpanded: o.defaultExpanded,
1271
- onChange: o.onChange,
1373
+ disabled: r.disabled,
1374
+ defaultExpanded: r.defaultExpanded,
1375
+ onChange: r.onChange,
1272
1376
  children: [
1273
- /* @__PURE__ */ i(
1274
- Yt,
1377
+ /* @__PURE__ */ n(
1378
+ de,
1275
1379
  {
1276
- "aria-controls": `${a}-content`,
1277
- id: `${a}-header`,
1278
- children: o.summary
1380
+ "aria-controls": `${i}-content`,
1381
+ id: `${i}-header`,
1382
+ children: r.summary
1279
1383
  }
1280
1384
  ),
1281
- /* @__PURE__ */ i(qt, { children: o.content })
1385
+ /* @__PURE__ */ n(se, { children: r.content })
1282
1386
  ]
1283
1387
  },
1284
- a
1388
+ i
1285
1389
  )) });
1286
1390
  }
1287
- const it = {
1391
+ const ht = {
1288
1392
  large: 5,
1289
1393
  medium: 4,
1290
1394
  small: 3,
1291
1395
  xsmall: 2.25
1292
- }, ln = g(zt, {
1396
+ }, Lo = m(ue, {
1293
1397
  shouldForwardProp: (t) => t !== "size" && t !== "disabled"
1294
- })(({ theme: t, size: e = "medium", disabled: n = !1 }) => ({
1295
- width: t.spacing(it[e]),
1296
- height: t.spacing(it[e]),
1398
+ })(({ theme: t, size: e = "medium", disabled: o = !1 }) => ({
1399
+ width: t.spacing(ht[e]),
1400
+ height: t.spacing(ht[e]),
1297
1401
  ...t.typography.subtitle1,
1298
1402
  ...e === "large" && {
1299
1403
  ...t.typography.h6
@@ -1306,18 +1410,18 @@ const it = {
1306
1410
  ...t.typography.caption,
1307
1411
  fontWeight: 500,
1308
1412
  svg: {
1309
- width: G,
1310
- height: G
1413
+ width: N,
1414
+ height: N
1311
1415
  }
1312
1416
  },
1313
- ...n && {
1417
+ ...o && {
1314
1418
  opacity: 0.6
1315
1419
  }
1316
1420
  }));
1317
- function Bo(t) {
1318
- return /* @__PURE__ */ i(ln, { ...t });
1421
+ function jn(t) {
1422
+ return /* @__PURE__ */ n(Lo, { ...t });
1319
1423
  }
1320
- const Tt = 480, cn = g(Zt)(({ theme: t }) => ({
1424
+ const Ut = 480, Wo = m(pe)(({ theme: t }) => ({
1321
1425
  bottom: t.spacing(2),
1322
1426
  right: t.spacing(2),
1323
1427
  left: t.spacing(2),
@@ -1326,13 +1430,13 @@ const Tt = 480, cn = g(Zt)(({ theme: t }) => ({
1326
1430
  right: "auto",
1327
1431
  left: "50%",
1328
1432
  width: "100%",
1329
- maxWidth: `${Tt}px`
1433
+ maxWidth: `${Ut}px`
1330
1434
  }
1331
- })), sn = g(v, {
1435
+ })), Eo = m(D, {
1332
1436
  shouldForwardProp: (t) => t !== "autoWidth"
1333
1437
  })(({ autoWidth: t, theme: e }) => ({
1334
1438
  minWidth: "100%",
1335
- maxWidth: `${Tt}px`,
1439
+ maxWidth: `${Ut}px`,
1336
1440
  margin: e.spacing(0, 1),
1337
1441
  ...t && {
1338
1442
  minWidth: "auto"
@@ -1343,59 +1447,59 @@ const Tt = 480, cn = g(Zt)(({ theme: t }) => ({
1343
1447
  minWidth: "auto"
1344
1448
  }
1345
1449
  }
1346
- })), dn = g(Ct, {
1450
+ })), Ho = m(Et, {
1347
1451
  shouldForwardProp: (t) => !["hasActions", "closeable"].includes(t)
1348
- })(({ hasActions: t, closeable: e, icon: n, theme: o }) => ({
1452
+ })(({ hasActions: t, closeable: e, icon: o, theme: r }) => ({
1349
1453
  position: "relative",
1350
1454
  display: "flex",
1351
1455
  flexWrap: "wrap",
1352
- columnGap: o.spacing(1),
1353
- rowGap: o.spacing(0.25),
1354
- padding: o.spacing(1),
1355
- paddingLeft: o.spacing(2),
1356
- color: o.palette.common.white,
1357
- backgroundColor: o.palette.common.black,
1456
+ columnGap: r.spacing(1),
1457
+ rowGap: r.spacing(0.25),
1458
+ padding: r.spacing(1),
1459
+ paddingLeft: r.spacing(2),
1460
+ color: r.palette.common.white,
1461
+ backgroundColor: r.palette.common.black,
1358
1462
  ".MuiAlert-message": {
1359
- padding: o.spacing(0.75, 0)
1463
+ padding: r.spacing(0.75, 0)
1360
1464
  },
1361
1465
  ".MuiAlert-message .MuiTypography-root, .MuiAlert-icon": {
1362
- color: o.palette.common.white
1466
+ color: r.palette.common.white
1363
1467
  },
1364
1468
  ".MuiAlert-message .MuiTypography-root:not(.MuiAlertTitle-root)": {
1365
- ...o.typography.body2
1469
+ ...r.typography.body2
1366
1470
  },
1367
1471
  ".MuiAlert-message .MuiCircularProgress-circle": {
1368
- color: o.palette.common.white
1472
+ color: r.palette.common.white
1369
1473
  },
1370
1474
  ".MuiAlert-icon": {
1371
1475
  position: "absolute",
1372
- top: o.spacing(1),
1373
- left: o.spacing(1.5),
1476
+ top: r.spacing(1),
1477
+ left: r.spacing(1.5),
1374
1478
  display: "flex",
1375
1479
  alignItems: "center",
1376
1480
  justifyContent: "center",
1377
- width: o.spacing(3),
1378
- marginTop: o.spacing(0.5)
1481
+ width: r.spacing(3),
1482
+ marginTop: r.spacing(0.5)
1379
1483
  },
1380
1484
  "&.MuiAlert-standardError": {
1381
- backgroundColor: o.palette.error.main
1485
+ backgroundColor: r.palette.error.main
1382
1486
  },
1383
- ...n !== !1 && {
1384
- paddingLeft: o.spacing(5.5)
1487
+ ...o !== !1 && {
1488
+ paddingLeft: r.spacing(5.5)
1385
1489
  },
1386
1490
  ...e && {
1387
- paddingRight: o.spacing(6)
1491
+ paddingRight: r.spacing(6)
1388
1492
  },
1389
1493
  ...!e && !t && {
1390
- paddingRight: o.spacing(1.5)
1494
+ paddingRight: r.spacing(1.5)
1391
1495
  },
1392
1496
  ...t && {
1393
1497
  ".MuiAlert-message": {
1394
1498
  minWidth: "fit-content",
1395
- padding: o.spacing(0.75, 0)
1499
+ padding: r.spacing(0.75, 0)
1396
1500
  }
1397
1501
  }
1398
- })), un = g(v)(({ theme: t }) => ({
1502
+ })), Po = m(D)(({ theme: t }) => ({
1399
1503
  position: "absolute",
1400
1504
  top: t.spacing(1),
1401
1505
  right: t.spacing(1),
@@ -1406,58 +1510,58 @@ const Tt = 480, cn = g(Zt)(({ theme: t }) => ({
1406
1510
  color: t.palette.white[60]
1407
1511
  }
1408
1512
  }));
1409
- function So({
1513
+ function dt({
1410
1514
  severity: t = "neutral",
1411
- autoHideDuration: e = ot,
1412
- closeable: n = !0,
1413
- children: o,
1414
- title: a,
1415
- action: r,
1416
- open: l,
1417
- onClose: s = () => {
1418
- },
1419
- autoWidth: c,
1420
- icon: p,
1421
- ...h
1515
+ autoHideDuration: e = ft,
1516
+ closeable: o = !0,
1517
+ children: r,
1518
+ title: i,
1519
+ action: l,
1520
+ open: a,
1521
+ onClose: c = () => {
1522
+ },
1523
+ autoWidth: d,
1524
+ icon: u,
1525
+ ...p
1422
1526
  }) {
1423
- const d = F(), m = R(d);
1424
- return /* @__PURE__ */ i(Jt, { children: /* @__PURE__ */ i(
1425
- cn,
1527
+ const s = R(), b = T(s);
1528
+ return /* @__PURE__ */ n(ge, { children: /* @__PURE__ */ n(
1529
+ Wo,
1426
1530
  {
1427
- ...h,
1428
- open: l,
1429
- autoHideDuration: e === null ? null : e || ot,
1430
- onClose: s,
1431
- TransitionComponent: c ? Xt : xt,
1432
- "data-auto-width": c,
1433
- children: /* @__PURE__ */ y(
1434
- sn,
1531
+ ...p,
1532
+ open: a,
1533
+ autoHideDuration: e === null ? null : e || ft,
1534
+ onClose: c,
1535
+ TransitionComponent: d ? fe : Rt,
1536
+ "data-auto-width": d,
1537
+ children: /* @__PURE__ */ x(
1538
+ Eo,
1435
1539
  {
1436
1540
  sx: {
1437
1541
  position: "relative"
1438
1542
  },
1439
- autoWidth: c,
1543
+ autoWidth: d,
1440
1544
  children: [
1441
- /* @__PURE__ */ i(
1442
- dn,
1545
+ /* @__PURE__ */ n(
1546
+ Ho,
1443
1547
  {
1444
1548
  severity: t,
1445
- action: r,
1446
- icon: p === !1 || t === "neutral" && !p ? !1 : p,
1549
+ action: l,
1550
+ icon: u === !1 || t === "neutral" && !u ? !1 : u,
1447
1551
  elevation: 6,
1448
- hasActions: !!r,
1449
- closeable: n,
1450
- title: a,
1451
- children: o
1552
+ hasActions: !!l,
1553
+ closeable: o,
1554
+ title: i,
1555
+ children: r
1452
1556
  }
1453
1557
  ),
1454
- n && /* @__PURE__ */ i(un, { children: /* @__PURE__ */ i(
1455
- Le,
1558
+ o && /* @__PURE__ */ n(Po, { children: /* @__PURE__ */ n(
1559
+ q,
1456
1560
  {
1457
1561
  color: "default",
1458
- onClick: (I) => s(I, "timeout"),
1459
- icon: /* @__PURE__ */ i(Mt, {}),
1460
- tooltip: m.formatMessage({
1562
+ onClick: (w) => c(w, "timeout"),
1563
+ icon: /* @__PURE__ */ n(Wt, {}),
1564
+ tooltip: b.formatMessage({
1461
1565
  id: "c4r.button.close"
1462
1566
  })
1463
1567
  }
@@ -1468,40 +1572,40 @@ function So({
1468
1572
  }
1469
1573
  ) });
1470
1574
  }
1471
- const pn = g("div")(({ theme: t }) => ({
1575
+ const zo = m("div")(({ theme: t }) => ({
1472
1576
  display: "flex",
1473
1577
  alignItems: "center",
1474
- height: le,
1578
+ height: ve,
1475
1579
  marginRight: t.spacing(1.5)
1476
- })), gn = g(W)(({ theme: t }) => ({
1580
+ })), No = m(W)(({ theme: t }) => ({
1477
1581
  marginRight: t.spacing(1),
1478
1582
  "&.MuiButtonBase-root svg path": {
1479
1583
  fill: t.palette.brand.appBarContrastText
1480
1584
  }
1481
- })), fn = g(j)(({ theme: t }) => ({
1482
- borderColor: Kt(t.palette.brand.appBarContrastText, 0.12)
1585
+ })), _o = m(_)(({ theme: t }) => ({
1586
+ borderColor: Ot(t.palette.brand.appBarContrastText, 0.12)
1483
1587
  }));
1484
- function mn({
1588
+ function Go({
1485
1589
  onClickMenu: t
1486
1590
  }) {
1487
1591
  return (
1488
1592
  // replacing deprecated `<Hidden />` with sx following this MUI5 guide:
1489
1593
  // https://mui.com/material-ui/migration/v5-component-changes/#hidden
1490
- /* @__PURE__ */ i(
1491
- v,
1594
+ /* @__PURE__ */ n(
1595
+ D,
1492
1596
  {
1493
1597
  sx: {
1494
1598
  display: { md: "none", xs: "block" }
1495
1599
  },
1496
- children: /* @__PURE__ */ y(pn, { children: [
1497
- /* @__PURE__ */ i(gn, { onClick: t, children: /* @__PURE__ */ i(ue, {}) }),
1498
- /* @__PURE__ */ i(fn, { orientation: "vertical", flexItem: !0 })
1600
+ children: /* @__PURE__ */ x(zo, { children: [
1601
+ /* @__PURE__ */ n(No, { onClick: t, children: /* @__PURE__ */ n(Se, {}) }),
1602
+ /* @__PURE__ */ n(_o, { orientation: "vertical", flexItem: !0 })
1499
1603
  ] })
1500
1604
  }
1501
1605
  )
1502
1606
  );
1503
1607
  }
1504
- const hn = g("div")(({ theme: t }) => ({
1608
+ const jo = m("div")(({ theme: t }) => ({
1505
1609
  display: "flex",
1506
1610
  marginRight: t.spacing(1.5),
1507
1611
  "& a": {
@@ -1512,18 +1616,18 @@ const hn = g("div")(({ theme: t }) => ({
1512
1616
  height: t.spacing(4)
1513
1617
  }
1514
1618
  }));
1515
- function bn({ logo: t }) {
1516
- return /* @__PURE__ */ i(hn, { children: t });
1619
+ function Vo({ logo: t }) {
1620
+ return /* @__PURE__ */ n(jo, { children: t });
1517
1621
  }
1518
- const xn = g(S)({
1622
+ const Uo = m(F)({
1519
1623
  display: "flex",
1520
1624
  alignItems: "center",
1521
1625
  whiteSpace: "nowrap"
1522
1626
  });
1523
- function yn({ text: t }) {
1524
- const e = N();
1525
- return /* @__PURE__ */ i(
1526
- xn,
1627
+ function Yo({ text: t }) {
1628
+ const e = j();
1629
+ return /* @__PURE__ */ n(
1630
+ Uo,
1527
1631
  {
1528
1632
  component: "span",
1529
1633
  variant: "subtitle1",
@@ -1532,7 +1636,7 @@ function yn({ text: t }) {
1532
1636
  }
1533
1637
  );
1534
1638
  }
1535
- const Mn = g(S)(({ theme: t }) => ({
1639
+ const qo = m(F)(({ theme: t }) => ({
1536
1640
  display: "flex",
1537
1641
  alignItems: "center",
1538
1642
  "&::before": {
@@ -1542,10 +1646,10 @@ const Mn = g(S)(({ theme: t }) => ({
1542
1646
  color: t.palette.brand.appBarContrastText
1543
1647
  }
1544
1648
  }));
1545
- function Cn({ text: t }) {
1546
- const e = N();
1547
- return /* @__PURE__ */ i(
1548
- Mn,
1649
+ function Zo({ text: t }) {
1650
+ const e = j();
1651
+ return /* @__PURE__ */ n(
1652
+ qo,
1549
1653
  {
1550
1654
  component: "span",
1551
1655
  variant: "body2",
@@ -1555,7 +1659,7 @@ function Cn({ text: t }) {
1555
1659
  }
1556
1660
  );
1557
1661
  }
1558
- const vn = g(te)(({ theme: t }) => ({
1662
+ const Jo = m(be)(({ theme: t }) => ({
1559
1663
  backgroundColor: t.palette.brand.appBarMain,
1560
1664
  "& .MuiTypography-root": {
1561
1665
  color: t.palette.brand.appBarContrastText
@@ -1563,7 +1667,7 @@ const vn = g(te)(({ theme: t }) => ({
1563
1667
  "& .MuiIconButton-root path": {
1564
1668
  fill: t.palette.brand.appBarContrastText
1565
1669
  }
1566
- })), kn = g("div")(({ theme: t }) => ({
1670
+ })), Ko = m("div")(({ theme: t }) => ({
1567
1671
  display: "flex",
1568
1672
  alignItems: "center",
1569
1673
  maxWidth: "calc(100% - 300px)",
@@ -1571,158 +1675,158 @@ const vn = g(te)(({ theme: t }) => ({
1571
1675
  [t.breakpoints.down("sm")]: {
1572
1676
  minWidth: "192px"
1573
1677
  }
1574
- })), Dn = g("div")(({ theme: t }) => ({
1678
+ })), Xo = m("div")(({ theme: t }) => ({
1575
1679
  display: "flex",
1576
1680
  alignItems: "center",
1577
1681
  justifyContent: "space-between",
1578
1682
  flex: 1,
1579
1683
  marginLeft: t.spacing(1)
1580
1684
  }));
1581
- function To({
1685
+ function Vn({
1582
1686
  children: t,
1583
1687
  brandLogo: e,
1584
- brandText: n,
1585
- secondaryText: o,
1586
- showBurgerMenu: a = !1,
1587
- onClickMenu: r,
1588
- ...l
1688
+ brandText: o,
1689
+ secondaryText: r,
1690
+ showBurgerMenu: i = !1,
1691
+ onClickMenu: l,
1692
+ ...a
1589
1693
  }) {
1590
- return /* @__PURE__ */ i(vn, { ...l, children: /* @__PURE__ */ y(Qt, { children: [
1591
- /* @__PURE__ */ y(kn, { children: [
1592
- a && /* @__PURE__ */ i(mn, { onClickMenu: r }),
1593
- e && /* @__PURE__ */ i(bn, { logo: e }),
1594
- n && /* @__PURE__ */ i(yn, { text: n }),
1595
- o && /* @__PURE__ */ i(Cn, { text: o })
1694
+ return /* @__PURE__ */ n(Jo, { ...a, children: /* @__PURE__ */ x(me, { children: [
1695
+ /* @__PURE__ */ x(Ko, { children: [
1696
+ i && /* @__PURE__ */ n(Go, { onClickMenu: l }),
1697
+ e && /* @__PURE__ */ n(Vo, { logo: e }),
1698
+ o && /* @__PURE__ */ n(Yo, { text: o }),
1699
+ r && /* @__PURE__ */ n(Zo, { text: r })
1596
1700
  ] }),
1597
- /* @__PURE__ */ i(Dn, { children: t })
1701
+ /* @__PURE__ */ n(Xo, { children: t })
1598
1702
  ] }) });
1599
1703
  }
1600
- const An = g(v, {
1704
+ const Qo = m(D, {
1601
1705
  shouldForwardProp: (t) => !["size", "variant"].includes(t)
1602
- })(({ size: t, variant: e, theme: n }) => ({
1706
+ })(({ size: t, variant: e, theme: o }) => ({
1603
1707
  position: "absolute",
1604
- right: n.spacing(5.75),
1708
+ right: o.spacing(5.75),
1605
1709
  ...t === "small" && {
1606
- right: n.spacing(4),
1710
+ right: o.spacing(4),
1607
1711
  top: "3px"
1608
1712
  // to align with design specs
1609
1713
  },
1610
1714
  ...e === "standard" && {
1611
- right: n.spacing(4.75),
1715
+ right: o.spacing(4.75),
1612
1716
  ...t === "small" && {
1613
- right: n.spacing(3.5)
1717
+ right: o.spacing(3.5)
1614
1718
  }
1615
1719
  }
1616
1720
  }));
1617
- function Q({
1721
+ function st({
1618
1722
  size: t,
1619
1723
  variant: e,
1620
- ...n
1724
+ ...o
1621
1725
  }) {
1622
- const o = F(), a = R(o);
1623
- return /* @__PURE__ */ i(An, { size: t, variant: e, children: /* @__PURE__ */ i(
1726
+ const r = R(), i = T(r);
1727
+ return /* @__PURE__ */ n(Qo, { size: t, variant: e, children: /* @__PURE__ */ n(
1624
1728
  W,
1625
1729
  {
1626
- ...n,
1730
+ ...o,
1627
1731
  size: t,
1628
- "aria-label": a.formatMessage({
1732
+ "aria-label": i.formatMessage({
1629
1733
  id: "c4r.form.clearSelection"
1630
1734
  })
1631
1735
  }
1632
1736
  ) });
1633
1737
  }
1634
- const In = g(v, {
1738
+ const tr = m(D, {
1635
1739
  shouldForwardProp: (t) => !["size", "variant", "readOnly"].includes(t)
1636
- })(({ size: t, variant: e, readOnly: n, theme: o }) => ({
1740
+ })(({ size: t, variant: e, readOnly: o, theme: r }) => ({
1637
1741
  // There is no specific slot to change TextField styles at DatePicker level, so we need to wrap our component to isolate this override. https://mui.com/x/react-date-pickers/date-picker/#customization
1638
1742
  ".MuiInputBase-root": {
1639
1743
  "& .clearButton svg": {
1640
- color: o.palette.text.hint
1744
+ color: r.palette.text.hint
1641
1745
  },
1642
1746
  ...t === "small" && {
1643
- paddingRight: `${o.spacing(1)} !important`
1747
+ paddingRight: `${r.spacing(1)} !important`
1644
1748
  },
1645
1749
  ...t === "medium" && {
1646
1750
  "& .MuiInputAdornment-root": {
1647
1751
  "& .MuiIconButton-edgeEnd": {
1648
- marginRight: o.spacing(-1)
1752
+ marginRight: r.spacing(-1)
1649
1753
  }
1650
1754
  }
1651
1755
  },
1652
1756
  ...e === "standard" && {
1653
- paddingRight: `${o.spacing(1)} !important`,
1757
+ paddingRight: `${r.spacing(1)} !important`,
1654
1758
  ...t === "small" && {
1655
- paddingRight: `${o.spacing(0.5)} !important`
1759
+ paddingRight: `${r.spacing(0.5)} !important`
1656
1760
  }
1657
1761
  },
1658
- ...n && {
1762
+ ...o && {
1659
1763
  "& .MuiInputAdornment-root": {
1660
1764
  "& svg": {
1661
- color: o.palette.text.disabled
1765
+ color: r.palette.text.disabled
1662
1766
  }
1663
1767
  }
1664
1768
  }
1665
1769
  }
1666
1770
  }));
1667
- function tt({
1771
+ function ut({
1668
1772
  children: t,
1669
1773
  size: e,
1670
- variant: n,
1671
- readOnly: o,
1672
- ...a
1774
+ variant: o,
1775
+ readOnly: r,
1776
+ ...i
1673
1777
  }) {
1674
- return /* @__PURE__ */ i(In, { ...a, size: e, variant: n, readOnly: o, children: t });
1778
+ return /* @__PURE__ */ n(tr, { ...i, size: e, variant: o, readOnly: r, children: t });
1675
1779
  }
1676
- function at({
1780
+ function xt({
1677
1781
  handleClear: t,
1678
1782
  variant: e = "outlined",
1679
- size: n = "small",
1680
- label: o,
1681
- labelHelpTooltip: a,
1682
- type: r,
1683
- helperText: l,
1684
- placeholder: s,
1685
- slotProps: c,
1686
- slots: p,
1687
- error: h,
1688
- showCalendar: d = !0,
1689
- readOnly: m,
1690
- "aria-label": u,
1783
+ size: o = "small",
1784
+ label: r,
1785
+ labelHelpTooltip: i,
1786
+ type: l,
1787
+ helperText: a,
1788
+ placeholder: c,
1789
+ slotProps: d,
1790
+ slots: u,
1791
+ error: p,
1792
+ showCalendar: s = !0,
1793
+ readOnly: b,
1794
+ "aria-label": g,
1691
1795
  "data-testid": f,
1692
- ...M
1796
+ ...y
1693
1797
  }) {
1694
- const b = F(), I = R(b);
1798
+ const h = R(), w = T(h);
1695
1799
  return (
1696
1800
  // Don't remove className, it's used for styling
1697
- /* @__PURE__ */ i(v, { className: "CartoDatePicker-root", "data-testid": "date-picker", children: /* @__PURE__ */ i(
1698
- tt,
1801
+ /* @__PURE__ */ n(D, { className: "CartoDatePicker-root", "data-testid": "date-picker", children: /* @__PURE__ */ n(
1802
+ ut,
1699
1803
  {
1700
- size: n,
1804
+ size: o,
1701
1805
  variant: e,
1702
- readOnly: m,
1806
+ readOnly: b,
1703
1807
  "data-name": "date-picker",
1704
- "aria-label": u,
1808
+ "aria-label": g,
1705
1809
  "data-testid": f,
1706
- children: /* @__PURE__ */ i(
1707
- fe,
1810
+ children: /* @__PURE__ */ n(
1811
+ Re,
1708
1812
  {
1709
- ...M,
1710
- label: o && /* @__PURE__ */ i(
1711
- K,
1813
+ ...y,
1814
+ label: r && /* @__PURE__ */ n(
1815
+ X,
1712
1816
  {
1713
- label: o,
1714
- type: r,
1715
- icon: a && /* @__PURE__ */ i(H, { title: a, children: /* @__PURE__ */ i(J, { htmlColor: "text.secondary" }) })
1817
+ label: r,
1818
+ type: l,
1819
+ icon: i && /* @__PURE__ */ n(P, { title: i, children: /* @__PURE__ */ n(K, { htmlColor: "text.secondary" }) })
1716
1820
  }
1717
1821
  ),
1718
1822
  slotProps: {
1719
1823
  // https://mui.com/x/api/date-pickers/date-picker/#slots
1720
1824
  textField: {
1721
1825
  variant: e,
1722
- helperText: l,
1723
- placeholder: s,
1724
- size: n,
1725
- error: h ?? void 0,
1826
+ helperText: a,
1827
+ placeholder: c,
1828
+ size: o,
1829
+ error: p ?? void 0,
1726
1830
  // undefined is needed to allow the component to control the error state for the default validation
1727
1831
  inputProps: {
1728
1832
  "data-testid": "date-picker-input"
@@ -1732,31 +1836,31 @@ function at({
1732
1836
  clearable: !!t,
1733
1837
  onClear: t
1734
1838
  },
1735
- ...c
1839
+ ...d
1736
1840
  },
1737
1841
  slots: {
1738
- clearButton: (k) => /* @__PURE__ */ i(Q, { ...k, size: n, variant: e }),
1739
- openPickerButton: (k) => /* @__PURE__ */ i(
1842
+ clearButton: (M) => /* @__PURE__ */ n(st, { ...M, size: o, variant: e }),
1843
+ openPickerButton: (M) => /* @__PURE__ */ n(
1740
1844
  W,
1741
1845
  {
1742
- ...k,
1743
- size: n,
1744
- "aria-label": I.formatMessage({
1846
+ ...M,
1847
+ size: o,
1848
+ "aria-label": w.formatMessage({
1745
1849
  id: "c4r.form.chooseDate"
1746
1850
  })
1747
1851
  }
1748
1852
  ),
1749
- ...p
1853
+ ...u
1750
1854
  },
1751
- disableOpenPicker: !d,
1752
- readOnly: m
1855
+ disableOpenPicker: !s,
1856
+ readOnly: b
1753
1857
  }
1754
1858
  )
1755
1859
  }
1756
1860
  ) })
1757
1861
  );
1758
1862
  }
1759
- const wn = g(v, {
1863
+ const er = m(D, {
1760
1864
  shouldForwardProp: (t) => ![
1761
1865
  "isSelected",
1762
1866
  "isStartDate",
@@ -1769,11 +1873,11 @@ const wn = g(v, {
1769
1873
  ({
1770
1874
  theme: t,
1771
1875
  isSelected: e,
1772
- isStartDate: n,
1773
- isEndDate: o,
1774
- isSelectedMonth: a,
1775
- isLastDay: r,
1776
- isFirstDay: l
1876
+ isStartDate: o,
1877
+ isEndDate: r,
1878
+ isSelectedMonth: i,
1879
+ isLastDay: l,
1880
+ isFirstDay: a
1777
1881
  }) => ({
1778
1882
  position: "relative",
1779
1883
  margin: t.spacing(0.25),
@@ -1781,7 +1885,7 @@ const wn = g(v, {
1781
1885
  margin: 0
1782
1886
  },
1783
1887
  // Highlight the selected date range
1784
- ...e && a && {
1888
+ ...e && i && {
1785
1889
  // Creates a continuous background color between start and end date
1786
1890
  "&::before": {
1787
1891
  content: '""',
@@ -1792,12 +1896,12 @@ const wn = g(v, {
1792
1896
  left: "-2px",
1793
1897
  backgroundColor: t.palette.primary.background,
1794
1898
  // Selected start date OR first day of the month
1795
- ...(n || l) && {
1899
+ ...(o || a) && {
1796
1900
  left: 0,
1797
1901
  borderRadius: `${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`
1798
1902
  },
1799
1903
  // Selected end date OR last day of the month
1800
- ...(o || r) && {
1904
+ ...(r || l) && {
1801
1905
  right: 0,
1802
1906
  borderRadius: `0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`
1803
1907
  }
@@ -1813,7 +1917,7 @@ const wn = g(v, {
1813
1917
  borderRadius: `0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`
1814
1918
  },
1815
1919
  // First day of month and last selected day in a week
1816
- ...l && {
1920
+ ...a && {
1817
1921
  "&:last-of-type::before": {
1818
1922
  left: 0,
1819
1923
  right: 0,
@@ -1821,7 +1925,7 @@ const wn = g(v, {
1821
1925
  }
1822
1926
  },
1823
1927
  // Last day of month and first selected day in a week
1824
- ...r && {
1928
+ ...l && {
1825
1929
  "&:first-of-type::before": {
1826
1930
  left: 0,
1827
1931
  right: 0,
@@ -1830,7 +1934,7 @@ const wn = g(v, {
1830
1934
  },
1831
1935
  "& .MuiPickersDay-today": {
1832
1936
  borderColor: `${t.palette.default.outlinedBorder} !important`,
1833
- ...(n || o) && {
1937
+ ...(o || r) && {
1834
1938
  boxShadow: `0 0 0 1px inset ${t.palette.background.paper}`
1835
1939
  }
1836
1940
  },
@@ -1851,7 +1955,7 @@ const wn = g(v, {
1851
1955
  }
1852
1956
  }
1853
1957
  })
1854
- ), Bn = g(me, {
1958
+ ), or = m(Oe, {
1855
1959
  shouldForwardProp: (t) => t !== "isDateRangeLimit"
1856
1960
  })(({ theme: t, isDateRangeLimit: e }) => ({
1857
1961
  "&.MuiPickersDay-root": {
@@ -1871,38 +1975,38 @@ const wn = g(v, {
1871
1975
  }
1872
1976
  }
1873
1977
  }
1874
- })), rt = (t, e) => !t || !e ? !1 : t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
1875
- function lt({
1978
+ })), yt = (t, e) => !t || !e ? !1 : t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
1979
+ function Ct({
1876
1980
  day: t,
1877
1981
  startDate: e,
1878
- endDate: n,
1879
- selectedMonth: o,
1880
- ...a
1982
+ endDate: o,
1983
+ selectedMonth: r,
1984
+ ...i
1881
1985
  }) {
1882
- const r = !!(e && rt(e, t)), l = !!(n && rt(n, t)), s = !!(e && n && t.getTime() >= e.getTime() && t.getTime() <= n.getTime()), c = t.getDate() === 1, p = t.getDate() === new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate(), h = !!(o && t.getMonth() === o.getMonth());
1883
- return /* @__PURE__ */ i(
1884
- wn,
1986
+ const l = !!(e && yt(e, t)), a = !!(o && yt(o, t)), c = !!(e && o && t.getTime() >= e.getTime() && t.getTime() <= o.getTime()), d = t.getDate() === 1, u = t.getDate() === new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate(), p = !!(r && t.getMonth() === r.getMonth());
1987
+ return /* @__PURE__ */ n(
1988
+ er,
1885
1989
  {
1886
- isSelected: s,
1887
- isStartDate: r,
1888
- isEndDate: l,
1889
- isSelectedMonth: h,
1890
- isLastDay: p,
1891
- isFirstDay: c,
1892
- children: /* @__PURE__ */ i(
1893
- Bn,
1990
+ isSelected: c,
1991
+ isStartDate: l,
1992
+ isEndDate: a,
1993
+ isSelectedMonth: p,
1994
+ isLastDay: u,
1995
+ isFirstDay: d,
1996
+ children: /* @__PURE__ */ n(
1997
+ or,
1894
1998
  {
1895
- ...a,
1999
+ ...i,
1896
2000
  day: t,
1897
- selected: s || r || l,
1898
- isDateRangeLimit: r || l,
2001
+ selected: c || l || a,
2002
+ isDateRangeLimit: l || a,
1899
2003
  "data-name": "pickers-day"
1900
2004
  }
1901
2005
  )
1902
2006
  }
1903
2007
  );
1904
2008
  }
1905
- const Sn = g(v, {
2009
+ const rr = m(D, {
1906
2010
  shouldForwardProp: (t) => !["variant"].includes(t)
1907
2011
  })(({ variant: t, theme: e }) => ({
1908
2012
  display: "flex",
@@ -1952,197 +2056,197 @@ const Sn = g(v, {
1952
2056
  }
1953
2057
  }
1954
2058
  }));
1955
- function $o({
2059
+ function Un({
1956
2060
  globalHelperText: t,
1957
2061
  error: e,
1958
- variant: n = "outlined",
1959
- startProps: o,
1960
- endProps: a,
1961
- "aria-label": r,
1962
- "data-testid": l,
1963
- ...s
2062
+ variant: o = "outlined",
2063
+ startProps: r,
2064
+ endProps: i,
2065
+ "aria-label": l,
2066
+ "data-testid": a,
2067
+ ...c
1964
2068
  }) {
1965
- const c = F(), p = R(c), [h, d] = $(!1), [m, u] = $(!1), [f, M] = $(
1966
- (o == null ? void 0 : o.value) || null
1967
- ), [b, I] = $((a == null ? void 0 : a.value) || null), [k, D] = $(
1968
- (a == null ? void 0 : a.value) ?? (o == null ? void 0 : o.value) ?? /* @__PURE__ */ new Date()
1969
- ), x = e ?? (o == null ? void 0 : o.error) ?? (a == null ? void 0 : a.error), C = (A, L) => {
1970
- M(A), o != null && o.onChange && o.onChange(A, L), A && L.validationError === null && !m && L.trigger === null && (u(!1), d(!0));
1971
- }, B = (A, L) => {
1972
- I(A), a != null && a.onChange && a.onChange(A, L);
1973
- }, O = () => {
1974
- u(!0), d(!1), setTimeout(() => {
1975
- D(f ?? /* @__PURE__ */ new Date());
2069
+ const d = R(), u = T(d), [p, s] = B(!1), [b, g] = B(!1), [f, y] = B(
2070
+ (r == null ? void 0 : r.value) || null
2071
+ ), [h, w] = B((i == null ? void 0 : i.value) || null), [M, A] = B(
2072
+ (i == null ? void 0 : i.value) ?? (r == null ? void 0 : r.value) ?? /* @__PURE__ */ new Date()
2073
+ ), C = e ?? (r == null ? void 0 : r.error) ?? (i == null ? void 0 : i.error), k = (S, L) => {
2074
+ y(S), r != null && r.onChange && r.onChange(S, L), S && L.validationError === null && !b && L.trigger === null && (g(!1), s(!0));
2075
+ }, v = (S, L) => {
2076
+ w(S), i != null && i.onChange && i.onChange(S, L);
2077
+ }, $ = () => {
2078
+ g(!0), s(!1), setTimeout(() => {
2079
+ A(f ?? /* @__PURE__ */ new Date());
1976
2080
  }, 120);
1977
- }, w = () => {
1978
- u(!1), d(!0), setTimeout(() => {
1979
- D(b ?? f ?? /* @__PURE__ */ new Date());
2081
+ }, I = () => {
2082
+ g(!1), s(!0), setTimeout(() => {
2083
+ A(h ?? f ?? /* @__PURE__ */ new Date());
1980
2084
  }, 120);
1981
2085
  }, E = () => {
1982
- u(!1), d(!0), setTimeout(() => {
1983
- D(b ?? f ?? /* @__PURE__ */ new Date());
2086
+ g(!1), s(!0), setTimeout(() => {
2087
+ A(h ?? f ?? /* @__PURE__ */ new Date());
1984
2088
  }, 120);
1985
2089
  };
1986
- return /* @__PURE__ */ y(v, { children: [
1987
- /* @__PURE__ */ y(
1988
- Sn,
2090
+ return /* @__PURE__ */ x(D, { children: [
2091
+ /* @__PURE__ */ x(
2092
+ rr,
1989
2093
  {
1990
- variant: n,
2094
+ variant: o,
1991
2095
  "data-name": "date-range-picker",
1992
- "aria-label": r,
1993
- "data-testid": l,
2096
+ "aria-label": l,
2097
+ "data-testid": a,
1994
2098
  children: [
1995
- /* @__PURE__ */ i(
1996
- at,
2099
+ /* @__PURE__ */ n(
2100
+ xt,
1997
2101
  {
1998
- ...s,
1999
- ...o,
2000
- value: (o == null ? void 0 : o.value) ?? f,
2001
- maxDate: b ?? void 0,
2002
- label: (o == null ? void 0 : o.label) ?? p.formatMessage({ id: "c4r.form.startDate" }),
2102
+ ...c,
2103
+ ...r,
2104
+ value: (r == null ? void 0 : r.value) ?? f,
2105
+ maxDate: h ?? void 0,
2106
+ label: (r == null ? void 0 : r.label) ?? u.formatMessage({ id: "c4r.form.startDate" }),
2003
2107
  slotProps: {
2004
2108
  popper: {
2005
2109
  placement: "bottom-start",
2006
- "aria-label": p.formatMessage({
2110
+ "aria-label": u.formatMessage({
2007
2111
  id: "c4r.form.startDateCalendar"
2008
2112
  })
2009
2113
  },
2010
- ...o == null ? void 0 : o.slotProps
2114
+ ...r == null ? void 0 : r.slotProps
2011
2115
  },
2012
2116
  slots: {
2013
- openPickerIcon: pe,
2014
- day: (A) => /* @__PURE__ */ i(
2015
- lt,
2117
+ openPickerIcon: Ie,
2118
+ day: (S) => /* @__PURE__ */ n(
2119
+ Ct,
2016
2120
  {
2017
- ...A,
2121
+ ...S,
2018
2122
  startDate: f,
2019
- endDate: b,
2020
- selectedMonth: k
2123
+ endDate: h,
2124
+ selectedMonth: M
2021
2125
  }
2022
2126
  ),
2023
- ...o == null ? void 0 : o.slots
2127
+ ...r == null ? void 0 : r.slots
2024
2128
  },
2025
- error: (o == null ? void 0 : o.error) ?? e,
2026
- open: m,
2027
- onChange: C,
2028
- onOpen: O,
2029
- onClose: w,
2030
- onMonthChange: (A) => D(A),
2031
- variant: n
2129
+ error: (r == null ? void 0 : r.error) ?? e,
2130
+ open: b,
2131
+ onChange: k,
2132
+ onOpen: $,
2133
+ onClose: I,
2134
+ onMonthChange: (S) => A(S),
2135
+ variant: o
2032
2136
  }
2033
2137
  ),
2034
- /* @__PURE__ */ i(
2035
- at,
2138
+ /* @__PURE__ */ n(
2139
+ xt,
2036
2140
  {
2037
- ...s,
2038
- ...a,
2039
- value: (a == null ? void 0 : a.value) ?? b,
2141
+ ...c,
2142
+ ...i,
2143
+ value: (i == null ? void 0 : i.value) ?? h,
2040
2144
  minDate: f ?? void 0,
2041
2145
  slotProps: {
2042
2146
  popper: {
2043
- "aria-label": p.formatMessage({
2147
+ "aria-label": u.formatMessage({
2044
2148
  id: "c4r.form.endDateCalendar"
2045
2149
  })
2046
2150
  },
2047
- ...a == null ? void 0 : a.slotProps
2151
+ ...i == null ? void 0 : i.slotProps
2048
2152
  },
2049
2153
  slots: {
2050
- day: (A) => /* @__PURE__ */ i(
2051
- lt,
2154
+ day: (S) => /* @__PURE__ */ n(
2155
+ Ct,
2052
2156
  {
2053
- ...A,
2157
+ ...S,
2054
2158
  startDate: f,
2055
- endDate: b,
2056
- selectedMonth: k
2159
+ endDate: h,
2160
+ selectedMonth: M
2057
2161
  }
2058
2162
  ),
2059
- ...a == null ? void 0 : a.slots
2163
+ ...i == null ? void 0 : i.slots
2060
2164
  },
2061
- label: (a == null ? void 0 : a.label) ?? p.formatMessage({ id: "c4r.form.endDate" }),
2062
- error: (a == null ? void 0 : a.error) ?? e,
2063
- open: h,
2165
+ label: (i == null ? void 0 : i.label) ?? u.formatMessage({ id: "c4r.form.endDate" }),
2166
+ error: (i == null ? void 0 : i.error) ?? e,
2167
+ open: p,
2064
2168
  onOpen: E,
2065
- onClose: () => d(!1),
2066
- onChange: B,
2067
- onMonthChange: (A) => D(A),
2068
- variant: n
2169
+ onClose: () => s(!1),
2170
+ onChange: v,
2171
+ onMonthChange: (S) => A(S),
2172
+ variant: o
2069
2173
  }
2070
2174
  )
2071
2175
  ]
2072
2176
  }
2073
2177
  ),
2074
- t && /* @__PURE__ */ i(ht, { error: x, children: t })
2178
+ t && /* @__PURE__ */ n(J, { error: C, children: t })
2075
2179
  ] });
2076
2180
  }
2077
- const $t = (t, e, n, o) => {
2078
- const a = t == null ? void 0 : t.includes("hours"), r = t == null ? void 0 : t.includes("seconds"), l = t == null ? void 0 : t.includes("minutes"), s = (t == null ? void 0 : t.length) === 1 && t[0] === "hours";
2079
- if (o) return o;
2080
- const c = [];
2081
- return e && c.push("MM/dd/yyyy "), a && c.push(n ? "hh" : "HH"), s || c.push(":"), l && c.push("mm"), r && c.push(":ss"), n && c.push(" a"), c.join("");
2181
+ const Yt = (t, e, o, r) => {
2182
+ const i = t == null ? void 0 : t.includes("hours"), l = t == null ? void 0 : t.includes("seconds"), a = t == null ? void 0 : t.includes("minutes"), c = (t == null ? void 0 : t.length) === 1 && t[0] === "hours";
2183
+ if (r) return r;
2184
+ const d = [];
2185
+ return e && d.push("MM/dd/yyyy "), i && d.push(o ? "hh" : "HH"), c || d.push(":"), a && d.push("mm"), l && d.push(":ss"), o && d.push(" a"), d.join("");
2082
2186
  };
2083
- function Ro({
2187
+ function Yn({
2084
2188
  handleClear: t,
2085
2189
  variant: e = "outlined",
2086
- size: n = "small",
2087
- label: o,
2088
- labelHelpTooltip: a,
2089
- type: r,
2090
- helperText: l,
2091
- placeholder: s,
2092
- error: c,
2093
- showClock: p = !0,
2094
- readOnly: h,
2095
- slotProps: d,
2096
- slots: m,
2097
- ampm: u = !0,
2190
+ size: o = "small",
2191
+ label: r,
2192
+ labelHelpTooltip: i,
2193
+ type: l,
2194
+ helperText: a,
2195
+ placeholder: c,
2196
+ error: d,
2197
+ showClock: u = !0,
2198
+ readOnly: p,
2199
+ slotProps: s,
2200
+ slots: b,
2201
+ ampm: g = !0,
2098
2202
  views: f = ["hours", "minutes"],
2099
- format: M,
2100
- "data-testid": b,
2101
- "aria-label": I,
2102
- ...k
2203
+ format: y,
2204
+ "data-testid": h,
2205
+ "aria-label": w,
2206
+ ...M
2103
2207
  }) {
2104
- const D = F(), x = R(D), C = Y(null), [B, O] = $(0);
2105
- return _(() => {
2106
- if (!C.current) return;
2107
- const w = new ResizeObserver((E) => {
2208
+ const A = R(), C = T(A), k = Z(null), [v, $] = B(0);
2209
+ return z(() => {
2210
+ if (!k.current) return;
2211
+ const I = new ResizeObserver((E) => {
2108
2212
  var L;
2109
- const A = (L = E[0]) == null ? void 0 : L.contentRect.width;
2110
- A && O(A);
2213
+ const S = (L = E[0]) == null ? void 0 : L.contentRect.width;
2214
+ S && $(S);
2111
2215
  });
2112
- return w.observe(C.current), () => {
2113
- w.disconnect();
2216
+ return I.observe(k.current), () => {
2217
+ I.disconnect();
2114
2218
  };
2115
- }, []), /* @__PURE__ */ i(
2116
- tt,
2219
+ }, []), /* @__PURE__ */ n(
2220
+ ut,
2117
2221
  {
2118
- size: n,
2222
+ size: o,
2119
2223
  variant: e,
2120
- readOnly: h,
2224
+ readOnly: p,
2121
2225
  "data-name": "time-picker",
2122
- "data-testid": b ?? "time-picker",
2123
- "aria-label": I,
2124
- children: /* @__PURE__ */ i(
2125
- he,
2226
+ "data-testid": h ?? "time-picker",
2227
+ "aria-label": w,
2228
+ children: /* @__PURE__ */ n(
2229
+ Fe,
2126
2230
  {
2127
- ...k,
2128
- ref: C,
2129
- label: /* @__PURE__ */ i(
2130
- K,
2231
+ ...M,
2232
+ ref: k,
2233
+ label: /* @__PURE__ */ n(
2234
+ X,
2131
2235
  {
2132
- label: o ?? x.formatMessage({ id: "c4r.form.time" }),
2133
- type: r,
2134
- icon: a && /* @__PURE__ */ i(H, { title: a, children: /* @__PURE__ */ i(J, { htmlColor: "text.secondary" }) })
2236
+ label: r ?? C.formatMessage({ id: "c4r.form.time" }),
2237
+ type: l,
2238
+ icon: i && /* @__PURE__ */ n(P, { title: i, children: /* @__PURE__ */ n(K, { htmlColor: "text.secondary" }) })
2135
2239
  }
2136
2240
  ),
2137
2241
  views: ["hours"],
2138
- format: $t(f, !1, u, M),
2242
+ format: Yt(f, !1, g, y),
2139
2243
  slotProps: {
2140
2244
  textField: {
2141
2245
  variant: e,
2142
- helperText: l,
2143
- placeholder: s,
2144
- size: n,
2145
- error: c ?? void 0,
2246
+ helperText: a,
2247
+ placeholder: c,
2248
+ size: o,
2249
+ error: d ?? void 0,
2146
2250
  // undefined is needed to allow the component to control the error state for the default validation
2147
2251
  inputProps: {
2148
2252
  "data-testid": "time-picker-input"
@@ -2157,85 +2261,85 @@ function Ro({
2157
2261
  },
2158
2262
  layout: {
2159
2263
  sx: {
2160
- width: B
2264
+ width: v
2161
2265
  }
2162
2266
  },
2163
- ...d
2267
+ ...s
2164
2268
  },
2165
2269
  slots: {
2166
- clearButton: (w) => /* @__PURE__ */ i(Q, { ...w, size: n, variant: e }),
2167
- openPickerButton: (w) => /* @__PURE__ */ i(
2270
+ clearButton: (I) => /* @__PURE__ */ n(st, { ...I, size: o, variant: e }),
2271
+ openPickerButton: (I) => /* @__PURE__ */ n(
2168
2272
  W,
2169
2273
  {
2170
- ...w,
2171
- size: n,
2172
- "aria-label": x.formatMessage({
2274
+ ...I,
2275
+ size: o,
2276
+ "aria-label": C.formatMessage({
2173
2277
  id: "c4r.form.chooseDate"
2174
2278
  })
2175
2279
  }
2176
2280
  ),
2177
- ...m
2281
+ ...b
2178
2282
  },
2179
- disableOpenPicker: !p,
2180
- readOnly: h,
2181
- ampm: u
2283
+ disableOpenPicker: !u,
2284
+ readOnly: p,
2285
+ ampm: g
2182
2286
  }
2183
2287
  )
2184
2288
  }
2185
2289
  );
2186
2290
  }
2187
- function Fo({
2291
+ function qn({
2188
2292
  handleClear: t,
2189
2293
  variant: e = "outlined",
2190
- size: n = "small",
2191
- label: o,
2192
- labelHelpTooltip: a,
2193
- type: r,
2194
- helperText: l,
2195
- placeholder: s,
2196
- error: c,
2197
- showCalendar: p = !0,
2198
- readOnly: h,
2199
- slotProps: d,
2200
- slots: m,
2201
- ampm: u = !0,
2294
+ size: o = "small",
2295
+ label: r,
2296
+ labelHelpTooltip: i,
2297
+ type: l,
2298
+ helperText: a,
2299
+ placeholder: c,
2300
+ error: d,
2301
+ showCalendar: u = !0,
2302
+ readOnly: p,
2303
+ slotProps: s,
2304
+ slots: b,
2305
+ ampm: g = !0,
2202
2306
  views: f = ["hours", "minutes"],
2203
- format: M,
2204
- "data-testid": b,
2205
- "aria-label": I,
2206
- ...k
2307
+ format: y,
2308
+ "data-testid": h,
2309
+ "aria-label": w,
2310
+ ...M
2207
2311
  }) {
2208
- const D = F(), x = R(D);
2209
- return /* @__PURE__ */ i(
2210
- tt,
2312
+ const A = R(), C = T(A);
2313
+ return /* @__PURE__ */ n(
2314
+ ut,
2211
2315
  {
2212
- size: n,
2316
+ size: o,
2213
2317
  variant: e,
2214
- readOnly: h,
2318
+ readOnly: p,
2215
2319
  "data-name": "date-time-picker",
2216
- "data-testid": b ?? "date-time-picker",
2217
- "aria-label": I,
2218
- children: /* @__PURE__ */ i(
2219
- be,
2320
+ "data-testid": h ?? "date-time-picker",
2321
+ "aria-label": w,
2322
+ children: /* @__PURE__ */ n(
2323
+ Le,
2220
2324
  {
2221
- ...k,
2222
- label: /* @__PURE__ */ i(
2223
- K,
2325
+ ...M,
2326
+ label: /* @__PURE__ */ n(
2327
+ X,
2224
2328
  {
2225
- label: o ?? x.formatMessage({ id: "c4r.form.time" }),
2226
- type: r,
2227
- icon: a && /* @__PURE__ */ i(H, { title: a, children: /* @__PURE__ */ i(J, { htmlColor: "text.secondary" }) })
2329
+ label: r ?? C.formatMessage({ id: "c4r.form.time" }),
2330
+ type: l,
2331
+ icon: i && /* @__PURE__ */ n(P, { title: i, children: /* @__PURE__ */ n(K, { htmlColor: "text.secondary" }) })
2228
2332
  }
2229
2333
  ),
2230
2334
  views: ["year", "month", "day", "hours"],
2231
- format: $t(f, !0, u, M),
2335
+ format: Yt(f, !0, g, y),
2232
2336
  slotProps: {
2233
2337
  textField: {
2234
2338
  variant: e,
2235
- helperText: l,
2236
- placeholder: s,
2237
- size: n,
2238
- error: c ?? void 0,
2339
+ helperText: a,
2340
+ placeholder: c,
2341
+ size: o,
2342
+ error: d ?? void 0,
2239
2343
  // undefined is needed to allow the component to control the error state for the default validation
2240
2344
  inputProps: {
2241
2345
  "data-testid": "date-time-picker-input"
@@ -2245,79 +2349,903 @@ function Fo({
2245
2349
  clearable: !!t,
2246
2350
  onClear: t
2247
2351
  },
2248
- ...d
2352
+ ...s
2249
2353
  },
2250
2354
  slots: {
2251
- clearButton: (C) => /* @__PURE__ */ i(Q, { ...C, size: n, variant: e }),
2252
- openPickerButton: (C) => /* @__PURE__ */ i(
2355
+ clearButton: (k) => /* @__PURE__ */ n(st, { ...k, size: o, variant: e }),
2356
+ openPickerButton: (k) => /* @__PURE__ */ n(
2253
2357
  W,
2254
2358
  {
2255
- ...C,
2256
- size: n,
2257
- "aria-label": x.formatMessage({
2359
+ ...k,
2360
+ size: o,
2361
+ "aria-label": C.formatMessage({
2258
2362
  id: "c4r.form.chooseDate"
2259
2363
  })
2260
2364
  }
2261
2365
  ),
2262
- ...m
2366
+ ...b
2263
2367
  },
2264
- disableOpenPicker: !p,
2265
- readOnly: h,
2266
- ampm: u
2368
+ disableOpenPicker: !u,
2369
+ readOnly: p,
2370
+ ampm: g
2267
2371
  }
2268
2372
  )
2269
2373
  }
2270
2374
  );
2271
2375
  }
2272
- const Tn = [{ outlinedBullet: !1, value: "" }], $n = g("ul")(({ theme: t }) => ({
2376
+ const nr = [{ outlinedBullet: !1, value: "" }], ir = m("ul")(({ theme: t }) => ({
2273
2377
  listStyle: "none",
2274
2378
  paddingLeft: 0,
2275
2379
  margin: t.spacing(0.5, 0, 0, 0)
2276
- })), Rn = g("li")(({ theme: t }) => ({
2380
+ })), ar = m("li")(({ theme: t }) => ({
2277
2381
  display: "flex",
2278
2382
  alignItems: "center",
2279
2383
  justifyContent: "space-between",
2280
2384
  "&:not(:last-child)": {
2281
2385
  marginBottom: t.spacing(0.5)
2282
2386
  }
2283
- })), Fn = g("span")(({ theme: t }) => ({
2387
+ })), lr = m("span")(({ theme: t }) => ({
2284
2388
  width: t.spacing(1),
2285
2389
  height: t.spacing(1),
2286
2390
  marginRight: t.spacing(0.5),
2287
2391
  border: `2px solid ${t.palette.qualitative.bold[1]}`,
2288
2392
  borderRadius: "50%",
2289
2393
  backgroundColor: t.palette.qualitative.bold[1]
2290
- })), On = g(S)(({ theme: t }) => ({
2394
+ })), cr = m(F)(({ theme: t }) => ({
2291
2395
  minWidth: t.spacing(10),
2292
2396
  marginRight: t.spacing(1.5)
2293
2397
  }));
2294
- function Oo({
2295
- items: t = Tn,
2398
+ function Zn({
2399
+ items: t = nr,
2296
2400
  title: e
2297
2401
  }) {
2298
- return /* @__PURE__ */ y(V, { children: [
2299
- e && /* @__PURE__ */ i(S, { color: "inherit", variant: "caption", weight: "medium", children: e }),
2300
- /* @__PURE__ */ i($n, { children: t.map((n, o) => /* @__PURE__ */ y(Rn, { children: [
2301
- /* @__PURE__ */ i(
2302
- Fn,
2402
+ return /* @__PURE__ */ x(H, { children: [
2403
+ e && /* @__PURE__ */ n(F, { color: "inherit", variant: "caption", weight: "medium", children: e }),
2404
+ /* @__PURE__ */ n(ir, { children: t.map((o, r) => /* @__PURE__ */ x(ar, { children: [
2405
+ /* @__PURE__ */ n(
2406
+ lr,
2303
2407
  {
2304
2408
  style: {
2305
- backgroundColor: `${n.outlinedBullet ? "transparent" : n.color}`,
2306
- borderColor: n.color
2409
+ backgroundColor: `${o.outlinedBullet ? "transparent" : o.color}`,
2410
+ borderColor: o.color
2307
2411
  }
2308
2412
  }
2309
2413
  ),
2310
- n.category && /* @__PURE__ */ i(On, { color: "inherit", variant: "caption", children: n.category }),
2311
- /* @__PURE__ */ i(S, { color: "inherit", variant: "caption", weight: "medium", children: n.value })
2312
- ] }, o)) })
2414
+ o.category && /* @__PURE__ */ n(cr, { color: "inherit", variant: "caption", children: o.category }),
2415
+ /* @__PURE__ */ n(F, { color: "inherit", variant: "caption", weight: "medium", children: o.value })
2416
+ ] }, r)) })
2313
2417
  ] });
2314
2418
  }
2315
- const ct = {
2419
+ const dr = m(D, {
2420
+ shouldForwardProp: (t) => !["withGutter", "disabled"].includes(t)
2421
+ })(
2422
+ ({ withGutter: t, disabled: e, theme: o }) => ({
2423
+ display: "flex",
2424
+ alignItems: "center",
2425
+ justifyContent: "flex-end",
2426
+ gap: o.spacing(1),
2427
+ ...t && {
2428
+ height: o.spacing(4),
2429
+ padding: o.spacing(0, 0.5),
2430
+ borderTop: `1px solid ${o.palette.divider}`,
2431
+ borderBottom: "1px solid transparent"
2432
+ },
2433
+ ...e && {
2434
+ backgroundColor: o.palette.default.background
2435
+ }
2436
+ })
2437
+ );
2438
+ function qt({
2439
+ onClickFooter: t,
2440
+ labelIdButtonFooter: e,
2441
+ ariaLabelButtonFooter: o,
2442
+ disabledButtonFooter: r,
2443
+ withGutter: i = !0,
2444
+ showSnackbar: l,
2445
+ onCloseSnackbar: a,
2446
+ loading: c,
2447
+ disabled: d,
2448
+ ...u
2449
+ }) {
2450
+ const p = R(), s = T(p);
2451
+ return t ? /* @__PURE__ */ x(
2452
+ dr,
2453
+ {
2454
+ withGutter: i,
2455
+ disabled: d,
2456
+ "data-name": "code-area-footer",
2457
+ "data-gutter": i,
2458
+ children: [
2459
+ /* @__PURE__ */ n(
2460
+ nt,
2461
+ {
2462
+ variant: "text",
2463
+ ...u,
2464
+ loading: c,
2465
+ onClick: t,
2466
+ "aria-label": o || "save-form-button",
2467
+ disabled: d || r,
2468
+ children: s.formatMessage({
2469
+ id: e || "c4r.button.save"
2470
+ })
2471
+ }
2472
+ ),
2473
+ /* @__PURE__ */ n(
2474
+ dt,
2475
+ {
2476
+ open: l,
2477
+ autoWidth: !0,
2478
+ closeable: !1,
2479
+ autoHideDuration: 4e3,
2480
+ onClose: a,
2481
+ children: s.formatMessage({
2482
+ id: "c4r.notifications.changesSaved"
2483
+ })
2484
+ }
2485
+ )
2486
+ ]
2487
+ }
2488
+ ) : null;
2489
+ }
2490
+ const Mt = m(D, { shouldForwardProp: (t) => t !== "size" })(({ size: t, theme: e }) => ({
2491
+ position: "absolute",
2492
+ top: 0,
2493
+ right: e.spacing(0.5),
2494
+ zIndex: 1,
2495
+ display: "flex",
2496
+ justifyContent: "flex-end",
2497
+ gap: e.spacing(1),
2498
+ padding: t === "small" ? e.spacing(0.5) : e.spacing(1, 2, 2),
2499
+ paddingRight: t === "small" ? 0 : e.spacing(1.5)
2500
+ }));
2501
+ function sr({
2502
+ disabled: t,
2503
+ copyValue: e,
2504
+ onClickExpand: o,
2505
+ size: r
2506
+ }) {
2507
+ const i = R(), l = T(i), a = !!o, c = e !== void 0, d = a && c, { copy: u } = Vt(), [p, s] = B(!1), [b, g] = B(null), f = !!b, y = (M) => {
2508
+ g(M.currentTarget);
2509
+ }, h = () => {
2510
+ g(null);
2511
+ }, w = (M) => {
2512
+ M.preventDefault(), e && u(e).then(() => {
2513
+ s(!0);
2514
+ }).catch(console.error);
2515
+ };
2516
+ return !a && !c ? null : d ? /* @__PURE__ */ x(H, { children: [
2517
+ /* @__PURE__ */ x(Mt, { size: r, "data-size": r, "data-name": "code-area-header", children: [
2518
+ /* @__PURE__ */ n(
2519
+ q,
2520
+ {
2521
+ color: "default",
2522
+ size: r,
2523
+ icon: /* @__PURE__ */ n($e, {}),
2524
+ disabled: t,
2525
+ tooltip: l.formatMessage({ id: "c4r.button.showOptions" }),
2526
+ tooltipPlacement: "top",
2527
+ "aria-controls": f ? "basic-menu" : void 0,
2528
+ "aria-haspopup": "true",
2529
+ "aria-expanded": f ? "true" : void 0,
2530
+ onClick: y
2531
+ }
2532
+ ),
2533
+ /* @__PURE__ */ x(
2534
+ co,
2535
+ {
2536
+ anchorEl: b,
2537
+ open: f,
2538
+ onClose: h,
2539
+ id: "menu",
2540
+ MenuListProps: { "aria-labelledby": "menu-button" },
2541
+ "aria-label": "Code area actions",
2542
+ transformOrigin: { vertical: "top", horizontal: "right" },
2543
+ anchorOrigin: { vertical: "bottom", horizontal: "right" },
2544
+ children: [
2545
+ /* @__PURE__ */ x(Y, { onClick: w, disabled: t, id: "copy", children: [
2546
+ /* @__PURE__ */ n(rt, { children: /* @__PURE__ */ n(Lt, {}) }),
2547
+ /* @__PURE__ */ n(U, { children: l.formatMessage({ id: "c4r.button.copy" }) })
2548
+ ] }),
2549
+ /* @__PURE__ */ x(Y, { onClick: o, disabled: t, id: "expand", children: [
2550
+ /* @__PURE__ */ n(rt, { children: /* @__PURE__ */ n(mt, {}) }),
2551
+ /* @__PURE__ */ n(U, { children: l.formatMessage({ id: "c4r.button.expand" }) })
2552
+ ] })
2553
+ ]
2554
+ }
2555
+ )
2556
+ ] }),
2557
+ /* @__PURE__ */ n(
2558
+ dt,
2559
+ {
2560
+ open: p,
2561
+ autoWidth: !0,
2562
+ closeable: !1,
2563
+ autoHideDuration: 4e3,
2564
+ onClose: () => s(!1),
2565
+ children: l.formatMessage({
2566
+ id: "c4r.notifications.copiedToClipboard"
2567
+ })
2568
+ }
2569
+ )
2570
+ ] }) : /* @__PURE__ */ x(Mt, { size: r, "data-size": r, "data-name": "code-area-header", children: [
2571
+ c && /* @__PURE__ */ n(
2572
+ Ro,
2573
+ {
2574
+ disabled: t,
2575
+ value: e,
2576
+ button: !0,
2577
+ buttonProps: { size: r }
2578
+ }
2579
+ ),
2580
+ a && /* @__PURE__ */ n(
2581
+ q,
2582
+ {
2583
+ color: "default",
2584
+ size: r,
2585
+ onClick: o,
2586
+ icon: /* @__PURE__ */ n(mt, {}),
2587
+ disabled: t,
2588
+ tooltip: l.formatMessage({ id: "c4r.button.expand" }),
2589
+ tooltipPlacement: "top"
2590
+ }
2591
+ )
2592
+ ] });
2593
+ }
2594
+ const ur = m(D, {
2595
+ shouldForwardProp: (t) => !["size", "height"].includes(t)
2596
+ })(({ size: t, height: e, theme: o }) => ({
2597
+ position: "relative",
2598
+ flex: 1,
2599
+ display: "flex",
2600
+ cursor: "text",
2601
+ ":focus-within &, .error &": {
2602
+ marginBottom: 0
2603
+ },
2604
+ "& .react-codemirror2": {
2605
+ width: "100%",
2606
+ height: "100% !important",
2607
+ position: "relative"
2608
+ },
2609
+ "& .CodeMirror": {
2610
+ position: "absolute",
2611
+ top: 0,
2612
+ bottom: 0,
2613
+ left: 0,
2614
+ right: 0,
2615
+ zIndex: 1,
2616
+ height: "100% !important",
2617
+ backgroundColor: o.palette.background.default
2618
+ },
2619
+ "& .CodeMirror-code": {
2620
+ "&> div:first-of-type .CodeMirror-line": {
2621
+ marginTop: o.spacing(-0.25)
2622
+ }
2623
+ },
2624
+ "& .CodeMirror-scroll": {
2625
+ paddingLeft: o.spacing(1),
2626
+ paddingRight: o.spacing(1),
2627
+ backgroundColor: "transparent"
2628
+ },
2629
+ "& .CodeMirror-lines": {
2630
+ padding: o.spacing(1, 0)
2631
+ },
2632
+ "& .CodeMirror pre.CodeMirror-line, & .CodeMirror pre.CodeMirror-line-like": {
2633
+ boxSizing: "border-box",
2634
+ paddingLeft: 0,
2635
+ paddingTop: o.spacing(0.25),
2636
+ lineHeight: 1.2
2637
+ },
2638
+ "& .CodeMirror-linenumbers": {
2639
+ width: `${o.spacing(4.5)} !important`
2640
+ },
2641
+ "& .CodeMirror-linenumber": {
2642
+ width: `${o.spacing(4.5)} !important`,
2643
+ height: o.spacing(2),
2644
+ marginBottom: `${o.spacing(-0.25)} !important`,
2645
+ paddingTop: o.spacing(0.25),
2646
+ paddingRight: o.spacing(1.25),
2647
+ boxSizing: "border-box !important",
2648
+ color: o.palette.text.secondary
2649
+ },
2650
+ // Active line addon
2651
+ "& .CodeMirror-activeline-background, & .CodeMirror-activeline-gutter": {
2652
+ backgroundColor: "transparent"
2653
+ },
2654
+ "& .CodeMirror-gutter-background": {
2655
+ width: `${o.spacing(6.25)} !important`
2656
+ // Hack needed to simulate active line background
2657
+ },
2658
+ "& .CodeMirror-sizer": {
2659
+ paddingTop: o.spacing(0.25),
2660
+ marginLeft: `${o.spacing(5.25)} !important`,
2661
+ borderRightWidth: `${o.spacing(4)} !important`
2662
+ // Hack needed to simulate active line background
2663
+ },
2664
+ "& .CodeMirror-matchingbracket": {
2665
+ color: `${bt[900]} !important`,
2666
+ backgroundColor: o.palette.black[4],
2667
+ boxShadow: `0 0 0 1px ${o.palette.text.hint}`
2668
+ },
2669
+ // Selected line
2670
+ "& .CodeMirror-selected, & .CodeMirror-focused .CodeMirror-selected, & .CodeMirror-line::selection, & .CodeMirror-line > span::selection, & .CodeMirror-line > span > span::selection": {
2671
+ background: `${Ot(tt[800], 0.2)} !important`
2672
+ },
2673
+ "& .CodeMirror-gutters": {
2674
+ borderRight: 0,
2675
+ color: o.palette.text.secondary,
2676
+ backgroundColor: o.palette.default.background
2677
+ },
2678
+ "& .CodeMirror-gutter-elt": {
2679
+ "& .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded": {
2680
+ marginLeft: o.spacing(-1),
2681
+ "&:after": {
2682
+ fontSize: o.typography.caption.fontSize
2683
+ }
2684
+ }
2685
+ },
2686
+ "& .CodeMirror-placeholder": {
2687
+ paddingTop: "0 !important",
2688
+ marginLeft: `${o.spacing(-0.5)} !important`,
2689
+ marginBottom: `${o.spacing(-0.25)} !important`,
2690
+ color: `${o.palette.text.hint} !important`
2691
+ },
2692
+ "& .MuiLinearProgress-root": {
2693
+ height: "2px",
2694
+ position: "absolute",
2695
+ top: 0,
2696
+ left: 0,
2697
+ right: 0,
2698
+ zIndex: 1
2699
+ },
2700
+ "& .pre.CodeMirror-line, .CodeMirror pre.CodeMirror-line-like, & .cm-bracket": {
2701
+ color: o.palette.text.primary
2702
+ },
2703
+ "& .CodeMirror pre.CodeMirror-placeholder": {
2704
+ color: o.palette.text.hint
2705
+ },
2706
+ "& .CodeMirror-composing": {
2707
+ border: 0
2708
+ },
2709
+ // Theme: light
2710
+ "& .cm-keyword, & .cm-string, & .cm-string-2, & .cm-other": {
2711
+ color: Pe[500]
2712
+ },
2713
+ "& .cm-operator, & .cm-tag, & .cm-attribute": {
2714
+ color: ze[700]
2715
+ },
2716
+ "& .cm-number, & .cm-property, & .cm-builtin": {
2717
+ color: Ne[700]
2718
+ },
2719
+ "& .cm-comment": {
2720
+ color: o.palette.text.secondary
2721
+ },
2722
+ "& .cm-variable": {
2723
+ color: bt[900]
2724
+ },
2725
+ "& .cm-variable-2": {
2726
+ color: o.palette.text.primary
2727
+ },
2728
+ "& .cm-punctuation, & .cm-def, ": {
2729
+ color: tt[800]
2730
+ },
2731
+ "& .cm-variable-3, & .cm-type": {
2732
+ color: _e[800]
2733
+ },
2734
+ "& .CodeMirror-foldmarker": {
2735
+ textShadow: "none",
2736
+ color: o.palette.primary.main
2737
+ },
2738
+ "& .cm-error": {
2739
+ color: o.palette.error.main
2740
+ },
2741
+ "& .CodeMirror-selected": {
2742
+ background: tt[800]
2743
+ },
2744
+ "& .cm-header-1": {
2745
+ fontSize: o.typography.h2.fontSize
2746
+ },
2747
+ "& .cm-header-2": {
2748
+ fontSize: o.typography.h3.fontSize
2749
+ },
2750
+ "& .cm-header-3": {
2751
+ fontSize: o.typography.h4.fontSize
2752
+ },
2753
+ "& .cm-header-4": {
2754
+ fontSize: o.typography.h5.fontSize
2755
+ },
2756
+ "& .cm-header-5": {
2757
+ fontSize: o.typography.h6.fontSize
2758
+ },
2759
+ ...t === "small" && {
2760
+ "& .CodeMirror": {
2761
+ height: e || "auto",
2762
+ minHeight: o.spacing(9),
2763
+ ...o.typography.code3
2764
+ }
2765
+ }
2766
+ }));
2767
+ function pr(t) {
2768
+ const e = t.split(`
2769
+ `), o = [], r = [];
2770
+ for (e.forEach((i, l) => {
2771
+ const a = l + 1;
2772
+ if (i.trim() === "-- BEGIN CONTROL CODE")
2773
+ r.push(a);
2774
+ else if (i.trim() === "-- END CONTROL CODE" && r.length > 0) {
2775
+ const c = r.pop();
2776
+ o.push({
2777
+ from: c,
2778
+ to: a
2779
+ });
2780
+ }
2781
+ }); r.length > 0; ) {
2782
+ const i = r.pop();
2783
+ o.push({
2784
+ from: i,
2785
+ to: e.length
2786
+ // Set end to last line for unmatched BEGIN
2787
+ });
2788
+ }
2789
+ return o;
2790
+ }
2791
+ function gr({
2792
+ options: t,
2793
+ value: e,
2794
+ defaultValue: o,
2795
+ id: r,
2796
+ onEditorDidMount: i,
2797
+ onChange: l,
2798
+ onBlur: a,
2799
+ onFocus: c,
2800
+ placeholder: d,
2801
+ disabled: u,
2802
+ size: p = "small",
2803
+ height: s,
2804
+ "data-testid": b,
2805
+ "aria-label": g = "Code editor text area",
2806
+ "aria-labelledby": f,
2807
+ ...y
2808
+ }) {
2809
+ var k;
2810
+ const h = Z(), w = {
2811
+ mode: "sql",
2812
+ theme: "light",
2813
+ lineNumbers: !0,
2814
+ lineWrapping: !0,
2815
+ extraKeys: { "Ctrl-Space": "autocomplete" },
2816
+ placeholder: d,
2817
+ disabled: u,
2818
+ gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
2819
+ styleActiveLine: { nonEmpty: !0 },
2820
+ styleActiveSelected: !0,
2821
+ matchBrackets: !0,
2822
+ foldOptions: {
2823
+ minFoldSize: 1,
2824
+ scanUp: !1
2825
+ },
2826
+ ...t
2827
+ }, [M, A] = B(null);
2828
+ z(() => () => {
2829
+ A(null);
2830
+ }, []);
2831
+ const C = ot(
2832
+ ({ from: v, to: $ }) => {
2833
+ M.foldCode(
2834
+ 0,
2835
+ {
2836
+ rangeFinder: () => {
2837
+ if ($)
2838
+ return {
2839
+ from: { line: v - 1, ch: 0 },
2840
+ to: { line: $ - 1, ch: 0 }
2841
+ };
2842
+ }
2843
+ },
2844
+ "fold"
2845
+ );
2846
+ },
2847
+ [M]
2848
+ );
2849
+ return z(() => {
2850
+ if (!e || !M) return;
2851
+ const v = pr(e);
2852
+ if (v.length)
2853
+ for (const $ of v)
2854
+ C($);
2855
+ }, [e, C, M]), /* @__PURE__ */ x(
2856
+ ur,
2857
+ {
2858
+ size: p,
2859
+ height: s,
2860
+ id: r,
2861
+ "data-size": p,
2862
+ "data-height": s,
2863
+ "data-mode": typeof (t == null ? void 0 : t.mode) == "object" && ((k = t.mode) != null && k.name) ? t.mode.name : t == null ? void 0 : t.mode,
2864
+ "data-fold-gutter": t == null ? void 0 : t.foldGutter,
2865
+ "data-testid": b,
2866
+ "aria-label": f ? void 0 : g,
2867
+ "aria-labelledby": f,
2868
+ "data-name": "code-area-input",
2869
+ children: [
2870
+ e !== void 0 && /* @__PURE__ */ n(
2871
+ Ee,
2872
+ {
2873
+ ...y,
2874
+ value: e,
2875
+ editorDidMount: (v) => {
2876
+ h.current = v, A(v), i == null || i(v);
2877
+ },
2878
+ options: w,
2879
+ onBeforeChange: (v, $, I) => {
2880
+ l == null || l(I);
2881
+ },
2882
+ onBlur: (v) => {
2883
+ a == null || a(v.getValue());
2884
+ },
2885
+ onFocus: c
2886
+ }
2887
+ ),
2888
+ o !== void 0 && /* @__PURE__ */ n(
2889
+ He,
2890
+ {
2891
+ ...y,
2892
+ value: o,
2893
+ options: w,
2894
+ onBlur: (v) => {
2895
+ a == null || a(v.getValue());
2896
+ },
2897
+ onFocus: c
2898
+ }
2899
+ )
2900
+ ]
2901
+ }
2902
+ );
2903
+ }
2904
+ const fr = m(Bt)(() => ({
2905
+ display: "flex",
2906
+ flexDirection: "column",
2907
+ flex: 1
2908
+ })), mr = m(D, {
2909
+ shouldForwardProp: (t) => ![
2910
+ "variant",
2911
+ "error",
2912
+ "disabled",
2913
+ "readOnly",
2914
+ "lineNumbers",
2915
+ "fullScreen"
2916
+ ].includes(t)
2917
+ })(
2918
+ ({ variant: t, error: e, disabled: o, readOnly: r, lineNumbers: i, fullScreen: l, theme: a }) => ({
2919
+ position: "relative",
2920
+ overflow: "auto",
2921
+ display: "flex",
2922
+ flexDirection: "column",
2923
+ flex: 1,
2924
+ width: "100%",
2925
+ minHeight: 0,
2926
+ background: a.palette.background.paper,
2927
+ // Active line addon
2928
+ ".CodeMirror-focused .CodeMirror-activeline": {
2929
+ "& .CodeMirror-activeline-background, & .CodeMirror-activeline-gutter": {
2930
+ background: a.palette.primary.background
2931
+ }
2932
+ },
2933
+ ...l && {
2934
+ maxWidth: "100%",
2935
+ maxHeight: "100vh",
2936
+ height: "100vh"
2937
+ },
2938
+ ...(t === "filled" || t === "outlined") && {
2939
+ borderRadius: a.spacing(0.5),
2940
+ transition: a.transitions.create("background-color", {
2941
+ easing: a.transitions.easing.easeInOut,
2942
+ duration: a.transitions.duration.shortest
2943
+ }),
2944
+ "&:after": {
2945
+ content: '""',
2946
+ position: "absolute",
2947
+ top: 0,
2948
+ left: 0,
2949
+ right: 0,
2950
+ bottom: 0,
2951
+ pointerEvents: "none",
2952
+ border: `1px solid ${a.palette.default.outlinedBorder}`,
2953
+ borderRadius: a.spacing(0.5),
2954
+ transition: a.transitions.create("border-color", {
2955
+ easing: a.transitions.easing.easeInOut,
2956
+ duration: a.transitions.duration.shortest
2957
+ })
2958
+ },
2959
+ "&:hover:after": {
2960
+ borderColor: a.palette.common.black
2961
+ },
2962
+ "&:focus-within": {
2963
+ overflow: "hidden",
2964
+ "&:after": {
2965
+ borderWidth: "2px",
2966
+ borderColor: a.palette.primary.main
2967
+ }
2968
+ },
2969
+ ...e && {
2970
+ "&.MuiBox-root:after": {
2971
+ borderWidth: "2px",
2972
+ borderColor: a.palette.error.main
2973
+ }
2974
+ }
2975
+ },
2976
+ ...t === "filled" && {
2977
+ backgroundColor: a.palette.background.paper,
2978
+ "&.codeArea-filled:after": {
2979
+ borderColor: "transparent"
2980
+ },
2981
+ "&.codeArea-filled:hover:after": {
2982
+ borderColor: a.palette.common.black
2983
+ },
2984
+ "&.codeArea-filled:focus-within:after": {
2985
+ borderWidth: "2px",
2986
+ borderColor: a.palette.primary.main
2987
+ },
2988
+ "& .CodeMirror": {
2989
+ backgroundColor: a.palette.default.background,
2990
+ "&:focus-within": {
2991
+ backgroundColor: a.palette.background.paper
2992
+ }
2993
+ },
2994
+ ...e && {
2995
+ borderColor: a.palette.error.main,
2996
+ "& .CodeMirror": {
2997
+ backgroundColor: a.palette.default.background
2998
+ },
2999
+ "&:hover, &:focus-within, &.codeArea-filled:after, &.codeArea-filled:hover:after, &.codeArea-filled:focus-within:after": {
3000
+ borderColor: a.palette.error.main
3001
+ },
3002
+ "&:focus-within": {
3003
+ "& .CodeMirror": {
3004
+ backgroundColor: a.palette.background.paper
3005
+ }
3006
+ }
3007
+ }
3008
+ },
3009
+ ...r && {
3010
+ "& .CodeMirror": {
3011
+ backgroundColor: a.palette.default.background,
3012
+ ".CodeMirror-cursors": {
3013
+ visibility: "hidden !important"
3014
+ }
3015
+ },
3016
+ ...t === "filled" && {
3017
+ backgroundColor: a.palette.background.paper
3018
+ }
3019
+ },
3020
+ ...o && {
3021
+ pointerEvents: "none",
3022
+ "& .CodeMirror": {
3023
+ color: a.palette.text.disabled,
3024
+ backgroundColor: a.palette.default.background,
3025
+ "& span, .CodeMirror-linenumber, .CodeMirror-guttermarker-subtle": {
3026
+ color: a.palette.text.disabled
3027
+ }
3028
+ },
3029
+ ...t === "filled" && {
3030
+ backgroundColor: a.palette.background.paper
3031
+ }
3032
+ },
3033
+ ...!i && {
3034
+ "& .CodeMirror-scroll .CodeMirror-sizer": {
3035
+ marginLeft: `${a.spacing(1)} !important`
3036
+ },
3037
+ "& .CodeMirror-gutter-background": {
3038
+ width: `${a.spacing(2)} !important`
3039
+ }
3040
+ }
3041
+ })
3042
+ ), br = m(D, {
3043
+ shouldForwardProp: (t) => t !== "hasActions"
3044
+ })(({ theme: t, hasActions: e }) => ({
3045
+ flex: "1 1 auto",
3046
+ overflowY: "auto",
3047
+ display: "flex",
3048
+ flexDirection: "column",
3049
+ ...e && {
3050
+ ".CodeMirror-line": {
3051
+ paddingRight: `${t.spacing(4)} !important`
3052
+ }
3053
+ }
3054
+ })), hr = m(K)(({ theme: t }) => ({
3055
+ width: N,
3056
+ height: N,
3057
+ fill: t.palette.text.secondary
3058
+ }));
3059
+ function xr({
3060
+ value: t,
3061
+ defaultValue: e,
3062
+ validate: o,
3063
+ onChange: r,
3064
+ onBlur: i,
3065
+ onFocus: l,
3066
+ label: a,
3067
+ labelHelpTooltip: c,
3068
+ placeholder: d,
3069
+ type: u,
3070
+ disabled: p,
3071
+ copyValue: s,
3072
+ helperText: b,
3073
+ error: g,
3074
+ size: f = "small",
3075
+ variant: y = "outlined",
3076
+ onClickExpand: h,
3077
+ onClickFooter: w,
3078
+ disabledButtonFooter: M,
3079
+ labelIdButtonFooter: A,
3080
+ ariaLabelButtonFooter: C,
3081
+ options: k,
3082
+ id: v = "code-area-field",
3083
+ saveLoading: $,
3084
+ showSaveSnackbar: I,
3085
+ onCloseSaveSnackbar: E,
3086
+ fullScreen: S,
3087
+ isExpanded: L,
3088
+ ...V
3089
+ }) {
3090
+ const [Xt, pt] = B(!1), gt = (k == null ? void 0 : k.readOnly) ?? !1, Qt = (k == null ? void 0 : k.lineNumbers) ?? !0;
3091
+ return /* @__PURE__ */ x(
3092
+ fr,
3093
+ {
3094
+ size: f,
3095
+ error: g,
3096
+ disabled: p,
3097
+ "aria-disabled": p,
3098
+ "data-size": f,
3099
+ "data-full-screen": S,
3100
+ "data-variant": y,
3101
+ "data-name": "code-area-field",
3102
+ children: [
3103
+ a && /* @__PURE__ */ n(
3104
+ Tt,
3105
+ {
3106
+ htmlFor: v,
3107
+ disabled: p,
3108
+ error: g,
3109
+ focused: Xt,
3110
+ shrink: !0,
3111
+ id: `${v}-label`,
3112
+ children: /* @__PURE__ */ n(
3113
+ X,
3114
+ {
3115
+ label: a,
3116
+ type: u,
3117
+ icon: c ? /* @__PURE__ */ n(P, { title: c, children: /* @__PURE__ */ n(
3118
+ hr,
3119
+ {
3120
+ "aria-label": typeof c == "string" ? c : void 0
3121
+ }
3122
+ ) }) : void 0
3123
+ }
3124
+ )
3125
+ }
3126
+ ),
3127
+ /* @__PURE__ */ x(
3128
+ mr,
3129
+ {
3130
+ variant: y,
3131
+ error: !!g,
3132
+ disabled: p,
3133
+ readOnly: gt,
3134
+ lineNumbers: Qt,
3135
+ className: y === "filled" ? "codeArea-filled" : "",
3136
+ fullScreen: S,
3137
+ children: [
3138
+ /* @__PURE__ */ n(
3139
+ sr,
3140
+ {
3141
+ onClickExpand: h,
3142
+ copyValue: s,
3143
+ disabled: p,
3144
+ size: L ? "medium" : "small"
3145
+ }
3146
+ ),
3147
+ /* @__PURE__ */ n(br, { hasActions: !!s || !!h, children: /* @__PURE__ */ n(
3148
+ gr,
3149
+ {
3150
+ ...V,
3151
+ id: v,
3152
+ disabled: p,
3153
+ value: t,
3154
+ defaultValue: e,
3155
+ placeholder: d,
3156
+ onFocus: () => {
3157
+ pt(!0), l == null || l();
3158
+ },
3159
+ onBlur: (Q) => {
3160
+ i && i(Q), r && r(Q), o && o(Q), pt(!1);
3161
+ },
3162
+ onChange: r,
3163
+ size: f,
3164
+ options: {
3165
+ ...gt && {
3166
+ styleActiveLine: !1,
3167
+ matchBrackets: !1
3168
+ },
3169
+ ...k
3170
+ },
3171
+ "aria-labelledby": a ? `${v}-label` : void 0
3172
+ }
3173
+ ) }),
3174
+ /* @__PURE__ */ n(
3175
+ qt,
3176
+ {
3177
+ labelIdButtonFooter: A,
3178
+ ariaLabelButtonFooter: C,
3179
+ onClickFooter: w,
3180
+ disabled: p,
3181
+ disabledButtonFooter: M,
3182
+ size: "small",
3183
+ loading: !!$,
3184
+ showSnackbar: I,
3185
+ onCloseSnackbar: E
3186
+ }
3187
+ )
3188
+ ]
3189
+ }
3190
+ ),
3191
+ b && /* @__PURE__ */ n(J, { children: b })
3192
+ ]
3193
+ }
3194
+ );
3195
+ }
3196
+ const yr = m(D)(({ theme: t }) => ({
3197
+ position: "relative",
3198
+ marginBottom: "1px",
3199
+ padding: t.spacing(1.5, 2, 1.5, 5.5),
3200
+ "&:before": {
3201
+ content: '""',
3202
+ position: "absolute",
3203
+ top: 0,
3204
+ left: 0,
3205
+ bottom: 0,
3206
+ zIndex: 1,
3207
+ width: t.spacing(5),
3208
+ background: t.palette.background.default
3209
+ },
3210
+ "&:after": {
3211
+ content: '""',
3212
+ position: "absolute",
3213
+ top: 0,
3214
+ right: 0,
3215
+ left: 0,
3216
+ bottom: 0,
3217
+ zIndex: 2,
3218
+ background: "linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 40%)"
3219
+ },
3220
+ ".MuiFormHelperText-root": {
3221
+ marginTop: 0
3222
+ }
3223
+ })), Cr = m(D)(({ theme: t }) => ({
3224
+ position: "relative",
3225
+ zIndex: 3,
3226
+ display: "flex",
3227
+ alignItems: "center",
3228
+ gap: t.spacing(1)
3229
+ }));
3230
+ function Mr({
3231
+ children: t,
3232
+ hasDivider: e
3233
+ }) {
3234
+ const o = j();
3235
+ return t ? /* @__PURE__ */ x(H, { children: [
3236
+ /* @__PURE__ */ n(yr, { children: /* @__PURE__ */ x(Cr, { children: [
3237
+ /* @__PURE__ */ n(Be, { htmlColor: o.palette.error.main }),
3238
+ /* @__PURE__ */ n(J, { error: !0, children: t })
3239
+ ] }) }),
3240
+ e && /* @__PURE__ */ n(_, {})
3241
+ ] }) : null;
3242
+ }
3243
+ const kt = {
2316
3244
  small: "480px",
2317
3245
  medium: "640px",
2318
3246
  large: "640px",
2319
3247
  xlarge: "720px"
2320
- }, st = {
3248
+ }, vt = {
2321
3249
  small: {
2322
3250
  width: "432px",
2323
3251
  maxWidth: "432px"
@@ -2336,47 +3264,47 @@ const ct = {
2336
3264
  height: "calc(100vh - 80px)",
2337
3265
  maxWidth: "960px"
2338
3266
  }
2339
- }, dt = g(ee, {
3267
+ }, wt = m(he, {
2340
3268
  shouldForwardProp: (t) => !["fullScreen", "height", "width", "hasForm"].includes(t)
2341
3269
  })(
2342
3270
  ({
2343
3271
  fullScreen: t,
2344
3272
  height: e,
2345
- width: n,
2346
- hasForm: o,
2347
- size: a = "small",
2348
- theme: r
3273
+ width: o,
3274
+ hasForm: r,
3275
+ size: i = "small",
3276
+ theme: l
2349
3277
  }) => ({
2350
3278
  "&.MuiPaper-root": {
2351
3279
  position: "relative",
2352
3280
  display: "flex",
2353
3281
  flexDirection: "column",
2354
- margin: r.spacing(5),
2355
- borderRadius: r.spacing(1),
2356
- ...st[a],
2357
- maxHeight: ct[a],
2358
- [`@media (max-height:${ct[a]})`]: {
3282
+ margin: l.spacing(5),
3283
+ borderRadius: l.spacing(1),
3284
+ ...vt[i],
3285
+ maxHeight: kt[i],
3286
+ [`@media (max-height:${kt[i]})`]: {
2359
3287
  maxHeight: "calc(100vh - 80px)",
2360
- ...a === "large" && {
3288
+ ...i === "large" && {
2361
3289
  minHeight: e !== "auto" ? "calc(100vh - 80px)" : "auto"
2362
3290
  }
2363
3291
  },
2364
3292
  ...t && {
2365
3293
  width: "100vw",
2366
- maxWidth: `calc(100vw - ${r.spacing(10)})`,
3294
+ maxWidth: `calc(100vw - ${l.spacing(10)})`,
2367
3295
  height: "100vh",
2368
- maxHeight: `calc(100vh - ${r.spacing(10)})`,
2369
- margin: r.spacing(5),
2370
- borderRadius: r.spacing(1)
3296
+ maxHeight: `calc(100vh - ${l.spacing(10)})`,
3297
+ margin: l.spacing(5),
3298
+ borderRadius: l.spacing(1)
2371
3299
  },
2372
3300
  ...e && {
2373
3301
  height: e,
2374
3302
  minHeight: e
2375
3303
  },
2376
- ...n && {
2377
- width: n
3304
+ ...o && {
3305
+ width: o
2378
3306
  },
2379
- [r.breakpoints.down("sm")]: {
3307
+ [l.breakpoints.down("sm")]: {
2380
3308
  position: "absolute",
2381
3309
  width: "100%",
2382
3310
  maxWidth: "100%",
@@ -2390,21 +3318,21 @@ const ct = {
2390
3318
  borderRadius: 0,
2391
3319
  ...e && {
2392
3320
  top: "auto",
2393
- borderRadius: r.spacing(1, 1, 0, 0),
3321
+ borderRadius: l.spacing(1, 1, 0, 0),
2394
3322
  height: e,
2395
3323
  minHeight: e
2396
3324
  }
2397
3325
  },
2398
3326
  // Special case for Dialogs wrapped in Form
2399
- ...o && {
2400
- maxHeight: `calc(100vh - ${r.spacing(10)})`,
3327
+ ...r && {
3328
+ maxHeight: `calc(100vh - ${l.spacing(10)})`,
2401
3329
  form: {
2402
3330
  flex: 1,
2403
3331
  display: "flex",
2404
3332
  flexDirection: "column",
2405
3333
  justifyContent: "space-between",
2406
3334
  overflow: "hidden",
2407
- ...st[a],
3335
+ ...vt[i],
2408
3336
  maxWidth: "100%",
2409
3337
  ...t && {
2410
3338
  width: "100%",
@@ -2416,17 +3344,17 @@ const ct = {
2416
3344
  height: e,
2417
3345
  minHeight: e
2418
3346
  },
2419
- ...n && {
2420
- width: n
3347
+ ...o && {
3348
+ width: o
2421
3349
  },
2422
- [r.breakpoints.down("sm")]: {
3350
+ [l.breakpoints.down("sm")]: {
2423
3351
  width: "100%",
2424
3352
  maxWidth: "100%",
2425
3353
  height: "100vh",
2426
3354
  maxHeight: "100vh",
2427
3355
  ...e && {
2428
3356
  top: "auto",
2429
- borderRadius: r.spacing(1, 1, 0, 0),
3357
+ borderRadius: l.spacing(1, 1, 0, 0),
2430
3358
  height: e,
2431
3359
  minHeight: e
2432
3360
  }
@@ -2436,130 +3364,130 @@ const ct = {
2436
3364
  }
2437
3365
  })
2438
3366
  );
2439
- function Ln({
3367
+ function kr({
2440
3368
  nonModal: t,
2441
3369
  children: e,
2442
- size: n = "small",
2443
- PaperProps: o,
2444
- fullScreen: a,
2445
- height: r,
2446
- width: l,
2447
- hasForm: s,
2448
- "aria-label": c,
2449
- "data-testid": p,
2450
- ...h
2451
- }, d) {
2452
- return t ? /* @__PURE__ */ i(
2453
- dt,
3370
+ size: o = "small",
3371
+ PaperProps: r,
3372
+ fullScreen: i,
3373
+ height: l,
3374
+ width: a,
3375
+ hasForm: c,
3376
+ "aria-label": d,
3377
+ "data-testid": u,
3378
+ ...p
3379
+ }, s) {
3380
+ return t ? /* @__PURE__ */ n(
3381
+ wt,
2454
3382
  {
2455
- size: n,
2456
- fullScreen: a,
2457
- height: r,
2458
- width: l,
2459
- hasForm: s,
2460
- "aria-label": c,
2461
- "data-testid": p,
3383
+ size: o,
3384
+ fullScreen: i,
3385
+ height: l,
3386
+ width: a,
3387
+ hasForm: c,
3388
+ "aria-label": d,
3389
+ "data-testid": u,
2462
3390
  "data-name": "dialog",
2463
- ...h,
2464
- ref: d,
3391
+ ...p,
3392
+ ref: s,
2465
3393
  children: e
2466
3394
  }
2467
- ) : /* @__PURE__ */ i(
2468
- ne,
3395
+ ) : /* @__PURE__ */ n(
3396
+ xe,
2469
3397
  {
2470
- PaperComponent: dt,
3398
+ PaperComponent: wt,
2471
3399
  PaperProps: {
2472
- ...o,
2473
- size: n,
2474
- fullScreen: a,
2475
- height: r,
2476
- width: l,
2477
- hasForm: s
3400
+ ...r,
3401
+ size: o,
3402
+ fullScreen: i,
3403
+ height: l,
3404
+ width: a,
3405
+ hasForm: c
2478
3406
  },
2479
- fullScreen: a,
3407
+ fullScreen: i,
2480
3408
  role: "section",
2481
- "aria-label": c,
2482
- "data-testid": p,
2483
- "data-size": n,
2484
- "data-width": l,
2485
- "data-height": r,
3409
+ "aria-label": d,
3410
+ "data-testid": u,
3411
+ "data-size": o,
3412
+ "data-width": a,
3413
+ "data-height": l,
2486
3414
  "data-name": "dialog",
2487
- ...h,
2488
- ref: d,
3415
+ ...p,
3416
+ ref: s,
2489
3417
  children: e
2490
3418
  }
2491
3419
  );
2492
3420
  }
2493
- const Lo = T(Ln), Wn = g(oe)(() => ({
3421
+ const vr = O(kr), wr = m(ye)(() => ({
2494
3422
  padding: 0,
2495
3423
  zIndex: 10
2496
- })), En = g(v)(({ theme: t }) => ({
3424
+ })), Dr = m(D)(({ theme: t }) => ({
2497
3425
  display: "flex",
2498
3426
  alignItems: "center",
2499
3427
  justifyContent: "space-between",
2500
3428
  padding: t.spacing(2),
2501
3429
  minHeight: t.spacing(8)
2502
- })), ut = g(v)(({ theme: t }) => ({
3430
+ })), Dt = m(D)(({ theme: t }) => ({
2503
3431
  display: "flex",
2504
3432
  alignItems: "center",
2505
3433
  gap: t.spacing(1),
2506
3434
  overflow: "hidden"
2507
- })), Hn = g(Mt)(({ theme: t }) => ({
3435
+ })), Ar = m(Wt)(({ theme: t }) => ({
2508
3436
  color: t.palette.text.secondary
2509
- })), _n = g(j)(() => ({
3437
+ })), Sr = m(_)(() => ({
2510
3438
  "+ .MuiDialogContent-root": {
2511
3439
  borderTop: "none !important"
2512
3440
  }
2513
3441
  }));
2514
- function Wo({
3442
+ function Ir({
2515
3443
  title: t,
2516
3444
  chipLabel: e,
2517
- chipProps: n,
2518
- children: o,
2519
- onClose: a,
2520
- secondaryActions: r,
2521
- "aria-label": l,
2522
- closeIcon: s,
2523
- ...c
3445
+ chipProps: o,
3446
+ children: r,
3447
+ onClose: i,
3448
+ secondaryActions: l,
3449
+ "aria-label": a,
3450
+ closeIcon: c,
3451
+ ...d
2524
3452
  }) {
2525
- const p = F(), h = R(p);
2526
- return /* @__PURE__ */ y(V, { children: [
2527
- /* @__PURE__ */ y(Wn, { component: "div", "data-name": "dialog-header", ...c, children: [
2528
- /* @__PURE__ */ y(En, { children: [
2529
- /* @__PURE__ */ y(ut, { flex: 1, maxWidth: 0.8, children: [
2530
- /* @__PURE__ */ i(
2531
- S,
3453
+ const u = R(), p = T(u);
3454
+ return /* @__PURE__ */ x(H, { children: [
3455
+ /* @__PURE__ */ x(wr, { component: "div", "data-name": "dialog-header", ...d, children: [
3456
+ /* @__PURE__ */ x(Dr, { children: [
3457
+ /* @__PURE__ */ x(Dt, { flex: 1, maxWidth: 0.8, children: [
3458
+ /* @__PURE__ */ n(
3459
+ F,
2532
3460
  {
2533
3461
  component: "h2",
2534
3462
  variant: "inherit",
2535
3463
  noWrap: !0,
2536
- "aria-label": l,
3464
+ "aria-label": a,
2537
3465
  role: "heading",
2538
3466
  children: t
2539
3467
  }
2540
3468
  ),
2541
- e && /* @__PURE__ */ i(ie, { color: "default", label: e, ...n })
3469
+ e && /* @__PURE__ */ n(Ce, { color: "default", label: e, ...o })
2542
3470
  ] }),
2543
- /* @__PURE__ */ y(ut, { children: [
2544
- r,
2545
- a && /* @__PURE__ */ i(
2546
- H,
3471
+ /* @__PURE__ */ x(Dt, { children: [
3472
+ l,
3473
+ i && /* @__PURE__ */ n(
3474
+ P,
2547
3475
  {
2548
- title: h.formatMessage({ id: "c4r.button.close" }),
3476
+ title: p.formatMessage({ id: "c4r.button.close" }),
2549
3477
  placement: "left",
2550
- children: /* @__PURE__ */ i(W, { onClick: a, children: s || /* @__PURE__ */ i(Hn, { "data-testid": "CloseIcon" }) })
3478
+ children: /* @__PURE__ */ n(W, { onClick: i, children: c || /* @__PURE__ */ n(Ar, { "data-testid": "CloseIcon" }) })
2551
3479
  }
2552
3480
  )
2553
3481
  ] })
2554
3482
  ] }),
2555
- o
3483
+ r
2556
3484
  ] }),
2557
- o && /* @__PURE__ */ i(_n, {})
3485
+ r && /* @__PURE__ */ n(Sr, {})
2558
3486
  ] });
2559
3487
  }
2560
- const Pn = g(ae, {
3488
+ const $r = m(Me, {
2561
3489
  shouldForwardProp: (t) => !["scrollableContent", "withGutter", "withBottomGutter"].includes(t)
2562
- })(({ theme: t, scrollableContent: e, withGutter: n, withBottomGutter: o }) => ({
3490
+ })(({ theme: t, scrollableContent: e, withGutter: o, withBottomGutter: r }) => ({
2563
3491
  display: "flex",
2564
3492
  flexDirection: "column",
2565
3493
  gap: t.spacing(3),
@@ -2575,76 +3503,76 @@ const Pn = g(ae, {
2575
3503
  display: "none"
2576
3504
  }
2577
3505
  },
2578
- ...n && {
3506
+ ...o && {
2579
3507
  padding: ` ${t.spacing(1, 2, 0)} !important`,
2580
3508
  ".MuiDialog-paperFullScreen &": {
2581
3509
  padding: `${t.spacing(2, 2, 0)} !important`
2582
3510
  }
2583
3511
  },
2584
- ...o && {
3512
+ ...r && {
2585
3513
  paddingBottom: `${t.spacing(3)} !important`,
2586
3514
  ".MuiDialog-paperFullScreen &": {
2587
3515
  paddingBottom: `${t.spacing(3)} !important`
2588
3516
  }
2589
3517
  }
2590
3518
  }));
2591
- function Gn({
3519
+ function Br({
2592
3520
  children: t,
2593
3521
  scrollableContent: e,
2594
- hasFooterAlert: n,
2595
- withGutter: o = !0,
2596
- withBottomGutter: a = !0,
2597
- onScroll: r,
2598
- ...l
2599
- }, s) {
2600
- const c = N(), [p, h] = $(null);
2601
- Lt(
2602
- s,
2603
- () => p,
2604
- [p]
3522
+ hasFooterAlert: o,
3523
+ withGutter: r = !0,
3524
+ withBottomGutter: i = !0,
3525
+ onScroll: l,
3526
+ ...a
3527
+ }, c) {
3528
+ const d = j(), [u, p] = B(null);
3529
+ ee(
3530
+ c,
3531
+ () => u,
3532
+ [u]
2605
3533
  );
2606
- const d = nt(
2607
- (u) => {
2608
- const f = Math.abs(u.scrollHeight - u.clientHeight - u.scrollTop) < 1, M = u.scrollTop === 0, b = `1px solid ${c.palette.divider}`;
2609
- u.style.borderTop = M ? "none" : b, u.style.borderBottom = f && !n ? "none" : b;
3534
+ const s = ot(
3535
+ (g) => {
3536
+ const f = Math.abs(g.scrollHeight - g.clientHeight - g.scrollTop) < 1, y = g.scrollTop === 0, h = `1px solid ${d.palette.divider}`;
3537
+ g.style.borderTop = y ? "none" : h, g.style.borderBottom = f && !o ? "none" : h;
2610
3538
  },
2611
- [c.palette.divider, n]
2612
- ), m = nt(
2613
- (u) => {
2614
- d(u.target), r == null || r(u);
3539
+ [d.palette.divider, o]
3540
+ ), b = ot(
3541
+ (g) => {
3542
+ s(g.target), l == null || l(g);
2615
3543
  },
2616
- [d, r]
3544
+ [s, l]
2617
3545
  );
2618
- return _(() => {
2619
- p && d(p);
2620
- }, [p, d]), _(() => {
2621
- if (!p || typeof ResizeObserver > "u") return;
2622
- const u = new ResizeObserver(() => {
2623
- d(p);
3546
+ return z(() => {
3547
+ u && s(u);
3548
+ }, [u, s]), z(() => {
3549
+ if (!u || typeof ResizeObserver > "u") return;
3550
+ const g = new ResizeObserver(() => {
3551
+ s(u);
2624
3552
  });
2625
- return u.observe(p), () => u.disconnect();
2626
- }, [p, d]), /* @__PURE__ */ i(
2627
- Pn,
3553
+ return g.observe(u), () => g.disconnect();
3554
+ }, [u, s]), /* @__PURE__ */ n(
3555
+ $r,
2628
3556
  {
2629
- ref: h,
2630
- onScroll: m,
3557
+ ref: p,
3558
+ onScroll: b,
2631
3559
  scrollableContent: e,
2632
- withGutter: o,
2633
- withBottomGutter: a && o,
3560
+ withGutter: r,
3561
+ withBottomGutter: i && r,
2634
3562
  "data-name": "dialog-content",
2635
- ...l,
3563
+ ...a,
2636
3564
  children: t
2637
3565
  }
2638
3566
  );
2639
3567
  }
2640
- const jn = T(Gn), Eo = g(jn, {
3568
+ const Zt = O(Br), Jn = m(Zt, {
2641
3569
  shouldForwardProp: (t) => t !== "withAlert"
2642
3570
  })(({ withAlert: t, theme: e }) => ({
2643
3571
  padding: `${e.spacing(0, 2)} !important`,
2644
3572
  ...t && {
2645
3573
  paddingBottom: `${e.spacing(3)} !important`
2646
3574
  }
2647
- })), Vn = g(Ct)(({ theme: t }) => ({
3575
+ })), Tr = m(Et)(({ theme: t }) => ({
2648
3576
  minHeight: "auto",
2649
3577
  padding: 0,
2650
3578
  backgroundColor: "transparent",
@@ -2658,43 +3586,43 @@ const jn = T(Gn), Eo = g(jn, {
2658
3586
  color: t.palette.text.primary
2659
3587
  }
2660
3588
  }));
2661
- function Rt({
3589
+ function Jt({
2662
3590
  children: t,
2663
3591
  severity: e = "neutral",
2664
- ...n
3592
+ ...o
2665
3593
  }) {
2666
- return /* @__PURE__ */ i(Vn, { severity: e, ...n, "data-name": "dialog-alert", children: t });
3594
+ return /* @__PURE__ */ n(Tr, { severity: e, ...o, "data-name": "dialog-alert", children: t });
2667
3595
  }
2668
- const Nn = g(v, {
3596
+ const Rr = m(D, {
2669
3597
  shouldForwardProp: (t) => !["dark", "hasChildren"].includes(t)
2670
- })(({ dark: t, hasChildren: e, theme: n }) => ({
3598
+ })(({ dark: t, hasChildren: e, theme: o }) => ({
2671
3599
  flex: "0 0 auto",
2672
3600
  display: "block",
2673
- minHeight: e ? n.spacing(8) : "auto",
3601
+ minHeight: e ? o.spacing(8) : "auto",
2674
3602
  zIndex: 10,
2675
3603
  ...t && {
2676
- backgroundColor: n.palette.common.black,
2677
- color: n.palette.white[60],
3604
+ backgroundColor: o.palette.common.black,
3605
+ color: o.palette.white[60],
2678
3606
  ".MuiAlert-root": {
2679
3607
  ".MuiTypography-root, .MuiAlert-message :not(.MuiAlertTitle-root)": {
2680
- color: n.palette.white[60],
3608
+ color: o.palette.white[60],
2681
3609
  a: {
2682
- color: `${n.palette.secondary.main} !important`
3610
+ color: `${o.palette.secondary.main} !important`
2683
3611
  }
2684
3612
  },
2685
3613
  ".MuiAlert-icon": {
2686
- color: n.palette.white[60]
3614
+ color: o.palette.white[60]
2687
3615
  }
2688
3616
  }
2689
3617
  }
2690
- })), Un = g(v)(() => ({
3618
+ })), Or = m(D)(() => ({
2691
3619
  display: "flex",
2692
3620
  alignItems: "center",
2693
3621
  justifyContent: "space-between",
2694
3622
  "& > div:empty": {
2695
3623
  padding: 0
2696
3624
  }
2697
- })), Yn = g(v, {
3625
+ })), Fr = m(D, {
2698
3626
  shouldForwardProp: (t) => t !== "hasAlert"
2699
3627
  })(({ hasAlert: t, theme: e }) => ({
2700
3628
  display: "flex",
@@ -2702,7 +3630,7 @@ const Nn = g(v, {
2702
3630
  gap: e.spacing(1),
2703
3631
  padding: e.spacing(2),
2704
3632
  paddingTop: t ? 0 : e.spacing(2)
2705
- })), Ft = g(re, {
3633
+ })), Kt = m(ke, {
2706
3634
  shouldForwardProp: (t) => t !== "hasAlert"
2707
3635
  })(({ hasAlert: t, theme: e }) => ({
2708
3636
  gap: e.spacing(1),
@@ -2712,42 +3640,42 @@ const Nn = g(v, {
2712
3640
  ".MuiButton-root + .MuiButton-root": {
2713
3641
  marginLeft: 0
2714
3642
  }
2715
- })), qn = g(j)(() => ({
3643
+ })), Lr = m(_)(() => ({
2716
3644
  // To prevent double border in the top when content is scrollable
2717
3645
  marginTop: "-1px"
2718
3646
  }));
2719
- function Ho({
3647
+ function Wr({
2720
3648
  children: t,
2721
3649
  secondaryActions: e,
2722
- alertContent: n,
2723
- alertProps: o,
2724
- dark: a,
2725
- topContent: r,
2726
- ...l
3650
+ alertContent: o,
3651
+ alertProps: r,
3652
+ dark: i,
3653
+ topContent: l,
3654
+ ...a
2727
3655
  }) {
2728
- return /* @__PURE__ */ y(V, { children: [
2729
- r,
2730
- !!n && /* @__PURE__ */ i(qn, {}),
2731
- /* @__PURE__ */ y(
2732
- Nn,
3656
+ return /* @__PURE__ */ x(H, { children: [
3657
+ l,
3658
+ !!o && /* @__PURE__ */ n(Lr, {}),
3659
+ /* @__PURE__ */ x(
3660
+ Rr,
2733
3661
  {
2734
- ...l,
2735
- dark: a,
2736
- "data-theme": a ? "dark" : "light",
3662
+ ...a,
3663
+ dark: i,
3664
+ "data-theme": i ? "dark" : "light",
2737
3665
  "data-name": "dialog-footer",
2738
3666
  hasChildren: !!t,
2739
3667
  children: [
2740
- !!n && /* @__PURE__ */ i(v, { sx: { p: 2, pt: 1.5, pb: 1 }, children: /* @__PURE__ */ i(Rt, { ...o, children: n }) }),
2741
- /* @__PURE__ */ y(Un, { children: [
2742
- /* @__PURE__ */ i(Yn, { hasAlert: !!n, children: e }),
2743
- /* @__PURE__ */ i(Ft, { hasAlert: !!n, children: t })
3668
+ !!o && /* @__PURE__ */ n(D, { sx: { p: 2, pt: 1.5, pb: 1 }, children: /* @__PURE__ */ n(Jt, { ...r, children: o }) }),
3669
+ /* @__PURE__ */ x(Or, { children: [
3670
+ /* @__PURE__ */ n(Fr, { hasAlert: !!o, children: e }),
3671
+ /* @__PURE__ */ n(Kt, { hasAlert: !!o, children: t })
2744
3672
  ] })
2745
3673
  ]
2746
3674
  }
2747
3675
  )
2748
3676
  ] });
2749
3677
  }
2750
- const zn = g(v)(({ theme: t }) => ({
3678
+ const Er = m(D)(({ theme: t }) => ({
2751
3679
  position: "absolute",
2752
3680
  width: "100%",
2753
3681
  zIndex: 100,
@@ -2760,9 +3688,9 @@ const zn = g(v)(({ theme: t }) => ({
2760
3688
  boxSizing: "border-box",
2761
3689
  alignItems: "flex-end",
2762
3690
  background: t.palette.white[60]
2763
- })), Zn = g("div")(() => ({
3691
+ })), Hr = m("div")(() => ({
2764
3692
  width: "100%"
2765
- })), Jn = g(v)(({ theme: t }) => ({
3693
+ })), Pr = m(D)(({ theme: t }) => ({
2766
3694
  width: "100%",
2767
3695
  padding: t.spacing(1.5, 2, 2),
2768
3696
  backgroundColor: t.palette.background.paper,
@@ -2772,47 +3700,47 @@ const zn = g(v)(({ theme: t }) => ({
2772
3700
  marginTop: t.spacing(1)
2773
3701
  }
2774
3702
  }));
2775
- function _o({
3703
+ function zr({
2776
3704
  children: t,
2777
3705
  onClickAway: e,
2778
- actions: n,
2779
- severity: o = "warning",
2780
- opened: a,
2781
- "data-testid": r,
2782
- "aria-label": l,
2783
- ...s
3706
+ actions: o,
3707
+ severity: r = "warning",
3708
+ opened: i,
3709
+ "data-testid": l,
3710
+ "aria-label": a,
3711
+ ...c
2784
3712
  }) {
2785
- const c = Y(null), p = N();
2786
- return /* @__PURE__ */ i(
2787
- zn,
3713
+ const d = Z(null), u = j();
3714
+ return /* @__PURE__ */ n(
3715
+ Er,
2788
3716
  {
2789
- ref: c,
2790
- "data-testid": r,
2791
- "aria-label": l,
3717
+ ref: d,
3718
+ "data-testid": l,
3719
+ "aria-label": a,
2792
3720
  role: "presentation",
2793
3721
  "data-name": "dialog-confirmation",
2794
- children: /* @__PURE__ */ i(xe, { onClickAway: () => {
3722
+ children: /* @__PURE__ */ n(Ge, { onClickAway: () => {
2795
3723
  e && e();
2796
- }, children: /* @__PURE__ */ i(
2797
- xt,
3724
+ }, children: /* @__PURE__ */ n(
3725
+ Rt,
2798
3726
  {
2799
3727
  direction: "up",
2800
- in: a,
2801
- container: c.current,
3728
+ in: i,
3729
+ container: d.current,
2802
3730
  mountOnEnter: !0,
2803
3731
  unmountOnExit: !0,
2804
- easing: p.transitions.easing.easeOut,
3732
+ easing: u.transitions.easing.easeOut,
2805
3733
  timeout: 350,
2806
- children: /* @__PURE__ */ i(Zn, { children: /* @__PURE__ */ y(Jn, { children: [
2807
- /* @__PURE__ */ i(Rt, { severity: o, ...s, children: t }),
2808
- /* @__PURE__ */ i(Ft, { children: n })
3734
+ children: /* @__PURE__ */ n(Hr, { children: /* @__PURE__ */ x(Pr, { children: [
3735
+ /* @__PURE__ */ n(Jt, { severity: r, ...c, children: t }),
3736
+ /* @__PURE__ */ n(Kt, { children: o })
2809
3737
  ] }) })
2810
3738
  }
2811
3739
  ) })
2812
3740
  }
2813
3741
  );
2814
3742
  }
2815
- const Xn = g(v)(({ theme: t }) => ({
3743
+ const Nr = m(D)(({ theme: t }) => ({
2816
3744
  display: "flex",
2817
3745
  alignItems: "center",
2818
3746
  justifyContent: "center",
@@ -2821,7 +3749,7 @@ const Xn = g(v)(({ theme: t }) => ({
2821
3749
  "& > div": {
2822
3750
  flex: 1
2823
3751
  }
2824
- })), Kn = g(v)(({ theme: t }) => ({
3752
+ })), _r = m(D)(({ theme: t }) => ({
2825
3753
  display: "flex",
2826
3754
  flex: 1,
2827
3755
  flexDirection: "column",
@@ -2849,16 +3777,16 @@ const Xn = g(v)(({ theme: t }) => ({
2849
3777
  content: "none"
2850
3778
  }
2851
3779
  }));
2852
- function Qn({
3780
+ function Gr({
2853
3781
  theme: t,
2854
3782
  completed: e,
2855
- current: n
3783
+ current: o
2856
3784
  }) {
2857
3785
  return e ? {
2858
3786
  background: t.palette.success.main,
2859
3787
  borderColor: t.palette.success.main,
2860
3788
  color: t.palette.common.white
2861
- } : n ? {
3789
+ } : o ? {
2862
3790
  background: t.palette.text.primary,
2863
3791
  borderColor: t.palette.text.primary,
2864
3792
  color: t.palette.common.white
@@ -2867,9 +3795,9 @@ function Qn({
2867
3795
  color: t.palette.text.secondary
2868
3796
  };
2869
3797
  }
2870
- const to = g("span", {
3798
+ const jr = m("span", {
2871
3799
  shouldForwardProp: (t) => t !== "completed" && t !== "current"
2872
- })(({ theme: t, completed: e, current: n }) => ({
3800
+ })(({ theme: t, completed: e, current: o }) => ({
2873
3801
  display: "flex",
2874
3802
  justifyContent: "center",
2875
3803
  alignItems: "center",
@@ -2879,66 +3807,221 @@ const to = g("span", {
2879
3807
  borderRadius: "50%",
2880
3808
  border: `${t.spacing(0.25)} solid currentColor`,
2881
3809
  ...t.typography.caption,
2882
- ...Qn({ theme: t, completed: e, current: n })
3810
+ ...Gr({ theme: t, completed: e, current: o })
2883
3811
  }));
2884
- function Po({
3812
+ function Kn({
2885
3813
  currentStep: t,
2886
3814
  stepsLabels: e,
2887
- ...n
3815
+ ...o
2888
3816
  }) {
2889
- return /* @__PURE__ */ i(Xn, { ...n, "data-name": "dialog-stepper", children: /* @__PURE__ */ i(v, { sx: { display: "flex" }, children: e.map((o, a) => {
2890
- const r = a + 1, l = r === t, s = r < t;
2891
- return /* @__PURE__ */ y(
2892
- Kn,
3817
+ return /* @__PURE__ */ n(Nr, { ...o, "data-name": "dialog-stepper", children: /* @__PURE__ */ n(D, { sx: { display: "flex" }, children: e.map((r, i) => {
3818
+ const l = i + 1, a = l === t, c = l < t;
3819
+ return /* @__PURE__ */ x(
3820
+ _r,
2893
3821
  {
2894
- "data-state": s ? "completed" : l ? "current" : "uncompleted",
3822
+ "data-state": c ? "completed" : a ? "current" : "uncompleted",
2895
3823
  children: [
2896
- /* @__PURE__ */ i(to, { completed: s, current: l, children: s ? /* @__PURE__ */ i(ge, { fontSize: "small", "aria-label": "Completed step" }) : r }),
2897
- /* @__PURE__ */ i(S, { variant: "caption", component: "div", color: s ? "success.main" : l ? "textPrimary" : "textSecondary", children: o })
3824
+ /* @__PURE__ */ n(jr, { completed: c, current: a, children: c ? /* @__PURE__ */ n(Te, { fontSize: "small", "aria-label": "Completed step" }) : l }),
3825
+ /* @__PURE__ */ n(F, { variant: "caption", component: "div", color: c ? "success.main" : a ? "textPrimary" : "textSecondary", children: r })
2898
3826
  ]
2899
3827
  },
2900
- a
3828
+ i
2901
3829
  );
2902
3830
  }) }) });
2903
3831
  }
3832
+ const Vr = m(Zt, {
3833
+ shouldForwardProp: (t) => !["error", "withBorder"].includes(t)
3834
+ })(
3835
+ ({ error: t, withBorder: e, theme: o }) => ({
3836
+ gap: 0,
3837
+ border: e ? `1px solid ${o.palette.divider} !important` : void 0,
3838
+ borderBottom: t ? "none !important" : void 0,
3839
+ ".react-codemirror2": {
3840
+ display: "flex",
3841
+ flexDirection: "column",
3842
+ minHeight: "100%"
3843
+ },
3844
+ ".CodeMirror-wrap": {
3845
+ display: "flex",
3846
+ flexDirection: "column",
3847
+ flex: 1
3848
+ },
3849
+ "& + .MuiDivider-root": {
3850
+ display: "none"
3851
+ }
3852
+ })
3853
+ );
3854
+ function Ur({
3855
+ children: t,
3856
+ error: e,
3857
+ withBorder: o = !0,
3858
+ withGutter: r = !1
3859
+ }) {
3860
+ return t ? /* @__PURE__ */ n(Vr, { withGutter: r, error: e, withBorder: o, children: t }) : null;
3861
+ }
3862
+ function Yr({
3863
+ onClose: t,
3864
+ onCancel: e,
3865
+ cancelLabel: o,
3866
+ cancelButton: r,
3867
+ closeButton: i,
3868
+ contentLabel: l,
3869
+ titleLabel: a,
3870
+ severity: c = "warning",
3871
+ content: d
3872
+ }) {
3873
+ const u = R(), p = T(u);
3874
+ return !t || !e ? null : /* @__PURE__ */ n(
3875
+ zr,
3876
+ {
3877
+ opened: !0,
3878
+ severity: c,
3879
+ title: p.formatMessage({
3880
+ id: a || "c4r.dialog.confirmation.title"
3881
+ }),
3882
+ actions: /* @__PURE__ */ x(H, { children: [
3883
+ e && (r || /* @__PURE__ */ n(nt, { onClick: e, children: p.formatMessage({
3884
+ id: o || "c4r.button.cancel"
3885
+ }) })),
3886
+ t && (i || /* @__PURE__ */ n(nt, { variant: "contained", onClick: t, children: p.formatMessage({
3887
+ id: "c4r.button.leave"
3888
+ }) }))
3889
+ ] }),
3890
+ children: d || p.formatMessage({
3891
+ id: l || "c4r.dialog.confirmation.content"
3892
+ })
3893
+ }
3894
+ );
3895
+ }
3896
+ function Xn({
3897
+ open: t,
3898
+ onClose: e,
3899
+ title: o,
3900
+ error: r,
3901
+ helperText: i,
3902
+ onClickFooter: l,
3903
+ disabledButtonFooter: a,
3904
+ labelIdButtonFooter: c,
3905
+ ariaLabelButtonFooter: d,
3906
+ disabled: u,
3907
+ showConfirmation: p,
3908
+ onCancelConfirm: s,
3909
+ onCloseConfirm: b,
3910
+ footerProps: g,
3911
+ saveLoading: f,
3912
+ showSaveSnackbar: y,
3913
+ onCloseSaveSnackbar: h,
3914
+ "data-testid": w,
3915
+ "aria-label": M,
3916
+ ...A
3917
+ }) {
3918
+ const C = r || !!l || !!g;
3919
+ return t ? /* @__PURE__ */ x(
3920
+ vr,
3921
+ {
3922
+ open: t,
3923
+ fullScreen: !0,
3924
+ onClose: e,
3925
+ "data-testid": w,
3926
+ "aria-label": M,
3927
+ "data-name": "code-area-dialog",
3928
+ children: [
3929
+ /* @__PURE__ */ n(
3930
+ Ir,
3931
+ {
3932
+ title: o,
3933
+ onClose: e,
3934
+ closeIcon: !l && /* @__PURE__ */ n(We, {})
3935
+ }
3936
+ ),
3937
+ /* @__PURE__ */ n(Ur, { error: r, children: /* @__PURE__ */ n(
3938
+ xr,
3939
+ {
3940
+ ...A,
3941
+ disabled: u,
3942
+ variant: null,
3943
+ isExpanded: !0
3944
+ }
3945
+ ) }),
3946
+ C && /* @__PURE__ */ n(
3947
+ Wr,
3948
+ {
3949
+ ...g,
3950
+ topContent: r && /* @__PURE__ */ n(Mr, { hasDivider: !!l, children: i }),
3951
+ children: !!l && /* @__PURE__ */ n(
3952
+ qt,
3953
+ {
3954
+ onClickFooter: l,
3955
+ labelIdButtonFooter: c,
3956
+ ariaLabelButtonFooter: d,
3957
+ disabled: u,
3958
+ disabledButtonFooter: a,
3959
+ withGutter: !1,
3960
+ variant: "contained",
3961
+ size: "medium",
3962
+ loading: !!f,
3963
+ showSnackbar: y,
3964
+ onCloseSnackbar: h
3965
+ }
3966
+ )
3967
+ }
3968
+ ),
3969
+ p && /* @__PURE__ */ n(
3970
+ Yr,
3971
+ {
3972
+ onClose: b ?? e,
3973
+ onCancel: s,
3974
+ cancelLabel: "c4r.button.keepEditing"
3975
+ }
3976
+ )
3977
+ ]
3978
+ }
3979
+ ) : null;
3980
+ }
2904
3981
  export {
2905
- wo as AccordionGroup,
2906
- Ct as Alert,
2907
- To as AppBar,
2908
- Do as Autocomplete,
2909
- Bo as Avatar,
2910
- bo as Button,
2911
- Ao as CreatableAutocomplete,
2912
- at as DatePicker,
2913
- $o as DateRangePicker,
2914
- Fo as DateTimePicker,
2915
- Lo as Dialog,
2916
- Ft as DialogActions,
2917
- Rt as DialogAlert,
2918
- _o as DialogConfirmation,
2919
- jn as DialogContent,
2920
- Eo as DialogContentPadded,
2921
- Ho as DialogFooter,
2922
- Wo as DialogHeader,
2923
- dt as DialogPaper,
2924
- Po as DialogStepper,
2925
- Le as IconButton,
2926
- K as LabelWithIndicator,
2927
- Mo as Menu,
2928
- vt as MenuItem,
2929
- kt as MenuItemFilter,
2930
- Co as MenuList,
2931
- Io as MultipleAutocomplete,
2932
- vo as MultipleSelectField,
2933
- xo as PasswordField,
2934
- Te as SelectField,
2935
- So as Snackbar,
2936
- Vo as TablePaginationActions,
2937
- Ro as TimePicker,
2938
- yo as ToggleButtonGroup,
2939
- Oo as TooltipData,
2940
- S as Typography,
2941
- ko as UploadField,
2942
- Xe as UploadFieldBase,
2943
- st as dialogDimensionsBySize
3982
+ Gn as AccordionGroup,
3983
+ Et as Alert,
3984
+ Vn as AppBar,
3985
+ zn as Autocomplete,
3986
+ jn as Avatar,
3987
+ nt as Button,
3988
+ Xn as CodeAreaDialog,
3989
+ xr as CodeAreaField,
3990
+ gr as CodeAreaInput,
3991
+ Ro as CopiableComponent,
3992
+ Nn as CreatableAutocomplete,
3993
+ xt as DatePicker,
3994
+ Un as DateRangePicker,
3995
+ qn as DateTimePicker,
3996
+ vr as Dialog,
3997
+ Kt as DialogActions,
3998
+ Jt as DialogAlert,
3999
+ zr as DialogConfirmation,
4000
+ Zt as DialogContent,
4001
+ Jn as DialogContentPadded,
4002
+ Wr as DialogFooter,
4003
+ Ir as DialogHeader,
4004
+ wt as DialogPaper,
4005
+ Kn as DialogStepper,
4006
+ q as IconButton,
4007
+ X as LabelWithIndicator,
4008
+ co as Menu,
4009
+ Y as MenuItem,
4010
+ Ht as MenuItemFilter,
4011
+ En as MenuList,
4012
+ _n as MultipleAutocomplete,
4013
+ Hn as MultipleSelectField,
4014
+ Ln as PasswordField,
4015
+ eo as SelectField,
4016
+ dt as Snackbar,
4017
+ ei as TablePaginationActions,
4018
+ Yn as TimePicker,
4019
+ Wn as ToggleButtonGroup,
4020
+ Zn as TooltipData,
4021
+ F as Typography,
4022
+ Pn as UploadField,
4023
+ vo as UploadFieldBase,
4024
+ Oo as copyString,
4025
+ vt as dialogDimensionsBySize,
4026
+ Vt as useCopyValue
2944
4027
  };