@australiangreens/ag-internal-components 0.0.89 → 0.0.90

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,27 +1,27 @@
1
1
  var Pt = Object.defineProperty, Nt = Object.defineProperties;
2
2
  var Lt = Object.getOwnPropertyDescriptors;
3
- var j = Object.getOwnPropertySymbols;
4
- var Te = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
5
- var pe = (e, t, n) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, s = (e, t) => {
3
+ var ee = Object.getOwnPropertySymbols;
4
+ var Te = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
5
+ var he = (e, t, n) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, a = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
- Te.call(t, n) && pe(e, n, t[n]);
8
- if (j)
9
- for (var n of j(t))
10
- Oe.call(t, n) && pe(e, n, t[n]);
7
+ Te.call(t, n) && he(e, n, t[n]);
8
+ if (ee)
9
+ for (var n of ee(t))
10
+ Be.call(t, n) && he(e, n, t[n]);
11
11
  return e;
12
12
  }, S = (e, t) => Nt(e, Lt(t));
13
- var Be = (e, t) => {
13
+ var Ee = (e, t) => {
14
14
  var n = {};
15
15
  for (var i in e)
16
16
  Te.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
17
- if (e != null && j)
18
- for (var i of j(e))
19
- t.indexOf(i) < 0 && Oe.call(e, i) && (n[i] = e[i]);
17
+ if (e != null && ee)
18
+ for (var i of ee(e))
19
+ t.indexOf(i) < 0 && Be.call(e, i) && (n[i] = e[i]);
20
20
  return n;
21
21
  };
22
- var Ee = (e, t, n) => (pe(e, typeof t != "symbol" ? t + "" : t, n), n);
23
- var N = (e, t, n) => new Promise((i, r) => {
24
- var a = (l) => {
22
+ var Fe = (e, t, n) => (he(e, typeof t != "symbol" ? t + "" : t, n), n);
23
+ var P = (e, t, n) => new Promise((i, r) => {
24
+ var s = (l) => {
25
25
  try {
26
26
  d(n.next(l));
27
27
  } catch (u) {
@@ -33,34 +33,34 @@ var N = (e, t, n) => new Promise((i, r) => {
33
33
  } catch (u) {
34
34
  r(u);
35
35
  }
36
- }, d = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(a, c);
36
+ }, d = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(s, c);
37
37
  d((n = n.apply(e, t)).next());
38
38
  });
39
- import { jsxs as p, Fragment as M, jsx as o } from "react/jsx-runtime";
40
- import { useState as E, createContext as Qe, useCallback as ne, useContext as Ye, useEffect as oe, createElement as Ce, useRef as he } from "react";
41
- import { Typography as P, Button as ie, Paper as Ke, Box as $, Drawer as ve, styled as we, IconButton as Y, Container as Je, useTheme as ae, useMediaQuery as _t, Collapse as Mt, Avatar as Fe, Fade as Rt, Skeleton as Pe, Toolbar as Ht, Divider as Ne, CssBaseline as Wt, Dialog as Ze, LinearProgress as je, DialogTitle as et, DialogContent as tt, DialogActions as nt, Autocomplete as Ae, TextField as be, CircularProgress as Se, Chip as zt, Tooltip as Ut, Stack as Gt, Snackbar as Vt, Alert as qt, FormHelperText as Xt } from "@mui/material";
39
+ import { jsxs as h, Fragment as N, jsx as o } from "react/jsx-runtime";
40
+ import { useState as E, createContext as Ye, useCallback as oe, useContext as Ke, useEffect as ie, createElement as xe, useRef as ge } from "react";
41
+ import { Typography as F, Button as re, Paper as Je, Box as $, Drawer as we, styled as Ae, IconButton as Y, Container as Ze, useTheme as se, useMediaQuery as _t, Collapse as Mt, Avatar as Pe, Fade as Rt, Skeleton as Ne, Toolbar as Ht, Divider as Le, CssBaseline as Wt, Dialog as je, LinearProgress as et, DialogTitle as tt, DialogContent as nt, DialogActions as ot, Autocomplete as be, TextField as Se, CircularProgress as ke, Chip as zt, Tooltip as Ut, Stack as Gt, Snackbar as Vt, Alert as qt, FormHelperText as Xt } from "@mui/material";
42
42
  import Qt from "@mui/material/CssBaseline";
43
- import { styled as H, createTheme as ot, alpha as ge } from "@mui/material/styles";
43
+ import { styled as M, createTheme as it, alpha as fe } from "@mui/material/styles";
44
44
  import { AgError as Yt } from "@australiangreens/ag-error";
45
45
  import { createHelper as X } from "souvlaki";
46
46
  import { BrowserRouter as Kt } from "react-router-dom";
47
- import it from "@mui/material/List";
48
- import { ArrowForward as rt, ArrowBack as at, ViewHeadline as Jt, Cancel as Zt, ArrowDropDown as jt } from "@mui/icons-material";
49
- import { atom as R, useSetAtom as st, useAtomValue as Le, useAtom as V, getDefaultStore as en, Provider as lt } from "jotai";
50
- import { useHydrateAtoms as ct } from "jotai/utils";
47
+ import rt from "@mui/material/List";
48
+ import { ArrowForward as at, ArrowBack as st, ViewHeadline as Jt, Cancel as Zt, ArrowDropDown as jt } from "@mui/icons-material";
49
+ import { atom as L, useSetAtom as lt, useAtomValue as _e, useAtom as V, getDefaultStore as en, Provider as ct } from "jotai";
50
+ import { useHydrateAtoms as dt } from "jotai/utils";
51
51
  import tn from "autosuggest-highlight/match";
52
52
  import nn from "autosuggest-highlight/parse";
53
53
  import { useQuery as on, QueryClient as rn, QueryClientProvider as an } from "@tanstack/react-query";
54
- import { useAuth0 as dt } from "@auth0/auth0-react";
54
+ import { useAuth0 as ut } from "@auth0/auth0-react";
55
55
  import { Buffer as sn } from "buffer";
56
56
  import ln from "@mui/material/Skeleton";
57
57
  function $o({ text: e }) {
58
58
  const [t, n] = E(0);
59
- return /* @__PURE__ */ p(M, { children: [
60
- /* @__PURE__ */ o(P, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
61
- /* @__PURE__ */ o(P, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
59
+ return /* @__PURE__ */ h(N, { children: [
60
+ /* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
61
+ /* @__PURE__ */ o(F, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
62
62
  /* @__PURE__ */ o(
63
- ie,
63
+ re,
64
64
  {
65
65
  variant: "outlined",
66
66
  onClick: () => n((i) => i + 1),
@@ -68,17 +68,17 @@ function $o({ text: e }) {
68
68
  children: "Hello I am a button"
69
69
  }
70
70
  ),
71
- /* @__PURE__ */ p("p", { children: [
71
+ /* @__PURE__ */ h("p", { children: [
72
72
  "This is some text: ",
73
73
  /* @__PURE__ */ o("span", { children: e })
74
74
  ] }),
75
- /* @__PURE__ */ p(Ke, { children: [
75
+ /* @__PURE__ */ h(Je, { children: [
76
76
  "This number will incremember when button pressed: ",
77
77
  t
78
78
  ] })
79
79
  ] });
80
80
  }
81
- const ut = 330, pt = 73, U = "Navbar", q = {
81
+ const pt = 330, ht = 73, U = "Navbar", q = {
82
82
  root: `${U}-root`,
83
83
  menuButton: `${U}-menuButton`,
84
84
  hide: `${U}-hide`,
@@ -86,7 +86,7 @@ const ut = 330, pt = 73, U = "Navbar", q = {
86
86
  userInfoHolder: `${U}-userInfoHolder`,
87
87
  settings: `${U}-settings`,
88
88
  pieChartIcon: `${U}-pieChartIcon`
89
- }, cn = H($, {
89
+ }, cn = M($, {
90
90
  name: "NavBar"
91
91
  })(({ theme: e }) => ({
92
92
  [`&.${q.root}`]: {
@@ -107,7 +107,7 @@ const ut = 330, pt = 73, U = "Navbar", q = {
107
107
  marginTop: "64px",
108
108
  marginBottom: "16px"
109
109
  }
110
- })), ht = () => ({
110
+ })), gt = () => ({
111
111
  position: "absolute",
112
112
  height: "100%",
113
113
  overflowX: "hidden",
@@ -115,14 +115,14 @@ const ut = 330, pt = 73, U = "Navbar", q = {
115
115
  color: "white",
116
116
  backgroundColor: "black"
117
117
  // backgroundColor: '#e8e8e8',
118
- }), dn = () => s({
119
- width: ut
120
- }, ht()), un = () => s({
118
+ }), dn = () => a({
121
119
  width: pt
122
- }, ht()), pn = H(ve, {
120
+ }, gt()), un = () => a({
121
+ width: ht
122
+ }, gt()), pn = M(we, {
123
123
  shouldForwardProp: (e) => e !== "open"
124
- })(({ theme: e, open: t }) => s(s({
125
- width: t ? ut : pt,
124
+ })(({ theme: e, open: t }) => a(a({
125
+ width: t ? pt : ht,
126
126
  flexShrink: 0,
127
127
  whiteSpace: "nowrap",
128
128
  boxSizing: "border-box",
@@ -132,34 +132,34 @@ const ut = 330, pt = 73, U = "Navbar", q = {
132
132
  }), !t && {
133
133
  "& .MuiDrawer-paper": un()
134
134
  }));
135
- class ke extends Yt {
135
+ class De extends Yt {
136
136
  }
137
- Ee(ke, "errorName", "ContextError");
138
- const gt = Qe(null), hn = {}, gn = {}, fn = ({
137
+ Fe(De, "errorName", "ContextError");
138
+ const ft = Ye(null), hn = {}, gn = {}, fn = ({
139
139
  overrideState: e = hn,
140
140
  overrideActions: t = gn,
141
141
  children: n
142
142
  }) => {
143
- const [{ open: i }, r] = E({ open: !0 }), a = ne((l) => {
143
+ const [{ open: i }, r] = E({ open: !0 }), s = oe((l) => {
144
144
  r({ open: l });
145
- }, []), c = ne(() => {
146
- r((l) => S(s({}, l), { open: !l.open }));
147
- }, []), d = s(s({
145
+ }, []), c = oe(() => {
146
+ r((l) => S(a({}, l), { open: !l.open }));
147
+ }, []), d = a(a({
148
148
  open: i,
149
- setOpen: a,
149
+ setOpen: s,
150
150
  toggleOpen: c
151
151
  }, e), t);
152
- return /* @__PURE__ */ o(gt.Provider, { value: d, children: n });
152
+ return /* @__PURE__ */ o(ft.Provider, { value: d, children: n });
153
153
  }, mn = () => {
154
- const e = Ye(gt);
154
+ const e = Ke(ft);
155
155
  if (e === null)
156
- throw new ke("Error: Tried to useNavBar outside of a <NavBarProvider>");
156
+ throw new De("Error: Tried to useNavBar outside of a <NavBarProvider>");
157
157
  return e;
158
- }, Cn = (e = {}) => s({
158
+ }, Cn = (e = {}) => a({
159
159
  open: !0
160
160
  }, e), Io = X(
161
161
  (e = Cn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(fn, { overrideState: e, overrideActions: t, children: n })
162
- ), To = X(() => ({ children: e }) => /* @__PURE__ */ o(Kt, { children: e })), _e = 7, Oo = H(it)(({ theme: e }) => ({
162
+ ), Oo = X(() => ({ children: e }) => /* @__PURE__ */ o(Kt, { children: e })), Me = 7, To = M(rt)(({ theme: e }) => ({
163
163
  backgroundColor: "black",
164
164
  color: "white",
165
165
  "& .MuiListItem-root": {
@@ -168,7 +168,7 @@ const gt = Qe(null), hn = {}, gn = {}, fn = ({
168
168
  "& .MuiListItemButton-root": {
169
169
  " .MuiListItemIcon-root": {
170
170
  color: "white",
171
- padding: `${_e}px`
171
+ padding: `${Me}px`
172
172
  },
173
173
  // Focus state
174
174
  "&.Mui-focusVisible": {
@@ -179,7 +179,7 @@ const gt = Qe(null), hn = {}, gn = {}, fn = ({
179
179
  borderLeftStyle: "solid",
180
180
  borderLeftWidth: "7px",
181
181
  borderLeftColor: e.palette.primary.main,
182
- paddingLeft: `calc(${e.spacing(2)} - ${_e}px)`
182
+ paddingLeft: `calc(${e.spacing(2)} - ${Me}px)`
183
183
  },
184
184
  // Hover state
185
185
  "&:hover": {
@@ -197,7 +197,7 @@ const gt = Qe(null), hn = {}, gn = {}, fn = ({
197
197
  // '&.Mui-selected.Mui-focusVisible:hover': {
198
198
  // },
199
199
  }
200
- })), Me = 7, Bo = H(it)(({ theme: e }) => ({
200
+ })), Re = 7, Bo = M(rt)(({ theme: e }) => ({
201
201
  backgroundColor: "#e8e8e8",
202
202
  color: "inherit",
203
203
  "& .MuiListItem-root": {
@@ -206,7 +206,7 @@ const gt = Qe(null), hn = {}, gn = {}, fn = ({
206
206
  "& .MuiListItemButton-root": {
207
207
  " .MuiListItemIcon-root": {
208
208
  color: "inherit",
209
- padding: `${Me}px`
209
+ padding: `${Re}px`
210
210
  },
211
211
  // Focus state
212
212
  "&.Mui-focusVisible": {
@@ -217,7 +217,7 @@ const gt = Qe(null), hn = {}, gn = {}, fn = ({
217
217
  borderLeftStyle: "solid",
218
218
  borderLeftWidth: "7px",
219
219
  borderLeftColor: e.palette.primary.main,
220
- paddingLeft: `calc(${e.spacing(2)} - ${Me}px)`
220
+ paddingLeft: `calc(${e.spacing(2)} - ${Re}px)`
221
221
  },
222
222
  // Hover state
223
223
  "&:hover": {
@@ -241,7 +241,7 @@ function Eo({
241
241
  children: t
242
242
  }) {
243
243
  const { open: n } = mn();
244
- return /* @__PURE__ */ p(cn, { className: q.root, "data-testid": e, children: [
244
+ return /* @__PURE__ */ h(cn, { className: q.root, "data-testid": e, children: [
245
245
  /* @__PURE__ */ o(Qt, {}),
246
246
  /* @__PURE__ */ o(
247
247
  pn,
@@ -262,7 +262,7 @@ const xn = 24, vn = 64, G = "TopBar", B = {
262
262
  titleText: `${G}-titleText`,
263
263
  leftPanelButton: `${G}-leftPanelButton`,
264
264
  rightPanelButton: `${G}-leftPanelButton`
265
- }, wn = we("div", {
265
+ }, wn = Ae("div", {
266
266
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
267
267
  name: G
268
268
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -280,7 +280,7 @@ const xn = 24, vn = 64, G = "TopBar", B = {
280
280
  padding: e.spacing(0, 3),
281
281
  width: "100%"
282
282
  },
283
- [`& .${B.titleSlider}`]: s(s({
283
+ [`& .${B.titleSlider}`]: a(a({
284
284
  height: "100%",
285
285
  display: "flex",
286
286
  alignItems: "center",
@@ -320,10 +320,10 @@ function An({
320
320
  rightPanel: n,
321
321
  "data-testid": i
322
322
  }) {
323
- return /* @__PURE__ */ p(wn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
323
+ return /* @__PURE__ */ h(wn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
324
324
  /* @__PURE__ */ o("div", { className: B.topStripe }),
325
- /* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ p($, { className: B.titleSlider, children: [
326
- t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ p(
325
+ /* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ h($, { className: B.titleSlider, children: [
326
+ t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ h(
327
327
  Y,
328
328
  {
329
329
  className: B.leftPanelButton,
@@ -334,12 +334,12 @@ function An({
334
334
  size: "large",
335
335
  children: [
336
336
  " ",
337
- /* @__PURE__ */ o(rt, {})
337
+ /* @__PURE__ */ o(at, {})
338
338
  ]
339
339
  }
340
340
  ),
341
- /* @__PURE__ */ o(P, { className: B.titleText, variant: "h6", noWrap: !0, children: e }),
342
- n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ p(
341
+ /* @__PURE__ */ o(F, { className: B.titleText, variant: "h6", noWrap: !0, children: e }),
342
+ n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ h(
343
343
  Y,
344
344
  {
345
345
  className: B.rightPanelButton,
@@ -350,14 +350,14 @@ function An({
350
350
  size: "large",
351
351
  children: [
352
352
  " ",
353
- /* @__PURE__ */ o(at, {})
353
+ /* @__PURE__ */ o(st, {})
354
354
  ]
355
355
  }
356
356
  )
357
357
  ] }) })
358
358
  ] });
359
359
  }
360
- const ft = 400, bn = we(ve, {
360
+ const mt = 400, bn = Ae(we, {
361
361
  shouldForwardProp: (e) => (
362
362
  // Note we do want anchor to be forwarded to the Drawer component
363
363
  ![
@@ -371,9 +371,9 @@ const ft = 400, bn = we(ve, {
371
371
  ),
372
372
  name: "SidePanelDrawer"
373
373
  })(
374
- ({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: i, navBarWidthOpen: r, navBarWidthClosed: a }) => ({
374
+ ({ width: e, debugOpacity: t = !1, anchor: n, navBarOpen: i, navBarWidthOpen: r, navBarWidthClosed: s }) => ({
375
375
  width: e,
376
- "& .MuiDrawer-paper": s(s({
376
+ "& .MuiDrawer-paper": a(a({
377
377
  position: "absolute",
378
378
  width: e,
379
379
  boxSizing: "border-box",
@@ -381,15 +381,15 @@ const ft = 400, bn = we(ve, {
381
381
  boxShadow: "0px 4px 5px rgba(0, 0, 0, 0.14), 0px 1px 10px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2)"
382
382
  }, t && {
383
383
  opacity: "50%"
384
- }), n === "left" && s({
385
- marginLeft: `${a}px`
384
+ }), n === "left" && a({
385
+ marginLeft: `${s}px`
386
386
  }, i && {
387
387
  marginLeft: `${r}px`
388
388
  }))
389
389
  })
390
- ), Sn = we($, {
390
+ ), Sn = Ae($, {
391
391
  shouldForwardProp: (e) => !["anchor"].includes(e)
392
- })(({ theme: e, anchor: t }) => S(s({
392
+ })(({ theme: e, anchor: t }) => S(a({
393
393
  display: "flex",
394
394
  alignItems: "center",
395
395
  padding: e.spacing(2)
@@ -407,25 +407,25 @@ const ft = 400, bn = we(ve, {
407
407
  marginRight: t === "right" ? e.spacing(2) : 0
408
408
  }
409
409
  }));
410
- function Re({
410
+ function He({
411
411
  children: e,
412
412
  anchor: t = "left",
413
413
  open: n,
414
414
  onClose: i = () => {
415
415
  },
416
416
  titleText: r = "",
417
- width: a = ft,
417
+ width: s = mt,
418
418
  showCloseArrow: c = !0,
419
419
  debugOpacity: d = !1,
420
420
  headerBoxProps: l = {},
421
421
  onOpened: u,
422
422
  onClosed: v,
423
- "data-testid": C,
423
+ "data-testid": x,
424
424
  navBarOpen: w = !1,
425
425
  navBarWidthOpen: g = 0,
426
426
  navBarWidthClosed: D = 0
427
427
  }) {
428
- return /* @__PURE__ */ p(
428
+ return /* @__PURE__ */ h(
429
429
  bn,
430
430
  {
431
431
  SlideProps: {
@@ -435,37 +435,37 @@ function Re({
435
435
  variant: "persistent",
436
436
  anchor: t,
437
437
  open: n,
438
- width: a,
438
+ width: s,
439
439
  debugOpacity: d,
440
- "data-testid": C,
440
+ "data-testid": x,
441
441
  navBarOpen: w,
442
442
  navBarWidthOpen: g,
443
443
  navBarWidthClosed: D,
444
444
  children: [
445
- /* @__PURE__ */ o(Sn, S(s({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ p(M, { children: [
446
- /* @__PURE__ */ o(P, { variant: "h6", color: "inherit", component: "div", children: r }),
447
- c && /* @__PURE__ */ p(Y, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
448
- /* @__PURE__ */ o(at, { "data-testid": "arrowbackicon" }),
445
+ /* @__PURE__ */ o(Sn, S(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ h(N, { children: [
446
+ /* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r }),
447
+ c && /* @__PURE__ */ h(Y, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
448
+ /* @__PURE__ */ o(st, { "data-testid": "arrowbackicon" }),
449
449
  " "
450
450
  ] })
451
- ] }) : /* @__PURE__ */ p(M, { children: [
452
- c && /* @__PURE__ */ p(Y, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
453
- /* @__PURE__ */ o(rt, {}),
451
+ ] }) : /* @__PURE__ */ h(N, { children: [
452
+ c && /* @__PURE__ */ h(Y, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
453
+ /* @__PURE__ */ o(at, {}),
454
454
  " "
455
455
  ] }),
456
- /* @__PURE__ */ o(P, { variant: "h6", color: "inherit", component: "div", children: r })
456
+ /* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r })
457
457
  ] }) })),
458
458
  e
459
459
  ]
460
460
  }
461
461
  );
462
462
  }
463
- const kn = H($, {
463
+ const kn = M($, {
464
464
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
465
465
  name: "PanelAwareMargins"
466
466
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
467
467
  var i, r;
468
- return s(s({
468
+ return a(a({
469
469
  transition: e.transitions.create("margin", {
470
470
  easing: e.transitions.easing.sharp,
471
471
  duration: e.transitions.duration.leavingScreen
@@ -483,22 +483,22 @@ const kn = H($, {
483
483
  }),
484
484
  marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
485
485
  });
486
- }), Dn = H(Je, {
486
+ }), Dn = M(Ze, {
487
487
  name: "PageContainer"
488
488
  })(({ theme: e }) => ({
489
489
  // Horizontal padding comes from the Container's gutter
490
490
  paddingTop: e.spacing(3),
491
491
  paddingBottom: e.spacing(3)
492
492
  // TODO: Remove max width
493
- })), fe = !1, me = !1, ee = {
493
+ })), me = !1, Ce = !1, te = {
494
494
  titleText: "",
495
495
  flavour: "push",
496
- width: ft,
496
+ width: mt,
497
497
  arrowButtons: "both",
498
498
  startOpen: !1,
499
499
  open: void 0,
500
500
  onChangeOpen: void 0,
501
- content: /* @__PURE__ */ o(M, {}),
501
+ content: /* @__PURE__ */ o(N, {}),
502
502
  onOpened: void 0,
503
503
  onClosed: void 0,
504
504
  dataTestId: void 0
@@ -509,143 +509,143 @@ function Fo({
509
509
  leftPanel: n,
510
510
  rightPanel: i,
511
511
  sidePanelsAreMutuallyExclusive: r = !0,
512
- debugOpacity: a = !1,
512
+ debugOpacity: s = !1,
513
513
  pageContainerProps: c,
514
514
  pageContentDataTestId: d,
515
515
  topBarDataTestId: l,
516
516
  navBarOpen: u,
517
517
  navBarWidthOpen: v,
518
- navBarWidthClosed: C
518
+ navBarWidthClosed: x
519
519
  }) {
520
- const [w, g] = E(fe), [D, A] = E(me), [k, I] = E(fe), [T, b] = E(me), y = n !== void 0, L = i !== void 0, {
520
+ const [w, g] = E(me), [D, b] = E(Ce), [k, I] = E(me), [T, A] = E(Ce), y = n !== void 0, R = i !== void 0, {
521
521
  titleText: O,
522
- content: W,
523
- flavour: h,
524
- open: f,
525
- onChangeOpen: F,
522
+ content: H,
523
+ flavour: W,
524
+ open: p,
525
+ onChangeOpen: f,
526
526
  width: m,
527
- arrowButtons: x,
527
+ arrowButtons: C,
528
528
  startOpen: _,
529
- onOpened: se,
530
- onClosed: $t,
529
+ onOpened: J,
530
+ onClosed: le,
531
531
  dataTestId: It
532
- } = n ? s(s({}, ee), n) : s({}, ee), {
533
- titleText: Tt,
534
- content: Ot,
535
- flavour: De,
536
- open: le,
537
- onChangeOpen: ye,
538
- width: ce,
539
- arrowButtons: J,
540
- startOpen: Z,
532
+ } = n ? a(a({}, te), n) : a({}, te), {
533
+ titleText: Ot,
534
+ content: Tt,
535
+ flavour: ye,
536
+ open: ce,
537
+ onChangeOpen: $e,
538
+ width: de,
539
+ arrowButtons: Z,
540
+ startOpen: j,
541
541
  onOpened: Bt,
542
542
  onClosed: Et,
543
543
  dataTestId: Ft
544
- } = i ? s(s({}, ee), i) : s({}, ee);
545
- oe(() => {
546
- _ !== fe && (g(_), I(_));
547
- }, [_]), oe(() => {
548
- Z !== me && (A(Z), b(Z));
549
- }, [Z]);
550
- const de = f === void 0 ? w : f, ue = le === void 0 ? D : le, $e = (z) => {
551
- f === void 0 && (g(z), r && L && (z ? (A(!1), b(D)) : A(T))), F && F(z);
552
- }, Ie = (z) => {
553
- le === void 0 && (A(z), r && y && (z ? (g(!1), I(w)) : g(k))), ye && ye(z);
544
+ } = i ? a(a({}, te), i) : a({}, te);
545
+ ie(() => {
546
+ _ !== me && (g(_), I(_));
547
+ }, [_]), ie(() => {
548
+ j !== Ce && (b(j), A(j));
549
+ }, [j]);
550
+ const ue = p === void 0 ? w : p, pe = ce === void 0 ? D : ce, Ie = (z) => {
551
+ p === void 0 && (g(z), r && R && (z ? (b(!1), A(D)) : b(T))), f && f(z);
552
+ }, Oe = (z) => {
553
+ ce === void 0 && (b(z), r && y && (z ? (g(!1), I(w)) : g(k))), $e && $e(z);
554
554
  };
555
- return /* @__PURE__ */ p($, { children: [
555
+ return /* @__PURE__ */ h($, { children: [
556
556
  y && /* @__PURE__ */ o(
557
- Re,
557
+ He,
558
558
  {
559
559
  "data-testid": It,
560
560
  anchor: "left",
561
- open: de,
562
- onClose: () => $e(!1),
561
+ open: ue,
562
+ onClose: () => Ie(!1),
563
563
  width: m,
564
564
  titleText: O,
565
- debugOpacity: a,
566
- showCloseArrow: x === "both" || x === "close",
567
- onOpened: se,
568
- onClosed: $t,
565
+ debugOpacity: s,
566
+ showCloseArrow: C === "both" || C === "close",
567
+ onOpened: J,
568
+ onClosed: le,
569
569
  navBarOpen: u,
570
570
  navBarWidthOpen: v,
571
- navBarWidthClosed: C,
572
- children: W
571
+ navBarWidthClosed: x,
572
+ children: H
573
573
  }
574
574
  ),
575
- L && /* @__PURE__ */ o(
576
- Re,
575
+ R && /* @__PURE__ */ o(
576
+ He,
577
577
  {
578
578
  "data-testid": Ft,
579
579
  anchor: "right",
580
- open: ue,
581
- onClose: () => Ie(!1),
582
- width: ce,
583
- titleText: Tt,
584
- debugOpacity: a,
585
- showCloseArrow: J === "both" || J === "close",
580
+ open: pe,
581
+ onClose: () => Oe(!1),
582
+ width: de,
583
+ titleText: Ot,
584
+ debugOpacity: s,
585
+ showCloseArrow: Z === "both" || Z === "close",
586
586
  onOpened: Bt,
587
587
  onClosed: Et,
588
588
  navBarOpen: u,
589
589
  navBarWidthOpen: v,
590
- navBarWidthClosed: C,
591
- children: Ot
590
+ navBarWidthClosed: x,
591
+ children: Tt
592
592
  }
593
593
  ),
594
594
  /* @__PURE__ */ o(
595
595
  An,
596
- s(s({
596
+ a(a({
597
597
  titleText: t,
598
598
  "data-testid": l
599
- }, y && h === "push" ? {
599
+ }, y && W === "push" ? {
600
600
  leftPanel: {
601
- open: de,
601
+ open: ue,
602
602
  width: m,
603
- onOpen: () => $e(!0),
604
- showOpenArrow: x === "both" || x === "open"
603
+ onOpen: () => Ie(!0),
604
+ showOpenArrow: C === "both" || C === "open"
605
605
  }
606
- } : {}), L && De === "push" ? {
606
+ } : {}), R && ye === "push" ? {
607
607
  rightPanel: {
608
- open: ue,
609
- width: ce,
610
- onOpen: () => Ie(!0),
611
- showOpenArrow: J === "both" || J === "open"
608
+ open: pe,
609
+ width: de,
610
+ onOpen: () => Oe(!0),
611
+ showOpenArrow: Z === "both" || Z === "open"
612
612
  }
613
613
  } : {})
614
614
  ),
615
615
  /* @__PURE__ */ o(
616
616
  kn,
617
- S(s(s({}, h === "push" ? {
617
+ S(a(a({}, W === "push" ? {
618
618
  leftPanel: {
619
- open: de,
619
+ open: ue,
620
620
  width: m
621
621
  }
622
- } : {}), De === "push" ? {
622
+ } : {}), ye === "push" ? {
623
623
  rightPanel: {
624
- open: ue,
625
- width: ce
624
+ open: pe,
625
+ width: de
626
626
  }
627
627
  } : {}), {
628
- children: /* @__PURE__ */ o(Dn, S(s({ "data-testid": d }, c), { children: e }))
628
+ children: /* @__PURE__ */ o(Dn, S(a({ "data-testid": d }, c), { children: e }))
629
629
  })
630
630
  )
631
631
  ] });
632
632
  }
633
- const mt = () => {
634
- const e = ae();
633
+ const Ct = () => {
634
+ const e = se();
635
635
  return _t(e.breakpoints.down("sm"));
636
- }, yn = 64, $n = 72, In = 256, K = R(!0), Ct = R(In), xt = R($n), xe = R(""), Tn = R(void 0), vt = R(yn), wt = R(void 0);
637
- function On({ links: e }) {
636
+ }, yn = 64, $n = 72, In = 256, K = L(!0), xt = L(In), vt = L($n), ve = L(""), On = L(void 0), wt = L(yn), At = L(void 0);
637
+ function Tn({ links: e }) {
638
638
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
639
639
  }
640
- const te = "Navbar", Q = {
641
- root: `${te}-root`,
642
- menuButton: `${te}-menuButton`,
643
- hide: `${te}-hide`,
644
- content: `${te}-content`
640
+ const ne = "Navbar", Q = {
641
+ root: `${ne}-root`,
642
+ menuButton: `${ne}-menuButton`,
643
+ hide: `${ne}-hide`,
644
+ content: `${ne}-content`
645
645
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
646
646
  // settings: `${PREFIX}-settings`,
647
647
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
648
- }, Bn = H($, { name: "NavBar" })(({ theme: e }) => ({
648
+ }, Bn = M($, { name: "NavBar" })(({ theme: e }) => ({
649
649
  [`&.${Q.root}`]: {
650
650
  display: "flex"
651
651
  },
@@ -664,14 +664,14 @@ const te = "Navbar", Q = {
664
664
  // marginTop: '64px',
665
665
  // marginBottom: '16px',
666
666
  // },
667
- })), re = (e, t, n) => e.transitions.create(t, {
667
+ })), ae = (e, t, n) => e.transitions.create(t, {
668
668
  easing: e.transitions.easing.sharp,
669
669
  duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
670
670
  }), En = (e) => {
671
- const t = ae();
671
+ const t = se();
672
672
  return /* @__PURE__ */ o(
673
673
  Mt,
674
- s({
674
+ a({
675
675
  easing: t.transitions.easing.sharp,
676
676
  timeout: {
677
677
  enter: t.transitions.duration.enteringScreen,
@@ -679,7 +679,7 @@ const te = "Navbar", Q = {
679
679
  }
680
680
  }, e)
681
681
  );
682
- }, At = (e) => {
682
+ }, bt = (e) => {
683
683
  var t, n;
684
684
  return {
685
685
  overflowX: "hidden",
@@ -687,26 +687,26 @@ const te = "Navbar", Q = {
687
687
  backgroundColor: (n = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? n : "white"
688
688
  // Provide default so tests don't need to wrap theme provider
689
689
  };
690
- }, He = (e, t) => s({
690
+ }, We = (e, t) => a({
691
691
  width: t,
692
- transition: re(e, "width", "entering")
693
- }, At(e)), We = (e, t) => s({
692
+ transition: ae(e, "width", "entering")
693
+ }, bt(e)), ze = (e, t) => a({
694
694
  width: t,
695
- transition: re(e, "width", "leaving")
696
- }, At(e)), Fn = H(ve, {
695
+ transition: ae(e, "width", "leaving")
696
+ }, bt(e)), Fn = M(we, {
697
697
  shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
698
- })(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => s(s({
698
+ })(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => a(a({
699
699
  flexShrink: 0,
700
700
  whiteSpace: "nowrap",
701
701
  boxSizing: "border-box",
702
702
  display: "flex",
703
703
  flexDirection: "column"
704
- }, t && S(s({}, He(e, n)), {
704
+ }, t && S(a({}, We(e, n)), {
705
705
  backgroundColor: "",
706
- "& .MuiDrawer-paper": He(e, n)
707
- })), !t && S(s({}, We(e, r ? n : i)), {
706
+ "& .MuiDrawer-paper": We(e, n)
707
+ })), !t && S(a({}, ze(e, r ? n : i)), {
708
708
  backgroundColor: "",
709
- "& .MuiDrawer-paper": We(e, r ? n : i)
709
+ "& .MuiDrawer-paper": ze(e, r ? n : i)
710
710
  })));
711
711
  function Pn(e) {
712
712
  let t = 0;
@@ -716,10 +716,10 @@ function Pn(e) {
716
716
  }
717
717
  return t;
718
718
  }
719
- const ze = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Nn = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
719
+ const Ue = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Nn = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
720
720
  function Ln({ user: e, domainCode: t, open: n }) {
721
- const i = ae();
722
- return /* @__PURE__ */ p(
721
+ const i = se();
722
+ return /* @__PURE__ */ h(
723
723
  $,
724
724
  {
725
725
  sx: {
@@ -735,26 +735,26 @@ function Ln({ user: e, domainCode: t, open: n }) {
735
735
  {
736
736
  sx: {
737
737
  width: n ? "5rem" : "2rem",
738
- transition: n ? re(i, ["width", "height"], "entering") : re(i, ["width", "height"], "leaving"),
738
+ transition: n ? ae(i, ["width", "height"], "entering") : ae(i, ["width", "height"], "leaving"),
739
739
  aspectRatio: 1
740
740
  },
741
741
  children: e != null && e.name ? /* @__PURE__ */ o(
742
- Fe,
742
+ Pe,
743
743
  {
744
744
  src: e == null ? void 0 : e.picture,
745
745
  sx: {
746
746
  width: "100%",
747
747
  height: "100%",
748
- bgcolor: ze[Math.abs(Pn(e.name)) % ze.length]
748
+ bgcolor: Ue[Math.abs(Pn(e.name)) % Ue.length]
749
749
  },
750
750
  children: Nn(e.name)
751
751
  }
752
- ) : /* @__PURE__ */ o(Fe, { sx: { width: "100%", height: "100%" } })
752
+ ) : /* @__PURE__ */ o(Pe, { sx: { width: "100%", height: "100%" } })
753
753
  }
754
754
  ),
755
- /* @__PURE__ */ o(En, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Rt, { in: n, children: /* @__PURE__ */ p($, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
756
- e != null && e.name ? /* @__PURE__ */ o(P, { children: e.name }) : /* @__PURE__ */ o(Pe, { animation: !1, width: "50%" }),
757
- t ? /* @__PURE__ */ o(P, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Pe, { animation: !1, width: "25%" })
755
+ /* @__PURE__ */ o(En, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Rt, { in: n, children: /* @__PURE__ */ h($, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
756
+ e != null && e.name ? /* @__PURE__ */ o(F, { children: e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
757
+ t ? /* @__PURE__ */ o(F, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
758
758
  ] }) }) })
759
759
  ]
760
760
  }
@@ -766,13 +766,13 @@ function _n({
766
766
  widthOpen: n,
767
767
  "data-testid": i,
768
768
  top: r,
769
- middle: a,
769
+ middle: s,
770
770
  bottom: c,
771
771
  user: d,
772
772
  domainCode: l
773
773
  }) {
774
- const u = mt(), v = st(K);
775
- return /* @__PURE__ */ o(Bn, { className: Q.root, "data-testid": i, children: /* @__PURE__ */ p(
774
+ const u = Ct(), v = lt(K);
775
+ return /* @__PURE__ */ o(Bn, { className: Q.root, "data-testid": i, children: /* @__PURE__ */ h(
776
776
  Fn,
777
777
  {
778
778
  open: e,
@@ -789,15 +789,15 @@ function _n({
789
789
  isSmallScreen: u,
790
790
  children: [
791
791
  !u && /* @__PURE__ */ o(Ht, {}),
792
- r && /* @__PURE__ */ p($, { flexGrow: "0", children: [
792
+ r && /* @__PURE__ */ h($, { flexGrow: "0", children: [
793
793
  r,
794
- /* @__PURE__ */ o(Ne, { variant: "middle", sx: { marginY: "0.5rem" } })
794
+ /* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
795
795
  ] }),
796
- /* @__PURE__ */ o($, { flexGrow: "1", children: Array.isArray(a) ? /* @__PURE__ */ o(On, { links: a }) : a }),
797
- /* @__PURE__ */ p($, { flexGrow: "0", children: [
798
- /* @__PURE__ */ o(Ne, { variant: "middle", sx: { marginY: "0.5rem" } }),
796
+ /* @__PURE__ */ o($, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Tn, { links: s }) : s }),
797
+ /* @__PURE__ */ h($, { flexGrow: "0", children: [
798
+ /* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
799
799
  /* @__PURE__ */ o(Ln, { user: d, domainCode: l, open: e }),
800
- c && /* @__PURE__ */ o(M, { children: c })
800
+ c && /* @__PURE__ */ o(N, { children: c })
801
801
  ] })
802
802
  ]
803
803
  }
@@ -820,7 +820,7 @@ function Mn({
820
820
  flexGrow: 1
821
821
  },
822
822
  children: i ? /* @__PURE__ */ o($, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
823
- Je,
823
+ Ze,
824
824
  {
825
825
  component: "main",
826
826
  id: "main-content",
@@ -841,9 +841,9 @@ function Wn({
841
841
  "data-testid": n,
842
842
  middle: i
843
843
  }) {
844
- const r = st(K), a = () => r((l) => !l), c = ae(), d = mt();
845
- return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ p(
846
- Ke,
844
+ const r = lt(K), s = () => r((l) => !l), c = se(), d = Ct();
845
+ return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ h(
846
+ Je,
847
847
  {
848
848
  square: !0,
849
849
  elevation: 0,
@@ -866,11 +866,11 @@ function Wn({
866
866
  size: "medium",
867
867
  color: "inherit",
868
868
  sx: { padding: 1.5, marginLeft: "12px" },
869
- onClick: a,
869
+ onClick: s,
870
870
  children: /* @__PURE__ */ o(Jt, { fontSize: "medium" })
871
871
  }
872
872
  ),
873
- /* @__PURE__ */ o(P, { className: Hn.titleText, variant: "h6", children: e }),
873
+ /* @__PURE__ */ o(F, { className: Hn.titleText, variant: "h6", children: e }),
874
874
  i
875
875
  ]
876
876
  }
@@ -882,34 +882,34 @@ function Po({
882
882
  initialNavBarOpen: n,
883
883
  pageContainerProps: i,
884
884
  pageContentDataTestId: r,
885
- topBarDataTestId: a,
885
+ topBarDataTestId: s,
886
886
  navBarDataTestId: c,
887
887
  navBarMiddle: d,
888
888
  navBarBottom: l,
889
889
  user: u,
890
890
  domainCode: v
891
891
  }) {
892
- ct([
892
+ dt([
893
893
  [K, n != null ? n : !0],
894
- [xe, t != null ? t : ""]
894
+ [ve, t != null ? t : ""]
895
895
  ]);
896
- const C = Le(K), [w] = V(Ct), [g] = V(xt), D = Le(xe), [A] = V(vt), [k] = V(Tn), [I] = V(wt);
897
- return /* @__PURE__ */ p($, { children: [
896
+ const x = _e(K), [w] = V(xt), [g] = V(vt), D = _e(ve), [b] = V(wt), [k] = V(On), [I] = V(At);
897
+ return /* @__PURE__ */ h($, { children: [
898
898
  /* @__PURE__ */ o(Wt, {}),
899
899
  /* @__PURE__ */ o(
900
900
  Wn,
901
901
  {
902
902
  titleText: D,
903
- "data-testid": a,
904
- height: A,
903
+ "data-testid": s,
904
+ height: b,
905
905
  middle: k
906
906
  }
907
907
  ),
908
- /* @__PURE__ */ p($, { sx: { display: "flex" }, children: [
908
+ /* @__PURE__ */ h($, { sx: { display: "flex" }, children: [
909
909
  /* @__PURE__ */ o(
910
910
  _n,
911
911
  {
912
- open: C,
912
+ open: x,
913
913
  top: I,
914
914
  middle: d,
915
915
  bottom: l,
@@ -917,15 +917,15 @@ function Po({
917
917
  domainCode: v,
918
918
  widthOpen: w,
919
919
  widthClosed: g,
920
- offsetTop: A,
920
+ offsetTop: b,
921
921
  "data-testid": c
922
922
  }
923
923
  ),
924
924
  /* @__PURE__ */ o(
925
925
  Mn,
926
- S(s({
926
+ S(a({
927
927
  "data-testid": r,
928
- topBarHeight: A
928
+ topBarHeight: b
929
929
  }, i), {
930
930
  children: e
931
931
  })
@@ -933,13 +933,13 @@ function Po({
933
933
  ] })
934
934
  ] });
935
935
  }
936
- const bt = ({
936
+ const St = ({
937
937
  isOpen: e,
938
938
  dialogTitle: t,
939
939
  children: n,
940
940
  maxWidth: i,
941
941
  primaryButton: r,
942
- secondaryButton: a,
942
+ secondaryButton: s,
943
943
  onClose: c,
944
944
  sx: d,
945
945
  "data-testid": l,
@@ -947,42 +947,42 @@ const bt = ({
947
947
  isLoading: v = !1
948
948
  }) => {
949
949
  var g, D;
950
- const [C, w] = E(!1);
951
- return /* @__PURE__ */ p(
952
- Ze,
950
+ const [x, w] = E(!1);
951
+ return /* @__PURE__ */ h(
952
+ je,
953
953
  {
954
954
  open: e,
955
- onClose: (A, k) => N(void 0, null, function* () {
956
- u && (k === "backdropClick" || k === "escapeKeyDown") || C || (a != null && a.onClick ? yield a.onClick() : c());
955
+ onClose: (b, k) => P(void 0, null, function* () {
956
+ u && (k === "backdropClick" || k === "escapeKeyDown") || x || (s != null && s.onClick ? yield s.onClick() : c());
957
957
  }),
958
958
  fullWidth: !0,
959
959
  maxWidth: i != null ? i : "xs",
960
960
  "data-testid": l,
961
961
  sx: d,
962
962
  children: [
963
- v && /* @__PURE__ */ o(je, { sx: { height: "4px", marginBottom: "-4px" } }),
964
- /* @__PURE__ */ o(et, { children: t }),
965
- /* @__PURE__ */ o(tt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
966
- /* @__PURE__ */ p(nt, { children: [
963
+ v && /* @__PURE__ */ o(et, { sx: { height: "4px", marginBottom: "-4px" } }),
964
+ /* @__PURE__ */ o(tt, { children: t }),
965
+ /* @__PURE__ */ o(nt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
966
+ /* @__PURE__ */ h(ot, { children: [
967
967
  /* @__PURE__ */ o(
968
- ie,
968
+ re,
969
969
  {
970
- onClick: (g = a == null ? void 0 : a.onClick) != null ? g : c,
971
- "data-testid": a == null ? void 0 : a.testId,
972
- disabled: (a == null ? void 0 : a.disabled) || C,
973
- color: a == null ? void 0 : a.buttonColor,
974
- children: (D = a == null ? void 0 : a.text) != null ? D : "Cancel"
970
+ onClick: (g = s == null ? void 0 : s.onClick) != null ? g : c,
971
+ "data-testid": s == null ? void 0 : s.testId,
972
+ disabled: (s == null ? void 0 : s.disabled) || x,
973
+ color: s == null ? void 0 : s.buttonColor,
974
+ children: (D = s == null ? void 0 : s.text) != null ? D : "Cancel"
975
975
  }
976
976
  ),
977
977
  r && /* @__PURE__ */ o(
978
- ie,
978
+ re,
979
979
  {
980
- onClick: () => N(void 0, null, function* () {
981
- var A;
982
- w(!0), yield (A = r.onClick) == null ? void 0 : A.call(r), w(!1);
980
+ onClick: () => P(void 0, null, function* () {
981
+ var b;
982
+ w(!0), yield (b = r.onClick) == null ? void 0 : b.call(r), w(!1);
983
983
  }),
984
984
  "data-testid": r.testId,
985
- disabled: r.disabled || C,
985
+ disabled: r.disabled || x,
986
986
  color: r == null ? void 0 : r.buttonColor,
987
987
  children: r.text
988
988
  }
@@ -991,7 +991,7 @@ const bt = ({
991
991
  ]
992
992
  }
993
993
  );
994
- }, St = ({
994
+ }, kt = ({
995
995
  minLength: e,
996
996
  preLoadedOptions: t,
997
997
  lookup: n,
@@ -999,74 +999,75 @@ const bt = ({
999
999
  inputValue: r
1000
1000
  }) => on({
1001
1001
  queryFn: () => e && r.length < e ? t != null ? t : [] : t ? t.filter(
1002
- (a) => a.label.toLowerCase().includes(r.toLowerCase())
1002
+ (s) => s.label.toLowerCase().includes(r.toLowerCase())
1003
1003
  ) : n(r),
1004
1004
  queryKey: ["autocomplete", i, r]
1005
1005
  });
1006
1006
  function No({
1007
- lookup: e = () => N(this, null, function* () {
1007
+ lookup: e = () => P(this, null, function* () {
1008
1008
  }),
1009
1009
  enableHighlighting: t = !0,
1010
1010
  onChange: n,
1011
1011
  minLength: i = 0,
1012
1012
  label: r,
1013
- value: a,
1013
+ value: s,
1014
1014
  "data-testid": c,
1015
1015
  sx: d,
1016
1016
  boxSx: l,
1017
1017
  textFieldColor: u,
1018
1018
  textFieldVariant: v = "filled",
1019
- loadingText: C = "Loading...",
1019
+ loadingText: x = "Loading...",
1020
1020
  noOptionsText: w = "No options",
1021
1021
  popupIcon: g = /* @__PURE__ */ o(jt, {}),
1022
1022
  error: D = !1,
1023
- helperText: A = "",
1023
+ helperText: b = "",
1024
1024
  preLoadedOptions: k = void 0,
1025
- disablePortal: I = !1
1025
+ disablePortal: I = !1,
1026
+ disableIconFlip: T = !1
1026
1027
  }) {
1027
- const [T, b] = E(""), y = (h, f) => {
1028
- const F = a.filter((m) => m.id !== f);
1029
- n(F, "delete", h);
1030
- }, { data: L, isLoading: O } = St({
1031
- inputValue: T,
1028
+ const [A, y] = E(""), R = (p, f) => {
1029
+ const m = s.filter((C) => C.id !== f);
1030
+ n(m, "delete", p);
1031
+ }, { data: O, isLoading: H } = kt({
1032
+ inputValue: A,
1032
1033
  label: r,
1033
1034
  lookup: e,
1034
1035
  minLength: i,
1035
1036
  preLoadedOptions: k
1036
- }), W = T.length >= i;
1037
- return /* @__PURE__ */ p("div", { "data-testid": c, children: [
1037
+ }), W = A.length >= i;
1038
+ return /* @__PURE__ */ h("div", { "data-testid": c, children: [
1038
1039
  /* @__PURE__ */ o(
1039
- Ae,
1040
+ be,
1040
1041
  {
1041
- sx: d,
1042
+ sx: a(a({}, d), T ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1042
1043
  "data-testid": c ? `${c}:Autocomplete` : void 0,
1043
1044
  disablePortal: I,
1044
1045
  multiple: !0,
1045
- getOptionLabel: (h) => typeof h == "string" ? h : h.label,
1046
- loading: W ? O : !1,
1047
- options: [...a, ...L != null ? L : []],
1046
+ getOptionLabel: (p) => typeof p == "string" ? p : p.label,
1047
+ loading: W ? H : !1,
1048
+ options: [...s, ...O != null ? O : []],
1048
1049
  filterSelectedOptions: !0,
1049
1050
  includeInputInList: !0,
1050
- value: a,
1051
- onChange: (h, f, F) => {
1052
- n(f, F, h);
1051
+ value: s,
1052
+ onChange: (p, f, m) => {
1053
+ n(f, m, p);
1053
1054
  },
1054
- onInputChange: (h, f) => b(f),
1055
+ onInputChange: (p, f) => y(f),
1055
1056
  noOptionsText: W ? w : "Start typing to search",
1056
- loadingText: C,
1057
+ loadingText: x,
1057
1058
  popupIcon: g,
1058
- renderInput: (h) => /* @__PURE__ */ o(
1059
- be,
1060
- S(s({}, h), {
1059
+ renderInput: (p) => /* @__PURE__ */ o(
1060
+ Se,
1061
+ S(a({}, p), {
1061
1062
  label: r,
1062
1063
  fullWidth: !0,
1063
1064
  variant: v,
1064
1065
  error: D,
1065
- helperText: A,
1066
- InputProps: S(s({}, h.InputProps), {
1067
- endAdornment: /* @__PURE__ */ p(M, { children: [
1068
- O ? /* @__PURE__ */ o(Se, { color: "inherit", size: 20 }) : null,
1069
- h.InputProps.endAdornment
1066
+ helperText: b,
1067
+ InputProps: S(a({}, p.InputProps), {
1068
+ endAdornment: /* @__PURE__ */ h(N, { children: [
1069
+ H ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20 }) : null,
1070
+ p.InputProps.endAdornment
1070
1071
  ] })
1071
1072
  }),
1072
1073
  "data-testid": c ? `${c}:Autocomplete:TextField` : void 0,
@@ -1077,34 +1078,34 @@ function No({
1077
1078
  })
1078
1079
  ),
1079
1080
  renderTags: () => null,
1080
- isOptionEqualToValue: (h, f) => h.id === f.id,
1081
- renderOption: (h, f, F) => {
1081
+ isOptionEqualToValue: (p, f) => p.id === f.id,
1082
+ renderOption: (p, f, m) => {
1082
1083
  if (t) {
1083
- const m = tn(f.label, F.inputValue, {
1084
+ const C = tn(f.label, m.inputValue, {
1084
1085
  insideWords: !0,
1085
1086
  findAllOccurrences: !0
1086
- }), x = nn(f.label, m);
1087
- return /* @__PURE__ */ Ce(
1087
+ }), _ = nn(f.label, C);
1088
+ return /* @__PURE__ */ xe(
1088
1089
  "li",
1089
- S(s({}, h), {
1090
+ S(a({}, p), {
1090
1091
  key: f.id,
1091
1092
  "data-testid": c ? `${c}:Autocomplete:option(${f.id.toString()})` : void 0
1092
1093
  }),
1093
- /* @__PURE__ */ o("div", { children: x.map((_, se) => /* @__PURE__ */ o(
1094
+ /* @__PURE__ */ o("div", { children: _.map((J, le) => /* @__PURE__ */ o(
1094
1095
  "span",
1095
1096
  {
1096
1097
  style: {
1097
- fontWeight: _.highlight ? 700 : 400
1098
+ fontWeight: J.highlight ? 700 : 400
1098
1099
  },
1099
- children: _.text
1100
+ children: J.text
1100
1101
  },
1101
- se
1102
+ le
1102
1103
  )) })
1103
1104
  );
1104
1105
  } else
1105
- return /* @__PURE__ */ Ce(
1106
+ return /* @__PURE__ */ xe(
1106
1107
  "li",
1107
- S(s({}, h), {
1108
+ S(a({}, p), {
1108
1109
  key: f.id,
1109
1110
  "data-testid": c ? `${c}:option(${f.id.toString()})` : void 0
1110
1111
  }),
@@ -1113,7 +1114,7 @@ function No({
1113
1114
  }
1114
1115
  }
1115
1116
  ),
1116
- a.length > 0 && /* @__PURE__ */ o($, { sx: l, children: a.map((h) => /* @__PURE__ */ o(
1117
+ s.length > 0 && /* @__PURE__ */ o($, { sx: l, children: s.map((p) => /* @__PURE__ */ o(
1117
1118
  zt,
1118
1119
  {
1119
1120
  sx: {
@@ -1124,7 +1125,7 @@ function No({
1124
1125
  label: /* @__PURE__ */ o(
1125
1126
  Ut,
1126
1127
  {
1127
- title: h.tooltipContent || "",
1128
+ title: p.tooltipContent || "",
1128
1129
  placement: "bottom-start",
1129
1130
  PopperProps: {
1130
1131
  modifiers: [
@@ -1136,79 +1137,79 @@ function No({
1136
1137
  }
1137
1138
  ]
1138
1139
  },
1139
- children: /* @__PURE__ */ o(P, { style: { whiteSpace: "normal" }, children: h.chipLabel ? h.chipLabel : h.label })
1140
+ children: /* @__PURE__ */ o(F, { style: { whiteSpace: "normal" }, children: p.chipLabel ? p.chipLabel : p.label })
1140
1141
  }
1141
1142
  ),
1142
- "data-testid": c ? `${c}:Chip(${h.id.toString()})` : void 0,
1143
- onDelete: (f) => y(f, h.id),
1143
+ "data-testid": c ? `${c}:Chip(${p.id.toString()})` : void 0,
1144
+ onDelete: (f) => R(f, p.id),
1144
1145
  deleteIcon: /* @__PURE__ */ o(
1145
1146
  Zt,
1146
1147
  {
1147
- "data-testid": c ? `${c}:Chip(${h.id.toString()}):deleteIcon` : void 0
1148
+ "data-testid": c ? `${c}:Chip(${p.id.toString()}):deleteIcon` : void 0
1148
1149
  }
1149
1150
  )
1150
1151
  },
1151
- h.id
1152
+ p.id
1152
1153
  )) })
1153
1154
  ] });
1154
1155
  }
1155
1156
  const Lo = ({
1156
- lookup: e = () => N(void 0, null, function* () {
1157
+ lookup: e = () => P(void 0, null, function* () {
1157
1158
  }),
1158
1159
  onChange: t,
1159
1160
  label: n,
1160
1161
  value: i,
1161
1162
  sx: r,
1162
- textFieldColor: a,
1163
+ textFieldColor: s,
1163
1164
  textFieldVariant: c = "filled",
1164
1165
  "data-testid": d,
1165
1166
  noOptionsText: l = "No options",
1166
1167
  minLength: u = 3,
1167
1168
  disablePortal: v = !1,
1168
- preLoadedOptions: C,
1169
+ preLoadedOptions: x,
1169
1170
  helperText: w = "",
1170
1171
  disabled: g
1171
1172
  }) => {
1172
- const [D, A] = E(""), { data: k, isLoading: I } = St({
1173
+ const [D, b] = E(""), { data: k, isLoading: I } = kt({
1173
1174
  inputValue: D,
1174
1175
  label: n,
1175
1176
  lookup: e,
1176
1177
  minLength: u != null ? u : 0,
1177
- preLoadedOptions: C
1178
+ preLoadedOptions: x
1178
1179
  }), T = D.length >= u;
1179
1180
  return /* @__PURE__ */ o("div", { "data-testid": d, children: /* @__PURE__ */ o(Gt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
1180
- Ae,
1181
+ be,
1181
1182
  {
1182
1183
  sx: r,
1183
1184
  "data-testid": d ? `${d}:Autocomplete` : void 0,
1184
1185
  loading: T ? I : !1,
1185
1186
  options: k != null ? k : [],
1186
- onChange: (b, y) => {
1187
- t(b, y);
1187
+ onChange: (A, y) => {
1188
+ t(A, y);
1188
1189
  },
1189
1190
  disablePortal: v,
1190
- filterOptions: (b) => b,
1191
+ filterOptions: (A) => A,
1191
1192
  value: i,
1192
1193
  noOptionsText: T ? l : "Start typing to search",
1193
- getOptionLabel: (b) => b.label,
1194
- renderInput: (b) => /* @__PURE__ */ o(
1195
- be,
1196
- S(s({
1194
+ getOptionLabel: (A) => A.label,
1195
+ renderInput: (A) => /* @__PURE__ */ o(
1196
+ Se,
1197
+ S(a({
1197
1198
  "data-testid": d ? `${d}:Autocomplete:TextField` : void 0
1198
- }, b), {
1199
+ }, A), {
1199
1200
  variant: c,
1200
1201
  label: n,
1201
- color: a,
1202
+ color: s,
1202
1203
  helperText: w
1203
1204
  })
1204
1205
  ),
1205
- isOptionEqualToValue: (b, y) => b.id === y.id,
1206
- onInputChange: (b, y) => {
1207
- A(y);
1206
+ isOptionEqualToValue: (A, y) => A.id === y.id,
1207
+ onInputChange: (A, y) => {
1208
+ b(y);
1208
1209
  },
1209
- renderOption: (b, y) => /* @__PURE__ */ Ce(
1210
+ renderOption: (A, y) => /* @__PURE__ */ xe(
1210
1211
  "li",
1211
- S(s({}, b), {
1212
+ S(a({}, A), {
1212
1213
  key: y.id,
1213
1214
  "data-testid": d ? `${d}:Autocomplete:option(${y.id.toString()})` : void 0
1214
1215
  }),
@@ -1222,8 +1223,8 @@ const Lo = ({
1222
1223
  return -1;
1223
1224
  try {
1224
1225
  const n = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), i = decodeURIComponent(
1225
- sn.from(n, "base64").toString("utf8").split("").map(function(a) {
1226
- return "%" + ("00" + a.charCodeAt(0).toString(16)).slice(-2);
1226
+ sn.from(n, "base64").toString("utf8").split("").map(function(s) {
1227
+ return "%" + ("00" + s.charCodeAt(0).toString(16)).slice(-2);
1227
1228
  }).join("")
1228
1229
  ), r = JSON.parse(i);
1229
1230
  return r != null && r.exp ? r.exp : -1;
@@ -1235,20 +1236,20 @@ const Lo = ({
1235
1236
  closeHandler: t,
1236
1237
  setAuth0ExpiryTime: n
1237
1238
  }) => {
1238
- const { logout: i, getAccessTokenSilently: r } = dt(), [a, c] = E(0), d = () => N(void 0, null, function* () {
1239
+ const { logout: i, getAccessTokenSilently: r } = ut(), [s, c] = E(0), d = () => P(void 0, null, function* () {
1239
1240
  i({ logoutParams: { returnTo: `${window.location.origin}` } });
1240
- }), l = () => N(void 0, null, function* () {
1241
- c(a + 1), t();
1241
+ }), l = () => P(void 0, null, function* () {
1242
+ c(s + 1), t();
1242
1243
  });
1243
- return oe(() => {
1244
- (() => N(void 0, null, function* () {
1245
- if (a > 0) {
1244
+ return ie(() => {
1245
+ (() => P(void 0, null, function* () {
1246
+ if (s > 0) {
1246
1247
  const w = yield r({ cacheMode: "off" }), g = zn(w) * 1e3;
1247
1248
  n(g);
1248
1249
  }
1249
1250
  }))();
1250
- }, [a, r, n]), /* @__PURE__ */ o(
1251
- bt,
1251
+ }, [s, r, n]), /* @__PURE__ */ o(
1252
+ St,
1252
1253
  {
1253
1254
  isOpen: e,
1254
1255
  primaryButton: {
@@ -1292,8 +1293,8 @@ function Mo({
1292
1293
  children: e,
1293
1294
  appName: t = "the app"
1294
1295
  }) {
1295
- const { isAuthenticated: n, isLoading: i, error: r, loginWithRedirect: a, logout: c } = dt();
1296
- if (oe(() => {
1296
+ const { isAuthenticated: n, isLoading: i, error: r, loginWithRedirect: s, logout: c } = ut();
1297
+ if (ie(() => {
1297
1298
  if (i || n || r)
1298
1299
  return;
1299
1300
  const d = {
@@ -1301,16 +1302,16 @@ function Mo({
1301
1302
  returnTo: `${window.location.pathname}${window.location.search}`
1302
1303
  }
1303
1304
  };
1304
- a(d);
1305
- }, [i, n, r, a]), r && Un(r)) {
1305
+ s(d);
1306
+ }, [i, n, r, s]), r && Un(r)) {
1306
1307
  let d = "Auth error", l = "An unknown Auth0 error occurred.";
1307
- return Vn(r) ? (d = "Unauthorised", l = `You are not authorised to access ${t}.`) : qn(r) ? (d = "App not authorised", l = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`) : Gn(r) && (d = "Unauthorised", l = "Authorisation with auth0 failed for an unknown reason."), /* @__PURE__ */ p(Ze, { open: !0, children: [
1308
- /* @__PURE__ */ o(et, { children: d }),
1309
- /* @__PURE__ */ o(tt, { children: /* @__PURE__ */ o(P, { children: l }) }),
1310
- /* @__PURE__ */ o(nt, { children: /* @__PURE__ */ o(ie, { onClick: () => c({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
1308
+ return Vn(r) ? (d = "Unauthorised", l = `You are not authorised to access ${t}.`) : qn(r) ? (d = "App not authorised", l = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`) : Gn(r) && (d = "Unauthorised", l = "Authorisation with auth0 failed for an unknown reason."), /* @__PURE__ */ h(je, { open: !0, children: [
1309
+ /* @__PURE__ */ o(tt, { children: d }),
1310
+ /* @__PURE__ */ o(nt, { children: /* @__PURE__ */ o(F, { children: l }) }),
1311
+ /* @__PURE__ */ o(ot, { children: /* @__PURE__ */ o(re, { onClick: () => c({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
1311
1312
  ] });
1312
1313
  }
1313
- return n ? /* @__PURE__ */ o(M, { children: e }) : /* @__PURE__ */ o(ln, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
1314
+ return n ? /* @__PURE__ */ o(N, { children: e }) : /* @__PURE__ */ o(ln, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
1314
1315
  }
1315
1316
  const Xn = {
1316
1317
  autoHideDuration: 6e3,
@@ -1320,112 +1321,112 @@ const Xn = {
1320
1321
  disableWindowBlurListener: !1
1321
1322
  }, Qn = {
1322
1323
  shouldClose: (e, t) => t !== "clickaway"
1323
- }, Ue = {
1324
+ }, Ge = {
1324
1325
  message: "",
1325
1326
  severity: "info",
1326
1327
  variant: "standard",
1327
1328
  progressIndicator: void 0
1328
1329
  // Can use 'circular' or 'linear'
1329
- }, Ge = 100, Ve = 2e3, Yn = 2e3, Kn = (() => {
1330
+ }, Ve = 100, qe = 2e3, Yn = 2e3, Kn = (() => {
1330
1331
  let e = 0;
1331
1332
  return () => (e += 1, e);
1332
1333
  })(), Jn = {
1333
1334
  borderBottomLeftRadius: "0px",
1334
1335
  borderBottomRightRadius: "0px"
1335
- }, Zn = {}, jn = {}, kt = Qe(null);
1336
- function eo(a) {
1337
- var c = a, {
1336
+ }, Zn = {}, jn = {}, Dt = Ye(null);
1337
+ function eo(s) {
1338
+ var c = s, {
1338
1339
  overrideState: e = Zn,
1339
1340
  overrideActions: t = jn,
1340
1341
  shouldClose: n = Qn.shouldClose,
1341
1342
  children: i
1342
- } = c, r = Be(c, [
1343
+ } = c, r = Ee(c, [
1343
1344
  "overrideState",
1344
1345
  "overrideActions",
1345
1346
  "shouldClose",
1346
1347
  "children"
1347
1348
  ]);
1348
- var F;
1349
- const [{ open: d }, l] = E({ open: !1 }), u = he([]), v = he(Date.now()), C = he(0), w = ne((m) => {
1349
+ var f;
1350
+ const [{ open: d }, l] = E({ open: !1 }), u = ge([]), v = ge(Date.now()), x = ge(0), w = oe((m) => {
1350
1351
  l({ open: m });
1351
- }, []), g = ne((m = {}) => {
1352
- C.current += 1, u.current.length >= Ge && Date.now() - v.current >= Ve && (v.current = Date.now(), console.error(
1353
- `SaladBarProvider: MAX_QUEUE_LENGTH (${Ge}) hit ${C.current} times in last ${Ve}ms)`
1354
- ), C.current = 0);
1355
- const x = s(S(s({}, Ue), {
1352
+ }, []), g = oe((m = {}) => {
1353
+ x.current += 1, u.current.length >= Ve && Date.now() - v.current >= qe && (v.current = Date.now(), console.error(
1354
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${Ve}) hit ${x.current} times in last ${qe}ms)`
1355
+ ), x.current = 0);
1356
+ const C = a(S(a({}, Ge), {
1356
1357
  key: Kn()
1357
1358
  }), m);
1358
- return u.current.push(x), u.current.length === 1 && l({ open: !0 }), x.key;
1359
- }, []), D = (m = "", x = {}) => g(s({ message: m, severity: "success" }, x)), A = (m = "", x = {}) => g(s({ message: m, severity: "info" }, x)), k = (m = "", x = {}) => g(s({ message: m, severity: "warning" }, x)), I = (m = "", x = {}) => g(s({ message: m, severity: "error" }, x)), T = (m) => {
1360
- const x = u.current.findIndex((_) => _.key === m);
1361
- if (x !== -1)
1362
- return x === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(x, 1);
1363
- }, b = (m, x) => {
1364
- n(m, x) && l({ open: !1 });
1359
+ return u.current.push(C), u.current.length === 1 && l({ open: !0 }), C.key;
1360
+ }, []), D = (m = "", C = {}) => g(a({ message: m, severity: "success" }, C)), b = (m = "", C = {}) => g(a({ message: m, severity: "info" }, C)), k = (m = "", C = {}) => g(a({ message: m, severity: "warning" }, C)), I = (m = "", C = {}) => g(a({ message: m, severity: "error" }, C)), T = (m) => {
1361
+ const C = u.current.findIndex((_) => _.key === m);
1362
+ if (C !== -1)
1363
+ return C === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(C, 1);
1364
+ }, A = (m, C) => {
1365
+ n(m, C) && l({ open: !1 });
1365
1366
  }, y = () => {
1366
- }, L = () => {
1367
+ }, R = () => {
1367
1368
  u.current.shift(), u.current.length > 0 && l({ open: !0 });
1368
- }, O = (F = u.current[0]) != null ? F : s({}, Ue), W = {};
1369
- "autoHideDuration" in O && (W.autoHideDuration = O.autoHideDuration);
1370
- const h = s(s({}, Xn), r), f = s(s({
1369
+ }, O = (f = u.current[0]) != null ? f : a({}, Ge), H = {};
1370
+ "autoHideDuration" in O && (H.autoHideDuration = O.autoHideDuration);
1371
+ const W = a(a({}, Xn), r), p = a(a({
1371
1372
  open: d,
1372
1373
  setOpen: w,
1373
1374
  enqueueNotification: g,
1374
1375
  enqueueSuccessNotification: D,
1375
- enqueueInfoNotification: A,
1376
+ enqueueInfoNotification: b,
1376
1377
  enqueueWarningNotification: k,
1377
1378
  enqueueErrorNotification: I,
1378
1379
  removeNotification: T
1379
1380
  }, e), t);
1380
- return /* @__PURE__ */ p(kt.Provider, { value: f, children: [
1381
+ return /* @__PURE__ */ h(Dt.Provider, { value: p, children: [
1381
1382
  i,
1382
1383
  /* @__PURE__ */ o(
1383
1384
  Vt,
1384
- S(s(s({}, h), W), {
1385
+ S(a(a({}, W), H), {
1385
1386
  open: d,
1386
- onClose: b,
1387
+ onClose: A,
1387
1388
  TransitionProps: {
1388
- onExited: L,
1389
+ onExited: R,
1389
1390
  onExit: y
1390
1391
  },
1391
1392
  sx: { zIndex: Yn },
1392
- children: /* @__PURE__ */ p("div", { children: [
1393
+ children: /* @__PURE__ */ h("div", { children: [
1393
1394
  /* @__PURE__ */ o(
1394
1395
  qt,
1395
1396
  {
1396
- onClose: (m) => b(m, "closeAlert"),
1397
+ onClose: (m) => A(m, "closeAlert"),
1397
1398
  severity: O.severity,
1398
1399
  variant: "filled",
1399
- icon: O.progressIndicator === "circular" ? /* @__PURE__ */ o(Se, { size: "1em" }) : void 0,
1400
+ icon: O.progressIndicator === "circular" ? /* @__PURE__ */ o(ke, { size: "1em" }) : void 0,
1400
1401
  style: O.progressIndicator === "linear" ? Jn : void 0,
1401
1402
  children: O.message
1402
1403
  }
1403
1404
  ),
1404
- O.progressIndicator === "linear" && /* @__PURE__ */ o(je, { color: "primary" })
1405
+ O.progressIndicator === "linear" && /* @__PURE__ */ o(et, { color: "primary" })
1405
1406
  ] })
1406
1407
  })
1407
1408
  )
1408
1409
  ] });
1409
1410
  }
1410
1411
  function to() {
1411
- const e = Ye(kt);
1412
+ const e = Ke(Dt);
1412
1413
  if (e === null)
1413
- throw new ke("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1414
+ throw new De("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1414
1415
  return e;
1415
1416
  }
1416
1417
  const Ro = X(
1417
- (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(eo, S(s({}, e), { overrideState: t, overrideActions: n, children: i }))
1418
+ (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(eo, S(a({}, e), { overrideState: t, overrideActions: n, children: i }))
1418
1419
  ), no = en(), Ho = ({
1419
1420
  children: e,
1420
1421
  store: t
1421
- }) => /* @__PURE__ */ o(lt, { store: t != null ? t : no, children: e }), Dt = "domainCode";
1422
- var Xe;
1423
- const qe = R(
1424
- JSON.parse((Xe = localStorage.getItem(Dt)) != null ? Xe : '{"domainCode": ""}').domainCode
1425
- ), yt = R(
1426
- (e) => e(qe),
1422
+ }) => /* @__PURE__ */ o(ct, { store: t != null ? t : no, children: e }), yt = "domainCode";
1423
+ var Qe;
1424
+ const Xe = L(
1425
+ JSON.parse((Qe = localStorage.getItem(yt)) != null ? Qe : '{"domainCode": ""}').domainCode
1426
+ ), $t = L(
1427
+ (e) => e(Xe),
1427
1428
  (e, t, n) => {
1428
- t(qe, n), localStorage.setItem(Dt, JSON.stringify({ domainCode: n }));
1429
+ t(Xe, n), localStorage.setItem(yt, JSON.stringify({ domainCode: n }));
1429
1430
  }
1430
1431
  ), oo = {
1431
1432
  act: "ACT",
@@ -1448,39 +1449,39 @@ const qe = R(
1448
1449
  onClose: n,
1449
1450
  domainOptions: i,
1450
1451
  applicationName: r,
1451
- handleLogout: a
1452
+ handleLogout: s
1452
1453
  }) => {
1453
- const [c, d] = V(yt), [l, u] = E(c), { enqueueSuccessNotification: v } = to(), C = i.length === 0, w = !!c && !i.includes(c) && !i.includes(l), g = !c || C || w, D = () => N(void 0, null, function* () {
1454
+ const [c, d] = V($t), [l, u] = E(c), { enqueueSuccessNotification: v } = to(), x = i.length === 0, w = !!c && !i.includes(c) && !i.includes(l), g = !c || x || w, D = () => P(void 0, null, function* () {
1454
1455
  l ? (d(l), v(`Set domain to ${l}`), n()) : d("");
1455
- }), A = () => N(void 0, null, function* () {
1456
- c && !C && !w ? (u(c), n()) : g && a();
1456
+ }), b = () => P(void 0, null, function* () {
1457
+ c && !x && !w ? (u(c), n()) : g && s();
1457
1458
  });
1458
1459
  let k;
1459
- return C ? k = "Unable to retrieve your active organisations. Try logging in again." : w && (k = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
1460
- bt,
1460
+ return x ? k = "Unable to retrieve your active organisations. Try logging in again." : w && (k = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ h(
1461
+ St,
1461
1462
  {
1462
1463
  isOpen: t,
1463
1464
  dialogTitle: "Select an organisation",
1464
1465
  primaryButton: {
1465
1466
  text: "Confirm",
1466
1467
  onClick: D,
1467
- disabled: !l || C || w,
1468
+ disabled: !l || x || w,
1468
1469
  buttonColor: "primary"
1469
1470
  },
1470
1471
  secondaryButton: {
1471
1472
  text: g ? "Logout" : "Cancel",
1472
- onClick: A
1473
+ onClick: b
1473
1474
  },
1474
1475
  onClose: g ? () => {
1475
1476
  } : n,
1476
1477
  children: [
1477
- /* @__PURE__ */ p(P, { marginBottom: 2, children: [
1478
+ /* @__PURE__ */ h(F, { marginBottom: 2, children: [
1478
1479
  "Select the default organisation that you want to use with the ",
1479
1480
  r,
1480
1481
  "."
1481
1482
  ] }),
1482
1483
  /* @__PURE__ */ o(
1483
- Ae,
1484
+ be,
1484
1485
  {
1485
1486
  loading: e,
1486
1487
  multiple: !1,
@@ -1490,13 +1491,13 @@ const qe = R(
1490
1491
  getOptionLabel: io,
1491
1492
  options: [...i],
1492
1493
  renderInput: (I) => /* @__PURE__ */ o(
1493
- be,
1494
- S(s({}, I), {
1494
+ Se,
1495
+ S(a({}, I), {
1495
1496
  variant: "filled",
1496
1497
  label: "Select organisation",
1497
- InputProps: S(s({}, I.InputProps), {
1498
- endAdornment: /* @__PURE__ */ p(M, { children: [
1499
- e ? /* @__PURE__ */ o(Se, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1498
+ InputProps: S(a({}, I.InputProps), {
1499
+ endAdornment: /* @__PURE__ */ h(N, { children: [
1500
+ e ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1500
1501
  I.InputProps.endAdornment
1501
1502
  ] })
1502
1503
  })
@@ -1508,7 +1509,7 @@ const qe = R(
1508
1509
  ]
1509
1510
  }
1510
1511
  );
1511
- }, zo = ot({
1512
+ }, zo = it({
1512
1513
  palette: {
1513
1514
  primary: {
1514
1515
  dark: "#00A651",
@@ -1559,7 +1560,7 @@ const qe = R(
1559
1560
  navBar: {
1560
1561
  backgroundColor: "#E8E8E8"
1561
1562
  }
1562
- }), Uo = ot({
1563
+ }), Uo = it({
1563
1564
  palette: {
1564
1565
  primary: {
1565
1566
  main: "#007236",
@@ -1613,18 +1614,18 @@ const qe = R(
1613
1614
  styleOverrides: {
1614
1615
  root: ({ theme: e }) => ({
1615
1616
  "&.Mui-selected": {
1616
- backgroundColor: ge(
1617
+ backgroundColor: fe(
1617
1618
  e.palette.secondary.main,
1618
1619
  e.palette.action.selectedOpacity
1619
1620
  ),
1620
1621
  "&:hover": {
1621
- backgroundColor: ge(
1622
+ backgroundColor: fe(
1622
1623
  e.palette.secondary.main,
1623
1624
  e.palette.action.selectedOpacity
1624
1625
  )
1625
1626
  },
1626
1627
  "&.Mui-focusVisible": {
1627
- backgroundColor: ge(
1628
+ backgroundColor: fe(
1628
1629
  e.palette.secondary.main,
1629
1630
  e.palette.action.focusOpacity
1630
1631
  )
@@ -1651,17 +1652,17 @@ const qe = R(
1651
1652
  backgroundColor: "#E8E8E8"
1652
1653
  }
1653
1654
  }), ro = {
1654
- domainCode: yt,
1655
+ domainCode: $t,
1655
1656
  navBarOpen: K,
1656
- navBarWidthOpen: Ct,
1657
- navBarWidthClosed: xt,
1658
- titleText: xe,
1659
- topBarHeight: vt,
1660
- navBarTop: wt
1661
- }, Go = X(() => ({ children: e }) => /* @__PURE__ */ o(lt, { children: e })), ao = ({
1657
+ navBarWidthOpen: xt,
1658
+ navBarWidthClosed: vt,
1659
+ titleText: ve,
1660
+ topBarHeight: wt,
1661
+ navBarTop: At
1662
+ }, Go = X(() => ({ children: e }) => /* @__PURE__ */ o(ct, { children: e })), ao = ({
1662
1663
  initialValues: e,
1663
1664
  children: t
1664
- }) => (ct(e), /* @__PURE__ */ o(M, { children: t })), Vo = X(
1665
+ }) => (dt(e), /* @__PURE__ */ o(N, { children: t })), Vo = X(
1665
1666
  (e) => ({ children: t }) => /* @__PURE__ */ o(
1666
1667
  ao,
1667
1668
  {
@@ -1679,20 +1680,20 @@ const qe = R(
1679
1680
  return /* @__PURE__ */ o(an, { client: t, children: e });
1680
1681
  });
1681
1682
  export {
1682
- bt as AgDialog,
1683
+ St as AgDialog,
1683
1684
  Po as AppLayout,
1684
1685
  Ho as AtomProvider,
1685
1686
  Mo as AuthGuard,
1686
- kt as Context,
1687
- ke as ContextError,
1687
+ Dt as Context,
1688
+ De as ContextError,
1688
1689
  Wo as DomainCodeDialog,
1689
1690
  $o as ExampleComponent,
1690
1691
  No as FetchAutocomplete,
1691
1692
  ao as HydrateAtoms,
1692
- pt as NAVBAR_WIDTH_CLOSED,
1693
- ut as NAVBAR_WIDTH_OPENED,
1693
+ ht as NAVBAR_WIDTH_CLOSED,
1694
+ pt as NAVBAR_WIDTH_OPENED,
1694
1695
  Eo as NavBar,
1695
- Oo as NavBarDarkStyledList,
1696
+ To as NavBarDarkStyledList,
1696
1697
  Bo as NavBarLightStyledList,
1697
1698
  fn as NavBarProvider,
1698
1699
  Fo as PageLayout,
@@ -1701,23 +1702,23 @@ export {
1701
1702
  Lo as SingleAutocomplete,
1702
1703
  no as atomStore,
1703
1704
  Cn as buildNavBarState,
1704
- yt as domainCodeAtom,
1705
+ $t as domainCodeAtom,
1705
1706
  zo as fed21Theme,
1706
1707
  zn as getAuth0Expiry,
1707
1708
  Uo as internalAgSystemsTheme,
1708
1709
  q as navBarClasses,
1709
1710
  K as navBarOpenAtom,
1710
- wt as navBarTopAtom,
1711
- xt as navBarWidthClosedAtom,
1712
- Ct as navBarWidthOpenAtom,
1713
- xe as titleTextAtom,
1714
- vt as topBarHeightAtom,
1715
- Tn as topBarMiddleAtom,
1716
- St as useAutocompleteOptions,
1711
+ At as navBarTopAtom,
1712
+ vt as navBarWidthClosedAtom,
1713
+ xt as navBarWidthOpenAtom,
1714
+ ve as titleTextAtom,
1715
+ wt as topBarHeightAtom,
1716
+ On as topBarMiddleAtom,
1717
+ kt as useAutocompleteOptions,
1717
1718
  mn as useNavBar,
1718
1719
  to as useSaladBar,
1719
1720
  Go as withAtomProvider,
1720
- To as withBrowserRouter,
1721
+ Oo as withBrowserRouter,
1721
1722
  Io as withNavBarProvider,
1722
1723
  Vo as withOverrideDefaults,
1723
1724
  qo as withQueryClient,