3 lines
46 KiB
JavaScript
3 lines
46 KiB
JavaScript
import{Y as He,Z as qe,$ as Xe,_ as v,z as Pe,y as he,a0 as Ge,a1 as Ke,a2 as Qe,r as p,x as Ze,e as _,j as t,h as F,i as z,a as A,a3 as Je,a4 as et,b as B,a5 as tt,c as q,a6 as ot,a7 as at,a8 as nt,a9 as rt,aa as it,ab as st,H as Re,ac as lt,ad as ct,ae as dt,af as pt,g as V,s as L,ag as ut,ah as mt,u as Y,ai as ht,aj as gt,P as Se,w as bt,ak as ft,T as d,K as xt,M as vt,f as r,al as Ct,am as Te,an as St,S as m,t as K,I as Be,F as ae,B as Ne,D as J,ao as E,G as ee,L as ye,ap as ke,aq as le,n as yt,ar as kt,N as Dt,Q as Lt,U as Pt,as as Ie,at as It,au as $t}from"./index.6e3d3f58.js";import{P as wt}from"./Page.e7b124c2.js";import{C as j,G as U}from"./Grid.b6e46be2.js";import{c as Fe,b as Mt,u as We,o as je,f as Ce,F as _e,R as Rt,L as ze,d as Tt,e as Q}from"./RHFTextField.522e64b8.js";import{S as Bt,L as ne,l as O,a as Nt}from"./Switch.cad85877.js";import{T as Ae}from"./TextField.d5f4a1bd.js";import{B as Ft,T as Wt,v as jt}from"./BaseTablePagination.b8f78785.js";import{T as _t,a as zt,b as At,c as se,d as H,e as Et}from"./TableRow.ebea94d3.js";import"./KeyboardArrowRight.9ad3d050.js";function Ut(e,o){return()=>null}function Ot(e,o){return()=>null}function Vt(e,o,a,n,i){return null}const Yt=["component","direction","spacing","divider","children","className"],Ht=He(),qt=qe("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,o)=>o.root});function Xt(e){return Xe({props:e,name:"MuiStack",defaultTheme:Ht})}function Gt(e,o){const a=p.exports.Children.toArray(e).filter(Boolean);return a.reduce((n,i,s)=>(n.push(i),s<a.length-1&&n.push(p.exports.cloneElement(o,{key:`separator-${s}`})),n),[])}const Kt=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Qt=({ownerState:e,theme:o})=>{let a=v({display:"flex",flexDirection:"column"},Pe({theme:o},he({values:e.direction,breakpoints:o.breakpoints.values}),n=>({flexDirection:n})));if(e.spacing){const n=Ge(o),i=Object.keys(o.breakpoints.values).reduce((l,g)=>((typeof e.spacing=="object"&&e.spacing[g]!=null||typeof e.direction=="object"&&e.direction[g]!=null)&&(l[g]=!0),l),{}),s=he({values:e.direction,base:i}),h=he({values:e.spacing,base:i});typeof s=="object"&&Object.keys(s).forEach((l,g,b)=>{if(!s[l]){const f=g>0?s[b[g-1]]:"column";s[l]=f}}),a=Ke(a,Pe({theme:o},h,(l,g)=>({"& > :not(style) + :not(style)":{margin:0,[`margin${Kt(g?s[g]:e.direction)}`]:Je(n,l)}})))}return a=Qe(o.breakpoints,a),a};function Zt(e={}){const{createStyledComponent:o=qt,useThemeProps:a=Xt,componentName:n="MuiStack"}=e,i=()=>z({root:["root"]},l=>A(n,l),{}),s=o(Qt);return p.exports.forwardRef(function(l,g){const b=a(l),x=Ze(b),{component:f="div",direction:S="column",spacing:y=0,divider:C,children:D,className:I}=x,$=_(x,Yt),u={direction:S,spacing:y},w=i();return t(s,v({as:f,ownerState:u,ref:g,className:F(w.root,I)},$,{children:C?Gt(D,C):D}))})}const Jt=Zt(),eo=Jt,to={configure:e=>{console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
|
|
`)),et.configure(e)}},oo=Object.freeze(Object.defineProperty({__proto__:null,unstable_ClassNameGenerator:to,capitalize:B,createChainedFunction:tt,createSvgIcon:q,debounce:ot,deprecatedPropType:Ut,isMuiElement:at,ownerDocument:nt,ownerWindow:rt,requirePropFactory:Ot,setRef:it,unstable_useEnhancedEffect:st,unstable_useId:Re,unsupportedProp:Vt,useControlled:lt,useEventCallback:ct,useForkRef:dt,useIsFocusVisible:pt},Symbol.toStringTag,{value:"Module"})),ao=q(t("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),no=q(t("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),ro=q(t("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function io(e){return A("MuiCheckbox",e)}const so=V("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]),ge=so,lo=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size"],co=e=>{const{classes:o,indeterminate:a,color:n}=e,i={root:["root",a&&"indeterminate",`color${B(n)}`]},s=z(i,io,o);return v({},o,s)},po=L(Bt,{shouldForwardProp:e=>ut(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.root,a.indeterminate&&o.indeterminate,a.color!=="default"&&o[`color${B(a.color)}`]]}})(({theme:e,ownerState:o})=>v({color:(e.vars||e).palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${o.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(o.color==="default"?e.palette.action.active:e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},o.color!=="default"&&{[`&.${ge.checked}, &.${ge.indeterminate}`]:{color:(e.vars||e).palette[o.color].main},[`&.${ge.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),uo=t(no,{}),mo=t(ao,{}),ho=t(ro,{}),go=p.exports.forwardRef(function(o,a){var n,i;const s=Y({props:o,name:"MuiCheckbox"}),{checkedIcon:h=uo,color:c="primary",icon:l=mo,indeterminate:g=!1,indeterminateIcon:b=ho,inputProps:x,size:f="medium"}=s,S=_(s,lo),y=g?b:l,C=g?b:h,D=v({},s,{color:c,indeterminate:g,size:f}),I=co(D);return t(po,v({type:"checkbox",inputProps:v({"data-indeterminate":g},x),icon:p.exports.cloneElement(y,{fontSize:(n=y.props.fontSize)!=null?n:f}),checkedIcon:p.exports.cloneElement(C,{fontSize:(i=C.props.fontSize)!=null?i:f}),ownerState:D,ref:a},S,{classes:I}))}),bo=go;function fo(e){return A("MuiDialog",e)}const xo=V("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),be=xo,vo=p.exports.createContext({}),Ee=vo,Co=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],So=L(ht,{name:"MuiDialog",slot:"Backdrop",overrides:(e,o)=>o.backdrop})({zIndex:-1}),yo=e=>{const{classes:o,scroll:a,maxWidth:n,fullWidth:i,fullScreen:s}=e,h={root:["root"],container:["container",`scroll${B(a)}`],paper:["paper",`paperScroll${B(a)}`,`paperWidth${B(String(n))}`,i&&"paperFullWidth",s&&"paperFullScreen"]};return z(h,fo,o)},ko=L(gt,{name:"MuiDialog",slot:"Root",overridesResolver:(e,o)=>o.root})({"@media print":{position:"absolute !important"}}),Do=L("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.container,o[`scroll${B(a.scroll)}`]]}})(({ownerState:e})=>v({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),Lo=L(Se,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.paper,o[`scrollPaper${B(a.scroll)}`],o[`paperWidth${B(String(a.maxWidth))}`],a.fullWidth&&o.paperFullWidth,a.fullScreen&&o.paperFullScreen]}})(({theme:e,ownerState:o})=>v({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},o.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},o.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!o.maxWidth&&{maxWidth:"calc(100% - 64px)"},o.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`${e.breakpoints.values.xs}${e.breakpoints.unit}`,[`&.${be.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},o.maxWidth&&o.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[o.maxWidth]}${e.breakpoints.unit}`,[`&.${be.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[o.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},o.fullWidth&&{width:"calc(100% - 64px)"},o.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${be.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Po=p.exports.forwardRef(function(o,a){const n=Y({props:o,name:"MuiDialog"}),i=bt(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":h,"aria-labelledby":c,BackdropComponent:l,BackdropProps:g,children:b,className:x,disableEscapeKeyDown:f=!1,fullScreen:S=!1,fullWidth:y=!1,maxWidth:C="sm",onBackdropClick:D,onClose:I,open:$,PaperComponent:u=Se,PaperProps:w={},scroll:T="paper",TransitionComponent:R=ft,transitionDuration:W=s,TransitionProps:Z}=n,de=_(n,Co),X=v({},n,{disableEscapeKeyDown:f,fullScreen:S,fullWidth:y,maxWidth:C,scroll:T}),te=yo(X),oe=p.exports.useRef(),pe=M=>{oe.current=M.target===M.currentTarget},ue=M=>{!oe.current||(oe.current=null,D&&D(M),I&&I(M,"backdropClick"))},k=Re(c),P=p.exports.useMemo(()=>({titleId:k}),[k]);return t(ko,v({className:F(te.root,x),closeAfterTransition:!0,components:{Backdrop:So},componentsProps:{backdrop:v({transitionDuration:W,as:l},g)},disableEscapeKeyDown:f,onClose:I,open:$,ref:a,onClick:ue,ownerState:X},de,{children:t(R,v({appear:!0,in:$,timeout:W,role:"presentation"},Z,{children:t(Do,{className:F(te.container),onMouseDown:pe,ownerState:X,children:t(Lo,v({as:u,elevation:24,role:"dialog","aria-describedby":h,"aria-labelledby":k},w,{className:F(te.paper,w.className),ownerState:X,children:t(Ee.Provider,{value:P,children:b})}))})}))}))}),Io=Po;function $o(e){return A("MuiDialogContent",e)}V("MuiDialogContent",["root","dividers"]);function wo(e){return A("MuiDialogTitle",e)}const Mo=V("MuiDialogTitle",["root"]),Ro=Mo,To=["className","dividers"],Bo=e=>{const{classes:o,dividers:a}=e;return z({root:["root",a&&"dividers"]},$o,o)},No=L("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.root,a.dividers&&o.dividers]}})(({theme:e,ownerState:o})=>v({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},o.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${Ro.root} + &`]:{paddingTop:0}})),Fo=p.exports.forwardRef(function(o,a){const n=Y({props:o,name:"MuiDialogContent"}),{className:i,dividers:s=!1}=n,h=_(n,To),c=v({},n,{dividers:s}),l=Bo(c);return t(No,v({className:F(l.root,i),ownerState:c,ref:a},h))}),Wo=Fo,jo=["className","id"],_o=e=>{const{classes:o}=e;return z({root:["root"]},wo,o)},zo=L(d,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,o)=>o.root})({padding:"16px 24px",flex:"0 0 auto"}),Ao=p.exports.forwardRef(function(o,a){const n=Y({props:o,name:"MuiDialogTitle"}),{className:i,id:s}=n,h=_(n,jo),c=n,l=_o(c),{titleId:g=s}=p.exports.useContext(Ee);return t(zo,v({component:"h2",className:F(l.root,i),ownerState:c,ref:a,variant:"h6",id:g},h))}),Eo=Ao;function Uo(e){return A("MuiFormControlLabel",e)}const Oo=V("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error"]),ie=Oo,Vo=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","value"],Yo=e=>{const{classes:o,disabled:a,labelPlacement:n,error:i}=e,s={root:["root",a&&"disabled",`labelPlacement${B(n)}`,i&&"error"],label:["label",a&&"disabled"]};return z(s,Uo,o)},Ho=L("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[{[`& .${ie.label}`]:o.label},o.root,o[`labelPlacement${B(a.labelPlacement)}`]]}})(({theme:e,ownerState:o})=>v({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${ie.disabled}`]:{cursor:"default"}},o.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},o.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},o.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${ie.label}`]:{[`&.${ie.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),qo=p.exports.forwardRef(function(o,a){const n=Y({props:o,name:"MuiFormControlLabel"}),{className:i,componentsProps:s={},control:h,disabled:c,disableTypography:l,label:g,labelPlacement:b="end"}=n,x=_(n,Vo),f=xt();let S=c;typeof S>"u"&&typeof h.props.disabled<"u"&&(S=h.props.disabled),typeof S>"u"&&f&&(S=f.disabled);const y={disabled:S};["checked","name","onChange","value","inputRef"].forEach(u=>{typeof h.props[u]>"u"&&typeof n[u]<"u"&&(y[u]=n[u])});const C=vt({props:n,muiFormControl:f,states:["error"]}),D=v({},n,{disabled:S,labelPlacement:b,error:C.error}),I=Yo(D);let $=g;return $!=null&&$.type!==d&&!l&&($=t(d,v({component:"span",className:I.label},s.typography,{children:$}))),r(Ho,v({className:F(I.root,i),ownerState:D,ref:a},x,{children:[p.exports.cloneElement(h,y),$]}))}),Xo=qo,Go=p.exports.createContext({}),ce=Go,Ko=p.exports.createContext({}),De=Ko;function Qo(e){return A("MuiStep",e)}V("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const Zo=["active","children","className","completed","disabled","expanded","index","last"],Jo=e=>{const{classes:o,orientation:a,alternativeLabel:n,completed:i}=e;return z({root:["root",a,n&&"alternativeLabel",i&&"completed"]},Qo,o)},ea=L("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.root,o[a.orientation],a.alternativeLabel&&o.alternativeLabel,a.completed&&o.completed]}})(({ownerState:e})=>v({},e.orientation==="horizontal"&&{paddingLeft:8,paddingRight:8},e.alternativeLabel&&{flex:1,position:"relative"})),ta=p.exports.forwardRef(function(o,a){const n=Y({props:o,name:"MuiStep"}),{active:i,children:s,className:h,completed:c,disabled:l,expanded:g=!1,index:b,last:x}=n,f=_(n,Zo),{activeStep:S,connector:y,alternativeLabel:C,orientation:D,nonLinear:I}=p.exports.useContext(ce);let[$=!1,u=!1,w=!1]=[i,c,l];S===b?$=i!==void 0?i:!0:!I&&S>b?u=c!==void 0?c:!0:!I&&S<b&&(w=l!==void 0?l:!0);const T=p.exports.useMemo(()=>({index:b,last:x,expanded:g,icon:b+1,active:$,completed:u,disabled:w}),[b,x,g,$,u,w]),R=v({},n,{active:$,orientation:D,alternativeLabel:C,completed:u,disabled:w,expanded:g}),W=Jo(R),Z=r(ea,v({className:F(W.root,h),ref:a,ownerState:R},f,{children:[y&&C&&b!==0?y:null,s]}));return t(De.Provider,{value:T,children:y&&!C&&b!==0?r(p.exports.Fragment,{children:[y,Z]}):Z})}),oa=ta,aa=q(t("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),na=q(t("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function ra(e){return A("MuiStepIcon",e)}const ia=V("MuiStepIcon",["root","active","completed","error","text"]),fe=ia;var $e;const sa=["active","className","completed","error","icon"],la=e=>{const{classes:o,active:a,completed:n,error:i}=e;return z({root:["root",a&&"active",n&&"completed",i&&"error"],text:["text"]},ra,o)},xe=L(Ct,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,o)=>o.root})(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${fe.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${fe.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${fe.error}`]:{color:(e.vars||e).palette.error.main}})),ca=L("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,o)=>o.text})(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily})),da=p.exports.forwardRef(function(o,a){const n=Y({props:o,name:"MuiStepIcon"}),{active:i=!1,className:s,completed:h=!1,error:c=!1,icon:l}=n,g=_(n,sa),b=v({},n,{active:i,completed:h,error:c}),x=la(b);if(typeof l=="number"||typeof l=="string"){const f=F(s,x.root);return c?t(xe,v({as:na,className:f,ref:a,ownerState:b},g)):h?t(xe,v({as:aa,className:f,ref:a,ownerState:b},g)):r(xe,v({className:f,ref:a,ownerState:b},g,{children:[$e||($e=t("circle",{cx:"12",cy:"12",r:"12"})),t(ca,{className:x.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:b,children:l})]}))}return l}),pa=da;function ua(e){return A("MuiStepLabel",e)}const ma=V("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),G=ma,ha=["children","className","componentsProps","error","icon","optional","StepIconComponent","StepIconProps"],ga=e=>{const{classes:o,orientation:a,active:n,completed:i,error:s,disabled:h,alternativeLabel:c}=e;return z({root:["root",a,s&&"error",h&&"disabled",c&&"alternativeLabel"],label:["label",n&&"active",i&&"completed",s&&"error",h&&"disabled",c&&"alternativeLabel"],iconContainer:["iconContainer",n&&"active",i&&"completed",s&&"error",h&&"disabled",c&&"alternativeLabel"],labelContainer:["labelContainer"]},ua,o)},ba=L("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.root,o[a.orientation]]}})(({ownerState:e})=>v({display:"flex",alignItems:"center",[`&.${G.alternativeLabel}`]:{flexDirection:"column"},[`&.${G.disabled}`]:{cursor:"default"}},e.orientation==="vertical"&&{textAlign:"left",padding:"8px 0"})),fa=L("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,o)=>o.label})(({theme:e})=>v({},e.typography.body2,{display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${G.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${G.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${G.alternativeLabel}`]:{textAlign:"center",marginTop:16},[`&.${G.error}`]:{color:(e.vars||e).palette.error.main}})),xa=L("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,o)=>o.iconContainer})(()=>({flexShrink:0,display:"flex",paddingRight:8,[`&.${G.alternativeLabel}`]:{paddingRight:0}})),va=L("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,o)=>o.labelContainer})(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary})),Ue=p.exports.forwardRef(function(o,a){const n=Y({props:o,name:"MuiStepLabel"}),{children:i,className:s,componentsProps:h={},error:c=!1,icon:l,optional:g,StepIconComponent:b,StepIconProps:x}=n,f=_(n,ha),{alternativeLabel:S,orientation:y}=p.exports.useContext(ce),{active:C,disabled:D,completed:I,icon:$}=p.exports.useContext(De),u=l||$;let w=b;u&&!w&&(w=pa);const T=v({},n,{active:C,alternativeLabel:S,completed:I,disabled:D,error:c,orientation:y}),R=ga(T);return r(ba,v({className:F(R.root,s),ref:a,ownerState:T},f,{children:[u||w?t(xa,{className:R.iconContainer,ownerState:T,children:t(w,v({completed:I,active:C,error:c,icon:u},x))}):null,r(va,{className:R.labelContainer,ownerState:T,children:[i?t(fa,v({className:R.label,ownerState:T},h.label,{children:i})):null,g]})]}))});Ue.muiName="StepLabel";const Ca=Ue;function Sa(e){return A("MuiStepConnector",e)}V("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const ya=["className"],ka=e=>{const{classes:o,orientation:a,alternativeLabel:n,active:i,completed:s,disabled:h}=e,c={root:["root",a,n&&"alternativeLabel",i&&"active",s&&"completed",h&&"disabled"],line:["line",`line${B(a)}`]};return z(c,Sa,o)},Da=L("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.root,o[a.orientation],a.alternativeLabel&&o.alternativeLabel,a.completed&&o.completed]}})(({ownerState:e})=>v({flex:"1 1 auto"},e.orientation==="vertical"&&{marginLeft:12},e.alternativeLabel&&{position:"absolute",top:8+4,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})),La=L("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.line,o[`line${B(a.orientation)}`]]}})(({ownerState:e,theme:o})=>{const a=o.palette.mode==="light"?o.palette.grey[400]:o.palette.grey[600];return v({display:"block",borderColor:o.vars?o.vars.palette.StepConnector.border:a},e.orientation==="horizontal"&&{borderTopStyle:"solid",borderTopWidth:1},e.orientation==="vertical"&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})}),Pa=p.exports.forwardRef(function(o,a){const n=Y({props:o,name:"MuiStepConnector"}),{className:i}=n,s=_(n,ya),{alternativeLabel:h,orientation:c="horizontal"}=p.exports.useContext(ce),{active:l,disabled:g,completed:b}=p.exports.useContext(De),x=v({},n,{alternativeLabel:h,orientation:c,active:l,completed:b,disabled:g}),f=ka(x);return t(Da,v({className:F(f.root,i),ref:a,ownerState:x},s,{children:t(La,{className:f.line,ownerState:x})}))}),Ia=Pa;function $a(e){return A("MuiStepper",e)}V("MuiStepper",["root","horizontal","vertical","alternativeLabel"]);const wa=["activeStep","alternativeLabel","children","className","connector","nonLinear","orientation"],Ma=e=>{const{orientation:o,alternativeLabel:a,classes:n}=e;return z({root:["root",o,a&&"alternativeLabel"]},$a,n)},Ra=L("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.root,o[a.orientation],a.alternativeLabel&&o.alternativeLabel]}})(({ownerState:e})=>v({display:"flex"},e.orientation==="horizontal"&&{flexDirection:"row",alignItems:"center"},e.orientation==="vertical"&&{flexDirection:"column"},e.alternativeLabel&&{alignItems:"flex-start"})),Ta=t(Ia,{}),Ba=p.exports.forwardRef(function(o,a){const n=Y({props:o,name:"MuiStepper"}),{activeStep:i=0,alternativeLabel:s=!1,children:h,className:c,connector:l=Ta,nonLinear:g=!1,orientation:b="horizontal"}=n,x=_(n,wa),f=v({},n,{alternativeLabel:s,orientation:b}),S=Ma(f),y=p.exports.Children.toArray(h).filter(Boolean),C=y.map((I,$)=>p.exports.cloneElement(I,v({index:$,last:$+1===y.length},I.props))),D=p.exports.useMemo(()=>({activeStep:i,alternativeLabel:s,connector:l,nonLinear:g,orientation:b}),[i,s,l,g,b]);return t(ce.Provider,{value:D,children:t(Ra,v({ownerState:f,className:F(S.root,c),ref:a},x,{children:C}))})}),Na=Ba,Fa=q(t("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),Wa=q(t("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),ja=q(t("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");var Le={},Oe={exports:{}};(function(e){function o(a){return a&&a.__esModule?a:{default:a}}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(Oe);var ve={};const _a=Te(oo);var we;function za(){return we||(we=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.createSvgIcon}});var o=_a}(ve)),ve}const Aa=Te(St);var Ea=Oe.exports;Object.defineProperty(Le,"__esModule",{value:!0});var Ve=Le.default=void 0,Ua=Ea(za()),Oa=Aa,Va=(0,Ua.default)((0,Oa.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");Ve=Le.default=Va;const Ya=({title:e,openDialog:o,setOpenDialog:a,content:n,maxWidth:i})=>{const s=()=>{a(!1)};let h="md";return i&&(h=i),r(Io,{open:o,onClose:s,fullWidth:!0,maxWidth:h,children:[t(Eo,{sx:{backgroundColor:"#19BBBB",color:"#FFF",padding:2},children:r(m,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[e!=null&&e.icon?r(m,{direction:"row",children:[t(K,{icon:e==null?void 0:e.icon,width:25,height:25,sx:{marginRight:"10px"}}),t(d,{variant:"h6",children:e==null?void 0:e.name})]}):t(d,{variant:"h6",children:e!=null&&e.name?e==null?void 0:e.name:"Testing Title"}),t(Be,{sx:{color:"#FFF"},onClick:s,children:t(Ve,{})})]})}),t(Wo,{sx:{backgroundColor:"#F9FAFB"},children:n||"Testing Content Dialog"})]})},re=Ya,Ha=["Review","Approval","Disbursement"],qa=({title:e,openDialog:o,setOpenDialog:a,data:n})=>t(re,{title:e,openDialog:o,setOpenDialog:a,content:(()=>r(ae,{children:[r(m,{alignItems:"center",justifyContent:"space-between",direction:"row",sx:{marginTop:1},children:[t(d,{variant:"subtitle1",sx:{height:"max-content"},children:"Claim Request"}),r(m,{children:[t(d,{variant:"caption",children:"Submission date"}),t(d,{variant:"caption",children:"15 / 05 / 2022"})]})]}),t(Ne,{sx:{width:"100%",marginTop:2},children:t(Na,{alternativeLabel:!0,children:Ha.map(s=>t(oa,{children:t(Ca,{children:s})},s))})}),t(m,{marginTop:2,children:t(d,{variant:"subtitle1",paddingY:2,children:"17 Mei 2022"})}),r(m,{direction:"row",spacing:2,children:[t(J,{orientation:"vertical",flexItem:!0,sx:{borderStyle:"dashed"}}),r(m,{spacing:2,sx:{flex:1,maxWidth:"100%"},children:[r(j,{sx:{paddingY:2,paddingX:3},children:[r(m,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[t(d,{variant:"body1",children:"09:10 WIB"}),t(d,{sx:{backgroundColor:E.light.warning.lighter,color:E.light.warning.dark,borderColor:E.light.warning.dark,border:"1px solid",borderRadius:"6px",padding:1},variant:"caption",children:"Approval"})]}),t(J,{sx:{marginY:2}}),r(m,{children:[t(d,{variant:"subtitle2",color:"#404040",children:"Details : mohon melengkapi kekurangan dokumen"}),t(d,{variant:"caption",color:"#757575",sx:{marginTop:2,marginBottom:1},children:"Lab pemeriksaan darah"}),t(ee,{variant:"outlined",startIcon:t(Fa,{}),fullWidth:!0,sx:{typography:"subtitle2",borderColor:"#F5F5F5"},children:"Hasil Pemeriksaan Laboratorium"})]})]}),r(j,{sx:{flex:1,maxWidth:"100%",paddingY:2,paddingX:3},children:[r(m,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[t(d,{variant:"body1",children:"09:00 WIB"}),t(d,{sx:{backgroundColor:E.light.warning.lighter,color:E.light.warning.dark,borderColor:E.light.warning.dark,border:"1px solid",borderRadius:"6px",padding:1},variant:"caption",children:"Approval"})]}),t(J,{sx:{marginY:2}}),t(m,{children:t(d,{variant:"subtitle2",color:"#404040",children:"Details : Penilaian Dokter"})})]}),r(j,{sx:{flex:1,maxWidth:"100%",paddingY:2,paddingX:3},children:[r(m,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[t(d,{variant:"body1",children:"08:00 WIB"}),t(d,{sx:{backgroundColor:"#F5F5F5",color:"#757575",borderColor:"#757575",border:"1px solid",borderRadius:"6px",padding:1},variant:"caption",children:"Review"})]}),t(J,{sx:{marginY:2}}),t(m,{children:t(d,{variant:"subtitle2",color:"#404040",children:"Details : Klaim Diajukan"})})]})]})]})]}))()}),Ye=qa,Xa=L(j)(({theme:e})=>({boxShadow:"none",padding:e.spacing(1),borderRadius:.5,color:"black"})),Ga=({title:e,openDialog:o,setOpenDialog:a,data:n})=>{const[i,s]=p.exports.useState(!1),[h,c]=p.exports.useState(""),l=()=>{c("Claim Details"),s(!0)};return r(ae,{children:[t(re,{title:e,openDialog:o,setOpenDialog:a,content:(()=>t(m,{sx:{marginTop:2},children:t(Xa,{children:n?n.map(({info:b,date:x,time:f},S)=>r("div",{children:[S>=1?t(J,{sx:{marginY:.5}}):"",r(m,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[r(m,{direction:"column",justifyContent:"flex-start",alignItems:"flex-start",children:[t(d,{sx:{typography:"caption"},children:b}),t(ye,{component:"button",variant:"caption",underline:"always",onClick:l,children:"Info Detail"})]}),r(m,{direction:"column",justifyContent:"flex-start",alignItems:"flex-start",children:[t(d,{sx:{typography:"caption",color:"#656565"},children:x}),t(d,{sx:{typography:"caption",color:"#656565"},children:f})]})]})]},S)):""})}))()}),t(Ye,{openDialog:i,setOpenDialog:s,title:{name:h}})]})},Ka=Ga,Qa=L(j)(({theme:e})=>({boxShadow:"none",padding:"1rem 0.5rem",color:"black",backgroundColor:e.palette.grey[200],maxHeight:"240px"})),Za=L(j)(({theme:e})=>({boxShadow:"none",padding:e.spacing(1),borderRadius:.5,color:"black"}));function Ja({data:e}){const[o,a]=p.exports.useState(!1),[n,i]=p.exports.useState(""),[s,h]=p.exports.useState(""),c=l=>{switch(l){case"allNotification":i("Notification"),h(l),a(!0);break;case"infoDetail":i("Claim Details"),h(l),a(!0);break}};return r(Qa,{children:[r(m,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[t(d,{children:r(d,{variant:"body2",component:"span",sx:{display:"flex",alignItems:"center"},children:[t(K,{icon:"eva:bell-fill",marginRight:.75}),"Notification",t("span",{style:{width:"12px",height:"12px",backgroundColor:"#19BBBB",marginLeft:"0.5rem",borderRadius:"50%"}})]})}),t(ee,{sx:{typography:"body2"},endIcon:t(Wa,{}),onClick:()=>c("allNotification"),children:"View All"})]}),t(Za,{sx:{marginTop:2,overflowY:"auto",maxHeight:"154px"},children:e?e.map(({info:l,date:g,time:b},x)=>r("div",{children:[x>=1?t(J,{sx:{marginY:.5}}):"",r(m,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[r(m,{direction:"column",justifyContent:"flex-start",alignItems:"flex-start",children:[t(d,{sx:{typography:"caption"},children:l}),t(ye,{component:"button",variant:"caption",underline:"always",onClick:()=>c("infoDetail"),children:"Info Detail"})]}),r(m,{direction:"column",justifyContent:"flex-start",alignItems:"flex-start",children:[t(d,{sx:{typography:"caption",color:"#656565"},children:g}),t(d,{sx:{typography:"caption",color:"#656565"},children:b})]})]})]},x)):""}),s==="allNotification"&&t(Ka,{openDialog:o,setOpenDialog:a,title:{name:n},data:e}),s==="infoDetail"&&t(Ye,{openDialog:o,setOpenDialog:a,title:{name:n}})]})}const N={companyName:"PT. Aman Mineral",policyNumber:12345678,totalMembers:50,totalCases:100,totalPersen:75,myLimit:375e6,totalLimit:5e8},en=L(ne)(({theme:e})=>({height:10,borderRadius:6,[`&.${O.colorPrimary}`]:{backgroundColor:e.palette.grey[e.palette.mode==="light"?300:800]},[`& .${O.bar}`]:{borderRadius:6,background:"linear-gradient(270deg, #19BBBB 38.42%, #FF9565 76.21%, #FE7253 104.02%)"}})),tn=({title:e,openDialog:o,setOpenDialog:a,data:n})=>{const[i,s]=p.exports.useState(!1),[h,c]=p.exports.useState(!0),l=Fe().shape({topup:Mt()}),g={topup:0},b=We({resolver:je(l),defaultValues:g}),{setValue:x,reset:f,handleSubmit:S,formState:{isSubmitting:y}}=b;p.exports.useEffect(()=>{o===!1&&f()},[o,f]);const C=async u=>{f()},D=u=>{s(!i),c(!1),x("topup",N.totalLimit-N.myLimit)},I=u=>{c(u==="0"||u===""),x("topup",u)};return t(re,{title:e,openDialog:o,setOpenDialog:a,content:(()=>r(m,{spacing:1,marginTop:2,children:[r(m,{children:[t(d,{variant:"caption",color:"#637381",children:"Company Name"}),t(d,{variant:"body2",children:N.companyName})]}),r(m,{children:[t(d,{variant:"caption",color:"#637381",children:"Policy Number"}),t(d,{variant:"body2",children:N.policyNumber})]}),r(m,{direction:"row",spacing:22,children:[r(m,{children:[t(d,{variant:"caption",color:"#637381",children:"Total Member"}),r(d,{variant:"body2",children:[N.totalMembers," Person"]})]}),r(m,{children:[t(d,{variant:"caption",color:"#637381",children:"Total Cases"}),r(d,{variant:"body2",children:[N.totalCases," Cases"]})]})]}),r(m,{spacing:1,sx:{backgroundColor:"#F4F6F8",borderRadius:1.5,padding:2},children:[r(m,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[r(m,{children:[t(d,{variant:"body2",children:"Company Pooled Fund"}),t(d,{variant:"body2",children:Ce(N.myLimit)}),r(d,{variant:"caption",color:"#919EAB",children:["/ ",N.totalLimit]})]}),t(m,{children:r(d,{variant:"h5",children:[N.totalPersen,"%"]})})]}),t(en,{variant:"determinate",value:N.totalPersen})]}),r(m,{spacing:2,children:[t(d,{variant:"subtitle1",marginTop:3,children:"Top Up Limit"}),r(_e,{methods:b,onSubmit:S(C),children:[t(Rt,{name:"topup",label:"Top Up",type:"number",disabled:i,onChange:u=>I(u.target.value)}),t(Xo,{sx:{typography:"caption"},control:t(bo,{}),label:"Max "+Ce(N.totalLimit-N.myLimit),onChange:S(D)}),t(ze,{fullWidth:!0,size:"large",type:"submit",variant:"contained",loading:y,sx:{marginTop:2},disabled:h,children:"Ajukan Permintaan"})]})]})]}))(),maxWidth:"xs"})},on=tn,an=L(ne)(({theme:e,percentage:o})=>({height:10,borderRadius:6,[`&.${O.colorPrimary}`]:{backgroundColor:e.palette.grey[e.palette.mode==="light"?300:800]},[`& .${O.bar}`]:{borderRadius:6,background:"linear-gradient(270deg, #19BBBB 38.42%, #FF9565 76.21%, #FE7253 104.02%)","&::before":{content:'""',position:"absolute",right:0,top:0,width:`${100-o}%`,zIndex:1,bottom:0,background:"#DFE3E8"}}})),nn=({title:e,openDialog:o,setOpenDialog:a,data:n})=>{const i=new Date,s=`${i.getDate()} / ${i.getMonth()+1} / ${i.getFullYear()}`,h=Fe().shape({invoice:Tt().required("You need to provide a file").test("fileSize","The file is too large",C=>{for(let D=0;D<C.length;D++)return C?C[D].size<=2e6:!1})}),c=We({resolver:je(h)}),{register:l,reset:g,handleSubmit:b,formState:{isSubmitting:x,errors:f}}=c,S=({invoice:C})=>{};return L(C=>t(Nt,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...C}))(({theme:C})=>({width:28,height:16,padding:0,marginRight:"10px","& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:"#33cf4d",border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:C.palette.mode==="light"?C.palette.grey[100]:C.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:C.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:12,height:12},"& .MuiSwitch-track":{borderRadius:26/2,opacity:1,transition:C.transitions.create(["background-color"],{duration:500})}})),p.exports.useEffect(()=>{o===!1&&g()},[o,g]),t(ae,{children:t(re,{title:e,openDialog:o,setOpenDialog:a,content:(()=>r(m,{children:[r(m,{direction:"row",justifyContent:"space-between",alignItems:"center",paddingY:1,children:[t(d,{variant:"subtitle1",children:"Claim Submission"}),r(m,{sx:{color:"#757575"},children:[t(d,{variant:"caption",children:"Submission date"}),t(d,{variant:"caption",children:s})]})]}),t(j,{sx:{paddingY:1,paddingX:2,marginTop:2,backgroundColor:"#F4F6F8"},children:r(m,{direction:"row",alignItems:"center",spacing:2,children:[t("img",{width:40,height:40,src:"/images/member.png",alt:"user-profile",style:{borderRadius:"50%"}}),r(m,{sx:{flex:"45%"},children:[t(d,{variant:"subtitle1",children:n&&n.fullName}),r(d,{color:"#637381",variant:"body2",sx:{fontWeight:500},children:["Member ID : ",n&&n.memberId]})]})]})}),t(j,{sx:{paddingY:1,paddingX:2,marginTop:2},children:r(m,{spacing:1,paddingY:1,children:[r(m,{direction:"row",justifyContent:"space-between",children:[t(d,{color:"#0A0A0A",variant:"caption",children:"Total Limit"}),r(ye,{variant:"caption",textAlign:"center",href:"#",children:["Details Benefits ",t(K,{icon:"ic:round-chevron-right"})]})]}),t(an,{variant:"determinate",value:100,percentage:n&&n.limit?n.limit.percentage:100}),r(d,{variant:"subtitle2",sx:{fontWeight:500},children:[Q(n&&n.limit?n.limit.current:0)," /"," ",t(d,{variant:"body2",color:"#757575",component:"span",children:Q(n&&n.limit?n.limit.total:0)})]})]})}),r(_e,{methods:c,onSubmit:b(S),children:[r(m,{marginTop:2,spacing:1,children:[r(m,{children:[t(d,{variant:"subtitle2",children:"Real Invoice"}),t(d,{color:"#9E9E9E",variant:"caption",children:"Real invoice required"})]}),t("input",{...l("invoice"),type:"file"}),f.invoice&&f.invoice.message?t("p",{children:f.invoice.message}):""]}),t(m,{marginTop:1,children:t(ze,{fullWidth:!0,size:"large",type:"submit",variant:"contained",loading:x,sx:{marginTop:2},children:"Ajukan Permintaan"})})]})]}))(),maxWidth:"sm"})})},rn=nn,sn=L(ne)(({theme:e})=>({height:10,borderRadius:6,[`&.${O.colorPrimary}`]:{backgroundColor:e.palette.grey[e.palette.mode==="light"?300:800]},[`& .${O.bar}`]:{borderRadius:6,background:"linear-gradient(270deg, #19BBBB 38.42%, #FF9565 76.21%, #FE7253 104.02%)"}}));function ln({title:e,openDialog:o,setOpenDialog:a}){const{corporateValue:n}=p.exports.useContext(ke),[i,s]=p.exports.useState([]),[h,c]=p.exports.useState({id:0,fullName:"",memberId:"",limit:{current:0,total:0,percentage:0}}),[l,g]=p.exports.useState(""),[b,x]=p.exports.useState({}),f=async u=>{u.preventDefault(),x(l===""?{}:{search:l}),await new Promise(w=>setTimeout(w,500))},S=new Date,y=`${S.getDate()} / ${S.getMonth()+1} / ${S.getFullYear()}`,[C,D]=p.exports.useState(!1),I=({id:u,fullName:w,memberId:T,limit:R,avatar:W})=>{c({id:u,fullName:w,memberId:T,limit:{current:R.current,total:R.total,percentage:R.percentage},avatar:{url:W&&W.url,title:W&&W.title}}),D(!0)};return p.exports.useEffect(()=>{(async()=>{if(o===!0){const u=await le.get(`${n}/members`,{params:{...b,claimMember:!0}});s(u.data.data)}})()},[n,o,b]),r(ae,{children:[t(re,{title:e,openDialog:o,setOpenDialog:a,content:(()=>r(m,{children:[r(m,{direction:"row",justifyContent:"space-between",alignItems:"center",paddingY:1,children:[t(d,{variant:"subtitle1",children:"Pilih Karyawan"}),r(m,{sx:{color:"#757575"},children:[t(d,{variant:"caption",children:"Submission date"}),t(d,{variant:"caption",children:y})]})]}),t("form",{onSubmit:f,children:t(Ae,{id:"search-input",variant:"outlined",fullWidth:!0,onChange:u=>g(u==null?void 0:u.target.value),value:l,InputProps:{startAdornment:t(yt,{position:"start",children:t(ja,{})})},placeholder:"Cari nama atau member ID disini...",sx:{marginTop:2}})}),t(m,{marginTop:2,spacing:1,children:i.map((u,w)=>t(j,{sx:{paddingY:1,paddingX:2},children:r(m,{direction:"row",alignItems:"center",spacing:2,children:[t("img",{width:40,height:40,src:u.avatar?u.avatar.url:"/images/member.png",alt:u.avatar?u.avatar.url:"user-profile",style:{borderRadius:"50%"}}),r(m,{sx:{flex:"45%"},children:[t(d,{variant:"subtitle1",children:u.fullName}),r(d,{color:"#637381",variant:"body2",sx:{fontWeight:500},children:["Member ID : ",u.memberId]})]}),r(m,{spacing:1,paddingY:1,children:[t(d,{color:"#0A0A0A",variant:"caption",children:"Total Limit"}),t(sn,{variant:"determinate",value:u.limit&&u.limit.percentage}),r(d,{variant:"subtitle2",sx:{fontWeight:500},children:[u.limit&&u.limit.current," /"," ",t(d,{variant:"body2",color:"#757575",component:"span",children:u.limit&&u.limit.total})]})]}),t(Be,{onClick:()=>I({id:u.id,fullName:u.fullName,memberId:u.memberId,limit:{current:u.limit.current,total:u.limit.total,percentage:u.limit.percentage}}),children:t(K,{icon:"ic:round-chevron-right"})})]})},w))})]}))(),maxWidth:"sm"}),t(rn,{title:e,openDialog:C,setOpenDialog:D,data:h})]})}const cn=L(j)(({theme:e})=>({boxShadow:"none",padding:e.spacing(3),color:"black",backgroundColor:e.palette.grey[200],maxHeight:"240px"})),dn=L(ne)(({theme:e})=>({height:10,borderRadius:6,[`&.${O.colorPrimary}`]:{backgroundColor:e.palette.grey[e.palette.mode==="light"?300:800]},[`& .${O.bar}`]:{borderRadius:6,backgroundColor:e.palette.primary.main}}));function pn(e){const[o,a]=p.exports.useState(!1),[n,i]=p.exports.useState(""),[s,h]=p.exports.useState(""),{myLimit:c,lockLimit:l}=e.data,g=b=>{switch(b){case"submitClaim":i("Add Claim"),h(b),a(!0);break;case"topUpLimit":i("Top Up Limit"),h(b),a(!0);break}};return r(cn,{children:[r(ae,{children:[r(m,{direction:"row",justifyContent:"space-between",sx:{mb:1},children:[r("div",{children:[t(d,{variant:"body2",component:"span",sx:{opacity:.72},children:"Total Limit"}),t(d,{sx:{typography:"body2"},children:Ce(c?c.balance:0)}),r(d,{sx:{typography:"caption",color:"#919EAB"},children:["/ ",Q(c?c.total:0)]})]}),t(m,{direction:"row",alignItems:"center",justifyContent:"center",children:r(d,{variant:"h5",sx:{ml:.5},children:[c?c.percentage:0,"%"]})})]}),t(dn,{variant:"determinate",value:c?c.percentage:0,sx:{mb:1}}),r(m,{sx:{backgroundColor:"#B2E8E8",paddingY:1,paddingX:1.5,mb:2},children:[r(d,{sx:{typography:"caption",display:"flex",alignItems:"center"},children:[t(K,{icon:"bxs:lock-alt",width:12,height:13,sx:{color:"#424242",marginRight:"6px"}}),r(d,{variant:"caption",component:"span",children:["Lock Fund ( ",l?l.percentage:0,"% )"]})]}),r(d,{sx:{typography:"caption",color:"#637381"},children:[Q(l?l.balance:0)," / ",Q(c?c.total:0)]})]}),r(m,{direction:"row",spacing:2,children:[t(ee,{variant:"outlined",startIcon:t(K,{icon:"bi:clipboard-check-fill"}),fullWidth:!0,onClick:()=>g("submitClaim"),children:"Submit Claim"}),t(ee,{variant:"contained",startIcon:t(K,{icon:"heroicons-solid:cash"}),fullWidth:!0,onClick:()=>g("topUpLimit"),children:"Top Up"})]})]}),s==="submitClaim"&&t(ln,{openDialog:o,setOpenDialog:a,title:{name:n}}),s==="topUpLimit"&&t(on,{openDialog:o,setOpenDialog:a,title:{name:n,icon:"heroicons-solid:cash"}})]})}const un=L(ne)(({theme:e})=>({height:10,borderRadius:6,[`&.${O.colorPrimary}`]:{backgroundColor:"#D1F1F1"},[`& .${O.bar}`]:{borderRadius:6,backgroundColor:e.palette.primary.main}})),mn=[{id:"member_id",align:"left",label:"Member ID",isSort:!0},{id:"name",align:"center",label:"Name",isSort:!0},{id:"division",align:"center",label:"Divisi",isSort:!1},{id:"limit",align:"center",label:"Limit",isSort:!1},{id:"active",align:"center",label:"Status",isSort:!0}];function hn({order:e,orderBy:o,onRequestSort:a}){const n=i=>s=>{a(s,i)};return t(Et,{children:r(se,{children:[mn.map(i=>t(H,{sortDirection:o===i.id?e:!1,align:i.align,sx:{padding:2},children:i.isSort?r(Wt,{active:o===i.id,direction:o===i.id?e:"asc",onClick:n(i.id),children:[i.label,o===i.id?t(Ne,{component:"span",sx:jt,children:e==="desc"?"sorted descending":"sorted ascending"}):null]}):i.label},i.id)),t(H,{align:"center",children:""})]})})}function gn(e){const{corporateValue:o}=p.exports.useContext(ke),[a,n]=p.exports.useState([]),[i,s]=p.exports.useState({current_page:0,from:0,last_page:0,links:[],path:"",per_page:0,to:0,total:0}),[h,c]=p.exports.useState(!0),[l,g]=kt(),[b,x]=p.exports.useState({}),[f,S]=p.exports.useState("asc"),[y,C]=p.exports.useState("name"),[D,I]=p.exports.useState(0),[$,u]=p.exports.useState(10),w=async(k,P)=>{const M=y===P&&f==="asc";S(M?"desc":"asc"),C(P);const me=Object.fromEntries([...l.entries(),["order",M?"desc":"asc"],["orderBy",P]]);x(me)},[T,R]=p.exports.useState("all"),[W,Z]=p.exports.useState([]),de=k=>{if(R(k.target.value),k.target.value==="all"){l.delete("division");const P=Object.fromEntries([...l.entries()]);x(P)}else{const P=Object.fromEntries([...l.entries(),["division",k.target.value]]);x(P)}},[X,te]=p.exports.useState(""),oe=async k=>{if(k.preventDefault(),c(!0),X===""){l.delete("search");const P=Object.fromEntries([...l.entries()]);x(P)}else{const P=Object.fromEntries([...l.entries(),["search",X]]);x(P)}await new Promise(P=>setTimeout(P,500)),c(!1)},pe=async(k,P)=>{c(!0);const M=Object.fromEntries([...l.entries(),["page",P+1]]);I(P),await new Promise(me=>setTimeout(me,500)),x(M),c(!1)},ue=async k=>{c(!0),l.delete("page");const P=Object.fromEntries([...l.entries(),["per_page",parseInt(k.target.value,10)]]);u(parseInt(k.target.value,10)),await new Promise(M=>setTimeout(M,500)),x(P),c(!1)};return p.exports.useEffect(()=>{(async()=>{c(!0);const k=await le.get(`${o}/division`);Z(k.data);const P=Object.keys(b).length!==0?b:Object.fromEntries([...l.entries(),["order",f],["orderBy",y]]),M=await le.get(`${o}/members`,{params:{...P,claimMember:!1}});g(P),n(M.data.data),s(M.data),u(M.data.per_page),c(!1)})()},[b,l,f,y,g,o]),t(j,{children:r(U,{container:!0,children:[t(U,{item:!0,xs:12,paddingX:"24px",paddingY:"20px",children:r(U,{container:!0,spacing:2,children:[t(U,{item:!0,xs:12,lg:3,xl:2,children:r(Dt,{fullWidth:!0,children:[t(Lt,{id:"simple-division-select-lable",children:"Division"}),r(Pt,{labelId:"simple-division-select-lable",id:"division-select-lable",value:T,label:"Division",onChange:de,children:[t(Ie,{value:"all",children:"All"}),W.map((k,P)=>t(Ie,{value:k.id,children:k.name},P))]})]})}),t(U,{item:!0,xs:12,lg:9,xl:10,children:t("form",{onSubmit:oe,children:t(Ae,{id:"search-input",label:"Search",variant:"outlined",onChange:k=>te(k.target.value),value:X,fullWidth:!0})})})]})}),r(U,{item:!0,xs:12,children:[t(_t,{component:Se,children:r(zt,{"aria-label":"collapsible table",size:"small",children:[t(hn,{order:f,orderBy:y,onRequestSort:w}),t(At,{children:h?t(se,{children:t(H,{colSpan:6,align:"center",children:"Loading . . ."})}):a.length>=1?a.map((k,P)=>r(se,{children:[t(H,{align:"left",children:k.memberId}),t(H,{align:"center",children:k.fullName}),t(H,{align:"center",children:k.division}),t(H,{align:"center",width:170,children:r(m,{children:[t(un,{variant:"determinate",value:k.limit.percentage,sx:{mb:1}}),r(d,{sx:{typography:"caption",color:"#637381"},children:[Q(k.limit.current)," / ",Q(k.limit.total)]})]})}),t(H,{align:"center",children:k.status===1?t(ee,{sx:{backgroundColor:"rgba(84, 214, 44, 0.16)",color:E.dark.success.dark,paddingY:0,"&:hover":{backgroundColor:"rgba(84, 214, 44, 0.32)",color:E.dark.success.darker}},children:"Active"}):t(ee,{sx:{backgroundColor:"rgba(255, 72, 66, 0.16)",color:E.dark.error.dark,paddingY:0,"&:hover":{backgroundColor:"rgba(255, 72, 66, 0.32)",color:E.dark.error.darker}},children:"Inactive"})})]},P)):t(se,{children:t(H,{colSpan:6,align:"center",children:"No Data Found"})})})]})}),t(Ft,{count:i.total,onPageChange:pe,page:D,rowsPerPage:$,onRowsPerPageChange:ue})]})]})})}const bn=[{info:"Mohon lengkapi dokumen Mahen sadarsa",date:"Selasa, 20 April 22",time:"08:00 WIB"},{info:"Mohon lengkapi dokumen Mahen sadarsa",date:"Selasa, 20 April 22",time:"09:00 WIB"},{info:"Mohon lengkapi dokumen Mahen sadarsa",date:"Selasa, 20 April 22",time:"10:00 WIB"},{info:"Mohon lengkapi dokumen Mahen sadarsa",date:"Selasa, 20 April 22",time:"11:00 WIB"}],Me={myLimit:{balance:0,total:0,percentage:0},lockLimit:{balance:0,percentage:0}};function Pn(){const{themeStretch:e}=It(),{corporateValue:o}=p.exports.useContext(ke),[a,n]=p.exports.useState(Me);return p.exports.useEffect(()=>{(async()=>{n(Me),await new Promise(s=>setTimeout(s,250));const i=await le.get(`${o}/policy`);n(i.data.policy)})()},[o]),t(wt,{title:"Dashboard",children:r($t,{maxWidth:e?!1:"xl",children:[t(eo,{direction:"row",justifyContent:"space-between",children:t(d,{variant:"h3",component:"h1",paragraph:!0,children:"Dashboard"})}),r(U,{container:!0,spacing:2,children:[t(U,{item:!0,xs:12,lg:6,md:12,children:t(Ja,{data:bn})}),t(U,{item:!0,xs:12,lg:6,md:12,children:t(pn,{data:a})}),t(U,{item:!0,xs:12,lg:12,md:12,children:t(gn,{})})]})]})})}export{Pn as default};
|