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