@pautena/react-design-system 0.10.1 → 0.11.1

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 (39) hide show
  1. package/dist/cjs/index.js +4 -4
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/containers/index.d.ts +1 -0
  4. package/dist/cjs/types/components/containers/list-panel/index.d.ts +2 -0
  5. package/dist/cjs/types/components/containers/list-panel/list-panel-panel.d.ts +5 -0
  6. package/dist/cjs/types/components/containers/list-panel/list-panel.context.d.ts +4 -0
  7. package/dist/cjs/types/components/containers/list-panel/list-panel.d.ts +13 -0
  8. package/dist/cjs/types/components/containers/list-panel/list-panel.mocks.d.ts +4 -0
  9. package/dist/cjs/types/components/inputs/action/action.d.ts +18 -0
  10. package/dist/cjs/types/components/inputs/action/index.d.ts +1 -0
  11. package/dist/cjs/types/components/inputs/index.d.ts +1 -0
  12. package/dist/esm/index.js +4 -4
  13. package/dist/esm/index.js.map +1 -1
  14. package/dist/esm/types/components/containers/index.d.ts +1 -0
  15. package/dist/esm/types/components/containers/list-panel/index.d.ts +2 -0
  16. package/dist/esm/types/components/containers/list-panel/list-panel-panel.d.ts +5 -0
  17. package/dist/esm/types/components/containers/list-panel/list-panel.context.d.ts +4 -0
  18. package/dist/esm/types/components/containers/list-panel/list-panel.d.ts +13 -0
  19. package/dist/esm/types/components/containers/list-panel/list-panel.mocks.d.ts +4 -0
  20. package/dist/esm/types/components/inputs/action/action.d.ts +18 -0
  21. package/dist/esm/types/components/inputs/action/index.d.ts +1 -0
  22. package/dist/esm/types/components/inputs/index.d.ts +1 -0
  23. package/dist/index.d.ts +35 -1
  24. package/package.json +2 -2
  25. package/src/components/containers/containers.stories.mdx +1 -0
  26. package/src/components/containers/index.ts +1 -0
  27. package/src/components/containers/list-panel/index.ts +2 -0
  28. package/src/components/containers/list-panel/list-panel-panel.tsx +17 -0
  29. package/src/components/containers/list-panel/list-panel.context.tsx +5 -0
  30. package/src/components/containers/list-panel/list-panel.mocks.tsx +117 -0
  31. package/src/components/containers/list-panel/list-panel.stories.tsx +38 -0
  32. package/src/components/containers/list-panel/list-panel.test.tsx +65 -0
  33. package/src/components/containers/list-panel/list-panel.tsx +88 -0
  34. package/src/components/inputs/action/action.stories.tsx +77 -0
  35. package/src/components/inputs/action/action.test.tsx +97 -0
  36. package/src/components/inputs/action/action.tsx +101 -0
  37. package/src/components/inputs/action/index.ts +1 -0
  38. package/src/components/inputs/index.ts +1 -0
  39. package/src/components/inputs/inputs.stories.mdx +1 -0
@@ -1,2 +1,3 @@
1
1
  export * from "./content";
2
2
  export * from "./center-container";
