codeforlife 2.10.5 → 2.10.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +10 -6
  2. package/dist/components/App.d.ts +1 -1
  3. package/dist/components/OrderedGrid.d.ts +10 -8
  4. package/dist/components/form/DatePickerField.d.ts +3 -3
  5. package/dist/components/form/index.cjs.js +1 -1
  6. package/dist/components/form/index.es.js +1 -1
  7. package/dist/components/index.cjs.js +1 -1
  8. package/dist/components/index.cjs.js.map +1 -1
  9. package/dist/components/index.es.js +101 -99
  10. package/dist/components/index.es.js.map +1 -1
  11. package/dist/index-CI5O_yH6.js +1189 -0
  12. package/dist/index-CI5O_yH6.js.map +1 -0
  13. package/dist/index-CXYppxE3.cjs +2 -0
  14. package/dist/index-CXYppxE3.cjs.map +1 -0
  15. package/dist/{index-VverRavP.js → index-D8Gc0IWi.js} +31 -32
  16. package/dist/index-D8Gc0IWi.js.map +1 -0
  17. package/dist/index-DCI-3m7f.cjs +5 -0
  18. package/dist/index-DCI-3m7f.cjs.map +1 -0
  19. package/dist/theme/components/MuiGrid.d.ts +3 -0
  20. package/dist/theme/components/_components.d.ts +1 -5
  21. package/dist/theme/components/index.cjs.js +1 -1
  22. package/dist/theme/components/index.es.js +1 -1
  23. package/dist/theme/index.cjs.js +1 -1
  24. package/dist/theme/index.es.js +1 -1
  25. package/dist/theme/typography.d.ts +2 -2
  26. package/dist/utils/theme.cjs.js +1 -1
  27. package/dist/utils/theme.es.js +1 -1
  28. package/package.json +7 -7
  29. package/dist/index-C-3iPCa4.js +0 -1111
  30. package/dist/index-C-3iPCa4.js.map +0 -1
  31. package/dist/index-CIj5ef8a.cjs +0 -5
  32. package/dist/index-CIj5ef8a.cjs.map +0 -1
  33. package/dist/index-VverRavP.js.map +0 -1
  34. package/dist/index-ifedknoZ.cjs +0 -2
  35. package/dist/index-ifedknoZ.cjs.map +0 -1
  36. package/dist/theme/components/MuiGrid2.d.ts +0 -3
package/README.md CHANGED
@@ -22,18 +22,22 @@ All other assets including images, logos, sounds etc., are not covered by
22
22
  this licence and no-one may copy, modify, distribute, show in public or
23
23
  create any derivative work from these assets.
24
24
 
25
- ## Installing your branch
25
+ ## Installing as a symlink
26
26
 
