@australiangreens/ag-internal-components 0.5.0 → 0.6.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.
package/dist/esm/index.js CHANGED
@@ -1,150 +1,150 @@
1
- var ut = Object.defineProperty, pt = Object.defineProperties;
2
- var ht = Object.getOwnPropertyDescriptors;
1
+ var bt = Object.defineProperty, Et = Object.defineProperties;
2
+ var kt = Object.getOwnPropertyDescriptors;
3
3
  var ie = Object.getOwnPropertySymbols;
4
- var Ae = Object.prototype.hasOwnProperty, Se = Object.prototype.propertyIsEnumerable;
5
- var le = (e, t, o) => t in e ? ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, l = (e, t) => {
4
+ var Ee = Object.prototype.hasOwnProperty, ke = Object.prototype.propertyIsEnumerable;
5
+ var ce = (e, t, o) => t in e ? bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, l = (e, t) => {
6
6
  for (var o in t || (t = {}))
7
- Ae.call(t, o) && le(e, o, t[o]);
7
+ Ee.call(t, o) && ce(e, o, t[o]);
8
8
  if (ie)
9
9
  for (var o of ie(t))
10
- Se.call(t, o) && le(e, o, t[o]);
10
+ ke.call(t, o) && ce(e, o, t[o]);
11
11
  return e;
12
- }, k = (e, t) => pt(e, ht(t));
12
+ }, _ = (e, t) => Et(e, kt(t));
13
13
  var Z = (e, t) => {
14
14
  var o = {};
15
- for (var n in e)
16
- Ae.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
15
+ for (var i in e)
16
+ Ee.call(e, i) && t.indexOf(i) < 0 && (o[i] = e[i]);
17
17
  if (e != null && ie)
18
- for (var n of ie(e))
19
- t.indexOf(n) < 0 && Se.call(e, n) && (o[n] = e[n]);
18
+ for (var i of ie(e))
19
+ t.indexOf(i) < 0 && ke.call(e, i) && (o[i] = e[i]);
20
20
  return o;
21
21
  };
