@abyss-project/commons-front-core 17.2.1 → 18.0.0

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 +16 -0
  2. package/README.md +2 -1
  3. package/catalog/captures-plan.ts +120 -116
  4. package/catalog/catalog-entries.ts +149 -148
  5. package/catalog/pages/AppShell.tsx +18 -9
  6. package/catalog/pages/CookieConsent.tsx +54 -31
  7. package/catalog/pages/DeliveryHistory.tsx +66 -66
  8. package/catalog/pages/DeliverySubscriptions.tsx +110 -110
  9. package/catalog/pages/ScheduledTasks.tsx +117 -117
  10. package/catalog/pages/index.ts +166 -165
  11. package/catalog/playwright.ci.config.ts +4 -3
  12. package/catalog/specs/captures.spec.ts +145 -145
  13. package/catalog/specs/cookie-consent-modal.spec.ts +187 -0
  14. package/catalog/specs/write-capture-index.ts +81 -81
  15. package/dist/CookieConsentSettings-B7HIIzyI.js +595 -0
  16. package/dist/{Surface-BDfRxVLj.js → Surface-dziv23sf.js} +56 -51
  17. package/dist/{Tabs-DEY2HEqj.js → Tabs-_onUZBA-.js} +613 -591
  18. package/dist/components/business/CookieConsent/AbyssCookieConsentProvider.d.ts +11 -3
  19. package/dist/components/business/CookieConsent/CookieConsentBanner.d.ts +4 -3
  20. package/dist/components/business/CookieConsent/CookieConsentPreferences.d.ts +12 -0
  21. package/dist/components/business/CookieConsent/index.d.ts +2 -0
  22. package/dist/components/business/CookieConsent/use-banner-portal.d.ts +36 -0
  23. package/dist/components/inputs/NumberField/NumberField.d.ts +18 -2
  24. package/dist/components/layers/Toast/toast-clearance.d.ts +5 -0
  25. package/dist/components/structure/AccountMenu/AccountMenu.d.ts +2 -1
  26. package/dist/components/structure/AppShell/SpaceSwitcher.d.ts +4 -2
  27. package/dist/components/structure/AppShell/app-shell.types.d.ts +5 -1
  28. package/dist/components/structure/FilterBar/FilterBar.d.ts +7 -2
  29. package/dist/cookie-consent.js +26 -17
  30. package/dist/{design-theme-Bd0pEPei.js → design-theme-B3C3z1gE.js} +1 -1
  31. package/dist/{editors-CtkDomwX.js → editors-BhQlONOy.js} +27 -27
  32. package/dist/editors.js +1 -1
  33. package/dist/hooks/use-cookie-consent.hook.spec.d.ts +1 -0
  34. package/dist/hooks/use-rich-intl.hook.d.ts +2 -0
  35. package/dist/{index-DKsvuaEj.js → index-B6LMTOKG.js} +3 -3
  36. package/dist/{index-B9avfa3r.js → index-B6w5_TeJ.js} +3 -3
  37. package/dist/{index-Ch8JqU5w.js → index-BBF-FvT6.js} +2 -2
  38. package/dist/{index-CqgMX8kF.js → index-BGAZK8Vk.js} +2 -2
  39. package/dist/{index-DnQguWf1.js → index-BGJobvxw.js} +1 -1
  40. package/dist/{index-SN7FZBya.js → index-BTDlbjWW.js} +2 -2
  41. package/dist/{index-Cl3hwdsZ.js → index-BcjlG5TB.js} +2 -2
  42. package/dist/{index-CSdO6zlX.js → index-BeMiREqf.js} +2 -2
  43. package/dist/{index-psJ1Q-lU.js → index-ByN6DcaL.js} +2 -2
  44. package/dist/{index-DtpGwH5a.js → index-CJI1dJrw.js} +3 -3
  45. package/dist/{index-CEjiERmo.js → index-D1mQgWN3.js} +2 -2
  46. package/dist/{index-BcXqvMY8.js → index-DLlWMDxB.js} +4 -4
  47. package/dist/{index-DFZlN4E3.js → index-DNd8NZnu.js} +4 -4
  48. package/dist/{index-mUtvzoSi.js → index-Dakpr4C1.js} +3 -3
  49. package/dist/{index-D0EF36wh.js → index-DkZAsKob.js} +2 -2
  50. package/dist/{index-FUuoLSZ0.js → index-DprTO7yi.js} +4 -4
  51. package/dist/{index-DZbCUZUp.js → index-N4BwXTyk.js} +2 -2
  52. package/dist/{index-IVjoNq-p.js → index-V4F4Sk7y.js} +2 -2
  53. package/dist/{index-DcV2fWbx.js → index-y-TnfE6Z.js} +2 -2
  54. package/dist/{index-DtncSsmw.js → index-yFJTDKIX.js} +2 -2
  55. package/dist/{index-DVBqUPxf.js → index-ytgNPz5f.js} +2 -2
  56. package/dist/index.js +3480 -3417
  57. package/dist/legacy.js +1728 -1707
  58. package/dist/translations/en.d.ts +1 -0
  59. package/dist/translations/fr.d.ts +1 -0
  60. package/dist/utils/cookie-consent-contract.d.ts +55 -0
  61. package/dist/utils/cookie-consent-contract.spec.d.ts +1 -0
  62. package/dist/utils/cookie-storage.utils.d.ts +1 -8
  63. package/dist/utils/index.d.ts +1 -0
  64. package/package.json +1 -1
  65. package/dist/CookieConsentSettings-CtLrSfve.js +0 -505
@@ -1,24 +1,24 @@
1
1
  import { jsxs as x, jsx as i, Fragment as J } from "react/jsx-runtime";
2
- import { useId as D, cloneElement as mn, useState as I, useMemo as ge, useRef as Y, useCallback as Q, useEffect as B, createContext as Ee, useContext as ze, useLayoutEffect as Ae } from "react";
2
+ import { useId as N, cloneElement as mn, useState as F, useMemo as ge, useRef as Y, useCallback as Q, useEffect as V, createContext as ze, useContext as Ae, useLayoutEffect as Le } from "react";
3
3
  import le from "@mui/material/FormControl";
4
4
  import se from "@mui/material/FormHelperText";
5
- import Le from "@mui/material/InputLabel";
6
- import xe from "@mui/material/MenuItem";
5
+ import $e from "@mui/material/InputLabel";
6
+ import Ce from "@mui/material/MenuItem";
7
7
  import hn from "@mui/material/Select";
8
- import { styled as l, useTheme as bn, getContrastRatio as Ce } from "@mui/material/styles";
9
- import { visuallyHidden as $e } from "@mui/utils";
10
- import { useIntl as L } from "react-intl";
11
- import { a as R, p as o, h as A, d as Z, D as K, c as yn, t as De, s as de, e as oe, g as te, M as Pe, b as He, i as vn, B as wn } from "./Surface-BDfRxVLj.js";
8
+ import { styled as l, useTheme as bn, getContrastRatio as ke } from "@mui/material/styles";
9
+ import { visuallyHidden as fe } from "@mui/utils";
10
+ import { useIntl as P } from "react-intl";
11
+ import { a as A, p as o, h as D, d as Z, D as K, e as yn, t as De, s as de, g as oe, i as te, M as Pe, c as He, j as vn, B as wn } from "./Surface-dziv23sf.js";
12
12
  import { i as xn, b as Cn, r as kn, u as Sn, A as In, E as Fn } from "./index-C27b790L.js";
13
13
  import X from "@mui/material/Button";
14
14
  import { byteSizeIEC as Mn } from "@abyss-project/main";
15
15
  import On from "@mui/icons-material/FileUploadOutlined";
16
- import Wn, { autocompleteClasses as ke } from "@mui/material/Autocomplete";
17
- import Se from "@mui/material/CircularProgress";
16
+ import Wn, { autocompleteClasses as Se } from "@mui/material/Autocomplete";
17
+ import Ie from "@mui/material/CircularProgress";
18
18
  import ae from "@mui/material/IconButton";
19
- import fe from "@mui/material/OutlinedInput";
20
- import Ie from "@mui/material/Tooltip";
21
- import Fe from "@mui/icons-material/CloudOutlined";
19
+ import me from "@mui/material/OutlinedInput";
20
+ import Fe from "@mui/material/Tooltip";
21
+ import Me from "@mui/icons-material/CloudOutlined";
22
22
  import Tn from "@mui/icons-material/CloudOffOutlined";
23
23
  import Rn from "@mui/icons-material/FileDownloadOutlined";
24
24
  import Ne from "@mui/icons-material/FolderOpenOutlined";
@@ -36,17 +36,17 @@ import _n from "@mui/icons-material/ChevronRightRounded";
36
36
  import Bn from "@mui/material/Alert";
37
37
  import Vn from "@mui/material/TextField";
38
38
  import jn from "@mui/material/Popover";
39
- import Gn from "@mui/material/InputAdornment";
40
- import qn from "@mui/material/FormLabel";
41
- import { isMuiElement as Un } from "@mui/material/utils";
39
+ import Gn, { formLabelClasses as qn } from "@mui/material/FormLabel";
40
+ import Un from "@mui/material/InputAdornment";
41
+ import { isMuiElement as Kn } from "@mui/material/utils";
42
42
  import Be from "@mui/material/ButtonBase";
