@zealicsolutions/web-ui 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +9 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/containers/Container.js +10 -10
- package/dist/esm/containers/Container.js.map +1 -1
- package/dist/esm/containers/ReplicatorContainer/ReplicatorContainer.js +1 -1
- package/dist/esm/containers/ReplicatorContainer/ReplicatorContainer.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1031,26 +1031,26 @@
|
|
|
1031
1031
|
`,lht=e=>{if("menu_item"===e.type){const t=e;if(!t.sx)return!1;const r=e=>!!e&&(Array.isArray(e)?e.some(r):"function"!=typeof e&&("object"==typeof e&&("absolute"===e.position||"fixed"===e.position)));return r(t.sx)}return!1},cht=({currentWebpageId:t,anchor:r="left",variant:o="persistent",open:n=!1,onClose:a,items:i=[],withButton:s=!0,buttonText:l="",buttonVariant:c="contained",buttonTextColor:u,buttonFontSize:d,buttonFontWeight:p,buttonFontFamily:h,buttonDisabled:f=!1,buttonGap:m=0,buttonStartIcon:y,buttonEndIcon:g,buttonBorderRadius:v="0px",buttonPaddingTop:x="0px",buttonPaddingRight:b="0px",buttonPaddingBottom:w="0px",buttonPaddingLeft:k="0px",buttonMarginTop:_="0px",buttonMarginRight:C="0px",buttonMarginBottom:M="0px",buttonMarginLeft:S="0px",buttonIconOnly:D,buttonElevation:O,buttonFillColor:P,buttonFillColorDisabled:E,buttonFillColorHover:j,buttonFillColorPressed:T,buttonBorderColor:N,buttonBorderColorDisabled:R,buttonBorderColorHover:F,buttonBorderColorPressed:I,buttonTextColorDisabled:A,buttonTextColorHover:z,buttonTextColorPressed:L,buttonColor:B="#1976d2",buttonDisabledColor:V,withCloseIcon:$=!0,closeIconColor:H=so.colors.gray2,closeIconName:q="x",closeIconSize:W=18,closeIconBackgroundColor:U="rgba(255, 255, 255, 0.9)",closeIconVisible:G=!1,closeIconTop:K="16px",closeIconLeft:Y="16px",closeIconBorderRadius:Z="50%",closeIconElevation:X=2,moleculeId:Q,configurationItemInfo:J,sx:ee,contentSx:te,scrollable:re=!1,paddingTop:oe,paddingRight:ne,paddingBottom:ae,paddingLeft:ie,height:se,width:le,mobileWidth:ce,backgroundColor:ue="#fff",gap:de="8px",marginTop:pe="0px",marginRight:he="0px",marginBottom:fe="0px",marginLeft:me="0px"})=>{const ye=Ye(),{isConfigurationMode:ge,selectedConfigurationItemId:ve,onConfigurationItemClicked:xe,onInternalNavigation:be}=IC(),{updateDrawer:we,drawerContainerRef:ke,headerHeight:_e,isMobile:Ce}=EC(),[Me,Se]=e.useState(n),[De]=(()=>{try{return Jpt()}catch{return[new URLSearchParams,()=>{}]}})(),Oe=e.useMemo(()=>{if(t)return t;const e=De.get(n9e),r=De.get(o9e);let o=null,n=null;if("undefined"!=typeof window)try{const e=new URLSearchParams(window.location.search);o=e.get(n9e),n=e.get(o9e)}catch(FJe){}return e||r||o||n||""},[t,De]);e.useEffect(()=>{Se(n)},[n]);const Pe=Boolean(ge&&(ve===Q||i.some(e=>e.id===ve))),Ee=()=>"permanent"===o||(ge?Pe:s?Me:n);e.useEffect(()=>{const e=Ee(),t="left"===r||"right"===r,n=Ce&&void 0!==ce?ce:le;let a=0;if(void 0!==n)if("number"==typeof n)a=n;else if("string"==typeof n){const e=parseFloat(n);Number.isNaN(e)||(a=e)}let i=0;if(t&&!Ce)switch(o){case"permanent":i=a;break;case"persistent":default:i=e?a:0;break;case"temporary":i=0}return we({isOpen:e,position:r,width:i}),()=>{we({isOpen:!1,width:0})}},[Me,n,Pe,ge,s,r,le,ce,Ce,o,we]);const je=()=>{"permanent"!==o&&Se(!0)},Te=(e,t)=>{"permanent"!==o&&(Se(!1),a?.(e,t))},Ne=e=>{const t=ve===e.id,r={entityId:e.id,entity:"molecule_item",entityType:e.type},o=ge?{onClick:e=>{e.stopPropagation(),xe?.(r,!1)},onDoubleClick:e=>{e.stopPropagation(),xe?.(r,!0)},"data-organism-id":e.id,css:hrt({theme:ye,selected:t})}:{};switch(e.type){case"menu_item":{const t=e;e.id;const r=(e=>{const t=e?.link;if(!t||!t.internalLink)return!1;const r=g9e(t.internalLink);return!(!r||!Oe)&&r===Oe})(t),n={backgroundColor:t.backgroundColor||"transparent",paddingTop:t.paddingTop||"8px",paddingRight:t.paddingRight||"16px",paddingBottom:t.paddingBottom||"8px",paddingLeft:t.paddingLeft||"16px",opacity:t.disabled?.6:1,pointerEvents:t.disabled?"none":"auto","&:hover":{backgroundColor:t.disabled?t.backgroundColor||"transparent":"rgba(0, 0, 0, 0.08)"}},a=t.sx?[n,t.sx]:n;return it(xx,{sx:a,selected:r,onClick:()=>{if(t?.link){d9e(t.link)?be?.({link:t.link?.internalLink||""}):c9e(t.link?.externalLink)}},disabled:t.disabled,...o,children:[t.startIcon&&at(jGe,{iconName:t.startIcon,color:t.textColor}),at(Pd,{sx:{ml:t.startIcon?1:0,mr:t.endIcon?1:0,color:t.textColor||"inherit",fontSize:t.fontSize||"inherit",fontWeight:t.fontWeight||"normal",fontFamily:t.fontFamily||"inherit",whiteSpace:t.wrap?"normal":"nowrap",width:"100%",textAlign:t.textAlign||"left"},children:t.text}),t.endIcon&&at(jGe,{iconName:t.endIcon,color:t.textColor})]},t.id)}case"divider_item":{const t=e;return at(Spt,{moleculeId:t.id,variant:t.variant,lineWeight:t.lineWeight,orientation:t.orientation,borderColor:t.borderColor,borderRadius:t.borderRadius,marginTop:t.marginTop,marginRight:t.marginRight,marginBottom:t.marginBottom,marginLeft:t.marginLeft,configurationItemInfo:o},t.id)}case"text_item":{const t=e;return at(Ept,{id:t.id,text:t.text,align:t.align,color:t.color,wrap:t.wrap,variant:"string"==typeof t.variant&&["inherit","body1","body2","caption","button","overline","subtitle1","subtitle2","h1","h2","h3","h4","h5","h6"].includes(t.variant)?t.variant:void 0,fontSize:t.fontSize??"",fontWeight:["normal","bold"].includes(t.fontWeight)?t.fontWeight:void 0,fontFamily:t.fontFamily??"",marginTop:t.marginTop||"",marginRight:t.marginRight||"",marginBottom:t.marginBottom||"",marginLeft:t.marginLeft||"",paddingTop:t.paddingTop||"",paddingRight:t.paddingRight||"",paddingBottom:t.paddingBottom||"",paddingLeft:t.paddingLeft||"",configurationsItemInfo:o},t.id)}case"rich_text_item":{const t=e;return at(Ppt,{htmlElementId:t.id,text:t.text,isRichText:!0,marginTop:t.marginTop||"",marginRight:t.marginRight||"",marginBottom:t.marginBottom||"",marginLeft:t.marginLeft||"",paddingTop:t.paddingTop||"",paddingRight:t.paddingRight||"",paddingBottom:t.paddingBottom||"",paddingLeft:t.paddingLeft||"",configurationItemInfo:o},t.id)}case"image_item":{const t=e;return at(Dpt,{src:t.src,alt:t.alt||"Drawer image",height:t.height,width:t.width,raised:t.raised,borderRadius:t.borderRadius||"0",marginTop:t.marginTop||"0",marginRight:t.marginRight||"0",marginBottom:t.marginBottom||"0",marginLeft:t.marginLeft||"0",paddingTop:t.paddingTop||"0",paddingRight:t.paddingRight||"0",paddingBottom:t.paddingBottom||"0",paddingLeft:t.paddingLeft||"0",onClick:()=>{if(t?.link){d9e(t.link)?be?.({link:t.link?.internalLink||""}):c9e(t.link?.externalLink)}},moleculeId:t.id,configurationItemInfo:o},t.id)}default:return null}},Re=Ce&&void 0!==ce?ce:le,Fe=at(rht,{anchor:r,variant:o,open:Ee(),onClose:Te,paddingTop:oe,paddingRight:ne,paddingBottom:ae,paddingLeft:ie,height:se,width:Re,backgroundColor:ue,marginTop:`calc(${_e} + ${pe})`,marginRight:he,marginBottom:fe,marginLeft:me,container:ke,sx:ee,children:it(aht,{scrollable:re,sx:te,...J&&Object.keys(J).length?{...J,"data-testid":"drawer-content-config","aria-label":"drawer-content"}:{},children:[(Ee()||"permanent"===o)&&i.length>0?it(nt,{children:[at(sht,{gap:de,scrollable:re,children:i.filter(e=>!lht(e)).map(Ne)}),i.filter(e=>lht(e)).map(Ne)]}):null,!!$&&(!!G||Ee())&&at(iht,{top:K,left:Y,borderRadius:Z,elevation:X,backgroundColor:U,onClick:e=>{e.stopPropagation();Ee()?Te(e,"closeIconClicked"):je()},"data-testid":"close-icon",children:at(jGe,{"data-testid":"icon-renderer",iconName:q,size:W,color:H})})]})});return s&&"permanent"!==o?it(nt,{children:[at(pKe,{moleculeId:Q,gap:m,text:l,variant:c,textColor:u,fontSize:d,fontWeight:["normal","bold"].includes(p)?p:void 0,fontFamily:h,disabled:f,startIcon:y,endIcon:g,marginTop:_,marginRight:C,marginBottom:M,marginLeft:S,paddingTop:x,paddingRight:b,paddingBottom:w,paddingLeft:k,borderRadius:v,iconOnly:D,elevation:O,fillColor:P||B,fillColorDisabled:E||V,fillColorHover:j,fillColorPressed:T,borderColor:N,borderColorDisabled:R,borderColorHover:F,borderColorPressed:I,textColorDisabled:A,textColorHover:z,textColorPressed:L,externalOnClick:e=>Me?Te(e,"buttonClicked"):je(),configurationItemInfo:J}),at(nht,{children:Fe})]}):at(nht,{children:Fe})},uht=e.forwardRef((e,t)=>{const{inputRef:r,...o}=e;return at(aYe,{...o,ref:e=>{"function"==typeof r&&r(e?e.inputElement:null)},mask:gYe,guide:!0,placeholderChar:" "})}),dht=e=>{if(void 0===e)return;if("number"==typeof e)return e;const t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):void 0},pht=({masked:e,errorMsg:t,inputSx:r,labelSx:o,sx:n,variant:a="outlined",...i})=>{const s=e?{inputComponent:uht}:{};return at(iC,{...i,variant:a,error:!!t,helperText:t||null,type:"text",sx:{...n},slotProps:{input:{sx:{...r,...n},...s},inputLabel:{sx:{...o,...n}}}})},hht=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="Email is required",validationErrorText:n="Invalid email address",text:a,placeholderText:i,masked:s=!1,multiLine:l=!1,backgroundColor:c,borderColor:u,color:d="inherit",fontSize:p="16px",fontFamily:h="inherit",fontWeight:f="normal",textAlign:m="left",marginLeft:y="0",marginTop:g="0",marginRight:v="0",marginBottom:x="0",paddingLeft:b="0",paddingTop:w="0",paddingRight:k="0",paddingBottom:_="0",width:C,height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P,sx:E,name:j,sourceDataModelField:T,configurationItemInfo:N,inputSize:R="medium",labelOffset:F,hideLabel:I=!1,variant:A="outlined"})=>{const z=Kt(),L=z?.control,B=!(!L||!j),V=wrt({name:j,sourceDataModelField:T,form:z,enabled:B});e.useState("");const[$,H]=e.useState(""),q={required:!!r&&o,pattern:{value:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@(([^<>()[\]\\.,;:\s@"]+\.)+[^<>()[\]\\.,;:\s@"]{2,})$/,message:n}},W=e.useMemo(()=>{if(I)return;if(void 0!==F)return F;const e=dht(w),t=dht(_);let r=0;r=void 0!==e&&void 0!==t?e+t:"small"===R?17:33;const o=dht(M)||dht(S)||dht(D);if(!o&&!e&&!t)return;const n="number"==typeof p?1.5*p:23;let a;if(void 0!==o)a=Math.max(0,(o-n)/2);else{const t=("small"===R?40:56)-r;a=Math.max(0,(t-n)/2+(e||0))}return Math.round(a)},[M,S,D,F,R,p,w,_,I]),U=e.useMemo(()=>{if(I)return;const e="small"===R?-6:-9,t=dht(M)||dht(S)||dht(D);return!t||t>=36?e:-6},[M,S,D,R,I]);if(t){let e="";if(void 0!==V)e=String(V??"");else if(B){const t=AGe(z.watch(j),j,"value");e=t?String(t):""}const t=e||i||"-";return it("div",{style:{display:"inline-flex",flexDirection:"column",marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},...N,children:[a&&at(wg,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,marginLeft:0,marginBottom:"4px",...E},children:a}),at(Pd,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,paddingLeft:b,paddingTop:w,paddingRight:k,paddingBottom:_,backgroundColor:c,border:`1px solid ${u||"#ccc"}`,borderRadius:"4px",minWidth:"120px",textAlign:m,...E},children:t})]})}const G={backgroundColor:c,color:d,fontSize:p,fontFamily:h,fontWeight:f,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},"& .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-input":{textAlign:m,paddingLeft:b,paddingTop:w,paddingRight:k,paddingBottom:_}},K={color:d,"&.Mui-focused":{color:d},...I&&{display:"none"},...void 0!==W&&{"&.MuiInputLabel-outlined:not(.MuiInputLabel-shrink)":{transform:`translate(14px, ${W}px) scale(1)`},"&.MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:`translate(14px, ${U}px) scale(0.75)`}}},Y=l?3:1,Z={...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D}};return at("div",B?{style:{marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},sx:{"& .MuiTextField-root":{width:C||"100%",height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},...E},children:at(tr,{name:j,rules:q,control:L,defaultValue:"",render:({field:e,fieldState:t})=>at(pht,{masked:s,required:r,errorMsg:t.error?.message,inputSx:G,labelSx:K,sx:{...Z,...E},size:R,variant:A,label:I?void 0:a,placeholder:i,multiline:l,minRows:Y,value:AGe(e.value,j,"value")||"",onChange:e=>{zGe(z,j,e.target.value,"value")},...N||{}})})}:{style:{marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},sx:{"& .MuiTextField-root":{width:C||"100%",height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P},...E},children:at(pht,{masked:s,required:r,errorMsg:void 0,inputSx:G,labelSx:K,sx:{...Z,...E},size:R,variant:A,label:I?void 0:a,placeholder:i,multiline:l,minRows:Y,value:$,onChange:e=>H(e.target.value),...N||{}})})},fht=({src:t,text:r,type:o,link:n,sourceDataModelField:a,color:i=so.colors.deepBlue,disabled:s=!1,disabledColor:l,underline:c="hover",variant:u="body2",margin:d="0",padding:p="0",moleculeId:h,configurationItemInfo:f,marginTop:m="0",marginRight:y="0",marginBottom:g="0",marginLeft:v="0",paddingTop:x="0",paddingRight:b="0",paddingBottom:w="0",paddingLeft:k="0",fontFamily:_,fontWeight:C,fontSize:M,align:S,target:D,sx:O,borderColor:P,borderWidth:E,borderStyle:j,borderRadius:T,iconOnly:N,ariaLabel:R,iconName:F,iconSize:I,validationErrorText:A})=>{const{onStateChange:z}=YC(),{onInternalNavigation:L,isConfigurationMode:B,localStateObject:V}=IC();UC();const $=ht(),H=a?$Ge(a):r,q=n&&p9e(n),W=e.useMemo(()=>q?h9e(n,$?.rawItemDataByDmfId):null,[n,q,$?.rawItemDataByDmfId]),U=q&&!W,G=e.useMemo(()=>{if(W)return W.destination;const e=n?d9e(n):"internalLink"===o||"internal_link"===o,r=n?e?n.internalLink:n.externalLink:void 0;return t??r??void 0},[W,n,o,t]),K=e.useMemo(()=>W?!W.isExternal:!!n&&d9e(n),[W,n]),Y=e.useMemo(()=>D||(W?W.isExternal?"_blank":"_self":K?"_self":"_blank"),[D,W,K]),Z=s||U,X=Z?l||no(i):i,Q=B||Z?void 0:G,J=Boolean(F),ee="regular"===C?"normal":C,te=N?at(jGe,{iconName:F||"external-link",size:I??16}):it(nt,{children:[at("span",{children:String(H||"")}),J&&at(jGe,{iconName:F,size:I??16})]}),{onClick:re,onDoubleClick:oe,...ne}=f||{},ae=at(mv,{href:Q,component:"a",target:Y,onClick:e=>{z({id:h,type:"clicked"});if(!s&&!U&&!B)return W?(e.preventDefault(),void(W.isExternal?c9e(W.destination):L?.({link:W.destination,webpageAlias:W.webpageAlias,query:W.recordId?{rwoRecordId:W.recordId}:void 0}))):K&&G?(e.preventDefault(),void L?.({link:G})):void(!K&&G&&(e.preventDefault(),c9e(G)));e.preventDefault()},onClickCapture:re||void 0,onDoubleClickCapture:oe||void 0,"aria-label":N?R||String(H||"")||"link":void 0,sx:{color:X,textDecorationColor:X,margin:d,padding:p,marginTop:m,marginRight:y,marginBottom:g,marginLeft:v,paddingTop:x,paddingRight:b,paddingBottom:w,paddingLeft:k,fontFamily:_,fontWeight:ee,fontSize:M,textAlign:S,alignItems:"center",cursor:Z?"not-allowed":"pointer",borderColor:P,borderWidth:E,borderStyle:j,borderRadius:T,display:N||J?"inline-flex":void 0,gap:J&&!N?"4px":void 0,"& .MuiLink-root":{color:"inherit",textDecorationColor:"inherit"},"&:hover":{color:Z?X:no(X,.8),textDecorationColor:Z?X:no(X,.8)},"&:active":{color:Z?X:no(X,.6),textDecorationColor:Z?X:no(X,.6)},"&.Mui-disabled":{color:l||no(i),textDecorationColor:l||no(i),cursor:"not-allowed"},...O},align:S,variant:u,underline:c,...ne,children:te});return ae},mht=e=>({justifyContent:e.textAlign||"flex-start",backgroundColor:e.backgroundColor,paddingTop:e.paddingTop,paddingRight:e.paddingRight,paddingBottom:e.paddingBottom,paddingLeft:e.paddingLeft}),yht=({popover:t=!0,items:r,marginTop:o="0",marginRight:n="0",marginBottom:a="0",marginLeft:i="0",paddingTop:s="0",paddingRight:l="0",paddingBottom:c="0",paddingLeft:u="0",cornerRadius:d="4px",backgroundColor:p="#fff",width:h="100%",height:f="auto",borderColor:m="#ccc",borderWeight:y="1px",buttonText:g="Open Menu",buttonVariant:v="contained",buttonTextColor:x,buttonFontSize:b,buttonFontWeight:w,buttonFontFamily:k,buttonDisabled:_=!1,buttonGap:C=0,buttonStartIcon:M,buttonEndIcon:S,buttonCornerRadius:D="0",buttonMarginTop:O="0",buttonMarginRight:P="0",buttonMarginBottom:E="0",buttonMarginLeft:j="0",buttonPaddingTop:T="0",buttonPaddingRight:N="0",buttonPaddingBottom:R="0",buttonPaddingLeft:F="0",buttonIconOnly:I,buttonElevation:A,buttonFillColor:z,buttonFillColorDisabled:L,buttonFillColorHover:B,buttonFillColorPressed:V,buttonBorderColor:$,buttonBorderColorDisabled:H,buttonBorderColorHover:q,buttonBorderColorPressed:W,buttonTextColorDisabled:U,buttonTextColorHover:G,buttonTextColorPressed:K,buttonColor:Y="#1976d2",anchorOriginVertical:Z="bottom",anchorOriginHorizontal:X="left",transformOriginVertical:Q="top",transformOriginHorizontal:J="left",elevation:ee=3,sx:te,moleculeId:re,configurationItemInfo:oe})=>{const ne=Ye(),{isConfigurationMode:ae,selectedConfigurationItemId:ie,onConfigurationItemClicked:se,onInternalNavigation:le}=IC(),ce=ht?.(),[ue,de]=e.useState(null),[pe,he]=e.useState(!1),[fe]=(()=>{try{return Jpt()}catch{return[new URLSearchParams,()=>{}]}})(),me=e.useMemo(()=>{const e=fe.get(n9e),t=fe.get(o9e);let r=null,o=null;if("undefined"!=typeof window)try{const e=new URLSearchParams(window.location.search);r=e.get(n9e),o=e.get(o9e)}catch(FJe){}return e||t||r||o||""},[fe]),ye=e=>{const t=e?.link;if(!t||!t.internalLink)return!1;const r=g9e(t.internalLink);return!(!r||!me)&&r===me},ge=Boolean(ae&&(ie===re||r.some(e=>e.id===ie))),ve=()=>he(!0),xe=()=>he(!1),be={marginTop:o,marginRight:n,marginBottom:a,marginLeft:i,paddingTop:s,paddingRight:l,paddingBottom:c,paddingLeft:u,"& .MuiMenu-paper":{backgroundColor:p,border:`${y} solid ${m}`,borderRadius:d,boxShadow:0===ee?"none":ne?.shadows?.[ee]||ne?.shadows?.[3]},"& .MuiMenu-list":{padding:0,width:h,height:f,overflow:"hidden"},"& .MuiMenuItem-root":{minHeight:"auto",paddingTop:"8px",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"16px"},"& .MuiListItemButton-root":{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"16px"},"& .MuiListItemText-primary":{fontSize:"14px",fontFamily:"inherit"},"& .MuiTypography-root":{fontSize:"14px",fontFamily:"inherit"},...t?{display:"inline-block",zIndex:ne?.zIndex?.drawer}:{width:h,height:f,backgroundColor:p,display:"block",overflow:"hidden",border:`${y} solid ${m}`,borderRadius:d},...te};return t?it(Zf,{children:[at(pKe,{ref:de,text:g,variant:v,moleculeId:re,textColor:x,fontSize:b,fontWeight:w,fontFamily:k,disabled:_,gap:C,startIcon:M,endIcon:S,onClick:ve,marginTop:O,marginRight:P,marginBottom:E,marginLeft:j,paddingTop:T,paddingRight:N,paddingBottom:R,paddingLeft:F,borderRadius:D,iconOnly:I,elevation:A,fillColor:z||Y,fillColorDisabled:L,fillColorHover:B,fillColorPressed:V,borderColor:$,borderColorDisabled:H,borderColorHover:q,borderColorPressed:W,textColorDisabled:U,textColorHover:G,textColorPressed:K,configurationItemInfo:oe}),at(fx,{open:ae?ge:pe,variant:"menu",anchorEl:ue,disablePortal:!0,disableScrollLock:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,onClose:xe,anchorOrigin:{vertical:Z,horizontal:X},transformOrigin:{vertical:Q,horizontal:J},elevation:ee,slotProps:{paper:{sx:{backgroundColor:p,border:`${y} solid ${m}`,borderRadius:d,boxShadow:0===ee?"none":ne?.shadows?.[ee]||ne?.shadows?.[3],"& .MuiMenu-list":be["& .MuiMenu-list"],"& .MuiMenuItem-root":be["& .MuiMenuItem-root"],"& .MuiListItemText-primary":be["& .MuiListItemText-primary"],"& .MuiTypography-root":be["& .MuiTypography-root"]}}},sx:{...be,"& .MuiMenu-paper":be["& .MuiMenu-paper"]},children:r.map(e=>{const t=ie===e.id,r=ye(e),o=e.link&&p9e(e.link)?h9e(e.link,ce?.rawItemDataByDmfId):null,n=e.link&&p9e(e.link)&&!o,a={entityId:e.id,entity:"molecule_item",entityType:"menu_item"},i=ae?e=>{e.stopPropagation(),se?.(a,!1)}:void 0,s=ae?e=>{e.stopPropagation(),se?.(a,!0)}:void 0,l=ae?{onClick:i,onDoubleClick:s,"data-organism-id":e.id,css:hrt({theme:ne,selected:t})}:{};return it(xx,{sx:mht(e),selected:r,disabled:e.disabled||n,onClick:()=>{e?.link&&(o?o.isExternal?c9e(o.destination):le?.({link:o.destination,webpageAlias:o.webpageAlias,query:o.recordId?{rwoRecordId:o.recordId}:void 0}):d9e(e.link)?le?.({link:e.link?.internalLink||""}):c9e(e.link?.externalLink)),xe()},...l,children:[e.startIcon&&at(jGe,{iconName:e.startIcon,color:e.textColor}),at(Pd,{sx:{ml:e.startIcon?1:0,mr:e.endIcon?1:0,color:e.textColor||"inherit",fontSize:e.fontSize||"inherit",fontWeight:e.fontWeight||"normal",fontFamily:e.fontFamily||"inherit",whiteSpace:e.wrap?"normal":"nowrap",width:"100%",textAlign:e.textAlign||"left"},children:e.text}),e.endIcon&&at(jGe,{iconName:e.endIcon,color:e.textColor})]},e.id)})})]}):at(tu,{id:re,sx:{...be,backgroundColor:p,border:`${y} solid ${m}`,borderRadius:d,boxShadow:0===ee?"none":ne?.shadows?.[ee]||ne?.shadows?.[3]},elevation:ee,...oe,children:at(wv,{disablePadding:!0,children:r.map(e=>{const t=ie===e.id,r=ye(e),o=e.link&&p9e(e.link)?h9e(e.link,ce?.rawItemDataByDmfId):null,n=e.link&&p9e(e.link)&&!o,a={entityId:e.id,entity:"molecule_item",entityType:"menu_item"},i=ae?e=>{e.stopPropagation(),se?.(a,!1)}:void 0,s=ae?e=>{e.stopPropagation(),se?.(a,!0)}:void 0,l=ae?{onClick:i,onDoubleClick:s,"data-organism-id":e.id,css:hrt({theme:ne,selected:t})}:{};return it(Dv,{disabled:e.disabled||n,sx:mht(e),selected:r,onClick:()=>{e?.link&&(o?o.isExternal?c9e(o.destination):le?.({link:o.destination,webpageAlias:o.webpageAlias,query:o.recordId?{rwoRecordId:o.recordId}:void 0}):d9e(e.link)?le?.({link:e.link?.internalLink||""}):c9e(e.link?.externalLink))},...l,children:[e.startIcon&&at(jGe,{iconName:e.startIcon,color:e.textColor}),at(Wv,{primary:at(Pd,{sx:{ml:e.startIcon?1:0,mr:e.endIcon?1:0,color:e.textColor||"inherit",fontSize:e.fontSize||"inherit",fontWeight:e.fontWeight||"normal",fontFamily:e.fontFamily||"inherit",whiteSpace:e.wrap?"normal":"nowrap",textAlign:e.textAlign||"left"},children:e.text})}),e.endIcon&&at(jGe,{iconName:e.endIcon,color:e.textColor})]},e.id)})})})},ght=e=>{if(void 0===e)return;if("number"==typeof e)return e;const t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):void 0};const vht=({errorMsg:e,stepValue:t,minValue:r,allowNegative:o,inputSx:n,labelSx:a,variant:i="outlined",...s})=>at(iC,{...s,variant:i,type:"number",error:!!e,helperText:e||null,inputProps:{step:t,min:o?void 0:r},slotProps:{input:{sx:n},inputLabel:{sx:a}}}),xht=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="This field is required",validationErrorText:n="Invalid numeric value",text:a,placeholderText:i,backgroundColor:s,borderColor:l,textColor:c="#000",fontSize:u,fontFamily:d,fontWeight:p,allowNegative:h=!1,numericPrecision:f="1",name:m,sourceDataModelField:y,marginLeft:g="0",marginTop:v="0",marginRight:x="0",marginBottom:b="0",paddingLeft:w="0",paddingTop:k="0",paddingRight:_="0",paddingBottom:C="0",width:M,height:S,configurationItemInfo:D,textAlign:O,minHeight:P,maxHeight:E,minWidth:j,maxWidth:T,sx:N,inputSize:R="medium",labelOffset:F,hideLabel:I=!1,variant:A="outlined"})=>{const z=Kt(),L=z?.control,B=!(!L||!m);IC(),UC();const V=wrt({name:m,sourceDataModelField:y,form:z,enabled:B}),[$,H]=e.useState(""),q=parseFloat(f),W=h?void 0:0,U={required:!!r&&o,pattern:{value:h?/^-?\d*(\.\d+)?$/:/^\d*(\.\d+)?$/,message:n}};h||(U.min={value:0,message:"Value cannot be less than zero"});const G=e.useMemo(()=>{if(I)return;if(void 0!==F)return F;const e=ght(k),t=ght(C);let r=0;r=void 0!==e&&void 0!==t?e+t:"small"===R?17:33;const o=ght(S)||ght(P)||ght(E);if(!o&&!e&&!t)return;const n="number"==typeof u?1.5*u:23;let a;if(void 0!==o)a=Math.max(0,(o-n)/2);else{const t=("small"===R?40:56)-r;a=Math.max(0,(t-n)/2+(e||0))}return Math.round(a)},[S,P,E,F,R,u,k,C,I]),K=e.useMemo(()=>{if(I)return;const e="small"===R?-6:-9,t=ght(S)||ght(P)||ght(E);return!t||t>=36?e:-6},[S,P,E,R,I]);if(t){let e="";if(void 0!==V)e=String(V??"");else if(B){const t=AGe(z.watch(m),m,"value");e=t?String(t):""}const t=e?function(e,t,r){if(!e)return"";const o=parseFloat(e);if(Number.isNaN(o))return e;if(!r&&o<0)return"0";if(t){const e=(t.split(".")[1]||"").length;if(e>0)return o.toFixed(e)}return e}(e,f,h):i||"-";return it("div",{style:{display:"inline-flex",flexDirection:"column",marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E}},sx:N,...D,children:[a&&at(wg,{sx:{fontSize:u,fontFamily:d,fontWeight:p,color:c,marginBottom:"4px"},children:a}),at(Pd,{sx:{fontSize:u,fontFamily:d,fontWeight:p,color:c,paddingLeft:w,paddingTop:k,paddingRight:_,paddingBottom:C,backgroundColor:s,border:`1px solid ${l||"#ccc"}`,borderRadius:"4px",minWidth:"60px"},children:t})]})}const Y={backgroundColor:s,color:c,fontSize:u,fontFamily:d,fontWeight:p,...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E},"& .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled:hover .MuiOutlinedInput-notchedOutline":{borderColor:l||"inherit"}},Z={color:c,"&.Mui-focused":{color:c},...I&&{display:"none"},...void 0!==G&&{"&.MuiInputLabel-outlined:not(.MuiInputLabel-shrink)":{transform:`translate(14px, ${G}px) scale(1)`},"&.MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:`translate(14px, ${K}px) scale(0.75)`}}},X={...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E}};return at(ag,B?{required:r,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,width:"fit-content",...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E},...N},...D,children:at(tr,{name:m,rules:U,control:L,defaultValue:"",render:({field:e,fieldState:t})=>at(vht,{errorMsg:t.error?.message,label:I?void 0:a,placeholder:i,stepValue:q,minValue:W,allowNegative:h,inputSx:Y,labelSx:Z,sx:X,size:R,variant:A,value:AGe(e.value,m,"value")||"",onChange:e=>{zGe(z,m,e.target.value,"value")}})})}:{required:r,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,width:"fit-content",...M&&{width:M},...S&&{height:S},...j&&{minWidth:j},...T&&{maxWidth:T},...P&&{minHeight:P},...E&&{maxHeight:E},...N},...D,children:at(vht,{errorMsg:void 0,label:I?void 0:a,placeholder:i,stepValue:q,minValue:W,allowNegative:h,inputSx:Y,labelSx:Z,sx:X,size:R,variant:A,value:$,onChange:e=>H(e.target.value)})})},bht=e=>{const t={text:e.label,validate:()=>!0},{rule:r}=e,o=wht(r);if(o||kht(r)){const e=((e,t)=>(r=0)=>e?r<=t:r>=t)(o,o?r.MAX:r.MIN);switch(r.type){case"COUNT":t.validate=t=>e(t?.length);break;case"NUMBER_COUNT":t.validate=t=>e(t?.replace(/\D/g,"").length);break;case"CAPITAL_COUNT":t.validate=t=>e((t?.match(/[A-Z]/g)||[]).length);break;case"SPECIAL_CHARACTERS_COUNT":t.validate=t=>e(t?.replace(/[a-z]|\d|\s/gi,"").length);break;case"LOWER_CASE_COUNT":t.validate=t=>e((t?.match(/[a-z]/g)||[]).length)}}return t},wht=e=>!!e?.MAX,kht=e=>!!e?.MIN,_ht=({gap:t="0",inputProps:r,validations:o,htmlElementId:n,validationState:a,overridesProperties:i,configurationItemInfo:s,width:l,height:c,minWidth:u,maxWidth:d,minHeight:p,maxHeight:h,marginLeft:f="0",marginTop:m="0",marginRight:y="0",marginBottom:g="0",sx:v,...x})=>{const{watch:b,formState:w,setError:k}=Kt()||{},{text:_,subText:C,placeholderText:M,subPlaceholderText:S,validationText:D}=i,O=o.map(bht),P="password",E=`reEnter${P}`,j=b?.(P),T=b?.(E);return e.useEffect(()=>{j!==T&&k(E,{type:"manual",message:"Passwords do not match"})},[j,T,k,E]),it(Zf,{id:n,sx:{width:"100%",display:"flex",flexDirection:"column",gap:t,marginLeft:f,marginTop:m,marginRight:y,marginBottom:g,...l&&{width:l},...c&&{height:c},...u&&{minWidth:u},...d&&{maxWidth:d},...p&&{minHeight:p},...h&&{maxHeight:h},...v},...s,...x,children:[at(Crt,{...r,inputType:"password",text:_?.text,name:P,placeholderText:M?.text}),at(Crt,{...r,inputType:"password",text:C?.text,name:E,placeholderText:S?.text}),at(XKe,{rules:O,value:j,label:D?.text,isSubmitted:w?.isDirty,validationState:a})]})},Cht=["+"," ","(",/[0-9]/,/[0-9]/,/[0-9]/,")"," ",/[0-9]/,/[0-9]/,/[0-9]/,"-",/[0-9]/,/[0-9]/,/[0-9]/,/[0-9]/],Mht=e.forwardRef((e,t)=>{const{inputRef:r,...o}=e;return at(aYe,{...o,ref:e=>{"function"==typeof r&&r(e?e.inputElement:null)},mask:Cht,guide:!0,placeholderChar:" "})}),Sht=e=>{if(void 0===e)return;if("number"==typeof e)return e;const t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):void 0};function Dht(e){const t=(e??"").replace(/\D+/g,"");if(!t)return"";let r="",o=0;return hYe.forEach(e=>{"string"==typeof e?r+=e:o<t.length?(r+=t[o],o+=1):r+="_"}),r}const Oht=({masked:e,errorMsg:t,inputSx:r,labelSx:o,variant:n="outlined",...a})=>at(iC,{...a,variant:n,error:!!t,helperText:t||null,slotProps:{input:{sx:r,...e?{inputComponent:Mht}:{}},inputLabel:{sx:o}}}),Pht=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="Phone is required",validationErrorText:n="Invalid phone number",text:a,placeholderText:i,masked:s=!0,multiLine:l=!1,backgroundColor:c,borderColor:u,textColor:d="#000",fontSize:p,fontFamily:h,fontWeight:f,textAlign:m,marginLeft:y="0",marginTop:g="0",marginRight:v="0",marginBottom:x="0",paddingLeft:b="0",paddingTop:w="0",paddingRight:k="0",paddingBottom:_="0",width:C,height:M,minHeight:S,maxHeight:D,minWidth:O,maxWidth:P,name:E,sourceDataModelField:j,configurationItemInfo:T,sx:N,inputSize:R="medium",labelOffset:F,hideLabel:I=!1,variant:A="outlined"})=>{const z=Kt(),L=z?.control,B=!(!L||!E),V=wrt({name:E,sourceDataModelField:j,form:z,enabled:B}),[$,H]=e.useState(""),q={required:!!r&&o,pattern:{value:/^\d{10}$/,message:n}},W=e.useMemo(()=>{if(I)return;if(void 0!==F)return F;const e=Sht(w),t=Sht(_);let r=0;r=void 0!==e&&void 0!==t?e+t:"small"===R?17:33;const o=Sht(M)||Sht(S)||Sht(D);if(!o&&!e&&!t)return;const n="number"==typeof p?1.5*p:23;let a;if(void 0!==o)a=Math.max(0,(o-n)/2);else{const t=("small"===R?40:56)-r;a=Math.max(0,(t-n)/2+(e||0))}return Math.round(a)},[M,S,D,F,R,p,w,_,I]),U=e.useMemo(()=>{if(I)return;const e="small"===R?-6:-9,t=Sht(M)||Sht(S)||Sht(D);return!t||t>=36?e:-6},[M,S,D,R,I]);if(t){let e="";if(void 0!==V)e=String(V??"");else if(B){const t=AGe(z.watch(E),E,"value");e=t?String(t):""}const t=(s?Dht(e):e)||i||"-";return it("div",{style:{display:"inline-flex",flexDirection:"column",marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D}},...T,children:[a&&at(wg,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,marginLeft:0,marginBottom:"4px",...N},children:a}),at(Pd,{sx:{fontSize:p,fontFamily:h,fontWeight:f,color:d,paddingLeft:b,paddingTop:w,paddingRight:k,paddingBottom:_,backgroundColor:c,border:`1px solid ${u||"#ccc"}`,borderRadius:"4px",minWidth:"120px",...N},children:t})]})}const G={backgroundColor:c,color:d,fontSize:p,fontFamily:h,fontWeight:f,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},"& .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"},"& .MuiOutlinedInput-root.Mui-disabled:hover .MuiOutlinedInput-notchedOutline":{borderColor:u||"inherit"}},K={color:d,"&.Mui-focused":{color:d},...I&&{display:"none"},...void 0!==W&&{"&.MuiInputLabel-outlined:not(.MuiInputLabel-shrink)":{transform:`translate(14px, ${W}px) scale(1)`},"&.MuiInputLabel-outlined.MuiInputLabel-shrink":{transform:`translate(14px, ${U}px) scale(0.75)`}}},Y={marginLeft:y,marginTop:g,marginRight:v,marginBottom:x,width:"fit-content",...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D}};return at(ag,B?{required:r,sx:{...Y,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},...N},...T,children:at(tr,{name:E,rules:q,control:L,defaultValue:"",render:({field:e,fieldState:t})=>at(Oht,{masked:s,errorMsg:t.error?.message,inputSx:G,labelSx:K,size:R,variant:A,label:I?void 0:a,placeholder:i,value:AGe(e.value,E,"value")||"",onChange:e=>{const t=(e?.target?.value??"").toString().replace(/\D+/g,"");zGe(z,E,t,"value")}})})}:{required:r,sx:{...Y,...C&&{width:C},...M&&{height:M},...O&&{minWidth:O},...P&&{maxWidth:P},...S&&{minHeight:S},...D&&{maxHeight:D},...N},...T,children:at(Oht,{masked:s,errorMsg:void 0,inputSx:G,labelSx:K,size:R,variant:A,label:I?void 0:a,placeholder:i,value:$,onChange:e=>{const t=(e?.target?.value??"").toString();H(t.replace(/\D+/g,""))}})})},Eht=({text:t,name:r,isDisplayOnly:o=!1,required:n=!1,requiredErrorText:a="This field is required",validationErrorText:i="Invalid rating",placeholderText:s="",hoverFeedback:l=!1,sourceDataModelField:c,textAlign:u="left",color:d="black",textColor:p,selectColor:h,fontSize:f=14,fontFamily:m="Arial, sans-serif",fontWeight:y="normal",marginLeft:g="0",marginTop:v="0",marginRight:x="0",marginBottom:b="0",paddingLeft:w="0",paddingTop:k="0",paddingRight:_="0",paddingBottom:C="0",width:M,height:S,minHeight:D,maxHeight:O,minWidth:P,maxWidth:E,placement:j="right",configurationItemInfo:T={},disabled:N=!1,maxValue:R=5,ratingPrecision:F=.5,sx:I,...A})=>{const z=Kt(),L=z?.control,B=!!z&&!!L&&!!r;IC(),UC();const V=wrt({name:r,sourceDataModelField:c,form:z,enabled:B});!B||z.formState.errors;const[$,H]=e.useState(null),[q,W]=e.useState(-1),U=l&&-1!==q;if(o){let e=null;return void 0!==V&&(e=(e=>"number"!=typeof e||Number.isNaN(e)?"string"!=typeof e||Number.isNaN(Number(e))?null:Number(e):e)(V)),it(ag,{required:n,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,paddingLeft:w,paddingTop:k,paddingRight:_,paddingBottom:C,display:"inline-flex",...M&&{width:M},...S&&{height:S},...D&&{minHeight:D},...O&&{maxHeight:O},...P&&{minWidth:P},...E&&{maxWidth:E},...I},...T,children:[t&&at(Pd,{variant:"subtitle1",sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,marginBottom:"4px"},children:t}),at(xb,{value:e,max:R,precision:F,readOnly:!0,sx:{"& .MuiRating-iconEmpty":{color:d},"& .MuiRating-iconFilled":{color:h||d},...I},...A})]})}const G={required:!!n&&a,validate:e=>!n||null!==e&&0!==e||a};return it(ag,{required:n,sx:{marginLeft:g,marginTop:v,marginRight:x,marginBottom:b,paddingLeft:w,paddingTop:k,paddingRight:_,paddingBottom:C,display:"inline-flex",...M&&{width:M},...S&&{height:S},...D&&{minHeight:D},...O&&{maxHeight:O},...P&&{minWidth:P},...E&&{maxWidth:E},...I},...T,children:[t&&at(Pd,{variant:"subtitle1",sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,marginBottom:"4px"},children:t}),it(Zf,{sx:{display:"flex",alignItems:"center"},children:["left"===j&&at(Pd,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,minWidth:"2em"},children:U?q:B?AGe(z.getValues(r),r,"value")??V??"":$??V??""}),at(tr,{name:r,control:L,defaultValue:"number"==typeof V?V:null,rules:G,render:({field:e,fieldState:{error:t}})=>{const o=AGe(e.value,r,"value");return it(nt,{children:[at(xb,{value:o??V??0,max:R,precision:F,disabled:N,onChange:(e,t)=>{zGe(z,r,t,"value")},onChangeActive:l?(e,t)=>W(t??-1):void 0,sx:{"& .MuiRating-iconEmpty":{color:d},"& .MuiRating-iconFilled":{color:h||d},marginX:l?1:0,...I},...A}),t&&at(wg,{error:!0,sx:{marginTop:"4px"},children:"required"===t.type?a:i})]})}}),"right"===j&&at(Pd,{sx:{fontSize:f,fontFamily:m,fontWeight:y,color:p||d,minWidth:"2em"},children:U?q:B?AGe(z.getValues(r),r,"value")??V??"":$??V??""})]})]})},jht=["value","label","id","code"],Tht=e=>null!=e&&"object"==typeof e&&!Array.isArray(e),Nht=e=>{if("string"==typeof e||"number"==typeof e)return e;if(Tht(e)){if("value"in e&&("string"==typeof e.value||"number"==typeof e.value))return e.value;for(const t of jht){if("value"===t)continue;const r=e[t];if("string"==typeof r||"number"==typeof r)return r}}},Rht=(e,t)=>{if(null==t)return;const r=String(t);return e.find(e=>String(e.id)===r||(void 0!==e.value&&String(e.value)===r||void 0!==e.label&&String(e.label)===r))},Fht=({open:t,text:o,disabled:n,sx:a,placeholderText:i,required:s=!1,requiredErrorText:l="This field is required",isDisplayOnly:c=!1,displayText:u,visible:d=!0,fontSize:p,fontFamily:h,fontWeight:f,textColor:m,textAlign:y,borderColor:g,color:v,backgroundColor:x,marginLeft:b="0",marginTop:w="0",marginRight:k="0",marginBottom:_="0",paddingLeft:C,paddingTop:M,paddingRight:S,paddingBottom:D,width:O,height:P,minHeight:E,maxHeight:j,minWidth:T,maxWidth:N,configurationItemInfo:R={},name:F,sourceDataModelField:I,predefinedValue:A,hideWhenNoValue:z=!1,inputSize:L="medium",hideLabel:B=!1,variant:V="outlined",native:$=!1,options:H,publishToWebpageContext:q=!1,webpageContextKey:W})=>{const U="regular"===f?"normal":f,G=e=>""!==e&&null!=e,K=c?void 0:I,{dataModelFieldOptions:Y,isLoading:Z}=(e=>{const{pickList:t}=dt(),{data:o=[],refetch:n,isLoading:a}=r.useQuery({queryKey:[WGe,e],queryFn:()=>t.get(e),select:e=>{const t=e?.data;return Array.isArray(t)?t:t&&Array.isArray(t.data)?t.data:[]},enabled:Boolean(e),refetchOnWindowFocus:!0,refetchOnMount:!0});return{dataModelFieldOptions:o,refetch:n,isLoading:a}})(K),X=H&&H.length>0?H:Y,Q=e.useMemo(()=>(X||[]).map(e=>"string"==typeof e?{id:e,value:e}:e),[X]),J=Q.length>0||!Z;let ee;try{ee=Kt()}catch(Pe){ee=null}const te=!!ee?.control&&!!F,[re,oe]=e.useState(""),[ne,ae]=e.useState(!1);let ie={setLocalStateValue:null,isConfigurationMode:!1,selectedConfigurationItemId:null};try{ie=IC()}catch(Pe){}let se={stateConfig:null};try{se=UC()}catch(Pe){}let le=null;try{le=ht()}catch(Pe){}const ce=KC();ie.isConfigurationMode&&ie.selectedConfigurationItemId;const ue=null!=A&&""!==A,de=Boolean(n)||ue,pe=HGe(),he=I?pe(I):void 0,fe=le?.itemDataByDmfId?.[F],me=Nht(fe),ye=e.useMemo(()=>((e,t,r)=>{if(null!=e){if(Tht(e)){const o=e.id;if("string"==typeof o||"number"==typeof o){const r=Rht(t,o);return r?{...r,...e}:e}for(const n of["value","label","code"]){const o=e[n];if("string"==typeof o||"number"==typeof o){const e=Rht(t,o);if(e)return e;if(!r)return}}return}if("string"==typeof e||"number"==typeof e){const o=Rht(t,e);if(o)return o;if(!r)return;return{id:e}}}})(he,Q,J),[he,Q,J]),ge=wrt({name:F,sourceDataModelField:I,form:ee,fallbackKey:void 0,enabled:te&&!ue,mapValue:()=>ye}),ve=Nht(he)??("string"==typeof ge||"number"==typeof ge?ge:void 0);e.useEffect(()=>{ue&&null!=A&&(te?zGe(ee,F,A,"id",{shouldDirty:!1,shouldTouch:!1,shouldValidate:!1}):oe(A))},[ue,A,te,ee,F]);const xe=fe??ve;if(e.useEffect(()=>{q&&W&&ce?.setDynamicContextValue&&void 0!==xe&&ce.setDynamicContextValue(W,xe)},[q,W,xe,ce]),!d)return null;if(c&&z&&!(fe??ve))return null;if(c){const e=u??(null!=me?String(me):void 0)??(null!=ve?String(ve):void 0)??(i||"-"),{css:t,...r}=R||{};return it("div",{css:t,style:{display:"inline-flex",flexDirection:"column",...G(w)&&{marginTop:w},...G(k)&&{marginRight:k},...G(_)&&{marginBottom:_},...G(b)&&{marginLeft:b},...G(O)?{width:O}:{width:"fit-content"},...G(P)&&{height:P},...G(E)&&{minHeight:E},...G(j)&&{maxHeight:j},...G(T)&&{minWidth:T},...G(N)&&{maxWidth:N}},...r,children:[o&&at(wg,{sx:{...G(p)&&{fontSize:p},...G(h)&&{fontFamily:h},...U&&{fontWeight:U},color:G(m)?m:"#000",marginLeft:0,marginBottom:"4px",...G(y)&&{textAlign:y}},children:o}),at(Pd,{sx:{...G(p)&&{fontSize:p},...G(h)&&{fontFamily:h},...U&&{fontWeight:U},...G(m)&&{color:m},...G(y)&&{textAlign:y},...G(C)&&{paddingLeft:C},...G(M)&&{paddingTop:M},...G(S)&&{paddingRight:S},...G(D)&&{paddingBottom:D},...G(x)&&{backgroundColor:x},border:`1px solid ${G(g)?g:"#ccc"}`,borderRadius:"4px"},children:e})]})}const be="small"===L?40:56,we={position:"relative",display:G(O)?"block":"inline-block",...G(O)&&{width:O},...G(T)&&{minWidth:T},...G(N)&&{maxWidth:N},...G(b)&&{marginLeft:b},...G(w)&&{marginTop:w},...G(k)&&{marginRight:k},...G(_)&&{marginBottom:_}},ke={width:"100%",...G(P)&&{height:P},...G(E)&&{minHeight:E},...G(j)&&{maxHeight:j},...!G(O)&&!G(T)&&{minWidth:"240px"},...a},_e=G(m)?m:G(v)?v:void 0,Ce={..."small"===L&&!P&&{height:`${be}px`},...G(x)&&{backgroundColor:x},..._e&&{color:_e},...G(p)&&{fontSize:p},...G(h)&&{fontFamily:h},...U&&{fontWeight:U},...G(g)&&{"& .MuiOutlinedInput-notchedOutline":{borderColor:g},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:g},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:g}},..."filled"===V&&G(g)&&{"&:before":{borderColor:g},"&:after":{borderColor:g},"&:hover:not(.Mui-disabled):before":{borderColor:g}},..."standard"===V&&G(g)&&{"&:before":{borderColor:g},"&:after":{borderColor:g},"&:hover:not(.Mui-disabled):before":{borderColor:g}},"& .MuiSelect-select":{...G(y)&&{textAlign:y},...G(p)&&{fontSize:p},...G(h)&&{fontFamily:h},...U&&{fontWeight:U},...G(M)&&{paddingTop:M},...G(D)&&{paddingBottom:D},...G(C)&&{paddingLeft:C},...G(S)&&{paddingRight:S}}},Me={...G(p)&&{fontSize:p},...G(h)&&{fontFamily:h},...U&&{fontWeight:U}},Se=e=>{const t=((e,t)=>e.find(e=>String(e.id)===t))(Q,e),r=t??{id:e};oe(e),te&&zGe(ee,F,r),I&&ie?.setLocalStateValue&&ie.setLocalStateValue(I,r)},De=te?AGe(ee.watch(F),F,"id")||"":re,Oe=te?ee.formState?.errors?.[F]:void 0;return at("div",{style:we,...R,onClick:e=>{ie?.isConfigurationMode&&R&&"onClick"in R&&(e.stopPropagation(),e.preventDefault(),R.onClick())},children:it(ag,{variant:V,size:L,sx:ke,disabled:de,required:s,error:!!Oe,children:[!B&&at(Kg,{id:`${F}-label`,shrink:$?ne||!!De:void 0,sx:Me,children:o}),at(Fb,{value:De,onChange:e=>{ie?.isConfigurationMode||Se(e.target.value)},onFocus:()=>ae(!0),onBlur:()=>ae(!1),...ie?.isConfigurationMode&&{open:!1},labelId:B?void 0:`${F}-label`,label:B?void 0:o,disabled:de,native:$,sx:Ce,children:$?[at("option",{value:""},"__placeholder__"),...Z?[at("option",{disabled:!0,children:"Loading..."},"__loading__")]:Q.map(e=>at("option",{value:e.id,children:e.value},e.id))]:Z?it(xx,{disabled:!0,children:[at(od,{size:20,sx:{mr:1}}),"Loading..."]}):Q.map(e=>at(xx,{value:e.id,children:e.value},e.id))}),Oe&&at(wg,{error:!0,children:Oe?.message||l})]})})};const Iht=({text:e,name:t,isDisplayOnly:r=!1,required:o=!1,requiredErrorText:n="This field is required",validationErrorText:a="Invalid value",placeholderText:i="",startIcon:s,endIcon:l,borderColor:c,selectLineColor:u,lineWeight:d=1,orientation:p="horizontal",textColor:h,fontSize:f,fontFamily:m,fontWeight:y,valueFormat:g,valueDisplay:v="auto",iconSize:x,selectColor:b,iconColor:w,minValue:k=0,maxValue:_=100,step:C,labelPlacement:M="top",marginLeft:S="0",marginTop:D="0",marginRight:O="0",marginBottom:P="0",paddingLeft:E="0",paddingTop:j="0",paddingRight:T="0",paddingBottom:N="0",width:R,height:F,minHeight:I,maxHeight:A,minWidth:z,maxWidth:L,sx:B,configurationItemInfo:V,sourceDataModelField:$,disabled:H=!1,...q})=>{const W=Kt(),U=W?.control,G=!!U&&!!t&&!r;IC(),UC(),ht();const K=wrt({name:t,sourceDataModelField:$,form:W,enabled:G}),Y={required:!!o&&n,validate:e=>!o||null!=e||n},Z=e=>function(e,t){if(null==e)return"";switch(t){case"$0.00":return`$${e.toFixed(2)}`;case"$123":return`$${e}`;case"%0.00":return`${e.toFixed(2)}%`;case"%123":return`${e}%`;case"0.0":return e.toFixed(1);case"0.00":return e.toFixed(2);default:return e.toString()}}(e,g),X={width:"100%","& .MuiSlider-root":{width:"100%"},"& .MuiSlider-rail":{backgroundColor:c||"#ccc",..."vertical"===p?{width:`${d}px`}:{height:`${d}px`}},"& .MuiSlider-track":{backgroundColor:u||"#2196f3",border:`1px solid ${u||"#2196f3"}`,..."vertical"===p?{width:`${d}px`}:{height:`${d}px`}},"& .MuiSlider-thumb":{backgroundColor:b||"#2196f3",width:x||"16px",height:x||"16px",boxShadow:"none","&:focus, &:hover, &.Mui-active, &.Mui-focusVisible":{boxShadow:"none"}},"& .MuiSlider-valueLabel":{backgroundColor:b||"#2196f3",color:"#ffffff",borderRadius:"4px",fontSize:"12px",fontWeight:500},"& .MuiSlider-mark":{backgroundColor:c||"#ccc",width:"2px",height:"2px",borderRadius:"50%"},"& .MuiSlider-markActive":{backgroundColor:b||"#2196f3"},...B};if(r){let t=null;return void 0!==K&&(t=(e=>"number"!=typeof e||Number.isNaN(e)?"string"!=typeof e||Number.isNaN(Number(e))?null:Number(e):e)(K)),it(ag,{required:o,sx:{marginLeft:S,marginTop:D,marginRight:O,marginBottom:P,paddingLeft:E,paddingTop:j,paddingRight:T,paddingBottom:N,display:"inline-flex",...R&&{width:R},...F&&{height:F},...I&&{minHeight:I},...A&&{maxHeight:A},...z&&{minWidth:z},...L&&{maxWidth:L},...B},...V,children:[e&&at(Dg,{children:e}),it(Zf,{display:"flex",flexDirection:"top"===M?"column":"row",alignItems:"center",mt:"top"===M?1:0,children:[s&&at(Zf,{mr:"horizontal"===p?1:0,mb:"vertical"===p?1:0,children:at(jGe,{iconName:s,color:w})}),at(gw,{value:t??void 0,min:k,max:_,step:C,orientation:p,valueLabelDisplay:v,valueLabelFormat:Z,sx:X,disabled:!0,...q}),l&&at(Zf,{ml:"horizontal"===p?1:0,mt:"vertical"===p?1:0,children:at(jGe,{iconName:l,color:w})}),at(Pd,{sx:{ml:1,fontSize:f,fontFamily:m,fontWeight:y,color:h},children:t})]})]})}return it(ag,{required:o,sx:{marginLeft:S,marginTop:D,marginRight:O,marginBottom:P,paddingLeft:E,paddingTop:j,paddingRight:T,paddingBottom:N,display:"inline-flex",...R&&{width:R},...F&&{height:F},...I&&{minHeight:I},...A&&{maxHeight:A},...z&&{minWidth:z},...L&&{maxWidth:L},...B},...V,children:[e&&at(Dg,{children:e}),at(tr,{name:t||"",control:U,defaultValue:"number"==typeof K?K:k,rules:Y,render:({field:e,fieldState:r})=>{const o=AGe(e.value,t,"value");return it(nt,{children:[at(gw,{...e,value:o??k,min:k,max:_,step:C,orientation:p,valueLabelDisplay:v,valueLabelFormat:Z,sx:X,onChange:(e,r)=>{zGe(W,t,r,"value")},...q}),r.error&&at(wg,{error:!0,sx:{mt:1},children:"required"===r.error.type?n:a})]})}})]})},Aht=({direction:t="up",size:r="medium",ariaLabel:o="Speed Dial",openIconName:n="plus",closeIconName:a="x",openIconColor:i="#fff",closeIconColor:s="#fff",backgroundColor:l="#1976d2",items:c=[],configurationItemInfo:u={},tooltipOpen:d=!1,tooltipPlacement:p,showBackdrop:h=!1,openOnHover:f=!1,paddingTop:m,paddingRight:y,paddingBottom:g,paddingLeft:v,marginTop:x,marginRight:b,marginBottom:w,marginLeft:k,moleculeId:_,gap:C,sx:M,...S})=>{const D=Ye(),[O,P]=e.useState(!1),{isConfigurationMode:E,onConfigurationItemClicked:j,selectedConfigurationItemId:T,onInternalNavigation:N}=IC();e.useEffect(()=>{if(!O)return;const e=e=>{"Escape"!==e.key||E||P(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[O,E]);const R=()=>P(!0),F=()=>P(!1);let I={};I=f&&!h?{onMouseEnter:R,onMouseLeave:F,onFocus:R,onBlur:F}:{onClick:e=>{P(e=>!e)}};const A={bgcolor:l,paddingTop:m,paddingRight:y,paddingBottom:g,paddingLeft:v,marginTop:x,marginRight:b,marginBottom:w,marginLeft:k},z=O||E&&(T===_||c.some(e=>e.id===T));return it("div",{role:"presentation",children:[h&&at(Lf,{open:O}),at(Ow,{ariaLabel:o,direction:t,icon:at(Qw,{icon:at(jGe,{iconName:n,color:i,size:24}),openIcon:at(jGe,{iconName:a,color:s,size:24})}),open:z,onOpen:f&&!h?R:void 0,onClose:f&&!h?F:void 0,FabProps:{color:"primary",sx:A,size:r,gap:C},slotProps:{fab:{"data-testid":"speed-dial-fab","aria-label":o}},sx:{"& .MuiSpeedDial-fab":{backgroundColor:l,...A},"& .MuiSpeedDial-actions":{gap:C||8},"& .MuiSpeedDialIcon-icon":{fontSize:"small"===r?"18px":"large"===r?"24px":"20px",color:"inherit"},"& .MuiSpeedDialIcon-openIcon":{fontSize:"small"===r?"18px":"large"===r?"24px":"20px",color:"inherit"},"& .MuiSpeedDialAction-fab":{backgroundColor:"#fff",color:"#757575","&:hover":{backgroundColor:"#f5f5f5"}},"& .MuiSpeedDialAction-staticTooltip":{backgroundColor:"rgba(97, 97, 97, 0.9)",color:"#fff",fontSize:"12px",padding:"4px 8px",borderRadius:"4px"},"& .MuiSpeedDialAction-staticTooltipLabel":{fontSize:"12px",fontWeight:500},...M},...I,...u,...S,children:c.map(e=>{const{text:t,link:o}=e.properties??{},{iconName:n="plus",disabled:a=!1,iconColor:i="#757575",tooltipText:s,backgroundColor:l="#fff"}=e.config?.props??{},c=String(t?.text||s||"Action"),u=E&&T===e.id,h={entityId:e.id,entity:"molecule_item",entityType:"speed_dial_action_item"},f=E?{onClick:e=>{e.stopPropagation(),j?.(h,!1)},onDoubleClick:e=>{e.stopPropagation(),j?.(h,!0)},"data-organism-id":e.id,css:hrt({theme:D,selected:u})}:{};return at(Uw,{icon:at(jGe,{iconName:n,color:i,size:24}),tooltipOpen:d,tooltipTitle:c,tooltipPlacement:p,FabProps:{sx:{color:i,backgroundColor:l},size:r,disabled:a,"aria-label":c,onClick:e=>{e.stopPropagation(),o?(d9e(o)?N?.({link:o.internalLink??""}):c9e(o.externalLink),P(!1)):P(!1)},...f}},e.id)})})]})},zht=({items:e,gap:t,stepGap:r,isMobile:o=!1,iconSize:n="24px",orientation:a="horizontal",activeStep:i=0,lineColor:s,lineWidth:l,lineRadius:c,marginTop:u="0",marginRight:d="0",marginBottom:p="0",marginLeft:h="0",paddingTop:f="0",paddingRight:m="0",paddingBottom:y="0",paddingLeft:g="0",borderRadius:v="0",configurationItemInfo:x,backgroundColor:b="transparent",sx:w,...k})=>{const _=Ye(),C=o?"vertical":a,{isConfigurationMode:M,onConfigurationItemClicked:S,selectedConfigurationItemId:D}=IC();return at(Vk,{sx:{gap:t,width:"100%",overflow:"hidden",marginTop:u,marginRight:d,marginBottom:p,marginLeft:h,paddingTop:f,paddingRight:m,paddingBottom:y,paddingLeft:g,borderRadius:v,backgroundColor:b,"& .MuiStep-root":{padding:"8px"},"& .MuiStepLabel-root":{gap:r,alignItems:"flex-start"},"& .MuiStepLabel-label":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"},"& .MuiStepConnector-root":{flex:"1 1 auto"},"& .MuiStepConnector-line":{borderColor:s,borderWidth:l,borderRadius:c},"& .MuiStepConnector-vertical":{width:n||"24px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"4px"},"& .MuiStepConnector-horizontal":{marginLeft:"8px",marginRight:"8px"},"& .MuiStepContent-root":{margin:0,padding:0,marginTop:"4px",borderLeft:"none"},"& .MuiTypography-root":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"},...w},activeStep:i,orientation:C,connector:at(jk,{sx:{[`&.${Dk.vertical}`]:{width:n||"24px",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:"4px"},[`&.${Dk.vertical} .${Dk.line}`]:{borderColor:s,borderWidth:l,borderRadius:c},[`&.${Dk.horizontal} .${Dk.line}`]:{borderColor:s,borderWidth:l,borderRadius:c}}}),...x,...k,children:e.map((e,t)=>{const o=D===e.id,a=t===i,s={entityId:e.id,entity:"molecule_item",entityType:"stepper_item"},l=M?{onClick:e=>{M&&(e.stopPropagation(),S?.(s,!1))},onDoubleClick:e=>{M&&(e.stopPropagation(),S?.(s,!0))},"data-organism-id":e.id,css:hrt({theme:_,selected:o})}:{},c=e.color||(a?"#000":"#555");return at(lk,{...l,children:it(Mk,{sx:{gap:r,"& .MuiStepLabel-iconContainer":{marginRight:"8px",display:"flex",alignItems:"center",justifyContent:"center"},"& .MuiStepLabel-labelContainer":{display:"flex",flexDirection:"column",alignItems:"flex-start"}},icon:e?.iconName?at(jGe,{size:n,color:e.iconColor||"#000",iconName:e.iconName,borderRadius:e?.iconBorderRadius||0,backgroundColor:e.iconBackgroundColor||"transparent"}):void 0,children:[at(Pd,{variant:"body1",sx:{padding:"4px",fontSize:e.fontSize||"inherit",fontWeight:e.fontWeight||"normal",fontFamily:e.fontFamily||"inherit",color:c,borderRadius:e.borderRadius||"0",display:"inline-block","&.MuiTypography-body1":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"}},children:e.title}),e.subText&&at(Ik,{sx:{margin:0,padding:0,marginTop:"4px",borderLeft:"none","& .MuiStepContent-root":{margin:0,padding:0,marginTop:"4px",borderLeft:"none"}},transitionDuration:{enter:400,exit:400},children:at(Pd,{variant:"body2",sx:{padding:"4px",fontSize:e.subTextFontSize||"inherit",fontWeight:e.subTextFontWeight||"normal",fontFamily:e.subTextFontFamily||"inherit",color:e.subTextColor||"#666",borderRadius:e.borderRadius||"0",display:"inline-block",..."horizontal"===C&&{maxWidth:"300px"},"&.MuiTypography-body2":{fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit",color:"inherit"}},children:e.subText})})]})},e.id)})})},Lht=gl(Yk)(({thumbColor:e="#ff0000",thumbCheckedColor:t="#00ff00",trackColor:r="#0000ff",disabledThumbColor:o="#9e9e9e",sx:n})=>({"& .MuiSwitch-thumb":{backgroundColor:e,width:20,height:20},"& .MuiSwitch-switchBase.Mui-checked .MuiSwitch-thumb":{backgroundColor:t},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:r,opacity:1,backgroundImage:"none"},"& .MuiSwitch-track":{backgroundColor:r,opacity:1,backgroundImage:"none"},"&.Mui-disabled .MuiSwitch-thumb":{backgroundColor:o},"&.Mui-disabled .MuiSwitch-track":{backgroundColor:r,opacity:1,backgroundImage:"none"},"& .MuiSwitch-switchBase":{padding:"9px","&.Mui-checked":{transform:"translateX(16px)"}},"& .MuiSwitch-colorPrimary":{"&.Mui-checked":{color:t}},"& .MuiSwitch-colorSecondary":{"&.Mui-checked":{color:t}},...n})),Bht=({isDisplayOnly:t=!1,required:r=!1,requiredErrorText:o="This field is required",validationErrorText:n="Invalid value",text:a="",thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,labelPlacement:u="top",marginLeft:d="0",marginTop:p="0",marginRight:h="0",marginBottom:f="0",paddingLeft:m="0",paddingTop:y="0",paddingRight:g="0",paddingBottom:v="0",width:x,height:b,minHeight:w,maxHeight:k,minWidth:_,maxWidth:C,name:M,sourceDataModelField:S,disabled:D=!1,sx:O,configurationItemInfo:P,...E})=>{const j=Kt(),T=j?.control,N=!!T&&!!M,R={required:!!r&&o,validate:e=>!(r&&!e)||o};IC(),UC(),ht();const F=wrt({name:M,sourceDataModelField:S,form:j,enabled:N}),[I,A]=e.useState(!1);if(t){let e=!1;return void 0!==F?e="true"===String(F).toLowerCase()||!0===F:N&&(e=Boolean(AGe(j.watch(M),M,"value"))),it(ag,{required:r,sx:{marginLeft:d,marginTop:p,marginRight:h,marginBottom:f,paddingLeft:m,paddingTop:y,paddingRight:g,paddingBottom:v,display:"inline-flex",...x&&{width:x},...b&&{height:b},...w&&{minHeight:w},...k&&{maxHeight:k},..._&&{minWidth:_},...C&&{maxWidth:C},"& .MuiFormLabel-root":{fontSize:"14px",fontWeight:500,color:"#333",marginBottom:"8px"},"& .MuiSwitch-root":{marginTop:"8px"},"& .MuiSwitch-switchBase":{padding:"9px"},"& .MuiSwitch-thumb":{width:"18px",height:"18px",borderRadius:"9px"},"& .MuiSwitch-track":{borderRadius:"9px",height:"14px"},"& .MuiTypography-root":{marginLeft:"8px",fontSize:"14px",fontWeight:500,color:"#333"},...O},...P,children:[a&&at(Dg,{component:"legend",children:a}),it(Zf,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:[at(Lht,{disabled:!0,checked:e,thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{pointerEvents:"none"}},...E}),at(Pd,{sx:{ml:1},children:e?"ON":"OFF"})]})]})}return it(ag,{required:r,sx:{marginLeft:d,marginTop:p,marginRight:h,marginBottom:f,paddingLeft:m,paddingTop:y,paddingRight:g,paddingBottom:v,display:"inline-flex",...x&&{width:x},...b&&{height:b},...w&&{minHeight:w},...k&&{maxHeight:k},..._&&{minWidth:_},...C&&{maxWidth:C},"& .MuiFormLabel-root":{fontSize:"14px",fontWeight:500,color:"#333",marginBottom:"8px"},"& .MuiSwitch-root":{marginTop:"8px"},"& .MuiSwitch-switchBase":{padding:"9px"},"& .MuiSwitch-thumb":{width:"18px",height:"18px",borderRadius:"9px"},"& .MuiSwitch-track":{borderRadius:"9px",height:"14px"},"& .MuiFormHelperText-root":{marginTop:"4px",fontSize:"12px",color:"#d32f2f"},...O},...P,children:[a&&at(Dg,{component:"legend",children:a}),N?at(tr,{name:M,rules:R,control:T,defaultValue:!1,render:({field:e,fieldState:t})=>{const r=Boolean(AGe(e.value,M,"value"));return it(nt,{children:[at(Zf,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:at(Lht,{checked:r,disabled:D,onChange:(e,t)=>{zGe(j,M,t,"value")},thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)"}}},...E})}),t.error&&at(wg,{error:!0,sx:{marginTop:"4px"},children:"required"===t.error.type?o:n})]})}}):at(Zf,{display:"flex",alignItems:"center",mt:"top"===u?1:0,children:at(Lht,{checked:I,disabled:D,onChange:(e,t)=>{A(t)},thumbColor:i,thumbCheckedColor:s,trackColor:l,disabledThumbColor:c,sx:{"& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)"}}},...E})})]})},Vht=({items:t,onTabChange:r,activeTabKey:o,isMobile:n=!1,marginTop:a,marginRight:i,marginBottom:s,marginLeft:l,paddingTop:c,paddingRight:u,paddingBottom:d,paddingLeft:p,buttonPaddingTop:h,buttonPaddingRight:f,buttonPaddingBottom:m,buttonPaddingLeft:y,width:g,height:v,backgroundColor:x,borderRadius:b,elevation:w=1,gap:k,indicatorVisible:_=!0,indicatorColor:C,lineWidth:M="2px",orientation:S="horizontal",activeTextColor:D="#1976d2",inactiveTextColor:O="#000",fontSize:P,fontWeight:E,fontFamily:j,wrapText:T,textAlign:N,iconName:R,iconColor:F,iconSize:I,iconPlacement:A="left",hoverTextColor:z,itemBorder:L,itemBorderRadius:B,itemBackgroundColor:V,itemSelectedBackgroundColor:$,itemHoverBackgroundColor:H,selectedItemElevation:q=0,itemDisableRipple:W,configurationItemInfo:U,sx:G})=>{const K=Ye(),{isConfigurationMode:Y,onConfigurationItemClicked:Z,selectedConfigurationItemId:X}=IC(),[Q,J]=e.useState(null),ee=e=>J(e.currentTarget),te=()=>J(null),re={marginTop:a,marginRight:i,marginBottom:s,marginLeft:l,paddingTop:c,paddingRight:u,paddingBottom:d,paddingLeft:p,width:g,height:v,backgroundColor:x,borderRadius:b,display:"flex",overflow:"visible !important"},oe=e=>{const t=e?D:O,r=e&&$||V;return{color:t,fontSize:P,fontWeight:E,fontFamily:j,textAlign:N,whiteSpace:T?"normal":"nowrap",border:L,borderRadius:B,backgroundColor:r,boxShadow:e?K.shadows[q]:void 0,paddingTop:h,paddingRight:f,paddingBottom:m,paddingLeft:y,"&:hover":{color:z||t,backgroundColor:H||r}}},ne=e=>{r?.({newTabKey:e.tabKey,link:e.link})},ae=e=>{if(!Y)return{};const t=e.id===X,r={entityId:e.id,entity:"molecule_item",entityType:"tabs_item"};return{onClick:e=>{e.stopPropagation(),Z?.(r,!1)},onDoubleClick:e=>{e.stopPropagation(),Z?.(r,!0)},"data-organism-id":e.id,css:hrt({theme:K,selected:t})}},ie=e=>{const t=e.tabKey===o,r=oe(t);return it(xx,{onClick:()=>{ne(e),te()},sx:{...r,display:"flex",alignItems:"center"},...ae(e),children:[e.iconName&&at(jGe,{iconName:e.iconName,sx:{fontSize:P,color:t?D:O,mr:1}}),at(Zf,{component:"span",children:e.label})]},e.id)};if(n)return it(tu,{elevation:w,style:re,sx:G,...U,children:[at(cd,{onClick:ee,children:at(jGe,{size:I,color:F,iconName:R})}),at(fx,{anchorEl:Q,open:Boolean(Q),onClose:te,children:t.map(ie)})]});const se=t.findIndex(e=>e.tabKey===o);return at(tu,{elevation:w,style:re,sx:G,...U,children:at(tC,{value:se<0?0:se,onChange:(e,r)=>Y?null:ne(t[r]),orientation:S,sx:{overflow:"visible","& .MuiTabs-flexContainer":{gap:k}},TabIndicatorProps:{style:_?{height:M,borderRadius:b,backgroundColor:C||D}:{display:"none"}},children:t.map(e=>{const t=e.tabKey===o,r={...oe(t),"&.Mui-selected":{color:t?D:O}};return at(e_,{label:e.label,disableRipple:W,sx:{...r,textTransform:"none"},onClick:()=>ne(e),iconPosition:"right"===A?"end":"start",icon:e.iconName?at(jGe,{iconName:e.iconName,sx:{fontSize:P,color:t?D:O}}):void 0,...ae(e)},e.id)})})})},$ht=e=>{if(!e)return null;if(e instanceof Date)return Not(e)?e:null;if("object"==typeof e&&null!==e&&"function"==typeof e.toDate){const t=e.toDate();return t instanceof Date&&Not(t)?t:null}if("string"==typeof e){const t=e.trim();if(!t)return null;const r=t.match(/(\d{1,2}:\d{2}(?::\d{2})?)/),o=r?r[1]:t,n=new Date,a=["HH:mm:ss","H:mm:ss","HH:mm","H:mm","hh:mm a","h:mm a","hh a","h a","HHmm","Hmm","HH","H"];for(const e of a){const t=Lnt(o,e,n);if(Not(t))return t}return null}return null},Hht=e=>{const t=$ht(e);return t?Lot(t,"HH:mm"):null},qht=({name:t,text:r,isDisplayOnly:o=!1,sourceDataModelField:n,configurationItemInfo:a={},placeholderText:i,displayFormat:s="HH:mm",required:l=!1,requiredErrorText:c="This field is required",validationErrorText:u,sx:d,width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,...v})=>{const x=Kt(),b=x?.control,w=!!b&&!!t;IC();const k=wrt({name:t,sourceDataModelField:n,form:x,enabled:w,mapValue:e=>Hht(e),skipIfNull:!0}),_=$ht(k);e.useRef();const[C,M]=e.useState(_);if(o){const e=void 0!==k?k:w?AGe(x.watch(t),t,"value"):void 0,o=$ht(e),n=o&&Not(o)?Lot(o,s):"";return it(Zf,{...a,sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,"& .MuiFormHelperText-root":{marginBottom:"4px"},"& .MuiTypography-root":{border:"1px solid #ced4da",borderRadius:"4px",padding:"8px",minWidth:"100px"},...d},children:[r&&at(wg,{children:r}),at(Pd,{children:n||i||"-"})]})}return at(Zf,w?{...a,sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,"& .MuiTimePicker-root":{width:"100%"},"& .MuiTextField-root":{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g},"& .MuiInputBase-root":{fontSize:"14px"},"& .MuiInputLabel-root":{fontSize:"14px"},"& .MuiFormHelperText-root":{fontSize:"12px"},"& .MuiSvgIcon-root":{fontSize:"20px"},...d},children:at(tr,{name:t,control:b,defaultValue:Hht(k)??null,rules:{required:!!l&&(c||"This field is required"),validate:e=>{if(null==e||""===e)return!0;const t=$ht(e);return t&&Not(t)||u||"Invalid time"}},render:({field:{value:e},fieldState:o})=>{const n=AGe(e,t,"value");return at(upt,{...v,enableAccessibleFieldDOMStructure:!1,value:$ht(n),onChange:e=>{const r=Hht(e);zGe(x,t,r,"value")},slots:{textField:iC},slotProps:{textField:{label:r,placeholder:i,error:!!o.error,helperText:o.error?.message,onMouseDown:e=>e.stopPropagation(),sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g}}}})}})}:{...a,sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g,"& .MuiTimePicker-root":{width:"100%"},"& .MuiTextField-root":{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g},"& .MuiInputBase-root":{fontSize:"14px"},"& .MuiInputLabel-root":{fontSize:"14px"},"& .MuiFormHelperText-root":{fontSize:"12px"},"& .MuiSvgIcon-root":{fontSize:"20px"},...d},children:at(upt,{...v,enableAccessibleFieldDOMStructure:!1,value:C,onChange:e=>M($ht(e)),slots:{textField:iC},slotProps:{textField:{label:r,placeholder:i,onMouseDown:e=>e.stopPropagation(),sx:{width:p,height:h,minWidth:f,maxWidth:m,minHeight:y,maxHeight:g}}}})})},Wht=({src:t,poster:r,controls:o=!1,loop:n=!1,autoplay:a=!1,raised:i=!1,alt:s="",height:l="100%",width:c="100%",borderRadius:u="0",margin:d=0,padding:p=0,moleculeId:h,enableCoverImage:f,configurationItemInfo:m,marginTop:y="0px",marginRight:g="0px",marginBottom:v="0px",marginLeft:x="0px",paddingTop:b="0px",paddingRight:w="0px",paddingBottom:k="0px",paddingLeft:_="0px",sx:C})=>{const[M,S]=e.useState(!1),{onStateChange:D}=YC(),O=()=>{D({id:h,type:"started"})};return at(Uht,{id:h,raised:i,onClick:O,sx:{borderRadius:`${u}px`,margin:d,padding:p,marginTop:y,marginRight:g,marginBottom:v,marginLeft:x,paddingTop:b,paddingRight:w,paddingBottom:k,paddingLeft:_,"& .MuiCard-root":{display:"inline-block",overflow:"hidden"},"& .MuiCardMedia-root":{height:l,width:c,objectFit:"cover"},"& .MuiCardMedia-media":{height:"100%",width:"100%",objectFit:"cover"},...C},...m,children:M?at(Pd,{component:"div",sx:{height:l,width:c,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"16px",color:"gray",textAlign:"center"},children:s||"Video unavailable"}):at(bm,{component:"video",src:t,poster:f?r:void 0,controls:o,loop:n,autoPlay:a,muted:a,"aria-label":s,sx:{height:l,width:c,objectFit:"cover","& .MuiCardMedia-media":{height:"100%",width:"100%",objectFit:"cover"}},onPlay:O,onEnded:()=>{D({id:h,type:"completed"})},onError:()=>{S(!0)}})})},Uht=To(fm)`
|
|
1032
1032
|
display: inline-block;
|
|
1033
1033
|
overflow: hidden;
|
|
1034
|
-
`,Ght=({width:e="100%",height:t,fontSize:r="16px",marginLeft:o="0",marginTop:n="0",marginRight:a="0",marginBottom:i="0",sx:s})=>at(Hb,{variant:"text",animation:"wave",sx:{width:e,height:t||("number"==typeof r?1.5*r+"px":"24px"),marginLeft:o,marginTop:n,marginRight:a,marginBottom:i,...s}}),Kht=Ght,Yht=({text:e,width:t,height:r,fontSize:o="16px",borderColor:n="#ccc",backgroundColor:a,marginLeft:i="0",marginTop:s="0",marginRight:l="0",marginBottom:c="0",paddingLeft:u,paddingTop:d,paddingRight:p,paddingBottom:h,sx:f})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:i,marginTop:s,marginRight:l,marginBottom:c,width:t||"fit-content",...f},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"150px",height:(()=>{if(r)return r;const e="number"==typeof o?o:parseInt(o,10);return Number.isNaN(e)?"32px":`${Math.round(1.2*e+16)}px`})(),borderRadius:"4px",backgroundColor:a,border:`1px solid ${n}`}})]}),Zht=Yht,Xht=Yht,Qht=Yht,Jht=Yht,eft=({text:e,width:t,height:r,borderColor:o="#ccc",backgroundColor:n,marginLeft:a="0",marginTop:i="0",marginRight:s="0",marginBottom:l="0",paddingLeft:c,paddingTop:u,paddingRight:d,paddingBottom:p,sx:h})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:a,marginTop:i,marginRight:s,marginBottom:l,width:t||"fit-content",...h},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"80px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"180px",height:r||"32px",borderRadius:"4px",backgroundColor:n,border:`1px solid ${o}`}})]}),tft=({text:e,maxValue:t=5,marginLeft:r="0",marginTop:o="0",marginRight:n="0",marginBottom:a="0",sx:i})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:r,marginTop:o,marginRight:n,marginBottom:a,...i},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"80px",height:"20px",marginBottom:"4px"}}),at(Zf,{sx:{display:"flex",gap:"4px"},children:Array.from({length:t}).map((e,t)=>at(Hb,{variant:"circular",animation:"wave",sx:{width:"24px",height:"24px"}},t))})]}),rft=({text:e,marginLeft:t="0",marginTop:r="0",marginRight:o="0",marginBottom:n="0",sx:a})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:t,marginTop:r,marginRight:o,marginBottom:n,...a},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"16px",marginBottom:"8px"}}),it(Zf,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[at(Hb,{variant:"rounded",animation:"wave",sx:{width:"42px",height:"26px",borderRadius:"13px"}}),at(Hb,{variant:"text",animation:"wave",sx:{width:"30px",height:"16px"}})]})]}),oft=({text:e,width:t,orientation:r="horizontal",marginLeft:o="0",marginTop:n="0",marginRight:a="0",marginBottom:i="0",sx:s})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:o,marginTop:n,marginRight:a,marginBottom:i,width:t||"200px",...s},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"16px",marginBottom:"8px"}}),it(Zf,{sx:{display:"flex",alignItems:"center",flexDirection:"vertical"===r?"column":"row",gap:"8px"},children:[at(Hb,{variant:"rounded",animation:"wave",sx:{width:"horizontal"===r?"100%":"4px",height:"horizontal"===r?"4px":"100px",borderRadius:"2px"}}),at(Hb,{variant:"text",animation:"wave",sx:{width:"24px",height:"16px"}})]})]}),nft=({text:e,width:t,height:r,borderColor:o="#ced4da",backgroundColor:n,marginLeft:a="0",marginTop:i="0",marginRight:s="0",marginBottom:l="0",sx:c})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:a,marginTop:i,marginRight:s,marginBottom:l,width:t||"fit-content",...c},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"120px",height:r||"32px",borderRadius:"4px",backgroundColor:n,border:`1px solid ${o}`}})]}),aft=({text:e,width:t,height:r,borderColor:o="#ced4da",marginLeft:n="0",marginTop:a="0",marginRight:i="0",marginBottom:s="0",sx:l})=>it(Zf,{sx:{marginLeft:n,marginTop:a,marginRight:i,marginBottom:s,width:t||"fit-content",...l},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"100px",height:r||"32px",borderRadius:"4px",border:`1px solid ${o}`}})]}),ift=({width:e,height:t,marginLeft:r="0",marginTop:o="0",marginRight:n="0",marginBottom:a="0",sx:i})=>it(Zf,{sx:{marginLeft:r,marginTop:o,marginRight:n,marginBottom:a,width:e||"320px",...i},children:[at(Hb,{variant:"rectangular",animation:"wave",sx:{width:"100%",height:"48px",borderRadius:"8px 8px 0 0",marginBottom:"8px"}}),at(Zf,{sx:{display:"flex",justifyContent:"space-between",marginBottom:"8px"},children:Array.from({length:7}).map((e,t)=>at(Hb,{variant:"circular",animation:"wave",sx:{width:"32px",height:"24px"}},t))}),Array.from({length:6}).map((e,t)=>at(Zf,{sx:{display:"flex",justifyContent:"space-between",marginBottom:"4px"},children:Array.from({length:7}).map((e,t)=>at(Hb,{variant:"circular",animation:"wave",sx:{width:"32px",height:"32px"}},t))},t))]}),sft=({text:e,subText:t,width:r,height:o,backgroundColor:n,marginLeft:a="0",marginTop:i="0",marginRight:s="0",marginBottom:l="0",sx:c})=>at(Hb,{variant:"rounded",animation:"wave",sx:{width:r||"100%",height:o||(e&&t?"72px":"48px"),borderRadius:"4px",marginLeft:a,marginTop:i,marginRight:s,marginBottom:l,backgroundColor:n,...c}}),lft=({size:e=24,marginLeft:t="0",marginTop:r="0",marginRight:o="0",marginBottom:n="0",sx:a})=>it(Zf,{sx:{position:"relative",display:"inline-flex",marginLeft:t,marginTop:r,marginRight:o,marginBottom:n,...a},children:[at(Hb,{variant:"circular",animation:"wave",sx:{width:e,height:e}}),at(Hb,{variant:"circular",animation:"wave",sx:{position:"absolute",top:-4,right:-4,width:16,height:16}})]}),cft=({size:e="medium",width:t,backgroundColor:r,marginLeft:o="0",marginTop:n="0",marginRight:a="0",marginBottom:i="0",sx:s})=>at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||("small"===e?"60px":"80px"),height:"small"===e?"24px":"32px",borderRadius:"16px",marginLeft:o,marginTop:n,marginRight:a,marginBottom:i,backgroundColor:r,...s}}),uft=({width:e,fontSize:t="14px",marginLeft:r="0",marginTop:o="0",marginRight:n="0",marginBottom:a="0",sx:i})=>at(Hb,{variant:"text",animation:"wave",sx:{width:e||"100px",height:"number"==typeof t?1.2*t+"px":"18px",marginLeft:r,marginTop:o,marginRight:n,marginBottom:a,...i}}),dft=({size:e=40,marginLeft:t="0",marginTop:r="0",marginRight:o="0",marginBottom:n="0",sx:a})=>at(Hb,{variant:"circular",animation:"wave",sx:{width:e,height:e,marginLeft:t,marginTop:r,marginRight:o,marginBottom:n,...a}}),pft=["simple_text","text","basic_text_display_field","email_display_field","phone_number_display_field","numeric_display_field","currency_display_field","select_display_field","rating_display_field","switch_display_field","slider_display_field","date_display_field","time_picker_display","date_calendar_display","alert","badge","chip","link","avatar"],hft=e=>pft.includes(e),fft=({type:e,props:t={}})=>{const r={width:t.width,height:t.height,marginLeft:t.marginLeft||"0",marginTop:t.marginTop||"0",marginRight:t.marginRight||"0",marginBottom:t.marginBottom||"0",sx:t.sx};switch(e){case"simple_text":case"text":return at(Ght,{...r,fontSize:t.fontSize});case"basic_text_display_field":return at(Yht,{...r,text:t.text,fontSize:t.fontSize,borderColor:t.borderColor,backgroundColor:t.backgroundColor,paddingLeft:t.paddingLeft,paddingTop:t.paddingTop,paddingRight:t.paddingRight,paddingBottom:t.paddingBottom});case"email_display_field":return at(Zht,{...r,text:t.text,borderColor:t.borderColor});case"phone_number_display_field":return at(Xht,{...r,text:t.text,borderColor:t.borderColor});case"numeric_display_field":return at(Qht,{...r,text:t.text,borderColor:t.borderColor});case"currency_display_field":return at(Jht,{...r,text:t.text,borderColor:t.borderColor});case"select_display_field":return at(eft,{...r,text:t.text,borderColor:t.borderColor});case"rating_display_field":return at(tft,{...r,text:t.text,maxValue:t.maxValue});case"switch_display_field":return at(rft,{...r,text:t.text});case"slider_display_field":return at(oft,{...r,text:t.text,orientation:t.orientation});case"date_display_field":return at(nft,{...r,text:t.text,borderColor:t.borderColor});case"time_picker_display":return at(aft,{...r,text:t.text,borderColor:t.borderColor});case"date_calendar_display":return at(ift,{...r});case"alert":return at(sft,{...r,text:t.text,subText:t.subText,backgroundColor:t.backgroundColor});case"badge":return at(lft,{...r,size:t.size});case"chip":return at(cft,{...r,size:t.size,backgroundColor:t.backgroundColor});case"link":return at(uft,{...r,fontSize:t.fontSize});case"avatar":return at(dft,{...r,size:t.size});default:return at(Hb,{variant:"rounded",animation:"wave",sx:{width:r.width||"100%",height:r.height||"40px",marginLeft:r.marginLeft,marginTop:r.marginTop,marginRight:r.marginRight,marginBottom:r.marginBottom,...r.sx}})}},mft=({children:e,additionalInfo:t})=>{try{return at(nt,{children:e})}catch(r){return console.error(`Render error in SafeRender - ${t} :`,r),at("div",{style:{color:"red",padding:24},children:"Render Error"})}};function yft(e,t,r,o){const n={...e};return 0===r.length?{...e,...t}:(t&&o&&r.forEach(e=>{void 0!==t[e]&&(n[e]=t[e])}),n)}function gft(e,t,r=!1){return t&&r?xn(e,t):e}const vft=({id:t,type:r,name:o,form:n,config:a,formData:i,isMobile:s,children:l,tabsProps:c,properties:u,moleculeLibraryId:d,organismLibraryMoleculeId:p,parentStyleVariantConfig:h,parentContainerWithVariantsId:f,parentContainerActiveVariant:m})=>{const y=Ye(),g=PC("xs"),v=s||g,{formId:x,isPreview:b=!1,validations:w,submitHandler:k,isConfigurationMode:_,onConfigurationItemClicked:C,selectedConfigurationItemId:M,currentStyleProperties:S,currentContentProperties:D,onInternalNavigation:O,organismMetadata:P,organismInfo:E,localState:j}=IC(),{stateConfig:T}=UC(),N=KC(),R=T,F=ht(),I=F?.isLoading??N?.isSingleRecordLoading??!1,A=m??F.activeVariant,z=e.useMemo(()=>((e,t)=>{if(!e)return{};if(t){const r=e[t];if(r&&"object"==typeof r&&"props"in r){const e=r.props;if(e&&"object"==typeof e)return e}}return e.props||{}})(a,A??null),[a,A]),L=u?.dataCapture,B=a?.props?.dataCaptureName||L?.dataCaptureName||L?.variableName||t,V=e.useMemo(()=>{return x&&F?.nestedPathSegments?.length?(e=F.nestedPathSegments,t=B,e&&0!==e.length?[...e.map(e=>void 0!==e.index?`${e.dmfId}.${e.index}`:e.dmfId),t].filter(Boolean).join("."):t):B;var e,t},[x,F?.nestedPathSegments,B]),$=u?.dataCapture,H=$?.nature?.toString().replace(/-/g,"_").toLowerCase()??"",q="variable"===H&&$?.variableName||$?.sourceDataModelFieldId,W=$?.predefinedValue,U=!$?.isIgnored&&("variable"===H&&Boolean($?.variableName)||"data_model"===H&&Boolean($?.sourceDataModelFieldId)),G=M===t,{isStateDisabled:K,isStateVisible:Y}=(({stateListenerId:e})=>{const{localStateObject:t}=IC(),{stateConfig:r}=UC(),o=t||r;let n=!0,a=!1;if(!e)return{isStateDisabled:a,isStateVisible:n};const i=o?.[e]||{},{visible:s=!0,disabled:l=!1}=i||{};return e in o&&(n=Boolean(s),a=Boolean(l)),{isStateDisabled:a,isStateVisible:n,stateValue:i}})({stateListenerId:t}),Z=e.useMemo(()=>({entityType:r,entity:"molecule",entityName:o,entityId:t,organismType:E?.type,organismSubtype:E?.subtype,organismLibraryMoleculeId:p,libraryEntityId:d,activeStyleVariant:A,parentReplicatorWithVariants:f||F.containerId||null,parentStyleVariantConfig:h||void 0}),[r,o,t,p,d,A,F.containerId,f,h]),X=e.useCallback(e=>{e?.stopPropagation(),C(Z,!1)},[C,Z]),Q=e.useCallback(e=>{e?.stopPropagation(),C(Z,!0)},[C,Z]),J=_?{onClick:X,onDoubleClick:Q,"data-configuration-id":t,css:hrt({theme:y,selected:G})}:{},ee=_||K;if(!Y)return null;if(I&&(hft(r)||U)){const e={width:z.width,height:z.height,marginLeft:z.marginLeft||"0",marginTop:z.marginTop||"0",marginRight:z.marginRight||"0",marginBottom:z.marginBottom||"0",paddingLeft:z.paddingLeft,paddingTop:z.paddingTop,paddingRight:z.paddingRight,paddingBottom:z.paddingBottom,fontSize:z.fontSize,borderColor:z.borderColor,backgroundColor:z.backgroundColor,size:z.size,text:u?.text?.text,subText:u?.subText?.text,maxValue:z.maxValue,orientation:z.orientation,sx:z.sx};return at(fft,{type:r,props:e})}return(()=>{switch(r){case"simple_text":{const e={text:u?.text},r=["text"],{text:o}=yft(e,D,r,G),n=gft(z,S,G);return at(Ept,{...n,text:o?.text||"",htmlElementId:t,configurationsItemInfo:J})}case"text":{const e={text:u?.text},r=Object.keys(e),{text:o}=yft(e,D,r,G),n=gft(z,S,G);return at(Ppt,{...o,...n,htmlElementId:t,configurationItemInfo:J})}case"consent":{const e=yft(u,D,[],G),r=gft(z,S,G)||{};return at(Prt,{...r,htmlElementId:t,properties:e,configurationItemInfo:J})}case"signup_password_fields":{const e={text:u?.text,subText:u?.subText,placeholderText:u?.placeholderText,subPlaceholderText:u?.subPlaceholderText,validationText:u?.validationText},r=Object.keys(e),o=yft(e,D,r,G),{state:n,gap:i,...s}=gft(a?.props,S,G);return at(_ht,{gap:i,inputProps:s,validations:w||[],htmlElementId:t,validationState:n,overridesProperties:o,configurationItemInfo:J})}case"stepper":{const e=gft(z,S,G),r=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{},a={title:r?.title,subText:r?.subText},i=Object.keys(a),{title:s,subText:l}=yft(a,D,i,t);return{...n,...gft(o?.props,S,t),title:s?.text||"",subText:l?.text||""}});return at(zht,{...e,items:r||[],isMobile:v,moleculeId:t,configurationItemInfo:J})}case"checklist":{const e=gft(z,S,G)||{},r=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{};switch(e.type){case"checklist_item":{const a={label:r?.label,objectState:r?.objectState},i=Object.keys(a),s=yft(a,D,i,t),l=gft(o?.props,S,t)||{},c=s.label?.text||"",u=!!s.objectState?.pmiObjectId;return{...n,...l,type:"checklist_item",label:c,textColor:l.textColor||"#000",fontSize:l.fontSize||"14px",fontFamily:l.fontFamily||"inherit",fontWeight:l.fontWeight||"normal",textAlign:l.textAlign||"left",isSystemDriven:u,disabled:u,interacted:R?.[e.id]?.interacted||"unchecked"}}case"divider_item":{const e=gft(o?.props,S,t)||{};return{...n,...e,type:"divider_item"}}case"text_item":{const e={text:r?.text},a=Object.keys(e),i=yft(e,D,a,t),s=gft(o?.props,S,t)||{},l=i.text?.text||"";return{...n,...s,type:"text_item",text:l}}case"rich_text_item":{const e={text:r?.text},a=Object.keys(e),i=yft(e,D,a,t),s=gft(o?.props,S,t)||{},l=i.text?.text||f5e;return{...n,...s,type:"rich_text_item",text:l}}default:return{...n,type:e.type}}});return at(Drt,{...e,items:r||[],moleculeId:t,configurationItemInfo:J})}case"accordion":{const e=gft(z,S,G),r=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{},a={text:r?.text,subText:r?.subText,bodyText:r?.bodyText},i=Object.keys(a),{text:s,subText:l,bodyText:c}=yft(a,D,i,t);return{...n,...gft(o?.props,S,t),text:s?.text||"",subText:l?.text||"",bodyText:c?.text||""}});return at(mrt,{...e,items:r||[],moleculeId:t,configurationItemInfo:J})}case"menu":{const e={text:u?.text,disabled:u?.disabled},r=Object.keys(e),{text:o,disabled:n}=yft(e,D,r,G),a=gft(z,S,G),i=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{},a={disabled:r&&"disabled"in r?r.disabled:void 0,text:r&&"text"in r?r.text:void 0,link:r&&"link"in r?r.link:void 0},i=Object.keys(a),{text:s,disabled:l,link:c}=yft(a,D,i,t),u=gft(o?.props,S,t);return{...n,...u,disabled:R?.[e.id]?R?.[e.id]?.disabled:l?.value||u?.disabled||!1,text:s?.text||"Menu Item",link:c}});return at(yht,{...a,items:i||[],moleculeId:t,buttonText:o?.text||"Open Menu",configurationItemInfo:J,buttonDisabled:R?.[t]?R?.[t]?.disabled:n?.value||a?.disabled||!1})}case"tabs":{const e=gft(z,S,G),r=l?.map(e=>{const t=M===e.id,{properties:r,config:o}=e||{},n={label:r?.label,link:r?.link},a=Object.keys(n),{label:i,link:s}=yft(n,D,a,t);return{...gft(o?.props,S,t),id:e.id,tabKey:d9e(s)?a9e(e9e,s?.internalLink):void 0,label:i?.text||"",link:s}}),o=c?.tabs.map(e=>{const{text:t,...r}=e;return{...r,label:t||""}}),n=Boolean(e?.isTabsSystemDerived),a=n?o:r,i=c?.activeTabKey||a?.[0]?.tabKey||"";return at(Vht,{...e,items:a||[],isMobile:v,moleculeId:t,activeTabKey:i,configurationItemInfo:J,onTabChange:_?void 0:({newTabKey:e,link:t})=>{n?c?.onTabChange?.(e):d9e(t)?O?.({link:t?.internalLink||""}):c9e(t?.externalLink)}})}case"divider":{const e=gft(z,S,G);return at(Spt,{moleculeId:t,configurationItemInfo:J,...e})}case"link":{const e={text:u?.text,link:u?.link},r=Object.keys(e),{text:o,link:n}=yft(e,D,r,G),a=n,i=gft(z,S,G);return at(fht,{moleculeId:t,...i,link:a,type:a?.type,src:ee?void 0:m9e(a,b)||"",text:o?.text||"",disabled:i?.disabled||K,configurationItemInfo:J})}case"data_driven_link":{const e={text:u?.text},r=Object.keys(e),{text:o}=yft(e,D,r,G),n=gft(z,S,G);return at(fht,{moleculeId:t,...n,text:o?.text||"",sourceDataModelField:q,disabled:n?.disabled||K,configurationItemInfo:J})}case"video":{const e={video:u?.video,coverImage:u?.coverImage},r=Object.keys(e),{video:o,coverImage:n}=yft(e,D,r,G),a=gft(z,S,G);return at(Wht,{...a,moleculeId:t,poster:n?.imageFile?.url,src:o?.videoSource??o?.videoFile?.url??"",configurationItemInfo:J})}case"badge":{const e=gft(z,S,G);return at(vrt,{...e,configurationItemInfo:J})}case"alert":{const e={text:u?.text,subText:u?.subText},t=Object.keys(e),{text:r,subText:o}=yft(e,D,t,G),n=gft(z,S,G);return at(yrt,{text:r?.text||"",subText:o?.text||"",...n,configurationItemInfo:J})}case"chip":{const e={text:u?.text},t=Object.keys(e),{text:r}=yft(e,D,t,G),o=gft(z,S,G);return at(Ort,{text:r?.text||"",...o,configurationItemInfo:J})}case"email_display_field":case"email_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(hht,{name:V,text:o?.text||"",placeholderText:n?.text||"",sourceDataModelField:q,required:a?.value,isDisplayOnly:"email_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,...l,configurationItemInfo:J})}case"phone_number_display_field":case"phone_number_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(Pht,{name:V,text:o?.text||"",required:a?.value,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,isDisplayOnly:"phone_number_display_field"===r,...l,configurationItemInfo:J})}case"numeric_display_field":case"numeric_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(xht,{name:V,text:o?.text||"",required:a?.value,isDisplayOnly:"numeric_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,...l,configurationItemInfo:J})}case"currency_display_field":case"currency_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(Nrt,{name:V,text:o?.text||"",required:a?.value,isDisplayOnly:"currency_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,...l,configurationItemInfo:J})}case"basic_text_display_field":case"basic_text_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(Crt,{name:V,text:o?.text||"",required:a?.value,isDisplayOnly:"basic_text_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,...l,configurationItemInfo:J})}case"rating_display_field":case"rating":{const e={text:u?.text,dataCapture:u?.dataCapture,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,required:n,requiredErrorText:a,validationErrorText:i}=yft(e,D,t,G),s=gft(z,S,G);return at(Eht,{name:V,text:o?.text||"",required:n?.value,requiredErrorText:a?.text,validationErrorText:i?.text,sourceDataModelField:q,isDisplayOnly:"rating_display_field"===r,...s,configurationItemInfo:J})}case"switch_display_field":case"switch":{const e={text:u?.text,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{text:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,o,G),l=gft(z,S,G);return at(Bht,{name:V,moleculeId:t,text:n?.text||"",required:a?.value,isDisplayOnly:"switch_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,sourceDataModelField:q,...l,configurationItemInfo:J})}case"slider_display_field":case"slider":{const e={text:u?.text,required:u?.required,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,required:n,requiredErrorText:a,validationErrorText:i,placeholderText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(Iht,{name:V,text:o?.text||"",required:n?.value,isDisplayOnly:"slider_display_field"===r,requiredErrorText:a?.text,validationErrorText:i?.text,placeholderText:s?.text,sourceDataModelField:q,...l,configurationItemInfo:J})}case"date_display_field":case"date_picker":{const e={text:u?.text,required:u?.required,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{text:n,required:a,placeholderText:i,requiredErrorText:s,validationErrorText:l}=yft(e,D,o,G),c=gft(z,S,G);return at(Gat,{dateAdapter:Unt,children:at(Mpt,{moleculeId:t,name:V,text:n?.text||"",required:a?.value,placeholderText:i?.text||"",isDisplayOnly:"date_display_field"===r,requiredErrorText:s?.text,validationErrorText:l?.text,sourceDataModelField:q,...c,configurationItemInfo:J})})}case"time_picker_display":case"time_picker":{const e={text:u?.text,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText,required:u?.required},t=Object.keys(e),{text:o,placeholderText:n,requiredErrorText:a,validationErrorText:i,required:s}=yft(e,D,t,G),l=gft(z,S,G);return at(Gat,{dateAdapter:Unt,children:at(qht,{...l,name:V,text:o?.text||"",placeholderText:n?.text||"",required:s?.value,requiredErrorText:a?.text,validationErrorText:i?.text,isDisplayOnly:"time_picker_display"===r,sourceDataModelField:q,configurationItemInfo:J})})}case"select_display_field":case"select":{const e={text:u?.text,required:u?.required,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,required:n,placeholderText:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G),c="select_display_field"===r;return at(Fht,{name:V,text:o?.text||"",required:n?.value,isDisplayOnly:c,predefinedValue:W,placeholderText:a?.text||"",requiredErrorText:i?.text,validationErrorText:s?.text,sourceDataModelField:q,...l,configurationItemInfo:J})}case"image":{const e={image:u?.image,link:u?.link},r=Object.keys(e),{image:o,link:n}=yft(e,D,r,G),a=gft(z,S,G);return at(Dpt,{...a,src:o?.imageSource||o?.imageFile?.url||o?.imageFile?.id||"",onClick:n?()=>d9e(n)?O?.({link:n?.internalLink||""}):c9e(n?.externalLink):void 0,moleculeId:t,configurationItemInfo:J,properties:{image:o,link:n}})}case"button":{const e={text:u?.text,action:u?.action},r=Object.keys(e),{text:o,action:n}=yft(e,D,r,G),a=gft(z,S,G);return at(pKe,{moleculeId:t,text:o?.text||"",sourceDataModelField:q,...a,disabled:a?.disabled||K,configurationItemInfo:J,properties:{text:o,action:n}})}case"avatar":{const e=gft(z,S,G);return at(grt,{...e,sourceDataModelField:q,configurationItemInfo:J})}case"drawer":{const e={text:u?.text,disabled:u?.disabled},r=Object.keys(e),{text:o,disabled:n}=yft(e,D,r,G),a=gft(z,S,G),i=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{};let a={},i=[];switch(e.type){case"menu_item":{const e=r;a={disabled:e?.disabled,text:e?.text,link:e?.link},i=Object.keys(a);break}case"text_item":{const e=r;a={text:e?.text},i=Object.keys(a);break}case"rich_text_item":{const e=r;a={text:e?.text},i=Object.keys(a);break}case"image_item":{const e=r;a={image:e?.image,alt:e?.alt,link:e?.link},i=Object.keys(a);break}default:a={},i=[]}const s=yft(a,D,i,t),l=gft(o?.props,S,t),c={...n,...l};switch(e.type){case"menu_item":return{...c,disabled:R?.[e.id]?R?.[e.id]?.disabled:s?.disabled?.value||l?.disabled||!1,text:s?.text?.text||"Menu Item",link:s?.link,sx:l?.sx||c.sx};case"text_item":return{...c,text:s?.text?.text||""};case"rich_text_item":return{...c,text:s?.text?.text||f5e};case"image_item":{const e=s?.image?.imageSource||s?.image?.imageFile?.url||"";return{...c,src:e,alt:s?.alt?.text||"Drawer image",link:s?.link}}default:return c}});return at(cht,{...a,items:i||[],moleculeId:t,buttonText:o?.text||a?.buttonText,buttonDisabled:R?.[t]?R?.[t]?.disabled:n?.value||a?.disabled||!1,configurationItemInfo:J})}case"speed_dial":{const e=gft(z,S,G),r=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{},a={link:r?.link,text:r?.text},i=Object.keys(a),s=yft(a,D,i,t),l=gft(o?.props,S,t);return{...n,config:{props:{...o?.props,...l,tooltipText:l?.tooltipText||""}},properties:{link:s?.link||r?.link,text:s?.text||r?.text}}});return at(Aht,{...e,items:r||[],moleculeId:t,configurationItemInfo:J})}case"checkbox":case"checkbox_display":{const e={label:u?.label,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{label:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,o,G),l=gft(z,S,G);return at(Srt,{name:V,moleculeId:t,label:n?.text||"",required:a?.value,requiredErrorText:i?.text,validationErrorText:s?.text,sourceDataModelField:q,isDisplayOnly:"checkbox_display"===r,...l,configurationItemInfo:J})}case"binary_radio_buttons":case"binary_radio_buttons_display":{const e={confirmText:u?.confirmText,rejectText:u?.rejectText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{confirmText:n,rejectText:a,required:i,requiredErrorText:s,validationErrorText:l}=yft(e,D,o,G),c=gft(z,S,G);return at(Mrt,{name:V,moleculeId:t,confirmText:n?.text||"Yes",rejectText:a?.text||"No",required:i?.value,requiredErrorText:s?.text,validationErrorText:l?.text,sourceDataModelField:q,isDisplayOnly:"binary_radio_buttons_display"===r,...c,configurationItemInfo:J})}case"date_calendar":case"date_calendar_display":{const e={required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{required:o,requiredErrorText:n,validationErrorText:a}=yft(e,D,t,G),i=gft(z,S,G);return at(nlt,{...i,name:V,required:o?.value,requiredErrorText:n?.text,validationErrorText:a?.text,isDisplayOnly:"date_calendar_display"===r,sourceDataModelField:q,configurationItemInfo:J})}default:return at(nt,{children:"There is no such type of molecule yet."})}})()},xft=({nestedPathSegments:t})=>{const{localStateObject:r}=IC(),o=ht();return e.useMemo(()=>{if(o?.itemDataByDmfId)return o.itemDataByDmfId;const e=(e=>{if(null!=e){if("object"==typeof e&&!Array.isArray(e)&&"viewType"in e&&"data"in e){const t=e.data;if(null==t)return;return t}return e}})(r);return void 0!==e?0===t.length||Array.isArray(e)?e:qGe(e,t):void 0},[o?.itemDataByDmfId,r,t])},bft=e=>"container"===e.instance&&"empty_state"===e.type,wft=e=>{if("container"!==e.instance)return;const t=e;return t.targetRwoId||t.config?.props?.targetRwoId},kft=(e,t)=>{if(!e)return!0;if(Array.isArray(e))return 0===e.length;return(e=>null==e||Array.isArray(e)&&0===e.length||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length)(e[t])},_ft=e.memo(({item:t,tabsProps:r,formData:o,setFormData:n,isMobile:a,parentId:i,nestedPathSegments:s=[],parentStyleVariantConfig:l,parentContainerWithVariantsId:c,parentContainerActiveVariant:u})=>{const d=Kt(),{organismMetadata:p}=IC(),h="items"in t?t.items:void 0,f=(({items:t})=>{const{stateConfig:r}=UC(),{localStateObject:o}=IC(),n=o||r;return e.useMemo(()=>t&&0!==t.length?t.filter(e=>{const t=e.config?.props?.visible??!0,r=n?.[e.id]?.visible??!0;return t&&r}):[],[t,n])})({items:h}),{filteredItems:m}=(({containerItems:t,visibleItems:r,nestedPathSegments:o})=>{const{isLoadingData:n,isEmptyDataState:a,forceEmptyStatePreview:i,previewingEmptyStates:s,isConfigurationMode:l}=IC(),c=xft({nestedPathSegments:o});return e.useMemo(()=>{if(!t||0===t.length)return{filteredItems:r,showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};const e=t.filter(bft);if(0===e.length)return{filteredItems:r,showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};const o=s&&s.length>0;if(l&&!i&&!o)return{filteredItems:r,showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};if(n&&!i&&!o)return{filteredItems:r.filter(e=>!bft(e)),showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};const u=new Set;let d=!1;return e.forEach(e=>{const t=wft(e);i||(t?s?.includes(t):s?.includes("__organism__"))?t?u.add(t):d=!0:l||(t?kft(c,t)&&u.add(t):a&&(d=!0))}),d||0!==u.size?{filteredItems:r.filter(e=>{if(bft(e)){const t=wft(e);return t?u.has(t):d}return!1}),showingEmptyStateForFields:u,showOrganismLevelEmptyState:d}:{filteredItems:r.filter(e=>!bft(e)),showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1}},[t,r,c,n,a,i,s,l])})({containerItems:h,visibleItems:f,nestedPathSegments:s});if("molecule"===t.instance)return at(mft,{additionalInfo:`molecule: ${t.id}`,children:at(vft,{...t,form:d,isMobile:a,formData:o,parentId:i,tabsProps:r,setFormData:n,metadata:{...t.metadata,stateListenerId:p?.stateListenerId||t.id},parentStyleVariantConfig:l,parentContainerWithVariantsId:c,parentContainerActiveVariant:u})});const y=!(!h||!h.length),g="form"===t.type&&t.config.props?.activeChildrenIds||[];return y?g.length?at(mft,{additionalInfo:`form: ${t.id}`,children:at(Nft,{item:t,activeChildrenIds:g,formData:o,setFormData:n,isMobile:a})}):at(mft,{additionalInfo:`container: ${t.id}`,children:at(jft,{...t,isMobile:a,nestedPathSegments:s,parentStyleVariantConfig:l,parentContainerWithVariantsId:c,parentContainerActiveVariant:u,config:t.config?{...t.config,props:t.config.props||{},wide:t.config.wide||{},compact:t.config.compact||{}}:{props:{},wide:{},compact:{}},children:m?.map(e=>at(_ft,{item:e,parentId:e.id,formData:o,setFormData:n,isMobile:a,tabsProps:r,nestedPathSegments:s},e.id))})}):null}),Cft=({order:t=0,id:r,formStepStyles:o,containerProps:n={hasOwnButton:!1}})=>{const a=Kt(),[i,s]=e.useState({}),{formId:l,submitHandler:c,isFormInEditMode:u,organismMetadata:d,organismInfo:p}=IC(),{groupStepItemsByStepContainer:h}=IC();Object.keys(d?.popupPayload??{})[0];const{currentStep:f,canGoToNextStep:m,canGoToPrevStep:y,goToNextStep:g,goToPrevStep:v,reset:x,setStep:b}=eo(),w=h(),{submitForm:k}=KGe(),{forms:_}=dt(),C=t+1,M=w.get(r)||[];return f!==C?null:at("div",{style:o,children:it(nt,{children:[M.map(e=>at(_ft,{item:e,setFormData:s,formData:i},e.id)),(!n?.hasOwnButton||d?.isFormInsidePopUp)&&u&&it("div",{style:{display:"flex",gap:"16px"},children:[at(pKe,{text:y?"Back":"Cancel",variant:"outlined",onClick:()=>{y?v():(x(),b(1))}}),at(pKe,{text:m?"Next":"Submit",variant:"contained",onClick:async()=>{const e=await a.trigger();if(!e)return void K6e({message:"Please fill all required fields",type:"error"});if(m)return void g();const t=a?.getValues?.()||{};if(e&&l){const e={formId:l,data:t,pmiObjectId:p?.pmiObjectId};c?await c(e):_?.submit&&await k(e)}}})]})]})})},Mft=e=>Object.entries(e).reduce((e,[t,r])=>(e[t]=(e=>e&&"object"==typeof e&&"value"in e&&!Array.isArray(e)?e.value:e)(r),e),{}),Sft=(e,t)=>{if(!e?.enabled)return null;const r="data_model"===(e.nature||(e.sourceDataModelFieldId?"data_model":"variable"))?e.sourceDataModelFieldId:e.variableName;if(!r)return null;if(!t)return null;const o=t[r];if(null==o)return null;let n=null;if("string"==typeof o)n=o;else if("object"==typeof o&&null!==o){const e=o;void 0!==e.id&&null!==e.id&&"string"==typeof e.id?n=e.id:void 0!==e.value&&null!==e.value&&(n=String(e.value))}return n},Dft=(e,t,r)=>{if(!e)return{};if(t){const o=e[t];if(o&&"object"==typeof o&&r in o){const e=o[r];if(e&&"object"==typeof e){const{containerStyle:t}=e;return t&&"object"==typeof t?t:e}}}const o=e[r];if(o&&"object"==typeof o){const{containerStyle:e}=o;return e&&"object"==typeof e?e:o}return{}},Oft=e.memo(({containerId:t,targetRwoId:r,sourceDataPointerId:o,nestedPathSegments:n=[],children:a,properties:i,config:s,renderWrapper:l})=>{const{formId:c}=IC(),u=KC(),d=ht(),p=BC(),h=HGe(),f=o&&u?.queryResults?u.queryResults[o]?.isLoading??u.isSingleRecordLoading??!1:u?.isSingleRecordLoading??!1,m=i?.styleVariantConfig||s?.styleVariantConfig,y=e.useMemo(()=>{if(!m)return"";return"data_model"===(m.nature||(m.sourceDataModelFieldId?"data_model":"variable"))?m.sourceDataModelFieldId||"":m.variableName||""},[m]),g=y?VGe(y):void 0;if(Boolean(c&&p)&&p){const{fieldArrayMethods:{fields:e}}=p;return at(nt,{children:e.map((e,o)=>{const i=[...n,{dmfId:r||"default",index:o}],s=e;let c=s;"variable"===(m?.nature||(m?.sourceDataModelFieldId?"data_model":"variable"))&&y&&void 0!==g&&(c={...s,[y]:g});const u=Sft(m,c),d={containerId:t||`replicator-${r||"default"}-${o}`,nestedPathSegments:i,itemIndex:o,itemDataByDmfId:s,rawItemDataByDmfId:s,activeVariant:u,isLoading:f},p=l?l(o,a,u):a;return at("div",{"data-replicator-instance":`${r||"default"}-${o}`,children:at(ft,{value:d,children:p})},e.id)})})}if(f)return at(nt,{children:Array.from({length:3}).map((e,o)=>{const i=[...n,{dmfId:r||"default",index:o}];return at(ft,{value:{containerId:t||`replicator-${r||"default"}-${o}`,nestedPathSegments:i,itemIndex:o,itemDataByDmfId:{},rawItemDataByDmfId:{},activeVariant:null,isLoading:f},children:l?l(o,a,null):a},`${r||"default"}-loading-${o}`)})});const v=o?h(o):void 0,x=o?v??{}:{},b=qGe(x,n),w=o?b||x:d?.itemDataByDmfId?d.itemDataByDmfId:b,k=r?w?.[r]:w;if(!k||"object"!=typeof k){const e=r?[...n,{dmfId:r}]:n;return at(ft,{value:{containerId:t||`replicator-${r||"default"}`,nestedPathSegments:e,itemDataByDmfId:{},activeVariant:null,isLoading:!1},children:l?l(void 0,a,null):a})}if(Array.isArray(k))return at(nt,{children:k.map((e,o)=>{const i=[...n,{dmfId:r||"default",index:o}],s=Mft(e);let c=e;"variable"===(m?.nature||(m?.sourceDataModelFieldId?"data_model":"variable"))&&y&&void 0!==g&&(c={...c,[y]:g});const u=Sft(m,c);return at(ft,{value:{containerId:t||`replicator-${r||"default"}-${o}`,nestedPathSegments:i,itemIndex:o,itemDataByDmfId:s,rawItemDataByDmfId:e,activeVariant:u,isLoading:f},children:l?l(o,a,u):a},`${r||"default"}-${o}`)})});const _=r?[...n,{dmfId:r}]:n,C=Mft(k);let M=k;"variable"===(m?.nature||(m?.sourceDataModelFieldId?"data_model":"variable"))&&y&&void 0!==g&&(M={...M,[y]:g});const S=Sft(m,M);return at(ft,{value:{containerId:t||`replicator-${r||"default"}`,nestedPathSegments:_,itemDataByDmfId:C,rawItemDataByDmfId:k,activeVariant:S,isLoading:f},children:l?l(void 0,a,S):a})}),Pft=({targetRwoId:t,nestedPathSegments:r=[],minInstances:o=1,maxInstances:n=50,children:a})=>{const i=Kt(),{control:s,getValues:c}=i||{},u=HC(),{prefillData:d}=IC(),p=e.useRef(!1),h=r.map(e=>void 0!==e.index?`${e.dmfId}.${e.index}`:e.dmfId).filter(Boolean).join(".");const f=h?`${h}.${t}`:t,m=function(e){const t=Kt(),{control:r=t.control,name:o,keyName:n="id",shouldUnregister:a,rules:i}=e,[s,c]=l.default.useState(r._getFieldArray(o)),u=l.default.useRef(r._getFieldArray(o).map(Vr)),d=l.default.useRef(s),p=l.default.useRef(o),h=l.default.useRef(!1);p.current=o,d.current=s,r._names.array.add(o),i&&r.register(o,i),Xt(()=>r._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===p.current||!t){const t=Pt(e,p.current);Array.isArray(t)&&(c(t),u.current=t.map(Vr))}}}).unsubscribe,[r]);const f=l.default.useCallback(e=>{h.current=!0,r._setFieldArray(o,e)},[r,o]);return l.default.useEffect(()=>{if(r._state.action=!1,jr(o,r._names)&&r._subjects.state.next({...r._formState}),h.current&&(!Or(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Or(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([o]).then(e=>{const t=Pt(e.errors,o),n=Pt(r._formState.errors,o);(n?!t&&n.type||t&&(n.type!==t.type||n.message!==t.message):t&&t.type)&&(t?jt(r._formState.errors,o,t):fr(r._formState.errors,o),r._subjects.state.next({errors:r._formState.errors}))});else{const e=Pt(r._fields,o);!e||!e._f||Or(r._options.reValidateMode).isOnSubmit&&Or(r._options.mode).isOnSubmit||zr(e,r._names.disabled,r._formValues,r._options.criteriaMode===Lt,r._options.shouldUseNativeValidation,!0).then(e=>!sr(e)&&r._subjects.state.next({errors:Rr(r._formState.errors,e,o)}))}r._subjects.state.next({name:o,values:Ct(r._formValues)}),r._names.focus&&Tr(r._fields,(e,t)=>{if(r._names.focus&&t.startsWith(r._names.focus)&&e.focus)return e.focus(),1}),r._names.focus="",r._setValid(),h.current=!1},[s,o,r]),l.default.useEffect(()=>(!Pt(r._formValues,o)&&r._setFieldArray(o),()=>{r._options.shouldUnregister||a?r.unregister(o):((e,t)=>{const o=Pt(r._fields,e);o&&o._f&&(o._f.mount=t)})(o,!1)}),[o,r,n,a]),{swap:l.default.useCallback((e,t)=>{const n=r._getFieldArray(o);Yr(n,e,t),Yr(u.current,e,t),f(n),c(n),r._setFieldArray(o,n,Yr,{argA:e,argB:t},!1)},[f,o,r]),move:l.default.useCallback((e,t)=>{const n=r._getFieldArray(o);Ur(n,e,t),Ur(u.current,e,t),f(n),c(n),r._setFieldArray(o,n,Ur,{argA:e,argB:t},!1)},[f,o,r]),prepend:l.default.useCallback((e,t)=>{const n=or(Ct(e)),a=Gr(r._getFieldArray(o),n);r._names.focus=$r(o,0,t),u.current=Gr(u.current,n.map(Vr)),f(a),c(a),r._setFieldArray(o,a,Gr,{argA:qr(e)})},[f,o,r]),append:l.default.useCallback((e,t)=>{const n=or(Ct(e)),a=Hr(r._getFieldArray(o),n);r._names.focus=$r(o,a.length-1,t),u.current=Hr(u.current,n.map(Vr)),f(a),c(a),r._setFieldArray(o,a,Hr,{argA:qr(e)})},[f,o,r]),remove:l.default.useCallback(e=>{const t=Kr(r._getFieldArray(o),e);u.current=Kr(u.current,e),f(t),c(t),!Array.isArray(Pt(r._fields,o))&&jt(r._fields,o,void 0),r._setFieldArray(o,t,Kr,{argA:e})},[f,o,r]),insert:l.default.useCallback((e,t,n)=>{const a=or(Ct(t)),i=Wr(r._getFieldArray(o),e,a);r._names.focus=$r(o,e,n),u.current=Wr(u.current,e,a.map(Vr)),f(i),c(i),r._setFieldArray(o,i,Wr,{argA:e,argB:qr(t)})},[f,o,r]),update:l.default.useCallback((e,t)=>{const n=Ct(t),a=Zr(r._getFieldArray(o),e,n);u.current=[...a].map((t,r)=>t&&r!==e?u.current[r]:Vr()),f(a),c([...a]),r._setFieldArray(o,a,Zr,{argA:e,argB:n},!0,!1)},[f,o,r]),replace:l.default.useCallback(e=>{const t=or(Ct(e));u.current=t.map(Vr),f([...t]),c([...t]),r._setFieldArray(o,[...t],e=>e,{},!0,!1)},[f,o,r]),fields:l.default.useMemo(()=>s.map((e,t)=>({...e,[n]:u.current[t]||Vr()})),[s,n])}}({control:s,name:f}),{fields:y,append:g,replace:v}=m,x=d?.[t],b=Array.isArray(x)&&x.length>0;return e.useEffect(()=>{if(p.current)return;p.current=!0;const e=c?.(f),t=Array.isArray(e)&&e.length>0;if(!(b||t||y.length>0)&&o>0){Array.from({length:o},()=>({})).forEach(e=>{g(e,{shouldFocus:!1})})}},[]),e.useEffect(()=>{b&&y.length!==x.length&&v(x)},[b,x,y.length,v]),e.useEffect(()=>{if(u)return u.register({targetRwoId:t,fieldArrayName:f,fieldArrayMethods:m,minInstances:o,maxInstances:n}),()=>{u.unregister(t)}},[u,t,f,m,o,n]),at(VC,{targetRwoId:t,fieldArrayName:f,fieldArrayMethods:m,minInstances:o,maxInstances:n,children:a})},Eft={dots:!0,infinite:!1,autoplay:!1,autoplaySpeed:5e3,arrows:!0,slidesToShow:1,slidesToScroll:1,adaptiveHeight:!0,swipeToSlide:!0},jft=e.memo(({id:t,type:r,name:o,config:n,children:a,metadata:i,isMobile:s,properties:l,nestedPathSegments:c=[],targetRwoId:u,sourceDataPointerId:d,parentStyleVariantConfig:p,parentContainerWithVariantsId:h,parentContainerActiveVariant:f})=>{const m=Ye(),{props:y,wide:g,compact:v}=n||{},x=u||y?.targetRwoId,b=d||y?.sourceDataPointerId,{isConfigurationMode:w,onConfigurationItemClicked:k,selectedConfigurationItemId:_,currentStyleProperties:C,currentContentProperties:M,formId:S,localState:D,organismInfo:O}=IC(),P=ht(),{activeVariant:E,containerId:j}=P,T=Kt(),N=Boolean(S&&T),R=e.useMemo(()=>{if("replicator"===r)return;const e=l?.styleVariantConfig,t=e&&"object"==typeof e&&"data"in e?e.data:e;if(!t?.enabled)return;return("data_model"===(t.nature||(t.sourceDataModelFieldId?"data_model":"variable"))?Boolean(t.sourceDataModelFieldId):Boolean(t.variableName))?t:void 0},[r,l]),F=e.useMemo(()=>{if(!R)return"";return"data_model"===(R.nature||(R.sourceDataModelFieldId?"data_model":"variable"))?R.sourceDataModelFieldId||"":R.variableName||""},[R]),I=e.useMemo(()=>{if(!F)return"";if(!N)return"";return"data_model"!==(R?.nature||(R?.sourceDataModelFieldId?"data_model":"variable"))?"":(e=P.nestedPathSegments||c,t=F,e&&0!==e.length?[...e.map(e=>void 0!==e.index?`${e.dmfId}.${e.index}`:e.dmfId),t].filter(Boolean).join("."):t);var e,t},[F,R?.nature,R?.sourceDataModelFieldId,N,P.nestedPathSegments,c]);I&&T?.watch?.(I);const A=VGe(F);F&&R?.enabled&&console.log("[Container] Resolving variant:",{variantSourceField:F,resolvedContainerVariantValue:A,containerStyleVariantConfig:R});const z=e.useMemo(()=>{if(!F||!R)return null;if(null!=A){let e=null;if("string"==typeof A||"number"==typeof A)e={id:String(A),value:A};else if(A&&"object"==typeof A){const t=A,r=t.value??null,o=void 0!==t.id&&null!==t.id?String(t.id):null!==r?String(r):null;null!==o&&(e={id:o,value:r})}if(!e)return null;const t=Sft(R,{[F]:e});if(t)return t}return null},[R,F,A]),L=p,B=z??(f??E??null),V=(R&&R.enabled?t:h)||j||null,$=e.useMemo(()=>{const r=R&&R.enabled,o=r?R:L,n=B,i=(r?t:h)||t;return void 0!==o||null!==n||void 0!==h?e.Children.map(a,t=>e.isValidElement(t)?e.cloneElement(t,{...t.props,parentStyleVariantConfig:o,parentContainerWithVariantsId:i,parentContainerActiveVariant:n}):t):a},[a,R,B,L,t,h]),H=_===t,q=H?{backgroundImage:M?.backgroundImage??l?.backgroundImage??{imageFile:{url:""}}}:l,{containerProps:W={},containerStyle:U={}}=g||{};let G={...U};const{containerProps:K={},containerStyle:Y={}}=v||{};let Z={...Y};C&&H&&(Z={...Y,...C},G={...U,...C});const X=PC("xs"),Q=s??X;let J=Q?Z:G;if(B&&n){const e=Dft(n,B,Q?"compact":"wide");Object.keys(e).length>0&&(J={...J,...e})}const ee=Q?K:W,te={...y,...ee,enableBackgroundImage:J?.enableBackgroundImage},re=e.useMemo(()=>({entityId:t,entityType:r,entityName:o,entity:"container",organismType:O?.type,organismSubtype:O?.subtype,libraryEntityId:i?.containerLibraryId||void 0,activeStyleVariant:B,parentReplicatorWithVariants:V,parentStyleVariantConfig:R&&R.enabled?R:L}),[r,o,t,i,B,V,R,L]),oe=w?{onClick:e=>{e&&e.stopPropagation(),k(re,!1)},onDoubleClick:e=>{e?.stopPropagation(),k(re,!0)}}:{},ne=`${t}.${Q?"mobile":"desktop"}`,ae=_o`
|
|
1034
|
+
`,Ght=({width:e="100%",height:t,fontSize:r="16px",marginLeft:o="0",marginTop:n="0",marginRight:a="0",marginBottom:i="0",sx:s})=>at(Hb,{variant:"text",animation:"wave",sx:{width:e,height:t||("number"==typeof r?1.5*r+"px":"24px"),marginLeft:o,marginTop:n,marginRight:a,marginBottom:i,...s}}),Kht=Ght,Yht=({text:e,width:t,height:r,fontSize:o="16px",borderColor:n="#ccc",backgroundColor:a,marginLeft:i="0",marginTop:s="0",marginRight:l="0",marginBottom:c="0",paddingLeft:u,paddingTop:d,paddingRight:p,paddingBottom:h,sx:f})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:i,marginTop:s,marginRight:l,marginBottom:c,width:t||"fit-content",...f},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"150px",height:(()=>{if(r)return r;const e="number"==typeof o?o:parseInt(o,10);return Number.isNaN(e)?"32px":`${Math.round(1.2*e+16)}px`})(),borderRadius:"4px",backgroundColor:a,border:`1px solid ${n}`}})]}),Zht=Yht,Xht=Yht,Qht=Yht,Jht=Yht,eft=({text:e,width:t,height:r,borderColor:o="#ccc",backgroundColor:n,marginLeft:a="0",marginTop:i="0",marginRight:s="0",marginBottom:l="0",paddingLeft:c,paddingTop:u,paddingRight:d,paddingBottom:p,sx:h})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:a,marginTop:i,marginRight:s,marginBottom:l,width:t||"fit-content",...h},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"80px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"180px",height:r||"32px",borderRadius:"4px",backgroundColor:n,border:`1px solid ${o}`}})]}),tft=({text:e,maxValue:t=5,marginLeft:r="0",marginTop:o="0",marginRight:n="0",marginBottom:a="0",sx:i})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:r,marginTop:o,marginRight:n,marginBottom:a,...i},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"80px",height:"20px",marginBottom:"4px"}}),at(Zf,{sx:{display:"flex",gap:"4px"},children:Array.from({length:t}).map((e,t)=>at(Hb,{variant:"circular",animation:"wave",sx:{width:"24px",height:"24px"}},t))})]}),rft=({text:e,marginLeft:t="0",marginTop:r="0",marginRight:o="0",marginBottom:n="0",sx:a})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:t,marginTop:r,marginRight:o,marginBottom:n,...a},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"16px",marginBottom:"8px"}}),it(Zf,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[at(Hb,{variant:"rounded",animation:"wave",sx:{width:"42px",height:"26px",borderRadius:"13px"}}),at(Hb,{variant:"text",animation:"wave",sx:{width:"30px",height:"16px"}})]})]}),oft=({text:e,width:t,orientation:r="horizontal",marginLeft:o="0",marginTop:n="0",marginRight:a="0",marginBottom:i="0",sx:s})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:o,marginTop:n,marginRight:a,marginBottom:i,width:t||"200px",...s},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"16px",marginBottom:"8px"}}),it(Zf,{sx:{display:"flex",alignItems:"center",flexDirection:"vertical"===r?"column":"row",gap:"8px"},children:[at(Hb,{variant:"rounded",animation:"wave",sx:{width:"horizontal"===r?"100%":"4px",height:"horizontal"===r?"4px":"100px",borderRadius:"2px"}}),at(Hb,{variant:"text",animation:"wave",sx:{width:"24px",height:"16px"}})]})]}),nft=({text:e,width:t,height:r,borderColor:o="#ced4da",backgroundColor:n,marginLeft:a="0",marginTop:i="0",marginRight:s="0",marginBottom:l="0",sx:c})=>it(Zf,{sx:{display:"inline-flex",flexDirection:"column",marginLeft:a,marginTop:i,marginRight:s,marginBottom:l,width:t||"fit-content",...c},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"120px",height:r||"32px",borderRadius:"4px",backgroundColor:n,border:`1px solid ${o}`}})]}),aft=({text:e,width:t,height:r,borderColor:o="#ced4da",marginLeft:n="0",marginTop:a="0",marginRight:i="0",marginBottom:s="0",sx:l})=>it(Zf,{sx:{marginLeft:n,marginTop:a,marginRight:i,marginBottom:s,width:t||"fit-content",...l},children:[e&&at(Hb,{variant:"text",animation:"wave",sx:{width:"60px",height:"14px",marginBottom:"4px"}}),at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||"100px",height:r||"32px",borderRadius:"4px",border:`1px solid ${o}`}})]}),ift=({width:e,height:t,marginLeft:r="0",marginTop:o="0",marginRight:n="0",marginBottom:a="0",sx:i})=>it(Zf,{sx:{marginLeft:r,marginTop:o,marginRight:n,marginBottom:a,width:e||"320px",...i},children:[at(Hb,{variant:"rectangular",animation:"wave",sx:{width:"100%",height:"48px",borderRadius:"8px 8px 0 0",marginBottom:"8px"}}),at(Zf,{sx:{display:"flex",justifyContent:"space-between",marginBottom:"8px"},children:Array.from({length:7}).map((e,t)=>at(Hb,{variant:"circular",animation:"wave",sx:{width:"32px",height:"24px"}},t))}),Array.from({length:6}).map((e,t)=>at(Zf,{sx:{display:"flex",justifyContent:"space-between",marginBottom:"4px"},children:Array.from({length:7}).map((e,t)=>at(Hb,{variant:"circular",animation:"wave",sx:{width:"32px",height:"32px"}},t))},t))]}),sft=({text:e,subText:t,width:r,height:o,backgroundColor:n,marginLeft:a="0",marginTop:i="0",marginRight:s="0",marginBottom:l="0",sx:c})=>at(Hb,{variant:"rounded",animation:"wave",sx:{width:r||"100%",height:o||(e&&t?"72px":"48px"),borderRadius:"4px",marginLeft:a,marginTop:i,marginRight:s,marginBottom:l,backgroundColor:n,...c}}),lft=({size:e=24,marginLeft:t="0",marginTop:r="0",marginRight:o="0",marginBottom:n="0",sx:a})=>it(Zf,{sx:{position:"relative",display:"inline-flex",marginLeft:t,marginTop:r,marginRight:o,marginBottom:n,...a},children:[at(Hb,{variant:"circular",animation:"wave",sx:{width:e,height:e}}),at(Hb,{variant:"circular",animation:"wave",sx:{position:"absolute",top:-4,right:-4,width:16,height:16}})]}),cft=({size:e="medium",width:t,backgroundColor:r,marginLeft:o="0",marginTop:n="0",marginRight:a="0",marginBottom:i="0",sx:s})=>at(Hb,{variant:"rounded",animation:"wave",sx:{width:t||("small"===e?"60px":"80px"),height:"small"===e?"24px":"32px",borderRadius:"16px",marginLeft:o,marginTop:n,marginRight:a,marginBottom:i,backgroundColor:r,...s}}),uft=({width:e,fontSize:t="14px",marginLeft:r="0",marginTop:o="0",marginRight:n="0",marginBottom:a="0",sx:i})=>at(Hb,{variant:"text",animation:"wave",sx:{width:e||"100px",height:"number"==typeof t?1.2*t+"px":"18px",marginLeft:r,marginTop:o,marginRight:n,marginBottom:a,...i}}),dft=({size:e=40,marginLeft:t="0",marginTop:r="0",marginRight:o="0",marginBottom:n="0",sx:a})=>at(Hb,{variant:"circular",animation:"wave",sx:{width:e,height:e,marginLeft:t,marginTop:r,marginRight:o,marginBottom:n,...a}}),pft=["simple_text","text","basic_text_display_field","email_display_field","phone_number_display_field","numeric_display_field","currency_display_field","select_display_field","rating_display_field","switch_display_field","slider_display_field","date_display_field","time_picker_display","date_calendar_display","alert","badge","chip","link","avatar"],hft=e=>pft.includes(e),fft=({type:e,props:t={}})=>{const r={width:t.width,height:t.height,marginLeft:t.marginLeft||"0",marginTop:t.marginTop||"0",marginRight:t.marginRight||"0",marginBottom:t.marginBottom||"0",sx:t.sx};switch(e){case"simple_text":case"text":return at(Ght,{...r,fontSize:t.fontSize});case"basic_text_display_field":return at(Yht,{...r,text:t.text,fontSize:t.fontSize,borderColor:t.borderColor,backgroundColor:t.backgroundColor,paddingLeft:t.paddingLeft,paddingTop:t.paddingTop,paddingRight:t.paddingRight,paddingBottom:t.paddingBottom});case"email_display_field":return at(Zht,{...r,text:t.text,borderColor:t.borderColor});case"phone_number_display_field":return at(Xht,{...r,text:t.text,borderColor:t.borderColor});case"numeric_display_field":return at(Qht,{...r,text:t.text,borderColor:t.borderColor});case"currency_display_field":return at(Jht,{...r,text:t.text,borderColor:t.borderColor});case"select_display_field":return at(eft,{...r,text:t.text,borderColor:t.borderColor});case"rating_display_field":return at(tft,{...r,text:t.text,maxValue:t.maxValue});case"switch_display_field":return at(rft,{...r,text:t.text});case"slider_display_field":return at(oft,{...r,text:t.text,orientation:t.orientation});case"date_display_field":return at(nft,{...r,text:t.text,borderColor:t.borderColor});case"time_picker_display":return at(aft,{...r,text:t.text,borderColor:t.borderColor});case"date_calendar_display":return at(ift,{...r});case"alert":return at(sft,{...r,text:t.text,subText:t.subText,backgroundColor:t.backgroundColor});case"badge":return at(lft,{...r,size:t.size});case"chip":return at(cft,{...r,size:t.size,backgroundColor:t.backgroundColor});case"link":return at(uft,{...r,fontSize:t.fontSize});case"avatar":return at(dft,{...r,size:t.size});default:return at(Hb,{variant:"rounded",animation:"wave",sx:{width:r.width||"100%",height:r.height||"40px",marginLeft:r.marginLeft,marginTop:r.marginTop,marginRight:r.marginRight,marginBottom:r.marginBottom,...r.sx}})}},mft=({children:e,additionalInfo:t})=>{try{return at(nt,{children:e})}catch(r){return console.error(`Render error in SafeRender - ${t} :`,r),at("div",{style:{color:"red",padding:24},children:"Render Error"})}};function yft(e,t,r,o){const n={...e};return 0===r.length?{...e,...t}:(t&&o&&r.forEach(e=>{void 0!==t[e]&&(n[e]=t[e])}),n)}function gft(e,t,r=!1){return t&&r?xn(e,t):e}const vft=({id:t,type:r,name:o,form:n,config:a,formData:i,isMobile:s,children:l,tabsProps:c,properties:u,moleculeLibraryId:d,organismLibraryMoleculeId:p,parentStyleVariantConfig:h,parentContainerWithVariantsId:f,parentContainerActiveVariant:m})=>{const y=Ye(),g=PC("xs"),v=s||g,{formId:x,isPreview:b=!1,validations:w,submitHandler:k,isConfigurationMode:_,onConfigurationItemClicked:C,selectedConfigurationItemId:M,currentStyleProperties:S,currentContentProperties:D,onInternalNavigation:O,organismMetadata:P,organismInfo:E,localState:j}=IC(),{stateConfig:T}=UC(),N=KC(),R=T,F=ht(),I=F?.isLoading??N?.isSingleRecordLoading??!1,A=m??F.activeVariant,z=e.useMemo(()=>((e,t)=>{if(!e)return{};if(t){const r=e[t];if(r&&"object"==typeof r&&"props"in r){const e=r.props;if(e&&"object"==typeof e)return e}}return e.props||{}})(a,A??null),[a,A]),L=u?.dataCapture,B=a?.props?.dataCaptureName||L?.dataCaptureName||L?.variableName||t,V=e.useMemo(()=>{return x&&F?.nestedPathSegments?.length?(e=F.nestedPathSegments,t=B,e&&0!==e.length?[...e.map(e=>void 0!==e.index?`${e.dmfId}.${e.index}`:e.dmfId),t].filter(Boolean).join("."):t):B;var e,t},[x,F?.nestedPathSegments,B]),$=u?.dataCapture,H=$?.nature?.toString().replace(/-/g,"_").toLowerCase()??"",q="variable"===H&&$?.variableName||$?.sourceDataModelFieldId,W=$?.predefinedValue,U=!$?.isIgnored&&("variable"===H&&Boolean($?.variableName)||"data_model"===H&&Boolean($?.sourceDataModelFieldId)),G=M===t,{isStateDisabled:K,isStateVisible:Y}=(({stateListenerId:e})=>{const{localStateObject:t}=IC(),{stateConfig:r}=UC(),o=t||r;let n=!0,a=!1;if(!e)return{isStateDisabled:a,isStateVisible:n};const i=o?.[e]||{},{visible:s=!0,disabled:l=!1}=i||{};return e in o&&(n=Boolean(s),a=Boolean(l)),{isStateDisabled:a,isStateVisible:n,stateValue:i}})({stateListenerId:t}),Z=e.useMemo(()=>({entityType:r,entity:"molecule",entityName:o,entityId:t,organismType:E?.type,organismSubtype:E?.subtype,organismLibraryMoleculeId:p,libraryEntityId:d,activeStyleVariant:A,parentReplicatorWithVariants:f||F.containerId||null,parentStyleVariantConfig:h||void 0}),[r,o,t,p,d,A,F.containerId,f,h]),X=e.useCallback(e=>{e?.stopPropagation(),C(Z,!1)},[C,Z]),Q=e.useCallback(e=>{e?.stopPropagation(),C(Z,!0)},[C,Z]),J=_?{onClick:X,onDoubleClick:Q,"data-configuration-id":t,css:hrt({theme:y,selected:G})}:{},ee=_||K;if(!Y)return null;if(I&&(hft(r)||U)){const e={width:z.width,height:z.height,marginLeft:z.marginLeft||"0",marginTop:z.marginTop||"0",marginRight:z.marginRight||"0",marginBottom:z.marginBottom||"0",paddingLeft:z.paddingLeft,paddingTop:z.paddingTop,paddingRight:z.paddingRight,paddingBottom:z.paddingBottom,fontSize:z.fontSize,borderColor:z.borderColor,backgroundColor:z.backgroundColor,size:z.size,text:u?.text?.text,subText:u?.subText?.text,maxValue:z.maxValue,orientation:z.orientation,sx:z.sx};return at(fft,{type:r,props:e})}return(()=>{switch(r){case"simple_text":{const e={text:u?.text},r=["text"],{text:o}=yft(e,D,r,G),n=gft(z,S,G);return at(Ept,{...n,text:o?.text||"",htmlElementId:t,configurationsItemInfo:J})}case"text":{const e={text:u?.text},r=Object.keys(e),{text:o}=yft(e,D,r,G),n=gft(z,S,G);return at(Ppt,{...o,...n,htmlElementId:t,configurationItemInfo:J})}case"consent":{const e=yft(u,D,[],G),r=gft(z,S,G)||{};return at(Prt,{...r,htmlElementId:t,properties:e,configurationItemInfo:J})}case"signup_password_fields":{const e={text:u?.text,subText:u?.subText,placeholderText:u?.placeholderText,subPlaceholderText:u?.subPlaceholderText,validationText:u?.validationText},r=Object.keys(e),o=yft(e,D,r,G),{state:n,gap:i,...s}=gft(a?.props,S,G);return at(_ht,{gap:i,inputProps:s,validations:w||[],htmlElementId:t,validationState:n,overridesProperties:o,configurationItemInfo:J})}case"stepper":{const e=gft(z,S,G),r=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{},a={title:r?.title,subText:r?.subText},i=Object.keys(a),{title:s,subText:l}=yft(a,D,i,t);return{...n,...gft(o?.props,S,t),title:s?.text||"",subText:l?.text||""}});return at(zht,{...e,items:r||[],isMobile:v,moleculeId:t,configurationItemInfo:J})}case"checklist":{const e=gft(z,S,G)||{},r=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{};switch(e.type){case"checklist_item":{const a={label:r?.label,objectState:r?.objectState},i=Object.keys(a),s=yft(a,D,i,t),l=gft(o?.props,S,t)||{},c=s.label?.text||"",u=!!s.objectState?.pmiObjectId;return{...n,...l,type:"checklist_item",label:c,textColor:l.textColor||"#000",fontSize:l.fontSize||"14px",fontFamily:l.fontFamily||"inherit",fontWeight:l.fontWeight||"normal",textAlign:l.textAlign||"left",isSystemDriven:u,disabled:u,interacted:R?.[e.id]?.interacted||"unchecked"}}case"divider_item":{const e=gft(o?.props,S,t)||{};return{...n,...e,type:"divider_item"}}case"text_item":{const e={text:r?.text},a=Object.keys(e),i=yft(e,D,a,t),s=gft(o?.props,S,t)||{},l=i.text?.text||"";return{...n,...s,type:"text_item",text:l}}case"rich_text_item":{const e={text:r?.text},a=Object.keys(e),i=yft(e,D,a,t),s=gft(o?.props,S,t)||{},l=i.text?.text||f5e;return{...n,...s,type:"rich_text_item",text:l}}default:return{...n,type:e.type}}});return at(Drt,{...e,items:r||[],moleculeId:t,configurationItemInfo:J})}case"accordion":{const e=gft(z,S,G),r=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{},a={text:r?.text,subText:r?.subText,bodyText:r?.bodyText},i=Object.keys(a),{text:s,subText:l,bodyText:c}=yft(a,D,i,t);return{...n,...gft(o?.props,S,t),text:s?.text||"",subText:l?.text||"",bodyText:c?.text||""}});return at(mrt,{...e,items:r||[],moleculeId:t,configurationItemInfo:J})}case"menu":{const e={text:u?.text,disabled:u?.disabled},r=Object.keys(e),{text:o,disabled:n}=yft(e,D,r,G),a=gft(z,S,G),i=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{},a={disabled:r&&"disabled"in r?r.disabled:void 0,text:r&&"text"in r?r.text:void 0,link:r&&"link"in r?r.link:void 0},i=Object.keys(a),{text:s,disabled:l,link:c}=yft(a,D,i,t),u=gft(o?.props,S,t);return{...n,...u,disabled:R?.[e.id]?R?.[e.id]?.disabled:l?.value||u?.disabled||!1,text:s?.text||"Menu Item",link:c}});return at(yht,{...a,items:i||[],moleculeId:t,buttonText:o?.text||"Open Menu",configurationItemInfo:J,buttonDisabled:R?.[t]?R?.[t]?.disabled:n?.value||a?.disabled||!1})}case"tabs":{const e=gft(z,S,G),r=l?.map(e=>{const t=M===e.id,{properties:r,config:o}=e||{},n={label:r?.label,link:r?.link},a=Object.keys(n),{label:i,link:s}=yft(n,D,a,t);return{...gft(o?.props,S,t),id:e.id,tabKey:d9e(s)?a9e(e9e,s?.internalLink):void 0,label:i?.text||"",link:s}}),o=c?.tabs.map(e=>{const{text:t,...r}=e;return{...r,label:t||""}}),n=Boolean(e?.isTabsSystemDerived),a=n?o:r,i=c?.activeTabKey||a?.[0]?.tabKey||"";return at(Vht,{...e,items:a||[],isMobile:v,moleculeId:t,activeTabKey:i,configurationItemInfo:J,onTabChange:_?void 0:({newTabKey:e,link:t})=>{n?c?.onTabChange?.(e):d9e(t)?O?.({link:t?.internalLink||""}):c9e(t?.externalLink)}})}case"divider":{const e=gft(z,S,G);return at(Spt,{moleculeId:t,configurationItemInfo:J,...e})}case"link":{const e={text:u?.text,link:u?.link},r=Object.keys(e),{text:o,link:n}=yft(e,D,r,G),a=n,i=gft(z,S,G);return at(fht,{moleculeId:t,...i,link:a,type:a?.type,src:ee?void 0:m9e(a,b)||"",text:o?.text||"",disabled:i?.disabled||K,configurationItemInfo:J})}case"data_driven_link":{const e={text:u?.text},r=Object.keys(e),{text:o}=yft(e,D,r,G),n=gft(z,S,G);return at(fht,{moleculeId:t,...n,text:o?.text||"",sourceDataModelField:q,disabled:n?.disabled||K,configurationItemInfo:J})}case"video":{const e={video:u?.video,coverImage:u?.coverImage},r=Object.keys(e),{video:o,coverImage:n}=yft(e,D,r,G),a=gft(z,S,G);return at(Wht,{...a,moleculeId:t,poster:n?.imageFile?.url,src:o?.videoSource??o?.videoFile?.url??"",configurationItemInfo:J})}case"badge":{const e=gft(z,S,G);return at(vrt,{...e,configurationItemInfo:J})}case"alert":{const e={text:u?.text,subText:u?.subText},t=Object.keys(e),{text:r,subText:o}=yft(e,D,t,G),n=gft(z,S,G);return at(yrt,{text:r?.text||"",subText:o?.text||"",...n,configurationItemInfo:J})}case"chip":{const e={text:u?.text},t=Object.keys(e),{text:r}=yft(e,D,t,G),o=gft(z,S,G);return at(Ort,{text:r?.text||"",...o,configurationItemInfo:J})}case"email_display_field":case"email_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(hht,{name:V,text:o?.text||"",placeholderText:n?.text||"",sourceDataModelField:q,required:a?.value,isDisplayOnly:"email_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,...l,configurationItemInfo:J})}case"phone_number_display_field":case"phone_number_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(Pht,{name:V,text:o?.text||"",required:a?.value,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,isDisplayOnly:"phone_number_display_field"===r,...l,configurationItemInfo:J})}case"numeric_display_field":case"numeric_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(xht,{name:V,text:o?.text||"",required:a?.value,isDisplayOnly:"numeric_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,...l,configurationItemInfo:J})}case"currency_display_field":case"currency_input_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(Nrt,{name:V,text:o?.text||"",required:a?.value,isDisplayOnly:"currency_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,...l,configurationItemInfo:J})}case"basic_text_display_field":case"basic_text_field":{const e={text:u?.text,placeholderText:u?.placeholderText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,placeholderText:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(Crt,{name:V,text:o?.text||"",required:a?.value,isDisplayOnly:"basic_text_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,placeholderText:n?.text||"",sourceDataModelField:q,...l,configurationItemInfo:J})}case"rating_display_field":case"rating":{const e={text:u?.text,dataCapture:u?.dataCapture,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,required:n,requiredErrorText:a,validationErrorText:i}=yft(e,D,t,G),s=gft(z,S,G);return at(Eht,{name:V,text:o?.text||"",required:n?.value,requiredErrorText:a?.text,validationErrorText:i?.text,sourceDataModelField:q,isDisplayOnly:"rating_display_field"===r,...s,configurationItemInfo:J})}case"switch_display_field":case"switch":{const e={text:u?.text,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{text:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,o,G),l=gft(z,S,G);return at(Bht,{name:V,moleculeId:t,text:n?.text||"",required:a?.value,isDisplayOnly:"switch_display_field"===r,requiredErrorText:i?.text,validationErrorText:s?.text,sourceDataModelField:q,...l,configurationItemInfo:J})}case"slider_display_field":case"slider":{const e={text:u?.text,required:u?.required,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,required:n,requiredErrorText:a,validationErrorText:i,placeholderText:s}=yft(e,D,t,G),l=gft(z,S,G);return at(Iht,{name:V,text:o?.text||"",required:n?.value,isDisplayOnly:"slider_display_field"===r,requiredErrorText:a?.text,validationErrorText:i?.text,placeholderText:s?.text,sourceDataModelField:q,...l,configurationItemInfo:J})}case"date_display_field":case"date_picker":{const e={text:u?.text,required:u?.required,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{text:n,required:a,placeholderText:i,requiredErrorText:s,validationErrorText:l}=yft(e,D,o,G),c=gft(z,S,G);return at(Gat,{dateAdapter:Unt,children:at(Mpt,{moleculeId:t,name:V,text:n?.text||"",required:a?.value,placeholderText:i?.text||"",isDisplayOnly:"date_display_field"===r,requiredErrorText:s?.text,validationErrorText:l?.text,sourceDataModelField:q,...c,configurationItemInfo:J})})}case"time_picker_display":case"time_picker":{const e={text:u?.text,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText,required:u?.required},t=Object.keys(e),{text:o,placeholderText:n,requiredErrorText:a,validationErrorText:i,required:s}=yft(e,D,t,G),l=gft(z,S,G);return at(Gat,{dateAdapter:Unt,children:at(qht,{...l,name:V,text:o?.text||"",placeholderText:n?.text||"",required:s?.value,requiredErrorText:a?.text,validationErrorText:i?.text,isDisplayOnly:"time_picker_display"===r,sourceDataModelField:q,configurationItemInfo:J})})}case"select_display_field":case"select":{const e={text:u?.text,required:u?.required,placeholderText:u?.placeholderText,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{text:o,required:n,placeholderText:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,t,G),l=gft(z,S,G),c="select_display_field"===r;return at(Fht,{name:V,text:o?.text||"",required:n?.value,isDisplayOnly:c,predefinedValue:W,placeholderText:a?.text||"",requiredErrorText:i?.text,validationErrorText:s?.text,sourceDataModelField:q,...l,configurationItemInfo:J})}case"image":{const e={image:u?.image,link:u?.link},r=Object.keys(e),{image:o,link:n}=yft(e,D,r,G),a=gft(z,S,G);return at(Dpt,{...a,src:o?.imageSource||o?.imageFile?.url||o?.imageFile?.id||"",onClick:n?()=>d9e(n)?O?.({link:n?.internalLink||""}):c9e(n?.externalLink):void 0,moleculeId:t,configurationItemInfo:J,properties:{image:o,link:n}})}case"button":{const e={text:u?.text,action:u?.action},r=Object.keys(e),{text:o,action:n}=yft(e,D,r,G),a=gft(z,S,G);return at(pKe,{moleculeId:t,text:o?.text||"",sourceDataModelField:q,...a,disabled:a?.disabled||K,configurationItemInfo:J,properties:{text:o,action:n}})}case"avatar":{const e=gft(z,S,G);return at(grt,{...e,sourceDataModelField:q,configurationItemInfo:J})}case"drawer":{const e={text:u?.text,disabled:u?.disabled},r=Object.keys(e),{text:o,disabled:n}=yft(e,D,r,G),a=gft(z,S,G),i=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{};let a={},i=[];switch(e.type){case"menu_item":{const e=r;a={disabled:e?.disabled,text:e?.text,link:e?.link},i=Object.keys(a);break}case"text_item":{const e=r;a={text:e?.text},i=Object.keys(a);break}case"rich_text_item":{const e=r;a={text:e?.text},i=Object.keys(a);break}case"image_item":{const e=r;a={image:e?.image,alt:e?.alt,link:e?.link},i=Object.keys(a);break}default:a={},i=[]}const s=yft(a,D,i,t),l=gft(o?.props,S,t),c={...n,...l};switch(e.type){case"menu_item":return{...c,disabled:R?.[e.id]?R?.[e.id]?.disabled:s?.disabled?.value||l?.disabled||!1,text:s?.text?.text||"Menu Item",link:s?.link,sx:l?.sx||c.sx};case"text_item":return{...c,text:s?.text?.text||""};case"rich_text_item":return{...c,text:s?.text?.text||f5e};case"image_item":{const e=s?.image?.imageSource||s?.image?.imageFile?.url||"";return{...c,src:e,alt:s?.alt?.text||"Drawer image",link:s?.link}}default:return c}});return at(cht,{...a,items:i||[],moleculeId:t,buttonText:o?.text||a?.buttonText,buttonDisabled:R?.[t]?R?.[t]?.disabled:n?.value||a?.disabled||!1,configurationItemInfo:J})}case"speed_dial":{const e=gft(z,S,G),r=l?.map(e=>{const t=M===e.id,{properties:r,config:o,...n}=e||{},a={link:r?.link,text:r?.text},i=Object.keys(a),s=yft(a,D,i,t),l=gft(o?.props,S,t);return{...n,config:{props:{...o?.props,...l,tooltipText:l?.tooltipText||""}},properties:{link:s?.link||r?.link,text:s?.text||r?.text}}});return at(Aht,{...e,items:r||[],moleculeId:t,configurationItemInfo:J})}case"checkbox":case"checkbox_display":{const e={label:u?.label,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{label:n,required:a,requiredErrorText:i,validationErrorText:s}=yft(e,D,o,G),l=gft(z,S,G);return at(Srt,{name:V,moleculeId:t,label:n?.text||"",required:a?.value,requiredErrorText:i?.text,validationErrorText:s?.text,sourceDataModelField:q,isDisplayOnly:"checkbox_display"===r,...l,configurationItemInfo:J})}case"binary_radio_buttons":case"binary_radio_buttons_display":{const e={confirmText:u?.confirmText,rejectText:u?.rejectText,required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},o=Object.keys(e),{confirmText:n,rejectText:a,required:i,requiredErrorText:s,validationErrorText:l}=yft(e,D,o,G),c=gft(z,S,G);return at(Mrt,{name:V,moleculeId:t,confirmText:n?.text||"Yes",rejectText:a?.text||"No",required:i?.value,requiredErrorText:s?.text,validationErrorText:l?.text,sourceDataModelField:q,isDisplayOnly:"binary_radio_buttons_display"===r,...c,configurationItemInfo:J})}case"date_calendar":case"date_calendar_display":{const e={required:u?.required,requiredErrorText:u?.requiredErrorText,validationErrorText:u?.validationErrorText},t=Object.keys(e),{required:o,requiredErrorText:n,validationErrorText:a}=yft(e,D,t,G),i=gft(z,S,G);return at(nlt,{...i,name:V,required:o?.value,requiredErrorText:n?.text,validationErrorText:a?.text,isDisplayOnly:"date_calendar_display"===r,sourceDataModelField:q,configurationItemInfo:J})}default:return at(nt,{children:"There is no such type of molecule yet."})}})()},xft=({nestedPathSegments:t})=>{const{localStateObject:r}=IC(),o=ht();return e.useMemo(()=>{if(o?.itemDataByDmfId)return o.itemDataByDmfId;const e=(e=>{if(null!=e){if("object"==typeof e&&!Array.isArray(e)&&"viewType"in e&&"data"in e){const t=e.data;if(null==t)return;return t}return e}})(r);return void 0!==e?0===t.length||Array.isArray(e)?e:qGe(e,t):void 0},[o?.itemDataByDmfId,r,t])},bft=e=>"container"===e.instance&&"empty_state"===e.type,wft=e=>{if("container"!==e.instance)return;const t=e;return t.targetRwoId||t.config?.props?.targetRwoId},kft=(e,t)=>{if(!e)return!0;if(Array.isArray(e))return 0===e.length;return(e=>null==e||Array.isArray(e)&&0===e.length||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length)(e[t])},_ft=e.memo(({item:t,tabsProps:r,formData:o,setFormData:n,isMobile:a,parentId:i,nestedPathSegments:s=[],parentStyleVariantConfig:l,parentContainerWithVariantsId:c,parentContainerActiveVariant:u})=>{const d=Kt(),{organismMetadata:p}=IC(),h="items"in t?t.items:void 0,f=(({items:t})=>{const{stateConfig:r}=UC(),{localStateObject:o}=IC(),n=o||r;return e.useMemo(()=>t&&0!==t.length?t.filter(e=>{const t=e.config?.props?.visible??!0,r=n?.[e.id]?.visible??!0;return t&&r}):[],[t,n])})({items:h}),{filteredItems:m}=(({containerItems:t,visibleItems:r,nestedPathSegments:o})=>{const{isLoadingData:n,isEmptyDataState:a,forceEmptyStatePreview:i,previewingEmptyStates:s,isConfigurationMode:l}=IC(),c=xft({nestedPathSegments:o});return e.useMemo(()=>{if(!t||0===t.length)return{filteredItems:r,showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};const e=t.filter(bft);if(0===e.length)return{filteredItems:r,showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};const o=s&&s.length>0;if(l&&!i&&!o)return{filteredItems:r,showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};if(n&&!i&&!o)return{filteredItems:r.filter(e=>!bft(e)),showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1};const u=new Set;let d=!1;return e.forEach(e=>{const t=wft(e);i||(t?s?.includes(t):s?.includes("__organism__"))?t?u.add(t):d=!0:l||(t?kft(c,t)&&u.add(t):a&&(d=!0))}),d||0!==u.size?{filteredItems:r.filter(e=>{if(bft(e)){const t=wft(e);return t?u.has(t):d}return!1}),showingEmptyStateForFields:u,showOrganismLevelEmptyState:d}:{filteredItems:r.filter(e=>!bft(e)),showingEmptyStateForFields:new Set,showOrganismLevelEmptyState:!1}},[t,r,c,n,a,i,s,l])})({containerItems:h,visibleItems:f,nestedPathSegments:s});if("molecule"===t.instance)return at(mft,{additionalInfo:`molecule: ${t.id}`,children:at(vft,{...t,form:d,isMobile:a,formData:o,parentId:i,tabsProps:r,setFormData:n,metadata:{...t.metadata,stateListenerId:p?.stateListenerId||t.id},parentStyleVariantConfig:l,parentContainerWithVariantsId:c,parentContainerActiveVariant:u})});const y=!(!h||!h.length),g="form"===t.type&&t.config.props?.activeChildrenIds||[];return y?g.length?at(mft,{additionalInfo:`form: ${t.id}`,children:at(Nft,{item:t,activeChildrenIds:g,formData:o,setFormData:n,isMobile:a})}):at(mft,{additionalInfo:`container: ${t.id}`,children:at(jft,{...t,isMobile:a,nestedPathSegments:s,parentStyleVariantConfig:l,parentContainerWithVariantsId:c,parentContainerActiveVariant:u,config:t.config?{...t.config,props:t.config.props||{},wide:t.config.wide||{},compact:t.config.compact||{}}:{props:{},wide:{},compact:{}},children:m?.map(e=>at(_ft,{item:e,parentId:e.id,formData:o,setFormData:n,isMobile:a,tabsProps:r,nestedPathSegments:s},e.id))})}):null}),Cft=({order:t=0,id:r,formStepStyles:o,containerProps:n={hasOwnButton:!1}})=>{const a=Kt(),[i,s]=e.useState({}),{formId:l,submitHandler:c,isFormInEditMode:u,organismMetadata:d,organismInfo:p}=IC(),{groupStepItemsByStepContainer:h}=IC();Object.keys(d?.popupPayload??{})[0];const{currentStep:f,canGoToNextStep:m,canGoToPrevStep:y,goToNextStep:g,goToPrevStep:v,reset:x,setStep:b}=eo(),w=h(),{submitForm:k}=KGe(),{forms:_}=dt(),C=t+1,M=w.get(r)||[];return f!==C?null:at("div",{style:o,children:it(nt,{children:[M.map(e=>at(_ft,{item:e,setFormData:s,formData:i},e.id)),(!n?.hasOwnButton||d?.isFormInsidePopUp)&&u&&it("div",{style:{display:"flex",gap:"16px"},children:[at(pKe,{text:y?"Back":"Cancel",variant:"outlined",onClick:()=>{y?v():(x(),b(1))}}),at(pKe,{text:m?"Next":"Submit",variant:"contained",onClick:async()=>{const e=await a.trigger();if(!e)return void K6e({message:"Please fill all required fields",type:"error"});if(m)return void g();const t=a?.getValues?.()||{};if(e&&l){const e={formId:l,data:t,pmiObjectId:p?.pmiObjectId};c?await c(e):_?.submit&&await k(e)}}})]})]})})},Mft=e=>Object.entries(e).reduce((e,[t,r])=>(e[t]=(e=>e&&"object"==typeof e&&"value"in e&&!Array.isArray(e)?e.value:e)(r),e),{}),Sft=(e,t)=>{if(!e?.enabled)return null;const r="data_model"===(e.nature||(e.sourceDataModelFieldId?"data_model":"variable"))?e.sourceDataModelFieldId:e.variableName;if(!r)return null;if(!t)return null;const o=t[r];if(null==o)return null;let n=null;if("string"==typeof o)n=o;else if("object"==typeof o&&null!==o){const e=o;void 0!==e.id&&null!==e.id&&"string"==typeof e.id?n=e.id:void 0!==e.value&&null!==e.value&&(n=String(e.value))}return n},Dft=(e,t,r)=>{if(!e)return console.log("[getVariantContainerStyles] No config provided"),{};if(t){console.log("[getVariantContainerStyles] Looking for variant:",{activeVariant:t,presentation:r,configKeys:Object.keys(e),variantConfig:e[t]});const o=e[t];if(o&&"object"==typeof o&&r in o){const e=o[r];if(e&&"object"==typeof e){const{containerStyle:t}=e;return t&&"object"==typeof t?(console.log("[getVariantContainerStyles] Found containerStyle:",t),t):(console.log("[getVariantContainerStyles] Found presentationConfig:",e),e)}}else console.log("[getVariantContainerStyles] Variant not found or no presentation:",{hasVariantConfig:!!o,variantConfigType:typeof o,hasPresentation:!(!o||"object"!=typeof o)&&r in o})}const o=e[r];if(o&&"object"==typeof o){const{containerStyle:e}=o;return e&&"object"==typeof e?e:o}return{}},Oft=e.memo(({containerId:t,targetRwoId:r,sourceDataPointerId:o,nestedPathSegments:n=[],children:a,properties:i,config:s,renderWrapper:l})=>{const{formId:c}=IC(),u=KC(),d=ht(),p=BC(),h=HGe(),f=o&&u?.queryResults?u.queryResults[o]?.isLoading??u.isSingleRecordLoading??!1:u?.isSingleRecordLoading??!1,m=i?.styleVariantConfig||s?.styleVariantConfig,y=e.useMemo(()=>{if(!m)return"";return"data_model"===(m.nature||(m.sourceDataModelFieldId?"data_model":"variable"))?m.sourceDataModelFieldId||"":m.variableName||""},[m]),g=y?VGe(y):void 0;if(Boolean(c&&p)&&p){const{fieldArrayMethods:{fields:e}}=p;return at(nt,{children:e.map((e,o)=>{const i=[...n,{dmfId:r||"default",index:o}],s=e;let c=s;"variable"===(m?.nature||(m?.sourceDataModelFieldId?"data_model":"variable"))&&y&&void 0!==g&&(c={...s,[y]:g});const u=Sft(m,c),d={containerId:t||`replicator-${r||"default"}-${o}`,nestedPathSegments:i,itemIndex:o,itemDataByDmfId:s,rawItemDataByDmfId:s,activeVariant:u,isLoading:f},p=l?l(o,a,u):a;return at("div",{"data-replicator-instance":`${r||"default"}-${o}`,children:at(ft,{value:d,children:p})},e.id)})})}if(f)return at(nt,{children:Array.from({length:3}).map((e,o)=>{const i=[...n,{dmfId:r||"default",index:o}];return at(ft,{value:{containerId:t||`replicator-${r||"default"}-${o}`,nestedPathSegments:i,itemIndex:o,itemDataByDmfId:{},rawItemDataByDmfId:{},activeVariant:null,isLoading:f},children:l?l(o,a,null):a},`${r||"default"}-loading-${o}`)})});const v=o?h(o):void 0,x=o?v??{}:{},b=qGe(x,n),w=o?b||x:d?.itemDataByDmfId?d.itemDataByDmfId:b,k=r?w?.[r]:w;if(!k||"object"!=typeof k){const e=r?[...n,{dmfId:r}]:n;return at(ft,{value:{containerId:t||`replicator-${r||"default"}`,nestedPathSegments:e,itemDataByDmfId:{},activeVariant:null,isLoading:!1},children:l?l(void 0,a,null):a})}if(Array.isArray(k))return at(nt,{children:k.map((e,o)=>{const i=[...n,{dmfId:r||"default",index:o}],s=Mft(e);let c=e;"variable"===(m?.nature||(m?.sourceDataModelFieldId?"data_model":"variable"))&&y&&void 0!==g&&(c={...c,[y]:g});const u=Sft(m,c);return at(ft,{value:{containerId:t||`replicator-${r||"default"}-${o}`,nestedPathSegments:i,itemIndex:o,itemDataByDmfId:s,rawItemDataByDmfId:e,activeVariant:u,isLoading:f},children:l?l(o,a,u):a},`${r||"default"}-${o}`)})});const _=r?[...n,{dmfId:r}]:n,C=Mft(k);let M=k;"variable"===(m?.nature||(m?.sourceDataModelFieldId?"data_model":"variable"))&&y&&void 0!==g&&(M={...M,[y]:g});const S=Sft(m,M);return at(ft,{value:{containerId:t||`replicator-${r||"default"}`,nestedPathSegments:_,itemDataByDmfId:C,rawItemDataByDmfId:k,activeVariant:S,isLoading:f},children:l?l(void 0,a,S):a})}),Pft=({targetRwoId:t,nestedPathSegments:r=[],minInstances:o=1,maxInstances:n=50,children:a})=>{const i=Kt(),{control:s,getValues:c}=i||{},u=HC(),{prefillData:d}=IC(),p=e.useRef(!1),h=r.map(e=>void 0!==e.index?`${e.dmfId}.${e.index}`:e.dmfId).filter(Boolean).join(".");const f=h?`${h}.${t}`:t,m=function(e){const t=Kt(),{control:r=t.control,name:o,keyName:n="id",shouldUnregister:a,rules:i}=e,[s,c]=l.default.useState(r._getFieldArray(o)),u=l.default.useRef(r._getFieldArray(o).map(Vr)),d=l.default.useRef(s),p=l.default.useRef(o),h=l.default.useRef(!1);p.current=o,d.current=s,r._names.array.add(o),i&&r.register(o,i),Xt(()=>r._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===p.current||!t){const t=Pt(e,p.current);Array.isArray(t)&&(c(t),u.current=t.map(Vr))}}}).unsubscribe,[r]);const f=l.default.useCallback(e=>{h.current=!0,r._setFieldArray(o,e)},[r,o]);return l.default.useEffect(()=>{if(r._state.action=!1,jr(o,r._names)&&r._subjects.state.next({...r._formState}),h.current&&(!Or(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Or(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([o]).then(e=>{const t=Pt(e.errors,o),n=Pt(r._formState.errors,o);(n?!t&&n.type||t&&(n.type!==t.type||n.message!==t.message):t&&t.type)&&(t?jt(r._formState.errors,o,t):fr(r._formState.errors,o),r._subjects.state.next({errors:r._formState.errors}))});else{const e=Pt(r._fields,o);!e||!e._f||Or(r._options.reValidateMode).isOnSubmit&&Or(r._options.mode).isOnSubmit||zr(e,r._names.disabled,r._formValues,r._options.criteriaMode===Lt,r._options.shouldUseNativeValidation,!0).then(e=>!sr(e)&&r._subjects.state.next({errors:Rr(r._formState.errors,e,o)}))}r._subjects.state.next({name:o,values:Ct(r._formValues)}),r._names.focus&&Tr(r._fields,(e,t)=>{if(r._names.focus&&t.startsWith(r._names.focus)&&e.focus)return e.focus(),1}),r._names.focus="",r._setValid(),h.current=!1},[s,o,r]),l.default.useEffect(()=>(!Pt(r._formValues,o)&&r._setFieldArray(o),()=>{r._options.shouldUnregister||a?r.unregister(o):((e,t)=>{const o=Pt(r._fields,e);o&&o._f&&(o._f.mount=t)})(o,!1)}),[o,r,n,a]),{swap:l.default.useCallback((e,t)=>{const n=r._getFieldArray(o);Yr(n,e,t),Yr(u.current,e,t),f(n),c(n),r._setFieldArray(o,n,Yr,{argA:e,argB:t},!1)},[f,o,r]),move:l.default.useCallback((e,t)=>{const n=r._getFieldArray(o);Ur(n,e,t),Ur(u.current,e,t),f(n),c(n),r._setFieldArray(o,n,Ur,{argA:e,argB:t},!1)},[f,o,r]),prepend:l.default.useCallback((e,t)=>{const n=or(Ct(e)),a=Gr(r._getFieldArray(o),n);r._names.focus=$r(o,0,t),u.current=Gr(u.current,n.map(Vr)),f(a),c(a),r._setFieldArray(o,a,Gr,{argA:qr(e)})},[f,o,r]),append:l.default.useCallback((e,t)=>{const n=or(Ct(e)),a=Hr(r._getFieldArray(o),n);r._names.focus=$r(o,a.length-1,t),u.current=Hr(u.current,n.map(Vr)),f(a),c(a),r._setFieldArray(o,a,Hr,{argA:qr(e)})},[f,o,r]),remove:l.default.useCallback(e=>{const t=Kr(r._getFieldArray(o),e);u.current=Kr(u.current,e),f(t),c(t),!Array.isArray(Pt(r._fields,o))&&jt(r._fields,o,void 0),r._setFieldArray(o,t,Kr,{argA:e})},[f,o,r]),insert:l.default.useCallback((e,t,n)=>{const a=or(Ct(t)),i=Wr(r._getFieldArray(o),e,a);r._names.focus=$r(o,e,n),u.current=Wr(u.current,e,a.map(Vr)),f(i),c(i),r._setFieldArray(o,i,Wr,{argA:e,argB:qr(t)})},[f,o,r]),update:l.default.useCallback((e,t)=>{const n=Ct(t),a=Zr(r._getFieldArray(o),e,n);u.current=[...a].map((t,r)=>t&&r!==e?u.current[r]:Vr()),f(a),c([...a]),r._setFieldArray(o,a,Zr,{argA:e,argB:n},!0,!1)},[f,o,r]),replace:l.default.useCallback(e=>{const t=or(Ct(e));u.current=t.map(Vr),f([...t]),c([...t]),r._setFieldArray(o,[...t],e=>e,{},!0,!1)},[f,o,r]),fields:l.default.useMemo(()=>s.map((e,t)=>({...e,[n]:u.current[t]||Vr()})),[s,n])}}({control:s,name:f}),{fields:y,append:g,replace:v}=m,x=d?.[t],b=Array.isArray(x)&&x.length>0;return e.useEffect(()=>{if(p.current)return;p.current=!0;const e=c?.(f),t=Array.isArray(e)&&e.length>0;if(!(b||t||y.length>0)&&o>0){Array.from({length:o},()=>({})).forEach(e=>{g(e,{shouldFocus:!1})})}},[]),e.useEffect(()=>{b&&y.length!==x.length&&v(x)},[b,x,y.length,v]),e.useEffect(()=>{if(u)return u.register({targetRwoId:t,fieldArrayName:f,fieldArrayMethods:m,minInstances:o,maxInstances:n}),()=>{u.unregister(t)}},[u,t,f,m,o,n]),at(VC,{targetRwoId:t,fieldArrayName:f,fieldArrayMethods:m,minInstances:o,maxInstances:n,children:a})},Eft={dots:!0,infinite:!1,autoplay:!1,autoplaySpeed:5e3,arrows:!0,slidesToShow:1,slidesToScroll:1,adaptiveHeight:!0,swipeToSlide:!0},jft=e.memo(({id:t,type:r,name:o,config:n,children:a,metadata:i,isMobile:s,properties:l,nestedPathSegments:c=[],targetRwoId:u,sourceDataPointerId:d,parentStyleVariantConfig:p,parentContainerWithVariantsId:h,parentContainerActiveVariant:f})=>{const m=Ye(),{props:y,wide:g,compact:v}=n||{},x=u||y?.targetRwoId,b=d||y?.sourceDataPointerId,{isConfigurationMode:w,onConfigurationItemClicked:k,selectedConfigurationItemId:_,currentStyleProperties:C,currentContentProperties:M,formId:S,localState:D,organismInfo:O}=IC(),P=ht(),{activeVariant:E,containerId:j}=P,T=Kt(),N=Boolean(S&&T),R=e.useMemo(()=>{if("replicator"===r)return;const e=l?.styleVariantConfig,t=e&&"object"==typeof e&&"data"in e?e.data:e;if(!t?.enabled)return;return("data_model"===(t.nature||(t.sourceDataModelFieldId?"data_model":"variable"))?Boolean(t.sourceDataModelFieldId):Boolean(t.variableName))?t:void 0},[r,l]),F=e.useMemo(()=>{if(!R)return"";return"data_model"===(R.nature||(R.sourceDataModelFieldId?"data_model":"variable"))?R.sourceDataModelFieldId||"":R.variableName||""},[R]),I=e.useMemo(()=>{if(!F)return"";if(!N)return"";return"data_model"!==(R?.nature||(R?.sourceDataModelFieldId?"data_model":"variable"))?"":(e=P.nestedPathSegments||c,t=F,e&&0!==e.length?[...e.map(e=>void 0!==e.index?`${e.dmfId}.${e.index}`:e.dmfId),t].filter(Boolean).join("."):t);var e,t},[F,R?.nature,R?.sourceDataModelFieldId,N,P.nestedPathSegments,c]);I&&T?.watch?.(I);const A=VGe(F);F&&R?.enabled&&console.log("[Container] Resolving variant:",{variantSourceField:F,resolvedContainerVariantValue:A,containerStyleVariantConfig:R});const z=e.useMemo(()=>{if(!F||!R)return null;if(null!=A){let e=null;if("string"==typeof A||"number"==typeof A)e={id:String(A),value:A};else if(A&&"object"==typeof A){const t=A,r=t.value??null,o=void 0!==t.id&&null!==t.id?String(t.id):null!==r?String(r):null;null!==o&&(e={id:o,value:r})}if(!e)return null;const t={[F]:e},r=Sft(R,t);if(console.log("[Container] Variant resolution:",{variantSourceField:F,normalized:e,scopedData:t,resolved:r,config:R}),r)return r}return null},[R,F,A]),L=p,B=z??(f??E??null),V=(R&&R.enabled?t:h)||j||null,$=e.useMemo(()=>{const r=R&&R.enabled,o=r?R:L,n=B,i=(r?t:h)||t;return void 0!==o||null!==n||void 0!==h?e.Children.map(a,t=>e.isValidElement(t)?e.cloneElement(t,{...t.props,parentStyleVariantConfig:o,parentContainerWithVariantsId:i,parentContainerActiveVariant:n}):t):a},[a,R,B,L,t,h]),H=_===t,q=H?{backgroundImage:M?.backgroundImage??l?.backgroundImage??{imageFile:{url:""}}}:l,{containerProps:W={},containerStyle:U={}}=g||{};let G={...U};const{containerProps:K={},containerStyle:Y={}}=v||{};let Z={...Y};C&&H&&(Z={...Y,...C},G={...U,...C});const X=PC("xs"),Q=s??X,J=Q?"compact":"wide";let ee=Q?Z:G;if(B&&n){console.log("[Container] Applying variant styles:",{activeVariant:B,presentation:J,configKeys:Object.keys(n),config:n});const e=Dft(n,B,J);console.log("[Container] Variant styles result:",{variantStyles:e,hasStyles:Object.keys(e).length>0}),Object.keys(e).length>0&&(ee={...ee,...e})}const te=Q?K:W,re={...y,...te,enableBackgroundImage:ee?.enableBackgroundImage},oe=e.useMemo(()=>({entityId:t,entityType:r,entityName:o,entity:"container",organismType:O?.type,organismSubtype:O?.subtype,libraryEntityId:i?.containerLibraryId||void 0,activeStyleVariant:B,parentReplicatorWithVariants:V,parentStyleVariantConfig:R&&R.enabled?R:L}),[r,o,t,i,B,V,R,L]),ne=w?{onClick:e=>{e&&e.stopPropagation(),k(oe,!1)},onDoubleClick:e=>{e?.stopPropagation(),k(oe,!0)}}:{},ae=`${t}.${Q?"mobile":"desktop"}`,ie=_o`
|
|
1035
1035
|
display: flex;
|
|
1036
1036
|
position: relative; /* default containing block for absolute children */
|
|
1037
1037
|
overflow: visible; /* allow positioned children to overflow */
|
|
1038
1038
|
box-sizing: border-box; /* normalize across environments */
|
|
1039
|
-
${
|
|
1040
|
-
${urt(
|
|
1039
|
+
${ee}; /* explicit containerStyle (can override position when needed) */
|
|
1040
|
+
${urt(re?.enableBackgroundImage,q?.backgroundImage?.imageFile?.url)}
|
|
1041
1041
|
${w?hrt({theme:m,selected:H}):void 0}
|
|
1042
|
-
`;if("slider"===r||"journey_driven"===r)return at("div",{className:"slider-container",style:{width:"inherit",height:"inherit",display:"block",position:"relative"},...
|
|
1043
|
-
${
|
|
1042
|
+
`;if("slider"===r||"journey_driven"===r)return at("div",{className:"slider-container",style:{width:"inherit",height:"inherit",display:"block",position:"relative"},...ne,children:at(art,{"data-configuration-id":t,fade:"journey_driven"===r,css:_o`
|
|
1043
|
+
${ie};
|
|
1044
1044
|
${frt};
|
|
1045
|
-
`,...Eft,...
|
|
1045
|
+
`,...Eft,...te,children:a})},ae);const se=at(Oft,{containerId:t,targetRwoId:x,sourceDataPointerId:b,nestedPathSegments:c,properties:l,config:n,renderWrapper:(e,r,o)=>{const a=Dft(n,o,Q?"compact":"wide"),i=_o`
|
|
1046
1046
|
display: flex;
|
|
1047
1047
|
position: relative;
|
|
1048
1048
|
overflow: visible;
|
|
1049
1049
|
box-sizing: border-box;
|
|
1050
|
-
${o&&Object.keys(a).length>0?{...
|
|
1051
|
-
${urt(
|
|
1050
|
+
${o&&Object.keys(a).length>0?{...ee,...a}:ee};
|
|
1051
|
+
${urt(re?.enableBackgroundImage,q?.backgroundImage?.imageFile?.url)}
|
|
1052
1052
|
${w?hrt({theme:m,selected:H}):void 0}
|
|
1053
|
-
`;return at("div",{id:`${t}-${void 0!==e?e:"single"}`,css:i,...w?{"data-configuration-id":t}:{},...oe,children:r})},children:a}),se={form:at(lrt,{...y?.formProps,containerType:"form",children:$}),filter:at(irt,{containerType:"filter",children:$}),form_step:at(Cft,{id:t,...y?.formStepProps,metadata:i,containerProps:te,children:$}),replicator:N&&x?at(Pft,{targetRwoId:x,nestedPathSegments:c,minInstances:y?.minInstances,maxInstances:y?.maxInstances,children:ie}):ie};if("replicator"===r)return at(nt,{children:se.replicator});return at("div",{id:t,className:"empty_state"===r?"zeal-container zeal-empty-state":"zeal-container",css:ae,...w?{"data-configuration-id":t}:{},...oe,children:se[r]||$},ne)}),Tft=({config:t,tabsProps:r,id:o,type:n,items:a,metadata:i,formData:s,setFormData:l,isMobile:c,properties:u,isConfigurationMode:d=!1})=>{const[p,h]=e.useState(),f=PC("xs"),m=c??f;if(!a||!a.length)return null;return at(st,{userInitials:"UN",logOutHandler:()=>console.log("log out"),goToAccountInfo:()=>console.log("account info page"),children:at(FC,{organismMetadata:i,organismId:o,initItems:a,organismBodyId:o,submitHandler:e=>new Promise(t=>{setTimeout(()=>{t(alert(JSON.stringify(e,null,2)))},600)}),formId:o,isConfigurationMode:d,onConfigurationItemHandler:e=>{h(e?.entityId)},selectedConfigurationItemId:p,children:at(_ft,{item:{id:o,type:n,items:a,config:t,metadata:i,properties:u,instance:"container"},formData:s,tabsProps:r,isMobile:m,setFormData:l})})},`${o}.${m?"mobile":"desktop"}`)},Nft=({formData:t,setFormData:r,isMobile:o,...n})=>{const a=(({item:t,activeChildrenIds:r})=>{const[o,n]=e.useState(),a=e.useMemo(()=>r.map(e=>{const r=t.items.find(t=>t.id===e);return r?(e=>{const t=e.config?.props?.formStepProps||{};return{...e,config:{...e.config,props:{...e.config?.props,formStepProps:{...t,order:0}}}}})(r):void 0}).filter(Boolean),[r,t]);return e.useEffect(()=>{n(()=>({...t,items:a}))},[t]),o})(n);return a?at(Tft,{...a,isMobile:o,formData:t,setFormData:r}):null},Rft={id:"controlsLayout",tool:"custom",titleKey:"config.datagrid.group.controlsLayout",collapsible:!0,initiallyExpanded:!1,pathBase:"props.toolbarContainer.sx",fields:[{type:"number",captureName:"controlHeight",labelKey:"config.datagrid.controls.height",defaultValue:44},{type:"number",captureName:"searchWidth",labelKey:"config.datagrid.controls.searchWidth",defaultValue:360},{type:"number",captureName:"columnGap",labelKey:"config.datagrid.controls.columnGap",defaultValue:1},{type:"number",captureName:"marginTop",labelKey:"config.datagrid.controls.marginTop",defaultValue:1}]},Fft={id:"densityToggleStyles",tool:"custom",titleKey:"config.datagrid.group.densityToggleStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.densityToggleContainer.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.density.background"},{type:"color",captureName:"selectedBackgroundColor",labelKey:"config.datagrid.density.selectedBackground"},{type:"color",captureName:"selectedTextColor",labelKey:"config.datagrid.density.selectedTextColor"},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.density.borderRadius",defaultValue:10}]},Ift={id:"exportButtonStyles",tool:"custom",titleKey:"config.datagrid.group.exportButtonStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.exportButton.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.export.background"},{type:"color",captureName:"borderColor",labelKey:"config.datagrid.export.borderColor"},{type:"color",captureName:"iconColor",labelKey:"config.datagrid.export.iconColor"},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.export.borderRadius",defaultValue:8}]},Aft={id:"quickFilters",tool:"dataGridQuickFilters",titleKey:"config.datagrid.group.quickFilters",collapsible:!0,initiallyExpanded:!1,pathBase:"toolbar.quickFilters",toolConfig:{columnsDependencyPath:"dataRetrievalConfig.columns",fields:[{type:"text",captureName:"label",labelKey:"config.datagrid.quickFilters.label"},{type:"text",captureName:"columnField",labelKey:"config.datagrid.quickFilters.columnField"},{type:"text",captureName:"value",labelKey:"config.datagrid.quickFilters.value"},{type:"color",captureName:"color",labelKey:"config.datagrid.quickFilters.color"}]}},zft={id:"quickFiltersStyles",tool:"custom",titleKey:"config.datagrid.group.quickFiltersStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.quickFiltersGroup.sx",fields:[{type:"color",captureName:"chipBackgroundColor",labelKey:"config.datagrid.quickFilters.chipBackground"},{type:"color",captureName:"chipTextColor",labelKey:"config.datagrid.quickFilters.chipText"},{type:"color",captureName:"chipBorderColor",labelKey:"config.datagrid.quickFilters.chipBorder"},{type:"number",captureName:"chipBorderRadius",labelKey:"config.datagrid.quickFilters.chipBorderRadius",defaultValue:10},{type:"number",captureName:"chipGap",labelKey:"config.datagrid.quickFilters.chipGap",defaultValue:8},{type:"color",captureName:"selectedChipColor",labelKey:"config.datagrid.quickFilters.selectedChipColor"}]},Lft={id:"searchControl",tool:"custom",titleKey:"config.datagrid.group.searchControl",collapsible:!0,initiallyExpanded:!1,pathBase:"toolbar.searchControl",fields:[{type:"text",captureName:"placeholder",labelKey:"config.datagrid.search.placeholder",defaultValue:"Search"},{type:"switch",captureName:"autoFocus",labelKey:"config.datagrid.search.autoFocus",defaultValue:!1},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.search.borderRadius",defaultValue:2},{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.search.background"},{type:"color",captureName:"borderColor",labelKey:"config.datagrid.search.borderColor"}]},Bft={id:"styles",tool:"custom",titleKey:"config.datagrid.group.styles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.dataGrid.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.styles.background",defaultValue:"#FFFFFF"},{type:"color",captureName:"headerBackgroundColor",labelKey:"config.datagrid.styles.headerBackground"},{type:"number",captureName:"headerFontSize",labelKey:"config.datagrid.styles.headerFontSize"},{type:"color",captureName:"rowHoverColor",labelKey:"config.datagrid.styles.rowHoverColor"},{type:"number",captureName:"rowHeight",labelKey:"config.datagrid.styles.rowHeight"},{type:"number",captureName:"rowGap",labelKey:"config.datagrid.styles.rowGap"}]},Vft={id:"toolbar",tool:"custom",titleKey:"config.datagrid.group.toolbar",collapsible:!0,initiallyExpanded:!1,pathBase:"toolbar",fields:[{type:"select",captureName:"densityDefault",labelKey:"config.datagrid.toolbar.densityDefault",defaultValue:"comfortable",options:[{id:"compact",labelKey:"config.datagrid.toolbar.view.compact"},{id:"comfortable",labelKey:"config.datagrid.toolbar.view.comfortable"}]},{type:"switch",captureName:"densityToggle",labelKey:"config.datagrid.toolbar.densityToggle",defaultValue:!0},{type:"switch",captureName:"search",labelKey:"config.datagrid.toolbar.search",defaultValue:!0},{type:"switch",captureName:"exportCsv",labelKey:"config.datagrid.toolbar.exportCsv",defaultValue:!0}]},$ft={id:"toolbarStyles",tool:"custom",titleKey:"config.datagrid.group.toolbarStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.toolbarContainer.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.toolbarStyles.background"},{type:"color",captureName:"borderColor",labelKey:"config.datagrid.toolbarStyles.borderColor"},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.toolbarStyles.borderRadius",defaultValue:8},{type:"number",captureName:"gap",labelKey:"config.datagrid.toolbarStyles.gap",defaultValue:1.5}]},Hft={id:"wrapperStyles",tool:"custom",titleKey:"config.datagrid.group.wrapperStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.dataGridWrapper.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.wrapper.background"},{type:"color",captureName:"borderColor",labelKey:"config.datagrid.wrapper.borderColor"},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.wrapper.borderRadius",defaultValue:8},{type:"number",captureName:"paddingX",labelKey:"config.datagrid.wrapper.paddingX",defaultValue:0},{type:"number",captureName:"paddingY",labelKey:"config.datagrid.wrapper.paddingY",defaultValue:0},{type:"number",captureName:"elevation",labelKey:"config.datagrid.wrapper.elevation",defaultValue:0},{type:"number",captureName:"marginX",labelKey:"config.datagrid.wrapper.marginX",defaultValue:0},{type:"number",captureName:"marginY",labelKey:"config.datagrid.wrapper.marginY",defaultValue:0},{type:"text",captureName:"boxShadow",labelKey:"config.datagrid.wrapper.boxShadow"}]},qft={component:"DataGridOrganism",version:"1.4.0",toolGroups:[{id:"view",tool:"dataGridListConfigurator",titleKey:"config.datagrid.group.view",collapsible:!0,initiallyExpanded:!0,pathBase:"view",defaultView:"listView",toolConfig:{basePathAliasKey:"meta.pathAliases.dataGridView",templates:[{id:"custom",label:"Custom",labelKey:"config.datagrid.list.template.custom"},{id:"studyCard",label:"Study card",labelKey:"config.datagrid.list.template.studyCard"},{id:"subjectCard",label:"Subject card",labelKey:"config.datagrid.list.template.subjectCard"},{id:"visitCard",label:"Visit card",labelKey:"config.datagrid.list.template.visitCard"},{id:"visitCardCheck",label:"Visit card (check)",labelKey:"config.datagrid.list.template.visitCardCheck"},{id:"fourItems",label:"4 items view",labelKey:"config.datagrid.list.template.fourItems"},{id:"applicationCard",label:"Application card",labelKey:"config.datagrid.list.template.applicationCard"},{id:"notificationCard",label:"Notification card",labelKey:"config.datagrid.list.template.notificationCard"},{id:"compact",label:"Compact",labelKey:"config.datagrid.list.template.compact"},{id:"mediaLeft",label:"Media left",labelKey:"config.datagrid.list.template.mediaLeft"},{id:"titleSubtitleMeta",label:"Title + subtitle + meta",labelKey:"config.datagrid.list.template.titleSubtitleMeta"},{id:"twoColumn",label:"Two column",labelKey:"config.datagrid.list.template.twoColumn"}]}},{id:"columns",tool:"dataGridColumns",titleKey:"config.datagrid.group.columns",collapsible:!0,initiallyExpanded:!0,pathBase:"dataRetrievalConfig.columns"},Aft,Vft,Rft,{id:"rootWrapperStyles",tool:"custom",titleKey:"config.datagrid.group.rootWrapperStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.rootContainer.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.rootWrapper.background"},{type:"number",captureName:"paddingX",labelKey:"config.datagrid.rootWrapper.paddingX",defaultValue:0},{type:"number",captureName:"paddingY",labelKey:"config.datagrid.rootWrapper.paddingY",defaultValue:0},{type:"number",captureName:"marginX",labelKey:"config.datagrid.rootWrapper.marginX",defaultValue:0},{type:"number",captureName:"marginY",labelKey:"config.datagrid.rootWrapper.marginY",defaultValue:0}]},Hft,{id:"listItemStyles",tool:"custom",titleKey:"config.datagrid.group.listItemStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.listItem.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.listItem.background"},{type:"color",captureName:"borderColor",labelKey:"config.datagrid.listItem.borderColor"},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.listItem.borderRadius",defaultValue:12},{type:"number",captureName:"paddingX",labelKey:"config.datagrid.listItem.paddingX",defaultValue:10},{type:"number",captureName:"paddingY",labelKey:"config.datagrid.listItem.paddingY",defaultValue:10},{type:"number",captureName:"marginX",labelKey:"config.datagrid.listItem.marginX",defaultValue:0},{type:"number",captureName:"marginY",labelKey:"config.datagrid.listItem.marginY",defaultValue:0},{type:"text",captureName:"boxShadow",labelKey:"config.datagrid.listItem.boxShadow"}]},$ft,zft,Lft,Fft,Ift,Bft]};var Wft=(e,t,r)=>{if(1===t.length&&t[0]===r){let t=!1;try{const r={};e(r)===r&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(FJe){({stack:e}=FJe)}}}},Uft=(e,t,r)=>{const{memoize:o,memoizeOptions:n}=t,{inputSelectorResults:a,inputSelectorResultsCopy:i}=e,s=o(()=>({}),...n);if(!(s.apply(null,a)===s.apply(null,i))){let e;try{throw new Error}catch(FJe){({stack:e}=FJe)}}},Gft={inputStabilityCheck:"once",identityFunctionCheck:"once"},Kft=Symbol("NOT_FOUND");var Yft=e=>Array.isArray(e)?e:[e];function Zft(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${r}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Xft(e,t){const r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var Qft=(e,t)=>e===t;function Jft(e,t){const r="object"==typeof t?t:{equalityCheck:t},{equalityCheck:o=Qft,maxSize:n=1,resultEqualityCheck:a}=r,i=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;const{length:o}=t;for(let n=0;n<o;n++)if(!e(t[n],r[n]))return!1;return!0}}(o);let s=0;const l=n<=1?function(e){let t;return{get:r=>t&&e(t.key,r)?t.value:Kft,put(e,r){t={key:e,value:r}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(i):function(e,t){let r=[];function o(e){const o=r.findIndex(r=>t(e,r.key));if(o>-1){const e=r[o];return o>0&&(r.splice(o,1),r.unshift(e)),e.value}return Kft}return{get:o,put:function(t,n){o(t)===Kft&&(r.unshift({key:t,value:n}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(n,i);function c(){let t=l.get(arguments);if(t===Kft){if(t=e.apply(null,arguments),s++,a){const e=l.getEntries().find(e=>a(e.value,t));e&&(t=e.value,0!==s&&s--)}l.put(arguments,t)}return t}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var emt="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function tmt(){return{s:0,v:void 0,o:null,p:null}}function rmt(e,t={}){let r={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:o}=t;let n,a=0;function i(){let t=r;const{length:i}=arguments;for(let e=0,r=i;e<r;e++){const r=arguments[e];if("function"==typeof r||"object"==typeof r&&null!==r){let e=t.o;null===e&&(t.o=e=new WeakMap);const o=e.get(r);void 0===o?(t=tmt(),e.set(r,t)):t=o}else{let e=t.p;null===e&&(t.p=e=new Map);const o=e.get(r);void 0===o?(t=tmt(),e.set(r,t)):t=o}}const s=t;let l;if(1===t.s)l=t.v;else if(l=e.apply(null,arguments),a++,o){const e=n?.deref?.()??n;null!=e&&o(e,l)&&(l=e,0!==a&&a--);n="object"==typeof l&&null!==l||"function"==typeof l?new emt(l):l}return s.s=1,s.v=l,l}return i.clearCache=()=>{r={s:0,v:void 0,o:null,p:null},i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function omt(e,...t){const r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,o=(...e)=>{let t,o=0,n=0,a={},i=e.pop();"object"==typeof i&&(a=i,i=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const s={...r,...a},{memoize:l,memoizeOptions:c=[],argsMemoize:u=rmt,argsMemoizeOptions:d=[],devModeChecks:p={}}=s,h=Yft(c),f=Yft(d),m=Zft(e),y=l(function(){return o++,i.apply(null,arguments)},...h);let g=!0;const v=u(function(){n++;const e=Xft(m,arguments);if(t=y.apply(null,e),"production"!==process.env.NODE_ENV){const{identityFunctionCheck:r,inputStabilityCheck:o}=((e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:o}={...Gft,...t};return{identityFunctionCheck:{shouldRun:"always"===r||"once"===r&&e,run:Wft},inputStabilityCheck:{shouldRun:"always"===o||"once"===o&&e,run:Uft}}})(g,p);if(r.shouldRun&&r.run(i,e,t),o.shouldRun){const t=Xft(m,arguments);o.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:l,memoizeOptions:h},arguments)}g&&(g=!1)}return t},...f);return Object.assign(v,{resultFunc:i,memoizedResultFunc:y,dependencies:m,dependencyRecomputations:()=>n,resetDependencyRecomputations:()=>{n=0},lastResult:()=>t,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:l,argsMemoize:u})};return Object.assign(o,{withTypes:()=>o}),o}var nmt=omt(rmt),amt=Object.assign((e,t=nmt)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const r=Object.keys(e),o=r.map(t=>e[t]),n=t(o,(...e)=>e.reduce((e,t,o)=>(e[r[o]]=t,e),{}));return n},{withTypes:()=>amt});const imt=omt({memoize:Jft,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});class smt{static create(e){return new smt(e)}constructor(e){this.state=void 0,this.listeners=void 0,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.state,this.update=e=>{this.state!==e&&(this.state=e,this.listeners.forEach(t=>t(e)))},this.state=e,this.listeners=new Set}apply(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.update(S({},this.state,e))}set(e,t){Object.is(this.state[e],t)||this.update(S({},this.state,{[e]:t}))}}const lmt=(...e)=>{const t=((e,t,r,o,n,a,...i)=>{if(i.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&r&&o&&n&&a)s=(i,s,l,c)=>{const u=e(i,s,l,c),d=t(i,s,l,c),p=r(i,s,l,c),h=o(i,s,l,c),f=n(i,s,l,c);return a(u,d,p,h,f,s,l,c)};else if(e&&t&&r&&o&&n)s=(a,i,s,l)=>{const c=e(a,i,s,l),u=t(a,i,s,l),d=r(a,i,s,l),p=o(a,i,s,l);return n(c,u,d,p,i,s,l)};else if(e&&t&&r&&o)s=(n,a,i,s)=>{const l=e(n,a,i,s),c=t(n,a,i,s),u=r(n,a,i,s);return o(l,c,u,a,i,s)};else if(e&&t&&r)s=(o,n,a,i)=>{const s=e(o,n,a,i),l=t(o,n,a,i);return r(s,l,n,a,i)};else if(e&&t)s=(r,o,n,a)=>{const i=e(r,o,n,a);return t(i,o,n,a)};else{if(!e)throw new Error("Missing arguments");s=e}return s})(...e);return(e,r,o,n)=>t(dmt(e),r,o,n)},cmt=(...e)=>{const t=((...e)=>{const t=new WeakMap;let r=1;const o=e[e.length-1],n=e.length-1||1,a=Math.max(o.length-n,0);if(a>3)throw new Error("Unsupported number of arguments");return(n,i,s,l)=>{let c=n.__cacheKey__;c||(c={id:r},n.__cacheKey__=c,r+=1);let u=t.get(c);if(!u){let r=e;const n=[void 0,void 0,void 0];switch(a){case 0:break;case 1:r=[...e.slice(0,-1),()=>n[0],o];break;case 2:r=[...e.slice(0,-1),()=>n[0],()=>n[1],o];break;case 3:r=[...e.slice(0,-1),()=>n[0],()=>n[1],()=>n[2],o];break;default:throw new Error("Unsupported number of arguments")}u=imt(...r),u.selectorArgs=n,t.set(c,u)}switch(a){case 3:u.selectorArgs[2]=l;case 2:u.selectorArgs[1]=s;case 1:u.selectorArgs[0]=i}switch(a){case 0:return u(n);case 1:return u(n,i);case 2:return u(n,i,s);case 3:return u(n,i,s,l);default:throw new Error("unreachable")}}})(...e);return(e,r,o,n)=>t(dmt(e),r,o,n)},umt=e=>(t,r)=>e(dmt(t),r);function dmt(e){return"current"in e?e.current.state:e}const pmt=umt(e=>e.dimensions),hmt=lmt(pmt,e=>e.columnsTotalWidth),fmt=lmt(pmt,e=>e.rowHeight),mmt=lmt(pmt,e=>e.contentSize.height),ymt=lmt(pmt,e=>e.hasScrollX),gmt=lmt(pmt,e=>e.hasScrollY),vmt=lmt(pmt,e=>e.columnsTotalWidth<e.viewportOuterSize.width),xmt=lmt(pmt,e=>e.headerHeight),bmt=lmt(pmt,e=>e.groupHeaderHeight),wmt=lmt(pmt,e=>e.headerFilterHeight),kmt=lmt(pmt,e=>e.hasScrollX?e.scrollbarSize:0),_mt=lmt(pmt,e=>e.hasScrollY?e.scrollbarSize:0),Cmt=lmt(pmt,kmt,(e,t)=>{const r=e.viewportOuterSize.height-e.minimumSize.height>0;return!(0===t&&!r)});var Mmt=parseInt(s.version,10);const Smt=e=>{if(Mmt>=19){const t=t=>e(t,t.ref??null);return t.displayName=e.displayName??e.name,t}return s.forwardRef(e)};"production"!==process.env.NODE_ENV&&(Smt.displayName="forwardRef");const Dmt=s.createContext(void 0);"production"!==process.env.NODE_ENV&&(Dmt.displayName="GridRootPropsContext");const Omt=()=>{const e=s.useContext(Dmt);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e},Pmt={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",noColumnsOverlayLabel:"No columns",noColumnsOverlayManageColumns:"Manage columns",emptyPivotOverlayLabel:"Add fields to rows, columns, and values to create a pivot table",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",toolbarPivot:"Pivot",toolbarAssistant:"AI Assistant",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",headerFilterClear:"Clear filter",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuAriaLabel:e=>`${e} column menu`,columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnMenuManagePivot:"Manage pivot",columnHeaderFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>1!==e?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",paginationRowsPerPage:"Rows per page:",paginationDisplayedRows:({from:e,to:t,count:r,estimated:o})=>{if(!o)return`${e}–${t} of ${-1!==r?r:`more than ${t}`}`;return`${e}–${t} of ${-1!==r?r:o&&o>t?`around ${o}`:`more than ${t}`}`},paginationItemAriaLabel:e=>"first"===e?"Go to first page":"last"===e?"Go to last page":"next"===e?"Go to next page":"Go to previous page",rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size",pivotToggleLabel:"Pivot",pivotRows:"Rows",pivotColumns:"Columns",pivotValues:"Values",pivotCloseButton:"Close pivot settings",pivotSearchButton:"Search fields",pivotSearchControlPlaceholder:"Search fields",pivotSearchControlLabel:"Search fields",pivotSearchControlClear:"Clear search",pivotNoFields:"No fields",pivotMenuMoveUp:"Move up",pivotMenuMoveDown:"Move down",pivotMenuMoveToTop:"Move to top",pivotMenuMoveToBottom:"Move to bottom",pivotMenuRows:"Rows",pivotMenuColumns:"Columns",pivotMenuValues:"Values",pivotMenuOptions:"Field options",pivotMenuAddToRows:"Add to Rows",pivotMenuAddToColumns:"Add to Columns",pivotMenuAddToValues:"Add to Values",pivotMenuRemove:"Remove",pivotDragToRows:"Drag here to create rows",pivotDragToColumns:"Drag here to create columns",pivotDragToValues:"Drag here to create values",pivotYearColumnHeaderName:"(Year)",pivotQuarterColumnHeaderName:"(Quarter)",aiAssistantPanelTitle:"AI Assistant",aiAssistantPanelClose:"Close AI Assistant",aiAssistantPanelNewConversation:"New conversation",aiAssistantPanelConversationHistory:"Conversation history",aiAssistantPanelEmptyConversation:"No prompt history",aiAssistantSuggestions:"Suggestions",promptFieldLabel:"Prompt",promptFieldPlaceholder:"Type a prompt…",promptFieldPlaceholderWithRecording:"Type or record a prompt…",promptFieldPlaceholderListening:"Listening for prompt…",promptFieldSpeechRecognitionNotSupported:"Speech recognition is not supported in this browser",promptFieldSend:"Send",promptFieldRecord:"Record",promptFieldStopRecording:"Stop recording",promptRerun:"Run again",promptProcessing:"Processing…",promptAppliedChanges:"Applied changes",promptChangeGroupDescription:e=>`Group by ${e}`,promptChangeAggregationLabel:(e,t)=>`${e} (${t})`,promptChangeAggregationDescription:(e,t)=>`Aggregate ${e} (${t})`,promptChangeFilterLabel:(e,t,r)=>"is any of"===t?`${e} is any of: ${r}`:`${e} ${t} ${r}`,promptChangeFilterDescription:(e,t,r)=>"is any of"===t?`Filter where ${e} is any of: ${r}`:`Filter where ${e} ${t} ${r}`,promptChangeSortDescription:(e,t)=>`Sort by ${e} (${t})`,promptChangePivotEnableLabel:"Pivot",promptChangePivotEnableDescription:"Enable pivot",promptChangePivotColumnsLabel:e=>`Columns (${e})`,promptChangePivotColumnsDescription:(e,t)=>`${e}${t?` (${t})`:""}`,promptChangePivotRowsLabel:e=>`Rows (${e})`,promptChangePivotValuesLabel:e=>`Values (${e})`,promptChangePivotValuesDescription:(e,t)=>`${e} (${t})`};function Emt(e){return Ba("MuiDataGrid",e)}const jmt=Va("MuiDataGrid",["aiAssistantPanel","aiAssistantPanelHeader","aiAssistantPanelTitleContainer","aiAssistantPanelTitle","aiAssistantPanelBody","aiAssistantPanelEmptyText","aiAssistantPanelFooter","aiAssistantPanelConversation","aiAssistantPanelConversationList","aiAssistantPanelConversationTitle","aiAssistantPanelSuggestions","aiAssistantPanelSuggestionsList","aiAssistantPanelSuggestionsItem","aiAssistantPanelSuggestionsLabel","actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","aggregationRowOverlayWrapper","autoHeight","autosizing","mainContent","withSidePanel","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","collapsible","collapsibleTrigger","collapsibleIcon","collapsiblePanel","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeader--filter","columnHeaderFilterInput","columnHeaderFilterOperatorLabel","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","columnsManagementScrollArea","columnsManagementEmptyText","container--top","container--bottom","detailPanel","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hiddenContent","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dropAbove","row--dropBelow","row--beingDragged","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowReorderIcon","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea--up","scrollArea--down","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortButton","sortIcon","shadowScrollArea","sidebar","sidebarHeader","toolbarContainer","toolbar","toolbarLabel","toolbarDivider","toolbarFilterList","toolbarQuickFilter","toolbarQuickFilterTrigger","toolbarQuickFilterControl","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pivotPanelAvailableFields","pivotPanelField","pivotPanelField--sorted","pivotPanelFieldActionContainer","pivotPanelFieldCheckbox","pivotPanelFieldDragIcon","pivotPanelFieldList","pivotPanelFieldName","pivotPanelHeader","pivotPanelPlaceholder","pivotPanelScrollArea","pivotPanelSearchContainer","pivotPanelSection","pivotPanelSectionTitle","pivotPanelSections","pivotPanelSwitch","pivotPanelSwitchLabel","prompt","promptContent","promptText","promptFeedback","promptChangeList","promptChangesToggle","promptChangesToggleIcon","promptIcon","promptIconContainer","promptError","promptAction"]);let Tmt=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}({});const Nmt=s.createContext(void 0);function Rmt(){const e=s.useContext(Nmt);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}"production"!==process.env.NODE_ENV&&(Nmt.displayName="GridApiContext");class Fmt{constructor(e=1e3){this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}register(e,t,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{"function"==typeof t&&t(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(e){const t=this.timeouts.get(e.cleanupToken);t&&(this.timeouts.delete(e.cleanupToken),clearTimeout(t))}reset(){this.timeouts&&(this.timeouts.forEach((e,t)=>{this.unregister({cleanupToken:t})}),this.timeouts=void 0)}}class Imt{constructor(){this.registry=new FinalizationRegistry(e=>{"function"==typeof e&&e()})}register(e,t,r){this.registry.register(e,t,r)}unregister(e){this.registry.unregister(e)}reset(){}}class Amt{static create(){return new Amt}}const zmt={current:"undefined"!=typeof FinalizationRegistry?new Imt:new Fmt};let Lmt=0;function Bmt(e,t,r,o){const n=s.useState(Amt.create)[0],a=s.useRef(null),i=s.useRef(null);i.current=r;const l=s.useRef(null);if(!a.current&&i.current){const r=(e,t,r)=>{t.defaultMuiPrevented||i.current?.(e,t,r)};a.current=e.current.subscribeEvent(t,r,o),Lmt+=1,l.current={cleanupToken:Lmt},zmt.current.register(n,()=>{a.current?.(),a.current=null,l.current=null},l.current)}else!i.current&&a.current&&(a.current(),a.current=null,l.current&&(zmt.current.unregister(l.current),l.current=null));s.useEffect(()=>{if(!a.current&&i.current){const r=(e,t,r)=>{t.defaultMuiPrevented||i.current?.(e,t,r)};a.current=e.current.subscribeEvent(t,r,o)}return l.current&&zmt.current&&(zmt.current.unregister(l.current),l.current=null),()=>{a.current?.(),a.current=null}},[e,t,o])}const Vmt={isFirst:!0};function $mt(e,t,r){Bmt(e,t,r,Vmt)}var Hmt,qmt={exports:{}},Wmt={};var Umt,Gmt={};!function(e){"production"===process.env.NODE_ENV?e.exports=function(){if(Hmt)return Wmt;Hmt=1;var e=l.default,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,o=e.useEffect,n=e.useLayoutEffect,a=e.useDebugValue;function i(e){var r=e.getSnapshot;e=e.value;try{var o=r();return!t(e,o)}catch(n){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),l=r({inst:{value:s,getSnapshot:t}}),c=l[0].inst,u=l[1];return n(function(){c.value=s,c.getSnapshot=t,i(c)&&u({inst:c})},[e,s,t]),o(function(){return i(c)&&u({inst:c}),e(function(){i(c)&&u({inst:c})})},[e]),a(s),s};return Wmt.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:s,Wmt}():e.exports=(Umt||(Umt=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!r(e,o)}catch(n){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=l.default,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=t.useState,n=t.useEffect,a=t.useLayoutEffect,i=t.useDebugValue,s=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(l,u){s||void 0===t.startTransition||(s=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=u();if(!c){var p=u();r(d,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var h=(p=o({inst:{value:d,getSnapshot:u}}))[0].inst,f=p[1];return a(function(){h.value=d,h.getSnapshot=u,e(h)&&f({inst:h})},[l,d,u]),n(function(){return e(h)&&f({inst:h}),l(function(){e(h)&&f({inst:h})})},[l]),i(d),d};Gmt.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Gmt)}(qmt);const Kmt=Object.is,Ymt=U,Zmt=(e,t)=>e===t||e.length===t.length&&e.every((e,r)=>e===t[r]),Xmt=()=>({state:null,equals:null,selector:null,args:void 0}),Qmt=[],Jmt=()=>null;function eyt(e,t,r=void 0,o=Kmt){"production"!==process.env.NODE_ENV&&(e.current.state||ldt(["MUI X: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]));const n=Rc(Xmt),a=null!==n.current.selector,[i,l]=s.useState(a?null:t(e,r));n.current.state=i,n.current.equals=o,n.current.selector=t;const c=n.current.args;if(n.current.args=r,a&&!((e,t)=>{let r=Object.is;return t instanceof Array?r=Zmt:t instanceof Object&&(r=Ymt),r(e,t)})(c,r)){const t=n.current.selector(e,n.current.args);n.current.equals(n.current.state,t)||(n.current.state=t,l(t))}const u=s.useCallback(()=>(n.current.subscription||(n.current.subscription=e.current.store.subscribe(()=>{const t=n.current.selector(e,n.current.args);n.current.equals(n.current.state,t)||(n.current.state=t,l(t))})),null),Qmt),d=s.useCallback(()=>(n.current.subscription||u(),()=>{n.current.subscription&&(n.current.subscription(),n.current.subscription=void 0)}),Qmt);return qmt.exports.useSyncExternalStore(d,u,Jmt),i}const tyt={compact:.7,comfortable:1.3,standard:1},ryt=umt(e=>e.density),oyt=lmt(ryt,e=>tyt[e]);function nyt(e){throw new Error("Failed assertion: should not be rendered")}const ayt={values:{xs:0,sm:600,md:900,lg:1200,xl:1536},up:e=>{const t=ayt.values;return`@media (min-width:${"number"==typeof t[e]?t[e]:e}px)`}},iyt={spacingUnit:"--DataGrid-t-spacing-unit",colors:{border:{base:"--DataGrid-t-color-border-base"},foreground:{base:"--DataGrid-t-color-foreground-base",muted:"--DataGrid-t-color-foreground-muted",accent:"--DataGrid-t-color-foreground-accent",disabled:"--DataGrid-t-color-foreground-disabled",error:"--DataGrid-t-color-foreground-error"},background:{base:"--DataGrid-t-color-background-base",overlay:"--DataGrid-t-color-background-overlay",backdrop:"--DataGrid-t-color-background-backdrop"},interactive:{hover:"--DataGrid-t-color-interactive-hover",hoverOpacity:"--DataGrid-t-color-interactive-hover-opacity",focus:"--DataGrid-t-color-interactive-focus",focusOpacity:"--DataGrid-t-color-interactive-focus-opacity",disabled:"--DataGrid-t-color-interactive-disabled",disabledOpacity:"--DataGrid-t-color-interactive-disabled-opacity",selected:"--DataGrid-t-color-interactive-selected",selectedOpacity:"--DataGrid-t-color-interactive-selected-opacity"}},header:{background:{base:"--DataGrid-t-header-background-base"}},cell:{background:{pinned:"--DataGrid-t-cell-background-pinned"}},radius:{base:"--DataGrid-t-radius-base"},typography:{font:{body:"--DataGrid-t-typography-font-body",small:"--DataGrid-t-typography-font-small",large:"--DataGrid-t-typography-font-large"},fontFamily:{base:"--DataGrid-t-typography-font-family-base"},fontWeight:{light:"--DataGrid-t-typography-font-weight-light",regular:"--DataGrid-t-typography-font-weight-regular",medium:"--DataGrid-t-typography-font-weight-medium",bold:"--DataGrid-t-typography-font-weight-bold"}},transitions:{easing:{easeIn:"--DataGrid-t-transition-easing-ease-in",easeOut:"--DataGrid-t-transition-easing-ease-out",easeInOut:"--DataGrid-t-transition-easing-ease-in-out"},duration:{short:"--DataGrid-t-transition-duration-short",base:"--DataGrid-t-transition-duration-base",long:"--DataGrid-t-transition-duration-long"}},shadows:{base:"--DataGrid-t-shadow-base",overlay:"--DataGrid-t-shadow-overlay"},zIndex:{panel:"--DataGrid-t-z-index-panel",menu:"--DataGrid-t-z-index-menu"}},syt=function e(t){if("string"==typeof t)return`var(${t})`;const r={};for(const o in t)Object.hasOwn(t,o)&&(r[o]=e(t[o]));return r}(iyt),lyt=S({breakpoints:ayt,spacing:function(e,t,r,o){if(void 0===e)return cyt(1);if(void 0===t)return cyt(e);if(void 0===r)return cyt(e)+" "+cyt(t);if(void 0===o)return cyt(e)+" "+cyt(t)+" "+cyt(r);return cyt(e)+" "+cyt(t)+" "+cyt(r)+" "+cyt(o)},transition:function(e,t){const{duration:r=lyt.transitions.duration.base,easing:o=lyt.transitions.easing.easeInOut,delay:n=0}=t??{};return e.map(e=>`${e} ${r} ${o} ${n}ms`).join(", ")},keys:iyt},syt);function cyt(e){return 0===e?"0":`calc(var(--DataGrid-t-spacing-unit) * ${e})`}const uyt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange","slotProps"],dyt=gl(nyt,{name:"MuiDataGrid",slot:"EditInputCell"})({font:lyt.typography.font.body,padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}),pyt=Smt((e,r)=>{const o=Omt(),{id:n,value:a,field:i,colDef:l,hasFocus:c,debounceMs:u=200,isProcessingProps:d,onValueChange:p,slotProps:h}=e,f=Jl(e,uyt),m=Rmt(),y=s.useRef(null),[g,v]=s.useState(a),x=(e=>{const{classes:t}=e;return rs({root:["editInputCell"]},Emt,t)})(o),b=s.useCallback(async e=>{const t=e.target.value,r=m.current.getColumn(i);let o=t;r.valueParser&&(o=r.valueParser(t,m.current.getRow(n),r,m)),v(o),m.current.setEditCellValue({id:n,field:i,value:o,debounceMs:u,unstable_skipValueParser:!0},e),p&&await p(e,t)},[m,u,i,n,p]),w=m.current.unstable_getEditCellMeta(n,i);return s.useEffect(()=>{"debouncedSetEditCellValue"!==w?.changeReason&&v(a)},[w,a]),ni(()=>{c&&y.current.focus()},[c]),t.jsx(dyt,S({as:o.slots.baseInput,inputRef:y,className:x.root,ownerState:o,fullWidth:!0,type:"number"===l.type?l.type:"text",value:g??"",onChange:b,endAdornment:d?t.jsx(o.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},f,h?.root,{ref:r}))});"production"!==process.env.NODE_ENV&&(pyt.displayName="GridEditInputCell"),"production"!==process.env.NODE_ENV&&(pyt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,changeReason:Ro.exports.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:Ro.exports.object.isRequired,debounceMs:Ro.exports.number,field:Ro.exports.string.isRequired,formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,isProcessingProps:Ro.exports.bool,isValidating:Ro.exports.bool,onValueChange:Ro.exports.func,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,slotProps:Ro.exports.object,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const hyt=e=>t.jsx(pyt,S({},e));"production"!==process.env.NODE_ENV&&(hyt.displayName="renderEditInputCell");const fyt=umt(e=>e.rows),myt=lmt(fyt,e=>e.totalRowCount),yyt=lmt(fyt,e=>e.loading),gyt=lmt(fyt,e=>e.totalTopLevelRowCount),vyt=lmt(fyt,e=>e.dataRowIdToModelLookup),xyt=lmt(vyt,(e,t)=>e[t]),byt=lmt(fyt,e=>e.tree),wyt=lmt(byt,(e,t)=>e[t]),kyt=lmt(fyt,e=>e.groupsToFetch),_yt=lmt(fyt,e=>e.groupingName),Cyt=lmt(fyt,e=>e.treeDepths),Myt=cmt(fyt,e=>{const t=Object.entries(e.treeDepths);return 0===t.length?1:(t.filter(([,e])=>e>0).map(([e])=>Number(e)).sort((e,t)=>t-e)[0]??0)+1}),Syt=lmt(fyt,e=>e.dataRowIds),Dyt=cmt(Syt,vyt,(e,t)=>e.reduce((e,r)=>t[r]?(e.push(t[r]),e):e,[])),Oyt=cmt(lmt(fyt,e=>e?.additionalRowGroups),e=>{const t=e?.pinnedRows;return{bottom:t?.bottom?.map(e=>({id:e.id,model:e.model??{}}))??[],top:t?.top?.map(e=>({id:e.id,model:e.model??{}}))??[]}}),Pyt=lmt(Oyt,e=>(e?.top?.length||0)+(e?.bottom?.length||0)),Eyt=(e,t)=>t&&e.length>1?("production"!==process.env.NODE_ENV&&ldt(["MUI X: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the Data Grid, this prop is always `true`."],"error"),[e[0]]):e,jyt=(e,t)=>r=>S({},r,{sorting:S({},r.sorting,{sortModel:Eyt(e,t)})}),Tyt=(e,t)=>{const r=e.map(e=>((e,t)=>{const r=t.current.getColumn(e.field);if(!r||null===e.sort)return null;let o;return o=r.getSortComparator?r.getSortComparator(e.sort):(e=>"desc"===e)(e.sort)?(...e)=>-1*r.sortComparator(...e):r.sortComparator,o?{getSortCellParams:e=>({id:e,field:r.field,rowNode:wyt(t,e),value:t.current.getCellValue(e,r.field),api:t.current}),comparator:o}:null})(e,t)).filter(e=>!!e);return 0===r.length?null:e=>e.map(e=>({node:e,params:r.map(t=>t.getSortCellParams(e.id))})).sort((e,t)=>{return o=e,n=t,r.reduce((e,t,r)=>{if(0!==e)return e;const a=o.params[r],i=n.params[r];return t.comparator(a.value,i.value,a,i)},0);var o,n}).map(e=>e.node.id)},Nyt=(e,t)=>{const r=e.indexOf(t);return t&&-1!==r&&r+1!==e.length?e[r+1]:e[0]},Ryt=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,Fyt=new Intl.Collator,Iyt=(e,t)=>{const r=Ryt(e,t);return null!==r?r:Number(e)-Number(t)},Ayt=(e,t)=>{const r=Ryt(e,t);return null!==r?r:e>t?1:e<t?-1:0},zyt=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","slotProps","clearButton","headerFilterMenu"];function Lyt(e){const{item:r,applyValue:o,type:n,apiRef:a,focusElementRef:i,tabIndex:l,disabled:c,slotProps:u,clearButton:d,headerFilterMenu:p}=e,h=Jl(e,zyt),f=u?.root,m=zc(),[y,g]=s.useState(Byt(r.value)),[v,x]=s.useState(!1),b=Li(),w=Omt(),k=s.useCallback(e=>{const t=Byt(e.target.value);g(t),x(!0),m.start(w.filterDebounceMs,()=>{const e=S({},r,{value:"number"!==n||Number.isNaN(Number(t))?t:Number(t),fromInput:b});o(e),x(!1)})},[m,w.filterDebounceMs,r,n,b,o]);return s.useEffect(()=>{r.fromInput===b&&null!=r.value||g(Byt(r.value))},[b,r]),t.jsxs(s.Fragment,{children:[t.jsx(w.slots.baseTextField,S({id:b,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),value:y??"",onChange:k,type:n||"text",disabled:c,slotProps:S({},f?.slotProps,{input:S({endAdornment:v?t.jsx(w.slots.loadIcon,{fontSize:"small",color:"action"}):null},f?.slotProps?.input),htmlInput:S({tabIndex:l},f?.slotProps?.htmlInput)}),inputRef:i},w.slotProps?.baseTextField,h,f)),p,d]})}function Byt(e){if(null!=e&&""!==e)return String(e)}function Vyt(e){return"number"==typeof e&&!Number.isNaN(e)}function $yt(e){return"object"==typeof e&&null!==e}function Hyt(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}"production"!==process.env.NODE_ENV&&(Lyt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number,type:Ro.exports.oneOf(["date","datetime-local","number","text"])});const qyt=(e,t,r)=>Math.max(t,Math.min(r,e));function Wyt(e,t){return Array.from({length:t-e}).map((t,r)=>e+r)}function Uyt(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}const Gyt=(e,t)=>r=>{e&&t(r)};function Kyt(e){const{item:r,applyValue:o,type:n,apiRef:a,focusElementRef:i,slotProps:l}=e,c=Li(),[u,d]=s.useState([]),[p,h]=s.useState(r.value||[]),f=Omt();s.useEffect(()=>{const e=r.value??[];h(e.map(String))},[r.value]);const m=s.useCallback((e,t)=>{h(t.map(String)),o(S({},r,{value:[...t.map(e=>"number"===n?Number(e):e)]}))},[o,r,n]),y=s.useCallback((e,t)=>{d(""===t?[]:[t])},[d]),g=f.slots.baseAutocomplete;return t.jsx(g,S({multiple:!0,freeSolo:!0,options:u,id:c,value:p,onChange:m,onInputChange:y,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:n||"text",inputRef:i}}},l?.root))}"production"!==process.env.NODE_ENV&&(Kyt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number,type:Ro.exports.oneOf(["date","datetime-local","number","text"])});var Yyt=function(e){return e.Cell="cell",e.Row="row",e}(Yyt||{}),Zyt=function(e){return e.Edit="edit",e.View="view",e}(Zyt||{}),Xyt=function(e){return e.Edit="edit",e.View="view",e}(Xyt||{}),Qyt=function(e){return e.And="and",e.Or="or",e}(Qyt||{});class Jyt{constructor(e){this.data=void 0,this.data=e.ids}has(e){return this.data.has(e)}select(e){this.data.add(e)}unselect(e){this.data.delete(e)}}class egt{constructor(e){this.data=void 0,this.data=e.ids}has(e){return!this.data.has(e)}select(e){this.data.delete(e)}unselect(e){this.data.add(e)}}const tgt=e=>"include"===e.type?new Jyt(e):new egt(e);var rgt=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(rgt||{}),ogt=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(ogt||{}),ngt=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(ngt||{}),agt=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(agt||{});function igt(e){return void 0!==e.field}const sgt={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},lgt=()=>({items:[],logicOperator:Qyt.And,quickFilterValues:[],quickFilterLogicOperator:Qyt.And});function cgt(e){return{current:e.current.getPublicApi()}}let ugt=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const dgt={left:[],right:[]},pgt=umt(e=>e.isRtl),hgt=umt(e=>e.props.listView??!1),fgt=umt(e=>e.listViewColumn),mgt=umt(e=>e.columns),ygt=lmt(mgt,e=>e.orderedFields),ggt=lmt(mgt,e=>e.lookup),vgt=cmt(ygt,ggt,(e,t)=>e.map(e=>t[e])),xgt=lmt(mgt,e=>e.columnVisibilityModel),bgt=lmt(mgt,e=>e.initialColumnVisibilityModel),wgt=cmt(vgt,xgt,hgt,fgt,(e,t,r,o)=>r&&o?[o]:e.filter(e=>!1!==t[e.field])),kgt=cmt(wgt,e=>e.map(e=>e.field)),_gt=umt(e=>e.pinnedColumns),Cgt=cmt(_gt,ygt,pgt,(e,t,r)=>Sgt(e,t,r)),Mgt=cmt(mgt,_gt,kgt,pgt,hgt,(e,t,r,o,n)=>{if(n)return dgt;const a=Sgt(t,r,o);return{left:a.left.map(t=>e.lookup[t]),right:a.right.map(t=>e.lookup[t])}});function Sgt(e,t,r){if(!Array.isArray(e.left)&&!Array.isArray(e.right))return dgt;if(0===e.left?.length&&0===e.right?.length)return dgt;const o=(e,t)=>Array.isArray(e)?e.filter(e=>t.includes(e)):[],n=o(e.left,t),a=t.filter(e=>!n.includes(e)),i=o(e.right,a);return r?{left:i,right:n}:{left:n,right:i}}const Dgt=cmt(wgt,e=>{const t=[];let r=0;for(let o=0;o<e.length;o+=1)t.push(r),r+=e[o].computedWidth;return t}),Ogt=cmt(vgt,e=>e.filter(e=>e.filterable)),Pgt=cmt(vgt,e=>e.reduce((e,t)=>(t.filterable&&(e[t.field]=t),e),{})),Egt=cmt(vgt,e=>e.some(e=>void 0!==e.colSpan));let jgt;const Tgt=(e,t)=>{const r=S({},e);if(null==r.id&&(r.id=Math.round(1e5*Math.random())),null==r.operator){const e=ggt(t)[r.field];r.operator=e&&e.filterOperators[0].value}return r},Ngt=(e,t,r)=>{const o=e.items.length>1;let n;o&&t?("production"!==process.env.NODE_ENV&&ldt(["MUI X: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the Data Grid, this prop is always `true`."],"error"),n=[e.items[0]]):n=e.items;const a=o&&n.some(e=>null==e.id),i=n.some(e=>null==e.operator);return"production"!==process.env.NODE_ENV&&a&&ldt("MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),"production"!==process.env.NODE_ENV&&i&&ldt("MUI X: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),i||a?S({},e,{items:n.map(e=>Tgt(e,r))}):e.items!==n?S({},e,{items:n}):e},Rgt=(e,t,r)=>o=>S({},o,{filterModel:Ngt(e,t,r)}),Fgt=e=>"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,Igt=(e,t)=>{if(!e.field||!e.operator)return null;const r=t.current.getColumn(e.field);if(!r)return null;let o;if(r.valueParser){const n=r.valueParser;o=Array.isArray(e.value)?e.value?.map(e=>n(e,void 0,r,t)):n(e.value,void 0,r,t)}else o=e.value;const{ignoreDiacritics:n}=t.current.rootProps;n&&(o=Fgt(o));const a=S({},e,{value:o}),i=r.filterOperators;if(!i?.length)throw new Error(`MUI X: No filter operators found for column '${r.field}'.`);const s=i.find(e=>e.value===a.operator);if(!s)throw new Error(`MUI X: No filter operator found for column '${r.field}' and operator value '${a.operator}'.`);const l=cgt(t),c=s.getApplyFilterFn(a,r);return"function"!=typeof c?null:{item:a,fn:e=>{let o=t.current.getRowValue(e,r);return n&&(o=Fgt(o)),c(o,e,r,l)}}};let Agt=1;const zgt=(e,t,r)=>{const{items:o}=e,n=o.map(e=>Igt(e,t)).filter(e=>!!e);if(0===n.length)return null;if(r||!function(){if(void 0!==jgt)return jgt;try{jgt=new Function("return true")()}catch(e){jgt=!1}return jgt}())return(e,t)=>{const r={};for(let o=0;o<n.length;o+=1){const a=n[o];t&&!t(a.item.field)||(r[a.item.id]=a.fn(e))}return r};const a=new Function("appliers","row","shouldApplyFilter",`"use strict";\n${n.map((e,t)=>`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`).join("\n")}\n\nconst result$$ = {\n${n.map((e,t)=>` ${JSON.stringify(String(e.item.id))}: !shouldApply${t} ? false : appliers[${t}].fn(row),`).join("\n")}\n};\n\nreturn result$$;`.replaceAll("$$",String(Agt)));Agt+=1;return(e,t)=>a(n,e,t)},Lgt=e=>e.quickFilterExcludeHiddenColumns??!0,Bgt=(e,t,r)=>{const o=zgt(e,t,r),n=((e,t)=>{const r=e.quickFilterValues?.filter(Boolean)??[];if(0===r.length)return null;const o=Lgt(e)?kgt(t):ygt(t),n=[],{ignoreDiacritics:a}=t.current.rootProps,i=cgt(t);return o.forEach(e=>{const o=t.current.getColumn(e),s=o?.getApplyQuickFilterFn;s&&n.push({column:o,appliers:r.map(e=>{const t=a?Fgt(e):e;return{fn:s(t,o,i)}})})}),function(e,o){const s={};e:for(let l=0;l<r.length;l+=1){const c=r[l];for(let r=0;r<n.length;r+=1){const{column:u,appliers:d}=n[r],{field:p}=u;if(o&&!o(p))continue;const h=d[l];let f=t.current.getRowValue(e,u);if(null!==h.fn&&(a&&(f=Fgt(f)),h.fn(f,e,u,i))){s[c]=!0;continue e}}s[c]=!1}return s}})(e,t);return function(e,t,r){r.passingFilterItems=o?.(e,t)??null,r.passingQuickFilterValues=n?.(e,t)??null}},Vgt=e=>null!=e,$gt=(e,t,r,o,n)=>{const a=((e,t,r)=>(e.cleanedFilterItems||(e.cleanedFilterItems=r.filter(e=>null!==Igt(e,t))),e.cleanedFilterItems))(n,o,r.items),i=e.filter(Vgt),s=t.filter(Vgt);if(i.length>0){const e=e=>i.some(t=>t[e.id]);if((r.logicOperator??lgt().logicOperator)===Qyt.And){if(!a.every(e))return!1}else{if(!a.some(e))return!1}}if(s.length>0&&null!=r.quickFilterValues){const e=e=>s.some(t=>t[e]);if((r.quickFilterLogicOperator??lgt().quickFilterLogicOperator)===Qyt.And){if(!r.quickFilterValues.every(e))return!1}else{if(!r.quickFilterValues.some(e))return!1}}return!0},Hgt=(e,t)=>r=>{if(!r.value)return null;const o=e?r.value:r.value.trim(),n=new RegExp(Hyt(o),"i");return e=>{if(null==e)return t;const r=n.test(String(e));return t?!r:r}},qgt=(e,t)=>r=>{if(!r.value)return null;const o=e?r.value:r.value.trim(),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>{if(null==e)return t;const r=0===n.compare(o,e.toString());return t?!r:r}},Wgt=e=>()=>t=>{const r=""===t||null==t;return e?!r:r},Ugt={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:(e,t)=>{const r=Ryt(e,t);return null!==r?r:"string"==typeof e?Fyt.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:((e=!1)=>[{value:"contains",getApplyFilterFn:Hgt(e,!1),InputComponent:Lyt},{value:"doesNotContain",getApplyFilterFn:Hgt(e,!0),InputComponent:Lyt},{value:"equals",getApplyFilterFn:qgt(e,!1),InputComponent:Lyt},{value:"doesNotEqual",getApplyFilterFn:qgt(e,!0),InputComponent:Lyt},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),o=new RegExp(`^${Hyt(r)}.*$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:Lyt},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),o=new RegExp(`.*${Hyt(r)}$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:Lyt},{value:"isEmpty",getApplyFilterFn:Wgt(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:Wgt(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const r=e?t.value:t.value.map(e=>e.trim()),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&r.some(t=>0===o.compare(t,e.toString()||""))},InputComponent:Kyt}])(),renderEditCell:hyt,getApplyQuickFilterFn:e=>{if(!e)return null;const t=new RegExp(Hyt(e),"i");return(e,r,o,n)=>{let a=n.current.getRowFormattedValue(r,o);return n.current.ignoreDiacritics&&(a=Fgt(a)),null!=a&&t.test(a.toString())}}};function Ggt(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}const Kgt=e=>0===e.indexOf("Arrow")||0===e.indexOf("Page")||" "===e||"Home"===e||"End"===e,Ygt=e=>"Tab"===e||"Escape"===e;function Zgt(e){return(e.ctrlKey||e.metaKey)&&"V"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}const Xgt=s.createContext(void 0);"production"!==process.env.NODE_ENV&&(Xgt.displayName="GridConfigurationContext");const Qgt=()=>{const e=s.useContext(Xgt);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e},Jgt=s.createContext({className:"unset",tag:t.jsx("style",{href:"/unset"})});function evt(){return s.useContext(Jgt).className}function tvt(e){const r=Qgt(),o=Omt(),n=r.hooks.useCSSVariables(),a=s.useMemo(()=>{const e=`MuiDataGridVariables-${n.id}`,r=`.${e}{${function(e){let t="";for(const r in e)Object.hasOwn(e,r)&&void 0!==e[r]&&(t+=`${r}:${e[r]};`);return t}(n.variables)}}`;return{className:e,tag:t.jsx("style",{href:`/${e}`,nonce:o.nonce,children:r})}},[o.nonce,n]);return t.jsx(Jgt.Provider,{value:a,children:e.children})}"production"!==process.env.NODE_ENV&&(Jgt.displayName="CSSVariablesContext");const rvt=["open","target","onClose","children","position","className","onExited"],ovt=gl(nyt,{name:"MuiDataGrid",slot:"Menu"})({zIndex:lyt.zIndex.menu,[`& .${jmt.menuList}`]:{outline:0}});function nvt(e){const{open:r,target:o,onClose:n,children:a,position:i,className:l,onExited:c}=e,u=Jl(e,rvt),d=Rmt(),p=Omt(),h=(e=>{const{classes:t}=e;return rs({root:["menu"]},Emt,t)})(p),f=evt(),m=s.useRef(null);ni(()=>{r?m.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(m.current?.focus?.(),m.current=null)},[r]),s.useEffect(()=>{const e=r?"menuOpen":"menuClose";d.current.publishEvent(e,{target:o})},[d,r,o]);return t.jsx(ovt,S({as:p.slots.basePopper,className:za(h.root,l,f),ownerState:p,open:r,target:o,transition:!0,placement:i,onClickAway:e=>{e.target&&(o===e.target||o?.contains(e.target))||n(e)},onExited:c,clickAwayMouseEvent:"onMouseDown",onKeyDown:e=>{Ygt(e.key)&&n(e)}},u,p.slotProps?.basePopper,{children:a}))}"production"!==process.env.NODE_ENV&&(nvt.propTypes={children:Ro.exports.node,className:Ro.exports.string,onClose:Ro.exports.func.isRequired,onExited:Ro.exports.func,open:Ro.exports.bool.isRequired,position:Ro.exports.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),target:Vd});const avt=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"];function ivt(e){const{colDef:r,id:o,hasFocus:n,tabIndex:a,position:i="bottom-end",focusElementRef:l}=e,c=Jl(e,avt),[u,d]=s.useState(-1),[p,h]=s.useState(!1),f=Rmt(),m=s.useRef(null),y=s.useRef(null),g=s.useRef(!1),v=s.useRef({}),x=Ni(),b=Li(),w=Li(),k=Omt();if(!(e=>"function"==typeof e.getActions)(r))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const _=r.getActions(f.current.getRowParams(o)),C=_.filter(e=>!e.props.showInMenu),M=_.filter(e=>e.props.showInMenu),D=C.length+(M.length?1:0);s.useLayoutEffect(()=>{n||Object.entries(v.current).forEach(([e,t])=>{t?.stop({},()=>{delete v.current[e]})})},[n]),s.useEffect(()=>{if(u<0||!m.current)return;if(u>=m.current.children.length)return;m.current.children[u].focus({preventScroll:!0})},[u]),s.useEffect(()=>{n||(d(-1),g.current=!1)},[n]),s.useImperativeHandle(l,()=>({focus(){if(!g.current){const e=_.findIndex(e=>!e.props.disabled);d(e)}}}),[_]),s.useEffect(()=>{u>=D&&d(D-1)},[u,D]);const O=()=>{h(!1)},P=e=>t=>{v.current[e]=t},E=(e,t)=>r=>{d(e),g.current=!0,t&&t(r)};return t.jsxs("div",S({role:"menu",ref:m,tabIndex:-1,className:jmt.actionsCell,onKeyDown:e=>{if(D<=1)return;const t=(e,r)=>{if(e<0||e>_.length)return e;const o=("left"===r?-1:1)*(x?-1:1);return _[e+o]?.props.disabled?t(e+o,r):e+o};let r=u;"ArrowRight"===e.key?r=t(u,"right"):"ArrowLeft"===e.key&&(r=t(u,"left")),r<0||r>=D||r!==u&&(e.preventDefault(),e.stopPropagation(),d(r))}},c,{children:[C.map((e,t)=>s.cloneElement(e,{key:t,touchRippleRef:P(t),onClick:E(t,e.props.onClick),tabIndex:u===t?a:-1})),M.length>0&&w&&t.jsx(k.slots.baseIconButton,S({ref:y,id:w,"aria-label":f.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?b:void 0,role:"menuitem",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),p?O():(h(!0),d(D-1),g.current=!0)},touchRippleRef:P(w),tabIndex:u===C.length?a:-1},k.slotProps?.baseIconButton,{children:t.jsx(k.slots.moreActionsIcon,{fontSize:"small"})})),M.length>0&&t.jsx(nvt,{open:p,target:y.current,position:i,onClose:O,children:t.jsx(k.slots.baseMenuList,{id:b,className:jmt.menuList,"aria-labelledby":w,autoFocusItem:!0,children:M.map((e,t)=>s.cloneElement(e,{key:t,closeMenu:O}))})})]}))}"production"!==process.env.NODE_ENV&&(ivt.propTypes={api:Ro.exports.object,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:Ro.exports.shape({focus:Ro.exports.func.isRequired})})]),formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,position:Ro.exports.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const svt=e=>t.jsx(ivt,S({},e));"production"!==process.env.NODE_ENV&&(svt.displayName="renderActionsCell");const lvt="actions",cvt=S({},Ugt,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:svt,getApplyQuickFilterFn:()=>null}),uvt="auto-generated-group-node-root",dvt=Symbol("mui.id_autogenerated"),pvt=()=>({type:"group",id:uvt,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});const hvt=(e,t,r)=>{const o=t?t(e):e.id;return function(e,t,r="A row was provided without id in the rows prop:"){if(null==e)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",r,JSON.stringify(t)].join("\n"))}(o,e,r),o},fvt=({rows:e,getRowId:t,loading:r,rowCount:o})=>{const n={type:"full",rows:[]},a={};for(let i=0;i<e.length;i+=1){const r=e[i],o=hvt(r,t);a[o]=r,n.rows.push(o)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:r,rowCountPropBeforePartialUpdates:o,updates:n,dataRowIdToModelLookup:a}},mvt=({tree:e,rowCountProp:t=0})=>{const r=e[uvt];return Math.max(t,r.children.length+(null==r.footerId?0:1))},yvt=({apiRef:e,rowCountProp:t=0,loadingProp:r,previousTree:o,previousTreeDepths:n,previousGroupsToFetch:a})=>{const i=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u,groupsToFetch:d=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:o,previousTreeDepths:n,updates:i.updates,dataRowIdToModelLookup:i.dataRowIdToModelLookup,previousGroupsToFetch:a}),p=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIds:c,dataRowIdToModelLookup:i.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},S({},p,{totalRowCount:Math.max(t,p.dataRowIds.length),totalTopLevelRowCount:mvt({tree:p.tree,rowCountProp:t}),groupingName:u,loading:r,groupsToFetch:d})},gvt=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,vvt=(e,t,r,o)=>{const n=e[t];if("group"!==n.type)return[];const a=[];for(let i=0;i<n.children.length;i+=1){const t=n.children[i];if(r&&gvt(e[t])||a.push(t),o)continue;const s=vvt(e,t,r,o);for(let e=0;e<s.length;e+=1)a.push(s[e])}return r||null==n.footerId||a.push(n.footerId),a},xvt=({previousCache:e,getRowId:t,updates:r,groupKeys:o})=>{if("full"===e.updates.type)throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const n=new Map;r.forEach(e=>{const r=hvt(e,t,"A row was provided without id when calling updateRows():");n.has(r)?n.set(r,S({},n.get(r),e)):n.set(r,e)});const a={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:S({},e.updates.idToActionLookup),groupKeys:o},i=S({},e.dataRowIdToModelLookup),s={insert:{},modify:{},remove:{}};n.forEach((e,t)=>{const r=a.idToActionLookup[t];if("delete"===e._action){if("remove"===r||!i[t])return;return null!=r&&(s[r][t]=!0),a.actions.remove.push(t),void delete i[t]}const o=i[t];if(o)return"remove"===r?(s.remove[t]=!0,a.actions.modify.push(t)):null==r&&a.actions.modify.push(t),void(i[t]=S({},o,e));"remove"===r?(s.remove[t]=!0,a.actions.insert.push(t)):null==r&&a.actions.insert.push(t),i[t]=e});const l=Object.keys(s);for(let c=0;c<l.length;c+=1){const e=l[c],t=s[e];Object.keys(t).length>0&&(a.actions[e]=a.actions[e].filter(e=>!t[e]))}return{dataRowIdToModelLookup:i,updates:a,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}},bvt="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function wvt(e,t,r){const o=[];return t.forEach(t=>{const n=hvt(t,r,"A row was provided without id when calling updateRows():"),a=wyt(e,n);if("pinnedRow"===a?.type){const r=e.current.caches.pinnedRows,o=r.idLookup[n];o&&(r.idLookup[n]=S({},o,t))}else o.push(t)}),o}let kvt=!1;const _vt=(e,t,r)=>"number"==typeof e&&e>0?e:("production"===process.env.NODE_ENV||kvt||null==e||(kvt=!0),t),Cvt=(["MUI X: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),["MUI X: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n"),"__tree_data_group__"),Mvt="__row_group_by_columns_group__",Svt="__detail_panel_toggle__";let Dvt=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const Ovt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"];function Pvt(e){const{value:r,rowNode:o}=e,n=Jl(e,Ovt),a=Rmt(),i=Omt(),l=(e=>{const{classes:t}=e;return rs({root:["booleanCell"]},Emt,t)})({classes:i.classes}),c=eyt(a,Myt)>0&&"group"===o.type&&!1===i.treeData,u=s.useMemo(()=>r?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,r]);return c&&void 0===r?null:t.jsx(u,S({fontSize:"small",className:l.root,titleAccess:a.current.getLocaleText(r?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(r)},n))}"production"!==process.env.NODE_ENV&&(Pvt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:Ro.exports.shape({focus:Ro.exports.func.isRequired})})]),formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,hideDescendantCount:Ro.exports.bool,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const Evt=s.memo(Pvt);"production"!==process.env.NODE_ENV&&(Evt.displayName="GridBooleanCell");const jvt=e=>e.field!==Mvt&&gvt(e.rowNode)?"":t.jsx(Evt,S({},e));"production"!==process.env.NODE_ENV&&(jvt.displayName="renderBooleanCell");const Tvt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function Nvt(e){const{id:r,value:o,field:n,className:a,hasFocus:i,onValueChange:l}=e,c=Jl(e,Tvt),u=Rmt(),d=s.useRef(null),p=Li(),[h,f]=s.useState(o),m=Omt(),y=(e=>{const{classes:t}=e;return rs({root:["editBooleanCell"]},Emt,t)})({classes:m.classes}),g=s.useCallback(async e=>{const t=e.target.checked;l&&await l(e,t),f(t),await u.current.setEditCellValue({id:r,field:n,value:t},e)},[u,n,r,l]);return s.useEffect(()=>{f(o)},[o]),ni(()=>{i&&d.current.focus()},[i]),t.jsx("label",S({htmlFor:p,className:za(y.root,a)},c,{children:t.jsx(m.slots.baseCheckbox,S({id:p,inputRef:d,checked:Boolean(h),onChange:g,size:"small"},m.slotProps?.baseCheckbox))}))}"production"!==process.env.NODE_ENV&&(Nvt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,changeReason:Ro.exports.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,isProcessingProps:Ro.exports.bool,isValidating:Ro.exports.bool,onValueChange:Ro.exports.func,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const Rvt=e=>t.jsx(Nvt,S({},e));"production"!==process.env.NODE_ENV&&(Rvt.displayName="renderEditBooleanCell");const Fvt=["item","applyValue","apiRef","focusElementRef","isFilterActive","headerFilterMenu","clearButton","tabIndex","slotProps"];function Ivt(e){const{item:r,applyValue:o,apiRef:n,focusElementRef:a,headerFilterMenu:i,clearButton:l,tabIndex:c,slotProps:u}=e,d=Jl(e,Fvt),[p,h]=s.useState(Avt(r.value)),f=Omt(),m=Li(),y=Li(),g=f.slotProps?.baseSelect||{},v=g.native??!1,x=f.slotProps?.baseSelectOption||{},b=s.useCallback(e=>{const t=Avt(e.target.value);h(t),o(S({},r,{value:t}))},[o,r]);s.useEffect(()=>{h(Avt(r.value))},[r.value]);const w=u?.root.label??n.current.getLocaleText("filterPanelInputLabel"),k=u?.root.slotProps;return t.jsxs(s.Fragment,{children:[t.jsxs(f.slots.baseSelect,S({fullWidth:!0,labelId:m,id:y,label:w,value:void 0===p?"":String(p),onChange:b,native:v,slotProps:{htmlInput:S({ref:a,tabIndex:c},k?.htmlInput)}},g,d,u?.root,{children:[t.jsx(f.slots.baseSelectOption,S({},x,{native:v,value:"",children:n.current.getLocaleText("filterValueAny")})),t.jsx(f.slots.baseSelectOption,S({},x,{native:v,value:"true",children:n.current.getLocaleText("filterValueTrue")})),t.jsx(f.slots.baseSelectOption,S({},x,{native:v,value:"false",children:n.current.getLocaleText("filterValueFalse")}))]})),i,l]})}function Avt(e){return"true"===String(e).toLowerCase()||"false"!==String(e).toLowerCase()&&void 0}"production"!==process.env.NODE_ENV&&(Ivt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:xu,headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number});const zvt=S({},Ugt,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:jvt,renderEditCell:Rvt,sortComparator:Iyt,valueFormatter:(e,t,r,o)=>e?o.current.getLocaleText("booleanCellTrueLabel"):o.current.getLocaleText("booleanCellFalseLabel"),filterOperators:[{value:"is",getApplyFilterFn:e=>{const t=Avt(e.value);return void 0===t?null:e=>Boolean(e)===t},InputComponent:Ivt}],getApplyQuickFilterFn:()=>null,aggregable:!1,pastedValueParser:e=>(e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}})(e)});function Lvt(e){for(const t in e)return!1;return!0}const Bvt=umt(e=>e.sorting),Vvt=lmt(Bvt,e=>e.sortedRows),$vt=cmt(Vvt,vyt,byt,(e,t,r)=>e.reduce((e,o)=>{const n=t[o];if(n)e.push({id:o,model:n});else{const t=r[o];t&&gvt(t)&&e.push({id:o,model:{[dvt]:o}})}return e},[])),Hvt=lmt(Bvt,e=>e.sortModel),qvt=cmt(Hvt,e=>{const t=e.reduce((t,r,o)=>(t[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},t),{});return t}),Wvt=cmt(Vvt,e=>e.reduce((e,t,r)=>(e[t]=r,e),Object.create(null))),Uvt=umt(e=>e.filter),Gvt=lmt(Uvt,e=>e.filterModel),Kvt=lmt(Gvt,e=>e.quickFilterValues),Yvt=umt(e=>e.visibleRowsLookup),Zvt=lmt(Uvt,e=>e.filteredRowsLookup),Xvt=lmt(Uvt,e=>e.filteredChildrenCountLookup),Qvt=lmt(Uvt,e=>e.filteredDescendantCountLookup),Jvt=cmt(Yvt,$vt,(e,t)=>Lvt(e)?t:t.filter(t=>!1!==e[t.id])),ext=cmt(Jvt,e=>e.map(e=>e.id)),txt=cmt(Zvt,$vt,(e,t)=>Lvt(e)?t:t.filter(t=>!1!==e[t.id])),rxt=cmt(txt,e=>e.map(e=>e.id)),oxt=cmt(ext,byt,(e,t)=>{const r={};let o=0;return e.reduce((e,n)=>{const a=t[n];return r[a.depth]||(r[a.depth]=0),a.depth>o&&(r[a.depth]=0),o=a.depth,r[a.depth]+=1,e[n]=r[a.depth],e},{})}),nxt=cmt(Jvt,byt,Myt,(e,t,r)=>r<2?e:e.filter(e=>0===t[e.id]?.depth)),axt=lmt(Jvt,e=>e.length),ixt=lmt(nxt,e=>e.length),sxt=lmt(txt,e=>e.length);lmt(sxt,ixt,(e,t)=>e-t);const lxt=cmt(Gvt,ggt,(e,t)=>e.items?.filter(e=>{if(!e.field)return!1;const r=t[e.field];if(!r?.filterOperators||0===r?.filterOperators?.length)return!1;const o=r.filterOperators.find(t=>t.value===e.operator);return!!o&&(!o.InputComponent||null!=e.value&&""!==e.value?.toString())})),cxt=cmt(lxt,e=>e.reduce((e,t)=>(e[t.field]?e[t.field].push(t):e[t.field]=[t],e),{})),uxt=umt(e=>e.rowSelection),dxt=cmt(uxt,tgt),pxt=lmt(uxt,sxt,(e,t)=>"include"===e.type?e.ids.size:t-e.ids.size),hxt=cmt(uxt,vyt,Syt,(e,t,r)=>{const o=new Map;if("include"===e.type)for(const n of e.ids)o.set(n,t[n]);else for(let n=0;n<r.length;n+=1){const a=r[n];e.ids.has(a)||o.set(a,t[a])}return o});function fxt(e,t){const r=byt(e),o=Vvt(e),n=Zvt(e),a=r[t];if(!a||"group"!==a.type)return[];const i=[],s=o.findIndex(e=>e===t)+1;for(let l=s;l<o.length&&r[o[l]]?.depth>a.depth;l+=1){const t=o[l];!1!==n[t]&&e.current.isRowSelectable(t)&&i.push(t)}return i}const mxt=lmt(byt,Zvt,dxt,(e,t,r,{groupId:o,autoSelectParents:n})=>{const a=e[o];if(!a||"group"!==a.type||r.has(o))return{isIndeterminate:!1,isChecked:r.has(o)};let i=!1,s=!1;const l=o=>{if(!1===t[o]||i&&s)return;const n=e[o];"group"===n?.type&&n.children.forEach(l),r.has(o)?i=!0:s=!0};return l(o),{isIndeterminate:i&&s,isChecked:!!n&&(i&&!s)}});function yxt(e){return e.signature===Tmt.DataGrid?e.checkboxSelection&&!0!==e.disableMultipleRowSelection:!e.disableMultipleRowSelection}const gxt=(e,t,r,o,n,a,i=dxt(e))=>{const s=Zvt(e),l=new Set([]);if((o||n)&&!1!==s[r]){if(o){const o=t[r];if("group"===o?.type){fxt(e,r).forEach(e=>{a(e),l.add(e)})}}if(n){const o=e=>{if(!i.has(e)&&!l.has(e))return!1;const r=t[e];return!!r&&("group"!==r.type||r.children.every(o))},n=r=>{const i=((e,t,r)=>{const o=e[r];if(!o)return[];const n=o.parent;return null==n?[]:e[n].children.filter(e=>e!==r&&!1!==t[e])})(t,s,r);if(0===i.length||i.every(o)){const o=t[r],i=o?.parent;null!=i&&i!==uvt&&e.current.isRowSelectable(i)&&(a(i),l.add(i),n(i))}};n(r)}}},vxt=(e,t,r,o,n,a)=>{const i=dxt(e);if(n||o){if(n){const e=((e,t)=>{const r=[];let o=t;for(;null!=o&&o!==uvt;){const t=e[o];if(!t)return r;r.push(o),o=t.parent}return r})(t,r);e.forEach(e=>{i.has(e)&&a(e)})}if(o){const o=t[r];if("group"===o?.type){fxt(e,r).forEach(e=>{a(e)})}}}},xxt=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],bxt=Smt(function(e,r){const{field:o,id:n,rowNode:a,tabIndex:i}=e,l=Jl(e,xxt),c=Rmt(),u=Omt(),d=(e=>{const{classes:t}=e;return rs({root:["checkboxInput"]},Emt,t)})({classes:u.classes});s.useLayoutEffect(()=>{if(0===i){const e=c.current.getCellElement(n,o);e&&(e.tabIndex=-1)}},[c,i,n,o]);const p=s.useCallback(e=>{" "===e.key&&e.stopPropagation()},[]),h=c.current.isRowSelectable(n),{isIndeterminate:f,isChecked:m}=eyt(c,mxt,{groupId:n,autoSelectParents:u.rowSelectionPropagation?.parents??!1});if("footer"===a.type||"pinnedRow"===a.type)return null;const y=c.current.getLocaleText(m&&!f?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return t.jsx(u.slots.baseCheckbox,S({tabIndex:i,checked:m&&!f,onChange:e=>{const t={value:e.target.checked,id:n};c.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:d.root,slotProps:{htmlInput:{"aria-label":y,name:"select_row"}},onKeyDown:p,indeterminate:f,disabled:!h},u.slotProps?.baseCheckbox,l,{ref:r}))});"production"!==process.env.NODE_ENV&&(bxt.displayName="GridCellCheckboxForwardRef"),"production"!==process.env.NODE_ENV&&(bxt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:Ro.exports.shape({focus:Ro.exports.func.isRequired})})]),formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const wxt=bxt,kxt=umt(e=>e.focus),_xt=lmt(kxt,e=>e.cell),Cxt=lmt(kxt,e=>e.columnHeader),Mxt=lmt(kxt,e=>e.columnHeaderFilter),Sxt=lmt(kxt,e=>e.columnGroupHeader),Dxt=umt(e=>e.tabIndex),Oxt=lmt(Dxt,e=>e.cell),Pxt=lmt(Dxt,e=>e.columnHeader),Ext=lmt(Dxt,e=>e.columnHeaderFilter),jxt=lmt(Dxt,e=>e.columnGroupHeader),Txt=(e,t,r)=>t>0&&e>0?Math.ceil(e/t):-1===e?r+2:0,Nxt=e=>({page:0,pageSize:e?0:100}),Rxt=(e,t)=>{if(t===Tmt.DataGrid&&e>100)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"))},Fxt=umt(e=>e.pagination),Ixt=lmt(Fxt,e=>e.enabled&&"client"===e.paginationMode),Axt=lmt(Fxt,e=>e.paginationModel),zxt=lmt(Fxt,e=>e.rowCount),Lxt=lmt(Fxt,e=>e.meta),Bxt=lmt(Axt,e=>e.page),Vxt=lmt(Axt,e=>e.pageSize),$xt=lmt(Axt,zxt,(e,t)=>Txt(t,e.pageSize,e.page)),Hxt=cmt(Ixt,Axt,byt,Myt,Jvt,nxt,(e,t,r,o,n,a)=>{if(!e)return null;const i=a.length,s=Math.min(t.pageSize*t.page,i-1),l=-1===t.pageSize?i-1:Math.min(s+t.pageSize-1,i-1);if(-1===s||-1===l)return null;if(o<2)return{firstRowIndex:s,lastRowIndex:l};const c=a[s],u=l-s+1,d=n.findIndex(e=>e.id===c.id);let p=d,h=0;for(;p<n.length&&h<=u;){const e=n[p],t=r[e.id]?.depth;void 0===t?p+=1:((h<u||t>0)&&(p+=1),0===t&&(h+=1))}return{firstRowIndex:d,lastRowIndex:p-1}}),qxt=cmt(Jvt,Hxt,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),Wxt=cmt(ext,Hxt,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),Uxt=cmt(Ixt,Hxt,qxt,Jvt,(e,t,r,o)=>e?{rows:r,range:t,rowIdToIndexMap:r.reduce((e,t,r)=>(e.set(t.id,r),e),new Map)}:{rows:o,range:0===o.length?null:{firstRowIndex:0,lastRowIndex:o.length-1},rowIdToIndexMap:o.reduce((e,t,r)=>(e.set(t.id,r),e),new Map)}),Gxt=["field","colDef"],Kxt=Smt(function(e,r){const o=Jl(e,Gxt),[,n]=s.useState(!1),a=Rmt(),i=Omt(),l=(e=>{const{classes:t}=e;return rs({root:["checkboxInput"]},Emt,t)})({classes:i.classes}),c=eyt(a,Pxt),u=eyt(a,uxt),d=eyt(a,ext),p=eyt(a,Wxt),h=s.useMemo(()=>{const e=i.isRowSelectable;if("function"!=typeof e)return u;if("exclude"===u.type)return u;const t={type:"include",ids:new Set};for(const r of u.ids)i.keepNonExistentRowsSelected&&t.ids.add(r),a.current.getRow(r)&&e(a.current.getRowParams(r))&&t.ids.add(r);return t},[a,i.isRowSelectable,i.keepNonExistentRowsSelected,u]),f=s.useMemo(()=>{const e=i.pagination&&i.checkboxSelectionVisibleOnly&&"server"!==i.paginationMode?p:d,t=new Set;for(let r=0;r<e.length;r+=1){const o=e[r];a.current.getRow(o)&&(a.current.isRowSelectable(o)&&t.add(o))}return t},[a,i.pagination,i.paginationMode,i.checkboxSelectionVisibleOnly,p,d]),m=s.useMemo(()=>{const e=tgt(h);let t=0;for(const r of f)e.has(r)&&(t+=1);return t},[h,f]),y=s.useMemo(()=>{if(0===h.ids.size)return!1;const e=tgt(h);for(const t of f)if(!e.has(t))return!0;return!1},[h,f]),g=m>0,v=null!==c&&c.field===e.field?0:-1;s.useLayoutEffect(()=>{const t=a.current.getColumnHeaderElement(e.field);0===v&&t&&(t.tabIndex=-1)},[v,a,e.field]);const x=s.useCallback(e=>{" "===e.key&&a.current.publishEvent("headerSelectionCheckboxChange",{value:!g})},[a,g]),b=s.useCallback(()=>{n(e=>!e)},[]);s.useEffect(()=>a.current.subscribeEvent("rowSelectionChange",b),[a,b]);const w=a.current.getLocaleText(g&&!y?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return t.jsx(i.slots.baseCheckbox,S({indeterminate:y,checked:g&&!y,onChange:e=>{const t={value:e.target.checked};a.current.publishEvent("headerSelectionCheckboxChange",t)},className:l.root,slotProps:{htmlInput:{"aria-label":w,name:"select_all_rows"}},tabIndex:v,onKeyDown:x,disabled:!yxt(i)},i.slotProps?.baseCheckbox,o,{ref:r}))});"production"!==process.env.NODE_ENV&&(Kxt.displayName="GridHeaderCheckbox"),"production"!==process.env.NODE_ENV&&(Kxt.propTypes={colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired});const Yxt=umt((e,t)=>dvt in t?t[dvt]:e.props.getRowId?e.props.getRowId(t):t.id),Zxt="__check__",Xxt=S({},zvt,{type:"custom",field:Zxt,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:()=>null,display:"flex",valueGetter:(e,t,r,o)=>{const n=Yxt(o,t);return o.current.isRowSelected(n)},renderHeader:e=>t.jsx(Kxt,S({},e)),renderCell:e=>t.jsx(wxt,S({},e))}),Qxt=["item","applyValue","type","apiRef","focusElementRef","slotProps","isFilterActive","headerFilterMenu","clearButton","tabIndex","disabled"];function Jxt(e,t){if(null==e)return"";const r=new Date(e);return Number.isNaN(r.getTime())?"":"date"===t?r.toISOString().substring(0,10):"datetime-local"===t?(r.setMinutes(r.getMinutes()-r.getTimezoneOffset()),r.toISOString().substring(0,19)):r.toISOString().substring(0,10)}function ebt(e){const{item:r,applyValue:o,type:n,apiRef:a,focusElementRef:i,slotProps:l,headerFilterMenu:c,clearButton:u,tabIndex:d,disabled:p}=e,h=Jl(e,Qxt),f=l?.root.slotProps,m=zc(),[y,g]=s.useState(()=>Jxt(r.value,n)),[v,x]=s.useState(!1),b=Li(),w=Omt(),k=s.useCallback(e=>{m.clear();const t=e.target.value;g(t),x(!0),m.start(w.filterDebounceMs,()=>{const e=new Date(t);o(S({},r,{value:Number.isNaN(e.getTime())?void 0:e})),x(!1)})},[o,r,w.filterDebounceMs,m]);return s.useEffect(()=>{const e=Jxt(r.value,n);g(e)},[r.value,n]),t.jsxs(s.Fragment,{children:[t.jsx(w.slots.baseTextField,S({fullWidth:!0,id:b,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),value:y,onChange:k,type:n||"text",disabled:p,inputRef:i,slotProps:S({},f,{input:S({endAdornment:v?t.jsx(w.slots.loadIcon,{fontSize:"small",color:"action"}):null},f?.input),htmlInput:S({max:"datetime-local"===n?"9999-12-31T23:59":"9999-12-31",tabIndex:d},f?.htmlInput)})},w.slotProps?.baseTextField,h,l?.root)),c,u]})}function tbt(e,t,r,o){if(!e.value)return null;const n=new Date(e.value);r?n.setSeconds(0,0):(n.setMinutes(n.getMinutes()+n.getTimezoneOffset()),n.setHours(0,0,0,0));const a=n.getTime();return e=>{if(!e)return!1;if(o)return t(e.getTime(),a);const n=new Date(e);return r?n.setSeconds(0,0):n.setHours(0,0,0,0),t(n.getTime(),a)}}"production"!==process.env.NODE_ENV&&(ebt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number,type:Ro.exports.oneOf(["date","datetime-local"])});const rbt=e=>[{value:"is",getApplyFilterFn:t=>tbt(t,(e,t)=>e===t,e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>tbt(t,(e,t)=>e!==t,e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>tbt(t,(e,t)=>e>t,e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>tbt(t,(e,t)=>e>=t,e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>tbt(t,(e,t)=>e<t,e,!e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFn:t=>tbt(t,(e,t)=>e<=t,e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1}],obt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange","slotProps"],nbt=gl(nyt)({fontSize:"inherit"});function abt(e){const{id:r,value:o,field:n,colDef:a,hasFocus:i,onValueChange:l,slotProps:c}=e,u=Jl(e,obt),d="dateTime"===a.type,p=Rmt(),h=s.useRef(null),f=s.useMemo(()=>{let e,t;if(e=null==o?null:o instanceof Date?o:new Date((o??"").toString()),null==e||Number.isNaN(e.getTime()))t="";else{t=new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,d?16:10)}return{parsed:e,formatted:t}},[o,d]),[m,y]=s.useState(f),g=Omt(),v=(e=>{const{classes:t}=e;return rs({root:["editInputCell"]},Emt,t)})({classes:g.classes}),x=s.useCallback(e=>{if(""===e)return null;const[t,r]=e.split("T"),[o,n,a]=t.split("-"),i=new Date;if(i.setFullYear(Number(o),Number(n)-1,Number(a)),i.setHours(0,0,0,0),r){const[e,t]=r.split(":");i.setHours(Number(e),Number(t),0,0)}return i},[]),b=s.useCallback(async e=>{const t=e.target.value,o=x(t);l&&await l(e,o),y({parsed:o,formatted:t}),p.current.setEditCellValue({id:r,field:n,value:o},e)},[p,n,r,l,x]);return s.useEffect(()=>{y(e=>f.parsed!==e.parsed&&f.parsed?.getTime()!==e.parsed?.getTime()?f:e)},[f]),ni(()=>{i&&h.current.focus()},[i]),t.jsx(nbt,S({as:g.slots.baseInput,inputRef:h,fullWidth:!0,className:v.root,type:d?"datetime-local":"date",value:m.formatted,onChange:b},u,c?.root,{slotProps:{htmlInput:S({max:d?"9999-12-31T23:59":"9999-12-31"},c?.root?.slotProps?.htmlInput)}}))}"production"!==process.env.NODE_ENV&&(abt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,changeReason:Ro.exports.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,isProcessingProps:Ro.exports.bool,isValidating:Ro.exports.bool,onValueChange:Ro.exports.func,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,slotProps:Ro.exports.object,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const ibt=e=>t.jsx(abt,S({},e));function sbt({value:e,columnType:t,rowId:r,field:o}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${r}, field: "${o}".`].join("\n"))}"production"!==process.env.NODE_ENV&&(ibt.displayName="renderEditDateCell");const lbt=S({},Ugt,{type:"date",sortComparator:Ayt,valueFormatter:(e,t,r,o)=>{if(!e)return"";return sbt({value:e,columnType:"date",rowId:Yxt(o,t),field:r.field}),e.toLocaleDateString()},filterOperators:rbt(),renderEditCell:ibt,pastedValueParser:e=>new Date(e)}),cbt=S({},Ugt,{type:"dateTime",sortComparator:Ayt,valueFormatter:(e,t,r,o)=>{if(!e)return"";return sbt({value:e,columnType:"dateTime",rowId:Yxt(o,t),field:r.field}),e.toLocaleString()},filterOperators:rbt(!0),renderEditCell:ibt,pastedValueParser:e=>new Date(e)}),ubt=e=>null==e?null:Number(e),dbt=S({},Ugt,{type:"number",align:"right",headerAlign:"right",sortComparator:Iyt,valueParser:e=>""===e?null:Number(e),valueFormatter:e=>Vyt(e)?e.toLocaleString():e||"",filterOperators:[{value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>ubt(t)===e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>ubt(t)!==e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ubt(t)>e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ubt(t)>=e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ubt(t)<e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ubt(t)<=e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:Kyt,InputComponentProps:{type:"number"}}],getApplyQuickFilterFn:e=>null==e||Number.isNaN(e)||""===e?null:t=>ubt(t)===ubt(e)});function pbt(e){return"singleSelect"===e?.type}function hbt(e,t){if(e)return"function"==typeof e.valueOptions?e.valueOptions(S({field:e.field},t)):e.valueOptions}function fbt(e,t,r){if(void 0===t)return;const o=t.find(t=>{const o=r(t);return String(o)===String(e)});return r(o)}const mbt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","slotProps"];function ybt(r){const o=Omt(),{id:n,value:a,field:i,row:l,colDef:c,hasFocus:u,error:d,onValueChange:p,initialOpen:h=o.editMode===Yyt.Cell,slotProps:f}=r,m=Jl(r,mbt),y=Rmt(),g=s.useRef(null),v=s.useRef(null),[x,b]=s.useState(h),w=(o.slotProps?.baseSelect||{}).native??!1;if(ni(()=>{u&&v.current?.focus()},[u]),!pbt(c))return null;const k=hbt(c,{id:n,row:l});if(!k)return null;const _=c.getOptionValue,C=c.getOptionLabel;return k&&c?t.jsx(o.slots.baseSelect,S({ref:g,value:a,onChange:async e=>{if(!pbt(c)||!k)return;b(!1);const t=fbt(e.target.value,k,_);p&&await p(e,t),await y.current.setEditCellValue({id:n,field:i,value:t},e)},open:x,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||b(!0)},onClose:(e,t)=>{if(o.editMode!==Yyt.Row){if("backdropClick"===t||"Escape"===e.key){const t=y.current.getCellParams(n,i);y.current.publishEvent("cellEditStop",S({},t,{reason:"Escape"===e.key?ogt.escapeKeyDown:ogt.cellFocusOut}))}}else b(!1)},error:d,native:w,fullWidth:!0,slotProps:{htmlInput:{ref:v}}},m,f?.root,o.slotProps?.baseSelect,{children:k.map(t=>{const r=_(t);return e.createElement(o.slots.baseSelectOption,S({},o.slotProps?.baseSelectOption||{},{native:w,key:r,value:r}),C(t))})})):null}"production"!==process.env.NODE_ENV&&(ybt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,changeReason:Ro.exports.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,initialOpen:Ro.exports.bool,isEditable:Ro.exports.bool,isProcessingProps:Ro.exports.bool,isValidating:Ro.exports.bool,onValueChange:Ro.exports.func,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const gbt=e=>t.jsx(ybt,S({},e));"production"!==process.env.NODE_ENV&&(gbt.displayName="renderEditSingleSelectCell");const vbt=["item","applyValue","type","apiRef","focusElementRef","tabIndex","isFilterActive","clearButton","headerFilterMenu","slotProps"],xbt=({column:t,OptionComponent:r,getOptionLabel:o,getOptionValue:n,isSelectNative:a,baseSelectOptionProps:i})=>["",...hbt(t)||[]].map(t=>{const s=n(t);let l=o(t);return""===l&&(l=" "),e.createElement(r,S({},i,{native:a,key:s,value:s}),l)});function bbt(e){const{item:r,applyValue:o,type:n,apiRef:a,focusElementRef:i,tabIndex:l,clearButton:c,headerFilterMenu:u,slotProps:d}=e,p=Jl(e,vbt),h=r.value??"",f=Li(),m=Li(),y=Omt(),g=y.slotProps?.baseSelect?.native??!1;let v=null;if(r.field){const e=a.current.getColumn(r.field);pbt(e)&&(v=e)}const x=v?.getOptionValue,b=v?.getOptionLabel,w=s.useMemo(()=>hbt(v),[v]),k=s.useCallback(e=>{let t=e.target.value;t=fbt(t,w,x),o(S({},r,{value:t}))},[w,x,o,r]);if(!pbt(v))return null;const _=d?.root.label??a.current.getLocaleText("filterPanelInputLabel");return t.jsxs(s.Fragment,{children:[t.jsx(y.slots.baseSelect,S({fullWidth:!0,id:f,label:_,labelId:m,value:h,onChange:k,slotProps:{htmlInput:S({tabIndex:l,ref:i,type:n||"text",placeholder:d?.root.placeholder??a.current.getLocaleText("filterPanelInputPlaceholder")},d?.root.slotProps?.htmlInput)},native:g},y.slotProps?.baseSelect,p,d?.root,{children:xbt({column:v,OptionComponent:y.slots.baseSelectOption,getOptionLabel:b,getOptionValue:x,isSelectNative:g,baseSelectOptionProps:y.slotProps?.baseSelectOption})})),u,c]})}"production"!==process.env.NODE_ENV&&(bbt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number,type:Ro.exports.oneOf(["singleSelect"])});const wbt=["item","applyValue","type","apiRef","focusElementRef","slotProps"];function kbt(e){const{item:r,applyValue:o,type:n,apiRef:a,focusElementRef:i,slotProps:l}=e,c=Jl(e,wbt),u=Li(),d=Omt();let p=null;if(r.field){const e=a.current.getColumn(r.field);pbt(e)&&(p=e)}const h=p?.getOptionValue,f=p?.getOptionLabel,m=s.useCallback((e,t)=>h(e)===h(t),[h]),y=s.useMemo(()=>hbt(p)||[],[p]),g=s.useMemo(()=>Array.isArray(r.value)?r.value.reduce((e,t)=>{const r=y.find(e=>h(e)===t);return null!=r&&e.push(r),e},[]):[],[h,r.value,y]),v=s.useCallback((e,t)=>{o(S({},r,{value:t.map(h)}))},[o,r,h]),x=d.slots.baseAutocomplete;return t.jsx(x,S({multiple:!0,options:y,isOptionEqualToValue:m,id:u,value:g,onChange:v,getOptionLabel:f,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:n||"text",inputRef:i}}},c,l?.root))}"production"!==process.env.NODE_ENV&&(kbt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number,type:Ro.exports.oneOf(["singleSelect"])});const _bt=e=>null!=e&&$yt(e)?e.value:e,Cbt=S({},Ugt,{type:"singleSelect",getOptionLabel:e=>$yt(e)?e.label:String(e),getOptionValue:e=>$yt(e)?e.value:e,valueFormatter(e,t,r,o){const n=Yxt(o,t);if(!pbt(r))return"";const a=hbt(r,{id:n,row:t});if(null==e)return"";if(!a)return e;if(!(e=>"object"==typeof e[0])(a))return r.getOptionLabel(e);const i=a.find(t=>r.getOptionValue(t)===e);return i?r.getOptionLabel(i):""},renderEditCell:gbt,filterOperators:[{value:"is",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>_bt(t)===_bt(e.value),InputComponent:bbt},{value:"not",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>_bt(t)!==_bt(e.value),InputComponent:bbt},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(_bt);return e=>t.includes(_bt(e))},InputComponent:kbt}],pastedValueParser:(e,t,r)=>{const o=r,n=hbt(o)||[],a=o.getOptionValue,i=n.find(t=>a(t)===e);if(i)return e}}),Mbt=umt(e=>e.headerFiltering),Sbt=lmt(Mbt,e=>e?.enabled??!1),Dbt=lmt(Mbt,e=>e.editing),Obt=lmt(Mbt,e=>e.menuOpen),Pbt=umt(e=>e.columnGrouping),Ebt=cmt(Pbt,e=>e?.unwrappedGroupingModel??{}),jbt=cmt(Pbt,e=>e?.lookup??{}),Tbt=cmt(Pbt,e=>e?.headerStructure??[]),Nbt=lmt(Pbt,e=>e?.maxDepth??0),Rbt=["maxWidth","minWidth","width","flex"],Fbt={string:Ugt,number:dbt,date:lbt,dateTime:cbt,boolean:zvt,singleSelect:Cbt,[lvt]:cvt,custom:Ugt};const Ibt=(e,t)=>{const r={};let o=0,n=0;const a=[];e.orderedFields.forEach(t=>{let i=e.lookup[t],s=0,l=!1;!1!==e.columnVisibilityModel[t]&&(i.flex&&i.flex>0?(o+=i.flex,l=!0):s=qyt(i.width||Ugt.width,i.minWidth||Ugt.minWidth,i.maxWidth||Ugt.maxWidth),n+=s),i.computedWidth!==s&&(i=S({},i,{computedWidth:s})),l&&a.push(i),r[t]=i});const i=void 0===t?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(i-n,0);if(o>0&&i>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:r}){const o=new Set(r.map(e=>e.field)),n={all:{},frozenFields:[],freeze:e=>{const t=n.all[e];t&&!0!==t.frozen&&(n.all[e].frozen=!0,n.frozenFields.push(e))}};return function a(){if(n.frozenFields.length===o.size)return;const i={min:{},max:{}};let s=e,l=t,c=0;n.frozenFields.forEach(e=>{s-=n.all[e].computedWidth,l-=n.all[e].flex});for(let e=0;e<r.length;e+=1){const t=r[e];if(n.all[t.field]&&!0===n.all[t.field].frozen)continue;let o=s/l*t.flex;o<t.minWidth?(c+=t.minWidth-o,o=t.minWidth,i.min[t.field]=!0):o>t.maxWidth&&(c+=t.maxWidth-o,o=t.maxWidth,i.max[t.field]=!0),n.all[t.field]={frozen:!1,computedWidth:o,flex:t.flex}}c<0?Object.keys(i.max).forEach(e=>{n.freeze(e)}):c>0?Object.keys(i.min).forEach(e=>{n.freeze(e)}):r.forEach(({field:e})=>{n.freeze(e)}),a()}(),n.all}({initialFreeSpace:s,totalFlexUnits:o,flexColumns:a});Object.keys(e).forEach(t=>{r[t]=S({},r[t],{computedWidth:e[t].computedWidth})})}return S({},e,{lookup:r})};function Abt(e){let t=Fbt.string;return e&&Fbt[e]&&(t=Fbt[e]),t}const zbt=({apiRef:e,columnsToUpsert:t,initialState:r,columnVisibilityModel:o=xgt(e),keepOnlyColumnsToUpsert:n=!1,updateInitialVisibilityModel:a=!1})=>{const i=!e.current.state.columns;let s;if(i)s={orderedFields:[],lookup:{},columnVisibilityModel:o,initialColumnVisibilityModel:o};else{const t=mgt(e);s={orderedFields:n?[]:[...t.orderedFields],lookup:S({},t.lookup),columnVisibilityModel:o,initialColumnVisibilityModel:a?o:t.initialColumnVisibilityModel}}const l={};if(n&&!i)for(const u in s.lookup)Object.prototype.hasOwnProperty.call(s.lookup,u)&&(l[u]=!1);t.forEach(e=>{const{field:t}=e;l[t]=!0;let r=s.lookup[t];null==r?(r=S({},Abt(e.type),{field:t,hasBeenResized:!1}),s.orderedFields.push(t)):n&&s.orderedFields.push(t),r&&r.type!==e.type&&(r=S({},Abt(e.type),{field:t}));let o=r.hasBeenResized;Rbt.forEach(t=>{void 0!==e[t]&&(o=!0,-1===e[t]&&(e[t]=1/0))}),s.lookup[t]=ti(r,S({},Abt(e.type),e,{hasBeenResized:o}))}),n&&!i&&Object.keys(s.lookup).forEach(e=>{l[e]||delete s.lookup[e]});const c=((e,t)=>{if(!t)return e;const{orderedFields:r=[],dimensions:o={}}=t,n=Object.keys(o);if(0===n.length&&0===r.length)return e;const a={},i=[];for(let c=0;c<r.length;c+=1){const t=r[c];e.lookup[t]&&(a[t]=!0,i.push(t))}const s=0===i.length?e.orderedFields:[...i,...e.orderedFields.filter(e=>!a[e])],l=S({},e.lookup);for(let c=0;c<n.length;c+=1){const e=n[c],t=S({},l[e],{hasBeenResized:!0});Object.entries(o[e]).forEach(([e,r])=>{t[e]=-1===r?1/0:r}),l[e]=t}return S({},e,{orderedFields:s,lookup:l})})(e.current.unstable_applyPipeProcessors("hydrateColumns",s),r);return Ibt(c,e.current.getRootDimensions?.()??void 0)};function Lbt(e,t){if(t.listView)return 0;const r=oyt(e),o=Nbt(e),n=Sbt(e);return Math.floor(t.columnHeaderHeight*r)+Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*r)*o+(n?Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*r):0)}const Bbt=umt(e=>e.rowsMeta),Vbt=ei("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${jmt["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${jmt["scrollArea--right"]}`]:t["scrollArea--right"]},{[`&.${jmt["scrollArea--up"]}`]:t["scrollArea--up"]},{[`&.${jmt["scrollArea--down"]}`]:t["scrollArea--down"]},t.scrollArea]})(()=>({position:"absolute",zIndex:101,[`&.${jmt["scrollArea--left"]}`]:{top:0,left:0,width:20,bottom:0},[`&.${jmt["scrollArea--right"]}`]:{top:0,right:0,width:20,bottom:0},[`&.${jmt["scrollArea--up"]}`]:{top:0,left:0,right:0,height:20},[`&.${jmt["scrollArea--down"]}`]:{bottom:0,left:0,right:0,height:20}})),$bt=lmt(pmt,(e,t)=>"left"===t?e.leftPinnedWidth:"right"===t?e.rightPinnedWidth+(e.hasScrollX?e.scrollbarSize:0):0);function Hbt(e){const{scrollDirection:r,scrollPosition:o}=e,n=s.useRef(null),a=Rmt(),i=zc(),l=eyt(a,oyt),c=eyt(a,hmt),u=eyt(a,$bt,r),d=Omt(),p=Lbt(a,d),h=Math.floor(d.columnHeaderHeight*l),f=S({height:h,top:p-h},"left"===r?{left:u}:{},"right"===r?{right:u}:{}),m=ql(e=>{let t;if(e.preventDefault(),"left"===r)t=e.clientX-n.current.getBoundingClientRect().right;else{if("right"!==r)throw new Error("MUI X: Wrong drag direction");t=Math.max(1,e.clientX-n.current.getBoundingClientRect().left)}t=1.5*(t-1)+1,i.start(0,()=>{a.current.scroll({left:o.current.left+t,top:o.current.top})})});return t.jsx(Wbt,S({},e,{ref:n,getCanScrollMore:()=>{const e=pmt(a);if("left"===r)return o.current.left>0;if("right"===r){const t=c-e.viewportInnerSize.width;return o.current.left<t}return!1},style:f,handleDragOver:m}))}function qbt(e){const{scrollDirection:r,scrollPosition:o}=e,n=s.useRef(null),a=Rmt(),i=zc(),l=eyt(a,Bbt),c=Omt(),u=Lbt(a,c),d={top:"up"===r?u:void 0,bottom:"down"===r?0:void 0},p=ql(e=>{let t;if(e.preventDefault(),"up"===r)t=e.clientY-n.current.getBoundingClientRect().bottom;else{if("down"!==r)throw new Error("MUI X: Wrong drag direction");t=Math.max(1,e.clientY-n.current.getBoundingClientRect().top)}t=1.5*(t-1)+1,i.start(0,()=>{a.current.scroll({left:o.current.left,top:o.current.top+t})})});return t.jsx(Wbt,S({},e,{ref:n,getCanScrollMore:()=>{const e=pmt(a);if("up"===r)return o.current.top>0;if("down"===r){const t=(l.currentPageTotalHeight||0)-e.viewportInnerSize.height-(e.hasScrollX?e.scrollbarSize:0);return o.current.top<t}return!1},style:d,handleDragOver:p}))}const Wbt=Smt(function(e,r){const{scrollDirection:o,getCanScrollMore:n,style:a,handleDragOver:i}=e,l=Rmt(),[c,u]=s.useState(n),d=S({},Omt(),{scrollDirection:o}),p=(e=>{const{scrollDirection:t,classes:r}=e;return rs({root:["scrollArea",`scrollArea--${t}`]},Emt,r)})(d);return Bmt(l,"scrollPositionChange",()=>{u(n)}),c?t.jsx(Vbt,{ref:r,className:p.root,ownerState:d,onDragOver:i,style:a}):null});"production"!==process.env.NODE_ENV&&(Wbt.displayName="GridScrollAreaContent");const Ubt=G(function(e){const r=Rmt(),[o,n]=s.useState("none");return Bmt(r,"columnHeaderDragStart",()=>n("horizontal")),Bmt(r,"columnHeaderDragEnd",()=>n("none")),Bmt(r,"rowDragStart",()=>n("vertical")),Bmt(r,"rowDragEnd",()=>n("none")),"none"===o?null:"horizontal"===o?t.jsx(Hbt,S({},e)):t.jsx(qbt,S({},e))}),Gbt=s.createContext(void 0);function Kbt(){const e=s.useContext(Gbt);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}"production"!==process.env.NODE_ENV&&(Gbt.displayName="GridPrivateApiContext");const Ybt=()=>{};function Zbt(e,t,r){const o=s.useRef(!0);ni(()=>{o.current=!1,e.current.register(r,t)},[e,r,t]),o.current&&e.current.register(r,t)}function Xbt(e,t){const r=s.useRef(null);if(r.current)return r.current;const o=e.current.getLogger(t);return r.current=o,o}const Qbt=(e,t,r,o,n)=>{const a=Xbt(e,"useNativeEventListener");$mt(e,"rootMount",()=>{const e=t();if(e&&r)return a.debug(`Binding native ${r} event`),e.addEventListener(r,o,n),()=>{a.debug(`Clearing native ${r} event`),e.removeEventListener(r,o,n)}})},Jbt=e=>{const t=s.useRef(!0);t.current&&(t.current=!1,e())},ewt=(e,t)=>Uxt(e),twt=(e,t)=>eyt(e,Uxt),rwt=("undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"empty").includes("firefox"),owt=umt(e=>e.virtualization);lmt(owt,e=>e.enabled);const nwt=lmt(owt,e=>e.enabledForColumns),awt=lmt(owt,e=>e.enabledForRows),iwt=lmt(owt,e=>e.renderContext),swt=cmt(umt(e=>e.virtualization.renderContext.firstColumnIndex),umt(e=>e.virtualization.renderContext.lastColumnIndex),(e,t)=>({firstColumnIndex:e,lastColumnIndex:t})),lwt={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},cwt=(e,t)=>{const{disableVirtualization:r,autoHeight:o}=t;return S({},e,{virtualization:{enabled:!r,enabledForColumns:!r,enabledForRows:!r&&!o,renderContext:lwt}})};const uwt=umt(e=>e.rowSpanning),dwt=lmt(uwt,e=>e.hiddenCells),pwt=lmt(uwt,e=>e.spannedCells),hwt=lmt(uwt,e=>e.hiddenCellOriginMap),fwt=cmt(lmt(_xt,iwt,Uxt,wgt,(e,t,r,o)=>{if(!e)return!1;const n=r.rowIdToIndexMap.get(e.id),a=o.slice(t.firstColumnIndex,t.lastColumnIndex).findIndex(t=>t.field===e.field);return!(void 0!==n&&-1!==a&&n>=t.firstRowIndex&&n<=t.lastRowIndex)}),wgt,Uxt,_xt,(e,t,r,o)=>{if(!e)return null;const n=r.rowIdToIndexMap.get(o.id);if(void 0===n)return null;const a=t.findIndex(e=>e.field===o.field);return-1===a?null:S({},o,{rowIndex:n,columnIndex:a})});function mwt(e,t){return Math.round(e*10**t)/10**t}const ywt="undefined"!=typeof window&&/jsdom|HappyDOM/.test(window.navigator.userAgent);var gwt=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(gwt||{});const vwt={top:0,left:0},xwt=Object.freeze(new Map),bwt=()=>{const e=Kbt(),r=Omt(),{listView:o}=r,n=eyt(e,wgt),a=eyt(e,awt)&&!ywt,i=eyt(e,nwt)&&!ywt,l=eyt(e,Oyt),c=Mgt(e),u=l.bottom.length>0,[p,h]=s.useState(xwt),f=Ni(),m=eyt(e,dxt),y=twt(e),g=e.current.mainElementRef,v=e.current.virtualScrollerRef,x=e.current.virtualScrollbarVerticalRef,b=e.current.virtualScrollbarHorizontalRef,w=eyt(e,Egt),k=s.useRef(!1),_=eyt(e,fmt),C=eyt(e,mmt),M=eyt(e,hmt),D=eyt(e,wwt),O=eyt(e,_mt),P=eyt(e,vmt),E=s.useRef(null),j=s.useCallback(t=>{if(g.current=t,!t)return;const r=t.getBoundingClientRect();let o={width:mwt(r.width,1),height:mwt(r.height,1)};if((!E.current||o.width!==E.current.width&&o.height!==E.current.height)&&(E.current=o,e.current.publishEvent("resize",o)),"undefined"==typeof ResizeObserver)return;const n=new ResizeObserver(t=>{const r=t[0];if(!r)return;const n={width:mwt(r.contentRect.width,1),height:mwt(r.contentRect.height,1)};n.width===o.width&&n.height===o.height||(e.current.publishEvent("resize",n),o=n)});return n.observe(t),Mmt>=19?()=>{g.current=null,n.disconnect()}:void 0},[e,g]),T=s.useRef(r.initialState?.scroll??vwt),N=s.useRef(!1),R=s.useRef(vwt),F=s.useRef(lwt),I=eyt(e,iwt),A=eyt(e,fwt),z=zc(),L=s.useRef(void 0),B=Rc(()=>((e,t,r,o,n)=>({direction:gwt.NONE,buffer:Pwt(e,gwt.NONE,t,r,o,n)}))(f,r.rowBufferPx,r.columnBufferPx,15*_,300)).current,V=s.useCallback(t=>{if(Dwt(t,e.current.state.virtualization.renderContext))return;const r=t.firstRowIndex!==F.current.firstRowIndex||t.lastRowIndex!==F.current.lastRowIndex;e.current.setState(e=>S({},e,{virtualization:S({},e.virtualization,{renderContext:t})}));pmt(e).isReady&&r&&(F.current=t,e.current.publishEvent("renderedRowsIntervalChange",t)),R.current=T.current},[e]),$=ql(()=>{const t=v.current;if(!t)return;const o=pmt(e),n=Math.ceil(o.minimumSize.height-o.viewportOuterSize.height),s=Math.ceil(o.minimumSize.width-o.viewportInnerSize.width),l={top:qyt(t.scrollTop,0,n),left:f?qyt(t.scrollLeft,-s,0):qyt(t.scrollLeft,0,s)},c=l.left-T.current.left,u=l.top-T.current.top,p=0!==c||0!==u;T.current=l;const h=p?function(e,t){if(0===e&&0===t)return gwt.NONE;return Math.abs(t)>=Math.abs(e)?t>0?gwt.DOWN:gwt.UP:e>0?gwt.RIGHT:gwt.LEFT}(c,u):gwt.NONE,m=Math.abs(T.current.top-R.current.top),y=Math.abs(T.current.left-R.current.left),g=m>=_||y>=50,x=B.direction!==h;if(!(g||x))return I;if(x)switch(h){case gwt.NONE:case gwt.LEFT:case gwt.RIGHT:L.current=void 0;break;default:L.current=I}B.direction=h,B.buffer=Pwt(f,h,r.rowBufferPx,r.columnBufferPx,15*_,300);const b=_wt(kwt(e,r,a,i),T.current,B);return Dwt(b,I)||(d.flushSync(()=>{V(b)}),z.start(1e3,$)),b}),H=()=>{if(!pmt(e).isReady&&(a||i))return;const t=_wt(kwt(e,r,a,i),T.current,B);L.current=void 0,V(t)},q=ql(()=>{if(N.current)return void(N.current=!1);const t=$();e.current.publishEvent("scrollPositionChange",{top:T.current.top,left:T.current.left,renderContext:t})}),W=ql(t=>{e.current.publishEvent("virtualScrollerWheel",{},t)}),U=ql(t=>{e.current.publishEvent("virtualScrollerTouchMove",{},t)}),G=s.useMemo(()=>({overflowX:!D||o?"hidden":void 0,overflowY:r.autoHeight?"hidden":void 0}),[D,r.autoHeight,o]),K=s.useMemo(()=>{const e={width:D?M:"auto",flexBasis:C,flexShrink:0};return 0===e.flexBasis&&(e.flexBasis=bvt),e},[M,C,D]),Y=s.useCallback(t=>{t&&e.current.publishEvent("virtualScrollerContentSizeChange",{columnsTotalWidth:M,contentHeight:C})},[e,M,C]);return ni(()=>{k.current&&e.current.updateRenderContext?.()},[e,i,a]),ni(()=>{o&&(v.current.scrollLeft=0)},[o,v]),((e,t)=>{const r=s.useRef(!1);ni(()=>r.current||!e?Ybt:(r.current=!0,t()),[r.current||e])})(I!==lwt,()=>{if(e.current.publishEvent("scrollPositionChange",{top:T.current.top,left:T.current.left,renderContext:I}),k.current=!0,r.initialState?.scroll&&v.current){const t=v.current,{top:o,left:n}=r.initialState.scroll,a={top:!(o>0),left:!(n>0)};if(!a.left&&M&&(t.scrollLeft=n,N.current=!0,a.left=!0),!a.top&&C&&(t.scrollTop=o,N.current=!0,a.top=!0),!a.top||!a.left){const r=e.current.subscribeEvent("virtualScrollerContentSizeChange",e=>{!a.left&&e.columnsTotalWidth&&(t.scrollLeft=n,N.current=!0,a.left=!0),!a.top&&e.contentHeight&&(t.scrollTop=o,N.current=!0,a.top=!0),a.left&&a.top&&r()});return r}}}),e.current.register("private",{updateRenderContext:H}),$mt(e,"sortedRowsSet",H),$mt(e,"paginationModelChange",H),$mt(e,"columnsChange",H),{renderContext:I,setPanels:h,getRows:(o={})=>{if(!o.rows&&!y.range)return[];const a=byt(e);let i=I;o.renderContext&&(i=o.renderContext,i.firstColumnIndex=I.firstColumnIndex,i.lastColumnIndex=I.lastColumnIndex);const s=!u&&void 0===o.position||u&&"bottom"===o.position,d=void 0!==o.position;let h;switch(o.position){case"top":h=0;break;case"bottom":h=l.top.length+y.rows.length;break;case void 0:h=l.top.length}const f=o.rows??y.rows,g=i.firstRowIndex,v=Math.min(i.lastRowIndex,f.length),x=o.rows?Wyt(0,o.rows.length):Wyt(g,v);let b=-1;!d&&A&&(A.rowIndex<g&&(x.unshift(A.rowIndex),b=A.rowIndex),A.rowIndex>v&&(x.push(A.rowIndex),b=A.rowIndex));const k=[],_=r.slotProps?.row,C=Dgt(e);return x.forEach(l=>{const{id:u,model:g}=f[l];if(!a[u])return;const v=(y?.range?.firstRowIndex||0)+h+l;if(w){const t=c.left.length,r=n.length-c.right.length;e.current.calculateColSpan({rowId:u,minFirstColumn:t,maxLastColumn:r,columns:n}),c.left.length>0&&e.current.calculateColSpan({rowId:u,minFirstColumn:0,maxLastColumn:c.left.length,columns:n}),c.right.length>0&&e.current.calculateColSpan({rowId:u,minFirstColumn:n.length-c.right.length,maxLastColumn:n.length,columns:n})}const x=e.current.rowHasAutoHeight(u)?"auto":e.current.unstable_getRowHeight(u),D=m.has(u)&&e.current.isRowSelectable(u);let E=!1;void 0===o.position&&(E=0===l);let j=!1;const T=l===f.length-1;if(s)if(d)j=T;else{l===y.rows.length-1&&(j=!0)}let N=i;L.current&&l>=L.current.firstRowIndex&&l<L.current.lastRowIndex&&(N=L.current);const R=l===b,F=A?.rowIndex===v,I=Owt(C,N,c.left.length),z=T&&"top"===o.position,B=N.firstColumnIndex,V=N.lastColumnIndex;if(k.push(t.jsx(r.slots.row,S({row:g,rowId:u,index:v,selected:D,offsetLeft:I,columnsTotalWidth:M,rowHeight:x,pinnedColumns:c,visibleColumns:n,firstColumnIndex:B,lastColumnIndex:V,focusedColumnIndex:F?A.columnIndex:void 0,isFirstVisible:E,isLastVisible:j,isNotVisible:R,showBottomBorder:z,scrollbarWidth:O,gridHasFiller:P},_),u)),R)return;const $=p.get(u);$&&k.push($),void 0===o.position&&T&&k.push(e.current.getInfiniteLoadingTriggerElement?.({lastRowId:u}))}),k},getContainerProps:()=>({ref:j}),getScrollerProps:()=>({ref:v,onScroll:q,onWheel:W,onTouchMove:U,style:G,role:"presentation",tabIndex:rwt?-1:void 0}),getContentProps:()=>({style:K,role:"presentation",ref:Y}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:x,scrollPosition:T}),getScrollbarHorizontalProps:()=>({ref:b,scrollPosition:T}),getScrollAreaProps:()=>({scrollPosition:T})}};function wwt(e){return e.current.state.dimensions.viewportOuterSize.width>0&&e.current.state.dimensions.columnsTotalWidth>e.current.state.dimensions.viewportOuterSize.width}function kwt(e,t,r,o){const n=pmt(e),a=ewt(e),i=wgt(e),s=hwt(e),l=e.current.state.rows.dataRowIds.at(-1),c=i.at(-1);return{enabledForRows:r,enabledForColumns:o,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:n.leftPinnedWidth,columnsTotalWidth:n.columnsTotalWidth,viewportInnerWidth:n.viewportInnerSize.width,viewportInnerHeight:n.viewportInnerSize.height,lastRowHeight:void 0!==l?e.current.unstable_getRowHeight(l):0,lastColumnWidth:c?.computedWidth??0,rowsMeta:Bbt(e),columnPositions:Dgt(e),rows:a.rows,range:a.range,pinnedColumns:Mgt(e),visibleColumns:i,hiddenCellsOriginMap:s,listView:t.listView??!1,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function _wt(e,t,r){const o={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:n,left:a}=t,i=Math.abs(a)+e.leftPinnedWidth;if(e.enabledForRows){let t=Math.min(Cwt(e,n,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const r=e.hiddenCellsOriginMap[t];if(r){const e=Math.min(...Object.values(r));t=Math.min(t,e)}const a=e.autoHeight?t+e.rows.length:Cwt(e,n+e.viewportInnerHeight);o.firstRowIndex=t,o.lastRowIndex=a}if(e.listView)return S({},o,{lastColumnIndex:1});if(e.enabledForColumns){let t=0,n=e.columnPositions.length,a=!1;const[s,l]=Swt({firstIndex:o.firstRowIndex,lastIndex:o.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:r.buffer.rowBefore,bufferAfter:r.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let r=s;r<l&&!a;r+=1){const t=e.rows[r];a=e.apiRef.current.rowHasAutoHeight(t.id)}a&&!e.virtualizeColumnsWithAutoRowHeight||(t=Mwt(i,e.columnPositions,{atStart:!0,lastPosition:e.columnsTotalWidth}),n=Mwt(i+e.viewportInnerWidth,e.columnPositions)),o.firstColumnIndex=t,o.lastColumnIndex=n}const s=function(e,t,r){const[o,n]=Swt({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:r.buffer.rowBefore,bufferAfter:r.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[a,i]=Swt({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:r.buffer.columnBefore,bufferAfter:r.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),s=function({firstColumnToRender:e,apiRef:t,firstRowToRender:r,lastRowToRender:o,visibleRows:n}){let a=e,i=!1;for(;!i&&a>=0;){i=!0;for(let e=r;e<o;e+=1)if(n[e]){const r=n[e].id,o=t.current.unstable_getCellColSpanInfo(r,a);if(o&&o.spannedByColSpan&&o.leftVisibleCellIndex<a){a=o.leftVisibleCellIndex,i=!1;break}}}return a}({firstColumnToRender:a,apiRef:e.apiRef,firstRowToRender:o,lastRowToRender:n,visibleRows:e.rows});return{firstRowIndex:o,lastRowIndex:n,firstColumnIndex:s,lastColumnIndex:i}}(e,o,r);return s}function Cwt(e,t,r){const o=e.apiRef.current.getLastMeasuredRowIndex();let n=o===1/0;e.range?.lastRowIndex&&!n&&(n=o>=e.range.lastRowIndex);const a=qyt(o-(e.range?.firstRowIndex||0),0,e.rowsMeta.positions.length);return n||e.rowsMeta.positions[a]>=t?Mwt(t,e.rowsMeta.positions,r):function(e,t,r,o){let n=1;for(;r<t.length&&Math.abs(t[r])<e;)r+=n,n*=2;return Mwt(e,t,o,Math.floor(r/2),Math.min(r,t.length))}(t,e.rowsMeta.positions,a,r)}function Mwt(e,t,r=void 0,o=0,n=t.length){if(t.length<=0)return-1;if(o>=n)return o;const a=o+Math.floor((n-o)/2),i=t[a];let s;if(r?.atStart){s=e-((a===t.length-1?r.lastPosition:t[a+1])-i)<i}else s=e<=i;return s?Mwt(e,t,r,o,a):Mwt(e,t,r,a+1,n)}function Swt({firstIndex:e,lastIndex:t,bufferBefore:r,bufferAfter:o,minFirstIndex:n,maxLastIndex:a,positions:i,lastSize:s}){const l=i[e]-r,c=i[t]+o,u=Mwt(l,i,{atStart:!0,lastPosition:i[i.length-1]+s}),d=Mwt(c,i);return[qyt(u,n,a),qyt(d,n,a)]}function Dwt(e,t){return e===t||e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex}function Owt(e,t,r){const o=(e[t.firstColumnIndex]??0)-(e[r]??0);return Math.abs(o)}function Pwt(e,t,r,o,n,a){if(e)switch(t){case gwt.LEFT:t=gwt.RIGHT;break;case gwt.RIGHT:t=gwt.LEFT}switch(t){case gwt.NONE:return{rowAfter:r,rowBefore:r,columnAfter:o,columnBefore:o};case gwt.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:a};case gwt.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:a,columnBefore:0};case gwt.UP:return{rowAfter:0,rowBefore:n,columnAfter:0,columnBefore:0};case gwt.DOWN:return{rowAfter:n,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const Ewt=ei("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e&&"right"!==e})(({overlayType:e,loadingOverlayVariant:t,right:r})=>"skeleton"!==t?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,right:`${r}px`,width:0,height:0,zIndex:"loadingOverlay"===e?5:4}:{}),jwt=ei("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e})({});function Twt(e){const r=Rmt(),o=Omt(),n=eyt(r,pmt);let a=Math.max(n.viewportOuterSize.height-n.topContainerHeight-n.bottomContainerHeight-(n.hasScrollX?n.scrollbarSize:0),0);0===a&&(a=bvt);const i=(e=>{const{classes:t}=e;return rs({root:["overlayWrapper"],inner:["overlayWrapperInner"]},Emt,t)})(S({},e,{classes:o.classes}));return t.jsx(Ewt,S({className:i.root},e,{right:n.columnsTotalWidth-n.viewportOuterSize.width,children:t.jsx(jwt,S({className:i.inner,style:{height:a,width:n.viewportOuterSize.width}},e))}))}"production"!==process.env.NODE_ENV&&(Twt.propTypes={loadingOverlayVariant:Ro.exports.oneOf(["circular-progress","linear-progress","skeleton"]),overlayType:Ro.exports.oneOf(["loadingOverlay","noResultsOverlay","noRowsOverlay","noColumnsOverlay","emptyPivotOverlay"])});const Nwt=umt(e=>e.pivoting),Rwt=lmt(Nwt,e=>e?.active),Fwt=new Map,Iwt=lmt(Nwt,e=>e?.initialColumns||Fwt);lmt(Nwt,e=>e?.panelOpen);const Awt=umt(e=>e.columnMenu);const zwt=G(function(){const e=Kbt(),r=Omt(),o=eyt(e,wgt),n=eyt(e,cxt),a=eyt(e,qvt),i=eyt(e,Pxt),s=eyt(e,()=>null===Oxt(e)),l=eyt(e,jxt),c=eyt(e,Cxt),u=eyt(e,Sxt),d=eyt(e,Nbt),p=eyt(e,Awt),h=eyt(e,xgt),f=eyt(e,Tbt),m=!(null===l&&null===i&&s),y=e.current.columnHeadersContainerRef;return t.jsx(r.slots.columnHeaders,S({ref:y,visibleColumns:o,filterColumnLookup:n,sortColumnLookup:a,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:u,headerGroupingMaxDepth:d,columnMenuState:p,columnVisibility:h,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:m},r.slotProps?.columnHeaders))}),Lwt=ei("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),Bwt=ei("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>{const{ownerState:r,loadingOverlayVariant:o,overlayType:n}=e,a="skeleton"===o||"noColumnsOverlay"===n;return[t.main,r.hasPinnedRight&&t["main--hasPinnedRight"],a&&t["main--hiddenContent"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),Vwt=Smt((e,r)=>{const{ownerState:o}=e,n=Omt(),a=Qgt().hooks.useGridAriaAttributes();return t.jsxs(Bwt,S({ownerState:o,className:e.className,tabIndex:-1},a,n.slotProps?.main,{ref:r,children:[t.jsx(Lwt,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))});"production"!==process.env.NODE_ENV&&(Vwt.displayName="GridMainContainer");const $wt=ei("div")({position:"sticky",zIndex:40,top:0});function Hwt(e){const r=rs({root:["topContainer"]},Emt,{});return t.jsx($wt,S({},e,{className:za(r.root,jmt["container--top"]),role:"presentation"}))}const qwt=ei("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.virtualScrollerContent,r.overflowedContent&&t["virtualScrollerContent--overflowed"]]}})({}),Wwt=Smt(function(e,r){const o=Omt(),n=!o.autoHeight&&"auto"===e.style?.minHeight,a=((e,t)=>{const{classes:r}=e;return rs({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},Emt,r)})(o,n),i={classes:o.classes,overflowedContent:n};return t.jsx(qwt,S({},e,{ownerState:i,className:za(a.root,e.className),ref:r}))});"production"!==process.env.NODE_ENV&&(Wwt.displayName="GridVirtualScrollerContent");const Uwt=ei("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),Gwt=ei("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:lyt.cell.background.pinned}),Kwt=ei(Gwt)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),Ywt=ei(Gwt)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),Zwt=ei("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});const Xwt=G(function({rowsLength:e}){const r=Rmt(),{viewportOuterSize:o,minimumSize:n,hasScrollX:a,hasScrollY:i,scrollbarSize:s,leftPinnedWidth:l,rightPinnedWidth:c}=eyt(r,pmt),u=a?s:0,d=o.height-n.height>0;return 0!==u||d?t.jsxs(Uwt,{className:jmt.filler,role:"presentation",style:{height:u,"--rowBorderColor":0===e?"transparent":"var(--DataGrid-rowBorderColor)"},children:[l>0&&t.jsx(Kwt,{className:jmt["filler--pinnedLeft"],style:{width:l}}),t.jsx(Zwt,{}),c>0&&t.jsx(Ywt,{className:jmt["filler--pinnedRight"],style:{width:c+(i?s:0)}})]}):null}),Qwt=["className"],Jwt=ei("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone"})({position:"absolute",display:"flex",flexDirection:"column"}),ekt=Smt(function(e,r){const{className:o}=e,n=Jl(e,Qwt),a=Rmt(),i=Omt(),s=(e=>{const{classes:t}=e;return rs({root:["virtualScrollerRenderZone"]},Emt,t)})(i),l=eyt(a,()=>{const e=iwt(a);return Bbt(a).positions[e.firstRowIndex]??0});return t.jsx(Jwt,S({className:za(s.root,o),ownerState:i,style:{transform:`translate3d(0, ${l}px, 0)`}},n,{ref:r}))});"production"!==process.env.NODE_ENV&&(ekt.displayName="GridVirtualScrollerRenderZone");const tkt={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0},rkt=umt(e=>e.editRows),okt=lmt(rkt,(e,{rowId:t,editMode:r})=>r===Yyt.Row&&Boolean(e[t])),nkt=lmt(rkt,(e,{rowId:t,field:r})=>e[t]?.[r]??null),akt=umt(e=>e.preferencePanel),ikt=lmt(akt,(e,t)=>!(!e.open||e.labelId!==t));var skt=function(e){return e.filters="filters",e.columns="columns",e.aiAssistant="aiAssistant",e}(skt||{});function lkt(e){return JSON.stringify([e.filterModel,e.sortModel,e.start,e.end])}class ckt{constructor({ttl:e=3e5,getKey:t=lkt}){this.cache=void 0,this.ttl=void 0,this.getKey=void 0,this.cache={},this.ttl=e,this.getKey=t}set(e,t){const r=this.getKey(e),o=Date.now()+this.ttl;this.cache[r]={value:t,expiry:o}}get(e){const t=this.getKey(e),r=this.cache[t];if(r){if(!(Date.now()>r.expiry))return r.value;delete this.cache[t]}}clear(){this.cache={}}}class ukt extends Error{constructor(e){super(e.message),this.params=void 0,this.cause=void 0,this.name="GridGetRowsError",this.params=e.params,this.cause=e.cause}}class dkt extends Error{constructor(e){super(e.message),this.params=void 0,this.cause=void 0,this.name="GridUpdateRowError",this.params=e.params,this.cause=e.cause}}const pkt=ei("div")({position:"absolute",display:"inline-block",zIndex:60,"&:hover":{zIndex:70},"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),hkt=ei(pkt)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),fkt=ei(pkt)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),mkt=Smt(function(e,r){const o=Kbt(),n=Omt(),a=s.useRef(!1),i=s.useRef(0),l=s.useRef(null),c=s.useRef(null),u=((e,t)=>{const{classes:r}=e;return rs({root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]},Emt,r)})(n,e.position),d=eyt(o,pmt),p="vertical"===e.position?"height":"width",h="vertical"===e.position?"scrollTop":"scrollLeft",f="vertical"===e.position?"top":"left",m="vertical"===e.position?d.hasScrollX:d.hasScrollY,y=d.minimumSize[p]+(m?d.scrollbarSize:0),g=("vertical"===e.position?d.viewportInnerSize.height:d.viewportOuterSize.width)*(y/d.viewportOuterSize[p]),v=ql(()=>{const t=l.current,r=e.scrollPosition.current;if(!t)return;if(r[f]===i.current)return;if(i.current=r[f],a.current)return void(a.current=!1);a.current=!0;const o=r[f]/y;t[h]=o*g}),x=ql(()=>{const e=o.current.virtualScrollerRef.current,t=l.current;if(!t)return;if(a.current)return void(a.current=!1);a.current=!0;const r=t[h]/g;e[h]=r*y});Ic(()=>{const e=o.current.virtualScrollerRef.current,t=l.current,r={passive:!0};return e.addEventListener("scroll",v,r),t.addEventListener("scroll",x,r),()=>{e.removeEventListener("scroll",v,r),t.removeEventListener("scroll",x,r)}}),s.useEffect(()=>{c.current.style.setProperty(p,`${g}px`)},[g,p]);const b="vertical"===e.position?hkt:fkt;return t.jsx(b,{ref:Wl(r,l),className:u.root,style:"vertical"===e.position&&n.listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",onFocus:e=>{e.target.blur()},children:t.jsx("div",{ref:c,className:u.content})})});"production"!==process.env.NODE_ENV&&(mkt.displayName="GridVirtualScrollbar");const ykt=ei("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.virtualScroller,r.hasScrollX&&t["virtualScroller--hasScrollX"]]}})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0}),gkt=e=>e.current.state.dimensions.rightPinnedWidth>0;function vkt(e){const r=Rmt(),o=Omt(),n=eyt(r,gmt),a=eyt(r,ymt),i=eyt(r,gkt),s=eyt(r,Cmt),{getOverlay:l,overlaysProps:c}=(()=>{const e=Rmt(),r=Omt(),o=eyt(e,myt),n=eyt(e,axt),a=eyt(e,Pyt),i=eyt(e,wgt),s=0===o&&0===a,l=eyt(e,yyt),c=eyt(e,Rwt),u=!l&&s,d=!l&&o>0&&0===n,p=!l&&0===i.length;let h=null,f=null;u&&(h="noRowsOverlay"),p&&(h="noColumnsOverlay"),u&&c&&(h="emptyPivotOverlay"),d&&(h="noResultsOverlay"),l&&(h="loadingOverlay",f=r.slotProps?.loadingOverlay?.[s?"noRowsVariant":"variant"]??(s?"skeleton":"linear-progress"));const m={overlayType:h,loadingOverlayVariant:f},y=()=>{if(!h)return null;const e=r.slots?.[h],o=r.slotProps?.[h];return t.jsx(Twt,S({},m,{children:t.jsx(e,S({},o))}))};return"production"!==process.env.NODE_ENV&&(y.displayName="getOverlay"),{getOverlay:y,overlaysProps:m}})(),u=S({classes:o.classes,hasScrollX:a,hasPinnedRight:i},c),d=(e=>{const{classes:t,hasScrollX:r,hasPinnedRight:o,loadingOverlayVariant:n,overlayType:a}=e;return rs({root:["main",o&&"main--hasPinnedRight",("skeleton"===n||"noColumnsOverlay"===a)&&"main--hiddenContent"],scroller:["virtualScroller",r&&"virtualScroller--hasScrollX"]},Emt,t)})(u),p=bwt(),{getContainerProps:h,getScrollerProps:f,getContentProps:m,getRenderZoneProps:y,getScrollbarVerticalProps:g,getScrollbarHorizontalProps:v,getRows:x,getScrollAreaProps:b}=p,w=x();return t.jsxs(Vwt,S({className:d.root},h(),{ownerState:u,children:[t.jsx(Ubt,S({scrollDirection:"left"},b())),t.jsx(Ubt,S({scrollDirection:"right"},b())),t.jsx(Ubt,S({scrollDirection:"up"},b())),t.jsx(Ubt,S({scrollDirection:"down"},b())),t.jsxs(ykt,S({className:d.scroller},f(),{ownerState:u,children:[t.jsxs(Hwt,{children:[!o.listView&&t.jsx(zwt,{}),t.jsx(o.slots.pinnedRows,{position:"top",virtualScroller:p})]}),l(),t.jsx(Wwt,S({},m(),{children:t.jsxs(ekt,S({},y(),{children:[w,t.jsx(o.slots.detailPanels,{virtualScroller:p})]}))})),s&&t.jsx(Xwt,{rowsLength:w.length}),t.jsx(o.slots.bottomContainer,{children:t.jsx(o.slots.pinnedRows,{position:"bottom",virtualScroller:p})})]})),a&&!o.listView&&t.jsx(mkt,S({position:"horizontal"},v())),n&&t.jsx(mkt,S({position:"vertical"},g())),e.children]}))}function xkt(){const e=Omt();return e.hideFooter?null:t.jsx(e.slots.footer,S({},e.slotProps?.footer))}let bkt;const wkt=[e=>e.autoPageSize&&e.autoHeight&&["MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.","You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.","","Please remove one of these two props."].join("\n")||void 0,e=>"client"===e.paginationMode&&null!=e.paginationMeta&&['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.','`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join("\n")||void 0,e=>e.signature===Tmt.DataGrid&&"client"===e.paginationMode&&Vyt(e.rowCount)&&['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.','`rowCount` is only meant to be used with `paginationMode="server"`.'].join("\n")||void 0,e=>"server"===e.paginationMode&&null==e.rowCount&&!e.dataSource&&["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`","For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination"].join("\n")||void 0];const kkt=(e,t)=>{if(e)if(t){if(e===Dvt.LEFT)return"right";if(e===Dvt.RIGHT)return"left"}else{if(e===Dvt.LEFT)return"left";if(e===Dvt.RIGHT)return"right"}};function _kt(e,t,r,o){const n=kkt(r,t);return n&&void 0!==o?(e[n]=o,e):e}const Ckt=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],Mkt=["changeReason","unstable_updateValueOnRender"];Dvt.LEFT,ugt.LEFT,Dvt.RIGHT,ugt.RIGHT,Dvt.NONE,Dvt.VIRTUAL;let Skt=!1;const Dkt=Smt(function(e,r){const{column:o,row:n,rowId:a,rowNode:i,align:l,colIndex:c,width:u,className:d,style:p,colSpan:h,disableDragEvents:f,isNotVisible:m,pinnedOffset:y,pinnedPosition:g,showRightBorder:v,showLeftBorder:x,onClick:b,onDoubleClick:w,onMouseDown:k,onMouseUp:_,onMouseOver:C,onKeyDown:M,onKeyUp:D,onDragEnter:O,onDragOver:P}=e,E=Jl(e,Ckt),j=Kbt(),T=Omt(),N=Ni(),R=o.field,F=eyt(j,nkt,{rowId:a,field:R}),I=Qgt().hooks.useCellAggregationResult(a,R),A=F?Zyt.Edit:Zyt.View,z=j.current.getCellParamsForRow(a,R,n,{colDef:o,cellMode:A,rowNode:i,tabIndex:eyt(j,()=>{const e=Oxt(j);return e&&e.field===R&&e.id===a?0:-1}),hasFocus:eyt(j,()=>{const e=_xt(j);return e?.id===a&&e.field===R})});z.api=j.current,I&&(z.value=I.value,z.formattedValue=o.valueFormatter?o.valueFormatter(z.value,n,o,j):z.value);const L=eyt(j,()=>j.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:a,field:R})),B=eyt(j,dwt),V=eyt(j,pwt),{hasFocus:$,isEditable:H=!1,value:q}=z,W="actions"===o.type&&o.getActions?.(j.current.getRowParams(a)).some(e=>!e.props.disabled),U="view"!==A&&H||W?-1:z.tabIndex,{classes:G,getCellClassName:K}=T,Y=[eyt(j,()=>j.current.unstable_applyPipeProcessors("cellClassName",[],{id:a,field:R}).filter(Boolean).join(" "))];o.cellClassName&&Y.push("function"==typeof o.cellClassName?o.cellClassName(z):o.cellClassName),"flex"===o.display&&Y.push(jmt["cell--flex"]),K&&Y.push(K(z));const Z=z.formattedValue??q,X=s.useRef(null),Q=Wl(r,X),J=s.useRef(null),ee=T.cellSelection??!1,te=(e=>{const{align:t,showLeftBorder:r,showRightBorder:o,pinnedPosition:n,isEditable:a,isSelected:i,isSelectionMode:s,classes:l}=e;return rs({root:["cell",`cell--text${Tn(t)}`,i&&"selected",a&&"cell--editable",r&&"cell--withLeftBorder",o&&"cell--withRightBorder",n===Dvt.LEFT&&"cell--pinnedLeft",n===Dvt.RIGHT&&"cell--pinnedRight",s&&!a&&"cell--selectionMode"]},Emt,l)})({align:l,showLeftBorder:x,showRightBorder:v,isEditable:H,classes:T.classes,pinnedPosition:g,isSelected:L,isSelectionMode:ee}),re=s.useCallback(e=>t=>{const r=j.current.getCellParams(a,R||"");j.current.publishEvent(e,r,t),_&&_(t)},[j,R,_,a]),oe=s.useCallback(e=>t=>{const r=j.current.getCellParams(a,R||"");j.current.publishEvent(e,r,t),k&&k(t)},[j,R,k,a]),ne=s.useCallback((e,t)=>r=>{if(!j.current.getRow(a))return;const o=j.current.getCellParams(a,R||"");j.current.publishEvent(e,o,r),t&&t(r)},[j,R,a]),ae=B[a]?.[R]??!1,ie=V[a]?.[R]??1,se=s.useMemo(()=>{if(m)return{padding:0,opacity:0,width:0,height:0,border:0};const e=_kt(S({"--width":`${u}px`},p),N,g,y),t=g===Dvt.LEFT,r=g===Dvt.RIGHT;return ie>1&&(e.height=`calc(var(--height) * ${ie})`,e.zIndex=10,(t||r)&&(e.zIndex=40)),e},[u,m,p,y,g,N,ie]);if(s.useEffect(()=>{if(!$||A===Zyt.Edit)return;const e=Ll(j.current.rootElementRef.current);if(X.current&&!X.current.contains(e.activeElement)){const e=X.current.querySelector('[tabindex="0"]'),t=J.current||e||X.current;if(void 0===bkt&&document.createElement("div").focus({get preventScroll(){return bkt=!0,!1}}),bkt)t.focus({preventScroll:!0});else{const e=j.current.getScrollPosition();t.focus(),j.current.scroll(e)}}},[$,A,j]),ae)return t.jsx("div",{"data-colindex":c,role:"presentation",style:S({width:"var(--width)"},se)});let le,ce,ue=E.onFocus;if("test"===process.env.NODE_ENV&&T.experimentalFeatures?.warnIfFocusStateIsNotSynced&&(ue=e=>{const t=_xt(j);t?.id!==a||t.field!==R?Skt||([`MUI X: The cell with id=${a} and field=${R} received focus.`,`According to the state, the focus should be at id=${t?.id}, field=${t?.field}.`,"Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.","Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state."].join("\n"),Skt=!0):"function"==typeof E.onFocus&&E.onFocus(e)}),null===F&&o.renderCell&&(le=o.renderCell(z)),null!==F&&o.renderEditCell){const e=j.current.getRowWithUpdatedValues(a,o.field),t=Jl(F,Mkt),r=S({},z,{row:e,formattedValue:o.valueFormatter?o.valueFormatter(F.value,e,o,j):z.formattedValue},t);le=o.renderEditCell(r),Y.push(jmt["cell--editing"]),Y.push(G?.["cell--editing"])}if(void 0===le){const e=Z?.toString();le=e,ce=e}s.isValidElement(le)&&W&&(le=s.cloneElement(le,{focusElementRef:J}));const de=f?null:{onDragEnter:ne("cellDragEnter",O),onDragOver:ne("cellDragOver",P)};return t.jsx("div",S({className:za(te.root,Y,d),role:"gridcell","data-field":R,"data-colindex":c,"aria-colindex":c+1,"aria-colspan":h,"aria-rowspan":ie,style:se,title:ce,tabIndex:U,onClick:ne("cellClick",b),onDoubleClick:ne("cellDoubleClick",w),onMouseOver:ne("cellMouseOver",C),onMouseDown:oe("cellMouseDown"),onMouseUp:re("cellMouseUp"),onKeyDown:ne("cellKeyDown",M),onKeyUp:ne("cellKeyUp",D)},de,E,{onFocus:ue,ref:Q,children:le}))});"production"!==process.env.NODE_ENV&&(Dkt.displayName="GridCell"),"production"!==process.env.NODE_ENV&&(Dkt.propTypes={align:Ro.exports.oneOf(["center","left","right"]).isRequired,colIndex:Ro.exports.number.isRequired,colSpan:Ro.exports.number,column:Ro.exports.object.isRequired,disableDragEvents:Ro.exports.bool,isNotVisible:Ro.exports.bool.isRequired,pinnedOffset:Ro.exports.number,pinnedPosition:Ro.exports.oneOf([0,1,2,3]).isRequired,row:Ro.exports.object.isRequired,rowId:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,rowNode:Ro.exports.object.isRequired,showLeftBorder:Ro.exports.bool.isRequired,showRightBorder:Ro.exports.bool.isRequired,width:Ro.exports.number.isRequired});const Okt=G(Dkt),Pkt=["field","type","align","width","height","empty","style","className"],Ekt="1.3em",jkt=[40,80],Tkt={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},Nkt=function(e){const t=(r=e,()=>{let e=r+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296});var r;return(e,r)=>e+(r-e)*t()}(12345);function Rkt(e){const{field:r,type:o,align:n,width:a,height:i,empty:l=!1,style:c,className:u}=e,d=Jl(e,Pkt),p=Omt(),h=(e=>{const{align:t,classes:r,empty:o}=e;return rs({root:["cell","cellSkeleton",`cell--text${t?Tn(t):"Left"}`,o&&"cellEmpty"]},Emt,r)})({classes:p.classes,align:n,empty:l}),f=s.useMemo(()=>{if("boolean"===o||"actions"===o)return{variant:"circular",width:Ekt,height:Ekt};const[e,t]=o?Tkt[o]??jkt:jkt;return{variant:"text",width:`${Math.round(Nkt(e,t))}%`,height:"1.2em"}},[o]);return t.jsx("div",S({"data-field":r,className:za(h.root,u),style:S({height:i,maxWidth:a,minWidth:a},c)},d,{children:!l&&t.jsx(p.slots.baseSkeleton,S({},f))}))}"production"!==process.env.NODE_ENV&&(Rkt.propTypes={align:Ro.exports.string,empty:Ro.exports.bool,field:Ro.exports.string,height:Ro.exports.oneOfType([Ro.exports.oneOf(["auto"]),Ro.exports.number]),type:Ro.exports.oneOf(["actions","boolean","custom","date","dateTime","number","singleSelect","string"]),width:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string])});const Fkt=G(Rkt),Ikt={width:3,rx:1.5,x:10.5},Akt=e=>e.current.state.dimensions.hasScrollX&&(!e.current.state.dimensions.hasScrollY||0===e.current.state.dimensions.scrollbarSize),zkt=gl("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${jmt.autoHeight}`]:t.autoHeight},{[`&.${jmt.autosizing}`]:t.autosizing},{[`&.${jmt["root--densityStandard"]}`]:t["root--densityStandard"]},{[`&.${jmt["root--densityComfortable"]}`]:t["root--densityComfortable"]},{[`&.${jmt["root--densityCompact"]}`]:t["root--densityCompact"]},{[`&.${jmt["root--disableUserSelection"]}`]:t["root--disableUserSelection"]},{[`&.${jmt["root--noToolbar"]}`]:t["root--noToolbar"]},{[`&.${jmt.withVerticalBorder}`]:t.withVerticalBorder},{[`& .${jmt.actionsCell}`]:t.actionsCell},{[`& .${jmt.booleanCell}`]:t.booleanCell},{[`& .${jmt.cell}`]:t.cell},{[`& .${jmt["cell--editable"]}`]:t["cell--editable"]},{[`& .${jmt["cell--editing"]}`]:t["cell--editing"]},{[`& .${jmt["cell--flex"]}`]:t["cell--flex"]},{[`& .${jmt["cell--pinnedLeft"]}`]:t["cell--pinnedLeft"]},{[`& .${jmt["cell--pinnedRight"]}`]:t["cell--pinnedRight"]},{[`& .${jmt["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${jmt["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${jmt["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${jmt["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${jmt["cell--selectionMode"]}`]:t["cell--selectionMode"]},{[`& .${jmt["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${jmt["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${jmt["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${jmt["cell--withLeftBorder"]}`]:t["cell--withLeftBorder"]},{[`& .${jmt["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${jmt.cellCheckbox}`]:t.cellCheckbox},{[`& .${jmt.cellEmpty}`]:t.cellEmpty},{[`& .${jmt.cellOffsetLeft}`]:t.cellOffsetLeft},{[`& .${jmt.cellSkeleton}`]:t.cellSkeleton},{[`& .${jmt.checkboxInput}`]:t.checkboxInput},{[`& .${jmt.columnHeader}`]:t.columnHeader},{[`& .${jmt["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${jmt["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${jmt["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${jmt["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${jmt["columnHeader--emptyGroup"]}`]:t["columnHeader--emptyGroup"]},{[`& .${jmt["columnHeader--filledGroup"]}`]:t["columnHeader--filledGroup"]},{[`& .${jmt["columnHeader--filtered"]}`]:t["columnHeader--filtered"]},{[`& .${jmt["columnHeader--last"]}`]:t["columnHeader--last"]},{[`& .${jmt["columnHeader--lastUnpinned"]}`]:t["columnHeader--lastUnpinned"]},{[`& .${jmt["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${jmt["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${jmt["columnHeader--pinnedLeft"]}`]:t["columnHeader--pinnedLeft"]},{[`& .${jmt["columnHeader--pinnedRight"]}`]:t["columnHeader--pinnedRight"]},{[`& .${jmt["columnHeader--siblingFocused"]}`]:t["columnHeader--siblingFocused"]},{[`& .${jmt["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${jmt["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${jmt["columnHeader--withLeftBorder"]}`]:t["columnHeader--withLeftBorder"]},{[`& .${jmt["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${jmt.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${jmt.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${jmt.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${jmt.columnHeaderTitleContainerContent}`]:t.columnHeaderTitleContainerContent},{[`& .${jmt.columnSeparator}`]:t.columnSeparator},{[`& .${jmt["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${jmt["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${jmt["columnSeparator--sideLeft"]}`]:t["columnSeparator--sideLeft"]},{[`& .${jmt["columnSeparator--sideRight"]}`]:t["columnSeparator--sideRight"]},{[`& .${jmt["container--bottom"]}`]:t["container--bottom"]},{[`& .${jmt["container--top"]}`]:t["container--top"]},{[`& .${jmt.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${jmt["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},{[`& .${jmt.editBooleanCell}`]:t.editBooleanCell},{[`& .${jmt.filterIcon}`]:t.filterIcon},{[`& .${jmt["filler--borderBottom"]}`]:t["filler--borderBottom"]},{[`& .${jmt["filler--pinnedLeft"]}`]:t["filler--pinnedLeft"]},{[`& .${jmt["filler--pinnedRight"]}`]:t["filler--pinnedRight"]},{[`& .${jmt.groupingCriteriaCell}`]:t.groupingCriteriaCell},{[`& .${jmt.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${jmt.groupingCriteriaCellToggle}`]:t.groupingCriteriaCellToggle},{[`& .${jmt.headerFilterRow}`]:t.headerFilterRow},{[`& .${jmt.iconSeparator}`]:t.iconSeparator},{[`& .${jmt.menuIcon}`]:t.menuIcon},{[`& .${jmt.menuIconButton}`]:t.menuIconButton},{[`& .${jmt.menuList}`]:t.menuList},{[`& .${jmt.menuOpen}`]:t.menuOpen},{[`& .${jmt.overlayWrapperInner}`]:t.overlayWrapperInner},{[`& .${jmt.pinnedRows}`]:t.pinnedRows},{[`& .${jmt["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},{[`& .${jmt["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`& .${jmt.row}`]:t.row},{[`& .${jmt["row--borderBottom"]}`]:t["row--borderBottom"]},{[`& .${jmt["row--detailPanelExpanded"]}`]:t["row--detailPanelExpanded"]},{[`& .${jmt["row--dragging"]}`]:t["row--dragging"]},{[`& .${jmt["row--dynamicHeight"]}`]:t["row--dynamicHeight"]},{[`& .${jmt["row--editable"]}`]:t["row--editable"]},{[`& .${jmt["row--editing"]}`]:t["row--editing"]},{[`& .${jmt["row--firstVisible"]}`]:t["row--firstVisible"]},{[`& .${jmt["row--lastVisible"]}`]:t["row--lastVisible"]},{[`& .${jmt.rowReorderCell}`]:t.rowReorderCell},{[`& .${jmt["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${jmt.rowReorderCellContainer}`]:t.rowReorderCellContainer},{[`& .${jmt.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${jmt.rowSkeleton}`]:t.rowSkeleton},{[`& .${jmt.scrollbar}`]:t.scrollbar},{[`& .${jmt["scrollbar--horizontal"]}`]:t["scrollbar--horizontal"]},{[`& .${jmt["scrollbar--vertical"]}`]:t["scrollbar--vertical"]},{[`& .${jmt.scrollbarFiller}`]:t.scrollbarFiller},{[`& .${jmt["scrollbarFiller--borderBottom"]}`]:t["scrollbarFiller--borderBottom"]},{[`& .${jmt["scrollbarFiller--borderTop"]}`]:t["scrollbarFiller--borderTop"]},{[`& .${jmt["scrollbarFiller--header"]}`]:t["scrollbarFiller--header"]},{[`& .${jmt["scrollbarFiller--pinnedRight"]}`]:t["scrollbarFiller--pinnedRight"]},{[`& .${jmt.sortIcon}`]:t.sortIcon},{[`& .${jmt.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${jmt.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${jmt.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${jmt.withBorderColor}`]:t.withBorderColor},{[`& .${jmt["row--dropAbove"]}`]:t["row--dropAbove"]},{[`& .${jmt["row--dropBelow"]}`]:t["row--dropBelow"]},{[`& .${jmt["row--beingDragged"]}`]:t["row--beingDragged"]}]})(()=>{const e=eyt(Kbt(),Akt),t=lyt.colors.background.base,r=lyt.header.background.base,o=lyt.cell.background.pinned,n=function(e){return Lkt(e,1)}(lyt.colors.interactive.hover),a=lyt.colors.interactive.hoverOpacity,i=lyt.colors.interactive.selected,s=lyt.colors.interactive.selectedOpacity,l=i,c=`calc(${s} + ${a})`,u=Bkt(t,n,a),d=Bkt(t,i,s),p=Bkt(t,l,c),h=Bkt(o,n,a),f=Bkt(o,i,s),m=Bkt(o,l,c),y=e=>({[`& .${jmt["cell--pinnedLeft"]}, & .${jmt["cell--pinnedRight"]}`]:{backgroundColor:e,"&.Mui-selected":{backgroundColor:Bkt(e,d,s),"&:hover":{backgroundColor:Bkt(e,p,c)}}}}),g=y(h),v=y(f),x=y(m),b={backgroundColor:d,"&:hover":{backgroundColor:p,"@media (hover: none)":{backgroundColor:d}}};return{"--unstable_DataGrid-radius":lyt.radius.base,"--unstable_DataGrid-headWeight":lyt.typography.fontWeight.medium,"--DataGrid-rowBorderColor":lyt.colors.border.base,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:lyt.colors.border.base,borderRadius:"var(--unstable_DataGrid-radius)",backgroundColor:lyt.colors.background.base,color:lyt.colors.foreground.base,font:lyt.typography.font.body,outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",transform:"translate(0, 0)",[`.${jmt.main} > *:first-child/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${jmt.autoHeight}`]:{height:"auto"},[`&.${jmt.autosizing}`]:{[`& .${jmt.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${jmt.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${jmt.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${jmt.groupingCriteriaCell}`]:{width:"unset"},[`& .${jmt.treeDataGroupingCell}`]:{width:"unset"}},[`&.${jmt.withSidePanel}`]:{flexDirection:"row"},[`& .${jmt.mainContent}`]:{display:"flex",flexDirection:"column",overflow:"hidden",flex:1},[`& .${jmt.columnHeader}, & .${jmt.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${jmt.columnHeader}:focus-within, & .${jmt.cell}:focus-within`]:{outline:`solid ${Lkt(lyt.colors.interactive.focus,.5)} 1px`,outlineOffset:-1},[`& .${jmt.columnHeader}:focus, & .${jmt.cell}:focus`]:{outline:`solid ${lyt.colors.interactive.focus} 1px`,outlineOffset:-1},[`& .${jmt.columnHeader}:focus,\n & .${jmt["columnHeader--withLeftBorder"]},\n & .${jmt["columnHeader--withRightBorder"]},\n & .${jmt["columnHeader--siblingFocused"]},\n & .${jmt["virtualScroller--hasScrollX"]} .${jmt["columnHeader--lastUnpinned"]},\n & .${jmt["virtualScroller--hasScrollX"]} .${jmt["columnHeader--last"]}\n `]:{[`& .${jmt.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${jmt["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${jmt["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${jmt["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${jmt["root--noToolbar"]} [aria-rowindex="1"] .${jmt["columnHeader--last"]}`]:{borderTopRightRadius:e?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${jmt.columnHeaderCheckbox}, & .${jmt.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${jmt.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center",backgroundColor:r},[`& .${jmt["columnHeader--filter"]}`]:{paddingTop:8,paddingBottom:8,paddingRight:5,minHeight:"min-content",overflow:"hidden"},[`& .${jmt["virtualScroller--hasScrollX"]} .${jmt["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${jmt["pivotPanelField--sorted"]} .${jmt.iconButtonContainer},\n & .${jmt["columnHeader--sorted"]} .${jmt.iconButtonContainer},\n & .${jmt["columnHeader--filtered"]} .${jmt.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${jmt.pivotPanelField}:not(.${jmt["pivotPanelField--sorted"]}) .${jmt.sortButton},\n & .${jmt.columnHeader}:not(.${jmt["columnHeader--sorted"]}) .${jmt.sortButton}`]:{opacity:0,transition:lyt.transition(["opacity"],{duration:lyt.transitions.duration.short})},[`& .${jmt.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:lyt.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${jmt.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${jmt["columnHeader--filledGroup"]} .${jmt.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${jmt.sortIcon}, & .${jmt.filterIcon}`]:{fontSize:"inherit"},[`& .${jmt["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${jmt["columnHeader--alignCenter"]} .${jmt.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${jmt["columnHeader--alignRight"]} .${jmt.columnHeaderDraggableContainer}, & .${jmt["columnHeader--alignRight"]} .${jmt.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${jmt["columnHeader--alignCenter"]} .${jmt.menuIcon}`]:{marginLeft:"auto"},[`& .${jmt["columnHeader--alignRight"]} .${jmt.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${jmt["columnHeader--moving"]}`]:{backgroundColor:u},[`& .${jmt["columnHeader--pinnedLeft"]}, & .${jmt["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:40,background:lyt.header.background.base},[`& .${jmt.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:30,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:10,color:lyt.colors.border.base},[`& .${jmt.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)",backgroundColor:r},"@media (hover: hover)":{[`& .${jmt.columnHeader}:hover`]:{[`& .${jmt.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${jmt.iconButtonContainer}`]:{visibility:"visible",width:"auto"}},[`& .${jmt.columnHeader}:not(.${jmt["columnHeader--sorted"]}):hover .${jmt.sortButton},\n & .${jmt.pivotPanelField}:not(.${jmt["pivotPanelField--sorted"]}):hover .${jmt.sortButton},\n & .${jmt.pivotPanelField}:not(.${jmt["pivotPanelField--sorted"]}) .${jmt.sortButton}:focus-visible`]:{opacity:.5}},"@media (hover: none)":{[`& .${jmt.columnHeader} .${jmt.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${jmt.columnHeader}:focus,\n & .${jmt["columnHeader--siblingFocused"]}`]:{[`.${jmt["columnSeparator--resizable"]}`]:{color:lyt.colors.foreground.accent}},[`& .${jmt.pivotPanelField}:not(.${jmt["pivotPanelField--sorted"]}) .${jmt.sortButton}`]:{opacity:.5}},[`& .${jmt["columnSeparator--sideLeft"]}`]:{left:-5},[`& .${jmt["columnSeparator--sideRight"]}`]:{right:-5},[`& .${jmt["columnHeader--withRightBorder"]} .${jmt["columnSeparator--sideLeft"]}`]:{left:-5.5},[`& .${jmt["columnHeader--withRightBorder"]} .${jmt["columnSeparator--sideRight"]}`]:{right:-5.5},[`& .${jmt["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${jmt["columnSeparator--resizing"]}`]:{color:lyt.colors.foreground.accent},"@media (hover: none)":{[`& .${jmt.iconSeparator} rect`]:Ikt},"@media (hover: hover)":{"&:hover":{color:lyt.colors.foreground.accent,[`& .${jmt.iconSeparator} rect`]:Ikt}},"& svg":{pointerEvents:"none"}},[`& .${jmt.iconSeparator}`]:{color:"inherit",transition:lyt.transition(["color","width"],{duration:lyt.transitions.duration.short})},[`& .${jmt.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${jmt.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${jmt.headerFilterRow}`]:{[`& .${jmt.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${jmt["row--borderBottom"]} .${jmt.columnHeader},\n & .${jmt["row--borderBottom"]} .${jmt.filler},\n & .${jmt["row--borderBottom"]} .${jmt.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${jmt["row--borderBottom"]} .${jmt.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${jmt.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${jmt["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:u,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${jmt.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":b},[`& .${jmt.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":b},[`& .${jmt["virtualScrollerContent--overflowed"]} .${jmt["row--lastVisible"]} .${jmt.cell}`]:{borderTopColor:"transparent"},[`& .${jmt.pinnedRows} .${jmt.row}, .${jmt.aggregationRowOverlayWrapper} .${jmt.row}`]:{backgroundColor:o,"&:hover":{backgroundColor:h}},[`& .${jmt["pinnedRows--top"]} :first-of-type`]:{[`& .${jmt.cell}, .${jmt.scrollbarFiller}`]:{borderTop:"none"}},[`&.${jmt["root--disableUserSelection"]}`]:{userSelect:"none"},[`& .${jmt["row--dynamicHeight"]} > .${jmt.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${jmt.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${jmt.cell}.${jmt["cell--selectionMode"]}`]:{cursor:"default"},[`& .${jmt.cell}.${jmt["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:lyt.shadows.base,backgroundColor:lyt.colors.background.overlay,"&:focus-within":{outline:`1px solid ${lyt.colors.interactive.focus}`,outlineOffset:-1}},[`& .${jmt["row--editing"]}`]:{boxShadow:lyt.shadows.base},[`& .${jmt["row--editing"]} .${jmt.cell}`]:{boxShadow:"none",backgroundColor:lyt.colors.background.overlay},[`& .${jmt.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${jmt.booleanCell}[data-value="true"]`]:{color:lyt.colors.foreground.muted},[`& .${jmt.booleanCell}[data-value="false"]`]:{color:lyt.colors.foreground.disabled},[`& .${jmt.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:lyt.spacing(1)},[`& .${jmt.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:lyt.colors.interactive.disabledOpacity},[`& .${jmt["rowReorderCell--draggable"]}`]:{cursor:"grab",opacity:1},[`& .${jmt.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${jmt.withBorderColor}`]:{borderColor:lyt.colors.border.base},[`& .${jmt["cell--withLeftBorder"]}, & .${jmt["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${jmt["cell--withRightBorder"]}, & .${jmt["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${jmt["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${jmt["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${jmt["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${jmt["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${jmt["cell--pinnedLeft"]}, & .${jmt["cell--pinnedRight"]}`]:{position:"sticky",zIndex:30,background:lyt.cell.background.pinned,"&.Mui-selected":{backgroundColor:f}},[`& .${jmt.row}`]:{"&:hover":g,"&.Mui-selected":v,"&.Mui-selected:hover":x},[`& .${jmt.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${jmt.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${jmt.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${jmt.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${jmt["columnHeader--dragging"]}, & .${jmt["row--dragging"]}`]:{background:lyt.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:lyt.colors.interactive.disabledOpacity},[`& .${jmt["row--dragging"]}`]:{background:lyt.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:lyt.colors.interactive.disabledOpacity,[`& .${jmt.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${jmt.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${jmt.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:lyt.spacing(2)},[`& .${jmt.treeDataGroupingCellLoadingContainer}, .${jmt.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${jmt.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${jmt.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:lyt.spacing(2)},[`& .${jmt.columnHeaders} .${jmt.scrollbarFiller}`]:{backgroundColor:r},[`.${jmt.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${jmt["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${jmt["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${jmt["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:lyt.cell.background.pinned,position:"sticky",zIndex:40,right:0}},[`& .${jmt.filler}`]:{flex:"1 0 auto"},[`& .${jmt["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${jmt.columnHeaders} .${jmt.filler}`]:{backgroundColor:r},[`& .${jmt["main--hiddenContent"]}`]:{[`& .${jmt.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${jmt["scrollbar--vertical"]}, & .${jmt.pinnedRows}, & .${jmt.virtualScroller} > .${jmt.filler}`]:{display:"none"}},[`& .${jmt["row--dropAbove"]}`]:{position:"relative","&::before":{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"2px",backgroundColor:lyt.colors.interactive.selected}},[`& .${jmt["row--dropBelow"]}`]:{position:"relative","&::before":{content:'""',position:"absolute",bottom:"-2px",left:0,width:"100%",height:"2px",backgroundColor:lyt.colors.interactive.selected},[`&.${jmt["row--lastVisible"]}`]:{"&::before":{bottom:"calc(var(--DataGrid-hasScrollY) * 0px + (1 - var(--DataGrid-hasScrollY)) * -2px)"}}},[`& .${jmt["row--beingDragged"]}`]:{backgroundColor:lyt.colors.background.overlay,color:lyt.colors.foreground.disabled}}});function Lkt(e,t){return`rgba(from ${e} r g b / ${t})`}function Bkt(e,t,r){return`color-mix(in srgb,${e}, ${t} calc(${r} * 100%))`}const Vkt=()=>()=>{},$kt=()=>!1,Hkt=()=>!0,qkt=s.createContext(void 0);function Wkt(){const e=s.useContext(qkt);if(void 0===e)throw new Error("MUI X: Missing context.");return e}function Ukt({children:e}){const r=s.useRef(null),o=s.useRef(null),n=s.useRef(null),a=s.useMemo(()=>({columnsPanelTriggerRef:r,filterPanelTriggerRef:o,aiAssistantPanelTriggerRef:n}),[]);return t.jsx(qkt.Provider,{value:a,children:e})}function Gkt(){const e=Rmt(),r=eyt(e,vgt),o=Omt(),n=eyt(e,akt),{columnsPanelTriggerRef:a,filterPanelTriggerRef:i,aiAssistantPanelTriggerRef:s}=Wkt(),l=e.current.unstable_applyPipeProcessors("preferencePanel",null,n.openedPanelValue??skt.filters);let c=null;switch(n.openedPanelValue){case skt.filters:c=i.current;break;case skt.columns:c=a.current;break;case skt.aiAssistant:c=s.current}return t.jsx(o.slots.panel,S({id:n.panelId,open:r.length>0&&n.open,"aria-labelledby":n.labelId,target:c,onClose:()=>e.current.hidePreferences()},o.slotProps?.panel,{children:l}))}function Kkt(){const e=Omt();return t.jsxs(s.Fragment,{children:[t.jsx(Gkt,{}),e.showToolbar&&t.jsx(e.slots.toolbar,S({},e.slotProps?.toolbar))]})}"production"!==process.env.NODE_ENV&&(qkt.displayName="GridPanelContext");const Ykt=["className","children","sidePanel"],Zkt=Smt(function(e,r){const o=Omt(),{className:n,children:a,sidePanel:i}=e,l=Jl(e,Ykt),c=Kbt(),u=eyt(c,ryt),d=c.current.rootElementRef,p=s.useCallback(e=>{null!==e&&c.current.publishEvent("rootMount",e)},[c]),h=Wl(d,r,p),f=o,m=((e,t)=>{const{autoHeight:r,classes:o,showCellVerticalBorder:n}=e;return rs({root:["root",r&&"autoHeight",`root--density${Tn(t)}`,null===e.slots.toolbar&&"root--noToolbar","withBorderColor",n&&"withVerticalBorder"]},Emt,o)})(f,u),y=s.useContext(Jgt);return qmt.exports.useSyncExternalStore(Vkt,$kt,Hkt)?null:t.jsxs(zkt,S({className:za(m.root,n,y.className,i&&jmt.withSidePanel),ownerState:f},l,{ref:h,children:[t.jsxs("div",{className:jmt.mainContent,role:"presentation",children:[t.jsx(Kkt,{}),t.jsx(vkt,{children:a}),t.jsx(xkt,{})]}),i,y.tag]}))});"production"!==process.env.NODE_ENV&&(Zkt.displayName="GridRoot"),"production"!==process.env.NODE_ENV&&(Zkt.propTypes={sidePanel:Ro.exports.node,sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const Xkt=G(Zkt),Qkt=["className"],Jkt=ei("div",{name:"MuiDataGrid",slot:"FooterContainer"})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),e_t=Smt(function(e,r){const{className:o}=e,n=Jl(e,Qkt),a=Omt(),i=(e=>{const{classes:t}=e;return rs({root:["footerContainer","withBorderColor"]},Emt,t)})(a);return t.jsx(Jkt,S({className:za(i.root,o),ownerState:a},n,{ref:r}))});"production"!==process.env.NODE_ENV&&(e_t.displayName="GridFooterContainer"),"production"!==process.env.NODE_ENV&&(e_t.propTypes={sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const t_t=["className"],r_t=ei("div",{name:"MuiDataGrid",slot:"Overlay"})({width:"100%",height:"100%",display:"flex",gap:lyt.spacing(1),flexDirection:"column",alignSelf:"center",alignItems:"center",justifyContent:"center",textAlign:"center",textWrap:"balance",backgroundColor:lyt.colors.background.backdrop}),o_t=Smt(function(e,r){const{className:o}=e,n=Jl(e,t_t),a=Omt(),i=(e=>{const{classes:t}=e;return rs({root:["overlay"]},Emt,t)})(a);return t.jsx(r_t,S({className:za(i.root,o),ownerState:a},n,{ref:r}))});function n_t(e,t,r,o={}){return"function"==typeof t?t(r,o):t?(t.props.className&&(r.className=function(e,t){if(!e||!t)return e||t;return`${e} ${t}`}(t.props.className,r.className)),(t.props.style||r.style)&&(r.style=S({},r.style,t.props.style)),s.cloneElement(t,r)):s.createElement(e,r)}"production"!==process.env.NODE_ENV&&(o_t.displayName="GridOverlay"),"production"!==process.env.NODE_ENV&&(o_t.propTypes={sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const a_t=s.createContext(void 0);function i_t(e,t){if(!e.ref.current||!t.ref.current)return 0;const r=e.ref.current.compareDocumentPosition(t.ref.current);return r?r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0:0}"production"!==process.env.NODE_ENV&&(a_t.displayName="ToolbarContext");const s_t=["render","className"],l_t=ei("div",{name:"MuiDataGrid",slot:"Toolbar"})({flex:0,display:"flex",alignItems:"center",justifyContent:"end",gap:lyt.spacing(.25),padding:lyt.spacing(.75),minHeight:52,boxSizing:"border-box",borderBottom:`1px solid ${lyt.colors.border.base}`}),c_t=Smt(function(e,r){const{render:o,className:n}=e,a=Jl(e,s_t),i=Omt(),l=(e=>{const{classes:t}=e;return rs({root:["toolbar"]},Emt,t)})(i),[c,u]=s.useState(null),[d,p]=s.useState([]),h=s.useCallback(()=>d.sort(i_t),[d]),f=s.useCallback((e,t,r=!0)=>{let o=e;const n=h(),a=n.length;for(let i=0;i<a;i+=1){if(o+=t,o>=a){if(!r)return-1;o=0}else if(o<0){if(!r)return-1;o=a-1}if(!n[o].ref.current?.disabled&&"true"!==n[o].ref.current?.ariaDisabled)return o}return-1},[h]),m=s.useCallback((e,t)=>{p(r=>[...r,{id:e,ref:t}])},[]),y=s.useCallback(e=>{p(t=>t.filter(t=>t.id!==e))},[]),g=s.useCallback(e=>{if(!c)return;const t=h(),r=t.findIndex(e=>e.id===c);let o=-1;if("ArrowRight"===e.key?(e.preventDefault(),o=f(r,1)):"ArrowLeft"===e.key?(e.preventDefault(),o=f(r,-1)):"Home"===e.key?(e.preventDefault(),o=f(-1,1,!1)):"End"===e.key&&(e.preventDefault(),o=f(t.length,-1,!1)),o>=0&&o<t.length){const e=t[o];u(e.id),e.ref.current?.focus()}},[h,c,f]),v=s.useCallback(e=>{c!==e&&u(e)},[c,u]),x=s.useCallback(e=>{const t=h(),r=t.findIndex(t=>t.id===e),o=f(r,1);if(o>=0&&o<t.length){const e=t[o];u(e.id),e.ref.current?.focus()}},[h,f]);s.useEffect(()=>{const e=h();if(e.length>0){if(!c)return void u(e[0].id);const t=e.findIndex(e=>e.id===c);if(e[t]){if(-1===t){const r=e[t];r&&(u(r.id),r.ref.current?.focus())}}else{const t=e[e.length-1];t&&(u(t.id),t.ref.current?.focus())}}},[h,f]);const b=s.useMemo(()=>({focusableItemId:c,registerItem:m,unregisterItem:y,onItemKeyDown:g,onItemFocus:v,onItemDisabled:x}),[c,m,y,g,v,x]),w=n_t(l_t,o,S({role:"toolbar","aria-orientation":"horizontal","aria-label":i.label||void 0,className:za(l.root,n)},a,{ref:r}));return t.jsx(a_t.Provider,{value:b,children:w})});"production"!==process.env.NODE_ENV&&(c_t.displayName="Toolbar"),"production"!==process.env.NODE_ENV&&(c_t.propTypes={render:Ro.exports.oneOfType([Ro.exports.element,Ro.exports.func])});const u_t=["render","onKeyDown","onFocus","disabled","aria-disabled"],d_t=Smt(function(e,r){const{render:o,onKeyDown:n,onFocus:a,disabled:i,"aria-disabled":l}=e,c=Jl(e,u_t),u=Li(),d=Omt(),p=s.useRef(null),h=Wl(p,r),{focusableItemId:f,registerItem:m,unregisterItem:y,onItemKeyDown:g,onItemFocus:v,onItemDisabled:x}=function(){const e=s.useContext(a_t);if(void 0===e)throw new Error("MUI X: Missing context. Toolbar subcomponents must be placed within a <Toolbar /> component.");return e}();s.useEffect(()=>(m(u,p),()=>y(u)),[]);const b=s.useRef(i);s.useEffect(()=>{b.current!==i&&!0===i&&x(u,i),b.current=i},[i,u,x]);const w=s.useRef(l);s.useEffect(()=>{w.current!==l&&!0===l&&x(u,!0),w.current=l},[l,u,x]);const k=n_t(d.slots.baseIconButton,o,S({},d.slotProps?.baseIconButton,{tabIndex:f===u?0:-1},c,{disabled:i,"aria-disabled":l,onKeyDown:e=>{g(e),n?.(e)},onFocus:e=>{v(u),a?.(e)},ref:h}));return t.jsx(s.Fragment,{children:k})});"production"!==process.env.NODE_ENV&&(d_t.displayName="ToolbarButton"),"production"!==process.env.NODE_ENV&&(d_t.propTypes={className:Ro.exports.string,color:Ro.exports.oneOf(["default","inherit","primary"]),disabled:Ro.exports.bool,edge:Ro.exports.oneOf(["end","start",!1]),id:Ro.exports.string,label:Ro.exports.string,render:Ro.exports.oneOfType([Ro.exports.element,Ro.exports.func]),role:Ro.exports.string,size:Ro.exports.oneOf(["large","medium","small"]),style:Ro.exports.object,tabIndex:Ro.exports.number,title:Ro.exports.string,touchRippleRef:Ro.exports.any});const p_t=s.memo(e=>{const{colDef:r,open:o,columnMenuId:n,columnMenuButtonId:a,iconButtonRef:i}=e,l=Rmt(),c=Omt(),u=(e=>{const{classes:t,open:r}=e;return rs({root:["menuIcon",r&&"menuOpen"],button:["menuIconButton"]},Emt,t)})(S({},e,{classes:c.classes})),d=s.useCallback(e=>{e.preventDefault(),e.stopPropagation(),l.current.toggleColumnMenu(r.field)},[l,r.field]),p=r.headerName??r.field;return t.jsx("div",{className:u.root,children:t.jsx(c.slots.baseTooltip,S({title:l.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},c.slotProps?.baseTooltip,{children:t.jsx(c.slots.baseIconButton,S({ref:i,tabIndex:-1,className:u.button,"aria-label":l.current.getLocaleText("columnMenuAriaLabel")(p),size:"small",onClick:d,"aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?n:void 0,id:a},c.slotProps?.baseIconButton,{children:t.jsx(c.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function h_t({columnMenuId:e,columnMenuButtonId:r,ContentComponent:o,contentComponentProps:n,field:a,open:i,target:s,onExited:l}){const c=Rmt(),u=c.current.getColumn(a),d=ql(e=>{e&&(e.stopPropagation(),s?.contains(e.target))||c.current.hideColumnMenu()});return s&&u?t.jsx(nvt,{position:"bottom-"+("right"===u.align?"start":"end"),open:i,target:s,onClose:d,onExited:l,children:t.jsx(o,S({colDef:u,hideMenu:d,open:i,id:e,labelledby:r},n))}):null}function f_t(e,t){return e.closest(`.${t}`)}function m_t(e){return e.replace(/["\\]/g,"\\$&")}function y_t(e){return`.${jmt.row}[data-id="${m_t(String(e))}"]`}function g_t(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}function v_t(e,t){return e.rootElementRef.current.querySelector(`.${jmt[t]}`)}"production"!==process.env.NODE_ENV&&(p_t.displayName="ColumnHeaderMenuIcon"),"production"!==process.env.NODE_ENV&&(h_t.propTypes={columnMenuButtonId:Ro.exports.string,columnMenuId:Ro.exports.string,ContentComponent:Ro.exports.elementType.isRequired,contentComponentProps:Ro.exports.any,field:Ro.exports.string.isRequired,onExited:Ro.exports.func,open:Ro.exports.bool.isRequired,target:Vd});const x_t=({api:e,colIndex:t,position:r,filterFn:o})=>{if(null===t)return[];const n=[];return w_t(e).forEach(e=>{e.getAttribute("data-id")&&e.querySelectorAll(`.${jmt["left"===r?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(e=>{const t=k_t(e);null!==t&&o(t)&&n.push(e)})}),n};const b_t=({api:e,colIndex:t,position:r,filterFn:o})=>{if(!e.columnHeadersContainerRef?.current)return[];if(null===t)return[];const n=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${jmt["left"===r?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(e=>{const t=k_t(e);null!==t&&o(t,e)&&n.push(e)}),n};function w_t(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${jmt.row}`)}function k_t(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}const __t=["className","aria-label"],C_t=ei("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle"})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),M_t=Smt(function(e,r){const{className:o}=e,n=Jl(e,__t),a=Omt(),i=(e=>{const{classes:t}=e;return rs({root:["columnHeaderTitle"]},Emt,t)})(a);return t.jsx(C_t,S({className:za(i.root,o),ownerState:a},n,{ref:r}))});function S_t(e){const{label:r,description:o}=e,n=Omt(),a=s.useRef(null),[i,l]=s.useState(""),c=s.useCallback(()=>{if(!o&&a?.current){const t=(e=a.current).scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth;l(t?r:"")}var e},[o,r]);return t.jsx(n.slots.baseTooltip,S({title:o||i},n.slotProps?.baseTooltip,{children:t.jsx(M_t,{onMouseOver:c,ref:a,children:r})}))}"production"!==process.env.NODE_ENV&&(M_t.displayName="ColumnHeaderInnerTitle"),"production"!==process.env.NODE_ENV&&(S_t.propTypes={columnWidth:Ro.exports.number.isRequired,description:Ro.exports.node,label:Ro.exports.string.isRequired});const D_t=["resizable","resizing","height","side"];var O_t=function(e){return e.Left="left",e.Right="right",e}(O_t||{});function P_t(e){const{height:r,side:o=O_t.Right}=e,n=Jl(e,D_t),a=Omt(),i=(e=>{const{resizable:t,resizing:r,classes:o,side:n}=e;return rs({root:["columnSeparator",t&&"columnSeparator--resizable",r&&"columnSeparator--resizing",n&&`columnSeparator--side${Tn(n)}`],icon:["iconSeparator"]},Emt,o)})(S({},e,{side:o,classes:a.classes})),l=s.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]);return t.jsx("div",S({className:i.root,style:{minHeight:r}},n,{onClick:l,children:t.jsx(a.slots.columnResizeIcon,{className:i.icon})}))}const E_t=s.memo(P_t);"production"!==process.env.NODE_ENV&&(E_t.displayName="GridColumnHeaderSeparator"),"production"!==process.env.NODE_ENV&&(P_t.propTypes={height:Ro.exports.number.isRequired,resizable:Ro.exports.bool.isRequired,resizing:Ro.exports.bool.isRequired,side:Ro.exports.oneOf(["left","right"])});const j_t=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],T_t=Smt(function(e,r){const{classes:o,colIndex:n,height:a,isResizing:i,sortDirection:l,hasFocus:c,tabIndex:u,separatorSide:d,isDraggable:p,headerComponent:h,description:f,width:m,columnMenuIconButton:y=null,columnMenu:g=null,columnTitleIconButtons:v=null,headerClassName:x,label:b,resizable:w,draggableContainerProps:k,columnHeaderSeparatorProps:_,style:C}=e,M=Jl(e,j_t),D=Kbt(),O=Omt(),P=s.useRef(null),E=Wl(P,r);let j="none";return null!=l&&(j="asc"===l?"ascending":"descending"),s.useLayoutEffect(()=>{const e=D.current.state.columnMenu;if(c&&!e.open){const e=P.current.querySelector('[tabindex="0"]')||P.current;e?.focus(),D.current.columnHeadersContainerRef?.current&&(D.current.columnHeadersContainerRef.current.scrollLeft=0)}},[D,c]),t.jsxs("div",S({className:za(o.root,x),style:S({},C,{width:m}),role:"columnheader",tabIndex:u,"aria-colindex":n+1,"aria-sort":j},M,{ref:E,children:[t.jsxs("div",S({className:o.draggableContainer,draggable:p,role:"presentation"},k,{children:[t.jsxs("div",{className:o.titleContainer,role:"presentation",children:[t.jsx("div",{className:o.titleContainerContent,children:void 0!==h?h:t.jsx(S_t,{label:b,description:f,columnWidth:m})}),v]}),y]})),t.jsx(E_t,S({resizable:!O.disableColumnResize&&!!w,resizing:i,height:a,side:d},_)),g]}))});"production"!==process.env.NODE_ENV&&(T_t.displayName="GridGenericColumnHeaderItem");function N_t(e){const{colDef:r,columnMenuOpen:o,colIndex:n,headerHeight:a,isResizing:i,isLast:l,sortDirection:c,sortIndex:u,filterItemsCounter:d,hasFocus:p,tabIndex:h,disableReorder:f,separatorSide:m,showLeftBorder:y,showRightBorder:g,pinnedPosition:v,pinnedOffset:x}=e,b=Kbt(),w=Omt(),k=Ni(),_=s.useRef(null),C=Li(),M=Li(),D=s.useRef(null),[O,P]=s.useState(o),E=s.useMemo(()=>!w.disableColumnReorder&&!f&&!r.disableReorder,[w.disableColumnReorder,f,r.disableReorder]);let j;r.renderHeader&&(j=r.renderHeader(b.current.getColumnHeaderParams(r.field)));const T=(e=>{const{colDef:t,classes:r,isDragging:o,sortDirection:n,showRightBorder:a,showLeftBorder:i,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=e,d=null!=n,p=null!=s&&s>0,h="number"===t.type;return rs({root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",o&&"columnHeader--moving",d&&"columnHeader--sorted",p&&"columnHeader--filtered",h&&"columnHeader--numeric","withBorderColor",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder",l===Dvt.LEFT&&"columnHeader--pinnedLeft",l===Dvt.RIGHT&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]},Emt,r)})(S({},e,{classes:w.classes,showRightBorder:g,showLeftBorder:y})),N=s.useCallback(e=>t=>{g_t(t)||b.current.publishEvent(e,b.current.getColumnHeaderParams(r.field),t)},[b,r.field]),R=s.useMemo(()=>({onClick:N("columnHeaderClick"),onContextMenu:N("columnHeaderContextMenu"),onDoubleClick:N("columnHeaderDoubleClick"),onMouseOver:N("columnHeaderOver"),onMouseOut:N("columnHeaderOut"),onMouseEnter:N("columnHeaderEnter"),onMouseLeave:N("columnHeaderLeave"),onKeyDown:N("columnHeaderKeyDown"),onFocus:N("columnHeaderFocus"),onBlur:N("columnHeaderBlur")}),[N]),F=s.useMemo(()=>E?{onDragStart:N("columnHeaderDragStart"),onDragEnter:N("columnHeaderDragEnter"),onDragOver:N("columnHeaderDragOver"),onDragEndCapture:N("columnHeaderDragEnd")}:{},[E,N]),I=s.useMemo(()=>({onMouseDown:N("columnSeparatorMouseDown"),onDoubleClick:N("columnSeparatorDoubleClick")}),[N]);s.useEffect(()=>{O||P(o)},[O,o]);const A=s.useCallback(()=>{P(!1)},[]),z=!w.disableColumnMenu&&!r.disableColumnMenu&&t.jsx(p_t,{colDef:r,columnMenuId:C,columnMenuButtonId:M,open:O,iconButtonRef:D}),L=t.jsx(h_t,{columnMenuId:C,columnMenuButtonId:M,field:r.field,open:o,target:D.current,ContentComponent:w.slots.columnMenu,contentComponentProps:w.slotProps?.columnMenu,onExited:A}),B=r.sortingOrder??w.sortingOrder,V=(r.sortable||null!=c)&&!r.hideSortIcons&&!w.disableColumnSorting,$=t.jsxs(s.Fragment,{children:[!w.disableColumnFilter&&t.jsx(w.slots.columnHeaderFilterIconButton,S({field:r.field,counter:d},w.slotProps?.columnHeaderFilterIconButton)),V&&t.jsx(w.slots.columnHeaderSortIcon,S({field:r.field,direction:c,index:u,sortingOrder:B,disabled:!r.sortable},w.slotProps?.columnHeaderSortIcon))]});s.useLayoutEffect(()=>{const e=b.current.state.columnMenu;if(p&&!e.open){const e=_.current.querySelector('[tabindex="0"]')||_.current;e?.focus(),b.current.columnHeadersContainerRef?.current&&(b.current.columnHeadersContainerRef.current.scrollLeft=0)}},[b,p]);const H="function"==typeof r.headerClassName?r.headerClassName({field:r.field,colDef:r}):r.headerClassName,q=r.headerName??r.field,W=s.useMemo(()=>_kt(S({},e.style),k,v,x),[v,x,e.style,k]);return t.jsx(T_t,S({ref:_,classes:T,columnMenuOpen:o,colIndex:n,height:a,isResizing:i,sortDirection:c,hasFocus:p,tabIndex:h,separatorSide:m,isDraggable:E,headerComponent:j,description:r.description,elementId:r.field,width:r.computedWidth,columnMenuIconButton:z,columnTitleIconButtons:$,headerClassName:za(H,l&&jmt["columnHeader--last"]),label:q,resizable:!w.disableColumnResize&&!!r.resizable,"data-field":r.field,columnMenu:L,draggableContainerProps:F,columnHeaderSeparatorProps:I,style:W},R))}"production"!==process.env.NODE_ENV&&(N_t.propTypes={colDef:Ro.exports.object.isRequired,colIndex:Ro.exports.number.isRequired,columnMenuOpen:Ro.exports.bool.isRequired,disableReorder:Ro.exports.bool,filterItemsCounter:Ro.exports.number,hasFocus:Ro.exports.bool,headerHeight:Ro.exports.number.isRequired,isDragging:Ro.exports.bool.isRequired,isLast:Ro.exports.bool.isRequired,isLastUnpinned:Ro.exports.bool.isRequired,isResizing:Ro.exports.bool.isRequired,isSiblingFocused:Ro.exports.bool.isRequired,pinnedOffset:Ro.exports.number,pinnedPosition:Ro.exports.oneOf([0,1,2,3]),separatorSide:Ro.exports.oneOf(["left","right"]),showLeftBorder:Ro.exports.bool.isRequired,showRightBorder:Ro.exports.bool.isRequired,sortDirection:Ro.exports.oneOf(["asc","desc"]),sortIndex:Ro.exports.number,style:Ro.exports.object,tabIndex:Ro.exports.oneOf([-1,0]).isRequired});const R_t=G(N_t),F_t=["className"],I_t=ei("div",{name:"MuiDataGrid",slot:"IconButtonContainer"})(()=>({display:"flex",visibility:"hidden",width:0})),A_t=Smt(function(e,r){const{className:o}=e,n=Jl(e,F_t),a=Omt(),i=(e=>{const{classes:t}=e;return rs({root:["iconButtonContainer"]},Emt,t)})(a);return t.jsx(I_t,S({className:za(i.root,o),ownerState:a},n,{ref:r}))});"production"!==process.env.NODE_ENV&&(A_t.displayName="GridIconButtonContainer");const z_t=["sortingOrder"],L_t=s.memo(function(e){const{sortingOrder:r}=e,o=Jl(e,z_t),n=Omt(),[a]=r,i="asc"===a?n.slots.columnSortedAscendingIcon:n.slots.columnSortedDescendingIcon;return i?t.jsx(i,S({},o)):null});"production"!==process.env.NODE_ENV&&(L_t.displayName="GridColumnUnsortedIcon");const B_t=["direction","index","sortingOrder","disabled","className"],V_t=ei(nyt,{name:"MuiDataGrid",slot:"SortButton"})({transition:lyt.transition(["opacity"],{duration:lyt.transitions.duration.short,easing:lyt.transitions.easing.easeInOut})});function $_t(e){const{direction:r,index:o,sortingOrder:n,disabled:a,className:i}=e,l=Jl(e,B_t),c=Rmt(),u=Omt(),d=S({},e,{classes:u.classes}),p=(e=>{const{classes:t}=e;return rs({root:["sortButton"],icon:["sortIcon"]},Emt,t)})(d),h=function(e,r,o,n){let a;const i={};return"asc"===r?a=e.columnSortedAscendingIcon:"desc"===r?a=e.columnSortedDescendingIcon:(a=L_t,i.sortingOrder=n),a?t.jsx(a,S({fontSize:"small",className:o},i)):null}(u.slots,r,p.icon,n);if(!h)return null;const f=t.jsx(V_t,S({as:u.slots.baseIconButton,ownerState:d,"aria-label":c.current.getLocaleText("columnHeaderSortIconLabel"),title:c.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:a,className:za(p.root,i)},u.slotProps?.baseIconButton,l,{children:h}));return t.jsxs(s.Fragment,{children:[null!=o&&t.jsx(u.slots.baseBadge,{badgeContent:o,color:"default",overlap:"circular",children:f}),null==o&&f]})}function H_t(e){return t.jsx(A_t,{children:t.jsx($_t,S({},e,{tabIndex:-1}))})}"production"!==process.env.NODE_ENV&&($_t.propTypes={direction:Ro.exports.oneOf(["asc","desc"]),disabled:Ro.exports.bool,field:Ro.exports.string.isRequired,index:Ro.exports.number,onClick:Ro.exports.func,sortingOrder:Ro.exports.arrayOf(Ro.exports.oneOf(["asc","desc"])).isRequired});const q_t=s.memo(H_t);"production"!==process.env.NODE_ENV&&(q_t.displayName="GridColumnHeaderSortIcon"),"production"!==process.env.NODE_ENV&&(H_t.propTypes={className:Ro.exports.string,color:Ro.exports.oneOf(["default","inherit","primary"]),direction:Ro.exports.oneOf(["asc","desc"]),disabled:Ro.exports.bool,edge:Ro.exports.oneOf(["end","start",!1]),field:Ro.exports.string.isRequired,id:Ro.exports.string,index:Ro.exports.number,label:Ro.exports.string,role:Ro.exports.string,size:Ro.exports.oneOf(["large","medium","small"]),sortingOrder:Ro.exports.arrayOf(Ro.exports.oneOf(["asc","desc"])).isRequired,style:Ro.exports.object,tabIndex:Ro.exports.number,title:Ro.exports.string,touchRippleRef:Ro.exports.any});function W_t(e){return e.counter?t.jsx(U_t,S({},e)):null}function U_t(e){const{counter:r,field:o,onClick:n}=e,a=Rmt(),i=Omt(),l=(e=>{const{classes:t}=e;return rs({icon:["filterIcon"]},Emt,t)})(S({},e,{classes:i.classes})),c=Li(),u=eyt(a,ikt,c),d=Li(),p=s.useCallback(e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:r}=akt(a);t&&r===skt.filters?a.current.hideFilterPanel():a.current.showFilterPanel(void 0,d,c),n&&n(a.current.getColumnHeaderParams(o),e)},[a,o,n,d,c]);if(!r)return null;const h=t.jsx(i.slots.baseIconButton,S({id:c,onClick:p,"aria-label":a.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?d:void 0},i.slotProps?.baseIconButton,{children:t.jsx(i.slots.columnFilteredIcon,{className:l.icon,fontSize:"small"})}));return t.jsx(i.slots.baseTooltip,S({title:a.current.getLocaleText("columnHeaderFiltersTooltipActive")(r),enterDelay:1e3},i.slotProps?.baseTooltip,{children:t.jsxs(A_t,{children:[r>1&&t.jsx(i.slots.baseBadge,{badgeContent:r,color:"default",children:h}),1===r&&h]})}))}"production"!==process.env.NODE_ENV&&(W_t.propTypes={counter:Ro.exports.number,field:Ro.exports.string.isRequired,onClick:Ro.exports.func}),"production"!==process.env.NODE_ENV&&(U_t.propTypes={counter:Ro.exports.number,field:Ro.exports.string.isRequired,onClick:Ro.exports.func});const G_t=Al,K_t=G_t(t.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),Y_t=G_t(t.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),Z_t=G_t(t.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),X_t=G_t(t.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Q_t=G_t(t.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),J_t=G_t(t.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),eCt=G_t(t.jsx("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");G_t(t.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),G_t(t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const tCt=G_t(t.jsx("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"}),"ColumnIcon"),rCt=G_t(t.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),oCt=G_t(t.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),nCt=G_t(t.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),aCt=G_t(t.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),iCt=G_t(t.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),sCt=G_t(t.jsx("path",{d:"M19 6.41L17.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"),lCt=G_t(t.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),cCt=G_t(t.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),uCt=G_t(t.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),dCt=G_t(t.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),pCt=G_t(t.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),hCt=G_t(t.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),fCt=G_t(t.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),mCt=G_t(t.jsx("g",{children:t.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),yCt=G_t(t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Clear");G_t(t.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const gCt=G_t(t.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),vCt=G_t(t.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download"),xCt=["hideMenu","colDef","id","labelledby","className","children","open"],bCt=gl(nyt)(()=>({minWidth:248}));function wCt(e){e.currentTarget.contains(e.target)&&e.stopPropagation()}const kCt=Smt(function(e,r){const{hideMenu:o,id:n,labelledby:a,className:i,children:l,open:c}=e,u=Jl(e,xCt),d=Omt(),p=s.useCallback(e=>{"Tab"===e.key&&e.preventDefault(),Ygt(e.key)&&o(e)},[o]);return t.jsx(bCt,S({as:d.slots.baseMenuList,id:n,className:za(jmt.menuList,i),"aria-labelledby":a,onKeyDown:p,onWheel:wCt,onTouchMove:wCt,autoFocus:c},u,{ref:r,children:l}))});"production"!==process.env.NODE_ENV&&(kCt.displayName="GridColumnMenuContainer"),"production"!==process.env.NODE_ENV&&(kCt.propTypes={colDef:Ro.exports.object.isRequired,hideMenu:Ro.exports.func.isRequired,id:Ro.exports.string,labelledby:Ro.exports.string,open:Ro.exports.bool.isRequired});const _Ct=["displayOrder"];function CCt(e){const{colDef:r,onClick:o}=e,n=Rmt(),a=Omt(),i=1===wgt(n).filter(e=>!0!==e.disableColumnMenu).length,l=s.useCallback(e=>{i||(n.current.setColumnVisibility(r.field,!1),o(e))},[n,r.field,o,i]);return a.disableColumnSelector||!1===r.hideable?null:t.jsx(a.slots.baseMenuItem,{onClick:l,disabled:i,iconStart:t.jsx(a.slots.columnMenuHideIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuHideColumn")})}function MCt(e){const{onClick:r}=e,o=Rmt(),n=Omt(),a=s.useCallback(e=>{r(e),o.current.showPreferences(skt.columns)},[o,r]);return n.disableColumnSelector?null:t.jsx(n.slots.baseMenuItem,{onClick:a,iconStart:t.jsx(n.slots.columnMenuManageColumnsIcon,{fontSize:"small"}),children:o.current.getLocaleText("columnMenuManageColumns")})}function SCt(e){return t.jsxs(s.Fragment,{children:[t.jsx(CCt,S({},e)),t.jsx(MCt,S({},e))]})}function DCt(e){const{colDef:r,onClick:o}=e,n=Rmt(),a=Omt(),i=s.useCallback(e=>{o(e),n.current.showFilterPanel(r.field)},[n,r.field,o]);return a.disableColumnFilter||!r.filterable?null:t.jsx(a.slots.baseMenuItem,{onClick:i,iconStart:t.jsx(a.slots.columnMenuFilterIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuFilter")})}function OCt(e){const{colDef:r,onClick:o}=e,n=Rmt(),a=eyt(n,Hvt),i=Omt(),l=s.useMemo(()=>{if(!r)return null;const e=a.find(e=>e.field===r.field);return e?.sort},[r,a]),c=r.sortingOrder??i.sortingOrder,u=s.useCallback(e=>{o(e);const t=e.currentTarget.getAttribute("data-value")||null;n.current.sortColumn(r.field,t===l?null:t)},[n,r,o,l]);if(i.disableColumnSorting||!r||!r.sortable||!c.some(e=>!!e))return null;const d=e=>{const t=n.current.getLocaleText(e);return"function"==typeof t?t(r):t};return t.jsxs(s.Fragment,{children:[c.includes("asc")&&"asc"!==l?t.jsx(i.slots.baseMenuItem,{onClick:u,"data-value":"asc",iconStart:t.jsx(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"}),children:d("columnMenuSortAsc")}):null,c.includes("desc")&&"desc"!==l?t.jsx(i.slots.baseMenuItem,{onClick:u,"data-value":"desc",iconStart:t.jsx(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"}),children:d("columnMenuSortDesc")}):null,c.includes(null)&&null!=l?t.jsx(i.slots.baseMenuItem,{onClick:u,iconStart:i.slots.columnMenuUnsortIcon?t.jsx(i.slots.columnMenuUnsortIcon,{fontSize:"small"}):t.jsx("span",{}),children:n.current.getLocaleText("columnMenuUnsort")}):null]})}"production"!==process.env.NODE_ENV&&(CCt.propTypes={colDef:Ro.exports.object.isRequired,onClick:Ro.exports.func.isRequired}),"production"!==process.env.NODE_ENV&&(MCt.propTypes={colDef:Ro.exports.object.isRequired,onClick:Ro.exports.func.isRequired}),"production"!==process.env.NODE_ENV&&(SCt.propTypes={colDef:Ro.exports.object.isRequired,onClick:Ro.exports.func.isRequired}),"production"!==process.env.NODE_ENV&&(DCt.propTypes={colDef:Ro.exports.object.isRequired,onClick:Ro.exports.func.isRequired}),"production"!==process.env.NODE_ENV&&(OCt.propTypes={colDef:Ro.exports.object.isRequired,onClick:Ro.exports.func.isRequired});const PCt=["defaultSlots","defaultSlotProps","slots","slotProps"],ECt={columnMenuSortItem:OCt,columnMenuFilterItem:DCt,columnMenuColumnsItem:SCt},jCt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},TCt=Smt(function(e,r){const{defaultSlots:o,defaultSlotProps:n,slots:a,slotProps:i}=e,l=Jl(e,PCt),c=(e=>{const t=Kbt(),r=Omt(),{defaultSlots:o,defaultSlotProps:n,slots:a={},slotProps:i={},hideMenu:l,colDef:c,addDividers:u=!0}=e,d=s.useMemo(()=>S({},o,a),[o,a]),p=s.useMemo(()=>{if(!i||0===Object.keys(i).length)return n;const e=S({},i);return Object.entries(n).forEach(([t,r])=>{e[t]=S({},r,i[t]||{})}),e},[n,i]),h=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),f=s.useMemo(()=>{const e=Object.keys(o);return Object.keys(a).filter(t=>!e.includes(t))},[a,o]);return s.useMemo(()=>{const e=Array.from(new Set([...h,...f])).filter(e=>null!=d[e]),t=e.sort((e,t)=>{const r=p[e],o=p[t];return(Number.isFinite(r?.displayOrder)?r.displayOrder:100)-(Number.isFinite(o?.displayOrder)?o.displayOrder:100)});return t.reduce((e,o,n)=>{let a={colDef:c,onClick:l};const i=p[o];return i&&(a=S({},a,Jl(i,_Ct))),u&&n!==t.length-1?[...e,[d[o],a],[r.slots.baseDivider,{}]]:[...e,[d[o],a]]},[])},[u,c,h,l,d,p,f,r.slots.baseDivider])})(S({},l,{defaultSlots:o,defaultSlotProps:n,slots:a,slotProps:i}));return t.jsx(kCt,S({},l,{ref:r,children:c.map(([e,r],o)=>t.jsx(e,S({},r),o))}))});"production"!==process.env.NODE_ENV&&(TCt.displayName="GridGenericColumnMenu"),"production"!==process.env.NODE_ENV&&(TCt.propTypes={colDef:Ro.exports.object.isRequired,defaultSlotProps:Ro.exports.object.isRequired,defaultSlots:Ro.exports.object.isRequired,hideMenu:Ro.exports.func.isRequired,id:Ro.exports.string,labelledby:Ro.exports.string,open:Ro.exports.bool.isRequired,slotProps:Ro.exports.object,slots:Ro.exports.object});const NCt=Smt(function(e,r){return t.jsx(TCt,S({},e,{ref:r,defaultSlots:ECt,defaultSlotProps:jCt}))});"production"!==process.env.NODE_ENV&&(NCt.displayName="GridColumnMenu"),"production"!==process.env.NODE_ENV&&(NCt.propTypes={colDef:Ro.exports.object.isRequired,hideMenu:Ro.exports.func.isRequired,id:Ro.exports.string,labelledby:Ro.exports.string,open:Ro.exports.bool.isRequired,slotProps:Ro.exports.object,slots:Ro.exports.object});const RCt=["className"],FCt=gl("div",{name:"MuiDataGrid",slot:"PanelWrapper"})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),ICt=Smt(function(e,r){const{className:o}=e,n=Jl(e,RCt),a=Omt(),i=(e=>{const{classes:t}=e;return rs({root:["panelWrapper"]},Emt,t)})(a);return t.jsx(FCt,S({tabIndex:-1,className:za(i.root,o),ownerState:a},n,{ref:r}))});"production"!==process.env.NODE_ENV&&(ICt.displayName="GridPanelWrapper");const ACt=["children","className","classes","onClose"],zCt=Va("MuiDataGrid",["panel","paper"]),LCt=gl(nyt,{name:"MuiDataGrid",slot:"panel"})({zIndex:lyt.zIndex.panel}),BCt=gl("div",{name:"MuiDataGrid",slot:"panelContent"})({backgroundColor:lyt.colors.background.overlay,borderRadius:lyt.radius.base,boxShadow:lyt.shadows.overlay,display:"flex",maxWidth:`calc(100vw - ${lyt.spacing(2)})`,overflow:"auto"}),VCt=Smt((e,r)=>{const{children:o,className:n,onClose:a}=e,i=Jl(e,ACt),l=Rmt(),c=Omt(),u=zCt,[d,p]=s.useState(!1),h=evt(),f=ql(()=>p(!0)),m=ql(()=>p(!1)),y=ql(()=>{a?.()}),g=ql(e=>{"Escape"===e.key&&a?.()}),[v,x]=s.useState(null);return s.useEffect(()=>{const e=l.current.rootElementRef?.current?.querySelector('[data-id="gridPanelAnchor"]');e&&x(e)},[l]),v?t.jsx(LCt,S({as:c.slots.basePopper,ownerState:c,placement:"bottom-end",className:za(u.panel,n,h),flip:!0,onDidShow:f,onDidHide:m,onClickAway:y,clickAwayMouseEvent:"onPointerUp",clickAwayTouchEvent:!1,focusTrap:!0},i,c.slotProps?.basePopper,{target:e.target??v,ref:r,children:t.jsx(BCt,{className:u.paper,ownerState:c,onKeyDown:g,children:d&&o})})):null});"production"!==process.env.NODE_ENV&&(VCt.displayName="GridPanel"),"production"!==process.env.NODE_ENV&&(VCt.propTypes={children:Ro.exports.node,classes:Ro.exports.object,className:Ro.exports.string,flip:Ro.exports.bool,id:Ro.exports.string,onClose:Ro.exports.func,open:Ro.exports.bool.isRequired,target:Ro.exports.any});const $Ct=["className"],HCt=ei("div",{name:"MuiDataGrid",slot:"PanelContent"})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,padding:lyt.spacing(2.5,1.5,2,1),gap:lyt.spacing(2.5)});function qCt(e){const{className:r}=e,o=Jl(e,$Ct),n=Omt(),a=(e=>{const{classes:t}=e;return rs({root:["panelContent"]},Emt,t)})(n);return t.jsx(HCt,S({className:za(a.root,r),ownerState:n},o))}"production"!==process.env.NODE_ENV&&(qCt.propTypes={sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const WCt=["className"],UCt=gl("div",{name:"MuiDataGrid",slot:"PanelFooter"})({padding:lyt.spacing(1),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${lyt.colors.border.base}`});function GCt(e){const{className:r}=e,o=Jl(e,WCt),n=Omt(),a=(e=>{const{classes:t}=e;return rs({root:["panelFooter"]},Emt,t)})(n);return t.jsx(UCt,S({className:za(a.root,r),ownerState:n},o))}"production"!==process.env.NODE_ENV&&(GCt.propTypes={sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const KCt=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],YCt=["InputComponentProps"],ZCt=gl("div",{name:"MuiDataGrid",slot:"FilterForm"})({display:"flex",gap:lyt.spacing(1.5)}),XCt=gl("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon"})({flexShrink:0,display:"flex",justifyContent:"center",alignItems:"center"}),QCt=gl("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput"})({minWidth:75,justifyContent:"end"}),JCt=gl("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput"})({width:150}),eMt=gl("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput"})({width:150}),tMt=gl("div",{name:"MuiDataGrid",slot:"FilterFormValueInput"})({width:190}),rMt=e=>e.headerName||e.field,oMt=new Intl.Collator,nMt=Smt(function(r,o){const{item:n,hasMultipleFilters:a,deleteFilter:i,applyFilterChanges:l,showMultiFilterOperators:c,disableMultiFilterOperator:u,applyMultiFilterOperatorChanges:d,focusElementRef:p,logicOperators:h=[Qyt.And,Qyt.Or],columnsSort:f,filterColumns:m,deleteIconProps:y={},logicOperatorInputProps:g={},operatorInputProps:v={},columnInputProps:x={},valueInputProps:b={},readOnly:w}=r,k=Jl(r,KCt),_=Rmt(),C=eyt(_,ggt),M=eyt(_,Ogt),D=eyt(_,Gvt),O=Li(),P=Li(),E=Li(),j=Li(),T=Omt(),N=(e=>{const{classes:t}=e;return rs({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},Emt,t)})(T),R=s.useRef(null),F=s.useRef(null),I=D.logicOperator??Qyt.And,A=a&&h.length>0,z=(T.slotProps?.baseSelect||{}).native??!1,L=T.slotProps?.baseSelectOption||{},{InputComponentProps:B}=b,V=Jl(b,YCt),$=eyt(_,Rwt),H=eyt(_,Iwt),{filteredColumns:q,selectedField:W}=s.useMemo(()=>{let e=n.field;const t=!1===C[n.field].filterable?C[n.field]:null;if(t)return{filteredColumns:[t],selectedField:e};if($)return{filteredColumns:M.filter(e=>void 0!==H.get(e.field)),selectedField:e};if(void 0===m||"function"!=typeof m)return{filteredColumns:M,selectedField:e};const r=m({field:n.field,columns:M,currentFilters:D?.items||[]});return{filteredColumns:M.filter(t=>{const o=r.includes(t.field);return t.field!==n.field||o||(e=void 0),o}),selectedField:e}},[n.field,C,$,m,M,D?.items,H]),U=s.useMemo(()=>{switch(f){case"asc":return q.sort((e,t)=>oMt.compare(rMt(e),rMt(t)));case"desc":return q.sort((e,t)=>-oMt.compare(rMt(e),rMt(t)));default:return q}},[q,f]),G=n.field?_.current.getColumn(n.field):null,K=s.useMemo(()=>n.operator&&G?G.filterOperators?.find(e=>e.value===n.operator):null,[n,G]),Y=s.useCallback(e=>{const t=e.target.value,r=_.current.getColumn(t);if(r.field===G.field)return;const o=r.filterOperators.find(e=>e.value===n.operator)||r.filterOperators[0];let a=!o.InputComponent||o.InputComponent!==K?.InputComponent||r.type!==G.type?void 0:n.value;if("singleSelect"===r.type&&void 0!==a){const e=r,t=hbt(e);Array.isArray(a)?a=a.filter(r=>void 0!==fbt(r,t,e?.getOptionValue)):void 0===fbt(n.value,t,e?.getOptionValue)&&(a=void 0)}l(S({},n,{field:t,operator:o.value,value:a}))},[_,l,n,G,K]),Z=s.useCallback(e=>{const t=e.target.value,r=G?.filterOperators.find(e=>e.value===t);l(S({},n,{operator:t,value:!r?.InputComponent||r?.InputComponent!==K?.InputComponent?void 0:n.value}))},[l,n,G,K]),X=s.useCallback(e=>{const t=e.target.value===Qyt.And.toString()?Qyt.And:Qyt.Or;d(t)},[d]);return s.useImperativeHandle(p,()=>({focus:()=>{K?.InputComponent?R?.current?.focus():F.current.focus()}}),[K]),t.jsxs(ZCt,S({className:N.root,"data-id":n.id,ownerState:T},k,{ref:o,children:[t.jsx(XCt,S({},y,{className:za(N.deleteIcon,y.className),ownerState:T,children:t.jsx(T.slots.baseIconButton,S({"aria-label":_.current.getLocaleText("filterPanelDeleteIconLabel"),title:_.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{i(n)},size:"small",disabled:w},T.slotProps?.baseIconButton,{children:t.jsx(T.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),t.jsx(QCt,S({as:T.slots.baseSelect,sx:[A?{display:"flex"}:{display:"none"},c?{visibility:"visible"}:{visibility:"hidden"},g.sx],className:za(N.logicOperatorInput,g.className),ownerState:T},g,{size:"small",slotProps:{htmlInput:{"aria-label":_.current.getLocaleText("filterPanelLogicOperator")}},value:I??"",onChange:X,disabled:!!u||1===h.length,native:z},T.slotProps?.baseSelect,{children:h.map(t=>e.createElement(T.slots.baseSelectOption,S({},L,{native:z,key:t.toString(),value:t.toString()}),_.current.getLocaleText((e=>{switch(e){case Qyt.And:return"filterPanelOperatorAnd";case Qyt.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}})(t))))})),t.jsx(JCt,S({as:T.slots.baseSelect},x,{className:za(N.columnInput,x.className),ownerState:T,size:"small",labelId:P,id:O,label:_.current.getLocaleText("filterPanelColumns"),value:W??"",onChange:Y,native:z,disabled:w},T.slotProps?.baseSelect,{children:U.map(t=>e.createElement(T.slots.baseSelectOption,S({},L,{native:z,key:t.field,value:t.field}),rMt(t)))})),t.jsx(eMt,S({as:T.slots.baseSelect,size:"small"},v,{className:za(N.operatorInput,v.className),ownerState:T,labelId:j,label:_.current.getLocaleText("filterPanelOperator"),id:E,value:n.operator,onChange:Z,native:z,inputRef:F,disabled:w},T.slotProps?.baseSelect,{children:G?.filterOperators?.map(t=>e.createElement(T.slots.baseSelectOption,S({},L,{native:z,key:t.value,value:t.value}),t.label||_.current.getLocaleText(`filterOperator${Tn(t.value)}`)))})),t.jsx(tMt,S({},V,{className:za(N.valueInput,V.className),ownerState:T,children:K?.InputComponent?t.jsx(K.InputComponent,S({apiRef:_,item:n,applyValue:l,focusElementRef:R,disabled:w,slotProps:{root:{size:"small"}}},K.InputComponentProps,B),n.field):null}))]}))});"production"!==process.env.NODE_ENV&&(nMt.displayName="GridFilterForm"),"production"!==process.env.NODE_ENV&&(nMt.propTypes={applyFilterChanges:Ro.exports.func.isRequired,applyMultiFilterOperatorChanges:Ro.exports.func.isRequired,children:Ro.exports.node,columnInputProps:Ro.exports.any,columnsSort:Ro.exports.oneOf(["asc","desc"]),deleteFilter:Ro.exports.func.isRequired,deleteIconProps:Ro.exports.any,disableMultiFilterOperator:Ro.exports.bool,filterColumns:Ro.exports.func,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),hasMultipleFilters:Ro.exports.bool.isRequired,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,logicOperatorInputProps:Ro.exports.any,logicOperators:Ro.exports.arrayOf(Ro.exports.oneOf(["and","or"]).isRequired),operatorInputProps:Ro.exports.any,readOnly:Ro.exports.bool,showMultiFilterOperators:Ro.exports.bool,valueInputProps:Ro.exports.any});const aMt=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],iMt=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}),sMt=Smt(function(e,r){const o=Rmt(),n=Omt(),a=eyt(o,Gvt),i=eyt(o,Ogt),l=eyt(o,Pgt),c=s.useRef(null),u=s.useRef(null),{logicOperators:d=[Qyt.And,Qyt.Or],columnsSort:p,filterFormProps:h,getColumnForNewFilter:f,disableAddFilterButton:m=!1,disableRemoveAllButton:y=!1}=e,g=Jl(e,aMt),v=o.current.upsertFilterItem,x=s.useCallback(e=>{o.current.setFilterLogicOperator(e)},[o]),b=s.useCallback(()=>{let e;if(f&&"function"==typeof f){const t=f({currentFilters:a?.items||[],columns:i});if(null===t)return null;e=i.find(({field:e})=>e===t)}else e=i.find(e=>e.filterOperators?.length);return e?iMt(e):null},[a?.items,i,f]),w=s.useCallback(()=>{if(void 0===f||"function"!=typeof f)return b();const e=a.items.length?a.items:[b()].filter(Boolean),t=f({currentFilters:e,columns:i});if(null===t)return null;const r=i.find(({field:e})=>e===t);return r?iMt(r):null},[a.items,i,f,b]),k=s.useMemo(()=>a.items.length?a.items:(u.current||(u.current=b()),u.current?[u.current]:[]),[a.items,b]),_=k.length>1,{readOnlyFilters:C,validFilters:M}=s.useMemo(()=>k.reduce((e,t)=>(l[t.field]?e.validFilters.push(t):e.readOnlyFilters.push(t),e),{readOnlyFilters:[],validFilters:[]}),[k,l]),D=s.useCallback(()=>{const e=w();e&&o.current.upsertFilterItems([...k,e])},[o,w,k]),O=s.useCallback(e=>{const t=1===M.length;o.current.deleteFilterItem(e),t&&o.current.hideFilterPanel()},[o,M.length]),P=s.useCallback(()=>1===M.length&&void 0===M[0].value?(o.current.deleteFilterItem(M[0]),o.current.hideFilterPanel()):o.current.setFilterModel(S({},a,{items:C}),"removeAllFilterItems"),[o,C,a,M]);return s.useEffect(()=>{d.length>0&&a.logicOperator&&!d.includes(a.logicOperator)&&x(d[0])},[d,x,a.logicOperator]),s.useEffect(()=>{M.length>0&&c.current.focus()},[M.length]),t.jsxs(ICt,S({},g,{ref:r,children:[t.jsxs(qCt,{children:[C.map((e,r)=>t.jsx(nMt,S({item:e,applyFilterChanges:v,deleteFilter:O,hasMultipleFilters:_,showMultiFilterOperators:r>0,disableMultiFilterOperator:1!==r,applyMultiFilterOperatorChanges:x,focusElementRef:null,readOnly:!0,logicOperators:d,columnsSort:p},h),null==e.id?r:e.id)),M.map((e,r)=>t.jsx(nMt,S({item:e,applyFilterChanges:v,deleteFilter:O,hasMultipleFilters:_,showMultiFilterOperators:C.length+r>0,disableMultiFilterOperator:C.length+r!==1,applyMultiFilterOperatorChanges:x,focusElementRef:r===M.length-1?c:null,logicOperators:d,columnsSort:p},h),null==e.id?r+C.length:e.id))]}),n.disableMultipleColumnsFiltering||m&&y?null:t.jsxs(GCt,{children:[m?t.jsx("span",{}):t.jsx(n.slots.baseButton,S({onClick:D,startIcon:t.jsx(n.slots.filterPanelAddIcon,{})},n.slotProps?.baseButton,{children:o.current.getLocaleText("filterPanelAddFilter")})),!y&&M.length>0?t.jsx(n.slots.baseButton,S({onClick:P,startIcon:t.jsx(n.slots.filterPanelRemoveAllIcon,{})},n.slotProps?.baseButton,{children:o.current.getLocaleText("filterPanelRemoveAll")})):null]})]}))});"production"!==process.env.NODE_ENV&&(sMt.displayName="GridFilterPanel"),"production"!==process.env.NODE_ENV&&(sMt.propTypes={children:Ro.exports.node,columnsSort:Ro.exports.oneOf(["asc","desc"]),disableAddFilterButton:Ro.exports.bool,disableRemoveAllButton:Ro.exports.bool,filterFormProps:Ro.exports.shape({columnInputProps:Ro.exports.any,columnsSort:Ro.exports.oneOf(["asc","desc"]),deleteIconProps:Ro.exports.any,filterColumns:Ro.exports.func,logicOperatorInputProps:Ro.exports.any,operatorInputProps:Ro.exports.any,valueInputProps:Ro.exports.any}),getColumnForNewFilter:Ro.exports.func,logicOperators:Ro.exports.arrayOf(Ro.exports.oneOf(["and","or"]).isRequired),sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const lMt=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,cMt=["children"],uMt=Co({from:{opacity:0},to:{opacity:1}}),dMt=Co({"from, to":{"--scrollable":'" "'}}),pMt=ei("div",{name:"MuiDataGrid",slot:"ShadowScrollArea"})`
|
|
1053
|
+
`;return at("div",{id:`${t}-${void 0!==e?e:"single"}`,css:i,...w?{"data-configuration-id":t}:{},...ne,children:r})},children:a}),le={form:at(lrt,{...y?.formProps,containerType:"form",children:$}),filter:at(irt,{containerType:"filter",children:$}),form_step:at(Cft,{id:t,...y?.formStepProps,metadata:i,containerProps:re,children:$}),replicator:N&&x?at(Pft,{targetRwoId:x,nestedPathSegments:c,minInstances:y?.minInstances,maxInstances:y?.maxInstances,children:se}):se};if("replicator"===r)return at(nt,{children:le.replicator});return at("div",{id:t,className:"empty_state"===r?"zeal-container zeal-empty-state":"zeal-container",css:ie,...w?{"data-configuration-id":t}:{},...ne,children:le[r]||$},ae)}),Tft=({config:t,tabsProps:r,id:o,type:n,items:a,metadata:i,formData:s,setFormData:l,isMobile:c,properties:u,isConfigurationMode:d=!1})=>{const[p,h]=e.useState(),f=PC("xs"),m=c??f;if(!a||!a.length)return null;return at(st,{userInitials:"UN",logOutHandler:()=>console.log("log out"),goToAccountInfo:()=>console.log("account info page"),children:at(FC,{organismMetadata:i,organismId:o,initItems:a,organismBodyId:o,submitHandler:e=>new Promise(t=>{setTimeout(()=>{t(alert(JSON.stringify(e,null,2)))},600)}),formId:o,isConfigurationMode:d,onConfigurationItemHandler:e=>{h(e?.entityId)},selectedConfigurationItemId:p,children:at(_ft,{item:{id:o,type:n,items:a,config:t,metadata:i,properties:u,instance:"container"},formData:s,tabsProps:r,isMobile:m,setFormData:l})})},`${o}.${m?"mobile":"desktop"}`)},Nft=({formData:t,setFormData:r,isMobile:o,...n})=>{const a=(({item:t,activeChildrenIds:r})=>{const[o,n]=e.useState(),a=e.useMemo(()=>r.map(e=>{const r=t.items.find(t=>t.id===e);return r?(e=>{const t=e.config?.props?.formStepProps||{};return{...e,config:{...e.config,props:{...e.config?.props,formStepProps:{...t,order:0}}}}})(r):void 0}).filter(Boolean),[r,t]);return e.useEffect(()=>{n(()=>({...t,items:a}))},[t]),o})(n);return a?at(Tft,{...a,isMobile:o,formData:t,setFormData:r}):null},Rft={id:"controlsLayout",tool:"custom",titleKey:"config.datagrid.group.controlsLayout",collapsible:!0,initiallyExpanded:!1,pathBase:"props.toolbarContainer.sx",fields:[{type:"number",captureName:"controlHeight",labelKey:"config.datagrid.controls.height",defaultValue:44},{type:"number",captureName:"searchWidth",labelKey:"config.datagrid.controls.searchWidth",defaultValue:360},{type:"number",captureName:"columnGap",labelKey:"config.datagrid.controls.columnGap",defaultValue:1},{type:"number",captureName:"marginTop",labelKey:"config.datagrid.controls.marginTop",defaultValue:1}]},Fft={id:"densityToggleStyles",tool:"custom",titleKey:"config.datagrid.group.densityToggleStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.densityToggleContainer.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.density.background"},{type:"color",captureName:"selectedBackgroundColor",labelKey:"config.datagrid.density.selectedBackground"},{type:"color",captureName:"selectedTextColor",labelKey:"config.datagrid.density.selectedTextColor"},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.density.borderRadius",defaultValue:10}]},Ift={id:"exportButtonStyles",tool:"custom",titleKey:"config.datagrid.group.exportButtonStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.exportButton.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.export.background"},{type:"color",captureName:"borderColor",labelKey:"config.datagrid.export.borderColor"},{type:"color",captureName:"iconColor",labelKey:"config.datagrid.export.iconColor"},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.export.borderRadius",defaultValue:8}]},Aft={id:"quickFilters",tool:"dataGridQuickFilters",titleKey:"config.datagrid.group.quickFilters",collapsible:!0,initiallyExpanded:!1,pathBase:"toolbar.quickFilters",toolConfig:{columnsDependencyPath:"dataRetrievalConfig.columns",fields:[{type:"text",captureName:"label",labelKey:"config.datagrid.quickFilters.label"},{type:"text",captureName:"columnField",labelKey:"config.datagrid.quickFilters.columnField"},{type:"text",captureName:"value",labelKey:"config.datagrid.quickFilters.value"},{type:"color",captureName:"color",labelKey:"config.datagrid.quickFilters.color"}]}},zft={id:"quickFiltersStyles",tool:"custom",titleKey:"config.datagrid.group.quickFiltersStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.quickFiltersGroup.sx",fields:[{type:"color",captureName:"chipBackgroundColor",labelKey:"config.datagrid.quickFilters.chipBackground"},{type:"color",captureName:"chipTextColor",labelKey:"config.datagrid.quickFilters.chipText"},{type:"color",captureName:"chipBorderColor",labelKey:"config.datagrid.quickFilters.chipBorder"},{type:"number",captureName:"chipBorderRadius",labelKey:"config.datagrid.quickFilters.chipBorderRadius",defaultValue:10},{type:"number",captureName:"chipGap",labelKey:"config.datagrid.quickFilters.chipGap",defaultValue:8},{type:"color",captureName:"selectedChipColor",labelKey:"config.datagrid.quickFilters.selectedChipColor"}]},Lft={id:"searchControl",tool:"custom",titleKey:"config.datagrid.group.searchControl",collapsible:!0,initiallyExpanded:!1,pathBase:"toolbar.searchControl",fields:[{type:"text",captureName:"placeholder",labelKey:"config.datagrid.search.placeholder",defaultValue:"Search"},{type:"switch",captureName:"autoFocus",labelKey:"config.datagrid.search.autoFocus",defaultValue:!1},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.search.borderRadius",defaultValue:2},{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.search.background"},{type:"color",captureName:"borderColor",labelKey:"config.datagrid.search.borderColor"}]},Bft={id:"styles",tool:"custom",titleKey:"config.datagrid.group.styles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.dataGrid.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.styles.background",defaultValue:"#FFFFFF"},{type:"color",captureName:"headerBackgroundColor",labelKey:"config.datagrid.styles.headerBackground"},{type:"number",captureName:"headerFontSize",labelKey:"config.datagrid.styles.headerFontSize"},{type:"color",captureName:"rowHoverColor",labelKey:"config.datagrid.styles.rowHoverColor"},{type:"number",captureName:"rowHeight",labelKey:"config.datagrid.styles.rowHeight"},{type:"number",captureName:"rowGap",labelKey:"config.datagrid.styles.rowGap"}]},Vft={id:"toolbar",tool:"custom",titleKey:"config.datagrid.group.toolbar",collapsible:!0,initiallyExpanded:!1,pathBase:"toolbar",fields:[{type:"select",captureName:"densityDefault",labelKey:"config.datagrid.toolbar.densityDefault",defaultValue:"comfortable",options:[{id:"compact",labelKey:"config.datagrid.toolbar.view.compact"},{id:"comfortable",labelKey:"config.datagrid.toolbar.view.comfortable"}]},{type:"switch",captureName:"densityToggle",labelKey:"config.datagrid.toolbar.densityToggle",defaultValue:!0},{type:"switch",captureName:"search",labelKey:"config.datagrid.toolbar.search",defaultValue:!0},{type:"switch",captureName:"exportCsv",labelKey:"config.datagrid.toolbar.exportCsv",defaultValue:!0}]},$ft={id:"toolbarStyles",tool:"custom",titleKey:"config.datagrid.group.toolbarStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.toolbarContainer.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.toolbarStyles.background"},{type:"color",captureName:"borderColor",labelKey:"config.datagrid.toolbarStyles.borderColor"},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.toolbarStyles.borderRadius",defaultValue:8},{type:"number",captureName:"gap",labelKey:"config.datagrid.toolbarStyles.gap",defaultValue:1.5}]},Hft={id:"wrapperStyles",tool:"custom",titleKey:"config.datagrid.group.wrapperStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.dataGridWrapper.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.wrapper.background"},{type:"color",captureName:"borderColor",labelKey:"config.datagrid.wrapper.borderColor"},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.wrapper.borderRadius",defaultValue:8},{type:"number",captureName:"paddingX",labelKey:"config.datagrid.wrapper.paddingX",defaultValue:0},{type:"number",captureName:"paddingY",labelKey:"config.datagrid.wrapper.paddingY",defaultValue:0},{type:"number",captureName:"elevation",labelKey:"config.datagrid.wrapper.elevation",defaultValue:0},{type:"number",captureName:"marginX",labelKey:"config.datagrid.wrapper.marginX",defaultValue:0},{type:"number",captureName:"marginY",labelKey:"config.datagrid.wrapper.marginY",defaultValue:0},{type:"text",captureName:"boxShadow",labelKey:"config.datagrid.wrapper.boxShadow"}]},qft={component:"DataGridOrganism",version:"1.4.0",toolGroups:[{id:"view",tool:"dataGridListConfigurator",titleKey:"config.datagrid.group.view",collapsible:!0,initiallyExpanded:!0,pathBase:"view",defaultView:"listView",toolConfig:{basePathAliasKey:"meta.pathAliases.dataGridView",templates:[{id:"custom",label:"Custom",labelKey:"config.datagrid.list.template.custom"},{id:"studyCard",label:"Study card",labelKey:"config.datagrid.list.template.studyCard"},{id:"subjectCard",label:"Subject card",labelKey:"config.datagrid.list.template.subjectCard"},{id:"visitCard",label:"Visit card",labelKey:"config.datagrid.list.template.visitCard"},{id:"visitCardCheck",label:"Visit card (check)",labelKey:"config.datagrid.list.template.visitCardCheck"},{id:"fourItems",label:"4 items view",labelKey:"config.datagrid.list.template.fourItems"},{id:"applicationCard",label:"Application card",labelKey:"config.datagrid.list.template.applicationCard"},{id:"notificationCard",label:"Notification card",labelKey:"config.datagrid.list.template.notificationCard"},{id:"compact",label:"Compact",labelKey:"config.datagrid.list.template.compact"},{id:"mediaLeft",label:"Media left",labelKey:"config.datagrid.list.template.mediaLeft"},{id:"titleSubtitleMeta",label:"Title + subtitle + meta",labelKey:"config.datagrid.list.template.titleSubtitleMeta"},{id:"twoColumn",label:"Two column",labelKey:"config.datagrid.list.template.twoColumn"}]}},{id:"columns",tool:"dataGridColumns",titleKey:"config.datagrid.group.columns",collapsible:!0,initiallyExpanded:!0,pathBase:"dataRetrievalConfig.columns"},Aft,Vft,Rft,{id:"rootWrapperStyles",tool:"custom",titleKey:"config.datagrid.group.rootWrapperStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.rootContainer.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.rootWrapper.background"},{type:"number",captureName:"paddingX",labelKey:"config.datagrid.rootWrapper.paddingX",defaultValue:0},{type:"number",captureName:"paddingY",labelKey:"config.datagrid.rootWrapper.paddingY",defaultValue:0},{type:"number",captureName:"marginX",labelKey:"config.datagrid.rootWrapper.marginX",defaultValue:0},{type:"number",captureName:"marginY",labelKey:"config.datagrid.rootWrapper.marginY",defaultValue:0}]},Hft,{id:"listItemStyles",tool:"custom",titleKey:"config.datagrid.group.listItemStyles",collapsible:!0,initiallyExpanded:!1,pathBase:"props.listItem.sx",fields:[{type:"color",captureName:"backgroundColor",labelKey:"config.datagrid.listItem.background"},{type:"color",captureName:"borderColor",labelKey:"config.datagrid.listItem.borderColor"},{type:"number",captureName:"borderRadius",labelKey:"config.datagrid.listItem.borderRadius",defaultValue:12},{type:"number",captureName:"paddingX",labelKey:"config.datagrid.listItem.paddingX",defaultValue:10},{type:"number",captureName:"paddingY",labelKey:"config.datagrid.listItem.paddingY",defaultValue:10},{type:"number",captureName:"marginX",labelKey:"config.datagrid.listItem.marginX",defaultValue:0},{type:"number",captureName:"marginY",labelKey:"config.datagrid.listItem.marginY",defaultValue:0},{type:"text",captureName:"boxShadow",labelKey:"config.datagrid.listItem.boxShadow"}]},$ft,zft,Lft,Fft,Ift,Bft]};var Wft=(e,t,r)=>{if(1===t.length&&t[0]===r){let t=!1;try{const r={};e(r)===r&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(FJe){({stack:e}=FJe)}}}},Uft=(e,t,r)=>{const{memoize:o,memoizeOptions:n}=t,{inputSelectorResults:a,inputSelectorResultsCopy:i}=e,s=o(()=>({}),...n);if(!(s.apply(null,a)===s.apply(null,i))){let e;try{throw new Error}catch(FJe){({stack:e}=FJe)}}},Gft={inputStabilityCheck:"once",identityFunctionCheck:"once"},Kft=Symbol("NOT_FOUND");var Yft=e=>Array.isArray(e)?e:[e];function Zft(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${r}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Xft(e,t){const r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var Qft=(e,t)=>e===t;function Jft(e,t){const r="object"==typeof t?t:{equalityCheck:t},{equalityCheck:o=Qft,maxSize:n=1,resultEqualityCheck:a}=r,i=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;const{length:o}=t;for(let n=0;n<o;n++)if(!e(t[n],r[n]))return!1;return!0}}(o);let s=0;const l=n<=1?function(e){let t;return{get:r=>t&&e(t.key,r)?t.value:Kft,put(e,r){t={key:e,value:r}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(i):function(e,t){let r=[];function o(e){const o=r.findIndex(r=>t(e,r.key));if(o>-1){const e=r[o];return o>0&&(r.splice(o,1),r.unshift(e)),e.value}return Kft}return{get:o,put:function(t,n){o(t)===Kft&&(r.unshift({key:t,value:n}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(n,i);function c(){let t=l.get(arguments);if(t===Kft){if(t=e.apply(null,arguments),s++,a){const e=l.getEntries().find(e=>a(e.value,t));e&&(t=e.value,0!==s&&s--)}l.put(arguments,t)}return t}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var emt="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function tmt(){return{s:0,v:void 0,o:null,p:null}}function rmt(e,t={}){let r={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:o}=t;let n,a=0;function i(){let t=r;const{length:i}=arguments;for(let e=0,r=i;e<r;e++){const r=arguments[e];if("function"==typeof r||"object"==typeof r&&null!==r){let e=t.o;null===e&&(t.o=e=new WeakMap);const o=e.get(r);void 0===o?(t=tmt(),e.set(r,t)):t=o}else{let e=t.p;null===e&&(t.p=e=new Map);const o=e.get(r);void 0===o?(t=tmt(),e.set(r,t)):t=o}}const s=t;let l;if(1===t.s)l=t.v;else if(l=e.apply(null,arguments),a++,o){const e=n?.deref?.()??n;null!=e&&o(e,l)&&(l=e,0!==a&&a--);n="object"==typeof l&&null!==l||"function"==typeof l?new emt(l):l}return s.s=1,s.v=l,l}return i.clearCache=()=>{r={s:0,v:void 0,o:null,p:null},i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function omt(e,...t){const r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,o=(...e)=>{let t,o=0,n=0,a={},i=e.pop();"object"==typeof i&&(a=i,i=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const s={...r,...a},{memoize:l,memoizeOptions:c=[],argsMemoize:u=rmt,argsMemoizeOptions:d=[],devModeChecks:p={}}=s,h=Yft(c),f=Yft(d),m=Zft(e),y=l(function(){return o++,i.apply(null,arguments)},...h);let g=!0;const v=u(function(){n++;const e=Xft(m,arguments);if(t=y.apply(null,e),"production"!==process.env.NODE_ENV){const{identityFunctionCheck:r,inputStabilityCheck:o}=((e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:o}={...Gft,...t};return{identityFunctionCheck:{shouldRun:"always"===r||"once"===r&&e,run:Wft},inputStabilityCheck:{shouldRun:"always"===o||"once"===o&&e,run:Uft}}})(g,p);if(r.shouldRun&&r.run(i,e,t),o.shouldRun){const t=Xft(m,arguments);o.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:l,memoizeOptions:h},arguments)}g&&(g=!1)}return t},...f);return Object.assign(v,{resultFunc:i,memoizedResultFunc:y,dependencies:m,dependencyRecomputations:()=>n,resetDependencyRecomputations:()=>{n=0},lastResult:()=>t,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:l,argsMemoize:u})};return Object.assign(o,{withTypes:()=>o}),o}var nmt=omt(rmt),amt=Object.assign((e,t=nmt)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const r=Object.keys(e),o=r.map(t=>e[t]),n=t(o,(...e)=>e.reduce((e,t,o)=>(e[r[o]]=t,e),{}));return n},{withTypes:()=>amt});const imt=omt({memoize:Jft,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});class smt{static create(e){return new smt(e)}constructor(e){this.state=void 0,this.listeners=void 0,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.state,this.update=e=>{this.state!==e&&(this.state=e,this.listeners.forEach(t=>t(e)))},this.state=e,this.listeners=new Set}apply(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.update(S({},this.state,e))}set(e,t){Object.is(this.state[e],t)||this.update(S({},this.state,{[e]:t}))}}const lmt=(...e)=>{const t=((e,t,r,o,n,a,...i)=>{if(i.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&r&&o&&n&&a)s=(i,s,l,c)=>{const u=e(i,s,l,c),d=t(i,s,l,c),p=r(i,s,l,c),h=o(i,s,l,c),f=n(i,s,l,c);return a(u,d,p,h,f,s,l,c)};else if(e&&t&&r&&o&&n)s=(a,i,s,l)=>{const c=e(a,i,s,l),u=t(a,i,s,l),d=r(a,i,s,l),p=o(a,i,s,l);return n(c,u,d,p,i,s,l)};else if(e&&t&&r&&o)s=(n,a,i,s)=>{const l=e(n,a,i,s),c=t(n,a,i,s),u=r(n,a,i,s);return o(l,c,u,a,i,s)};else if(e&&t&&r)s=(o,n,a,i)=>{const s=e(o,n,a,i),l=t(o,n,a,i);return r(s,l,n,a,i)};else if(e&&t)s=(r,o,n,a)=>{const i=e(r,o,n,a);return t(i,o,n,a)};else{if(!e)throw new Error("Missing arguments");s=e}return s})(...e);return(e,r,o,n)=>t(dmt(e),r,o,n)},cmt=(...e)=>{const t=((...e)=>{const t=new WeakMap;let r=1;const o=e[e.length-1],n=e.length-1||1,a=Math.max(o.length-n,0);if(a>3)throw new Error("Unsupported number of arguments");return(n,i,s,l)=>{let c=n.__cacheKey__;c||(c={id:r},n.__cacheKey__=c,r+=1);let u=t.get(c);if(!u){let r=e;const n=[void 0,void 0,void 0];switch(a){case 0:break;case 1:r=[...e.slice(0,-1),()=>n[0],o];break;case 2:r=[...e.slice(0,-1),()=>n[0],()=>n[1],o];break;case 3:r=[...e.slice(0,-1),()=>n[0],()=>n[1],()=>n[2],o];break;default:throw new Error("Unsupported number of arguments")}u=imt(...r),u.selectorArgs=n,t.set(c,u)}switch(a){case 3:u.selectorArgs[2]=l;case 2:u.selectorArgs[1]=s;case 1:u.selectorArgs[0]=i}switch(a){case 0:return u(n);case 1:return u(n,i);case 2:return u(n,i,s);case 3:return u(n,i,s,l);default:throw new Error("unreachable")}}})(...e);return(e,r,o,n)=>t(dmt(e),r,o,n)},umt=e=>(t,r)=>e(dmt(t),r);function dmt(e){return"current"in e?e.current.state:e}const pmt=umt(e=>e.dimensions),hmt=lmt(pmt,e=>e.columnsTotalWidth),fmt=lmt(pmt,e=>e.rowHeight),mmt=lmt(pmt,e=>e.contentSize.height),ymt=lmt(pmt,e=>e.hasScrollX),gmt=lmt(pmt,e=>e.hasScrollY),vmt=lmt(pmt,e=>e.columnsTotalWidth<e.viewportOuterSize.width),xmt=lmt(pmt,e=>e.headerHeight),bmt=lmt(pmt,e=>e.groupHeaderHeight),wmt=lmt(pmt,e=>e.headerFilterHeight),kmt=lmt(pmt,e=>e.hasScrollX?e.scrollbarSize:0),_mt=lmt(pmt,e=>e.hasScrollY?e.scrollbarSize:0),Cmt=lmt(pmt,kmt,(e,t)=>{const r=e.viewportOuterSize.height-e.minimumSize.height>0;return!(0===t&&!r)});var Mmt=parseInt(s.version,10);const Smt=e=>{if(Mmt>=19){const t=t=>e(t,t.ref??null);return t.displayName=e.displayName??e.name,t}return s.forwardRef(e)};"production"!==process.env.NODE_ENV&&(Smt.displayName="forwardRef");const Dmt=s.createContext(void 0);"production"!==process.env.NODE_ENV&&(Dmt.displayName="GridRootPropsContext");const Omt=()=>{const e=s.useContext(Dmt);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e},Pmt={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",noColumnsOverlayLabel:"No columns",noColumnsOverlayManageColumns:"Manage columns",emptyPivotOverlayLabel:"Add fields to rows, columns, and values to create a pivot table",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",toolbarPivot:"Pivot",toolbarAssistant:"AI Assistant",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",headerFilterClear:"Clear filter",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuAriaLabel:e=>`${e} column menu`,columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnMenuManagePivot:"Manage pivot",columnHeaderFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>1!==e?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",paginationRowsPerPage:"Rows per page:",paginationDisplayedRows:({from:e,to:t,count:r,estimated:o})=>{if(!o)return`${e}–${t} of ${-1!==r?r:`more than ${t}`}`;return`${e}–${t} of ${-1!==r?r:o&&o>t?`around ${o}`:`more than ${t}`}`},paginationItemAriaLabel:e=>"first"===e?"Go to first page":"last"===e?"Go to last page":"next"===e?"Go to next page":"Go to previous page",rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size",pivotToggleLabel:"Pivot",pivotRows:"Rows",pivotColumns:"Columns",pivotValues:"Values",pivotCloseButton:"Close pivot settings",pivotSearchButton:"Search fields",pivotSearchControlPlaceholder:"Search fields",pivotSearchControlLabel:"Search fields",pivotSearchControlClear:"Clear search",pivotNoFields:"No fields",pivotMenuMoveUp:"Move up",pivotMenuMoveDown:"Move down",pivotMenuMoveToTop:"Move to top",pivotMenuMoveToBottom:"Move to bottom",pivotMenuRows:"Rows",pivotMenuColumns:"Columns",pivotMenuValues:"Values",pivotMenuOptions:"Field options",pivotMenuAddToRows:"Add to Rows",pivotMenuAddToColumns:"Add to Columns",pivotMenuAddToValues:"Add to Values",pivotMenuRemove:"Remove",pivotDragToRows:"Drag here to create rows",pivotDragToColumns:"Drag here to create columns",pivotDragToValues:"Drag here to create values",pivotYearColumnHeaderName:"(Year)",pivotQuarterColumnHeaderName:"(Quarter)",aiAssistantPanelTitle:"AI Assistant",aiAssistantPanelClose:"Close AI Assistant",aiAssistantPanelNewConversation:"New conversation",aiAssistantPanelConversationHistory:"Conversation history",aiAssistantPanelEmptyConversation:"No prompt history",aiAssistantSuggestions:"Suggestions",promptFieldLabel:"Prompt",promptFieldPlaceholder:"Type a prompt…",promptFieldPlaceholderWithRecording:"Type or record a prompt…",promptFieldPlaceholderListening:"Listening for prompt…",promptFieldSpeechRecognitionNotSupported:"Speech recognition is not supported in this browser",promptFieldSend:"Send",promptFieldRecord:"Record",promptFieldStopRecording:"Stop recording",promptRerun:"Run again",promptProcessing:"Processing…",promptAppliedChanges:"Applied changes",promptChangeGroupDescription:e=>`Group by ${e}`,promptChangeAggregationLabel:(e,t)=>`${e} (${t})`,promptChangeAggregationDescription:(e,t)=>`Aggregate ${e} (${t})`,promptChangeFilterLabel:(e,t,r)=>"is any of"===t?`${e} is any of: ${r}`:`${e} ${t} ${r}`,promptChangeFilterDescription:(e,t,r)=>"is any of"===t?`Filter where ${e} is any of: ${r}`:`Filter where ${e} ${t} ${r}`,promptChangeSortDescription:(e,t)=>`Sort by ${e} (${t})`,promptChangePivotEnableLabel:"Pivot",promptChangePivotEnableDescription:"Enable pivot",promptChangePivotColumnsLabel:e=>`Columns (${e})`,promptChangePivotColumnsDescription:(e,t)=>`${e}${t?` (${t})`:""}`,promptChangePivotRowsLabel:e=>`Rows (${e})`,promptChangePivotValuesLabel:e=>`Values (${e})`,promptChangePivotValuesDescription:(e,t)=>`${e} (${t})`};function Emt(e){return Ba("MuiDataGrid",e)}const jmt=Va("MuiDataGrid",["aiAssistantPanel","aiAssistantPanelHeader","aiAssistantPanelTitleContainer","aiAssistantPanelTitle","aiAssistantPanelBody","aiAssistantPanelEmptyText","aiAssistantPanelFooter","aiAssistantPanelConversation","aiAssistantPanelConversationList","aiAssistantPanelConversationTitle","aiAssistantPanelSuggestions","aiAssistantPanelSuggestionsList","aiAssistantPanelSuggestionsItem","aiAssistantPanelSuggestionsLabel","actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","aggregationRowOverlayWrapper","autoHeight","autosizing","mainContent","withSidePanel","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","collapsible","collapsibleTrigger","collapsibleIcon","collapsiblePanel","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeader--filter","columnHeaderFilterInput","columnHeaderFilterOperatorLabel","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","columnsManagementScrollArea","columnsManagementEmptyText","container--top","container--bottom","detailPanel","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hiddenContent","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dropAbove","row--dropBelow","row--beingDragged","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowReorderIcon","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea--up","scrollArea--down","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortButton","sortIcon","shadowScrollArea","sidebar","sidebarHeader","toolbarContainer","toolbar","toolbarLabel","toolbarDivider","toolbarFilterList","toolbarQuickFilter","toolbarQuickFilterTrigger","toolbarQuickFilterControl","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pivotPanelAvailableFields","pivotPanelField","pivotPanelField--sorted","pivotPanelFieldActionContainer","pivotPanelFieldCheckbox","pivotPanelFieldDragIcon","pivotPanelFieldList","pivotPanelFieldName","pivotPanelHeader","pivotPanelPlaceholder","pivotPanelScrollArea","pivotPanelSearchContainer","pivotPanelSection","pivotPanelSectionTitle","pivotPanelSections","pivotPanelSwitch","pivotPanelSwitchLabel","prompt","promptContent","promptText","promptFeedback","promptChangeList","promptChangesToggle","promptChangesToggleIcon","promptIcon","promptIconContainer","promptError","promptAction"]);let Tmt=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}({});const Nmt=s.createContext(void 0);function Rmt(){const e=s.useContext(Nmt);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}"production"!==process.env.NODE_ENV&&(Nmt.displayName="GridApiContext");class Fmt{constructor(e=1e3){this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}register(e,t,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{"function"==typeof t&&t(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(e){const t=this.timeouts.get(e.cleanupToken);t&&(this.timeouts.delete(e.cleanupToken),clearTimeout(t))}reset(){this.timeouts&&(this.timeouts.forEach((e,t)=>{this.unregister({cleanupToken:t})}),this.timeouts=void 0)}}class Imt{constructor(){this.registry=new FinalizationRegistry(e=>{"function"==typeof e&&e()})}register(e,t,r){this.registry.register(e,t,r)}unregister(e){this.registry.unregister(e)}reset(){}}class Amt{static create(){return new Amt}}const zmt={current:"undefined"!=typeof FinalizationRegistry?new Imt:new Fmt};let Lmt=0;function Bmt(e,t,r,o){const n=s.useState(Amt.create)[0],a=s.useRef(null),i=s.useRef(null);i.current=r;const l=s.useRef(null);if(!a.current&&i.current){const r=(e,t,r)=>{t.defaultMuiPrevented||i.current?.(e,t,r)};a.current=e.current.subscribeEvent(t,r,o),Lmt+=1,l.current={cleanupToken:Lmt},zmt.current.register(n,()=>{a.current?.(),a.current=null,l.current=null},l.current)}else!i.current&&a.current&&(a.current(),a.current=null,l.current&&(zmt.current.unregister(l.current),l.current=null));s.useEffect(()=>{if(!a.current&&i.current){const r=(e,t,r)=>{t.defaultMuiPrevented||i.current?.(e,t,r)};a.current=e.current.subscribeEvent(t,r,o)}return l.current&&zmt.current&&(zmt.current.unregister(l.current),l.current=null),()=>{a.current?.(),a.current=null}},[e,t,o])}const Vmt={isFirst:!0};function $mt(e,t,r){Bmt(e,t,r,Vmt)}var Hmt,qmt={exports:{}},Wmt={};var Umt,Gmt={};!function(e){"production"===process.env.NODE_ENV?e.exports=function(){if(Hmt)return Wmt;Hmt=1;var e=l.default,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,o=e.useEffect,n=e.useLayoutEffect,a=e.useDebugValue;function i(e){var r=e.getSnapshot;e=e.value;try{var o=r();return!t(e,o)}catch(n){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),l=r({inst:{value:s,getSnapshot:t}}),c=l[0].inst,u=l[1];return n(function(){c.value=s,c.getSnapshot=t,i(c)&&u({inst:c})},[e,s,t]),o(function(){return i(c)&&u({inst:c}),e(function(){i(c)&&u({inst:c})})},[e]),a(s),s};return Wmt.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:s,Wmt}():e.exports=(Umt||(Umt=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!r(e,o)}catch(n){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=l.default,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=t.useState,n=t.useEffect,a=t.useLayoutEffect,i=t.useDebugValue,s=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(l,u){s||void 0===t.startTransition||(s=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=u();if(!c){var p=u();r(d,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var h=(p=o({inst:{value:d,getSnapshot:u}}))[0].inst,f=p[1];return a(function(){h.value=d,h.getSnapshot=u,e(h)&&f({inst:h})},[l,d,u]),n(function(){return e(h)&&f({inst:h}),l(function(){e(h)&&f({inst:h})})},[l]),i(d),d};Gmt.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Gmt)}(qmt);const Kmt=Object.is,Ymt=U,Zmt=(e,t)=>e===t||e.length===t.length&&e.every((e,r)=>e===t[r]),Xmt=()=>({state:null,equals:null,selector:null,args:void 0}),Qmt=[],Jmt=()=>null;function eyt(e,t,r=void 0,o=Kmt){"production"!==process.env.NODE_ENV&&(e.current.state||ldt(["MUI X: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]));const n=Rc(Xmt),a=null!==n.current.selector,[i,l]=s.useState(a?null:t(e,r));n.current.state=i,n.current.equals=o,n.current.selector=t;const c=n.current.args;if(n.current.args=r,a&&!((e,t)=>{let r=Object.is;return t instanceof Array?r=Zmt:t instanceof Object&&(r=Ymt),r(e,t)})(c,r)){const t=n.current.selector(e,n.current.args);n.current.equals(n.current.state,t)||(n.current.state=t,l(t))}const u=s.useCallback(()=>(n.current.subscription||(n.current.subscription=e.current.store.subscribe(()=>{const t=n.current.selector(e,n.current.args);n.current.equals(n.current.state,t)||(n.current.state=t,l(t))})),null),Qmt),d=s.useCallback(()=>(n.current.subscription||u(),()=>{n.current.subscription&&(n.current.subscription(),n.current.subscription=void 0)}),Qmt);return qmt.exports.useSyncExternalStore(d,u,Jmt),i}const tyt={compact:.7,comfortable:1.3,standard:1},ryt=umt(e=>e.density),oyt=lmt(ryt,e=>tyt[e]);function nyt(e){throw new Error("Failed assertion: should not be rendered")}const ayt={values:{xs:0,sm:600,md:900,lg:1200,xl:1536},up:e=>{const t=ayt.values;return`@media (min-width:${"number"==typeof t[e]?t[e]:e}px)`}},iyt={spacingUnit:"--DataGrid-t-spacing-unit",colors:{border:{base:"--DataGrid-t-color-border-base"},foreground:{base:"--DataGrid-t-color-foreground-base",muted:"--DataGrid-t-color-foreground-muted",accent:"--DataGrid-t-color-foreground-accent",disabled:"--DataGrid-t-color-foreground-disabled",error:"--DataGrid-t-color-foreground-error"},background:{base:"--DataGrid-t-color-background-base",overlay:"--DataGrid-t-color-background-overlay",backdrop:"--DataGrid-t-color-background-backdrop"},interactive:{hover:"--DataGrid-t-color-interactive-hover",hoverOpacity:"--DataGrid-t-color-interactive-hover-opacity",focus:"--DataGrid-t-color-interactive-focus",focusOpacity:"--DataGrid-t-color-interactive-focus-opacity",disabled:"--DataGrid-t-color-interactive-disabled",disabledOpacity:"--DataGrid-t-color-interactive-disabled-opacity",selected:"--DataGrid-t-color-interactive-selected",selectedOpacity:"--DataGrid-t-color-interactive-selected-opacity"}},header:{background:{base:"--DataGrid-t-header-background-base"}},cell:{background:{pinned:"--DataGrid-t-cell-background-pinned"}},radius:{base:"--DataGrid-t-radius-base"},typography:{font:{body:"--DataGrid-t-typography-font-body",small:"--DataGrid-t-typography-font-small",large:"--DataGrid-t-typography-font-large"},fontFamily:{base:"--DataGrid-t-typography-font-family-base"},fontWeight:{light:"--DataGrid-t-typography-font-weight-light",regular:"--DataGrid-t-typography-font-weight-regular",medium:"--DataGrid-t-typography-font-weight-medium",bold:"--DataGrid-t-typography-font-weight-bold"}},transitions:{easing:{easeIn:"--DataGrid-t-transition-easing-ease-in",easeOut:"--DataGrid-t-transition-easing-ease-out",easeInOut:"--DataGrid-t-transition-easing-ease-in-out"},duration:{short:"--DataGrid-t-transition-duration-short",base:"--DataGrid-t-transition-duration-base",long:"--DataGrid-t-transition-duration-long"}},shadows:{base:"--DataGrid-t-shadow-base",overlay:"--DataGrid-t-shadow-overlay"},zIndex:{panel:"--DataGrid-t-z-index-panel",menu:"--DataGrid-t-z-index-menu"}},syt=function e(t){if("string"==typeof t)return`var(${t})`;const r={};for(const o in t)Object.hasOwn(t,o)&&(r[o]=e(t[o]));return r}(iyt),lyt=S({breakpoints:ayt,spacing:function(e,t,r,o){if(void 0===e)return cyt(1);if(void 0===t)return cyt(e);if(void 0===r)return cyt(e)+" "+cyt(t);if(void 0===o)return cyt(e)+" "+cyt(t)+" "+cyt(r);return cyt(e)+" "+cyt(t)+" "+cyt(r)+" "+cyt(o)},transition:function(e,t){const{duration:r=lyt.transitions.duration.base,easing:o=lyt.transitions.easing.easeInOut,delay:n=0}=t??{};return e.map(e=>`${e} ${r} ${o} ${n}ms`).join(", ")},keys:iyt},syt);function cyt(e){return 0===e?"0":`calc(var(--DataGrid-t-spacing-unit) * ${e})`}const uyt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange","slotProps"],dyt=gl(nyt,{name:"MuiDataGrid",slot:"EditInputCell"})({font:lyt.typography.font.body,padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}),pyt=Smt((e,r)=>{const o=Omt(),{id:n,value:a,field:i,colDef:l,hasFocus:c,debounceMs:u=200,isProcessingProps:d,onValueChange:p,slotProps:h}=e,f=Jl(e,uyt),m=Rmt(),y=s.useRef(null),[g,v]=s.useState(a),x=(e=>{const{classes:t}=e;return rs({root:["editInputCell"]},Emt,t)})(o),b=s.useCallback(async e=>{const t=e.target.value,r=m.current.getColumn(i);let o=t;r.valueParser&&(o=r.valueParser(t,m.current.getRow(n),r,m)),v(o),m.current.setEditCellValue({id:n,field:i,value:o,debounceMs:u,unstable_skipValueParser:!0},e),p&&await p(e,t)},[m,u,i,n,p]),w=m.current.unstable_getEditCellMeta(n,i);return s.useEffect(()=>{"debouncedSetEditCellValue"!==w?.changeReason&&v(a)},[w,a]),ni(()=>{c&&y.current.focus()},[c]),t.jsx(dyt,S({as:o.slots.baseInput,inputRef:y,className:x.root,ownerState:o,fullWidth:!0,type:"number"===l.type?l.type:"text",value:g??"",onChange:b,endAdornment:d?t.jsx(o.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},f,h?.root,{ref:r}))});"production"!==process.env.NODE_ENV&&(pyt.displayName="GridEditInputCell"),"production"!==process.env.NODE_ENV&&(pyt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,changeReason:Ro.exports.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:Ro.exports.object.isRequired,debounceMs:Ro.exports.number,field:Ro.exports.string.isRequired,formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,isProcessingProps:Ro.exports.bool,isValidating:Ro.exports.bool,onValueChange:Ro.exports.func,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,slotProps:Ro.exports.object,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const hyt=e=>t.jsx(pyt,S({},e));"production"!==process.env.NODE_ENV&&(hyt.displayName="renderEditInputCell");const fyt=umt(e=>e.rows),myt=lmt(fyt,e=>e.totalRowCount),yyt=lmt(fyt,e=>e.loading),gyt=lmt(fyt,e=>e.totalTopLevelRowCount),vyt=lmt(fyt,e=>e.dataRowIdToModelLookup),xyt=lmt(vyt,(e,t)=>e[t]),byt=lmt(fyt,e=>e.tree),wyt=lmt(byt,(e,t)=>e[t]),kyt=lmt(fyt,e=>e.groupsToFetch),_yt=lmt(fyt,e=>e.groupingName),Cyt=lmt(fyt,e=>e.treeDepths),Myt=cmt(fyt,e=>{const t=Object.entries(e.treeDepths);return 0===t.length?1:(t.filter(([,e])=>e>0).map(([e])=>Number(e)).sort((e,t)=>t-e)[0]??0)+1}),Syt=lmt(fyt,e=>e.dataRowIds),Dyt=cmt(Syt,vyt,(e,t)=>e.reduce((e,r)=>t[r]?(e.push(t[r]),e):e,[])),Oyt=cmt(lmt(fyt,e=>e?.additionalRowGroups),e=>{const t=e?.pinnedRows;return{bottom:t?.bottom?.map(e=>({id:e.id,model:e.model??{}}))??[],top:t?.top?.map(e=>({id:e.id,model:e.model??{}}))??[]}}),Pyt=lmt(Oyt,e=>(e?.top?.length||0)+(e?.bottom?.length||0)),Eyt=(e,t)=>t&&e.length>1?("production"!==process.env.NODE_ENV&&ldt(["MUI X: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the Data Grid, this prop is always `true`."],"error"),[e[0]]):e,jyt=(e,t)=>r=>S({},r,{sorting:S({},r.sorting,{sortModel:Eyt(e,t)})}),Tyt=(e,t)=>{const r=e.map(e=>((e,t)=>{const r=t.current.getColumn(e.field);if(!r||null===e.sort)return null;let o;return o=r.getSortComparator?r.getSortComparator(e.sort):(e=>"desc"===e)(e.sort)?(...e)=>-1*r.sortComparator(...e):r.sortComparator,o?{getSortCellParams:e=>({id:e,field:r.field,rowNode:wyt(t,e),value:t.current.getCellValue(e,r.field),api:t.current}),comparator:o}:null})(e,t)).filter(e=>!!e);return 0===r.length?null:e=>e.map(e=>({node:e,params:r.map(t=>t.getSortCellParams(e.id))})).sort((e,t)=>{return o=e,n=t,r.reduce((e,t,r)=>{if(0!==e)return e;const a=o.params[r],i=n.params[r];return t.comparator(a.value,i.value,a,i)},0);var o,n}).map(e=>e.node.id)},Nyt=(e,t)=>{const r=e.indexOf(t);return t&&-1!==r&&r+1!==e.length?e[r+1]:e[0]},Ryt=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,Fyt=new Intl.Collator,Iyt=(e,t)=>{const r=Ryt(e,t);return null!==r?r:Number(e)-Number(t)},Ayt=(e,t)=>{const r=Ryt(e,t);return null!==r?r:e>t?1:e<t?-1:0},zyt=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","slotProps","clearButton","headerFilterMenu"];function Lyt(e){const{item:r,applyValue:o,type:n,apiRef:a,focusElementRef:i,tabIndex:l,disabled:c,slotProps:u,clearButton:d,headerFilterMenu:p}=e,h=Jl(e,zyt),f=u?.root,m=zc(),[y,g]=s.useState(Byt(r.value)),[v,x]=s.useState(!1),b=Li(),w=Omt(),k=s.useCallback(e=>{const t=Byt(e.target.value);g(t),x(!0),m.start(w.filterDebounceMs,()=>{const e=S({},r,{value:"number"!==n||Number.isNaN(Number(t))?t:Number(t),fromInput:b});o(e),x(!1)})},[m,w.filterDebounceMs,r,n,b,o]);return s.useEffect(()=>{r.fromInput===b&&null!=r.value||g(Byt(r.value))},[b,r]),t.jsxs(s.Fragment,{children:[t.jsx(w.slots.baseTextField,S({id:b,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),value:y??"",onChange:k,type:n||"text",disabled:c,slotProps:S({},f?.slotProps,{input:S({endAdornment:v?t.jsx(w.slots.loadIcon,{fontSize:"small",color:"action"}):null},f?.slotProps?.input),htmlInput:S({tabIndex:l},f?.slotProps?.htmlInput)}),inputRef:i},w.slotProps?.baseTextField,h,f)),p,d]})}function Byt(e){if(null!=e&&""!==e)return String(e)}function Vyt(e){return"number"==typeof e&&!Number.isNaN(e)}function $yt(e){return"object"==typeof e&&null!==e}function Hyt(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}"production"!==process.env.NODE_ENV&&(Lyt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number,type:Ro.exports.oneOf(["date","datetime-local","number","text"])});const qyt=(e,t,r)=>Math.max(t,Math.min(r,e));function Wyt(e,t){return Array.from({length:t-e}).map((t,r)=>e+r)}function Uyt(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}const Gyt=(e,t)=>r=>{e&&t(r)};function Kyt(e){const{item:r,applyValue:o,type:n,apiRef:a,focusElementRef:i,slotProps:l}=e,c=Li(),[u,d]=s.useState([]),[p,h]=s.useState(r.value||[]),f=Omt();s.useEffect(()=>{const e=r.value??[];h(e.map(String))},[r.value]);const m=s.useCallback((e,t)=>{h(t.map(String)),o(S({},r,{value:[...t.map(e=>"number"===n?Number(e):e)]}))},[o,r,n]),y=s.useCallback((e,t)=>{d(""===t?[]:[t])},[d]),g=f.slots.baseAutocomplete;return t.jsx(g,S({multiple:!0,freeSolo:!0,options:u,id:c,value:p,onChange:m,onInputChange:y,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:n||"text",inputRef:i}}},l?.root))}"production"!==process.env.NODE_ENV&&(Kyt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number,type:Ro.exports.oneOf(["date","datetime-local","number","text"])});var Yyt=function(e){return e.Cell="cell",e.Row="row",e}(Yyt||{}),Zyt=function(e){return e.Edit="edit",e.View="view",e}(Zyt||{}),Xyt=function(e){return e.Edit="edit",e.View="view",e}(Xyt||{}),Qyt=function(e){return e.And="and",e.Or="or",e}(Qyt||{});class Jyt{constructor(e){this.data=void 0,this.data=e.ids}has(e){return this.data.has(e)}select(e){this.data.add(e)}unselect(e){this.data.delete(e)}}class egt{constructor(e){this.data=void 0,this.data=e.ids}has(e){return!this.data.has(e)}select(e){this.data.delete(e)}unselect(e){this.data.add(e)}}const tgt=e=>"include"===e.type?new Jyt(e):new egt(e);var rgt=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(rgt||{}),ogt=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(ogt||{}),ngt=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(ngt||{}),agt=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(agt||{});function igt(e){return void 0!==e.field}const sgt={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},lgt=()=>({items:[],logicOperator:Qyt.And,quickFilterValues:[],quickFilterLogicOperator:Qyt.And});function cgt(e){return{current:e.current.getPublicApi()}}let ugt=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const dgt={left:[],right:[]},pgt=umt(e=>e.isRtl),hgt=umt(e=>e.props.listView??!1),fgt=umt(e=>e.listViewColumn),mgt=umt(e=>e.columns),ygt=lmt(mgt,e=>e.orderedFields),ggt=lmt(mgt,e=>e.lookup),vgt=cmt(ygt,ggt,(e,t)=>e.map(e=>t[e])),xgt=lmt(mgt,e=>e.columnVisibilityModel),bgt=lmt(mgt,e=>e.initialColumnVisibilityModel),wgt=cmt(vgt,xgt,hgt,fgt,(e,t,r,o)=>r&&o?[o]:e.filter(e=>!1!==t[e.field])),kgt=cmt(wgt,e=>e.map(e=>e.field)),_gt=umt(e=>e.pinnedColumns),Cgt=cmt(_gt,ygt,pgt,(e,t,r)=>Sgt(e,t,r)),Mgt=cmt(mgt,_gt,kgt,pgt,hgt,(e,t,r,o,n)=>{if(n)return dgt;const a=Sgt(t,r,o);return{left:a.left.map(t=>e.lookup[t]),right:a.right.map(t=>e.lookup[t])}});function Sgt(e,t,r){if(!Array.isArray(e.left)&&!Array.isArray(e.right))return dgt;if(0===e.left?.length&&0===e.right?.length)return dgt;const o=(e,t)=>Array.isArray(e)?e.filter(e=>t.includes(e)):[],n=o(e.left,t),a=t.filter(e=>!n.includes(e)),i=o(e.right,a);return r?{left:i,right:n}:{left:n,right:i}}const Dgt=cmt(wgt,e=>{const t=[];let r=0;for(let o=0;o<e.length;o+=1)t.push(r),r+=e[o].computedWidth;return t}),Ogt=cmt(vgt,e=>e.filter(e=>e.filterable)),Pgt=cmt(vgt,e=>e.reduce((e,t)=>(t.filterable&&(e[t.field]=t),e),{})),Egt=cmt(vgt,e=>e.some(e=>void 0!==e.colSpan));let jgt;const Tgt=(e,t)=>{const r=S({},e);if(null==r.id&&(r.id=Math.round(1e5*Math.random())),null==r.operator){const e=ggt(t)[r.field];r.operator=e&&e.filterOperators[0].value}return r},Ngt=(e,t,r)=>{const o=e.items.length>1;let n;o&&t?("production"!==process.env.NODE_ENV&&ldt(["MUI X: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the Data Grid, this prop is always `true`."],"error"),n=[e.items[0]]):n=e.items;const a=o&&n.some(e=>null==e.id),i=n.some(e=>null==e.operator);return"production"!==process.env.NODE_ENV&&a&&ldt("MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),"production"!==process.env.NODE_ENV&&i&&ldt("MUI X: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),i||a?S({},e,{items:n.map(e=>Tgt(e,r))}):e.items!==n?S({},e,{items:n}):e},Rgt=(e,t,r)=>o=>S({},o,{filterModel:Ngt(e,t,r)}),Fgt=e=>"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,Igt=(e,t)=>{if(!e.field||!e.operator)return null;const r=t.current.getColumn(e.field);if(!r)return null;let o;if(r.valueParser){const n=r.valueParser;o=Array.isArray(e.value)?e.value?.map(e=>n(e,void 0,r,t)):n(e.value,void 0,r,t)}else o=e.value;const{ignoreDiacritics:n}=t.current.rootProps;n&&(o=Fgt(o));const a=S({},e,{value:o}),i=r.filterOperators;if(!i?.length)throw new Error(`MUI X: No filter operators found for column '${r.field}'.`);const s=i.find(e=>e.value===a.operator);if(!s)throw new Error(`MUI X: No filter operator found for column '${r.field}' and operator value '${a.operator}'.`);const l=cgt(t),c=s.getApplyFilterFn(a,r);return"function"!=typeof c?null:{item:a,fn:e=>{let o=t.current.getRowValue(e,r);return n&&(o=Fgt(o)),c(o,e,r,l)}}};let Agt=1;const zgt=(e,t,r)=>{const{items:o}=e,n=o.map(e=>Igt(e,t)).filter(e=>!!e);if(0===n.length)return null;if(r||!function(){if(void 0!==jgt)return jgt;try{jgt=new Function("return true")()}catch(e){jgt=!1}return jgt}())return(e,t)=>{const r={};for(let o=0;o<n.length;o+=1){const a=n[o];t&&!t(a.item.field)||(r[a.item.id]=a.fn(e))}return r};const a=new Function("appliers","row","shouldApplyFilter",`"use strict";\n${n.map((e,t)=>`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`).join("\n")}\n\nconst result$$ = {\n${n.map((e,t)=>` ${JSON.stringify(String(e.item.id))}: !shouldApply${t} ? false : appliers[${t}].fn(row),`).join("\n")}\n};\n\nreturn result$$;`.replaceAll("$$",String(Agt)));Agt+=1;return(e,t)=>a(n,e,t)},Lgt=e=>e.quickFilterExcludeHiddenColumns??!0,Bgt=(e,t,r)=>{const o=zgt(e,t,r),n=((e,t)=>{const r=e.quickFilterValues?.filter(Boolean)??[];if(0===r.length)return null;const o=Lgt(e)?kgt(t):ygt(t),n=[],{ignoreDiacritics:a}=t.current.rootProps,i=cgt(t);return o.forEach(e=>{const o=t.current.getColumn(e),s=o?.getApplyQuickFilterFn;s&&n.push({column:o,appliers:r.map(e=>{const t=a?Fgt(e):e;return{fn:s(t,o,i)}})})}),function(e,o){const s={};e:for(let l=0;l<r.length;l+=1){const c=r[l];for(let r=0;r<n.length;r+=1){const{column:u,appliers:d}=n[r],{field:p}=u;if(o&&!o(p))continue;const h=d[l];let f=t.current.getRowValue(e,u);if(null!==h.fn&&(a&&(f=Fgt(f)),h.fn(f,e,u,i))){s[c]=!0;continue e}}s[c]=!1}return s}})(e,t);return function(e,t,r){r.passingFilterItems=o?.(e,t)??null,r.passingQuickFilterValues=n?.(e,t)??null}},Vgt=e=>null!=e,$gt=(e,t,r,o,n)=>{const a=((e,t,r)=>(e.cleanedFilterItems||(e.cleanedFilterItems=r.filter(e=>null!==Igt(e,t))),e.cleanedFilterItems))(n,o,r.items),i=e.filter(Vgt),s=t.filter(Vgt);if(i.length>0){const e=e=>i.some(t=>t[e.id]);if((r.logicOperator??lgt().logicOperator)===Qyt.And){if(!a.every(e))return!1}else{if(!a.some(e))return!1}}if(s.length>0&&null!=r.quickFilterValues){const e=e=>s.some(t=>t[e]);if((r.quickFilterLogicOperator??lgt().quickFilterLogicOperator)===Qyt.And){if(!r.quickFilterValues.every(e))return!1}else{if(!r.quickFilterValues.some(e))return!1}}return!0},Hgt=(e,t)=>r=>{if(!r.value)return null;const o=e?r.value:r.value.trim(),n=new RegExp(Hyt(o),"i");return e=>{if(null==e)return t;const r=n.test(String(e));return t?!r:r}},qgt=(e,t)=>r=>{if(!r.value)return null;const o=e?r.value:r.value.trim(),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>{if(null==e)return t;const r=0===n.compare(o,e.toString());return t?!r:r}},Wgt=e=>()=>t=>{const r=""===t||null==t;return e?!r:r},Ugt={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:(e,t)=>{const r=Ryt(e,t);return null!==r?r:"string"==typeof e?Fyt.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:((e=!1)=>[{value:"contains",getApplyFilterFn:Hgt(e,!1),InputComponent:Lyt},{value:"doesNotContain",getApplyFilterFn:Hgt(e,!0),InputComponent:Lyt},{value:"equals",getApplyFilterFn:qgt(e,!1),InputComponent:Lyt},{value:"doesNotEqual",getApplyFilterFn:qgt(e,!0),InputComponent:Lyt},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),o=new RegExp(`^${Hyt(r)}.*$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:Lyt},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),o=new RegExp(`.*${Hyt(r)}$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:Lyt},{value:"isEmpty",getApplyFilterFn:Wgt(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:Wgt(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const r=e?t.value:t.value.map(e=>e.trim()),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&r.some(t=>0===o.compare(t,e.toString()||""))},InputComponent:Kyt}])(),renderEditCell:hyt,getApplyQuickFilterFn:e=>{if(!e)return null;const t=new RegExp(Hyt(e),"i");return(e,r,o,n)=>{let a=n.current.getRowFormattedValue(r,o);return n.current.ignoreDiacritics&&(a=Fgt(a)),null!=a&&t.test(a.toString())}}};function Ggt(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}const Kgt=e=>0===e.indexOf("Arrow")||0===e.indexOf("Page")||" "===e||"Home"===e||"End"===e,Ygt=e=>"Tab"===e||"Escape"===e;function Zgt(e){return(e.ctrlKey||e.metaKey)&&"V"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}const Xgt=s.createContext(void 0);"production"!==process.env.NODE_ENV&&(Xgt.displayName="GridConfigurationContext");const Qgt=()=>{const e=s.useContext(Xgt);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e},Jgt=s.createContext({className:"unset",tag:t.jsx("style",{href:"/unset"})});function evt(){return s.useContext(Jgt).className}function tvt(e){const r=Qgt(),o=Omt(),n=r.hooks.useCSSVariables(),a=s.useMemo(()=>{const e=`MuiDataGridVariables-${n.id}`,r=`.${e}{${function(e){let t="";for(const r in e)Object.hasOwn(e,r)&&void 0!==e[r]&&(t+=`${r}:${e[r]};`);return t}(n.variables)}}`;return{className:e,tag:t.jsx("style",{href:`/${e}`,nonce:o.nonce,children:r})}},[o.nonce,n]);return t.jsx(Jgt.Provider,{value:a,children:e.children})}"production"!==process.env.NODE_ENV&&(Jgt.displayName="CSSVariablesContext");const rvt=["open","target","onClose","children","position","className","onExited"],ovt=gl(nyt,{name:"MuiDataGrid",slot:"Menu"})({zIndex:lyt.zIndex.menu,[`& .${jmt.menuList}`]:{outline:0}});function nvt(e){const{open:r,target:o,onClose:n,children:a,position:i,className:l,onExited:c}=e,u=Jl(e,rvt),d=Rmt(),p=Omt(),h=(e=>{const{classes:t}=e;return rs({root:["menu"]},Emt,t)})(p),f=evt(),m=s.useRef(null);ni(()=>{r?m.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(m.current?.focus?.(),m.current=null)},[r]),s.useEffect(()=>{const e=r?"menuOpen":"menuClose";d.current.publishEvent(e,{target:o})},[d,r,o]);return t.jsx(ovt,S({as:p.slots.basePopper,className:za(h.root,l,f),ownerState:p,open:r,target:o,transition:!0,placement:i,onClickAway:e=>{e.target&&(o===e.target||o?.contains(e.target))||n(e)},onExited:c,clickAwayMouseEvent:"onMouseDown",onKeyDown:e=>{Ygt(e.key)&&n(e)}},u,p.slotProps?.basePopper,{children:a}))}"production"!==process.env.NODE_ENV&&(nvt.propTypes={children:Ro.exports.node,className:Ro.exports.string,onClose:Ro.exports.func.isRequired,onExited:Ro.exports.func,open:Ro.exports.bool.isRequired,position:Ro.exports.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),target:Vd});const avt=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"];function ivt(e){const{colDef:r,id:o,hasFocus:n,tabIndex:a,position:i="bottom-end",focusElementRef:l}=e,c=Jl(e,avt),[u,d]=s.useState(-1),[p,h]=s.useState(!1),f=Rmt(),m=s.useRef(null),y=s.useRef(null),g=s.useRef(!1),v=s.useRef({}),x=Ni(),b=Li(),w=Li(),k=Omt();if(!(e=>"function"==typeof e.getActions)(r))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const _=r.getActions(f.current.getRowParams(o)),C=_.filter(e=>!e.props.showInMenu),M=_.filter(e=>e.props.showInMenu),D=C.length+(M.length?1:0);s.useLayoutEffect(()=>{n||Object.entries(v.current).forEach(([e,t])=>{t?.stop({},()=>{delete v.current[e]})})},[n]),s.useEffect(()=>{if(u<0||!m.current)return;if(u>=m.current.children.length)return;m.current.children[u].focus({preventScroll:!0})},[u]),s.useEffect(()=>{n||(d(-1),g.current=!1)},[n]),s.useImperativeHandle(l,()=>({focus(){if(!g.current){const e=_.findIndex(e=>!e.props.disabled);d(e)}}}),[_]),s.useEffect(()=>{u>=D&&d(D-1)},[u,D]);const O=()=>{h(!1)},P=e=>t=>{v.current[e]=t},E=(e,t)=>r=>{d(e),g.current=!0,t&&t(r)};return t.jsxs("div",S({role:"menu",ref:m,tabIndex:-1,className:jmt.actionsCell,onKeyDown:e=>{if(D<=1)return;const t=(e,r)=>{if(e<0||e>_.length)return e;const o=("left"===r?-1:1)*(x?-1:1);return _[e+o]?.props.disabled?t(e+o,r):e+o};let r=u;"ArrowRight"===e.key?r=t(u,"right"):"ArrowLeft"===e.key&&(r=t(u,"left")),r<0||r>=D||r!==u&&(e.preventDefault(),e.stopPropagation(),d(r))}},c,{children:[C.map((e,t)=>s.cloneElement(e,{key:t,touchRippleRef:P(t),onClick:E(t,e.props.onClick),tabIndex:u===t?a:-1})),M.length>0&&w&&t.jsx(k.slots.baseIconButton,S({ref:y,id:w,"aria-label":f.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?b:void 0,role:"menuitem",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),p?O():(h(!0),d(D-1),g.current=!0)},touchRippleRef:P(w),tabIndex:u===C.length?a:-1},k.slotProps?.baseIconButton,{children:t.jsx(k.slots.moreActionsIcon,{fontSize:"small"})})),M.length>0&&t.jsx(nvt,{open:p,target:y.current,position:i,onClose:O,children:t.jsx(k.slots.baseMenuList,{id:b,className:jmt.menuList,"aria-labelledby":w,autoFocusItem:!0,children:M.map((e,t)=>s.cloneElement(e,{key:t,closeMenu:O}))})})]}))}"production"!==process.env.NODE_ENV&&(ivt.propTypes={api:Ro.exports.object,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:Ro.exports.shape({focus:Ro.exports.func.isRequired})})]),formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,position:Ro.exports.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const svt=e=>t.jsx(ivt,S({},e));"production"!==process.env.NODE_ENV&&(svt.displayName="renderActionsCell");const lvt="actions",cvt=S({},Ugt,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:svt,getApplyQuickFilterFn:()=>null}),uvt="auto-generated-group-node-root",dvt=Symbol("mui.id_autogenerated"),pvt=()=>({type:"group",id:uvt,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});const hvt=(e,t,r)=>{const o=t?t(e):e.id;return function(e,t,r="A row was provided without id in the rows prop:"){if(null==e)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",r,JSON.stringify(t)].join("\n"))}(o,e,r),o},fvt=({rows:e,getRowId:t,loading:r,rowCount:o})=>{const n={type:"full",rows:[]},a={};for(let i=0;i<e.length;i+=1){const r=e[i],o=hvt(r,t);a[o]=r,n.rows.push(o)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:r,rowCountPropBeforePartialUpdates:o,updates:n,dataRowIdToModelLookup:a}},mvt=({tree:e,rowCountProp:t=0})=>{const r=e[uvt];return Math.max(t,r.children.length+(null==r.footerId?0:1))},yvt=({apiRef:e,rowCountProp:t=0,loadingProp:r,previousTree:o,previousTreeDepths:n,previousGroupsToFetch:a})=>{const i=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u,groupsToFetch:d=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:o,previousTreeDepths:n,updates:i.updates,dataRowIdToModelLookup:i.dataRowIdToModelLookup,previousGroupsToFetch:a}),p=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIds:c,dataRowIdToModelLookup:i.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},S({},p,{totalRowCount:Math.max(t,p.dataRowIds.length),totalTopLevelRowCount:mvt({tree:p.tree,rowCountProp:t}),groupingName:u,loading:r,groupsToFetch:d})},gvt=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,vvt=(e,t,r,o)=>{const n=e[t];if("group"!==n.type)return[];const a=[];for(let i=0;i<n.children.length;i+=1){const t=n.children[i];if(r&&gvt(e[t])||a.push(t),o)continue;const s=vvt(e,t,r,o);for(let e=0;e<s.length;e+=1)a.push(s[e])}return r||null==n.footerId||a.push(n.footerId),a},xvt=({previousCache:e,getRowId:t,updates:r,groupKeys:o})=>{if("full"===e.updates.type)throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const n=new Map;r.forEach(e=>{const r=hvt(e,t,"A row was provided without id when calling updateRows():");n.has(r)?n.set(r,S({},n.get(r),e)):n.set(r,e)});const a={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:S({},e.updates.idToActionLookup),groupKeys:o},i=S({},e.dataRowIdToModelLookup),s={insert:{},modify:{},remove:{}};n.forEach((e,t)=>{const r=a.idToActionLookup[t];if("delete"===e._action){if("remove"===r||!i[t])return;return null!=r&&(s[r][t]=!0),a.actions.remove.push(t),void delete i[t]}const o=i[t];if(o)return"remove"===r?(s.remove[t]=!0,a.actions.modify.push(t)):null==r&&a.actions.modify.push(t),void(i[t]=S({},o,e));"remove"===r?(s.remove[t]=!0,a.actions.insert.push(t)):null==r&&a.actions.insert.push(t),i[t]=e});const l=Object.keys(s);for(let c=0;c<l.length;c+=1){const e=l[c],t=s[e];Object.keys(t).length>0&&(a.actions[e]=a.actions[e].filter(e=>!t[e]))}return{dataRowIdToModelLookup:i,updates:a,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}},bvt="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function wvt(e,t,r){const o=[];return t.forEach(t=>{const n=hvt(t,r,"A row was provided without id when calling updateRows():"),a=wyt(e,n);if("pinnedRow"===a?.type){const r=e.current.caches.pinnedRows,o=r.idLookup[n];o&&(r.idLookup[n]=S({},o,t))}else o.push(t)}),o}let kvt=!1;const _vt=(e,t,r)=>"number"==typeof e&&e>0?e:("production"===process.env.NODE_ENV||kvt||null==e||(kvt=!0),t),Cvt=(["MUI X: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),["MUI X: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n"),"__tree_data_group__"),Mvt="__row_group_by_columns_group__",Svt="__detail_panel_toggle__";let Dvt=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const Ovt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"];function Pvt(e){const{value:r,rowNode:o}=e,n=Jl(e,Ovt),a=Rmt(),i=Omt(),l=(e=>{const{classes:t}=e;return rs({root:["booleanCell"]},Emt,t)})({classes:i.classes}),c=eyt(a,Myt)>0&&"group"===o.type&&!1===i.treeData,u=s.useMemo(()=>r?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,r]);return c&&void 0===r?null:t.jsx(u,S({fontSize:"small",className:l.root,titleAccess:a.current.getLocaleText(r?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(r)},n))}"production"!==process.env.NODE_ENV&&(Pvt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:Ro.exports.shape({focus:Ro.exports.func.isRequired})})]),formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,hideDescendantCount:Ro.exports.bool,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const Evt=s.memo(Pvt);"production"!==process.env.NODE_ENV&&(Evt.displayName="GridBooleanCell");const jvt=e=>e.field!==Mvt&&gvt(e.rowNode)?"":t.jsx(Evt,S({},e));"production"!==process.env.NODE_ENV&&(jvt.displayName="renderBooleanCell");const Tvt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function Nvt(e){const{id:r,value:o,field:n,className:a,hasFocus:i,onValueChange:l}=e,c=Jl(e,Tvt),u=Rmt(),d=s.useRef(null),p=Li(),[h,f]=s.useState(o),m=Omt(),y=(e=>{const{classes:t}=e;return rs({root:["editBooleanCell"]},Emt,t)})({classes:m.classes}),g=s.useCallback(async e=>{const t=e.target.checked;l&&await l(e,t),f(t),await u.current.setEditCellValue({id:r,field:n,value:t},e)},[u,n,r,l]);return s.useEffect(()=>{f(o)},[o]),ni(()=>{i&&d.current.focus()},[i]),t.jsx("label",S({htmlFor:p,className:za(y.root,a)},c,{children:t.jsx(m.slots.baseCheckbox,S({id:p,inputRef:d,checked:Boolean(h),onChange:g,size:"small"},m.slotProps?.baseCheckbox))}))}"production"!==process.env.NODE_ENV&&(Nvt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,changeReason:Ro.exports.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,isProcessingProps:Ro.exports.bool,isValidating:Ro.exports.bool,onValueChange:Ro.exports.func,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const Rvt=e=>t.jsx(Nvt,S({},e));"production"!==process.env.NODE_ENV&&(Rvt.displayName="renderEditBooleanCell");const Fvt=["item","applyValue","apiRef","focusElementRef","isFilterActive","headerFilterMenu","clearButton","tabIndex","slotProps"];function Ivt(e){const{item:r,applyValue:o,apiRef:n,focusElementRef:a,headerFilterMenu:i,clearButton:l,tabIndex:c,slotProps:u}=e,d=Jl(e,Fvt),[p,h]=s.useState(Avt(r.value)),f=Omt(),m=Li(),y=Li(),g=f.slotProps?.baseSelect||{},v=g.native??!1,x=f.slotProps?.baseSelectOption||{},b=s.useCallback(e=>{const t=Avt(e.target.value);h(t),o(S({},r,{value:t}))},[o,r]);s.useEffect(()=>{h(Avt(r.value))},[r.value]);const w=u?.root.label??n.current.getLocaleText("filterPanelInputLabel"),k=u?.root.slotProps;return t.jsxs(s.Fragment,{children:[t.jsxs(f.slots.baseSelect,S({fullWidth:!0,labelId:m,id:y,label:w,value:void 0===p?"":String(p),onChange:b,native:v,slotProps:{htmlInput:S({ref:a,tabIndex:c},k?.htmlInput)}},g,d,u?.root,{children:[t.jsx(f.slots.baseSelectOption,S({},x,{native:v,value:"",children:n.current.getLocaleText("filterValueAny")})),t.jsx(f.slots.baseSelectOption,S({},x,{native:v,value:"true",children:n.current.getLocaleText("filterValueTrue")})),t.jsx(f.slots.baseSelectOption,S({},x,{native:v,value:"false",children:n.current.getLocaleText("filterValueFalse")}))]})),i,l]})}function Avt(e){return"true"===String(e).toLowerCase()||"false"!==String(e).toLowerCase()&&void 0}"production"!==process.env.NODE_ENV&&(Ivt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:xu,headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number});const zvt=S({},Ugt,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:jvt,renderEditCell:Rvt,sortComparator:Iyt,valueFormatter:(e,t,r,o)=>e?o.current.getLocaleText("booleanCellTrueLabel"):o.current.getLocaleText("booleanCellFalseLabel"),filterOperators:[{value:"is",getApplyFilterFn:e=>{const t=Avt(e.value);return void 0===t?null:e=>Boolean(e)===t},InputComponent:Ivt}],getApplyQuickFilterFn:()=>null,aggregable:!1,pastedValueParser:e=>(e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}})(e)});function Lvt(e){for(const t in e)return!1;return!0}const Bvt=umt(e=>e.sorting),Vvt=lmt(Bvt,e=>e.sortedRows),$vt=cmt(Vvt,vyt,byt,(e,t,r)=>e.reduce((e,o)=>{const n=t[o];if(n)e.push({id:o,model:n});else{const t=r[o];t&&gvt(t)&&e.push({id:o,model:{[dvt]:o}})}return e},[])),Hvt=lmt(Bvt,e=>e.sortModel),qvt=cmt(Hvt,e=>{const t=e.reduce((t,r,o)=>(t[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},t),{});return t}),Wvt=cmt(Vvt,e=>e.reduce((e,t,r)=>(e[t]=r,e),Object.create(null))),Uvt=umt(e=>e.filter),Gvt=lmt(Uvt,e=>e.filterModel),Kvt=lmt(Gvt,e=>e.quickFilterValues),Yvt=umt(e=>e.visibleRowsLookup),Zvt=lmt(Uvt,e=>e.filteredRowsLookup),Xvt=lmt(Uvt,e=>e.filteredChildrenCountLookup),Qvt=lmt(Uvt,e=>e.filteredDescendantCountLookup),Jvt=cmt(Yvt,$vt,(e,t)=>Lvt(e)?t:t.filter(t=>!1!==e[t.id])),ext=cmt(Jvt,e=>e.map(e=>e.id)),txt=cmt(Zvt,$vt,(e,t)=>Lvt(e)?t:t.filter(t=>!1!==e[t.id])),rxt=cmt(txt,e=>e.map(e=>e.id)),oxt=cmt(ext,byt,(e,t)=>{const r={};let o=0;return e.reduce((e,n)=>{const a=t[n];return r[a.depth]||(r[a.depth]=0),a.depth>o&&(r[a.depth]=0),o=a.depth,r[a.depth]+=1,e[n]=r[a.depth],e},{})}),nxt=cmt(Jvt,byt,Myt,(e,t,r)=>r<2?e:e.filter(e=>0===t[e.id]?.depth)),axt=lmt(Jvt,e=>e.length),ixt=lmt(nxt,e=>e.length),sxt=lmt(txt,e=>e.length);lmt(sxt,ixt,(e,t)=>e-t);const lxt=cmt(Gvt,ggt,(e,t)=>e.items?.filter(e=>{if(!e.field)return!1;const r=t[e.field];if(!r?.filterOperators||0===r?.filterOperators?.length)return!1;const o=r.filterOperators.find(t=>t.value===e.operator);return!!o&&(!o.InputComponent||null!=e.value&&""!==e.value?.toString())})),cxt=cmt(lxt,e=>e.reduce((e,t)=>(e[t.field]?e[t.field].push(t):e[t.field]=[t],e),{})),uxt=umt(e=>e.rowSelection),dxt=cmt(uxt,tgt),pxt=lmt(uxt,sxt,(e,t)=>"include"===e.type?e.ids.size:t-e.ids.size),hxt=cmt(uxt,vyt,Syt,(e,t,r)=>{const o=new Map;if("include"===e.type)for(const n of e.ids)o.set(n,t[n]);else for(let n=0;n<r.length;n+=1){const a=r[n];e.ids.has(a)||o.set(a,t[a])}return o});function fxt(e,t){const r=byt(e),o=Vvt(e),n=Zvt(e),a=r[t];if(!a||"group"!==a.type)return[];const i=[],s=o.findIndex(e=>e===t)+1;for(let l=s;l<o.length&&r[o[l]]?.depth>a.depth;l+=1){const t=o[l];!1!==n[t]&&e.current.isRowSelectable(t)&&i.push(t)}return i}const mxt=lmt(byt,Zvt,dxt,(e,t,r,{groupId:o,autoSelectParents:n})=>{const a=e[o];if(!a||"group"!==a.type||r.has(o))return{isIndeterminate:!1,isChecked:r.has(o)};let i=!1,s=!1;const l=o=>{if(!1===t[o]||i&&s)return;const n=e[o];"group"===n?.type&&n.children.forEach(l),r.has(o)?i=!0:s=!0};return l(o),{isIndeterminate:i&&s,isChecked:!!n&&(i&&!s)}});function yxt(e){return e.signature===Tmt.DataGrid?e.checkboxSelection&&!0!==e.disableMultipleRowSelection:!e.disableMultipleRowSelection}const gxt=(e,t,r,o,n,a,i=dxt(e))=>{const s=Zvt(e),l=new Set([]);if((o||n)&&!1!==s[r]){if(o){const o=t[r];if("group"===o?.type){fxt(e,r).forEach(e=>{a(e),l.add(e)})}}if(n){const o=e=>{if(!i.has(e)&&!l.has(e))return!1;const r=t[e];return!!r&&("group"!==r.type||r.children.every(o))},n=r=>{const i=((e,t,r)=>{const o=e[r];if(!o)return[];const n=o.parent;return null==n?[]:e[n].children.filter(e=>e!==r&&!1!==t[e])})(t,s,r);if(0===i.length||i.every(o)){const o=t[r],i=o?.parent;null!=i&&i!==uvt&&e.current.isRowSelectable(i)&&(a(i),l.add(i),n(i))}};n(r)}}},vxt=(e,t,r,o,n,a)=>{const i=dxt(e);if(n||o){if(n){const e=((e,t)=>{const r=[];let o=t;for(;null!=o&&o!==uvt;){const t=e[o];if(!t)return r;r.push(o),o=t.parent}return r})(t,r);e.forEach(e=>{i.has(e)&&a(e)})}if(o){const o=t[r];if("group"===o?.type){fxt(e,r).forEach(e=>{a(e)})}}}},xxt=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],bxt=Smt(function(e,r){const{field:o,id:n,rowNode:a,tabIndex:i}=e,l=Jl(e,xxt),c=Rmt(),u=Omt(),d=(e=>{const{classes:t}=e;return rs({root:["checkboxInput"]},Emt,t)})({classes:u.classes});s.useLayoutEffect(()=>{if(0===i){const e=c.current.getCellElement(n,o);e&&(e.tabIndex=-1)}},[c,i,n,o]);const p=s.useCallback(e=>{" "===e.key&&e.stopPropagation()},[]),h=c.current.isRowSelectable(n),{isIndeterminate:f,isChecked:m}=eyt(c,mxt,{groupId:n,autoSelectParents:u.rowSelectionPropagation?.parents??!1});if("footer"===a.type||"pinnedRow"===a.type)return null;const y=c.current.getLocaleText(m&&!f?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return t.jsx(u.slots.baseCheckbox,S({tabIndex:i,checked:m&&!f,onChange:e=>{const t={value:e.target.checked,id:n};c.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:d.root,slotProps:{htmlInput:{"aria-label":y,name:"select_row"}},onKeyDown:p,indeterminate:f,disabled:!h},u.slotProps?.baseCheckbox,l,{ref:r}))});"production"!==process.env.NODE_ENV&&(bxt.displayName="GridCellCheckboxForwardRef"),"production"!==process.env.NODE_ENV&&(bxt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:Ro.exports.shape({focus:Ro.exports.func.isRequired})})]),formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const wxt=bxt,kxt=umt(e=>e.focus),_xt=lmt(kxt,e=>e.cell),Cxt=lmt(kxt,e=>e.columnHeader),Mxt=lmt(kxt,e=>e.columnHeaderFilter),Sxt=lmt(kxt,e=>e.columnGroupHeader),Dxt=umt(e=>e.tabIndex),Oxt=lmt(Dxt,e=>e.cell),Pxt=lmt(Dxt,e=>e.columnHeader),Ext=lmt(Dxt,e=>e.columnHeaderFilter),jxt=lmt(Dxt,e=>e.columnGroupHeader),Txt=(e,t,r)=>t>0&&e>0?Math.ceil(e/t):-1===e?r+2:0,Nxt=e=>({page:0,pageSize:e?0:100}),Rxt=(e,t)=>{if(t===Tmt.DataGrid&&e>100)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"))},Fxt=umt(e=>e.pagination),Ixt=lmt(Fxt,e=>e.enabled&&"client"===e.paginationMode),Axt=lmt(Fxt,e=>e.paginationModel),zxt=lmt(Fxt,e=>e.rowCount),Lxt=lmt(Fxt,e=>e.meta),Bxt=lmt(Axt,e=>e.page),Vxt=lmt(Axt,e=>e.pageSize),$xt=lmt(Axt,zxt,(e,t)=>Txt(t,e.pageSize,e.page)),Hxt=cmt(Ixt,Axt,byt,Myt,Jvt,nxt,(e,t,r,o,n,a)=>{if(!e)return null;const i=a.length,s=Math.min(t.pageSize*t.page,i-1),l=-1===t.pageSize?i-1:Math.min(s+t.pageSize-1,i-1);if(-1===s||-1===l)return null;if(o<2)return{firstRowIndex:s,lastRowIndex:l};const c=a[s],u=l-s+1,d=n.findIndex(e=>e.id===c.id);let p=d,h=0;for(;p<n.length&&h<=u;){const e=n[p],t=r[e.id]?.depth;void 0===t?p+=1:((h<u||t>0)&&(p+=1),0===t&&(h+=1))}return{firstRowIndex:d,lastRowIndex:p-1}}),qxt=cmt(Jvt,Hxt,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),Wxt=cmt(ext,Hxt,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),Uxt=cmt(Ixt,Hxt,qxt,Jvt,(e,t,r,o)=>e?{rows:r,range:t,rowIdToIndexMap:r.reduce((e,t,r)=>(e.set(t.id,r),e),new Map)}:{rows:o,range:0===o.length?null:{firstRowIndex:0,lastRowIndex:o.length-1},rowIdToIndexMap:o.reduce((e,t,r)=>(e.set(t.id,r),e),new Map)}),Gxt=["field","colDef"],Kxt=Smt(function(e,r){const o=Jl(e,Gxt),[,n]=s.useState(!1),a=Rmt(),i=Omt(),l=(e=>{const{classes:t}=e;return rs({root:["checkboxInput"]},Emt,t)})({classes:i.classes}),c=eyt(a,Pxt),u=eyt(a,uxt),d=eyt(a,ext),p=eyt(a,Wxt),h=s.useMemo(()=>{const e=i.isRowSelectable;if("function"!=typeof e)return u;if("exclude"===u.type)return u;const t={type:"include",ids:new Set};for(const r of u.ids)i.keepNonExistentRowsSelected&&t.ids.add(r),a.current.getRow(r)&&e(a.current.getRowParams(r))&&t.ids.add(r);return t},[a,i.isRowSelectable,i.keepNonExistentRowsSelected,u]),f=s.useMemo(()=>{const e=i.pagination&&i.checkboxSelectionVisibleOnly&&"server"!==i.paginationMode?p:d,t=new Set;for(let r=0;r<e.length;r+=1){const o=e[r];a.current.getRow(o)&&(a.current.isRowSelectable(o)&&t.add(o))}return t},[a,i.pagination,i.paginationMode,i.checkboxSelectionVisibleOnly,p,d]),m=s.useMemo(()=>{const e=tgt(h);let t=0;for(const r of f)e.has(r)&&(t+=1);return t},[h,f]),y=s.useMemo(()=>{if(0===h.ids.size)return!1;const e=tgt(h);for(const t of f)if(!e.has(t))return!0;return!1},[h,f]),g=m>0,v=null!==c&&c.field===e.field?0:-1;s.useLayoutEffect(()=>{const t=a.current.getColumnHeaderElement(e.field);0===v&&t&&(t.tabIndex=-1)},[v,a,e.field]);const x=s.useCallback(e=>{" "===e.key&&a.current.publishEvent("headerSelectionCheckboxChange",{value:!g})},[a,g]),b=s.useCallback(()=>{n(e=>!e)},[]);s.useEffect(()=>a.current.subscribeEvent("rowSelectionChange",b),[a,b]);const w=a.current.getLocaleText(g&&!y?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return t.jsx(i.slots.baseCheckbox,S({indeterminate:y,checked:g&&!y,onChange:e=>{const t={value:e.target.checked};a.current.publishEvent("headerSelectionCheckboxChange",t)},className:l.root,slotProps:{htmlInput:{"aria-label":w,name:"select_all_rows"}},tabIndex:v,onKeyDown:x,disabled:!yxt(i)},i.slotProps?.baseCheckbox,o,{ref:r}))});"production"!==process.env.NODE_ENV&&(Kxt.displayName="GridHeaderCheckbox"),"production"!==process.env.NODE_ENV&&(Kxt.propTypes={colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired});const Yxt=umt((e,t)=>dvt in t?t[dvt]:e.props.getRowId?e.props.getRowId(t):t.id),Zxt="__check__",Xxt=S({},zvt,{type:"custom",field:Zxt,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:()=>null,display:"flex",valueGetter:(e,t,r,o)=>{const n=Yxt(o,t);return o.current.isRowSelected(n)},renderHeader:e=>t.jsx(Kxt,S({},e)),renderCell:e=>t.jsx(wxt,S({},e))}),Qxt=["item","applyValue","type","apiRef","focusElementRef","slotProps","isFilterActive","headerFilterMenu","clearButton","tabIndex","disabled"];function Jxt(e,t){if(null==e)return"";const r=new Date(e);return Number.isNaN(r.getTime())?"":"date"===t?r.toISOString().substring(0,10):"datetime-local"===t?(r.setMinutes(r.getMinutes()-r.getTimezoneOffset()),r.toISOString().substring(0,19)):r.toISOString().substring(0,10)}function ebt(e){const{item:r,applyValue:o,type:n,apiRef:a,focusElementRef:i,slotProps:l,headerFilterMenu:c,clearButton:u,tabIndex:d,disabled:p}=e,h=Jl(e,Qxt),f=l?.root.slotProps,m=zc(),[y,g]=s.useState(()=>Jxt(r.value,n)),[v,x]=s.useState(!1),b=Li(),w=Omt(),k=s.useCallback(e=>{m.clear();const t=e.target.value;g(t),x(!0),m.start(w.filterDebounceMs,()=>{const e=new Date(t);o(S({},r,{value:Number.isNaN(e.getTime())?void 0:e})),x(!1)})},[o,r,w.filterDebounceMs,m]);return s.useEffect(()=>{const e=Jxt(r.value,n);g(e)},[r.value,n]),t.jsxs(s.Fragment,{children:[t.jsx(w.slots.baseTextField,S({fullWidth:!0,id:b,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),value:y,onChange:k,type:n||"text",disabled:p,inputRef:i,slotProps:S({},f,{input:S({endAdornment:v?t.jsx(w.slots.loadIcon,{fontSize:"small",color:"action"}):null},f?.input),htmlInput:S({max:"datetime-local"===n?"9999-12-31T23:59":"9999-12-31",tabIndex:d},f?.htmlInput)})},w.slotProps?.baseTextField,h,l?.root)),c,u]})}function tbt(e,t,r,o){if(!e.value)return null;const n=new Date(e.value);r?n.setSeconds(0,0):(n.setMinutes(n.getMinutes()+n.getTimezoneOffset()),n.setHours(0,0,0,0));const a=n.getTime();return e=>{if(!e)return!1;if(o)return t(e.getTime(),a);const n=new Date(e);return r?n.setSeconds(0,0):n.setHours(0,0,0,0),t(n.getTime(),a)}}"production"!==process.env.NODE_ENV&&(ebt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number,type:Ro.exports.oneOf(["date","datetime-local"])});const rbt=e=>[{value:"is",getApplyFilterFn:t=>tbt(t,(e,t)=>e===t,e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>tbt(t,(e,t)=>e!==t,e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>tbt(t,(e,t)=>e>t,e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>tbt(t,(e,t)=>e>=t,e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>tbt(t,(e,t)=>e<t,e,!e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFn:t=>tbt(t,(e,t)=>e<=t,e),InputComponent:ebt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1}],obt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange","slotProps"],nbt=gl(nyt)({fontSize:"inherit"});function abt(e){const{id:r,value:o,field:n,colDef:a,hasFocus:i,onValueChange:l,slotProps:c}=e,u=Jl(e,obt),d="dateTime"===a.type,p=Rmt(),h=s.useRef(null),f=s.useMemo(()=>{let e,t;if(e=null==o?null:o instanceof Date?o:new Date((o??"").toString()),null==e||Number.isNaN(e.getTime()))t="";else{t=new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,d?16:10)}return{parsed:e,formatted:t}},[o,d]),[m,y]=s.useState(f),g=Omt(),v=(e=>{const{classes:t}=e;return rs({root:["editInputCell"]},Emt,t)})({classes:g.classes}),x=s.useCallback(e=>{if(""===e)return null;const[t,r]=e.split("T"),[o,n,a]=t.split("-"),i=new Date;if(i.setFullYear(Number(o),Number(n)-1,Number(a)),i.setHours(0,0,0,0),r){const[e,t]=r.split(":");i.setHours(Number(e),Number(t),0,0)}return i},[]),b=s.useCallback(async e=>{const t=e.target.value,o=x(t);l&&await l(e,o),y({parsed:o,formatted:t}),p.current.setEditCellValue({id:r,field:n,value:o},e)},[p,n,r,l,x]);return s.useEffect(()=>{y(e=>f.parsed!==e.parsed&&f.parsed?.getTime()!==e.parsed?.getTime()?f:e)},[f]),ni(()=>{i&&h.current.focus()},[i]),t.jsx(nbt,S({as:g.slots.baseInput,inputRef:h,fullWidth:!0,className:v.root,type:d?"datetime-local":"date",value:m.formatted,onChange:b},u,c?.root,{slotProps:{htmlInput:S({max:d?"9999-12-31T23:59":"9999-12-31"},c?.root?.slotProps?.htmlInput)}}))}"production"!==process.env.NODE_ENV&&(abt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,changeReason:Ro.exports.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,isEditable:Ro.exports.bool,isProcessingProps:Ro.exports.bool,isValidating:Ro.exports.bool,onValueChange:Ro.exports.func,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,slotProps:Ro.exports.object,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const ibt=e=>t.jsx(abt,S({},e));function sbt({value:e,columnType:t,rowId:r,field:o}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${r}, field: "${o}".`].join("\n"))}"production"!==process.env.NODE_ENV&&(ibt.displayName="renderEditDateCell");const lbt=S({},Ugt,{type:"date",sortComparator:Ayt,valueFormatter:(e,t,r,o)=>{if(!e)return"";return sbt({value:e,columnType:"date",rowId:Yxt(o,t),field:r.field}),e.toLocaleDateString()},filterOperators:rbt(),renderEditCell:ibt,pastedValueParser:e=>new Date(e)}),cbt=S({},Ugt,{type:"dateTime",sortComparator:Ayt,valueFormatter:(e,t,r,o)=>{if(!e)return"";return sbt({value:e,columnType:"dateTime",rowId:Yxt(o,t),field:r.field}),e.toLocaleString()},filterOperators:rbt(!0),renderEditCell:ibt,pastedValueParser:e=>new Date(e)}),ubt=e=>null==e?null:Number(e),dbt=S({},Ugt,{type:"number",align:"right",headerAlign:"right",sortComparator:Iyt,valueParser:e=>""===e?null:Number(e),valueFormatter:e=>Vyt(e)?e.toLocaleString():e||"",filterOperators:[{value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>ubt(t)===e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>ubt(t)!==e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ubt(t)>e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ubt(t)>=e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ubt(t)<e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ubt(t)<=e.value,InputComponent:Lyt,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:Kyt,InputComponentProps:{type:"number"}}],getApplyQuickFilterFn:e=>null==e||Number.isNaN(e)||""===e?null:t=>ubt(t)===ubt(e)});function pbt(e){return"singleSelect"===e?.type}function hbt(e,t){if(e)return"function"==typeof e.valueOptions?e.valueOptions(S({field:e.field},t)):e.valueOptions}function fbt(e,t,r){if(void 0===t)return;const o=t.find(t=>{const o=r(t);return String(o)===String(e)});return r(o)}const mbt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","slotProps"];function ybt(r){const o=Omt(),{id:n,value:a,field:i,row:l,colDef:c,hasFocus:u,error:d,onValueChange:p,initialOpen:h=o.editMode===Yyt.Cell,slotProps:f}=r,m=Jl(r,mbt),y=Rmt(),g=s.useRef(null),v=s.useRef(null),[x,b]=s.useState(h),w=(o.slotProps?.baseSelect||{}).native??!1;if(ni(()=>{u&&v.current?.focus()},[u]),!pbt(c))return null;const k=hbt(c,{id:n,row:l});if(!k)return null;const _=c.getOptionValue,C=c.getOptionLabel;return k&&c?t.jsx(o.slots.baseSelect,S({ref:g,value:a,onChange:async e=>{if(!pbt(c)||!k)return;b(!1);const t=fbt(e.target.value,k,_);p&&await p(e,t),await y.current.setEditCellValue({id:n,field:i,value:t},e)},open:x,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||b(!0)},onClose:(e,t)=>{if(o.editMode!==Yyt.Row){if("backdropClick"===t||"Escape"===e.key){const t=y.current.getCellParams(n,i);y.current.publishEvent("cellEditStop",S({},t,{reason:"Escape"===e.key?ogt.escapeKeyDown:ogt.cellFocusOut}))}}else b(!1)},error:d,native:w,fullWidth:!0,slotProps:{htmlInput:{ref:v}}},m,f?.root,o.slotProps?.baseSelect,{children:k.map(t=>{const r=_(t);return e.createElement(o.slots.baseSelectOption,S({},o.slotProps?.baseSelectOption||{},{native:w,key:r,value:r}),C(t))})})):null}"production"!==process.env.NODE_ENV&&(ybt.propTypes={api:Ro.exports.object.isRequired,cellMode:Ro.exports.oneOf(["edit","view"]).isRequired,changeReason:Ro.exports.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:Ro.exports.object.isRequired,field:Ro.exports.string.isRequired,formattedValue:Ro.exports.any,hasFocus:Ro.exports.bool.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,initialOpen:Ro.exports.bool,isEditable:Ro.exports.bool,isProcessingProps:Ro.exports.bool,isValidating:Ro.exports.bool,onValueChange:Ro.exports.func,row:Ro.exports.any.isRequired,rowNode:Ro.exports.object.isRequired,tabIndex:Ro.exports.oneOf([-1,0]).isRequired,value:Ro.exports.any});const gbt=e=>t.jsx(ybt,S({},e));"production"!==process.env.NODE_ENV&&(gbt.displayName="renderEditSingleSelectCell");const vbt=["item","applyValue","type","apiRef","focusElementRef","tabIndex","isFilterActive","clearButton","headerFilterMenu","slotProps"],xbt=({column:t,OptionComponent:r,getOptionLabel:o,getOptionValue:n,isSelectNative:a,baseSelectOptionProps:i})=>["",...hbt(t)||[]].map(t=>{const s=n(t);let l=o(t);return""===l&&(l=" "),e.createElement(r,S({},i,{native:a,key:s,value:s}),l)});function bbt(e){const{item:r,applyValue:o,type:n,apiRef:a,focusElementRef:i,tabIndex:l,clearButton:c,headerFilterMenu:u,slotProps:d}=e,p=Jl(e,vbt),h=r.value??"",f=Li(),m=Li(),y=Omt(),g=y.slotProps?.baseSelect?.native??!1;let v=null;if(r.field){const e=a.current.getColumn(r.field);pbt(e)&&(v=e)}const x=v?.getOptionValue,b=v?.getOptionLabel,w=s.useMemo(()=>hbt(v),[v]),k=s.useCallback(e=>{let t=e.target.value;t=fbt(t,w,x),o(S({},r,{value:t}))},[w,x,o,r]);if(!pbt(v))return null;const _=d?.root.label??a.current.getLocaleText("filterPanelInputLabel");return t.jsxs(s.Fragment,{children:[t.jsx(y.slots.baseSelect,S({fullWidth:!0,id:f,label:_,labelId:m,value:h,onChange:k,slotProps:{htmlInput:S({tabIndex:l,ref:i,type:n||"text",placeholder:d?.root.placeholder??a.current.getLocaleText("filterPanelInputPlaceholder")},d?.root.slotProps?.htmlInput)},native:g},y.slotProps?.baseSelect,p,d?.root,{children:xbt({column:v,OptionComponent:y.slots.baseSelectOption,getOptionLabel:b,getOptionValue:x,isSelectNative:g,baseSelectOptionProps:y.slotProps?.baseSelectOption})})),u,c]})}"production"!==process.env.NODE_ENV&&(bbt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number,type:Ro.exports.oneOf(["singleSelect"])});const wbt=["item","applyValue","type","apiRef","focusElementRef","slotProps"];function kbt(e){const{item:r,applyValue:o,type:n,apiRef:a,focusElementRef:i,slotProps:l}=e,c=Jl(e,wbt),u=Li(),d=Omt();let p=null;if(r.field){const e=a.current.getColumn(r.field);pbt(e)&&(p=e)}const h=p?.getOptionValue,f=p?.getOptionLabel,m=s.useCallback((e,t)=>h(e)===h(t),[h]),y=s.useMemo(()=>hbt(p)||[],[p]),g=s.useMemo(()=>Array.isArray(r.value)?r.value.reduce((e,t)=>{const r=y.find(e=>h(e)===t);return null!=r&&e.push(r),e},[]):[],[h,r.value,y]),v=s.useCallback((e,t)=>{o(S({},r,{value:t.map(h)}))},[o,r,h]),x=d.slots.baseAutocomplete;return t.jsx(x,S({multiple:!0,options:y,isOptionEqualToValue:m,id:u,value:g,onChange:v,getOptionLabel:f,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:n||"text",inputRef:i}}},c,l?.root))}"production"!==process.env.NODE_ENV&&(kbt.propTypes={apiRef:Ro.exports.shape({current:Ro.exports.object.isRequired}).isRequired,applyValue:Ro.exports.func.isRequired,className:Ro.exports.string,clearButton:Ro.exports.node,disabled:Ro.exports.bool,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),headerFilterMenu:Ro.exports.node,inputRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:Ro.exports.bool,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,onBlur:Ro.exports.func,onFocus:Ro.exports.func,slotProps:Ro.exports.object,tabIndex:Ro.exports.number,type:Ro.exports.oneOf(["singleSelect"])});const _bt=e=>null!=e&&$yt(e)?e.value:e,Cbt=S({},Ugt,{type:"singleSelect",getOptionLabel:e=>$yt(e)?e.label:String(e),getOptionValue:e=>$yt(e)?e.value:e,valueFormatter(e,t,r,o){const n=Yxt(o,t);if(!pbt(r))return"";const a=hbt(r,{id:n,row:t});if(null==e)return"";if(!a)return e;if(!(e=>"object"==typeof e[0])(a))return r.getOptionLabel(e);const i=a.find(t=>r.getOptionValue(t)===e);return i?r.getOptionLabel(i):""},renderEditCell:gbt,filterOperators:[{value:"is",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>_bt(t)===_bt(e.value),InputComponent:bbt},{value:"not",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>_bt(t)!==_bt(e.value),InputComponent:bbt},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(_bt);return e=>t.includes(_bt(e))},InputComponent:kbt}],pastedValueParser:(e,t,r)=>{const o=r,n=hbt(o)||[],a=o.getOptionValue,i=n.find(t=>a(t)===e);if(i)return e}}),Mbt=umt(e=>e.headerFiltering),Sbt=lmt(Mbt,e=>e?.enabled??!1),Dbt=lmt(Mbt,e=>e.editing),Obt=lmt(Mbt,e=>e.menuOpen),Pbt=umt(e=>e.columnGrouping),Ebt=cmt(Pbt,e=>e?.unwrappedGroupingModel??{}),jbt=cmt(Pbt,e=>e?.lookup??{}),Tbt=cmt(Pbt,e=>e?.headerStructure??[]),Nbt=lmt(Pbt,e=>e?.maxDepth??0),Rbt=["maxWidth","minWidth","width","flex"],Fbt={string:Ugt,number:dbt,date:lbt,dateTime:cbt,boolean:zvt,singleSelect:Cbt,[lvt]:cvt,custom:Ugt};const Ibt=(e,t)=>{const r={};let o=0,n=0;const a=[];e.orderedFields.forEach(t=>{let i=e.lookup[t],s=0,l=!1;!1!==e.columnVisibilityModel[t]&&(i.flex&&i.flex>0?(o+=i.flex,l=!0):s=qyt(i.width||Ugt.width,i.minWidth||Ugt.minWidth,i.maxWidth||Ugt.maxWidth),n+=s),i.computedWidth!==s&&(i=S({},i,{computedWidth:s})),l&&a.push(i),r[t]=i});const i=void 0===t?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(i-n,0);if(o>0&&i>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:r}){const o=new Set(r.map(e=>e.field)),n={all:{},frozenFields:[],freeze:e=>{const t=n.all[e];t&&!0!==t.frozen&&(n.all[e].frozen=!0,n.frozenFields.push(e))}};return function a(){if(n.frozenFields.length===o.size)return;const i={min:{},max:{}};let s=e,l=t,c=0;n.frozenFields.forEach(e=>{s-=n.all[e].computedWidth,l-=n.all[e].flex});for(let e=0;e<r.length;e+=1){const t=r[e];if(n.all[t.field]&&!0===n.all[t.field].frozen)continue;let o=s/l*t.flex;o<t.minWidth?(c+=t.minWidth-o,o=t.minWidth,i.min[t.field]=!0):o>t.maxWidth&&(c+=t.maxWidth-o,o=t.maxWidth,i.max[t.field]=!0),n.all[t.field]={frozen:!1,computedWidth:o,flex:t.flex}}c<0?Object.keys(i.max).forEach(e=>{n.freeze(e)}):c>0?Object.keys(i.min).forEach(e=>{n.freeze(e)}):r.forEach(({field:e})=>{n.freeze(e)}),a()}(),n.all}({initialFreeSpace:s,totalFlexUnits:o,flexColumns:a});Object.keys(e).forEach(t=>{r[t]=S({},r[t],{computedWidth:e[t].computedWidth})})}return S({},e,{lookup:r})};function Abt(e){let t=Fbt.string;return e&&Fbt[e]&&(t=Fbt[e]),t}const zbt=({apiRef:e,columnsToUpsert:t,initialState:r,columnVisibilityModel:o=xgt(e),keepOnlyColumnsToUpsert:n=!1,updateInitialVisibilityModel:a=!1})=>{const i=!e.current.state.columns;let s;if(i)s={orderedFields:[],lookup:{},columnVisibilityModel:o,initialColumnVisibilityModel:o};else{const t=mgt(e);s={orderedFields:n?[]:[...t.orderedFields],lookup:S({},t.lookup),columnVisibilityModel:o,initialColumnVisibilityModel:a?o:t.initialColumnVisibilityModel}}const l={};if(n&&!i)for(const u in s.lookup)Object.prototype.hasOwnProperty.call(s.lookup,u)&&(l[u]=!1);t.forEach(e=>{const{field:t}=e;l[t]=!0;let r=s.lookup[t];null==r?(r=S({},Abt(e.type),{field:t,hasBeenResized:!1}),s.orderedFields.push(t)):n&&s.orderedFields.push(t),r&&r.type!==e.type&&(r=S({},Abt(e.type),{field:t}));let o=r.hasBeenResized;Rbt.forEach(t=>{void 0!==e[t]&&(o=!0,-1===e[t]&&(e[t]=1/0))}),s.lookup[t]=ti(r,S({},Abt(e.type),e,{hasBeenResized:o}))}),n&&!i&&Object.keys(s.lookup).forEach(e=>{l[e]||delete s.lookup[e]});const c=((e,t)=>{if(!t)return e;const{orderedFields:r=[],dimensions:o={}}=t,n=Object.keys(o);if(0===n.length&&0===r.length)return e;const a={},i=[];for(let c=0;c<r.length;c+=1){const t=r[c];e.lookup[t]&&(a[t]=!0,i.push(t))}const s=0===i.length?e.orderedFields:[...i,...e.orderedFields.filter(e=>!a[e])],l=S({},e.lookup);for(let c=0;c<n.length;c+=1){const e=n[c],t=S({},l[e],{hasBeenResized:!0});Object.entries(o[e]).forEach(([e,r])=>{t[e]=-1===r?1/0:r}),l[e]=t}return S({},e,{orderedFields:s,lookup:l})})(e.current.unstable_applyPipeProcessors("hydrateColumns",s),r);return Ibt(c,e.current.getRootDimensions?.()??void 0)};function Lbt(e,t){if(t.listView)return 0;const r=oyt(e),o=Nbt(e),n=Sbt(e);return Math.floor(t.columnHeaderHeight*r)+Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*r)*o+(n?Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*r):0)}const Bbt=umt(e=>e.rowsMeta),Vbt=ei("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${jmt["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${jmt["scrollArea--right"]}`]:t["scrollArea--right"]},{[`&.${jmt["scrollArea--up"]}`]:t["scrollArea--up"]},{[`&.${jmt["scrollArea--down"]}`]:t["scrollArea--down"]},t.scrollArea]})(()=>({position:"absolute",zIndex:101,[`&.${jmt["scrollArea--left"]}`]:{top:0,left:0,width:20,bottom:0},[`&.${jmt["scrollArea--right"]}`]:{top:0,right:0,width:20,bottom:0},[`&.${jmt["scrollArea--up"]}`]:{top:0,left:0,right:0,height:20},[`&.${jmt["scrollArea--down"]}`]:{bottom:0,left:0,right:0,height:20}})),$bt=lmt(pmt,(e,t)=>"left"===t?e.leftPinnedWidth:"right"===t?e.rightPinnedWidth+(e.hasScrollX?e.scrollbarSize:0):0);function Hbt(e){const{scrollDirection:r,scrollPosition:o}=e,n=s.useRef(null),a=Rmt(),i=zc(),l=eyt(a,oyt),c=eyt(a,hmt),u=eyt(a,$bt,r),d=Omt(),p=Lbt(a,d),h=Math.floor(d.columnHeaderHeight*l),f=S({height:h,top:p-h},"left"===r?{left:u}:{},"right"===r?{right:u}:{}),m=ql(e=>{let t;if(e.preventDefault(),"left"===r)t=e.clientX-n.current.getBoundingClientRect().right;else{if("right"!==r)throw new Error("MUI X: Wrong drag direction");t=Math.max(1,e.clientX-n.current.getBoundingClientRect().left)}t=1.5*(t-1)+1,i.start(0,()=>{a.current.scroll({left:o.current.left+t,top:o.current.top})})});return t.jsx(Wbt,S({},e,{ref:n,getCanScrollMore:()=>{const e=pmt(a);if("left"===r)return o.current.left>0;if("right"===r){const t=c-e.viewportInnerSize.width;return o.current.left<t}return!1},style:f,handleDragOver:m}))}function qbt(e){const{scrollDirection:r,scrollPosition:o}=e,n=s.useRef(null),a=Rmt(),i=zc(),l=eyt(a,Bbt),c=Omt(),u=Lbt(a,c),d={top:"up"===r?u:void 0,bottom:"down"===r?0:void 0},p=ql(e=>{let t;if(e.preventDefault(),"up"===r)t=e.clientY-n.current.getBoundingClientRect().bottom;else{if("down"!==r)throw new Error("MUI X: Wrong drag direction");t=Math.max(1,e.clientY-n.current.getBoundingClientRect().top)}t=1.5*(t-1)+1,i.start(0,()=>{a.current.scroll({left:o.current.left,top:o.current.top+t})})});return t.jsx(Wbt,S({},e,{ref:n,getCanScrollMore:()=>{const e=pmt(a);if("up"===r)return o.current.top>0;if("down"===r){const t=(l.currentPageTotalHeight||0)-e.viewportInnerSize.height-(e.hasScrollX?e.scrollbarSize:0);return o.current.top<t}return!1},style:d,handleDragOver:p}))}const Wbt=Smt(function(e,r){const{scrollDirection:o,getCanScrollMore:n,style:a,handleDragOver:i}=e,l=Rmt(),[c,u]=s.useState(n),d=S({},Omt(),{scrollDirection:o}),p=(e=>{const{scrollDirection:t,classes:r}=e;return rs({root:["scrollArea",`scrollArea--${t}`]},Emt,r)})(d);return Bmt(l,"scrollPositionChange",()=>{u(n)}),c?t.jsx(Vbt,{ref:r,className:p.root,ownerState:d,onDragOver:i,style:a}):null});"production"!==process.env.NODE_ENV&&(Wbt.displayName="GridScrollAreaContent");const Ubt=G(function(e){const r=Rmt(),[o,n]=s.useState("none");return Bmt(r,"columnHeaderDragStart",()=>n("horizontal")),Bmt(r,"columnHeaderDragEnd",()=>n("none")),Bmt(r,"rowDragStart",()=>n("vertical")),Bmt(r,"rowDragEnd",()=>n("none")),"none"===o?null:"horizontal"===o?t.jsx(Hbt,S({},e)):t.jsx(qbt,S({},e))}),Gbt=s.createContext(void 0);function Kbt(){const e=s.useContext(Gbt);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}"production"!==process.env.NODE_ENV&&(Gbt.displayName="GridPrivateApiContext");const Ybt=()=>{};function Zbt(e,t,r){const o=s.useRef(!0);ni(()=>{o.current=!1,e.current.register(r,t)},[e,r,t]),o.current&&e.current.register(r,t)}function Xbt(e,t){const r=s.useRef(null);if(r.current)return r.current;const o=e.current.getLogger(t);return r.current=o,o}const Qbt=(e,t,r,o,n)=>{const a=Xbt(e,"useNativeEventListener");$mt(e,"rootMount",()=>{const e=t();if(e&&r)return a.debug(`Binding native ${r} event`),e.addEventListener(r,o,n),()=>{a.debug(`Clearing native ${r} event`),e.removeEventListener(r,o,n)}})},Jbt=e=>{const t=s.useRef(!0);t.current&&(t.current=!1,e())},ewt=(e,t)=>Uxt(e),twt=(e,t)=>eyt(e,Uxt),rwt=("undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"empty").includes("firefox"),owt=umt(e=>e.virtualization);lmt(owt,e=>e.enabled);const nwt=lmt(owt,e=>e.enabledForColumns),awt=lmt(owt,e=>e.enabledForRows),iwt=lmt(owt,e=>e.renderContext),swt=cmt(umt(e=>e.virtualization.renderContext.firstColumnIndex),umt(e=>e.virtualization.renderContext.lastColumnIndex),(e,t)=>({firstColumnIndex:e,lastColumnIndex:t})),lwt={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},cwt=(e,t)=>{const{disableVirtualization:r,autoHeight:o}=t;return S({},e,{virtualization:{enabled:!r,enabledForColumns:!r,enabledForRows:!r&&!o,renderContext:lwt}})};const uwt=umt(e=>e.rowSpanning),dwt=lmt(uwt,e=>e.hiddenCells),pwt=lmt(uwt,e=>e.spannedCells),hwt=lmt(uwt,e=>e.hiddenCellOriginMap),fwt=cmt(lmt(_xt,iwt,Uxt,wgt,(e,t,r,o)=>{if(!e)return!1;const n=r.rowIdToIndexMap.get(e.id),a=o.slice(t.firstColumnIndex,t.lastColumnIndex).findIndex(t=>t.field===e.field);return!(void 0!==n&&-1!==a&&n>=t.firstRowIndex&&n<=t.lastRowIndex)}),wgt,Uxt,_xt,(e,t,r,o)=>{if(!e)return null;const n=r.rowIdToIndexMap.get(o.id);if(void 0===n)return null;const a=t.findIndex(e=>e.field===o.field);return-1===a?null:S({},o,{rowIndex:n,columnIndex:a})});function mwt(e,t){return Math.round(e*10**t)/10**t}const ywt="undefined"!=typeof window&&/jsdom|HappyDOM/.test(window.navigator.userAgent);var gwt=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(gwt||{});const vwt={top:0,left:0},xwt=Object.freeze(new Map),bwt=()=>{const e=Kbt(),r=Omt(),{listView:o}=r,n=eyt(e,wgt),a=eyt(e,awt)&&!ywt,i=eyt(e,nwt)&&!ywt,l=eyt(e,Oyt),c=Mgt(e),u=l.bottom.length>0,[p,h]=s.useState(xwt),f=Ni(),m=eyt(e,dxt),y=twt(e),g=e.current.mainElementRef,v=e.current.virtualScrollerRef,x=e.current.virtualScrollbarVerticalRef,b=e.current.virtualScrollbarHorizontalRef,w=eyt(e,Egt),k=s.useRef(!1),_=eyt(e,fmt),C=eyt(e,mmt),M=eyt(e,hmt),D=eyt(e,wwt),O=eyt(e,_mt),P=eyt(e,vmt),E=s.useRef(null),j=s.useCallback(t=>{if(g.current=t,!t)return;const r=t.getBoundingClientRect();let o={width:mwt(r.width,1),height:mwt(r.height,1)};if((!E.current||o.width!==E.current.width&&o.height!==E.current.height)&&(E.current=o,e.current.publishEvent("resize",o)),"undefined"==typeof ResizeObserver)return;const n=new ResizeObserver(t=>{const r=t[0];if(!r)return;const n={width:mwt(r.contentRect.width,1),height:mwt(r.contentRect.height,1)};n.width===o.width&&n.height===o.height||(e.current.publishEvent("resize",n),o=n)});return n.observe(t),Mmt>=19?()=>{g.current=null,n.disconnect()}:void 0},[e,g]),T=s.useRef(r.initialState?.scroll??vwt),N=s.useRef(!1),R=s.useRef(vwt),F=s.useRef(lwt),I=eyt(e,iwt),A=eyt(e,fwt),z=zc(),L=s.useRef(void 0),B=Rc(()=>((e,t,r,o,n)=>({direction:gwt.NONE,buffer:Pwt(e,gwt.NONE,t,r,o,n)}))(f,r.rowBufferPx,r.columnBufferPx,15*_,300)).current,V=s.useCallback(t=>{if(Dwt(t,e.current.state.virtualization.renderContext))return;const r=t.firstRowIndex!==F.current.firstRowIndex||t.lastRowIndex!==F.current.lastRowIndex;e.current.setState(e=>S({},e,{virtualization:S({},e.virtualization,{renderContext:t})}));pmt(e).isReady&&r&&(F.current=t,e.current.publishEvent("renderedRowsIntervalChange",t)),R.current=T.current},[e]),$=ql(()=>{const t=v.current;if(!t)return;const o=pmt(e),n=Math.ceil(o.minimumSize.height-o.viewportOuterSize.height),s=Math.ceil(o.minimumSize.width-o.viewportInnerSize.width),l={top:qyt(t.scrollTop,0,n),left:f?qyt(t.scrollLeft,-s,0):qyt(t.scrollLeft,0,s)},c=l.left-T.current.left,u=l.top-T.current.top,p=0!==c||0!==u;T.current=l;const h=p?function(e,t){if(0===e&&0===t)return gwt.NONE;return Math.abs(t)>=Math.abs(e)?t>0?gwt.DOWN:gwt.UP:e>0?gwt.RIGHT:gwt.LEFT}(c,u):gwt.NONE,m=Math.abs(T.current.top-R.current.top),y=Math.abs(T.current.left-R.current.left),g=m>=_||y>=50,x=B.direction!==h;if(!(g||x))return I;if(x)switch(h){case gwt.NONE:case gwt.LEFT:case gwt.RIGHT:L.current=void 0;break;default:L.current=I}B.direction=h,B.buffer=Pwt(f,h,r.rowBufferPx,r.columnBufferPx,15*_,300);const b=_wt(kwt(e,r,a,i),T.current,B);return Dwt(b,I)||(d.flushSync(()=>{V(b)}),z.start(1e3,$)),b}),H=()=>{if(!pmt(e).isReady&&(a||i))return;const t=_wt(kwt(e,r,a,i),T.current,B);L.current=void 0,V(t)},q=ql(()=>{if(N.current)return void(N.current=!1);const t=$();e.current.publishEvent("scrollPositionChange",{top:T.current.top,left:T.current.left,renderContext:t})}),W=ql(t=>{e.current.publishEvent("virtualScrollerWheel",{},t)}),U=ql(t=>{e.current.publishEvent("virtualScrollerTouchMove",{},t)}),G=s.useMemo(()=>({overflowX:!D||o?"hidden":void 0,overflowY:r.autoHeight?"hidden":void 0}),[D,r.autoHeight,o]),K=s.useMemo(()=>{const e={width:D?M:"auto",flexBasis:C,flexShrink:0};return 0===e.flexBasis&&(e.flexBasis=bvt),e},[M,C,D]),Y=s.useCallback(t=>{t&&e.current.publishEvent("virtualScrollerContentSizeChange",{columnsTotalWidth:M,contentHeight:C})},[e,M,C]);return ni(()=>{k.current&&e.current.updateRenderContext?.()},[e,i,a]),ni(()=>{o&&(v.current.scrollLeft=0)},[o,v]),((e,t)=>{const r=s.useRef(!1);ni(()=>r.current||!e?Ybt:(r.current=!0,t()),[r.current||e])})(I!==lwt,()=>{if(e.current.publishEvent("scrollPositionChange",{top:T.current.top,left:T.current.left,renderContext:I}),k.current=!0,r.initialState?.scroll&&v.current){const t=v.current,{top:o,left:n}=r.initialState.scroll,a={top:!(o>0),left:!(n>0)};if(!a.left&&M&&(t.scrollLeft=n,N.current=!0,a.left=!0),!a.top&&C&&(t.scrollTop=o,N.current=!0,a.top=!0),!a.top||!a.left){const r=e.current.subscribeEvent("virtualScrollerContentSizeChange",e=>{!a.left&&e.columnsTotalWidth&&(t.scrollLeft=n,N.current=!0,a.left=!0),!a.top&&e.contentHeight&&(t.scrollTop=o,N.current=!0,a.top=!0),a.left&&a.top&&r()});return r}}}),e.current.register("private",{updateRenderContext:H}),$mt(e,"sortedRowsSet",H),$mt(e,"paginationModelChange",H),$mt(e,"columnsChange",H),{renderContext:I,setPanels:h,getRows:(o={})=>{if(!o.rows&&!y.range)return[];const a=byt(e);let i=I;o.renderContext&&(i=o.renderContext,i.firstColumnIndex=I.firstColumnIndex,i.lastColumnIndex=I.lastColumnIndex);const s=!u&&void 0===o.position||u&&"bottom"===o.position,d=void 0!==o.position;let h;switch(o.position){case"top":h=0;break;case"bottom":h=l.top.length+y.rows.length;break;case void 0:h=l.top.length}const f=o.rows??y.rows,g=i.firstRowIndex,v=Math.min(i.lastRowIndex,f.length),x=o.rows?Wyt(0,o.rows.length):Wyt(g,v);let b=-1;!d&&A&&(A.rowIndex<g&&(x.unshift(A.rowIndex),b=A.rowIndex),A.rowIndex>v&&(x.push(A.rowIndex),b=A.rowIndex));const k=[],_=r.slotProps?.row,C=Dgt(e);return x.forEach(l=>{const{id:u,model:g}=f[l];if(!a[u])return;const v=(y?.range?.firstRowIndex||0)+h+l;if(w){const t=c.left.length,r=n.length-c.right.length;e.current.calculateColSpan({rowId:u,minFirstColumn:t,maxLastColumn:r,columns:n}),c.left.length>0&&e.current.calculateColSpan({rowId:u,minFirstColumn:0,maxLastColumn:c.left.length,columns:n}),c.right.length>0&&e.current.calculateColSpan({rowId:u,minFirstColumn:n.length-c.right.length,maxLastColumn:n.length,columns:n})}const x=e.current.rowHasAutoHeight(u)?"auto":e.current.unstable_getRowHeight(u),D=m.has(u)&&e.current.isRowSelectable(u);let E=!1;void 0===o.position&&(E=0===l);let j=!1;const T=l===f.length-1;if(s)if(d)j=T;else{l===y.rows.length-1&&(j=!0)}let N=i;L.current&&l>=L.current.firstRowIndex&&l<L.current.lastRowIndex&&(N=L.current);const R=l===b,F=A?.rowIndex===v,I=Owt(C,N,c.left.length),z=T&&"top"===o.position,B=N.firstColumnIndex,V=N.lastColumnIndex;if(k.push(t.jsx(r.slots.row,S({row:g,rowId:u,index:v,selected:D,offsetLeft:I,columnsTotalWidth:M,rowHeight:x,pinnedColumns:c,visibleColumns:n,firstColumnIndex:B,lastColumnIndex:V,focusedColumnIndex:F?A.columnIndex:void 0,isFirstVisible:E,isLastVisible:j,isNotVisible:R,showBottomBorder:z,scrollbarWidth:O,gridHasFiller:P},_),u)),R)return;const $=p.get(u);$&&k.push($),void 0===o.position&&T&&k.push(e.current.getInfiniteLoadingTriggerElement?.({lastRowId:u}))}),k},getContainerProps:()=>({ref:j}),getScrollerProps:()=>({ref:v,onScroll:q,onWheel:W,onTouchMove:U,style:G,role:"presentation",tabIndex:rwt?-1:void 0}),getContentProps:()=>({style:K,role:"presentation",ref:Y}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:x,scrollPosition:T}),getScrollbarHorizontalProps:()=>({ref:b,scrollPosition:T}),getScrollAreaProps:()=>({scrollPosition:T})}};function wwt(e){return e.current.state.dimensions.viewportOuterSize.width>0&&e.current.state.dimensions.columnsTotalWidth>e.current.state.dimensions.viewportOuterSize.width}function kwt(e,t,r,o){const n=pmt(e),a=ewt(e),i=wgt(e),s=hwt(e),l=e.current.state.rows.dataRowIds.at(-1),c=i.at(-1);return{enabledForRows:r,enabledForColumns:o,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:n.leftPinnedWidth,columnsTotalWidth:n.columnsTotalWidth,viewportInnerWidth:n.viewportInnerSize.width,viewportInnerHeight:n.viewportInnerSize.height,lastRowHeight:void 0!==l?e.current.unstable_getRowHeight(l):0,lastColumnWidth:c?.computedWidth??0,rowsMeta:Bbt(e),columnPositions:Dgt(e),rows:a.rows,range:a.range,pinnedColumns:Mgt(e),visibleColumns:i,hiddenCellsOriginMap:s,listView:t.listView??!1,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function _wt(e,t,r){const o={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:n,left:a}=t,i=Math.abs(a)+e.leftPinnedWidth;if(e.enabledForRows){let t=Math.min(Cwt(e,n,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const r=e.hiddenCellsOriginMap[t];if(r){const e=Math.min(...Object.values(r));t=Math.min(t,e)}const a=e.autoHeight?t+e.rows.length:Cwt(e,n+e.viewportInnerHeight);o.firstRowIndex=t,o.lastRowIndex=a}if(e.listView)return S({},o,{lastColumnIndex:1});if(e.enabledForColumns){let t=0,n=e.columnPositions.length,a=!1;const[s,l]=Swt({firstIndex:o.firstRowIndex,lastIndex:o.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:r.buffer.rowBefore,bufferAfter:r.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let r=s;r<l&&!a;r+=1){const t=e.rows[r];a=e.apiRef.current.rowHasAutoHeight(t.id)}a&&!e.virtualizeColumnsWithAutoRowHeight||(t=Mwt(i,e.columnPositions,{atStart:!0,lastPosition:e.columnsTotalWidth}),n=Mwt(i+e.viewportInnerWidth,e.columnPositions)),o.firstColumnIndex=t,o.lastColumnIndex=n}const s=function(e,t,r){const[o,n]=Swt({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:r.buffer.rowBefore,bufferAfter:r.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[a,i]=Swt({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:r.buffer.columnBefore,bufferAfter:r.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),s=function({firstColumnToRender:e,apiRef:t,firstRowToRender:r,lastRowToRender:o,visibleRows:n}){let a=e,i=!1;for(;!i&&a>=0;){i=!0;for(let e=r;e<o;e+=1)if(n[e]){const r=n[e].id,o=t.current.unstable_getCellColSpanInfo(r,a);if(o&&o.spannedByColSpan&&o.leftVisibleCellIndex<a){a=o.leftVisibleCellIndex,i=!1;break}}}return a}({firstColumnToRender:a,apiRef:e.apiRef,firstRowToRender:o,lastRowToRender:n,visibleRows:e.rows});return{firstRowIndex:o,lastRowIndex:n,firstColumnIndex:s,lastColumnIndex:i}}(e,o,r);return s}function Cwt(e,t,r){const o=e.apiRef.current.getLastMeasuredRowIndex();let n=o===1/0;e.range?.lastRowIndex&&!n&&(n=o>=e.range.lastRowIndex);const a=qyt(o-(e.range?.firstRowIndex||0),0,e.rowsMeta.positions.length);return n||e.rowsMeta.positions[a]>=t?Mwt(t,e.rowsMeta.positions,r):function(e,t,r,o){let n=1;for(;r<t.length&&Math.abs(t[r])<e;)r+=n,n*=2;return Mwt(e,t,o,Math.floor(r/2),Math.min(r,t.length))}(t,e.rowsMeta.positions,a,r)}function Mwt(e,t,r=void 0,o=0,n=t.length){if(t.length<=0)return-1;if(o>=n)return o;const a=o+Math.floor((n-o)/2),i=t[a];let s;if(r?.atStart){s=e-((a===t.length-1?r.lastPosition:t[a+1])-i)<i}else s=e<=i;return s?Mwt(e,t,r,o,a):Mwt(e,t,r,a+1,n)}function Swt({firstIndex:e,lastIndex:t,bufferBefore:r,bufferAfter:o,minFirstIndex:n,maxLastIndex:a,positions:i,lastSize:s}){const l=i[e]-r,c=i[t]+o,u=Mwt(l,i,{atStart:!0,lastPosition:i[i.length-1]+s}),d=Mwt(c,i);return[qyt(u,n,a),qyt(d,n,a)]}function Dwt(e,t){return e===t||e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex}function Owt(e,t,r){const o=(e[t.firstColumnIndex]??0)-(e[r]??0);return Math.abs(o)}function Pwt(e,t,r,o,n,a){if(e)switch(t){case gwt.LEFT:t=gwt.RIGHT;break;case gwt.RIGHT:t=gwt.LEFT}switch(t){case gwt.NONE:return{rowAfter:r,rowBefore:r,columnAfter:o,columnBefore:o};case gwt.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:a};case gwt.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:a,columnBefore:0};case gwt.UP:return{rowAfter:0,rowBefore:n,columnAfter:0,columnBefore:0};case gwt.DOWN:return{rowAfter:n,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const Ewt=ei("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e&&"right"!==e})(({overlayType:e,loadingOverlayVariant:t,right:r})=>"skeleton"!==t?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,right:`${r}px`,width:0,height:0,zIndex:"loadingOverlay"===e?5:4}:{}),jwt=ei("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e})({});function Twt(e){const r=Rmt(),o=Omt(),n=eyt(r,pmt);let a=Math.max(n.viewportOuterSize.height-n.topContainerHeight-n.bottomContainerHeight-(n.hasScrollX?n.scrollbarSize:0),0);0===a&&(a=bvt);const i=(e=>{const{classes:t}=e;return rs({root:["overlayWrapper"],inner:["overlayWrapperInner"]},Emt,t)})(S({},e,{classes:o.classes}));return t.jsx(Ewt,S({className:i.root},e,{right:n.columnsTotalWidth-n.viewportOuterSize.width,children:t.jsx(jwt,S({className:i.inner,style:{height:a,width:n.viewportOuterSize.width}},e))}))}"production"!==process.env.NODE_ENV&&(Twt.propTypes={loadingOverlayVariant:Ro.exports.oneOf(["circular-progress","linear-progress","skeleton"]),overlayType:Ro.exports.oneOf(["loadingOverlay","noResultsOverlay","noRowsOverlay","noColumnsOverlay","emptyPivotOverlay"])});const Nwt=umt(e=>e.pivoting),Rwt=lmt(Nwt,e=>e?.active),Fwt=new Map,Iwt=lmt(Nwt,e=>e?.initialColumns||Fwt);lmt(Nwt,e=>e?.panelOpen);const Awt=umt(e=>e.columnMenu);const zwt=G(function(){const e=Kbt(),r=Omt(),o=eyt(e,wgt),n=eyt(e,cxt),a=eyt(e,qvt),i=eyt(e,Pxt),s=eyt(e,()=>null===Oxt(e)),l=eyt(e,jxt),c=eyt(e,Cxt),u=eyt(e,Sxt),d=eyt(e,Nbt),p=eyt(e,Awt),h=eyt(e,xgt),f=eyt(e,Tbt),m=!(null===l&&null===i&&s),y=e.current.columnHeadersContainerRef;return t.jsx(r.slots.columnHeaders,S({ref:y,visibleColumns:o,filterColumnLookup:n,sortColumnLookup:a,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:u,headerGroupingMaxDepth:d,columnMenuState:p,columnVisibility:h,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:m},r.slotProps?.columnHeaders))}),Lwt=ei("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),Bwt=ei("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>{const{ownerState:r,loadingOverlayVariant:o,overlayType:n}=e,a="skeleton"===o||"noColumnsOverlay"===n;return[t.main,r.hasPinnedRight&&t["main--hasPinnedRight"],a&&t["main--hiddenContent"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),Vwt=Smt((e,r)=>{const{ownerState:o}=e,n=Omt(),a=Qgt().hooks.useGridAriaAttributes();return t.jsxs(Bwt,S({ownerState:o,className:e.className,tabIndex:-1},a,n.slotProps?.main,{ref:r,children:[t.jsx(Lwt,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))});"production"!==process.env.NODE_ENV&&(Vwt.displayName="GridMainContainer");const $wt=ei("div")({position:"sticky",zIndex:40,top:0});function Hwt(e){const r=rs({root:["topContainer"]},Emt,{});return t.jsx($wt,S({},e,{className:za(r.root,jmt["container--top"]),role:"presentation"}))}const qwt=ei("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.virtualScrollerContent,r.overflowedContent&&t["virtualScrollerContent--overflowed"]]}})({}),Wwt=Smt(function(e,r){const o=Omt(),n=!o.autoHeight&&"auto"===e.style?.minHeight,a=((e,t)=>{const{classes:r}=e;return rs({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},Emt,r)})(o,n),i={classes:o.classes,overflowedContent:n};return t.jsx(qwt,S({},e,{ownerState:i,className:za(a.root,e.className),ref:r}))});"production"!==process.env.NODE_ENV&&(Wwt.displayName="GridVirtualScrollerContent");const Uwt=ei("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),Gwt=ei("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:lyt.cell.background.pinned}),Kwt=ei(Gwt)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),Ywt=ei(Gwt)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),Zwt=ei("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});const Xwt=G(function({rowsLength:e}){const r=Rmt(),{viewportOuterSize:o,minimumSize:n,hasScrollX:a,hasScrollY:i,scrollbarSize:s,leftPinnedWidth:l,rightPinnedWidth:c}=eyt(r,pmt),u=a?s:0,d=o.height-n.height>0;return 0!==u||d?t.jsxs(Uwt,{className:jmt.filler,role:"presentation",style:{height:u,"--rowBorderColor":0===e?"transparent":"var(--DataGrid-rowBorderColor)"},children:[l>0&&t.jsx(Kwt,{className:jmt["filler--pinnedLeft"],style:{width:l}}),t.jsx(Zwt,{}),c>0&&t.jsx(Ywt,{className:jmt["filler--pinnedRight"],style:{width:c+(i?s:0)}})]}):null}),Qwt=["className"],Jwt=ei("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone"})({position:"absolute",display:"flex",flexDirection:"column"}),ekt=Smt(function(e,r){const{className:o}=e,n=Jl(e,Qwt),a=Rmt(),i=Omt(),s=(e=>{const{classes:t}=e;return rs({root:["virtualScrollerRenderZone"]},Emt,t)})(i),l=eyt(a,()=>{const e=iwt(a);return Bbt(a).positions[e.firstRowIndex]??0});return t.jsx(Jwt,S({className:za(s.root,o),ownerState:i,style:{transform:`translate3d(0, ${l}px, 0)`}},n,{ref:r}))});"production"!==process.env.NODE_ENV&&(ekt.displayName="GridVirtualScrollerRenderZone");const tkt={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0},rkt=umt(e=>e.editRows),okt=lmt(rkt,(e,{rowId:t,editMode:r})=>r===Yyt.Row&&Boolean(e[t])),nkt=lmt(rkt,(e,{rowId:t,field:r})=>e[t]?.[r]??null),akt=umt(e=>e.preferencePanel),ikt=lmt(akt,(e,t)=>!(!e.open||e.labelId!==t));var skt=function(e){return e.filters="filters",e.columns="columns",e.aiAssistant="aiAssistant",e}(skt||{});function lkt(e){return JSON.stringify([e.filterModel,e.sortModel,e.start,e.end])}class ckt{constructor({ttl:e=3e5,getKey:t=lkt}){this.cache=void 0,this.ttl=void 0,this.getKey=void 0,this.cache={},this.ttl=e,this.getKey=t}set(e,t){const r=this.getKey(e),o=Date.now()+this.ttl;this.cache[r]={value:t,expiry:o}}get(e){const t=this.getKey(e),r=this.cache[t];if(r){if(!(Date.now()>r.expiry))return r.value;delete this.cache[t]}}clear(){this.cache={}}}class ukt extends Error{constructor(e){super(e.message),this.params=void 0,this.cause=void 0,this.name="GridGetRowsError",this.params=e.params,this.cause=e.cause}}class dkt extends Error{constructor(e){super(e.message),this.params=void 0,this.cause=void 0,this.name="GridUpdateRowError",this.params=e.params,this.cause=e.cause}}const pkt=ei("div")({position:"absolute",display:"inline-block",zIndex:60,"&:hover":{zIndex:70},"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),hkt=ei(pkt)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),fkt=ei(pkt)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),mkt=Smt(function(e,r){const o=Kbt(),n=Omt(),a=s.useRef(!1),i=s.useRef(0),l=s.useRef(null),c=s.useRef(null),u=((e,t)=>{const{classes:r}=e;return rs({root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]},Emt,r)})(n,e.position),d=eyt(o,pmt),p="vertical"===e.position?"height":"width",h="vertical"===e.position?"scrollTop":"scrollLeft",f="vertical"===e.position?"top":"left",m="vertical"===e.position?d.hasScrollX:d.hasScrollY,y=d.minimumSize[p]+(m?d.scrollbarSize:0),g=("vertical"===e.position?d.viewportInnerSize.height:d.viewportOuterSize.width)*(y/d.viewportOuterSize[p]),v=ql(()=>{const t=l.current,r=e.scrollPosition.current;if(!t)return;if(r[f]===i.current)return;if(i.current=r[f],a.current)return void(a.current=!1);a.current=!0;const o=r[f]/y;t[h]=o*g}),x=ql(()=>{const e=o.current.virtualScrollerRef.current,t=l.current;if(!t)return;if(a.current)return void(a.current=!1);a.current=!0;const r=t[h]/g;e[h]=r*y});Ic(()=>{const e=o.current.virtualScrollerRef.current,t=l.current,r={passive:!0};return e.addEventListener("scroll",v,r),t.addEventListener("scroll",x,r),()=>{e.removeEventListener("scroll",v,r),t.removeEventListener("scroll",x,r)}}),s.useEffect(()=>{c.current.style.setProperty(p,`${g}px`)},[g,p]);const b="vertical"===e.position?hkt:fkt;return t.jsx(b,{ref:Wl(r,l),className:u.root,style:"vertical"===e.position&&n.listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",onFocus:e=>{e.target.blur()},children:t.jsx("div",{ref:c,className:u.content})})});"production"!==process.env.NODE_ENV&&(mkt.displayName="GridVirtualScrollbar");const ykt=ei("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.virtualScroller,r.hasScrollX&&t["virtualScroller--hasScrollX"]]}})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0}),gkt=e=>e.current.state.dimensions.rightPinnedWidth>0;function vkt(e){const r=Rmt(),o=Omt(),n=eyt(r,gmt),a=eyt(r,ymt),i=eyt(r,gkt),s=eyt(r,Cmt),{getOverlay:l,overlaysProps:c}=(()=>{const e=Rmt(),r=Omt(),o=eyt(e,myt),n=eyt(e,axt),a=eyt(e,Pyt),i=eyt(e,wgt),s=0===o&&0===a,l=eyt(e,yyt),c=eyt(e,Rwt),u=!l&&s,d=!l&&o>0&&0===n,p=!l&&0===i.length;let h=null,f=null;u&&(h="noRowsOverlay"),p&&(h="noColumnsOverlay"),u&&c&&(h="emptyPivotOverlay"),d&&(h="noResultsOverlay"),l&&(h="loadingOverlay",f=r.slotProps?.loadingOverlay?.[s?"noRowsVariant":"variant"]??(s?"skeleton":"linear-progress"));const m={overlayType:h,loadingOverlayVariant:f},y=()=>{if(!h)return null;const e=r.slots?.[h],o=r.slotProps?.[h];return t.jsx(Twt,S({},m,{children:t.jsx(e,S({},o))}))};return"production"!==process.env.NODE_ENV&&(y.displayName="getOverlay"),{getOverlay:y,overlaysProps:m}})(),u=S({classes:o.classes,hasScrollX:a,hasPinnedRight:i},c),d=(e=>{const{classes:t,hasScrollX:r,hasPinnedRight:o,loadingOverlayVariant:n,overlayType:a}=e;return rs({root:["main",o&&"main--hasPinnedRight",("skeleton"===n||"noColumnsOverlay"===a)&&"main--hiddenContent"],scroller:["virtualScroller",r&&"virtualScroller--hasScrollX"]},Emt,t)})(u),p=bwt(),{getContainerProps:h,getScrollerProps:f,getContentProps:m,getRenderZoneProps:y,getScrollbarVerticalProps:g,getScrollbarHorizontalProps:v,getRows:x,getScrollAreaProps:b}=p,w=x();return t.jsxs(Vwt,S({className:d.root},h(),{ownerState:u,children:[t.jsx(Ubt,S({scrollDirection:"left"},b())),t.jsx(Ubt,S({scrollDirection:"right"},b())),t.jsx(Ubt,S({scrollDirection:"up"},b())),t.jsx(Ubt,S({scrollDirection:"down"},b())),t.jsxs(ykt,S({className:d.scroller},f(),{ownerState:u,children:[t.jsxs(Hwt,{children:[!o.listView&&t.jsx(zwt,{}),t.jsx(o.slots.pinnedRows,{position:"top",virtualScroller:p})]}),l(),t.jsx(Wwt,S({},m(),{children:t.jsxs(ekt,S({},y(),{children:[w,t.jsx(o.slots.detailPanels,{virtualScroller:p})]}))})),s&&t.jsx(Xwt,{rowsLength:w.length}),t.jsx(o.slots.bottomContainer,{children:t.jsx(o.slots.pinnedRows,{position:"bottom",virtualScroller:p})})]})),a&&!o.listView&&t.jsx(mkt,S({position:"horizontal"},v())),n&&t.jsx(mkt,S({position:"vertical"},g())),e.children]}))}function xkt(){const e=Omt();return e.hideFooter?null:t.jsx(e.slots.footer,S({},e.slotProps?.footer))}let bkt;const wkt=[e=>e.autoPageSize&&e.autoHeight&&["MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.","You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.","","Please remove one of these two props."].join("\n")||void 0,e=>"client"===e.paginationMode&&null!=e.paginationMeta&&['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.','`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join("\n")||void 0,e=>e.signature===Tmt.DataGrid&&"client"===e.paginationMode&&Vyt(e.rowCount)&&['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.','`rowCount` is only meant to be used with `paginationMode="server"`.'].join("\n")||void 0,e=>"server"===e.paginationMode&&null==e.rowCount&&!e.dataSource&&["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`","For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination"].join("\n")||void 0];const kkt=(e,t)=>{if(e)if(t){if(e===Dvt.LEFT)return"right";if(e===Dvt.RIGHT)return"left"}else{if(e===Dvt.LEFT)return"left";if(e===Dvt.RIGHT)return"right"}};function _kt(e,t,r,o){const n=kkt(r,t);return n&&void 0!==o?(e[n]=o,e):e}const Ckt=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],Mkt=["changeReason","unstable_updateValueOnRender"];Dvt.LEFT,ugt.LEFT,Dvt.RIGHT,ugt.RIGHT,Dvt.NONE,Dvt.VIRTUAL;let Skt=!1;const Dkt=Smt(function(e,r){const{column:o,row:n,rowId:a,rowNode:i,align:l,colIndex:c,width:u,className:d,style:p,colSpan:h,disableDragEvents:f,isNotVisible:m,pinnedOffset:y,pinnedPosition:g,showRightBorder:v,showLeftBorder:x,onClick:b,onDoubleClick:w,onMouseDown:k,onMouseUp:_,onMouseOver:C,onKeyDown:M,onKeyUp:D,onDragEnter:O,onDragOver:P}=e,E=Jl(e,Ckt),j=Kbt(),T=Omt(),N=Ni(),R=o.field,F=eyt(j,nkt,{rowId:a,field:R}),I=Qgt().hooks.useCellAggregationResult(a,R),A=F?Zyt.Edit:Zyt.View,z=j.current.getCellParamsForRow(a,R,n,{colDef:o,cellMode:A,rowNode:i,tabIndex:eyt(j,()=>{const e=Oxt(j);return e&&e.field===R&&e.id===a?0:-1}),hasFocus:eyt(j,()=>{const e=_xt(j);return e?.id===a&&e.field===R})});z.api=j.current,I&&(z.value=I.value,z.formattedValue=o.valueFormatter?o.valueFormatter(z.value,n,o,j):z.value);const L=eyt(j,()=>j.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:a,field:R})),B=eyt(j,dwt),V=eyt(j,pwt),{hasFocus:$,isEditable:H=!1,value:q}=z,W="actions"===o.type&&o.getActions?.(j.current.getRowParams(a)).some(e=>!e.props.disabled),U="view"!==A&&H||W?-1:z.tabIndex,{classes:G,getCellClassName:K}=T,Y=[eyt(j,()=>j.current.unstable_applyPipeProcessors("cellClassName",[],{id:a,field:R}).filter(Boolean).join(" "))];o.cellClassName&&Y.push("function"==typeof o.cellClassName?o.cellClassName(z):o.cellClassName),"flex"===o.display&&Y.push(jmt["cell--flex"]),K&&Y.push(K(z));const Z=z.formattedValue??q,X=s.useRef(null),Q=Wl(r,X),J=s.useRef(null),ee=T.cellSelection??!1,te=(e=>{const{align:t,showLeftBorder:r,showRightBorder:o,pinnedPosition:n,isEditable:a,isSelected:i,isSelectionMode:s,classes:l}=e;return rs({root:["cell",`cell--text${Tn(t)}`,i&&"selected",a&&"cell--editable",r&&"cell--withLeftBorder",o&&"cell--withRightBorder",n===Dvt.LEFT&&"cell--pinnedLeft",n===Dvt.RIGHT&&"cell--pinnedRight",s&&!a&&"cell--selectionMode"]},Emt,l)})({align:l,showLeftBorder:x,showRightBorder:v,isEditable:H,classes:T.classes,pinnedPosition:g,isSelected:L,isSelectionMode:ee}),re=s.useCallback(e=>t=>{const r=j.current.getCellParams(a,R||"");j.current.publishEvent(e,r,t),_&&_(t)},[j,R,_,a]),oe=s.useCallback(e=>t=>{const r=j.current.getCellParams(a,R||"");j.current.publishEvent(e,r,t),k&&k(t)},[j,R,k,a]),ne=s.useCallback((e,t)=>r=>{if(!j.current.getRow(a))return;const o=j.current.getCellParams(a,R||"");j.current.publishEvent(e,o,r),t&&t(r)},[j,R,a]),ae=B[a]?.[R]??!1,ie=V[a]?.[R]??1,se=s.useMemo(()=>{if(m)return{padding:0,opacity:0,width:0,height:0,border:0};const e=_kt(S({"--width":`${u}px`},p),N,g,y),t=g===Dvt.LEFT,r=g===Dvt.RIGHT;return ie>1&&(e.height=`calc(var(--height) * ${ie})`,e.zIndex=10,(t||r)&&(e.zIndex=40)),e},[u,m,p,y,g,N,ie]);if(s.useEffect(()=>{if(!$||A===Zyt.Edit)return;const e=Ll(j.current.rootElementRef.current);if(X.current&&!X.current.contains(e.activeElement)){const e=X.current.querySelector('[tabindex="0"]'),t=J.current||e||X.current;if(void 0===bkt&&document.createElement("div").focus({get preventScroll(){return bkt=!0,!1}}),bkt)t.focus({preventScroll:!0});else{const e=j.current.getScrollPosition();t.focus(),j.current.scroll(e)}}},[$,A,j]),ae)return t.jsx("div",{"data-colindex":c,role:"presentation",style:S({width:"var(--width)"},se)});let le,ce,ue=E.onFocus;if("test"===process.env.NODE_ENV&&T.experimentalFeatures?.warnIfFocusStateIsNotSynced&&(ue=e=>{const t=_xt(j);t?.id!==a||t.field!==R?Skt||([`MUI X: The cell with id=${a} and field=${R} received focus.`,`According to the state, the focus should be at id=${t?.id}, field=${t?.field}.`,"Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.","Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state."].join("\n"),Skt=!0):"function"==typeof E.onFocus&&E.onFocus(e)}),null===F&&o.renderCell&&(le=o.renderCell(z)),null!==F&&o.renderEditCell){const e=j.current.getRowWithUpdatedValues(a,o.field),t=Jl(F,Mkt),r=S({},z,{row:e,formattedValue:o.valueFormatter?o.valueFormatter(F.value,e,o,j):z.formattedValue},t);le=o.renderEditCell(r),Y.push(jmt["cell--editing"]),Y.push(G?.["cell--editing"])}if(void 0===le){const e=Z?.toString();le=e,ce=e}s.isValidElement(le)&&W&&(le=s.cloneElement(le,{focusElementRef:J}));const de=f?null:{onDragEnter:ne("cellDragEnter",O),onDragOver:ne("cellDragOver",P)};return t.jsx("div",S({className:za(te.root,Y,d),role:"gridcell","data-field":R,"data-colindex":c,"aria-colindex":c+1,"aria-colspan":h,"aria-rowspan":ie,style:se,title:ce,tabIndex:U,onClick:ne("cellClick",b),onDoubleClick:ne("cellDoubleClick",w),onMouseOver:ne("cellMouseOver",C),onMouseDown:oe("cellMouseDown"),onMouseUp:re("cellMouseUp"),onKeyDown:ne("cellKeyDown",M),onKeyUp:ne("cellKeyUp",D)},de,E,{onFocus:ue,ref:Q,children:le}))});"production"!==process.env.NODE_ENV&&(Dkt.displayName="GridCell"),"production"!==process.env.NODE_ENV&&(Dkt.propTypes={align:Ro.exports.oneOf(["center","left","right"]).isRequired,colIndex:Ro.exports.number.isRequired,colSpan:Ro.exports.number,column:Ro.exports.object.isRequired,disableDragEvents:Ro.exports.bool,isNotVisible:Ro.exports.bool.isRequired,pinnedOffset:Ro.exports.number,pinnedPosition:Ro.exports.oneOf([0,1,2,3]).isRequired,row:Ro.exports.object.isRequired,rowId:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]).isRequired,rowNode:Ro.exports.object.isRequired,showLeftBorder:Ro.exports.bool.isRequired,showRightBorder:Ro.exports.bool.isRequired,width:Ro.exports.number.isRequired});const Okt=G(Dkt),Pkt=["field","type","align","width","height","empty","style","className"],Ekt="1.3em",jkt=[40,80],Tkt={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},Nkt=function(e){const t=(r=e,()=>{let e=r+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296});var r;return(e,r)=>e+(r-e)*t()}(12345);function Rkt(e){const{field:r,type:o,align:n,width:a,height:i,empty:l=!1,style:c,className:u}=e,d=Jl(e,Pkt),p=Omt(),h=(e=>{const{align:t,classes:r,empty:o}=e;return rs({root:["cell","cellSkeleton",`cell--text${t?Tn(t):"Left"}`,o&&"cellEmpty"]},Emt,r)})({classes:p.classes,align:n,empty:l}),f=s.useMemo(()=>{if("boolean"===o||"actions"===o)return{variant:"circular",width:Ekt,height:Ekt};const[e,t]=o?Tkt[o]??jkt:jkt;return{variant:"text",width:`${Math.round(Nkt(e,t))}%`,height:"1.2em"}},[o]);return t.jsx("div",S({"data-field":r,className:za(h.root,u),style:S({height:i,maxWidth:a,minWidth:a},c)},d,{children:!l&&t.jsx(p.slots.baseSkeleton,S({},f))}))}"production"!==process.env.NODE_ENV&&(Rkt.propTypes={align:Ro.exports.string,empty:Ro.exports.bool,field:Ro.exports.string,height:Ro.exports.oneOfType([Ro.exports.oneOf(["auto"]),Ro.exports.number]),type:Ro.exports.oneOf(["actions","boolean","custom","date","dateTime","number","singleSelect","string"]),width:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string])});const Fkt=G(Rkt),Ikt={width:3,rx:1.5,x:10.5},Akt=e=>e.current.state.dimensions.hasScrollX&&(!e.current.state.dimensions.hasScrollY||0===e.current.state.dimensions.scrollbarSize),zkt=gl("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${jmt.autoHeight}`]:t.autoHeight},{[`&.${jmt.autosizing}`]:t.autosizing},{[`&.${jmt["root--densityStandard"]}`]:t["root--densityStandard"]},{[`&.${jmt["root--densityComfortable"]}`]:t["root--densityComfortable"]},{[`&.${jmt["root--densityCompact"]}`]:t["root--densityCompact"]},{[`&.${jmt["root--disableUserSelection"]}`]:t["root--disableUserSelection"]},{[`&.${jmt["root--noToolbar"]}`]:t["root--noToolbar"]},{[`&.${jmt.withVerticalBorder}`]:t.withVerticalBorder},{[`& .${jmt.actionsCell}`]:t.actionsCell},{[`& .${jmt.booleanCell}`]:t.booleanCell},{[`& .${jmt.cell}`]:t.cell},{[`& .${jmt["cell--editable"]}`]:t["cell--editable"]},{[`& .${jmt["cell--editing"]}`]:t["cell--editing"]},{[`& .${jmt["cell--flex"]}`]:t["cell--flex"]},{[`& .${jmt["cell--pinnedLeft"]}`]:t["cell--pinnedLeft"]},{[`& .${jmt["cell--pinnedRight"]}`]:t["cell--pinnedRight"]},{[`& .${jmt["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${jmt["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${jmt["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${jmt["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${jmt["cell--selectionMode"]}`]:t["cell--selectionMode"]},{[`& .${jmt["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${jmt["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${jmt["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${jmt["cell--withLeftBorder"]}`]:t["cell--withLeftBorder"]},{[`& .${jmt["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${jmt.cellCheckbox}`]:t.cellCheckbox},{[`& .${jmt.cellEmpty}`]:t.cellEmpty},{[`& .${jmt.cellOffsetLeft}`]:t.cellOffsetLeft},{[`& .${jmt.cellSkeleton}`]:t.cellSkeleton},{[`& .${jmt.checkboxInput}`]:t.checkboxInput},{[`& .${jmt.columnHeader}`]:t.columnHeader},{[`& .${jmt["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${jmt["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${jmt["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${jmt["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${jmt["columnHeader--emptyGroup"]}`]:t["columnHeader--emptyGroup"]},{[`& .${jmt["columnHeader--filledGroup"]}`]:t["columnHeader--filledGroup"]},{[`& .${jmt["columnHeader--filtered"]}`]:t["columnHeader--filtered"]},{[`& .${jmt["columnHeader--last"]}`]:t["columnHeader--last"]},{[`& .${jmt["columnHeader--lastUnpinned"]}`]:t["columnHeader--lastUnpinned"]},{[`& .${jmt["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${jmt["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${jmt["columnHeader--pinnedLeft"]}`]:t["columnHeader--pinnedLeft"]},{[`& .${jmt["columnHeader--pinnedRight"]}`]:t["columnHeader--pinnedRight"]},{[`& .${jmt["columnHeader--siblingFocused"]}`]:t["columnHeader--siblingFocused"]},{[`& .${jmt["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${jmt["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${jmt["columnHeader--withLeftBorder"]}`]:t["columnHeader--withLeftBorder"]},{[`& .${jmt["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${jmt.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${jmt.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${jmt.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${jmt.columnHeaderTitleContainerContent}`]:t.columnHeaderTitleContainerContent},{[`& .${jmt.columnSeparator}`]:t.columnSeparator},{[`& .${jmt["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${jmt["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${jmt["columnSeparator--sideLeft"]}`]:t["columnSeparator--sideLeft"]},{[`& .${jmt["columnSeparator--sideRight"]}`]:t["columnSeparator--sideRight"]},{[`& .${jmt["container--bottom"]}`]:t["container--bottom"]},{[`& .${jmt["container--top"]}`]:t["container--top"]},{[`& .${jmt.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${jmt["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},{[`& .${jmt.editBooleanCell}`]:t.editBooleanCell},{[`& .${jmt.filterIcon}`]:t.filterIcon},{[`& .${jmt["filler--borderBottom"]}`]:t["filler--borderBottom"]},{[`& .${jmt["filler--pinnedLeft"]}`]:t["filler--pinnedLeft"]},{[`& .${jmt["filler--pinnedRight"]}`]:t["filler--pinnedRight"]},{[`& .${jmt.groupingCriteriaCell}`]:t.groupingCriteriaCell},{[`& .${jmt.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${jmt.groupingCriteriaCellToggle}`]:t.groupingCriteriaCellToggle},{[`& .${jmt.headerFilterRow}`]:t.headerFilterRow},{[`& .${jmt.iconSeparator}`]:t.iconSeparator},{[`& .${jmt.menuIcon}`]:t.menuIcon},{[`& .${jmt.menuIconButton}`]:t.menuIconButton},{[`& .${jmt.menuList}`]:t.menuList},{[`& .${jmt.menuOpen}`]:t.menuOpen},{[`& .${jmt.overlayWrapperInner}`]:t.overlayWrapperInner},{[`& .${jmt.pinnedRows}`]:t.pinnedRows},{[`& .${jmt["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},{[`& .${jmt["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`& .${jmt.row}`]:t.row},{[`& .${jmt["row--borderBottom"]}`]:t["row--borderBottom"]},{[`& .${jmt["row--detailPanelExpanded"]}`]:t["row--detailPanelExpanded"]},{[`& .${jmt["row--dragging"]}`]:t["row--dragging"]},{[`& .${jmt["row--dynamicHeight"]}`]:t["row--dynamicHeight"]},{[`& .${jmt["row--editable"]}`]:t["row--editable"]},{[`& .${jmt["row--editing"]}`]:t["row--editing"]},{[`& .${jmt["row--firstVisible"]}`]:t["row--firstVisible"]},{[`& .${jmt["row--lastVisible"]}`]:t["row--lastVisible"]},{[`& .${jmt.rowReorderCell}`]:t.rowReorderCell},{[`& .${jmt["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${jmt.rowReorderCellContainer}`]:t.rowReorderCellContainer},{[`& .${jmt.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${jmt.rowSkeleton}`]:t.rowSkeleton},{[`& .${jmt.scrollbar}`]:t.scrollbar},{[`& .${jmt["scrollbar--horizontal"]}`]:t["scrollbar--horizontal"]},{[`& .${jmt["scrollbar--vertical"]}`]:t["scrollbar--vertical"]},{[`& .${jmt.scrollbarFiller}`]:t.scrollbarFiller},{[`& .${jmt["scrollbarFiller--borderBottom"]}`]:t["scrollbarFiller--borderBottom"]},{[`& .${jmt["scrollbarFiller--borderTop"]}`]:t["scrollbarFiller--borderTop"]},{[`& .${jmt["scrollbarFiller--header"]}`]:t["scrollbarFiller--header"]},{[`& .${jmt["scrollbarFiller--pinnedRight"]}`]:t["scrollbarFiller--pinnedRight"]},{[`& .${jmt.sortIcon}`]:t.sortIcon},{[`& .${jmt.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${jmt.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${jmt.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${jmt.withBorderColor}`]:t.withBorderColor},{[`& .${jmt["row--dropAbove"]}`]:t["row--dropAbove"]},{[`& .${jmt["row--dropBelow"]}`]:t["row--dropBelow"]},{[`& .${jmt["row--beingDragged"]}`]:t["row--beingDragged"]}]})(()=>{const e=eyt(Kbt(),Akt),t=lyt.colors.background.base,r=lyt.header.background.base,o=lyt.cell.background.pinned,n=function(e){return Lkt(e,1)}(lyt.colors.interactive.hover),a=lyt.colors.interactive.hoverOpacity,i=lyt.colors.interactive.selected,s=lyt.colors.interactive.selectedOpacity,l=i,c=`calc(${s} + ${a})`,u=Bkt(t,n,a),d=Bkt(t,i,s),p=Bkt(t,l,c),h=Bkt(o,n,a),f=Bkt(o,i,s),m=Bkt(o,l,c),y=e=>({[`& .${jmt["cell--pinnedLeft"]}, & .${jmt["cell--pinnedRight"]}`]:{backgroundColor:e,"&.Mui-selected":{backgroundColor:Bkt(e,d,s),"&:hover":{backgroundColor:Bkt(e,p,c)}}}}),g=y(h),v=y(f),x=y(m),b={backgroundColor:d,"&:hover":{backgroundColor:p,"@media (hover: none)":{backgroundColor:d}}};return{"--unstable_DataGrid-radius":lyt.radius.base,"--unstable_DataGrid-headWeight":lyt.typography.fontWeight.medium,"--DataGrid-rowBorderColor":lyt.colors.border.base,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:lyt.colors.border.base,borderRadius:"var(--unstable_DataGrid-radius)",backgroundColor:lyt.colors.background.base,color:lyt.colors.foreground.base,font:lyt.typography.font.body,outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",transform:"translate(0, 0)",[`.${jmt.main} > *:first-child/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${jmt.autoHeight}`]:{height:"auto"},[`&.${jmt.autosizing}`]:{[`& .${jmt.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${jmt.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${jmt.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${jmt.groupingCriteriaCell}`]:{width:"unset"},[`& .${jmt.treeDataGroupingCell}`]:{width:"unset"}},[`&.${jmt.withSidePanel}`]:{flexDirection:"row"},[`& .${jmt.mainContent}`]:{display:"flex",flexDirection:"column",overflow:"hidden",flex:1},[`& .${jmt.columnHeader}, & .${jmt.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${jmt.columnHeader}:focus-within, & .${jmt.cell}:focus-within`]:{outline:`solid ${Lkt(lyt.colors.interactive.focus,.5)} 1px`,outlineOffset:-1},[`& .${jmt.columnHeader}:focus, & .${jmt.cell}:focus`]:{outline:`solid ${lyt.colors.interactive.focus} 1px`,outlineOffset:-1},[`& .${jmt.columnHeader}:focus,\n & .${jmt["columnHeader--withLeftBorder"]},\n & .${jmt["columnHeader--withRightBorder"]},\n & .${jmt["columnHeader--siblingFocused"]},\n & .${jmt["virtualScroller--hasScrollX"]} .${jmt["columnHeader--lastUnpinned"]},\n & .${jmt["virtualScroller--hasScrollX"]} .${jmt["columnHeader--last"]}\n `]:{[`& .${jmt.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${jmt["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${jmt["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${jmt["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${jmt["root--noToolbar"]} [aria-rowindex="1"] .${jmt["columnHeader--last"]}`]:{borderTopRightRadius:e?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${jmt.columnHeaderCheckbox}, & .${jmt.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${jmt.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center",backgroundColor:r},[`& .${jmt["columnHeader--filter"]}`]:{paddingTop:8,paddingBottom:8,paddingRight:5,minHeight:"min-content",overflow:"hidden"},[`& .${jmt["virtualScroller--hasScrollX"]} .${jmt["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${jmt["pivotPanelField--sorted"]} .${jmt.iconButtonContainer},\n & .${jmt["columnHeader--sorted"]} .${jmt.iconButtonContainer},\n & .${jmt["columnHeader--filtered"]} .${jmt.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${jmt.pivotPanelField}:not(.${jmt["pivotPanelField--sorted"]}) .${jmt.sortButton},\n & .${jmt.columnHeader}:not(.${jmt["columnHeader--sorted"]}) .${jmt.sortButton}`]:{opacity:0,transition:lyt.transition(["opacity"],{duration:lyt.transitions.duration.short})},[`& .${jmt.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:lyt.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${jmt.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${jmt["columnHeader--filledGroup"]} .${jmt.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${jmt.sortIcon}, & .${jmt.filterIcon}`]:{fontSize:"inherit"},[`& .${jmt["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${jmt["columnHeader--alignCenter"]} .${jmt.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${jmt["columnHeader--alignRight"]} .${jmt.columnHeaderDraggableContainer}, & .${jmt["columnHeader--alignRight"]} .${jmt.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${jmt["columnHeader--alignCenter"]} .${jmt.menuIcon}`]:{marginLeft:"auto"},[`& .${jmt["columnHeader--alignRight"]} .${jmt.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${jmt["columnHeader--moving"]}`]:{backgroundColor:u},[`& .${jmt["columnHeader--pinnedLeft"]}, & .${jmt["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:40,background:lyt.header.background.base},[`& .${jmt.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:30,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:10,color:lyt.colors.border.base},[`& .${jmt.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)",backgroundColor:r},"@media (hover: hover)":{[`& .${jmt.columnHeader}:hover`]:{[`& .${jmt.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${jmt.iconButtonContainer}`]:{visibility:"visible",width:"auto"}},[`& .${jmt.columnHeader}:not(.${jmt["columnHeader--sorted"]}):hover .${jmt.sortButton},\n & .${jmt.pivotPanelField}:not(.${jmt["pivotPanelField--sorted"]}):hover .${jmt.sortButton},\n & .${jmt.pivotPanelField}:not(.${jmt["pivotPanelField--sorted"]}) .${jmt.sortButton}:focus-visible`]:{opacity:.5}},"@media (hover: none)":{[`& .${jmt.columnHeader} .${jmt.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${jmt.columnHeader}:focus,\n & .${jmt["columnHeader--siblingFocused"]}`]:{[`.${jmt["columnSeparator--resizable"]}`]:{color:lyt.colors.foreground.accent}},[`& .${jmt.pivotPanelField}:not(.${jmt["pivotPanelField--sorted"]}) .${jmt.sortButton}`]:{opacity:.5}},[`& .${jmt["columnSeparator--sideLeft"]}`]:{left:-5},[`& .${jmt["columnSeparator--sideRight"]}`]:{right:-5},[`& .${jmt["columnHeader--withRightBorder"]} .${jmt["columnSeparator--sideLeft"]}`]:{left:-5.5},[`& .${jmt["columnHeader--withRightBorder"]} .${jmt["columnSeparator--sideRight"]}`]:{right:-5.5},[`& .${jmt["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${jmt["columnSeparator--resizing"]}`]:{color:lyt.colors.foreground.accent},"@media (hover: none)":{[`& .${jmt.iconSeparator} rect`]:Ikt},"@media (hover: hover)":{"&:hover":{color:lyt.colors.foreground.accent,[`& .${jmt.iconSeparator} rect`]:Ikt}},"& svg":{pointerEvents:"none"}},[`& .${jmt.iconSeparator}`]:{color:"inherit",transition:lyt.transition(["color","width"],{duration:lyt.transitions.duration.short})},[`& .${jmt.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${jmt.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${jmt.headerFilterRow}`]:{[`& .${jmt.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${jmt["row--borderBottom"]} .${jmt.columnHeader},\n & .${jmt["row--borderBottom"]} .${jmt.filler},\n & .${jmt["row--borderBottom"]} .${jmt.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${jmt["row--borderBottom"]} .${jmt.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${jmt.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${jmt["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:u,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${jmt.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":b},[`& .${jmt.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":b},[`& .${jmt["virtualScrollerContent--overflowed"]} .${jmt["row--lastVisible"]} .${jmt.cell}`]:{borderTopColor:"transparent"},[`& .${jmt.pinnedRows} .${jmt.row}, .${jmt.aggregationRowOverlayWrapper} .${jmt.row}`]:{backgroundColor:o,"&:hover":{backgroundColor:h}},[`& .${jmt["pinnedRows--top"]} :first-of-type`]:{[`& .${jmt.cell}, .${jmt.scrollbarFiller}`]:{borderTop:"none"}},[`&.${jmt["root--disableUserSelection"]}`]:{userSelect:"none"},[`& .${jmt["row--dynamicHeight"]} > .${jmt.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${jmt.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${jmt.cell}.${jmt["cell--selectionMode"]}`]:{cursor:"default"},[`& .${jmt.cell}.${jmt["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:lyt.shadows.base,backgroundColor:lyt.colors.background.overlay,"&:focus-within":{outline:`1px solid ${lyt.colors.interactive.focus}`,outlineOffset:-1}},[`& .${jmt["row--editing"]}`]:{boxShadow:lyt.shadows.base},[`& .${jmt["row--editing"]} .${jmt.cell}`]:{boxShadow:"none",backgroundColor:lyt.colors.background.overlay},[`& .${jmt.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${jmt.booleanCell}[data-value="true"]`]:{color:lyt.colors.foreground.muted},[`& .${jmt.booleanCell}[data-value="false"]`]:{color:lyt.colors.foreground.disabled},[`& .${jmt.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:lyt.spacing(1)},[`& .${jmt.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:lyt.colors.interactive.disabledOpacity},[`& .${jmt["rowReorderCell--draggable"]}`]:{cursor:"grab",opacity:1},[`& .${jmt.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${jmt.withBorderColor}`]:{borderColor:lyt.colors.border.base},[`& .${jmt["cell--withLeftBorder"]}, & .${jmt["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${jmt["cell--withRightBorder"]}, & .${jmt["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${jmt["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${jmt["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${jmt["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${jmt["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${jmt["cell--pinnedLeft"]}, & .${jmt["cell--pinnedRight"]}`]:{position:"sticky",zIndex:30,background:lyt.cell.background.pinned,"&.Mui-selected":{backgroundColor:f}},[`& .${jmt.row}`]:{"&:hover":g,"&.Mui-selected":v,"&.Mui-selected:hover":x},[`& .${jmt.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${jmt.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${jmt.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${jmt.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${jmt["columnHeader--dragging"]}, & .${jmt["row--dragging"]}`]:{background:lyt.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:lyt.colors.interactive.disabledOpacity},[`& .${jmt["row--dragging"]}`]:{background:lyt.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:lyt.colors.interactive.disabledOpacity,[`& .${jmt.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${jmt.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${jmt.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:lyt.spacing(2)},[`& .${jmt.treeDataGroupingCellLoadingContainer}, .${jmt.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${jmt.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${jmt.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:lyt.spacing(2)},[`& .${jmt.columnHeaders} .${jmt.scrollbarFiller}`]:{backgroundColor:r},[`.${jmt.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${jmt["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${jmt["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${jmt["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:lyt.cell.background.pinned,position:"sticky",zIndex:40,right:0}},[`& .${jmt.filler}`]:{flex:"1 0 auto"},[`& .${jmt["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${jmt.columnHeaders} .${jmt.filler}`]:{backgroundColor:r},[`& .${jmt["main--hiddenContent"]}`]:{[`& .${jmt.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${jmt["scrollbar--vertical"]}, & .${jmt.pinnedRows}, & .${jmt.virtualScroller} > .${jmt.filler}`]:{display:"none"}},[`& .${jmt["row--dropAbove"]}`]:{position:"relative","&::before":{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"2px",backgroundColor:lyt.colors.interactive.selected}},[`& .${jmt["row--dropBelow"]}`]:{position:"relative","&::before":{content:'""',position:"absolute",bottom:"-2px",left:0,width:"100%",height:"2px",backgroundColor:lyt.colors.interactive.selected},[`&.${jmt["row--lastVisible"]}`]:{"&::before":{bottom:"calc(var(--DataGrid-hasScrollY) * 0px + (1 - var(--DataGrid-hasScrollY)) * -2px)"}}},[`& .${jmt["row--beingDragged"]}`]:{backgroundColor:lyt.colors.background.overlay,color:lyt.colors.foreground.disabled}}});function Lkt(e,t){return`rgba(from ${e} r g b / ${t})`}function Bkt(e,t,r){return`color-mix(in srgb,${e}, ${t} calc(${r} * 100%))`}const Vkt=()=>()=>{},$kt=()=>!1,Hkt=()=>!0,qkt=s.createContext(void 0);function Wkt(){const e=s.useContext(qkt);if(void 0===e)throw new Error("MUI X: Missing context.");return e}function Ukt({children:e}){const r=s.useRef(null),o=s.useRef(null),n=s.useRef(null),a=s.useMemo(()=>({columnsPanelTriggerRef:r,filterPanelTriggerRef:o,aiAssistantPanelTriggerRef:n}),[]);return t.jsx(qkt.Provider,{value:a,children:e})}function Gkt(){const e=Rmt(),r=eyt(e,vgt),o=Omt(),n=eyt(e,akt),{columnsPanelTriggerRef:a,filterPanelTriggerRef:i,aiAssistantPanelTriggerRef:s}=Wkt(),l=e.current.unstable_applyPipeProcessors("preferencePanel",null,n.openedPanelValue??skt.filters);let c=null;switch(n.openedPanelValue){case skt.filters:c=i.current;break;case skt.columns:c=a.current;break;case skt.aiAssistant:c=s.current}return t.jsx(o.slots.panel,S({id:n.panelId,open:r.length>0&&n.open,"aria-labelledby":n.labelId,target:c,onClose:()=>e.current.hidePreferences()},o.slotProps?.panel,{children:l}))}function Kkt(){const e=Omt();return t.jsxs(s.Fragment,{children:[t.jsx(Gkt,{}),e.showToolbar&&t.jsx(e.slots.toolbar,S({},e.slotProps?.toolbar))]})}"production"!==process.env.NODE_ENV&&(qkt.displayName="GridPanelContext");const Ykt=["className","children","sidePanel"],Zkt=Smt(function(e,r){const o=Omt(),{className:n,children:a,sidePanel:i}=e,l=Jl(e,Ykt),c=Kbt(),u=eyt(c,ryt),d=c.current.rootElementRef,p=s.useCallback(e=>{null!==e&&c.current.publishEvent("rootMount",e)},[c]),h=Wl(d,r,p),f=o,m=((e,t)=>{const{autoHeight:r,classes:o,showCellVerticalBorder:n}=e;return rs({root:["root",r&&"autoHeight",`root--density${Tn(t)}`,null===e.slots.toolbar&&"root--noToolbar","withBorderColor",n&&"withVerticalBorder"]},Emt,o)})(f,u),y=s.useContext(Jgt);return qmt.exports.useSyncExternalStore(Vkt,$kt,Hkt)?null:t.jsxs(zkt,S({className:za(m.root,n,y.className,i&&jmt.withSidePanel),ownerState:f},l,{ref:h,children:[t.jsxs("div",{className:jmt.mainContent,role:"presentation",children:[t.jsx(Kkt,{}),t.jsx(vkt,{children:a}),t.jsx(xkt,{})]}),i,y.tag]}))});"production"!==process.env.NODE_ENV&&(Zkt.displayName="GridRoot"),"production"!==process.env.NODE_ENV&&(Zkt.propTypes={sidePanel:Ro.exports.node,sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const Xkt=G(Zkt),Qkt=["className"],Jkt=ei("div",{name:"MuiDataGrid",slot:"FooterContainer"})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),e_t=Smt(function(e,r){const{className:o}=e,n=Jl(e,Qkt),a=Omt(),i=(e=>{const{classes:t}=e;return rs({root:["footerContainer","withBorderColor"]},Emt,t)})(a);return t.jsx(Jkt,S({className:za(i.root,o),ownerState:a},n,{ref:r}))});"production"!==process.env.NODE_ENV&&(e_t.displayName="GridFooterContainer"),"production"!==process.env.NODE_ENV&&(e_t.propTypes={sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const t_t=["className"],r_t=ei("div",{name:"MuiDataGrid",slot:"Overlay"})({width:"100%",height:"100%",display:"flex",gap:lyt.spacing(1),flexDirection:"column",alignSelf:"center",alignItems:"center",justifyContent:"center",textAlign:"center",textWrap:"balance",backgroundColor:lyt.colors.background.backdrop}),o_t=Smt(function(e,r){const{className:o}=e,n=Jl(e,t_t),a=Omt(),i=(e=>{const{classes:t}=e;return rs({root:["overlay"]},Emt,t)})(a);return t.jsx(r_t,S({className:za(i.root,o),ownerState:a},n,{ref:r}))});function n_t(e,t,r,o={}){return"function"==typeof t?t(r,o):t?(t.props.className&&(r.className=function(e,t){if(!e||!t)return e||t;return`${e} ${t}`}(t.props.className,r.className)),(t.props.style||r.style)&&(r.style=S({},r.style,t.props.style)),s.cloneElement(t,r)):s.createElement(e,r)}"production"!==process.env.NODE_ENV&&(o_t.displayName="GridOverlay"),"production"!==process.env.NODE_ENV&&(o_t.propTypes={sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const a_t=s.createContext(void 0);function i_t(e,t){if(!e.ref.current||!t.ref.current)return 0;const r=e.ref.current.compareDocumentPosition(t.ref.current);return r?r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0:0}"production"!==process.env.NODE_ENV&&(a_t.displayName="ToolbarContext");const s_t=["render","className"],l_t=ei("div",{name:"MuiDataGrid",slot:"Toolbar"})({flex:0,display:"flex",alignItems:"center",justifyContent:"end",gap:lyt.spacing(.25),padding:lyt.spacing(.75),minHeight:52,boxSizing:"border-box",borderBottom:`1px solid ${lyt.colors.border.base}`}),c_t=Smt(function(e,r){const{render:o,className:n}=e,a=Jl(e,s_t),i=Omt(),l=(e=>{const{classes:t}=e;return rs({root:["toolbar"]},Emt,t)})(i),[c,u]=s.useState(null),[d,p]=s.useState([]),h=s.useCallback(()=>d.sort(i_t),[d]),f=s.useCallback((e,t,r=!0)=>{let o=e;const n=h(),a=n.length;for(let i=0;i<a;i+=1){if(o+=t,o>=a){if(!r)return-1;o=0}else if(o<0){if(!r)return-1;o=a-1}if(!n[o].ref.current?.disabled&&"true"!==n[o].ref.current?.ariaDisabled)return o}return-1},[h]),m=s.useCallback((e,t)=>{p(r=>[...r,{id:e,ref:t}])},[]),y=s.useCallback(e=>{p(t=>t.filter(t=>t.id!==e))},[]),g=s.useCallback(e=>{if(!c)return;const t=h(),r=t.findIndex(e=>e.id===c);let o=-1;if("ArrowRight"===e.key?(e.preventDefault(),o=f(r,1)):"ArrowLeft"===e.key?(e.preventDefault(),o=f(r,-1)):"Home"===e.key?(e.preventDefault(),o=f(-1,1,!1)):"End"===e.key&&(e.preventDefault(),o=f(t.length,-1,!1)),o>=0&&o<t.length){const e=t[o];u(e.id),e.ref.current?.focus()}},[h,c,f]),v=s.useCallback(e=>{c!==e&&u(e)},[c,u]),x=s.useCallback(e=>{const t=h(),r=t.findIndex(t=>t.id===e),o=f(r,1);if(o>=0&&o<t.length){const e=t[o];u(e.id),e.ref.current?.focus()}},[h,f]);s.useEffect(()=>{const e=h();if(e.length>0){if(!c)return void u(e[0].id);const t=e.findIndex(e=>e.id===c);if(e[t]){if(-1===t){const r=e[t];r&&(u(r.id),r.ref.current?.focus())}}else{const t=e[e.length-1];t&&(u(t.id),t.ref.current?.focus())}}},[h,f]);const b=s.useMemo(()=>({focusableItemId:c,registerItem:m,unregisterItem:y,onItemKeyDown:g,onItemFocus:v,onItemDisabled:x}),[c,m,y,g,v,x]),w=n_t(l_t,o,S({role:"toolbar","aria-orientation":"horizontal","aria-label":i.label||void 0,className:za(l.root,n)},a,{ref:r}));return t.jsx(a_t.Provider,{value:b,children:w})});"production"!==process.env.NODE_ENV&&(c_t.displayName="Toolbar"),"production"!==process.env.NODE_ENV&&(c_t.propTypes={render:Ro.exports.oneOfType([Ro.exports.element,Ro.exports.func])});const u_t=["render","onKeyDown","onFocus","disabled","aria-disabled"],d_t=Smt(function(e,r){const{render:o,onKeyDown:n,onFocus:a,disabled:i,"aria-disabled":l}=e,c=Jl(e,u_t),u=Li(),d=Omt(),p=s.useRef(null),h=Wl(p,r),{focusableItemId:f,registerItem:m,unregisterItem:y,onItemKeyDown:g,onItemFocus:v,onItemDisabled:x}=function(){const e=s.useContext(a_t);if(void 0===e)throw new Error("MUI X: Missing context. Toolbar subcomponents must be placed within a <Toolbar /> component.");return e}();s.useEffect(()=>(m(u,p),()=>y(u)),[]);const b=s.useRef(i);s.useEffect(()=>{b.current!==i&&!0===i&&x(u,i),b.current=i},[i,u,x]);const w=s.useRef(l);s.useEffect(()=>{w.current!==l&&!0===l&&x(u,!0),w.current=l},[l,u,x]);const k=n_t(d.slots.baseIconButton,o,S({},d.slotProps?.baseIconButton,{tabIndex:f===u?0:-1},c,{disabled:i,"aria-disabled":l,onKeyDown:e=>{g(e),n?.(e)},onFocus:e=>{v(u),a?.(e)},ref:h}));return t.jsx(s.Fragment,{children:k})});"production"!==process.env.NODE_ENV&&(d_t.displayName="ToolbarButton"),"production"!==process.env.NODE_ENV&&(d_t.propTypes={className:Ro.exports.string,color:Ro.exports.oneOf(["default","inherit","primary"]),disabled:Ro.exports.bool,edge:Ro.exports.oneOf(["end","start",!1]),id:Ro.exports.string,label:Ro.exports.string,render:Ro.exports.oneOfType([Ro.exports.element,Ro.exports.func]),role:Ro.exports.string,size:Ro.exports.oneOf(["large","medium","small"]),style:Ro.exports.object,tabIndex:Ro.exports.number,title:Ro.exports.string,touchRippleRef:Ro.exports.any});const p_t=s.memo(e=>{const{colDef:r,open:o,columnMenuId:n,columnMenuButtonId:a,iconButtonRef:i}=e,l=Rmt(),c=Omt(),u=(e=>{const{classes:t,open:r}=e;return rs({root:["menuIcon",r&&"menuOpen"],button:["menuIconButton"]},Emt,t)})(S({},e,{classes:c.classes})),d=s.useCallback(e=>{e.preventDefault(),e.stopPropagation(),l.current.toggleColumnMenu(r.field)},[l,r.field]),p=r.headerName??r.field;return t.jsx("div",{className:u.root,children:t.jsx(c.slots.baseTooltip,S({title:l.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},c.slotProps?.baseTooltip,{children:t.jsx(c.slots.baseIconButton,S({ref:i,tabIndex:-1,className:u.button,"aria-label":l.current.getLocaleText("columnMenuAriaLabel")(p),size:"small",onClick:d,"aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?n:void 0,id:a},c.slotProps?.baseIconButton,{children:t.jsx(c.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function h_t({columnMenuId:e,columnMenuButtonId:r,ContentComponent:o,contentComponentProps:n,field:a,open:i,target:s,onExited:l}){const c=Rmt(),u=c.current.getColumn(a),d=ql(e=>{e&&(e.stopPropagation(),s?.contains(e.target))||c.current.hideColumnMenu()});return s&&u?t.jsx(nvt,{position:"bottom-"+("right"===u.align?"start":"end"),open:i,target:s,onClose:d,onExited:l,children:t.jsx(o,S({colDef:u,hideMenu:d,open:i,id:e,labelledby:r},n))}):null}function f_t(e,t){return e.closest(`.${t}`)}function m_t(e){return e.replace(/["\\]/g,"\\$&")}function y_t(e){return`.${jmt.row}[data-id="${m_t(String(e))}"]`}function g_t(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}function v_t(e,t){return e.rootElementRef.current.querySelector(`.${jmt[t]}`)}"production"!==process.env.NODE_ENV&&(p_t.displayName="ColumnHeaderMenuIcon"),"production"!==process.env.NODE_ENV&&(h_t.propTypes={columnMenuButtonId:Ro.exports.string,columnMenuId:Ro.exports.string,ContentComponent:Ro.exports.elementType.isRequired,contentComponentProps:Ro.exports.any,field:Ro.exports.string.isRequired,onExited:Ro.exports.func,open:Ro.exports.bool.isRequired,target:Vd});const x_t=({api:e,colIndex:t,position:r,filterFn:o})=>{if(null===t)return[];const n=[];return w_t(e).forEach(e=>{e.getAttribute("data-id")&&e.querySelectorAll(`.${jmt["left"===r?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(e=>{const t=k_t(e);null!==t&&o(t)&&n.push(e)})}),n};const b_t=({api:e,colIndex:t,position:r,filterFn:o})=>{if(!e.columnHeadersContainerRef?.current)return[];if(null===t)return[];const n=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${jmt["left"===r?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(e=>{const t=k_t(e);null!==t&&o(t,e)&&n.push(e)}),n};function w_t(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${jmt.row}`)}function k_t(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}const __t=["className","aria-label"],C_t=ei("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle"})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),M_t=Smt(function(e,r){const{className:o}=e,n=Jl(e,__t),a=Omt(),i=(e=>{const{classes:t}=e;return rs({root:["columnHeaderTitle"]},Emt,t)})(a);return t.jsx(C_t,S({className:za(i.root,o),ownerState:a},n,{ref:r}))});function S_t(e){const{label:r,description:o}=e,n=Omt(),a=s.useRef(null),[i,l]=s.useState(""),c=s.useCallback(()=>{if(!o&&a?.current){const t=(e=a.current).scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth;l(t?r:"")}var e},[o,r]);return t.jsx(n.slots.baseTooltip,S({title:o||i},n.slotProps?.baseTooltip,{children:t.jsx(M_t,{onMouseOver:c,ref:a,children:r})}))}"production"!==process.env.NODE_ENV&&(M_t.displayName="ColumnHeaderInnerTitle"),"production"!==process.env.NODE_ENV&&(S_t.propTypes={columnWidth:Ro.exports.number.isRequired,description:Ro.exports.node,label:Ro.exports.string.isRequired});const D_t=["resizable","resizing","height","side"];var O_t=function(e){return e.Left="left",e.Right="right",e}(O_t||{});function P_t(e){const{height:r,side:o=O_t.Right}=e,n=Jl(e,D_t),a=Omt(),i=(e=>{const{resizable:t,resizing:r,classes:o,side:n}=e;return rs({root:["columnSeparator",t&&"columnSeparator--resizable",r&&"columnSeparator--resizing",n&&`columnSeparator--side${Tn(n)}`],icon:["iconSeparator"]},Emt,o)})(S({},e,{side:o,classes:a.classes})),l=s.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]);return t.jsx("div",S({className:i.root,style:{minHeight:r}},n,{onClick:l,children:t.jsx(a.slots.columnResizeIcon,{className:i.icon})}))}const E_t=s.memo(P_t);"production"!==process.env.NODE_ENV&&(E_t.displayName="GridColumnHeaderSeparator"),"production"!==process.env.NODE_ENV&&(P_t.propTypes={height:Ro.exports.number.isRequired,resizable:Ro.exports.bool.isRequired,resizing:Ro.exports.bool.isRequired,side:Ro.exports.oneOf(["left","right"])});const j_t=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],T_t=Smt(function(e,r){const{classes:o,colIndex:n,height:a,isResizing:i,sortDirection:l,hasFocus:c,tabIndex:u,separatorSide:d,isDraggable:p,headerComponent:h,description:f,width:m,columnMenuIconButton:y=null,columnMenu:g=null,columnTitleIconButtons:v=null,headerClassName:x,label:b,resizable:w,draggableContainerProps:k,columnHeaderSeparatorProps:_,style:C}=e,M=Jl(e,j_t),D=Kbt(),O=Omt(),P=s.useRef(null),E=Wl(P,r);let j="none";return null!=l&&(j="asc"===l?"ascending":"descending"),s.useLayoutEffect(()=>{const e=D.current.state.columnMenu;if(c&&!e.open){const e=P.current.querySelector('[tabindex="0"]')||P.current;e?.focus(),D.current.columnHeadersContainerRef?.current&&(D.current.columnHeadersContainerRef.current.scrollLeft=0)}},[D,c]),t.jsxs("div",S({className:za(o.root,x),style:S({},C,{width:m}),role:"columnheader",tabIndex:u,"aria-colindex":n+1,"aria-sort":j},M,{ref:E,children:[t.jsxs("div",S({className:o.draggableContainer,draggable:p,role:"presentation"},k,{children:[t.jsxs("div",{className:o.titleContainer,role:"presentation",children:[t.jsx("div",{className:o.titleContainerContent,children:void 0!==h?h:t.jsx(S_t,{label:b,description:f,columnWidth:m})}),v]}),y]})),t.jsx(E_t,S({resizable:!O.disableColumnResize&&!!w,resizing:i,height:a,side:d},_)),g]}))});"production"!==process.env.NODE_ENV&&(T_t.displayName="GridGenericColumnHeaderItem");function N_t(e){const{colDef:r,columnMenuOpen:o,colIndex:n,headerHeight:a,isResizing:i,isLast:l,sortDirection:c,sortIndex:u,filterItemsCounter:d,hasFocus:p,tabIndex:h,disableReorder:f,separatorSide:m,showLeftBorder:y,showRightBorder:g,pinnedPosition:v,pinnedOffset:x}=e,b=Kbt(),w=Omt(),k=Ni(),_=s.useRef(null),C=Li(),M=Li(),D=s.useRef(null),[O,P]=s.useState(o),E=s.useMemo(()=>!w.disableColumnReorder&&!f&&!r.disableReorder,[w.disableColumnReorder,f,r.disableReorder]);let j;r.renderHeader&&(j=r.renderHeader(b.current.getColumnHeaderParams(r.field)));const T=(e=>{const{colDef:t,classes:r,isDragging:o,sortDirection:n,showRightBorder:a,showLeftBorder:i,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=e,d=null!=n,p=null!=s&&s>0,h="number"===t.type;return rs({root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",o&&"columnHeader--moving",d&&"columnHeader--sorted",p&&"columnHeader--filtered",h&&"columnHeader--numeric","withBorderColor",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder",l===Dvt.LEFT&&"columnHeader--pinnedLeft",l===Dvt.RIGHT&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]},Emt,r)})(S({},e,{classes:w.classes,showRightBorder:g,showLeftBorder:y})),N=s.useCallback(e=>t=>{g_t(t)||b.current.publishEvent(e,b.current.getColumnHeaderParams(r.field),t)},[b,r.field]),R=s.useMemo(()=>({onClick:N("columnHeaderClick"),onContextMenu:N("columnHeaderContextMenu"),onDoubleClick:N("columnHeaderDoubleClick"),onMouseOver:N("columnHeaderOver"),onMouseOut:N("columnHeaderOut"),onMouseEnter:N("columnHeaderEnter"),onMouseLeave:N("columnHeaderLeave"),onKeyDown:N("columnHeaderKeyDown"),onFocus:N("columnHeaderFocus"),onBlur:N("columnHeaderBlur")}),[N]),F=s.useMemo(()=>E?{onDragStart:N("columnHeaderDragStart"),onDragEnter:N("columnHeaderDragEnter"),onDragOver:N("columnHeaderDragOver"),onDragEndCapture:N("columnHeaderDragEnd")}:{},[E,N]),I=s.useMemo(()=>({onMouseDown:N("columnSeparatorMouseDown"),onDoubleClick:N("columnSeparatorDoubleClick")}),[N]);s.useEffect(()=>{O||P(o)},[O,o]);const A=s.useCallback(()=>{P(!1)},[]),z=!w.disableColumnMenu&&!r.disableColumnMenu&&t.jsx(p_t,{colDef:r,columnMenuId:C,columnMenuButtonId:M,open:O,iconButtonRef:D}),L=t.jsx(h_t,{columnMenuId:C,columnMenuButtonId:M,field:r.field,open:o,target:D.current,ContentComponent:w.slots.columnMenu,contentComponentProps:w.slotProps?.columnMenu,onExited:A}),B=r.sortingOrder??w.sortingOrder,V=(r.sortable||null!=c)&&!r.hideSortIcons&&!w.disableColumnSorting,$=t.jsxs(s.Fragment,{children:[!w.disableColumnFilter&&t.jsx(w.slots.columnHeaderFilterIconButton,S({field:r.field,counter:d},w.slotProps?.columnHeaderFilterIconButton)),V&&t.jsx(w.slots.columnHeaderSortIcon,S({field:r.field,direction:c,index:u,sortingOrder:B,disabled:!r.sortable},w.slotProps?.columnHeaderSortIcon))]});s.useLayoutEffect(()=>{const e=b.current.state.columnMenu;if(p&&!e.open){const e=_.current.querySelector('[tabindex="0"]')||_.current;e?.focus(),b.current.columnHeadersContainerRef?.current&&(b.current.columnHeadersContainerRef.current.scrollLeft=0)}},[b,p]);const H="function"==typeof r.headerClassName?r.headerClassName({field:r.field,colDef:r}):r.headerClassName,q=r.headerName??r.field,W=s.useMemo(()=>_kt(S({},e.style),k,v,x),[v,x,e.style,k]);return t.jsx(T_t,S({ref:_,classes:T,columnMenuOpen:o,colIndex:n,height:a,isResizing:i,sortDirection:c,hasFocus:p,tabIndex:h,separatorSide:m,isDraggable:E,headerComponent:j,description:r.description,elementId:r.field,width:r.computedWidth,columnMenuIconButton:z,columnTitleIconButtons:$,headerClassName:za(H,l&&jmt["columnHeader--last"]),label:q,resizable:!w.disableColumnResize&&!!r.resizable,"data-field":r.field,columnMenu:L,draggableContainerProps:F,columnHeaderSeparatorProps:I,style:W},R))}"production"!==process.env.NODE_ENV&&(N_t.propTypes={colDef:Ro.exports.object.isRequired,colIndex:Ro.exports.number.isRequired,columnMenuOpen:Ro.exports.bool.isRequired,disableReorder:Ro.exports.bool,filterItemsCounter:Ro.exports.number,hasFocus:Ro.exports.bool,headerHeight:Ro.exports.number.isRequired,isDragging:Ro.exports.bool.isRequired,isLast:Ro.exports.bool.isRequired,isLastUnpinned:Ro.exports.bool.isRequired,isResizing:Ro.exports.bool.isRequired,isSiblingFocused:Ro.exports.bool.isRequired,pinnedOffset:Ro.exports.number,pinnedPosition:Ro.exports.oneOf([0,1,2,3]),separatorSide:Ro.exports.oneOf(["left","right"]),showLeftBorder:Ro.exports.bool.isRequired,showRightBorder:Ro.exports.bool.isRequired,sortDirection:Ro.exports.oneOf(["asc","desc"]),sortIndex:Ro.exports.number,style:Ro.exports.object,tabIndex:Ro.exports.oneOf([-1,0]).isRequired});const R_t=G(N_t),F_t=["className"],I_t=ei("div",{name:"MuiDataGrid",slot:"IconButtonContainer"})(()=>({display:"flex",visibility:"hidden",width:0})),A_t=Smt(function(e,r){const{className:o}=e,n=Jl(e,F_t),a=Omt(),i=(e=>{const{classes:t}=e;return rs({root:["iconButtonContainer"]},Emt,t)})(a);return t.jsx(I_t,S({className:za(i.root,o),ownerState:a},n,{ref:r}))});"production"!==process.env.NODE_ENV&&(A_t.displayName="GridIconButtonContainer");const z_t=["sortingOrder"],L_t=s.memo(function(e){const{sortingOrder:r}=e,o=Jl(e,z_t),n=Omt(),[a]=r,i="asc"===a?n.slots.columnSortedAscendingIcon:n.slots.columnSortedDescendingIcon;return i?t.jsx(i,S({},o)):null});"production"!==process.env.NODE_ENV&&(L_t.displayName="GridColumnUnsortedIcon");const B_t=["direction","index","sortingOrder","disabled","className"],V_t=ei(nyt,{name:"MuiDataGrid",slot:"SortButton"})({transition:lyt.transition(["opacity"],{duration:lyt.transitions.duration.short,easing:lyt.transitions.easing.easeInOut})});function $_t(e){const{direction:r,index:o,sortingOrder:n,disabled:a,className:i}=e,l=Jl(e,B_t),c=Rmt(),u=Omt(),d=S({},e,{classes:u.classes}),p=(e=>{const{classes:t}=e;return rs({root:["sortButton"],icon:["sortIcon"]},Emt,t)})(d),h=function(e,r,o,n){let a;const i={};return"asc"===r?a=e.columnSortedAscendingIcon:"desc"===r?a=e.columnSortedDescendingIcon:(a=L_t,i.sortingOrder=n),a?t.jsx(a,S({fontSize:"small",className:o},i)):null}(u.slots,r,p.icon,n);if(!h)return null;const f=t.jsx(V_t,S({as:u.slots.baseIconButton,ownerState:d,"aria-label":c.current.getLocaleText("columnHeaderSortIconLabel"),title:c.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:a,className:za(p.root,i)},u.slotProps?.baseIconButton,l,{children:h}));return t.jsxs(s.Fragment,{children:[null!=o&&t.jsx(u.slots.baseBadge,{badgeContent:o,color:"default",overlap:"circular",children:f}),null==o&&f]})}function H_t(e){return t.jsx(A_t,{children:t.jsx($_t,S({},e,{tabIndex:-1}))})}"production"!==process.env.NODE_ENV&&($_t.propTypes={direction:Ro.exports.oneOf(["asc","desc"]),disabled:Ro.exports.bool,field:Ro.exports.string.isRequired,index:Ro.exports.number,onClick:Ro.exports.func,sortingOrder:Ro.exports.arrayOf(Ro.exports.oneOf(["asc","desc"])).isRequired});const q_t=s.memo(H_t);"production"!==process.env.NODE_ENV&&(q_t.displayName="GridColumnHeaderSortIcon"),"production"!==process.env.NODE_ENV&&(H_t.propTypes={className:Ro.exports.string,color:Ro.exports.oneOf(["default","inherit","primary"]),direction:Ro.exports.oneOf(["asc","desc"]),disabled:Ro.exports.bool,edge:Ro.exports.oneOf(["end","start",!1]),field:Ro.exports.string.isRequired,id:Ro.exports.string,index:Ro.exports.number,label:Ro.exports.string,role:Ro.exports.string,size:Ro.exports.oneOf(["large","medium","small"]),sortingOrder:Ro.exports.arrayOf(Ro.exports.oneOf(["asc","desc"])).isRequired,style:Ro.exports.object,tabIndex:Ro.exports.number,title:Ro.exports.string,touchRippleRef:Ro.exports.any});function W_t(e){return e.counter?t.jsx(U_t,S({},e)):null}function U_t(e){const{counter:r,field:o,onClick:n}=e,a=Rmt(),i=Omt(),l=(e=>{const{classes:t}=e;return rs({icon:["filterIcon"]},Emt,t)})(S({},e,{classes:i.classes})),c=Li(),u=eyt(a,ikt,c),d=Li(),p=s.useCallback(e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:r}=akt(a);t&&r===skt.filters?a.current.hideFilterPanel():a.current.showFilterPanel(void 0,d,c),n&&n(a.current.getColumnHeaderParams(o),e)},[a,o,n,d,c]);if(!r)return null;const h=t.jsx(i.slots.baseIconButton,S({id:c,onClick:p,"aria-label":a.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?d:void 0},i.slotProps?.baseIconButton,{children:t.jsx(i.slots.columnFilteredIcon,{className:l.icon,fontSize:"small"})}));return t.jsx(i.slots.baseTooltip,S({title:a.current.getLocaleText("columnHeaderFiltersTooltipActive")(r),enterDelay:1e3},i.slotProps?.baseTooltip,{children:t.jsxs(A_t,{children:[r>1&&t.jsx(i.slots.baseBadge,{badgeContent:r,color:"default",children:h}),1===r&&h]})}))}"production"!==process.env.NODE_ENV&&(W_t.propTypes={counter:Ro.exports.number,field:Ro.exports.string.isRequired,onClick:Ro.exports.func}),"production"!==process.env.NODE_ENV&&(U_t.propTypes={counter:Ro.exports.number,field:Ro.exports.string.isRequired,onClick:Ro.exports.func});const G_t=Al,K_t=G_t(t.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),Y_t=G_t(t.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),Z_t=G_t(t.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),X_t=G_t(t.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Q_t=G_t(t.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),J_t=G_t(t.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),eCt=G_t(t.jsx("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");G_t(t.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),G_t(t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const tCt=G_t(t.jsx("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"}),"ColumnIcon"),rCt=G_t(t.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),oCt=G_t(t.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),nCt=G_t(t.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),aCt=G_t(t.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),iCt=G_t(t.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),sCt=G_t(t.jsx("path",{d:"M19 6.41L17.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"),lCt=G_t(t.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),cCt=G_t(t.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),uCt=G_t(t.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),dCt=G_t(t.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),pCt=G_t(t.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),hCt=G_t(t.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),fCt=G_t(t.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),mCt=G_t(t.jsx("g",{children:t.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),yCt=G_t(t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Clear");G_t(t.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const gCt=G_t(t.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),vCt=G_t(t.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download"),xCt=["hideMenu","colDef","id","labelledby","className","children","open"],bCt=gl(nyt)(()=>({minWidth:248}));function wCt(e){e.currentTarget.contains(e.target)&&e.stopPropagation()}const kCt=Smt(function(e,r){const{hideMenu:o,id:n,labelledby:a,className:i,children:l,open:c}=e,u=Jl(e,xCt),d=Omt(),p=s.useCallback(e=>{"Tab"===e.key&&e.preventDefault(),Ygt(e.key)&&o(e)},[o]);return t.jsx(bCt,S({as:d.slots.baseMenuList,id:n,className:za(jmt.menuList,i),"aria-labelledby":a,onKeyDown:p,onWheel:wCt,onTouchMove:wCt,autoFocus:c},u,{ref:r,children:l}))});"production"!==process.env.NODE_ENV&&(kCt.displayName="GridColumnMenuContainer"),"production"!==process.env.NODE_ENV&&(kCt.propTypes={colDef:Ro.exports.object.isRequired,hideMenu:Ro.exports.func.isRequired,id:Ro.exports.string,labelledby:Ro.exports.string,open:Ro.exports.bool.isRequired});const _Ct=["displayOrder"];function CCt(e){const{colDef:r,onClick:o}=e,n=Rmt(),a=Omt(),i=1===wgt(n).filter(e=>!0!==e.disableColumnMenu).length,l=s.useCallback(e=>{i||(n.current.setColumnVisibility(r.field,!1),o(e))},[n,r.field,o,i]);return a.disableColumnSelector||!1===r.hideable?null:t.jsx(a.slots.baseMenuItem,{onClick:l,disabled:i,iconStart:t.jsx(a.slots.columnMenuHideIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuHideColumn")})}function MCt(e){const{onClick:r}=e,o=Rmt(),n=Omt(),a=s.useCallback(e=>{r(e),o.current.showPreferences(skt.columns)},[o,r]);return n.disableColumnSelector?null:t.jsx(n.slots.baseMenuItem,{onClick:a,iconStart:t.jsx(n.slots.columnMenuManageColumnsIcon,{fontSize:"small"}),children:o.current.getLocaleText("columnMenuManageColumns")})}function SCt(e){return t.jsxs(s.Fragment,{children:[t.jsx(CCt,S({},e)),t.jsx(MCt,S({},e))]})}function DCt(e){const{colDef:r,onClick:o}=e,n=Rmt(),a=Omt(),i=s.useCallback(e=>{o(e),n.current.showFilterPanel(r.field)},[n,r.field,o]);return a.disableColumnFilter||!r.filterable?null:t.jsx(a.slots.baseMenuItem,{onClick:i,iconStart:t.jsx(a.slots.columnMenuFilterIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuFilter")})}function OCt(e){const{colDef:r,onClick:o}=e,n=Rmt(),a=eyt(n,Hvt),i=Omt(),l=s.useMemo(()=>{if(!r)return null;const e=a.find(e=>e.field===r.field);return e?.sort},[r,a]),c=r.sortingOrder??i.sortingOrder,u=s.useCallback(e=>{o(e);const t=e.currentTarget.getAttribute("data-value")||null;n.current.sortColumn(r.field,t===l?null:t)},[n,r,o,l]);if(i.disableColumnSorting||!r||!r.sortable||!c.some(e=>!!e))return null;const d=e=>{const t=n.current.getLocaleText(e);return"function"==typeof t?t(r):t};return t.jsxs(s.Fragment,{children:[c.includes("asc")&&"asc"!==l?t.jsx(i.slots.baseMenuItem,{onClick:u,"data-value":"asc",iconStart:t.jsx(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"}),children:d("columnMenuSortAsc")}):null,c.includes("desc")&&"desc"!==l?t.jsx(i.slots.baseMenuItem,{onClick:u,"data-value":"desc",iconStart:t.jsx(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"}),children:d("columnMenuSortDesc")}):null,c.includes(null)&&null!=l?t.jsx(i.slots.baseMenuItem,{onClick:u,iconStart:i.slots.columnMenuUnsortIcon?t.jsx(i.slots.columnMenuUnsortIcon,{fontSize:"small"}):t.jsx("span",{}),children:n.current.getLocaleText("columnMenuUnsort")}):null]})}"production"!==process.env.NODE_ENV&&(CCt.propTypes={colDef:Ro.exports.object.isRequired,onClick:Ro.exports.func.isRequired}),"production"!==process.env.NODE_ENV&&(MCt.propTypes={colDef:Ro.exports.object.isRequired,onClick:Ro.exports.func.isRequired}),"production"!==process.env.NODE_ENV&&(SCt.propTypes={colDef:Ro.exports.object.isRequired,onClick:Ro.exports.func.isRequired}),"production"!==process.env.NODE_ENV&&(DCt.propTypes={colDef:Ro.exports.object.isRequired,onClick:Ro.exports.func.isRequired}),"production"!==process.env.NODE_ENV&&(OCt.propTypes={colDef:Ro.exports.object.isRequired,onClick:Ro.exports.func.isRequired});const PCt=["defaultSlots","defaultSlotProps","slots","slotProps"],ECt={columnMenuSortItem:OCt,columnMenuFilterItem:DCt,columnMenuColumnsItem:SCt},jCt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},TCt=Smt(function(e,r){const{defaultSlots:o,defaultSlotProps:n,slots:a,slotProps:i}=e,l=Jl(e,PCt),c=(e=>{const t=Kbt(),r=Omt(),{defaultSlots:o,defaultSlotProps:n,slots:a={},slotProps:i={},hideMenu:l,colDef:c,addDividers:u=!0}=e,d=s.useMemo(()=>S({},o,a),[o,a]),p=s.useMemo(()=>{if(!i||0===Object.keys(i).length)return n;const e=S({},i);return Object.entries(n).forEach(([t,r])=>{e[t]=S({},r,i[t]||{})}),e},[n,i]),h=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),f=s.useMemo(()=>{const e=Object.keys(o);return Object.keys(a).filter(t=>!e.includes(t))},[a,o]);return s.useMemo(()=>{const e=Array.from(new Set([...h,...f])).filter(e=>null!=d[e]),t=e.sort((e,t)=>{const r=p[e],o=p[t];return(Number.isFinite(r?.displayOrder)?r.displayOrder:100)-(Number.isFinite(o?.displayOrder)?o.displayOrder:100)});return t.reduce((e,o,n)=>{let a={colDef:c,onClick:l};const i=p[o];return i&&(a=S({},a,Jl(i,_Ct))),u&&n!==t.length-1?[...e,[d[o],a],[r.slots.baseDivider,{}]]:[...e,[d[o],a]]},[])},[u,c,h,l,d,p,f,r.slots.baseDivider])})(S({},l,{defaultSlots:o,defaultSlotProps:n,slots:a,slotProps:i}));return t.jsx(kCt,S({},l,{ref:r,children:c.map(([e,r],o)=>t.jsx(e,S({},r),o))}))});"production"!==process.env.NODE_ENV&&(TCt.displayName="GridGenericColumnMenu"),"production"!==process.env.NODE_ENV&&(TCt.propTypes={colDef:Ro.exports.object.isRequired,defaultSlotProps:Ro.exports.object.isRequired,defaultSlots:Ro.exports.object.isRequired,hideMenu:Ro.exports.func.isRequired,id:Ro.exports.string,labelledby:Ro.exports.string,open:Ro.exports.bool.isRequired,slotProps:Ro.exports.object,slots:Ro.exports.object});const NCt=Smt(function(e,r){return t.jsx(TCt,S({},e,{ref:r,defaultSlots:ECt,defaultSlotProps:jCt}))});"production"!==process.env.NODE_ENV&&(NCt.displayName="GridColumnMenu"),"production"!==process.env.NODE_ENV&&(NCt.propTypes={colDef:Ro.exports.object.isRequired,hideMenu:Ro.exports.func.isRequired,id:Ro.exports.string,labelledby:Ro.exports.string,open:Ro.exports.bool.isRequired,slotProps:Ro.exports.object,slots:Ro.exports.object});const RCt=["className"],FCt=gl("div",{name:"MuiDataGrid",slot:"PanelWrapper"})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),ICt=Smt(function(e,r){const{className:o}=e,n=Jl(e,RCt),a=Omt(),i=(e=>{const{classes:t}=e;return rs({root:["panelWrapper"]},Emt,t)})(a);return t.jsx(FCt,S({tabIndex:-1,className:za(i.root,o),ownerState:a},n,{ref:r}))});"production"!==process.env.NODE_ENV&&(ICt.displayName="GridPanelWrapper");const ACt=["children","className","classes","onClose"],zCt=Va("MuiDataGrid",["panel","paper"]),LCt=gl(nyt,{name:"MuiDataGrid",slot:"panel"})({zIndex:lyt.zIndex.panel}),BCt=gl("div",{name:"MuiDataGrid",slot:"panelContent"})({backgroundColor:lyt.colors.background.overlay,borderRadius:lyt.radius.base,boxShadow:lyt.shadows.overlay,display:"flex",maxWidth:`calc(100vw - ${lyt.spacing(2)})`,overflow:"auto"}),VCt=Smt((e,r)=>{const{children:o,className:n,onClose:a}=e,i=Jl(e,ACt),l=Rmt(),c=Omt(),u=zCt,[d,p]=s.useState(!1),h=evt(),f=ql(()=>p(!0)),m=ql(()=>p(!1)),y=ql(()=>{a?.()}),g=ql(e=>{"Escape"===e.key&&a?.()}),[v,x]=s.useState(null);return s.useEffect(()=>{const e=l.current.rootElementRef?.current?.querySelector('[data-id="gridPanelAnchor"]');e&&x(e)},[l]),v?t.jsx(LCt,S({as:c.slots.basePopper,ownerState:c,placement:"bottom-end",className:za(u.panel,n,h),flip:!0,onDidShow:f,onDidHide:m,onClickAway:y,clickAwayMouseEvent:"onPointerUp",clickAwayTouchEvent:!1,focusTrap:!0},i,c.slotProps?.basePopper,{target:e.target??v,ref:r,children:t.jsx(BCt,{className:u.paper,ownerState:c,onKeyDown:g,children:d&&o})})):null});"production"!==process.env.NODE_ENV&&(VCt.displayName="GridPanel"),"production"!==process.env.NODE_ENV&&(VCt.propTypes={children:Ro.exports.node,classes:Ro.exports.object,className:Ro.exports.string,flip:Ro.exports.bool,id:Ro.exports.string,onClose:Ro.exports.func,open:Ro.exports.bool.isRequired,target:Ro.exports.any});const $Ct=["className"],HCt=ei("div",{name:"MuiDataGrid",slot:"PanelContent"})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,padding:lyt.spacing(2.5,1.5,2,1),gap:lyt.spacing(2.5)});function qCt(e){const{className:r}=e,o=Jl(e,$Ct),n=Omt(),a=(e=>{const{classes:t}=e;return rs({root:["panelContent"]},Emt,t)})(n);return t.jsx(HCt,S({className:za(a.root,r),ownerState:n},o))}"production"!==process.env.NODE_ENV&&(qCt.propTypes={sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const WCt=["className"],UCt=gl("div",{name:"MuiDataGrid",slot:"PanelFooter"})({padding:lyt.spacing(1),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${lyt.colors.border.base}`});function GCt(e){const{className:r}=e,o=Jl(e,WCt),n=Omt(),a=(e=>{const{classes:t}=e;return rs({root:["panelFooter"]},Emt,t)})(n);return t.jsx(UCt,S({className:za(a.root,r),ownerState:n},o))}"production"!==process.env.NODE_ENV&&(GCt.propTypes={sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const KCt=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],YCt=["InputComponentProps"],ZCt=gl("div",{name:"MuiDataGrid",slot:"FilterForm"})({display:"flex",gap:lyt.spacing(1.5)}),XCt=gl("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon"})({flexShrink:0,display:"flex",justifyContent:"center",alignItems:"center"}),QCt=gl("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput"})({minWidth:75,justifyContent:"end"}),JCt=gl("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput"})({width:150}),eMt=gl("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput"})({width:150}),tMt=gl("div",{name:"MuiDataGrid",slot:"FilterFormValueInput"})({width:190}),rMt=e=>e.headerName||e.field,oMt=new Intl.Collator,nMt=Smt(function(r,o){const{item:n,hasMultipleFilters:a,deleteFilter:i,applyFilterChanges:l,showMultiFilterOperators:c,disableMultiFilterOperator:u,applyMultiFilterOperatorChanges:d,focusElementRef:p,logicOperators:h=[Qyt.And,Qyt.Or],columnsSort:f,filterColumns:m,deleteIconProps:y={},logicOperatorInputProps:g={},operatorInputProps:v={},columnInputProps:x={},valueInputProps:b={},readOnly:w}=r,k=Jl(r,KCt),_=Rmt(),C=eyt(_,ggt),M=eyt(_,Ogt),D=eyt(_,Gvt),O=Li(),P=Li(),E=Li(),j=Li(),T=Omt(),N=(e=>{const{classes:t}=e;return rs({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},Emt,t)})(T),R=s.useRef(null),F=s.useRef(null),I=D.logicOperator??Qyt.And,A=a&&h.length>0,z=(T.slotProps?.baseSelect||{}).native??!1,L=T.slotProps?.baseSelectOption||{},{InputComponentProps:B}=b,V=Jl(b,YCt),$=eyt(_,Rwt),H=eyt(_,Iwt),{filteredColumns:q,selectedField:W}=s.useMemo(()=>{let e=n.field;const t=!1===C[n.field].filterable?C[n.field]:null;if(t)return{filteredColumns:[t],selectedField:e};if($)return{filteredColumns:M.filter(e=>void 0!==H.get(e.field)),selectedField:e};if(void 0===m||"function"!=typeof m)return{filteredColumns:M,selectedField:e};const r=m({field:n.field,columns:M,currentFilters:D?.items||[]});return{filteredColumns:M.filter(t=>{const o=r.includes(t.field);return t.field!==n.field||o||(e=void 0),o}),selectedField:e}},[n.field,C,$,m,M,D?.items,H]),U=s.useMemo(()=>{switch(f){case"asc":return q.sort((e,t)=>oMt.compare(rMt(e),rMt(t)));case"desc":return q.sort((e,t)=>-oMt.compare(rMt(e),rMt(t)));default:return q}},[q,f]),G=n.field?_.current.getColumn(n.field):null,K=s.useMemo(()=>n.operator&&G?G.filterOperators?.find(e=>e.value===n.operator):null,[n,G]),Y=s.useCallback(e=>{const t=e.target.value,r=_.current.getColumn(t);if(r.field===G.field)return;const o=r.filterOperators.find(e=>e.value===n.operator)||r.filterOperators[0];let a=!o.InputComponent||o.InputComponent!==K?.InputComponent||r.type!==G.type?void 0:n.value;if("singleSelect"===r.type&&void 0!==a){const e=r,t=hbt(e);Array.isArray(a)?a=a.filter(r=>void 0!==fbt(r,t,e?.getOptionValue)):void 0===fbt(n.value,t,e?.getOptionValue)&&(a=void 0)}l(S({},n,{field:t,operator:o.value,value:a}))},[_,l,n,G,K]),Z=s.useCallback(e=>{const t=e.target.value,r=G?.filterOperators.find(e=>e.value===t);l(S({},n,{operator:t,value:!r?.InputComponent||r?.InputComponent!==K?.InputComponent?void 0:n.value}))},[l,n,G,K]),X=s.useCallback(e=>{const t=e.target.value===Qyt.And.toString()?Qyt.And:Qyt.Or;d(t)},[d]);return s.useImperativeHandle(p,()=>({focus:()=>{K?.InputComponent?R?.current?.focus():F.current.focus()}}),[K]),t.jsxs(ZCt,S({className:N.root,"data-id":n.id,ownerState:T},k,{ref:o,children:[t.jsx(XCt,S({},y,{className:za(N.deleteIcon,y.className),ownerState:T,children:t.jsx(T.slots.baseIconButton,S({"aria-label":_.current.getLocaleText("filterPanelDeleteIconLabel"),title:_.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{i(n)},size:"small",disabled:w},T.slotProps?.baseIconButton,{children:t.jsx(T.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),t.jsx(QCt,S({as:T.slots.baseSelect,sx:[A?{display:"flex"}:{display:"none"},c?{visibility:"visible"}:{visibility:"hidden"},g.sx],className:za(N.logicOperatorInput,g.className),ownerState:T},g,{size:"small",slotProps:{htmlInput:{"aria-label":_.current.getLocaleText("filterPanelLogicOperator")}},value:I??"",onChange:X,disabled:!!u||1===h.length,native:z},T.slotProps?.baseSelect,{children:h.map(t=>e.createElement(T.slots.baseSelectOption,S({},L,{native:z,key:t.toString(),value:t.toString()}),_.current.getLocaleText((e=>{switch(e){case Qyt.And:return"filterPanelOperatorAnd";case Qyt.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}})(t))))})),t.jsx(JCt,S({as:T.slots.baseSelect},x,{className:za(N.columnInput,x.className),ownerState:T,size:"small",labelId:P,id:O,label:_.current.getLocaleText("filterPanelColumns"),value:W??"",onChange:Y,native:z,disabled:w},T.slotProps?.baseSelect,{children:U.map(t=>e.createElement(T.slots.baseSelectOption,S({},L,{native:z,key:t.field,value:t.field}),rMt(t)))})),t.jsx(eMt,S({as:T.slots.baseSelect,size:"small"},v,{className:za(N.operatorInput,v.className),ownerState:T,labelId:j,label:_.current.getLocaleText("filterPanelOperator"),id:E,value:n.operator,onChange:Z,native:z,inputRef:F,disabled:w},T.slotProps?.baseSelect,{children:G?.filterOperators?.map(t=>e.createElement(T.slots.baseSelectOption,S({},L,{native:z,key:t.value,value:t.value}),t.label||_.current.getLocaleText(`filterOperator${Tn(t.value)}`)))})),t.jsx(tMt,S({},V,{className:za(N.valueInput,V.className),ownerState:T,children:K?.InputComponent?t.jsx(K.InputComponent,S({apiRef:_,item:n,applyValue:l,focusElementRef:R,disabled:w,slotProps:{root:{size:"small"}}},K.InputComponentProps,B),n.field):null}))]}))});"production"!==process.env.NODE_ENV&&(nMt.displayName="GridFilterForm"),"production"!==process.env.NODE_ENV&&(nMt.propTypes={applyFilterChanges:Ro.exports.func.isRequired,applyMultiFilterOperatorChanges:Ro.exports.func.isRequired,children:Ro.exports.node,columnInputProps:Ro.exports.any,columnsSort:Ro.exports.oneOf(["asc","desc"]),deleteFilter:Ro.exports.func.isRequired,deleteIconProps:Ro.exports.any,disableMultiFilterOperator:Ro.exports.bool,filterColumns:Ro.exports.func,focusElementRef:Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object]),hasMultipleFilters:Ro.exports.bool.isRequired,item:Ro.exports.shape({field:Ro.exports.string.isRequired,id:Ro.exports.oneOfType([Ro.exports.number,Ro.exports.string]),operator:Ro.exports.string.isRequired,value:Ro.exports.any}).isRequired,logicOperatorInputProps:Ro.exports.any,logicOperators:Ro.exports.arrayOf(Ro.exports.oneOf(["and","or"]).isRequired),operatorInputProps:Ro.exports.any,readOnly:Ro.exports.bool,showMultiFilterOperators:Ro.exports.bool,valueInputProps:Ro.exports.any});const aMt=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],iMt=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}),sMt=Smt(function(e,r){const o=Rmt(),n=Omt(),a=eyt(o,Gvt),i=eyt(o,Ogt),l=eyt(o,Pgt),c=s.useRef(null),u=s.useRef(null),{logicOperators:d=[Qyt.And,Qyt.Or],columnsSort:p,filterFormProps:h,getColumnForNewFilter:f,disableAddFilterButton:m=!1,disableRemoveAllButton:y=!1}=e,g=Jl(e,aMt),v=o.current.upsertFilterItem,x=s.useCallback(e=>{o.current.setFilterLogicOperator(e)},[o]),b=s.useCallback(()=>{let e;if(f&&"function"==typeof f){const t=f({currentFilters:a?.items||[],columns:i});if(null===t)return null;e=i.find(({field:e})=>e===t)}else e=i.find(e=>e.filterOperators?.length);return e?iMt(e):null},[a?.items,i,f]),w=s.useCallback(()=>{if(void 0===f||"function"!=typeof f)return b();const e=a.items.length?a.items:[b()].filter(Boolean),t=f({currentFilters:e,columns:i});if(null===t)return null;const r=i.find(({field:e})=>e===t);return r?iMt(r):null},[a.items,i,f,b]),k=s.useMemo(()=>a.items.length?a.items:(u.current||(u.current=b()),u.current?[u.current]:[]),[a.items,b]),_=k.length>1,{readOnlyFilters:C,validFilters:M}=s.useMemo(()=>k.reduce((e,t)=>(l[t.field]?e.validFilters.push(t):e.readOnlyFilters.push(t),e),{readOnlyFilters:[],validFilters:[]}),[k,l]),D=s.useCallback(()=>{const e=w();e&&o.current.upsertFilterItems([...k,e])},[o,w,k]),O=s.useCallback(e=>{const t=1===M.length;o.current.deleteFilterItem(e),t&&o.current.hideFilterPanel()},[o,M.length]),P=s.useCallback(()=>1===M.length&&void 0===M[0].value?(o.current.deleteFilterItem(M[0]),o.current.hideFilterPanel()):o.current.setFilterModel(S({},a,{items:C}),"removeAllFilterItems"),[o,C,a,M]);return s.useEffect(()=>{d.length>0&&a.logicOperator&&!d.includes(a.logicOperator)&&x(d[0])},[d,x,a.logicOperator]),s.useEffect(()=>{M.length>0&&c.current.focus()},[M.length]),t.jsxs(ICt,S({},g,{ref:r,children:[t.jsxs(qCt,{children:[C.map((e,r)=>t.jsx(nMt,S({item:e,applyFilterChanges:v,deleteFilter:O,hasMultipleFilters:_,showMultiFilterOperators:r>0,disableMultiFilterOperator:1!==r,applyMultiFilterOperatorChanges:x,focusElementRef:null,readOnly:!0,logicOperators:d,columnsSort:p},h),null==e.id?r:e.id)),M.map((e,r)=>t.jsx(nMt,S({item:e,applyFilterChanges:v,deleteFilter:O,hasMultipleFilters:_,showMultiFilterOperators:C.length+r>0,disableMultiFilterOperator:C.length+r!==1,applyMultiFilterOperatorChanges:x,focusElementRef:r===M.length-1?c:null,logicOperators:d,columnsSort:p},h),null==e.id?r+C.length:e.id))]}),n.disableMultipleColumnsFiltering||m&&y?null:t.jsxs(GCt,{children:[m?t.jsx("span",{}):t.jsx(n.slots.baseButton,S({onClick:D,startIcon:t.jsx(n.slots.filterPanelAddIcon,{})},n.slotProps?.baseButton,{children:o.current.getLocaleText("filterPanelAddFilter")})),!y&&M.length>0?t.jsx(n.slots.baseButton,S({onClick:P,startIcon:t.jsx(n.slots.filterPanelRemoveAllIcon,{})},n.slotProps?.baseButton,{children:o.current.getLocaleText("filterPanelRemoveAll")})):null]})]}))});"production"!==process.env.NODE_ENV&&(sMt.displayName="GridFilterPanel"),"production"!==process.env.NODE_ENV&&(sMt.propTypes={children:Ro.exports.node,columnsSort:Ro.exports.oneOf(["asc","desc"]),disableAddFilterButton:Ro.exports.bool,disableRemoveAllButton:Ro.exports.bool,filterFormProps:Ro.exports.shape({columnInputProps:Ro.exports.any,columnsSort:Ro.exports.oneOf(["asc","desc"]),deleteIconProps:Ro.exports.any,filterColumns:Ro.exports.func,logicOperatorInputProps:Ro.exports.any,operatorInputProps:Ro.exports.any,valueInputProps:Ro.exports.any}),getColumnForNewFilter:Ro.exports.func,logicOperators:Ro.exports.arrayOf(Ro.exports.oneOf(["and","or"]).isRequired),sx:Ro.exports.oneOfType([Ro.exports.arrayOf(Ro.exports.oneOfType([Ro.exports.func,Ro.exports.object,Ro.exports.bool])),Ro.exports.func,Ro.exports.object])});const lMt=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,cMt=["children"],uMt=Co({from:{opacity:0},to:{opacity:1}}),dMt=Co({"from, to":{"--scrollable":'" "'}}),pMt=ei("div",{name:"MuiDataGrid",slot:"ShadowScrollArea"})`
|
|
1054
1054
|
flex: 1;
|
|
1055
1055
|
display: flex;
|
|
1056
1056
|
flex-direction: column;
|