22
- var Ce = (e, t, o) => le(e, typeof t != "symbol" ? t + "" : t, o);
23
- var R = (e, t, o) => new Promise((n, r) => {
24
- var s = (d) => {
22
+ var _e = (e, t, o) => ce(e, typeof t != "symbol" ? t + "" : t, o);
23
+ var M = (e, t, o) => new Promise((i, r) => {
24
+ var s = (c) => {
25
25
  try {
26
- a(o.next(d));
26
+ a(o.next(c));
27
27
  } catch (u) {
28
28
  r(u);
29
29
  }
30
- }, c = (d) => {
30
+ }, d = (c) => {
31
31
  try {
32
- a(o.throw(d));
32
+ a(o.throw(c));
33
33
  } catch (u) {
34
34
  r(u);
35
35
  }
36
- }, a = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(s, c);
36
+ }, a = (c) => c.done ? i(c.value) : Promise.resolve(c.value).then(s, d);
37
37
  a((o = o.apply(e, t)).next());
38
38
  });
39
- import { jsxs as x, Fragment as M, jsx as i } from "react/jsx-runtime";
40
- import { useState as q, createElement as ue, useEffect as ve, useMemo as ft, createContext as mt, useRef as ce, useCallback as we, useContext as gt } from "react";
41
- import { Typography as I, Button as Q, Paper as We, Dialog as qe, LinearProgress as ze, DialogTitle as Ve, DialogContent as Ye, DialogActions as Ke, Autocomplete as fe, TextField as me, CircularProgress as se, Box as N, Chip as xt, Tooltip as Xe, Stack as At, useTheme as te, useMediaQuery as St, ListItemButton as ye, ListItemIcon as Ct, Fade as Qe, ListItemText as De, ListItemSecondaryAction as vt, Collapse as Je, List as wt, Skeleton as pe, Snackbar as yt, Alert as Dt, FormHelperText as bt, Drawer as Et, Avatar as be, Toolbar as kt, Divider as Ee, Container as Ft, IconButton as _t } from "@mui/material";
42
- import { Cancel as Tt, ArrowDropDown as Pt, ExpandLess as Nt, ExpandMore as Ot, ViewHeadline as Lt } from "@mui/icons-material";
43
- import { useQuery as Ze } from "@tanstack/react-query";
44
- import It from "autosuggest-highlight/match";
45
- import Mt from "autosuggest-highlight/parse";
46
- import { useAuth0 as ge } from "@auth0/auth0-react";
47
- import { Buffer as Rt } from "buffer";
48
- import $t from "@mui/material/Skeleton";
49
- import { atom as G, useAtom as V, useSetAtom as je, useAtomValue as ke } from "jotai";
50
- import { useLocation as Bt, Link as Fe } from "react-router";
51
- import _e from "@mui/material/Stack";
52
- import { DataGrid as Ht } from "@mui/x-data-grid";
53
- import { createHelper as Gt } from "souvlaki";
54
- import Ut from "@mui/material/CssBaseline";
55
- import Te from "@mui/material/Box";
56
- import { useHydrateAtoms as Wt } from "jotai/utils";
57
- import { styled as et, createTheme as tt, alpha as de } from "@mui/material/styles";
58
- import Pe from "react-avatar";
59
- function ln({ text: e }) {
60
- const [t, o] = q(0);
61
- return /* @__PURE__ */ x(M, { children: [
62
- /* @__PURE__ */ i(I, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
63
- /* @__PURE__ */ i(I, { variant: "caption", display: "block", children: /* @__PURE__ */ i("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
64
- /* @__PURE__ */ i(
65
- Q,
39
+ import { jsxs as x, Fragment as I, jsx as n } from "react/jsx-runtime";
40
+ import { useState as z, createElement as pe, useEffect as Fe, useMemo as _t, createContext as Ft, useRef as de, useCallback as Te, useContext as Tt } from "react";
41
+ import { Typography as L, Button as J, Paper as Je, Dialog as Ze, LinearProgress as je, DialogTitle as et, DialogContent as tt, DialogActions as ot, Autocomplete as me, TextField as ge, CircularProgress as se, Box as N, Chip as Pt, Tooltip as nt, Stack as Nt, useTheme as te, useMediaQuery as Ot, ListItemButton as Pe, ListItemIcon as Lt, Fade as it, ListItemText as Ne, ListItemSecondaryAction as It, Collapse as rt, List as Mt, Skeleton as he, Snackbar as Rt, Alert as $t, FormHelperText as Bt, Drawer as Ht, Avatar as Oe, Toolbar as Gt, Divider as Le, Container as Ut, IconButton as Wt } from "@mui/material";
42
+ import { Cancel as zt, ArrowDropDown as qt, ExpandLess as Vt, ExpandMore as Kt, ViewHeadline as Yt } from "@mui/icons-material";
43
+ import { useQuery as at } from "@tanstack/react-query";
44
+ import Xt from "autosuggest-highlight/match";
45
+ import Qt from "autosuggest-highlight/parse";
46
+ import { useAuth0 as xe } from "@auth0/auth0-react";
47
+ import { Buffer as Jt } from "buffer";
48
+ import Zt from "@mui/material/Skeleton";
49
+ import { atom as G, useAtom as V, useSetAtom as st, useAtomValue as Ie } from "jotai";
50
+ import { useLocation as jt, Link as Me } from "react-router";
51
+ import Re from "@mui/material/Stack";
52
+ import { DataGrid as eo } from "@mui/x-data-grid";
53
+ import { createHelper as to } from "souvlaki";
54
+ import oo from "@mui/material/CssBaseline";
55
+ import $e from "@mui/material/Box";
56
+ import { useHydrateAtoms as no } from "jotai/utils";
57
+ import { styled as lt, createTheme as ct, alpha as ue } from "@mui/material/styles";
58
+ import Be from "react-avatar";
59
+ function wn({ text: e }) {
60
+ const [t, o] = z(0);
61
+ return /* @__PURE__ */ x(I, { children: [
62
+ /* @__PURE__ */ n(L, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
63
+ /* @__PURE__ */ n(L, { variant: "caption", display: "block", children: /* @__PURE__ */ n("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
64
+ /* @__PURE__ */ n(
65
+ J,
66
66
  {
67
67
  variant: "outlined",
68
- onClick: () => o((n) => n + 1),
68
+ onClick: () => o((i) => i + 1),
69
69
  "aria-label": "Increment",
70
70
  children: "Hello I am a button"
71
71
  }
72
72
  ),
73
73
  /* @__PURE__ */ x("p", { children: [
74
74
  "This is some text: ",
75
- /* @__PURE__ */ i("span", { children: e })
75
+ /* @__PURE__ */ n("span", { children: e })
76
76
  ] }),
77
- /* @__PURE__ */ x(We, { children: [
77
+ /* @__PURE__ */ x(Je, { children: [
78
78
  "This number will incremember when button pressed: ",
79
79
  t
80
80
  ] })
81
81
  ] });
82
82
  }
83
- const ot = ({
83
+ const dt = ({
84
84
  isOpen: e,
85
85
  dialogTitle: t,
86
86
  children: o,
87
- maxWidth: n,
87
+ maxWidth: i,
88
88
  primaryButton: r,
89
89
  secondaryButton: s,
90
- additionalButtons: c,
90
+ additionalButtons: d,
91
91
  onClose: a,
92
- sx: d,
92
+ sx: c,
93
93
  "data-testid": u,
94
94
  disableCloseOnBackdropOrEscape: m = !1,
95
95
  isLoading: h = !1
96
96
  }) => {
97
- var S, v;
98
- const [C, g] = q(!1);
97
+ var y, A;
98
+ const [v, g] = z(!1);
99
99
  return /* @__PURE__ */ x(
100
- qe,
100
+ Ze,
101
101
  {
102
102
  open: e,
103
- onClose: (f, w) => R(null, null, function* () {
104
- m && (w === "backdropClick" || w === "escapeKeyDown") || C || (s != null && s.onClick ? yield s.onClick() : a());
103
+ onClose: (f, b) => M(null, null, function* () {
104
+ m && (b === "backdropClick" || b === "escapeKeyDown") || v || (s != null && s.onClick ? yield s.onClick() : a());
105
105
  }),
106
106
  fullWidth: !0,
107
- maxWidth: n != null ? n : "xs",
107
+ maxWidth: i != null ? i : "xs",
108
108
  "data-testid": u,
109
- sx: d,
109
+ sx: c,
110
110
  children: [
111
- h && /* @__PURE__ */ i(ze, { sx: { height: "4px", marginBottom: "-4px" } }),
112
- /* @__PURE__ */ i(Ve, { children: t }),
113
- /* @__PURE__ */ i(Ye, { sx: { "& > :last-child": { marginBottom: 0 } }, children: o }),
114
- /* @__PURE__ */ x(Ke, { children: [
115
- /* @__PURE__ */ i(
116
- Q,
111
+ h && /* @__PURE__ */ n(je, { sx: { height: "4px", marginBottom: "-4px" } }),
112
+ /* @__PURE__ */ n(et, { children: t }),
113
+ /* @__PURE__ */ n(tt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: o }),
114
+ /* @__PURE__ */ x(ot, { children: [
115
+ /* @__PURE__ */ n(
116
+ J,
117
117
  {
118
- onClick: (S = s == null ? void 0 : s.onClick) != null ? S : a,
118
+ onClick: (y = s == null ? void 0 : s.onClick) != null ? y : a,
119
119
  "data-testid": s == null ? void 0 : s.testId,
120
- disabled: (s == null ? void 0 : s.disabled) || C,
120
+ disabled: (s == null ? void 0 : s.disabled) || v,
121
121
  color: s == null ? void 0 : s.buttonColor,
122
- children: (v = s == null ? void 0 : s.text) != null ? v : "Cancel"
122
+ children: (A = s == null ? void 0 : s.text) != null ? A : "Cancel"
123
123
  }
124
124
  ),
125
- c && c.map((f, w) => {
126
- var F;
127
- return /* @__PURE__ */ i(
128
- Q,
125
+ d && d.map((f, b) => {
126
+ var D;
127
+ return /* @__PURE__ */ n(
128
+ J,
129
129
  {
130
130
  onClick: f == null ? void 0 : f.onClick,
131
131
  "data-testid": f == null ? void 0 : f.testId,
132
- disabled: (f == null ? void 0 : f.disabled) || C,
132
+ disabled: (f == null ? void 0 : f.disabled) || v,
133
133
  color: f == null ? void 0 : f.buttonColor,
134
- children: (F = f.text) != null ? F : `Button ${w}`
134
+ children: (D = f.text) != null ? D : `Button ${b}`
135
135
  },
136
- w
136
+ b
137
137
  );
138
138
  }),
139
- r && /* @__PURE__ */ i(
140
- Q,
139
+ r && /* @__PURE__ */ n(
140
+ J,
141
141
  {
142
- onClick: () => R(null, null, function* () {
142
+ onClick: () => M(null, null, function* () {
143
143
  var f;
144
144
  g(!0), yield (f = r.onClick) == null ? void 0 : f.call(r), g(!1);
145
145
  }),
146
146
  "data-testid": r.testId,
147
- disabled: r.disabled || C,
147
+ disabled: r.disabled || v,
148
148
  color: r == null ? void 0 : r.buttonColor,
149
149
  children: r.text
150
150
  }
@@ -153,7 +153,7 @@ const ot = ({
153
153
  ]
154
154
  }
155
155
  );
156
- }, qt = {
156
+ }, io = {
157
157
  popper: {
158
158
  modifiers: [
159
159
  {
@@ -164,179 +164,179 @@ const ot = ({
164
164
  }
165
165
  ]
166
166
  }
167
- }, nt = {
167
+ }, ut = {
168
168
  right: 2
169
- }, it = ({
169
+ }, pt = ({
170
170
  minLength: e,
171
171
  preLoadedOptions: t,
172
172
  lookup: o,
173
- label: n,
173
+ label: i,
174
174
  inputValue: r
175
- }) => Ze({
175
+ }) => at({
176
176
  queryFn: () => e && r.length < e ? t != null ? t : [] : t ? t.filter(
177
177
  (s) => s.label.toLowerCase().includes(r.toLowerCase())
178
178
  ) : o(r),
179
- queryKey: ["autocomplete", n, r]
179
+ queryKey: ["autocomplete", i, r]
180
180
  });
181
- function cn({
182
- lookup: e = () => R(null, null, function* () {
181
+ function bn({
182
+ lookup: e = () => M(null, null, function* () {
183
183
  }),
184
184
  enableHighlighting: t = !0,
185
185
  onChange: o,
186
- onInputChange: n,
186
+ onInputChange: i,
187
187
  minLength: r = 0,
188
188
  label: s,
189
- value: c,
189
+ value: d,
190
190
  "data-testid": a,
191
- sx: d,
191
+ sx: c,
192
192
  boxSx: u,
193
193
  textFieldColor: m,
194
194
  textFieldVariant: h = "filled",
195
- textFieldFocused: C,
195
+ textFieldFocused: v,
196
196
  textFieldSx: g,
197
- loadingText: S = "Loading...",
198
- noOptionsText: v = "No options",
199
- popupIcon: f = /* @__PURE__ */ i(Pt, {}),
200
- error: w = !1,
201
- helperText: F = "",
202
- preLoadedOptions: _ = void 0,
203
- disablePortal: U = !1,
204
- disableIconFlip: y = !1,
205
- chipToolTipSlotProps: T = qt,
197
+ loadingText: y = "Loading...",
198
+ noOptionsText: A = "No options",
199
+ popupIcon: f = /* @__PURE__ */ n(qt, {}),
200
+ error: b = !1,
201
+ helperText: D = "",
202
+ preLoadedOptions: F = void 0,
203
+ disablePortal: R = !1,
204
+ disableIconFlip: k = !1,
205
+ chipToolTipSlotProps: P = io,
206
206
  placeholderText: $ = void 0,
207
- onRightClick: z = () => {
207
+ onRightClick: K = () => {
208
208
  },
209
209
  disableDefaultRightClickBehaviour: B = !1,
210
- readOnly: L,
211
- hideInputEndAdornment: D
210
+ readOnly: H,
211
+ hideInputEndAdornment: E
212
212
  }) {
213
- const [b, H] = q(""), Y = (p, E) => {
214
- const O = c.filter((K) => K.id !== E);
213
+ const [S, U] = z(""), Y = (p, w) => {
214
+ const O = d.filter((X) => X.id !== w);
215
215
  o(O, "delete", p);
216
- }, { data: A, isLoading: P } = it({
217
- inputValue: b,
216
+ }, { data: C, isLoading: T } = pt({
217
+ inputValue: S,
218
218
  label: s,
219
219
  lookup: e,
220
220
  minLength: r,
221
- preLoadedOptions: _
222
- }), W = b.length >= r;
221
+ preLoadedOptions: F
222
+ }), W = S.length >= r;
223
223
  return /* @__PURE__ */ x("div", { "data-testid": a, children: [
224
- /* @__PURE__ */ i(
225
- fe,
224
+ /* @__PURE__ */ n(
225
+ me,
226
226
  {
227
- sx: l(l({}, d), y ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
227
+ sx: l(l({}, c), k ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
228
228
  "data-testid": a ? `${a}:Autocomplete` : void 0,
229
- disablePortal: U,
229
+ disablePortal: R,
230
230
  multiple: !0,
231
231
  getOptionLabel: (p) => typeof p == "string" ? p : p.label,
232
- loading: W ? P : !1,
233
- options: [...c, ...A != null ? A : []],
232
+ loading: W ? T : !1,
233
+ options: [...d, ...C != null ? C : []],
234
234
  filterSelectedOptions: !0,
235
235
  includeInputInList: !0,
236
- value: c,
237
- onChange: (p, E, O) => {
238
- o(E, O, p);
236
+ value: d,
237
+ onChange: (p, w, O) => {
238
+ o(w, O, p);
239
239
  },
240
- onInputChange: (p, E, O) => {
241
- H(E), n && n(c, O, p);
240
+ onInputChange: (p, w, O) => {
241
+ U(w), i && i(d, O, p);
242
242
  },
243
- noOptionsText: W ? v : "Start typing to search",
244
- loadingText: S,
243
+ noOptionsText: W ? A : "Start typing to search",
244
+ loadingText: y,
245
245
  popupIcon: f,
246
- renderInput: (p) => /* @__PURE__ */ i(
247
- me,
248
- k(l({}, p), {
246
+ renderInput: (p) => /* @__PURE__ */ n(
247
+ ge,
248
+ _(l({}, p), {
249
249
  label: s,
250
250
  fullWidth: !0,
251
251
  variant: h,
252
- error: w,
253
- helperText: F,
252
+ error: b,
253
+ helperText: D,
254
254
  autoComplete: "off",
255
255
  slotProps: {
256
- input: k(l({}, p.InputProps), {
257
- endAdornment: D ? void 0 : /* @__PURE__ */ x(M, { children: [
258
- P ? /* @__PURE__ */ i(se, { color: "inherit", size: 20 }) : null,
256
+ input: _(l({}, p.InputProps), {
257
+ endAdornment: E ? void 0 : /* @__PURE__ */ x(I, { children: [
258
+ T ? /* @__PURE__ */ n(se, { color: "inherit", size: 20 }) : null,
259
259
  p.InputProps.endAdornment
260
260
  ] })
261
261
  })
262
262
  },
263
263
  "data-testid": a ? `${a}:Autocomplete:TextField` : void 0,
264
- onKeyDown: (E) => {
265
- (E.key === "Backspace" || E.key === "Delete") && E.stopPropagation();
264
+ onKeyDown: (w) => {
265
+ (w.key === "Backspace" || w.key === "Delete") && w.stopPropagation();
266
266
  },
267
267
  color: m,
268
268
  placeholder: $,
269
269
  sx: g,
270
- focused: C
270
+ focused: v
271
271
  })
272
272
  ),
273
273
  renderValue: () => null,
274
- isOptionEqualToValue: (p, E) => p.id === E.id,
275
- renderOption: (p, E, O) => {
274
+ isOptionEqualToValue: (p, w) => p.id === w.id,
275
+ renderOption: (p, w, O) => {
276
276
  if (t) {
277
- const K = It(E.label, O.inputValue, {
277
+ const X = Xt(w.label, O.inputValue, {
278
278
  insideWords: !0,
279
279
  findAllOccurrences: !0
280
- }), oe = Mt(E.label, K);
281
- return /* @__PURE__ */ ue(
280
+ }), oe = Qt(w.label, X);
281
+ return /* @__PURE__ */ pe(
282
282
  "li",
283
- k(l({}, p), {
284
- key: E.id,
285
- "data-testid": a ? `${a}:Autocomplete:option(${E.id.toString()})` : void 0
283
+ _(l({}, p), {
284
+ key: w.id,
285
+ "data-testid": a ? `${a}:Autocomplete:option(${w.id.toString()})` : void 0
286
286
  }),
287
- /* @__PURE__ */ i("div", { children: oe.map((J, ne) => /* @__PURE__ */ i(
287
+ /* @__PURE__ */ n("div", { children: oe.map((q, le) => /* @__PURE__ */ n(
288
288
  "span",
289
289
  {
290
290
  style: {
291
- fontWeight: J.highlight ? 700 : 400
291
+ fontWeight: q.highlight ? 700 : 400
292
292
  },
293
- children: J.text
293
+ children: q.text
294
294
  },
295
- ne
295
+ le
296
296
  )) })
297
297
  );
298
298
  } else
299
- return /* @__PURE__ */ ue(
299
+ return /* @__PURE__ */ pe(
300
300
  "li",
301
- k(l({}, p), {
302
- key: E.id,
303
- "data-testid": a ? `${a}:option(${E.id.toString()})` : void 0
301
+ _(l({}, p), {
302
+ key: w.id,
303
+ "data-testid": a ? `${a}:option(${w.id.toString()})` : void 0
304
304
  }),
305
- E.label
305
+ w.label
306
306
  );
307
307
  },
308
308
  onMouseDownCapture: (p) => {
309
- p.button === nt.right && B && (p.preventDefault(), p.stopPropagation());
309
+ p.button === ut.right && B && (p.preventDefault(), p.stopPropagation());
310
310
  },
311
311
  onContextMenuCapture: (p) => {
312
- B && (p.preventDefault(), p.stopPropagation()), z(p);
312
+ B && (p.preventDefault(), p.stopPropagation()), K(p);
313
313
  },
314
- readOnly: L
314
+ readOnly: H
315
315
  }
316
316
  ),
317
- c.length > 0 && /* @__PURE__ */ i(N, { sx: u, children: c.map((p) => {
318
- var E;
319
- return /* @__PURE__ */ i(
320
- xt,
317
+ d.length > 0 && /* @__PURE__ */ n(N, { sx: u, children: d.map((p) => {
318
+ var w;
319
+ return /* @__PURE__ */ n(
320
+ Pt,
321
321
  {
322
322
  sx: {
323
323
  marginTop: 1,
324
324
  marginRight: 1,
325
325
  height: "auto"
326
326
  },
327
- label: /* @__PURE__ */ i(
328
- Xe,
327
+ label: /* @__PURE__ */ n(
328
+ nt,
329
329
  {
330
- title: (E = p.tooltipContent) != null ? E : "",
330
+ title: (w = p.tooltipContent) != null ? w : "",
331
331
  placement: "bottom-start",
332
- slotProps: T,
333
- children: /* @__PURE__ */ i(I, { style: { whiteSpace: "normal" }, children: p.chipLabel ? p.chipLabel : p.label })
332
+ slotProps: P,
333
+ children: /* @__PURE__ */ n(L, { style: { whiteSpace: "normal" }, children: p.chipLabel ? p.chipLabel : p.label })
334
334
  }
335
335
  ),
336
336
  "data-testid": a ? `${a}:Chip(${p.id.toString()})` : void 0,
337
337
  onDelete: (O) => Y(O, p.id),
338
- deleteIcon: /* @__PURE__ */ i(
339
- Tt,
338
+ deleteIcon: /* @__PURE__ */ n(
339
+ zt,
340
340
  {
341
341
  "data-testid": a ? `${a}:Chip(${p.id.toString()}):deleteIcon` : void 0
342
342
  }
@@ -347,140 +347,140 @@ function cn({
347
347
  }) })
348
348
  ] });
349
349
  }
350
- const dn = /MUI: The value provided to.*is invalid/i, un = ({
351
- lookup: e = () => R(null, null, function* () {
350
+ const En = /MUI: The value provided to.*is invalid/i, kn = ({
351
+ lookup: e = () => M(null, null, function* () {
352
352
  }),
353
353
  onChange: t,
354
354
  onInputChange: o,
355
- label: n,
355
+ label: i,
356
356
  value: r,
357
357
  sx: s,
358
- textFieldColor: c,
358
+ textFieldColor: d,
359
359
  textFieldVariant: a = "filled",
360
- textFieldFocused: d,
360
+ textFieldFocused: c,
361
361
  textFieldSx: u,
362
362
  error: m = !1,
363
363
  "data-testid": h,
364
- loadingText: C = "Loading...",
364
+ loadingText: v = "Loading...",
365
365
  noOptionsText: g = "No options",
366
- minLength: S = 3,
367
- disablePortal: v = !1,
366
+ minLength: y = 3,
367
+ disablePortal: A = !1,
368
368
  preLoadedOptions: f,
369
- helperText: w = "",
370
- disabled: F,
371
- popupIcon: _,
372
- disableIconFlip: U,
373
- placeholderText: y = void 0,
374
- onRightClick: T = () => {
369
+ helperText: b = "",
370
+ disabled: D,
371
+ popupIcon: F,
372
+ disableIconFlip: R,
373
+ placeholderText: k = void 0,
374
+ onRightClick: P = () => {
375
375
  },
376
376
  disableDefaultRightClickBehaviour: $ = !1,
377
- readOnly: z,
377
+ readOnly: K,
378
378
  hideInputEndAdornment: B
379
379
  }) => {
380
- const [L, D] = q(""), { data: b, isLoading: H } = it({
381
- inputValue: L,
382
- label: n,
380
+ const [H, E] = z(""), { data: S, isLoading: U } = pt({
381
+ inputValue: H,
382
+ label: i,
383
383
  lookup: e,
384
- minLength: S != null ? S : 0,
384
+ minLength: y != null ? y : 0,
385
385
  preLoadedOptions: f
386
- }), Y = L.length >= S;
387
- return /* @__PURE__ */ i("div", { "data-testid": h, children: /* @__PURE__ */ i(
388
- At,
386
+ }), Y = H.length >= y;
387
+ return /* @__PURE__ */ n("div", { "data-testid": h, children: /* @__PURE__ */ n(
388
+ Nt,
389
389
  {
390
390
  direction: "row",
391
391
  spacing: 1,
392
- onMouseDownCapture: (A) => {
393
- A.button === nt.right && $ && (A.preventDefault(), A.stopPropagation());
392
+ onMouseDownCapture: (C) => {
393
+ C.button === ut.right && $ && (C.preventDefault(), C.stopPropagation());
394
394
  },
395
- onContextMenuCapture: (A) => {
396
- $ && (A.preventDefault(), A.stopPropagation()), T(A);
395
+ onContextMenuCapture: (C) => {
396
+ $ && (C.preventDefault(), C.stopPropagation()), P(C);
397
397
  },
398
- children: /* @__PURE__ */ i(
399
- fe,
398
+ children: /* @__PURE__ */ n(
399
+ me,
400
400
  {
401
- sx: l(l({}, s), U ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
401
+ sx: l(l({}, s), R ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
402
402
  "data-testid": h ? `${h}:Autocomplete` : void 0,
403
- loading: Y ? H : !1,
404
- options: b != null ? b : [],
405
- onChange: (A, P, W) => {
406
- t(A, P, W);
403
+ loading: Y ? U : !1,
404
+ options: S != null ? S : [],
405
+ onChange: (C, T, W) => {
406
+ t(C, T, W);
407
407
  },
408
- disablePortal: v,
409
- filterOptions: (A) => A,
408
+ disablePortal: A,
409
+ filterOptions: (C) => C,
410
410
  value: r,
411
411
  noOptionsText: Y ? g : "Start typing to search",
412
- loadingText: C,
413
- getOptionLabel: (A) => A.label,
414
- popupIcon: _,
415
- renderInput: (A) => /* @__PURE__ */ i(
416
- me,
417
- k(l({
412
+ loadingText: v,
413
+ getOptionLabel: (C) => C.label,
414
+ popupIcon: F,
415
+ renderInput: (C) => /* @__PURE__ */ n(
416
+ ge,
417
+ _(l({
418
418
  "data-testid": h ? `${h}:Autocomplete:TextField` : void 0
419
- }, A), {
419
+ }, C), {
420
420
  variant: a,
421
- label: n,
422
- color: c,
421
+ label: i,
422
+ color: d,
423
423
  error: m,
424
- helperText: w,
424
+ helperText: b,
425
425
  autoComplete: "off",
426
426
  slotProps: {
427
- input: k(l({}, A.InputProps), {
428
- endAdornment: B ? void 0 : /* @__PURE__ */ x(M, { children: [
429
- H ? /* @__PURE__ */ i(se, { color: "inherit", size: 20 }) : null,
430
- A.InputProps.endAdornment
427
+ input: _(l({}, C.InputProps), {
428
+ endAdornment: B ? void 0 : /* @__PURE__ */ x(I, { children: [
429
+ U ? /* @__PURE__ */ n(se, { color: "inherit", size: 20 }) : null,
430
+ C.InputProps.endAdornment
431
431
  ] })
432
432
  })
433
433
  },
434
- placeholder: y,
434
+ placeholder: k,
435
435
  sx: u,
436
- focused: d
436
+ focused: c
437
437
  })
438
438
  ),
439
- isOptionEqualToValue: (A, P) => A.id === P.id,
440
- onInputChange: (A, P, W) => {
441
- D(P), o && o(P, W, A);
439
+ isOptionEqualToValue: (C, T) => C.id === T.id,
440
+ onInputChange: (C, T, W) => {
441
+ E(T), o && o(T, W, C);
442
442
  },
443
- renderOption: (A, P) => /* @__PURE__ */ ue(
443
+ renderOption: (C, T) => /* @__PURE__ */ pe(
444
444
  "li",
445
- k(l({}, A), {
446
- key: P.id,
447
- "data-testid": h ? `${h}:Autocomplete:option(${P.id.toString()})` : void 0
445
+ _(l({}, C), {
446
+ key: T.id,
447
+ "data-testid": h ? `${h}:Autocomplete:option(${T.id.toString()})` : void 0
448
448
  }),
449
- P.label
449
+ T.label
450
450
  ),
451
- disabled: F,
452
- readOnly: z
451
+ disabled: D,
452
+ readOnly: K
453
453
  }
454
454
  )
455
455
  }
456
456
  ) });
457
- }, zt = (e) => {
457
+ }, ro = (e) => {
458
458
  if (!e)
459
459
  return -1;
460
460
  try {
461
- const o = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), n = decodeURIComponent(
462
- Rt.from(o, "base64").toString("utf8").split("").map(function(s) {
461
+ const o = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), i = decodeURIComponent(
462
+ Jt.from(o, "base64").toString("utf8").split("").map(function(s) {
463
463
  return "%" + ("00" + s.charCodeAt(0).toString(16)).slice(-2);
464
464
  }).join("")
465
- ), r = JSON.parse(n);
465
+ ), r = JSON.parse(i);
466
466
  return r != null && r.exp ? r.exp : -1;
467
467
  } catch (t) {
468
468
  return -1;
469
469
  }
470
- }, pn = ({
470
+ }, _n = ({
471
471
  open: e = !1,
472
472
  closeHandler: t,
473
473
  setAuth0ExpiryTime: o
474
474
  }) => {
475
- const { logout: n, getAccessTokenSilently: r } = ge();
476
- return /* @__PURE__ */ i(
477
- ot,
475
+ const { logout: i, getAccessTokenSilently: r } = xe();
476
+ return /* @__PURE__ */ n(
477
+ dt,
478
478
  {
479
479
  isOpen: e,
480
480
  primaryButton: {
481
481
  text: "Continue",
482
- onClick: () => R(null, null, function* () {
483
- const u = yield r({ cacheMode: "off" }), m = zt(u) * 1e3;
482
+ onClick: () => M(null, null, function* () {
483
+ const u = yield r({ cacheMode: "off" }), m = ro(u) * 1e3;
484
484
  o(m), t();
485
485
  }),
486
486
  disabled: !1,
@@ -489,8 +489,8 @@ const dn = /MUI: The value provided to.*is invalid/i, un = ({
489
489
  },
490
490
  secondaryButton: {
491
491
  text: "Log out",
492
- onClick: () => R(null, null, function* () {
493
- n({ logoutParams: { returnTo: `${window.location.origin}` } });
492
+ onClick: () => M(null, null, function* () {
493
+ i({ logoutParams: { returnTo: `${window.location.origin}` } });
494
494
  }),
495
495
  disabled: !1,
496
496
  testId: "PreferencesDialog",
@@ -499,42 +499,42 @@ const dn = /MUI: The value provided to.*is invalid/i, un = ({
499
499
  onClose: t,
500
500
  dialogTitle: "Session expiry",
501
501
  disableCloseOnBackdropOrEscape: !0,
502
- children: /* @__PURE__ */ i("p", { style: { marginBottom: 0 }, children: "Your session is about to time out due to inactivity. Do you want to continue?" })
502
+ children: /* @__PURE__ */ n("p", { style: { marginBottom: 0 }, children: "Your session is about to time out due to inactivity. Do you want to continue?" })
503
503
  }
504
504
  );
505
505
  };
506
- function Vt(e) {
506
+ function ao(e) {
507
507
  return "error" in e;
508
508
  }
509
- function Yt(e) {
510
- var n;
511
- const t = e.error, o = (n = e == null ? void 0 : e.error_description) != null ? n : "";
509
+ function so(e) {
510
+ var i;
511
+ const t = e.error, o = (i = e == null ? void 0 : e.error_description) != null ? i : "";
512
512
  return t === "access_denied" && o.startsWith("You do not have the required authorization");
513
513
  }
514
- function Kt(e) {
515
- var n;
516
- const t = e.error, o = (n = e == null ? void 0 : e.error_description) != null ? n : "";
514
+ function lo(e) {
515
+ var i;
516
+ const t = e.error, o = (i = e == null ? void 0 : e.error_description) != null ? i : "";
517
517
  return t === "access_denied" && o.startsWith("User did not authorize the request");
518
518
  }
519
- function Xt(e) {
520
- var n;
521
- const t = e.error, o = (n = e == null ? void 0 : e.error_description) != null ? n : "";
519
+ function co(e) {
520
+ var i;
521
+ const t = e.error, o = (i = e == null ? void 0 : e.error_description) != null ? i : "";
522
522
  return t === "access_denied" && o.match(/Script.*time.*exceeded/);
523
523
  }
524
- function hn({
524
+ function Fn({
525
525
  children: e,
526
526
  appName: t = "the app",
527
527
  throwErrors: o = "none",
528
- disableConsoleLogging: n = !1,
528
+ disableConsoleLogging: i = !1,
529
529
  onError: r = () => {
530
530
  }
531
531
  }) {
532
- var h, C;
533
- const { isAuthenticated: s, isLoading: c, error: a, loginWithRedirect: d, logout: u } = ge();
534
- ve(() => {
532
+ var h, v;
533
+ const { isAuthenticated: s, isLoading: d, error: a, loginWithRedirect: c, logout: u } = xe();
534
+ Fe(() => {
535
535
  a && r(a);
536
536
  }, [a, r]);
537
- const m = ft(
537
+ const m = _t(
538
538
  () => ({
539
539
  appState: {
540
540
  returnTo: `${window.location.pathname}${window.location.search}`
@@ -542,167 +542,167 @@ function hn({
542
542
  }),
543
543
  []
544
544
  );
545
- if (ve(() => {
546
- c || s || a || d(m);
547
- }, [c, s, a, d, r, m]), a) {
548
- if (n || console.error(
549
- `Error detected in AuthGuard [isAuthenticated=${s},isLoading=${c}]`,
545
+ if (Fe(() => {
546
+ d || s || a || c(m);
547
+ }, [d, s, a, c, r, m]), a) {
548
+ if (i || console.error(
549
+ `Error detected in AuthGuard [isAuthenticated=${s},isLoading=${d}]`,
550
550
  a
551
551
  ), o === "all")
552
552
  throw a;
553
- if (Vt(a)) {
554
- let g = "Auth error", S = "An unknown Auth0 error occurred.";
555
- if (Yt(a))
556
- g = "Unauthorised", S = `You are not authorised to access ${t}.`;
557
- else if (Kt(a))
558
- g = "App not authorised", S = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
559
- else if (Xt(a))
560
- g = "Auth0 script execution time exceeded", S = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
553
+ if (ao(a)) {
554
+ let g = "Auth error", y = "An unknown Auth0 error occurred.";
555
+ if (so(a))
556
+ g = "Unauthorised", y = `You are not authorised to access ${t}.`;
557
+ else if (lo(a))
558
+ g = "App not authorised", y = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
559
+ else if (co(a))
560
+ g = "Auth0 script execution time exceeded", y = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
561
561
  else if (a.message === "Invalid state") {
562
- const v = localStorage.getItem("auth0_redirect_count");
563
- v ? v && parseInt(v) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(v) + 1)), d(m)) : (localStorage.setItem("auth0_redirect_count", "1"), d(m));
562
+ const A = localStorage.getItem("auth0_redirect_count");
563
+ A ? A && parseInt(A) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(A) + 1)), c(m)) : (localStorage.setItem("auth0_redirect_count", "1"), c(m));
564
564
  } else if (o === "unknown") throw a;
565
- return /* @__PURE__ */ x(qe, { open: !0, children: [
566
- /* @__PURE__ */ i(Ve, { children: g }),
567
- /* @__PURE__ */ x(Ye, { children: [
568
- /* @__PURE__ */ i(I, { children: S }),
569
- /* @__PURE__ */ i("br", {}),
570
- /* @__PURE__ */ i(I, { variant: "subtitle2", children: "Details from Auth0" }),
571
- /* @__PURE__ */ x(I, { variant: "body2", children: [
565
+ return /* @__PURE__ */ x(Ze, { open: !0, children: [
566
+ /* @__PURE__ */ n(et, { children: g }),
567
+ /* @__PURE__ */ x(tt, { children: [
568
+ /* @__PURE__ */ n(L, { children: y }),
569
+ /* @__PURE__ */ n("br", {}),
570
+ /* @__PURE__ */ n(L, { variant: "subtitle2", children: "Details from Auth0" }),
571
+ /* @__PURE__ */ x(L, { variant: "body2", children: [
572
572
  "error: ",
573
573
  (h = a == null ? void 0 : a.error) != null ? h : "N/A"
574
574
  ] }),
575
- /* @__PURE__ */ x(I, { variant: "body2", children: [
575
+ /* @__PURE__ */ x(L, { variant: "body2", children: [
576
576
  "description: ",
577
- (C = a == null ? void 0 : a.error_description) != null ? C : "N/A"
577
+ (v = a == null ? void 0 : a.error_description) != null ? v : "N/A"
578
578
  ] })
579
579
  ] }),
580
- /* @__PURE__ */ x(Ke, { children: [
581
- g === "Auth0 script execution time exceeded" && /* @__PURE__ */ i(Q, { href: window.location.origin + window.location.pathname, children: "Reload" }),
582
- /* @__PURE__ */ i(Q, { onClick: () => u({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
580
+ /* @__PURE__ */ x(ot, { children: [
581
+ g === "Auth0 script execution time exceeded" && /* @__PURE__ */ n(J, { href: window.location.origin + window.location.pathname, children: "Reload" }),
582
+ /* @__PURE__ */ n(J, { onClick: () => u({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
583
583
  ] })
584
584
  ] });
585
585
  } else if (o === "unknown") throw a;
586
586
  }
587
- return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ i(M, { children: e })) : /* @__PURE__ */ i($t, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
587
+ return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ n(I, { children: e })) : /* @__PURE__ */ n(Zt, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
588
588
  }
589
- const xe = () => {
589
+ const Ae = () => {
590
590
  const e = te();
591
- return St(e.breakpoints.down("sm"));
592
- }, Qt = 64, Jt = 72, Zt = 256, ee = G(!0), jt = G(Zt), eo = G(Jt), Ne = G(""), to = G(void 0), oo = G(Qt), no = G(void 0), io = ({
591
+ return Ot(e.breakpoints.down("sm"));
592
+ }, uo = 64, po = 72, ho = 256, ee = G(!0), fo = G(ho), mo = G(po), He = G(""), go = G(void 0), xo = G(uo), Ao = G(void 0), Co = ({
593
593
  label: e,
594
594
  to: t,
595
595
  icon: o,
596
- subMenu: n,
596
+ subMenu: i,
597
597
  subMenuInitialOpen: r,
598
598
  onClick: s,
599
- closeOnSmallScreen: c,
599
+ closeOnSmallScreen: d,
600
600
  disabled: a = !1,
601
- openInNewWindow: d = !1,
601
+ openInNewWindow: c = !1,
602
602
  extraSubIndentSpace: u = 0,
603
603
  tooltip: m = "",
604
604
  tooltipMenuOpen: h = "",
605
- tooltipMenuClosed: C = ""
605
+ tooltipMenuClosed: v = ""
606
606
  }) => {
607
- const [g, S] = q(r), [v, f] = V(ee), { pathname: w } = Bt(), F = xe(), _ = "  ".repeat(u);
608
- return /* @__PURE__ */ x(M, { children: [
609
- /* @__PURE__ */ i(
610
- Xe,
607
+ const [g, y] = z(r), [A, f] = V(ee), { pathname: b } = jt(), D = Ae(), F = "  ".repeat(u);
608
+ return /* @__PURE__ */ x(I, { children: [
609
+ /* @__PURE__ */ n(
610
+ nt,
611
611
  {
612
- title: m || (h && v ? h : C && !v ? C : ""),
612
+ title: m || (h && A ? h : v && !A ? v : ""),
613
613
  arrow: !0,
614
614
  placement: "right",
615
615
  children: /* @__PURE__ */ x(
616
- ye,
617
- k(l({
618
- component: t ? Fe : "button",
616
+ Pe,
617
+ _(l({
618
+ component: t ? Me : "button",
619
619
  sx: { width: "100%" },
620
620
  to: t,
621
621
  onClick: () => {
622
- s == null || s(), v ? (S((y) => !y), c && F && f(!1)) : n && (S(!0), f(!0));
622
+ s == null || s(), A ? (y((k) => !k), d && D && f(!1)) : i && (y(!0), f(!0));
623
623
  },
624
624
  "aria-label": e,
625
- selected: w === t,
625
+ selected: b === t,
626
626
  disabled: a
627
- }, d ? { rel: "noopener noreferrer", target: "_blank" } : {}), {
627
+ }, c ? { rel: "noopener noreferrer", target: "_blank" } : {}), {
628
628
  children: [
629
- /* @__PURE__ */ i(Ct, { sx: { padding: "8px" }, children: o }),
630
- /* @__PURE__ */ i(Qe, { in: v, unmountOnExit: !0, children: /* @__PURE__ */ x(N, { children: [
631
- /* @__PURE__ */ i(De, { primary: e }),
632
- n && /* @__PURE__ */ i(vt, { children: g ? /* @__PURE__ */ i(Nt, {}) : /* @__PURE__ */ i(Ot, {}) })
629
+ /* @__PURE__ */ n(Lt, { sx: { padding: "8px" }, children: o }),
630
+ /* @__PURE__ */ n(it, { in: A, unmountOnExit: !0, children: /* @__PURE__ */ x(N, { children: [
631
+ /* @__PURE__ */ n(Ne, { primary: e }),
632
+ i && /* @__PURE__ */ n(It, { children: g ? /* @__PURE__ */ n(Vt, {}) : /* @__PURE__ */ n(Kt, {}) })
633
633
  ] }) })
634
634
  ]
635
635
  })
636
636
  )
637
637
  }
638
638
  ),
639
- n && /* @__PURE__ */ i(Je, { in: g && v, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ i(wt, { component: "div", disablePadding: !0, children: n.map((y) => /* @__PURE__ */ i(
640
- ye,
639
+ i && /* @__PURE__ */ n(rt, { in: g && A, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ n(Mt, { component: "div", disablePadding: !0, children: i.map((k) => /* @__PURE__ */ n(
640
+ Pe,
641
641
  {
642
642
  onClick: () => {
643
- y.onClick && (y == null || y.onClick()), v && y != null && y.closeOnSmallScreen && F && f(!1);
643
+ k.onClick && (k == null || k.onClick()), A && k != null && k.closeOnSmallScreen && D && f(!1);
644
644
  },
645
- to: y.to,
646
- component: y.to ? Fe : "button",
645
+ to: k.to,
646
+ component: k.to ? Me : "button",
647
647
  sx: { width: "100%" },
648
- selected: w === y.to,
649
- disabled: y.disabled,
650
- children: /* @__PURE__ */ i(
651
- De,
648
+ selected: b === k.to,
649
+ disabled: k.disabled,
650
+ children: /* @__PURE__ */ n(
651
+ Ne,
652
652
  {
653
- primary: _ + y.label,
653
+ primary: F + k.label,
654
654
  inset: !0,
655
655
  slotProps: { primary: { variant: "body2" } }
656
656
  }
657
657
  )
658
658
  },
659
- y.label
659
+ k.label
660
660
  )) }) })
661
661
  ] });
662
- }, fn = (o) => {
663
- var n = o, { subMenuInitialOpen: e } = n, t = Z(n, ["subMenuInitialOpen"]);
662
+ }, Tn = (o) => {
663
+ var i = o, { subMenuInitialOpen: e } = i, t = Z(i, ["subMenuInitialOpen"]);
664
664
  const r = e === void 0 ? "initial-undefined" : String(e);
665
- return /* @__PURE__ */ i(io, l({ subMenuInitialOpen: e }, t), r);
666
- }, ro = 0.11, he = 10, ao = 40, so = {
665
+ return /* @__PURE__ */ n(Co, l({ subMenuInitialOpen: e }, t), r);
666
+ }, So = 0.11, fe = 10, vo = 40, yo = {
667
667
  marginLeft: "3px",
668
668
  marginRight: "3px",
669
669
  borderRadius: 2
670
- }, Oe = {
670
+ }, Ge = {
671
671
  display: "flex",
672
672
  flexDirection: "row"
673
- }, lo = {}, co = (e, t, o, n) => {
674
- const r = `rgba(0, 0, 0, ${ro * ((he - e) / he)})`;
675
- return /* @__PURE__ */ i(M, { children: t.map((s, c) => /* @__PURE__ */ i(
676
- pe,
673
+ }, Do = {}, wo = (e, t, o, i) => {
674
+ const r = `rgba(0, 0, 0, ${So * ((fe - e) / fe)})`;
675
+ return /* @__PURE__ */ n(I, { children: t.map((s, d) => /* @__PURE__ */ n(
676
+ he,
677
677
  {
678
678
  variant: "rectangular",
679
679
  height: o,
680
- sx: l({ bgcolor: r, flex: s, marginTop: -1, marginBottom: -1 }, n)
680
+ sx: l({ bgcolor: r, flex: s, marginTop: -1, marginBottom: -1 }, i)
681
681
  },
682
- c
682
+ d
683
683
  )) });
684
- }, uo = ({
684
+ }, bo = ({
685
685
  numberOfRows: e,
686
- firstRowStyle: t = lo,
687
- rowHeight: o = ao,
688
- columnWidths: n,
689
- columnStyles: r = so
686
+ firstRowStyle: t = Do,
687
+ rowHeight: o = vo,
688
+ columnWidths: i,
689
+ columnStyles: r = yo
690
690
  }) => {
691
- const s = Array(Math.min(e, he)).fill(1);
692
- return /* @__PURE__ */ i(
691
+ const s = Array(Math.min(e, fe)).fill(1);
692
+ return /* @__PURE__ */ n(
693
693
  N,
694
694
  {
695
695
  sx: {
696
696
  display: "flex",
697
697
  flexDirection: "column"
698
698
  },
699
- children: s.map((c, a) => {
700
- const d = a === 0 ? l(l({}, Oe), t) : Oe;
701
- return /* @__PURE__ */ i("p", { style: d, children: co(a, n, o, r) }, a);
699
+ children: s.map((d, a) => {
700
+ const c = a === 0 ? l(l({}, Ge), t) : Ge;
701
+ return /* @__PURE__ */ n("p", { style: c, children: wo(a, i, o, r) }, a);
702
702
  })
703
703
  }
704
704
  );
705
- }, po = {
705
+ }, Eo = {
706
706
  name: "shiftDataGridPanelAboveColumnHeaders",
707
707
  enabled: !0,
708
708
  phase: "main",
@@ -714,18 +714,18 @@ const xe = () => {
714
714
  const o = t.closest(".MuiDataGrid-root");
715
715
  if (!o)
716
716
  return;
717
- const n = o.querySelector(".MuiDataGrid-columnHeaders"), r = t.getBoundingClientRect();
718
- let c = t.getAttribute("data-id") === "gridPanelAnchor";
719
- if (!c && n instanceof HTMLElement) {
720
- const C = n.getBoundingClientRect().bottom;
721
- c = r.top >= C - 1;
717
+ const i = o.querySelector(".MuiDataGrid-columnHeaders"), r = t.getBoundingClientRect();
718
+ let d = t.getAttribute("data-id") === "gridPanelAnchor";
719
+ if (!d && i instanceof HTMLElement) {
720
+ const v = i.getBoundingClientRect().bottom;
721
+ d = r.top >= v - 1;
722
722
  }
723
- if (!c)
723
+ if (!d)
724
724
  return;
725
- const a = getComputedStyle(o).getPropertyValue("--DataGrid-headersTotalHeight").trim(), d = parseFloat(a), m = (Number.isFinite(d) && d > 0 ? d : 56) + 8, h = e.modifiersData.popperOffsets;
725
+ const a = getComputedStyle(o).getPropertyValue("--DataGrid-headersTotalHeight").trim(), c = parseFloat(a), m = (Number.isFinite(c) && c > 0 ? c : 56) + 8, h = e.modifiersData.popperOffsets;
726
726
  h && (h.y -= m);
727
727
  }
728
- }, ho = 111, fo = {
728
+ }, ko = 111, _o = 10, Fo = [10], To = {
729
729
  backgroundColor: "white",
730
730
  // We don't want a focused cell to have a border
731
731
  "&.MuiDataGrid-root .MuiDataGrid-cell:focus": {
@@ -740,31 +740,41 @@ const xe = () => {
740
740
  "&.MuiDataGrid-root .MuiDataGrid-columnHeader:focus-within": {
741
741
  outline: "none"
742
742
  }
743
- }, mo = process.env.NODE_ENV === "test", mn = (F) => {
744
- var _ = F, {
745
- loading: e,
746
- skeletonColumnWidths: t,
743
+ }, Po = process.env.NODE_ENV === "test", Pn = (K) => {
744
+ var B = K, {
745
+ loading: e = !1,
746
+ skeletonColumnWidths: t = Fo,
747
747
  paginationModel: o,
748
- onPaginationModelChange: n,
749
- autoTableHeight: r = !1,
750
- noRowsMessage: s = "No rows",
751
- noResultsMessage: c = "No results",
752
- rowHeight: a = 52,
753
- paginationMode: d = "client",
754
- filterMode: u = "client",
755
- pageSizeOptions: m = [5, 10, 25, 50, 100],
756
- rows: h,
757
- sx: C,
758
- "aria-label": g,
759
- "aria-labelledby": S,
760
- "aria-describedby": v,
761
- slotProps: f
762
- } = _, w = Z(_, [
748
+ onPaginationModelChange: i,
749
+ layout: r = "fixed",
750
+ footer: s = "standard",
751
+ loadingVariant: d = "skeleton",
752
+ autoTableHeight: a = !1,
753
+ maxHeight: c,
754
+ noRowsMessage: u = "No rows",
755
+ noResultsMessage: m = "No results",
756
+ rowHeight: h = 52,
757
+ paginationMode: v = "client",
758
+ filterMode: g = "client",
759
+ pageSizeOptions: y = [5, 10, 25, 50, 100],
760
+ rows: A,
761
+ sx: f,
762
+ hideFooter: b,
763
+ slots: D,
764
+ "aria-label": F,
765
+ "aria-labelledby": R,
766
+ "aria-describedby": k,
767
+ slotProps: P
768
+ } = B, $ = Z(B, [
763
769
  "loading",
764
770
  "skeletonColumnWidths",
765
771
  "paginationModel",
766
772
  "onPaginationModelChange",
773
+ "layout",
774
+ "footer",
775
+ "loadingVariant",
767
776
  "autoTableHeight",
777
+ "maxHeight",
768
778
  "noRowsMessage",
769
779
  "noResultsMessage",
770
780
  "rowHeight",
@@ -773,172 +783,185 @@ const xe = () => {
773
783
  "pageSizeOptions",
774
784
  "rows",
775
785
  "sx",
786
+ "hideFooter",
787
+ "slots",
776
788
  "aria-label",
777
789
  "aria-labelledby",
778
790
  "aria-describedby",
779
791
  "slotProps"
780
792
  ]);
781
- var O, K, oe, J;
782
- const E = f != null ? f : {}, { main: U } = E, y = Z(E, ["main"]), T = (O = y.panel) != null ? O : {}, [$, z] = q(o), B = n !== void 0, L = B ? o : $, { pageSize: D } = L, b = ho + D * a, H = r && h && h.length !== 0 && L.page !== Math.floor(h.length / D), Y = (ne) => {
783
- B ? n == null || n(ne) : z(ne);
784
- }, A = () => /* @__PURE__ */ i(uo, { numberOfRows: D, columnWidths: t }), P = () => /* @__PURE__ */ i(_e, { height: "100%", alignItems: "center", justifyContent: "center", children: e ? "" : s }), W = () => /* @__PURE__ */ i(_e, { height: "100%", alignItems: "center", justifyContent: "center", children: e ? "" : c }), p = te();
785
- return /* @__PURE__ */ i(N, { height: H ? "auto" : b, width: "100%", children: /* @__PURE__ */ i(
786
- Ht,
787
- l({
788
- slots: {
789
- loadingOverlay: A,
790
- noRowsOverlay: P,
791
- noResultsOverlay: W
792
- },
793
- slotProps: k(l({}, y), {
794
- // Open filter/columns preference panel above the grid body; Popper modifier clears column headers.
795
- // GridPanel forwards extra props to BasePopper; MUI typings omit several keys on slotProps.panel.
796
- panel: k(l({}, T), {
797
- placement: (K = T.placement) != null ? K : "top-end",
798
- popperOptions: k(l({}, T.popperOptions), {
799
- modifiers: [
800
- po,
801
- ...(J = (oe = T.popperOptions) == null ? void 0 : oe.modifiers) != null ? J : []
802
- ]
803
- })
804
- }),
805
- filterPanel: l({
806
- filterFormProps: {
807
- columnInputProps: { "aria-label": "Filter by column" },
808
- operatorInputProps: { "aria-label": "Filter operator" },
809
- valueInputProps: { "aria-label": "Filter value" }
810
- }
811
- }, y.filterPanel),
812
- main: l(l(l(l({}, U), g != null ? { "aria-label": g } : {}), S != null ? { "aria-labelledby": S } : {}), v != null ? { "aria-describedby": v } : {})
813
- }),
814
- disableRowSelectionOnClick: !0,
815
- rowHeight: a,
816
- autoHeight: H,
817
- sx: k(l(l({}, fo), C), {
818
- "&.MuiDataGrid-root .Mui-selected": {
819
- backgroundColor: `${p.palette.secondary.main}15`,
820
- "&:hover": {
821
- backgroundColor: `${p.palette.secondary.main}1E`
822
- }
823
- }
824
- }),
825
- disableVirtualization: mo,
826
- loading: e,
827
- rows: h,
828
- paginationModel: L,
829
- onPaginationModelChange: Y,
830
- paginationMode: d,
831
- filterMode: u,
832
- pageSizeOptions: m
833
- }, w)
834
- ) });
835
- }, go = {
793
+ var ve, ye, De, we;
794
+ const Se = P != null ? P : {}, { main: H } = Se, E = Z(Se, ["main"]), S = (ve = E.panel) != null ? ve : {}, U = { page: 0, pageSize: _o }, [Y, C] = z(
795
+ o != null ? o : U
796
+ ), T = o !== void 0, W = s === "standard" || s === "custom" || T, p = T ? o : Y, { pageSize: w } = p, O = ko + w * h, X = r === "fixed" && a && A && A.length !== 0 && p.page !== Math.floor(A.length / w), oe = r === "auto", q = c != null, le = q ? c : oe || X ? "auto" : O, Ct = !q && (oe || X), St = s === "hidden" || b === !0, vt = (be) => {
797
+ T || C(be), i == null || i(be);
798
+ }, yt = () => /* @__PURE__ */ n(bo, { numberOfRows: w, columnWidths: t }), Dt = () => /* @__PURE__ */ n(Re, { height: "100%", alignItems: "center", justifyContent: "center", children: e ? "" : u }), wt = () => /* @__PURE__ */ n(Re, { height: "100%", alignItems: "center", justifyContent: "center", children: e ? "" : m }), ne = {};
799
+ d === "skeleton" && (ne.loadingOverlay = yt), D != null && D.noRowsOverlay || (ne.noRowsOverlay = Dt), D != null && D.noResultsOverlay || (ne.noResultsOverlay = wt);
800
+ const Ce = te();
801
+ return /* @__PURE__ */ n(
802
+ N,
803
+ {
804
+ height: le,
805
+ width: "100%",
806
+ sx: q ? { display: "flex", flexDirection: "column", minHeight: 0 } : void 0,
807
+ children: /* @__PURE__ */ n(
808
+ eo,
809
+ l(_(l({
810
+ slots: l(l({}, ne), D),
811
+ slotProps: _(l({}, E), {
812
+ // Open filter/columns preference panel above the grid body; Popper modifier clears column headers.
813
+ // GridPanel forwards extra props to BasePopper; MUI typings omit several keys on slotProps.panel.
814
+ panel: _(l({}, S), {
815
+ placement: (ye = S.placement) != null ? ye : "top-end",
816
+ popperOptions: _(l({}, S.popperOptions), {
817
+ modifiers: [
818
+ Eo,
819
+ ...(we = (De = S.popperOptions) == null ? void 0 : De.modifiers) != null ? we : []
820
+ ]
821
+ })
822
+ }),
823
+ filterPanel: l({
824
+ filterFormProps: {
825
+ columnInputProps: { "aria-label": "Filter by column" },
826
+ operatorInputProps: { "aria-label": "Filter operator" },
827
+ valueInputProps: { "aria-label": "Filter value" }
828
+ }
829
+ }, E.filterPanel),
830
+ main: l(l(l(l({}, H), F != null ? { "aria-label": F } : {}), R != null ? { "aria-labelledby": R } : {}), k != null ? { "aria-describedby": k } : {})
831
+ }),
832
+ disableRowSelectionOnClick: !0,
833
+ rowHeight: h,
834
+ autoHeight: Ct,
835
+ hideFooter: St,
836
+ sx: _(l(l(l({}, To), q ? { height: "100%" } : {}), f), {
837
+ "&.MuiDataGrid-root .Mui-selected": {
838
+ backgroundColor: `${Ce.palette.secondary.main}15`,
839
+ "&:hover": {
840
+ backgroundColor: `${Ce.palette.secondary.main}1E`
841
+ }
842
+ }
843
+ }),
844
+ disableVirtualization: Po,
845
+ loading: e,
846
+ rows: A
847
+ }, W ? {
848
+ paginationModel: p,
849
+ onPaginationModelChange: vt
850
+ } : {}), {
851
+ paginationMode: v,
852
+ filterMode: g,
853
+ pageSizeOptions: y
854
+ }), $)
855
+ )
856
+ }
857
+ );
858
+ }, No = {
836
859
  autoHideDuration: 6e3,
837
860
  anchorOrigin: { vertical: "top", horizontal: "center" },
838
861
  // The default is false. If we prefer timer to continue when window loses
839
862
  // focus, change to true
840
863
  disableWindowBlurListener: !1
841
- }, xo = {
864
+ }, Oo = {
842
865
  shouldClose: (e, t) => t !== "clickaway"
843
- }, Le = {
866
+ }, Ue = {
844
867
  message: "",
845
868
  severity: "info",
846
869
  variant: "standard",
847
870
  progressIndicator: void 0
848
871
  // Can use 'circular' or 'linear'
849
- }, Ie = 100, Me = 2e3, Ao = 2e3, So = /* @__PURE__ */ (() => {
872
+ }, We = 100, ze = 2e3, Lo = 2e3, Io = /* @__PURE__ */ (() => {
850
873
  let e = 0;
851
874
  return () => (e += 1, e);
852
- })(), Co = {
875
+ })(), Mo = {
853
876
  borderBottomLeftRadius: "0px",
854
877
  borderBottomRightRadius: "0px"
855
- }, vo = {}, wo = {}, rt = mt(null);
856
- function yo(s) {
857
- var c = s, {
858
- overrideState: e = vo,
859
- overrideActions: t = wo,
860
- shouldClose: o = xo.shouldClose,
861
- children: n
862
- } = c, r = Z(c, [
878
+ }, Ro = {}, $o = {}, ht = Ft(null);
879
+ function Bo(s) {
880
+ var d = s, {
881
+ overrideState: e = Ro,
882
+ overrideActions: t = $o,
883
+ shouldClose: o = Oo.shouldClose,
884
+ children: i
885
+ } = d, r = Z(d, [
863
886
  "overrideState",
864
887
  "overrideActions",
865
888
  "shouldClose",
866
889
  "children"
867
890
  ]);
868
- var L;
869
- const [{ open: a }, d] = q({ open: !1 }), u = ce([]), m = ce(Date.now()), h = ce(0), C = we((D) => {
870
- d({ open: D });
871
- }, []), g = we((D = {}) => {
872
- h.current += 1, u.current.length >= Ie && Date.now() - m.current >= Me && (m.current = Date.now(), console.error(
873
- `SaladBarProvider: MAX_QUEUE_LENGTH (${Ie}) hit ${h.current} times in last ${Me}ms)`
891
+ var H;
892
+ const [{ open: a }, c] = z({ open: !1 }), u = de([]), m = de(Date.now()), h = de(0), v = Te((E) => {
893
+ c({ open: E });
894
+ }, []), g = Te((E = {}) => {
895
+ h.current += 1, u.current.length >= We && Date.now() - m.current >= ze && (m.current = Date.now(), console.error(
896
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${We}) hit ${h.current} times in last ${ze}ms)`
874
897
  ), h.current = 0);
875
- const b = l(k(l({}, Le), {
876
- key: So()
877
- }), D);
878
- return u.current.push(b), u.current.length === 1 && d({ open: !0 }), b.key;
879
- }, []), S = (D = "", b = {}) => g(l({ message: D, severity: "success" }, b)), v = (D = "", b = {}) => g(l({ message: D, severity: "info" }, b)), f = (D = "", b = {}) => g(l({ message: D, severity: "warning" }, b)), w = (D = "", b = {}) => g(l({ message: D, severity: "error" }, b)), F = (D) => {
880
- const b = u.current.findIndex((H) => H.key === D);
881
- if (b !== -1)
882
- return b === 0 ? (d({ open: !1 }), u.current[0]) : u.current.splice(b, 1);
883
- }, _ = (D, b) => {
884
- o(D, b) && d({ open: !1 });
885
- }, U = () => {
886
- }, y = () => {
887
- u.current.shift(), u.current.length > 0 && d({ open: !0 });
888
- }, T = (L = u.current[0]) != null ? L : l({}, Le), $ = {};
889
- "autoHideDuration" in T && ($.autoHideDuration = T.autoHideDuration);
890
- const z = l(l({}, go), r), B = l(l({
898
+ const S = l(_(l({}, Ue), {
899
+ key: Io()
900
+ }), E);
901
+ return u.current.push(S), u.current.length === 1 && c({ open: !0 }), S.key;
902
+ }, []), y = (E = "", S = {}) => g(l({ message: E, severity: "success" }, S)), A = (E = "", S = {}) => g(l({ message: E, severity: "info" }, S)), f = (E = "", S = {}) => g(l({ message: E, severity: "warning" }, S)), b = (E = "", S = {}) => g(l({ message: E, severity: "error" }, S)), D = (E) => {
903
+ const S = u.current.findIndex((U) => U.key === E);
904
+ if (S !== -1)
905
+ return S === 0 ? (c({ open: !1 }), u.current[0]) : u.current.splice(S, 1);
906
+ }, F = (E, S) => {
907
+ o(E, S) && c({ open: !1 });
908
+ }, R = () => {
909
+ }, k = () => {
910
+ u.current.shift(), u.current.length > 0 && c({ open: !0 });
911
+ }, P = (H = u.current[0]) != null ? H : l({}, Ue), $ = {};
912
+ "autoHideDuration" in P && ($.autoHideDuration = P.autoHideDuration);
913
+ const K = l(l({}, No), r), B = l(l({
891
914
  open: a,
892
- setOpen: C,
915
+ setOpen: v,
893
916
  enqueueNotification: g,
894
- enqueueSuccessNotification: S,
895
- enqueueInfoNotification: v,
917
+ enqueueSuccessNotification: y,
918
+ enqueueInfoNotification: A,
896
919
  enqueueWarningNotification: f,
897
- enqueueErrorNotification: w,
898
- removeNotification: F
920
+ enqueueErrorNotification: b,
921
+ removeNotification: D
899
922
  }, e), t);
900
- return /* @__PURE__ */ x(rt.Provider, { value: B, children: [
901
- n,
902
- /* @__PURE__ */ i(
903
- yt,
904
- k(l(l({}, z), $), {
923
+ return /* @__PURE__ */ x(ht.Provider, { value: B, children: [
924
+ i,
925
+ /* @__PURE__ */ n(
926
+ Rt,
927
+ _(l(l({}, K), $), {
905
928
  open: a,
906
- onClose: _,
929
+ onClose: F,
907
930
  TransitionProps: {
908
- onExited: y,
909
- onExit: U
931
+ onExited: k,
932
+ onExit: R
910
933
  },
911
- sx: { zIndex: Ao },
934
+ sx: { zIndex: Lo },
912
935
  children: /* @__PURE__ */ x("div", { children: [
913
- /* @__PURE__ */ i(
914
- Dt,
936
+ /* @__PURE__ */ n(
937
+ $t,
915
938
  {
916
- onClose: (D) => _(D, "closeAlert"),
917
- severity: T.severity,
939
+ onClose: (E) => F(E, "closeAlert"),
940
+ severity: P.severity,
918
941
  variant: "filled",
919
- icon: T.progressIndicator === "circular" ? /* @__PURE__ */ i(se, { size: "1em" }) : void 0,
920
- style: T.progressIndicator === "linear" ? Co : void 0,
921
- children: T.message
942
+ icon: P.progressIndicator === "circular" ? /* @__PURE__ */ n(se, { size: "1em" }) : void 0,
943
+ style: P.progressIndicator === "linear" ? Mo : void 0,
944
+ children: P.message
922
945
  }
923
946
  ),
924
- T.progressIndicator === "linear" && /* @__PURE__ */ i(ze, { color: "primary" })
947
+ P.progressIndicator === "linear" && /* @__PURE__ */ n(je, { color: "primary" })
925
948
  ] })
926
949
  })
927
950
  )
928
951
  ] });
929
952
  }
930
- class at extends Error {
953
+ class ft extends Error {
931
954
  }
932
- Ce(at, "errorName", "ContextError");
933
- function Do() {
934
- const e = gt(rt);
955
+ _e(ft, "errorName", "ContextError");
956
+ function Ho() {
957
+ const e = Tt(ht);
935
958
  if (e === null)
936
- throw new at("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
959
+ throw new ft("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
937
960
  return e;
938
961
  }
939
- const gn = Gt(
940
- (e = { autoHideDuration: 1 }, t = {}, o = {}) => ({ children: n }) => /* @__PURE__ */ i(yo, k(l({}, e), { overrideState: t, overrideActions: o, children: /* @__PURE__ */ i(M, { children: n }) }))
941
- ), bo = {
962
+ const Nn = to(
963
+ (e = { autoHideDuration: 1 }, t = {}, o = {}) => ({ children: i }) => /* @__PURE__ */ n(Bo, _(l({}, e), { overrideState: t, overrideActions: o, children: /* @__PURE__ */ n(I, { children: i }) }))
964
+ ), Go = {
942
965
  act: "ACT",
943
966
  nsw: "NSW",
944
967
  nt: "NT",
@@ -950,88 +973,88 @@ const gn = Gt(
950
973
  ag: "AG",
951
974
  fedmps: "FedMPs",
952
975
  "": ""
953
- }, st = "domainCode";
954
- var Ue;
955
- const Re = G(
956
- JSON.parse((Ue = localStorage.getItem(st)) != null ? Ue : '{"domainCode": ""}').domainCode
957
- ), Eo = G(
958
- (e) => e(Re),
976
+ }, mt = "domainCode";
977
+ var Qe;
978
+ const qe = G(
979
+ JSON.parse((Qe = localStorage.getItem(mt)) != null ? Qe : '{"domainCode": ""}').domainCode
980
+ ), Uo = G(
981
+ (e) => e(qe),
959
982
  (e, t, o) => {
960
- t(Re, o), localStorage.setItem(st, JSON.stringify({ domainCode: o }));
983
+ t(qe, o), localStorage.setItem(mt, JSON.stringify({ domainCode: o }));
961
984
  }
962
- ), lt = (e) => {
985
+ ), gt = (e) => {
963
986
  var t;
964
- return e === null ? "N/A" : (t = bo[e]) != null ? t : "";
965
- }, xn = ({
987
+ return e === null ? "N/A" : (t = Go[e]) != null ? t : "";
988
+ }, On = ({
966
989
  isLoading: e,
967
990
  isOpen: t,
968
991
  onClose: o,
969
- onDomainChange: n,
992
+ onDomainChange: i,
970
993
  domainOptions: r,
971
994
  applicationName: s,
972
- handleLogout: c
995
+ handleLogout: d
973
996
  }) => {
974
- const [a, d] = V(Eo), [u, m] = q(a), { enqueueSuccessNotification: h } = Do(), C = r.length === 0, g = !!a && !r.includes(a) && !r.includes(u), S = !a || C || g, v = () => R(null, null, function* () {
975
- u ? (d(u), n == null || n(u), h(`Set organisation to ${u}`), o()) : (d(""), n == null || n(""));
976
- }), f = () => R(null, null, function* () {
977
- a && !C && !g ? (m(a), o()) : S && c();
997
+ const [a, c] = V(Uo), [u, m] = z(a), { enqueueSuccessNotification: h } = Ho(), v = r.length === 0, g = !!a && !r.includes(a) && !r.includes(u), y = !a || v || g, A = () => M(null, null, function* () {
998
+ u ? (c(u), i == null || i(u), h(`Set organisation to ${u}`), o()) : (c(""), i == null || i(""));
999
+ }), f = () => M(null, null, function* () {
1000
+ a && !v && !g ? (m(a), o()) : y && d();
978
1001
  });
979
- let w;
980
- return C ? w = "Unable to retrieve your active organisations. Try logging in again." : g && (w = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ x(
981
- ot,
1002
+ let b;
1003
+ return v ? b = "Unable to retrieve your active organisations. Try logging in again." : g && (b = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ x(
1004
+ dt,
982
1005
  {
983
1006
  isOpen: t,
984
1007
  dialogTitle: "Select an organisation",
985
1008
  primaryButton: {
986
1009
  text: "Confirm",
987
- onClick: v,
988
- disabled: !u || C || g,
1010
+ onClick: A,
1011
+ disabled: !u || v || g,
989
1012
  buttonColor: "primary"
990
1013
  },
991
1014
  secondaryButton: {
992
- text: S ? "Logout" : "Cancel",
1015
+ text: y ? "Logout" : "Cancel",
993
1016
  onClick: f
994
1017
  },
995
- onClose: S ? () => {
1018
+ onClose: y ? () => {
996
1019
  } : o,
997
1020
  children: [
998
- /* @__PURE__ */ x(I, { marginBottom: 2, children: [
1021
+ /* @__PURE__ */ x(L, { marginBottom: 2, children: [
999
1022
  "Select the default organisation that you want to use with the ",
1000
1023
  s,
1001
1024
  "."
1002
1025
  ] }),
1003
- /* @__PURE__ */ i(
1004
- fe,
1026
+ /* @__PURE__ */ n(
1027
+ me,
1005
1028
  {
1006
1029
  loading: e,
1007
1030
  multiple: !1,
1008
1031
  disableClearable: !1,
1009
1032
  value: u !== "" ? u : null,
1010
- onChange: (F, _) => m(_ != null ? _ : ""),
1011
- getOptionLabel: lt,
1033
+ onChange: (D, F) => m(F != null ? F : ""),
1034
+ getOptionLabel: gt,
1012
1035
  options: [...r.toSorted()],
1013
- renderInput: (F) => /* @__PURE__ */ i(
1014
- me,
1015
- k(l({}, F), {
1036
+ renderInput: (D) => /* @__PURE__ */ n(
1037
+ ge,
1038
+ _(l({}, D), {
1016
1039
  variant: "filled",
1017
1040
  label: "Select organisation",
1018
- InputProps: k(l({}, F.InputProps), {
1019
- endAdornment: /* @__PURE__ */ x(M, { children: [
1020
- e ? /* @__PURE__ */ i(se, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1021
- F.InputProps.endAdornment
1041
+ InputProps: _(l({}, D.InputProps), {
1042
+ endAdornment: /* @__PURE__ */ x(I, { children: [
1043
+ e ? /* @__PURE__ */ n(se, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1044
+ D.InputProps.endAdornment
1022
1045
  ] })
1023
1046
  })
1024
1047
  })
1025
1048
  )
1026
1049
  }
1027
1050
  ),
1028
- w && /* @__PURE__ */ i(bt, { error: !0, children: w })
1051
+ b && /* @__PURE__ */ n(Bt, { error: !0, children: b })
1029
1052
  ]
1030
1053
  }
1031
1054
  );
1032
1055
  };
1033
- function ko({ links: e }) {
1034
- return /* @__PURE__ */ i("div", { children: "LinksMenu not implemented yet" });
1056
+ function Wo({ links: e }) {
1057
+ return /* @__PURE__ */ n("div", { children: "LinksMenu not implemented yet" });
1035
1058
  }
1036
1059
  const re = "Navbar", j = {
1037
1060
  root: `${re}-root`,
@@ -1041,7 +1064,7 @@ const re = "Navbar", j = {
1041
1064
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
1042
1065
  // settings: `${PREFIX}-settings`,
1043
1066
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
1044
- }, Fo = et(N, { name: "NavBar" })(({ theme: e }) => ({
1067
+ }, zo = lt(N, { name: "NavBar" })(({ theme: e }) => ({
1045
1068
  [`&.${j.root}`]: {
1046
1069
  display: "flex"
1047
1070
  },
@@ -1060,13 +1083,13 @@ const re = "Navbar", j = {
1060
1083
  // marginTop: '64px',
1061
1084
  // marginBottom: '16px',
1062
1085
  // },
1063
- })), X = (e, t, o) => e.transitions.create(t, {
1086
+ })), Q = (e, t, o) => e.transitions.create(t, {
1064
1087
  easing: e.transitions.easing.sharp,
1065
1088
  duration: o === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
1066
- }), _o = (e) => {
1089
+ }), qo = (e) => {
1067
1090
  const t = te();
1068
- return /* @__PURE__ */ i(
1069
- Je,
1091
+ return /* @__PURE__ */ n(
1092
+ rt,
1070
1093
  l({
1071
1094
  easing: t.transitions.easing.sharp,
1072
1095
  timeout: {
@@ -1075,7 +1098,7 @@ const re = "Navbar", j = {
1075
1098
  }
1076
1099
  }, e)
1077
1100
  );
1078
- }, ct = (e) => {
1101
+ }, xt = (e) => {
1079
1102
  var t, o;
1080
1103
  return {
1081
1104
  overflowX: "hidden",
@@ -1083,61 +1106,61 @@ const re = "Navbar", j = {
1083
1106
  backgroundColor: (o = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? o : "white"
1084
1107
  // Provide default so tests don't need to wrap theme provider
1085
1108
  };
1086
- }, $e = (e, t) => l({
1109
+ }, Ve = (e, t) => l({
1087
1110
  width: t,
1088
- transition: X(e, "width", "entering")
1089
- }, ct(e)), Be = (e, t) => l({
1111
+ transition: Q(e, "width", "entering")
1112
+ }, xt(e)), Ke = (e, t) => l({
1090
1113
  width: t,
1091
- transition: X(e, "width", "leaving")
1092
- }, ct(e)), To = et(Et, {
1114
+ transition: Q(e, "width", "leaving")
1115
+ }, xt(e)), Vo = lt(Ht, {
1093
1116
  shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
1094
- })(({ theme: e, open: t, widthOpen: o, widthClosed: n, isSmallScreen: r }) => l(l({
1117
+ })(({ theme: e, open: t, widthOpen: o, widthClosed: i, isSmallScreen: r }) => l(l({
1095
1118
  flexShrink: 0,
1096
1119
  whiteSpace: "nowrap",
1097
1120
  boxSizing: "border-box",
1098
1121
  display: "flex",
1099
1122
  flexDirection: "column"
1100
- }, t && k(l({}, $e(e, o)), {
1123
+ }, t && _(l({}, Ve(e, o)), {
1101
1124
  backgroundColor: "",
1102
- "& .MuiDrawer-paper": $e(e, o)
1103
- })), !t && k(l({}, Be(e, r ? o : n)), {
1125
+ "& .MuiDrawer-paper": Ve(e, o)
1126
+ })), !t && _(l({}, Ke(e, r ? o : i)), {
1104
1127
  backgroundColor: "",
1105
- "& .MuiDrawer-paper": Be(e, r ? o : n)
1128
+ "& .MuiDrawer-paper": Ke(e, r ? o : i)
1106
1129
  })));
1107
- function dt(e) {
1130
+ function At(e) {
1108
1131
  return e.replace(
1109
1132
  /(^|-)([a-z])/g,
1110
- (t, o, n) => o === "-" ? " " + n.toUpperCase() : n.toUpperCase()
1133
+ (t, o, i) => o === "-" ? " " + i.toUpperCase() : i.toUpperCase()
1111
1134
  );
1112
1135
  }
1113
- function An(e, t, o, n) {
1114
- var c;
1136
+ function Ln(e, t, o, i) {
1137
+ var d;
1115
1138
  if (!e) return "None";
1116
1139
  const r = e["https://greens.org.au/roles"];
1117
1140
  if (!r) return "None";
1118
- const s = Object.entries(r).filter(([, a]) => a.includes(t)).map(([a]) => dt(a));
1119
- return (c = n.find(
1120
- (a) => o[a].some((d) => s.includes(d))
1121
- )) != null ? c : "None";
1141
+ const s = Object.entries(r).filter(([, a]) => a.includes(t)).map(([a]) => At(a));
1142
+ return (d = i.find(
1143
+ (a) => o[a].some((c) => s.includes(c))
1144
+ )) != null ? d : "None";
1122
1145
  }
1123
- function Po(e, t) {
1124
- return Object.entries(e).reduce((o, [n, r]) => {
1125
- const s = dt(n), c = t.includes(s) ? r : [];
1126
- return [.../* @__PURE__ */ new Set([...o, ...c])];
1146
+ function Ko(e, t) {
1147
+ return Object.entries(e).reduce((o, [i, r]) => {
1148
+ const s = At(i), d = t.includes(s) ? r : [];
1149
+ return [.../* @__PURE__ */ new Set([...o, ...d])];
1127
1150
  }, []);
1128
1151
  }
1129
- const Sn = (e) => {
1130
- const { getIdTokenClaims: t, user: o } = ge();
1131
- return Ze({
1152
+ const In = (e) => {
1153
+ const { getIdTokenClaims: t, user: o } = xe();
1154
+ return at({
1132
1155
  queryKey: ["availableDomains", o == null ? void 0 : o.sub],
1133
- queryFn: () => R(null, null, function* () {
1134
- const n = yield t();
1135
- if (!n) return [];
1136
- const r = n["https://greens.org.au/roles"];
1137
- return r ? Po(r, e) : [];
1156
+ queryFn: () => M(null, null, function* () {
1157
+ const i = yield t();
1158
+ if (!i) return [];
1159
+ const r = i["https://greens.org.au/roles"];
1160
+ return r ? Ko(r, e) : [];
1138
1161
  })
1139
1162
  });
1140
- }, Cn = (e) => Object.values(e).reduce(
1163
+ }, Mn = (e) => Object.values(e).reduce(
1141
1164
  (t, o) => [.../* @__PURE__ */ new Set([...t, ...o])],
1142
1165
  []
1143
1166
  ), ae = {
@@ -1147,43 +1170,43 @@ const Sn = (e) => {
1147
1170
  info: console.info.bind(console),
1148
1171
  debug: console.debug.bind(console)
1149
1172
  };
1150
- function vn(e, t) {
1173
+ function Rn(e, t) {
1151
1174
  console[e] = (...o) => {
1152
- for (const n of t)
1153
- if (typeof n == "function") {
1154
- if (n(...o)) return;
1155
- } else if (n instanceof RegExp && o.length > 0) {
1175
+ for (const i of t)
1176
+ if (typeof i == "function") {
1177
+ if (i(...o)) return;
1178
+ } else if (i instanceof RegExp && o.length > 0) {
1156
1179
  for (const r of o)
1157
- if (typeof r == "string" && n.test(r))
1180
+ if (typeof r == "string" && i.test(r))
1158
1181
  return;
1159
1182
  }
1160
1183
  ae[e](o);
1161
1184
  };
1162
1185
  }
1163
- function wn(e) {
1186
+ function $n(e) {
1164
1187
  if (e)
1165
1188
  console[e] = ae[e];
1166
1189
  else
1167
1190
  for (const t of Object.keys(ae))
1168
1191
  console[t] = ae[t];
1169
1192
  }
1170
- function No(e, t) {
1193
+ function Yo(e, t) {
1171
1194
  return e != null && typeof e == "object" && "error" in e && e.error === t;
1172
1195
  }
1173
- function yn(e, t) {
1196
+ function Bn(e, t) {
1174
1197
  const o = t == null ? void 0 : t.originalException;
1175
- return No(o, "login_required") ? null : e;
1198
+ return Yo(o, "login_required") ? null : e;
1176
1199
  }
1177
- function Oo(e) {
1200
+ function Xo(e) {
1178
1201
  let t = 0;
1179
- for (let o = 0, n = e.length; o < n; o++) {
1202
+ for (let o = 0, i = e.length; o < i; o++) {
1180
1203
  const r = e.charCodeAt(o);
1181
1204
  t = (t << 5) - t + r, t |= 0;
1182
1205
  }
1183
1206
  return t;
1184
1207
  }
1185
- const He = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Ge = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
1186
- function Lo({ user: e, domainCode: t, open: o, useNewAvatar: n = !1 }) {
1208
+ const Ye = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Xe = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
1209
+ function Qo({ user: e, domainCode: t, open: o, useNewAvatar: i = !1 }) {
1187
1210
  const r = te();
1188
1211
  return /* @__PURE__ */ x(
1189
1212
  N,
@@ -1196,67 +1219,67 @@ function Lo({ user: e, domainCode: t, open: o, useNewAvatar: n = !1 }) {
1196
1219
  gap: "0.5rem"
1197
1220
  },
1198
1221
  children: [
1199
- !n && /* @__PURE__ */ i(
1222
+ !i && /* @__PURE__ */ n(
1200
1223
  N,
1201
1224
  {
1202
1225
  sx: {
1203
1226
  width: o ? "5rem" : "2rem",
1204
- transition: o ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
1227
+ transition: o ? Q(r, ["width", "height"], "entering") : Q(r, ["width", "height"], "leaving"),
1205
1228
  aspectRatio: 1
1206
1229
  },
1207
- children: e != null && e.name ? /* @__PURE__ */ i(M, { children: /* @__PURE__ */ i(
1208
- be,
1230
+ children: e != null && e.name ? /* @__PURE__ */ n(I, { children: /* @__PURE__ */ n(
1231
+ Oe,
1209
1232
  {
1210
1233
  src: e == null ? void 0 : e.picture,
1211
1234
  sx: {
1212
1235
  width: "100%",
1213
1236
  height: "100%",
1214
- bgcolor: He[Math.abs(Oo(e == null ? void 0 : e.name)) % He.length]
1237
+ bgcolor: Ye[Math.abs(Xo(e == null ? void 0 : e.name)) % Ye.length]
1215
1238
  },
1216
- children: Ge(e == null ? void 0 : e.name)
1239
+ children: Xe(e == null ? void 0 : e.name)
1217
1240
  }
1218
- ) }) : /* @__PURE__ */ i(be, { sx: { width: "100%", height: "100%" } })
1241
+ ) }) : /* @__PURE__ */ n(Oe, { sx: { width: "100%", height: "100%" } })
1219
1242
  }
1220
1243
  ),
1221
- n && /* @__PURE__ */ i(
1244
+ i && /* @__PURE__ */ n(
1222
1245
  N,
1223
1246
  {
1224
1247
  sx: {
1225
1248
  width: o ? "5rem" : "2rem",
1226
- transition: o ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
1249
+ transition: o ? Q(r, ["width", "height"], "entering") : Q(r, ["width", "height"], "leaving"),
1227
1250
  aspectRatio: 1
1228
1251
  },
1229
- children: e != null && e.name ? /* @__PURE__ */ i(M, { children: /* @__PURE__ */ x(Pe, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: o ? "80" : "32", children: [
1252
+ children: e != null && e.name ? /* @__PURE__ */ n(I, { children: /* @__PURE__ */ x(Be, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: o ? "80" : "32", children: [
1230
1253
  " ",
1231
- Ge(e == null ? void 0 : e.name),
1254
+ Xe(e == null ? void 0 : e.name),
1232
1255
  " ",
1233
1256
  "ab"
1234
- ] }) }) : /* @__PURE__ */ i(Pe, {})
1257
+ ] }) }) : /* @__PURE__ */ n(Be, {})
1235
1258
  }
1236
1259
  ),
1237
- /* @__PURE__ */ i(_o, { sx: { width: "100%" }, in: o, children: /* @__PURE__ */ i(Qe, { in: o, children: /* @__PURE__ */ x(N, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
1238
- e != null && e.name ? /* @__PURE__ */ i(I, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ i(pe, { animation: !1, width: "50%" }),
1239
- t ? /* @__PURE__ */ i(I, { children: lt(t) }) : /* @__PURE__ */ i(pe, { animation: !1, width: "25%" })
1260
+ /* @__PURE__ */ n(qo, { sx: { width: "100%" }, in: o, children: /* @__PURE__ */ n(it, { in: o, children: /* @__PURE__ */ x(N, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
1261
+ e != null && e.name ? /* @__PURE__ */ n(L, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ n(he, { animation: !1, width: "50%" }),
1262
+ t ? /* @__PURE__ */ n(L, { children: gt(t) }) : /* @__PURE__ */ n(he, { animation: !1, width: "25%" })
1240
1263
  ] }) }) })
1241
1264
  ]
1242
1265
  }
1243
1266
  );
1244
1267
  }
1245
- function Io({
1268
+ function Jo({
1246
1269
  open: e,
1247
1270
  widthClosed: t,
1248
1271
  widthOpen: o,
1249
- "data-testid": n,
1272
+ "data-testid": i,
1250
1273
  top: r,
1251
1274
  middle: s,
1252
- bottom: c,
1275
+ bottom: d,
1253
1276
  user: a,
1254
- domainCode: d,
1277
+ domainCode: c,
1255
1278
  useNewAvatar: u = !1
1256
1279
  }) {
1257
- const m = xe(), h = je(ee);
1258
- return /* @__PURE__ */ i(Fo, { className: j.root, "data-testid": n, children: /* @__PURE__ */ x(
1259
- To,
1280
+ const m = Ae(), h = st(ee);
1281
+ return /* @__PURE__ */ n(zo, { className: j.root, "data-testid": i, children: /* @__PURE__ */ x(
1282
+ Vo,
1260
1283
  {
1261
1284
  open: e,
1262
1285
  widthOpen: o,
@@ -1271,28 +1294,28 @@ function Io({
1271
1294
  },
1272
1295
  isSmallScreen: m,
1273
1296
  children: [
1274
- !m && /* @__PURE__ */ i(kt, {}),
1297
+ !m && /* @__PURE__ */ n(Gt, {}),
1275
1298
  r && /* @__PURE__ */ x(N, { flexGrow: "0", children: [
1276
1299
  r,
1277
- /* @__PURE__ */ i(Ee, { variant: "middle", sx: { marginY: "0.5rem" } })
1300
+ /* @__PURE__ */ n(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
1278
1301
  ] }),
1279
- /* @__PURE__ */ i(N, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ i(ko, { links: s }) : s }),
1302
+ /* @__PURE__ */ n(N, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ n(Wo, { links: s }) : s }),
1280
1303
  /* @__PURE__ */ x(N, { flexGrow: "0", children: [
1281
- /* @__PURE__ */ i(Ee, { variant: "middle", sx: { marginY: "0.5rem" } }),
1282
- /* @__PURE__ */ i(Lo, { user: a, domainCode: d, open: e, useNewAvatar: u }),
1283
- c && /* @__PURE__ */ i(M, { children: c })
1304
+ /* @__PURE__ */ n(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
1305
+ /* @__PURE__ */ n(Qo, { user: a, domainCode: c, open: e, useNewAvatar: u }),
1306
+ d && /* @__PURE__ */ n(I, { children: d })
1284
1307
  ] })
1285
1308
  ]
1286
1309
  }
1287
1310
  ) });
1288
1311
  }
1289
- function Mo({
1312
+ function Zo({
1290
1313
  children: e,
1291
1314
  topBarHeight: t,
1292
1315
  maxWidth: o = !1,
1293
- noPadding: n
1316
+ noPadding: i
1294
1317
  }) {
1295
- return /* @__PURE__ */ i(
1318
+ return /* @__PURE__ */ n(
1296
1319
  N,
1297
1320
  {
1298
1321
  tabIndex: 0,
@@ -1301,23 +1324,23 @@ function Mo({
1301
1324
  height: `calc(100vh - ${t}px)`,
1302
1325
  flexGrow: 1
1303
1326
  },
1304
- children: n ? /* @__PURE__ */ i(N, { height: "inherit", children: e }) : /* @__PURE__ */ i(Ft, { maxWidth: o, sx: { paddingTop: 3, paddingBottom: 3, flexGrow: 1 }, children: e })
1327
+ children: i ? /* @__PURE__ */ n(N, { height: "inherit", children: e }) : /* @__PURE__ */ n(Ut, { maxWidth: o, sx: { paddingTop: 3, paddingBottom: 3, flexGrow: 1 }, children: e })
1305
1328
  }
1306
1329
  );
1307
1330
  }
1308
- const Ro = "TopBar", $o = {
1309
- titleText: `${Ro}-titleText`
1331
+ const jo = "TopBar", en = {
1332
+ titleText: `${jo}-titleText`
1310
1333
  };
1311
- function Bo({
1334
+ function tn({
1312
1335
  titleText: e = "",
1313
1336
  height: t,
1314
1337
  "data-testid": o,
1315
- middle: n,
1338
+ middle: i,
1316
1339
  menuButtonAriaLabel: r = "Open navigation menu"
1317
1340
  }) {
1318
- const s = je(ee), c = () => s((u) => !u), a = te(), d = xe();
1319
- return /* @__PURE__ */ i("header", { "data-testid": o, children: /* @__PURE__ */ x(
1320
- We,
1341
+ const s = st(ee), d = () => s((u) => !u), a = te(), c = Ae();
1342
+ return /* @__PURE__ */ n("header", { "data-testid": o, children: /* @__PURE__ */ x(
1343
+ Je,
1321
1344
  {
1322
1345
  square: !0,
1323
1346
  elevation: 0,
@@ -1331,88 +1354,88 @@ function Bo({
1331
1354
  gap: 2,
1332
1355
  flexShrink: 0,
1333
1356
  height: t,
1334
- zIndex: d ? 0 : a.zIndex.drawer + 99
1357
+ zIndex: c ? 0 : a.zIndex.drawer + 99
1335
1358
  },
1336
1359
  children: [
1337
- /* @__PURE__ */ i(
1338
- _t,
1360
+ /* @__PURE__ */ n(
1361
+ Wt,
1339
1362
  {
1340
1363
  size: "medium",
1341
1364
  color: "inherit",
1342
1365
  sx: { padding: 1.5, marginLeft: "12px" },
1343
- onClick: c,
1366
+ onClick: d,
1344
1367
  "aria-label": r,
1345
- children: /* @__PURE__ */ i(Lt, { fontSize: "medium" })
1368
+ children: /* @__PURE__ */ n(Yt, { fontSize: "medium" })
1346
1369
  }
1347
1370
  ),
1348
- /* @__PURE__ */ i(I, { className: $o.titleText, variant: "h6", component: "h1", children: e }),
1349
- n
1371
+ /* @__PURE__ */ n(L, { className: en.titleText, variant: "h6", component: "h1", children: e }),
1372
+ i
1350
1373
  ]
1351
1374
  }
1352
1375
  ) });
1353
1376
  }
1354
- function Dn({
1377
+ function Hn({
1355
1378
  children: e,
1356
1379
  initialTitleText: t,
1357
1380
  initialNavBarOpen: o,
1358
- pageContainerProps: n,
1381
+ pageContainerProps: i,
1359
1382
  pageContentDataTestId: r,
1360
1383
  topBarDataTestId: s,
1361
- menuButtonAriaLabel: c,
1384
+ menuButtonAriaLabel: d,
1362
1385
  navBarDataTestId: a,
1363
- navBarMiddle: d,
1386
+ navBarMiddle: c,
1364
1387
  navBarBottom: u,
1365
1388
  user: m,
1366
1389
  domainCode: h,
1367
- useNewAvatar: C = !1
1390
+ useNewAvatar: v = !1
1368
1391
  }) {
1369
- Wt([
1392
+ no([
1370
1393
  [ee, o != null ? o : !0],
1371
- [Ne, t != null ? t : ""]
1394
+ [He, t != null ? t : ""]
1372
1395
  ]);
1373
- const g = ke(ee), [S] = V(jt), [v] = V(eo), f = ke(Ne), [w] = V(oo), [F] = V(to), [_] = V(no);
1374
- return /* @__PURE__ */ x(Te, { children: [
1375
- /* @__PURE__ */ i(Ut, {}),
1376
- /* @__PURE__ */ i(
1377
- Bo,
1396
+ const g = Ie(ee), [y] = V(fo), [A] = V(mo), f = Ie(He), [b] = V(xo), [D] = V(go), [F] = V(Ao);
1397
+ return /* @__PURE__ */ x($e, { children: [
1398
+ /* @__PURE__ */ n(oo, {}),
1399
+ /* @__PURE__ */ n(
1400
+ tn,
1378
1401
  {
1379
1402
  titleText: f,
1380
1403
  "data-testid": s,
1381
- height: w,
1382
- middle: F,
1383
- menuButtonAriaLabel: c
1404
+ height: b,
1405
+ middle: D,
1406
+ menuButtonAriaLabel: d
1384
1407
  }
1385
1408
  ),
1386
- /* @__PURE__ */ x(Te, { sx: { display: "flex" }, children: [
1387
- /* @__PURE__ */ i(
1388
- Io,
1409
+ /* @__PURE__ */ x($e, { sx: { display: "flex" }, children: [
1410
+ /* @__PURE__ */ n(
1411
+ Jo,
1389
1412
  {
1390
1413
  open: g,
1391
- top: _,
1392
- middle: d,
1414
+ top: F,
1415
+ middle: c,
1393
1416
  bottom: u,
1394
1417
  user: m,
1395
1418
  domainCode: h,
1396
- widthOpen: S,
1397
- widthClosed: v,
1398
- offsetTop: w,
1419
+ widthOpen: y,
1420
+ widthClosed: A,
1421
+ offsetTop: b,
1399
1422
  "data-testid": a,
1400
- useNewAvatar: C
1423
+ useNewAvatar: v
1401
1424
  }
1402
1425
  ),
1403
- /* @__PURE__ */ i(
1404
- Mo,
1405
- k(l({
1426
+ /* @__PURE__ */ n(
1427
+ Zo,
1428
+ _(l({
1406
1429
  "data-testid": r,
1407
- topBarHeight: w
1408
- }, n), {
1430
+ topBarHeight: b
1431
+ }, i), {
1409
1432
  children: e
1410
1433
  })
1411
1434
  )
1412
1435
  ] })
1413
1436
  ] });
1414
1437
  }
1415
- const bn = tt({
1438
+ const Gn = ct({
1416
1439
  palette: {
1417
1440
  primary: {
1418
1441
  dark: "#00A651",
@@ -1463,7 +1486,7 @@ const bn = tt({
1463
1486
  navBar: {
1464
1487
  backgroundColor: "#E8E8E8"
1465
1488
  }
1466
- }), En = tt({
1489
+ }), Un = ct({
1467
1490
  palette: {
1468
1491
  primary: {
1469
1492
  main: "#007236",
@@ -1517,18 +1540,18 @@ const bn = tt({
1517
1540
  styleOverrides: {
1518
1541
  root: ({ theme: e }) => ({
1519
1542
  "&.Mui-selected": {
1520
- backgroundColor: de(
1543
+ backgroundColor: ue(
1521
1544
  e.palette.secondary.main,
1522
1545
  e.palette.action.selectedOpacity
1523
1546
  ),
1524
1547
  "&:hover": {
1525
- backgroundColor: de(
1548
+ backgroundColor: ue(
1526
1549
  e.palette.secondary.main,
1527
1550
  e.palette.action.selectedOpacity
1528
1551
  )
1529
1552
  },
1530
1553
  "&.Mui-focusVisible": {
1531
- backgroundColor: de(
1554
+ backgroundColor: ue(
1532
1555
  e.palette.secondary.main,
1533
1556
  e.palette.action.focusOpacity
1534
1557
  )
@@ -1559,45 +1582,45 @@ const bn = tt({
1559
1582
  }
1560
1583
  });
1561
1584
  export {
1562
- mn as AgDataGrid,
1563
- ot as AgDialog,
1564
- Dn as AppLayout,
1565
- hn as AuthGuard,
1566
- rt as Context,
1567
- at as ContextError,
1568
- bo as DOMAIN_CODE_LABELS,
1569
- xn as DomainCodeDialog,
1570
- ln as ExampleComponent,
1571
- cn as FetchAutocomplete,
1572
- dn as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
1573
- fn as NavBarLink,
1574
- io as NavBarLinkInner,
1575
- yo as SaladBarProvider,
1576
- pn as SessionExpiryDialog,
1577
- un as SingleAutocomplete,
1578
- uo as TableLoadingSkeleton,
1579
- An as determineUserLevelFromClaims,
1580
- Eo as domainCodeAtom,
1581
- bn as fed21Theme,
1582
- zt as getAuth0Expiry,
1583
- lt as getDomainOptionLabel,
1584
- Po as getDomainsFromRolesClaim,
1585
- Cn as getValidBusinessRoles,
1586
- En as internalAgSystemsTheme,
1585
+ Pn as AgDataGrid,
1586
+ dt as AgDialog,
1587
+ Hn as AppLayout,
1588
+ Fn as AuthGuard,
1589
+ ht as Context,
1590
+ ft as ContextError,
1591
+ Go as DOMAIN_CODE_LABELS,
1592
+ On as DomainCodeDialog,
1593
+ wn as ExampleComponent,
1594
+ bn as FetchAutocomplete,
1595
+ En as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
1596
+ Tn as NavBarLink,
1597
+ Co as NavBarLinkInner,
1598
+ Bo as SaladBarProvider,
1599
+ _n as SessionExpiryDialog,
1600
+ kn as SingleAutocomplete,
1601
+ bo as TableLoadingSkeleton,
1602
+ Ln as determineUserLevelFromClaims,
1603
+ Uo as domainCodeAtom,
1604
+ Gn as fed21Theme,
1605
+ ro as getAuth0Expiry,
1606
+ gt as getDomainOptionLabel,
1607
+ Ko as getDomainsFromRolesClaim,
1608
+ Mn as getValidBusinessRoles,
1609
+ Un as internalAgSystemsTheme,
1587
1610
  ee as navBarOpenAtom,
1588
- no as navBarTopAtom,
1589
- eo as navBarWidthClosedAtom,
1590
- jt as navBarWidthOpenAtom,
1591
- yn as sentryBeforeSend,
1592
- Oo as simpleHashCode,
1593
- vn as suppressConsole,
1594
- Ne as titleTextAtom,
1595
- oo as topBarHeightAtom,
1596
- to as topBarMiddleAtom,
1597
- wn as unsuppressConsole,
1598
- it as useAutocompleteOptions,
1599
- Do as useSaladBar,
1600
- Sn as useValidDomains,
1601
- gn as withSaladBarProvider
1611
+ Ao as navBarTopAtom,
1612
+ mo as navBarWidthClosedAtom,
1613
+ fo as navBarWidthOpenAtom,
1614
+ Bn as sentryBeforeSend,
1615
+ Xo as simpleHashCode,
1616
+ Rn as suppressConsole,
1617
+ He as titleTextAtom,
1618
+ xo as topBarHeightAtom,
1619
+ go as topBarMiddleAtom,
1620
+ $n as unsuppressConsole,
1621
+ pt as useAutocompleteOptions,
1622
+ Ho as useSaladBar,
1623
+ In as useValidDomains,
1624
+ Nn as withSaladBarProvider
1602
1625
  };
1603
1626
  //# sourceMappingURL=index.js.map