@zealicsolutions/web-ui 1.0.99-beta.12 → 1.0.99-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/organisms/CalendarOrganism/config/descriptors.d.ts +1 -1
  3. package/dist/esm/_virtual/index5.js +1 -1
  4. package/dist/esm/_virtual/index6.js +1 -1
  5. package/dist/esm/node_modules/@mui/material/esm/Accordion/Accordion.js +1 -1
  6. package/dist/esm/node_modules/@mui/material/esm/AccordionDetails/AccordionDetails.js +1 -1
  7. package/dist/esm/node_modules/@mui/material/esm/AccordionSummary/AccordionSummary.js +1 -1
  8. package/dist/esm/node_modules/@mui/material/esm/Alert/Alert.js +1 -1
  9. package/dist/esm/node_modules/@mui/material/esm/AlertTitle/AlertTitle.js +1 -1
  10. package/dist/esm/node_modules/@mui/material/esm/Autocomplete/Autocomplete.js +1 -1
  11. package/dist/esm/node_modules/@mui/material/esm/Avatar/Avatar.js +1 -1
  12. package/dist/esm/node_modules/@mui/material/esm/Backdrop/Backdrop.js +1 -1
  13. package/dist/esm/node_modules/@mui/material/esm/Badge/Badge.js +1 -1
  14. package/dist/esm/node_modules/@mui/material/esm/Box/Box.js +1 -1
  15. package/dist/esm/node_modules/@mui/material/esm/Button/Button.js +1 -1
  16. package/dist/esm/node_modules/@mui/material/esm/ButtonBase/ButtonBase.js +1 -1
  17. package/dist/esm/node_modules/@mui/material/esm/ButtonBase/Ripple.js +1 -1
  18. package/dist/esm/node_modules/@mui/material/esm/ButtonBase/TouchRipple.js +1 -1
  19. package/dist/esm/node_modules/@mui/material/esm/Card/Card.js +1 -1
  20. package/dist/esm/node_modules/@mui/material/esm/CardMedia/CardMedia.js +1 -1
  21. package/dist/esm/node_modules/@mui/material/esm/Checkbox/Checkbox.js +1 -1
  22. package/dist/esm/node_modules/@mui/material/esm/Chip/Chip.js +1 -1
  23. package/dist/esm/node_modules/@mui/material/esm/CircularProgress/CircularProgress.js +1 -1
  24. package/dist/esm/node_modules/@mui/material/esm/ClickAwayListener/ClickAwayListener.js +1 -1
  25. package/dist/esm/node_modules/@mui/material/esm/Collapse/Collapse.js +1 -1
  26. package/dist/esm/node_modules/@mui/material/esm/CssBaseline/CssBaseline.js +1 -1
  27. package/dist/esm/node_modules/@mui/material/esm/DefaultPropsProvider/DefaultPropsProvider.js +1 -1
  28. package/dist/esm/node_modules/@mui/material/esm/Dialog/Dialog.js +1 -1
  29. package/dist/esm/node_modules/@mui/material/esm/DialogActions/DialogActions.js +1 -1
  30. package/dist/esm/node_modules/@mui/material/esm/DialogContent/DialogContent.js +1 -1
  31. package/dist/esm/node_modules/@mui/material/esm/Divider/Divider.js +1 -1
  32. package/dist/esm/node_modules/@mui/material/esm/Drawer/Drawer.js +1 -1
  33. package/dist/esm/node_modules/@mui/material/esm/Fab/Fab.js +1 -1
  34. package/dist/esm/node_modules/@mui/material/esm/Fade/Fade.js +1 -1
  35. package/dist/esm/node_modules/@mui/material/esm/FilledInput/FilledInput.js +1 -1
  36. package/dist/esm/node_modules/@mui/material/esm/FormControl/FormControl.js +1 -1
  37. package/dist/esm/node_modules/@mui/material/esm/FormControlLabel/FormControlLabel.js +1 -1
  38. package/dist/esm/node_modules/@mui/material/esm/FormGroup/FormGroup.js +1 -1
  39. package/dist/esm/node_modules/@mui/material/esm/FormHelperText/FormHelperText.js +1 -1
  40. package/dist/esm/node_modules/@mui/material/esm/FormLabel/FormLabel.js +1 -1
  41. package/dist/esm/node_modules/@mui/material/esm/GlobalStyles/GlobalStyles.js +1 -1
  42. package/dist/esm/node_modules/@mui/material/esm/Grow/Grow.js +1 -1
  43. package/dist/esm/node_modules/@mui/material/esm/IconButton/IconButton.js +1 -1
  44. package/dist/esm/node_modules/@mui/material/esm/InitColorSchemeScript/InitColorSchemeScript.js +1 -1
  45. package/dist/esm/node_modules/@mui/material/esm/Input/Input.js +1 -1
  46. package/dist/esm/node_modules/@mui/material/esm/InputAdornment/InputAdornment.js +1 -1
  47. package/dist/esm/node_modules/@mui/material/esm/InputBase/InputBase.js +1 -1
  48. package/dist/esm/node_modules/@mui/material/esm/InputLabel/InputLabel.js +1 -1
  49. package/dist/esm/node_modules/@mui/material/esm/LinearProgress/LinearProgress.js +1 -1
  50. package/dist/esm/node_modules/@mui/material/esm/Link/Link.js +1 -1
  51. package/dist/esm/node_modules/@mui/material/esm/List/List.js +1 -1
  52. package/dist/esm/node_modules/@mui/material/esm/ListItem/ListItem.js +1 -1
  53. package/dist/esm/node_modules/@mui/material/esm/ListItemButton/ListItemButton.js +1 -1
  54. package/dist/esm/node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js +1 -1
  55. package/dist/esm/node_modules/@mui/material/esm/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
  56. package/dist/esm/node_modules/@mui/material/esm/ListItemText/ListItemText.js +1 -1
  57. package/dist/esm/node_modules/@mui/material/esm/ListSubheader/ListSubheader.js +1 -1
  58. package/dist/esm/node_modules/@mui/material/esm/Menu/Menu.js +1 -1
  59. package/dist/esm/node_modules/@mui/material/esm/MenuItem/MenuItem.js +1 -1
  60. package/dist/esm/node_modules/@mui/material/esm/MenuList/MenuList.js +1 -1
  61. package/dist/esm/node_modules/@mui/material/esm/Modal/Modal.js +1 -1
  62. package/dist/esm/node_modules/@mui/material/esm/NativeSelect/NativeSelectInput.js +1 -1
  63. package/dist/esm/node_modules/@mui/material/esm/OutlinedInput/NotchedOutline.js +1 -1
  64. package/dist/esm/node_modules/@mui/material/esm/OutlinedInput/OutlinedInput.js +1 -1
  65. package/dist/esm/node_modules/@mui/material/esm/Paper/Paper.js +1 -1
  66. package/dist/esm/node_modules/@mui/material/esm/Popover/Popover.js +1 -1
  67. package/dist/esm/node_modules/@mui/material/esm/Popper/BasePopper.js +1 -1
  68. package/dist/esm/node_modules/@mui/material/esm/Popper/Popper.js +1 -1
  69. package/dist/esm/node_modules/@mui/material/esm/Portal/Portal.js +1 -1
  70. package/dist/esm/node_modules/@mui/material/esm/Radio/Radio.js +1 -1
  71. package/dist/esm/node_modules/@mui/material/esm/Radio/RadioButtonIcon.js +1 -1
  72. package/dist/esm/node_modules/@mui/material/esm/RadioGroup/RadioGroup.js +1 -1
  73. package/dist/esm/node_modules/@mui/material/esm/Rating/Rating.js +1 -1
  74. package/dist/esm/node_modules/@mui/material/esm/Select/Select.js +1 -1
  75. package/dist/esm/node_modules/@mui/material/esm/Select/SelectInput.js +1 -1
  76. package/dist/esm/node_modules/@mui/material/esm/Skeleton/Skeleton.js +1 -1
  77. package/dist/esm/node_modules/@mui/material/esm/Slide/Slide.js +1 -1
  78. package/dist/esm/node_modules/@mui/material/esm/Slider/Slider.js +1 -1
  79. package/dist/esm/node_modules/@mui/material/esm/Slider/SliderValueLabel.js +1 -1
  80. package/dist/esm/node_modules/@mui/material/esm/SpeedDial/SpeedDial.js +1 -1
  81. package/dist/esm/node_modules/@mui/material/esm/SpeedDialAction/SpeedDialAction.js +1 -1
  82. package/dist/esm/node_modules/@mui/material/esm/SpeedDialIcon/SpeedDialIcon.js +1 -1
  83. package/dist/esm/node_modules/@mui/material/esm/Stack/Stack.js +1 -1
  84. package/dist/esm/node_modules/@mui/material/esm/Step/Step.js +1 -1
  85. package/dist/esm/node_modules/@mui/material/esm/StepConnector/StepConnector.js +1 -1
  86. package/dist/esm/node_modules/@mui/material/esm/StepContent/StepContent.js +1 -1
  87. package/dist/esm/node_modules/@mui/material/esm/StepIcon/StepIcon.js +1 -1
  88. package/dist/esm/node_modules/@mui/material/esm/StepLabel/StepLabel.js +1 -1
  89. package/dist/esm/node_modules/@mui/material/esm/Stepper/Stepper.js +1 -1
  90. package/dist/esm/node_modules/@mui/material/esm/SvgIcon/SvgIcon.js +1 -1
  91. package/dist/esm/node_modules/@mui/material/esm/Switch/Switch.js +1 -1
  92. package/dist/esm/node_modules/@mui/material/esm/Tab/Tab.js +1 -1
  93. package/dist/esm/node_modules/@mui/material/esm/TabScrollButton/TabScrollButton.js +1 -1
  94. package/dist/esm/node_modules/@mui/material/esm/TableCell/TableCell.js +1 -1
  95. package/dist/esm/node_modules/@mui/material/esm/TablePagination/TablePagination.js +1 -1
  96. package/dist/esm/node_modules/@mui/material/esm/TablePaginationActions/TablePaginationActions.js +1 -1
  97. package/dist/esm/node_modules/@mui/material/esm/Tabs/ScrollbarSize.js +1 -1
  98. package/dist/esm/node_modules/@mui/material/esm/Tabs/Tabs.js +1 -1
  99. package/dist/esm/node_modules/@mui/material/esm/TextField/TextField.js +1 -1
  100. package/dist/esm/node_modules/@mui/material/esm/TextareaAutosize/TextareaAutosize.js +1 -1
  101. package/dist/esm/node_modules/@mui/material/esm/ToggleButton/ToggleButton.js +1 -1
  102. package/dist/esm/node_modules/@mui/material/esm/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
  103. package/dist/esm/node_modules/@mui/material/esm/Toolbar/Toolbar.js +1 -1
  104. package/dist/esm/node_modules/@mui/material/esm/Tooltip/Tooltip.js +1 -1
  105. package/dist/esm/node_modules/@mui/material/esm/Typography/Typography.js +1 -1
  106. package/dist/esm/node_modules/@mui/material/esm/Unstable_TrapFocus/FocusTrap.js +1 -1
  107. package/dist/esm/node_modules/@mui/material/esm/Zoom/Zoom.js +1 -1
  108. package/dist/esm/node_modules/@mui/material/esm/internal/SwitchBase.js +1 -1
  109. package/dist/esm/node_modules/@mui/private-theming/esm/ThemeProvider/ThemeProvider.js +1 -1
  110. package/dist/esm/node_modules/@mui/styled-engine/esm/GlobalStyles/GlobalStyles.js +1 -1
  111. package/dist/esm/node_modules/@mui/styled-engine/esm/StyledEngineProvider/StyledEngineProvider.js +1 -1
  112. package/dist/esm/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js +1 -1
  113. package/dist/esm/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js +1 -1
  114. package/dist/esm/node_modules/@mui/system/esm/RtlProvider/index.js +1 -1
  115. package/dist/esm/node_modules/@mui/system/esm/Stack/createStack.js +1 -1
  116. package/dist/esm/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js +1 -1
  117. package/dist/esm/node_modules/@mui/system/esm/cssVars/createCssVarsProvider.js +1 -1
  118. package/dist/esm/node_modules/@mui/system/esm/responsivePropType/responsivePropType.js +1 -1
  119. package/dist/esm/node_modules/@mui/utils/esm/deepmerge/deepmerge.js +1 -1
  120. package/dist/esm/node_modules/@mui/utils/esm/elementAcceptingRef/elementAcceptingRef.js +1 -1
  121. package/dist/esm/node_modules/@mui/utils/esm/elementTypeAcceptingRef/elementTypeAcceptingRef.js +1 -1
  122. package/dist/esm/node_modules/@mui/utils/esm/getDisplayName/getDisplayName.js +1 -1
  123. package/dist/esm/node_modules/@mui/utils/esm/refType/refType.js +1 -1
  124. package/dist/esm/node_modules/@mui/utils/node_modules/react-is/cjs/react-is.development.js +1 -1
  125. package/dist/esm/node_modules/@mui/utils/node_modules/react-is/index.js +1 -1
  126. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/GridColumnHeaders.js +1 -1
  127. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/GridColumnSortButton.js +1 -1
  128. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/GridFooter.js +1 -1
  129. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/GridLoadingOverlay.js +1 -1
  130. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/GridNoColumnsOverlay.js +1 -1
  131. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/GridNoRowsOverlay.js +1 -1
  132. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/GridPagination.js +1 -1
  133. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/GridRow.js +1 -1
  134. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/GridRowCount.js +1 -1
  135. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/GridSelectedRowCount.js +1 -1
  136. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/GridShadowScrollArea.js +1 -1
  137. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/base/GridOverlays.js +1 -1
  138. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/cell/GridActionsCell.js +1 -1
  139. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/cell/GridBooleanCell.js +1 -1
  140. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/cell/GridCell.js +1 -1
  141. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/cell/GridEditBooleanCell.js +1 -1
  142. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/cell/GridEditDateCell.js +1 -1
  143. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/cell/GridEditInputCell.js +1 -1
  144. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/cell/GridEditSingleSelectCell.js +1 -1
  145. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/cell/GridSkeletonCell.js +1 -1
  146. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -1
  147. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/columnHeaders/GridColumnHeaderItem.js +1 -1
  148. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
  149. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
  150. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
  151. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  152. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/columnSelection/GridHeaderCheckbox.js +1 -1
  153. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/columnsManagement/GridColumnsManagement.js +1 -1
  154. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/columnsPanel/ColumnsPanelTrigger.js +1 -1
  155. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/containers/GridFooterContainer.js +1 -1
  156. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/containers/GridOverlay.js +1 -1
  157. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/containers/GridRoot.js +1 -1
  158. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/export/ExportCsv.js +1 -1
  159. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/export/ExportPrint.js +1 -1
  160. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/filterPanel/FilterPanelTrigger.js +1 -1
  161. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/menu/GridMenu.js +1 -1
  162. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  163. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/menu/columnMenu/GridColumnMenu.js +1 -1
  164. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/menu/columnMenu/GridColumnMenuContainer.js +1 -1
  165. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +1 -1
  166. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
  167. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
  168. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
  169. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
  170. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/panel/GridPanel.js +1 -1
  171. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/panel/GridPanelContent.js +1 -1
  172. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/panel/GridPanelFooter.js +1 -1
  173. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/panel/filterPanel/GridFilterForm.js +1 -1
  174. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  175. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/panel/filterPanel/GridFilterInputDate.js +1 -1
  176. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  177. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  178. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
  179. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/panel/filterPanel/GridFilterInputValue.js +1 -1
  180. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/panel/filterPanel/GridFilterPanel.js +1 -1
  181. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/quickFilter/QuickFilter.js +1 -1
  182. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/quickFilter/QuickFilterClear.js +1 -1
  183. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/quickFilter/QuickFilterControl.js +1 -1
  184. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/quickFilter/QuickFilterTrigger.js +1 -1
  185. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/toolbar/GridToolbarExport.js +1 -1
  186. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/toolbar/GridToolbarExportContainer.js +1 -1
  187. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/toolbar/GridToolbarQuickFilter.js +1 -1
  188. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/toolbarV8/GridToolbar.js +1 -1
  189. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/toolbarV8/Toolbar.js +1 -1
  190. package/dist/esm/node_modules/@mui/x-data-grid/esm/components/toolbarV8/ToolbarButton.js +1 -1
  191. package/dist/esm/node_modules/@mui/x-data-grid-pro/esm/DataGridPro/DataGridPro.js +1 -1
  192. package/dist/esm/node_modules/@mui/x-data-grid-pro/esm/components/GridColumnHeaders.js +1 -1
  193. package/dist/esm/node_modules/@mui/x-data-grid-pro/esm/components/GridColumnMenuPinningItem.js +1 -1
  194. package/dist/esm/node_modules/@mui/x-data-grid-pro/esm/components/GridDetailPanelToggleCell.js +1 -1
  195. package/dist/esm/node_modules/@mui/x-data-grid-pro/esm/components/GridRowReorderCell.js +1 -1
  196. package/dist/esm/node_modules/@mui/x-data-grid-pro/esm/components/GridTreeDataGroupingCell.js +1 -1
  197. package/dist/esm/node_modules/@mui/x-data-grid-pro/esm/components/headerFiltering/GridHeaderFilterCell.js +1 -1
  198. package/dist/esm/node_modules/@mui/x-data-grid-pro/esm/components/headerFiltering/GridHeaderFilterMenu.js +1 -1
  199. package/dist/esm/node_modules/@mui/x-data-grid-pro/esm/components/headerFiltering/GridHeaderFilterMenuContainer.js +1 -1
  200. package/dist/esm/node_modules/@mui/x-date-pickers/esm/DateCalendar/DateCalendar.js +1 -1
  201. package/dist/esm/node_modules/@mui/x-date-pickers/esm/DateField/DateField.js +1 -1
  202. package/dist/esm/node_modules/@mui/x-date-pickers/esm/DatePicker/DatePicker.js +1 -1
  203. package/dist/esm/node_modules/@mui/x-date-pickers/esm/DatePicker/DatePickerToolbar.js +1 -1
  204. package/dist/esm/node_modules/@mui/x-date-pickers/esm/DesktopDatePicker/DesktopDatePicker.js +1 -1
  205. package/dist/esm/node_modules/@mui/x-date-pickers/esm/DesktopTimePicker/DesktopTimePicker.js +1 -1
  206. package/dist/esm/node_modules/@mui/x-date-pickers/esm/DigitalClock/DigitalClock.js +1 -1
  207. package/dist/esm/node_modules/@mui/x-date-pickers/esm/LocalizationProvider/LocalizationProvider.js +1 -1
  208. package/dist/esm/node_modules/@mui/x-date-pickers/esm/MobileDatePicker/MobileDatePicker.js +1 -1
  209. package/dist/esm/node_modules/@mui/x-date-pickers/esm/MobileTimePicker/MobileTimePicker.js +1 -1
  210. package/dist/esm/node_modules/@mui/x-date-pickers/esm/MonthCalendar/MonthCalendar.js +1 -1
  211. package/dist/esm/node_modules/@mui/x-date-pickers/esm/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -1
  212. package/dist/esm/node_modules/@mui/x-date-pickers/esm/PickersActionBar/PickersActionBar.js +1 -1
  213. package/dist/esm/node_modules/@mui/x-date-pickers/esm/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
  214. package/dist/esm/node_modules/@mui/x-date-pickers/esm/PickersDay/PickersDay.js +1 -1
  215. package/dist/esm/node_modules/@mui/x-date-pickers/esm/PickersLayout/PickersLayout.js +1 -1
  216. package/dist/esm/node_modules/@mui/x-date-pickers/esm/PickersSectionList/PickersSectionList.js +1 -1
  217. package/dist/esm/node_modules/@mui/x-date-pickers/esm/PickersShortcuts/PickersShortcuts.js +1 -1
  218. package/dist/esm/node_modules/@mui/x-date-pickers/esm/PickersTextField/PickersFilledInput/PickersFilledInput.js +1 -1
  219. package/dist/esm/node_modules/@mui/x-date-pickers/esm/PickersTextField/PickersInput/PickersInput.js +1 -1
  220. package/dist/esm/node_modules/@mui/x-date-pickers/esm/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
  221. package/dist/esm/node_modules/@mui/x-date-pickers/esm/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +1 -1
  222. package/dist/esm/node_modules/@mui/x-date-pickers/esm/PickersTextField/PickersTextField.js +1 -1
  223. package/dist/esm/node_modules/@mui/x-date-pickers/esm/TimeClock/TimeClock.js +1 -1
  224. package/dist/esm/node_modules/@mui/x-date-pickers/esm/TimeField/TimeField.js +1 -1
  225. package/dist/esm/node_modules/@mui/x-date-pickers/esm/TimePicker/TimePicker.js +1 -1
  226. package/dist/esm/node_modules/@mui/x-date-pickers/esm/TimePicker/TimePickerToolbar.js +1 -1
  227. package/dist/esm/node_modules/@mui/x-date-pickers/esm/YearCalendar/YearCalendar.js +1 -1
  228. package/dist/esm/node_modules/prop-types/index.js +1 -1
  229. package/dist/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +1 -1
  230. package/dist/esm/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  231. package/dist/esm/node_modules/react-transition-group/esm/CSSTransition.js +1 -1
  232. package/dist/esm/node_modules/react-transition-group/esm/ReplaceTransition.js +1 -1
  233. package/dist/esm/node_modules/react-transition-group/esm/SwitchTransition.js +1 -1
  234. package/dist/esm/node_modules/react-transition-group/esm/Transition.js +1 -1
  235. package/dist/esm/node_modules/react-transition-group/esm/TransitionGroup.js +1 -1
  236. package/dist/esm/node_modules/react-transition-group/esm/utils/PropTypes.js +1 -1
  237. package/dist/esm/organisms/CalendarOrganism/config/descriptors.d.ts +1 -1
  238. package/dist/esm/organisms/CalendarOrganism/config/descriptors.js +1 -1
  239. package/dist/index.d.ts +1 -1
  240. package/package.json +1 -1
package/dist/cjs/index.js CHANGED
@@ -9705,5 +9705,5 @@ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toS
9705
9705
  animation-direction: reverse;
9706
9706
  animation-range: calc(100% - 4px) 100%;
9707
9707
  }
9708
- `,V4t=QGt(function(e,r){const{children:n}=e,o=Hi(e,F4t);return t.jsx(B4t,S({},o,{ref:r,children:n}))});"production"!==process.env.NODE_ENV&&(V4t.displayName="GridShadowScrollArea"),"production"!==process.env.NODE_ENV&&(V4t.propTypes={children:Vt.exports.node});const H4t=new Intl.Collator;function $4t(e){const r=iYt(),n=s.useRef(null),o=SYt(r,UKt),a=SYt(r,WKt),i=eYt(),[l,c]=s.useState(""),u=(e=>{const{classes:t}=e;return ua({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},rYt,t)})(i),d=SYt(r,qKt),p=SYt(r,l1t),h=SYt(r,u1t),f=s.useMemo(()=>p?Array.from(h.values()):d,[p,h,d]),{sort:m,searchPredicate:v=A4t,autoFocusSearchField:y=!0,disableShowHideToggle:g=!1,disableResetButton:x=!1,toggleAllMode:b="all",getTogglableColumns:k,searchInputProps:w}=e,_=s.useMemo(()=>((e,t)=>{const r=new Set(Object.keys(e).filter(t=>!1===e[t])),n=new Set(Object.keys(t).filter(e=>!1===t[e]));if(r.size!==n.size)return!1;let o=!0;return r.forEach(e=>{n.has(e)||(o=!1)}),o})(a,o),[a,o]),C=s.useMemo(()=>{switch(m){case"asc":return[...f].sort((e,t)=>H4t.compare(e.headerName||e.field,t.headerName||t.field));case"desc":return[...f].sort((e,t)=>-H4t.compare(e.headerName||e.field,t.headerName||t.field));default:return f}},[f,m]),M=e=>{const{name:t}=e.target;r.current.setColumnVisibility(t,!1===a[t])},D=s.useMemo(()=>{const e=k?k(C):null,t=e?C.filter(({field:t})=>e.includes(t)):C;return l?t.filter(e=>v(e,l.toLowerCase())):t},[C,l,v,k]),O=s.useCallback(e=>{const t=S({},WKt(r)),n=k?k(f):null;return("filteredOnly"===b?D:f).forEach(r=>{r.hideable&&(null==n||n.includes(r.field))&&(e?delete t[r.field]:t[r.field]=!1)}),r.current.setColumnVisibilityModel(t)},[r,f,k,b,D]),P=s.useCallback(e=>{c(e.target.value)},[]),E=s.useMemo(()=>D.filter(e=>e.hideable),[D]),j=s.useMemo(()=>E.every(e=>null==a[e.field]||!1!==a[e.field]),[a,E]),T=s.useMemo(()=>E.every(e=>!1===a[e.field]),[a,E]),N=s.useRef(null);s.useEffect(()=>{y?n.current?.focus():N.current&&"function"==typeof N.current.focus&&N.current.focus()},[y]);let R=!1;const z=e=>!1===R&&!1!==e.hideable&&(R=!0,!0),A=s.useCallback(()=>{c(""),n.current?.focus()},[]);return t.jsxs(s.Fragment,{children:[t.jsx(U4t,{className:u.header,ownerState:i,children:t.jsx(G4t,S({as:i.slots.baseTextField,ownerState:i,placeholder:r.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,className:u.searchInput,value:l,onChange:P,size:"small",type:"search",slotProps:{input:{startAdornment:t.jsx(i.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:t.jsx(i.slots.baseIconButton,S({size:"small","aria-label":r.current.getLocaleText("columnsManagementDeleteIconLabel"),style:l?{visibility:"visible"}:{visibility:"hidden"},tabIndex:-1,onClick:A,edge:"end"},i.slotProps?.baseIconButton,{children:t.jsx(i.slots.quickFilterClearIcon,{fontSize:"small"})}))},htmlInput:{"aria-label":r.current.getLocaleText("columnsManagementSearchTitle")}},autoComplete:"off",fullWidth:!0},i.slotProps?.baseTextField,w))}),t.jsx(W4t,{ownerState:i,children:t.jsxs(q4t,{className:u.root,ownerState:i,children:[D.map(e=>t.jsx(i.slots.baseCheckbox,S({className:u.row,disabled:!1===e.hideable||p,checked:!1!==a[e.field],onChange:M,name:e.field,inputRef:z(e)?N:void 0,label:e.headerName||e.field,density:"compact",fullWidth:!0},i.slotProps?.baseCheckbox),e.field)),0===D.length&&t.jsx(K4t,{ownerState:i,children:r.current.getLocaleText("columnsManagementNoColumns")})]})}),g&&x?null:t.jsxs(Y4t,{ownerState:i,className:u.footer,children:[g?t.jsx("span",{}):t.jsx(i.slots.baseCheckbox,S({disabled:0===E.length||p,checked:j,indeterminate:!j&&!T,onChange:()=>O(!j),name:r.current.getLocaleText("columnsManagementShowHideAllText"),label:r.current.getLocaleText("columnsManagementShowHideAllText"),density:"compact"},i.slotProps?.baseCheckbox)),x?null:t.jsx(i.slots.baseButton,S({onClick:()=>r.current.setColumnVisibilityModel(o),disabled:_||p},i.slotProps?.baseButton,{children:r.current.getLocaleText("columnsManagementReset")}))]})]})}"production"!==process.env.NODE_ENV&&($4t.propTypes={autoFocusSearchField:Vt.exports.bool,disableResetButton:Vt.exports.bool,disableShowHideToggle:Vt.exports.bool,getTogglableColumns:Vt.exports.func,searchInputProps:Vt.exports.object,searchPredicate:Vt.exports.func,sort:Vt.exports.oneOf(["asc","desc"]),toggleAllMode:Vt.exports.oneOf(["all","filteredOnly"])});const q4t=ii("div",{name:"MuiDataGrid",slot:"ColumnsManagement"})({display:"flex",flexDirection:"column",padding:RYt.spacing(.5,1.5)}),W4t=ii(V4t,{name:"MuiDataGrid",slot:"ColumnsManagementScrollArea"})({maxHeight:300}),U4t=ii("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader"})({padding:RYt.spacing(1.5,2),borderBottom:`1px solid ${RYt.colors.border.base}`}),G4t=ii(EYt,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput"})({[`& .${Nd.input}::-webkit-search-decoration,\n & .${Nd.input}::-webkit-search-cancel-button,\n & .${Nd.input}::-webkit-search-results-button,\n & .${Nd.input}::-webkit-search-results-decoration`]:{display:"none"}}),Y4t=ii("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter"})({padding:RYt.spacing(1,1,1,1.5),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${RYt.colors.border.base}`}),K4t=ii("div",{name:"MuiDataGrid",slot:"ColumnsManagementEmptyText"})({padding:RYt.spacing(1,0),alignSelf:"center",font:RYt.typography.font.body}),Z4t=QGt(function(e,r){const{children:n,slotProps:o={}}=e,a=o.button||{},i=o.tooltip||{},l=iYt(),c=eYt(),u=Go(),d=Go(),[p,h]=s.useState(!1),f=s.useRef(null),m=Ri(r,f),v=()=>h(!1);return null==n?null:t.jsxs(s.Fragment,{children:[t.jsx(c.slots.baseTooltip,S({title:l.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},c.slotProps?.baseTooltip,i,{children:t.jsx(c.slots.baseButton,S({size:"small",startIcon:t.jsx(c.slots.exportIcon,{}),"aria-expanded":p,"aria-label":l.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":p?d:void 0,id:u},c.slotProps?.baseButton,a,{onClick:e=>{h(e=>!e),a.onClick?.(e)},ref:m,children:l.current.getLocaleText("toolbarExport")}))})),t.jsx(EZt,{open:p,target:f.current,onClose:v,position:"bottom-end",children:t.jsx(c.slots.baseMenuList,{id:d,className:nYt.menuList,"aria-labelledby":u,autoFocusItem:p,children:s.Children.map(n,e=>s.isValidElement(e)?s.cloneElement(e,{hideMenu:v}):e)})})]})});"production"!==process.env.NODE_ENV&&(Z4t.displayName="GridToolbarExportContainer"),"production"!==process.env.NODE_ENV&&(Z4t.propTypes={slotProps:Vt.exports.object});const X4t=["hideMenu","options"],Q4t=["hideMenu","options"],J4t=["csvOptions","printOptions","excelOptions"];function e5t(e){const r=iYt(),n=eYt(),{hideMenu:o,options:a}=e,i=Hi(e,X4t);return t.jsx(n.slots.baseMenuItem,S({onClick:()=>{r.current.exportDataAsCsv(a),o?.()}},i,{children:r.current.getLocaleText("toolbarExportCSV")}))}function t5t(e){const r=iYt(),n=eYt(),{hideMenu:o,options:a}=e,i=Hi(e,Q4t);return t.jsx(n.slots.baseMenuItem,S({onClick:()=>{r.current.exportDataAsPrint(a),o?.()}},i,{children:r.current.getLocaleText("toolbarExportPrint")}))}"production"!==process.env.NODE_ENV&&(e5t.propTypes={hideMenu:Vt.exports.func,options:Vt.exports.shape({allColumns:Vt.exports.bool,delimiter:Vt.exports.string,disableToolbarButton:Vt.exports.bool,escapeFormulas:Vt.exports.bool,fields:Vt.exports.arrayOf(Vt.exports.string),fileName:Vt.exports.string,getRowsToExport:Vt.exports.func,includeColumnGroupsHeaders:Vt.exports.bool,includeHeaders:Vt.exports.bool,shouldAppendQuotes:Vt.exports.bool,utf8WithBom:Vt.exports.bool})}),"production"!==process.env.NODE_ENV&&(t5t.propTypes={hideMenu:Vt.exports.func,options:Vt.exports.shape({allColumns:Vt.exports.bool,bodyClassName:Vt.exports.string,copyStyles:Vt.exports.bool,disableToolbarButton:Vt.exports.bool,fields:Vt.exports.arrayOf(Vt.exports.string),fileName:Vt.exports.string,getRowsToExport:Vt.exports.func,hideFooter:Vt.exports.bool,hideToolbar:Vt.exports.bool,includeCheckboxes:Vt.exports.bool,pageStyle:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string])})});const r5t=QGt(function(e,r){const n=e,{csvOptions:o={},printOptions:a={},excelOptions:i}=n,l=Hi(n,J4t),c=iYt().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:i,csvOptions:o,printOptions:a}).sort((e,t)=>e.componentName>t.componentName?1:-1);return 0===c.length?null:t.jsx(Z4t,S({},l,{ref:r,children:c.map((e,t)=>s.cloneElement(e.component,{key:t}))}))});function n5t(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const r=e.length;if(r!==t.length)return!1;for(let n=0;n<r;n+=1)if(!n5t(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const r=Array.from(e.entries());for(let e=0;e<r.length;e+=1)if(!t.has(r[e][0]))return!1;for(let e=0;e<r.length;e+=1){const n=r[e];if(!n5t(n[1],t.get(n[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const r=Array.from(e.entries());for(let e=0;e<r.length;e+=1)if(!t.has(r[e][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const r=e.length;if(r!==t.length)return!1;for(let n=0;n<r;n+=1)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=r.length;if(n!==Object.keys(t).length)return!1;for(let e=0;e<n;e+=1)if(!Object.prototype.hasOwnProperty.call(t,r[e]))return!1;for(let o=0;o<n;o+=1){const n=r[o];if(!n5t(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}"production"!==process.env.NODE_ENV&&(r5t.displayName="GridToolbarExport"),"production"!==process.env.NODE_ENV&&(r5t.propTypes={csvOptions:Vt.exports.object,printOptions:Vt.exports.object,slotProps:Vt.exports.object});const o5t=s.createContext(void 0);function a5t(){const e=s.useContext(o5t);if(void 0===e)throw new Error("MUI X: Missing context. Quick Filter subcomponents must be placed within a <QuickFilter /> component.");return e}"production"!==process.env.NODE_ENV&&(o5t.displayName="QuickFilterContext");const i5t=["render","className","parser","formatter","debounceMs","defaultExpanded","expanded","onExpandedChange"],s5t=e=>e.split(" ").filter(e=>""!==e),l5t=e=>e.join(" ");function c5t(e){const r=eYt(),{render:n,className:o,parser:a=s5t,formatter:i=l5t,debounceMs:l=r.filterDebounceMs,defaultExpanded:c,expanded:u,onExpandedChange:d}=e,p=Hi(e,i5t),h=iYt(),f=s.useRef(null),m=s.useRef(null),v=SYt(h,wXt),[y,g]=s.useState(i(v??[])),[x,b]=s.useState(c??y.length>0),k=u??x,w=s.useMemo(()=>({value:y,expanded:k}),[y,k]),_="function"==typeof o?o(w):o,C=s.useRef(null),M=Go(),D=s.useCallback(e=>{d&&d(e),void 0===u&&b(e)},[d,u]),O=s.useRef(v);s.useEffect(()=>{n5t(O.current,v)||(O.current=v,g(e=>n5t(a(e),v)?e:i(v??[])))},[v,i,a]);const P=s.useRef(!0),E=s.useRef(k);s.useEffect(()=>{P.current?P.current=!1:E.current!==k&&(k?requestAnimationFrame(()=>{f.current?.focus({preventScroll:!0})}):m.current?.focus({preventScroll:!0}),E.current=k)},[k]);const j=s.useMemo(()=>Di(e=>{const t=a(e);O.current=t,h.current.setQuickFilterValues(t)},l),[h,l,a]);s.useEffect(()=>j.clear,[j]);const T=s.useCallback(e=>{const t=e.target.value;g(t),j(t)},[j]),N=s.useCallback(()=>{g(""),h.current.setQuickFilterValues([]),f.current?.focus()},[h,f]),R=s.useMemo(()=>({controlRef:f,triggerRef:m,state:w,controlId:M,clearValue:N,onValueChange:T,onExpandedChange:D}),[M,w,T,N,D]);po(()=>{C.current&&m.current&&C.current.style.setProperty("--trigger-width",`${m.current?.offsetWidth}px`)},[]);const z=T0t("div",n,S({className:_},p,{ref:C}),w);return t.jsx(o5t.Provider,{value:R,children:z})}"production"!==process.env.NODE_ENV&&(c5t.propTypes={className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),debounceMs:Vt.exports.number,defaultExpanded:Vt.exports.bool,expanded:Vt.exports.bool,formatter:Vt.exports.func,onExpandedChange:Vt.exports.func,parser:Vt.exports.func,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func])});const u5t=["render","className","slotProps","onKeyDown","onChange"],d5t=QGt(function(e,r){const{render:n,className:o,slotProps:a,onKeyDown:i,onChange:l}=e,c=Hi(e,u5t),u=eYt(),{state:d,controlId:p,controlRef:h,onValueChange:f,onExpandedChange:m,clearValue:v}=a5t(),y="function"==typeof o?o(d):o,g=Ri(h,r),x=T0t(u.slots.baseTextField,n,S({},u.slotProps?.baseTextField,{slotProps:S({htmlInput:S({role:"searchbox",id:p,tabIndex:d.expanded?void 0:-1},a?.htmlInput,{onBlur:e=>{""===d.value&&m(!1),a?.htmlInput?.onBlur?.(e)}})},a),value:d.value,className:y},c,{onChange:e=>{d.expanded||m(!0),f(e),l?.(e)},onKeyDown:e=>{"Escape"===e.key&&(""===d.value?m(!1):v()),i?.(e)},ref:g}),d);return t.jsx(s.Fragment,{children:x})});"production"!==process.env.NODE_ENV&&(d5t.displayName="QuickFilterControl"),"production"!==process.env.NODE_ENV&&(d5t.propTypes={autoComplete:Vt.exports.string,autoFocus:Vt.exports.bool,className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),color:Vt.exports.oneOf(["error","primary"]),disabled:Vt.exports.bool,error:Vt.exports.bool,fullWidth:Vt.exports.bool,helperText:Vt.exports.string,id:Vt.exports.string,inputRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.object})]),label:Vt.exports.node,multiline:Vt.exports.bool,placeholder:Vt.exports.string,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["medium","small"]),slotProps:Vt.exports.object,style:Vt.exports.object,tabIndex:Vt.exports.number,type:Vt.exports.oneOfType([Vt.exports.oneOf(["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"]),Vt.exports.object]),value:Vt.exports.string});const p5t=["render","className","onClick"],h5t=QGt(function(e,r){const{render:n,className:o,onClick:a}=e,i=Hi(e,p5t),l=eYt(),{state:c,clearValue:u}=a5t(),d="function"==typeof o?o(c):o,p=T0t(l.slots.baseIconButton,n,S({},l.slotProps?.baseIconButton,{className:d,tabIndex:-1},i,{onClick:e=>{u(),a?.(e)},ref:r}),c);return t.jsx(s.Fragment,{children:p})});"production"!==process.env.NODE_ENV&&(h5t.displayName="QuickFilterClear"),"production"!==process.env.NODE_ENV&&(h5t.propTypes={className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),color:Vt.exports.oneOf(["default","inherit","primary"]),disabled:Vt.exports.bool,edge:Vt.exports.oneOf(["end","start",!1]),id:Vt.exports.string,label:Vt.exports.string,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const f5t=["render","className","onClick"],m5t=QGt(function(e,r){const{render:n,className:o,onClick:a}=e,i=Hi(e,f5t),l=eYt(),{state:c,controlId:u,onExpandedChange:d,triggerRef:p}=a5t(),h="function"==typeof o?o(c):o,f=Ri(p,r),m=T0t(l.slots.baseButton,n,S({},l.slotProps?.baseButton,{className:h,"aria-controls":u,"aria-expanded":c.expanded},i,{onClick:e=>{d(!c.expanded),a?.(e)},ref:f}),c);return t.jsx(s.Fragment,{children:m})});"production"!==process.env.NODE_ENV&&(m5t.displayName="QuickFilterTrigger"),"production"!==process.env.NODE_ENV&&(m5t.propTypes={className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),disabled:Vt.exports.bool,id:Vt.exports.string,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),startIcon:Vt.exports.node,style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const v5t=["quickFilterParser","quickFilterFormatter","debounceMs","className","slotProps"],y5t=["ref","slotProps"],g5t=so("div",{name:"MuiDataGrid",slot:"ToolbarQuickFilter"})({display:"grid",alignItems:"center"}),x5t=so(L0t,{name:"MuiDataGrid",slot:"ToolbarQuickFilterTrigger"})(({ownerState:e})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:e.expanded?0:1,pointerEvents:e.expanded?"none":"auto",transition:RYt.transition(["opacity"])})),b5t=so(e=>{throw new Error("Failed assertion: should not be rendered")},{name:"MuiDataGrid",slot:"ToolbarQuickFilterControl"})(({ownerState:e})=>({gridArea:"1 / 1",overflowX:"clip",width:e.expanded?260:"var(--trigger-width)",opacity:e.expanded?1:0,transition:RYt.transition(["width","opacity"])}));function k5t(e){const r=iYt(),n=eYt(),o={classes:n.classes,expanded:!1},a=(e=>{const{classes:t}=e;return ua({root:["toolbarQuickFilter"],trigger:["toolbarQuickFilterTrigger"],control:["toolbarQuickFilterControl"]},rYt,t)})(o),{quickFilterParser:i,quickFilterFormatter:s,debounceMs:l,className:c,slotProps:u}=e,d=Hi(e,v5t);return t.jsx(c5t,{parser:i,formatter:s,debounceMs:l,render:(e,i)=>{const s=S({},o,{expanded:i.expanded});return t.jsxs(g5t,S({},e,{className:Wn(a.root,c),children:[t.jsx(m5t,{render:e=>t.jsx(n.slots.baseTooltip,{title:r.current.getLocaleText("toolbarQuickFilterLabel"),enterDelay:0,children:t.jsx(x5t,S({className:a.trigger},e,{ownerState:s,color:"default","aria-disabled":i.expanded,children:t.jsx(n.slots.quickFilterIcon,{fontSize:"small"})}))})}),t.jsx(d5t,{render:e=>{let{ref:o,slotProps:i}=e,l=Hi(e,y5t);return t.jsx(b5t,S({as:n.slots.baseTextField,className:a.control,ownerState:s,inputRef:o,"aria-label":r.current.getLocaleText("toolbarQuickFilterLabel"),placeholder:r.current.getLocaleText("toolbarQuickFilterPlaceholder"),size:"small",slotProps:S({input:S({startAdornment:t.jsx(n.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:l.value?t.jsx(h5t,{render:t.jsx(n.slots.baseIconButton,{size:"small",edge:"end","aria-label":r.current.getLocaleText("toolbarQuickFilterDeleteIconLabel"),children:t.jsx(n.slots.quickFilterClearIcon,{fontSize:"small"})})}):null},i?.input)},i)},n.slotProps?.baseTextField,l,u?.root,d))}})]}))}})}"production"!==process.env.NODE_ENV&&(k5t.propTypes={className:Vt.exports.string,debounceMs:Vt.exports.number,quickFilterFormatter:Vt.exports.func,quickFilterParser:Vt.exports.func,slotProps:Vt.exports.object});const w5t=["render","className","onClick","onPointerUp"],_5t=QGt(function(e,r){const{render:n,className:o,onClick:a,onPointerUp:i}=e,l=Hi(e,w5t),c=eYt(),u=Go(),d=Go(),p=iYt(),h=SYt(p,N1t),f=h.open&&h.openedPanelValue===z1t.filters,m=SYt(p,AXt).length,v={open:f,filterCount:m},y="function"==typeof o?o(v):o,{filterPanelTriggerRef:g}=x0t(),x=Ri(r,g),b=T0t(c.slots.baseButton,n,S({},c.slotProps?.baseButton,{id:u,"aria-haspopup":"true","aria-expanded":f?"true":void 0,"aria-controls":f?d:void 0,onClick:e=>{f?p.current.hidePreferences():p.current.showPreferences(z1t.filters,d,u),a?.(e)},onPointerUp:e=>{f&&e.stopPropagation(),i?.(e)},className:y},l,{ref:x}),v);return t.jsx(s.Fragment,{children:b})});"production"!==process.env.NODE_ENV&&(_5t.displayName="FilterPanelTrigger"),"production"!==process.env.NODE_ENV&&(_5t.propTypes={className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),disabled:Vt.exports.bool,id:Vt.exports.string,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),startIcon:Vt.exports.node,style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const C5t=["render","className","onClick","onPointerUp"],M5t=QGt(function(e,r){const{render:n,className:o,onClick:a,onPointerUp:i}=e,l=Hi(e,C5t),c=eYt(),u=Go(),d=Go(),p=iYt(),h=SYt(p,N1t),f=h.open&&h.openedPanelValue===z1t.columns,m={open:f},v="function"==typeof o?o(m):o,{columnsPanelTriggerRef:y}=x0t(),g=Ri(r,y),x=T0t(c.slots.baseButton,n,S({},c.slotProps?.baseButton,{id:u,"aria-haspopup":"true","aria-expanded":f?"true":void 0,"aria-controls":f?d:void 0,className:v},l,{onPointerUp:e=>{f&&e.stopPropagation(),i?.(e)},onClick:e=>{f?p.current.hidePreferences():p.current.showPreferences(z1t.columns,d,u),a?.(e)},ref:g}),m);return t.jsx(s.Fragment,{children:x})});"production"!==process.env.NODE_ENV&&(M5t.displayName="ColumnsPanelTrigger"),"production"!==process.env.NODE_ENV&&(M5t.propTypes={className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),disabled:Vt.exports.bool,id:Vt.exports.string,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),startIcon:Vt.exports.node,style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const S5t=["render","options","onClick"],D5t=QGt(function(e,r){const{render:n,options:o,onClick:a}=e,i=Hi(e,S5t),l=eYt(),c=iYt(),u=T0t(l.slots.baseButton,n,S({},l.slotProps?.baseButton,{onClick:e=>{c.current.exportDataAsCsv(o),a?.(e)}},i,{ref:r}));return t.jsx(s.Fragment,{children:u})});"production"!==process.env.NODE_ENV&&(D5t.displayName="ExportCsv"),"production"!==process.env.NODE_ENV&&(D5t.propTypes={className:Vt.exports.string,disabled:Vt.exports.bool,id:Vt.exports.string,options:Vt.exports.shape({allColumns:Vt.exports.bool,delimiter:Vt.exports.string,escapeFormulas:Vt.exports.bool,fields:Vt.exports.arrayOf(Vt.exports.string),fileName:Vt.exports.string,getRowsToExport:Vt.exports.func,includeColumnGroupsHeaders:Vt.exports.bool,includeHeaders:Vt.exports.bool,shouldAppendQuotes:Vt.exports.bool,utf8WithBom:Vt.exports.bool}),render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),startIcon:Vt.exports.node,style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const O5t=["render","options","onClick"],P5t=QGt(function(e,r){const{render:n,options:o,onClick:a}=e,i=Hi(e,O5t),l=eYt(),c=iYt(),u=T0t(l.slots.baseButton,n,S({},l.slotProps?.baseButton,{onClick:e=>{c.current.exportDataAsPrint(o),a?.(e)}},i,{ref:r}));return t.jsx(s.Fragment,{children:u})});"production"!==process.env.NODE_ENV&&(P5t.displayName="ExportPrint"),"production"!==process.env.NODE_ENV&&(P5t.propTypes={className:Vt.exports.string,disabled:Vt.exports.bool,id:Vt.exports.string,options:Vt.exports.shape({allColumns:Vt.exports.bool,bodyClassName:Vt.exports.string,copyStyles:Vt.exports.bool,fields:Vt.exports.arrayOf(Vt.exports.string),fileName:Vt.exports.string,getRowsToExport:Vt.exports.func,hideFooter:Vt.exports.bool,hideToolbar:Vt.exports.bool,includeCheckboxes:Vt.exports.bool,pageStyle:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string])}),render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),startIcon:Vt.exports.node,style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const E5t=["className"],j5t=["className"],T5t=e=>{const{classes:t}=e;return ua({divider:["toolbarDivider"],label:["toolbarLabel"]},rYt,t)},N5t=so(EYt,{name:"MuiDataGrid",slot:"ToolbarDivider"})({height:"50%",margin:RYt.spacing(0,.5)}),R5t=so("span",{name:"MuiDataGrid",slot:"ToolbarLabel"})({flex:1,font:RYt.typography.font.large,fontWeight:RYt.typography.fontWeight.medium,margin:RYt.spacing(0,.5),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"});function z5t(e){const r=Hi(e,E5t),n=eYt(),o=T5t(n);return t.jsx(N5t,S({as:n.slots.baseDivider,orientation:"vertical",className:o.divider},r))}function A5t(e){const r=Hi(e,j5t),n=eYt(),o=T5t(n);return t.jsx(R5t,S({className:o.label},r))}function F5t(e){const{showQuickFilter:r=!0,quickFilterProps:n,csvOptions:o,printOptions:a,additionalItems:i,additionalExportMenuItems:l}=e,c=iYt(),u=eYt(),[d,p]=s.useState(!1),h=s.useRef(null),f=Go(),m=Go(),v=!o?.disableToolbarButton||!a?.disableToolbarButton||l,y=()=>p(!1);return t.jsxs(F0t,{children:[u.label&&t.jsx(A5t,{children:u.label}),!u.disableColumnSelector&&t.jsx(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarColumns"),children:t.jsx(M5t,{render:t.jsx(L0t,{}),children:t.jsx(u.slots.columnSelectorIcon,{fontSize:"small"})})}),!u.disableColumnFilter&&t.jsx(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarFilters"),children:t.jsx(_5t,{render:(e,r)=>t.jsx(L0t,S({},e,{color:r.filterCount>0?"primary":"default",children:t.jsx(u.slots.baseBadge,{badgeContent:r.filterCount,color:"primary",variant:"dot",children:t.jsx(u.slots.openFilterButtonIcon,{fontSize:"small"})})}))})}),i,v&&(!u.disableColumnFilter||!u.disableColumnSelector)&&t.jsx(z5t,{}),v&&t.jsxs(s.Fragment,{children:[t.jsx(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarExport"),disableInteractive:d,children:t.jsx(L0t,{ref:h,id:m,"aria-controls":f,"aria-haspopup":"true","aria-expanded":d?"true":void 0,onClick:()=>p(!d),children:t.jsx(u.slots.exportIcon,{fontSize:"small"})})}),t.jsx(EZt,{target:h.current,open:d,onClose:y,position:"bottom-end",children:t.jsxs(u.slots.baseMenuList,S({id:f,"aria-labelledby":m,autoFocusItem:!0},u.slotProps?.baseMenuList,{children:[!a?.disableToolbarButton&&t.jsx(P5t,{render:t.jsx(u.slots.baseMenuItem,S({},u.slotProps?.baseMenuItem)),options:a,onClick:y,children:c.current.getLocaleText("toolbarExportPrint")}),!o?.disableToolbarButton&&t.jsx(D5t,{render:t.jsx(u.slots.baseMenuItem,S({},u.slotProps?.baseMenuItem)),options:o,onClick:y,children:c.current.getLocaleText("toolbarExportCSV")}),l?.(y)]}))})]}),r&&t.jsxs(s.Fragment,{children:[t.jsx(z5t,{}),t.jsx(k5t,S({},n))]})]})}"production"!==process.env.NODE_ENV&&(z5t.propTypes={className:Vt.exports.string,orientation:Vt.exports.oneOf(["horizontal","vertical"])}),"production"!==process.env.NODE_ENV&&(F5t.propTypes={additionalExportMenuItems:Vt.exports.func,additionalItems:Vt.exports.node,csvOptions:Vt.exports.object,printOptions:Vt.exports.object,quickFilterProps:Vt.exports.shape({className:Vt.exports.string,debounceMs:Vt.exports.number,quickFilterFormatter:Vt.exports.func,quickFilterParser:Vt.exports.func,slotProps:Vt.exports.object}),showQuickFilter:Vt.exports.bool,slotProps:Vt.exports.object,sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object])});const I5t=["className","selectedRowCount"],L5t=so("div",{name:"MuiDataGrid",slot:"SelectedRowCount"})({alignItems:"center",display:"flex",margin:RYt.spacing(0,2),visibility:"hidden",width:0,height:0,[RYt.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}),B5t=QGt(function(e,r){const{className:n,selectedRowCount:o}=e,a=Hi(e,I5t),i=iYt(),s=eYt(),l=(e=>{const{classes:t}=e;return ua({root:["selectedRowCount"]},rYt,t)})(s),c=i.current.getLocaleText("footerRowSelected")(o);return t.jsx(L5t,S({className:Wn(l.root,n),ownerState:s},a,{ref:r,children:c}))});"production"!==process.env.NODE_ENV&&(B5t.displayName="GridSelectedRowCount"),"production"!==process.env.NODE_ENV&&(B5t.propTypes={selectedRowCount:Vt.exports.number.isRequired,sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object])});const V5t=QGt(function(e,r){const n=iYt(),o=eYt(),a=SYt(n,$Yt),i=SYt(n,BXt),s=SYt(n,RXt),l=!o.hideFooterSelectedRowCount&&i>0?t.jsx(B5t,{selectedRowCount:i}):t.jsx("div",{}),c=o.hideFooterRowCount||o.pagination?null:t.jsx(o.slots.footerRowCount,S({},o.slotProps?.footerRowCount,{rowCount:a,visibleRowCount:s})),u=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&t.jsx(o.slots.pagination,{});return t.jsxs(O0t,S({},e,{ref:r,children:[l,c,u]}))});"production"!==process.env.NODE_ENV&&(V5t.displayName="GridFooter"),"production"!==process.env.NODE_ENV&&(V5t.propTypes={sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object])});const H5t=(e,t,r,n,o,a)=>{let i;switch(e){case tXt.LEFT:i=n[r];break;case tXt.RIGHT:i=o-n[r]-t+a;break;default:i=void 0}return i},$5t=(e,t,r,n,o)=>{const a=t===r-1;return!(e!==tXt.LEFT||!a)||!!n&&(e===tXt.LEFT||(e===tXt.RIGHT?!a:!a||o))},q5t=(e,t)=>e===tXt.RIGHT&&0===t,W5t={root:nYt.scrollbarFiller,header:nYt["scrollbarFiller--header"],borderTop:nYt["scrollbarFiller--borderTop"],borderBottom:nYt["scrollbarFiller--borderBottom"],pinnedRight:nYt["scrollbarFiller--pinnedRight"]};function U5t({header:e,borderTop:r=!0,borderBottom:n,pinnedRight:o}){return t.jsx("div",{role:"presentation",className:Wn(W5t.root,e&&W5t.header,r&&W5t.borderTop,n&&W5t.borderBottom,o&&W5t.pinnedRight)})}const G5t=["skeletonRowsCount","visibleColumns","showFirstRowBorder"],Y5t=so("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay"})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),K5t=e=>parseInt(e.getAttribute("data-colindex"),10),Z5t=QGt(function(e,r){const n=eYt(),{slots:o}=n,a=Vo(),i=(e=>{const{classes:t}=e;return ua({root:["skeletonLoadingOverlay"]},rYt,t)})({classes:n.classes}),l=s.useRef(null),c=Ri(l,r),u=iYt(),d=SYt(u,IGt),p=SYt(u,LGt),h=SYt(u,JKt),f=s.useMemo(()=>h.filter(e=>e<=p).length,[p,h]),{skeletonRowsCount:m,visibleColumns:v,showFirstRowBorder:y}=e,g=Hi(e,G5t),x=SYt(u,GKt),b=s.useMemo(()=>x.slice(0,f),[x,f]),k=SYt(u,XKt),w=s.useCallback(e=>-1!==k.left.findIndex(t=>t.field===e)?tXt.LEFT:-1!==k.right.findIndex(t=>t.field===e)?tXt.RIGHT:void 0,[k.left,k.right]),_=s.useMemo(()=>{const e=[];for(let r=0;r<m;r+=1){const i=[];for(let e=0;e<b.length;e+=1){const s=b[e],l=w(s.field),c=l===tXt.LEFT,u=l===tXt.RIGHT,p=Z1t(l,a),f=p?k[p].length:b.length-k.left.length-k.right.length,m=p?k[p].findIndex(e=>e.field===s.field):e-k.left.length,y=d.hasScrollY?d.scrollbarSize:0,g=X1t({},a,l,H5t(l,s.computedWidth,e,h,d.columnsTotalWidth,y)),x=d.columnsTotalWidth<d.viewportOuterSize.width,_=$5t(l,m,f,n.showCellVerticalBorder,x),C=q5t(l,m),M=e===b.length-1,D=u&&0===m,O=D&&x,P=M&&!D&&x,E=d.viewportOuterSize.width-d.columnsTotalWidth,j=Math.max(0,E),T=t.jsx(o.skeletonCell,{width:j,empty:!0},`skeleton-filler-column-${r}`),N=M&&0!==y;O&&i.push(T),i.push(t.jsx(o.skeletonCell,{field:s.field,type:s.type,align:s.align,width:"var(--width)",height:d.rowHeight,"data-colindex":e,empty:v&&!v.has(s.field),className:Wn(c&&nYt["cell--pinnedLeft"],u&&nYt["cell--pinnedRight"],_&&nYt["cell--withRightBorder"],C&&nYt["cell--withLeftBorder"]),style:S({"--width":`${s.computedWidth}px`},g)},`skeleton-column-${r}-${s.field}`)),P&&i.push(T),N&&i.push(t.jsx(U5t,{pinnedRight:k.right.length>0},`skeleton-scrollbar-filler-${r}`))}e.push(t.jsx("div",{className:Wn(nYt.row,nYt.rowSkeleton,0===r&&!y&&nYt["row--firstVisible"]),children:i},`skeleton-row-${r}`))}return e},[m,b,w,a,k,d.hasScrollY,d.scrollbarSize,d.columnsTotalWidth,d.viewportOuterSize.width,d.rowHeight,h,n.showCellVerticalBorder,o,v,y]);return pYt(u,"columnResize",e=>{const{colDef:t,width:r}=e,n=l.current?.querySelectorAll(`[data-field="${$0t(t.field)}"]`);if(!n)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const o=b.findIndex(e=>e.field===t.field),a=w(t.field),i=a===tXt.LEFT,s=a===tXt.RIGHT,c=getComputedStyle(n[0]).getPropertyValue("--width"),u=parseInt(c,10)-r;if(n&&n.forEach(e=>{e.style.setProperty("--width",`${r}px`)}),i){const e=l.current?.querySelectorAll(`.${nYt["cell--pinnedLeft"]}`);e?.forEach(e=>{K5t(e)>o&&(e.style.left=parseInt(getComputedStyle(e).left,10)-u+"px")})}if(s){const e=l.current?.querySelectorAll(`.${nYt["cell--pinnedRight"]}`);e?.forEach(e=>{K5t(e)<o&&(e.style.right=`${parseInt(getComputedStyle(e).right,10)+u}px`)})}}),t.jsx(Y5t,S({className:i.root},g,{ref:c,children:_}))});"production"!==process.env.NODE_ENV&&(Z5t.displayName="GridSkeletonLoadingOverlayInner");const X5t=QGt(function(e,r){const n=SYt(iYt(),IGt),o=n?.viewportInnerSize.height??0,a=Math.ceil(o/n.rowHeight);return t.jsx(Z5t,S({},e,{skeletonRowsCount:a,ref:r}))});"production"!==process.env.NODE_ENV&&(X5t.displayName="GridSkeletonLoadingOverlay");const Q5t=["variant","noRowsVariant","style"],J5t={"circular-progress":{component:e=>e.slots.baseCircularProgress,style:{}},"linear-progress":{component:e=>e.slots.baseLinearProgress,style:{display:"block"}},skeleton:{component:()=>X5t,style:{display:"block"}}},e3t=QGt(function(e,r){const{variant:n="linear-progress",noRowsVariant:o="skeleton",style:a}=e,i=Hi(e,Q5t),s=iYt(),l=eYt(),c=SYt(s,VYt),u=J5t[0===c?o:n],d=u.component(l);return t.jsx(j0t,S({style:S({},u.style,a)},i,{ref:r,children:t.jsx(d,{})}))});"production"!==process.env.NODE_ENV&&(e3t.displayName="GridLoadingOverlay"),"production"!==process.env.NODE_ENV&&(e3t.propTypes={noRowsVariant:Vt.exports.oneOf(["circular-progress","linear-progress","skeleton"]),sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object]),variant:Vt.exports.oneOf(["circular-progress","linear-progress","skeleton"])});const t3t=QGt(function(e,r){const n=iYt().current.getLocaleText("noRowsLabel");return t.jsx(j0t,S({},e,{ref:r,children:n}))});"production"!==process.env.NODE_ENV&&(t3t.displayName="GridNoRowsOverlay"),"production"!==process.env.NODE_ENV&&(t3t.propTypes={sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object])});const r3t=QGt(function(e,r){const n=eYt(),o=iYt(),a=SYt(o,HKt),i=!n.disableColumnSelector&&a.length>0;return t.jsxs(j0t,S({},e,{ref:r,children:[o.current.getLocaleText("noColumnsOverlayLabel"),i&&t.jsx(n.slots.baseButton,S({size:"small"},n.slotProps?.baseButton,{onClick:()=>{o.current.showPreferences(z1t.columns)},children:o.current.getLocaleText("noColumnsOverlayManageColumns")}))]}))});"production"!==process.env.NODE_ENV&&(r3t.displayName="GridNoColumnsOverlay"),"production"!==process.env.NODE_ENV&&(r3t.propTypes={sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object])});const n3t=ii(EYt)({maxHeight:"calc(100% + 1px)",flexGrow:1});function o3t(){const e=iYt(),r=eYt(),n=SYt(e,dQt),o=SYt(e,pQt),a=SYt(e,vQt),{paginationMode:i,loading:l}=r,c=-1===o&&"server"===i&&l,u=s.useMemo(()=>Math.max(0,a-1),[a]),d=s.useMemo(()=>-1===o||n.page<=u?n.page:u,[u,n.page,o]),p=s.useCallback(t=>{e.current.setPageSize(t)},[e]),h=s.useCallback((t,r)=>{e.current.setPage(r)},[e]),f=e=>{for(let t=0;t<r.pageSizeOptions.length;t+=1){const n=r.pageSizeOptions[t];if("number"==typeof n){if(n===e)return!0}else if(n.value===e)return!0}return!1};if("production"!==process.env.NODE_ENV){const e=s.useRef(!1),t=r.paginationModel?.pageSize??n.pageSize;e.current||r.autoPageSize||f(t)||(console.warn([`MUI X: The page size \`${n.pageSize}\` is not present in the \`pageSizeOptions\`.`,"Add it to show the pagination select."].join("\n")),e.current=!0)}const m=f(n.pageSize)?r.pageSizeOptions:[];return t.jsx(n3t,{as:r.slots.basePagination,count:o,page:d,rowsPerPageOptions:m,rowsPerPage:n.pageSize,onPageChange:h,onRowsPerPageChange:p,disabled:c})}"production"!==process.env.NODE_ENV&&(o3t.propTypes={component:Vt.exports.elementType});const a3t=["className","rowCount","visibleRowCount"],i3t=so("div",{name:"MuiDataGrid",slot:"RowCount"})({alignItems:"center",display:"flex",margin:RYt.spacing(0,2)}),s3t=QGt(function(e,r){const{className:n,rowCount:o,visibleRowCount:a}=e,i=Hi(e,a3t),s=iYt(),l=eYt(),c=(e=>{const{classes:t}=e;return ua({root:["rowCount"]},rYt,t)})(l);if(0===o)return null;const u=a<o?s.current.getLocaleText("footerTotalVisibleRows")(a,o):o.toLocaleString();return t.jsxs(i3t,S({className:Wn(c.root,n),ownerState:l},i,{ref:r,children:[s.current.getLocaleText("footerTotalRows")," ",u]}))});"production"!==process.env.NODE_ENV&&(s3t.displayName="GridRowCount"),"production"!==process.env.NODE_ENV&&(s3t.propTypes={rowCount:Vt.exports.number.isRequired,sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object]),visibleRowCount:Vt.exports.number.isRequired});const l3t=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNotVisible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],c3t=RGt(E1t,(e,t)=>{if(!t)return!1;return!!hXt(e)}),u3t=QGt(function(e,r){const{selected:n,rowId:o,row:a,index:i,style:l,rowHeight:c,className:u,visibleColumns:d,pinnedColumns:p,offsetLeft:h,columnsTotalWidth:f,firstColumnIndex:m,lastColumnIndex:v,focusedColumnIndex:y,isFirstVisible:g,isLastVisible:x,isNotVisible:b,showBottomBorder:k,scrollbarWidth:w,gridHasFiller:_,onClick:C,onDoubleClick:M,onMouseEnter:D,onMouseLeave:O,onMouseOut:P,onMouseOver:E}=e,j=Hi(e,l3t),T=wJt(),N=CZt(),R=s.useRef(null),z=eYt(),A=PJt(T),F=SYt(T,yXt),I=SYt(T,XYt),L=SYt(T,JKt),B=z.rowReordering,V=SYt(T,c3t,B),H=Ri(R,r),$=GYt(T,o),q=SYt(T,j1t,{rowId:o,editMode:z.editMode}),W=z.editMode===kKt.Row,U=void 0!==y,G=U&&y>=p.left.length&&y<m,Y=U&&y<d.length-p.right.length&&y>=v,K=function(e,t){return ua(t,rYt,e)}(z.classes,{root:["row",n&&"selected",W&&"row--editable",q&&"row--editing",g&&"row--firstVisible",x&&"row--lastVisible",k&&"row--borderBottom","auto"===c&&"row--dynamicHeight"]}),Z=N.hooks.useGridRowAriaAttributes();s.useLayoutEffect(()=>{if(A.range){const e=T.current.getRowIndexRelativeToVisibleRows(o);void 0!==e&&T.current.unstable_setLastMeasuredRowIndex(e)}if(R.current&&"auto"===c)return T.current.observeRowHeight(R.current,o)},[T,A.range,c,o]);const X=s.useCallback((e,t)=>r=>{W0t(r)||T.current.getRow(o)&&(T.current.publishEvent(e,T.current.getRowParams(o),r),t&&t(r))},[T,o]),Q=s.useCallback(e=>{const t=H0t(e.target,nYt.cell),r=t?.getAttribute("data-field");if(r){if(r===MQt.field)return;if(r===eXt)return;if("__reorder__"===r)return;if(T.current.getCellMode(o,r)===wKt.Edit)return;const e=T.current.getColumn(r);if(e?.type===RZt)return}X("rowClick",C)(e)},[T,C,X,o]),{slots:J,slotProps:ee,disableColumnReorder:te}=z,re=SYt(T,()=>S({},T.current.getRowHeightEntry(o)),void 0,kYt),ne=s.useMemo(()=>{if(b)return{opacity:0,width:0,height:0};const e=S({},l,{maxHeight:"auto"===c?"none":c,minHeight:c,"--height":"number"==typeof c?`${c}px`:c});if(re.spacingTop){e["border"===z.rowSpacingType?"borderTopWidth":"marginTop"]=re.spacingTop}if(re.spacingBottom){const t="border"===z.rowSpacingType?"borderBottomWidth":"marginBottom";let r=e[t];"number"!=typeof r&&(r=parseInt(r||"0",10)),r+=re.spacingBottom,e[t]=r}return e},[b,c,l,re,z.rowSpacingType]),oe=T.current.unstable_applyPipeProcessors("rowClassName",[],o),ae=Z($,i);if("function"==typeof z.getRowClassName){const e=i-(A.range?.firstRowIndex||0),t=S({},T.current.getRowParams(o),{isFirstVisible:0===e,isLastVisible:e===A.rows.length-1,indexRelativeToCurrentPage:e});oe.push(z.getRowClassName(t))}const ie=(e,r,n,i,s=tXt.NONE)=>{const l=T.current.unstable_getCellColSpanInfo(o,n);if(l?.spannedByColSpan)return null;const u=l?.cellProps.width??e.computedWidth,d=l?.cellProps.colSpan??1,p=H5t(s,e.computedWidth,n,L,f,w);if("skeletonRow"===$.type)return t.jsx(J.skeletonCell,{type:e.type,width:u,height:c,field:e.field,align:e.align},e.field);const h="__reorder__"===e.field,m=!(te||e.disableReorder),v=V&&!F.length&&I<=1,y=!(m||h&&v),g=s===tXt.VIRTUAL,x=q5t(s,r),b=$5t(s,r,i,z.showCellVerticalBorder,_);return t.jsx(J.cell,S({column:e,width:u,rowId:o,align:e.align||"left",colIndex:n,colSpan:d,disableDragEvents:y,isNotVisible:g,pinnedOffset:p,pinnedPosition:s,showLeftBorder:x,showRightBorder:b,row:a,rowNode:$},ee?.cell),e.field)};"production"!==process.env.NODE_ENV&&(ie.displayName="getCell");const se=p.left.map((e,t)=>ie(e,t,t,p.left.length,tXt.LEFT)),le=p.right.map((e,t)=>{const r=d.length-p.right.length+t;return ie(e,t,r,p.right.length,tXt.RIGHT)}),ce=d.length-p.left.length-p.right.length,ue=[];G&&ue.push(ie(d[y],y-p.left.length,y,ce,tXt.VIRTUAL));for(let e=m;e<v;e+=1){const t=d[e],r=e-p.left.length;t&&ue.push(ie(t,r,e,ce))}Y&&ue.push(ie(d[y],y-p.left.length,y,ce,tXt.VIRTUAL));const de=a?{onClick:Q,onDoubleClick:X("rowDoubleClick",M),onMouseEnter:X("rowMouseEnter",D),onMouseLeave:X("rowMouseLeave",O),onMouseOut:X("rowMouseOut",P),onMouseOver:X("rowMouseOver",E)}:null;return t.jsxs("div",S({"data-id":o,"data-rowindex":i,role:"row",className:Wn(...oe,K.root,u),style:ne},ae,de,j,{ref:H,children:[se,t.jsx("div",{role:"presentation",className:nYt.cellOffsetLeft,style:{width:h}}),ue,t.jsx("div",{role:"presentation",className:Wn(nYt.cell,nYt.cellEmpty)}),le,0!==w&&t.jsx(U5t,{pinnedRight:p.right.length>0,borderTop:!g})]}))});"production"!==process.env.NODE_ENV&&(u3t.displayName="GridRow"),"production"!==process.env.NODE_ENV&&(u3t.propTypes={columnsTotalWidth:Vt.exports.number.isRequired,firstColumnIndex:Vt.exports.number.isRequired,focusedColumnIndex:Vt.exports.number,gridHasFiller:Vt.exports.bool.isRequired,index:Vt.exports.number.isRequired,isFirstVisible:Vt.exports.bool.isRequired,isLastVisible:Vt.exports.bool.isRequired,isNotVisible:Vt.exports.bool.isRequired,lastColumnIndex:Vt.exports.number.isRequired,offsetLeft:Vt.exports.number.isRequired,onClick:Vt.exports.func,onDoubleClick:Vt.exports.func,onMouseEnter:Vt.exports.func,onMouseLeave:Vt.exports.func,pinnedColumns:Vt.exports.object.isRequired,row:Vt.exports.object.isRequired,rowHeight:Vt.exports.oneOfType([Vt.exports.oneOf(["auto"]),Vt.exports.number]).isRequired,rowId:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]).isRequired,scrollbarWidth:Vt.exports.number.isRequired,selected:Vt.exports.bool.isRequired,showBottomBorder:Vt.exports.bool.isRequired,visibleColumns:Vt.exports.arrayOf(Vt.exports.object).isRequired});const d3t=G(u3t);function p3t({privateApiRef:e,configuration:r,props:n,children:o}){const a=s.useRef(e.current.getPublicApi());return t.jsx(_Zt.Provider,{value:r,children:t.jsx(JGt.Provider,{value:n,children:t.jsx(kJt.Provider,{value:e,children:t.jsx(aYt.Provider,{value:a,children:t.jsx(b0t,{children:t.jsx(DZt,{children:o})})})})})})}const h3t=new TextEncoder;let f3t=2048,m3t=new ArrayBuffer(f3t),v3t=new Uint8Array(m3t),y3t=new Int32Array(m3t);const g3t=function(e){const t=2*e.length;t>f3t&&(f3t=t+(4-t%4),m3t=new ArrayBuffer(f3t),v3t=new Uint8Array(m3t),y3t=new Int32Array(m3t));const r=h3t.encodeInto(e,v3t).written,n=0|r;let o=0,a=374761393+(0+n|0)|0;if(n<16)for(;(o+3|0)<n;o=o+4|0)a=Math.imul(0|x3t(a+Math.imul(0|y3t[o],3266489917)|0,17),668265263);else{let e=606290984,t=-2048144777,r=0,i=1640531535;for(;(o+15|0)<n;o=o+16|0)e=Math.imul(0|x3t(e+Math.imul(0|y3t[o+0|0],2246822519)|0,13),2654435761),t=Math.imul(0|x3t(t+Math.imul(0|y3t[o+4|0],2246822519)|0,13),2654435761),r=Math.imul(0|x3t(r+Math.imul(0|y3t[o+8|0],2246822519)|0,13),2654435761),i=Math.imul(0|x3t(i+Math.imul(0|y3t[o+12|0],2246822519)|0,13),2654435761);for(a=(((x3t(e,1)|0+x3t(t,7)|0)+x3t(r,12)|0)+x3t(i,18)|0)+n|0;(o+3|0)<n;o=o+4|0)a=Math.imul(0|x3t(a+Math.imul(0|y3t[o],3266489917)|0,17),668265263)}for(;o<n;o=o+1|0)a=Math.imul(0|x3t(a+Math.imul(0|v3t[o],374761393)|0,11),2654435761);return a=Math.imul(a^a>>>15,2246822519),a=Math.imul(a^a>>>13,3266489917),((a^a>>>16)>>>0).toString()};function x3t(e,t){return e<<t|e>>>32-t}function b3t(e){return function(e,t){return`rgba(from ${e} r g b / ${t})`}(e,1)}function k3t(e){if(e)return`${e.fontWeight} ${e.fontSize} / ${e.lineHeight} ${e.fontFamily}`}const w3t=["id","label","labelId","material","disabled","slotProps","onChange","onKeyDown","onOpen","onClose","size","style","fullWidth"],_3t=["onRowsPerPageChange","material","disabled"],C3t=["material"],M3t=["autoFocus","label","fullWidth","slotProps","className","material"],S3t=["material"],D3t=["material"],O3t=["material"],P3t=["material"],E3t=["material"],j3t=["material"],T3t=["material"],N3t=["material"],R3t=["material","label","className"],z3t=["material"],A3t=["inert","iconStart","iconEnd","children","material"],F3t=["slotProps","material"],I3t=["id","multiple","freeSolo","options","getOptionLabel","isOptionEqualToValue","value","onChange","label","placeholder","slotProps","material"],L3t=["key"],B3t=["inputProps","InputProps","InputLabelProps"],V3t=["slotProps","material"],H3t=["ref","open","children","className","clickAwayTouchEvent","clickAwayMouseEvent","flip","focusTrap","onExited","onClickAway","onDidShow","onDidHide","id","target","transition","placement","material"],$3t=["native"],q3t=ii(jm)(({theme:e})=>({[`&.${Om.positionEnd} .${Yl.sizeSmall}`]:{marginRight:e.spacing(-.75)}})),W3t=ii(em,{shouldForwardProp:e=>"fullWidth"!==e})(({theme:e})=>({gap:e.spacing(.5),margin:0,overflow:"hidden",[`& .${Zf.label}`]:{fontSize:e.typography.pxToRem(14),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),U3t=ii(Ch,{shouldForwardProp:e=>"density"!==e})(({theme:e})=>({variants:[{props:{density:"compact"},style:{padding:e.spacing(.5)}}]})),G3t=ii(Tv)({[`& .${Pv.primary}`]:{overflowX:"clip",textOverflow:"ellipsis",maxWidth:"300px"}}),Y3t=QGt(function(e,r){const{id:n,label:o,labelId:a,material:i,disabled:s,slotProps:l,onChange:c,onKeyDown:u,onOpen:d,onClose:p,size:h,style:f,fullWidth:m}=e,v=Hi(e,w3t),y={PaperProps:{onKeyDown:u}};return p&&(y.onClose=p),t.jsxs(Yf,{size:h,fullWidth:m,style:f,disabled:s,ref:r,children:[t.jsx(zm,{id:a,htmlFor:n,shrink:!0,variant:"outlined",children:o}),t.jsx(wg,S({id:n,labelId:a,label:o,displayEmpty:!0,onChange:c},v,{variant:"outlined",notched:!0,inputProps:l?.htmlInput,onOpen:d,MenuProps:y,size:h},i))]})});"production"!==process.env.NODE_ENV&&(Y3t.displayName="BaseSelect");const K3t=ii(bk)(({theme:e})=>({[`& .${ck.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${ck.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),Z3t=QGt(function(e,r){const{onRowsPerPageChange:n,material:o,disabled:a}=e,i=Hi(e,_3t),l=s.useMemo(()=>{if(a)return{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}},[a]),c=iYt(),u=eYt(),{estimatedRowCount:d}=u;return t.jsx(K3t,S({component:"div",onRowsPerPageChange:Ni(e=>{n?.(Number(e.target.value))}),labelRowsPerPage:c.current.getLocaleText("paginationRowsPerPage"),labelDisplayedRows:e=>c.current.getLocaleText("paginationDisplayedRows")(S({},e,{estimated:d})),getItemAriaLabel:c.current.getLocaleText("paginationItemAriaLabel")},l,i,o,{ref:r}))});"production"!==process.env.NODE_ENV&&(Z3t.displayName="BasePagination");const X3t=QGt(function(e,r){const{material:n}=e,o=Hi(e,C3t);return t.jsx(Rp,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(X3t.displayName="BaseBadge");const Q3t=QGt(function(e,r){const{autoFocus:n,label:o,fullWidth:a,slotProps:i,className:l,material:c}=e,u=Hi(e,M3t),d=s.useRef(null),p=Ri(d,r),h=s.useRef(null);return s.useEffect(()=>{if(n){const e=d.current?.querySelector("input");e?.focus({preventScroll:!0})}else!1===n&&h.current&&h.current.stop({})},[n]),o?t.jsx(W3t,{className:l,control:t.jsx(U3t,S({},u,c,{inputProps:i?.htmlInput,ref:p,touchRippleRef:h})),label:o,fullWidth:a}):t.jsx(U3t,S({},u,c,{className:Wn(l,c?.className),inputProps:i?.htmlInput,ref:p,touchRippleRef:h}))});"production"!==process.env.NODE_ENV&&(Q3t.displayName="BaseCheckbox");const J3t=QGt(function(e,r){const{material:n}=e,o=Hi(e,S3t);return t.jsx(Ul,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(J3t.displayName="BaseCircularProgress");const e6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,D3t);return t.jsx(_f,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(e6t.displayName="BaseDivider");const t6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,O3t);return t.jsx(Km,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(t6t.displayName="BaseLinearProgress");const r6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,P3t);return t.jsx(Qp,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(r6t.displayName="BaseButton");const n6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,E3t);return t.jsx(gd,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(n6t.displayName="BaseChip");const o6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,j3t);return t.jsx(Ql,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(o6t.displayName="BaseIconButton");const a6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,T3t);return t.jsx(Sx,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(a6t.displayName="BaseTooltip");const i6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,N3t);return t.jsx(Eg,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(i6t.displayName="BaseSkeleton");const s6t=QGt(function(e,r){const{material:n,label:o,className:a}=e,i=Hi(e,R3t);return o?t.jsx(W3t,{className:a,control:t.jsx(Ab,S({},i,n,{ref:r})),label:o}):t.jsx(Ab,S({},i,n,{className:a,ref:r}))});"production"!==process.env.NODE_ENV&&(s6t.displayName="BaseSwitch");const l6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,z3t);return t.jsx(Iv,S({},o,n,{ref:r}))});function c6t(e,r=!0){if(!e)return;const{slotProps:n,material:o}=e,a=Hi(e,V3t);r&&(a.startAdornment&&(a.startAdornment=t.jsx(q3t,{position:"start",children:a.startAdornment})),a.endAdornment&&(a.endAdornment=t.jsx(q3t,{position:"end",children:a.endAdornment})));for(const e in o)Object.hasOwn(o,e)&&(a[e]=o[e]);return n?.htmlInput&&(a.inputProps?a.inputProps=S({},a.inputProps,n?.htmlInput):a.inputProps=n?.htmlInput),a}"production"!==process.env.NODE_ENV&&(l6t.displayName="BaseMenuList");const u6t={"bottom-start":"top left","bottom-end":"top right"};function d6t(e,r){return function(e,r){if(void 0===e.focusTrap)return r;return t.jsx($h,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:t.jsx("div",{tabIndex:-1,children:r})})}(e,function(e,r){if(void 0===e.onClickAway)return r;return t.jsx(Sh,{onClickAway:e.onClickAway,touchEvent:e.clickAwayTouchEvent,mouseEvent:e.clickAwayMouseEvent,children:r})}(e,r))}const p6t={baseAutocomplete:function(e){const r=eYt(),{id:n,multiple:o,freeSolo:a,options:i,getOptionLabel:s,isOptionEqualToValue:l,value:c,onChange:u,label:d,placeholder:p,slotProps:h,material:f}=e,m=Hi(e,I3t);return t.jsx(up,S({id:n,multiple:o,freeSolo:a,options:i,getOptionLabel:s,isOptionEqualToValue:l,value:c,onChange:u,renderTags:(e,r)=>e.map((e,n)=>{const o=r({index:n}),{key:a}=o,i=Hi(o,L3t);return t.jsx(gd,S({variant:"outlined",size:"small",label:"string"==typeof e?e:s?.(e)},i),a)}),renderInput:e=>{const{inputProps:n,InputProps:o,InputLabelProps:a}=e,i=Hi(e,B3t);return t.jsx(Gk,S({},i,{label:d,placeholder:p,inputProps:n,InputProps:c6t(o,!1),InputLabelProps:S({shrink:!0},a)},h?.textField,r.slotProps?.baseTextField))}},m,f))},baseBadge:X3t,baseCheckbox:Q3t,baseChip:n6t,baseCircularProgress:J3t,baseDivider:e6t,baseInput:function(e){return t.jsx(Bd,S({},c6t(e)))},baseLinearProgress:t6t,baseMenuList:l6t,baseMenuItem:function(e){const{inert:r,iconStart:n,iconEnd:o,children:a,material:i}=e,l=Hi(e,A3t);return r&&(l.disableRipple=!0),s.createElement(iy,S({},l,i),[n&&t.jsx(Dv,{children:n},"1"),t.jsx(G3t,{children:a},"2"),o&&t.jsx(Dv,{children:o},"3")])},baseTextField:function(e){const{slotProps:r,material:n}=e,o=Hi(e,F3t);return t.jsx(Gk,S({variant:"outlined"},o,n,{inputProps:r?.htmlInput,InputProps:c6t(r?.input),InputLabelProps:S({shrink:!0},r?.inputLabel)}))},baseButton:r6t,baseIconButton:o6t,baseTooltip:a6t,basePagination:Z3t,basePopper:function(e){const{open:r,children:n,className:o,flip:a,onExited:i,onDidShow:l,onDidHide:c,id:u,target:d,transition:p,placement:h,material:f}=e,m=Hi(e,H3t),v=s.useMemo(()=>{const e=[{name:"preventOverflow",options:{padding:8}}];return a&&e.push({name:"flip",enabled:!0,options:{rootBoundary:"document"}}),(l||c)&&e.push({name:"isPlaced",enabled:!0,phase:"main",fn:()=>{l?.()},effect:()=>()=>{c?.()}}),e},[a,l,c]);let y;if(p){const r=e=>t=>{e&&e(),i&&i(t)};y=o=>d6t(e,t.jsx(km,S({},o.TransitionProps,{style:{transformOrigin:u6t[o.placement]},onExited:r(o.TransitionProps?.onExited),children:t.jsx(qs,{children:n})})))}else y=d6t(e,n);return t.jsx(id,S({id:u,className:o,open:r,anchorEl:d,transition:p,placement:h,modifiers:v},m,f,{children:y}))},baseSelect:Y3t,baseSelectOption:function(e){let{native:r}=e,n=Hi(e,$3t);return r?t.jsx("option",S({},n)):t.jsx(iy,S({},n))},baseSkeleton:i6t,baseSwitch:s6t};var h6t=S({},p6t,{booleanCellTrueIcon:B2t,booleanCellFalseIcon:z2t,columnMenuIcon:R2t,openFilterButtonIcon:S2t,filterPanelDeleteIcon:z2t,columnFilteredIcon:D2t,columnSelectorIcon:P2t,columnSortedAscendingIcon:w2t,columnSortedDescendingIcon:_2t,columnResizeIcon:E2t,densityCompactIcon:j2t,densityStandardIcon:T2t,densityComfortableIcon:N2t,exportIcon:U2t,moreActionsIcon:V2t,treeDataCollapseIcon:M2t,treeDataExpandIcon:C2t,groupingCriteriaCollapseIcon:M2t,groupingCriteriaExpandIcon:C2t,detailPanelExpandIcon:A2t,detailPanelCollapseIcon:F2t,rowReorderIcon:L2t,quickFilterIcon:O2t,quickFilterClearIcon:q2t,columnMenuHideIcon:H2t,columnMenuSortAscendingIcon:w2t,columnMenuSortDescendingIcon:_2t,columnMenuUnsortIcon:null,columnMenuFilterIcon:D2t,columnMenuManageColumnsIcon:$2t,columnMenuClearIcon:q2t,loadIcon:I2t,filterPanelAddIcon:A2t,filterPanelRemoveAllIcon:W2t,columnReorderIcon:L2t,menuItemCheckIcon:B2t});const f6t=function(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}()&&null!=window.localStorage.getItem("DEBUG"),m6t=()=>{},v6t={debug:m6t,info:m6t,warn:m6t,error:m6t},y6t=["debug","info","warn","error"];function g6t(e,t,r=console){const n=y6t.indexOf(t);if(-1===n)throw new Error(`MUI X: Log level ${t} not recognized.`);const o=y6t.reduce((t,o,a)=>(t[o]=a>=n?(...t)=>{const[n,...a]=t;r[o](`MUI X: ${e} - ${n}`,...a)}:m6t,t),{});return o}const x6t=(e,t,r,n=!0)=>{const o=s.useRef(null),a=s.useRef(`mui-${Math.round(1e9*Math.random())}`),i=s.useCallback(()=>{o.current=e.current.registerPipeProcessor(t,a.current,r)},[e,r,t]);DJt(()=>{n&&i()});const l=s.useRef(!0);s.useEffect(()=>(l.current?l.current=!1:n&&i(),()=>{o.current&&(o.current(),o.current=null)}),[i,n])},b6t=(e,t,r)=>{const n=s.useRef(null),o=s.useRef(`mui-${Math.round(1e9*Math.random())}`),a=s.useCallback(()=>{n.current=e.current.registerPipeApplier(t,o.current,r)},[e,r,t]);DJt(()=>{a()});const i=s.useRef(!0);s.useEffect(()=>(i.current?i.current=!1:a(),()=>{n.current&&(n.current(),n.current=null)}),[a])};let k6t=function(e){return e.DataSource="dataSource",e.RowTree="rowTree",e}({});const w6t=(e,t,r,n)=>{const o=s.useCallback(()=>{e.current.registerStrategyProcessor(t,r,n)},[e,n,r,t]);DJt(()=>{o()});const a=s.useRef(!0);s.useEffect(()=>{a.current?a.current=!1:o()},[o])},_6t="none",C6t={dataSourceRowsUpdate:k6t.DataSource,rowTreeCreation:k6t.RowTree,filtering:k6t.RowTree,sorting:k6t.RowTree,visibleRowsLookupCreation:k6t.RowTree},M6t=(e,t)=>S({},e,{props:{listView:t.listView,getRowId:t.getRowId}}),S6t=(e,t)=>{(e=>{const t=s.useRef(null),r=s.useRef(null),n=s.useRef(null),o=s.useRef(null),a=s.useRef(null),i=s.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:r,virtualScrollerRef:n,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:a,columnHeadersContainerRef:i})})(e),((e,t)=>{s.useEffect(()=>{e.current.setState(e=>S({},e,{props:{listView:t.listView,getRowId:t.getRowId}}))},[e,t.listView,t.getRowId])})(e,t),(e=>{const t=Vo();void 0===e.current.state.isRtl&&(e.current.state.isRtl=t);const r=s.useRef(!0);s.useEffect(()=>{r.current?r.current=!1:e.current.setState(e=>S({},e,{isRtl:t}))},[e,t])})(e),((e,t)=>{CJt(e,{getLogger:s.useCallback(e=>f6t?g6t(e,"debug",t.logger):t.logLevel?g6t(e,t.logLevel.toString(),t.logger):v6t,[t.logLevel,t.logger])},"private")})(e,t),(e=>{const t=s.useRef({}),r=s.useCallback(e=>{t.current[e.stateId]=e},[]),n=s.useCallback((r,n)=>{let o;if(o="function"==typeof r?r(e.current.state):r,e.current.state===o)return!1;const a={current:{state:o}};let i=!1;const s=[];if(Object.keys(t.current).forEach(r=>{const n=t.current[r],o=n.stateSelector(e),l=n.stateSelector(a);l!==o&&(s.push({stateId:n.stateId,hasPropChanged:l!==n.propModel}),void 0!==n.propModel&&l!==n.propModel&&(i=!0))}),s.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${s[0].stateId}, therefore, you're not allowed to update ${s.map(e=>e.stateId).join(", ")} in the same transaction.`);if(i||(e.current.state=o,e.current.publishEvent("stateChange",o),e.current.store.update(o)),1===s.length){const{stateId:r,hasPropChanged:o}=s[0],l=t.current[r],c=l.stateSelector(a);l.propOnChange&&o&&l.propOnChange(c,{reason:n,api:e.current}),i||e.current.publishEvent(l.changeEvent,c,{reason:n})}return!i},[e]),o=s.useCallback((t,r,n)=>e.current.setState(e=>S({},e,{[t]:r(e[t])}),n),[e]),a={updateControlState:o,registerControlState:r};CJt(e,{setState:n},"public"),CJt(e,a,"private")})(e),(e=>{const t=s.useRef({}),r=s.useRef(!1),n=s.useCallback(e=>{!r.current&&e&&(r.current=!0,Object.values(e.appliers).forEach(e=>{e()}),r.current=!1)},[]),o=s.useCallback((e,r,n)=>{t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1});const o=t.current[e];return o.processors.get(r)!==n&&(o.processors.set(r,n),o.processorsAsArray=Array.from(t.current[e].processors.values()).filter(e=>null!==e),o.processorsUpdated=!0),()=>{t.current[e].processors.set(r,null),t.current[e].processorsAsArray=Array.from(t.current[e].processors.values()).filter(e=>null!==e)}},[]),a=s.useCallback((e,r,n)=>(t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1}),t.current[e].appliers[r]=n,()=>{const n=Hi(t.current[e].appliers,[r].map(l$t));t.current[e].appliers=n}),[]),i=s.useCallback(e=>{n(t.current[e])},[n]),l=s.useCallback(()=>{for(const e in t.current){if(!Object.prototype.hasOwnProperty.call(t.current,e))continue;const r=t.current[e];r.processorsUpdated&&(r.processorsUpdated=!1,n(r))}},[n]),c=s.useCallback((...e)=>{const[r,n,o]=e;if(!t.current[r])return n;const a=t.current[r].processorsAsArray;let i=n;for(let e=0;e<a.length;e+=1)i=a[e](i,o);return i},[]),u={unstable_applyPipeProcessors:c};CJt(e,{registerPipeProcessor:o,registerPipeApplier:a,requestPipeProcessorsApplication:i,runAppliersForPendingProcessors:l},"private"),CJt(e,u,"public")})(e),(e=>{const t=s.useRef(new Map),r=s.useRef({}),n=s.useCallback((t,n,o)=>{const a=()=>{const e=Hi(r.current[n],[t].map(l$t));r.current[n]=e};r.current[n]||(r.current[n]={});const i=r.current[n],s=i[t];return i[t]=o,s&&s!==o?(t===e.current.getActiveStrategy(C6t[n])&&e.current.publishEvent("activeStrategyProcessorChange",n),a):a},[e]),o=s.useCallback((t,n)=>{const o=e.current.getActiveStrategy(C6t[t]);if(null==o)throw new Error("Can't apply a strategy processor before defining an active strategy");const a=r.current[t];if(!a||!a[o])throw new Error(`No processor found for processor "${t}" on strategy "${o}"`);return(0,a[o])(n)},[e]),a=s.useCallback(e=>{const r=Array.from(t.current.entries()).find(([,t])=>t.group===e&&t.isAvailable());return r?.[0]??_6t},[]),i=s.useCallback((r,n,o)=>{t.current.set(n,{group:r,isAvailable:o}),e.current.publishEvent("strategyAvailabilityChange")},[e]);CJt(e,{registerStrategyProcessor:n,applyStrategyProcessor:o,getActiveStrategy:a,setStrategyAvailability:i},"private")})(e),((e,t)=>{const r=s.useCallback(e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]},[t.localeText]);e.current.register("public",{getLocaleText:r})})(e,t),e.current.register("private",{rootProps:t})},D6t=(e,t,r,n)=>{const o=s.useRef(n),a=s.useRef(!1);n!==o.current&&(a.current=!1,o.current=n),a.current||(t.current.state=e(t.current.state,r,t),a.current=!0)};function O6t(e,t){if(null==e)return"";const r="string"==typeof e?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const e=r.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@","\t","\r"].includes(e[0])?`"'${e}"`:[t.delimiter,"\n","\r",'"'].some(e=>r.includes(e))?`"${e}"`:e}return r}const P6t=(e,t)=>{const{csvOptions:r,ignoreValueFormatter:n}=t;let o;if(n){const t=e.colDef.type;o="number"===t?String(e.value):"date"===t||"dateTime"===t?e.value?.toISOString():"function"==typeof e.value?.toString?e.value.toString():e.value}else o=e.formattedValue;return O6t(o,r)};class E6t{constructor(e){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),"function"==typeof this.options.sanitizeCellValue?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}}function j6t(e){const{columns:t,rowIds:r,csvOptions:n,ignoreValueFormatter:o,apiRef:a}=e,i=r.reduce((e,r)=>`${e}${(({id:e,columns:t,getCellParams:r,csvOptions:n,ignoreValueFormatter:o})=>{const a=new E6t({csvOptions:n});return t.forEach(t=>{const i=r(e,t.field);"production"!==process.env.NODE_ENV&&"[object Object]"===String(i.formattedValue)&&lat(["MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]),a.addValue(P6t(i,{ignoreValueFormatter:o,csvOptions:n}))}),a.getRowString()})({id:r,columns:t,getCellParams:a.current.getCellParams,ignoreValueFormatter:o,csvOptions:n})}\r\n`,"").trim();if(!n.includeHeaders)return i;const s=t.filter(e=>e.field!==MQt.field),l=[];if(n.includeColumnGroupsHeaders){const e=a.current.getAllGroupDetails();let t=0;const r=s.reduce((e,r)=>{const n=a.current.getColumnGroupPath(r.field);return e[r.field]=n,t=Math.max(t,n.length),e},{});for(let o=0;o<t;o+=1){const t=new E6t({csvOptions:n,sanitizeCellValue:O6t});l.push(t),s.forEach(n=>{const a=(r[n.field]||[])[o],i=e[a];t.addValue(i?i.headerName||i.groupId:"")})}}const c=new E6t({csvOptions:n,sanitizeCellValue:O6t});s.forEach(e=>{c.addValue(e.headerName||e.field)}),l.push(c);return`${`${l.map(e=>e.getRowString()).join("\r\n")}\r\n`}${i}`.trim()}function T6t(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const r=document.createRange();r.selectNode(t);const n=window.getSelection();n.removeAllRanges(),n.addRange(r);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const N6t=(e,t)=>{const r=t.ignoreValueFormatterDuringExport,n=("object"==typeof r?r?.clipboardExport:r)||!1,o=t.clipboardCopyCellDelimiter,a=s.useCallback(t=>{if(!function(e){return(e.ctrlKey||e.metaKey)&&"C"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}(t))return;if(r=t.target,window.getSelection()?.toString()||r&&(r.selectionEnd||0)-(r.selectionStart||0)>0)return;var r;let a="";if(BXt(e)>0)a=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const t=XXt(e);if(t){const r=e.current.getCellParams(t.id,t.field);a=P6t(r,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:n})}}var i;a=e.current.unstable_applyPipeProcessors("clipboardCopy",a),a&&(i=a,navigator.clipboard?navigator.clipboard.writeText(i).catch(()=>{T6t(i)}):T6t(i),e.current.publishEvent("clipboardCopy",a))},[e,n,o]);SJt(e,()=>e.current.rootElementRef.current,"keydown",a),fYt(e,"clipboardCopy",t.onClipboardCopy)},R6t=e=>S({},e,{columnMenu:{open:!1}}),z6t=(e,t,r)=>{r.current.caches.columns={lastColumnsProp:t.columns};return S({},e,{columns:pJt({apiRef:r,columnsToUpsert:t.columns,initialState:t.initialState?.columns,columnVisibilityModel:t.columnVisibilityModel??t.initialState?.columns?.columnVisibilityModel??{},keepOnlyColumnsToUpsert:!0}),pinnedColumns:e.pinnedColumns??FKt})};function A6t(e,r){const n=MJt(e,"useGridColumns");e.current.registerControlState({stateId:"visibleColumns",propModel:r.columnVisibilityModel,propOnChange:r.onColumnVisibilityModelChange,stateSelector:WKt,changeEvent:"columnVisibilityModelChange"});const o=s.useCallback(t=>{n.debug("Updating columns state."),e.current.setState(function(e){return t=>S({},t,{columns:e})}(t)),e.current.publishEvent("columnsChange",t.orderedFields)},[n,e]),a=s.useCallback(t=>$Kt(e)[t],[e]),i=s.useCallback(()=>qKt(e),[e]),l=s.useCallback(()=>GKt(e),[e]),c=s.useCallback((t,r=!0)=>(r?GKt(e):qKt(e)).findIndex(e=>e.field===t),[e]),u=s.useCallback(t=>{const r=c(t);return JKt(e)[r]},[e,c]),d=s.useCallback(t=>{WKt(e)!==t&&(e.current.setState(r=>S({},r,{columns:pJt({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})})),e.current.updateRenderContext?.())},[e]),p=s.useCallback(t=>{if(l1t(e))return void e.current.updateNonPivotColumns(t);const r=pJt({apiRef:e,columnsToUpsert:t,initialState:void 0,keepOnlyColumnsToUpsert:!1,updateInitialVisibilityModel:!0});o(r)},[e,o]),h=s.useCallback((t,r)=>{const n=WKt(e);if(r!==(n[t]??!0)){const o=S({},n,{[t]:r});e.current.setColumnVisibilityModel(o)}},[e]),f=s.useCallback(t=>HKt(e).findIndex(e=>e===t),[e]),m=s.useCallback((t,r)=>{const a=HKt(e),i=f(t);if(i===r)return;n.debug(`Moving column ${t} to index ${r}`);const s=[...a],l=s.splice(i,1)[0];s.splice(r,0,l),o(S({},VKt(e),{orderedFields:s}));const c={column:e.current.getColumn(t),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(t),oldIndex:i};e.current.publishEvent("columnIndexChange",c)},[e,n,o,f]),v=s.useCallback((t,r)=>{n.debug(`Updating column ${t} width to ${r}`);const a=VKt(e),i=S({},a.lookup[t],{width:r,hasBeenResized:!0});o(uJt(S({},a,{lookup:S({},a.lookup,{[t]:i})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:i,width:r})},[e,n,o]),y={setColumnIndex:m};CJt(e,{getColumn:a,getAllColumns:i,getColumnIndex:c,getColumnPosition:u,getVisibleColumns:l,getColumnIndexRelativeToVisibleColumns:f,updateColumns:p,setColumnVisibilityModel:d,setColumnVisibility:h,setColumnWidth:v},"public"),CJt(e,y,r.signature===oYt.DataGrid?"private":"public");const g=s.useCallback((t,n)=>{const o={},a=WKt(e);(!n.exportOnlyDirtyModels||null!=r.columnVisibilityModel||Object.keys(r.initialState?.columns?.columnVisibilityModel??{}).length>0||Object.keys(a).length>0)&&(o.columnVisibilityModel=a),o.orderedFields=HKt(e);const i=qKt(e),s={};return i.forEach(e=>{if(e.hasBeenResized){const t={};lJt.forEach(r=>{let n=e[r];n===1/0&&(n=-1),t[r]=n}),s[e.field]=t}}),Object.keys(s).length>0&&(o.dimensions=s),S({},t,{columns:o})},[e,r.columnVisibilityModel,r.initialState?.columns]),x=s.useCallback((t,r)=>{const n=r.stateToRestore.columns,o=n?.columnVisibilityModel;if(null==n)return t;const a=pJt({apiRef:e,columnsToUpsert:[],initialState:n,columnVisibilityModel:o,keepOnlyColumnsToUpsert:!1});return null!=n&&e.current.setState(e=>S({},e,{columns:S({},e.columns,{lookup:a.lookup,orderedFields:a.orderedFields,initialColumnVisibilityModel:a.initialColumnVisibilityModel})})),null!=o&&e.current.setState(e=>S({},e,{columns:S({},e.columns,{columnVisibilityModel:o})})),null!=n&&e.current.publishEvent("columnsChange",a.orderedFields),t},[e]),b=s.useCallback((e,n)=>{if(n===z1t.columns){const e=r.slots.columnsPanel;return t.jsx(e,S({},r.slotProps?.columnsPanel))}return e},[r.slots.columnsPanel,r.slotProps?.columnsPanel]),k=s.useCallback(t=>{const n=l1t(e);return r.disableColumnSelector||n?t:[...t,"columnMenuColumnsItem"]},[r.disableColumnSelector,e]);x6t(e,"columnMenu",k),x6t(e,"exportState",g),x6t(e,"restoreState",x),x6t(e,"preferencePanel",b);const w=s.useRef(null);pYt(e,"viewportInnerSizeChange",t=>{if(w.current!==t.width){w.current=t.width;if(!GKt(e).some(e=>e.flex&&e.flex>0))return;o(uJt(VKt(e),e.current.getRootDimensions()))}});const _=s.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const t=pJt({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(t)},[e,n,o]);b6t(e,"hydrateColumns",_),s.useEffect(()=>{if(e.current.caches.columns.lastColumnsProp===r.columns)return;e.current.caches.columns.lastColumnsProp=r.columns,n.info(`GridColumns have changed, new length ${r.columns.length}`);const t=pJt({apiRef:e,initialState:void 0,columnsToUpsert:r.columns,keepOnlyColumnsToUpsert:!0,updateInitialVisibilityModel:!0,columnVisibilityModel:r.columnVisibilityModel});o(t)},[n,e,o,r.columns,r.columnVisibilityModel]),s.useEffect(()=>{void 0!==r.columnVisibilityModel&&e.current.setColumnVisibilityModel(r.columnVisibilityModel)},[e,n,r.columnVisibilityModel])}const F6t=(e,t)=>S({},e,{density:t.initialState?.density??t.density??"standard"});const I6t=({apiRef:e,options:t})=>{const r=qKt(e);if(t.fields)return t.fields.reduce((e,t)=>{const n=r.find(e=>e.field===t);return n&&e.push(n),e},[]);return(t.allColumns?r:GKt(e)).filter(e=>!0!==e.disableExport)},L6t=({apiRef:e})=>{const t=EXt(e),r=UYt(e),n=BXt(e),o=t.filter(e=>"footer"!==r[e].type),a=eKt(e),i=a?.top?.map(e=>e.id)||[],s=a?.bottom?.map(e=>e.id)||[];if(o.unshift(...i),o.push(...s),n>0){const t=VXt(e);return o.filter(e=>t.has(e))}return o},B6t=(e,r)=>{const n=MJt(e,"useGridCsvExport"),o=r.ignoreValueFormatterDuringExport,a=("object"==typeof o?o?.csvExport:o)||!1,i=s.useCallback((t={})=>{n.debug("Get data as CSV");return j6t({columns:I6t({apiRef:e,options:t}),rowIds:(t.getRowsToExport??L6t)({apiRef:e}),csvOptions:{delimiter:t.delimiter||",",shouldAppendQuotes:t.shouldAppendQuotes??!0,includeHeaders:t.includeHeaders??!0,includeColumnGroupsHeaders:t.includeColumnGroupsHeaders??!0,escapeFormulas:t.escapeFormulas??!0},ignoreValueFormatter:a,apiRef:e})},[n,e,a]),l=s.useCallback(e=>{n.debug("Export data as CSV");const t=i(e);!function(e,t="csv",r=document.title||"untitled"){const n=`${r}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),r=document.createElement("a");return r.href=t,r.download=n,r.click(),void setTimeout(()=>{URL.revokeObjectURL(t)})}throw new Error("MUI X: exportAs not supported.")}(new Blob([e?.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",e?.fileName)},[n,i]);CJt(e,{getDataAsCsv:i,exportDataAsCsv:l},"public");const c=s.useCallback((e,r)=>r.csvOptions?.disableToolbarButton?e:[...e,{component:t.jsx(e5t,{options:r.csvOptions}),componentName:"csvExport"}],[]);x6t(e,"exportMenu",c)};const V6t=(e,t,r)=>{let n=e.paginationModel;const o=e.rowCount,a=r?.pageSize??n.pageSize,i=r?.page??n.page,s=iQt(o,a,i);!r||r?.page===n.page&&r?.pageSize===n.pageSize||(n=r);const l=-1===a?0:((e,t=0)=>0===t?e:Math.max(Math.min(e,t-1),0))(n.page,s);return l!==n.page&&(n=S({},n,{page:l})),lQt(n.pageSize,t),n};const H6t=(e,r)=>{const n=null!==e.current.rootElementRef.current,o=MJt(e,"useGridPrintExport"),a=s.useRef(null),i=s.useRef(null),l=s.useRef({}),c=s.useRef([]),u=s.useRef(null);s.useEffect(()=>{a.current=Oi(e.current.rootElementRef.current)},[e,n]);const d=s.useCallback((t,r,n)=>new Promise(o=>{const a=I6t({apiRef:e,options:{fields:t,allColumns:r}}).map(e=>e.field),i=qKt(e),s={};i.forEach(e=>{s[e.field]=a.includes(e.field)}),n&&(s[MQt.field]=!0),e.current.setColumnVisibilityModel(s),o()}),[e]),p=s.useCallback(t=>{const r=t({apiRef:e}).reduce((t,r)=>{const n=e.current.getRow(r);return n[FZt]||t.push(n),t},[]);e.current.setRows(r)},[e]),h=s.useCallback((t,n)=>{const o=S({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},n),i=t.contentDocument;if(!i)return;const s=fJt(e),l=e.current.rootElementRef.current,c=l.cloneNode(!0);c.querySelector(`.${nYt.main}`).style.overflow="visible",c.style.contain="size";let u=l.querySelector(`.${nYt.toolbarContainer}`)?.offsetHeight||0,d=l.querySelector(`.${nYt.footerContainer}`)?.offsetHeight||0;const p=c.querySelector(`.${nYt.footerContainer}`);o.hideToolbar&&(c.querySelector(`.${nYt.toolbarContainer}`)?.remove(),u=0),o.hideFooter&&p&&(p.remove(),d=0);const h=s.currentPageTotalHeight+hJt(e,r)+u+d;c.style.height=`${h}px`,c.style.boxSizing="content-box",!o.hideFooter&&p&&(p.style.position="absolute",p.style.width="100%",p.style.top=h-d+"px");const f=document.createElement("div");f.appendChild(c),i.body.style.marginTop="0px",i.body.innerHTML=f.innerHTML;const m="function"==typeof o.pageStyle?o.pageStyle():o.pageStyle;if("string"==typeof m){const e=i.createElement("style");e.appendChild(i.createTextNode(m)),i.head.appendChild(e)}o.bodyClassName&&i.body.classList.add(...o.bodyClassName.split(" "));let v=[];if(o.copyStyles){const e=l.getRootNode();v=function(e,t){const r=[],n=t.querySelectorAll("style, link[rel='stylesheet']");for(let t=0;t<n.length;t+=1){const o=n[t];if("STYLE"===o.tagName){const t=e.createElement(o.tagName),r=o.sheet;if(r){let n="";for(let e=0;e<r.cssRules.length;e+=1)"string"==typeof r.cssRules[e].cssText&&(n+=`${r.cssRules[e].cssText}\r\n`);t.appendChild(e.createTextNode(n)),e.head.appendChild(t)}}else if(o.getAttribute("href")){const t=e.createElement(o.tagName);for(let e=0;e<o.attributes.length;e+=1){const r=o.attributes[e];r&&t.setAttribute(r.nodeName,r.nodeValue||"")}r.push(new Promise(e=>{t.addEventListener("load",()=>e())})),e.head.appendChild(t)}}return r}(i,"ShadowRoot"===e.constructor.name?e:a.current)}"test"!==process.env.NODE_ENV&&Promise.all(v).then(()=>{t.contentWindow.print()})},[e,a,r]),f=s.useCallback(t=>{a.current.body.removeChild(t),e.current.restoreState(i.current||{}),i.current?.columns?.columnVisibilityModel||e.current.setColumnVisibilityModel(l.current),e.current.setState(e=>S({},e,{virtualization:u.current})),e.current.setRows(c.current),i.current=null,l.current={},c.current=[]},[e]),m=s.useCallback(async t=>{if(o.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=e.current.exportState(),l.current=WKt(e),c.current=e.current.getSortedRows().filter(e=>!e[FZt]),r.pagination){const t={page:0,pageSize:NXt(e)};e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{paginationModel:V6t(e.pagination,"DataGridPro",t)})}))}u.current=e.current.state.virtualization,e.current.setState(e=>S({},e,{virtualization:S({},e.virtualization,{enabled:!1,enabledForColumns:!1})})),await d(t?.fields,t?.allColumns,t?.includeCheckboxes),p(t?.getRowsToExport??L6t),await new Promise(e=>{requestAnimationFrame(()=>{e()})});const n=function(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}(t?.fileName);"test"===process.env.NODE_ENV?(a.current.body.appendChild(n),h(n,t),f(n)):(n.onload=()=>{h(n,t);n.contentWindow.matchMedia("print").addEventListener("change",e=>{!1===e.matches&&f(n)})},a.current.body.appendChild(n))},[r,o,e,h,f,d,p]);CJt(e,{exportDataAsPrint:m},"public");const v=s.useCallback((e,r)=>r.printOptions?.disableToolbarButton?e:[...e,{component:t.jsx(t5t,{options:r.printOptions}),componentName:"printExport"}],[]);x6t(e,"exportMenu",v)},$6t=(e,t,r)=>{const n=t.filterModel??t.initialState?.filter?.filterModel??RKt();return S({},e,{filter:S({filterModel:aZt(n,t.disableMultipleColumnsFiltering,r)},NKt),visibleRowsLookup:{}})},q6t=e=>e.filteredRowsLookup;function W6t(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function U6t(){return MGt(Object.values)}const G6t=e=>S({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),Y6t=({currentColIndex:e,firstColIndex:t,lastColIndex:r,isRtl:n})=>{if(n){if(e<r)return e+1}else if(!n&&e>t)return e-1;return null},K6t=({currentColIndex:e,firstColIndex:t,lastColIndex:r,isRtl:n})=>{if(n){if(e>t)return e-1}else if(!n&&e<r)return e+1;return null};const Z6t=zGt(bQt,eKt,(e,t)=>(t.top||[]).concat(e.rows,t.bottom||[])),X6t=(e,t)=>{const r=MJt(e,"useGridKeyboardNavigation"),n=Vo(),o=s.useCallback(()=>Z6t(e),[e]),a="DataGrid"!==t.signature&&t.headerFilters,i=s.useCallback((t,n,o="left",a="up")=>{const i=DXt(e),s=e.current.unstable_getCellColSpanInfo(n,t);s&&s.spannedByColSpan&&("left"===o?t=s.leftVisibleCellIndex:"right"===o&&(t=s.rightVisibleCellIndex));const l=YKt(e)[t],c=function(e,t,r,n){const o=LJt(e);if(!o[t]?.[r])return t;const a=EXt(e);let i=a.indexOf(t)+("down"===n?1:-1);for(;i>=0&&i<a.length;){const e=a[i];if(!o[e]?.[r])return e;i+="down"===n?1:-1}return t}(e,n,l,a),u=i.findIndex(e=>e.id===c);r.debug(`Navigating to cell row ${u}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:u}),e.current.setCellFocus(c,l)},[e,r]),l=s.useCallback((t,n)=>{r.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(o,n)},[e,r]),c=s.useCallback((t,n)=>{r.debug(`Navigating to header filter col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFilterFocus(o,n)},[e,r]),u=s.useCallback((t,n,o)=>{r.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const{field:a}=e.current.getVisibleColumns()[t];e.current.setColumnGroupHeaderFocus(a,n,o)},[e,r]),d=s.useCallback(e=>o()[e]?.id,[o]),p=s.useCallback((t,r)=>{const s=r.currentTarget.querySelector(`.${nYt.columnHeaderTitleContainerContent}`);if(!!s&&s.contains(r.target)&&t.field!==MQt.field)return;const p=o(),h=e.current.getViewportPageSize(),f=t.field?e.current.getColumnIndex(t.field):0,m=p.length>0?0:null,v=p.length-1,y=GKt(e).length-1,g=sJt(e);let x=!0;switch(r.key){case"ArrowDown":a?c(f,r):null!==m&&i(f,d(m));break;case"ArrowRight":{const e=K6t({currentColIndex:f,firstColIndex:0,lastColIndex:y,isRtl:n});null!==e&&l(e,r);break}case"ArrowLeft":{const e=Y6t({currentColIndex:f,firstColIndex:0,lastColIndex:y,isRtl:n});null!==e&&l(e,r);break}case"ArrowUp":g>0&&u(f,g-1,r);break;case"PageDown":null!==m&&null!==v&&i(f,d(Math.min(m+h,v)));break;case"Home":l(0,r);break;case"End":l(y,r);break;case"Enter":(r.ctrlKey||r.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:x=!1}x&&r.preventDefault()},[e,o,a,c,i,d,n,l,u]),h=s.useCallback((t,r)=>{const a=tJt(e)===t.field,s=rJt(e)===t.field;if(a||s||!bZt(r.key))return;const u=o(),p=e.current.getViewportPageSize(),h=t.field?e.current.getColumnIndex(t.field):0,f=u.length-1,m=GKt(e).length-1;let v=!0;switch(r.key){case"ArrowDown":{const e=d(0);null!=e&&i(h,e);break}case"ArrowRight":{const e=K6t({currentColIndex:h,firstColIndex:0,lastColIndex:m,isRtl:n});null!==e&&c(e,r);break}case"ArrowLeft":{const o=Y6t({currentColIndex:h,firstColIndex:0,lastColIndex:m,isRtl:n});null!==o?c(o,r):e.current.setColumnHeaderFilterFocus(t.field,r);break}case"ArrowUp":l(h,r);break;case"PageDown":null!==f&&i(h,d(Math.min(0+p,f)));break;case"Home":c(0,r);break;case"End":c(m,r);break;case" ":break;default:v=!1}v&&r.preventDefault()},[e,o,c,n,l,i,d]),f=s.useCallback((t,r)=>{const n=eQt(e);if(null===n)return;const{field:a,depth:s}=n,{fields:c,depth:p,maxDepth:h}=t,f=o(),m=e.current.getViewportPageSize(),v=e.current.getColumnIndex(a),y=a?e.current.getColumnIndex(a):0,g=f.length-1,x=GKt(e).length-1;let b=!0;switch(r.key){case"ArrowDown":p===h-1?l(v,r):u(v,s+1,r);break;case"ArrowUp":p>0&&u(v,s-1,r);break;case"ArrowRight":{const e=c.length-c.indexOf(a)-1;v+e+1<=x&&u(v+e+1,s,r);break}case"ArrowLeft":{const e=c.indexOf(a);v-e-1>=0&&u(v-e-1,s,r);break}case"PageDown":null!==g&&i(y,d(Math.min(0+m,g)));break;case"Home":u(0,s,r);break;case"End":u(x,s,r);break;case" ":break;default:b=!1}b&&r.preventDefault()},[e,o,l,u,i,d]),m=s.useCallback((t,r)=>{if(W0t(r))return;const s=e.current.getCellParams(t.id,t.field);if(s.cellMode===wKt.Edit||!bZt(r.key))return;if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:r,cell:s}))return;const u=o();if(0===u.length)return;const p=e.current.getViewportPageSize(),h=t.field?e.current.getColumnIndex(t.field):0,f=u.findIndex(e=>e.id===t.id),m=u.length-1,v=GKt(e).length-1;let y=!0;switch(r.key){case"ArrowDown":f<m&&i(h,d(f+1),n?"right":"left","down");break;case"ArrowUp":f>0?i(h,d(f-1)):a?c(h,r):l(h,r);break;case"ArrowRight":{const e=K6t({currentColIndex:h,firstColIndex:0,lastColIndex:v,isRtl:n});null!==e&&i(e,d(f),n?"left":"right");break}case"ArrowLeft":{const e=Y6t({currentColIndex:h,firstColIndex:0,lastColIndex:v,isRtl:n});null!==e&&i(e,d(f),n?"right":"left");break}case"Tab":r.shiftKey&&h>0?i(h-1,d(f),"left"):!r.shiftKey&&h<v&&i(h+1,d(f),"right");break;case" ":{if(t.field===eXt)break;const e=t.colDef;if(e&&(e.field===QZt||(e=>e===JZt||null!==(e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null})(e))(e.field)))break;!r.shiftKey&&f<m&&i(h,d(Math.min(f+p,m)));break}case"PageDown":f<m&&i(h,d(Math.min(f+p,m)));break;case"PageUp":{const e=Math.max(f-p,0);e!==f&&e>=0?i(h,d(e)):l(h,r);break}case"Home":r.ctrlKey||r.metaKey||r.shiftKey?i(0,d(0)):i(0,d(f));break;case"End":r.ctrlKey||r.metaKey||r.shiftKey?i(v,d(m)):i(v,d(f));break;default:y=!1}y&&r.preventDefault()},[e,o,n,i,d,a,c,l]),v=s.useCallback((e,{event:t})=>" "!==t.key&&e,[]);x6t(e,"canStartEditing",v),pYt(e,"columnHeaderKeyDown",p),pYt(e,"headerFilterKeyDown",h),pYt(e,"columnGroupHeaderKeyDown",f),pYt(e,"cellKeyDown",m)},Q6t=(e,t)=>{const r=S({},sQt(t.autoPageSize),t.paginationModel??t.initialState?.pagination?.paginationModel);lQt(r.pageSize,t.signature);const n=t.rowCount??t.initialState?.pagination?.rowCount??("client"===t.paginationMode?e.rows?.totalRowCount:void 0),o=t.paginationMeta??t.initialState?.pagination?.meta??{};return S({},e,{pagination:S({},e.pagination,{paginationModel:r,rowCount:n,meta:o,enabled:!0===t.pagination,paginationMode:t.paginationMode})})},J6t=(e,t)=>{((e,t)=>{const r=MJt(e,"useGridPaginationMeta"),n=SYt(e,hQt);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:hQt,changeEvent:"paginationMetaChange"});const o=s.useCallback(t=>{n!==t&&(r.debug("Setting 'paginationMeta' to",t),e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{meta:t})})))},[e,r,n]);CJt(e,{setPaginationMeta:o},"public");const a=s.useCallback((r,n)=>{const o=hQt(e);return n.exportOnlyDirtyModels&&null==t.paginationMeta&&null==t.initialState?.pagination?.meta?r:S({},r,{pagination:S({},r.pagination,{meta:o})})},[e,t.paginationMeta,t.initialState?.pagination?.meta]),i=s.useCallback((t,r)=>{const n=r.stateToRestore.pagination?.meta?r.stateToRestore.pagination.meta:hQt(e);return e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{meta:n})})),t},[e]);x6t(e,"exportState",a),x6t(e,"restoreState",i),s.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])})(e,t),((e,t)=>{const r=MJt(e,"useGridPaginationModel"),n=SYt(e,PYt),o=s.useRef(kXt(e)),a=Math.floor(t.rowHeight*n);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:dQt,changeEvent:"paginationModelChange"});const i=s.useCallback(t=>{const n=dQt(e);t!==n.page&&(r.debug(`Setting page to ${t}`),e.current.setPaginationModel({page:t,pageSize:n.pageSize}))},[e,r]),l=s.useCallback(t=>{const n=dQt(e);t!==n.pageSize&&(r.debug(`Setting page size to ${t}`),e.current.setPaginationModel({pageSize:t,page:n.page}))},[e,r]),c=s.useCallback(n=>{const o=dQt(e);n!==o&&(r.debug("Setting 'paginationModel' to",n),e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{paginationModel:V6t(e.pagination,t.signature,n)})}),"setPaginationModel"))},[e,r,t.signature]);CJt(e,{setPage:i,setPageSize:l,setPaginationModel:c},"public");const u=s.useCallback((r,n)=>{const o=dQt(e);return!n.exportOnlyDirtyModels||null!=t.paginationModel||null!=t.initialState?.pagination?.paginationModel||0!==o.page&&o.pageSize!==(t.autoPageSize?0:100)?S({},r,{pagination:S({},r.pagination,{paginationModel:o})}):r},[e,t.paginationModel,t.initialState?.pagination?.paginationModel,t.autoPageSize]),d=s.useCallback((r,n)=>{const o=n.stateToRestore.pagination?.paginationModel?S({},sQt(t.autoPageSize),n.stateToRestore.pagination?.paginationModel):dQt(e);return e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{paginationModel:V6t(e.pagination,t.signature,o)})}),"stateRestorePreProcessing"),r},[e,t.autoPageSize,t.signature]);x6t(e,"exportState",u),x6t(e,"restoreState",d);const p=s.useCallback(()=>{if(!t.autoPageSize)return;const r=e.current.getRootDimensions(),n=Math.max(1,Math.floor(r.viewportInnerSize.height/a));e.current.setPageSize(n)},[e,t.autoPageSize,a]),h=s.useCallback(t=>{if(null==t)return;const r=dQt(e);if(0===r.page)return;const n=vQt(e);r.page>n-1&&e.current.setPage(Math.max(0,n-1))},[e]),f=s.useCallback(()=>{0!==dQt(e).page&&e.current.setPage(0),0!==e.current.getScrollPosition().top&&e.current.scroll({top:0})},[e]),m=s.useCallback(t=>{const r=S({},t,{items:AXt(e)});n5t(r,o.current)||(o.current=r,f())},[e,f]);pYt(e,"viewportInnerSizeChange",p),pYt(e,"paginationModelChange",()=>{const t=dQt(e);e.current.virtualScrollerRef?.current&&e.current.scrollToIndexes({rowIndex:t.page*t.pageSize})}),pYt(e,"rowCountChange",h),pYt(e,"sortModelChange",f),pYt(e,"filterModelChange",m);const v=s.useRef(!0);s.useEffect(()=>{v.current?v.current=!1:t.pagination&&e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{paginationModel:V6t(e.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.signature,t.pagination]),s.useEffect(()=>{e.current.setState(e=>{const r=!0===t.pagination;return e.pagination.paginationMode===t.paginationMode||e.pagination.enabled===r?e:S({},e,{pagination:S({},e.pagination,{paginationMode:t.paginationMode,enabled:!0===t.pagination})})})},[e,t.paginationMode,t.pagination]),s.useEffect(p,[p])})(e,t),((e,t)=>{const r=MJt(e,"useGridRowCount"),n=SYt(e,RXt),o=SYt(e,pQt),a=SYt(e,hQt),i=SYt(e,dQt),l=_s(()=>dQt(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:pQt,changeEvent:"rowCountChange"});const c=s.useCallback(t=>{o!==t&&(r.debug("Setting 'rowCount' to",t),e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{rowCount:t})})))},[e,r,o]);CJt(e,{setRowCount:c},"public");const u=s.useCallback((r,n)=>{const o=pQt(e);return n.exportOnlyDirtyModels&&null==t.rowCount&&null==t.initialState?.pagination?.rowCount?r:S({},r,{pagination:S({},r.pagination,{rowCount:o})})},[e,t.rowCount,t.initialState?.pagination?.rowCount]),d=s.useCallback((t,r)=>{const n=r.stateToRestore.pagination?.rowCount?r.stateToRestore.pagination.rowCount:pQt(e);return e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{rowCount:n})})),t},[e]);x6t(e,"exportState",u),x6t(e,"restoreState",d);const p=s.useCallback(r=>{"client"!==t.paginationMode&&l.current&&r.pageSize!==l.current&&(l.current=r.pageSize,-1===o&&e.current.setPage(0))},[t.paginationMode,l,o,e]);pYt(e,"paginationModelChange",p),s.useEffect(()=>{"client"===t.paginationMode?e.current.setRowCount(n):null!=t.rowCount&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,n,t.rowCount]);const h=!1===a.hasNextPage;s.useEffect(()=>{h&&-1===o&&e.current.setRowCount(i.pageSize*i.page+n)},[e,n,h,o,i])})(e,t)},e8t=(e,t)=>S({},e,{preferencePanel:t.initialState?.preferencePanel??{open:!1}}),t8t=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;default:return""}},r8t=["id","field"],n8t=["id","field"],o8t=["id"],a8t=["id"],i8t=e=>S({},e,{editRows:{}}),s8t=(e,t)=>{((e,t)=>{const[r,n]=s.useState({}),o=s.useRef(r),a=s.useRef({}),{processRowUpdate:i,onProcessRowUpdateError:l,cellModesModel:c,onCellModesModelChange:u}=t,d=e=>(...r)=>{t.editMode===kKt.Cell&&e(...r)},p=s.useCallback((t,r)=>{const n=e.current.getCellParams(t,r);if(!e.current.isCellEditable(n))throw new Error(`MUI X: The cell with id=${t} and field=${r} is not editable.`)},[e]),h=s.useCallback((t,r,n)=>{if(e.current.getCellMode(t,r)!==n)throw new Error(`MUI X: The cell with id=${t} and field=${r} is not in ${n} mode.`)},[e]),f=s.useCallback((t,r)=>{if(!t.isEditable)return;if(t.cellMode===wKt.Edit)return;const n=S({},t,{reason:OKt.cellDoubleClick});e.current.publishEvent("cellEditStart",n,r)},[e]),m=s.useCallback((t,r)=>{if(t.cellMode===wKt.View)return;if(e.current.getCellMode(t.id,t.field)===wKt.View)return;const n=S({},t,{reason:PKt.cellFocusOut});e.current.publishEvent("cellEditStop",n,r)},[e]),v=s.useCallback((t,r)=>{if(t.cellMode===wKt.Edit){if(229===r.which)return;let n;if("Escape"===r.key?n=PKt.escapeKeyDown:"Enter"===r.key?n=PKt.enterKeyDown:"Tab"===r.key&&(n=r.shiftKey?PKt.shiftTabKeyDown:PKt.tabKeyDown,r.preventDefault()),n){const o=S({},t,{reason:n});e.current.publishEvent("cellEditStop",o,r)}}else if(t.isEditable){let n;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:r,cellParams:t,editMode:"cell"}))return;if(xZt(r)?n=OKt.printableKeyDown:wZt(r)?n=OKt.pasteKeyDown:"Enter"===r.key?n=OKt.enterKeyDown:"Backspace"!==r.key&&"Delete"!==r.key||(n=OKt.deleteKeyDown),n){const o=S({},t,{reason:n,key:r.key});e.current.publishEvent("cellEditStart",o,r)}}},[e]),y=s.useCallback(t=>{const{id:r,field:n,reason:o}=t,a={id:r,field:n};o!==OKt.printableKeyDown&&o!==OKt.deleteKeyDown&&o!==OKt.pasteKeyDown||(a.deleteValue=!0),e.current.startCellEditMode(a)},[e]),g=s.useCallback(t=>{const{id:r,field:n,reason:o}=t;let a;e.current.runPendingEditCellValueMutation(r,n),o===PKt.enterKeyDown?a="below":o===PKt.tabKeyDown?a="right":o===PKt.shiftTabKeyDown&&(a="left");const i="escapeKeyDown"===o;e.current.stopCellEditMode({id:r,field:n,ignoreModifications:i,cellToFocusAfter:a})},[e]);var x;pYt(e,"cellDoubleClick",d(f)),pYt(e,"cellFocusOut",d(m)),pYt(e,"cellKeyDown",d(v)),pYt(e,"cellEditStart",d(y)),pYt(e,"cellEditStop",d(g)),fYt(e,"cellEditStart",t.onCellEditStart),fYt(e,"cellEditStop",(x=t.onCellEditStop,async(...t)=>{if(x){const{id:r,field:n}=t[0],o=e.current.state.editRows,a=o[r][n]?.error;a||x(...t)}}));const b=s.useCallback((t,r)=>{const n=E1t(e);return n[t]&&n[t][r]?wKt.Edit:wKt.View},[e]),k=Ni(r=>{const a=r!==t.cellModesModel;u&&a&&u(r,{api:e.current}),t.cellModesModel&&a||(n(r),o.current=r,e.current.publishEvent("cellModesModelChange",r))}),w=s.useCallback((e,t,r)=>{const n=S({},o.current);if(null!==r)n[e]=S({},n[e],{[t]:S({},r)});else{const r=Hi(n[e],[t].map(l$t));n[e]=r,0===Object.keys(n[e]).length&&delete n[e]}k(n)},[k]),_=s.useCallback((t,r,n)=>{e.current.setState(e=>{const o=S({},e.editRows);return null!==n?o[t]=S({},o[t],{[r]:S({},n)}):(delete o[t][r],0===Object.keys(o[t]).length&&delete o[t]),S({},e,{editRows:o})})},[e]),C=s.useCallback(e=>{const{id:t,field:r}=e,n=Hi(e,r8t);p(t,r),h(t,r,wKt.View),w(t,r,S({mode:wKt.Edit},n))},[p,h,w]),M=Ni(async t=>{const{id:r,field:n,deleteValue:o,initialValue:a}=t,i=e.current.getCellValue(r,n);let s=i;o?s=t8t(e.current.getColumn(n)):a&&(s=a);const l=e.current.getColumn(n),c=!!l.preProcessEditCellProps&&o;let u={value:s,error:!1,isProcessingProps:c};if(_(r,n,u),e.current.setCellFocus(r,n),c&&(u=await Promise.resolve(l.preProcessEditCellProps({id:r,row:e.current.getRow(r),props:u,hasChanged:s!==i})),e.current.getCellMode(r,n)===wKt.Edit)){const t=E1t(e);_(r,n,S({},u,{value:t[r][n].value,isProcessingProps:!1}))}}),D=s.useCallback(e=>{const{id:t,field:r}=e,n=Hi(e,n8t);h(t,r,wKt.Edit),w(t,r,S({mode:wKt.View},n))},[h,w]),O=Ni(async r=>{const{id:n,field:o,ignoreModifications:s,cellToFocusAfter:c="none"}=r;h(n,o,wKt.Edit),e.current.runPendingEditCellValueMutation(n,o);const u=()=>{_(n,o,null),w(n,o,null),"none"!==c&&e.current.moveFocusToRelativeCell(n,o,c)};if(s)return void u();const d=E1t(e),{error:p,isProcessingProps:f}=d[n][o],m=e.current.getRow(n);if(p||f)return a.current[n][o].mode=wKt.Edit,void w(n,o,{mode:wKt.Edit});const v=e.current.getRowWithUpdatedValuesFromCellEditing(n,o);if(t.dataSource?.updateRow){if(n5t(m,v))return void u();const t=()=>{a.current[n][o].mode=wKt.Edit,w(n,o,{mode:wKt.Edit})},r={rowId:n,updatedRow:v,previousRow:m};try{await e.current.dataSource.editRow(r),u()}catch{t()}}else if(i){const t=e=>{a.current[n][o].mode=wKt.Edit,w(n,o,{mode:wKt.Edit}),l?l(e):"production"!==process.env.NODE_ENV&&lat(["MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/editing/persistence/."],"error")};try{Promise.resolve(i(v,m,{rowId:n})).then(t=>{e.current.updateRows([t]),u()}).catch(t)}catch(e){t(e)}}else e.current.updateRows([v]),u()}),P={setCellEditingEditCellValue:s.useCallback(async t=>{const{id:r,field:n,value:o,debounceMs:a,unstable_skipValueParser:i}=t;p(r,n),h(r,n,wKt.Edit);const s=e.current.getColumn(n),l=e.current.getRow(r);let c=o;s.valueParser&&!i&&(c=s.valueParser(o,l,s,e));let u=E1t(e),d=S({},u[r][n],{value:c,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});if(s.preProcessEditCellProps){const e=o!==u[r][n].value;d=S({},d,{isProcessingProps:!0}),_(r,n,d),d=await Promise.resolve(s.preProcessEditCellProps({id:r,row:l,props:d,hasChanged:e}))}return e.current.getCellMode(r,n)!==wKt.View&&(u=E1t(e),d=S({},d,{isProcessingProps:!1}),d.value=s.preProcessEditCellProps?u[r][n].value:c,_(r,n,d),u=E1t(e),!u[r]?.[n]?.error)},[e,p,h,_]),getRowWithUpdatedValuesFromCellEditing:s.useCallback((t,r)=>{const n=e.current.getColumn(r),o=E1t(e),a=e.current.getRow(t);if(!o[t]||!o[t][r])return e.current.getRow(t);const{value:i}=o[t][r];return n.valueSetter?n.valueSetter(i,a,n,e):S({},a,{[r]:i})},[e])};CJt(e,{getCellMode:b,startCellEditMode:C,stopCellEditMode:D},"public"),CJt(e,P,"private"),s.useEffect(()=>{c&&k(c)},[c,k]),po(()=>{const t=qYt(e),n=a.current;a.current=gKt(r),Object.entries(r).forEach(([r,o])=>{Object.entries(o).forEach(([o,a])=>{const i=n[r]?.[o]?.mode||wKt.View,s=t[r]?e.current.getRowId(t[r]):r;a.mode===wKt.Edit&&i===wKt.View?M(S({id:s,field:o},a)):a.mode===wKt.View&&i===wKt.Edit&&O(S({id:s,field:o},a))})})},[e,r,M,O])})(e,t),((e,t)=>{const[r,n]=s.useState({}),o=s.useRef(r),a=s.useRef({}),i=s.useRef({}),l=s.useRef(void 0),c=s.useRef(null),{processRowUpdate:u,onProcessRowUpdateError:d,rowModesModel:p,onRowModesModelChange:h}=t,f=e=>(...r)=>{t.editMode===kKt.Row&&e(...r)},m=s.useCallback((t,r)=>{const n=e.current.getCellParams(t,r);if(!e.current.isCellEditable(n))throw new Error(`MUI X: The cell with id=${t} and field=${r} is not editable.`)},[e]),v=s.useCallback((t,r)=>{if(e.current.getRowMode(t)!==r)throw new Error(`MUI X: The row with id=${t} is not in ${r} mode.`)},[e]),y=s.useCallback(t=>{const r=E1t(e);return Object.values(r[t]).some(e=>e.error)},[e]),g=s.useCallback((t,r)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===_Kt.Edit)return;const n=S({},e.current.getRowParams(t.id),{field:t.field,reason:EKt.cellDoubleClick});e.current.publishEvent("rowEditStart",n,r)},[e]),x=s.useCallback(e=>{c.current=e},[]),b=s.useCallback((t,r)=>{t.isEditable&&e.current.getRowMode(t.id)!==_Kt.View&&(c.current=null,l.current=setTimeout(()=>{if(c.current?.id!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===_Kt.View)return;if(y(t.id))return;const n=S({},e.current.getRowParams(t.id),{field:t.field,reason:jKt.rowFocusOut});e.current.publishEvent("rowEditStop",n,r)}}))},[e,y]);s.useEffect(()=>()=>{clearTimeout(l.current)},[]);const k=s.useCallback((t,r)=>{if(t.cellMode===_Kt.Edit){if(229===r.which)return;let n;if("Escape"===r.key)n=jKt.escapeKeyDown;else if("Enter"===r.key)n=jKt.enterKeyDown;else if("Tab"===r.key){const o=YKt(e).filter(r=>e.current.getColumn(r).type===RZt||e.current.isCellEditable(e.current.getCellParams(t.id,r)));if(r.shiftKey?t.field===o[0]&&(n=jKt.shiftTabKeyDown):t.field===o[o.length-1]&&(n=jKt.tabKeyDown),r.preventDefault(),!n){const n=o.findIndex(e=>e===t.field),a=o[r.shiftKey?n-1:n+1];e.current.setCellFocus(t.id,a)}}if(n){if(n!==jKt.escapeKeyDown&&y(t.id))return;const o=S({},e.current.getRowParams(t.id),{reason:n,field:t.field});e.current.publishEvent("rowEditStop",o,r)}}else if(t.isEditable){let n;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:r,cellParams:t,editMode:"row"}))return;if(xZt(r)||wZt(r)?n=EKt.printableKeyDown:"Enter"===r.key?n=EKt.enterKeyDown:"Backspace"!==r.key&&"Delete"!==r.key||(n=EKt.deleteKeyDown),n){const o=S({},e.current.getRowParams(t.id),{field:t.field,reason:n});e.current.publishEvent("rowEditStart",o,r)}}},[e,y]),w=s.useCallback(t=>{const{id:r,field:n,reason:o}=t,a={id:r,fieldToFocus:n};o!==EKt.printableKeyDown&&o!==EKt.deleteKeyDown||(a.deleteValue=!!n),e.current.startRowEditMode(a)},[e]),_=s.useCallback(t=>{const{id:r,reason:n,field:o}=t;let a;e.current.runPendingEditCellValueMutation(r),n===jKt.enterKeyDown?a="below":n===jKt.tabKeyDown?a="right":n===jKt.shiftTabKeyDown&&(a="left");const i="escapeKeyDown"===n;e.current.stopRowEditMode({id:r,ignoreModifications:i,field:o,cellToFocusAfter:a})},[e]);pYt(e,"cellDoubleClick",f(g)),pYt(e,"cellFocusIn",f(x)),pYt(e,"cellFocusOut",f(b)),pYt(e,"cellKeyDown",f(k)),pYt(e,"rowEditStart",f(w)),pYt(e,"rowEditStop",f(_)),fYt(e,"rowEditStart",t.onRowEditStart),fYt(e,"rowEditStop",t.onRowEditStop);const C=s.useCallback(r=>j1t(e,{rowId:r,editMode:t.editMode})?_Kt.Edit:_Kt.View,[e,t.editMode]),M=Ni(r=>{const a=r!==t.rowModesModel;h&&a&&h(r,{api:e.current}),t.rowModesModel&&a||(n(r),o.current=r,e.current.publishEvent("rowModesModelChange",r))}),D=s.useCallback((e,t)=>{const r=S({},o.current);null!==t?r[e]=S({},t):delete r[e],M(r)},[M]),O=s.useCallback((t,r)=>{e.current.setState(e=>{const n=S({},e.editRows);return null!==r?n[t]=r:delete n[t],S({},e,{editRows:n})})},[e]),P=s.useCallback((t,r,n)=>{e.current.setState(e=>{const o=S({},e.editRows);return null!==n?o[t]=S({},o[t],{[r]:S({},n)}):(delete o[t][r],0===Object.keys(o[t]).length&&delete o[t]),S({},e,{editRows:o})})},[e]),E=s.useCallback(e=>{const{id:t}=e,r=Hi(e,o8t);v(t,_Kt.View),D(t,S({mode:_Kt.Edit},r))},[v,D]),j=Ni(t=>{const{id:r,fieldToFocus:n,deleteValue:o,initialValue:a}=t,s=e.current.getRow(r),l=qKt(e),c=l.reduce((t,i)=>{const s=i.field;if(!e.current.getCellParams(r,s).isEditable)return t;const l=e.current.getColumn(s);let c=e.current.getCellValue(r,s);return n===s&&(o||a)&&(o?c=t8t(l):a&&(c=a)),t[s]={value:c,error:!1,isProcessingProps:l.editable&&!!l.preProcessEditCellProps&&o},t},{});i.current[r]=s,O(r,c),n&&e.current.setCellFocus(r,n),l.filter(e=>e.editable&&!!e.preProcessEditCellProps&&o).forEach(t=>{const n=t.field,i=e.current.getCellValue(r,n),l=o?t8t(t):a??i;Promise.resolve(t.preProcessEditCellProps({id:r,row:s,props:c[n],hasChanged:l!==i})).then(t=>{if(e.current.getRowMode(r)===_Kt.Edit){const o=E1t(e);P(r,n,S({},t,{value:o[r][n].value,isProcessingProps:!1}))}})})}),T=s.useCallback(e=>{const{id:t}=e,r=Hi(e,a8t);v(t,_Kt.Edit),D(t,S({mode:_Kt.View},r))},[v,D]),N=Ni(async r=>{const{id:n,ignoreModifications:o,field:s,cellToFocusAfter:l="none"}=r;e.current.runPendingEditCellValueMutation(n);const c=()=>{"none"!==l&&s&&e.current.moveFocusToRelativeCell(n,s,l),O(n,null),D(n,null),delete i.current[n]};if(o)return void c();const p=E1t(e),h=i.current[n];if(Object.values(p[n]).some(e=>e.isProcessingProps))return void(a.current[n].mode=_Kt.Edit);if(y(n))return a.current[n].mode=_Kt.Edit,void D(n,{mode:_Kt.Edit});const f=e.current.getRowWithUpdatedValuesFromRowEditing(n);if(t.dataSource?.updateRow){if(n5t(h,f))return void c();const t=()=>{a.current[n].mode=_Kt.Edit,D(n,{mode:_Kt.Edit})},r={rowId:n,updatedRow:f,previousRow:h};try{await e.current.dataSource.editRow(r),c()}catch{t()}}else if(u){const t=e=>{a.current[n]&&(a.current[n].mode=_Kt.Edit,D(n,{mode:_Kt.Edit})),d?d(e):"production"!==process.env.NODE_ENV&&lat(["MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/editing/persistence/."],"error")};try{Promise.resolve(u(f,h,{rowId:n})).then(t=>{e.current.updateRows([t]),c()}).catch(t)}catch(e){t(e)}}else e.current.updateRows([f]),c()}),R={setRowEditingEditCellValue:s.useCallback(t=>{const{id:r,field:n,value:o,debounceMs:a,unstable_skipValueParser:i}=t;m(r,n);const s=e.current.getColumn(n),l=e.current.getRow(r);let c=o;s.valueParser&&!i&&(c=s.valueParser(o,l,s,e));let u=E1t(e),d=S({},u[r][n],{value:c,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});return s.preProcessEditCellProps||P(r,n,d),new Promise(t=>{const o=[];if(s.preProcessEditCellProps){const a=d.value!==u[r][n].value;d=S({},d,{isProcessingProps:!0}),P(r,n,d);const i=Hi(u[r],[n].map(l$t)),p=Promise.resolve(s.preProcessEditCellProps({id:r,row:l,props:d,hasChanged:a,otherFieldsProps:i})).then(o=>{e.current.getRowMode(r)!==_Kt.View?(u=E1t(e),(o=S({},o,{isProcessingProps:!1})).value=s.preProcessEditCellProps?u[r][n].value:c,P(r,n,o)):t(!1)});o.push(p)}Object.entries(u[r]).forEach(([a,i])=>{if(a===n)return;const s=e.current.getColumn(a);if(!s.preProcessEditCellProps)return;i=S({},i,{isProcessingProps:!0}),P(r,a,i),u=E1t(e);const c=Hi(u[r],[a].map(l$t)),d=Promise.resolve(s.preProcessEditCellProps({id:r,row:l,props:i,hasChanged:!1,otherFieldsProps:c})).then(n=>{e.current.getRowMode(r)!==_Kt.View?(n=S({},n,{isProcessingProps:!1}),P(r,a,n)):t(!1)});o.push(d)}),Promise.all(o).then(()=>{e.current.getRowMode(r)===_Kt.Edit?(u=E1t(e),t(!u[r][n].error)):t(!1)})})},[e,m,P]),getRowWithUpdatedValuesFromRowEditing:s.useCallback(t=>{const r=E1t(e),n=e.current.getRow(t);if(!r[t])return e.current.getRow(t);let o=S({},i.current[t],n);return Object.entries(r[t]).forEach(([t,r])=>{const n=e.current.getColumn(t);n?.valueSetter?o=n.valueSetter(r.value,o,n,e):o[t]=r.value}),o},[e])};CJt(e,{getRowMode:C,startRowEditMode:E,stopRowEditMode:T},"public"),CJt(e,R,"private"),s.useEffect(()=>{p&&M(p)},[p,M]),po(()=>{const t=qYt(e),n=a.current;a.current=gKt(r);const o=new Set([...Object.keys(r),...Object.keys(n)]);Array.from(o).forEach(o=>{const a=r[o]??{mode:_Kt.View},i=n[o]?.mode||_Kt.View,s=t[o]?e.current.getRowId(t[o]):o;a.mode===_Kt.Edit&&i===_Kt.View?j(S({id:s},a)):a.mode===_Kt.View&&i===_Kt.Edit&&N(S({id:s},a))})},[e,r,j,N])})(e,t);const r=s.useRef({}),{isCellEditable:n}=t,o=s.useCallback(e=>!$Zt(e.rowNode)&&(!!e.colDef.editable&&(!!e.colDef.renderEditCell&&(!n||n(e)))),[n]);s.useEffect(()=>{const e=r.current;return()=>{Object.entries(e).forEach(([t,r])=>{Object.keys(r).forEach(r=>{const[n]=e[t][r];clearTimeout(n),delete e[t][r]})})}},[]);const a=s.useCallback((e,t)=>{if(r.current[e])if(t){if(r.current[e][t]){const[,n]=r.current[e][t];n()}}else Object.keys(r.current[e]).forEach(t=>{const[,n]=r.current[e][t];n()})},[]),i=s.useCallback(n=>{const{id:o,field:a,debounceMs:i}=n;return new Promise(s=>{((e,t,n,o)=>{if(!n)return void o();if(r.current[e]||(r.current[e]={}),r.current[e][t]){const[n]=r.current[e][t];clearTimeout(n)}const a=setTimeout(()=>{o(),delete r.current[e][t]},n);r.current[e][t]=[a,()=>{const[n]=r.current[e][t];clearTimeout(n),o(),delete r.current[e][t]}]})(o,a,i,async()=>{const r=t.editMode===kKt.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(o,a)===wKt.Edit){const e=await r(n);s(e)}})})},[e,t.editMode]),l=s.useCallback((r,n)=>t.editMode===kKt.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(r,n):e.current.getRowWithUpdatedValuesFromRowEditing(r),[e,t.editMode]),c=s.useCallback((t,r)=>{const n=E1t(e);return n[t]?.[r]??null},[e]),u={runPendingEditCellValueMutation:a};CJt(e,{isCellEditable:o,setEditCellValue:i,getRowWithUpdatedValues:l,unstable_getEditCellMeta:c},"public"),CJt(e,u,"private")},l8t=(e,t,r)=>{const n=!!t.dataSource;return r.current.caches.rows=BZt({rows:n?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),S({},e,{rows:HZt({apiRef:r,rowCountProp:t.rowCount,loadingProp:!!n||t.loading,previousTree:null,previousTreeDepths:null})})},c8t=e=>"full"===e.updates.type?(e=>{const t={[AZt]:S({},IZt(),{children:e})};for(let r=0;r<e.length;r+=1){const n=e[r];t[n]={id:n,depth:0,parent:AZt,type:"leaf",groupingKey:null}}return{groupingName:_6t,tree:t,treeDepths:{0:e.length},dataRowIds:e}})(e.updates.rows):(({previousTree:e,actions:t})=>{const r=S({},e),n={};for(let e=0;e<t.remove.length;e+=1){const o=t.remove[e];n[o]=!0,delete r[o]}for(let e=0;e<t.insert.length;e+=1){const n=t.insert[e];r[n]={id:n,depth:0,parent:AZt,type:"leaf",groupingKey:null}}const o=r[AZt];let a=[...o.children,...t.insert];return Object.values(n).length&&(a=a.filter(e=>!n[e])),r[AZt]=S({},o,{children:a}),{groupingName:_6t,tree:r,treeDepths:{0:a.length},dataRowIds:a}})({previousTree:e.previousTree,actions:e.updates.actions});class u8t extends Error{}function d8t(e,t){const r=s.useCallback(t=>({field:t,colDef:e.current.getColumn(t)}),[e]),n=s.useCallback(t=>{const r=e.current.getRow(t);if(!r)throw new u8t(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:r}},[e]),o=s.useCallback((t,r,n,{cellMode:o,colDef:a,hasFocus:i,rowNode:s,tabIndex:l})=>{const c=n[r],u=a?.valueGetter?a.valueGetter(c,n,a,e):c,d={id:t,field:r,row:n,rowNode:s,colDef:a,cellMode:o,hasFocus:i,tabIndex:l,value:u,formattedValue:u,isEditable:!1,api:e.current};return a&&a.valueFormatter&&(d.formattedValue=a.valueFormatter(u,n,a,e)),d.isEditable=a&&e.current.isCellEditable(d),d},[e]),a=s.useCallback((r,n)=>{const o=e.current.getRow(r),a=GYt(e,r);if(!o||!a)throw new u8t(`No row with id #${r} found`);const i=XXt(e),s=rQt(e),l=e.current.getCellMode(r,n);return e.current.getCellParamsForRow(r,n,o,{colDef:t.listView&&t.listViewColumn?.field===n?BKt(e):e.current.getColumn(n),rowNode:a,hasFocus:null!==i&&i.field===n&&i.id===r,tabIndex:s&&s.field===n&&s.id===r?0:-1,cellMode:l})},[e,t.listView,t.listViewColumn?.field]),i=s.useCallback((t,r)=>{const n=e.current.getColumn(r),o=e.current.getRow(t);if(!o)throw new u8t(`No row with id #${t} found`);return n&&n.valueGetter?n.valueGetter(o[n.field],o,n,e):o[r]},[e]),l=s.useCallback((t,r)=>((e,t,r)=>{const n=t.field;if(!t||!t.valueGetter)return e[n];const o=e[t.field];return t.valueGetter(o,e,t,r)})(t,r,e),[e]),c=s.useCallback((t,r)=>{const n=l(t,r);return r&&r.valueFormatter?r.valueFormatter(n,t,r,e):n},[e,l]),u=s.useCallback(t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(`[role="columnheader"][data-field="${$0t(t)}"]`)}(e.current.rootElementRef.current,t):null,[e]),d=s.useCallback(t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(q0t(t))}(e.current.rootElementRef.current,t):null,[e]),p=s.useCallback((t,r)=>e.current.rootElementRef.current?function(e,{id:t,field:r}){const n=`${q0t(t)} .${nYt.cell}[data-field="${$0t(r)}"]`;return e.querySelector(n)}(e.current.rootElementRef.current,{id:t,field:r}):null,[e]),h={getCellParamsForRow:o};CJt(e,{getCellValue:i,getCellParams:a,getCellElement:p,getRowValue:l,getRowFormattedValue:c,getRowParams:n,getRowElement:d,getColumnHeaderParams:r,getColumnHeaderElement:u},"public"),CJt(e,h,"private")}const p8t={type:"include",ids:new Set},h8t=(e,t)=>S({},e,{rowSelection:t.rowSelection?t.rowSelectionModel??p8t:p8t}),f8t=(e,t)=>{const r=(e=>{const{classes:t}=e;return s.useMemo(()=>ua({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},rYt,t),[t])})({classes:t.classes}),n=s.useCallback(n=>{const o=S({},MQt,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),a=t.checkboxSelection,i=null!=n.lookup[CQt];return a&&!i?(n.lookup[CQt]=o,n.orderedFields=[CQt,...n.orderedFields]):!a&&i?(delete n.lookup[CQt],n.orderedFields=n.orderedFields.filter(e=>e!==CQt)):a&&i&&(n.lookup[CQt]=S({},o,n.lookup[CQt]),t.columns.some(e=>e.field===CQt)||(n.orderedFields=[CQt,...n.orderedFields.filter(e=>e!==CQt)])),n},[e,r,t.columns,t.checkboxSelection]);x6t(e,"hydrateColumns",n)},m8t=(e,t)=>{const r=t.sortModel??t.initialState?.sorting?.sortModel??[];return S({},e,{sorting:{sortModel:rKt(r,t.disableMultipleColumnsSorting),sortedRows:[]}})};function v8t(e){const{containerSize:t,scrollPosition:r,elementSize:n,elementOffset:o}=e,a=o+n;return n>t?o:a-t>r?a-t:o<r?o:void 0}function y8t(e,t=166){let r,n;const o=()=>{r=void 0,e(...n)};function a(...e){n=e,void 0===r&&(r=setTimeout(o,t))}return a.clear=()=>{clearTimeout(r),r=void 0},a}const g8t={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:"\t",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:kKt.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"production"===process.env.NODE_ENV?"error":"warn",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rows:[],rowSelection:!0,rowSpacingType:"margin",rowSpanning:!1,showCellVerticalBorder:!1,showColumnVerticalBorder:!1,showToolbar:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,virtualizeColumnsWithAutoRowHeight:!1},x8t={width:0,height:0},b8t={isReady:!1,root:x8t,viewportOuterSize:x8t,viewportInnerSize:x8t,contentSize:x8t,minimumSize:x8t,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},k8t=(e,t,r)=>S({},e,{dimensions:S({},b8t,M8t(t,r,PYt(r),XKt(r)))}),w8t=RGt(GKt,JKt,(e,t)=>{const r=e.length;return 0===r?0:$Jt(t[r-1]+e[r-1].computedWidth,1)});function _8t(e,t){const r=MJt(e,"useResizeContainer"),n=s.useRef(!1),o=s.useRef(x8t),a=SYt(e,XKt),i=SYt(e,PYt),l=SYt(e,w8t),c=s.useRef(!0),{rowHeight:u,headerHeight:d,groupHeaderHeight:p,headerFilterHeight:h,headersTotalHeight:f,leftPinnedWidth:m,rightPinnedWidth:v}=M8t(t,e,i,a),y=s.useCallback(()=>IGt(e),[e]),g=s.useCallback(t=>{e.current.setState(e=>S({},e,{dimensions:t})),e.current.rootElementRef.current&&C8t(e.current.rootElementRef.current,IGt(e))},[e]),x=s.useCallback(()=>{const r=IGt(e);if(!r.isReady)return 0;const n=OJt(e);if(t.getRowHeight){const t=RJt(e),r=t.lastRowIndex-t.firstRowIndex;return Math.min(r-1,n.rows.length)}const o=Math.floor(r.viewportInnerSize.height/u);return Math.min(o,n.rows.length)},[e,t.getRowHeight,u]),b=s.useCallback(()=>{if(c.current)return;const r=function(e,t){if(void 0!==t)return t;if(null===e)return 0;const r=S8t.get(e);if(void 0!==r)return r;const n=Oi(e).createElement("div");n.style.width="99px",n.style.height="99px",n.style.position="absolute",n.style.overflow="scroll",n.className="scrollDiv",e.appendChild(n);const o=n.offsetWidth-n.clientWidth;return e.removeChild(n),S8t.set(e,o),o}(e.current.mainElementRef.current,t.scrollbarSize),n=fJt(e),a=f+n.pinnedTopRowsTotalHeight,i=n.pinnedBottomRowsTotalHeight,s={width:l,height:$Jt(n.currentPageTotalHeight,1)};let y,x,b=!1,k=!1;if(t.autoHeight)k=!1,b=Math.round(l)>Math.round(o.current.width),y={width:o.current.width,height:a+i+s.height},x={width:Math.max(0,y.width-(k?r:0)),height:Math.max(0,y.height-(b?r:0))};else{y={width:o.current.width,height:o.current.height},x={width:Math.max(0,y.width),height:Math.max(0,y.height-a-i)};const e=s,t=x,n=e.width>t.width,l=e.height>t.height;(n||l)&&(k=l,b=e.width+(k?r:0)>t.width,b&&(k=e.height+r>t.height)),k&&(x.width-=r),b&&(x.height-=r)}const w=Math.max(y.width,l+(k?r:0)),_={width:l,height:a+s.height+i},C={isReady:!0,root:o.current,viewportOuterSize:y,viewportInnerSize:x,contentSize:s,minimumSize:_,hasScrollX:b,hasScrollY:k,scrollbarSize:r,headerHeight:d,groupHeaderHeight:p,headerFilterHeight:h,rowWidth:w,rowHeight:u,columnsTotalWidth:l,leftPinnedWidth:m,rightPinnedWidth:v,headersTotalHeight:f,topContainerHeight:a,bottomContainerHeight:i},M=e.current.state.dimensions;var S,D;n5t(M,C)||(g(C),S=C.viewportInnerSize,D=M.viewportInnerSize,(S.width!==D.width||S.height!==D.height)&&e.current.publishEvent("viewportInnerSizeChange",C.viewportInnerSize),e.current.updateRenderContext?.())},[e,g,t.scrollbarSize,t.autoHeight,u,d,p,h,l,f,m,v]),k=Ni(b),w=s.useMemo(()=>t.resizeThrottleMs>0?y8t(()=>{k(),e.current.publishEvent("debouncedResize",o.current)},t.resizeThrottleMs):void 0,[e,t.resizeThrottleMs,k]);s.useEffect(()=>w?.clear,[w]);const _={getRootDimensions:y},C={updateDimensions:b,getViewportPageSize:x};po(b,[b]),CJt(e,_,"public"),CJt(e,C,"private");const M=s.useCallback(t=>{C8t(t,IGt(e))},[e]),D=s.useCallback(e=>{if(o.current=e,0!==e.height||n.current||t.autoHeight||qJt||(r.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),n.current=!0),0!==e.width||n.current||qJt||(r.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),n.current=!0),c.current||!w)return c.current=!1,void b();w()},[b,t.autoHeight,w,r]);fYt(e,"rootMount",M),fYt(e,"resize",D),fYt(e,"debouncedResize",t.onResize)}function C8t(e,t){const r=(t,r)=>e.style.setProperty(t,r);r("--DataGrid-hasScrollX",`${Number(t.hasScrollX)}`),r("--DataGrid-hasScrollY",`${Number(t.hasScrollY)}`),r("--DataGrid-scrollbarSize",`${t.scrollbarSize}px`),r("--DataGrid-rowWidth",`${t.rowWidth}px`),r("--DataGrid-columnsTotalWidth",`${t.columnsTotalWidth}px`),r("--DataGrid-leftPinnedWidth",`${t.leftPinnedWidth}px`),r("--DataGrid-rightPinnedWidth",`${t.rightPinnedWidth}px`),r("--DataGrid-headerHeight",`${t.headerHeight}px`),r("--DataGrid-headersTotalHeight",`${t.headersTotalHeight}px`),r("--DataGrid-topContainerHeight",`${t.topContainerHeight}px`),r("--DataGrid-bottomContainerHeight",`${t.bottomContainerHeight}px`),r("--height",`${t.rowHeight}px`)}function M8t(e,t,r,n){const o=KZt(e.rowHeight,g8t.rowHeight,ZZt);return{rowHeight:Math.floor(o*r),headerHeight:Math.floor(e.columnHeaderHeight*r),groupHeaderHeight:Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*r),headerFilterHeight:Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*r),columnsTotalWidth:w8t(t),headersTotalHeight:hJt(t,e),leftPinnedWidth:n.left.reduce((e,t)=>e+t.computedWidth,0),rightPinnedWidth:n.right.reduce((e,t)=>e+t.computedWidth,0)}}const S8t=new WeakMap;const D8t=void 0!==globalThis.ResizeObserver?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},O8t=(e,t,r)=>{r.current.caches.rowsMeta={heights:new Map};const n=BGt(r),o=VYt(r),a=cQt(r),i=Math.min(a.enabled?a.paginationModel.pageSize:o,o);return S({},e,{rowsMeta:{currentPageTotalHeight:i*n,positions:Array.from({length:i},(e,t)=>t*n),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})};function P8t(e){const{apiRef:t,lookup:r,columnIndex:n,rowId:o,minFirstColumnIndex:a,maxLastColumnIndex:i,columns:s}=e,l=s.length,c=s[n],u=t.current.getRow(o),d=t.current.getRowValue(u,c),p="function"==typeof c.colSpan?c.colSpan(d,u,c,t):c.colSpan;if(!p||1===p)return E8t(r,o,n,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let h=c.computedWidth;for(let e=1;e<p;e+=1){const t=n+e;if(t>=a&&t<i){h+=s[t].computedWidth,E8t(r,o,n+e,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(n+p,l-1),leftVisibleCellIndex:n})}E8t(r,o,n,{spannedByColSpan:!1,cellProps:{colSpan:p,width:h}})}return{colSpan:p}}function E8t(e,t,r,n){e[t]||(e[t]={}),e[t][r]=n}const j8t=(e,t,r)=>{if(TKt(e)){if(void 0!==r[e.field])throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${r[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(r[e.field]=t)}const{groupId:n,children:o}=e;o.forEach(e=>{j8t(e,[...t,n],r)})},T8t=e=>{if(!e)return{};const t={};return e.forEach(e=>{j8t(e,[],t)}),t},N8t=(e,t,r)=>{const n=e=>t[e]??[],o=[],a=Math.max(0,...e.map(e=>n(e).length)),i=(e,t,r)=>{const o=n(e),a=n(t);for(let e=0;e<=r;e+=1)if(o[e]!==a[e])return!1;return!0},s=(e,t)=>{const n=r?.left,o=r?.right,a=!!n?.includes(e),i=!!n?.includes(t),s=!!o?.includes(e),l=!!o?.includes(t);return a!==i||s!==l};for(let t=0;t<a;t+=1){const r=[];for(let o=0;o<e.length;o+=1){const a=e[o],l=n(a)[t]??null;if(0===r.length){r.push({columnFields:[a],groupId:l});continue}const c=r[r.length-1],u=c.columnFields[c.columnFields.length-1];c.groupId!==l||!i(u,a,t)||s(u,a)?r.push({columnFields:[a],groupId:l}):c.columnFields.push(a)}o.push(r)}return o},R8t=["groupId","children"],z8t=e=>{const t={};for(let r=0;r<e.length;r+=1){const n=e[r];if(TKt(n))continue;const{groupId:o,children:a}=n,i=Hi(n,R8t);if(!o)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");"production"===process.env.NODE_ENV||a||console.warn(`MUI X: group groupId=${o} has no children.`);const s=S({},i,{groupId:o}),l=z8t(a);if(void 0!==l[o]||void 0!==t[o])throw new Error(`MUI X: The groupId ${o} is used multiple times in the columnGroupingModel.`);Object.assign(t,l),t[o]=s}return t},A8t=(e,t,r)=>{if(r.current.caches.columnGrouping={lastColumnGroupingModel:t.columnGroupingModel},!t.columnGroupingModel)return e;const n=HKt(r),o=YKt(r),a=z8t(t.columnGroupingModel??[]),i=T8t(t.columnGroupingModel??[]),s=N8t(n,i,r.current.state.pinnedColumns??{}),l=0===o.length?0:Math.max(...o.map(e=>i[e]?.length??0));return S({},e,{columnGrouping:{lookup:a,unwrappedGroupingModel:i,headerStructure:s,maxDepth:l}})};function F8t(e,t){if(void 0!==t&&e.changedTouches){for(let r=0;r<e.changedTouches.length;r+=1){const n=e.changedTouches[r];if(n.identifier===t)return{x:n.clientX,y:n.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function I8t(e,t,r,n){let o=e;return o+="Right"===n?t-r.left:r.right-t,o}function L8t(e){e.preventDefault(),e.stopImmediatePropagation()}function B8t(e){const t=s.useRef(void 0),r=()=>TJt(e),n=SYt(e,r);s.useEffect(()=>{t.current&&!1===n&&(t.current.resolve(),t.current=void 0)});return()=>{if(!t.current){if(!1===r())return Promise.resolve();t.current=function(){let e,t;const r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r}()}return t.current}}function V8t(e,t,r){const n={},o=e.current.rootElementRef.current;return o.classList.add(nYt.autosizing),r.forEach(r=>{const o=function(e,t){const r=e.virtualScrollerRef.current;return Array.from(r.querySelectorAll(`:scope > div > div > div > [data-field="${$0t(t)}"][role="gridcell"]`))}(e.current,r.field),a=o.map(e=>e.getBoundingClientRect().width??0),i=t.includeOutliers?a:function(e,t){if(e.length<4)return e;const r=e.slice();r.sort((e,t)=>e-t);const n=r[Math.floor(.25*r.length)],o=r[Math.floor(.75*r.length)-1],a=o-n,i=a<5?5:a*t;return r.filter(e=>e>n-i&&e<o+i)}(a,t.outliersFactor);if(t.includeHeaders){const t=(s=e.current,l=r.field,s.columnHeadersContainerRef.current.querySelector(`:scope > div > [data-field="${$0t(l)}"][role="columnheader"]`));if(t){const e=t.querySelector(`.${nYt.columnHeaderTitle}`),r=t.querySelector(`.${nYt.columnHeaderTitleContainerContent}`),n=t.querySelector(`.${nYt.iconButtonContainer}`),o=t.querySelector(`.${nYt.menuIcon}`),a=e??r,s=window.getComputedStyle(t,null),l=parseInt(s.paddingLeft,10)+parseInt(s.paddingRight,10),c=a.scrollWidth+1+l+(n?.clientWidth??0)+(o?.clientWidth??0);i.push(c)}}var s,l;const c=r.minWidth!==-1/0&&void 0!==r.minWidth,u=r.maxWidth!==1/0&&void 0!==r.maxWidth,d=c?r.minWidth:0,p=u?r.maxWidth:1/0,h=0===i.length?0:Math.max(...i);n[r.field]=vKt(h,d,p)}),o.classList.remove(nYt.autosizing),n}const H8t=e=>S({},e,{columnResize:{resizingColumnField:""}});function $8t(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const q8t=(e,t)=>{const r=Vo(),n=MJt(e,"useGridColumnResize"),o=_s($8t).current,a=s.useRef(null),i=s.useRef(null),l=Ds(),c=s.useRef(void 0),u=t=>{n.debug(`Updating width to ${t} for col ${o.colDef.field}`);const r=o.columnHeaderElement.offsetWidth,a=t-r,i=t-o.initialColWidth;if(i>0){const t=o.initialTotalWidth+i;e.current.rootElementRef?.current?.style.setProperty("--DataGrid-rowWidth",`${t}px`)}o.colDef.computedWidth=t,o.colDef.width=t,o.colDef.flex=0,o.columnHeaderElement.style.width=`${t}px`;const s=o.headerFilterElement;s&&(s.style.width=`${t}px`),o.groupHeaderElements.forEach(e=>{const r=e;let n;n="1"===r.getAttribute("aria-colspan")?`${t}px`:`${r.offsetWidth+a}px`,r.style.width=n}),o.cellElements.forEach(e=>{const r=e;let n;n="1"===r.getAttribute("aria-colspan")?`${t}px`:`${r.offsetWidth+a}px`,r.style.setProperty("--width",n)});const l=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);l===AKt.LEFT&&(W8t(o.fillerLeft,"width",a),o.leftPinnedCellsAfter.forEach(e=>{W8t(e,"left",a)}),o.leftPinnedHeadersAfter.forEach(e=>{W8t(e,"left",a)})),l===AKt.RIGHT&&(W8t(o.fillerRight,"width",a),o.rightPinnedCellsBefore.forEach(e=>{W8t(e,"right",a)}),o.rightPinnedHeadersBefore.forEach(e=>{W8t(e,"right",a)}))},d=t=>{if(g(),o.previousMouseClickEvent){const r=o.previousMouseClickEvent,n=r.timeStamp,a=r.clientX,i=r.clientY;if(t.timeStamp-n<300&&t.clientX===a&&t.clientY===i)return o.previousMouseClickEvent=void 0,void e.current.publishEvent("columnResizeStop",null,t)}if(o.colDef){e.current.setColumnWidth(o.colDef.field,o.colDef.width),n.debug(`Updating col ${o.colDef.field} with new width: ${o.colDef.width}`);const t=VKt(e);o.groupHeaderElements.forEach(e=>{const r=e,n=`${e.getAttribute("data-fields").slice(2,-2).split("-|-").reduce((e,r)=>!1!==t.columnVisibilityModel[r]?e+t.lookup[r].computedWidth:e,0)}px`;r.style.width=n})}l.start(0,()=>{e.current.publishEvent("columnResizeStop",null,t)})},p=(t,n,s)=>{const l=e.current.rootElementRef.current;var c,u;o.initialColWidth=t.computedWidth,o.initialTotalWidth=e.current.getRootDimensions().rowWidth,o.colDef=t,o.columnHeaderElement=(c=e.current.columnHeadersContainerRef.current,u=t.field,c.querySelector(`[data-field="${$0t(u)}"]`));const d=l.querySelector(`.${nYt.headerFilterRow} [data-field="${$0t(t.field)}"]`);d&&(o.headerFilterElement=d),o.groupHeaderElements=function(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${$0t(t)}-|"]`)??[])}(e.current.columnHeadersContainerRef?.current,t.field),o.cellElements=function(e,t){if(!H0t(e,nYt.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const n=Number(r)-1,o=[];return t.virtualScrollerRef?.current?(K0t(t).forEach(e=>{const r=e.getAttribute("data-id");if(!r)return;let a=n;const i=t.unstable_getCellColSpanInfo(r,n);i&&i.spannedByColSpan&&(a=i.leftVisibleCellIndex);const s=e.querySelector(`[data-colindex="${a}"]`);s&&o.push(s)}),o):[]}(o.columnHeaderElement,e.current),o.fillerLeft=U0t(e.current,r?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=U0t(e.current,r?"filler--pinnedLeft":"filler--pinnedRight");const p=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=p!==AKt.LEFT?[]:function(e,t,r){const n=Z0t(t);return G0t({api:e,colIndex:n,position:r?"right":"left",filterFn:e=>r?e<n:e>n})}(e.current,o.columnHeaderElement,r),o.rightPinnedCellsBefore=p!==AKt.RIGHT?[]:function(e,t,r){const n=Z0t(t);return G0t({api:e,colIndex:n,position:r?"left":"right",filterFn:e=>r?e>n:e<n})}(e.current,o.columnHeaderElement,r),o.leftPinnedHeadersAfter=p!==AKt.LEFT?[]:function(e,t,r){const n=Z0t(t);return Y0t({api:e,position:r?"right":"left",colIndex:n,filterFn:e=>r?e<n:e>n})}(e.current,o.columnHeaderElement,r),o.rightPinnedHeadersBefore=p!==AKt.RIGHT?[]:function(e,t,r){const n=Z0t(t);return Y0t({api:e,position:r?"left":"right",colIndex:n,filterFn:(e,t)=>!t.classList.contains(nYt["columnHeader--last"])&&(r?e>n:e<n)})}(e.current,o.columnHeaderElement,r),i.current=function(e,t){const r=e.classList.contains(nYt["columnSeparator--sideRight"])?"Right":"Left";return t?function(e){return"Right"===e?"Left":"Right"}(r):r}(n,r),a.current=function(e,t,r){return"Left"===r?e-t.left:t.right-e}(s,o.columnHeaderElement.getBoundingClientRect(),i.current)},h=Ni(d),f=Ni(t=>{if(0===t.buttons)return void h(t);let r=I8t(a.current,t.clientX,o.columnHeaderElement.getBoundingClientRect(),i.current);r=vKt(r,o.colDef.minWidth,o.colDef.maxWidth),u(r);const n={element:o.columnHeaderElement,colDef:o.colDef,width:r};e.current.publishEvent("columnResize",n,t)}),m=Ni(e=>{F8t(e,c.current)&&d(e)}),v=Ni(t=>{const r=F8t(t,c.current);if(!r)return;if("mousemove"===t.type&&0===t.buttons)return void m(t);let n=I8t(a.current,r.x,o.columnHeaderElement.getBoundingClientRect(),i.current);n=vKt(n,o.colDef.minWidth,o.colDef.maxWidth),u(n);const s={element:o.columnHeaderElement,colDef:o.colDef,width:n};e.current.publishEvent("columnResize",s,t)}),y=Ni(t=>{const r=H0t(t.target,nYt["columnSeparator--resizable"]);if(!r)return;const o=t.changedTouches[0];null!=o&&(c.current=o.identifier);const a=H0t(t.target,nYt.columnHeader),i=a.getAttribute("data-field");const s=e.current.getColumn(i);n.debug(`Start Resize on col ${s.field}`),e.current.publishEvent("columnResizeStart",{field:i},t),p(s,r,o.clientX);const l=Oi(t.currentTarget);l.addEventListener("touchmove",v),l.addEventListener("touchend",m)}),g=s.useCallback(()=>{const t=Oi(e.current.rootElementRef.current);t.body.style.removeProperty("cursor"),t.removeEventListener("mousemove",f),t.removeEventListener("mouseup",h),t.removeEventListener("touchmove",v),t.removeEventListener("touchend",m),setTimeout(()=>{t.removeEventListener("click",L8t,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[e,o,f,h,v,m]),x=s.useCallback(({field:t})=>{e.current.setState(e=>S({},e,{columnResize:S({},e.columnResize,{resizingColumnField:t})}))},[e]),b=s.useCallback(()=>{e.current.setState(e=>S({},e,{columnResize:S({},e.columnResize,{resizingColumnField:""})}))},[e]),k=Ni(({colDef:t},r)=>{if(0!==r.button)return;if(!r.currentTarget.classList.contains(nYt["columnSeparator--resizable"]))return;r.preventDefault(),n.debug(`Start Resize on col ${t.field}`),e.current.publishEvent("columnResizeStart",{field:t.field},r),p(t,r.currentTarget,r.clientX);const a=Oi(e.current.rootElementRef.current);a.body.style.cursor="col-resize",o.previousMouseClickEvent=r.nativeEvent,a.addEventListener("mousemove",f),a.addEventListener("mouseup",h),a.addEventListener("click",L8t,!0)}),w=Ni((r,n)=>{if(t.disableAutosize)return;if(0!==n.button)return;const o=e.current.state.columns.lookup[r.field];!1!==o.resizable&&e.current.autosizeColumns(S({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[o.field]}))}),_=B8t(e),C=s.useRef(!1),M=s.useCallback(async r=>{const n=e.current.rootElementRef?.current;if(!n)return;if(C.current)return;C.current=!0;const o=VKt(e),a=S({},P1t,r,{columns:r?.columns??o.orderedFields});a.columns=a.columns.filter(e=>!1!==o.columnVisibilityModel[e]);const i=a.columns.map(t=>e.current.state.columns.lookup[t]);try{!t.disableVirtualization&&a.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await _());const r=V8t(e,a,i),n=i.map(e=>S({},e,{width:r[e.field],computedWidth:r[e.field],flex:0}));if(a.expand){const t=o.orderedFields.map(e=>o.lookup[e]).filter(e=>!1!==o.columnVisibilityModel[e.field]).reduce((e,t)=>e+(r[t.field]??t.computedWidth??t.width),0),a=e.current.getRootDimensions(),i=a.viewportInnerSize.width-t;if(i>0){const e=i/(n.length||1);n.forEach(t=>{t.width+=e,t.computedWidth+=e})}}e.current.updateColumns(n),n.forEach((t,r)=>{if(t.width!==i[r].width){const r=t.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t.field),colDef:t,width:r})}})}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),C.current=!1}},[e,_,t.disableVirtualization]);s.useEffect(()=>g,[g]),Ms(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),SJt(e,()=>e.current.columnHeadersContainerRef?.current,"touchstart",y,{passive:!0}),CJt(e,{autosizeColumns:M},"public"),pYt(e,"columnResizeStop",b),pYt(e,"columnResizeStart",x),pYt(e,"columnSeparatorMouseDown",k),pYt(e,"columnSeparatorDoubleClick",w),fYt(e,"columnResize",t.onColumnResize),fYt(e,"columnWidthChange",t.onColumnWidthChange)};function W8t(e,t,r){e&&(e.style[t]=`${parseInt(e.style[t],10)+r}px`)}function U8t(e){return 0!==e.firstRowIndex||0!==e.lastRowIndex}const G8t=(e,t,r)=>{if(!e)return null;let n=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(n=o(n,e,t,r)),n},Y8t={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},K8t={firstRowIndex:0,lastRowIndex:0},Z8t=new Set([CQt,"__reorder__",eXt]),X8t=(e,t,r,n,o,a,i)=>{const s=a?{}:S({},e.current.state.rowSpanning.spannedCells),l=a?{}:S({},e.current.state.rowSpanning.hiddenCells),c=a?{}:S({},e.current.state.rowSpanning.hiddenCellOriginMap);return a&&(i=K8t),t.forEach(t=>{if(!Z8t.has(t.field)){for(let a=o.firstRowIndex;a<o.lastRowIndex;a+=1){const i=r[a];if(l[i.id]?.[t.field])continue;const u=G8t(i.model,t,e);if(null==u)continue;let d=i.id,p=a,h=0;const f=[];if(a===o.firstRowIndex){let o=a-1,i=r[o];for(;o>=n.firstRowIndex&&i&&G8t(i.model,t,e)===u;){const e=r[o+1];l[e.id]?l[e.id][t.field]=!0:l[e.id]={[t.field]:!0},f.push(a),h+=1,d=i.id,p=o,o-=1,i=r[o]}}f.forEach(e=>{c[e]?c[e][t.field]=p:c[e]={[t.field]:p}});let m=a+1;for(;m<=n.lastRowIndex&&r[m]&&G8t(r[m].model,t,e)===u;){const e=r[m];l[e.id]?l[e.id][t.field]=!0:l[e.id]={[t.field]:!0},c[m]?c[m][t.field]=p:c[m]={[t.field]:p},m+=1,h+=1}h>0&&(s[d]?s[d][t.field]=h+1:s[d]={[t.field]:h+1})}i={firstRowIndex:Math.min(i.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(i.lastRowIndex,o.lastRowIndex)}}}),{spannedCells:s,hiddenCells:l,hiddenCellOriginMap:c,processedRange:i}},Q8t=(e,t)=>{const r=QYt(t).length;if(e.pagination){const e=mQt(t);let n=20;return e>0&&(n=e-1),{firstRowIndex:0,lastRowIndex:Math.min(n,r)}}return{firstRowIndex:0,lastRowIndex:Math.min(20,r)}},J8t=(e,t,r)=>{if(!t.rowSpanning)return S({},e,{rowSpanning:Y8t});const n=e.rows.dataRowIds||[],o=e.columns.orderedFields||[],a=e.rows.dataRowIdToModelLookup,i=e.columns.lookup,s=Boolean(e.filter.filterModel.items.length)||Boolean(e.filter.filterModel.quickFilterValues?.length);if(!n.length||!o.length||!a||!i||s)return S({},e,{rowSpanning:Y8t});const l=Q8t(t,r),c=n.map(e=>({id:e,model:a[e]})),u=o.map(e=>i[e]),{spannedCells:d,hiddenCells:p,hiddenCellOriginMap:h}=X8t(r,u,c,l,l,!0,K8t);return S({},e,{rowSpanning:{spannedCells:d,hiddenCells:p,hiddenCellOriginMap:h}})},e7t=(e,t,r)=>S({},e,{listViewColumn:t.listViewColumn?S({},t.listViewColumn,{computedWidth:t7t(r)}):void 0});function t7t(e){return IGt(e).viewportInnerSize.width}const r7t=RGt(kXt,yXt,dQt,(e,t,r)=>({groupKeys:[],paginationModel:r,sortModel:t,filterModel:e,start:r.page*r.pageSize,end:r.page*r.pageSize+r.pageSize-1}));let n7t=function(e){return e.Default="set-new-rows",e.LazyLoading="replace-row-range",e}({});class o7t{constructor(e){this.chunkSize=void 0,this.getCacheKeys=e=>{if(this.chunkSize<1||"number"!=typeof e.start)return[e];const t=[];for(let r=e.start;r<=e.end;r+=this.chunkSize){const n=Math.min(r+this.chunkSize-1,e.end);t.push(S({},e,{start:r,end:n}))}return t},this.splitResponse=(e,t)=>{const r=this.getCacheKeys(e);if(1===r.length)return new Map([[e,t]]);const n=new Map;return r.forEach(r=>{const o=r.end===e.end,a=S({},t,{pageInfo:S({},t.pageInfo,{hasNextPage:void 0!==t.pageInfo?.hasNextPage&&!o||t.pageInfo?.hasNextPage,nextCursor:void 0===t.pageInfo?.nextCursor||o?t.pageInfo?.nextCursor:t.rows[r.end+1].id}),rows:"number"!=typeof r.start||"number"!=typeof e.start?t.rows:t.rows.slice(r.start-e.start,r.end-e.start+1)});n.set(r,a)}),n},this.chunkSize=e}}o7t.mergeResponses=e=>1===e.length?e[0]:e.reduce((e,t)=>({rows:[...e.rows,...t.rows],rowCount:t.rowCount,pageInfo:t.pageInfo}),{rows:[],rowCount:0,pageInfo:{}});const a7t={clear:()=>{},get:()=>{},set:()=>{}};function i7t(e,t={}){return null===e?a7t:e??new F1t(t)}function s7t(e){const{groupId:r,width:n,depth:o,maxDepth:a,fields:i,height:l,colIndex:c,hasFocus:u,tabIndex:d,isLastColumn:p,pinnedPosition:h,pinnedOffset:f}=e,m=eYt(),v=Vo(),y=s.useRef(null),g=iYt(),x=SYt(g,aJt),b=r?x[r]:{},{headerName:k=r??"",description:w="",headerAlign:_}=b;let C;const M=r&&x[r]?.renderHeaderGroup,D=s.useMemo(()=>({groupId:r,headerName:k,description:w,depth:o,maxDepth:a,fields:i,colIndex:c,isLastColumn:p}),[r,k,w,o,a,i,c,p]);r&&M&&(C=M(D));const O=S({},e,{classes:m.classes,headerAlign:_,depth:o,isDragging:!1}),P=k??r,E=Go(),j=null===r?`empty-group-cell-${E}`:r,T=(e=>{const{classes:t,headerAlign:r,isDragging:n,isLastColumn:o,showLeftBorder:a,showRightBorder:i,groupId:s,pinnedPosition:l}=e;return ua({root:["columnHeader","left"===r&&"columnHeader--alignLeft","center"===r&&"columnHeader--alignCenter","right"===r&&"columnHeader--alignRight",n&&"columnHeader--moving",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder","withBorderColor",null===s?"columnHeader--emptyGroup":"columnHeader--filledGroup",l===tXt.LEFT&&"columnHeader--pinnedLeft",l===tXt.RIGHT&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},rYt,t)})(O);s.useLayoutEffect(()=>{if(u){const e=y.current.querySelector('[tabindex="0"]')||y.current;e?.focus()}},[g,u]);const N=s.useCallback(e=>t=>{W0t(t)||g.current.publishEvent(e,D,t)},[g,D]),R=s.useMemo(()=>({onKeyDown:N("columnGroupHeaderKeyDown"),onFocus:N("columnGroupHeaderFocus"),onBlur:N("columnGroupHeaderBlur")}),[N]),z="function"==typeof b.headerClassName?b.headerClassName(D):b.headerClassName,A=s.useMemo(()=>X1t(S({},e.style),v,h,f),[h,f,e.style,v]);return t.jsx(i2t,S({ref:y,classes:T,columnMenuOpen:!1,colIndex:c,height:l,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:d,isDraggable:!1,headerComponent:C,headerClassName:z,description:w,elementId:j,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:P,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:A},R))}const l7t=ii("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow"})({display:"flex"}),c7t=e=>{const{visibleColumns:r,sortColumnLookup:n,filterColumnLookup:o,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:i,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:p,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:f}=e,[m,v]=s.useState(""),[y,g]=s.useState(""),x=wJt(),b=eYt(),k=SYt(x,oJt),w=SYt(x,JKt),_=SYt(x,zJt),C=SYt(x,XKt),M=SYt(x,$Kt),D=r1t(w,_,C.left.length),O=SYt(x,LGt),P=SYt(x,qGt),E=SYt(x,WGt),j=SYt(x,UGt),T=SYt(x,KGt),N=s.useCallback(e=>g(e.field),[]),R=s.useCallback(()=>g(""),[]),z=s.useCallback(e=>v(e.field),[]),A=s.useCallback(()=>v(""),[]),F=s.useMemo(()=>C.left.length?{firstColumnIndex:0,lastColumnIndex:C.left.length}:null,[C.left.length]),I=s.useMemo(()=>C.right.length?{firstColumnIndex:r.length-C.right.length,lastColumnIndex:r.length}:null,[C.right.length,r.length]);pYt(x,"columnResizeStart",N),pYt(x,"columnResizeStop",R),pYt(x,"columnHeaderDragStart",z),pYt(x,"columnHeaderDragEndNative",A);const L=e=>{const{renderContext:t=_}=e||{},n=t.firstColumnIndex,o=t.lastColumnIndex;return{renderedColumns:r.slice(n,o),firstColumnToRender:n,lastColumnToRender:o}},B=(e,r,n,o=!1)=>{const a=e?.position===tXt.RIGHT,i=void 0===e?.position,l=C.right.length>0&&a||0===C.right.length&&i,c=D-n;return t.jsxs(s.Fragment,{children:[i&&t.jsx("div",{role:"presentation",style:{width:c}}),r,i&&t.jsx("div",{role:"presentation",className:Wn(nYt.filler,o&&nYt["filler--borderBottom"])}),l&&t.jsx(U5t,{header:!0,pinnedRight:a,borderBottom:o,borderTop:!1})]})};"production"!==process.env.NODE_ENV&&(B.displayName="getFillers");const V=(e,r={})=>{const{renderedColumns:i,firstColumnToRender:s}=L(e),c=[];for(let u=0;u<i.length;u+=1){const p=i[u],h=s+u,v=0===h,g=null!==a&&a.field===p.field||v&&!f?0:-1,x=null!==l&&l.field===p.field,k=d.open&&d.field===p.field,_=e?.position,M=H5t(_,p.computedWidth,h,w,O,T),D=_===tXt.RIGHT?i[u-1]:i[u+1],j=!!D&&(null!==l&&l.field===D.field),N=h+1===w.length-C.right.length,R=u,z=i.length,A=q5t(_,R),F=$5t(_,R,z,b.showColumnVerticalBorder,P);c.push(t.jsx(l2t,S({},n[p.field],{columnMenuOpen:k,filterItemsCounter:o[p.field]&&o[p.field].length,headerHeight:E,isDragging:p.field===m,colDef:p,colIndex:h,isResizing:y===p.field,isLast:h===w.length-1,hasFocus:x,tabIndex:g,pinnedPosition:_,pinnedOffset:M,isLastUnpinned:N,isSiblingFocused:j,showLeftBorder:A,showRightBorder:F},r),p.field))}return B(e,c,0)},H=()=>t.jsxs(l7t,{role:"row","aria-rowindex":u+1,ownerState:b,className:nYt["row--borderBottom"],style:{height:E},children:[F&&V({position:tXt.LEFT,renderContext:F},{disableReorder:!0}),V({renderContext:_}),I&&V({position:tXt.RIGHT,renderContext:I},{disableReorder:!0,separatorSide:r2t.Left})]});"production"!==process.env.NODE_ENV&&(H.displayName="getColumnHeadersRow");const $=({depth:e,params:n})=>{const o=L(n);if(0===o.renderedColumns.length)return null;const{firstColumnToRender:a,lastColumnToRender:s}=o,l=h[e],d=r[a].field,f=k[d]?.[e]??null,m=l.findIndex(({groupId:e,columnFields:t})=>e===f&&t.includes(d)),v=r[s-1].field,y=k[v]?.[e]??null,g=l.findIndex(({groupId:e,columnFields:t})=>e===y&&t.includes(v)),x=l.slice(m,g+1).map(e=>S({},e,{columnFields:e.columnFields.filter(e=>!1!==p[e])})).filter(e=>e.columnFields.length>0),_=x[0].columnFields.indexOf(d),C=x[0].columnFields.slice(0,_).reduce((e,t)=>e+(M[t].computedWidth??0),0);let D=a;const E=x.map(({groupId:r,columnFields:o},a)=>{const s=null!==c&&c.depth===e&&o.includes(c.field),l=null!==i&&i.depth===e&&o.includes(i.field)?0:-1,d={groupId:r,width:o.reduce((e,t)=>e+M[t].computedWidth,0),fields:o,colIndex:D,hasFocus:s,tabIndex:l},p=n.position,h=H5t(p,d.width,D,w,O,T);D+=o.length;let f=a;return p===tXt.LEFT&&(f=D-1),t.jsx(s7t,{groupId:r,width:d.width,fields:d.fields,colIndex:d.colIndex,depth:e,isLastColumn:a===x.length-1,maxDepth:u,height:j,hasFocus:s,tabIndex:l,pinnedPosition:p,pinnedOffset:h,showLeftBorder:q5t(p,f),showRightBorder:$5t(p,f,x.length,b.showColumnVerticalBorder,P)},a)});return B(n,E,C)};return{renderContext:_,leftRenderContext:F,rightRenderContext:I,pinnedColumns:C,visibleColumns:r,columnPositions:w,getFillers:B,getColumnHeadersRow:H,getColumnsToRender:L,getColumnGroupHeadersRows:()=>{if(0===u)return null;const e=[];for(let r=0;r<u;r+=1)e.push(t.jsxs(l7t,{role:"row","aria-rowindex":r+1,ownerState:b,style:{height:j},children:[F&&$({depth:r,params:{position:tXt.LEFT,renderContext:F,maxLastColumn:F.lastColumnIndex}}),$({depth:r,params:{renderContext:_}}),I&&$({depth:r,params:{position:tXt.RIGHT,renderContext:I,maxLastColumn:I.lastColumnIndex}})]},r));return e},getPinnedCellOffset:H5t,isDragging:!!m,getInnerProps:()=>({role:"rowgroup"})}},u7t=["className"],d7t=so("div",{name:"MuiDataGrid",slot:"ColumnHeaders"})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),p7t=QGt(function(e,r){const{className:n}=e,o=Hi(e,u7t),a=eYt(),i=(e=>{const{classes:t}=e;return ua({root:["columnHeaders"]},rYt,t)})(a);return t.jsx(d7t,S({className:Wn(i.root,n),ownerState:a},o,{role:"presentation",ref:r}))});"production"!==process.env.NODE_ENV&&(p7t.displayName="GridBaseColumnHeaders");const h7t=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],f7t=QGt(function(e,r){const{visibleColumns:n,sortColumnLookup:o,filterColumnLookup:a,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:p,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:f}=e,m=Hi(e,h7t),{getInnerProps:v,getColumnHeadersRow:y,getColumnGroupHeadersRows:g}=c7t({visibleColumns:n,sortColumnLookup:o,filterColumnLookup:a,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:p,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:f});return t.jsxs(p7t,S({},m,v(),{ref:r,children:[g(),y()]}))});"production"!==process.env.NODE_ENV&&(f7t.displayName="GridColumnHeaders"),"production"!==process.env.NODE_ENV&&(f7t.propTypes={columnGroupHeaderFocus:Vt.exports.shape({depth:Vt.exports.number.isRequired,field:Vt.exports.string.isRequired}),columnGroupHeaderTabIndexState:Vt.exports.shape({depth:Vt.exports.number.isRequired,field:Vt.exports.string.isRequired}),columnGroupsHeaderStructure:Vt.exports.arrayOf(Vt.exports.arrayOf(Vt.exports.shape({columnFields:Vt.exports.arrayOf(Vt.exports.string).isRequired,groupId:Vt.exports.string}))).isRequired,columnHeaderFocus:Vt.exports.shape({field:Vt.exports.string.isRequired}),columnHeaderTabIndexState:Vt.exports.shape({field:Vt.exports.string.isRequired}),columnMenuState:Vt.exports.shape({field:Vt.exports.string,open:Vt.exports.bool.isRequired}).isRequired,columnVisibility:Vt.exports.object.isRequired,filterColumnLookup:Vt.exports.object.isRequired,hasOtherElementInTabSequence:Vt.exports.bool.isRequired,headerGroupingMaxDepth:Vt.exports.number.isRequired,sortColumnLookup:Vt.exports.object.isRequired,visibleColumns:Vt.exports.arrayOf(Vt.exports.object).isRequired});const m7t=G(f7t);const v7t=QGt(function(e,r){const n=iYt().current.getLocaleText("noResultsOverlayLabel");return t.jsx(j0t,S({},e,{ref:r,children:n}))});"production"!==process.env.NODE_ENV&&(v7t.displayName="GridNoResultsOverlay");const y7t=so("div")({position:"sticky",zIndex:40,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});const g7t=S({},h6t,{cell:r0t,skeletonCell:c0t,columnHeaderFilterIconButton:x2t,columnHeaderSortIcon:g2t,columnMenu:s4t,columnHeaders:m7t,detailPanels:function(e){return null},bottomContainer:function(e){const r=ua({root:["bottomContainer"]},rYt,{});return t.jsx(y7t,S({},e,{className:Wn(r.root,nYt["container--bottom"]),role:"presentation"}))},footer:V5t,footerRowCount:s3t,toolbar:F5t,pinnedRows:function(e){return null},loadingOverlay:e3t,noResultsOverlay:v7t,noRowsOverlay:t3t,noColumnsOverlay:r3t,pagination:o3t,filterPanel:z4t,columnsPanel:function(e){const r=eYt();return t.jsx(u4t,S({},e,{children:t.jsx(r.slots.columnsManagement,S({},r.slotProps?.columnsManagement))}))},columnsManagement:$4t,panel:m4t,row:d3t});class x7t{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,t,r={}){let n=this.events[e];if(n||(n={highPriority:new Map,regular:new Map},this.events[e]=n),r.isFirst?n.highPriority.set(t,!0):n.regular.set(t,!0),"production"!==process.env.NODE_ENV){const t=n.highPriority.size+n.regular.size;t>this.maxListeners&&!this.warnOnce&&(this.warnOnce=!0,console.warn([`Possible EventEmitter memory leak detected. ${t} ${e} listeners added.`].join("\n")))}}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const r=this.events[e];if(!r)return;const n=Array.from(r.highPriority.keys()),o=Array.from(r.regular.keys());for(let e=n.length-1;e>=0;e-=1){const o=n[e];r.highPriority.has(o)&&o.apply(this,t)}for(let e=0;e<o.length;e+=1){const n=o[e];r.regular.has(n)&&n.apply(this,t)}}once(e,t){const r=this;this.on(e,function n(...o){r.removeListener(e,n),t.apply(r,o)})}}const b7t=Symbol("mui.api_private");let k7t=0;function w7t(e,t){const r=s.useRef(null),n=s.useRef(null);n.current||(n.current=function(e){const t=e.current?.[b7t];if(t)return t;const r={},n={state:r,store:NGt.create(r),instanceId:{id:k7t}};return k7t+=1,n.getPublicApi=()=>e.current,n.register=(t,r)=>{Object.keys(r).forEach(o=>{const a=r[o],i=n[o];if(!0===i?.spying?i.target=a:n[o]=a,"public"===t){const t=e.current,r=t[o];!0===r?.spying?r.target=a:t[o]=a}})},n.register("private",{caches:{},eventManager:new x7t}),n}(r)),r.current||(r.current=function(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[b7t]:e.current}}(n));const o=s.useCallback((...e)=>{const[r,o,a={}]=e;if(a.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(a)&&a.isPropagationStopped())return;const i=t.signature===oYt.DataGridPro||t.signature===oYt.DataGridPremium?{api:n.current.getPublicApi()}:{};n.current.eventManager.emit(r,o,a,i)},[n,t.signature]),a=s.useCallback((e,t,r)=>{n.current.eventManager.on(e,t,r);const o=n.current;return()=>{o.eventManager.removeListener(e,t)}},[n]);return CJt(n,{subscribeEvent:a,publishEvent:o},"public"),e&&!e.current?.state&&(e.current=r.current),s.useImperativeHandle(e,()=>r.current,[r]),s.useEffect(()=>{const e=n.current;return()=>{e.publishEvent("unmount")}},[n]),n}const _7t=(e,t)=>S({},e,{headerFiltering:{enabled:t.headerFilters??!1,editing:null,menuOpen:null}}),C7t=RGt(AGt(e=>e.columnReorder),e=>e.dragCol),M7t="left",S7t="right",D7t=e=>S({},e,{columnReorder:{dragCol:""}}),O7t=(e,t)=>{const r=MJt(e,"useGridColumnReorder"),n=s.useRef(null),o=s.useRef({x:0,y:0}),a=s.useRef(null),i=s.useRef({}),l=s.useRef(void 0),c=(e=>{const{classes:t}=e;return ua({columnHeaderDragging:["columnHeader--dragging"]},rYt,t)})({classes:t.classes}),u=Vo();s.useEffect(()=>()=>{clearTimeout(l.current)},[]);const d=s.useCallback((o,i)=>{const s=C7t(e);if(!t.disableColumnReorder&&s){if(r.debug("End dragging col"),i.preventDefault(),i.stopPropagation(),clearTimeout(l.current),n.current.classList.contains(c.columnHeaderDragging)&&n.current.classList.remove(c.columnHeaderDragging),n.current=null,"none"!==i.dataTransfer.dropEffect||t.keepColumnPositionIfDraggedOutside){const t={column:e.current.getColumn(s),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(s),oldIndex:a.current};e.current.publishEvent("columnOrderChange",t)}else e.current.setColumnIndex(s,a.current),a.current=null;e.current.setState(e=>S({},e,{columnReorder:S({},e.columnReorder,{dragCol:""})}))}},[e,t.disableColumnReorder,t.keepColumnPositionIfDraggedOutside,r,c.columnHeaderDragging]),p=s.useCallback((o,s)=>{if(t.disableColumnReorder||o.colDef.disableReorder)return;r.debug(`Start dragging col ${o.field}`),s.stopPropagation(),n.current=s.currentTarget,n.current.classList.add(c.columnHeaderDragging);const u=t=>{n.current.removeEventListener("dragend",u),e.current.publishEvent("columnHeaderDragEndNative",o,t)};n.current.addEventListener("dragend",u),s.dataTransfer&&(s.dataTransfer.effectAllowed="move"),e.current.setState(e=>S({},e,{columnReorder:S({},e.columnReorder,{dragCol:o.field})})),l.current=setTimeout(()=>{n.current.classList.remove(c.columnHeaderDragging)}),a.current=e.current.getColumnIndex(o.field,!1);const d=e.current.getColumnGroupPath(o.field),p=a.current,h=e.current.getAllColumns(),f=e.current.getAllGroupDetails(),m=t=>{const r=h[t].field;return e.current.getColumnGroupPath(r)};let v=null;d.forEach(e=>{f[e]?.freeReordering||(p>0&&m(p-1).includes(e)||p+1<h.length&&m(p+1).includes(e))&&(v=e)}),i.current={};for(let e=0;e<h.length;e+=1){const t=e<=p?e-1:e,r=e<p?e:e+1;if(null!==v){let n=!1;(t>=0&&m(t).includes(v)||r<h.length&&m(r).includes(v))&&(n=!0),n||(i.current[e]=!0)}t>=0&&r<h.length&&m(r).forEach(r=>{m(t).includes(r)&&(d.includes(r)||f[r]?.freeReordering||(i.current[e]=!0))})}},[t.disableColumnReorder,c.columnHeaderDragging,r,e]),h=s.useCallback((e,t)=>{t.preventDefault(),t.stopPropagation()},[]),f=s.useCallback((t,n)=>{const a=C7t(e);if(!a)return;r.debug(`Dragging over col ${t.field}`),n.preventDefault(),n.stopPropagation();const s={x:n.clientX,y:n.clientY};if(t.field!==a&&(l=o.current,c=s,l.x!==c.x||l.y!==c.y)){const r=e.current.getColumnIndex(t.field,!1),n=e.current.getColumnIndex(t.field,!0),l=e.current.getColumn(t.field),c=e.current.getColumnIndex(a,!1),d=e.current.getVisibleColumns(),p=e.current.getAllColumns(),h=((e,t)=>e.x<=t.x?S7t:M7t)(o.current,s),f=h===M7t&&(u?c<r:r<c);if(f||h===S7t&&(u?r<c:c<r)){let t,o=0;if(t=!l.disableReorder||(f?n>0&&!d[n-1].disableReorder:n<d.length-1&&!d[n+1].disableReorder),i.current[r]){let e,a=r+o;if(f)for(e=n>0?d[n-1].field:null;a>0&&p[a].field!==e&&i.current[a];)o-=1,a=r+o;else for(e=n+1<d.length?d[n+1].field:null;a<p.length-1&&p[a].field!==e&&i.current[a];)o+=1,a=r+o;(i.current[a]||p[a].field===e)&&(t=!1)}e.current.unstable_applyPipeProcessors("canBeReordered",t,{targetIndex:n})&&e.current.setColumnIndex(a,r+o)}o.current=s}var l,c},[e,r,u]);pYt(e,"columnHeaderDragStart",p),pYt(e,"columnHeaderDragEnter",h),pYt(e,"columnHeaderDragOver",f),pYt(e,"columnHeaderDragEndNative",d),pYt(e,"cellDragEnter",h),pYt(e,"cellDragOver",f),fYt(e,"columnOrderChange",t.onColumnOrderChange)},P7t=S({},gZt,{type:"custom",sortable:!1,filterable:!1,disableColumnMenu:!0,disableReorder:!0,align:"left",width:200,valueGetter:(e,t,r,n)=>{const o=_Qt(n,t),a=GYt(n,o);return"group"===a?.type||"leaf"===a?.type?a.groupingKey:void 0}}),E7t={field:QZt,editable:!1,groupable:!1};let j7t=function(e){return e.Default="tree-data",e.DataSource="tree-data-source",e}({});const T7t=eYt,N7t=iYt;function R7t(e){const{id:r,field:n,formattedValue:o,rowNode:a,hideDescendantCount:i,offsetMultiplier:s=2}=e,l=T7t(),c=N7t(),u=(e=>{const{classes:t}=e;return ua({root:["treeDataGroupingCell"],toggle:["treeDataGroupingCellToggle"]},rYt,t)})(l),d=SYt(c,SXt)[a.id]??0,p=a.childrenExpanded?l.slots.treeDataCollapseIcon:l.slots.treeDataExpandIcon;return t.jsxs("div",{className:u.root,style:{marginLeft:RYt.spacing(a.depth*s)},children:[t.jsx("div",{className:u.toggle,children:d>0&&t.jsx(l.slots.baseIconButton,S({size:"small",onClick:e=>{c.current.setRowChildrenExpansion(r,!a.childrenExpanded),c.current.setCellFocus(r,n),e.stopPropagation()},tabIndex:-1,"aria-label":a.childrenExpanded?c.current.getLocaleText("treeDataCollapse"):c.current.getLocaleText("treeDataExpand")},l?.slotProps?.baseIconButton,{children:t.jsx(p,{fontSize:"inherit"})}))}),t.jsxs("span",{children:[void 0===o?a.groupingKey:o,!i&&d>0?` (${d})`:""]})]})}function z7t(e){const{colDef:r,onClick:n}=e,o=N7t(),a=T7t(),i=Vo(),l=s.useCallback(e=>t=>{o.current.pinColumn(r.field,e),n(t)},[o,r.field,n]),c=e=>{o.current.unpinColumn(r.field),n(e)},u=t.jsx(a.slots.baseMenuItem,{onClick:l(AKt.LEFT),iconStart:t.jsx(a.slots.columnMenuPinLeftIcon,{fontSize:"small"}),children:o.current.getLocaleText("pinToLeft")}),d=t.jsx(a.slots.baseMenuItem,{onClick:l(AKt.RIGHT),iconStart:t.jsx(a.slots.columnMenuPinRightIcon,{fontSize:"small"}),children:o.current.getLocaleText("pinToRight")});if(!r)return null;const p=o.current.isColumnPinned(r.field);if(p){const e=p===AKt.RIGHT?AKt.LEFT:AKt.RIGHT,r=e===AKt.RIGHT?"pinToRight":"pinToLeft",n=p===AKt.RIGHT?a.slots.columnMenuPinLeftIcon:a.slots.columnMenuPinRightIcon;return t.jsxs(s.Fragment,{children:[t.jsx(a.slots.baseMenuItem,{onClick:l(e),iconStart:t.jsx(n,{fontSize:"small"}),children:o.current.getLocaleText(r)}),t.jsx(a.slots.baseMenuItem,{onClick:c,iconStart:"",children:o.current.getLocaleText("unpin")})]})}return i?t.jsxs(s.Fragment,{children:[d,u]}):t.jsxs(s.Fragment,{children:[u,d]})}"production"!==process.env.NODE_ENV&&(R7t.propTypes={api:Vt.exports.object.isRequired,cellMode:Vt.exports.oneOf(["edit","view"]).isRequired,colDef:Vt.exports.object.isRequired,field:Vt.exports.string.isRequired,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.shape({focus:Vt.exports.func.isRequired})})]),formattedValue:Vt.exports.any,hasFocus:Vt.exports.bool.isRequired,hideDescendantCount:Vt.exports.bool,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]).isRequired,isEditable:Vt.exports.bool,offsetMultiplier:Vt.exports.number,row:Vt.exports.any.isRequired,rowNode:Vt.exports.object.isRequired,tabIndex:Vt.exports.oneOf([-1,0]).isRequired,value:Vt.exports.any}),"production"!==process.env.NODE_ENV&&(z7t.propTypes={colDef:Vt.exports.object.isRequired,onClick:Vt.exports.func.isRequired});const A7t=AGt(e=>e.detailPanel),F7t=RGt(A7t,e=>e.expandedRowIds),I7t=RGt(A7t,e=>e.contentCache),L7t=zGt(A7t,e=>e.heightCache),B7t=RGt(F7t,(e,t)=>e.has(t));function V7t(e){const{id:r,row:n,api:o}=e,a=o.getRowId(n),i=SYt({current:o},B7t,a),l=T7t(),c=N7t(),u=(e=>{const{classes:t,isExpanded:r}=e;return ua({root:["detailPanelToggleCell",r&&"detailPanelToggleCell--expanded"]},rYt,t)})({classes:l.classes,isExpanded:i}),d=SYt(c,I7t),p=s.isValidElement(d[r]),h=i?l.slots.detailPanelCollapseIcon:l.slots.detailPanelExpandIcon;return t.jsx(l.slots.baseIconButton,S({size:"small",tabIndex:-1,disabled:!p,className:u.root,"aria-expanded":i,"aria-label":i?c.current.getLocaleText("collapseDetailPanel"):c.current.getLocaleText("expandDetailPanel")},l.slotProps?.baseIconButton,{children:t.jsx(h,{fontSize:"inherit"})}))}"production"!==process.env.NODE_ENV&&(V7t.propTypes={api:Vt.exports.object.isRequired,cellMode:Vt.exports.oneOf(["edit","view"]).isRequired,colDef:Vt.exports.object.isRequired,field:Vt.exports.string.isRequired,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.shape({focus:Vt.exports.func.isRequired})})]),formattedValue:Vt.exports.any,hasFocus:Vt.exports.bool.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]).isRequired,isEditable:Vt.exports.bool,row:Vt.exports.any.isRequired,rowNode:Vt.exports.object.isRequired,tabIndex:Vt.exports.oneOf([-1,0]).isRequired,value:Vt.exports.any});const H7t=so("svg",{name:"MuiDataGrid",slot:"RowReorderIcon"})({color:RYt.colors.foreground.muted});function $7t(e){const r=iYt(),n=T7t(),o=SYt(r,yXt),a=SYt(r,XYt),i=SYt(r,E1t),l=e.row.__reorder__||e.id,c=s.useRef(null),u=s.useRef(null),d=s.useMemo(()=>!!n.rowReordering&&!o.length&&1===a&&0===Object.keys(i).length,[n.rowReordering,o,a,i]),p={isDraggable:d,classes:n.classes},h=(e=>{const{isDraggable:t,classes:r}=e;return ua({root:["rowReorderCell",t&&"rowReorderCell--draggable"],placeholder:["rowReorderCellPlaceholder"],icon:["rowReorderIcon"]},rYt,r)})(p),f=s.useCallback((t,n)=>o=>{W0t(o)||r.current.getRow(e.id)&&(r.current.publishEvent(t,r.current.getRowParams(e.id),o),n&&n(o))},[r,e.id]),m=s.useCallback(()=>{r.current.rootElementRef?.current?.classList.add(nYt["root--disableUserSelection"])},[r]),v=s.useCallback(()=>{r.current.rootElementRef?.current?.classList.remove(nYt["root--disableUserSelection"])},[r]),y=s.useCallback(t=>{v(),r.current.getRow(e.id)&&r.current.publishEvent("rowDragEnd",r.current.getRowParams(e.id),t),u.current.removeEventListener("dragend",y),u.current=null},[r,e.id,v]),g=s.useCallback(e=>{c.current&&(f("rowDragStart")(e),c.current.addEventListener("dragend",y),u.current=c.current)},[f,y]),x=d?{onDragStart:g,onDragOver:f("rowDragOver"),onMouseDown:m,onMouseUp:v}:null;return"footer"===e.rowNode.type?null:t.jsxs("div",S({ref:c,className:h.root,draggable:d},x,{children:[t.jsx(H7t,{as:n.slots.rowReorderIcon,ownerState:p,className:h.icon,fontSize:"small"}),t.jsx("div",{className:h.placeholder,children:l})]}))}"production"!==process.env.NODE_ENV&&($7t.propTypes={api:Vt.exports.object.isRequired,cellMode:Vt.exports.oneOf(["edit","view"]).isRequired,colDef:Vt.exports.object.isRequired,field:Vt.exports.string.isRequired,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.shape({focus:Vt.exports.func.isRequired})})]),formattedValue:Vt.exports.any,hasFocus:Vt.exports.bool.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]).isRequired,isEditable:Vt.exports.bool,row:Vt.exports.any.isRequired,rowNode:Vt.exports.object.isRequired,tabIndex:Vt.exports.oneOf([-1,0]).isRequired,value:Vt.exports.any});const q7t=e=>"footer"===e.rowNode.type||"pinnedRow"===e.rowNode.type?null:t.jsx($7t,S({},e));"production"!==process.env.NODE_ENV&&(q7t.displayName="renderRowReorderCell");const W7t=k2t(t.jsx("g",{transform:"rotate(-30 15 10)",children:t.jsx("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinRight"),U7t=k2t(t.jsx("g",{transform:"rotate(30 8 12)",children:t.jsx("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinLeft"),G7t=["operators","item","field","buttonRef","headerFilterMenuRef","disabled","showClearItem","clearFilterItem"];function Y7t(e){const{operators:r,item:n,field:o,buttonRef:a,headerFilterMenuRef:i,disabled:l=!1,showClearItem:c,clearFilterItem:u}=e,d=Hi(e,G7t),p=Go(),h=Go(),f=T7t(),m=iYt(),v=SYt(m,rJt),y=Boolean(v===o&&i.current);if(!f.slots.headerFilterMenu)return null;const g=m.current.getLocaleText("filterPanelOperator"),x=g?String(g):void 0;return t.jsxs(s.Fragment,{children:[t.jsx(f.slots.baseIconButton,S({id:p,ref:a,"aria-label":x,title:x,"aria-controls":h,"aria-expanded":y?"true":void 0,"aria-haspopup":"true",tabIndex:-1,size:"small",onClick:e=>{i.current=e.currentTarget,m.current.showHeaderFilterMenu(o)},disabled:l},f.slotProps?.baseIconButton,{children:t.jsx(f.slots.baseBadge,{color:"primary",variant:"dot",badgeContent:c?1:0,children:t.jsx(f.slots.openFilterButtonIcon,{fontSize:"inherit"})})})),t.jsx(f.slots.headerFilterMenu,S({field:o,open:y,item:n,target:i.current,operators:r,labelledBy:p,id:h,clearFilterItem:u,showClearItem:c},d))]})}function K7t(e){const r=T7t();return t.jsx(r.slots.baseIconButton,S({tabIndex:-1,"aria-label":"Clear filter",size:"small"},r.slotProps?.baseIconButton,e,{children:t.jsx(r.slots.columnMenuClearIcon,{fontSize:"inherit"})}))}"production"!==process.env.NODE_ENV&&(Y7t.propTypes={applyFilterChanges:Vt.exports.func.isRequired,buttonRef:ll,clearFilterItem:Vt.exports.func,disabled:Vt.exports.bool,field:Vt.exports.string.isRequired,headerFilterMenuRef:Vt.exports.shape({current:Vt.exports.object}).isRequired,item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}).isRequired,operators:Vt.exports.arrayOf(Vt.exports.shape({getApplyFilterFn:Vt.exports.func.isRequired,getValueAsString:Vt.exports.func,headerLabel:Vt.exports.string,InputComponent:Vt.exports.elementType,InputComponentProps:Vt.exports.shape({apiRef:Vt.exports.shape({current:Vt.exports.object.isRequired}),applyValue:Vt.exports.func,className:Vt.exports.string,clearButton:Vt.exports.node,disabled:Vt.exports.bool,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.any.isRequired})]),headerFilterMenu:Vt.exports.node,inputRef:Vt.exports.oneOfType([Vt.exports.func,Vt.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:Vt.exports.bool,item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}),onBlur:Vt.exports.func,onFocus:Vt.exports.func,slotProps:Vt.exports.object,tabIndex:Vt.exports.number}),label:Vt.exports.string,requiresFilterValue:Vt.exports.bool,value:Vt.exports.string.isRequired})).isRequired,showClearItem:Vt.exports.bool});const Z7t=["colIndex","height","hasFocus","width","headerClassName","colDef","item","headerFilterMenuRef","InputComponentProps","showClearIcon","pinnedPosition","pinnedOffset","style","showLeftBorder","showRightBorder"],X7t=ii(dKt,{name:"MuiDataGrid",slot:"ColumnHeaderFilterInput"})({flex:1,marginRight:RYt.spacing(.5),marginBottom:RYt.spacing(-.25),'& input[type="number"], & input[type="date"], & input[type="datetime-local"]':{'&[value=""]:not(:focus)':{color:"transparent"}},[`& .${Nd.input}`]:{fontSize:"14px"},[`.${nYt["root--densityCompact"]} & .${Nd.input}`]:{paddingTop:RYt.spacing(.5),paddingBottom:RYt.spacing(.5),height:23}}),Q7t=ii("span",{name:"MuiDataGrid",slot:"ColumnHeaderFilterOperatorLabel"})({flex:1,marginRight:RYt.spacing(.5),color:RYt.colors.foreground.muted,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}),J7t={string:dKt,number:dKt,date:OQt,dateTime:OQt,boolean:uXt,singleSelect:YQt,actions:null,custom:null},e9t=QGt((e,r)=>{const{colIndex:n,height:o,hasFocus:a,width:i,headerClassName:l,colDef:c,item:u,headerFilterMenuRef:d,InputComponentProps:p,showClearIcon:h=!1,pinnedPosition:f,pinnedOffset:m,style:v,showLeftBorder:y,showRightBorder:g}=e,x=Hi(e,Z7t),b=wJt(),k=Vo(),w=SYt(b,YKt),_=T7t(),C=s.useRef(null),M=Ri(r,C),D=s.useRef(null),O=s.useRef(null),P=SYt(b,tJt)===c.field,E=SYt(b,rJt)===c.field,j=s.useMemo(()=>c.filterOperators?c.filterOperators.filter(e=>"isAnyOf"!==e.value):[],[c.filterOperators]),T=SYt(b,kXt),N=SYt(b,tZt),R=s.useMemo(()=>{if(!T?.items.length)return!1;const e=T.items.find(e=>e.field===c.field);return!!e&&!N[e.field]},[c.field,T,N]),z=s.useMemo(()=>j.find(e=>e.value===u.operator)??j[0],[u.operator,j]),A=c.filterable||R?z.InputComponent??J7t[c.type]:null,F=s.useCallback(()=>{b.current.deleteFilterItem(u)},[b,u]);let I;c.renderHeaderFilter&&(I=c.renderHeaderFilter(S({},e,{inputRef:D}))),s.useLayoutEffect(()=>{if(a&&!E){let e=C.current.querySelector('[tabindex="0"]');P&&A&&(e=D.current);const t=e||C.current;t?.focus(),b.current.columnHeadersContainerRef.current&&(b.current.columnHeadersContainerRef.current.scrollLeft=0)}},[A,b,a,P,E]);const L=s.useCallback(e=>{if(!(E||bZt(e.key)||R))switch(e.key){case"Escape":P&&b.current.stopHeaderFilterEditMode();break;case"Enter":if(P&&!e.defaultPrevented){b.current.stopHeaderFilterEditMode();break}if(e.metaKey||e.ctrlKey){d.current=O.current,b.current.showHeaderFilterMenu(c.field);break}b.current.startHeaderFilterEditMode(c.field);break;case"Tab":if(P){const t=w[n+(e.shiftKey?-1:1)]??null;t&&(b.current.startHeaderFilterEditMode(t),b.current.setColumnHeaderFilterFocus(t,e))}break;default:if(P||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)break;b.current.startHeaderFilterEditMode(c.field)}},[b,c.field,n,w,d,P,R,E]),B=s.useCallback((e,t)=>r=>{b.current.publishEvent(e,b.current.getColumnHeaderParams(c.field),r),t&&t(r)},[b,c.field]),V=s.useCallback(e=>{a||(D.current?.contains?.(e.target)&&D.current.focus(),b.current.setColumnHeaderFilterFocus(c.field,e))},[b,c.field,a]),H=s.useMemo(()=>({onKeyDown:B("headerFilterKeyDown",L),onClick:B("headerFilterClick"),onMouseDown:B("headerFilterMouseDown",V),onBlur:B("headerFilterBlur")}),[V,L,B]),$=(e=>{const{colDef:t,classes:r,showRightBorder:n,showLeftBorder:o,pinnedPosition:a}=e;return ua({root:["columnHeader","columnHeader--filter","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight","withBorderColor",n&&"columnHeader--withRightBorder",o&&"columnHeader--withLeftBorder",a===tXt.LEFT&&"columnHeader--pinnedLeft",a===tXt.RIGHT&&"columnHeader--pinnedRight"],input:["columnHeaderFilterInput"],operatorLabel:["columnHeaderFilterOperatorLabel"]},rYt,r)})(S({},_,{pinnedPosition:f,colDef:c,showLeftBorder:y,showRightBorder:g})),q=z.headerLabel??b.current.getLocaleText(`headerFilterOperator${Ir(u.operator)}`),W=!1===z.requiresFilterValue,U=void 0!==u?.value||W,G=U||a,Y=t.jsx(Y7t,{operators:j,item:u,field:c.field,disabled:R,applyFilterChanges:b.current.upsertFilterItem,headerFilterMenuRef:d,buttonRef:O,showClearItem:!h&&U,clearFilterItem:F}),K=h&&U?t.jsx(K7t,{onClick:F,disabled:R}):null;return t.jsxs("div",S({className:Wn($.root,l),style:X1t(S({height:o,width:i},v),k,f,m),role:"columnheader","aria-colindex":n+1,"aria-label":null==I?c.headerName??c.field:void 0},x,H,{ref:M,children:[I,void 0===I?t.jsxs(s.Fragment,{children:[W?t.jsxs(s.Fragment,{children:[t.jsx(Q7t,{className:$.operatorLabel,children:q}),K,Y]}):null,A&&!W?t.jsx(X7t,S({as:A,className:$.input,apiRef:b,item:u,inputRef:D,applyValue:b.current.upsertFilterItem,onFocus:()=>b.current.startHeaderFilterEditMode(c.field),onBlur:e=>{b.current.stopHeaderFilterEditMode(),e.relatedTarget?.className.includes("columnHeader")||b.current.setState(e=>S({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))},isFilterActive:G,headerFilterMenu:Y,clearButton:K,disabled:R||W,tabIndex:-1,slotProps:{root:{size:"small",label:Ir(q),placeholder:""}}},W?{value:""}:{},z?.InputComponentProps,p)):null]}):null]}))});"production"!==process.env.NODE_ENV&&(e9t.displayName="GridHeaderFilterCell"),"production"!==process.env.NODE_ENV&&(e9t.propTypes={colDef:Vt.exports.object.isRequired,colIndex:Vt.exports.number.isRequired,hasFocus:Vt.exports.bool,headerClassName:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),headerFilterMenuRef:Vt.exports.shape({current:Vt.exports.object}).isRequired,height:Vt.exports.number.isRequired,InputComponentProps:Vt.exports.shape({apiRef:Vt.exports.shape({current:Vt.exports.object.isRequired}),applyValue:Vt.exports.func,className:Vt.exports.string,clearButton:Vt.exports.node,disabled:Vt.exports.bool,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.any.isRequired})]),headerFilterMenu:Vt.exports.node,inputRef:Vt.exports.oneOfType([Vt.exports.func,Vt.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:Vt.exports.bool,item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}),onBlur:Vt.exports.func,onFocus:Vt.exports.func,slotProps:Vt.exports.object,tabIndex:Vt.exports.number}),item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}).isRequired,pinnedOffset:Vt.exports.number,pinnedPosition:Vt.exports.oneOf([0,1,2,3]),showClearIcon:Vt.exports.bool,showLeftBorder:Vt.exports.bool.isRequired,showRightBorder:Vt.exports.bool.isRequired,sortIndex:Vt.exports.number,style:Vt.exports.object,tabIndex:Vt.exports.oneOf([-1,0]).isRequired,width:Vt.exports.number.isRequired});const t9t=G(e9t);function r9t({open:e,field:r,target:n,applyFilterChanges:o,operators:a,item:i,id:l,labelledBy:c,showClearItem:u,clearFilterItem:d}){const p=iYt(),h=eYt(),f=s.useCallback(()=>{p.current.hideHeaderFilterMenu()},[p]);return n?t.jsx(EZt,{position:"bottom-end",open:e,target:n,onClose:f,children:t.jsxs(h.slots.baseMenuList,{"aria-labelledby":c,id:l,children:[u&&[t.jsx(h.slots.baseMenuItem,{iconStart:t.jsx(h.slots.columnMenuClearIcon,{fontSize:"small"}),onClick:()=>{d(),f()},children:p.current.getLocaleText("headerFilterClear")},"filter-menu-clear-filter"),t.jsx(h.slots.baseDivider,{},"filter-menu-divider")],a.map(n=>{const a=n.value===i.operator,s=n?.headerLabel??p.current.getLocaleText(`headerFilterOperator${Ir(n.value)}`);return t.jsx(h.slots.baseMenuItem,{iconStart:a?t.jsx(h.slots.menuItemCheckIcon,{fontSize:"small"}):t.jsx("span",{}),onClick:()=>{o(S({},i,{operator:n.value})),f()},autoFocus:!!a&&e,children:s},`${r}-${n.value}`)})]})}):null}"production"!==process.env.NODE_ENV&&(r9t.propTypes={applyFilterChanges:Vt.exports.func.isRequired,clearFilterItem:Vt.exports.func.isRequired,field:Vt.exports.string.isRequired,id:Vt.exports.string,item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}).isRequired,labelledBy:Vt.exports.string,open:Vt.exports.bool.isRequired,operators:Vt.exports.arrayOf(Vt.exports.shape({getApplyFilterFn:Vt.exports.func.isRequired,getValueAsString:Vt.exports.func,headerLabel:Vt.exports.string,InputComponent:Vt.exports.elementType,InputComponentProps:Vt.exports.shape({apiRef:Vt.exports.shape({current:Vt.exports.object.isRequired}),applyValue:Vt.exports.func,className:Vt.exports.string,clearButton:Vt.exports.node,disabled:Vt.exports.bool,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.any.isRequired})]),headerFilterMenu:Vt.exports.node,inputRef:Vt.exports.oneOfType([Vt.exports.func,Vt.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:Vt.exports.bool,item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}),onBlur:Vt.exports.func,onFocus:Vt.exports.func,slotProps:Vt.exports.object,tabIndex:Vt.exports.number}),label:Vt.exports.string,requiresFilterValue:Vt.exports.bool,value:Vt.exports.string.isRequired})).isRequired,showClearItem:Vt.exports.bool.isRequired,target:Ec});const n9t=e=>`auto-generated-row-${e.map(e=>`${e.field}/${e.key}`).join("-")}`,o9t=({id:e,tree:t})=>{const r=[];let n=t[e];for(;n.id!==AZt;)r.push({field:"leaf"===n.type?null:n.groupingField,key:n.groupingKey}),n=t[n.parent];return r.reverse(),r},a9t=(e,t,r)=>{let n;return n=e.id===AZt||(r?r(e):-1===t||t>e.depth),n},i9t=(e,t,r)=>{const n=a9t(e,t,r);return e.childrenExpanded=n,e},s9t=(e,t,r,n)=>{t[e.id]=e,r[e.depth]=(r[e.depth]??0)+1;const o=t[e.parent];if("group"===e.type||"leaf"===e.type){const r=e.groupingField??"__no_field__",a=e.groupingKey??"__no_key__",i=o.childrenFromPath?.[r];null!==n&&n[o.id]===t[o.id]?o.children=[...o.children,e.id]:o.children.push(e.id),null==i?o.childrenFromPath[r]={[a.toString()]:e.id}:i[a.toString()]=e.id}else"footer"===e.type&&(o.footerId=e.id)},l9t=({node:e,tree:t,treeDepths:r})=>{delete t[e.id];const n=e.depth,o=r[n];1===o?delete r[n]:r[n]=o-1;const a=t[e.parent];if("footer"===e.type)t[a.id]=S({},a,{footerId:null});else{const r=e.groupingField??"__no_field__",n=e.groupingKey??"__no_key__",o=a.children.filter(t=>t!==e.id),i=a.childrenFromPath;delete i[r][n.toString()],t[a.id]=S({},a,{children:o,childrenFromPath:i})}},c9t=({node:e,updatedNode:t,previousTree:r,tree:n,treeDepths:o})=>{e.children.forEach(e=>{n[e]=S({},n[e],{parent:t.id})}),l9t({node:e,tree:n,treeDepths:o});const a=S({},e,t);s9t(a,n,o,r)},u9t=()=>({value:{},addAction(e,t){this.value[e]||(this.value[e]={}),this.value[e][t]=!0}}),d9t=({tree:e,filteredRowsLookup:t})=>{if(!t)return{};const r={},n=(o,a)=>{const i=!1!==t[o.id];"group"===o.type&&o.children.forEach(t=>{const r=e[t];n(r,a&&!!o.childrenExpanded)});const s=i&&a;if(s||(r[o.id]=s),"group"===o.type&&null!=o.footerId){const e=i&&a&&!!o.childrenExpanded;e||(r[o.footerId]=e)}},o=Object.values(e);for(let e=0;e<o.length;e+=1){const t=o[e];0===t.depth&&n(t,!0)}return r},p9t=({id:e,path:t,updatedGroupsManager:r,previousTree:n,tree:o,treeDepths:a,onDuplicatePath:i,isGroupExpandedByDefault:s,defaultGroupingExpansionDepth:l,serverChildrenCount:c,groupsToFetch:u})=>{let d=AZt;for(let p=0;p<t.length;p+=1){const{key:h,field:f}=t[p],m=f??"__no_field__",v=h??"__no_key__",y=o[d].childrenFromPath?.[m]?.[v.toString()];if(p===t.length-1)if(null==y){let i;if(void 0!==c&&0!==c){i={type:"group",id:e,parent:d,path:t.map(e=>e.key),depth:p,isAutoGenerated:!1,groupingKey:h,groupingField:f,children:[],childrenFromPath:{},childrenExpanded:!1,serverChildrenCount:c};a9t(i,l,s)&&u?.add(e)}else i={type:"leaf",id:e,depth:p,parent:d,groupingKey:h};r?.addAction(d,"insertChildren"),s9t(i,o,a,n)}else{const s=o[y];"group"===s.type&&s.isAutoGenerated?(r?.addAction(d,"removeChildren"),r?.addAction(d,"insertChildren"),c9t({tree:o,previousTree:n,treeDepths:a,node:s,updatedNode:{id:e,isAutoGenerated:!1}})):i?.(y,e,t)}else if(null==y){const e=n9t(t.slice(0,p+1)),i={type:"group",id:e,parent:d,depth:p,isAutoGenerated:!0,groupingKey:h,groupingField:f,children:[],childrenFromPath:{},childrenExpanded:!1};r?.addAction(d,"insertChildren"),s9t(i9t(i,l,s),o,a,n),d=e}else{const e=o[y];if("group"!==e.type){const t={type:"group",id:e.id,parent:e.parent,depth:e.depth,isAutoGenerated:!1,groupingKey:h,groupingField:f,children:[],childrenFromPath:{},childrenExpanded:!1};o[y]=i9t(t,l,s)}d=e.id}}},h9t=e=>{const t=[],r={[AZt]:IZt()},n={},o=new Set;for(let a=0;a<e.nodes.length;a+=1){const i=e.nodes[a];t.push(i.id),p9t({tree:r,previousTree:e.previousTree,id:i.id,path:i.path,serverChildrenCount:i.serverChildrenCount,onDuplicatePath:e.onDuplicatePath,treeDepths:n,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth,groupsToFetch:o})}return{tree:r,treeDepths:n,groupingName:e.groupingName,dataRowIds:t,groupsToFetch:Array.from(o)}};class f9t{constructor(e,t){this.next=void 0,this.data=void 0,this.next=t,this.data=e}insertAfter(e){if(!e.first||!e.last)return;const t=this.next;this.next=e.first,e.last.next=t}}class m9t{constructor(e,t){this.first=void 0,this.last=void 0,this.first=e,this.last=t}data(){const e=[];return this.forEach(t=>{e.push(t.data)}),e}forEach(e){let t=this.first;for(;null!==t;)e(t),t=t.next}static from(e){if(0===e.length)return new m9t(null,null);let t=0;const r=new f9t(e[t],null);let n=r;for(;t+1<e.length;){t+=1;const r=new f9t(e[t],null);n.next=r,n=r}return new m9t(r,n)}}const v9t=({node:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{l9t({node:e,tree:t,treeDepths:r}),"group"===e.type&&null!=e.footerId&&l9t({node:t[e.footerId],tree:t,treeDepths:r});const o=t[e.parent];n?.addAction(o.id,"removeChildren");o.id!==AZt&&0===o.children.length&&(o.isAutoGenerated?v9t({node:o,tree:t,treeDepths:r}):t[o.id]={type:"leaf",id:o.id,depth:o.depth,parent:o.parent,groupingKey:o.groupingKey})},y9t=({id:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{const o=t[e];"group"===o.type&&o.children.length>0?(({node:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{n?.addAction(e.parent,"removeChildren"),n?.addAction(e.parent,"insertChildren"),c9t({previousTree:null,tree:t,treeDepths:r,node:e,updatedNode:{id:n9t(o9t({id:e.id,tree:t})),isAutoGenerated:!0}})})({node:o,tree:t,treeDepths:r,updatedGroupsManager:n}):v9t({node:o,tree:t,treeDepths:r,updatedGroupsManager:n})},g9t=e=>{const t=S({},e.previousTree),r=S({},e.previousTreeDepth),n=u9t(),o=e.previousGroupsToFetch?new Set([...e.previousGroupsToFetch]):new Set([]);for(let a=0;a<e.nodes.inserted.length;a+=1){const{id:i,path:s,serverChildrenCount:l}=e.nodes.inserted[a];p9t({previousTree:e.previousTree,tree:t,treeDepths:r,updatedGroupsManager:n,id:i,path:s,serverChildrenCount:l,onDuplicatePath:e.onDuplicatePath,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth,groupsToFetch:o})}for(let o=0;o<e.nodes.removed.length;o+=1){const a=e.nodes.removed[o];y9t({tree:t,treeDepths:r,updatedGroupsManager:n,id:a})}for(let a=0;a<e.nodes.modified.length;a+=1){const{id:i,path:s,serverChildrenCount:l}=e.nodes.modified[a];n5t(o9t({tree:t,id:i}),s)?n?.addAction(t[i].parent,"modifyChildren"):(y9t({tree:t,treeDepths:r,updatedGroupsManager:n,id:i}),p9t({previousTree:e.previousTree,tree:t,treeDepths:r,updatedGroupsManager:n,id:i,path:s,serverChildrenCount:l,onDuplicatePath:e.onDuplicatePath,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth,groupsToFetch:o}))}const a=qZt(t,AZt,!0);return{tree:t,treeDepths:r,groupingName:e.groupingName,dataRowIds:a,updatedGroupsManager:n,groupsToFetch:Array.from(o)}},x9t=["hideDescendantCount"],b9t=(e,r)=>{const n=s.useCallback(()=>{e.current.setStrategyAvailability(k6t.RowTree,j7t.Default,r.treeData&&!r.dataSource?()=>!0:()=>!1)},[e,r.treeData,r.dataSource]),o=s.useCallback(()=>{const n=r.groupingColDef;let o;if("function"==typeof n){o=n({groupingName:j7t.Default,fields:[]})}else o=n;const a=o??{},{hideDescendantCount:i}=a,s=Hi(a,x9t),l=S({},P7t,{renderCell:e=>t.jsx(R7t,S({},e,{hideDescendantCount:i})),headerName:e.current.getLocaleText("treeDataGroupingHeaderName")});return S({},l,s,E7t)},[e,r.groupingColDef]),a=s.useCallback(e=>{if(r.dataSource)return e;const t=E7t.field,n=r.treeData,a=e.lookup[t];if(n){const r=o();a&&(r.width=a.width,r.flex=a.flex),e.lookup[t]=r,null==a&&(e.orderedFields=[t,...e.orderedFields])}else!n&&a&&(delete e.lookup[t],e.orderedFields=e.orderedFields.filter(e=>e!==t));return e},[r.treeData,r.dataSource,o]),i=s.useCallback(e=>{if(!r.getTreeDataPath)throw new Error("MUI X: No getTreeDataPath given.");const t=t=>({id:t,path:r.getTreeDataPath(e.dataRowIdToModelLookup[t]).map(e=>({key:e,field:null}))}),n=(e,t,r)=>{throw new Error(["MUI X: The path returned by `getTreeDataPath` should be unique.",`The rows with id #${e} and #${t} have the same.`,`Path: ${JSON.stringify(r.map(e=>e.key))}.`].join("\n"))};return"full"===e.updates.type?h9t({previousTree:e.previousTree,nodes:e.updates.rows.map(t),defaultGroupingExpansionDepth:r.defaultGroupingExpansionDepth,isGroupExpandedByDefault:r.isGroupExpandedByDefault,groupingName:j7t.Default,onDuplicatePath:n}):g9t({nodes:{inserted:e.updates.actions.insert.map(t),modified:e.updates.actions.modify.map(t),removed:e.updates.actions.remove},previousTree:e.previousTree,previousTreeDepth:e.previousTreeDepths,defaultGroupingExpansionDepth:r.defaultGroupingExpansionDepth,isGroupExpandedByDefault:r.isGroupExpandedByDefault,groupingName:j7t.Default})},[r.getTreeDataPath,r.defaultGroupingExpansionDepth,r.isGroupExpandedByDefault]),l=s.useCallback(t=>(e=>{const{apiRef:t,rowTree:r,disableChildrenFiltering:n,isRowMatchingFilters:o}=e,a={},i={},s={},l={},c={passingFilterItems:null,passingQuickFilterValues:null},u=(d,p,h)=>{let f;if(n&&d.depth>0)f=null;else if(o&&"footer"!==d.type){const r=t.current.getRow(d.id);o(r,void 0,c),f=fZt([c.passingFilterItems],[c.passingQuickFilterValues],e.filterModel,e.apiRef,l)}else f=!0;let m,v=0,y=0;switch("group"===d.type&&d.children.forEach(e=>{const t=r[e],n=u(t,f??p,h&&!!d.childrenExpanded);y+=n,n>0&&(v+=1)}),f){case!0:m=!0;break;case!1:m=y>0;break;default:m=p}return m||(a[d.id]=!1),m?(i[d.id]=v,s[d.id]=y,"footer"===d.type?y:y+1):0},d=Object.values(r);for(let e=0;e<d.length;e+=1){const t=d[e];0===t.depth&&u(t,!0,!0)}return{filteredRowsLookup:a,filteredChildrenCountLookup:i,filteredDescendantCountLookup:s}})({rowTree:UYt(e),isRowMatchingFilters:t.isRowMatchingFilters,disableChildrenFiltering:r.disableChildrenFiltering,filterModel:t.filterModel,apiRef:e}),[e,r.disableChildrenFiltering]),c=s.useCallback(t=>(e=>{const{rowTree:t,disableChildrenSorting:r,sortRowList:n,shouldRenderGroupBelowLeaves:o}=e,a=new Map,i=e=>{let s;if(!n||r&&-1!==e.depth)if(o){const r=[],n=[];for(let o=0;o<e.children.length;o+=1){const a=e.children[o],s=t[a];"group"===s.type?(i(s),n.push(a)):"leaf"===s.type&&r.push(a)}s=[...r,...n]}else{for(let r=0;r<e.children.length;r+=1){const n=t[e.children[r]];"group"===n.type&&i(n)}s=[...e.children]}else{for(let r=0;r<e.children.length;r+=1){const n=t[e.children[r]];"group"===n.type&&i(n)}s=n(e.children.map(e=>t[e]))}null!=e.footerId&&s.push(e.footerId),a.set(e.id,s)};i(t[AZt]);const s=m9t.from(a.get(AZt));return s.forEach(e=>{const t=a.get(e.data);t?.length&&e.insertAfter(m9t.from(t))}),s.data()})({rowTree:UYt(e),sortRowList:t.sortRowList,disableChildrenSorting:r.disableChildrenSorting,shouldRenderGroupBelowLeaves:!1}),[e,r.disableChildrenSorting]);x6t(e,"hydrateColumns",a),w6t(e,j7t.Default,"rowTreeCreation",i),w6t(e,j7t.Default,"filtering",l),w6t(e,j7t.Default,"sorting",c),w6t(e,j7t.Default,"visibleRowsLookupCreation",d9t),DJt(()=>{n()});const u=s.useRef(!0);s.useEffect(()=>{u.current?u.current=!1:n()},[n])};const k9t=wJt,w9t=AGt(e=>e.dataSource);RGt(w9t,e=>e.loading);const _9t=RGt(w9t,(e,t)=>e.loading[t]??!1),C9t=RGt(w9t,e=>e.errors),M9t=RGt(w9t,(e,t)=>e.errors[t]),S9t=e=>{const{classes:t}=e;return ua({root:["treeDataGroupingCell"],toggle:["treeDataGroupingCellToggle"],loadingContainer:["treeDataGroupingCellLoadingContainer"]},rYt,t)};function D9t(e){const r=k9t(),n=T7t(),o=S9t(n),{rowNode:a,id:i,field:s,descendantCount:l}=e,c=SYt(r,_9t,i),u=SYt(r,M9t,i),d=a.childrenExpanded?n.slots.treeDataCollapseIcon:n.slots.treeDataExpandIcon;return c?t.jsx("div",{className:o.loadingContainer,children:t.jsx(n.slots.baseCircularProgress,{size:"1rem",color:"inherit"})}):-1===l||l>0?t.jsx(n.slots.baseIconButton,S({size:"small",onClick:e=>{a.childrenExpanded?r.current.setRowChildrenExpansion(i,!a.childrenExpanded):r.current.dataSource.fetchRows(i),r.current.setCellFocus(i,s),e.stopPropagation()},tabIndex:-1,"aria-label":a.childrenExpanded?r.current.getLocaleText("treeDataCollapse"):r.current.getLocaleText("treeDataExpand")},n?.slotProps?.baseIconButton,{children:t.jsx(n.slots.baseTooltip,{title:u?.message??null,children:t.jsx(n.slots.baseBadge,{variant:"dot",color:"error",invisible:!u,children:t.jsx(d,{fontSize:"inherit"})})})})):null}function O9t(e){const{id:r,field:n,formattedValue:o,rowNode:a,hideDescendantCount:i,offsetMultiplier:s=2}=e,l=T7t(),c=SYt(k9t(),WYt,r),u=S9t(l);let d=0;return c&&(d=l.dataSource?.getChildrenCount?.(c)??0),t.jsxs("div",{className:u.root,style:{marginLeft:RYt.spacing(a.depth*s)},children:[t.jsx("div",{className:u.toggle,children:t.jsx(D9t,{id:r,field:n,rowNode:a,row:c,descendantCount:d})}),t.jsxs("span",{children:[void 0===o?a.groupingKey:o,!i&&d>0?` (${d})`:""]})]})}const P9t=["hideDescendantCount"],E9t=(e,r)=>{const n=s.useCallback(()=>{e.current.setStrategyAvailability(k6t.RowTree,j7t.DataSource,r.treeData&&r.dataSource?()=>!0:()=>!1)},[e,r.treeData,r.dataSource]),o=s.useCallback(()=>{const n=r.groupingColDef;let o;if("function"==typeof n){o=n({groupingName:j7t.DataSource,fields:[]})}else o=n;const a=o??{},{hideDescendantCount:i}=a,s=Hi(a,P9t),l=S({},P7t,{renderCell:e=>t.jsx(O9t,S({},e,{hideDescendantCount:i})),headerName:e.current.getLocaleText("treeDataGroupingHeaderName")});return S({},l,s,E7t)},[e,r.groupingColDef]),a=s.useCallback(e=>{if(!r.dataSource)return e;const t=E7t.field,n=r.treeData,a=e.lookup[t];if(n){const r=o();a&&(r.width=a.width,r.flex=a.flex),e.lookup[t]=r,null==a&&(e.orderedFields=[t,...e.orderedFields])}else!n&&a&&(delete e.lookup[t],e.orderedFields=e.orderedFields.filter(e=>e!==t));return e},[r.treeData,r.dataSource,o]),i=s.useCallback(e=>{const t=r.dataSource?.getGroupKey;if(!t)throw new Error("MUI X: No `getGroupKey` method provided with the dataSource.");const n=r.dataSource?.getChildrenCount;if(!n)throw new Error("MUI X: No `getChildrenCount` method provided with the dataSource.");const o=r=>{const o=e.updates.groupKeys??function(e,t){return"full"!==t.updates.type||!t.previousTree?.[e]||t.previousTree[e].depth<1||!("path"in t.previousTree[e])?[]:t.previousTree[e].path||[]}(r,e),a=n(e.dataRowIdToModelLookup[r]);return{id:r,path:[...o,t(e.dataRowIdToModelLookup[r])].map(e=>({key:e,field:null})),serverChildrenCount:a}},a=(e,t,r)=>{throw new Error(["MUI X: The values returned by `getGroupKey` for all the sibling rows should be unique.",`The rows with id #${e} and #${t} have the same.`,`Path: ${JSON.stringify(r.map(e=>e.key))}.`].join("\n"))};return"full"===e.updates.type?h9t({previousTree:e.previousTree,nodes:e.updates.rows.map(o),defaultGroupingExpansionDepth:r.defaultGroupingExpansionDepth,isGroupExpandedByDefault:r.isGroupExpandedByDefault,groupingName:j7t.DataSource,onDuplicatePath:a}):g9t({nodes:{inserted:e.updates.actions.insert.map(o),modified:e.updates.actions.modify.map(o),removed:e.updates.actions.remove},previousTree:e.previousTree,previousGroupsToFetch:e.previousGroupsToFetch,previousTreeDepth:e.previousTreeDepths,defaultGroupingExpansionDepth:r.defaultGroupingExpansionDepth,isGroupExpandedByDefault:r.isGroupExpandedByDefault,groupingName:j7t.DataSource})},[r.dataSource,r.defaultGroupingExpansionDepth,r.isGroupExpandedByDefault]),l=s.useCallback(()=>function(e){const t={},r=Object.values(e);for(let e=0;e<r.length;e+=1){const n=r[e];t[n.id]=n.serverChildrenCount??0}return{filteredRowsLookup:NKt.filteredRowsLookup,filteredChildrenCountLookup:t,filteredDescendantCountLookup:NKt.filteredDescendantCountLookup}}(UYt(e)),[e]),c=s.useCallback(()=>function(e){return qZt(e,AZt,!1)}(UYt(e)),[e]);x6t(e,"hydrateColumns",a),w6t(e,j7t.DataSource,"rowTreeCreation",i),w6t(e,j7t.DataSource,"filtering",l),w6t(e,j7t.DataSource,"sorting",c),w6t(e,j7t.DataSource,"visibleRowsLookupCreation",d9t),DJt(()=>{n()});const u=s.useRef(!0);s.useEffect(()=>{u.current?u.current=!1:n()},[n])},j9t=(e,t,r)=>{let n;return r.current.caches.columnPinning={orderedFieldsBeforePinningColumns:null},n=t.pinnedColumns?t.pinnedColumns:t.initialState?.pinnedColumns?t.initialState.pinnedColumns:{},S({},e,{pinnedColumns:n})};function T9t(e,t){e.current.setState(e=>S({},e,{pinnedColumns:t}))}const N9t=S({},gZt,{type:"custom",field:eXt,editable:!1,sortable:!1,filterable:!1,resizable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,align:"left",width:40,valueGetter:(e,t,r,n)=>{const o=_Qt(n,t);return F7t(n).has(o)},renderCell:e=>t.jsx(V7t,S({},e)),renderHeader:({colDef:e})=>t.jsx("div",{"aria-label":e.headerName})}),R9t=new Set,z9t=(e,t)=>S({},e,{detailPanel:{heightCache:{},expandedRowIds:t.detailPanelExpandedRowIds??t.initialState?.detailPanel?.expandedRowIds??R9t}});function A9t(e,t,r,n){if("function"!=typeof t)return{};const o=QYt(e),a={},i={};for(let s=0;s<o.length;s+=1){const l=o[s],c=e.current.getRowParams(l),u=t(c);if(a[l]=u,null==u)continue;const d=r(c),p="auto"===d;i[l]={autoHeight:p,height:p?n[l]?.height:d}}return{contentCache:a,heightCache:i}}const F9t=S({},gZt,{type:"custom",field:"__reorder__",sortable:!1,filterable:!1,width:50,align:"center",headerAlign:"center",disableColumnMenu:!0,disableExport:!0,disableReorder:!0,resizable:!1,aggregable:!1,renderHeader:()=>" ",renderCell:q7t});var I9t=function(e){return e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e}(I9t||{});const L9t={previousTargetId:null,dragDirection:null,previousDropPosition:null},B9t=(e,t)=>{const r=MJt(e,"useGridRowReorder"),n=SYt(e,yXt),o=SYt(e,XYt),a=s.useRef(null),i=s.useRef(null),l=s.useRef(void 0),c=s.useRef(null),u=(e=>{const{classes:t}=e;return ua({rowDragging:["row--dragging"],rowDropAbove:["row--dropAbove"],rowDropBelow:["row--dropBelow"],rowBeingDragged:["row--beingDragged"]},rYt,t)})({classes:t.classes}),[d,p]=s.useState(""),h=SYt(e,xXt),f=s.useRef(L9t),[m,v]=s.useState({targetRowId:null,targetRowIndex:null,dropPosition:null});s.useEffect(()=>()=>{clearTimeout(l.current)},[]);const y=s.useMemo(()=>!t.rowReordering||!!n.length||1!==o,[t.rowReordering,n,o]),g=s.useCallback((t,r)=>{if(c.current&&(c.current.classList.remove(u.rowDropAbove,u.rowDropBelow),c.current=null),t&&r){const n=e.current.rootElementRef?.current?.querySelector(`[data-id="${t}"]`);n&&(n.classList.add("above"===r?u.rowDropAbove:u.rowDropBelow),c.current=n)}},[e,u]),x=s.useCallback((t,r)=>{if(t){const n=e.current.rootElementRef?.current?.querySelector(`[data-id="${t}"]`);n&&(r?n.classList.add(u.rowBeingDragged):n.classList.remove(u.rowBeingDragged))}},[e,u.rowBeingDragged]),b=s.useCallback(t=>{const r=e.current.rootElementRef?.current;if(!r)return;const n=r.querySelectorAll("[data-id]");if(!n.length)return;const o=Array.from(n),a=new Map;o.forEach(e=>{const t=e.getAttribute("data-id");t&&a.set(t,e.getBoundingClientRect())}),t(),requestAnimationFrame(()=>{const e=r.querySelectorAll("[data-id]"),t=[];e.forEach(e=>{const r=e.getAttribute("data-id");if(!r)return;const n=a.get(r);if(!n)return;const o=e.getBoundingClientRect(),i=n.top-o.top;if(Math.abs(i)>1){const r=e.animate([{transform:`translateY(${i}px)`},{transform:"translateY(0)"}],{duration:200,easing:"ease-in-out",fill:"forwards"});t.push(r)}}),t.length>0&&Promise.allSettled(t.map(e=>e.finished)).then(()=>{})})},[e]),k=s.useCallback((t,n)=>{const o=E1t(e);y||0!==Object.keys(o).length||(r.debug(`Start dragging row ${t.id}`),n.stopPropagation(),a.current=n.currentTarget,a.current.classList.add(u.rowDragging),p(t.id),x(t.id,!0),l.current=setTimeout(()=>{a.current.classList.remove(u.rowDragging)}),i.current=h[t.id],e.current.setCellFocus(t.id,F9t.field))},[e,y,r,u.rowDragging,h,x]),w=s.useCallback((t,n)=>{if(""===d)return;const o=GYt(e,t.id);if(!o||"footer"===o.type||"pinnedRow"===o.type||!n.target)return;const a=n.target.getBoundingClientRect(),i=Math.floor(n.clientY-a.top),s=Math.floor(a.height/2);if(r.debug(`Dragging over row ${t.id}`),n.preventDefault(),n.stopPropagation(),t.id!==d){const e=h[t.id],r=h[d],n=i<s?"above":"below",o="above"===n&&e===r+1||"below"===n&&e===r-1,a={dragDirection:e<r?I9t.UP:I9t.DOWN,previousTargetId:t.id,previousDropPosition:n};f.current.previousTargetId===t.id&&f.current.previousDropPosition===n||(o?(v({targetRowId:null,targetRowIndex:null,dropPosition:null}),g(null,null)):(v({targetRowId:t.id,targetRowIndex:e,dropPosition:n}),g(t.id,n)),f.current=a)}else null!==f.current.previousTargetId&&(v({targetRowId:null,targetRowIndex:null,dropPosition:null}),g(null,null),f.current={previousTargetId:null,dragDirection:null,previousDropPosition:null})},[d,e,r,h,g]),_=s.useCallback((t,n)=>{const o=E1t(e);if(""===d||y||0!==Object.keys(o).length)return;r.debug("End dragging row"),n.preventDefault(),n.stopPropagation(),clearTimeout(l.current),a.current=null;const s=f.current.dragDirection;if(f.current=L9t,g(null,null),x(d,!1),n.dataTransfer&&"none"!==n.dataTransfer.dropEffect){if(null!==m.targetRowIndex&&null!==m.targetRowId){const t=i.current,r=m.targetRowIndex,n=m.dropPosition;let o;o=s===I9t.UP?"above"===n?r:r+1:"above"===n?r-1:r;"above"===n&&r===t+1||"below"===n&&r===t-1||m.targetRowId===d||b(()=>{e.current.setRowIndex(d,o);const r={row:e.current.getRow(d),targetIndex:o,oldIndex:t};e.current.publishEvent("rowOrderChange",r)})}v({targetRowId:null,targetRowIndex:null,dropPosition:null})}else v({targetRowId:null,targetRowIndex:null,dropPosition:null}),i.current=null;p("")},[e,d,y,r,m,g,x,b]);pYt(e,"rowDragStart",k),pYt(e,"rowDragOver",w),pYt(e,"rowDragEnd",_),pYt(e,"cellDragOver",w),fYt(e,"rowOrderChange",t.onRowOrderChange)},V9t=(e,t)=>{const r=(e=>{const{classes:t}=e;return s.useMemo(()=>ua({rowReorderCellContainer:["rowReorderCellContainer"],columnHeaderReorder:["columnHeaderReorder"]},rYt,t),[t])})({classes:t.classes}),n=s.useCallback(n=>{const o=S({},F9t,{cellClassName:r.rowReorderCellContainer,headerClassName:r.columnHeaderReorder,headerName:e.current.getLocaleText("rowReorderingHeaderName")}),a=t.rowReordering,i=null!=n.lookup[o.field];return a&&!i?(n.lookup[o.field]=o,n.orderedFields=[o.field,...n.orderedFields]):!a&&i?(delete n.lookup[o.field],n.orderedFields=n.orderedFields.filter(e=>e!==o.field)):a&&i&&(n.lookup[o.field]=S({},o,n.lookup[o.field]),t.columns.some(e=>e.field===F9t.field)||(n.orderedFields=[o.field,...n.orderedFields.filter(e=>e!==o.field)])),n},[e,r,t.columns,t.rowReordering]);x6t(e,"hydrateColumns",n)},H9t=({apiRef:e,visibleRows:t,range:r})=>{let{firstRowIndex:n,lastRowIndex:o}=r;const a=t.slice(r.firstRowIndex,r.lastRowIndex);let i=0,s=a.length-1,l=!1;for(;!l&&n<o;){const t="skeletonRow"===GYt(e,a[i].id)?.type,r="skeletonRow"===GYt(e,a[s].id)?.type;t&&r&&(l=!0),t||(i+=1,n+=1),r||(s-=1,o-=1)}return l?{firstRowIndex:n,lastRowIndex:o}:void 0},$9t="auto-generated-skeleton-row-root",q9t=e=>`${$9t}-${e}`;function W9t(e,t){const r={topIds:[],bottomIds:[],idLookup:{}};return e?.top?.forEach(e=>{const n=LZt(e,t);r.topIds.push(n),r.idLookup[n]=e}),e?.bottom?.forEach(e=>{const n=LZt(e,t);r.bottomIds.push(n),r.idLookup[n]=e}),r}const U9t=(e,t,r)=>(r.current.caches.pinnedRows=W9t(t.pinnedRows,t.getRowId),S({},e,{rows:S({},e.rows,{additionalRowGroups:S({},e.rows?.additionalRowGroups,{pinnedRows:{top:[],bottom:[]}})})}));function G9t({groupingParams:e,rowModel:t,rowId:r,position:n,apiRef:o,isAutoGenerated:a}){const i=S({},e.dataRowIdToModelLookup),s=S({},e.tree),l=S({},e.treeDepths);s9t({type:"pinnedRow",id:r,depth:0,parent:AZt,isAutoGenerated:a},s,l,null),a||(i[r]=t),o.current.caches.rows.dataRowIdToModelLookup[r]=S({},t);const c=e.additionalRowGroups?.pinnedRows||{},u={id:r,model:t};return e.additionalRowGroups?.pinnedRows?.[n]?.includes(u)?S({},e,{dataRowIdToModelLookup:i,tree:s,treeDepths:l}):S({},e,{dataRowIdToModelLookup:i,tree:s,treeDepths:l,additionalRowGroups:S({},e.additionalRowGroups,{pinnedRows:S({},c,{[n]:[...c[n]||[],u]})})})}let Y9t=function(e){return e[e.QUEUED=0]="QUEUED",e[e.PENDING=1]="PENDING",e[e.SETTLED=2]="SETTLED",e[e.UNKNOWN=3]="UNKNOWN",e}({});class K9t{constructor(e,t=Infinity){this.pendingRequests=new Set,this.queuedRequests=new Set,this.settledRequests=new Set,this.api=void 0,this.maxConcurrentRequests=void 0,this.processQueue=async()=>{if(0===this.queuedRequests.size||this.pendingRequests.size>=this.maxConcurrentRequests)return;const e=Math.min(this.maxConcurrentRequests-this.pendingRequests.size,this.queuedRequests.size);if(0===e)return;const t=Array.from(this.queuedRequests);for(let r=0;r<e;r+=1){const e=t[r];this.queuedRequests.delete(e),this.pendingRequests.add(e),this.api.fetchRowChildren(e)}},this.queue=async e=>{const t={};e.forEach(e=>{this.queuedRequests.add(e),t[e]=!0}),this.api.setState(e=>S({},e,{dataSource:S({},e.dataSource,{loading:S({},e.dataSource.loading,t)})})),this.processQueue()},this.setRequestSettled=e=>{this.pendingRequests.delete(e),this.settledRequests.add(e),this.processQueue()},this.clear=()=>{this.queuedRequests.clear(),Array.from(this.pendingRequests).forEach(e=>this.clearPendingRequest(e))},this.clearPendingRequest=e=>{this.api.dataSource.setChildrenLoading(e,!1),this.pendingRequests.delete(e),this.processQueue()},this.getRequestStatus=e=>this.pendingRequests.has(e)?Y9t.PENDING:this.queuedRequests.has(e)?Y9t.QUEUED:this.settledRequests.has(e)?Y9t.SETTLED:Y9t.UNKNOWN,this.getActiveRequestsCount=()=>this.pendingRequests.size+this.queuedRequests.size,this.api=e.current,this.maxConcurrentRequests=t}}const Z9t={loading:{},errors:{}},X9t=(e,t,r={})=>{const n=SYt(e,YYt),o=_s(()=>new K9t(e)).current,a=s.useRef(0),i=s.useCallback(()=>{o.clear(),a.current=0;return e.current.state.dataSource!==Z9t&&e.current.resetDataSourceState(),null},[e,o]),l=s.useCallback((t,r)=>{const n=((e,t)=>{let r=e[t].parent;const n=[];for(;r&&r!==AZt;){const t=e[r];n.push(t.groupingKey??""),r=t.parent}return n.reverse()})(UYt(e),t.rowId);e.current.updateNestedRows([r],n),r&&!n5t(r,t.previousRow)&&e.current.dataSource.cache.clear()},[e]),{api:c,debouncedFetchRows:u,strategyProcessor:d,events:p,cacheChunkManager:h,cache:f}=((e,t,r={})=>{const n=s.useCallback(()=>{e.current.setStrategyAvailability(k6t.DataSource,n7t.Default,t.dataSource?()=>!0:()=>!1)},[e,t.dataSource]),[o,a]=s.useState(!1),i=SYt(e,dQt),l=s.useRef(0),c=t.onDataSourceError,u=_s(()=>{if(!t.pagination)return new o7t(i.pageSize);const e=t.pageSizeOptions.map(e=>"number"==typeof e?e:e.value).sort((e,t)=>e-t),r=Math.min(i.pageSize,e[0]);return new o7t(r)}).current,[d,p]=s.useState(()=>i7t(t.dataSourceCache,r.cacheOptions)),h=s.useCallback(async(n,a)=>{const i=t.dataSource?.getRows;if(!i)return;if(n&&n!==AZt&&"DataGrid"!==t.signature)return void r.fetchRowChildren?.([n]);r.clearDataSourceState?.();const s=S({},r7t(e),e.current.unstable_applyPipeProcessors("getRowsParams",{}),a),p=u.getCacheKeys(s).map(e=>d.get(e));if(p.every(e=>void 0!==e))return void e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:o7t.mergeResponses(p),fetchParams:s});(o||0===e.current.getRowsCount())&&e.current.setLoading(!0);const h=l.current+1;l.current=h;try{const t=await i(s);u.splitResponse(s,t).forEach((e,t)=>d.set(t,e)),l.current===h&&e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:t,fetchParams:s})}catch(t){l.current===h&&(e.current.applyStrategyProcessor("dataSourceRowsUpdate",{error:t,fetchParams:s}),"function"==typeof c?c(new I1t({message:t?.message,params:s,cause:t})):"production"!==process.env.NODE_ENV&&lat(["MUI X: A call to `dataSource.getRows()` threw an error which was not handled because `onDataSourceError()` is missing.","To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling."],"error"))}finally{o&&l.current===h&&e.current.setLoading(!1)}},[u,d,e,o,t.dataSource?.getRows,c,r,t.signature]),f=s.useCallback(()=>{a(e.current.getActiveStrategy(k6t.DataSource)===n7t.Default)},[e]),m=s.useCallback(t=>{if("error"in t)return void e.current.setRows([]);const{response:r}=t;void 0!==r.rowCount&&e.current.setRowCount(r.rowCount),e.current.setRows(r.rows),e.current.unstable_applyPipeProcessors("processDataSourceRows",{params:t.fetchParams,response:r},!0)},[e]),v=t.dataSource?.updateRow,y=r.handleEditRow,g=s.useCallback(async t=>{if(v)try{const r=await v(t);return"function"==typeof y?(y(t,r),r):(e.current.updateNestedRows([r],[]),r&&!n5t(r,t.previousRow)&&e.current.dataSource.cache.clear(),r)}catch(e){throw"function"==typeof c?c(new L1t({message:e?.message,params:t,cause:e})):"production"!==process.env.NODE_ENV&&lat(["MUI X: A call to `dataSource.updateRow()` threw an error which was not handled because `onDataSourceError()` is missing.","To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling."],"error"),e}},[e,v,c,y]),x={dataSource:{fetchRows:h,cache:d,editRow:g}},b=s.useMemo(()=>Di(h,0),[h]),k=s.useRef(!0);return s.useEffect(()=>{if(k.current)return void(k.current=!1);if(void 0===t.dataSourceCache)return;const e=i7t(t.dataSourceCache,r.cacheOptions);p(t=>t!==e?e:t)},[t.dataSourceCache,r.cacheOptions]),s.useEffect(()=>(t.dataSource&&(e.current.dataSource.cache.clear(),e.current.dataSource.fetchRows()),()=>{l.current+=1}),[e,t.dataSource]),{api:{public:x},debouncedFetchRows:b,strategyProcessor:{strategyName:n7t.Default,group:"dataSourceRowsUpdate",processor:m},setStrategyAvailability:n,cacheChunkManager:u,cache:d,events:{strategyAvailabilityChange:f,sortModelChange:xKt(o,()=>b()),filterModelChange:xKt(o,()=>b()),paginationModelChange:xKt(o,()=>b())}}})(e,t,S({fetchRowChildren:o.queue,clearDataSourceState:i,handleEditRow:l},r)),m=s.useCallback(()=>{e.current.setStrategyAvailability(k6t.DataSource,n7t.Default,t.dataSource&&!t.lazyLoading?()=>!0:()=>!1)},[e,t.dataSource,t.lazyLoading]),v=t.onDataSourceError,y=s.useCallback(async r=>{const n=e.current.unstable_applyPipeProcessors("getRowsParams",{});if(!t.treeData&&0===(n.groupFields?.length??0))return void o.clearPendingRequest(r);const a=t.dataSource?.getRows;if(!a)return void o.clearPendingRequest(r);const i=e.current.getRowNode(r);if(!i)return void o.clearPendingRequest(r);const s=S({},r7t(e),n,{groupKeys:i.path}),l=h.getCacheKeys(s).map(e=>f.get(e)),c=l.some(e=>void 0===e)?void 0:o7t.mergeResponses(l);if(void 0!==c){const t=c.rows;return o.setRequestSettled(r),e.current.updateNestedRows(t,i.path),void 0!==c.rowCount&&e.current.setRowCount(c.rowCount),e.current.setRowChildrenExpansion(r,!0),void e.current.dataSource.setChildrenLoading(r,!1)}(C9t(e)[r]??null)&&e.current.dataSource.setChildrenFetchError(r,null);try{const t=await a(s);if(!e.current.getRowNode(r))return void o.clearPendingRequest(r);if(o.getRequestStatus(r)===Y9t.UNKNOWN)return void e.current.dataSource.setChildrenLoading(r,!1);o.setRequestSettled(r);h.splitResponse(s,t).forEach((e,t)=>{f.set(t,e)}),void 0!==t.rowCount&&e.current.setRowCount(t.rowCount);const n=[];t.rows.forEach(t=>{const r=_Qt(e,t);GYt(e,r)&&n.push({id:r,_action:"delete"})}),n.length>0&&e.current.updateNestedRows(n,i.path),e.current.updateNestedRows(t.rows,i.path),e.current.setRowChildrenExpansion(r,!0)}catch(t){const n=t;e.current.dataSource.setChildrenFetchError(r,n),"function"==typeof v?v(new I1t({message:n.message,params:s,cause:n})):"production"!==process.env.NODE_ENV&&lat(["MUI X: A call to `dataSource.getRows()` threw an error which was not handled because `onDataSourceError()` is missing.","To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling."],"error")}finally{e.current.dataSource.setChildrenLoading(r,!1),o.setRequestSettled(r)}},[o,h,f,v,e,t.treeData,t.dataSource?.getRows]),g=s.useCallback((t,r)=>{e.current.setState(e=>{if(!e.dataSource.loading[t]&&!1===r)return e;const n=S({},e.dataSource.loading);return!1===r?delete n[t]:n[t]=r,S({},e,{dataSource:S({},e.dataSource,{loading:n})})})},[e]),x=s.useCallback((t,r)=>{e.current.setState(e=>{const n=S({},e.dataSource.errors);return null===r&&void 0!==n[t]?delete n[t]:n[t]=r,S({},e,{dataSource:S({},e.dataSource,{errors:n})})})},[e]),b=s.useCallback(()=>{e.current.setState(e=>S({},e,{dataSource:Z9t}))},[e]),k={dataSource:S({},c.public.dataSource,{setChildrenLoading:g,setChildrenFetchError:x})},w={fetchRowChildren:y,resetDataSourceState:b};return s.useEffect(()=>{if(n&&n.length&&a.current<n.length){const e=n.slice(a.current);o.queue(e),a.current=n.length}},[e,o,n]),{api:{public:k,private:w},debouncedFetchRows:u,strategyProcessor:d,events:p,setStrategyAvailability:m,cacheChunkManager:h,cache:f}};const Q9t=e=>S({},e,{dataSource:Z9t}),J9t={cacheOptions:{getKey:function(e){return JSON.stringify([e.filterModel,e.sortModel,e.groupKeys,e.start,e.end])}}};var eer=function(e){return e[e.VIEWPORT=0]="VIEWPORT",e[e.SCROLL_END=1]="SCROLL_END",e}(eer||{});const ter={firstRowToRender:0,lastRowToRender:0},rer=e=>`${$9t}-${e}`,ner=so("div")({position:"sticky",left:0,width:0,height:0}),oer=(e,r)=>{const n=SYt(e,IGt).isReady,o=s.useRef(null),a=Ds(),i=s.useRef(null),l="client"===r.rowsLoadingMode&&!!r.onRowsScrollEnd,c=r.dataSource&&r.lazyLoading,u=l||c,d=Ni(([t])=>{const r=t.intersectionRatio;t.isIntersecting&&1===r&&(o.current?.disconnect(),i.current=null,e.current.publishEvent("rowsScrollEndIntersection"))});s.useEffect(()=>{const t=e.current.virtualScrollerRef.current;if(!u||!n||!t)return;o.current?.disconnect();const a=YGt(e),s=r.scrollEndThreshold-a;o.current=new IntersectionObserver(d,{threshold:1,root:t,rootMargin:`0px 0px ${s}px 0px`}),i.current&&o.current.observe(i.current)},[e,n,d,u,r.scrollEndThreshold]);const p=s.useCallback(e=>{u&&a.start(0,()=>(e=>{i.current!==e&&(o.current?.disconnect(),i.current=e,i.current&&o.current?.observe(i.current))})(e))},[u,a]),h=s.useCallback(({lastRowId:e})=>u?t.jsx(ner,{ref:p,role:"presentation"},`trigger-${e}`):null,[u,p]);CJt(e,{getInfiniteLoadingTriggerElement:h},"private")},aer=(e,r)=>{S6t(e,r),((e,t)=>{const r=s.useCallback(r=>{const n=S({},N9t,{headerName:e.current.getLocaleText("detailPanelToggle")}),o=!!t.getDetailPanelContent,a=null!=r.lookup[eXt];return o&&!a?(r.lookup[eXt]=n,r.orderedFields=[eXt,...r.orderedFields]):!o&&a?(delete r.lookup[eXt],r.orderedFields=r.orderedFields.filter(e=>e!==eXt)):o&&a&&(r.lookup[eXt]=S({},n,r.lookup[eXt]),t.columns.some(e=>e.field===eXt)||(r.orderedFields=[eXt,...r.orderedFields.filter(e=>e!==eXt)])),r},[e,t.columns,t.getDetailPanelContent]),n=s.useCallback((r,n)=>null==t.getDetailPanelContent?r:F7t(e).has(n)?[...r,nYt["row--detailPanelExpanded"]]:r,[e,t.getDetailPanelContent]);x6t(e,"hydrateColumns",r),x6t(e,"rowClassName",n)})(e,r),b9t(e,r),E9t(e,r),f8t(e,r),((e,t)=>{const r=s.useCallback(e=>{const r=e.tree[AZt];if("server"!==t.rowsLoadingMode||!t.rowCount||r.children.length>=t.rowCount)return e;const n=S({},e.tree),o=[...r.children];for(let e=0;e<t.rowCount-r.children.length;e+=1){const t=q9t(e);o.push(t);const r={type:"skeletonRow",id:t,parent:AZt,depth:0};n[t]=r}return n[AZt]=S({},r,{children:o}),S({},e,{tree:n})},[t.rowCount,t.rowsLoadingMode]);x6t(e,"hydrateRows",r)})(e,r),(e=>{const t=s.useRef(null),r=s.useCallback(r=>{const n=e.current.caches.pinnedRows||{},o=t.current;t.current=n;let a=S({},r,{additionalRowGroups:S({},r.additionalRowGroups,{pinnedRows:{}})});if(o){const t=t=>{const r=a.tree[t];"pinnedRow"===r?.type&&(delete a.tree[t],delete a.dataRowIdToModelLookup[t],delete e.current.caches.rows.dataRowIdToModelLookup[t])};o.topIds?.forEach(t),o.bottomIds?.forEach(t)}if(n.topIds?.forEach(t=>{a=G9t({groupingParams:a,rowModel:n.idLookup[t],rowId:t,position:"top",apiRef:e,isAutoGenerated:!1})}),n.bottomIds?.forEach(t=>{a=G9t({groupingParams:a,rowModel:n.idLookup[t],rowId:t,position:"bottom",apiRef:e,isAutoGenerated:!1})}),n.bottomIds?.length||n.topIds?.length){const e=e=>!a.tree[e]||"pinnedRow"!==a.tree[e].type,t=a.tree[AZt];a.tree[AZt]=S({},t,{children:t.children.filter(e)}),a.dataRowIds=a.dataRowIds.filter(e)}return a},[e]);x6t(e,"hydrateRows",r)})(e),V9t(e,r),((e,t)=>{const{disableColumnPinning:r}=t,n=s.useRef([]),o=s.useCallback(t=>{if(0===t.orderedFields.length||r)return t;const o=e.current.state;e.current.state=S({},o,{columns:t});const a=ZKt(e);e.current.state=o;const i=a.left,s=a.right;let l;const c=[...i,...s],{orderedFieldsBeforePinningColumns:u}=e.current.caches.columnPinning;if(u){l=new Array(t.orderedFields.length).fill(null);const r=[...l],o=[...t.orderedFields];n.current.forEach(e=>{if(!c.includes(e)&&t.lookup[e]){const t=u.indexOf(e);l[t]=e,r[t]=e,o.splice(o.indexOf(e),1)}}),c.forEach(e=>{let n=u.indexOf(e);if((-1===n||n>=r.length)&&(n=t.orderedFields.indexOf(e)),null!==r[n])for(n=0;null!==r[n];)n+=1;l[n]=e,r[n]=e,o.splice(o.indexOf(e),1)});let a=0;o.forEach(e=>{for(;null!==r[a];)a+=1;r[a]=e,l[a]=e}),e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=r}else l=[...t.orderedFields],e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=[...t.orderedFields];n.current=c;const d=l.filter(e=>!i.includes(e)&&!s.includes(e));return S({},t,{orderedFields:[...i,...d,...s]})},[e,r]);x6t(e,"hydrateColumns",o);const a=s.useCallback((t,r)=>e.current.isColumnPinned(r),[e]);x6t(e,"isColumnPinned",a)})(e,r),(e=>{w6t(e,_6t,"rowTreeCreation",c8t)})(e),D6t(M6t,e,r),D6t(_7t,e,r),D6t(h8t,e,r),D6t(z9t,e,r),D6t(j9t,e,r),D6t(z6t,e,r),D6t(U9t,e,r),D6t(l8t,e,r),D6t(Q6t,e,r),D6t(i8t,e,r),D6t(G6t,e,r),D6t(m8t,e,r),D6t(e8t,e,r),D6t($6t,e,r),D6t(J8t,e,r),D6t(F6t,e,r),D6t(D7t,e,r),D6t(H8t,e,r),D6t(R6t,e,r),D6t(A8t,e,r),D6t(FJt,e,r),D6t(Q9t,e,r),D6t(k8t,e,r),D6t(O8t,e,r),D6t(e7t,e,r),((e,t)=>{const r=MJt(e,"useGridHeaderFiltering"),n=s.useCallback(r=>{e.current.setState(e=>"DataGrid"===t.signature?e:S({},e,{headerFiltering:{enabled:t.headerFilters??!1,editing:r.editing??null,menuOpen:r.menuOpen??null}}))},[e,t.signature,t.headerFilters]),o=s.useCallback(t=>{r.debug(`Starting edit mode on header filter for field: ${t}`),e.current.setHeaderFilterState({editing:t})},[e,r]),a=s.useCallback(()=>{r.debug("Stopping edit mode on header filter"),e.current.setHeaderFilterState({editing:null})},[e,r]),i=s.useCallback(t=>{r.debug(`Opening header filter menu for field: ${t}`),e.current.setHeaderFilterState({menuOpen:t})},[e,r]),l=s.useCallback(()=>{r.debug("Hiding header filter menu for active field");let t=e.current.state.headerFiltering.menuOpen;if(t){const r=$Kt(e),n=WKt(e),o=HKt(e);if(r[t]||(t=o[0]),!1===n[t]){const e=o.filter(e=>e===t||!1!==n[e]),r=e.indexOf(t);t=e[r+1]||e[r-1]}e.current.setHeaderFilterState({menuOpen:null}),e.current.setColumnHeaderFilterFocus(t)}},[e,r]),c={setHeaderFilterState:n};CJt(e,{startHeaderFilterEditMode:o,stopHeaderFilterEditMode:a,showHeaderFilterMenu:i,hideHeaderFilterMenu:l},"public"),CJt(e,c,"private");const u=s.useRef(!0);s.useEffect(()=>{u.current?u.current=!1:e.current.setHeaderFilterState({enabled:t.headerFilters??!1})},[e,t.headerFilters])})(e,r),((e,t)=>{const r=s.useCallback((r,n)=>{if(e.current.getCellParams(r.id,r.field).colDef.field===QZt&&(" "===n.key||"Enter"===n.key)&&!n.shiftKey){if("group"!==r.rowNode.type)return;if(t.dataSource&&!r.rowNode.childrenExpanded)return void e.current.dataSource.fetchRows(r.id);e.current.setRowChildrenExpansion(r.id,!r.rowNode.childrenExpanded)}},[e,t.dataSource]);pYt(e,"cellKeyDown",r)})(e,r),X6t(e,r),((e,t)=>{const r=MJt(e,"useGridSelection"),n=s.useCallback(e=>(...r)=>{t.rowSelection&&e(...r)},[t.rowSelection]),o=t.signature!==oYt.DataGrid&&(t.rowSelectionPropagation?.parents||t.rowSelectionPropagation?.descendants),a=s.useMemo(()=>t.rowSelectionModel,[t.rowSelectionModel]),i=s.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:a,propOnChange:t.onRowSelectionModelChange,stateSelector:IXt,changeEvent:"rowSelectionChange"});const{checkboxSelection:l,disableRowSelectionOnClick:c,isRowSelectable:u}=t,d=qXt(t),p=SYt(e,UYt),h=SYt(e,XYt)>1,f=s.useCallback(t=>{let r=t;const n=i.current??t,o=e.current.isRowSelected(t);if(o){const t=OXt(e),o=t.findIndex(e=>e===n),a=t.findIndex(e=>e===r);if(o===a)return;r=o>a?t[a+1]:t[a-1]}i.current=t,e.current.selectRowRange({startId:n,endId:r},!o)},[e]),m=Ni(()=>t.pagination&&t.checkboxSelectionVisibleOnly&&"client"===t.paginationMode?xQt(e):OXt(e)),v=s.useCallback((n,o)=>{if(t.signature===oYt.DataGrid&&!d&&("include"!==n.type||n.ids.size>1))throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));IXt(e)!==n&&(r.debug("Setting selection model"),e.current.setState(e=>S({},e,{rowSelection:t.rowSelection?n:p8t}),o))},[e,r,t.rowSelection,t.signature,d]),y=s.useCallback(t=>LXt(e).has(t),[e]),g=s.useCallback(r=>{if(!1===t.rowSelection)return!1;if(u&&!u(e.current.getRowParams(r)))return!1;const n=GYt(e,r);return"footer"!==n?.type&&"pinnedRow"!==n?.type},[e,t.rowSelection,u]),x=s.useCallback(()=>VXt(e),[e]),b=s.useCallback((n,a=!0,s=!1)=>{if(e.current.isRowSelectable(n))if(i.current=n,s){r.debug(`Setting selection for row ${n}`);const i={type:"include",ids:new Set},s=e=>{i.ids.add(e)};a&&(s(n),o&&WXt(e,p,n,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,s)),e.current.setRowSelectionModel(i,"singleRowSelection")}else{r.debug(`Toggling selection for row ${n}`);const i=IXt(e),s={type:i.type,ids:new Set(i.ids)},l=DKt(s);l.unselect(n);const c=e=>{l.select(e)},u=e=>{l.unselect(e)};a?(c(n),o&&WXt(e,p,n,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,c)):o&&UXt(e,p,n,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,u),("include"===s.type&&s.ids.size<2||d)&&e.current.setRowSelectionModel(s,"singleRowSelection")}},[e,r,o,p,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,d]),k=s.useCallback((n,a=!0,i=!1)=>{if(r.debug("Setting selection for several rows"),!1===t.rowSelection)return;const s=new Set;for(let t=0;t<n.length;t+=1){const r=n[t];e.current.isRowSelectable(r)&&s.add(r)}const l=IXt(e);let c;if(i){if(c={type:"include",ids:s},a){const r=DKt(c);if(o){const n=e=>{r.select(e)};for(const r of s)WXt(e,p,r,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,n)}}else c.ids=new Set;if(l.type===c.type&&c.ids.size===l.ids.size&&Array.from(c.ids).every(e=>l.ids.has(e)))return}else{c={type:l.type,ids:new Set(l.ids)};const r=DKt(c),n=e=>{r.select(e)},i=e=>{r.unselect(e)};for(const l of s)a?(r.select(l),o&&WXt(e,p,l,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,n)):(i(l),o&&UXt(e,p,l,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,i))}("include"===c.type&&c.ids.size<2||d)&&e.current.setRowSelectionModel(c,"multipleRowsSelection")},[r,o,d,e,p,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,t.rowSelection]),w=s.useCallback(r=>{if(!h||!o||0===r.ids.size&&"include"===r.type)return r;const n={type:r.type,ids:new Set(r.ids)},a=DKt(n),i=e=>{a.select(e)};for(const n of r.ids)WXt(e,p,n,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,i,a);return n},[e,p,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,h,o]),_=s.useCallback(({startId:t,endId:n},o=!0,a=!1)=>{if(!e.current.getRow(t)||!e.current.getRow(n))return;r.debug(`Expanding selection from row ${t} to row ${n}`);const i=OXt(e),s=i.indexOf(t),l=i.indexOf(n),[c,u]=s>l?[l,s]:[s,l],d=i.slice(c,u+1);e.current.selectRows(d,o,a)},[e,r]),C={selectRows:k,selectRowRange:_,getPropagatedRowSelectionModel:w};CJt(e,{selectRow:b,setRowSelectionModel:v,getSelectedRows:x,isRowSelected:y,isRowSelectable:g},"public"),CJt(e,C,t.signature===oYt.DataGrid?"private":"public");const M=s.useRef(!0),D=s.useCallback((r=!1)=>{if(M.current)return;const n=IXt(e),o=qYt(e),a=UYt(e),i=CXt(e),s=e=>"server"===t.filterMode?!o[e]:!a[e]||!1===i[e],l={type:n.type,ids:new Set(n.ids)},c=DKt(l);let u=!1;for(const e of n.ids){if(s(e)){if(t.keepNonExistentRowsSelected)continue;c.unselect(e),u=!0;continue}if(!t.rowSelectionPropagation?.parents)continue;const r=p[e];if("group"===r?.type){if(r.isAutoGenerated){c.unselect(e),u=!0;continue}r.children.every(e=>!1===i[e])||(c.unselect(e),u=!0)}}const d=h&&t.rowSelectionPropagation?.parents&&(l.ids.size>0||"exclude"===l.type);if(u||d&&!r)if(d)if("exclude"===l.type){const r=m(),n=[];for(let e=0;e<r.length;e+=1){const o=r[e];!t.keepNonExistentRowsSelected&&s(o)||!c.has(o)||n.push(o)}e.current.selectRows(n,!0,!0)}else e.current.selectRows(Array.from(l.ids),!0,!0);else e.current.setRowSelectionModel(l,"multipleRowsSelection")},[e,h,t.rowSelectionPropagation?.parents,t.keepNonExistentRowsSelected,t.filterMode,p,m]),O=s.useCallback((t,r)=>{const n=r.metaKey||r.ctrlKey,o=!l&&!n&&!(e=>!!e.key)(r),a=!d||o,i=e.current.isRowSelected(t),s=BXt(e)>1&&a||!i;e.current.selectRow(t,s,a)},[e,d,l]),P=s.useCallback((t,r)=>{if(c)return;const n=r.target.closest(`.${nYt.cell}`)?.getAttribute("data-field");if(n!==MQt.field&&n!==eXt){if(n){const t=e.current.getColumn(n);if(t?.type===RZt)return}"pinnedRow"!==GYt(e,t.id).type&&(r.shiftKey&&d?f(t.id):O(t.id,r))}},[c,d,e,f,O]),E=s.useCallback((e,t)=>{d&&t.shiftKey&&window.getSelection()?.removeAllRanges()},[d]),j=s.useCallback((t,r)=>{d&&r.nativeEvent.shiftKey?f(t.id):e.current.selectRow(t.id,t.value,!d)},[e,f,d]),T=s.useCallback(r=>{const n=kXt(e),o=wXt(e),a=n.items.length>0||o?.some(e=>e.length);t.isRowSelectable||t.checkboxSelectionVisibleOnly||h&&!t.rowSelectionPropagation?.descendants||a?e.current.selectRows(m(),r):e.current.setRowSelectionModel({type:r?"exclude":"include",ids:new Set},"multipleRowsSelection")},[e,m,t.checkboxSelectionVisibleOnly,t.isRowSelectable,t.rowSelectionPropagation?.descendants,h]),N=s.useCallback(e=>{T(e.value)},[T]),R=s.useCallback((t,r)=>{if(e.current.getCellMode(t.id,t.field)!==wKt.Edit&&!W0t(r)){if(bZt(r.key)&&r.shiftKey){const n=XXt(e);if(n&&n.id!==t.id){r.preventDefault();const o=e.current.isRowSelected(n.id);if(!d)return void e.current.selectRow(n.id,!o,!0);const a=e.current.getRowIndexRelativeToVisibleRows(n.id),i=e.current.getRowIndexRelativeToVisibleRows(t.id);let s,l;a>i?o?(s=i,l=a-1):(s=i,l=a):o?(s=a+1,l=i):(s=a,l=i);const c=OJt(e),u=[];for(let e=s;e<=l;e+=1)u.push(c.rows[e].id);return void e.current.selectRows(u,!o)}}if(" "===r.key&&r.shiftKey)return r.preventDefault(),void O(t.id,r);"A"===String.fromCharCode(r.keyCode)&&(r.ctrlKey||r.metaKey)&&(r.preventDefault(),T(!0))}},[e,d,O,T]),z=Ni(()=>{if(!t.rowSelection)return void e.current.setRowSelectionModel(p8t);if(void 0===a)return;if(!o||!h||"include"===a.type&&0===a.ids.size)return void e.current.setRowSelectionModel(a);const r=e.current.getPropagatedRowSelectionModel(a);r.type===a.type&&r.ids.size===a.ids.size&&Array.from(a.ids).every(e=>r.ids.has(e))?e.current.setRowSelectionModel(a):e.current.setRowSelectionModel(r)});pYt(e,"sortedRowsSet",n(()=>D(!0))),pYt(e,"filteredRowsSet",n(()=>D())),pYt(e,"rowClick",n(P)),pYt(e,"rowSelectionCheckboxChange",n(j)),pYt(e,"headerSelectionCheckboxChange",N),pYt(e,"cellMouseDown",n(E)),pYt(e,"cellKeyDown",n(R)),s.useEffect(()=>{z()},[e,a,t.rowSelection,z]);const A=null!=a;s.useEffect(()=>{if(A||!t.rowSelection||"function"!=typeof g)return;const r=IXt(e);if("include"!==r.type)return;const n=new Set;for(const e of r.ids)g(e)&&n.add(e);n.size<r.ids.size&&e.current.setRowSelectionModel({type:r.type,ids:n})},[e,g,A,t.rowSelection]),s.useEffect(()=>{if(!t.rowSelection||A)return;const r=IXt(e);!d&&("include"===r.type&&r.ids.size>1||"exclude"===r.type)&&e.current.setRowSelectionModel(p8t)},[e,d,l,A,t.rowSelection]),s.useEffect(()=>{n(D)},[D,n]),s.useEffect(()=>{M.current&&(M.current=!1)},[])})(e,r),((e,t)=>{const r=SYt(e,KKt),n=s.useCallback((t,r)=>{const n=XKt(e);if(!r.colIndex||0===n.left.length&&0===n.right.length)return t;const o=GKt(e),a=LGt(e),i=JKt(e),s=e.current.virtualScrollerRef.current.clientWidth,l=Math.abs(e.current.virtualScrollerRef.current.scrollLeft),c=o[r.colIndex].computedWidth,u=i[r.colIndex],d=i[n.left.length],p=a-i[i.length-n.right.length],h=u+c;return h-(s-p)>l?S({},t,{left:h-(s-p)}):u<l+d?S({},t,{left:u-d}):t},[e]),o=s.useCallback((e,r)=>t.disableColumnPinning||!1===r.pinnable?e:[...e,"columnMenuPinningItem"],[t.disableColumnPinning]),a=s.useCallback((t,{targetIndex:r})=>{const n=XKt(e);return 0===n.left.length&&0===n.right.length?t:!(n.left.length>0&&r<n.left.length)&&(n.right.length>0?!(r>=GKt(e).length-n.right.length)&&t:t)},[e]),i=s.useCallback((r,n)=>{const o=KKt(e);return!n.exportOnlyDirtyModels||null!=t.pinnedColumns||null!=t.initialState?.pinnedColumns||(o.left??[]).length>0||(o.right??[]).length>0?S({},r,{pinnedColumns:o}):r},[e,t.pinnedColumns,t.initialState?.pinnedColumns]),l=s.useCallback((t,r)=>{const n=r.stateToRestore.pinnedColumns;return null!=n&&T9t(e,n),t},[e]);x6t(e,"scrollToIndexes",n),x6t(e,"columnMenu",o),x6t(e,"canBeReordered",a),x6t(e,"exportState",i),x6t(e,"restoreState",l),e.current.registerControlState({stateId:"pinnedColumns",propModel:t.pinnedColumns,propOnChange:t.onPinnedColumnsChange,stateSelector:KKt,changeEvent:"pinnedColumnsChange"});const c=s.useCallback((t,n)=>{if(e.current.isColumnPinned(t)===n)return;const o=n===AKt.RIGHT?AKt.LEFT:AKt.RIGHT,a={[n]:[...r[n]||[],t],[o]:(r[o]||[]).filter(e=>e!==t)};e.current.setPinnedColumns(a)},[e,r]),u=s.useCallback(t=>{e.current.setPinnedColumns({left:(r.left||[]).filter(e=>e!==t),right:(r.right||[]).filter(e=>e!==t)})},[e,r.left,r.right]),d=s.useCallback(()=>KKt(e),[e]),p=s.useCallback(t=>{T9t(e,t),e.current.requestPipeProcessorsApplication("hydrateColumns")},[e]),h=s.useCallback(e=>(r.left||[]).includes(e)?AKt.LEFT:!!(r.right||[]).includes(e)&&AKt.RIGHT,[r.left,r.right]);CJt(e,{pinColumn:c,unpinColumn:u,getPinnedColumns:d,setPinnedColumns:p,isColumnPinned:h},"public"),pYt(e,"columnOrderChange",t=>{if(!e.current.caches.columnPinning.orderedFieldsBeforePinningColumns)return;const{column:r,targetIndex:n,oldIndex:o}=t,a=n>o?1:-1,i=HKt(e)[n-a],s=[...e.current.caches.columnPinning.orderedFieldsBeforePinningColumns];let l=s.findIndex(e=>e===r.field),c=l+a;const u=s.findIndex(e=>e===i);for(;a>0?l<u:l>u;){for(;e.current.isColumnPinned(s[c]);)c+=a;const t=s[l];s[l]=s[c],s[c]=t,l=c,c=l+a}e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=s}),s.useEffect(()=>{t.pinnedColumns&&e.current.setPinnedColumns(t.pinnedColumns)},[e,t.pinnedColumns])})(e,r),((e,t)=>{const r=s.useCallback(r=>{e.current.caches.pinnedRows=W9t(r,t.getRowId),e.current.requestPipeProcessorsApplication("hydrateRows")},[e,t.getRowId]);CJt(e,{unstable_setPinnedRows:r},"public");const n=s.useRef(!0);s.useEffect(()=>{n.current?n.current=!1:e.current.unstable_setPinnedRows(t.pinnedRows)},[e,t.pinnedRows])})(e,r),A6t(e,r),((e,t)=>{if("production"!==process.env.NODE_ENV)try{Object.freeze(t.rows)}catch(e){}const r=MJt(e,"useGridRows"),n=s.useRef(Date.now()),o=s.useRef(t.rowCount),a=Ds(),i=s.useCallback(t=>{const r=qYt(e)[t];if(r)return r;const n=GYt(e,t);return n&&$Zt(n)?{[FZt]:t}:null},[e]),l=s.useCallback(t=>_Qt(e,t),[e]),c=s.useCallback(({cache:r,throttle:o})=>{const i=()=>{n.current=Date.now(),e.current.setState(r=>S({},r,{rows:HZt({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:UYt(e),previousTreeDepths:ZYt(e),previousGroupsToFetch:YYt(e)})})),e.current.publishEvent("rowsSet")};if(a.clear(),e.current.caches.rows=r,!o)return void i();const s=t.throttleRowsMs-(Date.now()-n.current);s>0?a.start(s,i):i()},[t.throttleRowsMs,t.rowCount,t.loading,e,a]),u=s.useCallback(n=>{if(r.debug(`Updating all rows, new length ${n.length}`),l1t(e))return void e.current.updateNonPivotRows(n,!1);const o=BZt({rows:n,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),a=e.current.caches.rows;o.rowsBeforePartialUpdates=a.rowsBeforePartialUpdates,c({cache:o,throttle:!0})},[r,t.getRowId,t.loading,t.rowCount,c,e]),d=s.useCallback(r=>{if(t.signature===oYt.DataGrid&&r.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(l1t(e))return void e.current.updateNonPivotRows(r);const n=GZt(e,r,t.getRowId),o=WZt({updates:n,getRowId:t.getRowId,previousCache:e.current.caches.rows});c({cache:o,throttle:!0})},[t.signature,t.getRowId,c,e]),p=s.useCallback((r,n)=>{const o=GZt(e,r,t.getRowId),a=WZt({updates:o,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:n??[]});c({cache:a,throttle:!1})},[t.getRowId,c,e]),h=s.useCallback(t=>{r.debug(`Setting loading to ${t}`),e.current.setState(e=>S({},e,{rows:S({},e.rows,{loading:t})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t},[e,r]),f=s.useCallback(()=>{const t=QYt(e),r=qYt(e);return new Map(t.map(e=>[e,r[e]??{}]))},[e]),m=s.useCallback(()=>VYt(e),[e]),v=s.useCallback(()=>QYt(e),[e]),y=s.useCallback(t=>{const{rowIdToIndexMap:r}=OJt(e);return r.get(t)},[e]),g=s.useCallback((t,r)=>{const n=GYt(e,t);if(!n)throw new Error(`MUI X: No row with id #${t} found.`);if("group"!==n.type)throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const o=S({},n,{childrenExpanded:r});e.current.setState(e=>S({},e,{rows:S({},e.rows,{tree:S({},e.rows.tree,{[t]:o})})})),e.current.publishEvent("rowExpansionChange",o)},[e]),x=s.useCallback(t=>GYt(e,t)??null,[e]),b=s.useCallback(({skipAutoGeneratedRows:t=!0,groupId:r,applySorting:n,applyFiltering:o,directChildrenOnly:a=!1})=>{const i=UYt(e);let s;if(n){const n=i[r];if(!n)return[];const o=mXt(e);s=[];for(let e=o.findIndex(e=>e===r)+1;e<o.length&&(a?i[o[e]].depth===n.depth+1:i[o[e]].depth>n.depth);e+=1){const r=o[e];t&&$Zt(i[r])||s.push(r)}}else s=qZt(i,r,t,a);if(o){const t=CXt(e);s=hXt(t)?s:s.filter(e=>!1!==t[e])}return s},[e]),k=s.useCallback((t,n)=>{const o=GYt(e,t);if(!o)throw new Error(`MUI X: No row with id #${t} found.`);if(o.parent!==AZt)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if("leaf"!==o.type)throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState(o=>{const a=UYt(e)[AZt],i=a.children,s=i.findIndex(e=>e===t);if(-1===s||s===n)return o;r.debug(`Moving row ${t} to index ${n}`);const l=[...i];return l.splice(n,0,l.splice(s,1)[0]),S({},o,{rows:S({},o.rows,{tree:S({},o.rows.tree,{[AZt]:S({},a,{children:l})})})})}),e.current.publishEvent("rowsSet")},[e,r]),w=s.useCallback((r,n)=>{if(t.signature===oYt.DataGrid&&n.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===n.length)return;if(XYt(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const o=S({},UYt(e)),a=S({},qYt(e)),i=o[AZt],s=[...i.children],l=new Set;for(let e=0;e<n.length;e+=1){const i=n[e],c=LZt(i,t.getRowId,"A row was provided without id when calling replaceRows()."),[u]=s.splice(r+e,1,c);l.has(u)||(delete a[u],delete o[u]);const d={id:c,depth:0,parent:AZt,type:"leaf",groupingKey:null};a[c]=i,o[c]=d,l.add(c)}o[AZt]=S({},i,{children:s});const c=s.filter(e=>"leaf"===o[e]?.type);e.current.caches.rows.dataRowIdToModelLookup=a,e.current.setState(e=>S({},e,{rows:S({},e.rows,{loading:t.loading,totalRowCount:Math.max(t.rowCount||0,s.length),dataRowIdToModelLookup:a,dataRowIds:c,tree:o})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId,t.loading,t.rowCount]),_={getRow:i,setLoading:h,getRowId:l,getRowModels:f,getRowsCount:m,getAllRowIds:v,setRows:u,updateRows:d,getRowNode:x,getRowIndexRelativeToVisibleRows:y,unstable_replaceRows:w},C={setRowIndex:k,setRowChildrenExpansion:g,getRowGroupChildren:b},M={updateNestedRows:p},D=s.useCallback(()=>{let n;r.info("Row grouping pre-processing have changed, regenerating the row tree"),n=e.current.caches.rows.rowsBeforePartialUpdates===t.rows?S({},e.current.caches.rows,{updates:{type:"full",rows:QYt(e)}}):BZt({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),c({cache:n,throttle:!1})},[r,e,t.rows,t.getRowId,t.loading,t.rowCount,c]),O=_s(()=>t.dataSource),P=s.useCallback(e=>{t.dataSource&&t.dataSource!==O.current?O.current=t.dataSource:"rowTreeCreation"===e&&D()},[D,O,t.dataSource]),E=s.useCallback(()=>{e.current.getActiveStrategy(k6t.RowTree)!==KYt(e)&&D()},[e,D]);pYt(e,"activeStrategyProcessorChange",P),pYt(e,"strategyAvailabilityChange",E);const j=s.useCallback(()=>{e.current.setState(r=>{const n=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:UYt(e),treeDepths:ZYt(e),dataRowIds:QYt(e),dataRowIdToModelLookup:qYt(e)});return S({},r,{rows:S({},r.rows,n,{totalTopLevelRowCount:VZt({tree:n.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet")},[e,t.rowCount]);b6t(e,"hydrateRows",j),CJt(e,_,"public"),CJt(e,C,t.signature===oYt.DataGrid?"private":"public"),CJt(e,M,"private");const T=s.useRef(!0);s.useEffect(()=>{if(T.current)return void(T.current=!1);let n=!1;t.rowCount!==o.current&&(n=!0,o.current=t.rowCount);const a=t.dataSource?JYt(e):t.rows,i=e.current.caches.rows.rowsBeforePartialUpdates===a,s=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,l=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;i&&(s||(e.current.setState(e=>S({},e,{rows:S({},e.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading),l||(e.current.setState(e=>S({},e,{rows:S({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount),!n)||(r.debug(`Updating all rows, new length ${a?.length}`),c({cache:BZt({rows:a,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,t.dataSource,r,c,e])})(e,r),((e,t)=>{const r=_s(()=>e.current.state.rowSpanning!==Y8t?Q8t(t,e):K8t),n=s.useCallback((n,o=!1)=>{const{range:a,rows:i}=OJt(e,(t.pagination,t.paginationMode));if(null===a||!U8t(n))return;o&&(r.current=K8t);const s=function(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex<t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?{firstRowIndex:e.firstRowIndex,lastRowIndex:t.firstRowIndex-1}:e}({firstRowIndex:n.firstRowIndex,lastRowIndex:Math.min(n.lastRowIndex,a.lastRowIndex+1)},r.current);if(null===s)return;const l=GKt(e),{spannedCells:c,hiddenCells:u,hiddenCellOriginMap:d,processedRange:p}=X8t(e,l,i,a,s,o,r.current);r.current=p;const h=Object.keys(c).length,f=Object.keys(u).length,m=Object.keys(e.current.state.rowSpanning.spannedCells).length,v=Object.keys(e.current.state.rowSpanning.hiddenCells).length;(o||h!==m||f!==v)&&(0!==h||0!==m)&&e.current.setState(e=>S({},e,{rowSpanning:{spannedCells:c,hiddenCells:u,hiddenCellOriginMap:d}}))},[e,r,t.pagination,t.paginationMode]),o=s.useCallback(()=>{const t=RJt(e);U8t(t)&&n(t,!0)},[e,n]);pYt(e,"renderedRowsIntervalChange",xKt(t.rowSpanning,n)),pYt(e,"sortedRowsSet",xKt(t.rowSpanning,o)),pYt(e,"paginationModelChange",xKt(t.rowSpanning,o)),pYt(e,"filteredRowsSet",xKt(t.rowSpanning,o)),pYt(e,"columnsChange",xKt(t.rowSpanning,o)),s.useEffect(()=>{t.rowSpanning?e.current.state.rowSpanning===Y8t&&o():e.current.state.rowSpanning!==Y8t&&e.current.setState(e=>S({},e,{rowSpanning:Y8t}))},[e,o,t.rowSpanning])})(e,r),d8t(e,r),((e,t)=>{const r=SYt(e,I7t),n=s.useCallback((n,o)=>{if(n.field!==eXt||null==t.getDetailPanelContent)return;const a=r[n.id];s.isValidElement(a)&&o.target!==o.currentTarget&&e.current.toggleDetailPanel(n.id)},[e,r,t.getDetailPanelContent]),o=s.useCallback((r,n)=>{null!=t.getDetailPanelContent&&r.field===eXt&&" "===n.key&&e.current.toggleDetailPanel(r.id)},[e,t.getDetailPanelContent]);pYt(e,"cellClick",n),pYt(e,"cellKeyDown",o),e.current.registerControlState({stateId:"detailPanels",propModel:t.detailPanelExpandedRowIds,propOnChange:t.onDetailPanelExpandedRowIdsChange,stateSelector:F7t,changeEvent:"detailPanelsExpandedRowIdsChange"});const a=s.useCallback(n=>{if(null==t.getDetailPanelContent)return;const o=r[n];if(!s.isValidElement(o))return;const a=e.current.getExpandedDetailPanels(),i=new Set(a);a.has(n)?i.delete(n):i.add(n),e.current.setExpandedDetailPanels(i)},[e,r,t.getDetailPanelContent]),i=s.useCallback(()=>F7t(e),[e]),l=s.useCallback(t=>{e.current.setState(e=>S({},e,{detailPanel:S({},e.detailPanel,{expandedRowIds:t})})),e.current.requestPipeProcessorsApplication("rowHeight")},[e]),c=s.useCallback((t,r)=>{const n=L7t(e);n[t]&&n[t].height!==r&&(e.current.setState(e=>S({},e,{detailPanel:S({},e.detailPanel,{heightCache:S({},n,{[t]:S({},n[t],{height:r})})})})),e.current.requestPipeProcessorsApplication("rowHeight"))},[e]),u={storeDetailPanelHeight:c};CJt(e,{toggleDetailPanel:a,getExpandedDetailPanels:i,setExpandedDetailPanels:l},"public"),CJt(e,u,"private"),s.useEffect(()=>{t.detailPanelExpandedRowIds&&F7t(e)!==t.detailPanelExpandedRowIds&&e.current.setExpandedDetailPanels(t.detailPanelExpandedRowIds)},[e,t.detailPanelExpandedRowIds]);const d=s.useCallback(()=>{t.getDetailPanelContent&&e.current.setState(r=>S({},r,{detailPanel:S({},r.detailPanel,A9t(e,t.getDetailPanelContent,t.getDetailPanelHeight,r.detailPanel.heightCache))}))},[e,t.getDetailPanelContent,t.getDetailPanelHeight]);pYt(e,"sortedRowsSet",d);const p=s.useRef(void 0),h=s.useRef(void 0),f=s.useCallback(()=>{t.getDetailPanelContent===p.current&&t.getDetailPanelHeight===h.current||(e.current.setState(r=>S({},r,{detailPanel:S({},r.detailPanel,A9t(e,t.getDetailPanelContent,t.getDetailPanelHeight,r.detailPanel.heightCache))})),p.current=t.getDetailPanelContent,h.current=t.getDetailPanelHeight)},[e,t.getDetailPanelContent,t.getDetailPanelHeight]),m=s.useCallback((t,r)=>{const n=F7t(e);if(!n||!n.has(r.id))return t.detail=0,t;f();const o=L7t(e);return t.detail=o[r.id]?.height??0,t},[e,f]),v=void 0!==t.getDetailPanelContent;x6t(e,"rowHeight",m,v);const y=s.useRef(!0);y.current&&f(),s.useEffect(()=>{y.current||f(),y.current=!1},[e,f])})(e,r),(e=>{const t=s.useRef({}),r=()=>{t.current={}},n=s.useCallback(({rowId:r,minFirstColumn:n,maxLastColumn:o,columns:a})=>{for(let i=n;i<o;i+=1){const s=P8t({apiRef:e,lookup:t.current,columnIndex:i,rowId:r,minFirstColumnIndex:n,maxLastColumnIndex:o,columns:a});s.colSpan>1&&(i+=s.colSpan-1)}},[e]),o={resetColSpan:r,calculateColSpan:n};CJt(e,{unstable_getCellColSpanInfo:(e,r)=>t.current[e]?.[r]},"public"),CJt(e,o,"private"),pYt(e,"columnOrderChange",r)})(e),((e,t)=>{const r=s.useCallback(t=>oJt(e)[t]??[],[e]),n=s.useCallback(()=>aJt(e),[e]);CJt(e,{getColumnGroupPath:r,getAllGroupDetails:n},"public");const o=s.useCallback(()=>{const r=T8t(t.columnGroupingModel??[]);e.current.setState(e=>{const t=e.columns?.orderedFields??[],n=e.pinnedColumns??{},o=N8t(t,r,n);return S({},e,{columnGrouping:S({},e.columnGrouping,{headerStructure:o})})})},[e,t.columnGroupingModel]),a=s.useCallback(t=>{e.current.caches.columnGrouping.lastColumnGroupingModel=t;const r=e.current.getPinnedColumns?.()??{},n=HKt(e),o=YKt(e),a=z8t(t??[]),i=T8t(t??[]),s=N8t(n,i,r),l=0===o.length?0:Math.max(...o.map(e=>i[e]?.length??0));e.current.setState(e=>S({},e,{columnGrouping:{lookup:a,unwrappedGroupingModel:i,headerStructure:s,maxDepth:l}}))},[e]);pYt(e,"columnIndexChange",o),pYt(e,"columnsChange",()=>{a(t.columnGroupingModel)}),pYt(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),s.useEffect(()=>{t.columnGroupingModel!==e.current.caches.columnGrouping.lastColumnGroupingModel&&a(t.columnGroupingModel)},[e,a,t.columnGroupingModel])})(e,r),s8t(e,r),((e,t)=>{const r=MJt(e,"useGridFocus"),n=s.useRef(null),o=null!==e.current.rootElementRef.current,a=s.useCallback((t,r)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),r)},[e]),i=s.useCallback((t,n)=>{const o=XXt(e);o?.id===t&&o?.field===n||(e.current.setState(e=>(r.debug(`Focusing on cell with id=${t} and field=${n}`),S({},e,{tabIndex:{cell:{id:t,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:t,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.getRow(t)&&(o&&a(o,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,n))))},[e,r,a]),l=s.useCallback((t,n={})=>{const o=XXt(e);a(o,n),e.current.setState(e=>(r.debug(`Focusing on column header with colIndex=${t}`),S({},e,{tabIndex:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))},[e,r,a]),c=s.useCallback((t,n={})=>{const o=XXt(e);a(o,n),e.current.setState(e=>(r.debug(`Focusing on column header filter with colIndex=${t}`),S({},e,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null}})))},[e,r,a]),u=s.useCallback((t,r,n={})=>{const o=XXt(e);o&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(o.id,o.field),n),e.current.setState(e=>S({},e,{tabIndex:{columnGroupHeader:{field:t,depth:r},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:t,depth:r},columnHeader:null,columnHeaderFilter:null,cell:null}}))},[e]),d=s.useCallback(()=>eQt(e),[e]),p=s.useCallback((r,n,o)=>{let a=e.current.getColumnIndex(n);const i=GKt(e),s=OJt(e,(t.pagination,t.paginationMode)),l=eKt(e),c=[].concat(l.top||[],s.rows,l.bottom||[]);let u=c.findIndex(e=>e.id===r);"right"===o?a+=1:"left"===o?a-=1:u+=1,a>=i.length?(u+=1,u<c.length&&(a=0)):a<0&&(u-=1,u>=0&&(a=i.length-1)),u=vKt(u,0,c.length-1);const d=c[u];if(!d)return;const p=e.current.unstable_getCellColSpanInfo(d.id,a);p&&p.spannedByColSpan&&("left"===o||"below"===o?a=p.leftVisibleCellIndex:"right"===o&&(a=p.rightVisibleCellIndex)),a=vKt(a,0,i.length-1);const h=i[a];e.current.setCellFocus(d.id,h.field)},[e,t.pagination,t.paginationMode]),h=s.useCallback(({id:t,field:r})=>{e.current.setCellFocus(t,r)},[e]),f=s.useCallback((t,r)=>{"Enter"===r.key||"Tab"===r.key||"Shift"===r.key||bZt(r.key)||e.current.setCellFocus(t.id,t.field)},[e]),m=s.useCallback(({field:t},r)=>{r.target===r.currentTarget&&e.current.setColumnHeaderFocus(t,r)},[e]),v=s.useCallback(({fields:t,depth:r},n)=>{if(n.target!==n.currentTarget)return;const o=eQt(e);null!==o&&o.depth===r&&t.includes(o.field)||e.current.setColumnGroupHeaderFocus(t[0],r,n)},[e]),y=s.useCallback((t,n)=>{n.relatedTarget?.getAttribute("class")?.includes(nYt.columnHeader)||(r.debug("Clearing focus"),e.current.setState(e=>S({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[r,e]),g=s.useCallback(e=>{n.current=e},[]),x=s.useCallback(t=>{const r=n.current;n.current=null;const o=XXt(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:t,cell:r}))return;if(!o)return void(r&&e.current.setCellFocus(r.id,r.field));if(r?.id===o.id&&r?.field===o.field)return;const i=e.current.getCellElement(o.id,o.field);i?.contains(t.target)||(r?e.current.setCellFocus(r.id,r.field):(e.current.setState(e=>S({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),a(o,t)))},[e,a]),b=s.useCallback(t=>{if("view"===t.cellMode)return;const r=XXt(e);r?.id===t.id&&r?.field===t.field||e.current.setCellFocus(t.id,t.field)},[e]),k=s.useCallback(()=>{const r=XXt(e);if(r&&!e.current.getRow(r.id)){const n=r.id;let o=null;if(void 0!==n){const r=e.current.getRowElement(n),a=r?.dataset.rowindex?Number(r?.dataset.rowindex):0,i=OJt(e,(t.pagination,t.paginationMode)),s=i.rows[vKt(a,0,i.rows.length-1)];o=s?.id??null}e.current.setState(e=>S({},e,{focus:{cell:null===o?null:{id:o,field:r.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),w=Ni(()=>{const r=XXt(e);if(!r)return;const n=OJt(e,(t.pagination,t.paginationMode));if(n.rows.find(e=>e.id===r.id)||0===n.rows.length)return;const o=GKt(e);e.current.setState(e=>S({},e,{tabIndex:{cell:{id:n.rows[0].id,field:o[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),_={moveFocusToRelativeCell:p,setColumnGroupHeaderFocus:u,getColumnGroupHeaderFocus:d};CJt(e,{setCellFocus:i,setColumnHeaderFocus:l,setColumnHeaderFilterFocus:c},"public"),CJt(e,_,"private"),s.useEffect(()=>{const t=Oi(e.current.rootElementRef.current);return t.addEventListener("mouseup",x),()=>{t.removeEventListener("mouseup",x)}},[e,o,x]),pYt(e,"columnHeaderBlur",y),pYt(e,"cellDoubleClick",h),pYt(e,"cellMouseDown",g),pYt(e,"cellKeyDown",f),pYt(e,"cellModeChange",b),pYt(e,"columnHeaderFocus",m),pYt(e,"columnGroupHeaderFocus",v),pYt(e,"rowsSet",k),pYt(e,"paginationModelChange",w)})(e,r),((e,t)=>{const r=MJt(e,"useGridPreferencesPanel"),n=s.useCallback(()=>{e.current.setState(t=>{if(!t.preferencePanel.open)return t;r.debug("Hiding Preferences Panel");const n=N1t(e);return e.current.publishEvent("preferencePanelClose",{openedPanelValue:n.openedPanelValue}),S({},t,{preferencePanel:{open:!1}})})},[e,r]),o=s.useCallback((t,n,o)=>{r.debug("Opening Preferences Panel"),e.current.setState(e=>S({},e,{preferencePanel:S({},e.preferencePanel,{open:!0,openedPanelValue:t,panelId:n,labelId:o})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t})},[r,e]);CJt(e,{showPreferences:o,hidePreferences:n},"public");const a=s.useCallback((r,n)=>{const o=N1t(e);return!n.exportOnlyDirtyModels||null!=t.initialState?.preferencePanel||o.open?S({},r,{preferencePanel:o}):r},[e,t.initialState?.preferencePanel]),i=s.useCallback((t,r)=>{const n=r.stateToRestore.preferencePanel;return null!=n&&e.current.setState(e=>S({},e,{preferencePanel:n})),t},[e]);x6t(e,"exportState",a),x6t(e,"restoreState",i)})(e,r),((e,r)=>{const n=MJt(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:r.filterModel,propOnChange:r.onFilterModelChange,stateSelector:kXt,changeEvent:"filterModelChange"});const o=s.useCallback(()=>{e.current.setState(t=>{const r=kXt(e),n=e.current.getFilterState(r),o=S({},t,{filter:S({},t.filter,n)});return S({},o,{visibleRowsLookup:W6t(e,o)})}),e.current.publishEvent("filteredRowsSet")},[e]),a=s.useCallback((e,t)=>null==t||!1===t.filterable||r.disableColumnFilter?e:[...e,"columnMenuFilterItem"],[r.disableColumnFilter]),i=s.useCallback(t=>{const r=kXt(e),n=[...r.items],o=n.findIndex(e=>e.id===t.id);-1===o?n.push(t):n[o]=t,e.current.setFilterModel(S({},r,{items:n}),"upsertFilterItem")},[e]),l=s.useCallback(t=>{const r=kXt(e),n=[...r.items];t.forEach(e=>{const t=n.findIndex(t=>t.id===e.id);-1===t?n.push(e):n[t]=e}),e.current.setFilterModel(S({},r,{items:n}),"upsertFilterItems")},[e]),c=s.useCallback(t=>{const r=kXt(e),n=r.items.filter(e=>e.id!==t.id);n.length!==r.items.length&&e.current.setFilterModel(S({},r,{items:n}),"deleteFilterItem")},[e]),u=s.useCallback((t,o,a)=>{if(n.debug("Displaying filter panel"),t){const n=kXt(e),o=n.items.filter(t=>{if(void 0!==t.value)return!Array.isArray(t.value)||0!==t.value.length;const r=e.current.getColumn(t.field),n=r.filterOperators?.find(e=>e.value===t.operator);return!(void 0===n?.requiresFilterValue||n?.requiresFilterValue)});let a;const i=o.find(e=>e.field===t),s=e.current.getColumn(t);a=i?o:r.disableMultipleColumnsFiltering?[oZt({field:t,operator:s.filterOperators[0].value},e)]:[...o,oZt({field:t,operator:s.filterOperators[0].value},e)],e.current.setFilterModel(S({},n,{items:a}))}e.current.showPreferences(z1t.filters,o,a)},[e,n,r.disableMultipleColumnsFiltering]),d=s.useCallback(()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()},[e,n]),p=s.useCallback(t=>{const r=kXt(e);r.logicOperator!==t&&e.current.setFilterModel(S({},r,{logicOperator:t}),"changeLogicOperator")},[e]),h=s.useCallback(t=>{const r=kXt(e);n5t(r.quickFilterValues,t)||e.current.setFilterModel(S({},r,{quickFilterValues:[...t]}))},[e]),f=s.useCallback((t,o)=>{kXt(e)!==t&&(n.debug("Setting filter model"),e.current.updateControlState("filter",iZt(t,r.disableMultipleColumnsFiltering,e),o),e.current.unstable_applyFilters())},[e,n,r.disableMultipleColumnsFiltering]),m=s.useCallback(t=>{const n=aZt(t,r.disableMultipleColumnsFiltering,e),o="client"===r.filterMode?pZt(n,e,r.disableEval):null;return S({},e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:o,filterModel:n??RKt()}),{filterModel:n})},[r.disableMultipleColumnsFiltering,r.filterMode,r.disableEval,e]),v={setFilterLogicOperator:p,unstable_applyFilters:o,deleteFilterItem:c,upsertFilterItem:i,upsertFilterItems:l,setFilterModel:f,showFilterPanel:u,hideFilterPanel:d,setQuickFilterValues:h,ignoreDiacritics:r.ignoreDiacritics,getFilterState:m};CJt(e,v,"public");const y=s.useCallback((t,n)=>{const o=kXt(e);return o.items.forEach(e=>{delete e.fromInput}),n.exportOnlyDirtyModels&&null==r.filterModel&&null==r.initialState?.filter?.filterModel&&n5t(o,RKt())?t:S({},t,{filter:{filterModel:o}})},[e,r.filterModel,r.initialState?.filter?.filterModel]),g=s.useCallback((t,n)=>{const o=n.stateToRestore.filter?.filterModel;return null==o?t:(e.current.updateControlState("filter",iZt(o,r.disableMultipleColumnsFiltering,e),"restoreState"),S({},t,{callbacks:[...t.callbacks,e.current.unstable_applyFilters]}))},[e,r.disableMultipleColumnsFiltering]),x=s.useCallback((e,n)=>{if(n===z1t.filters){const e=r.slots.filterPanel;return t.jsx(e,S({},r.slotProps?.filterPanel))}return e},[r.slots.filterPanel,r.slotProps?.filterPanel]),{getRowId:b}=r,k=_s(U6t),w=s.useCallback(t=>{if("client"!==r.filterMode||!t.isRowMatchingFilters||!t.filterModel.items.length&&!t.filterModel.quickFilterValues?.length)return NKt;const n=qYt(e),o={},{isRowMatchingFilters:a}=t,i={},s={passingFilterItems:null,passingQuickFilterValues:null},l=k.current(e.current.state.rows.dataRowIdToModelLookup);for(let r=0;r<l.length;r+=1){const n=l[r],c=b?b(n):n.id;a(n,void 0,s);const u=fZt([s.passingFilterItems],[s.passingQuickFilterValues],t.filterModel,e,i);u||(o[c]=u)}const c="auto-generated-group-footer-root";return n[c]&&(o[c]=!0),{filteredRowsLookup:o,filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}}},[e,r.filterMode,b,k]);x6t(e,"columnMenu",a),x6t(e,"exportState",y),x6t(e,"restoreState",g),x6t(e,"preferencePanel",x),w6t(e,_6t,"filtering",w),w6t(e,_6t,"visibleRowsLookupCreation",q6t);const _=s.useCallback(()=>{n.debug("onColUpdated - GridColumns changed, applying filters");const t=kXt(e),r=$Kt(e),o=t.items.filter(e=>e.field&&r[e.field]);o.length<t.items.length&&e.current.setFilterModel(S({},t,{items:o}))},[e,n]),C=s.useCallback(t=>{"filtering"===t&&e.current.unstable_applyFilters()},[e]),M=s.useCallback(()=>{e.current.setState(t=>S({},t,{visibleRowsLookup:W6t(e,t)}))},[e]);pYt(e,"rowsSet",o),pYt(e,"columnsChange",_),pYt(e,"activeStrategyProcessorChange",C),pYt(e,"rowExpansionChange",M),pYt(e,"columnVisibilityModelChange",()=>{const t=kXt(e);t.quickFilterValues?.length&&dZt(t)&&o()}),DJt(()=>{o()}),po(()=>{void 0!==r.filterModel&&e.current.setFilterModel(r.filterModel)},[e,n,r.filterModel])})(e,r),((e,t)=>{const r=MJt(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:yXt,changeEvent:"sortModelChange"});const n=s.useCallback((t,r)=>{const n=yXt(e),o=n.findIndex(e=>e.field===t);let a=[...n];return o>-1?null==r?.sort?a.splice(o,1):a.splice(o,1,r):a=[...n,r],a},[e]),o=s.useCallback((r,n)=>{const o=yXt(e).find(e=>e.field===r.field);if(o){const e=void 0===n?aKt(r.sortingOrder??t.sortingOrder,o.sort):n;return void 0===e?void 0:S({},o,{sort:e})}return{field:r.field,sort:void 0===n?aKt(r.sortingOrder??t.sortingOrder):n}},[e,t.sortingOrder]),a=s.useCallback((e,r)=>null==r||!1===r.sortable||t.disableColumnSorting?e:(r.sortingOrder||t.sortingOrder).some(e=>!!e)?[...e,"columnMenuSortItem"]:e,[t.sortingOrder,t.disableColumnSorting]),i=s.useCallback(()=>{e.current.setState(n=>{if("server"===t.sortingMode)return r.debug("Skipping sorting rows as sortingMode = server"),S({},n,{sorting:S({},n.sorting,{sortedRows:qZt(UYt(e),AZt,!1)})});const o=yXt(e),a=oKt(o,e),i=e.current.applyStrategyProcessor("sorting",{sortRowList:a});return S({},n,{sorting:S({},n.sorting,{sortedRows:i})})}),e.current.publishEvent("sortedRowsSet")},[e,r,t.sortingMode]),l=s.useCallback(n=>{yXt(e)!==n&&(r.debug("Setting sort model"),e.current.setState(nKt(n,t.disableMultipleColumnsSorting)),e.current.applySorting())},[e,r,t.disableMultipleColumnsSorting]),c=s.useCallback((r,a,i)=>{const s=e.current.getColumn(r),l=o(s,a);let c;c=!i||t.disableMultipleColumnsSorting?null==l?.sort?[]:[l]:n(s.field,l),e.current.setSortModel(c)},[e,n,o,t.disableMultipleColumnsSorting]),u=s.useCallback(()=>yXt(e),[e]),d=s.useCallback(()=>vXt(e).map(e=>e.model),[e]),p=s.useCallback(()=>mXt(e),[e]),h=s.useCallback(t=>e.current.getSortedRowIds()[t],[e]);CJt(e,{getSortModel:u,getSortedRows:d,getSortedRowIds:p,getRowIdFromRowIndex:h,setSortModel:l,sortColumn:c,applySorting:i},"public");const f=s.useCallback((r,n)=>{const o=yXt(e);return!n.exportOnlyDirtyModels||null!=t.sortModel||null!=t.initialState?.sorting?.sortModel||o.length>0?S({},r,{sorting:{sortModel:o}}):r},[e,t.sortModel,t.initialState?.sorting?.sortModel]),m=s.useCallback((r,n)=>{const o=n.stateToRestore.sorting?.sortModel;return null==o?r:(e.current.setState(nKt(o,t.disableMultipleColumnsSorting)),S({},r,{callbacks:[...r.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),v=s.useCallback(t=>{const r=UYt(e),n=r[AZt],o=t.sortRowList?t.sortRowList(n.children.map(e=>r[e])):[...n.children];return null!=n.footerId&&o.push(n.footerId),o},[e]);x6t(e,"exportState",f),x6t(e,"restoreState",m),w6t(e,_6t,"sorting",v);const y=s.useCallback(({field:e,colDef:r},n)=>{if(!r.sortable||t.disableColumnSorting)return;const o="always"===t.multipleColumnsSortingMode||n.shiftKey||n.metaKey||n.ctrlKey;c(e,void 0,o)},[c,t.disableColumnSorting,t.multipleColumnsSortingMode]),g=s.useCallback(({field:e,colDef:r},n)=>{r.sortable&&!t.disableColumnSorting&&("Enter"!==n.key||n.ctrlKey||n.metaKey||c(e,void 0,"always"===t.multipleColumnsSortingMode||n.shiftKey))},[c,t.disableColumnSorting,t.multipleColumnsSortingMode]),x=s.useCallback(()=>{const t=yXt(e),r=$Kt(e);if(t.length>0){const n=t.filter(e=>r[e.field]);n.length<t.length&&e.current.setSortModel(n)}},[e]),b=s.useCallback(t=>{"sorting"===t&&e.current.applySorting()},[e]);x6t(e,"columnMenu",a),pYt(e,"columnHeaderClick",y),pYt(e,"columnHeaderKeyDown",g),pYt(e,"rowsSet",e.current.applySorting),pYt(e,"columnsChange",x),pYt(e,"activeStrategyProcessorChange",b),DJt(()=>{e.current.applySorting()}),po(()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])})(e,r),((e,t)=>{const r=MJt(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:OYt,changeEvent:"densityChange"});const n=Ni(t=>{OYt(e)!==t&&(r.debug(`Set grid density to ${t}`),e.current.setState(e=>S({},e,{density:t})))});CJt(e,{setDensity:n},"public");const o=s.useCallback((r,n)=>{const o=OYt(e);return n.exportOnlyDirtyModels&&null==t.density&&null==t.initialState?.density?r:S({},r,{density:o})},[e,t.density,t.initialState?.density]),a=s.useCallback((t,r)=>{const n=r.stateToRestore?.density?r.stateToRestore.density:OYt(e);return e.current.setState(e=>S({},e,{density:n})),t},[e]);x6t(e,"exportState",o),x6t(e,"restoreState",a),s.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])})(e,r),O7t(e,r),q8t(e,r),J6t(e,r),((e,t)=>{const{getRowHeight:r,getRowSpacing:n,getEstimatedRowHeight:o}=t,a=e.current.caches.rowsMeta.heights,i=s.useRef(-1),l=s.useRef(!1),c=s.useRef(!1),u=SYt(e,PYt),d=PJt(e),p=SYt(e,eKt),h=SYt(e,BGt),f=s.useCallback(t=>{const a=IGt(e).rowHeight,i=e.current.getRowHeightEntry(t.id);if(r){const e=r(S({},t,{densityFactor:u}));if("auto"===e){if(i.needsFirstMeasurement){const e=o?o(S({},t,{densityFactor:u})):a;i.content=e??a}l.current=!0,i.autoHeight=!0}else i.content=KZt(e,a,XZt),i.needsFirstMeasurement=!1,i.autoHeight=!1}else i.content=a,i.needsFirstMeasurement=!1;if(n){const r=e.current.getRowIndexRelativeToVisibleRows(t.id),o=n(S({},t,{isFirstVisible:0===r,isLastVisible:r===d.rows.length-1,indexRelativeToCurrentPage:r}));i.spacingTop=o.top??0,i.spacingBottom=o.bottom??0}else i.spacingTop=0,i.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",i,t),i},[e,d.rows,r,o,h,n,u]),m=s.useCallback(()=>{l.current=!1;const t=p.top.reduce((e,t)=>{const r=f(t);return e+r.content+r.spacingTop+r.spacingBottom+r.detail},0),r=p.bottom.reduce((e,t)=>{const r=f(t);return e+r.content+r.spacingTop+r.spacingBottom+r.detail},0),n=[],o=d.rows.reduce((e,t)=>{n.push(e);const r=f(t);return e+(r.content+r.spacingTop+r.spacingBottom+r.detail)},0);l.current||(i.current=1/0);const a=t!==e.current.state.rowsMeta.pinnedTopRowsTotalHeight||r!==e.current.state.rowsMeta.pinnedBottomRowsTotalHeight||o!==e.current.state.rowsMeta.currentPageTotalHeight,s={currentPageTotalHeight:o,positions:n,pinnedTopRowsTotalHeight:t,pinnedBottomRowsTotalHeight:r};e.current.setState(e=>S({},e,{rowsMeta:s})),a&&e.current.updateDimensions(),c.current=!0},[e,p,d.rows,f]),v=_s(()=>new D8t(t=>{for(let r=0;r<t.length;r+=1){const n=t[r],o=n.borderBoxSize&&n.borderBoxSize.length>0?n.borderBoxSize[0].blockSize:n.contentRect.height,a=n.target.__mui_id,i=HJt(e)?.id;if(i===a&&0===o)return;e.current.unstable_storeRowHeightMeasurement(a,o)}c.current||requestAnimationFrame(()=>{e.current.requestPipeProcessorsApplication("rowHeight")})})).current;b6t(e,"rowHeight",m),po(()=>{m()},[m]);const y={unstable_getRowHeight:e=>a.get(e)?.content??h,unstable_setLastMeasuredRowIndex:e=>{l.current&&e>i.current&&(i.current=e)},unstable_storeRowHeightMeasurement:(t,r)=>{const n=e.current.getRowHeightEntry(t),o=n.content!==r;n.needsFirstMeasurement=!1,n.content=r,c.current&&=!o},resetRowHeights:()=>{a.clear(),m()}},g={hydrateRowsMeta:m,observeRowHeight:(e,t)=>(e.__mui_id=t,v.observe(e),()=>v.unobserve(e)),rowHasAutoHeight:e=>a.get(e)?.autoHeight??!1,getRowHeightEntry:e=>{let t=a.get(e);return void 0===t&&(t={content:h,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},a.set(e,t)),t},getLastMeasuredRowIndex:()=>i.current};CJt(e,y,"public"),CJt(e,g,"private")})(e,r),B9t(e,r),((e,t)=>{const r=Vo(),n=MJt(e,"useGridScroll"),o=e.current.columnHeadersContainerRef,a=e.current.virtualScrollerRef,i=SYt(e,DXt),l=s.useCallback(r=>{const o=IGt(e),s=VYt(e),l=GKt(e);if(null!=r.rowIndex&&0===s||0===l.length)return!1;n.debug(`Scrolling to cell at row ${r.rowIndex}, col: ${r.colIndex} `);let c={};if(void 0!==r.colIndex){const t=JKt(e);let n;if(void 0!==r.rowIndex){const t=i[r.rowIndex]?.id,o=e.current.unstable_getCellColSpanInfo(t,r.colIndex);o&&!o.spannedByColSpan&&(n=o.cellProps.width)}void 0===n&&(n=l[r.colIndex].computedWidth),c.left=v8t({containerSize:o.viewportOuterSize.width,scrollPosition:Math.abs(a.current.scrollLeft),elementSize:n,elementOffset:t[r.colIndex]})}if(void 0!==r.rowIndex){const n=fJt(e),i=fQt(e),s=mQt(e),l=t.pagination?r.rowIndex-i*s:r.rowIndex,u=n.positions[l+1]?n.positions[l+1]-n.positions[l]:n.currentPageTotalHeight-n.positions[l];c.top=v8t({containerSize:o.viewportInnerSize.height,scrollPosition:a.current.scrollTop,elementSize:u,elementOffset:n.positions[l]})}return c=e.current.unstable_applyPipeProcessors("scrollToIndexes",c,r),(void 0!==typeof c.left||void 0!==typeof c.top)&&(e.current.scroll(c),!0)},[n,e,a,t.pagination,i]),c=s.useCallback(e=>{if(a.current&&void 0!==e.left&&o.current){const t=r?-1:1;o.current.scrollLeft=e.left,a.current.scrollLeft=t*e.left,n.debug(`Scrolling left: ${e.left}`)}a.current&&void 0!==e.top&&(a.current.scrollTop=e.top,n.debug(`Scrolling top: ${e.top}`)),n.debug("Scrolling, updating container, and viewport")},[a,r,o,n]),u=s.useCallback(()=>a?.current?{top:a.current.scrollTop,left:a.current.scrollLeft}:{top:0,left:0},[a]);CJt(e,{scroll:c,scrollToIndexes:l,getScrollPosition:u},"public")})(e,r),((e,t)=>{const r=SYt(e,GKt),n=PJt(e),o="client"===t.rowsLoadingMode&&!!t.onRowsScrollEnd,a=Ni(()=>{const t=e.current.getViewportPageSize(),o={visibleColumns:r,viewportPageSize:t,visibleRowsCount:n.rows.length};e.current.publishEvent("rowsScrollEnd",o)});fYt(e,"rowsScrollEnd",t.onRowsScrollEnd),pYt(e,"rowsScrollEndIntersection",xKt(o,a))})(e,r),((e,t)=>{const r=SYt(e,yXt),n=SYt(e,kXt),o=s.useRef({firstRowToRender:0,lastRowToRender:0}),a="server"!==t.rowsLoadingMode,i=s.useCallback(i=>{if(a)return;const s={firstRowToRender:i.firstRowIndex,lastRowToRender:i.lastRowIndex,sortModel:r,filterModel:n};if(o.current.firstRowToRender!==i.firstRowIndex||o.current.lastRowToRender!==i.lastRowIndex){if(o.current={firstRowToRender:i.firstRowIndex,lastRowToRender:i.lastRowIndex},0===r.length&&0===n.items.length){const r=OJt(e,(t.pagination,t.paginationMode)),n=H9t({apiRef:e,visibleRows:r.rows,range:{firstRowIndex:i.firstRowIndex,lastRowIndex:i.lastRowIndex}});if(!n)return;s.firstRowToRender=n.firstRowIndex,s.lastRowToRender=n.lastRowIndex}e.current.publishEvent("fetchRows",s)}},[e,a,t.pagination,t.paginationMode,r,n]),l=s.useCallback(t=>{if(a)return;e.current.requestPipeProcessorsApplication("hydrateRows");const r=RJt(e),o={firstRowToRender:r.firstRowIndex,lastRowToRender:r.lastRowIndex,sortModel:t,filterModel:n};e.current.publishEvent("fetchRows",o)},[e,a,n]),c=s.useCallback(t=>{if(a)return;e.current.requestPipeProcessorsApplication("hydrateRows");const n=RJt(e),o={firstRowToRender:n.firstRowIndex,lastRowToRender:n.lastRowIndex,sortModel:r,filterModel:t};e.current.publishEvent("fetchRows",o)},[e,a,r]);pYt(e,"renderedRowsIntervalChange",i),pYt(e,"sortModelChange",l),pYt(e,"filterModelChange",c),fYt(e,"fetchRows",t.onFetchRows)})(e,r),((e,t)=>{const r=s.useCallback(()=>{e.current.setStrategyAvailability(k6t.DataSource,n7t.LazyLoading,t.dataSource&&t.lazyLoading?()=>!0:()=>!1)},[e,t.lazyLoading,t.dataSource]),[n,o]=s.useState(!1),a=s.useRef(ter),i=s.useRef(0),l=s.useRef(null),c=s.useRef(!1),u=s.useRef(null),d=s.useCallback(t=>{e.current.dataSource.fetchRows(AZt,t)},[e]),p=s.useMemo(()=>Di(d,0),[d]),h=s.useCallback(t=>{if("number"!=typeof t.start)return t;const r=dQt(e);return S({},t,{start:t.start-t.start%r.pageSize,end:t.end+r.pageSize-t.end%r.pageSize-1})},[e]),f=s.useCallback(()=>{e.current.setLoading(!0),e.current.dataSource.cache.clear(),c.current=!0,i.current=0;const t=dQt(e),r=yXt(e),n=kXt(e),o={start:0,end:t.pageSize-1,sortModel:r,filterModel:n};d(o)},[e,d]),m=s.useCallback((t,r)=>{if(t===eer.VIEWPORT&&r===eer.SCROLL_END)return void f();const n=[...e.current.state.rows.tree[AZt].children],o=e.current.state.pagination.rowCount;n.length>o&&f()},[e,f]),v=s.useCallback(()=>{const t=e.current.state.rows.tree,r=t[AZt],n=[...r.children],o=e.current.state.pagination.rowCount,i=n.length;if(0===i)return;const s=h({start:a.current.firstRowToRender,end:a.current.lastRowToRender});let c=!1;const d=0===a.current.firstRowToRender&&0===a.current.lastRowToRender;for(let e=0;e<i&&!d;e+=1){if(s.start<=e&&e<=s.end||"skeletonRow"===t[n[e]]?.type||t[n[e]]?.id===u.current)continue;const r=t[n[e]].id,o={type:"skeletonRow",id:r,parent:AZt,depth:0};t[r]=o,c=!0}if(l.current===eer.VIEWPORT)for(let e=0;e<o-i;e+=1){const r=rer(e+i);n.push(r);const o={type:"skeletonRow",id:r,parent:AZt,depth:0};t[r]=o,c=!0}c&&(t[AZt]=S({},r,{children:n}),e.current.setState(e=>S({},e,{rows:S({},e.rows,{tree:t})}),"addSkeletonRows"))},[e,h]),y=s.useCallback(e=>{const t=-1===e?eer.SCROLL_END:eer.VIEWPORT;null!==l.current&&m(l.current,t),l.current!==t&&(l.current=t)},[m]),g=s.useCallback(t=>{if("error"in t)return;const{response:r,fetchParams:n}=t,o=e.current.state.pagination.rowCount,a=e.current.state.rows.tree,i=e.current.state.rows.dataRowIdToModelLookup;if(void 0===r.rowCount&&void 0!==o||e.current.setRowCount(void 0===r.rowCount?-1:r.rowCount),c.current&&0===t.fetchParams.start)e.current.scroll({top:0}),e.current.setRows(r.rows);else{const t=a[AZt],o=[...t.children],s=EXt(e),l="string"==typeof n.start?Math.max(s.indexOf(n.start),0):n.start;let c=0;r.rows.forEach(t=>{const r=_Qt(e,t);if(a[r]||i[r]){const e=o.indexOf(r);if(-1!==e){const t=rer(e);o[e]=t,a[t]={type:"skeletonRow",id:t,parent:AZt,depth:0}}delete a[r],delete i[r],c+=1}}),c>0&&(a[AZt]=S({},t,{children:o}),e.current.setState(e=>S({},e,{rows:S({},e.rows,{tree:a,dataRowIdToModelLookup:i})}))),e.current.unstable_replaceRows(l,r.rows)}c.current=!1,null===l.current&&y(e.current.state.pagination.rowCount),v(),e.current.setLoading(!1),e.current.unstable_applyPipeProcessors("processDataSourceRows",{params:t.fetchParams,response:r},!1),e.current.requestPipeProcessorsApplication("hydrateRows")},[e,y,v]),x=s.useCallback(()=>{c.current||null===l.current||(y(e.current.state.pagination.rowCount),v(),e.current.requestPipeProcessorsApplication("hydrateRows"))},[e,y,v]),b=Ni(()=>{if(c.current||l.current!==eer.SCROLL_END)return;const t=RJt(e);if(i.current>=t.lastRowIndex)return;i.current=t.lastRowIndex;const r=dQt(e),n=yXt(e),o=kXt(e),a={start:t.lastRowIndex,end:t.lastRowIndex+r.pageSize-1,sortModel:n,filterModel:o};e.current.setLoading(!0),d(h(a))}),k=s.useCallback(t=>{if(c.current)return;const r=yXt(e),n=kXt(e),o={start:t.firstRowIndex,end:t.lastRowIndex-1,sortModel:r,filterModel:n};if(a.current.firstRowToRender===t.firstRowIndex&&a.current.lastRowToRender===t.lastRowIndex)return;a.current={firstRowToRender:t.firstRowIndex,lastRowToRender:t.lastRowIndex};const i=OJt(e),s=H9t({apiRef:e,visibleRows:i.rows,range:{firstRowIndex:t.firstRowIndex,lastRowIndex:t.lastRowIndex-1}});s&&(o.start=s.firstRowIndex,o.end=s.lastRowIndex,d(h(o)))},[e,h,d]),w=s.useMemo(()=>y8t(k,t.lazyLoadingRequestThrottleMs),[t.lazyLoadingRequestThrottleMs,k]);s.useEffect(()=>()=>{w.clear()},[w]);const _=s.useCallback(t=>{c.current=!0,w.clear(),i.current=0;const r=dQt(e),n=kXt(e),o={start:0,end:r.pageSize-1,sortModel:t,filterModel:n};e.current.setLoading(!0),p(o)},[e,p,w]),C=s.useCallback(t=>{c.current=!0,w.clear(),i.current=0;const r=dQt(e),n=yXt(e),o={start:0,end:r.pageSize-1,sortModel:n,filterModel:t};e.current.setLoading(!0),p(o)},[e,p,w]),M=s.useCallback(e=>{u.current=e.id},[]),D=s.useCallback(()=>{u.current=null},[]),O=s.useCallback(()=>{o(e.current.getActiveStrategy(k6t.DataSource)===n7t.LazyLoading)},[e]);w6t(e,n7t.LazyLoading,"dataSourceRowsUpdate",g),pYt(e,"strategyAvailabilityChange",O),pYt(e,"rowCountChange",xKt(n,x)),pYt(e,"rowsScrollEndIntersection",xKt(n,b)),pYt(e,"renderedRowsIntervalChange",xKt(n,w)),pYt(e,"sortModelChange",xKt(n,_)),pYt(e,"filterModelChange",xKt(n,C)),pYt(e,"rowDragStart",xKt(n,M)),pYt(e,"rowDragEnd",xKt(n,D)),s.useEffect(()=>{r()},[r])})(e,r),oer(e,r),(e=>{const t=MJt(e,"useGridColumnMenu"),r=s.useCallback(r=>{const n=d1t(e),o=r;(!0!==n.open||o!==n.field)&&(e.current.setState(e=>e.columnMenu.open&&e.columnMenu.field===r?e:(t.debug("Opening Column Menu"),S({},e,{columnMenu:{open:!0,field:r}}))),e.current.hidePreferences())},[e,t]),n=s.useCallback(()=>{const r=d1t(e);if(r.field){const t=$Kt(e),n=WKt(e),o=HKt(e);let a=r.field;if(t[a]||(a=o[0]),!1===n[a]){const e=o.filter(e=>e===a||!1!==n[e]),t=e.indexOf(a);a=e[t+1]||e[t-1]}e.current.setColumnHeaderFocus(a)}const n={open:!1,field:void 0};(n.open!==r.open||n.field!==r.field)&&e.current.setState(e=>(t.debug("Hiding Column Menu"),S({},e,{columnMenu:n})))},[e,t]),o=s.useCallback(o=>{t.debug("Toggle Column Menu");const a=d1t(e);a.open&&a.field===o?n():r(o)},[e,t,r,n]);CJt(e,{showColumnMenu:r,hideColumnMenu:n,toggleColumnMenu:o},"public"),pYt(e,"columnResizeStart",n),pYt(e,"virtualScrollerWheel",e.current.hideColumnMenu),pYt(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(e),B6t(e,r),H6t(e,r),N6t(e,r),_8t(e,r),function(e,t){fYt(e,"columnHeaderClick",t.onColumnHeaderClick),fYt(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),fYt(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),fYt(e,"columnHeaderOver",t.onColumnHeaderOver),fYt(e,"columnHeaderOut",t.onColumnHeaderOut),fYt(e,"columnHeaderEnter",t.onColumnHeaderEnter),fYt(e,"columnHeaderLeave",t.onColumnHeaderLeave),fYt(e,"cellClick",t.onCellClick),fYt(e,"cellDoubleClick",t.onCellDoubleClick),fYt(e,"cellKeyDown",t.onCellKeyDown),fYt(e,"preferencePanelClose",t.onPreferencePanelClose),fYt(e,"preferencePanelOpen",t.onPreferencePanelOpen),fYt(e,"menuOpen",t.onMenuOpen),fYt(e,"menuClose",t.onMenuClose),fYt(e,"rowDoubleClick",t.onRowDoubleClick),fYt(e,"rowClick",t.onRowClick),fYt(e,"stateChange",t.onStateChange)}(e,r),(e=>{const t=s.useCallback((t={})=>e.current.unstable_applyPipeProcessors("exportState",{},t),[e]),r=s.useCallback(t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach(e=>{e()})},[e]);CJt(e,{exportState:t,restoreState:r},"public")})(e),function(e,t){const r=r=>{e.current.setState(e=>S({},e,{virtualization:S({},e.virtualization,{enabled:r,enabledForColumns:r,enabledForRows:r&&!t.autoHeight})}))},n={unstable_setVirtualization:r,unstable_setColumnVirtualization:t=>{e.current.setState(e=>S({},e,{virtualization:S({},e.virtualization,{enabledForColumns:t})}))}};CJt(e,n,"public"),s.useEffect(()=>{r(!t.disableVirtualization)},[t.disableVirtualization,t.autoHeight])}(e,r),((e,t)=>{const{api:r,strategyProcessor:n,events:o,setStrategyAvailability:a}=X9t(e,t,J9t);CJt(e,r.public,"public"),CJt(e,r.private,"private"),w6t(e,n.strategyName,n.group,n.processor),Object.entries(o).forEach(([t,r])=>{pYt(e,t,r)}),s.useEffect(()=>{a()},[a])})(e,r),function(e,t){const r=()=>{e.current.setState(t=>t.listViewColumn?S({},t,{listViewColumn:S({},t.listViewColumn,{computedWidth:t7t(e)})}):t)},n=s.useRef(null);pYt(e,"viewportInnerSizeChange",e=>{n.current!==e.width&&(n.current=e.width,r())}),pYt(e,"columnVisibilityModelChange",r),po(()=>{const r=t.listViewColumn;r&&e.current.setState(t=>S({},t,{listViewColumn:S({},r,{computedWidth:t7t(e)})}))},[e,t.listViewColumn]),s.useEffect(()=>{t.listView&&!t.listViewColumn&&lat(["MUI X: The `listViewColumn` prop must be set if `listView` is enabled.",'To fix, pass a column definition to the `listViewColumn` prop, e.g. `{ field: "example", renderCell: (params) => <div>{params.row.id}</div> }`.',"For more details, see https://mui.com/x/react-data-grid/list-view/"])},[t.listView,t.listViewColumn])}(e,r),s.useEffect(()=>{e.current.runAppliersForPendingProcessors()})},ier=S({},o4t,{columnMenuPinningItem:z7t}),ser=S({},a4t,{columnMenuPinningItem:{displayOrder:15}}),ler=QGt(function(e,r){return t.jsx(i4t,S({},e,{defaultSlots:ier,defaultSlotProps:ser,ref:r}))});"production"!==process.env.NODE_ENV&&(ler.displayName="GridProColumnMenu");const cer=["getColumnsToRender","getPinnedCellOffset","renderContext","leftRenderContext","rightRenderContext","pinnedColumns","visibleColumns","columnPositions"],uer=Object.create(null),der=e=>{const r=wJt(),{headerGroupingMaxDepth:n,hasOtherElementInTabSequence:o}=e,a=SYt(r,oQt),i=c7t(S({},e,{hasOtherElementInTabSequence:o||null!==a})),{getColumnsToRender:l,getPinnedCellOffset:c,renderContext:u,leftRenderContext:d,rightRenderContext:p,pinnedColumns:h,visibleColumns:f,columnPositions:m}=i,v=Hi(i,cer),y=s.useRef(null);r.current.register("private",{headerFiltersElementRef:y});const g=s.useRef(null),x=T7t(),b=(e=>{const{classes:t}=e;return s.useMemo(()=>ua({headerFilterRow:["headerFilterRow"]},rYt,t),[t])})(x),k=!x.headerFilters,w=SYt(r,kXt),_=SYt(r,LGt),C=SYt(r,qGt),M=SYt(r,GGt),D=SYt(r,KGt),O=SYt(r,JXt),P=s.useCallback(e=>{const t=w?.items.find(t=>t.field===e.field&&"isAnyOf"!==t.operator);if(null!=t)return t;const r=uer[e.field];if(null!=r)return r;const n=R4t(e);return uer[e.field]=n,n},[w]),E=r=>{const{renderedColumns:n,firstColumnToRender:o}=l(r),i=[];for(let s=0;s<n.length;s+=1){const l=n[s],u=o+s,d=O?.field===l.field,p=0===u,h=a?.field,f=h===l.field||p&&!e.hasOtherElementInTabSequence?0:-1,v="function"==typeof l.headerClassName?l.headerClassName({field:l.field,colDef:l}):l.headerClassName,y=P(l),b=r?.position,k=c(b,l.computedWidth,u,m,_,D),w=s,E=n.length,j=q5t(b,w),T=$5t(b,w,E,x.showColumnVerticalBorder,C);i.push(t.jsx(x.slots.headerFilterCell,S({colIndex:u,height:M,width:l.computedWidth,colDef:l,hasFocus:d,tabIndex:f,headerFilterMenuRef:g,headerClassName:v,"data-field":l.field,item:y,pinnedPosition:b,pinnedOffset:k,showLeftBorder:j,showRightBorder:T},x.slotProps?.headerFilterCell),`${l.field}-filter`))}return v.getFillers(r,i,0,!0)},j=()=>k?null:t.jsxs(l7t,{ref:y,className:b.headerFilterRow,role:"row","aria-rowindex":n+2,ownerState:x,children:[d&&E({position:tXt.LEFT,renderContext:d,maxLastColumn:d.lastColumnIndex}),E({renderContext:u,maxLastColumn:f.length-h.right.length}),p&&E({position:tXt.RIGHT,renderContext:p,maxLastColumn:p.lastColumnIndex})]});return"production"!==process.env.NODE_ENV&&(j.displayName="getColumnFiltersRow"),S({},v,{getColumnFiltersRow:j})},per=["style","className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],her=ii("div")({flex:1,backgroundColor:RYt.header.background.base}),fer=QGt(function(e,r){const{className:n,visibleColumns:o,sortColumnLookup:a,filterColumnLookup:i,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:u,headerGroupingMaxDepth:d,columnMenuState:p,columnVisibility:h,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:m}=e,v=Hi(e,per),{getInnerProps:y,getColumnHeadersRow:g,getColumnFiltersRow:x,getColumnGroupHeadersRows:b}=der({visibleColumns:o,sortColumnLookup:a,filterColumnLookup:i,columnHeaderTabIndexState:s,hasOtherElementInTabSequence:m,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:u,headerGroupingMaxDepth:d,columnMenuState:p,columnVisibility:h,columnGroupsHeaderStructure:f});return t.jsxs(p7t,S({className:n},v,y(),{ref:r,children:[b(),g(),x(),t.jsx(her,{})]}))});"production"!==process.env.NODE_ENV&&(fer.displayName="GridColumnHeaders"),"production"!==process.env.NODE_ENV&&(fer.propTypes={columnGroupHeaderFocus:Vt.exports.shape({depth:Vt.exports.number.isRequired,field:Vt.exports.string.isRequired}),columnGroupHeaderTabIndexState:Vt.exports.shape({depth:Vt.exports.number.isRequired,field:Vt.exports.string.isRequired}),columnGroupsHeaderStructure:Vt.exports.arrayOf(Vt.exports.arrayOf(Vt.exports.shape({columnFields:Vt.exports.arrayOf(Vt.exports.string).isRequired,groupId:Vt.exports.string}))).isRequired,columnHeaderFocus:Vt.exports.shape({field:Vt.exports.string.isRequired}),columnHeaderTabIndexState:Vt.exports.shape({field:Vt.exports.string.isRequired}),columnMenuState:Vt.exports.shape({field:Vt.exports.string,open:Vt.exports.bool.isRequired}).isRequired,columnVisibility:Vt.exports.object.isRequired,filterColumnLookup:Vt.exports.object.isRequired,hasOtherElementInTabSequence:Vt.exports.bool.isRequired,headerGroupingMaxDepth:Vt.exports.number.isRequired,sortColumnLookup:Vt.exports.object.isRequired,visibleColumns:Vt.exports.arrayOf(Vt.exports.object).isRequired});const mer="development"===process.env.NODE_ENV||"test"===process.env.NODE_ENV,ver=()=>{};const yer=ii("div",{name:"MuiDataGrid",slot:"DetailPanel"})({width:"calc(var(--DataGrid-rowWidth) - var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",backgroundColor:RYt.colors.background.base,overflow:"auto"});function ger(e){const{rowId:r,height:n,className:o,children:a}=e,i=k9t(),l=s.useRef(null),c=T7t(),u="auto"===n,d=GYt(i,r);return s.useLayoutEffect(()=>{u&&"undefined"==typeof ResizeObserver&&i.current.storeDetailPanelHeight(r,l.current.clientHeight)},[i,u,r]),function(e,t,r){const n=s.useRef(null);n.current=t,po(()=>{if(!1===r||"undefined"==typeof ResizeObserver)return ver;let t=0;const o=e.current,a=new ResizeObserver(e=>{mer?t=requestAnimationFrame(()=>{n.current(e)}):n.current(e)});return o&&a.observe(o),()=>{t&&cancelAnimationFrame(t),a.disconnect()}},[e,r])}(l,e=>{const[t]=e,n=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;i.current.storeDetailPanelHeight(r,n)},u),"skeletonRow"===d?.type?null:t.jsx(yer,{ref:l,ownerState:c,role:"presentation",style:{height:n},className:o,children:a})}function xer({virtualScroller:e}){const r=k9t(),n=ua({detailPanel:["detailPanel"]},rYt,{}),{setPanels:o}=e,a=SYt(r,F7t),i=SYt(r,I7t),l=SYt(r,L7t),c=s.useCallback(e=>{const o=i[e],a=void 0!==r.current.getRowIndexRelativeToVisibleRows(e);if(!s.isValidElement(o)||!a)return null;const c=l[e],u=c.autoHeight?"auto":c.height;return t.jsx(ger,{rowId:e,height:u,className:n.detailPanel,children:o},`panel-${e}`)},[r,n.detailPanel,l,i]);return s.useEffect(()=>{if(0===a.size)o(GJt);else{const e=new Map;for(const t of a)e.set(t,c(t));o(e)}},[a,o,c]),null}const ber=S({},{columnMenuPinRightIcon:W7t,columnMenuPinLeftIcon:U7t});const ker=S({},g7t,ber,{columnMenu:ler,columnHeaders:fer,detailPanels:function(e){return T7t().getDetailPanelContent?s.createElement(xer,e):null},headerFilterCell:t9t,headerFilterMenu:r9t,pinnedRows:function({position:e,virtualScroller:r}){const n=ua({root:["pinnedRows"]},rYt,{}),o=SYt(wJt(),eKt)[e],a=s.useMemo(()=>({firstRowIndex:0,lastRowIndex:o.length,firstColumnIndex:-1,lastColumnIndex:-1}),[o]);if(0===o.length)return null;const i=r.getRows({position:e,rows:o,renderContext:a});return t.jsx("div",{className:Wn(n.root,nYt[`pinnedRows--${e}`]),role:"presentation",children:i})}}),wer=S({},g8t,{autosizeOnMount:!1,defaultGroupingExpansionDepth:0,disableAutosize:!1,disableChildrenFiltering:!1,disableChildrenSorting:!1,disableColumnPinning:!1,getDetailPanelHeight:()=>500,headerFilters:!1,keepColumnPositionIfDraggedOutside:!1,rowSelectionPropagation:{parents:!0,descendants:!0},rowReordering:!1,rowsLoadingMode:"client",scrollEndThreshold:80,treeData:!1,lazyLoading:!1,lazyLoadingRequestThrottleMs:500,listView:!1,multipleColumnsSortingMode:"withModifierKey"}),_er=ker,Cer=e=>{const t=ri(),r=s.useMemo(()=>co({props:e,theme:t,name:"MuiDataGrid"}),[t,e]),n=s.useMemo(()=>S({},tYt,r.localeText),[r.localeText]),o=s.useMemo(()=>function({defaultSlots:e,slots:t}){const r=t;if(!r||0===Object.keys(r).length)return e;const n=S({},e);return Object.keys(r).forEach(e=>{const t=e;void 0!==r[t]&&(n[t]=r[t])}),n}({defaultSlots:_er,slots:r.slots}),[r.slots]);return s.useMemo(()=>S({},wer,r,{localeText:n,slots:o},(e=>S({signature:"DataGridPro"},e.dataSource?{filterMode:"server",sortingMode:"server",paginationMode:"server"}:{}))(r)),[r,n,o])},Mer=[...K1t,e=>e.pagination&&e.hideFooterRowCount?"MUI X: The `hideFooterRowCount` prop has no effect when the pagination is enabled.":void 0,e=>e.treeData&&"server"===e.filterMode&&!e.dataSource?'MUI X: The `filterMode="server"` prop is not available when the `treeData` is enabled.':void 0,e=>!e.pagination&&e.checkboxSelectionVisibleOnly?"MUI X: The `checkboxSelectionVisibleOnly` prop has no effect when the pagination is not enabled.":void 0,e=>e.signature!==oYt.DataGrid&&"client"===e.paginationMode&&"server"!==e.rowsLoadingMode&&hKt(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"`.':void 0,e=>e.signature!==oYt.DataGrid&&("server"===e.rowsLoadingMode||e.onRowsScrollEnd)&&e.lazyLoading?'MUI X: Usage of the client side lazy loading (`rowsLoadingMode="server"` or `onRowsScrollEnd=...`) cannot be used together with server side lazy loading `lazyLoading="true"`.':void 0],Ser={hooks:{useCSSVariables:function(){const e=ri();return s.useMemo(()=>{const t=g3t(function(e){const t=new WeakSet;return JSON.stringify(e,(e,r)=>{if("undefined"!=typeof window&&r===window||"undefined"!=typeof document&&r===document)return r.toString();if(null!==r&&"object"==typeof r){if(t.has(r))return null;t.add(r)}return r})}(e)),r=function(e){const t=function(e){if(e.vars)return e.vars.palette.TableCell.border;if("light"===e.palette.mode)return Oo(Co(e.palette.divider,1),.88);return So(Co(e.palette.divider,1),.68)}(e),r=(e.vars||e).palette.DataGrid,n=r?.bg??(e.vars||e).palette.background.default,o=r?.headerBg??n,a=r?.pinnedBg??n,i=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:Co(e.palette.background.default,e.palette.action.disabledOpacity),s="dark"===e.palette.mode?`color-mix(in srgb, ${(e.vars||e).palette.background.paper} 95%, #fff)`:(e.vars||e).palette.background.paper,l=e.vars?`rgb(${e.vars.palette.primary.mainChannel})`:e.palette.primary.main,c=function(e){if(e.vars)return e.vars.shape.borderRadius;return"number"==typeof e.shape.borderRadius?`${e.shape.borderRadius}px`:e.shape.borderRadius}(e),u=e.vars?.font?.body2??k3t(e.typography.body2),d=e.vars?.font?.caption??k3t(e.typography.caption),p=e.vars?.font?.body1??k3t(e.typography.body1),h=RYt.keys;return{[h.spacingUnit]:e.vars?e.vars.spacing??e.spacing(1):e.spacing(1),[h.colors.border.base]:t,[h.colors.background.base]:n,[h.colors.background.overlay]:s,[h.colors.background.backdrop]:i,[h.colors.foreground.base]:(e.vars||e).palette.text.primary,[h.colors.foreground.muted]:(e.vars||e).palette.text.secondary,[h.colors.foreground.accent]:(e.vars||e).palette.primary.dark,[h.colors.foreground.disabled]:(e.vars||e).palette.text.disabled,[h.colors.foreground.error]:(e.vars||e).palette.error.dark,[h.colors.interactive.hover]:(e.vars||e).palette.action.hover,[h.colors.interactive.hoverOpacity]:(e.vars||e).palette.action.hoverOpacity,[h.colors.interactive.focus]:b3t((e.vars||e).palette.primary.main),[h.colors.interactive.focusOpacity]:(e.vars||e).palette.action.focusOpacity,[h.colors.interactive.disabled]:b3t((e.vars||e).palette.action.disabled),[h.colors.interactive.disabledOpacity]:(e.vars||e).palette.action.disabledOpacity,[h.colors.interactive.selected]:l,[h.colors.interactive.selectedOpacity]:(e.vars||e).palette.action.selectedOpacity,[h.header.background.base]:o,[h.cell.background.pinned]:a,[h.radius.base]:c,[h.typography.fontFamily.base]:e.typography.fontFamily,[h.typography.fontWeight.light]:e.typography.fontWeightLight,[h.typography.fontWeight.regular]:e.typography.fontWeightRegular,[h.typography.fontWeight.medium]:e.typography.fontWeightMedium,[h.typography.fontWeight.bold]:e.typography.fontWeightBold,[h.typography.font.body]:u,[h.typography.font.small]:d,[h.typography.font.large]:p,[h.transitions.easing.easeIn]:e.transitions.easing.easeIn,[h.transitions.easing.easeOut]:e.transitions.easing.easeOut,[h.transitions.easing.easeInOut]:e.transitions.easing.easeInOut,[h.transitions.duration.short]:`${e.transitions.duration.shorter}ms`,[h.transitions.duration.base]:`${e.transitions.duration.short}ms`,[h.transitions.duration.long]:`${e.transitions.duration.standard}ms`,[h.shadows.base]:(e.vars||e).shadows[2],[h.shadows.overlay]:(e.vars||e).shadows[8],[h.zIndex.panel]:(e.vars||e).zIndex.modal,[h.zIndex.menu]:(e.vars||e).zIndex.modal}}(e);return{id:t,variables:r}},[e])},useGridAriaAttributes:()=>{const e=(()=>{const e=wJt(),t=eYt(),r=SYt(e,GKt),n=SYt(e,NXt),o=SYt(e,sJt),a=SYt(e,tKt),i=t["aria-label"],s=t["aria-labelledby"];return{role:"grid","aria-label":i||s||!t.label?i:t.label,"aria-labelledby":s,"aria-colcount":r.length,"aria-rowcount":o+1+a+n,"aria-multiselectable":qXt(t)}})();return S({},e,T7t().treeData?{role:"treegrid"}:{})},useGridRowAriaAttributes:e=>{const t=k9t(),r=T7t(),n=(()=>{const e=wJt(),t=SYt(e,sJt);return s.useCallback((r,n)=>{const o={},a=n+t+2;return o["aria-rowindex"]=a,e.current.isRowSelectable(r.id)&&(o["aria-selected"]=e.current.isRowSelected(r.id)),o},[e,t])})(),o=SYt(t,RXt),a=SYt(t,MXt),i=SYt(t,jXt);return s.useCallback((t,s)=>{const l=n(t,s);if(null===t||!r.treeData&&!e)return l;if("footer"===t.type||"pinnedRow"===t.type)return l;l["aria-level"]=t.depth+1;const c=a[t.id]??0;return"group"===t.type&&c>0&&(l["aria-expanded"]=Boolean(t.childrenExpanded)),null!==t.parent&&(l["aria-setsize"]=t.parent===AZt?o:a[t.parent],l["aria-posinset"]=i[t.id]),l},[r.treeData,e,o,a,i,n])},useCellAggregationResult:()=>null}},Der="MTc1MzAzODAwMDAwMA==",Oer=t.jsx(K,{packageName:"x-data-grid-pro",releaseInfo:Der}),Per=QGt(function(e,r){const n=Cer(e),o=w7t(n.apiRef,n);return aer(o,n),q("x-data-grid-pro",Der),"production"!==process.env.NODE_ENV&&function(e,t){t.forEach(t=>{const r=t(e);r&&lat(r,"error")})}(n,Mer),t.jsx(p3t,{privateApiRef:o,configuration:Ser,props:n,children:t.jsx(M0t,S({className:n.className,style:n.style,sx:n.sx},n.slotProps?.root,{ref:r,children:Oer}))})});"production"!==process.env.NODE_ENV&&(Per.displayName="DataGridProRaw");const Eer=s.memo(Per);"production"!==process.env.NODE_ENV&&(Eer.displayName="DataGridPro"),Per.propTypes={apiRef:Vt.exports.shape({current:Vt.exports.object}),"aria-label":Vt.exports.string,"aria-labelledby":Vt.exports.string,autoHeight:Vt.exports.bool,autoPageSize:Vt.exports.bool,autosizeOnMount:Vt.exports.bool,autosizeOptions:Vt.exports.shape({columns:Vt.exports.arrayOf(Vt.exports.string),disableColumnVirtualization:Vt.exports.bool,expand:Vt.exports.bool,includeHeaders:Vt.exports.bool,includeOutliers:Vt.exports.bool,outliersFactor:Vt.exports.number}),cellModesModel:Vt.exports.object,checkboxSelection:Vt.exports.bool,checkboxSelectionVisibleOnly:Vt.exports.bool,classes:Vt.exports.object,className:Vt.exports.string,clipboardCopyCellDelimiter:Vt.exports.string,columnBufferPx:Vt.exports.number,columnGroupHeaderHeight:Vt.exports.number,columnGroupingModel:Vt.exports.arrayOf(Vt.exports.object),columnHeaderHeight:Vt.exports.number,columns:Vt.exports.arrayOf(Vt.exports.object).isRequired,columnVisibilityModel:Vt.exports.object,dataSource:Vt.exports.shape({getChildrenCount:Vt.exports.func,getGroupKey:Vt.exports.func,getRows:Vt.exports.func.isRequired,updateRow:Vt.exports.func}),dataSourceCache:Vt.exports.shape({clear:Vt.exports.func.isRequired,get:Vt.exports.func.isRequired,set:Vt.exports.func.isRequired}),defaultGroupingExpansionDepth:Vt.exports.number,density:Vt.exports.oneOf(["comfortable","compact","standard"]),detailPanelExpandedRowIds:Vt.exports.instanceOf(Set),disableAutosize:Vt.exports.bool,disableChildrenFiltering:Vt.exports.bool,disableChildrenSorting:Vt.exports.bool,disableColumnFilter:Vt.exports.bool,disableColumnMenu:Vt.exports.bool,disableColumnPinning:Vt.exports.bool,disableColumnReorder:Vt.exports.bool,disableColumnResize:Vt.exports.bool,disableColumnSelector:Vt.exports.bool,disableColumnSorting:Vt.exports.bool,disableDensitySelector:Vt.exports.bool,disableEval:Vt.exports.bool,disableMultipleColumnsFiltering:Vt.exports.bool,disableMultipleColumnsSorting:Vt.exports.bool,disableMultipleRowSelection:Vt.exports.bool,disableRowSelectionOnClick:Vt.exports.bool,disableVirtualization:Vt.exports.bool,editMode:Vt.exports.oneOf(["cell","row"]),estimatedRowCount:Vt.exports.number,experimentalFeatures:Vt.exports.shape({warnIfFocusStateIsNotSynced:Vt.exports.bool}),filterDebounceMs:Vt.exports.number,filterMode:Vt.exports.oneOf(["client","server"]),filterModel:Vt.exports.shape({items:Vt.exports.arrayOf(Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any})).isRequired,logicOperator:Vt.exports.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:Vt.exports.bool,quickFilterLogicOperator:Vt.exports.oneOf(["and","or"]),quickFilterValues:Vt.exports.array}),getCellClassName:Vt.exports.func,getDetailPanelContent:Vt.exports.func,getDetailPanelHeight:Vt.exports.func,getEstimatedRowHeight:Vt.exports.func,getRowClassName:Vt.exports.func,getRowHeight:Vt.exports.func,getRowId:Vt.exports.func,getRowSpacing:Vt.exports.func,getTreeDataPath:Vt.exports.func,groupingColDef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object]),headerFilterHeight:Vt.exports.number,headerFilters:Vt.exports.bool,hideFooter:Vt.exports.bool,hideFooterPagination:Vt.exports.bool,hideFooterRowCount:Vt.exports.bool,hideFooterSelectedRowCount:Vt.exports.bool,ignoreDiacritics:Vt.exports.bool,ignoreValueFormatterDuringExport:Vt.exports.oneOfType([Vt.exports.shape({clipboardExport:Vt.exports.bool,csvExport:Vt.exports.bool}),Vt.exports.bool]),initialState:Vt.exports.object,isCellEditable:Vt.exports.func,isGroupExpandedByDefault:Vt.exports.func,isRowSelectable:Vt.exports.func,keepColumnPositionIfDraggedOutside:Vt.exports.bool,keepNonExistentRowsSelected:Vt.exports.bool,label:Vt.exports.string,lazyLoading:Vt.exports.bool,lazyLoadingRequestThrottleMs:Vt.exports.number,listView:Vt.exports.bool,listViewColumn:Vt.exports.shape({align:Vt.exports.oneOf(["center","left","right"]),cellClassName:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),display:Vt.exports.oneOf(["flex","text"]),field:Vt.exports.string.isRequired,renderCell:Vt.exports.func}),loading:Vt.exports.bool,localeText:Vt.exports.object,logger:Vt.exports.shape({debug:Vt.exports.func.isRequired,error:Vt.exports.func.isRequired,info:Vt.exports.func.isRequired,warn:Vt.exports.func.isRequired}),logLevel:Vt.exports.oneOf(["debug","error","info","warn",!1]),multipleColumnsSortingMode:Vt.exports.oneOf(["always","withModifierKey"]),nonce:Vt.exports.string,onCellClick:Vt.exports.func,onCellDoubleClick:Vt.exports.func,onCellEditStart:Vt.exports.func,onCellEditStop:Vt.exports.func,onCellKeyDown:Vt.exports.func,onCellModesModelChange:Vt.exports.func,onClipboardCopy:Vt.exports.func,onColumnHeaderClick:Vt.exports.func,onColumnHeaderContextMenu:Vt.exports.func,onColumnHeaderDoubleClick:Vt.exports.func,onColumnHeaderEnter:Vt.exports.func,onColumnHeaderLeave:Vt.exports.func,onColumnHeaderOut:Vt.exports.func,onColumnHeaderOver:Vt.exports.func,onColumnOrderChange:Vt.exports.func,onColumnResize:Vt.exports.func,onColumnVisibilityModelChange:Vt.exports.func,onColumnWidthChange:Vt.exports.func,onDataSourceError:Vt.exports.func,onDensityChange:Vt.exports.func,onDetailPanelExpandedRowIdsChange:Vt.exports.func,onFetchRows:Vt.exports.func,onFilterModelChange:Vt.exports.func,onMenuClose:Vt.exports.func,onMenuOpen:Vt.exports.func,onPaginationMetaChange:Vt.exports.func,onPaginationModelChange:Vt.exports.func,onPinnedColumnsChange:Vt.exports.func,onPreferencePanelClose:Vt.exports.func,onPreferencePanelOpen:Vt.exports.func,onProcessRowUpdateError:Vt.exports.func,onResize:Vt.exports.func,onRowClick:Vt.exports.func,onRowCountChange:Vt.exports.func,onRowDoubleClick:Vt.exports.func,onRowEditStart:Vt.exports.func,onRowEditStop:Vt.exports.func,onRowModesModelChange:Vt.exports.func,onRowOrderChange:Vt.exports.func,onRowSelectionModelChange:Vt.exports.func,onRowsScrollEnd:Vt.exports.func,onSortModelChange:Vt.exports.func,onStateChange:Vt.exports.func,pageSizeOptions:Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.number,Vt.exports.shape({label:Vt.exports.string.isRequired,value:Vt.exports.number.isRequired})]).isRequired),pagination:Vt.exports.bool,paginationMeta:Vt.exports.shape({hasNextPage:Vt.exports.bool}),paginationMode:Vt.exports.oneOf(["client","server"]),paginationModel:Vt.exports.shape({page:Vt.exports.number.isRequired,pageSize:Vt.exports.number.isRequired}),pinnedColumns:Vt.exports.object,pinnedRows:Vt.exports.shape({bottom:Vt.exports.arrayOf(Vt.exports.object),top:Vt.exports.arrayOf(Vt.exports.object)}),processRowUpdate:Vt.exports.func,resizeThrottleMs:Vt.exports.number,rowBufferPx:Vt.exports.number,rowCount:Vt.exports.number,rowHeight:Vt.exports.number,rowModesModel:Vt.exports.object,rowReordering:Vt.exports.bool,rows:Vt.exports.arrayOf(Vt.exports.object),rowSelection:Vt.exports.bool,rowSelectionModel:Vt.exports.shape({ids:Vt.exports.instanceOf(Set).isRequired,type:Vt.exports.oneOf(["exclude","include"]).isRequired}),rowSelectionPropagation:Vt.exports.shape({descendants:Vt.exports.bool,parents:Vt.exports.bool}),rowsLoadingMode:Vt.exports.oneOf(["client","server"]),rowSpacingType:Vt.exports.oneOf(["border","margin"]),rowSpanning:Vt.exports.bool,scrollbarSize:Vt.exports.number,scrollEndThreshold:Vt.exports.number,showCellVerticalBorder:Vt.exports.bool,showColumnVerticalBorder:Vt.exports.bool,showToolbar:Vt.exports.bool,slotProps:Vt.exports.object,slots:Vt.exports.object,sortingMode:Vt.exports.oneOf(["client","server"]),sortingOrder:Vt.exports.arrayOf(Vt.exports.oneOf(["asc","desc"])),sortModel:Vt.exports.arrayOf(Vt.exports.shape({field:Vt.exports.string.isRequired,sort:Vt.exports.oneOf(["asc","desc"])})),style:Vt.exports.object,sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object]),throttleRowsMs:Vt.exports.number,treeData:Vt.exports.bool,virtualizeColumnsWithAutoRowHeight:Vt.exports.bool};const jer=()=>s.useRef(null);var Ter=function(e){var t,r=e.tooltip,n=e.label,o=void 0===n?"Action":n,a=e.icon,i=e.variant,s=void 0===i?"outlined":i,l=e.color,c=void 0===l?"primary":l,u=e.size,d=void 0===u?"small":u,p=e.onClick,h="string"==typeof a?lt(Q3e,{name:a,size:16}):a,f=null!==(t=null!=r?r:o)&&void 0!==t?t:"";return lt(Sx,Z({title:f,placement:"top"},{children:lt(Ql,Z({size:"small"===d?"small":"medium",color:c,onClick:function(e){e.stopPropagation(),null==p||p()},"aria-label":f,sx:"contained"===s?{backgroundColor:"background.paper",border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"background.paper"}}:"outlined"===s?{border:"1px solid",borderColor:"divider"}:void 0},{children:h}))}))},Ner=function(e){var t=e.value,r=e.trueLabel,n=void 0===r?"Yes":r,o=e.falseLabel,a=void 0===o?"No":o,i="boolean"==typeof t?t:"string"==typeof t?["true","1","yes","y"].includes(t.toLowerCase()):Boolean(t);return lt(Ip,Z({sx:{display:"inline-flex",alignItems:"center"}},{children:lt(Sx,Z({title:i?n:a,placement:"top"},{children:lt(Ip,Z({component:"span",sx:{display:"inline-flex"},"aria-label":i?"true":"false"},{children:i?lt(Vw,{width:16,height:16,color:"#16A34A"}):lt(qw,{width:16,height:16,color:"#DC2626"})}))}))}))},Rer=function(e){var t=e.value,r=e.currency,n=void 0===r?"USD":r,o=e.locale,a="number"==typeof t?t:Number(null!=t?t:0);if(!Number.isFinite(a))return lt(st,{children:String(null!=t?t:"")});var i=new Intl.NumberFormat(null!=o?o:void 0,{style:"currency",currency:n,maximumFractionDigits:2});return lt(st,{children:i.format(a)})},zer=function(e){var t=e.value,r=e.formatString,n=void 0===r?"yyyy-MM-dd HH:mm":r;if(null==t)return null;var o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?lt(st,{children:String(t)}):lt(st,{children:L8e(o,n)})},Aer=function(e){var t=e.value;return lt(st,{children:null==t?"":String(t)})},Fer=function(e){var t=e.value,r=(null!=t?t:"").toString();return r?ct(Ip,Z({sx:{display:"inline-flex",alignItems:"center",gap:.5}},{children:[lt(Qw,{size:16}),lt("a",Z({href:"mailto:".concat(r),onClick:function(e){return e.stopPropagation()}},{children:r}))]})):null},Ier=function(e){var t=e.value,r=null==t?"":String(t);if(!r)return null;var n=r.replace(/[^+\d]/g,"");return ct(Ip,Z({sx:{display:"inline-flex",alignItems:"center",gap:.5}},{children:[lt(Xw,{size:16}),lt("a",Z({href:"tel:".concat(n),onClick:function(e){return e.stopPropagation()}},{children:r}))]}))},Ler=function(e){var t=e.value,r=e.max,n=void 0===r?5:r,o="number"==typeof t?t:Number(null!=t?t:0),a=Number.isFinite(o)?Math.max(0,Math.min(n,Math.floor(o))):0;return lt(Ip,Z({sx:{display:"inline-flex",color:"#F59E0B"},"aria-label":"rating-".concat(a)},{children:Array.from({length:n}).map(function(e,t){return lt(Aw,{width:16,height:16,color:t<a?"#F59E0B":"#D1D5DB"},t)})}))},Ber={DefaultTextCell:Aer,ActionButtonCell:Ter,PredefinedActions:function(e){var t,r,n,o,a,i,s,l,c,u,d,p,h,f=e.actions,m=e.onEdit,v=e.onView,y=e.onDelete,g=e.size,x=void 0===g?"small":g;return ct(Ip,Z({sx:{display:"inline-flex",gap:(null!==(t=null==f?void 0:f.gap)&&void 0!==t?t:8)/16}},{children:[(null===(r=null==f?void 0:f.edit)||void 0===r?void 0:r.enabled)&&lt(Ter,{tooltip:(null===(n=null==f?void 0:f.edit)||void 0===n?void 0:n.tooltip)||"Edit",variant:(null===(o=null==f?void 0:f.edit)||void 0===o?void 0:o.variant)||"outlined",icon:lt(Q3e,{name:(null===(a=null==f?void 0:f.edit)||void 0===a?void 0:a.icon)||"Pencil",size:16}),onClick:m,size:x}),(null===(i=null==f?void 0:f.view)||void 0===i?void 0:i.enabled)&&lt(Ter,{tooltip:(null===(s=null==f?void 0:f.view)||void 0===s?void 0:s.tooltip)||"View",variant:(null===(l=null==f?void 0:f.view)||void 0===l?void 0:l.variant)||"outlined",icon:lt(Q3e,{name:(null===(c=null==f?void 0:f.view)||void 0===c?void 0:c.icon)||"Eye",size:16}),onClick:v,size:x}),(null===(u=null==f?void 0:f.delete)||void 0===u?void 0:u.enabled)&&lt(Ter,{tooltip:(null===(d=null==f?void 0:f.delete)||void 0===d?void 0:d.tooltip)||"Delete",color:"error",variant:(null===(p=null==f?void 0:f.delete)||void 0===p?void 0:p.variant)||"outlined",icon:lt(Q3e,{name:(null===(h=null==f?void 0:f.delete)||void 0===h?void 0:h.icon)||"Trash2",size:16}),onClick:y,size:x})]}))},DateCell:zer,BooleanIconCell:Ner,EmailLinkCell:Fer,PhoneLinkCell:Ier,CurrencyCell:Rer,RatingCell:Ler},Ver=e.memo(function(t){var r,n,o,a,i,s,l,c=t.organismId,u=t.configuration,d=t.loadRows,p=t.onAction;t.emptyState;var h=t.errorState,f=t.rows,m=t.rowCount,v=t.loading,y=t.onQueryChange,g=t.searchValue,x=t.onSearchChange,b=mHt().onInternalNavigation,k=J3e,w=44,_=e.useState(null!=g?g:""),C=_[0],M=_[1],S=e.useState(0),D=S[0],O=S[1],P=e.useState(25),E=P[0],j=P[1],T=e.useState(f||[]),N=T[0],R=T[1],z=e.useState(null!=m?m:0),A=z[0],F=z[1],I=e.useState(Boolean(v)),L=I[0],B=I[1],V=e.useState(null),H=V[0],$=V[1],q=e.useState(null!==(n=null===(r=u.toolbar)||void 0===r?void 0:r.densityDefault)&&void 0!==n?n:"comfortable"),W=q[0],U=q[1],G=e.useState({}),Y=G[0],K=G[1],X=e.useState(!1),te=X[0],re=X[1],ne=e.useState({items:[],logicOperator:"and"}),oe=ne[0],ae=ne[1],ie=e.useMemo(function(){return u.columns.map(function(e){var t,r="component"===e.kind?"__component_".concat(e.id):e.field,n=null!==(t=Ber["component"===e.kind?e.componentRenderer:e.renderer])&&void 0!==t?t:Ber.DefaultTextCell,o="component"===e.kind&&"ActionButtonCell"===e.componentRenderer,a="component"===e.kind&&"PredefinedActions"===e.componentRenderer;return{field:r,headerName:e.headerName,width:e.width,sortable:Boolean(e.sortable),filterable:e.filterable,renderHeader:function(){return ct(Ip,Z({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"}},{children:[lt("span",{children:e.headerName}),e.filterable&&lt(Ql,Z({"aria-label":"open-filter-".concat(r),size:"small",onClick:function(e){var t,n;e.stopPropagation();try{null===(n=(t=le.current).showFilterPanel)||void 0===n||n.call(t,r)}catch(e){}},sx:{ml:.5,color:"#9CA3AF","& svg":{display:"block"}}},{children:lt(k,{iconName:"filter",size:16})}))]}))},renderCell:function(t){var r,i,s;return lt(n,Z({value:t.value,row:t.row},null!==(i=null!==(r=e.rendererProps)&&void 0!==r?r:e.componentProps)&&void 0!==i?i:{},o?{onClick:function(){return null==p?void 0:p({action:e.actionConfig,row:t.row})}}:{},a?{actions:null===(s=e.componentProps)||void 0===s?void 0:s.actions,size:"compact"===W?"small":"medium",onEdit:function(){var r,n,o,a,i,s,l,c,u,d,h,f,m,v=(null===(n=null===(r=e.componentProps)||void 0===r?void 0:r.actions)||void 0===n?void 0:n.idField)||"id",y=t.row[v],g="string"==typeof y?y:String(null!=y?y:""),x=(null===(o=e.rendererProps)||void 0===o?void 0:o.editLink)||(null===(l=null===(s=null===(i=null===(a=e.componentProps)||void 0===a?void 0:a.actions)||void 0===i?void 0:i.edit)||void 0===s?void 0:s.link)||void 0===l?void 0:l.internalLink);if(b&&x){var k=x,w=k.length>0&&!k.endsWith("/"),_=null===(d=null===(u=null===(c=e.componentProps)||void 0===c?void 0:c.actions)||void 0===u?void 0:u.edit)||void 0===d?void 0:d.targetFormId;if(_&&(k="".concat(k).concat(w?"/":"","organismId=").concat(encodeURIComponent(_))),g){var C=k.length>0&&!k.endsWith("/");k="".concat(k).concat(C?"/":"","rwoRecordId=").concat(encodeURIComponent(g))}var M={};return _&&(M.organismId=_),g&&(M.rwoRecordId=g),void b({link:k,query:M})}null==p||p({action:{type:"edit_record",targetFormId:null===(m=null===(f=null===(h=e.componentProps)||void 0===h?void 0:h.actions)||void 0===f?void 0:f.edit)||void 0===m?void 0:m.targetFormId,idField:v},row:t.row})},onView:function(){var r,n,o,a,i,s,l,c,u,d=(null===(n=null===(r=e.componentProps)||void 0===r?void 0:r.actions)||void 0===n?void 0:n.idField)||"id",h=t.row[d],f="string"==typeof h?h:String(null!=h?h:""),m=(null===(s=null===(i=null===(a=null===(o=e.componentProps)||void 0===o?void 0:o.actions)||void 0===a?void 0:a.view)||void 0===i?void 0:i.link)||void 0===s?void 0:s.internalLink)||(null===(u=null===(c=null===(l=e.componentProps)||void 0===l?void 0:l.actions)||void 0===c?void 0:c.view)||void 0===u?void 0:u.routeKey);if(b&&m){var v=m;if(f){var y=v.length>0&&!v.endsWith("/");v="".concat(v).concat(y?"/":"","rwoRecordId=").concat(encodeURIComponent(f))}var g={};return f&&(g.rwoRecordId=f),void b({link:v,query:g})}null==p||p({action:{type:"view_record_details",routeKey:m||"",idField:d},row:t.row})},onDelete:function(){var r,n,o,a,i,s;return null==p?void 0:p({action:{type:"delete_record",apiKey:null!==(a=null===(o=null===(n=null===(r=e.componentProps)||void 0===r?void 0:r.actions)||void 0===n?void 0:n.delete)||void 0===o?void 0:o.apiKey)&&void 0!==a?a:"delete",idField:null===(s=null===(i=e.componentProps)||void 0===i?void 0:i.actions)||void 0===s?void 0:s.idField},row:t.row})}}:{}))}}})},[u.columns,Y]),se=e.useMemo(function(){return(u.columns||[]).map(function(e){return"".concat(("component"===e.kind?e.id:e.field)||"",":").concat(e.headerName||"",":").concat(e.width||"")}).join("|")},[u.columns]),le=jer(),ce=Array.isArray(f)||"number"==typeof m||"boolean"==typeof v,ue=function(){return Q(void 0,void 0,void 0,function(){var e,t;return J(this,function(r){switch(r.label){case 0:if(ce)return[2];B(!0),$(null),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,d(c,{page:D,pageSize:E,search:C,quickFilters:Y})];case 2:return e=r.sent(),R(e.rows),F(e.total),[3,5];case 3:return t=r.sent(),$(t),[3,5];case 4:return B(!1),[7];case 5:return[2]}})})};e.useEffect(function(){ce||ue()},[c,D,E,C,u.columns,Y]),e.useEffect(function(){ce&&(R(f||[]),F(null!=m?m:0),B(Boolean(v)))},[ce,f,m,v]),e.useEffect(function(){"string"==typeof g&&g!==C&&M(g)},[g]),e.useEffect(function(){var e=Object.entries(Y).flatMap(function(e){var t=e[0],r=e[1],n=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean);return 0===n.length?[]:[{field:t,operator:"isAnyOf",value:n}]});ae({items:e,logicOperator:"and"})},[Y]);var de=!1!==(null===(o=u.toolbar)||void 0===o?void 0:o.densityToggle),pe=null!==(i=null===(a=u.toolbar)||void 0===a?void 0:a.quickFilters)&&void 0!==i?i:[],he=!1!==(null===(s=u.toolbar)||void 0===s?void 0:s.search),fe=!1!==(null===(l=u.toolbar)||void 0===l?void 0:l.exportCsv);return H?lt(st,{children:h?h(H):lt(gc,Z({color:"error"},{children:H.message}))}):ct(Ip,{children:[ct(Ip,Z({sx:{display:"grid",gridTemplateColumns:"auto 1fr auto",alignItems:"center",mt:1,columnGap:1}},{children:[lt(Ip,Z({sx:{minWidth:0,overflowX:"auto",pr:1,flexShrink:0}},{children:pe.length>0&&lt(Ip,Z({sx:{display:"inline-flex",alignItems:"center",gap:"8px",px:"6px",py:"4px",borderRadius:"8px",background:"#FAFAFF",whiteSpace:"nowrap"}},{children:pe.map(function(e){var t=Y[e.columnField],r=Array.isArray(t)?t.includes(e.value):t===e.value,n=""===e.value,o=n&&(void 0===t||Array.isArray(t)&&0===t.length);return lt("button",Z({"aria-label":e.label,"aria-pressed":n?o:r,onClick:function(){K(function(t){var r=Z({},t);if(""===e.value)return delete r[e.columnField],r;var n=r[e.columnField];if(Array.isArray(n))if(n.includes(e.value)){var o=n.filter(function(t){return t!==e.value});0===o.length?delete r[e.columnField]:r[e.columnField]=o}else r[e.columnField]=ee(ee([],n,!0),[e.value],!1);else n?n===e.value?delete r[e.columnField]:r[e.columnField]=[n,e.value]:r[e.columnField]=e.value;return r})},style:{height:w,padding:n?"0 14px":"0 12px",border:n||r?"1px solid #E5E7EB":"none",borderRadius:n||r?10:0,background:n||r?"#FFFFFF":"transparent",boxShadow:n&&o||!n&&r?"0 1px 2px rgba(0,0,0,0.06)":void 0,color:r?"#111827":"#6B7280",fontWeight:r||n&&o?700:500,fontSize:13,cursor:"pointer",transition:"transform 80ms ease, box-shadow 120ms ease"},onMouseDown:function(e){var t=e.currentTarget;t.style.transform="translateY(1px)",t.style.boxShadow=n?"0 0 0 rgba(0,0,0,0.0)":t.style.boxShadow},onMouseUp:function(e){e.currentTarget.style.transform="translateY(0)"}},{children:e.label}),e.label)})}))})),lt(Ip,{}),ct(Ip,Z({sx:{display:"inline-flex",alignItems:"center",gap:1.5,flexShrink:0,justifySelf:"end"}},{children:[he&&lt(Ip,Z({sx:{width:te||Boolean(C)?"".concat(360,"px"):"".concat(w,"px"),transition:"width 250ms ease"}},{children:te||Boolean(C)?lt(Gk,{"aria-label":"grid-search",size:"small",value:C,autoFocus:!0,onBlur:function(){C||re(!1)},onChange:function(e){var t=e.target.value;M(t),x&&x(t),y&&y({page:D,pageSize:E,search:t,quickFilters:Y})},placeholder:"Search",fullWidth:!0,sx:{"& .MuiInputBase-root":{height:"".concat(w,"px")},"& .MuiOutlinedInput-input":{py:0},"& .MuiInputAdornment-root svg":{transform:"translate(1px, 0.5px)"}},InputProps:{startAdornment:lt(jm,Z({position:"start"},{children:lt(k,{iconName:"search",size:16})}))}}):lt(Ip,Z({sx:{width:w,height:w}},{children:lt(Ql,Z({"aria-label":"open-search",size:"small",onClick:function(){return re(!0)},sx:{display:"grid",placeItems:"center",lineHeight:0,p:0,width:"100%",height:"100%",borderRadius:2,background:"#FFFFFF",border:"1px solid #E2E4EA",boxShadow:"0 2px 6px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04)",color:"#6C4CF5","& svg":{display:"block",margin:0,transform:"translate(1px, 0.5px)"},"&:hover":{background:"#FFFFFF",borderColor:"#D7DAE2",boxShadow:"0 3px 8px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05)"}}},{children:lt(k,{iconName:"search",size:20})}))}))})),de&&lt(Ip,Z({sx:{background:"#F7F5FF",borderRadius:3,px:1,py:.5,display:"inline-flex",alignItems:"center"}},{children:ct(lw,Z({size:"small",exclusive:!0,value:W,onChange:function(e,t){t&&U(t)},"aria-label":"table-density",sx:{"& .MuiToggleButton-root":{textTransform:"none",height:w,px:2,py:0,fontSize:14,lineHeight:1.2,borderRadius:"10px",border:"none",color:"#6B7280",background:"transparent"},"& .MuiToggleButton-root + .MuiToggleButton-root":{ml:1},"& .MuiToggleButton-root.Mui-selected":{fontWeight:700,color:"#3F3F46",background:"#FFFFFF",border:"1px solid #E2E4EA",boxShadow:"0 2px 6px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06)"}}},{children:[lt(nw,Z({value:"compact","aria-label":"Compact"},{children:"Compact"})),lt(nw,Z({value:"comfortable","aria-label":"Comfortable"},{children:"Comfortable"}))]}))})),fe&&lt(Ql,Z({"aria-label":"export-csv",size:"small",onClick:function(){var e,t;return null===(t=(e=le.current).exportDataAsCsv)||void 0===t?void 0:t.call(e)},sx:{display:"flex",alignItems:"center",justifyContent:"center",lineHeight:0,p:0,width:w,height:w,borderRadius:2,background:"#FFFFFF",border:"1px solid #E2E4EA",boxShadow:"0 2px 6px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04)",color:"#6C4CF5","& svg":{display:"block"},"&:hover":{background:"#FFFFFF",borderColor:"#D7DAE2",boxShadow:"0 3px 8px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05)"}}},{children:lt(k,{iconName:"download",size:20})}))]}))]})),lt(Ip,Z({mt:2},{children:lt(Eer,{apiRef:le,rows:N.map(function(e,t){var r;return Z({id:null!==(r=e.id)&&void 0!==r?r:"".concat(t)},e)}),columns:ie,filterModel:oe,pagination:!0,paginationModel:{page:D,pageSize:E},onPaginationModelChange:function(e){O(e.page),j(e.pageSize),y&&y({page:e.page,pageSize:e.pageSize,search:C,quickFilters:Y})},density:W,loading:L,rowCount:A,paginationMode:"client",disableRowSelectionOnClick:!0,autoHeight:!0,sx:{minHeight:320},slotProps:{loadingOverlay:{variant:"linear-progress",noRowsVariant:"skeleton"}}},se)})),!ce&&lt("button",{"aria-label":"load-rows",onClick:ue})]})});Ver.displayName="DataGridOrganism";var Her=function(e,t,r){var n,o;return void 0===r&&(r="blue"),null!==(o=null===(n=t.find(function(t){return t.status===e}))||void 0===n?void 0:n.color)&&void 0!==o?o:r},$er=function(e,t){return e.map(function(e){return Z(Z({},e),{color:Her(e.status,t)})})},qer=function(e){var t=e.name,r=e.className,n=Z3e[t];return n?lt(n,{className:r}):null},Wer=e.memo(function(t){var r,n=e.useRef(null),o=function(t){var r=t.organismId,n=xHt().stateConfig,o=e.useMemo(function(){var e="calendar:organism:".concat(r),t=null==n?void 0:n[e];return"number"==typeof t?t:0},[n,r]);return{refreshSignal:o}}({organismId:t.organismId}).refreshSignal,a=RVt({initialEvents:t.events||[],onEventAdd:function(e){return Q(void 0,void 0,void 0,function(){var r,n;return J(this,function(o){switch(o.label){case 0:return[4,null===(n=t.onEventCreate)||void 0===n?void 0:n.call(t,e)];case 1:return[2,null!=(r=o.sent())?r:Z(Z({},e),{id:String(Date.now())})]}})})},onEventUpdate:function(e){return Q(void 0,void 0,void 0,function(){var r,n;return J(this,function(o){switch(o.label){case 0:return[4,null===(r=t.onEventUpdate)||void 0===r?void 0:r.call(t,e)];case 1:return[2,null!==(n=o.sent())&&void 0!==n?n:e]}})})},onEventDelete:t.onEventDelete,onDateRangeChange:function(e,r,o){return Q(void 0,void 0,void 0,function(){var o,a,i;return J(this,function(s){switch(s.label){case 0:return n.current={start:e,end:r},t.loadEvents?[4,t.loadEvents(t.organismId,{rangeStart:e.toISOString(),rangeEnd:r.toISOString()})]:[3,2];case 1:return o=s.sent(),[2,$er(o.events,t.configuration.display.colorMap)];case 2:return null===(a=t.onQueryChange)||void 0===a||a.call(t,{rangeStart:e.toISOString(),rangeEnd:r.toISOString()}),[2,null!==(i=t.events)&&void 0!==i?i:[]]}})})}}),i=a.events,s=a.isLoading,l=a.addEvent,c=a.updateEvent,u=a.deleteEvent,d=a.onViewOrDateChange;e.useEffect(function(){if(t.loadEvents&&n.current){var e=n.current,r=e.start,o=e.end;d(r,o)}},[o]);var p=e.useMemo(function(){return{defaultView:t.configuration.display.defaultView,use24HourFormatByDefault:t.configuration.display.use24HourFormatByDefault,overlayIndicators:(e=t.configuration.display.overlayIndicators,e?{maxPerCell:e.maxPerCell,statusClasses:e.statusClasses,showLegend:e.showLegend,icons:e.icons?Object.fromEntries(Object.entries(e.icons).map(function(e){var t=e[0],r=e[1];return[t,{className:r.className,priority:r.priority,showCountBadge:r.showCountBadge,icon:r.iconName?lt(qer,{name:r.iconName,className:r.className}):void 0}]})):void 0}:void 0)};var e},[t.configuration.display]);return lt(NVt,{events:i,isLoading:Boolean(null!==(r=t.loading)&&void 0!==r?r:s),config:p,onEventAdd:l,onEventUpdate:c,onEventDelete:u,onDateRangeChange:d})});Wer.displayName="CalendarOrganism";var Uer=function(e){var t,r=e.children,n=X(e,["children"]);return Z(Z({},n),{items:null!==(t=null==r?void 0:r.map(function(e){return"molecule"===e.instance&&"consent"===e.type?e:"container"===e.instance?Uer(e):e}))&&void 0!==t?t:[]})},Ger={component:"CalendarOrganism",version:"2.0.0",toolGroups:[{id:"eventBindings",tool:"calendarDataRetrieval",titleKey:"config.calendar.group.eventBindings",collapsible:!0,initiallyExpanded:!0,pathBase:"dataRetrievalConfig.bindings.event",toolConfig:{targets:[{captureName:"id",labelKey:"config.calendar.bindings.event.id"},{captureName:"title",labelKey:"config.calendar.bindings.event.title"},{captureName:"startTime",labelKey:"config.calendar.bindings.event.startTime"},{captureName:"endTime",labelKey:"config.calendar.bindings.event.endTime"},{captureName:"status",labelKey:"config.calendar.bindings.event.status"},{captureName:"eventType",labelKey:"config.calendar.bindings.event.eventType"},{captureName:"resourceId",labelKey:"config.calendar.bindings.event.resourceId"},{captureName:"resourceName",labelKey:"config.calendar.bindings.event.resourceName"},{captureName:"visibility",labelKey:"config.calendar.bindings.event.visibility"},{captureName:"color",labelKey:"config.calendar.bindings.event.color"},{captureName:"associatedEntityType",labelKey:"config.calendar.bindings.event.associatedEntityType"},{captureName:"associatedEntityId",labelKey:"config.calendar.bindings.event.associatedEntityId"},{captureName:"conferencingLink",labelKey:"config.calendar.bindings.event.conferencingLink"},{captureName:"meta[$index].token",labelKey:"config.calendar.bindings.event.meta.token"},{captureName:"meta[$index].dataFieldId",labelKey:"config.calendar.bindings.event.meta.fieldId"}]}},{id:"eventFormModal",tool:"custom",titleKey:"config.calendar.group.eventFormModal",collapsible:!0,initiallyExpanded:!0,pathBase:"dataRetrievalConfig.form.modal",fields:[{type:"text",captureName:"titleIcon",labelKey:"config.calendar.form.modal.titleIcon"},{type:"text",captureName:"i18n.title",labelKey:"config.calendar.form.modal.i18n.title"},{type:"text",captureName:"i18n.description",labelKey:"config.calendar.form.modal.i18n.description"},{type:"text",captureName:"i18n.submitLabel",labelKey:"config.calendar.form.modal.i18n.submit"},{type:"text",captureName:"i18n.cancelLabel",labelKey:"config.calendar.form.modal.i18n.cancel"}]},{id:"display",tool:"custom",titleKey:"config.calendar.group.display",collapsible:!0,initiallyExpanded:!0,pathBase:"display",fields:[{type:"select",captureName:"defaultView",labelKey:"config.calendar.display.defaultView",options:[{id:"day",labelKey:"config.calendar.display.view.day"},{id:"week",labelKey:"config.calendar.display.view.week"},{id:"month",labelKey:"config.calendar.display.view.month"},{id:"year",labelKey:"config.calendar.display.view.year"}]},{type:"switch",captureName:"use24HourFormatByDefault",labelKey:"config.calendar.display.use24HourFormat",defaultValue:!1},{type:"color",captureName:"statusColors.tentative",labelKey:"config.calendar.status.tentative"},{type:"color",captureName:"statusColors.confirmed",labelKey:"config.calendar.status.confirmed"},{type:"color",captureName:"statusColors.completed",labelKey:"config.calendar.status.completed"},{type:"color",captureName:"statusColors.cancelled",labelKey:"config.calendar.status.cancelled"}]},{id:"overlays",tool:"custom",titleKey:"config.calendar.group.overlays",collapsible:!0,initiallyExpanded:!1,pathBase:"display.overlayIndicators",fields:[{type:"number",captureName:"maxPerCell",labelKey:"config.calendar.overlayIndicators.maxPerCell"},{type:"switch",captureName:"showLegend",labelKey:"config.calendar.overlayIndicators.showLegend",defaultValue:!1},{type:"text",captureName:"statusClasses.ok",labelKey:"config.calendar.overlayIndicators.status.ok"},{type:"text",captureName:"statusClasses.info",labelKey:"config.calendar.overlayIndicators.status.info"},{type:"text",captureName:"statusClasses.warning",labelKey:"config.calendar.overlayIndicators.status.warning"},{type:"text",captureName:"statusClasses.danger",labelKey:"config.calendar.overlayIndicators.status.danger"}]}]},Yer={calendar:Ger},Ker={config:{isInitialized:!0},traits:{isDocker:!1,isCI:!1,machineId:null,projectId:"b28c94b2195c8ed259f0b415aaee3f39b0b2920a4537611499fa044956917a21",sessionId:"b446c79c907575faea9bf8f645f7f409ab7cdfa9cc119baf4444c12c2db9bf1e",anonymousId:"6c93d6e1c180e6b6bb382c3abcee40610d63bad23bdfc96ea9dc52a5eb06f242"}};function Zer(e){return"__mui_x_telemetry_"+btoa(e)}function Xer(e,t,r){try{if("undefined"!=typeof window&&window[e])return window[e].setItem(Zer(t),r),!0}catch(e){}return!1}function Qer(e,t){try{if("undefined"!=typeof window&&window[e])return window[e].getItem(Zer(t))}catch(e){}return null}function Jer(e){let t="";const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n=0;for(;n<e;)t+=r.charAt(Math.floor(62*Math.random())),n+=1;return t}const etr="undefined"==typeof window||"test"===process.env.NODE_ENV?()=>{}:async()=>{const e="fingerprint";try{const t=Qer("localStorage",e);if(t)return JSON.parse(t);const r=await Promise.resolve().then(function(){return lrr}),n=await r.load({monitoring:!1}),o=S({},(await n.get()).components);delete o.cookiesEnabled;const a=r.hashComponents(o),i=r.hashComponents(S({},function(e,t){return t.reduce((t,r)=>(t[r]=e[r],t),{})}(o,["fonts","audio","languages","deviceMemory","timezone","sessionStorage","localStorage","indexedDB","openDatabase","platform","canvas","vendor","vendorFlavors","colorGamut","forcedColors","monochrome","contrast","reducedMotion","math","videoCard","architecture"]))),s={fullHash:a,coreHash:i};return Xer("localStorage",e,JSON.stringify(s)),s}catch(e){return null}};var ttr=Object.freeze({__proto__:null,default:async function(){return Ker.traits.sessionId=function(){const e="session_id",t=Qer("sessionStorage",e);if(t)return t;const r=`sesid_${Jer(32)}`;return Xer("sessionStorage",e,r)?r:`sestp_${Jer(32)}`}(),Ker.config.isInitialized||(Ker.traits.anonymousId=function(){const e="anonymous_id",t=Qer("localStorage",e);if(t)return t;const r=`anid_${Jer(32)}`;return Xer("localStorage",e,r)?r:""}(),Ker.config.isInitialized=!0),Ker.traits.fingerprint||(Ker.traits.fingerprint=await etr()),Ker}}),rtr="3.4.2";function ntr(e,t){return new Promise(function(r){return setTimeout(r,e,t)})}function otr(e){return!!e&&"function"==typeof e.then}function atr(e,t){try{var r=e();otr(r)?r.then(function(e){return t(!0,e)},function(e){return t(!1,e)}):t(!0,r)}catch(e){t(!1,e)}}function itr(e,t,r){return void 0===r&&(r=16),Q(this,void 0,void 0,function(){var n,o,a,i;return J(this,function(s){switch(s.label){case 0:n=Array(e.length),o=Date.now(),a=0,s.label=1;case 1:return a<e.length?(n[a]=t(e[a],a),(i=Date.now())>=o+r?(o=i,[4,ntr(0)]):[3,3]):[3,4];case 2:s.sent(),s.label=3;case 3:return++a,[3,1];case 4:return[2,n]}})})}function str(e){e.then(void 0,function(){})}function ltr(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]+t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function ctr(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]*t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function utr(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])}function dtr(e,t){return 0===(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function ptr(e,t){return[e[0]^t[0],e[1]^t[1]]}function htr(e){return e=ptr(e,[0,e[0]>>>1]),e=ptr(e=ctr(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=ptr(e=ctr(e,[3301882366,444984403]),[0,e[0]>>>1])}function ftr(e,t){t=t||0;var r,n=(e=e||"").length%16,o=e.length-n,a=[0,t],i=[0,t],s=[0,0],l=[0,0],c=[2277735313,289559509],u=[1291169091,658871167];for(r=0;r<o;r+=16)s=[255&e.charCodeAt(r+4)|(255&e.charCodeAt(r+5))<<8|(255&e.charCodeAt(r+6))<<16|(255&e.charCodeAt(r+7))<<24,255&e.charCodeAt(r)|(255&e.charCodeAt(r+1))<<8|(255&e.charCodeAt(r+2))<<16|(255&e.charCodeAt(r+3))<<24],l=[255&e.charCodeAt(r+12)|(255&e.charCodeAt(r+13))<<8|(255&e.charCodeAt(r+14))<<16|(255&e.charCodeAt(r+15))<<24,255&e.charCodeAt(r+8)|(255&e.charCodeAt(r+9))<<8|(255&e.charCodeAt(r+10))<<16|(255&e.charCodeAt(r+11))<<24],s=utr(s=ctr(s,c),31),a=ltr(a=utr(a=ptr(a,s=ctr(s,u)),27),i),a=ltr(ctr(a,[0,5]),[0,1390208809]),l=utr(l=ctr(l,u),33),i=ltr(i=utr(i=ptr(i,l=ctr(l,c)),31),a),i=ltr(ctr(i,[0,5]),[0,944331445]);switch(s=[0,0],l=[0,0],n){case 15:l=ptr(l,dtr([0,e.charCodeAt(r+14)],48));case 14:l=ptr(l,dtr([0,e.charCodeAt(r+13)],40));case 13:l=ptr(l,dtr([0,e.charCodeAt(r+12)],32));case 12:l=ptr(l,dtr([0,e.charCodeAt(r+11)],24));case 11:l=ptr(l,dtr([0,e.charCodeAt(r+10)],16));case 10:l=ptr(l,dtr([0,e.charCodeAt(r+9)],8));case 9:l=ctr(l=ptr(l,[0,e.charCodeAt(r+8)]),u),i=ptr(i,l=ctr(l=utr(l,33),c));case 8:s=ptr(s,dtr([0,e.charCodeAt(r+7)],56));case 7:s=ptr(s,dtr([0,e.charCodeAt(r+6)],48));case 6:s=ptr(s,dtr([0,e.charCodeAt(r+5)],40));case 5:s=ptr(s,dtr([0,e.charCodeAt(r+4)],32));case 4:s=ptr(s,dtr([0,e.charCodeAt(r+3)],24));case 3:s=ptr(s,dtr([0,e.charCodeAt(r+2)],16));case 2:s=ptr(s,dtr([0,e.charCodeAt(r+1)],8));case 1:s=ctr(s=ptr(s,[0,e.charCodeAt(r)]),c),a=ptr(a,s=ctr(s=utr(s,31),u))}return a=ltr(a=ptr(a,[0,e.length]),i=ptr(i,[0,e.length])),i=ltr(i,a),a=ltr(a=htr(a),i=htr(i)),i=ltr(i,a),("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(i[0]>>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)}function mtr(e){return parseInt(e)}function vtr(e){return parseFloat(e)}function ytr(e,t){return"number"==typeof e&&isNaN(e)?t:e}function gtr(e){return e.reduce(function(e,t){return e+(t?1:0)},0)}function xtr(e,t){if(void 0===t&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var r=1/t;return Math.round(e*r)/r}function btr(e){return e&&"object"==typeof e&&"message"in e?e:{message:e}}function ktr(e){return"function"!=typeof e}function wtr(e,t,r){var n=Object.keys(e).filter(function(e){return!function(e,t){for(var r=0,n=e.length;r<n;++r)if(e[r]===t)return!0;return!1}(r,e)}),o=itr(n,function(r){return function(e,t){var r=new Promise(function(r){var n=Date.now();atr(e.bind(null,t),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=Date.now()-n;if(!e[0])return r(function(){return{error:btr(e[1]),duration:o}});var a=e[1];if(ktr(a))return r(function(){return{value:a,duration:o}});r(function(){return new Promise(function(e){var t=Date.now();atr(a,function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=o+Date.now()-t;if(!r[0])return e({error:btr(r[1]),duration:a});e({value:r[1],duration:a})})})})})});return str(r),function(){return r.then(function(e){return e()})}}(e[r],t)});return str(o),function(){return Q(this,void 0,void 0,function(){var e,t,r,a;return J(this,function(i){switch(i.label){case 0:return[4,o];case 1:return[4,itr(i.sent(),function(e){var t=e();return str(t),t})];case 2:return e=i.sent(),[4,Promise.all(e)];case 3:for(t=i.sent(),r={},a=0;a<n.length;++a)r[n[a]]=t[a];return[2,r]}})})}}function _tr(){var e=window,t=navigator;return gtr(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function Ctr(){var e=window,t=navigator;return gtr(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!_tr()}function Mtr(){var e=window,t=navigator;return gtr(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,0===t.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function Str(){var e=window,t=navigator;return gtr(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===t.vendor.indexOf("Apple"),"getStorageUpdates"in t,"WebKitMediaKeys"in e])>=4}function Dtr(){var e=window;return gtr(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function Otr(){var e,t,r=window;return gtr(["buildID"in navigator,"MozAppearance"in(null!==(t=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==t?t:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4}function Ptr(){var e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function Etr(){var e=Mtr(),t=Otr();if(!e&&!t)return!1;var r=window;return gtr(["onorientationchange"in r,"orientation"in r,e&&!("SharedWorker"in r),t&&/android/i.test(navigator.appVersion)])>=2}function jtr(e){var t=new Error(e);return t.name=e,t}function Ttr(e,t,r){var n,o,a;return void 0===r&&(r=50),Q(this,void 0,void 0,function(){var i,s;return J(this,function(l){switch(l.label){case 0:i=document,l.label=1;case 1:return i.body?[3,3]:[4,ntr(r)];case 2:return l.sent(),[3,1];case 3:s=i.createElement("iframe"),l.label=4;case 4:return l.trys.push([4,,10,11]),[4,new Promise(function(e,r){var n=!1,o=function(){n=!0,e()};s.onload=o,s.onerror=function(e){n=!0,r(e)};var a=s.style;a.setProperty("display","block","important"),a.position="absolute",a.top="0",a.left="0",a.visibility="hidden",t&&"srcdoc"in s?s.srcdoc=t:s.src="about:blank",i.body.appendChild(s);var l=function(){var e,t;n||("complete"===(null===(t=null===(e=s.contentWindow)||void 0===e?void 0:e.document)||void 0===t?void 0:t.readyState)?o():setTimeout(l,10))};l()})];case 5:l.sent(),l.label=6;case 6:return(null===(o=null===(n=s.contentWindow)||void 0===n?void 0:n.document)||void 0===o?void 0:o.body)?[3,8]:[4,ntr(r)];case 7:return l.sent(),[3,6];case 8:return[4,e(s,s.contentWindow)];case 9:return[2,l.sent()];case 10:return null===(a=s.parentNode)||void 0===a||a.removeChild(s),[7];case 11:return[2]}})})}function Ntr(e){for(var t=function(e){for(var t,r,n="Unexpected syntax '".concat(e,"'"),o=/^\s*([a-z-]*)(.*)$/i.exec(e),a=o[1]||void 0,i={},s=/([.:#][\w-]+|\[.+?\])/gi,l=function(e,t){i[e]=i[e]||[],i[e].push(t)};;){var c=s.exec(o[2]);if(!c)break;var u=c[0];switch(u[0]){case".":l("class",u.slice(1));break;case"#":l("id",u.slice(1));break;case"[":var d=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(u);if(!d)throw new Error(n);l(d[1],null!==(r=null!==(t=d[4])&&void 0!==t?t:d[5])&&void 0!==r?r:"");break;default:throw new Error(n)}}return[a,i]}(e),r=t[0],n=t[1],o=document.createElement(null!=r?r:"div"),a=0,i=Object.keys(n);a<i.length;a++){var s=i[a],l=n[s].join(" ");"style"===s?Rtr(o.style,l):o.setAttribute(s,l)}return o}function Rtr(e,t){for(var r=0,n=t.split(";");r<n.length;r++){var o=n[r],a=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(o);if(a){var i=a[1],s=a[2],l=a[4];e.setProperty(i,s,l||"")}}}var ztr=["monospace","sans-serif","serif"],Atr=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function Ftr(e){return e.toDataURL()}var Itr,Ltr;function Btr(){var e=this;return function(){if(void 0===Ltr){var e=function(){var t=Vtr();Htr(t)?Ltr=setTimeout(e,2500):(Itr=t,Ltr=void 0)};e()}}(),function(){return Q(e,void 0,void 0,function(){var e;return J(this,function(t){switch(t.label){case 0:return Htr(e=Vtr())?Itr?[2,ee([],Itr,!0)]:Ptr()?[4,(r=document,(r.exitFullscreen||r.msExitFullscreen||r.mozCancelFullScreen||r.webkitExitFullscreen).call(r))]:[3,2]:[3,2];case 1:t.sent(),e=Vtr(),t.label=2;case 2:return Htr(e)||(Itr=e),[2,e]}var r})})}}function Vtr(){var e=screen;return[ytr(vtr(e.availTop),null),ytr(vtr(e.width)-vtr(e.availWidth)-ytr(vtr(e.availLeft),0),null),ytr(vtr(e.height)-vtr(e.availHeight)-ytr(vtr(e.availTop),0),null),ytr(vtr(e.availLeft),null)]}function Htr(e){for(var t=0;t<4;++t)if(e[t])return!1;return!0}function $tr(e){var t;return Q(this,void 0,void 0,function(){var r,n,o,a,i,s,l;return J(this,function(c){switch(c.label){case 0:for(r=document,n=r.createElement("div"),o=new Array(e.length),a={},qtr(n),l=0;l<e.length;++l)"DIALOG"===(i=Ntr(e[l])).tagName&&i.show(),qtr(s=r.createElement("div")),s.appendChild(i),n.appendChild(s),o[l]=i;c.label=1;case 1:return r.body?[3,3]:[4,ntr(50)];case 2:return c.sent(),[3,1];case 3:r.body.appendChild(n);try{for(l=0;l<e.length;++l)o[l].offsetParent||(a[e[l]]=!0)}finally{null===(t=n.parentNode)||void 0===t||t.removeChild(n)}return[2,a]}})})}function qtr(e){e.style.setProperty("display","block","important")}function Wtr(e){return matchMedia("(inverted-colors: ".concat(e,")")).matches}function Utr(e){return matchMedia("(forced-colors: ".concat(e,")")).matches}function Gtr(e){return matchMedia("(prefers-contrast: ".concat(e,")")).matches}function Ytr(e){return matchMedia("(prefers-reduced-motion: ".concat(e,")")).matches}function Ktr(e){return matchMedia("(dynamic-range: ".concat(e,")")).matches}var Ztr=Math,Xtr=function(){return 0};var Qtr={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};var Jtr={fonts:function(){return Ttr(function(e,t){var r=t.document,n=r.body;n.style.fontSize="48px";var o=r.createElement("div"),a={},i={},s=function(e){var t=r.createElement("span"),n=t.style;return n.position="absolute",n.top="0",n.left="0",n.fontFamily=e,t.textContent="mmMwWLliI0O&1",o.appendChild(t),t},l=ztr.map(s),c=function(){for(var e={},t=function(t){e[t]=ztr.map(function(e){return function(e,t){return s("'".concat(e,"',").concat(t))}(t,e)})},r=0,n=Atr;r<n.length;r++){t(n[r])}return e}();n.appendChild(o);for(var u=0;u<ztr.length;u++)a[ztr[u]]=l[u].offsetWidth,i[ztr[u]]=l[u].offsetHeight;return Atr.filter(function(e){return t=c[e],ztr.some(function(e,r){return t[r].offsetWidth!==a[e]||t[r].offsetHeight!==i[e]});var t})})},domBlockers:function(e){var t=(void 0===e?{}:e).debug;return Q(this,void 0,void 0,function(){var e,r,n,o,a;return J(this,function(i){switch(i.label){case 0:return Str()||Etr()?(s=atob,e={abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',s("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",s("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",s("LnNwb25zb3JpdA=="),".ylamainos",s("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),s("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",s("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",s("LmhlYWRlci1ibG9ja2VkLWFk"),s("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",s("I2FkXzMwMFgyNTA="),s("I2Jhbm5lcmZsb2F0MjI="),s("I2NhbXBhaWduLWJhbm5lcg=="),s("I0FkLUNvbnRlbnQ=")],adGuardChinese:[s("LlppX2FkX2FfSA=="),s("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",s("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),s("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",s("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",s("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",s("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),s("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),s("LmFkZ29vZ2xl"),s("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[s("YW1wLWF1dG8tYWRz"),s("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",s("I2FkX2ludmlld19hcmVh")],adGuardRussian:[s("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),s("LnJlY2xhbWE="),'div[id^="smi2adblock"]',s("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[s("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),s("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",s("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),s("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),s("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",s("I3Jla2xhbWk="),s("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),s("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),s("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[s("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",s("LndpZGdldF9wb19hZHNfd2lkZ2V0"),s("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",s("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[s("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),s("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",s("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",s("I3Jla2xhbW5pLWJveA=="),s("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",s("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[s("I2FkdmVydGVudGll"),s("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",s("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",s("LnNwb25zb3JsaW5rZ3J1ZW4="),s("I3dlcmJ1bmdza3k="),s("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),s("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[s("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",s("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),s("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),s("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[s("LnJla2xhbW9zX3RhcnBhcw=="),s("LnJla2xhbW9zX251b3JvZG9z"),s("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),s("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),s("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[s("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[s("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),s("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",s("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[s("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),s("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),s("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",s("LmFkX19tYWlu"),s("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[s("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[s("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),s("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[s("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),s("I2xpdmVyZUFkV3JhcHBlcg=="),s("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),s("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[s("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",s("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),s("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),s("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[s("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),s("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),s("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",s("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),s("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),s("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="),s("ZGl2I3NrYXBpZWNfYWQ=")],ro:[s("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),s("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),s("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),s("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[s("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),s("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),s("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",s("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),s("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",s("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]},r=Object.keys(e),[4,$tr((a=[]).concat.apply(a,r.map(function(t){return e[t]})))]):[2,void 0];case 1:return n=i.sent(),t&&function(e,t){for(var r="DOM blockers debug:\n```",n=0,o=Object.keys(e);n<o.length;n++){var a=o[n];r+="\n".concat(a,":");for(var i=0,s=e[a];i<s.length;i++){var l=s[i];r+="\n ".concat(t[l]?"🚫":"➡️"," ").concat(l)}}console.log("".concat(r,"\n```"))}(e,n),(o=r.filter(function(t){var r=e[t];return gtr(r.map(function(e){return n[e]}))>.6*r.length})).sort(),[2,o]}var s})})},fontPreferences:function(){return function(e,t){void 0===t&&(t=4e3);return Ttr(function(r,n){var o=n.document,a=o.body,i=a.style;i.width="".concat(t,"px"),i.webkitTextSizeAdjust=i.textSizeAdjust="none",Mtr()?a.style.zoom="".concat(1/n.devicePixelRatio):Str()&&(a.style.zoom="reset");var s=o.createElement("div");return s.textContent=ee([],Array(t/20|0),!0).map(function(){return"word"}).join(" "),a.appendChild(s),e(o,a)},'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}(function(e,t){for(var r={},n={},o=0,a=Object.keys(Qtr);o<a.length;o++){var i=a[o],s=Qtr[i],l=s[0],c=void 0===l?{}:l,u=s[1],d=void 0===u?"mmMwWLliI0fiflO&1":u,p=e.createElement("span");p.textContent=d,p.style.whiteSpace="nowrap";for(var h=0,f=Object.keys(c);h<f.length;h++){var m=f[h],v=c[m];void 0!==v&&(p.style[m]=v)}r[i]=p,t.appendChild(e.createElement("br")),t.appendChild(p)}for(var y=0,g=Object.keys(Qtr);y<g.length;y++){n[i=g[y]]=r[i].getBoundingClientRect().width}return n})},audio:function(){var e=window,t=e.OfflineAudioContext||e.webkitOfflineAudioContext;if(!t)return-2;if(Str()&&!Dtr()&&!function(){var e=window;return gtr(["DOMRectList"in e,"RTCPeerConnectionIceEvent"in e,"SVGGeometryElement"in e,"ontransitioncancel"in e])>=3}())return-1;var r=new t(1,5e3,44100),n=r.createOscillator();n.type="triangle",n.frequency.value=1e4;var o=r.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,n.connect(o),o.connect(r.destination),n.start(0);var a=function(e){var t=3,r=500,n=500,o=5e3,a=function(){},i=new Promise(function(i,s){var l=!1,c=0,u=0;e.oncomplete=function(e){return i(e.renderedBuffer)};var d=function(){setTimeout(function(){return s(jtr("timeout"))},Math.min(n,u+o-Date.now()))},p=function(){try{var n=e.startRendering();switch(otr(n)&&str(n),e.state){case"running":u=Date.now(),l&&d();break;case"suspended":document.hidden||c++,l&&c>=t?s(jtr("suspended")):setTimeout(p,r)}}catch(e){s(e)}};p(),a=function(){l||(l=!0,u>0&&d())}});return[i,a]}(r),i=a[0],s=a[1],l=i.then(function(e){return function(e){for(var t=0,r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}(e.getChannelData(0).subarray(4500))},function(e){if("timeout"===e.name||"suspended"===e.name)return-3;throw e});return str(l),function(){return s(),l}},screenFrame:function(){var e=this,t=Btr();return function(){return Q(e,void 0,void 0,function(){var e,r;return J(this,function(n){switch(n.label){case 0:return[4,t()];case 1:return e=n.sent(),[2,[(r=function(e){return null===e?null:xtr(e,10)})(e[0]),r(e[1]),r(e[2]),r(e[3])]]}})})}},osCpu:function(){return navigator.oscpu},languages:function(){var e,t=navigator,r=[],n=t.language||t.userLanguage||t.browserLanguage||t.systemLanguage;if(void 0!==n&&r.push([n]),Array.isArray(t.languages))Mtr()&&gtr([!("MediaSettingsRange"in(e=window)),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3||r.push(t.languages);else if("string"==typeof t.languages){var o=t.languages;o&&r.push(o.split(","))}return r},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return ytr(vtr(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,t=function(e){return ytr(mtr(e),null)},r=[t(e.width),t(e.height)];return r.sort().reverse(),r},hardwareConcurrency:function(){return ytr(mtr(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,t=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(t){var r=(new t).resolvedOptions().timeZone;if(r)return r}var n,o=(n=(new Date).getFullYear(),-Math.max(vtr(new Date(n,0,1).getTimezoneOffset()),vtr(new Date(n,6,1).getTimezoneOffset())));return"UTC".concat(o>=0?"+":"").concat(Math.abs(o))},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!_tr()&&!Ctr())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return"MacIntel"===e&&Str()&&!Dtr()?function(){if("iPad"===navigator.platform)return!0;var e=screen,t=e.width/e.height;return gtr(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],r=0;r<e.length;++r){var n=e[r];if(n){for(var o=[],a=0;a<n.length;++a){var i=n[a];o.push({type:i.type,suffixes:i.suffixes})}t.push({name:n.name,description:n.description,mimeTypes:o})}}return t}},canvas:function(){var e,t,r=!1,n=function(){var e=document.createElement("canvas");return e.width=1,e.height=1,[e,e.getContext("2d")]}(),o=n[0],a=n[1];if(function(e,t){return!(!t||!e.toDataURL)}(o,a)){r=function(e){return e.rect(0,0,10,10),e.rect(2,2,6,6),!e.isPointInPath(5,5,"evenodd")}(a),function(e,t){e.width=240,e.height=60,t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(100,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"';var r="Cwm fjordbank gly ".concat(String.fromCharCode(55357,56835));t.fillText(r,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t.font="18pt Arial",t.fillText(r,4,45)}(o,a);var i=Ftr(o);i!==Ftr(o)?e=t="unstable":(t=i,function(e,t){e.width=122,e.height=110,t.globalCompositeOperation="multiply";for(var r=0,n=[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]];r<n.length;r++){var o=n[r],a=o[0],i=o[1],s=o[2];t.fillStyle=a,t.beginPath(),t.arc(i,s,40,0,2*Math.PI,!0),t.closePath(),t.fill()}t.fillStyle="#f9c",t.arc(60,60,60,0,2*Math.PI,!0),t.arc(60,60,20,0,2*Math.PI,!0),t.fill("evenodd")}(o,a),e=Ftr(o))}else e=t="";return{winding:r,geometry:e,text:t}},touchSupport:function(){var e,t=navigator,r=0;void 0!==t.maxTouchPoints?r=mtr(t.maxTouchPoints):void 0!==t.msMaxTouchPoints&&(r=t.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return{maxTouchPoints:r,touchEvent:e,touchStart:"ontouchstart"in window}},vendor:function(){return navigator.vendor||""},vendorFlavors:function(){for(var e=[],t=0,r=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];t<r.length;t++){var n=r[t],o=window[n];o&&"object"==typeof o&&e.push(n)}return e.sort()},cookiesEnabled:function(){var e=document;try{e.cookie="cookietest=1; SameSite=Strict;";var t=-1!==e.cookie.indexOf("cookietest=");return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch(e){return!1}},colorGamut:function(){for(var e=0,t=["rec2020","p3","srgb"];e<t.length;e++){var r=t[e];if(matchMedia("(color-gamut: ".concat(r,")")).matches)return r}},invertedColors:function(){return!!Wtr("inverted")||!Wtr("none")&&void 0},forcedColors:function(){return!!Utr("active")||!Utr("none")&&void 0},monochrome:function(){if(matchMedia("(min-monochrome: 0)").matches){for(var e=0;e<=100;++e)if(matchMedia("(max-monochrome: ".concat(e,")")).matches)return e;throw new Error("Too high value")}},contrast:function(){return Gtr("no-preference")?0:Gtr("high")||Gtr("more")?1:Gtr("low")||Gtr("less")?-1:Gtr("forced")?10:void 0},reducedMotion:function(){return!!Ytr("reduce")||!Ytr("no-preference")&&void 0},hdr:function(){return!!Ktr("high")||!Ktr("standard")&&void 0},math:function(){var e,t=Ztr.acos||Xtr,r=Ztr.acosh||Xtr,n=Ztr.asin||Xtr,o=Ztr.asinh||Xtr,a=Ztr.atanh||Xtr,i=Ztr.atan||Xtr,s=Ztr.sin||Xtr,l=Ztr.sinh||Xtr,c=Ztr.cos||Xtr,u=Ztr.cosh||Xtr,d=Ztr.tan||Xtr,p=Ztr.tanh||Xtr,h=Ztr.exp||Xtr,f=Ztr.expm1||Xtr,m=Ztr.log1p||Xtr;return{acos:t(.12312423423423424),acosh:r(1e308),acoshPf:(e=1e154,Ztr.log(e+Ztr.sqrt(e*e-1))),asin:n(.12312423423423424),asinh:o(1),asinhPf:function(e){return Ztr.log(e+Ztr.sqrt(e*e+1))}(1),atanh:a(.5),atanhPf:function(e){return Ztr.log((1+e)/(1-e))/2}(.5),atan:i(.5),sin:s(-1e300),sinh:l(1),sinhPf:function(e){return Ztr.exp(e)-1/Ztr.exp(e)/2}(1),cos:c(10.000000000123),cosh:u(1),coshPf:function(e){return(Ztr.exp(e)+1/Ztr.exp(e))/2}(1),tan:d(-1e300),tanh:p(1),tanhPf:function(e){return(Ztr.exp(2*e)-1)/(Ztr.exp(2*e)+1)}(1),exp:h(1),expm1:f(1),expm1Pf:function(e){return Ztr.exp(e)-1}(1),log1p:m(10),log1pPf:function(e){return Ztr.log(1+e)}(10),powPI:function(e){return Ztr.pow(Ztr.PI,e)}(-100)}},videoCard:function(){var e,t=document.createElement("canvas"),r=null!==(e=t.getContext("webgl"))&&void 0!==e?e:t.getContext("experimental-webgl");if(r&&"getExtension"in r){var n=r.getExtension("WEBGL_debug_renderer_info");if(n)return{vendor:(r.getParameter(n.UNMASKED_VENDOR_WEBGL)||"").toString(),renderer:(r.getParameter(n.UNMASKED_RENDERER_WEBGL)||"").toString()}}},pdfViewerEnabled:function(){return navigator.pdfViewerEnabled},architecture:function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}};function err(e){var t=function(e){if(Etr())return.4;if(Str())return Dtr()?.5:.3;var t=e.platform.value||"";if(/^Win/.test(t))return.6;if(/^Mac/.test(t))return.5;return.7}(e),r=function(e){return xtr(.99+.01*e,1e-4)}(t);return{score:t,comment:"$ if upgrade to Pro: https://fpjs.dev/pro".replace(/\$/g,"".concat(r))}}function trr(e){return JSON.stringify(e,function(e,t){return t instanceof Error?function(e){var t;return Z({name:e.name,message:e.message,stack:null===(t=e.stack)||void 0===t?void 0:t.split("\n")},e)}(t):t},2)}function rrr(e){return ftr(function(e){for(var t="",r=0,n=Object.keys(e).sort();r<n.length;r++){var o=n[r],a=e[o],i=a.error?"error":JSON.stringify(a.value);t+="".concat(t?"|":"").concat(o.replace(/([:|\\])/g,"\\$1"),":").concat(i)}return t}(e))}function nrr(e){return void 0===e&&(e=50),function(e,t){void 0===t&&(t=1/0);var r=window.requestIdleCallback;return r?new Promise(function(e){return r.call(window,function(){return e()},{timeout:t})}):ntr(Math.min(e,t))}(e,2*e)}function orr(e,t){var r=Date.now();return{get:function(n){return Q(this,void 0,void 0,function(){var o,a,i;return J(this,function(s){switch(s.label){case 0:return o=Date.now(),[4,e()];case 1:return a=s.sent(),i=function(e){var t,r=err(e);return{get visitorId(){return void 0===t&&(t=rrr(this.components)),t},set visitorId(e){t=e},confidence:r,components:e,version:rtr}}(a),(t||(null==n?void 0:n.debug))&&console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(i.version,"\nuserAgent: ").concat(navigator.userAgent,"\ntimeBetweenLoadAndGet: ").concat(o-r,"\nvisitorId: ").concat(i.visitorId,"\ncomponents: ").concat(trr(a),"\n```")),[2,i]}})})}}}function arr(e){var t=void 0===e?{}:e,r=t.delayFallback,n=t.debug,o=t.monitoring,a=void 0===o||o;return Q(this,void 0,void 0,function(){var e;return J(this,function(t){switch(t.label){case 0:return a&&function(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/fingerprintjs/v".concat(rtr,"/npm-monitoring"),!0),e.send()}catch(e){console.error(e)}}(),[4,nrr(r)];case 1:return t.sent(),e=function(e){return wtr(Jtr,e,[])}({debug:n}),[2,orr(e,n)]}})})}var irr={load:arr,hashComponents:rrr,componentsToDebugString:trr},srr=ftr,lrr=Object.freeze({__proto__:null,componentsToDebugString:trr,default:irr,getFullscreenElement:Ptr,getScreenFrame:Btr,hashComponents:rrr,isAndroid:Etr,isChromium:Mtr,isDesktopSafari:Dtr,isEdgeHTML:Ctr,isGecko:Otr,isTrident:_tr,isWebKit:Str,load:arr,loadSources:wtr,murmurX64Hash128:srr,prepareForSources:nrr,sources:Jtr,transformSource:function(e,t){var r=function(e){return ktr(e)?t(e):function(){var r=e();return otr(r)?r.then(t):t(r)}};return function(t){var n=e(t);return otr(n)?n.then(r):r(n)}},withIframe:Ttr});exports.AccountButtonContext=vHt,exports.AccountButtonProvider=yHt,exports.ActionButtonCell=Ter,exports.AlertMolecule=e6e,exports.ApiContext=wHt,exports.ApiProvider=function(e){var t=e.api,r=e.children;return lt(wHt.Provider,Z({value:t},{children:r}))},exports.AvatarTextCell=function(e){var t,r,n=e.row,o=e.avatarField,a=e.textField,i=String(null!==(t=n[o])&&void 0!==t?t:"")||void 0,s=String(null!==(r=n[a])&&void 0!==r?r:"");return ct(Ip,Z({sx:{display:"flex",alignItems:"center"}},{children:[lt(yp,{src:i,sx:{width:24,height:24,mr:1}}),lt(gc,Z({variant:"body2"},{children:s}))]}))},exports.BackgroundImage=_C,exports.BadgeMolecule=t6e,exports.BaseMolecule=cHt,exports.BaseTextButton=i_,exports.BasicTextField=n6e,exports.BinaryRadioButtons=Ust,exports.BooleanIconCell=Ner,exports.Button=o6e,exports.ButtonActionsContext=ST,exports.ButtonActionsProvider=function(t){var r,n,o,a=t.children,i=t.popupProps,s=mHt().localStateObject,l=xHt().stateConfig,c=s||l,u=e.useState({}),d=u[0],p=u[1],h=e.useState(!1),f=h[0],m=h[1],v=e.useState(!1),y=v[0],g=v[1],x=e.useState(null),b=x[0],k=x[1],w=ET().onStateChange,_=function(e){var t=null==i?void 0:i.find(function(t){return t.id===e});k(t||null),m(!0),w({id:e,type:"opened"})};e.useEffect(function(){null==i||i.forEach(function(e){var t;(null===(t=c[e.id])||void 0===t?void 0:t.visible)&&_(e.id)})},[c]);var C=function(e){k(null),m(!1),w({id:e,type:"closed"})},M=function(){g(!1)};lt(hHt,{item:d});var S=e.useMemo(function(){return{actionContent:d,setActionContent:p,isModalVisible:f,isDrawerVisible:y,setDrawerVisible:g,setActivePopUpById:_,onCloseDrawer:M,onCloseModal:C}},[d,p,f,y,g,_,M,C]),D=b||{},O=D.config,P=D.content;return ct(ST.Provider,Z({value:S},{children:[b&&f&&ct($st,Z({size:null==O?void 0:O.size,open:f,onClose:function(){return C(b.id)},popupId:b.id,modalStyles:null==O?void 0:O.styles,withCloseIcon:null==O?void 0:O.withCloseIcon},{children:[null===(r=null==P?void 0:P.embedded)||void 0===r?void 0:r.map(function(e){var t;return lt(PT,Z({initItems:null===(t=null==e?void 0:e.body)||void 0===t?void 0:t.items},{children:lt(hHt,{item:null==e?void 0:e.body},e.id)}))}),(null==P?void 0:P.isi)&&lt(hHt,{item:null===(o=null===(n=null==b?void 0:b.content)||void 0===n?void 0:n.isi)||void 0===o?void 0:o.body})]})),a]}))},exports.COMMUNICATION_LINK_DATA_TEXT=ZHt,exports.COMMUNICATION_LINK_DATA_URL=KHt,exports.COMMUNICATION_LINK_ELEMENT_ID=GHt,exports.CalendarOrganism=Wer,exports.CellRendererRegistry=Ber,exports.Checkbox=Gst,exports.Checklist=M6e,exports.ChipMolecule=S6e,exports.Circle=d_,exports.CirclesWrapper=h_,exports.CircularIndicator=function(e){var t=e.activeColor,r=e.inactiveColor,n=X(e,["activeColor","inactiveColor"]),o=(Qe()||mt).colors;return lt(f_,Z({},n,{activeColor:o[t]||t,inactiveColor:o[r]||r}))},exports.CircularIndicatorStyledComponent=f_,exports.ConsentMolecule=D6e,exports.Container=elt,exports.ContainerWrapper=w6e,exports.ContentWrapper=function(t){var r=t.children,n=t.className,o=t.marginTop,a=void 0===o?"0px":o,i=t.marginLeft,s=void 0===i?"0px":i,l=t.marginRight,c=void 0===l?"0px":l,u=Kst(),d=u.drawer,p=u.setDrawerContainerRef,h=e.useRef(null);e.useEffect(function(){return p&&p(h.current),function(){p&&p(null)}},[p]);var f=function(e){var t=parseFloat(e);return isNaN(t)?0:t},m=f(s),v="absolute"!==d.positionType&&"left"===d.position&&d.isOpen?"".concat(m+d.width,"px"):s,y=f(c),g="absolute"!==d.positionType&&"right"===d.position&&d.isOpen?"".concat(y+d.width,"px"):c;return lt(Zst,Z({ref:h,className:n,style:{marginTop:a,marginLeft:v,marginRight:g}},{children:r}))},exports.CurrencyCell=Rer,exports.CustomValidation=j6e,exports.DataGridOrganism=Ver,exports.DateCalendar=ort,exports.DateCell=zer,exports.DatePickerMolecule=Eit,exports.DefaultTextCell=Aer,exports.Divider=jit,exports.Drawer=Jit,exports.EmailLinkCell=Fer,exports.ErrorText=function(e){var t=e.text;return ct(st,{children:[lt(O6e,{height:"XS"}),lt(P6e,Z({variant:"XS",color:"red"},{children:t}))]})},exports.FormOrganismItem=pHt,exports.FormStepContext=fF,exports.FormStepContextProvider=mF,exports.HorizontalButtons=function(e){var t=e.onClick,r=e.disabled,n=e.buttonOptions,o=e.selectedButtonId,a=e.error,i=(null==n?void 0:n.slice(0,2))||[];return lt(m_,Z({error:a,disabled:r},{children:i.map(function(e){var r=e.value,n=e.id;return lt(v_,Z({isActive:n===o,onClick:function(){return t(n)}},{children:r}),n)})}))},exports.HorizontalPadding=mC,exports.Icon=g_,exports.IconButton=function(e){var t=e.name,r=e.color,n=e.onClick,o=e.disabled,a=e.activeOpacity,i=e.withoutOpacityEffect,s=X(e,["name","color","onClick","disabled","activeOpacity","withoutOpacityEffect"]),l=(Qe()||mt).colors;return lt(l_,Z({onClick:n,disabled:o,activeOpacity:a,withoutOpacityEffect:i},{children:lt(a_[t],Z({},s,{color:l[r]||r}))}))},exports.IconRenderer=J3e,exports.IconWrapper=Wst,exports.Image=Tit,exports.Input=R_,exports.LayoutContext=Yst,exports.LayoutProvider=function(t){var r=t.children,n=t.layoutPosition,o=void 0===n?"normal":n,a=t.drawerMaxWidthPercent,i=void 0===a?80:a,s=t.headerHeight,l=void 0===s?"0px":s,c=t.isMLR,u=void 0!==c&&c,d=t.isMobile,p=void 0!==d&&d,h=e.useState({width:0,position:"right",isOpen:!1,positionType:o}),f=h[0],m=h[1],v=e.useRef(null),y=e.useState(null),g=y[0],x=y[1],b=zw("xs"),k=p||b;e.useEffect(function(){m(function(e){return Z(Z({},e),{positionType:o})})},[o]),e.useEffect(function(){if(v.current){var e=function(){var e;if(f.isOpen){var t=(null===(e=v.current)||void 0===e?void 0:e.clientWidth)||0,r=Math.floor(t*(i/100));f.width>r&&m(function(e){return Z(Z({},e),{width:r})})}};e();var t=new ResizeObserver(function(){e()});return t.observe(v.current),function(){t&&t.disconnect()}}},[f.isOpen,f.width,i]);var w=e.useMemo(function(){return function(e){m(function(t){var r=void 0!==e.width?e.width:t.width;if(v.current&&(e.isOpen||t.isOpen)){var n=v.current.clientWidth,o=Math.floor(n*(i/100));r=Math.min(r,o)}var a=void 0!==e.positionType?e.positionType:t.positionType;return Z(Z(Z({},t),e),{width:r,positionType:a})})}},[i]),_=e.useMemo(function(){return{drawer:f,updateDrawer:w,drawerContainerRef:g,setDrawerContainerRef:x,headerHeight:l,isMobile:k,isMLR:u}},[f,w,g,l,k,u]);return lt(Yst.Provider,Z({value:_},{children:lt("div",Z({ref:v,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"}},{children:r}))}))},exports.Link=est,exports.MATRIX_MESSAGE_DATA_ID=YHt,exports.MATRIX_MESSAGE_ELEMENT_ID=UHt,exports.MlrRichTextViewerContext=CT,exports.MlrRichTextViewerProvider=function(e){var t=e.children,r=e.isMLRReview,n=e.showAnnotations,o=e.annotationsList;return lt(CT.Provider,Z({value:{isMLRReview:r,annotationsList:o,showAnnotations:n}},{children:t}))},exports.ModalWrapper=qst,exports.Organism=function(e){var t=e.organism;return lt(hHt,{item:Uer(t.body)})},exports.OrganismContext=DT,exports.OrganismContextProvider=PT,exports.OrganismItem=hHt,exports.PasswordSetup=ost,exports.PdfDocument=function(t){var r=t.source,n=t.isMobile,a=void 0!==n&&n,i=t.customDocumentStyles,s=e.useState(0),l=s[0],c=s[1],u=e.useState(1),d=u[0],p=u[1],h=e.useState(null),f=h[0],m=h[1],v=i||{},y=v.pageWidth,g=void 0===y?a?342:856:y,x=v.pageHeight,b=f!==d;return lt(vst,Z({pageWidth:g,pageHeight:void 0===x?a?442:1108:x},{children:ct(yst,Z({customDocumentStyles:i},{children:[ct(o.Document,Z({file:r,renderMode:"canvas",className:"document",onLoadSuccess:function(e){var t=e.numPages;c(t)},loading:lt(Ul,{size:60})},{children:[b&&f?lt(o.Page,{pageNumber:f,renderTextLayer:!1,className:"custom-pdf"},f):null,lt(o.Page,{pageNumber:d,renderTextLayer:!1,className:"".concat(b?"loadingPage":"custom-pdf"),onRenderSuccess:function(){return m(d)}},d)]})),ct(gst,{children:[lt(xst,Z({disable:d<=1,onClick:function(){return p(function(e){return e+(e<=1?0:-1)})},customDocumentStyles:i},{children:lt(g_,{name:"CaretLeft",size:33})})),lt(bst,{type:"number",size:"small",customDocumentStyles:i,onChange:function(e){var t=e.target.value,r=e.nativeEvent;return function(e,t){if(!Number.isNaN(e)){var r=Math.round(e);r>l?!Number.isNaN(t)&&t>0&&t<=l&&p(t):r<1||p(r)}}(+t,+((null==r?void 0:r.data)||""))},value:d}),lt(xst,Z({disabled:!0},{children:lt(kst,{})})),lt(P6e,Z({variant:"S",color:(null==i?void 0:i.pageNumberColor)||"white"},{children:l})),lt(xst,Z({disable:d>=l,onClick:function(){return p(function(e){return e+(e>=l?0:1)})},customDocumentStyles:i},{children:lt(g_,{name:"CaretRight"})}))]})]}))}))},exports.PhoneLinkCell=Ier,exports.RadioButtons=function(e){var t=e.ref,r=e.name,n=e.value,o=e.options,a=e.onBlur,i=e.onChange,s=e.isRow,l=void 0!==s&&s,c=e.isError,u=void 0!==c&&c,d=e.disabled,p=void 0!==d&&d,h=e.isEditMode,f=void 0===h||h,m=e.isRichText,v=void 0!==m&&m,y=e.internalConfig,g=yC({internalConfig:y}).groupWrapperStyles;return lt(kC,Z({ref:t,row:l,$isRow:l,name:r,value:n,onBlur:a,onChange:function(e){f&&(null==i||i(e.target.value))},$styles:g},{children:null==o?void 0:o.map(function(e){return lt(bC,{option:e,isError:u,disabled:p,isRichText:v,isEditMode:f,internalConfig:y},e.id)})}))},exports.RadioGroupWrapper=kC,exports.RatingCell=Ler,exports.RatingMolecule=wst,exports.RegularImage=wC,exports.RichTextViewer=QHt,exports.Select=function(t){var r=t.ref,n=t.onBlur,o=t.onChange,a=t.value,i=t.placeholder,s=t.options,l=void 0===s?[]:s,c=t.disabled,u=void 0!==c&&c,d=t.optionsPresentation,p=void 0!==d&&d,h=t.isError,f=t.isEditMode,m=void 0===f||f,v=t.selectInternalConfig,y=t.isRichText,g=void 0!==y&&y,x=e.useState(p),b=x[0],k=x[1],w=e.useState(a),_=w[0],C=w[1],M=null==l?void 0:l.find(function(e){return e.id===_});e.useEffect(function(){var e=function(){return!p&&k(!1)};return window.addEventListener("click",e),function(){return window.removeEventListener("click",e)}}),e.useEffect(function(){return k(p)},[p]),e.useEffect(function(){return C(a)},[a]);var S=function(e){return e===_};return lt(e$t,Z({ref:r,tabIndex:0,onBlur:n,disabled:u,isEditMode:m,hasValue:!!M,isOpen:b,hasError:!!h,$styles:n$t(v,!!M)},{children:ct("div",Z({className:"select-wrapper"},{children:[ct("div",Z({className:"select-input",onClick:function(e){p||(e.stopPropagation(),k(function(e){return!e}))}},{children:[M?g?lt(QHt,{numberOfLines:1,value:M.label}):lt(P6e,Z({numberOfLines:1,variant:"M",color:"gray1"},{children:M.label})):lt(P6e,Z({numberOfLines:1,variant:"M",color:"gray3"},{children:i})),m&&lt("div",Z({className:"icon-container"},{children:lt(g_,{name:"CaretDown"})}))]})),b&&m&&lt(t$t,{children:l.map(function(e){var t=e.id,r=e.label;return lt(r$t,Z({$selected:S(t),onClick:function(){return function(e){C(e),null==o||o(e)}(t)}},{children:g?JHt(JSON.parse(r)):r}),t)})})]}))}))},exports.SelectMolecule=Cst,exports.SliderMolecule=Rst,exports.Spacer=O6e,exports.SpeedDial=Xst,exports.Spinner=a$t,exports.StateContext=gHt,exports.StateContextProvider=function(t){var r=t.initStateConfig,n=t.children,o=t.stateHandler,a=t.authenticated,i=e.useMemo(function(){return{stateConfig:r,stateHandler:o,authenticated:a}},[r,o,a]);return lt(gHt.Provider,Z({value:i},{children:n}))},exports.StatusChipCell=function(e){var t,r,n=e.value,o=e.mapping,a=null==o?void 0:o[n];return lt(gd,{size:"small",label:null!==(t=null==a?void 0:a.label)&&void 0!==t?t:n,color:null!==(r=null==a?void 0:a.color)&&void 0!==r?r:"default"})},exports.Stepper=zst,exports.StyleWrapper=hGt,exports.SwitchMolecule=Fst,exports.TextButton=s_,exports.TextMolecule=Rit,exports.TextWrapper=P6e,exports.TimePickerMolecule=Lst,exports.Tooltip=function(t){var r=t.trigger,n=void 0===r?"hover":r,o=t.placement,a=void 0===o?"top":o,i=t.styles,s=X(t,["trigger","placement","styles"]),l=e.useRef(null);return lt(hGt,Z({ref:l,$styles:i},{children:lt(pGt,Z({},s,{getTooltipContainer:function(){return l.current},trigger:n,placement:a}))}))},exports.TouchableOpacity=l_,exports.ValidationTag=mGt,exports.VerticalPadding=vC,exports.Video=Bst,exports.ZealThemeProvider=function(e){return lt(hr,Z({injectFirst:!0},{children:lt(et,Z({theme:Z(Z({},Rw),e.theme)},{children:ct(vi,Z({theme:Z(Z({},Rw),e.theme)},{children:[lt(Nh,{}),lt(Pt,{styles:Nw}),e.children]}))}))}))},exports.ZealUIModal=$st,exports.calendarConfiguratorDescriptor=Ger,exports.containerConfiguratorsMap={},exports.dataGridConfiguratorDescriptor={component:"DataGridOrganism",version:"1.0.0",groups:[{id:"columns",labelKey:"config.datagrid.group.columns"},{id:"toolbar",labelKey:"config.datagrid.group.toolbar"},{id:"dataRetrieval",labelKey:"config.datagrid.group.dataRetrieval",collapsedByDefault:!0},{id:"styles",labelKey:"config.datagrid.group.styles"}],fields:[{type:"composite",labelKey:"config.datagrid.dataRetrieval.title",groupId:"dataRetrieval",renderer:"dataGridDataRetrieval",targets:[{path:"dataSource",labelKey:"config.datagrid.dataRetrieval.dataSource"}],grid:{md:12}},{type:"array",path:"columns",labelKey:"config.datagrid.columns.title",groupId:"columns",itemLabelKey:"config.datagrid.columns.item",allowAdd:!0,allowRemove:!0,allowReorder:!0,minItems:1,itemDefault:{id:"",kind:"data",field:"",headerName:"",width:160,filterable:!0,sortable:!1,renderer:"DefaultTextCell"},itemFields:[{type:"select",path:"columns[$index].kind",labelKey:"config.datagrid.columns.kind",groupId:"columns",options:[{id:"data",labelKey:"config.datagrid.columns.kind.data"},{id:"component",labelKey:"config.datagrid.columns.kind.component"}],grid:{md:2}},{type:"text",path:"columns[$index].id",labelKey:"config.datagrid.columns.id",groupId:"columns",rules:{required:!0},grid:{md:3}},{type:"text",path:"columns[$index].headerName",labelKey:"config.datagrid.columns.headerName",groupId:"columns",grid:{md:3}},{type:"number",path:"columns[$index].width",labelKey:"config.datagrid.columns.width",groupId:"columns",rules:{min:40,max:1e3},grid:{md:2}},{type:"switch",path:"columns[$index].filterable",labelKey:"config.datagrid.columns.filterable",groupId:"columns",grid:{md:2}},{type:"switch",path:"columns[$index].sortable",labelKey:"config.datagrid.columns.sortable",groupId:"columns",grid:{md:2}},{type:"text",path:"columns[$index].renderer",labelKey:"config.datagrid.columns.renderer",groupId:"columns",grid:{md:3}},{type:"text",path:"columns[$index].field",labelKey:"config.datagrid.columns.field",groupId:"columns",when:{path:"columns[$index].kind",equals:"data"},grid:{md:3}},{type:"text",path:"columns[$index].componentRenderer",labelKey:"config.datagrid.columns.componentRenderer",groupId:"columns",when:{path:"columns[$index].kind",equals:"component"},grid:{md:3}}]},{type:"select",path:"toolbar.densityDefault",labelKey:"config.datagrid.toolbar.densityDefault",groupId:"toolbar",defaultValue:"comfortable",options:[{id:"compact",labelKey:"config.datagrid.toolbar.view.compact"},{id:"comfortable",labelKey:"config.datagrid.toolbar.view.comfortable"}],grid:{md:3}},{type:"switch",path:"toolbar.densityToggle",labelKey:"config.datagrid.toolbar.densityToggle",groupId:"toolbar",defaultValue:!0,grid:{md:3}},{type:"switch",path:"toolbar.search",labelKey:"config.datagrid.toolbar.search",groupId:"toolbar",defaultValue:!0,grid:{md:3}},{type:"switch",path:"toolbar.exportCsv",labelKey:"config.datagrid.toolbar.exportCsv",groupId:"toolbar",defaultValue:!0,grid:{md:3}},{type:"array",path:"toolbar.quickFilters",labelKey:"config.datagrid.toolbar.quickFilters",groupId:"toolbar",allowAdd:!0,allowRemove:!0,allowReorder:!0,itemDefault:{label:"",columnField:"",value:""},itemFields:[{type:"text",path:"toolbar.quickFilters[$index].label",labelKey:"config.datagrid.toolbar.quickFilters.label",groupId:"toolbar",grid:{md:4}},{type:"text",path:"toolbar.quickFilters[$index].columnField",labelKey:"config.datagrid.toolbar.quickFilters.columnField",groupId:"toolbar",grid:{md:4}},{type:"text",path:"toolbar.quickFilters[$index].value",labelKey:"config.datagrid.toolbar.quickFilters.value",groupId:"toolbar",grid:{md:4}}]},{type:"color",path:"styles.backgroundColor",labelKey:"config.datagrid.styles.background",groupId:"styles",defaultValue:"#FFFFFF",grid:{md:3}},{type:"color",path:"styles.header.backgroundColor",labelKey:"config.datagrid.styles.headerBg",groupId:"styles",grid:{md:3}},{type:"number",path:"styles.header.fontSize",labelKey:"config.datagrid.styles.headerFontSize",groupId:"styles",rules:{min:10,max:32},grid:{md:3}},{type:"number",path:"styles.row.height",labelKey:"config.datagrid.styles.rowHeight",groupId:"styles",rules:{min:24,max:80},grid:{md:3}},{type:"color",path:"styles.row.hoverColor",labelKey:"config.datagrid.styles.rowHover",groupId:"styles",grid:{md:3}},{type:"switch",path:"styles.row.striped",labelKey:"config.datagrid.styles.striped",groupId:"styles",defaultValue:!1,grid:{md:3}}]},exports.defaultTheme=mt,exports.fontWeight=[100,200,300,400,500,600,700,800,900],exports.fonts=["3XL","2XL","XL","L","M","S","XS"],exports.moleculeConfiguratorsMap={},exports.moleculeItemConfiguratorsMap={},exports.organismConfiguratorsMap=Yer,exports.passwordValidationMapper=tst,exports.richTextDefaultValue=XHt,exports.seoTags=["h1","h2","h3","h4","h5","h6"],exports.sizings=["5XL","4XL","3XL","2XL","XL","L","M","S","XS",0],exports.toast=TWt,exports.toastStyles=Tw,exports.useAccountButtonContext=function(){return e.useContext(vHt)},exports.useApi=_Ht,exports.useButtonActionsContext=fHt,exports.useFormStepContext=bHt,exports.useLayoutContext=Kst,exports.useMediaQuery=zw,exports.useMlrRichTextViewerContext=MT,exports.useOrganismContext=mHt,exports.useStateContext=xHt;
9708
+ `,V4t=QGt(function(e,r){const{children:n}=e,o=Hi(e,F4t);return t.jsx(B4t,S({},o,{ref:r,children:n}))});"production"!==process.env.NODE_ENV&&(V4t.displayName="GridShadowScrollArea"),"production"!==process.env.NODE_ENV&&(V4t.propTypes={children:Vt.exports.node});const H4t=new Intl.Collator;function $4t(e){const r=iYt(),n=s.useRef(null),o=SYt(r,UKt),a=SYt(r,WKt),i=eYt(),[l,c]=s.useState(""),u=(e=>{const{classes:t}=e;return ua({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},rYt,t)})(i),d=SYt(r,qKt),p=SYt(r,l1t),h=SYt(r,u1t),f=s.useMemo(()=>p?Array.from(h.values()):d,[p,h,d]),{sort:m,searchPredicate:v=A4t,autoFocusSearchField:y=!0,disableShowHideToggle:g=!1,disableResetButton:x=!1,toggleAllMode:b="all",getTogglableColumns:k,searchInputProps:w}=e,_=s.useMemo(()=>((e,t)=>{const r=new Set(Object.keys(e).filter(t=>!1===e[t])),n=new Set(Object.keys(t).filter(e=>!1===t[e]));if(r.size!==n.size)return!1;let o=!0;return r.forEach(e=>{n.has(e)||(o=!1)}),o})(a,o),[a,o]),C=s.useMemo(()=>{switch(m){case"asc":return[...f].sort((e,t)=>H4t.compare(e.headerName||e.field,t.headerName||t.field));case"desc":return[...f].sort((e,t)=>-H4t.compare(e.headerName||e.field,t.headerName||t.field));default:return f}},[f,m]),M=e=>{const{name:t}=e.target;r.current.setColumnVisibility(t,!1===a[t])},D=s.useMemo(()=>{const e=k?k(C):null,t=e?C.filter(({field:t})=>e.includes(t)):C;return l?t.filter(e=>v(e,l.toLowerCase())):t},[C,l,v,k]),O=s.useCallback(e=>{const t=S({},WKt(r)),n=k?k(f):null;return("filteredOnly"===b?D:f).forEach(r=>{r.hideable&&(null==n||n.includes(r.field))&&(e?delete t[r.field]:t[r.field]=!1)}),r.current.setColumnVisibilityModel(t)},[r,f,k,b,D]),P=s.useCallback(e=>{c(e.target.value)},[]),E=s.useMemo(()=>D.filter(e=>e.hideable),[D]),j=s.useMemo(()=>E.every(e=>null==a[e.field]||!1!==a[e.field]),[a,E]),T=s.useMemo(()=>E.every(e=>!1===a[e.field]),[a,E]),N=s.useRef(null);s.useEffect(()=>{y?n.current?.focus():N.current&&"function"==typeof N.current.focus&&N.current.focus()},[y]);let R=!1;const z=e=>!1===R&&!1!==e.hideable&&(R=!0,!0),A=s.useCallback(()=>{c(""),n.current?.focus()},[]);return t.jsxs(s.Fragment,{children:[t.jsx(U4t,{className:u.header,ownerState:i,children:t.jsx(G4t,S({as:i.slots.baseTextField,ownerState:i,placeholder:r.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,className:u.searchInput,value:l,onChange:P,size:"small",type:"search",slotProps:{input:{startAdornment:t.jsx(i.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:t.jsx(i.slots.baseIconButton,S({size:"small","aria-label":r.current.getLocaleText("columnsManagementDeleteIconLabel"),style:l?{visibility:"visible"}:{visibility:"hidden"},tabIndex:-1,onClick:A,edge:"end"},i.slotProps?.baseIconButton,{children:t.jsx(i.slots.quickFilterClearIcon,{fontSize:"small"})}))},htmlInput:{"aria-label":r.current.getLocaleText("columnsManagementSearchTitle")}},autoComplete:"off",fullWidth:!0},i.slotProps?.baseTextField,w))}),t.jsx(W4t,{ownerState:i,children:t.jsxs(q4t,{className:u.root,ownerState:i,children:[D.map(e=>t.jsx(i.slots.baseCheckbox,S({className:u.row,disabled:!1===e.hideable||p,checked:!1!==a[e.field],onChange:M,name:e.field,inputRef:z(e)?N:void 0,label:e.headerName||e.field,density:"compact",fullWidth:!0},i.slotProps?.baseCheckbox),e.field)),0===D.length&&t.jsx(K4t,{ownerState:i,children:r.current.getLocaleText("columnsManagementNoColumns")})]})}),g&&x?null:t.jsxs(Y4t,{ownerState:i,className:u.footer,children:[g?t.jsx("span",{}):t.jsx(i.slots.baseCheckbox,S({disabled:0===E.length||p,checked:j,indeterminate:!j&&!T,onChange:()=>O(!j),name:r.current.getLocaleText("columnsManagementShowHideAllText"),label:r.current.getLocaleText("columnsManagementShowHideAllText"),density:"compact"},i.slotProps?.baseCheckbox)),x?null:t.jsx(i.slots.baseButton,S({onClick:()=>r.current.setColumnVisibilityModel(o),disabled:_||p},i.slotProps?.baseButton,{children:r.current.getLocaleText("columnsManagementReset")}))]})]})}"production"!==process.env.NODE_ENV&&($4t.propTypes={autoFocusSearchField:Vt.exports.bool,disableResetButton:Vt.exports.bool,disableShowHideToggle:Vt.exports.bool,getTogglableColumns:Vt.exports.func,searchInputProps:Vt.exports.object,searchPredicate:Vt.exports.func,sort:Vt.exports.oneOf(["asc","desc"]),toggleAllMode:Vt.exports.oneOf(["all","filteredOnly"])});const q4t=ii("div",{name:"MuiDataGrid",slot:"ColumnsManagement"})({display:"flex",flexDirection:"column",padding:RYt.spacing(.5,1.5)}),W4t=ii(V4t,{name:"MuiDataGrid",slot:"ColumnsManagementScrollArea"})({maxHeight:300}),U4t=ii("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader"})({padding:RYt.spacing(1.5,2),borderBottom:`1px solid ${RYt.colors.border.base}`}),G4t=ii(EYt,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput"})({[`& .${Nd.input}::-webkit-search-decoration,\n & .${Nd.input}::-webkit-search-cancel-button,\n & .${Nd.input}::-webkit-search-results-button,\n & .${Nd.input}::-webkit-search-results-decoration`]:{display:"none"}}),Y4t=ii("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter"})({padding:RYt.spacing(1,1,1,1.5),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${RYt.colors.border.base}`}),K4t=ii("div",{name:"MuiDataGrid",slot:"ColumnsManagementEmptyText"})({padding:RYt.spacing(1,0),alignSelf:"center",font:RYt.typography.font.body}),Z4t=QGt(function(e,r){const{children:n,slotProps:o={}}=e,a=o.button||{},i=o.tooltip||{},l=iYt(),c=eYt(),u=Go(),d=Go(),[p,h]=s.useState(!1),f=s.useRef(null),m=Ri(r,f),v=()=>h(!1);return null==n?null:t.jsxs(s.Fragment,{children:[t.jsx(c.slots.baseTooltip,S({title:l.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},c.slotProps?.baseTooltip,i,{children:t.jsx(c.slots.baseButton,S({size:"small",startIcon:t.jsx(c.slots.exportIcon,{}),"aria-expanded":p,"aria-label":l.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":p?d:void 0,id:u},c.slotProps?.baseButton,a,{onClick:e=>{h(e=>!e),a.onClick?.(e)},ref:m,children:l.current.getLocaleText("toolbarExport")}))})),t.jsx(EZt,{open:p,target:f.current,onClose:v,position:"bottom-end",children:t.jsx(c.slots.baseMenuList,{id:d,className:nYt.menuList,"aria-labelledby":u,autoFocusItem:p,children:s.Children.map(n,e=>s.isValidElement(e)?s.cloneElement(e,{hideMenu:v}):e)})})]})});"production"!==process.env.NODE_ENV&&(Z4t.displayName="GridToolbarExportContainer"),"production"!==process.env.NODE_ENV&&(Z4t.propTypes={slotProps:Vt.exports.object});const X4t=["hideMenu","options"],Q4t=["hideMenu","options"],J4t=["csvOptions","printOptions","excelOptions"];function e5t(e){const r=iYt(),n=eYt(),{hideMenu:o,options:a}=e,i=Hi(e,X4t);return t.jsx(n.slots.baseMenuItem,S({onClick:()=>{r.current.exportDataAsCsv(a),o?.()}},i,{children:r.current.getLocaleText("toolbarExportCSV")}))}function t5t(e){const r=iYt(),n=eYt(),{hideMenu:o,options:a}=e,i=Hi(e,Q4t);return t.jsx(n.slots.baseMenuItem,S({onClick:()=>{r.current.exportDataAsPrint(a),o?.()}},i,{children:r.current.getLocaleText("toolbarExportPrint")}))}"production"!==process.env.NODE_ENV&&(e5t.propTypes={hideMenu:Vt.exports.func,options:Vt.exports.shape({allColumns:Vt.exports.bool,delimiter:Vt.exports.string,disableToolbarButton:Vt.exports.bool,escapeFormulas:Vt.exports.bool,fields:Vt.exports.arrayOf(Vt.exports.string),fileName:Vt.exports.string,getRowsToExport:Vt.exports.func,includeColumnGroupsHeaders:Vt.exports.bool,includeHeaders:Vt.exports.bool,shouldAppendQuotes:Vt.exports.bool,utf8WithBom:Vt.exports.bool})}),"production"!==process.env.NODE_ENV&&(t5t.propTypes={hideMenu:Vt.exports.func,options:Vt.exports.shape({allColumns:Vt.exports.bool,bodyClassName:Vt.exports.string,copyStyles:Vt.exports.bool,disableToolbarButton:Vt.exports.bool,fields:Vt.exports.arrayOf(Vt.exports.string),fileName:Vt.exports.string,getRowsToExport:Vt.exports.func,hideFooter:Vt.exports.bool,hideToolbar:Vt.exports.bool,includeCheckboxes:Vt.exports.bool,pageStyle:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string])})});const r5t=QGt(function(e,r){const n=e,{csvOptions:o={},printOptions:a={},excelOptions:i}=n,l=Hi(n,J4t),c=iYt().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:i,csvOptions:o,printOptions:a}).sort((e,t)=>e.componentName>t.componentName?1:-1);return 0===c.length?null:t.jsx(Z4t,S({},l,{ref:r,children:c.map((e,t)=>s.cloneElement(e.component,{key:t}))}))});function n5t(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const r=e.length;if(r!==t.length)return!1;for(let n=0;n<r;n+=1)if(!n5t(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const r=Array.from(e.entries());for(let e=0;e<r.length;e+=1)if(!t.has(r[e][0]))return!1;for(let e=0;e<r.length;e+=1){const n=r[e];if(!n5t(n[1],t.get(n[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const r=Array.from(e.entries());for(let e=0;e<r.length;e+=1)if(!t.has(r[e][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const r=e.length;if(r!==t.length)return!1;for(let n=0;n<r;n+=1)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=r.length;if(n!==Object.keys(t).length)return!1;for(let e=0;e<n;e+=1)if(!Object.prototype.hasOwnProperty.call(t,r[e]))return!1;for(let o=0;o<n;o+=1){const n=r[o];if(!n5t(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}"production"!==process.env.NODE_ENV&&(r5t.displayName="GridToolbarExport"),"production"!==process.env.NODE_ENV&&(r5t.propTypes={csvOptions:Vt.exports.object,printOptions:Vt.exports.object,slotProps:Vt.exports.object});const o5t=s.createContext(void 0);function a5t(){const e=s.useContext(o5t);if(void 0===e)throw new Error("MUI X: Missing context. Quick Filter subcomponents must be placed within a <QuickFilter /> component.");return e}"production"!==process.env.NODE_ENV&&(o5t.displayName="QuickFilterContext");const i5t=["render","className","parser","formatter","debounceMs","defaultExpanded","expanded","onExpandedChange"],s5t=e=>e.split(" ").filter(e=>""!==e),l5t=e=>e.join(" ");function c5t(e){const r=eYt(),{render:n,className:o,parser:a=s5t,formatter:i=l5t,debounceMs:l=r.filterDebounceMs,defaultExpanded:c,expanded:u,onExpandedChange:d}=e,p=Hi(e,i5t),h=iYt(),f=s.useRef(null),m=s.useRef(null),v=SYt(h,wXt),[y,g]=s.useState(i(v??[])),[x,b]=s.useState(c??y.length>0),k=u??x,w=s.useMemo(()=>({value:y,expanded:k}),[y,k]),_="function"==typeof o?o(w):o,C=s.useRef(null),M=Go(),D=s.useCallback(e=>{d&&d(e),void 0===u&&b(e)},[d,u]),O=s.useRef(v);s.useEffect(()=>{n5t(O.current,v)||(O.current=v,g(e=>n5t(a(e),v)?e:i(v??[])))},[v,i,a]);const P=s.useRef(!0),E=s.useRef(k);s.useEffect(()=>{P.current?P.current=!1:E.current!==k&&(k?requestAnimationFrame(()=>{f.current?.focus({preventScroll:!0})}):m.current?.focus({preventScroll:!0}),E.current=k)},[k]);const j=s.useMemo(()=>Di(e=>{const t=a(e);O.current=t,h.current.setQuickFilterValues(t)},l),[h,l,a]);s.useEffect(()=>j.clear,[j]);const T=s.useCallback(e=>{const t=e.target.value;g(t),j(t)},[j]),N=s.useCallback(()=>{g(""),h.current.setQuickFilterValues([]),f.current?.focus()},[h,f]),R=s.useMemo(()=>({controlRef:f,triggerRef:m,state:w,controlId:M,clearValue:N,onValueChange:T,onExpandedChange:D}),[M,w,T,N,D]);po(()=>{C.current&&m.current&&C.current.style.setProperty("--trigger-width",`${m.current?.offsetWidth}px`)},[]);const z=T0t("div",n,S({className:_},p,{ref:C}),w);return t.jsx(o5t.Provider,{value:R,children:z})}"production"!==process.env.NODE_ENV&&(c5t.propTypes={className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),debounceMs:Vt.exports.number,defaultExpanded:Vt.exports.bool,expanded:Vt.exports.bool,formatter:Vt.exports.func,onExpandedChange:Vt.exports.func,parser:Vt.exports.func,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func])});const u5t=["render","className","slotProps","onKeyDown","onChange"],d5t=QGt(function(e,r){const{render:n,className:o,slotProps:a,onKeyDown:i,onChange:l}=e,c=Hi(e,u5t),u=eYt(),{state:d,controlId:p,controlRef:h,onValueChange:f,onExpandedChange:m,clearValue:v}=a5t(),y="function"==typeof o?o(d):o,g=Ri(h,r),x=T0t(u.slots.baseTextField,n,S({},u.slotProps?.baseTextField,{slotProps:S({htmlInput:S({role:"searchbox",id:p,tabIndex:d.expanded?void 0:-1},a?.htmlInput,{onBlur:e=>{""===d.value&&m(!1),a?.htmlInput?.onBlur?.(e)}})},a),value:d.value,className:y},c,{onChange:e=>{d.expanded||m(!0),f(e),l?.(e)},onKeyDown:e=>{"Escape"===e.key&&(""===d.value?m(!1):v()),i?.(e)},ref:g}),d);return t.jsx(s.Fragment,{children:x})});"production"!==process.env.NODE_ENV&&(d5t.displayName="QuickFilterControl"),"production"!==process.env.NODE_ENV&&(d5t.propTypes={autoComplete:Vt.exports.string,autoFocus:Vt.exports.bool,className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),color:Vt.exports.oneOf(["error","primary"]),disabled:Vt.exports.bool,error:Vt.exports.bool,fullWidth:Vt.exports.bool,helperText:Vt.exports.string,id:Vt.exports.string,inputRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.object})]),label:Vt.exports.node,multiline:Vt.exports.bool,placeholder:Vt.exports.string,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["medium","small"]),slotProps:Vt.exports.object,style:Vt.exports.object,tabIndex:Vt.exports.number,type:Vt.exports.oneOfType([Vt.exports.oneOf(["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"]),Vt.exports.object]),value:Vt.exports.string});const p5t=["render","className","onClick"],h5t=QGt(function(e,r){const{render:n,className:o,onClick:a}=e,i=Hi(e,p5t),l=eYt(),{state:c,clearValue:u}=a5t(),d="function"==typeof o?o(c):o,p=T0t(l.slots.baseIconButton,n,S({},l.slotProps?.baseIconButton,{className:d,tabIndex:-1},i,{onClick:e=>{u(),a?.(e)},ref:r}),c);return t.jsx(s.Fragment,{children:p})});"production"!==process.env.NODE_ENV&&(h5t.displayName="QuickFilterClear"),"production"!==process.env.NODE_ENV&&(h5t.propTypes={className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),color:Vt.exports.oneOf(["default","inherit","primary"]),disabled:Vt.exports.bool,edge:Vt.exports.oneOf(["end","start",!1]),id:Vt.exports.string,label:Vt.exports.string,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const f5t=["render","className","onClick"],m5t=QGt(function(e,r){const{render:n,className:o,onClick:a}=e,i=Hi(e,f5t),l=eYt(),{state:c,controlId:u,onExpandedChange:d,triggerRef:p}=a5t(),h="function"==typeof o?o(c):o,f=Ri(p,r),m=T0t(l.slots.baseButton,n,S({},l.slotProps?.baseButton,{className:h,"aria-controls":u,"aria-expanded":c.expanded},i,{onClick:e=>{d(!c.expanded),a?.(e)},ref:f}),c);return t.jsx(s.Fragment,{children:m})});"production"!==process.env.NODE_ENV&&(m5t.displayName="QuickFilterTrigger"),"production"!==process.env.NODE_ENV&&(m5t.propTypes={className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),disabled:Vt.exports.bool,id:Vt.exports.string,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),startIcon:Vt.exports.node,style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const v5t=["quickFilterParser","quickFilterFormatter","debounceMs","className","slotProps"],y5t=["ref","slotProps"],g5t=so("div",{name:"MuiDataGrid",slot:"ToolbarQuickFilter"})({display:"grid",alignItems:"center"}),x5t=so(L0t,{name:"MuiDataGrid",slot:"ToolbarQuickFilterTrigger"})(({ownerState:e})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:e.expanded?0:1,pointerEvents:e.expanded?"none":"auto",transition:RYt.transition(["opacity"])})),b5t=so(e=>{throw new Error("Failed assertion: should not be rendered")},{name:"MuiDataGrid",slot:"ToolbarQuickFilterControl"})(({ownerState:e})=>({gridArea:"1 / 1",overflowX:"clip",width:e.expanded?260:"var(--trigger-width)",opacity:e.expanded?1:0,transition:RYt.transition(["width","opacity"])}));function k5t(e){const r=iYt(),n=eYt(),o={classes:n.classes,expanded:!1},a=(e=>{const{classes:t}=e;return ua({root:["toolbarQuickFilter"],trigger:["toolbarQuickFilterTrigger"],control:["toolbarQuickFilterControl"]},rYt,t)})(o),{quickFilterParser:i,quickFilterFormatter:s,debounceMs:l,className:c,slotProps:u}=e,d=Hi(e,v5t);return t.jsx(c5t,{parser:i,formatter:s,debounceMs:l,render:(e,i)=>{const s=S({},o,{expanded:i.expanded});return t.jsxs(g5t,S({},e,{className:Wn(a.root,c),children:[t.jsx(m5t,{render:e=>t.jsx(n.slots.baseTooltip,{title:r.current.getLocaleText("toolbarQuickFilterLabel"),enterDelay:0,children:t.jsx(x5t,S({className:a.trigger},e,{ownerState:s,color:"default","aria-disabled":i.expanded,children:t.jsx(n.slots.quickFilterIcon,{fontSize:"small"})}))})}),t.jsx(d5t,{render:e=>{let{ref:o,slotProps:i}=e,l=Hi(e,y5t);return t.jsx(b5t,S({as:n.slots.baseTextField,className:a.control,ownerState:s,inputRef:o,"aria-label":r.current.getLocaleText("toolbarQuickFilterLabel"),placeholder:r.current.getLocaleText("toolbarQuickFilterPlaceholder"),size:"small",slotProps:S({input:S({startAdornment:t.jsx(n.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:l.value?t.jsx(h5t,{render:t.jsx(n.slots.baseIconButton,{size:"small",edge:"end","aria-label":r.current.getLocaleText("toolbarQuickFilterDeleteIconLabel"),children:t.jsx(n.slots.quickFilterClearIcon,{fontSize:"small"})})}):null},i?.input)},i)},n.slotProps?.baseTextField,l,u?.root,d))}})]}))}})}"production"!==process.env.NODE_ENV&&(k5t.propTypes={className:Vt.exports.string,debounceMs:Vt.exports.number,quickFilterFormatter:Vt.exports.func,quickFilterParser:Vt.exports.func,slotProps:Vt.exports.object});const w5t=["render","className","onClick","onPointerUp"],_5t=QGt(function(e,r){const{render:n,className:o,onClick:a,onPointerUp:i}=e,l=Hi(e,w5t),c=eYt(),u=Go(),d=Go(),p=iYt(),h=SYt(p,N1t),f=h.open&&h.openedPanelValue===z1t.filters,m=SYt(p,AXt).length,v={open:f,filterCount:m},y="function"==typeof o?o(v):o,{filterPanelTriggerRef:g}=x0t(),x=Ri(r,g),b=T0t(c.slots.baseButton,n,S({},c.slotProps?.baseButton,{id:u,"aria-haspopup":"true","aria-expanded":f?"true":void 0,"aria-controls":f?d:void 0,onClick:e=>{f?p.current.hidePreferences():p.current.showPreferences(z1t.filters,d,u),a?.(e)},onPointerUp:e=>{f&&e.stopPropagation(),i?.(e)},className:y},l,{ref:x}),v);return t.jsx(s.Fragment,{children:b})});"production"!==process.env.NODE_ENV&&(_5t.displayName="FilterPanelTrigger"),"production"!==process.env.NODE_ENV&&(_5t.propTypes={className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),disabled:Vt.exports.bool,id:Vt.exports.string,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),startIcon:Vt.exports.node,style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const C5t=["render","className","onClick","onPointerUp"],M5t=QGt(function(e,r){const{render:n,className:o,onClick:a,onPointerUp:i}=e,l=Hi(e,C5t),c=eYt(),u=Go(),d=Go(),p=iYt(),h=SYt(p,N1t),f=h.open&&h.openedPanelValue===z1t.columns,m={open:f},v="function"==typeof o?o(m):o,{columnsPanelTriggerRef:y}=x0t(),g=Ri(r,y),x=T0t(c.slots.baseButton,n,S({},c.slotProps?.baseButton,{id:u,"aria-haspopup":"true","aria-expanded":f?"true":void 0,"aria-controls":f?d:void 0,className:v},l,{onPointerUp:e=>{f&&e.stopPropagation(),i?.(e)},onClick:e=>{f?p.current.hidePreferences():p.current.showPreferences(z1t.columns,d,u),a?.(e)},ref:g}),m);return t.jsx(s.Fragment,{children:x})});"production"!==process.env.NODE_ENV&&(M5t.displayName="ColumnsPanelTrigger"),"production"!==process.env.NODE_ENV&&(M5t.propTypes={className:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),disabled:Vt.exports.bool,id:Vt.exports.string,render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),startIcon:Vt.exports.node,style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const S5t=["render","options","onClick"],D5t=QGt(function(e,r){const{render:n,options:o,onClick:a}=e,i=Hi(e,S5t),l=eYt(),c=iYt(),u=T0t(l.slots.baseButton,n,S({},l.slotProps?.baseButton,{onClick:e=>{c.current.exportDataAsCsv(o),a?.(e)}},i,{ref:r}));return t.jsx(s.Fragment,{children:u})});"production"!==process.env.NODE_ENV&&(D5t.displayName="ExportCsv"),"production"!==process.env.NODE_ENV&&(D5t.propTypes={className:Vt.exports.string,disabled:Vt.exports.bool,id:Vt.exports.string,options:Vt.exports.shape({allColumns:Vt.exports.bool,delimiter:Vt.exports.string,escapeFormulas:Vt.exports.bool,fields:Vt.exports.arrayOf(Vt.exports.string),fileName:Vt.exports.string,getRowsToExport:Vt.exports.func,includeColumnGroupsHeaders:Vt.exports.bool,includeHeaders:Vt.exports.bool,shouldAppendQuotes:Vt.exports.bool,utf8WithBom:Vt.exports.bool}),render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),startIcon:Vt.exports.node,style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const O5t=["render","options","onClick"],P5t=QGt(function(e,r){const{render:n,options:o,onClick:a}=e,i=Hi(e,O5t),l=eYt(),c=iYt(),u=T0t(l.slots.baseButton,n,S({},l.slotProps?.baseButton,{onClick:e=>{c.current.exportDataAsPrint(o),a?.(e)}},i,{ref:r}));return t.jsx(s.Fragment,{children:u})});"production"!==process.env.NODE_ENV&&(P5t.displayName="ExportPrint"),"production"!==process.env.NODE_ENV&&(P5t.propTypes={className:Vt.exports.string,disabled:Vt.exports.bool,id:Vt.exports.string,options:Vt.exports.shape({allColumns:Vt.exports.bool,bodyClassName:Vt.exports.string,copyStyles:Vt.exports.bool,fields:Vt.exports.arrayOf(Vt.exports.string),fileName:Vt.exports.string,getRowsToExport:Vt.exports.func,hideFooter:Vt.exports.bool,hideToolbar:Vt.exports.bool,includeCheckboxes:Vt.exports.bool,pageStyle:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string])}),render:Vt.exports.oneOfType([Vt.exports.element,Vt.exports.func]),role:Vt.exports.string,size:Vt.exports.oneOf(["large","medium","small"]),startIcon:Vt.exports.node,style:Vt.exports.object,tabIndex:Vt.exports.number,title:Vt.exports.string,touchRippleRef:Vt.exports.any});const E5t=["className"],j5t=["className"],T5t=e=>{const{classes:t}=e;return ua({divider:["toolbarDivider"],label:["toolbarLabel"]},rYt,t)},N5t=so(EYt,{name:"MuiDataGrid",slot:"ToolbarDivider"})({height:"50%",margin:RYt.spacing(0,.5)}),R5t=so("span",{name:"MuiDataGrid",slot:"ToolbarLabel"})({flex:1,font:RYt.typography.font.large,fontWeight:RYt.typography.fontWeight.medium,margin:RYt.spacing(0,.5),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"});function z5t(e){const r=Hi(e,E5t),n=eYt(),o=T5t(n);return t.jsx(N5t,S({as:n.slots.baseDivider,orientation:"vertical",className:o.divider},r))}function A5t(e){const r=Hi(e,j5t),n=eYt(),o=T5t(n);return t.jsx(R5t,S({className:o.label},r))}function F5t(e){const{showQuickFilter:r=!0,quickFilterProps:n,csvOptions:o,printOptions:a,additionalItems:i,additionalExportMenuItems:l}=e,c=iYt(),u=eYt(),[d,p]=s.useState(!1),h=s.useRef(null),f=Go(),m=Go(),v=!o?.disableToolbarButton||!a?.disableToolbarButton||l,y=()=>p(!1);return t.jsxs(F0t,{children:[u.label&&t.jsx(A5t,{children:u.label}),!u.disableColumnSelector&&t.jsx(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarColumns"),children:t.jsx(M5t,{render:t.jsx(L0t,{}),children:t.jsx(u.slots.columnSelectorIcon,{fontSize:"small"})})}),!u.disableColumnFilter&&t.jsx(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarFilters"),children:t.jsx(_5t,{render:(e,r)=>t.jsx(L0t,S({},e,{color:r.filterCount>0?"primary":"default",children:t.jsx(u.slots.baseBadge,{badgeContent:r.filterCount,color:"primary",variant:"dot",children:t.jsx(u.slots.openFilterButtonIcon,{fontSize:"small"})})}))})}),i,v&&(!u.disableColumnFilter||!u.disableColumnSelector)&&t.jsx(z5t,{}),v&&t.jsxs(s.Fragment,{children:[t.jsx(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarExport"),disableInteractive:d,children:t.jsx(L0t,{ref:h,id:m,"aria-controls":f,"aria-haspopup":"true","aria-expanded":d?"true":void 0,onClick:()=>p(!d),children:t.jsx(u.slots.exportIcon,{fontSize:"small"})})}),t.jsx(EZt,{target:h.current,open:d,onClose:y,position:"bottom-end",children:t.jsxs(u.slots.baseMenuList,S({id:f,"aria-labelledby":m,autoFocusItem:!0},u.slotProps?.baseMenuList,{children:[!a?.disableToolbarButton&&t.jsx(P5t,{render:t.jsx(u.slots.baseMenuItem,S({},u.slotProps?.baseMenuItem)),options:a,onClick:y,children:c.current.getLocaleText("toolbarExportPrint")}),!o?.disableToolbarButton&&t.jsx(D5t,{render:t.jsx(u.slots.baseMenuItem,S({},u.slotProps?.baseMenuItem)),options:o,onClick:y,children:c.current.getLocaleText("toolbarExportCSV")}),l?.(y)]}))})]}),r&&t.jsxs(s.Fragment,{children:[t.jsx(z5t,{}),t.jsx(k5t,S({},n))]})]})}"production"!==process.env.NODE_ENV&&(z5t.propTypes={className:Vt.exports.string,orientation:Vt.exports.oneOf(["horizontal","vertical"])}),"production"!==process.env.NODE_ENV&&(F5t.propTypes={additionalExportMenuItems:Vt.exports.func,additionalItems:Vt.exports.node,csvOptions:Vt.exports.object,printOptions:Vt.exports.object,quickFilterProps:Vt.exports.shape({className:Vt.exports.string,debounceMs:Vt.exports.number,quickFilterFormatter:Vt.exports.func,quickFilterParser:Vt.exports.func,slotProps:Vt.exports.object}),showQuickFilter:Vt.exports.bool,slotProps:Vt.exports.object,sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object])});const I5t=["className","selectedRowCount"],L5t=so("div",{name:"MuiDataGrid",slot:"SelectedRowCount"})({alignItems:"center",display:"flex",margin:RYt.spacing(0,2),visibility:"hidden",width:0,height:0,[RYt.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}),B5t=QGt(function(e,r){const{className:n,selectedRowCount:o}=e,a=Hi(e,I5t),i=iYt(),s=eYt(),l=(e=>{const{classes:t}=e;return ua({root:["selectedRowCount"]},rYt,t)})(s),c=i.current.getLocaleText("footerRowSelected")(o);return t.jsx(L5t,S({className:Wn(l.root,n),ownerState:s},a,{ref:r,children:c}))});"production"!==process.env.NODE_ENV&&(B5t.displayName="GridSelectedRowCount"),"production"!==process.env.NODE_ENV&&(B5t.propTypes={selectedRowCount:Vt.exports.number.isRequired,sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object])});const V5t=QGt(function(e,r){const n=iYt(),o=eYt(),a=SYt(n,$Yt),i=SYt(n,BXt),s=SYt(n,RXt),l=!o.hideFooterSelectedRowCount&&i>0?t.jsx(B5t,{selectedRowCount:i}):t.jsx("div",{}),c=o.hideFooterRowCount||o.pagination?null:t.jsx(o.slots.footerRowCount,S({},o.slotProps?.footerRowCount,{rowCount:a,visibleRowCount:s})),u=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&t.jsx(o.slots.pagination,{});return t.jsxs(O0t,S({},e,{ref:r,children:[l,c,u]}))});"production"!==process.env.NODE_ENV&&(V5t.displayName="GridFooter"),"production"!==process.env.NODE_ENV&&(V5t.propTypes={sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object])});const H5t=(e,t,r,n,o,a)=>{let i;switch(e){case tXt.LEFT:i=n[r];break;case tXt.RIGHT:i=o-n[r]-t+a;break;default:i=void 0}return i},$5t=(e,t,r,n,o)=>{const a=t===r-1;return!(e!==tXt.LEFT||!a)||!!n&&(e===tXt.LEFT||(e===tXt.RIGHT?!a:!a||o))},q5t=(e,t)=>e===tXt.RIGHT&&0===t,W5t={root:nYt.scrollbarFiller,header:nYt["scrollbarFiller--header"],borderTop:nYt["scrollbarFiller--borderTop"],borderBottom:nYt["scrollbarFiller--borderBottom"],pinnedRight:nYt["scrollbarFiller--pinnedRight"]};function U5t({header:e,borderTop:r=!0,borderBottom:n,pinnedRight:o}){return t.jsx("div",{role:"presentation",className:Wn(W5t.root,e&&W5t.header,r&&W5t.borderTop,n&&W5t.borderBottom,o&&W5t.pinnedRight)})}const G5t=["skeletonRowsCount","visibleColumns","showFirstRowBorder"],Y5t=so("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay"})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),K5t=e=>parseInt(e.getAttribute("data-colindex"),10),Z5t=QGt(function(e,r){const n=eYt(),{slots:o}=n,a=Vo(),i=(e=>{const{classes:t}=e;return ua({root:["skeletonLoadingOverlay"]},rYt,t)})({classes:n.classes}),l=s.useRef(null),c=Ri(l,r),u=iYt(),d=SYt(u,IGt),p=SYt(u,LGt),h=SYt(u,JKt),f=s.useMemo(()=>h.filter(e=>e<=p).length,[p,h]),{skeletonRowsCount:m,visibleColumns:v,showFirstRowBorder:y}=e,g=Hi(e,G5t),x=SYt(u,GKt),b=s.useMemo(()=>x.slice(0,f),[x,f]),k=SYt(u,XKt),w=s.useCallback(e=>-1!==k.left.findIndex(t=>t.field===e)?tXt.LEFT:-1!==k.right.findIndex(t=>t.field===e)?tXt.RIGHT:void 0,[k.left,k.right]),_=s.useMemo(()=>{const e=[];for(let r=0;r<m;r+=1){const i=[];for(let e=0;e<b.length;e+=1){const s=b[e],l=w(s.field),c=l===tXt.LEFT,u=l===tXt.RIGHT,p=Z1t(l,a),f=p?k[p].length:b.length-k.left.length-k.right.length,m=p?k[p].findIndex(e=>e.field===s.field):e-k.left.length,y=d.hasScrollY?d.scrollbarSize:0,g=X1t({},a,l,H5t(l,s.computedWidth,e,h,d.columnsTotalWidth,y)),x=d.columnsTotalWidth<d.viewportOuterSize.width,_=$5t(l,m,f,n.showCellVerticalBorder,x),C=q5t(l,m),M=e===b.length-1,D=u&&0===m,O=D&&x,P=M&&!D&&x,E=d.viewportOuterSize.width-d.columnsTotalWidth,j=Math.max(0,E),T=t.jsx(o.skeletonCell,{width:j,empty:!0},`skeleton-filler-column-${r}`),N=M&&0!==y;O&&i.push(T),i.push(t.jsx(o.skeletonCell,{field:s.field,type:s.type,align:s.align,width:"var(--width)",height:d.rowHeight,"data-colindex":e,empty:v&&!v.has(s.field),className:Wn(c&&nYt["cell--pinnedLeft"],u&&nYt["cell--pinnedRight"],_&&nYt["cell--withRightBorder"],C&&nYt["cell--withLeftBorder"]),style:S({"--width":`${s.computedWidth}px`},g)},`skeleton-column-${r}-${s.field}`)),P&&i.push(T),N&&i.push(t.jsx(U5t,{pinnedRight:k.right.length>0},`skeleton-scrollbar-filler-${r}`))}e.push(t.jsx("div",{className:Wn(nYt.row,nYt.rowSkeleton,0===r&&!y&&nYt["row--firstVisible"]),children:i},`skeleton-row-${r}`))}return e},[m,b,w,a,k,d.hasScrollY,d.scrollbarSize,d.columnsTotalWidth,d.viewportOuterSize.width,d.rowHeight,h,n.showCellVerticalBorder,o,v,y]);return pYt(u,"columnResize",e=>{const{colDef:t,width:r}=e,n=l.current?.querySelectorAll(`[data-field="${$0t(t.field)}"]`);if(!n)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const o=b.findIndex(e=>e.field===t.field),a=w(t.field),i=a===tXt.LEFT,s=a===tXt.RIGHT,c=getComputedStyle(n[0]).getPropertyValue("--width"),u=parseInt(c,10)-r;if(n&&n.forEach(e=>{e.style.setProperty("--width",`${r}px`)}),i){const e=l.current?.querySelectorAll(`.${nYt["cell--pinnedLeft"]}`);e?.forEach(e=>{K5t(e)>o&&(e.style.left=parseInt(getComputedStyle(e).left,10)-u+"px")})}if(s){const e=l.current?.querySelectorAll(`.${nYt["cell--pinnedRight"]}`);e?.forEach(e=>{K5t(e)<o&&(e.style.right=`${parseInt(getComputedStyle(e).right,10)+u}px`)})}}),t.jsx(Y5t,S({className:i.root},g,{ref:c,children:_}))});"production"!==process.env.NODE_ENV&&(Z5t.displayName="GridSkeletonLoadingOverlayInner");const X5t=QGt(function(e,r){const n=SYt(iYt(),IGt),o=n?.viewportInnerSize.height??0,a=Math.ceil(o/n.rowHeight);return t.jsx(Z5t,S({},e,{skeletonRowsCount:a,ref:r}))});"production"!==process.env.NODE_ENV&&(X5t.displayName="GridSkeletonLoadingOverlay");const Q5t=["variant","noRowsVariant","style"],J5t={"circular-progress":{component:e=>e.slots.baseCircularProgress,style:{}},"linear-progress":{component:e=>e.slots.baseLinearProgress,style:{display:"block"}},skeleton:{component:()=>X5t,style:{display:"block"}}},e3t=QGt(function(e,r){const{variant:n="linear-progress",noRowsVariant:o="skeleton",style:a}=e,i=Hi(e,Q5t),s=iYt(),l=eYt(),c=SYt(s,VYt),u=J5t[0===c?o:n],d=u.component(l);return t.jsx(j0t,S({style:S({},u.style,a)},i,{ref:r,children:t.jsx(d,{})}))});"production"!==process.env.NODE_ENV&&(e3t.displayName="GridLoadingOverlay"),"production"!==process.env.NODE_ENV&&(e3t.propTypes={noRowsVariant:Vt.exports.oneOf(["circular-progress","linear-progress","skeleton"]),sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object]),variant:Vt.exports.oneOf(["circular-progress","linear-progress","skeleton"])});const t3t=QGt(function(e,r){const n=iYt().current.getLocaleText("noRowsLabel");return t.jsx(j0t,S({},e,{ref:r,children:n}))});"production"!==process.env.NODE_ENV&&(t3t.displayName="GridNoRowsOverlay"),"production"!==process.env.NODE_ENV&&(t3t.propTypes={sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object])});const r3t=QGt(function(e,r){const n=eYt(),o=iYt(),a=SYt(o,HKt),i=!n.disableColumnSelector&&a.length>0;return t.jsxs(j0t,S({},e,{ref:r,children:[o.current.getLocaleText("noColumnsOverlayLabel"),i&&t.jsx(n.slots.baseButton,S({size:"small"},n.slotProps?.baseButton,{onClick:()=>{o.current.showPreferences(z1t.columns)},children:o.current.getLocaleText("noColumnsOverlayManageColumns")}))]}))});"production"!==process.env.NODE_ENV&&(r3t.displayName="GridNoColumnsOverlay"),"production"!==process.env.NODE_ENV&&(r3t.propTypes={sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object])});const n3t=ii(EYt)({maxHeight:"calc(100% + 1px)",flexGrow:1});function o3t(){const e=iYt(),r=eYt(),n=SYt(e,dQt),o=SYt(e,pQt),a=SYt(e,vQt),{paginationMode:i,loading:l}=r,c=-1===o&&"server"===i&&l,u=s.useMemo(()=>Math.max(0,a-1),[a]),d=s.useMemo(()=>-1===o||n.page<=u?n.page:u,[u,n.page,o]),p=s.useCallback(t=>{e.current.setPageSize(t)},[e]),h=s.useCallback((t,r)=>{e.current.setPage(r)},[e]),f=e=>{for(let t=0;t<r.pageSizeOptions.length;t+=1){const n=r.pageSizeOptions[t];if("number"==typeof n){if(n===e)return!0}else if(n.value===e)return!0}return!1};if("production"!==process.env.NODE_ENV){const e=s.useRef(!1),t=r.paginationModel?.pageSize??n.pageSize;e.current||r.autoPageSize||f(t)||(console.warn([`MUI X: The page size \`${n.pageSize}\` is not present in the \`pageSizeOptions\`.`,"Add it to show the pagination select."].join("\n")),e.current=!0)}const m=f(n.pageSize)?r.pageSizeOptions:[];return t.jsx(n3t,{as:r.slots.basePagination,count:o,page:d,rowsPerPageOptions:m,rowsPerPage:n.pageSize,onPageChange:h,onRowsPerPageChange:p,disabled:c})}"production"!==process.env.NODE_ENV&&(o3t.propTypes={component:Vt.exports.elementType});const a3t=["className","rowCount","visibleRowCount"],i3t=so("div",{name:"MuiDataGrid",slot:"RowCount"})({alignItems:"center",display:"flex",margin:RYt.spacing(0,2)}),s3t=QGt(function(e,r){const{className:n,rowCount:o,visibleRowCount:a}=e,i=Hi(e,a3t),s=iYt(),l=eYt(),c=(e=>{const{classes:t}=e;return ua({root:["rowCount"]},rYt,t)})(l);if(0===o)return null;const u=a<o?s.current.getLocaleText("footerTotalVisibleRows")(a,o):o.toLocaleString();return t.jsxs(i3t,S({className:Wn(c.root,n),ownerState:l},i,{ref:r,children:[s.current.getLocaleText("footerTotalRows")," ",u]}))});"production"!==process.env.NODE_ENV&&(s3t.displayName="GridRowCount"),"production"!==process.env.NODE_ENV&&(s3t.propTypes={rowCount:Vt.exports.number.isRequired,sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object]),visibleRowCount:Vt.exports.number.isRequired});const l3t=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNotVisible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],c3t=RGt(E1t,(e,t)=>{if(!t)return!1;return!!hXt(e)}),u3t=QGt(function(e,r){const{selected:n,rowId:o,row:a,index:i,style:l,rowHeight:c,className:u,visibleColumns:d,pinnedColumns:p,offsetLeft:h,columnsTotalWidth:f,firstColumnIndex:m,lastColumnIndex:v,focusedColumnIndex:y,isFirstVisible:g,isLastVisible:x,isNotVisible:b,showBottomBorder:k,scrollbarWidth:w,gridHasFiller:_,onClick:C,onDoubleClick:M,onMouseEnter:D,onMouseLeave:O,onMouseOut:P,onMouseOver:E}=e,j=Hi(e,l3t),T=wJt(),N=CZt(),R=s.useRef(null),z=eYt(),A=PJt(T),F=SYt(T,yXt),I=SYt(T,XYt),L=SYt(T,JKt),B=z.rowReordering,V=SYt(T,c3t,B),H=Ri(R,r),$=GYt(T,o),q=SYt(T,j1t,{rowId:o,editMode:z.editMode}),W=z.editMode===kKt.Row,U=void 0!==y,G=U&&y>=p.left.length&&y<m,Y=U&&y<d.length-p.right.length&&y>=v,K=function(e,t){return ua(t,rYt,e)}(z.classes,{root:["row",n&&"selected",W&&"row--editable",q&&"row--editing",g&&"row--firstVisible",x&&"row--lastVisible",k&&"row--borderBottom","auto"===c&&"row--dynamicHeight"]}),Z=N.hooks.useGridRowAriaAttributes();s.useLayoutEffect(()=>{if(A.range){const e=T.current.getRowIndexRelativeToVisibleRows(o);void 0!==e&&T.current.unstable_setLastMeasuredRowIndex(e)}if(R.current&&"auto"===c)return T.current.observeRowHeight(R.current,o)},[T,A.range,c,o]);const X=s.useCallback((e,t)=>r=>{W0t(r)||T.current.getRow(o)&&(T.current.publishEvent(e,T.current.getRowParams(o),r),t&&t(r))},[T,o]),Q=s.useCallback(e=>{const t=H0t(e.target,nYt.cell),r=t?.getAttribute("data-field");if(r){if(r===MQt.field)return;if(r===eXt)return;if("__reorder__"===r)return;if(T.current.getCellMode(o,r)===wKt.Edit)return;const e=T.current.getColumn(r);if(e?.type===RZt)return}X("rowClick",C)(e)},[T,C,X,o]),{slots:J,slotProps:ee,disableColumnReorder:te}=z,re=SYt(T,()=>S({},T.current.getRowHeightEntry(o)),void 0,kYt),ne=s.useMemo(()=>{if(b)return{opacity:0,width:0,height:0};const e=S({},l,{maxHeight:"auto"===c?"none":c,minHeight:c,"--height":"number"==typeof c?`${c}px`:c});if(re.spacingTop){e["border"===z.rowSpacingType?"borderTopWidth":"marginTop"]=re.spacingTop}if(re.spacingBottom){const t="border"===z.rowSpacingType?"borderBottomWidth":"marginBottom";let r=e[t];"number"!=typeof r&&(r=parseInt(r||"0",10)),r+=re.spacingBottom,e[t]=r}return e},[b,c,l,re,z.rowSpacingType]),oe=T.current.unstable_applyPipeProcessors("rowClassName",[],o),ae=Z($,i);if("function"==typeof z.getRowClassName){const e=i-(A.range?.firstRowIndex||0),t=S({},T.current.getRowParams(o),{isFirstVisible:0===e,isLastVisible:e===A.rows.length-1,indexRelativeToCurrentPage:e});oe.push(z.getRowClassName(t))}const ie=(e,r,n,i,s=tXt.NONE)=>{const l=T.current.unstable_getCellColSpanInfo(o,n);if(l?.spannedByColSpan)return null;const u=l?.cellProps.width??e.computedWidth,d=l?.cellProps.colSpan??1,p=H5t(s,e.computedWidth,n,L,f,w);if("skeletonRow"===$.type)return t.jsx(J.skeletonCell,{type:e.type,width:u,height:c,field:e.field,align:e.align},e.field);const h="__reorder__"===e.field,m=!(te||e.disableReorder),v=V&&!F.length&&I<=1,y=!(m||h&&v),g=s===tXt.VIRTUAL,x=q5t(s,r),b=$5t(s,r,i,z.showCellVerticalBorder,_);return t.jsx(J.cell,S({column:e,width:u,rowId:o,align:e.align||"left",colIndex:n,colSpan:d,disableDragEvents:y,isNotVisible:g,pinnedOffset:p,pinnedPosition:s,showLeftBorder:x,showRightBorder:b,row:a,rowNode:$},ee?.cell),e.field)};"production"!==process.env.NODE_ENV&&(ie.displayName="getCell");const se=p.left.map((e,t)=>ie(e,t,t,p.left.length,tXt.LEFT)),le=p.right.map((e,t)=>{const r=d.length-p.right.length+t;return ie(e,t,r,p.right.length,tXt.RIGHT)}),ce=d.length-p.left.length-p.right.length,ue=[];G&&ue.push(ie(d[y],y-p.left.length,y,ce,tXt.VIRTUAL));for(let e=m;e<v;e+=1){const t=d[e],r=e-p.left.length;t&&ue.push(ie(t,r,e,ce))}Y&&ue.push(ie(d[y],y-p.left.length,y,ce,tXt.VIRTUAL));const de=a?{onClick:Q,onDoubleClick:X("rowDoubleClick",M),onMouseEnter:X("rowMouseEnter",D),onMouseLeave:X("rowMouseLeave",O),onMouseOut:X("rowMouseOut",P),onMouseOver:X("rowMouseOver",E)}:null;return t.jsxs("div",S({"data-id":o,"data-rowindex":i,role:"row",className:Wn(...oe,K.root,u),style:ne},ae,de,j,{ref:H,children:[se,t.jsx("div",{role:"presentation",className:nYt.cellOffsetLeft,style:{width:h}}),ue,t.jsx("div",{role:"presentation",className:Wn(nYt.cell,nYt.cellEmpty)}),le,0!==w&&t.jsx(U5t,{pinnedRight:p.right.length>0,borderTop:!g})]}))});"production"!==process.env.NODE_ENV&&(u3t.displayName="GridRow"),"production"!==process.env.NODE_ENV&&(u3t.propTypes={columnsTotalWidth:Vt.exports.number.isRequired,firstColumnIndex:Vt.exports.number.isRequired,focusedColumnIndex:Vt.exports.number,gridHasFiller:Vt.exports.bool.isRequired,index:Vt.exports.number.isRequired,isFirstVisible:Vt.exports.bool.isRequired,isLastVisible:Vt.exports.bool.isRequired,isNotVisible:Vt.exports.bool.isRequired,lastColumnIndex:Vt.exports.number.isRequired,offsetLeft:Vt.exports.number.isRequired,onClick:Vt.exports.func,onDoubleClick:Vt.exports.func,onMouseEnter:Vt.exports.func,onMouseLeave:Vt.exports.func,pinnedColumns:Vt.exports.object.isRequired,row:Vt.exports.object.isRequired,rowHeight:Vt.exports.oneOfType([Vt.exports.oneOf(["auto"]),Vt.exports.number]).isRequired,rowId:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]).isRequired,scrollbarWidth:Vt.exports.number.isRequired,selected:Vt.exports.bool.isRequired,showBottomBorder:Vt.exports.bool.isRequired,visibleColumns:Vt.exports.arrayOf(Vt.exports.object).isRequired});const d3t=G(u3t);function p3t({privateApiRef:e,configuration:r,props:n,children:o}){const a=s.useRef(e.current.getPublicApi());return t.jsx(_Zt.Provider,{value:r,children:t.jsx(JGt.Provider,{value:n,children:t.jsx(kJt.Provider,{value:e,children:t.jsx(aYt.Provider,{value:a,children:t.jsx(b0t,{children:t.jsx(DZt,{children:o})})})})})})}const h3t=new TextEncoder;let f3t=2048,m3t=new ArrayBuffer(f3t),v3t=new Uint8Array(m3t),y3t=new Int32Array(m3t);const g3t=function(e){const t=2*e.length;t>f3t&&(f3t=t+(4-t%4),m3t=new ArrayBuffer(f3t),v3t=new Uint8Array(m3t),y3t=new Int32Array(m3t));const r=h3t.encodeInto(e,v3t).written,n=0|r;let o=0,a=374761393+(0+n|0)|0;if(n<16)for(;(o+3|0)<n;o=o+4|0)a=Math.imul(0|x3t(a+Math.imul(0|y3t[o],3266489917)|0,17),668265263);else{let e=606290984,t=-2048144777,r=0,i=1640531535;for(;(o+15|0)<n;o=o+16|0)e=Math.imul(0|x3t(e+Math.imul(0|y3t[o+0|0],2246822519)|0,13),2654435761),t=Math.imul(0|x3t(t+Math.imul(0|y3t[o+4|0],2246822519)|0,13),2654435761),r=Math.imul(0|x3t(r+Math.imul(0|y3t[o+8|0],2246822519)|0,13),2654435761),i=Math.imul(0|x3t(i+Math.imul(0|y3t[o+12|0],2246822519)|0,13),2654435761);for(a=(((x3t(e,1)|0+x3t(t,7)|0)+x3t(r,12)|0)+x3t(i,18)|0)+n|0;(o+3|0)<n;o=o+4|0)a=Math.imul(0|x3t(a+Math.imul(0|y3t[o],3266489917)|0,17),668265263)}for(;o<n;o=o+1|0)a=Math.imul(0|x3t(a+Math.imul(0|v3t[o],374761393)|0,11),2654435761);return a=Math.imul(a^a>>>15,2246822519),a=Math.imul(a^a>>>13,3266489917),((a^a>>>16)>>>0).toString()};function x3t(e,t){return e<<t|e>>>32-t}function b3t(e){return function(e,t){return`rgba(from ${e} r g b / ${t})`}(e,1)}function k3t(e){if(e)return`${e.fontWeight} ${e.fontSize} / ${e.lineHeight} ${e.fontFamily}`}const w3t=["id","label","labelId","material","disabled","slotProps","onChange","onKeyDown","onOpen","onClose","size","style","fullWidth"],_3t=["onRowsPerPageChange","material","disabled"],C3t=["material"],M3t=["autoFocus","label","fullWidth","slotProps","className","material"],S3t=["material"],D3t=["material"],O3t=["material"],P3t=["material"],E3t=["material"],j3t=["material"],T3t=["material"],N3t=["material"],R3t=["material","label","className"],z3t=["material"],A3t=["inert","iconStart","iconEnd","children","material"],F3t=["slotProps","material"],I3t=["id","multiple","freeSolo","options","getOptionLabel","isOptionEqualToValue","value","onChange","label","placeholder","slotProps","material"],L3t=["key"],B3t=["inputProps","InputProps","InputLabelProps"],V3t=["slotProps","material"],H3t=["ref","open","children","className","clickAwayTouchEvent","clickAwayMouseEvent","flip","focusTrap","onExited","onClickAway","onDidShow","onDidHide","id","target","transition","placement","material"],$3t=["native"],q3t=ii(jm)(({theme:e})=>({[`&.${Om.positionEnd} .${Yl.sizeSmall}`]:{marginRight:e.spacing(-.75)}})),W3t=ii(em,{shouldForwardProp:e=>"fullWidth"!==e})(({theme:e})=>({gap:e.spacing(.5),margin:0,overflow:"hidden",[`& .${Zf.label}`]:{fontSize:e.typography.pxToRem(14),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),U3t=ii(Ch,{shouldForwardProp:e=>"density"!==e})(({theme:e})=>({variants:[{props:{density:"compact"},style:{padding:e.spacing(.5)}}]})),G3t=ii(Tv)({[`& .${Pv.primary}`]:{overflowX:"clip",textOverflow:"ellipsis",maxWidth:"300px"}}),Y3t=QGt(function(e,r){const{id:n,label:o,labelId:a,material:i,disabled:s,slotProps:l,onChange:c,onKeyDown:u,onOpen:d,onClose:p,size:h,style:f,fullWidth:m}=e,v=Hi(e,w3t),y={PaperProps:{onKeyDown:u}};return p&&(y.onClose=p),t.jsxs(Yf,{size:h,fullWidth:m,style:f,disabled:s,ref:r,children:[t.jsx(zm,{id:a,htmlFor:n,shrink:!0,variant:"outlined",children:o}),t.jsx(wg,S({id:n,labelId:a,label:o,displayEmpty:!0,onChange:c},v,{variant:"outlined",notched:!0,inputProps:l?.htmlInput,onOpen:d,MenuProps:y,size:h},i))]})});"production"!==process.env.NODE_ENV&&(Y3t.displayName="BaseSelect");const K3t=ii(bk)(({theme:e})=>({[`& .${ck.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${ck.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),Z3t=QGt(function(e,r){const{onRowsPerPageChange:n,material:o,disabled:a}=e,i=Hi(e,_3t),l=s.useMemo(()=>{if(a)return{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}},[a]),c=iYt(),u=eYt(),{estimatedRowCount:d}=u;return t.jsx(K3t,S({component:"div",onRowsPerPageChange:Ni(e=>{n?.(Number(e.target.value))}),labelRowsPerPage:c.current.getLocaleText("paginationRowsPerPage"),labelDisplayedRows:e=>c.current.getLocaleText("paginationDisplayedRows")(S({},e,{estimated:d})),getItemAriaLabel:c.current.getLocaleText("paginationItemAriaLabel")},l,i,o,{ref:r}))});"production"!==process.env.NODE_ENV&&(Z3t.displayName="BasePagination");const X3t=QGt(function(e,r){const{material:n}=e,o=Hi(e,C3t);return t.jsx(Rp,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(X3t.displayName="BaseBadge");const Q3t=QGt(function(e,r){const{autoFocus:n,label:o,fullWidth:a,slotProps:i,className:l,material:c}=e,u=Hi(e,M3t),d=s.useRef(null),p=Ri(d,r),h=s.useRef(null);return s.useEffect(()=>{if(n){const e=d.current?.querySelector("input");e?.focus({preventScroll:!0})}else!1===n&&h.current&&h.current.stop({})},[n]),o?t.jsx(W3t,{className:l,control:t.jsx(U3t,S({},u,c,{inputProps:i?.htmlInput,ref:p,touchRippleRef:h})),label:o,fullWidth:a}):t.jsx(U3t,S({},u,c,{className:Wn(l,c?.className),inputProps:i?.htmlInput,ref:p,touchRippleRef:h}))});"production"!==process.env.NODE_ENV&&(Q3t.displayName="BaseCheckbox");const J3t=QGt(function(e,r){const{material:n}=e,o=Hi(e,S3t);return t.jsx(Ul,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(J3t.displayName="BaseCircularProgress");const e6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,D3t);return t.jsx(_f,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(e6t.displayName="BaseDivider");const t6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,O3t);return t.jsx(Km,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(t6t.displayName="BaseLinearProgress");const r6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,P3t);return t.jsx(Qp,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(r6t.displayName="BaseButton");const n6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,E3t);return t.jsx(gd,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(n6t.displayName="BaseChip");const o6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,j3t);return t.jsx(Ql,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(o6t.displayName="BaseIconButton");const a6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,T3t);return t.jsx(Sx,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(a6t.displayName="BaseTooltip");const i6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,N3t);return t.jsx(Eg,S({},o,n,{ref:r}))});"production"!==process.env.NODE_ENV&&(i6t.displayName="BaseSkeleton");const s6t=QGt(function(e,r){const{material:n,label:o,className:a}=e,i=Hi(e,R3t);return o?t.jsx(W3t,{className:a,control:t.jsx(Ab,S({},i,n,{ref:r})),label:o}):t.jsx(Ab,S({},i,n,{className:a,ref:r}))});"production"!==process.env.NODE_ENV&&(s6t.displayName="BaseSwitch");const l6t=QGt(function(e,r){const{material:n}=e,o=Hi(e,z3t);return t.jsx(Iv,S({},o,n,{ref:r}))});function c6t(e,r=!0){if(!e)return;const{slotProps:n,material:o}=e,a=Hi(e,V3t);r&&(a.startAdornment&&(a.startAdornment=t.jsx(q3t,{position:"start",children:a.startAdornment})),a.endAdornment&&(a.endAdornment=t.jsx(q3t,{position:"end",children:a.endAdornment})));for(const e in o)Object.hasOwn(o,e)&&(a[e]=o[e]);return n?.htmlInput&&(a.inputProps?a.inputProps=S({},a.inputProps,n?.htmlInput):a.inputProps=n?.htmlInput),a}"production"!==process.env.NODE_ENV&&(l6t.displayName="BaseMenuList");const u6t={"bottom-start":"top left","bottom-end":"top right"};function d6t(e,r){return function(e,r){if(void 0===e.focusTrap)return r;return t.jsx($h,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:t.jsx("div",{tabIndex:-1,children:r})})}(e,function(e,r){if(void 0===e.onClickAway)return r;return t.jsx(Sh,{onClickAway:e.onClickAway,touchEvent:e.clickAwayTouchEvent,mouseEvent:e.clickAwayMouseEvent,children:r})}(e,r))}const p6t={baseAutocomplete:function(e){const r=eYt(),{id:n,multiple:o,freeSolo:a,options:i,getOptionLabel:s,isOptionEqualToValue:l,value:c,onChange:u,label:d,placeholder:p,slotProps:h,material:f}=e,m=Hi(e,I3t);return t.jsx(up,S({id:n,multiple:o,freeSolo:a,options:i,getOptionLabel:s,isOptionEqualToValue:l,value:c,onChange:u,renderTags:(e,r)=>e.map((e,n)=>{const o=r({index:n}),{key:a}=o,i=Hi(o,L3t);return t.jsx(gd,S({variant:"outlined",size:"small",label:"string"==typeof e?e:s?.(e)},i),a)}),renderInput:e=>{const{inputProps:n,InputProps:o,InputLabelProps:a}=e,i=Hi(e,B3t);return t.jsx(Gk,S({},i,{label:d,placeholder:p,inputProps:n,InputProps:c6t(o,!1),InputLabelProps:S({shrink:!0},a)},h?.textField,r.slotProps?.baseTextField))}},m,f))},baseBadge:X3t,baseCheckbox:Q3t,baseChip:n6t,baseCircularProgress:J3t,baseDivider:e6t,baseInput:function(e){return t.jsx(Bd,S({},c6t(e)))},baseLinearProgress:t6t,baseMenuList:l6t,baseMenuItem:function(e){const{inert:r,iconStart:n,iconEnd:o,children:a,material:i}=e,l=Hi(e,A3t);return r&&(l.disableRipple=!0),s.createElement(iy,S({},l,i),[n&&t.jsx(Dv,{children:n},"1"),t.jsx(G3t,{children:a},"2"),o&&t.jsx(Dv,{children:o},"3")])},baseTextField:function(e){const{slotProps:r,material:n}=e,o=Hi(e,F3t);return t.jsx(Gk,S({variant:"outlined"},o,n,{inputProps:r?.htmlInput,InputProps:c6t(r?.input),InputLabelProps:S({shrink:!0},r?.inputLabel)}))},baseButton:r6t,baseIconButton:o6t,baseTooltip:a6t,basePagination:Z3t,basePopper:function(e){const{open:r,children:n,className:o,flip:a,onExited:i,onDidShow:l,onDidHide:c,id:u,target:d,transition:p,placement:h,material:f}=e,m=Hi(e,H3t),v=s.useMemo(()=>{const e=[{name:"preventOverflow",options:{padding:8}}];return a&&e.push({name:"flip",enabled:!0,options:{rootBoundary:"document"}}),(l||c)&&e.push({name:"isPlaced",enabled:!0,phase:"main",fn:()=>{l?.()},effect:()=>()=>{c?.()}}),e},[a,l,c]);let y;if(p){const r=e=>t=>{e&&e(),i&&i(t)};y=o=>d6t(e,t.jsx(km,S({},o.TransitionProps,{style:{transformOrigin:u6t[o.placement]},onExited:r(o.TransitionProps?.onExited),children:t.jsx(qs,{children:n})})))}else y=d6t(e,n);return t.jsx(id,S({id:u,className:o,open:r,anchorEl:d,transition:p,placement:h,modifiers:v},m,f,{children:y}))},baseSelect:Y3t,baseSelectOption:function(e){let{native:r}=e,n=Hi(e,$3t);return r?t.jsx("option",S({},n)):t.jsx(iy,S({},n))},baseSkeleton:i6t,baseSwitch:s6t};var h6t=S({},p6t,{booleanCellTrueIcon:B2t,booleanCellFalseIcon:z2t,columnMenuIcon:R2t,openFilterButtonIcon:S2t,filterPanelDeleteIcon:z2t,columnFilteredIcon:D2t,columnSelectorIcon:P2t,columnSortedAscendingIcon:w2t,columnSortedDescendingIcon:_2t,columnResizeIcon:E2t,densityCompactIcon:j2t,densityStandardIcon:T2t,densityComfortableIcon:N2t,exportIcon:U2t,moreActionsIcon:V2t,treeDataCollapseIcon:M2t,treeDataExpandIcon:C2t,groupingCriteriaCollapseIcon:M2t,groupingCriteriaExpandIcon:C2t,detailPanelExpandIcon:A2t,detailPanelCollapseIcon:F2t,rowReorderIcon:L2t,quickFilterIcon:O2t,quickFilterClearIcon:q2t,columnMenuHideIcon:H2t,columnMenuSortAscendingIcon:w2t,columnMenuSortDescendingIcon:_2t,columnMenuUnsortIcon:null,columnMenuFilterIcon:D2t,columnMenuManageColumnsIcon:$2t,columnMenuClearIcon:q2t,loadIcon:I2t,filterPanelAddIcon:A2t,filterPanelRemoveAllIcon:W2t,columnReorderIcon:L2t,menuItemCheckIcon:B2t});const f6t=function(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}()&&null!=window.localStorage.getItem("DEBUG"),m6t=()=>{},v6t={debug:m6t,info:m6t,warn:m6t,error:m6t},y6t=["debug","info","warn","error"];function g6t(e,t,r=console){const n=y6t.indexOf(t);if(-1===n)throw new Error(`MUI X: Log level ${t} not recognized.`);const o=y6t.reduce((t,o,a)=>(t[o]=a>=n?(...t)=>{const[n,...a]=t;r[o](`MUI X: ${e} - ${n}`,...a)}:m6t,t),{});return o}const x6t=(e,t,r,n=!0)=>{const o=s.useRef(null),a=s.useRef(`mui-${Math.round(1e9*Math.random())}`),i=s.useCallback(()=>{o.current=e.current.registerPipeProcessor(t,a.current,r)},[e,r,t]);DJt(()=>{n&&i()});const l=s.useRef(!0);s.useEffect(()=>(l.current?l.current=!1:n&&i(),()=>{o.current&&(o.current(),o.current=null)}),[i,n])},b6t=(e,t,r)=>{const n=s.useRef(null),o=s.useRef(`mui-${Math.round(1e9*Math.random())}`),a=s.useCallback(()=>{n.current=e.current.registerPipeApplier(t,o.current,r)},[e,r,t]);DJt(()=>{a()});const i=s.useRef(!0);s.useEffect(()=>(i.current?i.current=!1:a(),()=>{n.current&&(n.current(),n.current=null)}),[a])};let k6t=function(e){return e.DataSource="dataSource",e.RowTree="rowTree",e}({});const w6t=(e,t,r,n)=>{const o=s.useCallback(()=>{e.current.registerStrategyProcessor(t,r,n)},[e,n,r,t]);DJt(()=>{o()});const a=s.useRef(!0);s.useEffect(()=>{a.current?a.current=!1:o()},[o])},_6t="none",C6t={dataSourceRowsUpdate:k6t.DataSource,rowTreeCreation:k6t.RowTree,filtering:k6t.RowTree,sorting:k6t.RowTree,visibleRowsLookupCreation:k6t.RowTree},M6t=(e,t)=>S({},e,{props:{listView:t.listView,getRowId:t.getRowId}}),S6t=(e,t)=>{(e=>{const t=s.useRef(null),r=s.useRef(null),n=s.useRef(null),o=s.useRef(null),a=s.useRef(null),i=s.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:r,virtualScrollerRef:n,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:a,columnHeadersContainerRef:i})})(e),((e,t)=>{s.useEffect(()=>{e.current.setState(e=>S({},e,{props:{listView:t.listView,getRowId:t.getRowId}}))},[e,t.listView,t.getRowId])})(e,t),(e=>{const t=Vo();void 0===e.current.state.isRtl&&(e.current.state.isRtl=t);const r=s.useRef(!0);s.useEffect(()=>{r.current?r.current=!1:e.current.setState(e=>S({},e,{isRtl:t}))},[e,t])})(e),((e,t)=>{CJt(e,{getLogger:s.useCallback(e=>f6t?g6t(e,"debug",t.logger):t.logLevel?g6t(e,t.logLevel.toString(),t.logger):v6t,[t.logLevel,t.logger])},"private")})(e,t),(e=>{const t=s.useRef({}),r=s.useCallback(e=>{t.current[e.stateId]=e},[]),n=s.useCallback((r,n)=>{let o;if(o="function"==typeof r?r(e.current.state):r,e.current.state===o)return!1;const a={current:{state:o}};let i=!1;const s=[];if(Object.keys(t.current).forEach(r=>{const n=t.current[r],o=n.stateSelector(e),l=n.stateSelector(a);l!==o&&(s.push({stateId:n.stateId,hasPropChanged:l!==n.propModel}),void 0!==n.propModel&&l!==n.propModel&&(i=!0))}),s.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${s[0].stateId}, therefore, you're not allowed to update ${s.map(e=>e.stateId).join(", ")} in the same transaction.`);if(i||(e.current.state=o,e.current.publishEvent("stateChange",o),e.current.store.update(o)),1===s.length){const{stateId:r,hasPropChanged:o}=s[0],l=t.current[r],c=l.stateSelector(a);l.propOnChange&&o&&l.propOnChange(c,{reason:n,api:e.current}),i||e.current.publishEvent(l.changeEvent,c,{reason:n})}return!i},[e]),o=s.useCallback((t,r,n)=>e.current.setState(e=>S({},e,{[t]:r(e[t])}),n),[e]),a={updateControlState:o,registerControlState:r};CJt(e,{setState:n},"public"),CJt(e,a,"private")})(e),(e=>{const t=s.useRef({}),r=s.useRef(!1),n=s.useCallback(e=>{!r.current&&e&&(r.current=!0,Object.values(e.appliers).forEach(e=>{e()}),r.current=!1)},[]),o=s.useCallback((e,r,n)=>{t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1});const o=t.current[e];return o.processors.get(r)!==n&&(o.processors.set(r,n),o.processorsAsArray=Array.from(t.current[e].processors.values()).filter(e=>null!==e),o.processorsUpdated=!0),()=>{t.current[e].processors.set(r,null),t.current[e].processorsAsArray=Array.from(t.current[e].processors.values()).filter(e=>null!==e)}},[]),a=s.useCallback((e,r,n)=>(t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1}),t.current[e].appliers[r]=n,()=>{const n=Hi(t.current[e].appliers,[r].map(l$t));t.current[e].appliers=n}),[]),i=s.useCallback(e=>{n(t.current[e])},[n]),l=s.useCallback(()=>{for(const e in t.current){if(!Object.prototype.hasOwnProperty.call(t.current,e))continue;const r=t.current[e];r.processorsUpdated&&(r.processorsUpdated=!1,n(r))}},[n]),c=s.useCallback((...e)=>{const[r,n,o]=e;if(!t.current[r])return n;const a=t.current[r].processorsAsArray;let i=n;for(let e=0;e<a.length;e+=1)i=a[e](i,o);return i},[]),u={unstable_applyPipeProcessors:c};CJt(e,{registerPipeProcessor:o,registerPipeApplier:a,requestPipeProcessorsApplication:i,runAppliersForPendingProcessors:l},"private"),CJt(e,u,"public")})(e),(e=>{const t=s.useRef(new Map),r=s.useRef({}),n=s.useCallback((t,n,o)=>{const a=()=>{const e=Hi(r.current[n],[t].map(l$t));r.current[n]=e};r.current[n]||(r.current[n]={});const i=r.current[n],s=i[t];return i[t]=o,s&&s!==o?(t===e.current.getActiveStrategy(C6t[n])&&e.current.publishEvent("activeStrategyProcessorChange",n),a):a},[e]),o=s.useCallback((t,n)=>{const o=e.current.getActiveStrategy(C6t[t]);if(null==o)throw new Error("Can't apply a strategy processor before defining an active strategy");const a=r.current[t];if(!a||!a[o])throw new Error(`No processor found for processor "${t}" on strategy "${o}"`);return(0,a[o])(n)},[e]),a=s.useCallback(e=>{const r=Array.from(t.current.entries()).find(([,t])=>t.group===e&&t.isAvailable());return r?.[0]??_6t},[]),i=s.useCallback((r,n,o)=>{t.current.set(n,{group:r,isAvailable:o}),e.current.publishEvent("strategyAvailabilityChange")},[e]);CJt(e,{registerStrategyProcessor:n,applyStrategyProcessor:o,getActiveStrategy:a,setStrategyAvailability:i},"private")})(e),((e,t)=>{const r=s.useCallback(e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]},[t.localeText]);e.current.register("public",{getLocaleText:r})})(e,t),e.current.register("private",{rootProps:t})},D6t=(e,t,r,n)=>{const o=s.useRef(n),a=s.useRef(!1);n!==o.current&&(a.current=!1,o.current=n),a.current||(t.current.state=e(t.current.state,r,t),a.current=!0)};function O6t(e,t){if(null==e)return"";const r="string"==typeof e?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const e=r.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@","\t","\r"].includes(e[0])?`"'${e}"`:[t.delimiter,"\n","\r",'"'].some(e=>r.includes(e))?`"${e}"`:e}return r}const P6t=(e,t)=>{const{csvOptions:r,ignoreValueFormatter:n}=t;let o;if(n){const t=e.colDef.type;o="number"===t?String(e.value):"date"===t||"dateTime"===t?e.value?.toISOString():"function"==typeof e.value?.toString?e.value.toString():e.value}else o=e.formattedValue;return O6t(o,r)};class E6t{constructor(e){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),"function"==typeof this.options.sanitizeCellValue?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}}function j6t(e){const{columns:t,rowIds:r,csvOptions:n,ignoreValueFormatter:o,apiRef:a}=e,i=r.reduce((e,r)=>`${e}${(({id:e,columns:t,getCellParams:r,csvOptions:n,ignoreValueFormatter:o})=>{const a=new E6t({csvOptions:n});return t.forEach(t=>{const i=r(e,t.field);"production"!==process.env.NODE_ENV&&"[object Object]"===String(i.formattedValue)&&lat(["MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]),a.addValue(P6t(i,{ignoreValueFormatter:o,csvOptions:n}))}),a.getRowString()})({id:r,columns:t,getCellParams:a.current.getCellParams,ignoreValueFormatter:o,csvOptions:n})}\r\n`,"").trim();if(!n.includeHeaders)return i;const s=t.filter(e=>e.field!==MQt.field),l=[];if(n.includeColumnGroupsHeaders){const e=a.current.getAllGroupDetails();let t=0;const r=s.reduce((e,r)=>{const n=a.current.getColumnGroupPath(r.field);return e[r.field]=n,t=Math.max(t,n.length),e},{});for(let o=0;o<t;o+=1){const t=new E6t({csvOptions:n,sanitizeCellValue:O6t});l.push(t),s.forEach(n=>{const a=(r[n.field]||[])[o],i=e[a];t.addValue(i?i.headerName||i.groupId:"")})}}const c=new E6t({csvOptions:n,sanitizeCellValue:O6t});s.forEach(e=>{c.addValue(e.headerName||e.field)}),l.push(c);return`${`${l.map(e=>e.getRowString()).join("\r\n")}\r\n`}${i}`.trim()}function T6t(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const r=document.createRange();r.selectNode(t);const n=window.getSelection();n.removeAllRanges(),n.addRange(r);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const N6t=(e,t)=>{const r=t.ignoreValueFormatterDuringExport,n=("object"==typeof r?r?.clipboardExport:r)||!1,o=t.clipboardCopyCellDelimiter,a=s.useCallback(t=>{if(!function(e){return(e.ctrlKey||e.metaKey)&&"C"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}(t))return;if(r=t.target,window.getSelection()?.toString()||r&&(r.selectionEnd||0)-(r.selectionStart||0)>0)return;var r;let a="";if(BXt(e)>0)a=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const t=XXt(e);if(t){const r=e.current.getCellParams(t.id,t.field);a=P6t(r,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:n})}}var i;a=e.current.unstable_applyPipeProcessors("clipboardCopy",a),a&&(i=a,navigator.clipboard?navigator.clipboard.writeText(i).catch(()=>{T6t(i)}):T6t(i),e.current.publishEvent("clipboardCopy",a))},[e,n,o]);SJt(e,()=>e.current.rootElementRef.current,"keydown",a),fYt(e,"clipboardCopy",t.onClipboardCopy)},R6t=e=>S({},e,{columnMenu:{open:!1}}),z6t=(e,t,r)=>{r.current.caches.columns={lastColumnsProp:t.columns};return S({},e,{columns:pJt({apiRef:r,columnsToUpsert:t.columns,initialState:t.initialState?.columns,columnVisibilityModel:t.columnVisibilityModel??t.initialState?.columns?.columnVisibilityModel??{},keepOnlyColumnsToUpsert:!0}),pinnedColumns:e.pinnedColumns??FKt})};function A6t(e,r){const n=MJt(e,"useGridColumns");e.current.registerControlState({stateId:"visibleColumns",propModel:r.columnVisibilityModel,propOnChange:r.onColumnVisibilityModelChange,stateSelector:WKt,changeEvent:"columnVisibilityModelChange"});const o=s.useCallback(t=>{n.debug("Updating columns state."),e.current.setState(function(e){return t=>S({},t,{columns:e})}(t)),e.current.publishEvent("columnsChange",t.orderedFields)},[n,e]),a=s.useCallback(t=>$Kt(e)[t],[e]),i=s.useCallback(()=>qKt(e),[e]),l=s.useCallback(()=>GKt(e),[e]),c=s.useCallback((t,r=!0)=>(r?GKt(e):qKt(e)).findIndex(e=>e.field===t),[e]),u=s.useCallback(t=>{const r=c(t);return JKt(e)[r]},[e,c]),d=s.useCallback(t=>{WKt(e)!==t&&(e.current.setState(r=>S({},r,{columns:pJt({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})})),e.current.updateRenderContext?.())},[e]),p=s.useCallback(t=>{if(l1t(e))return void e.current.updateNonPivotColumns(t);const r=pJt({apiRef:e,columnsToUpsert:t,initialState:void 0,keepOnlyColumnsToUpsert:!1,updateInitialVisibilityModel:!0});o(r)},[e,o]),h=s.useCallback((t,r)=>{const n=WKt(e);if(r!==(n[t]??!0)){const o=S({},n,{[t]:r});e.current.setColumnVisibilityModel(o)}},[e]),f=s.useCallback(t=>HKt(e).findIndex(e=>e===t),[e]),m=s.useCallback((t,r)=>{const a=HKt(e),i=f(t);if(i===r)return;n.debug(`Moving column ${t} to index ${r}`);const s=[...a],l=s.splice(i,1)[0];s.splice(r,0,l),o(S({},VKt(e),{orderedFields:s}));const c={column:e.current.getColumn(t),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(t),oldIndex:i};e.current.publishEvent("columnIndexChange",c)},[e,n,o,f]),v=s.useCallback((t,r)=>{n.debug(`Updating column ${t} width to ${r}`);const a=VKt(e),i=S({},a.lookup[t],{width:r,hasBeenResized:!0});o(uJt(S({},a,{lookup:S({},a.lookup,{[t]:i})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:i,width:r})},[e,n,o]),y={setColumnIndex:m};CJt(e,{getColumn:a,getAllColumns:i,getColumnIndex:c,getColumnPosition:u,getVisibleColumns:l,getColumnIndexRelativeToVisibleColumns:f,updateColumns:p,setColumnVisibilityModel:d,setColumnVisibility:h,setColumnWidth:v},"public"),CJt(e,y,r.signature===oYt.DataGrid?"private":"public");const g=s.useCallback((t,n)=>{const o={},a=WKt(e);(!n.exportOnlyDirtyModels||null!=r.columnVisibilityModel||Object.keys(r.initialState?.columns?.columnVisibilityModel??{}).length>0||Object.keys(a).length>0)&&(o.columnVisibilityModel=a),o.orderedFields=HKt(e);const i=qKt(e),s={};return i.forEach(e=>{if(e.hasBeenResized){const t={};lJt.forEach(r=>{let n=e[r];n===1/0&&(n=-1),t[r]=n}),s[e.field]=t}}),Object.keys(s).length>0&&(o.dimensions=s),S({},t,{columns:o})},[e,r.columnVisibilityModel,r.initialState?.columns]),x=s.useCallback((t,r)=>{const n=r.stateToRestore.columns,o=n?.columnVisibilityModel;if(null==n)return t;const a=pJt({apiRef:e,columnsToUpsert:[],initialState:n,columnVisibilityModel:o,keepOnlyColumnsToUpsert:!1});return null!=n&&e.current.setState(e=>S({},e,{columns:S({},e.columns,{lookup:a.lookup,orderedFields:a.orderedFields,initialColumnVisibilityModel:a.initialColumnVisibilityModel})})),null!=o&&e.current.setState(e=>S({},e,{columns:S({},e.columns,{columnVisibilityModel:o})})),null!=n&&e.current.publishEvent("columnsChange",a.orderedFields),t},[e]),b=s.useCallback((e,n)=>{if(n===z1t.columns){const e=r.slots.columnsPanel;return t.jsx(e,S({},r.slotProps?.columnsPanel))}return e},[r.slots.columnsPanel,r.slotProps?.columnsPanel]),k=s.useCallback(t=>{const n=l1t(e);return r.disableColumnSelector||n?t:[...t,"columnMenuColumnsItem"]},[r.disableColumnSelector,e]);x6t(e,"columnMenu",k),x6t(e,"exportState",g),x6t(e,"restoreState",x),x6t(e,"preferencePanel",b);const w=s.useRef(null);pYt(e,"viewportInnerSizeChange",t=>{if(w.current!==t.width){w.current=t.width;if(!GKt(e).some(e=>e.flex&&e.flex>0))return;o(uJt(VKt(e),e.current.getRootDimensions()))}});const _=s.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const t=pJt({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(t)},[e,n,o]);b6t(e,"hydrateColumns",_),s.useEffect(()=>{if(e.current.caches.columns.lastColumnsProp===r.columns)return;e.current.caches.columns.lastColumnsProp=r.columns,n.info(`GridColumns have changed, new length ${r.columns.length}`);const t=pJt({apiRef:e,initialState:void 0,columnsToUpsert:r.columns,keepOnlyColumnsToUpsert:!0,updateInitialVisibilityModel:!0,columnVisibilityModel:r.columnVisibilityModel});o(t)},[n,e,o,r.columns,r.columnVisibilityModel]),s.useEffect(()=>{void 0!==r.columnVisibilityModel&&e.current.setColumnVisibilityModel(r.columnVisibilityModel)},[e,n,r.columnVisibilityModel])}const F6t=(e,t)=>S({},e,{density:t.initialState?.density??t.density??"standard"});const I6t=({apiRef:e,options:t})=>{const r=qKt(e);if(t.fields)return t.fields.reduce((e,t)=>{const n=r.find(e=>e.field===t);return n&&e.push(n),e},[]);return(t.allColumns?r:GKt(e)).filter(e=>!0!==e.disableExport)},L6t=({apiRef:e})=>{const t=EXt(e),r=UYt(e),n=BXt(e),o=t.filter(e=>"footer"!==r[e].type),a=eKt(e),i=a?.top?.map(e=>e.id)||[],s=a?.bottom?.map(e=>e.id)||[];if(o.unshift(...i),o.push(...s),n>0){const t=VXt(e);return o.filter(e=>t.has(e))}return o},B6t=(e,r)=>{const n=MJt(e,"useGridCsvExport"),o=r.ignoreValueFormatterDuringExport,a=("object"==typeof o?o?.csvExport:o)||!1,i=s.useCallback((t={})=>{n.debug("Get data as CSV");return j6t({columns:I6t({apiRef:e,options:t}),rowIds:(t.getRowsToExport??L6t)({apiRef:e}),csvOptions:{delimiter:t.delimiter||",",shouldAppendQuotes:t.shouldAppendQuotes??!0,includeHeaders:t.includeHeaders??!0,includeColumnGroupsHeaders:t.includeColumnGroupsHeaders??!0,escapeFormulas:t.escapeFormulas??!0},ignoreValueFormatter:a,apiRef:e})},[n,e,a]),l=s.useCallback(e=>{n.debug("Export data as CSV");const t=i(e);!function(e,t="csv",r=document.title||"untitled"){const n=`${r}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),r=document.createElement("a");return r.href=t,r.download=n,r.click(),void setTimeout(()=>{URL.revokeObjectURL(t)})}throw new Error("MUI X: exportAs not supported.")}(new Blob([e?.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",e?.fileName)},[n,i]);CJt(e,{getDataAsCsv:i,exportDataAsCsv:l},"public");const c=s.useCallback((e,r)=>r.csvOptions?.disableToolbarButton?e:[...e,{component:t.jsx(e5t,{options:r.csvOptions}),componentName:"csvExport"}],[]);x6t(e,"exportMenu",c)};const V6t=(e,t,r)=>{let n=e.paginationModel;const o=e.rowCount,a=r?.pageSize??n.pageSize,i=r?.page??n.page,s=iQt(o,a,i);!r||r?.page===n.page&&r?.pageSize===n.pageSize||(n=r);const l=-1===a?0:((e,t=0)=>0===t?e:Math.max(Math.min(e,t-1),0))(n.page,s);return l!==n.page&&(n=S({},n,{page:l})),lQt(n.pageSize,t),n};const H6t=(e,r)=>{const n=null!==e.current.rootElementRef.current,o=MJt(e,"useGridPrintExport"),a=s.useRef(null),i=s.useRef(null),l=s.useRef({}),c=s.useRef([]),u=s.useRef(null);s.useEffect(()=>{a.current=Oi(e.current.rootElementRef.current)},[e,n]);const d=s.useCallback((t,r,n)=>new Promise(o=>{const a=I6t({apiRef:e,options:{fields:t,allColumns:r}}).map(e=>e.field),i=qKt(e),s={};i.forEach(e=>{s[e.field]=a.includes(e.field)}),n&&(s[MQt.field]=!0),e.current.setColumnVisibilityModel(s),o()}),[e]),p=s.useCallback(t=>{const r=t({apiRef:e}).reduce((t,r)=>{const n=e.current.getRow(r);return n[FZt]||t.push(n),t},[]);e.current.setRows(r)},[e]),h=s.useCallback((t,n)=>{const o=S({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},n),i=t.contentDocument;if(!i)return;const s=fJt(e),l=e.current.rootElementRef.current,c=l.cloneNode(!0);c.querySelector(`.${nYt.main}`).style.overflow="visible",c.style.contain="size";let u=l.querySelector(`.${nYt.toolbarContainer}`)?.offsetHeight||0,d=l.querySelector(`.${nYt.footerContainer}`)?.offsetHeight||0;const p=c.querySelector(`.${nYt.footerContainer}`);o.hideToolbar&&(c.querySelector(`.${nYt.toolbarContainer}`)?.remove(),u=0),o.hideFooter&&p&&(p.remove(),d=0);const h=s.currentPageTotalHeight+hJt(e,r)+u+d;c.style.height=`${h}px`,c.style.boxSizing="content-box",!o.hideFooter&&p&&(p.style.position="absolute",p.style.width="100%",p.style.top=h-d+"px");const f=document.createElement("div");f.appendChild(c),i.body.style.marginTop="0px",i.body.innerHTML=f.innerHTML;const m="function"==typeof o.pageStyle?o.pageStyle():o.pageStyle;if("string"==typeof m){const e=i.createElement("style");e.appendChild(i.createTextNode(m)),i.head.appendChild(e)}o.bodyClassName&&i.body.classList.add(...o.bodyClassName.split(" "));let v=[];if(o.copyStyles){const e=l.getRootNode();v=function(e,t){const r=[],n=t.querySelectorAll("style, link[rel='stylesheet']");for(let t=0;t<n.length;t+=1){const o=n[t];if("STYLE"===o.tagName){const t=e.createElement(o.tagName),r=o.sheet;if(r){let n="";for(let e=0;e<r.cssRules.length;e+=1)"string"==typeof r.cssRules[e].cssText&&(n+=`${r.cssRules[e].cssText}\r\n`);t.appendChild(e.createTextNode(n)),e.head.appendChild(t)}}else if(o.getAttribute("href")){const t=e.createElement(o.tagName);for(let e=0;e<o.attributes.length;e+=1){const r=o.attributes[e];r&&t.setAttribute(r.nodeName,r.nodeValue||"")}r.push(new Promise(e=>{t.addEventListener("load",()=>e())})),e.head.appendChild(t)}}return r}(i,"ShadowRoot"===e.constructor.name?e:a.current)}"test"!==process.env.NODE_ENV&&Promise.all(v).then(()=>{t.contentWindow.print()})},[e,a,r]),f=s.useCallback(t=>{a.current.body.removeChild(t),e.current.restoreState(i.current||{}),i.current?.columns?.columnVisibilityModel||e.current.setColumnVisibilityModel(l.current),e.current.setState(e=>S({},e,{virtualization:u.current})),e.current.setRows(c.current),i.current=null,l.current={},c.current=[]},[e]),m=s.useCallback(async t=>{if(o.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=e.current.exportState(),l.current=WKt(e),c.current=e.current.getSortedRows().filter(e=>!e[FZt]),r.pagination){const t={page:0,pageSize:NXt(e)};e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{paginationModel:V6t(e.pagination,"DataGridPro",t)})}))}u.current=e.current.state.virtualization,e.current.setState(e=>S({},e,{virtualization:S({},e.virtualization,{enabled:!1,enabledForColumns:!1})})),await d(t?.fields,t?.allColumns,t?.includeCheckboxes),p(t?.getRowsToExport??L6t),await new Promise(e=>{requestAnimationFrame(()=>{e()})});const n=function(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}(t?.fileName);"test"===process.env.NODE_ENV?(a.current.body.appendChild(n),h(n,t),f(n)):(n.onload=()=>{h(n,t);n.contentWindow.matchMedia("print").addEventListener("change",e=>{!1===e.matches&&f(n)})},a.current.body.appendChild(n))},[r,o,e,h,f,d,p]);CJt(e,{exportDataAsPrint:m},"public");const v=s.useCallback((e,r)=>r.printOptions?.disableToolbarButton?e:[...e,{component:t.jsx(t5t,{options:r.printOptions}),componentName:"printExport"}],[]);x6t(e,"exportMenu",v)},$6t=(e,t,r)=>{const n=t.filterModel??t.initialState?.filter?.filterModel??RKt();return S({},e,{filter:S({filterModel:aZt(n,t.disableMultipleColumnsFiltering,r)},NKt),visibleRowsLookup:{}})},q6t=e=>e.filteredRowsLookup;function W6t(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function U6t(){return MGt(Object.values)}const G6t=e=>S({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),Y6t=({currentColIndex:e,firstColIndex:t,lastColIndex:r,isRtl:n})=>{if(n){if(e<r)return e+1}else if(!n&&e>t)return e-1;return null},K6t=({currentColIndex:e,firstColIndex:t,lastColIndex:r,isRtl:n})=>{if(n){if(e>t)return e-1}else if(!n&&e<r)return e+1;return null};const Z6t=zGt(bQt,eKt,(e,t)=>(t.top||[]).concat(e.rows,t.bottom||[])),X6t=(e,t)=>{const r=MJt(e,"useGridKeyboardNavigation"),n=Vo(),o=s.useCallback(()=>Z6t(e),[e]),a="DataGrid"!==t.signature&&t.headerFilters,i=s.useCallback((t,n,o="left",a="up")=>{const i=DXt(e),s=e.current.unstable_getCellColSpanInfo(n,t);s&&s.spannedByColSpan&&("left"===o?t=s.leftVisibleCellIndex:"right"===o&&(t=s.rightVisibleCellIndex));const l=YKt(e)[t],c=function(e,t,r,n){const o=LJt(e);if(!o[t]?.[r])return t;const a=EXt(e);let i=a.indexOf(t)+("down"===n?1:-1);for(;i>=0&&i<a.length;){const e=a[i];if(!o[e]?.[r])return e;i+="down"===n?1:-1}return t}(e,n,l,a),u=i.findIndex(e=>e.id===c);r.debug(`Navigating to cell row ${u}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:u}),e.current.setCellFocus(c,l)},[e,r]),l=s.useCallback((t,n)=>{r.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(o,n)},[e,r]),c=s.useCallback((t,n)=>{r.debug(`Navigating to header filter col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFilterFocus(o,n)},[e,r]),u=s.useCallback((t,n,o)=>{r.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const{field:a}=e.current.getVisibleColumns()[t];e.current.setColumnGroupHeaderFocus(a,n,o)},[e,r]),d=s.useCallback(e=>o()[e]?.id,[o]),p=s.useCallback((t,r)=>{const s=r.currentTarget.querySelector(`.${nYt.columnHeaderTitleContainerContent}`);if(!!s&&s.contains(r.target)&&t.field!==MQt.field)return;const p=o(),h=e.current.getViewportPageSize(),f=t.field?e.current.getColumnIndex(t.field):0,m=p.length>0?0:null,v=p.length-1,y=GKt(e).length-1,g=sJt(e);let x=!0;switch(r.key){case"ArrowDown":a?c(f,r):null!==m&&i(f,d(m));break;case"ArrowRight":{const e=K6t({currentColIndex:f,firstColIndex:0,lastColIndex:y,isRtl:n});null!==e&&l(e,r);break}case"ArrowLeft":{const e=Y6t({currentColIndex:f,firstColIndex:0,lastColIndex:y,isRtl:n});null!==e&&l(e,r);break}case"ArrowUp":g>0&&u(f,g-1,r);break;case"PageDown":null!==m&&null!==v&&i(f,d(Math.min(m+h,v)));break;case"Home":l(0,r);break;case"End":l(y,r);break;case"Enter":(r.ctrlKey||r.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:x=!1}x&&r.preventDefault()},[e,o,a,c,i,d,n,l,u]),h=s.useCallback((t,r)=>{const a=tJt(e)===t.field,s=rJt(e)===t.field;if(a||s||!bZt(r.key))return;const u=o(),p=e.current.getViewportPageSize(),h=t.field?e.current.getColumnIndex(t.field):0,f=u.length-1,m=GKt(e).length-1;let v=!0;switch(r.key){case"ArrowDown":{const e=d(0);null!=e&&i(h,e);break}case"ArrowRight":{const e=K6t({currentColIndex:h,firstColIndex:0,lastColIndex:m,isRtl:n});null!==e&&c(e,r);break}case"ArrowLeft":{const o=Y6t({currentColIndex:h,firstColIndex:0,lastColIndex:m,isRtl:n});null!==o?c(o,r):e.current.setColumnHeaderFilterFocus(t.field,r);break}case"ArrowUp":l(h,r);break;case"PageDown":null!==f&&i(h,d(Math.min(0+p,f)));break;case"Home":c(0,r);break;case"End":c(m,r);break;case" ":break;default:v=!1}v&&r.preventDefault()},[e,o,c,n,l,i,d]),f=s.useCallback((t,r)=>{const n=eQt(e);if(null===n)return;const{field:a,depth:s}=n,{fields:c,depth:p,maxDepth:h}=t,f=o(),m=e.current.getViewportPageSize(),v=e.current.getColumnIndex(a),y=a?e.current.getColumnIndex(a):0,g=f.length-1,x=GKt(e).length-1;let b=!0;switch(r.key){case"ArrowDown":p===h-1?l(v,r):u(v,s+1,r);break;case"ArrowUp":p>0&&u(v,s-1,r);break;case"ArrowRight":{const e=c.length-c.indexOf(a)-1;v+e+1<=x&&u(v+e+1,s,r);break}case"ArrowLeft":{const e=c.indexOf(a);v-e-1>=0&&u(v-e-1,s,r);break}case"PageDown":null!==g&&i(y,d(Math.min(0+m,g)));break;case"Home":u(0,s,r);break;case"End":u(x,s,r);break;case" ":break;default:b=!1}b&&r.preventDefault()},[e,o,l,u,i,d]),m=s.useCallback((t,r)=>{if(W0t(r))return;const s=e.current.getCellParams(t.id,t.field);if(s.cellMode===wKt.Edit||!bZt(r.key))return;if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:r,cell:s}))return;const u=o();if(0===u.length)return;const p=e.current.getViewportPageSize(),h=t.field?e.current.getColumnIndex(t.field):0,f=u.findIndex(e=>e.id===t.id),m=u.length-1,v=GKt(e).length-1;let y=!0;switch(r.key){case"ArrowDown":f<m&&i(h,d(f+1),n?"right":"left","down");break;case"ArrowUp":f>0?i(h,d(f-1)):a?c(h,r):l(h,r);break;case"ArrowRight":{const e=K6t({currentColIndex:h,firstColIndex:0,lastColIndex:v,isRtl:n});null!==e&&i(e,d(f),n?"left":"right");break}case"ArrowLeft":{const e=Y6t({currentColIndex:h,firstColIndex:0,lastColIndex:v,isRtl:n});null!==e&&i(e,d(f),n?"right":"left");break}case"Tab":r.shiftKey&&h>0?i(h-1,d(f),"left"):!r.shiftKey&&h<v&&i(h+1,d(f),"right");break;case" ":{if(t.field===eXt)break;const e=t.colDef;if(e&&(e.field===QZt||(e=>e===JZt||null!==(e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null})(e))(e.field)))break;!r.shiftKey&&f<m&&i(h,d(Math.min(f+p,m)));break}case"PageDown":f<m&&i(h,d(Math.min(f+p,m)));break;case"PageUp":{const e=Math.max(f-p,0);e!==f&&e>=0?i(h,d(e)):l(h,r);break}case"Home":r.ctrlKey||r.metaKey||r.shiftKey?i(0,d(0)):i(0,d(f));break;case"End":r.ctrlKey||r.metaKey||r.shiftKey?i(v,d(m)):i(v,d(f));break;default:y=!1}y&&r.preventDefault()},[e,o,n,i,d,a,c,l]),v=s.useCallback((e,{event:t})=>" "!==t.key&&e,[]);x6t(e,"canStartEditing",v),pYt(e,"columnHeaderKeyDown",p),pYt(e,"headerFilterKeyDown",h),pYt(e,"columnGroupHeaderKeyDown",f),pYt(e,"cellKeyDown",m)},Q6t=(e,t)=>{const r=S({},sQt(t.autoPageSize),t.paginationModel??t.initialState?.pagination?.paginationModel);lQt(r.pageSize,t.signature);const n=t.rowCount??t.initialState?.pagination?.rowCount??("client"===t.paginationMode?e.rows?.totalRowCount:void 0),o=t.paginationMeta??t.initialState?.pagination?.meta??{};return S({},e,{pagination:S({},e.pagination,{paginationModel:r,rowCount:n,meta:o,enabled:!0===t.pagination,paginationMode:t.paginationMode})})},J6t=(e,t)=>{((e,t)=>{const r=MJt(e,"useGridPaginationMeta"),n=SYt(e,hQt);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:hQt,changeEvent:"paginationMetaChange"});const o=s.useCallback(t=>{n!==t&&(r.debug("Setting 'paginationMeta' to",t),e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{meta:t})})))},[e,r,n]);CJt(e,{setPaginationMeta:o},"public");const a=s.useCallback((r,n)=>{const o=hQt(e);return n.exportOnlyDirtyModels&&null==t.paginationMeta&&null==t.initialState?.pagination?.meta?r:S({},r,{pagination:S({},r.pagination,{meta:o})})},[e,t.paginationMeta,t.initialState?.pagination?.meta]),i=s.useCallback((t,r)=>{const n=r.stateToRestore.pagination?.meta?r.stateToRestore.pagination.meta:hQt(e);return e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{meta:n})})),t},[e]);x6t(e,"exportState",a),x6t(e,"restoreState",i),s.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])})(e,t),((e,t)=>{const r=MJt(e,"useGridPaginationModel"),n=SYt(e,PYt),o=s.useRef(kXt(e)),a=Math.floor(t.rowHeight*n);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:dQt,changeEvent:"paginationModelChange"});const i=s.useCallback(t=>{const n=dQt(e);t!==n.page&&(r.debug(`Setting page to ${t}`),e.current.setPaginationModel({page:t,pageSize:n.pageSize}))},[e,r]),l=s.useCallback(t=>{const n=dQt(e);t!==n.pageSize&&(r.debug(`Setting page size to ${t}`),e.current.setPaginationModel({pageSize:t,page:n.page}))},[e,r]),c=s.useCallback(n=>{const o=dQt(e);n!==o&&(r.debug("Setting 'paginationModel' to",n),e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{paginationModel:V6t(e.pagination,t.signature,n)})}),"setPaginationModel"))},[e,r,t.signature]);CJt(e,{setPage:i,setPageSize:l,setPaginationModel:c},"public");const u=s.useCallback((r,n)=>{const o=dQt(e);return!n.exportOnlyDirtyModels||null!=t.paginationModel||null!=t.initialState?.pagination?.paginationModel||0!==o.page&&o.pageSize!==(t.autoPageSize?0:100)?S({},r,{pagination:S({},r.pagination,{paginationModel:o})}):r},[e,t.paginationModel,t.initialState?.pagination?.paginationModel,t.autoPageSize]),d=s.useCallback((r,n)=>{const o=n.stateToRestore.pagination?.paginationModel?S({},sQt(t.autoPageSize),n.stateToRestore.pagination?.paginationModel):dQt(e);return e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{paginationModel:V6t(e.pagination,t.signature,o)})}),"stateRestorePreProcessing"),r},[e,t.autoPageSize,t.signature]);x6t(e,"exportState",u),x6t(e,"restoreState",d);const p=s.useCallback(()=>{if(!t.autoPageSize)return;const r=e.current.getRootDimensions(),n=Math.max(1,Math.floor(r.viewportInnerSize.height/a));e.current.setPageSize(n)},[e,t.autoPageSize,a]),h=s.useCallback(t=>{if(null==t)return;const r=dQt(e);if(0===r.page)return;const n=vQt(e);r.page>n-1&&e.current.setPage(Math.max(0,n-1))},[e]),f=s.useCallback(()=>{0!==dQt(e).page&&e.current.setPage(0),0!==e.current.getScrollPosition().top&&e.current.scroll({top:0})},[e]),m=s.useCallback(t=>{const r=S({},t,{items:AXt(e)});n5t(r,o.current)||(o.current=r,f())},[e,f]);pYt(e,"viewportInnerSizeChange",p),pYt(e,"paginationModelChange",()=>{const t=dQt(e);e.current.virtualScrollerRef?.current&&e.current.scrollToIndexes({rowIndex:t.page*t.pageSize})}),pYt(e,"rowCountChange",h),pYt(e,"sortModelChange",f),pYt(e,"filterModelChange",m);const v=s.useRef(!0);s.useEffect(()=>{v.current?v.current=!1:t.pagination&&e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{paginationModel:V6t(e.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.signature,t.pagination]),s.useEffect(()=>{e.current.setState(e=>{const r=!0===t.pagination;return e.pagination.paginationMode===t.paginationMode||e.pagination.enabled===r?e:S({},e,{pagination:S({},e.pagination,{paginationMode:t.paginationMode,enabled:!0===t.pagination})})})},[e,t.paginationMode,t.pagination]),s.useEffect(p,[p])})(e,t),((e,t)=>{const r=MJt(e,"useGridRowCount"),n=SYt(e,RXt),o=SYt(e,pQt),a=SYt(e,hQt),i=SYt(e,dQt),l=_s(()=>dQt(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:pQt,changeEvent:"rowCountChange"});const c=s.useCallback(t=>{o!==t&&(r.debug("Setting 'rowCount' to",t),e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{rowCount:t})})))},[e,r,o]);CJt(e,{setRowCount:c},"public");const u=s.useCallback((r,n)=>{const o=pQt(e);return n.exportOnlyDirtyModels&&null==t.rowCount&&null==t.initialState?.pagination?.rowCount?r:S({},r,{pagination:S({},r.pagination,{rowCount:o})})},[e,t.rowCount,t.initialState?.pagination?.rowCount]),d=s.useCallback((t,r)=>{const n=r.stateToRestore.pagination?.rowCount?r.stateToRestore.pagination.rowCount:pQt(e);return e.current.setState(e=>S({},e,{pagination:S({},e.pagination,{rowCount:n})})),t},[e]);x6t(e,"exportState",u),x6t(e,"restoreState",d);const p=s.useCallback(r=>{"client"!==t.paginationMode&&l.current&&r.pageSize!==l.current&&(l.current=r.pageSize,-1===o&&e.current.setPage(0))},[t.paginationMode,l,o,e]);pYt(e,"paginationModelChange",p),s.useEffect(()=>{"client"===t.paginationMode?e.current.setRowCount(n):null!=t.rowCount&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,n,t.rowCount]);const h=!1===a.hasNextPage;s.useEffect(()=>{h&&-1===o&&e.current.setRowCount(i.pageSize*i.page+n)},[e,n,h,o,i])})(e,t)},e8t=(e,t)=>S({},e,{preferencePanel:t.initialState?.preferencePanel??{open:!1}}),t8t=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;default:return""}},r8t=["id","field"],n8t=["id","field"],o8t=["id"],a8t=["id"],i8t=e=>S({},e,{editRows:{}}),s8t=(e,t)=>{((e,t)=>{const[r,n]=s.useState({}),o=s.useRef(r),a=s.useRef({}),{processRowUpdate:i,onProcessRowUpdateError:l,cellModesModel:c,onCellModesModelChange:u}=t,d=e=>(...r)=>{t.editMode===kKt.Cell&&e(...r)},p=s.useCallback((t,r)=>{const n=e.current.getCellParams(t,r);if(!e.current.isCellEditable(n))throw new Error(`MUI X: The cell with id=${t} and field=${r} is not editable.`)},[e]),h=s.useCallback((t,r,n)=>{if(e.current.getCellMode(t,r)!==n)throw new Error(`MUI X: The cell with id=${t} and field=${r} is not in ${n} mode.`)},[e]),f=s.useCallback((t,r)=>{if(!t.isEditable)return;if(t.cellMode===wKt.Edit)return;const n=S({},t,{reason:OKt.cellDoubleClick});e.current.publishEvent("cellEditStart",n,r)},[e]),m=s.useCallback((t,r)=>{if(t.cellMode===wKt.View)return;if(e.current.getCellMode(t.id,t.field)===wKt.View)return;const n=S({},t,{reason:PKt.cellFocusOut});e.current.publishEvent("cellEditStop",n,r)},[e]),v=s.useCallback((t,r)=>{if(t.cellMode===wKt.Edit){if(229===r.which)return;let n;if("Escape"===r.key?n=PKt.escapeKeyDown:"Enter"===r.key?n=PKt.enterKeyDown:"Tab"===r.key&&(n=r.shiftKey?PKt.shiftTabKeyDown:PKt.tabKeyDown,r.preventDefault()),n){const o=S({},t,{reason:n});e.current.publishEvent("cellEditStop",o,r)}}else if(t.isEditable){let n;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:r,cellParams:t,editMode:"cell"}))return;if(xZt(r)?n=OKt.printableKeyDown:wZt(r)?n=OKt.pasteKeyDown:"Enter"===r.key?n=OKt.enterKeyDown:"Backspace"!==r.key&&"Delete"!==r.key||(n=OKt.deleteKeyDown),n){const o=S({},t,{reason:n,key:r.key});e.current.publishEvent("cellEditStart",o,r)}}},[e]),y=s.useCallback(t=>{const{id:r,field:n,reason:o}=t,a={id:r,field:n};o!==OKt.printableKeyDown&&o!==OKt.deleteKeyDown&&o!==OKt.pasteKeyDown||(a.deleteValue=!0),e.current.startCellEditMode(a)},[e]),g=s.useCallback(t=>{const{id:r,field:n,reason:o}=t;let a;e.current.runPendingEditCellValueMutation(r,n),o===PKt.enterKeyDown?a="below":o===PKt.tabKeyDown?a="right":o===PKt.shiftTabKeyDown&&(a="left");const i="escapeKeyDown"===o;e.current.stopCellEditMode({id:r,field:n,ignoreModifications:i,cellToFocusAfter:a})},[e]);var x;pYt(e,"cellDoubleClick",d(f)),pYt(e,"cellFocusOut",d(m)),pYt(e,"cellKeyDown",d(v)),pYt(e,"cellEditStart",d(y)),pYt(e,"cellEditStop",d(g)),fYt(e,"cellEditStart",t.onCellEditStart),fYt(e,"cellEditStop",(x=t.onCellEditStop,async(...t)=>{if(x){const{id:r,field:n}=t[0],o=e.current.state.editRows,a=o[r][n]?.error;a||x(...t)}}));const b=s.useCallback((t,r)=>{const n=E1t(e);return n[t]&&n[t][r]?wKt.Edit:wKt.View},[e]),k=Ni(r=>{const a=r!==t.cellModesModel;u&&a&&u(r,{api:e.current}),t.cellModesModel&&a||(n(r),o.current=r,e.current.publishEvent("cellModesModelChange",r))}),w=s.useCallback((e,t,r)=>{const n=S({},o.current);if(null!==r)n[e]=S({},n[e],{[t]:S({},r)});else{const r=Hi(n[e],[t].map(l$t));n[e]=r,0===Object.keys(n[e]).length&&delete n[e]}k(n)},[k]),_=s.useCallback((t,r,n)=>{e.current.setState(e=>{const o=S({},e.editRows);return null!==n?o[t]=S({},o[t],{[r]:S({},n)}):(delete o[t][r],0===Object.keys(o[t]).length&&delete o[t]),S({},e,{editRows:o})})},[e]),C=s.useCallback(e=>{const{id:t,field:r}=e,n=Hi(e,r8t);p(t,r),h(t,r,wKt.View),w(t,r,S({mode:wKt.Edit},n))},[p,h,w]),M=Ni(async t=>{const{id:r,field:n,deleteValue:o,initialValue:a}=t,i=e.current.getCellValue(r,n);let s=i;o?s=t8t(e.current.getColumn(n)):a&&(s=a);const l=e.current.getColumn(n),c=!!l.preProcessEditCellProps&&o;let u={value:s,error:!1,isProcessingProps:c};if(_(r,n,u),e.current.setCellFocus(r,n),c&&(u=await Promise.resolve(l.preProcessEditCellProps({id:r,row:e.current.getRow(r),props:u,hasChanged:s!==i})),e.current.getCellMode(r,n)===wKt.Edit)){const t=E1t(e);_(r,n,S({},u,{value:t[r][n].value,isProcessingProps:!1}))}}),D=s.useCallback(e=>{const{id:t,field:r}=e,n=Hi(e,n8t);h(t,r,wKt.Edit),w(t,r,S({mode:wKt.View},n))},[h,w]),O=Ni(async r=>{const{id:n,field:o,ignoreModifications:s,cellToFocusAfter:c="none"}=r;h(n,o,wKt.Edit),e.current.runPendingEditCellValueMutation(n,o);const u=()=>{_(n,o,null),w(n,o,null),"none"!==c&&e.current.moveFocusToRelativeCell(n,o,c)};if(s)return void u();const d=E1t(e),{error:p,isProcessingProps:f}=d[n][o],m=e.current.getRow(n);if(p||f)return a.current[n][o].mode=wKt.Edit,void w(n,o,{mode:wKt.Edit});const v=e.current.getRowWithUpdatedValuesFromCellEditing(n,o);if(t.dataSource?.updateRow){if(n5t(m,v))return void u();const t=()=>{a.current[n][o].mode=wKt.Edit,w(n,o,{mode:wKt.Edit})},r={rowId:n,updatedRow:v,previousRow:m};try{await e.current.dataSource.editRow(r),u()}catch{t()}}else if(i){const t=e=>{a.current[n][o].mode=wKt.Edit,w(n,o,{mode:wKt.Edit}),l?l(e):"production"!==process.env.NODE_ENV&&lat(["MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/editing/persistence/."],"error")};try{Promise.resolve(i(v,m,{rowId:n})).then(t=>{e.current.updateRows([t]),u()}).catch(t)}catch(e){t(e)}}else e.current.updateRows([v]),u()}),P={setCellEditingEditCellValue:s.useCallback(async t=>{const{id:r,field:n,value:o,debounceMs:a,unstable_skipValueParser:i}=t;p(r,n),h(r,n,wKt.Edit);const s=e.current.getColumn(n),l=e.current.getRow(r);let c=o;s.valueParser&&!i&&(c=s.valueParser(o,l,s,e));let u=E1t(e),d=S({},u[r][n],{value:c,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});if(s.preProcessEditCellProps){const e=o!==u[r][n].value;d=S({},d,{isProcessingProps:!0}),_(r,n,d),d=await Promise.resolve(s.preProcessEditCellProps({id:r,row:l,props:d,hasChanged:e}))}return e.current.getCellMode(r,n)!==wKt.View&&(u=E1t(e),d=S({},d,{isProcessingProps:!1}),d.value=s.preProcessEditCellProps?u[r][n].value:c,_(r,n,d),u=E1t(e),!u[r]?.[n]?.error)},[e,p,h,_]),getRowWithUpdatedValuesFromCellEditing:s.useCallback((t,r)=>{const n=e.current.getColumn(r),o=E1t(e),a=e.current.getRow(t);if(!o[t]||!o[t][r])return e.current.getRow(t);const{value:i}=o[t][r];return n.valueSetter?n.valueSetter(i,a,n,e):S({},a,{[r]:i})},[e])};CJt(e,{getCellMode:b,startCellEditMode:C,stopCellEditMode:D},"public"),CJt(e,P,"private"),s.useEffect(()=>{c&&k(c)},[c,k]),po(()=>{const t=qYt(e),n=a.current;a.current=gKt(r),Object.entries(r).forEach(([r,o])=>{Object.entries(o).forEach(([o,a])=>{const i=n[r]?.[o]?.mode||wKt.View,s=t[r]?e.current.getRowId(t[r]):r;a.mode===wKt.Edit&&i===wKt.View?M(S({id:s,field:o},a)):a.mode===wKt.View&&i===wKt.Edit&&O(S({id:s,field:o},a))})})},[e,r,M,O])})(e,t),((e,t)=>{const[r,n]=s.useState({}),o=s.useRef(r),a=s.useRef({}),i=s.useRef({}),l=s.useRef(void 0),c=s.useRef(null),{processRowUpdate:u,onProcessRowUpdateError:d,rowModesModel:p,onRowModesModelChange:h}=t,f=e=>(...r)=>{t.editMode===kKt.Row&&e(...r)},m=s.useCallback((t,r)=>{const n=e.current.getCellParams(t,r);if(!e.current.isCellEditable(n))throw new Error(`MUI X: The cell with id=${t} and field=${r} is not editable.`)},[e]),v=s.useCallback((t,r)=>{if(e.current.getRowMode(t)!==r)throw new Error(`MUI X: The row with id=${t} is not in ${r} mode.`)},[e]),y=s.useCallback(t=>{const r=E1t(e);return Object.values(r[t]).some(e=>e.error)},[e]),g=s.useCallback((t,r)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===_Kt.Edit)return;const n=S({},e.current.getRowParams(t.id),{field:t.field,reason:EKt.cellDoubleClick});e.current.publishEvent("rowEditStart",n,r)},[e]),x=s.useCallback(e=>{c.current=e},[]),b=s.useCallback((t,r)=>{t.isEditable&&e.current.getRowMode(t.id)!==_Kt.View&&(c.current=null,l.current=setTimeout(()=>{if(c.current?.id!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===_Kt.View)return;if(y(t.id))return;const n=S({},e.current.getRowParams(t.id),{field:t.field,reason:jKt.rowFocusOut});e.current.publishEvent("rowEditStop",n,r)}}))},[e,y]);s.useEffect(()=>()=>{clearTimeout(l.current)},[]);const k=s.useCallback((t,r)=>{if(t.cellMode===_Kt.Edit){if(229===r.which)return;let n;if("Escape"===r.key)n=jKt.escapeKeyDown;else if("Enter"===r.key)n=jKt.enterKeyDown;else if("Tab"===r.key){const o=YKt(e).filter(r=>e.current.getColumn(r).type===RZt||e.current.isCellEditable(e.current.getCellParams(t.id,r)));if(r.shiftKey?t.field===o[0]&&(n=jKt.shiftTabKeyDown):t.field===o[o.length-1]&&(n=jKt.tabKeyDown),r.preventDefault(),!n){const n=o.findIndex(e=>e===t.field),a=o[r.shiftKey?n-1:n+1];e.current.setCellFocus(t.id,a)}}if(n){if(n!==jKt.escapeKeyDown&&y(t.id))return;const o=S({},e.current.getRowParams(t.id),{reason:n,field:t.field});e.current.publishEvent("rowEditStop",o,r)}}else if(t.isEditable){let n;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:r,cellParams:t,editMode:"row"}))return;if(xZt(r)||wZt(r)?n=EKt.printableKeyDown:"Enter"===r.key?n=EKt.enterKeyDown:"Backspace"!==r.key&&"Delete"!==r.key||(n=EKt.deleteKeyDown),n){const o=S({},e.current.getRowParams(t.id),{field:t.field,reason:n});e.current.publishEvent("rowEditStart",o,r)}}},[e,y]),w=s.useCallback(t=>{const{id:r,field:n,reason:o}=t,a={id:r,fieldToFocus:n};o!==EKt.printableKeyDown&&o!==EKt.deleteKeyDown||(a.deleteValue=!!n),e.current.startRowEditMode(a)},[e]),_=s.useCallback(t=>{const{id:r,reason:n,field:o}=t;let a;e.current.runPendingEditCellValueMutation(r),n===jKt.enterKeyDown?a="below":n===jKt.tabKeyDown?a="right":n===jKt.shiftTabKeyDown&&(a="left");const i="escapeKeyDown"===n;e.current.stopRowEditMode({id:r,ignoreModifications:i,field:o,cellToFocusAfter:a})},[e]);pYt(e,"cellDoubleClick",f(g)),pYt(e,"cellFocusIn",f(x)),pYt(e,"cellFocusOut",f(b)),pYt(e,"cellKeyDown",f(k)),pYt(e,"rowEditStart",f(w)),pYt(e,"rowEditStop",f(_)),fYt(e,"rowEditStart",t.onRowEditStart),fYt(e,"rowEditStop",t.onRowEditStop);const C=s.useCallback(r=>j1t(e,{rowId:r,editMode:t.editMode})?_Kt.Edit:_Kt.View,[e,t.editMode]),M=Ni(r=>{const a=r!==t.rowModesModel;h&&a&&h(r,{api:e.current}),t.rowModesModel&&a||(n(r),o.current=r,e.current.publishEvent("rowModesModelChange",r))}),D=s.useCallback((e,t)=>{const r=S({},o.current);null!==t?r[e]=S({},t):delete r[e],M(r)},[M]),O=s.useCallback((t,r)=>{e.current.setState(e=>{const n=S({},e.editRows);return null!==r?n[t]=r:delete n[t],S({},e,{editRows:n})})},[e]),P=s.useCallback((t,r,n)=>{e.current.setState(e=>{const o=S({},e.editRows);return null!==n?o[t]=S({},o[t],{[r]:S({},n)}):(delete o[t][r],0===Object.keys(o[t]).length&&delete o[t]),S({},e,{editRows:o})})},[e]),E=s.useCallback(e=>{const{id:t}=e,r=Hi(e,o8t);v(t,_Kt.View),D(t,S({mode:_Kt.Edit},r))},[v,D]),j=Ni(t=>{const{id:r,fieldToFocus:n,deleteValue:o,initialValue:a}=t,s=e.current.getRow(r),l=qKt(e),c=l.reduce((t,i)=>{const s=i.field;if(!e.current.getCellParams(r,s).isEditable)return t;const l=e.current.getColumn(s);let c=e.current.getCellValue(r,s);return n===s&&(o||a)&&(o?c=t8t(l):a&&(c=a)),t[s]={value:c,error:!1,isProcessingProps:l.editable&&!!l.preProcessEditCellProps&&o},t},{});i.current[r]=s,O(r,c),n&&e.current.setCellFocus(r,n),l.filter(e=>e.editable&&!!e.preProcessEditCellProps&&o).forEach(t=>{const n=t.field,i=e.current.getCellValue(r,n),l=o?t8t(t):a??i;Promise.resolve(t.preProcessEditCellProps({id:r,row:s,props:c[n],hasChanged:l!==i})).then(t=>{if(e.current.getRowMode(r)===_Kt.Edit){const o=E1t(e);P(r,n,S({},t,{value:o[r][n].value,isProcessingProps:!1}))}})})}),T=s.useCallback(e=>{const{id:t}=e,r=Hi(e,a8t);v(t,_Kt.Edit),D(t,S({mode:_Kt.View},r))},[v,D]),N=Ni(async r=>{const{id:n,ignoreModifications:o,field:s,cellToFocusAfter:l="none"}=r;e.current.runPendingEditCellValueMutation(n);const c=()=>{"none"!==l&&s&&e.current.moveFocusToRelativeCell(n,s,l),O(n,null),D(n,null),delete i.current[n]};if(o)return void c();const p=E1t(e),h=i.current[n];if(Object.values(p[n]).some(e=>e.isProcessingProps))return void(a.current[n].mode=_Kt.Edit);if(y(n))return a.current[n].mode=_Kt.Edit,void D(n,{mode:_Kt.Edit});const f=e.current.getRowWithUpdatedValuesFromRowEditing(n);if(t.dataSource?.updateRow){if(n5t(h,f))return void c();const t=()=>{a.current[n].mode=_Kt.Edit,D(n,{mode:_Kt.Edit})},r={rowId:n,updatedRow:f,previousRow:h};try{await e.current.dataSource.editRow(r),c()}catch{t()}}else if(u){const t=e=>{a.current[n]&&(a.current[n].mode=_Kt.Edit,D(n,{mode:_Kt.Edit})),d?d(e):"production"!==process.env.NODE_ENV&&lat(["MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/editing/persistence/."],"error")};try{Promise.resolve(u(f,h,{rowId:n})).then(t=>{e.current.updateRows([t]),c()}).catch(t)}catch(e){t(e)}}else e.current.updateRows([f]),c()}),R={setRowEditingEditCellValue:s.useCallback(t=>{const{id:r,field:n,value:o,debounceMs:a,unstable_skipValueParser:i}=t;m(r,n);const s=e.current.getColumn(n),l=e.current.getRow(r);let c=o;s.valueParser&&!i&&(c=s.valueParser(o,l,s,e));let u=E1t(e),d=S({},u[r][n],{value:c,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});return s.preProcessEditCellProps||P(r,n,d),new Promise(t=>{const o=[];if(s.preProcessEditCellProps){const a=d.value!==u[r][n].value;d=S({},d,{isProcessingProps:!0}),P(r,n,d);const i=Hi(u[r],[n].map(l$t)),p=Promise.resolve(s.preProcessEditCellProps({id:r,row:l,props:d,hasChanged:a,otherFieldsProps:i})).then(o=>{e.current.getRowMode(r)!==_Kt.View?(u=E1t(e),(o=S({},o,{isProcessingProps:!1})).value=s.preProcessEditCellProps?u[r][n].value:c,P(r,n,o)):t(!1)});o.push(p)}Object.entries(u[r]).forEach(([a,i])=>{if(a===n)return;const s=e.current.getColumn(a);if(!s.preProcessEditCellProps)return;i=S({},i,{isProcessingProps:!0}),P(r,a,i),u=E1t(e);const c=Hi(u[r],[a].map(l$t)),d=Promise.resolve(s.preProcessEditCellProps({id:r,row:l,props:i,hasChanged:!1,otherFieldsProps:c})).then(n=>{e.current.getRowMode(r)!==_Kt.View?(n=S({},n,{isProcessingProps:!1}),P(r,a,n)):t(!1)});o.push(d)}),Promise.all(o).then(()=>{e.current.getRowMode(r)===_Kt.Edit?(u=E1t(e),t(!u[r][n].error)):t(!1)})})},[e,m,P]),getRowWithUpdatedValuesFromRowEditing:s.useCallback(t=>{const r=E1t(e),n=e.current.getRow(t);if(!r[t])return e.current.getRow(t);let o=S({},i.current[t],n);return Object.entries(r[t]).forEach(([t,r])=>{const n=e.current.getColumn(t);n?.valueSetter?o=n.valueSetter(r.value,o,n,e):o[t]=r.value}),o},[e])};CJt(e,{getRowMode:C,startRowEditMode:E,stopRowEditMode:T},"public"),CJt(e,R,"private"),s.useEffect(()=>{p&&M(p)},[p,M]),po(()=>{const t=qYt(e),n=a.current;a.current=gKt(r);const o=new Set([...Object.keys(r),...Object.keys(n)]);Array.from(o).forEach(o=>{const a=r[o]??{mode:_Kt.View},i=n[o]?.mode||_Kt.View,s=t[o]?e.current.getRowId(t[o]):o;a.mode===_Kt.Edit&&i===_Kt.View?j(S({id:s},a)):a.mode===_Kt.View&&i===_Kt.Edit&&N(S({id:s},a))})},[e,r,j,N])})(e,t);const r=s.useRef({}),{isCellEditable:n}=t,o=s.useCallback(e=>!$Zt(e.rowNode)&&(!!e.colDef.editable&&(!!e.colDef.renderEditCell&&(!n||n(e)))),[n]);s.useEffect(()=>{const e=r.current;return()=>{Object.entries(e).forEach(([t,r])=>{Object.keys(r).forEach(r=>{const[n]=e[t][r];clearTimeout(n),delete e[t][r]})})}},[]);const a=s.useCallback((e,t)=>{if(r.current[e])if(t){if(r.current[e][t]){const[,n]=r.current[e][t];n()}}else Object.keys(r.current[e]).forEach(t=>{const[,n]=r.current[e][t];n()})},[]),i=s.useCallback(n=>{const{id:o,field:a,debounceMs:i}=n;return new Promise(s=>{((e,t,n,o)=>{if(!n)return void o();if(r.current[e]||(r.current[e]={}),r.current[e][t]){const[n]=r.current[e][t];clearTimeout(n)}const a=setTimeout(()=>{o(),delete r.current[e][t]},n);r.current[e][t]=[a,()=>{const[n]=r.current[e][t];clearTimeout(n),o(),delete r.current[e][t]}]})(o,a,i,async()=>{const r=t.editMode===kKt.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(o,a)===wKt.Edit){const e=await r(n);s(e)}})})},[e,t.editMode]),l=s.useCallback((r,n)=>t.editMode===kKt.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(r,n):e.current.getRowWithUpdatedValuesFromRowEditing(r),[e,t.editMode]),c=s.useCallback((t,r)=>{const n=E1t(e);return n[t]?.[r]??null},[e]),u={runPendingEditCellValueMutation:a};CJt(e,{isCellEditable:o,setEditCellValue:i,getRowWithUpdatedValues:l,unstable_getEditCellMeta:c},"public"),CJt(e,u,"private")},l8t=(e,t,r)=>{const n=!!t.dataSource;return r.current.caches.rows=BZt({rows:n?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),S({},e,{rows:HZt({apiRef:r,rowCountProp:t.rowCount,loadingProp:!!n||t.loading,previousTree:null,previousTreeDepths:null})})},c8t=e=>"full"===e.updates.type?(e=>{const t={[AZt]:S({},IZt(),{children:e})};for(let r=0;r<e.length;r+=1){const n=e[r];t[n]={id:n,depth:0,parent:AZt,type:"leaf",groupingKey:null}}return{groupingName:_6t,tree:t,treeDepths:{0:e.length},dataRowIds:e}})(e.updates.rows):(({previousTree:e,actions:t})=>{const r=S({},e),n={};for(let e=0;e<t.remove.length;e+=1){const o=t.remove[e];n[o]=!0,delete r[o]}for(let e=0;e<t.insert.length;e+=1){const n=t.insert[e];r[n]={id:n,depth:0,parent:AZt,type:"leaf",groupingKey:null}}const o=r[AZt];let a=[...o.children,...t.insert];return Object.values(n).length&&(a=a.filter(e=>!n[e])),r[AZt]=S({},o,{children:a}),{groupingName:_6t,tree:r,treeDepths:{0:a.length},dataRowIds:a}})({previousTree:e.previousTree,actions:e.updates.actions});class u8t extends Error{}function d8t(e,t){const r=s.useCallback(t=>({field:t,colDef:e.current.getColumn(t)}),[e]),n=s.useCallback(t=>{const r=e.current.getRow(t);if(!r)throw new u8t(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:r}},[e]),o=s.useCallback((t,r,n,{cellMode:o,colDef:a,hasFocus:i,rowNode:s,tabIndex:l})=>{const c=n[r],u=a?.valueGetter?a.valueGetter(c,n,a,e):c,d={id:t,field:r,row:n,rowNode:s,colDef:a,cellMode:o,hasFocus:i,tabIndex:l,value:u,formattedValue:u,isEditable:!1,api:e.current};return a&&a.valueFormatter&&(d.formattedValue=a.valueFormatter(u,n,a,e)),d.isEditable=a&&e.current.isCellEditable(d),d},[e]),a=s.useCallback((r,n)=>{const o=e.current.getRow(r),a=GYt(e,r);if(!o||!a)throw new u8t(`No row with id #${r} found`);const i=XXt(e),s=rQt(e),l=e.current.getCellMode(r,n);return e.current.getCellParamsForRow(r,n,o,{colDef:t.listView&&t.listViewColumn?.field===n?BKt(e):e.current.getColumn(n),rowNode:a,hasFocus:null!==i&&i.field===n&&i.id===r,tabIndex:s&&s.field===n&&s.id===r?0:-1,cellMode:l})},[e,t.listView,t.listViewColumn?.field]),i=s.useCallback((t,r)=>{const n=e.current.getColumn(r),o=e.current.getRow(t);if(!o)throw new u8t(`No row with id #${t} found`);return n&&n.valueGetter?n.valueGetter(o[n.field],o,n,e):o[r]},[e]),l=s.useCallback((t,r)=>((e,t,r)=>{const n=t.field;if(!t||!t.valueGetter)return e[n];const o=e[t.field];return t.valueGetter(o,e,t,r)})(t,r,e),[e]),c=s.useCallback((t,r)=>{const n=l(t,r);return r&&r.valueFormatter?r.valueFormatter(n,t,r,e):n},[e,l]),u=s.useCallback(t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(`[role="columnheader"][data-field="${$0t(t)}"]`)}(e.current.rootElementRef.current,t):null,[e]),d=s.useCallback(t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(q0t(t))}(e.current.rootElementRef.current,t):null,[e]),p=s.useCallback((t,r)=>e.current.rootElementRef.current?function(e,{id:t,field:r}){const n=`${q0t(t)} .${nYt.cell}[data-field="${$0t(r)}"]`;return e.querySelector(n)}(e.current.rootElementRef.current,{id:t,field:r}):null,[e]),h={getCellParamsForRow:o};CJt(e,{getCellValue:i,getCellParams:a,getCellElement:p,getRowValue:l,getRowFormattedValue:c,getRowParams:n,getRowElement:d,getColumnHeaderParams:r,getColumnHeaderElement:u},"public"),CJt(e,h,"private")}const p8t={type:"include",ids:new Set},h8t=(e,t)=>S({},e,{rowSelection:t.rowSelection?t.rowSelectionModel??p8t:p8t}),f8t=(e,t)=>{const r=(e=>{const{classes:t}=e;return s.useMemo(()=>ua({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},rYt,t),[t])})({classes:t.classes}),n=s.useCallback(n=>{const o=S({},MQt,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),a=t.checkboxSelection,i=null!=n.lookup[CQt];return a&&!i?(n.lookup[CQt]=o,n.orderedFields=[CQt,...n.orderedFields]):!a&&i?(delete n.lookup[CQt],n.orderedFields=n.orderedFields.filter(e=>e!==CQt)):a&&i&&(n.lookup[CQt]=S({},o,n.lookup[CQt]),t.columns.some(e=>e.field===CQt)||(n.orderedFields=[CQt,...n.orderedFields.filter(e=>e!==CQt)])),n},[e,r,t.columns,t.checkboxSelection]);x6t(e,"hydrateColumns",n)},m8t=(e,t)=>{const r=t.sortModel??t.initialState?.sorting?.sortModel??[];return S({},e,{sorting:{sortModel:rKt(r,t.disableMultipleColumnsSorting),sortedRows:[]}})};function v8t(e){const{containerSize:t,scrollPosition:r,elementSize:n,elementOffset:o}=e,a=o+n;return n>t?o:a-t>r?a-t:o<r?o:void 0}function y8t(e,t=166){let r,n;const o=()=>{r=void 0,e(...n)};function a(...e){n=e,void 0===r&&(r=setTimeout(o,t))}return a.clear=()=>{clearTimeout(r),r=void 0},a}const g8t={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:"\t",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:kKt.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"production"===process.env.NODE_ENV?"error":"warn",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rows:[],rowSelection:!0,rowSpacingType:"margin",rowSpanning:!1,showCellVerticalBorder:!1,showColumnVerticalBorder:!1,showToolbar:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,virtualizeColumnsWithAutoRowHeight:!1},x8t={width:0,height:0},b8t={isReady:!1,root:x8t,viewportOuterSize:x8t,viewportInnerSize:x8t,contentSize:x8t,minimumSize:x8t,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},k8t=(e,t,r)=>S({},e,{dimensions:S({},b8t,M8t(t,r,PYt(r),XKt(r)))}),w8t=RGt(GKt,JKt,(e,t)=>{const r=e.length;return 0===r?0:$Jt(t[r-1]+e[r-1].computedWidth,1)});function _8t(e,t){const r=MJt(e,"useResizeContainer"),n=s.useRef(!1),o=s.useRef(x8t),a=SYt(e,XKt),i=SYt(e,PYt),l=SYt(e,w8t),c=s.useRef(!0),{rowHeight:u,headerHeight:d,groupHeaderHeight:p,headerFilterHeight:h,headersTotalHeight:f,leftPinnedWidth:m,rightPinnedWidth:v}=M8t(t,e,i,a),y=s.useCallback(()=>IGt(e),[e]),g=s.useCallback(t=>{e.current.setState(e=>S({},e,{dimensions:t})),e.current.rootElementRef.current&&C8t(e.current.rootElementRef.current,IGt(e))},[e]),x=s.useCallback(()=>{const r=IGt(e);if(!r.isReady)return 0;const n=OJt(e);if(t.getRowHeight){const t=RJt(e),r=t.lastRowIndex-t.firstRowIndex;return Math.min(r-1,n.rows.length)}const o=Math.floor(r.viewportInnerSize.height/u);return Math.min(o,n.rows.length)},[e,t.getRowHeight,u]),b=s.useCallback(()=>{if(c.current)return;const r=function(e,t){if(void 0!==t)return t;if(null===e)return 0;const r=S8t.get(e);if(void 0!==r)return r;const n=Oi(e).createElement("div");n.style.width="99px",n.style.height="99px",n.style.position="absolute",n.style.overflow="scroll",n.className="scrollDiv",e.appendChild(n);const o=n.offsetWidth-n.clientWidth;return e.removeChild(n),S8t.set(e,o),o}(e.current.mainElementRef.current,t.scrollbarSize),n=fJt(e),a=f+n.pinnedTopRowsTotalHeight,i=n.pinnedBottomRowsTotalHeight,s={width:l,height:$Jt(n.currentPageTotalHeight,1)};let y,x,b=!1,k=!1;if(t.autoHeight)k=!1,b=Math.round(l)>Math.round(o.current.width),y={width:o.current.width,height:a+i+s.height},x={width:Math.max(0,y.width-(k?r:0)),height:Math.max(0,y.height-(b?r:0))};else{y={width:o.current.width,height:o.current.height},x={width:Math.max(0,y.width),height:Math.max(0,y.height-a-i)};const e=s,t=x,n=e.width>t.width,l=e.height>t.height;(n||l)&&(k=l,b=e.width+(k?r:0)>t.width,b&&(k=e.height+r>t.height)),k&&(x.width-=r),b&&(x.height-=r)}const w=Math.max(y.width,l+(k?r:0)),_={width:l,height:a+s.height+i},C={isReady:!0,root:o.current,viewportOuterSize:y,viewportInnerSize:x,contentSize:s,minimumSize:_,hasScrollX:b,hasScrollY:k,scrollbarSize:r,headerHeight:d,groupHeaderHeight:p,headerFilterHeight:h,rowWidth:w,rowHeight:u,columnsTotalWidth:l,leftPinnedWidth:m,rightPinnedWidth:v,headersTotalHeight:f,topContainerHeight:a,bottomContainerHeight:i},M=e.current.state.dimensions;var S,D;n5t(M,C)||(g(C),S=C.viewportInnerSize,D=M.viewportInnerSize,(S.width!==D.width||S.height!==D.height)&&e.current.publishEvent("viewportInnerSizeChange",C.viewportInnerSize),e.current.updateRenderContext?.())},[e,g,t.scrollbarSize,t.autoHeight,u,d,p,h,l,f,m,v]),k=Ni(b),w=s.useMemo(()=>t.resizeThrottleMs>0?y8t(()=>{k(),e.current.publishEvent("debouncedResize",o.current)},t.resizeThrottleMs):void 0,[e,t.resizeThrottleMs,k]);s.useEffect(()=>w?.clear,[w]);const _={getRootDimensions:y},C={updateDimensions:b,getViewportPageSize:x};po(b,[b]),CJt(e,_,"public"),CJt(e,C,"private");const M=s.useCallback(t=>{C8t(t,IGt(e))},[e]),D=s.useCallback(e=>{if(o.current=e,0!==e.height||n.current||t.autoHeight||qJt||(r.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),n.current=!0),0!==e.width||n.current||qJt||(r.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),n.current=!0),c.current||!w)return c.current=!1,void b();w()},[b,t.autoHeight,w,r]);fYt(e,"rootMount",M),fYt(e,"resize",D),fYt(e,"debouncedResize",t.onResize)}function C8t(e,t){const r=(t,r)=>e.style.setProperty(t,r);r("--DataGrid-hasScrollX",`${Number(t.hasScrollX)}`),r("--DataGrid-hasScrollY",`${Number(t.hasScrollY)}`),r("--DataGrid-scrollbarSize",`${t.scrollbarSize}px`),r("--DataGrid-rowWidth",`${t.rowWidth}px`),r("--DataGrid-columnsTotalWidth",`${t.columnsTotalWidth}px`),r("--DataGrid-leftPinnedWidth",`${t.leftPinnedWidth}px`),r("--DataGrid-rightPinnedWidth",`${t.rightPinnedWidth}px`),r("--DataGrid-headerHeight",`${t.headerHeight}px`),r("--DataGrid-headersTotalHeight",`${t.headersTotalHeight}px`),r("--DataGrid-topContainerHeight",`${t.topContainerHeight}px`),r("--DataGrid-bottomContainerHeight",`${t.bottomContainerHeight}px`),r("--height",`${t.rowHeight}px`)}function M8t(e,t,r,n){const o=KZt(e.rowHeight,g8t.rowHeight,ZZt);return{rowHeight:Math.floor(o*r),headerHeight:Math.floor(e.columnHeaderHeight*r),groupHeaderHeight:Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*r),headerFilterHeight:Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*r),columnsTotalWidth:w8t(t),headersTotalHeight:hJt(t,e),leftPinnedWidth:n.left.reduce((e,t)=>e+t.computedWidth,0),rightPinnedWidth:n.right.reduce((e,t)=>e+t.computedWidth,0)}}const S8t=new WeakMap;const D8t=void 0!==globalThis.ResizeObserver?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},O8t=(e,t,r)=>{r.current.caches.rowsMeta={heights:new Map};const n=BGt(r),o=VYt(r),a=cQt(r),i=Math.min(a.enabled?a.paginationModel.pageSize:o,o);return S({},e,{rowsMeta:{currentPageTotalHeight:i*n,positions:Array.from({length:i},(e,t)=>t*n),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})};function P8t(e){const{apiRef:t,lookup:r,columnIndex:n,rowId:o,minFirstColumnIndex:a,maxLastColumnIndex:i,columns:s}=e,l=s.length,c=s[n],u=t.current.getRow(o),d=t.current.getRowValue(u,c),p="function"==typeof c.colSpan?c.colSpan(d,u,c,t):c.colSpan;if(!p||1===p)return E8t(r,o,n,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let h=c.computedWidth;for(let e=1;e<p;e+=1){const t=n+e;if(t>=a&&t<i){h+=s[t].computedWidth,E8t(r,o,n+e,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(n+p,l-1),leftVisibleCellIndex:n})}E8t(r,o,n,{spannedByColSpan:!1,cellProps:{colSpan:p,width:h}})}return{colSpan:p}}function E8t(e,t,r,n){e[t]||(e[t]={}),e[t][r]=n}const j8t=(e,t,r)=>{if(TKt(e)){if(void 0!==r[e.field])throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${r[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(r[e.field]=t)}const{groupId:n,children:o}=e;o.forEach(e=>{j8t(e,[...t,n],r)})},T8t=e=>{if(!e)return{};const t={};return e.forEach(e=>{j8t(e,[],t)}),t},N8t=(e,t,r)=>{const n=e=>t[e]??[],o=[],a=Math.max(0,...e.map(e=>n(e).length)),i=(e,t,r)=>{const o=n(e),a=n(t);for(let e=0;e<=r;e+=1)if(o[e]!==a[e])return!1;return!0},s=(e,t)=>{const n=r?.left,o=r?.right,a=!!n?.includes(e),i=!!n?.includes(t),s=!!o?.includes(e),l=!!o?.includes(t);return a!==i||s!==l};for(let t=0;t<a;t+=1){const r=[];for(let o=0;o<e.length;o+=1){const a=e[o],l=n(a)[t]??null;if(0===r.length){r.push({columnFields:[a],groupId:l});continue}const c=r[r.length-1],u=c.columnFields[c.columnFields.length-1];c.groupId!==l||!i(u,a,t)||s(u,a)?r.push({columnFields:[a],groupId:l}):c.columnFields.push(a)}o.push(r)}return o},R8t=["groupId","children"],z8t=e=>{const t={};for(let r=0;r<e.length;r+=1){const n=e[r];if(TKt(n))continue;const{groupId:o,children:a}=n,i=Hi(n,R8t);if(!o)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");"production"===process.env.NODE_ENV||a||console.warn(`MUI X: group groupId=${o} has no children.`);const s=S({},i,{groupId:o}),l=z8t(a);if(void 0!==l[o]||void 0!==t[o])throw new Error(`MUI X: The groupId ${o} is used multiple times in the columnGroupingModel.`);Object.assign(t,l),t[o]=s}return t},A8t=(e,t,r)=>{if(r.current.caches.columnGrouping={lastColumnGroupingModel:t.columnGroupingModel},!t.columnGroupingModel)return e;const n=HKt(r),o=YKt(r),a=z8t(t.columnGroupingModel??[]),i=T8t(t.columnGroupingModel??[]),s=N8t(n,i,r.current.state.pinnedColumns??{}),l=0===o.length?0:Math.max(...o.map(e=>i[e]?.length??0));return S({},e,{columnGrouping:{lookup:a,unwrappedGroupingModel:i,headerStructure:s,maxDepth:l}})};function F8t(e,t){if(void 0!==t&&e.changedTouches){for(let r=0;r<e.changedTouches.length;r+=1){const n=e.changedTouches[r];if(n.identifier===t)return{x:n.clientX,y:n.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function I8t(e,t,r,n){let o=e;return o+="Right"===n?t-r.left:r.right-t,o}function L8t(e){e.preventDefault(),e.stopImmediatePropagation()}function B8t(e){const t=s.useRef(void 0),r=()=>TJt(e),n=SYt(e,r);s.useEffect(()=>{t.current&&!1===n&&(t.current.resolve(),t.current=void 0)});return()=>{if(!t.current){if(!1===r())return Promise.resolve();t.current=function(){let e,t;const r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r}()}return t.current}}function V8t(e,t,r){const n={},o=e.current.rootElementRef.current;return o.classList.add(nYt.autosizing),r.forEach(r=>{const o=function(e,t){const r=e.virtualScrollerRef.current;return Array.from(r.querySelectorAll(`:scope > div > div > div > [data-field="${$0t(t)}"][role="gridcell"]`))}(e.current,r.field),a=o.map(e=>e.getBoundingClientRect().width??0),i=t.includeOutliers?a:function(e,t){if(e.length<4)return e;const r=e.slice();r.sort((e,t)=>e-t);const n=r[Math.floor(.25*r.length)],o=r[Math.floor(.75*r.length)-1],a=o-n,i=a<5?5:a*t;return r.filter(e=>e>n-i&&e<o+i)}(a,t.outliersFactor);if(t.includeHeaders){const t=(s=e.current,l=r.field,s.columnHeadersContainerRef.current.querySelector(`:scope > div > [data-field="${$0t(l)}"][role="columnheader"]`));if(t){const e=t.querySelector(`.${nYt.columnHeaderTitle}`),r=t.querySelector(`.${nYt.columnHeaderTitleContainerContent}`),n=t.querySelector(`.${nYt.iconButtonContainer}`),o=t.querySelector(`.${nYt.menuIcon}`),a=e??r,s=window.getComputedStyle(t,null),l=parseInt(s.paddingLeft,10)+parseInt(s.paddingRight,10),c=a.scrollWidth+1+l+(n?.clientWidth??0)+(o?.clientWidth??0);i.push(c)}}var s,l;const c=r.minWidth!==-1/0&&void 0!==r.minWidth,u=r.maxWidth!==1/0&&void 0!==r.maxWidth,d=c?r.minWidth:0,p=u?r.maxWidth:1/0,h=0===i.length?0:Math.max(...i);n[r.field]=vKt(h,d,p)}),o.classList.remove(nYt.autosizing),n}const H8t=e=>S({},e,{columnResize:{resizingColumnField:""}});function $8t(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const q8t=(e,t)=>{const r=Vo(),n=MJt(e,"useGridColumnResize"),o=_s($8t).current,a=s.useRef(null),i=s.useRef(null),l=Ds(),c=s.useRef(void 0),u=t=>{n.debug(`Updating width to ${t} for col ${o.colDef.field}`);const r=o.columnHeaderElement.offsetWidth,a=t-r,i=t-o.initialColWidth;if(i>0){const t=o.initialTotalWidth+i;e.current.rootElementRef?.current?.style.setProperty("--DataGrid-rowWidth",`${t}px`)}o.colDef.computedWidth=t,o.colDef.width=t,o.colDef.flex=0,o.columnHeaderElement.style.width=`${t}px`;const s=o.headerFilterElement;s&&(s.style.width=`${t}px`),o.groupHeaderElements.forEach(e=>{const r=e;let n;n="1"===r.getAttribute("aria-colspan")?`${t}px`:`${r.offsetWidth+a}px`,r.style.width=n}),o.cellElements.forEach(e=>{const r=e;let n;n="1"===r.getAttribute("aria-colspan")?`${t}px`:`${r.offsetWidth+a}px`,r.style.setProperty("--width",n)});const l=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);l===AKt.LEFT&&(W8t(o.fillerLeft,"width",a),o.leftPinnedCellsAfter.forEach(e=>{W8t(e,"left",a)}),o.leftPinnedHeadersAfter.forEach(e=>{W8t(e,"left",a)})),l===AKt.RIGHT&&(W8t(o.fillerRight,"width",a),o.rightPinnedCellsBefore.forEach(e=>{W8t(e,"right",a)}),o.rightPinnedHeadersBefore.forEach(e=>{W8t(e,"right",a)}))},d=t=>{if(g(),o.previousMouseClickEvent){const r=o.previousMouseClickEvent,n=r.timeStamp,a=r.clientX,i=r.clientY;if(t.timeStamp-n<300&&t.clientX===a&&t.clientY===i)return o.previousMouseClickEvent=void 0,void e.current.publishEvent("columnResizeStop",null,t)}if(o.colDef){e.current.setColumnWidth(o.colDef.field,o.colDef.width),n.debug(`Updating col ${o.colDef.field} with new width: ${o.colDef.width}`);const t=VKt(e);o.groupHeaderElements.forEach(e=>{const r=e,n=`${e.getAttribute("data-fields").slice(2,-2).split("-|-").reduce((e,r)=>!1!==t.columnVisibilityModel[r]?e+t.lookup[r].computedWidth:e,0)}px`;r.style.width=n})}l.start(0,()=>{e.current.publishEvent("columnResizeStop",null,t)})},p=(t,n,s)=>{const l=e.current.rootElementRef.current;var c,u;o.initialColWidth=t.computedWidth,o.initialTotalWidth=e.current.getRootDimensions().rowWidth,o.colDef=t,o.columnHeaderElement=(c=e.current.columnHeadersContainerRef.current,u=t.field,c.querySelector(`[data-field="${$0t(u)}"]`));const d=l.querySelector(`.${nYt.headerFilterRow} [data-field="${$0t(t.field)}"]`);d&&(o.headerFilterElement=d),o.groupHeaderElements=function(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${$0t(t)}-|"]`)??[])}(e.current.columnHeadersContainerRef?.current,t.field),o.cellElements=function(e,t){if(!H0t(e,nYt.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const n=Number(r)-1,o=[];return t.virtualScrollerRef?.current?(K0t(t).forEach(e=>{const r=e.getAttribute("data-id");if(!r)return;let a=n;const i=t.unstable_getCellColSpanInfo(r,n);i&&i.spannedByColSpan&&(a=i.leftVisibleCellIndex);const s=e.querySelector(`[data-colindex="${a}"]`);s&&o.push(s)}),o):[]}(o.columnHeaderElement,e.current),o.fillerLeft=U0t(e.current,r?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=U0t(e.current,r?"filler--pinnedLeft":"filler--pinnedRight");const p=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=p!==AKt.LEFT?[]:function(e,t,r){const n=Z0t(t);return G0t({api:e,colIndex:n,position:r?"right":"left",filterFn:e=>r?e<n:e>n})}(e.current,o.columnHeaderElement,r),o.rightPinnedCellsBefore=p!==AKt.RIGHT?[]:function(e,t,r){const n=Z0t(t);return G0t({api:e,colIndex:n,position:r?"left":"right",filterFn:e=>r?e>n:e<n})}(e.current,o.columnHeaderElement,r),o.leftPinnedHeadersAfter=p!==AKt.LEFT?[]:function(e,t,r){const n=Z0t(t);return Y0t({api:e,position:r?"right":"left",colIndex:n,filterFn:e=>r?e<n:e>n})}(e.current,o.columnHeaderElement,r),o.rightPinnedHeadersBefore=p!==AKt.RIGHT?[]:function(e,t,r){const n=Z0t(t);return Y0t({api:e,position:r?"left":"right",colIndex:n,filterFn:(e,t)=>!t.classList.contains(nYt["columnHeader--last"])&&(r?e>n:e<n)})}(e.current,o.columnHeaderElement,r),i.current=function(e,t){const r=e.classList.contains(nYt["columnSeparator--sideRight"])?"Right":"Left";return t?function(e){return"Right"===e?"Left":"Right"}(r):r}(n,r),a.current=function(e,t,r){return"Left"===r?e-t.left:t.right-e}(s,o.columnHeaderElement.getBoundingClientRect(),i.current)},h=Ni(d),f=Ni(t=>{if(0===t.buttons)return void h(t);let r=I8t(a.current,t.clientX,o.columnHeaderElement.getBoundingClientRect(),i.current);r=vKt(r,o.colDef.minWidth,o.colDef.maxWidth),u(r);const n={element:o.columnHeaderElement,colDef:o.colDef,width:r};e.current.publishEvent("columnResize",n,t)}),m=Ni(e=>{F8t(e,c.current)&&d(e)}),v=Ni(t=>{const r=F8t(t,c.current);if(!r)return;if("mousemove"===t.type&&0===t.buttons)return void m(t);let n=I8t(a.current,r.x,o.columnHeaderElement.getBoundingClientRect(),i.current);n=vKt(n,o.colDef.minWidth,o.colDef.maxWidth),u(n);const s={element:o.columnHeaderElement,colDef:o.colDef,width:n};e.current.publishEvent("columnResize",s,t)}),y=Ni(t=>{const r=H0t(t.target,nYt["columnSeparator--resizable"]);if(!r)return;const o=t.changedTouches[0];null!=o&&(c.current=o.identifier);const a=H0t(t.target,nYt.columnHeader),i=a.getAttribute("data-field");const s=e.current.getColumn(i);n.debug(`Start Resize on col ${s.field}`),e.current.publishEvent("columnResizeStart",{field:i},t),p(s,r,o.clientX);const l=Oi(t.currentTarget);l.addEventListener("touchmove",v),l.addEventListener("touchend",m)}),g=s.useCallback(()=>{const t=Oi(e.current.rootElementRef.current);t.body.style.removeProperty("cursor"),t.removeEventListener("mousemove",f),t.removeEventListener("mouseup",h),t.removeEventListener("touchmove",v),t.removeEventListener("touchend",m),setTimeout(()=>{t.removeEventListener("click",L8t,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[e,o,f,h,v,m]),x=s.useCallback(({field:t})=>{e.current.setState(e=>S({},e,{columnResize:S({},e.columnResize,{resizingColumnField:t})}))},[e]),b=s.useCallback(()=>{e.current.setState(e=>S({},e,{columnResize:S({},e.columnResize,{resizingColumnField:""})}))},[e]),k=Ni(({colDef:t},r)=>{if(0!==r.button)return;if(!r.currentTarget.classList.contains(nYt["columnSeparator--resizable"]))return;r.preventDefault(),n.debug(`Start Resize on col ${t.field}`),e.current.publishEvent("columnResizeStart",{field:t.field},r),p(t,r.currentTarget,r.clientX);const a=Oi(e.current.rootElementRef.current);a.body.style.cursor="col-resize",o.previousMouseClickEvent=r.nativeEvent,a.addEventListener("mousemove",f),a.addEventListener("mouseup",h),a.addEventListener("click",L8t,!0)}),w=Ni((r,n)=>{if(t.disableAutosize)return;if(0!==n.button)return;const o=e.current.state.columns.lookup[r.field];!1!==o.resizable&&e.current.autosizeColumns(S({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[o.field]}))}),_=B8t(e),C=s.useRef(!1),M=s.useCallback(async r=>{const n=e.current.rootElementRef?.current;if(!n)return;if(C.current)return;C.current=!0;const o=VKt(e),a=S({},P1t,r,{columns:r?.columns??o.orderedFields});a.columns=a.columns.filter(e=>!1!==o.columnVisibilityModel[e]);const i=a.columns.map(t=>e.current.state.columns.lookup[t]);try{!t.disableVirtualization&&a.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await _());const r=V8t(e,a,i),n=i.map(e=>S({},e,{width:r[e.field],computedWidth:r[e.field],flex:0}));if(a.expand){const t=o.orderedFields.map(e=>o.lookup[e]).filter(e=>!1!==o.columnVisibilityModel[e.field]).reduce((e,t)=>e+(r[t.field]??t.computedWidth??t.width),0),a=e.current.getRootDimensions(),i=a.viewportInnerSize.width-t;if(i>0){const e=i/(n.length||1);n.forEach(t=>{t.width+=e,t.computedWidth+=e})}}e.current.updateColumns(n),n.forEach((t,r)=>{if(t.width!==i[r].width){const r=t.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t.field),colDef:t,width:r})}})}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),C.current=!1}},[e,_,t.disableVirtualization]);s.useEffect(()=>g,[g]),Ms(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),SJt(e,()=>e.current.columnHeadersContainerRef?.current,"touchstart",y,{passive:!0}),CJt(e,{autosizeColumns:M},"public"),pYt(e,"columnResizeStop",b),pYt(e,"columnResizeStart",x),pYt(e,"columnSeparatorMouseDown",k),pYt(e,"columnSeparatorDoubleClick",w),fYt(e,"columnResize",t.onColumnResize),fYt(e,"columnWidthChange",t.onColumnWidthChange)};function W8t(e,t,r){e&&(e.style[t]=`${parseInt(e.style[t],10)+r}px`)}function U8t(e){return 0!==e.firstRowIndex||0!==e.lastRowIndex}const G8t=(e,t,r)=>{if(!e)return null;let n=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(n=o(n,e,t,r)),n},Y8t={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},K8t={firstRowIndex:0,lastRowIndex:0},Z8t=new Set([CQt,"__reorder__",eXt]),X8t=(e,t,r,n,o,a,i)=>{const s=a?{}:S({},e.current.state.rowSpanning.spannedCells),l=a?{}:S({},e.current.state.rowSpanning.hiddenCells),c=a?{}:S({},e.current.state.rowSpanning.hiddenCellOriginMap);return a&&(i=K8t),t.forEach(t=>{if(!Z8t.has(t.field)){for(let a=o.firstRowIndex;a<o.lastRowIndex;a+=1){const i=r[a];if(l[i.id]?.[t.field])continue;const u=G8t(i.model,t,e);if(null==u)continue;let d=i.id,p=a,h=0;const f=[];if(a===o.firstRowIndex){let o=a-1,i=r[o];for(;o>=n.firstRowIndex&&i&&G8t(i.model,t,e)===u;){const e=r[o+1];l[e.id]?l[e.id][t.field]=!0:l[e.id]={[t.field]:!0},f.push(a),h+=1,d=i.id,p=o,o-=1,i=r[o]}}f.forEach(e=>{c[e]?c[e][t.field]=p:c[e]={[t.field]:p}});let m=a+1;for(;m<=n.lastRowIndex&&r[m]&&G8t(r[m].model,t,e)===u;){const e=r[m];l[e.id]?l[e.id][t.field]=!0:l[e.id]={[t.field]:!0},c[m]?c[m][t.field]=p:c[m]={[t.field]:p},m+=1,h+=1}h>0&&(s[d]?s[d][t.field]=h+1:s[d]={[t.field]:h+1})}i={firstRowIndex:Math.min(i.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(i.lastRowIndex,o.lastRowIndex)}}}),{spannedCells:s,hiddenCells:l,hiddenCellOriginMap:c,processedRange:i}},Q8t=(e,t)=>{const r=QYt(t).length;if(e.pagination){const e=mQt(t);let n=20;return e>0&&(n=e-1),{firstRowIndex:0,lastRowIndex:Math.min(n,r)}}return{firstRowIndex:0,lastRowIndex:Math.min(20,r)}},J8t=(e,t,r)=>{if(!t.rowSpanning)return S({},e,{rowSpanning:Y8t});const n=e.rows.dataRowIds||[],o=e.columns.orderedFields||[],a=e.rows.dataRowIdToModelLookup,i=e.columns.lookup,s=Boolean(e.filter.filterModel.items.length)||Boolean(e.filter.filterModel.quickFilterValues?.length);if(!n.length||!o.length||!a||!i||s)return S({},e,{rowSpanning:Y8t});const l=Q8t(t,r),c=n.map(e=>({id:e,model:a[e]})),u=o.map(e=>i[e]),{spannedCells:d,hiddenCells:p,hiddenCellOriginMap:h}=X8t(r,u,c,l,l,!0,K8t);return S({},e,{rowSpanning:{spannedCells:d,hiddenCells:p,hiddenCellOriginMap:h}})},e7t=(e,t,r)=>S({},e,{listViewColumn:t.listViewColumn?S({},t.listViewColumn,{computedWidth:t7t(r)}):void 0});function t7t(e){return IGt(e).viewportInnerSize.width}const r7t=RGt(kXt,yXt,dQt,(e,t,r)=>({groupKeys:[],paginationModel:r,sortModel:t,filterModel:e,start:r.page*r.pageSize,end:r.page*r.pageSize+r.pageSize-1}));let n7t=function(e){return e.Default="set-new-rows",e.LazyLoading="replace-row-range",e}({});class o7t{constructor(e){this.chunkSize=void 0,this.getCacheKeys=e=>{if(this.chunkSize<1||"number"!=typeof e.start)return[e];const t=[];for(let r=e.start;r<=e.end;r+=this.chunkSize){const n=Math.min(r+this.chunkSize-1,e.end);t.push(S({},e,{start:r,end:n}))}return t},this.splitResponse=(e,t)=>{const r=this.getCacheKeys(e);if(1===r.length)return new Map([[e,t]]);const n=new Map;return r.forEach(r=>{const o=r.end===e.end,a=S({},t,{pageInfo:S({},t.pageInfo,{hasNextPage:void 0!==t.pageInfo?.hasNextPage&&!o||t.pageInfo?.hasNextPage,nextCursor:void 0===t.pageInfo?.nextCursor||o?t.pageInfo?.nextCursor:t.rows[r.end+1].id}),rows:"number"!=typeof r.start||"number"!=typeof e.start?t.rows:t.rows.slice(r.start-e.start,r.end-e.start+1)});n.set(r,a)}),n},this.chunkSize=e}}o7t.mergeResponses=e=>1===e.length?e[0]:e.reduce((e,t)=>({rows:[...e.rows,...t.rows],rowCount:t.rowCount,pageInfo:t.pageInfo}),{rows:[],rowCount:0,pageInfo:{}});const a7t={clear:()=>{},get:()=>{},set:()=>{}};function i7t(e,t={}){return null===e?a7t:e??new F1t(t)}function s7t(e){const{groupId:r,width:n,depth:o,maxDepth:a,fields:i,height:l,colIndex:c,hasFocus:u,tabIndex:d,isLastColumn:p,pinnedPosition:h,pinnedOffset:f}=e,m=eYt(),v=Vo(),y=s.useRef(null),g=iYt(),x=SYt(g,aJt),b=r?x[r]:{},{headerName:k=r??"",description:w="",headerAlign:_}=b;let C;const M=r&&x[r]?.renderHeaderGroup,D=s.useMemo(()=>({groupId:r,headerName:k,description:w,depth:o,maxDepth:a,fields:i,colIndex:c,isLastColumn:p}),[r,k,w,o,a,i,c,p]);r&&M&&(C=M(D));const O=S({},e,{classes:m.classes,headerAlign:_,depth:o,isDragging:!1}),P=k??r,E=Go(),j=null===r?`empty-group-cell-${E}`:r,T=(e=>{const{classes:t,headerAlign:r,isDragging:n,isLastColumn:o,showLeftBorder:a,showRightBorder:i,groupId:s,pinnedPosition:l}=e;return ua({root:["columnHeader","left"===r&&"columnHeader--alignLeft","center"===r&&"columnHeader--alignCenter","right"===r&&"columnHeader--alignRight",n&&"columnHeader--moving",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder","withBorderColor",null===s?"columnHeader--emptyGroup":"columnHeader--filledGroup",l===tXt.LEFT&&"columnHeader--pinnedLeft",l===tXt.RIGHT&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},rYt,t)})(O);s.useLayoutEffect(()=>{if(u){const e=y.current.querySelector('[tabindex="0"]')||y.current;e?.focus()}},[g,u]);const N=s.useCallback(e=>t=>{W0t(t)||g.current.publishEvent(e,D,t)},[g,D]),R=s.useMemo(()=>({onKeyDown:N("columnGroupHeaderKeyDown"),onFocus:N("columnGroupHeaderFocus"),onBlur:N("columnGroupHeaderBlur")}),[N]),z="function"==typeof b.headerClassName?b.headerClassName(D):b.headerClassName,A=s.useMemo(()=>X1t(S({},e.style),v,h,f),[h,f,e.style,v]);return t.jsx(i2t,S({ref:y,classes:T,columnMenuOpen:!1,colIndex:c,height:l,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:d,isDraggable:!1,headerComponent:C,headerClassName:z,description:w,elementId:j,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:P,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:A},R))}const l7t=ii("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow"})({display:"flex"}),c7t=e=>{const{visibleColumns:r,sortColumnLookup:n,filterColumnLookup:o,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:i,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:p,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:f}=e,[m,v]=s.useState(""),[y,g]=s.useState(""),x=wJt(),b=eYt(),k=SYt(x,oJt),w=SYt(x,JKt),_=SYt(x,zJt),C=SYt(x,XKt),M=SYt(x,$Kt),D=r1t(w,_,C.left.length),O=SYt(x,LGt),P=SYt(x,qGt),E=SYt(x,WGt),j=SYt(x,UGt),T=SYt(x,KGt),N=s.useCallback(e=>g(e.field),[]),R=s.useCallback(()=>g(""),[]),z=s.useCallback(e=>v(e.field),[]),A=s.useCallback(()=>v(""),[]),F=s.useMemo(()=>C.left.length?{firstColumnIndex:0,lastColumnIndex:C.left.length}:null,[C.left.length]),I=s.useMemo(()=>C.right.length?{firstColumnIndex:r.length-C.right.length,lastColumnIndex:r.length}:null,[C.right.length,r.length]);pYt(x,"columnResizeStart",N),pYt(x,"columnResizeStop",R),pYt(x,"columnHeaderDragStart",z),pYt(x,"columnHeaderDragEndNative",A);const L=e=>{const{renderContext:t=_}=e||{},n=t.firstColumnIndex,o=t.lastColumnIndex;return{renderedColumns:r.slice(n,o),firstColumnToRender:n,lastColumnToRender:o}},B=(e,r,n,o=!1)=>{const a=e?.position===tXt.RIGHT,i=void 0===e?.position,l=C.right.length>0&&a||0===C.right.length&&i,c=D-n;return t.jsxs(s.Fragment,{children:[i&&t.jsx("div",{role:"presentation",style:{width:c}}),r,i&&t.jsx("div",{role:"presentation",className:Wn(nYt.filler,o&&nYt["filler--borderBottom"])}),l&&t.jsx(U5t,{header:!0,pinnedRight:a,borderBottom:o,borderTop:!1})]})};"production"!==process.env.NODE_ENV&&(B.displayName="getFillers");const V=(e,r={})=>{const{renderedColumns:i,firstColumnToRender:s}=L(e),c=[];for(let u=0;u<i.length;u+=1){const p=i[u],h=s+u,v=0===h,g=null!==a&&a.field===p.field||v&&!f?0:-1,x=null!==l&&l.field===p.field,k=d.open&&d.field===p.field,_=e?.position,M=H5t(_,p.computedWidth,h,w,O,T),D=_===tXt.RIGHT?i[u-1]:i[u+1],j=!!D&&(null!==l&&l.field===D.field),N=h+1===w.length-C.right.length,R=u,z=i.length,A=q5t(_,R),F=$5t(_,R,z,b.showColumnVerticalBorder,P);c.push(t.jsx(l2t,S({},n[p.field],{columnMenuOpen:k,filterItemsCounter:o[p.field]&&o[p.field].length,headerHeight:E,isDragging:p.field===m,colDef:p,colIndex:h,isResizing:y===p.field,isLast:h===w.length-1,hasFocus:x,tabIndex:g,pinnedPosition:_,pinnedOffset:M,isLastUnpinned:N,isSiblingFocused:j,showLeftBorder:A,showRightBorder:F},r),p.field))}return B(e,c,0)},H=()=>t.jsxs(l7t,{role:"row","aria-rowindex":u+1,ownerState:b,className:nYt["row--borderBottom"],style:{height:E},children:[F&&V({position:tXt.LEFT,renderContext:F},{disableReorder:!0}),V({renderContext:_}),I&&V({position:tXt.RIGHT,renderContext:I},{disableReorder:!0,separatorSide:r2t.Left})]});"production"!==process.env.NODE_ENV&&(H.displayName="getColumnHeadersRow");const $=({depth:e,params:n})=>{const o=L(n);if(0===o.renderedColumns.length)return null;const{firstColumnToRender:a,lastColumnToRender:s}=o,l=h[e],d=r[a].field,f=k[d]?.[e]??null,m=l.findIndex(({groupId:e,columnFields:t})=>e===f&&t.includes(d)),v=r[s-1].field,y=k[v]?.[e]??null,g=l.findIndex(({groupId:e,columnFields:t})=>e===y&&t.includes(v)),x=l.slice(m,g+1).map(e=>S({},e,{columnFields:e.columnFields.filter(e=>!1!==p[e])})).filter(e=>e.columnFields.length>0),_=x[0].columnFields.indexOf(d),C=x[0].columnFields.slice(0,_).reduce((e,t)=>e+(M[t].computedWidth??0),0);let D=a;const E=x.map(({groupId:r,columnFields:o},a)=>{const s=null!==c&&c.depth===e&&o.includes(c.field),l=null!==i&&i.depth===e&&o.includes(i.field)?0:-1,d={groupId:r,width:o.reduce((e,t)=>e+M[t].computedWidth,0),fields:o,colIndex:D,hasFocus:s,tabIndex:l},p=n.position,h=H5t(p,d.width,D,w,O,T);D+=o.length;let f=a;return p===tXt.LEFT&&(f=D-1),t.jsx(s7t,{groupId:r,width:d.width,fields:d.fields,colIndex:d.colIndex,depth:e,isLastColumn:a===x.length-1,maxDepth:u,height:j,hasFocus:s,tabIndex:l,pinnedPosition:p,pinnedOffset:h,showLeftBorder:q5t(p,f),showRightBorder:$5t(p,f,x.length,b.showColumnVerticalBorder,P)},a)});return B(n,E,C)};return{renderContext:_,leftRenderContext:F,rightRenderContext:I,pinnedColumns:C,visibleColumns:r,columnPositions:w,getFillers:B,getColumnHeadersRow:H,getColumnsToRender:L,getColumnGroupHeadersRows:()=>{if(0===u)return null;const e=[];for(let r=0;r<u;r+=1)e.push(t.jsxs(l7t,{role:"row","aria-rowindex":r+1,ownerState:b,style:{height:j},children:[F&&$({depth:r,params:{position:tXt.LEFT,renderContext:F,maxLastColumn:F.lastColumnIndex}}),$({depth:r,params:{renderContext:_}}),I&&$({depth:r,params:{position:tXt.RIGHT,renderContext:I,maxLastColumn:I.lastColumnIndex}})]},r));return e},getPinnedCellOffset:H5t,isDragging:!!m,getInnerProps:()=>({role:"rowgroup"})}},u7t=["className"],d7t=so("div",{name:"MuiDataGrid",slot:"ColumnHeaders"})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),p7t=QGt(function(e,r){const{className:n}=e,o=Hi(e,u7t),a=eYt(),i=(e=>{const{classes:t}=e;return ua({root:["columnHeaders"]},rYt,t)})(a);return t.jsx(d7t,S({className:Wn(i.root,n),ownerState:a},o,{role:"presentation",ref:r}))});"production"!==process.env.NODE_ENV&&(p7t.displayName="GridBaseColumnHeaders");const h7t=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],f7t=QGt(function(e,r){const{visibleColumns:n,sortColumnLookup:o,filterColumnLookup:a,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:p,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:f}=e,m=Hi(e,h7t),{getInnerProps:v,getColumnHeadersRow:y,getColumnGroupHeadersRows:g}=c7t({visibleColumns:n,sortColumnLookup:o,filterColumnLookup:a,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:p,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:f});return t.jsxs(p7t,S({},m,v(),{ref:r,children:[g(),y()]}))});"production"!==process.env.NODE_ENV&&(f7t.displayName="GridColumnHeaders"),"production"!==process.env.NODE_ENV&&(f7t.propTypes={columnGroupHeaderFocus:Vt.exports.shape({depth:Vt.exports.number.isRequired,field:Vt.exports.string.isRequired}),columnGroupHeaderTabIndexState:Vt.exports.shape({depth:Vt.exports.number.isRequired,field:Vt.exports.string.isRequired}),columnGroupsHeaderStructure:Vt.exports.arrayOf(Vt.exports.arrayOf(Vt.exports.shape({columnFields:Vt.exports.arrayOf(Vt.exports.string).isRequired,groupId:Vt.exports.string}))).isRequired,columnHeaderFocus:Vt.exports.shape({field:Vt.exports.string.isRequired}),columnHeaderTabIndexState:Vt.exports.shape({field:Vt.exports.string.isRequired}),columnMenuState:Vt.exports.shape({field:Vt.exports.string,open:Vt.exports.bool.isRequired}).isRequired,columnVisibility:Vt.exports.object.isRequired,filterColumnLookup:Vt.exports.object.isRequired,hasOtherElementInTabSequence:Vt.exports.bool.isRequired,headerGroupingMaxDepth:Vt.exports.number.isRequired,sortColumnLookup:Vt.exports.object.isRequired,visibleColumns:Vt.exports.arrayOf(Vt.exports.object).isRequired});const m7t=G(f7t);const v7t=QGt(function(e,r){const n=iYt().current.getLocaleText("noResultsOverlayLabel");return t.jsx(j0t,S({},e,{ref:r,children:n}))});"production"!==process.env.NODE_ENV&&(v7t.displayName="GridNoResultsOverlay");const y7t=so("div")({position:"sticky",zIndex:40,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});const g7t=S({},h6t,{cell:r0t,skeletonCell:c0t,columnHeaderFilterIconButton:x2t,columnHeaderSortIcon:g2t,columnMenu:s4t,columnHeaders:m7t,detailPanels:function(e){return null},bottomContainer:function(e){const r=ua({root:["bottomContainer"]},rYt,{});return t.jsx(y7t,S({},e,{className:Wn(r.root,nYt["container--bottom"]),role:"presentation"}))},footer:V5t,footerRowCount:s3t,toolbar:F5t,pinnedRows:function(e){return null},loadingOverlay:e3t,noResultsOverlay:v7t,noRowsOverlay:t3t,noColumnsOverlay:r3t,pagination:o3t,filterPanel:z4t,columnsPanel:function(e){const r=eYt();return t.jsx(u4t,S({},e,{children:t.jsx(r.slots.columnsManagement,S({},r.slotProps?.columnsManagement))}))},columnsManagement:$4t,panel:m4t,row:d3t});class x7t{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,t,r={}){let n=this.events[e];if(n||(n={highPriority:new Map,regular:new Map},this.events[e]=n),r.isFirst?n.highPriority.set(t,!0):n.regular.set(t,!0),"production"!==process.env.NODE_ENV){const t=n.highPriority.size+n.regular.size;t>this.maxListeners&&!this.warnOnce&&(this.warnOnce=!0,console.warn([`Possible EventEmitter memory leak detected. ${t} ${e} listeners added.`].join("\n")))}}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const r=this.events[e];if(!r)return;const n=Array.from(r.highPriority.keys()),o=Array.from(r.regular.keys());for(let e=n.length-1;e>=0;e-=1){const o=n[e];r.highPriority.has(o)&&o.apply(this,t)}for(let e=0;e<o.length;e+=1){const n=o[e];r.regular.has(n)&&n.apply(this,t)}}once(e,t){const r=this;this.on(e,function n(...o){r.removeListener(e,n),t.apply(r,o)})}}const b7t=Symbol("mui.api_private");let k7t=0;function w7t(e,t){const r=s.useRef(null),n=s.useRef(null);n.current||(n.current=function(e){const t=e.current?.[b7t];if(t)return t;const r={},n={state:r,store:NGt.create(r),instanceId:{id:k7t}};return k7t+=1,n.getPublicApi=()=>e.current,n.register=(t,r)=>{Object.keys(r).forEach(o=>{const a=r[o],i=n[o];if(!0===i?.spying?i.target=a:n[o]=a,"public"===t){const t=e.current,r=t[o];!0===r?.spying?r.target=a:t[o]=a}})},n.register("private",{caches:{},eventManager:new x7t}),n}(r)),r.current||(r.current=function(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[b7t]:e.current}}(n));const o=s.useCallback((...e)=>{const[r,o,a={}]=e;if(a.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(a)&&a.isPropagationStopped())return;const i=t.signature===oYt.DataGridPro||t.signature===oYt.DataGridPremium?{api:n.current.getPublicApi()}:{};n.current.eventManager.emit(r,o,a,i)},[n,t.signature]),a=s.useCallback((e,t,r)=>{n.current.eventManager.on(e,t,r);const o=n.current;return()=>{o.eventManager.removeListener(e,t)}},[n]);return CJt(n,{subscribeEvent:a,publishEvent:o},"public"),e&&!e.current?.state&&(e.current=r.current),s.useImperativeHandle(e,()=>r.current,[r]),s.useEffect(()=>{const e=n.current;return()=>{e.publishEvent("unmount")}},[n]),n}const _7t=(e,t)=>S({},e,{headerFiltering:{enabled:t.headerFilters??!1,editing:null,menuOpen:null}}),C7t=RGt(AGt(e=>e.columnReorder),e=>e.dragCol),M7t="left",S7t="right",D7t=e=>S({},e,{columnReorder:{dragCol:""}}),O7t=(e,t)=>{const r=MJt(e,"useGridColumnReorder"),n=s.useRef(null),o=s.useRef({x:0,y:0}),a=s.useRef(null),i=s.useRef({}),l=s.useRef(void 0),c=(e=>{const{classes:t}=e;return ua({columnHeaderDragging:["columnHeader--dragging"]},rYt,t)})({classes:t.classes}),u=Vo();s.useEffect(()=>()=>{clearTimeout(l.current)},[]);const d=s.useCallback((o,i)=>{const s=C7t(e);if(!t.disableColumnReorder&&s){if(r.debug("End dragging col"),i.preventDefault(),i.stopPropagation(),clearTimeout(l.current),n.current.classList.contains(c.columnHeaderDragging)&&n.current.classList.remove(c.columnHeaderDragging),n.current=null,"none"!==i.dataTransfer.dropEffect||t.keepColumnPositionIfDraggedOutside){const t={column:e.current.getColumn(s),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(s),oldIndex:a.current};e.current.publishEvent("columnOrderChange",t)}else e.current.setColumnIndex(s,a.current),a.current=null;e.current.setState(e=>S({},e,{columnReorder:S({},e.columnReorder,{dragCol:""})}))}},[e,t.disableColumnReorder,t.keepColumnPositionIfDraggedOutside,r,c.columnHeaderDragging]),p=s.useCallback((o,s)=>{if(t.disableColumnReorder||o.colDef.disableReorder)return;r.debug(`Start dragging col ${o.field}`),s.stopPropagation(),n.current=s.currentTarget,n.current.classList.add(c.columnHeaderDragging);const u=t=>{n.current.removeEventListener("dragend",u),e.current.publishEvent("columnHeaderDragEndNative",o,t)};n.current.addEventListener("dragend",u),s.dataTransfer&&(s.dataTransfer.effectAllowed="move"),e.current.setState(e=>S({},e,{columnReorder:S({},e.columnReorder,{dragCol:o.field})})),l.current=setTimeout(()=>{n.current.classList.remove(c.columnHeaderDragging)}),a.current=e.current.getColumnIndex(o.field,!1);const d=e.current.getColumnGroupPath(o.field),p=a.current,h=e.current.getAllColumns(),f=e.current.getAllGroupDetails(),m=t=>{const r=h[t].field;return e.current.getColumnGroupPath(r)};let v=null;d.forEach(e=>{f[e]?.freeReordering||(p>0&&m(p-1).includes(e)||p+1<h.length&&m(p+1).includes(e))&&(v=e)}),i.current={};for(let e=0;e<h.length;e+=1){const t=e<=p?e-1:e,r=e<p?e:e+1;if(null!==v){let n=!1;(t>=0&&m(t).includes(v)||r<h.length&&m(r).includes(v))&&(n=!0),n||(i.current[e]=!0)}t>=0&&r<h.length&&m(r).forEach(r=>{m(t).includes(r)&&(d.includes(r)||f[r]?.freeReordering||(i.current[e]=!0))})}},[t.disableColumnReorder,c.columnHeaderDragging,r,e]),h=s.useCallback((e,t)=>{t.preventDefault(),t.stopPropagation()},[]),f=s.useCallback((t,n)=>{const a=C7t(e);if(!a)return;r.debug(`Dragging over col ${t.field}`),n.preventDefault(),n.stopPropagation();const s={x:n.clientX,y:n.clientY};if(t.field!==a&&(l=o.current,c=s,l.x!==c.x||l.y!==c.y)){const r=e.current.getColumnIndex(t.field,!1),n=e.current.getColumnIndex(t.field,!0),l=e.current.getColumn(t.field),c=e.current.getColumnIndex(a,!1),d=e.current.getVisibleColumns(),p=e.current.getAllColumns(),h=((e,t)=>e.x<=t.x?S7t:M7t)(o.current,s),f=h===M7t&&(u?c<r:r<c);if(f||h===S7t&&(u?r<c:c<r)){let t,o=0;if(t=!l.disableReorder||(f?n>0&&!d[n-1].disableReorder:n<d.length-1&&!d[n+1].disableReorder),i.current[r]){let e,a=r+o;if(f)for(e=n>0?d[n-1].field:null;a>0&&p[a].field!==e&&i.current[a];)o-=1,a=r+o;else for(e=n+1<d.length?d[n+1].field:null;a<p.length-1&&p[a].field!==e&&i.current[a];)o+=1,a=r+o;(i.current[a]||p[a].field===e)&&(t=!1)}e.current.unstable_applyPipeProcessors("canBeReordered",t,{targetIndex:n})&&e.current.setColumnIndex(a,r+o)}o.current=s}var l,c},[e,r,u]);pYt(e,"columnHeaderDragStart",p),pYt(e,"columnHeaderDragEnter",h),pYt(e,"columnHeaderDragOver",f),pYt(e,"columnHeaderDragEndNative",d),pYt(e,"cellDragEnter",h),pYt(e,"cellDragOver",f),fYt(e,"columnOrderChange",t.onColumnOrderChange)},P7t=S({},gZt,{type:"custom",sortable:!1,filterable:!1,disableColumnMenu:!0,disableReorder:!0,align:"left",width:200,valueGetter:(e,t,r,n)=>{const o=_Qt(n,t),a=GYt(n,o);return"group"===a?.type||"leaf"===a?.type?a.groupingKey:void 0}}),E7t={field:QZt,editable:!1,groupable:!1};let j7t=function(e){return e.Default="tree-data",e.DataSource="tree-data-source",e}({});const T7t=eYt,N7t=iYt;function R7t(e){const{id:r,field:n,formattedValue:o,rowNode:a,hideDescendantCount:i,offsetMultiplier:s=2}=e,l=T7t(),c=N7t(),u=(e=>{const{classes:t}=e;return ua({root:["treeDataGroupingCell"],toggle:["treeDataGroupingCellToggle"]},rYt,t)})(l),d=SYt(c,SXt)[a.id]??0,p=a.childrenExpanded?l.slots.treeDataCollapseIcon:l.slots.treeDataExpandIcon;return t.jsxs("div",{className:u.root,style:{marginLeft:RYt.spacing(a.depth*s)},children:[t.jsx("div",{className:u.toggle,children:d>0&&t.jsx(l.slots.baseIconButton,S({size:"small",onClick:e=>{c.current.setRowChildrenExpansion(r,!a.childrenExpanded),c.current.setCellFocus(r,n),e.stopPropagation()},tabIndex:-1,"aria-label":a.childrenExpanded?c.current.getLocaleText("treeDataCollapse"):c.current.getLocaleText("treeDataExpand")},l?.slotProps?.baseIconButton,{children:t.jsx(p,{fontSize:"inherit"})}))}),t.jsxs("span",{children:[void 0===o?a.groupingKey:o,!i&&d>0?` (${d})`:""]})]})}function z7t(e){const{colDef:r,onClick:n}=e,o=N7t(),a=T7t(),i=Vo(),l=s.useCallback(e=>t=>{o.current.pinColumn(r.field,e),n(t)},[o,r.field,n]),c=e=>{o.current.unpinColumn(r.field),n(e)},u=t.jsx(a.slots.baseMenuItem,{onClick:l(AKt.LEFT),iconStart:t.jsx(a.slots.columnMenuPinLeftIcon,{fontSize:"small"}),children:o.current.getLocaleText("pinToLeft")}),d=t.jsx(a.slots.baseMenuItem,{onClick:l(AKt.RIGHT),iconStart:t.jsx(a.slots.columnMenuPinRightIcon,{fontSize:"small"}),children:o.current.getLocaleText("pinToRight")});if(!r)return null;const p=o.current.isColumnPinned(r.field);if(p){const e=p===AKt.RIGHT?AKt.LEFT:AKt.RIGHT,r=e===AKt.RIGHT?"pinToRight":"pinToLeft",n=p===AKt.RIGHT?a.slots.columnMenuPinLeftIcon:a.slots.columnMenuPinRightIcon;return t.jsxs(s.Fragment,{children:[t.jsx(a.slots.baseMenuItem,{onClick:l(e),iconStart:t.jsx(n,{fontSize:"small"}),children:o.current.getLocaleText(r)}),t.jsx(a.slots.baseMenuItem,{onClick:c,iconStart:"",children:o.current.getLocaleText("unpin")})]})}return i?t.jsxs(s.Fragment,{children:[d,u]}):t.jsxs(s.Fragment,{children:[u,d]})}"production"!==process.env.NODE_ENV&&(R7t.propTypes={api:Vt.exports.object.isRequired,cellMode:Vt.exports.oneOf(["edit","view"]).isRequired,colDef:Vt.exports.object.isRequired,field:Vt.exports.string.isRequired,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.shape({focus:Vt.exports.func.isRequired})})]),formattedValue:Vt.exports.any,hasFocus:Vt.exports.bool.isRequired,hideDescendantCount:Vt.exports.bool,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]).isRequired,isEditable:Vt.exports.bool,offsetMultiplier:Vt.exports.number,row:Vt.exports.any.isRequired,rowNode:Vt.exports.object.isRequired,tabIndex:Vt.exports.oneOf([-1,0]).isRequired,value:Vt.exports.any}),"production"!==process.env.NODE_ENV&&(z7t.propTypes={colDef:Vt.exports.object.isRequired,onClick:Vt.exports.func.isRequired});const A7t=AGt(e=>e.detailPanel),F7t=RGt(A7t,e=>e.expandedRowIds),I7t=RGt(A7t,e=>e.contentCache),L7t=zGt(A7t,e=>e.heightCache),B7t=RGt(F7t,(e,t)=>e.has(t));function V7t(e){const{id:r,row:n,api:o}=e,a=o.getRowId(n),i=SYt({current:o},B7t,a),l=T7t(),c=N7t(),u=(e=>{const{classes:t,isExpanded:r}=e;return ua({root:["detailPanelToggleCell",r&&"detailPanelToggleCell--expanded"]},rYt,t)})({classes:l.classes,isExpanded:i}),d=SYt(c,I7t),p=s.isValidElement(d[r]),h=i?l.slots.detailPanelCollapseIcon:l.slots.detailPanelExpandIcon;return t.jsx(l.slots.baseIconButton,S({size:"small",tabIndex:-1,disabled:!p,className:u.root,"aria-expanded":i,"aria-label":i?c.current.getLocaleText("collapseDetailPanel"):c.current.getLocaleText("expandDetailPanel")},l.slotProps?.baseIconButton,{children:t.jsx(h,{fontSize:"inherit"})}))}"production"!==process.env.NODE_ENV&&(V7t.propTypes={api:Vt.exports.object.isRequired,cellMode:Vt.exports.oneOf(["edit","view"]).isRequired,colDef:Vt.exports.object.isRequired,field:Vt.exports.string.isRequired,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.shape({focus:Vt.exports.func.isRequired})})]),formattedValue:Vt.exports.any,hasFocus:Vt.exports.bool.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]).isRequired,isEditable:Vt.exports.bool,row:Vt.exports.any.isRequired,rowNode:Vt.exports.object.isRequired,tabIndex:Vt.exports.oneOf([-1,0]).isRequired,value:Vt.exports.any});const H7t=so("svg",{name:"MuiDataGrid",slot:"RowReorderIcon"})({color:RYt.colors.foreground.muted});function $7t(e){const r=iYt(),n=T7t(),o=SYt(r,yXt),a=SYt(r,XYt),i=SYt(r,E1t),l=e.row.__reorder__||e.id,c=s.useRef(null),u=s.useRef(null),d=s.useMemo(()=>!!n.rowReordering&&!o.length&&1===a&&0===Object.keys(i).length,[n.rowReordering,o,a,i]),p={isDraggable:d,classes:n.classes},h=(e=>{const{isDraggable:t,classes:r}=e;return ua({root:["rowReorderCell",t&&"rowReorderCell--draggable"],placeholder:["rowReorderCellPlaceholder"],icon:["rowReorderIcon"]},rYt,r)})(p),f=s.useCallback((t,n)=>o=>{W0t(o)||r.current.getRow(e.id)&&(r.current.publishEvent(t,r.current.getRowParams(e.id),o),n&&n(o))},[r,e.id]),m=s.useCallback(()=>{r.current.rootElementRef?.current?.classList.add(nYt["root--disableUserSelection"])},[r]),v=s.useCallback(()=>{r.current.rootElementRef?.current?.classList.remove(nYt["root--disableUserSelection"])},[r]),y=s.useCallback(t=>{v(),r.current.getRow(e.id)&&r.current.publishEvent("rowDragEnd",r.current.getRowParams(e.id),t),u.current.removeEventListener("dragend",y),u.current=null},[r,e.id,v]),g=s.useCallback(e=>{c.current&&(f("rowDragStart")(e),c.current.addEventListener("dragend",y),u.current=c.current)},[f,y]),x=d?{onDragStart:g,onDragOver:f("rowDragOver"),onMouseDown:m,onMouseUp:v}:null;return"footer"===e.rowNode.type?null:t.jsxs("div",S({ref:c,className:h.root,draggable:d},x,{children:[t.jsx(H7t,{as:n.slots.rowReorderIcon,ownerState:p,className:h.icon,fontSize:"small"}),t.jsx("div",{className:h.placeholder,children:l})]}))}"production"!==process.env.NODE_ENV&&($7t.propTypes={api:Vt.exports.object.isRequired,cellMode:Vt.exports.oneOf(["edit","view"]).isRequired,colDef:Vt.exports.object.isRequired,field:Vt.exports.string.isRequired,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.shape({focus:Vt.exports.func.isRequired})})]),formattedValue:Vt.exports.any,hasFocus:Vt.exports.bool.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]).isRequired,isEditable:Vt.exports.bool,row:Vt.exports.any.isRequired,rowNode:Vt.exports.object.isRequired,tabIndex:Vt.exports.oneOf([-1,0]).isRequired,value:Vt.exports.any});const q7t=e=>"footer"===e.rowNode.type||"pinnedRow"===e.rowNode.type?null:t.jsx($7t,S({},e));"production"!==process.env.NODE_ENV&&(q7t.displayName="renderRowReorderCell");const W7t=k2t(t.jsx("g",{transform:"rotate(-30 15 10)",children:t.jsx("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinRight"),U7t=k2t(t.jsx("g",{transform:"rotate(30 8 12)",children:t.jsx("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinLeft"),G7t=["operators","item","field","buttonRef","headerFilterMenuRef","disabled","showClearItem","clearFilterItem"];function Y7t(e){const{operators:r,item:n,field:o,buttonRef:a,headerFilterMenuRef:i,disabled:l=!1,showClearItem:c,clearFilterItem:u}=e,d=Hi(e,G7t),p=Go(),h=Go(),f=T7t(),m=iYt(),v=SYt(m,rJt),y=Boolean(v===o&&i.current);if(!f.slots.headerFilterMenu)return null;const g=m.current.getLocaleText("filterPanelOperator"),x=g?String(g):void 0;return t.jsxs(s.Fragment,{children:[t.jsx(f.slots.baseIconButton,S({id:p,ref:a,"aria-label":x,title:x,"aria-controls":h,"aria-expanded":y?"true":void 0,"aria-haspopup":"true",tabIndex:-1,size:"small",onClick:e=>{i.current=e.currentTarget,m.current.showHeaderFilterMenu(o)},disabled:l},f.slotProps?.baseIconButton,{children:t.jsx(f.slots.baseBadge,{color:"primary",variant:"dot",badgeContent:c?1:0,children:t.jsx(f.slots.openFilterButtonIcon,{fontSize:"inherit"})})})),t.jsx(f.slots.headerFilterMenu,S({field:o,open:y,item:n,target:i.current,operators:r,labelledBy:p,id:h,clearFilterItem:u,showClearItem:c},d))]})}function K7t(e){const r=T7t();return t.jsx(r.slots.baseIconButton,S({tabIndex:-1,"aria-label":"Clear filter",size:"small"},r.slotProps?.baseIconButton,e,{children:t.jsx(r.slots.columnMenuClearIcon,{fontSize:"inherit"})}))}"production"!==process.env.NODE_ENV&&(Y7t.propTypes={applyFilterChanges:Vt.exports.func.isRequired,buttonRef:ll,clearFilterItem:Vt.exports.func,disabled:Vt.exports.bool,field:Vt.exports.string.isRequired,headerFilterMenuRef:Vt.exports.shape({current:Vt.exports.object}).isRequired,item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}).isRequired,operators:Vt.exports.arrayOf(Vt.exports.shape({getApplyFilterFn:Vt.exports.func.isRequired,getValueAsString:Vt.exports.func,headerLabel:Vt.exports.string,InputComponent:Vt.exports.elementType,InputComponentProps:Vt.exports.shape({apiRef:Vt.exports.shape({current:Vt.exports.object.isRequired}),applyValue:Vt.exports.func,className:Vt.exports.string,clearButton:Vt.exports.node,disabled:Vt.exports.bool,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.any.isRequired})]),headerFilterMenu:Vt.exports.node,inputRef:Vt.exports.oneOfType([Vt.exports.func,Vt.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:Vt.exports.bool,item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}),onBlur:Vt.exports.func,onFocus:Vt.exports.func,slotProps:Vt.exports.object,tabIndex:Vt.exports.number}),label:Vt.exports.string,requiresFilterValue:Vt.exports.bool,value:Vt.exports.string.isRequired})).isRequired,showClearItem:Vt.exports.bool});const Z7t=["colIndex","height","hasFocus","width","headerClassName","colDef","item","headerFilterMenuRef","InputComponentProps","showClearIcon","pinnedPosition","pinnedOffset","style","showLeftBorder","showRightBorder"],X7t=ii(dKt,{name:"MuiDataGrid",slot:"ColumnHeaderFilterInput"})({flex:1,marginRight:RYt.spacing(.5),marginBottom:RYt.spacing(-.25),'& input[type="number"], & input[type="date"], & input[type="datetime-local"]':{'&[value=""]:not(:focus)':{color:"transparent"}},[`& .${Nd.input}`]:{fontSize:"14px"},[`.${nYt["root--densityCompact"]} & .${Nd.input}`]:{paddingTop:RYt.spacing(.5),paddingBottom:RYt.spacing(.5),height:23}}),Q7t=ii("span",{name:"MuiDataGrid",slot:"ColumnHeaderFilterOperatorLabel"})({flex:1,marginRight:RYt.spacing(.5),color:RYt.colors.foreground.muted,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}),J7t={string:dKt,number:dKt,date:OQt,dateTime:OQt,boolean:uXt,singleSelect:YQt,actions:null,custom:null},e9t=QGt((e,r)=>{const{colIndex:n,height:o,hasFocus:a,width:i,headerClassName:l,colDef:c,item:u,headerFilterMenuRef:d,InputComponentProps:p,showClearIcon:h=!1,pinnedPosition:f,pinnedOffset:m,style:v,showLeftBorder:y,showRightBorder:g}=e,x=Hi(e,Z7t),b=wJt(),k=Vo(),w=SYt(b,YKt),_=T7t(),C=s.useRef(null),M=Ri(r,C),D=s.useRef(null),O=s.useRef(null),P=SYt(b,tJt)===c.field,E=SYt(b,rJt)===c.field,j=s.useMemo(()=>c.filterOperators?c.filterOperators.filter(e=>"isAnyOf"!==e.value):[],[c.filterOperators]),T=SYt(b,kXt),N=SYt(b,tZt),R=s.useMemo(()=>{if(!T?.items.length)return!1;const e=T.items.find(e=>e.field===c.field);return!!e&&!N[e.field]},[c.field,T,N]),z=s.useMemo(()=>j.find(e=>e.value===u.operator)??j[0],[u.operator,j]),A=c.filterable||R?z.InputComponent??J7t[c.type]:null,F=s.useCallback(()=>{b.current.deleteFilterItem(u)},[b,u]);let I;c.renderHeaderFilter&&(I=c.renderHeaderFilter(S({},e,{inputRef:D}))),s.useLayoutEffect(()=>{if(a&&!E){let e=C.current.querySelector('[tabindex="0"]');P&&A&&(e=D.current);const t=e||C.current;t?.focus(),b.current.columnHeadersContainerRef.current&&(b.current.columnHeadersContainerRef.current.scrollLeft=0)}},[A,b,a,P,E]);const L=s.useCallback(e=>{if(!(E||bZt(e.key)||R))switch(e.key){case"Escape":P&&b.current.stopHeaderFilterEditMode();break;case"Enter":if(P&&!e.defaultPrevented){b.current.stopHeaderFilterEditMode();break}if(e.metaKey||e.ctrlKey){d.current=O.current,b.current.showHeaderFilterMenu(c.field);break}b.current.startHeaderFilterEditMode(c.field);break;case"Tab":if(P){const t=w[n+(e.shiftKey?-1:1)]??null;t&&(b.current.startHeaderFilterEditMode(t),b.current.setColumnHeaderFilterFocus(t,e))}break;default:if(P||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)break;b.current.startHeaderFilterEditMode(c.field)}},[b,c.field,n,w,d,P,R,E]),B=s.useCallback((e,t)=>r=>{b.current.publishEvent(e,b.current.getColumnHeaderParams(c.field),r),t&&t(r)},[b,c.field]),V=s.useCallback(e=>{a||(D.current?.contains?.(e.target)&&D.current.focus(),b.current.setColumnHeaderFilterFocus(c.field,e))},[b,c.field,a]),H=s.useMemo(()=>({onKeyDown:B("headerFilterKeyDown",L),onClick:B("headerFilterClick"),onMouseDown:B("headerFilterMouseDown",V),onBlur:B("headerFilterBlur")}),[V,L,B]),$=(e=>{const{colDef:t,classes:r,showRightBorder:n,showLeftBorder:o,pinnedPosition:a}=e;return ua({root:["columnHeader","columnHeader--filter","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight","withBorderColor",n&&"columnHeader--withRightBorder",o&&"columnHeader--withLeftBorder",a===tXt.LEFT&&"columnHeader--pinnedLeft",a===tXt.RIGHT&&"columnHeader--pinnedRight"],input:["columnHeaderFilterInput"],operatorLabel:["columnHeaderFilterOperatorLabel"]},rYt,r)})(S({},_,{pinnedPosition:f,colDef:c,showLeftBorder:y,showRightBorder:g})),q=z.headerLabel??b.current.getLocaleText(`headerFilterOperator${Ir(u.operator)}`),W=!1===z.requiresFilterValue,U=void 0!==u?.value||W,G=U||a,Y=t.jsx(Y7t,{operators:j,item:u,field:c.field,disabled:R,applyFilterChanges:b.current.upsertFilterItem,headerFilterMenuRef:d,buttonRef:O,showClearItem:!h&&U,clearFilterItem:F}),K=h&&U?t.jsx(K7t,{onClick:F,disabled:R}):null;return t.jsxs("div",S({className:Wn($.root,l),style:X1t(S({height:o,width:i},v),k,f,m),role:"columnheader","aria-colindex":n+1,"aria-label":null==I?c.headerName??c.field:void 0},x,H,{ref:M,children:[I,void 0===I?t.jsxs(s.Fragment,{children:[W?t.jsxs(s.Fragment,{children:[t.jsx(Q7t,{className:$.operatorLabel,children:q}),K,Y]}):null,A&&!W?t.jsx(X7t,S({as:A,className:$.input,apiRef:b,item:u,inputRef:D,applyValue:b.current.upsertFilterItem,onFocus:()=>b.current.startHeaderFilterEditMode(c.field),onBlur:e=>{b.current.stopHeaderFilterEditMode(),e.relatedTarget?.className.includes("columnHeader")||b.current.setState(e=>S({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))},isFilterActive:G,headerFilterMenu:Y,clearButton:K,disabled:R||W,tabIndex:-1,slotProps:{root:{size:"small",label:Ir(q),placeholder:""}}},W?{value:""}:{},z?.InputComponentProps,p)):null]}):null]}))});"production"!==process.env.NODE_ENV&&(e9t.displayName="GridHeaderFilterCell"),"production"!==process.env.NODE_ENV&&(e9t.propTypes={colDef:Vt.exports.object.isRequired,colIndex:Vt.exports.number.isRequired,hasFocus:Vt.exports.bool,headerClassName:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),headerFilterMenuRef:Vt.exports.shape({current:Vt.exports.object}).isRequired,height:Vt.exports.number.isRequired,InputComponentProps:Vt.exports.shape({apiRef:Vt.exports.shape({current:Vt.exports.object.isRequired}),applyValue:Vt.exports.func,className:Vt.exports.string,clearButton:Vt.exports.node,disabled:Vt.exports.bool,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.any.isRequired})]),headerFilterMenu:Vt.exports.node,inputRef:Vt.exports.oneOfType([Vt.exports.func,Vt.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:Vt.exports.bool,item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}),onBlur:Vt.exports.func,onFocus:Vt.exports.func,slotProps:Vt.exports.object,tabIndex:Vt.exports.number}),item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}).isRequired,pinnedOffset:Vt.exports.number,pinnedPosition:Vt.exports.oneOf([0,1,2,3]),showClearIcon:Vt.exports.bool,showLeftBorder:Vt.exports.bool.isRequired,showRightBorder:Vt.exports.bool.isRequired,sortIndex:Vt.exports.number,style:Vt.exports.object,tabIndex:Vt.exports.oneOf([-1,0]).isRequired,width:Vt.exports.number.isRequired});const t9t=G(e9t);function r9t({open:e,field:r,target:n,applyFilterChanges:o,operators:a,item:i,id:l,labelledBy:c,showClearItem:u,clearFilterItem:d}){const p=iYt(),h=eYt(),f=s.useCallback(()=>{p.current.hideHeaderFilterMenu()},[p]);return n?t.jsx(EZt,{position:"bottom-end",open:e,target:n,onClose:f,children:t.jsxs(h.slots.baseMenuList,{"aria-labelledby":c,id:l,children:[u&&[t.jsx(h.slots.baseMenuItem,{iconStart:t.jsx(h.slots.columnMenuClearIcon,{fontSize:"small"}),onClick:()=>{d(),f()},children:p.current.getLocaleText("headerFilterClear")},"filter-menu-clear-filter"),t.jsx(h.slots.baseDivider,{},"filter-menu-divider")],a.map(n=>{const a=n.value===i.operator,s=n?.headerLabel??p.current.getLocaleText(`headerFilterOperator${Ir(n.value)}`);return t.jsx(h.slots.baseMenuItem,{iconStart:a?t.jsx(h.slots.menuItemCheckIcon,{fontSize:"small"}):t.jsx("span",{}),onClick:()=>{o(S({},i,{operator:n.value})),f()},autoFocus:!!a&&e,children:s},`${r}-${n.value}`)})]})}):null}"production"!==process.env.NODE_ENV&&(r9t.propTypes={applyFilterChanges:Vt.exports.func.isRequired,clearFilterItem:Vt.exports.func.isRequired,field:Vt.exports.string.isRequired,id:Vt.exports.string,item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}).isRequired,labelledBy:Vt.exports.string,open:Vt.exports.bool.isRequired,operators:Vt.exports.arrayOf(Vt.exports.shape({getApplyFilterFn:Vt.exports.func.isRequired,getValueAsString:Vt.exports.func,headerLabel:Vt.exports.string,InputComponent:Vt.exports.elementType,InputComponentProps:Vt.exports.shape({apiRef:Vt.exports.shape({current:Vt.exports.object.isRequired}),applyValue:Vt.exports.func,className:Vt.exports.string,clearButton:Vt.exports.node,disabled:Vt.exports.bool,focusElementRef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.shape({current:Vt.exports.any.isRequired})]),headerFilterMenu:Vt.exports.node,inputRef:Vt.exports.oneOfType([Vt.exports.func,Vt.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:Vt.exports.bool,item:Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any}),onBlur:Vt.exports.func,onFocus:Vt.exports.func,slotProps:Vt.exports.object,tabIndex:Vt.exports.number}),label:Vt.exports.string,requiresFilterValue:Vt.exports.bool,value:Vt.exports.string.isRequired})).isRequired,showClearItem:Vt.exports.bool.isRequired,target:Ec});const n9t=e=>`auto-generated-row-${e.map(e=>`${e.field}/${e.key}`).join("-")}`,o9t=({id:e,tree:t})=>{const r=[];let n=t[e];for(;n.id!==AZt;)r.push({field:"leaf"===n.type?null:n.groupingField,key:n.groupingKey}),n=t[n.parent];return r.reverse(),r},a9t=(e,t,r)=>{let n;return n=e.id===AZt||(r?r(e):-1===t||t>e.depth),n},i9t=(e,t,r)=>{const n=a9t(e,t,r);return e.childrenExpanded=n,e},s9t=(e,t,r,n)=>{t[e.id]=e,r[e.depth]=(r[e.depth]??0)+1;const o=t[e.parent];if("group"===e.type||"leaf"===e.type){const r=e.groupingField??"__no_field__",a=e.groupingKey??"__no_key__",i=o.childrenFromPath?.[r];null!==n&&n[o.id]===t[o.id]?o.children=[...o.children,e.id]:o.children.push(e.id),null==i?o.childrenFromPath[r]={[a.toString()]:e.id}:i[a.toString()]=e.id}else"footer"===e.type&&(o.footerId=e.id)},l9t=({node:e,tree:t,treeDepths:r})=>{delete t[e.id];const n=e.depth,o=r[n];1===o?delete r[n]:r[n]=o-1;const a=t[e.parent];if("footer"===e.type)t[a.id]=S({},a,{footerId:null});else{const r=e.groupingField??"__no_field__",n=e.groupingKey??"__no_key__",o=a.children.filter(t=>t!==e.id),i=a.childrenFromPath;delete i[r][n.toString()],t[a.id]=S({},a,{children:o,childrenFromPath:i})}},c9t=({node:e,updatedNode:t,previousTree:r,tree:n,treeDepths:o})=>{e.children.forEach(e=>{n[e]=S({},n[e],{parent:t.id})}),l9t({node:e,tree:n,treeDepths:o});const a=S({},e,t);s9t(a,n,o,r)},u9t=()=>({value:{},addAction(e,t){this.value[e]||(this.value[e]={}),this.value[e][t]=!0}}),d9t=({tree:e,filteredRowsLookup:t})=>{if(!t)return{};const r={},n=(o,a)=>{const i=!1!==t[o.id];"group"===o.type&&o.children.forEach(t=>{const r=e[t];n(r,a&&!!o.childrenExpanded)});const s=i&&a;if(s||(r[o.id]=s),"group"===o.type&&null!=o.footerId){const e=i&&a&&!!o.childrenExpanded;e||(r[o.footerId]=e)}},o=Object.values(e);for(let e=0;e<o.length;e+=1){const t=o[e];0===t.depth&&n(t,!0)}return r},p9t=({id:e,path:t,updatedGroupsManager:r,previousTree:n,tree:o,treeDepths:a,onDuplicatePath:i,isGroupExpandedByDefault:s,defaultGroupingExpansionDepth:l,serverChildrenCount:c,groupsToFetch:u})=>{let d=AZt;for(let p=0;p<t.length;p+=1){const{key:h,field:f}=t[p],m=f??"__no_field__",v=h??"__no_key__",y=o[d].childrenFromPath?.[m]?.[v.toString()];if(p===t.length-1)if(null==y){let i;if(void 0!==c&&0!==c){i={type:"group",id:e,parent:d,path:t.map(e=>e.key),depth:p,isAutoGenerated:!1,groupingKey:h,groupingField:f,children:[],childrenFromPath:{},childrenExpanded:!1,serverChildrenCount:c};a9t(i,l,s)&&u?.add(e)}else i={type:"leaf",id:e,depth:p,parent:d,groupingKey:h};r?.addAction(d,"insertChildren"),s9t(i,o,a,n)}else{const s=o[y];"group"===s.type&&s.isAutoGenerated?(r?.addAction(d,"removeChildren"),r?.addAction(d,"insertChildren"),c9t({tree:o,previousTree:n,treeDepths:a,node:s,updatedNode:{id:e,isAutoGenerated:!1}})):i?.(y,e,t)}else if(null==y){const e=n9t(t.slice(0,p+1)),i={type:"group",id:e,parent:d,depth:p,isAutoGenerated:!0,groupingKey:h,groupingField:f,children:[],childrenFromPath:{},childrenExpanded:!1};r?.addAction(d,"insertChildren"),s9t(i9t(i,l,s),o,a,n),d=e}else{const e=o[y];if("group"!==e.type){const t={type:"group",id:e.id,parent:e.parent,depth:e.depth,isAutoGenerated:!1,groupingKey:h,groupingField:f,children:[],childrenFromPath:{},childrenExpanded:!1};o[y]=i9t(t,l,s)}d=e.id}}},h9t=e=>{const t=[],r={[AZt]:IZt()},n={},o=new Set;for(let a=0;a<e.nodes.length;a+=1){const i=e.nodes[a];t.push(i.id),p9t({tree:r,previousTree:e.previousTree,id:i.id,path:i.path,serverChildrenCount:i.serverChildrenCount,onDuplicatePath:e.onDuplicatePath,treeDepths:n,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth,groupsToFetch:o})}return{tree:r,treeDepths:n,groupingName:e.groupingName,dataRowIds:t,groupsToFetch:Array.from(o)}};class f9t{constructor(e,t){this.next=void 0,this.data=void 0,this.next=t,this.data=e}insertAfter(e){if(!e.first||!e.last)return;const t=this.next;this.next=e.first,e.last.next=t}}class m9t{constructor(e,t){this.first=void 0,this.last=void 0,this.first=e,this.last=t}data(){const e=[];return this.forEach(t=>{e.push(t.data)}),e}forEach(e){let t=this.first;for(;null!==t;)e(t),t=t.next}static from(e){if(0===e.length)return new m9t(null,null);let t=0;const r=new f9t(e[t],null);let n=r;for(;t+1<e.length;){t+=1;const r=new f9t(e[t],null);n.next=r,n=r}return new m9t(r,n)}}const v9t=({node:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{l9t({node:e,tree:t,treeDepths:r}),"group"===e.type&&null!=e.footerId&&l9t({node:t[e.footerId],tree:t,treeDepths:r});const o=t[e.parent];n?.addAction(o.id,"removeChildren");o.id!==AZt&&0===o.children.length&&(o.isAutoGenerated?v9t({node:o,tree:t,treeDepths:r}):t[o.id]={type:"leaf",id:o.id,depth:o.depth,parent:o.parent,groupingKey:o.groupingKey})},y9t=({id:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{const o=t[e];"group"===o.type&&o.children.length>0?(({node:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{n?.addAction(e.parent,"removeChildren"),n?.addAction(e.parent,"insertChildren"),c9t({previousTree:null,tree:t,treeDepths:r,node:e,updatedNode:{id:n9t(o9t({id:e.id,tree:t})),isAutoGenerated:!0}})})({node:o,tree:t,treeDepths:r,updatedGroupsManager:n}):v9t({node:o,tree:t,treeDepths:r,updatedGroupsManager:n})},g9t=e=>{const t=S({},e.previousTree),r=S({},e.previousTreeDepth),n=u9t(),o=e.previousGroupsToFetch?new Set([...e.previousGroupsToFetch]):new Set([]);for(let a=0;a<e.nodes.inserted.length;a+=1){const{id:i,path:s,serverChildrenCount:l}=e.nodes.inserted[a];p9t({previousTree:e.previousTree,tree:t,treeDepths:r,updatedGroupsManager:n,id:i,path:s,serverChildrenCount:l,onDuplicatePath:e.onDuplicatePath,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth,groupsToFetch:o})}for(let o=0;o<e.nodes.removed.length;o+=1){const a=e.nodes.removed[o];y9t({tree:t,treeDepths:r,updatedGroupsManager:n,id:a})}for(let a=0;a<e.nodes.modified.length;a+=1){const{id:i,path:s,serverChildrenCount:l}=e.nodes.modified[a];n5t(o9t({tree:t,id:i}),s)?n?.addAction(t[i].parent,"modifyChildren"):(y9t({tree:t,treeDepths:r,updatedGroupsManager:n,id:i}),p9t({previousTree:e.previousTree,tree:t,treeDepths:r,updatedGroupsManager:n,id:i,path:s,serverChildrenCount:l,onDuplicatePath:e.onDuplicatePath,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth,groupsToFetch:o}))}const a=qZt(t,AZt,!0);return{tree:t,treeDepths:r,groupingName:e.groupingName,dataRowIds:a,updatedGroupsManager:n,groupsToFetch:Array.from(o)}},x9t=["hideDescendantCount"],b9t=(e,r)=>{const n=s.useCallback(()=>{e.current.setStrategyAvailability(k6t.RowTree,j7t.Default,r.treeData&&!r.dataSource?()=>!0:()=>!1)},[e,r.treeData,r.dataSource]),o=s.useCallback(()=>{const n=r.groupingColDef;let o;if("function"==typeof n){o=n({groupingName:j7t.Default,fields:[]})}else o=n;const a=o??{},{hideDescendantCount:i}=a,s=Hi(a,x9t),l=S({},P7t,{renderCell:e=>t.jsx(R7t,S({},e,{hideDescendantCount:i})),headerName:e.current.getLocaleText("treeDataGroupingHeaderName")});return S({},l,s,E7t)},[e,r.groupingColDef]),a=s.useCallback(e=>{if(r.dataSource)return e;const t=E7t.field,n=r.treeData,a=e.lookup[t];if(n){const r=o();a&&(r.width=a.width,r.flex=a.flex),e.lookup[t]=r,null==a&&(e.orderedFields=[t,...e.orderedFields])}else!n&&a&&(delete e.lookup[t],e.orderedFields=e.orderedFields.filter(e=>e!==t));return e},[r.treeData,r.dataSource,o]),i=s.useCallback(e=>{if(!r.getTreeDataPath)throw new Error("MUI X: No getTreeDataPath given.");const t=t=>({id:t,path:r.getTreeDataPath(e.dataRowIdToModelLookup[t]).map(e=>({key:e,field:null}))}),n=(e,t,r)=>{throw new Error(["MUI X: The path returned by `getTreeDataPath` should be unique.",`The rows with id #${e} and #${t} have the same.`,`Path: ${JSON.stringify(r.map(e=>e.key))}.`].join("\n"))};return"full"===e.updates.type?h9t({previousTree:e.previousTree,nodes:e.updates.rows.map(t),defaultGroupingExpansionDepth:r.defaultGroupingExpansionDepth,isGroupExpandedByDefault:r.isGroupExpandedByDefault,groupingName:j7t.Default,onDuplicatePath:n}):g9t({nodes:{inserted:e.updates.actions.insert.map(t),modified:e.updates.actions.modify.map(t),removed:e.updates.actions.remove},previousTree:e.previousTree,previousTreeDepth:e.previousTreeDepths,defaultGroupingExpansionDepth:r.defaultGroupingExpansionDepth,isGroupExpandedByDefault:r.isGroupExpandedByDefault,groupingName:j7t.Default})},[r.getTreeDataPath,r.defaultGroupingExpansionDepth,r.isGroupExpandedByDefault]),l=s.useCallback(t=>(e=>{const{apiRef:t,rowTree:r,disableChildrenFiltering:n,isRowMatchingFilters:o}=e,a={},i={},s={},l={},c={passingFilterItems:null,passingQuickFilterValues:null},u=(d,p,h)=>{let f;if(n&&d.depth>0)f=null;else if(o&&"footer"!==d.type){const r=t.current.getRow(d.id);o(r,void 0,c),f=fZt([c.passingFilterItems],[c.passingQuickFilterValues],e.filterModel,e.apiRef,l)}else f=!0;let m,v=0,y=0;switch("group"===d.type&&d.children.forEach(e=>{const t=r[e],n=u(t,f??p,h&&!!d.childrenExpanded);y+=n,n>0&&(v+=1)}),f){case!0:m=!0;break;case!1:m=y>0;break;default:m=p}return m||(a[d.id]=!1),m?(i[d.id]=v,s[d.id]=y,"footer"===d.type?y:y+1):0},d=Object.values(r);for(let e=0;e<d.length;e+=1){const t=d[e];0===t.depth&&u(t,!0,!0)}return{filteredRowsLookup:a,filteredChildrenCountLookup:i,filteredDescendantCountLookup:s}})({rowTree:UYt(e),isRowMatchingFilters:t.isRowMatchingFilters,disableChildrenFiltering:r.disableChildrenFiltering,filterModel:t.filterModel,apiRef:e}),[e,r.disableChildrenFiltering]),c=s.useCallback(t=>(e=>{const{rowTree:t,disableChildrenSorting:r,sortRowList:n,shouldRenderGroupBelowLeaves:o}=e,a=new Map,i=e=>{let s;if(!n||r&&-1!==e.depth)if(o){const r=[],n=[];for(let o=0;o<e.children.length;o+=1){const a=e.children[o],s=t[a];"group"===s.type?(i(s),n.push(a)):"leaf"===s.type&&r.push(a)}s=[...r,...n]}else{for(let r=0;r<e.children.length;r+=1){const n=t[e.children[r]];"group"===n.type&&i(n)}s=[...e.children]}else{for(let r=0;r<e.children.length;r+=1){const n=t[e.children[r]];"group"===n.type&&i(n)}s=n(e.children.map(e=>t[e]))}null!=e.footerId&&s.push(e.footerId),a.set(e.id,s)};i(t[AZt]);const s=m9t.from(a.get(AZt));return s.forEach(e=>{const t=a.get(e.data);t?.length&&e.insertAfter(m9t.from(t))}),s.data()})({rowTree:UYt(e),sortRowList:t.sortRowList,disableChildrenSorting:r.disableChildrenSorting,shouldRenderGroupBelowLeaves:!1}),[e,r.disableChildrenSorting]);x6t(e,"hydrateColumns",a),w6t(e,j7t.Default,"rowTreeCreation",i),w6t(e,j7t.Default,"filtering",l),w6t(e,j7t.Default,"sorting",c),w6t(e,j7t.Default,"visibleRowsLookupCreation",d9t),DJt(()=>{n()});const u=s.useRef(!0);s.useEffect(()=>{u.current?u.current=!1:n()},[n])};const k9t=wJt,w9t=AGt(e=>e.dataSource);RGt(w9t,e=>e.loading);const _9t=RGt(w9t,(e,t)=>e.loading[t]??!1),C9t=RGt(w9t,e=>e.errors),M9t=RGt(w9t,(e,t)=>e.errors[t]),S9t=e=>{const{classes:t}=e;return ua({root:["treeDataGroupingCell"],toggle:["treeDataGroupingCellToggle"],loadingContainer:["treeDataGroupingCellLoadingContainer"]},rYt,t)};function D9t(e){const r=k9t(),n=T7t(),o=S9t(n),{rowNode:a,id:i,field:s,descendantCount:l}=e,c=SYt(r,_9t,i),u=SYt(r,M9t,i),d=a.childrenExpanded?n.slots.treeDataCollapseIcon:n.slots.treeDataExpandIcon;return c?t.jsx("div",{className:o.loadingContainer,children:t.jsx(n.slots.baseCircularProgress,{size:"1rem",color:"inherit"})}):-1===l||l>0?t.jsx(n.slots.baseIconButton,S({size:"small",onClick:e=>{a.childrenExpanded?r.current.setRowChildrenExpansion(i,!a.childrenExpanded):r.current.dataSource.fetchRows(i),r.current.setCellFocus(i,s),e.stopPropagation()},tabIndex:-1,"aria-label":a.childrenExpanded?r.current.getLocaleText("treeDataCollapse"):r.current.getLocaleText("treeDataExpand")},n?.slotProps?.baseIconButton,{children:t.jsx(n.slots.baseTooltip,{title:u?.message??null,children:t.jsx(n.slots.baseBadge,{variant:"dot",color:"error",invisible:!u,children:t.jsx(d,{fontSize:"inherit"})})})})):null}function O9t(e){const{id:r,field:n,formattedValue:o,rowNode:a,hideDescendantCount:i,offsetMultiplier:s=2}=e,l=T7t(),c=SYt(k9t(),WYt,r),u=S9t(l);let d=0;return c&&(d=l.dataSource?.getChildrenCount?.(c)??0),t.jsxs("div",{className:u.root,style:{marginLeft:RYt.spacing(a.depth*s)},children:[t.jsx("div",{className:u.toggle,children:t.jsx(D9t,{id:r,field:n,rowNode:a,row:c,descendantCount:d})}),t.jsxs("span",{children:[void 0===o?a.groupingKey:o,!i&&d>0?` (${d})`:""]})]})}const P9t=["hideDescendantCount"],E9t=(e,r)=>{const n=s.useCallback(()=>{e.current.setStrategyAvailability(k6t.RowTree,j7t.DataSource,r.treeData&&r.dataSource?()=>!0:()=>!1)},[e,r.treeData,r.dataSource]),o=s.useCallback(()=>{const n=r.groupingColDef;let o;if("function"==typeof n){o=n({groupingName:j7t.DataSource,fields:[]})}else o=n;const a=o??{},{hideDescendantCount:i}=a,s=Hi(a,P9t),l=S({},P7t,{renderCell:e=>t.jsx(O9t,S({},e,{hideDescendantCount:i})),headerName:e.current.getLocaleText("treeDataGroupingHeaderName")});return S({},l,s,E7t)},[e,r.groupingColDef]),a=s.useCallback(e=>{if(!r.dataSource)return e;const t=E7t.field,n=r.treeData,a=e.lookup[t];if(n){const r=o();a&&(r.width=a.width,r.flex=a.flex),e.lookup[t]=r,null==a&&(e.orderedFields=[t,...e.orderedFields])}else!n&&a&&(delete e.lookup[t],e.orderedFields=e.orderedFields.filter(e=>e!==t));return e},[r.treeData,r.dataSource,o]),i=s.useCallback(e=>{const t=r.dataSource?.getGroupKey;if(!t)throw new Error("MUI X: No `getGroupKey` method provided with the dataSource.");const n=r.dataSource?.getChildrenCount;if(!n)throw new Error("MUI X: No `getChildrenCount` method provided with the dataSource.");const o=r=>{const o=e.updates.groupKeys??function(e,t){return"full"!==t.updates.type||!t.previousTree?.[e]||t.previousTree[e].depth<1||!("path"in t.previousTree[e])?[]:t.previousTree[e].path||[]}(r,e),a=n(e.dataRowIdToModelLookup[r]);return{id:r,path:[...o,t(e.dataRowIdToModelLookup[r])].map(e=>({key:e,field:null})),serverChildrenCount:a}},a=(e,t,r)=>{throw new Error(["MUI X: The values returned by `getGroupKey` for all the sibling rows should be unique.",`The rows with id #${e} and #${t} have the same.`,`Path: ${JSON.stringify(r.map(e=>e.key))}.`].join("\n"))};return"full"===e.updates.type?h9t({previousTree:e.previousTree,nodes:e.updates.rows.map(o),defaultGroupingExpansionDepth:r.defaultGroupingExpansionDepth,isGroupExpandedByDefault:r.isGroupExpandedByDefault,groupingName:j7t.DataSource,onDuplicatePath:a}):g9t({nodes:{inserted:e.updates.actions.insert.map(o),modified:e.updates.actions.modify.map(o),removed:e.updates.actions.remove},previousTree:e.previousTree,previousGroupsToFetch:e.previousGroupsToFetch,previousTreeDepth:e.previousTreeDepths,defaultGroupingExpansionDepth:r.defaultGroupingExpansionDepth,isGroupExpandedByDefault:r.isGroupExpandedByDefault,groupingName:j7t.DataSource})},[r.dataSource,r.defaultGroupingExpansionDepth,r.isGroupExpandedByDefault]),l=s.useCallback(()=>function(e){const t={},r=Object.values(e);for(let e=0;e<r.length;e+=1){const n=r[e];t[n.id]=n.serverChildrenCount??0}return{filteredRowsLookup:NKt.filteredRowsLookup,filteredChildrenCountLookup:t,filteredDescendantCountLookup:NKt.filteredDescendantCountLookup}}(UYt(e)),[e]),c=s.useCallback(()=>function(e){return qZt(e,AZt,!1)}(UYt(e)),[e]);x6t(e,"hydrateColumns",a),w6t(e,j7t.DataSource,"rowTreeCreation",i),w6t(e,j7t.DataSource,"filtering",l),w6t(e,j7t.DataSource,"sorting",c),w6t(e,j7t.DataSource,"visibleRowsLookupCreation",d9t),DJt(()=>{n()});const u=s.useRef(!0);s.useEffect(()=>{u.current?u.current=!1:n()},[n])},j9t=(e,t,r)=>{let n;return r.current.caches.columnPinning={orderedFieldsBeforePinningColumns:null},n=t.pinnedColumns?t.pinnedColumns:t.initialState?.pinnedColumns?t.initialState.pinnedColumns:{},S({},e,{pinnedColumns:n})};function T9t(e,t){e.current.setState(e=>S({},e,{pinnedColumns:t}))}const N9t=S({},gZt,{type:"custom",field:eXt,editable:!1,sortable:!1,filterable:!1,resizable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,align:"left",width:40,valueGetter:(e,t,r,n)=>{const o=_Qt(n,t);return F7t(n).has(o)},renderCell:e=>t.jsx(V7t,S({},e)),renderHeader:({colDef:e})=>t.jsx("div",{"aria-label":e.headerName})}),R9t=new Set,z9t=(e,t)=>S({},e,{detailPanel:{heightCache:{},expandedRowIds:t.detailPanelExpandedRowIds??t.initialState?.detailPanel?.expandedRowIds??R9t}});function A9t(e,t,r,n){if("function"!=typeof t)return{};const o=QYt(e),a={},i={};for(let s=0;s<o.length;s+=1){const l=o[s],c=e.current.getRowParams(l),u=t(c);if(a[l]=u,null==u)continue;const d=r(c),p="auto"===d;i[l]={autoHeight:p,height:p?n[l]?.height:d}}return{contentCache:a,heightCache:i}}const F9t=S({},gZt,{type:"custom",field:"__reorder__",sortable:!1,filterable:!1,width:50,align:"center",headerAlign:"center",disableColumnMenu:!0,disableExport:!0,disableReorder:!0,resizable:!1,aggregable:!1,renderHeader:()=>" ",renderCell:q7t});var I9t=function(e){return e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e}(I9t||{});const L9t={previousTargetId:null,dragDirection:null,previousDropPosition:null},B9t=(e,t)=>{const r=MJt(e,"useGridRowReorder"),n=SYt(e,yXt),o=SYt(e,XYt),a=s.useRef(null),i=s.useRef(null),l=s.useRef(void 0),c=s.useRef(null),u=(e=>{const{classes:t}=e;return ua({rowDragging:["row--dragging"],rowDropAbove:["row--dropAbove"],rowDropBelow:["row--dropBelow"],rowBeingDragged:["row--beingDragged"]},rYt,t)})({classes:t.classes}),[d,p]=s.useState(""),h=SYt(e,xXt),f=s.useRef(L9t),[m,v]=s.useState({targetRowId:null,targetRowIndex:null,dropPosition:null});s.useEffect(()=>()=>{clearTimeout(l.current)},[]);const y=s.useMemo(()=>!t.rowReordering||!!n.length||1!==o,[t.rowReordering,n,o]),g=s.useCallback((t,r)=>{if(c.current&&(c.current.classList.remove(u.rowDropAbove,u.rowDropBelow),c.current=null),t&&r){const n=e.current.rootElementRef?.current?.querySelector(`[data-id="${t}"]`);n&&(n.classList.add("above"===r?u.rowDropAbove:u.rowDropBelow),c.current=n)}},[e,u]),x=s.useCallback((t,r)=>{if(t){const n=e.current.rootElementRef?.current?.querySelector(`[data-id="${t}"]`);n&&(r?n.classList.add(u.rowBeingDragged):n.classList.remove(u.rowBeingDragged))}},[e,u.rowBeingDragged]),b=s.useCallback(t=>{const r=e.current.rootElementRef?.current;if(!r)return;const n=r.querySelectorAll("[data-id]");if(!n.length)return;const o=Array.from(n),a=new Map;o.forEach(e=>{const t=e.getAttribute("data-id");t&&a.set(t,e.getBoundingClientRect())}),t(),requestAnimationFrame(()=>{const e=r.querySelectorAll("[data-id]"),t=[];e.forEach(e=>{const r=e.getAttribute("data-id");if(!r)return;const n=a.get(r);if(!n)return;const o=e.getBoundingClientRect(),i=n.top-o.top;if(Math.abs(i)>1){const r=e.animate([{transform:`translateY(${i}px)`},{transform:"translateY(0)"}],{duration:200,easing:"ease-in-out",fill:"forwards"});t.push(r)}}),t.length>0&&Promise.allSettled(t.map(e=>e.finished)).then(()=>{})})},[e]),k=s.useCallback((t,n)=>{const o=E1t(e);y||0!==Object.keys(o).length||(r.debug(`Start dragging row ${t.id}`),n.stopPropagation(),a.current=n.currentTarget,a.current.classList.add(u.rowDragging),p(t.id),x(t.id,!0),l.current=setTimeout(()=>{a.current.classList.remove(u.rowDragging)}),i.current=h[t.id],e.current.setCellFocus(t.id,F9t.field))},[e,y,r,u.rowDragging,h,x]),w=s.useCallback((t,n)=>{if(""===d)return;const o=GYt(e,t.id);if(!o||"footer"===o.type||"pinnedRow"===o.type||!n.target)return;const a=n.target.getBoundingClientRect(),i=Math.floor(n.clientY-a.top),s=Math.floor(a.height/2);if(r.debug(`Dragging over row ${t.id}`),n.preventDefault(),n.stopPropagation(),t.id!==d){const e=h[t.id],r=h[d],n=i<s?"above":"below",o="above"===n&&e===r+1||"below"===n&&e===r-1,a={dragDirection:e<r?I9t.UP:I9t.DOWN,previousTargetId:t.id,previousDropPosition:n};f.current.previousTargetId===t.id&&f.current.previousDropPosition===n||(o?(v({targetRowId:null,targetRowIndex:null,dropPosition:null}),g(null,null)):(v({targetRowId:t.id,targetRowIndex:e,dropPosition:n}),g(t.id,n)),f.current=a)}else null!==f.current.previousTargetId&&(v({targetRowId:null,targetRowIndex:null,dropPosition:null}),g(null,null),f.current={previousTargetId:null,dragDirection:null,previousDropPosition:null})},[d,e,r,h,g]),_=s.useCallback((t,n)=>{const o=E1t(e);if(""===d||y||0!==Object.keys(o).length)return;r.debug("End dragging row"),n.preventDefault(),n.stopPropagation(),clearTimeout(l.current),a.current=null;const s=f.current.dragDirection;if(f.current=L9t,g(null,null),x(d,!1),n.dataTransfer&&"none"!==n.dataTransfer.dropEffect){if(null!==m.targetRowIndex&&null!==m.targetRowId){const t=i.current,r=m.targetRowIndex,n=m.dropPosition;let o;o=s===I9t.UP?"above"===n?r:r+1:"above"===n?r-1:r;"above"===n&&r===t+1||"below"===n&&r===t-1||m.targetRowId===d||b(()=>{e.current.setRowIndex(d,o);const r={row:e.current.getRow(d),targetIndex:o,oldIndex:t};e.current.publishEvent("rowOrderChange",r)})}v({targetRowId:null,targetRowIndex:null,dropPosition:null})}else v({targetRowId:null,targetRowIndex:null,dropPosition:null}),i.current=null;p("")},[e,d,y,r,m,g,x,b]);pYt(e,"rowDragStart",k),pYt(e,"rowDragOver",w),pYt(e,"rowDragEnd",_),pYt(e,"cellDragOver",w),fYt(e,"rowOrderChange",t.onRowOrderChange)},V9t=(e,t)=>{const r=(e=>{const{classes:t}=e;return s.useMemo(()=>ua({rowReorderCellContainer:["rowReorderCellContainer"],columnHeaderReorder:["columnHeaderReorder"]},rYt,t),[t])})({classes:t.classes}),n=s.useCallback(n=>{const o=S({},F9t,{cellClassName:r.rowReorderCellContainer,headerClassName:r.columnHeaderReorder,headerName:e.current.getLocaleText("rowReorderingHeaderName")}),a=t.rowReordering,i=null!=n.lookup[o.field];return a&&!i?(n.lookup[o.field]=o,n.orderedFields=[o.field,...n.orderedFields]):!a&&i?(delete n.lookup[o.field],n.orderedFields=n.orderedFields.filter(e=>e!==o.field)):a&&i&&(n.lookup[o.field]=S({},o,n.lookup[o.field]),t.columns.some(e=>e.field===F9t.field)||(n.orderedFields=[o.field,...n.orderedFields.filter(e=>e!==o.field)])),n},[e,r,t.columns,t.rowReordering]);x6t(e,"hydrateColumns",n)},H9t=({apiRef:e,visibleRows:t,range:r})=>{let{firstRowIndex:n,lastRowIndex:o}=r;const a=t.slice(r.firstRowIndex,r.lastRowIndex);let i=0,s=a.length-1,l=!1;for(;!l&&n<o;){const t="skeletonRow"===GYt(e,a[i].id)?.type,r="skeletonRow"===GYt(e,a[s].id)?.type;t&&r&&(l=!0),t||(i+=1,n+=1),r||(s-=1,o-=1)}return l?{firstRowIndex:n,lastRowIndex:o}:void 0},$9t="auto-generated-skeleton-row-root",q9t=e=>`${$9t}-${e}`;function W9t(e,t){const r={topIds:[],bottomIds:[],idLookup:{}};return e?.top?.forEach(e=>{const n=LZt(e,t);r.topIds.push(n),r.idLookup[n]=e}),e?.bottom?.forEach(e=>{const n=LZt(e,t);r.bottomIds.push(n),r.idLookup[n]=e}),r}const U9t=(e,t,r)=>(r.current.caches.pinnedRows=W9t(t.pinnedRows,t.getRowId),S({},e,{rows:S({},e.rows,{additionalRowGroups:S({},e.rows?.additionalRowGroups,{pinnedRows:{top:[],bottom:[]}})})}));function G9t({groupingParams:e,rowModel:t,rowId:r,position:n,apiRef:o,isAutoGenerated:a}){const i=S({},e.dataRowIdToModelLookup),s=S({},e.tree),l=S({},e.treeDepths);s9t({type:"pinnedRow",id:r,depth:0,parent:AZt,isAutoGenerated:a},s,l,null),a||(i[r]=t),o.current.caches.rows.dataRowIdToModelLookup[r]=S({},t);const c=e.additionalRowGroups?.pinnedRows||{},u={id:r,model:t};return e.additionalRowGroups?.pinnedRows?.[n]?.includes(u)?S({},e,{dataRowIdToModelLookup:i,tree:s,treeDepths:l}):S({},e,{dataRowIdToModelLookup:i,tree:s,treeDepths:l,additionalRowGroups:S({},e.additionalRowGroups,{pinnedRows:S({},c,{[n]:[...c[n]||[],u]})})})}let Y9t=function(e){return e[e.QUEUED=0]="QUEUED",e[e.PENDING=1]="PENDING",e[e.SETTLED=2]="SETTLED",e[e.UNKNOWN=3]="UNKNOWN",e}({});class K9t{constructor(e,t=Infinity){this.pendingRequests=new Set,this.queuedRequests=new Set,this.settledRequests=new Set,this.api=void 0,this.maxConcurrentRequests=void 0,this.processQueue=async()=>{if(0===this.queuedRequests.size||this.pendingRequests.size>=this.maxConcurrentRequests)return;const e=Math.min(this.maxConcurrentRequests-this.pendingRequests.size,this.queuedRequests.size);if(0===e)return;const t=Array.from(this.queuedRequests);for(let r=0;r<e;r+=1){const e=t[r];this.queuedRequests.delete(e),this.pendingRequests.add(e),this.api.fetchRowChildren(e)}},this.queue=async e=>{const t={};e.forEach(e=>{this.queuedRequests.add(e),t[e]=!0}),this.api.setState(e=>S({},e,{dataSource:S({},e.dataSource,{loading:S({},e.dataSource.loading,t)})})),this.processQueue()},this.setRequestSettled=e=>{this.pendingRequests.delete(e),this.settledRequests.add(e),this.processQueue()},this.clear=()=>{this.queuedRequests.clear(),Array.from(this.pendingRequests).forEach(e=>this.clearPendingRequest(e))},this.clearPendingRequest=e=>{this.api.dataSource.setChildrenLoading(e,!1),this.pendingRequests.delete(e),this.processQueue()},this.getRequestStatus=e=>this.pendingRequests.has(e)?Y9t.PENDING:this.queuedRequests.has(e)?Y9t.QUEUED:this.settledRequests.has(e)?Y9t.SETTLED:Y9t.UNKNOWN,this.getActiveRequestsCount=()=>this.pendingRequests.size+this.queuedRequests.size,this.api=e.current,this.maxConcurrentRequests=t}}const Z9t={loading:{},errors:{}},X9t=(e,t,r={})=>{const n=SYt(e,YYt),o=_s(()=>new K9t(e)).current,a=s.useRef(0),i=s.useCallback(()=>{o.clear(),a.current=0;return e.current.state.dataSource!==Z9t&&e.current.resetDataSourceState(),null},[e,o]),l=s.useCallback((t,r)=>{const n=((e,t)=>{let r=e[t].parent;const n=[];for(;r&&r!==AZt;){const t=e[r];n.push(t.groupingKey??""),r=t.parent}return n.reverse()})(UYt(e),t.rowId);e.current.updateNestedRows([r],n),r&&!n5t(r,t.previousRow)&&e.current.dataSource.cache.clear()},[e]),{api:c,debouncedFetchRows:u,strategyProcessor:d,events:p,cacheChunkManager:h,cache:f}=((e,t,r={})=>{const n=s.useCallback(()=>{e.current.setStrategyAvailability(k6t.DataSource,n7t.Default,t.dataSource?()=>!0:()=>!1)},[e,t.dataSource]),[o,a]=s.useState(!1),i=SYt(e,dQt),l=s.useRef(0),c=t.onDataSourceError,u=_s(()=>{if(!t.pagination)return new o7t(i.pageSize);const e=t.pageSizeOptions.map(e=>"number"==typeof e?e:e.value).sort((e,t)=>e-t),r=Math.min(i.pageSize,e[0]);return new o7t(r)}).current,[d,p]=s.useState(()=>i7t(t.dataSourceCache,r.cacheOptions)),h=s.useCallback(async(n,a)=>{const i=t.dataSource?.getRows;if(!i)return;if(n&&n!==AZt&&"DataGrid"!==t.signature)return void r.fetchRowChildren?.([n]);r.clearDataSourceState?.();const s=S({},r7t(e),e.current.unstable_applyPipeProcessors("getRowsParams",{}),a),p=u.getCacheKeys(s).map(e=>d.get(e));if(p.every(e=>void 0!==e))return void e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:o7t.mergeResponses(p),fetchParams:s});(o||0===e.current.getRowsCount())&&e.current.setLoading(!0);const h=l.current+1;l.current=h;try{const t=await i(s);u.splitResponse(s,t).forEach((e,t)=>d.set(t,e)),l.current===h&&e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:t,fetchParams:s})}catch(t){l.current===h&&(e.current.applyStrategyProcessor("dataSourceRowsUpdate",{error:t,fetchParams:s}),"function"==typeof c?c(new I1t({message:t?.message,params:s,cause:t})):"production"!==process.env.NODE_ENV&&lat(["MUI X: A call to `dataSource.getRows()` threw an error which was not handled because `onDataSourceError()` is missing.","To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling."],"error"))}finally{o&&l.current===h&&e.current.setLoading(!1)}},[u,d,e,o,t.dataSource?.getRows,c,r,t.signature]),f=s.useCallback(()=>{a(e.current.getActiveStrategy(k6t.DataSource)===n7t.Default)},[e]),m=s.useCallback(t=>{if("error"in t)return void e.current.setRows([]);const{response:r}=t;void 0!==r.rowCount&&e.current.setRowCount(r.rowCount),e.current.setRows(r.rows),e.current.unstable_applyPipeProcessors("processDataSourceRows",{params:t.fetchParams,response:r},!0)},[e]),v=t.dataSource?.updateRow,y=r.handleEditRow,g=s.useCallback(async t=>{if(v)try{const r=await v(t);return"function"==typeof y?(y(t,r),r):(e.current.updateNestedRows([r],[]),r&&!n5t(r,t.previousRow)&&e.current.dataSource.cache.clear(),r)}catch(e){throw"function"==typeof c?c(new L1t({message:e?.message,params:t,cause:e})):"production"!==process.env.NODE_ENV&&lat(["MUI X: A call to `dataSource.updateRow()` threw an error which was not handled because `onDataSourceError()` is missing.","To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling."],"error"),e}},[e,v,c,y]),x={dataSource:{fetchRows:h,cache:d,editRow:g}},b=s.useMemo(()=>Di(h,0),[h]),k=s.useRef(!0);return s.useEffect(()=>{if(k.current)return void(k.current=!1);if(void 0===t.dataSourceCache)return;const e=i7t(t.dataSourceCache,r.cacheOptions);p(t=>t!==e?e:t)},[t.dataSourceCache,r.cacheOptions]),s.useEffect(()=>(t.dataSource&&(e.current.dataSource.cache.clear(),e.current.dataSource.fetchRows()),()=>{l.current+=1}),[e,t.dataSource]),{api:{public:x},debouncedFetchRows:b,strategyProcessor:{strategyName:n7t.Default,group:"dataSourceRowsUpdate",processor:m},setStrategyAvailability:n,cacheChunkManager:u,cache:d,events:{strategyAvailabilityChange:f,sortModelChange:xKt(o,()=>b()),filterModelChange:xKt(o,()=>b()),paginationModelChange:xKt(o,()=>b())}}})(e,t,S({fetchRowChildren:o.queue,clearDataSourceState:i,handleEditRow:l},r)),m=s.useCallback(()=>{e.current.setStrategyAvailability(k6t.DataSource,n7t.Default,t.dataSource&&!t.lazyLoading?()=>!0:()=>!1)},[e,t.dataSource,t.lazyLoading]),v=t.onDataSourceError,y=s.useCallback(async r=>{const n=e.current.unstable_applyPipeProcessors("getRowsParams",{});if(!t.treeData&&0===(n.groupFields?.length??0))return void o.clearPendingRequest(r);const a=t.dataSource?.getRows;if(!a)return void o.clearPendingRequest(r);const i=e.current.getRowNode(r);if(!i)return void o.clearPendingRequest(r);const s=S({},r7t(e),n,{groupKeys:i.path}),l=h.getCacheKeys(s).map(e=>f.get(e)),c=l.some(e=>void 0===e)?void 0:o7t.mergeResponses(l);if(void 0!==c){const t=c.rows;return o.setRequestSettled(r),e.current.updateNestedRows(t,i.path),void 0!==c.rowCount&&e.current.setRowCount(c.rowCount),e.current.setRowChildrenExpansion(r,!0),void e.current.dataSource.setChildrenLoading(r,!1)}(C9t(e)[r]??null)&&e.current.dataSource.setChildrenFetchError(r,null);try{const t=await a(s);if(!e.current.getRowNode(r))return void o.clearPendingRequest(r);if(o.getRequestStatus(r)===Y9t.UNKNOWN)return void e.current.dataSource.setChildrenLoading(r,!1);o.setRequestSettled(r);h.splitResponse(s,t).forEach((e,t)=>{f.set(t,e)}),void 0!==t.rowCount&&e.current.setRowCount(t.rowCount);const n=[];t.rows.forEach(t=>{const r=_Qt(e,t);GYt(e,r)&&n.push({id:r,_action:"delete"})}),n.length>0&&e.current.updateNestedRows(n,i.path),e.current.updateNestedRows(t.rows,i.path),e.current.setRowChildrenExpansion(r,!0)}catch(t){const n=t;e.current.dataSource.setChildrenFetchError(r,n),"function"==typeof v?v(new I1t({message:n.message,params:s,cause:n})):"production"!==process.env.NODE_ENV&&lat(["MUI X: A call to `dataSource.getRows()` threw an error which was not handled because `onDataSourceError()` is missing.","To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling."],"error")}finally{e.current.dataSource.setChildrenLoading(r,!1),o.setRequestSettled(r)}},[o,h,f,v,e,t.treeData,t.dataSource?.getRows]),g=s.useCallback((t,r)=>{e.current.setState(e=>{if(!e.dataSource.loading[t]&&!1===r)return e;const n=S({},e.dataSource.loading);return!1===r?delete n[t]:n[t]=r,S({},e,{dataSource:S({},e.dataSource,{loading:n})})})},[e]),x=s.useCallback((t,r)=>{e.current.setState(e=>{const n=S({},e.dataSource.errors);return null===r&&void 0!==n[t]?delete n[t]:n[t]=r,S({},e,{dataSource:S({},e.dataSource,{errors:n})})})},[e]),b=s.useCallback(()=>{e.current.setState(e=>S({},e,{dataSource:Z9t}))},[e]),k={dataSource:S({},c.public.dataSource,{setChildrenLoading:g,setChildrenFetchError:x})},w={fetchRowChildren:y,resetDataSourceState:b};return s.useEffect(()=>{if(n&&n.length&&a.current<n.length){const e=n.slice(a.current);o.queue(e),a.current=n.length}},[e,o,n]),{api:{public:k,private:w},debouncedFetchRows:u,strategyProcessor:d,events:p,setStrategyAvailability:m,cacheChunkManager:h,cache:f}};const Q9t=e=>S({},e,{dataSource:Z9t}),J9t={cacheOptions:{getKey:function(e){return JSON.stringify([e.filterModel,e.sortModel,e.groupKeys,e.start,e.end])}}};var eer=function(e){return e[e.VIEWPORT=0]="VIEWPORT",e[e.SCROLL_END=1]="SCROLL_END",e}(eer||{});const ter={firstRowToRender:0,lastRowToRender:0},rer=e=>`${$9t}-${e}`,ner=so("div")({position:"sticky",left:0,width:0,height:0}),oer=(e,r)=>{const n=SYt(e,IGt).isReady,o=s.useRef(null),a=Ds(),i=s.useRef(null),l="client"===r.rowsLoadingMode&&!!r.onRowsScrollEnd,c=r.dataSource&&r.lazyLoading,u=l||c,d=Ni(([t])=>{const r=t.intersectionRatio;t.isIntersecting&&1===r&&(o.current?.disconnect(),i.current=null,e.current.publishEvent("rowsScrollEndIntersection"))});s.useEffect(()=>{const t=e.current.virtualScrollerRef.current;if(!u||!n||!t)return;o.current?.disconnect();const a=YGt(e),s=r.scrollEndThreshold-a;o.current=new IntersectionObserver(d,{threshold:1,root:t,rootMargin:`0px 0px ${s}px 0px`}),i.current&&o.current.observe(i.current)},[e,n,d,u,r.scrollEndThreshold]);const p=s.useCallback(e=>{u&&a.start(0,()=>(e=>{i.current!==e&&(o.current?.disconnect(),i.current=e,i.current&&o.current?.observe(i.current))})(e))},[u,a]),h=s.useCallback(({lastRowId:e})=>u?t.jsx(ner,{ref:p,role:"presentation"},`trigger-${e}`):null,[u,p]);CJt(e,{getInfiniteLoadingTriggerElement:h},"private")},aer=(e,r)=>{S6t(e,r),((e,t)=>{const r=s.useCallback(r=>{const n=S({},N9t,{headerName:e.current.getLocaleText("detailPanelToggle")}),o=!!t.getDetailPanelContent,a=null!=r.lookup[eXt];return o&&!a?(r.lookup[eXt]=n,r.orderedFields=[eXt,...r.orderedFields]):!o&&a?(delete r.lookup[eXt],r.orderedFields=r.orderedFields.filter(e=>e!==eXt)):o&&a&&(r.lookup[eXt]=S({},n,r.lookup[eXt]),t.columns.some(e=>e.field===eXt)||(r.orderedFields=[eXt,...r.orderedFields.filter(e=>e!==eXt)])),r},[e,t.columns,t.getDetailPanelContent]),n=s.useCallback((r,n)=>null==t.getDetailPanelContent?r:F7t(e).has(n)?[...r,nYt["row--detailPanelExpanded"]]:r,[e,t.getDetailPanelContent]);x6t(e,"hydrateColumns",r),x6t(e,"rowClassName",n)})(e,r),b9t(e,r),E9t(e,r),f8t(e,r),((e,t)=>{const r=s.useCallback(e=>{const r=e.tree[AZt];if("server"!==t.rowsLoadingMode||!t.rowCount||r.children.length>=t.rowCount)return e;const n=S({},e.tree),o=[...r.children];for(let e=0;e<t.rowCount-r.children.length;e+=1){const t=q9t(e);o.push(t);const r={type:"skeletonRow",id:t,parent:AZt,depth:0};n[t]=r}return n[AZt]=S({},r,{children:o}),S({},e,{tree:n})},[t.rowCount,t.rowsLoadingMode]);x6t(e,"hydrateRows",r)})(e,r),(e=>{const t=s.useRef(null),r=s.useCallback(r=>{const n=e.current.caches.pinnedRows||{},o=t.current;t.current=n;let a=S({},r,{additionalRowGroups:S({},r.additionalRowGroups,{pinnedRows:{}})});if(o){const t=t=>{const r=a.tree[t];"pinnedRow"===r?.type&&(delete a.tree[t],delete a.dataRowIdToModelLookup[t],delete e.current.caches.rows.dataRowIdToModelLookup[t])};o.topIds?.forEach(t),o.bottomIds?.forEach(t)}if(n.topIds?.forEach(t=>{a=G9t({groupingParams:a,rowModel:n.idLookup[t],rowId:t,position:"top",apiRef:e,isAutoGenerated:!1})}),n.bottomIds?.forEach(t=>{a=G9t({groupingParams:a,rowModel:n.idLookup[t],rowId:t,position:"bottom",apiRef:e,isAutoGenerated:!1})}),n.bottomIds?.length||n.topIds?.length){const e=e=>!a.tree[e]||"pinnedRow"!==a.tree[e].type,t=a.tree[AZt];a.tree[AZt]=S({},t,{children:t.children.filter(e)}),a.dataRowIds=a.dataRowIds.filter(e)}return a},[e]);x6t(e,"hydrateRows",r)})(e),V9t(e,r),((e,t)=>{const{disableColumnPinning:r}=t,n=s.useRef([]),o=s.useCallback(t=>{if(0===t.orderedFields.length||r)return t;const o=e.current.state;e.current.state=S({},o,{columns:t});const a=ZKt(e);e.current.state=o;const i=a.left,s=a.right;let l;const c=[...i,...s],{orderedFieldsBeforePinningColumns:u}=e.current.caches.columnPinning;if(u){l=new Array(t.orderedFields.length).fill(null);const r=[...l],o=[...t.orderedFields];n.current.forEach(e=>{if(!c.includes(e)&&t.lookup[e]){const t=u.indexOf(e);l[t]=e,r[t]=e,o.splice(o.indexOf(e),1)}}),c.forEach(e=>{let n=u.indexOf(e);if((-1===n||n>=r.length)&&(n=t.orderedFields.indexOf(e)),null!==r[n])for(n=0;null!==r[n];)n+=1;l[n]=e,r[n]=e,o.splice(o.indexOf(e),1)});let a=0;o.forEach(e=>{for(;null!==r[a];)a+=1;r[a]=e,l[a]=e}),e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=r}else l=[...t.orderedFields],e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=[...t.orderedFields];n.current=c;const d=l.filter(e=>!i.includes(e)&&!s.includes(e));return S({},t,{orderedFields:[...i,...d,...s]})},[e,r]);x6t(e,"hydrateColumns",o);const a=s.useCallback((t,r)=>e.current.isColumnPinned(r),[e]);x6t(e,"isColumnPinned",a)})(e,r),(e=>{w6t(e,_6t,"rowTreeCreation",c8t)})(e),D6t(M6t,e,r),D6t(_7t,e,r),D6t(h8t,e,r),D6t(z9t,e,r),D6t(j9t,e,r),D6t(z6t,e,r),D6t(U9t,e,r),D6t(l8t,e,r),D6t(Q6t,e,r),D6t(i8t,e,r),D6t(G6t,e,r),D6t(m8t,e,r),D6t(e8t,e,r),D6t($6t,e,r),D6t(J8t,e,r),D6t(F6t,e,r),D6t(D7t,e,r),D6t(H8t,e,r),D6t(R6t,e,r),D6t(A8t,e,r),D6t(FJt,e,r),D6t(Q9t,e,r),D6t(k8t,e,r),D6t(O8t,e,r),D6t(e7t,e,r),((e,t)=>{const r=MJt(e,"useGridHeaderFiltering"),n=s.useCallback(r=>{e.current.setState(e=>"DataGrid"===t.signature?e:S({},e,{headerFiltering:{enabled:t.headerFilters??!1,editing:r.editing??null,menuOpen:r.menuOpen??null}}))},[e,t.signature,t.headerFilters]),o=s.useCallback(t=>{r.debug(`Starting edit mode on header filter for field: ${t}`),e.current.setHeaderFilterState({editing:t})},[e,r]),a=s.useCallback(()=>{r.debug("Stopping edit mode on header filter"),e.current.setHeaderFilterState({editing:null})},[e,r]),i=s.useCallback(t=>{r.debug(`Opening header filter menu for field: ${t}`),e.current.setHeaderFilterState({menuOpen:t})},[e,r]),l=s.useCallback(()=>{r.debug("Hiding header filter menu for active field");let t=e.current.state.headerFiltering.menuOpen;if(t){const r=$Kt(e),n=WKt(e),o=HKt(e);if(r[t]||(t=o[0]),!1===n[t]){const e=o.filter(e=>e===t||!1!==n[e]),r=e.indexOf(t);t=e[r+1]||e[r-1]}e.current.setHeaderFilterState({menuOpen:null}),e.current.setColumnHeaderFilterFocus(t)}},[e,r]),c={setHeaderFilterState:n};CJt(e,{startHeaderFilterEditMode:o,stopHeaderFilterEditMode:a,showHeaderFilterMenu:i,hideHeaderFilterMenu:l},"public"),CJt(e,c,"private");const u=s.useRef(!0);s.useEffect(()=>{u.current?u.current=!1:e.current.setHeaderFilterState({enabled:t.headerFilters??!1})},[e,t.headerFilters])})(e,r),((e,t)=>{const r=s.useCallback((r,n)=>{if(e.current.getCellParams(r.id,r.field).colDef.field===QZt&&(" "===n.key||"Enter"===n.key)&&!n.shiftKey){if("group"!==r.rowNode.type)return;if(t.dataSource&&!r.rowNode.childrenExpanded)return void e.current.dataSource.fetchRows(r.id);e.current.setRowChildrenExpansion(r.id,!r.rowNode.childrenExpanded)}},[e,t.dataSource]);pYt(e,"cellKeyDown",r)})(e,r),X6t(e,r),((e,t)=>{const r=MJt(e,"useGridSelection"),n=s.useCallback(e=>(...r)=>{t.rowSelection&&e(...r)},[t.rowSelection]),o=t.signature!==oYt.DataGrid&&(t.rowSelectionPropagation?.parents||t.rowSelectionPropagation?.descendants),a=s.useMemo(()=>t.rowSelectionModel,[t.rowSelectionModel]),i=s.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:a,propOnChange:t.onRowSelectionModelChange,stateSelector:IXt,changeEvent:"rowSelectionChange"});const{checkboxSelection:l,disableRowSelectionOnClick:c,isRowSelectable:u}=t,d=qXt(t),p=SYt(e,UYt),h=SYt(e,XYt)>1,f=s.useCallback(t=>{let r=t;const n=i.current??t,o=e.current.isRowSelected(t);if(o){const t=OXt(e),o=t.findIndex(e=>e===n),a=t.findIndex(e=>e===r);if(o===a)return;r=o>a?t[a+1]:t[a-1]}i.current=t,e.current.selectRowRange({startId:n,endId:r},!o)},[e]),m=Ni(()=>t.pagination&&t.checkboxSelectionVisibleOnly&&"client"===t.paginationMode?xQt(e):OXt(e)),v=s.useCallback((n,o)=>{if(t.signature===oYt.DataGrid&&!d&&("include"!==n.type||n.ids.size>1))throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));IXt(e)!==n&&(r.debug("Setting selection model"),e.current.setState(e=>S({},e,{rowSelection:t.rowSelection?n:p8t}),o))},[e,r,t.rowSelection,t.signature,d]),y=s.useCallback(t=>LXt(e).has(t),[e]),g=s.useCallback(r=>{if(!1===t.rowSelection)return!1;if(u&&!u(e.current.getRowParams(r)))return!1;const n=GYt(e,r);return"footer"!==n?.type&&"pinnedRow"!==n?.type},[e,t.rowSelection,u]),x=s.useCallback(()=>VXt(e),[e]),b=s.useCallback((n,a=!0,s=!1)=>{if(e.current.isRowSelectable(n))if(i.current=n,s){r.debug(`Setting selection for row ${n}`);const i={type:"include",ids:new Set},s=e=>{i.ids.add(e)};a&&(s(n),o&&WXt(e,p,n,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,s)),e.current.setRowSelectionModel(i,"singleRowSelection")}else{r.debug(`Toggling selection for row ${n}`);const i=IXt(e),s={type:i.type,ids:new Set(i.ids)},l=DKt(s);l.unselect(n);const c=e=>{l.select(e)},u=e=>{l.unselect(e)};a?(c(n),o&&WXt(e,p,n,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,c)):o&&UXt(e,p,n,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,u),("include"===s.type&&s.ids.size<2||d)&&e.current.setRowSelectionModel(s,"singleRowSelection")}},[e,r,o,p,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,d]),k=s.useCallback((n,a=!0,i=!1)=>{if(r.debug("Setting selection for several rows"),!1===t.rowSelection)return;const s=new Set;for(let t=0;t<n.length;t+=1){const r=n[t];e.current.isRowSelectable(r)&&s.add(r)}const l=IXt(e);let c;if(i){if(c={type:"include",ids:s},a){const r=DKt(c);if(o){const n=e=>{r.select(e)};for(const r of s)WXt(e,p,r,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,n)}}else c.ids=new Set;if(l.type===c.type&&c.ids.size===l.ids.size&&Array.from(c.ids).every(e=>l.ids.has(e)))return}else{c={type:l.type,ids:new Set(l.ids)};const r=DKt(c),n=e=>{r.select(e)},i=e=>{r.unselect(e)};for(const l of s)a?(r.select(l),o&&WXt(e,p,l,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,n)):(i(l),o&&UXt(e,p,l,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,i))}("include"===c.type&&c.ids.size<2||d)&&e.current.setRowSelectionModel(c,"multipleRowsSelection")},[r,o,d,e,p,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,t.rowSelection]),w=s.useCallback(r=>{if(!h||!o||0===r.ids.size&&"include"===r.type)return r;const n={type:r.type,ids:new Set(r.ids)},a=DKt(n),i=e=>{a.select(e)};for(const n of r.ids)WXt(e,p,n,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,i,a);return n},[e,p,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,h,o]),_=s.useCallback(({startId:t,endId:n},o=!0,a=!1)=>{if(!e.current.getRow(t)||!e.current.getRow(n))return;r.debug(`Expanding selection from row ${t} to row ${n}`);const i=OXt(e),s=i.indexOf(t),l=i.indexOf(n),[c,u]=s>l?[l,s]:[s,l],d=i.slice(c,u+1);e.current.selectRows(d,o,a)},[e,r]),C={selectRows:k,selectRowRange:_,getPropagatedRowSelectionModel:w};CJt(e,{selectRow:b,setRowSelectionModel:v,getSelectedRows:x,isRowSelected:y,isRowSelectable:g},"public"),CJt(e,C,t.signature===oYt.DataGrid?"private":"public");const M=s.useRef(!0),D=s.useCallback((r=!1)=>{if(M.current)return;const n=IXt(e),o=qYt(e),a=UYt(e),i=CXt(e),s=e=>"server"===t.filterMode?!o[e]:!a[e]||!1===i[e],l={type:n.type,ids:new Set(n.ids)},c=DKt(l);let u=!1;for(const e of n.ids){if(s(e)){if(t.keepNonExistentRowsSelected)continue;c.unselect(e),u=!0;continue}if(!t.rowSelectionPropagation?.parents)continue;const r=p[e];if("group"===r?.type){if(r.isAutoGenerated){c.unselect(e),u=!0;continue}r.children.every(e=>!1===i[e])||(c.unselect(e),u=!0)}}const d=h&&t.rowSelectionPropagation?.parents&&(l.ids.size>0||"exclude"===l.type);if(u||d&&!r)if(d)if("exclude"===l.type){const r=m(),n=[];for(let e=0;e<r.length;e+=1){const o=r[e];!t.keepNonExistentRowsSelected&&s(o)||!c.has(o)||n.push(o)}e.current.selectRows(n,!0,!0)}else e.current.selectRows(Array.from(l.ids),!0,!0);else e.current.setRowSelectionModel(l,"multipleRowsSelection")},[e,h,t.rowSelectionPropagation?.parents,t.keepNonExistentRowsSelected,t.filterMode,p,m]),O=s.useCallback((t,r)=>{const n=r.metaKey||r.ctrlKey,o=!l&&!n&&!(e=>!!e.key)(r),a=!d||o,i=e.current.isRowSelected(t),s=BXt(e)>1&&a||!i;e.current.selectRow(t,s,a)},[e,d,l]),P=s.useCallback((t,r)=>{if(c)return;const n=r.target.closest(`.${nYt.cell}`)?.getAttribute("data-field");if(n!==MQt.field&&n!==eXt){if(n){const t=e.current.getColumn(n);if(t?.type===RZt)return}"pinnedRow"!==GYt(e,t.id).type&&(r.shiftKey&&d?f(t.id):O(t.id,r))}},[c,d,e,f,O]),E=s.useCallback((e,t)=>{d&&t.shiftKey&&window.getSelection()?.removeAllRanges()},[d]),j=s.useCallback((t,r)=>{d&&r.nativeEvent.shiftKey?f(t.id):e.current.selectRow(t.id,t.value,!d)},[e,f,d]),T=s.useCallback(r=>{const n=kXt(e),o=wXt(e),a=n.items.length>0||o?.some(e=>e.length);t.isRowSelectable||t.checkboxSelectionVisibleOnly||h&&!t.rowSelectionPropagation?.descendants||a?e.current.selectRows(m(),r):e.current.setRowSelectionModel({type:r?"exclude":"include",ids:new Set},"multipleRowsSelection")},[e,m,t.checkboxSelectionVisibleOnly,t.isRowSelectable,t.rowSelectionPropagation?.descendants,h]),N=s.useCallback(e=>{T(e.value)},[T]),R=s.useCallback((t,r)=>{if(e.current.getCellMode(t.id,t.field)!==wKt.Edit&&!W0t(r)){if(bZt(r.key)&&r.shiftKey){const n=XXt(e);if(n&&n.id!==t.id){r.preventDefault();const o=e.current.isRowSelected(n.id);if(!d)return void e.current.selectRow(n.id,!o,!0);const a=e.current.getRowIndexRelativeToVisibleRows(n.id),i=e.current.getRowIndexRelativeToVisibleRows(t.id);let s,l;a>i?o?(s=i,l=a-1):(s=i,l=a):o?(s=a+1,l=i):(s=a,l=i);const c=OJt(e),u=[];for(let e=s;e<=l;e+=1)u.push(c.rows[e].id);return void e.current.selectRows(u,!o)}}if(" "===r.key&&r.shiftKey)return r.preventDefault(),void O(t.id,r);"A"===String.fromCharCode(r.keyCode)&&(r.ctrlKey||r.metaKey)&&(r.preventDefault(),T(!0))}},[e,d,O,T]),z=Ni(()=>{if(!t.rowSelection)return void e.current.setRowSelectionModel(p8t);if(void 0===a)return;if(!o||!h||"include"===a.type&&0===a.ids.size)return void e.current.setRowSelectionModel(a);const r=e.current.getPropagatedRowSelectionModel(a);r.type===a.type&&r.ids.size===a.ids.size&&Array.from(a.ids).every(e=>r.ids.has(e))?e.current.setRowSelectionModel(a):e.current.setRowSelectionModel(r)});pYt(e,"sortedRowsSet",n(()=>D(!0))),pYt(e,"filteredRowsSet",n(()=>D())),pYt(e,"rowClick",n(P)),pYt(e,"rowSelectionCheckboxChange",n(j)),pYt(e,"headerSelectionCheckboxChange",N),pYt(e,"cellMouseDown",n(E)),pYt(e,"cellKeyDown",n(R)),s.useEffect(()=>{z()},[e,a,t.rowSelection,z]);const A=null!=a;s.useEffect(()=>{if(A||!t.rowSelection||"function"!=typeof g)return;const r=IXt(e);if("include"!==r.type)return;const n=new Set;for(const e of r.ids)g(e)&&n.add(e);n.size<r.ids.size&&e.current.setRowSelectionModel({type:r.type,ids:n})},[e,g,A,t.rowSelection]),s.useEffect(()=>{if(!t.rowSelection||A)return;const r=IXt(e);!d&&("include"===r.type&&r.ids.size>1||"exclude"===r.type)&&e.current.setRowSelectionModel(p8t)},[e,d,l,A,t.rowSelection]),s.useEffect(()=>{n(D)},[D,n]),s.useEffect(()=>{M.current&&(M.current=!1)},[])})(e,r),((e,t)=>{const r=SYt(e,KKt),n=s.useCallback((t,r)=>{const n=XKt(e);if(!r.colIndex||0===n.left.length&&0===n.right.length)return t;const o=GKt(e),a=LGt(e),i=JKt(e),s=e.current.virtualScrollerRef.current.clientWidth,l=Math.abs(e.current.virtualScrollerRef.current.scrollLeft),c=o[r.colIndex].computedWidth,u=i[r.colIndex],d=i[n.left.length],p=a-i[i.length-n.right.length],h=u+c;return h-(s-p)>l?S({},t,{left:h-(s-p)}):u<l+d?S({},t,{left:u-d}):t},[e]),o=s.useCallback((e,r)=>t.disableColumnPinning||!1===r.pinnable?e:[...e,"columnMenuPinningItem"],[t.disableColumnPinning]),a=s.useCallback((t,{targetIndex:r})=>{const n=XKt(e);return 0===n.left.length&&0===n.right.length?t:!(n.left.length>0&&r<n.left.length)&&(n.right.length>0?!(r>=GKt(e).length-n.right.length)&&t:t)},[e]),i=s.useCallback((r,n)=>{const o=KKt(e);return!n.exportOnlyDirtyModels||null!=t.pinnedColumns||null!=t.initialState?.pinnedColumns||(o.left??[]).length>0||(o.right??[]).length>0?S({},r,{pinnedColumns:o}):r},[e,t.pinnedColumns,t.initialState?.pinnedColumns]),l=s.useCallback((t,r)=>{const n=r.stateToRestore.pinnedColumns;return null!=n&&T9t(e,n),t},[e]);x6t(e,"scrollToIndexes",n),x6t(e,"columnMenu",o),x6t(e,"canBeReordered",a),x6t(e,"exportState",i),x6t(e,"restoreState",l),e.current.registerControlState({stateId:"pinnedColumns",propModel:t.pinnedColumns,propOnChange:t.onPinnedColumnsChange,stateSelector:KKt,changeEvent:"pinnedColumnsChange"});const c=s.useCallback((t,n)=>{if(e.current.isColumnPinned(t)===n)return;const o=n===AKt.RIGHT?AKt.LEFT:AKt.RIGHT,a={[n]:[...r[n]||[],t],[o]:(r[o]||[]).filter(e=>e!==t)};e.current.setPinnedColumns(a)},[e,r]),u=s.useCallback(t=>{e.current.setPinnedColumns({left:(r.left||[]).filter(e=>e!==t),right:(r.right||[]).filter(e=>e!==t)})},[e,r.left,r.right]),d=s.useCallback(()=>KKt(e),[e]),p=s.useCallback(t=>{T9t(e,t),e.current.requestPipeProcessorsApplication("hydrateColumns")},[e]),h=s.useCallback(e=>(r.left||[]).includes(e)?AKt.LEFT:!!(r.right||[]).includes(e)&&AKt.RIGHT,[r.left,r.right]);CJt(e,{pinColumn:c,unpinColumn:u,getPinnedColumns:d,setPinnedColumns:p,isColumnPinned:h},"public"),pYt(e,"columnOrderChange",t=>{if(!e.current.caches.columnPinning.orderedFieldsBeforePinningColumns)return;const{column:r,targetIndex:n,oldIndex:o}=t,a=n>o?1:-1,i=HKt(e)[n-a],s=[...e.current.caches.columnPinning.orderedFieldsBeforePinningColumns];let l=s.findIndex(e=>e===r.field),c=l+a;const u=s.findIndex(e=>e===i);for(;a>0?l<u:l>u;){for(;e.current.isColumnPinned(s[c]);)c+=a;const t=s[l];s[l]=s[c],s[c]=t,l=c,c=l+a}e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=s}),s.useEffect(()=>{t.pinnedColumns&&e.current.setPinnedColumns(t.pinnedColumns)},[e,t.pinnedColumns])})(e,r),((e,t)=>{const r=s.useCallback(r=>{e.current.caches.pinnedRows=W9t(r,t.getRowId),e.current.requestPipeProcessorsApplication("hydrateRows")},[e,t.getRowId]);CJt(e,{unstable_setPinnedRows:r},"public");const n=s.useRef(!0);s.useEffect(()=>{n.current?n.current=!1:e.current.unstable_setPinnedRows(t.pinnedRows)},[e,t.pinnedRows])})(e,r),A6t(e,r),((e,t)=>{if("production"!==process.env.NODE_ENV)try{Object.freeze(t.rows)}catch(e){}const r=MJt(e,"useGridRows"),n=s.useRef(Date.now()),o=s.useRef(t.rowCount),a=Ds(),i=s.useCallback(t=>{const r=qYt(e)[t];if(r)return r;const n=GYt(e,t);return n&&$Zt(n)?{[FZt]:t}:null},[e]),l=s.useCallback(t=>_Qt(e,t),[e]),c=s.useCallback(({cache:r,throttle:o})=>{const i=()=>{n.current=Date.now(),e.current.setState(r=>S({},r,{rows:HZt({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:UYt(e),previousTreeDepths:ZYt(e),previousGroupsToFetch:YYt(e)})})),e.current.publishEvent("rowsSet")};if(a.clear(),e.current.caches.rows=r,!o)return void i();const s=t.throttleRowsMs-(Date.now()-n.current);s>0?a.start(s,i):i()},[t.throttleRowsMs,t.rowCount,t.loading,e,a]),u=s.useCallback(n=>{if(r.debug(`Updating all rows, new length ${n.length}`),l1t(e))return void e.current.updateNonPivotRows(n,!1);const o=BZt({rows:n,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),a=e.current.caches.rows;o.rowsBeforePartialUpdates=a.rowsBeforePartialUpdates,c({cache:o,throttle:!0})},[r,t.getRowId,t.loading,t.rowCount,c,e]),d=s.useCallback(r=>{if(t.signature===oYt.DataGrid&&r.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(l1t(e))return void e.current.updateNonPivotRows(r);const n=GZt(e,r,t.getRowId),o=WZt({updates:n,getRowId:t.getRowId,previousCache:e.current.caches.rows});c({cache:o,throttle:!0})},[t.signature,t.getRowId,c,e]),p=s.useCallback((r,n)=>{const o=GZt(e,r,t.getRowId),a=WZt({updates:o,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:n??[]});c({cache:a,throttle:!1})},[t.getRowId,c,e]),h=s.useCallback(t=>{r.debug(`Setting loading to ${t}`),e.current.setState(e=>S({},e,{rows:S({},e.rows,{loading:t})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t},[e,r]),f=s.useCallback(()=>{const t=QYt(e),r=qYt(e);return new Map(t.map(e=>[e,r[e]??{}]))},[e]),m=s.useCallback(()=>VYt(e),[e]),v=s.useCallback(()=>QYt(e),[e]),y=s.useCallback(t=>{const{rowIdToIndexMap:r}=OJt(e);return r.get(t)},[e]),g=s.useCallback((t,r)=>{const n=GYt(e,t);if(!n)throw new Error(`MUI X: No row with id #${t} found.`);if("group"!==n.type)throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const o=S({},n,{childrenExpanded:r});e.current.setState(e=>S({},e,{rows:S({},e.rows,{tree:S({},e.rows.tree,{[t]:o})})})),e.current.publishEvent("rowExpansionChange",o)},[e]),x=s.useCallback(t=>GYt(e,t)??null,[e]),b=s.useCallback(({skipAutoGeneratedRows:t=!0,groupId:r,applySorting:n,applyFiltering:o,directChildrenOnly:a=!1})=>{const i=UYt(e);let s;if(n){const n=i[r];if(!n)return[];const o=mXt(e);s=[];for(let e=o.findIndex(e=>e===r)+1;e<o.length&&(a?i[o[e]].depth===n.depth+1:i[o[e]].depth>n.depth);e+=1){const r=o[e];t&&$Zt(i[r])||s.push(r)}}else s=qZt(i,r,t,a);if(o){const t=CXt(e);s=hXt(t)?s:s.filter(e=>!1!==t[e])}return s},[e]),k=s.useCallback((t,n)=>{const o=GYt(e,t);if(!o)throw new Error(`MUI X: No row with id #${t} found.`);if(o.parent!==AZt)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if("leaf"!==o.type)throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState(o=>{const a=UYt(e)[AZt],i=a.children,s=i.findIndex(e=>e===t);if(-1===s||s===n)return o;r.debug(`Moving row ${t} to index ${n}`);const l=[...i];return l.splice(n,0,l.splice(s,1)[0]),S({},o,{rows:S({},o.rows,{tree:S({},o.rows.tree,{[AZt]:S({},a,{children:l})})})})}),e.current.publishEvent("rowsSet")},[e,r]),w=s.useCallback((r,n)=>{if(t.signature===oYt.DataGrid&&n.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===n.length)return;if(XYt(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const o=S({},UYt(e)),a=S({},qYt(e)),i=o[AZt],s=[...i.children],l=new Set;for(let e=0;e<n.length;e+=1){const i=n[e],c=LZt(i,t.getRowId,"A row was provided without id when calling replaceRows()."),[u]=s.splice(r+e,1,c);l.has(u)||(delete a[u],delete o[u]);const d={id:c,depth:0,parent:AZt,type:"leaf",groupingKey:null};a[c]=i,o[c]=d,l.add(c)}o[AZt]=S({},i,{children:s});const c=s.filter(e=>"leaf"===o[e]?.type);e.current.caches.rows.dataRowIdToModelLookup=a,e.current.setState(e=>S({},e,{rows:S({},e.rows,{loading:t.loading,totalRowCount:Math.max(t.rowCount||0,s.length),dataRowIdToModelLookup:a,dataRowIds:c,tree:o})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId,t.loading,t.rowCount]),_={getRow:i,setLoading:h,getRowId:l,getRowModels:f,getRowsCount:m,getAllRowIds:v,setRows:u,updateRows:d,getRowNode:x,getRowIndexRelativeToVisibleRows:y,unstable_replaceRows:w},C={setRowIndex:k,setRowChildrenExpansion:g,getRowGroupChildren:b},M={updateNestedRows:p},D=s.useCallback(()=>{let n;r.info("Row grouping pre-processing have changed, regenerating the row tree"),n=e.current.caches.rows.rowsBeforePartialUpdates===t.rows?S({},e.current.caches.rows,{updates:{type:"full",rows:QYt(e)}}):BZt({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),c({cache:n,throttle:!1})},[r,e,t.rows,t.getRowId,t.loading,t.rowCount,c]),O=_s(()=>t.dataSource),P=s.useCallback(e=>{t.dataSource&&t.dataSource!==O.current?O.current=t.dataSource:"rowTreeCreation"===e&&D()},[D,O,t.dataSource]),E=s.useCallback(()=>{e.current.getActiveStrategy(k6t.RowTree)!==KYt(e)&&D()},[e,D]);pYt(e,"activeStrategyProcessorChange",P),pYt(e,"strategyAvailabilityChange",E);const j=s.useCallback(()=>{e.current.setState(r=>{const n=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:UYt(e),treeDepths:ZYt(e),dataRowIds:QYt(e),dataRowIdToModelLookup:qYt(e)});return S({},r,{rows:S({},r.rows,n,{totalTopLevelRowCount:VZt({tree:n.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet")},[e,t.rowCount]);b6t(e,"hydrateRows",j),CJt(e,_,"public"),CJt(e,C,t.signature===oYt.DataGrid?"private":"public"),CJt(e,M,"private");const T=s.useRef(!0);s.useEffect(()=>{if(T.current)return void(T.current=!1);let n=!1;t.rowCount!==o.current&&(n=!0,o.current=t.rowCount);const a=t.dataSource?JYt(e):t.rows,i=e.current.caches.rows.rowsBeforePartialUpdates===a,s=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,l=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;i&&(s||(e.current.setState(e=>S({},e,{rows:S({},e.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading),l||(e.current.setState(e=>S({},e,{rows:S({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount),!n)||(r.debug(`Updating all rows, new length ${a?.length}`),c({cache:BZt({rows:a,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,t.dataSource,r,c,e])})(e,r),((e,t)=>{const r=_s(()=>e.current.state.rowSpanning!==Y8t?Q8t(t,e):K8t),n=s.useCallback((n,o=!1)=>{const{range:a,rows:i}=OJt(e,(t.pagination,t.paginationMode));if(null===a||!U8t(n))return;o&&(r.current=K8t);const s=function(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex<t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?{firstRowIndex:e.firstRowIndex,lastRowIndex:t.firstRowIndex-1}:e}({firstRowIndex:n.firstRowIndex,lastRowIndex:Math.min(n.lastRowIndex,a.lastRowIndex+1)},r.current);if(null===s)return;const l=GKt(e),{spannedCells:c,hiddenCells:u,hiddenCellOriginMap:d,processedRange:p}=X8t(e,l,i,a,s,o,r.current);r.current=p;const h=Object.keys(c).length,f=Object.keys(u).length,m=Object.keys(e.current.state.rowSpanning.spannedCells).length,v=Object.keys(e.current.state.rowSpanning.hiddenCells).length;(o||h!==m||f!==v)&&(0!==h||0!==m)&&e.current.setState(e=>S({},e,{rowSpanning:{spannedCells:c,hiddenCells:u,hiddenCellOriginMap:d}}))},[e,r,t.pagination,t.paginationMode]),o=s.useCallback(()=>{const t=RJt(e);U8t(t)&&n(t,!0)},[e,n]);pYt(e,"renderedRowsIntervalChange",xKt(t.rowSpanning,n)),pYt(e,"sortedRowsSet",xKt(t.rowSpanning,o)),pYt(e,"paginationModelChange",xKt(t.rowSpanning,o)),pYt(e,"filteredRowsSet",xKt(t.rowSpanning,o)),pYt(e,"columnsChange",xKt(t.rowSpanning,o)),s.useEffect(()=>{t.rowSpanning?e.current.state.rowSpanning===Y8t&&o():e.current.state.rowSpanning!==Y8t&&e.current.setState(e=>S({},e,{rowSpanning:Y8t}))},[e,o,t.rowSpanning])})(e,r),d8t(e,r),((e,t)=>{const r=SYt(e,I7t),n=s.useCallback((n,o)=>{if(n.field!==eXt||null==t.getDetailPanelContent)return;const a=r[n.id];s.isValidElement(a)&&o.target!==o.currentTarget&&e.current.toggleDetailPanel(n.id)},[e,r,t.getDetailPanelContent]),o=s.useCallback((r,n)=>{null!=t.getDetailPanelContent&&r.field===eXt&&" "===n.key&&e.current.toggleDetailPanel(r.id)},[e,t.getDetailPanelContent]);pYt(e,"cellClick",n),pYt(e,"cellKeyDown",o),e.current.registerControlState({stateId:"detailPanels",propModel:t.detailPanelExpandedRowIds,propOnChange:t.onDetailPanelExpandedRowIdsChange,stateSelector:F7t,changeEvent:"detailPanelsExpandedRowIdsChange"});const a=s.useCallback(n=>{if(null==t.getDetailPanelContent)return;const o=r[n];if(!s.isValidElement(o))return;const a=e.current.getExpandedDetailPanels(),i=new Set(a);a.has(n)?i.delete(n):i.add(n),e.current.setExpandedDetailPanels(i)},[e,r,t.getDetailPanelContent]),i=s.useCallback(()=>F7t(e),[e]),l=s.useCallback(t=>{e.current.setState(e=>S({},e,{detailPanel:S({},e.detailPanel,{expandedRowIds:t})})),e.current.requestPipeProcessorsApplication("rowHeight")},[e]),c=s.useCallback((t,r)=>{const n=L7t(e);n[t]&&n[t].height!==r&&(e.current.setState(e=>S({},e,{detailPanel:S({},e.detailPanel,{heightCache:S({},n,{[t]:S({},n[t],{height:r})})})})),e.current.requestPipeProcessorsApplication("rowHeight"))},[e]),u={storeDetailPanelHeight:c};CJt(e,{toggleDetailPanel:a,getExpandedDetailPanels:i,setExpandedDetailPanels:l},"public"),CJt(e,u,"private"),s.useEffect(()=>{t.detailPanelExpandedRowIds&&F7t(e)!==t.detailPanelExpandedRowIds&&e.current.setExpandedDetailPanels(t.detailPanelExpandedRowIds)},[e,t.detailPanelExpandedRowIds]);const d=s.useCallback(()=>{t.getDetailPanelContent&&e.current.setState(r=>S({},r,{detailPanel:S({},r.detailPanel,A9t(e,t.getDetailPanelContent,t.getDetailPanelHeight,r.detailPanel.heightCache))}))},[e,t.getDetailPanelContent,t.getDetailPanelHeight]);pYt(e,"sortedRowsSet",d);const p=s.useRef(void 0),h=s.useRef(void 0),f=s.useCallback(()=>{t.getDetailPanelContent===p.current&&t.getDetailPanelHeight===h.current||(e.current.setState(r=>S({},r,{detailPanel:S({},r.detailPanel,A9t(e,t.getDetailPanelContent,t.getDetailPanelHeight,r.detailPanel.heightCache))})),p.current=t.getDetailPanelContent,h.current=t.getDetailPanelHeight)},[e,t.getDetailPanelContent,t.getDetailPanelHeight]),m=s.useCallback((t,r)=>{const n=F7t(e);if(!n||!n.has(r.id))return t.detail=0,t;f();const o=L7t(e);return t.detail=o[r.id]?.height??0,t},[e,f]),v=void 0!==t.getDetailPanelContent;x6t(e,"rowHeight",m,v);const y=s.useRef(!0);y.current&&f(),s.useEffect(()=>{y.current||f(),y.current=!1},[e,f])})(e,r),(e=>{const t=s.useRef({}),r=()=>{t.current={}},n=s.useCallback(({rowId:r,minFirstColumn:n,maxLastColumn:o,columns:a})=>{for(let i=n;i<o;i+=1){const s=P8t({apiRef:e,lookup:t.current,columnIndex:i,rowId:r,minFirstColumnIndex:n,maxLastColumnIndex:o,columns:a});s.colSpan>1&&(i+=s.colSpan-1)}},[e]),o={resetColSpan:r,calculateColSpan:n};CJt(e,{unstable_getCellColSpanInfo:(e,r)=>t.current[e]?.[r]},"public"),CJt(e,o,"private"),pYt(e,"columnOrderChange",r)})(e),((e,t)=>{const r=s.useCallback(t=>oJt(e)[t]??[],[e]),n=s.useCallback(()=>aJt(e),[e]);CJt(e,{getColumnGroupPath:r,getAllGroupDetails:n},"public");const o=s.useCallback(()=>{const r=T8t(t.columnGroupingModel??[]);e.current.setState(e=>{const t=e.columns?.orderedFields??[],n=e.pinnedColumns??{},o=N8t(t,r,n);return S({},e,{columnGrouping:S({},e.columnGrouping,{headerStructure:o})})})},[e,t.columnGroupingModel]),a=s.useCallback(t=>{e.current.caches.columnGrouping.lastColumnGroupingModel=t;const r=e.current.getPinnedColumns?.()??{},n=HKt(e),o=YKt(e),a=z8t(t??[]),i=T8t(t??[]),s=N8t(n,i,r),l=0===o.length?0:Math.max(...o.map(e=>i[e]?.length??0));e.current.setState(e=>S({},e,{columnGrouping:{lookup:a,unwrappedGroupingModel:i,headerStructure:s,maxDepth:l}}))},[e]);pYt(e,"columnIndexChange",o),pYt(e,"columnsChange",()=>{a(t.columnGroupingModel)}),pYt(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),s.useEffect(()=>{t.columnGroupingModel!==e.current.caches.columnGrouping.lastColumnGroupingModel&&a(t.columnGroupingModel)},[e,a,t.columnGroupingModel])})(e,r),s8t(e,r),((e,t)=>{const r=MJt(e,"useGridFocus"),n=s.useRef(null),o=null!==e.current.rootElementRef.current,a=s.useCallback((t,r)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),r)},[e]),i=s.useCallback((t,n)=>{const o=XXt(e);o?.id===t&&o?.field===n||(e.current.setState(e=>(r.debug(`Focusing on cell with id=${t} and field=${n}`),S({},e,{tabIndex:{cell:{id:t,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:t,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.getRow(t)&&(o&&a(o,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,n))))},[e,r,a]),l=s.useCallback((t,n={})=>{const o=XXt(e);a(o,n),e.current.setState(e=>(r.debug(`Focusing on column header with colIndex=${t}`),S({},e,{tabIndex:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))},[e,r,a]),c=s.useCallback((t,n={})=>{const o=XXt(e);a(o,n),e.current.setState(e=>(r.debug(`Focusing on column header filter with colIndex=${t}`),S({},e,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null}})))},[e,r,a]),u=s.useCallback((t,r,n={})=>{const o=XXt(e);o&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(o.id,o.field),n),e.current.setState(e=>S({},e,{tabIndex:{columnGroupHeader:{field:t,depth:r},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:t,depth:r},columnHeader:null,columnHeaderFilter:null,cell:null}}))},[e]),d=s.useCallback(()=>eQt(e),[e]),p=s.useCallback((r,n,o)=>{let a=e.current.getColumnIndex(n);const i=GKt(e),s=OJt(e,(t.pagination,t.paginationMode)),l=eKt(e),c=[].concat(l.top||[],s.rows,l.bottom||[]);let u=c.findIndex(e=>e.id===r);"right"===o?a+=1:"left"===o?a-=1:u+=1,a>=i.length?(u+=1,u<c.length&&(a=0)):a<0&&(u-=1,u>=0&&(a=i.length-1)),u=vKt(u,0,c.length-1);const d=c[u];if(!d)return;const p=e.current.unstable_getCellColSpanInfo(d.id,a);p&&p.spannedByColSpan&&("left"===o||"below"===o?a=p.leftVisibleCellIndex:"right"===o&&(a=p.rightVisibleCellIndex)),a=vKt(a,0,i.length-1);const h=i[a];e.current.setCellFocus(d.id,h.field)},[e,t.pagination,t.paginationMode]),h=s.useCallback(({id:t,field:r})=>{e.current.setCellFocus(t,r)},[e]),f=s.useCallback((t,r)=>{"Enter"===r.key||"Tab"===r.key||"Shift"===r.key||bZt(r.key)||e.current.setCellFocus(t.id,t.field)},[e]),m=s.useCallback(({field:t},r)=>{r.target===r.currentTarget&&e.current.setColumnHeaderFocus(t,r)},[e]),v=s.useCallback(({fields:t,depth:r},n)=>{if(n.target!==n.currentTarget)return;const o=eQt(e);null!==o&&o.depth===r&&t.includes(o.field)||e.current.setColumnGroupHeaderFocus(t[0],r,n)},[e]),y=s.useCallback((t,n)=>{n.relatedTarget?.getAttribute("class")?.includes(nYt.columnHeader)||(r.debug("Clearing focus"),e.current.setState(e=>S({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[r,e]),g=s.useCallback(e=>{n.current=e},[]),x=s.useCallback(t=>{const r=n.current;n.current=null;const o=XXt(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:t,cell:r}))return;if(!o)return void(r&&e.current.setCellFocus(r.id,r.field));if(r?.id===o.id&&r?.field===o.field)return;const i=e.current.getCellElement(o.id,o.field);i?.contains(t.target)||(r?e.current.setCellFocus(r.id,r.field):(e.current.setState(e=>S({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),a(o,t)))},[e,a]),b=s.useCallback(t=>{if("view"===t.cellMode)return;const r=XXt(e);r?.id===t.id&&r?.field===t.field||e.current.setCellFocus(t.id,t.field)},[e]),k=s.useCallback(()=>{const r=XXt(e);if(r&&!e.current.getRow(r.id)){const n=r.id;let o=null;if(void 0!==n){const r=e.current.getRowElement(n),a=r?.dataset.rowindex?Number(r?.dataset.rowindex):0,i=OJt(e,(t.pagination,t.paginationMode)),s=i.rows[vKt(a,0,i.rows.length-1)];o=s?.id??null}e.current.setState(e=>S({},e,{focus:{cell:null===o?null:{id:o,field:r.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),w=Ni(()=>{const r=XXt(e);if(!r)return;const n=OJt(e,(t.pagination,t.paginationMode));if(n.rows.find(e=>e.id===r.id)||0===n.rows.length)return;const o=GKt(e);e.current.setState(e=>S({},e,{tabIndex:{cell:{id:n.rows[0].id,field:o[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),_={moveFocusToRelativeCell:p,setColumnGroupHeaderFocus:u,getColumnGroupHeaderFocus:d};CJt(e,{setCellFocus:i,setColumnHeaderFocus:l,setColumnHeaderFilterFocus:c},"public"),CJt(e,_,"private"),s.useEffect(()=>{const t=Oi(e.current.rootElementRef.current);return t.addEventListener("mouseup",x),()=>{t.removeEventListener("mouseup",x)}},[e,o,x]),pYt(e,"columnHeaderBlur",y),pYt(e,"cellDoubleClick",h),pYt(e,"cellMouseDown",g),pYt(e,"cellKeyDown",f),pYt(e,"cellModeChange",b),pYt(e,"columnHeaderFocus",m),pYt(e,"columnGroupHeaderFocus",v),pYt(e,"rowsSet",k),pYt(e,"paginationModelChange",w)})(e,r),((e,t)=>{const r=MJt(e,"useGridPreferencesPanel"),n=s.useCallback(()=>{e.current.setState(t=>{if(!t.preferencePanel.open)return t;r.debug("Hiding Preferences Panel");const n=N1t(e);return e.current.publishEvent("preferencePanelClose",{openedPanelValue:n.openedPanelValue}),S({},t,{preferencePanel:{open:!1}})})},[e,r]),o=s.useCallback((t,n,o)=>{r.debug("Opening Preferences Panel"),e.current.setState(e=>S({},e,{preferencePanel:S({},e.preferencePanel,{open:!0,openedPanelValue:t,panelId:n,labelId:o})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t})},[r,e]);CJt(e,{showPreferences:o,hidePreferences:n},"public");const a=s.useCallback((r,n)=>{const o=N1t(e);return!n.exportOnlyDirtyModels||null!=t.initialState?.preferencePanel||o.open?S({},r,{preferencePanel:o}):r},[e,t.initialState?.preferencePanel]),i=s.useCallback((t,r)=>{const n=r.stateToRestore.preferencePanel;return null!=n&&e.current.setState(e=>S({},e,{preferencePanel:n})),t},[e]);x6t(e,"exportState",a),x6t(e,"restoreState",i)})(e,r),((e,r)=>{const n=MJt(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:r.filterModel,propOnChange:r.onFilterModelChange,stateSelector:kXt,changeEvent:"filterModelChange"});const o=s.useCallback(()=>{e.current.setState(t=>{const r=kXt(e),n=e.current.getFilterState(r),o=S({},t,{filter:S({},t.filter,n)});return S({},o,{visibleRowsLookup:W6t(e,o)})}),e.current.publishEvent("filteredRowsSet")},[e]),a=s.useCallback((e,t)=>null==t||!1===t.filterable||r.disableColumnFilter?e:[...e,"columnMenuFilterItem"],[r.disableColumnFilter]),i=s.useCallback(t=>{const r=kXt(e),n=[...r.items],o=n.findIndex(e=>e.id===t.id);-1===o?n.push(t):n[o]=t,e.current.setFilterModel(S({},r,{items:n}),"upsertFilterItem")},[e]),l=s.useCallback(t=>{const r=kXt(e),n=[...r.items];t.forEach(e=>{const t=n.findIndex(t=>t.id===e.id);-1===t?n.push(e):n[t]=e}),e.current.setFilterModel(S({},r,{items:n}),"upsertFilterItems")},[e]),c=s.useCallback(t=>{const r=kXt(e),n=r.items.filter(e=>e.id!==t.id);n.length!==r.items.length&&e.current.setFilterModel(S({},r,{items:n}),"deleteFilterItem")},[e]),u=s.useCallback((t,o,a)=>{if(n.debug("Displaying filter panel"),t){const n=kXt(e),o=n.items.filter(t=>{if(void 0!==t.value)return!Array.isArray(t.value)||0!==t.value.length;const r=e.current.getColumn(t.field),n=r.filterOperators?.find(e=>e.value===t.operator);return!(void 0===n?.requiresFilterValue||n?.requiresFilterValue)});let a;const i=o.find(e=>e.field===t),s=e.current.getColumn(t);a=i?o:r.disableMultipleColumnsFiltering?[oZt({field:t,operator:s.filterOperators[0].value},e)]:[...o,oZt({field:t,operator:s.filterOperators[0].value},e)],e.current.setFilterModel(S({},n,{items:a}))}e.current.showPreferences(z1t.filters,o,a)},[e,n,r.disableMultipleColumnsFiltering]),d=s.useCallback(()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()},[e,n]),p=s.useCallback(t=>{const r=kXt(e);r.logicOperator!==t&&e.current.setFilterModel(S({},r,{logicOperator:t}),"changeLogicOperator")},[e]),h=s.useCallback(t=>{const r=kXt(e);n5t(r.quickFilterValues,t)||e.current.setFilterModel(S({},r,{quickFilterValues:[...t]}))},[e]),f=s.useCallback((t,o)=>{kXt(e)!==t&&(n.debug("Setting filter model"),e.current.updateControlState("filter",iZt(t,r.disableMultipleColumnsFiltering,e),o),e.current.unstable_applyFilters())},[e,n,r.disableMultipleColumnsFiltering]),m=s.useCallback(t=>{const n=aZt(t,r.disableMultipleColumnsFiltering,e),o="client"===r.filterMode?pZt(n,e,r.disableEval):null;return S({},e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:o,filterModel:n??RKt()}),{filterModel:n})},[r.disableMultipleColumnsFiltering,r.filterMode,r.disableEval,e]),v={setFilterLogicOperator:p,unstable_applyFilters:o,deleteFilterItem:c,upsertFilterItem:i,upsertFilterItems:l,setFilterModel:f,showFilterPanel:u,hideFilterPanel:d,setQuickFilterValues:h,ignoreDiacritics:r.ignoreDiacritics,getFilterState:m};CJt(e,v,"public");const y=s.useCallback((t,n)=>{const o=kXt(e);return o.items.forEach(e=>{delete e.fromInput}),n.exportOnlyDirtyModels&&null==r.filterModel&&null==r.initialState?.filter?.filterModel&&n5t(o,RKt())?t:S({},t,{filter:{filterModel:o}})},[e,r.filterModel,r.initialState?.filter?.filterModel]),g=s.useCallback((t,n)=>{const o=n.stateToRestore.filter?.filterModel;return null==o?t:(e.current.updateControlState("filter",iZt(o,r.disableMultipleColumnsFiltering,e),"restoreState"),S({},t,{callbacks:[...t.callbacks,e.current.unstable_applyFilters]}))},[e,r.disableMultipleColumnsFiltering]),x=s.useCallback((e,n)=>{if(n===z1t.filters){const e=r.slots.filterPanel;return t.jsx(e,S({},r.slotProps?.filterPanel))}return e},[r.slots.filterPanel,r.slotProps?.filterPanel]),{getRowId:b}=r,k=_s(U6t),w=s.useCallback(t=>{if("client"!==r.filterMode||!t.isRowMatchingFilters||!t.filterModel.items.length&&!t.filterModel.quickFilterValues?.length)return NKt;const n=qYt(e),o={},{isRowMatchingFilters:a}=t,i={},s={passingFilterItems:null,passingQuickFilterValues:null},l=k.current(e.current.state.rows.dataRowIdToModelLookup);for(let r=0;r<l.length;r+=1){const n=l[r],c=b?b(n):n.id;a(n,void 0,s);const u=fZt([s.passingFilterItems],[s.passingQuickFilterValues],t.filterModel,e,i);u||(o[c]=u)}const c="auto-generated-group-footer-root";return n[c]&&(o[c]=!0),{filteredRowsLookup:o,filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}}},[e,r.filterMode,b,k]);x6t(e,"columnMenu",a),x6t(e,"exportState",y),x6t(e,"restoreState",g),x6t(e,"preferencePanel",x),w6t(e,_6t,"filtering",w),w6t(e,_6t,"visibleRowsLookupCreation",q6t);const _=s.useCallback(()=>{n.debug("onColUpdated - GridColumns changed, applying filters");const t=kXt(e),r=$Kt(e),o=t.items.filter(e=>e.field&&r[e.field]);o.length<t.items.length&&e.current.setFilterModel(S({},t,{items:o}))},[e,n]),C=s.useCallback(t=>{"filtering"===t&&e.current.unstable_applyFilters()},[e]),M=s.useCallback(()=>{e.current.setState(t=>S({},t,{visibleRowsLookup:W6t(e,t)}))},[e]);pYt(e,"rowsSet",o),pYt(e,"columnsChange",_),pYt(e,"activeStrategyProcessorChange",C),pYt(e,"rowExpansionChange",M),pYt(e,"columnVisibilityModelChange",()=>{const t=kXt(e);t.quickFilterValues?.length&&dZt(t)&&o()}),DJt(()=>{o()}),po(()=>{void 0!==r.filterModel&&e.current.setFilterModel(r.filterModel)},[e,n,r.filterModel])})(e,r),((e,t)=>{const r=MJt(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:yXt,changeEvent:"sortModelChange"});const n=s.useCallback((t,r)=>{const n=yXt(e),o=n.findIndex(e=>e.field===t);let a=[...n];return o>-1?null==r?.sort?a.splice(o,1):a.splice(o,1,r):a=[...n,r],a},[e]),o=s.useCallback((r,n)=>{const o=yXt(e).find(e=>e.field===r.field);if(o){const e=void 0===n?aKt(r.sortingOrder??t.sortingOrder,o.sort):n;return void 0===e?void 0:S({},o,{sort:e})}return{field:r.field,sort:void 0===n?aKt(r.sortingOrder??t.sortingOrder):n}},[e,t.sortingOrder]),a=s.useCallback((e,r)=>null==r||!1===r.sortable||t.disableColumnSorting?e:(r.sortingOrder||t.sortingOrder).some(e=>!!e)?[...e,"columnMenuSortItem"]:e,[t.sortingOrder,t.disableColumnSorting]),i=s.useCallback(()=>{e.current.setState(n=>{if("server"===t.sortingMode)return r.debug("Skipping sorting rows as sortingMode = server"),S({},n,{sorting:S({},n.sorting,{sortedRows:qZt(UYt(e),AZt,!1)})});const o=yXt(e),a=oKt(o,e),i=e.current.applyStrategyProcessor("sorting",{sortRowList:a});return S({},n,{sorting:S({},n.sorting,{sortedRows:i})})}),e.current.publishEvent("sortedRowsSet")},[e,r,t.sortingMode]),l=s.useCallback(n=>{yXt(e)!==n&&(r.debug("Setting sort model"),e.current.setState(nKt(n,t.disableMultipleColumnsSorting)),e.current.applySorting())},[e,r,t.disableMultipleColumnsSorting]),c=s.useCallback((r,a,i)=>{const s=e.current.getColumn(r),l=o(s,a);let c;c=!i||t.disableMultipleColumnsSorting?null==l?.sort?[]:[l]:n(s.field,l),e.current.setSortModel(c)},[e,n,o,t.disableMultipleColumnsSorting]),u=s.useCallback(()=>yXt(e),[e]),d=s.useCallback(()=>vXt(e).map(e=>e.model),[e]),p=s.useCallback(()=>mXt(e),[e]),h=s.useCallback(t=>e.current.getSortedRowIds()[t],[e]);CJt(e,{getSortModel:u,getSortedRows:d,getSortedRowIds:p,getRowIdFromRowIndex:h,setSortModel:l,sortColumn:c,applySorting:i},"public");const f=s.useCallback((r,n)=>{const o=yXt(e);return!n.exportOnlyDirtyModels||null!=t.sortModel||null!=t.initialState?.sorting?.sortModel||o.length>0?S({},r,{sorting:{sortModel:o}}):r},[e,t.sortModel,t.initialState?.sorting?.sortModel]),m=s.useCallback((r,n)=>{const o=n.stateToRestore.sorting?.sortModel;return null==o?r:(e.current.setState(nKt(o,t.disableMultipleColumnsSorting)),S({},r,{callbacks:[...r.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),v=s.useCallback(t=>{const r=UYt(e),n=r[AZt],o=t.sortRowList?t.sortRowList(n.children.map(e=>r[e])):[...n.children];return null!=n.footerId&&o.push(n.footerId),o},[e]);x6t(e,"exportState",f),x6t(e,"restoreState",m),w6t(e,_6t,"sorting",v);const y=s.useCallback(({field:e,colDef:r},n)=>{if(!r.sortable||t.disableColumnSorting)return;const o="always"===t.multipleColumnsSortingMode||n.shiftKey||n.metaKey||n.ctrlKey;c(e,void 0,o)},[c,t.disableColumnSorting,t.multipleColumnsSortingMode]),g=s.useCallback(({field:e,colDef:r},n)=>{r.sortable&&!t.disableColumnSorting&&("Enter"!==n.key||n.ctrlKey||n.metaKey||c(e,void 0,"always"===t.multipleColumnsSortingMode||n.shiftKey))},[c,t.disableColumnSorting,t.multipleColumnsSortingMode]),x=s.useCallback(()=>{const t=yXt(e),r=$Kt(e);if(t.length>0){const n=t.filter(e=>r[e.field]);n.length<t.length&&e.current.setSortModel(n)}},[e]),b=s.useCallback(t=>{"sorting"===t&&e.current.applySorting()},[e]);x6t(e,"columnMenu",a),pYt(e,"columnHeaderClick",y),pYt(e,"columnHeaderKeyDown",g),pYt(e,"rowsSet",e.current.applySorting),pYt(e,"columnsChange",x),pYt(e,"activeStrategyProcessorChange",b),DJt(()=>{e.current.applySorting()}),po(()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])})(e,r),((e,t)=>{const r=MJt(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:OYt,changeEvent:"densityChange"});const n=Ni(t=>{OYt(e)!==t&&(r.debug(`Set grid density to ${t}`),e.current.setState(e=>S({},e,{density:t})))});CJt(e,{setDensity:n},"public");const o=s.useCallback((r,n)=>{const o=OYt(e);return n.exportOnlyDirtyModels&&null==t.density&&null==t.initialState?.density?r:S({},r,{density:o})},[e,t.density,t.initialState?.density]),a=s.useCallback((t,r)=>{const n=r.stateToRestore?.density?r.stateToRestore.density:OYt(e);return e.current.setState(e=>S({},e,{density:n})),t},[e]);x6t(e,"exportState",o),x6t(e,"restoreState",a),s.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])})(e,r),O7t(e,r),q8t(e,r),J6t(e,r),((e,t)=>{const{getRowHeight:r,getRowSpacing:n,getEstimatedRowHeight:o}=t,a=e.current.caches.rowsMeta.heights,i=s.useRef(-1),l=s.useRef(!1),c=s.useRef(!1),u=SYt(e,PYt),d=PJt(e),p=SYt(e,eKt),h=SYt(e,BGt),f=s.useCallback(t=>{const a=IGt(e).rowHeight,i=e.current.getRowHeightEntry(t.id);if(r){const e=r(S({},t,{densityFactor:u}));if("auto"===e){if(i.needsFirstMeasurement){const e=o?o(S({},t,{densityFactor:u})):a;i.content=e??a}l.current=!0,i.autoHeight=!0}else i.content=KZt(e,a,XZt),i.needsFirstMeasurement=!1,i.autoHeight=!1}else i.content=a,i.needsFirstMeasurement=!1;if(n){const r=e.current.getRowIndexRelativeToVisibleRows(t.id),o=n(S({},t,{isFirstVisible:0===r,isLastVisible:r===d.rows.length-1,indexRelativeToCurrentPage:r}));i.spacingTop=o.top??0,i.spacingBottom=o.bottom??0}else i.spacingTop=0,i.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",i,t),i},[e,d.rows,r,o,h,n,u]),m=s.useCallback(()=>{l.current=!1;const t=p.top.reduce((e,t)=>{const r=f(t);return e+r.content+r.spacingTop+r.spacingBottom+r.detail},0),r=p.bottom.reduce((e,t)=>{const r=f(t);return e+r.content+r.spacingTop+r.spacingBottom+r.detail},0),n=[],o=d.rows.reduce((e,t)=>{n.push(e);const r=f(t);return e+(r.content+r.spacingTop+r.spacingBottom+r.detail)},0);l.current||(i.current=1/0);const a=t!==e.current.state.rowsMeta.pinnedTopRowsTotalHeight||r!==e.current.state.rowsMeta.pinnedBottomRowsTotalHeight||o!==e.current.state.rowsMeta.currentPageTotalHeight,s={currentPageTotalHeight:o,positions:n,pinnedTopRowsTotalHeight:t,pinnedBottomRowsTotalHeight:r};e.current.setState(e=>S({},e,{rowsMeta:s})),a&&e.current.updateDimensions(),c.current=!0},[e,p,d.rows,f]),v=_s(()=>new D8t(t=>{for(let r=0;r<t.length;r+=1){const n=t[r],o=n.borderBoxSize&&n.borderBoxSize.length>0?n.borderBoxSize[0].blockSize:n.contentRect.height,a=n.target.__mui_id,i=HJt(e)?.id;if(i===a&&0===o)return;e.current.unstable_storeRowHeightMeasurement(a,o)}c.current||requestAnimationFrame(()=>{e.current.requestPipeProcessorsApplication("rowHeight")})})).current;b6t(e,"rowHeight",m),po(()=>{m()},[m]);const y={unstable_getRowHeight:e=>a.get(e)?.content??h,unstable_setLastMeasuredRowIndex:e=>{l.current&&e>i.current&&(i.current=e)},unstable_storeRowHeightMeasurement:(t,r)=>{const n=e.current.getRowHeightEntry(t),o=n.content!==r;n.needsFirstMeasurement=!1,n.content=r,c.current&&=!o},resetRowHeights:()=>{a.clear(),m()}},g={hydrateRowsMeta:m,observeRowHeight:(e,t)=>(e.__mui_id=t,v.observe(e),()=>v.unobserve(e)),rowHasAutoHeight:e=>a.get(e)?.autoHeight??!1,getRowHeightEntry:e=>{let t=a.get(e);return void 0===t&&(t={content:h,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},a.set(e,t)),t},getLastMeasuredRowIndex:()=>i.current};CJt(e,y,"public"),CJt(e,g,"private")})(e,r),B9t(e,r),((e,t)=>{const r=Vo(),n=MJt(e,"useGridScroll"),o=e.current.columnHeadersContainerRef,a=e.current.virtualScrollerRef,i=SYt(e,DXt),l=s.useCallback(r=>{const o=IGt(e),s=VYt(e),l=GKt(e);if(null!=r.rowIndex&&0===s||0===l.length)return!1;n.debug(`Scrolling to cell at row ${r.rowIndex}, col: ${r.colIndex} `);let c={};if(void 0!==r.colIndex){const t=JKt(e);let n;if(void 0!==r.rowIndex){const t=i[r.rowIndex]?.id,o=e.current.unstable_getCellColSpanInfo(t,r.colIndex);o&&!o.spannedByColSpan&&(n=o.cellProps.width)}void 0===n&&(n=l[r.colIndex].computedWidth),c.left=v8t({containerSize:o.viewportOuterSize.width,scrollPosition:Math.abs(a.current.scrollLeft),elementSize:n,elementOffset:t[r.colIndex]})}if(void 0!==r.rowIndex){const n=fJt(e),i=fQt(e),s=mQt(e),l=t.pagination?r.rowIndex-i*s:r.rowIndex,u=n.positions[l+1]?n.positions[l+1]-n.positions[l]:n.currentPageTotalHeight-n.positions[l];c.top=v8t({containerSize:o.viewportInnerSize.height,scrollPosition:a.current.scrollTop,elementSize:u,elementOffset:n.positions[l]})}return c=e.current.unstable_applyPipeProcessors("scrollToIndexes",c,r),(void 0!==typeof c.left||void 0!==typeof c.top)&&(e.current.scroll(c),!0)},[n,e,a,t.pagination,i]),c=s.useCallback(e=>{if(a.current&&void 0!==e.left&&o.current){const t=r?-1:1;o.current.scrollLeft=e.left,a.current.scrollLeft=t*e.left,n.debug(`Scrolling left: ${e.left}`)}a.current&&void 0!==e.top&&(a.current.scrollTop=e.top,n.debug(`Scrolling top: ${e.top}`)),n.debug("Scrolling, updating container, and viewport")},[a,r,o,n]),u=s.useCallback(()=>a?.current?{top:a.current.scrollTop,left:a.current.scrollLeft}:{top:0,left:0},[a]);CJt(e,{scroll:c,scrollToIndexes:l,getScrollPosition:u},"public")})(e,r),((e,t)=>{const r=SYt(e,GKt),n=PJt(e),o="client"===t.rowsLoadingMode&&!!t.onRowsScrollEnd,a=Ni(()=>{const t=e.current.getViewportPageSize(),o={visibleColumns:r,viewportPageSize:t,visibleRowsCount:n.rows.length};e.current.publishEvent("rowsScrollEnd",o)});fYt(e,"rowsScrollEnd",t.onRowsScrollEnd),pYt(e,"rowsScrollEndIntersection",xKt(o,a))})(e,r),((e,t)=>{const r=SYt(e,yXt),n=SYt(e,kXt),o=s.useRef({firstRowToRender:0,lastRowToRender:0}),a="server"!==t.rowsLoadingMode,i=s.useCallback(i=>{if(a)return;const s={firstRowToRender:i.firstRowIndex,lastRowToRender:i.lastRowIndex,sortModel:r,filterModel:n};if(o.current.firstRowToRender!==i.firstRowIndex||o.current.lastRowToRender!==i.lastRowIndex){if(o.current={firstRowToRender:i.firstRowIndex,lastRowToRender:i.lastRowIndex},0===r.length&&0===n.items.length){const r=OJt(e,(t.pagination,t.paginationMode)),n=H9t({apiRef:e,visibleRows:r.rows,range:{firstRowIndex:i.firstRowIndex,lastRowIndex:i.lastRowIndex}});if(!n)return;s.firstRowToRender=n.firstRowIndex,s.lastRowToRender=n.lastRowIndex}e.current.publishEvent("fetchRows",s)}},[e,a,t.pagination,t.paginationMode,r,n]),l=s.useCallback(t=>{if(a)return;e.current.requestPipeProcessorsApplication("hydrateRows");const r=RJt(e),o={firstRowToRender:r.firstRowIndex,lastRowToRender:r.lastRowIndex,sortModel:t,filterModel:n};e.current.publishEvent("fetchRows",o)},[e,a,n]),c=s.useCallback(t=>{if(a)return;e.current.requestPipeProcessorsApplication("hydrateRows");const n=RJt(e),o={firstRowToRender:n.firstRowIndex,lastRowToRender:n.lastRowIndex,sortModel:r,filterModel:t};e.current.publishEvent("fetchRows",o)},[e,a,r]);pYt(e,"renderedRowsIntervalChange",i),pYt(e,"sortModelChange",l),pYt(e,"filterModelChange",c),fYt(e,"fetchRows",t.onFetchRows)})(e,r),((e,t)=>{const r=s.useCallback(()=>{e.current.setStrategyAvailability(k6t.DataSource,n7t.LazyLoading,t.dataSource&&t.lazyLoading?()=>!0:()=>!1)},[e,t.lazyLoading,t.dataSource]),[n,o]=s.useState(!1),a=s.useRef(ter),i=s.useRef(0),l=s.useRef(null),c=s.useRef(!1),u=s.useRef(null),d=s.useCallback(t=>{e.current.dataSource.fetchRows(AZt,t)},[e]),p=s.useMemo(()=>Di(d,0),[d]),h=s.useCallback(t=>{if("number"!=typeof t.start)return t;const r=dQt(e);return S({},t,{start:t.start-t.start%r.pageSize,end:t.end+r.pageSize-t.end%r.pageSize-1})},[e]),f=s.useCallback(()=>{e.current.setLoading(!0),e.current.dataSource.cache.clear(),c.current=!0,i.current=0;const t=dQt(e),r=yXt(e),n=kXt(e),o={start:0,end:t.pageSize-1,sortModel:r,filterModel:n};d(o)},[e,d]),m=s.useCallback((t,r)=>{if(t===eer.VIEWPORT&&r===eer.SCROLL_END)return void f();const n=[...e.current.state.rows.tree[AZt].children],o=e.current.state.pagination.rowCount;n.length>o&&f()},[e,f]),v=s.useCallback(()=>{const t=e.current.state.rows.tree,r=t[AZt],n=[...r.children],o=e.current.state.pagination.rowCount,i=n.length;if(0===i)return;const s=h({start:a.current.firstRowToRender,end:a.current.lastRowToRender});let c=!1;const d=0===a.current.firstRowToRender&&0===a.current.lastRowToRender;for(let e=0;e<i&&!d;e+=1){if(s.start<=e&&e<=s.end||"skeletonRow"===t[n[e]]?.type||t[n[e]]?.id===u.current)continue;const r=t[n[e]].id,o={type:"skeletonRow",id:r,parent:AZt,depth:0};t[r]=o,c=!0}if(l.current===eer.VIEWPORT)for(let e=0;e<o-i;e+=1){const r=rer(e+i);n.push(r);const o={type:"skeletonRow",id:r,parent:AZt,depth:0};t[r]=o,c=!0}c&&(t[AZt]=S({},r,{children:n}),e.current.setState(e=>S({},e,{rows:S({},e.rows,{tree:t})}),"addSkeletonRows"))},[e,h]),y=s.useCallback(e=>{const t=-1===e?eer.SCROLL_END:eer.VIEWPORT;null!==l.current&&m(l.current,t),l.current!==t&&(l.current=t)},[m]),g=s.useCallback(t=>{if("error"in t)return;const{response:r,fetchParams:n}=t,o=e.current.state.pagination.rowCount,a=e.current.state.rows.tree,i=e.current.state.rows.dataRowIdToModelLookup;if(void 0===r.rowCount&&void 0!==o||e.current.setRowCount(void 0===r.rowCount?-1:r.rowCount),c.current&&0===t.fetchParams.start)e.current.scroll({top:0}),e.current.setRows(r.rows);else{const t=a[AZt],o=[...t.children],s=EXt(e),l="string"==typeof n.start?Math.max(s.indexOf(n.start),0):n.start;let c=0;r.rows.forEach(t=>{const r=_Qt(e,t);if(a[r]||i[r]){const e=o.indexOf(r);if(-1!==e){const t=rer(e);o[e]=t,a[t]={type:"skeletonRow",id:t,parent:AZt,depth:0}}delete a[r],delete i[r],c+=1}}),c>0&&(a[AZt]=S({},t,{children:o}),e.current.setState(e=>S({},e,{rows:S({},e.rows,{tree:a,dataRowIdToModelLookup:i})}))),e.current.unstable_replaceRows(l,r.rows)}c.current=!1,null===l.current&&y(e.current.state.pagination.rowCount),v(),e.current.setLoading(!1),e.current.unstable_applyPipeProcessors("processDataSourceRows",{params:t.fetchParams,response:r},!1),e.current.requestPipeProcessorsApplication("hydrateRows")},[e,y,v]),x=s.useCallback(()=>{c.current||null===l.current||(y(e.current.state.pagination.rowCount),v(),e.current.requestPipeProcessorsApplication("hydrateRows"))},[e,y,v]),b=Ni(()=>{if(c.current||l.current!==eer.SCROLL_END)return;const t=RJt(e);if(i.current>=t.lastRowIndex)return;i.current=t.lastRowIndex;const r=dQt(e),n=yXt(e),o=kXt(e),a={start:t.lastRowIndex,end:t.lastRowIndex+r.pageSize-1,sortModel:n,filterModel:o};e.current.setLoading(!0),d(h(a))}),k=s.useCallback(t=>{if(c.current)return;const r=yXt(e),n=kXt(e),o={start:t.firstRowIndex,end:t.lastRowIndex-1,sortModel:r,filterModel:n};if(a.current.firstRowToRender===t.firstRowIndex&&a.current.lastRowToRender===t.lastRowIndex)return;a.current={firstRowToRender:t.firstRowIndex,lastRowToRender:t.lastRowIndex};const i=OJt(e),s=H9t({apiRef:e,visibleRows:i.rows,range:{firstRowIndex:t.firstRowIndex,lastRowIndex:t.lastRowIndex-1}});s&&(o.start=s.firstRowIndex,o.end=s.lastRowIndex,d(h(o)))},[e,h,d]),w=s.useMemo(()=>y8t(k,t.lazyLoadingRequestThrottleMs),[t.lazyLoadingRequestThrottleMs,k]);s.useEffect(()=>()=>{w.clear()},[w]);const _=s.useCallback(t=>{c.current=!0,w.clear(),i.current=0;const r=dQt(e),n=kXt(e),o={start:0,end:r.pageSize-1,sortModel:t,filterModel:n};e.current.setLoading(!0),p(o)},[e,p,w]),C=s.useCallback(t=>{c.current=!0,w.clear(),i.current=0;const r=dQt(e),n=yXt(e),o={start:0,end:r.pageSize-1,sortModel:n,filterModel:t};e.current.setLoading(!0),p(o)},[e,p,w]),M=s.useCallback(e=>{u.current=e.id},[]),D=s.useCallback(()=>{u.current=null},[]),O=s.useCallback(()=>{o(e.current.getActiveStrategy(k6t.DataSource)===n7t.LazyLoading)},[e]);w6t(e,n7t.LazyLoading,"dataSourceRowsUpdate",g),pYt(e,"strategyAvailabilityChange",O),pYt(e,"rowCountChange",xKt(n,x)),pYt(e,"rowsScrollEndIntersection",xKt(n,b)),pYt(e,"renderedRowsIntervalChange",xKt(n,w)),pYt(e,"sortModelChange",xKt(n,_)),pYt(e,"filterModelChange",xKt(n,C)),pYt(e,"rowDragStart",xKt(n,M)),pYt(e,"rowDragEnd",xKt(n,D)),s.useEffect(()=>{r()},[r])})(e,r),oer(e,r),(e=>{const t=MJt(e,"useGridColumnMenu"),r=s.useCallback(r=>{const n=d1t(e),o=r;(!0!==n.open||o!==n.field)&&(e.current.setState(e=>e.columnMenu.open&&e.columnMenu.field===r?e:(t.debug("Opening Column Menu"),S({},e,{columnMenu:{open:!0,field:r}}))),e.current.hidePreferences())},[e,t]),n=s.useCallback(()=>{const r=d1t(e);if(r.field){const t=$Kt(e),n=WKt(e),o=HKt(e);let a=r.field;if(t[a]||(a=o[0]),!1===n[a]){const e=o.filter(e=>e===a||!1!==n[e]),t=e.indexOf(a);a=e[t+1]||e[t-1]}e.current.setColumnHeaderFocus(a)}const n={open:!1,field:void 0};(n.open!==r.open||n.field!==r.field)&&e.current.setState(e=>(t.debug("Hiding Column Menu"),S({},e,{columnMenu:n})))},[e,t]),o=s.useCallback(o=>{t.debug("Toggle Column Menu");const a=d1t(e);a.open&&a.field===o?n():r(o)},[e,t,r,n]);CJt(e,{showColumnMenu:r,hideColumnMenu:n,toggleColumnMenu:o},"public"),pYt(e,"columnResizeStart",n),pYt(e,"virtualScrollerWheel",e.current.hideColumnMenu),pYt(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(e),B6t(e,r),H6t(e,r),N6t(e,r),_8t(e,r),function(e,t){fYt(e,"columnHeaderClick",t.onColumnHeaderClick),fYt(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),fYt(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),fYt(e,"columnHeaderOver",t.onColumnHeaderOver),fYt(e,"columnHeaderOut",t.onColumnHeaderOut),fYt(e,"columnHeaderEnter",t.onColumnHeaderEnter),fYt(e,"columnHeaderLeave",t.onColumnHeaderLeave),fYt(e,"cellClick",t.onCellClick),fYt(e,"cellDoubleClick",t.onCellDoubleClick),fYt(e,"cellKeyDown",t.onCellKeyDown),fYt(e,"preferencePanelClose",t.onPreferencePanelClose),fYt(e,"preferencePanelOpen",t.onPreferencePanelOpen),fYt(e,"menuOpen",t.onMenuOpen),fYt(e,"menuClose",t.onMenuClose),fYt(e,"rowDoubleClick",t.onRowDoubleClick),fYt(e,"rowClick",t.onRowClick),fYt(e,"stateChange",t.onStateChange)}(e,r),(e=>{const t=s.useCallback((t={})=>e.current.unstable_applyPipeProcessors("exportState",{},t),[e]),r=s.useCallback(t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach(e=>{e()})},[e]);CJt(e,{exportState:t,restoreState:r},"public")})(e),function(e,t){const r=r=>{e.current.setState(e=>S({},e,{virtualization:S({},e.virtualization,{enabled:r,enabledForColumns:r,enabledForRows:r&&!t.autoHeight})}))},n={unstable_setVirtualization:r,unstable_setColumnVirtualization:t=>{e.current.setState(e=>S({},e,{virtualization:S({},e.virtualization,{enabledForColumns:t})}))}};CJt(e,n,"public"),s.useEffect(()=>{r(!t.disableVirtualization)},[t.disableVirtualization,t.autoHeight])}(e,r),((e,t)=>{const{api:r,strategyProcessor:n,events:o,setStrategyAvailability:a}=X9t(e,t,J9t);CJt(e,r.public,"public"),CJt(e,r.private,"private"),w6t(e,n.strategyName,n.group,n.processor),Object.entries(o).forEach(([t,r])=>{pYt(e,t,r)}),s.useEffect(()=>{a()},[a])})(e,r),function(e,t){const r=()=>{e.current.setState(t=>t.listViewColumn?S({},t,{listViewColumn:S({},t.listViewColumn,{computedWidth:t7t(e)})}):t)},n=s.useRef(null);pYt(e,"viewportInnerSizeChange",e=>{n.current!==e.width&&(n.current=e.width,r())}),pYt(e,"columnVisibilityModelChange",r),po(()=>{const r=t.listViewColumn;r&&e.current.setState(t=>S({},t,{listViewColumn:S({},r,{computedWidth:t7t(e)})}))},[e,t.listViewColumn]),s.useEffect(()=>{t.listView&&!t.listViewColumn&&lat(["MUI X: The `listViewColumn` prop must be set if `listView` is enabled.",'To fix, pass a column definition to the `listViewColumn` prop, e.g. `{ field: "example", renderCell: (params) => <div>{params.row.id}</div> }`.',"For more details, see https://mui.com/x/react-data-grid/list-view/"])},[t.listView,t.listViewColumn])}(e,r),s.useEffect(()=>{e.current.runAppliersForPendingProcessors()})},ier=S({},o4t,{columnMenuPinningItem:z7t}),ser=S({},a4t,{columnMenuPinningItem:{displayOrder:15}}),ler=QGt(function(e,r){return t.jsx(i4t,S({},e,{defaultSlots:ier,defaultSlotProps:ser,ref:r}))});"production"!==process.env.NODE_ENV&&(ler.displayName="GridProColumnMenu");const cer=["getColumnsToRender","getPinnedCellOffset","renderContext","leftRenderContext","rightRenderContext","pinnedColumns","visibleColumns","columnPositions"],uer=Object.create(null),der=e=>{const r=wJt(),{headerGroupingMaxDepth:n,hasOtherElementInTabSequence:o}=e,a=SYt(r,oQt),i=c7t(S({},e,{hasOtherElementInTabSequence:o||null!==a})),{getColumnsToRender:l,getPinnedCellOffset:c,renderContext:u,leftRenderContext:d,rightRenderContext:p,pinnedColumns:h,visibleColumns:f,columnPositions:m}=i,v=Hi(i,cer),y=s.useRef(null);r.current.register("private",{headerFiltersElementRef:y});const g=s.useRef(null),x=T7t(),b=(e=>{const{classes:t}=e;return s.useMemo(()=>ua({headerFilterRow:["headerFilterRow"]},rYt,t),[t])})(x),k=!x.headerFilters,w=SYt(r,kXt),_=SYt(r,LGt),C=SYt(r,qGt),M=SYt(r,GGt),D=SYt(r,KGt),O=SYt(r,JXt),P=s.useCallback(e=>{const t=w?.items.find(t=>t.field===e.field&&"isAnyOf"!==t.operator);if(null!=t)return t;const r=uer[e.field];if(null!=r)return r;const n=R4t(e);return uer[e.field]=n,n},[w]),E=r=>{const{renderedColumns:n,firstColumnToRender:o}=l(r),i=[];for(let s=0;s<n.length;s+=1){const l=n[s],u=o+s,d=O?.field===l.field,p=0===u,h=a?.field,f=h===l.field||p&&!e.hasOtherElementInTabSequence?0:-1,v="function"==typeof l.headerClassName?l.headerClassName({field:l.field,colDef:l}):l.headerClassName,y=P(l),b=r?.position,k=c(b,l.computedWidth,u,m,_,D),w=s,E=n.length,j=q5t(b,w),T=$5t(b,w,E,x.showColumnVerticalBorder,C);i.push(t.jsx(x.slots.headerFilterCell,S({colIndex:u,height:M,width:l.computedWidth,colDef:l,hasFocus:d,tabIndex:f,headerFilterMenuRef:g,headerClassName:v,"data-field":l.field,item:y,pinnedPosition:b,pinnedOffset:k,showLeftBorder:j,showRightBorder:T},x.slotProps?.headerFilterCell),`${l.field}-filter`))}return v.getFillers(r,i,0,!0)},j=()=>k?null:t.jsxs(l7t,{ref:y,className:b.headerFilterRow,role:"row","aria-rowindex":n+2,ownerState:x,children:[d&&E({position:tXt.LEFT,renderContext:d,maxLastColumn:d.lastColumnIndex}),E({renderContext:u,maxLastColumn:f.length-h.right.length}),p&&E({position:tXt.RIGHT,renderContext:p,maxLastColumn:p.lastColumnIndex})]});return"production"!==process.env.NODE_ENV&&(j.displayName="getColumnFiltersRow"),S({},v,{getColumnFiltersRow:j})},per=["style","className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],her=ii("div")({flex:1,backgroundColor:RYt.header.background.base}),fer=QGt(function(e,r){const{className:n,visibleColumns:o,sortColumnLookup:a,filterColumnLookup:i,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:u,headerGroupingMaxDepth:d,columnMenuState:p,columnVisibility:h,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:m}=e,v=Hi(e,per),{getInnerProps:y,getColumnHeadersRow:g,getColumnFiltersRow:x,getColumnGroupHeadersRows:b}=der({visibleColumns:o,sortColumnLookup:a,filterColumnLookup:i,columnHeaderTabIndexState:s,hasOtherElementInTabSequence:m,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:u,headerGroupingMaxDepth:d,columnMenuState:p,columnVisibility:h,columnGroupsHeaderStructure:f});return t.jsxs(p7t,S({className:n},v,y(),{ref:r,children:[b(),g(),x(),t.jsx(her,{})]}))});"production"!==process.env.NODE_ENV&&(fer.displayName="GridColumnHeaders"),"production"!==process.env.NODE_ENV&&(fer.propTypes={columnGroupHeaderFocus:Vt.exports.shape({depth:Vt.exports.number.isRequired,field:Vt.exports.string.isRequired}),columnGroupHeaderTabIndexState:Vt.exports.shape({depth:Vt.exports.number.isRequired,field:Vt.exports.string.isRequired}),columnGroupsHeaderStructure:Vt.exports.arrayOf(Vt.exports.arrayOf(Vt.exports.shape({columnFields:Vt.exports.arrayOf(Vt.exports.string).isRequired,groupId:Vt.exports.string}))).isRequired,columnHeaderFocus:Vt.exports.shape({field:Vt.exports.string.isRequired}),columnHeaderTabIndexState:Vt.exports.shape({field:Vt.exports.string.isRequired}),columnMenuState:Vt.exports.shape({field:Vt.exports.string,open:Vt.exports.bool.isRequired}).isRequired,columnVisibility:Vt.exports.object.isRequired,filterColumnLookup:Vt.exports.object.isRequired,hasOtherElementInTabSequence:Vt.exports.bool.isRequired,headerGroupingMaxDepth:Vt.exports.number.isRequired,sortColumnLookup:Vt.exports.object.isRequired,visibleColumns:Vt.exports.arrayOf(Vt.exports.object).isRequired});const mer="development"===process.env.NODE_ENV||"test"===process.env.NODE_ENV,ver=()=>{};const yer=ii("div",{name:"MuiDataGrid",slot:"DetailPanel"})({width:"calc(var(--DataGrid-rowWidth) - var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",backgroundColor:RYt.colors.background.base,overflow:"auto"});function ger(e){const{rowId:r,height:n,className:o,children:a}=e,i=k9t(),l=s.useRef(null),c=T7t(),u="auto"===n,d=GYt(i,r);return s.useLayoutEffect(()=>{u&&"undefined"==typeof ResizeObserver&&i.current.storeDetailPanelHeight(r,l.current.clientHeight)},[i,u,r]),function(e,t,r){const n=s.useRef(null);n.current=t,po(()=>{if(!1===r||"undefined"==typeof ResizeObserver)return ver;let t=0;const o=e.current,a=new ResizeObserver(e=>{mer?t=requestAnimationFrame(()=>{n.current(e)}):n.current(e)});return o&&a.observe(o),()=>{t&&cancelAnimationFrame(t),a.disconnect()}},[e,r])}(l,e=>{const[t]=e,n=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;i.current.storeDetailPanelHeight(r,n)},u),"skeletonRow"===d?.type?null:t.jsx(yer,{ref:l,ownerState:c,role:"presentation",style:{height:n},className:o,children:a})}function xer({virtualScroller:e}){const r=k9t(),n=ua({detailPanel:["detailPanel"]},rYt,{}),{setPanels:o}=e,a=SYt(r,F7t),i=SYt(r,I7t),l=SYt(r,L7t),c=s.useCallback(e=>{const o=i[e],a=void 0!==r.current.getRowIndexRelativeToVisibleRows(e);if(!s.isValidElement(o)||!a)return null;const c=l[e],u=c.autoHeight?"auto":c.height;return t.jsx(ger,{rowId:e,height:u,className:n.detailPanel,children:o},`panel-${e}`)},[r,n.detailPanel,l,i]);return s.useEffect(()=>{if(0===a.size)o(GJt);else{const e=new Map;for(const t of a)e.set(t,c(t));o(e)}},[a,o,c]),null}const ber=S({},{columnMenuPinRightIcon:W7t,columnMenuPinLeftIcon:U7t});const ker=S({},g7t,ber,{columnMenu:ler,columnHeaders:fer,detailPanels:function(e){return T7t().getDetailPanelContent?s.createElement(xer,e):null},headerFilterCell:t9t,headerFilterMenu:r9t,pinnedRows:function({position:e,virtualScroller:r}){const n=ua({root:["pinnedRows"]},rYt,{}),o=SYt(wJt(),eKt)[e],a=s.useMemo(()=>({firstRowIndex:0,lastRowIndex:o.length,firstColumnIndex:-1,lastColumnIndex:-1}),[o]);if(0===o.length)return null;const i=r.getRows({position:e,rows:o,renderContext:a});return t.jsx("div",{className:Wn(n.root,nYt[`pinnedRows--${e}`]),role:"presentation",children:i})}}),wer=S({},g8t,{autosizeOnMount:!1,defaultGroupingExpansionDepth:0,disableAutosize:!1,disableChildrenFiltering:!1,disableChildrenSorting:!1,disableColumnPinning:!1,getDetailPanelHeight:()=>500,headerFilters:!1,keepColumnPositionIfDraggedOutside:!1,rowSelectionPropagation:{parents:!0,descendants:!0},rowReordering:!1,rowsLoadingMode:"client",scrollEndThreshold:80,treeData:!1,lazyLoading:!1,lazyLoadingRequestThrottleMs:500,listView:!1,multipleColumnsSortingMode:"withModifierKey"}),_er=ker,Cer=e=>{const t=ri(),r=s.useMemo(()=>co({props:e,theme:t,name:"MuiDataGrid"}),[t,e]),n=s.useMemo(()=>S({},tYt,r.localeText),[r.localeText]),o=s.useMemo(()=>function({defaultSlots:e,slots:t}){const r=t;if(!r||0===Object.keys(r).length)return e;const n=S({},e);return Object.keys(r).forEach(e=>{const t=e;void 0!==r[t]&&(n[t]=r[t])}),n}({defaultSlots:_er,slots:r.slots}),[r.slots]);return s.useMemo(()=>S({},wer,r,{localeText:n,slots:o},(e=>S({signature:"DataGridPro"},e.dataSource?{filterMode:"server",sortingMode:"server",paginationMode:"server"}:{}))(r)),[r,n,o])},Mer=[...K1t,e=>e.pagination&&e.hideFooterRowCount?"MUI X: The `hideFooterRowCount` prop has no effect when the pagination is enabled.":void 0,e=>e.treeData&&"server"===e.filterMode&&!e.dataSource?'MUI X: The `filterMode="server"` prop is not available when the `treeData` is enabled.':void 0,e=>!e.pagination&&e.checkboxSelectionVisibleOnly?"MUI X: The `checkboxSelectionVisibleOnly` prop has no effect when the pagination is not enabled.":void 0,e=>e.signature!==oYt.DataGrid&&"client"===e.paginationMode&&"server"!==e.rowsLoadingMode&&hKt(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"`.':void 0,e=>e.signature!==oYt.DataGrid&&("server"===e.rowsLoadingMode||e.onRowsScrollEnd)&&e.lazyLoading?'MUI X: Usage of the client side lazy loading (`rowsLoadingMode="server"` or `onRowsScrollEnd=...`) cannot be used together with server side lazy loading `lazyLoading="true"`.':void 0],Ser={hooks:{useCSSVariables:function(){const e=ri();return s.useMemo(()=>{const t=g3t(function(e){const t=new WeakSet;return JSON.stringify(e,(e,r)=>{if("undefined"!=typeof window&&r===window||"undefined"!=typeof document&&r===document)return r.toString();if(null!==r&&"object"==typeof r){if(t.has(r))return null;t.add(r)}return r})}(e)),r=function(e){const t=function(e){if(e.vars)return e.vars.palette.TableCell.border;if("light"===e.palette.mode)return Oo(Co(e.palette.divider,1),.88);return So(Co(e.palette.divider,1),.68)}(e),r=(e.vars||e).palette.DataGrid,n=r?.bg??(e.vars||e).palette.background.default,o=r?.headerBg??n,a=r?.pinnedBg??n,i=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:Co(e.palette.background.default,e.palette.action.disabledOpacity),s="dark"===e.palette.mode?`color-mix(in srgb, ${(e.vars||e).palette.background.paper} 95%, #fff)`:(e.vars||e).palette.background.paper,l=e.vars?`rgb(${e.vars.palette.primary.mainChannel})`:e.palette.primary.main,c=function(e){if(e.vars)return e.vars.shape.borderRadius;return"number"==typeof e.shape.borderRadius?`${e.shape.borderRadius}px`:e.shape.borderRadius}(e),u=e.vars?.font?.body2??k3t(e.typography.body2),d=e.vars?.font?.caption??k3t(e.typography.caption),p=e.vars?.font?.body1??k3t(e.typography.body1),h=RYt.keys;return{[h.spacingUnit]:e.vars?e.vars.spacing??e.spacing(1):e.spacing(1),[h.colors.border.base]:t,[h.colors.background.base]:n,[h.colors.background.overlay]:s,[h.colors.background.backdrop]:i,[h.colors.foreground.base]:(e.vars||e).palette.text.primary,[h.colors.foreground.muted]:(e.vars||e).palette.text.secondary,[h.colors.foreground.accent]:(e.vars||e).palette.primary.dark,[h.colors.foreground.disabled]:(e.vars||e).palette.text.disabled,[h.colors.foreground.error]:(e.vars||e).palette.error.dark,[h.colors.interactive.hover]:(e.vars||e).palette.action.hover,[h.colors.interactive.hoverOpacity]:(e.vars||e).palette.action.hoverOpacity,[h.colors.interactive.focus]:b3t((e.vars||e).palette.primary.main),[h.colors.interactive.focusOpacity]:(e.vars||e).palette.action.focusOpacity,[h.colors.interactive.disabled]:b3t((e.vars||e).palette.action.disabled),[h.colors.interactive.disabledOpacity]:(e.vars||e).palette.action.disabledOpacity,[h.colors.interactive.selected]:l,[h.colors.interactive.selectedOpacity]:(e.vars||e).palette.action.selectedOpacity,[h.header.background.base]:o,[h.cell.background.pinned]:a,[h.radius.base]:c,[h.typography.fontFamily.base]:e.typography.fontFamily,[h.typography.fontWeight.light]:e.typography.fontWeightLight,[h.typography.fontWeight.regular]:e.typography.fontWeightRegular,[h.typography.fontWeight.medium]:e.typography.fontWeightMedium,[h.typography.fontWeight.bold]:e.typography.fontWeightBold,[h.typography.font.body]:u,[h.typography.font.small]:d,[h.typography.font.large]:p,[h.transitions.easing.easeIn]:e.transitions.easing.easeIn,[h.transitions.easing.easeOut]:e.transitions.easing.easeOut,[h.transitions.easing.easeInOut]:e.transitions.easing.easeInOut,[h.transitions.duration.short]:`${e.transitions.duration.shorter}ms`,[h.transitions.duration.base]:`${e.transitions.duration.short}ms`,[h.transitions.duration.long]:`${e.transitions.duration.standard}ms`,[h.shadows.base]:(e.vars||e).shadows[2],[h.shadows.overlay]:(e.vars||e).shadows[8],[h.zIndex.panel]:(e.vars||e).zIndex.modal,[h.zIndex.menu]:(e.vars||e).zIndex.modal}}(e);return{id:t,variables:r}},[e])},useGridAriaAttributes:()=>{const e=(()=>{const e=wJt(),t=eYt(),r=SYt(e,GKt),n=SYt(e,NXt),o=SYt(e,sJt),a=SYt(e,tKt),i=t["aria-label"],s=t["aria-labelledby"];return{role:"grid","aria-label":i||s||!t.label?i:t.label,"aria-labelledby":s,"aria-colcount":r.length,"aria-rowcount":o+1+a+n,"aria-multiselectable":qXt(t)}})();return S({},e,T7t().treeData?{role:"treegrid"}:{})},useGridRowAriaAttributes:e=>{const t=k9t(),r=T7t(),n=(()=>{const e=wJt(),t=SYt(e,sJt);return s.useCallback((r,n)=>{const o={},a=n+t+2;return o["aria-rowindex"]=a,e.current.isRowSelectable(r.id)&&(o["aria-selected"]=e.current.isRowSelected(r.id)),o},[e,t])})(),o=SYt(t,RXt),a=SYt(t,MXt),i=SYt(t,jXt);return s.useCallback((t,s)=>{const l=n(t,s);if(null===t||!r.treeData&&!e)return l;if("footer"===t.type||"pinnedRow"===t.type)return l;l["aria-level"]=t.depth+1;const c=a[t.id]??0;return"group"===t.type&&c>0&&(l["aria-expanded"]=Boolean(t.childrenExpanded)),null!==t.parent&&(l["aria-setsize"]=t.parent===AZt?o:a[t.parent],l["aria-posinset"]=i[t.id]),l},[r.treeData,e,o,a,i,n])},useCellAggregationResult:()=>null}},Der="MTc1MzAzODAwMDAwMA==",Oer=t.jsx(K,{packageName:"x-data-grid-pro",releaseInfo:Der}),Per=QGt(function(e,r){const n=Cer(e),o=w7t(n.apiRef,n);return aer(o,n),q("x-data-grid-pro",Der),"production"!==process.env.NODE_ENV&&function(e,t){t.forEach(t=>{const r=t(e);r&&lat(r,"error")})}(n,Mer),t.jsx(p3t,{privateApiRef:o,configuration:Ser,props:n,children:t.jsx(M0t,S({className:n.className,style:n.style,sx:n.sx},n.slotProps?.root,{ref:r,children:Oer}))})});"production"!==process.env.NODE_ENV&&(Per.displayName="DataGridProRaw");const Eer=s.memo(Per);"production"!==process.env.NODE_ENV&&(Eer.displayName="DataGridPro"),Per.propTypes={apiRef:Vt.exports.shape({current:Vt.exports.object}),"aria-label":Vt.exports.string,"aria-labelledby":Vt.exports.string,autoHeight:Vt.exports.bool,autoPageSize:Vt.exports.bool,autosizeOnMount:Vt.exports.bool,autosizeOptions:Vt.exports.shape({columns:Vt.exports.arrayOf(Vt.exports.string),disableColumnVirtualization:Vt.exports.bool,expand:Vt.exports.bool,includeHeaders:Vt.exports.bool,includeOutliers:Vt.exports.bool,outliersFactor:Vt.exports.number}),cellModesModel:Vt.exports.object,checkboxSelection:Vt.exports.bool,checkboxSelectionVisibleOnly:Vt.exports.bool,classes:Vt.exports.object,className:Vt.exports.string,clipboardCopyCellDelimiter:Vt.exports.string,columnBufferPx:Vt.exports.number,columnGroupHeaderHeight:Vt.exports.number,columnGroupingModel:Vt.exports.arrayOf(Vt.exports.object),columnHeaderHeight:Vt.exports.number,columns:Vt.exports.arrayOf(Vt.exports.object).isRequired,columnVisibilityModel:Vt.exports.object,dataSource:Vt.exports.shape({getChildrenCount:Vt.exports.func,getGroupKey:Vt.exports.func,getRows:Vt.exports.func.isRequired,updateRow:Vt.exports.func}),dataSourceCache:Vt.exports.shape({clear:Vt.exports.func.isRequired,get:Vt.exports.func.isRequired,set:Vt.exports.func.isRequired}),defaultGroupingExpansionDepth:Vt.exports.number,density:Vt.exports.oneOf(["comfortable","compact","standard"]),detailPanelExpandedRowIds:Vt.exports.instanceOf(Set),disableAutosize:Vt.exports.bool,disableChildrenFiltering:Vt.exports.bool,disableChildrenSorting:Vt.exports.bool,disableColumnFilter:Vt.exports.bool,disableColumnMenu:Vt.exports.bool,disableColumnPinning:Vt.exports.bool,disableColumnReorder:Vt.exports.bool,disableColumnResize:Vt.exports.bool,disableColumnSelector:Vt.exports.bool,disableColumnSorting:Vt.exports.bool,disableDensitySelector:Vt.exports.bool,disableEval:Vt.exports.bool,disableMultipleColumnsFiltering:Vt.exports.bool,disableMultipleColumnsSorting:Vt.exports.bool,disableMultipleRowSelection:Vt.exports.bool,disableRowSelectionOnClick:Vt.exports.bool,disableVirtualization:Vt.exports.bool,editMode:Vt.exports.oneOf(["cell","row"]),estimatedRowCount:Vt.exports.number,experimentalFeatures:Vt.exports.shape({warnIfFocusStateIsNotSynced:Vt.exports.bool}),filterDebounceMs:Vt.exports.number,filterMode:Vt.exports.oneOf(["client","server"]),filterModel:Vt.exports.shape({items:Vt.exports.arrayOf(Vt.exports.shape({field:Vt.exports.string.isRequired,id:Vt.exports.oneOfType([Vt.exports.number,Vt.exports.string]),operator:Vt.exports.string.isRequired,value:Vt.exports.any})).isRequired,logicOperator:Vt.exports.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:Vt.exports.bool,quickFilterLogicOperator:Vt.exports.oneOf(["and","or"]),quickFilterValues:Vt.exports.array}),getCellClassName:Vt.exports.func,getDetailPanelContent:Vt.exports.func,getDetailPanelHeight:Vt.exports.func,getEstimatedRowHeight:Vt.exports.func,getRowClassName:Vt.exports.func,getRowHeight:Vt.exports.func,getRowId:Vt.exports.func,getRowSpacing:Vt.exports.func,getTreeDataPath:Vt.exports.func,groupingColDef:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object]),headerFilterHeight:Vt.exports.number,headerFilters:Vt.exports.bool,hideFooter:Vt.exports.bool,hideFooterPagination:Vt.exports.bool,hideFooterRowCount:Vt.exports.bool,hideFooterSelectedRowCount:Vt.exports.bool,ignoreDiacritics:Vt.exports.bool,ignoreValueFormatterDuringExport:Vt.exports.oneOfType([Vt.exports.shape({clipboardExport:Vt.exports.bool,csvExport:Vt.exports.bool}),Vt.exports.bool]),initialState:Vt.exports.object,isCellEditable:Vt.exports.func,isGroupExpandedByDefault:Vt.exports.func,isRowSelectable:Vt.exports.func,keepColumnPositionIfDraggedOutside:Vt.exports.bool,keepNonExistentRowsSelected:Vt.exports.bool,label:Vt.exports.string,lazyLoading:Vt.exports.bool,lazyLoadingRequestThrottleMs:Vt.exports.number,listView:Vt.exports.bool,listViewColumn:Vt.exports.shape({align:Vt.exports.oneOf(["center","left","right"]),cellClassName:Vt.exports.oneOfType([Vt.exports.func,Vt.exports.string]),display:Vt.exports.oneOf(["flex","text"]),field:Vt.exports.string.isRequired,renderCell:Vt.exports.func}),loading:Vt.exports.bool,localeText:Vt.exports.object,logger:Vt.exports.shape({debug:Vt.exports.func.isRequired,error:Vt.exports.func.isRequired,info:Vt.exports.func.isRequired,warn:Vt.exports.func.isRequired}),logLevel:Vt.exports.oneOf(["debug","error","info","warn",!1]),multipleColumnsSortingMode:Vt.exports.oneOf(["always","withModifierKey"]),nonce:Vt.exports.string,onCellClick:Vt.exports.func,onCellDoubleClick:Vt.exports.func,onCellEditStart:Vt.exports.func,onCellEditStop:Vt.exports.func,onCellKeyDown:Vt.exports.func,onCellModesModelChange:Vt.exports.func,onClipboardCopy:Vt.exports.func,onColumnHeaderClick:Vt.exports.func,onColumnHeaderContextMenu:Vt.exports.func,onColumnHeaderDoubleClick:Vt.exports.func,onColumnHeaderEnter:Vt.exports.func,onColumnHeaderLeave:Vt.exports.func,onColumnHeaderOut:Vt.exports.func,onColumnHeaderOver:Vt.exports.func,onColumnOrderChange:Vt.exports.func,onColumnResize:Vt.exports.func,onColumnVisibilityModelChange:Vt.exports.func,onColumnWidthChange:Vt.exports.func,onDataSourceError:Vt.exports.func,onDensityChange:Vt.exports.func,onDetailPanelExpandedRowIdsChange:Vt.exports.func,onFetchRows:Vt.exports.func,onFilterModelChange:Vt.exports.func,onMenuClose:Vt.exports.func,onMenuOpen:Vt.exports.func,onPaginationMetaChange:Vt.exports.func,onPaginationModelChange:Vt.exports.func,onPinnedColumnsChange:Vt.exports.func,onPreferencePanelClose:Vt.exports.func,onPreferencePanelOpen:Vt.exports.func,onProcessRowUpdateError:Vt.exports.func,onResize:Vt.exports.func,onRowClick:Vt.exports.func,onRowCountChange:Vt.exports.func,onRowDoubleClick:Vt.exports.func,onRowEditStart:Vt.exports.func,onRowEditStop:Vt.exports.func,onRowModesModelChange:Vt.exports.func,onRowOrderChange:Vt.exports.func,onRowSelectionModelChange:Vt.exports.func,onRowsScrollEnd:Vt.exports.func,onSortModelChange:Vt.exports.func,onStateChange:Vt.exports.func,pageSizeOptions:Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.number,Vt.exports.shape({label:Vt.exports.string.isRequired,value:Vt.exports.number.isRequired})]).isRequired),pagination:Vt.exports.bool,paginationMeta:Vt.exports.shape({hasNextPage:Vt.exports.bool}),paginationMode:Vt.exports.oneOf(["client","server"]),paginationModel:Vt.exports.shape({page:Vt.exports.number.isRequired,pageSize:Vt.exports.number.isRequired}),pinnedColumns:Vt.exports.object,pinnedRows:Vt.exports.shape({bottom:Vt.exports.arrayOf(Vt.exports.object),top:Vt.exports.arrayOf(Vt.exports.object)}),processRowUpdate:Vt.exports.func,resizeThrottleMs:Vt.exports.number,rowBufferPx:Vt.exports.number,rowCount:Vt.exports.number,rowHeight:Vt.exports.number,rowModesModel:Vt.exports.object,rowReordering:Vt.exports.bool,rows:Vt.exports.arrayOf(Vt.exports.object),rowSelection:Vt.exports.bool,rowSelectionModel:Vt.exports.shape({ids:Vt.exports.instanceOf(Set).isRequired,type:Vt.exports.oneOf(["exclude","include"]).isRequired}),rowSelectionPropagation:Vt.exports.shape({descendants:Vt.exports.bool,parents:Vt.exports.bool}),rowsLoadingMode:Vt.exports.oneOf(["client","server"]),rowSpacingType:Vt.exports.oneOf(["border","margin"]),rowSpanning:Vt.exports.bool,scrollbarSize:Vt.exports.number,scrollEndThreshold:Vt.exports.number,showCellVerticalBorder:Vt.exports.bool,showColumnVerticalBorder:Vt.exports.bool,showToolbar:Vt.exports.bool,slotProps:Vt.exports.object,slots:Vt.exports.object,sortingMode:Vt.exports.oneOf(["client","server"]),sortingOrder:Vt.exports.arrayOf(Vt.exports.oneOf(["asc","desc"])),sortModel:Vt.exports.arrayOf(Vt.exports.shape({field:Vt.exports.string.isRequired,sort:Vt.exports.oneOf(["asc","desc"])})),style:Vt.exports.object,sx:Vt.exports.oneOfType([Vt.exports.arrayOf(Vt.exports.oneOfType([Vt.exports.func,Vt.exports.object,Vt.exports.bool])),Vt.exports.func,Vt.exports.object]),throttleRowsMs:Vt.exports.number,treeData:Vt.exports.bool,virtualizeColumnsWithAutoRowHeight:Vt.exports.bool};const jer=()=>s.useRef(null);var Ter=function(e){var t,r=e.tooltip,n=e.label,o=void 0===n?"Action":n,a=e.icon,i=e.variant,s=void 0===i?"outlined":i,l=e.color,c=void 0===l?"primary":l,u=e.size,d=void 0===u?"small":u,p=e.onClick,h="string"==typeof a?lt(Q3e,{name:a,size:16}):a,f=null!==(t=null!=r?r:o)&&void 0!==t?t:"";return lt(Sx,Z({title:f,placement:"top"},{children:lt(Ql,Z({size:"small"===d?"small":"medium",color:c,onClick:function(e){e.stopPropagation(),null==p||p()},"aria-label":f,sx:"contained"===s?{backgroundColor:"background.paper",border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"background.paper"}}:"outlined"===s?{border:"1px solid",borderColor:"divider"}:void 0},{children:h}))}))},Ner=function(e){var t=e.value,r=e.trueLabel,n=void 0===r?"Yes":r,o=e.falseLabel,a=void 0===o?"No":o,i="boolean"==typeof t?t:"string"==typeof t?["true","1","yes","y"].includes(t.toLowerCase()):Boolean(t);return lt(Ip,Z({sx:{display:"inline-flex",alignItems:"center"}},{children:lt(Sx,Z({title:i?n:a,placement:"top"},{children:lt(Ip,Z({component:"span",sx:{display:"inline-flex"},"aria-label":i?"true":"false"},{children:i?lt(Vw,{width:16,height:16,color:"#16A34A"}):lt(qw,{width:16,height:16,color:"#DC2626"})}))}))}))},Rer=function(e){var t=e.value,r=e.currency,n=void 0===r?"USD":r,o=e.locale,a="number"==typeof t?t:Number(null!=t?t:0);if(!Number.isFinite(a))return lt(st,{children:String(null!=t?t:"")});var i=new Intl.NumberFormat(null!=o?o:void 0,{style:"currency",currency:n,maximumFractionDigits:2});return lt(st,{children:i.format(a)})},zer=function(e){var t=e.value,r=e.formatString,n=void 0===r?"yyyy-MM-dd HH:mm":r;if(null==t)return null;var o=t instanceof Date?t:new Date(t);return Number.isNaN(o.getTime())?lt(st,{children:String(t)}):lt(st,{children:L8e(o,n)})},Aer=function(e){var t=e.value;return lt(st,{children:null==t?"":String(t)})},Fer=function(e){var t=e.value,r=(null!=t?t:"").toString();return r?ct(Ip,Z({sx:{display:"inline-flex",alignItems:"center",gap:.5}},{children:[lt(Qw,{size:16}),lt("a",Z({href:"mailto:".concat(r),onClick:function(e){return e.stopPropagation()}},{children:r}))]})):null},Ier=function(e){var t=e.value,r=null==t?"":String(t);if(!r)return null;var n=r.replace(/[^+\d]/g,"");return ct(Ip,Z({sx:{display:"inline-flex",alignItems:"center",gap:.5}},{children:[lt(Xw,{size:16}),lt("a",Z({href:"tel:".concat(n),onClick:function(e){return e.stopPropagation()}},{children:r}))]}))},Ler=function(e){var t=e.value,r=e.max,n=void 0===r?5:r,o="number"==typeof t?t:Number(null!=t?t:0),a=Number.isFinite(o)?Math.max(0,Math.min(n,Math.floor(o))):0;return lt(Ip,Z({sx:{display:"inline-flex",color:"#F59E0B"},"aria-label":"rating-".concat(a)},{children:Array.from({length:n}).map(function(e,t){return lt(Aw,{width:16,height:16,color:t<a?"#F59E0B":"#D1D5DB"},t)})}))},Ber={DefaultTextCell:Aer,ActionButtonCell:Ter,PredefinedActions:function(e){var t,r,n,o,a,i,s,l,c,u,d,p,h,f=e.actions,m=e.onEdit,v=e.onView,y=e.onDelete,g=e.size,x=void 0===g?"small":g;return ct(Ip,Z({sx:{display:"inline-flex",gap:(null!==(t=null==f?void 0:f.gap)&&void 0!==t?t:8)/16}},{children:[(null===(r=null==f?void 0:f.edit)||void 0===r?void 0:r.enabled)&&lt(Ter,{tooltip:(null===(n=null==f?void 0:f.edit)||void 0===n?void 0:n.tooltip)||"Edit",variant:(null===(o=null==f?void 0:f.edit)||void 0===o?void 0:o.variant)||"outlined",icon:lt(Q3e,{name:(null===(a=null==f?void 0:f.edit)||void 0===a?void 0:a.icon)||"Pencil",size:16}),onClick:m,size:x}),(null===(i=null==f?void 0:f.view)||void 0===i?void 0:i.enabled)&&lt(Ter,{tooltip:(null===(s=null==f?void 0:f.view)||void 0===s?void 0:s.tooltip)||"View",variant:(null===(l=null==f?void 0:f.view)||void 0===l?void 0:l.variant)||"outlined",icon:lt(Q3e,{name:(null===(c=null==f?void 0:f.view)||void 0===c?void 0:c.icon)||"Eye",size:16}),onClick:v,size:x}),(null===(u=null==f?void 0:f.delete)||void 0===u?void 0:u.enabled)&&lt(Ter,{tooltip:(null===(d=null==f?void 0:f.delete)||void 0===d?void 0:d.tooltip)||"Delete",color:"error",variant:(null===(p=null==f?void 0:f.delete)||void 0===p?void 0:p.variant)||"outlined",icon:lt(Q3e,{name:(null===(h=null==f?void 0:f.delete)||void 0===h?void 0:h.icon)||"Trash2",size:16}),onClick:y,size:x})]}))},DateCell:zer,BooleanIconCell:Ner,EmailLinkCell:Fer,PhoneLinkCell:Ier,CurrencyCell:Rer,RatingCell:Ler},Ver=e.memo(function(t){var r,n,o,a,i,s,l,c=t.organismId,u=t.configuration,d=t.loadRows,p=t.onAction;t.emptyState;var h=t.errorState,f=t.rows,m=t.rowCount,v=t.loading,y=t.onQueryChange,g=t.searchValue,x=t.onSearchChange,b=mHt().onInternalNavigation,k=J3e,w=44,_=e.useState(null!=g?g:""),C=_[0],M=_[1],S=e.useState(0),D=S[0],O=S[1],P=e.useState(25),E=P[0],j=P[1],T=e.useState(f||[]),N=T[0],R=T[1],z=e.useState(null!=m?m:0),A=z[0],F=z[1],I=e.useState(Boolean(v)),L=I[0],B=I[1],V=e.useState(null),H=V[0],$=V[1],q=e.useState(null!==(n=null===(r=u.toolbar)||void 0===r?void 0:r.densityDefault)&&void 0!==n?n:"comfortable"),W=q[0],U=q[1],G=e.useState({}),Y=G[0],K=G[1],X=e.useState(!1),te=X[0],re=X[1],ne=e.useState({items:[],logicOperator:"and"}),oe=ne[0],ae=ne[1],ie=e.useMemo(function(){return u.columns.map(function(e){var t,r="component"===e.kind?"__component_".concat(e.id):e.field,n=null!==(t=Ber["component"===e.kind?e.componentRenderer:e.renderer])&&void 0!==t?t:Ber.DefaultTextCell,o="component"===e.kind&&"ActionButtonCell"===e.componentRenderer,a="component"===e.kind&&"PredefinedActions"===e.componentRenderer;return{field:r,headerName:e.headerName,width:e.width,sortable:Boolean(e.sortable),filterable:e.filterable,renderHeader:function(){return ct(Ip,Z({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"}},{children:[lt("span",{children:e.headerName}),e.filterable&&lt(Ql,Z({"aria-label":"open-filter-".concat(r),size:"small",onClick:function(e){var t,n;e.stopPropagation();try{null===(n=(t=le.current).showFilterPanel)||void 0===n||n.call(t,r)}catch(e){}},sx:{ml:.5,color:"#9CA3AF","& svg":{display:"block"}}},{children:lt(k,{iconName:"filter",size:16})}))]}))},renderCell:function(t){var r,i,s;return lt(n,Z({value:t.value,row:t.row},null!==(i=null!==(r=e.rendererProps)&&void 0!==r?r:e.componentProps)&&void 0!==i?i:{},o?{onClick:function(){return null==p?void 0:p({action:e.actionConfig,row:t.row})}}:{},a?{actions:null===(s=e.componentProps)||void 0===s?void 0:s.actions,size:"compact"===W?"small":"medium",onEdit:function(){var r,n,o,a,i,s,l,c,u,d,h,f,m,v=(null===(n=null===(r=e.componentProps)||void 0===r?void 0:r.actions)||void 0===n?void 0:n.idField)||"id",y=t.row[v],g="string"==typeof y?y:String(null!=y?y:""),x=(null===(o=e.rendererProps)||void 0===o?void 0:o.editLink)||(null===(l=null===(s=null===(i=null===(a=e.componentProps)||void 0===a?void 0:a.actions)||void 0===i?void 0:i.edit)||void 0===s?void 0:s.link)||void 0===l?void 0:l.internalLink);if(b&&x){var k=x,w=k.length>0&&!k.endsWith("/"),_=null===(d=null===(u=null===(c=e.componentProps)||void 0===c?void 0:c.actions)||void 0===u?void 0:u.edit)||void 0===d?void 0:d.targetFormId;if(_&&(k="".concat(k).concat(w?"/":"","organismId=").concat(encodeURIComponent(_))),g){var C=k.length>0&&!k.endsWith("/");k="".concat(k).concat(C?"/":"","rwoRecordId=").concat(encodeURIComponent(g))}var M={};return _&&(M.organismId=_),g&&(M.rwoRecordId=g),void b({link:k,query:M})}null==p||p({action:{type:"edit_record",targetFormId:null===(m=null===(f=null===(h=e.componentProps)||void 0===h?void 0:h.actions)||void 0===f?void 0:f.edit)||void 0===m?void 0:m.targetFormId,idField:v},row:t.row})},onView:function(){var r,n,o,a,i,s,l,c,u,d=(null===(n=null===(r=e.componentProps)||void 0===r?void 0:r.actions)||void 0===n?void 0:n.idField)||"id",h=t.row[d],f="string"==typeof h?h:String(null!=h?h:""),m=(null===(s=null===(i=null===(a=null===(o=e.componentProps)||void 0===o?void 0:o.actions)||void 0===a?void 0:a.view)||void 0===i?void 0:i.link)||void 0===s?void 0:s.internalLink)||(null===(u=null===(c=null===(l=e.componentProps)||void 0===l?void 0:l.actions)||void 0===c?void 0:c.view)||void 0===u?void 0:u.routeKey);if(b&&m){var v=m;if(f){var y=v.length>0&&!v.endsWith("/");v="".concat(v).concat(y?"/":"","rwoRecordId=").concat(encodeURIComponent(f))}var g={};return f&&(g.rwoRecordId=f),void b({link:v,query:g})}null==p||p({action:{type:"view_record_details",routeKey:m||"",idField:d},row:t.row})},onDelete:function(){var r,n,o,a,i,s;return null==p?void 0:p({action:{type:"delete_record",apiKey:null!==(a=null===(o=null===(n=null===(r=e.componentProps)||void 0===r?void 0:r.actions)||void 0===n?void 0:n.delete)||void 0===o?void 0:o.apiKey)&&void 0!==a?a:"delete",idField:null===(s=null===(i=e.componentProps)||void 0===i?void 0:i.actions)||void 0===s?void 0:s.idField},row:t.row})}}:{}))}}})},[u.columns,Y]),se=e.useMemo(function(){return(u.columns||[]).map(function(e){return"".concat(("component"===e.kind?e.id:e.field)||"",":").concat(e.headerName||"",":").concat(e.width||"")}).join("|")},[u.columns]),le=jer(),ce=Array.isArray(f)||"number"==typeof m||"boolean"==typeof v,ue=function(){return Q(void 0,void 0,void 0,function(){var e,t;return J(this,function(r){switch(r.label){case 0:if(ce)return[2];B(!0),$(null),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,d(c,{page:D,pageSize:E,search:C,quickFilters:Y})];case 2:return e=r.sent(),R(e.rows),F(e.total),[3,5];case 3:return t=r.sent(),$(t),[3,5];case 4:return B(!1),[7];case 5:return[2]}})})};e.useEffect(function(){ce||ue()},[c,D,E,C,u.columns,Y]),e.useEffect(function(){ce&&(R(f||[]),F(null!=m?m:0),B(Boolean(v)))},[ce,f,m,v]),e.useEffect(function(){"string"==typeof g&&g!==C&&M(g)},[g]),e.useEffect(function(){var e=Object.entries(Y).flatMap(function(e){var t=e[0],r=e[1],n=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean);return 0===n.length?[]:[{field:t,operator:"isAnyOf",value:n}]});ae({items:e,logicOperator:"and"})},[Y]);var de=!1!==(null===(o=u.toolbar)||void 0===o?void 0:o.densityToggle),pe=null!==(i=null===(a=u.toolbar)||void 0===a?void 0:a.quickFilters)&&void 0!==i?i:[],he=!1!==(null===(s=u.toolbar)||void 0===s?void 0:s.search),fe=!1!==(null===(l=u.toolbar)||void 0===l?void 0:l.exportCsv);return H?lt(st,{children:h?h(H):lt(gc,Z({color:"error"},{children:H.message}))}):ct(Ip,{children:[ct(Ip,Z({sx:{display:"grid",gridTemplateColumns:"auto 1fr auto",alignItems:"center",mt:1,columnGap:1}},{children:[lt(Ip,Z({sx:{minWidth:0,overflowX:"auto",pr:1,flexShrink:0}},{children:pe.length>0&&lt(Ip,Z({sx:{display:"inline-flex",alignItems:"center",gap:"8px",px:"6px",py:"4px",borderRadius:"8px",background:"#FAFAFF",whiteSpace:"nowrap"}},{children:pe.map(function(e){var t=Y[e.columnField],r=Array.isArray(t)?t.includes(e.value):t===e.value,n=""===e.value,o=n&&(void 0===t||Array.isArray(t)&&0===t.length);return lt("button",Z({"aria-label":e.label,"aria-pressed":n?o:r,onClick:function(){K(function(t){var r=Z({},t);if(""===e.value)return delete r[e.columnField],r;var n=r[e.columnField];if(Array.isArray(n))if(n.includes(e.value)){var o=n.filter(function(t){return t!==e.value});0===o.length?delete r[e.columnField]:r[e.columnField]=o}else r[e.columnField]=ee(ee([],n,!0),[e.value],!1);else n?n===e.value?delete r[e.columnField]:r[e.columnField]=[n,e.value]:r[e.columnField]=e.value;return r})},style:{height:w,padding:n?"0 14px":"0 12px",border:n||r?"1px solid #E5E7EB":"none",borderRadius:n||r?10:0,background:n||r?"#FFFFFF":"transparent",boxShadow:n&&o||!n&&r?"0 1px 2px rgba(0,0,0,0.06)":void 0,color:r?"#111827":"#6B7280",fontWeight:r||n&&o?700:500,fontSize:13,cursor:"pointer",transition:"transform 80ms ease, box-shadow 120ms ease"},onMouseDown:function(e){var t=e.currentTarget;t.style.transform="translateY(1px)",t.style.boxShadow=n?"0 0 0 rgba(0,0,0,0.0)":t.style.boxShadow},onMouseUp:function(e){e.currentTarget.style.transform="translateY(0)"}},{children:e.label}),e.label)})}))})),lt(Ip,{}),ct(Ip,Z({sx:{display:"inline-flex",alignItems:"center",gap:1.5,flexShrink:0,justifySelf:"end"}},{children:[he&&lt(Ip,Z({sx:{width:te||Boolean(C)?"".concat(360,"px"):"".concat(w,"px"),transition:"width 250ms ease"}},{children:te||Boolean(C)?lt(Gk,{"aria-label":"grid-search",size:"small",value:C,autoFocus:!0,onBlur:function(){C||re(!1)},onChange:function(e){var t=e.target.value;M(t),x&&x(t),y&&y({page:D,pageSize:E,search:t,quickFilters:Y})},placeholder:"Search",fullWidth:!0,sx:{"& .MuiInputBase-root":{height:"".concat(w,"px")},"& .MuiOutlinedInput-input":{py:0},"& .MuiInputAdornment-root svg":{transform:"translate(1px, 0.5px)"}},InputProps:{startAdornment:lt(jm,Z({position:"start"},{children:lt(k,{iconName:"search",size:16})}))}}):lt(Ip,Z({sx:{width:w,height:w}},{children:lt(Ql,Z({"aria-label":"open-search",size:"small",onClick:function(){return re(!0)},sx:{display:"grid",placeItems:"center",lineHeight:0,p:0,width:"100%",height:"100%",borderRadius:2,background:"#FFFFFF",border:"1px solid #E2E4EA",boxShadow:"0 2px 6px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04)",color:"#6C4CF5","& svg":{display:"block",margin:0,transform:"translate(1px, 0.5px)"},"&:hover":{background:"#FFFFFF",borderColor:"#D7DAE2",boxShadow:"0 3px 8px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05)"}}},{children:lt(k,{iconName:"search",size:20})}))}))})),de&&lt(Ip,Z({sx:{background:"#F7F5FF",borderRadius:3,px:1,py:.5,display:"inline-flex",alignItems:"center"}},{children:ct(lw,Z({size:"small",exclusive:!0,value:W,onChange:function(e,t){t&&U(t)},"aria-label":"table-density",sx:{"& .MuiToggleButton-root":{textTransform:"none",height:w,px:2,py:0,fontSize:14,lineHeight:1.2,borderRadius:"10px",border:"none",color:"#6B7280",background:"transparent"},"& .MuiToggleButton-root + .MuiToggleButton-root":{ml:1},"& .MuiToggleButton-root.Mui-selected":{fontWeight:700,color:"#3F3F46",background:"#FFFFFF",border:"1px solid #E2E4EA",boxShadow:"0 2px 6px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06)"}}},{children:[lt(nw,Z({value:"compact","aria-label":"Compact"},{children:"Compact"})),lt(nw,Z({value:"comfortable","aria-label":"Comfortable"},{children:"Comfortable"}))]}))})),fe&&lt(Ql,Z({"aria-label":"export-csv",size:"small",onClick:function(){var e,t;return null===(t=(e=le.current).exportDataAsCsv)||void 0===t?void 0:t.call(e)},sx:{display:"flex",alignItems:"center",justifyContent:"center",lineHeight:0,p:0,width:w,height:w,borderRadius:2,background:"#FFFFFF",border:"1px solid #E2E4EA",boxShadow:"0 2px 6px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04)",color:"#6C4CF5","& svg":{display:"block"},"&:hover":{background:"#FFFFFF",borderColor:"#D7DAE2",boxShadow:"0 3px 8px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05)"}}},{children:lt(k,{iconName:"download",size:20})}))]}))]})),lt(Ip,Z({mt:2},{children:lt(Eer,{apiRef:le,rows:N.map(function(e,t){var r;return Z({id:null!==(r=e.id)&&void 0!==r?r:"".concat(t)},e)}),columns:ie,filterModel:oe,pagination:!0,paginationModel:{page:D,pageSize:E},onPaginationModelChange:function(e){O(e.page),j(e.pageSize),y&&y({page:e.page,pageSize:e.pageSize,search:C,quickFilters:Y})},density:W,loading:L,rowCount:A,paginationMode:"client",disableRowSelectionOnClick:!0,autoHeight:!0,sx:{minHeight:320},slotProps:{loadingOverlay:{variant:"linear-progress",noRowsVariant:"skeleton"}}},se)})),!ce&&lt("button",{"aria-label":"load-rows",onClick:ue})]})});Ver.displayName="DataGridOrganism";var Her=function(e,t,r){var n,o;return void 0===r&&(r="blue"),null!==(o=null===(n=t.find(function(t){return t.status===e}))||void 0===n?void 0:n.color)&&void 0!==o?o:r},$er=function(e,t){return e.map(function(e){return Z(Z({},e),{color:Her(e.status,t)})})},qer=function(e){var t=e.name,r=e.className,n=Z3e[t];return n?lt(n,{className:r}):null},Wer=e.memo(function(t){var r,n=e.useRef(null),o=function(t){var r=t.organismId,n=xHt().stateConfig,o=e.useMemo(function(){var e="calendar:organism:".concat(r),t=null==n?void 0:n[e];return"number"==typeof t?t:0},[n,r]);return{refreshSignal:o}}({organismId:t.organismId}).refreshSignal,a=RVt({initialEvents:t.events||[],onEventAdd:function(e){return Q(void 0,void 0,void 0,function(){var r,n;return J(this,function(o){switch(o.label){case 0:return[4,null===(n=t.onEventCreate)||void 0===n?void 0:n.call(t,e)];case 1:return[2,null!=(r=o.sent())?r:Z(Z({},e),{id:String(Date.now())})]}})})},onEventUpdate:function(e){return Q(void 0,void 0,void 0,function(){var r,n;return J(this,function(o){switch(o.label){case 0:return[4,null===(r=t.onEventUpdate)||void 0===r?void 0:r.call(t,e)];case 1:return[2,null!==(n=o.sent())&&void 0!==n?n:e]}})})},onEventDelete:t.onEventDelete,onDateRangeChange:function(e,r,o){return Q(void 0,void 0,void 0,function(){var o,a,i;return J(this,function(s){switch(s.label){case 0:return n.current={start:e,end:r},t.loadEvents?[4,t.loadEvents(t.organismId,{rangeStart:e.toISOString(),rangeEnd:r.toISOString()})]:[3,2];case 1:return o=s.sent(),[2,$er(o.events,t.configuration.display.colorMap)];case 2:return null===(a=t.onQueryChange)||void 0===a||a.call(t,{rangeStart:e.toISOString(),rangeEnd:r.toISOString()}),[2,null!==(i=t.events)&&void 0!==i?i:[]]}})})}}),i=a.events,s=a.isLoading,l=a.addEvent,c=a.updateEvent,u=a.deleteEvent,d=a.onViewOrDateChange;e.useEffect(function(){if(t.loadEvents&&n.current){var e=n.current,r=e.start,o=e.end;d(r,o)}},[o]);var p=e.useMemo(function(){return{defaultView:t.configuration.display.defaultView,use24HourFormatByDefault:t.configuration.display.use24HourFormatByDefault,overlayIndicators:(e=t.configuration.display.overlayIndicators,e?{maxPerCell:e.maxPerCell,statusClasses:e.statusClasses,showLegend:e.showLegend,icons:e.icons?Object.fromEntries(Object.entries(e.icons).map(function(e){var t=e[0],r=e[1];return[t,{className:r.className,priority:r.priority,showCountBadge:r.showCountBadge,icon:r.iconName?lt(qer,{name:r.iconName,className:r.className}):void 0}]})):void 0}:void 0)};var e},[t.configuration.display]);return lt(NVt,{events:i,isLoading:Boolean(null!==(r=t.loading)&&void 0!==r?r:s),config:p,onEventAdd:l,onEventUpdate:c,onEventDelete:u,onDateRangeChange:d})});Wer.displayName="CalendarOrganism";var Uer=function(e){var t,r=e.children,n=X(e,["children"]);return Z(Z({},n),{items:null!==(t=null==r?void 0:r.map(function(e){return"molecule"===e.instance&&"consent"===e.type?e:"container"===e.instance?Uer(e):e}))&&void 0!==t?t:[]})},Ger={component:"CalendarOrganism",version:"2.0.0",toolGroups:[{id:"eventBindings",tool:"calendarDataRetrieval",titleKey:"config.calendar.group.eventBindings",collapsible:!0,initiallyExpanded:!0,pathBase:"dataRetrievalConfig.bindings.event",toolConfig:{targets:[{captureName:"id",labelKey:"config.calendar.bindings.event.id"},{captureName:"title",labelKey:"config.calendar.bindings.event.title"},{captureName:"startTime",labelKey:"config.calendar.bindings.event.startTime"},{captureName:"endTime",labelKey:"config.calendar.bindings.event.endTime"},{captureName:"status",labelKey:"config.calendar.bindings.event.status"},{captureName:"eventType",labelKey:"config.calendar.bindings.event.eventType"},{captureName:"resourceId",labelKey:"config.calendar.bindings.event.resourceId"},{captureName:"resourceName",labelKey:"config.calendar.bindings.event.resourceName"},{captureName:"visibility",labelKey:"config.calendar.bindings.event.visibility"},{captureName:"color",labelKey:"config.calendar.bindings.event.color"},{captureName:"associatedEntityType",labelKey:"config.calendar.bindings.event.associatedEntityType"},{captureName:"associatedEntityId",labelKey:"config.calendar.bindings.event.associatedEntityId"},{captureName:"conferencingLink",labelKey:"config.calendar.bindings.event.conferencingLink"},{captureName:"meta[$index].token",labelKey:"config.calendar.bindings.event.meta.token"},{captureName:"meta[$index].dataFieldId",labelKey:"config.calendar.bindings.event.meta.fieldId"}]}},{id:"eventFormModal",tool:"custom",titleKey:"config.calendar.group.eventFormModal",collapsible:!0,initiallyExpanded:!0,pathBase:"dataRetrievalConfig.form.modal",fields:[{type:"icon",captureName:"titleIcon",labelKey:"config.calendar.form.modal.titleIcon"},{type:"text",captureName:"i18n.title",labelKey:"config.calendar.form.modal.i18n.title"},{type:"text",captureName:"i18n.description",labelKey:"config.calendar.form.modal.i18n.description"},{type:"text",captureName:"i18n.submitLabel",labelKey:"config.calendar.form.modal.i18n.submit"},{type:"text",captureName:"i18n.cancelLabel",labelKey:"config.calendar.form.modal.i18n.cancel"}]},{id:"display",tool:"custom",titleKey:"config.calendar.group.display",collapsible:!0,initiallyExpanded:!0,pathBase:"display",fields:[{type:"select",captureName:"defaultView",labelKey:"config.calendar.display.defaultView",options:[{id:"day",labelKey:"config.calendar.display.view.day"},{id:"week",labelKey:"config.calendar.display.view.week"},{id:"month",labelKey:"config.calendar.display.view.month"},{id:"year",labelKey:"config.calendar.display.view.year"}]},{type:"switch",captureName:"use24HourFormatByDefault",labelKey:"config.calendar.display.use24HourFormat",defaultValue:!1},{type:"color",captureName:"statusColors.tentative",labelKey:"config.calendar.status.tentative"},{type:"color",captureName:"statusColors.confirmed",labelKey:"config.calendar.status.confirmed"},{type:"color",captureName:"statusColors.completed",labelKey:"config.calendar.status.completed"},{type:"color",captureName:"statusColors.cancelled",labelKey:"config.calendar.status.cancelled"}]},{id:"overlays",tool:"custom",titleKey:"config.calendar.group.overlays",collapsible:!0,initiallyExpanded:!1,pathBase:"display.overlayIndicators",fields:[{type:"number",captureName:"maxPerCell",labelKey:"config.calendar.overlayIndicators.maxPerCell"},{type:"switch",captureName:"showLegend",labelKey:"config.calendar.overlayIndicators.showLegend",defaultValue:!1},{type:"text",captureName:"statusClasses.ok",labelKey:"config.calendar.overlayIndicators.status.ok"},{type:"text",captureName:"statusClasses.info",labelKey:"config.calendar.overlayIndicators.status.info"},{type:"text",captureName:"statusClasses.warning",labelKey:"config.calendar.overlayIndicators.status.warning"},{type:"text",captureName:"statusClasses.danger",labelKey:"config.calendar.overlayIndicators.status.danger"}]}]},Yer={calendar:Ger},Ker={config:{isInitialized:!0},traits:{isDocker:!1,isCI:!1,machineId:null,projectId:"b28c94b2195c8ed259f0b415aaee3f39b0b2920a4537611499fa044956917a21",sessionId:"b446c79c907575faea9bf8f645f7f409ab7cdfa9cc119baf4444c12c2db9bf1e",anonymousId:"6c93d6e1c180e6b6bb382c3abcee40610d63bad23bdfc96ea9dc52a5eb06f242"}};function Zer(e){return"__mui_x_telemetry_"+btoa(e)}function Xer(e,t,r){try{if("undefined"!=typeof window&&window[e])return window[e].setItem(Zer(t),r),!0}catch(e){}return!1}function Qer(e,t){try{if("undefined"!=typeof window&&window[e])return window[e].getItem(Zer(t))}catch(e){}return null}function Jer(e){let t="";const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n=0;for(;n<e;)t+=r.charAt(Math.floor(62*Math.random())),n+=1;return t}const etr="undefined"==typeof window||"test"===process.env.NODE_ENV?()=>{}:async()=>{const e="fingerprint";try{const t=Qer("localStorage",e);if(t)return JSON.parse(t);const r=await Promise.resolve().then(function(){return lrr}),n=await r.load({monitoring:!1}),o=S({},(await n.get()).components);delete o.cookiesEnabled;const a=r.hashComponents(o),i=r.hashComponents(S({},function(e,t){return t.reduce((t,r)=>(t[r]=e[r],t),{})}(o,["fonts","audio","languages","deviceMemory","timezone","sessionStorage","localStorage","indexedDB","openDatabase","platform","canvas","vendor","vendorFlavors","colorGamut","forcedColors","monochrome","contrast","reducedMotion","math","videoCard","architecture"]))),s={fullHash:a,coreHash:i};return Xer("localStorage",e,JSON.stringify(s)),s}catch(e){return null}};var ttr=Object.freeze({__proto__:null,default:async function(){return Ker.traits.sessionId=function(){const e="session_id",t=Qer("sessionStorage",e);if(t)return t;const r=`sesid_${Jer(32)}`;return Xer("sessionStorage",e,r)?r:`sestp_${Jer(32)}`}(),Ker.config.isInitialized||(Ker.traits.anonymousId=function(){const e="anonymous_id",t=Qer("localStorage",e);if(t)return t;const r=`anid_${Jer(32)}`;return Xer("localStorage",e,r)?r:""}(),Ker.config.isInitialized=!0),Ker.traits.fingerprint||(Ker.traits.fingerprint=await etr()),Ker}}),rtr="3.4.2";function ntr(e,t){return new Promise(function(r){return setTimeout(r,e,t)})}function otr(e){return!!e&&"function"==typeof e.then}function atr(e,t){try{var r=e();otr(r)?r.then(function(e){return t(!0,e)},function(e){return t(!1,e)}):t(!0,r)}catch(e){t(!1,e)}}function itr(e,t,r){return void 0===r&&(r=16),Q(this,void 0,void 0,function(){var n,o,a,i;return J(this,function(s){switch(s.label){case 0:n=Array(e.length),o=Date.now(),a=0,s.label=1;case 1:return a<e.length?(n[a]=t(e[a],a),(i=Date.now())>=o+r?(o=i,[4,ntr(0)]):[3,3]):[3,4];case 2:s.sent(),s.label=3;case 3:return++a,[3,1];case 4:return[2,n]}})})}function str(e){e.then(void 0,function(){})}function ltr(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]+t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function ctr(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]*t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function utr(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])}function dtr(e,t){return 0===(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function ptr(e,t){return[e[0]^t[0],e[1]^t[1]]}function htr(e){return e=ptr(e,[0,e[0]>>>1]),e=ptr(e=ctr(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=ptr(e=ctr(e,[3301882366,444984403]),[0,e[0]>>>1])}function ftr(e,t){t=t||0;var r,n=(e=e||"").length%16,o=e.length-n,a=[0,t],i=[0,t],s=[0,0],l=[0,0],c=[2277735313,289559509],u=[1291169091,658871167];for(r=0;r<o;r+=16)s=[255&e.charCodeAt(r+4)|(255&e.charCodeAt(r+5))<<8|(255&e.charCodeAt(r+6))<<16|(255&e.charCodeAt(r+7))<<24,255&e.charCodeAt(r)|(255&e.charCodeAt(r+1))<<8|(255&e.charCodeAt(r+2))<<16|(255&e.charCodeAt(r+3))<<24],l=[255&e.charCodeAt(r+12)|(255&e.charCodeAt(r+13))<<8|(255&e.charCodeAt(r+14))<<16|(255&e.charCodeAt(r+15))<<24,255&e.charCodeAt(r+8)|(255&e.charCodeAt(r+9))<<8|(255&e.charCodeAt(r+10))<<16|(255&e.charCodeAt(r+11))<<24],s=utr(s=ctr(s,c),31),a=ltr(a=utr(a=ptr(a,s=ctr(s,u)),27),i),a=ltr(ctr(a,[0,5]),[0,1390208809]),l=utr(l=ctr(l,u),33),i=ltr(i=utr(i=ptr(i,l=ctr(l,c)),31),a),i=ltr(ctr(i,[0,5]),[0,944331445]);switch(s=[0,0],l=[0,0],n){case 15:l=ptr(l,dtr([0,e.charCodeAt(r+14)],48));case 14:l=ptr(l,dtr([0,e.charCodeAt(r+13)],40));case 13:l=ptr(l,dtr([0,e.charCodeAt(r+12)],32));case 12:l=ptr(l,dtr([0,e.charCodeAt(r+11)],24));case 11:l=ptr(l,dtr([0,e.charCodeAt(r+10)],16));case 10:l=ptr(l,dtr([0,e.charCodeAt(r+9)],8));case 9:l=ctr(l=ptr(l,[0,e.charCodeAt(r+8)]),u),i=ptr(i,l=ctr(l=utr(l,33),c));case 8:s=ptr(s,dtr([0,e.charCodeAt(r+7)],56));case 7:s=ptr(s,dtr([0,e.charCodeAt(r+6)],48));case 6:s=ptr(s,dtr([0,e.charCodeAt(r+5)],40));case 5:s=ptr(s,dtr([0,e.charCodeAt(r+4)],32));case 4:s=ptr(s,dtr([0,e.charCodeAt(r+3)],24));case 3:s=ptr(s,dtr([0,e.charCodeAt(r+2)],16));case 2:s=ptr(s,dtr([0,e.charCodeAt(r+1)],8));case 1:s=ctr(s=ptr(s,[0,e.charCodeAt(r)]),c),a=ptr(a,s=ctr(s=utr(s,31),u))}return a=ltr(a=ptr(a,[0,e.length]),i=ptr(i,[0,e.length])),i=ltr(i,a),a=ltr(a=htr(a),i=htr(i)),i=ltr(i,a),("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(i[0]>>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)}function mtr(e){return parseInt(e)}function vtr(e){return parseFloat(e)}function ytr(e,t){return"number"==typeof e&&isNaN(e)?t:e}function gtr(e){return e.reduce(function(e,t){return e+(t?1:0)},0)}function xtr(e,t){if(void 0===t&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var r=1/t;return Math.round(e*r)/r}function btr(e){return e&&"object"==typeof e&&"message"in e?e:{message:e}}function ktr(e){return"function"!=typeof e}function wtr(e,t,r){var n=Object.keys(e).filter(function(e){return!function(e,t){for(var r=0,n=e.length;r<n;++r)if(e[r]===t)return!0;return!1}(r,e)}),o=itr(n,function(r){return function(e,t){var r=new Promise(function(r){var n=Date.now();atr(e.bind(null,t),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=Date.now()-n;if(!e[0])return r(function(){return{error:btr(e[1]),duration:o}});var a=e[1];if(ktr(a))return r(function(){return{value:a,duration:o}});r(function(){return new Promise(function(e){var t=Date.now();atr(a,function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=o+Date.now()-t;if(!r[0])return e({error:btr(r[1]),duration:a});e({value:r[1],duration:a})})})})})});return str(r),function(){return r.then(function(e){return e()})}}(e[r],t)});return str(o),function(){return Q(this,void 0,void 0,function(){var e,t,r,a;return J(this,function(i){switch(i.label){case 0:return[4,o];case 1:return[4,itr(i.sent(),function(e){var t=e();return str(t),t})];case 2:return e=i.sent(),[4,Promise.all(e)];case 3:for(t=i.sent(),r={},a=0;a<n.length;++a)r[n[a]]=t[a];return[2,r]}})})}}function _tr(){var e=window,t=navigator;return gtr(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function Ctr(){var e=window,t=navigator;return gtr(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!_tr()}function Mtr(){var e=window,t=navigator;return gtr(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,0===t.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function Str(){var e=window,t=navigator;return gtr(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===t.vendor.indexOf("Apple"),"getStorageUpdates"in t,"WebKitMediaKeys"in e])>=4}function Dtr(){var e=window;return gtr(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function Otr(){var e,t,r=window;return gtr(["buildID"in navigator,"MozAppearance"in(null!==(t=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==t?t:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4}function Ptr(){var e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function Etr(){var e=Mtr(),t=Otr();if(!e&&!t)return!1;var r=window;return gtr(["onorientationchange"in r,"orientation"in r,e&&!("SharedWorker"in r),t&&/android/i.test(navigator.appVersion)])>=2}function jtr(e){var t=new Error(e);return t.name=e,t}function Ttr(e,t,r){var n,o,a;return void 0===r&&(r=50),Q(this,void 0,void 0,function(){var i,s;return J(this,function(l){switch(l.label){case 0:i=document,l.label=1;case 1:return i.body?[3,3]:[4,ntr(r)];case 2:return l.sent(),[3,1];case 3:s=i.createElement("iframe"),l.label=4;case 4:return l.trys.push([4,,10,11]),[4,new Promise(function(e,r){var n=!1,o=function(){n=!0,e()};s.onload=o,s.onerror=function(e){n=!0,r(e)};var a=s.style;a.setProperty("display","block","important"),a.position="absolute",a.top="0",a.left="0",a.visibility="hidden",t&&"srcdoc"in s?s.srcdoc=t:s.src="about:blank",i.body.appendChild(s);var l=function(){var e,t;n||("complete"===(null===(t=null===(e=s.contentWindow)||void 0===e?void 0:e.document)||void 0===t?void 0:t.readyState)?o():setTimeout(l,10))};l()})];case 5:l.sent(),l.label=6;case 6:return(null===(o=null===(n=s.contentWindow)||void 0===n?void 0:n.document)||void 0===o?void 0:o.body)?[3,8]:[4,ntr(r)];case 7:return l.sent(),[3,6];case 8:return[4,e(s,s.contentWindow)];case 9:return[2,l.sent()];case 10:return null===(a=s.parentNode)||void 0===a||a.removeChild(s),[7];case 11:return[2]}})})}function Ntr(e){for(var t=function(e){for(var t,r,n="Unexpected syntax '".concat(e,"'"),o=/^\s*([a-z-]*)(.*)$/i.exec(e),a=o[1]||void 0,i={},s=/([.:#][\w-]+|\[.+?\])/gi,l=function(e,t){i[e]=i[e]||[],i[e].push(t)};;){var c=s.exec(o[2]);if(!c)break;var u=c[0];switch(u[0]){case".":l("class",u.slice(1));break;case"#":l("id",u.slice(1));break;case"[":var d=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(u);if(!d)throw new Error(n);l(d[1],null!==(r=null!==(t=d[4])&&void 0!==t?t:d[5])&&void 0!==r?r:"");break;default:throw new Error(n)}}return[a,i]}(e),r=t[0],n=t[1],o=document.createElement(null!=r?r:"div"),a=0,i=Object.keys(n);a<i.length;a++){var s=i[a],l=n[s].join(" ");"style"===s?Rtr(o.style,l):o.setAttribute(s,l)}return o}function Rtr(e,t){for(var r=0,n=t.split(";");r<n.length;r++){var o=n[r],a=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(o);if(a){var i=a[1],s=a[2],l=a[4];e.setProperty(i,s,l||"")}}}var ztr=["monospace","sans-serif","serif"],Atr=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function Ftr(e){return e.toDataURL()}var Itr,Ltr;function Btr(){var e=this;return function(){if(void 0===Ltr){var e=function(){var t=Vtr();Htr(t)?Ltr=setTimeout(e,2500):(Itr=t,Ltr=void 0)};e()}}(),function(){return Q(e,void 0,void 0,function(){var e;return J(this,function(t){switch(t.label){case 0:return Htr(e=Vtr())?Itr?[2,ee([],Itr,!0)]:Ptr()?[4,(r=document,(r.exitFullscreen||r.msExitFullscreen||r.mozCancelFullScreen||r.webkitExitFullscreen).call(r))]:[3,2]:[3,2];case 1:t.sent(),e=Vtr(),t.label=2;case 2:return Htr(e)||(Itr=e),[2,e]}var r})})}}function Vtr(){var e=screen;return[ytr(vtr(e.availTop),null),ytr(vtr(e.width)-vtr(e.availWidth)-ytr(vtr(e.availLeft),0),null),ytr(vtr(e.height)-vtr(e.availHeight)-ytr(vtr(e.availTop),0),null),ytr(vtr(e.availLeft),null)]}function Htr(e){for(var t=0;t<4;++t)if(e[t])return!1;return!0}function $tr(e){var t;return Q(this,void 0,void 0,function(){var r,n,o,a,i,s,l;return J(this,function(c){switch(c.label){case 0:for(r=document,n=r.createElement("div"),o=new Array(e.length),a={},qtr(n),l=0;l<e.length;++l)"DIALOG"===(i=Ntr(e[l])).tagName&&i.show(),qtr(s=r.createElement("div")),s.appendChild(i),n.appendChild(s),o[l]=i;c.label=1;case 1:return r.body?[3,3]:[4,ntr(50)];case 2:return c.sent(),[3,1];case 3:r.body.appendChild(n);try{for(l=0;l<e.length;++l)o[l].offsetParent||(a[e[l]]=!0)}finally{null===(t=n.parentNode)||void 0===t||t.removeChild(n)}return[2,a]}})})}function qtr(e){e.style.setProperty("display","block","important")}function Wtr(e){return matchMedia("(inverted-colors: ".concat(e,")")).matches}function Utr(e){return matchMedia("(forced-colors: ".concat(e,")")).matches}function Gtr(e){return matchMedia("(prefers-contrast: ".concat(e,")")).matches}function Ytr(e){return matchMedia("(prefers-reduced-motion: ".concat(e,")")).matches}function Ktr(e){return matchMedia("(dynamic-range: ".concat(e,")")).matches}var Ztr=Math,Xtr=function(){return 0};var Qtr={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};var Jtr={fonts:function(){return Ttr(function(e,t){var r=t.document,n=r.body;n.style.fontSize="48px";var o=r.createElement("div"),a={},i={},s=function(e){var t=r.createElement("span"),n=t.style;return n.position="absolute",n.top="0",n.left="0",n.fontFamily=e,t.textContent="mmMwWLliI0O&1",o.appendChild(t),t},l=ztr.map(s),c=function(){for(var e={},t=function(t){e[t]=ztr.map(function(e){return function(e,t){return s("'".concat(e,"',").concat(t))}(t,e)})},r=0,n=Atr;r<n.length;r++){t(n[r])}return e}();n.appendChild(o);for(var u=0;u<ztr.length;u++)a[ztr[u]]=l[u].offsetWidth,i[ztr[u]]=l[u].offsetHeight;return Atr.filter(function(e){return t=c[e],ztr.some(function(e,r){return t[r].offsetWidth!==a[e]||t[r].offsetHeight!==i[e]});var t})})},domBlockers:function(e){var t=(void 0===e?{}:e).debug;return Q(this,void 0,void 0,function(){var e,r,n,o,a;return J(this,function(i){switch(i.label){case 0:return Str()||Etr()?(s=atob,e={abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',s("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",s("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",s("LnNwb25zb3JpdA=="),".ylamainos",s("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),s("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",s("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",s("LmhlYWRlci1ibG9ja2VkLWFk"),s("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",s("I2FkXzMwMFgyNTA="),s("I2Jhbm5lcmZsb2F0MjI="),s("I2NhbXBhaWduLWJhbm5lcg=="),s("I0FkLUNvbnRlbnQ=")],adGuardChinese:[s("LlppX2FkX2FfSA=="),s("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",s("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),s("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",s("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",s("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",s("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),s("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),s("LmFkZ29vZ2xl"),s("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[s("YW1wLWF1dG8tYWRz"),s("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",s("I2FkX2ludmlld19hcmVh")],adGuardRussian:[s("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),s("LnJlY2xhbWE="),'div[id^="smi2adblock"]',s("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[s("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),s("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",s("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),s("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),s("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",s("I3Jla2xhbWk="),s("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),s("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),s("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[s("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",s("LndpZGdldF9wb19hZHNfd2lkZ2V0"),s("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",s("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[s("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),s("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",s("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",s("I3Jla2xhbW5pLWJveA=="),s("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",s("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[s("I2FkdmVydGVudGll"),s("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",s("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",s("LnNwb25zb3JsaW5rZ3J1ZW4="),s("I3dlcmJ1bmdza3k="),s("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),s("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[s("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",s("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),s("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),s("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[s("LnJla2xhbW9zX3RhcnBhcw=="),s("LnJla2xhbW9zX251b3JvZG9z"),s("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),s("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),s("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[s("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[s("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),s("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",s("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[s("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),s("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),s("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",s("LmFkX19tYWlu"),s("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[s("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[s("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),s("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[s("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),s("I2xpdmVyZUFkV3JhcHBlcg=="),s("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),s("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[s("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",s("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),s("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),s("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[s("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),s("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),s("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",s("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),s("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),s("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="),s("ZGl2I3NrYXBpZWNfYWQ=")],ro:[s("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),s("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),s("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),s("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[s("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),s("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),s("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",s("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),s("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",s("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]},r=Object.keys(e),[4,$tr((a=[]).concat.apply(a,r.map(function(t){return e[t]})))]):[2,void 0];case 1:return n=i.sent(),t&&function(e,t){for(var r="DOM blockers debug:\n```",n=0,o=Object.keys(e);n<o.length;n++){var a=o[n];r+="\n".concat(a,":");for(var i=0,s=e[a];i<s.length;i++){var l=s[i];r+="\n ".concat(t[l]?"🚫":"➡️"," ").concat(l)}}console.log("".concat(r,"\n```"))}(e,n),(o=r.filter(function(t){var r=e[t];return gtr(r.map(function(e){return n[e]}))>.6*r.length})).sort(),[2,o]}var s})})},fontPreferences:function(){return function(e,t){void 0===t&&(t=4e3);return Ttr(function(r,n){var o=n.document,a=o.body,i=a.style;i.width="".concat(t,"px"),i.webkitTextSizeAdjust=i.textSizeAdjust="none",Mtr()?a.style.zoom="".concat(1/n.devicePixelRatio):Str()&&(a.style.zoom="reset");var s=o.createElement("div");return s.textContent=ee([],Array(t/20|0),!0).map(function(){return"word"}).join(" "),a.appendChild(s),e(o,a)},'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}(function(e,t){for(var r={},n={},o=0,a=Object.keys(Qtr);o<a.length;o++){var i=a[o],s=Qtr[i],l=s[0],c=void 0===l?{}:l,u=s[1],d=void 0===u?"mmMwWLliI0fiflO&1":u,p=e.createElement("span");p.textContent=d,p.style.whiteSpace="nowrap";for(var h=0,f=Object.keys(c);h<f.length;h++){var m=f[h],v=c[m];void 0!==v&&(p.style[m]=v)}r[i]=p,t.appendChild(e.createElement("br")),t.appendChild(p)}for(var y=0,g=Object.keys(Qtr);y<g.length;y++){n[i=g[y]]=r[i].getBoundingClientRect().width}return n})},audio:function(){var e=window,t=e.OfflineAudioContext||e.webkitOfflineAudioContext;if(!t)return-2;if(Str()&&!Dtr()&&!function(){var e=window;return gtr(["DOMRectList"in e,"RTCPeerConnectionIceEvent"in e,"SVGGeometryElement"in e,"ontransitioncancel"in e])>=3}())return-1;var r=new t(1,5e3,44100),n=r.createOscillator();n.type="triangle",n.frequency.value=1e4;var o=r.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,n.connect(o),o.connect(r.destination),n.start(0);var a=function(e){var t=3,r=500,n=500,o=5e3,a=function(){},i=new Promise(function(i,s){var l=!1,c=0,u=0;e.oncomplete=function(e){return i(e.renderedBuffer)};var d=function(){setTimeout(function(){return s(jtr("timeout"))},Math.min(n,u+o-Date.now()))},p=function(){try{var n=e.startRendering();switch(otr(n)&&str(n),e.state){case"running":u=Date.now(),l&&d();break;case"suspended":document.hidden||c++,l&&c>=t?s(jtr("suspended")):setTimeout(p,r)}}catch(e){s(e)}};p(),a=function(){l||(l=!0,u>0&&d())}});return[i,a]}(r),i=a[0],s=a[1],l=i.then(function(e){return function(e){for(var t=0,r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}(e.getChannelData(0).subarray(4500))},function(e){if("timeout"===e.name||"suspended"===e.name)return-3;throw e});return str(l),function(){return s(),l}},screenFrame:function(){var e=this,t=Btr();return function(){return Q(e,void 0,void 0,function(){var e,r;return J(this,function(n){switch(n.label){case 0:return[4,t()];case 1:return e=n.sent(),[2,[(r=function(e){return null===e?null:xtr(e,10)})(e[0]),r(e[1]),r(e[2]),r(e[3])]]}})})}},osCpu:function(){return navigator.oscpu},languages:function(){var e,t=navigator,r=[],n=t.language||t.userLanguage||t.browserLanguage||t.systemLanguage;if(void 0!==n&&r.push([n]),Array.isArray(t.languages))Mtr()&&gtr([!("MediaSettingsRange"in(e=window)),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3||r.push(t.languages);else if("string"==typeof t.languages){var o=t.languages;o&&r.push(o.split(","))}return r},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return ytr(vtr(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,t=function(e){return ytr(mtr(e),null)},r=[t(e.width),t(e.height)];return r.sort().reverse(),r},hardwareConcurrency:function(){return ytr(mtr(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,t=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(t){var r=(new t).resolvedOptions().timeZone;if(r)return r}var n,o=(n=(new Date).getFullYear(),-Math.max(vtr(new Date(n,0,1).getTimezoneOffset()),vtr(new Date(n,6,1).getTimezoneOffset())));return"UTC".concat(o>=0?"+":"").concat(Math.abs(o))},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!_tr()&&!Ctr())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return"MacIntel"===e&&Str()&&!Dtr()?function(){if("iPad"===navigator.platform)return!0;var e=screen,t=e.width/e.height;return gtr(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],r=0;r<e.length;++r){var n=e[r];if(n){for(var o=[],a=0;a<n.length;++a){var i=n[a];o.push({type:i.type,suffixes:i.suffixes})}t.push({name:n.name,description:n.description,mimeTypes:o})}}return t}},canvas:function(){var e,t,r=!1,n=function(){var e=document.createElement("canvas");return e.width=1,e.height=1,[e,e.getContext("2d")]}(),o=n[0],a=n[1];if(function(e,t){return!(!t||!e.toDataURL)}(o,a)){r=function(e){return e.rect(0,0,10,10),e.rect(2,2,6,6),!e.isPointInPath(5,5,"evenodd")}(a),function(e,t){e.width=240,e.height=60,t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(100,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"';var r="Cwm fjordbank gly ".concat(String.fromCharCode(55357,56835));t.fillText(r,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t.font="18pt Arial",t.fillText(r,4,45)}(o,a);var i=Ftr(o);i!==Ftr(o)?e=t="unstable":(t=i,function(e,t){e.width=122,e.height=110,t.globalCompositeOperation="multiply";for(var r=0,n=[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]];r<n.length;r++){var o=n[r],a=o[0],i=o[1],s=o[2];t.fillStyle=a,t.beginPath(),t.arc(i,s,40,0,2*Math.PI,!0),t.closePath(),t.fill()}t.fillStyle="#f9c",t.arc(60,60,60,0,2*Math.PI,!0),t.arc(60,60,20,0,2*Math.PI,!0),t.fill("evenodd")}(o,a),e=Ftr(o))}else e=t="";return{winding:r,geometry:e,text:t}},touchSupport:function(){var e,t=navigator,r=0;void 0!==t.maxTouchPoints?r=mtr(t.maxTouchPoints):void 0!==t.msMaxTouchPoints&&(r=t.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return{maxTouchPoints:r,touchEvent:e,touchStart:"ontouchstart"in window}},vendor:function(){return navigator.vendor||""},vendorFlavors:function(){for(var e=[],t=0,r=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];t<r.length;t++){var n=r[t],o=window[n];o&&"object"==typeof o&&e.push(n)}return e.sort()},cookiesEnabled:function(){var e=document;try{e.cookie="cookietest=1; SameSite=Strict;";var t=-1!==e.cookie.indexOf("cookietest=");return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch(e){return!1}},colorGamut:function(){for(var e=0,t=["rec2020","p3","srgb"];e<t.length;e++){var r=t[e];if(matchMedia("(color-gamut: ".concat(r,")")).matches)return r}},invertedColors:function(){return!!Wtr("inverted")||!Wtr("none")&&void 0},forcedColors:function(){return!!Utr("active")||!Utr("none")&&void 0},monochrome:function(){if(matchMedia("(min-monochrome: 0)").matches){for(var e=0;e<=100;++e)if(matchMedia("(max-monochrome: ".concat(e,")")).matches)return e;throw new Error("Too high value")}},contrast:function(){return Gtr("no-preference")?0:Gtr("high")||Gtr("more")?1:Gtr("low")||Gtr("less")?-1:Gtr("forced")?10:void 0},reducedMotion:function(){return!!Ytr("reduce")||!Ytr("no-preference")&&void 0},hdr:function(){return!!Ktr("high")||!Ktr("standard")&&void 0},math:function(){var e,t=Ztr.acos||Xtr,r=Ztr.acosh||Xtr,n=Ztr.asin||Xtr,o=Ztr.asinh||Xtr,a=Ztr.atanh||Xtr,i=Ztr.atan||Xtr,s=Ztr.sin||Xtr,l=Ztr.sinh||Xtr,c=Ztr.cos||Xtr,u=Ztr.cosh||Xtr,d=Ztr.tan||Xtr,p=Ztr.tanh||Xtr,h=Ztr.exp||Xtr,f=Ztr.expm1||Xtr,m=Ztr.log1p||Xtr;return{acos:t(.12312423423423424),acosh:r(1e308),acoshPf:(e=1e154,Ztr.log(e+Ztr.sqrt(e*e-1))),asin:n(.12312423423423424),asinh:o(1),asinhPf:function(e){return Ztr.log(e+Ztr.sqrt(e*e+1))}(1),atanh:a(.5),atanhPf:function(e){return Ztr.log((1+e)/(1-e))/2}(.5),atan:i(.5),sin:s(-1e300),sinh:l(1),sinhPf:function(e){return Ztr.exp(e)-1/Ztr.exp(e)/2}(1),cos:c(10.000000000123),cosh:u(1),coshPf:function(e){return(Ztr.exp(e)+1/Ztr.exp(e))/2}(1),tan:d(-1e300),tanh:p(1),tanhPf:function(e){return(Ztr.exp(2*e)-1)/(Ztr.exp(2*e)+1)}(1),exp:h(1),expm1:f(1),expm1Pf:function(e){return Ztr.exp(e)-1}(1),log1p:m(10),log1pPf:function(e){return Ztr.log(1+e)}(10),powPI:function(e){return Ztr.pow(Ztr.PI,e)}(-100)}},videoCard:function(){var e,t=document.createElement("canvas"),r=null!==(e=t.getContext("webgl"))&&void 0!==e?e:t.getContext("experimental-webgl");if(r&&"getExtension"in r){var n=r.getExtension("WEBGL_debug_renderer_info");if(n)return{vendor:(r.getParameter(n.UNMASKED_VENDOR_WEBGL)||"").toString(),renderer:(r.getParameter(n.UNMASKED_RENDERER_WEBGL)||"").toString()}}},pdfViewerEnabled:function(){return navigator.pdfViewerEnabled},architecture:function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}};function err(e){var t=function(e){if(Etr())return.4;if(Str())return Dtr()?.5:.3;var t=e.platform.value||"";if(/^Win/.test(t))return.6;if(/^Mac/.test(t))return.5;return.7}(e),r=function(e){return xtr(.99+.01*e,1e-4)}(t);return{score:t,comment:"$ if upgrade to Pro: https://fpjs.dev/pro".replace(/\$/g,"".concat(r))}}function trr(e){return JSON.stringify(e,function(e,t){return t instanceof Error?function(e){var t;return Z({name:e.name,message:e.message,stack:null===(t=e.stack)||void 0===t?void 0:t.split("\n")},e)}(t):t},2)}function rrr(e){return ftr(function(e){for(var t="",r=0,n=Object.keys(e).sort();r<n.length;r++){var o=n[r],a=e[o],i=a.error?"error":JSON.stringify(a.value);t+="".concat(t?"|":"").concat(o.replace(/([:|\\])/g,"\\$1"),":").concat(i)}return t}(e))}function nrr(e){return void 0===e&&(e=50),function(e,t){void 0===t&&(t=1/0);var r=window.requestIdleCallback;return r?new Promise(function(e){return r.call(window,function(){return e()},{timeout:t})}):ntr(Math.min(e,t))}(e,2*e)}function orr(e,t){var r=Date.now();return{get:function(n){return Q(this,void 0,void 0,function(){var o,a,i;return J(this,function(s){switch(s.label){case 0:return o=Date.now(),[4,e()];case 1:return a=s.sent(),i=function(e){var t,r=err(e);return{get visitorId(){return void 0===t&&(t=rrr(this.components)),t},set visitorId(e){t=e},confidence:r,components:e,version:rtr}}(a),(t||(null==n?void 0:n.debug))&&console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(i.version,"\nuserAgent: ").concat(navigator.userAgent,"\ntimeBetweenLoadAndGet: ").concat(o-r,"\nvisitorId: ").concat(i.visitorId,"\ncomponents: ").concat(trr(a),"\n```")),[2,i]}})})}}}function arr(e){var t=void 0===e?{}:e,r=t.delayFallback,n=t.debug,o=t.monitoring,a=void 0===o||o;return Q(this,void 0,void 0,function(){var e;return J(this,function(t){switch(t.label){case 0:return a&&function(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/fingerprintjs/v".concat(rtr,"/npm-monitoring"),!0),e.send()}catch(e){console.error(e)}}(),[4,nrr(r)];case 1:return t.sent(),e=function(e){return wtr(Jtr,e,[])}({debug:n}),[2,orr(e,n)]}})})}var irr={load:arr,hashComponents:rrr,componentsToDebugString:trr},srr=ftr,lrr=Object.freeze({__proto__:null,componentsToDebugString:trr,default:irr,getFullscreenElement:Ptr,getScreenFrame:Btr,hashComponents:rrr,isAndroid:Etr,isChromium:Mtr,isDesktopSafari:Dtr,isEdgeHTML:Ctr,isGecko:Otr,isTrident:_tr,isWebKit:Str,load:arr,loadSources:wtr,murmurX64Hash128:srr,prepareForSources:nrr,sources:Jtr,transformSource:function(e,t){var r=function(e){return ktr(e)?t(e):function(){var r=e();return otr(r)?r.then(t):t(r)}};return function(t){var n=e(t);return otr(n)?n.then(r):r(n)}},withIframe:Ttr});exports.AccountButtonContext=vHt,exports.AccountButtonProvider=yHt,exports.ActionButtonCell=Ter,exports.AlertMolecule=e6e,exports.ApiContext=wHt,exports.ApiProvider=function(e){var t=e.api,r=e.children;return lt(wHt.Provider,Z({value:t},{children:r}))},exports.AvatarTextCell=function(e){var t,r,n=e.row,o=e.avatarField,a=e.textField,i=String(null!==(t=n[o])&&void 0!==t?t:"")||void 0,s=String(null!==(r=n[a])&&void 0!==r?r:"");return ct(Ip,Z({sx:{display:"flex",alignItems:"center"}},{children:[lt(yp,{src:i,sx:{width:24,height:24,mr:1}}),lt(gc,Z({variant:"body2"},{children:s}))]}))},exports.BackgroundImage=_C,exports.BadgeMolecule=t6e,exports.BaseMolecule=cHt,exports.BaseTextButton=i_,exports.BasicTextField=n6e,exports.BinaryRadioButtons=Ust,exports.BooleanIconCell=Ner,exports.Button=o6e,exports.ButtonActionsContext=ST,exports.ButtonActionsProvider=function(t){var r,n,o,a=t.children,i=t.popupProps,s=mHt().localStateObject,l=xHt().stateConfig,c=s||l,u=e.useState({}),d=u[0],p=u[1],h=e.useState(!1),f=h[0],m=h[1],v=e.useState(!1),y=v[0],g=v[1],x=e.useState(null),b=x[0],k=x[1],w=ET().onStateChange,_=function(e){var t=null==i?void 0:i.find(function(t){return t.id===e});k(t||null),m(!0),w({id:e,type:"opened"})};e.useEffect(function(){null==i||i.forEach(function(e){var t;(null===(t=c[e.id])||void 0===t?void 0:t.visible)&&_(e.id)})},[c]);var C=function(e){k(null),m(!1),w({id:e,type:"closed"})},M=function(){g(!1)};lt(hHt,{item:d});var S=e.useMemo(function(){return{actionContent:d,setActionContent:p,isModalVisible:f,isDrawerVisible:y,setDrawerVisible:g,setActivePopUpById:_,onCloseDrawer:M,onCloseModal:C}},[d,p,f,y,g,_,M,C]),D=b||{},O=D.config,P=D.content;return ct(ST.Provider,Z({value:S},{children:[b&&f&&ct($st,Z({size:null==O?void 0:O.size,open:f,onClose:function(){return C(b.id)},popupId:b.id,modalStyles:null==O?void 0:O.styles,withCloseIcon:null==O?void 0:O.withCloseIcon},{children:[null===(r=null==P?void 0:P.embedded)||void 0===r?void 0:r.map(function(e){var t;return lt(PT,Z({initItems:null===(t=null==e?void 0:e.body)||void 0===t?void 0:t.items},{children:lt(hHt,{item:null==e?void 0:e.body},e.id)}))}),(null==P?void 0:P.isi)&&lt(hHt,{item:null===(o=null===(n=null==b?void 0:b.content)||void 0===n?void 0:n.isi)||void 0===o?void 0:o.body})]})),a]}))},exports.COMMUNICATION_LINK_DATA_TEXT=ZHt,exports.COMMUNICATION_LINK_DATA_URL=KHt,exports.COMMUNICATION_LINK_ELEMENT_ID=GHt,exports.CalendarOrganism=Wer,exports.CellRendererRegistry=Ber,exports.Checkbox=Gst,exports.Checklist=M6e,exports.ChipMolecule=S6e,exports.Circle=d_,exports.CirclesWrapper=h_,exports.CircularIndicator=function(e){var t=e.activeColor,r=e.inactiveColor,n=X(e,["activeColor","inactiveColor"]),o=(Qe()||mt).colors;return lt(f_,Z({},n,{activeColor:o[t]||t,inactiveColor:o[r]||r}))},exports.CircularIndicatorStyledComponent=f_,exports.ConsentMolecule=D6e,exports.Container=elt,exports.ContainerWrapper=w6e,exports.ContentWrapper=function(t){var r=t.children,n=t.className,o=t.marginTop,a=void 0===o?"0px":o,i=t.marginLeft,s=void 0===i?"0px":i,l=t.marginRight,c=void 0===l?"0px":l,u=Kst(),d=u.drawer,p=u.setDrawerContainerRef,h=e.useRef(null);e.useEffect(function(){return p&&p(h.current),function(){p&&p(null)}},[p]);var f=function(e){var t=parseFloat(e);return isNaN(t)?0:t},m=f(s),v="absolute"!==d.positionType&&"left"===d.position&&d.isOpen?"".concat(m+d.width,"px"):s,y=f(c),g="absolute"!==d.positionType&&"right"===d.position&&d.isOpen?"".concat(y+d.width,"px"):c;return lt(Zst,Z({ref:h,className:n,style:{marginTop:a,marginLeft:v,marginRight:g}},{children:r}))},exports.CurrencyCell=Rer,exports.CustomValidation=j6e,exports.DataGridOrganism=Ver,exports.DateCalendar=ort,exports.DateCell=zer,exports.DatePickerMolecule=Eit,exports.DefaultTextCell=Aer,exports.Divider=jit,exports.Drawer=Jit,exports.EmailLinkCell=Fer,exports.ErrorText=function(e){var t=e.text;return ct(st,{children:[lt(O6e,{height:"XS"}),lt(P6e,Z({variant:"XS",color:"red"},{children:t}))]})},exports.FormOrganismItem=pHt,exports.FormStepContext=fF,exports.FormStepContextProvider=mF,exports.HorizontalButtons=function(e){var t=e.onClick,r=e.disabled,n=e.buttonOptions,o=e.selectedButtonId,a=e.error,i=(null==n?void 0:n.slice(0,2))||[];return lt(m_,Z({error:a,disabled:r},{children:i.map(function(e){var r=e.value,n=e.id;return lt(v_,Z({isActive:n===o,onClick:function(){return t(n)}},{children:r}),n)})}))},exports.HorizontalPadding=mC,exports.Icon=g_,exports.IconButton=function(e){var t=e.name,r=e.color,n=e.onClick,o=e.disabled,a=e.activeOpacity,i=e.withoutOpacityEffect,s=X(e,["name","color","onClick","disabled","activeOpacity","withoutOpacityEffect"]),l=(Qe()||mt).colors;return lt(l_,Z({onClick:n,disabled:o,activeOpacity:a,withoutOpacityEffect:i},{children:lt(a_[t],Z({},s,{color:l[r]||r}))}))},exports.IconRenderer=J3e,exports.IconWrapper=Wst,exports.Image=Tit,exports.Input=R_,exports.LayoutContext=Yst,exports.LayoutProvider=function(t){var r=t.children,n=t.layoutPosition,o=void 0===n?"normal":n,a=t.drawerMaxWidthPercent,i=void 0===a?80:a,s=t.headerHeight,l=void 0===s?"0px":s,c=t.isMLR,u=void 0!==c&&c,d=t.isMobile,p=void 0!==d&&d,h=e.useState({width:0,position:"right",isOpen:!1,positionType:o}),f=h[0],m=h[1],v=e.useRef(null),y=e.useState(null),g=y[0],x=y[1],b=zw("xs"),k=p||b;e.useEffect(function(){m(function(e){return Z(Z({},e),{positionType:o})})},[o]),e.useEffect(function(){if(v.current){var e=function(){var e;if(f.isOpen){var t=(null===(e=v.current)||void 0===e?void 0:e.clientWidth)||0,r=Math.floor(t*(i/100));f.width>r&&m(function(e){return Z(Z({},e),{width:r})})}};e();var t=new ResizeObserver(function(){e()});return t.observe(v.current),function(){t&&t.disconnect()}}},[f.isOpen,f.width,i]);var w=e.useMemo(function(){return function(e){m(function(t){var r=void 0!==e.width?e.width:t.width;if(v.current&&(e.isOpen||t.isOpen)){var n=v.current.clientWidth,o=Math.floor(n*(i/100));r=Math.min(r,o)}var a=void 0!==e.positionType?e.positionType:t.positionType;return Z(Z(Z({},t),e),{width:r,positionType:a})})}},[i]),_=e.useMemo(function(){return{drawer:f,updateDrawer:w,drawerContainerRef:g,setDrawerContainerRef:x,headerHeight:l,isMobile:k,isMLR:u}},[f,w,g,l,k,u]);return lt(Yst.Provider,Z({value:_},{children:lt("div",Z({ref:v,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"}},{children:r}))}))},exports.Link=est,exports.MATRIX_MESSAGE_DATA_ID=YHt,exports.MATRIX_MESSAGE_ELEMENT_ID=UHt,exports.MlrRichTextViewerContext=CT,exports.MlrRichTextViewerProvider=function(e){var t=e.children,r=e.isMLRReview,n=e.showAnnotations,o=e.annotationsList;return lt(CT.Provider,Z({value:{isMLRReview:r,annotationsList:o,showAnnotations:n}},{children:t}))},exports.ModalWrapper=qst,exports.Organism=function(e){var t=e.organism;return lt(hHt,{item:Uer(t.body)})},exports.OrganismContext=DT,exports.OrganismContextProvider=PT,exports.OrganismItem=hHt,exports.PasswordSetup=ost,exports.PdfDocument=function(t){var r=t.source,n=t.isMobile,a=void 0!==n&&n,i=t.customDocumentStyles,s=e.useState(0),l=s[0],c=s[1],u=e.useState(1),d=u[0],p=u[1],h=e.useState(null),f=h[0],m=h[1],v=i||{},y=v.pageWidth,g=void 0===y?a?342:856:y,x=v.pageHeight,b=f!==d;return lt(vst,Z({pageWidth:g,pageHeight:void 0===x?a?442:1108:x},{children:ct(yst,Z({customDocumentStyles:i},{children:[ct(o.Document,Z({file:r,renderMode:"canvas",className:"document",onLoadSuccess:function(e){var t=e.numPages;c(t)},loading:lt(Ul,{size:60})},{children:[b&&f?lt(o.Page,{pageNumber:f,renderTextLayer:!1,className:"custom-pdf"},f):null,lt(o.Page,{pageNumber:d,renderTextLayer:!1,className:"".concat(b?"loadingPage":"custom-pdf"),onRenderSuccess:function(){return m(d)}},d)]})),ct(gst,{children:[lt(xst,Z({disable:d<=1,onClick:function(){return p(function(e){return e+(e<=1?0:-1)})},customDocumentStyles:i},{children:lt(g_,{name:"CaretLeft",size:33})})),lt(bst,{type:"number",size:"small",customDocumentStyles:i,onChange:function(e){var t=e.target.value,r=e.nativeEvent;return function(e,t){if(!Number.isNaN(e)){var r=Math.round(e);r>l?!Number.isNaN(t)&&t>0&&t<=l&&p(t):r<1||p(r)}}(+t,+((null==r?void 0:r.data)||""))},value:d}),lt(xst,Z({disabled:!0},{children:lt(kst,{})})),lt(P6e,Z({variant:"S",color:(null==i?void 0:i.pageNumberColor)||"white"},{children:l})),lt(xst,Z({disable:d>=l,onClick:function(){return p(function(e){return e+(e>=l?0:1)})},customDocumentStyles:i},{children:lt(g_,{name:"CaretRight"})}))]})]}))}))},exports.PhoneLinkCell=Ier,exports.RadioButtons=function(e){var t=e.ref,r=e.name,n=e.value,o=e.options,a=e.onBlur,i=e.onChange,s=e.isRow,l=void 0!==s&&s,c=e.isError,u=void 0!==c&&c,d=e.disabled,p=void 0!==d&&d,h=e.isEditMode,f=void 0===h||h,m=e.isRichText,v=void 0!==m&&m,y=e.internalConfig,g=yC({internalConfig:y}).groupWrapperStyles;return lt(kC,Z({ref:t,row:l,$isRow:l,name:r,value:n,onBlur:a,onChange:function(e){f&&(null==i||i(e.target.value))},$styles:g},{children:null==o?void 0:o.map(function(e){return lt(bC,{option:e,isError:u,disabled:p,isRichText:v,isEditMode:f,internalConfig:y},e.id)})}))},exports.RadioGroupWrapper=kC,exports.RatingCell=Ler,exports.RatingMolecule=wst,exports.RegularImage=wC,exports.RichTextViewer=QHt,exports.Select=function(t){var r=t.ref,n=t.onBlur,o=t.onChange,a=t.value,i=t.placeholder,s=t.options,l=void 0===s?[]:s,c=t.disabled,u=void 0!==c&&c,d=t.optionsPresentation,p=void 0!==d&&d,h=t.isError,f=t.isEditMode,m=void 0===f||f,v=t.selectInternalConfig,y=t.isRichText,g=void 0!==y&&y,x=e.useState(p),b=x[0],k=x[1],w=e.useState(a),_=w[0],C=w[1],M=null==l?void 0:l.find(function(e){return e.id===_});e.useEffect(function(){var e=function(){return!p&&k(!1)};return window.addEventListener("click",e),function(){return window.removeEventListener("click",e)}}),e.useEffect(function(){return k(p)},[p]),e.useEffect(function(){return C(a)},[a]);var S=function(e){return e===_};return lt(e$t,Z({ref:r,tabIndex:0,onBlur:n,disabled:u,isEditMode:m,hasValue:!!M,isOpen:b,hasError:!!h,$styles:n$t(v,!!M)},{children:ct("div",Z({className:"select-wrapper"},{children:[ct("div",Z({className:"select-input",onClick:function(e){p||(e.stopPropagation(),k(function(e){return!e}))}},{children:[M?g?lt(QHt,{numberOfLines:1,value:M.label}):lt(P6e,Z({numberOfLines:1,variant:"M",color:"gray1"},{children:M.label})):lt(P6e,Z({numberOfLines:1,variant:"M",color:"gray3"},{children:i})),m&&lt("div",Z({className:"icon-container"},{children:lt(g_,{name:"CaretDown"})}))]})),b&&m&&lt(t$t,{children:l.map(function(e){var t=e.id,r=e.label;return lt(r$t,Z({$selected:S(t),onClick:function(){return function(e){C(e),null==o||o(e)}(t)}},{children:g?JHt(JSON.parse(r)):r}),t)})})]}))}))},exports.SelectMolecule=Cst,exports.SliderMolecule=Rst,exports.Spacer=O6e,exports.SpeedDial=Xst,exports.Spinner=a$t,exports.StateContext=gHt,exports.StateContextProvider=function(t){var r=t.initStateConfig,n=t.children,o=t.stateHandler,a=t.authenticated,i=e.useMemo(function(){return{stateConfig:r,stateHandler:o,authenticated:a}},[r,o,a]);return lt(gHt.Provider,Z({value:i},{children:n}))},exports.StatusChipCell=function(e){var t,r,n=e.value,o=e.mapping,a=null==o?void 0:o[n];return lt(gd,{size:"small",label:null!==(t=null==a?void 0:a.label)&&void 0!==t?t:n,color:null!==(r=null==a?void 0:a.color)&&void 0!==r?r:"default"})},exports.Stepper=zst,exports.StyleWrapper=hGt,exports.SwitchMolecule=Fst,exports.TextButton=s_,exports.TextMolecule=Rit,exports.TextWrapper=P6e,exports.TimePickerMolecule=Lst,exports.Tooltip=function(t){var r=t.trigger,n=void 0===r?"hover":r,o=t.placement,a=void 0===o?"top":o,i=t.styles,s=X(t,["trigger","placement","styles"]),l=e.useRef(null);return lt(hGt,Z({ref:l,$styles:i},{children:lt(pGt,Z({},s,{getTooltipContainer:function(){return l.current},trigger:n,placement:a}))}))},exports.TouchableOpacity=l_,exports.ValidationTag=mGt,exports.VerticalPadding=vC,exports.Video=Bst,exports.ZealThemeProvider=function(e){return lt(hr,Z({injectFirst:!0},{children:lt(et,Z({theme:Z(Z({},Rw),e.theme)},{children:ct(vi,Z({theme:Z(Z({},Rw),e.theme)},{children:[lt(Nh,{}),lt(Pt,{styles:Nw}),e.children]}))}))}))},exports.ZealUIModal=$st,exports.calendarConfiguratorDescriptor=Ger,exports.containerConfiguratorsMap={},exports.dataGridConfiguratorDescriptor={component:"DataGridOrganism",version:"1.0.0",groups:[{id:"columns",labelKey:"config.datagrid.group.columns"},{id:"toolbar",labelKey:"config.datagrid.group.toolbar"},{id:"dataRetrieval",labelKey:"config.datagrid.group.dataRetrieval",collapsedByDefault:!0},{id:"styles",labelKey:"config.datagrid.group.styles"}],fields:[{type:"composite",labelKey:"config.datagrid.dataRetrieval.title",groupId:"dataRetrieval",renderer:"dataGridDataRetrieval",targets:[{path:"dataSource",labelKey:"config.datagrid.dataRetrieval.dataSource"}],grid:{md:12}},{type:"array",path:"columns",labelKey:"config.datagrid.columns.title",groupId:"columns",itemLabelKey:"config.datagrid.columns.item",allowAdd:!0,allowRemove:!0,allowReorder:!0,minItems:1,itemDefault:{id:"",kind:"data",field:"",headerName:"",width:160,filterable:!0,sortable:!1,renderer:"DefaultTextCell"},itemFields:[{type:"select",path:"columns[$index].kind",labelKey:"config.datagrid.columns.kind",groupId:"columns",options:[{id:"data",labelKey:"config.datagrid.columns.kind.data"},{id:"component",labelKey:"config.datagrid.columns.kind.component"}],grid:{md:2}},{type:"text",path:"columns[$index].id",labelKey:"config.datagrid.columns.id",groupId:"columns",rules:{required:!0},grid:{md:3}},{type:"text",path:"columns[$index].headerName",labelKey:"config.datagrid.columns.headerName",groupId:"columns",grid:{md:3}},{type:"number",path:"columns[$index].width",labelKey:"config.datagrid.columns.width",groupId:"columns",rules:{min:40,max:1e3},grid:{md:2}},{type:"switch",path:"columns[$index].filterable",labelKey:"config.datagrid.columns.filterable",groupId:"columns",grid:{md:2}},{type:"switch",path:"columns[$index].sortable",labelKey:"config.datagrid.columns.sortable",groupId:"columns",grid:{md:2}},{type:"text",path:"columns[$index].renderer",labelKey:"config.datagrid.columns.renderer",groupId:"columns",grid:{md:3}},{type:"text",path:"columns[$index].field",labelKey:"config.datagrid.columns.field",groupId:"columns",when:{path:"columns[$index].kind",equals:"data"},grid:{md:3}},{type:"text",path:"columns[$index].componentRenderer",labelKey:"config.datagrid.columns.componentRenderer",groupId:"columns",when:{path:"columns[$index].kind",equals:"component"},grid:{md:3}}]},{type:"select",path:"toolbar.densityDefault",labelKey:"config.datagrid.toolbar.densityDefault",groupId:"toolbar",defaultValue:"comfortable",options:[{id:"compact",labelKey:"config.datagrid.toolbar.view.compact"},{id:"comfortable",labelKey:"config.datagrid.toolbar.view.comfortable"}],grid:{md:3}},{type:"switch",path:"toolbar.densityToggle",labelKey:"config.datagrid.toolbar.densityToggle",groupId:"toolbar",defaultValue:!0,grid:{md:3}},{type:"switch",path:"toolbar.search",labelKey:"config.datagrid.toolbar.search",groupId:"toolbar",defaultValue:!0,grid:{md:3}},{type:"switch",path:"toolbar.exportCsv",labelKey:"config.datagrid.toolbar.exportCsv",groupId:"toolbar",defaultValue:!0,grid:{md:3}},{type:"array",path:"toolbar.quickFilters",labelKey:"config.datagrid.toolbar.quickFilters",groupId:"toolbar",allowAdd:!0,allowRemove:!0,allowReorder:!0,itemDefault:{label:"",columnField:"",value:""},itemFields:[{type:"text",path:"toolbar.quickFilters[$index].label",labelKey:"config.datagrid.toolbar.quickFilters.label",groupId:"toolbar",grid:{md:4}},{type:"text",path:"toolbar.quickFilters[$index].columnField",labelKey:"config.datagrid.toolbar.quickFilters.columnField",groupId:"toolbar",grid:{md:4}},{type:"text",path:"toolbar.quickFilters[$index].value",labelKey:"config.datagrid.toolbar.quickFilters.value",groupId:"toolbar",grid:{md:4}}]},{type:"color",path:"styles.backgroundColor",labelKey:"config.datagrid.styles.background",groupId:"styles",defaultValue:"#FFFFFF",grid:{md:3}},{type:"color",path:"styles.header.backgroundColor",labelKey:"config.datagrid.styles.headerBg",groupId:"styles",grid:{md:3}},{type:"number",path:"styles.header.fontSize",labelKey:"config.datagrid.styles.headerFontSize",groupId:"styles",rules:{min:10,max:32},grid:{md:3}},{type:"number",path:"styles.row.height",labelKey:"config.datagrid.styles.rowHeight",groupId:"styles",rules:{min:24,max:80},grid:{md:3}},{type:"color",path:"styles.row.hoverColor",labelKey:"config.datagrid.styles.rowHover",groupId:"styles",grid:{md:3}},{type:"switch",path:"styles.row.striped",labelKey:"config.datagrid.styles.striped",groupId:"styles",defaultValue:!1,grid:{md:3}}]},exports.defaultTheme=mt,exports.fontWeight=[100,200,300,400,500,600,700,800,900],exports.fonts=["3XL","2XL","XL","L","M","S","XS"],exports.moleculeConfiguratorsMap={},exports.moleculeItemConfiguratorsMap={},exports.organismConfiguratorsMap=Yer,exports.passwordValidationMapper=tst,exports.richTextDefaultValue=XHt,exports.seoTags=["h1","h2","h3","h4","h5","h6"],exports.sizings=["5XL","4XL","3XL","2XL","XL","L","M","S","XS",0],exports.toast=TWt,exports.toastStyles=Tw,exports.useAccountButtonContext=function(){return e.useContext(vHt)},exports.useApi=_Ht,exports.useButtonActionsContext=fHt,exports.useFormStepContext=bHt,exports.useLayoutContext=Kst,exports.useMediaQuery=zw,exports.useMlrRichTextViewerContext=MT,exports.useOrganismContext=mHt,exports.useStateContext=xHt;
9709
9709
  //# sourceMappingURL=index.js.map