@australiangreens/ag-internal-components 0.0.96 → 0.0.97

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