27
- You may wish to install and integrate your changes into a CFL frontend before
28
- it's been peer-reviewed.
27
+ To install this package into a CFL frontend before it's been peer-reviewed and
28
+ not have to reinstall it every time you make a change, you can install this
29
+ package as a [symlink](https://classic.yarnpkg.com/lang/en/docs/cli/link/) by
30
+ amending the `dependencies` in the `package.json` of a CFL frontend.
29
31
 
30
- *Remember to replace the branch name ("my-branch") with your
31
- [branch](https://github.com/ocadotechnology/codeforlife-package-javascript/branches)*.
32
+ *Remember that the [exports in package.json](package.json#exports) do NOT point
33
+ to the source ([src](src/index.ts)) files but rather the distribution
34
+ ([dist](dist/index.es.js)) files. Therefore, you'll need to rebuild the
35
+ distribution files every time you make a change by running `yarn vite build`.*
32
36
 
33
37
  ```json
34
38
  {
35
39
  "dependencies": {
36
- "codeforlife": "github:ocadotechnology/codeforlife-package-javascript#my-branch"
40
+ "codeforlife": "link:../package"
37
41
  }
38
42
  }
39
43
  ```
@@ -1,7 +1,7 @@
1
1
  import { JSX, ReactNode } from 'react';
2
2
  import { ProviderProps } from 'react-redux';
3
3
  import { Action } from 'redux';
4
- import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
4
+ import { ThemeProviderProps } from '@mui/material';
5
5
  export interface AppProps<A extends Action = Action, S = unknown> {
6
6
  path?: string;
7
7
  theme: ThemeProviderProps["theme"];
@@ -1,20 +1,22 @@
1
1
  import { FC, ReactElement } from 'react';
2
- import { Grid2Props } from '@mui/material';
3
- interface ItemProps extends Omit<Grid2Props, "key" | "order" | "xs" | "sm" | "md" | "lg" | "xl" | "xsOffset" | "smOffset" | "mdOffset" | "lgOffset" | "xlOffset"> {
2
+ import { GridProps } from '@mui/material';
3
+ interface ItemProps extends Omit<GridProps, "key" | "order" | "size" | "offset"> {
4
4
  }
5
5
  interface GlobalItemProps extends ItemProps {
6
- xs: number;
7
- sm: number;
8
- md: number;
9
- lg: number;
10
- xl: number;
6
+ size: {
7
+ xs: number;
8
+ sm: number;
9
+ md: number;
10
+ lg: number;
11
+ xl: number;
12
+ };
11
13
  }
12
14
  export interface OrderedGridProps {
13
15
  rows: Array<Array<{
14
16
  element: ReactElement;
15
17
  itemProps?: ItemProps;
16
18
  }>>;
17
- containerProps?: Omit<Grid2Props, "container">;
19
+ containerProps?: Omit<GridProps, "container">;
18
20
  globalItemProps: GlobalItemProps;
19
21
  }
20
22
  declare const OrderedGrid: FC<OrderedGridProps>;
@@ -1,10 +1,10 @@
1
- import { DatePickerProps, PickerValidDate } from '@mui/x-date-pickers';
1
+ import { DatePickerProps } from '@mui/x-date-pickers';
2
2
  import { ValidateOptions } from 'yup';
3
3
  import { JSX } from 'react';
4
- export interface DatePickerFieldProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends Omit<DatePickerProps<TDate, TEnableAccessibleFieldDOMStructure>, "name" | "value" | "onChange" | "slotProps"> {
4
+ export interface DatePickerFieldProps<TEnableAccessibleFieldDOMStructure extends boolean = true> extends Omit<DatePickerProps<TEnableAccessibleFieldDOMStructure>, "name" | "value" | "onChange" | "slotProps"> {
5
5
  name: string;
6
6
  required?: boolean;
7
7
  validateOptions?: ValidateOptions;
8
8
  }
9
- declare const DatePickerField: <TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>({ name, required, minDate, maxDate, validateOptions, ...otherDatePickerProps }: DatePickerFieldProps<TDate, TEnableAccessibleFieldDOMStructure>) => JSX.Element;
9
+ declare const DatePickerField: <TEnableAccessibleFieldDOMStructure extends boolean = false>({ name, required, minDate, maxDate, validateOptions, ...otherDatePickerProps }: DatePickerFieldProps<TEnableAccessibleFieldDOMStructure>) => JSX.Element;
10
10
  export default DatePickerField;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../index-CIj5ef8a.cjs");exports.ApiAutocompleteField=e.ApiAutocompleteField;exports.AutocompleteField=e.AutocompleteField;exports.CheckboxField=e.CheckboxField;exports.CountryField=e.CountryField;exports.DatePickerField=e.DatePickerField;exports.EmailField=e.EmailField;exports.FirstNameField=e.FirstNameField;exports.Form=e.Form;exports.OtpField=e.OtpField;exports.PasswordField=e.PasswordField;exports.RepeatField=e.RepeatField;exports.SubmitButton=e.SubmitButton;exports.TextField=e.TextField;exports.UkCountyField=e.UkCountyField;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../index-DCI-3m7f.cjs");exports.ApiAutocompleteField=e.ApiAutocompleteField;exports.AutocompleteField=e.AutocompleteField;exports.CheckboxField=e.CheckboxField;exports.CountryField=e.CountryField;exports.DatePickerField=e.DatePickerField;exports.EmailField=e.EmailField;exports.FirstNameField=e.FirstNameField;exports.Form=e.Form;exports.OtpField=e.OtpField;exports.PasswordField=e.PasswordField;exports.RepeatField=e.RepeatField;exports.SubmitButton=e.SubmitButton;exports.TextField=e.TextField;exports.UkCountyField=e.UkCountyField;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1,4 +1,4 @@
1
- import { A as i, a as s, C as l, b as t, D as F, E as d, F as o, c as m, O as r, P as p, R as u, S as c, T as A, U as C } from "../../index-C-3iPCa4.js";
1
+ import { A as i, a as s, C as l, b as t, D as F, E as d, F as o, c as m, O as r, P as p, R as u, S as c, T as A, U as C } from "../../index-CI5O_yH6.js";
2
2
  export {
3
3
  i as ApiAutocompleteField,
4
4
  s as AutocompleteField,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../index-CIj5ef8a.cjs"),C=require("../index-CBPn0wyX.cjs"),R=require("../Navigate-C_sgy8Xs.cjs"),S=require("../LinkButton-BOPjG7_2.cjs"),_=require("../index-B6aNVvMr.cjs"),n=require("../jsx-runtime-Dszzpdy0.cjs"),L=require("react-router"),u=require("@mui/material"),j=require("react"),M=require("react-redux"),F=require("../Countdown-CyJ-01oU.cjs"),U=require("../auth-B7Vdot4N.cjs"),A=require("../utils/general.cjs.js"),T=require("@mui/icons-material"),$=require("../Image-CgYjq-tA.cjs"),b=require("../api-CaeeoZaI.cjs"),D=require("../api-DIgp_6Vr.cjs"),q=({path:e,routes:s,header:t=n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{}),footer:r=n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{}),headerExcludePaths:o=[],footerExcludePaths:i=[]})=>n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[!o.includes(e)&&t,n.jsxRuntimeExports.jsx(L.Routes,{children:s}),!i.includes(e)&&r]}),G=e=>{const{pathname:s}=U.useLocation();return n.jsxRuntimeExports.jsx(q,{path:s,...e})},N=({path:e,theme:s,store:t,maxIdleSeconds:r=3600,maxTotalSeconds:o=3600,...i})=>n.jsxRuntimeExports.jsxs(u.ThemeProvider,{theme:s,children:[n.jsxRuntimeExports.jsx(u.CssBaseline,{}),n.jsxRuntimeExports.jsx(M.Provider,{store:t,children:e!==void 0?n.jsxRuntimeExports.jsx(L.StaticRouter,{location:e,children:n.jsxRuntimeExports.jsx(q,{path:e,...i})}):n.jsxRuntimeExports.jsx(L.BrowserRouter,{children:n.jsxRuntimeExports.jsx(G,{...i})})})]}),V=({open:e=!1,onClick:s,...t})=>{const[r,o]=j.useState(e);return j.useEffect(()=>{o(e)},[e]),n.jsxRuntimeExports.jsx(u.Tooltip,{open:r,onMouseOver:()=>{r||o(!0)},onMouseLeave:()=>{o(!1)},onClick:A.wrap({after:()=>{o(!r)}},s),...t})},Y=({content:e,children:s=n.jsxRuntimeExports.jsx(T.ContentCopy,{}),...t})=>n.jsxRuntimeExports.jsx(u.IconButton,{"data-testid":"copy-icon-button",onClick:()=>{navigator.clipboard.writeText(e)},...t,children:s}),P=({children:e="Download",endIcon:s=n.jsxRuntimeExports.jsx(T.Download,{}),file:t,...r})=>{let o,i;if("mimeType"in t){const{text:a,mimeType:l,name:c,charset:m="utf-8"}=t;let{extension:d}=t;d||(d="."+{plain:"txt",csv:"csv"}[l]),i={download:c+d,href:`data:text/${l};charset=${m},${encodeURIComponent(a)}`}}else o=URL.createObjectURL(t),i={href:o};return j.useEffect(()=>()=>{o&&URL.revokeObjectURL(o)},[o]),n.jsxRuntimeExports.jsx(u.Button,{endIcon:s,...r,...i,children:e})},z=({containerProps:e,toolbarProps:s,elevation:t=4,children:r,...o})=>{const i=u.useScrollTrigger({disableHysteresis:!0,threshold:0});return j.cloneElement(n.jsxRuntimeExports.jsx(u.AppBar,{elevation:t,...o,children:n.jsxRuntimeExports.jsx(u.Container,{...e,children:n.jsxRuntimeExports.jsx(u.Toolbar,{...s,children:r})})}),{position:i?"fixed":"sticky"})},H=({children:e,inputProps:s,...t})=>n.jsxRuntimeExports.jsxs(u.Button,{component:"label",...t,children:[e,n.jsxRuntimeExports.jsx("input",{type:"file",hidden:!0,...s})]}),I=({styleType:e,listProps:s={},pl:t=4,children:r})=>{const{sx:o,...i}=s,a={display:"list-item"};return n.jsxRuntimeExports.jsx(u.List,{sx:{listStyleType:e,pl:t,".MuiListItem-root":a,".MuiListItemText-root":a,...o},...i,children:r})},J=({rows:e,containerProps:s={},globalItemProps:t})=>{const r=Number(s.columns??12),o=l=>Math.floor(r/l),i=(l,c,m)=>Math.floor(c/o(m))*e.length+l,a=(l,c)=>{const m=e[0].length%o(c);return m!==0&&l===e[0].length-1?(r-m*c)/2:0};return n.jsxRuntimeExports.jsx(u.Unstable_Grid2,{container:!0,...s,children:e.map((l,c)=>l.map(({element:m,itemProps:d={}},x)=>n.jsxRuntimeExports.jsx(u.Unstable_Grid2,{order:{xs:i(c,x,t.xs),sm:i(c,x,t.sm),md:i(c,x,t.md),lg:i(c,x,t.lg),xl:i(c,x,t.xl)},xsOffset:a(x,t.xs),smOffset:a(x,t.sm),mdOffset:a(x,t.md),lgOffset:a(x,t.lg),xlOffset:a(x,t.xl),...t,...d,children:m},`${c}-${x}`)))})},K=({elementId:e,options:s,...t})=>n.jsxRuntimeExports.jsx(u.Link,{...t,onClick:()=>{document.getElementById(e)?.scrollIntoView(s)}}),Q=({children:e,useLazyListQuery:s,preferCacheValue:t,filters:r,page:o=0,rowsPerPage:i=50,rowsPerPageOptions:a=[50,100,150],stackProps:l,onRowsPerPageChange:c,onPageChange:m,...d})=>{const[x,k]=s(),[{limit:E,page:v,offset:g},y]=D.usePagination({page:o,limit:i});j.useEffect(()=>{x({limit:E,offset:g,...r},t)},[x,E,g,...Object.values(r||{}),t]);const{count:B,max_limit:h}=k.data||{};return h&&(a=a.filter(p=>p<=h)),n.jsxRuntimeExports.jsxs(u.Stack,{...l,children:[b.handleResultState(k,({data:p})=>e(p,{limit:E,page:v,offset:g,count:B,maxLimit:h})),n.jsxRuntimeExports.jsx(u.TablePagination,{component:"div",count:B??0,rowsPerPage:E,onRowsPerPageChange:p=>{y({limit:parseInt(p.target.value),page:0}),c&&c(p)},page:v,onPageChange:(p,f)=>{y(({limit:O})=>({limit:O,page:f})),m&&m(p,f)},rowsPerPageOptions:a.sort((p,f)=>p-f),...d})]})},W=({src:e,style:s={},...t})=>n.jsxRuntimeExports.jsx(u.Box,{component:"iframe",width:"100%",src:e,title:"YouTube video player",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen",style:{border:"0px",aspectRatio:"16 / 9",...s},...t});exports.forms=w.index;exports.pages=C.index;exports.Link=R.Link;exports.LinkIconButton=R.LinkIconButton;exports.LinkListItem=R.LinkListItem;exports.LinkTab=R.LinkTab;exports.Navigate=R.Navigate;exports.LinkButton=S.LinkButton;exports.tables=_.index;exports.Countdown=F.Countdown;exports.Image=$.Image;exports.SyncError=b.SyncError;exports.App=N;exports.ClickableTooltip=V;exports.CopyIconButton=Y;exports.DownloadFileButton=P;exports.ElevatedAppBar=z;exports.InputFileButton=H;exports.ItemizedList=I;exports.OrderedGrid=J;exports.ScrollIntoViewLink=K;exports.TablePagination=Q;exports.YouTubeVideo=W;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../index-DCI-3m7f.cjs"),S=require("../index-CBPn0wyX.cjs"),R=require("../Navigate-C_sgy8Xs.cjs"),z=require("../LinkButton-BOPjG7_2.cjs"),_=require("../index-B6aNVvMr.cjs"),s=require("../jsx-runtime-Dszzpdy0.cjs"),L=require("react-router"),u=require("@mui/material"),j=require("react"),O=require("react-redux"),M=require("../Countdown-CyJ-01oU.cjs"),F=require("../auth-B7Vdot4N.cjs"),A=require("../utils/general.cjs.js"),T=require("@mui/icons-material"),U=require("../Image-CgYjq-tA.cjs"),q=require("../api-CaeeoZaI.cjs"),$=require("../api-DIgp_6Vr.cjs"),b=({path:e,routes:n,header:t=s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{}),footer:r=s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{}),headerExcludePaths:o=[],footerExcludePaths:i=[]})=>s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[!o.includes(e)&&t,s.jsxRuntimeExports.jsx(L.Routes,{children:n}),!i.includes(e)&&r]}),D=e=>{const{pathname:n}=F.useLocation();return s.jsxRuntimeExports.jsx(b,{path:n,...e})},G=({path:e,theme:n,store:t,maxIdleSeconds:r=3600,maxTotalSeconds:o=3600,...i})=>s.jsxRuntimeExports.jsxs(u.ThemeProvider,{theme:n,children:[s.jsxRuntimeExports.jsx(u.CssBaseline,{}),s.jsxRuntimeExports.jsx(O.Provider,{store:t,children:e!==void 0?s.jsxRuntimeExports.jsx(L.StaticRouter,{location:e,children:s.jsxRuntimeExports.jsx(b,{path:e,...i})}):s.jsxRuntimeExports.jsx(L.BrowserRouter,{children:s.jsxRuntimeExports.jsx(D,{...i})})})]}),N=({open:e=!1,onClick:n,...t})=>{const[r,o]=j.useState(e);return j.useEffect(()=>{o(e)},[e]),s.jsxRuntimeExports.jsx(u.Tooltip,{open:r,onMouseOver:()=>{r||o(!0)},onMouseLeave:()=>{o(!1)},onClick:A.wrap({after:()=>{o(!r)}},n),...t})},V=({content:e,children:n=s.jsxRuntimeExports.jsx(T.ContentCopy,{}),...t})=>s.jsxRuntimeExports.jsx(u.IconButton,{"data-testid":"copy-icon-button",onClick:()=>{navigator.clipboard.writeText(e)},...t,children:n}),Y=({children:e="Download",endIcon:n=s.jsxRuntimeExports.jsx(T.Download,{}),file:t,...r})=>{let o,i;if("mimeType"in t){const{text:x,mimeType:l,name:c,charset:m="utf-8"}=t;let{extension:d}=t;d||(d="."+{plain:"txt",csv:"csv"}[l]),i={download:c+d,href:`data:text/${l};charset=${m},${encodeURIComponent(x)}`}}else o=URL.createObjectURL(t),i={href:o};return j.useEffect(()=>()=>{o&&URL.revokeObjectURL(o)},[o]),s.jsxRuntimeExports.jsx(u.Button,{endIcon:n,...r,...i,children:e})},P=({containerProps:e,toolbarProps:n,elevation:t=4,children:r,...o})=>{const i=u.useScrollTrigger({disableHysteresis:!0,threshold:0});return j.cloneElement(s.jsxRuntimeExports.jsx(u.AppBar,{elevation:t,...o,children:s.jsxRuntimeExports.jsx(u.Container,{...e,children:s.jsxRuntimeExports.jsx(u.Toolbar,{...n,children:r})})}),{position:i?"fixed":"sticky"})},H=({children:e,inputProps:n,...t})=>s.jsxRuntimeExports.jsxs(u.Button,{component:"label",...t,children:[e,s.jsxRuntimeExports.jsx("input",{type:"file",hidden:!0,...n})]}),I=({styleType:e,listProps:n={},pl:t=4,children:r})=>{const{sx:o,...i}=n,x={display:"list-item"};return s.jsxRuntimeExports.jsx(u.List,{sx:{listStyleType:e,pl:t,".MuiListItem-root":x,".MuiListItemText-root":x,...o},...i,children:r})},J=({rows:e,containerProps:n={},globalItemProps:t})=>{const r=Number(n.columns??12),o=l=>Math.floor(r/l),i=(l,c,m)=>Math.floor(c/o(m))*e.length+l,x=(l,c)=>{const m=e[0].length%o(c);return m!==0&&l===e[0].length-1?(r-m*c)/2:0};return s.jsxRuntimeExports.jsx(u.Grid,{container:!0,...n,children:e.map((l,c)=>l.map(({element:m,itemProps:d={}},a)=>s.jsxRuntimeExports.jsx(u.Grid,{order:{xs:i(c,a,t.size.xs),sm:i(c,a,t.size.sm),md:i(c,a,t.size.md),lg:i(c,a,t.size.lg),xl:i(c,a,t.size.xl)},offset:{xs:x(a,t.size.xs),sm:x(a,t.size.sm),md:x(a,t.size.md),lg:x(a,t.size.lg),xl:x(a,t.size.xl)},...t,...d,children:m},`${c}-${a}`)))})},K=({elementId:e,options:n,...t})=>s.jsxRuntimeExports.jsx(u.Link,{...t,onClick:()=>{document.getElementById(e)?.scrollIntoView(n)}}),Q=({children:e,useLazyListQuery:n,preferCacheValue:t,filters:r,page:o=0,rowsPerPage:i=50,rowsPerPageOptions:x=[50,100,150],stackProps:l,onRowsPerPageChange:c,onPageChange:m,...d})=>{const[a,k]=n(),[{limit:E,page:v,offset:f},y]=$.usePagination({page:o,limit:i});j.useEffect(()=>{a({limit:E,offset:f,...r},t)},[a,E,f,...Object.values(r||{}),t]);const{count:B,max_limit:h}=k.data||{};return h&&(x=x.filter(p=>p<=h)),s.jsxRuntimeExports.jsxs(u.Stack,{...l,children:[q.handleResultState(k,({data:p})=>e(p,{limit:E,page:v,offset:f,count:B,maxLimit:h})),s.jsxRuntimeExports.jsx(u.TablePagination,{component:"div",count:B??0,rowsPerPage:E,onRowsPerPageChange:p=>{y({limit:parseInt(p.target.value),page:0}),c&&c(p)},page:v,onPageChange:(p,g)=>{y(({limit:w})=>({limit:w,page:g})),m&&m(p,g)},rowsPerPageOptions:x.sort((p,g)=>p-g),...d})]})},W=({src:e,style:n={},...t})=>s.jsxRuntimeExports.jsx(u.Box,{component:"iframe",width:"100%",src:e,title:"YouTube video player",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen",style:{border:"0px",aspectRatio:"16 / 9",...n},...t});exports.forms=C.index;exports.pages=S.index;exports.Link=R.Link;exports.LinkIconButton=R.LinkIconButton;exports.LinkListItem=R.LinkListItem;exports.LinkTab=R.LinkTab;exports.Navigate=R.Navigate;exports.LinkButton=z.LinkButton;exports.tables=_.index;exports.Countdown=M.Countdown;exports.Image=U.Image;exports.SyncError=q.SyncError;exports.App=G;exports.ClickableTooltip=N;exports.CopyIconButton=V;exports.DownloadFileButton=Y;exports.ElevatedAppBar=P;exports.InputFileButton=H;exports.ItemizedList=I;exports.OrderedGrid=J;exports.ScrollIntoViewLink=K;exports.TablePagination=Q;exports.YouTubeVideo=W;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../src/components/App.tsx","../../src/components/ClickableTooltip.tsx","../../src/components/CopyIconButton.tsx","../../src/components/DownloadFileButton.tsx","../../src/components/ElevatedAppBar.tsx","../../src/components/InputFileButton.tsx","../../src/components/ItemizedList.tsx","../../src/components/OrderedGrid.tsx","../../src/components/ScrollIntoViewLink.tsx","../../src/components/TablePagination.tsx","../../src/components/YouTubeVideo.tsx"],"sourcesContent":["import { BrowserRouter, Routes as RouterRoutes } from \"react-router\"\nimport { CssBaseline, ThemeProvider } from \"@mui/material\"\nimport { type FC, type JSX, type ReactNode } from \"react\"\nimport { Provider, type ProviderProps } from \"react-redux\"\nimport { type Action } from \"redux\"\nimport { StaticRouter } from \"react-router\"\nimport { type ThemeProviderProps } from \"@mui/material/styles/ThemeProvider\"\n\nimport \"./App.css\"\nimport { useLocation } from \"../hooks\"\n// import { InactiveDialog, ScreenTimeDialog } from \"../features\"\n// import { useCountdown, useEventListener } from \"../hooks\"\n// import \"../scripts\"\n// import {\n// configureFreshworksWidget,\n// toggleOneTrustInfoDisplay,\n// } from \"../utils/window\"\n\nexport interface AppProps<A extends Action = Action, S = unknown> {\n path?: string\n theme: ThemeProviderProps[\"theme\"]\n store: ProviderProps<A, S>[\"store\"]\n routes: ReactNode\n header?: ReactNode\n footer?: ReactNode\n headerExcludePaths?: string[]\n footerExcludePaths?: string[]\n maxIdleSeconds?: number\n maxTotalSeconds?: number\n}\n\ntype BaseRoutesProps = Pick<\n AppProps,\n \"routes\" | \"header\" | \"footer\" | \"headerExcludePaths\" | \"footerExcludePaths\"\n>\n\nconst Routes: FC<BaseRoutesProps & { path: string }> = ({\n path,\n routes,\n header = <></>, // TODO: \"header = <Header />\"\n footer = <></>, // TODO: \"footer = <Footer />\"\n headerExcludePaths = [],\n footerExcludePaths = [],\n}) => (\n <>\n {!headerExcludePaths.includes(path) && header}\n <RouterRoutes>{routes}</RouterRoutes>\n {!footerExcludePaths.includes(path) && footer}\n </>\n)\n\nconst BrowserRoutes: FC<BaseRoutesProps> = props => {\n const { pathname } = useLocation()\n\n return <Routes path={pathname} {...props} />\n}\n\nconst App = <A extends Action = Action, S = unknown>({\n path,\n theme,\n store,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n maxIdleSeconds = 60 * 60,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n maxTotalSeconds = 60 * 60,\n ...routesProps\n}: AppProps<A, S>): JSX.Element => {\n // TODO: cannot use document during SSR\n // const root = document.getElementById(\"root\") as HTMLElement\n\n // const [idleSeconds, setIdleSeconds] = useCountdown(maxIdleSeconds)\n // const [totalSeconds, setTotalSeconds] = useCountdown(maxTotalSeconds)\n // const resetIdleSeconds = useCallback(() => {\n // setIdleSeconds(maxIdleSeconds)\n // }, [setIdleSeconds, maxIdleSeconds])\n\n // const isIdle = idleSeconds === 0\n // const tooMuchScreenTime = totalSeconds === 0\n\n // useEventListener(root, \"mousemove\", resetIdleSeconds)\n // useEventListener(root, \"keypress\", resetIdleSeconds)\n\n // React.useEffect(() => {\n // configureFreshworksWidget(\"hide\")\n // }, [])\n\n // if (import.meta.env.PROD) {\n // toggleOneTrustInfoDisplay()\n // }\n\n return (\n <ThemeProvider theme={theme}>\n <CssBaseline />\n <Provider store={store}>\n {/* <InactiveDialog open={isIdle} onClose={resetIdleSeconds} />\n <ScreenTimeDialog\n open={!isIdle && tooMuchScreenTime}\n onClose={() => {\n setTotalSeconds(maxTotalSeconds)\n }}\n /> */}\n {\n // https://github.com/remix-run/react-router/tree/main/examples/ssr\n path !== undefined ? (\n <StaticRouter location={path}>\n <Routes path={path} {...routesProps} />\n </StaticRouter>\n ) : (\n <BrowserRouter>\n <BrowserRoutes {...routesProps} />\n </BrowserRouter>\n )\n }\n </Provider>\n </ThemeProvider>\n )\n}\n\nexport default App\n\n// TODO: figure out what to do with this\n// function useOneTrustScripts(): void {\n// const oneTrustEventTypes = [\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/consent/5da42396-cb12-4493-8d04-5179033cfbad/OtAutoBlock.js\",\n// type: \"text/javascript\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js\",\n// type: \"text/javascript\",\n// charset: \"UTF-8\",\n// },\n// attrs: {\n// \"data-domain-script\": \"5da42396-cb12-4493-8d04-5179033cfbad\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/scripttemplates/202302.1.0/otBannerSdk.js\",\n// async: true,\n// type: \"text/javascript\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// ]\n// if (oneTrustEventTypes.some(t => t === \"error\")) {\n// alert(\"OneTrust failed to load!\")\n// }\n// }\n","import { Tooltip, type TooltipProps } from \"@mui/material\"\nimport React from \"react\"\n\nimport { wrap } from \"../utils/general\"\n\nexport interface ClickableTooltipProps extends TooltipProps {}\n\nconst ClickableTooltip: React.FC<ClickableTooltipProps> = ({\n open = false,\n onClick,\n ...otherTooltipProps\n}) => {\n const [_open, _setOpen] = React.useState(open)\n\n React.useEffect(() => {\n _setOpen(open)\n }, [open])\n\n return (\n <Tooltip\n open={_open}\n onMouseOver={() => {\n if (!_open) {\n _setOpen(true)\n }\n }}\n onMouseLeave={() => {\n _setOpen(false)\n }}\n onClick={wrap(\n {\n after: () => {\n _setOpen(!_open)\n },\n },\n onClick,\n )}\n {...otherTooltipProps}\n />\n )\n}\n\nexport default ClickableTooltip\n","import { IconButton, type IconButtonProps } from \"@mui/material\"\nimport { ContentCopy as ContentCopyIcon } from \"@mui/icons-material\"\nimport type { FC } from \"react\"\n\nexport interface CopyIconButtonProps extends Omit<IconButtonProps, \"onClick\"> {\n content: string\n}\n\nconst CopyIconButton: FC<CopyIconButtonProps> = ({\n content,\n children = <ContentCopyIcon />,\n ...otherIconButtonProps\n}) => {\n return (\n <IconButton\n data-testid=\"copy-icon-button\"\n onClick={() => {\n void navigator.clipboard.writeText(content)\n }}\n {...otherIconButtonProps}\n >\n {children}\n </IconButton>\n )\n}\n\nexport default CopyIconButton\n","import { Button, type ButtonProps } from \"@mui/material\"\nimport { type FC, useEffect } from \"react\"\nimport { Download as DownloadIcon } from \"@mui/icons-material\"\n\nexport type DownloadFileButtonProps = ButtonProps & {\n file:\n | Blob\n | MediaSource\n | {\n text: string\n mimeType: \"plain\" | \"csv\"\n name: string\n charset?: string\n extension?: string\n }\n}\n\nconst DownloadFileButton: FC<DownloadFileButtonProps> = ({\n children = \"Download\",\n endIcon = <DownloadIcon />,\n file,\n ...otherButtonProps\n}) => {\n let url: undefined | string = undefined\n let anchorProps: undefined | { download?: string; href: string } = undefined\n if (\"mimeType\" in file) {\n const { text, mimeType, name, charset = \"utf-8\" } = file\n let { extension } = file\n\n if (!extension) extension = \".\" + { plain: \"txt\", csv: \"csv\" }[mimeType]\n\n anchorProps = {\n download: name + extension,\n href: `data:text/${mimeType};charset=${charset},${encodeURIComponent(text)}`,\n }\n } else {\n url = URL.createObjectURL(file)\n\n anchorProps = { href: url }\n }\n\n useEffect(() => {\n return () => {\n if (url) URL.revokeObjectURL(url)\n }\n }, [url])\n\n return (\n <Button endIcon={endIcon} {...otherButtonProps} {...anchorProps}>\n {children}\n </Button>\n )\n}\n\nexport default DownloadFileButton\n","import {\n AppBar,\n type AppBarProps,\n Container,\n type ContainerProps,\n Toolbar,\n type ToolbarProps,\n useScrollTrigger,\n} from \"@mui/material\"\nimport { type FC, cloneElement } from \"react\"\n\nexport interface ElevatedAppBarProps extends Omit<AppBarProps, \"position\"> {\n containerProps: ContainerProps\n toolbarProps?: ToolbarProps\n}\n\nconst ElevatedAppBar: FC<ElevatedAppBarProps> = ({\n containerProps,\n toolbarProps,\n elevation = 4,\n children,\n ...otherProps\n}) => {\n const trigger = useScrollTrigger({\n disableHysteresis: true,\n threshold: 0,\n })\n\n return cloneElement(\n <AppBar elevation={elevation} {...otherProps}>\n <Container {...containerProps}>\n <Toolbar {...toolbarProps}>{children}</Toolbar>\n </Container>\n </AppBar>,\n {\n position: trigger ? \"fixed\" : \"sticky\",\n },\n )\n}\n\nexport default ElevatedAppBar\n","import { Button, type ButtonProps } from \"@mui/material\"\nimport {\n type DetailedHTMLProps,\n type FC,\n type InputHTMLAttributes,\n} from \"react\"\n\nexport interface InputFileButtonProps\n extends Omit<ButtonProps<\"label\">, \"component\"> {\n inputProps?: Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n \"type\" | \"hidden\"\n >\n}\n\nconst InputFileButton: FC<InputFileButtonProps> = ({\n children,\n inputProps,\n ...otherButtonProps\n}) => (\n <Button component=\"label\" {...otherButtonProps}>\n {children}\n <input type=\"file\" hidden {...inputProps} />\n </Button>\n)\n\nexport default InputFileButton\n","import { type FC, type ReactElement } from \"react\"\nimport {\n List,\n type ListItem,\n type ListItemText,\n type ListProps,\n} from \"@mui/material\"\n\ntype ListItemElement =\n | ReactElement<typeof ListItem | typeof ListItemText>\n | string\n\nexport interface ItemizedListProps {\n styleType:\n | \"unset\"\n | \"initial\"\n | \"inherit\"\n | \"upper-roman\"\n | \"upper-latin\"\n | \"upper-alpha\"\n | \"square\"\n | \"none\"\n | \"lower-roman\"\n | \"lower-latin\"\n | \"lower-greek\"\n | \"lower-alpha\"\n | \"georgian\"\n | \"disc\"\n | \"decimal-leading-zero\"\n | \"decimal\"\n | \"armenian\"\n | \"circle\"\n listProps?: ListProps\n pl?: number\n children: ListItemElement | ListItemElement[]\n}\n\nconst ItemizedList: FC<ItemizedListProps> = ({\n styleType,\n listProps = {},\n pl = 4,\n children,\n}) => {\n const { sx, ...otherProps } = listProps\n const listItemProps = { display: \"list-item\" }\n\n return (\n <List\n sx={{\n listStyleType: styleType,\n pl,\n \".MuiListItem-root\": listItemProps,\n \".MuiListItemText-root\": listItemProps,\n ...sx,\n }}\n {...otherProps}\n >\n {children}\n </List>\n )\n}\n\nexport default ItemizedList\n","import { type FC, type ReactElement } from \"react\"\nimport { Unstable_Grid2 as Grid, type Grid2Props } from \"@mui/material\"\n\ninterface ItemProps\n extends Omit<\n Grid2Props,\n | \"key\"\n | \"order\"\n | \"xs\"\n | \"sm\"\n | \"md\"\n | \"lg\"\n | \"xl\"\n | \"xsOffset\"\n | \"smOffset\"\n | \"mdOffset\"\n | \"lgOffset\"\n | \"xlOffset\"\n > {}\n\ninterface GlobalItemProps extends ItemProps {\n xs: number\n sm: number\n md: number\n lg: number\n xl: number\n}\n\nexport interface OrderedGridProps {\n rows: Array<\n Array<{\n element: ReactElement\n itemProps?: ItemProps\n }>\n >\n containerProps?: Omit<Grid2Props, \"container\">\n globalItemProps: GlobalItemProps\n}\n\nconst OrderedGrid: FC<OrderedGridProps> = ({\n rows,\n containerProps = {},\n globalItemProps,\n}) => {\n const columns = Number(containerProps.columns ?? 12)\n\n const getItemsPerRow = (size: number): number => Math.floor(columns / size)\n\n const getOrder = (\n rowIndex: number,\n itemIndex: number,\n size: number,\n ): number =>\n Math.floor(itemIndex / getItemsPerRow(size)) * rows.length + rowIndex\n\n const getOffset = (itemIndex: number, size: number): number => {\n const itemsOnLastRow = rows[0].length % getItemsPerRow(size)\n return itemsOnLastRow !== 0 && itemIndex === rows[0].length - 1\n ? (columns - itemsOnLastRow * size) / 2\n : 0\n }\n\n return (\n <Grid container {...containerProps}>\n {rows.map((row, rowIndex) =>\n row.map(({ element, itemProps = {} }, itemIndex) => (\n <Grid\n key={`${rowIndex}-${itemIndex}`}\n order={{\n xs: getOrder(rowIndex, itemIndex, globalItemProps.xs),\n sm: getOrder(rowIndex, itemIndex, globalItemProps.sm),\n md: getOrder(rowIndex, itemIndex, globalItemProps.md),\n lg: getOrder(rowIndex, itemIndex, globalItemProps.lg),\n xl: getOrder(rowIndex, itemIndex, globalItemProps.xl),\n }}\n xsOffset={getOffset(itemIndex, globalItemProps.xs)}\n smOffset={getOffset(itemIndex, globalItemProps.sm)}\n mdOffset={getOffset(itemIndex, globalItemProps.md)}\n lgOffset={getOffset(itemIndex, globalItemProps.lg)}\n xlOffset={getOffset(itemIndex, globalItemProps.xl)}\n {...globalItemProps}\n {...itemProps}\n >\n {element}\n </Grid>\n )),\n )}\n </Grid>\n )\n}\n\nexport default OrderedGrid\n","import { Link, type LinkProps } from \"@mui/material\"\nimport { type FC } from \"react\"\nexport interface ScrollIntoViewLinkProps extends Omit<LinkProps, \"onClick\"> {\n elementId: string\n options?: ScrollIntoViewOptions\n}\n\nconst ScrollIntoViewLink: FC<ScrollIntoViewLinkProps> = ({\n elementId,\n options,\n ...linkProps\n}) => (\n <Link\n {...linkProps}\n onClick={() => {\n const element = document.getElementById(elementId)\n element?.scrollIntoView(options)\n }}\n />\n)\n\nexport default ScrollIntoViewLink\n","import {\n type ElementType,\n type JSX,\n type JSXElementConstructor,\n type ReactNode,\n useEffect,\n} from \"react\"\nimport {\n TablePagination as MuiTablePagination,\n type TablePaginationProps as MuiTablePaginationProps,\n Stack,\n type StackProps,\n type TablePaginationBaseProps,\n} from \"@mui/material\"\nimport type { TypedUseLazyQuery } from \"@reduxjs/toolkit/query/react\"\n\nimport { type ListArg, type ListResult, handleResultState } from \"../utils/api\"\nimport { type Pagination, usePagination } from \"../hooks/api\"\n\nexport type TablePaginationProps<\n QueryArg extends ListArg,\n ResultType extends ListResult<any>,\n RootComponent extends\n ElementType = JSXElementConstructor<TablePaginationBaseProps>,\n AdditionalProps = {},\n> = Omit<\n MuiTablePaginationProps<RootComponent, AdditionalProps>,\n | \"component\"\n | \"count\"\n | \"rowsPerPage\"\n | \"onRowsPerPageChange\"\n | \"rowsPerPageOptions\"\n | \"page\"\n | \"onPageChange\"\n> &\n Partial<\n Pick<\n MuiTablePaginationProps<RootComponent, AdditionalProps>,\n \"onRowsPerPageChange\" | \"onPageChange\"\n >\n > & {\n children: (\n data: ResultType[\"data\"],\n pagination: Pagination & { count?: number; maxLimit?: number },\n ) => ReactNode\n useLazyListQuery: TypedUseLazyQuery<ResultType, QueryArg, any>\n preferCacheValue?: boolean\n filters?: Omit<QueryArg, \"limit\" | \"offset\">\n rowsPerPageOptions?: number[]\n stackProps?: StackProps\n page?: number\n rowsPerPage?: number\n }\n\nconst TablePagination = <\n QueryArg extends ListArg,\n ResultType extends ListResult<any>,\n RootComponent extends\n ElementType = JSXElementConstructor<TablePaginationBaseProps>,\n AdditionalProps = {},\n>({\n children,\n useLazyListQuery,\n preferCacheValue,\n filters,\n page: initialPage = 0,\n rowsPerPage: initialLimit = 50,\n rowsPerPageOptions = [50, 100, 150],\n stackProps,\n onRowsPerPageChange,\n onPageChange,\n ...tablePaginationProps\n}: TablePaginationProps<\n QueryArg,\n ResultType,\n RootComponent,\n AdditionalProps\n>): JSX.Element => {\n const [trigger, result] = useLazyListQuery()\n const [{ limit, page, offset }, setPagination] = usePagination({\n page: initialPage,\n limit: initialLimit,\n })\n\n useEffect(\n () => {\n void trigger({ limit, offset, ...filters } as QueryArg, preferCacheValue)\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n trigger,\n limit,\n offset,\n // eslint-disable-next-line react-hooks/exhaustive-deps,@typescript-eslint/no-unsafe-assignment\n ...Object.values(filters || {}),\n preferCacheValue,\n ],\n )\n\n const { count, max_limit } = result.data || {}\n\n if (max_limit) {\n rowsPerPageOptions = rowsPerPageOptions.filter(\n option => option <= max_limit,\n )\n }\n\n return (\n <Stack {...stackProps}>\n {handleResultState(result, ({ data }) =>\n children(data, {\n limit,\n page,\n offset,\n count,\n maxLimit: max_limit,\n }),\n )}\n <MuiTablePagination\n component=\"div\"\n count={count ?? 0}\n rowsPerPage={limit}\n onRowsPerPageChange={event => {\n setPagination({ limit: parseInt(event.target.value), page: 0 })\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (onRowsPerPageChange) onRowsPerPageChange(event)\n }}\n page={page}\n onPageChange={(event, page) => {\n setPagination(({ limit }) => ({ limit, page }))\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (onPageChange) onPageChange(event, page)\n }}\n // ascending order\n rowsPerPageOptions={rowsPerPageOptions.sort((a, b) => a - b)}\n {...tablePaginationProps}\n />\n </Stack>\n )\n}\n\nexport default TablePagination\n","import { Box, type BoxProps } from \"@mui/material\"\nimport { type FC } from \"react\"\n\nexport interface YouTubeVideoProps extends Omit<BoxProps, \"component\"> {\n src: string\n}\n\nconst YouTubeVideo: FC<YouTubeVideoProps> = ({\n src,\n style = {},\n ...otherProps\n}) => {\n return (\n <Box\n component=\"iframe\"\n width=\"100%\"\n src={src}\n title=\"YouTube video player\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen\"\n style={{ border: \"0px\", aspectRatio: \"16 / 9\", ...style }}\n {...otherProps}\n />\n )\n}\n\nexport default YouTubeVideo\n"],"names":["Routes","path","routes","header","jsx","Fragment","footer","headerExcludePaths","footerExcludePaths","jsxs","RouterRoutes","BrowserRoutes","props","pathname","useLocation","App","theme","store","maxIdleSeconds","maxTotalSeconds","routesProps","ThemeProvider","CssBaseline","Provider","StaticRouter","BrowserRouter","ClickableTooltip","open","onClick","otherTooltipProps","_open","_setOpen","React","Tooltip","wrap","CopyIconButton","content","children","ContentCopyIcon","otherIconButtonProps","IconButton","DownloadFileButton","endIcon","DownloadIcon","file","otherButtonProps","url","anchorProps","text","mimeType","name","charset","extension","useEffect","Button","ElevatedAppBar","containerProps","toolbarProps","elevation","otherProps","trigger","useScrollTrigger","cloneElement","AppBar","Container","Toolbar","InputFileButton","inputProps","ItemizedList","styleType","listProps","pl","sx","listItemProps","List","OrderedGrid","rows","globalItemProps","columns","getItemsPerRow","size","getOrder","rowIndex","itemIndex","getOffset","itemsOnLastRow","Grid","row","element","itemProps","ScrollIntoViewLink","elementId","options","linkProps","Link","TablePagination","useLazyListQuery","preferCacheValue","filters","initialPage","initialLimit","rowsPerPageOptions","stackProps","onRowsPerPageChange","onPageChange","tablePaginationProps","result","limit","page","offset","setPagination","usePagination","count","max_limit","option","Stack","handleResultState","data","MuiTablePagination","event","a","b","YouTubeVideo","src","style","Box"],"mappings":"2oBAoCMA,EAAiD,CAAC,CACtD,KAAAC,EACA,OAAAC,EACA,OAAAC,EAASC,EAAAA,kBAAAA,IAAAC,EAAAA,kBAAAA,SAAA,EAAE,EACX,OAAAC,EAASF,EAAAA,kBAAAA,IAAAC,EAAAA,kBAAAA,SAAA,EAAE,EACX,mBAAAE,EAAqB,CAAA,EACrB,mBAAAC,EAAqB,CAAA,CACvB,IACEC,EAAAA,kBAAAA,KAAAJ,6BAAA,CACG,SAAA,CAAA,CAACE,EAAmB,SAASN,CAAI,GAAKE,EACvCC,EAAAA,kBAAAA,IAACM,EAAAA,QAAc,SAAAR,CAAA,CAAO,EACrB,CAACM,EAAmB,SAASP,CAAI,GAAKK,CAAA,EACzC,EAGIK,EAAqCC,GAAS,CAClD,KAAM,CAAE,SAAAC,CAAA,EAAaC,cAAA,EAErB,OAAOV,EAAAA,kBAAAA,IAACJ,EAAA,CAAO,KAAMa,EAAW,GAAGD,EAAO,CAC5C,EAEMG,EAAM,CAAyC,CACnD,KAAAd,EACA,MAAAe,EACA,MAAAC,EAEA,eAAAC,EAAiB,KAEjB,gBAAAC,EAAkB,KAClB,GAAGC,CACL,IAyBIX,yBAACY,EAAAA,eAAc,MAAAL,EACb,SAAA,CAAA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cP,EAAO,MAAQ,CAAA,EAE5C,OAAIO,IACFZ,EAAqBA,EAAmB,UAC5Ba,GAAUD,CAAA,GAKtBxG,EAAAA,kBAAAA,KAAC0G,EAAAA,MAAA,CAAO,GAAGb,EACR,SAAA,CAAAc,EAAAA,kBAAkBV,EAAQ,CAAC,CAAE,KAAAW,CAAA,IAC5BhF,EAASgF,EAAM,CACb,MAAAV,EACA,KAAAC,EACA,OAAAC,EACA,MAAAG,EACA,SAAUC,CAAA,CACX,CAAA,EAEH7G,EAAAA,kBAAAA,IAACkH,EAAAA,gBAAA,CACC,UAAU,MACV,MAAON,GAAS,EAChB,YAAaL,EACb,oBAAqBY,GAAS,CAC5BT,EAAc,CAAE,MAAO,SAASS,EAAM,OAAO,KAAK,EAAG,KAAM,EAAG,EAE1DhB,KAAyCgB,CAAK,CACpD,EACA,KAAAX,EACA,aAAc,CAACW,EAAOX,IAAS,CAC7BE,EAAc,CAAC,CAAE,MAAAH,CAAAA,KAAa,CAAE,MAAAA,EAAO,KAAAC,CAAAA,EAAO,EAE1CJ,GAAcA,EAAae,EAAOX,CAAI,CAC5C,EAEA,mBAAoBP,EAAmB,KAAK,CAACmB,EAAGC,IAAMD,EAAIC,CAAC,EAC1D,GAAGhB,CAAA,CAAA,CACN,EACF,CAEJ,ECpIMiB,EAAsC,CAAC,CAC3C,IAAAC,EACA,MAAAC,EAAQ,CAAA,EACR,GAAGjE,CACL,IAEIvD,EAAAA,kBAAAA,IAACyH,EAAAA,IAAA,CACC,UAAU,SACV,MAAM,OACN,IAAAF,EACA,MAAM,uBACN,MAAM,kHACN,MAAO,CAAE,OAAQ,MAAO,YAAa,SAAU,GAAGC,CAAA,EACjD,GAAGjE,CAAA,CAAA"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../src/components/App.tsx","../../src/components/ClickableTooltip.tsx","../../src/components/CopyIconButton.tsx","../../src/components/DownloadFileButton.tsx","../../src/components/ElevatedAppBar.tsx","../../src/components/InputFileButton.tsx","../../src/components/ItemizedList.tsx","../../src/components/OrderedGrid.tsx","../../src/components/ScrollIntoViewLink.tsx","../../src/components/TablePagination.tsx","../../src/components/YouTubeVideo.tsx"],"sourcesContent":["import { BrowserRouter, Routes as RouterRoutes } from \"react-router\"\nimport { CssBaseline, ThemeProvider } from \"@mui/material\"\nimport { type FC, type JSX, type ReactNode } from \"react\"\nimport { Provider, type ProviderProps } from \"react-redux\"\nimport { type Action } from \"redux\"\nimport { StaticRouter } from \"react-router\"\nimport { type ThemeProviderProps } from \"@mui/material\"\n\nimport \"./App.css\"\nimport { useLocation } from \"../hooks\"\n// import { InactiveDialog, ScreenTimeDialog } from \"../features\"\n// import { useCountdown, useEventListener } from \"../hooks\"\n// import \"../scripts\"\n// import {\n// configureFreshworksWidget,\n// toggleOneTrustInfoDisplay,\n// } from \"../utils/window\"\n\nexport interface AppProps<A extends Action = Action, S = unknown> {\n path?: string\n theme: ThemeProviderProps[\"theme\"]\n store: ProviderProps<A, S>[\"store\"]\n routes: ReactNode\n header?: ReactNode\n footer?: ReactNode\n headerExcludePaths?: string[]\n footerExcludePaths?: string[]\n maxIdleSeconds?: number\n maxTotalSeconds?: number\n}\n\ntype BaseRoutesProps = Pick<\n AppProps,\n \"routes\" | \"header\" | \"footer\" | \"headerExcludePaths\" | \"footerExcludePaths\"\n>\n\nconst Routes: FC<BaseRoutesProps & { path: string }> = ({\n path,\n routes,\n header = <></>, // TODO: \"header = <Header />\"\n footer = <></>, // TODO: \"footer = <Footer />\"\n headerExcludePaths = [],\n footerExcludePaths = [],\n}) => (\n <>\n {!headerExcludePaths.includes(path) && header}\n <RouterRoutes>{routes}</RouterRoutes>\n {!footerExcludePaths.includes(path) && footer}\n </>\n)\n\nconst BrowserRoutes: FC<BaseRoutesProps> = props => {\n const { pathname } = useLocation()\n\n return <Routes path={pathname} {...props} />\n}\n\nconst App = <A extends Action = Action, S = unknown>({\n path,\n theme,\n store,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n maxIdleSeconds = 60 * 60,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n maxTotalSeconds = 60 * 60,\n ...routesProps\n}: AppProps<A, S>): JSX.Element => {\n // TODO: cannot use document during SSR\n // const root = document.getElementById(\"root\") as HTMLElement\n\n // const [idleSeconds, setIdleSeconds] = useCountdown(maxIdleSeconds)\n // const [totalSeconds, setTotalSeconds] = useCountdown(maxTotalSeconds)\n // const resetIdleSeconds = useCallback(() => {\n // setIdleSeconds(maxIdleSeconds)\n // }, [setIdleSeconds, maxIdleSeconds])\n\n // const isIdle = idleSeconds === 0\n // const tooMuchScreenTime = totalSeconds === 0\n\n // useEventListener(root, \"mousemove\", resetIdleSeconds)\n // useEventListener(root, \"keypress\", resetIdleSeconds)\n\n // React.useEffect(() => {\n // configureFreshworksWidget(\"hide\")\n // }, [])\n\n // if (import.meta.env.PROD) {\n // toggleOneTrustInfoDisplay()\n // }\n\n return (\n <ThemeProvider theme={theme}>\n <CssBaseline />\n <Provider store={store}>\n {/* <InactiveDialog open={isIdle} onClose={resetIdleSeconds} />\n <ScreenTimeDialog\n open={!isIdle && tooMuchScreenTime}\n onClose={() => {\n setTotalSeconds(maxTotalSeconds)\n }}\n /> */}\n {\n // https://github.com/remix-run/react-router/tree/main/examples/ssr\n path !== undefined ? (\n <StaticRouter location={path}>\n <Routes path={path} {...routesProps} />\n </StaticRouter>\n ) : (\n <BrowserRouter>\n <BrowserRoutes {...routesProps} />\n </BrowserRouter>\n )\n }\n </Provider>\n </ThemeProvider>\n )\n}\n\nexport default App\n\n// TODO: figure out what to do with this\n// function useOneTrustScripts(): void {\n// const oneTrustEventTypes = [\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/consent/5da42396-cb12-4493-8d04-5179033cfbad/OtAutoBlock.js\",\n// type: \"text/javascript\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js\",\n// type: \"text/javascript\",\n// charset: \"UTF-8\",\n// },\n// attrs: {\n// \"data-domain-script\": \"5da42396-cb12-4493-8d04-5179033cfbad\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// useExternalScript({\n// props: {\n// src: \"https://cdn-ukwest.onetrust.com/scripttemplates/202302.1.0/otBannerSdk.js\",\n// async: true,\n// type: \"text/javascript\",\n// },\n// eventTypes: [\"load\", \"error\"],\n// }),\n// ]\n// if (oneTrustEventTypes.some(t => t === \"error\")) {\n// alert(\"OneTrust failed to load!\")\n// }\n// }\n","import { Tooltip, type TooltipProps } from \"@mui/material\"\nimport React from \"react\"\n\nimport { wrap } from \"../utils/general\"\n\nexport interface ClickableTooltipProps extends TooltipProps {}\n\nconst ClickableTooltip: React.FC<ClickableTooltipProps> = ({\n open = false,\n onClick,\n ...otherTooltipProps\n}) => {\n const [_open, _setOpen] = React.useState(open)\n\n React.useEffect(() => {\n _setOpen(open)\n }, [open])\n\n return (\n <Tooltip\n open={_open}\n onMouseOver={() => {\n if (!_open) {\n _setOpen(true)\n }\n }}\n onMouseLeave={() => {\n _setOpen(false)\n }}\n onClick={wrap(\n {\n after: () => {\n _setOpen(!_open)\n },\n },\n onClick,\n )}\n {...otherTooltipProps}\n />\n )\n}\n\nexport default ClickableTooltip\n","import { IconButton, type IconButtonProps } from \"@mui/material\"\nimport { ContentCopy as ContentCopyIcon } from \"@mui/icons-material\"\nimport type { FC } from \"react\"\n\nexport interface CopyIconButtonProps extends Omit<IconButtonProps, \"onClick\"> {\n content: string\n}\n\nconst CopyIconButton: FC<CopyIconButtonProps> = ({\n content,\n children = <ContentCopyIcon />,\n ...otherIconButtonProps\n}) => {\n return (\n <IconButton\n data-testid=\"copy-icon-button\"\n onClick={() => {\n void navigator.clipboard.writeText(content)\n }}\n {...otherIconButtonProps}\n >\n {children}\n </IconButton>\n )\n}\n\nexport default CopyIconButton\n","import { Button, type ButtonProps } from \"@mui/material\"\nimport { type FC, useEffect } from \"react\"\nimport { Download as DownloadIcon } from \"@mui/icons-material\"\n\nexport type DownloadFileButtonProps = ButtonProps & {\n file:\n | Blob\n | MediaSource\n | {\n text: string\n mimeType: \"plain\" | \"csv\"\n name: string\n charset?: string\n extension?: string\n }\n}\n\nconst DownloadFileButton: FC<DownloadFileButtonProps> = ({\n children = \"Download\",\n endIcon = <DownloadIcon />,\n file,\n ...otherButtonProps\n}) => {\n let url: undefined | string = undefined\n let anchorProps: undefined | { download?: string; href: string } = undefined\n if (\"mimeType\" in file) {\n const { text, mimeType, name, charset = \"utf-8\" } = file\n let { extension } = file\n\n if (!extension) extension = \".\" + { plain: \"txt\", csv: \"csv\" }[mimeType]\n\n anchorProps = {\n download: name + extension,\n href: `data:text/${mimeType};charset=${charset},${encodeURIComponent(text)}`,\n }\n } else {\n url = URL.createObjectURL(file)\n\n anchorProps = { href: url }\n }\n\n useEffect(() => {\n return () => {\n if (url) URL.revokeObjectURL(url)\n }\n }, [url])\n\n return (\n <Button endIcon={endIcon} {...otherButtonProps} {...anchorProps}>\n {children}\n </Button>\n )\n}\n\nexport default DownloadFileButton\n","import {\n AppBar,\n type AppBarProps,\n Container,\n type ContainerProps,\n Toolbar,\n type ToolbarProps,\n useScrollTrigger,\n} from \"@mui/material\"\nimport { type FC, cloneElement } from \"react\"\n\nexport interface ElevatedAppBarProps extends Omit<AppBarProps, \"position\"> {\n containerProps: ContainerProps\n toolbarProps?: ToolbarProps\n}\n\nconst ElevatedAppBar: FC<ElevatedAppBarProps> = ({\n containerProps,\n toolbarProps,\n elevation = 4,\n children,\n ...otherProps\n}) => {\n const trigger = useScrollTrigger({\n disableHysteresis: true,\n threshold: 0,\n })\n\n return cloneElement(\n <AppBar elevation={elevation} {...otherProps}>\n <Container {...containerProps}>\n <Toolbar {...toolbarProps}>{children}</Toolbar>\n </Container>\n </AppBar>,\n {\n position: trigger ? \"fixed\" : \"sticky\",\n },\n )\n}\n\nexport default ElevatedAppBar\n","import { Button, type ButtonProps } from \"@mui/material\"\nimport {\n type DetailedHTMLProps,\n type FC,\n type InputHTMLAttributes,\n} from \"react\"\n\nexport interface InputFileButtonProps\n extends Omit<ButtonProps<\"label\">, \"component\"> {\n inputProps?: Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n \"type\" | \"hidden\"\n >\n}\n\nconst InputFileButton: FC<InputFileButtonProps> = ({\n children,\n inputProps,\n ...otherButtonProps\n}) => (\n <Button component=\"label\" {...otherButtonProps}>\n {children}\n <input type=\"file\" hidden {...inputProps} />\n </Button>\n)\n\nexport default InputFileButton\n","import { type FC, type ReactElement } from \"react\"\nimport {\n List,\n type ListItem,\n type ListItemText,\n type ListProps,\n} from \"@mui/material\"\n\ntype ListItemElement =\n | ReactElement<typeof ListItem | typeof ListItemText>\n | string\n\nexport interface ItemizedListProps {\n styleType:\n | \"unset\"\n | \"initial\"\n | \"inherit\"\n | \"upper-roman\"\n | \"upper-latin\"\n | \"upper-alpha\"\n | \"square\"\n | \"none\"\n | \"lower-roman\"\n | \"lower-latin\"\n | \"lower-greek\"\n | \"lower-alpha\"\n | \"georgian\"\n | \"disc\"\n | \"decimal-leading-zero\"\n | \"decimal\"\n | \"armenian\"\n | \"circle\"\n listProps?: ListProps\n pl?: number\n children: ListItemElement | ListItemElement[]\n}\n\nconst ItemizedList: FC<ItemizedListProps> = ({\n styleType,\n listProps = {},\n pl = 4,\n children,\n}) => {\n const { sx, ...otherProps } = listProps\n const listItemProps = { display: \"list-item\" }\n\n return (\n <List\n sx={{\n listStyleType: styleType,\n pl,\n \".MuiListItem-root\": listItemProps,\n \".MuiListItemText-root\": listItemProps,\n ...sx,\n }}\n {...otherProps}\n >\n {children}\n </List>\n )\n}\n\nexport default ItemizedList\n","import { type FC, type ReactElement } from \"react\"\nimport { Grid, type GridProps } from \"@mui/material\"\n\ninterface ItemProps\n extends Omit<GridProps, \"key\" | \"order\" | \"size\" | \"offset\"> {}\n\ninterface GlobalItemProps extends ItemProps {\n size: {\n xs: number\n sm: number\n md: number\n lg: number\n xl: number\n }\n}\n\nexport interface OrderedGridProps {\n rows: Array<\n Array<{\n element: ReactElement\n itemProps?: ItemProps\n }>\n >\n containerProps?: Omit<GridProps, \"container\">\n globalItemProps: GlobalItemProps\n}\n\nconst OrderedGrid: FC<OrderedGridProps> = ({\n rows,\n containerProps = {},\n globalItemProps,\n}) => {\n const columns = Number(containerProps.columns ?? 12)\n\n const getItemsPerRow = (size: number): number => Math.floor(columns / size)\n\n const getOrder = (\n rowIndex: number,\n itemIndex: number,\n size: number,\n ): number =>\n Math.floor(itemIndex / getItemsPerRow(size)) * rows.length + rowIndex\n\n const getOffset = (itemIndex: number, size: number): number => {\n const itemsOnLastRow = rows[0].length % getItemsPerRow(size)\n return itemsOnLastRow !== 0 && itemIndex === rows[0].length - 1\n ? (columns - itemsOnLastRow * size) / 2\n : 0\n }\n\n return (\n <Grid container {...containerProps}>\n {rows.map((row, rowIndex) =>\n row.map(({ element, itemProps = {} }, itemIndex) => (\n <Grid\n key={`${rowIndex}-${itemIndex}`}\n order={{\n xs: getOrder(rowIndex, itemIndex, globalItemProps.size.xs),\n sm: getOrder(rowIndex, itemIndex, globalItemProps.size.sm),\n md: getOrder(rowIndex, itemIndex, globalItemProps.size.md),\n lg: getOrder(rowIndex, itemIndex, globalItemProps.size.lg),\n xl: getOrder(rowIndex, itemIndex, globalItemProps.size.xl),\n }}\n offset={{\n xs: getOffset(itemIndex, globalItemProps.size.xs),\n sm: getOffset(itemIndex, globalItemProps.size.sm),\n md: getOffset(itemIndex, globalItemProps.size.md),\n lg: getOffset(itemIndex, globalItemProps.size.lg),\n xl: getOffset(itemIndex, globalItemProps.size.xl),\n }}\n {...globalItemProps}\n {...itemProps}\n >\n {element}\n </Grid>\n )),\n )}\n </Grid>\n )\n}\n\nexport default OrderedGrid\n","import { Link, type LinkProps } from \"@mui/material\"\nimport { type FC } from \"react\"\nexport interface ScrollIntoViewLinkProps extends Omit<LinkProps, \"onClick\"> {\n elementId: string\n options?: ScrollIntoViewOptions\n}\n\nconst ScrollIntoViewLink: FC<ScrollIntoViewLinkProps> = ({\n elementId,\n options,\n ...linkProps\n}) => (\n <Link\n {...linkProps}\n onClick={() => {\n const element = document.getElementById(elementId)\n element?.scrollIntoView(options)\n }}\n />\n)\n\nexport default ScrollIntoViewLink\n","import {\n type ElementType,\n type JSX,\n type JSXElementConstructor,\n type ReactNode,\n useEffect,\n} from \"react\"\nimport {\n TablePagination as MuiTablePagination,\n type TablePaginationProps as MuiTablePaginationProps,\n Stack,\n type StackProps,\n type TablePaginationBaseProps,\n} from \"@mui/material\"\nimport type { TypedUseLazyQuery } from \"@reduxjs/toolkit/query/react\"\n\nimport { type ListArg, type ListResult, handleResultState } from \"../utils/api\"\nimport { type Pagination, usePagination } from \"../hooks/api\"\n\nexport type TablePaginationProps<\n QueryArg extends ListArg,\n ResultType extends ListResult<any>,\n RootComponent extends\n ElementType = JSXElementConstructor<TablePaginationBaseProps>,\n AdditionalProps = {},\n> = Omit<\n MuiTablePaginationProps<RootComponent, AdditionalProps>,\n | \"component\"\n | \"count\"\n | \"rowsPerPage\"\n | \"onRowsPerPageChange\"\n | \"rowsPerPageOptions\"\n | \"page\"\n | \"onPageChange\"\n> &\n Partial<\n Pick<\n MuiTablePaginationProps<RootComponent, AdditionalProps>,\n \"onRowsPerPageChange\" | \"onPageChange\"\n >\n > & {\n children: (\n data: ResultType[\"data\"],\n pagination: Pagination & { count?: number; maxLimit?: number },\n ) => ReactNode\n useLazyListQuery: TypedUseLazyQuery<ResultType, QueryArg, any>\n preferCacheValue?: boolean\n filters?: Omit<QueryArg, \"limit\" | \"offset\">\n rowsPerPageOptions?: number[]\n stackProps?: StackProps\n page?: number\n rowsPerPage?: number\n }\n\nconst TablePagination = <\n QueryArg extends ListArg,\n ResultType extends ListResult<any>,\n RootComponent extends\n ElementType = JSXElementConstructor<TablePaginationBaseProps>,\n AdditionalProps = {},\n>({\n children,\n useLazyListQuery,\n preferCacheValue,\n filters,\n page: initialPage = 0,\n rowsPerPage: initialLimit = 50,\n rowsPerPageOptions = [50, 100, 150],\n stackProps,\n onRowsPerPageChange,\n onPageChange,\n ...tablePaginationProps\n}: TablePaginationProps<\n QueryArg,\n ResultType,\n RootComponent,\n AdditionalProps\n>): JSX.Element => {\n const [trigger, result] = useLazyListQuery()\n const [{ limit, page, offset }, setPagination] = usePagination({\n page: initialPage,\n limit: initialLimit,\n })\n\n useEffect(\n () => {\n void trigger({ limit, offset, ...filters } as QueryArg, preferCacheValue)\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n trigger,\n limit,\n offset,\n // eslint-disable-next-line react-hooks/exhaustive-deps,@typescript-eslint/no-unsafe-assignment\n ...Object.values(filters || {}),\n preferCacheValue,\n ],\n )\n\n const { count, max_limit } = result.data || {}\n\n if (max_limit) {\n rowsPerPageOptions = rowsPerPageOptions.filter(\n option => option <= max_limit,\n )\n }\n\n return (\n <Stack {...stackProps}>\n {handleResultState(result, ({ data }) =>\n children(data, {\n limit,\n page,\n offset,\n count,\n maxLimit: max_limit,\n }),\n )}\n <MuiTablePagination\n component=\"div\"\n count={count ?? 0}\n rowsPerPage={limit}\n onRowsPerPageChange={event => {\n setPagination({ limit: parseInt(event.target.value), page: 0 })\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (onRowsPerPageChange) onRowsPerPageChange(event)\n }}\n page={page}\n onPageChange={(event, page) => {\n setPagination(({ limit }) => ({ limit, page }))\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (onPageChange) onPageChange(event, page)\n }}\n // ascending order\n rowsPerPageOptions={rowsPerPageOptions.sort((a, b) => a - b)}\n {...tablePaginationProps}\n />\n </Stack>\n )\n}\n\nexport default TablePagination\n","import { Box, type BoxProps } from \"@mui/material\"\nimport { type FC } from \"react\"\n\nexport interface YouTubeVideoProps extends Omit<BoxProps, \"component\"> {\n src: string\n}\n\nconst YouTubeVideo: FC<YouTubeVideoProps> = ({\n src,\n style = {},\n ...otherProps\n}) => {\n return (\n <Box\n component=\"iframe\"\n width=\"100%\"\n src={src}\n title=\"YouTube video player\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen\"\n style={{ border: \"0px\", aspectRatio: \"16 / 9\", ...style }}\n {...otherProps}\n />\n )\n}\n\nexport default YouTubeVideo\n"],"names":["Routes","path","routes","header","jsx","Fragment","footer","headerExcludePaths","footerExcludePaths","jsxs","RouterRoutes","BrowserRoutes","props","pathname","useLocation","App","theme","store","maxIdleSeconds","maxTotalSeconds","routesProps","ThemeProvider","CssBaseline","Provider","StaticRouter","BrowserRouter","ClickableTooltip","open","onClick","otherTooltipProps","_open","_setOpen","React","Tooltip","wrap","CopyIconButton","content","children","ContentCopyIcon","otherIconButtonProps","IconButton","DownloadFileButton","endIcon","DownloadIcon","file","otherButtonProps","url","anchorProps","text","mimeType","name","charset","extension","useEffect","Button","ElevatedAppBar","containerProps","toolbarProps","elevation","otherProps","trigger","useScrollTrigger","cloneElement","AppBar","Container","Toolbar","InputFileButton","inputProps","ItemizedList","styleType","listProps","pl","sx","listItemProps","List","OrderedGrid","rows","globalItemProps","columns","getItemsPerRow","size","getOrder","rowIndex","itemIndex","getOffset","itemsOnLastRow","Grid","row","element","itemProps","ScrollIntoViewLink","elementId","options","linkProps","Link","TablePagination","useLazyListQuery","preferCacheValue","filters","initialPage","initialLimit","rowsPerPageOptions","stackProps","onRowsPerPageChange","onPageChange","tablePaginationProps","result","limit","page","offset","setPagination","usePagination","count","max_limit","option","Stack","handleResultState","data","MuiTablePagination","event","a","b","YouTubeVideo","src","style","Box"],"mappings":"2oBAoCMA,EAAiD,CAAC,CACtD,KAAAC,EACA,OAAAC,EACA,OAAAC,EAASC,EAAAA,kBAAAA,IAAAC,EAAAA,kBAAAA,SAAA,EAAE,EACX,OAAAC,EAASF,EAAAA,kBAAAA,IAAAC,EAAAA,kBAAAA,SAAA,EAAE,EACX,mBAAAE,EAAqB,CAAA,EACrB,mBAAAC,EAAqB,CAAA,CACvB,I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