3
+ export * from "./list-panel";
@@ -0,0 +1,2 @@
1
+ export * from "./list-panel";
2
+ export * from "./list-panel.context";
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from "react";
2
+ export type ListPanelPanelProps = PropsWithChildren<{
3
+ ids: string[];
4
+ }>;
5
+ export declare const ListPanelPanel: ({ ids, children }: ListPanelPanelProps) => JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const ListPanelContext: import("react").Context<string | undefined>;
3
+ export declare const ListPanelContextProvider: import("react").Provider<string | undefined>;
4
+ export declare const useListPanel: () => string | undefined;
@@ -0,0 +1,13 @@
1
+ import { PropsWithChildren } from "react";
2
+ export interface ListPanelItem {
3
+ id: string;
4
+ text: string;
5
+ tooltip?: string;
6
+ }
7
+ export type ListPanelProps = PropsWithChildren<{
8
+ defaultSelectedItem?: string;
9
+ items: ListPanelItem[];
10
+ colBreakpoint?: number;
11
+ onSelectedItemChange?: (id: string) => void;
12
+ }>;
13
+ export declare const ListPanel: ({ items, defaultSelectedItem, colBreakpoint, children, onSelectedItemChange, }: ListPanelProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ListPanelItem } from "./list-panel";
2
+ export declare const ListPanelDemoContent: () => JSX.Element;
3
+ export declare const mockItemsShort: ListPanelItem[];
4
+ export declare const mockItemsLong: ListPanelItem[];
@@ -0,0 +1,18 @@
1
+ import { Variant } from "@mui/material/styles/createTypography";
2
+ import { ReactElement } from "react";
3
+ export type ActionVariant = "primary" | "error" | "warning" | "success";
4
+ export interface ActionProps {
5
+ variant: ActionVariant;
6
+ title: string;
7
+ description?: string | ReactElement;
8
+ descriptionVariant?: Variant;
9
+ helperText?: string;
10
+ helperTextVariant?: Variant;
11
+ buttonText: string;
12
+ confirmable?: boolean;
13
+ confirmTitle?: string;
14
+ confirmDescription?: string;
15
+ passphrase?: string;
16
+ onAction: () => void;
17
+ }
18
+ export declare const Action: ({ variant, title, description, descriptionVariant, buttonText, helperText, helperTextVariant, confirmable, passphrase, confirmTitle, confirmDescription, onAction, }: ActionProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./action";
@@ -4,3 +4,4 @@ export * from "./autocomplete";
4
4
  export * from "./date-range-picker";
5
5
  export * from "./date-range-calendar";
6
6
  export * from "./text-field";
7
+ export * from "./action";
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{InputAdornment as e,Button as t,useTheme as n,IconButton as r,Box as o,Typography as a,Tooltip as i,TextField as l,Paper as c,Switch as u,Grid as s,Rating as d,Badge as m,Link as f,Snackbar as p,Alert as v,AlertTitle as y,Container as h,Breadcrumbs as g,Tabs as b,Tab as E,CircularProgress as x,LinearProgress as S,styled as C,drawerClasses as w,Drawer as k,Divider as T,paperClasses as I,ListSubheader as O,List as P,ListItemButton as $,ListItemIcon as z,ListItemText as R,Collapse as j,Popover as A,ListItemAvatar as W,Avatar as N,AppBar as M,Toolbar as D,FormControl as V,InputLabel as F,Select as _,Stack as L,outlinedInputClasses as B,inputLabelClasses as q,circularProgressClasses as H,linearProgressClasses as U,autocompleteClasses as Y,iconButtonClasses as J,OutlinedInput as X,FormHelperText as G,Autocomplete as K,TableHead as Q,TableRow as Z,TableCell as ee,TableSortLabel as te,TableContainer as ne,Table as re,TableBody as oe,Skeleton as ae,alertClasses as ie,Dialog as le,DialogTitle as ce,DialogContent as ue,DialogActions as se,FormControlLabel as de,Checkbox as me,MenuItem as fe,Menu as pe}from"@mui/material";import*as ve from"react";import ye,{useState as he,useRef as ge,useEffect as be,forwardRef as Ee,createContext as xe,useContext as Se,useId as Ce,useMemo as we}from"react";import ke from"@mui/icons-material/Check";import Te from"@mui/icons-material/Clear";import Ie from"@mui/icons-material/Edit";import Oe from"@mui/icons-material/Close";import{format as Pe,isAfter as $e,isSameDay as ze,startOfWeek as Re,endOfWeek as je}from"date-fns";import{DateTimePicker as Ae,TimePicker as We,DatePicker as Ne,DateCalendar as Me,PickersDay as De,DesktopDatePicker as Ve}from"@mui/x-date-pickers";import{Link as Fe,useLocation as _e,useNavigate as Le,useParams as Be,Routes as qe,Route as He}from"react-router-dom";import{blueGrey as Ue}from"@mui/material/colors";import Ye from"markdown-to-jsx";import Je from"@mui/icons-material/ContentCopy";import Xe from"@mui/icons-material/ChevronLeft";import Ge from"@mui/icons-material/ExpandMore";import Ke from"@mui/icons-material/ChevronRight";import Qe from"@mui/icons-material/Menu";import{LoadingButton as Ze}from"@mui/lab";import et from"@mui/icons-material/Event";import{isBefore as tt}from"date-fns/esm";import nt from"@mui/icons-material/Search";import{loremIpsum as rt}from"lorem-ipsum";import ot from"@mui/icons-material/ExpandLess";import at from"@mui/icons-material/ReportProblem";import{DataGrid as it}from"@mui/x-data-grid";import lt from"@mui/icons-material/MoreVert";var ct=function(n){var r=n.onClickCancel,o=n.onClickSubmit,a=n.sx;return ye.createElement(e,{position:"end",sx:a},ye.createElement(t,{variant:"contained",size:"small",color:"error","aria-label":"cancel button",startIcon:ye.createElement(Te,{sx:{fontSize:12}}),onClick:r,sx:{paddingRight:0,minWidth:0,marginRight:1}}),ye.createElement(t,{variant:"contained",size:"small",color:"primary","aria-label":"submit button",startIcon:ye.createElement(ke,{sx:{fontSize:12}}),onClick:o,sx:{paddingRight:0,minWidth:0}}))},ut=function(e,t){var n=he(!1),r=n[0],o=n[1],a=he(e),i=a[0],l=a[1],c=function(){o(!1),l(e)};return{isEditing:r,cancelEdit:c,editValue:i,setEditValue:l,startEdit:function(){o(!0)},submitEdit:function(){t(i),c()}}},st=function(e){var t=e.dense,o=e.onClick,a=n().typography;return ye.createElement(r,{size:"small",onClick:o,sx:{ml:t?.5:1},"aria-label":"edit button"},ye.createElement(Ie,{sx:{fontSize:a.pxToRem(t?18:24)}}))},dt="-",mt=function(e){return"label-".concat(e.replace(/ /g,"-"))},ft=function(e){var t=e.label,r=e.hideLabel,l=e.tooltip,c=e.tooltipEnterDelay,u=void 0===c?2e3:c,s=e.children,d=e.dense,m=e.sx,f=n().typography,p=mt(t);return ye.createElement(o,{width:1,lineHeight:d?0:void 0,sx:m},!r&&ye.createElement(a,{variant:d?"caption":"subtitle2",role:"label",id:p,lineHeight:d?f.pxToRem(15):void 0},t),l?ye.createElement(i,{title:l,placement:"top",enterDelay:u},s):s)},pt=function(e){var t=e.label,n=e.value,r=e.placeholder,o=void 0===r?dt:r,i=e.editable,c=e.dense,u=e.onEdit,s=void 0===u?function(){return null}:u,d=ge(null),m=ut(null==n?void 0:n.toString(),s),f=m.isEditing,p=m.editValue,v=m.startEdit,y=m.cancelEdit,h=m.setEditValue,g=m.submitEdit,b=mt(t),E=(null==n?void 0:n.toString())||o,x=function(e){"Enter"===e.key&&s(e.target.value)};return be((function(){var e;return null===(e=d.current)||void 0===e||e.addEventListener("keypress",x),function(){var e;return null===(e=d.current)||void 0===e?void 0:e.removeEventListener("keypress",x)}}),[d.current]),ye.createElement(ft,{hideLabel:f,label:t,tooltip:E,dense:c},f?ye.createElement(l,{inputRef:d,value:p,label:t,size:"small",onChange:function(e){return h(e.target.value)},InputProps:{endAdornment:ye.createElement(ct,{onClickCancel:y,onClickSubmit:g})},sx:{marginY:c?0:1}}):ye.createElement(a,{variant:c?"body1":"h5",noWrap:!0,"aria-labelledby":b},E,i&&ye.createElement(st,{dense:c,onClick:v})))},vt=function(e){var t=e.children;return ye.createElement(c,{sx:{p:2}},t)},yt=function(e){var t=e.label,r=e.value,i=e.placeholder,l=void 0===i?dt:i,c=e.editable,s=e.dense,d=e.onEdit,m=void 0===d?function(){return null}:d,f=mt(t),p=n().typography,v=ut(r,m),y=v.isEditing,h=v.editValue,g=v.startEdit,b=v.cancelEdit,E=v.setEditValue,x=v.submitEdit,S={fontSize:s?p.h6.fontSize:p.h5.fontSize};return ye.createElement(ft,{label:t,dense:s},y?ye.createElement(o,{display:"flex",alignItems:"center"},ye.createElement(u,{size:s?"small":"medium",checked:h,onChange:function(e){return E(e.target.checked)}}),ye.createElement(ct,{onClickCancel:b,onClickSubmit:x})):ye.createElement(o,{display:"flex",alignItems:"center","aria-labelledby":f,role:"checkbox","aria-checked":r},void 0===r?ye.createElement(a,{variant:"h5"},l):r?ye.createElement(ke,{color:"success",sx:S}):ye.createElement(Oe,{color:"error",sx:S}),c&&ye.createElement(st,{dense:s,onClick:g})))},ht=function(){return ht=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ht.apply(this,arguments)};function gt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function bt(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var Et=function(e){var t=e.label,n=e.value,r=e.format,i=e.placeholder,c=void 0===i?dt:i,u=e.editable,s=e.editInputType,d=void 0===s?"datetime":s,m=e.dense,f=e.onEdit,p=ut(n,void 0===f?function(){return null}:f),v=p.isEditing,y=p.editValue,h=p.startEdit,g=p.cancelEdit,b=p.setEditValue,E=p.submitEdit,x=mt(t),S=n&&Pe(n,r)||c,C="datetime"===d?Ae:"time"===d?We:Ne;return ye.createElement(ft,{label:t,hideLabel:v,tooltip:S,dense:m,sx:{display:"flex",flexDirection:"column"}},v?ye.createElement(C,{value:y,format:r,label:t,onChange:function(e){return b(e||void 0)},slots:{textField:function(e){var t;return ye.createElement(l,ht({},e,{size:"small",InputProps:ht(ht({},e.InputProps),{endAdornment:ye.createElement(ye.Fragment,null,null===(t=e.InputProps)||void 0===t?void 0:t.endAdornment,ye.createElement(ct,{onClickCancel:g,onClickSubmit:E,sx:{ml:2}})),sx:{marginY:m?.2:1}})}))}}}):ye.createElement(o,{display:"flex",alignItems:"center"},ye.createElement(a,{variant:m?"body1":"h5",noWrap:!0,"aria-labelledby":x},S),u&&ye.createElement(st,{dense:m,onClick:h})))},xt=function(e){var t=void 0===e?{}:e,r=t.lightWeight,o=void 0===r?100:r,a=t.darkWeight,i=void 0===a?900:a,l=n().palette;return"light"===l.mode?l.grey[o]:l.grey[i]},St=function(e){var t=e.title,r=e.subtitle,i=e.centered,l=e.children,u=e.dense,d=n().typography,m=xt({lightWeight:200,darkWeight:800});return ye.createElement(c,{sx:{paddingBottom:u?0:1}},ye.createElement(o,{bgcolor:m,px:u?1:2,py:u?.5:1,lineHeight:u?0:void 0},ye.createElement(a,{variant:u?"body1":"h6",role:"heading","aria-level":1},t),r&&ye.createElement(a,{variant:u?"caption":"body2",role:"heading","aria-level":2,lineHeight:u?d.pxToRem(15):void 0},r)),ye.createElement(s,{container:!0,padding:1,rowSpacing:u?1:2,justifyContent:i?"center":"flex-start"},l))},Ct=function(e){var t=e.label,n=e.value,r=void 0===n?0:n,a=e.maxRating,i=void 0===a?5:a,l=e.editable,c=e.dense,u=e.onEdit,s=ut(r,void 0===u?function(){return null}:u),m=s.isEditing,f=s.editValue,p=s.startEdit,v=s.cancelEdit,y=s.setEditValue,h=s.submitEdit,g=mt(t);return ye.createElement(ft,{label:t,tooltip:r.toString(),dense:c},ye.createElement(o,{display:"flex",alignItems:"center"},ye.createElement(d,{"aria-labelledby":g,readOnly:!m,max:i,size:c?"small":"medium",value:m?f:r,onChange:function(e,t){Number.isNaN(t)&&e.currentTarget.value?y(parseInt(e.currentTarget.value,10)):t&&y(t)}}),l&&!m&&ye.createElement(st,{dense:c,onClick:p}),m&&ye.createElement(ct,{onClickCancel:v,onClickSubmit:h})))},wt=function(e,t){return new Array(e).fill(t)},kt=function(e){var t=Math.floor(Math.random()*e.length);return{index:t,item:e[t]}},Tt=function(e){void 0===e&&(e=12);var t=function(t,n,r){var o=t[n];return t[n]+=r,t[n]>e?(t[n]=r,!1):(t[n]==e&&(t[n]=0),o>0)};return{xs:0,sm:0,md:0,lg:0,xl:0,increment:function(e){var n=e.xs,r=void 0===n?0:n,o=e.sm,a=void 0===o?0:o,i=e.md,l=void 0===i?0:i,c=e.lg,u=void 0===c?0:c,s=e.xl,d=a||r,m=l||d,f=u||m,p=(void 0===s?0:s)||f;return{xs:t(this,"xs",r),sm:t(this,"sm",d),md:t(this,"md",m),lg:t(this,"lg",f),xl:t(this,"xl",p)}}}},It=function(e){var t=new FormData(e.currentTarget),n={};return t.forEach((function(e,t){n[t]=e})),n},Ot={root:"RdsValueItem-root",content:"RdsValueItem-content"},Pt=function(e){var t=e.children,n=e.bordered,r=void 0===n||n,a=gt(e,["children","bordered"]),i=function(e,t){var n="solid ".concat(t," 1px"),r="none";if(e){if(Array.isArray(e))return e.map((function(e){return e?n:r}));if("object"==typeof e){var o={};return Object.entries(e).forEach((function(e){var t=e[0],a=e[1];o[t]=a?n:r})),o}return n}}(r,xt({lightWeight:200,darkWeight:800}));return ye.createElement(s,ht({item:!0,className:Ot.root},a),ye.createElement(o,{className:Ot.content,px:1,borderLeft:i},t))},$t={root:"RdsBullet-root"},zt=function(e){var t=e.variant,n=void 0===t?"primary":t,r=e.sx;return ye.createElement(m,{color:n,variant:"dot",className:$t.root,role:"bullet","aria-describedby":n,sx:r})},Rt={root:"RdsLabel-root"},jt=function(e){var t=e.text,r=e.variant,a=void 0===r?"default":r,i=e.textTransform,l=void 0===i?"capitalize":i,c=e.sx,u=n(),s=u.palette,d=u.typography,m={default:"light"===s.mode?s.grey[100]:s.grey[900],primary:s.primary.light,secondary:s.secondary.light,info:s.info.light,warning:s.warning.light,error:s.error.light,success:s.success.light},f={default:s.getContrastText(m.default),primary:s.primary.contrastText,secondary:s.secondary.contrastText,info:s.info.contrastText,warning:s.warning.contrastText,error:s.error.contrastText,success:s.success.contrastText};return ye.createElement(o,{height:24,minWidth:22,display:"inline-flex",justifyContent:"center",alignItems:"center",bgcolor:m[a],color:f[a],fontSize:d.caption.fontSize,fontWeight:d.fontWeightBold,lineHeight:0,textTransform:l,whiteSpace:"nowrap",borderRadius:2,role:"label","aria-label":"".concat(t," ").concat(a," label"),py:0,px:1,sx:ht({cursor:"default"},c)},t)},At=Ee((function(e,t){var n=e.href,r=gt(e,["href"]);return ye.createElement(Fe,ht({ref:t,to:n},r))})),Wt=Ee((function(e,t){return ye.createElement(f,ht({},e,{component:At}))})),Nt=new Error("NotificationCenterContext.Provider is required and was undefined"),Mt=ye.createContext(void 0),Dt=function(){var e=ye.useContext(Mt);if(void 0===e)throw Nt;return e},Vt=function(e){var t=e.children,n=e.autoHideDuration,r=void 0===n?6e3:n,o=he(void 0),a=o[0],i=o[1],l=he(!1),c=l[0],u=l[1],s=function(){u(!1)};return ye.createElement(Mt.Provider,{value:{show:function(e){i(e),u(!0)},hide:s}},ye.createElement(p,{open:c,autoHideDuration:r,onClose:s,anchorOrigin:{vertical:"top",horizontal:"right"}},ye.createElement(v,{onClose:s,severity:null==a?void 0:a.severity,"aria-label":null==a?void 0:a.severity,sx:{width:"100%"}},(null==a?void 0:a.title)&&ye.createElement(y,null,null==a?void 0:a.title),null==a?void 0:a.message)),t)},Ft=function(e,t,n){var r=n.from,o=n.to,a=ge(),i=Dt().show;be((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},_t=xe([0,function(){return null}]),Lt=_t.Provider,Bt=function(){return Se(_t)},qt=function(e){var t=e.children,n=e.initialValue,r=he(void 0===n?0:n);return ye.createElement(Lt,{value:r},t)},Ht=function(e){var r=e.title,i=e.subtitle,l=e.preset,c=void 0===l?"default":l,u=e.actionsVariant,s=void 0===u?"outlined":u,d=e.breadcrumbs,m=e.actions,f=e.tabs,p=e.tabsMode,v=void 0===p?"panel":p,y=e.navigationButton,x=_e(),S=n().palette,C=xt(),w=Bt(),k=w[0],T=w[1],I={default:C,primary:S.primary.main,secondary:S.secondary.main,inherit:"inherit",transparent:"transparent"},O=I[c],P={default:S.getContrastText(I.default),primary:S.primary.contrastText,secondary:S.secondary.contrastText,inherit:"inherit",transparent:S.text.primary}[c],$="panel"===v?k:null==f?void 0:f.findIndex((function(e){return e.href===x.pathname}));return ye.createElement(o,{bgcolor:O,color:P},ye.createElement(h,null,ye.createElement(o,{sx:{py:3,display:"flex",flexDirection:"row",justifyContent:"space-between"}},ye.createElement(o,null,y&&ye.createElement(t,{href:y.href,size:"small",color:"inherit",LinkComponent:Wt,startIcon:y.icon,sx:{mb:1}},y.text),(null==d?void 0:d.length)&&ye.createElement(g,{color:"inherit",separator:"›","aria-label":"breadcrumb",sx:{marginTop:1}},d.map((function(e){var t=e.id,n=e.link,r=e.text;return ye.createElement(Wt,{key:t,underline:"hover",color:"inherit",href:n,variant:"body2",role:"link"},r)}))),ye.createElement(a,{variant:"h4",role:"heading","aria-level":1},r),i&&ye.createElement(a,{variant:"body1",role:"heading","aria-level":2},i)),m&&ye.createElement(o,null,m.map((function(e,n){var r=e.disabled,o=e.id,a=e.href,i=e.onClick,l=e.text;return ye.createElement(t,{component:a?Wt:"button",role:"button",color:"inherit",disabled:r,key:o,variant:s,size:"small",href:a,onClick:i,sx:{mr:n!=m.length-1?1:0}},l)})))),f&&ye.createElement(b,{value:$,textColor:"inherit",onChange:"panel"===v?function(e,t){return T(t)}:void 0},f.map((function(e){var t=e.id,n=e.label,r=e.disabled,o=e.href,a={label:n,disabled:r};return"panel"===v?ye.createElement(E,ht({key:t},a)):ye.createElement(E,ht({key:t},a,{component:Wt,href:o}))})))))},Ut={overrides:{h1:{component:a,props:{gutterBottom:!0,variant:"h5"}},h2:{component:a,props:{gutterBottom:!0,variant:"h6"}},h3:{component:a,props:{gutterBottom:!0,variant:"subtitle1"}},h4:{component:a,props:{gutterBottom:!0,variant:"caption",paragraph:!0}},p:{component:a,props:{paragraph:!0}},a:{component:f},li:{component:"li"}}},Yt=function(e){var t=e.content,n=e.options,r=void 0===n?Ut:n;return ye.createElement(Ye,{options:r},t)},Jt=function(e){var t,l,u=e.markdown,s=e.content,d=e.spacing,m=void 0===d?0:d,f=e.children,p=e.sx,v=n(),y=v.spacing,h=v.typography;u?t=u||"":Array.isArray(s)?(l=s.map((function(e,t){return ye.createElement(a,{key:t,sx:{pb:m}},e)})),t=s.join("\n")):(l=ye.createElement(a,null,s),t=s||"");var g=u&&ye.createElement(Yt,{content:u});return ye.createElement(c,{sx:ht({position:"relative",pl:2,pr:4,py:1,backgroundColor:Ue[800],color:"white"},p)},ye.createElement(o,{display:"flex",flexDirection:"row"},ye.createElement(o,{width:1},f||g||l),ye.createElement(o,{sx:{position:"absolute",top:y(.5),right:y(.5)}},t&&ye.createElement(r,{"aria-label":"copy board content",color:"inherit",onClick:function(){return navigator.clipboard.writeText(t)}},ye.createElement(i,{title:"Copy"},ye.createElement(Je,{sx:{fontSize:h.pxToRem(18)}}))))))},Xt=function(e){var t,n=e.label,r=e.value,o=e.placeholder,a=void 0===o?dt:o,i=e.variant,l=mt(n);return t=Array.isArray(r)?r.map((function(e,t){return ye.createElement(jt,{text:e.toString()||a,variant:Array.isArray(i)?i[t]:i,key:t})})):ye.createElement(jt,{text:(null==r?void 0:r.toString())||a,variant:Array.isArray(i)?i[0]:i}),ye.createElement(ft,{label:n},ye.createElement(s,{container:!0,gap:1,"aria-labelledby":l},t))},Gt=function(){return ye.createElement(o,{width:1,height:1,display:"flex",justifyContent:"center",alignItems:"center"},ye.createElement(x,null))};function Kt(e){var t=e.fetching,n=void 0!==t&&t,r=e.loading,a=void 0!==r&&r,i=e.error,l=e.success,c=e.children,u=Array.isArray(n)?n.some((function(e){return e})):n;return(Array.isArray(a)?a.some((function(e){return e})):a)?ye.createElement(Gt,null):i?ye.createElement(v,{severity:"error",role:"alert","aria-describedby":"error"},i.name&&ye.createElement(y,{role:"heading"},i.name),i.message):ye.createElement(o,null,l&&ye.createElement(v,{severity:"success",role:"alert","aria-describedby":"success",sx:{mb:2}},l.name&&ye.createElement(y,{role:"heading"},l.name),l.message),u&&ye.createElement(S,{sx:{width:1,mb:1}}),c)}var Qt=function(e){var t=e.children;return ye.createElement(h,{component:"main",sx:{py:3,flexGrow:1}},t)};function Zt(e){var t=e.children,n=e.centerVertical,r=void 0===n||n,a=e.centerHorizontal,i=void 0===a||a,l=e.sx;return ye.createElement(o,{width:1,height:1,sx:ht(ht({},l),{display:"flex",flexDirection:"column",justifyContent:r?"center":"flex-start",alignItems:i?"center":"flex-start"})},t)}var en=xe(void 0),tn=new Error("DrawerContext.Provider is required and was undefined"),nn=function(){var e=Se(en);if(void 0===e)throw tn;return e},rn=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},on=function(e){var t;return(t={transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")})[e.breakpoints.up("sm")]={width:"calc(".concat(e.spacing(8)," + 1px)")},t},an=C("div")((function(e){var t=e.theme;return ht({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),ln={temporary:!0,mini:!0,persistent:!0,clipped:!1},cn={temporary:"temporary",mini:"permanent",clipped:"permanent",persistent:"persistent"},un=function(){return{}},sn={mini:function(e,t){var n;return(n={boxSizing:"border-box"})["& .".concat(I.root)]={zIndex:t.zIndex.drawer-1},n},temporary:un,clipped:un,persistent:un},dn=function(e){var t,o,a=e.children,i=gt(e,["children"]),l=n(),c=nn(),u=c.state,s=c.switchState,d=c.underAppBar,m=c.close,f=c.drawerWidth,p=c.variant,v=ht(ht(ht({width:f,flexShrink:0,whiteSpace:"nowrap"},"open"===u&&ht(ht({},rn(l)),((t={})["& .".concat(w.paper)]=rn(l),t))),"open"!==u&&ht(ht({},on(l)),((o={})["& .".concat(w.paper)]=on(l),o))),sn[p](u,l));return ye.createElement(k,ht({open:"open"===u,variant:cn[p],role:"menu","aria-hidden":"close"===u,onClose:m,sx:v},i),ye.createElement(an,null,!d&&ln[p]&&ye.createElement(r,{onClick:s},ye.createElement(Xe,null))),ye.createElement(T,null),a)},mn={temporary:"close",mini:"collapse",clipped:"open",persistent:"close"},fn={temporary:["close","open"],mini:["collapse","open"],clipped:["open","open"],persistent:["close","open"]},pn=function(e){var t=e.children,n=e.initialState,r=e.variant,o=void 0===r?"temporary":r,a=e.drawerWidth,i=void 0===a?240:a,l=e.underAppBar,c=void 0!==l&&l,u=e.selectedItemId,s=e.onStateChange,d=void 0===s?function(){return null}:s,m=he(n||mn[o]),f=m[0],p=m[1],v=function(e){d(e),p(e)};return ye.createElement(en.Provider,{value:{state:f,variant:o,selectedItemId:u,underAppBar:c,drawerWidth:i,switchState:function(){return v(fn[o]["open"===f?0:1])},collapse:function(){return v("collapse")},close:function(){return v("close")},open:function(){return v("open")},setState:p}},t)},vn=C(O,{shouldForwardProp:function(e){return"size"!==e}})((function(e){var t=e.size,n=e.theme;return{lineHeight:"small"===t?n.typography.pxToRem(40):void 0}})),yn=function(e,t){return{color:t?e.palette.primary.main:void 0,fontWeight:t?e.typography.fontWeightBold:e.typography.fontWeightMedium}},hn=function(e){var t=e.text,r=e.icon,o=e.selected,a=e.items,i=e.size,l=void 0===i?"medium":i,c=e.level,u=e.sx,s=void 0===u?{}:u,d=nn().state,m=ge(null),f=n(),p=f.palette,v=f.spacing,y=he(!1),h=y[0],g=y[1],b=yn(n(),o),E=b.color,x=b.fontWeight,S=ye.createElement(P,{component:"div",disablePadding:!0},a.map((function(e){return ye.createElement(xn,{key:e.id,level:c+1,item:e,size:l})}))),C="collapse"===d&&0===c?{position:"absolute",right:0}:{};return ye.createElement(ye.Fragment,null,ye.createElement($,{ref:m,selected:o,"aria-label":t,onClick:function(){return g((function(e){return!e}))},dense:"small"===l,sx:ht(ht({},s),{pl:"open"===d?v(2+1.5*c):void 0,backgroundColor:h?p.action.hover:void 0})},r&&ye.createElement(z,{sx:{color:E}},r),ye.createElement(R,{disableTypography:!0,primary:t,sx:{color:E,fontWeight:x,opacity:"collapse"===d&&0===c?0:void 0}}),h&&"open"===d?ye.createElement(Ge,{sx:[{color:E,ml:2},C]}):ye.createElement(Ke,{sx:[{color:E,ml:2},C]})),"open"===d?ye.createElement(j,{in:h,timeout:"auto",unmountOnExit:!0,"aria-label":"".concat(t," collapse submenu")},S):ye.createElement(A,{open:h,PaperProps:{elevation:0,variant:"outlined"},"aria-label":"".concat(t," popover submenu"),anchorEl:m.current,onClose:function(){return g(!1)},anchorOrigin:{vertical:"top",horizontal:"right"}},S))},gn=C(Wt)((function(e){return{color:e.theme.palette.text.primary}})),bn={minWidth:0,justifyContent:"center",marginRight:"auto"},En=function(e){var t=e.text,r=e.icon,o=e.avatar,a=e.label,i=e.bullet,l=e.href,c=e.selected,u=e.size,s=void 0===u?"medium":u,d=e.level,m=e.sx,f=nn().state,p=n(),v=yn(p,c),y=v.color,h=v.fontWeight;return ye.createElement($,{LinkComponent:gn,dense:"small"===s,"aria-label":t,href:l,selected:c,sx:ht(ht(ht({},m),{pl:"open"===f?p.spacing(2+1.5*d):void 0}),"collapse"===f&&{paddingHorizontal:p.spacing(2.5),justifyContent:"center"})},r&&ye.createElement(z,{sx:ht({color:y},"collapse"===f&&0===d&&bn)},r),o&&ye.createElement(W,{sx:ht({},"collapse"===f&&0===d&&bn)},ye.createElement(N,{alt:o.alt,src:o.src,sx:ht(ht({},"small"===s&&{width:24,height:24}),"collapse"===f&&{width:30,height:30})})),ye.createElement(R,{disableTypography:!0,primary:t,sx:{color:y,fontWeight:h,opacity:"collapse"===f&&0===d?0:void 0}}),a&&"open"===f&&ye.createElement(jt,{text:a.text,variant:a.variant,sx:{ml:2}}),i&&"open"===f&&ye.createElement(zt,{variant:i.variant,sx:{ml:2}}))},xn=function(e){var t=e.item,n=e.size,r=void 0===n?"medium":n,o=e.level,a=void 0===o?0:o,i=nn().selectedItemId;if("items"in t){var l=t.id,c=t.text,u=t.icon,s=t.items,d=s.some((function(e){return e.id===i}));return ye.createElement(hn,{size:r,selected:l===i||d,text:c,icon:u,items:s,level:a})}l=t.id,c=t.text,u=t.icon;var m=t.avatar,f=t.label,p=t.bullet,v=t.href;return ye.createElement(En,{selected:l===i,size:r,text:c,icon:u,avatar:m,label:f,bullet:p,href:v,level:a})},Sn=function(e){var t=e.title,r=e.items,o=e.size,a=void 0===o?"medium":o,i=nn().state,l=n().spacing;return ye.createElement(ye.Fragment,null,t&&"open"===i&&ye.createElement(vn,{size:a,role:"heading"},t),ye.createElement(P,{sx:{paddingTop:"small"===a?l(0):void 0,paddingY:"collapse"===i?0:void 0}},r.map((function(e){return ye.createElement(xn,{key:e.id,item:e,size:a})}))))},Cn=function(e){var t=e.nav.items,n=e.size,r=void 0===n?"medium":n;return ye.createElement(ye.Fragment,null,t.map((function(e,t){var n=e.title,o=e.items;return ye.createElement(Sn,{key:t,title:n,items:o,size:r})})))},wn={temporary:!1,mini:!0,persistent:!0,clipped:!0},kn={temporary:function(){return!0},mini:function(e){return"open"!==e},persistent:function(){return!0},clipped:function(){return!1}},Tn=function(e){var t=e.title,o=e.sx,i=e.children,l=gt(e,["title","sx","children"]),c=n(),u=nn(),s=u.state,d=u.variant,m=u.switchState,f=u.drawerWidth,p=u.underAppBar,v=wn[d]&&!p&&ht({transition:c.transitions.create(["width","margin"],{easing:c.transitions.easing.sharp,duration:c.transitions.duration.leavingScreen})},"open"===s&&{marginLeft:f,width:"calc(100% - ".concat(f,"px)"),transition:c.transitions.create(["width","margin"],{easing:c.transitions.easing.sharp,duration:c.transitions.duration.enteringScreen})})||{};return ve.createElement(M,ht({position:p?"fixed":void 0},l,{sx:ht(ht(ht({},o),v),{zIndex:function(e){return e.zIndex.drawer+(p?1:0)}})}),ve.createElement(D,null,ve.createElement(r,{color:"inherit","aria-label":"open drawer",onClick:m,edge:"start",sx:{marginRight:5,display:kn[d](s)?void 0:"none"}},ve.createElement(Qe,null)),t&&ve.createElement(a,{variant:"h6",component:"h1",role:"heading","aria-level":1,noWrap:!0},t),i))},In={temporary:!1,mini:!0,clipped:!0,persistent:!0},On=C("div")((function(e){var t=e.theme,r=n().spacing,o=nn(),a=o.drawerWidth,i=o.state,l=o.variant;return{marginLeft:In[l]?"open"===i?a:"collapse"===i?r(8):0:0,transition:t.transitions.create("margin",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})}})),Pn=function(e){var t=e.children;return ye.createElement(On,null,ye.createElement(an,null),t)},$n={small:15,medium:20},zn=function(e){var t=e.label,n=e.value,r=e.loading,a=void 0!==r&&r,i=e.fetching,l=void 0!==i&&i,c=e.size,u=void 0===c?"medium":c,s=e.fullWidth,d=void 0!==s&&s,m=e.color,f=e.children,p=e.onChange,v=Ce(),y=C(V)((function(){return m?{label:{color:m},".MuiOutlinedInput-notchedOutline":{borderColor:"".concat(m," !important")},".MuiInputBase-root":{color:m},".MuiSelect-icon":{fill:m}}:{}}));return ye.createElement(y,{fullWidth:d},ye.createElement(F,{id:v},t),ye.createElement(_,{labelId:v,id:v,value:n,label:t,onChange:p,disabled:l,size:u,renderValue:function(e){return l?ye.createElement(Zt,{centerVertical:!0,centerHorizontal:!0},ye.createElement(x,{color:"inherit",size:$n[u]})):a?ye.createElement(o,{display:"flex",flexDirection:"column"},e,ye.createElement(S,{color:"inherit",sx:{position:"absolute",left:0,right:0,bottom:0}})):e}},f))},Rn=function(e){var t=e.title,n=e.subtitle,r=e.loading,i=e.error,c=e.onSubmitSignIn,u=he(""),s=u[0],d=u[1],m=he(""),f=m[0],p=m[1];return ye.createElement(ye.Fragment,null,ye.createElement(o,{marginBottom:2},ye.createElement(a,{component:"h1",variant:"h4"},t),ye.createElement(a,{variant:"body1"},n)),ye.createElement(o,{component:"form",onSubmit:function(e){var t,n;e.preventDefault(),d(""),p("");var r=new FormData(e.currentTarget),o=null===(t=r.get("email"))||void 0===t?void 0:t.toString(),a=null===(n=r.get("password"))||void 0===n?void 0:n.toString();o||d("Please fill out this field"),a||p("Please fill out this field"),o&&a&&c(o,a)}},i&&ye.createElement(L,{width:"100%",marginTop:1},ye.createElement(v,{variant:"filled",severity:"error"},i.message)),ye.createElement(l,{margin:"normal",fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",autoFocus:!0,disabled:r,type:"email",inputProps:{role:"input"},error:!!s,helperText:s}),ye.createElement(l,{margin:"normal",fullWidth:!0,role:"input",name:"password",label:"Password",type:"password",id:"password",disabled:r,autoComplete:"current-password",inputProps:{role:"input"},error:!!f,helperText:f}),ye.createElement(Ze,{type:"submit",fullWidth:!0,variant:"contained",loading:r,disabled:r,role:"button",sx:{mt:2}},"Sign In")))};function jn(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}var An,Wn={exports:{}},Nn={exports:{}},Mn={};var Dn,Vn,Fn,_n,Ln,Bn,qn,Hn,Un,Yn,Jn,Xn,Gn,Kn,Qn={};
1
+ import{InputAdornment as e,Button as t,useTheme as n,IconButton as r,Box as o,Typography as a,Tooltip as i,TextField as l,Paper as c,Switch as u,Grid as s,Rating as d,Badge as m,Link as f,Snackbar as p,Alert as v,AlertTitle as y,Container as h,Breadcrumbs as g,Tabs as b,Tab as E,CircularProgress as x,LinearProgress as C,List as S,ListItemButton as w,ListItemText as k,styled as T,drawerClasses as I,Drawer as O,Divider as P,paperClasses as $,ListSubheader as z,ListItemIcon as R,Collapse as j,Popover as A,ListItemAvatar as W,Avatar as N,AppBar as M,Toolbar as D,FormControl as V,InputLabel as F,Select as _,Stack as L,outlinedInputClasses as B,inputLabelClasses as q,circularProgressClasses as H,linearProgressClasses as U,autocompleteClasses as Y,iconButtonClasses as J,OutlinedInput as X,FormHelperText as G,Autocomplete as K,Dialog as Q,DialogTitle as Z,DialogContent as ee,DialogActions as te,DialogContentText as ne,TableHead as re,TableRow as oe,TableCell as ae,TableSortLabel as ie,TableContainer as le,Table as ce,TableBody as ue,Skeleton as se,alertClasses as de,FormControlLabel as me,Checkbox as fe,MenuItem as pe,Menu as ve}from"@mui/material";import*as ye from"react";import he,{useState as ge,useRef as be,useEffect as Ee,forwardRef as xe,createContext as Ce,useContext as Se,useId as we,useMemo as ke}from"react";import Te from"@mui/icons-material/Check";import Ie from"@mui/icons-material/Clear";import Oe from"@mui/icons-material/Edit";import Pe from"@mui/icons-material/Close";import{format as $e,isAfter as ze,isSameDay as Re,startOfWeek as je,endOfWeek as Ae}from"date-fns";import{DateTimePicker as We,TimePicker as Ne,DatePicker as Me,DateCalendar as De,PickersDay as Ve,DesktopDatePicker as Fe}from"@mui/x-date-pickers";import{Link as _e,useLocation as Le,useNavigate as Be,useParams as qe,Routes as He,Route as Ue}from"react-router-dom";import{blueGrey as Ye,grey as Je}from"@mui/material/colors";import Xe from"markdown-to-jsx";import Ge from"@mui/icons-material/ContentCopy";import Ke from"@mui/icons-material/ChevronLeft";import Qe from"@mui/icons-material/ExpandMore";import Ze from"@mui/icons-material/ChevronRight";import et from"@mui/icons-material/Menu";import{LoadingButton as tt}from"@mui/lab";import nt from"@mui/icons-material/Event";import{isBefore as rt}from"date-fns/esm";import ot from"@mui/icons-material/Search";import{loremIpsum as at}from"lorem-ipsum";import it from"@mui/icons-material/ExpandLess";import lt from"@mui/icons-material/ReportProblem";import{DataGrid as ct}from"@mui/x-data-grid";import ut from"@mui/icons-material/MoreVert";var st=function(n){var r=n.onClickCancel,o=n.onClickSubmit,a=n.sx;return he.createElement(e,{position:"end",sx:a},he.createElement(t,{variant:"contained",size:"small",color:"error","aria-label":"cancel button",startIcon:he.createElement(Ie,{sx:{fontSize:12}}),onClick:r,sx:{paddingRight:0,minWidth:0,marginRight:1}}),he.createElement(t,{variant:"contained",size:"small",color:"primary","aria-label":"submit button",startIcon:he.createElement(Te,{sx:{fontSize:12}}),onClick:o,sx:{paddingRight:0,minWidth:0}}))},dt=function(e,t){var n=ge(!1),r=n[0],o=n[1],a=ge(e),i=a[0],l=a[1],c=function(){o(!1),l(e)};return{isEditing:r,cancelEdit:c,editValue:i,setEditValue:l,startEdit:function(){o(!0)},submitEdit:function(){t(i),c()}}},mt=function(e){var t=e.dense,o=e.onClick,a=n().typography;return he.createElement(r,{size:"small",onClick:o,sx:{ml:t?.5:1},"aria-label":"edit button"},he.createElement(Oe,{sx:{fontSize:a.pxToRem(t?18:24)}}))},ft="-",pt=function(e){return"label-".concat(e.replace(/ /g,"-"))},vt=function(e){var t=e.label,r=e.hideLabel,l=e.tooltip,c=e.tooltipEnterDelay,u=void 0===c?2e3:c,s=e.children,d=e.dense,m=e.sx,f=n().typography,p=pt(t);return he.createElement(o,{width:1,lineHeight:d?0:void 0,sx:m},!r&&he.createElement(a,{variant:d?"caption":"subtitle2",role:"label",id:p,lineHeight:d?f.pxToRem(15):void 0},t),l?he.createElement(i,{title:l,placement:"top",enterDelay:u},s):s)},yt=function(e){var t=e.label,n=e.value,r=e.placeholder,o=void 0===r?ft:r,i=e.editable,c=e.dense,u=e.onEdit,s=void 0===u?function(){return null}:u,d=be(null),m=dt(null==n?void 0:n.toString(),s),f=m.isEditing,p=m.editValue,v=m.startEdit,y=m.cancelEdit,h=m.setEditValue,g=m.submitEdit,b=pt(t),E=(null==n?void 0:n.toString())||o,x=function(e){"Enter"===e.key&&s(e.target.value)};return Ee((function(){var e;return null===(e=d.current)||void 0===e||e.addEventListener("keypress",x),function(){var e;return null===(e=d.current)||void 0===e?void 0:e.removeEventListener("keypress",x)}}),[d.current]),he.createElement(vt,{hideLabel:f,label:t,tooltip:E,dense:c},f?he.createElement(l,{inputRef:d,value:p,label:t,size:"small",onChange:function(e){return h(e.target.value)},InputProps:{endAdornment:he.createElement(st,{onClickCancel:y,onClickSubmit:g})},sx:{marginY:c?0:1}}):he.createElement(a,{variant:c?"body1":"h5",noWrap:!0,"aria-labelledby":b},E,i&&he.createElement(mt,{dense:c,onClick:v})))},ht=function(e){var t=e.children;return he.createElement(c,{sx:{p:2}},t)},gt=function(e){var t=e.label,r=e.value,i=e.placeholder,l=void 0===i?ft:i,c=e.editable,s=e.dense,d=e.onEdit,m=void 0===d?function(){return null}:d,f=pt(t),p=n().typography,v=dt(r,m),y=v.isEditing,h=v.editValue,g=v.startEdit,b=v.cancelEdit,E=v.setEditValue,x=v.submitEdit,C={fontSize:s?p.h6.fontSize:p.h5.fontSize};return he.createElement(vt,{label:t,dense:s},y?he.createElement(o,{display:"flex",alignItems:"center"},he.createElement(u,{size:s?"small":"medium",checked:h,onChange:function(e){return E(e.target.checked)}}),he.createElement(st,{onClickCancel:b,onClickSubmit:x})):he.createElement(o,{display:"flex",alignItems:"center","aria-labelledby":f,role:"checkbox","aria-checked":r},void 0===r?he.createElement(a,{variant:"h5"},l):r?he.createElement(Te,{color:"success",sx:C}):he.createElement(Pe,{color:"error",sx:C}),c&&he.createElement(mt,{dense:s,onClick:g})))},bt=function(){return bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bt.apply(this,arguments)};function Et(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function xt(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var Ct=function(e){var t=e.label,n=e.value,r=e.format,i=e.placeholder,c=void 0===i?ft:i,u=e.editable,s=e.editInputType,d=void 0===s?"datetime":s,m=e.dense,f=e.onEdit,p=dt(n,void 0===f?function(){return null}:f),v=p.isEditing,y=p.editValue,h=p.startEdit,g=p.cancelEdit,b=p.setEditValue,E=p.submitEdit,x=pt(t),C=n&&$e(n,r)||c,S="datetime"===d?We:"time"===d?Ne:Me;return he.createElement(vt,{label:t,hideLabel:v,tooltip:C,dense:m,sx:{display:"flex",flexDirection:"column"}},v?he.createElement(S,{value:y,format:r,label:t,onChange:function(e){return b(e||void 0)},slots:{textField:function(e){var t;return he.createElement(l,bt({},e,{size:"small",InputProps:bt(bt({},e.InputProps),{endAdornment:he.createElement(he.Fragment,null,null===(t=e.InputProps)||void 0===t?void 0:t.endAdornment,he.createElement(st,{onClickCancel:g,onClickSubmit:E,sx:{ml:2}})),sx:{marginY:m?.2:1}})}))}}}):he.createElement(o,{display:"flex",alignItems:"center"},he.createElement(a,{variant:m?"body1":"h5",noWrap:!0,"aria-labelledby":x},C),u&&he.createElement(mt,{dense:m,onClick:h})))},St=function(e){var t=void 0===e?{}:e,r=t.lightWeight,o=void 0===r?100:r,a=t.darkWeight,i=void 0===a?900:a,l=n().palette;return"light"===l.mode?l.grey[o]:l.grey[i]},wt=function(e){var t=e.title,r=e.subtitle,i=e.centered,l=e.children,u=e.dense,d=n().typography,m=St({lightWeight:200,darkWeight:800});return he.createElement(c,{sx:{paddingBottom:u?0:1}},he.createElement(o,{bgcolor:m,px:u?1:2,py:u?.5:1,lineHeight:u?0:void 0},he.createElement(a,{variant:u?"body1":"h6",role:"heading","aria-level":1},t),r&&he.createElement(a,{variant:u?"caption":"body2",role:"heading","aria-level":2,lineHeight:u?d.pxToRem(15):void 0},r)),he.createElement(s,{container:!0,padding:1,rowSpacing:u?1:2,justifyContent:i?"center":"flex-start"},l))},kt=function(e){var t=e.label,n=e.value,r=void 0===n?0:n,a=e.maxRating,i=void 0===a?5:a,l=e.editable,c=e.dense,u=e.onEdit,s=dt(r,void 0===u?function(){return null}:u),m=s.isEditing,f=s.editValue,p=s.startEdit,v=s.cancelEdit,y=s.setEditValue,h=s.submitEdit,g=pt(t);return he.createElement(vt,{label:t,tooltip:r.toString(),dense:c},he.createElement(o,{display:"flex",alignItems:"center"},he.createElement(d,{"aria-labelledby":g,readOnly:!m,max:i,size:c?"small":"medium",value:m?f:r,onChange:function(e,t){Number.isNaN(t)&&e.currentTarget.value?y(parseInt(e.currentTarget.value,10)):t&&y(t)}}),l&&!m&&he.createElement(mt,{dense:c,onClick:p}),m&&he.createElement(st,{onClickCancel:v,onClickSubmit:h})))},Tt=function(e,t){return new Array(e).fill(t)},It=function(e){var t=Math.floor(Math.random()*e.length);return{index:t,item:e[t]}},Ot=function(e){void 0===e&&(e=12);var t=function(t,n,r){var o=t[n];return t[n]+=r,t[n]>e?(t[n]=r,!1):(t[n]==e&&(t[n]=0),o>0)};return{xs:0,sm:0,md:0,lg:0,xl:0,increment:function(e){var n=e.xs,r=void 0===n?0:n,o=e.sm,a=void 0===o?0:o,i=e.md,l=void 0===i?0:i,c=e.lg,u=void 0===c?0:c,s=e.xl,d=a||r,m=l||d,f=u||m,p=(void 0===s?0:s)||f;return{xs:t(this,"xs",r),sm:t(this,"sm",d),md:t(this,"md",m),lg:t(this,"lg",f),xl:t(this,"xl",p)}}}},Pt=function(e){var t=new FormData(e.currentTarget),n={};return t.forEach((function(e,t){n[t]=e})),n},$t={root:"RdsValueItem-root",content:"RdsValueItem-content"},zt=function(e){var t=e.children,n=e.bordered,r=void 0===n||n,a=Et(e,["children","bordered"]),i=function(e,t){var n="solid ".concat(t," 1px"),r="none";if(e){if(Array.isArray(e))return e.map((function(e){return e?n:r}));if("object"==typeof e){var o={};return Object.entries(e).forEach((function(e){var t=e[0],a=e[1];o[t]=a?n:r})),o}return n}}(r,St({lightWeight:200,darkWeight:800}));return he.createElement(s,bt({item:!0,className:$t.root},a),he.createElement(o,{className:$t.content,px:1,borderLeft:i},t))},Rt={root:"RdsBullet-root"},jt=function(e){var t=e.variant,n=void 0===t?"primary":t,r=e.sx;return he.createElement(m,{color:n,variant:"dot",className:Rt.root,role:"bullet","aria-describedby":n,sx:r})},At={root:"RdsLabel-root"},Wt=function(e){var t=e.text,r=e.variant,a=void 0===r?"default":r,i=e.textTransform,l=void 0===i?"capitalize":i,c=e.sx,u=n(),s=u.palette,d=u.typography,m={default:"light"===s.mode?s.grey[100]:s.grey[900],primary:s.primary.light,secondary:s.secondary.light,info:s.info.light,warning:s.warning.light,error:s.error.light,success:s.success.light},f={default:s.getContrastText(m.default),primary:s.primary.contrastText,secondary:s.secondary.contrastText,info:s.info.contrastText,warning:s.warning.contrastText,error:s.error.contrastText,success:s.success.contrastText};return he.createElement(o,{height:24,minWidth:22,display:"inline-flex",justifyContent:"center",alignItems:"center",bgcolor:m[a],color:f[a],fontSize:d.caption.fontSize,fontWeight:d.fontWeightBold,lineHeight:0,textTransform:l,whiteSpace:"nowrap",borderRadius:2,role:"label","aria-label":"".concat(t," ").concat(a," label"),py:0,px:1,sx:bt({cursor:"default"},c)},t)},Nt=xe((function(e,t){var n=e.href,r=Et(e,["href"]);return he.createElement(_e,bt({ref:t,to:n},r))})),Mt=xe((function(e,t){return he.createElement(f,bt({},e,{component:Nt}))})),Dt=new Error("NotificationCenterContext.Provider is required and was undefined"),Vt=he.createContext(void 0),Ft=function(){var e=he.useContext(Vt);if(void 0===e)throw Dt;return e},_t=function(e){var t=e.children,n=e.autoHideDuration,r=void 0===n?6e3:n,o=ge(void 0),a=o[0],i=o[1],l=ge(!1),c=l[0],u=l[1],s=function(){u(!1)};return he.createElement(Vt.Provider,{value:{show:function(e){i(e),u(!0)},hide:s}},he.createElement(p,{open:c,autoHideDuration:r,onClose:s,anchorOrigin:{vertical:"top",horizontal:"right"}},he.createElement(v,{onClose:s,severity:null==a?void 0:a.severity,"aria-label":null==a?void 0:a.severity,sx:{width:"100%"}},(null==a?void 0:a.title)&&he.createElement(y,null,null==a?void 0:a.title),null==a?void 0:a.message)),t)},Lt=function(e,t,n){var r=n.from,o=n.to,a=be(),i=Ft().show;Ee((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},Bt=Ce([0,function(){return null}]),qt=Bt.Provider,Ht=function(){return Se(Bt)},Ut=function(e){var t=e.children,n=e.initialValue,r=ge(void 0===n?0:n);return he.createElement(qt,{value:r},t)},Yt=function(e){var r=e.title,i=e.subtitle,l=e.preset,c=void 0===l?"default":l,u=e.actionsVariant,s=void 0===u?"outlined":u,d=e.breadcrumbs,m=e.actions,f=e.tabs,p=e.tabsMode,v=void 0===p?"panel":p,y=e.navigationButton,x=Le(),C=n().palette,S=St(),w=Ht(),k=w[0],T=w[1],I={default:S,primary:C.primary.main,secondary:C.secondary.main,inherit:"inherit",transparent:"transparent"},O=I[c],P={default:C.getContrastText(I.default),primary:C.primary.contrastText,secondary:C.secondary.contrastText,inherit:"inherit",transparent:C.text.primary}[c],$="panel"===v?k:null==f?void 0:f.findIndex((function(e){return e.href===x.pathname}));return he.createElement(o,{bgcolor:O,color:P},he.createElement(h,null,he.createElement(o,{sx:{py:3,display:"flex",flexDirection:"row",justifyContent:"space-between"}},he.createElement(o,null,y&&he.createElement(t,{href:y.href,size:"small",color:"inherit",LinkComponent:Mt,startIcon:y.icon,sx:{mb:1}},y.text),(null==d?void 0:d.length)&&he.createElement(g,{color:"inherit",separator:"›","aria-label":"breadcrumb",sx:{marginTop:1}},d.map((function(e){var t=e.id,n=e.link,r=e.text;return he.createElement(Mt,{key:t,underline:"hover",color:"inherit",href:n,variant:"body2",role:"link"},r)}))),he.createElement(a,{variant:"h4",role:"heading","aria-level":1},r),i&&he.createElement(a,{variant:"body1",role:"heading","aria-level":2},i)),m&&he.createElement(o,null,m.map((function(e,n){var r=e.disabled,o=e.id,a=e.href,i=e.onClick,l=e.text;return he.createElement(t,{component:a?Mt:"button",role:"button",color:"inherit",disabled:r,key:o,variant:s,size:"small",href:a,onClick:i,sx:{mr:n!=m.length-1?1:0}},l)})))),f&&he.createElement(b,{value:$,textColor:"inherit",onChange:"panel"===v?function(e,t){return T(t)}:void 0},f.map((function(e){var t=e.id,n=e.label,r=e.disabled,o=e.href,a={label:n,disabled:r};return"panel"===v?he.createElement(E,bt({key:t},a)):he.createElement(E,bt({key:t},a,{component:Mt,href:o}))})))))},Jt={overrides:{h1:{component:a,props:{gutterBottom:!0,variant:"h5"}},h2:{component:a,props:{gutterBottom:!0,variant:"h6"}},h3:{component:a,props:{gutterBottom:!0,variant:"subtitle1"}},h4:{component:a,props:{gutterBottom:!0,variant:"caption",paragraph:!0}},p:{component:a,props:{paragraph:!0}},a:{component:f},li:{component:"li"}}},Xt=function(e){var t=e.content,n=e.options,r=void 0===n?Jt:n;return he.createElement(Xe,{options:r},t)},Gt=function(e){var t,l,u=e.markdown,s=e.content,d=e.spacing,m=void 0===d?0:d,f=e.children,p=e.sx,v=n(),y=v.spacing,h=v.typography;u?t=u||"":Array.isArray(s)?(l=s.map((function(e,t){return he.createElement(a,{key:t,sx:{pb:m}},e)})),t=s.join("\n")):(l=he.createElement(a,null,s),t=s||"");var g=u&&he.createElement(Xt,{content:u});return he.createElement(c,{sx:bt({position:"relative",pl:2,pr:4,py:1,backgroundColor:Ye[800],color:"white"},p)},he.createElement(o,{display:"flex",flexDirection:"row"},he.createElement(o,{width:1},f||g||l),he.createElement(o,{sx:{position:"absolute",top:y(.5),right:y(.5)}},t&&he.createElement(r,{"aria-label":"copy board content",color:"inherit",onClick:function(){return navigator.clipboard.writeText(t)}},he.createElement(i,{title:"Copy"},he.createElement(Ge,{sx:{fontSize:h.pxToRem(18)}}))))))},Kt=function(e){var t,n=e.label,r=e.value,o=e.placeholder,a=void 0===o?ft:o,i=e.variant,l=pt(n);return t=Array.isArray(r)?r.map((function(e,t){return he.createElement(Wt,{text:e.toString()||a,variant:Array.isArray(i)?i[t]:i,key:t})})):he.createElement(Wt,{text:(null==r?void 0:r.toString())||a,variant:Array.isArray(i)?i[0]:i}),he.createElement(vt,{label:n},he.createElement(s,{container:!0,gap:1,"aria-labelledby":l},t))},Qt=function(){return he.createElement(o,{width:1,height:1,display:"flex",justifyContent:"center",alignItems:"center"},he.createElement(x,null))};function Zt(e){var t=e.fetching,n=void 0!==t&&t,r=e.loading,a=void 0!==r&&r,i=e.error,l=e.success,c=e.children,u=Array.isArray(n)?n.some((function(e){return e})):n;return(Array.isArray(a)?a.some((function(e){return e})):a)?he.createElement(Qt,null):i?he.createElement(v,{severity:"error",role:"alert","aria-describedby":"error"},i.name&&he.createElement(y,{role:"heading"},i.name),i.message):he.createElement(o,null,l&&he.createElement(v,{severity:"success",role:"alert","aria-describedby":"success",sx:{mb:2}},l.name&&he.createElement(y,{role:"heading"},l.name),l.message),u&&he.createElement(C,{sx:{width:1,mb:1}}),c)}var en=function(e){var t=e.children;return he.createElement(h,{component:"main",sx:{py:3,flexGrow:1}},t)};function tn(e){var t=e.children,n=e.centerVertical,r=void 0===n||n,a=e.centerHorizontal,i=void 0===a||a,l=e.sx;return he.createElement(o,{width:1,height:1,sx:bt(bt({},l),{display:"flex",flexDirection:"column",justifyContent:r?"center":"flex-start",alignItems:i?"center":"flex-start"})},t)}var nn=Ce(void 0),rn=nn.Provider,on=function(){return Se(nn)},an=function(e){var t=e.items,r=e.defaultSelectedItem,o=e.colBreakpoint,a=void 0===o?3:o,l=e.children,u=e.onSelectedItemChange,d=void 0===u?function(){return null}:u,m=St(),f=n(),p=f.palette,v=f.typography,y=ge(r),h=y[0],g=y[1];return he.createElement(rn,{value:h},he.createElement(s,{container:!0,bgcolor:m,height:1},he.createElement(s,{item:!0,xs:a,pl:1,height:1},he.createElement(S,{sx:{height:1,overflowY:"auto"}},t.map((function(e){var t=e.id,n=e.text,r=e.tooltip,o=t===h,a=he.createElement(w,{key:t,dense:!0,selected:o,onClick:function(){return function(e){g(e),d(e)}(t)},"aria-label":n,sx:{backgroundColor:o?"".concat(p.grey[300]," !important"):void 0}},he.createElement(k,{primary:n,primaryTypographyProps:{fontWeight:o?v.fontWeightMedium:void 0,color:o?v.body1.color:Je[600]}}));return r?he.createElement(i,{key:t,title:r,enterDelay:1500,placement:"right"},a):a})))),he.createElement(s,{item:!0,xs:12-a,pl:1,py:1,pr:1},he.createElement(c,{elevation:0,sx:{width:1,height:1,backgroundColor:p.background.paper}},l))))},ln=Ce(void 0),cn=new Error("DrawerContext.Provider is required and was undefined"),un=function(){var e=Se(ln);if(void 0===e)throw cn;return e},sn=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},dn=function(e){var t;return(t={transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")})[e.breakpoints.up("sm")]={width:"calc(".concat(e.spacing(8)," + 1px)")},t},mn=T("div")((function(e){var t=e.theme;return bt({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),fn={temporary:!0,mini:!0,persistent:!0,clipped:!1},pn={temporary:"temporary",mini:"permanent",clipped:"permanent",persistent:"persistent"},vn=function(){return{}},yn={mini:function(e,t){var n;return(n={boxSizing:"border-box"})["& .".concat($.root)]={zIndex:t.zIndex.drawer-1},n},temporary:vn,clipped:vn,persistent:vn},hn=function(e){var t,o,a=e.children,i=Et(e,["children"]),l=n(),c=un(),u=c.state,s=c.switchState,d=c.underAppBar,m=c.close,f=c.drawerWidth,p=c.variant,v=bt(bt(bt({width:f,flexShrink:0,whiteSpace:"nowrap"},"open"===u&&bt(bt({},sn(l)),((t={})["& .".concat(I.paper)]=sn(l),t))),"open"!==u&&bt(bt({},dn(l)),((o={})["& .".concat(I.paper)]=dn(l),o))),yn[p](u,l));return he.createElement(O,bt({open:"open"===u,variant:pn[p],role:"menu","aria-hidden":"close"===u,onClose:m,sx:v},i),he.createElement(mn,null,!d&&fn[p]&&he.createElement(r,{onClick:s},he.createElement(Ke,null))),he.createElement(P,null),a)},gn={temporary:"close",mini:"collapse",clipped:"open",persistent:"close"},bn={temporary:["close","open"],mini:["collapse","open"],clipped:["open","open"],persistent:["close","open"]},En=function(e){var t=e.children,n=e.initialState,r=e.variant,o=void 0===r?"temporary":r,a=e.drawerWidth,i=void 0===a?240:a,l=e.underAppBar,c=void 0!==l&&l,u=e.selectedItemId,s=e.onStateChange,d=void 0===s?function(){return null}:s,m=ge(n||gn[o]),f=m[0],p=m[1],v=function(e){d(e),p(e)};return he.createElement(ln.Provider,{value:{state:f,variant:o,selectedItemId:u,underAppBar:c,drawerWidth:i,switchState:function(){return v(bn[o]["open"===f?0:1])},collapse:function(){return v("collapse")},close:function(){return v("close")},open:function(){return v("open")},setState:p}},t)},xn=T(z,{shouldForwardProp:function(e){return"size"!==e}})((function(e){var t=e.size,n=e.theme;return{lineHeight:"small"===t?n.typography.pxToRem(40):void 0}})),Cn=function(e,t){return{color:t?e.palette.primary.main:void 0,fontWeight:t?e.typography.fontWeightBold:e.typography.fontWeightMedium}},Sn=function(e){var t=e.text,r=e.icon,o=e.selected,a=e.items,i=e.size,l=void 0===i?"medium":i,c=e.level,u=e.sx,s=void 0===u?{}:u,d=un().state,m=be(null),f=n(),p=f.palette,v=f.spacing,y=ge(!1),h=y[0],g=y[1],b=Cn(n(),o),E=b.color,x=b.fontWeight,C=he.createElement(S,{component:"div",disablePadding:!0},a.map((function(e){return he.createElement(In,{key:e.id,level:c+1,item:e,size:l})}))),T="collapse"===d&&0===c?{position:"absolute",right:0}:{};return he.createElement(he.Fragment,null,he.createElement(w,{ref:m,selected:o,"aria-label":t,onClick:function(){return g((function(e){return!e}))},dense:"small"===l,sx:bt(bt({},s),{pl:"open"===d?v(2+1.5*c):void 0,backgroundColor:h?p.action.hover:void 0})},r&&he.createElement(R,{sx:{color:E}},r),he.createElement(k,{disableTypography:!0,primary:t,sx:{color:E,fontWeight:x,opacity:"collapse"===d&&0===c?0:void 0}}),h&&"open"===d?he.createElement(Qe,{sx:[{color:E,ml:2},T]}):he.createElement(Ze,{sx:[{color:E,ml:2},T]})),"open"===d?he.createElement(j,{in:h,timeout:"auto",unmountOnExit:!0,"aria-label":"".concat(t," collapse submenu")},C):he.createElement(A,{open:h,PaperProps:{elevation:0,variant:"outlined"},"aria-label":"".concat(t," popover submenu"),anchorEl:m.current,onClose:function(){return g(!1)},anchorOrigin:{vertical:"top",horizontal:"right"}},C))},wn=T(Mt)((function(e){return{color:e.theme.palette.text.primary}})),kn={minWidth:0,justifyContent:"center",marginRight:"auto"},Tn=function(e){var t=e.text,r=e.icon,o=e.avatar,a=e.label,i=e.bullet,l=e.href,c=e.selected,u=e.size,s=void 0===u?"medium":u,d=e.level,m=e.sx,f=un().state,p=n(),v=Cn(p,c),y=v.color,h=v.fontWeight;return he.createElement(w,{LinkComponent:wn,dense:"small"===s,"aria-label":t,href:l,selected:c,sx:bt(bt(bt({},m),{pl:"open"===f?p.spacing(2+1.5*d):void 0}),"collapse"===f&&{paddingHorizontal:p.spacing(2.5),justifyContent:"center"})},r&&he.createElement(R,{sx:bt({color:y},"collapse"===f&&0===d&&kn)},r),o&&he.createElement(W,{sx:bt({},"collapse"===f&&0===d&&kn)},he.createElement(N,{alt:o.alt,src:o.src,sx:bt(bt({},"small"===s&&{width:24,height:24}),"collapse"===f&&{width:30,height:30})})),he.createElement(k,{disableTypography:!0,primary:t,sx:{color:y,fontWeight:h,opacity:"collapse"===f&&0===d?0:void 0}}),a&&"open"===f&&he.createElement(Wt,{text:a.text,variant:a.variant,sx:{ml:2}}),i&&"open"===f&&he.createElement(jt,{variant:i.variant,sx:{ml:2}}))},In=function(e){var t=e.item,n=e.size,r=void 0===n?"medium":n,o=e.level,a=void 0===o?0:o,i=un().selectedItemId;if("items"in t){var l=t.id,c=t.text,u=t.icon,s=t.items,d=s.some((function(e){return e.id===i}));return he.createElement(Sn,{size:r,selected:l===i||d,text:c,icon:u,items:s,level:a})}l=t.id,c=t.text,u=t.icon;var m=t.avatar,f=t.label,p=t.bullet,v=t.href;return he.createElement(Tn,{selected:l===i,size:r,text:c,icon:u,avatar:m,label:f,bullet:p,href:v,level:a})},On=function(e){var t=e.title,r=e.items,o=e.size,a=void 0===o?"medium":o,i=un().state,l=n().spacing;return he.createElement(he.Fragment,null,t&&"open"===i&&he.createElement(xn,{size:a,role:"heading"},t),he.createElement(S,{sx:{paddingTop:"small"===a?l(0):void 0,paddingY:"collapse"===i?0:void 0}},r.map((function(e){return he.createElement(In,{key:e.id,item:e,size:a})}))))},Pn=function(e){var t=e.nav.items,n=e.size,r=void 0===n?"medium":n;return he.createElement(he.Fragment,null,t.map((function(e,t){var n=e.title,o=e.items;return he.createElement(On,{key:t,title:n,items:o,size:r})})))},$n={temporary:!1,mini:!0,persistent:!0,clipped:!0},zn={temporary:function(){return!0},mini:function(e){return"open"!==e},persistent:function(){return!0},clipped:function(){return!1}},Rn=function(e){var t=e.title,o=e.sx,i=e.children,l=Et(e,["title","sx","children"]),c=n(),u=un(),s=u.state,d=u.variant,m=u.switchState,f=u.drawerWidth,p=u.underAppBar,v=$n[d]&&!p&&bt({transition:c.transitions.create(["width","margin"],{easing:c.transitions.easing.sharp,duration:c.transitions.duration.leavingScreen})},"open"===s&&{marginLeft:f,width:"calc(100% - ".concat(f,"px)"),transition:c.transitions.create(["width","margin"],{easing:c.transitions.easing.sharp,duration:c.transitions.duration.enteringScreen})})||{};return ye.createElement(M,bt({position:p?"fixed":void 0},l,{sx:bt(bt(bt({},o),v),{zIndex:function(e){return e.zIndex.drawer+(p?1:0)}})}),ye.createElement(D,null,ye.createElement(r,{color:"inherit","aria-label":"open drawer",onClick:m,edge:"start",sx:{marginRight:5,display:zn[d](s)?void 0:"none"}},ye.createElement(et,null)),t&&ye.createElement(a,{variant:"h6",component:"h1",role:"heading","aria-level":1,noWrap:!0},t),i))},jn={temporary:!1,mini:!0,clipped:!0,persistent:!0},An=T("div")((function(e){var t=e.theme,r=n().spacing,o=un(),a=o.drawerWidth,i=o.state,l=o.variant;return{marginLeft:jn[l]?"open"===i?a:"collapse"===i?r(8):0:0,transition:t.transitions.create("margin",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})}})),Wn=function(e){var t=e.children;return he.createElement(An,null,he.createElement(mn,null),t)},Nn={small:15,medium:20},Mn=function(e){var t=e.label,n=e.value,r=e.loading,a=void 0!==r&&r,i=e.fetching,l=void 0!==i&&i,c=e.size,u=void 0===c?"medium":c,s=e.fullWidth,d=void 0!==s&&s,m=e.color,f=e.children,p=e.onChange,v=we(),y=T(V)((function(){return m?{label:{color:m},".MuiOutlinedInput-notchedOutline":{borderColor:"".concat(m," !important")},".MuiInputBase-root":{color:m},".MuiSelect-icon":{fill:m}}:{}}));return he.createElement(y,{fullWidth:d},he.createElement(F,{id:v},t),he.createElement(_,{labelId:v,id:v,value:n,label:t,onChange:p,disabled:l,size:u,renderValue:function(e){return l?he.createElement(tn,{centerVertical:!0,centerHorizontal:!0},he.createElement(x,{color:"inherit",size:Nn[u]})):a?he.createElement(o,{display:"flex",flexDirection:"column"},e,he.createElement(C,{color:"inherit",sx:{position:"absolute",left:0,right:0,bottom:0}})):e}},f))},Dn=function(e){var t=e.title,n=e.subtitle,r=e.loading,i=e.error,c=e.onSubmitSignIn,u=ge(""),s=u[0],d=u[1],m=ge(""),f=m[0],p=m[1];return he.createElement(he.Fragment,null,he.createElement(o,{marginBottom:2},he.createElement(a,{component:"h1",variant:"h4"},t),he.createElement(a,{variant:"body1"},n)),he.createElement(o,{component:"form",onSubmit:function(e){var t,n;e.preventDefault(),d(""),p("");var r=new FormData(e.currentTarget),o=null===(t=r.get("email"))||void 0===t?void 0:t.toString(),a=null===(n=r.get("password"))||void 0===n?void 0:n.toString();o||d("Please fill out this field"),a||p("Please fill out this field"),o&&a&&c(o,a)}},i&&he.createElement(L,{width:"100%",marginTop:1},he.createElement(v,{variant:"filled",severity:"error"},i.message)),he.createElement(l,{margin:"normal",fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",autoFocus:!0,disabled:r,type:"email",inputProps:{role:"input"},error:!!s,helperText:s}),he.createElement(l,{margin:"normal",fullWidth:!0,role:"input",name:"password",label:"Password",type:"password",id:"password",disabled:r,autoComplete:"current-password",inputProps:{role:"input"},error:!!f,helperText:f}),he.createElement(tt,{type:"submit",fullWidth:!0,variant:"contained",loading:r,disabled:r,role:"button",sx:{mt:2}},"Sign In")))};function Vn(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}var Fn,_n={exports:{}},Ln={exports:{}},Bn={};var qn,Hn,Un,Yn,Jn,Xn,Gn,Kn,Qn,Zn,er,tr,nr,rr,or={};
2
2
  /** @license React v16.13.1
3
3
  * react-is.development.js
4
4
  *
@@ -6,12 +6,12 @@ import{InputAdornment as e,Button as t,useTheme as n,IconButton as r,Box as o,Ty
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */function Zn(){return Vn||(Vn=1,e=Nn,"production"===process.env.NODE_ENV?e.exports=function(){if(An)return Mn;An=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case c:case u:case r:case a:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case p:case f:case i:return e;default:return m}}case n:return m}}}function E(e){return b(e)===u}return Mn.AsyncMode=c,Mn.ConcurrentMode=u,Mn.ContextConsumer=l,Mn.ContextProvider=i,Mn.Element=t,Mn.ForwardRef=s,Mn.Fragment=r,Mn.Lazy=p,Mn.Memo=f,Mn.Portal=n,Mn.Profiler=a,Mn.StrictMode=o,Mn.Suspense=d,Mn.isAsyncMode=function(e){return E(e)||b(e)===c},Mn.isConcurrentMode=E,Mn.isContextConsumer=function(e){return b(e)===l},Mn.isContextProvider=function(e){return b(e)===i},Mn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Mn.isForwardRef=function(e){return b(e)===s},Mn.isFragment=function(e){return b(e)===r},Mn.isLazy=function(e){return b(e)===p},Mn.isMemo=function(e){return b(e)===f},Mn.isPortal=function(e){return b(e)===n},Mn.isProfiler=function(e){return b(e)===a},Mn.isStrictMode=function(e){return b(e)===o},Mn.isSuspense=function(e){return b(e)===d},Mn.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===a||e===o||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===i||e.$$typeof===l||e.$$typeof===s||e.$$typeof===y||e.$$typeof===h||e.$$typeof===g||e.$$typeof===v)},Mn.typeOf=b,Mn}():e.exports=(Dn||(Dn=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:var v=e.type;switch(v){case c:case u:case r:case a:case o:case d:return v;default:var y=v&&v.$$typeof;switch(y){case l:case s:case p:case f:case i:return y;default:return m}}case n:return m}}}var E=c,x=u,S=l,C=i,w=t,k=s,T=r,I=p,O=f,P=n,$=a,z=o,R=d,j=!1;function A(e){return b(e)===u}Qn.AsyncMode=E,Qn.ConcurrentMode=x,Qn.ContextConsumer=S,Qn.ContextProvider=C,Qn.Element=w,Qn.ForwardRef=k,Qn.Fragment=T,Qn.Lazy=I,Qn.Memo=O,Qn.Portal=P,Qn.Profiler=$,Qn.StrictMode=z,Qn.Suspense=R,Qn.isAsyncMode=function(e){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),A(e)||b(e)===c},Qn.isConcurrentMode=A,Qn.isContextConsumer=function(e){return b(e)===l},Qn.isContextProvider=function(e){return b(e)===i},Qn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Qn.isForwardRef=function(e){return b(e)===s},Qn.isFragment=function(e){return b(e)===r},Qn.isLazy=function(e){return b(e)===p},Qn.isMemo=function(e){return b(e)===f},Qn.isPortal=function(e){return b(e)===n},Qn.isProfiler=function(e){return b(e)===a},Qn.isStrictMode=function(e){return b(e)===o},Qn.isSuspense=function(e){return b(e)===d},Qn.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===a||e===o||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===i||e.$$typeof===l||e.$$typeof===s||e.$$typeof===y||e.$$typeof===h||e.$$typeof===g||e.$$typeof===v)},Qn.typeOf=b}()),Qn)),Nn.exports;var e}
9
+ */function ar(){return Hn||(Hn=1,e=Ln,"production"===process.env.NODE_ENV?e.exports=function(){if(Fn)return Bn;Fn=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case c:case u:case r:case a:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case p:case f:case i:return e;default:return m}}case n:return m}}}function E(e){return b(e)===u}return Bn.AsyncMode=c,Bn.ConcurrentMode=u,Bn.ContextConsumer=l,Bn.ContextProvider=i,Bn.Element=t,Bn.ForwardRef=s,Bn.Fragment=r,Bn.Lazy=p,Bn.Memo=f,Bn.Portal=n,Bn.Profiler=a,Bn.StrictMode=o,Bn.Suspense=d,Bn.isAsyncMode=function(e){return E(e)||b(e)===c},Bn.isConcurrentMode=E,Bn.isContextConsumer=function(e){return b(e)===l},Bn.isContextProvider=function(e){return b(e)===i},Bn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Bn.isForwardRef=function(e){return b(e)===s},Bn.isFragment=function(e){return b(e)===r},Bn.isLazy=function(e){return b(e)===p},Bn.isMemo=function(e){return b(e)===f},Bn.isPortal=function(e){return b(e)===n},Bn.isProfiler=function(e){return b(e)===a},Bn.isStrictMode=function(e){return b(e)===o},Bn.isSuspense=function(e){return b(e)===d},Bn.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===a||e===o||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===i||e.$$typeof===l||e.$$typeof===s||e.$$typeof===y||e.$$typeof===h||e.$$typeof===g||e.$$typeof===v)},Bn.typeOf=b,Bn}():e.exports=(qn||(qn=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:var v=e.type;switch(v){case c:case u:case r:case a:case o:case d:return v;default:var y=v&&v.$$typeof;switch(y){case l:case s:case p:case f:case i:return y;default:return m}}case n:return m}}}var E=c,x=u,C=l,S=i,w=t,k=s,T=r,I=p,O=f,P=n,$=a,z=o,R=d,j=!1;function A(e){return b(e)===u}or.AsyncMode=E,or.ConcurrentMode=x,or.ContextConsumer=C,or.ContextProvider=S,or.Element=w,or.ForwardRef=k,or.Fragment=T,or.Lazy=I,or.Memo=O,or.Portal=P,or.Profiler=$,or.StrictMode=z,or.Suspense=R,or.isAsyncMode=function(e){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),A(e)||b(e)===c},or.isConcurrentMode=A,or.isContextConsumer=function(e){return b(e)===l},or.isContextProvider=function(e){return b(e)===i},or.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},or.isForwardRef=function(e){return b(e)===s},or.isFragment=function(e){return b(e)===r},or.isLazy=function(e){return b(e)===p},or.isMemo=function(e){return b(e)===f},or.isPortal=function(e){return b(e)===n},or.isProfiler=function(e){return b(e)===a},or.isStrictMode=function(e){return b(e)===o},or.isSuspense=function(e){return b(e)===d},or.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===a||e===o||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===i||e.$$typeof===l||e.$$typeof===s||e.$$typeof===y||e.$$typeof===h||e.$$typeof===g||e.$$typeof===v)},or.typeOf=b}()),or)),Ln.exports;var e}
10
10
  /*
11
11
  object-assign
12
12
  (c) Sindre Sorhus
13
13
  @license MIT
14
- */function er(){if(_n)return Fn;_n=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Fn=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var a,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))t.call(a,u)&&(l[u]=a[u]);if(e){i=e(a);for(var s=0;s<i.length;s++)n.call(a,i[s])&&(l[i[s]]=a[i[s]])}}return l},Fn}function tr(){if(Bn)return Ln;Bn=1;return Ln="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function nr(){return Hn?qn:(Hn=1,qn=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var rr=Zn();Wn.exports=function(){if(Xn)return Jn;Xn=1;var e=Zn(),t=er(),n=tr(),r=nr(),o=function(){if(Yn)return Un;Yn=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=tr(),n={},r=nr();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,a,i,l,c){if("production"!==process.env.NODE_ENV)for(var u in o)if(r(o,u)){var s;try{if("function"!=typeof o[u]){var d=Error((l||"React class")+": "+i+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}s=o[u](a,u,l,i,null,t)}catch(e){s=e}if(!s||s instanceof Error||e((l||"React class")+": type specification of "+i+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in n)){n[s.message]=!0;var m=c?c():"";e("Failed "+i+" type: "+s.message+(null!=m?m:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Un=o}(),a=function(){};function i(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Jn=function(l,c){var u="function"==typeof Symbol&&Symbol.iterator,s="@@iterator",d="<<anonymous>>",m={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:v(i),arrayOf:function(e){return v((function(t,r,o,a,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new p("Invalid "+a+" `"+i+"` of type `"+b(l)+"` supplied to `"+o+"`, expected an array.");for(var c=0;c<l.length;c++){var u=e(l,c,o,a,i+"["+c+"]",n);if(u instanceof Error)return u}return null}))},element:v((function(e,t,n,r,o){var a=e[t];return l(a)?null:new p("Invalid "+r+" `"+o+"` of type `"+b(a)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:v((function(t,n,r,o,a){var i=t[n];return e.isValidElementType(i)?null:new p("Invalid "+o+" `"+a+"` of type `"+b(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return v((function(t,n,r,o,a){if(!(t[n]instanceof e)){var i=e.name||d;return new p("Invalid "+o+" `"+a+"` of type `"+((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}var l;return null}))},node:v((function(e,t,n,r,o){return g(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return v((function(t,o,a,i,l){if("function"!=typeof e)return new p("Property `"+l+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var c=t[o],u=b(c);if("object"!==u)return new p("Invalid "+i+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected an object.");for(var s in c)if(r(c,s)){var d=e(c,s,a,i,l+"."+s,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){return Array.isArray(e)?v((function(t,n,r,o,a){for(var i=t[n],l=0;l<e.length;l++)if(f(i,e[l]))return null;var c=JSON.stringify(e,(function(e,t){return"symbol"===E(t)?String(t):t}));return new p("Invalid "+o+" `"+a+"` of value `"+String(i)+"` supplied to `"+r+"`, expected one of "+c+".")})):("production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),i)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),i}return v((function(t,o,a,i,l){for(var c=[],u=0;u<e.length;u++){var s=(0,e[u])(t,o,a,i,l,n);if(null==s)return null;s.data&&r(s.data,"expectedType")&&c.push(s.data.expectedType)}return new p("Invalid "+i+" `"+l+"` supplied to `"+a+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")}))},shape:function(e){return v((function(t,r,o,a,i){var l=t[r],c=b(l);if("object"!==c)return new p("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");for(var u in e){var s=e[u];if("function"!=typeof s)return h(o,a,i,u,E(s));var d=s(l,u,o,a,i+"."+u,n);if(d)return d}return null}))},exact:function(e){return v((function(o,a,i,l,c){var u=o[a],s=b(u);if("object"!==s)return new p("Invalid "+l+" `"+c+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");var d=t({},o[a],e);for(var m in d){var f=e[m];if(r(e,m)&&"function"!=typeof f)return h(i,l,c,m,E(f));if(!f)return new p("Invalid "+l+" `"+c+"` key `"+m+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(o[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var v=f(u,m,i,l,c+"."+m,n);if(v)return v}return null}))}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function v(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,l,u,s,m,f){if(u=u||d,m=m||l,f!==n){if(c){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var y=u+":"+l;!t[y]&&r<3&&(a("You are manually calling a React.PropTypes validation function for the `"+m+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[y]=!0,r++)}}return null==i[l]?o?null===i[l]?new p("The "+s+" `"+m+"` is marked as required in `"+u+"`, but its value is `null`."):new p("The "+s+" `"+m+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(i,l,u,s,m)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function y(e){return v((function(t,n,r,o,a,i){var l=t[n];return b(l)!==e?new p("Invalid "+o+" `"+a+"` of type `"+E(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function h(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||l(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e[s]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!g(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!g(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function E(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=E(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,m.checkPropTypes=o,m.resetWarningCache=o.resetWarningCache,m.PropTypes=m,m},Jn}()(rr.isElement,!0)}else Wn.exports=function(){if(Kn)return Gn;Kn=1;var e=tr();function t(){}function n(){}return n.resetWarningCache=t,Gn=function(){function r(t,n,r,o,a,i){if(i!==e){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function o(){return r}r.isRequired=r;var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a}}()();function or(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;const c=a.type;return"function"!=typeof c||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(c)||(l="Did you accidentally use a plain function component for an element instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}jn(Wn.exports.element,or).isRequired=jn(Wn.exports.element.isRequired,or),jn(Wn.exports.elementType,(function(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;return"function"!=typeof a||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(a)||(l="Did you accidentally provide a plain function component instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}));var ar,ir={};var lr,cr,ur={};
14
+ */function ir(){if(Yn)return Un;Yn=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Un=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var a,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))t.call(a,u)&&(l[u]=a[u]);if(e){i=e(a);for(var s=0;s<i.length;s++)n.call(a,i[s])&&(l[i[s]]=a[i[s]])}}return l},Un}function lr(){if(Xn)return Jn;Xn=1;return Jn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function cr(){return Kn?Gn:(Kn=1,Gn=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var ur=ar();_n.exports=function(){if(tr)return er;tr=1;var e=ar(),t=ir(),n=lr(),r=cr(),o=function(){if(Zn)return Qn;Zn=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=lr(),n={},r=cr();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,a,i,l,c){if("production"!==process.env.NODE_ENV)for(var u in o)if(r(o,u)){var s;try{if("function"!=typeof o[u]){var d=Error((l||"React class")+": "+i+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}s=o[u](a,u,l,i,null,t)}catch(e){s=e}if(!s||s instanceof Error||e((l||"React class")+": type specification of "+i+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in n)){n[s.message]=!0;var m=c?c():"";e("Failed "+i+" type: "+s.message+(null!=m?m:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Qn=o}(),a=function(){};function i(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),er=function(l,c){var u="function"==typeof Symbol&&Symbol.iterator,s="@@iterator",d="<<anonymous>>",m={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:v(i),arrayOf:function(e){return v((function(t,r,o,a,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new p("Invalid "+a+" `"+i+"` of type `"+b(l)+"` supplied to `"+o+"`, expected an array.");for(var c=0;c<l.length;c++){var u=e(l,c,o,a,i+"["+c+"]",n);if(u instanceof Error)return u}return null}))},element:v((function(e,t,n,r,o){var a=e[t];return l(a)?null:new p("Invalid "+r+" `"+o+"` of type `"+b(a)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:v((function(t,n,r,o,a){var i=t[n];return e.isValidElementType(i)?null:new p("Invalid "+o+" `"+a+"` of type `"+b(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return v((function(t,n,r,o,a){if(!(t[n]instanceof e)){var i=e.name||d;return new p("Invalid "+o+" `"+a+"` of type `"+((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}var l;return null}))},node:v((function(e,t,n,r,o){return g(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return v((function(t,o,a,i,l){if("function"!=typeof e)return new p("Property `"+l+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var c=t[o],u=b(c);if("object"!==u)return new p("Invalid "+i+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected an object.");for(var s in c)if(r(c,s)){var d=e(c,s,a,i,l+"."+s,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){return Array.isArray(e)?v((function(t,n,r,o,a){for(var i=t[n],l=0;l<e.length;l++)if(f(i,e[l]))return null;var c=JSON.stringify(e,(function(e,t){return"symbol"===E(t)?String(t):t}));return new p("Invalid "+o+" `"+a+"` of value `"+String(i)+"` supplied to `"+r+"`, expected one of "+c+".")})):("production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),i)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),i}return v((function(t,o,a,i,l){for(var c=[],u=0;u<e.length;u++){var s=(0,e[u])(t,o,a,i,l,n);if(null==s)return null;s.data&&r(s.data,"expectedType")&&c.push(s.data.expectedType)}return new p("Invalid "+i+" `"+l+"` supplied to `"+a+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")}))},shape:function(e){return v((function(t,r,o,a,i){var l=t[r],c=b(l);if("object"!==c)return new p("Invalid "+a+" `"+i+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");for(var u in e){var s=e[u];if("function"!=typeof s)return h(o,a,i,u,E(s));var d=s(l,u,o,a,i+"."+u,n);if(d)return d}return null}))},exact:function(e){return v((function(o,a,i,l,c){var u=o[a],s=b(u);if("object"!==s)return new p("Invalid "+l+" `"+c+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");var d=t({},o[a],e);for(var m in d){var f=e[m];if(r(e,m)&&"function"!=typeof f)return h(i,l,c,m,E(f));if(!f)return new p("Invalid "+l+" `"+c+"` key `"+m+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(o[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var v=f(u,m,i,l,c+"."+m,n);if(v)return v}return null}))}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function v(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,l,u,s,m,f){if(u=u||d,m=m||l,f!==n){if(c){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var y=u+":"+l;!t[y]&&r<3&&(a("You are manually calling a React.PropTypes validation function for the `"+m+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[y]=!0,r++)}}return null==i[l]?o?null===i[l]?new p("The "+s+" `"+m+"` is marked as required in `"+u+"`, but its value is `null`."):new p("The "+s+" `"+m+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(i,l,u,s,m)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function y(e){return v((function(t,n,r,o,a,i){var l=t[n];return b(l)!==e?new p("Invalid "+o+" `"+a+"` of type `"+E(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function h(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||l(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e[s]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!g(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!g(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function E(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=E(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,m.checkPropTypes=o,m.resetWarningCache=o.resetWarningCache,m.PropTypes=m,m},er}()(ur.isElement,!0)}else _n.exports=function(){if(rr)return nr;rr=1;var e=lr();function t(){}function n(){}return n.resetWarningCache=t,nr=function(){function r(t,n,r,o,a,i){if(i!==e){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function o(){return r}r.isRequired=r;var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a}}()();function sr(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;const c=a.type;return"function"!=typeof c||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(c)||(l="Did you accidentally use a plain function component for an element instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}Vn(_n.exports.element,sr).isRequired=Vn(_n.exports.element.isRequired,sr),Vn(_n.exports.elementType,(function(e,t,n,r,o){const a=e[t],i=o||t;if(null==a||"undefined"==typeof window)return null;let l;return"function"!=typeof a||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(a)||(l="Did you accidentally provide a plain function component instead?"),void 0!==l?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}));var dr,mr={};var fr,pr,vr={};
15
15
  /**
16
16
  * @license React
17
17
  * react-is.development.js
@@ -20,5 +20,5 @@ object-assign
20
20
  *
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
23
- */cr={exports:{}},"production"===process.env.NODE_ENV?cr.exports=function(){if(ar)return ir;ar=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case r:case a:case o:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case f:case m:case i:return e;default:return p}}case n:return p}}}return e=Symbol.for("react.module.reference"),ir.ContextConsumer=l,ir.ContextProvider=i,ir.Element=t,ir.ForwardRef=u,ir.Fragment=r,ir.Lazy=f,ir.Memo=m,ir.Portal=n,ir.Profiler=a,ir.StrictMode=o,ir.Suspense=s,ir.SuspenseList=d,ir.isAsyncMode=function(){return!1},ir.isConcurrentMode=function(){return!1},ir.isContextConsumer=function(e){return v(e)===l},ir.isContextProvider=function(e){return v(e)===i},ir.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ir.isForwardRef=function(e){return v(e)===u},ir.isFragment=function(e){return v(e)===r},ir.isLazy=function(e){return v(e)===f},ir.isMemo=function(e){return v(e)===m},ir.isPortal=function(e){return v(e)===n},ir.isProfiler=function(e){return v(e)===a},ir.isStrictMode=function(e){return v(e)===o},ir.isSuspense=function(e){return v(e)===s},ir.isSuspenseList=function(e){return v(e)===d},ir.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},ir.typeOf=v,ir}():cr.exports=(lr||(lr=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var v=e.type;switch(v){case r:case a:case o:case s:case d:return v;default:var y=v&&v.$$typeof;switch(y){case c:case l:case u:case f:case m:case i:return y;default:return p}}case n:return p}}}e=Symbol.for("react.module.reference");var y=l,h=i,g=t,b=u,E=r,x=f,S=m,C=n,w=a,k=o,T=s,I=d,O=!1,P=!1;ur.ContextConsumer=y,ur.ContextProvider=h,ur.Element=g,ur.ForwardRef=b,ur.Fragment=E,ur.Lazy=x,ur.Memo=S,ur.Portal=C,ur.Profiler=w,ur.StrictMode=k,ur.Suspense=T,ur.SuspenseList=I,ur.isAsyncMode=function(e){return O||(O=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},ur.isConcurrentMode=function(e){return P||(P=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},ur.isContextConsumer=function(e){return v(e)===l},ur.isContextProvider=function(e){return v(e)===i},ur.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ur.isForwardRef=function(e){return v(e)===u},ur.isFragment=function(e){return v(e)===r},ur.isLazy=function(e){return v(e)===f},ur.isMemo=function(e){return v(e)===m},ur.isPortal=function(e){return v(e)===n},ur.isProfiler=function(e){return v(e)===a},ur.isStrictMode=function(e){return v(e)===o},ur.isSuspense=function(e){return v(e)===s},ur.isSuspenseList=function(e){return v(e)===d},ur.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},ur.typeOf=v}()),ur),"undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Wn.exports.oneOfType([Wn.exports.func,Wn.exports.object]);let sr=0;const dr=ve["useId".toString()];function mr(e){if(void 0!==dr){const t=dr();return null!=e?e:t}return function(e){const[t,n]=ve.useState(e),r=e||t;return ve.useEffect((()=>{null==t&&(sr+=1,n(`mui-${sr}`))}),[t]),r}(e)}const fr={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};const pr=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function vr(e,t,n,r){const o=e[t];if(null==o||!pr(o)){const e=function(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return null===e?"null":e.constructor.name;default:return t}}(o);return new RangeError(`Invalid ${r} \`${t}\` of type \`${e}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function yr(e,t,...n){return void 0===e[t]?null:vr(e,t,...n)}function hr(){return null}yr.isRequired=vr,hr.isRequired=hr,process.env.NODE_ENV;var gr=function(t){var n,r=t.id,o=t.label,a=t.InputLabelProps,i=t.InputProps,l=t.fetching,c=t.loading,u=t.helperText,s=t.hexColor,d=t.size,m=t.fullWidth,f=t.sx,p=gt(t,["id","label","InputLabelProps","InputProps","fetching","loading","helperText","hexColor","size","fullWidth","sx"]),v=mr(r),y=u&&v?"".concat(v,"-helper-text"):void 0,h=o&&v?"".concat(v,"-label"):void 0,g=s?((n={})["& .".concat(B.notchedOutline)]={borderColor:"".concat(s," !important")},n["& .".concat(q.root)]={color:s},n["& .".concat(B.input)]={color:s},n["& .".concat(H.root)]={color:s},n["& .".concat(U.bar)]={backgroundColor:s},n["& .".concat(Y.endAdornment," .").concat(J.root)]={color:s},n):{};return ye.createElement(V,{sx:g,fullWidth:m},ye.createElement(F,ht({size:"small"===d?"small":"normal",id:h,htmlFor:v},a),o),ye.createElement(X,ht({},i,{id:v,label:o,size:d,fullWidth:m,endAdornment:ye.createElement(e,{position:"end"},null==i?void 0:i.endAdornment,c?ye.createElement(x,{color:"inherit",size:20,sx:{ml:1}}):null),sx:f},p)),l&&!c&&ye.createElement(S,{color:"inherit",sx:{position:"absolute",left:0,right:0,bottom:0}}),u&&ye.createElement(G,{id:y},u))},br=function(e){var t=e.label,n=e.loading,r=e.fetching,o=e.options,a=e.helperText,i=e.color,l=e.onChangeValue,c=void 0===l?function(){return null}:l,u=e.sx,s=gt(e,["label","loading","fetching","options","helperText","color","onChangeValue","sx"]),d=n||r;return ye.createElement(K,ht({loading:d,options:r?[]:o,onChange:function(e,t){return c(t)}},s,{renderInput:function(e){return ye.createElement(gr,ht({},e,{label:t,fullWidth:!0,fetching:r,loading:n,hexColor:i,helperText:a}))},sx:u}))},Er=C(o,{shouldForwardProp:function(e){return"dayIsBetween"!==e&&"isFirstDay"!==e&&"isLastDay"!==e&&"isStartOfWeek"!==e&&"isEndOfWeek"!==e}})((function(e){var t=e.theme,n=e.dayIsBetween,r=e.isFirstDay,o=e.isLastDay;return ht(ht(ht({},(r||o||n)&&{borderRadius:0,backgroundColor:"".concat(t.palette.primary.light,"40"),margin:0}),r&&{borderTopLeftRadius:"50%",borderBottomLeftRadius:"50%"}),o&&{borderTopRightRadius:"50%",borderBottomRightRadius:"50%"})})),xr=function(e){var t=e.day,n=e.dateRange,r=gt(e,["day","dateRange"]);if(null==n)return ye.createElement(De,ht({day:t},r));var o=n[0],a=n[1],i=!!a&&$e(t,o)&&tt(t,a),l=ze(t,o),c=!!a&&ze(t,a),u=ze(t,Re(t)),s=ze(t,je(t));return ye.createElement(Er,{dayIsBetween:i,isFirstDay:l||i&&u,isLastDay:c||i&&s,"aria-label":Pe(t,"yyyy-MM-dd"),"aria-selected":i||l||c,role:"gridcell"},ye.createElement(De,ht({},r,{day:t,selected:l||c})))},Sr=function(e){var t=e.defaultValue,n=e.onValueChange,r=he(t),o=r[0],a=r[1],i=he(0),l=i[0],c=i[1],u=function(e,t,r){a(e),n(e,t),c(r)};return ye.createElement(Me,{value:null,onChange:function(e){if(e)return 1===l&&e<o[0]||0===l&&o[1]&&e>o[1]?u([e,void 0],0,1):void u([0===l?e:o[0],1===l?e:o[1]],l,0===l?1:0)},slots:{day:xr},slotProps:{day:{dateRange:o}},"aria-label":"calendar range picker"})},Cr=function(t){var n=t.defaultValue,o=t.format,a=t.label,i=t.fullWidth,u=t.onValueChange,s=t.size,d=void 0===s?"medium":s,m=he(!1),f=m[0],p=m[1],v=he(n),y=v[0],h=v[1];return ye.createElement(ye.Fragment,null,ye.createElement(l,{label:a,fullWidth:i,size:d,value:"".concat(Pe(y[0],o)," - ").concat(y[1]?Pe(y[1],o):o.toUpperCase()),InputProps:{endAdornment:ye.createElement(e,{position:"end"},ye.createElement(r,{onClick:function(){return p((function(e){return!e}))},"aria-label":"open calendar"},ye.createElement(et,null)))}}),ye.createElement(c,null,ye.createElement(j,{in:f,"aria-label":"calendar collapse"},ye.createElement(Sr,{defaultValue:n,onValueChange:function(e,t){h(e),u(e,t),p(t<1)}}))))},wr=xe([0,function(){return null}]),kr=wr.Provider,Tr=C((function(e){return ye.createElement(b,ht({},e,{TabIndicatorProps:{children:ye.createElement("span",{className:"MuiTabs-indicatorSpan"})}}))}))((function(e){var t=e.theme;return{minHeight:t.spacing(5),"& .MuiTabs-indicator":{display:"flex",justifyContent:"center",backgroundColor:"transparent"},"& .MuiTabs-indicatorSpan":{maxWidth:40,width:"100%",backgroundColor:t.palette.primary.main}}})),Ir=C(E)((function(e){var t=e.theme;return{textTransform:"none",fontWeight:t.typography.fontWeightRegular,marginRight:t.spacing(1),color:t.palette.text.secondary,paddingTop:0,paddingBottom:0,minHeight:t.spacing(5),"&.Mui-selected":{color:t.palette.text.secondary,fontWeight:t.typography.fontWeightBold}}})),Or=function(e){var t=e.children,n=e.tabs,r=e.initialTab,a=void 0===r?0:r,i=e.onChangeTab,l=void 0===i?function(){return null}:i,u=xt(),s=he(a),d=s[0],m=s[1];return ye.createElement(kr,{value:[d,m]},ye.createElement(c,{variant:"outlined"},ye.createElement(o,{bgcolor:u},ye.createElement(Tr,{value:d,onChange:function(e,t){m(t),l(n[t],t)}},n.map((function(e){var t=e.text,n=e.icon;return ye.createElement(Ir,{iconPosition:"start",disableRipple:!0,key:t,label:t,icon:n})})))),t))},Pr=function(e){var t=e.index,n=e.children,r=e.sx,a=Se(wr)[0],i=a===t;return Array.isArray(t)&&(i=t.includes(a)),i?ye.createElement(o,{sx:r},n):null};function $r(e){var t=e.children,n=e.index,r=Bt()[0],a=r===n;return Array.isArray(n)&&(a=n.includes(r)),ye.createElement("div",{role:"tabpanel",hidden:!a,id:"simple-tabpanel-".concat(n),"aria-labelledby":"simple-tab-".concat(n)},a&&ye.createElement(o,{sx:{p:3}},t))}var zr=function(e){var t=e.order,n=e.orderBy,r=e.headCells,a=e.onRequestSort;return ye.createElement(Q,null,ye.createElement(Z,null,r.map((function(e){return ye.createElement(ee,{variant:"head",key:String(e.id),padding:e.disablePadding?"none":"normal",sortDirection:n===e.id&&t,sx:{fontWeight:"bold"}},e.sort?ye.createElement(te,{active:n===e.id,direction:n===e.id?t:"asc",onClick:(r=e.id,function(){a(r)})},e.label,n===e.id?ye.createElement(o,{component:"span",sx:fr},"desc"===t?"sorted descending":"sorted ascending"):null):e.label);var r}))))};function Rr(e,t,n){return t[n]<e[n]?-1:t[n]>e[n]?1:0}var jr=function(t){var n=t.children,r=t.data,a=t.search,i=t.columns,c=t.defaultSort,u=t.defaultOrder,s=void 0===u?"asc":u,d=t.loading,m=void 0!==d&&d,f=he(""),p=f[0],v=f[1],y=he(s),h=y[0],g=y[1],b=he(c),E=b[0],S=b[1],C=r.slice().filter(function(e,t){return function(n){return!t||e.some((function(e){var r=n[e.id];return(null==r?void 0:r.toLowerCase)&&(r=r.toLowerCase()),null==r?void 0:r.toString().includes(t.toLowerCase())}))}}(i,p)).sort(function(e,t){return"desc"===e?function(e,n){return Rr(e,n,t)}:function(e,n){return-Rr(e,n,t)}}(h,E));return ye.createElement(ye.Fragment,null,ye.createElement(o,{sx:{paddingX:1,paddingBottom:2}},a&&ye.createElement(o,{paddingY:2},ye.createElement(l,{fullWidth:!0,placeholder:"Search",InputProps:{role:"search",startAdornment:ye.createElement(e,{position:"start"},ye.createElement(nt,null))},onChange:function(e){return v(e.target.value)}})),ye.createElement(ne,null,ye.createElement(re,null,ye.createElement(zr,{order:h,orderBy:E,headCells:i,onRequestSort:function(e){g(E===e&&"asc"===h?"desc":"asc"),S(e)}}),ye.createElement(oe,null,m?ye.createElement(Z,null,ye.createElement(ee,{colSpan:i.length,sx:{textAlign:"center"}},ye.createElement(x,null))):0===C.length?ye.createElement(Z,null,ye.createElement(ee,{colSpan:i.length,sx:{textAlign:"center"}},"No data")):n(C))))))};jr.defaultProps={defaultOrder:"asc"};var Ar,Wr=function(e){var t=e.children,n=e.data,r=e.loading,o=e.columns,a=e.defaultSort,i=e.defaultOrder,l=e.onRequestSort,c=he({orderBy:a,order:i||"asc"}),u=c[0],s=c[1];return ye.createElement(ye.Fragment,null,ye.createElement(ne,null,ye.createElement(re,null,ye.createElement(zr,{order:u.order,orderBy:u.orderBy,headCells:o,onRequestSort:function(e){s((function(t){var n=t.orderBy,r=t.order,o=n===e&&"asc"===r?"desc":"asc";return l(e,o),{orderBy:e,order:o}}))}}),ye.createElement(oe,null,r?ye.createElement(Z,null,ye.createElement(ee,{colSpan:o.length,sx:{textAlign:"center"}},ye.createElement(x,null))):n.map((function(e,n){return t(e,n)}))))))},Nr=function(e){var n=e.title,r=e.subtitle,i=e.icon,l=e.iconSize,c=void 0===l?200:l,u=e.actions;return ye.createElement(o,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center"},i&&i({size:c,color:"primary"}),ye.createElement(a,{variant:"h4",role:"heading","aria-level":1},n),ye.createElement(a,{variant:"subtitle1",role:"heading","aria-level":2,sx:{mt:2}},r),u&&ye.createElement(o,{sx:{pt:2}},u.map((function(e,n){var r=e.id,o=e.text,a=e.href,i=e.onClick;return ye.createElement(t,{key:r,role:"button",variant:"contained",href:a,onClick:i,sx:{mr:n<u.length-1?2:0}},o)}))))},Mr=function(e){var t=e.width,n=void 0===t?"100%":t,r=e.animation,a=void 0!==r&&r;return ye.createElement(o,{width:n},ye.createElement(ae,{animation:a,variant:"rectangular",height:118}),ye.createElement(ae,{animation:a,variant:"rectangular",height:16,sx:{my:1}}),ye.createElement(ae,{animation:a,variant:"rectangular",width:"80%",height:16}))},Dr=function(e){var t=e.size,n=void 0===t?20:t;return ye.createElement(s,{container:!0,spacing:2},wt(n,0).map((function(e,t){return ye.createElement(s,{item:!0,key:t,xs:4},ye.createElement(Mr,{width:1}))})))},Vr=function(e){var t=e.size,n=void 0===t?20:t,r=e.children,o=e.p;return ye.createElement(h,{component:"main",sx:{p:o},"data-testid":"content-placeholder-test"},r,ye.createElement(Dr,{size:n}))},Fr=function(e){var t=e.count,n=void 0===t?3:t,r=e.units,o=void 0===r?"paragraph":r,i=e.variant,l=void 0===i?"body1":i;return ye.createElement(a,{variant:l},rt({count:n,units:o}))},_r=((Ar={})["& .".concat(ie.message)]={width:1},Ar),Lr=Ee((function(e,t){var n=e.severity,a=e.iconMapping,i=e.title,l=e.message,c=e.metadata,u=e.metadataComponent,s=e.onClose,d=e.sx,m=void 0===d?{}:d,f=he(!1),p=f[0],h=f[1];return ye.createElement(v,{ref:t,severity:n,iconMapping:a,onClose:s,action:ye.createElement(o,{display:"flex",flexDirection:"column"},ye.createElement(r,{color:"inherit",onClick:s},ye.createElement(Oe,{fontSize:"small"})),c&&ye.createElement(r,{color:"inherit",onClick:function(){return h((function(e){return!e}))}},p?ye.createElement(ot,{fontSize:"small"}):ye.createElement(Ge,{fontSize:"small"}))),sx:ht(ht({},_r),m)},ye.createElement(o,{sx:{w:1}},i&&ye.createElement(y,null,i),l,c&&ye.createElement(j,{in:p,sx:{mt:2}},ye.createElement(Jt,{content:c},u))))})),Br=function(e){var n=e.open,a=e.title,i=e.component,l=e.componentProps,c=void 0===l?{}:l,u=e.disabled,s=e.disableAccept,d=e.disableCancel,m=e.actions,f=void 0===m?[]:m,p=e.children,v=e.loading,y=e.cancelable,h=e.callCloseWhenCancel,g=void 0===h||h,b=e.acceptable,E=e.acceptText,S=void 0===E?"Accept":E,C=e.cancelText,w=void 0===C?"Cancel":C,k=e.onAccept,T=e.onCancel,I=void 0===T?function(){return null}:T,O=e.onClose,P=e.acceptType,$=void 0===P?"button":P,z=f.length>0||b||y;return ye.createElement(le,{open:n,onClose:O},ye.createElement(ce,{sx:{display:"flex",alignItems:"center"}},a,v&&!b&&ye.createElement(x,{size:20,sx:{ml:2,color:function(e){return e.palette.grey[500]}}}),ye.createElement(r,{disabled:u,"aria-label":"close",onClick:O,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}}},ye.createElement(Oe,null))),ye.createElement(o,ht({component:i},c),ye.createElement(ue,{dividers:!0},p),z&&ye.createElement(se,null,f.map((function(e){var n=e.id,r=e.text,o=e.type,a=void 0===o?"button":o,i=e.onClick,l=e.color,c=void 0===l?"primary":l;return ye.createElement(t,{key:n,type:a,disabled:u,onClick:i,color:c},r)})),y&&ye.createElement(t,{color:"error",disabled:u||d,onClick:function(){I(),g&&O()}},w),b&&ye.createElement(Ze,{type:$,loading:v,disabled:u||s,onClick:k},S))))},qr=function(e){var t=e.open,n=e.title,r=e.loading,o=e.disabled,a=e.confirmText,i=void 0===a?"Confirm":a,c=e.cancelText,u=void 0===c?"Cancel":c,s=e.passphrase,d=e.children,m=e.onConfirm,f=e.onCancel,p=he(""),v=p[0],y=p[1],h=!s||v===s;return ye.createElement(Br,{title:n,loading:r,disabled:r||o,disableAccept:!h,open:t,onClose:f,acceptable:!0,cancelable:!0,callCloseWhenCancel:!1,acceptText:i,cancelText:u,onCancel:f,onAccept:m},d,s&&ye.createElement(l,{size:"small",fullWidth:!0,value:v,onChange:function(e){return y(e.target.value)},placeholder:s}))},Hr=function(e){var t=e.open,n=e.title,r=e.loading,o=e.disabled,a=e.submitText,i=void 0===a?"Submit":a,l=e.cancelText,c=void 0===l?"Cancel":l,u=e.children,s=e.onSubmit,d=e.onCancel;return ye.createElement(Br,{component:"form",componentProps:{onSubmit:function(e){e.preventDefault(),s(It(e))}},title:n,loading:r,disabled:r||o,open:t,onClose:d,callCloseWhenCancel:!1,cancelable:!0,acceptable:!0,cancelText:c,onCancel:d,acceptText:i,acceptType:"submit"},u)},Ur=function(e){void 0===e&&(e=!1);var t=he(e),n=t[0],r=t[1];return{isOpen:n,open:function(){return r(!0)},close:function(){return r(!1)},setIsOpen:r}},Yr=function(e){var t=e.drawerProviderProps,n=e.children,r=n[0],o=n[1],a=n[2];return ye.createElement(pn,ht({},t),r,o,ye.createElement(Pn,null,a))},Jr=function(){return ye.createElement(at,{color:"error",sx:{width:200,height:200}})},Xr=function(e){var t=e.loading,n=e.children,r=e.fetching,a=e.error,i=n[0],l=n[1];return ye.createElement(qt,null,ye.createElement(o,{display:"flex",flexDirection:"column",height:1},i,r&&ye.createElement(o,{width:1},ye.createElement(S,null)),t&&ye.createElement(Gt,null),a&&ye.createElement(o,{mt:4},ye.createElement(Nr,{icon:a.icon||Jr,title:a.title||"There has been an error",subtitle:a.message})),!t&&!a&&l))},Gr=function(e,t,n){var r=(void 0===n?{}:n).dense,o=e.id,a=e.name,i=e.type,l=t[o];return"boolean"===i?ye.createElement(yt,{dense:r,label:a,value:l}):"date"===i||"time"===i||"datetime"===i?ye.createElement(Et,{dense:r,label:a,value:l,format:e.format}):"object"!=typeof l||Array.isArray(l)?ye.createElement(pt,{dense:r,label:a,value:null==l?void 0:l.toString()}):ye.createElement(pt,{dense:r,label:a,value:JSON.stringify(l)})},Kr=function(e){var t=e.field,n=t.name,r=t.description,o=t.value,a=e.instance,i=e.dense,l=[{field:"id",headerName:"ID",width:70}];o.forEach((function(e){l.push({field:e.id,headerName:e.name})}));var c=a.map((function(e,t){return ht({id:t},e)}));return ye.createElement(St,{title:n,subtitle:r,dense:i},ye.createElement(s,{item:!0,xs:12},ye.createElement(it,{rows:c,columns:l,density:i?"compact":"standard",disableRowSelectionOnClick:!0,pageSizeOptions:[5],initialState:{pagination:{paginationModel:{pageSize:5}}},sx:{height:400}})))},Qr=function(e){var t=e.field,n=t.name,r=t.description,o=t.value,a=e.instance,i=e.dense,l=Tt();return ye.createElement(St,{title:n,subtitle:r,dense:i},o.map((function(e){var t=e.id,n=e.xs,r=e.sm,o=e.md,c=e.lg,u=e.xl,s=l.increment(e);return ye.createElement(Pt,{key:t,xs:n,sm:r,md:o,lg:c,xl:u,bordered:s},Gr(e,a,{dense:i}))})))},Zr=function(e){var t=e.model,n=e.instance,r=e.dense,o=Tt();return ye.createElement(s,{container:!0,spacing:r?1:2},t.fields.map((function(e){var t=e.id,a=e.type,i=e.xs,l=void 0===i?3:i,c=e.sm,u=void 0===c?0:c,d=e.md,m=void 0===d?0:d,f=e.lg,p=void 0===f?0:f,v=e.xl,y=void 0===v?0:v;if("group"===a)return o.increment({xs:12}),ye.createElement(s,{item:!0,key:t,xs:12},ye.createElement(Qr,{field:e,instance:n[t],dense:r}));if("group[]"===a)return o.increment({xs:12}),ye.createElement(s,{item:!0,key:t,xs:12},ye.createElement(Kr,{field:e,instance:n[t],dense:r}));var h=o.increment(e);return ye.createElement(Pt,{key:t,xs:l,sm:u,md:m,lg:p,xl:y,bordered:h},Gr(e,n,{dense:r}))})))},eo={string:"",number:0,boolean:!1,enum:"",multienum:[],date:new Date(1970,0,1,0,0),time:new Date(1970,0,1,0,0),datetime:new Date(1970,0,1,0,0),group:{},"group[]":[],"string[]":[],"number[]":[]},to=function(e,t){return t&&t[e.id]||"default"in e&&e.default||eo[e.type]},no=function(e,t){void 0===t&&(t=void 0);var n={};return e.fields.forEach((function(e){if("group"===e.type){var r={};e.value.forEach((function(n){r[n.id]=to(n,t&&t[e.id])})),n[e.id]=r}else n[e.id]=to(e,t)})),n},ro=function(e){var t=e.field,n=e.path,r=void 0===n?[]:n,a=e.value,i=e.dense,c=e.update,u=e.onChangeValue,d=function(e,t){e.preventDefault();var n=e.target.value;"number"===t&&"string"==typeof n?n=parseInt(e.target.value,10):t.includes("[]")&&(n=e.target.value.split(",")),u(bt(bt([],r,!0),[e.target.name],!1),n)},m=function(e,t){u(bt(bt([],r,!0),[t],!1),e)};xt({lightWeight:200,darkWeight:800});var f,p=t.id,v=t.type,y=t.name,h=t.description,g=t.updatable,b=void 0===g||g,E=t.required,x=void 0===E||E,S=t.xs,C=t.sm,w=t.md,k=t.lg,T=t.xl,I=!b&&c,O=i?"small":"medium";if("group"===v)f=ye.createElement(St,{title:y,subtitle:h,dense:i},ye.createElement(s,{container:!0,spacing:2,sx:{p:2}},t.value.map((function(e){return ye.createElement(ro,{key:e.id,field:e,dense:i,path:bt(bt([],r,!0),[p],!1),value:a[e.id],update:c,onChangeValue:u})}))));else if("boolean"===v)f=ye.createElement(o,{sx:{height:1,display:"flex",alignItems:"center"}},ye.createElement(de,{control:ye.createElement(me,{name:p,size:O,onChange:function(e){e.preventDefault(),u(bt(bt([],r,!0),[e.target.name],!1),e.target.checked)},checked:a,disabled:I}),label:y}));else if("enum"===v)f=ye.createElement(V,{fullWidth:!0},ye.createElement(F,{id:"".concat(p,"-select-label")},y),ye.createElement(_,{labelId:"".concat(p,"-select-label"),id:"".concat(p,"-select"),value:a,label:y,name:p,size:O,onChange:function(e){e.preventDefault(),u(bt(bt([],r,!0),[e.target.name],!1),e.target.value)},required:x,disabled:I},t.value.map((function(e){return ye.createElement(fe,{key:e,value:e},e)}))));else if("multienum"===v)f=ye.createElement(V,{fullWidth:!0},ye.createElement(F,{id:"".concat(p,"-select-label")},y),ye.createElement(_,{labelId:"".concat(p,"-select-label"),id:"".concat(p,"-select"),value:a||[],renderValue:function(e){return e.join(", ")},label:y,name:p,size:O,onChange:function(e){e.preventDefault();var t=e.target.value,n="string"==typeof t?t.split(","):t;u(bt(bt([],r,!0),[e.target.name],!1),n)},required:x,disabled:I,multiple:!0},t.value.map((function(e){return ye.createElement(fe,{key:e,value:e},ye.createElement(me,{checked:(a||[]).includes(e)}),ye.createElement(R,{primary:e}))}))));else if("date"===v)f=ye.createElement(Ve,{label:y,format:t.format,value:a,slotProps:{field:{size:O}},disabled:I,onChange:function(e){return m(e,p)}});else if("time"===v)f=ye.createElement(We,{label:y,format:t.format,value:a,slotProps:{field:{size:O}},disabled:I,onChange:function(e){return m(e,p)}});else if("datetime"===v)f=ye.createElement(Ae,{label:y,format:t.format,value:a,slotProps:{field:{size:O}},disabled:I,onChange:function(e){return m(e,p)}});else{if("group[]"===v)return null;f=v.includes("[]")?ye.createElement(l,{required:x,type:"text",label:y,name:p,size:O,variant:"outlined",helperText:"Use comas to separate multiple values",fullWidth:!0,disabled:I,value:a.join(","),onChange:function(e){return d(e,v)}}):ye.createElement(l,{required:x,type:v,label:y,size:O,name:p,variant:"outlined",fullWidth:!0,value:a,disabled:I,onChange:function(e){return d(e,v)}})}return ye.createElement(s,{item:!0,key:p,xs:S,sm:C,md:w,lg:k,xl:T},f)};function oo(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function ao(e){return function t(n){return 0===arguments.length||oo(n)?t:e.apply(this,arguments)}}function io(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return oo(n)?t:ao((function(t){return e(n,t)}));default:return oo(n)&&oo(r)?t:oo(n)?ao((function(t){return e(t,r)})):oo(r)?ao((function(t){return e(n,t)})):e(n,r)}}}function lo(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return oo(n)?t:io((function(t,r){return e(n,t,r)}));case 2:return oo(n)&&oo(r)?t:oo(n)?io((function(t,n){return e(t,r,n)})):oo(r)?io((function(t,r){return e(n,t,r)})):ao((function(t){return e(n,r,t)}));default:return oo(n)&&oo(r)&&oo(o)?t:oo(n)&&oo(r)?io((function(t,n){return e(t,n,o)})):oo(n)&&oo(o)?io((function(t,n){return e(t,r,n)})):oo(r)&&oo(o)?io((function(t,r){return e(n,t,r)})):oo(n)?ao((function(t){return e(t,r,o)})):oo(r)?ao((function(t){return e(n,t,o)})):oo(o)?ao((function(t){return e(n,r,t)})):e(n,r,o)}}}var co=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};var uo=Number.isInteger||function(e){return e<<0===e};var so=ao((function(e){return null==e})),mo=lo((function e(t,n,r){if(0===t.length)return n;var o=t[0];if(t.length>1){var a=!so(r)&&function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}(o,r)&&"object"==typeof r[o]?r[o]:uo(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,a)}return function(e,t,n){if(uo(e)&&co(n)){var r=[].concat(n);return r[e]=t,r}var o={};for(var a in n)o[a]=n[a];return o[e]=t,o}(o,n,r)})),fo=function(e){var n=e.model,r=e.saveButtonText,o=e.dense,a=e.onSubmit,i=e.initialValues,l=we((function(){return no(n,i)}),[n,i]),c=he(l),u=c[0],d=c[1],m=function(e,t){d((function(n){return mo(e,t,n)}))};return ye.createElement(s,{container:!0,component:"form",spacing:2,onSubmit:function(e){e.preventDefault(),a(u)}},n.fields.map((function(e){return ye.createElement(ro,{key:e.id,dense:o,field:e,value:u[e.id],update:!!i,onChangeValue:m})})),ye.createElement(s,{item:!0,xs:12},ye.createElement(t,{type:"submit",variant:"contained",size:o?"small":"medium"},r)))},po=function(e,t,n){var r=n.from,o=n.to,a=ge(),i=Le();be((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},vo=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.submitUpdateItemRequest,i=e.updateItemRequest,l=e.updateItem,c=e.onSubmitUpdateItem,u=e.onRequestUpdateItem,s=Be().id,d=void 0===s?"":s,m=i.loading||a.loading;return be((function(){u(d)}),[d]),Ft({title:"Item updated",message:"The item ".concat(d," has been updated successfully"),severity:"success"},!!a.success,{from:!1,to:!0}),po("".concat(o,"/"),!!a.success,{from:!1,to:!0}),Ft({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0}),ye.createElement(Xr,{loading:m},ye.createElement(Ht,{title:"Edit ".concat(d),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"update",text:"Edit ".concat(d),link:"".concat(o,"/").concat(d,"/update")}]}),ye.createElement(Qt,null,ye.createElement(fo,{model:t,initialValues:l,saveButtonText:"Save",onSubmit:c})))},yo=function(e){var t=e.columns,n=e.options,o=e.data,a=e.onClick,i=e.search,l=e.defaultSort,c=e.defaultOrder,u=e.loading,s=bt(bt([],t,!0),[{id:"__options",label:"",disablePadding:!1,numeric:!1,sort:!1}],!1),d=ye.useState(null),m=d[0],f=d[1];return ye.createElement(ye.Fragment,null,ye.createElement(jr,{columns:s,data:o,search:i,defaultSort:l,defaultOrder:c,loading:u},(function(e){return e.map((function(e,t){return ye.createElement(Z,{key:e.id,onClick:function(){return a&&a(e)},role:"row","aria-rowindex":t,sx:{cursor:a&&"pointer"}},s.map((function(n,r){var o=n.id;return ye.createElement(ee,{role:"cell",scope:"row",key:o.toString(),"aria-rowindex":t,"aria-colindex":r},e[o])})),n&&ye.createElement(ee,null,ye.createElement(r,{"data-testid":"options-".concat(e.id),onClick:function(t){t.stopPropagation(),f({item:e,anchor:t.currentTarget})}},ye.createElement(lt,null))))}))})),n&&ye.createElement(pe,{anchorEl:null==m?void 0:m.anchor,open:!!m,onClose:function(){return f(null)},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},n.map((function(e){var t=e.id,n=e.label,r=e.onClick;return ye.createElement(fe,{key:t,onClick:function(){m&&r(null==m?void 0:m.item),f(null)}},n)}))))},ho=function(e){var t=e.model,n=e.modelName,r=e.listData,o=e.listRequest,a=e.deleteRequest,i=e.basePath,l=void 0===i?"":i,c=e.deleteFeature,u=void 0===c||c,s=e.updateFeature,d=void 0===s||s,m=e.addFeature,f=void 0===m||m,p=e.detailsFeature,v=void 0===p||p,y=e.onRequestList,h=e.onClickDeleteItem,g=Le();be((function(){y()}),[]),Ft({title:"Item deleted",message:"The item has been deleted successfully",severity:"success"},!!a.success,{from:!1,to:!0}),Ft({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0});var b=v?function(e){g("".concat(l,"/").concat(e.id))}:void 0,E=function(e,t){"edit"===e?g("".concat(l,"/").concat(t.id,"/update")):h(t)},x=[];d&&x.push({id:"edit",label:"Edit",onClick:function(e){return E("edit",e)}}),u&&x.push({id:"remove",label:"Remove",onClick:function(e){return E("remove",e)}});var S=[];return f&&S.push({id:"add",text:"Add",href:"".concat(l,"/add")}),ye.createElement(Xr,{loading:o.loading||a.loading},ye.createElement(Ht,{title:n,preset:"default",actions:S.length>0?S:void 0}),ye.createElement(Qt,null,ye.createElement(yo,{columns:t.fields.filter((function(e){return e.listable})).map((function(e){return{disablePadding:!1,id:e.id,label:e.name,numeric:"number"===e.type,sort:!1}})),data:r,defaultSort:t.fields[0].id,onClick:b,options:x.length>0?x:void 0})))},go=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onSubmitNewItem,i=e.newItemRequest;return Ft({message:"Item added successfully",severity:"success"},!!i.success,{from:!1,to:!0}),po("".concat(o,"/"),!!i.success,{from:!1,to:!0}),Ft({title:"We had an error",message:i.error||"",severity:"error"},!!i.error,{from:!1,to:!0}),ye.createElement(Xr,{loading:i.loading},ye.createElement(Ht,{title:"Add ".concat(n),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"add",text:"Add new ".concat(n),link:"".concat(o,"/add")}]}),ye.createElement(Qt,null,ye.createElement(fo,{model:t,saveButtonText:"Save",onSubmit:a})))},bo=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onRequestItem,i=e.itemRequest,l=e.detailsItem,c=Be().id,u=void 0===c?"":c;return be((function(){a(u)}),[u]),ye.createElement(Xr,{loading:i.loading},ye.createElement(Ht,{title:u,preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"detail",text:u,link:"".concat(o,"/").concat(u)}]}),ye.createElement(Qt,null,l&&ye.createElement(Zr,{model:t,instance:l})))},Eo=function(e){var t=e.updateFeature,n=void 0===t||t,r=e.addFeature,o=void 0===r||r,a=e.detailsFeature,i=void 0===a||a;return ye.createElement(qe,null,ye.createElement(He,{path:"",element:ye.createElement(ho,ht({},e))}),i&&ye.createElement(He,{path:":id",element:ye.createElement(bo,ht({},e))}),o&&ye.createElement(He,{path:"add",element:ye.createElement(go,ht({},e))}),n&&ye.createElement(He,{path:":id/update",element:ye.createElement(vo,ht({},e))}))},xo={idle:!0},So={loading:!0},Co={success:!0};export{br as Autocomplete,Jt as Board,Br as BootstrapDialog,zt as Bullet,Zt as CenterContainer,qr as ConfirmDialog,Qt as Content,Vr as ContentPlaceholder,Sr as DateRangeCalendar,Cr as DateRangePicker,dt as DefaultPlaceholder,dn as Drawer,Tn as DrawerAppBar,Cn as DrawerContent,en as DrawerContext,an as DrawerHeader,Yr as DrawerLayout,Pn as DrawerMain,pn as DrawerProvider,Sn as DrawerSection,vn as DrawerSubheader,Wr as EnhancedRemoteTable,jr as EnhancedTable,zr as EnhancedTableHead,Lr as ExpandableAlert,Hr as FormDialog,St as GroupValueCard,Ht as Header,Xr as HeaderLayout,xo as IdleRequest,jt as Label,Gt as LoadingArea,So as LoadingRequest,Fr as LoremIpsumPlaceholder,Yt as Markdown,fo as ModelForm,Eo as ModelRouter,Mt as NotificationCenterContext,Vt as NotificationCenterProvider,Nt as NotificationCenterProviderUndefinedError,Zr as ObjectDetails,Nr as Placeholder,Kt as QueryContainer,zn as Select,Rn as SignIn,Mr as SkeletonCard,Dr as SkeletonGrid,Co as SuccessRequest,Or as TabCard,Pr as TabCardPanel,_t as TabContext,Lt as TabContextProvider,$r as TabPanel,qt as TabProvider,yo as TableList,gr as TextField,tn as UndefinedProvider,yt as ValueBoolean,vt as ValueCard,Et as ValueDatetime,st as ValueEditButton,ct as ValueEditButtons,Pt as ValueItem,Xt as ValueLabel,Ct as ValueRating,pt as ValueText,$t as bulletClasses,yn as getDrawerItemColors,It as getFormData,kt as getRandomItem,Rt as labelClasses,Ut as markdownDefaultOptions,wt as newArrayWithSize,Tt as newBreakpointsCounter,no as newInstanceFromValuesOrZeroValue,Ur as useDialog,nn as useDrawer,ut as useEditableValueDisplay,xt as useGetDefaultThemeColor,Dt as useNotificationCenter,Ft as useNotifyWhenValueChanges,Bt as useTab,Ot as valueItemClasses};
23
+ */pr={exports:{}},"production"===process.env.NODE_ENV?pr.exports=function(){if(dr)return mr;dr=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case r:case a:case o:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case f:case m:case i:return e;default:return p}}case n:return p}}}return e=Symbol.for("react.module.reference"),mr.ContextConsumer=l,mr.ContextProvider=i,mr.Element=t,mr.ForwardRef=u,mr.Fragment=r,mr.Lazy=f,mr.Memo=m,mr.Portal=n,mr.Profiler=a,mr.StrictMode=o,mr.Suspense=s,mr.SuspenseList=d,mr.isAsyncMode=function(){return!1},mr.isConcurrentMode=function(){return!1},mr.isContextConsumer=function(e){return v(e)===l},mr.isContextProvider=function(e){return v(e)===i},mr.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},mr.isForwardRef=function(e){return v(e)===u},mr.isFragment=function(e){return v(e)===r},mr.isLazy=function(e){return v(e)===f},mr.isMemo=function(e){return v(e)===m},mr.isPortal=function(e){return v(e)===n},mr.isProfiler=function(e){return v(e)===a},mr.isStrictMode=function(e){return v(e)===o},mr.isSuspense=function(e){return v(e)===s},mr.isSuspenseList=function(e){return v(e)===d},mr.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},mr.typeOf=v,mr}():pr.exports=(fr||(fr=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var v=e.type;switch(v){case r:case a:case o:case s:case d:return v;default:var y=v&&v.$$typeof;switch(y){case c:case l:case u:case f:case m:case i:return y;default:return p}}case n:return p}}}e=Symbol.for("react.module.reference");var y=l,h=i,g=t,b=u,E=r,x=f,C=m,S=n,w=a,k=o,T=s,I=d,O=!1,P=!1;vr.ContextConsumer=y,vr.ContextProvider=h,vr.Element=g,vr.ForwardRef=b,vr.Fragment=E,vr.Lazy=x,vr.Memo=C,vr.Portal=S,vr.Profiler=w,vr.StrictMode=k,vr.Suspense=T,vr.SuspenseList=I,vr.isAsyncMode=function(e){return O||(O=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},vr.isConcurrentMode=function(e){return P||(P=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},vr.isContextConsumer=function(e){return v(e)===l},vr.isContextProvider=function(e){return v(e)===i},vr.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},vr.isForwardRef=function(e){return v(e)===u},vr.isFragment=function(e){return v(e)===r},vr.isLazy=function(e){return v(e)===f},vr.isMemo=function(e){return v(e)===m},vr.isPortal=function(e){return v(e)===n},vr.isProfiler=function(e){return v(e)===a},vr.isStrictMode=function(e){return v(e)===o},vr.isSuspense=function(e){return v(e)===s},vr.isSuspenseList=function(e){return v(e)===d},vr.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===s||t===d||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===m||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},vr.typeOf=v}()),vr),"undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),_n.exports.oneOfType([_n.exports.func,_n.exports.object]);let yr=0;const hr=ye["useId".toString()];function gr(e){if(void 0!==hr){const t=hr();return null!=e?e:t}return function(e){const[t,n]=ye.useState(e),r=e||t;return ye.useEffect((()=>{null==t&&(yr+=1,n(`mui-${yr}`))}),[t]),r}(e)}const br={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};const Er=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function xr(e,t,n,r){const o=e[t];if(null==o||!Er(o)){const e=function(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return null===e?"null":e.constructor.name;default:return t}}(o);return new RangeError(`Invalid ${r} \`${t}\` of type \`${e}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function Cr(e,t,...n){return void 0===e[t]?null:xr(e,t,...n)}function Sr(){return null}Cr.isRequired=xr,Sr.isRequired=Sr,process.env.NODE_ENV;var wr=function(t){var n,r=t.id,o=t.label,a=t.InputLabelProps,i=t.InputProps,l=t.fetching,c=t.loading,u=t.helperText,s=t.hexColor,d=t.size,m=t.fullWidth,f=t.sx,p=Et(t,["id","label","InputLabelProps","InputProps","fetching","loading","helperText","hexColor","size","fullWidth","sx"]),v=gr(r),y=u&&v?"".concat(v,"-helper-text"):void 0,h=o&&v?"".concat(v,"-label"):void 0,g=s?((n={})["& .".concat(B.notchedOutline)]={borderColor:"".concat(s," !important")},n["& .".concat(q.root)]={color:s},n["& .".concat(B.input)]={color:s},n["& .".concat(H.root)]={color:s},n["& .".concat(U.bar)]={backgroundColor:s},n["& .".concat(Y.endAdornment," .").concat(J.root)]={color:s},n):{};return he.createElement(V,{sx:g,fullWidth:m},he.createElement(F,bt({size:"small"===d?"small":"normal",id:h,htmlFor:v},a),o),he.createElement(X,bt({},i,{id:v,label:o,size:d,fullWidth:m,endAdornment:he.createElement(e,{position:"end"},null==i?void 0:i.endAdornment,c?he.createElement(x,{color:"inherit",size:20,sx:{ml:1}}):null),sx:f},p)),l&&!c&&he.createElement(C,{color:"inherit",sx:{position:"absolute",left:0,right:0,bottom:0}}),u&&he.createElement(G,{id:y},u))},kr=function(e){var t=e.label,n=e.loading,r=e.fetching,o=e.options,a=e.helperText,i=e.color,l=e.onChangeValue,c=void 0===l?function(){return null}:l,u=e.sx,s=Et(e,["label","loading","fetching","options","helperText","color","onChangeValue","sx"]),d=n||r;return he.createElement(K,bt({loading:d,options:r?[]:o,onChange:function(e,t){return c(t)}},s,{renderInput:function(e){return he.createElement(wr,bt({},e,{label:t,fullWidth:!0,fetching:r,loading:n,hexColor:i,helperText:a}))},sx:u}))},Tr=T(o,{shouldForwardProp:function(e){return"dayIsBetween"!==e&&"isFirstDay"!==e&&"isLastDay"!==e&&"isStartOfWeek"!==e&&"isEndOfWeek"!==e}})((function(e){var t=e.theme,n=e.dayIsBetween,r=e.isFirstDay,o=e.isLastDay;return bt(bt(bt({},(r||o||n)&&{borderRadius:0,backgroundColor:"".concat(t.palette.primary.light,"40"),margin:0}),r&&{borderTopLeftRadius:"50%",borderBottomLeftRadius:"50%"}),o&&{borderTopRightRadius:"50%",borderBottomRightRadius:"50%"})})),Ir=function(e){var t=e.day,n=e.dateRange,r=Et(e,["day","dateRange"]);if(null==n)return he.createElement(Ve,bt({day:t},r));var o=n[0],a=n[1],i=!!a&&ze(t,o)&&rt(t,a),l=Re(t,o),c=!!a&&Re(t,a),u=Re(t,je(t)),s=Re(t,Ae(t));return he.createElement(Tr,{dayIsBetween:i,isFirstDay:l||i&&u,isLastDay:c||i&&s,"aria-label":$e(t,"yyyy-MM-dd"),"aria-selected":i||l||c,role:"gridcell"},he.createElement(Ve,bt({},r,{day:t,selected:l||c})))},Or=function(e){var t=e.defaultValue,n=e.onValueChange,r=ge(t),o=r[0],a=r[1],i=ge(0),l=i[0],c=i[1],u=function(e,t,r){a(e),n(e,t),c(r)};return he.createElement(De,{value:null,onChange:function(e){if(e)return 1===l&&e<o[0]||0===l&&o[1]&&e>o[1]?u([e,void 0],0,1):void u([0===l?e:o[0],1===l?e:o[1]],l,0===l?1:0)},slots:{day:Ir},slotProps:{day:{dateRange:o}},"aria-label":"calendar range picker"})},Pr=function(t){var n=t.defaultValue,o=t.format,a=t.label,i=t.fullWidth,u=t.onValueChange,s=t.size,d=void 0===s?"medium":s,m=ge(!1),f=m[0],p=m[1],v=ge(n),y=v[0],h=v[1];return he.createElement(he.Fragment,null,he.createElement(l,{label:a,fullWidth:i,size:d,value:"".concat($e(y[0],o)," - ").concat(y[1]?$e(y[1],o):o.toUpperCase()),InputProps:{endAdornment:he.createElement(e,{position:"end"},he.createElement(r,{onClick:function(){return p((function(e){return!e}))},"aria-label":"open calendar"},he.createElement(nt,null)))}}),he.createElement(c,null,he.createElement(j,{in:f,"aria-label":"calendar collapse"},he.createElement(Or,{defaultValue:n,onValueChange:function(e,t){h(e),u(e,t),p(t<1)}}))))},$r=function(e){var n=e.open,a=e.title,i=e.component,l=e.componentProps,c=void 0===l?{}:l,u=e.disabled,s=e.disableAccept,d=e.disableCancel,m=e.actions,f=void 0===m?[]:m,p=e.children,v=e.loading,y=e.cancelable,h=e.callCloseWhenCancel,g=void 0===h||h,b=e.acceptable,E=e.acceptText,C=void 0===E?"Accept":E,S=e.cancelText,w=void 0===S?"Cancel":S,k=e.onAccept,T=e.onCancel,I=void 0===T?function(){return null}:T,O=e.onClose,P=e.acceptType,$=void 0===P?"button":P,z=f.length>0||b||y;return he.createElement(Q,{open:n,onClose:O},he.createElement(Z,{sx:{display:"flex",alignItems:"center"}},a,v&&!b&&he.createElement(x,{size:20,sx:{ml:2,color:function(e){return e.palette.grey[500]}}}),he.createElement(r,{disabled:u,"aria-label":"close",onClick:O,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}}},he.createElement(Pe,null))),he.createElement(o,bt({component:i},c),he.createElement(ee,{dividers:!0},p),z&&he.createElement(te,null,f.map((function(e){var n=e.id,r=e.text,o=e.type,a=void 0===o?"button":o,i=e.onClick,l=e.color,c=void 0===l?"primary":l;return he.createElement(t,{key:n,type:a,disabled:u,onClick:i,color:c},r)})),y&&he.createElement(t,{color:"error",disabled:u||d,onClick:function(){I(),g&&O()}},w),b&&he.createElement(tt,{type:$,loading:v,disabled:u||s,onClick:k},C))))},zr=function(e){var t=e.open,n=e.title,r=e.loading,o=e.disabled,a=e.confirmText,i=void 0===a?"Confirm":a,c=e.cancelText,u=void 0===c?"Cancel":c,s=e.passphrase,d=e.children,m=e.onConfirm,f=e.onCancel,p=ge(""),v=p[0],y=p[1],h=!s||v===s;return he.createElement($r,{title:n,loading:r,disabled:r||o,disableAccept:!h,open:t,onClose:f,acceptable:!0,cancelable:!0,callCloseWhenCancel:!1,acceptText:i,cancelText:u,onCancel:f,onAccept:m},d,s&&he.createElement(l,{size:"small",fullWidth:!0,value:v,onChange:function(e){return y(e.target.value)},placeholder:s}))},Rr=function(e){var t=e.open,n=e.title,r=e.loading,o=e.disabled,a=e.submitText,i=void 0===a?"Submit":a,l=e.cancelText,c=void 0===l?"Cancel":l,u=e.children,s=e.onSubmit,d=e.onCancel;return he.createElement($r,{component:"form",componentProps:{onSubmit:function(e){e.preventDefault(),s(Pt(e))}},title:n,loading:r,disabled:r||o,open:t,onClose:d,callCloseWhenCancel:!1,cancelable:!0,acceptable:!0,cancelText:c,onCancel:d,acceptText:i,acceptType:"submit"},u)},jr=function(e){void 0===e&&(e=!1);var t=ge(e),n=t[0],r=t[1];return{isOpen:n,open:function(){return r(!0)},close:function(){return r(!1)},setIsOpen:r}},Ar=function(e){var r=e.variant,o=void 0===r?"primary":r,i=e.title,l=e.description,c=e.descriptionVariant,u=void 0===c?"body2":c,d=e.buttonText,m=e.helperText,f=e.helperTextVariant,p=void 0===f?"caption":f,v=e.confirmable,y=e.passphrase,h=e.confirmTitle,g=void 0===h?"":h,b=e.confirmDescription,E=void 0===b?"":b,x=e.onAction,C=jr(),S=C.isOpen,w=C.open,k=C.close,T=n().palette,I={primary:void 0,error:"error",warning:T.warning.main,success:T.success.main};return he.createElement(he.Fragment,null,he.createElement(s,{container:!0,spacing:1},he.createElement(s,{item:!0,xs:12,mb:2},he.createElement(a,{color:I[o],variant:"h4",pb:1,borderBottom:1,borderColor:"grey.300"},i)),l&&he.createElement(s,{item:!0,xs:12},he.createElement(a,{variant:u},l)),he.createElement(s,{item:!0,xs:12,mt:1},he.createElement(t,{color:o,variant:"contained",onClick:function(){v?w():x()}},d)),m&&he.createElement(s,{item:!0,xs:12},he.createElement(a,{variant:p},m))),he.createElement(zr,{open:S,title:g,passphrase:y,onCancel:k,onConfirm:function(){x()}},he.createElement(ne,null,E)))},Wr=Ce([0,function(){return null}]),Nr=Wr.Provider,Mr=T((function(e){return he.createElement(b,bt({},e,{TabIndicatorProps:{children:he.createElement("span",{className:"MuiTabs-indicatorSpan"})}}))}))((function(e){var t=e.theme;return{minHeight:t.spacing(5),"& .MuiTabs-indicator":{display:"flex",justifyContent:"center",backgroundColor:"transparent"},"& .MuiTabs-indicatorSpan":{maxWidth:40,width:"100%",backgroundColor:t.palette.primary.main}}})),Dr=T(E)((function(e){var t=e.theme;return{textTransform:"none",fontWeight:t.typography.fontWeightRegular,marginRight:t.spacing(1),color:t.palette.text.secondary,paddingTop:0,paddingBottom:0,minHeight:t.spacing(5),"&.Mui-selected":{color:t.palette.text.secondary,fontWeight:t.typography.fontWeightBold}}})),Vr=function(e){var t=e.children,n=e.tabs,r=e.initialTab,a=void 0===r?0:r,i=e.onChangeTab,l=void 0===i?function(){return null}:i,u=St(),s=ge(a),d=s[0],m=s[1];return he.createElement(Nr,{value:[d,m]},he.createElement(c,{variant:"outlined"},he.createElement(o,{bgcolor:u},he.createElement(Mr,{value:d,onChange:function(e,t){m(t),l(n[t],t)}},n.map((function(e){var t=e.text,n=e.icon;return he.createElement(Dr,{iconPosition:"start",disableRipple:!0,key:t,label:t,icon:n})})))),t))},Fr=function(e){var t=e.index,n=e.children,r=e.sx,a=Se(Wr)[0],i=a===t;return Array.isArray(t)&&(i=t.includes(a)),i?he.createElement(o,{sx:r},n):null};function _r(e){var t=e.children,n=e.index,r=Ht()[0],a=r===n;return Array.isArray(n)&&(a=n.includes(r)),he.createElement("div",{role:"tabpanel",hidden:!a,id:"simple-tabpanel-".concat(n),"aria-labelledby":"simple-tab-".concat(n)},a&&he.createElement(o,{sx:{p:3}},t))}var Lr=function(e){var t=e.order,n=e.orderBy,r=e.headCells,a=e.onRequestSort;return he.createElement(re,null,he.createElement(oe,null,r.map((function(e){return he.createElement(ae,{variant:"head",key:String(e.id),padding:e.disablePadding?"none":"normal",sortDirection:n===e.id&&t,sx:{fontWeight:"bold"}},e.sort?he.createElement(ie,{active:n===e.id,direction:n===e.id?t:"asc",onClick:(r=e.id,function(){a(r)})},e.label,n===e.id?he.createElement(o,{component:"span",sx:br},"desc"===t?"sorted descending":"sorted ascending"):null):e.label);var r}))))};function Br(e,t,n){return t[n]<e[n]?-1:t[n]>e[n]?1:0}var qr=function(t){var n=t.children,r=t.data,a=t.search,i=t.columns,c=t.defaultSort,u=t.defaultOrder,s=void 0===u?"asc":u,d=t.loading,m=void 0!==d&&d,f=ge(""),p=f[0],v=f[1],y=ge(s),h=y[0],g=y[1],b=ge(c),E=b[0],C=b[1],S=r.slice().filter(function(e,t){return function(n){return!t||e.some((function(e){var r=n[e.id];return(null==r?void 0:r.toLowerCase)&&(r=r.toLowerCase()),null==r?void 0:r.toString().includes(t.toLowerCase())}))}}(i,p)).sort(function(e,t){return"desc"===e?function(e,n){return Br(e,n,t)}:function(e,n){return-Br(e,n,t)}}(h,E));return he.createElement(he.Fragment,null,he.createElement(o,{sx:{paddingX:1,paddingBottom:2}},a&&he.createElement(o,{paddingY:2},he.createElement(l,{fullWidth:!0,placeholder:"Search",InputProps:{role:"search",startAdornment:he.createElement(e,{position:"start"},he.createElement(ot,null))},onChange:function(e){return v(e.target.value)}})),he.createElement(le,null,he.createElement(ce,null,he.createElement(Lr,{order:h,orderBy:E,headCells:i,onRequestSort:function(e){g(E===e&&"asc"===h?"desc":"asc"),C(e)}}),he.createElement(ue,null,m?he.createElement(oe,null,he.createElement(ae,{colSpan:i.length,sx:{textAlign:"center"}},he.createElement(x,null))):0===S.length?he.createElement(oe,null,he.createElement(ae,{colSpan:i.length,sx:{textAlign:"center"}},"No data")):n(S))))))};qr.defaultProps={defaultOrder:"asc"};var Hr,Ur=function(e){var t=e.children,n=e.data,r=e.loading,o=e.columns,a=e.defaultSort,i=e.defaultOrder,l=e.onRequestSort,c=ge({orderBy:a,order:i||"asc"}),u=c[0],s=c[1];return he.createElement(he.Fragment,null,he.createElement(le,null,he.createElement(ce,null,he.createElement(Lr,{order:u.order,orderBy:u.orderBy,headCells:o,onRequestSort:function(e){s((function(t){var n=t.orderBy,r=t.order,o=n===e&&"asc"===r?"desc":"asc";return l(e,o),{orderBy:e,order:o}}))}}),he.createElement(ue,null,r?he.createElement(oe,null,he.createElement(ae,{colSpan:o.length,sx:{textAlign:"center"}},he.createElement(x,null))):n.map((function(e,n){return t(e,n)}))))))},Yr=function(e){var n=e.title,r=e.subtitle,i=e.icon,l=e.iconSize,c=void 0===l?200:l,u=e.actions;return he.createElement(o,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center"},i&&i({size:c,color:"primary"}),he.createElement(a,{variant:"h4",role:"heading","aria-level":1},n),he.createElement(a,{variant:"subtitle1",role:"heading","aria-level":2,sx:{mt:2}},r),u&&he.createElement(o,{sx:{pt:2}},u.map((function(e,n){var r=e.id,o=e.text,a=e.href,i=e.onClick;return he.createElement(t,{key:r,role:"button",variant:"contained",href:a,onClick:i,sx:{mr:n<u.length-1?2:0}},o)}))))},Jr=function(e){var t=e.width,n=void 0===t?"100%":t,r=e.animation,a=void 0!==r&&r;return he.createElement(o,{width:n},he.createElement(se,{animation:a,variant:"rectangular",height:118}),he.createElement(se,{animation:a,variant:"rectangular",height:16,sx:{my:1}}),he.createElement(se,{animation:a,variant:"rectangular",width:"80%",height:16}))},Xr=function(e){var t=e.size,n=void 0===t?20:t;return he.createElement(s,{container:!0,spacing:2},Tt(n,0).map((function(e,t){return he.createElement(s,{item:!0,key:t,xs:4},he.createElement(Jr,{width:1}))})))},Gr=function(e){var t=e.size,n=void 0===t?20:t,r=e.children,o=e.p;return he.createElement(h,{component:"main",sx:{p:o},"data-testid":"content-placeholder-test"},r,he.createElement(Xr,{size:n}))},Kr=function(e){var t=e.count,n=void 0===t?3:t,r=e.units,o=void 0===r?"paragraph":r,i=e.variant,l=void 0===i?"body1":i;return he.createElement(a,{variant:l},at({count:n,units:o}))},Qr=((Hr={})["& .".concat(de.message)]={width:1},Hr),Zr=xe((function(e,t){var n=e.severity,a=e.iconMapping,i=e.title,l=e.message,c=e.metadata,u=e.metadataComponent,s=e.onClose,d=e.sx,m=void 0===d?{}:d,f=ge(!1),p=f[0],h=f[1];return he.createElement(v,{ref:t,severity:n,iconMapping:a,onClose:s,action:he.createElement(o,{display:"flex",flexDirection:"column"},he.createElement(r,{color:"inherit",onClick:s},he.createElement(Pe,{fontSize:"small"})),c&&he.createElement(r,{color:"inherit",onClick:function(){return h((function(e){return!e}))}},p?he.createElement(it,{fontSize:"small"}):he.createElement(Qe,{fontSize:"small"}))),sx:bt(bt({},Qr),m)},he.createElement(o,{sx:{w:1}},i&&he.createElement(y,null,i),l,c&&he.createElement(j,{in:p,sx:{mt:2}},he.createElement(Gt,{content:c},u))))})),eo=function(e){var t=e.drawerProviderProps,n=e.children,r=n[0],o=n[1],a=n[2];return he.createElement(En,bt({},t),r,o,he.createElement(Wn,null,a))},to=function(){return he.createElement(lt,{color:"error",sx:{width:200,height:200}})},no=function(e){var t=e.loading,n=e.children,r=e.fetching,a=e.error,i=n[0],l=n[1];return he.createElement(Ut,null,he.createElement(o,{display:"flex",flexDirection:"column",height:1},i,r&&he.createElement(o,{width:1},he.createElement(C,null)),t&&he.createElement(Qt,null),a&&he.createElement(o,{mt:4},he.createElement(Yr,{icon:a.icon||to,title:a.title||"There has been an error",subtitle:a.message})),!t&&!a&&l))},ro=function(e,t,n){var r=(void 0===n?{}:n).dense,o=e.id,a=e.name,i=e.type,l=t[o];return"boolean"===i?he.createElement(gt,{dense:r,label:a,value:l}):"date"===i||"time"===i||"datetime"===i?he.createElement(Ct,{dense:r,label:a,value:l,format:e.format}):"object"!=typeof l||Array.isArray(l)?he.createElement(yt,{dense:r,label:a,value:null==l?void 0:l.toString()}):he.createElement(yt,{dense:r,label:a,value:JSON.stringify(l)})},oo=function(e){var t=e.field,n=t.name,r=t.description,o=t.value,a=e.instance,i=e.dense,l=[{field:"id",headerName:"ID",width:70}];o.forEach((function(e){l.push({field:e.id,headerName:e.name})}));var c=a.map((function(e,t){return bt({id:t},e)}));return he.createElement(wt,{title:n,subtitle:r,dense:i},he.createElement(s,{item:!0,xs:12},he.createElement(ct,{rows:c,columns:l,density:i?"compact":"standard",disableRowSelectionOnClick:!0,pageSizeOptions:[5],initialState:{pagination:{paginationModel:{pageSize:5}}},sx:{height:400}})))},ao=function(e){var t=e.field,n=t.name,r=t.description,o=t.value,a=e.instance,i=e.dense,l=Ot();return he.createElement(wt,{title:n,subtitle:r,dense:i},o.map((function(e){var t=e.id,n=e.xs,r=e.sm,o=e.md,c=e.lg,u=e.xl,s=l.increment(e);return he.createElement(zt,{key:t,xs:n,sm:r,md:o,lg:c,xl:u,bordered:s},ro(e,a,{dense:i}))})))},io=function(e){var t=e.model,n=e.instance,r=e.dense,o=Ot();return he.createElement(s,{container:!0,spacing:r?1:2},t.fields.map((function(e){var t=e.id,a=e.type,i=e.xs,l=void 0===i?3:i,c=e.sm,u=void 0===c?0:c,d=e.md,m=void 0===d?0:d,f=e.lg,p=void 0===f?0:f,v=e.xl,y=void 0===v?0:v;if("group"===a)return o.increment({xs:12}),he.createElement(s,{item:!0,key:t,xs:12},he.createElement(ao,{field:e,instance:n[t],dense:r}));if("group[]"===a)return o.increment({xs:12}),he.createElement(s,{item:!0,key:t,xs:12},he.createElement(oo,{field:e,instance:n[t],dense:r}));var h=o.increment(e);return he.createElement(zt,{key:t,xs:l,sm:u,md:m,lg:p,xl:y,bordered:h},ro(e,n,{dense:r}))})))},lo={string:"",number:0,boolean:!1,enum:"",multienum:[],date:new Date(1970,0,1,0,0),time:new Date(1970,0,1,0,0),datetime:new Date(1970,0,1,0,0),group:{},"group[]":[],"string[]":[],"number[]":[]},co=function(e,t){return t&&t[e.id]||"default"in e&&e.default||lo[e.type]},uo=function(e,t){void 0===t&&(t=void 0);var n={};return e.fields.forEach((function(e){if("group"===e.type){var r={};e.value.forEach((function(n){r[n.id]=co(n,t&&t[e.id])})),n[e.id]=r}else n[e.id]=co(e,t)})),n},so=function(e){var t=e.field,n=e.path,r=void 0===n?[]:n,a=e.value,i=e.dense,c=e.update,u=e.onChangeValue,d=function(e,t){e.preventDefault();var n=e.target.value;"number"===t&&"string"==typeof n?n=parseInt(e.target.value,10):t.includes("[]")&&(n=e.target.value.split(",")),u(xt(xt([],r,!0),[e.target.name],!1),n)},m=function(e,t){u(xt(xt([],r,!0),[t],!1),e)};St({lightWeight:200,darkWeight:800});var f,p=t.id,v=t.type,y=t.name,h=t.description,g=t.updatable,b=void 0===g||g,E=t.required,x=void 0===E||E,C=t.xs,S=t.sm,w=t.md,T=t.lg,I=t.xl,O=!b&&c,P=i?"small":"medium";if("group"===v)f=he.createElement(wt,{title:y,subtitle:h,dense:i},he.createElement(s,{container:!0,spacing:2,sx:{p:2}},t.value.map((function(e){return he.createElement(so,{key:e.id,field:e,dense:i,path:xt(xt([],r,!0),[p],!1),value:a[e.id],update:c,onChangeValue:u})}))));else if("boolean"===v)f=he.createElement(o,{sx:{height:1,display:"flex",alignItems:"center"}},he.createElement(me,{control:he.createElement(fe,{name:p,size:P,onChange:function(e){e.preventDefault(),u(xt(xt([],r,!0),[e.target.name],!1),e.target.checked)},checked:a,disabled:O}),label:y}));else if("enum"===v)f=he.createElement(V,{fullWidth:!0},he.createElement(F,{id:"".concat(p,"-select-label")},y),he.createElement(_,{labelId:"".concat(p,"-select-label"),id:"".concat(p,"-select"),value:a,label:y,name:p,size:P,onChange:function(e){e.preventDefault(),u(xt(xt([],r,!0),[e.target.name],!1),e.target.value)},required:x,disabled:O},t.value.map((function(e){return he.createElement(pe,{key:e,value:e},e)}))));else if("multienum"===v)f=he.createElement(V,{fullWidth:!0},he.createElement(F,{id:"".concat(p,"-select-label")},y),he.createElement(_,{labelId:"".concat(p,"-select-label"),id:"".concat(p,"-select"),value:a||[],renderValue:function(e){return e.join(", ")},label:y,name:p,size:P,onChange:function(e){e.preventDefault();var t=e.target.value,n="string"==typeof t?t.split(","):t;u(xt(xt([],r,!0),[e.target.name],!1),n)},required:x,disabled:O,multiple:!0},t.value.map((function(e){return he.createElement(pe,{key:e,value:e},he.createElement(fe,{checked:(a||[]).includes(e)}),he.createElement(k,{primary:e}))}))));else if("date"===v)f=he.createElement(Fe,{label:y,format:t.format,value:a,slotProps:{field:{size:P}},disabled:O,onChange:function(e){return m(e,p)}});else if("time"===v)f=he.createElement(Ne,{label:y,format:t.format,value:a,slotProps:{field:{size:P}},disabled:O,onChange:function(e){return m(e,p)}});else if("datetime"===v)f=he.createElement(We,{label:y,format:t.format,value:a,slotProps:{field:{size:P}},disabled:O,onChange:function(e){return m(e,p)}});else{if("group[]"===v)return null;f=v.includes("[]")?he.createElement(l,{required:x,type:"text",label:y,name:p,size:P,variant:"outlined",helperText:"Use comas to separate multiple values",fullWidth:!0,disabled:O,value:a.join(","),onChange:function(e){return d(e,v)}}):he.createElement(l,{required:x,type:v,label:y,size:P,name:p,variant:"outlined",fullWidth:!0,value:a,disabled:O,onChange:function(e){return d(e,v)}})}return he.createElement(s,{item:!0,key:p,xs:C,sm:S,md:w,lg:T,xl:I},f)};function mo(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function fo(e){return function t(n){return 0===arguments.length||mo(n)?t:e.apply(this,arguments)}}function po(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return mo(n)?t:fo((function(t){return e(n,t)}));default:return mo(n)&&mo(r)?t:mo(n)?fo((function(t){return e(t,r)})):mo(r)?fo((function(t){return e(n,t)})):e(n,r)}}}function vo(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return mo(n)?t:po((function(t,r){return e(n,t,r)}));case 2:return mo(n)&&mo(r)?t:mo(n)?po((function(t,n){return e(t,r,n)})):mo(r)?po((function(t,r){return e(n,t,r)})):fo((function(t){return e(n,r,t)}));default:return mo(n)&&mo(r)&&mo(o)?t:mo(n)&&mo(r)?po((function(t,n){return e(t,n,o)})):mo(n)&&mo(o)?po((function(t,n){return e(t,r,n)})):mo(r)&&mo(o)?po((function(t,r){return e(n,t,r)})):mo(n)?fo((function(t){return e(t,r,o)})):mo(r)?fo((function(t){return e(n,t,o)})):mo(o)?fo((function(t){return e(n,r,t)})):e(n,r,o)}}}var yo=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};var ho=Number.isInteger||function(e){return e<<0===e};var go=fo((function(e){return null==e})),bo=vo((function e(t,n,r){if(0===t.length)return n;var o=t[0];if(t.length>1){var a=!go(r)&&function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}(o,r)&&"object"==typeof r[o]?r[o]:ho(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,a)}return function(e,t,n){if(ho(e)&&yo(n)){var r=[].concat(n);return r[e]=t,r}var o={};for(var a in n)o[a]=n[a];return o[e]=t,o}(o,n,r)})),Eo=function(e){var n=e.model,r=e.saveButtonText,o=e.dense,a=e.onSubmit,i=e.initialValues,l=ke((function(){return uo(n,i)}),[n,i]),c=ge(l),u=c[0],d=c[1],m=function(e,t){d((function(n){return bo(e,t,n)}))};return he.createElement(s,{container:!0,component:"form",spacing:2,onSubmit:function(e){e.preventDefault(),a(u)}},n.fields.map((function(e){return he.createElement(so,{key:e.id,dense:o,field:e,value:u[e.id],update:!!i,onChangeValue:m})})),he.createElement(s,{item:!0,xs:12},he.createElement(t,{type:"submit",variant:"contained",size:o?"small":"medium"},r)))},xo=function(e,t,n){var r=n.from,o=n.to,a=be(),i=Be();Ee((function(){a.current===r&&t===o&&i(e),a.current=t}),[t])},Co=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.submitUpdateItemRequest,i=e.updateItemRequest,l=e.updateItem,c=e.onSubmitUpdateItem,u=e.onRequestUpdateItem,s=qe().id,d=void 0===s?"":s,m=i.loading||a.loading;return Ee((function(){u(d)}),[d]),Lt({title:"Item updated",message:"The item ".concat(d," has been updated successfully"),severity:"success"},!!a.success,{from:!1,to:!0}),xo("".concat(o,"/"),!!a.success,{from:!1,to:!0}),Lt({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0}),he.createElement(no,{loading:m},he.createElement(Yt,{title:"Edit ".concat(d),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"update",text:"Edit ".concat(d),link:"".concat(o,"/").concat(d,"/update")}]}),he.createElement(en,null,he.createElement(Eo,{model:t,initialValues:l,saveButtonText:"Save",onSubmit:c})))},So=function(e){var t=e.columns,n=e.options,o=e.data,a=e.onClick,i=e.search,l=e.defaultSort,c=e.defaultOrder,u=e.loading,s=xt(xt([],t,!0),[{id:"__options",label:"",disablePadding:!1,numeric:!1,sort:!1}],!1),d=he.useState(null),m=d[0],f=d[1];return he.createElement(he.Fragment,null,he.createElement(qr,{columns:s,data:o,search:i,defaultSort:l,defaultOrder:c,loading:u},(function(e){return e.map((function(e,t){return he.createElement(oe,{key:e.id,onClick:function(){return a&&a(e)},role:"row","aria-rowindex":t,sx:{cursor:a&&"pointer"}},s.map((function(n,r){var o=n.id;return he.createElement(ae,{role:"cell",scope:"row",key:o.toString(),"aria-rowindex":t,"aria-colindex":r},e[o])})),n&&he.createElement(ae,null,he.createElement(r,{"data-testid":"options-".concat(e.id),onClick:function(t){t.stopPropagation(),f({item:e,anchor:t.currentTarget})}},he.createElement(ut,null))))}))})),n&&he.createElement(ve,{anchorEl:null==m?void 0:m.anchor,open:!!m,onClose:function(){return f(null)},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},n.map((function(e){var t=e.id,n=e.label,r=e.onClick;return he.createElement(pe,{key:t,onClick:function(){m&&r(null==m?void 0:m.item),f(null)}},n)}))))},wo=function(e){var t=e.model,n=e.modelName,r=e.listData,o=e.listRequest,a=e.deleteRequest,i=e.basePath,l=void 0===i?"":i,c=e.deleteFeature,u=void 0===c||c,s=e.updateFeature,d=void 0===s||s,m=e.addFeature,f=void 0===m||m,p=e.detailsFeature,v=void 0===p||p,y=e.onRequestList,h=e.onClickDeleteItem,g=Be();Ee((function(){y()}),[]),Lt({title:"Item deleted",message:"The item has been deleted successfully",severity:"success"},!!a.success,{from:!1,to:!0}),Lt({title:"We had an error",message:a.error||"",severity:"error"},!!a.error,{from:!1,to:!0});var b=v?function(e){g("".concat(l,"/").concat(e.id))}:void 0,E=function(e,t){"edit"===e?g("".concat(l,"/").concat(t.id,"/update")):h(t)},x=[];d&&x.push({id:"edit",label:"Edit",onClick:function(e){return E("edit",e)}}),u&&x.push({id:"remove",label:"Remove",onClick:function(e){return E("remove",e)}});var C=[];return f&&C.push({id:"add",text:"Add",href:"".concat(l,"/add")}),he.createElement(no,{loading:o.loading||a.loading},he.createElement(Yt,{title:n,preset:"default",actions:C.length>0?C:void 0}),he.createElement(en,null,he.createElement(So,{columns:t.fields.filter((function(e){return e.listable})).map((function(e){return{disablePadding:!1,id:e.id,label:e.name,numeric:"number"===e.type,sort:!1}})),data:r,defaultSort:t.fields[0].id,onClick:b,options:x.length>0?x:void 0})))},ko=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onSubmitNewItem,i=e.newItemRequest;return Lt({message:"Item added successfully",severity:"success"},!!i.success,{from:!1,to:!0}),xo("".concat(o,"/"),!!i.success,{from:!1,to:!0}),Lt({title:"We had an error",message:i.error||"",severity:"error"},!!i.error,{from:!1,to:!0}),he.createElement(no,{loading:i.loading},he.createElement(Yt,{title:"Add ".concat(n),preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"add",text:"Add new ".concat(n),link:"".concat(o,"/add")}]}),he.createElement(en,null,he.createElement(Eo,{model:t,saveButtonText:"Save",onSubmit:a})))},To=function(e){var t=e.model,n=e.modelName,r=e.basePath,o=void 0===r?"":r,a=e.onRequestItem,i=e.itemRequest,l=e.detailsItem,c=qe().id,u=void 0===c?"":c;return Ee((function(){a(u)}),[u]),he.createElement(no,{loading:i.loading},he.createElement(Yt,{title:u,preset:"default",breadcrumbs:[{id:"list",text:n,link:"".concat(o,"/")},{id:"detail",text:u,link:"".concat(o,"/").concat(u)}]}),he.createElement(en,null,l&&he.createElement(io,{model:t,instance:l})))},Io=function(e){var t=e.updateFeature,n=void 0===t||t,r=e.addFeature,o=void 0===r||r,a=e.detailsFeature,i=void 0===a||a;return he.createElement(He,null,he.createElement(Ue,{path:"",element:he.createElement(wo,bt({},e))}),i&&he.createElement(Ue,{path:":id",element:he.createElement(To,bt({},e))}),o&&he.createElement(Ue,{path:"add",element:he.createElement(ko,bt({},e))}),n&&he.createElement(Ue,{path:":id/update",element:he.createElement(Co,bt({},e))}))},Oo={idle:!0},Po={loading:!0},$o={success:!0};export{Ar as Action,kr as Autocomplete,Gt as Board,$r as BootstrapDialog,jt as Bullet,tn as CenterContainer,zr as ConfirmDialog,en as Content,Gr as ContentPlaceholder,Or as DateRangeCalendar,Pr as DateRangePicker,ft as DefaultPlaceholder,hn as Drawer,Rn as DrawerAppBar,Pn as DrawerContent,ln as DrawerContext,mn as DrawerHeader,eo as DrawerLayout,Wn as DrawerMain,En as DrawerProvider,On as DrawerSection,xn as DrawerSubheader,Ur as EnhancedRemoteTable,qr as EnhancedTable,Lr as EnhancedTableHead,Zr as ExpandableAlert,Rr as FormDialog,wt as GroupValueCard,Yt as Header,no as HeaderLayout,Oo as IdleRequest,Wt as Label,an as ListPanel,nn as ListPanelContext,rn as ListPanelContextProvider,Qt as LoadingArea,Po as LoadingRequest,Kr as LoremIpsumPlaceholder,Xt as Markdown,Eo as ModelForm,Io as ModelRouter,Vt as NotificationCenterContext,_t as NotificationCenterProvider,Dt as NotificationCenterProviderUndefinedError,io as ObjectDetails,Yr as Placeholder,Zt as QueryContainer,Mn as Select,Dn as SignIn,Jr as SkeletonCard,Xr as SkeletonGrid,$o as SuccessRequest,Vr as TabCard,Fr as TabCardPanel,Bt as TabContext,qt as TabContextProvider,_r as TabPanel,Ut as TabProvider,So as TableList,wr as TextField,cn as UndefinedProvider,gt as ValueBoolean,ht as ValueCard,Ct as ValueDatetime,mt as ValueEditButton,st as ValueEditButtons,zt as ValueItem,Kt as ValueLabel,kt as ValueRating,yt as ValueText,Rt as bulletClasses,Cn as getDrawerItemColors,Pt as getFormData,It as getRandomItem,At as labelClasses,Jt as markdownDefaultOptions,Tt as newArrayWithSize,Ot as newBreakpointsCounter,uo as newInstanceFromValuesOrZeroValue,jr as useDialog,un as useDrawer,dt as useEditableValueDisplay,St as useGetDefaultThemeColor,on as useListPanel,Ft as useNotificationCenter,Lt as useNotifyWhenValueChanges,Ht as useTab,$t as valueItemClasses};
24
24
  //# sourceMappingURL=index.js.map