@applica-software-guru/react-admin 1.3.147 → 1.3.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ActionsMenu.d.ts.map +1 -1
- package/dist/components/ra-fields/ActionsField.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/Tab.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +2 -2
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +172 -170
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +2 -2
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ActionsMenu.tsx +3 -1
- package/src/components/ra-fields/ActionsField.jsx +0 -1
- package/src/components/ra-forms/LongForm/Tab.tsx +4 -1
package/dist/react-admin.cjs.js
CHANGED
|
@@ -67,7 +67,7 @@ const theme2 = createTheme({ palette: {
|
|
|
67
67
|
primary: { main: green[500] },
|
|
68
68
|
} });`:_i(12,v?` (${v})`:"",JSON.stringify(B.main)));return Um(B,"light",j,r),Um(B,"dark",x,r),B.contrastText||(B.contrastText=C(B.main)),B},m={dark:dd,light:zm};return process.env.NODE_ENV!=="production"&&(m[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),dr(W({common:W({},ga),mode:t,primary:h({color:s,name:"primary"}),secondary:h({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:u,name:"error"}),warning:h({color:p,name:"warning"}),info:h({color:A,name:"info"}),success:h({color:g,name:"success"}),grey:ej,contrastThreshold:n,getContrastText:C,augmentColor:h,tonalOffset:r},m[t]),o)}const pj=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function hj(e){return Math.round(e*1e5)/1e5}const Ym={textTransform:"uppercase"},Gm='"Roboto", "Helvetica", "Arial", sans-serif';function Cj(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=Gm,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:l=400,fontWeightMedium:u=500,fontWeightBold:A=700,htmlFontSize:g=16,allVariants:p,pxToRem:C}=n,h=Ke(n,pj);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof g!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const m=o/14,I=C||(O=>`${O/g*m}rem`),B=(O,j,x,S,P)=>W({fontFamily:r,fontWeight:O,fontSize:I(j),lineHeight:x},r===Gm?{letterSpacing:`${hj(S/j)}em`}:{},P,p),v={h1:B(s,96,1.167,-1.5),h2:B(s,60,1.2,-.5),h3:B(l,48,1.167,0),h4:B(l,34,1.235,.25),h5:B(l,24,1.334,0),h6:B(u,20,1.6,.15),subtitle1:B(l,16,1.75,.15),subtitle2:B(u,14,1.57,.1),body1:B(l,16,1.5,.15),body2:B(l,14,1.43,.15),button:B(u,14,1.75,.4,Ym),caption:B(l,12,1.66,.4),overline:B(l,12,2.66,1,Ym),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return dr(W({htmlFontSize:g,pxToRem:I,fontFamily:r,fontSize:o,fontWeightLight:s,fontWeightRegular:l,fontWeightMedium:u,fontWeightBold:A},v),h,{clone:!1})}const mj=.2,Ej=.14,Ij=.12;function xt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${mj})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ej})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Ij})`].join(",")}const Bj=["none",xt(0,2,1,-1,0,1,1,0,0,1,3,0),xt(0,3,1,-2,0,2,2,0,0,1,5,0),xt(0,3,3,-2,0,3,4,0,0,1,8,0),xt(0,2,4,-1,0,4,5,0,0,1,10,0),xt(0,3,5,-1,0,5,8,0,0,1,14,0),xt(0,3,5,-1,0,6,10,0,0,1,18,0),xt(0,4,5,-2,0,7,10,1,0,2,16,1),xt(0,5,5,-3,0,8,10,1,0,3,14,2),xt(0,5,6,-3,0,9,12,1,0,3,16,2),xt(0,6,6,-3,0,10,14,1,0,4,18,3),xt(0,6,7,-4,0,11,15,1,0,4,20,3),xt(0,7,8,-4,0,12,17,2,0,5,22,4),xt(0,7,8,-4,0,13,19,2,0,5,24,4),xt(0,7,9,-4,0,14,21,2,0,5,26,4),xt(0,8,9,-5,0,15,22,2,0,6,28,5),xt(0,8,10,-5,0,16,24,2,0,6,30,5),xt(0,8,11,-5,0,17,26,2,0,6,32,5),xt(0,9,11,-5,0,18,28,2,0,7,34,6),xt(0,9,12,-6,0,19,29,2,0,7,36,6),xt(0,10,13,-6,0,20,31,3,0,8,38,7),xt(0,10,13,-6,0,21,33,3,0,8,40,7),xt(0,10,14,-6,0,22,35,3,0,8,42,7),xt(0,11,14,-7,0,23,36,3,0,9,44,8),xt(0,11,15,-7,0,24,38,3,0,9,46,8)],vj=Bj,yj=["duration","easing","delay"],bj={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Qj={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Km(e){return`${Math.round(e)}ms`}function xj(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function wj(e){const t=W({},bj,e.easing),n=W({},Qj,e.duration);return W({getAutoHeightDuration:xj,create:(o=["all"],s={})=>{const{duration:l=n.standard,easing:u=t.easeInOut,delay:A=0}=s,g=Ke(s,yj);if(process.env.NODE_ENV!=="production"){const p=h=>typeof h=="string",C=h=>!isNaN(parseFloat(h));!p(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!C(l)&&!p(l)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${l}.`),p(u)||console.error('MUI: Argument "easing" must be a string.'),!C(A)&&!p(A)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
69
69
|
`)),Object.keys(g).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(g).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(p=>`${p} ${typeof l=="string"?l:Km(l)} ${u} ${typeof A=="string"?A:Km(A)}`).join(",")}},e,{easing:t,duration:n})}const Tj={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Pj=Tj,Sj=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Wg(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:s={}}=e,l=Ke(e,Sj);if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":_i(18));const u=fj(r),A=Lg(e);let g=dr(A,{mixins:ZO(A.breakpoints,n),palette:u,shadows:vj.slice(),typography:Cj(u,s),transitions:wj(o),zIndex:W({},Pj)});if(g=dr(g,l),g=t.reduce((p,C)=>dr(p,C),g),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],C=(h,m)=>{let I;for(I in h){const B=h[I];if(p.indexOf(I)!==-1&&Object.keys(B).length>0){if(process.env.NODE_ENV!=="production"){const v=Nt("",I);console.error([`MUI: The \`${m}\` component increases the CSS specificity of the \`${I}\` internal state.`,"You can not override it like this: ",JSON.stringify(h,null,2),"",`Instead, you need to use the '&.${v}' syntax:`,JSON.stringify({root:{[`&.${v}`]:B}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
70
|
-
`))}h[I]={}}}};Object.keys(g.components).forEach(h=>{const m=g.components[h].styleOverrides;m&&h.indexOf("Mui")===0&&C(m,h)})}return g.unstable_sxConfig=W({},eu,l==null?void 0:l.unstable_sxConfig),g.unstable_sx=function(C){return Fg({sx:C,theme:this})},g}const Rj=Wg(),zg=Rj;function Rt(){const e=L0(zg);return process.env.NODE_ENV!=="production"&&D.useDebugValue(e),e[da]||e}function Yt({props:e,name:t}){return YO({props:e,name:t,defaultTheme:zg,themeId:da})}const Ug=e=>nc(e)&&e!=="classes",Oj=H0({themeId:da,defaultTheme:zg,rootShouldForwardProp:Ug}),ue=Oj,jj=["theme"];function Y0(e){let{theme:t}=e,n=Ke(e,jj);const r=t[da];return f.jsx(mc,W({},n,{themeId:r?da:void 0,theme:r||t}))}process.env.NODE_ENV!=="production"&&(Y0.propTypes={children:c.node,theme:c.oneOfType([c.object,c.func]).isRequired});const Mj=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},qm=Mj,Dj=ue("span")(({arrow:e,theme:t})=>{const o=`solid 1px ${We(t.palette.grey[500],.12)}`,s={borderRadius:"0 0 3px 0",top:-6,borderBottom:o,borderRight:o},l={borderRadius:"3px 0 0 0",bottom:-6,borderTop:o,borderLeft:o},u={borderRadius:"0 3px 0 0",left:-6,borderTop:o,borderRight:o},A={borderRadius:"0 0 0 3px",right:-6,borderBottom:o,borderLeft:o};return{display:"none",[t.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:"''",display:"block",position:"absolute",transform:"rotate(-135deg)",background:t.palette.background.paper},...e==="top-left"&&{...s,left:20},...e==="top-center"&&{...s,left:0,right:0,margin:"auto"},...e==="top-right"&&{...s,right:20},...e==="bottom-left"&&{...l,left:20},...e==="bottom-center"&&{...l,left:0,right:0,margin:"auto"},...e==="bottom-right"&&{...l,right:20},...e==="left-top"&&{...u,top:20},...e==="left-center"&&{...u,top:0,bottom:0,margin:"auto"},...e==="left-bottom"&&{...u,bottom:20},...e==="right-top"&&{...A,top:20},...e==="right-center"&&{...A,top:0,bottom:0,margin:"auto"},...e==="right-bottom"&&{...A,bottom:20}}});function kj(e){let t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return t}const nu=({open:e,children:t,arrow:n="top-right",disabledArrow:r,sx:o,...s})=>{const{style:l,anchorOrigin:u,transformOrigin:A}=kj(n);return f.jsxs(b.Popover,{open:!!e,anchorEl:e,anchorOrigin:u,transformOrigin:A,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...l,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...o}},...s,children:[!r&&f.jsx(Dj,{arrow:n}),t]})};nu.propTypes={sx:c.object,open:c.object,children:c.node,disabledArrow:c.bool,arrow:c.oneOf(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right","left-top","left-center","left-bottom","right-top","right-center","right-bottom"])};const Fj=b.styled("div",{shouldForwardProp:e=>e!=="color"&&e!=="variant"&&e!=="sx",slot:"root",overridesResolver:(e,t)=>[t.root]})(()=>({textAlign:"right"})),Lj=b.styled(nu,{name:"ApplicaActionsMenu",slot:"root"})(({theme:e})=>({"& .MuiMenuItem-root":{padding:0,margin:0,backgroundColor:e.palette.background.paper,"& .MuiButton-startIcon":{marginRight:e.spacing(0)}}})),ai=({horizontal:e=!1,children:t})=>{const[n,r]=w.useState(null),o=l=>{l.stopPropagation(),l.preventDefault(),r(l.currentTarget)},s=w.useCallback(()
|
|
70
|
+
`))}h[I]={}}}};Object.keys(g.components).forEach(h=>{const m=g.components[h].styleOverrides;m&&h.indexOf("Mui")===0&&C(m,h)})}return g.unstable_sxConfig=W({},eu,l==null?void 0:l.unstable_sxConfig),g.unstable_sx=function(C){return Fg({sx:C,theme:this})},g}const Rj=Wg(),zg=Rj;function Rt(){const e=L0(zg);return process.env.NODE_ENV!=="production"&&D.useDebugValue(e),e[da]||e}function Yt({props:e,name:t}){return YO({props:e,name:t,defaultTheme:zg,themeId:da})}const Ug=e=>nc(e)&&e!=="classes",Oj=H0({themeId:da,defaultTheme:zg,rootShouldForwardProp:Ug}),ue=Oj,jj=["theme"];function Y0(e){let{theme:t}=e,n=Ke(e,jj);const r=t[da];return f.jsx(mc,W({},n,{themeId:r?da:void 0,theme:r||t}))}process.env.NODE_ENV!=="production"&&(Y0.propTypes={children:c.node,theme:c.oneOfType([c.object,c.func]).isRequired});const Mj=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},qm=Mj,Dj=ue("span")(({arrow:e,theme:t})=>{const o=`solid 1px ${We(t.palette.grey[500],.12)}`,s={borderRadius:"0 0 3px 0",top:-6,borderBottom:o,borderRight:o},l={borderRadius:"3px 0 0 0",bottom:-6,borderTop:o,borderLeft:o},u={borderRadius:"0 3px 0 0",left:-6,borderTop:o,borderRight:o},A={borderRadius:"0 0 0 3px",right:-6,borderBottom:o,borderLeft:o};return{display:"none",[t.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:"''",display:"block",position:"absolute",transform:"rotate(-135deg)",background:t.palette.background.paper},...e==="top-left"&&{...s,left:20},...e==="top-center"&&{...s,left:0,right:0,margin:"auto"},...e==="top-right"&&{...s,right:20},...e==="bottom-left"&&{...l,left:20},...e==="bottom-center"&&{...l,left:0,right:0,margin:"auto"},...e==="bottom-right"&&{...l,right:20},...e==="left-top"&&{...u,top:20},...e==="left-center"&&{...u,top:0,bottom:0,margin:"auto"},...e==="left-bottom"&&{...u,bottom:20},...e==="right-top"&&{...A,top:20},...e==="right-center"&&{...A,top:0,bottom:0,margin:"auto"},...e==="right-bottom"&&{...A,bottom:20}}});function kj(e){let t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return t}const nu=({open:e,children:t,arrow:n="top-right",disabledArrow:r,sx:o,...s})=>{const{style:l,anchorOrigin:u,transformOrigin:A}=kj(n);return f.jsxs(b.Popover,{open:!!e,anchorEl:e,anchorOrigin:u,transformOrigin:A,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...l,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...o}},...s,children:[!r&&f.jsx(Dj,{arrow:n}),t]})};nu.propTypes={sx:c.object,open:c.object,children:c.node,disabledArrow:c.bool,arrow:c.oneOf(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right","left-top","left-center","left-bottom","right-top","right-center","right-bottom"])};const Fj=b.styled("div",{shouldForwardProp:e=>e!=="color"&&e!=="variant"&&e!=="sx",slot:"root",overridesResolver:(e,t)=>[t.root]})(()=>({textAlign:"right"})),Lj=b.styled(nu,{name:"ApplicaActionsMenu",slot:"root"})(({theme:e})=>({"& .MuiMenuItem-root":{padding:0,margin:0,backgroundColor:e.palette.background.paper,"& .MuiButton-startIcon":{marginRight:e.spacing(0)}}})),ai=({horizontal:e=!1,children:t})=>{const[n,r]=w.useState(null),o=l=>{l.stopPropagation(),l.preventDefault(),r(l.currentTarget)},s=w.useCallback(l=>{l.stopPropagation(),l.preventDefault(),r(null)},[]);return!t||w.Children.count(t)===0||t!=null&&t.filter&&(t==null?void 0:t.filter(l=>w.isValidElement(l)).length)===0?null:f.jsxs(Fj,{children:[f.jsx(b.IconButton,{"aria-label":"more","aria-haspopup":"true",onClick:o,color:n?"inherit":"default",children:e?f.jsx(Bn.MoreHoriz,{}):f.jsx(Bn.MoreVert,{})}),f.jsx(Lj,{open:n,onClose:s,arrow:"right-top",children:w.Children.map(t,(l,u)=>w.isValidElement(l)&&f.jsx(b.MenuItem,{children:w.cloneElement(l)},u))})]})};ai.propTypes={...nu.propTypes,children:c.node.isRequired};function Nj(e){return Nt("MuiPaper",e)}Ut("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Vj=["className","component","elevation","square","variant"],Hj=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,s={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return sn(s,Nj,o)},Wj=ue("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return W({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&W({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${We("#fff",qm(t.elevation))}, ${We("#fff",qm(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),G0=D.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiPaper"}),{className:o,component:s="div",elevation:l=1,square:u=!1,variant:A="elevation"}=r,g=Ke(r,Vj),p=W({},r,{component:s,elevation:l,square:u,variant:A}),C=Hj(p);return process.env.NODE_ENV!=="production"&&Rt().shadows[l]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${l}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${l}]\` is defined.`].join(`
|
|
71
71
|
`)),f.jsx(Wj,W({as:s,ownerState:p,className:Ge(C.root,o),ref:n},g))});process.env.NODE_ENV!=="production"&&(G0.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,elevation:Tr(ea,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["elevation","outlined"]),c.string])});const Yg=G0;function zj(e){return Nt("MuiAppBar",e)}Ut("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const Uj=["className","color","enableColorOnDark","position"],Yj=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${Pe(t)}`,`position${Pe(n)}`]};return sn(o,zj,r)},Nl=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,Gj=ue(Yg,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Pe(n.position)}`],t[`color${Pe(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return W({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&W({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&W({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&W({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:Nl(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:Nl(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:Nl(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:Nl(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),K0=D.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiAppBar"}),{className:o,color:s="primary",enableColorOnDark:l=!1,position:u="fixed"}=r,A=Ke(r,Uj),g=W({},r,{color:s,position:u,enableColorOnDark:l}),p=Yj(g);return f.jsx(Gj,W({square:!0,component:"header",ownerState:g,elevation:4,className:Ge(p.root,o,u==="fixed"&&"mui-fixed"),ref:n},A))});process.env.NODE_ENV!=="production"&&(K0.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["default","inherit","primary","secondary","transparent"]),c.string]),enableColorOnDark:c.bool,position:c.oneOf(["absolute","fixed","relative","static","sticky"]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const Kj=K0,q0={openDialogs:[],getCurrentDialog:()=>null,openDialog:(e,t)=>{throw new Error(`openDialog not yet ready for: ${e}, ${t}`)},closeDialog:(e,t)=>{throw new Error(`closeDialog not yet ready for: ${e}, ${t}`)}},Gg=w.createContext(q0),Kg=({children:e})=>{const[t,n]=w.useState(q0),r=(l,u)=>{n(A=>({...A,openDialogs:[...A.openDialogs,l]})),u&&u()},o=(l,u)=>{n(A=>({...A,openDialogs:A.openDialogs.filter(g=>g!==l)})),u&&u()},s=()=>t.openDialogs.length>0?t.openDialogs[t.openDialogs.length-1]:null;return f.jsx(Gg.Provider,{value:{...t,openDialog:r,closeDialog:o,getCurrentDialog:s},children:e})};Kg.propTypes={children:c.node};const li=()=>w.useContext(Gg);var Ec={exports:{}};/**
|
|
72
72
|
* @license
|
|
73
73
|
* Lodash <https://lodash.com/>
|
|
@@ -215,7 +215,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
215
215
|
animation: ${0} 1.4s linear infinite;
|
|
216
216
|
`),z8)),K8=ue("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),q8=ue("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Pe(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>W({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&_t.css(pI||(pI=gu`
|
|
217
217
|
animation: ${0} 1.4s ease-in-out infinite;
|
|
218
|
-
`),U8)),Nv=D.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:l=!1,size:u=40,style:A,thickness:g=3.6,value:p=0,variant:C="indeterminate"}=r,h=Ke(r,W8),m=W({},r,{color:s,disableShrink:l,size:u,thickness:g,value:p,variant:C}),I=Y8(m),B={},v={},O={};if(C==="determinate"){const j=2*Math.PI*((so-g)/2);B.strokeDasharray=j.toFixed(3),O["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*j).toFixed(3)}px`,v.transform="rotate(-90deg)"}return f.jsx(G8,W({className:Ge(I.root,o),style:W({width:u,height:u},v,A),ownerState:m,ref:n,role:"progressbar"},O,h,{children:f.jsx(K8,{className:I.svg,ownerState:m,viewBox:`${so/2} ${so/2} ${so} ${so}`,children:f.jsx(q8,{className:I.circle,style:B,ownerState:m,cx:so,cy:so,r:(so-g)/2,fill:"none",strokeWidth:g})})}))});process.env.NODE_ENV!=="production"&&(Nv.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:Tr(c.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:c.oneOfType([c.number,c.string]),style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),thickness:c.number,value:c.number,variant:c.oneOf(["determinate","indeterminate"])});const Rf=Nv;function J8(e){return Nt("MuiLoadingButton",e)}const X8=Ut("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),Nr=X8,Z8=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],_8=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Pe(n)}`],endIcon:[t&&`endIconLoading${Pe(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Pe(n)}`]},s=yr.unstable_composeClasses(o,J8,r);return W({},r,s)},$8=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",eF=ue(V8,{shouldForwardProp:e=>$8(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Nr.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Nr.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>W({[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},e.loadingPosition==="center"&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${Nr.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),tF=ue("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Pe(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>W({position:"absolute",visibility:"visible",display:"flex"},t.loadingPosition==="start"&&(t.variant==="outlined"||t.variant==="contained")&&{left:t.size==="small"?10:14},t.loadingPosition==="start"&&t.variant==="text"&&{left:6},t.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},t.loadingPosition==="end"&&(t.variant==="outlined"||t.variant==="contained")&&{right:t.size==="small"?10:14},t.loadingPosition==="end"&&t.variant==="text"&&{right:6},t.loadingPosition==="start"&&t.fullWidth&&{position:"relative",left:-10},t.loadingPosition==="end"&&t.fullWidth&&{position:"relative",right:-10})),Vv=D.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiLoadingButton"}),{children:o,disabled:s=!1,id:l,loading:u=!1,loadingIndicator:A,loadingPosition:g="center",variant:p="text"}=r,C=Ke(r,Z8),h=Og(l),m=A??f.jsx(Rf,{"aria-labelledby":h,color:"inherit",size:16}),I=W({},r,{disabled:s,loading:u,loadingIndicator:m,loadingPosition:g,variant:p}),B=_8(I),v=u?f.jsx(tF,{className:B.loadingIndicator,ownerState:I,children:m}):null;return f.jsxs(eF,W({disabled:s||u,id:h,ref:n},C,{variant:p,classes:B,ownerState:I,children:[I.loadingPosition==="end"?o:v,I.loadingPosition==="end"?v:o]}))});process.env.NODE_ENV!=="production"&&(Vv.propTypes={children:c.node,classes:c.object,disabled:c.bool,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:Tr(c.oneOf(["start","end","center"]),e=>e.loadingPosition==="start"&&!e.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):e.loadingPosition==="end"&&!e.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});const nF=Vv;function xd({variant:e,theme:t,color:n,loadingPosition:r}){const o=an(t,n),{lighter:s,main:l,dark:u,contrastText:A}=o,g=`${n}Button`,p=gs(t,g),C={"& .MuiLoadingButton-loadingIndicator":{color:l}},h={...r&&r!=="center"&&{color:l}},m={"&::after":{boxShadow:`0 0 6px 6px ${We(l,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${We(l,.9)}`},"&:focus-visible":{outline:`2px solid ${u}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"light":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"shadow":return{boxShadow:p,backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:u,color:A},...m};case"outlined":return{backgroundColor:"transparent",borderColor:l,...h,...C};case"dashed":return{backgroundColor:s,borderColor:l,...h,...C,...m};case"text":default:return{color:l,...C,...m}}}const rF=ue(nF,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:o,loadingPosition:s})=>({"::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:n==="rounded"?"50%":4,opacity:0,transition:"all 0.5s"},":active::after":{position:"absolute",borderRadius:n==="rounded"?"50%":4,left:0,top:0,opacity:1,transition:"0s"},...t==="text"&&{...xd({variant:t,theme:e,color:r,loadingPosition:s}),"&.MuiButton-sizeMedium":{height:36},"&.MuiButton-sizeSmall":{height:30},"&.MuiButton-sizeLarge":{height:44}},...n&&{minWidth:0,"&.MuiButton-sizeMedium":{width:36,height:36},"&.MuiButton-sizeSmall":{width:30,height:30},"&.MuiButton-sizeLarge":{width:44,height:44},...n==="rounded"&&{borderRadius:"50%"}},...t==="outlined"&&{border:"1px solid"},...t==="dashed"&&{border:"1px dashed"},...(t==="contained"||t==="shadow")&&!o&&{color:"#fff"},...t!=="text"&&{...xd({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{...xd({variant:t,theme:e,color:r,loadingPosition:s})}}})),Of=w.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...o},s)=>{const l=Rt();return f.jsx(rF,{ref:s,variant:e,shape:t,theme:l,loadingPosition:o.loadingPosition,loading:o.loading,color:r,...o,children:n})});Of.propTypes={variant:c.string,shape:c.string,children:c.node,color:c.string};Of.displayName="LoadingButton";function oF({color:e,theme:t,labelColor:n}){const r=an(t,e),{main:o,contrastText:s}=r;let l=e||"";return["primary","secondary","info","success","warning","error"].includes(l)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:o,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:o}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:l,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:l}}}const iF=ue(({className:e,...t})=>f.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&oF({color:t,theme:e,labelColor:n})}));function Hv({children:e,arrow:t,labelColor:n="",...r}){const o=Rt();return f.jsx(b.Box,{display:"flex",children:f.jsx(iF,{arrow:t,...r,theme:o,labelColor:n,children:e})})}Hv.propTypes={children:c.element,arrow:c.bool,labelColor:c.string,rest:c.array};const yo=w.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...o},s)=>{let l={transformOrigin:"0 0 0"};switch(t){case"top-right":l={transformOrigin:"top right"};break;case"top":l={transformOrigin:"top"};break;case"bottom-left":l={transformOrigin:"bottom left"};break;case"bottom-right":l={transformOrigin:"bottom right"};break;case"bottom":l={transformOrigin:"bottom"};break;case"top-left":default:l={transformOrigin:"0 0 0"};break}return f.jsxs(b.Box,{ref:s,children:[n==="grow"&&f.jsx(b.Grow,{...o,timeout:{appear:0,enter:150,exit:150},children:f.jsx(b.Box,{sx:l,children:e})}),n==="collapse"&&f.jsx(b.Collapse,{...o,sx:l,children:e}),n==="fade"&&f.jsx(b.Fade,{...o,timeout:{appear:0,enter:300,exit:150},children:f.jsx(b.Box,{sx:l,children:e})}),n==="slide"&&f.jsx(b.Slide,{...o,timeout:{appear:0,enter:150,exit:150},direction:r,children:f.jsx(b.Box,{sx:l,children:e})}),n==="zoom"&&f.jsx(b.Zoom,{...o,children:f.jsx(b.Box,{sx:l,children:e})})]})});yo.propTypes={children:c.node,type:c.oneOf(["grow","fade","collapse","slide","zoom"]),position:c.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:c.oneOf(["up","down","left","right"])};w.forwardRef(function(t,n){return f.jsx(b.Zoom,{ref:n,timeout:200,...t})});function Wv({value:e,...t}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Wv.propTypes={value:c.number};function zv({value:e,size:t,variant:n,thickness:r,showLabel:o,pathColor:s,sx:l,...u}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",sx:{color:s||"grey.200"},size:t,thickness:r,...u,value:100}),o&&f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),f.jsx(b.CircularProgress,{variant:n,sx:{...l,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...u})]})}zv.propTypes={value:c.number,size:c.number,variant:c.string,thickness:c.number,showLabel:c.bool,pathColor:c.string,sx:c.array,others:c.array};function Uv({icon:e,value:t,...n}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),f.jsx(b.Box,{sx:{minWidth:35},children:e})]})}Uv.propTypes={icon:c.node,value:c.number};function Yv({value:e,...t}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),f.jsx(b.Box,{sx:{minWidth:35},children:f.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Yv.propTypes={value:c.number};const Gv=w.createContext({});function sF(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=R.useResourceContext(),o=R.useDataProvider(),{search:s}=Zi.useLocation(),l=`${r}/new`,u=w.useCallback(()=>{if(!t||!Ce.isFunction(o.get))return Promise.resolve({});const h={};return new URLSearchParams(s??"").forEach((m,I)=>{h[I]=m}),o.get(l,h).then(m=>m.data).then(m=>{const{responseCode:I,value:B}=m;return I==="ok"?B:Promise.reject(m)})},[r,t,s,o]),A=w.useMemo(()=>Ce.chain(n).extend({queryKey:[r,s],queryFn:u}).value(),[r,s,u,n]),{data:g,isLoading:p}=Pg.useQuery(A),C=Ce.omit(e,["useDefaults"]);return p?f.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:f.jsx(b.CircularProgress,{})}):f.jsx(Gv.Provider,{value:g??{},children:f.jsx(R.Create,{...C})})}function aF(){return w.useContext(Gv)}const lF=ue(sF,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main>.MuiPaper-root:first-of-type":{overflow:"visible",backgroundColor:e.palette.background.default}})),cF=Ta(R.Toolbar,{name:"RaApplicaToolbar",slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}})),fr=e=>f.jsx(cF,{...e});fr.defaultProps={...R.Toolbar.defaultProps};fr.propTypes={...R.Toolbar.propTypes};const jf=({children:e,content:t,title:n,subheader:r,secondary:o,toolbar:s,...l})=>{const u=R.useTranslate(),A=R.useResourceContext(),{cardTitle:g,cardSubheader:p}=w.useMemo(()=>{const C=n||`resources.${A}.title`;return{cardTitle:u(C,{_:C}),cardSubheader:r!==null?u(r,{_:r}):null}},[A,r,n,u]);return f.jsx(b.Grid,{item:!0,...l,children:f.jsx(Xn,{content:t,title:g,subheader:p,secondary:o,divider:!0,children:f.jsxs(w.Fragment,{children:[e,s===!0?f.jsx(fr,{children:f.jsx(R.SaveButton,{})}):s]})})})};jf.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12};jf.propTypes={...b.Grid.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),contained:c.bool,content:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object]),spacing:c.number,toolbar:c.oneOfType([c.node,c.bool])};const uF=ue(R.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),fu=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:o}=Fn();return f.jsx(uF,{defaultValues:n,spacing:t||o,children:f.jsx(b.Grid,{container:!0,...r,spacing:t||o,children:e})})};fu.propTypes={...b.Grid.propTypes,...R.Form.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),spacing:c.number,defaultValues:c.oneOfType([c.object,c.func]),record:c.object,validate:c.func};fu.defaultProps={...b.Stack.defaultProps};fu.Section=jf;const AF=Ta(R.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?0:1)},[e.breakpoints.down("sm")]:{paddingBottom:0}})),pu=({title:e,modal:t,content:n,subheader:r,secondary:o,sx:s,...l})=>{const u=tf(e),A=R.useRecordContext();return f.jsx(Xn,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?o:null,sx:{...s,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!t,divider:!0,children:f.jsx(AF,{toolbar:f.jsx(fr,{}),...l})})};pu.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:f.jsx(fr,{children:f.jsx(R.SaveButton,{type:"button"})}),secondary:f.jsx(ai,{children:f.jsx(R.DeleteWithConfirmButton,{})})};pu.propTypes={...R.SimpleForm.propTypes,modal:c.bool,content:c.bool,contained:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object])};const hu=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=_t.useTheme(),{getCurrentDialog:g}=li(),{source:p,resource:C,isRequired:h}=u,{getFieldState:m,formState:I}=cs.useFormContext(),{error:B}=m(p,I),v=g();return f.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:!!B,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:f.jsx(R.FieldTitle,{label:e,source:p,resource:v||C,isRequired:h})}),w.isValidElement(t)?w.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!B,children:r})]})};hu.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool};hu.defaultProps={display:"label",divider:!1};const dF=ue(R.ArrayInput,{name:"ApplicaArrayInput",slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}})),gF=({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s})=>f.jsx(hu,{label:e,addLabel:t,source:n,helperText:r,divider:o,children:f.jsx(dF,{source:n,label:!1,...s})}),Mf=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:f.jsxs(ai,{children:[e&&f.jsx(R.EditButton,{}),t&&f.jsx(R.DeleteWithConfirmButton,{}),n&&f.jsx(R.CloneButton,{})]});Mf.defaultProps={canEdit:!0,canDelete:!0,canClone:!1};Mf.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const hI=ue("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),fF=ue("ul")({display:"inline-block"}),Kv=e=>{var p;const{className:t,emptyText:n,source:r,title:o,...s}=e,l=pe.useRecordContext(e),u=dt.get(l,r),A=pe.useTranslate();if(!u)return n?f.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&A(n,{_:n})}):f.jsx(hI,{className:t,...s});if(Array.isArray(u))return f.jsx(fF,{className:t,...s,children:u.map((C,h)=>{var I;const m=o instanceof String?(I=dt.get(C,o))==null?void 0:I.toString():o;return f.jsx("li",{children:m},h)})});const g=o instanceof String?(p=dt.get(l,o))==null?void 0:p.toString():o;return f.jsx(hI,{className:t,...s,children:g})};Kv.propTypes={className:c.string,emptyText:c.string,source:c.string.isRequired,src:c.string,title:c.oneOfType([c.string,c.element]),target:c.string,download:c.oneOfType([c.bool,c.string]),ping:c.string,rel:c.string};var qv={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Jn,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",l="second",u="minute",A="hour",g="day",p="week",C="month",h="quarter",m="year",I="date",B="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var K=["th","st","nd","rd"],V=Z%100;return"["+Z+(K[(V-20)%10]||K[V]||K[0])+"]"}},x=function(Z,K,V){var G=String(Z);return!G||G.length>=K?Z:""+Array(K+1-G.length).join(V)+Z},S={s:x,z:function(Z){var K=-Z.utcOffset(),V=Math.abs(K),G=Math.floor(V/60),F=V%60;return(K<=0?"+":"-")+x(G,2,"0")+":"+x(F,2,"0")},m:function Z(K,V){if(K.date()<V.date())return-Z(V,K);var G=12*(V.year()-K.year())+(V.month()-K.month()),F=K.clone().add(G,C),$=V-F<0,H=K.clone().add(G+($?-1:1),C);return+(-(G+(V-F)/($?F-H:H-F))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:C,y:m,w:p,d:g,D:I,h:A,m:u,s:l,ms:s,Q:h}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},P="en",L={};L[P]=j;var k="$isDayjsObject",q=function(Z){return Z instanceof le||!(!Z||!Z[k])},J=function Z(K,V,G){var F;if(!K)return P;if(typeof K=="string"){var $=K.toLowerCase();L[$]&&(F=$),V&&(L[$]=V,F=$);var H=K.split("-");if(!F&&H.length>1)return Z(H[0])}else{var X=K.name;L[X]=K,F=X}return!G&&F&&(P=F),F||!G&&P},U=function(Z,K){if(q(Z))return Z.clone();var V=typeof K=="object"?K:{};return V.date=Z,V.args=arguments,new le(V)},_=S;_.l=J,_.i=q,_.w=function(Z,K){return U(Z,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var le=function(){function Z(V){this.$L=J(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[k]=!0}var K=Z.prototype;return K.parse=function(V){this.$d=function(G){var F=G.date,$=G.utc;if(F===null)return new Date(NaN);if(_.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var H=F.match(v);if(H){var X=H[2]-1||0,Ae=(H[7]||"0").substring(0,3);return $?new Date(Date.UTC(H[1],X,H[3]||1,H[4]||0,H[5]||0,H[6]||0,Ae)):new Date(H[1],X,H[3]||1,H[4]||0,H[5]||0,H[6]||0,Ae)}}return new Date(F)}(V),this.init()},K.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},K.$utils=function(){return _},K.isValid=function(){return this.$d.toString()!==B},K.isSame=function(V,G){var F=U(V);return this.startOf(G)<=F&&F<=this.endOf(G)},K.isAfter=function(V,G){return U(V)<this.startOf(G)},K.isBefore=function(V,G){return this.endOf(G)<U(V)},K.$g=function(V,G,F){return _.u(V)?this[G]:this.set(F,V)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(V,G){var F=this,$=!!_.u(G)||G,H=_.p(V),X=function(he,Ie){var Qe=_.w(F.$u?Date.UTC(F.$y,Ie,he):new Date(F.$y,Ie,he),F);return $?Qe:Qe.endOf(g)},Ae=function(he,Ie){return _.w(F.toDate()[he].apply(F.toDate("s"),($?[0,0,0,0]:[23,59,59,999]).slice(Ie)),F)},ge=this.$W,ce=this.$M,de=this.$D,fe="set"+(this.$u?"UTC":"");switch(H){case m:return $?X(1,0):X(31,11);case C:return $?X(1,ce):X(0,ce+1);case p:var Be=this.$locale().weekStart||0,me=(ge<Be?ge+7:ge)-Be;return X($?de-me:de+(6-me),ce);case g:case I:return Ae(fe+"Hours",0);case A:return Ae(fe+"Minutes",1);case u:return Ae(fe+"Seconds",2);case l:return Ae(fe+"Milliseconds",3);default:return this.clone()}},K.endOf=function(V){return this.startOf(V,!1)},K.$set=function(V,G){var F,$=_.p(V),H="set"+(this.$u?"UTC":""),X=(F={},F[g]=H+"Date",F[I]=H+"Date",F[C]=H+"Month",F[m]=H+"FullYear",F[A]=H+"Hours",F[u]=H+"Minutes",F[l]=H+"Seconds",F[s]=H+"Milliseconds",F)[$],Ae=$===g?this.$D+(G-this.$W):G;if($===C||$===m){var ge=this.clone().set(I,1);ge.$d[X](Ae),ge.init(),this.$d=ge.set(I,Math.min(this.$D,ge.daysInMonth())).$d}else X&&this.$d[X](Ae);return this.init(),this},K.set=function(V,G){return this.clone().$set(V,G)},K.get=function(V){return this[_.p(V)]()},K.add=function(V,G){var F,$=this;V=Number(V);var H=_.p(G),X=function(ce){var de=U($);return _.w(de.date(de.date()+Math.round(ce*V)),$)};if(H===C)return this.set(C,this.$M+V);if(H===m)return this.set(m,this.$y+V);if(H===g)return X(1);if(H===p)return X(7);var Ae=(F={},F[u]=r,F[A]=o,F[l]=n,F)[H]||1,ge=this.$d.getTime()+V*Ae;return _.w(ge,this)},K.subtract=function(V,G){return this.add(-1*V,G)},K.format=function(V){var G=this,F=this.$locale();if(!this.isValid())return F.invalidDate||B;var $=V||"YYYY-MM-DDTHH:mm:ssZ",H=_.z(this),X=this.$H,Ae=this.$m,ge=this.$M,ce=F.weekdays,de=F.months,fe=F.meridiem,Be=function(Ie,Qe,ae,Ne){return Ie&&(Ie[Qe]||Ie(G,$))||ae[Qe].slice(0,Ne)},me=function(Ie){return _.s(X%12||12,Ie,"0")},he=fe||function(Ie,Qe,ae){var Ne=Ie<12?"AM":"PM";return ae?Ne.toLowerCase():Ne};return $.replace(O,function(Ie,Qe){return Qe||function(ae){switch(ae){case"YY":return String(G.$y).slice(-2);case"YYYY":return _.s(G.$y,4,"0");case"M":return ge+1;case"MM":return _.s(ge+1,2,"0");case"MMM":return Be(F.monthsShort,ge,de,3);case"MMMM":return Be(de,ge);case"D":return G.$D;case"DD":return _.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return Be(F.weekdaysMin,G.$W,ce,2);case"ddd":return Be(F.weekdaysShort,G.$W,ce,3);case"dddd":return ce[G.$W];case"H":return String(X);case"HH":return _.s(X,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return he(X,Ae,!0);case"A":return he(X,Ae,!1);case"m":return String(Ae);case"mm":return _.s(Ae,2,"0");case"s":return String(G.$s);case"ss":return _.s(G.$s,2,"0");case"SSS":return _.s(G.$ms,3,"0");case"Z":return H}return null}(Ie)||H.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(V,G,F){var $,H=this,X=_.p(G),Ae=U(V),ge=(Ae.utcOffset()-this.utcOffset())*r,ce=this-Ae,de=function(){return _.m(H,Ae)};switch(X){case m:$=de()/12;break;case C:$=de();break;case h:$=de()/3;break;case p:$=(ce-ge)/6048e5;break;case g:$=(ce-ge)/864e5;break;case A:$=ce/o;break;case u:$=ce/r;break;case l:$=ce/n;break;default:$=ce}return F?$:_.a($)},K.daysInMonth=function(){return this.endOf(C).$D},K.$locale=function(){return L[this.$L]},K.locale=function(V,G){if(!V)return this.$L;var F=this.clone(),$=J(V,G,!0);return $&&(F.$L=$),F},K.clone=function(){return _.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},Z}(),ie=le.prototype;return U.prototype=ie,[["$ms",s],["$s",l],["$m",u],["$H",A],["$W",g],["$M",C],["$y",m],["$D",I]].forEach(function(Z){ie[Z[1]]=function(K){return this.$g(K,Z[0],Z[1])}}),U.extend=function(Z,K){return Z.$i||(Z(K,le,U),Z.$i=!0),U},U.locale=J,U.isDayjs=q,U.unix=function(Z){return U(1e3*Z)},U.en=L[P],U.Ls=L,U.p={},U})})(qv);var pF=qv.exports;const qr=bo(pF),Df=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...o})=>{const[s,l]=w.useState(null),u=R.useRecordContext(o),A=R.useDataProvider(),g=R.useResourceContext(),p=w.useCallback(async m=>{m.preventDefault(),m.stopPropagation();const I=dt.get(u,o==null?void 0:o.source),B=g.replace("entities/",""),v=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(o==null?void 0:o.source)}/${(I==null?void 0:I.id)||(u==null?void 0:u.id)}`),O=document.createElement("a");O.href=v,O.download=dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source)),O.click()},[A,u,e,g,t,o==null?void 0:o.source,o==null?void 0:o.title]),C=w.useMemo(()=>({...u,[o==null?void 0:o.source]:(u==null?void 0:u.src)||dt.get(u,o==null?void 0:o.source),[o==null?void 0:o.title]:(u==null?void 0:u.title)||dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),[u,o==null?void 0:o.source,o==null?void 0:o.title]),h=R.useTranslate();return w.useEffect(()=>{!u||!(u!=null&&u.userId)||A.getOne(r,{id:u==null?void 0:u.userId}).then(({data:m})=>l(m)).catch(()=>l(null))},[u,A,r]),f.jsx(Kv,{...o,disabled:n,record:C,onClick:p,title:f.jsxs(b.Box,{sx:{cursor:"pointer"},children:[f.jsx(b.Typography,{variant:"subtitle1",children:dt.get(C,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),f.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[dt.get(C,"sizeDescription"),s&&" | ",s&&h("ra.attachment.info",{user:s==null?void 0:s.name,created:qr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};Df.propTypes={...R.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const hF=ue(R.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Ma=e=>{const t=`_${e==null?void 0:e.source}`;return f.jsx(hF,{...e,source:t})};Ma.propTypes={...R.ImageField.propTypes,source:c.string};const Cu=({width:e,height:t,circle:n,justify:r,record:o,...s})=>{const l=w.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5}),[e,t,n]),u=R.useRecordContext(),A=o||u;return f.jsx(Ma,{sx:g=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${g.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...s,record:A})};Cu.defaultProps={...Ma.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"};Cu.propTypes={...Ma.propTypes,width:c.oneOfType([c.number,c.string]),height:c.oneOfType([c.number,c.string]),circle:c.bool,justify:c.oneOf(["flex-start","center","flex-end"])};var Jv={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Jn,function(){return function(n,r,o){n=n||{};var s=r.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(g,p,C,h){return s.fromToBase(g,p,C,h)}o.en.relativeTime=l,s.fromToBase=function(g,p,C,h,m){for(var I,B,v,O=C.$locale().relativeTime||l,j=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],x=j.length,S=0;S<x;S+=1){var P=j[S];P.d&&(I=h?o(g).diff(C,P.d,!0):C.diff(g,P.d,!0));var L=(n.rounding||Math.round)(Math.abs(I));if(v=I>0,L<=P.r||!P.r){L<=1&&S>0&&(P=j[S-1]);var k=O[P.l];m&&(L=m(""+L)),B=typeof k=="string"?k.replace("%d",L):k(L,p,P.l,v);break}}if(p)return B;var q=v?O.future:O.past;return typeof q=="function"?q(B):q.replace("%s",B)},s.to=function(g,p){return u(g,p,this,!0)},s.from=function(g,p){return u(g,p,this)};var A=function(g){return g.$u?o.utc():o()};s.toNow=function(g){return this.to(A(this),g)},s.fromNow=function(g){return this.from(A(this),g)}}})})(Jv);var CF=Jv.exports;const mF=bo(CF);qr.extend(mF);const mu=e=>{const t=R.useRecordContext(e),[n]=R.useLocaleState(),r=w.useMemo(()=>qr(dt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return f.jsxs(w.Fragment,{children:[f.jsx(R.DateField,{record:t,source:e.source,showTime:!0}),f.jsx("br",{}),f.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};mu.displayName="DateAgoField";mu.propTypes={source:c.string.isRequired};const Xv=ue(R.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));Xv.propTypes={...R.DateField.propTypes};const kf=e=>f.jsx(Xv,{...e});kf.defaultProps={...R.DateField.defaultProps,variant:"body1"};kf.propTypes={...R.DateField.propTypes};const Zv=ue(R.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Zv.propTypes={...R.EmailField.propTypes};const Ff=e=>f.jsx(Zv,{...e});Ff.defaultProps={...R.EmailField.defaultProps,variant:"body1"};Ff.propTypes={...R.EmailField.propTypes};const EF=ue(R.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),Lf=({...e})=>{const t=R.useRecordContext(e),n=w.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=dt.get(t,`_${e==null?void 0:e.source}`,dt.get(t,e==null?void 0:e.source)),s=dt.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=o,l.download=s,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return f.jsx(EF,{...e,record:t,onClick:n})};Lf.propTypes={...R.FileField.propTypes,source:c.string,title:c.string};const _v=e=>f.jsx(R.FunctionField,{...e});_v.defaultProps={variant:"body1"};const IF=ue("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),Nf=({source:e,defaultValue:t,...n})=>{const r=R.useRecordContext(n),o=dt.get(r,e,t);return f.jsx("span",{dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})};Nf.propTypes={defaultValue:c.any,source:c.string,record:c.object};Nf.defaultProps={defaultValue:" "};const $v=({title:e,children:t})=>e&&e!==!1?f.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;$v.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const Vf=({label:e,source:t,defaultValue:n,children:r,tooltip:o,...s})=>{const{getCurrentDialog:l}=li(),u=R.useRecordContext(s),A=R.useResourceContext(s),g=l(),p=w.useMemo(()=>!o||o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?dt.get(u,o,o):o,[u,o]);return f.jsx($v,{title:p,children:f.jsxs(w.Fragment,{children:[f.jsx(b.InputLabel,{children:f.jsx(R.FieldTitle,{label:e,source:t,resource:g||A})}),f.jsx(IF,{...s,children:w.cloneElement(r,{source:t,record:u,defaultValue:n,resource:g||A})})]})})};Vf.propTypes={defaultValue:c.any,tooltip:c.oneOfType([c.string,c.bool,c.func]),source:c.string,label:c.string,name:c.string,children:c.element};Vf.defaultProps={defaultValue:" ",children:f.jsx(Nf,{})};const Hf=function({children:e,className:t}){return f.jsx("div",{className:t,children:e})};Hf.defaultProps={children:null,className:""};Hf.propTypes={children:c.node,className:c.string};const BF=Ta(Hf,{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n,bulkActionButtons:r})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& form":{padding:e.spacing(2)},"& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{[e.breakpoints.up("sm")]:{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2),marginRight:e.spacing(t?1:2),width:t?"auto":`calc(100% - ${e.spacing(5)})`},[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:r===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 34px)"}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:48,bottom:-56,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)},[e.breakpoints.down("sm")]:{bottom:-48,borderRadius:0}}})),fs=e=>f.jsx(BF,{...e,children:f.jsx(R.ReferenceManyField,{pagination:f.jsx(R.Pagination,{}),...e})});fs.defaultProps={margin:!1,border:!1};fs.propTypes={...R.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const ey=({source:e,...t})=>{const n=R.useRecordContext(t),r=dt.get(n,e,0),o=r/1024,s=o/1024,l=s/1024,u=l>1?`${l.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return f.jsx(b.Typography,{component:"span",variant:"body1",...t,children:u})};ey.propTypes={record:c.object,source:c.string};const ty=ue(R.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));ty.propTypes={...R.TextField.propTypes};const Wf=e=>f.jsx(ty,{...e});Wf.defaultProps={...R.TextField.defaultProps,variant:"body1"};Wf.propTypes={...R.TextField.propTypes};const ut=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=_t.useTheme(),{getCurrentDialog:g}=li(),{source:p,resource:C,isRequired:h}=u,{fieldState:{invalid:m}}=R.useInput(u),I=g();return f.jsxs(b.Stack,{spacing:1,sx:{width:u!=null&&u.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:m?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:m===!0,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:f.jsx(R.FieldTitle,{label:e,source:p,resource:I||C,isRequired:h})}),w.isValidElement(t)?w.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:m===!0,children:r})]})};ut.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool};ut.defaultProps={display:"label",divider:!1};const vF=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},yF=ue(R.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...vF(e)})),zf=({children:e,disabled:t,type:n,...r})=>{const o=R.useRecordContext(r),s=r==null?void 0:r.source,l=o==null?void 0:o.id;return R.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),f.jsx(ut,{...r,children:f.jsx(yF,{disabled:t,children:w.cloneElement(e,{...e.props,entityId:l,property:s})})})};zf.propTypes={...R.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool};zf.defaultProps={children:f.jsx(Df,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const bF=ue(R.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"}})),Uf=({...e})=>f.jsx(ut,{...e,children:f.jsx(bF,{})});Uf.propTypes={...R.AutocompleteArrayInput.propTypes,...ut.propTypes};Uf.defaultProps={...R.AutocompleteArrayInput.defaultProps,size:"small"};const QF=ue(R.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall":{paddingTop:"4px"}})),Yf=e=>{const{perPage:t,...n}=e;return f.jsx(ut,{...n,children:f.jsx(QF,{})})};Yf.propTypes={...R.AutocompleteInput.propTypes,...ut.propTypes};Yf.defaultProps={...R.AutocompleteInput.defaultProps,size:"small"};const xF=ue(R.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),Gf=({horizontal:e,...t})=>{const n=Rt();return f.jsx(ut,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:f.jsx(xF,{})})};Gf.defaultProps={...R.BooleanInput.defaultProps,...ut.defaultProps};Gf.propTypes={...R.BooleanInput.propTypes,...ut.propTypes,horizontal:c.bool};const wF=ue(R.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Kf=e=>f.jsx(ut,{...e,children:f.jsx(wF,{})});Kf.propTypes={...R.DateInput.propTypes,...ut.propTypes};Kf.defaultProps={...R.DateInput.defaultProps,...ut.defaultProps};const TF=ue(R.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),qf=e=>f.jsx(ut,{...e,children:f.jsx(TF,{})});qf.propTypes={...R.DateTimeInput.propTypes,...ut.propTypes};qf.defaultProps={...ut.defaultProps};const PF=ue(R.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}})),Jf=({children:e,title:t,...n})=>{const r=cs.useWatch({name:n.source}),o=R.useRecordContext(n),{source:s}=n,l=w.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=dt.get(o,s);if(u){const A=u.split("__");return A.length>0?A[A.length-1]:u}return u},[o,s,r]);return f.jsx(ut,{...n,children:f.jsx(PF,{children:w.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`),[t||s]:l}})})})};Jf.propTypes={...R.FileInput.propTypes,source:c.string,title:c.string,children:c.node};Jf.defaultProps={children:f.jsx(Lf,{})};const Xf=({children:e,title:t,...n})=>{const r=cs.useWatch({name:n.source}),o=R.useRecordContext(n),{source:s}=n;return R.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),f.jsx(ut,{...n,children:f.jsx(R.ImageInput,{accept:"image/*",children:w.cloneElement(e,{...e.props,title:t,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`)}})})})};Xf.defaultProps={children:f.jsx(Cu,{}),multiple:!1};Xf.propTypes={...R.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const SF=ue(R.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Zf=e=>f.jsx(ut,{...e,children:f.jsx(SF,{})});Zf.propTypes={...R.NumberInput.propTypes,...ut.propTypes};Zf.defaultProps={...R.NumberInput.defaultProps,...ut.defaultProps};const ny=({source:e,minWidth:t=300,children:n})=>{const r=R.useResourceContext(),o=R.useRecordContext(),[s,l]=w.useState(dt.get(o,e,"")),[u,A]=w.useState(!1),g=w.useCallback(I=>l(I.target.value),[]),p=R.useDataProvider(),C=w.useCallback(I=>{I.key==="Enter"&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,o,e]),h=w.useCallback(()=>{dt.get(o,e)!==s&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,e,o]),m=w.useCallback(I=>{A(!0),p.update(r,{id:o.id,data:{...o,[e]:I,_changed:e}}).then(()=>A(!1))},[p,r,e,o]);return w.useEffect(()=>l(dt.get(o,e)),[o,e]),n?w.cloneElement(n,{...n.props,source:e,value:s,onChange:m}):f.jsx(b.TextField,{value:s,disabled:u,onChange:g,onKeyPress:C,onBlur:h,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};ny.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const _f=({children:e,...t})=>f.jsx(R.ReferenceArrayInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});_f.propTypes={...R.ReferenceArrayInput.propTypes,children:c.element};_f.defaultProps={...R.ReferenceArrayInput.defaultProps};const $f=({children:e,...t})=>f.jsx(R.ReferenceInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});$f.propTypes={...R.ReferenceInput.propTypes,children:c.element};$f.defaultProps={...R.ReferenceInput.defaultProps};const ep=({reference:e,target:t,children:n,filters:r,actions:o,...s})=>f.jsx(R.ResourceContextProvider,{value:e,children:f.jsx(fs,{perPage:5,pagination:f.jsx(R.Pagination,{}),...s,reference:e,target:t,children:f.jsxs(w.Fragment,{children:[f.jsx(R.ListToolbar,{filters:r,actions:o}),n]})})});ep.propTypes={...fs.propTypes,children:c.node.isRequired,reference:c.string.isRequired,target:c.string.isRequired,filters:c.oneOfType([c.element,c.func,c.element,c.arrayOf(c.node)]),actions:c.oneOfType([c.element,c.func,c.element])};ep.defaultProps={...fs.defaultProps};const RF=ue(R.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),OF=e=>f.jsx(RF,{...e}),ry=ue(R.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip":{marginTop:"-2px",marginBottom:"-2px"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}}));ry.propTypes={...R.SelectArrayInput.propTypes};const tp=e=>f.jsx(ut,{...e,children:f.jsx(ry,{options:{autoWidth:!1}})});tp.defaultProps={optionText:"name",optionValue:"id"};tp.propTypes={...R.SelectArrayInput.propTypes,...ut.propTypes};const jF=ue(R.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}})),oy=e=>f.jsx(ut,{...e,children:f.jsx(jF,{})});oy.propTypes={...R.SelectInput.propTypes,...ut.propTypes};const Zn=e=>f.jsx(ut,{...e,children:f.jsx(R.TextInput,{})});Zn.propTypes={...R.TextInput.propTypes,...ut.propTypes};const Eu=({...e})=>{var u,A;const t=R.useTranslate(),n=R.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(u=cs.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:A.value;let o=e.helperText,s=e.validate;s?Array.isArray(s)&&s.indexOf(n)===-1&&s.push(n):s=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(o=o&&o.length>0?`${l} - ${t(o)}`:l),f.jsx(Zn,{...e,validate:s,helperText:o,inputProps:{maxLength:e==null?void 0:e.maxLength}})};Eu.displayName="SmartTextInput";Eu.defaultProps={multiline:!1};Eu.propTypes={...Zn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const iy=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return qr().hour(n).minute(r)};function MF(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}const DF=e=>{if(!e)return"";const t=iy(e);return t?t.format("HH:mm"):""},kF=e=>e,FF=ue(R.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),np=e=>f.jsx(ut,{...e,children:f.jsx(FF,{})});np.defaultProps={...R.TimeInput.defaultProps,format:DF,parse:kF};np.propTypes={...R.TimeInput.propTypes,...ut.propTypes};const rp=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=Fn(),[r,o]=w.useState(!1),s=pe.useAuthProvider(),l=pe.useTranslate(),u=pe.useNotify(),A=w.useCallback(g=>{const{oldPassword:p,newPassword:C}=g;o(!0),s==null||s.changePassword(p,C).then(()=>{u("ra.auth.password_changed"),e()}).catch(h=>{u((h==null?void 0:h.message)||(h==null?void 0:h.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e]);return f.jsx(pe.ResourceContextProvider,{value:"user/change-password",children:f.jsx(pe.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:f.jsx(pu,{onSubmit:A,toolbar:f.jsx(fr,{children:f.jsx(R.SaveButton,{disabled:r})}),children:f.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Alert,{severity:"warning",children:[f.jsx(b.AlertTitle,{children:l("ra.auth.first_access.change_password")}),l("ra.auth.first_access.change_password_helper")]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(Zn,{source:"oldPassword",type:"password",validate:pe.required()})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(Zn,{source:"newPassword",type:"password",validate:pe.required()})})]})})})})},LF=ue(R.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{borderTop:`1px solid ${e.palette.divider}`},"& .RaEdit-main>.MuiPaper-root:first-of-type":{overflow:"visible",backgroundColor:e.palette.background.default}})),NF=ue(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),VF=ue(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),op=({title:e,divider:t,variant:n})=>{const r=R.useTranslate();return f.jsxs(w.Fragment,{children:[f.jsx(NF,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&f.jsx(VF,{})]})};op.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])};op.defaultProps={divider:!0,variant:"h4"};const HF=ue(b.Grid,{name:"ApplicaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{position:"initial",marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`,[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important",marginRight:0}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function sy(e){const{spacing:t}=Fn(),{spacing:n=t}=e,r=Ce.omit(e,["spacing"]);return f.jsx(R.Form,{...r,children:f.jsx(HF,{container:!0,spacing:n*2,children:e.children})})}function pg(e){return e.id??e.label}function ay(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function WF(e){return Ce.map(e,"id")}function Sc(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function ly(e,t){const n=e!==void 0?Sc(e):0;return Ce.chain(t).filter(o=>e!==void 0?ay(e,o.id):!0).filter(o=>Sc(o.id)===n+1).value()}function zF(e,t){var s;const n=Ce.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return Ce.extend(n,{formRootPath:o});case"setSyncWithLocation":return Ce.extend(n,{syncWithLocation:o});case"setErrorCount":return Ce.extend(n,{errorCount:o});case"setActiveItem":return Ce.includes(WF(e.items),o)?Ce.extend(n,{activeItem:o}):n;case"addItem":{const{id:l}=o;return Ce.extend(n,{items:Ce.chain(n.items).clone().reject(u=>u.id===l).concat([o]).orderBy(u=>u.index).value()})}case"removeItem":{const l=Ce.isString(o)?o:o.id,u=Ce.chain(n.items).clone().reject(A=>A.id===l).value();return Ce.extend(n,{items:u}),n.activeItem===l&&Ce.extend(n,{activeItem:((s=Ce.first(u))==null?void 0:s.id)??void 0}),n}default:return n}}const UF={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},cy=w.createContext(void 0);function uy(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=Zi.useLocation(),[s,l]=w.useReducer(zF,Ce.cloneDeep(UF)),{formRootPath:u,items:A}=s,g=w.useMemo(()=>({state:s,dispatch:l}),[s,l]);return w.useEffect(()=>{const p=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&p.push(r);const C=Ce.chain(p).map(m=>Zi.matchPath(m,o)).reject(m=>m===null).first().value(),h=C==null?void 0:C.pathnameBase;h!==void 0&&h!==u&&l({type:"setFormRootPath",payload:h})},[o,u,r]),w.useEffect(()=>{l({type:"setSyncWithLocation",payload:!!t})},[t,l]),w.useEffect(()=>{l({type:"setErrorCount",payload:!!n})},[n,l]),w.useEffect(()=>{var p;if(t&&u!==void 0){let C=o.replace(u,"").replace(new RegExp(/^\/?/),"");Ce.isEmpty(C)&&(C=((p=Ce.chain(A).filter(h=>ly(h.id,A).length===0).orderBy([h=>Sc(h.id),h=>h.index]).first().value())==null?void 0:p.id)??void 0),l({type:"setActiveItem",payload:C})}},[l,u,o,A]),f.jsx(cy.Provider,{value:g,children:e.children})}function Ay(){const e=w.useContext(cy);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Da(){return Ay().state}function ip(){return Ay().dispatch}function dy(){return Da().formRootPath}function gy(){return Da().activeItem}function fy(){return Da().items}function py(){return Da().syncWithLocation}function hy(){return Da().errorCount}function Cy(){const e=ip();return w.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function my(){const e=ip();return w.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function Ey(){const e=ip();return w.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}var YF=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},Iy=e=>e.firstChild?e.firstChild.offsetParent===e:!0,GF=(e,t)=>{let n=e,r=0;Iy(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},KF=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},ma=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?ma="sticky":CSS.supports("position","-webkit-sticky")&&(ma="-webkit-sticky"));var Rc=!1;try{const e=Object.defineProperty({},"passive",{get(){Rc={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var wd=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=o(s()),u=()=>{Object.assign(l,o(s())),n()};return window.addEventListener("resize",u,Rc),r.push(()=>window.removeEventListener("resize",u)),l}else{const s=o(t.getBoundingClientRect()),l=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},u=new ResizeObserver(l);return u.observe(t),r.push(()=>u.disconnect()),s}},qF=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},JF=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,l=YF(e);let u=!1;const A=()=>{u||requestAnimationFrame(()=>{const k=C();k!==x&&S(k),u=!1}),u=!0};let g=l===window?window.scrollY:l.scrollTop;const p=k=>{const{offsetTop:q,height:J}=m,{naturalTop:U}=v,{height:_}=O;return k+q+J>=U+_+j+o},C=()=>{const{height:k}=m,{height:q}=O;return q+s+o<=k?3:p(g)?1:2},h=l!==window&&Iy(l),m=wd({el:l,onChange:A,unsubs:t,measure:({height:k,top:q})=>({height:k,offsetTop:h?q:0})}),I=KF(e),B=I===window?{top:0,bottom:0}:qF(I),v=wd({el:I,onChange:A,unsubs:t,measure:({height:k})=>({height:k-B.top-B.bottom,naturalTop:I===window?0:GF(I,l)+B.top+m.offsetTop})}),O=wd({el:e,onChange:A,unsubs:t,measure:({height:k})=>({height:k})});let j=0,x=C();const S=k=>{const q=x;if(x=k,q===2&&(j=-1),k===3){e.style.position=ma,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:J,offsetTop:U}=m,{height:_,naturalTop:le}=v,{height:ie}=O;if(k===2)if(e.style.position="relative",j=q===0?Math.max(0,U+g-le+s):Math.max(0,U+g+J-(le+ie+o)),r){const Z=Math.max(0,_-ie-j);e.style.bottom=`${Z}px`}else e.style.top=`${j}px`;else e.style.position=ma,k===1?r?e.style.bottom=`${o}px`:e.style.top=`${J-ie-o}px`:r?e.style.bottom=`${J-ie-o}px`:e.style.top=`${s}px`};S(x);const P=k=>{if(k===g)return;const q=k-g;if(g=k,x===3)return;const{offsetTop:J,height:U}=m,{naturalTop:_,height:le}=v,{height:ie}=O;if(q>0)if(x===0){if(k+J+s>_){const Z=Math.max(0,J+g-_+s);k+J+U<=_+ie+Z+o?S(2):S(1)}}else x===2&&p(k)&&S(1);else if(x===1){if(J+k+U<_+le+o){const Z=Math.max(0,J+g+U-(_+ie+o));J+k+s>=_+Z?S(2):S(0)}}else x===2&&J+k+s<_+j&&S(0)},L=l===window?()=>P(window.scrollY):()=>P(l.scrollTop);l.addEventListener("scroll",L,Rc),l.addEventListener("mousewheel",L,Rc),t.push(()=>l.removeEventListener("scroll",L),()=>l.removeEventListener("mousewheel",L))},XF=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=w.useState(null);return w.useEffect(()=>{if(!r||!ma)return;const s=[];return JF(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(l=>l())}},[r,t,e,n]),o},ZF=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:l}=e,u=XF({offsetTop:t,offsetBottom:n,bottom:r});return f.jsx("div",{className:s,style:l,ref:u,children:o})},_F=ZF,By=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(By||{});function vy(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=Ce.omit(e,["sticky","disposition","spacing"]),s=t?_F:b.Box,l=w.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return f.jsx(b.Grid,{...o,item:!0,...n,children:f.jsx(s,{...l,children:f.jsx(b.Stack,{spacing:r,children:e.children})})})}function yy(e){return f.jsx(f.Fragment,{children:e.children})}function by(e){const{children:t}=e;return w.useMemo(()=>{const r={top:[],bottom:[]};return w.Children.forEach(t,o=>{if(w.isValidElement(o)&&(o==null?void 0:o.type)===yy){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function Qy(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=Ce.omit(e,["disposition"]);return f.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function xy(e){const t=gy();return t===void 0?!1:e===t||ay(e,t)}function wy(e){const t=fy();return w.useMemo(()=>ly(e,t),[t,e])}function $F(){const e=dy(),{search:t}=Zi.useLocation(),n=Zi.useNavigate();return w.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n])}function Ty(){const e=wy();return f.jsx(b.Card,{variant:"outlined",children:f.jsx(b.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:Ce.map(e,(t,n)=>f.jsx(sp,{...t},n))})})}function sp(e){const t=pe.useTranslate()??Ce.identity,n=Py(e),{selected:r,label:o,icon:s,onClick:l,badge:u,items:A,isGroup:g,level:p,errors:C=0}=n,{spacing:h}=Fn(),[m,I]=w.useState(r),B=w.useCallback(j=>{I(!m),l(j)},[l,m]),v=s!==void 0,O=Ce.omit(e,["label","icon","selected","badge"]);return w.useEffect(()=>{r&&!m&&I(r)},[r,m,I]),f.jsxs(f.Fragment,{children:[f.jsx(b.ListItem,{...O,disablePadding:!0,children:f.jsxs(b.ListItemButton,{selected:r&&!g,onClick:B,sx:{pl:h*p},children:[v&&f.jsx(b.ListItemIcon,{children:s}),f.jsx(b.ListItemText,{inset:!v,primary:C===0?t(o):f.jsx(b.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),u&&f.jsx(b.ListItemAvatar,{children:f.jsx(Ca,{type:"filled",size:"xs",color:u.color??"default",children:u.content})}),g&&(m?f.jsx(Bn.ExpandLess,{}):f.jsx(Bn.ExpandMore,{}))]})}),g&&f.jsx(b.Collapse,{in:m,timeout:"auto",children:f.jsx(b.List,{children:Ce.map(A,(j,x)=>f.jsx(sp,{...j},x))})})]})}function Py(e){const{id:t}=e,n=xy(t),r=Sc(t),o=$F(),s=py(),l=Cy(),u=wy(t),A=!Ce.isEmpty(u),g=w.useCallback(C=>{A||(s?o(e.id):l(e.id)),Ce.isFunction(e.onClick)&&e.onClick(C)},[l,o,e,s,A]);return w.useMemo(()=>({...e,selected:n,onClick:g,items:u,isGroup:A,level:r}),[e,n,g,u,A])}function Sy(e=[],t){const n=Ce.isArray(e)?e:[e],r=Ce.filter(n,o=>w.isValidElement(o));Ce.each(r,o=>{var s;t(o),Sy(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function Ry(e){const{errors:t}=cs.useFormState(),n=hy(),{label:r,icon:o,badge:s,index:l=0,children:u}=e,A=pg(e),g=my(),p=Ey(),C=xy(A),h=[];n&&(e.sources!==void 0?h.push(...e.sources):Sy(u,I=>{var B;((B=I==null?void 0:I.props)==null?void 0:B.source)!==void 0&&h.push(I.props.source)}));const m=Ce.chain(h).uniq().map(I=>Ce.get(t,I)).reject(I=>I===void 0).value().length;return w.useEffect(()=>(g({id:A,index:l,label:r,icon:o,badge:s,errors:m}),()=>{p(A)}),[g,p,r,o,A,s,l,m]),f.jsx(b.Box,{display:C?"unset":"none",children:e.children})}function Oy(e){const t=ap(e),n=pg(e);return f.jsx(Ry,{...e,id:n,children:w.Children.map(t,r=>{const o=pg(r.props);return w.cloneElement(r,{id:`${n}.${o}`})})})}function jy(e){return f.jsx(Ry,{...e})}function ap(e){const{children:t}=e;return w.useMemo(()=>Ce.chain(w.Children.toArray(t)).filter(r=>w.isValidElement(r)&&((r==null?void 0:r.type)===jy||(r==null?void 0:r.type)===Oy)).map((r,o)=>w.cloneElement(r,{index:o})).value(),[t])}function e6(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=Ce.pick(e,["syncWithLocation","errorCount"]),s=Ce.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:l,bottom:u}=by(e),A=ap(e);return f.jsx(uy,{...o,children:f.jsxs(sy,{...s,spacing:r,children:[f.jsxs(vy,{disposition:t,spacing:r,children:[l,f.jsx(Ty,{}),u]}),f.jsx(Qy,{disposition:n,children:A})]})})}const kt=e6;kt.BaseForm=sy;kt.Content=Qy;kt.Provider=uy;kt.useItems=fy;kt.useSyncWithLocation=py;kt.useErrorCount=hy;kt.useFormRootPath=dy;kt.useActiveItem=gy;kt.useSetActiveItem=Cy;kt.useAddItem=my;kt.useRemoveItem=Ey;kt.Sidebar=vy;kt.SidebarSection=yy;kt.SidebarSectionPosition=By;kt.useSidebarChildren=by;kt.NavMenu=Ty;kt.NavMenuItem=sp;kt.useNavMenuItem=Py;kt.Tab=jy;kt.Group=Oy;kt.useBaseItemChildren=ap;const t6=ue(R.Show,{name:"RaApplicaShow",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),n6=ue(R.SimpleFormIterator,{name:"ApplicaSimpleFormIterator",root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}})),r6=Ta(R.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?0:1)},[e.breakpoints.down("sm")]:{paddingBottom:0}})),lp=e=>{const{title:t,modal:n,content:r,subheader:o,secondary:s,sx:l,...u}=e,A=tf(t);return f.jsx(Xn,{title:A,modal:n,content:r,subheader:o,secondary:s,sx:{...l,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!n,divider:!0,children:f.jsx(r6,{toolbar:f.jsx(fr,{}),...u})})};lp.defaultProps={toolbar:f.jsx(fr,{children:f.jsx(R.SaveButton,{type:"button"})}),secondary:f.jsx(ai,{children:f.jsx(R.DeleteWithConfirmButton,{})})};lp.Tab=R.TabbedForm.Tab;const o6=D.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:o=!1,index:s,member:l,resource:u}=e,A=R.useTranslate(),[g,p]=D.useState(!1),{total:C,remove:h}=nB(),m=D.useCallback(()=>{p(!1),h(s)},[s,h]),I=w.useMemo(()=>({index:s,total:C,remove:()=>h(s)}),[s,C,h]);return f.jsxs(_g.Provider,{value:I,children:[w.Children.map(n,(B,v)=>{if(!w.isValidElement(B))return null;const{source:O,...j}=B.props;return f.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:w.cloneElement(B,{source:O?`${l}.${O}`:l,index:O?void 0:v,resource:u,disabled:r,...j,label:""})})}),!o&&f.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2.5},children:f.jsx(ai,{horizontal:!0,children:f.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&f.jsx(R.Confirm,{isOpen:g,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:m,onClose:()=>p(!1)})]})});var i6=Array.isArray,Iu=i6,s6=typeof Jn=="object"&&Jn&&Jn.Object===Object&&Jn,a6=s6,l6=a6,c6=typeof self=="object"&&self&&self.Object===Object&&self,u6=l6||c6||Function("return this")(),Bu=u6,A6=Bu,d6=A6.Symbol,vu=d6,CI=vu,My=Object.prototype,g6=My.hasOwnProperty,f6=My.toString,Gs=CI?CI.toStringTag:void 0;function p6(e){var t=g6.call(e,Gs),n=e[Gs];try{e[Gs]=void 0;var r=!0}catch{}var o=f6.call(e);return r&&(t?e[Gs]=n:delete e[Gs]),o}var h6=p6,C6=Object.prototype,m6=C6.toString;function E6(e){return m6.call(e)}var I6=E6,mI=vu,B6=h6,v6=I6,y6="[object Null]",b6="[object Undefined]",EI=mI?mI.toStringTag:void 0;function Q6(e){return e==null?e===void 0?b6:y6:EI&&EI in Object(e)?B6(e):v6(e)}var cp=Q6;function x6(e){return e!=null&&typeof e=="object"}var yu=x6,w6=cp,T6=yu,P6="[object Symbol]";function S6(e){return typeof e=="symbol"||T6(e)&&w6(e)==P6}var up=S6,R6=Iu,O6=up,j6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,M6=/^\w*$/;function D6(e,t){if(R6(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||O6(e)?!0:M6.test(e)||!j6.test(e)||t!=null&&e in Object(t)}var k6=D6;function F6(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Dy=F6,L6=cp,N6=Dy,V6="[object AsyncFunction]",H6="[object Function]",W6="[object GeneratorFunction]",z6="[object Proxy]";function U6(e){if(!N6(e))return!1;var t=L6(e);return t==H6||t==W6||t==V6||t==z6}var ky=U6,Y6=Bu,G6=Y6["__core-js_shared__"],K6=G6,Td=K6,II=function(){var e=/[^.]+$/.exec(Td&&Td.keys&&Td.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function q6(e){return!!II&&II in e}var J6=q6,X6=Function.prototype,Z6=X6.toString;function _6(e){if(e!=null){try{return Z6.call(e)}catch{}try{return e+""}catch{}}return""}var $6=_6,eL=ky,tL=J6,nL=Dy,rL=$6,oL=/[\\^$.*+?()[\]{}|]/g,iL=/^\[object .+?Constructor\]$/,sL=Function.prototype,aL=Object.prototype,lL=sL.toString,cL=aL.hasOwnProperty,uL=RegExp("^"+lL.call(cL).replace(oL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function AL(e){if(!nL(e)||tL(e))return!1;var t=eL(e)?uL:iL;return t.test(rL(e))}var dL=AL;function gL(e,t){return e==null?void 0:e[t]}var fL=gL,pL=dL,hL=fL;function CL(e,t){var n=hL(e,t);return pL(n)?n:void 0}var bu=CL,mL=bu,EL=mL(Object,"create"),Qu=EL,BI=Qu;function IL(){this.__data__=BI?BI(null):{},this.size=0}var BL=IL;function vL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var yL=vL,bL=Qu,QL="__lodash_hash_undefined__",xL=Object.prototype,wL=xL.hasOwnProperty;function TL(e){var t=this.__data__;if(bL){var n=t[e];return n===QL?void 0:n}return wL.call(t,e)?t[e]:void 0}var PL=TL,SL=Qu,RL=Object.prototype,OL=RL.hasOwnProperty;function jL(e){var t=this.__data__;return SL?t[e]!==void 0:OL.call(t,e)}var ML=jL,DL=Qu,kL="__lodash_hash_undefined__";function FL(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=DL&&t===void 0?kL:t,this}var LL=FL,NL=BL,VL=yL,HL=PL,WL=ML,zL=LL;function ps(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ps.prototype.clear=NL;ps.prototype.delete=VL;ps.prototype.get=HL;ps.prototype.has=WL;ps.prototype.set=zL;var UL=ps;function YL(){this.__data__=[],this.size=0}var GL=YL;function KL(e,t){return e===t||e!==e&&t!==t}var qL=KL,JL=qL;function XL(e,t){for(var n=e.length;n--;)if(JL(e[n][0],t))return n;return-1}var xu=XL,ZL=xu,_L=Array.prototype,$L=_L.splice;function e9(e){var t=this.__data__,n=ZL(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$L.call(t,n,1),--this.size,!0}var t9=e9,n9=xu;function r9(e){var t=this.__data__,n=n9(t,e);return n<0?void 0:t[n][1]}var o9=r9,i9=xu;function s9(e){return i9(this.__data__,e)>-1}var a9=s9,l9=xu;function c9(e,t){var n=this.__data__,r=l9(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var u9=c9,A9=GL,d9=t9,g9=o9,f9=a9,p9=u9;function hs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}hs.prototype.clear=A9;hs.prototype.delete=d9;hs.prototype.get=g9;hs.prototype.has=f9;hs.prototype.set=p9;var h9=hs,C9=bu,m9=Bu,E9=C9(m9,"Map"),I9=E9,vI=UL,B9=h9,v9=I9;function y9(){this.size=0,this.__data__={hash:new vI,map:new(v9||B9),string:new vI}}var b9=y9;function Q9(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var x9=Q9,w9=x9;function T9(e,t){var n=e.__data__;return w9(t)?n[typeof t=="string"?"string":"hash"]:n.map}var wu=T9,P9=wu;function S9(e){var t=P9(this,e).delete(e);return this.size-=t?1:0,t}var R9=S9,O9=wu;function j9(e){return O9(this,e).get(e)}var M9=j9,D9=wu;function k9(e){return D9(this,e).has(e)}var F9=k9,L9=wu;function N9(e,t){var n=L9(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var V9=N9,H9=b9,W9=R9,z9=M9,U9=F9,Y9=V9;function Cs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cs.prototype.clear=H9;Cs.prototype.delete=W9;Cs.prototype.get=z9;Cs.prototype.has=U9;Cs.prototype.set=Y9;var Fy=Cs,Ly=Fy,G9="Expected a function";function Ap(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(G9);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var l=e.apply(this,r);return n.cache=s.set(o,l)||s,l};return n.cache=new(Ap.Cache||Ly),n}Ap.Cache=Ly;var K9=Ap,q9=K9,J9=500;function X9(e){var t=q9(e,function(r){return n.size===J9&&n.clear(),r}),n=t.cache;return t}var Z9=X9,_9=Z9,$9=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eN=/\\(\\)?/g,tN=_9(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace($9,function(n,r,o,s){t.push(o?s.replace(eN,"$1"):r||n)}),t}),nN=tN;function rN(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Ny=rN,yI=vu,oN=Ny,iN=Iu,sN=up,aN=1/0,bI=yI?yI.prototype:void 0,QI=bI?bI.toString:void 0;function Vy(e){if(typeof e=="string")return e;if(iN(e))return oN(e,Vy)+"";if(sN(e))return QI?QI.call(e):"";var t=e+"";return t=="0"&&1/e==-aN?"-0":t}var lN=Vy,cN=lN;function uN(e){return e==null?"":cN(e)}var AN=uN,dN=Iu,gN=k6,fN=nN,pN=AN;function hN(e,t){return dN(e)?e:gN(e,t)?[e]:fN(pN(e))}var CN=hN,mN=up,EN=1/0;function IN(e){if(typeof e=="string"||mN(e))return e;var t=e+"";return t=="0"&&1/e==-EN?"-0":t}var BN=IN,vN=CN,yN=BN;function bN(e,t){t=vN(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[yN(t[n++])];return n&&n==r?e:void 0}var QN=bN,xN=QN;function wN(e,t,n){var r=e==null?void 0:xN(e,t);return r===void 0?n:r}var TN=wN;const PN=bo(TN),Hy=e=>{var Z,K;const{children:t,resource:n,source:r,label:o,disableActions:s=!1,disableAdd:l=!1,disableRemove:u=!1,className:A,empty:g,template:p={}}=e,[C,h]=w.useState(!1),{fields:m,remove:I,replace:B,append:v}=R.useArrayInput(e),{resetField:O}=cs.useFormContext(),j=Rt(),x=pe.useTranslate(),S=pe.useRecordContext(e),P=w.useRef(p||{}),L=pe.useTranslateLabel(),k=w.useCallback(V=>{I(V)},[I]);if(m.length>0){const{...V}=m[0];P.current=V;for(const G in P.current)P.current[G]=null}const q=w.useCallback((V=void 0)=>{let G=V;V==null&&(G=P.current,w.Children.count(t)===1&&D.isValidElement(w.Children.only(t))&&!w.Children.only(t).props.source&&w.Children.map(t,$=>D.isValidElement($)&&$.type!==pe.FormDataConsumer).some(Boolean)?G="":(G=G||{},w.Children.forEach(t,$=>{D.isValidElement($)&&$.type!==pe.FormDataConsumer&&$.props.source&&(G[$.props.source]=$.props.defaultValue??null)})));const F={...G,...p};v(F),O(`${r}.${m.length}`,{defaultValue:G})},[v,t,O,r,m.length,p]),J=V=>G=>{q(),V&&V(G)},U=w.useCallback(()=>{B([]),h(!1)},[B]),_=PN(S,r),le=w.useMemo(()=>({total:m.length,remove:k,source:r}),[m.length,k,r]),ie=j.palette.mode==="dark"?j.palette.grey.A400:j.palette.grey.A800;return m?f.jsx(Zg.Provider,{value:le,children:f.jsxs("div",{className:A,children:[D.cloneElement(f.jsx(Wy,{}),{label:o,source:r,disableAdd:l,template:p,onClick:J((K=(Z=e==null?void 0:e.addButton)==null?void 0:Z.props)==null?void 0:K.onClick)}),f.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${ie}`},children:f.jsxs(b.Table,{children:[f.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${ie}`},children:f.jsxs(b.TableRow,{children:[w.Children.map(t,(V,G)=>D.isValidElement(V)?f.jsx(b.TableCell,{children:f.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:L({...V.props,resource:n})})},G):null),!s&&f.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"top"},children:f.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none"})},"actions")]})}),f.jsxs(b.TableBody,{children:[m.length===0&&f.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:f.jsx(b.TableCell,{colSpan:4+(s?0:1),align:"center",children:g||f.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),m.length>0&&m.map((V,G)=>f.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${ie}}`},children:f.jsx(o6,{disableRemove:u,disableActions:s,index:G,member:`${r}.${G}`,onRemoveField:k,record:_&&_[G]||{},resource:n,source:r,children:t})},V.id))]})]})}),m.length>0&&f.jsx(R.Confirm,{isOpen:C,title:x("ra.action.clear_array_input"),content:x("ra.message.clear_array_input"),onConfirm:U,onClose:()=>h(!1)})]})}):null},Wy=e=>{const{label:t,disableAdd:n,onClick:r}=e,o=Rt(),s=o.palette.mode==="dark"?o.palette.grey.A400:o.palette.grey.A800,l=o.palette.mode==="light"?"#000000":"#FFFFFF";return f.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[t!==!1&&f.jsx(b.Typography,{children:t}),!n&&(D.isValidElement(e==null?void 0:e.addButton)?D.cloneElement(e==null?void 0:e.addButton,{onClick:r}):f.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${s}`},onClick:r,children:f.jsx(lt.PlusCircleOutlined,{style:{color:l}})}))]})},SN=ue(Hy,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));Wy.propTypes={label:c.oneOfType([c.string,c.bool]),source:c.string,defaultValue:c.any};Hy.propTypes={addButton:c.element,children:c.node,className:c.string,field:c.object,fields:c.array,fieldState:c.object,formState:c.object,record:c.object,source:c.string,label:c.oneOfType([c.string,c.bool]),resource:c.string,translate:c.func,disableAdd:c.bool,disableRemove:c.oneOfType([c.func,c.bool]),TransitionProps:c.shape({}),empty:c.oneOfType([c.node,c.string]),template:c.object};function RN(e,t){const n=Ce.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=Ce.chain(n.media).clone().extend(o).value();return Ce.extend(n,{media:s})}case"updateDrawer":{const s=Ce.chain(n.drawer).clone().extend(o).value();return Ce.extend(n,{drawer:s})}case"updateLogo":{const s=Ce.chain(n.logo).clone().extend(o).value();return Ce.extend(n,{logo:s})}case"updateNotifications":{const s=Ce.chain(n.notifications).clone().extend(o).value();return Ce.extend(n,{notifications:s})}case"updateTheme":{const s=Ce.chain(n.theme).clone().extend(o).value();return Ce.extend(n,{theme:s})}default:return n}}const ON={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},zy=w.createContext(void 0);function Uy(e){var J;const t=pe.useAuthProvider(),n=pe.useGetIdentity(),r=b.useTheme(),o=b.useMediaQuery(r.breakpoints.down("md")),s=b.useMediaQuery(r.breakpoints.down("lg")),l=b.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:u,isHorizontalLayout:A,menuOrientation:g,drawerWidth:p}=Fn(),C=A(g)&&!s,{drawerOpen:h,openDrawer:m}=Eo(),I=w.useCallback(()=>{m(!h)},[h,m]),[B,v]=w.useState(!1),[O,j]=w.useReducer(RN,Ce.chain(ON).clone().merge({drawer:{open:!u||h}}).value()),x=w.useCallback(()=>v(!1),[]),S=w.useMemo(()=>({state:O,dispatch:j}),[O,j]),{logoIcon:P,logoMain:L,enableNotification:k,notification:q}=e;return w.useEffect(()=>{j({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:l,horizontal:C}})},[g,o,s,l]),w.useEffect(()=>{j({type:"updateDrawer",payload:{open:h,width:p,handleDrawerToggle:I}})},[h,p,I]),w.useEffect(()=>{u||m(!l)},[l,u]),w.useEffect(()=>{j({type:"updateLogo",payload:{main:L,icon:P}})},[P,L]),w.useEffect(()=>{j({type:"updateNotifications",payload:{enable:k,resource:q??"entities/notification"}})},[k,q]),w.useEffect(()=>{j({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),w.useEffect(()=>{t.isImpersonating().then(U=>{var _;v(!U&&((_=n==null?void 0:n.data)==null?void 0:_.needToChangePassword)===!0)})},[(J=n==null?void 0:n.data)==null?void 0:J.needToChangePassword,t]),f.jsxs(zy.Provider,{value:S,children:[f.jsx(b.Dialog,{open:B,maxWidth:"xs",fullWidth:!0,children:f.jsx(rp,{onSuccess:x,firstAccess:!0})}),e.children]})}function Yy(e){return w.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s}=t;return f.jsx(Uy,{logoIcon:r,logoMain:o,enableNotification:s,children:f.jsx(e,{ref:n,...t})})})}function dp(){const e=w.useContext(zy);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function jN(){return dp().dispatch}function ms(){return dp().state}function nr(){return ms().media}function Ai(){return ms().drawer}function Gy(){return ms().logo}function Tu(){return ms().notifications}function Pu(){return ms().theme}function Ky(){const{iconColor:e,iconColorOpen:t}=Pu(),{open:n,handleDrawerToggle:r}=Ai();return f.jsx(vo,{"aria-label":"open drawer",onClick:r,edge:"start",color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:n?t:e,ml:{xs:0,lg:-2}},children:n?f.jsx(lt.MenuFoldOutlined,{}):f.jsx(lt.MenuUnfoldOutlined,{})})}function qy(e){const t=w.useRef(),n=b.useTheme(),{downLg:r,horizontal:o}=nr(),{open:s,width:l}=Ai(),u=r?b.AppBar:oB,A=ds(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${l}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),g={position:"fixed",color:"inherit",elevation:0,sx:A};return r||Ce.extend(g,{open:s}),f.jsx(u,{ref:t,...g,children:f.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&f.jsx(Ky,{}),e.children]})})}function MN(e){const t=b.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:l}=Tu(),u=pe.useNotify(),A=pe.useRedirect(),[g]=pe.useUpdate(l,{id:n==null?void 0:n.id,data:{...n,readed:qr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(A(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{u("resources.notifications.messages.readed.error","warning")}}),p=w.useCallback(()=>g(),[g]),[C]=pe.useLocaleState(),h=w.useMemo(()=>qr(n.created).locale(C).fromNow(),[n,C]);return f.jsx(b.ListItem,{disablePadding:!0,divider:s,children:f.jsxs(b.ListItemButton,{selected:o,onClick:p,children:[f.jsx(b.ListItemAvatar,{children:f.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:f.jsx(lt.MessageOutlined,{})})}),f.jsx(b.ListItemText,{primary:n.title,secondary:n.content}),f.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),f.jsx(b.ListItemText,{primary:h,primaryTypographyProps:{variant:"caption"}})]})})}const DN={width:36,height:36,fontSize:"1rem"},kN={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function Jy(){const{enable:e}=Tu();return e?f.jsx(FN,{}):null}function FN(){const e=b.useTheme(),t=w.useRef(),n=pe.useTranslate(),{resource:r}=Tu(),{downMd:o}=nr(),{iconColor:s,iconColorOpen:l}=Pu(),[u,A]=w.useState(!1),[g,p]=w.useState([]),C=g.filter(v=>v.readed===null).length,h=w.useCallback(()=>A(!u),[u]),m=w.useCallback(()=>{t.current&&t.current.contains(event.target)||A(!1)},[t.current,A]),{data:I,isLoading:B}=pe.useGetList(r,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}});return w.useEffect(()=>{!B&&I&&p(I??[])},[I,B]),f.jsxs(b.Box,{sx:{flexShrink:0},children:[f.jsx(vo,{color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:u?l:s},"aria-label":"open profile",ref:t,"aria-controls":u?"profile-grow":void 0,"aria-haspopup":"true",onClick:h,children:f.jsx(b.Badge,{badgeContent:C,color:"primary",children:f.jsx(lt.BellOutlined,{})})}),f.jsx(b.Popper,{placement:o?"bottom":"bottom-end",open:u,anchorEl:t.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[o?-5:0,9]}}]},children:({TransitionProps:v})=>f.jsx(yo,{type:"grow",position:o?"top":"top-right",in:open,...v,children:f.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[e.breakpoints.down("md")]:{maxWidth:285}},children:f.jsx(b.ClickAwayListener,{onClickAway:m,children:f.jsxs(Xn,{title:"Notification",elevation:0,border:!1,content:!1,secondary:f.jsx(f.Fragment,{children:C>0&&f.jsx(b.Tooltip,{title:"Mark as all read",children:f.jsx(vo,{color:"success",size:"small",children:f.jsx(lt.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[f.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":DN,"& .MuiListItemSecondaryAction-root":{...kN,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:g.map((O,j)=>f.jsx(MN,{selected:C>0,notification:O,onClick:h,divider:j<g.length-1},O.id))}),f.jsx(b.Divider,{}),f.jsx(b.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${r}`,LinkComponent:Bt.Link,onClick:m,children:f.jsx(b.ListItemText,{primary:f.jsx(b.Typography,{variant:"h6",color:"primary",children:n("ra.notification.view_all")})})})]})})})})})]})}const LN=()=>{const[e,t]=w.useState(!1),n=w.useCallback(()=>t(!1),[t]),r=w.useCallback(()=>t(!0),[t]),o=pe.useTranslate();return f.jsxs(w.Fragment,{children:[f.jsxs(b.ListItemButton,{onClick:r,children:[f.jsx(b.ListItemIcon,{children:f.jsx(Bn.Key,{})}),f.jsx(b.ListItemText,{primary:o("ra.auth.change_password")})]}),f.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(rp,{onSuccess:n})})]})},NN=()=>{const e=pe.useLogout(),t=pe.useTranslate();return f.jsx(w.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:e,children:[f.jsx(b.ListItemIcon,{children:f.jsx(Bn.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},VN=()=>{const e=pe.useTranslate(),t=pe.useAuthProvider(),n=w.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,o]=w.useState(!1);return w.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(s=>o(s))},[t,o]),r?f.jsx(w.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:n,children:[f.jsx(b.ListItemIcon,{children:f.jsx(Bn.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};c.node,c.any.isRequired,c.any.isRequired;const Xy=()=>{var B;const e=b.useTheme(),{identity:t}=R.useGetIdentity(),n=t!==void 0&&t.image&&t.image!==null&&t.image!=="",r=w.useRef(null),[o,s]=w.useState(!1),l=()=>{s(v=>!v)},u=v=>{r.current&&r.current.contains(v.target)||s(!1)},A=e.palette.mode==="dark"?"grey.200":"grey.300",g=R.useLogout(),p=R.useDataProvider(),C=R.useAuthProvider(),h=w.useCallback(()=>{g()},[C,g]),[m,I]=w.useState(null);return w.useEffect(()=>{if(!n)return;async function v(){var O=await p.getFile("/profile/me/image");I(O)}v()},[p,n]),f.jsxs(b.Box,{sx:{flexShrink:0},children:[f.jsx(b.ButtonBase,{sx:{p:.25,bgcolor:o?A:"transparent",borderRadius:1,"&:hover":{bgcolor:e.palette.mode==="dark"?"secondary.light":"secondary.lighter"},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},"aria-label":"open profile",ref:r,"aria-controls":o?"profile-grow":void 0,"aria-haspopup":"true",onClick:l,children:f.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[f.jsx(Ca,{alt:(B=t==null?void 0:t.name)==null?void 0:B.toUpperCase(),src:m,size:"xs"}),f.jsx(b.Typography,{variant:"subtitle1",children:t==null?void 0:t.name})]})}),f.jsx(b.Popper,{placement:"bottom-end",open:o,anchorEl:r.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:v})=>{var O;return f.jsx(yo,{type:"grow",position:"top-right",in:o,...v,children:f.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250}},children:f.jsx(b.ClickAwayListener,{onClickAway:u,children:f.jsxs(Xn,{elevation:0,border:!1,content:!1,children:[f.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:f.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[f.jsx(b.Grid,{item:!0,children:f.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[f.jsx(Ca,{alt:"profile user",src:m,sx:{width:32,height:32}}),f.jsxs(b.Stack,{children:[f.jsx(b.Typography,{variant:"h6",children:t==null?void 0:t.name}),f.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(O=t==null?void 0:t.roles)==null?void 0:O.map(j=>j.name.replace("ROLE_","")).join(",")})]})]})}),f.jsx(b.Grid,{item:!0,children:f.jsx(b.Tooltip,{title:"Logout",children:f.jsx(vo,{size:"large",sx:{color:"text.primary"},onClick:h,children:f.jsx(lt.LogoutOutlined,{})})})})]})}),f.jsx(b.Grid,{container:!0,children:f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[f.jsx(LN,{}),f.jsx(NN,{}),f.jsx(VN,{})]})})})]})})})})}})]})},Zy=e=>{const t=Rt(),{downMd:n}=nr(),{iconColor:r,iconColorOpen:o}=Pu(),[s,l]=w.useState(!1),u=w.useRef(null),A=w.useCallback(()=>{l(!s)},[s]),g=w.useCallback(p=>{u.current&&u.current.contains(p.target)||l(!1)},[]);return n?f.jsxs(f.Fragment,{children:[f.jsx(b.Box,{sx:{flexShrink:0},children:f.jsx(vo,{sx:{color:"text.primary",bgcolor:s?o:r},"aria-label":"open more menu",ref:u,"aria-controls":s?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:A,color:"secondary",variant:"light",children:f.jsx(lt.MoreOutlined,{})})}),f.jsx(b.Popper,{placement:"bottom-end",open:s,anchorEl:u.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:p})=>f.jsx(yo,{type:"fade",in:s,...p,children:f.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:f.jsx(b.ClickAwayListener,{onClickAway:g,children:f.jsx(b.AppBar,{color:"inherit",children:f.jsx(b.Toolbar,{children:e.children})})})})})})]}):f.jsx(f.Fragment,{children:e.children})};function _y(e){return f.jsx(b.Box,{...e,flex:1})}function ka(e){const{name:t,version:n}=e;return f.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:f.jsxs(b.Typography,{variant:"caption",children:[f.jsx("span",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.copy)||""}})," ",t," - ",n]})})}ka.propTypes={name:c.string.isRequired,version:c.string.isRequired,copy:c.string};ka.defaultProps={copy:"© Applica Software Guru for"};var $y={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})($y);var Su=$y.exports,Pd={};const HN=GR(S8);var xI;function Ru(){return xI||(xI=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=HN}(Pd)),Pd}function eb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=eb(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function tb(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=eb(e))&&(r&&(r+=" "),r+=t);return r}var WN="__lodash_hash_undefined__";function zN(e){return this.__data__.set(e,WN),this}var UN=zN;function YN(e){return this.__data__.has(e)}var GN=YN,KN=Fy,qN=UN,JN=GN;function Oc(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new KN;++t<n;)this.add(e[t])}Oc.prototype.add=Oc.prototype.push=qN;Oc.prototype.has=JN;var nb=Oc;function XN(e,t){return e.has(t)}var rb=XN;function ZN(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var ob=ZN;function _N(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var $N=_N,e7=cp,t7=yu,n7="[object Arguments]";function r7(e){return t7(e)&&e7(e)==n7}var o7=r7,wI=o7,i7=yu,ib=Object.prototype,s7=ib.hasOwnProperty,a7=ib.propertyIsEnumerable,l7=wI(function(){return arguments}())?wI:function(e){return i7(e)&&s7.call(e,"callee")&&!a7.call(e,"callee")},c7=l7,u7=9007199254740991;function A7(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=u7}var d7=A7;function g7(e){return function(t){return e(t)}}var f7=g7,p7=ky,h7=d7;function C7(e){return e!=null&&h7(e.length)&&!p7(e)}var m7=C7,E7=bu,I7=Bu,B7=E7(I7,"Set"),v7=B7,hg=globalThis&&globalThis.__assign||function(){return hg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},hg.apply(this,arguments)},y7=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},sb=function(e){var t=e.className,n=e.sx,r=y7(e,["className","sx"]),o=pe.useLoading(),s=Rt();return D.createElement(b7,{className:t,sx:n},o?D.createElement(Rf,hg({className:tb("app-loader",jc.loader),color:"inherit",size:s.spacing(2),thickness:6},r)):D.createElement(jb,{className:jc.loadedIcon}))};sb.propTypes={classes:c.object,className:c.string,width:c.string};var Cg="RaLoadingIndicator",jc={loader:"".concat(Cg,"-loader"),loadedIcon:"".concat(Cg,"-loadedIcon")},b7=ue("div",{name:Cg,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(jc.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(jc.loadedIcon)]={},t});const gp=e=>e.scrollTop;function os(e,t){var n,r;const{timeout:o,easing:s,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=l.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:l.transitionDelay}}const Q7=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function x7(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),s=As(t);let l;if(t.fakeTransform)l=t.fakeTransform;else{const g=s.getComputedStyle(t);l=g.getPropertyValue("-webkit-transform")||g.getPropertyValue("transform")}let u=0,A=0;if(l&&l!=="none"&&typeof l=="string"){const g=l.split("(")[1].split(")")[0].split(",");u=parseInt(g[4],10),A=parseInt(g[5],10)}return e==="left"?o?`translateX(${o.right+u-r.left}px)`:`translateX(${s.innerWidth+u-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-u}px)`:`translateX(-${r.left+r.width-u}px)`:e==="up"?o?`translateY(${o.bottom+A-r.top}px)`:`translateY(${s.innerHeight+A-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-A}px)`:`translateY(-${r.top+r.height-A}px)`}function ab(e){return typeof e=="function"?e():e}function Kl(e,t,n){const r=ab(n),o=x7(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const lb=D.forwardRef(function(t,n){const r=Rt(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:l,appear:u=!0,children:A,container:g,direction:p="down",easing:C=o,in:h,onEnter:m,onEntered:I,onEntering:B,onExit:v,onExited:O,onExiting:j,style:x,timeout:S=s,TransitionComponent:P=xf}=t,L=Ke(t,Q7),k=D.useRef(null),q=Mn(A.ref,k,n),J=F=>$=>{F&&($===void 0?F(k.current):F(k.current,$))},U=J((F,$)=>{Kl(p,F,g),gp(F),m&&m(F,$)}),_=J((F,$)=>{const H=os({timeout:S,style:x,easing:C},{mode:"enter"});F.style.webkitTransition=r.transitions.create("-webkit-transform",W({},H)),F.style.transition=r.transitions.create("transform",W({},H)),F.style.webkitTransform="none",F.style.transform="none",B&&B(F,$)}),le=J(I),ie=J(j),Z=J(F=>{const $=os({timeout:S,style:x,easing:C},{mode:"exit"});F.style.webkitTransition=r.transitions.create("-webkit-transform",$),F.style.transition=r.transitions.create("transform",$),Kl(p,F,g),v&&v(F)}),K=J(F=>{F.style.webkitTransition="",F.style.transition="",O&&O(F)}),V=F=>{l&&l(k.current,F)},G=D.useCallback(()=>{k.current&&Kl(p,k.current,g)},[p,g]);return D.useEffect(()=>{if(h||p==="down"||p==="right")return;const F=S0(()=>{k.current&&Kl(p,k.current,g)}),$=As(k.current);return $.addEventListener("resize",F),()=>{F.clear(),$.removeEventListener("resize",F)}},[p,h,g]),D.useEffect(()=>{h||G()},[h,G]),f.jsx(P,W({nodeRef:k,onEnter:U,onEntered:le,onEntering:_,onExit:Z,onExited:K,onExiting:ie,addEndListener:V,appear:u,in:h,timeout:S},L,{children:(F,$)=>D.cloneElement(A,W({ref:q,style:W({visibility:F==="exited"&&!h?"hidden":void 0},x,A.props.style)},$))}))});process.env.NODE_ENV!=="production"&&(lb.propTypes={addEndListener:c.func,appear:c.bool,children:us.isRequired,container:Tr(c.oneOfType([oi,c.func]),e=>{if(e.open){const t=ab(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
218
|
+
`),U8)),Nv=D.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:l=!1,size:u=40,style:A,thickness:g=3.6,value:p=0,variant:C="indeterminate"}=r,h=Ke(r,W8),m=W({},r,{color:s,disableShrink:l,size:u,thickness:g,value:p,variant:C}),I=Y8(m),B={},v={},O={};if(C==="determinate"){const j=2*Math.PI*((so-g)/2);B.strokeDasharray=j.toFixed(3),O["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*j).toFixed(3)}px`,v.transform="rotate(-90deg)"}return f.jsx(G8,W({className:Ge(I.root,o),style:W({width:u,height:u},v,A),ownerState:m,ref:n,role:"progressbar"},O,h,{children:f.jsx(K8,{className:I.svg,ownerState:m,viewBox:`${so/2} ${so/2} ${so} ${so}`,children:f.jsx(q8,{className:I.circle,style:B,ownerState:m,cx:so,cy:so,r:(so-g)/2,fill:"none",strokeWidth:g})})}))});process.env.NODE_ENV!=="production"&&(Nv.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:Tr(c.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:c.oneOfType([c.number,c.string]),style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),thickness:c.number,value:c.number,variant:c.oneOf(["determinate","indeterminate"])});const Rf=Nv;function J8(e){return Nt("MuiLoadingButton",e)}const X8=Ut("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),Nr=X8,Z8=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],_8=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Pe(n)}`],endIcon:[t&&`endIconLoading${Pe(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Pe(n)}`]},s=yr.unstable_composeClasses(o,J8,r);return W({},r,s)},$8=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",eF=ue(V8,{shouldForwardProp:e=>$8(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Nr.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Nr.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>W({[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},e.loadingPosition==="center"&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${Nr.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),tF=ue("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Pe(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>W({position:"absolute",visibility:"visible",display:"flex"},t.loadingPosition==="start"&&(t.variant==="outlined"||t.variant==="contained")&&{left:t.size==="small"?10:14},t.loadingPosition==="start"&&t.variant==="text"&&{left:6},t.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},t.loadingPosition==="end"&&(t.variant==="outlined"||t.variant==="contained")&&{right:t.size==="small"?10:14},t.loadingPosition==="end"&&t.variant==="text"&&{right:6},t.loadingPosition==="start"&&t.fullWidth&&{position:"relative",left:-10},t.loadingPosition==="end"&&t.fullWidth&&{position:"relative",right:-10})),Vv=D.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiLoadingButton"}),{children:o,disabled:s=!1,id:l,loading:u=!1,loadingIndicator:A,loadingPosition:g="center",variant:p="text"}=r,C=Ke(r,Z8),h=Og(l),m=A??f.jsx(Rf,{"aria-labelledby":h,color:"inherit",size:16}),I=W({},r,{disabled:s,loading:u,loadingIndicator:m,loadingPosition:g,variant:p}),B=_8(I),v=u?f.jsx(tF,{className:B.loadingIndicator,ownerState:I,children:m}):null;return f.jsxs(eF,W({disabled:s||u,id:h,ref:n},C,{variant:p,classes:B,ownerState:I,children:[I.loadingPosition==="end"?o:v,I.loadingPosition==="end"?v:o]}))});process.env.NODE_ENV!=="production"&&(Vv.propTypes={children:c.node,classes:c.object,disabled:c.bool,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:Tr(c.oneOf(["start","end","center"]),e=>e.loadingPosition==="start"&&!e.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):e.loadingPosition==="end"&&!e.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});const nF=Vv;function xd({variant:e,theme:t,color:n,loadingPosition:r}){const o=an(t,n),{lighter:s,main:l,dark:u,contrastText:A}=o,g=`${n}Button`,p=gs(t,g),C={"& .MuiLoadingButton-loadingIndicator":{color:l}},h={...r&&r!=="center"&&{color:l}},m={"&::after":{boxShadow:`0 0 6px 6px ${We(l,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${We(l,.9)}`},"&:focus-visible":{outline:`2px solid ${u}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"light":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"shadow":return{boxShadow:p,backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:u,color:A},...m};case"outlined":return{backgroundColor:"transparent",borderColor:l,...h,...C};case"dashed":return{backgroundColor:s,borderColor:l,...h,...C,...m};case"text":default:return{color:l,...C,...m}}}const rF=ue(nF,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:o,loadingPosition:s})=>({"::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:n==="rounded"?"50%":4,opacity:0,transition:"all 0.5s"},":active::after":{position:"absolute",borderRadius:n==="rounded"?"50%":4,left:0,top:0,opacity:1,transition:"0s"},...t==="text"&&{...xd({variant:t,theme:e,color:r,loadingPosition:s}),"&.MuiButton-sizeMedium":{height:36},"&.MuiButton-sizeSmall":{height:30},"&.MuiButton-sizeLarge":{height:44}},...n&&{minWidth:0,"&.MuiButton-sizeMedium":{width:36,height:36},"&.MuiButton-sizeSmall":{width:30,height:30},"&.MuiButton-sizeLarge":{width:44,height:44},...n==="rounded"&&{borderRadius:"50%"}},...t==="outlined"&&{border:"1px solid"},...t==="dashed"&&{border:"1px dashed"},...(t==="contained"||t==="shadow")&&!o&&{color:"#fff"},...t!=="text"&&{...xd({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{...xd({variant:t,theme:e,color:r,loadingPosition:s})}}})),Of=w.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...o},s)=>{const l=Rt();return f.jsx(rF,{ref:s,variant:e,shape:t,theme:l,loadingPosition:o.loadingPosition,loading:o.loading,color:r,...o,children:n})});Of.propTypes={variant:c.string,shape:c.string,children:c.node,color:c.string};Of.displayName="LoadingButton";function oF({color:e,theme:t,labelColor:n}){const r=an(t,e),{main:o,contrastText:s}=r;let l=e||"";return["primary","secondary","info","success","warning","error"].includes(l)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:o,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:o}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:l,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:l}}}const iF=ue(({className:e,...t})=>f.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&oF({color:t,theme:e,labelColor:n})}));function Hv({children:e,arrow:t,labelColor:n="",...r}){const o=Rt();return f.jsx(b.Box,{display:"flex",children:f.jsx(iF,{arrow:t,...r,theme:o,labelColor:n,children:e})})}Hv.propTypes={children:c.element,arrow:c.bool,labelColor:c.string,rest:c.array};const yo=w.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...o},s)=>{let l={transformOrigin:"0 0 0"};switch(t){case"top-right":l={transformOrigin:"top right"};break;case"top":l={transformOrigin:"top"};break;case"bottom-left":l={transformOrigin:"bottom left"};break;case"bottom-right":l={transformOrigin:"bottom right"};break;case"bottom":l={transformOrigin:"bottom"};break;case"top-left":default:l={transformOrigin:"0 0 0"};break}return f.jsxs(b.Box,{ref:s,children:[n==="grow"&&f.jsx(b.Grow,{...o,timeout:{appear:0,enter:150,exit:150},children:f.jsx(b.Box,{sx:l,children:e})}),n==="collapse"&&f.jsx(b.Collapse,{...o,sx:l,children:e}),n==="fade"&&f.jsx(b.Fade,{...o,timeout:{appear:0,enter:300,exit:150},children:f.jsx(b.Box,{sx:l,children:e})}),n==="slide"&&f.jsx(b.Slide,{...o,timeout:{appear:0,enter:150,exit:150},direction:r,children:f.jsx(b.Box,{sx:l,children:e})}),n==="zoom"&&f.jsx(b.Zoom,{...o,children:f.jsx(b.Box,{sx:l,children:e})})]})});yo.propTypes={children:c.node,type:c.oneOf(["grow","fade","collapse","slide","zoom"]),position:c.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:c.oneOf(["up","down","left","right"])};w.forwardRef(function(t,n){return f.jsx(b.Zoom,{ref:n,timeout:200,...t})});function Wv({value:e,...t}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Wv.propTypes={value:c.number};function zv({value:e,size:t,variant:n,thickness:r,showLabel:o,pathColor:s,sx:l,...u}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",sx:{color:s||"grey.200"},size:t,thickness:r,...u,value:100}),o&&f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),f.jsx(b.CircularProgress,{variant:n,sx:{...l,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...u})]})}zv.propTypes={value:c.number,size:c.number,variant:c.string,thickness:c.number,showLabel:c.bool,pathColor:c.string,sx:c.array,others:c.array};function Uv({icon:e,value:t,...n}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),f.jsx(b.Box,{sx:{minWidth:35},children:e})]})}Uv.propTypes={icon:c.node,value:c.number};function Yv({value:e,...t}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),f.jsx(b.Box,{sx:{minWidth:35},children:f.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Yv.propTypes={value:c.number};const Gv=w.createContext({});function sF(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=R.useResourceContext(),o=R.useDataProvider(),{search:s}=Zi.useLocation(),l=`${r}/new`,u=w.useCallback(()=>{if(!t||!Ce.isFunction(o.get))return Promise.resolve({});const h={};return new URLSearchParams(s??"").forEach((m,I)=>{h[I]=m}),o.get(l,h).then(m=>m.data).then(m=>{const{responseCode:I,value:B}=m;return I==="ok"?B:Promise.reject(m)})},[r,t,s,o]),A=w.useMemo(()=>Ce.chain(n).extend({queryKey:[r,s],queryFn:u}).value(),[r,s,u,n]),{data:g,isLoading:p}=Pg.useQuery(A),C=Ce.omit(e,["useDefaults"]);return p?f.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:f.jsx(b.CircularProgress,{})}):f.jsx(Gv.Provider,{value:g??{},children:f.jsx(R.Create,{...C})})}function aF(){return w.useContext(Gv)}const lF=ue(sF,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main>.MuiPaper-root:first-of-type":{overflow:"visible",backgroundColor:e.palette.background.default}})),cF=Ta(R.Toolbar,{name:"RaApplicaToolbar",slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}})),fr=e=>f.jsx(cF,{...e});fr.defaultProps={...R.Toolbar.defaultProps};fr.propTypes={...R.Toolbar.propTypes};const jf=({children:e,content:t,title:n,subheader:r,secondary:o,toolbar:s,...l})=>{const u=R.useTranslate(),A=R.useResourceContext(),{cardTitle:g,cardSubheader:p}=w.useMemo(()=>{const C=n||`resources.${A}.title`;return{cardTitle:u(C,{_:C}),cardSubheader:r!==null?u(r,{_:r}):null}},[A,r,n,u]);return f.jsx(b.Grid,{item:!0,...l,children:f.jsx(Xn,{content:t,title:g,subheader:p,secondary:o,divider:!0,children:f.jsxs(w.Fragment,{children:[e,s===!0?f.jsx(fr,{children:f.jsx(R.SaveButton,{})}):s]})})})};jf.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12};jf.propTypes={...b.Grid.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),contained:c.bool,content:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object]),spacing:c.number,toolbar:c.oneOfType([c.node,c.bool])};const uF=ue(R.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),fu=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:o}=Fn();return f.jsx(uF,{defaultValues:n,spacing:t||o,children:f.jsx(b.Grid,{container:!0,...r,spacing:t||o,children:e})})};fu.propTypes={...b.Grid.propTypes,...R.Form.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),spacing:c.number,defaultValues:c.oneOfType([c.object,c.func]),record:c.object,validate:c.func};fu.defaultProps={...b.Stack.defaultProps};fu.Section=jf;const AF=Ta(R.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?0:1)},[e.breakpoints.down("sm")]:{paddingBottom:0}})),pu=({title:e,modal:t,content:n,subheader:r,secondary:o,sx:s,...l})=>{const u=tf(e),A=R.useRecordContext();return f.jsx(Xn,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?o:null,sx:{...s,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!t,divider:!0,children:f.jsx(AF,{toolbar:f.jsx(fr,{}),...l})})};pu.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:f.jsx(fr,{children:f.jsx(R.SaveButton,{type:"button"})}),secondary:f.jsx(ai,{children:f.jsx(R.DeleteWithConfirmButton,{})})};pu.propTypes={...R.SimpleForm.propTypes,modal:c.bool,content:c.bool,contained:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object])};const hu=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=_t.useTheme(),{getCurrentDialog:g}=li(),{source:p,resource:C,isRequired:h}=u,{getFieldState:m,formState:I}=cs.useFormContext(),{error:B}=m(p,I),v=g();return f.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:!!B,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:f.jsx(R.FieldTitle,{label:e,source:p,resource:v||C,isRequired:h})}),w.isValidElement(t)?w.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!B,children:r})]})};hu.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool};hu.defaultProps={display:"label",divider:!1};const dF=ue(R.ArrayInput,{name:"ApplicaArrayInput",slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}})),gF=({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s})=>f.jsx(hu,{label:e,addLabel:t,source:n,helperText:r,divider:o,children:f.jsx(dF,{source:n,label:!1,...s})}),Mf=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:f.jsxs(ai,{children:[e&&f.jsx(R.EditButton,{}),t&&f.jsx(R.DeleteWithConfirmButton,{}),n&&f.jsx(R.CloneButton,{})]});Mf.defaultProps={canEdit:!0,canDelete:!0,canClone:!1};Mf.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const hI=ue("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),fF=ue("ul")({display:"inline-block"}),Kv=e=>{var p;const{className:t,emptyText:n,source:r,title:o,...s}=e,l=pe.useRecordContext(e),u=dt.get(l,r),A=pe.useTranslate();if(!u)return n?f.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&A(n,{_:n})}):f.jsx(hI,{className:t,...s});if(Array.isArray(u))return f.jsx(fF,{className:t,...s,children:u.map((C,h)=>{var I;const m=o instanceof String?(I=dt.get(C,o))==null?void 0:I.toString():o;return f.jsx("li",{children:m},h)})});const g=o instanceof String?(p=dt.get(l,o))==null?void 0:p.toString():o;return f.jsx(hI,{className:t,...s,children:g})};Kv.propTypes={className:c.string,emptyText:c.string,source:c.string.isRequired,src:c.string,title:c.oneOfType([c.string,c.element]),target:c.string,download:c.oneOfType([c.bool,c.string]),ping:c.string,rel:c.string};var qv={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Jn,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",l="second",u="minute",A="hour",g="day",p="week",C="month",h="quarter",m="year",I="date",B="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var K=["th","st","nd","rd"],V=Z%100;return"["+Z+(K[(V-20)%10]||K[V]||K[0])+"]"}},x=function(Z,K,V){var G=String(Z);return!G||G.length>=K?Z:""+Array(K+1-G.length).join(V)+Z},S={s:x,z:function(Z){var K=-Z.utcOffset(),V=Math.abs(K),G=Math.floor(V/60),F=V%60;return(K<=0?"+":"-")+x(G,2,"0")+":"+x(F,2,"0")},m:function Z(K,V){if(K.date()<V.date())return-Z(V,K);var G=12*(V.year()-K.year())+(V.month()-K.month()),F=K.clone().add(G,C),$=V-F<0,H=K.clone().add(G+($?-1:1),C);return+(-(G+(V-F)/($?F-H:H-F))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:C,y:m,w:p,d:g,D:I,h:A,m:u,s:l,ms:s,Q:h}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},P="en",L={};L[P]=j;var k="$isDayjsObject",q=function(Z){return Z instanceof le||!(!Z||!Z[k])},J=function Z(K,V,G){var F;if(!K)return P;if(typeof K=="string"){var $=K.toLowerCase();L[$]&&(F=$),V&&(L[$]=V,F=$);var H=K.split("-");if(!F&&H.length>1)return Z(H[0])}else{var X=K.name;L[X]=K,F=X}return!G&&F&&(P=F),F||!G&&P},U=function(Z,K){if(q(Z))return Z.clone();var V=typeof K=="object"?K:{};return V.date=Z,V.args=arguments,new le(V)},_=S;_.l=J,_.i=q,_.w=function(Z,K){return U(Z,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var le=function(){function Z(V){this.$L=J(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[k]=!0}var K=Z.prototype;return K.parse=function(V){this.$d=function(G){var F=G.date,$=G.utc;if(F===null)return new Date(NaN);if(_.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var H=F.match(v);if(H){var X=H[2]-1||0,Ae=(H[7]||"0").substring(0,3);return $?new Date(Date.UTC(H[1],X,H[3]||1,H[4]||0,H[5]||0,H[6]||0,Ae)):new Date(H[1],X,H[3]||1,H[4]||0,H[5]||0,H[6]||0,Ae)}}return new Date(F)}(V),this.init()},K.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},K.$utils=function(){return _},K.isValid=function(){return this.$d.toString()!==B},K.isSame=function(V,G){var F=U(V);return this.startOf(G)<=F&&F<=this.endOf(G)},K.isAfter=function(V,G){return U(V)<this.startOf(G)},K.isBefore=function(V,G){return this.endOf(G)<U(V)},K.$g=function(V,G,F){return _.u(V)?this[G]:this.set(F,V)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(V,G){var F=this,$=!!_.u(G)||G,H=_.p(V),X=function(he,Ie){var Qe=_.w(F.$u?Date.UTC(F.$y,Ie,he):new Date(F.$y,Ie,he),F);return $?Qe:Qe.endOf(g)},Ae=function(he,Ie){return _.w(F.toDate()[he].apply(F.toDate("s"),($?[0,0,0,0]:[23,59,59,999]).slice(Ie)),F)},ge=this.$W,ce=this.$M,de=this.$D,fe="set"+(this.$u?"UTC":"");switch(H){case m:return $?X(1,0):X(31,11);case C:return $?X(1,ce):X(0,ce+1);case p:var Be=this.$locale().weekStart||0,me=(ge<Be?ge+7:ge)-Be;return X($?de-me:de+(6-me),ce);case g:case I:return Ae(fe+"Hours",0);case A:return Ae(fe+"Minutes",1);case u:return Ae(fe+"Seconds",2);case l:return Ae(fe+"Milliseconds",3);default:return this.clone()}},K.endOf=function(V){return this.startOf(V,!1)},K.$set=function(V,G){var F,$=_.p(V),H="set"+(this.$u?"UTC":""),X=(F={},F[g]=H+"Date",F[I]=H+"Date",F[C]=H+"Month",F[m]=H+"FullYear",F[A]=H+"Hours",F[u]=H+"Minutes",F[l]=H+"Seconds",F[s]=H+"Milliseconds",F)[$],Ae=$===g?this.$D+(G-this.$W):G;if($===C||$===m){var ge=this.clone().set(I,1);ge.$d[X](Ae),ge.init(),this.$d=ge.set(I,Math.min(this.$D,ge.daysInMonth())).$d}else X&&this.$d[X](Ae);return this.init(),this},K.set=function(V,G){return this.clone().$set(V,G)},K.get=function(V){return this[_.p(V)]()},K.add=function(V,G){var F,$=this;V=Number(V);var H=_.p(G),X=function(ce){var de=U($);return _.w(de.date(de.date()+Math.round(ce*V)),$)};if(H===C)return this.set(C,this.$M+V);if(H===m)return this.set(m,this.$y+V);if(H===g)return X(1);if(H===p)return X(7);var Ae=(F={},F[u]=r,F[A]=o,F[l]=n,F)[H]||1,ge=this.$d.getTime()+V*Ae;return _.w(ge,this)},K.subtract=function(V,G){return this.add(-1*V,G)},K.format=function(V){var G=this,F=this.$locale();if(!this.isValid())return F.invalidDate||B;var $=V||"YYYY-MM-DDTHH:mm:ssZ",H=_.z(this),X=this.$H,Ae=this.$m,ge=this.$M,ce=F.weekdays,de=F.months,fe=F.meridiem,Be=function(Ie,Qe,ae,Ne){return Ie&&(Ie[Qe]||Ie(G,$))||ae[Qe].slice(0,Ne)},me=function(Ie){return _.s(X%12||12,Ie,"0")},he=fe||function(Ie,Qe,ae){var Ne=Ie<12?"AM":"PM";return ae?Ne.toLowerCase():Ne};return $.replace(O,function(Ie,Qe){return Qe||function(ae){switch(ae){case"YY":return String(G.$y).slice(-2);case"YYYY":return _.s(G.$y,4,"0");case"M":return ge+1;case"MM":return _.s(ge+1,2,"0");case"MMM":return Be(F.monthsShort,ge,de,3);case"MMMM":return Be(de,ge);case"D":return G.$D;case"DD":return _.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return Be(F.weekdaysMin,G.$W,ce,2);case"ddd":return Be(F.weekdaysShort,G.$W,ce,3);case"dddd":return ce[G.$W];case"H":return String(X);case"HH":return _.s(X,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return he(X,Ae,!0);case"A":return he(X,Ae,!1);case"m":return String(Ae);case"mm":return _.s(Ae,2,"0");case"s":return String(G.$s);case"ss":return _.s(G.$s,2,"0");case"SSS":return _.s(G.$ms,3,"0");case"Z":return H}return null}(Ie)||H.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(V,G,F){var $,H=this,X=_.p(G),Ae=U(V),ge=(Ae.utcOffset()-this.utcOffset())*r,ce=this-Ae,de=function(){return _.m(H,Ae)};switch(X){case m:$=de()/12;break;case C:$=de();break;case h:$=de()/3;break;case p:$=(ce-ge)/6048e5;break;case g:$=(ce-ge)/864e5;break;case A:$=ce/o;break;case u:$=ce/r;break;case l:$=ce/n;break;default:$=ce}return F?$:_.a($)},K.daysInMonth=function(){return this.endOf(C).$D},K.$locale=function(){return L[this.$L]},K.locale=function(V,G){if(!V)return this.$L;var F=this.clone(),$=J(V,G,!0);return $&&(F.$L=$),F},K.clone=function(){return _.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},Z}(),ie=le.prototype;return U.prototype=ie,[["$ms",s],["$s",l],["$m",u],["$H",A],["$W",g],["$M",C],["$y",m],["$D",I]].forEach(function(Z){ie[Z[1]]=function(K){return this.$g(K,Z[0],Z[1])}}),U.extend=function(Z,K){return Z.$i||(Z(K,le,U),Z.$i=!0),U},U.locale=J,U.isDayjs=q,U.unix=function(Z){return U(1e3*Z)},U.en=L[P],U.Ls=L,U.p={},U})})(qv);var pF=qv.exports;const qr=bo(pF),Df=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...o})=>{const[s,l]=w.useState(null),u=R.useRecordContext(o),A=R.useDataProvider(),g=R.useResourceContext(),p=w.useCallback(async m=>{m.preventDefault(),m.stopPropagation();const I=dt.get(u,o==null?void 0:o.source),B=g.replace("entities/",""),v=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(o==null?void 0:o.source)}/${(I==null?void 0:I.id)||(u==null?void 0:u.id)}`),O=document.createElement("a");O.href=v,O.download=dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source)),O.click()},[A,u,e,g,t,o==null?void 0:o.source,o==null?void 0:o.title]),C=w.useMemo(()=>({...u,[o==null?void 0:o.source]:(u==null?void 0:u.src)||dt.get(u,o==null?void 0:o.source),[o==null?void 0:o.title]:(u==null?void 0:u.title)||dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),[u,o==null?void 0:o.source,o==null?void 0:o.title]),h=R.useTranslate();return w.useEffect(()=>{!u||!(u!=null&&u.userId)||A.getOne(r,{id:u==null?void 0:u.userId}).then(({data:m})=>l(m)).catch(()=>l(null))},[u,A,r]),f.jsx(Kv,{...o,disabled:n,record:C,onClick:p,title:f.jsxs(b.Box,{sx:{cursor:"pointer"},children:[f.jsx(b.Typography,{variant:"subtitle1",children:dt.get(C,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),f.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[dt.get(C,"sizeDescription"),s&&" | ",s&&h("ra.attachment.info",{user:s==null?void 0:s.name,created:qr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};Df.propTypes={...R.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const hF=ue(R.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Ma=e=>{const t=`_${e==null?void 0:e.source}`;return f.jsx(hF,{...e,source:t})};Ma.propTypes={...R.ImageField.propTypes,source:c.string};const Cu=({width:e,height:t,circle:n,justify:r,record:o,...s})=>{const l=w.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5}),[e,t,n]),u=R.useRecordContext(),A=o||u;return f.jsx(Ma,{sx:g=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${g.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...s,record:A})};Cu.defaultProps={...Ma.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"};Cu.propTypes={...Ma.propTypes,width:c.oneOfType([c.number,c.string]),height:c.oneOfType([c.number,c.string]),circle:c.bool,justify:c.oneOf(["flex-start","center","flex-end"])};var Jv={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Jn,function(){return function(n,r,o){n=n||{};var s=r.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(g,p,C,h){return s.fromToBase(g,p,C,h)}o.en.relativeTime=l,s.fromToBase=function(g,p,C,h,m){for(var I,B,v,O=C.$locale().relativeTime||l,j=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],x=j.length,S=0;S<x;S+=1){var P=j[S];P.d&&(I=h?o(g).diff(C,P.d,!0):C.diff(g,P.d,!0));var L=(n.rounding||Math.round)(Math.abs(I));if(v=I>0,L<=P.r||!P.r){L<=1&&S>0&&(P=j[S-1]);var k=O[P.l];m&&(L=m(""+L)),B=typeof k=="string"?k.replace("%d",L):k(L,p,P.l,v);break}}if(p)return B;var q=v?O.future:O.past;return typeof q=="function"?q(B):q.replace("%s",B)},s.to=function(g,p){return u(g,p,this,!0)},s.from=function(g,p){return u(g,p,this)};var A=function(g){return g.$u?o.utc():o()};s.toNow=function(g){return this.to(A(this),g)},s.fromNow=function(g){return this.from(A(this),g)}}})})(Jv);var CF=Jv.exports;const mF=bo(CF);qr.extend(mF);const mu=e=>{const t=R.useRecordContext(e),[n]=R.useLocaleState(),r=w.useMemo(()=>qr(dt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return f.jsxs(w.Fragment,{children:[f.jsx(R.DateField,{record:t,source:e.source,showTime:!0}),f.jsx("br",{}),f.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};mu.displayName="DateAgoField";mu.propTypes={source:c.string.isRequired};const Xv=ue(R.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));Xv.propTypes={...R.DateField.propTypes};const kf=e=>f.jsx(Xv,{...e});kf.defaultProps={...R.DateField.defaultProps,variant:"body1"};kf.propTypes={...R.DateField.propTypes};const Zv=ue(R.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Zv.propTypes={...R.EmailField.propTypes};const Ff=e=>f.jsx(Zv,{...e});Ff.defaultProps={...R.EmailField.defaultProps,variant:"body1"};Ff.propTypes={...R.EmailField.propTypes};const EF=ue(R.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),Lf=({...e})=>{const t=R.useRecordContext(e),n=w.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=dt.get(t,`_${e==null?void 0:e.source}`,dt.get(t,e==null?void 0:e.source)),s=dt.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=o,l.download=s,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return f.jsx(EF,{...e,record:t,onClick:n})};Lf.propTypes={...R.FileField.propTypes,source:c.string,title:c.string};const _v=e=>f.jsx(R.FunctionField,{...e});_v.defaultProps={variant:"body1"};const IF=ue("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),Nf=({source:e,defaultValue:t,...n})=>{const r=R.useRecordContext(n),o=dt.get(r,e,t);return f.jsx("span",{dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})};Nf.propTypes={defaultValue:c.any,source:c.string,record:c.object};Nf.defaultProps={defaultValue:" "};const $v=({title:e,children:t})=>e&&e!==!1?f.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;$v.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const Vf=({label:e,source:t,defaultValue:n,children:r,tooltip:o,...s})=>{const{getCurrentDialog:l}=li(),u=R.useRecordContext(s),A=R.useResourceContext(s),g=l(),p=w.useMemo(()=>!o||o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?dt.get(u,o,o):o,[u,o]);return f.jsx($v,{title:p,children:f.jsxs(w.Fragment,{children:[f.jsx(b.InputLabel,{children:f.jsx(R.FieldTitle,{label:e,source:t,resource:g||A})}),f.jsx(IF,{...s,children:w.cloneElement(r,{source:t,record:u,defaultValue:n,resource:g||A})})]})})};Vf.propTypes={defaultValue:c.any,tooltip:c.oneOfType([c.string,c.bool,c.func]),source:c.string,label:c.string,name:c.string,children:c.element};Vf.defaultProps={defaultValue:" ",children:f.jsx(Nf,{})};const Hf=function({children:e,className:t}){return f.jsx("div",{className:t,children:e})};Hf.defaultProps={children:null,className:""};Hf.propTypes={children:c.node,className:c.string};const BF=Ta(Hf,{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n,bulkActionButtons:r})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& form":{padding:e.spacing(2)},"& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{[e.breakpoints.up("sm")]:{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2),marginRight:e.spacing(t?1:2),width:t?"auto":`calc(100% - ${e.spacing(5)})`},[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:r===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 34px)"}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:48,bottom:-56,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)},[e.breakpoints.down("sm")]:{bottom:-48,borderRadius:0}}})),fs=e=>f.jsx(BF,{...e,children:f.jsx(R.ReferenceManyField,{pagination:f.jsx(R.Pagination,{}),...e})});fs.defaultProps={margin:!1,border:!1};fs.propTypes={...R.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const ey=({source:e,...t})=>{const n=R.useRecordContext(t),r=dt.get(n,e,0),o=r/1024,s=o/1024,l=s/1024,u=l>1?`${l.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return f.jsx(b.Typography,{component:"span",variant:"body1",...t,children:u})};ey.propTypes={record:c.object,source:c.string};const ty=ue(R.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));ty.propTypes={...R.TextField.propTypes};const Wf=e=>f.jsx(ty,{...e});Wf.defaultProps={...R.TextField.defaultProps,variant:"body1"};Wf.propTypes={...R.TextField.propTypes};const ut=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=_t.useTheme(),{getCurrentDialog:g}=li(),{source:p,resource:C,isRequired:h}=u,{fieldState:{invalid:m}}=R.useInput(u),I=g();return f.jsxs(b.Stack,{spacing:1,sx:{width:u!=null&&u.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:m?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:m===!0,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:f.jsx(R.FieldTitle,{label:e,source:p,resource:I||C,isRequired:h})}),w.isValidElement(t)?w.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:m===!0,children:r})]})};ut.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool};ut.defaultProps={display:"label",divider:!1};const vF=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},yF=ue(R.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...vF(e)})),zf=({children:e,disabled:t,type:n,...r})=>{const o=R.useRecordContext(r),s=r==null?void 0:r.source,l=o==null?void 0:o.id;return R.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),f.jsx(ut,{...r,children:f.jsx(yF,{disabled:t,children:w.cloneElement(e,{...e.props,entityId:l,property:s})})})};zf.propTypes={...R.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool};zf.defaultProps={children:f.jsx(Df,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const bF=ue(R.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"}})),Uf=({...e})=>f.jsx(ut,{...e,children:f.jsx(bF,{})});Uf.propTypes={...R.AutocompleteArrayInput.propTypes,...ut.propTypes};Uf.defaultProps={...R.AutocompleteArrayInput.defaultProps,size:"small"};const QF=ue(R.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall":{paddingTop:"4px"}})),Yf=e=>{const{perPage:t,...n}=e;return f.jsx(ut,{...n,children:f.jsx(QF,{})})};Yf.propTypes={...R.AutocompleteInput.propTypes,...ut.propTypes};Yf.defaultProps={...R.AutocompleteInput.defaultProps,size:"small"};const xF=ue(R.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),Gf=({horizontal:e,...t})=>{const n=Rt();return f.jsx(ut,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:f.jsx(xF,{})})};Gf.defaultProps={...R.BooleanInput.defaultProps,...ut.defaultProps};Gf.propTypes={...R.BooleanInput.propTypes,...ut.propTypes,horizontal:c.bool};const wF=ue(R.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Kf=e=>f.jsx(ut,{...e,children:f.jsx(wF,{})});Kf.propTypes={...R.DateInput.propTypes,...ut.propTypes};Kf.defaultProps={...R.DateInput.defaultProps,...ut.defaultProps};const TF=ue(R.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),qf=e=>f.jsx(ut,{...e,children:f.jsx(TF,{})});qf.propTypes={...R.DateTimeInput.propTypes,...ut.propTypes};qf.defaultProps={...ut.defaultProps};const PF=ue(R.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}})),Jf=({children:e,title:t,...n})=>{const r=cs.useWatch({name:n.source}),o=R.useRecordContext(n),{source:s}=n,l=w.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=dt.get(o,s);if(u){const A=u.split("__");return A.length>0?A[A.length-1]:u}return u},[o,s,r]);return f.jsx(ut,{...n,children:f.jsx(PF,{children:w.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`),[t||s]:l}})})})};Jf.propTypes={...R.FileInput.propTypes,source:c.string,title:c.string,children:c.node};Jf.defaultProps={children:f.jsx(Lf,{})};const Xf=({children:e,title:t,...n})=>{const r=cs.useWatch({name:n.source}),o=R.useRecordContext(n),{source:s}=n;return R.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),f.jsx(ut,{...n,children:f.jsx(R.ImageInput,{accept:"image/*",children:w.cloneElement(e,{...e.props,title:t,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`)}})})})};Xf.defaultProps={children:f.jsx(Cu,{}),multiple:!1};Xf.propTypes={...R.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const SF=ue(R.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Zf=e=>f.jsx(ut,{...e,children:f.jsx(SF,{})});Zf.propTypes={...R.NumberInput.propTypes,...ut.propTypes};Zf.defaultProps={...R.NumberInput.defaultProps,...ut.defaultProps};const ny=({source:e,minWidth:t=300,children:n})=>{const r=R.useResourceContext(),o=R.useRecordContext(),[s,l]=w.useState(dt.get(o,e,"")),[u,A]=w.useState(!1),g=w.useCallback(I=>l(I.target.value),[]),p=R.useDataProvider(),C=w.useCallback(I=>{I.key==="Enter"&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,o,e]),h=w.useCallback(()=>{dt.get(o,e)!==s&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,e,o]),m=w.useCallback(I=>{A(!0),p.update(r,{id:o.id,data:{...o,[e]:I,_changed:e}}).then(()=>A(!1))},[p,r,e,o]);return w.useEffect(()=>l(dt.get(o,e)),[o,e]),n?w.cloneElement(n,{...n.props,source:e,value:s,onChange:m}):f.jsx(b.TextField,{value:s,disabled:u,onChange:g,onKeyPress:C,onBlur:h,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};ny.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const _f=({children:e,...t})=>f.jsx(R.ReferenceArrayInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});_f.propTypes={...R.ReferenceArrayInput.propTypes,children:c.element};_f.defaultProps={...R.ReferenceArrayInput.defaultProps};const $f=({children:e,...t})=>f.jsx(R.ReferenceInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});$f.propTypes={...R.ReferenceInput.propTypes,children:c.element};$f.defaultProps={...R.ReferenceInput.defaultProps};const ep=({reference:e,target:t,children:n,filters:r,actions:o,...s})=>f.jsx(R.ResourceContextProvider,{value:e,children:f.jsx(fs,{perPage:5,pagination:f.jsx(R.Pagination,{}),...s,reference:e,target:t,children:f.jsxs(w.Fragment,{children:[f.jsx(R.ListToolbar,{filters:r,actions:o}),n]})})});ep.propTypes={...fs.propTypes,children:c.node.isRequired,reference:c.string.isRequired,target:c.string.isRequired,filters:c.oneOfType([c.element,c.func,c.element,c.arrayOf(c.node)]),actions:c.oneOfType([c.element,c.func,c.element])};ep.defaultProps={...fs.defaultProps};const RF=ue(R.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),OF=e=>f.jsx(RF,{...e}),ry=ue(R.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip":{marginTop:"-2px",marginBottom:"-2px"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}}));ry.propTypes={...R.SelectArrayInput.propTypes};const tp=e=>f.jsx(ut,{...e,children:f.jsx(ry,{options:{autoWidth:!1}})});tp.defaultProps={optionText:"name",optionValue:"id"};tp.propTypes={...R.SelectArrayInput.propTypes,...ut.propTypes};const jF=ue(R.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}})),oy=e=>f.jsx(ut,{...e,children:f.jsx(jF,{})});oy.propTypes={...R.SelectInput.propTypes,...ut.propTypes};const Zn=e=>f.jsx(ut,{...e,children:f.jsx(R.TextInput,{})});Zn.propTypes={...R.TextInput.propTypes,...ut.propTypes};const Eu=({...e})=>{var u,A;const t=R.useTranslate(),n=R.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(u=cs.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:A.value;let o=e.helperText,s=e.validate;s?Array.isArray(s)&&s.indexOf(n)===-1&&s.push(n):s=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(o=o&&o.length>0?`${l} - ${t(o)}`:l),f.jsx(Zn,{...e,validate:s,helperText:o,inputProps:{maxLength:e==null?void 0:e.maxLength}})};Eu.displayName="SmartTextInput";Eu.defaultProps={multiline:!1};Eu.propTypes={...Zn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const iy=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return qr().hour(n).minute(r)};function MF(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}const DF=e=>{if(!e)return"";const t=iy(e);return t?t.format("HH:mm"):""},kF=e=>e,FF=ue(R.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),np=e=>f.jsx(ut,{...e,children:f.jsx(FF,{})});np.defaultProps={...R.TimeInput.defaultProps,format:DF,parse:kF};np.propTypes={...R.TimeInput.propTypes,...ut.propTypes};const rp=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=Fn(),[r,o]=w.useState(!1),s=pe.useAuthProvider(),l=pe.useTranslate(),u=pe.useNotify(),A=w.useCallback(g=>{const{oldPassword:p,newPassword:C}=g;o(!0),s==null||s.changePassword(p,C).then(()=>{u("ra.auth.password_changed"),e()}).catch(h=>{u((h==null?void 0:h.message)||(h==null?void 0:h.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e]);return f.jsx(pe.ResourceContextProvider,{value:"user/change-password",children:f.jsx(pe.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:f.jsx(pu,{onSubmit:A,toolbar:f.jsx(fr,{children:f.jsx(R.SaveButton,{disabled:r})}),children:f.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Alert,{severity:"warning",children:[f.jsx(b.AlertTitle,{children:l("ra.auth.first_access.change_password")}),l("ra.auth.first_access.change_password_helper")]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(Zn,{source:"oldPassword",type:"password",validate:pe.required()})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(Zn,{source:"newPassword",type:"password",validate:pe.required()})})]})})})})},LF=ue(R.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{borderTop:`1px solid ${e.palette.divider}`},"& .RaEdit-main>.MuiPaper-root:first-of-type":{overflow:"visible",backgroundColor:e.palette.background.default}})),NF=ue(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),VF=ue(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),op=({title:e,divider:t,variant:n})=>{const r=R.useTranslate();return f.jsxs(w.Fragment,{children:[f.jsx(NF,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&f.jsx(VF,{})]})};op.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])};op.defaultProps={divider:!0,variant:"h4"};const HF=ue(b.Grid,{name:"ApplicaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{position:"initial",marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`,[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important",marginRight:0}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function sy(e){const{spacing:t}=Fn(),{spacing:n=t}=e,r=Ce.omit(e,["spacing"]);return f.jsx(R.Form,{...r,children:f.jsx(HF,{container:!0,spacing:n*2,children:e.children})})}function pg(e){return e.id??e.label}function ay(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function WF(e){return Ce.map(e,"id")}function Sc(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function ly(e,t){const n=e!==void 0?Sc(e):0;return Ce.chain(t).filter(o=>e!==void 0?ay(e,o.id):!0).filter(o=>Sc(o.id)===n+1).value()}function zF(e,t){var s;const n=Ce.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return Ce.extend(n,{formRootPath:o});case"setSyncWithLocation":return Ce.extend(n,{syncWithLocation:o});case"setErrorCount":return Ce.extend(n,{errorCount:o});case"setActiveItem":return Ce.includes(WF(e.items),o)?Ce.extend(n,{activeItem:o}):n;case"addItem":{const{id:l}=o;return Ce.extend(n,{items:Ce.chain(n.items).clone().reject(u=>u.id===l).concat([o]).orderBy(u=>u.index).value()})}case"removeItem":{const l=Ce.isString(o)?o:o.id,u=Ce.chain(n.items).clone().reject(A=>A.id===l).value();return Ce.extend(n,{items:u}),n.activeItem===l&&Ce.extend(n,{activeItem:((s=Ce.first(u))==null?void 0:s.id)??void 0}),n}default:return n}}const UF={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},cy=w.createContext(void 0);function uy(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=Zi.useLocation(),[s,l]=w.useReducer(zF,Ce.cloneDeep(UF)),{formRootPath:u,items:A}=s,g=w.useMemo(()=>({state:s,dispatch:l}),[s,l]);return w.useEffect(()=>{const p=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&p.push(r);const C=Ce.chain(p).map(m=>Zi.matchPath(m,o)).reject(m=>m===null).first().value(),h=C==null?void 0:C.pathnameBase;h!==void 0&&h!==u&&l({type:"setFormRootPath",payload:h})},[o,u,r]),w.useEffect(()=>{l({type:"setSyncWithLocation",payload:!!t})},[t,l]),w.useEffect(()=>{l({type:"setErrorCount",payload:!!n})},[n,l]),w.useEffect(()=>{var p;if(t&&u!==void 0){let C=o.replace(u,"").replace(new RegExp(/^\/?/),"");Ce.isEmpty(C)&&(C=((p=Ce.chain(A).filter(h=>ly(h.id,A).length===0).orderBy([h=>Sc(h.id),h=>h.index]).first().value())==null?void 0:p.id)??void 0),l({type:"setActiveItem",payload:C})}},[l,u,o,A]),f.jsx(cy.Provider,{value:g,children:e.children})}function Ay(){const e=w.useContext(cy);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Da(){return Ay().state}function ip(){return Ay().dispatch}function dy(){return Da().formRootPath}function gy(){return Da().activeItem}function fy(){return Da().items}function py(){return Da().syncWithLocation}function hy(){return Da().errorCount}function Cy(){const e=ip();return w.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function my(){const e=ip();return w.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function Ey(){const e=ip();return w.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}var YF=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},Iy=e=>e.firstChild?e.firstChild.offsetParent===e:!0,GF=(e,t)=>{let n=e,r=0;Iy(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},KF=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},ma=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?ma="sticky":CSS.supports("position","-webkit-sticky")&&(ma="-webkit-sticky"));var Rc=!1;try{const e=Object.defineProperty({},"passive",{get(){Rc={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var wd=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=o(s()),u=()=>{Object.assign(l,o(s())),n()};return window.addEventListener("resize",u,Rc),r.push(()=>window.removeEventListener("resize",u)),l}else{const s=o(t.getBoundingClientRect()),l=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},u=new ResizeObserver(l);return u.observe(t),r.push(()=>u.disconnect()),s}},qF=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},JF=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,l=YF(e);let u=!1;const A=()=>{u||requestAnimationFrame(()=>{const k=C();k!==x&&S(k),u=!1}),u=!0};let g=l===window?window.scrollY:l.scrollTop;const p=k=>{const{offsetTop:q,height:J}=m,{naturalTop:U}=v,{height:_}=O;return k+q+J>=U+_+j+o},C=()=>{const{height:k}=m,{height:q}=O;return q+s+o<=k?3:p(g)?1:2},h=l!==window&&Iy(l),m=wd({el:l,onChange:A,unsubs:t,measure:({height:k,top:q})=>({height:k,offsetTop:h?q:0})}),I=KF(e),B=I===window?{top:0,bottom:0}:qF(I),v=wd({el:I,onChange:A,unsubs:t,measure:({height:k})=>({height:k-B.top-B.bottom,naturalTop:I===window?0:GF(I,l)+B.top+m.offsetTop})}),O=wd({el:e,onChange:A,unsubs:t,measure:({height:k})=>({height:k})});let j=0,x=C();const S=k=>{const q=x;if(x=k,q===2&&(j=-1),k===3){e.style.position=ma,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:J,offsetTop:U}=m,{height:_,naturalTop:le}=v,{height:ie}=O;if(k===2)if(e.style.position="relative",j=q===0?Math.max(0,U+g-le+s):Math.max(0,U+g+J-(le+ie+o)),r){const Z=Math.max(0,_-ie-j);e.style.bottom=`${Z}px`}else e.style.top=`${j}px`;else e.style.position=ma,k===1?r?e.style.bottom=`${o}px`:e.style.top=`${J-ie-o}px`:r?e.style.bottom=`${J-ie-o}px`:e.style.top=`${s}px`};S(x);const P=k=>{if(k===g)return;const q=k-g;if(g=k,x===3)return;const{offsetTop:J,height:U}=m,{naturalTop:_,height:le}=v,{height:ie}=O;if(q>0)if(x===0){if(k+J+s>_){const Z=Math.max(0,J+g-_+s);k+J+U<=_+ie+Z+o?S(2):S(1)}}else x===2&&p(k)&&S(1);else if(x===1){if(J+k+U<_+le+o){const Z=Math.max(0,J+g+U-(_+ie+o));J+k+s>=_+Z?S(2):S(0)}}else x===2&&J+k+s<_+j&&S(0)},L=l===window?()=>P(window.scrollY):()=>P(l.scrollTop);l.addEventListener("scroll",L,Rc),l.addEventListener("mousewheel",L,Rc),t.push(()=>l.removeEventListener("scroll",L),()=>l.removeEventListener("mousewheel",L))},XF=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=w.useState(null);return w.useEffect(()=>{if(!r||!ma)return;const s=[];return JF(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(l=>l())}},[r,t,e,n]),o},ZF=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:l}=e,u=XF({offsetTop:t,offsetBottom:n,bottom:r});return f.jsx("div",{className:s,style:l,ref:u,children:o})},_F=ZF,By=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(By||{});function vy(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=Ce.omit(e,["sticky","disposition","spacing"]),s=t?_F:b.Box,l=w.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return f.jsx(b.Grid,{...o,item:!0,...n,children:f.jsx(s,{...l,children:f.jsx(b.Stack,{spacing:r,children:e.children})})})}function yy(e){return f.jsx(f.Fragment,{children:e.children})}function by(e){const{children:t}=e;return w.useMemo(()=>{const r={top:[],bottom:[]};return w.Children.forEach(t,o=>{if(w.isValidElement(o)&&(o==null?void 0:o.type)===yy){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function Qy(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=Ce.omit(e,["disposition"]);return f.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function xy(e){const t=gy();return t===void 0?!1:e===t||ay(e,t)}function wy(e){const t=fy();return w.useMemo(()=>ly(e,t),[t,e])}function $F(){const e=dy(),{search:t}=Zi.useLocation(),n=Zi.useNavigate();return w.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n])}function Ty(){const e=wy();return f.jsx(b.Card,{variant:"outlined",children:f.jsx(b.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:Ce.map(e,(t,n)=>f.jsx(sp,{...t},n))})})}function sp(e){const t=pe.useTranslate()??Ce.identity,n=Py(e),{selected:r,label:o,icon:s,onClick:l,badge:u,items:A,isGroup:g,level:p,errors:C=0}=n,{spacing:h}=Fn(),[m,I]=w.useState(r),B=w.useCallback(j=>{I(!m),l(j)},[l,m]),v=s!==void 0,O=Ce.omit(e,["label","icon","selected","badge"]);return w.useEffect(()=>{r&&!m&&I(r)},[r,m,I]),f.jsxs(f.Fragment,{children:[f.jsx(b.ListItem,{...O,disablePadding:!0,children:f.jsxs(b.ListItemButton,{selected:r&&!g,onClick:B,sx:{pl:h*p},children:[v&&f.jsx(b.ListItemIcon,{children:s}),f.jsx(b.ListItemText,{inset:!v,primary:C===0?t(o):f.jsx(b.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),u&&f.jsx(b.ListItemAvatar,{children:f.jsx(Ca,{type:"filled",size:"xs",color:u.color??"default",children:u.content})}),g&&(m?f.jsx(Bn.ExpandLess,{}):f.jsx(Bn.ExpandMore,{}))]})}),g&&f.jsx(b.Collapse,{in:m,timeout:"auto",children:f.jsx(b.List,{children:Ce.map(A,(j,x)=>f.jsx(sp,{...j},x))})})]})}function Py(e){const{id:t}=e,n=xy(t),r=Sc(t),o=$F(),s=py(),l=Cy(),u=wy(t),A=!Ce.isEmpty(u),g=w.useCallback(C=>{A||(s?o(e.id):l(e.id)),Ce.isFunction(e.onClick)&&e.onClick(C)},[l,o,e,s,A]);return w.useMemo(()=>({...e,selected:n,onClick:g,items:u,isGroup:A,level:r}),[e,n,g,u,A])}function Sy(e=[],t){const n=Ce.isArray(e)?e:[e],r=Ce.filter(n,o=>w.isValidElement(o));Ce.each(r,o=>{var s;t(o),Sy(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function Ry(e){const{errors:t}=cs.useFormState(),n=hy(),{label:r,icon:o,badge:s,index:l=0,children:u}=e,A=pg(e),g=my(),p=Ey(),C=xy(A),h=[];n&&(e.sources!==void 0?h.push(...e.sources):Sy(u,I=>{var B;((B=I==null?void 0:I.props)==null?void 0:B.source)!==void 0&&h.push(I.props.source)}));const m=Ce.chain(h).uniq().map(I=>Ce.get(t,I)).reject(I=>I===void 0).value().length;return w.useEffect(()=>{g({id:A,index:l,label:r,icon:o,badge:s,errors:m})},[g,p,r,o,A,s,l,m]),w.useEffect(()=>()=>{p(A)},[A]),f.jsx(b.Box,{display:C?"unset":"none",children:e.children})}function Oy(e){const t=ap(e),n=pg(e);return f.jsx(Ry,{...e,id:n,children:w.Children.map(t,r=>{const o=pg(r.props);return w.cloneElement(r,{id:`${n}.${o}`})})})}function jy(e){return f.jsx(Ry,{...e})}function ap(e){const{children:t}=e;return w.useMemo(()=>Ce.chain(w.Children.toArray(t)).filter(r=>w.isValidElement(r)&&((r==null?void 0:r.type)===jy||(r==null?void 0:r.type)===Oy)).map((r,o)=>w.cloneElement(r,{index:o})).value(),[t])}function e6(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=Ce.pick(e,["syncWithLocation","errorCount"]),s=Ce.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:l,bottom:u}=by(e),A=ap(e);return f.jsx(uy,{...o,children:f.jsxs(sy,{...s,spacing:r,children:[f.jsxs(vy,{disposition:t,spacing:r,children:[l,f.jsx(Ty,{}),u]}),f.jsx(Qy,{disposition:n,children:A})]})})}const kt=e6;kt.BaseForm=sy;kt.Content=Qy;kt.Provider=uy;kt.useItems=fy;kt.useSyncWithLocation=py;kt.useErrorCount=hy;kt.useFormRootPath=dy;kt.useActiveItem=gy;kt.useSetActiveItem=Cy;kt.useAddItem=my;kt.useRemoveItem=Ey;kt.Sidebar=vy;kt.SidebarSection=yy;kt.SidebarSectionPosition=By;kt.useSidebarChildren=by;kt.NavMenu=Ty;kt.NavMenuItem=sp;kt.useNavMenuItem=Py;kt.Tab=jy;kt.Group=Oy;kt.useBaseItemChildren=ap;const t6=ue(R.Show,{name:"RaApplicaShow",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),n6=ue(R.SimpleFormIterator,{name:"ApplicaSimpleFormIterator",root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}})),r6=Ta(R.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?0:1)},[e.breakpoints.down("sm")]:{paddingBottom:0}})),lp=e=>{const{title:t,modal:n,content:r,subheader:o,secondary:s,sx:l,...u}=e,A=tf(t);return f.jsx(Xn,{title:A,modal:n,content:r,subheader:o,secondary:s,sx:{...l,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!n,divider:!0,children:f.jsx(r6,{toolbar:f.jsx(fr,{}),...u})})};lp.defaultProps={toolbar:f.jsx(fr,{children:f.jsx(R.SaveButton,{type:"button"})}),secondary:f.jsx(ai,{children:f.jsx(R.DeleteWithConfirmButton,{})})};lp.Tab=R.TabbedForm.Tab;const o6=D.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:o=!1,index:s,member:l,resource:u}=e,A=R.useTranslate(),[g,p]=D.useState(!1),{total:C,remove:h}=nB(),m=D.useCallback(()=>{p(!1),h(s)},[s,h]),I=w.useMemo(()=>({index:s,total:C,remove:()=>h(s)}),[s,C,h]);return f.jsxs(_g.Provider,{value:I,children:[w.Children.map(n,(B,v)=>{if(!w.isValidElement(B))return null;const{source:O,...j}=B.props;return f.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:w.cloneElement(B,{source:O?`${l}.${O}`:l,index:O?void 0:v,resource:u,disabled:r,...j,label:""})})}),!o&&f.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2.5},children:f.jsx(ai,{horizontal:!0,children:f.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&f.jsx(R.Confirm,{isOpen:g,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:m,onClose:()=>p(!1)})]})});var i6=Array.isArray,Iu=i6,s6=typeof Jn=="object"&&Jn&&Jn.Object===Object&&Jn,a6=s6,l6=a6,c6=typeof self=="object"&&self&&self.Object===Object&&self,u6=l6||c6||Function("return this")(),Bu=u6,A6=Bu,d6=A6.Symbol,vu=d6,CI=vu,My=Object.prototype,g6=My.hasOwnProperty,f6=My.toString,Gs=CI?CI.toStringTag:void 0;function p6(e){var t=g6.call(e,Gs),n=e[Gs];try{e[Gs]=void 0;var r=!0}catch{}var o=f6.call(e);return r&&(t?e[Gs]=n:delete e[Gs]),o}var h6=p6,C6=Object.prototype,m6=C6.toString;function E6(e){return m6.call(e)}var I6=E6,mI=vu,B6=h6,v6=I6,y6="[object Null]",b6="[object Undefined]",EI=mI?mI.toStringTag:void 0;function Q6(e){return e==null?e===void 0?b6:y6:EI&&EI in Object(e)?B6(e):v6(e)}var cp=Q6;function x6(e){return e!=null&&typeof e=="object"}var yu=x6,w6=cp,T6=yu,P6="[object Symbol]";function S6(e){return typeof e=="symbol"||T6(e)&&w6(e)==P6}var up=S6,R6=Iu,O6=up,j6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,M6=/^\w*$/;function D6(e,t){if(R6(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||O6(e)?!0:M6.test(e)||!j6.test(e)||t!=null&&e in Object(t)}var k6=D6;function F6(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Dy=F6,L6=cp,N6=Dy,V6="[object AsyncFunction]",H6="[object Function]",W6="[object GeneratorFunction]",z6="[object Proxy]";function U6(e){if(!N6(e))return!1;var t=L6(e);return t==H6||t==W6||t==V6||t==z6}var ky=U6,Y6=Bu,G6=Y6["__core-js_shared__"],K6=G6,Td=K6,II=function(){var e=/[^.]+$/.exec(Td&&Td.keys&&Td.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function q6(e){return!!II&&II in e}var J6=q6,X6=Function.prototype,Z6=X6.toString;function _6(e){if(e!=null){try{return Z6.call(e)}catch{}try{return e+""}catch{}}return""}var $6=_6,eL=ky,tL=J6,nL=Dy,rL=$6,oL=/[\\^$.*+?()[\]{}|]/g,iL=/^\[object .+?Constructor\]$/,sL=Function.prototype,aL=Object.prototype,lL=sL.toString,cL=aL.hasOwnProperty,uL=RegExp("^"+lL.call(cL).replace(oL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function AL(e){if(!nL(e)||tL(e))return!1;var t=eL(e)?uL:iL;return t.test(rL(e))}var dL=AL;function gL(e,t){return e==null?void 0:e[t]}var fL=gL,pL=dL,hL=fL;function CL(e,t){var n=hL(e,t);return pL(n)?n:void 0}var bu=CL,mL=bu,EL=mL(Object,"create"),Qu=EL,BI=Qu;function IL(){this.__data__=BI?BI(null):{},this.size=0}var BL=IL;function vL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var yL=vL,bL=Qu,QL="__lodash_hash_undefined__",xL=Object.prototype,wL=xL.hasOwnProperty;function TL(e){var t=this.__data__;if(bL){var n=t[e];return n===QL?void 0:n}return wL.call(t,e)?t[e]:void 0}var PL=TL,SL=Qu,RL=Object.prototype,OL=RL.hasOwnProperty;function jL(e){var t=this.__data__;return SL?t[e]!==void 0:OL.call(t,e)}var ML=jL,DL=Qu,kL="__lodash_hash_undefined__";function FL(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=DL&&t===void 0?kL:t,this}var LL=FL,NL=BL,VL=yL,HL=PL,WL=ML,zL=LL;function ps(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ps.prototype.clear=NL;ps.prototype.delete=VL;ps.prototype.get=HL;ps.prototype.has=WL;ps.prototype.set=zL;var UL=ps;function YL(){this.__data__=[],this.size=0}var GL=YL;function KL(e,t){return e===t||e!==e&&t!==t}var qL=KL,JL=qL;function XL(e,t){for(var n=e.length;n--;)if(JL(e[n][0],t))return n;return-1}var xu=XL,ZL=xu,_L=Array.prototype,$L=_L.splice;function e9(e){var t=this.__data__,n=ZL(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$L.call(t,n,1),--this.size,!0}var t9=e9,n9=xu;function r9(e){var t=this.__data__,n=n9(t,e);return n<0?void 0:t[n][1]}var o9=r9,i9=xu;function s9(e){return i9(this.__data__,e)>-1}var a9=s9,l9=xu;function c9(e,t){var n=this.__data__,r=l9(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var u9=c9,A9=GL,d9=t9,g9=o9,f9=a9,p9=u9;function hs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}hs.prototype.clear=A9;hs.prototype.delete=d9;hs.prototype.get=g9;hs.prototype.has=f9;hs.prototype.set=p9;var h9=hs,C9=bu,m9=Bu,E9=C9(m9,"Map"),I9=E9,vI=UL,B9=h9,v9=I9;function y9(){this.size=0,this.__data__={hash:new vI,map:new(v9||B9),string:new vI}}var b9=y9;function Q9(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var x9=Q9,w9=x9;function T9(e,t){var n=e.__data__;return w9(t)?n[typeof t=="string"?"string":"hash"]:n.map}var wu=T9,P9=wu;function S9(e){var t=P9(this,e).delete(e);return this.size-=t?1:0,t}var R9=S9,O9=wu;function j9(e){return O9(this,e).get(e)}var M9=j9,D9=wu;function k9(e){return D9(this,e).has(e)}var F9=k9,L9=wu;function N9(e,t){var n=L9(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var V9=N9,H9=b9,W9=R9,z9=M9,U9=F9,Y9=V9;function Cs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cs.prototype.clear=H9;Cs.prototype.delete=W9;Cs.prototype.get=z9;Cs.prototype.has=U9;Cs.prototype.set=Y9;var Fy=Cs,Ly=Fy,G9="Expected a function";function Ap(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(G9);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var l=e.apply(this,r);return n.cache=s.set(o,l)||s,l};return n.cache=new(Ap.Cache||Ly),n}Ap.Cache=Ly;var K9=Ap,q9=K9,J9=500;function X9(e){var t=q9(e,function(r){return n.size===J9&&n.clear(),r}),n=t.cache;return t}var Z9=X9,_9=Z9,$9=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eN=/\\(\\)?/g,tN=_9(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace($9,function(n,r,o,s){t.push(o?s.replace(eN,"$1"):r||n)}),t}),nN=tN;function rN(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Ny=rN,yI=vu,oN=Ny,iN=Iu,sN=up,aN=1/0,bI=yI?yI.prototype:void 0,QI=bI?bI.toString:void 0;function Vy(e){if(typeof e=="string")return e;if(iN(e))return oN(e,Vy)+"";if(sN(e))return QI?QI.call(e):"";var t=e+"";return t=="0"&&1/e==-aN?"-0":t}var lN=Vy,cN=lN;function uN(e){return e==null?"":cN(e)}var AN=uN,dN=Iu,gN=k6,fN=nN,pN=AN;function hN(e,t){return dN(e)?e:gN(e,t)?[e]:fN(pN(e))}var CN=hN,mN=up,EN=1/0;function IN(e){if(typeof e=="string"||mN(e))return e;var t=e+"";return t=="0"&&1/e==-EN?"-0":t}var BN=IN,vN=CN,yN=BN;function bN(e,t){t=vN(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[yN(t[n++])];return n&&n==r?e:void 0}var QN=bN,xN=QN;function wN(e,t,n){var r=e==null?void 0:xN(e,t);return r===void 0?n:r}var TN=wN;const PN=bo(TN),Hy=e=>{var Z,K;const{children:t,resource:n,source:r,label:o,disableActions:s=!1,disableAdd:l=!1,disableRemove:u=!1,className:A,empty:g,template:p={}}=e,[C,h]=w.useState(!1),{fields:m,remove:I,replace:B,append:v}=R.useArrayInput(e),{resetField:O}=cs.useFormContext(),j=Rt(),x=pe.useTranslate(),S=pe.useRecordContext(e),P=w.useRef(p||{}),L=pe.useTranslateLabel(),k=w.useCallback(V=>{I(V)},[I]);if(m.length>0){const{...V}=m[0];P.current=V;for(const G in P.current)P.current[G]=null}const q=w.useCallback((V=void 0)=>{let G=V;V==null&&(G=P.current,w.Children.count(t)===1&&D.isValidElement(w.Children.only(t))&&!w.Children.only(t).props.source&&w.Children.map(t,$=>D.isValidElement($)&&$.type!==pe.FormDataConsumer).some(Boolean)?G="":(G=G||{},w.Children.forEach(t,$=>{D.isValidElement($)&&$.type!==pe.FormDataConsumer&&$.props.source&&(G[$.props.source]=$.props.defaultValue??null)})));const F={...G,...p};v(F),O(`${r}.${m.length}`,{defaultValue:G})},[v,t,O,r,m.length,p]),J=V=>G=>{q(),V&&V(G)},U=w.useCallback(()=>{B([]),h(!1)},[B]),_=PN(S,r),le=w.useMemo(()=>({total:m.length,remove:k,source:r}),[m.length,k,r]),ie=j.palette.mode==="dark"?j.palette.grey.A400:j.palette.grey.A800;return m?f.jsx(Zg.Provider,{value:le,children:f.jsxs("div",{className:A,children:[D.cloneElement(f.jsx(Wy,{}),{label:o,source:r,disableAdd:l,template:p,onClick:J((K=(Z=e==null?void 0:e.addButton)==null?void 0:Z.props)==null?void 0:K.onClick)}),f.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${ie}`},children:f.jsxs(b.Table,{children:[f.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${ie}`},children:f.jsxs(b.TableRow,{children:[w.Children.map(t,(V,G)=>D.isValidElement(V)?f.jsx(b.TableCell,{children:f.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:L({...V.props,resource:n})})},G):null),!s&&f.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"top"},children:f.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none"})},"actions")]})}),f.jsxs(b.TableBody,{children:[m.length===0&&f.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:f.jsx(b.TableCell,{colSpan:4+(s?0:1),align:"center",children:g||f.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),m.length>0&&m.map((V,G)=>f.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${ie}}`},children:f.jsx(o6,{disableRemove:u,disableActions:s,index:G,member:`${r}.${G}`,onRemoveField:k,record:_&&_[G]||{},resource:n,source:r,children:t})},V.id))]})]})}),m.length>0&&f.jsx(R.Confirm,{isOpen:C,title:x("ra.action.clear_array_input"),content:x("ra.message.clear_array_input"),onConfirm:U,onClose:()=>h(!1)})]})}):null},Wy=e=>{const{label:t,disableAdd:n,onClick:r}=e,o=Rt(),s=o.palette.mode==="dark"?o.palette.grey.A400:o.palette.grey.A800,l=o.palette.mode==="light"?"#000000":"#FFFFFF";return f.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[t!==!1&&f.jsx(b.Typography,{children:t}),!n&&(D.isValidElement(e==null?void 0:e.addButton)?D.cloneElement(e==null?void 0:e.addButton,{onClick:r}):f.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${s}`},onClick:r,children:f.jsx(lt.PlusCircleOutlined,{style:{color:l}})}))]})},SN=ue(Hy,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));Wy.propTypes={label:c.oneOfType([c.string,c.bool]),source:c.string,defaultValue:c.any};Hy.propTypes={addButton:c.element,children:c.node,className:c.string,field:c.object,fields:c.array,fieldState:c.object,formState:c.object,record:c.object,source:c.string,label:c.oneOfType([c.string,c.bool]),resource:c.string,translate:c.func,disableAdd:c.bool,disableRemove:c.oneOfType([c.func,c.bool]),TransitionProps:c.shape({}),empty:c.oneOfType([c.node,c.string]),template:c.object};function RN(e,t){const n=Ce.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=Ce.chain(n.media).clone().extend(o).value();return Ce.extend(n,{media:s})}case"updateDrawer":{const s=Ce.chain(n.drawer).clone().extend(o).value();return Ce.extend(n,{drawer:s})}case"updateLogo":{const s=Ce.chain(n.logo).clone().extend(o).value();return Ce.extend(n,{logo:s})}case"updateNotifications":{const s=Ce.chain(n.notifications).clone().extend(o).value();return Ce.extend(n,{notifications:s})}case"updateTheme":{const s=Ce.chain(n.theme).clone().extend(o).value();return Ce.extend(n,{theme:s})}default:return n}}const ON={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},zy=w.createContext(void 0);function Uy(e){var J;const t=pe.useAuthProvider(),n=pe.useGetIdentity(),r=b.useTheme(),o=b.useMediaQuery(r.breakpoints.down("md")),s=b.useMediaQuery(r.breakpoints.down("lg")),l=b.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:u,isHorizontalLayout:A,menuOrientation:g,drawerWidth:p}=Fn(),C=A(g)&&!s,{drawerOpen:h,openDrawer:m}=Eo(),I=w.useCallback(()=>{m(!h)},[h,m]),[B,v]=w.useState(!1),[O,j]=w.useReducer(RN,Ce.chain(ON).clone().merge({drawer:{open:!u||h}}).value()),x=w.useCallback(()=>v(!1),[]),S=w.useMemo(()=>({state:O,dispatch:j}),[O,j]),{logoIcon:P,logoMain:L,enableNotification:k,notification:q}=e;return w.useEffect(()=>{j({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:l,horizontal:C}})},[g,o,s,l]),w.useEffect(()=>{j({type:"updateDrawer",payload:{open:h,width:p,handleDrawerToggle:I}})},[h,p,I]),w.useEffect(()=>{u||m(!l)},[l,u]),w.useEffect(()=>{j({type:"updateLogo",payload:{main:L,icon:P}})},[P,L]),w.useEffect(()=>{j({type:"updateNotifications",payload:{enable:k,resource:q??"entities/notification"}})},[k,q]),w.useEffect(()=>{j({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),w.useEffect(()=>{t.isImpersonating().then(U=>{var _;v(!U&&((_=n==null?void 0:n.data)==null?void 0:_.needToChangePassword)===!0)})},[(J=n==null?void 0:n.data)==null?void 0:J.needToChangePassword,t]),f.jsxs(zy.Provider,{value:S,children:[f.jsx(b.Dialog,{open:B,maxWidth:"xs",fullWidth:!0,children:f.jsx(rp,{onSuccess:x,firstAccess:!0})}),e.children]})}function Yy(e){return w.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s}=t;return f.jsx(Uy,{logoIcon:r,logoMain:o,enableNotification:s,children:f.jsx(e,{ref:n,...t})})})}function dp(){const e=w.useContext(zy);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function jN(){return dp().dispatch}function ms(){return dp().state}function nr(){return ms().media}function Ai(){return ms().drawer}function Gy(){return ms().logo}function Tu(){return ms().notifications}function Pu(){return ms().theme}function Ky(){const{iconColor:e,iconColorOpen:t}=Pu(),{open:n,handleDrawerToggle:r}=Ai();return f.jsx(vo,{"aria-label":"open drawer",onClick:r,edge:"start",color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:n?t:e,ml:{xs:0,lg:-2}},children:n?f.jsx(lt.MenuFoldOutlined,{}):f.jsx(lt.MenuUnfoldOutlined,{})})}function qy(e){const t=w.useRef(),n=b.useTheme(),{downLg:r,horizontal:o}=nr(),{open:s,width:l}=Ai(),u=r?b.AppBar:oB,A=ds(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${l}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),g={position:"fixed",color:"inherit",elevation:0,sx:A};return r||Ce.extend(g,{open:s}),f.jsx(u,{ref:t,...g,children:f.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&f.jsx(Ky,{}),e.children]})})}function MN(e){const t=b.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:l}=Tu(),u=pe.useNotify(),A=pe.useRedirect(),[g]=pe.useUpdate(l,{id:n==null?void 0:n.id,data:{...n,readed:qr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(A(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{u("resources.notifications.messages.readed.error","warning")}}),p=w.useCallback(()=>g(),[g]),[C]=pe.useLocaleState(),h=w.useMemo(()=>qr(n.created).locale(C).fromNow(),[n,C]);return f.jsx(b.ListItem,{disablePadding:!0,divider:s,children:f.jsxs(b.ListItemButton,{selected:o,onClick:p,children:[f.jsx(b.ListItemAvatar,{children:f.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:f.jsx(lt.MessageOutlined,{})})}),f.jsx(b.ListItemText,{primary:n.title,secondary:n.content}),f.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),f.jsx(b.ListItemText,{primary:h,primaryTypographyProps:{variant:"caption"}})]})})}const DN={width:36,height:36,fontSize:"1rem"},kN={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function Jy(){const{enable:e}=Tu();return e?f.jsx(FN,{}):null}function FN(){const e=b.useTheme(),t=w.useRef(),n=pe.useTranslate(),{resource:r}=Tu(),{downMd:o}=nr(),{iconColor:s,iconColorOpen:l}=Pu(),[u,A]=w.useState(!1),[g,p]=w.useState([]),C=g.filter(v=>v.readed===null).length,h=w.useCallback(()=>A(!u),[u]),m=w.useCallback(()=>{t.current&&t.current.contains(event.target)||A(!1)},[t.current,A]),{data:I,isLoading:B}=pe.useGetList(r,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}});return w.useEffect(()=>{!B&&I&&p(I??[])},[I,B]),f.jsxs(b.Box,{sx:{flexShrink:0},children:[f.jsx(vo,{color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:u?l:s},"aria-label":"open profile",ref:t,"aria-controls":u?"profile-grow":void 0,"aria-haspopup":"true",onClick:h,children:f.jsx(b.Badge,{badgeContent:C,color:"primary",children:f.jsx(lt.BellOutlined,{})})}),f.jsx(b.Popper,{placement:o?"bottom":"bottom-end",open:u,anchorEl:t.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[o?-5:0,9]}}]},children:({TransitionProps:v})=>f.jsx(yo,{type:"grow",position:o?"top":"top-right",in:open,...v,children:f.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[e.breakpoints.down("md")]:{maxWidth:285}},children:f.jsx(b.ClickAwayListener,{onClickAway:m,children:f.jsxs(Xn,{title:"Notification",elevation:0,border:!1,content:!1,secondary:f.jsx(f.Fragment,{children:C>0&&f.jsx(b.Tooltip,{title:"Mark as all read",children:f.jsx(vo,{color:"success",size:"small",children:f.jsx(lt.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[f.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":DN,"& .MuiListItemSecondaryAction-root":{...kN,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:g.map((O,j)=>f.jsx(MN,{selected:C>0,notification:O,onClick:h,divider:j<g.length-1},O.id))}),f.jsx(b.Divider,{}),f.jsx(b.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${r}`,LinkComponent:Bt.Link,onClick:m,children:f.jsx(b.ListItemText,{primary:f.jsx(b.Typography,{variant:"h6",color:"primary",children:n("ra.notification.view_all")})})})]})})})})})]})}const LN=()=>{const[e,t]=w.useState(!1),n=w.useCallback(()=>t(!1),[t]),r=w.useCallback(()=>t(!0),[t]),o=pe.useTranslate();return f.jsxs(w.Fragment,{children:[f.jsxs(b.ListItemButton,{onClick:r,children:[f.jsx(b.ListItemIcon,{children:f.jsx(Bn.Key,{})}),f.jsx(b.ListItemText,{primary:o("ra.auth.change_password")})]}),f.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(rp,{onSuccess:n})})]})},NN=()=>{const e=pe.useLogout(),t=pe.useTranslate();return f.jsx(w.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:e,children:[f.jsx(b.ListItemIcon,{children:f.jsx(Bn.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},VN=()=>{const e=pe.useTranslate(),t=pe.useAuthProvider(),n=w.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,o]=w.useState(!1);return w.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(s=>o(s))},[t,o]),r?f.jsx(w.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:n,children:[f.jsx(b.ListItemIcon,{children:f.jsx(Bn.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};c.node,c.any.isRequired,c.any.isRequired;const Xy=()=>{var B;const e=b.useTheme(),{identity:t}=R.useGetIdentity(),n=t!==void 0&&t.image&&t.image!==null&&t.image!=="",r=w.useRef(null),[o,s]=w.useState(!1),l=()=>{s(v=>!v)},u=v=>{r.current&&r.current.contains(v.target)||s(!1)},A=e.palette.mode==="dark"?"grey.200":"grey.300",g=R.useLogout(),p=R.useDataProvider(),C=R.useAuthProvider(),h=w.useCallback(()=>{g()},[C,g]),[m,I]=w.useState(null);return w.useEffect(()=>{if(!n)return;async function v(){var O=await p.getFile("/profile/me/image");I(O)}v()},[p,n]),f.jsxs(b.Box,{sx:{flexShrink:0},children:[f.jsx(b.ButtonBase,{sx:{p:.25,bgcolor:o?A:"transparent",borderRadius:1,"&:hover":{bgcolor:e.palette.mode==="dark"?"secondary.light":"secondary.lighter"},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},"aria-label":"open profile",ref:r,"aria-controls":o?"profile-grow":void 0,"aria-haspopup":"true",onClick:l,children:f.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[f.jsx(Ca,{alt:(B=t==null?void 0:t.name)==null?void 0:B.toUpperCase(),src:m,size:"xs"}),f.jsx(b.Typography,{variant:"subtitle1",children:t==null?void 0:t.name})]})}),f.jsx(b.Popper,{placement:"bottom-end",open:o,anchorEl:r.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:v})=>{var O;return f.jsx(yo,{type:"grow",position:"top-right",in:o,...v,children:f.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250}},children:f.jsx(b.ClickAwayListener,{onClickAway:u,children:f.jsxs(Xn,{elevation:0,border:!1,content:!1,children:[f.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:f.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[f.jsx(b.Grid,{item:!0,children:f.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[f.jsx(Ca,{alt:"profile user",src:m,sx:{width:32,height:32}}),f.jsxs(b.Stack,{children:[f.jsx(b.Typography,{variant:"h6",children:t==null?void 0:t.name}),f.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(O=t==null?void 0:t.roles)==null?void 0:O.map(j=>j.name.replace("ROLE_","")).join(",")})]})]})}),f.jsx(b.Grid,{item:!0,children:f.jsx(b.Tooltip,{title:"Logout",children:f.jsx(vo,{size:"large",sx:{color:"text.primary"},onClick:h,children:f.jsx(lt.LogoutOutlined,{})})})})]})}),f.jsx(b.Grid,{container:!0,children:f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[f.jsx(LN,{}),f.jsx(NN,{}),f.jsx(VN,{})]})})})]})})})})}})]})},Zy=e=>{const t=Rt(),{downMd:n}=nr(),{iconColor:r,iconColorOpen:o}=Pu(),[s,l]=w.useState(!1),u=w.useRef(null),A=w.useCallback(()=>{l(!s)},[s]),g=w.useCallback(p=>{u.current&&u.current.contains(p.target)||l(!1)},[]);return n?f.jsxs(f.Fragment,{children:[f.jsx(b.Box,{sx:{flexShrink:0},children:f.jsx(vo,{sx:{color:"text.primary",bgcolor:s?o:r},"aria-label":"open more menu",ref:u,"aria-controls":s?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:A,color:"secondary",variant:"light",children:f.jsx(lt.MoreOutlined,{})})}),f.jsx(b.Popper,{placement:"bottom-end",open:s,anchorEl:u.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:p})=>f.jsx(yo,{type:"fade",in:s,...p,children:f.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:f.jsx(b.ClickAwayListener,{onClickAway:g,children:f.jsx(b.AppBar,{color:"inherit",children:f.jsx(b.Toolbar,{children:e.children})})})})})})]}):f.jsx(f.Fragment,{children:e.children})};function _y(e){return f.jsx(b.Box,{...e,flex:1})}function ka(e){const{name:t,version:n}=e;return f.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:f.jsxs(b.Typography,{variant:"caption",children:[f.jsx("span",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.copy)||""}})," ",t," - ",n]})})}ka.propTypes={name:c.string.isRequired,version:c.string.isRequired,copy:c.string};ka.defaultProps={copy:"© Applica Software Guru for"};var $y={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})($y);var Su=$y.exports,Pd={};const HN=GR(S8);var xI;function Ru(){return xI||(xI=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=HN}(Pd)),Pd}function eb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=eb(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function tb(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=eb(e))&&(r&&(r+=" "),r+=t);return r}var WN="__lodash_hash_undefined__";function zN(e){return this.__data__.set(e,WN),this}var UN=zN;function YN(e){return this.__data__.has(e)}var GN=YN,KN=Fy,qN=UN,JN=GN;function Oc(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new KN;++t<n;)this.add(e[t])}Oc.prototype.add=Oc.prototype.push=qN;Oc.prototype.has=JN;var nb=Oc;function XN(e,t){return e.has(t)}var rb=XN;function ZN(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var ob=ZN;function _N(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var $N=_N,e7=cp,t7=yu,n7="[object Arguments]";function r7(e){return t7(e)&&e7(e)==n7}var o7=r7,wI=o7,i7=yu,ib=Object.prototype,s7=ib.hasOwnProperty,a7=ib.propertyIsEnumerable,l7=wI(function(){return arguments}())?wI:function(e){return i7(e)&&s7.call(e,"callee")&&!a7.call(e,"callee")},c7=l7,u7=9007199254740991;function A7(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=u7}var d7=A7;function g7(e){return function(t){return e(t)}}var f7=g7,p7=ky,h7=d7;function C7(e){return e!=null&&h7(e.length)&&!p7(e)}var m7=C7,E7=bu,I7=Bu,B7=E7(I7,"Set"),v7=B7,hg=globalThis&&globalThis.__assign||function(){return hg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},hg.apply(this,arguments)},y7=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},sb=function(e){var t=e.className,n=e.sx,r=y7(e,["className","sx"]),o=pe.useLoading(),s=Rt();return D.createElement(b7,{className:t,sx:n},o?D.createElement(Rf,hg({className:tb("app-loader",jc.loader),color:"inherit",size:s.spacing(2),thickness:6},r)):D.createElement(jb,{className:jc.loadedIcon}))};sb.propTypes={classes:c.object,className:c.string,width:c.string};var Cg="RaLoadingIndicator",jc={loader:"".concat(Cg,"-loader"),loadedIcon:"".concat(Cg,"-loadedIcon")},b7=ue("div",{name:Cg,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(jc.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(jc.loadedIcon)]={},t});const gp=e=>e.scrollTop;function os(e,t){var n,r;const{timeout:o,easing:s,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=l.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:l.transitionDelay}}const Q7=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function x7(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),s=As(t);let l;if(t.fakeTransform)l=t.fakeTransform;else{const g=s.getComputedStyle(t);l=g.getPropertyValue("-webkit-transform")||g.getPropertyValue("transform")}let u=0,A=0;if(l&&l!=="none"&&typeof l=="string"){const g=l.split("(")[1].split(")")[0].split(",");u=parseInt(g[4],10),A=parseInt(g[5],10)}return e==="left"?o?`translateX(${o.right+u-r.left}px)`:`translateX(${s.innerWidth+u-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-u}px)`:`translateX(-${r.left+r.width-u}px)`:e==="up"?o?`translateY(${o.bottom+A-r.top}px)`:`translateY(${s.innerHeight+A-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-A}px)`:`translateY(-${r.top+r.height-A}px)`}function ab(e){return typeof e=="function"?e():e}function Kl(e,t,n){const r=ab(n),o=x7(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const lb=D.forwardRef(function(t,n){const r=Rt(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:l,appear:u=!0,children:A,container:g,direction:p="down",easing:C=o,in:h,onEnter:m,onEntered:I,onEntering:B,onExit:v,onExited:O,onExiting:j,style:x,timeout:S=s,TransitionComponent:P=xf}=t,L=Ke(t,Q7),k=D.useRef(null),q=Mn(A.ref,k,n),J=F=>$=>{F&&($===void 0?F(k.current):F(k.current,$))},U=J((F,$)=>{Kl(p,F,g),gp(F),m&&m(F,$)}),_=J((F,$)=>{const H=os({timeout:S,style:x,easing:C},{mode:"enter"});F.style.webkitTransition=r.transitions.create("-webkit-transform",W({},H)),F.style.transition=r.transitions.create("transform",W({},H)),F.style.webkitTransform="none",F.style.transform="none",B&&B(F,$)}),le=J(I),ie=J(j),Z=J(F=>{const $=os({timeout:S,style:x,easing:C},{mode:"exit"});F.style.webkitTransition=r.transitions.create("-webkit-transform",$),F.style.transition=r.transitions.create("transform",$),Kl(p,F,g),v&&v(F)}),K=J(F=>{F.style.webkitTransition="",F.style.transition="",O&&O(F)}),V=F=>{l&&l(k.current,F)},G=D.useCallback(()=>{k.current&&Kl(p,k.current,g)},[p,g]);return D.useEffect(()=>{if(h||p==="down"||p==="right")return;const F=S0(()=>{k.current&&Kl(p,k.current,g)}),$=As(k.current);return $.addEventListener("resize",F),()=>{F.clear(),$.removeEventListener("resize",F)}},[p,h,g]),D.useEffect(()=>{h||G()},[h,G]),f.jsx(P,W({nodeRef:k,onEnter:U,onEntered:le,onEntering:_,onExit:Z,onExited:K,onExiting:ie,addEndListener:V,appear:u,in:h,timeout:S},L,{children:(F,$)=>D.cloneElement(A,W({ref:q,style:W({visibility:F==="exited"&&!h?"hidden":void 0},x,A.props.style)},$))}))});process.env.NODE_ENV!=="production"&&(lb.propTypes={addEndListener:c.func,appear:c.bool,children:us.isRequired,container:Tr(c.oneOfType([oi,c.func]),e=>{if(e.open){const t=ab(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
219
219
|
`))}else if(!t||typeof t.getBoundingClientRect!="function"||t.contextElement!=null&&t.contextElement.nodeType!==1)return new Error(["MUI: The `container` prop provided to the component is invalid.","It should be an HTML element instance."].join(`
|
|
220
220
|
`))}return null}),direction:c.oneOf(["down","left","right","up"]),easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const w7=lb;function T7(e){return typeof e=="string"}function P7(e,t,n){return e===void 0||T7(e)?t:W({},t,{ownerState:W({},t.ownerState,n)})}const S7={disableDefaultClasses:!1},R7=D.createContext(S7);function O7(e){const{disableDefaultClasses:t}=D.useContext(R7);return n=>t?"":e(n)}function cb(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function j7(e,t,n){return typeof e=="function"?e(t,n):e}function TI(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function M7(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:s}=e;if(!t){const m=Ge(o==null?void 0:o.className,r==null?void 0:r.className,s,n==null?void 0:n.className),I=W({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),B=W({},n,o,r);return m.length>0&&(B.className=m),Object.keys(I).length>0&&(B.style=I),{props:B,internalRef:void 0}}const l=cb(W({},o,r)),u=TI(r),A=TI(o),g=t(l),p=Ge(g==null?void 0:g.className,n==null?void 0:n.className,s,o==null?void 0:o.className,r==null?void 0:r.className),C=W({},g==null?void 0:g.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),h=W({},g,n,A,u);return p.length>0&&(h.className=p),Object.keys(C).length>0&&(h.style=C),{props:h,internalRef:g.ref}}const D7=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function k7(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:s=!1}=e,l=Ke(e,D7),u=s?{}:j7(r,o),{props:A,internalRef:g}=M7(W({},l,{externalSlotProps:u})),p=Mn(g,u==null?void 0:u.ref,(t=e.additionalProps)==null?void 0:t.ref);return P7(n,W({},A,{ref:p}),o)}function F7(e){const t=gr(e);return t.body===e?As(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function sa(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function PI(e){return parseInt(As(e).getComputedStyle(e).paddingRight,10)||0}function L7(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function SI(e,t,n,r,o){const s=[t,n,...r];[].forEach.call(e.children,l=>{const u=s.indexOf(l)===-1,A=!L7(l);u&&A&&sa(l,o)})}function Sd(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function N7(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(F7(r)){const l=Q4(gr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${PI(r)+l}px`;const u=gr(r).querySelectorAll(".mui-fixed");[].forEach.call(u,A=>{n.push({value:A.style.paddingRight,property:"padding-right",el:A}),A.style.paddingRight=`${PI(A)+l}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=gr(r).body;else{const l=r.parentElement,u=As(r);s=(l==null?void 0:l.nodeName)==="HTML"&&u.getComputedStyle(l).overflowY==="scroll"?l:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:l,property:u})=>{s?l.style.setProperty(u,s):l.style.removeProperty(u)})}}function V7(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class H7{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&sa(t.modalRef,!1);const o=V7(n);SI(n,t.mount,t.modalRef,o,!0);const s=Sd(this.containers,l=>l.container===n);return s!==-1?(this.containers[s].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Sd(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=N7(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Sd(this.containers,l=>l.modals.indexOf(t)!==-1),s=this.containers[o];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&sa(t.modalRef,n),SI(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(o,1);else{const l=s.modals[s.modals.length-1];l.modalRef&&sa(l.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function W7(e){return typeof e=="function"?e():e}function z7(e){return e?e.props.hasOwnProperty("in"):!1}const U7=new H7;function Y7(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=U7,closeAfterTransition:s=!1,onTransitionEnter:l,onTransitionExited:u,children:A,onClose:g,open:p,rootRef:C}=e,h=D.useRef({}),m=D.useRef(null),I=D.useRef(null),B=Mn(I,C),[v,O]=D.useState(!p),j=z7(A);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const S=()=>gr(m.current),P=()=>(h.current.modalRef=I.current,h.current.mount=m.current,h.current),L=()=>{o.mount(P(),{disableScrollLock:r}),I.current&&(I.current.scrollTop=0)},k=go(()=>{const V=W7(t)||S().body;o.add(P(),V),I.current&&L()}),q=D.useCallback(()=>o.isTopModal(P()),[o]),J=go(V=>{m.current=V,V&&(p&&q()?L():I.current&&sa(I.current,x))}),U=D.useCallback(()=>{o.remove(P(),x)},[x,o]);D.useEffect(()=>()=>{U()},[U]),D.useEffect(()=>{p?k():(!j||!s)&&U()},[p,U,j,s,k]);const _=V=>G=>{var F;(F=V.onKeyDown)==null||F.call(V,G),!(G.key!=="Escape"||!q())&&(n||(G.stopPropagation(),g&&g(G,"escapeKeyDown")))},le=V=>G=>{var F;(F=V.onClick)==null||F.call(V,G),G.target===G.currentTarget&&g&&g(G,"backdropClick")};return{getRootProps:(V={})=>{const G=cb(e);delete G.onTransitionEnter,delete G.onTransitionExited;const F=W({},G,V);return W({role:"presentation"},F,{onKeyDown:_(F),ref:B})},getBackdropProps:(V={})=>{const G=V;return W({"aria-hidden":!0},G,{onClick:le(G),open:p})},getTransitionProps:()=>{const V=()=>{O(!1),l&&l()},G=()=>{O(!0),u&&u(),s&&U()};return{onEnter:Kd(V,A==null?void 0:A.props.onEnter),onExited:Kd(G,A==null?void 0:A.props.onExited)}},rootRef:B,portalRef:J,isTopModal:q,exited:v,hasTransition:j}}const G7=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function K7(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function q7(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function J7(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||q7(e))}function X7(e){const t=[],n=[];return Array.from(e.querySelectorAll(G7)).forEach((r,o)=>{const s=K7(r);s===-1||!J7(r)||(s===0?t.push(r):n.push({documentOrder:o,tabIndex:s,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function Z7(){return!0}function Mc(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:s=X7,isEnabled:l=Z7,open:u}=e,A=D.useRef(!1),g=D.useRef(null),p=D.useRef(null),C=D.useRef(null),h=D.useRef(null),m=D.useRef(!1),I=D.useRef(null),B=Mn(t.ref,I),v=D.useRef(null);D.useEffect(()=>{!u||!I.current||(m.current=!n)},[n,u]),D.useEffect(()=>{if(!u||!I.current)return;const x=gr(I.current);return I.current.contains(x.activeElement)||(I.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
221
221
|
`)),I.current.setAttribute("tabIndex","-1")),m.current&&I.current.focus()),()=>{o||(C.current&&C.current.focus&&(A.current=!0,C.current.focus()),C.current=null)}},[u]),D.useEffect(()=>{if(!u||!I.current)return;const x=gr(I.current),S=k=>{v.current=k,!(r||!l()||k.key!=="Tab")&&x.activeElement===I.current&&k.shiftKey&&(A.current=!0,p.current&&p.current.focus())},P=()=>{const k=I.current;if(k===null)return;if(!x.hasFocus()||!l()||A.current){A.current=!1;return}if(k.contains(x.activeElement)||r&&x.activeElement!==g.current&&x.activeElement!==p.current)return;if(x.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let q=[];if((x.activeElement===g.current||x.activeElement===p.current)&&(q=s(I.current)),q.length>0){var J,U;const _=!!((J=v.current)!=null&&J.shiftKey&&((U=v.current)==null?void 0:U.key)==="Tab"),le=q[0],ie=q[q.length-1];typeof le!="string"&&typeof ie!="string"&&(_?ie.focus():le.focus())}else k.focus()};x.addEventListener("focusin",P),x.addEventListener("keydown",S,!0);const L=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&P()},50);return()=>{clearInterval(L),x.removeEventListener("focusin",P),x.removeEventListener("keydown",S,!0)}},[n,r,o,l,u,s]);const O=x=>{C.current===null&&(C.current=x.relatedTarget),m.current=!0,h.current=x.target;const S=t.props.onFocus;S&&S(x)},j=x=>{C.current===null&&(C.current=x.relatedTarget),m.current=!0};return f.jsxs(D.Fragment,{children:[f.jsx("div",{tabIndex:u?0:-1,onFocus:j,ref:g,"data-testid":"sentinelStart"}),D.cloneElement(t,{ref:B,onFocus:O}),f.jsx("div",{tabIndex:u?0:-1,onFocus:j,ref:p,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Mc.propTypes={children:us,disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableRestoreFocus:c.bool,getTabbable:c.func,isEnabled:c.func,open:c.bool.isRequired});process.env.NODE_ENV!=="production"&&(Mc["propTypes"]=Uc(Mc.propTypes));function _7(e){return typeof e=="function"?e():e}const Ea=D.forwardRef(function(t,n){const{children:r,container:o,disablePortal:s=!1}=t,[l,u]=D.useState(null),A=Mn(D.isValidElement(r)?r.ref:null,n);if($i(()=>{s||u(_7(o)||document.body)},[o,s]),$i(()=>{if(l&&!s)return gc(n,l),()=>{gc(n,null)}},[n,l,s]),s){if(D.isValidElement(r)){const g={ref:A};return D.cloneElement(r,g)}return f.jsx(D.Fragment,{children:r})}return f.jsx(D.Fragment,{children:l&&YR.createPortal(r,l)})});process.env.NODE_ENV!=="production"&&(Ea.propTypes={children:c.node,container:c.oneOfType([oi,c.func]),disablePortal:c.bool});process.env.NODE_ENV!=="production"&&(Ea["propTypes"]=Uc(Ea.propTypes));const $7=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],eV={entering:{opacity:1},entered:{opacity:1}},ub=D.forwardRef(function(t,n){const r=Rt(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:l=!0,children:u,easing:A,in:g,onEnter:p,onEntered:C,onEntering:h,onExit:m,onExited:I,onExiting:B,style:v,timeout:O=o,TransitionComponent:j=xf}=t,x=Ke(t,$7),S=D.useRef(null),P=Mn(S,u.ref,n),L=Z=>K=>{if(Z){const V=S.current;K===void 0?Z(V):Z(V,K)}},k=L(h),q=L((Z,K)=>{gp(Z);const V=os({style:v,timeout:O,easing:A},{mode:"enter"});Z.style.webkitTransition=r.transitions.create("opacity",V),Z.style.transition=r.transitions.create("opacity",V),p&&p(Z,K)}),J=L(C),U=L(B),_=L(Z=>{const K=os({style:v,timeout:O,easing:A},{mode:"exit"});Z.style.webkitTransition=r.transitions.create("opacity",K),Z.style.transition=r.transitions.create("opacity",K),m&&m(Z)}),le=L(I),ie=Z=>{s&&s(S.current,Z)};return f.jsx(j,W({appear:l,in:g,nodeRef:S,onEnter:q,onEntered:J,onEntering:k,onExit:_,onExited:le,onExiting:U,addEndListener:ie,timeout:O},x,{children:(Z,K)=>D.cloneElement(u,W({style:W({opacity:0,visibility:Z==="exited"&&!g?"hidden":void 0},eV[Z],v,u.props.style),ref:P},K))}))});process.env.NODE_ENV!=="production"&&(ub.propTypes={addEndListener:c.func,appear:c.bool,children:us.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const tV=ub;function nV(e){return Nt("MuiBackdrop",e)}Ut("MuiBackdrop",["root","invisible"]);const rV=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],oV=e=>{const{classes:t,invisible:n}=e;return sn({root:["root",n&&"invisible"]},nV,t)},iV=ue("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>W({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),Ab=D.forwardRef(function(t,n){var r,o,s;const l=Yt({props:t,name:"MuiBackdrop"}),{children:u,className:A,component:g="div",components:p={},componentsProps:C={},invisible:h=!1,open:m,slotProps:I={},slots:B={},TransitionComponent:v=tV,transitionDuration:O}=l,j=Ke(l,rV),x=W({},l,{component:g,invisible:h}),S=oV(x),P=(r=I.root)!=null?r:C.root;return f.jsx(v,W({in:m,timeout:O},j,{children:f.jsx(iV,W({"aria-hidden":!0},P,{as:(o=(s=B.root)!=null?s:p.Root)!=null?o:g,className:Ge(S.root,A,P==null?void 0:P.className),ownerState:W({},x,P==null?void 0:P.ownerState),classes:S,ref:n,children:u}))}))});process.env.NODE_ENV!=="production"&&(Ab.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.object}),invisible:c.bool,open:c.bool.isRequired,slotProps:c.shape({root:c.object}),slots:c.shape({root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const sV=Ab;function aV(e){return Nt("MuiModal",e)}Ut("MuiModal",["root","hidden","backdrop"]);const lV=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],cV=e=>{const{open:t,exited:n,classes:r}=e;return sn({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},aV,r)},uV=ue("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>W({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),AV=ue(sV,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),db=D.forwardRef(function(t,n){var r,o,s,l,u,A;const g=Yt({name:"MuiModal",props:t}),{BackdropComponent:p=AV,BackdropProps:C,className:h,closeAfterTransition:m=!1,children:I,container:B,component:v,components:O={},componentsProps:j={},disableAutoFocus:x=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:P=!1,disablePortal:L=!1,disableRestoreFocus:k=!1,disableScrollLock:q=!1,hideBackdrop:J=!1,keepMounted:U=!1,onBackdropClick:_,open:le,slotProps:ie,slots:Z}=g,K=Ke(g,lV),V=W({},g,{closeAfterTransition:m,disableAutoFocus:x,disableEnforceFocus:S,disableEscapeKeyDown:P,disablePortal:L,disableRestoreFocus:k,disableScrollLock:q,hideBackdrop:J,keepMounted:U}),{getRootProps:G,getBackdropProps:F,getTransitionProps:$,portalRef:H,isTopModal:X,exited:Ae,hasTransition:ge}=Y7(W({},V,{rootRef:n})),ce=W({},V,{exited:Ae}),de=cV(ce),fe={};if(I.props.tabIndex===void 0&&(fe.tabIndex="-1"),ge){const{onEnter:Ne,onExited:te}=$();fe.onEnter=Ne,fe.onExited=te}const Be=(r=(o=Z==null?void 0:Z.root)!=null?o:O.Root)!=null?r:uV,me=(s=(l=Z==null?void 0:Z.backdrop)!=null?l:O.Backdrop)!=null?s:p,he=(u=ie==null?void 0:ie.root)!=null?u:j.root,Ie=(A=ie==null?void 0:ie.backdrop)!=null?A:j.backdrop,Qe=yr.useSlotProps({elementType:Be,externalSlotProps:he,externalForwardedProps:K,getSlotProps:G,additionalProps:{ref:n,as:v},ownerState:ce,className:Ge(h,he==null?void 0:he.className,de==null?void 0:de.root,!ce.open&&ce.exited&&(de==null?void 0:de.hidden))}),ae=yr.useSlotProps({elementType:me,externalSlotProps:Ie,additionalProps:C,getSlotProps:Ne=>F(W({},Ne,{onClick:te=>{_&&_(te),Ne!=null&&Ne.onClick&&Ne.onClick(te)}})),className:Ge(Ie==null?void 0:Ie.className,C==null?void 0:C.className,de==null?void 0:de.backdrop),ownerState:ce});return!U&&!le&&(!ge||Ae)?null:f.jsx(Ea,{ref:H,container:B,disablePortal:L,children:f.jsxs(Be,W({},Qe,{children:[!J&&p?f.jsx(me,W({},ae)):null,f.jsx(Mc,{disableEnforceFocus:S,disableAutoFocus:x,disableRestoreFocus:k,isEnabled:X,open:le,children:D.cloneElement(I,fe)})]}))})});process.env.NODE_ENV!=="production"&&(db.propTypes={BackdropComponent:c.elementType,BackdropProps:c.object,children:us.isRequired,classes:c.object,className:c.string,closeAfterTransition:c.bool,component:c.elementType,components:c.shape({Backdrop:c.elementType,Root:c.elementType}),componentsProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),container:c.oneOfType([oi,c.func]),disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableEscapeKeyDown:c.bool,disablePortal:c.bool,disableRestoreFocus:c.bool,disableScrollLock:c.bool,hideBackdrop:c.bool,keepMounted:c.bool,onBackdropClick:c.func,onClose:c.func,onTransitionEnter:c.func,onTransitionExited:c.func,open:c.bool.isRequired,slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const dV=db;var fp={},gV=Su;Object.defineProperty(fp,"__esModule",{value:!0});var gb=fp.default=void 0,fV=gV(Ru()),pV=f,hV=(0,fV.default)((0,pV.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"}),"History");gb=fp.default=hV;var pp={},CV=Su;Object.defineProperty(pp,"__esModule",{value:!0});var fb=pp.default=void 0,mV=CV(Ru()),EV=f,IV=(0,mV.default)((0,EV.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");fb=pp.default=IV;var BV=function(e){var t=e.children,n=e.editor,r=e.preferenceKey,o=e.openButtonLabel,s=o===void 0?"ra.configurable.customize":o,l=e.sx,u="preferences.".concat(r),A=pe.usePreferencesEditor(),g=!!A,p=pe.useTranslate(),C=A||{},h=C.isEnabled,m=C.setEditor,I=C.preferenceKey,B=C.setPreferenceKey,v=u===I,O=w.useRef(v),j=w.useRef(null),x=w.useState(!1),S=x[0],P=x[1];if(w.useEffect(function(){O.current=v},[v]),w.useEffect(function(){return function(){O.current&&(B&&B(null),m&&m(null))}},[m,B]),!g)return t;var L=function(){m(w.cloneElement(n,{preferenceKey:u,key:u})),B(u)},k=function(){P(!0)},q=function(){P(!1)};return D.createElement(pe.PreferenceKeyContextProvider,{value:u},D.createElement(vV,{className:tb(Hr.root,h&&Hr.editMode,v&&Hr.editorActive),sx:l,ref:j,onMouseEnter:h?k:void 0,onMouseLeave:h?q:void 0},t),D.createElement(b.Popover,{open:h&&(S||v),sx:{pointerEvents:"none","& .MuiPaper-root":{pointerEvents:"auto",borderRadius:10,padding:"2px",lineHeight:0,backgroundColor:"warning.light",color:"warning.contrastText","&:hover":{cursor:"pointer"}}},anchorEl:j.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"center"},onClose:q,PaperProps:{elevation:1,onMouseEnter:k,onMouseLeave:q,title:p(s),onClick:L},disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,disableScrollLock:!0,marginThreshold:8},D.createElement(fb,{fontSize:"12px"})))},sc="RaConfigurable",Hr={root:"".concat(sc,"-root"),editMode:"".concat(sc,"-editMode"),editorActive:"".concat(sc,"-editorActive")},vV=ue("span",{name:sc,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={position:"relative",display:"inline-block"},t["&.".concat(Hr.editMode)]={transition:n.transitions.create("outline"),outline:"".concat(b.alpha(n.palette.warning.main,.3)," solid 2px")},t["&.".concat(Hr.editMode,":hover ")]={outline:"".concat(b.alpha(n.palette.warning.main,.5)," solid 2px")},t["&.".concat(Hr.editMode,".").concat(Hr.editorActive," , &.").concat(Hr.editMode,".").concat(Hr.editorActive,":hover ")]={outline:"".concat(n.palette.warning.main," solid 2px")},t}),$o=globalThis&&globalThis.__assign||function(){return $o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},$o.apply(this,arguments)},yV=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},bV=function(e){var t=e.title,n=e.defaultTitle,r=e.className,o=yV(e,["title","defaultTitle","className"]),s=pe.usePreference()[0],l=pe.useTranslate(),u=pe.useRecordContext();return s?D.createElement("span",$o({className:r},o),l(s,$o($o({},u),{_:s}))):D.createElement("span",{className:r},t?typeof t=="string"?D.createElement("span",$o({},o),l(t,{_:t})):t:D.createElement("span",$o({},o),n))},Dc=globalThis&&globalThis.__assign||function(){return Dc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Dc.apply(this,arguments)},QV=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},xV=function(){var e=pe.usePreferenceInput();return D.createElement("form",null,D.createElement(b.TextField,Dc({label:"title",variant:"filled",size:"small",fullWidth:!0,sx:{mb:1}},e)))},wV=function(e){var t=e.preferenceKey,n=QV(e,["preferenceKey"]),r=Bt.useLocation().pathname;return D.createElement(BV,{editor:D.createElement(xV,null),preferenceKey:t||"".concat(r,".title"),sx:{"&.RaConfigurable-editMode":{margin:"2px"}}},D.createElement(bV,Dc({},n)))},mg=globalThis&&globalThis.__assign||function(){return mg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},mg.apply(this,arguments)},TV=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},pb=function(e){var t=e.defaultTitle,n=e.title,r=e.preferenceKey,o=TV(e,["defaultTitle","title","preferenceKey"]),s=w.useState(function(){return typeof document<"u"?document.getElementById("react-admin-title"):null}),l=s[0],u=s[1];return w.useEffect(function(){u(function(A){var g=typeof document<"u"&&document.body.contains(A);return A&&g?A:typeof document<"u"?document.getElementById("react-admin-title"):null})},[]),l?(pe.warning(!t&&!n,"Missing title prop in <Title> element"),Hi.createPortal(D.createElement(wV,mg({title:n,defaultTitle:t,preferenceKey:r},o)),l)):null},hb=c.oneOfType([c.string,c.element]);pb.propTypes={defaultTitle:c.string,className:c.string,record:c.any,title:hb};var PV=function(e){var t=Zi.useLocation().pathname,n=w.useRef(t);w.useEffect(function(){t!==n.current&&e()},[t,e])},SV=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),t.length!==n.length||t.some(function(r,o){return!Object.is(r,n[o])})},RI={error:null},RV=function(e){Qf(t,e);function t(){for(var r,o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s))||this,r.state=RI,r.resetErrorBoundary=function(){for(var u,A=arguments.length,g=new Array(A),p=0;p<A;p++)g[p]=arguments[p];r.props.onReset==null||(u=r.props).onReset.apply(u,g),r.reset()},r}t.getDerivedStateFromError=function(o){return{error:o}};var n=t.prototype;return n.reset=function(){this.setState(RI)},n.componentDidCatch=function(o,s){var l,u;(l=(u=this.props).onError)==null||l.call(u,o,s)},n.componentDidUpdate=function(o,s){var l=this.state.error,u=this.props.resetKeys;if(l!==null&&s.error!==null&&SV(o.resetKeys,u)){var A,g;(A=(g=this.props).onResetKeysChange)==null||A.call(g,o.resetKeys,u),this.reset()}},n.render=function(){var o=this.state.error,s=this.props,l=s.fallbackRender,u=s.FallbackComponent,A=s.fallback;if(o!==null){var g={error:o,resetErrorBoundary:this.resetErrorBoundary};if(D.isValidElement(A))return A;if(typeof l=="function")return l(g);if(u)return D.createElement(u,g);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(D.Component),Eg=globalThis&&globalThis.__assign||function(){return Eg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Eg.apply(this,arguments)},OV=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},Cb=function(e){var t=e.className,n=e.loadingPrimary,r=n===void 0?"ra.page.loading":n,o=e.loadingSecondary,s=o===void 0?"ra.message.loading":o,l=OV(e,["className","loadingPrimary","loadingSecondary"]),u=pe.useTimeout(1e3),A=pe.useTranslate();return u?D.createElement(jV,Eg({className:t},l),D.createElement("div",{className:kc.message},D.createElement(Rf,{className:kc.icon}),D.createElement(b.Typography,{variant:"h5",mt:3,color:"text.secondary"},A(r,{_:r})),D.createElement(b.Typography,{variant:"body2"},A(s,{_:s})))):null};Cb.propTypes={className:c.string,loadingPrimary:c.string,loadingSecondary:c.string};var ac="RaLoading",kc={root:"".concat(ac,"-root"),icon:"".concat(ac,"-icon"),message:"".concat(ac,"-message")},jV=ue("div",{name:ac,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%"},t["& .".concat(kc.message)]={textAlign:"center",fontFamily:"Roboto, sans-serif",color:n.palette.text.disabled,paddingTop:"1em",paddingBottom:"1em"},t["& .".concat(kc.icon)]={width:"9em",height:"9em"},t});function MV(e){return Nt("MuiToolbar",e)}Ut("MuiToolbar",["root","gutters","regular","dense"]);const DV=["className","component","disableGutters","variant"],kV=e=>{const{classes:t,disableGutters:n,variant:r}=e;return sn({root:["root",!n&&"gutters",r]},MV,t)},FV=ue("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>W({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),mb=D.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiToolbar"}),{className:o,component:s="div",disableGutters:l=!1,variant:u="regular"}=r,A=Ke(r,DV),g=W({},r,{component:s,disableGutters:l,variant:u}),p=kV(g);return f.jsx(FV,W({as:s,className:Ge(p.root,o),ref:n,ownerState:g},A))});process.env.NODE_ENV!=="production"&&(mb.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,disableGutters:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["dense","regular"]),c.string])});const LV=mb;var hp={},NV=Su;Object.defineProperty(hp,"__esModule",{value:!0});var Eb=hp.default=void 0,VV=NV(Ru()),HV=f,WV=(0,VV.default)((0,HV.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),"Refresh");Eb=hp.default=WV;const zV=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Ig(e){return`scale(${e}, ${e**2})`}const UV={entering:{opacity:1,transform:Ig(1)},entered:{opacity:1,transform:"none"}},Rd=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Cp=D.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:s,easing:l,in:u,onEnter:A,onEntered:g,onEntering:p,onExit:C,onExited:h,onExiting:m,style:I,timeout:B="auto",TransitionComponent:v=xf}=t,O=Ke(t,zV),j=D.useRef(),x=D.useRef(),S=Rt(),P=D.useRef(null),L=Mn(P,s.ref,n),k=K=>V=>{if(K){const G=P.current;V===void 0?K(G):K(G,V)}},q=k(p),J=k((K,V)=>{gp(K);const{duration:G,delay:F,easing:$}=os({style:I,timeout:B,easing:l},{mode:"enter"});let H;B==="auto"?(H=S.transitions.getAutoHeightDuration(K.clientHeight),x.current=H):H=G,K.style.transition=[S.transitions.create("opacity",{duration:H,delay:F}),S.transitions.create("transform",{duration:Rd?H:H*.666,delay:F,easing:$})].join(","),A&&A(K,V)}),U=k(g),_=k(m),le=k(K=>{const{duration:V,delay:G,easing:F}=os({style:I,timeout:B,easing:l},{mode:"exit"});let $;B==="auto"?($=S.transitions.getAutoHeightDuration(K.clientHeight),x.current=$):$=V,K.style.transition=[S.transitions.create("opacity",{duration:$,delay:G}),S.transitions.create("transform",{duration:Rd?$:$*.666,delay:Rd?G:G||$*.333,easing:F})].join(","),K.style.opacity=0,K.style.transform=Ig(.75),C&&C(K)}),ie=k(h),Z=K=>{B==="auto"&&(j.current=setTimeout(K,x.current||0)),r&&r(P.current,K)};return D.useEffect(()=>()=>{clearTimeout(j.current)},[]),f.jsx(v,W({appear:o,in:u,nodeRef:P,onEnter:J,onEntered:U,onEntering:q,onExit:le,onExited:ie,onExiting:_,addEndListener:Z,timeout:B==="auto"?null:B},O,{children:(K,V)=>D.cloneElement(s,W({style:W({opacity:0,transform:Ig(.75),visibility:K==="exited"&&!u?"hidden":void 0},UV[K],I,s.props.style),ref:L},V))}))});process.env.NODE_ENV!=="production"&&(Cp.propTypes={addEndListener:c.func,appear:c.bool,children:us.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});Cp.muiSupportAuto=!0;const OI=Cp;var En="top",er="bottom",tr="right",In="left",mp="auto",Fa=[En,er,tr,In],is="start",Ia="end",YV="clippingParents",Ib="viewport",Ks="popper",GV="reference",jI=Fa.reduce(function(e,t){return e.concat([t+"-"+is,t+"-"+Ia])},[]),Bb=[].concat(Fa,[mp]).reduce(function(e,t){return e.concat([t,t+"-"+is,t+"-"+Ia])},[]),KV="beforeRead",qV="read",JV="afterRead",XV="beforeMain",ZV="main",_V="afterMain",$V="beforeWrite",eH="write",tH="afterWrite",nH=[KV,qV,JV,XV,ZV,_V,$V,eH,tH];function wr(e){return e?(e.nodeName||"").toLowerCase():null}function kn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function si(e){var t=kn(e).Element;return e instanceof t||e instanceof Element}function _n(e){var t=kn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ep(e){if(typeof ShadowRoot>"u")return!1;var t=kn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function rH(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},s=t.elements[n];!_n(s)||!wr(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(l){var u=o[l];u===!1?s.removeAttribute(l):s.setAttribute(l,u===!0?"":u)}))})}function oH(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],s=t.attributes[r]||{},l=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),u=l.reduce(function(A,g){return A[g]="",A},{});!_n(o)||!wr(o)||(Object.assign(o.style,u),Object.keys(s).forEach(function(A){o.removeAttribute(A)}))})}}const iH={name:"applyStyles",enabled:!0,phase:"write",fn:rH,effect:oH,requires:["computeStyles"]};function Qr(e){return e.split("-")[0]}var ri=Math.max,Fc=Math.min,ss=Math.round;function Bg(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function vb(){return!/^((?!chrome|android).)*safari/i.test(Bg())}function as(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&_n(e)&&(o=e.offsetWidth>0&&ss(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&ss(r.height)/e.offsetHeight||1);var l=si(e)?kn(e):window,u=l.visualViewport,A=!vb()&&n,g=(r.left+(A&&u?u.offsetLeft:0))/o,p=(r.top+(A&&u?u.offsetTop:0))/s,C=r.width/o,h=r.height/s;return{width:C,height:h,top:p,right:g+C,bottom:p+h,left:g,x:g,y:p}}function Ip(e){var t=as(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function yb(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ep(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Jr(e){return kn(e).getComputedStyle(e)}function sH(e){return["table","td","th"].indexOf(wr(e))>=0}function wo(e){return((si(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ou(e){return wr(e)==="html"?e:e.assignedSlot||e.parentNode||(Ep(e)?e.host:null)||wo(e)}function MI(e){return!_n(e)||Jr(e).position==="fixed"?null:e.offsetParent}function aH(e){var t=/firefox/i.test(Bg()),n=/Trident/i.test(Bg());if(n&&_n(e)){var r=Jr(e);if(r.position==="fixed")return null}var o=Ou(e);for(Ep(o)&&(o=o.host);_n(o)&&["html","body"].indexOf(wr(o))<0;){var s=Jr(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function La(e){for(var t=kn(e),n=MI(e);n&&sH(n)&&Jr(n).position==="static";)n=MI(n);return n&&(wr(n)==="html"||wr(n)==="body"&&Jr(n).position==="static")?t:n||aH(e)||t}function Bp(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function aa(e,t,n){return ri(e,Fc(t,n))}function lH(e,t,n){var r=aa(e,t,n);return r>n?n:r}function bb(){return{top:0,right:0,bottom:0,left:0}}function Qb(e){return Object.assign({},bb(),e)}function xb(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var cH=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Qb(typeof t!="number"?t:xb(t,Fa))};function uH(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,l=n.modifiersData.popperOffsets,u=Qr(n.placement),A=Bp(u),g=[In,tr].indexOf(u)>=0,p=g?"height":"width";if(!(!s||!l)){var C=cH(o.padding,n),h=Ip(s),m=A==="y"?En:In,I=A==="y"?er:tr,B=n.rects.reference[p]+n.rects.reference[A]-l[A]-n.rects.popper[p],v=l[A]-n.rects.reference[A],O=La(s),j=O?A==="y"?O.clientHeight||0:O.clientWidth||0:0,x=B/2-v/2,S=C[m],P=j-h[p]-C[I],L=j/2-h[p]/2+x,k=aa(S,L,P),q=A;n.modifiersData[r]=(t={},t[q]=k,t.centerOffset=k-L,t)}}function AH(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||yb(t.elements.popper,o)&&(t.elements.arrow=o))}const dH={name:"arrow",enabled:!0,phase:"main",fn:uH,effect:AH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ls(e){return e.split("-")[1]}var gH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fH(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:ss(n*o)/o||0,y:ss(r*o)/o||0}}function DI(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,l=e.offsets,u=e.position,A=e.gpuAcceleration,g=e.adaptive,p=e.roundOffsets,C=e.isFixed,h=l.x,m=h===void 0?0:h,I=l.y,B=I===void 0?0:I,v=typeof p=="function"?p({x:m,y:B}):{x:m,y:B};m=v.x,B=v.y;var O=l.hasOwnProperty("x"),j=l.hasOwnProperty("y"),x=In,S=En,P=window;if(g){var L=La(n),k="clientHeight",q="clientWidth";if(L===kn(n)&&(L=wo(n),Jr(L).position!=="static"&&u==="absolute"&&(k="scrollHeight",q="scrollWidth")),L=L,o===En||(o===In||o===tr)&&s===Ia){S=er;var J=C&&L===P&&P.visualViewport?P.visualViewport.height:L[k];B-=J-r.height,B*=A?1:-1}if(o===In||(o===En||o===er)&&s===Ia){x=tr;var U=C&&L===P&&P.visualViewport?P.visualViewport.width:L[q];m-=U-r.width,m*=A?1:-1}}var _=Object.assign({position:u},g&&gH),le=p===!0?fH({x:m,y:B},kn(n)):{x:m,y:B};if(m=le.x,B=le.y,A){var ie;return Object.assign({},_,(ie={},ie[S]=j?"0":"",ie[x]=O?"0":"",ie.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+B+"px)":"translate3d("+m+"px, "+B+"px, 0)",ie))}return Object.assign({},_,(t={},t[S]=j?B+"px":"",t[x]=O?m+"px":"",t.transform="",t))}function pH(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,l=s===void 0?!0:s,u=n.roundOffsets,A=u===void 0?!0:u,g={placement:Qr(t.placement),variation:ls(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,DI(Object.assign({},g,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:A})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,DI(Object.assign({},g,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:A})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const hH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:pH,data:{}};var ql={passive:!0};function CH(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,l=r.resize,u=l===void 0?!0:l,A=kn(t.elements.popper),g=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&g.forEach(function(p){p.addEventListener("scroll",n.update,ql)}),u&&A.addEventListener("resize",n.update,ql),function(){s&&g.forEach(function(p){p.removeEventListener("scroll",n.update,ql)}),u&&A.removeEventListener("resize",n.update,ql)}}const mH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:CH,data:{}};var EH={left:"right",right:"left",bottom:"top",top:"bottom"};function lc(e){return e.replace(/left|right|bottom|top/g,function(t){return EH[t]})}var IH={start:"end",end:"start"};function kI(e){return e.replace(/start|end/g,function(t){return IH[t]})}function vp(e){var t=kn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function yp(e){return as(wo(e)).left+vp(e).scrollLeft}function BH(e,t){var n=kn(e),r=wo(e),o=n.visualViewport,s=r.clientWidth,l=r.clientHeight,u=0,A=0;if(o){s=o.width,l=o.height;var g=vb();(g||!g&&t==="fixed")&&(u=o.offsetLeft,A=o.offsetTop)}return{width:s,height:l,x:u+yp(e),y:A}}function vH(e){var t,n=wo(e),r=vp(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=ri(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=ri(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-r.scrollLeft+yp(e),A=-r.scrollTop;return Jr(o||n).direction==="rtl"&&(u+=ri(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:l,x:u,y:A}}function bp(e){var t=Jr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function wb(e){return["html","body","#document"].indexOf(wr(e))>=0?e.ownerDocument.body:_n(e)&&bp(e)?e:wb(Ou(e))}function la(e,t){var n;t===void 0&&(t=[]);var r=wb(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=kn(r),l=o?[s].concat(s.visualViewport||[],bp(r)?r:[]):r,u=t.concat(l);return o?u:u.concat(la(Ou(l)))}function vg(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function yH(e,t){var n=as(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function FI(e,t,n){return t===Ib?vg(BH(e,n)):si(t)?yH(t,n):vg(vH(wo(e)))}function bH(e){var t=la(Ou(e)),n=["absolute","fixed"].indexOf(Jr(e).position)>=0,r=n&&_n(e)?La(e):e;return si(r)?t.filter(function(o){return si(o)&&yb(o,r)&&wr(o)!=="body"}):[]}function QH(e,t,n,r){var o=t==="clippingParents"?bH(e):[].concat(t),s=[].concat(o,[n]),l=s[0],u=s.reduce(function(A,g){var p=FI(e,g,r);return A.top=ri(p.top,A.top),A.right=Fc(p.right,A.right),A.bottom=Fc(p.bottom,A.bottom),A.left=ri(p.left,A.left),A},FI(e,l,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Tb(e){var t=e.reference,n=e.element,r=e.placement,o=r?Qr(r):null,s=r?ls(r):null,l=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,A;switch(o){case En:A={x:l,y:t.y-n.height};break;case er:A={x:l,y:t.y+t.height};break;case tr:A={x:t.x+t.width,y:u};break;case In:A={x:t.x-n.width,y:u};break;default:A={x:t.x,y:t.y}}var g=o?Bp(o):null;if(g!=null){var p=g==="y"?"height":"width";switch(s){case is:A[g]=A[g]-(t[p]/2-n[p]/2);break;case Ia:A[g]=A[g]+(t[p]/2-n[p]/2);break}}return A}function Ba(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,l=s===void 0?e.strategy:s,u=n.boundary,A=u===void 0?YV:u,g=n.rootBoundary,p=g===void 0?Ib:g,C=n.elementContext,h=C===void 0?Ks:C,m=n.altBoundary,I=m===void 0?!1:m,B=n.padding,v=B===void 0?0:B,O=Qb(typeof v!="number"?v:xb(v,Fa)),j=h===Ks?GV:Ks,x=e.rects.popper,S=e.elements[I?j:h],P=QH(si(S)?S:S.contextElement||wo(e.elements.popper),A,p,l),L=as(e.elements.reference),k=Tb({reference:L,element:x,strategy:"absolute",placement:o}),q=vg(Object.assign({},x,k)),J=h===Ks?q:L,U={top:P.top-J.top+O.top,bottom:J.bottom-P.bottom+O.bottom,left:P.left-J.left+O.left,right:J.right-P.right+O.right},_=e.modifiersData.offset;if(h===Ks&&_){var le=_[o];Object.keys(U).forEach(function(ie){var Z=[tr,er].indexOf(ie)>=0?1:-1,K=[En,er].indexOf(ie)>=0?"y":"x";U[ie]+=le[K]*Z})}return U}function xH(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,l=n.padding,u=n.flipVariations,A=n.allowedAutoPlacements,g=A===void 0?Bb:A,p=ls(r),C=p?u?jI:jI.filter(function(I){return ls(I)===p}):Fa,h=C.filter(function(I){return g.indexOf(I)>=0});h.length===0&&(h=C);var m=h.reduce(function(I,B){return I[B]=Ba(e,{placement:B,boundary:o,rootBoundary:s,padding:l})[Qr(B)],I},{});return Object.keys(m).sort(function(I,B){return m[I]-m[B]})}function wH(e){if(Qr(e)===mp)return[];var t=lc(e);return[kI(e),t,kI(t)]}function TH(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,l=n.altAxis,u=l===void 0?!0:l,A=n.fallbackPlacements,g=n.padding,p=n.boundary,C=n.rootBoundary,h=n.altBoundary,m=n.flipVariations,I=m===void 0?!0:m,B=n.allowedAutoPlacements,v=t.options.placement,O=Qr(v),j=O===v,x=A||(j||!I?[lc(v)]:wH(v)),S=[v].concat(x).reduce(function(ce,de){return ce.concat(Qr(de)===mp?xH(t,{placement:de,boundary:p,rootBoundary:C,padding:g,flipVariations:I,allowedAutoPlacements:B}):de)},[]),P=t.rects.reference,L=t.rects.popper,k=new Map,q=!0,J=S[0],U=0;U<S.length;U++){var _=S[U],le=Qr(_),ie=ls(_)===is,Z=[En,er].indexOf(le)>=0,K=Z?"width":"height",V=Ba(t,{placement:_,boundary:p,rootBoundary:C,altBoundary:h,padding:g}),G=Z?ie?tr:In:ie?er:En;P[K]>L[K]&&(G=lc(G));var F=lc(G),$=[];if(s&&$.push(V[le]<=0),u&&$.push(V[G]<=0,V[F]<=0),$.every(function(ce){return ce})){J=_,q=!1;break}k.set(_,$)}if(q)for(var H=I?3:1,X=function(de){var fe=S.find(function(Be){var me=k.get(Be);if(me)return me.slice(0,de).every(function(he){return he})});if(fe)return J=fe,"break"},Ae=H;Ae>0;Ae--){var ge=X(Ae);if(ge==="break")break}t.placement!==J&&(t.modifiersData[r]._skip=!0,t.placement=J,t.reset=!0)}}const PH={name:"flip",enabled:!0,phase:"main",fn:TH,requiresIfExists:["offset"],data:{_skip:!1}};function LI(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function NI(e){return[En,tr,er,In].some(function(t){return e[t]>=0})}function SH(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,l=Ba(t,{elementContext:"reference"}),u=Ba(t,{altBoundary:!0}),A=LI(l,r),g=LI(u,o,s),p=NI(A),C=NI(g);t.modifiersData[n]={referenceClippingOffsets:A,popperEscapeOffsets:g,isReferenceHidden:p,hasPopperEscaped:C},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":C})}const RH={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:SH};function OH(e,t,n){var r=Qr(e),o=[In,En].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,l=s[0],u=s[1];return l=l||0,u=(u||0)*o,[In,tr].indexOf(r)>=0?{x:u,y:l}:{x:l,y:u}}function jH(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,l=Bb.reduce(function(p,C){return p[C]=OH(C,t.rects,s),p},{}),u=l[t.placement],A=u.x,g=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=A,t.modifiersData.popperOffsets.y+=g),t.modifiersData[r]=l}const MH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jH};function DH(e){var t=e.state,n=e.name;t.modifiersData[n]=Tb({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const kH={name:"popperOffsets",enabled:!0,phase:"read",fn:DH,data:{}};function FH(e){return e==="x"?"y":"x"}function LH(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,l=n.altAxis,u=l===void 0?!1:l,A=n.boundary,g=n.rootBoundary,p=n.altBoundary,C=n.padding,h=n.tether,m=h===void 0?!0:h,I=n.tetherOffset,B=I===void 0?0:I,v=Ba(t,{boundary:A,rootBoundary:g,padding:C,altBoundary:p}),O=Qr(t.placement),j=ls(t.placement),x=!j,S=Bp(O),P=FH(S),L=t.modifiersData.popperOffsets,k=t.rects.reference,q=t.rects.popper,J=typeof B=="function"?B(Object.assign({},t.rects,{placement:t.placement})):B,U=typeof J=="number"?{mainAxis:J,altAxis:J}:Object.assign({mainAxis:0,altAxis:0},J),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,le={x:0,y:0};if(L){if(s){var ie,Z=S==="y"?En:In,K=S==="y"?er:tr,V=S==="y"?"height":"width",G=L[S],F=G+v[Z],$=G-v[K],H=m?-q[V]/2:0,X=j===is?k[V]:q[V],Ae=j===is?-q[V]:-k[V],ge=t.elements.arrow,ce=m&&ge?Ip(ge):{width:0,height:0},de=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:bb(),fe=de[Z],Be=de[K],me=aa(0,k[V],ce[V]),he=x?k[V]/2-H-me-fe-U.mainAxis:X-me-fe-U.mainAxis,Ie=x?-k[V]/2+H+me+Be+U.mainAxis:Ae+me+Be+U.mainAxis,Qe=t.elements.arrow&&La(t.elements.arrow),ae=Qe?S==="y"?Qe.clientTop||0:Qe.clientLeft||0:0,Ne=(ie=_==null?void 0:_[S])!=null?ie:0,te=G+he-Ne-ae,_e=G+Ie-Ne,yt=aa(m?Fc(F,te):F,G,m?ri($,_e):$);L[S]=yt,le[S]=yt-G}if(u){var gt,Tt=S==="x"?En:In,pr=S==="x"?er:tr,bt=L[P],Et=P==="y"?"height":"width",ft=bt+v[Tt],Vt=bt-v[pr],Ht=[En,In].indexOf(O)!==-1,Se=(gt=_==null?void 0:_[P])!=null?gt:0,ke=Ht?ft:bt-k[Et]-q[Et]-Se+U.altAxis,we=Ht?bt+k[Et]+q[Et]-Se-U.altAxis:Vt,ze=m&&Ht?lH(ke,bt,we):aa(m?ke:ft,bt,m?we:Vt);L[P]=ze,le[P]=ze-bt}t.modifiersData[r]=le}}const NH={name:"preventOverflow",enabled:!0,phase:"main",fn:LH,requiresIfExists:["offset"]};function VH(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function HH(e){return e===kn(e)||!_n(e)?vp(e):VH(e)}function WH(e){var t=e.getBoundingClientRect(),n=ss(t.width)/e.offsetWidth||1,r=ss(t.height)/e.offsetHeight||1;return n!==1||r!==1}function zH(e,t,n){n===void 0&&(n=!1);var r=_n(t),o=_n(t)&&WH(t),s=wo(t),l=as(e,o,n),u={scrollLeft:0,scrollTop:0},A={x:0,y:0};return(r||!r&&!n)&&((wr(t)!=="body"||bp(s))&&(u=HH(t)),_n(t)?(A=as(t,!0),A.x+=t.clientLeft,A.y+=t.clientTop):s&&(A.x=yp(s))),{x:l.left+u.scrollLeft-A.x,y:l.top+u.scrollTop-A.y,width:l.width,height:l.height}}function UH(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var l=[].concat(s.requires||[],s.requiresIfExists||[]);l.forEach(function(u){if(!n.has(u)){var A=t.get(u);A&&o(A)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function YH(e){var t=UH(e);return nH.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function GH(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function KH(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var VI={placement:"bottom",modifiers:[],strategy:"absolute"};function HI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function qH(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?VI:o;return function(u,A,g){g===void 0&&(g=s);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},VI,s),modifiersData:{},elements:{reference:u,popper:A},attributes:{},styles:{}},C=[],h=!1,m={state:p,setOptions:function(O){var j=typeof O=="function"?O(p.options):O;B(),p.options=Object.assign({},s,p.options,j),p.scrollParents={reference:si(u)?la(u):u.contextElement?la(u.contextElement):[],popper:la(A)};var x=YH(KH([].concat(r,p.options.modifiers)));return p.orderedModifiers=x.filter(function(S){return S.enabled}),I(),m.update()},forceUpdate:function(){if(!h){var O=p.elements,j=O.reference,x=O.popper;if(HI(j,x)){p.rects={reference:zH(j,La(x),p.options.strategy==="fixed"),popper:Ip(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(U){return p.modifiersData[U.name]=Object.assign({},U.data)});for(var S=0;S<p.orderedModifiers.length;S++){if(p.reset===!0){p.reset=!1,S=-1;continue}var P=p.orderedModifiers[S],L=P.fn,k=P.options,q=k===void 0?{}:k,J=P.name;typeof L=="function"&&(p=L({state:p,options:q,name:J,instance:m})||p)}}}},update:GH(function(){return new Promise(function(v){m.forceUpdate(),v(p)})}),destroy:function(){B(),h=!0}};if(!HI(u,A))return m;m.setOptions(g).then(function(v){!h&&g.onFirstUpdate&&g.onFirstUpdate(v)});function I(){p.orderedModifiers.forEach(function(v){var O=v.name,j=v.options,x=j===void 0?{}:j,S=v.effect;if(typeof S=="function"){var P=S({state:p,name:O,instance:m,options:x}),L=function(){};C.push(P||L)}})}function B(){C.forEach(function(v){return v()}),C=[]}return m}}var JH=[mH,kH,hH,iH,MH,PH,NH,dH,RH],XH=qH({defaultModifiers:JH});function ZH(e){return Nt("MuiPopper",e)}Ut("MuiPopper",["root"]);const _H=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],$H=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function eW(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function Lc(e){return typeof e=="function"?e():e}function ju(e){return e.nodeType!==void 0}function tW(e){return!ju(e)}const nW=()=>sn({root:["root"]},O7(ZH)),rW={},oW=D.forwardRef(function(t,n){var r;const{anchorEl:o,children:s,direction:l,disablePortal:u,modifiers:A,open:g,placement:p,popperOptions:C,popperRef:h,slotProps:m={},slots:I={},TransitionProps:B}=t,v=Ke(t,_H),O=D.useRef(null),j=Mn(O,n),x=D.useRef(null),S=Mn(x,h),P=D.useRef(S);$i(()=>{P.current=S},[S]),D.useImperativeHandle(h,()=>x.current,[]);const L=eW(p,l),[k,q]=D.useState(L),[J,U]=D.useState(Lc(o));D.useEffect(()=>{x.current&&x.current.forceUpdate()}),D.useEffect(()=>{o&&U(Lc(o))},[o]),$i(()=>{if(!J||!g)return;const K=F=>{q(F.placement)};if(process.env.NODE_ENV!=="production"&&J&&ju(J)&&J.nodeType===1){const F=J.getBoundingClientRect();process.env.NODE_ENV!=="test"&&F.top===0&&F.left===0&&F.right===0&&F.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|