@pautena/react-design-system 0.14.3 → 0.14.4

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