43
- import { Link as Kn } from "react-router-dom";
44
- const Yn = l(qn)(({ theme: e }) => ({
43
+ import { Link as Yn } from "react-router-dom";
44
+ const Xn = l(Gn)(({ theme: e }) => ({
45
45
  display: "block",
46
46
  maxWidth: "100%",
47
47
  marginBottom: o(e.design.space[2]),
48
48
  fontSize: o(e.design.typeScale.small),
49
- fontWeight: R.medium,
49
+ fontWeight: A.medium,
50
50
  lineHeight: e.typography.caption.lineHeight,
51
51
  color: e.design.tokens["text.secondary"],
52
52
  "&.Mui-focused": { color: e.design.tokens["text.secondary"] },
@@ -60,16 +60,16 @@ function Ve({
60
60
  required: r = !1,
61
61
  children: s
62
62
  }) {
63
- const c = D(), a = s.props.id ?? c, d = `${a}-label`, f = n !== void 0 ? `${a}-help` : void 0, v = t != null && t !== !1 && t !== "", b = v && t !== !0, u = b ? `${a}-error` : void 0, h = [s.props["aria-describedby"], f, u].filter((g) => g !== void 0 && g !== "").join(" ") || void 0, m = mn(s, {
63
+ const d = N(), a = s.props.id ?? d, c = `${a}-label`, g = n !== void 0 ? `${a}-help` : void 0, C = t != null && t !== !1 && t !== "", y = C && t !== !0, u = y ? `${a}-error` : void 0, h = [s.props["aria-describedby"], g, u].filter((p) => p !== void 0 && p !== "").join(" ") || void 0, m = mn(s, {
64
64
  id: a,
65
65
  "aria-describedby": h,
66
- ...Un(s, ["Select"]) && { labelId: d }
66
+ ...Kn(s, ["Select"]) && { labelId: c }
67
67
  });
68
- return /* @__PURE__ */ x(le, { fullWidth: !0, error: v, required: r, children: [
69
- /* @__PURE__ */ i(Yn, { id: d, htmlFor: a, children: e }),
68
+ return /* @__PURE__ */ x(le, { fullWidth: !0, error: C, required: r, children: [
69
+ /* @__PURE__ */ i(Xn, { id: c, htmlFor: a, children: e }),
70
70
  m,
71
- n !== void 0 && /* @__PURE__ */ i(se, { id: f, error: !1, children: n }),
72
- b && /* @__PURE__ */ i(se, { id: u, children: t })
71
+ n !== void 0 && /* @__PURE__ */ i(se, { id: g, error: !1, children: n }),
72
+ y && /* @__PURE__ */ i(se, { id: u, children: t })
73
73
  ] });
74
74
  }
75
75
  var je = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Danger = "danger", e))(je || {});
@@ -87,15 +87,15 @@ const Ge = {
87
87
  solid: "status.danger",
88
88
  soft: "status.danger.soft"
89
89
  }
90
- }, Xn = {
90
+ }, Qn = {
91
91
  info: $n,
92
92
  success: An,
93
93
  warning: Dn,
94
94
  danger: Ln
95
- }, Qn = l("div", {
95
+ }, Zn = l("div", {
96
96
  shouldForwardProp: (e) => e !== "severity"
97
97
  })(({ theme: e, severity: n }) => {
98
- const { tokens: t, space: r, radii: s, fonts: c, typeScale: a } = e.design, { solid: d, soft: f } = Ge[n];
98
+ const { tokens: t, space: r, radii: s, fonts: d, typeScale: a } = e.design, { solid: c, soft: g } = Ge[n];
99
99
  return {
100
100
  display: "flex",
101
101
  alignItems: "flex-start",
@@ -103,14 +103,14 @@ const Ge = {
103
103
  minWidth: 0,
104
104
  boxSizing: "border-box",
105
105
  padding: `${o(r[3])} ${o(r[3])} ${o(r[3])} ${o(r[4])}`,
106
- backgroundColor: t[f],
107
- border: A(t[d]),
106
+ backgroundColor: t[g],
107
+ border: D(t[c]),
108
108
  borderRadius: o(s.md),
109
109
  color: t["text.primary"],
110
- fontFamily: c.sans,
110
+ fontFamily: d.sans,
111
111
  fontSize: o(a.body)
112
112
  };
113
- }), Zn = l("span", {
113
+ }), Jn = l("span", {
114
114
  shouldForwardProp: (e) => e !== "severity"
115
115
  })(({ theme: e, severity: n }) => {
116
116
  const { tokens: t, space: r } = e.design;
@@ -125,7 +125,7 @@ const Ge = {
125
125
  height: o(r[4] + r[1])
126
126
  }
127
127
  };
128
- }), Jn = l("div")(({ theme: e }) => ({
128
+ }), et = l("div")(({ theme: e }) => ({
129
129
  display: "flex",
130
130
  flex: "1 1 auto",
131
131
  flexWrap: "wrap",
@@ -137,7 +137,7 @@ const Ge = {
137
137
  flexDirection: "column",
138
138
  alignItems: "flex-start"
139
139
  }
140
- })), et = l("div")(({ theme: e }) => ({
140
+ })), nt = l("div")(({ theme: e }) => ({
141
141
  display: "flex",
142
142
  flexDirection: "column",
143
143
  gap: o(e.design.space[1]),
@@ -146,41 +146,41 @@ const Ge = {
146
146
  paddingTop: o(e.design.space[1] / 2),
147
147
  lineHeight: e.typography.body2.lineHeight,
148
148
  overflowWrap: "anywhere"
149
- })), nt = l("strong")({
149
+ })), tt = l("strong")({
150
150
  display: "block",
151
- fontWeight: R.semibold
152
- }), tt = l("div")({
151
+ fontWeight: A.semibold
152
+ }), ot = l("div")({
153
153
  display: "flex",
154
154
  flex: "none",
155
155
  alignItems: "center"
156
- }), ot = l(ae)(({ theme: e }) => yn(e));
157
- function rt({
156
+ }), rt = l(ae)(({ theme: e }) => yn(e));
157
+ function it({
158
158
  severity: e,
159
159
  title: n,
160
160
  children: t,
161
161
  action: r,
162
162
  onClose: s,
163
- icon: c
163
+ icon: d
164
164
  }) {
165
- const a = L(), d = D(), f = Xn[e];
165
+ const a = P(), c = N(), g = Qn[e];
166
166
  return /* @__PURE__ */ x(
167
- Qn,
167
+ Zn,
168
168
  {
169
169
  severity: e,
170
170
  role: e === "danger" ? "alert" : "status",
171
- "aria-labelledby": n !== void 0 ? d : void 0,
171
+ "aria-labelledby": n !== void 0 ? c : void 0,
172
172
  "data-severity": e,
173
173
  children: [
174
- /* @__PURE__ */ i(Zn, { severity: e, "aria-hidden": !0, children: c ?? /* @__PURE__ */ i(f, {}) }),
175
- /* @__PURE__ */ x(Jn, { children: [
176
- /* @__PURE__ */ x(et, { children: [
177
- n !== void 0 && /* @__PURE__ */ i(nt, { id: d, children: n }),
174
+ /* @__PURE__ */ i(Jn, { severity: e, "aria-hidden": !0, children: d ?? /* @__PURE__ */ i(g, {}) }),
175
+ /* @__PURE__ */ x(et, { children: [
176
+ /* @__PURE__ */ x(nt, { children: [
177
+ n !== void 0 && /* @__PURE__ */ i(tt, { id: c, children: n }),
178
178
  /* @__PURE__ */ i("div", { children: t })
179
179
  ] }),
180
- r !== void 0 && /* @__PURE__ */ i(tt, { children: r })
180
+ r !== void 0 && /* @__PURE__ */ i(ot, { children: r })
181
181
  ] }),
182
182
  s !== void 0 && /* @__PURE__ */ i(
183
- ot,
183
+ rt,
184
184
  {
185
185
  size: "small",
186
186
  "aria-label": a.formatMessage({ id: "ds.states.callout.close" }),
@@ -202,15 +202,15 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
202
202
  ], ue = l("div", {
203
203
  shouldForwardProp: (e) => e !== "selected"
204
204
  })(({ theme: e, selected: n }) => {
205
- const { tokens: t, space: r, radii: s, densityValues: c, density: a, typeScale: d } = e.design;
205
+ const { tokens: t, space: r, radii: s, densityValues: d, density: a, typeScale: c } = e.design;
206
206
  return {
207
207
  display: "flex",
208
208
  alignItems: "center",
209
209
  gap: o(r[1]),
210
- minHeight: o(c[a].control),
210
+ minHeight: o(d[a].control),
211
211
  borderRadius: o(s.md),
212
212
  backgroundColor: n ? de(t.accent) : "transparent",
213
- fontSize: o(d.body),
213
+ fontSize: o(c.body),
214
214
  color: t["text.primary"],
215
215
  ...De(e)
216
216
  };
@@ -237,7 +237,7 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
237
237
  "&:hover": { backgroundColor: n["bg.hover"] },
238
238
  "&:focus-visible": te(e)
239
239
  };
240
- }, Ye = l("button")(({ theme: e }) => Ke(e)), it = l("label")(({ theme: e }) => Ke(e)), Xe = l("span", {
240
+ }, Ye = l("button")(({ theme: e }) => Ke(e)), st = l("label")(({ theme: e }) => Ke(e)), Xe = l("span", {
241
241
  shouldForwardProp: (e) => e !== "strong"
242
242
  })(({ strong: e }) => ({
243
243
  flex: "1 1 auto",
@@ -245,7 +245,7 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
245
245
  overflow: "hidden",
246
246
  textOverflow: "ellipsis",
247
247
  whiteSpace: "nowrap",
248
- fontWeight: e ? R.medium : R.regular
248
+ fontWeight: e ? A.medium : A.regular
249
249
  })), Qe = l("span")(({ theme: e }) => {
250
250
  const { tokens: n, space: t, radii: r } = e.design;
251
251
  return {
@@ -261,7 +261,7 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
261
261
  "& svg": { width: o(t[5]), height: o(t[5]) },
262
262
  "& img": { width: "100%", height: "100%", objectFit: "cover" }
263
263
  };
264
- }), st = l(_n, {
264
+ }), at = l(_n, {
265
265
  shouldForwardProp: (e) => e !== "open"
266
266
  })(({ theme: e, open: n }) => ({
267
267
  flex: "none",
@@ -276,28 +276,28 @@ const U = (e) => e.id ?? e.name, qe = (e, n, t) => (n === void 0 || e.sizeOctet
276
276
  (e.design.densityValues.touchTarget - e.design.space[5]) / 2
277
277
  )
278
278
  }
279
- })), at = l("ul")(({ theme: e }) => ({
279
+ })), lt = l("ul")(({ theme: e }) => ({
280
280
  margin: 0,
281
281
  padding: 0,
282
282
  listStyle: "none",
283
- borderLeft: A(e.design.tokens["border.subtle"]),
283
+ borderLeft: D(e.design.tokens["border.subtle"]),
284
284
  marginLeft: o(e.design.space[3])
285
- })), Me = l("li")({ listStyle: "none" });
285
+ })), Oe = l("li")({ listStyle: "none" });
286
286
  function Je({
287
287
  folders: e,
288
288
  files: n,
289
289
  context: t
290
290
  }) {
291
291
  return /* @__PURE__ */ x(J, { children: [
292
- e.map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(ct, { folder: r, context: t }) }, r.id ?? r.name)),
293
- n.filter((r) => qe(r, t.maxSize, t.accept)).map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(dt, { file: r, context: t }) }, U(r)))
292
+ e.map((r) => /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ i(ut, { folder: r, context: t }) }, r.id ?? r.name)),
293
+ n.filter((r) => qe(r, t.maxSize, t.accept)).map((r) => /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ i(ct, { file: r, context: t }) }, U(r)))
294
294
  ] });
295
295
  }
296
- function lt({
296
+ function dt({
297
297
  file: e,
298
298
  getFileThumbnailUrl: n
299
299
  }) {
300
- const [t, r] = I(!1), s = e.thumbnailPublicAccessId !== null && !e.isEncrypt && !t ? n(e.thumbnailPublicAccessId) : null;
300
+ const [t, r] = F(!1), s = e.thumbnailPublicAccessId !== null && !e.isEncrypt && !t ? n(e.thumbnailPublicAccessId) : null;
301
301
  return /* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: s !== null ? /* @__PURE__ */ i(
302
302
  "img",
303
303
  {
@@ -308,13 +308,13 @@ function lt({
308
308
  }
309
309
  ) : /* @__PURE__ */ i(Hn, {}) });
310
310
  }
311
- function dt({
311
+ function ct({
312
312
  file: e,
313
313
  context: n
314
314
  }) {
315
- const t = D(), r = n.selectedIds.has(U(e)), s = () => r ? n.unselect([e]) : n.select([e]), c = /* @__PURE__ */ x(J, { children: [
315
+ const t = N(), r = n.selectedIds.has(U(e)), s = () => r ? n.unselect([e]) : n.select([e]), d = /* @__PURE__ */ x(J, { children: [
316
316
  /* @__PURE__ */ i(
317
- lt,
317
+ dt,
318
318
  {
319
319
  file: e,
320
320
  getFileThumbnailUrl: n.getFileThumbnailUrl
@@ -332,26 +332,26 @@ function dt({
332
332
  onChange: s
333
333
  }
334
334
  ),
335
- /* @__PURE__ */ i(it, { htmlFor: t, children: c })
336
- ] }) : /* @__PURE__ */ i(ue, { selected: r, children: /* @__PURE__ */ i(Ye, { type: "button", "aria-pressed": r, onClick: s, children: c }) });
335
+ /* @__PURE__ */ i(st, { htmlFor: t, children: d })
336
+ ] }) : /* @__PURE__ */ i(ue, { selected: r, children: /* @__PURE__ */ i(Ye, { type: "button", "aria-pressed": r, onClick: s, children: d }) });
337
337
  }
338
- function ct({
338
+ function ut({
339
339
  folder: e,
340
340
  context: n
341
341
  }) {
342
- const t = L(), r = D(), [s, c] = I(!1), a = Ue(e, n.maxSize, n.accept), d = a.filter(
343
- (v) => n.selectedIds.has(U(v))
344
- ).length, f = a.length > 0 && d === a.length;
342
+ const t = P(), r = N(), [s, d] = F(!1), a = Ue(e, n.maxSize, n.accept), c = a.filter(
343
+ (C) => n.selectedIds.has(U(C))
344
+ ).length, g = a.length > 0 && c === a.length;
345
345
  return /* @__PURE__ */ x(J, { children: [
346
- /* @__PURE__ */ x(ue, { selected: f, children: [
346
+ /* @__PURE__ */ x(ue, { selected: g, children: [
347
347
  n.multiple && /* @__PURE__ */ i(
348
348
  Ze,
349
349
  {
350
350
  size: "small",
351
- checked: f,
352
- indeterminate: d > 0 && !f,
351
+ checked: g,
352
+ indeterminate: c > 0 && !g,
353
353
  disabled: a.length === 0,
354
- onChange: () => f ? n.unselect(a) : n.select(a),
354
+ onChange: () => g ? n.unselect(a) : n.select(a),
355
355
  inputProps: {
356
356
  "aria-label": t.formatMessage(
357
357
  { id: "ds.business.cloud-import.select-folder" },
@@ -366,16 +366,16 @@ function ct({
366
366
  type: "button",
367
367
  "aria-expanded": s,
368
368
  "aria-controls": s ? r : void 0,
369
- onClick: () => c(!s),
369
+ onClick: () => d(!s),
370
370
  children: [
371
- /* @__PURE__ */ i(st, { open: s, "aria-hidden": !0 }),
371
+ /* @__PURE__ */ i(at, { open: s, "aria-hidden": !0 }),
372
372
  /* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: s ? /* @__PURE__ */ i(Ne, {}) : /* @__PURE__ */ i(Nn, {}) }),
373
- /* @__PURE__ */ i(Xe, { strong: f, title: e.name, children: e.name })
373
+ /* @__PURE__ */ i(Xe, { strong: g, title: e.name, children: e.name })
374
374
  ]
375
375
  }
376
376
  )
377
377
  ] }),
378
- s && /* @__PURE__ */ i(at, { id: r, children: /* @__PURE__ */ i(
378
+ s && /* @__PURE__ */ i(lt, { id: r, children: /* @__PURE__ */ i(
379
379
  Je,
380
380
  {
381
381
  folders: e.childFolder ?? [],
@@ -385,36 +385,36 @@ function ct({
385
385
  ) })
386
386
  ] });
387
387
  }
388
- const Oe = "shared", We = {
388
+ const We = "shared", Te = {
389
389
  "org-common": 0,
390
390
  "perso-in-org": 1,
391
391
  project: 2,
392
392
  personal: 3
393
- }, ut = l("div")(({ theme: e }) => ({
393
+ }, pt = l("div")(({ theme: e }) => ({
394
394
  display: "flex",
395
395
  flexDirection: "column",
396
396
  gap: o(e.design.space[3]),
397
397
  minWidth: 0
398
- })), pt = l("div")(({ theme: e }) => ({
398
+ })), gt = l("div")(({ theme: e }) => ({
399
399
  display: "flex",
400
400
  alignItems: "flex-end",
401
401
  gap: o(e.design.space[2]),
402
402
  minWidth: 0,
403
403
  // The Space field takes the room the two icon buttons leave.
404
- [`& > .${ke.root}`]: { flex: "1 1 auto", minWidth: 0 },
405
- [`& > :not(.${ke.root})`]: { flex: "none" }
406
- })), gt = l("p")(({ theme: e }) => ({
404
+ [`& > .${Se.root}`]: { flex: "1 1 auto", minWidth: 0 },
405
+ [`& > :not(.${Se.root})`]: { flex: "none" }
406
+ })), ft = l("p")(({ theme: e }) => ({
407
407
  margin: 0,
408
408
  fontSize: o(e.design.typeScale.small),
409
409
  color: e.design.tokens["text.muted"]
410
- })), ft = l("ul")(({ theme: e }) => {
410
+ })), mt = l("ul")(({ theme: e }) => {
411
411
  const { tokens: n, space: t, radii: r } = e.design;
412
412
  return {
413
413
  margin: 0,
414
414
  padding: o(t[1]),
415
415
  listStyle: "none",
416
416
  minHeight: o(t[10] * 3),
417
- border: A(n["border.subtle"]),
417
+ border: D(n["border.subtle"]),
418
418
  borderRadius: o(r.md)
419
419
  };
420
420
  }), ne = l("div")(({ theme: e }) => {
@@ -436,7 +436,7 @@ const Oe = "shared", We = {
436
436
  color: n["text.muted"]
437
437
  }
438
438
  };
439
- }), mt = l("span")(({ theme: e }) => {
439
+ }), ht = l("span")(({ theme: e }) => {
440
440
  const { tokens: n, space: t, radii: r } = e.design;
441
441
  return {
442
442
  display: "inline-flex",
@@ -449,33 +449,33 @@ const Oe = "shared", We = {
449
449
  color: n["status.warning"],
450
450
  "& svg": { width: o(t[6]), height: o(t[6]) }
451
451
  };
452
- }), ht = l("p")(({ theme: e }) => ({
452
+ }), bt = l("p")(({ theme: e }) => ({
453
453
  margin: 0,
454
- fontWeight: R.semibold,
454
+ fontWeight: A.semibold,
455
455
  color: e.design.tokens["text.primary"]
456
- })), bt = l("p")({ margin: 0 }), yt = l("div")(({ theme: e }) => ({
456
+ })), yt = l("p")({ margin: 0 }), vt = l("div")(({ theme: e }) => ({
457
457
  display: "flex",
458
458
  flexWrap: "wrap",
459
459
  alignItems: "center",
460
460
  justifyContent: "space-between",
461
461
  gap: o(e.design.space[3])
462
- })), vt = l("span")(({ theme: e }) => ({
462
+ })), wt = l("span")(({ theme: e }) => ({
463
463
  fontSize: o(e.design.typeScale.body),
464
464
  color: e.design.tokens["text.secondary"]
465
- })), wt = l("li")(({ theme: e }) => ({
465
+ })), xt = l("li")(({ theme: e }) => ({
466
466
  display: "flex",
467
467
  alignItems: "center",
468
468
  gap: o(e.design.space[2]),
469
469
  ...De(e)
470
- })), xt = l("span")({
470
+ })), Ct = l("span")({
471
471
  display: "flex",
472
472
  flexDirection: "column",
473
473
  minWidth: 0
474
- }), Ct = l("span")({
474
+ }), kt = l("span")({
475
475
  overflow: "hidden",
476
476
  textOverflow: "ellipsis",
477
477
  whiteSpace: "nowrap"
478
- }), kt = l("span")(({ theme: e }) => ({
478
+ }), St = l("span")(({ theme: e }) => ({
479
479
  fontSize: o(e.design.typeScale.caption),
480
480
  color: e.design.tokens["text.muted"],
481
481
  // A narrow screen wraps it: the scope and the organization tell same-named Spaces apart.
@@ -493,20 +493,20 @@ const Oe = "shared", We = {
493
493
  color: n["accent.text"],
494
494
  "& > svg": { width: o(t[4]), height: o(t[4]) }
495
495
  };
496
- }), St = l(en)(({ theme: e }) => ({
496
+ }), It = l(en)(({ theme: e }) => ({
497
497
  marginRight: o(e.design.space[2])
498
- })), It = l("li")({ listStyle: "none" }), Ft = l("div")(({ theme: e }) => {
498
+ })), Ft = l("li")({ listStyle: "none" }), Mt = l("div")(({ theme: e }) => {
499
499
  const { space: n, tokens: t, typeScale: r } = e.design;
500
500
  return {
501
501
  padding: `${o(n[2])} ${o(n[3])} ${o(n[1])}`,
502
502
  fontSize: o(r.caption),
503
- fontWeight: R.semibold,
503
+ fontWeight: A.semibold,
504
504
  letterSpacing: "0.05em",
505
505
  textTransform: "uppercase",
506
506
  color: t["text.muted"]
507
507
  };
508
- }), Mt = l("ul")({ margin: 0, padding: 0 });
509
- function Ot({
508
+ }), Ot = l("ul")({ margin: 0, padding: 0 });
509
+ function Wt({
510
510
  cloudPicker: e,
511
511
  onImport: n,
512
512
  multiple: t = !1,
@@ -514,111 +514,111 @@ function Ot({
514
514
  accept: s
515
515
  }) {
516
516
  const {
517
- abyssCloudUrl: c,
517
+ abyssCloudUrl: d,
518
518
  getFileThumbnailUrl: a,
519
- getSpaceDisplay: d,
520
- clouds: f,
521
- cloudShares: v,
522
- isLoading: b,
519
+ getSpaceDisplay: c,
520
+ clouds: g,
521
+ cloudShares: C,
522
+ isLoading: y,
523
523
  hasError: u,
524
524
  refresh: h,
525
525
  onCreateCloud: m,
526
- fetchCloudRepository: g
527
- } = e, p = L(), [y, C] = I(null), [F, P] = I(null), [W, H] = I(
526
+ fetchCloudRepository: p
527
+ } = e, f = P(), [b, v] = F(null), [M, O] = F(null), [W, S] = F(
528
528
  "loading"
529
529
  /* Loading */
530
- ), [V, T] = I([]), [M, ee] = I(!1), [re, N] = I(!1), j = ge(() => {
531
- const w = [], S = /* @__PURE__ */ new Map(), k = p.formatMessage({
530
+ ), [T, z] = F([]), [R, ee] = F(!1), [re, _] = F(!1), j = ge(() => {
531
+ const w = [], I = /* @__PURE__ */ new Map(), k = f.formatMessage({
532
532
  id: "ds.business.cloud-import.section-organization"
533
533
  });
534
- for (const O of f ?? []) {
535
- if (!O.organizationId) {
536
- w.push(O);
534
+ for (const E of g ?? []) {
535
+ if (!E.organizationId) {
536
+ w.push(E);
537
537
  continue;
538
538
  }
539
- const z = d == null ? void 0 : d(O), _ = S.get(O.organizationId) ?? {
540
- name: (z == null ? void 0 : z.organizationName) ?? k,
539
+ const $ = c == null ? void 0 : c(E), B = I.get(E.organizationId) ?? {
540
+ name: ($ == null ? void 0 : $.organizationName) ?? k,
541
541
  items: []
542
542
  };
543
- _.items.push(O), S.set(O.organizationId, _);
543
+ B.items.push(E), I.set(E.organizationId, B);
544
544
  }
545
- if (d)
546
- for (const O of S.values())
547
- O.items.sort((z, _) => {
548
- const E = We[d(z).scope ?? "personal"], we = We[d(_).scope ?? "personal"];
549
- return E !== we ? E - we : d(z).label.localeCompare(d(_).label);
545
+ if (c)
546
+ for (const E of I.values())
547
+ E.items.sort(($, B) => {
548
+ const L = Te[c($).scope ?? "personal"], xe = Te[c(B).scope ?? "personal"];
549
+ return L !== xe ? L - xe : c($).label.localeCompare(c(B).label);
550
550
  });
551
- const $ = (O, z) => (_) => {
552
- const E = d == null ? void 0 : d(_);
551
+ const H = (E, $) => (B) => {
552
+ const L = c == null ? void 0 : c(B);
553
553
  return {
554
- space: _,
555
- sectionKey: O,
556
- sectionLabel: z,
557
- label: (E == null ? void 0 : E.label) ?? kn(_, p),
558
- subtitle: E == null ? void 0 : E.subtitle,
559
- avatar: E == null ? void 0 : E.avatar
554
+ space: B,
555
+ sectionKey: E,
556
+ sectionLabel: $,
557
+ label: (L == null ? void 0 : L.label) ?? kn(B, f),
558
+ subtitle: L == null ? void 0 : L.subtitle,
559
+ avatar: L == null ? void 0 : L.avatar
560
560
  };
561
561
  };
562
562
  return [
563
563
  ...w.map(
564
- $(
564
+ H(
565
565
  "personal",
566
- p.formatMessage({
566
+ f.formatMessage({
567
567
  id: "ds.business.cloud-import.section-personal"
568
568
  })
569
569
  )
570
570
  ),
571
- ...[...S].flatMap(
572
- ([O, z]) => z.items.map($(`org:${O}`, z.name))
571
+ ...[...I].flatMap(
572
+ ([E, $]) => $.items.map(H(`org:${E}`, $.name))
573
573
  ),
574
- ...(v ?? []).map(
575
- $(
576
- Oe,
577
- p.formatMessage({ id: "ds.business.cloud-import.section-shared" })
574
+ ...(C ?? []).map(
575
+ H(
576
+ We,
577
+ f.formatMessage({ id: "ds.business.cloud-import.section-shared" })
578
578
  )
579
579
  )
580
580
  ];
581
- }, [f, v, d, p]), G = j.find((w) => w.space.id === (y == null ? void 0 : y.id)) ?? null, ce = Y(0), me = Y(g);
582
- me.current = g;
581
+ }, [g, C, c, f]), G = j.find((w) => w.space.id === (b == null ? void 0 : b.id)) ?? null, ce = Y(0), he = Y(p);
582
+ he.current = p;
583
583
  const ie = Q(async (w) => {
584
- const S = ++ce.current;
585
- H(
584
+ const I = ++ce.current;
585
+ S(
586
586
  "loading"
587
587
  /* Loading */
588
- ), T([]);
588
+ ), z([]);
589
589
  try {
590
590
  if (w.id === void 0)
591
591
  throw new Error("A Space without an id has no tree");
592
- const k = await me.current(w.id);
593
- S === ce.current && (P(k), H(
592
+ const k = await he.current(w.id);
593
+ I === ce.current && (O(k), S(
594
594
  "ready"
595
595
  /* Ready */
596
596
  ));
597
597
  } catch {
598
- S === ce.current && H(
598
+ I === ce.current && S(
599
599
  "failed"
600
600
  /* Failed */
601
601
  );
602
602
  }
603
603
  }, []), dn = Y(h);
604
- B(() => {
604
+ V(() => {
605
605
  dn.current();
606
- }, []), B(() => {
607
- if (y && j.some((k) => k.space.id === y.id))
606
+ }, []), V(() => {
607
+ if (b && j.some((k) => k.space.id === b.id))
608
608
  return;
609
- const w = j.map((k) => k.space), S = w.find(
609
+ const w = j.map((k) => k.space), I = w.find(
610
610
  (k) => !!k.userId && !k.organizationId && !k.projectId
611
611
  );
612
- C(S ?? w[0] ?? null);
613
- }, [j, y]), B(() => {
614
- y && ie(y);
615
- }, [y, ie]);
612
+ v(I ?? w[0] ?? null);
613
+ }, [j, b]), V(() => {
614
+ b && ie(b);
615
+ }, [b, ie]);
616
616
  const cn = async () => {
617
- if (N(!1), !await h()) {
618
- N(!0);
617
+ if (_(!1), !await h()) {
618
+ _(!0);
619
619
  return;
620
620
  }
621
- y && await ie(y);
621
+ b && await ie(b);
622
622
  }, un = async () => {
623
623
  ee(!0);
624
624
  try {
@@ -630,77 +630,77 @@ function Ot({
630
630
  multiple: t,
631
631
  maxSize: r,
632
632
  accept: s,
633
- selectedIds: new Set(V.map(U)),
633
+ selectedIds: new Set(T.map(U)),
634
634
  getFileThumbnailUrl: a,
635
- select: (w) => T((S) => {
635
+ select: (w) => z((I) => {
636
636
  if (!t)
637
637
  return w.slice(0, 1);
638
- const k = new Set(S.map(U));
638
+ const k = new Set(I.map(U));
639
639
  return [
640
- ...S,
641
- ...w.filter(($) => !k.has(U($)))
640
+ ...I,
641
+ ...w.filter((H) => !k.has(U(H)))
642
642
  ];
643
643
  }),
644
644
  unselect: (w) => {
645
- const S = new Set(w.map(U));
646
- T(
647
- (k) => k.filter(($) => !S.has(U($)))
645
+ const I = new Set(w.map(U));
646
+ z(
647
+ (k) => k.filter((H) => !I.has(U(H)))
648
648
  );
649
649
  }
650
- }, gn = f !== null && v !== null, he = /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
651
- Se,
650
+ }, gn = g !== null && C !== null, be = /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
651
+ Ie,
652
652
  {
653
653
  size: 32,
654
- "aria-label": p.formatMessage({
654
+ "aria-label": f.formatMessage({
655
655
  id: "ds.business.cloud-import.loading"
656
656
  })
657
657
  }
658
658
  ) });
659
- if (!gn && (b || !u))
660
- return he;
659
+ if (!gn && (y || !u))
660
+ return be;
661
661
  if (j.length === 0)
662
662
  return /* @__PURE__ */ x(ne, { children: [
663
- /* @__PURE__ */ i(mt, { "aria-hidden": !0, children: /* @__PURE__ */ i(Tn, {}) }),
664
- /* @__PURE__ */ i(ht, { children: p.formatMessage({
663
+ /* @__PURE__ */ i(ht, { "aria-hidden": !0, children: /* @__PURE__ */ i(Tn, {}) }),
664
+ /* @__PURE__ */ i(bt, { children: f.formatMessage({
665
665
  id: "ds.business.cloud-import.create-error.title"
666
666
  }) }),
667
- /* @__PURE__ */ i(bt, { children: p.formatMessage({
667
+ /* @__PURE__ */ i(yt, { children: f.formatMessage({
668
668
  id: "ds.business.cloud-import.create-error.description"
669
669
  }) }),
670
670
  /* @__PURE__ */ i(
671
671
  X,
672
672
  {
673
673
  variant: "contained",
674
- startIcon: /* @__PURE__ */ i(Fe, { "aria-hidden": !0 }),
675
- loading: M || b,
674
+ startIcon: /* @__PURE__ */ i(Me, { "aria-hidden": !0 }),
675
+ loading: R || y,
676
676
  onClick: () => void un(),
677
- children: p.formatMessage({
677
+ children: f.formatMessage({
678
678
  id: "ds.business.cloud-import.create-error.create-button"
679
679
  })
680
680
  }
681
681
  )
682
682
  ] });
683
683
  if (G === null)
684
- return he;
684
+ return be;
685
685
  const fn = Cn(
686
- c,
686
+ d,
687
687
  G.space,
688
- G.sectionKey === Oe
689
- ), be = p.formatMessage({
688
+ G.sectionKey === We
689
+ ), ye = f.formatMessage({
690
690
  id: "ds.business.cloud-import.refresh"
691
- }), ye = p.formatMessage({
691
+ }), ve = f.formatMessage({
692
692
  id: "ds.business.cloud-import.open-in-cloud"
693
- }), ve = (w) => w.avatar ?? /* @__PURE__ */ i(Fe, {});
694
- return /* @__PURE__ */ x(ut, { children: [
693
+ }), we = (w) => w.avatar ?? /* @__PURE__ */ i(Me, {});
694
+ return /* @__PURE__ */ x(pt, { children: [
695
695
  re && /* @__PURE__ */ i(
696
- rt,
696
+ it,
697
697
  {
698
698
  severity: je.Danger,
699
- onClose: () => N(!1),
700
- children: p.formatMessage({ id: "ds.business.cloud-import.refresh-error" })
699
+ onClose: () => _(!1),
700
+ children: f.formatMessage({ id: "ds.business.cloud-import.refresh-error" })
701
701
  }
702
702
  ),
703
- /* @__PURE__ */ x(pt, { children: [
703
+ /* @__PURE__ */ x(gt, { children: [
704
704
  /* @__PURE__ */ i(
705
705
  Wn,
706
706
  {
@@ -710,152 +710,152 @@ function Ot({
710
710
  value: G,
711
711
  groupBy: (w) => w.sectionLabel,
712
712
  getOptionLabel: (w) => w.label,
713
- isOptionEqualToValue: (w, S) => w.space.id === S.space.id,
714
- onChange: (w, S) => C(S.space),
715
- filterOptions: (w, { inputValue: S }) => {
716
- const k = S.trim().toLowerCase();
713
+ isOptionEqualToValue: (w, I) => w.space.id === I.space.id,
714
+ onChange: (w, I) => v(I.space),
715
+ filterOptions: (w, { inputValue: I }) => {
716
+ const k = I.trim().toLowerCase();
717
717
  return k === "" || k === G.label.toLowerCase() ? w : w.filter(
718
- ($) => [$.label, $.subtitle ?? ""].some(
719
- (O) => O.toLowerCase().includes(k)
718
+ (H) => [H.label, H.subtitle ?? ""].some(
719
+ (E) => E.toLowerCase().includes(k)
720
720
  )
721
721
  );
722
722
  },
723
- renderGroup: (w) => /* @__PURE__ */ x(It, { children: [
724
- /* @__PURE__ */ i(Ft, { children: w.group }),
725
- /* @__PURE__ */ i(Mt, { children: w.children })
723
+ renderGroup: (w) => /* @__PURE__ */ x(Ft, { children: [
724
+ /* @__PURE__ */ i(Mt, { children: w.group }),
725
+ /* @__PURE__ */ i(Ot, { children: w.children })
726
726
  ] }, w.key),
727
- renderOption: ({ key: w, ...S }, k) => /* @__PURE__ */ x(wt, { ...S, children: [
728
- /* @__PURE__ */ i(en, { "aria-hidden": !0, children: ve(k) }),
729
- /* @__PURE__ */ x(xt, { children: [
730
- /* @__PURE__ */ i(Ct, { children: k.label }),
731
- k.subtitle !== void 0 && /* @__PURE__ */ i(kt, { children: k.subtitle })
727
+ renderOption: ({ key: w, ...I }, k) => /* @__PURE__ */ x(xt, { ...I, children: [
728
+ /* @__PURE__ */ i(en, { "aria-hidden": !0, children: we(k) }),
729
+ /* @__PURE__ */ x(Ct, { children: [
730
+ /* @__PURE__ */ i(kt, { children: k.label }),
731
+ k.subtitle !== void 0 && /* @__PURE__ */ i(St, { children: k.subtitle })
732
732
  ] })
733
733
  ] }, w),
734
734
  renderInput: (w) => /* @__PURE__ */ i(
735
735
  Ve,
736
736
  {
737
- label: p.formatMessage({
737
+ label: f.formatMessage({
738
738
  id: "ds.business.cloud-import.space-label"
739
739
  }),
740
740
  children: /* @__PURE__ */ i(
741
- fe,
741
+ me,
742
742
  {
743
743
  ...w.InputProps,
744
744
  id: w.id,
745
745
  fullWidth: !0,
746
746
  inputProps: w.inputProps,
747
- startAdornment: /* @__PURE__ */ i(St, { "aria-hidden": !0, children: ve(G) })
747
+ startAdornment: /* @__PURE__ */ i(It, { "aria-hidden": !0, children: we(G) })
748
748
  }
749
749
  )
750
750
  }
751
751
  )
752
752
  }
753
753
  ),
754
- /* @__PURE__ */ i(Ie, { title: be, children: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
754
+ /* @__PURE__ */ i(Fe, { title: ye, children: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
755
755
  ae,
756
756
  {
757
- "aria-label": be,
758
- disabled: W === "loading" || b,
757
+ "aria-label": ye,
758
+ disabled: W === "loading" || y,
759
759
  onClick: () => void cn(),
760
760
  children: /* @__PURE__ */ i(zn, { "aria-hidden": !0 })
761
761
  }
762
762
  ) }) }),
763
- /* @__PURE__ */ i(Ie, { title: ye, children: /* @__PURE__ */ i(
763
+ /* @__PURE__ */ i(Fe, { title: ve, children: /* @__PURE__ */ i(
764
764
  ae,
765
765
  {
766
766
  component: "a",
767
767
  href: fn,
768
768
  target: "_blank",
769
769
  rel: "noreferrer",
770
- "aria-label": ye,
770
+ "aria-label": ve,
771
771
  children: /* @__PURE__ */ i(En, { "aria-hidden": !0 })
772
772
  }
773
773
  ) })
774
774
  ] }),
775
- /* @__PURE__ */ i(gt, { children: p.formatMessage({ id: "ds.business.cloud-import.filtered-hint" }) }),
775
+ /* @__PURE__ */ i(ft, { children: f.formatMessage({ id: "ds.business.cloud-import.filtered-hint" }) }),
776
776
  W === "loading" && /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
777
- Se,
777
+ Ie,
778
778
  {
779
779
  size: 24,
780
- "aria-label": p.formatMessage({
780
+ "aria-label": f.formatMessage({
781
781
  id: "ds.business.cloud-import.tree-loading"
782
782
  })
783
783
  }
784
784
  ) }),
785
785
  W === "failed" && /* @__PURE__ */ x(ne, { role: "alert", children: [
786
- p.formatMessage({ id: "ds.business.cloud-import.tree-error" }),
786
+ f.formatMessage({ id: "ds.business.cloud-import.tree-error" }),
787
787
  /* @__PURE__ */ i(
788
788
  X,
789
789
  {
790
790
  variant: "outlined",
791
791
  onClick: () => void ie(G.space),
792
- children: p.formatMessage({ id: "ds.business.cloud-import.retry" })
792
+ children: f.formatMessage({ id: "ds.business.cloud-import.retry" })
793
793
  }
794
794
  )
795
795
  ] }),
796
- W === "ready" && F !== null && (F.folders.length === 0 && F.files.length === 0 ? /* @__PURE__ */ x(ne, { children: [
796
+ W === "ready" && M !== null && (M.folders.length === 0 && M.files.length === 0 ? /* @__PURE__ */ x(ne, { children: [
797
797
  /* @__PURE__ */ i(Ne, { "aria-hidden": !0 }),
798
- p.formatMessage({ id: "ds.business.cloud-import.empty-space" })
798
+ f.formatMessage({ id: "ds.business.cloud-import.empty-space" })
799
799
  ] }) : /* @__PURE__ */ i(
800
- ft,
800
+ mt,
801
801
  {
802
- "aria-label": p.formatMessage({
802
+ "aria-label": f.formatMessage({
803
803
  id: "ds.business.cloud-import.tree-label"
804
804
  }),
805
805
  children: /* @__PURE__ */ i(
806
806
  Je,
807
807
  {
808
- folders: F.folders,
809
- files: F.files,
808
+ folders: M.folders,
809
+ files: M.files,
810
810
  context: pn
811
811
  }
812
812
  )
813
813
  }
814
814
  )),
815
- /* @__PURE__ */ x(yt, { children: [
816
- /* @__PURE__ */ i(vt, { role: "status", children: p.formatMessage(
815
+ /* @__PURE__ */ x(vt, { children: [
816
+ /* @__PURE__ */ i(wt, { role: "status", children: f.formatMessage(
817
817
  { id: "ds.business.cloud-import.selected" },
818
- { count: V.length }
818
+ { count: T.length }
819
819
  ) }),
820
820
  /* @__PURE__ */ i(
821
821
  X,
822
822
  {
823
823
  variant: "contained",
824
824
  startIcon: /* @__PURE__ */ i(Rn, { "aria-hidden": !0 }),
825
- disabled: V.length === 0,
826
- onClick: () => n(G.space, V),
827
- children: p.formatMessage({ id: "ds.business.cloud-import.import" })
825
+ disabled: T.length === 0,
826
+ onClick: () => n(G.space, T),
827
+ children: f.formatMessage({ id: "ds.business.cloud-import.import" })
828
828
  }
829
829
  )
830
830
  ] })
831
831
  ] });
832
832
  }
833
- function Wt({
833
+ function Tt({
834
834
  open: e,
835
835
  onClose: n,
836
836
  onImport: t,
837
837
  cloudPicker: r,
838
838
  multiple: s,
839
- maxSize: c,
839
+ maxSize: d,
840
840
  accept: a
841
841
  }) {
842
- const d = L();
842
+ const c = P();
843
843
  return /* @__PURE__ */ i(
844
844
  Pe,
845
845
  {
846
846
  open: e,
847
847
  onClose: n,
848
848
  size: He.Medium,
849
- title: d.formatMessage({ id: "ds.business.cloud-import.title" }),
849
+ title: c.formatMessage({ id: "ds.business.cloud-import.title" }),
850
850
  children: e && /* @__PURE__ */ i(
851
- Ot,
851
+ Wt,
852
852
  {
853
853
  cloudPicker: r,
854
854
  multiple: s,
855
- maxSize: c,
855
+ maxSize: d,
856
856
  accept: a,
857
- onImport: (f, v) => {
858
- t(f, v), n();
857
+ onImport: (g, C) => {
858
+ t(g, C), n();
859
859
  }
860
860
  }
861
861
  )
@@ -863,32 +863,32 @@ function Wt({
863
863
  );
864
864
  }
865
865
  var nn = /* @__PURE__ */ ((e) => (e.Medium = "medium", e.Compact = "compact", e))(nn || {});
866
- const Tt = Ee(
866
+ const Rt = ze(
867
867
  "medium"
868
868
  /* Medium */
869
- ), Rt = l(le)(({ theme: e }) => ({
869
+ ), Et = l(le)(({ theme: e }) => ({
870
870
  // Three times the largest spacing step: room for a label and the arrow.
871
871
  minWidth: o(e.design.space[10] * 3),
872
872
  maxWidth: "100%"
873
- })), Et = l(Le)(({ theme: e }) => ({
873
+ })), zt = l($e)(({ theme: e }) => ({
874
874
  position: "relative",
875
875
  transform: "none",
876
876
  maxWidth: "100%",
877
877
  pointerEvents: "auto",
878
878
  marginBottom: o(e.design.space[2]),
879
879
  fontSize: o(e.design.typeScale.small),
880
- fontWeight: R.medium,
880
+ fontWeight: A.medium,
881
881
  lineHeight: e.typography.caption.lineHeight,
882
882
  color: e.design.tokens["text.secondary"],
883
883
  "&.Mui-focused": { color: e.design.tokens["text.secondary"] },
884
884
  "&.Mui-error": { color: e.design.tokens["status.danger"] },
885
885
  "&.Mui-disabled": { color: e.design.tokens["text.muted"] }
886
- })), zt = l("span")(({ theme: e }) => ({
886
+ })), At = l("span")(({ theme: e }) => ({
887
887
  display: "flex",
888
888
  alignItems: "center",
889
889
  gap: o(e.design.space[2]),
890
890
  minWidth: 0
891
- })), At = l("i", {
891
+ })), Lt = l("i", {
892
892
  shouldForwardProp: (e) => e !== "token"
893
893
  })(({ theme: e, token: n }) => ({
894
894
  flex: "none",
@@ -896,11 +896,11 @@ const Tt = Ee(
896
896
  height: o(e.design.space[2]),
897
897
  borderRadius: o(e.design.radii.sm / 2),
898
898
  backgroundColor: e.design.tokens[n]
899
- })), Lt = l("span")({
899
+ })), $t = l("span")({
900
900
  display: "flex",
901
901
  flexDirection: "column",
902
902
  minWidth: 0
903
- }), $t = l("span")(({ theme: e }) => ({
903
+ }), Dt = l("span")(({ theme: e }) => ({
904
904
  fontSize: o(e.design.typeScale.caption),
905
905
  color: e.design.tokens["text.muted"],
906
906
  whiteSpace: "normal"
@@ -908,27 +908,27 @@ const Tt = Ee(
908
908
  overflow: "hidden",
909
909
  textOverflow: "ellipsis",
910
910
  whiteSpace: "nowrap"
911
- }), Dt = l(pe)(({ theme: e }) => ({
911
+ }), Pt = l(pe)(({ theme: e }) => ({
912
912
  color: e.design.tokens["text.muted"]
913
913
  }));
914
- function yr({
914
+ function wr({
915
915
  label: e,
916
916
  options: n,
917
917
  value: t,
918
918
  onChange: r,
919
919
  multiple: s = !1,
920
- disabled: c,
920
+ disabled: d,
921
921
  error: a,
922
- size: d
922
+ size: c
923
923
  }) {
924
- const f = L(), v = ze(Tt), b = (d ?? v) === nn.Compact, u = b ? Rt : le, h = D(), m = `${h}-label`, g = `${h}-helper`, p = new Map(n.map((C) => [C.value, C]));
925
- return /* @__PURE__ */ x(u, { fullWidth: !b, disabled: c, error: !!a, children: [
924
+ const g = P(), C = Ae(Rt), y = (c ?? C) === nn.Compact, u = y ? Et : le, h = N(), m = `${h}-label`, p = `${h}-helper`, f = new Map(n.map((v) => [v.value, v]));
925
+ return /* @__PURE__ */ x(u, { fullWidth: !y, disabled: d, error: !!a, children: [
926
926
  /* @__PURE__ */ i(
927
- Et,
927
+ zt,
928
928
  {
929
929
  id: m,
930
930
  shrink: !0,
931
- style: b ? $e : void 0,
931
+ style: y ? fe : void 0,
932
932
  children: e
933
933
  }
934
934
  ),
@@ -939,41 +939,41 @@ function yr({
939
939
  multiple: s,
940
940
  value: t,
941
941
  displayEmpty: !0,
942
- renderValue: (C) => {
943
- const F = Array.isArray(C) ? C : [C];
944
- return b && F.length === 0 ? /* @__PURE__ */ i(Dt, { "aria-hidden": !0, children: e }) : /* @__PURE__ */ i(pe, { children: F.map((P) => {
942
+ renderValue: (v) => {
943
+ const M = Array.isArray(v) ? v : [v];
944
+ return y && M.length === 0 ? /* @__PURE__ */ i(Pt, { "aria-hidden": !0, children: e }) : /* @__PURE__ */ i(pe, { children: M.map((O) => {
945
945
  var W;
946
- return ((W = p.get(P)) == null ? void 0 : W.label) ?? P;
946
+ return ((W = f.get(O)) == null ? void 0 : W.label) ?? O;
947
947
  }).join(", ") });
948
948
  },
949
- "aria-describedby": a ? g : void 0,
950
- onChange: (C) => r(C.target.value),
949
+ "aria-describedby": a ? p : void 0,
950
+ onChange: (v) => r(v.target.value),
951
951
  children: [
952
- n.length === 0 && /* @__PURE__ */ i(xe, { disabled: !0, value: "", children: f.formatMessage({ id: "ds.inputs.rich-select.empty" }) }),
953
- n.map((C) => /* @__PURE__ */ i(xe, { value: C.value, children: /* @__PURE__ */ x(zt, { children: [
954
- C.tone && /* @__PURE__ */ i(At, { token: C.tone }),
955
- C.icon,
956
- /* @__PURE__ */ x(Lt, { children: [
957
- /* @__PURE__ */ i(pe, { children: C.label }),
958
- C.description && /* @__PURE__ */ i($t, { children: C.description })
952
+ n.length === 0 && /* @__PURE__ */ i(Ce, { disabled: !0, value: "", children: g.formatMessage({ id: "ds.inputs.rich-select.empty" }) }),
953
+ n.map((v) => /* @__PURE__ */ i(Ce, { value: v.value, children: /* @__PURE__ */ x(At, { children: [
954
+ v.tone && /* @__PURE__ */ i(Lt, { token: v.tone }),
955
+ v.icon,
956
+ /* @__PURE__ */ x($t, { children: [
957
+ /* @__PURE__ */ i(pe, { children: v.label }),
958
+ v.description && /* @__PURE__ */ i(Dt, { children: v.description })
959
959
  ] })
960
- ] }) }, C.value))
960
+ ] }) }, v.value))
961
961
  ]
962
962
  }
963
963
  ),
964
- a && /* @__PURE__ */ i(se, { id: g, children: a })
964
+ a && /* @__PURE__ */ i(se, { id: p, children: a })
965
965
  ] });
966
966
  }
967
- const Pt = l("div")(({ theme: e }) => ({
967
+ const Ht = l("div")(({ theme: e }) => ({
968
968
  display: "flex",
969
969
  flexDirection: "column",
970
970
  gap: o(e.design.space[2]),
971
971
  minWidth: 0
972
- })), Ht = l("span")(({ theme: e }) => ({
972
+ })), Nt = l("span")(({ theme: e }) => ({
973
973
  fontSize: o(e.design.typeScale.small),
974
- fontWeight: R.medium,
974
+ fontWeight: A.medium,
975
975
  color: e.design.tokens["text.secondary"]
976
- })), Nt = l("div", {
976
+ })), _t = l("div", {
977
977
  shouldForwardProp: (e) => e !== "active"
978
978
  })(({ theme: e, active: n }) => {
979
979
  const { tokens: t, space: r, radii: s } = e.design;
@@ -995,7 +995,7 @@ const Pt = l("div")(({ theme: e }) => ({
995
995
  transition: oe(e, ["border-color", "background-color"]),
996
996
  "&:hover": { borderColor: t.accent }
997
997
  };
998
- }), _t = l("span")(({ theme: e }) => {
998
+ }), Bt = l("span")(({ theme: e }) => {
999
999
  const { tokens: n, space: t } = e.design;
1000
1000
  return {
1001
1001
  display: "inline-flex",
@@ -1008,80 +1008,80 @@ const Pt = l("div")(({ theme: e }) => ({
1008
1008
  color: n["accent.text"],
1009
1009
  "& svg": { width: o(t[5]), height: o(t[5]) }
1010
1010
  };
1011
- }), Bt = l("span")(({ theme: e }) => ({
1011
+ }), Vt = l("span")(({ theme: e }) => ({
1012
1012
  fontSize: o(e.design.typeScale.body),
1013
1013
  [Z.down(K.Tablet)]: { display: "none" }
1014
- })), Vt = l("div")(({ theme: e }) => ({
1014
+ })), jt = l("div")(({ theme: e }) => ({
1015
1015
  display: "flex",
1016
1016
  flexWrap: "wrap",
1017
1017
  alignItems: "center",
1018
1018
  justifyContent: "space-between",
1019
1019
  gap: o(e.design.space[2])
1020
- })), jt = l("span")(({ theme: e }) => ({
1020
+ })), Gt = l("span")(({ theme: e }) => ({
1021
1021
  fontSize: o(e.design.typeScale.small),
1022
1022
  color: e.design.tokens["text.muted"]
1023
- })), Gt = l("p")(({ theme: e }) => ({
1023
+ })), qt = l("p")(({ theme: e }) => ({
1024
1024
  margin: 0,
1025
1025
  fontSize: o(e.design.typeScale.small),
1026
1026
  color: e.design.tokens["status.danger"]
1027
- })), qt = l("img")(({ theme: e }) => ({
1027
+ })), Ut = l("img")(({ theme: e }) => ({
1028
1028
  width: o(e.design.space[4]),
1029
1029
  height: o(e.design.space[4])
1030
- })), Ut = (e) => {
1030
+ })), Kt = (e) => {
1031
1031
  const { value: n, unit: t } = Mn(e);
1032
1032
  return `${n} ${t}`;
1033
1033
  };
1034
- function vr({
1034
+ function xr({
1035
1035
  onDrop: e,
1036
1036
  multiple: n = !0,
1037
1037
  accept: t,
1038
1038
  maxSize: r,
1039
1039
  caption: s,
1040
- title: c,
1040
+ title: d,
1041
1041
  cloudImport: a,
1042
- children: d
1042
+ children: c
1043
1043
  }) {
1044
- const f = L(), v = D(), b = D(), [u, h] = I(null), [m, g] = I(!1), p = r === void 0 ? null : Ut(r), y = s ?? (p === null ? null : f.formatMessage(
1044
+ const g = P(), C = N(), y = N(), [u, h] = F(null), [m, p] = F(!1), f = r === void 0 ? null : Kt(r), b = s ?? (f === null ? null : g.formatMessage(
1045
1045
  { id: "ds.inputs.drop-zone.max-size" },
1046
- { size: p, multiple: String(n) }
1047
- )), C = (T, M) => {
1048
- const ee = r === void 0 ? [] : T.filter((N) => N.size > r), re = T.filter((N) => !ee.includes(N));
1049
- M.some(
1050
- (N) => N.errors.some((j) => j.code === Fn.TooManyFiles)
1046
+ { size: f, multiple: String(n) }
1047
+ )), v = (z, R) => {
1048
+ const ee = r === void 0 ? [] : z.filter((_) => _.size > r), re = z.filter((_) => !ee.includes(_));
1049
+ R.some(
1050
+ (_) => _.errors.some((j) => j.code === Fn.TooManyFiles)
1051
1051
  ) ? h(
1052
1052
  "too-many"
1053
1053
  /* TooMany */
1054
- ) : M.length > 0 ? h(
1054
+ ) : R.length > 0 ? h(
1055
1055
  "rejected-type"
1056
1056
  /* Rejected */
1057
1057
  ) : ee.length > 0 ? h(
1058
- T.length === 1 ? "too-big" : "some-too-big"
1058
+ z.length === 1 ? "too-big" : "some-too-big"
1059
1059
  /* SomeTooBig */
1060
1060
  ) : h(null), re.length > 0 && e(re);
1061
- }, { getRootProps: F, getInputProps: P, isDragActive: W, open: H } = Sn({
1062
- onDrop: C,
1061
+ }, { getRootProps: M, getInputProps: O, isDragActive: W, open: S } = Sn({
1062
+ onDrop: v,
1063
1063
  multiple: n,
1064
1064
  accept: t,
1065
1065
  // The zone itself is not a control: the button inside is, for the keyboard and screen readers.
1066
1066
  noClick: !0,
1067
1067
  noKeyboard: !0
1068
- }), V = f.formatMessage(
1068
+ }), T = g.formatMessage(
1069
1069
  { id: "ds.inputs.drop-zone.browse" },
1070
1070
  { multiple: String(n) }
1071
1071
  );
1072
1072
  return /* @__PURE__ */ x(
1073
- Pt,
1073
+ Ht,
1074
1074
  {
1075
1075
  role: "group",
1076
- "aria-labelledby": c !== void 0 ? v : void 0,
1077
- "aria-describedby": y !== null ? b : void 0,
1076
+ "aria-labelledby": d !== void 0 ? C : void 0,
1077
+ "aria-describedby": b !== null ? y : void 0,
1078
1078
  children: [
1079
- c !== void 0 && /* @__PURE__ */ i(Ht, { id: v, children: c }),
1080
- /* @__PURE__ */ x(Nt, { ...F({ onClick: H }), active: W, children: [
1081
- /* @__PURE__ */ i("input", { ...P({ "aria-hidden": !0 }) }),
1082
- d ?? /* @__PURE__ */ x(J, { children: [
1083
- /* @__PURE__ */ i(_t, { "aria-hidden": !0, children: /* @__PURE__ */ i(On, {}) }),
1084
- /* @__PURE__ */ i(Bt, { children: f.formatMessage(
1079
+ d !== void 0 && /* @__PURE__ */ i(Nt, { id: C, children: d }),
1080
+ /* @__PURE__ */ x(_t, { ...M({ onClick: S }), active: W, children: [
1081
+ /* @__PURE__ */ i("input", { ...O({ "aria-hidden": !0 }) }),
1082
+ c ?? /* @__PURE__ */ x(J, { children: [
1083
+ /* @__PURE__ */ i(Bt, { "aria-hidden": !0, children: /* @__PURE__ */ i(On, {}) }),
1084
+ /* @__PURE__ */ i(Vt, { children: g.formatMessage(
1085
1085
  {
1086
1086
  id: W ? "ds.inputs.drop-zone.release" : "ds.inputs.drop-zone.prompt"
1087
1087
  },
@@ -1092,41 +1092,41 @@ function vr({
1092
1092
  X,
1093
1093
  {
1094
1094
  variant: "outlined",
1095
- onClick: (T) => {
1096
- T.stopPropagation(), H();
1095
+ onClick: (z) => {
1096
+ z.stopPropagation(), S();
1097
1097
  },
1098
- children: V
1098
+ children: T
1099
1099
  }
1100
1100
  )
1101
1101
  ] }),
1102
- (a !== void 0 || y !== null) && /* @__PURE__ */ x(Vt, { children: [
1102
+ (a !== void 0 || b !== null) && /* @__PURE__ */ x(jt, { children: [
1103
1103
  a !== void 0 && /* @__PURE__ */ i(
1104
1104
  X,
1105
1105
  {
1106
1106
  variant: "text",
1107
- startIcon: /* @__PURE__ */ i(qt, { src: In, alt: "" }),
1108
- onClick: () => g(!0),
1109
- children: f.formatMessage({ id: "ds.inputs.drop-zone.cloud" })
1107
+ startIcon: /* @__PURE__ */ i(Ut, { src: In, alt: "" }),
1108
+ onClick: () => p(!0),
1109
+ children: g.formatMessage({ id: "ds.inputs.drop-zone.cloud" })
1110
1110
  }
1111
1111
  ),
1112
- y !== null && /* @__PURE__ */ i(jt, { id: b, children: y })
1112
+ b !== null && /* @__PURE__ */ i(Gt, { id: y, children: b })
1113
1113
  ] }),
1114
- u !== null && /* @__PURE__ */ i(Gt, { role: "alert", children: f.formatMessage(
1114
+ u !== null && /* @__PURE__ */ i(qt, { role: "alert", children: g.formatMessage(
1115
1115
  { id: `ds.inputs.drop-zone.${u}` },
1116
- { size: p ?? "" }
1116
+ { size: f ?? "" }
1117
1117
  ) }),
1118
1118
  a !== void 0 && /* @__PURE__ */ i(
1119
- Wt,
1119
+ Tt,
1120
1120
  {
1121
1121
  open: m,
1122
- onClose: () => g(!1),
1122
+ onClose: () => p(!1),
1123
1123
  onImport: a.onImport,
1124
1124
  cloudPicker: a,
1125
1125
  multiple: n,
1126
1126
  maxSize: r,
1127
- accept: t === void 0 ? void 0 : Object.entries(t).flatMap(([T, M]) => [
1128
- T,
1129
- ...M
1127
+ accept: t === void 0 ? void 0 : Object.entries(t).flatMap(([z, R]) => [
1128
+ z,
1129
+ ...R
1130
1130
  ])
1131
1131
  }
1132
1132
  )
@@ -1134,60 +1134,60 @@ function vr({
1134
1134
  }
1135
1135
  );
1136
1136
  }
1137
- var Kt = /* @__PURE__ */ ((e) => (e.Default = "default", e.Danger = "danger", e.Warning = "warning", e))(Kt || {});
1138
- const Yt = l("form")(({ theme: e }) => ({
1137
+ var Yt = /* @__PURE__ */ ((e) => (e.Default = "default", e.Danger = "danger", e.Warning = "warning", e))(Yt || {});
1138
+ const Xt = l("form")(({ theme: e }) => ({
1139
1139
  display: "flex",
1140
1140
  flexDirection: "column",
1141
1141
  gap: o(e.design.space[4]),
1142
1142
  color: e.design.tokens["text.secondary"],
1143
1143
  overflowWrap: "anywhere"
1144
- })), Xt = (e, n) => {
1144
+ })), Qt = (e, n) => {
1145
1145
  const { paper: t } = e.design.tokens, r = e.design.tokens["paper.on"];
1146
- return Ce(n, t) >= Ce(n, r) ? t : r;
1147
- }, Qt = {
1146
+ return ke(n, t) >= ke(n, r) ? t : r;
1147
+ }, Zt = {
1148
1148
  default: "primary",
1149
1149
  danger: "error",
1150
1150
  warning: "warning"
1151
1151
  };
1152
- function Zt({
1152
+ function Jt({
1153
1153
  open: e,
1154
1154
  title: n,
1155
1155
  body: t,
1156
1156
  confirmLabel: r,
1157
1157
  tone: s = "default",
1158
- confirmationText: c,
1158
+ confirmationText: d,
1159
1159
  onConfirm: a,
1160
- onCancel: d
1160
+ onCancel: c
1161
1161
  }) {
1162
- const f = L(), v = bn(), b = D(), [u, h] = I(""), [m, g] = I(!1), [p, y] = I(!1), [C, F] = I(e);
1163
- e !== C && (F(e), e && (h(""), y(!1)));
1164
- const P = !m && (c === void 0 || u === c), W = s !== "default", H = () => {
1165
- m || d();
1166
- }, V = () => {
1167
- if (!P)
1162
+ const g = P(), C = bn(), y = N(), [u, h] = F(""), [m, p] = F(!1), [f, b] = F(!1), [v, M] = F(e);
1163
+ e !== v && (M(e), e && (h(""), b(!1)));
1164
+ const O = !m && (d === void 0 || u === d), W = s !== "default", S = () => {
1165
+ m || c();
1166
+ }, T = () => {
1167
+ if (!O)
1168
1168
  return;
1169
- y(!1);
1170
- let M;
1169
+ b(!1);
1170
+ let R;
1171
1171
  try {
1172
- M = a();
1172
+ R = a();
1173
1173
  } catch {
1174
- y(!0);
1174
+ b(!0);
1175
1175
  return;
1176
1176
  }
1177
- M instanceof Promise && (g(!0), M.then(
1178
- () => g(!1),
1177
+ R instanceof Promise && (p(!0), R.then(
1178
+ () => p(!1),
1179
1179
  () => {
1180
- g(!1), y(!0);
1180
+ p(!1), b(!0);
1181
1181
  }
1182
1182
  ));
1183
- }, T = (M) => {
1184
- M.preventDefault(), V();
1183
+ }, z = (R) => {
1184
+ R.preventDefault(), T();
1185
1185
  };
1186
1186
  return /* @__PURE__ */ i(
1187
1187
  Pe,
1188
1188
  {
1189
1189
  open: e,
1190
- onClose: H,
1190
+ onClose: S,
1191
1191
  size: He.Small,
1192
1192
  title: n,
1193
1193
  actions: /* @__PURE__ */ x(J, { children: [
@@ -1196,26 +1196,26 @@ function Zt({
1196
1196
  {
1197
1197
  variant: "outlined",
1198
1198
  disabled: m,
1199
- autoFocus: c === void 0 && W,
1200
- onClick: H,
1201
- children: f.formatMessage({ id: "ds.layers.confirm-dialog.cancel" })
1199
+ autoFocus: d === void 0 && W,
1200
+ onClick: S,
1201
+ children: g.formatMessage({ id: "ds.layers.confirm-dialog.cancel" })
1202
1202
  }
1203
1203
  ),
1204
1204
  /* @__PURE__ */ i(
1205
1205
  X,
1206
1206
  {
1207
1207
  type: "submit",
1208
- form: b,
1208
+ form: y,
1209
1209
  variant: "contained",
1210
- color: Qt[s],
1211
- disabled: !P,
1210
+ color: Zt[s],
1211
+ disabled: !O,
1212
1212
  loading: m,
1213
- autoFocus: c === void 0 && !W,
1213
+ autoFocus: d === void 0 && !W,
1214
1214
  sx: s === "warning" ? {
1215
1215
  "&:not(.Mui-disabled)": {
1216
- color: Xt(
1217
- v,
1218
- v.design.tokens["status.warning"]
1216
+ color: Qt(
1217
+ C,
1218
+ C.design.tokens["status.warning"]
1219
1219
  )
1220
1220
  }
1221
1221
  } : void 0,
@@ -1223,74 +1223,74 @@ function Zt({
1223
1223
  }
1224
1224
  )
1225
1225
  ] }),
1226
- children: /* @__PURE__ */ x(Yt, { id: b, onSubmit: T, noValidate: !0, children: [
1226
+ children: /* @__PURE__ */ x(Xt, { id: y, onSubmit: z, noValidate: !0, children: [
1227
1227
  /* @__PURE__ */ i("div", { children: t }),
1228
- c !== void 0 && /* @__PURE__ */ i(
1228
+ d !== void 0 && /* @__PURE__ */ i(
1229
1229
  Vn,
1230
1230
  {
1231
- label: f.formatMessage(
1231
+ label: g.formatMessage(
1232
1232
  { id: "ds.layers.confirm-dialog.type-to-confirm" },
1233
- { text: c }
1233
+ { text: d }
1234
1234
  ),
1235
1235
  value: u,
1236
- onChange: (M) => h(M.target.value),
1236
+ onChange: (R) => h(R.target.value),
1237
1237
  disabled: m,
1238
1238
  autoFocus: !0,
1239
1239
  autoComplete: "off",
1240
1240
  fullWidth: !0
1241
1241
  }
1242
1242
  ),
1243
- p && /* @__PURE__ */ i(Bn, { severity: "error", children: f.formatMessage({ id: "ds.layers.confirm-dialog.failed" }) })
1243
+ f && /* @__PURE__ */ i(Bn, { severity: "error", children: g.formatMessage({ id: "ds.layers.confirm-dialog.failed" }) })
1244
1244
  ] })
1245
1245
  }
1246
1246
  );
1247
1247
  }
1248
- const tn = Ee(null);
1249
- function wr({ children: e }) {
1250
- const [n, t] = I([]), [r, s] = I(null), c = Y(0), a = Y([]);
1248
+ const tn = ze(null);
1249
+ function Cr({ children: e }) {
1250
+ const [n, t] = F([]), [r, s] = F(null), d = Y(0), a = Y([]);
1251
1251
  a.current = n;
1252
- const d = n.length > 0 ? n[0] : null;
1253
- d !== null && d !== r && s(d), B(
1252
+ const c = n.length > 0 ? n[0] : null;
1253
+ c !== null && c !== r && s(c), V(
1254
1254
  () => () => {
1255
1255
  a.current.forEach((u) => u.resolve(!1));
1256
1256
  },
1257
1257
  []
1258
1258
  );
1259
- const f = Q(
1259
+ const g = Q(
1260
1260
  (u) => new Promise((h) => {
1261
- c.current += 1;
1262
- const m = { id: c.current, options: u, resolve: h };
1263
- t((g) => [...g, m]);
1261
+ d.current += 1;
1262
+ const m = { id: d.current, options: u, resolve: h };
1263
+ t((p) => [...p, m]);
1264
1264
  }),
1265
1265
  []
1266
- ), v = (u) => {
1267
- d !== null && (d.resolve(u), t((h) => h.filter((m) => m !== d)));
1268
- }, b = ge(() => ({ confirm: f }), [f]);
1269
- return /* @__PURE__ */ x(tn.Provider, { value: b, children: [
1266
+ ), C = (u) => {
1267
+ c !== null && (c.resolve(u), t((h) => h.filter((m) => m !== c)));
1268
+ }, y = ge(() => ({ confirm: g }), [g]);
1269
+ return /* @__PURE__ */ x(tn.Provider, { value: y, children: [
1270
1270
  e,
1271
1271
  r !== null && // A new key per request: each one starts from an empty confirmation field.
1272
1272
  /* @__PURE__ */ i(
1273
- Zt,
1273
+ Jt,
1274
1274
  {
1275
- open: d === r,
1275
+ open: c === r,
1276
1276
  ...r.options,
1277
- onConfirm: () => v(!0),
1278
- onCancel: () => v(!1)
1277
+ onConfirm: () => C(!0),
1278
+ onCancel: () => C(!1)
1279
1279
  },
1280
1280
  r.id
1281
1281
  )
1282
1282
  ] });
1283
1283
  }
1284
- function xr() {
1285
- const e = ze(tn);
1284
+ function kr() {
1285
+ const e = Ae(tn);
1286
1286
  if (e === null)
1287
1287
  throw new Error(
1288
1288
  "useConfirmDialog must be called inside a ConfirmDialogProvider"
1289
1289
  );
1290
1290
  return e;
1291
1291
  }
1292
- var Jt = /* @__PURE__ */ ((e) => (e.BottomStart = "bottom-start", e.BottomEnd = "bottom-end", e))(Jt || {});
1293
- const eo = 320, no = l("div")(({ theme: e }) => {
1292
+ var eo = /* @__PURE__ */ ((e) => (e.BottomStart = "bottom-start", e.BottomEnd = "bottom-end", e))(eo || {});
1293
+ const no = 320, to = l("div")(({ theme: e }) => {
1294
1294
  const { tokens: n, space: t } = e.design;
1295
1295
  return {
1296
1296
  flex: "none",
@@ -1299,43 +1299,43 @@ const eo = 320, no = l("div")(({ theme: e }) => {
1299
1299
  justifyContent: "space-between",
1300
1300
  gap: o(t[3]),
1301
1301
  padding: `${o(t[2])} ${o(t[2])} ${o(t[2])} ${o(t[4])}`,
1302
- borderBottom: A(n["border.subtle"])
1302
+ borderBottom: D(n["border.subtle"])
1303
1303
  };
1304
- }), to = l("h2")(({ theme: e }) => ({
1304
+ }), oo = l("h2")(({ theme: e }) => ({
1305
1305
  margin: 0,
1306
1306
  minWidth: 0,
1307
1307
  color: e.design.tokens["text.primary"],
1308
1308
  fontSize: o(e.design.typeScale.body),
1309
- fontWeight: R.semibold,
1309
+ fontWeight: A.semibold,
1310
1310
  overflowWrap: "anywhere"
1311
1311
  })), on = l("div")(({ theme: e }) => ({
1312
1312
  display: "flex",
1313
1313
  flexDirection: "column",
1314
1314
  gap: o(e.design.space[3]),
1315
1315
  fontSize: o(e.design.typeScale.body)
1316
- })), oo = l(on)(({ theme: e }) => ({
1316
+ })), ro = l(on)(({ theme: e }) => ({
1317
1317
  padding: o(e.design.space[4])
1318
1318
  }));
1319
- function Cr({
1319
+ function Sr({
1320
1320
  anchorEl: e,
1321
1321
  open: n,
1322
1322
  onClose: t,
1323
1323
  title: r,
1324
1324
  placement: s = "bottom-start",
1325
- width: c = eo,
1325
+ width: d = no,
1326
1326
  children: a
1327
1327
  }) {
1328
- const d = L(), f = D(), v = vn() === K.Mobile, b = d.formatMessage({
1328
+ const c = P(), g = N(), C = vn() === K.Mobile, y = c.formatMessage({
1329
1329
  id: "ds.layers.anchored-panel.close"
1330
1330
  }), u = n && e !== null;
1331
- if (v)
1331
+ if (C)
1332
1332
  return /* @__PURE__ */ i(
1333
1333
  wn,
1334
1334
  {
1335
1335
  open: u,
1336
1336
  onClose: t,
1337
1337
  title: r,
1338
- closeLabel: b,
1338
+ closeLabel: y,
1339
1339
  children: /* @__PURE__ */ i(on, { children: a })
1340
1340
  }
1341
1341
  );
@@ -1352,9 +1352,9 @@ function Cr({
1352
1352
  paper: {
1353
1353
  role: "dialog",
1354
1354
  "aria-modal": !0,
1355
- "aria-labelledby": f,
1355
+ "aria-labelledby": g,
1356
1356
  sx: (m) => ({
1357
- width: o(c),
1357
+ width: o(d),
1358
1358
  maxWidth: `calc(100vw - ${o(m.design.space[4] * 2)})`,
1359
1359
  marginTop: o(m.design.space[1]),
1360
1360
  color: m.design.tokens["text.primary"],
@@ -1363,79 +1363,101 @@ function Cr({
1363
1363
  }
1364
1364
  },
1365
1365
  children: [
1366
- /* @__PURE__ */ x(no, { children: [
1367
- /* @__PURE__ */ i(to, { id: f, children: r }),
1368
- /* @__PURE__ */ i(ae, { "aria-label": b, onClick: t, children: /* @__PURE__ */ i(_e, { "aria-hidden": !0 }) })
1366
+ /* @__PURE__ */ x(to, { children: [
1367
+ /* @__PURE__ */ i(oo, { id: g, children: r }),
1368
+ /* @__PURE__ */ i(ae, { "aria-label": y, onClick: t, children: /* @__PURE__ */ i(_e, { "aria-hidden": !0 }) })
1369
1369
  ] }),
1370
- /* @__PURE__ */ i(oo, { children: a })
1370
+ /* @__PURE__ */ i(ro, { children: a })
1371
1371
  ]
1372
1372
  }
1373
1373
  );
1374
1374
  }
1375
- const ro = [32, 160, 8239, 8201].map(
1375
+ const io = [32, 160, 8239, 8201].map(
1376
1376
  (e) => String.fromCharCode(e)
1377
- ), io = (e) => {
1377
+ ), so = (e) => {
1378
1378
  var t, r;
1379
1379
  const n = new Intl.NumberFormat(e).formatToParts(11111.1);
1380
1380
  return {
1381
1381
  group: ((t = n.find((s) => s.type === "group")) == null ? void 0 : t.value) ?? " ",
1382
1382
  decimal: ((r = n.find((s) => s.type === "decimal")) == null ? void 0 : r.value) ?? "."
1383
1383
  };
1384
- }, Te = (e, n) => {
1385
- const r = [n.group, ...ro].reduce(
1386
- (c, a) => c.split(a).join(""),
1384
+ }, Re = (e, n) => {
1385
+ const r = [n.group, ...io].reduce(
1386
+ (d, a) => d.split(a).join(""),
1387
1387
  e.trim()
1388
1388
  ).replace(",", ".");
1389
1389
  if (r === "" || !/^-?\d*\.?\d+$|^-?\d+\.$/.test(r))
1390
1390
  return null;
1391
1391
  const s = Number.parseFloat(r);
1392
1392
  return Number.isFinite(s) ? s : null;
1393
- };
1394
- function kr({
1393
+ }, ao = l("div", {
1394
+ shouldForwardProp: (e) => e !== "labelHidden"
1395
+ })(({ labelHidden: e }) => ({
1396
+ ...e && { [`& .${qn.root}`]: fe }
1397
+ }));
1398
+ function Ir({
1395
1399
  label: e,
1396
1400
  value: n,
1397
1401
  onChange: t,
1398
1402
  decimals: r = 0,
1399
1403
  min: s = 0,
1400
- disabled: c,
1401
- adornment: a
1404
+ max: d,
1405
+ hideLabel: a = !1,
1406
+ ariaLabel: c,
1407
+ help: g,
1408
+ error: C,
1409
+ testId: y,
1410
+ disabled: u,
1411
+ adornment: h
1402
1412
  }) {
1403
- const d = L(), f = ge(
1404
- () => io(d.locale),
1405
- [d.locale]
1406
- ), v = Q(
1407
- (p) => p === null ? "" : d.formatNumber(p, {
1413
+ const m = P(), p = ge(
1414
+ () => so(m.locale),
1415
+ [m.locale]
1416
+ ), f = Q(
1417
+ (S) => S === null ? "" : m.formatNumber(S, {
1408
1418
  minimumFractionDigits: r,
1409
1419
  maximumFractionDigits: r
1410
1420
  }),
1411
- [d, r]
1412
- ), [b, u] = I(!1), [h, m] = I(() => v(n));
1413
- return B(() => {
1414
- b || m(v(n));
1415
- }, [n, b, v]), /* @__PURE__ */ i(Ve, { label: e, children: /* @__PURE__ */ i(
1416
- fe,
1421
+ [m, r]
1422
+ ), [b, v] = F(!1), [M, O] = F(() => f(n));
1423
+ return V(() => {
1424
+ b || O(f(n));
1425
+ }, [n, b, f]), /* @__PURE__ */ i(ao, { labelHidden: a, children: /* @__PURE__ */ i(Ve, { label: e, help: g, error: C, children: /* @__PURE__ */ i(
1426
+ me,
1417
1427
  {
1418
- disabled: c,
1419
- value: h,
1420
- inputProps: { inputMode: "decimal" },
1428
+ disabled: u,
1429
+ value: M,
1430
+ inputProps: {
1431
+ inputMode: "decimal",
1432
+ "aria-label": c,
1433
+ "data-testid": y
1434
+ },
1421
1435
  onFocus: () => {
1422
- u(!0), n !== null && m(String(n).replace(".", f.decimal));
1436
+ v(!0), n !== null && O(String(n).replace(".", p.decimal));
1423
1437
  },
1424
- onChange: (p) => {
1425
- m(p.target.value);
1426
- const y = Te(p.target.value, f);
1427
- y !== null ? t(y) : p.target.value === "" && t(null);
1438
+ onChange: (S) => {
1439
+ O(S.target.value);
1440
+ const T = Re(S.target.value, p);
1441
+ T !== null ? t(T) : S.target.value === "" && t(null);
1428
1442
  },
1429
1443
  onBlur: () => {
1430
- u(!1);
1431
- let p = Te(h, f);
1432
- p !== null && (p = Number.parseFloat(Math.max(p, s).toFixed(r))), t(p), m(v(p));
1444
+ v(!1);
1445
+ let S = Re(M, p);
1446
+ if (S !== null) {
1447
+ const T = Math.max(S, s);
1448
+ S = Number.parseFloat(
1449
+ (d === void 0 ? T : Math.min(T, d)).toFixed(
1450
+ r
1451
+ )
1452
+ );
1453
+ }
1454
+ t(S), O(f(S));
1433
1455
  },
1434
- endAdornment: a ? /* @__PURE__ */ i(Gn, { position: "end", children: a }) : void 0
1456
+ endAdornment: h ? /* @__PURE__ */ i(Un, { position: "end", children: h }) : void 0
1435
1457
  }
1436
- ) });
1458
+ ) }) });
1437
1459
  }
1438
- const Sr = { l: 0.72, c: 0.12 }, Ir = [
1460
+ const Fr = { l: 0.72, c: 0.12 }, Mr = [
1439
1461
  266,
1440
1462
  296,
1441
1463
  326,
@@ -1461,31 +1483,31 @@ const Sr = { l: 0.72, c: 0.12 }, Ir = [
1461
1483
  "#37bda2",
1462
1484
  "#18b9c9",
1463
1485
  "#4eb0e5"
1464
- ], Fr = "#767676", Mr = rn[6], Or = "#111a2f", Wr = "#5674be", so = /^#?([0-9a-f]{6})$/i, q = (e) => {
1465
- const n = so.exec(e.trim());
1486
+ ], Or = "#767676", Wr = rn[6], Tr = "#111a2f", Rr = "#5674be", lo = /^#?([0-9a-f]{6})$/i, q = (e) => {
1487
+ const n = lo.exec(e.trim());
1466
1488
  return n ? `#${n[1].toLowerCase()}` : null;
1467
- }, ao = l("div")(({ theme: e }) => ({
1489
+ }, co = l("div")(({ theme: e }) => ({
1468
1490
  display: "flex",
1469
1491
  alignItems: "center",
1470
1492
  gap: o(e.design.space[3])
1471
- })), lo = l("span")(({ theme: e }) => ({
1493
+ })), uo = l("span")(({ theme: e }) => ({
1472
1494
  flex: "none",
1473
1495
  width: o(e.design.densityValues[e.design.density].control),
1474
1496
  height: o(e.design.densityValues[e.design.density].control),
1475
1497
  borderRadius: o(e.design.radii.md),
1476
- border: A(e.design.tokens["border.control"])
1477
- })), co = l("div")(({ theme: e }) => ({
1498
+ border: D(e.design.tokens["border.control"])
1499
+ })), po = l("div")(({ theme: e }) => ({
1478
1500
  display: "flex",
1479
1501
  flexWrap: "wrap",
1480
1502
  gap: o(e.design.space[2]),
1481
1503
  marginTop: o(e.design.space[2])
1482
- })), uo = l(Be)(({ theme: e }) => {
1504
+ })), go = l(Be)(({ theme: e }) => {
1483
1505
  const { densityValues: n, density: t, space: r } = e.design, s = n[t].control - r[2];
1484
1506
  return {
1485
1507
  width: o(s),
1486
1508
  height: o(s),
1487
1509
  borderRadius: o(e.design.radii.sm),
1488
- border: A(e.design.tokens["border.control"]),
1510
+ border: D(e.design.tokens["border.control"]),
1489
1511
  // The chosen swatch carries the ring of the design system (`focus.ring` is the accent).
1490
1512
  '&[aria-pressed="true"]': te(e),
1491
1513
  "&.Mui-focusVisible": te(e),
@@ -1495,59 +1517,59 @@ const Sr = { l: 0.72, c: 0.12 }, Ir = [
1495
1517
  }
1496
1518
  };
1497
1519
  });
1498
- function Tr({
1520
+ function Er({
1499
1521
  label: e,
1500
1522
  value: n,
1501
1523
  onChange: t,
1502
1524
  swatches: r = rn
1503
1525
  }) {
1504
- const s = L(), c = D(), [a, d] = I(n), f = a !== "" && q(a) === null;
1505
- B(() => {
1506
- d(
1526
+ const s = P(), d = N(), [a, c] = F(n), g = a !== "" && q(a) === null;
1527
+ V(() => {
1528
+ c(
1507
1529
  (u) => q(u) === q(n) ? u : n
1508
1530
  );
1509
1531
  }, [n]);
1510
- const v = (u) => {
1511
- d(u);
1532
+ const C = (u) => {
1533
+ c(u);
1512
1534
  const h = q(u);
1513
1535
  h !== null && h !== q(n) && t(h);
1514
- }, b = q(n);
1515
- return /* @__PURE__ */ x(le, { fullWidth: !0, error: f, children: [
1516
- /* @__PURE__ */ i(Le, { htmlFor: `${c}-hex`, children: e }),
1517
- /* @__PURE__ */ x(ao, { children: [
1536
+ }, y = q(n);
1537
+ return /* @__PURE__ */ x(le, { fullWidth: !0, error: g, children: [
1538
+ /* @__PURE__ */ i($e, { htmlFor: `${d}-hex`, children: e }),
1539
+ /* @__PURE__ */ x(co, { children: [
1518
1540
  /* @__PURE__ */ i(
1519
- lo,
1541
+ uo,
1520
1542
  {
1521
1543
  "aria-hidden": "true",
1522
- style: { backgroundColor: b ?? void 0 }
1544
+ style: { backgroundColor: y ?? void 0 }
1523
1545
  }
1524
1546
  ),
1525
1547
  /* @__PURE__ */ i(
1526
- fe,
1548
+ me,
1527
1549
  {
1528
- id: `${c}-hex`,
1550
+ id: `${d}-hex`,
1529
1551
  fullWidth: !0,
1530
1552
  value: a,
1531
- error: f,
1553
+ error: g,
1532
1554
  inputProps: {
1533
- "aria-describedby": f ? `${c}-error` : void 0,
1555
+ "aria-describedby": g ? `${d}-error` : void 0,
1534
1556
  spellCheck: !1,
1535
1557
  autoComplete: "off"
1536
1558
  },
1537
- onChange: (u) => v(u.target.value)
1559
+ onChange: (u) => C(u.target.value)
1538
1560
  }
1539
1561
  )
1540
1562
  ] }),
1541
- f && /* @__PURE__ */ i(se, { id: `${c}-error`, children: s.formatMessage({ id: "ds.inputs.color.invalid" }) }),
1563
+ g && /* @__PURE__ */ i(se, { id: `${d}-error`, children: s.formatMessage({ id: "ds.inputs.color.invalid" }) }),
1542
1564
  /* @__PURE__ */ i(
1543
- co,
1565
+ po,
1544
1566
  {
1545
1567
  role: "group",
1546
1568
  "aria-label": s.formatMessage({ id: "ds.inputs.color.swatches" }),
1547
1569
  children: r.map((u) => /* @__PURE__ */ i(
1548
- uo,
1570
+ go,
1549
1571
  {
1550
- "aria-pressed": q(u) === b,
1572
+ "aria-pressed": q(u) === y,
1551
1573
  "aria-label": u,
1552
1574
  style: { backgroundColor: u },
1553
1575
  onClick: () => t(q(u) ?? u)
@@ -1558,16 +1580,16 @@ function Tr({
1558
1580
  )
1559
1581
  ] });
1560
1582
  }
1561
- const po = 6, go = l("div", {
1583
+ const fo = 6, mo = l("div", {
1562
1584
  shouldForwardProp: (e) => e !== "edges"
1563
1585
  })(({ theme: e, edges: n }) => {
1564
- const { tokens: t, radii: r, space: s } = e.design, c = o(s[1] * po), a = t["text.primary"], d = n.start ? `transparent, ${a} ${c}` : a, f = n.end ? `${a} calc(100% - ${c}), transparent` : a;
1586
+ const { tokens: t, radii: r, space: s } = e.design, d = o(s[1] * fo), a = t["text.primary"], c = n.start ? `transparent, ${a} ${d}` : a, g = n.end ? `${a} calc(100% - ${d}), transparent` : a;
1565
1587
  return {
1566
- maskImage: n.start || n.end ? `linear-gradient(to right, ${d}, ${f})` : "none",
1588
+ maskImage: n.start || n.end ? `linear-gradient(to right, ${c}, ${g})` : "none",
1567
1589
  display: "inline-flex",
1568
1590
  maxWidth: "100%",
1569
1591
  minWidth: 0,
1570
- border: A(t["border.subtle"]),
1592
+ border: D(t["border.subtle"]),
1571
1593
  borderRadius: o(r.md),
1572
1594
  overflowX: "auto",
1573
1595
  overflowY: "hidden",
@@ -1586,12 +1608,12 @@ const po = 6, go = l("div", {
1586
1608
  backgroundColor: "transparent"
1587
1609
  }
1588
1610
  };
1589
- }), fo = l(Be)(({ theme: e }) => {
1590
- const { tokens: n, space: t, typeScale: r, fonts: s, densityValues: c, radii: a } = e.design;
1611
+ }), ho = l(Be)(({ theme: e }) => {
1612
+ const { tokens: n, space: t, typeScale: r, fonts: s, densityValues: d, radii: a } = e.design;
1591
1613
  return {
1592
1614
  flex: "none",
1593
1615
  gap: o(t[2]),
1594
- minHeight: o(c[e.design.density].control),
1616
+ minHeight: o(d[e.design.density].control),
1595
1617
  paddingLeft: o(t[3]),
1596
1618
  paddingRight: o(t[3]),
1597
1619
  fontFamily: s.sans,
@@ -1599,57 +1621,57 @@ const po = 6, go = l("div", {
1599
1621
  whiteSpace: "nowrap",
1600
1622
  color: n["text.secondary"],
1601
1623
  transition: oe(e, ["background-color", "color"]),
1602
- "& + &": { borderLeft: A(n["border.subtle"]) },
1624
+ "& + &": { borderLeft: D(n["border.subtle"]) },
1603
1625
  '&[aria-checked="true"]': {
1604
1626
  backgroundColor: n["bg.raised"],
1605
1627
  color: n["text.primary"],
1606
- fontWeight: R.medium
1628
+ fontWeight: A.medium
1607
1629
  },
1608
1630
  "&:hover": { backgroundColor: n["bg.hover"] },
1609
1631
  "&.Mui-focusVisible": { ...te(e), outlineOffset: "-2px" },
1610
1632
  // A short label (« 1 h », « 7 j ») would leave a segment narrower than a finger. Each segment
1611
1633
  // is its own bordered tile once the band wraps.
1612
1634
  [Z.down(K.Tablet)]: {
1613
- minWidth: o(c.touchTarget),
1614
- minHeight: o(c.touchTarget),
1615
- border: A(n["border.subtle"]),
1635
+ minWidth: o(d.touchTarget),
1636
+ minHeight: o(d.touchTarget),
1637
+ border: D(n["border.subtle"]),
1616
1638
  borderRadius: o(a.md),
1617
1639
  backgroundColor: n["bg.surface"],
1618
1640
  '&[aria-checked="true"]': { backgroundColor: n["bg.raised"] }
1619
1641
  }
1620
1642
  };
1621
- }), mo = l("span")(({ theme: e }) => ({
1643
+ }), bo = l("span")(({ theme: e }) => ({
1622
1644
  display: "inline-flex",
1623
1645
  flex: "none",
1624
1646
  "& svg": {
1625
1647
  width: o(e.design.space[4]),
1626
1648
  height: o(e.design.space[4])
1627
1649
  }
1628
- })), ho = l("span")($e), bo = l("span")(({ theme: e }) => ({
1650
+ })), yo = l("span")(fe), vo = l("span")(({ theme: e }) => ({
1629
1651
  fontFamily: e.design.fonts.mono,
1630
1652
  fontSize: o(e.design.typeScale.caption),
1631
1653
  color: e.design.tokens["text.muted"]
1632
1654
  }));
1633
- function Rr({
1655
+ function zr({
1634
1656
  options: e,
1635
1657
  value: n,
1636
1658
  onChange: t,
1637
1659
  ariaLabel: r,
1638
1660
  testId: s
1639
1661
  }) {
1640
- const c = Y(null), [a, d] = I({ start: !1, end: !1 }), f = Q(() => {
1641
- const u = c.current;
1662
+ const d = Y(null), [a, c] = F({ start: !1, end: !1 }), g = Q(() => {
1663
+ const u = d.current;
1642
1664
  if (!u)
1643
1665
  return;
1644
1666
  const h = u.scrollLeft > 0, m = u.scrollLeft + u.clientWidth < u.scrollWidth - 1;
1645
- d(
1646
- (g) => g.start === h && g.end === m ? g : { start: h, end: m }
1667
+ c(
1668
+ (p) => p.start === h && p.end === m ? p : { start: h, end: m }
1647
1669
  );
1648
1670
  }, []);
1649
- B(() => (f(), window.addEventListener("resize", f), () => window.removeEventListener("resize", f)), [f, e]);
1650
- const v = (u) => {
1651
- var g, p;
1652
- const h = e.findIndex((y) => y.value === n);
1671
+ V(() => (g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g)), [g, e]);
1672
+ const C = (u) => {
1673
+ var p, f;
1674
+ const h = e.findIndex((b) => b.value === n);
1653
1675
  let m;
1654
1676
  switch (u.key) {
1655
1677
  case "ArrowRight":
@@ -1669,37 +1691,37 @@ function Rr({
1669
1691
  default:
1670
1692
  return;
1671
1693
  }
1672
- u.preventDefault(), t(e[m].value), (p = (g = c.current) == null ? void 0 : g.querySelectorAll('[role="radio"]')[m]) == null || p.focus();
1673
- }, b = Math.max(
1694
+ u.preventDefault(), t(e[m].value), (f = (p = d.current) == null ? void 0 : p.querySelectorAll('[role="radio"]')[m]) == null || f.focus();
1695
+ }, y = Math.max(
1674
1696
  e.findIndex((u) => u.value === n),
1675
1697
  0
1676
1698
  );
1677
1699
  return /* @__PURE__ */ i(
1678
- go,
1700
+ mo,
1679
1701
  {
1680
- ref: c,
1702
+ ref: d,
1681
1703
  role: "radiogroup",
1682
1704
  "aria-label": r,
1683
1705
  "data-testid": s,
1684
1706
  edges: a,
1685
- onKeyDown: v,
1686
- onScroll: f,
1707
+ onKeyDown: C,
1708
+ onScroll: g,
1687
1709
  children: e.map((u, h) => {
1688
1710
  const m = u.value === n;
1689
1711
  return /* @__PURE__ */ x(
1690
- fo,
1712
+ ho,
1691
1713
  {
1692
1714
  role: "radio",
1693
1715
  "aria-checked": m,
1694
1716
  "aria-label": u.ariaLabel,
1695
1717
  lang: u.lang,
1696
1718
  "data-testid": u.testId,
1697
- tabIndex: h === b ? 0 : -1,
1719
+ tabIndex: h === y ? 0 : -1,
1698
1720
  onClick: () => t(u.value),
1699
1721
  children: [
1700
- u.icon !== void 0 && /* @__PURE__ */ i(mo, { "aria-hidden": !0, children: u.icon }),
1701
- u.icon !== void 0 && u.iconOnly ? /* @__PURE__ */ i(ho, { children: u.label }) : u.label,
1702
- u.count !== void 0 && /* @__PURE__ */ i(bo, { children: u.count })
1722
+ u.icon !== void 0 && /* @__PURE__ */ i(bo, { "aria-hidden": !0, children: u.icon }),
1723
+ u.icon !== void 0 && u.iconOnly ? /* @__PURE__ */ i(yo, { children: u.label }) : u.label,
1724
+ u.count !== void 0 && /* @__PURE__ */ i(vo, { children: u.count })
1703
1725
  ]
1704
1726
  },
1705
1727
  u.value
@@ -1708,31 +1730,31 @@ function Rr({
1708
1730
  }
1709
1731
  );
1710
1732
  }
1711
- const yo = 1, vo = (e, n) => n === "vertical" ? e.scrollHeight - e.clientHeight - e.scrollTop : e.scrollWidth - e.clientWidth - e.scrollLeft, wo = (e, n, t) => {
1712
- const [r, s] = I(!1), c = Q(() => {
1733
+ const wo = 1, xo = (e, n) => n === "vertical" ? e.scrollHeight - e.clientHeight - e.scrollTop : e.scrollWidth - e.clientWidth - e.scrollLeft, Co = (e, n, t) => {
1734
+ const [r, s] = F(!1), d = Q(() => {
1713
1735
  const a = e.current;
1714
- a !== null && s(vo(a, n) > yo);
1736
+ a !== null && s(xo(a, n) > wo);
1715
1737
  }, [e, n]);
1716
- return Ae(c, [c, t]), B(() => {
1738
+ return Le(d, [d, t]), V(() => {
1717
1739
  const a = e.current;
1718
1740
  if (a === null)
1719
1741
  return;
1720
- a.addEventListener("scroll", c, { passive: !0 });
1721
- const d = typeof ResizeObserver > "u" ? null : new ResizeObserver(c);
1722
- return d !== null && (d.observe(a), Array.from(a.children).forEach((f) => d.observe(f))), () => {
1723
- a.removeEventListener("scroll", c), d == null || d.disconnect();
1742
+ a.addEventListener("scroll", d, { passive: !0 });
1743
+ const c = typeof ResizeObserver > "u" ? null : new ResizeObserver(d);
1744
+ return c !== null && (c.observe(a), Array.from(a.children).forEach((g) => c.observe(g))), () => {
1745
+ a.removeEventListener("scroll", d), c == null || c.disconnect();
1724
1746
  };
1725
- }, [e, c, t]), r;
1747
+ }, [e, d, t]), r;
1726
1748
  };
1727
- var xo = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e))(xo || {});
1728
- const Co = 2, ko = /* @__PURE__ */ new Set(["Enter", " "]), So = l("div", {
1749
+ var ko = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e))(ko || {});
1750
+ const So = 2, Io = /* @__PURE__ */ new Set(["Enter", " "]), Fo = l("div", {
1729
1751
  shouldForwardProp: (e) => e !== "variant"
1730
1752
  })(({ theme: e, variant: n }) => ({
1731
1753
  minWidth: 0,
1732
1754
  ...n === "primary" && {
1733
- borderBottom: A(e.design.tokens["border.subtle"])
1755
+ borderBottom: D(e.design.tokens["border.subtle"])
1734
1756
  }
1735
- })), sn = 32, Io = l("div", {
1757
+ })), sn = 32, Mo = l("div", {
1736
1758
  shouldForwardProp: (e) => e !== "variant" && e !== "fade"
1737
1759
  })(({ theme: e, variant: n, fade: t }) => {
1738
1760
  const s = `linear-gradient(to right, ${e.design.tokens["text.primary"]} calc(100% - ${o(
@@ -1749,7 +1771,7 @@ const Co = 2, ko = /* @__PURE__ */ new Set(["Enter", " "]), So = l("div", {
1749
1771
  ...t && { maskImage: s, WebkitMaskImage: s }
1750
1772
  };
1751
1773
  }), an = (e, n) => {
1752
- const { tokens: t, space: r, radii: s, typeScale: c, fonts: a, densityValues: d, density: f } = e.design, v = {
1774
+ const { tokens: t, space: r, radii: s, typeScale: d, fonts: a, densityValues: c, density: g } = e.design, C = {
1753
1775
  position: "relative",
1754
1776
  display: "inline-flex",
1755
1777
  alignItems: "center",
@@ -1768,187 +1790,187 @@ const Co = 2, ko = /* @__PURE__ */ new Set(["Enter", " "]), So = l("div", {
1768
1790
  "&:hover": { color: t["text.primary"] },
1769
1791
  '&[aria-selected="true"]': {
1770
1792
  color: t["text.primary"],
1771
- fontWeight: R.medium
1793
+ fontWeight: A.medium
1772
1794
  },
1773
1795
  // Inside the scrolling row, an outer ring would be clipped: it is drawn inside the tab.
1774
1796
  "&:focus-visible": { ...te(e), outlineOffset: "-2px" }
1775
- }, b = {
1797
+ }, y = {
1776
1798
  [Z.down(K.Tablet)]: {
1777
- minHeight: o(d.touchTarget)
1799
+ minHeight: o(c.touchTarget)
1778
1800
  }
1779
1801
  };
1780
1802
  return n === "primary" ? {
1781
- ...v,
1782
- minHeight: o(d[f].control + r[2]),
1803
+ ...C,
1804
+ minHeight: o(c[g].control + r[2]),
1783
1805
  padding: `0 ${o(r[3])}`,
1784
- fontSize: o(c.body),
1806
+ fontSize: o(d.body),
1785
1807
  '&[aria-selected="true"]::after': {
1786
1808
  content: '""',
1787
1809
  position: "absolute",
1788
1810
  left: 0,
1789
1811
  right: 0,
1790
1812
  bottom: 0,
1791
- height: o(Co),
1813
+ height: o(So),
1792
1814
  backgroundColor: t.accent
1793
1815
  },
1794
- ...b
1816
+ ...y
1795
1817
  } : {
1796
- ...v,
1797
- minHeight: o(d.compact.control),
1818
+ ...C,
1819
+ minHeight: o(c.compact.control),
1798
1820
  padding: `0 ${o(r[3])}`,
1799
1821
  borderRadius: o(s.md),
1800
- fontSize: o(c.small),
1822
+ fontSize: o(d.small),
1801
1823
  "&:hover": {
1802
1824
  color: t["text.primary"],
1803
1825
  backgroundColor: t["bg.hover"]
1804
1826
  },
1805
1827
  '&[aria-selected="true"]': {
1806
1828
  color: t["text.primary"],
1807
- fontWeight: R.medium,
1829
+ fontWeight: A.medium,
1808
1830
  backgroundColor: t["bg.raised"]
1809
1831
  },
1810
- ...b
1832
+ ...y
1811
1833
  };
1812
- }, ln = (e) => e !== "variant", Fo = l(Kn, { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), Mo = l("button", { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), Oo = l("span")(({ theme: e }) => {
1813
- const { tokens: n, space: t, radii: r, fonts: s, typeScale: c } = e.design;
1834
+ }, ln = (e) => e !== "variant", Oo = l(Yn, { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), Wo = l("button", { shouldForwardProp: ln })(({ theme: e, variant: n }) => an(e, n)), To = l("span")(({ theme: e }) => {
1835
+ const { tokens: n, space: t, radii: r, fonts: s, typeScale: d } = e.design;
1814
1836
  return {
1815
1837
  display: "inline-flex",
1816
1838
  alignItems: "center",
1817
1839
  padding: `0 ${o(t[1])}`,
1818
1840
  borderRadius: o(r.sm),
1819
- border: A(n["border.subtle"]),
1841
+ border: D(n["border.subtle"]),
1820
1842
  fontFamily: s.mono,
1821
- fontSize: o(c.caption),
1822
- fontWeight: R.regular,
1843
+ fontSize: o(d.caption),
1844
+ fontWeight: A.regular,
1823
1845
  lineHeight: 1.6,
1824
1846
  color: n["text.muted"]
1825
1847
  };
1826
- }), Re = (e, n) => {
1848
+ }), Ee = (e, n) => {
1827
1849
  const t = n.offsetLeft, r = t + n.offsetWidth + sn;
1828
1850
  t < e.scrollLeft ? e.scrollLeft = t : r > e.scrollLeft + e.clientWidth && (e.scrollLeft = r - e.clientWidth);
1829
1851
  };
1830
- function Er({
1852
+ function Ar({
1831
1853
  items: e,
1832
1854
  value: n,
1833
1855
  onChange: t,
1834
1856
  variant: r,
1835
1857
  "aria-label": s
1836
1858
  }) {
1837
- const c = L(), a = Y(null), d = e.filter((g) => g.hidden !== !0), f = wo(a, "horizontal", d.length), v = Q(
1859
+ const d = P(), a = Y(null), c = e.filter((p) => p.hidden !== !0), g = Co(a, "horizontal", c.length), C = Q(
1838
1860
  () => {
1839
- var g;
1861
+ var p;
1840
1862
  return Array.from(
1841
- ((g = a.current) == null ? void 0 : g.querySelectorAll('[role="tab"]')) ?? []
1863
+ ((p = a.current) == null ? void 0 : p.querySelectorAll('[role="tab"]')) ?? []
1842
1864
  );
1843
1865
  },
1844
1866
  []
1845
- ), b = Q(() => {
1846
- const g = a.current, p = g == null ? void 0 : g.querySelector('[aria-selected="true"]');
1847
- g && p && Re(g, p);
1867
+ ), y = Q(() => {
1868
+ const p = a.current, f = p == null ? void 0 : p.querySelector('[aria-selected="true"]');
1869
+ p && f && Ee(p, f);
1848
1870
  }, []);
1849
- Ae(b, [b, n]);
1850
- const u = d.map((g) => g.value).join("|");
1851
- B(() => {
1852
- const g = a.current;
1853
- if (g === null || typeof ResizeObserver > "u")
1871
+ Le(y, [y, n]);
1872
+ const u = c.map((p) => p.value).join("|");
1873
+ V(() => {
1874
+ const p = a.current;
1875
+ if (p === null || typeof ResizeObserver > "u")
1854
1876
  return;
1855
- const p = new ResizeObserver(b);
1856
- return p.observe(g), Array.from(g.children).forEach((y) => p.observe(y)), () => p.disconnect();
1857
- }, [b, u]);
1858
- const h = (g) => {
1859
- const p = v(), y = p.findIndex((F) => F === document.activeElement);
1860
- if (y < 0)
1877
+ const f = new ResizeObserver(y);
1878
+ return f.observe(p), Array.from(p.children).forEach((b) => f.observe(b)), () => f.disconnect();
1879
+ }, [y, u]);
1880
+ const h = (p) => {
1881
+ const f = C(), b = f.findIndex((M) => M === document.activeElement);
1882
+ if (b < 0)
1861
1883
  return;
1862
- if (ko.has(g.key)) {
1863
- g.key === " " && p[y] instanceof HTMLAnchorElement && (g.preventDefault(), p[y].click());
1884
+ if (Io.has(p.key)) {
1885
+ p.key === " " && f[b] instanceof HTMLAnchorElement && (p.preventDefault(), f[b].click());
1864
1886
  return;
1865
1887
  }
1866
- let C;
1867
- switch (g.key) {
1888
+ let v;
1889
+ switch (p.key) {
1868
1890
  case "ArrowRight":
1869
- C = (y + 1) % p.length;
1891
+ v = (b + 1) % f.length;
1870
1892
  break;
1871
1893
  case "ArrowLeft":
1872
- C = (y - 1 + p.length) % p.length;
1894
+ v = (b - 1 + f.length) % f.length;
1873
1895
  break;
1874
1896
  case "Home":
1875
- C = 0;
1897
+ v = 0;
1876
1898
  break;
1877
1899
  case "End":
1878
- C = p.length - 1;
1900
+ v = f.length - 1;
1879
1901
  break;
1880
1902
  default:
1881
1903
  return;
1882
1904
  }
1883
- g.preventDefault(), p[C].focus(), a.current && Re(a.current, p[C]);
1905
+ p.preventDefault(), f[v].focus(), a.current && Ee(a.current, f[v]);
1884
1906
  }, m = Math.max(
1885
- d.findIndex((g) => g.value === n),
1907
+ c.findIndex((p) => p.value === n),
1886
1908
  0
1887
1909
  );
1888
- return /* @__PURE__ */ i(So, { variant: r, children: /* @__PURE__ */ i(
1889
- Io,
1910
+ return /* @__PURE__ */ i(Fo, { variant: r, children: /* @__PURE__ */ i(
1911
+ Mo,
1890
1912
  {
1891
1913
  ref: a,
1892
1914
  role: "tablist",
1893
1915
  "aria-label": s,
1894
1916
  variant: r,
1895
- fade: f,
1896
- "data-overflowing": f || void 0,
1917
+ fade: g,
1918
+ "data-overflowing": g || void 0,
1897
1919
  onKeyDown: h,
1898
- children: d.map((g, p) => {
1899
- const y = g.value === n, C = /* @__PURE__ */ x(J, { children: [
1900
- g.label,
1901
- g.badge !== void 0 && /* @__PURE__ */ i(Oo, { children: typeof g.badge == "number" ? c.formatNumber(g.badge) : g.badge })
1902
- ] }), F = {
1920
+ children: c.map((p, f) => {
1921
+ const b = p.value === n, v = /* @__PURE__ */ x(J, { children: [
1922
+ p.label,
1923
+ p.badge !== void 0 && /* @__PURE__ */ i(To, { children: typeof p.badge == "number" ? d.formatNumber(p.badge) : p.badge })
1924
+ ] }), M = {
1903
1925
  role: "tab",
1904
- "aria-selected": y,
1905
- tabIndex: p === m ? 0 : -1,
1906
- "data-testid": g.testId,
1926
+ "aria-selected": b,
1927
+ tabIndex: f === m ? 0 : -1,
1928
+ "data-testid": p.testId,
1907
1929
  variant: r,
1908
- onClick: () => t == null ? void 0 : t(g.value)
1930
+ onClick: () => t == null ? void 0 : t(p.value)
1909
1931
  };
1910
- return g.to !== void 0 ? /* @__PURE__ */ i(
1911
- Fo,
1932
+ return p.to !== void 0 ? /* @__PURE__ */ i(
1933
+ Oo,
1912
1934
  {
1913
- to: g.to,
1914
- "aria-current": y ? "page" : void 0,
1915
- ...F,
1916
- children: C
1935
+ to: p.to,
1936
+ "aria-current": b ? "page" : void 0,
1937
+ ...M,
1938
+ children: v
1917
1939
  },
1918
- g.value
1919
- ) : /* @__PURE__ */ i(Mo, { type: "button", ...F, children: C }, g.value);
1940
+ p.value
1941
+ ) : /* @__PURE__ */ i(Wo, { type: "button", ...M, children: v }, p.value);
1920
1942
  })
1921
1943
  }
1922
1944
  ) });
1923
1945
  }
1924
1946
  export {
1925
- Cr as A,
1926
- rt as C,
1927
- vr as D,
1947
+ Sr as A,
1948
+ it as C,
1949
+ xr as D,
1928
1950
  Ve as F,
1929
- Wt as I,
1930
- kr as N,
1931
- yr as R,
1932
- Rr as S,
1933
- xo as T,
1951
+ Tt as I,
1952
+ Ir as N,
1953
+ wr as R,
1954
+ zr as S,
1955
+ ko as T,
1934
1956
  je as a,
1935
- Tt as b,
1957
+ Rt as b,
1936
1958
  nn as c,
1937
- Kt as d,
1938
- Zt as e,
1939
- wo as f,
1940
- Ot as g,
1941
- Tr as h,
1942
- Jt as i,
1943
- wr as j,
1944
- Er as k,
1945
- Sr as l,
1946
- Ir as m,
1959
+ Yt as d,
1960
+ Jt as e,
1961
+ Co as f,
1962
+ Wt as g,
1963
+ Er as h,
1964
+ eo as i,
1965
+ Cr as j,
1966
+ Ar as k,
1967
+ Fr as l,
1968
+ Mr as m,
1947
1969
  q as n,
1948
1970
  rn as o,
1949
- Fr as p,
1950
- Mr as q,
1951
- Or as r,
1952
- Wr as s,
1953
- xr as u
1971
+ Or as p,
1972
+ Wr as q,
1973
+ Tr as r,
1974
+ Rr as s,
1975
+ kr as u
1954
1976
  };