@firecms/core 3.0.0-alpha.7 → 3.0.0-alpha.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/ArrayContainer.d.ts +42 -0
- package/dist/components/CircularProgressCenter.d.ts +11 -0
- package/dist/components/DeleteConfirmationDialog.d.ts +9 -0
- package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +30 -0
- package/dist/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +106 -0
- package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +15 -0
- package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +33 -0
- package/dist/components/EntityCollectionTable/filters/BooleanFilterField.d.ts +9 -0
- package/dist/components/EntityCollectionTable/filters/DateTimeFilterField.d.ts +11 -0
- package/dist/components/EntityCollectionTable/filters/ReferenceFilterField.d.ts +14 -0
- package/dist/components/EntityCollectionTable/filters/StringNumberFilterField.d.ts +13 -0
- package/dist/components/EntityCollectionTable/index.d.ts +4 -0
- package/dist/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +18 -0
- package/dist/components/EntityCollectionTable/internal/DeleteEntityDialog.d.ts +12 -0
- package/dist/components/EntityCollectionTable/internal/EntityCollectionRowActions.d.ts +35 -0
- package/dist/components/EntityCollectionTable/internal/EntityTableCell.d.ts +26 -0
- package/dist/components/EntityCollectionTable/internal/EntityTableCellActions.d.ts +9 -0
- package/dist/components/EntityCollectionTable/internal/PropertyTableCell.d.ts +18 -0
- package/dist/components/EntityCollectionTable/internal/common.d.ts +4 -0
- package/dist/components/EntityCollectionTable/internal/default_entity_actions.d.ts +6 -0
- package/dist/components/EntityCollectionTable/internal/popup_field/ElementResizeListener.d.ts +5 -0
- package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +23 -0
- package/dist/components/EntityCollectionTable/internal/popup_field/useDraggable.d.ts +13 -0
- package/dist/components/EntityCollectionTable/internal/popup_field/useWindowSize.d.ts +6 -0
- package/dist/components/EntityCollectionTable/types.d.ts +39 -0
- package/dist/components/EntityCollectionTable/useDebouncedData.d.ts +9 -0
- package/dist/components/EntityCollectionTable/useEntityCollectionTableController.d.ts +21 -0
- package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +37 -0
- package/dist/components/EntityCollectionView/EntityCollectionViewActions.d.ts +14 -0
- package/dist/components/EntityCollectionView/useColumnsIds.d.ts +4 -0
- package/dist/components/EntityPreview.d.ts +11 -0
- package/dist/components/ErrorBoundary.d.ts +11 -0
- package/dist/components/ErrorTooltip.d.ts +2 -0
- package/dist/components/ErrorView.d.ts +19 -0
- package/dist/components/FieldConfigBadge.d.ts +4 -0
- package/dist/components/FireCMSAppBar.d.ts +26 -0
- package/dist/components/FireCMSLogo.d.ts +7 -0
- package/dist/components/HomePage/DefaultHomePage.d.ts +21 -0
- package/dist/components/HomePage/FavouritesView.d.ts +3 -0
- package/dist/components/HomePage/NavigationCollectionCard.d.ts +17 -0
- package/dist/components/HomePage/NavigationGroup.d.ts +4 -0
- package/dist/components/HomePage/index.d.ts +3 -0
- package/dist/components/LabelWithIcon.d.ts +14 -0
- package/dist/components/NotFoundPage.d.ts +1 -0
- package/dist/components/ReferenceSelectionInner.d.ts +58 -0
- package/dist/components/ReferenceWidget.d.ts +28 -0
- package/dist/components/VirtualTable/VirtualTable.d.ts +11 -0
- package/dist/components/VirtualTable/VirtualTableCell.d.ts +14 -0
- package/dist/components/VirtualTable/VirtualTableHeader.d.ts +27 -0
- package/dist/components/VirtualTable/VirtualTableHeaderRow.d.ts +2 -0
- package/dist/components/VirtualTable/VirtualTableProps.d.ts +215 -0
- package/dist/components/VirtualTable/VirtualTableRow.d.ts +3 -0
- package/dist/components/VirtualTable/common.d.ts +2 -0
- package/dist/components/VirtualTable/fields/VirtualTableDateField.d.ts +11 -0
- package/dist/components/VirtualTable/fields/VirtualTableInput.d.ts +8 -0
- package/dist/components/VirtualTable/fields/VirtualTableNumberInput.d.ts +8 -0
- package/dist/components/VirtualTable/fields/VirtualTableSelect.d.ts +15 -0
- package/dist/components/VirtualTable/fields/VirtualTableSwitch.d.ts +7 -0
- package/dist/components/VirtualTable/index.d.ts +2 -0
- package/dist/components/VirtualTable/types.d.ts +34 -0
- package/dist/components/index.d.ts +20 -0
- package/dist/contexts/AuthControllerContext.d.ts +3 -0
- package/dist/contexts/DataSourceContext.d.ts +3 -0
- package/dist/contexts/DialogsProvider.d.ts +4 -0
- package/dist/contexts/ModeController.d.ts +4 -0
- package/dist/contexts/NavigationContext.d.ts +3 -0
- package/dist/contexts/SideDialogsControllerContext.d.ts +3 -0
- package/dist/contexts/SideEntityControllerContext.d.ts +3 -0
- package/dist/contexts/SnackbarProvider.d.ts +2 -0
- package/dist/contexts/StorageSourceContext.d.ts +3 -0
- package/dist/contexts/UserConfigurationPersistenceContext.d.ts +3 -0
- package/dist/contexts/index.d.ts +3 -0
- package/dist/core/Drawer.d.ts +23 -0
- package/dist/core/EntitySidePanel.d.ts +10 -0
- package/dist/core/FireCMS.d.ts +14 -0
- package/dist/core/NavigationRoutes.d.ts +21 -0
- package/dist/core/Scaffold.d.ts +52 -0
- package/dist/core/SideDialogs.d.ts +23 -0
- package/dist/core/field_configs.d.ts +7 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/useBuildLocalConfigurationPersistence.d.ts +2 -0
- package/dist/core/useBuildModeController.d.ts +6 -0
- package/dist/form/EntityForm.d.ts +75 -0
- package/dist/form/PropertyFieldBinding.d.ts +30 -0
- package/dist/form/components/CustomIdField.d.ts +9 -0
- package/dist/form/components/ErrorFocus.d.ts +4 -0
- package/dist/form/components/FieldHelperText.d.ts +12 -0
- package/dist/form/components/FormikArrayContainer.d.ts +18 -0
- package/dist/form/components/StorageItemPreview.d.ts +13 -0
- package/dist/form/components/StorageUploadProgress.d.ts +10 -0
- package/dist/form/components/SubmitListener.d.ts +1 -0
- package/dist/form/components/SwitchControl.d.ts +8 -0
- package/dist/form/components/index.d.ts +3 -0
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +9 -0
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +11 -0
- package/dist/form/field_bindings/BlockFieldBinding.d.ts +10 -0
- package/dist/form/field_bindings/DateTimeFieldBinding.d.ts +11 -0
- package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +7 -0
- package/dist/form/field_bindings/MapFieldBinding.d.ts +9 -0
- package/dist/form/field_bindings/MarkdownFieldBinding.d.ts +9 -0
- package/dist/form/field_bindings/MultiSelectBinding.d.ts +9 -0
- package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +10 -0
- package/dist/form/field_bindings/ReferenceFieldBinding.d.ts +9 -0
- package/dist/form/field_bindings/RepeatFieldBinding.d.ts +10 -0
- package/dist/form/field_bindings/SelectFieldBinding.d.ts +12 -0
- package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +28 -0
- package/dist/form/field_bindings/SwitchFieldBinding.d.ts +12 -0
- package/dist/form/field_bindings/TextFieldBinding.d.ts +12 -0
- package/dist/form/index.d.ts +20 -0
- package/dist/form/useClearRestoreValue.d.ts +13 -0
- package/dist/form/validation.d.ts +25 -0
- package/dist/hooks/data/delete.d.ts +37 -0
- package/dist/hooks/data/save.d.ts +42 -0
- package/dist/hooks/data/useCollectionFetch.d.ts +50 -0
- package/dist/hooks/data/useDataOrder.d.ts +12 -0
- package/dist/hooks/data/useDataSource.d.ts +6 -0
- package/dist/hooks/data/useEntityFetch.d.ts +28 -0
- package/dist/hooks/index.d.ts +19 -0
- package/dist/hooks/useAuthController.d.ts +11 -0
- package/dist/hooks/useBrowserTitleAndIcon.d.ts +6 -0
- package/dist/hooks/useClipboard.d.ts +57 -0
- package/dist/hooks/useDialogsController.d.ts +11 -0
- package/dist/hooks/useFireCMSContext.d.ts +12 -0
- package/dist/hooks/useLargeLayout.d.ts +1 -0
- package/dist/hooks/useModeController.d.ts +20 -0
- package/dist/hooks/useNavigationController.d.ts +9 -0
- package/dist/hooks/useReferenceDialog.d.ts +18 -0
- package/dist/hooks/useResolvedNavigationFrom.d.ts +72 -0
- package/dist/hooks/useSideDialogsController.d.ts +18 -0
- package/dist/hooks/useSideEntityController.d.ts +12 -0
- package/dist/hooks/useSnackbarController.d.ts +41 -0
- package/dist/hooks/useStorageSource.d.ts +6 -0
- package/dist/hooks/useUserConfigurationPersistence.d.ts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.es.js +12415 -25618
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -1027
- package/dist/index.umd.js.map +1 -1
- package/dist/internal/EntityView.d.ts +22 -0
- package/dist/internal/common.d.ts +3 -0
- package/dist/internal/useBuildDataSource.d.ts +22 -0
- package/dist/internal/useBuildNavigationController.d.ts +14 -0
- package/dist/internal/useBuildSideDialogsController.d.ts +2 -0
- package/dist/internal/useBuildSideEntityController.d.ts +4 -0
- package/dist/internal/useLocaleConfig.d.ts +1 -0
- package/dist/internal/useRestoreScroll.d.ts +6 -0
- package/dist/internal/useUnsavedChangesDialog.d.ts +14 -0
- package/dist/preview/PropertyPreview.d.ts +7 -0
- package/dist/preview/PropertyPreviewProps.d.ts +43 -0
- package/dist/preview/components/ArrayEnumPreview.d.ts +11 -0
- package/dist/preview/components/AsyncPreviewComponent.d.ts +11 -0
- package/dist/preview/components/BooleanPreview.d.ts +7 -0
- package/dist/preview/components/DatePreview.d.ts +7 -0
- package/dist/preview/components/EmptyValue.d.ts +4 -0
- package/dist/preview/components/EnumValuesChip.d.ts +13 -0
- package/dist/preview/components/ImagePreview.d.ts +12 -0
- package/dist/preview/components/ReferencePreview.d.ts +22 -0
- package/dist/preview/components/StorageThumbnail.d.ts +13 -0
- package/dist/preview/components/UrlComponentPreview.d.ts +12 -0
- package/dist/preview/index.d.ts +23 -0
- package/dist/preview/property_previews/ArrayOfMapsPreview.d.ts +5 -0
- package/dist/preview/property_previews/ArrayOfReferencesPreview.d.ts +5 -0
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +5 -0
- package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +5 -0
- package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +5 -0
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.d.ts +5 -0
- package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +5 -0
- package/dist/preview/property_previews/MapPropertyPreview.d.ts +8 -0
- package/dist/preview/property_previews/NumberPropertyPreview.d.ts +6 -0
- package/dist/preview/property_previews/SkeletonPropertyComponent.d.ts +14 -0
- package/dist/preview/property_previews/StringPropertyPreview.d.ts +6 -0
- package/dist/preview/util.d.ts +7 -0
- package/dist/types/analytics.d.ts +1 -0
- package/dist/types/appcheck.d.ts +26 -0
- package/dist/types/auth.d.ts +40 -0
- package/dist/types/collections.d.ts +451 -0
- package/dist/types/datasource.d.ts +262 -0
- package/dist/types/dialogs_controller.d.ts +32 -0
- package/dist/types/entities.d.ts +57 -0
- package/dist/types/entity_actions.d.ts +35 -0
- package/dist/types/entity_callbacks.d.ts +171 -0
- package/dist/types/entity_link_builder.d.ts +7 -0
- package/dist/types/export_import.d.ts +21 -0
- package/dist/types/fields.d.ts +181 -0
- package/dist/types/firecms.d.ts +151 -0
- package/dist/types/firecms_context.d.ts +110 -0
- package/dist/types/index.d.ts +26 -0
- package/dist/types/local_config_persistence.d.ts +21 -0
- package/dist/types/locales.d.ts +4 -0
- package/dist/types/modify_collections.d.ts +5 -0
- package/dist/types/navigation.d.ts +178 -0
- package/dist/types/permissions.d.ts +63 -0
- package/dist/types/plugins.d.ts +179 -0
- package/dist/types/properties.d.ts +681 -0
- package/dist/types/property_config.d.ts +42 -0
- package/dist/types/resolved_entities.d.ts +98 -0
- package/dist/types/side_dialogs_controller.d.ts +57 -0
- package/dist/types/side_entity_controller.d.ts +83 -0
- package/dist/types/storage.d.ts +82 -0
- package/dist/types/user.d.ts +36 -0
- package/dist/util/arrays.d.ts +1 -0
- package/dist/util/builders.d.ts +64 -0
- package/dist/util/chip_utils.d.ts +3 -0
- package/dist/util/collections.d.ts +3 -0
- package/dist/util/common.d.ts +2 -0
- package/dist/util/dates.d.ts +1 -0
- package/dist/util/entities.d.ts +28 -0
- package/dist/util/enums.d.ts +7 -0
- package/dist/util/flatten_object.d.ts +3 -0
- package/dist/util/hash.d.ts +1 -0
- package/dist/util/icons.d.ts +4 -0
- package/dist/util/index.d.ts +20 -0
- package/dist/util/join_collections.d.ts +9 -0
- package/dist/util/make_properties_editable.d.ts +3 -0
- package/dist/util/navigation_from_path.d.ts +24 -0
- package/dist/util/navigation_utils.d.ts +20 -0
- package/dist/util/objects.d.ts +10 -0
- package/dist/util/os.d.ts +2 -0
- package/dist/util/parent_references_from_path.d.ts +6 -0
- package/dist/util/paths.d.ts +14 -0
- package/dist/util/permissions.d.ts +5 -0
- package/dist/util/plurals.d.ts +18 -0
- package/dist/util/property_utils.d.ts +23 -0
- package/dist/util/references.d.ts +2 -0
- package/dist/util/regexp.d.ts +7 -0
- package/dist/util/resolutions.d.ts +64 -0
- package/dist/util/storage.d.ts +3 -0
- package/dist/util/strings.d.ts +6 -0
- package/dist/util/useDebounce.d.ts +1 -0
- package/dist/util/useStorageUploadController.d.ts +36 -0
- package/dist/util/useTraceUpdate.d.ts +1 -0
- package/package.json +114 -142
- package/src/components/ArrayContainer.tsx +369 -0
- package/src/components/CircularProgressCenter.tsx +26 -0
- package/src/components/DeleteConfirmationDialog.tsx +47 -0
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +520 -0
- package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +150 -0
- package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +159 -0
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +313 -0
- package/src/components/EntityCollectionTable/filters/BooleanFilterField.tsx +49 -0
- package/src/components/EntityCollectionTable/filters/DateTimeFilterField.tsx +109 -0
- package/src/components/EntityCollectionTable/filters/ReferenceFilterField.tsx +187 -0
- package/src/components/EntityCollectionTable/filters/StringNumberFilterField.tsx +159 -0
- package/src/components/EntityCollectionTable/index.tsx +16 -0
- package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +113 -0
- package/src/components/EntityCollectionTable/internal/DeleteEntityDialog.tsx +207 -0
- package/src/components/EntityCollectionTable/internal/EntityCollectionRowActions.tsx +174 -0
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +264 -0
- package/src/components/EntityCollectionTable/internal/EntityTableCellActions.tsx +70 -0
- package/src/components/EntityCollectionTable/internal/PropertyTableCell.tsx +460 -0
- package/src/components/EntityCollectionTable/internal/common.tsx +70 -0
- package/src/components/EntityCollectionTable/internal/default_entity_actions.tsx +122 -0
- package/src/components/EntityCollectionTable/internal/popup_field/ElementResizeListener.tsx +59 -0
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +401 -0
- package/src/components/EntityCollectionTable/internal/popup_field/useDraggable.tsx +97 -0
- package/src/components/EntityCollectionTable/internal/popup_field/useWindowSize.tsx +20 -0
- package/src/components/EntityCollectionTable/types.tsx +44 -0
- package/src/components/EntityCollectionTable/useDebouncedData.ts +49 -0
- package/src/components/EntityCollectionTable/useEntityCollectionTableController.tsx +213 -0
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +815 -0
- package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +131 -0
- package/src/components/EntityCollectionView/useColumnsIds.tsx +100 -0
- package/src/components/EntityPreview.tsx +83 -0
- package/src/components/ErrorBoundary.tsx +40 -0
- package/src/components/ErrorTooltip.tsx +11 -0
- package/src/components/ErrorView.tsx +52 -0
- package/src/components/FieldConfigBadge.tsx +17 -0
- package/src/components/FireCMSAppBar.tsx +157 -0
- package/src/components/FireCMSLogo.tsx +73 -0
- package/src/components/HomePage/DefaultHomePage.tsx +209 -0
- package/src/components/HomePage/FavouritesView.tsx +64 -0
- package/src/components/HomePage/NavigationCollectionCard.tsx +145 -0
- package/src/components/HomePage/NavigationGroup.tsx +39 -0
- package/src/components/HomePage/index.tsx +3 -0
- package/src/components/LabelWithIcon.tsx +33 -0
- package/src/components/NotFoundPage.tsx +25 -0
- package/src/components/ReferenceSelectionInner.tsx +364 -0
- package/src/components/ReferenceWidget.tsx +145 -0
- package/src/components/VirtualTable/VirtualTable.tsx +402 -0
- package/src/components/VirtualTable/VirtualTableCell.tsx +36 -0
- package/src/components/VirtualTable/VirtualTableHeader.tsx +260 -0
- package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +131 -0
- package/src/components/VirtualTable/VirtualTableProps.tsx +270 -0
- package/src/components/VirtualTable/VirtualTableRow.tsx +54 -0
- package/src/components/VirtualTable/common.tsx +18 -0
- package/src/components/VirtualTable/fields/VirtualTableDateField.tsx +37 -0
- package/src/components/VirtualTable/fields/VirtualTableInput.tsx +91 -0
- package/src/components/VirtualTable/fields/VirtualTableNumberInput.tsx +82 -0
- package/src/components/VirtualTable/fields/VirtualTableSelect.tsx +130 -0
- package/src/components/VirtualTable/fields/VirtualTableSwitch.tsx +32 -0
- package/src/components/VirtualTable/index.tsx +2 -0
- package/src/components/VirtualTable/types.tsx +44 -0
- package/src/components/index.tsx +30 -0
- package/src/contexts/AuthControllerContext.tsx +4 -0
- package/src/contexts/DataSourceContext.tsx +4 -0
- package/src/contexts/DialogsProvider.tsx +52 -0
- package/src/contexts/ModeController.tsx +13 -0
- package/src/contexts/NavigationContext.tsx +4 -0
- package/src/contexts/SideDialogsControllerContext.tsx +4 -0
- package/src/contexts/SideEntityControllerContext.tsx +4 -0
- package/src/contexts/SnackbarProvider.tsx +12 -0
- package/src/contexts/StorageSourceContext.tsx +4 -0
- package/src/contexts/UserConfigurationPersistenceContext.tsx +4 -0
- package/src/contexts/index.ts +3 -0
- package/src/core/Drawer.tsx +161 -0
- package/src/core/EntitySidePanel.tsx +90 -0
- package/src/core/FireCMS.tsx +184 -0
- package/src/core/NavigationRoutes.tsx +118 -0
- package/src/core/Scaffold.tsx +278 -0
- package/src/core/SideDialogs.tsx +156 -0
- package/src/core/field_configs.tsx +400 -0
- package/src/core/index.tsx +14 -0
- package/src/core/useBuildLocalConfigurationPersistence.tsx +67 -0
- package/src/core/useBuildModeController.tsx +60 -0
- package/src/form/EntityForm.tsx +647 -0
- package/src/form/PropertyFieldBinding.tsx +311 -0
- package/src/form/components/CustomIdField.tsx +124 -0
- package/src/form/components/ErrorFocus.tsx +51 -0
- package/src/form/components/FieldHelperText.tsx +58 -0
- package/src/form/components/FormikArrayContainer.tsx +44 -0
- package/src/form/components/StorageItemPreview.tsx +66 -0
- package/src/form/components/StorageUploadProgress.tsx +104 -0
- package/src/form/components/SubmitListener.tsx +32 -0
- package/src/form/components/SwitchControl.tsx +39 -0
- package/src/form/components/index.tsx +3 -0
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +88 -0
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +153 -0
- package/src/form/field_bindings/BlockFieldBinding.tsx +245 -0
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +66 -0
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +560 -0
- package/src/form/field_bindings/MapFieldBinding.tsx +142 -0
- package/src/form/field_bindings/MarkdownFieldBinding.tsx +696 -0
- package/src/form/field_bindings/MultiSelectBinding.tsx +115 -0
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +70 -0
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +122 -0
- package/src/form/field_bindings/RepeatFieldBinding.tsx +103 -0
- package/src/form/field_bindings/SelectFieldBinding.tsx +100 -0
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +438 -0
- package/src/form/field_bindings/SwitchFieldBinding.tsx +61 -0
- package/src/form/field_bindings/TextFieldBinding.tsx +108 -0
- package/src/form/index.tsx +42 -0
- package/src/form/useClearRestoreValue.tsx +35 -0
- package/src/form/validation.ts +409 -0
- package/src/hooks/data/delete.ts +101 -0
- package/src/hooks/data/save.ts +165 -0
- package/src/hooks/data/useCollectionFetch.tsx +162 -0
- package/src/hooks/data/useDataOrder.ts +26 -0
- package/src/hooks/data/useDataSource.tsx +9 -0
- package/src/hooks/data/useEntityFetch.tsx +129 -0
- package/src/hooks/index.tsx +23 -0
- package/src/hooks/useAuthController.tsx +14 -0
- package/src/hooks/useBrowserTitleAndIcon.tsx +25 -0
- package/src/hooks/useClipboard.tsx +158 -0
- package/src/hooks/useDialogsController.tsx +14 -0
- package/src/hooks/useFireCMSContext.tsx +50 -0
- package/src/hooks/useLargeLayout.tsx +34 -0
- package/src/hooks/useModeController.tsx +24 -0
- package/src/hooks/useNavigationController.tsx +12 -0
- package/src/hooks/useReferenceDialog.tsx +56 -0
- package/src/hooks/useResolvedNavigationFrom.tsx +160 -0
- package/src/hooks/useSideDialogsController.tsx +21 -0
- package/src/hooks/useSideEntityController.tsx +15 -0
- package/src/hooks/useSnackbarController.tsx +76 -0
- package/src/hooks/useStorageSource.tsx +9 -0
- package/src/hooks/useUserConfigurationPersistence.tsx +11 -0
- package/src/index.ts +8 -0
- package/src/internal/EntityView.tsx +576 -0
- package/src/internal/common.tsx +5 -0
- package/src/internal/useBuildDataSource.ts +360 -0
- package/src/internal/useBuildNavigationController.tsx +371 -0
- package/src/internal/useBuildSideDialogsController.tsx +125 -0
- package/src/internal/useBuildSideEntityController.tsx +160 -0
- package/src/internal/useLocaleConfig.tsx +18 -0
- package/src/internal/useRestoreScroll.tsx +48 -0
- package/src/internal/useUnsavedChangesDialog.tsx +106 -0
- package/src/preview/PropertyPreview.tsx +222 -0
- package/src/preview/PropertyPreviewProps.tsx +59 -0
- package/src/preview/components/ArrayEnumPreview.tsx +39 -0
- package/src/preview/components/AsyncPreviewComponent.tsx +47 -0
- package/src/preview/components/BooleanPreview.tsx +11 -0
- package/src/preview/components/DatePreview.tsx +27 -0
- package/src/preview/components/EmptyValue.tsx +10 -0
- package/src/preview/components/EnumValuesChip.tsx +38 -0
- package/src/preview/components/ImagePreview.tsx +106 -0
- package/src/preview/components/ReferencePreview.tsx +249 -0
- package/src/preview/components/StorageThumbnail.tsx +84 -0
- package/src/preview/components/UrlComponentPreview.tsx +79 -0
- package/src/preview/index.ts +27 -0
- package/src/preview/property_previews/ArrayOfMapsPreview.tsx +82 -0
- package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +52 -0
- package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +54 -0
- package/src/preview/property_previews/ArrayOfStringsPreview.tsx +55 -0
- package/src/preview/property_previews/ArrayOneOfPreview.tsx +67 -0
- package/src/preview/property_previews/ArrayPropertyEnumPreview.tsx +28 -0
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +68 -0
- package/src/preview/property_previews/MapPropertyPreview.tsx +144 -0
- package/src/preview/property_previews/NumberPropertyPreview.tsx +27 -0
- package/src/preview/property_previews/SkeletonPropertyComponent.tsx +283 -0
- package/src/preview/property_previews/StringPropertyPreview.tsx +60 -0
- package/src/preview/util.ts +31 -0
- package/src/types/analytics.ts +34 -0
- package/src/types/appcheck.ts +29 -0
- package/src/types/auth.tsx +49 -0
- package/src/types/collections.ts +530 -0
- package/src/types/datasource.ts +389 -0
- package/src/types/dialogs_controller.tsx +33 -0
- package/src/types/entities.ts +76 -0
- package/src/types/entity_actions.tsx +39 -0
- package/src/types/entity_callbacks.ts +209 -0
- package/src/types/entity_link_builder.ts +8 -0
- package/src/types/export_import.ts +26 -0
- package/src/types/fields.tsx +220 -0
- package/src/types/firecms.tsx +175 -0
- package/src/types/firecms_context.tsx +128 -0
- package/src/types/index.ts +26 -0
- package/src/types/local_config_persistence.tsx +23 -0
- package/src/types/locales.ts +81 -0
- package/src/types/modify_collections.tsx +6 -0
- package/src/types/navigation.ts +214 -0
- package/src/types/permissions.ts +76 -0
- package/src/types/plugins.tsx +217 -0
- package/src/types/properties.ts +851 -0
- package/src/types/property_config.tsx +72 -0
- package/src/types/resolved_entities.ts +148 -0
- package/src/types/side_dialogs_controller.tsx +68 -0
- package/src/types/side_entity_controller.tsx +96 -0
- package/src/types/storage.ts +96 -0
- package/src/types/user.ts +37 -0
- package/src/util/arrays.ts +3 -0
- package/src/util/builders.ts +139 -0
- package/src/util/chip_utils.ts +13 -0
- package/src/util/collections.ts +50 -0
- package/src/util/common.tsx +2 -0
- package/src/util/dates.ts +1 -0
- package/src/util/entities.ts +196 -0
- package/src/util/enums.ts +57 -0
- package/src/util/flatten_object.ts +45 -0
- package/src/util/hash.ts +11 -0
- package/src/util/icons.tsx +45 -0
- package/src/util/index.ts +20 -0
- package/src/util/join_collections.ts +172 -0
- package/src/util/make_properties_editable.ts +29 -0
- package/src/util/navigation_from_path.ts +107 -0
- package/src/util/navigation_utils.ts +111 -0
- package/src/util/objects.ts +168 -0
- package/src/util/os.ts +13 -0
- package/src/util/parent_references_from_path.ts +56 -0
- package/src/util/paths.ts +27 -0
- package/src/util/permissions.ts +80 -0
- package/src/util/plurals.ts +190 -0
- package/src/util/property_utils.tsx +130 -0
- package/src/util/references.ts +20 -0
- package/src/util/regexp.ts +32 -0
- package/src/util/resolutions.ts +399 -0
- package/src/util/storage.ts +92 -0
- package/src/util/strings.ts +62 -0
- package/src/util/useDebounce.ts +25 -0
- package/src/util/useStorageUploadController.tsx +243 -0
- package/src/util/useTraceUpdate.tsx +23 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,99 +1,7 @@
|
|
|
1
|
-
(function(o,$n){typeof exports=="object"&&typeof module<"u"?$n(exports,require("clsx"),require("tailwind-merge"),require("react/jsx-runtime"),require("react"),require("react-router-dom"),require("notistack"),require("@radix-ui/react-tooltip"),require("@material-design-icons/font/filled.css"),require("@radix-ui/react-collapsible"),require("@radix-ui/react-checkbox"),require("react-datepicker"),require("@radix-ui/react-dialog"),require("react-dropzone"),require("react-fast-compare"),require("markdown-it"),require("@radix-ui/react-dropdown-menu"),require("cmdk"),require("@radix-ui/react-select"),require("react-dom"),require("@radix-ui/react-tabs"),require("date-fns/format"),require("date-fns/locale"),require("object-hash"),require("@hello-pangea/dnd"),require("react-image-file-resizer"),require("formik"),require("react-markdown-editor-lite"),require("yup"),require("react-window"),require("react-use-measure"),require("@radix-ui/react-popover"),require("js-search"),require("@radix-ui/react-portal")):typeof define=="function"&&define.amd?define(["exports","clsx","tailwind-merge","react/jsx-runtime","react","react-router-dom","notistack","@radix-ui/react-tooltip","@material-design-icons/font/filled.css","@radix-ui/react-collapsible","@radix-ui/react-checkbox","react-datepicker","@radix-ui/react-dialog","react-dropzone","react-fast-compare","markdown-it","@radix-ui/react-dropdown-menu","cmdk","@radix-ui/react-select","react-dom","@radix-ui/react-tabs","date-fns/format","date-fns/locale","object-hash","@hello-pangea/dnd","react-image-file-resizer","formik","react-markdown-editor-lite","yup","react-window","react-use-measure","@radix-ui/react-popover","js-search","@radix-ui/react-portal"],$n):(o=typeof globalThis<"u"?globalThis:o||self,$n(o.FireCMS={},o.clsx,o.tailwindMerge,o.jsxRuntime,o.React,o.reactRouterDom,o.notistack,o.TooltipPrimitive,null,o.Collapsible,o.CheckboxPrimitive,o.DatePicker,o.DialogPrimitive,o.reactDropzone,o.equal,o.MarkdownIt,o.DropdownMenu,o.cmdk,o.SelectPrimitive,o.ReactDOM,o.TabsPrimitive,o.format,o.locales,o.hash,o.dnd,o.Resizer,o.formik,o.MdEditor,o.yup,o.reactWindow,o.useMeasure,o.PopoverPrimitive,o.JsSearch,o.Portal))})(this,function(o,$n,Ia,n,f,Ie,Wt,ba,oU,pa,wa,Ro,ka,er,de,Gt,ma,go,va,Ka,Ca,Sa,Ba,zt,Kn,Ea,Fe,_n,Fa,Pa,nr,Da,Na,Ma){"use strict";function Pe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const i=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(t,c,i.get?i:{enumerable:!0,get:()=>e[c]})}}return t.default=e,Object.freeze(t)}const ce=Pe(f),jn=Pe(ba),qn=Pe(pa),Ht=Pe(wa),$e=Pe(ka),Jn=Pe(ma),je=Pe(va),Ta=Pe(Ka),or=Pe(Ca),Ut=Pe(Ba),De=Pe(Fa),Zn=Pe(Da),Oa=Pe(Na),La=Pe(Ma);function E(...e){return Ia.twMerge($n.clsx(e))}const Qa={breadcrumbs:[],set:e=>{}},Yt=f.createContext(Qa),Va=({children:e})=>{const[t,c]=f.useState([]),i=l=>{c(l.breadcrumbs)};return n.jsx(Yt.Provider,{value:{breadcrumbs:t,set:i},children:e})},Wa={mode:"light",setMode:e=>{},toggleMode:()=>{}},rr=f.createContext(Wa),Ga=rr.Provider;function za(e){return e.includes("-")||e.includes("_")||!e.includes(" ")?e.replace(/[-_]/g," ").replace(/\w\S*/g,function(c){return c.charAt(0).toUpperCase()+c.substr(1)}):e}function be(e){return $t(jt(e))}function $t(e){return e.startsWith("/")?e.slice(1):e}function jt(e){return e.endsWith("/")?e.slice(0,-1):e}function Ha(e){return e.startsWith("/")?e:`/${e}`}function Ua(e){const t=be(e);if(t.includes("/")){const c=t.split("/");return c[c.length-1]}return t}function tr(e,t){const c=be(e),i=c.split("/");if(i.length%2===0)throw Error(`Collection paths must have an odd number of segments: ${e}`);const l=t.find(s=>s.alias===i[0]);let a;if(l&&(a=l.path),i.length>1){const s=Io(a??i[0],t);if(!s?.subcollections)return c;const d=c.split("/").slice(2).join("/");return(a??i[0])+"/"+i[1]+"/"+tr(d,s.subcollections)}else return a??c}function Io(e,t){const c=be(e).split("/");if(c.length%2===0)throw Error(`Collection paths must have an odd number of segments: ${e}`);const i=bo(c);let l;for(let a=0;a<i.length;a++){const s=i[a],d=t&&t.sort((u,A)=>(u.alias??"").localeCompare(A.alias??"")).find(u=>u.alias===s||u.path===s);if(d){if(s===e)l=d;else if(d.subcollections){const u=e.replace(s,"").split("/").slice(2).join("/");u.length>0&&(l=Io(u,d.subcollections))}}if(l)break}return l}function bo(e){const t=e.length>0&&e.length%2===0?e.splice(0,e.length-1):e,c=t.length,i=[];for(let l=c;l>0;l=l-2)i.push(t.slice(0,l).join("/"));return i}function cr(e){const{path:t,collections:c=[],currentFullPath:i}=e,l=be(t).split("/"),a=bo(l),s=[];for(let d=0;d<a.length;d++){const u=a[d],A=c&&c.find(_=>_.alias===u||_.path===u);if(A){const _=A.alias??A.path,g=i&&i.length>0?i+"/"+_:_;s.push({type:"collection",path:g,collection:A});const y=be(be(t).replace(u,"")),h=y.length>0?y.split("/"):[];if(h.length>0){const I=h[0],b=g+"/"+I;if(s.push({type:"entity",entityId:I,path:g,parentCollection:A}),h.length>1){const p=h.slice(1).join("/");if(!A)throw Error("collection not found resolving path: "+A);const w=A.views,k=w&&w.find(K=>K.key===p);if(k){const K=i&&i.length>0?i+"/"+k.key:k.key;s.push({type:"custom_view",path:K,view:k})}else A.subcollections&&s.push(...cr({path:p,customViews:w,collections:A.subcollections,currentFullPath:b}))}}break}}return s}const qt=f.createContext({}),Qe=()=>f.useContext(qt),Jt=f.createContext({}),Ae=()=>f.useContext(Jt),ir=f.createContext({}),yn=()=>f.useContext(ir),Zt=f.createContext({}),Xn=()=>f.useContext(Zt),Xt=f.createContext({}),Cn=()=>f.useContext(Xt),xt=f.createContext({}),Sn=()=>f.useContext(xt),cn=()=>{const{enqueueSnackbar:e,closeSnackbar:t}=Wt.useSnackbar(),c=f.useCallback(l=>{const{type:a,message:s,autoHideDuration:d}=l;e({message:s,variant:a,autoHideDuration:d})},[]),i=f.useCallback(()=>{t()},[]);return f.useMemo(()=>({open:c,close:i}),[c,i])},Rt=f.createContext(void 0),Bn=()=>f.useContext(Rt),ar=f.createContext({sideDialogsController:{},sideEntityController:{},navigation:{},dataSource:{},storageSource:{},authController:{},snackbarController:{},fields:{}}),re=()=>{const e=f.useContext(ar),t=yn(),c=Xn(),i=Cn(),l=Ae(),a=Qe(),s=Sn(),d=cn(),u=Bn();return{...e,authController:t,sideDialogsController:c,sideEntityController:i,navigation:l,dataSource:a,storageSource:s,snackbarController:d,userConfigPersistence:u}};function ec({path:e,collection:t,filterValues:c,sortBy:i,itemCount:l,searchString:a}){const s=Qe(),u=Ae().resolveAliasesFrom(e),A=i?i[0]:void 0,_=i?i[1]:void 0,g=re(),[y,h]=f.useState([]),[I,b]=f.useState(!1),[p,w]=f.useState(),[k,K]=f.useState(!1);return f.useEffect(()=>{b(!0);const m=async S=>{if(t.callbacks?.onFetch)try{S=await Promise.all(S.map(B=>t.callbacks.onFetch({collection:t,path:u,entity:B,context:g})))}catch(B){console.error(B)}b(!1),w(void 0),h(S.map(B=>({...B}))),K(!l||S.length<l)},v=S=>{console.error("ERROR",S),b(!1),h([]),w(S)};return s.listenCollection?s.listenCollection({path:u,collection:t,onUpdate:m,onError:v,searchString:a,filter:c,limit:l,startAfter:void 0,orderBy:A,order:_}):(s.fetchCollection({path:u,collection:t,searchString:a,filter:c,limit:l,startAfter:void 0,orderBy:A,order:_}).then(m).catch(v),()=>{})},[u,l,_,A,c,a]),{data:y,dataLoading:I,dataLoadingError:p,noMoreToLoad:k}}const lr={};function sr({path:e,entityId:t,collection:c,useCache:i=!1}){const l=Qe(),s=Ae().resolveAliasesFrom(e),d=re(),[u,A]=f.useState(),[_,g]=f.useState(!0),[y,h]=f.useState();return f.useEffect(()=>{g(!0);const I=async p=>{if(c.callbacks?.onFetch&&p)try{p=await c.callbacks.onFetch({collection:c,path:s,entity:p,context:d})}catch(w){console.error(w)}lr[`${s}/${t}`]=p,A(p),g(!1),h(void 0)},b=p=>{console.error("ERROR fetching entity",p),g(!1),A(void 0),h(p)};return t&&i&&lr[`${s}/${t}`]?(A(lr[`${s}/${t}`]),g(!1),h(void 0),()=>{}):t&&s&&c?l.listenEntity?l.listenEntity({path:s,entityId:t,collection:c,onUpdate:I,onError:b}):(l.fetchEntity({path:s,entityId:t,collection:c}).then(I).catch(b),()=>{}):(I(void 0),()=>{})},[t,s]),{entity:u,dataLoading:_,dataLoadingError:y}}async function dr({collection:e,path:t,entityId:c,values:i,previousValues:l,status:a,dataSource:s,context:d,onSaveSuccess:u,onSaveFailure:A,onPreSaveHookError:_,onSaveSuccessHookError:g}){let y;const h=d.navigation.resolveAliasesFrom(t),I=e.callbacks;if(I?.onPreSave)try{const b=Me({collection:e,path:t,values:l,entityId:c,fields:d.fields});y=await I.onPreSave({collection:b,path:t,resolvedPath:h,entityId:c,values:i,previousValues:l,status:a,context:d})}catch(b){console.error(b),_&&_(b);return}else y=i;return s.saveEntity({collection:e,path:h,entityId:c,values:y,previousValues:l,status:a}).then(b=>{try{if(I?.onSaveSuccess){const p=Me({collection:e,path:t,values:y,entityId:c,fields:d.fields});I.onSaveSuccess({collection:p,path:t,resolvedPath:h,entityId:b.id,values:y,previousValues:l,status:a,context:d})}}catch(p){g&&g(p)}u&&u(b)}).catch(b=>{if(I?.onSaveFailure){const p=Me({collection:e,path:t,values:y,entityId:c,fields:d.fields});I.onSaveFailure({collection:p,path:t,resolvedPath:h,entityId:c,values:y,previousValues:l,status:a,context:d})}A&&A(b)})}async function nc({dataSource:e,entity:t,collection:c,callbacks:i,onDeleteSuccess:l,onDeleteFailure:a,onPreDeleteHookError:s,onDeleteSuccessHookError:d,context:u}){console.debug("Deleting entity",t.path,t.id);const A={entity:t,collection:c,entityId:t.id,path:t.path,context:u};if(i?.onPreDelete)try{await i.onPreDelete(A)}catch(_){return console.error(_),s&&s(t,_),!1}return e.deleteEntity({entity:t}).then(()=>{l&&l(t);try{return i?.onDelete&&i.onDelete(A),!0}catch(_){return d&&d(t,_),!1}}).catch(_=>(a&&a(t,_),!1))}function Ne({property:e,value:t,setValue:c}){const i=f.useRef(null);f.useEffect(()=>{typeof e.disabled=="object"&&!!e.disabled.clearOnDisabled?t!=null&&(i.current=t,c(null)):i.current&&(c(i.current),i.current=null)},[e])}function oc({path:e,context:t}){const c=t.dataSource,i=t.navigation;if(!i)throw Error("Calling getNavigationFrom, but main navigation has not yet been initialised");const a=cr({path:e,collections:i.collections??[]}).map(s=>{if(s.type==="collection")return Promise.resolve(s);if(s.type==="entity"){const d=i.getCollection(s.path,s.entityId);if(!d)throw Error(`No collection defined in the navigation for the entity with path ${s.path}`);return c.fetchEntity({path:s.path,entityId:s.entityId,collection:d}).then(u=>{if(u)return{...s,entity:u}})}else{if(s.type==="custom_view")return Promise.resolve(s);throw Error("Unmapped element in useEntitiesFromPath")}}).filter(s=>!!s);return Promise.all(a)}function Ya({path:e}){const t=re(),[c,i]=f.useState(),[l,a]=f.useState(!1),[s,d]=f.useState();return f.useEffect(()=>{t.navigation&&(a(!0),d(void 0),oc({path:e,context:t}).then(A=>{i(A)}).catch(A=>d(A)).finally(()=>a(!1)))},[e,t]),t.navigation?{data:c,dataLoading:l,dataLoadingError:s}:{dataLoading:!0}}const ur=()=>f.useContext(rr),rc=e=>{const{onSuccess:t,onError:c,disableClipboardAPI:i=!1,copiedDuration:l}=e||{},a=f.useRef(null),[s,d]=f.useState(!1),[u,A]=f.useState("");f.useEffect(()=>{l&&setTimeout(()=>d(!1),l)},[s]);const _=()=>navigator.clipboard!==void 0,g=f.useCallback(k=>{if(c)c(k);else throw new Error(k)},[c]),y=f.useCallback(k=>{t&&t(k),d(!0),A(k)},[t]),h=f.useCallback(k=>{navigator.clipboard.writeText(k).then(()=>y(k)).catch(K=>{g(K),d(!1)})},[g,y]),I=()=>{_()&&navigator.clipboard.writeText("")},b=k=>w("copy",typeof k=="object"?void 0:k),p=()=>w("cut"),w=f.useCallback((k="copy",K)=>{const m=a.current,v=m&&(m.tagName==="INPUT"||m.tagName==="TEXTAREA"),S=a.current;_()&&!i&&(K?h(K):m?v?(h(S.value),k==="cut"&&(S.value="")):h(m.innerText):g("Both the ref & text were undefined"))},[i,h,g]);return{ref:a,isCoppied:s,clipboard:u,clearClipboard:I,isSupported:_,copy:b,cut:p}},fr=()=>f.useContext(Yt),$a={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536,"3xl":1920},Ge=(e="lg")=>{const[t,c]=f.useState(!1);return f.useEffect(()=>{const i=()=>{const l=window.matchMedia(`(min-width: ${$a[e]+1}px)`).matches;c(l)};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[]),t};function xn(e){const t=Ae(),c=Xn(),i=f.useCallback(()=>{if(e.path){let a=e.collection;if(a||(a=t.getCollection(e.path)),!a)throw Error("Not able to resolve the collection in useReferenceDialog");c.open({key:`reference_${e.path}`,component:n.jsx(ra,{collection:a,...e}),width:"90vw",onClose:()=>{e.onClose?.()}})}else throw Error("useReferenceDialog: You are trying to open a reference dialog, but have not declared the `path`")},[t,e,c]),l=f.useCallback(()=>{c.close()},[c]);return{open:i,close:l}}const ja=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAASAAAAEgARslrPgAAB9pJREFUWMONl12obVUVx39jzLk+9j7nHq9y1QT1qpcbSIaXQFGs24PQl3HroSQyqHwJFJF6qaceCsqQoJdELHoIC6EeJCSKsi/TFLGozGsKXksljRLxnrP3WmvOOUYPa+19zsmPWpux5pxrzTX///Exx5hb+B/X1y+/nuIlVKF5m0v1YbQ55tIcKTQXFerNQkumOZ1oTiXCqUH8saR+74L8ZIWWux7+7JuuL2/04s5jJyhWQlXV71KtbhCtr1WtD6s0KlrjNBRaEi3JGzpv6bymQ0sn9mwv9otB7Ls7kn9Xo+U7D9z8/xG4+bz3cs35SjE/HEK8NWr8RBOrs+tQUUlEtAYaijRkbxmY0fuMzucsfcbSWnZQtiWxJL3Uid09iH0jIM8/1f+d3/zuS29M4PvHrmG+cZA8dMdjiLfNYrx6owrMVKlVUQkgkeI1iYbBJ3A2WPpKNtnx+UQisy29L0gPDGKfrwkPn2bJPfd/Zo0ZVp0fvOOdnLGxheX+A/Mq3nGwqS8/q645o4psxkgbhFqdSgqVJKIkghgqjuDoWh+dlm1AI0gUC3o4C9d04idbmZ06euQDPPHMj3YJ3HnkrZx98Fys2PFZ1dxxsJkdPbOecaBqmcWGqBVBIkEiKkoQJ5IJJBTbY8aRgBMwjxgVJoJJwDScnYUrOy2PBamfv/CS4zz9zE+IAIfPuQQzPzyrmq9u1e3RM+qWeaipNCCiE4DjbjgF94xZQj2htpjeK84ImqlIUpO9JllgEKgJDFpfOoh8paN8chbOeQ4g/OTq97PdLXSz3fjiVjO7/sx6g804ow41QWuCrjQPBB3bkZQgAkpBJOMojmIEjIgRKV6RpaYIZHGKQlK5OIv0L8bul8eOfsxjDJGD8613z6rmhq1qxkY1o9YKFUFEEED2xqoE1MNoWgPBwQZMl2SrSbQM9NQyUMlA5S3Rlcqd6E50RdRvPMvn9yE8qP9+9WWtQvXxzdic8xrwPaJrUYJGoq4sVBM1Ukuiln4UBipJVJrGoHUhrARB0XMQ/cizbSd61uaZlzUhXjuvWmqt9oOyAmUPEabnkSDV2j0Rp2YgksZdQpoCtRBwAiN4cKYdw4m3pNnbY9Tw4SZUh9tQEda+ld1WpmThgoivU8fYDbgEggRcleiZ6BOoFNRXLQQX1Eelggsgh8GPx6DhWB2iRgkj2OTuVX8dBzJtMx93BAKK4hIwUUSEID4BGspecWTfDwSCw+UxqByJoqPf9+xmYWQg7H3u+5Poyk3o5BZDxRBxxH29fdkF3YcBXKHgF+m+hLxn4OvbnnbPzMkjsm/+f5cXec2ye6ZfpO6+OX7pE8TqPj1zcN/7Zu8CDm44Bu6skrKjuOs0FlxWCJNMYxMOqLlR3DAvsAKaZo6t7+u7r6nhjN/5RKIQKESKhykhjeIINgJi+0m4Fiuns2WKZQybtJ2AfAWzGu/ayt0wz5gXimeKQyKSPI4kiCMhDxSgyLiOiY9kxnW2NVs+1ZeBbAmzhLmtgd0d8z1k1mIUTxQbKD5gnkmuDN6QvCF5TaIie0UmkIU1id3WcfwZHUo61eWB3gayDdOiZR+JXUuMWmcbyGWcny2RzOi8obeWwRsGrxm8JlGPBHCyOJmpJkwkHHs09pnfL1L60KLqtBKZtprhU+lVmSq9+xRsBfOMW6L4QLFM7zWdz+l8Ru8tA+10YKlJIiSxkcC6dQqlmJc/xaHIvTuZT7UpHalFUHEqL6iGsfKtM8FEzMdy7J4oXui9mk5CczpGErtEKgacQUZJE3gSwzw/i+dfx2G7e6IcOPALCXIkakGkYx4iwceyq+uENPp+RSI7DN7Q+5ylb7JgJLH0+XRGbOlRerWJwNgmnOwJ83Tvq/7KX2KZb1nJfnfp5YRoda7hFC/MQyGI7Mteow2E4pHkDT2zyfS758HV4bSjolOjF2PYS4KBbN2L5vmHZ7DpsWQnDsvfLj1+Lwufy9LSO2y5M1Mnik8OEJxAoSJRk7xhoKX3+URiztI3WPgGS2/p1OnE6CcSvRQGH+htQfH07dPSP7Lp9ajcNy+9DnG/oMT67qqZHz/QtGxVyjworQqVCIjiPiaaTD1ttZZ+fTIeCXQ+Y6HCQm0tO5LYpmfHlyy9/1nCPi3ICw/99JbxUHrdvxr6Q4depdhTfeGapVeH+imKxwhv6ZnR+5zeN0aNGU2+ZIPON0cX0LBQYSnGQgsLSSzoWdiCHVvQ2fLP2fMtwf2vDz50K6TpVPxj/sn7Ni5iu9l6Tof+yd78yoWFQ0uvWYvVLK1h6e34B8RnY9DZnIW3LAijxpLYkZ6Fd+z4km3bYcd2WNry8ezppsZ5ZMd2+MfTv3xtjbr9/PfwyoFDzPvtq7I2t+Vq/m6pt4hxThVaojao1CANRkORmkwkiTCI00thKYWOzJJR+6V1JE8/z2JfqGgfW9jLPPLg7a9Xe8frHs7j5MVXESxfmLS5KYXmxhQ3z/a4icQNRFtEGlwjJkoRIamTmIKNTE+it57kw0sF+1ah3CkSXkiPf42Htl+3WL/2+vIFJ6ishJ3QXD1o9dEhVCcGbS7ModUcakwrigaKChkoYmQK2XMp5L8V/F7DfuDePYrEcv8f7npdnDcksEvkg9RewquhuayTcHzQeCyJXpFVD2fRzSxCFtkuwqks8mjB/ujYr9y6k0gs9528503X/w/F3eUgyIBI4wAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNS0xMFQxOToyODozMyswMDowMEzeSx4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDUtMTBUMTk6Mjg6MzMrMDA6MDA9g/OiAAAARnRFWHRzb2Z0d2FyZQBJbWFnZU1hZ2ljayA2LjcuOC05IDIwMTQtMDUtMTIgUTE2IGh0dHA6Ly93d3cuaW1hZ2VtYWdpY2sub3Jn3IbtAAAAABh0RVh0VGh1bWI6OkRvY3VtZW50OjpQYWdlcwAxp/+7LwAAABh0RVh0VGh1bWI6OkltYWdlOjpoZWlnaHQAMTkyDwByhQAAABd0RVh0VGh1bWI6OkltYWdlOjpXaWR0aAAxOTLTrCEIAAAAGXRFWHRUaHVtYjo6TWltZXR5cGUAaW1hZ2UvcG5nP7JWTgAAABd0RVh0VGh1bWI6Ok1UaW1lADE2MjA2NzQ5MTMk8oswAAAAD3RFWHRUaHVtYjo6U2l6ZQAwQkKUoj7sAAAAVnRFWHRUaHVtYjo6VVJJAGZpbGU6Ly8vbW50bG9nL2Zhdmljb25zLzIwMjEtMDUtMTAvOGIxNDNhYjgwODhkMjBlZThkYmUzOTFhN2NkNmQ3NmQuaWNvLnBuZ9msgG0AAAAASUVORK5CYII=
|
|
2
|
-
`;function qa(e,t){f.useEffect(()=>{if(document){document.title=`${e} - FireCMS`;let c=document.querySelector("link[rel~='icon']");c||(c=document.createElement("link"),c.rel="icon",document.getElementsByTagName("head")[0].appendChild(c)),c.href=t??ja}},[e,t])}function En(e,t){f.useEffect(()=>{if(!document.getElementById(e)){const i=document.createElement("style");i.id=e,i.innerHTML=t,document.head.appendChild(i)}},[e,t])}const ye=({open:e,side:t="bottom",sideOffset:c,onOpenChange:i,title:l,className:a,style:s,tooltipClassName:d,children:u})=>(En("Tooltip",Ja),l?n.jsx(jn.Provider,{delayDuration:250,children:n.jsxs(jn.Root,{open:e,onOpenChange:i,children:[n.jsx(jn.Trigger,{asChild:!0,children:n.jsx("div",{className:a,style:s,children:u})}),n.jsx(jn.Portal,{children:n.jsx(jn.Content,{className:E("TooltipContent","max-w-lg leading-relaxed","z-50 rounded px-3 py-2 text-xs leading-none bg-gray-700 dark:bg-gray-800 bg-opacity-90 font-medium text-gray-50 shadow-2xl select-none duration-400 ease-in transform opacity-100",d),sideOffset:c===void 0?4:c,side:t,children:l})})]})}):n.jsx(n.Fragment,{children:u})),Ja=`
|
|
3
|
-
|
|
4
|
-
.TooltipContent {
|
|
5
|
-
animation-duration: 220ms;
|
|
6
|
-
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
7
|
-
will-change: transform, opacity;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.TooltipContent[data-state='delayed-open'][data-side='top'] {
|
|
11
|
-
animation-name: slideDownAndFade;
|
|
12
|
-
}
|
|
13
|
-
.TooltipContent[data-state='delayed-open'][data-side='right'] {
|
|
14
|
-
animation-name: slideLeftAndFade;
|
|
15
|
-
}
|
|
16
|
-
.TooltipContent[data-state='delayed-open'][data-side='bottom'] {
|
|
17
|
-
animation-name: slideUpAndFade;
|
|
18
|
-
}
|
|
19
|
-
.TooltipContent[data-state='delayed-open'][data-side='left'] {
|
|
20
|
-
animation-name: slideRightAndFade;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@keyframes slideUpAndFade {
|
|
25
|
-
from {
|
|
26
|
-
opacity: 0;
|
|
27
|
-
transform: translateY(4px);
|
|
28
|
-
}
|
|
29
|
-
to {
|
|
30
|
-
opacity: 1;
|
|
31
|
-
transform: translateY(0);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@keyframes slideRightAndFade {
|
|
36
|
-
from {
|
|
37
|
-
opacity: 0;
|
|
38
|
-
transform: translateX(-4px);
|
|
39
|
-
}
|
|
40
|
-
to {
|
|
41
|
-
opacity: 1;
|
|
42
|
-
transform: translateX(0);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@keyframes slideDownAndFade {
|
|
47
|
-
from {
|
|
48
|
-
opacity: 0;
|
|
49
|
-
transform: translateY(-4px);
|
|
50
|
-
}
|
|
51
|
-
to {
|
|
52
|
-
opacity: 1;
|
|
53
|
-
transform: translateY(0);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@keyframes slideLeftAndFade {
|
|
58
|
-
from {
|
|
59
|
-
opacity: 0;
|
|
60
|
-
transform: translateX(4px);
|
|
61
|
-
}
|
|
62
|
-
to {
|
|
63
|
-
opacity: 1;
|
|
64
|
-
transform: translateX(0);
|
|
65
|
-
}
|
|
66
|
-
}`;function tc(e){return n.jsx(ye,{...e,tooltipClassName:"!text-red-500 bg-red-50",children:e.children})}const ge="focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-transparent",Ar="focus:bg-opacity-70 focus:bg-gray-100 focus:dark:bg-gray-800 focus:dark:bg-opacity-60",_r="z-30 outline-none ring-2 ring-primary ring-opacity-75 ring-offset-2 ring-offset-transparent ",qe="bg-opacity-70 bg-gray-100 dark:bg-gray-800 dark:bg-opacity-60 transition duration-150 ease-in-out",yr="bg-opacity-0 bg-gray-100 dark:bg-gray-800 dark:bg-opacity-0 transition duration-150 ease-in-out",en="bg-opacity-100 dark:bg-opacity-90",ze="hover:bg-opacity-90 dark:hover:bg-opacity-90",ue="border-gray-100 dark:border-gray-800 dark:border-opacity-80",He="bg-white rounded-md dark:bg-gray-950 border dark:border-gray-800 dark:border-opacity-90 border-gray-100",cc="bg-white rounded-md dark:bg-gray-950 dark:border-gray-800 dark:border-opacity-50 transition duration-200 ease-in-out m-1 -p-1 border border-transparent",ic="hover:bg-blue-100 dark:hover:bg-blue-900 hover:bg-opacity-20 dark:hover:bg-opacity-20 hover:ring-2 cursor-pointer",Za="bg-blue-100 dark:bg-blue-900 bg-opacity-30 dark:bg-opacity-10 ring-1 ring-primary ring-opacity-75",ac={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",label:"label",body1:"p",body2:"p",inherit:"p",caption:"p",button:"span"},Xa={inherit:"text-inherit",initial:"text-current",primary:"text-text-primary dark:text-text-primary-dark",secondary:"text-text-secondary dark:text-text-secondary-dark",disabled:"text-text-disabled dark:text-text-disabled-dark",error:"text-red-600 dark:text-red-500"},xa={h1:"text-6xl font-headers font-light",h2:"text-5xl font-headers font-light",h3:"text-4xl font-headers font-normal",h4:"text-3xl font-headers font-normal",h5:"text-2xl font-headers font-normal",h6:"text-xl font-headers font-medium",subtitle1:"text-lg font-headers font-medium",subtitle2:"text-base font-headers font-medium",body1:"text-base",body2:"text-sm",label:"text-sm font-medium text-gray-500",inherit:"text-inherit",caption:"text-xs",button:"text-sm font-medium"};function j({align:e="inherit",color:t="primary",children:c,className:i,component:l,gutterBottom:a=!1,noWrap:s=!1,paragraph:d=!1,variant:u="body1",variantMapping:A=ac,style:_,onClick:g,...y}){const h=l||(d?"p":A[u]||ac[u])||"span",I=E(ge,xa[u],t?Xa[t]:"",e!=="inherit"&&`text-${e}`,a&&"mb-[0.35em]",s&&"truncate",d&&"mb-4",i);return n.jsx(h,{className:I,onClick:g,style:_,...y,children:c})}const hr=["table_rows","video_label","airlines","bento","border_all","border_clear","ac_unit","adjust","align_horizontal_center","album","all_inclusive","all_out","animation","assistant","audiotrack","account_balance_wallet","auto_awesome_mosaic","bolt","brightness_1","breakfast_dining","broken_image","brightness_5","cable","calendar_view_month","catching_pokemon","casino","category","cloud","color_lens","credit_card","earbuds","egg_alt","fiber_smart_record","flag","healing","heat_pump","hive","hub","local_library","local_pizza","memory","outlet","pages","panorama_photosphere","signal_cellular_0_bar","sports_baseball","storm","stairs"],lc=["search","123","360","10k","10mp","11mp","12mp","13mp","14mp","15mp","16mp","17mp","18_up_rating","18mp","19mp","1k","1k_plus","1x_mobiledata","20mp","21mp","22mp","23mp","24mp","2k","2k_plus","2mp","30fps","30fps_select","3d_rotation","3g_mobiledata","3k","3k_plus","3mp","3p","4g_mobiledata","4g_plus_mobiledata","4k","4k_plus","4mp","5g","5k","5k_plus","5mp","60fps","60fps_select","6_ft_apart","6k","6k_plus","6mp","7k","7k_plus","7mp","8k","8k_plus","8mp","9k","9k_plus","9mp","abc","ac_unit","access_alarm","access_alarms","access_time","access_time_filled","accessibility","accessibility_new","accessible","accessible_forward","account_balance","account_balance_wallet","account_box","account_circle","account_tree","ad_units","adb","add","add_a_photo","add_alarm","add_alert","add_box","add_business","add_card","add_chart","add_circle","add_circle_outline","add_comment","add_home","add_home_work","add_ic_call","add_link","add_location","add_location_alt","add_moderator","add_photo_alternate","add_reaction","add_road","add_shopping_cart","add_task","add_to_drive","add_to_home_screen","add_to_photos","add_to_queue","adf_scanner","adjust","admin_panel_settings","ads_click","agriculture","air","airline_seat_flat","airline_seat_flat_angled","airline_seat_individual_suite","airline_seat_legroom_extra","airline_seat_legroom_normal","airline_seat_legroom_reduced","airline_seat_recline_extra","airline_seat_recline_normal","airline_stops","airlines","airplane_ticket","airplanemode_active","airplanemode_inactive","airplay","airport_shuttle","alarm","alarm_add","alarm_off","alarm_on","album","align_horizontal_center","align_horizontal_left","align_horizontal_right","align_vertical_bottom","align_vertical_center","align_vertical_top","all_inbox","all_inclusive","all_out","alt_route","alternate_email","analytics","anchor","android","animation","announcement","aod","apartment","api","app_blocking","app_registration","app_settings_alt","app_shortcut","approval","apps","apps_outage","architecture","archive","area_chart","arrow_back","arrow_back_ios","arrow_back_ios_new","arrow_circle_down","arrow_circle_left","arrow_circle_right","arrow_circle_up","arrow_downward","arrow_drop_down","arrow_drop_down_circle","arrow_drop_up","arrow_forward","arrow_forward_ios","arrow_left","arrow_outward","arrow_right","arrow_right_alt","arrow_upward","art_track","article","aspect_ratio","assessment","assignment","assignment_ind","assignment_late","assignment_return","assignment_returned","assignment_turned_in","assist_walker","assistant","assistant_direction","assistant_photo","assured_workload","atm","attach_email","attach_file","attach_money","attachment","attractions","attribution","audio_file","audiotrack","auto_awesome","auto_awesome_mosaic","auto_awesome_motion","auto_delete","auto_fix_high","auto_fix_normal","auto_fix_off","auto_graph","auto_mode","auto_stories","autofps_select","autorenew","av_timer","baby_changing_station","back_hand","backpack","backspace","backup","backup_table","badge","bakery_dining","balance","balcony","ballot","bar_chart","batch_prediction","bathroom","bathtub","battery_0_bar","battery_1_bar","battery_2_bar","battery_3_bar","battery_4_bar","battery_5_bar","battery_6_bar","battery_alert","battery_charging_full","battery_full","battery_saver","battery_std","battery_unknown","beach_access","bed","bedroom_baby","bedroom_child","bedroom_parent","bedtime","bedtime_off","beenhere","bento","bike_scooter","biotech","blender","blind","blinds","blinds_closed","block","bloodtype","bluetooth","bluetooth_audio","bluetooth_connected","bluetooth_disabled","bluetooth_drive","bluetooth_searching","blur_circular","blur_linear","blur_off","blur_on","bolt","book","book_online","bookmark","bookmark_add","bookmark_added","bookmark_border","bookmark_remove","bookmarks","border_all","border_bottom","border_clear","border_color","border_horizontal","border_inner","border_left","border_outer","border_right","border_style","border_top","border_vertical","boy","branding_watermark","breakfast_dining","brightness_1","brightness_2","brightness_3","brightness_4","brightness_5","brightness_6","brightness_7","brightness_auto","brightness_high","brightness_low","brightness_medium","broadcast_on_home","broadcast_on_personal","broken_image","browse_gallery","browser_not_supported","browser_updated","brunch_dining","brush","bubble_chart","bug_report","build","build_circle","bungalow","burst_mode","bus_alert","business","business_center","cabin","cable","cached","cake","calculate","calendar_month","calendar_today","calendar_view_day","calendar_view_month","calendar_view_week","call","call_end","call_made","call_merge","call_missed","call_missed_outgoing","call_received","call_split","call_to_action","camera","camera_alt","camera_enhance","camera_front","camera_indoor","camera_outdoor","camera_rear","camera_roll","cameraswitch","campaign","cancel","cancel_presentation","cancel_schedule_send","candlestick_chart","car_crash","car_rental","car_repair","card_giftcard","card_membership","card_travel","carpenter","cases","casino","cast","cast_connected","cast_for_education","castle","catching_pokemon","category","celebration","cell_tower","cell_wifi","center_focus_strong","center_focus_weak","chair","chair_alt","chalet","change_circle","change_history","charging_station","chat","chat_bubble","chat_bubble_outline","check","check_box","check_box_outline_blank","check_circle","check_circle_outline","checklist","checklist_rtl","checkroom","chevron_left","chevron_right","child_care","child_friendly","chrome_reader_mode","church","circle","circle_notifications","class","clean_hands","cleaning_services","clear","clear_all","close","close_fullscreen","closed_caption","closed_caption_disabled","closed_caption_off","cloud","cloud_circle","cloud_done","cloud_download","cloud_off","cloud_queue","cloud_sync","cloud_upload","co2","co_present","code","code_off","coffee","coffee_maker","collections","collections_bookmark","color_lens","colorize","comment","comment_bank","comments_disabled","commit","commute","compare","compare_arrows","compass_calibration","compost","compress","computer","confirmation_number","connect_without_contact","connected_tv","connecting_airports","construction","contact_emergency","contact_mail","contact_page","contact_phone","contact_support","contactless","contacts","content_copy","content_cut","content_paste","content_paste_go","content_paste_off","content_paste_search","contrast","control_camera","control_point","control_point_duplicate","cookie","copy_all","copyright","coronavirus","corporate_fare","cottage","countertops","create","create_new_folder","credit_card","credit_card_off","credit_score","crib","crisis_alert","crop","crop_16_9","crop_3_2","crop_5_4","crop_7_5","crop_din","crop_free","crop_landscape","crop_original","crop_portrait","crop_rotate","crop_square","cruelty_free","css","currency_bitcoin","currency_exchange","currency_franc","currency_lira","currency_pound","currency_ruble","currency_rupee","currency_yen","currency_yuan","curtains","curtains_closed","cyclone","dangerous","dark_mode","dashboard","dashboard_customize","data_array","data_exploration","data_object","data_saver_off","data_saver_on","data_thresholding","data_usage","dataset","dataset_linked","date_range","deblur","deck","dehaze","delete","delete_forever","delete_outline","delete_sweep","delivery_dining","density_large","density_medium","density_small","departure_board","description","deselect","design_services","desk","desktop_access_disabled","desktop_mac","desktop_windows","details","developer_board","developer_board_off","developer_mode","device_hub","device_thermostat","device_unknown","devices","devices_fold","devices_other","dialer_sip","dialpad","diamond","difference","dining","dinner_dining","directions","directions_bike","directions_boat","directions_boat_filled","directions_bus","directions_bus_filled","directions_car","directions_car_filled","directions_off","directions_railway","directions_railway_filled","directions_run","directions_subway","directions_subway_filled","directions_transit","directions_transit_filled","directions_walk","dirty_lens","disabled_by_default","disabled_visible","disc_full","discount","display_settings","diversity_1","diversity_2","diversity_3","dns","do_disturb","do_disturb_alt","do_disturb_off","do_disturb_on","do_not_disturb","do_not_disturb_alt","do_not_disturb_off","do_not_disturb_on","do_not_disturb_on_total_silence","do_not_step","do_not_touch","dock","document_scanner","domain","domain_add","domain_disabled","domain_verification","done","done_all","done_outline","donut_large","donut_small","door_back","door_front","door_sliding","doorbell","double_arrow","downhill_skiing","download","download_done","download_for_offline","downloading","drafts","drag_handle","drag_indicator","draw","drive_eta","drive_file_move","drive_file_move_rtl","drive_file_rename_outline","drive_folder_upload","dry","dry_cleaning","duo","dvr","dynamic_feed","dynamic_form","e_mobiledata","earbuds","earbuds_battery","east","edgesensor_high","edgesensor_low","edit","edit_attributes","edit_calendar","edit_location","edit_location_alt","edit_note","edit_notifications","edit_off","edit_road","egg","egg_alt","eject","elderly","elderly_woman","electric_bike","electric_bolt","electric_car","electric_meter","electric_moped","electric_rickshaw","electric_scooter","electrical_services","elevator","email","emergency","emergency_recording","emergency_share","emoji_emotions","emoji_events","emoji_food_beverage","emoji_nature","emoji_objects","emoji_people","emoji_symbols","emoji_transportation","energy_savings_leaf","engineering","enhanced_encryption","equalizer","error","error_outline","escalator","escalator_warning","euro","euro_symbol","ev_station","event","event_available","event_busy","event_note","event_repeat","event_seat","exit_to_app","expand","expand_circle_down","expand_less","expand_more","explicit","explore","explore_off","exposure","exposure_neg_1","exposure_neg_2","exposure_plus_1","exposure_plus_2","exposure_zero","extension","extension_off","face","face_2","face_3","face_4","face_5","face_6","face_retouching_natural","face_retouching_off","fact_check","factory","family_restroom","fast_forward","fast_rewind","fastfood","favorite","favorite_border","fax","featured_play_list","featured_video","feed","feedback","female","fence","festival","fiber_dvr","fiber_manual_record","fiber_new","fiber_pin","fiber_smart_record","file_copy","file_download","file_download_done","file_download_off","file_open","file_present","file_upload","filter","filter_1","filter_2","filter_3","filter_4","filter_5","filter_6","filter_7","filter_8","filter_9","filter_9_plus","filter_alt","filter_alt_off","filter_b_and_w","filter_center_focus","filter_drama","filter_frames","filter_hdr","filter_list","filter_list_off","filter_none","filter_tilt_shift","filter_vintage","find_in_page","find_replace","fingerprint","fire_extinguisher","fire_hydrant_alt","fire_truck","fireplace","first_page","fit_screen","fitbit","fitness_center","flag","flag_circle","flaky","flare","flash_auto","flash_off","flash_on","flashlight_off","flashlight_on","flatware","flight","flight_class","flight_land","flight_takeoff","flip","flip_camera_android","flip_camera_ios","flip_to_back","flip_to_front","flood","fluorescent","flutter_dash","fmd_bad","fmd_good","folder","folder_copy","folder_delete","folder_off","folder_open","folder_shared","folder_special","folder_zip","follow_the_signs","font_download","font_download_off","food_bank","forest","fork_left","fork_right","format_align_center","format_align_justify","format_align_left","format_align_right","format_bold","format_clear","format_color_fill","format_color_reset","format_color_text","format_indent_decrease","format_indent_increase","format_italic","format_line_spacing","format_list_bulleted","format_list_numbered","format_list_numbered_rtl","format_overline","format_paint","format_quote","format_shapes","format_size","format_strikethrough","format_textdirection_l_to_r","format_textdirection_r_to_l","format_underlined","fort","forum","forward","forward_10","forward_30","forward_5","forward_to_inbox","foundation","free_breakfast","free_cancellation","front_hand","fullscreen","fullscreen_exit","functions","g_mobiledata","g_translate","gamepad","games","garage","gas_meter","gavel","generating_tokens","gesture","get_app","gif","gif_box","girl","gite","golf_course","gpp_bad","gpp_good","gpp_maybe","gps_fixed","gps_not_fixed","gps_off","grade","gradient","grading","grain","graphic_eq","grass","grid_3x3","grid_4x4","grid_goldenratio","grid_off","grid_on","grid_view","group","group_add","group_off","group_remove","group_work","groups","groups_2","groups_3","h_mobiledata","h_plus_mobiledata","hail","handshake","handyman","hardware","hd","hdr_auto","hdr_auto_select","hdr_enhanced_select","hdr_off","hdr_off_select","hdr_on","hdr_on_select","hdr_plus","hdr_strong","hdr_weak","headphones","headphones_battery","headset","headset_mic","headset_off","healing","health_and_safety","hearing","hearing_disabled","heart_broken","heat_pump","height","help","help_center","help_outline","hevc","hexagon","hide_image","hide_source","high_quality","highlight","highlight_alt","highlight_off","hiking","history","history_edu","history_toggle_off","hive","hls","hls_off","holiday_village","home","home_max","home_mini","home_repair_service","home_work","horizontal_distribute","horizontal_rule","horizontal_split","hot_tub","hotel","hotel_class","hourglass_bottom","hourglass_disabled","hourglass_empty","hourglass_full","hourglass_top","house","house_siding","houseboat","how_to_reg","how_to_vote","html","http","https","hub","hvac","ice_skating","icecream","image","image_aspect_ratio","image_not_supported","image_search","imagesearch_roller","import_contacts","import_export","important_devices","inbox","incomplete_circle","indeterminate_check_box","info","input","insert_chart","insert_chart_outlined","insert_comment","insert_drive_file","insert_emoticon","insert_invitation","insert_link","insert_page_break","insert_photo","insights","install_desktop","install_mobile","integration_instructions","interests","interpreter_mode","inventory","inventory_2","invert_colors","invert_colors_off","ios_share","iron","iso","javascript","join_full","join_inner","join_left","join_right","kayaking","kebab_dining","key","key_off","keyboard","keyboard_alt","keyboard_arrow_down","keyboard_arrow_left","keyboard_arrow_right","keyboard_arrow_up","keyboard_backspace","keyboard_capslock","keyboard_command_key","keyboard_control_key","keyboard_double_arrow_down","keyboard_double_arrow_left","keyboard_double_arrow_right","keyboard_double_arrow_up","keyboard_hide","keyboard_option_key","keyboard_return","keyboard_tab","keyboard_voice","king_bed","kitchen","kitesurfing","label","label_important","label_off","lan","landscape","landslide","language","laptop","laptop_chromebook","laptop_mac","laptop_windows","last_page","launch","layers","layers_clear","leaderboard","leak_add","leak_remove","legend_toggle","lens","lens_blur","library_add","library_add_check","library_books","library_music","light","light_mode","lightbulb","lightbulb_circle","line_axis","line_style","line_weight","linear_scale","link","link_off","linked_camera","liquor","list","list_alt","live_help","live_tv","living","local_activity","local_airport","local_atm","local_bar","local_cafe","local_car_wash","local_convenience_store","local_dining","local_drink","local_fire_department","local_florist","local_gas_station","local_grocery_store","local_hospital","local_hotel","local_laundry_service","local_library","local_mall","local_movies","local_offer","local_parking","local_pharmacy","local_phone","local_pizza","local_play","local_police","local_post_office","local_printshop","local_see","local_shipping","local_taxi","location_city","location_disabled","location_off","location_on","location_searching","lock","lock_clock","lock_open","lock_person","lock_reset","login","logo_dev","logout","looks","looks_3","looks_4","looks_5","looks_6","looks_one","looks_two","loop","loupe","low_priority","loyalty","lte_mobiledata","lte_plus_mobiledata","luggage","lunch_dining","lyrics","macro_off","mail","mail_lock","mail_outline","male","man","man_2","man_3","man_4","manage_accounts","manage_history","manage_search","map","maps_home_work","maps_ugc","margin","mark_as_unread","mark_chat_read","mark_chat_unread","mark_email_read","mark_email_unread","mark_unread_chat_alt","markunread","markunread_mailbox","masks","maximize","media_bluetooth_off","media_bluetooth_on","mediation","medical_information","medical_services","medication","medication_liquid","meeting_room","memory","menu","menu_book","menu_open","merge","merge_type","message","mic","mic_external_off","mic_external_on","mic_none","mic_off","microwave","military_tech","minimize","minor_crash","miscellaneous_services","missed_video_call","mms","mobile_friendly","mobile_off","mobile_screen_share","mobiledata_off","mode","mode_comment","mode_edit","mode_edit_outline","mode_fan_off","mode_night","mode_of_travel","mode_standby","model_training","monetization_on","money","money_off","money_off_csred","monitor","monitor_heart","monitor_weight","monochrome_photos","mood","mood_bad","moped","more","more_horiz","more_time","more_vert","mosque","motion_photos_auto","motion_photos_off","motion_photos_on","motion_photos_pause","motion_photos_paused","mouse","move_down","move_to_inbox","move_up","movie","movie_creation","movie_filter","moving","mp","multiline_chart","multiple_stop","museum","music_note","music_off","music_video","my_location","nat","nature","nature_people","navigate_before","navigate_next","navigation","near_me","near_me_disabled","nearby_error","nearby_off","nest_cam_wired_stand","network_cell","network_check","network_locked","network_ping","network_wifi","network_wifi_1_bar","network_wifi_2_bar","network_wifi_3_bar","new_label","new_releases","newspaper","next_plan","next_week","nfc","night_shelter","nightlife","nightlight","nightlight_round","nights_stay","no_accounts","no_adult_content","no_backpack","no_cell","no_crash","no_drinks","no_encryption","no_encryption_gmailerrorred","no_flash","no_food","no_luggage","no_meals","no_meeting_room","no_photography","no_sim","no_stroller","no_transfer","noise_aware","noise_control_off","nordic_walking","north","north_east","north_west","not_accessible","not_interested","not_listed_location","not_started","note","note_add","note_alt","notes","notification_add","notification_important","notifications","notifications_active","notifications_none","notifications_off","notifications_paused","numbers","offline_bolt","offline_pin","offline_share","oil_barrel","on_device_training","ondemand_video","online_prediction","opacity","open_in_browser","open_in_full","open_in_new","open_in_new_off","open_with","other_houses","outbound","outbox","outdoor_grill","outlet","outlined_flag","output","padding","pages","pageview","paid","palette","pan_tool","pan_tool_alt","panorama","panorama_fish_eye","panorama_horizontal","panorama_horizontal_select","panorama_photosphere","panorama_photosphere_select","panorama_vertical","panorama_vertical_select","panorama_wide_angle","panorama_wide_angle_select","paragliding","park","party_mode","password","pattern","pause","pause_circle","pause_circle_filled","pause_circle_outline","pause_presentation","payment","payments","pedal_bike","pending","pending_actions","pentagon","people","people_alt","people_outline","percent","perm_camera_mic","perm_contact_calendar","perm_data_setting","perm_device_information","perm_identity","perm_media","perm_phone_msg","perm_scan_wifi","person","person_2","person_3","person_4","person_add","person_add_alt","person_add_alt_1","person_add_disabled","person_off","person_outline","person_pin","person_pin_circle","person_remove","person_remove_alt_1","person_search","personal_injury","personal_video","pest_control","pest_control_rodent","pets","phishing","phone","phone_android","phone_bluetooth_speaker","phone_callback","phone_disabled","phone_enabled","phone_forwarded","phone_iphone","phone_locked","phone_missed","phone_paused","phonelink","phonelink_erase","phonelink_lock","phonelink_off","phonelink_ring","phonelink_setup","photo","photo_album","photo_camera","photo_camera_back","photo_camera_front","photo_filter","photo_library","photo_size_select_actual","photo_size_select_large","photo_size_select_small","php","piano","piano_off","picture_as_pdf","picture_in_picture","picture_in_picture_alt","pie_chart","pie_chart_outline","pin","pin_drop","pin_end","pin_invoke","pinch","pivot_table_chart","pix","place","plagiarism","play_arrow","play_circle","play_circle_filled","play_circle_outline","play_disabled","play_for_work","play_lesson","playlist_add","playlist_add_check","playlist_add_check_circle","playlist_add_circle","playlist_play","playlist_remove","plumbing","plus_one","podcasts","point_of_sale","policy","poll","polyline","polymer","pool","portable_wifi_off","portrait","post_add","power","power_input","power_off","power_settings_new","precision_manufacturing","pregnant_woman","present_to_all","preview","price_change","price_check","print","print_disabled","priority_high","privacy_tip","private_connectivity","production_quantity_limits","propane","propane_tank","psychology","psychology_alt","public","public_off","publish","published_with_changes","punch_clock","push_pin","qr_code","qr_code_2","qr_code_scanner","query_builder","query_stats","question_answer","question_mark","queue","queue_music","queue_play_next","quickreply","quiz","r_mobiledata","radar","radio","radio_button_checked","radio_button_unchecked","railway_alert","ramen_dining","ramp_left","ramp_right","rate_review","raw_off","raw_on","read_more","real_estate_agent","receipt","receipt_long","recent_actors","recommend","record_voice_over","rectangle","recycling","redeem","redo","reduce_capacity","refresh","remember_me","remove","remove_circle","remove_circle_outline","remove_done","remove_from_queue","remove_moderator","remove_red_eye","remove_road","remove_shopping_cart","reorder","repartition","repeat","repeat_on","repeat_one","repeat_one_on","replay","replay_10","replay_30","replay_5","replay_circle_filled","reply","reply_all","report","report_gmailerrorred","report_off","report_problem","request_page","request_quote","reset_tv","restart_alt","restaurant","restaurant_menu","restore","restore_from_trash","restore_page","reviews","rice_bowl","ring_volume","rocket","rocket_launch","roller_shades","roller_shades_closed","roller_skating","roofing","room","room_preferences","room_service","rotate_90_degrees_ccw","rotate_90_degrees_cw","rotate_left","rotate_right","roundabout_left","roundabout_right","rounded_corner","route","router","rowing","rss_feed","rsvp","rtt","rule","rule_folder","run_circle","running_with_errors","rv_hookup","safety_check","safety_divider","sailing","sanitizer","satellite","satellite_alt","save","save_alt","save_as","saved_search","savings","scale","scanner","scatter_plot","schedule","schedule_send","schema","school","science","score","scoreboard","screen_lock_landscape","screen_lock_portrait","screen_lock_rotation","screen_rotation","screen_rotation_alt","screen_search_desktop","screen_share","screenshot","screenshot_monitor","scuba_diving","sd","sd_card","sd_card_alert","sd_storage","search","search_off","security","security_update","security_update_good","security_update_warning","segment","select_all","self_improvement","sell","send","send_and_archive","send_time_extension","send_to_mobile","sensor_door","sensor_occupied","sensor_window","sensors","sensors_off","sentiment_dissatisfied","sentiment_neutral","sentiment_satisfied","sentiment_satisfied_alt","sentiment_very_dissatisfied","sentiment_very_satisfied","set_meal","settings","settings_accessibility","settings_applications","settings_backup_restore","settings_bluetooth","settings_brightness","settings_cell","settings_ethernet","settings_input_antenna","settings_input_component","settings_input_composite","settings_input_hdmi","settings_input_svideo","settings_overscan","settings_phone","settings_power","settings_remote","settings_suggest","settings_system_daydream","settings_voice","severe_cold","shape_line","share","share_location","shield","shield_moon","shop","shop_2","shop_two","shopping_bag","shopping_basket","shopping_cart","shopping_cart_checkout","short_text","shortcut","show_chart","shower","shuffle","shuffle_on","shutter_speed","sick","sign_language","signal_cellular_0_bar","signal_cellular_4_bar","signal_cellular_alt","signal_cellular_alt_1_bar","signal_cellular_alt_2_bar","signal_cellular_connected_no_internet_0_bar","signal_cellular_connected_no_internet_4_bar","signal_cellular_no_sim","signal_cellular_nodata","signal_cellular_null","signal_cellular_off","signal_wifi_0_bar","signal_wifi_4_bar","signal_wifi_4_bar_lock","signal_wifi_bad","signal_wifi_connected_no_internet_4","signal_wifi_off","signal_wifi_statusbar_4_bar","signal_wifi_statusbar_connected_no_internet_4","signal_wifi_statusbar_null","signpost","sim_card","sim_card_alert","sim_card_download","single_bed","sip","skateboarding","skip_next","skip_previous","sledding","slideshow","slow_motion_video","smart_button","smart_display","smart_screen","smart_toy","smartphone","smoke_free","smoking_rooms","sms","sms_failed","snippet_folder","snooze","snowboarding","snowmobile","snowshoeing","soap","social_distance","solar_power","sort","sort_by_alpha","sos","soup_kitchen","source","south","south_america","south_east","south_west","spa","space_bar","space_dashboard","spatial_audio","spatial_audio_off","spatial_tracking","speaker","speaker_group","speaker_notes","speaker_notes_off","speaker_phone","speed","spellcheck","splitscreen","spoke","sports","sports_bar","sports_baseball","sports_basketball","sports_cricket","sports_esports","sports_football","sports_golf","sports_gymnastics","sports_handball","sports_hockey","sports_kabaddi","sports_martial_arts","sports_mma","sports_motorsports","sports_rugby","sports_score","sports_soccer","sports_tennis","sports_volleyball","square","square_foot","ssid_chart","stacked_bar_chart","stacked_line_chart","stadium","stairs","star","star_border","star_border_purple500","star_half","star_outline","star_purple500","star_rate","stars","start","stay_current_landscape","stay_current_portrait","stay_primary_landscape","stay_primary_portrait","sticky_note_2","stop","stop_circle","stop_screen_share","storage","store","store_mall_directory","storefront","storm","straight","straighten","stream","streetview","strikethrough_s","stroller","style","subdirectory_arrow_left","subdirectory_arrow_right","subject","subscript","subscriptions","subtitles","subtitles_off","subway","summarize","superscript","supervised_user_circle","supervisor_account","support","support_agent","surfing","surround_sound","swap_calls","swap_horiz","swap_horizontal_circle","swap_vert","swap_vertical_circle","swipe","swipe_down","swipe_down_alt","swipe_left","swipe_left_alt","swipe_right","swipe_right_alt","swipe_up","swipe_up_alt","swipe_vertical","switch_access_shortcut","switch_access_shortcut_add","switch_account","switch_camera","switch_left","switch_right","switch_video","synagogue","sync","sync_alt","sync_disabled","sync_lock","sync_problem","system_security_update","system_security_update_good","system_security_update_warning","system_update","system_update_alt","tab","tab_unselected","table_bar","table_chart","table_restaurant","table_rows","table_view","tablet","tablet_android","tablet_mac","tag","tag_faces","takeout_dining","tap_and_play","tapas","task","task_alt","taxi_alert","temple_buddhist","temple_hindu","terminal","terrain","text_decrease","text_fields","text_format","text_increase","text_rotate_up","text_rotate_vertical","text_rotation_angledown","text_rotation_angleup","text_rotation_down","text_rotation_none","text_snippet","textsms","texture","theater_comedy","theaters","thermostat","thermostat_auto","thumb_down","thumb_down_alt","thumb_down_off_alt","thumb_up","thumb_up_alt","thumb_up_off_alt","thumbs_up_down","thunderstorm","time_to_leave","timelapse","timeline","timer","timer_10","timer_10_select","timer_3","timer_3_select","timer_off","tips_and_updates","tire_repair","title","toc","today","toggle_off","toggle_on","token","toll","tonality","topic","tornado","touch_app","tour","toys","track_changes","traffic","train","tram","transcribe","transfer_within_a_station","transform","transgender","transit_enterexit","translate","travel_explore","trending_down","trending_flat","trending_up","trip_origin","troubleshoot","try","tsunami","tty","tune","tungsten","turn_left","turn_right","turn_sharp_left","turn_sharp_right","turn_slight_left","turn_slight_right","turned_in","turned_in_not","tv","tv_off","two_wheeler","type_specimen","u_turn_left","u_turn_right","umbrella","unarchive","undo","unfold_less","unfold_less_double","unfold_more","unfold_more_double","unpublished","unsubscribe","upcoming","update","update_disabled","upgrade","upload","upload_file","usb","usb_off","vaccines","vape_free","vaping_rooms","verified","verified_user","vertical_align_bottom","vertical_align_center","vertical_align_top","vertical_distribute","vertical_shades","vertical_shades_closed","vertical_split","vibration","video_call","video_camera_back","video_camera_front","video_chat","video_file","video_label","video_library","video_settings","video_stable","videocam","videocam_off","videogame_asset","videogame_asset_off","view_agenda","view_array","view_carousel","view_column","view_comfy","view_comfy_alt","view_compact","view_compact_alt","view_cozy","view_day","view_headline","view_in_ar","view_kanban","view_list","view_module","view_quilt","view_sidebar","view_stream","view_timeline","view_week","vignette","villa","visibility","visibility_off","voice_chat","voice_over_off","voicemail","volcano","volume_down","volume_mute","volume_off","volume_up","volunteer_activism","vpn_key","vpn_key_off","vpn_lock","vrpano","wallet","wallpaper","warehouse","warning","warning_amber","wash","watch","watch_later","watch_off","water","water_damage","water_drop","waterfall_chart","waves","waving_hand","wb_auto","wb_cloudy","wb_incandescent","wb_iridescent","wb_shade","wb_sunny","wb_twilight","wc","web","web_asset","web_asset_off","web_stories","webhook","weekend","west","whatshot","wheelchair_pickup","where_to_vote","widgets","width_full","width_normal","width_wide","wifi","wifi_1_bar","wifi_2_bar","wifi_calling","wifi_calling_3","wifi_channel","wifi_find","wifi_lock","wifi_off","wifi_password","wifi_protected_setup","wifi_tethering","wifi_tethering_error","wifi_tethering_off","wind_power","window","wine_bar","woman","woman_2","work","work_history","work_off","work_outline","workspace_premium","workspaces","wrap_text","wrong_location","wysiwyg","yard","youtube_searched_for","zoom_in","zoom_in_map","zoom_out","zoom_out_map"],Ra={inherit:"",primary:"text-primary",success:"text-green-500",warning:"text-yellow-500",secondary:"text-secondary",disabled:"text-disabled dark:text-disabled-dark",error:"text-red-500"};function r({iconKey:e,size:t="medium",color:c,className:i,onClick:l,style:a}){let s;switch(t){case"smallest":s=16;break;case"small":s=20;break;case"medium":s=24;break;case"large":s=28;break;default:s=t}return s||(s=24),n.jsx("span",{style:{fontSize:`${s}px`,display:"block",...a},className:E("material-icons",c?Ra[c]:"","select-none",i),onClick:l,children:e})}function el(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:e.className,fill:"currentColor",width:e.size??24,height:e.size??24,viewBox:"0 0 24 24",children:n.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}function sc(e){return n.jsx(r,{...e,iconKey:"search"})}function nl(e){return n.jsx(r,{...e,iconKey:"123"})}function ol(e){return n.jsx(r,{...e,iconKey:"360"})}function rl(e){return n.jsx(r,{...e,iconKey:"10k"})}function tl(e){return n.jsx(r,{...e,iconKey:"10mp"})}function cl(e){return n.jsx(r,{...e,iconKey:"11mp"})}function il(e){return n.jsx(r,{...e,iconKey:"12mp"})}function al(e){return n.jsx(r,{...e,iconKey:"13mp"})}function ll(e){return n.jsx(r,{...e,iconKey:"14mp"})}function sl(e){return n.jsx(r,{...e,iconKey:"15mp"})}function dl(e){return n.jsx(r,{...e,iconKey:"16mp"})}function ul(e){return n.jsx(r,{...e,iconKey:"17mp"})}function fl(e){return n.jsx(r,{...e,iconKey:"18_up_rating"})}function Al(e){return n.jsx(r,{...e,iconKey:"18mp"})}function _l(e){return n.jsx(r,{...e,iconKey:"19mp"})}function yl(e){return n.jsx(r,{...e,iconKey:"1k"})}function hl(e){return n.jsx(r,{...e,iconKey:"1k_plus"})}function gl(e){return n.jsx(r,{...e,iconKey:"1x_mobiledata"})}function Il(e){return n.jsx(r,{...e,iconKey:"20mp"})}function bl(e){return n.jsx(r,{...e,iconKey:"21mp"})}function pl(e){return n.jsx(r,{...e,iconKey:"22mp"})}function wl(e){return n.jsx(r,{...e,iconKey:"23mp"})}function kl(e){return n.jsx(r,{...e,iconKey:"24mp"})}function ml(e){return n.jsx(r,{...e,iconKey:"2k"})}function vl(e){return n.jsx(r,{...e,iconKey:"2k_plus"})}function Kl(e){return n.jsx(r,{...e,iconKey:"2mp"})}function Cl(e){return n.jsx(r,{...e,iconKey:"30fps"})}function Sl(e){return n.jsx(r,{...e,iconKey:"30fps_select"})}function Bl(e){return n.jsx(r,{...e,iconKey:"3d_rotation"})}function El(e){return n.jsx(r,{...e,iconKey:"3g_mobiledata"})}function Fl(e){return n.jsx(r,{...e,iconKey:"3k"})}function Pl(e){return n.jsx(r,{...e,iconKey:"3k_plus"})}function Dl(e){return n.jsx(r,{...e,iconKey:"3mp"})}function Nl(e){return n.jsx(r,{...e,iconKey:"3p"})}function Ml(e){return n.jsx(r,{...e,iconKey:"4g_mobiledata"})}function Tl(e){return n.jsx(r,{...e,iconKey:"4g_plus_mobiledata"})}function Ol(e){return n.jsx(r,{...e,iconKey:"4k"})}function Ll(e){return n.jsx(r,{...e,iconKey:"4k_plus"})}function Ql(e){return n.jsx(r,{...e,iconKey:"4mp"})}function Vl(e){return n.jsx(r,{...e,iconKey:"5g"})}function Wl(e){return n.jsx(r,{...e,iconKey:"5k"})}function Gl(e){return n.jsx(r,{...e,iconKey:"5k_plus"})}function zl(e){return n.jsx(r,{...e,iconKey:"5mp"})}function Hl(e){return n.jsx(r,{...e,iconKey:"60fps"})}function Ul(e){return n.jsx(r,{...e,iconKey:"60fps_select"})}function Yl(e){return n.jsx(r,{...e,iconKey:"6_ft_apart"})}function $l(e){return n.jsx(r,{...e,iconKey:"6k"})}function jl(e){return n.jsx(r,{...e,iconKey:"6k_plus"})}function ql(e){return n.jsx(r,{...e,iconKey:"6mp"})}function Jl(e){return n.jsx(r,{...e,iconKey:"7k"})}function Zl(e){return n.jsx(r,{...e,iconKey:"7k_plus"})}function Xl(e){return n.jsx(r,{...e,iconKey:"7mp"})}function xl(e){return n.jsx(r,{...e,iconKey:"8k"})}function Rl(e){return n.jsx(r,{...e,iconKey:"8k_plus"})}function es(e){return n.jsx(r,{...e,iconKey:"8mp"})}function ns(e){return n.jsx(r,{...e,iconKey:"9k"})}function os(e){return n.jsx(r,{...e,iconKey:"9k_plus"})}function rs(e){return n.jsx(r,{...e,iconKey:"9mp"})}function ts(e){return n.jsx(r,{...e,iconKey:"abc"})}function cs(e){return n.jsx(r,{...e,iconKey:"ac_unit"})}function is(e){return n.jsx(r,{...e,iconKey:"access_alarm"})}function as(e){return n.jsx(r,{...e,iconKey:"access_alarms"})}function ls(e){return n.jsx(r,{...e,iconKey:"access_time"})}function ss(e){return n.jsx(r,{...e,iconKey:"access_time_filled"})}function ds(e){return n.jsx(r,{...e,iconKey:"accessibility"})}function us(e){return n.jsx(r,{...e,iconKey:"accessibility_new"})}function fs(e){return n.jsx(r,{...e,iconKey:"accessible"})}function As(e){return n.jsx(r,{...e,iconKey:"accessible_forward"})}function _s(e){return n.jsx(r,{...e,iconKey:"account_balance"})}function ys(e){return n.jsx(r,{...e,iconKey:"account_balance_wallet"})}function hs(e){return n.jsx(r,{...e,iconKey:"account_box"})}function gs(e){return n.jsx(r,{...e,iconKey:"account_circle"})}function Is(e){return n.jsx(r,{...e,iconKey:"account_tree"})}function bs(e){return n.jsx(r,{...e,iconKey:"ad_units"})}function ps(e){return n.jsx(r,{...e,iconKey:"adb"})}function hn(e){return n.jsx(r,{...e,iconKey:"add"})}function ws(e){return n.jsx(r,{...e,iconKey:"add_a_photo"})}function ks(e){return n.jsx(r,{...e,iconKey:"add_alarm"})}function ms(e){return n.jsx(r,{...e,iconKey:"add_alert"})}function vs(e){return n.jsx(r,{...e,iconKey:"add_box"})}function Ks(e){return n.jsx(r,{...e,iconKey:"add_business"})}function Cs(e){return n.jsx(r,{...e,iconKey:"add_card"})}function Ss(e){return n.jsx(r,{...e,iconKey:"add_chart"})}function Bs(e){return n.jsx(r,{...e,iconKey:"add_circle"})}function Es(e){return n.jsx(r,{...e,iconKey:"add_circle_outline"})}function Fs(e){return n.jsx(r,{...e,iconKey:"add_comment"})}function Ps(e){return n.jsx(r,{...e,iconKey:"add_home"})}function Ds(e){return n.jsx(r,{...e,iconKey:"add_home_work"})}function Ns(e){return n.jsx(r,{...e,iconKey:"add_ic_call"})}function dc(e){return n.jsx(r,{...e,iconKey:"add_link"})}function Ms(e){return n.jsx(r,{...e,iconKey:"add_location"})}function Ts(e){return n.jsx(r,{...e,iconKey:"add_location_alt"})}function Os(e){return n.jsx(r,{...e,iconKey:"add_moderator"})}function Ls(e){return n.jsx(r,{...e,iconKey:"add_photo_alternate"})}function Qs(e){return n.jsx(r,{...e,iconKey:"add_reaction"})}function Vs(e){return n.jsx(r,{...e,iconKey:"add_road"})}function Ws(e){return n.jsx(r,{...e,iconKey:"add_shopping_cart"})}function Gs(e){return n.jsx(r,{...e,iconKey:"add_task"})}function zs(e){return n.jsx(r,{...e,iconKey:"add_to_drive"})}function Hs(e){return n.jsx(r,{...e,iconKey:"add_to_home_screen"})}function Us(e){return n.jsx(r,{...e,iconKey:"add_to_photos"})}function Ys(e){return n.jsx(r,{...e,iconKey:"add_to_queue"})}function $s(e){return n.jsx(r,{...e,iconKey:"adf_scanner"})}function js(e){return n.jsx(r,{...e,iconKey:"adjust"})}function qs(e){return n.jsx(r,{...e,iconKey:"admin_panel_settings"})}function Js(e){return n.jsx(r,{...e,iconKey:"ads_click"})}function Zs(e){return n.jsx(r,{...e,iconKey:"agriculture"})}function Xs(e){return n.jsx(r,{...e,iconKey:"air"})}function xs(e){return n.jsx(r,{...e,iconKey:"airline_seat_flat"})}function Rs(e){return n.jsx(r,{...e,iconKey:"airline_seat_flat_angled"})}function ed(e){return n.jsx(r,{...e,iconKey:"airline_seat_individual_suite"})}function nd(e){return n.jsx(r,{...e,iconKey:"airline_seat_legroom_extra"})}function od(e){return n.jsx(r,{...e,iconKey:"airline_seat_legroom_normal"})}function rd(e){return n.jsx(r,{...e,iconKey:"airline_seat_legroom_reduced"})}function td(e){return n.jsx(r,{...e,iconKey:"airline_seat_recline_extra"})}function cd(e){return n.jsx(r,{...e,iconKey:"airline_seat_recline_normal"})}function id(e){return n.jsx(r,{...e,iconKey:"airline_stops"})}function ad(e){return n.jsx(r,{...e,iconKey:"airlines"})}function ld(e){return n.jsx(r,{...e,iconKey:"airplane_ticket"})}function sd(e){return n.jsx(r,{...e,iconKey:"airplanemode_active"})}function dd(e){return n.jsx(r,{...e,iconKey:"airplanemode_inactive"})}function ud(e){return n.jsx(r,{...e,iconKey:"airplay"})}function fd(e){return n.jsx(r,{...e,iconKey:"airport_shuttle"})}function Ad(e){return n.jsx(r,{...e,iconKey:"alarm"})}function _d(e){return n.jsx(r,{...e,iconKey:"alarm_add"})}function yd(e){return n.jsx(r,{...e,iconKey:"alarm_off"})}function hd(e){return n.jsx(r,{...e,iconKey:"alarm_on"})}function gd(e){return n.jsx(r,{...e,iconKey:"album"})}function Id(e){return n.jsx(r,{...e,iconKey:"align_horizontal_center"})}function bd(e){return n.jsx(r,{...e,iconKey:"align_horizontal_left"})}function pd(e){return n.jsx(r,{...e,iconKey:"align_horizontal_right"})}function wd(e){return n.jsx(r,{...e,iconKey:"align_vertical_bottom"})}function kd(e){return n.jsx(r,{...e,iconKey:"align_vertical_center"})}function md(e){return n.jsx(r,{...e,iconKey:"align_vertical_top"})}function vd(e){return n.jsx(r,{...e,iconKey:"all_inbox"})}function Kd(e){return n.jsx(r,{...e,iconKey:"all_inclusive"})}function Cd(e){return n.jsx(r,{...e,iconKey:"all_out"})}function Sd(e){return n.jsx(r,{...e,iconKey:"alt_route"})}function Bd(e){return n.jsx(r,{...e,iconKey:"alternate_email"})}function Ed(e){return n.jsx(r,{...e,iconKey:"analytics"})}function Fd(e){return n.jsx(r,{...e,iconKey:"anchor"})}function Pd(e){return n.jsx(r,{...e,iconKey:"android"})}function Dd(e){return n.jsx(r,{...e,iconKey:"animation"})}function Nd(e){return n.jsx(r,{...e,iconKey:"announcement"})}function Md(e){return n.jsx(r,{...e,iconKey:"aod"})}function Td(e){return n.jsx(r,{...e,iconKey:"apartment"})}function Od(e){return n.jsx(r,{...e,iconKey:"api"})}function Ld(e){return n.jsx(r,{...e,iconKey:"app_blocking"})}function Qd(e){return n.jsx(r,{...e,iconKey:"app_registration"})}function Vd(e){return n.jsx(r,{...e,iconKey:"app_settings_alt"})}function Wd(e){return n.jsx(r,{...e,iconKey:"app_shortcut"})}function Gd(e){return n.jsx(r,{...e,iconKey:"approval"})}function zd(e){return n.jsx(r,{...e,iconKey:"apps"})}function Hd(e){return n.jsx(r,{...e,iconKey:"apps_outage"})}function Ud(e){return n.jsx(r,{...e,iconKey:"architecture"})}function Yd(e){return n.jsx(r,{...e,iconKey:"archive"})}function $d(e){return n.jsx(r,{...e,iconKey:"area_chart"})}function jd(e){return n.jsx(r,{...e,iconKey:"arrow_back"})}function qd(e){return n.jsx(r,{...e,iconKey:"arrow_back_ios"})}function Jd(e){return n.jsx(r,{...e,iconKey:"arrow_back_ios_new"})}function Zd(e){return n.jsx(r,{...e,iconKey:"arrow_circle_down"})}function Xd(e){return n.jsx(r,{...e,iconKey:"arrow_circle_left"})}function xd(e){return n.jsx(r,{...e,iconKey:"arrow_circle_right"})}function Rd(e){return n.jsx(r,{...e,iconKey:"arrow_circle_up"})}function eu(e){return n.jsx(r,{...e,iconKey:"arrow_downward"})}function gr(e){return n.jsx(r,{...e,iconKey:"arrow_drop_down"})}function nu(e){return n.jsx(r,{...e,iconKey:"arrow_drop_down_circle"})}function ou(e){return n.jsx(r,{...e,iconKey:"arrow_drop_up"})}function uc(e){return n.jsx(r,{...e,iconKey:"arrow_forward"})}function ru(e){return n.jsx(r,{...e,iconKey:"arrow_forward_ios"})}function tu(e){return n.jsx(r,{...e,iconKey:"arrow_left"})}function cu(e){return n.jsx(r,{...e,iconKey:"arrow_outward"})}function iu(e){return n.jsx(r,{...e,iconKey:"arrow_right"})}function au(e){return n.jsx(r,{...e,iconKey:"arrow_right_alt"})}function po(e){return n.jsx(r,{...e,iconKey:"arrow_upward"})}function lu(e){return n.jsx(r,{...e,iconKey:"art_track"})}function su(e){return n.jsx(r,{...e,iconKey:"article"})}function du(e){return n.jsx(r,{...e,iconKey:"aspect_ratio"})}function uu(e){return n.jsx(r,{...e,iconKey:"assessment"})}function fc(e){return n.jsx(r,{...e,iconKey:"assignment"})}function fu(e){return n.jsx(r,{...e,iconKey:"assignment_ind"})}function Au(e){return n.jsx(r,{...e,iconKey:"assignment_late"})}function _u(e){return n.jsx(r,{...e,iconKey:"assignment_return"})}function yu(e){return n.jsx(r,{...e,iconKey:"assignment_returned"})}function hu(e){return n.jsx(r,{...e,iconKey:"assignment_turned_in"})}function gu(e){return n.jsx(r,{...e,iconKey:"assist_walker"})}function Iu(e){return n.jsx(r,{...e,iconKey:"assistant"})}function bu(e){return n.jsx(r,{...e,iconKey:"assistant_direction"})}function pu(e){return n.jsx(r,{...e,iconKey:"assistant_photo"})}function wu(e){return n.jsx(r,{...e,iconKey:"assured_workload"})}function ku(e){return n.jsx(r,{...e,iconKey:"atm"})}function mu(e){return n.jsx(r,{...e,iconKey:"attach_email"})}function vu(e){return n.jsx(r,{...e,iconKey:"attach_file"})}function Ku(e){return n.jsx(r,{...e,iconKey:"attach_money"})}function Cu(e){return n.jsx(r,{...e,iconKey:"attachment"})}function Su(e){return n.jsx(r,{...e,iconKey:"attractions"})}function Bu(e){return n.jsx(r,{...e,iconKey:"attribution"})}function Eu(e){return n.jsx(r,{...e,iconKey:"audio_file"})}function Fu(e){return n.jsx(r,{...e,iconKey:"audiotrack"})}function Pu(e){return n.jsx(r,{...e,iconKey:"auto_awesome"})}function Du(e){return n.jsx(r,{...e,iconKey:"auto_awesome_mosaic"})}function Nu(e){return n.jsx(r,{...e,iconKey:"auto_awesome_motion"})}function Mu(e){return n.jsx(r,{...e,iconKey:"auto_delete"})}function Tu(e){return n.jsx(r,{...e,iconKey:"auto_fix_high"})}function Ou(e){return n.jsx(r,{...e,iconKey:"auto_fix_normal"})}function Lu(e){return n.jsx(r,{...e,iconKey:"auto_fix_off"})}function Qu(e){return n.jsx(r,{...e,iconKey:"auto_graph"})}function Vu(e){return n.jsx(r,{...e,iconKey:"auto_mode"})}function Wu(e){return n.jsx(r,{...e,iconKey:"auto_stories"})}function Gu(e){return n.jsx(r,{...e,iconKey:"autofps_select"})}function zu(e){return n.jsx(r,{...e,iconKey:"autorenew"})}function Hu(e){return n.jsx(r,{...e,iconKey:"av_timer"})}function Uu(e){return n.jsx(r,{...e,iconKey:"baby_changing_station"})}function Yu(e){return n.jsx(r,{...e,iconKey:"back_hand"})}function $u(e){return n.jsx(r,{...e,iconKey:"backpack"})}function ju(e){return n.jsx(r,{...e,iconKey:"backspace"})}function qu(e){return n.jsx(r,{...e,iconKey:"backup"})}function Ju(e){return n.jsx(r,{...e,iconKey:"backup_table"})}function Zu(e){return n.jsx(r,{...e,iconKey:"badge"})}function Xu(e){return n.jsx(r,{...e,iconKey:"bakery_dining"})}function xu(e){return n.jsx(r,{...e,iconKey:"balance"})}function Ru(e){return n.jsx(r,{...e,iconKey:"balcony"})}function Ir(e){return n.jsx(r,{...e,iconKey:"ballot"})}function ef(e){return n.jsx(r,{...e,iconKey:"bar_chart"})}function nf(e){return n.jsx(r,{...e,iconKey:"batch_prediction"})}function of(e){return n.jsx(r,{...e,iconKey:"bathroom"})}function rf(e){return n.jsx(r,{...e,iconKey:"bathtub"})}function tf(e){return n.jsx(r,{...e,iconKey:"battery_0_bar"})}function cf(e){return n.jsx(r,{...e,iconKey:"battery_1_bar"})}function af(e){return n.jsx(r,{...e,iconKey:"battery_2_bar"})}function lf(e){return n.jsx(r,{...e,iconKey:"battery_3_bar"})}function sf(e){return n.jsx(r,{...e,iconKey:"battery_4_bar"})}function df(e){return n.jsx(r,{...e,iconKey:"battery_5_bar"})}function uf(e){return n.jsx(r,{...e,iconKey:"battery_6_bar"})}function ff(e){return n.jsx(r,{...e,iconKey:"battery_alert"})}function Af(e){return n.jsx(r,{...e,iconKey:"battery_charging_full"})}function _f(e){return n.jsx(r,{...e,iconKey:"battery_full"})}function yf(e){return n.jsx(r,{...e,iconKey:"battery_saver"})}function hf(e){return n.jsx(r,{...e,iconKey:"battery_std"})}function gf(e){return n.jsx(r,{...e,iconKey:"battery_unknown"})}function If(e){return n.jsx(r,{...e,iconKey:"beach_access"})}function bf(e){return n.jsx(r,{...e,iconKey:"bed"})}function pf(e){return n.jsx(r,{...e,iconKey:"bedroom_baby"})}function wf(e){return n.jsx(r,{...e,iconKey:"bedroom_child"})}function kf(e){return n.jsx(r,{...e,iconKey:"bedroom_parent"})}function mf(e){return n.jsx(r,{...e,iconKey:"bedtime"})}function vf(e){return n.jsx(r,{...e,iconKey:"bedtime_off"})}function Kf(e){return n.jsx(r,{...e,iconKey:"beenhere"})}function Cf(e){return n.jsx(r,{...e,iconKey:"bento"})}function Sf(e){return n.jsx(r,{...e,iconKey:"bike_scooter"})}function Bf(e){return n.jsx(r,{...e,iconKey:"biotech"})}function Ef(e){return n.jsx(r,{...e,iconKey:"blender"})}function Ff(e){return n.jsx(r,{...e,iconKey:"blind"})}function Pf(e){return n.jsx(r,{...e,iconKey:"blinds"})}function Df(e){return n.jsx(r,{...e,iconKey:"blinds_closed"})}function Nf(e){return n.jsx(r,{...e,iconKey:"block"})}function Mf(e){return n.jsx(r,{...e,iconKey:"bloodtype"})}function Tf(e){return n.jsx(r,{...e,iconKey:"bluetooth"})}function Of(e){return n.jsx(r,{...e,iconKey:"bluetooth_audio"})}function Lf(e){return n.jsx(r,{...e,iconKey:"bluetooth_connected"})}function Qf(e){return n.jsx(r,{...e,iconKey:"bluetooth_disabled"})}function Vf(e){return n.jsx(r,{...e,iconKey:"bluetooth_drive"})}function Wf(e){return n.jsx(r,{...e,iconKey:"bluetooth_searching"})}function Gf(e){return n.jsx(r,{...e,iconKey:"blur_circular"})}function zf(e){return n.jsx(r,{...e,iconKey:"blur_linear"})}function Hf(e){return n.jsx(r,{...e,iconKey:"blur_off"})}function Uf(e){return n.jsx(r,{...e,iconKey:"blur_on"})}function Yf(e){return n.jsx(r,{...e,iconKey:"bolt"})}function $f(e){return n.jsx(r,{...e,iconKey:"book"})}function jf(e){return n.jsx(r,{...e,iconKey:"book_online"})}function qf(e){return n.jsx(r,{...e,iconKey:"bookmark"})}function Jf(e){return n.jsx(r,{...e,iconKey:"bookmark_add"})}function Zf(e){return n.jsx(r,{...e,iconKey:"bookmark_added"})}function Xf(e){return n.jsx(r,{...e,iconKey:"bookmark_border"})}function xf(e){return n.jsx(r,{...e,iconKey:"bookmark_remove"})}function Rf(e){return n.jsx(r,{...e,iconKey:"bookmarks"})}function eA(e){return n.jsx(r,{...e,iconKey:"border_all"})}function nA(e){return n.jsx(r,{...e,iconKey:"border_bottom"})}function oA(e){return n.jsx(r,{...e,iconKey:"border_clear"})}function rA(e){return n.jsx(r,{...e,iconKey:"border_color"})}function tA(e){return n.jsx(r,{...e,iconKey:"border_horizontal"})}function cA(e){return n.jsx(r,{...e,iconKey:"border_inner"})}function iA(e){return n.jsx(r,{...e,iconKey:"border_left"})}function aA(e){return n.jsx(r,{...e,iconKey:"border_outer"})}function lA(e){return n.jsx(r,{...e,iconKey:"border_right"})}function sA(e){return n.jsx(r,{...e,iconKey:"border_style"})}function dA(e){return n.jsx(r,{...e,iconKey:"border_top"})}function uA(e){return n.jsx(r,{...e,iconKey:"border_vertical"})}function fA(e){return n.jsx(r,{...e,iconKey:"boy"})}function AA(e){return n.jsx(r,{...e,iconKey:"branding_watermark"})}function _A(e){return n.jsx(r,{...e,iconKey:"breakfast_dining"})}function yA(e){return n.jsx(r,{...e,iconKey:"brightness_1"})}function hA(e){return n.jsx(r,{...e,iconKey:"brightness_2"})}function gA(e){return n.jsx(r,{...e,iconKey:"brightness_3"})}function IA(e){return n.jsx(r,{...e,iconKey:"brightness_4"})}function bA(e){return n.jsx(r,{...e,iconKey:"brightness_5"})}function pA(e){return n.jsx(r,{...e,iconKey:"brightness_6"})}function wA(e){return n.jsx(r,{...e,iconKey:"brightness_7"})}function kA(e){return n.jsx(r,{...e,iconKey:"brightness_auto"})}function mA(e){return n.jsx(r,{...e,iconKey:"brightness_high"})}function vA(e){return n.jsx(r,{...e,iconKey:"brightness_low"})}function KA(e){return n.jsx(r,{...e,iconKey:"brightness_medium"})}function CA(e){return n.jsx(r,{...e,iconKey:"broadcast_on_home"})}function SA(e){return n.jsx(r,{...e,iconKey:"broadcast_on_personal"})}function BA(e){return n.jsx(r,{...e,iconKey:"broken_image"})}function EA(e){return n.jsx(r,{...e,iconKey:"browse_gallery"})}function FA(e){return n.jsx(r,{...e,iconKey:"browser_not_supported"})}function PA(e){return n.jsx(r,{...e,iconKey:"browser_updated"})}function DA(e){return n.jsx(r,{...e,iconKey:"brunch_dining"})}function NA(e){return n.jsx(r,{...e,iconKey:"brush"})}function MA(e){return n.jsx(r,{...e,iconKey:"bubble_chart"})}function TA(e){return n.jsx(r,{...e,iconKey:"bug_report"})}function OA(e){return n.jsx(r,{...e,iconKey:"build"})}function LA(e){return n.jsx(r,{...e,iconKey:"build_circle"})}function QA(e){return n.jsx(r,{...e,iconKey:"bungalow"})}function VA(e){return n.jsx(r,{...e,iconKey:"burst_mode"})}function WA(e){return n.jsx(r,{...e,iconKey:"bus_alert"})}function GA(e){return n.jsx(r,{...e,iconKey:"business"})}function zA(e){return n.jsx(r,{...e,iconKey:"business_center"})}function HA(e){return n.jsx(r,{...e,iconKey:"cabin"})}function UA(e){return n.jsx(r,{...e,iconKey:"cable"})}function YA(e){return n.jsx(r,{...e,iconKey:"cached"})}function $A(e){return n.jsx(r,{...e,iconKey:"cake"})}function jA(e){return n.jsx(r,{...e,iconKey:"calculate"})}function Ac(e){return n.jsx(r,{...e,iconKey:"calendar_month"})}function qA(e){return n.jsx(r,{...e,iconKey:"calendar_today"})}function JA(e){return n.jsx(r,{...e,iconKey:"calendar_view_day"})}function ZA(e){return n.jsx(r,{...e,iconKey:"calendar_view_month"})}function XA(e){return n.jsx(r,{...e,iconKey:"calendar_view_week"})}function xA(e){return n.jsx(r,{...e,iconKey:"call"})}function RA(e){return n.jsx(r,{...e,iconKey:"call_end"})}function e_(e){return n.jsx(r,{...e,iconKey:"call_made"})}function n_(e){return n.jsx(r,{...e,iconKey:"call_merge"})}function o_(e){return n.jsx(r,{...e,iconKey:"call_missed"})}function r_(e){return n.jsx(r,{...e,iconKey:"call_missed_outgoing"})}function t_(e){return n.jsx(r,{...e,iconKey:"call_received"})}function c_(e){return n.jsx(r,{...e,iconKey:"call_split"})}function i_(e){return n.jsx(r,{...e,iconKey:"call_to_action"})}function a_(e){return n.jsx(r,{...e,iconKey:"camera"})}function l_(e){return n.jsx(r,{...e,iconKey:"camera_alt"})}function s_(e){return n.jsx(r,{...e,iconKey:"camera_enhance"})}function d_(e){return n.jsx(r,{...e,iconKey:"camera_front"})}function u_(e){return n.jsx(r,{...e,iconKey:"camera_indoor"})}function f_(e){return n.jsx(r,{...e,iconKey:"camera_outdoor"})}function A_(e){return n.jsx(r,{...e,iconKey:"camera_rear"})}function __(e){return n.jsx(r,{...e,iconKey:"camera_roll"})}function y_(e){return n.jsx(r,{...e,iconKey:"cameraswitch"})}function h_(e){return n.jsx(r,{...e,iconKey:"campaign"})}function g_(e){return n.jsx(r,{...e,iconKey:"cancel"})}function I_(e){return n.jsx(r,{...e,iconKey:"cancel_presentation"})}function b_(e){return n.jsx(r,{...e,iconKey:"cancel_schedule_send"})}function p_(e){return n.jsx(r,{...e,iconKey:"candlestick_chart"})}function w_(e){return n.jsx(r,{...e,iconKey:"car_crash"})}function k_(e){return n.jsx(r,{...e,iconKey:"car_rental"})}function m_(e){return n.jsx(r,{...e,iconKey:"car_repair"})}function v_(e){return n.jsx(r,{...e,iconKey:"card_giftcard"})}function K_(e){return n.jsx(r,{...e,iconKey:"card_membership"})}function C_(e){return n.jsx(r,{...e,iconKey:"card_travel"})}function S_(e){return n.jsx(r,{...e,iconKey:"carpenter"})}function B_(e){return n.jsx(r,{...e,iconKey:"cases"})}function E_(e){return n.jsx(r,{...e,iconKey:"casino"})}function F_(e){return n.jsx(r,{...e,iconKey:"cast"})}function P_(e){return n.jsx(r,{...e,iconKey:"cast_connected"})}function D_(e){return n.jsx(r,{...e,iconKey:"cast_for_education"})}function N_(e){return n.jsx(r,{...e,iconKey:"castle"})}function M_(e){return n.jsx(r,{...e,iconKey:"catching_pokemon"})}function T_(e){return n.jsx(r,{...e,iconKey:"category"})}function O_(e){return n.jsx(r,{...e,iconKey:"celebration"})}function L_(e){return n.jsx(r,{...e,iconKey:"cell_tower"})}function Q_(e){return n.jsx(r,{...e,iconKey:"cell_wifi"})}function V_(e){return n.jsx(r,{...e,iconKey:"center_focus_strong"})}function W_(e){return n.jsx(r,{...e,iconKey:"center_focus_weak"})}function G_(e){return n.jsx(r,{...e,iconKey:"chair"})}function z_(e){return n.jsx(r,{...e,iconKey:"chair_alt"})}function H_(e){return n.jsx(r,{...e,iconKey:"chalet"})}function U_(e){return n.jsx(r,{...e,iconKey:"change_circle"})}function Y_(e){return n.jsx(r,{...e,iconKey:"change_history"})}function $_(e){return n.jsx(r,{...e,iconKey:"charging_station"})}function j_(e){return n.jsx(r,{...e,iconKey:"chat"})}function q_(e){return n.jsx(r,{...e,iconKey:"chat_bubble"})}function J_(e){return n.jsx(r,{...e,iconKey:"chat_bubble_outline"})}function _c(e){return n.jsx(r,{...e,iconKey:"check"})}function Z_(e){return n.jsx(r,{...e,iconKey:"check_box"})}function X_(e){return n.jsx(r,{...e,iconKey:"check_box_outline_blank"})}function x_(e){return n.jsx(r,{...e,iconKey:"check_circle"})}function R_(e){return n.jsx(r,{...e,iconKey:"check_circle_outline"})}function ey(e){return n.jsx(r,{...e,iconKey:"checklist"})}function ny(e){return n.jsx(r,{...e,iconKey:"checklist_rtl"})}function oy(e){return n.jsx(r,{...e,iconKey:"checkroom"})}function yc(e){return n.jsx(r,{...e,iconKey:"chevron_left"})}function ry(e){return n.jsx(r,{...e,iconKey:"chevron_right"})}function ty(e){return n.jsx(r,{...e,iconKey:"child_care"})}function cy(e){return n.jsx(r,{...e,iconKey:"child_friendly"})}function iy(e){return n.jsx(r,{...e,iconKey:"chrome_reader_mode"})}function ay(e){return n.jsx(r,{...e,iconKey:"church"})}function br(e){return n.jsx(r,{...e,iconKey:"circle"})}function ly(e){return n.jsx(r,{...e,iconKey:"circle_notifications"})}function sy(e){return n.jsx(r,{...e,iconKey:"class"})}function dy(e){return n.jsx(r,{...e,iconKey:"clean_hands"})}function uy(e){return n.jsx(r,{...e,iconKey:"cleaning_services"})}function an(e){return n.jsx(r,{...e,iconKey:"clear"})}function fy(e){return n.jsx(r,{...e,iconKey:"clear_all"})}function pr(e){return n.jsx(r,{...e,iconKey:"close"})}function Ay(e){return n.jsx(r,{...e,iconKey:"close_fullscreen"})}function _y(e){return n.jsx(r,{...e,iconKey:"closed_caption"})}function yy(e){return n.jsx(r,{...e,iconKey:"closed_caption_disabled"})}function hy(e){return n.jsx(r,{...e,iconKey:"closed_caption_off"})}function gy(e){return n.jsx(r,{...e,iconKey:"cloud"})}function Iy(e){return n.jsx(r,{...e,iconKey:"cloud_circle"})}function by(e){return n.jsx(r,{...e,iconKey:"cloud_done"})}function py(e){return n.jsx(r,{...e,iconKey:"cloud_download"})}function wy(e){return n.jsx(r,{...e,iconKey:"cloud_off"})}function ky(e){return n.jsx(r,{...e,iconKey:"cloud_queue"})}function my(e){return n.jsx(r,{...e,iconKey:"cloud_sync"})}function vy(e){return n.jsx(r,{...e,iconKey:"cloud_upload"})}function Ky(e){return n.jsx(r,{...e,iconKey:"co2"})}function Cy(e){return n.jsx(r,{...e,iconKey:"co_present"})}function Sy(e){return n.jsx(r,{...e,iconKey:"code"})}function By(e){return n.jsx(r,{...e,iconKey:"code_off"})}function Ey(e){return n.jsx(r,{...e,iconKey:"coffee"})}function Fy(e){return n.jsx(r,{...e,iconKey:"coffee_maker"})}function Py(e){return n.jsx(r,{...e,iconKey:"collections"})}function Dy(e){return n.jsx(r,{...e,iconKey:"collections_bookmark"})}function Ny(e){return n.jsx(r,{...e,iconKey:"color_lens"})}function My(e){return n.jsx(r,{...e,iconKey:"colorize"})}function Ty(e){return n.jsx(r,{...e,iconKey:"comment"})}function Oy(e){return n.jsx(r,{...e,iconKey:"comment_bank"})}function Ly(e){return n.jsx(r,{...e,iconKey:"comments_disabled"})}function Qy(e){return n.jsx(r,{...e,iconKey:"commit"})}function Vy(e){return n.jsx(r,{...e,iconKey:"commute"})}function Wy(e){return n.jsx(r,{...e,iconKey:"compare"})}function Gy(e){return n.jsx(r,{...e,iconKey:"compare_arrows"})}function zy(e){return n.jsx(r,{...e,iconKey:"compass_calibration"})}function Hy(e){return n.jsx(r,{...e,iconKey:"compost"})}function Uy(e){return n.jsx(r,{...e,iconKey:"compress"})}function Yy(e){return n.jsx(r,{...e,iconKey:"computer"})}function $y(e){return n.jsx(r,{...e,iconKey:"confirmation_number"})}function jy(e){return n.jsx(r,{...e,iconKey:"connect_without_contact"})}function qy(e){return n.jsx(r,{...e,iconKey:"connected_tv"})}function Jy(e){return n.jsx(r,{...e,iconKey:"connecting_airports"})}function Zy(e){return n.jsx(r,{...e,iconKey:"construction"})}function Xy(e){return n.jsx(r,{...e,iconKey:"contact_emergency"})}function xy(e){return n.jsx(r,{...e,iconKey:"contact_mail"})}function Ry(e){return n.jsx(r,{...e,iconKey:"contact_page"})}function eh(e){return n.jsx(r,{...e,iconKey:"contact_phone"})}function nh(e){return n.jsx(r,{...e,iconKey:"contact_support"})}function oh(e){return n.jsx(r,{...e,iconKey:"contactless"})}function rh(e){return n.jsx(r,{...e,iconKey:"contacts"})}function Rn(e){return n.jsx(r,{...e,iconKey:"content_copy"})}function th(e){return n.jsx(r,{...e,iconKey:"content_cut"})}function ch(e){return n.jsx(r,{...e,iconKey:"content_paste"})}function ih(e){return n.jsx(r,{...e,iconKey:"content_paste_go"})}function ah(e){return n.jsx(r,{...e,iconKey:"content_paste_off"})}function lh(e){return n.jsx(r,{...e,iconKey:"content_paste_search"})}function sh(e){return n.jsx(r,{...e,iconKey:"contrast"})}function dh(e){return n.jsx(r,{...e,iconKey:"control_camera"})}function uh(e){return n.jsx(r,{...e,iconKey:"control_point"})}function fh(e){return n.jsx(r,{...e,iconKey:"control_point_duplicate"})}function Ah(e){return n.jsx(r,{...e,iconKey:"cookie"})}function _h(e){return n.jsx(r,{...e,iconKey:"copy_all"})}function yh(e){return n.jsx(r,{...e,iconKey:"copyright"})}function hh(e){return n.jsx(r,{...e,iconKey:"coronavirus"})}function gh(e){return n.jsx(r,{...e,iconKey:"corporate_fare"})}function Ih(e){return n.jsx(r,{...e,iconKey:"cottage"})}function bh(e){return n.jsx(r,{...e,iconKey:"countertops"})}function ph(e){return n.jsx(r,{...e,iconKey:"create"})}function wh(e){return n.jsx(r,{...e,iconKey:"create_new_folder"})}function kh(e){return n.jsx(r,{...e,iconKey:"credit_card"})}function mh(e){return n.jsx(r,{...e,iconKey:"credit_card_off"})}function vh(e){return n.jsx(r,{...e,iconKey:"credit_score"})}function Kh(e){return n.jsx(r,{...e,iconKey:"crib"})}function Ch(e){return n.jsx(r,{...e,iconKey:"crisis_alert"})}function Sh(e){return n.jsx(r,{...e,iconKey:"crop"})}function Bh(e){return n.jsx(r,{...e,iconKey:"crop_16_9"})}function Eh(e){return n.jsx(r,{...e,iconKey:"crop_3_2"})}function Fh(e){return n.jsx(r,{...e,iconKey:"crop_5_4"})}function Ph(e){return n.jsx(r,{...e,iconKey:"crop_7_5"})}function Dh(e){return n.jsx(r,{...e,iconKey:"crop_din"})}function Nh(e){return n.jsx(r,{...e,iconKey:"crop_free"})}function Mh(e){return n.jsx(r,{...e,iconKey:"crop_landscape"})}function Th(e){return n.jsx(r,{...e,iconKey:"crop_original"})}function Oh(e){return n.jsx(r,{...e,iconKey:"crop_portrait"})}function Lh(e){return n.jsx(r,{...e,iconKey:"crop_rotate"})}function Qh(e){return n.jsx(r,{...e,iconKey:"crop_square"})}function Vh(e){return n.jsx(r,{...e,iconKey:"cruelty_free"})}function Wh(e){return n.jsx(r,{...e,iconKey:"css"})}function Gh(e){return n.jsx(r,{...e,iconKey:"currency_bitcoin"})}function zh(e){return n.jsx(r,{...e,iconKey:"currency_exchange"})}function Hh(e){return n.jsx(r,{...e,iconKey:"currency_franc"})}function Uh(e){return n.jsx(r,{...e,iconKey:"currency_lira"})}function Yh(e){return n.jsx(r,{...e,iconKey:"currency_pound"})}function $h(e){return n.jsx(r,{...e,iconKey:"currency_ruble"})}function jh(e){return n.jsx(r,{...e,iconKey:"currency_rupee"})}function qh(e){return n.jsx(r,{...e,iconKey:"currency_yen"})}function Jh(e){return n.jsx(r,{...e,iconKey:"currency_yuan"})}function Zh(e){return n.jsx(r,{...e,iconKey:"curtains"})}function Xh(e){return n.jsx(r,{...e,iconKey:"curtains_closed"})}function xh(e){return n.jsx(r,{...e,iconKey:"cyclone"})}function Rh(e){return n.jsx(r,{...e,iconKey:"dangerous"})}function hc(e){return n.jsx(r,{...e,iconKey:"dark_mode"})}function eg(e){return n.jsx(r,{...e,iconKey:"dashboard"})}function ng(e){return n.jsx(r,{...e,iconKey:"dashboard_customize"})}function og(e){return n.jsx(r,{...e,iconKey:"data_array"})}function rg(e){return n.jsx(r,{...e,iconKey:"data_exploration"})}function tg(e){return n.jsx(r,{...e,iconKey:"data_object"})}function cg(e){return n.jsx(r,{...e,iconKey:"data_saver_off"})}function ig(e){return n.jsx(r,{...e,iconKey:"data_saver_on"})}function ag(e){return n.jsx(r,{...e,iconKey:"data_thresholding"})}function lg(e){return n.jsx(r,{...e,iconKey:"data_usage"})}function sg(e){return n.jsx(r,{...e,iconKey:"dataset"})}function dg(e){return n.jsx(r,{...e,iconKey:"dataset_linked"})}function ug(e){return n.jsx(r,{...e,iconKey:"date_range"})}function fg(e){return n.jsx(r,{...e,iconKey:"deblur"})}function Ag(e){return n.jsx(r,{...e,iconKey:"deck"})}function _g(e){return n.jsx(r,{...e,iconKey:"dehaze"})}function wo(e){return n.jsx(r,{...e,iconKey:"delete"})}function yg(e){return n.jsx(r,{...e,iconKey:"delete_forever"})}function hg(e){return n.jsx(r,{...e,iconKey:"delete_outline"})}function gg(e){return n.jsx(r,{...e,iconKey:"delete_sweep"})}function Ig(e){return n.jsx(r,{...e,iconKey:"delivery_dining"})}function bg(e){return n.jsx(r,{...e,iconKey:"density_large"})}function pg(e){return n.jsx(r,{...e,iconKey:"density_medium"})}function wg(e){return n.jsx(r,{...e,iconKey:"density_small"})}function kg(e){return n.jsx(r,{...e,iconKey:"departure_board"})}function gc(e){return n.jsx(r,{...e,iconKey:"description"})}function mg(e){return n.jsx(r,{...e,iconKey:"deselect"})}function vg(e){return n.jsx(r,{...e,iconKey:"design_services"})}function Kg(e){return n.jsx(r,{...e,iconKey:"desk"})}function Cg(e){return n.jsx(r,{...e,iconKey:"desktop_access_disabled"})}function Sg(e){return n.jsx(r,{...e,iconKey:"desktop_mac"})}function Bg(e){return n.jsx(r,{...e,iconKey:"desktop_windows"})}function Eg(e){return n.jsx(r,{...e,iconKey:"details"})}function Fg(e){return n.jsx(r,{...e,iconKey:"developer_board"})}function Pg(e){return n.jsx(r,{...e,iconKey:"developer_board_off"})}function Dg(e){return n.jsx(r,{...e,iconKey:"developer_mode"})}function Ng(e){return n.jsx(r,{...e,iconKey:"device_hub"})}function Mg(e){return n.jsx(r,{...e,iconKey:"device_thermostat"})}function Tg(e){return n.jsx(r,{...e,iconKey:"device_unknown"})}function Og(e){return n.jsx(r,{...e,iconKey:"devices"})}function Lg(e){return n.jsx(r,{...e,iconKey:"devices_fold"})}function Qg(e){return n.jsx(r,{...e,iconKey:"devices_other"})}function Vg(e){return n.jsx(r,{...e,iconKey:"dialer_sip"})}function Wg(e){return n.jsx(r,{...e,iconKey:"dialpad"})}function Gg(e){return n.jsx(r,{...e,iconKey:"diamond"})}function zg(e){return n.jsx(r,{...e,iconKey:"difference"})}function Hg(e){return n.jsx(r,{...e,iconKey:"dining"})}function Ug(e){return n.jsx(r,{...e,iconKey:"dinner_dining"})}function Yg(e){return n.jsx(r,{...e,iconKey:"directions"})}function $g(e){return n.jsx(r,{...e,iconKey:"directions_bike"})}function jg(e){return n.jsx(r,{...e,iconKey:"directions_boat"})}function qg(e){return n.jsx(r,{...e,iconKey:"directions_boat_filled"})}function Jg(e){return n.jsx(r,{...e,iconKey:"directions_bus"})}function Zg(e){return n.jsx(r,{...e,iconKey:"directions_bus_filled"})}function Xg(e){return n.jsx(r,{...e,iconKey:"directions_car"})}function xg(e){return n.jsx(r,{...e,iconKey:"directions_car_filled"})}function Rg(e){return n.jsx(r,{...e,iconKey:"directions_off"})}function eI(e){return n.jsx(r,{...e,iconKey:"directions_railway"})}function nI(e){return n.jsx(r,{...e,iconKey:"directions_railway_filled"})}function oI(e){return n.jsx(r,{...e,iconKey:"directions_run"})}function rI(e){return n.jsx(r,{...e,iconKey:"directions_subway"})}function tI(e){return n.jsx(r,{...e,iconKey:"directions_subway_filled"})}function cI(e){return n.jsx(r,{...e,iconKey:"directions_transit"})}function iI(e){return n.jsx(r,{...e,iconKey:"directions_transit_filled"})}function aI(e){return n.jsx(r,{...e,iconKey:"directions_walk"})}function lI(e){return n.jsx(r,{...e,iconKey:"dirty_lens"})}function sI(e){return n.jsx(r,{...e,iconKey:"disabled_by_default"})}function dI(e){return n.jsx(r,{...e,iconKey:"disabled_visible"})}function uI(e){return n.jsx(r,{...e,iconKey:"disc_full"})}function fI(e){return n.jsx(r,{...e,iconKey:"discount"})}function AI(e){return n.jsx(r,{...e,iconKey:"display_settings"})}function _I(e){return n.jsx(r,{...e,iconKey:"diversity_1"})}function yI(e){return n.jsx(r,{...e,iconKey:"diversity_2"})}function hI(e){return n.jsx(r,{...e,iconKey:"diversity_3"})}function gI(e){return n.jsx(r,{...e,iconKey:"dns"})}function II(e){return n.jsx(r,{...e,iconKey:"do_disturb"})}function bI(e){return n.jsx(r,{...e,iconKey:"do_disturb_alt"})}function pI(e){return n.jsx(r,{...e,iconKey:"do_disturb_off"})}function wI(e){return n.jsx(r,{...e,iconKey:"do_disturb_on"})}function kI(e){return n.jsx(r,{...e,iconKey:"do_not_disturb"})}function mI(e){return n.jsx(r,{...e,iconKey:"do_not_disturb_alt"})}function vI(e){return n.jsx(r,{...e,iconKey:"do_not_disturb_off"})}function KI(e){return n.jsx(r,{...e,iconKey:"do_not_disturb_on"})}function CI(e){return n.jsx(r,{...e,iconKey:"do_not_disturb_on_total_silence"})}function SI(e){return n.jsx(r,{...e,iconKey:"do_not_step"})}function BI(e){return n.jsx(r,{...e,iconKey:"do_not_touch"})}function EI(e){return n.jsx(r,{...e,iconKey:"dock"})}function FI(e){return n.jsx(r,{...e,iconKey:"document_scanner"})}function PI(e){return n.jsx(r,{...e,iconKey:"domain"})}function DI(e){return n.jsx(r,{...e,iconKey:"domain_add"})}function NI(e){return n.jsx(r,{...e,iconKey:"domain_disabled"})}function MI(e){return n.jsx(r,{...e,iconKey:"domain_verification"})}function TI(e){return n.jsx(r,{...e,iconKey:"done"})}function OI(e){return n.jsx(r,{...e,iconKey:"done_all"})}function LI(e){return n.jsx(r,{...e,iconKey:"done_outline"})}function QI(e){return n.jsx(r,{...e,iconKey:"donut_large"})}function VI(e){return n.jsx(r,{...e,iconKey:"donut_small"})}function WI(e){return n.jsx(r,{...e,iconKey:"door_back"})}function GI(e){return n.jsx(r,{...e,iconKey:"door_front"})}function zI(e){return n.jsx(r,{...e,iconKey:"door_sliding"})}function HI(e){return n.jsx(r,{...e,iconKey:"doorbell"})}function UI(e){return n.jsx(r,{...e,iconKey:"double_arrow"})}function YI(e){return n.jsx(r,{...e,iconKey:"downhill_skiing"})}function $I(e){return n.jsx(r,{...e,iconKey:"download"})}function jI(e){return n.jsx(r,{...e,iconKey:"download_done"})}function qI(e){return n.jsx(r,{...e,iconKey:"download_for_offline"})}function JI(e){return n.jsx(r,{...e,iconKey:"downloading"})}function ZI(e){return n.jsx(r,{...e,iconKey:"drafts"})}function XI(e){return n.jsx(r,{...e,iconKey:"drag_handle"})}function xI(e){return n.jsx(r,{...e,iconKey:"drag_indicator"})}function RI(e){return n.jsx(r,{...e,iconKey:"draw"})}function eb(e){return n.jsx(r,{...e,iconKey:"drive_eta"})}function nb(e){return n.jsx(r,{...e,iconKey:"drive_file_move"})}function ob(e){return n.jsx(r,{...e,iconKey:"drive_file_move_rtl"})}function rb(e){return n.jsx(r,{...e,iconKey:"drive_file_rename_outline"})}function Ic(e){return n.jsx(r,{...e,iconKey:"drive_folder_upload"})}function tb(e){return n.jsx(r,{...e,iconKey:"dry"})}function cb(e){return n.jsx(r,{...e,iconKey:"dry_cleaning"})}function ib(e){return n.jsx(r,{...e,iconKey:"duo"})}function ab(e){return n.jsx(r,{...e,iconKey:"dvr"})}function lb(e){return n.jsx(r,{...e,iconKey:"dynamic_feed"})}function sb(e){return n.jsx(r,{...e,iconKey:"dynamic_form"})}function db(e){return n.jsx(r,{...e,iconKey:"e_mobiledata"})}function ub(e){return n.jsx(r,{...e,iconKey:"earbuds"})}function fb(e){return n.jsx(r,{...e,iconKey:"earbuds_battery"})}function Ab(e){return n.jsx(r,{...e,iconKey:"east"})}function _b(e){return n.jsx(r,{...e,iconKey:"edgesensor_high"})}function yb(e){return n.jsx(r,{...e,iconKey:"edgesensor_low"})}function bc(e){return n.jsx(r,{...e,iconKey:"edit"})}function hb(e){return n.jsx(r,{...e,iconKey:"edit_attributes"})}function gb(e){return n.jsx(r,{...e,iconKey:"edit_calendar"})}function Ib(e){return n.jsx(r,{...e,iconKey:"edit_location"})}function bb(e){return n.jsx(r,{...e,iconKey:"edit_location_alt"})}function pb(e){return n.jsx(r,{...e,iconKey:"edit_note"})}function wb(e){return n.jsx(r,{...e,iconKey:"edit_notifications"})}function kb(e){return n.jsx(r,{...e,iconKey:"edit_off"})}function mb(e){return n.jsx(r,{...e,iconKey:"edit_road"})}function vb(e){return n.jsx(r,{...e,iconKey:"egg"})}function Kb(e){return n.jsx(r,{...e,iconKey:"egg_alt"})}function Cb(e){return n.jsx(r,{...e,iconKey:"eject"})}function Sb(e){return n.jsx(r,{...e,iconKey:"elderly"})}function Bb(e){return n.jsx(r,{...e,iconKey:"elderly_woman"})}function Eb(e){return n.jsx(r,{...e,iconKey:"electric_bike"})}function Fb(e){return n.jsx(r,{...e,iconKey:"electric_bolt"})}function Pb(e){return n.jsx(r,{...e,iconKey:"electric_car"})}function Db(e){return n.jsx(r,{...e,iconKey:"electric_meter"})}function Nb(e){return n.jsx(r,{...e,iconKey:"electric_moped"})}function Mb(e){return n.jsx(r,{...e,iconKey:"electric_rickshaw"})}function Tb(e){return n.jsx(r,{...e,iconKey:"electric_scooter"})}function Ob(e){return n.jsx(r,{...e,iconKey:"electrical_services"})}function Lb(e){return n.jsx(r,{...e,iconKey:"elevator"})}function pc(e){return n.jsx(r,{...e,iconKey:"email"})}function Qb(e){return n.jsx(r,{...e,iconKey:"emergency"})}function Vb(e){return n.jsx(r,{...e,iconKey:"emergency_recording"})}function Wb(e){return n.jsx(r,{...e,iconKey:"emergency_share"})}function Gb(e){return n.jsx(r,{...e,iconKey:"emoji_emotions"})}function zb(e){return n.jsx(r,{...e,iconKey:"emoji_events"})}function Hb(e){return n.jsx(r,{...e,iconKey:"emoji_food_beverage"})}function Ub(e){return n.jsx(r,{...e,iconKey:"emoji_nature"})}function Yb(e){return n.jsx(r,{...e,iconKey:"emoji_objects"})}function $b(e){return n.jsx(r,{...e,iconKey:"emoji_people"})}function jb(e){return n.jsx(r,{...e,iconKey:"emoji_symbols"})}function qb(e){return n.jsx(r,{...e,iconKey:"emoji_transportation"})}function Jb(e){return n.jsx(r,{...e,iconKey:"energy_savings_leaf"})}function Zb(e){return n.jsx(r,{...e,iconKey:"engineering"})}function Xb(e){return n.jsx(r,{...e,iconKey:"enhanced_encryption"})}function xb(e){return n.jsx(r,{...e,iconKey:"equalizer"})}function wr(e){return n.jsx(r,{...e,iconKey:"error"})}function wc(e){return n.jsx(r,{...e,iconKey:"error_outline"})}function Rb(e){return n.jsx(r,{...e,iconKey:"escalator"})}function ep(e){return n.jsx(r,{...e,iconKey:"escalator_warning"})}function np(e){return n.jsx(r,{...e,iconKey:"euro"})}function op(e){return n.jsx(r,{...e,iconKey:"euro_symbol"})}function rp(e){return n.jsx(r,{...e,iconKey:"ev_station"})}function tp(e){return n.jsx(r,{...e,iconKey:"event"})}function cp(e){return n.jsx(r,{...e,iconKey:"event_available"})}function ip(e){return n.jsx(r,{...e,iconKey:"event_busy"})}function ap(e){return n.jsx(r,{...e,iconKey:"event_note"})}function lp(e){return n.jsx(r,{...e,iconKey:"event_repeat"})}function sp(e){return n.jsx(r,{...e,iconKey:"event_seat"})}function dp(e){return n.jsx(r,{...e,iconKey:"exit_to_app"})}function up(e){return n.jsx(r,{...e,iconKey:"expand"})}function fp(e){return n.jsx(r,{...e,iconKey:"expand_circle_down"})}function Ap(e){return n.jsx(r,{...e,iconKey:"expand_less"})}function eo(e){return n.jsx(r,{...e,iconKey:"expand_more"})}function _p(e){return n.jsx(r,{...e,iconKey:"explicit"})}function yp(e){return n.jsx(r,{...e,iconKey:"explore"})}function hp(e){return n.jsx(r,{...e,iconKey:"explore_off"})}function gp(e){return n.jsx(r,{...e,iconKey:"exposure"})}function Ip(e){return n.jsx(r,{...e,iconKey:"exposure_neg_1"})}function bp(e){return n.jsx(r,{...e,iconKey:"exposure_neg_2"})}function pp(e){return n.jsx(r,{...e,iconKey:"exposure_plus_1"})}function wp(e){return n.jsx(r,{...e,iconKey:"exposure_plus_2"})}function kp(e){return n.jsx(r,{...e,iconKey:"exposure_zero"})}function mp(e){return n.jsx(r,{...e,iconKey:"extension"})}function vp(e){return n.jsx(r,{...e,iconKey:"extension_off"})}function Kp(e){return n.jsx(r,{...e,iconKey:"face"})}function Cp(e){return n.jsx(r,{...e,iconKey:"face_2"})}function Sp(e){return n.jsx(r,{...e,iconKey:"face_3"})}function Bp(e){return n.jsx(r,{...e,iconKey:"face_4"})}function Ep(e){return n.jsx(r,{...e,iconKey:"face_5"})}function Fp(e){return n.jsx(r,{...e,iconKey:"face_6"})}function Pp(e){return n.jsx(r,{...e,iconKey:"face_retouching_natural"})}function Dp(e){return n.jsx(r,{...e,iconKey:"face_retouching_off"})}function Np(e){return n.jsx(r,{...e,iconKey:"fact_check"})}function Mp(e){return n.jsx(r,{...e,iconKey:"factory"})}function Tp(e){return n.jsx(r,{...e,iconKey:"family_restroom"})}function Op(e){return n.jsx(r,{...e,iconKey:"fast_forward"})}function Lp(e){return n.jsx(r,{...e,iconKey:"fast_rewind"})}function Qp(e){return n.jsx(r,{...e,iconKey:"fastfood"})}function Vp(e){return n.jsx(r,{...e,iconKey:"favorite"})}function Wp(e){return n.jsx(r,{...e,iconKey:"favorite_border"})}function Gp(e){return n.jsx(r,{...e,iconKey:"fax"})}function zp(e){return n.jsx(r,{...e,iconKey:"featured_play_list"})}function Hp(e){return n.jsx(r,{...e,iconKey:"featured_video"})}function Up(e){return n.jsx(r,{...e,iconKey:"feed"})}function Yp(e){return n.jsx(r,{...e,iconKey:"feedback"})}function $p(e){return n.jsx(r,{...e,iconKey:"female"})}function jp(e){return n.jsx(r,{...e,iconKey:"fence"})}function qp(e){return n.jsx(r,{...e,iconKey:"festival"})}function Jp(e){return n.jsx(r,{...e,iconKey:"fiber_dvr"})}function Zp(e){return n.jsx(r,{...e,iconKey:"fiber_manual_record"})}function Xp(e){return n.jsx(r,{...e,iconKey:"fiber_new"})}function xp(e){return n.jsx(r,{...e,iconKey:"fiber_pin"})}function Rp(e){return n.jsx(r,{...e,iconKey:"fiber_smart_record"})}function kc(e){return n.jsx(r,{...e,iconKey:"file_copy"})}function ew(e){return n.jsx(r,{...e,iconKey:"file_download"})}function nw(e){return n.jsx(r,{...e,iconKey:"file_download_done"})}function ow(e){return n.jsx(r,{...e,iconKey:"file_download_off"})}function rw(e){return n.jsx(r,{...e,iconKey:"file_open"})}function tw(e){return n.jsx(r,{...e,iconKey:"file_present"})}function cw(e){return n.jsx(r,{...e,iconKey:"file_upload"})}function iw(e){return n.jsx(r,{...e,iconKey:"filter"})}function aw(e){return n.jsx(r,{...e,iconKey:"filter_1"})}function lw(e){return n.jsx(r,{...e,iconKey:"filter_2"})}function sw(e){return n.jsx(r,{...e,iconKey:"filter_3"})}function dw(e){return n.jsx(r,{...e,iconKey:"filter_4"})}function uw(e){return n.jsx(r,{...e,iconKey:"filter_5"})}function fw(e){return n.jsx(r,{...e,iconKey:"filter_6"})}function Aw(e){return n.jsx(r,{...e,iconKey:"filter_7"})}function _w(e){return n.jsx(r,{...e,iconKey:"filter_8"})}function yw(e){return n.jsx(r,{...e,iconKey:"filter_9"})}function hw(e){return n.jsx(r,{...e,iconKey:"filter_9_plus"})}function gw(e){return n.jsx(r,{...e,iconKey:"filter_alt"})}function Iw(e){return n.jsx(r,{...e,iconKey:"filter_alt_off"})}function bw(e){return n.jsx(r,{...e,iconKey:"filter_b_and_w"})}function pw(e){return n.jsx(r,{...e,iconKey:"filter_center_focus"})}function ww(e){return n.jsx(r,{...e,iconKey:"filter_drama"})}function kw(e){return n.jsx(r,{...e,iconKey:"filter_frames"})}function mw(e){return n.jsx(r,{...e,iconKey:"filter_hdr"})}function vw(e){return n.jsx(r,{...e,iconKey:"filter_list"})}function mc(e){return n.jsx(r,{...e,iconKey:"filter_list_off"})}function Kw(e){return n.jsx(r,{...e,iconKey:"filter_none"})}function Cw(e){return n.jsx(r,{...e,iconKey:"filter_tilt_shift"})}function Sw(e){return n.jsx(r,{...e,iconKey:"filter_vintage"})}function Bw(e){return n.jsx(r,{...e,iconKey:"find_in_page"})}function Ew(e){return n.jsx(r,{...e,iconKey:"find_replace"})}function Fw(e){return n.jsx(r,{...e,iconKey:"fingerprint"})}function Pw(e){return n.jsx(r,{...e,iconKey:"fire_extinguisher"})}function Dw(e){return n.jsx(r,{...e,iconKey:"fire_hydrant_alt"})}function Nw(e){return n.jsx(r,{...e,iconKey:"fire_truck"})}function Mw(e){return n.jsx(r,{...e,iconKey:"fireplace"})}function Tw(e){return n.jsx(r,{...e,iconKey:"first_page"})}function Ow(e){return n.jsx(r,{...e,iconKey:"fit_screen"})}function Lw(e){return n.jsx(r,{...e,iconKey:"fitbit"})}function Qw(e){return n.jsx(r,{...e,iconKey:"fitness_center"})}function vc(e){return n.jsx(r,{...e,iconKey:"flag"})}function Vw(e){return n.jsx(r,{...e,iconKey:"flag_circle"})}function Ww(e){return n.jsx(r,{...e,iconKey:"flaky"})}function Gw(e){return n.jsx(r,{...e,iconKey:"flare"})}function zw(e){return n.jsx(r,{...e,iconKey:"flash_auto"})}function Hw(e){return n.jsx(r,{...e,iconKey:"flash_off"})}function Uw(e){return n.jsx(r,{...e,iconKey:"flash_on"})}function Yw(e){return n.jsx(r,{...e,iconKey:"flashlight_off"})}function $w(e){return n.jsx(r,{...e,iconKey:"flashlight_on"})}function jw(e){return n.jsx(r,{...e,iconKey:"flatware"})}function qw(e){return n.jsx(r,{...e,iconKey:"flight"})}function Jw(e){return n.jsx(r,{...e,iconKey:"flight_class"})}function Zw(e){return n.jsx(r,{...e,iconKey:"flight_land"})}function Xw(e){return n.jsx(r,{...e,iconKey:"flight_takeoff"})}function xw(e){return n.jsx(r,{...e,iconKey:"flip"})}function Rw(e){return n.jsx(r,{...e,iconKey:"flip_camera_android"})}function ek(e){return n.jsx(r,{...e,iconKey:"flip_camera_ios"})}function nk(e){return n.jsx(r,{...e,iconKey:"flip_to_back"})}function ok(e){return n.jsx(r,{...e,iconKey:"flip_to_front"})}function rk(e){return n.jsx(r,{...e,iconKey:"flood"})}function tk(e){return n.jsx(r,{...e,iconKey:"fluorescent"})}function ck(e){return n.jsx(r,{...e,iconKey:"flutter_dash"})}function ik(e){return n.jsx(r,{...e,iconKey:"fmd_bad"})}function ak(e){return n.jsx(r,{...e,iconKey:"fmd_good"})}function lk(e){return n.jsx(r,{...e,iconKey:"folder"})}function sk(e){return n.jsx(r,{...e,iconKey:"folder_copy"})}function dk(e){return n.jsx(r,{...e,iconKey:"folder_delete"})}function uk(e){return n.jsx(r,{...e,iconKey:"folder_off"})}function fk(e){return n.jsx(r,{...e,iconKey:"folder_open"})}function Ak(e){return n.jsx(r,{...e,iconKey:"folder_shared"})}function _k(e){return n.jsx(r,{...e,iconKey:"folder_special"})}function yk(e){return n.jsx(r,{...e,iconKey:"folder_zip"})}function hk(e){return n.jsx(r,{...e,iconKey:"follow_the_signs"})}function gk(e){return n.jsx(r,{...e,iconKey:"font_download"})}function Ik(e){return n.jsx(r,{...e,iconKey:"font_download_off"})}function bk(e){return n.jsx(r,{...e,iconKey:"food_bank"})}function pk(e){return n.jsx(r,{...e,iconKey:"forest"})}function wk(e){return n.jsx(r,{...e,iconKey:"fork_left"})}function kk(e){return n.jsx(r,{...e,iconKey:"fork_right"})}function mk(e){return n.jsx(r,{...e,iconKey:"format_align_center"})}function vk(e){return n.jsx(r,{...e,iconKey:"format_align_justify"})}function Kk(e){return n.jsx(r,{...e,iconKey:"format_align_left"})}function Ck(e){return n.jsx(r,{...e,iconKey:"format_align_right"})}function Sk(e){return n.jsx(r,{...e,iconKey:"format_bold"})}function Bk(e){return n.jsx(r,{...e,iconKey:"format_clear"})}function Ek(e){return n.jsx(r,{...e,iconKey:"format_color_fill"})}function Fk(e){return n.jsx(r,{...e,iconKey:"format_color_reset"})}function Pk(e){return n.jsx(r,{...e,iconKey:"format_color_text"})}function Dk(e){return n.jsx(r,{...e,iconKey:"format_indent_decrease"})}function Nk(e){return n.jsx(r,{...e,iconKey:"format_indent_increase"})}function Mk(e){return n.jsx(r,{...e,iconKey:"format_italic"})}function Tk(e){return n.jsx(r,{...e,iconKey:"format_line_spacing"})}function Ok(e){return n.jsx(r,{...e,iconKey:"format_list_bulleted"})}function kr(e){return n.jsx(r,{...e,iconKey:"format_list_numbered"})}function Lk(e){return n.jsx(r,{...e,iconKey:"format_list_numbered_rtl"})}function Qk(e){return n.jsx(r,{...e,iconKey:"format_overline"})}function Vk(e){return n.jsx(r,{...e,iconKey:"format_paint"})}function Kc(e){return n.jsx(r,{...e,iconKey:"format_quote"})}function Wk(e){return n.jsx(r,{...e,iconKey:"format_shapes"})}function Gk(e){return n.jsx(r,{...e,iconKey:"format_size"})}function zk(e){return n.jsx(r,{...e,iconKey:"format_strikethrough"})}function Hk(e){return n.jsx(r,{...e,iconKey:"format_textdirection_l_to_r"})}function Uk(e){return n.jsx(r,{...e,iconKey:"format_textdirection_r_to_l"})}function Yk(e){return n.jsx(r,{...e,iconKey:"format_underlined"})}function $k(e){return n.jsx(r,{...e,iconKey:"fort"})}function jk(e){return n.jsx(r,{...e,iconKey:"forum"})}function qk(e){return n.jsx(r,{...e,iconKey:"forward"})}function Jk(e){return n.jsx(r,{...e,iconKey:"forward_10"})}function Zk(e){return n.jsx(r,{...e,iconKey:"forward_30"})}function Xk(e){return n.jsx(r,{...e,iconKey:"forward_5"})}function xk(e){return n.jsx(r,{...e,iconKey:"forward_to_inbox"})}function Rk(e){return n.jsx(r,{...e,iconKey:"foundation"})}function em(e){return n.jsx(r,{...e,iconKey:"free_breakfast"})}function nm(e){return n.jsx(r,{...e,iconKey:"free_cancellation"})}function om(e){return n.jsx(r,{...e,iconKey:"front_hand"})}function rm(e){return n.jsx(r,{...e,iconKey:"fullscreen"})}function tm(e){return n.jsx(r,{...e,iconKey:"fullscreen_exit"})}function Cc(e){return n.jsx(r,{...e,iconKey:"functions"})}function cm(e){return n.jsx(r,{...e,iconKey:"g_mobiledata"})}function im(e){return n.jsx(r,{...e,iconKey:"g_translate"})}function am(e){return n.jsx(r,{...e,iconKey:"gamepad"})}function lm(e){return n.jsx(r,{...e,iconKey:"games"})}function sm(e){return n.jsx(r,{...e,iconKey:"garage"})}function dm(e){return n.jsx(r,{...e,iconKey:"gas_meter"})}function um(e){return n.jsx(r,{...e,iconKey:"gavel"})}function fm(e){return n.jsx(r,{...e,iconKey:"generating_tokens"})}function Am(e){return n.jsx(r,{...e,iconKey:"gesture"})}function _m(e){return n.jsx(r,{...e,iconKey:"get_app"})}function ym(e){return n.jsx(r,{...e,iconKey:"gif"})}function hm(e){return n.jsx(r,{...e,iconKey:"gif_box"})}function gm(e){return n.jsx(r,{...e,iconKey:"girl"})}function Im(e){return n.jsx(r,{...e,iconKey:"gite"})}function bm(e){return n.jsx(r,{...e,iconKey:"golf_course"})}function pm(e){return n.jsx(r,{...e,iconKey:"gpp_bad"})}function wm(e){return n.jsx(r,{...e,iconKey:"gpp_good"})}function km(e){return n.jsx(r,{...e,iconKey:"gpp_maybe"})}function mm(e){return n.jsx(r,{...e,iconKey:"gps_fixed"})}function vm(e){return n.jsx(r,{...e,iconKey:"gps_not_fixed"})}function Km(e){return n.jsx(r,{...e,iconKey:"gps_off"})}function Cm(e){return n.jsx(r,{...e,iconKey:"grade"})}function Sm(e){return n.jsx(r,{...e,iconKey:"gradient"})}function Bm(e){return n.jsx(r,{...e,iconKey:"grading"})}function Em(e){return n.jsx(r,{...e,iconKey:"grain"})}function Fm(e){return n.jsx(r,{...e,iconKey:"graphic_eq"})}function Pm(e){return n.jsx(r,{...e,iconKey:"grass"})}function Dm(e){return n.jsx(r,{...e,iconKey:"grid_3x3"})}function Nm(e){return n.jsx(r,{...e,iconKey:"grid_4x4"})}function Mm(e){return n.jsx(r,{...e,iconKey:"grid_goldenratio"})}function Tm(e){return n.jsx(r,{...e,iconKey:"grid_off"})}function Om(e){return n.jsx(r,{...e,iconKey:"grid_on"})}function Lm(e){return n.jsx(r,{...e,iconKey:"grid_view"})}function Qm(e){return n.jsx(r,{...e,iconKey:"group"})}function Vm(e){return n.jsx(r,{...e,iconKey:"group_add"})}function Wm(e){return n.jsx(r,{...e,iconKey:"group_off"})}function Gm(e){return n.jsx(r,{...e,iconKey:"group_remove"})}function zm(e){return n.jsx(r,{...e,iconKey:"group_work"})}function Hm(e){return n.jsx(r,{...e,iconKey:"groups"})}function Um(e){return n.jsx(r,{...e,iconKey:"groups_2"})}function Ym(e){return n.jsx(r,{...e,iconKey:"groups_3"})}function $m(e){return n.jsx(r,{...e,iconKey:"h_mobiledata"})}function jm(e){return n.jsx(r,{...e,iconKey:"h_plus_mobiledata"})}function qm(e){return n.jsx(r,{...e,iconKey:"hail"})}function Jm(e){return n.jsx(r,{...e,iconKey:"handshake"})}function Zm(e){return n.jsx(r,{...e,iconKey:"handyman"})}function Xm(e){return n.jsx(r,{...e,iconKey:"hardware"})}function xm(e){return n.jsx(r,{...e,iconKey:"hd"})}function Rm(e){return n.jsx(r,{...e,iconKey:"hdr_auto"})}function ev(e){return n.jsx(r,{...e,iconKey:"hdr_auto_select"})}function nv(e){return n.jsx(r,{...e,iconKey:"hdr_enhanced_select"})}function ov(e){return n.jsx(r,{...e,iconKey:"hdr_off"})}function rv(e){return n.jsx(r,{...e,iconKey:"hdr_off_select"})}function tv(e){return n.jsx(r,{...e,iconKey:"hdr_on"})}function cv(e){return n.jsx(r,{...e,iconKey:"hdr_on_select"})}function iv(e){return n.jsx(r,{...e,iconKey:"hdr_plus"})}function av(e){return n.jsx(r,{...e,iconKey:"hdr_strong"})}function lv(e){return n.jsx(r,{...e,iconKey:"hdr_weak"})}function sv(e){return n.jsx(r,{...e,iconKey:"headphones"})}function dv(e){return n.jsx(r,{...e,iconKey:"headphones_battery"})}function uv(e){return n.jsx(r,{...e,iconKey:"headset"})}function fv(e){return n.jsx(r,{...e,iconKey:"headset_mic"})}function Av(e){return n.jsx(r,{...e,iconKey:"headset_off"})}function _v(e){return n.jsx(r,{...e,iconKey:"healing"})}function yv(e){return n.jsx(r,{...e,iconKey:"health_and_safety"})}function hv(e){return n.jsx(r,{...e,iconKey:"hearing"})}function gv(e){return n.jsx(r,{...e,iconKey:"hearing_disabled"})}function Iv(e){return n.jsx(r,{...e,iconKey:"heart_broken"})}function bv(e){return n.jsx(r,{...e,iconKey:"heat_pump"})}function pv(e){return n.jsx(r,{...e,iconKey:"height"})}function wv(e){return n.jsx(r,{...e,iconKey:"help"})}function kv(e){return n.jsx(r,{...e,iconKey:"help_center"})}function mv(e){return n.jsx(r,{...e,iconKey:"help_outline"})}function vv(e){return n.jsx(r,{...e,iconKey:"hevc"})}function Kv(e){return n.jsx(r,{...e,iconKey:"hexagon"})}function Cv(e){return n.jsx(r,{...e,iconKey:"hide_image"})}function Sv(e){return n.jsx(r,{...e,iconKey:"hide_source"})}function Bv(e){return n.jsx(r,{...e,iconKey:"high_quality"})}function Ev(e){return n.jsx(r,{...e,iconKey:"highlight"})}function Fv(e){return n.jsx(r,{...e,iconKey:"highlight_alt"})}function Pv(e){return n.jsx(r,{...e,iconKey:"highlight_off"})}function Dv(e){return n.jsx(r,{...e,iconKey:"hiking"})}function Nv(e){return n.jsx(r,{...e,iconKey:"history"})}function Mv(e){return n.jsx(r,{...e,iconKey:"history_edu"})}function Tv(e){return n.jsx(r,{...e,iconKey:"history_toggle_off"})}function Ov(e){return n.jsx(r,{...e,iconKey:"hive"})}function Lv(e){return n.jsx(r,{...e,iconKey:"hls"})}function Qv(e){return n.jsx(r,{...e,iconKey:"hls_off"})}function Vv(e){return n.jsx(r,{...e,iconKey:"holiday_village"})}function Wv(e){return n.jsx(r,{...e,iconKey:"home"})}function Gv(e){return n.jsx(r,{...e,iconKey:"home_max"})}function zv(e){return n.jsx(r,{...e,iconKey:"home_mini"})}function Hv(e){return n.jsx(r,{...e,iconKey:"home_repair_service"})}function Uv(e){return n.jsx(r,{...e,iconKey:"home_work"})}function Yv(e){return n.jsx(r,{...e,iconKey:"horizontal_distribute"})}function $v(e){return n.jsx(r,{...e,iconKey:"horizontal_rule"})}function jv(e){return n.jsx(r,{...e,iconKey:"horizontal_split"})}function qv(e){return n.jsx(r,{...e,iconKey:"hot_tub"})}function Jv(e){return n.jsx(r,{...e,iconKey:"hotel"})}function Zv(e){return n.jsx(r,{...e,iconKey:"hotel_class"})}function Xv(e){return n.jsx(r,{...e,iconKey:"hourglass_bottom"})}function xv(e){return n.jsx(r,{...e,iconKey:"hourglass_disabled"})}function Rv(e){return n.jsx(r,{...e,iconKey:"hourglass_empty"})}function e0(e){return n.jsx(r,{...e,iconKey:"hourglass_full"})}function n0(e){return n.jsx(r,{...e,iconKey:"hourglass_top"})}function o0(e){return n.jsx(r,{...e,iconKey:"house"})}function r0(e){return n.jsx(r,{...e,iconKey:"house_siding"})}function t0(e){return n.jsx(r,{...e,iconKey:"houseboat"})}function c0(e){return n.jsx(r,{...e,iconKey:"how_to_reg"})}function i0(e){return n.jsx(r,{...e,iconKey:"how_to_vote"})}function a0(e){return n.jsx(r,{...e,iconKey:"html"})}function Sc(e){return n.jsx(r,{...e,iconKey:"http"})}function l0(e){return n.jsx(r,{...e,iconKey:"https"})}function s0(e){return n.jsx(r,{...e,iconKey:"hub"})}function d0(e){return n.jsx(r,{...e,iconKey:"hvac"})}function u0(e){return n.jsx(r,{...e,iconKey:"ice_skating"})}function f0(e){return n.jsx(r,{...e,iconKey:"icecream"})}function A0(e){return n.jsx(r,{...e,iconKey:"image"})}function _0(e){return n.jsx(r,{...e,iconKey:"image_aspect_ratio"})}function y0(e){return n.jsx(r,{...e,iconKey:"image_not_supported"})}function h0(e){return n.jsx(r,{...e,iconKey:"image_search"})}function g0(e){return n.jsx(r,{...e,iconKey:"imagesearch_roller"})}function I0(e){return n.jsx(r,{...e,iconKey:"import_contacts"})}function b0(e){return n.jsx(r,{...e,iconKey:"import_export"})}function p0(e){return n.jsx(r,{...e,iconKey:"important_devices"})}function w0(e){return n.jsx(r,{...e,iconKey:"inbox"})}function k0(e){return n.jsx(r,{...e,iconKey:"incomplete_circle"})}function m0(e){return n.jsx(r,{...e,iconKey:"indeterminate_check_box"})}function Bc(e){return n.jsx(r,{...e,iconKey:"info"})}function v0(e){return n.jsx(r,{...e,iconKey:"input"})}function K0(e){return n.jsx(r,{...e,iconKey:"insert_chart"})}function C0(e){return n.jsx(r,{...e,iconKey:"insert_chart_outlined"})}function S0(e){return n.jsx(r,{...e,iconKey:"insert_comment"})}function B0(e){return n.jsx(r,{...e,iconKey:"insert_drive_file"})}function E0(e){return n.jsx(r,{...e,iconKey:"insert_emoticon"})}function F0(e){return n.jsx(r,{...e,iconKey:"insert_invitation"})}function P0(e){return n.jsx(r,{...e,iconKey:"insert_link"})}function D0(e){return n.jsx(r,{...e,iconKey:"insert_page_break"})}function N0(e){return n.jsx(r,{...e,iconKey:"insert_photo"})}function M0(e){return n.jsx(r,{...e,iconKey:"insights"})}function T0(e){return n.jsx(r,{...e,iconKey:"install_desktop"})}function O0(e){return n.jsx(r,{...e,iconKey:"install_mobile"})}function L0(e){return n.jsx(r,{...e,iconKey:"integration_instructions"})}function Q0(e){return n.jsx(r,{...e,iconKey:"interests"})}function V0(e){return n.jsx(r,{...e,iconKey:"interpreter_mode"})}function W0(e){return n.jsx(r,{...e,iconKey:"inventory"})}function G0(e){return n.jsx(r,{...e,iconKey:"inventory_2"})}function z0(e){return n.jsx(r,{...e,iconKey:"invert_colors"})}function H0(e){return n.jsx(r,{...e,iconKey:"invert_colors_off"})}function U0(e){return n.jsx(r,{...e,iconKey:"ios_share"})}function Y0(e){return n.jsx(r,{...e,iconKey:"iron"})}function $0(e){return n.jsx(r,{...e,iconKey:"iso"})}function j0(e){return n.jsx(r,{...e,iconKey:"javascript"})}function q0(e){return n.jsx(r,{...e,iconKey:"join_full"})}function J0(e){return n.jsx(r,{...e,iconKey:"join_inner"})}function Z0(e){return n.jsx(r,{...e,iconKey:"join_left"})}function X0(e){return n.jsx(r,{...e,iconKey:"join_right"})}function x0(e){return n.jsx(r,{...e,iconKey:"kayaking"})}function R0(e){return n.jsx(r,{...e,iconKey:"kebab_dining"})}function eK(e){return n.jsx(r,{...e,iconKey:"key"})}function nK(e){return n.jsx(r,{...e,iconKey:"key_off"})}function oK(e){return n.jsx(r,{...e,iconKey:"keyboard"})}function rK(e){return n.jsx(r,{...e,iconKey:"keyboard_alt"})}function tK(e){return n.jsx(r,{...e,iconKey:"keyboard_arrow_down"})}function cK(e){return n.jsx(r,{...e,iconKey:"keyboard_arrow_left"})}function iK(e){return n.jsx(r,{...e,iconKey:"keyboard_arrow_right"})}function aK(e){return n.jsx(r,{...e,iconKey:"keyboard_arrow_up"})}function lK(e){return n.jsx(r,{...e,iconKey:"keyboard_backspace"})}function sK(e){return n.jsx(r,{...e,iconKey:"keyboard_capslock"})}function dK(e){return n.jsx(r,{...e,iconKey:"keyboard_command_key"})}function uK(e){return n.jsx(r,{...e,iconKey:"keyboard_control_key"})}function fK(e){return n.jsx(r,{...e,iconKey:"keyboard_double_arrow_down"})}function AK(e){return n.jsx(r,{...e,iconKey:"keyboard_double_arrow_left"})}function _K(e){return n.jsx(r,{...e,iconKey:"keyboard_double_arrow_right"})}function yK(e){return n.jsx(r,{...e,iconKey:"keyboard_double_arrow_up"})}function hK(e){return n.jsx(r,{...e,iconKey:"keyboard_hide"})}function gK(e){return n.jsx(r,{...e,iconKey:"keyboard_option_key"})}function IK(e){return n.jsx(r,{...e,iconKey:"keyboard_return"})}function ko(e){return n.jsx(r,{...e,iconKey:"keyboard_tab"})}function bK(e){return n.jsx(r,{...e,iconKey:"keyboard_voice"})}function pK(e){return n.jsx(r,{...e,iconKey:"king_bed"})}function wK(e){return n.jsx(r,{...e,iconKey:"kitchen"})}function kK(e){return n.jsx(r,{...e,iconKey:"kitesurfing"})}function mK(e){return n.jsx(r,{...e,iconKey:"label"})}function vK(e){return n.jsx(r,{...e,iconKey:"label_important"})}function KK(e){return n.jsx(r,{...e,iconKey:"label_off"})}function CK(e){return n.jsx(r,{...e,iconKey:"lan"})}function SK(e){return n.jsx(r,{...e,iconKey:"landscape"})}function BK(e){return n.jsx(r,{...e,iconKey:"landslide"})}function EK(e){return n.jsx(r,{...e,iconKey:"language"})}function FK(e){return n.jsx(r,{...e,iconKey:"laptop"})}function PK(e){return n.jsx(r,{...e,iconKey:"laptop_chromebook"})}function DK(e){return n.jsx(r,{...e,iconKey:"laptop_mac"})}function NK(e){return n.jsx(r,{...e,iconKey:"laptop_windows"})}function MK(e){return n.jsx(r,{...e,iconKey:"last_page"})}function TK(e){return n.jsx(r,{...e,iconKey:"launch"})}function OK(e){return n.jsx(r,{...e,iconKey:"layers"})}function LK(e){return n.jsx(r,{...e,iconKey:"layers_clear"})}function QK(e){return n.jsx(r,{...e,iconKey:"leaderboard"})}function VK(e){return n.jsx(r,{...e,iconKey:"leak_add"})}function WK(e){return n.jsx(r,{...e,iconKey:"leak_remove"})}function GK(e){return n.jsx(r,{...e,iconKey:"legend_toggle"})}function zK(e){return n.jsx(r,{...e,iconKey:"lens"})}function HK(e){return n.jsx(r,{...e,iconKey:"lens_blur"})}function UK(e){return n.jsx(r,{...e,iconKey:"library_add"})}function YK(e){return n.jsx(r,{...e,iconKey:"library_add_check"})}function $K(e){return n.jsx(r,{...e,iconKey:"library_books"})}function jK(e){return n.jsx(r,{...e,iconKey:"library_music"})}function qK(e){return n.jsx(r,{...e,iconKey:"light"})}function Ec(e){return n.jsx(r,{...e,iconKey:"light_mode"})}function JK(e){return n.jsx(r,{...e,iconKey:"lightbulb"})}function ZK(e){return n.jsx(r,{...e,iconKey:"lightbulb_circle"})}function XK(e){return n.jsx(r,{...e,iconKey:"line_axis"})}function xK(e){return n.jsx(r,{...e,iconKey:"line_style"})}function RK(e){return n.jsx(r,{...e,iconKey:"line_weight"})}function eC(e){return n.jsx(r,{...e,iconKey:"linear_scale"})}function Fc(e){return n.jsx(r,{...e,iconKey:"link"})}function nC(e){return n.jsx(r,{...e,iconKey:"link_off"})}function oC(e){return n.jsx(r,{...e,iconKey:"linked_camera"})}function rC(e){return n.jsx(r,{...e,iconKey:"liquor"})}function Pc(e){return n.jsx(r,{...e,iconKey:"list"})}function Dc(e){return n.jsx(r,{...e,iconKey:"list_alt"})}function tC(e){return n.jsx(r,{...e,iconKey:"live_help"})}function cC(e){return n.jsx(r,{...e,iconKey:"live_tv"})}function iC(e){return n.jsx(r,{...e,iconKey:"living"})}function aC(e){return n.jsx(r,{...e,iconKey:"local_activity"})}function lC(e){return n.jsx(r,{...e,iconKey:"local_airport"})}function sC(e){return n.jsx(r,{...e,iconKey:"local_atm"})}function dC(e){return n.jsx(r,{...e,iconKey:"local_bar"})}function uC(e){return n.jsx(r,{...e,iconKey:"local_cafe"})}function fC(e){return n.jsx(r,{...e,iconKey:"local_car_wash"})}function AC(e){return n.jsx(r,{...e,iconKey:"local_convenience_store"})}function _C(e){return n.jsx(r,{...e,iconKey:"local_dining"})}function yC(e){return n.jsx(r,{...e,iconKey:"local_drink"})}function hC(e){return n.jsx(r,{...e,iconKey:"local_fire_department"})}function gC(e){return n.jsx(r,{...e,iconKey:"local_florist"})}function IC(e){return n.jsx(r,{...e,iconKey:"local_gas_station"})}function bC(e){return n.jsx(r,{...e,iconKey:"local_grocery_store"})}function pC(e){return n.jsx(r,{...e,iconKey:"local_hospital"})}function wC(e){return n.jsx(r,{...e,iconKey:"local_hotel"})}function kC(e){return n.jsx(r,{...e,iconKey:"local_laundry_service"})}function mC(e){return n.jsx(r,{...e,iconKey:"local_library"})}function vC(e){return n.jsx(r,{...e,iconKey:"local_mall"})}function KC(e){return n.jsx(r,{...e,iconKey:"local_movies"})}function CC(e){return n.jsx(r,{...e,iconKey:"local_offer"})}function SC(e){return n.jsx(r,{...e,iconKey:"local_parking"})}function BC(e){return n.jsx(r,{...e,iconKey:"local_pharmacy"})}function EC(e){return n.jsx(r,{...e,iconKey:"local_phone"})}function FC(e){return n.jsx(r,{...e,iconKey:"local_pizza"})}function PC(e){return n.jsx(r,{...e,iconKey:"local_play"})}function DC(e){return n.jsx(r,{...e,iconKey:"local_police"})}function NC(e){return n.jsx(r,{...e,iconKey:"local_post_office"})}function MC(e){return n.jsx(r,{...e,iconKey:"local_printshop"})}function TC(e){return n.jsx(r,{...e,iconKey:"local_see"})}function OC(e){return n.jsx(r,{...e,iconKey:"local_shipping"})}function LC(e){return n.jsx(r,{...e,iconKey:"local_taxi"})}function QC(e){return n.jsx(r,{...e,iconKey:"location_city"})}function VC(e){return n.jsx(r,{...e,iconKey:"location_disabled"})}function WC(e){return n.jsx(r,{...e,iconKey:"location_off"})}function GC(e){return n.jsx(r,{...e,iconKey:"location_on"})}function zC(e){return n.jsx(r,{...e,iconKey:"location_searching"})}function HC(e){return n.jsx(r,{...e,iconKey:"lock"})}function UC(e){return n.jsx(r,{...e,iconKey:"lock_clock"})}function YC(e){return n.jsx(r,{...e,iconKey:"lock_open"})}function $C(e){return n.jsx(r,{...e,iconKey:"lock_person"})}function jC(e){return n.jsx(r,{...e,iconKey:"lock_reset"})}function qC(e){return n.jsx(r,{...e,iconKey:"login"})}function JC(e){return n.jsx(r,{...e,iconKey:"logo_dev"})}function Nc(e){return n.jsx(r,{...e,iconKey:"logout"})}function ZC(e){return n.jsx(r,{...e,iconKey:"looks"})}function XC(e){return n.jsx(r,{...e,iconKey:"looks_3"})}function xC(e){return n.jsx(r,{...e,iconKey:"looks_4"})}function RC(e){return n.jsx(r,{...e,iconKey:"looks_5"})}function eS(e){return n.jsx(r,{...e,iconKey:"looks_6"})}function nS(e){return n.jsx(r,{...e,iconKey:"looks_one"})}function oS(e){return n.jsx(r,{...e,iconKey:"looks_two"})}function rS(e){return n.jsx(r,{...e,iconKey:"loop"})}function tS(e){return n.jsx(r,{...e,iconKey:"loupe"})}function cS(e){return n.jsx(r,{...e,iconKey:"low_priority"})}function iS(e){return n.jsx(r,{...e,iconKey:"loyalty"})}function aS(e){return n.jsx(r,{...e,iconKey:"lte_mobiledata"})}function lS(e){return n.jsx(r,{...e,iconKey:"lte_plus_mobiledata"})}function sS(e){return n.jsx(r,{...e,iconKey:"luggage"})}function dS(e){return n.jsx(r,{...e,iconKey:"lunch_dining"})}function uS(e){return n.jsx(r,{...e,iconKey:"lyrics"})}function fS(e){return n.jsx(r,{...e,iconKey:"macro_off"})}function AS(e){return n.jsx(r,{...e,iconKey:"mail"})}function _S(e){return n.jsx(r,{...e,iconKey:"mail_lock"})}function yS(e){return n.jsx(r,{...e,iconKey:"mail_outline"})}function hS(e){return n.jsx(r,{...e,iconKey:"male"})}function gS(e){return n.jsx(r,{...e,iconKey:"man"})}function IS(e){return n.jsx(r,{...e,iconKey:"man_2"})}function bS(e){return n.jsx(r,{...e,iconKey:"man_3"})}function pS(e){return n.jsx(r,{...e,iconKey:"man_4"})}function wS(e){return n.jsx(r,{...e,iconKey:"manage_accounts"})}function kS(e){return n.jsx(r,{...e,iconKey:"manage_history"})}function mS(e){return n.jsx(r,{...e,iconKey:"manage_search"})}function vS(e){return n.jsx(r,{...e,iconKey:"map"})}function KS(e){return n.jsx(r,{...e,iconKey:"maps_home_work"})}function CS(e){return n.jsx(r,{...e,iconKey:"maps_ugc"})}function SS(e){return n.jsx(r,{...e,iconKey:"margin"})}function BS(e){return n.jsx(r,{...e,iconKey:"mark_as_unread"})}function ES(e){return n.jsx(r,{...e,iconKey:"mark_chat_read"})}function FS(e){return n.jsx(r,{...e,iconKey:"mark_chat_unread"})}function PS(e){return n.jsx(r,{...e,iconKey:"mark_email_read"})}function DS(e){return n.jsx(r,{...e,iconKey:"mark_email_unread"})}function NS(e){return n.jsx(r,{...e,iconKey:"mark_unread_chat_alt"})}function MS(e){return n.jsx(r,{...e,iconKey:"markunread"})}function TS(e){return n.jsx(r,{...e,iconKey:"markunread_mailbox"})}function OS(e){return n.jsx(r,{...e,iconKey:"masks"})}function LS(e){return n.jsx(r,{...e,iconKey:"maximize"})}function QS(e){return n.jsx(r,{...e,iconKey:"media_bluetooth_off"})}function VS(e){return n.jsx(r,{...e,iconKey:"media_bluetooth_on"})}function WS(e){return n.jsx(r,{...e,iconKey:"mediation"})}function GS(e){return n.jsx(r,{...e,iconKey:"medical_information"})}function zS(e){return n.jsx(r,{...e,iconKey:"medical_services"})}function HS(e){return n.jsx(r,{...e,iconKey:"medication"})}function US(e){return n.jsx(r,{...e,iconKey:"medication_liquid"})}function YS(e){return n.jsx(r,{...e,iconKey:"meeting_room"})}function $S(e){return n.jsx(r,{...e,iconKey:"memory"})}function mr(e){return n.jsx(r,{...e,iconKey:"menu"})}function jS(e){return n.jsx(r,{...e,iconKey:"menu_book"})}function qS(e){return n.jsx(r,{...e,iconKey:"menu_open"})}function JS(e){return n.jsx(r,{...e,iconKey:"merge"})}function ZS(e){return n.jsx(r,{...e,iconKey:"merge_type"})}function XS(e){return n.jsx(r,{...e,iconKey:"message"})}function xS(e){return n.jsx(r,{...e,iconKey:"mic"})}function RS(e){return n.jsx(r,{...e,iconKey:"mic_external_off"})}function eB(e){return n.jsx(r,{...e,iconKey:"mic_external_on"})}function nB(e){return n.jsx(r,{...e,iconKey:"mic_none"})}function oB(e){return n.jsx(r,{...e,iconKey:"mic_off"})}function rB(e){return n.jsx(r,{...e,iconKey:"microwave"})}function tB(e){return n.jsx(r,{...e,iconKey:"military_tech"})}function cB(e){return n.jsx(r,{...e,iconKey:"minimize"})}function iB(e){return n.jsx(r,{...e,iconKey:"minor_crash"})}function aB(e){return n.jsx(r,{...e,iconKey:"miscellaneous_services"})}function lB(e){return n.jsx(r,{...e,iconKey:"missed_video_call"})}function sB(e){return n.jsx(r,{...e,iconKey:"mms"})}function dB(e){return n.jsx(r,{...e,iconKey:"mobile_friendly"})}function uB(e){return n.jsx(r,{...e,iconKey:"mobile_off"})}function fB(e){return n.jsx(r,{...e,iconKey:"mobile_screen_share"})}function AB(e){return n.jsx(r,{...e,iconKey:"mobiledata_off"})}function _B(e){return n.jsx(r,{...e,iconKey:"mode"})}function yB(e){return n.jsx(r,{...e,iconKey:"mode_comment"})}function hB(e){return n.jsx(r,{...e,iconKey:"mode_edit"})}function gB(e){return n.jsx(r,{...e,iconKey:"mode_edit_outline"})}function IB(e){return n.jsx(r,{...e,iconKey:"mode_fan_off"})}function bB(e){return n.jsx(r,{...e,iconKey:"mode_night"})}function pB(e){return n.jsx(r,{...e,iconKey:"mode_of_travel"})}function wB(e){return n.jsx(r,{...e,iconKey:"mode_standby"})}function kB(e){return n.jsx(r,{...e,iconKey:"model_training"})}function mB(e){return n.jsx(r,{...e,iconKey:"monetization_on"})}function vB(e){return n.jsx(r,{...e,iconKey:"money"})}function KB(e){return n.jsx(r,{...e,iconKey:"money_off"})}function CB(e){return n.jsx(r,{...e,iconKey:"money_off_csred"})}function SB(e){return n.jsx(r,{...e,iconKey:"monitor"})}function BB(e){return n.jsx(r,{...e,iconKey:"monitor_heart"})}function EB(e){return n.jsx(r,{...e,iconKey:"monitor_weight"})}function FB(e){return n.jsx(r,{...e,iconKey:"monochrome_photos"})}function PB(e){return n.jsx(r,{...e,iconKey:"mood"})}function DB(e){return n.jsx(r,{...e,iconKey:"mood_bad"})}function NB(e){return n.jsx(r,{...e,iconKey:"moped"})}function MB(e){return n.jsx(r,{...e,iconKey:"more"})}function TB(e){return n.jsx(r,{...e,iconKey:"more_horiz"})}function OB(e){return n.jsx(r,{...e,iconKey:"more_time"})}function vr(e){return n.jsx(r,{...e,iconKey:"more_vert"})}function LB(e){return n.jsx(r,{...e,iconKey:"mosque"})}function QB(e){return n.jsx(r,{...e,iconKey:"motion_photos_auto"})}function VB(e){return n.jsx(r,{...e,iconKey:"motion_photos_off"})}function WB(e){return n.jsx(r,{...e,iconKey:"motion_photos_on"})}function GB(e){return n.jsx(r,{...e,iconKey:"motion_photos_pause"})}function zB(e){return n.jsx(r,{...e,iconKey:"motion_photos_paused"})}function HB(e){return n.jsx(r,{...e,iconKey:"mouse"})}function UB(e){return n.jsx(r,{...e,iconKey:"move_down"})}function YB(e){return n.jsx(r,{...e,iconKey:"move_to_inbox"})}function $B(e){return n.jsx(r,{...e,iconKey:"move_up"})}function jB(e){return n.jsx(r,{...e,iconKey:"movie"})}function qB(e){return n.jsx(r,{...e,iconKey:"movie_creation"})}function JB(e){return n.jsx(r,{...e,iconKey:"movie_filter"})}function ZB(e){return n.jsx(r,{...e,iconKey:"moving"})}function XB(e){return n.jsx(r,{...e,iconKey:"mp"})}function xB(e){return n.jsx(r,{...e,iconKey:"multiline_chart"})}function RB(e){return n.jsx(r,{...e,iconKey:"multiple_stop"})}function eE(e){return n.jsx(r,{...e,iconKey:"museum"})}function nE(e){return n.jsx(r,{...e,iconKey:"music_note"})}function oE(e){return n.jsx(r,{...e,iconKey:"music_off"})}function rE(e){return n.jsx(r,{...e,iconKey:"music_video"})}function tE(e){return n.jsx(r,{...e,iconKey:"my_location"})}function cE(e){return n.jsx(r,{...e,iconKey:"nat"})}function iE(e){return n.jsx(r,{...e,iconKey:"nature"})}function aE(e){return n.jsx(r,{...e,iconKey:"nature_people"})}function lE(e){return n.jsx(r,{...e,iconKey:"navigate_before"})}function sE(e){return n.jsx(r,{...e,iconKey:"navigate_next"})}function dE(e){return n.jsx(r,{...e,iconKey:"navigation"})}function uE(e){return n.jsx(r,{...e,iconKey:"near_me"})}function fE(e){return n.jsx(r,{...e,iconKey:"near_me_disabled"})}function AE(e){return n.jsx(r,{...e,iconKey:"nearby_error"})}function _E(e){return n.jsx(r,{...e,iconKey:"nearby_off"})}function yE(e){return n.jsx(r,{...e,iconKey:"nest_cam_wired_stand"})}function hE(e){return n.jsx(r,{...e,iconKey:"network_cell"})}function gE(e){return n.jsx(r,{...e,iconKey:"network_check"})}function IE(e){return n.jsx(r,{...e,iconKey:"network_locked"})}function bE(e){return n.jsx(r,{...e,iconKey:"network_ping"})}function pE(e){return n.jsx(r,{...e,iconKey:"network_wifi"})}function wE(e){return n.jsx(r,{...e,iconKey:"network_wifi_1_bar"})}function kE(e){return n.jsx(r,{...e,iconKey:"network_wifi_2_bar"})}function mE(e){return n.jsx(r,{...e,iconKey:"network_wifi_3_bar"})}function vE(e){return n.jsx(r,{...e,iconKey:"new_label"})}function KE(e){return n.jsx(r,{...e,iconKey:"new_releases"})}function CE(e){return n.jsx(r,{...e,iconKey:"newspaper"})}function SE(e){return n.jsx(r,{...e,iconKey:"next_plan"})}function BE(e){return n.jsx(r,{...e,iconKey:"next_week"})}function EE(e){return n.jsx(r,{...e,iconKey:"nfc"})}function FE(e){return n.jsx(r,{...e,iconKey:"night_shelter"})}function PE(e){return n.jsx(r,{...e,iconKey:"nightlife"})}function DE(e){return n.jsx(r,{...e,iconKey:"nightlight"})}function NE(e){return n.jsx(r,{...e,iconKey:"nightlight_round"})}function ME(e){return n.jsx(r,{...e,iconKey:"nights_stay"})}function TE(e){return n.jsx(r,{...e,iconKey:"no_accounts"})}function OE(e){return n.jsx(r,{...e,iconKey:"no_adult_content"})}function LE(e){return n.jsx(r,{...e,iconKey:"no_backpack"})}function QE(e){return n.jsx(r,{...e,iconKey:"no_cell"})}function VE(e){return n.jsx(r,{...e,iconKey:"no_crash"})}function WE(e){return n.jsx(r,{...e,iconKey:"no_drinks"})}function GE(e){return n.jsx(r,{...e,iconKey:"no_encryption"})}function zE(e){return n.jsx(r,{...e,iconKey:"no_encryption_gmailerrorred"})}function HE(e){return n.jsx(r,{...e,iconKey:"no_flash"})}function UE(e){return n.jsx(r,{...e,iconKey:"no_food"})}function YE(e){return n.jsx(r,{...e,iconKey:"no_luggage"})}function $E(e){return n.jsx(r,{...e,iconKey:"no_meals"})}function jE(e){return n.jsx(r,{...e,iconKey:"no_meeting_room"})}function qE(e){return n.jsx(r,{...e,iconKey:"no_photography"})}function JE(e){return n.jsx(r,{...e,iconKey:"no_sim"})}function ZE(e){return n.jsx(r,{...e,iconKey:"no_stroller"})}function XE(e){return n.jsx(r,{...e,iconKey:"no_transfer"})}function xE(e){return n.jsx(r,{...e,iconKey:"noise_aware"})}function RE(e){return n.jsx(r,{...e,iconKey:"noise_control_off"})}function eF(e){return n.jsx(r,{...e,iconKey:"nordic_walking"})}function nF(e){return n.jsx(r,{...e,iconKey:"north"})}function oF(e){return n.jsx(r,{...e,iconKey:"north_east"})}function rF(e){return n.jsx(r,{...e,iconKey:"north_west"})}function tF(e){return n.jsx(r,{...e,iconKey:"not_accessible"})}function cF(e){return n.jsx(r,{...e,iconKey:"not_interested"})}function iF(e){return n.jsx(r,{...e,iconKey:"not_listed_location"})}function aF(e){return n.jsx(r,{...e,iconKey:"not_started"})}function lF(e){return n.jsx(r,{...e,iconKey:"note"})}function sF(e){return n.jsx(r,{...e,iconKey:"note_add"})}function dF(e){return n.jsx(r,{...e,iconKey:"note_alt"})}function uF(e){return n.jsx(r,{...e,iconKey:"notes"})}function fF(e){return n.jsx(r,{...e,iconKey:"notification_add"})}function AF(e){return n.jsx(r,{...e,iconKey:"notification_important"})}function _F(e){return n.jsx(r,{...e,iconKey:"notifications"})}function yF(e){return n.jsx(r,{...e,iconKey:"notifications_active"})}function hF(e){return n.jsx(r,{...e,iconKey:"notifications_none"})}function gF(e){return n.jsx(r,{...e,iconKey:"notifications_off"})}function IF(e){return n.jsx(r,{...e,iconKey:"notifications_paused"})}function Mc(e){return n.jsx(r,{...e,iconKey:"numbers"})}function bF(e){return n.jsx(r,{...e,iconKey:"offline_bolt"})}function pF(e){return n.jsx(r,{...e,iconKey:"offline_pin"})}function wF(e){return n.jsx(r,{...e,iconKey:"offline_share"})}function kF(e){return n.jsx(r,{...e,iconKey:"oil_barrel"})}function mF(e){return n.jsx(r,{...e,iconKey:"on_device_training"})}function vF(e){return n.jsx(r,{...e,iconKey:"ondemand_video"})}function KF(e){return n.jsx(r,{...e,iconKey:"online_prediction"})}function CF(e){return n.jsx(r,{...e,iconKey:"opacity"})}function SF(e){return n.jsx(r,{...e,iconKey:"open_in_browser"})}function BF(e){return n.jsx(r,{...e,iconKey:"open_in_full"})}function no(e){return n.jsx(r,{...e,iconKey:"open_in_new"})}function EF(e){return n.jsx(r,{...e,iconKey:"open_in_new_off"})}function FF(e){return n.jsx(r,{...e,iconKey:"open_with"})}function PF(e){return n.jsx(r,{...e,iconKey:"other_houses"})}function DF(e){return n.jsx(r,{...e,iconKey:"outbound"})}function NF(e){return n.jsx(r,{...e,iconKey:"outbox"})}function MF(e){return n.jsx(r,{...e,iconKey:"outdoor_grill"})}function TF(e){return n.jsx(r,{...e,iconKey:"outlet"})}function OF(e){return n.jsx(r,{...e,iconKey:"outlined_flag"})}function LF(e){return n.jsx(r,{...e,iconKey:"output"})}function QF(e){return n.jsx(r,{...e,iconKey:"padding"})}function VF(e){return n.jsx(r,{...e,iconKey:"pages"})}function WF(e){return n.jsx(r,{...e,iconKey:"pageview"})}function GF(e){return n.jsx(r,{...e,iconKey:"paid"})}function zF(e){return n.jsx(r,{...e,iconKey:"palette"})}function HF(e){return n.jsx(r,{...e,iconKey:"pan_tool"})}function UF(e){return n.jsx(r,{...e,iconKey:"pan_tool_alt"})}function YF(e){return n.jsx(r,{...e,iconKey:"panorama"})}function $F(e){return n.jsx(r,{...e,iconKey:"panorama_fish_eye"})}function jF(e){return n.jsx(r,{...e,iconKey:"panorama_horizontal"})}function qF(e){return n.jsx(r,{...e,iconKey:"panorama_horizontal_select"})}function JF(e){return n.jsx(r,{...e,iconKey:"panorama_photosphere"})}function ZF(e){return n.jsx(r,{...e,iconKey:"panorama_photosphere_select"})}function XF(e){return n.jsx(r,{...e,iconKey:"panorama_vertical"})}function xF(e){return n.jsx(r,{...e,iconKey:"panorama_vertical_select"})}function RF(e){return n.jsx(r,{...e,iconKey:"panorama_wide_angle"})}function eP(e){return n.jsx(r,{...e,iconKey:"panorama_wide_angle_select"})}function nP(e){return n.jsx(r,{...e,iconKey:"paragliding"})}function oP(e){return n.jsx(r,{...e,iconKey:"park"})}function rP(e){return n.jsx(r,{...e,iconKey:"party_mode"})}function tP(e){return n.jsx(r,{...e,iconKey:"password"})}function cP(e){return n.jsx(r,{...e,iconKey:"pattern"})}function iP(e){return n.jsx(r,{...e,iconKey:"pause"})}function aP(e){return n.jsx(r,{...e,iconKey:"pause_circle"})}function lP(e){return n.jsx(r,{...e,iconKey:"pause_circle_filled"})}function sP(e){return n.jsx(r,{...e,iconKey:"pause_circle_outline"})}function dP(e){return n.jsx(r,{...e,iconKey:"pause_presentation"})}function uP(e){return n.jsx(r,{...e,iconKey:"payment"})}function fP(e){return n.jsx(r,{...e,iconKey:"payments"})}function AP(e){return n.jsx(r,{...e,iconKey:"pedal_bike"})}function _P(e){return n.jsx(r,{...e,iconKey:"pending"})}function yP(e){return n.jsx(r,{...e,iconKey:"pending_actions"})}function hP(e){return n.jsx(r,{...e,iconKey:"pentagon"})}function gP(e){return n.jsx(r,{...e,iconKey:"people"})}function IP(e){return n.jsx(r,{...e,iconKey:"people_alt"})}function bP(e){return n.jsx(r,{...e,iconKey:"people_outline"})}function pP(e){return n.jsx(r,{...e,iconKey:"percent"})}function wP(e){return n.jsx(r,{...e,iconKey:"perm_camera_mic"})}function kP(e){return n.jsx(r,{...e,iconKey:"perm_contact_calendar"})}function mP(e){return n.jsx(r,{...e,iconKey:"perm_data_setting"})}function vP(e){return n.jsx(r,{...e,iconKey:"perm_device_information"})}function KP(e){return n.jsx(r,{...e,iconKey:"perm_identity"})}function CP(e){return n.jsx(r,{...e,iconKey:"perm_media"})}function SP(e){return n.jsx(r,{...e,iconKey:"perm_phone_msg"})}function BP(e){return n.jsx(r,{...e,iconKey:"perm_scan_wifi"})}function EP(e){return n.jsx(r,{...e,iconKey:"person"})}function FP(e){return n.jsx(r,{...e,iconKey:"person_2"})}function PP(e){return n.jsx(r,{...e,iconKey:"person_3"})}function DP(e){return n.jsx(r,{...e,iconKey:"person_4"})}function NP(e){return n.jsx(r,{...e,iconKey:"person_add"})}function MP(e){return n.jsx(r,{...e,iconKey:"person_add_alt"})}function TP(e){return n.jsx(r,{...e,iconKey:"person_add_alt_1"})}function OP(e){return n.jsx(r,{...e,iconKey:"person_add_disabled"})}function LP(e){return n.jsx(r,{...e,iconKey:"person_off"})}function QP(e){return n.jsx(r,{...e,iconKey:"person_outline"})}function VP(e){return n.jsx(r,{...e,iconKey:"person_pin"})}function WP(e){return n.jsx(r,{...e,iconKey:"person_pin_circle"})}function GP(e){return n.jsx(r,{...e,iconKey:"person_remove"})}function zP(e){return n.jsx(r,{...e,iconKey:"person_remove_alt_1"})}function HP(e){return n.jsx(r,{...e,iconKey:"person_search"})}function UP(e){return n.jsx(r,{...e,iconKey:"personal_injury"})}function YP(e){return n.jsx(r,{...e,iconKey:"personal_video"})}function $P(e){return n.jsx(r,{...e,iconKey:"pest_control"})}function jP(e){return n.jsx(r,{...e,iconKey:"pest_control_rodent"})}function qP(e){return n.jsx(r,{...e,iconKey:"pets"})}function JP(e){return n.jsx(r,{...e,iconKey:"phishing"})}function ZP(e){return n.jsx(r,{...e,iconKey:"phone"})}function XP(e){return n.jsx(r,{...e,iconKey:"phone_android"})}function xP(e){return n.jsx(r,{...e,iconKey:"phone_bluetooth_speaker"})}function RP(e){return n.jsx(r,{...e,iconKey:"phone_callback"})}function e1(e){return n.jsx(r,{...e,iconKey:"phone_disabled"})}function n1(e){return n.jsx(r,{...e,iconKey:"phone_enabled"})}function o1(e){return n.jsx(r,{...e,iconKey:"phone_forwarded"})}function r1(e){return n.jsx(r,{...e,iconKey:"phone_iphone"})}function t1(e){return n.jsx(r,{...e,iconKey:"phone_locked"})}function c1(e){return n.jsx(r,{...e,iconKey:"phone_missed"})}function i1(e){return n.jsx(r,{...e,iconKey:"phone_paused"})}function a1(e){return n.jsx(r,{...e,iconKey:"phonelink"})}function l1(e){return n.jsx(r,{...e,iconKey:"phonelink_erase"})}function s1(e){return n.jsx(r,{...e,iconKey:"phonelink_lock"})}function d1(e){return n.jsx(r,{...e,iconKey:"phonelink_off"})}function u1(e){return n.jsx(r,{...e,iconKey:"phonelink_ring"})}function f1(e){return n.jsx(r,{...e,iconKey:"phonelink_setup"})}function A1(e){return n.jsx(r,{...e,iconKey:"photo"})}function _1(e){return n.jsx(r,{...e,iconKey:"photo_album"})}function y1(e){return n.jsx(r,{...e,iconKey:"photo_camera"})}function h1(e){return n.jsx(r,{...e,iconKey:"photo_camera_back"})}function g1(e){return n.jsx(r,{...e,iconKey:"photo_camera_front"})}function I1(e){return n.jsx(r,{...e,iconKey:"photo_filter"})}function b1(e){return n.jsx(r,{...e,iconKey:"photo_library"})}function p1(e){return n.jsx(r,{...e,iconKey:"photo_size_select_actual"})}function w1(e){return n.jsx(r,{...e,iconKey:"photo_size_select_large"})}function k1(e){return n.jsx(r,{...e,iconKey:"photo_size_select_small"})}function m1(e){return n.jsx(r,{...e,iconKey:"php"})}function v1(e){return n.jsx(r,{...e,iconKey:"piano"})}function K1(e){return n.jsx(r,{...e,iconKey:"piano_off"})}function C1(e){return n.jsx(r,{...e,iconKey:"picture_as_pdf"})}function S1(e){return n.jsx(r,{...e,iconKey:"picture_in_picture"})}function B1(e){return n.jsx(r,{...e,iconKey:"picture_in_picture_alt"})}function E1(e){return n.jsx(r,{...e,iconKey:"pie_chart"})}function F1(e){return n.jsx(r,{...e,iconKey:"pie_chart_outline"})}function P1(e){return n.jsx(r,{...e,iconKey:"pin"})}function D1(e){return n.jsx(r,{...e,iconKey:"pin_drop"})}function N1(e){return n.jsx(r,{...e,iconKey:"pin_end"})}function M1(e){return n.jsx(r,{...e,iconKey:"pin_invoke"})}function T1(e){return n.jsx(r,{...e,iconKey:"pinch"})}function O1(e){return n.jsx(r,{...e,iconKey:"pivot_table_chart"})}function L1(e){return n.jsx(r,{...e,iconKey:"pix"})}function Q1(e){return n.jsx(r,{...e,iconKey:"place"})}function V1(e){return n.jsx(r,{...e,iconKey:"plagiarism"})}function W1(e){return n.jsx(r,{...e,iconKey:"play_arrow"})}function G1(e){return n.jsx(r,{...e,iconKey:"play_circle"})}function z1(e){return n.jsx(r,{...e,iconKey:"play_circle_filled"})}function H1(e){return n.jsx(r,{...e,iconKey:"play_circle_outline"})}function U1(e){return n.jsx(r,{...e,iconKey:"play_disabled"})}function Y1(e){return n.jsx(r,{...e,iconKey:"play_for_work"})}function $1(e){return n.jsx(r,{...e,iconKey:"play_lesson"})}function j1(e){return n.jsx(r,{...e,iconKey:"playlist_add"})}function q1(e){return n.jsx(r,{...e,iconKey:"playlist_add_check"})}function J1(e){return n.jsx(r,{...e,iconKey:"playlist_add_check_circle"})}function Z1(e){return n.jsx(r,{...e,iconKey:"playlist_add_circle"})}function X1(e){return n.jsx(r,{...e,iconKey:"playlist_play"})}function x1(e){return n.jsx(r,{...e,iconKey:"playlist_remove"})}function R1(e){return n.jsx(r,{...e,iconKey:"plumbing"})}function eD(e){return n.jsx(r,{...e,iconKey:"plus_one"})}function nD(e){return n.jsx(r,{...e,iconKey:"podcasts"})}function oD(e){return n.jsx(r,{...e,iconKey:"point_of_sale"})}function rD(e){return n.jsx(r,{...e,iconKey:"policy"})}function tD(e){return n.jsx(r,{...e,iconKey:"poll"})}function cD(e){return n.jsx(r,{...e,iconKey:"polyline"})}function iD(e){return n.jsx(r,{...e,iconKey:"polymer"})}function aD(e){return n.jsx(r,{...e,iconKey:"pool"})}function lD(e){return n.jsx(r,{...e,iconKey:"portable_wifi_off"})}function sD(e){return n.jsx(r,{...e,iconKey:"portrait"})}function dD(e){return n.jsx(r,{...e,iconKey:"post_add"})}function uD(e){return n.jsx(r,{...e,iconKey:"power"})}function fD(e){return n.jsx(r,{...e,iconKey:"power_input"})}function AD(e){return n.jsx(r,{...e,iconKey:"power_off"})}function _D(e){return n.jsx(r,{...e,iconKey:"power_settings_new"})}function yD(e){return n.jsx(r,{...e,iconKey:"precision_manufacturing"})}function hD(e){return n.jsx(r,{...e,iconKey:"pregnant_woman"})}function gD(e){return n.jsx(r,{...e,iconKey:"present_to_all"})}function ID(e){return n.jsx(r,{...e,iconKey:"preview"})}function bD(e){return n.jsx(r,{...e,iconKey:"price_change"})}function pD(e){return n.jsx(r,{...e,iconKey:"price_check"})}function wD(e){return n.jsx(r,{...e,iconKey:"print"})}function kD(e){return n.jsx(r,{...e,iconKey:"print_disabled"})}function mD(e){return n.jsx(r,{...e,iconKey:"priority_high"})}function vD(e){return n.jsx(r,{...e,iconKey:"privacy_tip"})}function KD(e){return n.jsx(r,{...e,iconKey:"private_connectivity"})}function CD(e){return n.jsx(r,{...e,iconKey:"production_quantity_limits"})}function SD(e){return n.jsx(r,{...e,iconKey:"propane"})}function BD(e){return n.jsx(r,{...e,iconKey:"propane_tank"})}function ED(e){return n.jsx(r,{...e,iconKey:"psychology"})}function FD(e){return n.jsx(r,{...e,iconKey:"psychology_alt"})}function PD(e){return n.jsx(r,{...e,iconKey:"public"})}function DD(e){return n.jsx(r,{...e,iconKey:"public_off"})}function ND(e){return n.jsx(r,{...e,iconKey:"publish"})}function MD(e){return n.jsx(r,{...e,iconKey:"published_with_changes"})}function TD(e){return n.jsx(r,{...e,iconKey:"punch_clock"})}function OD(e){return n.jsx(r,{...e,iconKey:"push_pin"})}function LD(e){return n.jsx(r,{...e,iconKey:"qr_code"})}function QD(e){return n.jsx(r,{...e,iconKey:"qr_code_2"})}function VD(e){return n.jsx(r,{...e,iconKey:"qr_code_scanner"})}function WD(e){return n.jsx(r,{...e,iconKey:"query_builder"})}function GD(e){return n.jsx(r,{...e,iconKey:"query_stats"})}function zD(e){return n.jsx(r,{...e,iconKey:"question_answer"})}function HD(e){return n.jsx(r,{...e,iconKey:"question_mark"})}function UD(e){return n.jsx(r,{...e,iconKey:"queue"})}function YD(e){return n.jsx(r,{...e,iconKey:"queue_music"})}function $D(e){return n.jsx(r,{...e,iconKey:"queue_play_next"})}function jD(e){return n.jsx(r,{...e,iconKey:"quickreply"})}function qD(e){return n.jsx(r,{...e,iconKey:"quiz"})}function JD(e){return n.jsx(r,{...e,iconKey:"r_mobiledata"})}function ZD(e){return n.jsx(r,{...e,iconKey:"radar"})}function XD(e){return n.jsx(r,{...e,iconKey:"radio"})}function xD(e){return n.jsx(r,{...e,iconKey:"radio_button_checked"})}function RD(e){return n.jsx(r,{...e,iconKey:"radio_button_unchecked"})}function eN(e){return n.jsx(r,{...e,iconKey:"railway_alert"})}function nN(e){return n.jsx(r,{...e,iconKey:"ramen_dining"})}function oN(e){return n.jsx(r,{...e,iconKey:"ramp_left"})}function rN(e){return n.jsx(r,{...e,iconKey:"ramp_right"})}function tN(e){return n.jsx(r,{...e,iconKey:"rate_review"})}function cN(e){return n.jsx(r,{...e,iconKey:"raw_off"})}function iN(e){return n.jsx(r,{...e,iconKey:"raw_on"})}function aN(e){return n.jsx(r,{...e,iconKey:"read_more"})}function lN(e){return n.jsx(r,{...e,iconKey:"real_estate_agent"})}function sN(e){return n.jsx(r,{...e,iconKey:"receipt"})}function dN(e){return n.jsx(r,{...e,iconKey:"receipt_long"})}function uN(e){return n.jsx(r,{...e,iconKey:"recent_actors"})}function fN(e){return n.jsx(r,{...e,iconKey:"recommend"})}function AN(e){return n.jsx(r,{...e,iconKey:"record_voice_over"})}function _N(e){return n.jsx(r,{...e,iconKey:"rectangle"})}function yN(e){return n.jsx(r,{...e,iconKey:"recycling"})}function hN(e){return n.jsx(r,{...e,iconKey:"redeem"})}function gN(e){return n.jsx(r,{...e,iconKey:"redo"})}function IN(e){return n.jsx(r,{...e,iconKey:"reduce_capacity"})}function bN(e){return n.jsx(r,{...e,iconKey:"refresh"})}function pN(e){return n.jsx(r,{...e,iconKey:"remember_me"})}function oo(e){return n.jsx(r,{...e,iconKey:"remove"})}function Tc(e){return n.jsx(r,{...e,iconKey:"remove_circle"})}function wN(e){return n.jsx(r,{...e,iconKey:"remove_circle_outline"})}function kN(e){return n.jsx(r,{...e,iconKey:"remove_done"})}function mN(e){return n.jsx(r,{...e,iconKey:"remove_from_queue"})}function vN(e){return n.jsx(r,{...e,iconKey:"remove_moderator"})}function KN(e){return n.jsx(r,{...e,iconKey:"remove_red_eye"})}function CN(e){return n.jsx(r,{...e,iconKey:"remove_road"})}function SN(e){return n.jsx(r,{...e,iconKey:"remove_shopping_cart"})}function BN(e){return n.jsx(r,{...e,iconKey:"reorder"})}function EN(e){return n.jsx(r,{...e,iconKey:"repartition"})}function Kr(e){return n.jsx(r,{...e,iconKey:"repeat"})}function FN(e){return n.jsx(r,{...e,iconKey:"repeat_on"})}function PN(e){return n.jsx(r,{...e,iconKey:"repeat_one"})}function DN(e){return n.jsx(r,{...e,iconKey:"repeat_one_on"})}function NN(e){return n.jsx(r,{...e,iconKey:"replay"})}function MN(e){return n.jsx(r,{...e,iconKey:"replay_10"})}function TN(e){return n.jsx(r,{...e,iconKey:"replay_30"})}function ON(e){return n.jsx(r,{...e,iconKey:"replay_5"})}function LN(e){return n.jsx(r,{...e,iconKey:"replay_circle_filled"})}function QN(e){return n.jsx(r,{...e,iconKey:"reply"})}function VN(e){return n.jsx(r,{...e,iconKey:"reply_all"})}function WN(e){return n.jsx(r,{...e,iconKey:"report"})}function GN(e){return n.jsx(r,{...e,iconKey:"report_gmailerrorred"})}function zN(e){return n.jsx(r,{...e,iconKey:"report_off"})}function HN(e){return n.jsx(r,{...e,iconKey:"report_problem"})}function UN(e){return n.jsx(r,{...e,iconKey:"request_page"})}function YN(e){return n.jsx(r,{...e,iconKey:"request_quote"})}function $N(e){return n.jsx(r,{...e,iconKey:"reset_tv"})}function jN(e){return n.jsx(r,{...e,iconKey:"restart_alt"})}function qN(e){return n.jsx(r,{...e,iconKey:"restaurant"})}function JN(e){return n.jsx(r,{...e,iconKey:"restaurant_menu"})}function ZN(e){return n.jsx(r,{...e,iconKey:"restore"})}function XN(e){return n.jsx(r,{...e,iconKey:"restore_from_trash"})}function xN(e){return n.jsx(r,{...e,iconKey:"restore_page"})}function RN(e){return n.jsx(r,{...e,iconKey:"reviews"})}function eM(e){return n.jsx(r,{...e,iconKey:"rice_bowl"})}function nM(e){return n.jsx(r,{...e,iconKey:"ring_volume"})}function oM(e){return n.jsx(r,{...e,iconKey:"rocket"})}function rM(e){return n.jsx(r,{...e,iconKey:"rocket_launch"})}function tM(e){return n.jsx(r,{...e,iconKey:"roller_shades"})}function cM(e){return n.jsx(r,{...e,iconKey:"roller_shades_closed"})}function iM(e){return n.jsx(r,{...e,iconKey:"roller_skating"})}function aM(e){return n.jsx(r,{...e,iconKey:"roofing"})}function lM(e){return n.jsx(r,{...e,iconKey:"room"})}function sM(e){return n.jsx(r,{...e,iconKey:"room_preferences"})}function dM(e){return n.jsx(r,{...e,iconKey:"room_service"})}function uM(e){return n.jsx(r,{...e,iconKey:"rotate_90_degrees_ccw"})}function fM(e){return n.jsx(r,{...e,iconKey:"rotate_90_degrees_cw"})}function AM(e){return n.jsx(r,{...e,iconKey:"rotate_left"})}function _M(e){return n.jsx(r,{...e,iconKey:"rotate_right"})}function yM(e){return n.jsx(r,{...e,iconKey:"roundabout_left"})}function hM(e){return n.jsx(r,{...e,iconKey:"roundabout_right"})}function gM(e){return n.jsx(r,{...e,iconKey:"rounded_corner"})}function IM(e){return n.jsx(r,{...e,iconKey:"route"})}function bM(e){return n.jsx(r,{...e,iconKey:"router"})}function pM(e){return n.jsx(r,{...e,iconKey:"rowing"})}function wM(e){return n.jsx(r,{...e,iconKey:"rss_feed"})}function kM(e){return n.jsx(r,{...e,iconKey:"rsvp"})}function mM(e){return n.jsx(r,{...e,iconKey:"rtt"})}function vM(e){return n.jsx(r,{...e,iconKey:"rule"})}function KM(e){return n.jsx(r,{...e,iconKey:"rule_folder"})}function CM(e){return n.jsx(r,{...e,iconKey:"run_circle"})}function SM(e){return n.jsx(r,{...e,iconKey:"running_with_errors"})}function BM(e){return n.jsx(r,{...e,iconKey:"rv_hookup"})}function EM(e){return n.jsx(r,{...e,iconKey:"safety_check"})}function FM(e){return n.jsx(r,{...e,iconKey:"safety_divider"})}function PM(e){return n.jsx(r,{...e,iconKey:"sailing"})}function DM(e){return n.jsx(r,{...e,iconKey:"sanitizer"})}function NM(e){return n.jsx(r,{...e,iconKey:"satellite"})}function MM(e){return n.jsx(r,{...e,iconKey:"satellite_alt"})}function TM(e){return n.jsx(r,{...e,iconKey:"save"})}function OM(e){return n.jsx(r,{...e,iconKey:"save_alt"})}function LM(e){return n.jsx(r,{...e,iconKey:"save_as"})}function QM(e){return n.jsx(r,{...e,iconKey:"saved_search"})}function VM(e){return n.jsx(r,{...e,iconKey:"savings"})}function WM(e){return n.jsx(r,{...e,iconKey:"scale"})}function GM(e){return n.jsx(r,{...e,iconKey:"scanner"})}function zM(e){return n.jsx(r,{...e,iconKey:"scatter_plot"})}function Oc(e){return n.jsx(r,{...e,iconKey:"schedule"})}function HM(e){return n.jsx(r,{...e,iconKey:"schedule_send"})}function UM(e){return n.jsx(r,{...e,iconKey:"schema"})}function YM(e){return n.jsx(r,{...e,iconKey:"school"})}function $M(e){return n.jsx(r,{...e,iconKey:"science"})}function jM(e){return n.jsx(r,{...e,iconKey:"score"})}function qM(e){return n.jsx(r,{...e,iconKey:"scoreboard"})}function JM(e){return n.jsx(r,{...e,iconKey:"screen_lock_landscape"})}function ZM(e){return n.jsx(r,{...e,iconKey:"screen_lock_portrait"})}function XM(e){return n.jsx(r,{...e,iconKey:"screen_lock_rotation"})}function xM(e){return n.jsx(r,{...e,iconKey:"screen_rotation"})}function RM(e){return n.jsx(r,{...e,iconKey:"screen_rotation_alt"})}function eT(e){return n.jsx(r,{...e,iconKey:"screen_search_desktop"})}function nT(e){return n.jsx(r,{...e,iconKey:"screen_share"})}function oT(e){return n.jsx(r,{...e,iconKey:"screenshot"})}function rT(e){return n.jsx(r,{...e,iconKey:"screenshot_monitor"})}function tT(e){return n.jsx(r,{...e,iconKey:"scuba_diving"})}function cT(e){return n.jsx(r,{...e,iconKey:"sd"})}function iT(e){return n.jsx(r,{...e,iconKey:"sd_card"})}function aT(e){return n.jsx(r,{...e,iconKey:"sd_card_alert"})}function lT(e){return n.jsx(r,{...e,iconKey:"sd_storage"})}function sT(e){return n.jsx(r,{...e,iconKey:"search_off"})}function dT(e){return n.jsx(r,{...e,iconKey:"security"})}function uT(e){return n.jsx(r,{...e,iconKey:"security_update"})}function fT(e){return n.jsx(r,{...e,iconKey:"security_update_good"})}function AT(e){return n.jsx(r,{...e,iconKey:"security_update_warning"})}function _T(e){return n.jsx(r,{...e,iconKey:"segment"})}function yT(e){return n.jsx(r,{...e,iconKey:"select_all"})}function hT(e){return n.jsx(r,{...e,iconKey:"self_improvement"})}function gT(e){return n.jsx(r,{...e,iconKey:"sell"})}function IT(e){return n.jsx(r,{...e,iconKey:"send"})}function bT(e){return n.jsx(r,{...e,iconKey:"send_and_archive"})}function pT(e){return n.jsx(r,{...e,iconKey:"send_time_extension"})}function wT(e){return n.jsx(r,{...e,iconKey:"send_to_mobile"})}function kT(e){return n.jsx(r,{...e,iconKey:"sensor_door"})}function mT(e){return n.jsx(r,{...e,iconKey:"sensor_occupied"})}function vT(e){return n.jsx(r,{...e,iconKey:"sensor_window"})}function KT(e){return n.jsx(r,{...e,iconKey:"sensors"})}function CT(e){return n.jsx(r,{...e,iconKey:"sensors_off"})}function ST(e){return n.jsx(r,{...e,iconKey:"sentiment_dissatisfied"})}function BT(e){return n.jsx(r,{...e,iconKey:"sentiment_neutral"})}function ET(e){return n.jsx(r,{...e,iconKey:"sentiment_satisfied"})}function FT(e){return n.jsx(r,{...e,iconKey:"sentiment_satisfied_alt"})}function PT(e){return n.jsx(r,{...e,iconKey:"sentiment_very_dissatisfied"})}function DT(e){return n.jsx(r,{...e,iconKey:"sentiment_very_satisfied"})}function NT(e){return n.jsx(r,{...e,iconKey:"set_meal"})}function MT(e){return n.jsx(r,{...e,iconKey:"settings"})}function TT(e){return n.jsx(r,{...e,iconKey:"settings_accessibility"})}function OT(e){return n.jsx(r,{...e,iconKey:"settings_applications"})}function LT(e){return n.jsx(r,{...e,iconKey:"settings_backup_restore"})}function QT(e){return n.jsx(r,{...e,iconKey:"settings_bluetooth"})}function VT(e){return n.jsx(r,{...e,iconKey:"settings_brightness"})}function WT(e){return n.jsx(r,{...e,iconKey:"settings_cell"})}function GT(e){return n.jsx(r,{...e,iconKey:"settings_ethernet"})}function zT(e){return n.jsx(r,{...e,iconKey:"settings_input_antenna"})}function HT(e){return n.jsx(r,{...e,iconKey:"settings_input_component"})}function UT(e){return n.jsx(r,{...e,iconKey:"settings_input_composite"})}function YT(e){return n.jsx(r,{...e,iconKey:"settings_input_hdmi"})}function $T(e){return n.jsx(r,{...e,iconKey:"settings_input_svideo"})}function jT(e){return n.jsx(r,{...e,iconKey:"settings_overscan"})}function qT(e){return n.jsx(r,{...e,iconKey:"settings_phone"})}function JT(e){return n.jsx(r,{...e,iconKey:"settings_power"})}function ZT(e){return n.jsx(r,{...e,iconKey:"settings_remote"})}function XT(e){return n.jsx(r,{...e,iconKey:"settings_suggest"})}function xT(e){return n.jsx(r,{...e,iconKey:"settings_system_daydream"})}function RT(e){return n.jsx(r,{...e,iconKey:"settings_voice"})}function e2(e){return n.jsx(r,{...e,iconKey:"severe_cold"})}function n2(e){return n.jsx(r,{...e,iconKey:"shape_line"})}function o2(e){return n.jsx(r,{...e,iconKey:"share"})}function r2(e){return n.jsx(r,{...e,iconKey:"share_location"})}function t2(e){return n.jsx(r,{...e,iconKey:"shield"})}function c2(e){return n.jsx(r,{...e,iconKey:"shield_moon"})}function i2(e){return n.jsx(r,{...e,iconKey:"shop"})}function a2(e){return n.jsx(r,{...e,iconKey:"shop_2"})}function l2(e){return n.jsx(r,{...e,iconKey:"shop_two"})}function s2(e){return n.jsx(r,{...e,iconKey:"shopping_bag"})}function d2(e){return n.jsx(r,{...e,iconKey:"shopping_basket"})}function u2(e){return n.jsx(r,{...e,iconKey:"shopping_cart"})}function f2(e){return n.jsx(r,{...e,iconKey:"shopping_cart_checkout"})}function Lc(e){return n.jsx(r,{...e,iconKey:"short_text"})}function A2(e){return n.jsx(r,{...e,iconKey:"shortcut"})}function _2(e){return n.jsx(r,{...e,iconKey:"show_chart"})}function y2(e){return n.jsx(r,{...e,iconKey:"shower"})}function h2(e){return n.jsx(r,{...e,iconKey:"shuffle"})}function g2(e){return n.jsx(r,{...e,iconKey:"shuffle_on"})}function I2(e){return n.jsx(r,{...e,iconKey:"shutter_speed"})}function b2(e){return n.jsx(r,{...e,iconKey:"sick"})}function p2(e){return n.jsx(r,{...e,iconKey:"sign_language"})}function w2(e){return n.jsx(r,{...e,iconKey:"signal_cellular_0_bar"})}function k2(e){return n.jsx(r,{...e,iconKey:"signal_cellular_4_bar"})}function m2(e){return n.jsx(r,{...e,iconKey:"signal_cellular_alt"})}function v2(e){return n.jsx(r,{...e,iconKey:"signal_cellular_alt_1_bar"})}function K2(e){return n.jsx(r,{...e,iconKey:"signal_cellular_alt_2_bar"})}function C2(e){return n.jsx(r,{...e,iconKey:"signal_cellular_connected_no_internet_0_bar"})}function S2(e){return n.jsx(r,{...e,iconKey:"signal_cellular_connected_no_internet_4_bar"})}function B2(e){return n.jsx(r,{...e,iconKey:"signal_cellular_no_sim"})}function E2(e){return n.jsx(r,{...e,iconKey:"signal_cellular_nodata"})}function F2(e){return n.jsx(r,{...e,iconKey:"signal_cellular_null"})}function P2(e){return n.jsx(r,{...e,iconKey:"signal_cellular_off"})}function D2(e){return n.jsx(r,{...e,iconKey:"signal_wifi_0_bar"})}function N2(e){return n.jsx(r,{...e,iconKey:"signal_wifi_4_bar"})}function M2(e){return n.jsx(r,{...e,iconKey:"signal_wifi_4_bar_lock"})}function T2(e){return n.jsx(r,{...e,iconKey:"signal_wifi_bad"})}function O2(e){return n.jsx(r,{...e,iconKey:"signal_wifi_connected_no_internet_4"})}function L2(e){return n.jsx(r,{...e,iconKey:"signal_wifi_off"})}function Q2(e){return n.jsx(r,{...e,iconKey:"signal_wifi_statusbar_4_bar"})}function V2(e){return n.jsx(r,{...e,iconKey:"signal_wifi_statusbar_connected_no_internet_4"})}function W2(e){return n.jsx(r,{...e,iconKey:"signal_wifi_statusbar_null"})}function G2(e){return n.jsx(r,{...e,iconKey:"signpost"})}function z2(e){return n.jsx(r,{...e,iconKey:"sim_card"})}function H2(e){return n.jsx(r,{...e,iconKey:"sim_card_alert"})}function U2(e){return n.jsx(r,{...e,iconKey:"sim_card_download"})}function Y2(e){return n.jsx(r,{...e,iconKey:"single_bed"})}function $2(e){return n.jsx(r,{...e,iconKey:"sip"})}function j2(e){return n.jsx(r,{...e,iconKey:"skateboarding"})}function q2(e){return n.jsx(r,{...e,iconKey:"skip_next"})}function J2(e){return n.jsx(r,{...e,iconKey:"skip_previous"})}function Z2(e){return n.jsx(r,{...e,iconKey:"sledding"})}function X2(e){return n.jsx(r,{...e,iconKey:"slideshow"})}function x2(e){return n.jsx(r,{...e,iconKey:"slow_motion_video"})}function R2(e){return n.jsx(r,{...e,iconKey:"smart_button"})}function eO(e){return n.jsx(r,{...e,iconKey:"smart_display"})}function nO(e){return n.jsx(r,{...e,iconKey:"smart_screen"})}function oO(e){return n.jsx(r,{...e,iconKey:"smart_toy"})}function rO(e){return n.jsx(r,{...e,iconKey:"smartphone"})}function tO(e){return n.jsx(r,{...e,iconKey:"smoke_free"})}function cO(e){return n.jsx(r,{...e,iconKey:"smoking_rooms"})}function iO(e){return n.jsx(r,{...e,iconKey:"sms"})}function aO(e){return n.jsx(r,{...e,iconKey:"sms_failed"})}function lO(e){return n.jsx(r,{...e,iconKey:"snippet_folder"})}function sO(e){return n.jsx(r,{...e,iconKey:"snooze"})}function dO(e){return n.jsx(r,{...e,iconKey:"snowboarding"})}function uO(e){return n.jsx(r,{...e,iconKey:"snowmobile"})}function fO(e){return n.jsx(r,{...e,iconKey:"snowshoeing"})}function AO(e){return n.jsx(r,{...e,iconKey:"soap"})}function _O(e){return n.jsx(r,{...e,iconKey:"social_distance"})}function yO(e){return n.jsx(r,{...e,iconKey:"solar_power"})}function hO(e){return n.jsx(r,{...e,iconKey:"sort"})}function gO(e){return n.jsx(r,{...e,iconKey:"sort_by_alpha"})}function IO(e){return n.jsx(r,{...e,iconKey:"sos"})}function bO(e){return n.jsx(r,{...e,iconKey:"soup_kitchen"})}function pO(e){return n.jsx(r,{...e,iconKey:"source"})}function wO(e){return n.jsx(r,{...e,iconKey:"south"})}function kO(e){return n.jsx(r,{...e,iconKey:"south_america"})}function mO(e){return n.jsx(r,{...e,iconKey:"south_east"})}function vO(e){return n.jsx(r,{...e,iconKey:"south_west"})}function KO(e){return n.jsx(r,{...e,iconKey:"spa"})}function CO(e){return n.jsx(r,{...e,iconKey:"space_bar"})}function SO(e){return n.jsx(r,{...e,iconKey:"space_dashboard"})}function BO(e){return n.jsx(r,{...e,iconKey:"spatial_audio"})}function EO(e){return n.jsx(r,{...e,iconKey:"spatial_audio_off"})}function FO(e){return n.jsx(r,{...e,iconKey:"spatial_tracking"})}function PO(e){return n.jsx(r,{...e,iconKey:"speaker"})}function DO(e){return n.jsx(r,{...e,iconKey:"speaker_group"})}function NO(e){return n.jsx(r,{...e,iconKey:"speaker_notes"})}function MO(e){return n.jsx(r,{...e,iconKey:"speaker_notes_off"})}function TO(e){return n.jsx(r,{...e,iconKey:"speaker_phone"})}function OO(e){return n.jsx(r,{...e,iconKey:"speed"})}function LO(e){return n.jsx(r,{...e,iconKey:"spellcheck"})}function QO(e){return n.jsx(r,{...e,iconKey:"splitscreen"})}function VO(e){return n.jsx(r,{...e,iconKey:"spoke"})}function WO(e){return n.jsx(r,{...e,iconKey:"sports"})}function GO(e){return n.jsx(r,{...e,iconKey:"sports_bar"})}function zO(e){return n.jsx(r,{...e,iconKey:"sports_baseball"})}function HO(e){return n.jsx(r,{...e,iconKey:"sports_basketball"})}function UO(e){return n.jsx(r,{...e,iconKey:"sports_cricket"})}function YO(e){return n.jsx(r,{...e,iconKey:"sports_esports"})}function $O(e){return n.jsx(r,{...e,iconKey:"sports_football"})}function jO(e){return n.jsx(r,{...e,iconKey:"sports_golf"})}function qO(e){return n.jsx(r,{...e,iconKey:"sports_gymnastics"})}function JO(e){return n.jsx(r,{...e,iconKey:"sports_handball"})}function ZO(e){return n.jsx(r,{...e,iconKey:"sports_hockey"})}function XO(e){return n.jsx(r,{...e,iconKey:"sports_kabaddi"})}function xO(e){return n.jsx(r,{...e,iconKey:"sports_martial_arts"})}function RO(e){return n.jsx(r,{...e,iconKey:"sports_mma"})}function eL(e){return n.jsx(r,{...e,iconKey:"sports_motorsports"})}function nL(e){return n.jsx(r,{...e,iconKey:"sports_rugby"})}function oL(e){return n.jsx(r,{...e,iconKey:"sports_score"})}function rL(e){return n.jsx(r,{...e,iconKey:"sports_soccer"})}function tL(e){return n.jsx(r,{...e,iconKey:"sports_tennis"})}function cL(e){return n.jsx(r,{...e,iconKey:"sports_volleyball"})}function iL(e){return n.jsx(r,{...e,iconKey:"square"})}function aL(e){return n.jsx(r,{...e,iconKey:"square_foot"})}function lL(e){return n.jsx(r,{...e,iconKey:"ssid_chart"})}function sL(e){return n.jsx(r,{...e,iconKey:"stacked_bar_chart"})}function dL(e){return n.jsx(r,{...e,iconKey:"stacked_line_chart"})}function uL(e){return n.jsx(r,{...e,iconKey:"stadium"})}function fL(e){return n.jsx(r,{...e,iconKey:"stairs"})}function Cr(e){return n.jsx(r,{...e,iconKey:"star"})}function Sr(e){return n.jsx(r,{...e,iconKey:"star_border"})}function AL(e){return n.jsx(r,{...e,iconKey:"star_border_purple500"})}function _L(e){return n.jsx(r,{...e,iconKey:"star_half"})}function yL(e){return n.jsx(r,{...e,iconKey:"star_outline"})}function hL(e){return n.jsx(r,{...e,iconKey:"star_purple500"})}function gL(e){return n.jsx(r,{...e,iconKey:"star_rate"})}function IL(e){return n.jsx(r,{...e,iconKey:"stars"})}function bL(e){return n.jsx(r,{...e,iconKey:"start"})}function pL(e){return n.jsx(r,{...e,iconKey:"stay_current_landscape"})}function wL(e){return n.jsx(r,{...e,iconKey:"stay_current_portrait"})}function kL(e){return n.jsx(r,{...e,iconKey:"stay_primary_landscape"})}function mL(e){return n.jsx(r,{...e,iconKey:"stay_primary_portrait"})}function vL(e){return n.jsx(r,{...e,iconKey:"sticky_note_2"})}function KL(e){return n.jsx(r,{...e,iconKey:"stop"})}function CL(e){return n.jsx(r,{...e,iconKey:"stop_circle"})}function SL(e){return n.jsx(r,{...e,iconKey:"stop_screen_share"})}function BL(e){return n.jsx(r,{...e,iconKey:"storage"})}function EL(e){return n.jsx(r,{...e,iconKey:"store"})}function FL(e){return n.jsx(r,{...e,iconKey:"store_mall_directory"})}function PL(e){return n.jsx(r,{...e,iconKey:"storefront"})}function DL(e){return n.jsx(r,{...e,iconKey:"storm"})}function NL(e){return n.jsx(r,{...e,iconKey:"straight"})}function ML(e){return n.jsx(r,{...e,iconKey:"straighten"})}function TL(e){return n.jsx(r,{...e,iconKey:"stream"})}function OL(e){return n.jsx(r,{...e,iconKey:"streetview"})}function LL(e){return n.jsx(r,{...e,iconKey:"strikethrough_s"})}function QL(e){return n.jsx(r,{...e,iconKey:"stroller"})}function VL(e){return n.jsx(r,{...e,iconKey:"style"})}function WL(e){return n.jsx(r,{...e,iconKey:"subdirectory_arrow_left"})}function GL(e){return n.jsx(r,{...e,iconKey:"subdirectory_arrow_right"})}function Qc(e){return n.jsx(r,{...e,iconKey:"subject"})}function zL(e){return n.jsx(r,{...e,iconKey:"subscript"})}function HL(e){return n.jsx(r,{...e,iconKey:"subscriptions"})}function UL(e){return n.jsx(r,{...e,iconKey:"subtitles"})}function YL(e){return n.jsx(r,{...e,iconKey:"subtitles_off"})}function $L(e){return n.jsx(r,{...e,iconKey:"subway"})}function jL(e){return n.jsx(r,{...e,iconKey:"summarize"})}function qL(e){return n.jsx(r,{...e,iconKey:"superscript"})}function JL(e){return n.jsx(r,{...e,iconKey:"supervised_user_circle"})}function ZL(e){return n.jsx(r,{...e,iconKey:"supervisor_account"})}function XL(e){return n.jsx(r,{...e,iconKey:"support"})}function xL(e){return n.jsx(r,{...e,iconKey:"support_agent"})}function RL(e){return n.jsx(r,{...e,iconKey:"surfing"})}function e4(e){return n.jsx(r,{...e,iconKey:"surround_sound"})}function n4(e){return n.jsx(r,{...e,iconKey:"swap_calls"})}function o4(e){return n.jsx(r,{...e,iconKey:"swap_horiz"})}function r4(e){return n.jsx(r,{...e,iconKey:"swap_horizontal_circle"})}function t4(e){return n.jsx(r,{...e,iconKey:"swap_vert"})}function c4(e){return n.jsx(r,{...e,iconKey:"swap_vertical_circle"})}function i4(e){return n.jsx(r,{...e,iconKey:"swipe"})}function a4(e){return n.jsx(r,{...e,iconKey:"swipe_down"})}function l4(e){return n.jsx(r,{...e,iconKey:"swipe_down_alt"})}function s4(e){return n.jsx(r,{...e,iconKey:"swipe_left"})}function d4(e){return n.jsx(r,{...e,iconKey:"swipe_left_alt"})}function u4(e){return n.jsx(r,{...e,iconKey:"swipe_right"})}function f4(e){return n.jsx(r,{...e,iconKey:"swipe_right_alt"})}function A4(e){return n.jsx(r,{...e,iconKey:"swipe_up"})}function _4(e){return n.jsx(r,{...e,iconKey:"swipe_up_alt"})}function y4(e){return n.jsx(r,{...e,iconKey:"swipe_vertical"})}function h4(e){return n.jsx(r,{...e,iconKey:"switch_access_shortcut"})}function g4(e){return n.jsx(r,{...e,iconKey:"switch_access_shortcut_add"})}function I4(e){return n.jsx(r,{...e,iconKey:"switch_account"})}function b4(e){return n.jsx(r,{...e,iconKey:"switch_camera"})}function p4(e){return n.jsx(r,{...e,iconKey:"switch_left"})}function w4(e){return n.jsx(r,{...e,iconKey:"switch_right"})}function k4(e){return n.jsx(r,{...e,iconKey:"switch_video"})}function m4(e){return n.jsx(r,{...e,iconKey:"synagogue"})}function v4(e){return n.jsx(r,{...e,iconKey:"sync"})}function K4(e){return n.jsx(r,{...e,iconKey:"sync_alt"})}function C4(e){return n.jsx(r,{...e,iconKey:"sync_disabled"})}function S4(e){return n.jsx(r,{...e,iconKey:"sync_lock"})}function B4(e){return n.jsx(r,{...e,iconKey:"sync_problem"})}function E4(e){return n.jsx(r,{...e,iconKey:"system_security_update"})}function F4(e){return n.jsx(r,{...e,iconKey:"system_security_update_good"})}function P4(e){return n.jsx(r,{...e,iconKey:"system_security_update_warning"})}function D4(e){return n.jsx(r,{...e,iconKey:"system_update"})}function N4(e){return n.jsx(r,{...e,iconKey:"system_update_alt"})}function M4(e){return n.jsx(r,{...e,iconKey:"tab"})}function T4(e){return n.jsx(r,{...e,iconKey:"tab_unselected"})}function O4(e){return n.jsx(r,{...e,iconKey:"table_bar"})}function L4(e){return n.jsx(r,{...e,iconKey:"table_chart"})}function Q4(e){return n.jsx(r,{...e,iconKey:"table_restaurant"})}function V4(e){return n.jsx(r,{...e,iconKey:"table_rows"})}function W4(e){return n.jsx(r,{...e,iconKey:"table_view"})}function G4(e){return n.jsx(r,{...e,iconKey:"tablet"})}function z4(e){return n.jsx(r,{...e,iconKey:"tablet_android"})}function H4(e){return n.jsx(r,{...e,iconKey:"tablet_mac"})}function U4(e){return n.jsx(r,{...e,iconKey:"tag"})}function Y4(e){return n.jsx(r,{...e,iconKey:"tag_faces"})}function $4(e){return n.jsx(r,{...e,iconKey:"takeout_dining"})}function j4(e){return n.jsx(r,{...e,iconKey:"tap_and_play"})}function q4(e){return n.jsx(r,{...e,iconKey:"tapas"})}function J4(e){return n.jsx(r,{...e,iconKey:"task"})}function Z4(e){return n.jsx(r,{...e,iconKey:"task_alt"})}function X4(e){return n.jsx(r,{...e,iconKey:"taxi_alert"})}function x4(e){return n.jsx(r,{...e,iconKey:"temple_buddhist"})}function R4(e){return n.jsx(r,{...e,iconKey:"temple_hindu"})}function eQ(e){return n.jsx(r,{...e,iconKey:"terminal"})}function nQ(e){return n.jsx(r,{...e,iconKey:"terrain"})}function oQ(e){return n.jsx(r,{...e,iconKey:"text_decrease"})}function rQ(e){return n.jsx(r,{...e,iconKey:"text_fields"})}function tQ(e){return n.jsx(r,{...e,iconKey:"text_format"})}function cQ(e){return n.jsx(r,{...e,iconKey:"text_increase"})}function iQ(e){return n.jsx(r,{...e,iconKey:"text_rotate_up"})}function aQ(e){return n.jsx(r,{...e,iconKey:"text_rotate_vertical"})}function lQ(e){return n.jsx(r,{...e,iconKey:"text_rotation_angledown"})}function sQ(e){return n.jsx(r,{...e,iconKey:"text_rotation_angleup"})}function dQ(e){return n.jsx(r,{...e,iconKey:"text_rotation_down"})}function uQ(e){return n.jsx(r,{...e,iconKey:"text_rotation_none"})}function fQ(e){return n.jsx(r,{...e,iconKey:"text_snippet"})}function AQ(e){return n.jsx(r,{...e,iconKey:"textsms"})}function _Q(e){return n.jsx(r,{...e,iconKey:"texture"})}function yQ(e){return n.jsx(r,{...e,iconKey:"theater_comedy"})}function hQ(e){return n.jsx(r,{...e,iconKey:"theaters"})}function gQ(e){return n.jsx(r,{...e,iconKey:"thermostat"})}function IQ(e){return n.jsx(r,{...e,iconKey:"thermostat_auto"})}function bQ(e){return n.jsx(r,{...e,iconKey:"thumb_down"})}function pQ(e){return n.jsx(r,{...e,iconKey:"thumb_down_alt"})}function wQ(e){return n.jsx(r,{...e,iconKey:"thumb_down_off_alt"})}function kQ(e){return n.jsx(r,{...e,iconKey:"thumb_up"})}function mQ(e){return n.jsx(r,{...e,iconKey:"thumb_up_alt"})}function vQ(e){return n.jsx(r,{...e,iconKey:"thumb_up_off_alt"})}function KQ(e){return n.jsx(r,{...e,iconKey:"thumbs_up_down"})}function CQ(e){return n.jsx(r,{...e,iconKey:"thunderstorm"})}function SQ(e){return n.jsx(r,{...e,iconKey:"time_to_leave"})}function BQ(e){return n.jsx(r,{...e,iconKey:"timelapse"})}function EQ(e){return n.jsx(r,{...e,iconKey:"timeline"})}function FQ(e){return n.jsx(r,{...e,iconKey:"timer"})}function PQ(e){return n.jsx(r,{...e,iconKey:"timer_10"})}function DQ(e){return n.jsx(r,{...e,iconKey:"timer_10_select"})}function NQ(e){return n.jsx(r,{...e,iconKey:"timer_3"})}function MQ(e){return n.jsx(r,{...e,iconKey:"timer_3_select"})}function TQ(e){return n.jsx(r,{...e,iconKey:"timer_off"})}function OQ(e){return n.jsx(r,{...e,iconKey:"tips_and_updates"})}function LQ(e){return n.jsx(r,{...e,iconKey:"tire_repair"})}function QQ(e){return n.jsx(r,{...e,iconKey:"title"})}function VQ(e){return n.jsx(r,{...e,iconKey:"toc"})}function WQ(e){return n.jsx(r,{...e,iconKey:"today"})}function GQ(e){return n.jsx(r,{...e,iconKey:"toggle_off"})}function zQ(e){return n.jsx(r,{...e,iconKey:"toggle_on"})}function HQ(e){return n.jsx(r,{...e,iconKey:"token"})}function UQ(e){return n.jsx(r,{...e,iconKey:"toll"})}function YQ(e){return n.jsx(r,{...e,iconKey:"tonality"})}function $Q(e){return n.jsx(r,{...e,iconKey:"topic"})}function jQ(e){return n.jsx(r,{...e,iconKey:"tornado"})}function qQ(e){return n.jsx(r,{...e,iconKey:"touch_app"})}function JQ(e){return n.jsx(r,{...e,iconKey:"tour"})}function ZQ(e){return n.jsx(r,{...e,iconKey:"toys"})}function XQ(e){return n.jsx(r,{...e,iconKey:"track_changes"})}function xQ(e){return n.jsx(r,{...e,iconKey:"traffic"})}function RQ(e){return n.jsx(r,{...e,iconKey:"train"})}function eV(e){return n.jsx(r,{...e,iconKey:"tram"})}function nV(e){return n.jsx(r,{...e,iconKey:"transcribe"})}function oV(e){return n.jsx(r,{...e,iconKey:"transfer_within_a_station"})}function rV(e){return n.jsx(r,{...e,iconKey:"transform"})}function tV(e){return n.jsx(r,{...e,iconKey:"transgender"})}function cV(e){return n.jsx(r,{...e,iconKey:"transit_enterexit"})}function iV(e){return n.jsx(r,{...e,iconKey:"translate"})}function aV(e){return n.jsx(r,{...e,iconKey:"travel_explore"})}function lV(e){return n.jsx(r,{...e,iconKey:"trending_down"})}function sV(e){return n.jsx(r,{...e,iconKey:"trending_flat"})}function dV(e){return n.jsx(r,{...e,iconKey:"trending_up"})}function uV(e){return n.jsx(r,{...e,iconKey:"trip_origin"})}function fV(e){return n.jsx(r,{...e,iconKey:"troubleshoot"})}function AV(e){return n.jsx(r,{...e,iconKey:"try"})}function _V(e){return n.jsx(r,{...e,iconKey:"tsunami"})}function yV(e){return n.jsx(r,{...e,iconKey:"tty"})}function hV(e){return n.jsx(r,{...e,iconKey:"tune"})}function gV(e){return n.jsx(r,{...e,iconKey:"tungsten"})}function IV(e){return n.jsx(r,{...e,iconKey:"turn_left"})}function bV(e){return n.jsx(r,{...e,iconKey:"turn_right"})}function pV(e){return n.jsx(r,{...e,iconKey:"turn_sharp_left"})}function wV(e){return n.jsx(r,{...e,iconKey:"turn_sharp_right"})}function kV(e){return n.jsx(r,{...e,iconKey:"turn_slight_left"})}function mV(e){return n.jsx(r,{...e,iconKey:"turn_slight_right"})}function vV(e){return n.jsx(r,{...e,iconKey:"turned_in"})}function KV(e){return n.jsx(r,{...e,iconKey:"turned_in_not"})}function CV(e){return n.jsx(r,{...e,iconKey:"tv"})}function SV(e){return n.jsx(r,{...e,iconKey:"tv_off"})}function BV(e){return n.jsx(r,{...e,iconKey:"two_wheeler"})}function EV(e){return n.jsx(r,{...e,iconKey:"type_specimen"})}function FV(e){return n.jsx(r,{...e,iconKey:"u_turn_left"})}function PV(e){return n.jsx(r,{...e,iconKey:"u_turn_right"})}function DV(e){return n.jsx(r,{...e,iconKey:"umbrella"})}function NV(e){return n.jsx(r,{...e,iconKey:"unarchive"})}function MV(e){return n.jsx(r,{...e,iconKey:"undo"})}function TV(e){return n.jsx(r,{...e,iconKey:"unfold_less"})}function OV(e){return n.jsx(r,{...e,iconKey:"unfold_less_double"})}function LV(e){return n.jsx(r,{...e,iconKey:"unfold_more"})}function QV(e){return n.jsx(r,{...e,iconKey:"unfold_more_double"})}function VV(e){return n.jsx(r,{...e,iconKey:"unpublished"})}function WV(e){return n.jsx(r,{...e,iconKey:"unsubscribe"})}function GV(e){return n.jsx(r,{...e,iconKey:"upcoming"})}function zV(e){return n.jsx(r,{...e,iconKey:"update"})}function HV(e){return n.jsx(r,{...e,iconKey:"update_disabled"})}function UV(e){return n.jsx(r,{...e,iconKey:"upgrade"})}function YV(e){return n.jsx(r,{...e,iconKey:"upload"})}function Vc(e){return n.jsx(r,{...e,iconKey:"upload_file"})}function $V(e){return n.jsx(r,{...e,iconKey:"usb"})}function jV(e){return n.jsx(r,{...e,iconKey:"usb_off"})}function qV(e){return n.jsx(r,{...e,iconKey:"vaccines"})}function JV(e){return n.jsx(r,{...e,iconKey:"vape_free"})}function ZV(e){return n.jsx(r,{...e,iconKey:"vaping_rooms"})}function XV(e){return n.jsx(r,{...e,iconKey:"verified"})}function xV(e){return n.jsx(r,{...e,iconKey:"verified_user"})}function RV(e){return n.jsx(r,{...e,iconKey:"vertical_align_bottom"})}function e5(e){return n.jsx(r,{...e,iconKey:"vertical_align_center"})}function n5(e){return n.jsx(r,{...e,iconKey:"vertical_align_top"})}function o5(e){return n.jsx(r,{...e,iconKey:"vertical_distribute"})}function r5(e){return n.jsx(r,{...e,iconKey:"vertical_shades"})}function t5(e){return n.jsx(r,{...e,iconKey:"vertical_shades_closed"})}function c5(e){return n.jsx(r,{...e,iconKey:"vertical_split"})}function i5(e){return n.jsx(r,{...e,iconKey:"vibration"})}function a5(e){return n.jsx(r,{...e,iconKey:"video_call"})}function l5(e){return n.jsx(r,{...e,iconKey:"video_camera_back"})}function s5(e){return n.jsx(r,{...e,iconKey:"video_camera_front"})}function d5(e){return n.jsx(r,{...e,iconKey:"video_chat"})}function u5(e){return n.jsx(r,{...e,iconKey:"video_file"})}function f5(e){return n.jsx(r,{...e,iconKey:"video_label"})}function A5(e){return n.jsx(r,{...e,iconKey:"video_library"})}function _5(e){return n.jsx(r,{...e,iconKey:"video_settings"})}function y5(e){return n.jsx(r,{...e,iconKey:"video_stable"})}function h5(e){return n.jsx(r,{...e,iconKey:"videocam"})}function g5(e){return n.jsx(r,{...e,iconKey:"videocam_off"})}function I5(e){return n.jsx(r,{...e,iconKey:"videogame_asset"})}function b5(e){return n.jsx(r,{...e,iconKey:"videogame_asset_off"})}function p5(e){return n.jsx(r,{...e,iconKey:"view_agenda"})}function w5(e){return n.jsx(r,{...e,iconKey:"view_array"})}function k5(e){return n.jsx(r,{...e,iconKey:"view_carousel"})}function m5(e){return n.jsx(r,{...e,iconKey:"view_column"})}function v5(e){return n.jsx(r,{...e,iconKey:"view_comfy"})}function K5(e){return n.jsx(r,{...e,iconKey:"view_comfy_alt"})}function C5(e){return n.jsx(r,{...e,iconKey:"view_compact"})}function S5(e){return n.jsx(r,{...e,iconKey:"view_compact_alt"})}function B5(e){return n.jsx(r,{...e,iconKey:"view_cozy"})}function E5(e){return n.jsx(r,{...e,iconKey:"view_day"})}function F5(e){return n.jsx(r,{...e,iconKey:"view_headline"})}function P5(e){return n.jsx(r,{...e,iconKey:"view_in_ar"})}function D5(e){return n.jsx(r,{...e,iconKey:"view_kanban"})}function N5(e){return n.jsx(r,{...e,iconKey:"view_list"})}function M5(e){return n.jsx(r,{...e,iconKey:"view_module"})}function T5(e){return n.jsx(r,{...e,iconKey:"view_quilt"})}function O5(e){return n.jsx(r,{...e,iconKey:"view_sidebar"})}function Wc(e){return n.jsx(r,{...e,iconKey:"view_stream"})}function L5(e){return n.jsx(r,{...e,iconKey:"view_timeline"})}function Q5(e){return n.jsx(r,{...e,iconKey:"view_week"})}function V5(e){return n.jsx(r,{...e,iconKey:"vignette"})}function W5(e){return n.jsx(r,{...e,iconKey:"villa"})}function G5(e){return n.jsx(r,{...e,iconKey:"visibility"})}function z5(e){return n.jsx(r,{...e,iconKey:"visibility_off"})}function H5(e){return n.jsx(r,{...e,iconKey:"voice_chat"})}function U5(e){return n.jsx(r,{...e,iconKey:"voice_over_off"})}function Y5(e){return n.jsx(r,{...e,iconKey:"voicemail"})}function $5(e){return n.jsx(r,{...e,iconKey:"volcano"})}function j5(e){return n.jsx(r,{...e,iconKey:"volume_down"})}function q5(e){return n.jsx(r,{...e,iconKey:"volume_mute"})}function J5(e){return n.jsx(r,{...e,iconKey:"volume_off"})}function Z5(e){return n.jsx(r,{...e,iconKey:"volume_up"})}function X5(e){return n.jsx(r,{...e,iconKey:"volunteer_activism"})}function x5(e){return n.jsx(r,{...e,iconKey:"vpn_key"})}function R5(e){return n.jsx(r,{...e,iconKey:"vpn_key_off"})}function eW(e){return n.jsx(r,{...e,iconKey:"vpn_lock"})}function nW(e){return n.jsx(r,{...e,iconKey:"vrpano"})}function oW(e){return n.jsx(r,{...e,iconKey:"wallet"})}function rW(e){return n.jsx(r,{...e,iconKey:"wallpaper"})}function tW(e){return n.jsx(r,{...e,iconKey:"warehouse"})}function cW(e){return n.jsx(r,{...e,iconKey:"warning"})}function iW(e){return n.jsx(r,{...e,iconKey:"warning_amber"})}function aW(e){return n.jsx(r,{...e,iconKey:"wash"})}function lW(e){return n.jsx(r,{...e,iconKey:"watch"})}function sW(e){return n.jsx(r,{...e,iconKey:"watch_later"})}function dW(e){return n.jsx(r,{...e,iconKey:"watch_off"})}function uW(e){return n.jsx(r,{...e,iconKey:"water"})}function fW(e){return n.jsx(r,{...e,iconKey:"water_damage"})}function AW(e){return n.jsx(r,{...e,iconKey:"water_drop"})}function _W(e){return n.jsx(r,{...e,iconKey:"waterfall_chart"})}function yW(e){return n.jsx(r,{...e,iconKey:"waves"})}function hW(e){return n.jsx(r,{...e,iconKey:"waving_hand"})}function gW(e){return n.jsx(r,{...e,iconKey:"wb_auto"})}function IW(e){return n.jsx(r,{...e,iconKey:"wb_cloudy"})}function bW(e){return n.jsx(r,{...e,iconKey:"wb_incandescent"})}function pW(e){return n.jsx(r,{...e,iconKey:"wb_iridescent"})}function wW(e){return n.jsx(r,{...e,iconKey:"wb_shade"})}function kW(e){return n.jsx(r,{...e,iconKey:"wb_sunny"})}function mW(e){return n.jsx(r,{...e,iconKey:"wb_twilight"})}function vW(e){return n.jsx(r,{...e,iconKey:"wc"})}function KW(e){return n.jsx(r,{...e,iconKey:"web"})}function CW(e){return n.jsx(r,{...e,iconKey:"web_asset"})}function SW(e){return n.jsx(r,{...e,iconKey:"web_asset_off"})}function BW(e){return n.jsx(r,{...e,iconKey:"web_stories"})}function EW(e){return n.jsx(r,{...e,iconKey:"webhook"})}function FW(e){return n.jsx(r,{...e,iconKey:"weekend"})}function PW(e){return n.jsx(r,{...e,iconKey:"west"})}function DW(e){return n.jsx(r,{...e,iconKey:"whatshot"})}function NW(e){return n.jsx(r,{...e,iconKey:"wheelchair_pickup"})}function MW(e){return n.jsx(r,{...e,iconKey:"where_to_vote"})}function TW(e){return n.jsx(r,{...e,iconKey:"widgets"})}function OW(e){return n.jsx(r,{...e,iconKey:"width_full"})}function LW(e){return n.jsx(r,{...e,iconKey:"width_normal"})}function QW(e){return n.jsx(r,{...e,iconKey:"width_wide"})}function VW(e){return n.jsx(r,{...e,iconKey:"wifi"})}function WW(e){return n.jsx(r,{...e,iconKey:"wifi_1_bar"})}function GW(e){return n.jsx(r,{...e,iconKey:"wifi_2_bar"})}function zW(e){return n.jsx(r,{...e,iconKey:"wifi_calling"})}function HW(e){return n.jsx(r,{...e,iconKey:"wifi_calling_3"})}function UW(e){return n.jsx(r,{...e,iconKey:"wifi_channel"})}function YW(e){return n.jsx(r,{...e,iconKey:"wifi_find"})}function $W(e){return n.jsx(r,{...e,iconKey:"wifi_lock"})}function jW(e){return n.jsx(r,{...e,iconKey:"wifi_off"})}function qW(e){return n.jsx(r,{...e,iconKey:"wifi_password"})}function JW(e){return n.jsx(r,{...e,iconKey:"wifi_protected_setup"})}function ZW(e){return n.jsx(r,{...e,iconKey:"wifi_tethering"})}function XW(e){return n.jsx(r,{...e,iconKey:"wifi_tethering_error"})}function xW(e){return n.jsx(r,{...e,iconKey:"wifi_tethering_off"})}function RW(e){return n.jsx(r,{...e,iconKey:"wind_power"})}function eG(e){return n.jsx(r,{...e,iconKey:"window"})}function nG(e){return n.jsx(r,{...e,iconKey:"wine_bar"})}function oG(e){return n.jsx(r,{...e,iconKey:"woman"})}function rG(e){return n.jsx(r,{...e,iconKey:"woman_2"})}function tG(e){return n.jsx(r,{...e,iconKey:"work"})}function cG(e){return n.jsx(r,{...e,iconKey:"work_history"})}function iG(e){return n.jsx(r,{...e,iconKey:"work_off"})}function aG(e){return n.jsx(r,{...e,iconKey:"work_outline"})}function lG(e){return n.jsx(r,{...e,iconKey:"workspace_premium"})}function sG(e){return n.jsx(r,{...e,iconKey:"workspaces"})}function dG(e){return n.jsx(r,{...e,iconKey:"wrap_text"})}function uG(e){return n.jsx(r,{...e,iconKey:"wrong_location"})}function fG(e){return n.jsx(r,{...e,iconKey:"wysiwyg"})}function AG(e){return n.jsx(r,{...e,iconKey:"yard"})}function _G(e){return n.jsx(r,{...e,iconKey:"youtube_searched_for"})}function yG(e){return n.jsx(r,{...e,iconKey:"zoom_in"})}function hG(e){return n.jsx(r,{...e,iconKey:"zoom_in_map"})}function gG(e){return n.jsx(r,{...e,iconKey:"zoom_out"})}function IG(e){return n.jsx(r,{...e,iconKey:"zoom_out_map"})}function pe({title:e,error:t,tooltip:c}){const i=t instanceof Error?t.message:t,l=n.jsxs("div",{className:"flex items-center m-2",children:[n.jsx(wr,{size:"small",color:"error"}),n.jsxs("div",{className:"pl-2",children:[e&&n.jsx(j,{variant:"body2",className:"font-medium",children:e}),n.jsx(j,{variant:"body2",children:i})]})]});return c?n.jsx(tc,{title:c,children:l}):l}class Je{id;path;constructor(t,c){this.id=t,this.path=c}get pathWithId(){return`${this.path}/${this.id}`}}class Br{latitude;longitude;constructor(t,c){this.latitude=t,this.longitude=c}}function Fn(){return n.jsx("div",{className:"rounded-full bg-gray-200 bg-opacity-30 dark:bg-opacity-20 w-5 h-2 inline-block"})}const bG=40,pG=100,wG=200;function Pn(e){if(e==="tiny")return bG;if(e==="small")return pG;if(e==="medium")return wG;throw Error("Thumbnail size not mapped")}function ln(e){switch(e){case"xs":case"s":return"tiny";case"m":return"small";case"l":case"xl":return"medium";default:throw Error("Missing mapping value in getPreviewSizeFrom: "+e)}}function Gc({size:e,url:t}){const[c,i]=f.useState(!1),l=f.useMemo(()=>Pn(e),[e]);if(e==="tiny")return n.jsx("img",{src:t,className:"rounded-md",style:{position:"relative",objectFit:"cover",width:l,height:l,maxHeight:"100%"}},"tiny_image_preview_"+t);const a={maxWidth:"100%",maxHeight:"100%"};return n.jsxs("div",{className:"relative flex items-center justify-center max-w-full max-h-full",style:{width:l,height:l},onMouseEnter:()=>i(!0),onMouseMove:()=>i(!0),onMouseLeave:()=>i(!1),children:[n.jsx("img",{src:t,className:"rounded-md",style:a}),c&&n.jsxs(n.Fragment,{children:[navigator&&n.jsx(ye,{title:"Copy url to clipboard",children:n.jsx("div",{className:"rounded-full absolute bottom-[-4px] right-8",children:n.jsx(ee,{variant:"filled",size:"small",onClick:s=>(s.stopPropagation(),s.preventDefault(),navigator.clipboard.writeText(t)),children:n.jsx(Rn,{className:"text-gray-500",size:"small"})})})}),n.jsx(ye,{title:"Open image in new tab",children:n.jsx(ee,{variant:"filled",component:"a",style:{position:"absolute",bottom:-4,right:-4},href:t,rel:"noopener noreferrer",target:"_blank",size:"small",onClick:s=>s.stopPropagation(),children:n.jsx(no,{className:"text-gray-500",size:"small"})})})]})]},"image_preview_"+t)}function ro({url:e,previewType:t,size:c,hint:i}){return t?t==="image"?n.jsx(Gc,{url:e,size:c}):t==="audio"?n.jsxs("audio",{controls:!0,src:e,children:["Your browser does not support the",n.jsx("code",{children:"audio"})," element."]}):t==="video"?n.jsx("video",{className:`max-w-${c==="small"?"sm":"md"}`,controls:!0,children:n.jsx("source",{src:e})}):n.jsxs("a",{href:e,rel:"noopener noreferrer",target:"_blank",onClick:l=>l.stopPropagation(),className:"flex flex-col items-center justify-center",style:{width:Pn(c),height:Pn(c)},children:[n.jsx(gc,{className:"flex-grow"}),i&&n.jsx(ye,{title:i,children:n.jsx(j,{className:"max-w-full truncate rtl text-left",variant:"caption",children:i})})]}):!e||!e.trim()?n.jsx(Fn,{}):n.jsxs("a",{className:"flex gap-4 break-words items-center font-medium text-primary visited:text-primary dark:visited:text-primary dark:text-primary",href:e,rel:"noopener noreferrer",onMouseDown:l=>{l.preventDefault()},target:"_blank",children:[n.jsx(no,{size:"small"}),e]})}function Ve({width:e,height:t,className:c}){return n.jsx("span",{className:E("block","bg-gray-200 dark:bg-gray-800 rounded","animate-pulse",e?`w-[${e}px]`:"w-full",t?`h-[${t}px]`:"h-3","max-w-full max-h-full",c)})}function Dn({property:e,size:t}){e||console.error("No property assigned for skeleton component",e,t);let c;if(e.dataType==="string"){const i=e;i.url?c=SG(i,t):i.storage?c=Fr(t):c=nn()}else if(e.dataType==="array"){const i=e;i.of&&(Array.isArray(i.of)?c=n.jsxs(n.Fragment,{children:[i.of.map((l,a)=>Er(l,a))," "]}):i.of.dataType==="map"&&i.of.properties?c=mG(i.of.properties,t,i.of.previewProperties):i.of.dataType==="string"?i.of.enumValues?c=KG():i.of.storage?c=Er(i.of):c=vG():c=Er(i.of))}else e.dataType==="map"?c=kG(e,t):e.dataType==="date"?c=nn():e.dataType==="reference"?c=CG():(e.dataType,c=nn());return c||null}function kG(e,t){if(!e.properties)return n.jsx(n.Fragment,{});let c;return t==="medium"?c=Object.keys(e.properties):(c=e.previewProperties||Object.keys(e.properties),t==="small"?c=c.slice(0,3):t==="tiny"&&(c=c.slice(0,1))),t!=="medium"?n.jsx("div",{className:"w-full flex flex-col space-y-4",children:c.map((i,l)=>n.jsx("div",{children:e.properties&&e.properties[i]&&n.jsx(Dn,{property:e.properties[i],size:"small"})},`map_${i}`))}):n.jsx("table",{className:"table-auto",children:n.jsx("tbody",{children:c&&c.map((i,l)=>n.jsxs("tr",{className:"border-b last:border-b-0",children:[n.jsx("th",{className:"align-top",style:{width:"30%"},children:n.jsx("p",{className:"text-xs text-secondary",children:e.properties[i].name})},`table-cell-title--${i}`),n.jsx("th",{style:{width:"70%"},children:e.properties&&e.properties[i]&&n.jsx(Dn,{property:e.properties[i],size:"small"})},`table-cell-${i}`)]},`map_preview_table__${l}`))})})}function mG(e,t,c){let i=c;return(!i||!i.length)&&(i=Object.keys(e),t&&(i=i.slice(0,3))),n.jsx("table",{className:"table-auto",children:n.jsx("tbody",{children:[0,1,2].map((l,a)=>n.jsx("tr",{children:i&&i.map(s=>n.jsx("th",{children:n.jsx(Dn,{property:e[s],size:"small"})},`table-cell-${s}`))},`table_${l}_${a}`))})})}function vG(){return n.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((e,t)=>nn(t))})}function KG(){return n.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((e,t)=>n.jsx(n.Fragment,{children:nn(t)}))})}function Er(e,t=0){return n.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((c,i)=>n.jsx(n.Fragment,{children:n.jsx(Dn,{property:e,size:"small"},`i_${i}`)}))},"array_index_"+t)}function Fr(e){const t=e==="tiny"?40:e==="small"?100:200;return n.jsx(Ve,{width:t,height:t})}function CG(){return n.jsx(Ve,{width:200,height:100})}function SG(e,t="medium"){return typeof e.url=="boolean"?n.jsxs("div",{style:{display:"flex"},children:[Pr(),nn()]}):BG(t)}function BG(e){return n.jsx("div",{className:`w-${Pn(e)} h-${Pn(e)}`,children:Pr()})}function nn(e,t=120){return n.jsx(Ve,{width:t},`skeleton_${e}`)}function EG(e){return n.jsx(Ve,{height:20})}function Pr(){return n.jsx(Ve,{width:24,height:24})}const zc=f.memo(Uc,FG);function FG(e,t){return e.size===t.size&&e.storagePathOrDownloadUrl===t.storagePathOrDownloadUrl&&e.storeUrl===t.storeUrl}const Hc={};function Uc({storeUrl:e,storagePathOrDownloadUrl:t,size:c}){const[i,l]=f.useState(void 0),a=Sn(),[s,d]=f.useState(Hc[t]);if(f.useEffect(()=>{if(!t)return;let _=!1;return a.getDownloadURL(t).then(function(g){_||(d(g),Hc[t]=g)}).catch(l),()=>{_=!0}},[t]),!t)return null;const u=s?.metadata?PG(s?.metadata.contentType):void 0,A=u?.startsWith("image")?"image":u?.startsWith("video")?"video":u?.startsWith("audio")?"audio":"file";return s?.fileNotFound?n.jsx(pe,{error:"File not found"}):s?.url?n.jsx(ro,{previewType:A,url:s.url,size:c,hint:t}):Fr(c)}function PG(e){return e.startsWith("image")?"image/*":e.startsWith("video")?"video/*":e.startsWith("audio")?"audio/*":e.startsWith("application")?"application/*":e.startsWith("text")?"text/*":e.startsWith("font")?"font/*":e}function Yc(e){let t=0,c,i;for(c=0;c<e.length;c++)i=e.charCodeAt(c),t=(t<<5)-t+i,t|=0;return Math.abs(t)}const mo={blueLighter:{color:"#cfdfff",text:"#102046"},cyanLighter:{color:"#d0f0fd",text:"#04283f"},tealLighter:{color:"#c2f5e9",text:"#012524"},greenLighter:{color:"#d1f7c4",text:"#0b1d05"},yellowLighter:{color:"#ffeab6",text:"#3b2501"},orangeLighter:{color:"#fee2d5",text:"#6b2613"},redLighter:{color:"#ffdce5",text:"#4c0c1c"},pinkLighter:{color:"#ffdaf6",text:"#400832"},purpleLighter:{color:"#ede2fe",text:"#280b42"},grayLighter:{color:"#eee",text:"#040404"},blueLight:{color:"#9cc7ff",text:"#102046"},cyanLight:{color:"#77d1f3",text:"#04283f"},tealLight:{color:"#72ddc3",text:"#012524"},greenLight:{color:"#93e088",text:"#0b1d05"},yellowLight:{color:"#ffd66e",text:"#3b2501"},orangeLight:{color:"#ffa981",text:"#6b2613"},redLight:{color:"#ff9eb7",text:"#4c0c1c"},pinkLight:{color:"#f99de2",text:"#400832"},purpleLight:{color:"#cdb0ff",text:"#280b42"},grayLight:{color:"#ccc",text:"#040404"},blueDark:{color:"#2d7ff9",text:"#fff"},cyanDark:{color:"#18bfff",text:"#fff"},tealDark:{color:"#20d9d2",text:"#fff"},greenDark:{color:"#20c933",text:"#fff"},yellowDark:{color:"#fcb400",text:"#fff"},orangeDark:{color:"#ff6f2c",text:"#fff"},redDark:{color:"#f82b60",text:"#fff"},pinkDark:{color:"#ff08c2",text:"#fff"},purpleDark:{color:"#8b46ff",text:"#fff"},grayDark:{color:"#666",text:"#fff"},blueDarker:{color:"#2750ae",text:"#cfdfff"},cyanDarker:{color:"#0b76b7",text:"#d0f0fd"},tealDarker:{color:"#06a09b",text:"#daf3e9"},greenDarker:{color:"#338a17",text:"#d1f7c4"},yellowDarker:{color:"#b87503",text:"#ffeab6"},orangeDarker:{color:"#d74d26",text:"#fee2d5"},redDarker:{color:"#ba1e45",text:"#ffdce5"},pinkDarker:{color:"#b2158b",text:"#ffdaf6"},purpleDarker:{color:"#6b1cb0",text:"#ede2fe"},grayDarker:{color:"#444",text:"#eee"}};function $c(e){const t=Yc(e),c=Object.keys(mo),i=t%c.length;return mo[c[i]]}function DG(e){return mo[e]}function sn(e){return Array.isArray(e)?e:Object.entries(e).map(([t,c])=>typeof c=="string"?{id:t,label:c}:{...c,id:t})}function vo(e,t){if(t)return e.find(c=>String(c.id)===String(t))}function jc(e,t){const c=vo(e,t);if(!c?.color)return $c(t.toString());if(typeof c=="object"&&"color"in c){if(typeof c.color=="string")return mo[c.color];if(typeof c.color=="object")return c.color}}function NG(e){return typeof e=="object"&&e.disabled}function qc(e){if(e!==void 0)return typeof e=="object"?e.label:e}const MG={smaller:"px-2 py-0.5 text-sm",small:"px-3 py-1 text-sm",medium:"px-4 py-1.5 text-sm"};function Ko({children:e,colorScheme:t,error:c,outlined:i,onClick:l,icon:a,size:s="medium",className:d}){const u=typeof t=="string"?DG(t):t;return n.jsxs("div",{className:E("rounded-lg w-fit h-fit font-regular inline-flex items-center gap-1","truncate",l?"cursor-pointer hover:bg-gray-300 hover:dark:bg-gray-700":"",MG[s],c||!u?"bg-gray-100 dark:bg-gray-800 text-gray-800 dark:text-gray-200":"",c?"text-red-500 dark:text-red-400":"",d),onClick:l,style:{backgroundColor:c||!u?void 0:u.color,color:c||!u?void 0:u.text},children:[e,a]})}function Ee({enumValues:e,enumKey:t,size:c,className:i,children:l}){if(!e)return null;const a=sn(e),s=t!==void 0?vo(a,t):void 0,d=qc(s),u=jc(a,t);return n.jsxs(Ko,{className:i,colorScheme:u,error:!d,outlined:!1,size:c,children:[l,!l&&(d!==void 0?d:String(t))]})}function Dr({propertyKey:e,value:t,property:c,size:i}){if(c.enumValues){const l=t,a=st(c);return n.jsx(Ee,{enumKey:l,enumValues:a.enumValues,size:i!=="medium"?"small":"medium"})}else if(c.previewAsTag){const l=$c(e??"");return n.jsx(se,{children:n.jsx(Ko,{colorScheme:l,size:i!=="medium"?"small":"medium",children:t})})}else{if(c.url)return n.jsx(ro,{size:i,url:t,previewType:typeof c.url=="string"?c.url:void 0});{if(!t)return n.jsx(n.Fragment,{});const l=t.split(`
|
|
1
|
+
(function(v,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react"),require("notistack"),require("object-hash"),require("formik"),require("@firecms/ui"),require("react-router-dom"),require("react-fast-compare"),require("date-fns"),require("date-fns/locale"),require("react-window"),require("react-use-measure"),require("@hello-pangea/dnd"),require("react-dropzone"),require("react-image-file-resizer"),require("markdown-it"),require("react-markdown-editor-lite"),require("yup"),require("react-datepicker"),require("js-search"),require("@radix-ui/react-portal")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","notistack","object-hash","formik","@firecms/ui","react-router-dom","react-fast-compare","date-fns","date-fns/locale","react-window","react-use-measure","@hello-pangea/dnd","react-dropzone","react-image-file-resizer","markdown-it","react-markdown-editor-lite","yup","react-datepicker","js-search","@radix-ui/react-portal"],r):(v=typeof globalThis<"u"?globalThis:v||self,r(v["FireCMS Core"]={},v.jsxRuntime,v.React,v.notistack,v.hash,v.formik,v.ui,v.reactRouterDom,v.equal,v.dateFns,v.locales,v.reactWindow,v.useMeasure,v.dnd,v.reactDropzone,v.Resizer,v.MarkdownIt,v.MdEditor,v.yup,v.reactDatepicker,v.JsSearch,v.Portal))})(this,function(v,r,c,wn,Cn,ke,A,de,ie,wl,Cl,El,Ar,ct,En,Bl,kl,nt,xl,Bn,Sl,Il){"use strict";function Bt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const fr=Bt(c),kn=Bt(Cl),xe=Bt(xl),Fl=Bt(Sl),Nl=Bt(Il),Tl=({children:e})=>r.jsx(wn.SnackbarProvider,{maxSnack:3,autoHideDuration:3500,children:e}),Pl={mode:"light",setMode:e=>{},toggleMode:()=>{}},Ot=c.createContext(Pl),Ql=Ot.Provider,ur=c.createContext({});function Ae(e){return xn(Sn(e))}function xn(e){return e.startsWith("/")?e.slice(1):e}function Sn(e){return e.endsWith("/")?e.slice(0,-1):e}function Ml(e){return e.startsWith("/")?e:`/${e}`}function Dl(e){const t=Ae(e);if(t.includes("/")){const n=t.split("/");return n[n.length-1]}return t}function gr(e,t){const n=Ae(e),o=n.split("/");if(o.length%2===0)throw Error(`resolveCollectionPathAliases: Collection paths must have an odd number of segments: ${e}`);const l=t.find(s=>s.id===o[0]);let i;if(l&&(i=l.path),o.length>1){const s=Vt(i??o[0],t);if(!s?.subcollections)return n;const a=n.split("/").slice(2).join("/");return(i??o[0])+"/"+o[1]+"/"+gr(a,s.subcollections)}else return i??n}function Vt(e,t){const n=Ae(e).split("/");if(n.length%2===0)throw Error(`getCollectionByPathOrAlias: Collection paths must have an odd number of segments: ${e}`);const o=Gt(n);let l;for(let i=0;i<o.length;i++){const s=o[i],a=t&&t.sort((d,f)=>(d.id??"").localeCompare(f.id??"")).find(d=>d.id===s||d.path===s);if(a){if(s===e)l=a;else if(a.subcollections){const d=e.replace(s,"").split("/").slice(2).join("/");d.length>0&&(l=Vt(d,a.subcollections))}}if(l)break}return l}function Gt(e){const t=e.length>0&&e.length%2===0?e.splice(0,e.length-1):e,n=t.length,o=[];for(let l=n;l>0;l=l-2)o.push(t.slice(0,l).join("/"));return o}class Ne{id;path;constructor(t,n){this.id=t,this.path=n}get pathWithId(){return`${this.path}/${this.id}`}}class Yt{latitude;longitude;constructor(t,n){this.latitude=t,this.longitude=n}}const In=(e,...t)=>({...t.reduce((n,o)=>({...n,[o]:e[o]}),{})});function zt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Te(e,t){const n=zt(e),o=n?{...e}:e;return n&&zt(t)&&Object.keys(t).forEach(l=>{zt(t[l])?l in e?o[l]=Te(e[l],t[l]):Object.assign(o,{[l]:t[l]}):Object.assign(o,{[l]:t[l]})}),o}function je(e,t){if(e&&typeof e=="object"){if(t in e)return e[t];if(t.includes(".")||t.includes("[")){let n=t.split(/[.[]/);t.includes("[")&&(n=n.map(a=>a.replace("]","")));const o=n[0],l=Array.isArray(e[o])&&!isNaN(parseInt(n[1])),i=l?e[o][parseInt(n[1])]:e[o],s=n.slice(l?2:1).join(".");return s===""?i:je(i,s)}}}function Ol(e,t){let n={...e};const o=t.split("."),l=o.pop();for(const i of o)n=n[i];return l&&delete n[l],n}function hr(e){if(e!==void 0)return e===null?null:typeof e=="object"?Object.entries(e).filter(([t,n])=>typeof n!="function").map(([t,n])=>Array.isArray(n)?{[t]:n.map(o=>hr(o))}:typeof n=="object"?{[t]:hr(n)}:{[t]:n}).reduce((t,n)=>({...t,...n}),{}):e}function pr(e){if(!e)return null;if(typeof e=="object"){if("id"in e)return e.id;if(e instanceof Date)return e.toLocaleString();if(e instanceof Yt)return Cn(e)}return Cn(e,{ignoreUnknown:!0})}function mr(e,t){if(typeof e=="function")return e;if(Array.isArray(e))return e.map(n=>mr(n,t));if(typeof e=="object"){const n={};return e===null?e:(Object.keys(e).forEach(o=>{if(!br(e)){const l=mr(e[o],t),i=typeof l=="string",s=!t||t&&!i||t&&i&&l!=="";l!==void 0&&!br(l)&&s&&(n[o]=l)}}),n)}return e}function br(e){return e&&Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length===0}function Fn(e,t){const n=i=>typeof i=="object"&&i!==null,o=i=>Array.isArray(i);if(!n(e)||!n(t))return e;const l=o(e)?[...e]:{...e};return Object.keys(t).forEach(i=>{i in l&&(n(l[i])&&n(t[i])?l[i]=Fn(l[i],t[i]):l[i]===t[i]&&(o(l)?l.splice(i,1):delete l[i]))}),l}const kt="type",Lt="value";function dt(e){return e.readOnly||e.dataType==="date"&&e.autoValue?!0:e.dataType==="reference"?!e.path:!1}function xt(e){return typeof e.disabled=="object"&&!!e.disabled.hidden}function ye(e){return typeof e=="function"}function St(e){return e?Object.entries(e).map(([t,n])=>{const o=Ut(n);return o===void 0?{}:{[t]:o}}).reduce((t,n)=>({...t,...n}),{}):{}}function Ut(e){if(!ye(e))if(e.dataType==="map"&&e.properties){const t=St(e.properties);return Object.keys(t).length===0?void 0:t}else return e.defaultValue?e.defaultValue:yr(e.dataType)}function yr(e){return e==="string"||e==="number"?null:e==="boolean"?!1:e==="date"?null:e==="array"?[]:e==="map"?{}:null}function Nn({inputValues:e,properties:t,status:n,timestampNowValue:o,setDateToMidnight:l}){return vr(e,t,(i,s)=>{if(s.dataType==="date"){let a;return n==="existing"&&s.autoValue==="on_update"||(n==="new"||n==="copy")&&(s.autoValue==="on_update"||s.autoValue==="on_create")?a=o:a=i,s.mode==="date"&&(a=l(a)),a}else return i})??{}}function Vl(e,t){const n=e;return Object.entries(t).forEach(([o,l])=>{e&&e[o]!==void 0?n[o]=e[o]:l.validation?.required&&(n[o]=null)}),n}function Ue(e){return new Ne(e.id,e.path)}function vr(e,t,n){const o=Object.entries(t).map(([i,s])=>{const a=e&&e[i],d=$t(a,s,n);if(d!==void 0)return{[i]:d}}).reduce((i,s)=>({...i,...s}),{}),l={...e,...o};if(Object.keys(l).length!==0)return l}function $t(e,t,n){let o;if(t.dataType==="map"&&t.properties)o=vr(e,t.properties,n);else if(t.dataType==="array")if(t.of&&Array.isArray(e))o=e.map(l=>$t(l,t.of,n));else if(t.oneOf&&Array.isArray(e)){const l=t.oneOf?.typeField??kt,i=t.oneOf?.valueField??Lt;o=e.map(s=>{if(s===null)return null;if(typeof s!="object")return s;const a=s[l],d=t.oneOf?.properties[a];return!a||!d?s:{[l]:a,[i]:$t(s[i],d,n)}})}else o=e;else o=n(e,t);return o}function Tn(e){let t=0,n,o;for(n=0;n<e.length;n++)o=e.charCodeAt(n),t=(t<<5)-t+o,t|=0;return Math.abs(t)}function Pn(e){const t=Tn(e),n=Object.keys(A.CHIP_COLORS),o=t%n.length;return A.CHIP_COLORS[n[o]]}function He(e){return Array.isArray(e)?e:Object.entries(e).map(([t,n])=>typeof n=="string"?{id:t,label:n}:{...n,id:t})}function _t(e,t){if(t)return e.find(n=>String(n.id)===String(t))}function Qn(e,t){const n=_t(e,t);if(!n?.color)return Pn(t.toString());if(typeof n=="object"&&"color"in n){if(typeof n.color=="string")return A.CHIP_COLORS[n.color];if(typeof n.color=="object")return n.color}}function Gl(e){return typeof e=="object"&&e.disabled}function Mn(e){if(e!==void 0)return typeof e=="object"?e.label:e}const Ie=({collection:e,path:t,entityId:n,values:o,previousValues:l,userConfigPersistence:i,fields:s})=>{const a=i?.getCollectionConfig(t),d=je(a,"properties"),f=St(e.properties),g=o??f,p=l??o??f,h=Object.entries(e.properties).map(([b,y])=>{const C=g?ke.getIn(g,b):void 0,w=Se({propertyKey:b,propertyOrBuilder:y,values:g,previousValues:p,path:t,propertyValue:C,entityId:n,fields:s});return w?{[b]:w}:{}}).filter(b=>b!==null).reduce((b,y)=>({...b,...y}),{}),u=Te(h,d),m=Object.entries(u).filter(([b,y])=>!!y?.dataType).map(([b,y])=>({[b]:y})).reduce((b,y)=>({...b,...y}),{});return{...e,properties:m,originalCollection:e}};function Se({propertyOrBuilder:e,propertyValue:t,fromBuilder:n=!1,...o}){if(typeof e=="object"&&"resolved"in e)return e;let l=null;if(e)if(ye(e)){const i=o.path;if(!i)throw Error("Trying to resolve a property builder without specifying the entity path");const s=e({...o,path:i,propertyValue:t,values:o.values??{},previousValues:o.previousValues??o.values??{}});if(!s)return null;l=Se({...o,propertyValue:t,propertyOrBuilder:s,fromBuilder:!0})}else{const i=e;if(i.dataType==="map"&&i.properties){const s=wr({...o,properties:i.properties,propertyValue:t});l={...i,resolved:!0,fromBuilder:n,properties:s}}else i.dataType==="array"?l=Je({property:i,propertyValue:t,fromBuilder:n,...o}):(i.dataType==="string"||i.dataType==="number")&&i.enumValues&&(l=Cr(i,n))}else return null;if(l||(l={...e,resolved:!0,fromBuilder:n}),l.propertyConfig&&!ml(l.propertyConfig)){const i=o.fields;if(!i)throw Error(`Trying to resolve a property with key ${l.propertyConfig} that inherits from a custom property config but no custom property configs were provided. Use the property \`propertyConfigs\` in your app config to provide them`);const s=i[l.propertyConfig];if(!s)return console.warn(`Trying to resolve a property with key ${l.propertyConfig} that inherits from a custom property config but no custom property config with that key was found. Check the \`propertyConfigs\` in your app config`),console.warn("Available property configs",i),null;if(s.property){const a=s.property;"propertyConfig"in a&&delete a.propertyConfig;const d=Se({propertyOrBuilder:a,propertyValue:t,...o});d&&(l=Te(d,l))}}return l?{...l,resolved:!0}:null}function Je({propertyKey:e,property:t,propertyValue:n,...o}){if(t.of){if(Array.isArray(t.of))return{...t,resolved:!0,fromBuilder:o.fromBuilder,resolvedProperties:t.of.map((l,i)=>Se({propertyKey:`${e}.${i}`,propertyOrBuilder:l,propertyValue:Array.isArray(n)?n[i]:void 0,...o,index:i}))};{const l=t.of,i=Array.isArray(n)?n.map((a,d)=>Se({propertyKey:`${e}.${d}`,propertyOrBuilder:l,propertyValue:a,...o,index:d})).filter(a=>!!a):[],s=Se({propertyKey:`${e}`,propertyOrBuilder:l,propertyValue:void 0,...o});if(!s)throw Error("When using a property builder as the 'of' prop of an ArrayProperty, you must return a valid child property");return{...t,resolved:!0,fromBuilder:o.fromBuilder,of:s,resolvedProperties:i}}}else if(t.oneOf){const l=t.oneOf?.typeField??kt,i=Array.isArray(n)?n.map((a,d)=>{const f=a&&a[l],g=t.oneOf?.properties[f];return!f||!g?null:Se({propertyKey:`${e}.${d}`,propertyOrBuilder:g,propertyValue:n,...o})}).filter(a=>!!a):[],s=wr({properties:t.oneOf.properties,propertyValue:void 0,...o});return{...t,resolved:!0,oneOf:{...t.oneOf,properties:s},fromBuilder:o.fromBuilder,resolvedProperties:i}}else{if(t.Field)return{...t,resolved:!0,fromBuilder:o.fromBuilder};throw Error("The array property needs to declare an 'of' or a 'oneOf' property, or provide a custom `Field`")}}function wr({properties:e,propertyValue:t,...n}){return Object.entries(e).map(([o,l])=>{const i=t&&typeof t=="object"?je(t,o):void 0,s=Se({propertyKey:o,propertyOrBuilder:l,propertyValue:i,...n});return s?{[o]:s}:{}}).filter(o=>o!==null).reduce((o,l)=>({...o,...l}),{})}function Cr(e,t){return typeof e.enumValues=="object"?{...e,resolved:!0,enumValues:He(e.enumValues)?.filter(n=>n&&n.id&&n.label)??[],fromBuilder:t??!1}:e}function Yl(e){return typeof e=="object"?Object.entries(e).map(([t,n])=>typeof n=="string"?{id:t,label:n}:n):Array.isArray(e)?e:void 0}function Er(e,t){return typeof e=="string"?t?.find(n=>n.key===e):e}function Br(e){const{path:t,collections:n=[],currentFullPath:o}=e,l=Ae(t).split("/"),i=Gt(l),s=[];for(let a=0;a<i.length;a++){const d=i[a],f=n&&n.find(g=>g.id===d||g.path===d);if(f){const g=f.id??f.path,p=o&&o.length>0?o+"/"+g:g;s.push({type:"collection",path:p,collection:f});const h=Ae(Ae(t).replace(d,"")),u=h.length>0?h.split("/"):[];if(u.length>0){const m=u[0],b=p+"/"+m;if(s.push({type:"entity",entityId:m,path:p,parentCollection:f}),u.length>1){const y=u.slice(1).join("/");if(!f)throw Error("collection not found resolving path: "+f);const C=f.entityViews,w=C&&C.map(E=>Er(E,e.contextEntityViews)).filter(Boolean).find(E=>E.key===y);if(w){const E=o&&o.length>0?o+"/"+w.key:w.key;s.push({type:"custom_view",path:E,view:w})}else f.subcollections&&s.push(...Br({path:y,collections:f.subcollections,currentFullPath:b,contextEntityViews:e.contextEntityViews}))}}break}}return s}function kr(e,t){try{const n=Object.keys(e);return(t??n).map(l=>{if(e[l]){const i=e[l];return!ye(i)&&i?.dataType==="map"&&i.properties?{[l]:{...i,properties:kr(i.properties,i.propertiesOrder)}}:{[l]:i}}else return}).filter(l=>l!==void 0).reduce((l,i)=>({...l,...i}),{})}catch(n){return console.error("Error sorting properties",n),e}}function xr(e,t){if(e)return typeof e=="string"?e:e(t)}const zl=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,Ll=e=>{const t=e.match(zl);return t?t.map(n=>n.toLowerCase()).join("-"):""},Ul=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,$l=e=>{const t=e.match(Ul);return t?t.map(n=>n.toLowerCase()).join("_"):""};function At(e=5){return Math.random().toString(36).slice(2,2+e)}function _l(){return Math.floor(Math.random()*16777215).toString(16)}function Wt(e,t="_",n=!0){if(!e)return"";const o="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;-",l=`aaaaaeeeeeiiiiooooouuuunc${t}${t}${t}${t}${t}${t}${t}`;for(let i=0,s=o.length;i<s;i++)e=e.replace(new RegExp(o.charAt(i),"g"),l.charAt(i));return e=e.toString().replace(/\s+/g,t).replace(/&/g,t).replace(/[^\w\\-]+/g,"").replace(new RegExp("\\"+t+"\\"+t+"+","g"),t).trim().replace(/^\s+|\s+$/g,""),n?e.toLowerCase():e}function Wl(e){return e.includes("-")||e.includes("_")||!e.includes(" ")?e.replace(/[-_]/g," ").replace(/\w\S*/g,function(n){return n.charAt(0).toUpperCase()+n.substr(1)}):e}const Dn="MMMM dd, yyyy, HH:mm:ss",On="::";function Sr(e){return Vn(Pe(e))}function Vn(e){return e.length===1?e[0]:e.reduce((t,n)=>`${t}${On}${n}`)}function Pe(e){return e.split("/").filter((t,n)=>n%2===0)}function jl(e){return e?e.toString():""}function Gn(e){if(!e)return;const t=e.match(/\/(.*?)\/([a-z]*)?$/i);return t?new RegExp(t[1],t[2]||""):new RegExp(e,"")}function Hl(e){return e.match(/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/)?!0:!!e.match(/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)/)}function jt(e,t,n,o=300){const l=c.useRef(!1),i=()=>{t(),l.current=!1},s=c.useRef(void 0);c.useEffect(()=>(l.current=!0,clearTimeout(s.current),s.current=setTimeout(i,o),()=>{n&&i()}),[n,e])}function Yn(e,t){const n=Se({propertyKey:"ignore",propertyOrBuilder:e,fields:t});return n?n.dataType==="reference"?!0:n.dataType==="array"?Array.isArray(n.of)?!1:n.of?.dataType==="reference":!1:null}function Jl(e){return r.jsx(A.CircleIcon,{size:e})}function Ht(e,t){const n=e?.Icon??A.CircleIcon;return r.jsx(n,{size:t})}function pe(e,t="small",n={}){if(ye(e))return r.jsx(A.FunctionsIcon,{size:t});{const o=cr(e,n);return Ht(o,t)}}function ql(e,t){return ye(e)?"#888":cr(e,t)?.color??"#666"}function ot(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const n=t.split("."),o=e[n[0]];if(typeof o=="object"&&o.dataType==="map"&&o.properties)return ot(o.properties,n.slice(1).join("."))}}}function Ir(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const n=t.split("."),o=e[n[0]];if(o.dataType==="map"&&o.properties)return Ir(o.properties,n.slice(1).join("."))}}}function Zl(e){return e.replace(/\.([^.]*)/g,"[$1]")}function zn(e,t){if(!t)return e;const n={};return t.filter(Boolean).forEach(o=>{const l=ot(e,o);typeof l=="object"&&l.dataType==="map"&&l.properties&&(n[o]={...l,properties:zn(l.properties,l.propertiesOrder??[])}),l&&(n[o]=l)}),n}function Xl(e){return e.propertiesOrder?e.propertiesOrder:[...Object.keys(e.properties),...(e.additionalFields??[]).map(t=>t.key)]}const Jt={read:!0,edit:!0,create:!0,delete:!0};function It(e,t,n,o){const l=e.permissions;if(l===void 0)return Jt;if(typeof l=="object")return l;if(typeof l=="function")return l({entity:o,user:t.user,authController:t,collection:e,pathSegments:n});throw console.error("Permissions:",l),Error("New type of permission added and not mapped")}function Fr(e,t,n,o){return It(e,t,n,o).edit??Jt.edit}function ft(e,t,n,o){return It(e,t,n,o).create??Jt.create}function qt(e,t,n,o){return It(e,t,n,o).delete??Jt.delete}function Ln(e,t){if(e&&(e=Wt(e),e in Xt))return e in Xt?r.jsx(A.Icon,{iconKey:e,size:"medium",className:t}):void 0}function Zt(e,t){const n=Ln(e.icon,t);if(e?.icon&&n)return n;let o=Wt(("singularName"in e?e.singularName:void 0)??e.name),l;o in Xt&&(l=o),l||(o=Wt(e.path),o in Xt&&(l=o));const i=A.coolIconKeys.length;return l||(l=A.coolIconKeys[Tn(e.path)%i]),r.jsx(A.Icon,{iconKey:l,size:"medium",className:t})}const Xt=A.iconKeys.reduce((e,t)=>(e[t]=t,e),{});function Kl(e,t){if(t!==void 0&&t===1)return e;const n={"(quiz)$":"$1zes","^(ox)$":"$1en","([m|l])ouse$":"$1ice","(matr|vert|ind)ix|ex$":"$1ices","(x|ch|ss|sh)$":"$1es","([^aeiouy]|qu)y$":"$1ies","(hive)$":"$1s","(?:([^f])fe|([lr])f)$":"$1$2ves","(shea|lea|loa|thie)f$":"$1ves",sis$:"ses","([ti])um$":"$1a","(tomat|potat|ech|her|vet)o$":"$1oes","(bu)s$":"$1ses","(alias)$":"$1es","(octop)us$":"$1i","(ax|test)is$":"$1es","(us)$":"$1es","([^s]+)$":"$1s"},o={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const i in o){const s=new RegExp(`${i}$`,"i"),a=o[i];if(s.test(e))return e.replace(s,a)}for(const i in n){const s=new RegExp(i,"i");if(s.test(e))return e.replace(s,n[i])}return e}function Rl(e,t){if(t!==void 0&&t!==1)return e;const n={"(quiz)zes$":"$1","(matr)ices$":"$1ix","(vert|ind)ices$":"$1ex","^(ox)en$":"$1","(alias)es$":"$1","(octop|vir)i$":"$1us","(cris|ax|test)es$":"$1is","(shoe)s$":"$1","(o)es$":"$1","(bus)es$":"$1","([m|l])ice$":"$1ouse","(x|ch|ss|sh)es$":"$1","(m)ovies$":"$1ovie","(s)eries$":"$1eries","([^aeiouy]|qu)ies$":"$1y","([lr])ves$":"$1f","(tive)s$":"$1","(hive)s$":"$1","(li|wi|kni)ves$":"$1fe","(shea|loa|lea|thie)ves$":"$1f","(^analy)ses$":"$1sis","((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$":"$1$2sis","([ti])a$":"$1um","(n)ews$":"$1ews","(h|bl)ouses$":"$1ouse","(corpse)s$":"$1","(us)es$":"$1",s$:""},o={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const i in o){const s=new RegExp(`${o[i]}$`,"i");if(s.test(e))return e.replace(s,i)}for(const i in n){const s=new RegExp(i,"i");if(s.test(e))return e.replace(s,n[i])}return e}function Un(e,t,n,o=3){const l=Object.keys(e.properties);let i=n?.filter(s=>l.includes(s));return i&&i.length>0?i:(i=l,i.filter(s=>{const a=e.properties[s];return a&&!ye(a)&&!Yn(a,t)}).slice(0,o))}function Nr(e,t=""){return e&&Object.keys(e).reduce((n,o)=>{const l=t?`${t}.${o}`:o;return typeof e[o]=="object"&&e[o]!==null?Array.isArray(e[o])?e[o].forEach((i,s)=>{Object.assign(n,Nr(i,`${l}[${s}]`))}):Object.assign(n,Nr(e[o],l)):n[l]=e[o],n},{})}function $n(e){return e.reduce((t,n)=>(Object.entries(n).forEach(([o,l])=>{if(Array.isArray(l)&&(t[o]=Math.max(t[o]||0,l.length)),typeof l=="object"&&l!==null){const i=$n([l]);Object.entries(i).forEach(([s,a])=>{const d=`${o}.${s}`;t[d]=Math.max(t[d]||0,a)})}}),t),{})}function _n(e){return Object.keys(e).forEach(t=>{const n=e[t];n.editable=!0,n.dataType==="map"&&n.properties&&_n(n.properties)}),e}function Wn(e){return Object.entries(e).reduce((t,[n,o])=>{if(!ye(o)&&o.dataType==="map"&&o.properties){const l={...o,properties:Wn(o.properties)};t[n]=l}return ye(o)?t[n]=o:t[n]={...o,editable:!1},t},{})}function Tr(e,t,n){if(e){const l=e({collection:t,parentPaths:n})??t;return l.subcollections&&(l.subcollections=l.subcollections.map(i=>Tr(e,i,[...n,t.path]))),l}else return t}function jn(e,t,n=[],o){const l=(t??[]).map(a=>{const d=e?.find(f=>f.id===a.id);return d?Hn(d,a,n,o):Tr(o,a,n)}),i=l.map(a=>a.id),s=e.filter(a=>!i.includes(a.id)).map(a=>o?Tr(o,a,n):a);return[...l,...s]}function Hn(e,t,n=[],o){const l=jn(e?.subcollections??[],t?.subcollections??[],[...n,e.path],o),i={...e.properties};Object.keys(t.properties).forEach(h=>{const u=e.properties[h];u?i[h]=Jn(u,t.properties[h]):i[h]=t.properties[h]});const s=Te(e,t),a=qn(e),d=qn(t),f=[...new Set([...d,...a])],g=[...new Set([...e.entityViews??[],...t.entityViews??[]])];let p={...s,subcollections:l,properties:kr(i,f),propertiesOrder:f,entityViews:g};if(o){const h=o({collection:p,parentPaths:n});h&&(p=h)}return p}function Jn(e,t){if(ye(t))return t;if(ye(e))return e;{const n=Te(e,t),o=!!e.editable,l=!!t.editable;if(t.dataType==="map"&&t.properties){const i="properties"in e?e.properties:{},s="properties"in t?t.properties:{},a="propertiesOrder"in e&&e.propertiesOrder?e.propertiesOrder:Object.keys(i),d="propertiesOrder"in t&&t.propertiesOrder?t.propertiesOrder:"properties"in t?Object.keys(t.properties):[],f=[...new Set([...a,...d])],g={...i};return Object.keys(t.properties).forEach(p=>{const h=i[p];h&&(g[p]=Jn(h,s[p]))}),{...n,editable:o&&l,properties:g,propertiesOrder:f}}return{...n,editable:o&&l}}}function qn(e){if(e.propertiesOrder&&e.propertiesOrder.length>0){const t=e.propertiesOrder;return e.additionalFields&&e.additionalFields.forEach(n=>{t.includes(n.key)||t.push(n.key)}),t}return[...Object.keys(e.properties),...(e.additionalFields??[])?.map(t=>t.key)]}function ei(e){return e}function ti(e){return e}function ri(e){return e}function ni(e){return e}function oi(e){return e}function li(e){return e}function ii(e){return e}function si(e){return e}function ai(e){return e}const ci="100vw",di="55vw",Zn="768px",Xn=c.createContext({}),Qe=()=>c.useContext(Xn),Kn=c.createContext({}),ae=()=>c.useContext(Kn),qe=()=>c.useContext(ur),Rn=c.createContext({}),Ft=()=>c.useContext(Rn),eo=c.createContext({}),Ze=()=>c.useContext(eo),to=c.createContext({}),ut=()=>c.useContext(to),Xe=()=>{const{enqueueSnackbar:e,closeSnackbar:t}=wn.useSnackbar(),n=c.useCallback(l=>{const{type:i,message:s,autoHideDuration:a}=l;e({message:s,variant:i,autoHideDuration:a})},[]),o=c.useCallback(()=>{t()},[]);return c.useMemo(()=>({open:n,close:o}),[n,o])},ro=c.createContext(void 0),gt=()=>c.useContext(ro),no=c.createContext({}),Ai=({children:e})=>{const[t,n]=c.useState([]),o=c.useRef(t),l=a=>{o.current=a,n(a)},i=c.useCallback(()=>{if(t.length===0)return;const a=[...t.slice(0,-1)];l(a)},[t]),s=c.useCallback(a=>{const d=[...t,a];return l(d),{closeDialog:()=>{const f=o.current.filter(g=>g.key!==a.key);l(f)}}},[t]);return r.jsxs(no.Provider,{value:{open:s,close:i},children:[e,t.map((a,d)=>r.jsx(a.Component,{open:!0,closeDialog:i},`dialog_${d}`))]})},fi=()=>c.useContext(no),Pr=c.createContext({}),J=()=>{const e=c.useContext(Pr),t=qe(),n=Ft(),o=Ze(),l=ae(),i=Qe(),s=ut(),a=Xe(),d=gt(),f=fi();return{...e,authController:t,sideDialogsController:n,sideEntityController:o,navigation:l,dataSource:i,storageSource:s,snackbarController:a,userConfigPersistence:d,dialogsController:f}};function ui({path:e,collection:t,filterValues:n,sortBy:o,itemCount:l,searchString:i}){const s=Qe(),d=ae().resolveAliasesFrom(e),f=o?o[0]:void 0,g=o?o[1]:void 0,p=J(),[h,u]=c.useState([]),[m,b]=c.useState(!1),[y,C]=c.useState(),[w,E]=c.useState(!1);return c.useEffect(()=>{b(!0);const k=async S=>{if(t.callbacks?.onFetch)try{S=await Promise.all(S.map(B=>t.callbacks.onFetch({collection:t,path:d,entity:B,context:p})))}catch(B){console.error(B)}b(!1),C(void 0),u(S.map(B=>({...B}))),E(!l||S.length<l)},x=S=>{console.error("ERROR",S),b(!1),u([]),C(S)};return s.listenCollection?s.listenCollection({path:d,collection:t,onUpdate:k,onError:x,searchString:i,filter:n,limit:l,startAfter:void 0,orderBy:f,order:g}):(s.fetchCollection({path:d,collection:t,searchString:i,filter:n,limit:l,startAfter:void 0,orderBy:f,order:g}).then(k).catch(x),()=>{})},[d,l,g,f,n,i]),{data:h,dataLoading:m,dataLoadingError:y,noMoreToLoad:w}}const Qr={};function Mr({path:e,entityId:t,collection:n,useCache:o=!1}){const l=Qe(),s=ae().resolveAliasesFrom(e),a=J(),[d,f]=c.useState(),[g,p]=c.useState(!0),[h,u]=c.useState();return c.useEffect(()=>{p(!0);const m=async y=>{if(n.callbacks?.onFetch&&y)try{y=await n.callbacks.onFetch({collection:n,path:s,entity:y,context:a})}catch(C){console.error(C)}Qr[`${s}/${t}`]=y,f(y),p(!1),u(void 0)},b=y=>{console.error("ERROR fetching entity",y),p(!1),f(void 0),u(y)};return t&&o&&Qr[`${s}/${t}`]?(f(Qr[`${s}/${t}`]),p(!1),u(void 0),()=>{}):t&&s&&n?l.listenEntity?l.listenEntity({path:s,entityId:t,collection:n,onUpdate:m,onError:b}):(l.fetchEntity({path:s,entityId:t,collection:n}).then(m).catch(b),()=>{}):(m(void 0),()=>{})},[t,s]),{entity:d,dataLoading:g,dataLoadingError:h}}async function Dr({collection:e,path:t,entityId:n,values:o,previousValues:l,status:i,dataSource:s,context:a,onSaveSuccess:d,onSaveFailure:f,onPreSaveHookError:g,onSaveSuccessHookError:p}){let h;const u=a.navigation.resolveAliasesFrom(t),m=e.callbacks;if(m?.onPreSave)try{const b=Ie({collection:e,path:t,values:l,entityId:n,fields:a.propertyConfigs});h=await m.onPreSave({collection:b,path:t,resolvedPath:u,entityId:n,values:o,previousValues:l,status:i,context:a})}catch(b){console.error(b),g&&g(b);return}else h=o;return s.saveEntity({collection:e,path:u,entityId:n,values:h,previousValues:l,status:i}).then(b=>{try{if(m?.onSaveSuccess){const y=Ie({collection:e,path:t,values:h,entityId:n,fields:a.propertyConfigs});m.onSaveSuccess({collection:y,path:t,resolvedPath:u,entityId:b.id,values:h,previousValues:l,status:i,context:a})}}catch(y){p&&p(y)}d&&d(b)}).catch(b=>{if(m?.onSaveFailure){const y=Ie({collection:e,path:t,values:h,entityId:n,fields:a.propertyConfigs});m.onSaveFailure({collection:y,path:t,resolvedPath:u,entityId:n,values:h,previousValues:l,status:i,context:a})}f&&f(b)})}async function oo({dataSource:e,entity:t,collection:n,callbacks:o,onDeleteSuccess:l,onDeleteFailure:i,onPreDeleteHookError:s,onDeleteSuccessHookError:a,context:d}){console.debug("Deleting entity",t.path,t.id);const f={entity:t,collection:n,entityId:t.id,path:t.path,context:d};if(o?.onPreDelete)try{await o.onPreDelete(f)}catch(g){return console.error(g),s&&s(t,g),!1}return e.deleteEntity({entity:t}).then(()=>{l&&l(t);try{return o?.onDelete&&o.onDelete(f),!0}catch(g){return a&&a(t,g),!1}}).catch(g=>(i&&i(t,g),!1))}function Fe({property:e,value:t,setValue:n}){const o=c.useRef(null);c.useEffect(()=>{typeof e.disabled=="object"&&!!e.disabled.clearOnDisabled?t!=null&&(o.current=t,n(null)):o.current&&(n(o.current),o.current=null)},[e])}function lo({path:e,context:t}){const n=t.dataSource,o=t.navigation;if(!o)throw Error("Calling getNavigationFrom, but main navigation has not yet been initialised");const i=Br({path:e,collections:o.collections??[]}).map(s=>{if(s.type==="collection")return Promise.resolve(s);if(s.type==="entity"){const a=o.getCollection(s.path,s.entityId);if(!a)throw Error(`No collection defined in the navigation for the entity with path ${s.path}`);return n.fetchEntity({path:s.path,entityId:s.entityId,collection:a}).then(d=>{if(d)return{...s,entity:d}})}else{if(s.type==="custom_view")return Promise.resolve(s);throw Error("Unmapped element in useEntitiesFromPath")}}).filter(s=>!!s);return Promise.all(i)}function gi({path:e}){const t=J(),[n,o]=c.useState(),[l,i]=c.useState(!1),[s,a]=c.useState();return c.useEffect(()=>{t.navigation&&(i(!0),a(void 0),lo({path:e,context:t}).then(f=>{o(f)}).catch(f=>a(f)).finally(()=>i(!1)))},[e,t]),t.navigation?{data:n,dataLoading:l,dataLoadingError:s}:{dataLoading:!0}}const Or=()=>c.useContext(Ot),io=e=>{const{onSuccess:t,onError:n,disableClipboardAPI:o=!1,copiedDuration:l}=e||{},i=c.useRef(null),[s,a]=c.useState(!1),[d,f]=c.useState("");c.useEffect(()=>{l&&setTimeout(()=>a(!1),l)},[s]);const g=()=>navigator.clipboard!==void 0,p=c.useCallback(w=>{if(n)n(w);else throw new Error(w)},[n]),h=c.useCallback(w=>{t&&t(w),a(!0),f(w)},[t]),u=c.useCallback(w=>{navigator.clipboard.writeText(w).then(()=>h(w)).catch(E=>{p(E),a(!1)})},[p,h]),m=()=>{g()&&navigator.clipboard.writeText("")},b=w=>C("copy",typeof w=="object"?void 0:w),y=()=>C("cut"),C=c.useCallback((w="copy",E)=>{const k=i.current,x=k&&(k.tagName==="INPUT"||k.tagName==="TEXTAREA"),S=i.current;g()&&!o&&(E?u(E):k?x?(u(S.value),w==="cut"&&(S.value="")):u(k.innerText):p("Both the ref & text were undefined"))},[o,u,p]);return{ref:i,isCoppied:s,clipboard:d,clearClipboard:m,isSupported:g,copy:b,cut:y}},hi={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536,"3xl":1920},Me=(e="lg")=>{const[t,n]=c.useState(!1);return c.useEffect(()=>{const o=()=>{const l=window.matchMedia(`(min-width: ${hi[e]+1}px)`).matches;n(l)};return o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[]),t};function so(e){return r.jsx(A.Tooltip,{...e,tooltipClassName:"!text-red-500 bg-red-50",children:e.children})}function me({title:e,error:t,tooltip:n}){const o=t instanceof Error?t.message:t;console.error("ErrorView",t);const l=r.jsxs("div",{className:"flex items-center m-2",children:[r.jsx(A.ErrorIcon,{size:"small",color:"error"}),r.jsxs("div",{className:"pl-2",children:[e&&r.jsx(A.Typography,{variant:"body2",className:"font-medium",children:e}),r.jsx(A.Typography,{variant:"body2",children:o})]})]});return n?r.jsx(so,{title:n,children:l}):l}function ht(){return r.jsx("div",{className:"rounded-full bg-gray-200 bg-opacity-30 dark:bg-opacity-20 w-5 h-2 inline-block"})}const pi=40,mi=100,bi=200;function pt(e){if(e==="tiny")return pi;if(e==="small")return mi;if(e==="medium")return bi;throw Error("Thumbnail size not mapped")}function Ke(e){switch(e){case"xs":case"s":return"tiny";case"m":return"small";case"l":case"xl":return"medium";default:throw Error("Missing mapping value in getPreviewSizeFrom: "+e)}}function ao({size:e,url:t}){const[n,o]=c.useState(!1),l=c.useMemo(()=>pt(e),[e]);if(e==="tiny")return r.jsx("img",{src:t,className:"rounded-md",style:{position:"relative",objectFit:"cover",width:l,height:l,maxHeight:"100%"}},"tiny_image_preview_"+t);const i={maxWidth:"100%",maxHeight:"100%"};return r.jsxs("div",{className:"relative flex items-center justify-center max-w-full max-h-full",style:{width:l,height:l},onMouseEnter:()=>o(!0),onMouseMove:()=>o(!0),onMouseLeave:()=>o(!1),children:[r.jsx("img",{src:t,className:"rounded-md",style:i}),n&&r.jsxs(r.Fragment,{children:[navigator&&r.jsx(A.Tooltip,{title:"Copy url to clipboard",children:r.jsx("div",{className:"rounded-full absolute bottom-[-4px] right-8",children:r.jsx(A.IconButton,{variant:"filled",size:"small",onClick:s=>(s.stopPropagation(),s.preventDefault(),navigator.clipboard.writeText(t)),children:r.jsx(A.ContentCopyIcon,{className:"text-gray-500",size:"small"})})})}),r.jsx(A.Tooltip,{title:"Open image in new tab",children:r.jsx(A.IconButton,{variant:"filled",component:"a",style:{position:"absolute",bottom:-4,right:-4},href:t,rel:"noopener noreferrer",target:"_blank",size:"small",onClick:s=>s.stopPropagation(),children:r.jsx(A.OpenInNewIcon,{className:"text-gray-500",size:"small"})})})]})]},"image_preview_"+t)}function Nt({url:e,previewType:t,size:n,hint:o}){return t?t==="image"?r.jsx(ao,{url:e,size:n}):t==="audio"?r.jsxs("audio",{controls:!0,src:e,children:["Your browser does not support the",r.jsx("code",{children:"audio"})," element."]}):t==="video"?r.jsx("video",{className:`max-w-${n==="small"?"sm":"md"}`,controls:!0,children:r.jsx("source",{src:e})}):r.jsxs("a",{href:e,rel:"noopener noreferrer",target:"_blank",onClick:l=>l.stopPropagation(),className:"flex flex-col items-center justify-center",style:{width:pt(n),height:pt(n)},children:[r.jsx(A.DescriptionIcon,{className:"flex-grow"}),o&&r.jsx(A.Tooltip,{title:o,children:r.jsx(A.Typography,{className:"max-w-full truncate rtl text-left",variant:"caption",children:o})})]}):!e||!e.trim()?r.jsx(ht,{}):r.jsxs("a",{className:"flex gap-4 break-words items-center font-medium text-primary visited:text-primary dark:visited:text-primary dark:text-primary",href:e,rel:"noopener noreferrer",onMouseDown:l=>{l.preventDefault()},target:"_blank",children:[r.jsx(A.OpenInNewIcon,{size:"small"}),e]})}function mt({property:e,size:t}){e||console.error("No property assigned for skeleton component",e,t);let n;if(e.dataType==="string"){const o=e;o.url?n=Bi(o,t):o.storage?n=Gr(t):n=$e()}else if(e.dataType==="array"){const o=e;o.of&&(Array.isArray(o.of)?n=r.jsxs(r.Fragment,{children:[o.of.map((l,i)=>Vr(l,i))," "]}):o.of.dataType==="map"&&o.of.properties?n=vi(o.of.properties,t,o.of.previewProperties):o.of.dataType==="string"?o.of.enumValues?n=Ci():o.of.storage?n=Vr(o.of):n=wi():n=Vr(o.of))}else e.dataType==="map"?n=yi(e,t):e.dataType==="date"?n=$e():e.dataType==="reference"?n=Ei():(e.dataType,n=$e());return n||null}function yi(e,t){if(!e.properties)return r.jsx(r.Fragment,{});let n;return t==="medium"?n=Object.keys(e.properties):(n=e.previewProperties||Object.keys(e.properties),t==="small"?n=n.slice(0,3):t==="tiny"&&(n=n.slice(0,1))),t!=="medium"?r.jsx("div",{className:"w-full flex flex-col space-y-4",children:n.map((o,l)=>r.jsx("div",{children:e.properties&&e.properties[o]&&r.jsx(mt,{property:e.properties[o],size:"small"})},`map_${o}`))}):r.jsx("table",{className:"table-auto",children:r.jsx("tbody",{children:n&&n.map((o,l)=>r.jsxs("tr",{className:"border-b last:border-b-0",children:[r.jsx("th",{className:"align-top",style:{width:"30%"},children:r.jsx("p",{className:"text-xs text-secondary",children:e.properties[o].name})},`table-cell-title--${o}`),r.jsx("th",{style:{width:"70%"},children:e.properties&&e.properties[o]&&r.jsx(mt,{property:e.properties[o],size:"small"})},`table-cell-${o}`)]},`map_preview_table__${l}`))})})}function vi(e,t,n){let o=n;return(!o||!o.length)&&(o=Object.keys(e),t&&(o=o.slice(0,3))),r.jsx("table",{className:"table-auto",children:r.jsx("tbody",{children:[0,1,2].map((l,i)=>r.jsx("tr",{children:o&&o.map(s=>r.jsx("th",{children:r.jsx(mt,{property:e[s],size:"small"})},`table-cell-${s}`))},`table_${l}_${i}`))})})}function wi(){return r.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((e,t)=>$e(t))})}function Ci(){return r.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((e,t)=>r.jsx(r.Fragment,{children:$e(t)}))})}function Vr(e,t=0){return r.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((n,o)=>r.jsx(r.Fragment,{children:r.jsx(mt,{property:e,size:"small"},`i_${o}`)}))},"array_index_"+t)}function Gr(e){const t=e==="tiny"?40:e==="small"?100:200;return r.jsx(A.Skeleton,{width:t,height:t})}function Ei(){return r.jsx(A.Skeleton,{width:200,height:100})}function Bi(e,t="medium"){return typeof e.url=="boolean"?r.jsxs("div",{style:{display:"flex"},children:[Yr(),$e()]}):ki(t)}function ki(e){return r.jsx("div",{className:`w-${pt(e)} h-${pt(e)}`,children:Yr()})}function $e(e,t=120){return r.jsx(A.Skeleton,{width:t},`skeleton_${e}`)}function xi(e){return r.jsx(A.Skeleton,{height:20})}function Yr(){return r.jsx(A.Skeleton,{width:24,height:24})}const co=c.memo(fo,Si);function Si(e,t){return e.size===t.size&&e.storagePathOrDownloadUrl===t.storagePathOrDownloadUrl&&e.storeUrl===t.storeUrl}const Ao={};function fo({storeUrl:e,storagePathOrDownloadUrl:t,size:n}){const[o,l]=c.useState(void 0),i=ut(),[s,a]=c.useState(Ao[t]);if(c.useEffect(()=>{if(!t)return;let g=!1;return i.getDownloadURL(t).then(function(p){g||(a(p),Ao[t]=p)}).catch(l),()=>{g=!0}},[t]),!t)return null;const d=s?.metadata?Ii(s?.metadata.contentType):void 0,f=d?.startsWith("image")?"image":d?.startsWith("video")?"video":d?.startsWith("audio")?"audio":"file";return s?.fileNotFound?r.jsx(me,{error:"File not found"}):s?.url?r.jsx(Nt,{previewType:f,url:s.url,size:n,hint:t}):Gr(n)}function Ii(e){return e.startsWith("image")?"image/*":e.startsWith("video")?"video/*":e.startsWith("audio")?"audio/*":e.startsWith("application")?"application/*":e.startsWith("text")?"text/*":e.startsWith("font")?"font/*":e}function Be({enumValues:e,enumKey:t,size:n,className:o,children:l}){if(!e)return null;const i=He(e),s=t!==void 0?_t(i,t):void 0,a=Mn(s),d=Qn(i,t);return r.jsxs(A.Chip,{className:o,colorScheme:d,error:!a,outlined:!1,size:n,children:[l,!l&&(a!==void 0?a:String(t))]})}function zr({propertyKey:e,value:t,property:n,size:o}){if(n.enumValues){const l=t,i=Cr(n);return r.jsx(Be,{enumKey:l,enumValues:i.enumValues,size:o!=="medium"?"small":"medium"})}else if(n.previewAsTag){const l=Pn(e??"");return r.jsx(te,{children:r.jsx(A.Chip,{colorScheme:l,size:o!=="medium"?"small":"medium",children:t})})}else{if(n.url)return r.jsx(Nt,{size:o,url:t,previewType:typeof n.url=="string"?n.url:void 0});{if(!t)return r.jsx(r.Fragment,{});const l=t.split(`
|
|
67
2
|
`);return t&&t.includes(`
|
|
68
|
-
`)?n.jsx("div",{children:l.map((a,s)=>n.jsxs(f.Fragment,{children:[n.jsx("span",{children:a}),s!==l.length-1&&n.jsx("br",{})]},`string_preview_${s}`))}):n.jsx(n.Fragment,{children:t})}}}function Jc({propertyKey:e,value:t,property:c,size:i,entity:l}){const a=re(),s=un({propertyKey:e,property:c,propertyValue:t,fields:a.fields});if(Array.isArray(s?.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(s?.dataType!=="array"||!s.of||s.of.dataType!=="map")throw Error("Picked wrong preview component ArrayOfMapsPreview");const d=s.of,u=d.properties;if(!u)throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${e}`);const A=t,_=d.previewProperties;if(!A)return null;let g=_;return(!g||!g.length)&&(g=Object.keys(u),i&&(g=g.slice(0,3))),n.jsx("div",{className:"table-auto text-xs",children:n.jsx("div",{children:A&&A.map((y,h)=>n.jsx("div",{className:"border-b last:border-b-0",children:g&&g.map(I=>n.jsx("div",{className:"table-cell",children:n.jsx(se,{children:n.jsx(Ke,{propertyKey:I,value:y[I],property:u[I],entity:l,size:"small"})})},`table-cell-${I}`))},`table_${y}_${h}`))})})}function Nr({propertyKey:e,value:t,property:c,entity:i,size:l}){const a=re(),s=un({propertyKey:e,property:c,propertyValue:t,fields:a.fields});if(!s.of)throw Error(`You need to specify an 'of' prop (or specify a custom field) in your array property ${e}`);if(s.dataType!=="array")throw Error("Picked wrong preview component ArrayPreview");const d=t;if(!d)return null;const u=l==="medium"?"small":"tiny";return n.jsx("div",{className:"flex flex-col",children:d&&d.map((A,_)=>{const g=s.resolvedProperties[_]??s.resolvedProperties[_]??(Array.isArray(s.of)?s.of[_]:s.of);return g?n.jsx(f.Fragment,{children:n.jsx("div",{className:E(ue,"m-1 border-b last:border-b-0"),children:n.jsx(se,{children:n.jsx(Ke,{propertyKey:e,entity:i,value:A,property:g,size:u})})})},"preview_array_"+_):null})})}const on=ce.memo(function(t){const c=t.reference;return c instanceof Je?n.jsx(OG,{...t}):(console.warn("Reference preview received value of type",typeof c),n.jsx(Co,{onClick:t.onClick,size:t.size,children:n.jsx(pe,{error:"Unexpected value. Click to edit",tooltip:JSON.stringify(c)})}))},TG);function TG(e,t){return e.disabled===t.disabled&&e.size===t.size&&e.onHover===t.onHover&&e.reference?.id===t.reference?.id&&e.reference?.path===t.reference?.path&&e.allowEntityNavigation===t.allowEntityNavigation}function OG({disabled:e,reference:t,previewProperties:c,size:i,onHover:l,onClick:a,allowEntityNavigation:s=!0}){const d=re(),u=Ae(),A=Cn(),_=u.getCollection(t.path);if(!_)throw Error(`Couldn't find the corresponding collection view for the path: ${t.path}`);const{entity:g,dataLoading:y,dataLoadingError:h}=sr({path:t.path,entityId:t.id,collection:_,useCache:!0});g&&Zc.set(t.pathWithId,g);const I=g??Zc.get(t.pathWithId),b=f.useMemo(()=>Me({collection:_,path:t.path,values:I?.values,fields:d.fields}),[_]),p=f.useMemo(()=>Oi(b,d.fields,c,i==="small"||i==="medium"?3:1),[c,b,i]);let w;return b?(t?I&&!I.values?w=n.jsx(pe,{error:"Reference does not exist",tooltip:t.path}):w=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex flex-col flex-grow w-full max-w-[calc(100%-52px)] m-1",children:[i!=="tiny"&&(t?n.jsx("div",{className:`${i!=="medium"?"block whitespace-nowrap overflow-hidden truncate":""}`,children:n.jsx(j,{variant:"caption",className:"font-mono",children:t.id})}):n.jsx(Ve,{})),p&&p.map(k=>{const K=b.properties[k];return K?n.jsx("div",{className:p.length>1?"my-0.5":"my-0",children:I?n.jsx(Ke,{propertyKey:k,value:dn(I.values,k),property:K,entity:I,size:"tiny"}):n.jsx(Dn,{property:K,size:"tiny"})},"ref_prev_"+k):null})]}),n.jsx("div",{className:`my-${i==="tiny"?2:4}`,children:!e&&I&&s&&n.jsx(ye,{title:`See details for ${I.id}`,children:n.jsx(ee,{color:"inherit",size:"small",onClick:k=>{k.stopPropagation(),d.onAnalyticsEvent?.("entity_click_from_reference",{path:I.path,entityId:I.id}),A.open({entityId:I.id,path:I.path,collection:b,updateUrl:!0})},children:n.jsx(ko,{size:"small"})})})})]}):w=n.jsx(pe,{error:"Reference not set"}),n.jsx(Co,{onClick:e?void 0:a,onHover:e?void 0:l,size:i,children:w})):n.jsx(pe,{error:"Could not find collection with id "+b})}function Co({children:e,onHover:t,size:c,onClick:i}){return n.jsx(j,{variant:"label",className:E("bg-opacity-70 bg-gray-100 dark:bg-gray-800 dark:bg-opacity-60","w-full","flex","rounded-md","overflow-hidden",t?"hover:bg-opacity-90 dark:hover:bg-opacity-90":"",c==="medium"?"p-2":"p-1",c==="tiny"?"items-center":"","transition-colors duration-300 ease-in-out ",i?"cursor-pointer":""),style:{tabindex:0},onClick:l=>{i&&(l.preventDefault(),i(l))},children:e})}const Zc=new Map;function Xc({propertyKey:e,value:t,property:c,size:i}){const l=re(),a=un({propertyKey:e,property:c,propertyValue:t,fields:l.fields});if(Array.isArray(a?.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(a?.dataType!=="array"||!a.of||a.of.dataType!=="reference")throw Error("Picked wrong preview component ArrayOfReferencesPreview");const s=i==="medium"?"small":"tiny";return n.jsx("div",{className:"flex flex-col w-full",children:t&&t.map((d,u)=>{const A=a.of;return n.jsx("div",{className:"mt-1 mb-1 w-full",children:n.jsx(on,{disabled:!A.path,previewProperties:A.previewProperties,size:s,reference:d})},`preview_array_ref_${e}_${u}`)})})}function xc({propertyKey:e,entity:t,value:c,property:i,size:l}){const a=re(),s=un({propertyKey:e,property:i,propertyValue:c,fields:a.fields});if(Array.isArray(s.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(s.dataType!=="array"||!s.of||s.of.dataType!=="string")throw Error("Picked wrong preview component ArrayOfStorageComponentsPreview");const d=l==="medium"?"small":"tiny";return n.jsx("div",{className:"flex flex-wrap gap-2",children:c&&c.map((u,A)=>n.jsx(se,{children:n.jsx(Ke,{propertyKey:e,value:u,entity:t,property:s.of,size:d})},`preview_array_storage_${e}_${A}`))})}function Mr({name:e,value:t,enumValues:c,size:i}){return n.jsx("div",{className:"flex flex-wrap gap-1.5",children:t&&t.map((l,a)=>n.jsx(se,{children:n.jsx(Ee,{enumKey:l,enumValues:c,size:i!=="medium"?"small":"medium"})},`preview_array_ref_${e}_${a}`))})}function Tr({propertyKey:e,value:t,property:c,size:i}){if(c.dataType!=="array")throw Error("Picked wrong preview component ArrayEnumPreview");const l=c.of;if(!l.enumValues)throw Error("Picked wrong preview component ArrayEnumPreview");return t?n.jsx(Mr,{name:e,value:t,enumValues:l.enumValues,size:i}):null}function Rc({propertyKey:e,value:t,property:c,entity:i,size:l}){const a=re(),s=un({propertyKey:e,property:c,propertyValue:t,fields:a.fields});if(Array.isArray(s.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(!s.of||s.dataType!=="array"||s.of.dataType!=="string")throw Error("Picked wrong preview component ArrayOfStringsPreview");if(t&&!Array.isArray(t))return n.jsx("div",{children:`Unexpected value: ${t}`});const d=s.of;return n.jsx("div",{className:"flex flex-col gap-2",children:t&&t.map((u,A)=>n.jsx("div",{children:n.jsx(se,{children:n.jsx(Dr,{propertyKey:e,property:d,value:u,entity:i,size:l})})},`preview_array_strings_${e}_${A}`))})}const to="type",So="value";function ei({propertyKey:e,value:t,property:c,size:i,entity:l}){const a=re(),s=un({propertyKey:e,property:c,propertyValue:t,fields:a.fields});if(s?.dataType!=="array")throw Error("Picked wrong preview component ArrayPreview");if(!s?.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${e}`);const d=t;if(!d)return null;const u=i==="medium"?"small":"tiny",A=s.oneOf.typeField??to,_=s.oneOf.valueField??So,g=s.oneOf.properties;return n.jsx("div",{className:"flex flex-col",children:d&&d.map((y,h)=>n.jsx(f.Fragment,{children:n.jsx("div",{className:E(ue,"m-1 border-b last:border-b-0"),children:n.jsx(se,{children:y&&n.jsx(Ke,{propertyKey:e,value:y[_],entity:l,property:s.resolvedProperties[h]??g[y[A]],size:u})})})},"preview_array_"+y+"_"+h))})}function ni({propertyKey:e,value:t,property:c,entity:i,size:l}){if(c.dataType!=="map")throw Error("Picked wrong preview component MapPropertyPreview");const a=c;if(e==="result.suggestions"&&console.log({propertyKey:e,property:c,value:t}),!a.properties||Object.keys(a.properties??{}).length===0)return n.jsx(Or,{value:t});if(!t)return null;const s=Object.keys(a.properties);return l!=="medium"?n.jsx("div",{className:"w-full flex flex-col space-y-1 md:space-y-2",children:s.map((d,u)=>n.jsx("div",{children:n.jsx(se,{children:n.jsx(Ke,{propertyKey:d,value:t[d],property:a.properties[d],entity:i,size:l})},"map_preview_"+a.name+d+u)},`map_${d}`))}):n.jsx("div",{className:"flex flex-col gap-1 w-full",children:s&&s.map((d,u)=>{const A=a.properties[d];return n.jsxs("div",{className:E(ue,"last:border-b-0 border-b"),children:[n.jsxs("div",{className:"flex flex-row pt-0.5 pb-0.5 gap-2",children:[n.jsx("div",{className:"min-w-[140px] w-[25%] py-1",children:n.jsx(j,{variant:"caption",className:"font-mono break-words",color:"secondary",children:A.name})}),n.jsx("div",{className:"flex-grow max-w-[75%]",children:n.jsx(se,{children:!(A.dataType==="map"||A==="array")&&n.jsx(Ke,{propertyKey:d,value:t[d],property:A,entity:i,size:l})})})]}),(A.dataType==="map"||A==="array")&&n.jsx("div",{className:E(ue,"border-l pl-4 ml-2 my-2"),children:n.jsx(Ke,{propertyKey:d,value:t[d],property:A,entity:i,size:l})})]},`map_preview_table_${d}}`)})})}function Or({value:e}){return typeof e!="object"?null:n.jsx("div",{className:"flex flex-col gap-1 w-full",children:Object.entries(e).map(([t,c])=>n.jsxs("div",{className:E(ue,"last:border-b-0 border-b"),children:[n.jsxs("div",{className:"flex flex-row pt-0.5 pb-0.5 gap-2",children:[n.jsx("div",{className:"min-w-[140px] w-[25%] py-1",children:n.jsx(j,{variant:"caption",className:"font-mono break-words",color:"secondary",children:t})},`table-cell-title-${t}-${t}`),n.jsx("div",{className:"flex-grow max-w-[75%]",children:typeof c!="object"&&n.jsx(j,{children:n.jsx(se,{children:c&&c.toString()})})})]}),typeof c=="object"&&n.jsx("div",{className:E(ue,"border-l pl-4"),children:n.jsx(Or,{value:c})})]},`map_preview_table_${t}}`))})}const oi="MMMM dd, yyyy, HH:mm:ss";function ri({date:e}){const t=re(),c=t?.locale?Ut[t?.locale]:void 0,i=t?.dateTimeFormat??oi,l=e?Sa(e,i,{locale:c}):"";return n.jsx(n.Fragment,{children:l})}const LG={large:"w-6 h-6 rounded flex items-center justify-center",medium:"w-5 h-5 rounded flex items-center justify-center",small:"w-4 h-4 rounded flex items-center justify-center"},QG={medium:"w-10 h-10",small:"w-8 h-8",large:"w-12 h-12"},Lr=({checked:e,indeterminate:t=!1,disabled:c,size:i="medium",onCheckedChange:l})=>{const a=t?!1:e;return n.jsx("div",{className:E(QG[i],"inline-flex items-center justify-center p-2 text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150",l?"rounded-full hover:bg-gray-200 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75":"",l?"cursor-pointer":"cursor-default"),children:n.jsx(Ht.Root,{asChild:!0,checked:a,disabled:c,onCheckedChange:c?void 0:l,children:n.jsx("div",{className:E("border-2 relative transition-colors ease-in-out duration-150",LG[i],c?"bg-gray-400 dark:bg-gray-600":a?"bg-primary":"bg-white dark:bg-gray-900",a?"text-gray-100 dark:text-gray-900":"",c||a?"border-transparent":"border-gray-800 dark:border-gray-200"),children:n.jsx(Ht.Indicator,{asChild:!0,children:t?n.jsx("div",{className:"w-full h-[1px] bg-currentColor"}):n.jsx(r,{iconKey:"check",size:20,className:"absolute"})})})})})};function ti({value:e}){return n.jsx(Lr,{checked:e})}function ci({value:e,property:t,size:c}){if(t.enumValues){const i=e,l=sn(t.enumValues);return l?n.jsx(Ee,{enumKey:i,enumValues:l,size:c!=="medium"?"small":"medium"}):n.jsx(n.Fragment,{children:e})}else return n.jsx(n.Fragment,{children:e})}function Ke(e){const t=re();let c;const{property:i,propertyKey:l,value:a,size:s,height:d,width:u,entity:A}=e,_=Te({propertyKey:l,propertyOrBuilder:i,propertyValue:a,fields:t.fields});if(a===void 0||_===null)c=n.jsx(Fn,{});else if(_.Preview)c=f.createElement(_.Preview,{propertyKey:l,value:a,property:_,size:s,height:d,width:u,entity:A,customProps:_.customProps});else if(a===null)c=n.jsx(Fn,{});else if(_.dataType==="string"){const g=_;typeof a=="string"?g.url?typeof g.url=="boolean"?c=n.jsx(ro,{size:e.size,url:a}):typeof g.url=="string"&&(c=n.jsx(ro,{size:e.size,url:a,previewType:g.url})):g.storage?c=n.jsx(zc,{storeUrl:_.storage?.storeUrl??!1,size:e.size,storagePathOrDownloadUrl:a}):g.markdown?c=n.jsx(co,{source:a}):c=n.jsx(Dr,{...e,property:g,value:a}):c=gn(l,_.dataType,a)}else if(_.dataType==="array")if(a instanceof Array){const g=_;if(!g.of&&!g.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${l}`);g.of?Array.isArray(g.of)?c=n.jsx(Nr,{...e,value:a,property:_}):g.of.dataType==="map"?c=n.jsx(Jc,{propertyKey:l,property:_,value:a,entity:A,size:s}):g.of.dataType==="reference"?c=n.jsx(Xc,{...e,value:a,property:_}):g.of.dataType==="string"?g.of.enumValues?c=n.jsx(Tr,{...e,value:a,property:_}):g.of.storage?c=n.jsx(xc,{...e,value:a,property:_}):c=n.jsx(Rc,{...e,value:a,property:_}):g.of.dataType==="number"&&g.of.enumValues?c=n.jsx(Tr,{...e,value:a,property:_}):c=n.jsx(Nr,{...e,value:a,property:_}):g.oneOf&&(c=n.jsx(ei,{...e,value:a,property:_}))}else c=gn(l,_.dataType,a);else _.dataType==="map"?typeof a=="object"?c=n.jsx(ni,{...e,property:_}):c=gn(l,_.dataType,a):_.dataType==="date"?a instanceof Date?c=n.jsx(ri,{date:a}):c=gn(l,_.dataType,a):_.dataType==="reference"?typeof _.path=="string"?a instanceof Je?c=n.jsx(on,{disabled:!_.path,previewProperties:_.previewProperties,size:e.size,onClick:e.onClick,reference:a}):c=gn(l,_.dataType,a):c=n.jsx(Fn,{}):_.dataType==="boolean"?typeof a=="boolean"?c=n.jsx(ti,{value:a}):c=gn(l,_.dataType,a):_.dataType==="number"?typeof a=="number"?c=n.jsx(ci,{...e,value:a,property:_}):c=gn(l,_.dataType,a):c=JSON.stringify(a);return c??n.jsx(Fn,{})}function gn(e,t,c){return console.warn(`Unexpected value for property ${e}, of type ${t}`,c),n.jsx(pe,{title:"Unexpected value",error:`${JSON.stringify(c)}`})}const VG=ce.memo(function({builder:t}){const[c,i]=f.useState(!0),[l,a]=f.useState(null);return f.useEffect(()=>{let s=!1;return t.then(d=>{s||(i(!1),a(d))}).catch(d=>{i(!1),console.error(d)}),()=>{s=!0}},[t]),c?n.jsx(Ve,{}):n.jsx(ce.Fragment,{children:l})}),WG=new Gt({html:!0}),co=f.memo(function({source:t,className:c}){const i=f.useMemo(()=>WG.render(typeof t=="string"?t:""),[t]);return n.jsx("div",{className:c,dangerouslySetInnerHTML:{__html:i}})},de),ii=(e,...t)=>({...t.reduce((c,i)=>({...c,[i]:e[i]}),{})});function Bo(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ze(e,t){const c=Bo(e),i=c?{...e}:e;return c&&Bo(t)&&Object.keys(t).forEach(l=>{Bo(t[l])?l in e?i[l]=Ze(e[l],t[l]):Object.assign(i,{[l]:t[l]}):Object.assign(i,{[l]:t[l]})}),i}function dn(e,t){if(e&&typeof e=="object"){if(t in e)return e[t];if(t.includes(".")||t.includes("[")){let c=t.split(/[.[]/);t.includes("[")&&(c=c.map(d=>d.replace("]","")));const i=c[0],l=Array.isArray(e[i])&&!isNaN(parseInt(c[1])),a=l?e[i][parseInt(c[1])]:e[i],s=c.slice(l?2:1).join(".");return s===""?a:dn(a,s)}}}function GG(e,t){let c={...e};const i=t.split("."),l=i.pop();for(const a of i)c=c[a];return l&&delete c[l],c}function Qr(e){if(e!==void 0)return e===null?null:typeof e=="object"?Object.entries(e).filter(([t,c])=>typeof c!="function").map(([t,c])=>Array.isArray(c)?{[t]:c.map(i=>Qr(i))}:typeof c=="object"?{[t]:Qr(c)}:{[t]:c}).reduce((t,c)=>({...t,...c}),{}):e}function Vr(e){if(!e)return null;if(typeof e=="object"){if("id"in e)return e.id;if(e instanceof Date)return e.toLocaleString();if(e instanceof Br)return zt(e)}return zt(e,{ignoreUnknown:!0})}function Wr(e,t){if(typeof e=="function")return e;if(Array.isArray(e))return e.map(c=>Wr(c,t));if(typeof e=="object"){const c={};return e===null?e:(Object.keys(e).forEach(i=>{if(!Gr(e)){const l=Wr(e[i],t),a=typeof l=="string",s=!t||t&&!a||t&&a&&l!=="";l!==void 0&&!Gr(l)&&s&&(c[i]=l)}}),c)}return e}function Gr(e){return e&&Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length===0}function Nn(e){return e.readOnly||e.dataType==="date"&&e.autoValue?!0:e.dataType==="reference"?!e.path:!1}function io(e){return typeof e.disabled=="object"&&!!e.disabled.hidden}function We(e){return typeof e=="function"}function ao(e){return e?Object.entries(e).map(([t,c])=>{const i=Eo(c);return i===void 0?{}:{[t]:i}}).reduce((t,c)=>({...t,...c}),{}):{}}function Eo(e){if(!We(e))if(e.dataType==="map"&&e.properties){const t=ao(e.properties);return Object.keys(t).length===0?void 0:t}else return e.defaultValue?e.defaultValue:zr(e.dataType)}function zr(e){return e==="string"||e==="number"?null:e==="boolean"?!1:e==="date"?null:e==="array"?[]:e==="map"?{}:null}function zG({inputValues:e,properties:t,status:c,timestampNowValue:i,setDateToMidnight:l}){return Hr(e,t,(a,s)=>{if(s.dataType==="date"){let d;return c==="existing"&&s.autoValue==="on_update"||(c==="new"||c==="copy")&&(s.autoValue==="on_update"||s.autoValue==="on_create")?d=i:d=a,s.mode==="date"&&(d=l(d)),d}else return a})??{}}function HG(e,t){const c=e;return Object.entries(t).forEach(([i,l])=>{e&&e[i]!==void 0?c[i]=e[i]:l.validation?.required&&(c[i]=null)}),c}function In(e){return new Je(e.id,e.path)}function Hr(e,t,c){const i=Object.entries(t).map(([a,s])=>{const d=e&&e[a],u=Fo(d,s,c);if(u!==void 0)return{[a]:u}}).reduce((a,s)=>({...a,...s}),{}),l={...e,...i};if(Object.keys(l).length!==0)return l}function Fo(e,t,c){let i;if(t.dataType==="map"&&t.properties)i=Hr(e,t.properties,c);else if(t.dataType==="array")if(t.of&&Array.isArray(e))i=e.map(l=>Fo(l,t.of,c));else if(t.oneOf&&Array.isArray(e)){const l=t.oneOf?.typeField??to,a=t.oneOf?.valueField??So;i=e.map(s=>{if(s===null)return null;if(typeof s!="object")return s;const d=s[l],u=t.oneOf?.properties[d];return!d||!u?s:{[l]:d,[a]:Fo(s[a],u,c)}})}else i=e;else i=c(e,t);return i}function Ur(e,t){const c=e.subcollections?.map(d=>{const u=t.subcollections?.find(A=>A.path===d.path)??t.subcollections?.find(A=>A.alias===d.alias);return u?Ur(d,u):d}),i=Ze(e,t),l=e.propertiesOrder??Object.keys(e.properties),a=t.propertiesOrder??Object.keys(t.properties),s=[...new Set([...l,...a])];return{...i,subcollections:c,properties:Yr(i.properties,s)}}function UG(e,t){const c=e.map(a=>({...a,editable:!0,deletable:!0})),i=(t??[]).map(a=>{const s=c?.find(d=>d.path===a.path||d.alias&&a.alias&&d.alias===a.alias);return s?{...Ur(a,s),deletable:!1}:{...a,deletable:!1}}),l=c.filter(a=>!i.map(s=>s.path).includes(a.path)||!i.map(s=>s.alias).includes(a.alias));return[...i,...l]}function Yr(e,t){try{const c=Object.keys(e);return(t??c).map(l=>{if(e[l]){const a=e[l];return!We(a)&&a?.dataType==="map"&&a.properties?{[l]:{...a,properties:Yr(a.properties,a.propertiesOrder)}}:{[l]:a}}else return}).filter(l=>l!==void 0).reduce((l,a)=>({...l,...a}),{})}catch(c){return console.error("Error sorting properties",c),e}}function $r(e,t){if(e)return typeof e=="string"?e:e(t)}const YG=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,$G=e=>{const t=e.match(YG);return t?t.map(c=>c.toLowerCase()).join("-"):""},jG=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,qG=e=>{const t=e.match(jG);return t?t.map(c=>c.toLowerCase()).join("_"):""};function Mn(e=5){return Math.random().toString(36).slice(2,2+e)}function JG(){return Math.floor(Math.random()*16777215).toString(16)}function Po(e,t="_",c=!0){if(!e)return"";const i="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;-",l=`aaaaaeeeeeiiiiooooouuuunc${t}${t}${t}${t}${t}${t}${t}`;for(let a=0,s=i.length;a<s;a++)e=e.replace(new RegExp(i.charAt(a),"g"),l.charAt(a));return e=e.toString().replace(/\s+/g,t).replace(/&/g,t).replace(/[^\w\\-]+/g,"").replace(new RegExp("\\"+t+"\\"+t+"+","g"),t).trim().replace(/^\s+|\s+$/g,""),c?e.toLowerCase():e}const ai="::";function jr(e){return li(Xe(e))}function li(e){return e.length===1?e[0]:e.reduce((t,c)=>`${t}${ai}${c}`)}function Xe(e){return e.split("/").filter((t,c)=>c%2===0)}function ZG(e){return e?e.toString():""}function si(e){if(!e)return;const t=e.match(/\/(.*?)\/([a-z]*)?$/i);return t?new RegExp(t[1],t[2]||""):new RegExp(e,"")}function XG(e){return e.match(/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/)?!0:!!e.match(/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)/)}function Do(e,t,c,i=300){const l=f.useRef(!1),a=()=>{t(),l.current=!1},s=f.useRef(void 0);f.useEffect(()=>(l.current=!0,clearTimeout(s.current),s.current=setTimeout(a,i),()=>{c&&a()}),[c,e])}function xG(e,t=300){const[c,i]=f.useState(e);return f.useEffect(()=>{const l=setTimeout(()=>{i(e)},t);return()=>{clearTimeout(l)}},[e,t]),c}function No({name:e,addLabel:t,value:c,disabled:i=!1,buildEntry:l,small:a,onInternalIdAdded:s,includeAddButton:d,newDefaultEntry:u=null,setFieldValue:A}){return n.jsx(Pt,{droppableId:e,addLabel:t,value:c,disabled:i,buildEntry:l,size:a?"small":"medium",onInternalIdAdded:s,includeAddButton:d,newDefaultEntry:u,onValueChange:_=>A(e,_)})}function Ce({icon:e,title:t,small:c,className:i,required:l}){return n.jsxs("span",{className:`inline-flex items-center my-0.5 ${c?"gap-1":"gap-2"} ${i??""}`,children:[e,n.jsx(j,{component:"span",className:`font-medium text-${c?"base":"sm"} origin-top-left transform ${c?"translate-x-2 scale-75":""}`,children:(t??"")+(l?" *":"")})]})}function RG(e){const t=f.useRef(),[c,i]=f.useState(e.value),l=f.useDeferredValue(c);f.useEffect(()=>{i(e.value)},[e.value]),f.useEffect(()=>{!e.value&&!l||l!==e.value&&t.current&&e.onChange&&e.onChange(t.current)},[l,e.value,e.onChange]);const a=f.useCallback(s=>{t.current=s,i(s.target.value)},[]);return n.jsx(An,{...e,onChange:a,value:c})}function ez({field:e,form:t,label:c,tooltip:i,disabled:l,size:a="small",allowIndeterminate:s}){const d=n.jsx(On,{label:c,size:a,position:"start",value:e.value,disabled:l,allowIndeterminate:s,onValueChange:u=>t.setFieldValue(e.name,u)});return i?n.jsx(ye,{title:i,children:d}):d}function Se({error:e,showError:t,property:c,includeDescription:i=!0,disabled:l}){const a=c.description||c.longDescription;if(!(t&&e)&&(!i||!a))return null;if(t&&e)return n.jsx(j,{variant:"caption",className:"ml-3.5 text-red-500",children:e});const s=typeof c.disabled=="object"?c.disabled.disabledMessage:void 0;return n.jsxs("div",{className:"flex ml-3.5 mt-1",children:[n.jsx(j,{variant:"caption",color:l?"disabled":"secondary",className:"flex-grow",children:s||c.description}),c.longDescription&&n.jsx(ye,{title:c.longDescription,side:"bottom",children:n.jsx(ee,{size:"small",className:"self-start",children:n.jsx(Bc,{color:"disabled",size:"small"})})})]})}function qr({propertyKey:e,value:t,setValue:c,error:i,showError:l,disabled:a,autoFocus:s,touched:d,property:u,includeDescription:A}){const _=u.enumValues;Ne({property:u,value:t,setValue:c});const g=f.useCallback(y=>{y.stopPropagation(),y.preventDefault(),c(null)},[c]);return n.jsxs(n.Fragment,{children:[n.jsx(xe,{value:t?t.toString():"",disabled:a,position:"item-aligned",inputClassName:E("w-full"),label:n.jsx(Ce,{icon:we(u),required:u.validation?.required,title:u.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),endAdornment:u.clearable&&n.jsx(ee,{onClick:g,children:n.jsx(an,{})}),onValueChange:y=>{const h=y?u.dataType==="number"?parseFloat(y):y:null;return c(h)},renderValue:y=>n.jsx(Ee,{enumKey:y,enumValues:_,size:"medium"}),children:_&&_.map(y=>n.jsx(Re,{value:String(y.id),children:n.jsx(Ee,{enumKey:String(y.id),enumValues:_,size:"medium"})},y.id))}),n.jsx(Se,{includeDescription:A,showError:l,error:i,disabled:a,property:u})]})}function di({children:e,error:t}){return n.jsx("div",{className:E("text-sm font-medium ml-3.5 mb-1",t?"text-red-500 dark:text-red-600":"text-gray-500 dark:text-gray-300"),children:e})}function Mo(e,t,c=!0){f.useEffect(()=>{if(!c)return;function i(l){ui(l.target)||e.current&&!e.current.contains(l.target)&&t()}return document.addEventListener("mousedown",i),()=>{document.removeEventListener("mousedown",i)}},[e,c,t])}function ui(e){return e instanceof HTMLElement?e.getAttribute("role")==="presentation"?!0:ui(e.parentNode):!1}const Jr=ce.createContext({});function Zr({value:e,open:t,onMultiValueChange:c,size:i="medium",label:l,disabled:a,renderValue:s,renderValues:d,includeFocusOutline:u=!0,containerClassName:A,className:_,children:g,error:y}){const h=ce.useRef(null),I=ce.useRef(null),b=ce.useRef(null);Mo(b,()=>w(!1));const[p,w]=ce.useState(!1);f.useEffect(()=>{w(t??!1)},[t]);const k=ce.useCallback(C=>{Array.isArray(e)&&e.includes(C)?c?.(e.filter(N=>N!==C)):c?.([...e??[],C])},[e,c]),[K,m]=ce.useState(""),[v,S]=ce.useState(null),B=ce.useCallback(C=>{const N=I.current;if(N){if((C.key==="Delete"||C.key==="Backspace")&&N.value===""){const M=[...e??[]];M.pop(),c?.(M)}C.key==="Escape"&&(N.blur(),w(!1),C.stopPropagation())}},[c,e]),P=ce.useCallback(()=>{S(h.current?.getBoundingClientRect()??null),w(!0)},[]),F=v??h.current?.getBoundingClientRect(),D=window.innerHeight-(F?.top??0)-(F?.height??0)-16;return n.jsxs(n.Fragment,{children:[typeof l=="string"?n.jsx(di,{error:y,children:l}):l,n.jsxs(go.Command,{onKeyDown:B,onClick:()=>{I.current?.focus(),P()},className:E("relative overflow-visible bg-transparent",A),children:[n.jsxs("div",{ref:h,className:E("flex flex-row",i==="small"?"min-h-[42px]":"min-h-[64px]","select-none rounded-md text-sm",qe,a?en:ze,"relative flex items-center","p-4",y?"text-red-500 dark:text-red-600":"focus:text-text-primary dark:focus:text-text-primary-dark",y?"border border-red-500 dark:border-red-600":"",u?ge:"",_),children:[n.jsxs("div",{className:E("flex-grow flex gap-1.5 flex-wrap items-center"),children:[s&&(e??[]).map((C,N)=>s(C,N)),d&&d(e??[]),n.jsx(go.Command.Input,{ref:I,value:K,onValueChange:m,onFocus:P,className:"ml-2 bg-transparent outline-none flex-1 h-full w-full "})]}),n.jsx("div",{className:"px-2 h-full flex items-center",children:n.jsx(eo,{size:"small",className:E("transition ",p?"rotate-180":"")})})]}),n.jsx($e.Root,{open:p,onOpenChange:w,children:n.jsx($e.Portal,{children:n.jsx(Jr.Provider,{value:{fieldValue:e,setInputValue:m,onValueChangeInternal:k},children:n.jsx("div",{ref:b,className:"z-50 absolute overflow-auto outline-none",style:{pointerEvents:p?"auto":"none",top:(F?.top??0)+(F?.height??0),left:F?.left,width:F?.width,maxHeight:D},children:n.jsx(go.Command.Group,{className:"mt-2 text-gray-900 dark:text-white animate-in z-50 border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-800 p-2 rounded-lg shadow-lg flex flex-col outline-none w-full",children:g})})})})})]})]})}function Xr({children:e,value:t,className:c}){const i=ce.useContext(Jr);if(!i)throw new Error("MultiSelectItem must be used inside a MultiSelect");const{fieldValue:l,setInputValue:a,onValueChangeInternal:s}=i;return n.jsx(go.Command.Item,{onMouseDown:d=>{d.preventDefault(),d.stopPropagation()},onSelect:d=>{a(""),s(t)},className:E((l??[]).includes(t)?"bg-gray-200 dark:bg-gray-950":"","cursor-pointer","m-1","ring-offset-transparent","p-2 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2","aria-[selected=true]:bg-gray-100 aria-[selected=true]:dark:bg-gray-900","cursor-pointer p-2 rounded aria-[selected=true]:bg-gray-100 aria-[selected=true]:dark:bg-gray-900",c),children:e})}function xr({propertyKey:e,value:t,setValue:c,error:i,showError:l,disabled:a,property:s,includeDescription:d,autoFocus:u}){const A=s.of;if(!A)throw Error("Using wrong component ArrayEnumSelect");if(Array.isArray(A))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(A.dataType!=="string"&&A.dataType!=="number")throw Error("Field misconfiguration: array field of type string or number");const _=sn(A.enumValues);if(!_)throw console.error(s),Error("Field misconfiguration: array field of type string or number needs to have enumValues");Ne({property:s,value:t,setValue:c});const g=!!t&&Array.isArray(t),y=f.useCallback((h,I)=>{const b=h!==void 0?vo(_,h):void 0;return n.jsxs(Ee,{enumKey:h,enumValues:_,size:"medium",children:[b?.label??h,!I&&n.jsx("button",{className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",onMouseDown:p=>{p.preventDefault(),p.stopPropagation()},onClick:p=>{p.preventDefault(),p.stopPropagation(),c(t.filter(w=>w!==h))},children:n.jsx(pr,{size:"smallest"})})]},h)},[_,c,t]);return n.jsxs("div",{className:"mt-0.5 ml-0.5 mt-2",children:[n.jsx(Zr,{value:g?t.map(h=>h.toString()):[],disabled:a,label:n.jsx(Ce,{icon:we(s),required:s.validation?.required,title:s.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),renderValue:f.useCallback(h=>y(h,!1),[y]),onMultiValueChange:h=>{let I;return A&&A?.dataType==="number"?I=h?h.map(b=>parseFloat(b)):[]:I=h,c(I)},children:_.map(h=>String(h.id)).map(h=>n.jsx(Xr,{value:h,children:y(h,!0)},h))}),n.jsx(Se,{includeDescription:d,showError:l,error:i,disabled:a,property:s})]})}function fi({propertyKey:e,value:t,error:c,showError:i,disabled:l,isSubmitting:a,tableMode:s,property:d,includeDescription:u,setValue:A,setFieldValue:_}){const g=d.of;if(g.dataType!=="reference")throw Error("ArrayOfReferencesField expected a property containing references");const y=d.expanded===void 0?!0:d.expanded,[h,I]=f.useState(!1),b=t&&Array.isArray(t)?t.map(P=>P.id):[];Ne({property:d,value:t,setValue:A});const p=Ae(),w=f.useMemo(()=>g.path?p.getCollection(g.path):void 0,[g.path]);if(!w)throw Error(`Couldn't find the corresponding collection for the path: ${g.path}`);const k=f.useCallback(P=>{A(P.map(F=>In(F)))},[A]),K=xn({multiselect:!0,path:g.path,collection:w,onMultipleEntitiesSelected:k,selectedEntityIds:b,forceFilter:g.forceFilter}),m=f.useCallback(P=>{P.preventDefault(),K.open()},[K]),v=f.useCallback((P,F)=>{const D=t&&t.length>P?t[P]:void 0;return D?n.jsx("div",{onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>I(!1),children:n.jsx(on,{disabled:!g.path,previewProperties:g.previewProperties,size:"medium",onClick:m,reference:D,onHover:h})}):n.jsx("div",{children:"Internal ERROR"})},[g.path,g.previewProperties,h,t]),S=n.jsx(Ce,{icon:we(d),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark"}),B=n.jsxs(n.Fragment,{children:[!w&&n.jsx(pe,{error:"The specified collection does not exist. Check console"}),w&&n.jsxs(n.Fragment,{children:[n.jsx(No,{value:t,addLabel:d.name?"Add reference to "+d.name:"Add reference",name:e,buildEntry:v,disabled:a,setFieldValue:_,newDefaultEntry:d.of.defaultValue}),n.jsxs(te,{className:"my-4 justify-center text-left",variant:"outlined",color:"primary",disabled:a,onClick:m,children:["Edit ",d.name]})]})]});return n.jsxs(n.Fragment,{children:[!s&&n.jsx(fn,{className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",initiallyExpanded:y,title:S,children:B}),s&&B,n.jsx(Se,{includeDescription:u,showError:i,error:c,disabled:l,property:d})]})}async function nz(e,t,c,i,l,a,s,d){let u;return typeof e=="function"?(u=await e({path:l,entityId:i,values:c,property:a,file:s,storage:t,propertyKey:d}),u||console.warn("Storage callback returned empty result. Using default name value")):u=Ai(s,e,i,d,l),u||(u=Mn()+"_"+s.name),u}function oz(e,t,c,i,l,a,s,d){let u;return typeof e=="function"?(u=e({path:l,entityId:i,values:c,property:a,file:s,storage:t,propertyKey:d}),u||console.warn("Storage callback returned empty result. Using default name value")):u=Ai(s,e,i,d,l),u||(u=Mn()+"_"+s.name),u}function Ai(e,t,c,i,l){const a=e.name.split(".").pop();let s=t.replace("{entityId}",c).replace("{propertyKey}",i).replace("{rand}",Mn()).replace("{file}",e.name).replace("{file.type}",e.type).replace("{path}",l);if(a){s=s.replace("{file.ext}",a);const d=e.name.replace(`.${a}`,"");s=s.replace("{file.name}",d)}return s||(s=Mn()+"_"+e.name),s}function _i({entityId:e,entityValues:t,path:c,value:i,property:l,propertyKey:a,storageSource:s,disabled:d,onChange:u}){const A=l.dataType==="string"?l.storage:l.dataType==="array"&&l.of.dataType==="string"?l.of.storage:void 0,_=l.dataType==="array";if(!A)throw Error("Storage meta must be specified");const g=A?.metadata,y=_?"small":"medium",h=A?.imageCompression,I=(_?i??[]:i?[i]:[]).map(B=>({id:Rr(),storagePathOrDownloadUrl:B,metadata:g,size:y})),[b,p]=f.useState(i),[w,k]=f.useState(I);f.useEffect(()=>{de(b,i)||(p(i),k(I))},[I,i,b]);const K=f.useCallback(async B=>{if(A.fileName){const P=await nz(A.fileName,A,t,e,c,l,B,a);if(!P||P.length===0)throw Error("You need to return a valid filename");return P}return Mn()+"_"+B.name},[e,t,c,l,a,A]),m=f.useCallback(B=>oz(A.storagePath,A,t,e,c,l,B,a)??"/",[e,t,c,l,a,A]),v=f.useCallback(async(B,P,F)=>{console.debug("onFileUploadComplete",B,P);let D=B;if(A.storeUrl&&(D=(await s.getDownloadURL(B)).url),A.postProcess&&D&&(D=await A.postProcess(D)),!D){console.warn("uploadPathOrDownloadUrl is null");return}let C;P.storagePathOrDownloadUrl=D,P.metadata=F,C=[...w],C=yi(C),k(C);const N=C.filter(M=>!!M.storagePathOrDownloadUrl).map(M=>M.storagePathOrDownloadUrl);u(_?N:N?N[0]:null)},[w,_,u,A,s]),S=f.useCallback(async B=>{if(!B.length||d)return;let P;if(_)P=[...w,...await Promise.all(B.map(async F=>(h&&et(F)&&(F=await gi(F,h)),{id:Rr(),file:F,fileName:await K(F),metadata:g,size:y})))];else{let F=B[0];h&&et(F)&&(F=await gi(F,h)),P=[{id:Rr(),file:F,fileName:await K(F),metadata:g,size:y}]}P=yi(P),k(P)},[d,K,w,g,_,y]);return{internalValue:w,setInternalValue:k,storage:A,fileNameBuilder:K,storagePathBuilder:m,onFileUploadComplete:v,onFilesAdded:S,multipleFilesSupported:_}}function yi(e){return e.filter((t,c)=>(e.map(i=>i.storagePathOrDownloadUrl).indexOf(t.storagePathOrDownloadUrl)===c||!t.storagePathOrDownloadUrl)&&(e.map(i=>i.file).indexOf(t.file)===c||!t.file))}function Rr(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}const hi={"image/jpeg":"JPEG","image/png":"PNG","image/webp":"WEBP"},et=e=>hi[e.type]?hi[e.type]:null,rz=100,gi=(e,t)=>new Promise(c=>{const i=t.quality===void 0?rz:t.quality,l=i>=0&&i<=100?i:100,a=et(e);if(!a)throw Error("resizeAndCompressImage: Unsupported image format");Ea.imageFileResizer(e,t.maxWidth||Number.MAX_VALUE,t.maxHeight||Number.MAX_VALUE,a,l,0,s=>c(s),"file")});function Ii({storagePath:e,entry:t,metadata:c,onFileUploadComplete:i,imageSize:l,simple:a}){const s=Sn(),d=cn(),[u,A]=f.useState(),[_,g]=f.useState(!1),y=f.useRef(!1),h=f.useRef(!1),I=f.useCallback((b,p)=>{h.current||(h.current=!0,A(void 0),g(!0),s.uploadFile({file:b,fileName:p,path:e,metadata:c}).then(async({path:w})=>{console.debug("Upload successful"),await i(w,t,c),y.current&&g(!1)}).catch(w=>{console.warn("Upload error",w),y.current&&(A(w),g(!1),d.open({type:"error",message:"Error uploading file: "+w.message}))}).finally(()=>{h.current=!1}))},[t,c,i,s,e]);return f.useEffect(()=>(y.current=!0,t.file&&I(t.file,t.fileName),()=>{y.current=!1}),[t.file,t.fileName,I]),a?n.jsx("div",{className:`m-4 w-${l} h-${l}`,children:_&&n.jsx(Ve,{className:`w-${l} h-${l}`})}):n.jsxs("div",{className:E(He,"relative m-4 border-box flex items-center justify-center",`min-w-[${l}px] min-h-[${l}px]`),children:[_&&n.jsx(Ve,{className:"w-full h-full"}),u&&n.jsx(pe,{title:"Error uploading file",error:u})]})}function bi({name:e,property:t,value:c,entity:i,onRemove:l,disabled:a,size:s}){return n.jsxs("div",{className:E(He,"relative m-4 border-box flex items-center justify-center",s==="medium"?"min-w-[220px] min-h-[220px] max-w-[220px]":"min-w-[118px] min-h-[118px] max-w-[118px]"),children:[!a&&n.jsx("div",{className:"absolute rounded-full -top-2 -right-2 z-10 bg-white dark:bg-gray-900",children:n.jsx(ye,{title:"Remove",children:n.jsx(ee,{size:"small",onClick:d=>{d.stopPropagation(),l(c)},children:n.jsx(oo,{size:"small"})})})}),c&&n.jsx(se,{children:n.jsx(Ke,{propertyKey:e,value:c,property:t,entity:i,size:s})})]})}const tz="box-border relative pt-[2px] items-center border border-transparent min-h-[254px] outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",cz="border-dotted-gray",iz="hover:bg-field-hover dark:hover:bg-field-hover-dark",az="pt-0 border-2 border-solid",lz="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500",sz="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500";function nt({propertyKey:e,value:t,setValue:c,error:i,showError:l,autoFocus:a,tableMode:s,property:d,includeDescription:u,context:A,isSubmitting:_}){if(!A.entityId)throw new Error("StorageUploadFieldBinding: Entity id is null");const g=Sn(),y=Nn(d)||!!d.disabled||_,{internalValue:h,setInternalValue:I,onFilesAdded:b,storage:p,onFileUploadComplete:w,storagePathBuilder:k,multipleFilesSupported:K}=_i({entityValues:A.values,entityId:A.entityId,path:A.path,property:d,propertyKey:e,value:t,storageSource:g,disabled:y,onChange:c});Ne({property:d,value:t,setValue:c});const m={id:A.entityId,values:A.values,path:A.path};return n.jsxs(n.Fragment,{children:[!s&&n.jsx(Ce,{icon:we(d),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),n.jsx(uz,{value:h,name:e,disabled:y,autoFocus:a,property:d,onChange:c,setInternalValue:I,onFilesAdded:b,entity:m,onFileUploadComplete:w,storagePathBuilder:k,storage:p,multipleFilesSupported:K}),n.jsx(Se,{includeDescription:u,showError:l,error:i,disabled:y,property:d})]})}function dz({storage:e,disabled:t,isDraggingOver:c,onFilesAdded:i,multipleFilesSupported:l,droppableProvided:a,autoFocus:s,internalValue:d,property:u,entity:A,onClear:_,metadata:g,storagePathBuilder:y,onFileUploadComplete:h,size:I,name:b,helpText:p}){const w=cn(),{getRootProps:k,getInputProps:K,isDragActive:m,isDragAccept:v,isDragReject:S}=er.useDropzone({accept:e.acceptedFiles?e.acceptedFiles.map(B=>({[B]:[]})).reduce((B,P)=>({...B,...P}),{}):void 0,disabled:t||c,noDragEventsBubbling:!0,maxSize:e.maxSize,onDrop:i,onDropRejected:(B,P)=>{for(const F of B)for(const D of F.errors)w.open({type:"error",message:`Error uploading file: File is larger than ${e.maxSize} bytes`})}});return n.jsxs("div",{...k(),className:E(qe,t?en:ze,tz,l&&d.length?"":"flex",ge,{[iz]:!m,[az]:m,[sz]:S,[lz]:v,[cz]:t}),children:[n.jsxs("div",{...a.droppableProps,ref:a.innerRef,className:E("flex items-center p-1 no-scrollbar",l&&d.length?"overflow-auto":"",l&&d.length?"min-h-[180px]":"min-h-[250px]"),children:[n.jsx("input",{autoFocus:s,...K()}),d.map((B,P)=>{let F;return B.storagePathOrDownloadUrl?F=n.jsx(bi,{name:`storage_preview_${B.storagePathOrDownloadUrl}`,property:u,disabled:t,entity:A,value:B.storagePathOrDownloadUrl,onRemove:_,size:B.size}):B.file&&(F=n.jsx(Ii,{entry:B,metadata:g,storagePath:y(B.file),onFileUploadComplete:h,imageSize:I==="medium"?220:118,simple:!1})),n.jsx(Kn.Draggable,{draggableId:`array_field_${b}_${B.id}`,index:P,children:(D,C)=>n.jsx("div",{tabIndex:-1,ref:D.innerRef,...D.draggableProps,...D.dragHandleProps,className:E(ge,"rounded-md"),style:{...D.draggableProps.style},children:F})},`array_field_${b}_${B.id}`)}),a.placeholder]}),n.jsx("div",{className:"flex-grow min-h-[38px] box-border m-2 text-center",children:n.jsx(j,{align:"center",variant:"label",children:p})})]})}function uz({property:e,name:t,value:c,setInternalValue:i,onChange:l,multipleFilesSupported:a,onFileUploadComplete:s,disabled:d,onFilesAdded:u,autoFocus:A,storage:_,entity:g,storagePathBuilder:y}){if(a){const m=e;if(m.of){if(Array.isArray(m.of)||m.of.dataType!=="string")throw Error("Storage field using array must be of data type string")}else throw Error("Storage field using array must be of data type string")}const h=_?.metadata,I=a?"small":"medium",b=f.useCallback((m,v)=>{if(!a)return;const S=[...c],B=S[m];S.splice(m,1),S.splice(v,0,B),i(S);const P=S.filter(F=>!!F.storagePathOrDownloadUrl).map(F=>F.storagePathOrDownloadUrl);l(P)},[a,l,i,c]),p=f.useCallback(m=>{m.destination&&b(m.source.index,m.destination.index)},[b]),w=f.useCallback(m=>{if(a){const v=c.filter(S=>S.storagePathOrDownloadUrl!==m);l(v.filter(S=>!!S.storagePathOrDownloadUrl).map(S=>S.storagePathOrDownloadUrl)),i(v)}else l(null),i([])},[c,a,l]),k=a?"Drag 'n' drop some files here, or click to select files":"Drag 'n' drop a file here, or click to select one",K=a?e.of:e;return n.jsx(Kn.DragDropContext,{onDragEnd:p,children:n.jsx(Kn.Droppable,{droppableId:`droppable_${t}`,direction:"horizontal",renderClone:(m,v,S)=>{const B=c[S.source.index];return n.jsx("div",{ref:m.innerRef,...m.draggableProps,...m.dragHandleProps,style:m.draggableProps.style,className:"rounded",children:n.jsx(bi,{name:`storage_preview_${B.storagePathOrDownloadUrl}`,property:K,disabled:!0,entity:g,value:B.storagePathOrDownloadUrl,onRemove:w,size:B.size})})},children:(m,v)=>n.jsx(dz,{storage:_,disabled:d,isDraggingOver:v.isDraggingOver,droppableProvided:m,onFilesAdded:u,multipleFilesSupported:a,autoFocus:A,internalValue:c,property:K,entity:g,onClear:w,metadata:h,storagePathBuilder:y,onFileUploadComplete:s,size:I,name:t,helpText:k})})})}function To({children:e,className:t,in:c=!1,duration:i=220}){return En(`Collapse-${i}`,`
|
|
69
|
-
.CollapseContent-${i} {
|
|
70
|
-
overflow: hidden;
|
|
71
|
-
}
|
|
72
|
-
.CollapseContent-${i}[data-state='open'] {
|
|
73
|
-
animation: slideDown ${i}ms ease-out;
|
|
74
|
-
}
|
|
75
|
-
.CollapseContent-${i}[data-state='closed'] {
|
|
76
|
-
animation: slideUp ${i}ms ease-in;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@keyframes slideDown {
|
|
80
|
-
from {
|
|
81
|
-
height: 0;
|
|
82
|
-
}
|
|
83
|
-
to {
|
|
84
|
-
height: var(--radix-collapsible-content-height);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@keyframes slideUp {
|
|
89
|
-
from {
|
|
90
|
-
height: var(--radix-collapsible-content-height);
|
|
91
|
-
}
|
|
92
|
-
to {
|
|
93
|
-
height: 0;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
`),n.jsx(qn.Root,{open:c,className:t,children:n.jsx(qn.Content,{className:E(`CollapseContent-${i}`),children:e})})}function Tn({propertyKey:e,value:t,setValue:c,error:i,showError:l,disabled:a,autoFocus:s,property:d,includeDescription:u}){let A,_;d.dataType==="string"&&(A=d.multiline,_=d.url),Ne({property:d,value:t,setValue:c});const g=f.useCallback(b=>{b.stopPropagation(),b.preventDefault(),c(null)},[c]),y=b=>{if(I==="number"){const p=b.target.value?parseFloat(b.target.value):void 0;p&&isNaN(p)?c(null):p!=null?c(p):c(null)}else c(b.target.value)},h=!!A,I=d.dataType==="number"?"number":void 0;return n.jsxs(n.Fragment,{children:[n.jsx(An,{value:t,onChange:y,autoFocus:s,label:n.jsx(Ce,{icon:we(d),required:d.validation?.required,title:d.name}),type:I,multiline:h,disabled:a,endAdornment:d.clearable&&n.jsx(ee,{onClick:g,children:n.jsx(an,{})}),error:l?i:void 0,inputClassName:i?"text-red-500 dark:text-red-600":""}),n.jsx(Se,{includeDescription:u,showError:l,error:i,disabled:a,property:d}),_&&n.jsx(To,{className:"mt-1 ml-1",in:!!t,children:n.jsx(Ke,{value:t,property:d,size:"medium"})})]})}const ot=f.forwardRef(function({value:t,allowIndeterminate:c,className:i,onValueChange:l,disabled:a=!1,size:s="medium",...d},u){return n.jsxs("button",{ref:u,tabIndex:a?-1:void 0,onClick:a?void 0:A=>{A.preventDefault(),c?t==null?l?.(!0):l?.(t?!1:null):l?.(!t)},className:E(s==="small"?"w-[38px] h-[22px] min-w-[38px] min-h-[22px]":"w-[42px] h-[26px] min-w-[42px] min-h-[26px]","outline-none rounded-full relative shadow-sm",t?a?"bg-white bg-opacity-54 dark:bg-gray-950":"ring-secondary ring-1 bg-secondary dark:bg-secondary":"bg-white bg-opacity-54 dark:bg-gray-900 ring-1 ring-gray-100 dark:ring-gray-700",i),...d,children:[c&&t==null&&n.jsx("div",{className:E("block rounded-full transition-transform duration-100 transform will-change-auto",a?"bg-gray-400 dark:bg-gray-600":"bg-gray-600 dark:bg-gray-400",{"w-[21px] h-[10px]":s==="medium","w-[19px] h-[8px]":s==="small","translate-x-[10px]":s==="medium","translate-x-[9px]":s==="small"})}),!(c&&t==null)&&n.jsx("div",{className:E("block rounded-full transition-transform duration-100 transform will-change-auto",a?"bg-gray-300 dark:bg-gray-700":t?"bg-white":"bg-gray-600 dark:bg-gray-400",{"w-[21px] h-[21px]":s==="medium","w-[19px] h-[19px]":s==="small",[t?"translate-x-[19px]":"translate-x-[3px]"]:s==="medium",[t?"translate-x-[17px]":"translate-x-[2px]"]:s==="small"})})]})}),On=function({value:t,position:c="end",invisible:i,onValueChange:l,error:a,label:s,autoFocus:d,disabled:u,size:A,..._}){const g=f.useRef(null),y=f.useRef(null),[h,I]=f.useState(d),b=()=>I(!0),p=()=>I(!1);f.useEffect(()=>{},[]);const w=document.activeElement===y?.current||document.activeElement===g?.current;return n.jsxs("div",{ref:g,onFocus:b,onBlur:p,tabIndex:-1,className:E(!i&&qe,!i&&(u?en:ze),u?"cursor-default":"cursor-pointer","rounded-md relative max-w-full justify-between w-full box-border relative inline-flex items-center",!i&&w&&!u?_r:"",a?"text-red-500 dark:text-red-600":w?"text-primary":u?"text-text-secondary dark:text-text-secondary-dark":"text-text-primary dark:text-text-primary-dark",A==="small"?"min-h-[40px]":"min-h-[64px]",A==="small"?"pl-2":"pl-4",A==="small"?"pr-4":"pr-6",c==="end"?"flex-row-reverse":"flex-row"),onClick:u?void 0:k=>{_.allowIndeterminate?t==null?l?.(!0):l?.(t?!1:null):l?.(!t)},children:[n.jsx(ot,{value:t,ref:y,size:A,className:i&&w?_r:"",disabled:u,..._}),n.jsx("div",{className:E("flex-grow",c==="end"?"mr-4":"ml-4",A==="small"?"text-sm":"text-base"),children:s})]})},pi=f.forwardRef(function({propertyKey:t,value:c,setValue:i,error:l,showError:a,autoFocus:s,disabled:d,touched:u,property:A,includeDescription:_},g){return Ne({property:A,value:c,setValue:i}),n.jsxs(n.Fragment,{children:[n.jsx(On,{value:c,onValueChange:y=>i(y),error:a,label:n.jsx(Ce,{icon:we(A),required:A.validation?.required,title:A.name}),disabled:d,autoFocus:s,size:"medium"}),n.jsx(Se,{includeDescription:_,showError:a,error:l,disabled:d,property:A})]})});function wi({propertyKey:e,value:t,setValue:c,autoFocus:i,error:l,showError:a,disabled:s,touched:d,property:u,includeDescription:A}){const _=t||null;return Ne({property:u,value:t,setValue:c}),n.jsxs(n.Fragment,{children:[n.jsx(Vn,{value:_,onChange:g=>c(g),size:"medium",mode:u.mode,clearable:u.clearable,label:n.jsx(Ce,{icon:we(u),required:u.validation?.required,className:"text-text-secondary dark:text-text-secondary-dark",title:u.name})}),n.jsx(Se,{includeDescription:A,showError:a,error:l,disabled:s,property:u})]})}class se extends f.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,c){console.error(t)}render(){return this.state.error?n.jsxs("div",{className:"flex flex-col m-2",children:[n.jsxs("div",{className:"flex items-center m-2",children:[n.jsx(wr,{color:"error",size:"small"}),n.jsx("div",{className:"ml-4",children:"Error"})]}),n.jsx(j,{variant:"caption",children:this.state.error?.message??"See the error in the console"})]}):this.props.children}}function rt({propertyKey:e,value:t,error:c,showError:i,tableMode:l,property:a,includeDescription:s,context:d}){if(!d.entityId)throw new Error("ReadOnlyFieldBinding: Entity id is null");const u={id:d.entityId,values:d.values,path:d.path};return n.jsxs(n.Fragment,{children:[!l&&n.jsx(Ce,{icon:we(a),required:a.validation?.required,title:a.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),n.jsx("div",{className:E(He,"min-h-14 p-4 md:p-6"),children:n.jsx(se,{children:n.jsx(Ke,{propertyKey:e,value:t,property:a,entity:u,size:"medium"})})}),n.jsx(Se,{includeDescription:s,showError:i,error:c,property:a})]})}function ki(e){return typeof e.property.path!="string"?n.jsx(rt,{...e}):n.jsx(fz,{...e})}function fz({value:e,setValue:t,error:c,showError:i,isSubmitting:l,disabled:a,touched:s,autoFocus:d,property:u,includeDescription:A,context:_}){if(!u.path)throw new Error("Property path is required for ReferenceFieldBinding");Ne({property:u,value:e,setValue:t});const g=e&&e instanceof Je,y=Ae(),h=f.useMemo(()=>u.path?y.getCollection(u.path):void 0,[u.path]);if(!h)throw Error(`Couldn't find the corresponding collection for the path: ${u.path}`);const I=f.useCallback(w=>{t(In(w))},[t]),b=xn({multiselect:!1,path:u.path,collection:h,onSingleEntitySelected:I,selectedEntityIds:g?[e.id]:void 0,forceFilter:u.forceFilter}),p=f.useCallback(w=>{w.preventDefault(),b.open()},[b]);return n.jsxs(n.Fragment,{children:[n.jsx(Ce,{icon:we(u),required:u.validation?.required,title:u.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),!h&&n.jsx(pe,{error:"The specified collection does not exist. Check console"}),h&&n.jsxs(n.Fragment,{children:[e&&n.jsx(on,{disabled:!u.path,previewProperties:u.previewProperties,size:"medium",onClick:a||l?void 0:p,reference:e}),!e&&n.jsx("div",{className:"justify-center text-left",children:n.jsxs(te,{variant:"outlined",color:"primary",disabled:a||l,onClick:p,children:["Edit ",u.name]})})]}),n.jsx(Se,{includeDescription:A,showError:i,error:c,disabled:a,property:u})]})}const bn=f.memo(Az,(e,t)=>{if(e.propertyKey!==t.propertyKey)return!1;const c=We(e.property)||e.property.fromBuilder,i=We(t.property)||t.property.fromBuilder;return!((c===i||de(e.property,t.property))&&e.disabled===t.disabled)||Oo(t.property),!1});function Az({propertyKey:e,property:t,context:c,includeDescription:i,underlyingValueHasChanged:l,disabled:a,tableMode:s,partOfArray:d,partOfBlock:u,autoFocus:A}){const _=re(),y=Oo(t,_.plugins)?Fe.Field:Fe.FastField;return n.jsx(y,{name:e,children:h=>{let I;const b=Te({propertyKey:e,propertyValue:h.field.value,propertyOrBuilder:t,values:h.form.values,path:c.path,entityId:c.entityId,fields:_.fields});if(b===null||io(b))return n.jsx(n.Fragment,{});if(Nn(b))I=rt;else if(b.Field)typeof b.Field=="function"&&(I=b.Field);else{const w=Lo(b);if(!w)throw new Error(`INTERNAL: Could not find field config for property ${e}`);I=w.Field}if(!I)return console.warn(`No field component found for property ${e}`),console.warn("Property:",t),n.jsx("div",{children:`Currently the field ${b.dataType} is not supported`});const p={propertyKey:e,property:b,includeDescription:i,underlyingValueHasChanged:l,context:c,disabled:a,tableMode:s,partOfArray:d,partOfBlock:u,autoFocus:A};return n.jsx(_z,{Component:I,componentProps:p,fieldProps:h})}})}function _z({Component:e,componentProps:{propertyKey:t,property:c,includeDescription:i,underlyingValueHasChanged:l,tableMode:a,partOfArray:s,partOfBlock:d,autoFocus:u,context:A,disabled:_},fieldProps:g}){const{plugins:y}=re(),h=c.customProps,I=g.field.value,b=g.meta.initialValue,p=Fe.getIn(g.form.errors,t),w=Fe.getIn(g.form.touched,t),k=p&&(g.form.submitCount>0||c.validation?.unique)&&(!Array.isArray(p)||!!p.filter(F=>!!F).length),m=yz(A.path,A.collection,t,c,e,y)??e,v=g.form.isSubmitting,S=f.useCallback((F,D)=>{g.form.setFieldTouched(t,!0,!1),g.form.setFieldValue(t,F,D)},[]),B=f.useCallback((F,D,C)=>{g.form.setFieldTouched(t,!0,!1),g.form.setFieldValue(F,D,C)},[]),P={propertyKey:t,value:I,initialValue:b,setValue:S,setFieldValue:B,error:p,touched:w,showError:k,isSubmitting:v,includeDescription:i??!0,property:c,disabled:_??!1,underlyingValueHasChanged:l??!1,tableMode:a??!1,partOfArray:s??!1,partOfBlock:d??!1,autoFocus:u??!1,customProps:h,context:A};return n.jsxs(se,{children:[n.jsx(m,{...P}),l&&!v&&n.jsx(j,{variant:"caption",className:"ml-3.5",children:"This value has been updated elsewhere"})]})}const Oo=(e,t)=>{if(t?.some(l=>l.form?.fieldBuilder)||We(e))return!0;const c=e,i=!!c.Field||"fromBuilder"in c&&c.fromBuilder;return c.dataType==="map"&&c.properties?i||Object.values(c.properties).some(l=>Oo(l,t)):c.dataType==="array"&&"resolvedProperties"in c?i||c.resolvedProperties?.some(l=>l&&Oo(l,t)):i};function yz(e,t,c,i,l,a){return f.useRef((()=>{let d=null;return a&&a.forEach(u=>{const A=at(i);if(A&&u.form?.fieldBuilder){const _={fieldConfigId:A,propertyKey:c,property:i,Field:l,plugin:u,path:e,collection:t},g=u.form?.fieldBuilderEnabled?.(_);(g===void 0||g)&&(d=u.form.fieldBuilder(_)||d)}A||console.warn("INTERNAL: Field id not found for property",i)}),d})()).current}function mi({propertyKey:e,value:t,showError:c,error:i,disabled:l,property:a,setValue:s,partOfBlock:d,tableMode:u,includeDescription:A,underlyingValueHasChanged:_,autoFocus:g,context:y}){const h=a.pickOnlySomeKeys||!1,I=(a.expanded===void 0?!0:a.expanded)||g;if(!a.properties)throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${e}`);let b;h?t?b=ii(a.properties,...Object.keys(t).filter(k=>k in a.properties)):b={}:b=a.properties;const p=n.jsx(n.Fragment,{children:n.jsx("div",{className:"py-1 flex flex-col space-y-2",children:Object.entries(b).filter(([k,K])=>!io(K)).map(([k,K],m)=>{const v={propertyKey:`${e}.${k}`,disabled:l,property:K,includeDescription:A,underlyingValueHasChanged:_,context:y,tableMode:!1,partOfArray:!1,partOfBlock:!1,autoFocus:g&&m===0};return n.jsx("div",{children:n.jsx(bn,{...v})},`map-${e}-${m}`)})})}),w=n.jsx(Ce,{icon:we(a),required:a.validation?.required,title:a.name,className:"text-text-secondary dark:text-text-secondary-dark"});return n.jsxs(n.Fragment,{children:[!u&&!d&&n.jsx(fn,{initiallyExpanded:I,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",title:w,children:p}),(u||d)&&p,n.jsx(Se,{includeDescription:A,showError:c,error:i,disabled:l,property:a})]})}function vi({propertyKey:e,value:t,showError:c,error:i,disabled:l,property:a,setValue:s,tableMode:d,includeDescription:u,underlyingValueHasChanged:A,autoFocus:_,context:g}){const y=(a.expanded===void 0?!0:a.expanded)||_;if(!a.keyValue)throw Error(`Your property ${e} needs to have the 'keyValue' prop in order to use this field binding`);const h=n.jsx(tt,{value:t,setValue:s,disabled:l,fieldName:a.name??e}),I=n.jsx(Ce,{icon:we(a),required:a.validation?.required,title:a.name,className:"text-text-secondary dark:text-text-secondary-dark"});return n.jsxs(n.Fragment,{children:[!d&&n.jsx(fn,{initiallyExpanded:y,title:I,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",children:h}),d&&h,n.jsx(Se,{includeDescription:u,showError:c,error:i,disabled:l,property:a})]})}function tt({value:e,setValue:t,fieldName:c,disabled:i}){const[l,a]=f.useState(Object.keys(e??{}).map(u=>[ct(),{key:u,dataType:it(e?.[u])??"string"}]));f.useEffect(()=>{const u=l.map(([h,{key:I}])=>I),A=Object.entries(e??{}).filter(([h,I])=>I!==void 0).map(([h])=>h),_=A.filter(h=>!u.includes(h)),g=u.filter(h=>!A.includes(h)),y=[...l];_.forEach(h=>{y.push([ct(),{key:h,dataType:it(e?.[h])??"string"}])}),g.forEach(h=>{const I=y.findIndex(([b,{key:p}])=>p===h);y.splice(I,1)}),a(y)},[e]);const s=f.useRef(e??{}),d=(u,A)=>{if(!u){console.warn("No key selected for data type update");return}a(l.map(_=>_[0]===u?[_[0],{key:_[1].key,dataType:A}]:_)),t({...e??{},[l.find(_=>_[0]===u)?.[1].key??""]:zr(A)})};return n.jsxs("div",{className:"py-1 flex flex-col gap-1",children:[l.map(([u,{key:A,dataType:_}],g)=>{const y=A?e?.[A]:"",h=I=>{if(a(l.map(p=>p[0]===u?[u,{key:I??"",dataType:p[1].dataType}]:p)),typeof e=="object"&&I in e)return;const b={...e??{}};s.current&&A in s.current?b[A]=void 0:delete b[A],t({...b,[I??""]:y})};return n.jsx(hz,{rowId:u,fieldKey:A,value:e??{},onDeleteClick:()=>{const I={...e??{}};s.current&&A in s.current?I[A]=void 0:delete I[A],a(l.filter(b=>b[0]!==u)),t({...I})},onFieldKeyChange:h,setValue:t,entryValue:y,dataType:_,disabled:i,updateDataType:d},u)}),n.jsx(te,{variant:"text",size:"small",color:"primary",className:"w-full",disabled:i,startIcon:n.jsx(hn,{}),onClick:u=>{u.preventDefault(),t({...e??{},"":null}),a([...l,[ct(),{key:"",dataType:"string"}]])},children:c?`Add to ${c}`:"Add"})]})}function hz({rowId:e,fieldKey:t,value:c,onFieldKeyChange:i,onDeleteClick:l,setValue:a,entryValue:s,dataType:d,updateDataType:u,disabled:A}){function _(y,h,I){return I==="string"||I==="number"?n.jsx(An,{placeholder:"value",value:y,type:I==="number"?"number":"text",size:"small",disabled:A||!h,onChange:b=>{if(I==="number"){const p=b.target.value?parseFloat(b.target.value):void 0;p&&isNaN(p)?a({...c,[h]:null}):p!=null?a({...c,[h]:p}):a({...c,[h]:null})}else a({...c,[h]:b.target.value})}},I):I==="date"?n.jsx(Vn,{value:y,size:"small",disabled:A||!h,onChange:b=>{a({...c,[h]:b})}}):I==="boolean"?n.jsx(On,{value:y,size:"small",position:"start",disabled:A||!h,onValueChange:b=>{a({...c,[h]:b})}}):I==="array"?n.jsx("div",{className:E(ue,"ml-2 pl-2 border-l border-solid"),children:n.jsx(Pt,{value:y,newDefaultEntry:"",droppableId:e.toString(),addLabel:h?`Add to ${h}`:"Add",size:"small",disabled:A||!h,includeAddButton:!0,onValueChange:b=>{a({...c,[h]:b})},buildEntry:(b,p)=>n.jsx(gz,{index:b,id:p,value:y[b],disabled:A||!h,setValue:w=>{const k=[...y];k[b]=w,a({...c,[h]:k})}})})}):I==="map"?n.jsx("div",{className:E(ue,"ml-2 pl-2 border-l border-solid"),children:n.jsx(tt,{value:y,fieldName:h,setValue:b=>{a({...c,[h]:b})}})}):n.jsx(j,{variant:"caption",children:`Data type ${I} not supported yet`})}function g(y){u(e,y)}return n.jsxs(n.Fragment,{children:[n.jsxs(j,{component:"div",className:"font-mono flex flex-row gap-1",children:[n.jsx("div",{className:"w-[200px] max-w-[25%]",children:n.jsx(An,{value:t,placeholder:"key",disabled:A||s!=null&&s!=="",size:"small",onChange:y=>{i(y.target.value)}})}),n.jsx("div",{className:"flex-grow",children:d!=="map"&&d!=="array"&&_(s,t,d)}),n.jsxs(Qn,{trigger:n.jsx(ee,{size:"small",className:"h-7 w-7",children:n.jsx(gr,{})}),children:[n.jsx(ke,{dense:!0,onClick:()=>g("string"),children:"string"}),n.jsx(ke,{dense:!0,onClick:()=>g("number"),children:"number"}),n.jsx(ke,{dense:!0,onClick:()=>g("boolean"),children:"boolean"}),n.jsx(ke,{dense:!0,onClick:()=>g("date"),children:"date"}),n.jsx(ke,{dense:!0,onClick:()=>g("map"),children:"map"}),n.jsx(ke,{dense:!0,onClick:()=>g("array"),children:"array"})]}),n.jsx(ee,{"aria-label":"delete",size:"small",onClick:l,className:"h-7 w-7",children:n.jsx(oo,{size:"small"})})]},e.toString()),(d==="map"||d==="array")&&_(s,t,d)]})}function gz({id:e,index:t,value:c,setValue:i}){const[l,a]=f.useState(it(c)??"string");function s(u){a(u)}function d(u,A){return A==="string"||A==="number"?n.jsx(An,{value:u,type:A==="number"?"number":"text",size:"small",onChange:_=>{if(A==="number"){const g=_.target.value?parseFloat(_.target.value):void 0;g&&isNaN(g)?i(null):g!=null?i(g):i(null)}else i(_.target.value)}}):A==="date"?n.jsx(Vn,{value:u,size:"small",onChange:_=>{i(_)}}):A==="boolean"?n.jsx(On,{value:u,size:"small",position:"start",onValueChange:_=>{i(_)}}):A==="array"?n.jsx(j,{variant:"caption",children:"Arrays of arrays are not supported."}):A==="map"?n.jsx("div",{className:E(ue,"ml-2 pl-2 border-l border-solid"),children:n.jsx(tt,{value:u,setValue:_=>{i(_)}})}):n.jsx(j,{variant:"caption",children:`Data type ${A} not supported yet`})}return n.jsxs(n.Fragment,{children:[n.jsxs(j,{component:"div",className:"font-mono flex min-h-12 flex-row gap-1 items-center",children:[n.jsx("div",{className:"flex-grow",children:l!=="map"&&d(c,l)}),n.jsxs(Qn,{trigger:n.jsx(ee,{size:"small",className:"h-7 w-7",children:n.jsx(gr,{})}),children:[n.jsx(ke,{dense:!0,onClick:()=>s("string"),children:"string"}),n.jsx(ke,{dense:!0,onClick:()=>s("number"),children:"number"}),n.jsx(ke,{dense:!0,onClick:()=>s("boolean"),children:"boolean"}),n.jsx(ke,{dense:!0,onClick:()=>s("map"),children:"map"}),n.jsx(ke,{dense:!0,onClick:()=>s("date"),children:"date"})]})]},e.toString()),l==="map"&&d(c,l)]})}function ct(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}function it(e){if(typeof e=="string"||e===null)return"string";if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(Array.isArray(e))return"array";if(e instanceof Date)return"date";if(e instanceof Je)return"reference";if(e instanceof Br)return"geopoint";if(typeof e=="object")return"map"}function Ki({propertyKey:e,value:t,error:c,showError:i,isSubmitting:l,setValue:a,setFieldValue:s,tableMode:d,property:u,includeDescription:A,underlyingValueHasChanged:_,context:g,disabled:y}){if(!u.of)throw Error("RepeatFieldBinding misconfiguration. Property `of` not set");if(!u.resolvedProperties||!Array.isArray(u.resolvedProperties))throw Error("RepeatFieldBinding - Internal error: Expected array in 'property.resolvedProperties'");const h=u.expanded===void 0?!0:u.expanded,I=u.of,[b,p]=f.useState();Ne({property:u,value:t,setValue:a});const w=(m,v)=>{const S=u.resolvedProperties[m]??I,B={propertyKey:`${e}.${m}`,disabled:y,property:S,includeDescription:A,underlyingValueHasChanged:_,context:g,tableMode:!1,partOfArray:!0,partOfBlock:!1,autoFocus:v===b};return n.jsx(bn,{...B})},k=n.jsx(No,{value:t,addLabel:u.name?"Add entry to "+u.name:"Add entry",name:e,setFieldValue:s,buildEntry:w,onInternalIdAdded:p,disabled:l||!!u.disabled,includeAddButton:!u.disabled,newDefaultEntry:u.of.defaultValue}),K=n.jsx(Ce,{icon:we(u),required:u.validation?.required,title:u.name,className:"text-text-secondary dark:text-text-secondary-dark"});return n.jsxs(n.Fragment,{children:[!d&&n.jsx(fn,{initiallyExpanded:h,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",title:K,children:k}),d&&k,n.jsx(Se,{includeDescription:A,showError:i,error:c,disabled:y,property:u})]})}function Ci({propertyKey:e,value:t,error:c,showError:i,isSubmitting:l,setValue:a,setFieldValue:s,tableMode:d,property:u,includeDescription:A,underlyingValueHasChanged:_,context:g,disabled:y}){if(!u.oneOf)throw Error("ArrayOneOfField misconfiguration. Property `oneOf` not set");const h=u.expanded===void 0?!0:u.expanded;Ne({property:u,value:t,setValue:a});const[I,b]=f.useState(),p=f.useCallback((m,v)=>n.jsx(Iz,{name:`${e}.${m}`,index:m,value:t[m],typeField:u.oneOf.typeField??to,valueField:u.oneOf.valueField??So,properties:u.oneOf.properties,autoFocus:v===I,context:g},`array_one_of_${m}`),[g,I,u.oneOf,e,t]),w=n.jsx(Ce,{icon:we(u),required:u.validation?.required,title:u.name,className:"text-text-secondary dark:text-text-secondary-dark"}),k=Object.keys(u.oneOf.properties)[0],K=n.jsx(No,{value:t,name:e,addLabel:u.name?"Add entry to "+u.name:"Add entry",buildEntry:p,onInternalIdAdded:b,disabled:l||!!u.disabled,includeAddButton:!u.disabled,setFieldValue:s,newDefaultEntry:{[u.oneOf.typeField??to]:k,[u.oneOf.valueField??So]:Eo(u.oneOf.properties[k])}});return n.jsxs(n.Fragment,{children:[!d&&n.jsx(fn,{className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",initiallyExpanded:h,title:w,children:K}),d&&K,n.jsx(Se,{includeDescription:A,showError:i,error:c,disabled:y,property:u})]})}function Iz({name:e,index:t,value:c,typeField:i,valueField:l,properties:a,autoFocus:s,context:d}){const u=c&&c[i],[A,_]=f.useState(u??void 0),g=Fe.useFormikContext();f.useEffect(()=>{u||w(Object.keys(a)[0])},[]),f.useEffect(()=>{u!==A&&_(u)},[u]);const y=A?a[A]:void 0,h=Object.entries(a).map(([k,K])=>({id:k,label:K.name??k})),I=`${e}.${i}`,b=`${e}.${l}`,p=y?{propertyKey:b,property:y,context:d,autoFocus:s,partOfArray:!1,partOfBlock:!0,tableMode:!1}:void 0,w=k=>{const K=k?a[k]:void 0;_(k),g.setFieldTouched(I),g.setFieldValue(I,k),g.setFieldValue(b,K?Eo(K):null)};return n.jsxs("div",{className:E(He,"bg-transparent p-4 my-4 py-8"),children:[n.jsx(Fe.FastField,{required:!0,name:I,children:k=>n.jsx(n.Fragment,{children:n.jsx(xe,{className:"mb-2",placeholder:n.jsx(j,{variant:"caption",className:"px-4 py-2 font-medium",children:"Type"}),size:"small",position:"item-aligned",value:k.field.value!==void 0&&k.field.value!==null?k.field.value:"",renderValue:K=>n.jsx(Ee,{enumKey:K,enumValues:h,size:"small"}),onValueChange:K=>{w(K)},children:h.map(K=>n.jsx(Re,{value:String(K.id),children:n.jsx(Ee,{enumKey:K.id,enumValues:h,size:"small"})},K.id))})})}),p&&n.jsx(bn,{...p},`form_control_${e}_${A}`)]})}const bz=new Gt;try{_n.use(_n.Plugins.AutoResize,{min:100}),_n.unuse(_n.Plugins.FontUnderline),_n.unuse(_n.Plugins.Clear)}catch{}function Si({propertyKey:e,value:t,setValue:c,error:i,showError:l,disabled:a,autoFocus:s,touched:d,property:u,tableMode:A,includeDescription:_,context:g}){const[y,h]=f.useState(t),I=f.useRef(t);En("MarkdownFieldBinding",pz);const b=f.useDeferredValue({internalValue:y,value:t});return f.useEffect(()=>{I.current=t,h(t)},[t]),f.useEffect(()=>{b.internalValue!==I.current&&c(b.internalValue)},[b]),n.jsxs(n.Fragment,{children:[!A&&n.jsx(j,{variant:"caption",className:"flex-grow",children:n.jsx(Ce,{icon:we(u),required:u.validation?.required,title:u.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"})}),n.jsx(_n,{value:y??"",className:E(qe,a?en:ze,"text-base"),readOnly:a,renderHTML:p=>bz.render(p),view:{menu:!0,md:!0,html:!1},onChange:({html:p,text:w})=>{h(w??null)}}),n.jsx(Se,{includeDescription:_,showError:l,error:i,disabled:a,property:u})]})}const pz=`
|
|
3
|
+
`)?r.jsx("div",{className:"overflow-x-scroll",children:l.map((i,s)=>r.jsxs(c.Fragment,{children:[r.jsx("span",{children:i}),s!==l.length-1&&r.jsx("br",{})]},`string_preview_${s}`))}):r.jsx(r.Fragment,{children:t})}}}function Lr({propertyKey:e,value:t,property:n,size:o}){const l=J(),i=Je({propertyKey:e,property:n,propertyValue:t,fields:l.propertyConfigs});if(!i.of)throw Error(`You need to specify an 'of' prop (or specify a custom field) in your array property ${e}`);if(i.dataType!=="array")throw Error("Picked wrong preview component ArrayPreview");const s=t;if(!s)return null;const a=o==="medium"?"small":"tiny";return r.jsx("div",{className:"flex flex-col gap-2",children:s&&s.map((d,f)=>{const g=i.resolvedProperties[f]??i.resolvedProperties[f]??(Array.isArray(i.of)?i.of[f]:i.of);return g?r.jsx(c.Fragment,{children:r.jsx("div",{className:A.cn(A.defaultBorderMixin,"m-1 border-b last:border-b-0"),children:r.jsx(te,{children:r.jsx(ve,{propertyKey:e,value:d,property:g,size:a})})})},"preview_array_"+f):null})})}const Ve=fr.memo(function(t){const n=t.reference;return n instanceof Ne?r.jsx(Ni,{...t}):(console.warn("Reference preview received value of type",typeof n),r.jsx(Kt,{onClick:t.onClick,size:t.size,children:r.jsx(me,{error:"Unexpected value. Click to edit",tooltip:JSON.stringify(n)})}))},Fi);function Fi(e,t){return e.disabled===t.disabled&&e.size===t.size&&e.onHover===t.onHover&&e.reference?.id===t.reference?.id&&e.reference?.path===t.reference?.path&&e.allowEntityNavigation===t.allowEntityNavigation}function Ni({disabled:e,reference:t,previewProperties:n,size:o,onHover:l,onClick:i,allowEntityNavigation:s=!0}){const a=J(),f=ae().getCollection(t.path);if(!f){if(a.components?.missingReference)return r.jsx(a.components.missingReference,{path:t.path});throw Error(`Couldn't find the corresponding collection view for the path: ${t.path}`)}return r.jsx(Ti,{reference:t,collection:f,previewProperties:n,size:o,disabled:e,allowEntityNavigation:s,onClick:i,onHover:l})}function Ti({reference:e,collection:t,previewProperties:n,size:o,disabled:l,allowEntityNavigation:i,onClick:s,onHover:a}){const d=J(),f=Ze(),{entity:g,dataLoading:p,dataLoadingError:h}=Mr({path:e.path,entityId:e.id,collection:t,useCache:!0});g&&uo.set(e.pathWithId,g);const u=g??uo.get(e.pathWithId),m=c.useMemo(()=>Ie({collection:t,path:e.path,values:u?.values,fields:d.propertyConfigs}),[t]),b=c.useMemo(()=>Un(m,d.propertyConfigs,n,o==="small"||o==="medium"?3:1),[n,m,o]);let y;return m?(e?u&&!u.values?y=r.jsx(me,{error:"Reference does not exist",tooltip:e.path}):y=r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex flex-col flex-grow w-full max-w-[calc(100%-52px)] m-1",children:[o!=="tiny"&&(e?r.jsx("div",{className:`${o!=="medium"?"block whitespace-nowrap overflow-hidden truncate":""}`,children:r.jsx(A.Typography,{variant:"caption",className:"font-mono",children:e.id})}):r.jsx(A.Skeleton,{})),b&&b.map(C=>{const w=m.properties[C];return w?r.jsx("div",{className:b.length>1?"my-0.5":"my-0",children:u?r.jsx(ve,{propertyKey:C,value:je(u.values,C),property:w,size:"tiny"}):r.jsx(mt,{property:w,size:"tiny"})},"ref_prev_"+C):null})]}),r.jsx("div",{className:`my-${o==="tiny"?2:4}`,children:!l&&u&&i&&r.jsx(A.Tooltip,{title:`See details for ${u.id}`,children:r.jsx(A.IconButton,{color:"inherit",size:"small",onClick:C=>{C.stopPropagation(),d.onAnalyticsEvent?.("entity_click_from_reference",{path:u.path,entityId:u.id}),f.open({entityId:u.id,path:u.path,collection:m,updateUrl:!0})},children:r.jsx(A.KeyboardTabIcon,{size:"small"})})})})]}):y=r.jsx(me,{error:"Reference not set"}),r.jsx(Kt,{onClick:l?void 0:s,onHover:l?void 0:a,size:o,children:y})):r.jsx(me,{error:"Could not find collection with id "+m})}function Kt({children:e,onHover:t,size:n,onClick:o}){return r.jsx(A.Typography,{variant:"label",className:A.cn("bg-opacity-70 bg-gray-100 dark:bg-gray-800 dark:bg-opacity-60","w-full","flex","rounded-md","overflow-hidden",t?"hover:bg-opacity-90 dark:hover:bg-opacity-90":"",n==="medium"?"p-2":"p-1",n==="tiny"?"items-center":"","transition-colors duration-300 ease-in-out ",o?"cursor-pointer":""),style:{tabindex:0},onClick:l=>{o&&(l.preventDefault(),o(l))},children:e})}const uo=new Map;function go({propertyKey:e,value:t,property:n,size:o}){const l=J(),i=Je({propertyKey:e,property:n,propertyValue:t,fields:l.propertyConfigs});if(Array.isArray(i?.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(i?.dataType!=="array"||!i.of||i.of.dataType!=="reference")throw Error("Picked wrong preview component ArrayOfReferencesPreview");const s=o==="medium"?"small":"tiny";return r.jsx("div",{className:"flex flex-col w-full",children:t&&t.map((a,d)=>{const f=i.of;return r.jsx("div",{className:"mt-1 mb-1 w-full",children:r.jsx(Ve,{disabled:!f.path,previewProperties:f.previewProperties,size:s,reference:a})},`preview_array_ref_${e}_${d}`)})})}function ho({propertyKey:e,value:t,property:n,size:o}){const l=J(),i=Je({propertyKey:e,property:n,propertyValue:t,fields:l.propertyConfigs});if(Array.isArray(i.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(i.dataType!=="array"||!i.of||i.of.dataType!=="string")throw Error("Picked wrong preview component ArrayOfStorageComponentsPreview");const s=o==="medium"?"small":"tiny";return r.jsx("div",{className:"flex flex-wrap gap-2",children:t&&t.map((a,d)=>r.jsx(te,{children:r.jsx(ve,{propertyKey:e,value:a,property:i.of,size:s})},`preview_array_storage_${e}_${d}`))})}function Ur({name:e,value:t,enumValues:n,size:o}){return r.jsx("div",{className:"flex flex-wrap gap-1.5",children:t&&t.map((l,i)=>r.jsx(te,{children:r.jsx(Be,{enumKey:l,enumValues:n,size:o!=="medium"?"small":"medium"})},`preview_array_ref_${e}_${i}`))})}function $r({propertyKey:e,value:t,property:n,size:o}){if(n.dataType!=="array")throw Error("Picked wrong preview component ArrayEnumPreview");const l=n.of;if(!l.enumValues)throw Error("Picked wrong preview component ArrayEnumPreview");return t?r.jsx(Ur,{name:e,value:t,enumValues:l.enumValues,size:o}):null}function po({propertyKey:e,value:t,property:n,size:o}){const l=J(),i=Je({propertyKey:e,property:n,propertyValue:t,fields:l.propertyConfigs});if(Array.isArray(i.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(!i.of||i.dataType!=="array"||i.of.dataType!=="string")throw Error("Picked wrong preview component ArrayOfStringsPreview");if(t&&!Array.isArray(t))return r.jsx("div",{children:`Unexpected value: ${t}`});const s=i.of;return r.jsx("div",{className:"flex flex-col gap-2",children:t&&t.map((a,d)=>r.jsx("div",{children:r.jsx(te,{children:r.jsx(zr,{propertyKey:e,property:s,value:a,size:o})})},`preview_array_strings_${e}_${d}`))})}function mo({propertyKey:e,value:t,property:n,size:o}){const l=J(),i=Je({propertyKey:e,property:n,propertyValue:t,fields:l.propertyConfigs});if(i?.dataType!=="array")throw Error("Picked wrong preview component ArrayPreview");if(!i?.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${e}`);const s=t;if(!s)return null;const a=o==="medium"?"small":"tiny",d=i.oneOf.typeField??kt,f=i.oneOf.valueField??Lt,g=i.oneOf.properties;return r.jsx("div",{className:"flex flex-col",children:s&&s.map((p,h)=>r.jsx(c.Fragment,{children:r.jsx("div",{className:A.cn(A.defaultBorderMixin,"m-1 border-b last:border-b-0"),children:r.jsx(te,{children:p&&r.jsx(ve,{propertyKey:e,value:p[f],property:i.resolvedProperties[h]??g[p[d]],size:a})})})},"preview_array_"+p+"_"+h))})}function bo({propertyKey:e,value:t,property:n,size:o}){if(n.dataType!=="map")throw Error("Picked wrong preview component MapPropertyPreview");const l=n;if(!l.properties||Object.keys(l.properties??{}).length===0)return r.jsx(_r,{value:t});if(!t)return null;const i=Object.keys(l.properties);return o==="tiny"?r.jsx("div",{className:"w-full flex flex-col space-y-1 md:space-y-2",children:i.map((s,a)=>r.jsx("div",{children:r.jsx(te,{children:r.jsx(ve,{propertyKey:s,value:t[s],property:l.properties[s],size:o})},"map_preview_"+l.name+s+a)},`map_${s}`))}):r.jsx("div",{className:"flex flex-col gap-1 w-full",children:i&&i.map((s,a)=>{const d=l.properties[s];return r.jsxs("div",{className:A.cn(A.defaultBorderMixin,"last:border-b-0 border-b"),children:[r.jsxs("div",{className:"flex flex-row pt-0.5 pb-0.5 gap-2",children:[r.jsx("div",{className:"min-w-[140px] w-[25%] py-1",children:r.jsx(A.Typography,{variant:"caption",className:"font-mono break-words",color:"secondary",children:d.name})}),r.jsx("div",{className:"flex-grow max-w-[75%]",children:r.jsx(te,{children:!(d.dataType==="map"||d==="array")&&r.jsx(ve,{propertyKey:s,value:t[s],property:d,size:o})})})]}),(d.dataType==="map"||d==="array")&&r.jsx("div",{className:A.cn(A.defaultBorderMixin,"border-l pl-4 ml-2 my-2"),children:r.jsx(ve,{propertyKey:s,value:t[s],property:d,size:o})})]},`map_preview_table_${s}}`)})})}function _r({value:e}){return typeof e!="object"?null:r.jsx("div",{className:"flex flex-col gap-1 w-full",children:Object.entries(e).map(([t,n])=>r.jsxs("div",{className:A.cn(A.defaultBorderMixin,"last:border-b-0 border-b"),children:[r.jsxs("div",{className:"flex flex-row pt-0.5 pb-0.5 gap-2",children:[r.jsx("div",{className:"min-w-[140px] w-[25%] py-1",children:r.jsx(A.Typography,{variant:"caption",className:"font-mono break-words",color:"secondary",children:t})},`table-cell-title-${t}-${t}`),r.jsx("div",{className:"flex-grow max-w-[75%]",children:typeof n!="object"&&r.jsx(A.Typography,{children:r.jsx(te,{children:n&&n.toString()})})})]}),typeof n=="object"&&r.jsx("div",{className:A.cn(A.defaultBorderMixin,"border-l pl-4"),children:r.jsx(_r,{value:n})})]},`map_preview_table_${t}}`))})}function yo({date:e}){const t=J(),n=t?.locale?kn[t?.locale]:void 0,o=t?.dateTimeFormat??Dn,l=e?wl.format(e,o,{locale:n}):"";return r.jsx(r.Fragment,{children:l})}function vo({value:e}){return r.jsx(A.Checkbox,{checked:e})}function wo({value:e,property:t,size:n}){if(t.enumValues){const o=e,l=He(t.enumValues);return l?r.jsx(Be,{enumKey:o,enumValues:l,size:n!=="medium"?"small":"medium"}):r.jsx(r.Fragment,{children:e})}else return r.jsx(r.Fragment,{children:e})}const ve=c.memo(function(t){const n=J();let o;const{property:l,propertyKey:i,value:s,size:a,height:d,width:f}=t,g=Se({propertyKey:i,propertyOrBuilder:l,propertyValue:s,fields:n.propertyConfigs});if(s===void 0||g===null)o=r.jsx(ht,{});else if(g.Preview)o=c.createElement(g.Preview,{propertyKey:i,value:s,property:g,size:a,height:d,width:f,customProps:g.customProps});else if(s===null)o=r.jsx(ht,{});else if(g.dataType==="string"){const p=g;typeof s=="string"?p.url?typeof p.url=="boolean"?o=r.jsx(Nt,{size:t.size,url:s}):typeof p.url=="string"&&(o=r.jsx(Nt,{size:t.size,url:s,previewType:p.url})):p.storage?o=r.jsx(co,{storeUrl:g.storage?.storeUrl??!1,size:t.size,storagePathOrDownloadUrl:s}):p.markdown?o=r.jsx(A.Markdown,{source:s}):o=r.jsx(zr,{...t,property:p,value:s}):o=lt(i,g.dataType,s)}else if(g.dataType==="array")if(s instanceof Array){const p=g;if(!p.of&&!p.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${i}`);p.of?Array.isArray(p.of)?o=r.jsx(Lr,{...t,value:s,property:g}):p.of.dataType==="reference"?o=r.jsx(go,{...t,value:s,property:g}):p.of.dataType==="string"?p.of.enumValues?o=r.jsx($r,{...t,value:s,property:g}):p.of.storage?o=r.jsx(ho,{...t,value:s,property:g}):o=r.jsx(po,{...t,value:s,property:g}):p.of.dataType==="number"&&p.of.enumValues?o=r.jsx($r,{...t,value:s,property:g}):o=r.jsx(Lr,{...t,value:s,property:g}):p.oneOf&&(o=r.jsx(mo,{...t,value:s,property:g}))}else o=lt(i,g.dataType,s);else g.dataType==="map"?typeof s=="object"?o=r.jsx(bo,{...t,property:g}):o=lt(i,g.dataType,s):g.dataType==="date"?s instanceof Date?o=r.jsx(yo,{date:s}):o=lt(i,g.dataType,s):g.dataType==="reference"?typeof g.path=="string"?s instanceof Ne?o=r.jsx(Ve,{disabled:!g.path,previewProperties:g.previewProperties,size:t.size,reference:s}):o=lt(i,g.dataType,s):o=r.jsx(ht,{}):g.dataType==="boolean"?typeof s=="boolean"?o=r.jsx(vo,{value:s}):o=lt(i,g.dataType,s):g.dataType==="number"?typeof s=="number"?o=r.jsx(wo,{...t,value:s,property:g}):o=lt(i,g.dataType,s):o=JSON.stringify(s);return o??r.jsx(ht,{})},ie);function lt(e,t,n){return console.warn(`Unexpected value for property ${e}, of type ${t}`,n),r.jsx(me,{title:"Unexpected value",error:`${JSON.stringify(n)}`})}function Pi({propertyKey:e,value:t,property:n,size:o}){const l=J(),i=Je({propertyKey:e,property:n,propertyValue:t,fields:l.propertyConfigs});if(Array.isArray(i?.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(i?.dataType!=="array"||!i.of||i.of.dataType!=="map")throw Error("Picked wrong preview component ArrayOfMapsPreview");const s=i.of,a=s.properties;if(!a)throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${e}`);const d=t,f=s.previewProperties;if(!d)return null;let g=f;return(!g||!g.length)&&(g=Object.keys(a),o&&(g=g.slice(0,3))),r.jsx("div",{className:"table-auto text-xs",children:r.jsx("div",{children:d&&d.map((p,h)=>r.jsx("div",{className:"border-b last:border-b-0",children:g&&g.map(u=>r.jsx("div",{className:"table-cell",children:r.jsx(te,{children:r.jsx(ve,{propertyKey:u,value:p[u],property:a[u],size:"small"})})},`table-cell-${u}`))},`table_${p}_${h}`))})})}const Qi=fr.memo(function({builder:t}){const[n,o]=c.useState(!0),[l,i]=c.useState(null);return c.useEffect(()=>{let s=!1;return t.then(a=>{s||(o(!1),i(a))}).catch(a=>{o(!1),console.error(a)}),()=>{s=!0}},[t]),n?r.jsx(A.Skeleton,{}):r.jsx(fr.Fragment,{children:l})});function Wr({entity:e,collection:t,path:n,className:o}){const l=J(),i=c.useMemo(()=>Ie({collection:t,path:n,entityId:e.id,values:e.values,fields:l.propertyConfigs}),[t,n,e]),s=J(),a=i.properties;return r.jsx("div",{className:"w-full "+o,children:r.jsxs("div",{className:"w-full mb-4",children:[r.jsxs("div",{className:A.cn(A.defaultBorderMixin,"flex justify-between py-2 border-b last:border-b-0"),children:[r.jsx("div",{className:"flex items-center w-1/4",children:r.jsx("span",{className:"pl-2 text-sm text-gray-600",children:"Id"})}),r.jsxs("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:[r.jsx("span",{className:"flex-grow mr-2",children:e.id}),s?.entityLinkBuilder&&r.jsx("a",{href:s.entityLinkBuilder({entity:e}),rel:"noopener noreferrer",target:"_blank",children:r.jsx(A.IconButton,{children:r.jsx(A.OpenInNewIcon,{size:"small"})})})]})]}),Object.entries(a).map(([d,f])=>{const g=e.values[d];return r.jsxs("div",{className:A.cn(A.defaultBorderMixin,"flex justify-between py-2 border-b last:border-b-0"),children:[r.jsx("div",{className:"flex items-center w-1/4",children:r.jsx("span",{className:"pl-2 text-sm text-gray-600",children:f.name})}),r.jsx("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:r.jsx(ve,{propertyKey:d,value:g,property:f,size:"medium"})})]},`reference_previews_${d}`)})]})})}function Mi(e){return e.dataType==="boolean"?"center":e.dataType==="number"?e.enumValues?"left":"right":e.dataType==="date"?"right":"left"}function Co(e){if(e.columnWidth)return e.columnWidth;if(e.dataType==="string")return e.url?280:e.storage?160:e.enumValues?200:e.multiline||e.markdown?300:(e.email,200);if(e.dataType==="array"){const t=e;return t.of?Array.isArray(e.of)?300:Co(t.of):300}else return e.dataType==="number"?e.enumValues?200:140:e.dataType==="map"?360:e.dataType==="date"?200:e.dataType==="reference"?220:e.dataType==="boolean"?140:200}function jr(e){return`subcollection:${e.id??e.path}`}function Di(e){const t=c.useRef(null),{disabled:n,value:o,multiline:l,updateValue:i,focused:s}=e,a=c.useRef(o),[d,f]=c.useState(o),g=c.useRef(!1);c.useEffect(()=>{a.current!==o&&o!==d&&f(o),a.current=o},[o]);const p=c.useCallback(()=>{!o&&!d||d!==o&&(a.current=d,i(d))},[d,i,o]);return jt(d,p,!s,2e3),c.useEffect(()=>{t.current&&s&&!g.current?(g.current=!0,t.current.focus({preventScroll:!0}),t.current.selectionStart=t.current.value.length,t.current.selectionEnd=t.current.value.length):g.current=s},[s,t]),r.jsx(A.TextareaAutosize,{ref:t,style:{padding:0,margin:0,width:"100%",color:"unset",fontWeight:"unset",lineHeight:"unset",fontSize:"unset",fontFamily:"unset",background:"unset",border:"unset",resize:"none",outline:"none"},value:d??"",onChange:h=>{const u=h.target.value;(l||!u.endsWith(`
|
|
4
|
+
`))&&f(u)},onFocus:()=>{g.current=!0},onBlur:()=>{g.current=!1,p()}})}function Hr(e){const{name:t,enumValues:n,error:o,internalValue:l,disabled:i,small:s,focused:a,updateValue:d,multiple:f,valueType:g}=e,p=Array.isArray(l)&&f||!Array.isArray(l)&&!f,h=c.useRef(null);c.useEffect(()=>{h.current&&a&&h.current?.focus({preventScroll:!0})},[a,h]);const u=c.useCallback(b=>{if(g==="number")if(f){const y=b.map(C=>parseFloat(C));d(y)}else d(parseFloat(b));else if(g==="string")d(b||null);else throw Error("Missing mapping in TableSelect")},[f,d,g]),m=(b,y)=>f&&Array.isArray(b)?r.jsx(Ur,{value:b,name:t,enumValues:n,size:s?"small":"medium"},`${b}-${y}`):r.jsx(Be,{enumKey:b,enumValues:n,size:s?"small":"medium"},`${b}-${y}`);return f?r.jsx(A.MultiSelect,{inputRef:h,containerClassName:"w-full h-full",className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:i,padding:!1,includeFocusOutline:!1,value:p?l.map(b=>b.toString()):[],onMultiValueChange:u,renderValue:m,children:n?.map(b=>r.jsx(A.MultiSelectItem,{value:String(b.id),children:r.jsx(Be,{enumKey:b.id,enumValues:n,size:s?"small":"medium"})},b.id))}):r.jsx(A.Select,{inputRef:h,className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:i,multiple:f,padding:!1,includeFocusOutline:!1,value:p?f?l.map(b=>b.toString()):l?.toString():f?[]:"",onValueChange:u,onMultiValueChange:u,renderValue:m,children:n?.map(b=>r.jsx(A.SelectItem,{value:String(b.id),children:r.jsx(Be,{enumKey:b.id,enumValues:n,size:s?"small":"medium"})},b.id))})}function Oi(e){const{align:t,value:n,updateValue:o,focused:l}=e,i=n&&typeof n=="number"?n.toString():"",[s,a]=c.useState(i),d=c.useRef(n);c.useEffect(()=>{d.current!==n&&String(n)!==s&&a(n?n.toString():null),d.current=n},[n]);const f=c.useCallback(()=>{if(s!==i)if(s!=null){const h=parseFloat(s);if(isNaN(h))return;h!=null&&o(h)}else o(null)},[s,n]);jt(s,f,!l,2e3),c.useEffect(()=>{!l&&i!==s&&a(n!=null?n.toString():null)},[n,l]);const g=c.useRef(null);c.useEffect(()=>{g.current&&l&&g.current.focus({preventScroll:!0})},[l,g]);const p=/^-?[0-9]+[,.]?[0-9]*$/;return r.jsx("input",{ref:g,className:"w-full text-right p-0 m-0 bg-transparent border-none resize-none outline-none font-normal leading-normal text-unset",style:{textAlign:t},value:s??"",onChange:h=>{const u=h.target.value.replace(",",".");u.length===0&&a(null),(p.test(u)||u.startsWith("-"))&&a(u)}})}function Vi(e){const{internalValue:t,updateValue:n,focused:o}=e,l=c.useRef(null);return c.useEffect(()=>{l.current&&o&&l.current.focus({preventScroll:!0})},[o,l]),r.jsx(A.BooleanSwitch,{ref:l,size:"small",value:!!t,onValueChange:n})}function Gi(e){const{locale:t}=J(),{disabled:n,error:o,mode:l,internalValue:i,updateValue:s}=e;return r.jsx(A.DateTimeField,{value:i??void 0,onChange:a=>s(a),size:"medium",invisible:!0,className:"w-full h-full",inputClassName:"w-full h-full",mode:l,locale:t})}class te extends c.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){console.error(t)}render(){return this.state.error?r.jsxs("div",{className:"flex flex-col m-2",children:[r.jsxs("div",{className:"flex items-center m-2",children:[r.jsx(A.ErrorIcon,{color:"error",size:"small"}),r.jsx("div",{className:"ml-4",children:"Error"})]}),r.jsx(A.Typography,{variant:"caption",children:this.state.error?.message??"See the error in the console"})]}):this.props.children}}async function Yi(e,t,n,o,l,i,s,a){let d;return typeof e=="function"?(d=await e({path:l,entityId:o,values:n,property:i,file:s,storage:t,propertyKey:a}),d||console.warn("Storage callback returned empty result. Using default name value")):d=Eo(s,e,o,a,l),d||(d=At()+"_"+s.name),d}function zi(e,t,n,o,l,i,s,a){let d;return typeof e=="function"?(d=e({path:l,entityId:o,values:n,property:i,file:s,storage:t,propertyKey:a}),d||console.warn("Storage callback returned empty result. Using default name value")):d=Eo(s,e,o,a,l),d||(d=At()+"_"+s.name),d}function Eo(e,t,n,o,l){const i=e.name.split(".").pop();let s=t.replace("{entityId}",n).replace("{propertyKey}",o).replace("{rand}",At()).replace("{file}",e.name).replace("{file.type}",e.type).replace("{path}",l);if(i){s=s.replace("{file.ext}",i);const a=e.name.replace(`.${i}`,"");s=s.replace("{file.name}",a)}return s||(s=At()+"_"+e.name),s}function Bo({entityId:e,entityValues:t,path:n,value:o,property:l,propertyKey:i,storageSource:s,disabled:a,onChange:d}){const f=l.dataType==="string"?l.storage:l.dataType==="array"&&l.of.dataType==="string"?l.of.storage:void 0,g=l.dataType==="array";if(!f)throw Error("Storage meta must be specified");const p=f?.metadata,h=g?"small":"medium",u=f?.imageCompression,m=(g?o??[]:o?[o]:[]).map(B=>({id:Jr(),storagePathOrDownloadUrl:B,metadata:p,size:h})),[b,y]=c.useState(o),[C,w]=c.useState(m);c.useEffect(()=>{ie(b,o)||(y(o),w(m))},[m,o,b]);const E=c.useCallback(async B=>{if(f.fileName){const I=await Yi(f.fileName,f,t,e,n,l,B,i);if(!I||I.length===0)throw Error("You need to return a valid filename");return I}return At()+"_"+B.name},[e,t,n,l,i,f]),k=c.useCallback(B=>zi(f.storagePath,f,t,e,n,l,B,i)??"/",[e,t,n,l,i,f]),x=c.useCallback(async(B,I,F)=>{console.debug("onFileUploadComplete",B,I);let Q=B;if(f.storeUrl&&(Q=(await s.getDownloadURL(B)).url),f.postProcess&&Q&&(Q=await f.postProcess(Q)),!Q){console.warn("uploadPathOrDownloadUrl is null");return}let N;I.storagePathOrDownloadUrl=Q,I.metadata=F,N=[...C],N=ko(N),w(N);const D=N.filter(G=>!!G.storagePathOrDownloadUrl).map(G=>G.storagePathOrDownloadUrl);d(g?D:D?D[0]:null)},[C,g,d,f,s]),S=c.useCallback(async B=>{if(!B.length||a)return;let I;if(g)I=[...C,...await Promise.all(B.map(async F=>(u&&qr(F)&&(F=await So(F,u)),{id:Jr(),file:F,fileName:await E(F),metadata:p,size:h})))];else{let F=B[0];u&&qr(F)&&(F=await So(F,u)),I=[{id:Jr(),file:F,fileName:await E(F),metadata:p,size:h}]}I=ko(I),w(I)},[a,E,C,p,g,h]);return{internalValue:C,setInternalValue:w,storage:f,fileNameBuilder:E,storagePathBuilder:k,onFileUploadComplete:x,onFilesAdded:S,multipleFilesSupported:g}}function ko(e){return e.filter((t,n)=>(e.map(o=>o.storagePathOrDownloadUrl).indexOf(t.storagePathOrDownloadUrl)===n||!t.storagePathOrDownloadUrl)&&(e.map(o=>o.file).indexOf(t.file)===n||!t.file))}function Jr(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}const xo={"image/jpeg":"JPEG","image/png":"PNG","image/webp":"WEBP"},qr=e=>xo[e.type]?xo[e.type]:null,Li=100,So=(e,t)=>new Promise(n=>{const o=t.quality===void 0?Li:t.quality,l=o>=0&&o<=100?o:100,i=qr(e);if(!i)throw Error("resizeAndCompressImage: Unsupported image format");Bl.imageFileResizer(e,t.maxWidth||Number.MAX_VALUE,t.maxHeight||Number.MAX_VALUE,i,l,0,s=>n(s),"file")});function Io({storagePath:e,entry:t,metadata:n,onFileUploadComplete:o,imageSize:l,simple:i}){const s=ut(),a=Xe(),[d,f]=c.useState(),[g,p]=c.useState(!1),h=c.useRef(!1),u=c.useRef(!1),m=c.useCallback((b,y)=>{u.current||(u.current=!0,f(void 0),p(!0),s.uploadFile({file:b,fileName:y,path:e,metadata:n}).then(async({path:C})=>{console.debug("Upload successful"),await o(C,t,n),h.current&&p(!1)}).catch(C=>{console.warn("Upload error",C),h.current&&(f(C),p(!1),a.open({type:"error",message:"Error uploading file: "+C.message}))}).finally(()=>{u.current=!1}))},[t,n,o,s,e]);return c.useEffect(()=>(h.current=!0,t.file&&m(t.file,t.fileName),()=>{h.current=!1}),[t.file,t.fileName,m]),i?r.jsx("div",{className:`m-4 w-${l} h-${l}`,children:g&&r.jsx(A.Skeleton,{className:`w-${l} h-${l}`})}):r.jsxs("div",{className:A.cn(A.paperMixin,"relative m-4 border-box flex items-center justify-center",`min-w-[${l}px] min-h-[${l}px]`),children:[g&&r.jsx(A.Skeleton,{className:"w-full h-full"}),d&&r.jsx(me,{title:"Error uploading file",error:d})]})}function Fo({showError:e,disabled:t,showExpandIcon:n,selected:o,openPopup:l,children:i}){const s=c.useRef(null),a=c.useCallback(()=>{if(l){const f=s&&s?.current?.getBoundingClientRect();l(f)}},[]),d=c.useRef();return c.useEffect(()=>{d.current&&o&&d.current.focus({preventScroll:!0})},[o]),r.jsx(r.Fragment,{children:(e||!t&&n)&&r.jsxs("div",{ref:s,className:"absolute top-0.5 right-0.5 flex items-center",children:[o&&i,o&&!t&&n&&r.jsx(A.IconButton,{ref:d,color:"inherit",size:"small",onClick:a,children:r.jsxs("svg",{fill:"#888",width:"20",height:"20",viewBox:"0 0 24 24",children:[r.jsx("path",{className:"cls-2",d:"M20,5a1,1,0,0,0-1-1L14,4h0a1,1,0,0,0,0,2h2.57L13.29,9.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L18,7.42V10a1,1,0,0,0,1,1h0a1,1,0,0,0,1-1Z"}),r.jsx("path",{className:"cls-2",d:"M10.71,13.29a1,1,0,0,0-1.42,0L6,16.57V14a1,1,0,0,0-1-1H5a1,1,0,0,0-1,1l0,5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2H7.42l3.29-3.29A1,1,0,0,0,10.71,13.29Z"})]})}),e&&r.jsx(so,{side:"left",className:"flex items-center justify-center",style:{width:32,height:32},title:e.message,children:r.jsx(A.ErrorOutlineIcon,{size:"small",color:"error"})})]})})}const Ui="max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",$i="pt-0 border-2 border-solid",_i="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500 bg-green-50 dark:bg-green-900",Wi="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500 bg-red-50 dark:bg-red-900";function ji(e){const{propertyKey:t,error:n,selected:o,openPopup:l,value:i,disabled:s,property:a,entity:d,path:f,previewSize:g,updateValue:p}=e,h=ut(),{internalValue:u,setInternalValue:m,onFilesAdded:b,storage:y,onFileUploadComplete:C,storagePathBuilder:w,multipleFilesSupported:E}=Bo({entityValues:d.values,entityId:d.id,path:f,property:a,propertyKey:t,storageSource:h,onChange:p,value:i,disabled:s});return r.jsx(Hi,{internalValue:u,setInternalValue:m,name:t,disabled:s,autoFocus:!1,openPopup:l,error:n,selected:o,property:a,onChange:p,entity:d,storagePathBuilder:w,storage:y,multipleFilesSupported:E,onFilesAdded:b,onFileUploadComplete:C,previewSize:g})}function Hi({property:e,name:t,internalValue:n,setInternalValue:o,openPopup:l,entity:i,selected:s,error:a,onChange:d,multipleFilesSupported:f,previewSize:g,disabled:p,autoFocus:h,storage:u,onFilesAdded:m,onFileUploadComplete:b,storagePathBuilder:y}){const[C,w]=c.useState(!1),E=f&&g==="medium"?"small":g;if(f){const W=e;if(Array.isArray(W.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(W.of){if(W.of.dataType!=="string")throw Error("Storage field using array must be of data type string")}else throw Error("Storage field using array must be of data type string")}const k=u?.metadata,x=!!n,S=Xe(),{open:B,getRootProps:I,getInputProps:F,isDragActive:Q,isDragAccept:N,isDragReject:D}=En.useDropzone({accept:u.acceptedFiles?u.acceptedFiles.map(W=>({[W]:[]})).reduce((W,U)=>({...W,...U}),{}):void 0,disabled:p,maxSize:u.maxSize,noClick:!0,noKeyboard:!0,onDrop:m,onDropRejected:(W,U)=>{for(const X of W)for(const Y of X.errors)S.open({type:"error",message:`Error uploading file: File is larger than ${u.maxSize} bytes`})}}),{...G}=I(),H=f?"Drag 'n' drop some files here, or click here to edit":"Drag 'n' drop a file here, or click here edit",L=f?e.of:e,q=c.useMemo(()=>pt(E),[E]),K=!p&&a;return r.jsxs("div",{...G,onMouseEnter:()=>w(!0),onMouseMove:()=>w(!0),onMouseLeave:()=>w(!1),className:A.cn(Ui,"relative w-full h-full flex",`justify-${x?"start":"center"}`,Q?$i:"",N?_i:"",D?Wi:""),children:[r.jsx("input",{autoFocus:h,...F()}),n.map((W,U)=>{let X;return W.storagePathOrDownloadUrl?X=r.jsx(Ji,{property:L,value:W.storagePathOrDownloadUrl,entity:i,size:E},`storage_preview_${U}`):W.file&&(X=r.jsx(Io,{entry:W,metadata:k,storagePath:y(W.file),onFileUploadComplete:b,imageSize:q,simple:!0},`storage_progress_${U}`)),X}),!n&&r.jsx("div",{className:"flex-grow m-2 max-w-[200px]",onClick:B,children:r.jsx(A.Typography,{className:"text-gray-400 dark:text-gray-600",variant:"body2",align:"center",children:H})}),r.jsx(Fo,{showError:K,disabled:p,showExpandIcon:!0,selected:s,openPopup:p?void 0:l,children:r.jsx(A.IconButton,{color:"inherit",size:"small",onClick:B,children:r.jsx(A.EditIcon,{size:"small",className:"text-gray-500"})})})]})}function Ji({property:e,value:t,size:n,entity:o}){return r.jsx("div",{className:"relative m-2",children:t&&r.jsx(te,{children:r.jsx(ve,{propertyKey:"ignore",value:t,property:e,size:n})})})}function No(e){const t=J(),n=ae(),{path:o}=e,l=n.getCollection(o);if(!l){if(t.components?.missingReference)return r.jsx(t.components.missingReference,{path:o});throw Error(`Couldn't find the corresponding collection view for the path: ${o}`)}return r.jsx(qi,{...e,collection:l})}function qi(e){const{name:t,internalValue:n,updateValue:o,multiselect:l,path:i,size:s,previewProperties:a,title:d,disabled:f,forceFilter:g,collection:p}=e,[h,u]=c.useState(!1),m=c.useCallback(()=>u(!0),[]),b=c.useCallback(()=>u(!1),[]),y=c.useCallback(I=>{o(I?Ue(I):null)},[o]),C=c.useCallback(I=>{o(I.map(F=>Ue(F)))},[o]),w=n?Array.isArray(n)?n.map(I=>I.id):n.id?[n.id]:[]:[],E=wt({multiselect:l,path:i,collection:p,onMultipleEntitiesSelected:C,onSingleEntitySelected:y,selectedEntityIds:w,forceFilter:g}),k=c.useCallback(()=>{f||E.open()},[f,E]),x=!n||Array.isArray(n)&&n.length===0,S=()=>n instanceof Ne?r.jsx(Ve,{onClick:f?void 0:k,size:Ke(s),reference:n,onHover:h,disabled:!i,previewProperties:a}):r.jsx(Kt,{onClick:f?void 0:k,size:Ke(s),children:r.jsx(me,{title:"Value is not a reference.",error:"Click to edit"})}),B=()=>Array.isArray(n)?r.jsx(r.Fragment,{children:n.map((I,F)=>r.jsx("div",{className:"m-1 w-full",children:r.jsx(Ve,{onClick:f?void 0:k,size:"tiny",reference:I,onHover:h,disabled:!i,previewProperties:a})},`preview_array_ref_${t}_${F}`))}):r.jsx(me,{error:"Data is not an array of references"});return p?r.jsxs("div",{className:"w-full",onMouseEnter:m,onMouseMove:m,onMouseLeave:b,children:[n&&!l&&S(),n&&l&&B(),x&&r.jsxs(A.Button,{onClick:k,size:"small",variant:"outlined",color:"primary",children:["Edit ",d]})]}):r.jsx(me,{error:"The specified collection does not exist"})}xe.addMethod(xe.array,"uniqueInArray",function(e=n=>n,t){return this.test("uniqueInArray",t,n=>!n||n.length===new Set(n.map(e)).size)});function To(e,t,n){const o={};return Object.entries(t).forEach(([l,i])=>{o[l]=Tt({property:i,customFieldValidator:n,name:l,entityId:e})}),xe.object().shape(o)}function Tt(e){const t=e.property;if(ye(t))throw console.error("Error in property",e),Error("Trying to create a yup mapping from a property builder. Please use resolved properties only");if(t.dataType==="string")return Xi(e);if(t.dataType==="number")return Ki(e);if(t.dataType==="boolean")return rs(e);if(t.dataType==="map")return Zi(e);if(t.dataType==="array")return os(e);if(t.dataType==="date")return es(e);if(t.dataType==="geopoint")return Ri(e);if(t.dataType==="reference")return ts(e);throw console.error("Unsupported data type in yup mapping",t),Error("Unsupported data type in yup mapping")}function Zi({property:e,entityId:t,customFieldValidator:n,name:o}){const l={};return e.validation,e.properties&&Object.entries(e.properties).forEach(([i,s])=>{l[i]=Tt({property:s,parentProperty:e,customFieldValidator:n,name:`${o}[${i}]`,entityId:t})}),xe.object().shape(l)}function Xi({property:e,parentProperty:t,customFieldValidator:n,name:o,entityId:l}){let i=xe.string();const s=e.validation;if(e.enumValues){s?.required&&(i=i.required(s?.requiredMessage?s.requiredMessage:"Required"));const a=He(e.enumValues);i=i.oneOf((s?.required?a:[...a,null]).map(d=>d?.id??null)).nullable(!0)}if(s){if(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),s.unique&&n&&o&&(i=i.test("unique","This value already exists and should be unique",(a,d)=>n({name:o,property:e,parentProperty:t,value:a,entityId:l}))),(s.min||s.min===0)&&(i=i.min(s.min,`${e.name} must be min ${s.min} characters long`)),(s.max||s.max===0)&&(i=i.max(s.max,`${e.name} must be max ${s.max} characters long`)),s.matches){const a=typeof s.matches=="string"?Gn(s.matches):s.matches;a&&(i=i.matches(a,s.matchesMessage?{message:s.matchesMessage}:void 0))}s.trim&&(i=i.trim()),s.lowercase&&(i=i.lowercase()),s.uppercase&&(i=i.uppercase()),e.email&&(i=i.email(`${e.name} must be an email`)),e.url&&(i=i.url(`${e.name} must be a url`))}else i=i.notRequired().nullable(!0);return i}function Ki({property:e,parentProperty:t,customFieldValidator:n,name:o,entityId:l}){const i=e.validation;let s=xe.number().typeError("Must be a number");return i?(s=i.required?s.required(i.requiredMessage?i.requiredMessage:"Required").nullable(!0):s.notRequired().nullable(!0),i.unique&&n&&o&&(s=s.test("unique","This value already exists and should be unique",a=>n({name:o,property:e,parentProperty:t,value:a,entityId:l}))),(i.min||i.min===0)&&(s=s.min(i.min,`${e.name} must be higher or equal to ${i.min}`)),(i.max||i.max===0)&&(s=s.max(i.max,`${e.name} must be lower or equal to ${i.max}`)),(i.lessThan||i.lessThan===0)&&(s=s.lessThan(i.lessThan,`${e.name} must be higher than ${i.lessThan}`)),(i.moreThan||i.moreThan===0)&&(s=s.moreThan(i.moreThan,`${e.name} must be lower than ${i.moreThan}`)),i.positive&&(s=s.positive(`${e.name} must be positive`)),i.negative&&(s=s.negative(`${e.name} must be negative`)),i.integer&&(s=s.integer(`${e.name} must be an integer`))):s=s.notRequired().nullable(!0),s}function Ri({property:e,parentProperty:t,customFieldValidator:n,name:o,entityId:l}){let i=xe.object();const s=e.validation;return s?.unique&&n&&o&&(i=i.test("unique","This value already exists and should be unique",a=>n({name:o,property:e,parentProperty:t,value:a,entityId:l}))),s?.required?i=i.required(s.requiredMessage).nullable(!0):i=i.notRequired().nullable(!0),i}function es({property:e,parentProperty:t,customFieldValidator:n,name:o,entityId:l}){if(e.autoValue)return xe.object().nullable();let i=xe.date();const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required"):i.notRequired(),s.unique&&n&&o&&(i=i.test("unique","This value already exists and should be unique",a=>n({name:o,property:e,parentProperty:t,value:a,entityId:l}))),s.min&&(i=i.min(s.min,`${e.name} must be after ${s.min}`)),s.max&&(i=i.max(s.max,`${e.name} must be before ${s.min}`))):i=i.notRequired(),i.transform(a=>a instanceof Date?a:null).nullable()}function ts({property:e,parentProperty:t,customFieldValidator:n,name:o,entityId:l}){let i=xe.object();const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),s.unique&&n&&o&&(i=i.test("unique","This value already exists and should be unique",a=>n({name:o,property:e,parentProperty:t,value:a,entityId:l})))):i=i.notRequired().nullable(!0),i}function rs({property:e,parentProperty:t,customFieldValidator:n,name:o,entityId:l}){let i=xe.boolean();const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),s.unique&&n&&o&&(i=i.test("unique","This value already exists and should be unique",a=>n({name:o,property:e,parentProperty:t,value:a,entityId:l})))):i=i.notRequired().nullable(!0),i}function ns(e){return e.validation?.uniqueInArray?!0:e.dataType==="map"&&e.properties?Object.entries(e.properties).filter(([t,n])=>n.validation?.uniqueInArray):!1}function os({property:e,parentProperty:t,customFieldValidator:n,name:o,entityId:l}){let i=xe.array();if(e.of)if(Array.isArray(e.of)){const a=e.of.map((d,f)=>({[`${o}[${f}]`]:Tt({property:d,parentProperty:e,entityId:l})})).reduce((d,f)=>({...d,...f}),{});return xe.array().of(xe.mixed().test("Dynamic object validation","Dynamic object validation error",(d,f)=>je(a,f.path).validate(d)))}else{i=i.of(Tt({property:e.of,parentProperty:e,entityId:l}));const a=ns(e.of);a&&(typeof a=="boolean"?i=i.uniqueInArray(d=>d,`${e.name} should have unique values within the array`):Array.isArray(a)&&a.forEach(([d,f])=>{i=i.uniqueInArray(g=>g&&g[d],`${e.name} → ${f.name??d}: should have unique values within the array`)}))}const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),(s.min||s.min===0)&&(i=i.min(s.min,`${e.name} should be min ${s.min} entries long`)),s.max&&(i=i.max(s.max,`${e.name} should be max ${s.max} entries long`))):i=i.notRequired().nullable(!0),i}function bt(e){switch(e){case"xl":return 400;case"l":return 280;case"m":return 140;case"s":return 80;case"xs":return 54;default:throw Error("Missing mapping for collection size -> height")}}const ls=({justifyContent:e,scrollable:t,faded:n,fullHeight:o,children:l})=>r.jsx("div",{className:A.cn("flex flex-col max-h-full w-full",{"items-start":n||t}),style:{justifyContent:e,height:o?"100%":void 0,overflow:t?"auto":void 0,WebkitMaskImage:n?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0,maskImage:n?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0},children:l}),Zr=c.memo(function({children:t,actions:n,size:o,selected:l,disabled:i,disabledTooltip:s,saved:a,error:d,align:f,allowScroll:g,removePadding:p,fullHeight:h,onSelect:u,width:m,hideOverflow:b=!0,showExpandIcon:y=!0}){const[C,w]=Ar(),E=c.useRef(null);A.useOutsideAlerter(E,()=>{l&&u&&u(void 0)},!!(l&&u));const[k,x]=c.useState(!1),S=c.useMemo(()=>bt(o),[o]),[B,I]=c.useState(!1),[F,Q]=c.useState(a),N=!i&&d;c.useEffect(()=>{a&&Q(!0);const Y=setTimeout(()=>{Q(!1)},800);return()=>{clearTimeout(Y)}},[a]);let D=0;if(!p)switch(o){case"l":case"xl":D=4;break;case"m":D=2;break;case"s":default:D=1;break}let G;switch(f){case"right":G="flex-end";break;case"center":G="center";break;case"left":default:G="flex-start"}const H=c.useCallback(()=>{if(!u)return;const Y=E&&E?.current?.getBoundingClientRect();i?u(void 0):!l&&Y&&u(Y)},[E,u,l,i]),L=c.useCallback(Y=>{H(),Y.stopPropagation()},[H]);c.useEffect(()=>{if(w){const Y=w.height>S;k!==Y&&x(Y)}},[w,k,S]);const q=!N&&l,K=!i&&g&&k,W=!i&&!g&&k,U=c.useCallback(()=>I(!0),[]),X=c.useCallback(()=>I(!1),[]);return r.jsxs("div",{ref:E,className:A.cn("transition-colors duration-100 ease-in-out",`flex relative h-full rounded-md p-${D} border border-4 border-opacity-75`,B&&!i?"bg-gray-50 dark:bg-gray-900":"",a?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",!q&&!F&&!N?"border-transparent":"",b?"overflow-hidden":"",q?"bg-gray-50 dark:bg-gray-900":"",q&&!F?"border-primary":"",F?"border-green-500 ":"",N?"border-red-500":""),style:{justifyContent:G,alignItems:i||!k?"center":void 0,width:m??"100%",textAlign:f},tabIndex:l||i?void 0:0,onFocus:L,onMouseEnter:U,onMouseMove:U,onMouseLeave:X,children:[r.jsxs(te,{children:[h&&!W&&t,(!h||W)&&r.jsx(ls,{fullHeight:h??!1,justifyContent:G,scrollable:K??!1,faded:W,children:!h&&r.jsx("div",{ref:C,style:{display:"flex",width:"100%",justifyContent:G,height:h?"100%":void 0},children:t})})]}),n,i&&B&&s&&r.jsx("div",{className:"absolute top-1 right-1 text-xs",children:r.jsx(A.Tooltip,{title:s,children:r.jsx(A.RemoveCircleIcon,{size:"smallest",color:"disabled",className:"text-gray-500"})})})]})},(e,t)=>e.error===t.error&&e.value===t.value&&e.disabled===t.disabled&&e.saved===t.saved&&e.allowScroll===t.allowScroll&&e.align===t.align&&e.size===t.size&&e.disabledTooltip===t.disabledTooltip&&e.width===t.width&&e.showExpandIcon===t.showExpandIcon&&e.removePadding===t.removePadding&&e.fullHeight===t.fullHeight&&e.selected===t.selected);function is(e){return e.dataType==="string"&&e.storage?!0:e.dataType==="array"?Array.isArray(e.of)?!1:e.of?.dataType==="string"&&e.of?.storage:!1}const ss=c.memo(function({propertyKey:t,customFieldValidator:n,value:o,property:l,align:i,width:s,height:a,path:d,entity:f,readonly:g,disabled:p}){const h=J(),{onValueChange:u,size:m,selectedCell:b,select:y,setPopupCell:C}=Es(),w=b?.propertyKey===t&&b?.entity.path===f.path&&b?.entity.id===f.id,[E,k]=c.useState(o),x=c.useRef(o),[S,B]=c.useState(),[I,F]=c.useState(!1),Q=c.useCallback(()=>{F(!0),setTimeout(()=>{F(!1)},100)},[]),N=!!l.Field,D=!!l.Preview,G=dt(l),H=typeof l.disabled=="object"?l.disabled.disabledMessage:void 0,L=g||p||!!l.disabled,q=c.useMemo(()=>Tt({property:l,entityId:f.id,customFieldValidator:n,name:t}),[f.id,l,t]);c.useEffect(()=>{ie(o,x.current)||(B(void 0),k(o),x.current=o,Q())},[Q,o]);const K=P=>{ie(P,x.current)||(F(!1),q.validate(P).then(()=>{B(void 0),x.current=P,u&&u({value:P,propertyKey:t,setError:B,onValueUpdated:Q,entity:f,fullPath:d,context:h})}).catch(M=>{B(M)}))};c.useEffect(()=>{q.validate(E).then(()=>B(void 0)).catch(P=>{B(P)})},[E,q,t,l,f]);const W=P=>{let M;P===void 0?M=null:M=P,k(M),K(M)};Fe({property:l,value:E,setValue:W});const U=c.useCallback(P=>{y(P?{width:s,height:a,entity:f,cellRect:P,propertyKey:t}:void 0)},[f,a,t,y,s]),X=P=>{C&&C(P?{width:s,height:a,entity:f,cellRect:P,propertyKey:t}:void 0)};let Y,j=!1,re=!1,ce=!0,T=!1,V=!1,$=!0;const Z=!L&&S;if(g||G)return r.jsx(Zr,{size:m,width:s,saved:I,value:E,align:i??"left",fullHeight:!1,disabledTooltip:H??(G?"Read only":void 0),disabled:!0,children:r.jsx(ve,{width:s,height:bt(m),propertyKey:t,property:l,value:E,size:Ke(m)})},`${t}_${f.path}_${f.id}`);if(!N&&(!D||w)){if(is(l))Y=r.jsx(ji,{error:S,disabled:L,focused:w,selected:w,openPopup:C?X:void 0,property:l,entity:f,path:d,value:E,previewSize:Ke(m),updateValue:W,propertyKey:t}),$=!1,re=!0,V=!0,T=!0;else if(w&&l.dataType==="number"){const M=l;M.enumValues?(Y=r.jsx(Hr,{name:t,multiple:!1,disabled:L,focused:w,valueType:"number",small:Ke(m)!=="medium",enumValues:M.enumValues,error:S,internalValue:E,updateValue:W}),V=!0):(Y=r.jsx(Oi,{align:i,error:S,focused:w,disabled:L,value:E,updateValue:W}),j=!0)}else if(w&&l.dataType==="string"){const M=l;if(M.enumValues)Y=r.jsx(Hr,{name:t,multiple:!1,focused:w,disabled:L,valueType:"string",small:Ke(m)!=="medium",enumValues:M.enumValues,error:S,internalValue:E,updateValue:W}),V=!0;else if(!M.storage){const ne=!!M.multiline||!!M.markdown;Y=r.jsx(Di,{error:S,disabled:L,multiline:ne,focused:w,value:E,updateValue:W}),j=!0}}else if(l.dataType==="boolean")Y=r.jsx(Vi,{error:S,disabled:L,focused:w,internalValue:E,updateValue:W});else if(l.dataType==="date")Y=r.jsx(Gi,{name:t,error:S,disabled:L,mode:l.mode,focused:w,internalValue:E,updateValue:W}),V=!0,ce=!1,j=!1;else if(l.dataType==="reference")typeof l.path=="string"&&(Y=r.jsx(No,{name:t,internalValue:E,updateValue:W,disabled:L,size:m,path:l.path,multiselect:!1,previewProperties:l.previewProperties,title:l.name,forceFilter:l.forceFilter})),j=!1;else if(l.dataType==="array"){const M=l;if(!M.of&&!M.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);M.of&&!Array.isArray(M.of)&&(M.of.dataType==="string"||M.of.dataType==="number"?w&&M.of.enumValues&&(Y=r.jsx(Hr,{name:t,multiple:!0,disabled:L,focused:w,small:Ke(m)!=="medium",valueType:M.of.dataType,enumValues:M.of.enumValues,error:S,internalValue:E,updateValue:W}),j=!0,V=!0,ce=!1):M.of.dataType==="reference"&&(typeof M.of.path=="string"&&(Y=r.jsx(No,{name:t,disabled:L,internalValue:E,updateValue:W,size:m,multiselect:!0,path:M.of.path,previewProperties:M.of.previewProperties,title:M.of.name,forceFilter:M.of.forceFilter})),j=!1))}}return Y||(j=!1,re=w&&!Y&&!L&&!G,Y=r.jsx(ve,{width:s,height:a,propertyKey:t,value:E,property:l,size:Ke(m)})),r.jsx(Zr,{size:m,width:s,onSelect:U,selected:w,disabled:L||G,disabledTooltip:H??"Disabled",removePadding:T,fullHeight:V,saved:I,error:S,align:i,allowScroll:j,showExpandIcon:re,value:E,hideOverflow:ce,actions:$&&r.jsx(Fo,{showError:Z,disabled:L,showExpandIcon:re,selected:w,openPopup:L?void 0:X}),children:Y},`cell_${t}_${f.path}_${f.id}`)},as);function as(e,t){return e.height===t.height&&e.propertyKey===t.propertyKey&&e.align===t.align&&e.width===t.width&&ie(e.property,t.property)&&ie(e.value,t.value)&&ie(e.entity.id,t.entity.id)&&ie(e.entity.values,t.entity.values)}function Rt({text:e,...t}){return r.jsx("div",{className:"flex w-full h-screen max-h-full max-w-full bg-gray-50 dark:bg-gray-900 gap-4",children:r.jsxs("div",{className:"m-auto flex flex-col gap-2 items-center",children:[r.jsx(A.CircularProgress,{...t}),e&&r.jsx(A.Typography,{color:"secondary",variant:"caption",className:"text-center",children:e})]})})}const cs=c.memo(function({resizeHandleRef:t,columnIndex:n,isResizingIndex:o,sort:l,onColumnSort:i,onFilterUpdate:s,filter:a,column:d,onClickResizeColumn:f,createFilterField:g,AdditionalHeaderWidget:p}){const[h,u]=c.useState(!1),[m,b]=c.useState(!1),[y,C]=c.useState(!1),w=c.useCallback(B=>{b(!0)},[]),E=c.useCallback((B,I)=>{s(d,B),I!==void 0&&b(I)},[d,s]),k=o===n,S=!(o!==n&&o>0)&&(h||k);return r.jsx(te,{children:r.jsxs("div",{className:A.cn("flex py-0 px-3 h-full text-xs uppercase font-semibold relative select-none items-center bg-gray-50 dark:bg-gray-900","text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200 ","hover:bg-gray-100 dark:hover:bg-gray-800 hover:bg-opacity-50 dark:hover:bg-opacity-50",d.frozen?"sticky left-0 z-10":"relative z-0"),style:{left:d.frozen?0:void 0,minWidth:d.width,maxWidth:d.width},onMouseEnter:()=>u(!0),onMouseMove:()=>u(!0),onMouseLeave:()=>u(!1),children:[r.jsx("div",{className:"overflow-hidden flex-grow",children:r.jsxs("div",{className:`flex items-center justify-${d.headerAlign} flex-row`,children:[d.icon&&d.icon(h||m),r.jsx("div",{className:"truncate -webkit-box w-full mx-1 overflow-hidden",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:2,justifyContent:d.align},children:d.title})]})}),r.jsxs(r.Fragment,{children:[p&&r.jsx(p,{onHover:h||m}),d.sortable&&(l||S||m)&&r.jsx(A.Badge,{color:"secondary",invisible:!l,children:r.jsxs(A.IconButton,{size:"small",className:h||m?"bg-white dark:bg-gray-950":void 0,onClick:()=>{i(d.key)},children:[!l&&r.jsx(A.ArrowUpwardIcon,{}),l==="asc"&&r.jsx(A.ArrowUpwardIcon,{}),l==="desc"&&r.jsx(A.ArrowUpwardIcon,{className:"rotate-180"})]})})]}),d.filter&&g&&r.jsx("div",{children:r.jsx(A.Badge,{color:"secondary",invisible:!a,children:r.jsx(A.Popover,{open:m,onOpenChange:b,className:y?"hidden":void 0,modal:!0,trigger:r.jsx(A.IconButton,{className:h||m?"bg-white dark:bg-gray-950":void 0,size:"small",onClick:w,children:r.jsx(A.FilterListIcon,{size:"small"})}),children:r.jsx(ds,{column:d,filter:a,onHover:h,onFilterUpdate:E,createFilterField:g,hidden:y,setHidden:C})})})}),d.resizable&&r.jsx("div",{ref:t,className:A.cn("absolute h-full w-[6px] top-0 right-0 cursor-col-resize",S&&"bg-gray-300 dark:bg-gray-700"),onMouseDown:f?()=>f(n,d):void 0})]})})},ie);function ds({column:e,onFilterUpdate:t,filter:n,onHover:o,createFilterField:l,hidden:i,setHidden:s}){const a=e.key,[d,f]=c.useState(n);if(c.useEffect(()=>{f(n)},[n]),!e.filter)return null;const g=()=>{t(d,!1)},p=m=>{t(void 0,!1)},h=!!n,u=l({id:a,filterValue:d,setFilterValue:f,column:e,hidden:i,setHidden:s});return u?r.jsxs("div",{className:"text-gray-900 dark:text-white",children:[r.jsx("div",{className:A.cn(A.defaultBorderMixin,"py-4 px-6 text-xs font-semibold uppercase border-b"),children:e.title??a}),u&&r.jsx("div",{className:"m-4",children:u}),r.jsxs("div",{className:"flex justify-end m-4",children:[r.jsx(A.Button,{className:"mr-4",disabled:!h,variant:"text",color:"primary",type:"reset","aria-label":"filter clear",onClick:p,children:"Clear"}),r.jsx(A.Button,{variant:"outlined",color:"primary",onClick:g,children:"Filter"})]})]}):null}const As=({columns:e,currentSort:t,onColumnSort:n,onFilterUpdate:o,sortByProperty:l,filter:i,onColumnResize:s,onColumnResizeEnd:a,createFilterField:d,AddColumnComponent:f})=>{const g=e.map(()=>c.createRef()),[p,h]=c.useState(-1),u=c.useCallback((x,S,B)=>{const I=e[x],F=100,Q=800,N=S>Q?Q:S<F?F:S,D={width:N,key:I.key,column:{...I,width:N}};B?a(D):s(D)},[e,s,a]),m=c.useCallback(x=>{if(p>=0){const S=g[p].current?.parentElement?.getBoundingClientRect().left;return S?x.clientX-S:void 0}},[g,p]),b=c.useCallback(x=>{document.body.style.cursor=x?"col-resize":"auto"},[]),y=c.useCallback(x=>{x.stopPropagation(),x.preventDefault();const S=m(x);S&&u(p,S,!1)},[u,m,p]),C=c.useCallback(x=>{x.stopPropagation(),x.preventDefault();const S=m(x);S&&u(p,S,!0),h(-1),b(!1)},[u,m,p,b]),w=c.useCallback(()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",C)},[y,C]),E=c.useCallback(()=>{document.addEventListener("mousemove",y),document.addEventListener("mouseup",C)},[y,C]);c.useEffect(()=>(p>=0?E():w(),()=>{w()}),[E,p,w]);const k=c.useCallback(x=>{h(x),b(!0)},[b]);return r.jsxs("div",{className:A.cn(A.defaultBorderMixin,"z-20 sticky min-w-full flex w-fit flex-row top-0 left-0 h-12 border-b bg-gray-50 dark:bg-gray-900"),children:[e.map((x,S)=>{const B=e[S],I=B&&i&&i[B.key]?i[B.key]:void 0;return r.jsx(te,{children:r.jsx(cs,{resizeHandleRef:g[S],columnIndex:S,isResizingIndex:p,onFilterUpdate:o,filter:I,sort:l===B.key?t:void 0,onColumnSort:n,onClickResizeColumn:k,column:B,createFilterField:d,AdditionalHeaderWidget:B.AdditionalHeaderWidget})},"header_"+B.key)}),f&&r.jsx(f,{})]})},fs=c.memo(function({rowData:t,rowIndex:n,children:o,onRowClick:l,size:i,style:s,hoverRow:a,rowClassName:d}){const f=c.useCallback(g=>{console.debug("VirtualTableRow click"),l&&l({rowData:t,rowIndex:n,event:g})},[l,t,n]);return r.jsx("div",{className:A.cn("flex min-w-full text-sm border-b border-gray-200 dark:border-gray-800 border-opacity-40 dark:border-opacity-40",d?d(t):"",{"hover:bg-opacity-95":a,"cursor-pointer":l}),onClick:f,style:{...s,height:bt(i),width:"fit-content"},children:o})},ie),us=c.memo(function(t){return t.rowData&&t.cellRenderer({cellData:t.cellData,rowData:t.rowData,rowIndex:t.rowIndex,isScrolling:!1,column:t.column,columns:t.columns,columnIndex:t.columnIndex,width:t.column.width})},(e,t)=>ie(e,t)),er=c.createContext({});er.displayName="VirtualListContext";const gs=c.forwardRef(({children:e,...t},n)=>r.jsx(er.Consumer,{children:o=>{const l=o.customView;return r.jsxs(r.Fragment,{children:[r.jsx("div",{id:"virtual-table",style:{position:"relative",height:"100%"},children:r.jsxs("div",{ref:n,...t,style:{...t?.style,minHeight:"100%",position:"relative"},children:[r.jsx(As,{...o}),!l&&e]})}),l&&r.jsx("div",{style:{position:"sticky",top:"56px",flexGrow:1,height:"calc(100% - 56px)",marginTop:"calc(56px - 100vh)",left:0},children:l})]})}})),Po=c.memo(function({data:t,onResetPagination:n,onEndReached:o,size:l="m",columns:i,onRowClick:s,onColumnResize:a,filter:d,checkFilterCombination:f,onFilterUpdate:g,sortBy:p,error:h,emptyComponent:u,onSortByUpdate:m,loading:b,cellRenderer:y,hoverRow:C,createFilterField:w,rowClassName:E,className:k,endAdornment:x,AddColumnComponent:S}){const B=p?p[0]:void 0,I=p?p[1]:void 0,[F,Q]=c.useState(i),N=c.useRef(null),D=c.useRef(0);c.useEffect(()=>{Q(i)},[i]);const[G,H]=Ar(),L=c.useCallback(P=>{Q(F.map(M=>M.key===P.column.key?P.column:M))},[F]),q=c.useCallback(P=>{Q(F.map(M=>M.key===P.column.key?P.column:M)),a&&a(P)},[F,a]),K=c.useRef();c.useEffect(()=>{K.current=d},[d]);const W=c.useCallback(()=>{D.current=0,N.current&&N.current.scrollTo(N.current?.scrollLeft,0)},[]),U=c.useCallback(P=>{const M=B===P&&I==="desc",fe=B===P&&I==="asc"?"desc":M?void 0:"asc",Ge=M?void 0:P,be=K.current,ge=fe&&Ge?[Ge,fe]:void 0;be&&f&&!f(be,ge)&&g&&g(void 0),n&&n(),m&&m(ge),W()},[f,I,g,n,m,W,B]),X=c.useCallback(()=>{D.current=0,m&&m(void 0)},[m]),Y=Math.max((t?.length??0)*bt(l)-H.height,0),j=c.useCallback(P=>{o&&(t?.length??0)>0&&P>D.current+600&&(D.current=P,o())},[t?.length,o]),re=c.useCallback(({scrollOffset:P,scrollUpdateWasRequested:M})=>{!M&&P>=Y-600&&j(P)},[Y,j]),ce=c.useCallback((P,M)=>{D.current=0;const ne=K.current;let fe=ne?{...ne}:{};M?fe[P.key]=M:delete fe[P.key],!f||f(fe,B&&I?[B,I]:void 0)||(fe=M?{[P.key]:M}:{}),g&&g(fe),P.key!==B&&X()},[f,I,g,X,B]),T=c.useCallback(()=>r.jsxs("div",{className:"h-full flex flex-col items-center justify-center sticky left-0",children:[r.jsx(A.Typography,{variant:"h6",children:"Error fetching data from the data source"}),h?.message&&r.jsx(A.Markdown,{className:"px-4 break-all",source:h.message})]}),[h?.message]),V=c.useCallback(()=>b?r.jsx(Rt,{}):r.jsxs("div",{className:"flex flex-col overflow-auto items-center justify-center p-2 gap-2 h-full",children:[r.jsx(A.AssignmentIcon,{}),u]}),[u,b]),$=!b&&(t?.length??0)===0,Z=h?T():$?V():void 0;return r.jsx("div",{ref:G,className:A.cn("h-full w-full",k),children:r.jsx(er.Provider,{value:{data:t,size:l,cellRenderer:y,columns:F,currentSort:I,onRowClick:s,customView:Z,onColumnResize:L,onColumnResizeEnd:q,filter:K.current,onColumnSort:U,onFilterUpdate:ce,sortByProperty:B,hoverRow:C??!1,createFilterField:w,rowClassName:E,endAdornment:x,AddColumnComponent:S},children:r.jsx(hs,{outerRef:N,width:H.width,height:H.height,itemCount:(t?.length??0)+(x?1:0),onScroll:re,includeAddColumn:!!S,itemSize:bt(l)},l)})})},ie);function hs({outerRef:e,width:t,height:n,itemCount:o,onScroll:l,itemSize:i,includeAddColumn:s}){const a=c.useCallback(({index:d,style:f})=>r.jsx(er.Consumer,{children:({onRowClick:g,data:p,columns:h,size:u="m",cellRenderer:m,hoverRow:b,rowClassName:y,endAdornment:C})=>{if(C&&d===(p??[]).length)return r.jsx("div",{style:{...f,height:"auto",position:"sticky",bottom:0,zIndex:1},children:C});const w=p&&p[d];return r.jsxs(fs,{rowData:w,rowIndex:d,onRowClick:g,columns:h,hoverRow:b,rowClassName:y,style:{...f,top:`calc(${f.top}px + 48px)`},size:u,children:[h.map((E,k)=>{const x=w&&w[E.key];return r.jsx(us,{dataKey:E.key,cellRenderer:m,column:E,columns:h,rowData:w,cellData:x,rowIndex:d,columnIndex:k},`cell_${E.key}`)}),s&&r.jsx("div",{className:"w-20"})]},`row_${d}`)}}),[]);return r.jsx(El.FixedSizeList,{outerRef:e,innerElementType:gs,width:t,height:n,overscanCount:4,itemCount:o,onScroll:l,itemSize:i,children:a})}const Xr=c.memo(function({entity:t,collection:n,fullPath:o,width:l,frozen:i,isSelected:s,selectionEnabled:a,size:d,highlightEntity:f,onCollectionChange:g,unhighlightEntity:p,actions:h=[],hideId:u,selectionController:m}){const b=Me(),y=J(),C=c.useCallback(B=>{m?.toggleEntitySelection(t)},[t,m?.toggleEntitySelection]),w=c.useCallback(B=>{B.stopPropagation(),m?.toggleEntitySelection(t)},[t,m?.toggleEntitySelection]),E=h.length>0,k=h.some(B=>B.collapsed||B.collapsed===void 0),x=h.filter(B=>B.collapsed||B.collapsed===void 0),S=h.filter(B=>B.collapsed===!1);return r.jsxs("div",{onClick:w,className:A.cn("h-full flex items-center justify-center flex-col bg-gray-50 dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-10",i?"sticky left-0":""),style:{width:l,position:i?"sticky":"initial",left:i?0:"initial",contain:"strict"},children:[(E||a)&&r.jsxs("div",{className:"w-34 flex justify-center",children:[S.map((B,I)=>r.jsx(A.Tooltip,{title:B.name,children:r.jsx(A.IconButton,{onClick:F=>{F.stopPropagation(),B.onClick({entity:t,fullPath:o,collection:n,context:y,selectionController:m,highlightEntity:f,unhighlightEntity:p,onCollectionChange:g})},size:b?"medium":"small",children:B.icon})},I)),k&&r.jsx(A.Menu,{trigger:r.jsx(A.IconButton,{size:b?"medium":"small",children:r.jsx(A.MoreVertIcon,{})}),children:x.map((B,I)=>r.jsxs(A.MenuItem,{onClick:F=>{F.stopPropagation(),B.onClick({entity:t,fullPath:o,collection:n,context:y,selectionController:m,highlightEntity:f,unhighlightEntity:p,onCollectionChange:g})},children:[B.icon,B.name]},I))}),a&&r.jsx(A.Tooltip,{title:`Select ${t.id}`,children:r.jsx(A.Checkbox,{size:b?"medium":"small",checked:s,onCheckedChange:C})})]}),!u&&d!=="xs"&&r.jsx("div",{className:"w-[138px] text-center overflow-hidden truncate",children:t?r.jsxs(A.Typography,{onClick:B=>{B.stopPropagation()},className:"font-mono select-all",variant:"caption",color:"secondary",children:[" ",t.id," "]}):r.jsx(A.Skeleton,{})})]})},ie);function ps(e){const t=c.useRef(null),n=Me(),o=c.useRef(!1);c.useEffect(()=>{t.current&&o.current&&!e.textSearchLoading&&t.current.focus(),o.current=e.textSearchLoading??!1},[e.textSearchLoading]);const l=!e.forceFilter&&e.filterIsSet&&e.clearFilter&&r.jsxs(A.Button,{variant:"outlined",className:"h-fit-content","aria-label":"filter clear",onClick:e.clearFilter,size:"small",children:[r.jsx(A.FilterListOffIcon,{}),"Clear filter"]}),i=r.jsx(A.Select,{value:e.size,className:"w-16 h-10",size:"small",onValueChange:s=>e.onSizeChanged(s),renderValue:s=>r.jsx("div",{className:"font-medium",children:s.toUpperCase()}),children:["xs","s","m","l","xl"].map(s=>r.jsx(A.SelectItem,{value:s,className:"w-12 font-medium text-center",children:s.toUpperCase()},s))});return r.jsxs("div",{className:A.cn(A.defaultBorderMixin,"no-scrollbar min-h-[56px] overflow-x-auto px-4 bg-gray-50 dark:bg-gray-900 border-b flex flex-row justify-between items-center w-full"),children:[r.jsxs("div",{className:"flex items-center gap-2",children:[e.title&&r.jsx("div",{className:"hidden lg:block",children:e.title}),i,e.actionsStart,l]}),r.jsxs("div",{className:"flex items-center gap-2",children:[n&&r.jsx("div",{className:"w-[22px]",children:e.loading&&r.jsx(A.CircularProgress,{size:"small"})}),(e.onTextSearch||e.onTextSearchClick)&&r.jsx(A.SearchBar,{inputRef:t,loading:e.textSearchLoading,disabled:!!e.onTextSearchClick,onClick:e.onTextSearchClick,onTextSearch:e.onTextSearchClick?void 0:e.onTextSearch,expandable:!0},"search-bar"),e.actions]})]})}const Qo={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Contains Any"},Kr=["array-contains-any","in","not-in"];function ms({name:e,value:t,setValue:n,isArray:o,path:l,title:i,previewProperties:s,setHidden:a}){const d=o?["array-contains"]:["==","!=",">","<",">=","<="],[f,g]=c.useState(!1);o?d.push("array-contains-any"):d.push("in","not-in");const[p,h]=t||[d[0],void 0],[u,m]=c.useState(p),[b,y]=c.useState(h),C=b?Array.isArray(b)?b.map(N=>N instanceof Ne?N.id:null).filter(Boolean):[b.id]:[];function w(N,D){const G=Kr.includes(u),H=Kr.includes(N);let L=D;G!==H&&(L=H?L instanceof Ne?[L]:[]:void 0),m(N),y(L);const q=L!==null&&Array.isArray(L)?L.length>0:L!==void 0;n(N&&q?[N,L]:void 0)}const E=ae(),k=c.useMemo(()=>l?E.getCollection(l):void 0,[l]),x=N=>{w(u,Ue(N))},S=N=>{w(u,N.map(D=>Ue(D)))},B=Kr.includes(u),I=wt({multiselect:B,path:l,collection:k,onSingleEntitySelected:x,onMultipleEntitiesSelected:S,selectedEntityIds:C,onClose:()=>{a(!1)}}),F=()=>{a(!0),I.open()},Q=N=>r.jsx("div",{className:"mb-0.5",onMouseEnter:()=>g(!0),onMouseMove:()=>g(!0),onMouseLeave:()=>g(!1),children:r.jsx(Ve,{disabled:!l,previewProperties:s,size:"medium",onClick:F,reference:N,onHover:f,allowEntityNavigation:!1})});return r.jsxs("div",{className:"flex w-[440px] flex-row",children:[r.jsx("div",{className:"w-[120px]",children:r.jsx(A.Select,{value:u,onValueChange:N=>{w(N,b)},renderValue:N=>Qo[N],children:d.map(N=>r.jsx(A.SelectItem,{value:N,children:Qo[N]},N))})}),r.jsxs("div",{className:"flex-grow ml-2 h-full",children:[b&&Array.isArray(b)&&r.jsx("div",{children:b.map((N,D)=>Q(N))}),b&&!Array.isArray(b)&&r.jsx("div",{children:Q(b)}),(!b||Array.isArray(b)&&b.length===0)&&r.jsx(A.Button,{onClick:F,variant:"outlined",className:"h-full w-full",children:B?"Select references":"Select reference"})]})]})}const Mo={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Any"},Rr=["array-contains-any","in","not-in"];function bs({name:e,value:t,setValue:n,dataType:o,isArray:l,enumValues:i,title:s}){const a=l?["array-contains"]:["==","!=",">","<",">=","<="];i&&(l?a.push("array-contains-any"):a.push("in","not-in"));const[d,f]=t||[a[0],void 0],[g,p]=c.useState(d),[h,u]=c.useState(f);function m(y,C){let w=C;const E=Rr.includes(g),k=Rr.includes(y);E!==k&&(w=k?typeof C=="string"||typeof C=="number"?[C]:[]:""),typeof w=="number"&&isNaN(w)&&(w=void 0),p(y),u(w);const x=w!==null&&Array.isArray(w)?w.length>0:w!==void 0;n(y&&x?[y,w]:void 0)}const b=Rr.includes(g);return r.jsxs("div",{className:"flex w-[440px] items-center",children:[r.jsx("div",{className:"w-[80px]",children:r.jsx(A.Select,{value:g,position:"item-aligned",onValueChange:y=>{m(y,h)},renderValue:y=>Mo[y],children:a.map(y=>r.jsx(A.SelectItem,{value:y,children:Mo[y]},y))})}),r.jsxs("div",{className:"flex-grow ml-2",children:[!i&&r.jsx(A.TextField,{type:o==="number"?"number":void 0,value:h!==void 0?String(h):"",onChange:y=>{const C=o==="number"?parseFloat(y.target.value):y.target.value;m(g,C)},endAdornment:h&&r.jsx(A.IconButton,{className:"absolute right-3 top-2",onClick:y=>m(g,void 0),children:r.jsx(A.ClearIcon,{})})}),i&&r.jsx(A.Select,{position:"item-aligned",value:h!==void 0?Array.isArray(h)?h.map(y=>String(y)):String(h):l?[]:"",onValueChange:y=>{m(g,o==="number"?parseInt(y):y)},multiple:b,endAdornment:h&&r.jsx(A.IconButton,{className:"absolute right-3 top-2",onClick:y=>m(g,void 0),children:r.jsx(A.ClearIcon,{})}),renderValue:y=>r.jsx(Be,{enumKey:y,enumValues:i,size:"small"},`select_value_${e}_${y}`),children:i.map(y=>r.jsx(A.SelectItem,{value:String(y.id),children:r.jsx(Be,{enumKey:String(y.id),enumValues:i,size:"small"})},`select_value_${e}_${y.id}`))})]})]})}function ys({name:e,title:t,value:n,setValue:o}){function l(a){o(a!==void 0?["==",a]:void 0)}const i=n&&n[1],s=!!n;return r.jsx("div",{className:"w-[200px]",children:r.jsx(A.BooleanSwitchWithLabel,{value:i,allowIndeterminate:!0,onValueChange:a=>l(a===null?void 0:a),label:s?i?`${t} is true`:`${t} is false`:"No filter"})})}const Do={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=","not-in":"not in",in:"in","array-contains":"Contains","array-contains-any":"Any"},Oo=["array-contains-any","in"];function vs({name:e,isArray:t,mode:n,value:o,setValue:l,title:i}){const{locale:s}=J(),a=t?["array-contains"]:["==","!=",">","<",">=","<="],[d,f]=o||[a[0],void 0],[g,p]=c.useState(d),[h,u]=c.useState(f);function m(b,y){let C=y;const w=Oo.includes(g),E=Oo.includes(b);w!==E&&(C=E?y?[y]:[]:""),p(b),u(C===null?void 0:C);const k=C!==null&&Array.isArray(C)?C.length>0:C!==void 0;l(b&&k?[b,C]:void 0)}return r.jsxs("div",{className:"flex w-[440px] items-center",children:[r.jsx("div",{className:"w-[80px]",children:r.jsx(A.Select,{value:g,onValueChange:b=>{m(b,h)},renderValue:b=>Do[b],children:a.map(b=>r.jsx(A.SelectItem,{value:b,children:Do[b]},b))})}),r.jsx("div",{className:"flex-grow ml-2",children:r.jsx(A.DateTimeField,{mode:n,size:"medium",locale:s,value:h,onChange:b=>{m(g,b===null?void 0:b)},clearable:!0})})]})}const Vo="collectionGroupParent";function Go(e,t){return c.useMemo(()=>e.propertiesOrder?Yo(e,e.propertiesOrder):ws(e,t),[e,t])}function Yo(e,t){return t.flatMap(n=>{const o=e.properties[n];return o?o.hideFromCollection?[null]:o.disabled&&typeof o.disabled=="object"&&o.disabled.hidden?[null]:o.dataType==="map"&&o.spreadChildren&&o.properties?en(o,n):[{key:n,disabled:!!o.disabled||!!o.readOnly}]:e.additionalFields?.find(i=>i.key===n)?[{key:n,disabled:!0}]:e.subcollections&&e.subcollections.find(s=>jr(s)===n)?[{key:n,disabled:!0}]:e.collectionGroup&&n===Vo?[{key:n,disabled:!0}]:[null]}).filter(Boolean)}function ws(e,t){const n=Object.keys(e.properties),o=e.additionalFields??[],l=e.subcollections??[],i=[...n,...o.map(s=>s.key)];if(t){const s=l.map(a=>jr(a));i.push(...s.filter(a=>!i.includes(a)))}return e.collectionGroup&&i.push(Vo),Yo(e,i)}function en(e,t,n){return e.dataType==="map"&&e.spreadChildren&&e.properties?Object.entries(e.properties).flatMap(([o,l])=>en(l,`${t}.${o}`,n||!!e.disabled||!!e.readOnly)):[{key:t,disabled:n||!!e.disabled||!!e.readOnly}]}const Cs={},zo=c.createContext(Cs),Es=()=>c.useContext(zo),tn=c.memo(function({forceFilter:t,actionsStart:n,actions:o,title:l,tableRowActionsBuilder:i,uniqueFieldValidator:s,getPropertyFor:a,onValueChange:d,selectionController:f,highlightedEntities:g,onEntityClick:p,onColumnResize:h,onSizeChanged:u,textSearchEnabled:m=!1,hoverRow:b=!0,inlineEditing:y=!1,additionalFields:C,displayedColumnIds:w,defaultSize:E,properties:k,tableController:{data:x,dataLoading:S,noMoreToLoad:B,dataLoadingError:I,filterValues:F,setFilterValues:Q,sortBy:N,setSortBy:D,setSearchString:G,clearFilter:H,itemCount:L,setItemCount:q,pageSize:K=50,paginationEnabled:W,checkFilterCombination:U,setPopupCell:X},filterable:Y=!0,sortable:j=!0,endAdornment:re,AddColumnComponent:ce,AdditionalHeaderWidget:T,additionalIDHeaderWidget:V,emptyComponent:$,getIdColumnWidth:Z,onTextSearchClick:P,textSearchLoading:M}){const ne=Me(),fe=!!t,Ge=f?.selectedEntities?.length>0?f?.selectedEntities:g,be=J(),[ge,Ct]=c.useState(E??"m"),[Re,_e]=c.useState(void 0),ze=Ge?.map(O=>O.id),Qt=!!F&&Object.keys(F).length>0,Mt=()=>{!W||S||B||L!==void 0&&q?.(L+K)},Et=c.useCallback(()=>{q?.(K)},[K]),et=c.useCallback(({rowData:O})=>{if(console.debug("EntityCollectionTable click"),!y)return p&&p(O)},[p,y]),st=c.useCallback(O=>{u&&u(O),Ct(O)},[]),Dt=c.useCallback(O=>G?.(O),[]),tt=c.useMemo(()=>C?C.map(O=>({[O.key]:O})).reduce((O,ee)=>({...O,...ee}),{}):{},[C]);c.useEffect(()=>{const O=ee=>{ee.keyCode===27&&he()};return document.addEventListener("keydown",O,!1),()=>{document.removeEventListener("keydown",O,!1)}});const z=c.useCallback(O=>{_e(O)},[]),he=c.useCallback(()=>{_e(void 0)},[]),ue=s,De=c.useCallback(({column:O,columnIndex:ee,rowData:se,rowIndex:Ee})=>{const le=se,Ye=O.key;let Oe=O.custom?.disabled;const vn=le.values?je(le.values,Ye):void 0,at=a?.({propertyKey:Ye,propertyValue:vn,entity:le})??O.custom.resolvedProperty;return at?.disabled||(Oe=!1),at?r.jsx(te,{children:le?r.jsx(ss,{readonly:!y,align:O.align??"left",propertyKey:Ye,property:at,value:le?.values?je(le.values,Ye):void 0,customFieldValidator:ue,columnIndex:ee,width:O.width,height:bt(ge),entity:le,disabled:Oe,path:le.path},`property_table_cell_${le.id}_${Ye}`):$e()}):null},[ue,y,ge,ze]),rt=c.useCallback(({column:O,rowData:ee,width:se})=>{const Ee=ee,le=tt[O.key],Ye=le.dependencies?Object.entries(Ee.values).filter(([at,vl])=>le.dependencies.includes(at)).reduce((at,vl)=>({...at,...vl}),{}):Ee,Oe=le.Builder;if(!Oe&&!le.value)throw new Error("When using additional fields you need to provide a Builder or a value");const vn=Oe?r.jsx(Oe,{entity:Ee,context:be}):r.jsx(r.Fragment,{children:le.value?.({entity:Ee,context:be})});return r.jsx(Zr,{width:se,size:ge,value:Ye,selected:!1,disabled:!0,align:"left",allowScroll:!1,showExpandIcon:!1,disabledTooltip:"This column can't be edited directly",children:r.jsx(te,{children:vn})},`additional_table_cell_${Ee.id}_${O.key}`)},[tt,ge,ze]),We=c.useMemo(()=>{const O=Object.entries(k).flatMap(([se,Ee])=>en(Ee,se)).map(({key:se,disabled:Ee})=>{const le=Ir(k,se);if(!le)throw Error("Internal error: no property found in path "+se);const Ye=Lo(le);return{key:se,align:Mi(le),icon:Oe=>pe(le,"small"),title:le.name??se,sortable:j&&(t?Object.keys(t).includes(se):!0),filter:!fe&&Ye,width:Co(le),resizable:!0,custom:{resolvedProperty:le,disabled:Ee},AdditionalHeaderWidget:({onHover:Oe})=>T?r.jsx(T,{property:le,propertyKey:se,onHover:Oe}):void 0}}),ee=C?C.map(se=>({key:se.key,align:"left",sortable:!1,title:se.name,width:se.width??200})):[];return[...O,...ee]},[C,fe,t,k,j]),Le=c.useMemo(()=>({key:"id_ewcfedcswdf3",width:Z?.()??(ne?160:130),title:"ID",resizable:!1,frozen:ne,headerAlign:"center",align:"center",AdditionalHeaderWidget:()=>V}),[Z,ne]),_=c.useMemo(()=>[Le,...w.map(O=>We.find(ee=>ee.key===O.key)).filter(Boolean)],[We,w,Le]),R=c.useCallback(O=>{const ee=O.column,se=O.columns,Ee=ee.key;if(O.columnIndex===0)return i?i({entity:O.rowData,size:ge,width:ee.width,frozen:ee.frozen}):r.jsx(Xr,{entity:O.rowData,width:ee.width,frozen:ee.frozen,isSelected:!1,size:ge});if(tt[Ee])return rt(O);if(O.columnIndex<se.length+1)return De(O);throw Error("Internal: columns not mapped properly")},[tt,i,ge,rt,De]),oe=c.useCallback(O=>{Q?.({...O,...t})},[t]);return r.jsx(zo.Provider,{value:{setPopupCell:X,select:z,onValueChange:d,size:ge,selectedCell:Re,selectedEntityIds:ze},children:r.jsxs("div",{className:"h-full w-full flex flex-col bg-white dark:bg-gray-950",children:[r.jsx(ps,{forceFilter:fe,filterIsSet:Qt,onTextSearch:m?Dt:void 0,textSearchLoading:M,onTextSearchClick:m?P:void 0,clearFilter:H,size:ge,onSizeChanged:st,title:l,actionsStart:n,actions:o,loading:S}),r.jsx(Po,{data:x,columns:_,cellRenderer:R,onRowClick:y?void 0:p?et:void 0,onEndReached:Mt,onResetPagination:Et,error:I,paginationEnabled:W,onColumnResize:h,size:ge,loading:S,filter:F,onFilterUpdate:Q?oe:void 0,sortBy:N,onSortByUpdate:D,hoverRow:b,emptyComponent:$,checkFilterCombination:U,createFilterField:Y?Bs:void 0,rowClassName:c.useCallback(O=>ze?.includes(O.id)?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",[ze]),className:"flex-grow",endAdornment:re,AddColumnComponent:ce})]})})},ie);function Bs({id:e,filterValue:t,setFilterValue:n,column:o,hidden:l,setHidden:i}){if(!o.custom)return null;const{resolvedProperty:s}=o.custom,a=s?.dataType==="array",d=a?s.of:s;if(!d)return null;if(d.dataType==="reference")return r.jsx(ms,{value:t,setValue:n,name:e,isArray:a,path:d.path,title:s?.name,previewProperties:d?.previewProperties,hidden:l,setHidden:i});if(d.dataType==="number"||d.dataType==="string"){const f=d.name,g=d.enumValues?He(d.enumValues):void 0;return r.jsx(bs,{value:t,setValue:n,name:e,dataType:d.dataType,isArray:a,enumValues:g,title:f})}else if(d.dataType==="boolean"){const f=d.name;return r.jsx(ys,{value:t,setValue:n,name:e,title:f})}else if(d.dataType==="date"){const f=d.name;return r.jsx(vs,{value:t,setValue:n,name:e,mode:d.mode,isArray:a,title:f})}return r.jsx("div",{children:`Currently the filter field ${s.dataType} is not supported`})}function Lo(e,t=!1){return t?["string","number","date","reference"].includes(e.dataType):e.dataType==="array"?e.of?Lo(e.of,!0):!1:["string","number","boolean","date","reference","array"].includes(e.dataType)}function ks({data:e,entitiesDisplayedFirst:t}){if(!t)return e;const n=new Set(t.map(o=>o.id));return[...t,...e.filter(o=>!n.has(o.id))]}function xs(e,t,n=5e3){const[o,l]=c.useState(e),i=c.useRef(o.length??0),s=c.useRef(!1),a=c.useRef(t),d=!ie(a.current,t),f=e.length>=i.current||d;return c.useEffect(()=>{const g=()=>{ie(o,e)||(a.current=t,i.current=e.length,l(e)),s.current=!1};s.current=!0;let p;return f?g():p=setTimeout(g,n),()=>{clearTimeout(p),s.current&&f&&g()}},[e,n,t,f]),f?e:o}const Ss=50;function rn({fullPath:e,collection:t,entitiesDisplayedFirst:n,lastDeleteTimestamp:o,forceFilter:l}){const{initialFilter:i,initialSort:s,forceFilter:a}=t,[d,f]=c.useState(void 0),g=ae(),p=Qe(),h=c.useMemo(()=>g.resolveAliasesFrom(e),[e,g.resolveAliasesFrom]),u=l??a,m=t.pagination===void 0||!!t.pagination,b=typeof t.pagination=="number"?t.pagination:Ss,[y,C]=c.useState(),[w,E]=c.useState(m?b:void 0),k=c.useMemo(()=>{if(s&&u&&!X(u,s)){console.warn("Initial sort is not compatible with the force filter. Ignoring initial sort");return}return s},[s,u]),[x,S]=c.useState(u??i??void 0),[B,I]=c.useState(k),F=B?B[0]:void 0,Q=B?B[1]:void 0,N=J(),[D,G]=c.useState([]),[H,L]=c.useState(!1),[q,K]=c.useState(),[W,U]=c.useState(!1),X=c.useCallback((T,V)=>p.isFilterCombinationValid?p.isFilterCombinationValid({path:h,collection:t,filterValues:T,sortBy:V}):!0,[]),Y=c.useCallback(()=>S(u??void 0),[u]),j=c.useCallback(T=>{if(u){console.warn("Filter is not compatible with the force filter. Ignoring filter");return}T&&Object.keys(T).length===0?S(void 0):S(T)},[u]);c.useEffect(()=>{L(!0);const T=async $=>{if(t.callbacks?.onFetch)try{$=await Promise.all($.map(Z=>t.callbacks.onFetch({collection:t,path:h,entity:Z,context:N})))}catch(Z){console.error(Z)}L(!1),K(void 0),G($.map(Z=>({...Z}))),U(!w||$.length<w)},V=$=>{console.error("ERROR",$),L(!1),G([]),K($)};return p.listenCollection?p.listenCollection({path:h,collection:t,onUpdate:T,onError:V,searchString:y,filter:x,limit:w,startAfter:void 0,orderBy:F,order:Q}):(p.fetchCollection({path:h,collection:t,searchString:y,filter:x,limit:w,startAfter:void 0,orderBy:F,order:Q}).then(T).catch(V),()=>{})},[h,w,Q,F,x,y]);const re=ks({data:D,entitiesDisplayedFirst:n});return{data:xs(re,{filterValues:x,sortBy:B,searchString:y,lastDeleteTimestamp:o}),dataLoading:H,noMoreToLoad:W,dataLoadingError:q,filterValues:x,setFilterValues:j,sortBy:B,setSortBy:I,searchString:y,setSearchString:C,clearFilter:Y,itemCount:w,setItemCount:E,paginationEnabled:m,pageSize:b,checkFilterCombination:X,popupCell:d,setPopupCell:f}}function Uo({entityOrEntitiesToDelete:e,collection:t,onClose:n,open:o,callbacks:l,onEntityDelete:i,onMultipleEntitiesDelete:s,path:a}){const d=Qe();console.log("dataSource",d);const f=Xe(),[g,p]=c.useState(!1),[h,u]=c.useState(),[m,b]=c.useState(),y=J();c.useEffect(()=>{if(e){const N=Array.isArray(e)&&e.length===1?e[0]:e;u(N),b(Array.isArray(N))}},[e]);const C=c.useMemo(()=>Ie({collection:t,path:a,fields:y.propertyConfigs}),[t,a]),w=c.useCallback(()=>{n()},[n]),E=c.useCallback(N=>{console.debug("Deleted",N)},[]),k=c.useCallback((N,D)=>{f.open({type:"error",message:"Error deleting: "+D?.message}),console.error("Error deleting entity"),console.error(D)},[C.name]),x=c.useCallback((N,D)=>{f.open({type:"error",message:"Error before deleting: "+D?.message}),console.error(D)},[C.name]),S=c.useCallback((N,D)=>{f.open({type:"error",message:"Error after deleting: "+D?.message}),console.error(D)},[C.name]),B=c.useCallback(N=>oo({dataSource:d,entity:N,collection:C,callbacks:l,onDeleteSuccess:E,onDeleteFailure:k,onPreDeleteHookError:x,onDeleteSuccessHookError:S,context:y}),[d,C,l,E,k,x,S,y]),I=c.useCallback(async()=>{h&&(p(!0),m?Promise.all(h.map(B)).then(N=>{p(!1),s&&h&&s(a,h),N.every(Boolean)?f.open({type:"success",message:`${C.name}: multiple deleted`}):N.some(Boolean)?f.open({type:"warning",message:`${C.name}: Some of the entities have been deleted, but not all`}):f.open({type:"error",message:`${C.name}: Error deleting entities`}),n()}):B(h).then(N=>{p(!1),N&&(i&&h&&i(a,h),f.open({type:"success",message:`${C.singularName??C.name} deleted`}),n())}))},[h,m,B,s,a,n,f,C.name,i]);let F;if(h&&m)F=r.jsx(r.Fragment,{children:"Multiple entities"});else{const N=h;F=N?r.jsx(Wr,{entity:N,collection:t,path:a}):r.jsx(r.Fragment,{})}const Q=m?r.jsxs(r.Fragment,{children:[r.jsx("b",{children:C.name}),": Confirm multiple delete?"]}):`Would you like to delete this ${C.singularName??C.name}?`;return r.jsxs(A.Dialog,{maxWidth:"2xl","aria-labelledby":"delete-dialog",open:o,onOpenChange:N=>N?void 0:n(),children:[r.jsxs(A.DialogContent,{fullHeight:!0,children:[r.jsx(A.Typography,{variant:"subtitle2",className:"p-4",children:Q}),!m&&r.jsx("div",{className:"p-4",children:F})]}),r.jsxs(A.DialogActions,{children:[g&&r.jsx(A.CircularProgress,{size:"small"}),r.jsx(A.Button,{onClick:w,disabled:g,variant:"text",color:"primary",children:"Cancel"}),r.jsx(A.Button,{autoFocus:!0,disabled:g,onClick:I,variant:"filled",color:"primary",children:"Ok"})]})]})}function tr(e){return Array.isArray(e)?e:e?[e]:[]}function Is({collection:e,relativePath:t,parentCollectionIds:n,onNewClick:o,onMultipleDeleteClick:l,selectionEnabled:i,path:s,selectionController:a,tableController:d,collectionEntitiesCount:f}){const g=J(),p=g.plugins??[],h=qe(),u=Me(),m=a.selectedEntities,b=ft(e,h,Pe(s),null)&&o&&(u?r.jsxs(A.Button,{id:`add_entity_${s}`,onClick:o,startIcon:r.jsx(A.AddIcon,{}),variant:"filled",color:"primary",children:["Add ",e.singularName??e.name]}):r.jsx(A.Button,{id:`add_entity_${s}`,onClick:o,size:"medium",variant:"filled",color:"primary",children:r.jsx(A.AddIcon,{})})),y=qt(e,h,Pe(s),null);let C;if(i){const k=u?r.jsxs(A.Button,{variant:"text",disabled:!m?.length||!y,startIcon:r.jsx(A.DeleteIcon,{}),onClick:l,color:"primary",className:"lg:w-20",children:["(",m?.length,")"]}):r.jsx(A.IconButton,{color:"primary",disabled:!m?.length||!y,onClick:l,children:r.jsx(A.DeleteIcon,{})});C=r.jsx(A.Tooltip,{title:y?"Delete":"You have selected at least one entity you cannot delete",children:k})}const w={path:s,relativePath:t,parentCollectionIds:n,collection:e,selectionController:a,context:g,tableController:d,collectionEntitiesCount:f},E=tr(e.Actions).map((k,x)=>r.jsx(te,{children:r.jsx(k,{...w})},`actions_${x}`));return p&&p.forEach((k,x)=>{k.collections?.CollectionActions&&E.push(...tr(k.collections?.CollectionActions).map((S,B)=>r.jsx(te,{children:r.jsx(S,{...w,...k.collections?.collectionActionsProps})},`plugin_actions_${x}_${B}`)))}),r.jsxs(r.Fragment,{children:[E,C,b]})}function Fs({containerRef:e,innerRef:t,x:n,y:o,onMove:l}){let i=0,s=0;const a=c.useRef(!1),d=m=>{if(m.button!==0||!e.current||m.defaultPrevented||m.innerClicked)return;const{x:b,y}=e.current.getBoundingClientRect();i=m.screenX-b,s=m.screenY-y,document.addEventListener("mousemove",h),document.addEventListener("mouseup",p),document.addEventListener("selectstart",g),a.current=!0},f=m=>{m.innerClicked=!0},g=m=>{m.preventDefault(),m.stopPropagation()},p=m=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",p),document.removeEventListener("selectstart",g),m.stopPropagation(),a.current=!1},h=m=>{m.target.localName==="input"||!a.current||(l({x:m.screenX-i,y:m.screenY-s}),m.stopPropagation())},u=()=>{e.current&&(e.current.style.top=`${o}px`,e.current.style.left=`${n}px`)};c.useEffect(()=>{const m=e.current,b=t.current;if(!(!m||!b))return b&&b.addEventListener("mousedown",f),m&&m.addEventListener("mousedown",d),u(),()=>{m&&m.removeEventListener("mousedown",d),b&&b.removeEventListener("mousedown",f)}})}function Ns(){const[e,t]=c.useState({width:0,height:0});return c.useLayoutEffect(()=>{function n(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),e}const Ts=({onResize:e})=>{const t=c.useRef(0),n=c.useRef(null),o=c.useRef(e);o.current=e;const l=c.useCallback(s=>{t.current&&cancelAnimationFrame(t.current),t.current=requestAnimationFrame(()=>{o.current(s)})},[]),i=c.useCallback(()=>{const s=n.current;s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.addEventListener("resize",l)},[l]);return c.useEffect(()=>{const s=n.current;return()=>{s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.removeEventListener("resize",l)}},[l]),r.jsx("object",{onLoad:i,ref:n,tabIndex:-1,type:"text/html",data:"about:blank",title:"",style:{position:"absolute",top:0,left:0,height:"100%",width:"100%",pointerEvents:"none",zIndex:-1,opacity:0}})};function rr({name:e,addLabel:t,value:n,disabled:o=!1,buildEntry:l,small:i,onInternalIdAdded:s,includeAddButton:a,newDefaultEntry:d=null,setFieldValue:f}){return r.jsx(hn,{droppableId:e,addLabel:t,value:n,disabled:o,buildEntry:l,size:i?"small":"medium",onInternalIdAdded:s,includeAddButton:a,newDefaultEntry:d,onValueChange:g=>f(e,g)})}function Ps({field:e,form:t,label:n,tooltip:o,disabled:l,size:i="small",allowIndeterminate:s}){const a=r.jsx(A.BooleanSwitchWithLabel,{label:n,size:i,position:"start",value:e.value,disabled:l,allowIndeterminate:s,onValueChange:d=>t.setFieldValue(e.name,d)});return o?r.jsx(A.Tooltip,{title:o,children:a}):a}function we({error:e,showError:t,property:n,includeDescription:o=!0,disabled:l}){const i=n.description||n.longDescription;if(!(t&&e)&&(!o||!i))return null;if(t&&e)return r.jsx(A.Typography,{variant:"caption",className:"ml-3.5 text-red-500",children:e});const s=typeof n.disabled=="object"?n.disabled.disabledMessage:void 0;return r.jsxs("div",{className:"flex ml-3.5 mt-1",children:[r.jsx(A.Typography,{variant:"caption",color:l?"disabled":"secondary",className:"flex-grow",children:s||n.description}),n.longDescription&&r.jsx(A.Tooltip,{title:n.longDescription,side:"bottom",children:r.jsx(A.IconButton,{size:"small",className:"self-start",children:r.jsx(A.InfoIcon,{color:"disabled",size:"small"})})})]})}function nn({propertyKey:e,value:t,setValue:n,error:o,showError:l,disabled:i,autoFocus:s,touched:a,property:d,includeDescription:f}){const g=d.enumValues;Fe({property:d,value:t,setValue:n});const p=c.useCallback(h=>{h.stopPropagation(),h.preventDefault(),n(null)},[n]);return r.jsxs(r.Fragment,{children:[r.jsx(A.Select,{value:t?t.toString():"",disabled:i,position:"item-aligned",inputClassName:A.cn("w-full"),label:r.jsx(Ce,{icon:pe(d,"small"),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),endAdornment:d.clearable&&r.jsx(A.IconButton,{onClick:p,children:r.jsx(A.ClearIcon,{})}),onValueChange:h=>{const u=h?d.dataType==="number"?parseFloat(h):h:null;return n(u)},renderValue:h=>r.jsx(Be,{enumKey:h,enumValues:g,size:"medium"}),children:g&&g.map(h=>r.jsx(A.SelectItem,{value:String(h.id),children:r.jsx(Be,{enumKey:String(h.id),enumValues:g,size:"medium"})},h.id))}),r.jsx(we,{includeDescription:f,showError:l,error:o,disabled:i,property:d})]})}function on({propertyKey:e,value:t,setValue:n,error:o,showError:l,disabled:i,property:s,includeDescription:a,autoFocus:d}){const f=s.of;if(!f)throw Error("Using wrong component ArrayEnumSelect");if(Array.isArray(f))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(f.dataType!=="string"&&f.dataType!=="number")throw Error("Field misconfiguration: array field of type string or number");const g=He(f.enumValues);if(!g)throw console.error(s),Error("Field misconfiguration: array field of type string or number needs to have enumValues");Fe({property:s,value:t,setValue:n});const p=!!t&&Array.isArray(t),h=c.useCallback((u,m)=>{const b=u!==void 0?_t(g,u):void 0;return r.jsxs(Be,{enumKey:u,enumValues:g,size:"medium",children:[b?.label??u,!m&&r.jsx("button",{className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",onMouseDown:y=>{y.preventDefault(),y.stopPropagation()},onClick:y=>{y.preventDefault(),y.stopPropagation(),n(t.filter(C=>C!==u))},children:r.jsx(A.CloseIcon,{size:"smallest"})})]},u)},[g,n,t]);return r.jsxs("div",{className:"mt-0.5 ml-0.5 mt-2",children:[r.jsx(A.MultiSelect,{value:p?t.map(u=>u.toString()):[],disabled:i,label:r.jsx(Ce,{icon:pe(s,"small"),required:s.validation?.required,title:s.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),renderValue:c.useCallback(u=>h(u,!1),[h]),onMultiValueChange:u=>{let m;return f&&f?.dataType==="number"?m=u?u.map(b=>parseFloat(b)):[]:m=u,n(m)},children:g.map(u=>String(u.id)).map(u=>r.jsx(A.MultiSelectItem,{value:u,children:h(u,!0)},u))}),r.jsx(we,{includeDescription:a,showError:l,error:o,disabled:i,property:s})]})}function $o({propertyKey:e,value:t,error:n,showError:o,disabled:l,isSubmitting:i,tableMode:s,property:a,includeDescription:d,setValue:f,setFieldValue:g}){const p=a.of;if(p.dataType!=="reference")throw Error("ArrayOfReferencesField expected a property containing references");const h=a.expanded===void 0?!0:a.expanded,[u,m]=c.useState(!1),b=t&&Array.isArray(t)?t.map(I=>I.id):[];Fe({property:a,value:t,setValue:f});const y=ae(),C=c.useMemo(()=>p.path?y.getCollection(p.path):void 0,[p.path]);if(!C)throw Error(`Couldn't find the corresponding collection for the path: ${p.path}`);const w=c.useCallback(I=>{console.debug("onMultipleEntitiesSelected",I),f(I.map(F=>Ue(F)))},[f]),E=wt({multiselect:!0,path:p.path,collection:C,onMultipleEntitiesSelected:w,selectedEntityIds:b,forceFilter:p.forceFilter}),k=c.useCallback(I=>{I.preventDefault(),E.open()},[E]),x=c.useCallback((I,F)=>{const Q=t&&t.length>I?t[I]:void 0;return Q?r.jsx("div",{onMouseEnter:()=>m(!0),onMouseMove:()=>m(!0),onMouseLeave:()=>m(!1),children:r.jsx(Ve,{disabled:!p.path,previewProperties:p.previewProperties,size:"medium",onClick:k,reference:Q,onHover:u})}):r.jsx("div",{children:"Internal ERROR"})},[p.path,p.previewProperties,u,t]),S=r.jsx(Ce,{icon:pe(a,"small"),required:a.validation?.required,title:a.name,className:"text-text-secondary dark:text-text-secondary-dark"}),B=r.jsxs(r.Fragment,{children:[!C&&r.jsx(me,{error:"The specified collection does not exist. Check console"}),C&&r.jsxs(r.Fragment,{children:[r.jsx(rr,{value:t,addLabel:a.name?"Add reference to "+a.name:"Add reference",name:e,buildEntry:x,disabled:i,setFieldValue:g,newDefaultEntry:a.of.defaultValue}),r.jsxs(A.Button,{className:"my-4 justify-center text-left",variant:"outlined",color:"primary",disabled:i,onClick:k,children:["Edit ",a.name]})]})]});return r.jsxs(r.Fragment,{children:[!s&&r.jsx(A.ExpandablePanel,{className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",initiallyExpanded:h,title:S,children:B}),s&&B,r.jsx(we,{includeDescription:d,showError:o,error:n,disabled:l,property:a})]})}function _o({name:e,property:t,value:n,entity:o,onRemove:l,disabled:i,size:s}){return r.jsxs("div",{className:A.cn(A.paperMixin,"relative m-4 border-box flex items-center justify-center",s==="medium"?"min-w-[220px] min-h-[220px] max-w-[220px]":"min-w-[118px] min-h-[118px] max-w-[118px]"),children:[!i&&r.jsx("div",{className:"absolute rounded-full -top-2 -right-2 z-10 bg-white dark:bg-gray-900",children:r.jsx(A.Tooltip,{title:"Remove",children:r.jsx(A.IconButton,{size:"small",onClick:a=>{a.stopPropagation(),l(n)},children:r.jsx(A.RemoveIcon,{size:"small"})})})}),n&&r.jsx(te,{children:r.jsx(ve,{propertyKey:e,value:n,property:t,size:s})})]})}const Qs="box-border relative pt-[2px] items-center border border-transparent min-h-[254px] outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",Ms="border-dotted-gray",Ds="hover:bg-field-hover dark:hover:bg-field-hover-dark",Os="pt-0 border-2 border-solid",Vs="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500",Gs="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500";function ln({propertyKey:e,value:t,setValue:n,error:o,showError:l,autoFocus:i,tableMode:s,property:a,includeDescription:d,context:f,isSubmitting:g}){if(!f.entityId)throw new Error("StorageUploadFieldBinding: Entity id is null");const p=ut(),h=dt(a)||!!a.disabled||g,{internalValue:u,setInternalValue:m,onFilesAdded:b,storage:y,onFileUploadComplete:C,storagePathBuilder:w,multipleFilesSupported:E}=Bo({entityValues:f.values,entityId:f.entityId,path:f.path,property:a,propertyKey:e,value:t,storageSource:p,disabled:h,onChange:n});Fe({property:a,value:t,setValue:n});const k={id:f.entityId,values:f.values,path:f.path};return r.jsxs(r.Fragment,{children:[!s&&r.jsx(Ce,{icon:pe(a,"small"),required:a.validation?.required,title:a.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),r.jsx(zs,{value:u,name:e,disabled:h,autoFocus:i,property:a,onChange:n,setInternalValue:m,onFilesAdded:b,entity:k,onFileUploadComplete:C,storagePathBuilder:w,storage:y,multipleFilesSupported:E}),r.jsx(we,{includeDescription:d,showError:l,error:o,disabled:h,property:a})]})}function Ys({storage:e,disabled:t,isDraggingOver:n,onFilesAdded:o,multipleFilesSupported:l,droppableProvided:i,autoFocus:s,internalValue:a,property:d,entity:f,onClear:g,metadata:p,storagePathBuilder:h,onFileUploadComplete:u,size:m,name:b,helpText:y}){const C=Xe(),{getRootProps:w,getInputProps:E,isDragActive:k,isDragAccept:x,isDragReject:S}=En.useDropzone({accept:e.acceptedFiles?e.acceptedFiles.map(B=>({[B]:[]})).reduce((B,I)=>({...B,...I}),{}):void 0,disabled:t||n,noDragEventsBubbling:!0,maxSize:e.maxSize,onDrop:o,onDropRejected:(B,I)=>{for(const F of B)for(const Q of F.errors)C.open({type:"error",message:`Error uploading file: File is larger than ${e.maxSize} bytes`})}});return r.jsxs("div",{...w(),className:A.cn(A.fieldBackgroundMixin,t?A.fieldBackgroundDisabledMixin:A.fieldBackgroundHoverMixin,Qs,l&&a.length?"":"flex",A.focusedMixin,{[Ds]:!k,[Os]:k,[Gs]:S,[Vs]:x,[Ms]:t}),children:[r.jsxs("div",{...i.droppableProps,ref:i.innerRef,className:A.cn("flex items-center p-1 no-scrollbar",l&&a.length?"overflow-auto":"",l&&a.length?"min-h-[180px]":"min-h-[250px]"),children:[r.jsx("input",{autoFocus:s,...E()}),a.map((B,I)=>{let F;return B.storagePathOrDownloadUrl?F=r.jsx(_o,{name:`storage_preview_${B.storagePathOrDownloadUrl}`,property:d,disabled:t,entity:f,value:B.storagePathOrDownloadUrl,onRemove:g,size:B.size}):B.file&&(F=r.jsx(Io,{entry:B,metadata:p,storagePath:h(B.file),onFileUploadComplete:u,imageSize:m==="medium"?220:118,simple:!1})),r.jsx(ct.Draggable,{draggableId:`array_field_${b}_${B.id}`,index:I,children:(Q,N)=>r.jsx("div",{tabIndex:-1,ref:Q.innerRef,...Q.draggableProps,...Q.dragHandleProps,className:A.cn(A.focusedMixin,"rounded-md"),style:{...Q.draggableProps.style},children:F})},`array_field_${b}_${B.id}`)}),i.placeholder]}),r.jsx("div",{className:"flex-grow min-h-[38px] box-border m-2 text-center",children:r.jsx(A.Typography,{align:"center",variant:"label",children:y})})]})}function zs({property:e,name:t,value:n,setInternalValue:o,onChange:l,multipleFilesSupported:i,onFileUploadComplete:s,disabled:a,onFilesAdded:d,autoFocus:f,storage:g,entity:p,storagePathBuilder:h}){if(i){const k=e;if(k.of){if(Array.isArray(k.of)||k.of.dataType!=="string")throw Error("Storage field using array must be of data type string")}else throw Error("Storage field using array must be of data type string")}const u=g?.metadata,m=i?"small":"medium",b=c.useCallback((k,x)=>{if(!i)return;const S=[...n],B=S[k];S.splice(k,1),S.splice(x,0,B),o(S);const I=S.filter(F=>!!F.storagePathOrDownloadUrl).map(F=>F.storagePathOrDownloadUrl);l(I)},[i,l,o,n]),y=c.useCallback(k=>{k.destination&&b(k.source.index,k.destination.index)},[b]),C=c.useCallback(k=>{if(i){const x=n.filter(S=>S.storagePathOrDownloadUrl!==k);l(x.filter(S=>!!S.storagePathOrDownloadUrl).map(S=>S.storagePathOrDownloadUrl)),o(x)}else l(null),o([])},[n,i,l]),w=i?"Drag 'n' drop some files here, or click to select files":"Drag 'n' drop a file here, or click to select one",E=i?e.of:e;return r.jsx(ct.DragDropContext,{onDragEnd:y,children:r.jsx(ct.Droppable,{droppableId:`droppable_${t}`,direction:"horizontal",renderClone:(k,x,S)=>{const B=n[S.source.index];return r.jsx("div",{ref:k.innerRef,...k.draggableProps,...k.dragHandleProps,style:k.draggableProps.style,className:"rounded",children:r.jsx(_o,{name:`storage_preview_${B.storagePathOrDownloadUrl}`,property:E,disabled:!0,entity:p,value:B.storagePathOrDownloadUrl,onRemove:C,size:B.size})})},children:(k,x)=>r.jsx(Ys,{storage:g,disabled:a,isDraggingOver:x.isDraggingOver,droppableProvided:k,onFilesAdded:d,multipleFilesSupported:i,autoFocus:f,internalValue:n,property:E,entity:p,onClear:C,metadata:u,storagePathBuilder:h,onFileUploadComplete:s,size:m,name:t,helpText:w})})})}function yt({propertyKey:e,value:t,setValue:n,error:o,showError:l,disabled:i,autoFocus:s,property:a,includeDescription:d}){let f,g;a.dataType==="string"&&(f=a.multiline,g=a.url),Fe({property:a,value:t,setValue:n});const p=c.useCallback(b=>{b.stopPropagation(),b.preventDefault(),n(null)},[n]),h=b=>{if(m==="number"){const y=b.target.value?parseFloat(b.target.value):void 0;y&&isNaN(y)?n(null):y!=null?n(y):n(null)}else n(b.target.value)},u=!!f,m=a.dataType==="number"?"number":void 0;return r.jsxs(r.Fragment,{children:[r.jsx(A.TextField,{value:t,onChange:h,autoFocus:s,label:r.jsx(Ce,{icon:pe(a,"small"),required:a.validation?.required,title:a.name}),type:m,multiline:u,disabled:i,endAdornment:a.clearable&&r.jsx(A.IconButton,{onClick:p,children:r.jsx(A.ClearIcon,{})}),error:l?o:void 0,inputClassName:o?"text-red-500 dark:text-red-600":""}),r.jsx(we,{includeDescription:d,showError:l,error:o,disabled:i,property:a}),g&&r.jsx(A.Collapse,{className:"mt-1 ml-1",in:!!t,children:r.jsx(ve,{value:t,property:a,size:"medium"})})]})}const Wo=c.forwardRef(function({propertyKey:t,value:n,setValue:o,error:l,showError:i,autoFocus:s,disabled:a,touched:d,property:f,includeDescription:g},p){return Fe({property:f,value:n,setValue:o}),r.jsxs(r.Fragment,{children:[r.jsx(A.BooleanSwitchWithLabel,{value:n,onValueChange:h=>o(h),error:i,label:r.jsx(Ce,{icon:pe(f,"small"),required:f.validation?.required,title:f.name}),disabled:a,autoFocus:s,size:"medium"}),r.jsx(we,{includeDescription:g,showError:i,error:l,disabled:a,property:f})]})});function jo({propertyKey:e,value:t,setValue:n,autoFocus:o,error:l,showError:i,disabled:s,touched:a,property:d,includeDescription:f}){const{locale:g}=J(),p=t||null;return Fe({property:d,value:t,setValue:n}),r.jsxs(r.Fragment,{children:[r.jsx(A.DateTimeField,{value:p,onChange:h=>n(h),size:"medium",mode:d.mode,clearable:d.clearable,locale:g,label:r.jsx(Ce,{icon:pe(d,"small"),required:d.validation?.required,className:"text-text-secondary dark:text-text-secondary-dark",title:d.name})}),r.jsx(we,{includeDescription:f,showError:i,error:l,disabled:s,property:d})]})}function sn({propertyKey:e,value:t,error:n,showError:o,tableMode:l,property:i,includeDescription:s,context:a}){if(!a.entityId)throw new Error("ReadOnlyFieldBinding: Entity id is null");return a.entityId,a.values,a.path,r.jsxs(r.Fragment,{children:[!l&&r.jsx(Ce,{icon:pe(i,"small"),required:i.validation?.required,title:i.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),r.jsx("div",{className:A.cn(A.paperMixin,"min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar"),children:r.jsx(te,{children:r.jsx(ve,{propertyKey:e,value:t,property:i,size:"medium"})})}),r.jsx(we,{includeDescription:s,showError:o,error:n,property:i})]})}function Ho(e){return typeof e.property.path!="string"?r.jsx(sn,{...e}):r.jsx(Ls,{...e})}function Ls({value:e,setValue:t,error:n,showError:o,isSubmitting:l,disabled:i,touched:s,autoFocus:a,property:d,includeDescription:f,context:g}){if(!d.path)throw new Error("Property path is required for ReferenceFieldBinding");Fe({property:d,value:e,setValue:t});const p=e&&e instanceof Ne,h=ae(),u=c.useMemo(()=>d.path?h.getCollection(d.path):void 0,[d.path]);if(!u)throw Error(`Couldn't find the corresponding collection for the path: ${d.path}`);const m=c.useCallback(C=>{t(C?Ue(C):null)},[t]),b=wt({multiselect:!1,path:d.path,collection:u,onSingleEntitySelected:m,selectedEntityIds:p?[e.id]:void 0,forceFilter:d.forceFilter}),y=c.useCallback(C=>{C.preventDefault(),b.open()},[b]);return r.jsxs(r.Fragment,{children:[r.jsx(Ce,{icon:pe(d,"small"),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),!u&&r.jsx(me,{error:"The specified collection does not exist. Check console"}),u&&r.jsxs(r.Fragment,{children:[e&&r.jsx(Ve,{disabled:!d.path,previewProperties:d.previewProperties,size:"medium",onClick:i||l?void 0:y,reference:e}),!e&&r.jsx("div",{className:"justify-center text-left",children:r.jsxs(A.Button,{variant:"outlined",color:"primary",disabled:i||l,onClick:y,children:["Edit ",d.name]})})]}),r.jsx(we,{includeDescription:f,showError:o,error:n,disabled:i,property:d})]})}const it=c.memo(Us,(e,t)=>{if(e.propertyKey!==t.propertyKey)return!1;const n=ye(e.property)||e.property.fromBuilder,o=ye(t.property)||t.property.fromBuilder;return!((n===o||ie(e.property,t.property))&&e.disabled===t.disabled)||nr(t.property),!1});function Us({propertyKey:e,property:t,context:n,includeDescription:o,underlyingValueHasChanged:l,disabled:i,tableMode:s,partOfArray:a,partOfBlock:d,autoFocus:f}){const g=J(),h=nr(t,g.plugins)?ke.Field:ke.FastField;return r.jsx(h,{name:e,children:u=>{let m;const b=Se({propertyKey:e,propertyValue:u.field.value,propertyOrBuilder:t,values:u.form.values,path:n.path,entityId:n.entityId,fields:g.propertyConfigs});if(b===null||xt(b))return r.jsx(r.Fragment,{});if(dt(b))m=sn;else if(b.Field)typeof b.Field=="function"&&(m=b.Field);else{const C=cr(b,g.propertyConfigs);if(!C)throw console.log("INTERNAL: Could not find field config for property",{propertyKey:e,resolvedProperty:b,fields:g.propertyConfigs,propertyConfig:C}),new Error(`INTERNAL: Could not find field config for property ${e}`);m=Se({propertyOrBuilder:C.property,propertyValue:u.field.value,values:u.form.values,path:n.path,entityId:n.entityId,fields:g.propertyConfigs}).Field}if(!m)return console.warn(`No field component found for property ${e}`),console.warn("Property:",t),r.jsx("div",{children:`Currently the field ${b.dataType} is not supported`});const y={propertyKey:e,property:b,includeDescription:o,underlyingValueHasChanged:l,context:n,disabled:i,tableMode:s,partOfArray:a,partOfBlock:d,autoFocus:f};return r.jsx($s,{Component:m,componentProps:y,fieldProps:u})}})}function $s({Component:e,componentProps:{propertyKey:t,property:n,includeDescription:o,underlyingValueHasChanged:l,tableMode:i,partOfArray:s,partOfBlock:a,autoFocus:d,context:f,disabled:g},fieldProps:p}){const{plugins:h}=J(),u=n.customProps,m=p.field.value,b=p.meta.initialValue,y=ke.getIn(p.form.errors,t),C=ke.getIn(p.form.touched,t),w=y&&(p.form.submitCount>0||n.validation?.unique)&&(!Array.isArray(y)||!!y.filter(I=>!!I).length);_s(f.path,f.collection,t,n,e,h);const E=e,k=p.form.isSubmitting,x=c.useCallback((I,F)=>{p.form.setFieldTouched(t,!0,!1),p.form.setFieldValue(t,I,F)},[]),S=c.useCallback((I,F,Q)=>{p.form.setFieldTouched(t,!0,!1),p.form.setFieldValue(I,F,Q)},[]),B={propertyKey:t,value:m,initialValue:b,setValue:x,setFieldValue:S,error:y,touched:C,showError:w,isSubmitting:k,includeDescription:o??!0,property:n,disabled:g??!1,underlyingValueHasChanged:l??!1,tableMode:i??!1,partOfArray:s??!1,partOfBlock:a??!1,autoFocus:d??!1,customProps:u,context:f};return r.jsxs(te,{children:[r.jsx(E,{...B}),l&&!k&&r.jsx(A.Typography,{variant:"caption",className:"ml-3.5",children:"This value has been updated elsewhere"})]})}const nr=(e,t)=>{if(t?.some(l=>l.form?.fieldBuilder)||ye(e))return!0;const n=e,o=!!n.Field||"fromBuilder"in n&&n.fromBuilder;return n.dataType==="map"&&n.properties?o||Object.values(n.properties).some(l=>nr(l,t)):n.dataType==="array"&&"resolvedProperties"in n?o||n.resolvedProperties?.some(l=>l&&nr(l,t)):o};function _s(e,t,n,o,l,i){return c.useRef((()=>{let a=null;return i&&i.forEach(d=>{const f=yn(o);if(f&&d.form?.fieldBuilder){const g={fieldConfigId:f,propertyKey:n,property:o,Field:l,plugin:d,path:e,collection:t},p=d.form?.fieldBuilderEnabled?.(g);(p===void 0||p)&&(a=d.form.fieldBuilder(g)||a)}f||console.warn("INTERNAL: Field id not found for property",o)}),a})()).current}function Jo({propertyKey:e,value:t,showError:n,error:o,disabled:l,property:i,setValue:s,partOfBlock:a,tableMode:d,includeDescription:f,underlyingValueHasChanged:g,autoFocus:p,context:h}){const u=i.pickOnlySomeKeys||!1,m=(i.expanded===void 0?!0:i.expanded)||p;if(!i.properties)throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${e}`);let b;u?t?b=In(i.properties,...Object.keys(t).filter(w=>w in i.properties)):b={}:b=i.properties;const y=r.jsx(r.Fragment,{children:r.jsx("div",{className:"py-1 flex flex-col space-y-2",children:Object.entries(b).filter(([w,E])=>!xt(E)).map(([w,E],k)=>{const x={propertyKey:`${e}.${w}`,disabled:l,property:E,includeDescription:f,underlyingValueHasChanged:g,context:h,tableMode:!1,partOfArray:!1,partOfBlock:!1,autoFocus:p&&k===0};return r.jsx("div",{children:r.jsx(it,{...x})},`map-${e}-${k}`)})})}),C=r.jsx(Ce,{icon:pe(i,"small"),required:i.validation?.required,title:i.name,className:"text-text-secondary dark:text-text-secondary-dark"});return r.jsxs(r.Fragment,{children:[!d&&!a&&r.jsx(A.ExpandablePanel,{initiallyExpanded:m,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",title:C,children:y}),(d||a)&&y,r.jsx(we,{includeDescription:f,showError:n,error:o,disabled:l,property:i})]})}function qo({propertyKey:e,value:t,showError:n,error:o,disabled:l,property:i,setValue:s,tableMode:a,includeDescription:d,underlyingValueHasChanged:f,autoFocus:g,context:p}){const h=(i.expanded===void 0?!0:i.expanded)||g;if(!i.keyValue)throw Error(`Your property ${e} needs to have the 'keyValue' prop in order to use this field binding`);const u=r.jsx(an,{value:t,setValue:s,disabled:l,fieldName:i.name??e}),m=r.jsx(Ce,{icon:pe(i,"small"),required:i.validation?.required,title:i.name,className:"text-text-secondary dark:text-text-secondary-dark"});return r.jsxs(r.Fragment,{children:[!a&&r.jsx(A.ExpandablePanel,{initiallyExpanded:h,title:m,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",children:u}),a&&u,r.jsx(we,{includeDescription:d,showError:n,error:o,disabled:l,property:i})]})}function an({value:e,setValue:t,fieldName:n,disabled:o}){const[l,i]=c.useState(Object.keys(e??{}).map(d=>[cn(),{key:d,dataType:dn(e?.[d])??"string"}]));c.useEffect(()=>{const d=l.map(([u,{key:m}])=>m),f=Object.entries(e??{}).filter(([u,m])=>m!==void 0).map(([u])=>u),g=f.filter(u=>!d.includes(u)),p=d.filter(u=>!f.includes(u)),h=[...l];g.forEach(u=>{h.push([cn(),{key:u,dataType:dn(e?.[u])??"string"}])}),p.forEach(u=>{const m=h.findIndex(([b,{key:y}])=>y===u);h.splice(m,1)}),i(h)},[e]);const s=c.useRef(e??{}),a=(d,f)=>{if(!d){console.warn("No key selected for data type update");return}i(l.map(g=>g[0]===d?[g[0],{key:g[1].key,dataType:f}]:g)),t({...e??{},[l.find(g=>g[0]===d)?.[1].key??""]:yr(f)})};return r.jsxs("div",{className:"py-1 flex flex-col gap-1",children:[l.map(([d,{key:f,dataType:g}],p)=>{const h=f?e?.[f]:"",u=m=>{if(i(l.map(y=>y[0]===d?[d,{key:m??"",dataType:y[1].dataType}]:y)),typeof e=="object"&&m in e)return;const b={...e??{}};typeof s.current=="object"&&f in s.current?b[f]=void 0:delete b[f],t({...b,[m??""]:h})};return r.jsx(Ws,{rowId:d,fieldKey:f,value:e??{},onDeleteClick:()=>{const m={...e??{}};s.current&&f in s.current?m[f]=void 0:delete m[f],i(l.filter(b=>b[0]!==d)),t({...m})},onFieldKeyChange:u,setValue:t,entryValue:h,dataType:g,disabled:o,updateDataType:a},d)}),r.jsx(A.Button,{variant:"text",size:"small",color:"primary",className:"w-full",disabled:o,startIcon:r.jsx(A.AddIcon,{}),onClick:d=>{d.preventDefault(),t({...e??{},"":null}),i([...l,[cn(),{key:"",dataType:"string"}]])},children:n?`Add to ${n}`:"Add"})]})}function Ws({rowId:e,fieldKey:t,value:n,onFieldKeyChange:o,onDeleteClick:l,setValue:i,entryValue:s,dataType:a,updateDataType:d,disabled:f}){const{locale:g}=J();function p(u,m,b){return b==="string"||b==="number"?r.jsx(A.TextField,{placeholder:"value",value:u,type:b==="number"?"number":"text",size:"small",disabled:f||!m,onChange:y=>{if(b==="number"){const C=y.target.value?parseFloat(y.target.value):void 0;C&&isNaN(C)?i({...n,[m]:null}):C!=null?i({...n,[m]:C}):i({...n,[m]:null})}else i({...n,[m]:y.target.value})}},b):b==="date"?r.jsx(A.DateTimeField,{value:u,size:"small",locale:g,disabled:f||!m,onChange:y=>{i({...n,[m]:y})}}):b==="boolean"?r.jsx(A.BooleanSwitchWithLabel,{value:u,size:"small",position:"start",disabled:f||!m,onValueChange:y=>{i({...n,[m]:y})}}):b==="array"?r.jsx("div",{className:A.cn(A.defaultBorderMixin,"ml-2 pl-2 border-l border-solid"),children:r.jsx(hn,{value:u,newDefaultEntry:"",droppableId:e.toString(),addLabel:m?`Add to ${m}`:"Add",size:"small",disabled:f||!m,includeAddButton:!0,onValueChange:y=>{i({...n,[m]:y})},buildEntry:(y,C)=>r.jsx(js,{index:y,id:C,value:u[y],disabled:f||!m,setValue:w=>{const E=[...u];E[y]=w,i({...n,[m]:E})}})})}):b==="map"?r.jsx("div",{className:A.cn(A.defaultBorderMixin,"ml-2 pl-2 border-l border-solid"),children:r.jsx(an,{value:u,fieldName:m,setValue:y=>{i({...n,[m]:y})}})}):r.jsx(A.Typography,{variant:"caption",children:`Data type ${b} not supported yet`})}function h(u){d(e,u)}return r.jsxs(r.Fragment,{children:[r.jsxs(A.Typography,{component:"div",className:"font-mono flex flex-row gap-1",children:[r.jsx("div",{className:"w-[200px] max-w-[25%]",children:r.jsx(A.TextField,{value:t,placeholder:"key",disabled:f||s!=null&&s!=="",size:"small",onChange:u=>{o(u.target.value)}})}),r.jsx("div",{className:"flex-grow",children:a!=="map"&&a!=="array"&&p(s,t,a)}),r.jsxs(A.Menu,{trigger:r.jsx(A.IconButton,{size:"small",className:"h-7 w-7",children:r.jsx(A.ArrowDropDownIcon,{})}),children:[r.jsx(A.MenuItem,{dense:!0,onClick:()=>h("string"),children:"string"}),r.jsx(A.MenuItem,{dense:!0,onClick:()=>h("number"),children:"number"}),r.jsx(A.MenuItem,{dense:!0,onClick:()=>h("boolean"),children:"boolean"}),r.jsx(A.MenuItem,{dense:!0,onClick:()=>h("date"),children:"date"}),r.jsx(A.MenuItem,{dense:!0,onClick:()=>h("map"),children:"map"}),r.jsx(A.MenuItem,{dense:!0,onClick:()=>h("array"),children:"array"})]}),r.jsx(A.IconButton,{"aria-label":"delete",size:"small",onClick:l,className:"h-7 w-7",children:r.jsx(A.RemoveIcon,{size:"small"})})]},e.toString()),(a==="map"||a==="array")&&p(s,t,a)]})}function js({id:e,index:t,value:n,setValue:o}){const{locale:l}=J(),[i,s]=c.useState(dn(n)??"string");function a(f){s(f)}function d(f,g){return g==="string"||g==="number"?r.jsx(A.TextField,{value:f,type:g==="number"?"number":"text",size:"small",onChange:p=>{if(g==="number"){const h=p.target.value?parseFloat(p.target.value):void 0;h&&isNaN(h)?o(null):h!=null?o(h):o(null)}else o(p.target.value)}}):g==="date"?r.jsx(A.DateTimeField,{value:f,size:"small",locale:l,onChange:p=>{o(p)}}):g==="boolean"?r.jsx(A.BooleanSwitchWithLabel,{value:f,size:"small",position:"start",onValueChange:p=>{o(p)}}):g==="array"?r.jsx(A.Typography,{variant:"caption",children:"Arrays of arrays are not supported."}):g==="map"?r.jsx("div",{className:A.cn(A.defaultBorderMixin,"ml-2 pl-2 border-l border-solid"),children:r.jsx(an,{value:f,setValue:p=>{o(p)}})}):r.jsx(A.Typography,{variant:"caption",children:`Data type ${g} not supported yet`})}return r.jsxs(r.Fragment,{children:[r.jsxs(A.Typography,{component:"div",className:"font-mono flex min-h-12 flex-row gap-1 items-center",children:[r.jsx("div",{className:"flex-grow",children:i!=="map"&&d(n,i)}),r.jsxs(A.Menu,{trigger:r.jsx(A.IconButton,{size:"small",className:"h-7 w-7",children:r.jsx(A.ArrowDropDownIcon,{})}),children:[r.jsx(A.MenuItem,{dense:!0,onClick:()=>a("string"),children:"string"}),r.jsx(A.MenuItem,{dense:!0,onClick:()=>a("number"),children:"number"}),r.jsx(A.MenuItem,{dense:!0,onClick:()=>a("boolean"),children:"boolean"}),r.jsx(A.MenuItem,{dense:!0,onClick:()=>a("map"),children:"map"}),r.jsx(A.MenuItem,{dense:!0,onClick:()=>a("date"),children:"date"})]})]},e.toString()),i==="map"&&d(n,i)]})}function cn(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}function dn(e){if(typeof e=="string"||e===null)return"string";if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(Array.isArray(e))return"array";if(e instanceof Date)return"date";if(e instanceof Ne)return"reference";if(e instanceof Yt)return"geopoint";if(typeof e=="object")return"map"}function Zo({propertyKey:e,value:t,error:n,showError:o,isSubmitting:l,setValue:i,setFieldValue:s,tableMode:a,property:d,includeDescription:f,underlyingValueHasChanged:g,context:p,disabled:h}){if(!d.of)throw Error("RepeatFieldBinding misconfiguration. Property `of` not set");if(!d.resolvedProperties||!Array.isArray(d.resolvedProperties))throw Error("RepeatFieldBinding - Internal error: Expected array in 'property.resolvedProperties'");const u=d.expanded===void 0?!0:d.expanded,m=d.of,[b,y]=c.useState();Fe({property:d,value:t,setValue:i});const C=(k,x)=>{const S=d.resolvedProperties[k]??m,B={propertyKey:`${e}.${k}`,disabled:h,property:S,includeDescription:f,underlyingValueHasChanged:g,context:p,tableMode:!1,partOfArray:!0,partOfBlock:!1,autoFocus:x===b};return r.jsx(it,{...B})},w=r.jsx(rr,{value:t,addLabel:d.name?"Add entry to "+d.name:"Add entry",name:e,setFieldValue:s,buildEntry:C,onInternalIdAdded:y,disabled:l||!!d.disabled,includeAddButton:!d.disabled,newDefaultEntry:d.of.defaultValue}),E=r.jsx(Ce,{icon:pe(d,"small"),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark"});return r.jsxs(r.Fragment,{children:[!a&&r.jsx(A.ExpandablePanel,{initiallyExpanded:u,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",title:E,children:w}),a&&w,r.jsx(we,{includeDescription:f,showError:o,error:n,disabled:h,property:d})]})}function Xo({propertyKey:e,value:t,error:n,showError:o,isSubmitting:l,setValue:i,setFieldValue:s,tableMode:a,property:d,includeDescription:f,underlyingValueHasChanged:g,context:p,disabled:h}){if(!d.oneOf)throw Error("ArrayOneOfField misconfiguration. Property `oneOf` not set");const u=d.expanded===void 0?!0:d.expanded;Fe({property:d,value:t,setValue:i});const[m,b]=c.useState(),y=c.useCallback((k,x)=>r.jsx(Hs,{name:`${e}.${k}`,index:k,value:t[k],typeField:d.oneOf.typeField??kt,valueField:d.oneOf.valueField??Lt,properties:d.oneOf.properties,autoFocus:x===m,context:p},`array_one_of_${k}`),[p,m,d.oneOf,e,t]),C=r.jsx(Ce,{icon:pe(d,"small"),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark"}),w=Object.keys(d.oneOf.properties)[0],E=r.jsx(rr,{value:t,name:e,addLabel:d.name?"Add entry to "+d.name:"Add entry",buildEntry:y,onInternalIdAdded:b,disabled:l||!!d.disabled,includeAddButton:!d.disabled,setFieldValue:s,newDefaultEntry:{[d.oneOf.typeField??kt]:w,[d.oneOf.valueField??Lt]:Ut(d.oneOf.properties[w])}});return r.jsxs(r.Fragment,{children:[!a&&r.jsx(A.ExpandablePanel,{className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",initiallyExpanded:u,title:C,children:E}),a&&E,r.jsx(we,{includeDescription:f,showError:o,error:n,disabled:h,property:d})]})}function Hs({name:e,index:t,value:n,typeField:o,valueField:l,properties:i,autoFocus:s,context:a}){const d=n&&n[o],[f,g]=c.useState(d??void 0),p=ke.useFormikContext();c.useEffect(()=>{d||C(Object.keys(i)[0])},[]),c.useEffect(()=>{d!==f&&g(d)},[d]);const h=f?i[f]:void 0,u=Object.entries(i).map(([w,E])=>({id:w,label:E.name??w})),m=`${e}.${o}`,b=`${e}.${l}`,y=h?{propertyKey:b,property:h,context:a,autoFocus:s,partOfArray:!1,partOfBlock:!0,tableMode:!1}:void 0,C=w=>{const E=w?i[w]:void 0;g(w),p.setFieldTouched(m),p.setFieldValue(m,w),p.setFieldValue(b,E?Ut(E):null)};return r.jsxs("div",{className:A.cn(A.paperMixin,"bg-transparent p-4 my-4 py-8"),children:[r.jsx(ke.FastField,{required:!0,name:m,children:w=>r.jsx(r.Fragment,{children:r.jsx(A.Select,{className:"mb-2",placeholder:r.jsx(A.Typography,{variant:"caption",className:"px-4 py-2 font-medium",children:"Type"}),size:"small",position:"item-aligned",value:w.field.value!==void 0&&w.field.value!==null?w.field.value:"",renderValue:E=>r.jsx(Be,{enumKey:E,enumValues:u,size:"small"}),onValueChange:E=>{C(E)},children:u.map(E=>r.jsx(A.SelectItem,{value:String(E.id),children:r.jsx(Be,{enumKey:E.id,enumValues:u,size:"small"})},E.id))})})}),y&&r.jsx(it,{...y},`form_control_${e}_${f}`)]})}const Js=new kl;try{nt.use(nt.Plugins.AutoResize,{min:100}),nt.unuse(nt.Plugins.FontUnderline),nt.unuse(nt.Plugins.Clear)}catch{}function Ko({propertyKey:e,value:t,setValue:n,error:o,showError:l,disabled:i,autoFocus:s,touched:a,property:d,tableMode:f,includeDescription:g,context:p}){const[h,u]=c.useState(t),m=c.useRef(t);A.useInjectStyles("MarkdownFieldBinding",qs);const b=c.useDeferredValue({internalValue:h,value:t});return c.useEffect(()=>{m.current=t,u(t)},[t]),c.useEffect(()=>{b.internalValue!==m.current&&n(b.internalValue)},[b]),r.jsxs(r.Fragment,{children:[!f&&r.jsx(A.Typography,{variant:"caption",className:"flex-grow",children:r.jsx(Ce,{icon:pe(d,"small"),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"})}),r.jsx(nt,{value:h??"",className:A.cn(A.fieldBackgroundMixin,i?A.fieldBackgroundDisabledMixin:A.fieldBackgroundHoverMixin,"text-base"),readOnly:i,renderHTML:y=>Js.render(y),view:{menu:!0,md:!0,html:!1},onChange:({html:y,text:C})=>{u(C??null)}}),r.jsx(we,{includeDescription:g,showError:l,error:o,disabled:i,property:d})]})}const qs=`
|
|
97
5
|
@font-face {
|
|
98
6
|
font-family: rmel-iconfont;
|
|
99
7
|
src: url(data:application/vnd.ms-fontobject;base64,fBkAAMAYAAABAAIAAAAAAAIABQMAAAAAAAABAJABAAAAAExQAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAB9vj4gAAAAAAAAAAAAAAAAAAAAAAABoAcgBtAGUAbAAtAGkAYwBvAG4AZgBvAG4AdAAAAA4AUgBlAGcAdQBsAGEAcgAAABYAVgBlAHIAcwBpAG8AbgAgADEALgAwAAAAGgByAG0AZQBsAC0AaQBjAG8AbgBmAG8AbgB0AAAAAAAAAQAAAAsAgAADADBHU1VCsP6z7QAAATgAAABCT1MvMj3jT5QAAAF8AAAAVmNtYXBA5I9dAAACPAAAAwhnbHlmMImhbQAABXwAAA9gaGVhZBtQ+k8AAADgAAAANmhoZWEH3gObAAAAvAAAACRobXR4aAAAAAAAAdQAAABobG9jYTX6MgAAAAVEAAAANm1heHABMAB7AAABGAAAACBuYW1lc9ztwgAAFNwAAAKpcG9zdCcpv64AABeIAAABNQABAAADgP+AAFwEAAAAAAAEAAABAAAAAAAAAAAAAAAAAAAAGgABAAAAAQAA4uPbB18PPPUACwQAAAAAANwY2ykAAAAA3BjbKQAA//8EAAMBAAAACAACAAAAAAAAAAEAAAAaAG8ADAAAAAAAAgAAAAoACgAAAP8AAAAAAAAAAQAAAAoAHgAsAAFERkxUAAgABAAAAAAAAAABAAAAAWxpZ2EACAAAAAEAAAABAAQABAAAAAEACAABAAYAAAABAAAAAAABBAABkAAFAAgCiQLMAAAAjwKJAswAAAHrADIBCAAAAgAFAwAAAAAAAAAAAAAAAAAAAAAAAAAAAABQZkVkAEDnbe2iA4D/gABcA4AAgAAAAAEAAAAAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAUAAAADAAAALAAAAAQAAAHMAAEAAAAAAMYAAwABAAAALAADAAoAAAHMAAQAmgAAABYAEAADAAbnbelB7TztRe1h7XXteO2A7Y3tov//AADnbelB7TvtRO1f7W/td+2A7Yztn///AAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAWABYAFgAYABoAHgAqACwALAAuAAAAAQAEAAUAAwAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAAgAUABUAFgAXABgAGQAAAQYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAABPAAAAAAAAAAZAADnbQAA520AAAABAADpQQAA6UEAAAAEAADtOwAA7TsAAAAFAADtPAAA7TwAAAADAADtRAAA7UQAAAAGAADtRQAA7UUAAAAHAADtXwAA7V8AAAAIAADtYAAA7WAAAAAJAADtYQAA7WEAAAAKAADtbwAA7W8AAAALAADtcAAA7XAAAAAMAADtcQAA7XEAAAANAADtcgAA7XIAAAAOAADtcwAA7XMAAAAPAADtdAAA7XQAAAAQAADtdQAA7XUAAAARAADtdwAA7XcAAAASAADteAAA7XgAAAATAADtgAAA7YAAAAACAADtjAAA7YwAAAAUAADtjQAA7Y0AAAAVAADtnwAA7Z8AAAAWAADtoAAA7aAAAAAXAADtoQAA7aEAAAAYAADtogAA7aIAAAAZAAAAAABmAMwBHgGEAbwB/gJmAsgC/gM0A3IDogRABKgE7gUuBXAFygYKBmoGpAbEBugHRgewAAAABQAAAAADVgLWAAsAGAAlADQAQAAAEyEyFhQGByEuATQ2Fz4BNyEeARQGIyEiJgM0NjchHgEUBiMhIiY3PgEzITIeARQOASMhIiYnFhQPAQYmNRE0NhfWAlQSGRkS/awSGRnaARgTAWASGRkS/qASGfQZEgJUEhkZEv2sEhnzARgTAWAMFAsLFAz+oBIZOQgIkgseHgsC1RklGAEBGCUZ8hMYAQEYJRkZ/oUTGAEBGCUZGdkSGQsVFxQMGoYGFgaVDAwRASoRDAwAAAAADAAAAAADqwKrAA8AEwAXABsAHwAjACcAMwA3ADsAPwBDAAABIQ4BBwMeARchPgE3ES4BBTMVIxUzFSMnMxUjFTMVKwI1MzUjNTMBISImNDYzITIWFAY3IzUzNSM1MxcjNTM1IzUzA1X9ViQwAQEBMSQCqiQxAQEx/lxWVlZWgFZWVlYqVlZWVgFV/wASGBgSAQASGBgZVlZWVoBWVlZWAqsBMST+ViQxAQExJAGqJDF/VipW1lYqVlYqVv6AGCQZGSQYqlYqVtZWKlYAAwAAAAADKwMAAA8AHwAzAAAlHgEXIT4BNxEuASchDgEHMyEyFhcRDgEHIS4BJxE+ASUnJisBIg8BIyIGFBYzITI2NCYjAQABMCQBViQwAQEwJP6qJDABgAEAExcBARcT/wATFwEBFwEoHgsStBILHmsTFxcTAgARGRkRVSQwAQEwJAGrJDABATAkFxT+qxEZAQEZEQFVFBfVHg0NHhcnFxcnFwADAAAAAAOrAtkAFgAtAD4AAAEVBg8BBiIvASY0PwEnJjQ/ATYyHwEWBTc2NC8BJiIPAQYHFRYfARYyPwE2NCcBJyYGBwMGFh8BFjY3EzYmJwOrAQmwBxEHHgYGk5MGBh4HEQewCf0PkwYGHwYSBrAJAQEJsAcRBx4GBgFCKQkPBOMCBwgoCQ8E4gMHCQGIEA0KsAYGHgcRBpOTBhIGHgYGsAoVkwYRBx4GBrAKDRANCrAGBh4GEgYB2Q8DBwj9jAgQAw4DBwgCcwgPBAACAAAAAAOaAm8AEAAhAAAlJzc2NCYiDwEGFB8BFjI2NCU3JyY0NjIfARYUDwEGIiY0AXOmpg0ZJAzEDQ3EDiEaAQ2mpg0aIQ7EDQ3EDiEa2qamDiEaDcQNIg3EDRohDqamDCQZDcQNIg3EDRkkAAAAAwAAAAADuAKsAAsAFwAjAAABDgEHHgEXPgE3LgEDLgEnPgE3HgEXDgEDDgEHHgEXPgE3LgECAJjrNTXrmJjrNTXrmFZwAgJwVlZwAgJwVjRDAQFDNDRDAQFDAqwCpIaGpAICpIaGpP4OAnBWVnACAnBWVnABPgFDNDRDAQFDNDRDAAAABQAAAAADgAKrAAsAFwAjADAAQAAAEyEyNjQmIyEiBhQWFyE+ATQmJyEOARQWEyEyNjQmIyEiBhQWJx4BFyE+ATQmJyEOASUhHgEXEQ4BByEuATURNDarAQATFxcT/wARGRkRAQATFxcT/wARGRkRAQATFxcT/wARGRkaARkRAQATFxcT/wARGQHUAQARGQEBGRH/ABMXFwEAFycXFycXqwEZIhkBARkiGQFVFycXFycX1RMXAQEXJhcBARcYARcT/gARGQEBGRECABMXAAAAAAMAAAAAA6sCVgAZACYAQAAAASMiBhQWOwEeARcOAQcjIgYUFjsBPgE3LgEFHgEXIT4BNCYnIQ4BFyMuASc+ATczMjY0JisBDgEHHgEXMzI2NCYC1YASGBgSgDdIAQFIN4ASGBgSgFt4AwN4/iUBGBIBABIYGBL/ABIYVYA3SAEBSDeAEhgYEoBbeAMDeFuAEhgYAlUYJBkBSTY2SQEZJBgCeFtbeNMSGAEBGCQYAQEYkgFJNjZJARkkGAJ4W1t4AhgkGQABAAAAAAOsAisAHgAAAS4BJw4BBwYWFxY2Nz4BNzIWFwcGFhczPgE3NS4BBwMSO5ZVh9Q4ChMXFCMJK6FnP28sURMTHu4SGAECMRYBvDQ6AQKJchcqCAYPElZpASslUhYxAgEYEu8dFBMAAAABAAAAAAOyAisAHgAAAQ4BBycmBgcVHgEXMz4BLwE+ATMeARceATc+AScuAQIUVZY7URYxAgEYEu4eFBNSLW8+Z6ErCSQTFxMKOdMCKwE6NFAUFB3vEhgBAjEWUiUrAWlWEg8GCCoXcokAAAADAAAAAAL1Ar8AFAAcACQAAAE+ATcuAScjDgEHER4BFyE+ATc0JiUzHgEUBgcjEyM1Mx4BFAYCkyEpAQJmTu8UGQEBGRQBB0lpAjT+1IgdJycdiJ+fnx0nJwGKF0QkTmYCARoT/d4TGgECYUk1UtkBJjsmAf7viQEmOyYAAQAAAAADEgK/ABwAAAEeARczAyMOARQWFzM+ATQmJyMTMz4BNCYnIw4BAaUBJh0hnDsdJiYd5B0mJh0hnDsdJiYd5B0mAnodJgH+lAEmOicBASc6JgEBbAEmOicBAScABgAAAAADlgLWAAsAFwAjAEEAUgBuAAABIT4BNCYnIQ4BFBYBIQ4BFBYXIT4BNCYDIQ4BFBYXIT4BNCYFIyIGFBY7ARUjIgYUFjsBFSMiBhQWOwEyNjc1LgEDMxUeATI2PQE0JisBIgYUFhcjIgYUFjsBBwYdARQWOwEyNjQmKwE3Nj0BLgEBawIAEhgYEv4AEhkZAhL+ABIZGRICABIYGBL+ABIZGRICABIYGP1YVQkMDAlAFQoLCwoVQAkMDAlVCgsBAQtfFQELEwwMCSsJDAxeVQkMDAk3RwUMCVUKCwsKN0gFAQsCVQEYJBgBARgkGP5VARgkGAEBGCQYAQEBGCQYAQEYJBjVDBIMFgwSDBYMEgwMCYAJDAHWawkMDAmACQwMEgzWDBIMVAYICQkMDBIMVAYICQkMAAAAAAYAAAAAA4sCwAAIABEAGgAmADIAPwAAEw4BFBYyNjQmAw4BFBYyNjQmAw4BFBYyNjQmFyE+ATQmJyEOARQWNyE+ATQmJyEOARQWAx4BFyE+ATQmJyEOAbUbJCQ3JCQcGyQkNyQkHBskJDYlJI8CABIYGBL+ABIYGBICABIYGBL+ABIYGBkBGBICABIYGBL+ABIYAcABJDYkJDYkAQEBJDYkJDYk/gEBJDYkJDYkagEYJBgBARgkGP8BGCQYAQEYJBgBKhIYAQEYJBgBARgAAAACAAAAAANWAlYAFgAtAAAlMjY/ATY9AS4BKwEiBh0BFBYXMwcGFgUyNj8BNj0BNCYrASIGBxUeARczBwYWATIRGwc9CQEYEqsSGBgSViwOIAHMEBsIPAkYEqsSGAEBGBJVLA0gqxEOeRIUwhIYGBKrEhgBWB4zAREOeRIUwhIYGBKrEhgBWB4zAAAAAAMAAAAAA4ACwAAIABkAJQAAJT4BNzUjFR4BAR4BFzMVMzUzPgE0JichDgEDIT4BNCYnIQ4BFBYCACQwAaoBMP75ASQblqqWGyQkG/4qGyQrAqoSGRkS/VYSGRlAATAkKyskMAI/GyQBgIABJDYkAQEk/noBGCQYAQEYJBgAAAAAAgAA//8DKwMBABsAKAAAJT4BNxEuASIGBxEUBgcGLgI1ES4BIgYHER4BBx4BMyEyNjQmIyEiBgIiYnoCAR4tHgFBNSFBNR0BHi0eAQOm1AEYEgIAEhgYEv4AEhitD5NlARcWHh4W/uQ3UwwHDys8IwEgFh4eFv7gdpR2EhkZJBgYAAAAAwAAAAADcALHAAsALQA5AAATIT4BNCYjISIGFBYFISIGFBYXITIWFxYGByM1LgEPAQYUHwEWNjc1Mz4BJy4BBSMiBhQWFzM+ATQmwAJVEhkZEv2rEhgYAgv+BxIYGBICBiAzBgUxKGABGQtMBgZMDBgBVU1iBQhk/m2rEhgYEqsSGBgCcQEYJBgYJBisGCQYAScgKTkCIg8KCkwHEQdMCgoPIgJrTkRV/xgkGAEBGCQYAAAAAgAAAAADlgLAABQAKAAAARQWFzMRHgEyNjcRMz4BNCYnIQ4BAzMVFBYyNjc1MzI2NCYnIQ4BFBYBayQclQEkNiQBlRwkJBz+VhwkwEAkNyQBQBskJBv/ABwkJAKAGyQB/kAbJCQbAcABJDYkAQEk/tDrGyQkG+skNyQBASQ3JAAKAAAAAAN4AvgADwAWABoAIQAlACkALQA0ADgAPwAAASEOAQcRHgEXIT4BNxEuAQEjIiY9ATM1IzUzNSM1NDY7ARMjNTM1IzUzNSM1MxMjNTMVFAY3IzUzNSM1MzIWFQMs/aggKgEBKiACWCAqAQEq/h5xDxaWlpaWFg9x4ZaWlpaWlrxxlhYWlpaWcQ8WAvcBKiD9qCAqAQEqIAJYICr9XhYPcUuWS3EPFv2olkuWS5b9qJZxDxbhlkuWFg8AAAACAAD//wOAAwAADwAgAAAlES4BJyEOAQcRHgEXIT4BJRc3NjIfARYGIyEiJj8BPgEDgAEwJP2qJDABATAkAlYkMP39WYUHFAeVCAwN/gEOCwhqBxRVAlYkMAEBMCT9qiQwAQEw+2yqCAnHCxcXC4kIAQAAAAEAAAAAAzUCNgAQAAABBwYUFjI/ARcWMjY0LwEmIgHZ/hAhLBHX1xEsIRD+EC4CJv4RLCEQ19cQISwR/hAAAAABAAAAAAM1AjYAEgAAAQcnJiciDgEWHwEWMj8BNjQuAQLW1tcQFxEbDQYM/hEsEf4QIS0CJtfXDwESICAM/hAQ/hAtIAEAAAAEAAAAAANrAusAEAAhADMARAAANzMVFBYyNj0BNCYrASIGFBYTIyIGFBY7ATI2PQE0JiIGFQEyNj0BMzI2NCYrASIGHQEUFhM1NCYiBh0BFBY7ATI2NCYjyWgeLB0dFpwWHR1+aBYdHRacFh0dLB4BahYeaBYdHRacFh0dSh4sHR0WnBYdHRaxaBYdHRacFh0dLB4Bnh4sHR0WnBYdHRb9Xx0WaB4sHR0WnBYdAjloFh0dFpwWHR0sHgAAAAQAAAAAA1QC1AARACMANABGAAATDgEHFR4BFzM+ATQmKwE1NCYnPgE9ATMyNjQmJyMOAQcVHgEBIyIGFBYXMz4BNzUuASIGFQMeATsBFRQWMjY3NS4BJyMOAd0VGwEBGxWRFRsbFWEcFBQcYRUbGxWRFRsBARsCK2EVGxsVkRUbAQEbKRySARsVYRwpGwEBGxWRFRsBHwEbFZEVGwEBGykcYRUbwwEbFWEcKRsBARsVkRUb/qscKRsBARsVkRUbGxUBtRQcYRUbGxWRFRsBARsAAAAAAAASAN4AAQAAAAAAAAAVAAAAAQAAAAAAAQANABUAAQAAAAAAAgAHACIAAQAAAAAAAwANACkAAQAAAAAABAANADYAAQAAAAAABQALAEMAAQAAAAAABgANAE4AAQAAAAAACgArAFsAAQAAAAAACwATAIYAAwABBAkAAAAqAJkAAwABBAkAAQAaAMMAAwABBAkAAgAOAN0AAwABBAkAAwAaAOsAAwABBAkABAAaAQUAAwABBAkABQAWAR8AAwABBAkABgAaATUAAwABBAkACgBWAU8AAwABBAkACwAmAaUKQ3JlYXRlZCBieSBpY29uZm9udApybWVsLWljb25mb250UmVndWxhcnJtZWwtaWNvbmZvbnRybWVsLWljb25mb250VmVyc2lvbiAxLjBybWVsLWljb25mb250R2VuZXJhdGVkIGJ5IHN2ZzJ0dGYgZnJvbSBGb250ZWxsbyBwcm9qZWN0Lmh0dHA6Ly9mb250ZWxsby5jb20ACgBDAHIAZQBhAHQAZQBkACAAYgB5ACAAaQBjAG8AbgBmAG8AbgB0AAoAcgBtAGUAbAAtAGkAYwBvAG4AZgBvAG4AdABSAGUAZwB1AGwAYQByAHIAbQBlAGwALQBpAGMAbwBuAGYAbwBuAHQAcgBtAGUAbAAtAGkAYwBvAG4AZgBvAG4AdABWAGUAcgBzAGkAbwBuACAAMQAuADAAcgBtAGUAbAAtAGkAYwBvAG4AZgBvAG4AdABHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaAQIBAwEEAQUBBgEHAQgBCQEKAQsBDAENAQ4BDwEQAREBEgETARQBFQEWARcBGAEZARoBGwADdGFiCGtleWJvYXJkBmRlbGV0ZQpjb2RlLWJsb2NrBGNvZGUKdmlzaWJpbGl0eQp2aWV3LXNwbGl0BGxpbmsEcmVkbwR1bmRvBGJvbGQGaXRhbGljDGxpc3Qtb3JkZXJlZA5saXN0LXVub3JkZXJlZAVxdW90ZQ1zdHJpa2V0aHJvdWdoCXVuZGVybGluZQR3cmFwCWZvbnQtc2l6ZQRncmlkBWltYWdlC2V4cGFuZC1sZXNzC2V4cGFuZC1tb3JlD2Z1bGxzY3JlZW4tZXhpdApmdWxsc2NyZWVuAAAAAAA=);
|
|
@@ -676,936 +584,6 @@
|
|
|
676
584
|
.rc-md-editor .header-list .list-item:hover {
|
|
677
585
|
}
|
|
678
586
|
|
|
679
|
-
`;function Bi({propertyKey:e,value:t,error:c,showError:i,isSubmitting:l,setValue:a,tableMode:s,property:d,includeDescription:u,underlyingValueHasChanged:A,context:_,disabled:g}){if(!Array.isArray(d.resolvedProperties))throw Error("ArrayCustomShapedFieldBinding misconfiguration. Property `of` not set");const y=d.expanded===void 0?!0:d.expanded;Ne({property:d,value:t,setValue:a});const h=n.jsx(Ce,{icon:we(d),required:d.validation?.required,className:"text-text-secondary dark:text-text-secondary-dark",title:d.name}),I=d.resolvedProperties.map((b,p)=>{const w={propertyKey:`${e}[${p}]`,disabled:g,property:b,includeDescription:u,underlyingValueHasChanged:A,context:_,tableMode:!1,partOfArray:!0,partOfBlock:!1,autoFocus:!1};return n.jsx("div",{className:"pb-4",children:n.jsx(bn,{...w})},`custom_shaped_array_${p}`)});return n.jsxs(n.Fragment,{children:[!s&&n.jsx(fn,{initiallyExpanded:y,title:h,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",children:I}),s&&I,n.jsx(Se,{includeDescription:u,showError:i,error:c,disabled:g,property:d})]})}De.addMethod(De.array,"uniqueInArray",function(e=c=>c,t){return this.test("uniqueInArray",t,c=>!c||c.length===new Set(c.map(e)).size)});function Ei(e,t,c){const i={};return Object.entries(t).forEach(([l,a])=>{i[l]=lo({property:a,customFieldValidator:c,name:l,entityId:e})}),De.object().shape(i)}function lo(e){const t=e.property;if(We(t))throw console.error("Error in property",e),Error("Trying to create a yup mapping from a property builder. Please use resolved properties only");if(t.dataType==="string")return kz(e);if(t.dataType==="number")return mz(e);if(t.dataType==="boolean")return Sz(e);if(t.dataType==="map")return wz(e);if(t.dataType==="array")return Ez(e);if(t.dataType==="date")return Kz(e);if(t.dataType==="geopoint")return vz(e);if(t.dataType==="reference")return Cz(e);throw console.error("Unsupported data type in yup mapping",t),Error("Unsupported data type in yup mapping")}function wz({property:e,entityId:t,customFieldValidator:c,name:i}){const l={};return e.validation,e.properties&&Object.entries(e.properties).forEach(([a,s])=>{l[a]=lo({property:s,parentProperty:e,customFieldValidator:c,name:`${i}[${a}]`,entityId:t})}),De.object().shape(l)}function kz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:l}){let a=De.string();const s=e.validation;if(e.enumValues){s?.required&&(a=a.required(s?.requiredMessage?s.requiredMessage:"Required"));const d=sn(e.enumValues);a=a.oneOf((s?.required?d:[...d,null]).map(u=>u?.id??null)).nullable(!0)}if(s){if(a=s.required?a.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):a.notRequired().nullable(!0),s.unique&&c&&i&&(a=a.test("unique","This value already exists and should be unique",(d,u)=>c({name:i,property:e,parentProperty:t,value:d,entityId:l}))),(s.min||s.min===0)&&(a=a.min(s.min,`${e.name} must be min ${s.min} characters long`)),(s.max||s.max===0)&&(a=a.max(s.max,`${e.name} must be max ${s.max} characters long`)),s.matches){const d=typeof s.matches=="string"?si(s.matches):s.matches;d&&(a=a.matches(d,s.matchesMessage?{message:s.matchesMessage}:void 0))}s.trim&&(a=a.trim()),s.lowercase&&(a=a.lowercase()),s.uppercase&&(a=a.uppercase()),e.email&&(a=a.email(`${e.name} must be an email`)),e.url&&(a=a.url(`${e.name} must be a url`))}else a=a.notRequired().nullable(!0);return a}function mz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:l}){const a=e.validation;let s=De.number().typeError("Must be a number");return a?(s=a.required?s.required(a.requiredMessage?a.requiredMessage:"Required").nullable(!0):s.notRequired().nullable(!0),a.unique&&c&&i&&(s=s.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:l}))),(a.min||a.min===0)&&(s=s.min(a.min,`${e.name} must be higher or equal to ${a.min}`)),(a.max||a.max===0)&&(s=s.max(a.max,`${e.name} must be lower or equal to ${a.max}`)),(a.lessThan||a.lessThan===0)&&(s=s.lessThan(a.lessThan,`${e.name} must be higher than ${a.lessThan}`)),(a.moreThan||a.moreThan===0)&&(s=s.moreThan(a.moreThan,`${e.name} must be lower than ${a.moreThan}`)),a.positive&&(s=s.positive(`${e.name} must be positive`)),a.negative&&(s=s.negative(`${e.name} must be negative`)),a.integer&&(s=s.integer(`${e.name} must be an integer`))):s=s.notRequired().nullable(!0),s}function vz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:l}){let a=De.object();const s=e.validation;return s?.unique&&c&&i&&(a=a.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:l}))),s?.required?a=a.required(s.requiredMessage).nullable(!0):a=a.notRequired().nullable(!0),a}function Kz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:l}){if(e.autoValue)return De.object().nullable();let a=De.date();const s=e.validation;return s?(a=s.required?a.required(s?.requiredMessage?s.requiredMessage:"Required"):a.notRequired(),s.unique&&c&&i&&(a=a.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:l}))),s.min&&(a=a.min(s.min,`${e.name} must be after ${s.min}`)),s.max&&(a=a.max(s.max,`${e.name} must be before ${s.min}`))):a=a.notRequired(),a.transform(d=>d instanceof Date?d:null).nullable()}function Cz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:l}){let a=De.object();const s=e.validation;return s?(a=s.required?a.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):a.notRequired().nullable(!0),s.unique&&c&&i&&(a=a.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:l})))):a=a.notRequired().nullable(!0),a}function Sz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:l}){let a=De.boolean();const s=e.validation;return s?(a=s.required?a.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):a.notRequired().nullable(!0),s.unique&&c&&i&&(a=a.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:l})))):a=a.notRequired().nullable(!0),a}function Bz(e){return e.validation?.uniqueInArray?!0:e.dataType==="map"&&e.properties?Object.entries(e.properties).filter(([t,c])=>c.validation?.uniqueInArray):!1}function Ez({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:l}){let a=De.array();if(e.of)if(Array.isArray(e.of)){const d=e.of.map((u,A)=>({[`${i}[${A}]`]:lo({property:u,parentProperty:e,entityId:l})})).reduce((u,A)=>({...u,...A}),{});return De.array().of(De.mixed().test("Dynamic object validation","Dynamic object validation error",(u,A)=>dn(d,A.path).validate(u)))}else{a=a.of(lo({property:e.of,parentProperty:e,entityId:l}));const d=Bz(e.of);d&&(typeof d=="boolean"?a=a.uniqueInArray(u=>u,`${e.name} should have unique values within the array`):Array.isArray(d)&&d.forEach(([u,A])=>{a=a.uniqueInArray(_=>_&&_[u],`${e.name} → ${A.name??u}: should have unique values within the array`)}))}const s=e.validation;return s?(a=s.required?a.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):a.notRequired().nullable(!0),(s.min||s.min===0)&&(a=a.min(s.min,`${e.name} should be min ${s.min} entries long`)),s.max&&(a=a.max(s.max,`${e.name} should be max ${s.max} entries long`))):a=a.notRequired().nullable(!0),a}const Fz=({containerRef:e})=>{const{isSubmitting:t,isValidating:c,errors:i}=Fe.useFormikContext();return f.useEffect(()=>{const l=Object.keys(i);if(l.length>0&&t&&!c){const a=e?.current?.querySelector(`#form_field_${l[0]}`);if(a&&e?.current){const s=Fi(e.current);if(s){const u=a.getBoundingClientRect().top;s.scrollTo({top:s.scrollTop+u-64,behavior:"smooth"})}const d=a.querySelector("input");d&&d.focus()}}},[t,c,i,e]),null},Pz=e=>{const t=e&&e.scrollHeight>e.clientHeight,c=e?window.getComputedStyle(e).overflowY:null,i=c&&c.indexOf("hidden")!==-1;return t&&!i},Fi=e=>!e||e===document.body?document.body:Pz(e)?e:Fi(e.parentNode);function Dz({customId:e,entityId:t,status:c,onChange:i,error:l,entity:a}){const s=c==="existing"||!e,d=c!=="existing"&&!e,u=f.useMemo(()=>{if(!(!e||typeof e=="boolean"||e==="optional"))return sn(e)},[e]),A=cn(),{copy:_}=rc({onSuccess:h=>A.open({type:"success",message:`Copied ${h}`})}),g=re(),y={label:d?"ID is set automatically":"ID",disabled:s,name:"id",value:(a&&c==="existing"?a.id:t)??"",endAdornment:a?n.jsxs(n.Fragment,{children:[n.jsx(ye,{title:"Copy",children:n.jsx(ee,{onClick:h=>_(a.id),"aria-label":"copy-id",children:n.jsx(Rn,{size:"small"})})}),g?.entityLinkBuilder&&n.jsx(ye,{title:"Open in the console",children:n.jsx(ee,{component:"a",href:g.entityLinkBuilder({entity:a}),rel:"noopener noreferrer",target:"_blank",onClick:h=>h.stopPropagation(),"aria-label":"go-to-datasource",children:n.jsx(no,{size:"small"})})})]}):void 0};return n.jsxs(n.Fragment,{children:[u&&n.jsx(xe,{error:l,onValueChange:h=>i(h),...y,renderValue:h=>{const I=u.find(b=>b.id===h);return I?`${I.id} - ${I.label}`:h},children:u.map(h=>n.jsx(Re,{value:String(h.id),children:n.jsx(Ee,{enumKey:h.id,enumValues:u,size:"medium"})},h.id))}),!u&&n.jsx(An,{...y,error:l,placeholder:e==="optional"?"Autogenerated ID, it can be manually changed":c==="new"||c==="copy"?"ID of the new document":"ID of the document",onChange:h=>{let I=h.target.value;return I&&(I=I.trim()),i(I.length?I:void 0)}}),n.jsx(Fe.ErrorMessage,{name:"id",component:"div",children:h=>"You need to specify an ID"})]})}function te({children:e,className:t,variant:c="filled",disabled:i=!1,size:l="medium",startIcon:a=null,fullWidth:s=!1,component:d,...u}){const A="rounded-md border uppercase inline-flex items-center justify-center p-2 px-4 text-sm font-medium focus:outline-none transition ease-in-out duration-150 gap-2",_=E({"w-full":s,"w-fit":!s,"border-transparent bg-primary hover:bg-blue-600 focus:ring-blue-400 !text-white shadow hover:ring-1 hover:ring-primary":c==="filled"&&!i,"border-primary !text-primary hover:bg-primary hover:bg-opacity-10 hover:border-blue-600 !hover:text-blue-600 focus:ring-blue-400 hover:ring-1 hover:ring-primary":c==="outlined"&&!i,"border-transparent !text-primary !hover:text-blue-600 hover:bg-primary hover:bg-opacity-10":c==="text"&&!i,"border-blue-600 border-opacity-50 dark:border-blue-500 dark:border-opacity-50 opacity-50 !text-blue-600 !dark:text-blue-500 text-opacity-50 dark:text-opacity-50":c==="outlined"&&i,"border-transparent outline-none opacity-50 !text-gray-600 !dark:text-gray-500":(c==="filled"||c==="text")&&i}),g=E({"py-1 px-2":l==="small","py-2 px-4":l==="medium","py-2 px-5":l==="large"});return d?n.jsxs(d,{onClick:u.onClick,className:E(ge,a?"pl-3":"",A,_,g,t),...u,children:[a,e]}):n.jsxs("button",{type:u.type??"button",onClick:u.onClick,className:E(ge,a?"pl-3":"",A,_,g,t),disabled:i,...u,children:[a,e]})}const Pi=f.memo(Nz,(e,t)=>e.status===t.status&&e.path===t.path&&de(e.entity?.values,t.entity?.values));function Nz({status:e,path:t,collection:c,entity:i,onEntitySaveRequested:l,onDiscard:a,onModified:s,onValuesChanged:d,onIdChange:u,onFormContextChange:A,hideId:_,autoSave:g,onIdUpdateError:y}){const h=re(),I=Qe(),b=h.plugins,p=f.useMemo(()=>Me({collection:c,path:t,values:i?.values,fields:h.fields}),[i?.values,t]),w=(e==="new"||e==="copy")&&!!p.customId&&p.customId!=="optional",k=f.useMemo(()=>e==="new"||e==="copy"?w?void 0:I.generateEntityId(t):i?.id,[]),K=f.useRef(!1),m=f.useMemo(()=>{const Q=p.properties;if((e==="existing"||e==="copy")&&i)return i.values??ao(Q);if(e==="new")return ao(Q);throw console.error({status:e,entity:i}),new Error("Form has not been initialised with the correct parameters")},[e,p,i]),[v,S]=f.useState(k),[B,P]=f.useState(!1),[F,D]=f.useState(),C=f.useRef(i?.values??m),N=C.current,[M,H]=f.useState(N),Z=Q=>{H(Q),d&&d(Q),g&&Q&&!de(Q,N)&&L(Q)};f.useEffect(()=>{v&&u&&u(v)},[v,u]);const O=Me({collection:c,path:t,entityId:v,values:M,previousValues:N,fields:h.fields}),oe=O.callbacks?.onIdUpdate;f.useEffect(()=>{if(oe&&M&&(e==="new"||e==="copy"))try{const Q=oe({collection:O,path:t,entityId:v,values:M,context:h});S(Q)}catch(Q){y&&y(Q),console.error(Q)}},[v,M,e]);const U=f.useMemo(()=>N&&e==="existing"?Object.entries(O.properties).map(([Q,q])=>{if(io(q))return{};const R=N[Q],$=m[Q];return de(R,$)?{}:{[Q]:$}}).reduce((Q,q)=>({...Q,...q}),{}):{},[m,O.properties,N,e]),L=Q=>l({collection:O,path:t,entityId:v,values:Q,previousValues:i?.values,closeAfterSave:K.current,autoSave:g??!1}).then(q=>{const R=e==="new"?"new_entity_saved":e==="copy"?"entity_copied":e==="existing"?"entity_edited":"unmapped_event";h.onAnalyticsEvent?.(R,{path:t}),C.current=Q}).catch(q=>{console.error(q),D(q)}).finally(()=>{K.current=!1}),X=(Q,q)=>{if(w&&!v){console.error("Missing custom Id"),P(!0),q.setSubmitting(!1);return}if(D(void 0),P(!1),e==="existing"){if(!i?.id)throw Error("Form misconfiguration when saving, no id for existing entity")}else if(e==="new"||e==="copy"){if(O.customId&&O.customId!=="optional"&&!v)throw Error("Form misconfiguration when saving, entityId should be set")}else throw Error("New FormType added, check EntityForm");L(Q)?.then(R=>{q.resetForm({values:Q,submitCount:0,touched:{}})}).finally(()=>{q.setSubmitting(!1)})},W=f.useCallback(({name:Q,value:q,property:R})=>I.checkUniqueField(t,Q,q,R,v),[I,t,v]),V=f.useMemo(()=>v?Ei(v,O.properties,W):void 0,[v,O.properties,W]);return n.jsx(Fe.Formik,{initialValues:m,onSubmit:X,validationSchema:V,validate:Q=>console.debug("Validating",Q),onReset:()=>a&&a(),children:Q=>{const q=[],R={setFieldValue:Q.setFieldValue,values:Q.values,collection:Me({collection:O,path:t,fields:h.fields}),entityId:v,path:t,save:L};if(f.useEffect(()=>{A&&A(R)},[A,R]),b&&O){const $={entityId:v,path:t,status:e,collection:c,context:h,currentEntityId:v,formContext:R};q.push(...b.map((ne,J)=>ne.form?.Actions?n.jsx(ne.form.Actions,{...$},`actions_${ne.name}`):null).filter(Boolean))}return n.jsxs("div",{className:"h-full overflow-auto",children:[q.length>0&&n.jsx("div",{className:E("w-full flex justify-end items-center sticky top-0 right-0 left-0 z-10 bg-opacity-60 bg-slate-200 dark:bg-opacity-60 dark:bg-slate-800 backdrop-blur-md"),children:q}),n.jsxs("div",{className:"pl-4 pr-4 pt-12 pb-16 md:pl-8",children:[n.jsx("div",{className:`w-full py-2 flex items-center mt-${4+(q?8:0)} lg:mt-${8+(q?8:0)} mb-8`,children:n.jsx(j,{className:"mt-4 flex-grow "+O.hideIdFromForm?"mb-2":"mb-0",variant:"h4",children:O.singularName??O.name})}),!_&&n.jsx(Dz,{customId:O.customId,entityId:v,status:e,onChange:S,error:B,entity:i}),v&&n.jsx(Mz,{...Q,initialValues:N,onModified:s,onValuesChanged:Z,underlyingChanges:U,entity:i,resolvedCollection:O,formContext:R,status:e,savingError:F,closeAfterSaveRef:K,autoSave:g})]})]})}})}function Mz(e){const{values:t,onModified:c,onValuesChanged:i,underlyingChanges:l,formContext:a,entity:s,touched:d,setFieldValue:u,resolvedCollection:A,isSubmitting:_,status:g,handleSubmit:y,savingError:h,dirty:I,closeAfterSaveRef:b,autoSave:p}=e,w=I;f.useEffect(()=>{c&&c(w),i&&i(t)},[w,t]),f.useEffect(()=>{!p&&l&&s&&Object.entries(l).forEach(([v,S])=>{const B=t[v];!de(S,B)&&!d[v]&&(console.debug("Updated value from the datasource:",v,S),u(v,S!==void 0?S:null))})},[p,l,s,t,d,u]);const k=n.jsx("div",{className:"flex flex-col gap-8",children:(A.propertiesOrder??Object.keys(A.properties)).map(v=>{const S=A.properties[v],B=!!l&&Object.keys(l).includes(v)&&!!d[v],P=!p&&_||Nn(S)||!!S.disabled;if(io(S))return null;const D={propertyKey:v,disabled:P,property:S,includeDescription:S.description||S.longDescription,underlyingValueHasChanged:B&&!p,context:a,tableMode:!1,partOfArray:!1,partOfBlock:!1,autoFocus:!1};return n.jsx("div",{id:`form_field_${v}`,children:n.jsx(bn,{...D})},`field_${A.name}_${v}`)}).filter(Boolean)}),K=_||!w&&g==="existing",m=f.useRef(null);return n.jsxs(Fe.Form,{onSubmit:y,noValidate:!0,children:[n.jsxs("div",{className:"mt-12",ref:m,children:[k,n.jsx(Fz,{containerRef:m})]}),n.jsx("div",{className:"h-14"}),!p&&n.jsxs(wn,{position:"absolute",children:[h&&n.jsx("div",{className:"text-right",children:n.jsx(j,{color:"error",children:h.message})}),n.jsx(te,{variant:"text",disabled:K,type:"reset",children:g==="existing"?"Discard":"Clear"}),n.jsxs(te,{variant:"text",color:"primary",type:"submit",disabled:K,onClick:()=>{b.current=!1},children:[g==="existing"&&"Save",g==="copy"&&"Create copy",g==="new"&&"Create"]}),n.jsxs(te,{variant:"filled",color:"primary",type:"submit",disabled:K,onClick:()=>{b.current=!0},children:[g==="existing"&&"Save and close",g==="copy"&&"Create copy and close",g==="new"&&"Create and close"]})]})]})}const Di={text_field:{name:"Text field",description:"Simple short text",dataType:"string",Icon:Lc,color:"#2d7ff9",Field:Tn},multiline:{name:"Multiline",description:"Text with multiple lines",dataType:"string",Icon:Qc,color:"#2d7ff9",Field:Tn},markdown:{name:"Markdown",description:"Text with advanced markdown syntax",dataType:"string",Icon:Kc,color:"#2d7ff9",Field:Si},url:{name:"Url",description:"Text with URL validation",dataType:"string",Icon:Sc,color:"#154fb3",Field:Tn},email:{name:"Email",description:"Text with email validation",dataType:"string",Icon:pc,color:"#154fb3",Field:Tn},select:{name:"Select/enum",description:"Select one text value from within an enumeration",dataType:"string",Icon:Pc,color:"#4223c9",Field:qr},multi_select:{name:"Multi select",description:"Select multiple text values from within an enumeration",dataType:"array",Icon:Dc,color:"#4223c9",Field:xr},number_input:{name:"Number input",description:"Simple number field with validation",dataType:"number",Icon:Mc,color:"#bec920",Field:Tn},number_select:{name:"Number select",description:"Select a number value from within an enumeration",dataType:"number",Icon:kr,color:"#bec920",Field:qr},multi_number_select:{name:"Multiple number select",description:"Select multiple number values from within an enumeration",dataType:"array",Icon:kr,color:"#bec920",Field:xr},file_upload:{name:"File upload",description:"Input for uploading single files",dataType:"string",Icon:Vc,color:"#f92d9a",Field:nt},multi_file_upload:{name:"Multiple file upload",description:"Input for uploading multiple files",dataType:"array",Icon:Ic,color:"#f92d9a",Field:nt},reference:{name:"Reference",description:"The value refers to a different collection",dataType:"reference",Icon:Fc,color:"#ff0042",Field:ki},multi_references:{name:"Multiple references",description:"Multiple values that refer to a different collection",dataType:"array",Icon:dc,color:"#ff0042",Field:fi},switch:{name:"Switch",description:"Boolean true or false field (or yes or no, 0 or 1...)",dataType:"boolean",Icon:vc,color:"#20d9d2",Field:pi},date_time:{name:"Date/time",description:"A date time select field",dataType:"date",Icon:Oc,color:"#8b46ff",Field:wi},group:{name:"Group",description:"Group of multiple fields",dataType:"map",Icon:Ir,color:"#ff9408",Field:mi},key_value:{name:"Key-value",description:"Flexible field that allows the user to add multiple key-value pairs",dataType:"map",Icon:Ir,color:"#ff9408",Field:vi},repeat:{name:"Repeat/list",description:"A field that gets repeated multiple times (e.g. multiple text fields)",dataType:"array",Icon:Kr,color:"#ff9408",Field:Ki},custom_array:{name:"Custom array",description:"A field that saved its value as an array of custom objects",dataType:"array",Icon:Kr,color:"#ff9408",Field:Bi},block:{name:"Block",description:"A complex field that allows the user to compose different fields together, with a key->value format",dataType:"array",Icon:Wc,color:"#ff9408",Field:Ci}};function Lo(e){const t=at(e);return t?Di[t]:void 0}function at(e){if(e.dataType==="string")return e.multiline?"multiline":e.markdown?"markdown":e.storage?"file_upload":e.url?"url":e.email?"email":e.enumValues?"select":"text_field";if(e.dataType==="number")return e.enumValues?"number_select":"number_input";if(e.dataType==="map"){if(e.keyValue)return"key_value";if(e.properties)return"group"}else if(e.dataType==="array"){const t=e.of;return e.oneOf?"block":Array.isArray(t)?"custom_array":We(t)?"repeat":t?.dataType==="string"&&t.enumValues?"multi_select":t?.dataType==="number"&&t.enumValues?"multi_number_select":t?.dataType==="string"&&t.storage?"multi_file_upload":t?.dataType==="reference"?"multi_references":"repeat"}else{if(e.dataType==="boolean")return"switch";if(e.dataType==="date")return"date_time";if(e.dataType==="reference")return"reference"}console.error("Unsupported field config mapping",e)}const Me=({collection:e,path:t,entityId:c,values:i,previousValues:l,userConfigPersistence:a,fields:s})=>{const d=a?.getCollectionConfig(t),u=dn(d,"properties"),A=ao(e.properties),_=i??A,g=l??i??A,y=Object.entries(e.properties).map(([b,p])=>{const w=_?Fe.getIn(_,b):void 0;return{[b]:Te({propertyKey:b,propertyOrBuilder:p,values:_,previousValues:g,path:t,propertyValue:w,entityId:c,fields:s})}}).filter(b=>b!==null).reduce((b,p)=>({...b,...p}),{}),h=Ze(y,u),I=Object.entries(h).filter(([b,p])=>!!p?.dataType).map(([b,p])=>({[b]:p})).reduce((b,p)=>({...b,...p}),{});return{...e,properties:I,originalCollection:e}};function Te({propertyOrBuilder:e,propertyValue:t,fromBuilder:c=!1,...i}){if(typeof e=="object"&&"resolved"in e)return e;let l=null;if(e)if(We(e)){const a=i.path;if(!a)throw Error("Trying to resolve a property builder without specifying the entity path");const s=e({...i,path:a,propertyValue:t,values:i.values??{},previousValues:i.previousValues??i.values??{}});if(!s)return console.debug("Property builder not returning `Property` so it is not rendered",a,i.entityId,e),null;l=Te({...i,propertyValue:t,propertyOrBuilder:s,fromBuilder:!0})}else{const a=e;if(a.dataType==="map"&&a.properties){const s=lt({...i,properties:a.properties,propertyValue:t});l={...a,resolved:!0,fromBuilder:c,properties:s}}else a.dataType==="array"?l=un({property:a,propertyValue:t,fromBuilder:c,...i}):(a.dataType==="string"||a.dataType==="number")&&a.enumValues&&(l=st(a,c))}else return null;if(l||(l={...e,resolved:!0,fromBuilder:c}),l.fieldConfig){const a=i.fields;if(!a)throw Error(`Trying to resolve a property with key ${l.fieldConfig} that inherits from a custom field but no custom fields were provided. Use the property 'fields' in your top level component to provide them`);const s=a[l.fieldConfig];if(!s)throw Error(`Trying to resolve a property that inherits from a custom field but no custom field with id ${l.fieldConfig} was found. Check the \`fields\` in your top level component`);if(s.defaultProperty){const d=Te({propertyOrBuilder:s.defaultProperty,propertyValue:t,...i});d&&(l=Ze(d,l))}s.Field&&(l.Field=s.Field)}return l?{...l,resolved:!0}:null}function un({propertyKey:e,property:t,propertyValue:c,...i}){if(t.of){if(Array.isArray(t.of))return{...t,resolved:!0,fromBuilder:i.fromBuilder,resolvedProperties:t.of.map((l,a)=>Te({propertyKey:`${e}.${a}`,propertyOrBuilder:l,propertyValue:Array.isArray(c)?c[a]:void 0,...i,index:a}))};{const l=t.of,a=Array.isArray(c)?c.map((d,u)=>Te({propertyKey:`${e}.${u}`,propertyOrBuilder:l,propertyValue:d,...i,index:u})).filter(d=>!!d):[],s=Te({propertyKey:`${e}`,propertyOrBuilder:l,propertyValue:void 0,...i});if(!s)throw Error("When using a property builder as the 'of' prop of an ArrayProperty, you must return a valid child property");return{...t,resolved:!0,fromBuilder:i.fromBuilder,of:s,resolvedProperties:a}}}else if(t.oneOf){const l=t.oneOf?.typeField??to,a=Array.isArray(c)?c.map((d,u)=>{const A=d&&d[l],_=t.oneOf?.properties[A];return!A||!_?null:Te({propertyKey:`${e}.${u}`,propertyOrBuilder:_,propertyValue:c,...i})}).filter(d=>!!d):[],s=lt({properties:t.oneOf.properties,propertyValue:void 0,...i});return{...t,resolved:!0,oneOf:{...t.oneOf,properties:s},fromBuilder:i.fromBuilder,resolvedProperties:a}}else{if(t.Field)return{...t,resolved:!0,fromBuilder:i.fromBuilder};throw Error("The array property needs to declare an 'of' or a 'oneOf' property, or provide a custom `Field`")}}function lt({properties:e,propertyValue:t,...c}){return Object.entries(e).map(([i,l])=>({[i]:Te({propertyKey:i,propertyOrBuilder:l,propertyValue:t&&typeof t=="object"?dn(t,i):void 0,...c})})).filter(i=>i!==null).reduce((i,l)=>({...i,...l}),{})}function st(e,t){return typeof e.enumValues=="object"?{...e,resolved:!0,enumValues:sn(e.enumValues)?.filter(c=>c&&c.id&&c.label)??[],fromBuilder:t??!1}:e}function Tz(e){return typeof e=="object"?Object.entries(e).map(([t,c])=>typeof c=="string"?{id:t,label:c}:c):Array.isArray(e)?e:void 0}function Ni(e,t){const c=Te({propertyKey:"ignore",propertyOrBuilder:e,fields:t});return c?c.dataType==="reference"?!0:c.dataType==="array"?Array.isArray(c.of)?!1:c.of?.dataType==="reference":!1:null}function Oz(e){return n.jsx(br,{size:e})}function dt(e,t){const c=e?.Icon??br;return n.jsx(c,{size:t})}function we(e,t="small"){if(We(e))return n.jsx(Cc,{size:t});{const c=Lo(e);return dt(c,t)}}function Lz(e){return We(e)?"#888":Lo(e)?.color??"#666"}function pn(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const c=t.split("."),i=e[c[0]];if(typeof i=="object"&&i.dataType==="map"&&i.properties)return pn(i.properties,c.slice(1).join("."))}}}function ut(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const c=t.split("."),i=e[c[0]];if(i.dataType==="map"&&i.properties)return ut(i.properties,c.slice(1).join("."))}}}function Qz(e){return e.replace(/\.([^.]*)/g,"[$1]")}function Mi(e,t){if(!t)return e;const c={};return t.forEach(i=>{const l=pn(e,i);typeof l=="object"&&l.dataType==="map"&&l.properties&&(c[i]={...l,properties:Mi(l.properties,l.propertiesOrder??[])}),l&&(c[i]=l)}),c}const Qo={read:!0,edit:!0,create:!0,delete:!0};function so(e,t,c,i){const l=e.permissions;if(l===void 0)return Qo;if(typeof l=="object")return l;if(typeof l=="function")return l({entity:i,user:t.user,authController:t,collection:e,pathSegments:c});throw console.error("Permissions:",l),Error("New type of permission added and not mapped")}function ft(e,t,c,i){return so(e,t,c,i).edit??Qo.edit}function Vo(e,t,c,i){return so(e,t,c,i).create??Qo.create}function At(e,t,c,i){return so(e,t,c,i).delete??Qo.delete}function Ti(e,t){if(e&&(e=Po(e),e in Go))return e in Go?n.jsx(r,{iconKey:e,size:"medium",className:t}):void 0}function Wo(e,t){const c=Ti(e.icon,t);if(e?.icon&&c)return c;let i=Po(("singularName"in e?e.singularName:void 0)??e.name),l;i in Go&&(l=i),l||(i=Po(e.path),i in Go&&(l=i));const a=hr.length;return l||(l=hr[Yc(e.path)%a]),n.jsx(r,{iconKey:l,size:"medium",className:t})}const Go=lc.reduce((e,t)=>(e[t]=t,e),{});function Vz(e,t){if(t!==void 0&&t===1)return e;const c={"(quiz)$":"$1zes","^(ox)$":"$1en","([m|l])ouse$":"$1ice","(matr|vert|ind)ix|ex$":"$1ices","(x|ch|ss|sh)$":"$1es","([^aeiouy]|qu)y$":"$1ies","(hive)$":"$1s","(?:([^f])fe|([lr])f)$":"$1$2ves","(shea|lea|loa|thie)f$":"$1ves",sis$:"ses","([ti])um$":"$1a","(tomat|potat|ech|her|vet)o$":"$1oes","(bu)s$":"$1ses","(alias)$":"$1es","(octop)us$":"$1i","(ax|test)is$":"$1es","(us)$":"$1es","([^s]+)$":"$1s"},i={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const a in i){const s=new RegExp(`${a}$`,"i"),d=i[a];if(s.test(e))return e.replace(s,d)}for(const a in c){const s=new RegExp(a,"i");if(s.test(e))return e.replace(s,c[a])}return e}function Wz(e,t){if(t!==void 0&&t!==1)return e;const c={"(quiz)zes$":"$1","(matr)ices$":"$1ix","(vert|ind)ices$":"$1ex","^(ox)en$":"$1","(alias)es$":"$1","(octop|vir)i$":"$1us","(cris|ax|test)es$":"$1is","(shoe)s$":"$1","(o)es$":"$1","(bus)es$":"$1","([m|l])ice$":"$1ouse","(x|ch|ss|sh)es$":"$1","(m)ovies$":"$1ovie","(s)eries$":"$1eries","([^aeiouy]|qu)ies$":"$1y","([lr])ves$":"$1f","(tive)s$":"$1","(hive)s$":"$1","(li|wi|kni)ves$":"$1fe","(shea|loa|lea|thie)ves$":"$1f","(^analy)ses$":"$1sis","((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$":"$1$2sis","([ti])a$":"$1um","(n)ews$":"$1ews","(h|bl)ouses$":"$1ouse","(corpse)s$":"$1","(us)es$":"$1",s$:""},i={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const a in i){const s=new RegExp(`${i[a]}$`,"i");if(s.test(e))return e.replace(s,a)}for(const a in c){const s=new RegExp(a,"i");if(s.test(e))return e.replace(s,c[a])}return e}function Oi(e,t,c,i=3){const l=Object.keys(e.properties);let a=c?.filter(s=>l.includes(s));return a&&a.length>0?a:(a=l,a.filter(s=>{const d=e.properties[s];return d&&!We(d)&&!Ni(d,t)}).slice(0,i))}function Li(e,t=166){let c;function i(...l){const a=()=>{e.apply(this,l)};clearTimeout(c),c=setTimeout(a,t)}return i.clear=()=>{clearTimeout(c)},i}function _t(e,t=""){return e&&Object.keys(e).reduce((c,i)=>{const l=t?`${t}.${i}`:i;return typeof e[i]=="object"&&e[i]!==null?Array.isArray(e[i])?e[i].forEach((a,s)=>{Object.assign(c,_t(a,`${l}[${s}]`))}):Object.assign(c,_t(e[i],l)):c[l]=e[i],c},{})}function Qi(e){return e.reduce((t,c)=>(Object.entries(c).forEach(([i,l])=>{if(Array.isArray(l)&&(t[i]=Math.max(t[i]||0,l.length)),typeof l=="object"&&l!==null){const a=Qi([l]);Object.entries(a).forEach(([s,d])=>{const u=`${i}.${s}`;t[u]=Math.max(t[u]||0,d)})}}),t),{})}function yt({entity:e,collection:t,path:c,className:i}){const l=re(),a=f.useMemo(()=>Me({collection:t,path:c,entityId:e.id,values:e.values,fields:l.fields}),[t,c,e]),s=re(),d=a.properties;return n.jsx("div",{className:"w-full "+i,children:n.jsxs("div",{className:"w-full mb-4",children:[n.jsxs("div",{className:E(ue,"flex justify-between py-2 border-b last:border-b-0"),children:[n.jsx("div",{className:"flex items-center w-1/4",children:n.jsx("span",{className:"pl-2 text-sm text-gray-600",children:"Id"})}),n.jsxs("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:[n.jsx("span",{className:"flex-grow mr-2",children:e.id}),s?.entityLinkBuilder&&n.jsx("a",{href:s.entityLinkBuilder({entity:e}),rel:"noopener noreferrer",target:"_blank",children:n.jsx(ee,{children:n.jsx(no,{size:"small"})})})]})]}),Object.entries(d).map(([u,A])=>{const _=e.values[u];return n.jsxs("div",{className:E(ue,"flex justify-between py-2 border-b last:border-b-0"),children:[n.jsx("div",{className:"flex items-center w-1/4",children:n.jsx("span",{className:"pl-2 text-sm text-gray-600",children:A.name})}),n.jsx("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:n.jsx(Ke,{propertyKey:u,value:_,entity:e,property:A,size:"medium"})})]},`reference_previews_${u}`)})]})})}function Gz(e){return e.dataType==="boolean"?"center":e.dataType==="number"?e.enumValues?"left":"right":e.dataType==="date"?"right":"left"}function Vi(e){if(e.columnWidth)return e.columnWidth;if(e.dataType==="string")return e.url?280:e.storage?160:e.enumValues?200:e.multiline||e.markdown?300:(e.email,200);if(e.dataType==="array"){const t=e;return t.of?Array.isArray(e.of)?300:Vi(t.of):300}else return e.dataType==="number"?e.enumValues?200:140:e.dataType==="map"?360:e.dataType==="date"?200:e.dataType==="reference"?220:e.dataType==="boolean"?140:200}function ht(e){return`subcollection:${e.alias??e.path}`}function zo(e){return parseInt(e,10)||0}const zz={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Wi(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const gt=ce.forwardRef(function(t,c){const{onChange:i,onScroll:l,onResize:a,maxRows:s,minRows:d=1,style:u,value:A,onFocus:_,onBlur:g,sizeRef:y,...h}=t,{current:I}=ce.useRef(A!=null),b=ce.useRef(null),p=Hz(c,b),w=ce.useRef(null),k=ce.useRef(0),[K,m]=ce.useState({outerHeightStyle:0}),v=ce.useCallback(()=>{const D=b.current;if(typeof window>"u")return{outerHeightStyle:0};const N=window.getComputedStyle(D);if(N.width==="0px")return{outerHeightStyle:0};const M=y?.current??w.current,H=w.current;M.style.width=N.width,H.value=D.value||t.placeholder||"x",H.value.slice(-1)===`
|
|
680
|
-
`&&(H.value+=" ");const Z=N.boxSizing,O=zo(N.paddingBottom)+zo(N.paddingTop),oe=zo(N.borderBottomWidth)+zo(N.borderTopWidth),U=M.scrollHeight;H.value="x";const L=M.scrollHeight;let X=U;d&&(X=Math.max(Number(d)*L,X)),s&&(X=Math.min(Number(s)*L,X)),X=Math.max(X,L);const W=X+(Z==="border-box"?O+oe:0),V=Math.abs(X-U)<=1;return{outerHeightStyle:W,overflow:V}},[s,d,t.placeholder]),S=(D,C)=>{const{outerHeightStyle:N,overflow:M}=C;return k.current<20&&(N>0&&Math.abs((D.outerHeightStyle||0)-N)>1||D.overflow!==M)?(k.current+=1,{overflow:M,outerHeightStyle:N}):(process.env.NODE_ENV!=="production"&&k.current===20&&console.error(["MUI: Too many re-renders. The layout is unstable.","TextareaAutosize limits the number of renders to prevent an infinite loop."].join(`
|
|
681
|
-
`)),D)},B=ce.useCallback(()=>{const D=v();Wi(D)||(a&&a(D),m(C=>S(C,D)))},[v,a]),P=()=>{const D=v();Wi(D)||Ta.flushSync(()=>{m(C=>S(C,D))})};ce.useEffect(()=>{const D=Li(()=>{k.current=0,b.current&&P()});let C;const N=b.current,M=window;if(!(typeof window>"u"))return M.addEventListener("resize",D),typeof ResizeObserver<"u"&&(C=new ResizeObserver(D),C.observe(N)),()=>{D.clear(),M.removeEventListener("resize",D),C&&C.disconnect()}}),f.useLayoutEffect(()=>{B()}),ce.useEffect(()=>{k.current=0},[A]);const F=D=>{k.current=0,I||B(),i&&i(D)};return n.jsxs(ce.Fragment,{children:[n.jsx("textarea",{value:A,onChange:F,className:t.className,ref:p,onFocus:_,onBlur:g,rows:d,style:{height:K.outerHeightStyle,overflow:K.overflow?"hidden":void 0,...u},onScroll:l,...h}),n.jsx("textarea",{"aria-hidden":!0,className:t.shadowClassName,readOnly:!0,ref:w,tabIndex:-1,style:{...zz.shadow,...u,padding:0}})]})});function Hz(...e){return ce.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(c=>{Uz(c,t)})},e)}function Uz(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Yz(e){const t=f.useRef(null),{disabled:c,value:i,multiline:l,updateValue:a,focused:s}=e,d=f.useRef(i),[u,A]=f.useState(i),_=f.useRef(!1);f.useEffect(()=>{d.current!==i&&i!==u&&A(i),d.current=i},[i]);const g=f.useCallback(()=>{!i&&!u||u!==i&&(d.current=u,a(u))},[u,a,i]);return Do(u,g,!s,2e3),f.useEffect(()=>{t.current&&s&&!_.current?(_.current=!0,t.current.focus({preventScroll:!0}),t.current.selectionStart=t.current.value.length,t.current.selectionEnd=t.current.value.length):_.current=s},[s,t]),n.jsx(gt,{ref:t,style:{padding:0,margin:0,width:"100%",color:"unset",fontWeight:"unset",lineHeight:"unset",fontSize:"unset",fontFamily:"unset",background:"unset",border:"unset",resize:"none",outline:"none"},value:u??"",onChange:y=>{const h=y.target.value;(l||!h.endsWith(`
|
|
682
|
-
`))&&A(h)},onFocus:()=>{_.current=!0},onBlur:()=>{_.current=!1,g()}})}function It(e){const{name:t,enumValues:c,error:i,internalValue:l,disabled:a,small:s,focused:d,updateValue:u,multiple:A,valueType:_}=e,g=Array.isArray(l)&&A||!Array.isArray(l)&&!A,y=f.useRef(null);f.useEffect(()=>{y.current&&d&&y.current?.focus({preventScroll:!0})},[d,y]);const h=f.useCallback(b=>{if(_==="number")if(A){const p=b.map(w=>parseFloat(w));u(p)}else u(parseFloat(b));else if(_==="string")u(b||null);else throw Error("Missing mapping in TableSelect")},[A,u,_]),I=(b,p)=>A&&Array.isArray(b)?n.jsx(Mr,{value:b,name:t,enumValues:c,size:s?"small":"medium"},`${b}-${p}`):n.jsx(Ee,{enumKey:b,enumValues:c,size:s?"small":"medium"},`${b}-${p}`);return A?n.jsx(Zr,{inputRef:y,containerClassName:"w-full h-full",className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:a,padding:!1,includeFocusOutline:!1,value:g?l.map(b=>b.toString()):[],onMultiValueChange:h,renderValue:I,children:c?.map(b=>n.jsx(Xr,{value:String(b.id),children:n.jsx(Ee,{enumKey:b.id,enumValues:c,size:s?"small":"medium"})},b.id))}):n.jsx(xe,{inputRef:y,className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:a,multiple:A,padding:!1,includeFocusOutline:!1,value:g?A?l.map(b=>b.toString()):l?.toString():A?[]:"",onValueChange:h,onMultiValueChange:h,renderValue:I,children:c?.map(b=>n.jsx(Re,{value:String(b.id),children:n.jsx(Ee,{enumKey:b.id,enumValues:c,size:s?"small":"medium"})},b.id))})}function $z(e){const{align:t,value:c,updateValue:i,focused:l}=e,a=c&&typeof c=="number"?c.toString():"",[s,d]=f.useState(a),u=f.useRef(c);f.useEffect(()=>{u.current!==c&&String(c)!==s&&d(c?c.toString():null),u.current=c},[c]);const A=f.useCallback(()=>{if(s!==a)if(s!=null){const y=parseFloat(s);if(isNaN(y))return;y!=null&&i(y)}else i(null)},[s,c]);Do(s,A,!l,2e3),f.useEffect(()=>{!l&&a!==s&&d(c!=null?c.toString():null)},[c,l]);const _=f.useRef(null);f.useEffect(()=>{_.current&&l&&_.current.focus({preventScroll:!0})},[l,_]);const g=/^-?[0-9]+[,.]?[0-9]*$/;return n.jsx("input",{ref:_,className:"w-full text-right p-0 m-0 bg-transparent border-none resize-none outline-none font-normal leading-normal text-unset",style:{textAlign:t},value:s??"",onChange:y=>{const h=y.target.value.replace(",",".");h.length===0&&d(null),(g.test(h)||h.startsWith("-"))&&d(h)}})}function jz(e){const{internalValue:t,updateValue:c,focused:i}=e,l=f.useRef(null);return f.useEffect(()=>{l.current&&i&&l.current.focus({preventScroll:!0})},[i,l]),n.jsx(ot,{ref:l,size:"small",value:!!t,onValueChange:c})}function qz(e){const{disabled:t,error:c,mode:i,internalValue:l,updateValue:a}=e;return n.jsx(Vn,{value:l??void 0,onChange:s=>a(s),size:"medium",invisible:!0,className:"w-full h-full",inputClassName:"w-full h-full",mode:i})}function Gi({showError:e,disabled:t,showExpandIcon:c,selected:i,openPopup:l,children:a}){const s=f.useRef(null),d=f.useCallback(()=>{if(l){const A=s&&s?.current?.getBoundingClientRect();l(A)}},[]),u=f.useRef();return f.useEffect(()=>{u.current&&i&&u.current.focus({preventScroll:!0})},[i]),n.jsx(n.Fragment,{children:(e||!t&&c)&&n.jsxs("div",{ref:s,className:"absolute top-0.5 right-0.5 flex items-center",children:[i&&a,i&&!t&&c&&n.jsx(ee,{ref:u,color:"inherit",size:"small",onClick:d,children:n.jsxs("svg",{fill:"#888",width:"20",height:"20",viewBox:"0 0 24 24",children:[n.jsx("path",{className:"cls-2",d:"M20,5a1,1,0,0,0-1-1L14,4h0a1,1,0,0,0,0,2h2.57L13.29,9.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L18,7.42V10a1,1,0,0,0,1,1h0a1,1,0,0,0,1-1Z"}),n.jsx("path",{className:"cls-2",d:"M10.71,13.29a1,1,0,0,0-1.42,0L6,16.57V14a1,1,0,0,0-1-1H5a1,1,0,0,0-1,1l0,5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2H7.42l3.29-3.29A1,1,0,0,0,10.71,13.29Z"})]})}),e&&n.jsx(tc,{side:"left",className:"flex items-center justify-center",style:{width:32,height:32},title:e.message,children:n.jsx(wc,{size:"small",color:"error"})})]})})}const Jz="max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",Zz="pt-0 border-2 border-solid",Xz="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500 bg-green-50 dark:bg-green-900",xz="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500 bg-red-50 dark:bg-red-900";function Rz(e){const{propertyKey:t,error:c,selected:i,openPopup:l,value:a,disabled:s,property:d,entity:u,path:A,previewSize:_,updateValue:g}=e,y=Sn(),{internalValue:h,setInternalValue:I,onFilesAdded:b,storage:p,onFileUploadComplete:w,storagePathBuilder:k,multipleFilesSupported:K}=_i({entityValues:u.values,entityId:u.id,path:A,property:d,propertyKey:t,storageSource:y,onChange:g,value:a,disabled:s});return n.jsx(e3,{internalValue:h,setInternalValue:I,name:t,disabled:s,autoFocus:!1,openPopup:l,error:c,selected:i,property:d,onChange:g,entity:u,storagePathBuilder:k,storage:p,multipleFilesSupported:K,onFilesAdded:b,onFileUploadComplete:w,previewSize:_})}function e3({property:e,name:t,internalValue:c,setInternalValue:i,openPopup:l,entity:a,selected:s,error:d,onChange:u,multipleFilesSupported:A,previewSize:_,disabled:g,autoFocus:y,storage:h,onFilesAdded:I,onFileUploadComplete:b,storagePathBuilder:p}){const[w,k]=f.useState(!1),K=A&&_==="medium"?"small":_;if(A){const U=e;if(Array.isArray(U.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(U.of){if(U.of.dataType!=="string")throw Error("Storage field using array must be of data type string")}else throw Error("Storage field using array must be of data type string")}const m=h?.metadata,v=!!c,S=cn(),{open:B,getRootProps:P,getInputProps:F,isDragActive:D,isDragAccept:C,isDragReject:N}=er.useDropzone({accept:h.acceptedFiles?h.acceptedFiles.map(U=>({[U]:[]})).reduce((U,L)=>({...U,...L}),{}):void 0,disabled:g,maxSize:h.maxSize,noClick:!0,noKeyboard:!0,onDrop:I,onDropRejected:(U,L)=>{for(const X of U)for(const W of X.errors)S.open({type:"error",message:`Error uploading file: File is larger than ${h.maxSize} bytes`})}}),{...M}=P(),H=A?"Drag 'n' drop some files here, or click here to edit":"Drag 'n' drop a file here, or click here edit",Z=A?e.of:e,O=f.useMemo(()=>Pn(K),[K]),oe=!g&&d;return n.jsxs("div",{...M,onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>k(!1),className:E(Jz,"relative w-full h-full flex",`justify-${v?"start":"center"}`,D?Zz:"",C?Xz:"",N?xz:""),children:[n.jsx("input",{autoFocus:y,...F()}),c.map((U,L)=>{let X;return U.storagePathOrDownloadUrl?X=n.jsx(n3,{property:Z,value:U.storagePathOrDownloadUrl,entity:a,size:K},`storage_preview_${L}`):U.file&&(X=n.jsx(Ii,{entry:U,metadata:m,storagePath:p(U.file),onFileUploadComplete:b,imageSize:O,simple:!0},`storage_progress_${L}`)),X}),!c&&n.jsx("div",{className:"flex-grow m-2 max-w-[200px]",onClick:B,children:n.jsx(j,{className:"text-gray-400 dark:text-gray-600",variant:"body2",align:"center",children:H})}),n.jsx(Gi,{showError:oe,disabled:g,showExpandIcon:!0,selected:s,openPopup:g?void 0:l,children:n.jsx(ee,{color:"inherit",size:"small",onClick:B,children:n.jsx(bc,{size:"small",className:"text-gray-500"})})})]})}function n3({property:e,value:t,size:c,entity:i}){return n.jsx("div",{className:"relative m-2",children:t&&n.jsx(se,{children:n.jsx(Ke,{propertyKey:"ignore",value:t,property:e,entity:i,size:c})})})}function zi(e){const{name:t,internalValue:c,updateValue:i,multiselect:l,path:a,size:s,previewProperties:d,title:u,disabled:A,forceFilter:_}=e,[g,y]=f.useState(!1),h=f.useCallback(()=>y(!0),[]),I=f.useCallback(()=>y(!1),[]),p=Ae().getCollection(a);if(!p)throw Error(`Couldn't find the corresponding collection view for the path: ${a}`);const w=f.useCallback(F=>{i(F?In(F):null)},[i]),k=f.useCallback(F=>{i(F.map(D=>In(D)))},[i]),K=c?Array.isArray(c)?c.map(F=>F.id):c.id?[c.id]:[]:[],m=xn({multiselect:l,path:a,collection:p,onMultipleEntitiesSelected:k,onSingleEntitySelected:w,selectedEntityIds:K,forceFilter:_}),v=f.useCallback(()=>{A||m.open()},[A,m]),S=!c||Array.isArray(c)&&c.length===0,B=()=>c instanceof Je?n.jsx(on,{onClick:A?void 0:v,size:ln(s),reference:c,onHover:g,disabled:!a,previewProperties:d}):n.jsx(Co,{onClick:A?void 0:v,size:ln(s),children:n.jsx(pe,{title:"Value is not a reference.",error:"Click to edit"})}),P=()=>Array.isArray(c)?n.jsx(n.Fragment,{children:c.map((F,D)=>n.jsx("div",{className:"m-1 w-full",children:n.jsx(on,{onClick:A?void 0:v,size:"tiny",reference:F,onHover:g,disabled:!a,previewProperties:d})},`preview_array_ref_${t}_${D}`))}):n.jsx(pe,{error:"Data is not an array of references"});return p?n.jsxs("div",{className:"w-full",onMouseEnter:h,onMouseMove:h,onMouseLeave:I,children:[c&&!l&&B(),c&&l&&P(),S&&n.jsxs(te,{onClick:v,size:"small",variant:"outlined",color:"primary",children:["Edit ",u]})]}):n.jsx(pe,{error:"The specified collection does not exist"})}function Ln(e){switch(e){case"xl":return 400;case"l":return 280;case"m":return 140;case"s":return 80;case"xs":return 54;default:throw Error("Missing mapping for collection size -> height")}}const o3=({justifyContent:e,scrollable:t,faded:c,fullHeight:i,children:l})=>n.jsx("div",{className:E("flex flex-col max-h-full w-full",{"items-start":c||t}),style:{justifyContent:e,height:i?"100%":void 0,overflow:t?"auto":void 0,WebkitMaskImage:c?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0,maskImage:c?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0},children:l}),bt=f.memo(function({children:t,actions:c,size:i,selected:l,disabled:a,disabledTooltip:s,saved:d,error:u,align:A,allowScroll:_,removePadding:g,fullHeight:y,onSelect:h,width:I,hideOverflow:b=!0,showExpandIcon:p=!0}){const[w,k]=nr(),K=f.useRef(null);Mo(K,()=>{l&&h&&h(void 0)},!!(l&&h));const[m,v]=f.useState(!1),S=f.useMemo(()=>Ln(i),[i]),[B,P]=f.useState(!1),[F,D]=f.useState(d),C=!a&&u;f.useEffect(()=>{d&&D(!0);const W=setTimeout(()=>{D(!1)},800);return()=>{clearTimeout(W)}},[d]);let N=0;if(!g)switch(i){case"l":case"xl":N=4;break;case"m":N=2;break;case"s":default:N=1;break}let M;switch(A){case"right":M="flex-end";break;case"center":M="center";break;case"left":default:M="flex-start"}const H=f.useCallback(()=>{if(!h)return;const W=K&&K?.current?.getBoundingClientRect();a?h(void 0):!l&&W&&h(W)},[K,h,l,a]),Z=f.useCallback(W=>{H(),W.stopPropagation()},[H]);f.useEffect(()=>{if(k){const W=k.height>S;m!==W&&v(W)}},[k,m,S]);const O=!C&&l,oe=!a&&_&&m,U=!a&&!_&&m,L=f.useCallback(()=>P(!0),[]),X=f.useCallback(()=>P(!1),[]);return n.jsxs("div",{ref:K,className:E("transition-colors duration-100 ease-in-out",`flex relative h-full rounded-md p-${N} border border-4 border-opacity-75`,B&&!a?"bg-gray-50 dark:bg-gray-900":"",d?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",!O&&!F&&!C?"border-transparent":"",b?"overflow-hidden":"",O?"bg-gray-50 dark:bg-gray-900":"",O&&!F?"border-primary":"",F?"border-green-500 ":"",C?"border-red-500":""),style:{justifyContent:M,alignItems:a||!m?"center":void 0,width:I??"100%",textAlign:A},tabIndex:l||a?void 0:0,onFocus:Z,onMouseEnter:L,onMouseMove:L,onMouseLeave:X,children:[n.jsxs(se,{children:[y&&!U&&t,(!y||U)&&n.jsx(o3,{fullHeight:y??!1,justifyContent:M,scrollable:oe??!1,faded:U,children:!y&&n.jsx("div",{ref:w,style:{display:"flex",width:"100%",justifyContent:M,height:y?"100%":void 0},children:t})})]}),c,a&&B&&s&&n.jsx("div",{className:"absolute top-1 right-1 text-xs",children:n.jsx(ye,{title:s,children:n.jsx(Tc,{size:"smallest",color:"disabled",className:"text-gray-500"})})})]})},(e,t)=>e.error===t.error&&e.value===t.value&&e.disabled===t.disabled&&e.saved===t.saved&&e.allowScroll===t.allowScroll&&e.align===t.align&&e.size===t.size&&e.disabledTooltip===t.disabledTooltip&&e.width===t.width&&e.showExpandIcon===t.showExpandIcon&&e.removePadding===t.removePadding&&e.fullHeight===t.fullHeight&&e.selected===t.selected);function r3(e){return e.dataType==="string"&&e.storage?!0:e.dataType==="array"?Array.isArray(e.of)?!1:e.of?.dataType==="string"&&e.of?.storage:!1}const t3=f.memo(function({propertyKey:t,columnIndex:c,customFieldValidator:i,value:l,property:a,align:s,width:d,height:u,path:A,entity:_,readonly:g,disabled:y}){const h=re(),{onValueChange:I,size:b,selectedCell:p,select:w,setPopupCell:k}=E3(),K=p?.columnIndex===c&&p?.entity.path===_.path&&p?.entity.id===_.id,[m,v]=f.useState(l),S=f.useRef(l),[B,P]=f.useState(),[F,D]=f.useState(!1),C=f.useCallback(()=>{D(!0),setTimeout(()=>{D(!1)},100)},[]),N=!!a.Field,M=!!a.Preview,H=Nn(a),Z=typeof a.disabled=="object"?a.disabled.disabledMessage:void 0,O=g||y||!!a.disabled,oe=f.useMemo(()=>lo({property:a,entityId:_.id,customFieldValidator:i,name:t}),[_.id,a,t]);f.useEffect(()=>{de(l,S.current)||(P(void 0),v(l),S.current=l,C())},[C,l]);const U=ie=>{D(!1),oe.validate(ie).then(()=>{P(void 0),I&&I({value:ie,propertyKey:t,setError:P,onValueUpdated:C,entity:_,fullPath:A,context:h})}).catch(Y=>{P(Y)})};f.useEffect(()=>{oe.validate(m).then(()=>P(void 0)).catch(ie=>{P(ie)})},[m,oe]);const L=ie=>{let Y;ie===void 0?Y=null:Y=ie,S.current=Y,v(Y),U(Y)};Ne({property:a,value:m,setValue:L});const X=f.useCallback(ie=>{w(ie?{columnIndex:c,width:d,height:u,entity:_,cellRect:ie,propertyKey:t}:void 0)},[c,_,u,t,w,d]),W=ie=>{k&&k(ie?{columnIndex:c,width:d,height:u,entity:_,cellRect:ie,propertyKey:t}:void 0)};let V,Q=!1,q=!1,R=!0,$=!1,ne=!1,J=!0;const x=!O&&B;if(g||H)return n.jsx(bt,{size:b,width:d,saved:F,value:m,align:s??"left",fullHeight:!1,disabledTooltip:Z??(H?"Read only":void 0),disabled:!0,children:n.jsx(Ke,{width:d,height:Ln(b),propertyKey:t,property:a,entity:_,value:l,size:ln(b)})},`${t}_${_.path}_${_.id}`);if(!N&&(!M||K)){if(r3(a))V=n.jsx(Rz,{error:B,disabled:O,focused:K,selected:K,openPopup:k?W:void 0,property:a,entity:_,path:A,value:m,previewSize:ln(b),updateValue:L,propertyKey:t}),J=!1,q=!0,ne=!0,$=!0;else if(K&&a.dataType==="number"){const Y=a;Y.enumValues?(V=n.jsx(It,{name:t,multiple:!1,disabled:O,focused:K,valueType:"number",small:ln(b)!=="medium",enumValues:Y.enumValues,error:B,internalValue:m,updateValue:L}),ne=!0):(V=n.jsx($z,{align:s,error:B,focused:K,disabled:O,value:m,updateValue:L}),Q=!0)}else if(K&&a.dataType==="string"){const Y=a;if(Y.enumValues)V=n.jsx(It,{name:t,multiple:!1,focused:K,disabled:O,valueType:"string",small:ln(b)!=="medium",enumValues:Y.enumValues,error:B,internalValue:m,updateValue:L}),ne=!0;else if(!Y.storage){const Be=!!Y.multiline||!!Y.markdown;V=n.jsx(Yz,{error:B,disabled:O,multiline:Be,focused:K,value:m,updateValue:L}),Q=!0}}else if(a.dataType==="boolean")V=n.jsx(jz,{error:B,disabled:O,focused:K,internalValue:m,updateValue:L});else if(a.dataType==="date")V=n.jsx(qz,{name:t,error:B,disabled:O,mode:a.mode,focused:K,internalValue:m,updateValue:L}),ne=!0,R=!1,Q=!1;else if(a.dataType==="reference")typeof a.path=="string"&&(V=n.jsx(zi,{name:t,internalValue:m,updateValue:L,disabled:O,size:b,path:a.path,multiselect:!1,previewProperties:a.previewProperties,title:a.name,forceFilter:a.forceFilter})),Q=!1;else if(a.dataType==="array"){const Y=a;if(!Y.of&&!Y.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);Y.of&&!Array.isArray(Y.of)&&(Y.of.dataType==="string"||Y.of.dataType==="number"?K&&Y.of.enumValues&&(V=n.jsx(It,{name:t,multiple:!0,disabled:O,focused:K,small:ln(b)!=="medium",valueType:Y.of.dataType,enumValues:Y.of.enumValues,error:B,internalValue:m,updateValue:L}),Q=!0,ne=!0,R=!1):Y.of.dataType==="reference"&&(typeof Y.of.key=="string"&&(V=n.jsx(zi,{name:t,disabled:O,internalValue:m,updateValue:L,size:b,multiselect:!0,path:Y.of.key,previewProperties:Y.of.previewProperties,title:Y.of.name,forceFilter:Y.of.forceFilter})),Q=!1))}}return V||(Q=!1,q=K&&!V&&!O&&!H,V=n.jsx(Ke,{width:d,height:u,entity:_,propertyKey:t,value:m,property:a,size:ln(b)})),n.jsx(bt,{size:b,width:d,onSelect:X,selected:K,disabled:O||H,disabledTooltip:Z??"Disabled",removePadding:$,fullHeight:ne,saved:F,error:B,align:s,allowScroll:Q,showExpandIcon:q,value:m,hideOverflow:R,actions:J&&n.jsx(Gi,{showError:x,disabled:O,showExpandIcon:q,selected:K,openPopup:O?void 0:W}),children:V},`cell_${t}_${_.path}_${_.id}`)},c3);function c3(e,t){return e.height===t.height&&e.propertyKey===t.propertyKey&&e.align===t.align&&e.width===t.width&&de(e.property,t.property)&&de(e.value,t.value)&&de(e.entity.values,t.entity.values)}function uo(e){return n.jsx("div",{className:"flex w-full h-screen max-h-full max-w-full bg-gray-50 dark:bg-gray-900",children:n.jsx("div",{className:"m-auto",children:n.jsx(Gn,{...e})})})}function Hi({trigger:e,children:t,open:c,onOpenChange:i,side:l,sideOffset:a=5,align:s,alignOffset:d,arrowPadding:u,sticky:A,hideWhenDetached:_,avoidCollisions:g,enabled:y=!0}){return En("Popover",i3),y?n.jsxs(Zn.Root,{open:c,onOpenChange:i,children:[n.jsx(Zn.Trigger,{asChild:!0,children:e}),n.jsx(Zn.Portal,{children:n.jsxs(Zn.Content,{className:E(He,"PopoverContent shadow z-50"),side:l,sideOffset:a,align:s,alignOffset:d,arrowPadding:u,sticky:A,hideWhenDetached:_,avoidCollisions:g,children:[t,n.jsx(Zn.Arrow,{className:"fill-white dark:fill-gray-950"})]})})]}):n.jsx(n.Fragment,{children:e})}const i3=`
|
|
683
|
-
|
|
684
|
-
.PopoverContent {
|
|
685
|
-
animation-duration: 400ms;
|
|
686
|
-
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
687
|
-
will-change: transform, opacity;
|
|
688
|
-
}
|
|
689
|
-
.PopoverContent[data-state='open'][data-side='top'] {
|
|
690
|
-
animation-name: slideDownAndFade;
|
|
691
|
-
}
|
|
692
|
-
.PopoverContent[data-state='open'][data-side='right'] {
|
|
693
|
-
animation-name: slideLeftAndFade;
|
|
694
|
-
}
|
|
695
|
-
.PopoverContent[data-state='open'][data-side='bottom'] {
|
|
696
|
-
animation-name: slideUpAndFade;
|
|
697
|
-
}
|
|
698
|
-
.PopoverContent[data-state='open'][data-side='left'] {
|
|
699
|
-
animation-name: slideRightAndFade;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
@keyframes slideUpAndFade {
|
|
704
|
-
from {
|
|
705
|
-
opacity: 0;
|
|
706
|
-
transform: translateY(2px);
|
|
707
|
-
}
|
|
708
|
-
to {
|
|
709
|
-
opacity: 1;
|
|
710
|
-
transform: translateY(0);
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
@keyframes slideRightAndFade {
|
|
715
|
-
from {
|
|
716
|
-
opacity: 0;
|
|
717
|
-
transform: translateX(-2px);
|
|
718
|
-
}
|
|
719
|
-
to {
|
|
720
|
-
opacity: 1;
|
|
721
|
-
transform: translateX(0);
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
@keyframes slideDownAndFade {
|
|
726
|
-
from {
|
|
727
|
-
opacity: 0;
|
|
728
|
-
transform: translateY(-2px);
|
|
729
|
-
}
|
|
730
|
-
to {
|
|
731
|
-
opacity: 1;
|
|
732
|
-
transform: translateY(0);
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
@keyframes slideLeftAndFade {
|
|
737
|
-
from {
|
|
738
|
-
opacity: 0;
|
|
739
|
-
transform: translateX(2px);
|
|
740
|
-
}
|
|
741
|
-
to {
|
|
742
|
-
opacity: 1;
|
|
743
|
-
transform: translateX(0);
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
`,a3=e=>{switch(e){case"primary":return"bg-primary";case"secondary":return"bg-secondary";case"error":return"bg-red-500";default:return"bg-gray-300 dark:bg-gray-700"}},Ui=({color:e="primary",invisible:t=!1,children:c})=>n.jsxs("div",{className:"relative inline-block",children:[c,n.jsx("span",{className:`absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2 rounded-full
|
|
747
|
-
${a3(e)}
|
|
748
|
-
transition-all duration-200 ease-out
|
|
749
|
-
${t?"w-0 h-0":"w-2 h-2"}`})]}),l3=f.memo(function({resizeHandleRef:t,columnIndex:c,isResizingIndex:i,sort:l,onColumnSort:a,onFilterUpdate:s,filter:d,column:u,onClickResizeColumn:A,createFilterField:_}){const[g,y]=f.useState(!1),[h,I]=f.useState(!1),b=f.useCallback(m=>{I(!0)},[]),p=f.useCallback((m,v)=>{s(u,m),v!==void 0&&I(v)},[u,s]),w=i===c,K=!(i!==c&&i>0)&&(g||w);return n.jsx(se,{children:n.jsxs("div",{className:E("flex py-0 px-3 h-full text-xs uppercase font-semibold relative select-none items-center bg-gray-50 dark:bg-gray-900","text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200 ","hover:bg-gray-100 dark:hover:bg-gray-800 hover:bg-opacity-50 dark:hover:bg-opacity-50",u.frozen?"sticky left-0 z-10":"relative z-0"),style:{left:u.frozen?0:void 0,minWidth:u.width,maxWidth:u.width},onMouseEnter:()=>y(!0),onMouseMove:()=>y(!0),onMouseLeave:()=>y(!1),children:[n.jsx("div",{className:"overflow-hidden flex-grow",children:n.jsxs("div",{className:`flex items-center justify-${u.headerAlign} flex-row`,children:[u.icon&&u.icon(g||h),n.jsx("div",{className:"truncate -webkit-box w-full mx-1 overflow-hidden",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:2,justifyContent:u.align},children:u.title})]})}),u.sortable&&(l||K||h)&&n.jsx(Ui,{color:"secondary",invisible:!l,children:n.jsxs(ee,{size:"small",className:g||h?"bg-white dark:bg-gray-950":void 0,onClick:()=>{a(u.key)},children:[!l&&n.jsx(po,{}),l==="asc"&&n.jsx(po,{}),l==="desc"&&n.jsx(po,{className:"rotate-180"})]})}),u.filter&&_&&n.jsx("div",{children:n.jsx(Ui,{color:"secondary",invisible:!d,children:n.jsx(Hi,{open:h,onOpenChange:I,trigger:n.jsx(ee,{className:g||h?"bg-white dark:bg-gray-950":void 0,size:"small",onClick:b,children:n.jsx(eo,{})}),children:u.filter&&n.jsx(s3,{column:u,filter:d,onHover:g,onFilterUpdate:p,createFilterField:_,popupOpen:h,setPopupOpen:I})})})}),u.resizable&&n.jsx("div",{ref:t,className:E("absolute h-full w-[6px] top-0 right-0 cursor-col-resize",K&&"bg-gray-300 dark:bg-gray-700"),onMouseDown:A?()=>A(c,u):void 0})]})})},de);function s3({column:e,onFilterUpdate:t,filter:c,onHover:i,createFilterField:l,popupOpen:a,setPopupOpen:s}){const d=e.key,[u,A]=f.useState(c);if(f.useEffect(()=>{A(c)},[c]),!e.filter)return null;const _=()=>{t(u,!1)},g=I=>{t(void 0,!1)},y=!!c,h=l({id:d,filterValue:u,setFilterValue:A,column:e,popupOpen:a,setPopupOpen:s});return h?n.jsxs("div",{className:E("text-gray-900 dark:text-white"),children:[n.jsx("div",{className:E(ue,"py-4 px-6 text-xs font-semibold uppercase border-b"),children:e.title??d}),h&&n.jsx("div",{className:"m-4",children:h}),n.jsxs("div",{className:"flex justify-end m-4",children:[n.jsx(te,{className:"mr-4",disabled:!y,variant:"text",color:"primary",type:"reset","aria-label":"filter clear",onClick:g,children:"Clear"}),n.jsx(te,{variant:"outlined",color:"primary",onClick:_,children:"Filter"})]})]}):null}const d3=({columns:e,currentSort:t,onColumnSort:c,onFilterUpdate:i,sortByProperty:l,filter:a,onColumnResize:s,onColumnResizeEnd:d,createFilterField:u})=>{const A=e.map(()=>f.createRef()),[_,g]=f.useState(-1),y=f.useCallback((m,v,S)=>{const B=e[m],P=100,F=800,D=v>F?F:v<P?P:v,C={width:D,key:B.key,column:{...B,width:D}};S?d(C):s(C)},[e,s,d]),h=f.useCallback(m=>{if(_>=0){const v=A[_].current?.parentElement?.getBoundingClientRect().left;return v?m.clientX-v:void 0}},[A,_]),I=f.useCallback(m=>{document.body.style.cursor=m?"col-resize":"auto"},[]),b=f.useCallback(m=>{m.stopPropagation(),m.preventDefault();const v=h(m);v&&y(_,v,!1)},[y,h,_]),p=f.useCallback(m=>{m.stopPropagation(),m.preventDefault();const v=h(m);v&&y(_,v,!0),g(-1),I(!1)},[y,h,_,I]),w=f.useCallback(()=>{document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",p)},[b,p]),k=f.useCallback(()=>{document.addEventListener("mousemove",b),document.addEventListener("mouseup",p)},[b,p]);f.useEffect(()=>(_>=0?k():w(),()=>{w()}),[k,_,w]);const K=f.useCallback(m=>{g(m),I(!0)},[I]);return n.jsx("div",{className:E(ue,"z-20 sticky min-w-full flex w-fit flex-row top-0 left-0 h-12 border-b bg-gray-50 dark:bg-gray-900"),children:e.map((m,v)=>{const S=e[v],B=S&&a&&a[S.key]?a[S.key]:void 0;return n.jsx(se,{children:n.jsx(l3,{resizeHandleRef:A[v],columnIndex:v,isResizingIndex:_,onFilterUpdate:i,filter:B,sort:l===S.key?t:void 0,onColumnSort:c,onClickResizeColumn:K,column:S,createFilterField:u})},"header_"+S.key)})})},u3=f.memo(function({rowData:t,rowIndex:c,children:i,onRowClick:l,size:a,style:s,hoverRow:d,rowClassName:u}){const A=f.useCallback(_=>l?l({rowData:t,rowIndex:c,event:_}):void 0,[l,t,c]);return n.jsx("div",{className:E("flex min-w-full text-sm border-b border-gray-200 dark:border-gray-800 border-opacity-40 dark:border-opacity-40",u?u(t):"",{"hover:bg-opacity-95":d,"cursor-pointer":l}),onClick:A,style:{...s,height:Ln(a),width:"fit-content"},children:i})},de),f3=f.memo(function(t){return t.rowData&&t.cellRenderer({cellData:t.cellData,rowData:t.rowData,rowIndex:t.rowIndex,isScrolling:!1,column:t.column,columns:t.columns,columnIndex:t.columnIndex,width:t.column.width})},(e,t)=>de(e,t)),Ho=f.createContext({});Ho.displayName="VirtualListContext";const A3=f.forwardRef(({children:e,...t},c)=>n.jsx(Ho.Consumer,{children:i=>{const l=i.customView;return n.jsxs(n.Fragment,{children:[n.jsx("div",{id:"virtual-table",style:{position:"relative",height:"100%"},children:n.jsxs("div",{ref:c,...t,style:{...t?.style,minHeight:"100%",position:"relative"},children:[n.jsx(d3,{...i}),!l&&e]})}),l&&n.jsx("div",{style:{position:"sticky",top:"56px",flexGrow:1,height:"calc(100% - 56px)",marginTop:"calc(56px - 100vh)",left:0},children:l})]})}})),Yi=f.memo(function({data:t,onResetPagination:c,onEndReached:i,size:l="m",columns:a,onRowClick:s,onColumnResize:d,filter:u,checkFilterCombination:A,onFilterUpdate:_,sortBy:g,error:y,emptyMessage:h,onSortByUpdate:I,loading:b,cellRenderer:p,hoverRow:w,createFilterField:k,rowClassName:K,className:m,endAdornment:v}){const S=g?g[0]:void 0,B=g?g[1]:void 0,[P,F]=f.useState(a),D=f.useRef(null),C=f.useRef(0);f.useEffect(()=>{F(a)},[a]);const[N,M]=nr(),H=f.useCallback(J=>{F(P.map(x=>x.key===J.column.key?J.column:x))},[P]),Z=f.useCallback(J=>{F(P.map(x=>x.key===J.column.key?J.column:x)),d&&d(J)},[P,d]),O=f.useRef();f.useEffect(()=>{O.current=u},[u]);const oe=f.useCallback(()=>{C.current=0,D.current&&D.current.scrollTo(D.current?.scrollLeft,0)},[]),U=f.useCallback(J=>{const x=S===J&&B==="desc",Y=S===J&&B==="asc"?"desc":x?void 0:"asc",Be=x?void 0:J,Oe=O.current,Ue=Y&&Be?[Be,Y]:void 0;Oe&&A&&!A(Oe,Ue)&&_&&_(void 0),c&&c(),I&&I(Ue),oe()},[A,B,_,c,I,oe,S]),L=f.useCallback(()=>{C.current=0,I&&I(void 0)},[I]),X=Math.max((t?.length??0)*Ln(l)-M.height,0),W=f.useCallback(J=>{i&&(t?.length??0)>0&&J>C.current+500&&(C.current=J,i())},[t,i]),V=f.useCallback(({scrollOffset:J,scrollUpdateWasRequested:x})=>{!x&&J>=X-500&&W(J)},[X,W]),Q=f.useCallback((J,x)=>{C.current=0;const ie=O.current;let Y=ie?{...ie}:{};x?Y[J.key]=x:delete Y[J.key],!A||A(Y,S&&B?[S,B]:void 0)||(Y=x?{[J.key]:x}:{}),_&&_(Y),J.key!==S&&L()},[A,B,_,L,S]),q=f.useCallback(()=>n.jsxs("div",{className:"h-full flex flex-col items-center justify-center sticky left-0",children:[n.jsx(j,{variant:"h6",children:"Error fetching data from the data source"}),y?.message&&n.jsx(co,{className:"px-4 break-all",source:y.message})]}),[y?.message]),R=f.useCallback(()=>b?n.jsx(uo,{}):n.jsxs("div",{className:"flex overflow-auto items-center justify-center p-2 gap-2 h-full",children:[n.jsx(fc,{}),n.jsx(j,{children:h})]}),[h,b]),$=!b&&(t?.length??0)===0,ne=y?q():$?R():void 0;return n.jsx("div",{ref:N,className:E("h-full w-full",m),children:n.jsx(Ho.Provider,{value:{data:t,size:l,cellRenderer:p,columns:P,currentSort:B,onRowClick:s,customView:ne,onColumnResize:H,onColumnResizeEnd:Z,filter:O.current,onColumnSort:U,onFilterUpdate:Q,sortByProperty:S,hoverRow:w??!1,createFilterField:k,rowClassName:K,endAdornment:v},children:n.jsx(_3,{outerRef:D,width:M.width,height:M.height,itemCount:(t?.length??0)+(v?1:0),onScroll:V,itemSize:Ln(l)},l)})})},de);function _3({outerRef:e,width:t,height:c,itemCount:i,onScroll:l,itemSize:a}){const s=f.useCallback(({index:d,style:u})=>n.jsx(Ho.Consumer,{children:({onRowClick:A,data:_,columns:g,size:y="m",cellRenderer:h,hoverRow:I,rowClassName:b,endAdornment:p})=>{if(p&&d===(_??[]).length)return n.jsx("div",{style:{...u,height:"auto",position:"sticky",bottom:0,zIndex:1},children:p});const w=_&&_[d];return n.jsx(u3,{rowData:w,rowIndex:d,onRowClick:A,columns:g,hoverRow:I,rowClassName:b,style:{...u,top:`calc(${u.top}px + 48px)`},size:y,children:g.map((k,K)=>{const m=w&&w[k.key];return n.jsx(f3,{dataKey:k.key,cellRenderer:h,column:k,columns:g,rowData:w,cellData:m,rowIndex:d,columnIndex:K},`cell_${k.key}`)})},`row_${d}`)}}),[]);return n.jsx(Pa.FixedSizeList,{outerRef:e,innerElementType:A3,width:t,height:c,overscanCount:4,itemCount:i,onScroll:l,itemSize:a,children:s})}function Qn({children:e,trigger:t,open:c,defaultOpen:i,onOpenChange:l}){return n.jsxs(Jn.Root,{open:c,defaultOpen:i,onOpenChange:l,children:[n.jsx(Jn.Trigger,{asChild:!0,children:t}),n.jsx(Jn.Portal,{children:n.jsx(Jn.Content,{className:E(He,"shadow py-2 z-30"),children:e})})]})}function ke({children:e,dense:t,onClick:c}){return n.jsx(Jn.Item,{className:E(ge,c&&"cursor-pointer","rounded-md px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-900 flex items-center gap-4"),onClick:c,children:e})}function pt({entity:e,width:t,frozen:c,isSelected:i,selectionEnabled:l,size:a,toggleEntitySelection:s,onCopyClicked:d,onEditClicked:u,onDeleteClicked:A,hideId:_}){const g=Ge(),y=!!u,h=!!d,I=!!A,b=f.useCallback(K=>{s&&s(e)},[e,s]),p=f.useCallback(K=>{K.stopPropagation(),A&&A(e)},[e,A]),w=f.useCallback(K=>{K.stopPropagation(),d&&d(e)},[e,d]),k=f.useCallback(K=>{K.stopPropagation(),s&&s(e)},[e,s]);return n.jsxs("div",{onClick:k,className:E("h-full flex items-center justify-center flex-col bg-gray-50 dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-10",c?"sticky left-0":""),style:{width:t,position:c?"sticky":"initial",left:c?0:"initial",contain:"strict"},children:[(y||I||l)&&n.jsxs("div",{className:"w-34 flex justify-center",children:[y&&n.jsx(ye,{title:`Edit ${e.id}`,children:n.jsx(ee,{onClick:K=>{K.stopPropagation(),u&&u(e)},size:g?"medium":"small",children:n.jsx(ko,{})})}),l&&n.jsx(ye,{title:`Select ${e.id}`,children:n.jsx(Lr,{size:g?"medium":"small",checked:i,onCheckedChange:b})}),(h||I)&&n.jsxs(Qn,{trigger:n.jsx(ee,{size:g?"medium":"small",children:n.jsx(vr,{})}),children:[I&&n.jsxs(ke,{onClick:p,children:[n.jsx(wo,{}),"Delete"]}),h&&n.jsxs(ke,{onClick:w,children:[n.jsx(kc,{}),"Copy"]})]})]}),!_&&a!=="xs"&&n.jsx("div",{className:"w-[138px] text-center overflow-hidden truncate",children:e?n.jsxs(j,{className:"font-mono",variant:"caption",color:"secondary",children:[" ",e.id," "]}):n.jsx(Ve,{})})]})}function y3(e){const t=Ge(),c=!e.forceFilter&&e.filterIsSet&&e.clearFilter&&n.jsxs(te,{variant:"outlined",className:"h-fit-content","aria-label":"filter clear",onClick:e.clearFilter,size:"small",children:[n.jsx(mc,{}),"Clear filter"]}),i=n.jsx(xe,{value:e.size,className:"w-16 h-10",size:"small",onValueChange:l=>e.onSizeChanged(l),renderValue:l=>n.jsx("div",{className:"font-medium",children:l.toUpperCase()}),children:["xs","s","m","l","xl"].map(l=>n.jsx(Re,{value:l,className:"w-12 font-medium text-center",children:l.toUpperCase()},l))});return n.jsxs("div",{className:E(ue,"no-scrollbar min-h-[56px] overflow-x-auto px-4 bg-gray-50 dark:bg-gray-900 border-b flex flex-row justify-between items-center w-full"),children:[n.jsxs("div",{className:"flex items-center gap-8 md:gap-4 ",children:[e.title&&n.jsx("div",{className:"hidden lg:block",children:e.title}),i,e.actionsStart,c]}),n.jsxs("div",{className:"flex items-center gap-4 md:gap-2",children:[t&&n.jsx("div",{className:"w-[22px]",children:e.loading&&n.jsx(Gn,{size:"small"})}),e.onTextSearch&&n.jsx(Qt,{onTextSearch:e.onTextSearch,expandable:!0},"search-bar"),e.actions]})]})}const $i={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Contains Any"},wt=["array-contains-any","in","not-in"];function h3({name:e,value:t,setValue:c,isArray:i,path:l,title:a,previewProperties:s,setPopupOpen:d}){const u=i?["array-contains"]:["==","!=",">","<",">=","<="],[A,_]=f.useState(!1);i?u.push("array-contains-any"):u.push("in","not-in");const[g,y]=t||[u[0],void 0],[h,I]=f.useState(g),[b,p]=f.useState(y),w=b?Array.isArray(b)?b.map(C=>C instanceof Je?C.id:null).filter(Boolean):[b.id]:[];function k(C,N){const M=wt.includes(h),H=wt.includes(C);let Z=N;M!==H&&(Z=H?Z instanceof Je?[Z]:[]:void 0),I(C),p(Z);const O=Z!==null&&Array.isArray(Z)?Z.length>0:Z!==void 0;c(C&&O?[C,Z]:void 0)}const K=Ae(),m=f.useMemo(()=>l?K.getCollection(l):void 0,[l]),v=C=>{k(h,In(C))},S=C=>{k(h,C.map(N=>In(N)))},B=wt.includes(h),P=xn({multiselect:B,path:l,collection:m,onSingleEntitySelected:v,onMultipleEntitiesSelected:S,selectedEntityIds:w,onClose:()=>{d(!0)}}),F=()=>{d(!1),P.open()},D=C=>n.jsx("div",{className:"mb-0.5",onMouseEnter:()=>_(!0),onMouseMove:()=>_(!0),onMouseLeave:()=>_(!1),children:n.jsx(on,{disabled:!l,previewProperties:s,size:"medium",onClick:F,reference:C,onHover:A,allowEntityNavigation:!1})});return n.jsxs("div",{className:"flex w-[440px] flex-row",children:[n.jsx("div",{className:"w-[120px]",children:n.jsx(xe,{value:h,onValueChange:C=>{k(C,b)},renderValue:C=>$i[C],children:u.map(C=>n.jsx(Re,{value:C,children:$i[C]},C))})}),n.jsxs("div",{className:"flex-grow ml-2 h-full",children:[b&&Array.isArray(b)&&n.jsx("div",{children:b.map((C,N)=>D(C))}),b&&!Array.isArray(b)&&n.jsx("div",{children:D(b)}),(!b||Array.isArray(b)&&b.length===0)&&n.jsx(te,{onClick:F,className:"h-full",children:B?"Select references":"Select reference"})]})]})}const ji={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Any"},kt=["array-contains-any","in","not-in"];function g3({name:e,value:t,setValue:c,dataType:i,isArray:l,enumValues:a,title:s}){const d=l?["array-contains"]:["==","!=",">","<",">=","<="];a&&(l?d.push("array-contains-any"):d.push("in","not-in"));const[u,A]=t||[d[0],void 0],[_,g]=f.useState(u),[y,h]=f.useState(A);function I(p,w){let k=w;const K=kt.includes(_),m=kt.includes(p);K!==m&&(k=m?typeof w=="string"||typeof w=="number"?[w]:[]:""),typeof k=="number"&&isNaN(k)&&(k=void 0),g(p),h(k);const v=k!==null&&Array.isArray(k)?k.length>0:k!==void 0;c(p&&v?[p,k]:void 0)}const b=kt.includes(_);return n.jsxs("div",{className:"flex w-[440px] items-center",children:[n.jsx("div",{className:"w-[80px]",children:n.jsx(xe,{value:_,position:"item-aligned",onValueChange:p=>{I(p,y)},renderValue:p=>ji[p],children:d.map(p=>n.jsx(Re,{value:p,children:ji[p]},p))})}),n.jsxs("div",{className:"flex-grow ml-2",children:[!a&&n.jsx(An,{type:i==="number"?"number":void 0,value:y!==void 0?String(y):"",onChange:p=>{const w=i==="number"?parseFloat(p.target.value):p.target.value;I(_,w)},endAdornment:y&&n.jsx(ee,{className:"absolute right-3 top-2",onClick:p=>I(_,void 0),children:n.jsx(an,{})})}),a&&n.jsx(xe,{position:"item-aligned",value:y!==void 0?Array.isArray(y)?y.map(p=>String(p)):String(y):l?[]:"",onValueChange:p=>{I(_,i==="number"?parseInt(p):p)},multiple:b,endAdornment:y&&n.jsx(ee,{className:"absolute right-3 top-2",onClick:p=>I(_,void 0),children:n.jsx(an,{})}),renderValue:p=>n.jsx(Ee,{enumKey:p,enumValues:a,size:"small"},`select_value_${e}_${p}`),children:a.map(p=>n.jsx(Re,{value:String(p.id),children:n.jsx(Ee,{enumKey:String(p.id),enumValues:a,size:"small"})},`select_value_${e}_${p.id}`))})]})]})}function I3({name:e,title:t,value:c,setValue:i}){function l(d){i(d!==void 0?["==",d]:void 0)}const a=c&&c[1],s=!!c;return n.jsx("div",{className:"w-[200px]",children:n.jsx(On,{value:a,allowIndeterminate:!0,onValueChange:d=>l(d===null?void 0:d),label:s?a?`${t} is true`:`${t} is false`:"No filter"})})}const b3="hover:bg-gray-200 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75",p3="inline-flex items-center justify-center p-2 text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150",w3="dark:text-gray-100 text-gray-700 visited:text-gray-700 dark:visited:text-gray-100",k3={medium:"w-10 !h-10 min-w-10 min-h-10",small:"w-8 !h-8 min-w-8 min-h-8",large:"w-12 !h-12 min-w-12 min-h-12"},m3={circular:"rounded-full",square:"rounded-md"},v3=({children:e,className:t,size:c="medium",variant:i="ghost",shape:l="circular",disabled:a,toggled:s,component:d,...u},A)=>{const _=i==="ghost"?"bg-transparent":"bg-gray-50 dark:bg-gray-950",g=d||"button";return n.jsx(g,{type:"button",ref:A,...u,className:E(ge,a?"opacity-50 pointer-events-none":"cursor-pointer",s?"outline outline-2 outline-primary":"",w3,_,p3,b3,m3[l],k3[c],t),children:e})},ee=f.forwardRef(v3),mt=ce.forwardRef(function(t,c){const{shrink:i,className:l,...a}=t,s={root:"origin-left transition-transform block whitespace-nowrap overflow-hidden text-overflow-ellipsis max-w-full",shrink:"transform translate-y-[2px] scale-75 translate-x-[12px]",expanded:"translate-x-[16px] top-0 transform translate-y-[16px] scale-100"},d=E(s.root,{[s.shrink]:i,[s.expanded]:!i},l);return n.jsx("label",{"data-shrink":i,ref:c,className:d,...a})}),Vn=({value:e,label:t,onChange:c,disabled:i,clearable:l,mode:a="date",error:s,size:d,className:u,style:A,inputClassName:_,preventOpenOnFocus:g,invisible:y})=>{const h=f.useRef(null),{locale:I}=re(),b=f.useRef(null),[p,w]=f.useState(document.activeElement===b.current),k=e!=null,K=e!=null&&!(e instanceof Date);En("DateTimeField",K3);const m=v=>{v.preventDefault(),c(null)};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:E("rounded-md relative max-w-full",!y&&qe,i?en:ze,{"min-h-[48px]":d==="small","min-h-[64px]":d==="medium"},u),style:A,children:[t&&n.jsx(mt,{className:E("absolute top-1 pointer-events-none",s?"text-red-500 dark:text-red-600":p?"text-primary":"text-text-secondary dark:text-text-secondary-dark",i?"opacity-50":""),shrink:k||p,children:t}),n.jsx(Ro,{ref:h,locale:I,selected:(K?null:e)??null,onChange:c,disabled:!1,popperClassName:E(He,"my-4 shadow"),onClick:v=>v.stopPropagation(),onFocus:()=>w(!0),onBlur:()=>w(!1),showTimeSelect:a==="date_time",timeFormat:"HH:mm",timeIntervals:15,timeCaption:"time",dateFormat:a==="date_time"?"Pp":"P",preventOpenOnFocus:!0,className:E("w-full outline-none bg-transparent leading-normal text-base px-3",l?"pr-14":"pr-12","rounded-md",!y&&ge,d==="small"?"min-h-[48px]":"min-h-[64px]",t?"pt-[28px] pb-2":"py-2",_,i&&"border border-transparent outline-none opacity-50 dark:opacity-50 text-gray-600 dark:text-gray-500")}),n.jsx(ee,{onClick:()=>h.current?.setOpen(!0),className:"absolute right-3 top-1/2 transform -translate-y-1/2 !text-gray-500 ",children:n.jsx(Ac,{color:"disabled"})}),l&&e&&n.jsx(ee,{onClick:m,className:"absolute right-14 top-1/2 transform -translate-y-1/2 text-gray-400 ",children:n.jsx(an,{})})]}),K&&n.jsx(pe,{title:"Invalid date value for this field",error:`The provided value is: ${JSON.stringify(e)}`})]})},K3=`
|
|
750
|
-
.react-datepicker__year-read-view--down-arrow,
|
|
751
|
-
.react-datepicker__month-read-view--down-arrow,
|
|
752
|
-
.react-datepicker__month-year-read-view--down-arrow, .react-datepicker__navigation-icon::before {
|
|
753
|
-
border-color: #ccc;
|
|
754
|
-
border-style: solid;
|
|
755
|
-
border-width: 3px 3px 0 0;
|
|
756
|
-
content: "";
|
|
757
|
-
display: block;
|
|
758
|
-
height: 9px;
|
|
759
|
-
position: absolute;
|
|
760
|
-
top: 6px;
|
|
761
|
-
width: 9px;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
.react-datepicker-wrapper {
|
|
765
|
-
width: 100%;
|
|
766
|
-
height: 100%;
|
|
767
|
-
display: flex;
|
|
768
|
-
padding: 0;
|
|
769
|
-
border: 0;
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
.react-datepicker {
|
|
773
|
-
font-size: 0.875rem;
|
|
774
|
-
color: #111;
|
|
775
|
-
display: flex;
|
|
776
|
-
position: relative;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
.react-datepicker--time-only .react-datepicker__time-container {
|
|
780
|
-
border-left: 0;
|
|
781
|
-
}
|
|
782
|
-
.react-datepicker--time-only .react-datepicker__time,
|
|
783
|
-
.react-datepicker--time-only .react-datepicker__time-box {
|
|
784
|
-
border-bottom-left-radius: 4px;
|
|
785
|
-
border-bottom-right-radius: 4px;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
.react-datepicker__triangle {
|
|
789
|
-
display: none;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
.react-datepicker-popper {
|
|
793
|
-
z-index: 100;
|
|
794
|
-
min-width: 348px;
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
.react-datepicker__header {
|
|
798
|
-
text-align: center;
|
|
799
|
-
background-color: #f0f0f0;
|
|
800
|
-
border-bottom: 1px solid #e7e7e9;
|
|
801
|
-
border-top-left-radius: 4px;
|
|
802
|
-
padding: 16px;
|
|
803
|
-
position: relative;
|
|
804
|
-
}
|
|
805
|
-
.react-datepicker__header--time {
|
|
806
|
-
padding-bottom: 8px;
|
|
807
|
-
padding-left: 5px;
|
|
808
|
-
padding-right: 5px;
|
|
809
|
-
}
|
|
810
|
-
.react-datepicker__header--time:not(.react-datepicker__header--time--only) {
|
|
811
|
-
border-top-left-radius: 0;
|
|
812
|
-
}
|
|
813
|
-
.react-datepicker__header:not(.react-datepicker__header--has-time-select) {
|
|
814
|
-
border-top-right-radius: 4px;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
.react-datepicker__year-dropdown-container--select,
|
|
818
|
-
.react-datepicker__month-dropdown-container--select,
|
|
819
|
-
.react-datepicker__month-year-dropdown-container--select,
|
|
820
|
-
.react-datepicker__year-dropdown-container--scroll,
|
|
821
|
-
.react-datepicker__month-dropdown-container--scroll,
|
|
822
|
-
.react-datepicker__month-year-dropdown-container--scroll {
|
|
823
|
-
display: inline-block;
|
|
824
|
-
margin: 0 15px;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
.react-datepicker__current-month,
|
|
828
|
-
.react-datepicker-time__header,
|
|
829
|
-
.react-datepicker-year-header {
|
|
830
|
-
margin-top: 0;
|
|
831
|
-
color: #000;
|
|
832
|
-
font-weight: 500;
|
|
833
|
-
font-size: 0.875rem;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
.react-datepicker-time__header {
|
|
837
|
-
text-overflow: ellipsis;
|
|
838
|
-
white-space: nowrap;
|
|
839
|
-
overflow: hidden;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
.react-datepicker__navigation {
|
|
843
|
-
align-items: center;
|
|
844
|
-
background: none;
|
|
845
|
-
display: flex;
|
|
846
|
-
justify-content: center;
|
|
847
|
-
text-align: center;
|
|
848
|
-
cursor: pointer;
|
|
849
|
-
position: absolute;
|
|
850
|
-
top: 2px;
|
|
851
|
-
padding: 0;
|
|
852
|
-
border: none;
|
|
853
|
-
z-index: 1;
|
|
854
|
-
height: 32px;
|
|
855
|
-
width: 32px;
|
|
856
|
-
text-indent: -999em;
|
|
857
|
-
overflow: hidden;
|
|
858
|
-
}
|
|
859
|
-
.react-datepicker__navigation--previous {
|
|
860
|
-
top: 12px;
|
|
861
|
-
left: 4px;
|
|
862
|
-
}
|
|
863
|
-
.react-datepicker__navigation--next {
|
|
864
|
-
top: 12px;
|
|
865
|
-
right: 4px;
|
|
866
|
-
}
|
|
867
|
-
.react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button) {
|
|
868
|
-
right: 85px;
|
|
869
|
-
}
|
|
870
|
-
.react-datepicker__navigation--years {
|
|
871
|
-
position: relative;
|
|
872
|
-
top: 0;
|
|
873
|
-
display: block;
|
|
874
|
-
margin-left: auto;
|
|
875
|
-
margin-right: auto;
|
|
876
|
-
}
|
|
877
|
-
.react-datepicker__navigation--years-previous {
|
|
878
|
-
top: 4px;
|
|
879
|
-
}
|
|
880
|
-
.react-datepicker__navigation--years-upcoming {
|
|
881
|
-
top: -4px;
|
|
882
|
-
}
|
|
883
|
-
.react-datepicker__navigation:hover *::before {
|
|
884
|
-
border-color: #a6a6a6;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
.react-datepicker__navigation-icon {
|
|
888
|
-
position: relative;
|
|
889
|
-
top: -1px;
|
|
890
|
-
font-size: 20px;
|
|
891
|
-
width: 0;
|
|
892
|
-
}
|
|
893
|
-
.react-datepicker__navigation-icon--next {
|
|
894
|
-
left: -2px;
|
|
895
|
-
}
|
|
896
|
-
.react-datepicker__navigation-icon--next::before {
|
|
897
|
-
transform: rotate(45deg);
|
|
898
|
-
left: -7px;
|
|
899
|
-
}
|
|
900
|
-
.react-datepicker__navigation-icon--previous {
|
|
901
|
-
right: -2px;
|
|
902
|
-
}
|
|
903
|
-
.react-datepicker__navigation-icon--previous::before {
|
|
904
|
-
transform: rotate(225deg);
|
|
905
|
-
right: -7px;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
.react-datepicker__year {
|
|
910
|
-
margin: 0.4rem;
|
|
911
|
-
text-align: center;
|
|
912
|
-
}
|
|
913
|
-
.react-datepicker__year-wrapper {
|
|
914
|
-
display: flex;
|
|
915
|
-
flex-wrap: wrap;
|
|
916
|
-
max-width: 180px;
|
|
917
|
-
}
|
|
918
|
-
.react-datepicker__year .react-datepicker__year-text {
|
|
919
|
-
display: inline-block;
|
|
920
|
-
width: 4rem;
|
|
921
|
-
margin: 2px;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
.react-datepicker__month {
|
|
925
|
-
margin: 16px;
|
|
926
|
-
text-align: center;
|
|
927
|
-
}
|
|
928
|
-
.react-datepicker__month .react-datepicker__month-text,
|
|
929
|
-
.react-datepicker__month .react-datepicker__quarter-text {
|
|
930
|
-
display: inline-block;
|
|
931
|
-
width: 4rem;
|
|
932
|
-
margin: 2px;
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
.react-datepicker__input-time-container {
|
|
936
|
-
display: flex;
|
|
937
|
-
width: 100%;
|
|
938
|
-
height: 100%;
|
|
939
|
-
margin: 5px 0 10px 15px;
|
|
940
|
-
text-align: left;
|
|
941
|
-
}
|
|
942
|
-
.react-datepicker__input-time-container .react-datepicker-time__caption {
|
|
943
|
-
display: inline-block;
|
|
944
|
-
}
|
|
945
|
-
.react-datepicker__input-time-container .react-datepicker-time__input-container {
|
|
946
|
-
display: inline-block;
|
|
947
|
-
}
|
|
948
|
-
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input {
|
|
949
|
-
display: inline-block;
|
|
950
|
-
margin-left: 10px;
|
|
951
|
-
}
|
|
952
|
-
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input {
|
|
953
|
-
width: auto;
|
|
954
|
-
}
|
|
955
|
-
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-inner-spin-button,
|
|
956
|
-
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-outer-spin-button {
|
|
957
|
-
-webkit-appearance: none;
|
|
958
|
-
margin: 0;
|
|
959
|
-
}
|
|
960
|
-
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time] {
|
|
961
|
-
-moz-appearance: textfield;
|
|
962
|
-
}
|
|
963
|
-
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__delimiter {
|
|
964
|
-
margin-left: 5px;
|
|
965
|
-
display: inline-block;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
.react-datepicker__time-container {
|
|
969
|
-
float: right;
|
|
970
|
-
border-left: 1px solid #e7e7e9;
|
|
971
|
-
width: 85px;
|
|
972
|
-
height: 320px;
|
|
973
|
-
}
|
|
974
|
-
.react-datepicker__time-container--with-today-button {
|
|
975
|
-
display: inline;
|
|
976
|
-
border: 1px solid #e7e7e9;
|
|
977
|
-
border-radius: 4px;
|
|
978
|
-
position: absolute;
|
|
979
|
-
right: -87px;
|
|
980
|
-
top: 0;
|
|
981
|
-
}
|
|
982
|
-
.react-datepicker__time-container .react-datepicker__time {
|
|
983
|
-
position: relative;
|
|
984
|
-
border-bottom-right-radius: 4px;
|
|
985
|
-
}
|
|
986
|
-
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box {
|
|
987
|
-
width: 85px;
|
|
988
|
-
overflow-x: hidden;
|
|
989
|
-
margin: 0 auto;
|
|
990
|
-
text-align: center;
|
|
991
|
-
border-bottom-right-radius: 4px;
|
|
992
|
-
}
|
|
993
|
-
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list {
|
|
994
|
-
list-style: none;
|
|
995
|
-
margin: 0;
|
|
996
|
-
height: calc(195px + (1.7rem / 2));
|
|
997
|
-
overflow-y: scroll;
|
|
998
|
-
padding-right: 0;
|
|
999
|
-
padding-left: 0;
|
|
1000
|
-
width: 100%;
|
|
1001
|
-
height: 100%;
|
|
1002
|
-
box-sizing: content-box;
|
|
1003
|
-
}
|
|
1004
|
-
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item {
|
|
1005
|
-
height: 28px;
|
|
1006
|
-
padding: 5px 10px;
|
|
1007
|
-
white-space: nowrap;
|
|
1008
|
-
}
|
|
1009
|
-
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover {
|
|
1010
|
-
cursor: pointer;
|
|
1011
|
-
}
|
|
1012
|
-
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected {
|
|
1013
|
-
background-color: #5193f6;
|
|
1014
|
-
color: white;
|
|
1015
|
-
font-weight: 500;
|
|
1016
|
-
}
|
|
1017
|
-
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover {
|
|
1018
|
-
background-color: #5193f6;
|
|
1019
|
-
}
|
|
1020
|
-
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled {
|
|
1021
|
-
color: #ccc;
|
|
1022
|
-
}
|
|
1023
|
-
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled:hover {
|
|
1024
|
-
cursor: default;
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
.react-datepicker__week-number {
|
|
1028
|
-
color: #ccc;
|
|
1029
|
-
display: inline-block;
|
|
1030
|
-
width: 1.7rem;
|
|
1031
|
-
line-height: 1.7rem;
|
|
1032
|
-
text-align: center;
|
|
1033
|
-
padding: 2px;
|
|
1034
|
-
margin: 2px;
|
|
1035
|
-
}
|
|
1036
|
-
.react-datepicker__week-number.react-datepicker__week-number--clickable {
|
|
1037
|
-
cursor: pointer;
|
|
1038
|
-
}
|
|
1039
|
-
.react-datepicker__week-number.react-datepicker__week-number--clickable:hover {
|
|
1040
|
-
border-radius: 4px;
|
|
1041
|
-
background-color: #f0f0f0;
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
.react-datepicker__day-names,
|
|
1045
|
-
.react-datepicker__week {
|
|
1046
|
-
white-space: nowrap;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
.react-datepicker__day-names {
|
|
1050
|
-
margin-bottom: -8px;
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
.react-datepicker__day-name,
|
|
1054
|
-
.react-datepicker__day,
|
|
1055
|
-
.react-datepicker__time-name {
|
|
1056
|
-
color: #000;
|
|
1057
|
-
display: inline-block;
|
|
1058
|
-
width: 1.7rem;
|
|
1059
|
-
line-height: 1.7rem;
|
|
1060
|
-
text-align: center;
|
|
1061
|
-
padding: 2px;
|
|
1062
|
-
margin: 2px;
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
.react-datepicker__month-container{
|
|
1066
|
-
flex-grow: 1;
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
.react-datepicker__day,
|
|
1070
|
-
.react-datepicker__month-text,
|
|
1071
|
-
.react-datepicker__quarter-text,
|
|
1072
|
-
.react-datepicker__year-text {
|
|
1073
|
-
width: 32px;
|
|
1074
|
-
cursor: pointer;
|
|
1075
|
-
}
|
|
1076
|
-
.react-datepicker__day:hover,
|
|
1077
|
-
.react-datepicker__month-text:hover,
|
|
1078
|
-
.react-datepicker__quarter-text:hover,
|
|
1079
|
-
.react-datepicker__year-text:hover {
|
|
1080
|
-
border-radius: 100%;
|
|
1081
|
-
background-color: #f0f0f0;
|
|
1082
|
-
}
|
|
1083
|
-
.react-datepicker__day--today,
|
|
1084
|
-
.react-datepicker__month-text--today,
|
|
1085
|
-
.react-datepicker__quarter-text--today,
|
|
1086
|
-
.react-datepicker__year-text--today {
|
|
1087
|
-
font-weight: 500;
|
|
1088
|
-
}
|
|
1089
|
-
.react-datepicker__day--highlighted,
|
|
1090
|
-
.react-datepicker__month-text--highlighted,
|
|
1091
|
-
.react-datepicker__quarter-text--highlighted,
|
|
1092
|
-
.react-datepicker__year-text--highlighted {
|
|
1093
|
-
border-radius: 100%;
|
|
1094
|
-
background-color: #3dcc4a;
|
|
1095
|
-
color: #fff;
|
|
1096
|
-
}
|
|
1097
|
-
.react-datepicker__day--highlighted:hover,
|
|
1098
|
-
.react-datepicker__month-text--highlighted:hover,
|
|
1099
|
-
.react-datepicker__quarter-text--highlighted:hover,
|
|
1100
|
-
.react-datepicker__year-text--highlighted:hover {
|
|
1101
|
-
background-color: #32be3f;
|
|
1102
|
-
}
|
|
1103
|
-
.react-datepicker__day--highlighted-custom-1,
|
|
1104
|
-
.react-datepicker__month-text--highlighted-custom-1,
|
|
1105
|
-
.react-datepicker__quarter-text--highlighted-custom-1,
|
|
1106
|
-
.react-datepicker__year-text--highlighted-custom-1 {
|
|
1107
|
-
color: magenta;
|
|
1108
|
-
}
|
|
1109
|
-
.react-datepicker__day--highlighted-custom-2,
|
|
1110
|
-
.react-datepicker__month-text--highlighted-custom-2,
|
|
1111
|
-
.react-datepicker__quarter-text--highlighted-custom-2,
|
|
1112
|
-
.react-datepicker__year-text--highlighted-custom-2 {
|
|
1113
|
-
color: green;
|
|
1114
|
-
}
|
|
1115
|
-
.react-datepicker__day--selected, .react-datepicker__day--in-selecting-range, .react-datepicker__day--in-range,
|
|
1116
|
-
.react-datepicker__month-text--selected,
|
|
1117
|
-
.react-datepicker__month-text--in-selecting-range,
|
|
1118
|
-
.react-datepicker__month-text--in-range,
|
|
1119
|
-
.react-datepicker__quarter-text--selected,
|
|
1120
|
-
.react-datepicker__quarter-text--in-selecting-range,
|
|
1121
|
-
.react-datepicker__quarter-text--in-range,
|
|
1122
|
-
.react-datepicker__year-text--selected,
|
|
1123
|
-
.react-datepicker__year-text--in-selecting-range,
|
|
1124
|
-
.react-datepicker__year-text--in-range {
|
|
1125
|
-
border-radius: 100%;
|
|
1126
|
-
background-color: #5193f6;
|
|
1127
|
-
color: #fff;
|
|
1128
|
-
}
|
|
1129
|
-
.react-datepicker__day--selected:hover, .react-datepicker__day--in-selecting-range:hover, .react-datepicker__day--in-range:hover,
|
|
1130
|
-
.react-datepicker__month-text--selected:hover,
|
|
1131
|
-
.react-datepicker__month-text--in-selecting-range:hover,
|
|
1132
|
-
.react-datepicker__month-text--in-range:hover,
|
|
1133
|
-
.react-datepicker__quarter-text--selected:hover,
|
|
1134
|
-
.react-datepicker__quarter-text--in-selecting-range:hover,
|
|
1135
|
-
.react-datepicker__quarter-text--in-range:hover,
|
|
1136
|
-
.react-datepicker__year-text--selected:hover,
|
|
1137
|
-
.react-datepicker__year-text--in-selecting-range:hover,
|
|
1138
|
-
.react-datepicker__year-text--in-range:hover {
|
|
1139
|
-
background-color: #186ef0;
|
|
1140
|
-
}
|
|
1141
|
-
.react-datepicker__day--keyboard-selected,
|
|
1142
|
-
.react-datepicker__month-text--keyboard-selected,
|
|
1143
|
-
.react-datepicker__quarter-text--keyboard-selected,
|
|
1144
|
-
.react-datepicker__year-text--keyboard-selected {
|
|
1145
|
-
border-radius: 100%;
|
|
1146
|
-
background-color: #cee2ff;
|
|
1147
|
-
color: rgb(0, 0, 0);
|
|
1148
|
-
}
|
|
1149
|
-
.react-datepicker__day--keyboard-selected:hover,
|
|
1150
|
-
.react-datepicker__month-text--keyboard-selected:hover,
|
|
1151
|
-
.react-datepicker__quarter-text--keyboard-selected:hover,
|
|
1152
|
-
.react-datepicker__year-text--keyboard-selected:hover {
|
|
1153
|
-
background-color: #186ef0;
|
|
1154
|
-
}
|
|
1155
|
-
.react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range,
|
|
1156
|
-
.react-datepicker__month-text--in-range,
|
|
1157
|
-
.react-datepicker__quarter-text--in-range,
|
|
1158
|
-
.react-datepicker__year-text--in-range),
|
|
1159
|
-
.react-datepicker__month-text--in-selecting-range:not(.react-datepicker__day--in-range,
|
|
1160
|
-
.react-datepicker__month-text--in-range,
|
|
1161
|
-
.react-datepicker__quarter-text--in-range,
|
|
1162
|
-
.react-datepicker__year-text--in-range),
|
|
1163
|
-
.react-datepicker__quarter-text--in-selecting-range:not(.react-datepicker__day--in-range,
|
|
1164
|
-
.react-datepicker__month-text--in-range,
|
|
1165
|
-
.react-datepicker__quarter-text--in-range,
|
|
1166
|
-
.react-datepicker__year-text--in-range),
|
|
1167
|
-
.react-datepicker__year-text--in-selecting-range:not(.react-datepicker__day--in-range,
|
|
1168
|
-
.react-datepicker__month-text--in-range,
|
|
1169
|
-
.react-datepicker__quarter-text--in-range,
|
|
1170
|
-
.react-datepicker__year-text--in-range) {
|
|
1171
|
-
background-color: rgba(33, 107, 165, 0.5);
|
|
1172
|
-
}
|
|
1173
|
-
.react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,
|
|
1174
|
-
.react-datepicker__month-text--in-selecting-range,
|
|
1175
|
-
.react-datepicker__quarter-text--in-selecting-range,
|
|
1176
|
-
.react-datepicker__year-text--in-selecting-range), .react-datepicker__year--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,
|
|
1177
|
-
.react-datepicker__month-text--in-selecting-range,
|
|
1178
|
-
.react-datepicker__quarter-text--in-selecting-range,
|
|
1179
|
-
.react-datepicker__year-text--in-selecting-range),
|
|
1180
|
-
.react-datepicker__month--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,
|
|
1181
|
-
.react-datepicker__month-text--in-selecting-range,
|
|
1182
|
-
.react-datepicker__quarter-text--in-selecting-range,
|
|
1183
|
-
.react-datepicker__year-text--in-selecting-range),
|
|
1184
|
-
.react-datepicker__year--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,
|
|
1185
|
-
.react-datepicker__month-text--in-selecting-range,
|
|
1186
|
-
.react-datepicker__quarter-text--in-selecting-range,
|
|
1187
|
-
.react-datepicker__year-text--in-selecting-range),
|
|
1188
|
-
.react-datepicker__month--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,
|
|
1189
|
-
.react-datepicker__month-text--in-selecting-range,
|
|
1190
|
-
.react-datepicker__quarter-text--in-selecting-range,
|
|
1191
|
-
.react-datepicker__year-text--in-selecting-range),
|
|
1192
|
-
.react-datepicker__year--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,
|
|
1193
|
-
.react-datepicker__month-text--in-selecting-range,
|
|
1194
|
-
.react-datepicker__quarter-text--in-selecting-range,
|
|
1195
|
-
.react-datepicker__year-text--in-selecting-range),
|
|
1196
|
-
.react-datepicker__month--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,
|
|
1197
|
-
.react-datepicker__month-text--in-selecting-range,
|
|
1198
|
-
.react-datepicker__quarter-text--in-selecting-range,
|
|
1199
|
-
.react-datepicker__year-text--in-selecting-range),
|
|
1200
|
-
.react-datepicker__year--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,
|
|
1201
|
-
.react-datepicker__month-text--in-selecting-range,
|
|
1202
|
-
.react-datepicker__quarter-text--in-selecting-range,
|
|
1203
|
-
.react-datepicker__year-text--in-selecting-range) {
|
|
1204
|
-
background-color: #f0f0f0;
|
|
1205
|
-
color: #000;
|
|
1206
|
-
}
|
|
1207
|
-
.react-datepicker__day--disabled,
|
|
1208
|
-
.react-datepicker__month-text--disabled,
|
|
1209
|
-
.react-datepicker__quarter-text--disabled,
|
|
1210
|
-
.react-datepicker__year-text--disabled {
|
|
1211
|
-
cursor: default;
|
|
1212
|
-
color: #ccc;
|
|
1213
|
-
}
|
|
1214
|
-
.react-datepicker__day--disabled:hover,
|
|
1215
|
-
.react-datepicker__month-text--disabled:hover,
|
|
1216
|
-
.react-datepicker__quarter-text--disabled:hover,
|
|
1217
|
-
.react-datepicker__year-text--disabled:hover {
|
|
1218
|
-
background-color: transparent;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
.react-datepicker__input-container {
|
|
1222
|
-
position: relative;
|
|
1223
|
-
display: inline-block;
|
|
1224
|
-
width: 100%;
|
|
1225
|
-
height: 100%;
|
|
1226
|
-
}
|
|
1227
|
-
.react-datepicker__input-container .react-datepicker__calendar-icon {
|
|
1228
|
-
position: absolute;
|
|
1229
|
-
padding: 0.5rem;
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
.react-datepicker__view-calendar-icon input {
|
|
1233
|
-
padding: 6px 10px 5px 25px;
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
.react-datepicker__year-read-view,
|
|
1237
|
-
.react-datepicker__month-read-view,
|
|
1238
|
-
.react-datepicker__month-year-read-view {
|
|
1239
|
-
border: 1px solid transparent;
|
|
1240
|
-
border-radius: 4px;
|
|
1241
|
-
position: relative;
|
|
1242
|
-
}
|
|
1243
|
-
.react-datepicker__year-read-view:hover,
|
|
1244
|
-
.react-datepicker__month-read-view:hover,
|
|
1245
|
-
.react-datepicker__month-year-read-view:hover {
|
|
1246
|
-
cursor: pointer;
|
|
1247
|
-
}
|
|
1248
|
-
.react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,
|
|
1249
|
-
.react-datepicker__year-read-view:hover .react-datepicker__month-read-view--down-arrow,
|
|
1250
|
-
.react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,
|
|
1251
|
-
.react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow,
|
|
1252
|
-
.react-datepicker__month-year-read-view:hover .react-datepicker__year-read-view--down-arrow,
|
|
1253
|
-
.react-datepicker__month-year-read-view:hover .react-datepicker__month-read-view--down-arrow {
|
|
1254
|
-
border-top-color: #e7e7e9;
|
|
1255
|
-
}
|
|
1256
|
-
.react-datepicker__year-read-view--down-arrow,
|
|
1257
|
-
.react-datepicker__month-read-view--down-arrow,
|
|
1258
|
-
.react-datepicker__month-year-read-view--down-arrow {
|
|
1259
|
-
transform: rotate(135deg);
|
|
1260
|
-
right: -16px;
|
|
1261
|
-
top: 0;
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
.react-datepicker__year-dropdown,
|
|
1265
|
-
.react-datepicker__month-dropdown,
|
|
1266
|
-
.react-datepicker__month-year-dropdown {
|
|
1267
|
-
background-color: #f0f0f0;
|
|
1268
|
-
position: absolute;
|
|
1269
|
-
width: 50%;
|
|
1270
|
-
left: 25%;
|
|
1271
|
-
top: 30px;
|
|
1272
|
-
z-index: 1;
|
|
1273
|
-
text-align: center;
|
|
1274
|
-
border-radius: 4px;
|
|
1275
|
-
border: 1px solid #e7e7e9;
|
|
1276
|
-
}
|
|
1277
|
-
.react-datepicker__year-dropdown:hover,
|
|
1278
|
-
.react-datepicker__month-dropdown:hover,
|
|
1279
|
-
.react-datepicker__month-year-dropdown:hover {
|
|
1280
|
-
cursor: pointer;
|
|
1281
|
-
}
|
|
1282
|
-
.react-datepicker__year-dropdown--scrollable,
|
|
1283
|
-
.react-datepicker__month-dropdown--scrollable,
|
|
1284
|
-
.react-datepicker__month-year-dropdown--scrollable {
|
|
1285
|
-
height: 150px;
|
|
1286
|
-
overflow-y: scroll;
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
.react-datepicker__year-option,
|
|
1290
|
-
.react-datepicker__month-option,
|
|
1291
|
-
.react-datepicker__month-year-option {
|
|
1292
|
-
line-height: 20px;
|
|
1293
|
-
width: 100%;
|
|
1294
|
-
display: block;
|
|
1295
|
-
margin-left: auto;
|
|
1296
|
-
margin-right: auto;
|
|
1297
|
-
}
|
|
1298
|
-
.react-datepicker__year-option:first-of-type,
|
|
1299
|
-
.react-datepicker__month-option:first-of-type,
|
|
1300
|
-
.react-datepicker__month-year-option:first-of-type {
|
|
1301
|
-
border-top-left-radius: 4px;
|
|
1302
|
-
border-top-right-radius: 4px;
|
|
1303
|
-
}
|
|
1304
|
-
.react-datepicker__year-option:last-of-type,
|
|
1305
|
-
.react-datepicker__month-option:last-of-type,
|
|
1306
|
-
.react-datepicker__month-year-option:last-of-type {
|
|
1307
|
-
-webkit-user-select: none;
|
|
1308
|
-
-moz-user-select: none;
|
|
1309
|
-
-ms-user-select: none;
|
|
1310
|
-
user-select: none;
|
|
1311
|
-
border-bottom-left-radius: 4px;
|
|
1312
|
-
border-bottom-right-radius: 4px;
|
|
1313
|
-
}
|
|
1314
|
-
.react-datepicker__year-option:hover,
|
|
1315
|
-
.react-datepicker__month-option:hover,
|
|
1316
|
-
.react-datepicker__month-year-option:hover {
|
|
1317
|
-
background-color: #ccc;
|
|
1318
|
-
}
|
|
1319
|
-
.react-datepicker__year-option:hover .react-datepicker__navigation--years-upcoming,
|
|
1320
|
-
.react-datepicker__month-option:hover .react-datepicker__navigation--years-upcoming,
|
|
1321
|
-
.react-datepicker__month-year-option:hover .react-datepicker__navigation--years-upcoming {
|
|
1322
|
-
border-bottom-color: #e7e7e9;
|
|
1323
|
-
}
|
|
1324
|
-
.react-datepicker__year-option:hover .react-datepicker__navigation--years-previous,
|
|
1325
|
-
.react-datepicker__month-option:hover .react-datepicker__navigation--years-previous,
|
|
1326
|
-
.react-datepicker__month-year-option:hover .react-datepicker__navigation--years-previous {
|
|
1327
|
-
border-top-color: #e7e7e9;
|
|
1328
|
-
}
|
|
1329
|
-
.react-datepicker__year-option--selected,
|
|
1330
|
-
.react-datepicker__month-option--selected,
|
|
1331
|
-
.react-datepicker__month-year-option--selected {
|
|
1332
|
-
position: absolute;
|
|
1333
|
-
left: 15px;
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
.react-datepicker__close-icon {
|
|
1337
|
-
cursor: pointer;
|
|
1338
|
-
background-color: transparent;
|
|
1339
|
-
border: 0;
|
|
1340
|
-
outline: 0;
|
|
1341
|
-
padding: 0 6px 0 0;
|
|
1342
|
-
position: absolute;
|
|
1343
|
-
top: 0;
|
|
1344
|
-
right: 0;
|
|
1345
|
-
height: 100%;
|
|
1346
|
-
display: table-cell;
|
|
1347
|
-
vertical-align: middle;
|
|
1348
|
-
}
|
|
1349
|
-
.react-datepicker__close-icon::after {
|
|
1350
|
-
cursor: pointer;
|
|
1351
|
-
background-color: #5193f6;
|
|
1352
|
-
color: #fff;
|
|
1353
|
-
border-radius: 50%;
|
|
1354
|
-
height: 16px;
|
|
1355
|
-
width: 16px;
|
|
1356
|
-
padding: 2px;
|
|
1357
|
-
font-size: 12px;
|
|
1358
|
-
line-height: 1;
|
|
1359
|
-
text-align: center;
|
|
1360
|
-
display: table-cell;
|
|
1361
|
-
vertical-align: middle;
|
|
1362
|
-
content: "×";
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
.react-datepicker__today-button {
|
|
1366
|
-
background: #f0f0f0;
|
|
1367
|
-
border-top: 1px solid #e7e7e9;
|
|
1368
|
-
cursor: pointer;
|
|
1369
|
-
text-align: center;
|
|
1370
|
-
font-weight: 500;
|
|
1371
|
-
padding: 5px 0;
|
|
1372
|
-
clear: left;
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
.react-datepicker__portal {
|
|
1376
|
-
position: fixed;
|
|
1377
|
-
width: 100vw;
|
|
1378
|
-
height: 100vh;
|
|
1379
|
-
background-color: rgba(0, 0, 0, 0.8);
|
|
1380
|
-
left: 0;
|
|
1381
|
-
top: 0;
|
|
1382
|
-
justify-content: center;
|
|
1383
|
-
align-items: center;
|
|
1384
|
-
display: flex;
|
|
1385
|
-
z-index: 2147483647;
|
|
1386
|
-
}
|
|
1387
|
-
.react-datepicker__portal .react-datepicker__day-name,
|
|
1388
|
-
.react-datepicker__portal .react-datepicker__day,
|
|
1389
|
-
.react-datepicker__portal .react-datepicker__time-name {
|
|
1390
|
-
width: 3rem;
|
|
1391
|
-
line-height: 3rem;
|
|
1392
|
-
}
|
|
1393
|
-
@media (max-width: 400px), (max-height: 550px) {
|
|
1394
|
-
.react-datepicker__portal .react-datepicker__day-name,
|
|
1395
|
-
.react-datepicker__portal .react-datepicker__day,
|
|
1396
|
-
.react-datepicker__portal .react-datepicker__time-name {
|
|
1397
|
-
width: 2rem;
|
|
1398
|
-
line-height: 2rem;
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
.react-datepicker__portal .react-datepicker__current-month,
|
|
1402
|
-
.react-datepicker__portal .react-datepicker-time__header {
|
|
1403
|
-
font-size: 0.875rem;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
.react-datepicker__children-container {
|
|
1407
|
-
width: 13.8rem;
|
|
1408
|
-
margin: 0.4rem;
|
|
1409
|
-
padding-right: 0.2rem;
|
|
1410
|
-
padding-left: 0.2rem;
|
|
1411
|
-
height: auto;
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
.react-datepicker__aria-live {
|
|
1415
|
-
position: absolute;
|
|
1416
|
-
clip-path: circle(0);
|
|
1417
|
-
border: 0;
|
|
1418
|
-
height: 1px;
|
|
1419
|
-
margin: -1px;
|
|
1420
|
-
overflow: hidden;
|
|
1421
|
-
padding: 0;
|
|
1422
|
-
width: 1px;
|
|
1423
|
-
white-space: nowrap;
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
.react-datepicker__calendar-icon {
|
|
1427
|
-
width: 1em;
|
|
1428
|
-
height: 1em;
|
|
1429
|
-
vertical-align: -0.125em;
|
|
1430
|
-
}
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
:is([data-theme="dark"]) .react-datepicker__year-read-view--down-arrow,
|
|
1434
|
-
:is([data-theme="dark"]) .react-datepicker__month-read-view--down-arrow,
|
|
1435
|
-
:is([data-theme="dark"]) .react-datepicker__month-year-read-view--down-arrow,
|
|
1436
|
-
:is([data-theme="dark"]) .react-datepicker__navigation-icon::before {
|
|
1437
|
-
border-color: #333;
|
|
1438
|
-
}
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
:is([data-theme="dark"]) .react-datepicker-wrapper,
|
|
1442
|
-
:is([data-theme="dark"]) .react-datepicker {
|
|
1443
|
-
color: #ccc;
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
|
-
:is([data-theme="dark"]) .react-datepicker__navigation:hover *::before {
|
|
1447
|
-
border-color: #e7e7e9;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
:is([data-theme="dark"]) .react-datepicker__day-names,
|
|
1451
|
-
:is([data-theme="dark"]) .react-datepicker__week {
|
|
1452
|
-
color: #ccc;
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
:is([data-theme="dark"]) .react-datepicker__day,
|
|
1456
|
-
:is([data-theme="dark"]) .react-datepicker__month-text,
|
|
1457
|
-
:is([data-theme="dark"]) .react-datepicker__quarter-text,
|
|
1458
|
-
:is([data-theme="dark"]) .react-datepicker__year-text {
|
|
1459
|
-
color: #ccc;
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
:is([data-theme="dark"]) .react-datepicker__current-month,
|
|
1463
|
-
:is([data-theme="dark"]) .react-datepicker-time__header,
|
|
1464
|
-
:is([data-theme="dark"]) .react-datepicker-year-header,
|
|
1465
|
-
:is([data-theme="dark"]) .react-datepicker__day-name,
|
|
1466
|
-
:is([data-theme="dark"]) .react-datepicker__year-dropdown-container--select,
|
|
1467
|
-
:is([data-theme="dark"]) .react-datepicker__month-dropdown-container--select,
|
|
1468
|
-
:is([data-theme="dark"]) .react-datepicker__month-year-dropdown-container--select,
|
|
1469
|
-
:is([data-theme="dark"]) .react-datepicker__year-dropdown-container--scroll,
|
|
1470
|
-
:is([data-theme="dark"]) .react-datepicker__month-dropdown-container--scroll,
|
|
1471
|
-
:is([data-theme="dark"]) .react-datepicker__month-year-dropdown-container--scroll {
|
|
1472
|
-
color: #ccc;
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
:is([data-theme="dark"]) .react-datepicker__header {
|
|
1476
|
-
color: #fff;
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
:is([data-theme="dark"]) .react-datepicker__day--disabled,
|
|
1480
|
-
:is([data-theme="dark"]) .react-datepicker__month-text--disabled,
|
|
1481
|
-
:is([data-theme="dark"]) .react-datepicker__quarter-text--disabled,
|
|
1482
|
-
:is([data-theme="dark"]) .react-datepicker__year-text--disabled {
|
|
1483
|
-
color: #666;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
:is([data-theme="dark"]) .react-datepicker__day--highlighted,
|
|
1487
|
-
:is([data-theme="dark"]) .react-datepicker__month-text--highlighted,
|
|
1488
|
-
:is([data-theme="dark"]) .react-datepicker__quarter-text--highlighted,
|
|
1489
|
-
:is([data-theme="dark"]) .react-datepicker__year-text--highlighted {
|
|
1490
|
-
background-color: #1a1a1a;
|
|
1491
|
-
color: #fff;
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
:is([data-theme="dark"]) .react-datepicker__day:hover,
|
|
1495
|
-
:is([data-theme="dark"]) .react-datepicker__day--in-range:hover,
|
|
1496
|
-
:is([data-theme="dark"]) .react-datepicker__day--selected:hover,
|
|
1497
|
-
:is([data-theme="dark"]) .react-datepicker__month-text:hover,
|
|
1498
|
-
:is([data-theme="dark"]) .react-datepicker__day:hover,
|
|
1499
|
-
:is([data-theme="dark"]) .react-datepicker__month-text--in-range:hover,
|
|
1500
|
-
:is([data-theme="dark"]) .react-datepicker__month-text--selected:hover,
|
|
1501
|
-
:is([data-theme="dark"]) .react-datepicker__quarter-text:hover,
|
|
1502
|
-
:is([data-theme="dark"]) .react-datepicker__day:hover,
|
|
1503
|
-
:is([data-theme="dark"]) .react-datepicker__quarter-text--in-range:hover,
|
|
1504
|
-
:is([data-theme="dark"]) .react-datepicker__quarter-text--selected:hover,
|
|
1505
|
-
:is([data-theme="dark"]) .react-datepicker__year-text:hover,
|
|
1506
|
-
:is([data-theme="dark"]) .react-datepicker__day:hover,
|
|
1507
|
-
:is([data-theme="dark"]) .react-datepicker__year-text--in-range:hover,
|
|
1508
|
-
:is([data-theme="dark"]) .react-datepicker__year-text--selected:hover,
|
|
1509
|
-
:is([data-theme="dark"]) .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover
|
|
1510
|
-
{
|
|
1511
|
-
background-color: #1a1a1a;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
:is([data-theme="dark"]) .react-datepicker__day--selected,
|
|
1515
|
-
:is([data-theme="dark"]) .react-datepicker__day--in-range,
|
|
1516
|
-
:is([data-theme="dark"]) .react-datepicker__day--in-selecting-range,
|
|
1517
|
-
:is([data-theme="dark"]) .react-datepicker__month-text--selected,
|
|
1518
|
-
:is([data-theme="dark"]) .react-datepicker__month-text--in-range,
|
|
1519
|
-
:is([data-theme="dark"]) .react-datepicker__month-text--in-selecting-range,
|
|
1520
|
-
:is([data-theme="dark"]) .react-datepicker__quarter-text--selected,
|
|
1521
|
-
:is([data-theme="dark"]) .react-datepicker__quarter-text--in-range,
|
|
1522
|
-
:is([data-theme="dark"]) .react-datepicker__quarter-text--in-selecting-range,
|
|
1523
|
-
:is([data-theme="dark"]) .react-datepicker__year-text--selected,
|
|
1524
|
-
:is([data-theme="dark"]) .react-datepicker__year-text--in-range,
|
|
1525
|
-
:is([data-theme="dark"]) .react-datepicker__year-text--in-selecting-range {
|
|
1526
|
-
background-color: #0e528f;
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
:is([data-theme="dark"]) .react-datepicker__day--keyboard-selected,
|
|
1530
|
-
:is([data-theme="dark"]) .react-datepicker__month-text--keyboard-selected,
|
|
1531
|
-
:is([data-theme="dark"]) .react-datepicker__quarter-text--keyboard-selected,
|
|
1532
|
-
:is([data-theme="dark"]) .react-datepicker__year-text--keyboard-selected {
|
|
1533
|
-
background-color: #0e529f;
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
:is([data-theme="dark"]) .react-datepicker__today-button {
|
|
1537
|
-
background-color: #262626;
|
|
1538
|
-
color: #ccc;
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
:is([data-theme="dark"]) .react-datepicker__portal {
|
|
1542
|
-
background-color: #191919;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
:is([data-theme="dark"]) .react-datepicker{
|
|
1546
|
-
color: #fff;
|
|
1547
|
-
}
|
|
1548
|
-
|
|
1549
|
-
:is([data-theme="dark"]) .react-datepicker__time-list{
|
|
1550
|
-
background-color: rgba(0, 0, 0, 0.0);
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
:is([data-theme="dark"]) .react-datepicker__time-container--with-today-button {
|
|
1554
|
-
border: 1px solid transparent;
|
|
1555
|
-
}
|
|
1556
|
-
:is([data-theme="dark"]) .react-datepicker__year-dropdown,
|
|
1557
|
-
:is([data-theme="dark"]) .react-datepicker__month-dropdown,
|
|
1558
|
-
:is([data-theme="dark"]) .react-datepicker__month-year-dropdown {
|
|
1559
|
-
background-color: rgba(0, 0, 0, 0.9);
|
|
1560
|
-
border: 1px solid transparent;
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
:is([data-theme="dark"]) .react-datepicker__header {
|
|
1564
|
-
background-color: #191919;
|
|
1565
|
-
border-bottom: 1px solid transparent;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
:is([data-theme="dark"]) .react-datepicker__time-container {
|
|
1569
|
-
border-left: 1px solid transparent;
|
|
1570
|
-
}
|
|
1571
|
-
:is([data-theme="dark"]) .react-datepicker__time-container .react-datepicker__time {
|
|
1572
|
-
background-color: rgba(0, 0, 0, 0.9);
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
:is([data-theme="dark"]) .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected,
|
|
1576
|
-
:is([data-theme="dark"]) .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected {
|
|
1577
|
-
background-color: #0e528f;
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
.react-datepicker__day--outside-month{
|
|
1581
|
-
color: #666 !important;
|
|
1582
|
-
}
|
|
1583
|
-
`,qi={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=","not-in":"not in",in:"in","array-contains":"Contains","array-contains-any":"Any"},Ji=["array-contains-any","in"];function C3({name:e,isArray:t,mode:c,value:i,setValue:l,title:a}){const s=t?["array-contains"]:["==","!=",">","<",">=","<="],[d,u]=i||[s[0],void 0],[A,_]=f.useState(d),[g,y]=f.useState(u);function h(I,b){let p=b;const w=Ji.includes(A),k=Ji.includes(I);w!==k&&(p=k?b?[b]:[]:""),_(I),y(p===null?void 0:p);const K=p!==null&&Array.isArray(p)?p.length>0:p!==void 0;l(I&&K?[I,p]:void 0)}return n.jsxs("div",{className:"flex w-[440px] items-center",children:[n.jsx("div",{className:"w-[80px]",children:n.jsx(xe,{value:A,onValueChange:I=>{h(I,g)},renderValue:I=>qi[I],children:s.map(I=>n.jsx(Re,{value:I,children:qi[I]},I))})}),n.jsx("div",{className:"flex-grow ml-2",children:n.jsx(Vn,{mode:c,size:"medium",value:g,onChange:I=>{h(A,I===null?void 0:I)},clearable:!0})})]})}const Zi="collectionGroupParent";function Xi(e,t){return f.useMemo(()=>e.propertiesOrder?xi(e,e.propertiesOrder,!1):S3(e,t),[e,t])}function xi(e,t,c){return t.flatMap(i=>{const l=e.properties[i];return l?c&&l.hideFromCollection?[null]:c&&l.disabled&&typeof l.disabled=="object"&&l.disabled.hidden?[null]:l.dataType==="map"&&l.spreadChildren&&l.properties?vt(l,i):[{key:i,disabled:!!l.disabled||!!l.readOnly}]:e.additionalFields?.find(s=>s.id===i)?[{key:i,disabled:!0}]:e.subcollections&&e.subcollections.find(d=>ht(d)===i)?[{key:i,disabled:!0}]:e.collectionGroup&&i===Zi?[{key:i,disabled:!0}]:[null]}).filter(Boolean)}function S3(e,t){const c=Object.keys(e.properties);e.additionalColumns&&console.warn("`additionalColumns` is deprecated and will be removed in previous versions. Use `additionalFields` instead, with the same structure.");const i=e.additionalFields??e.additionalColumns??[],l=e.subcollections??[],a=[...c,...i.map(s=>s.id)];if(t){const s=l.map(d=>ht(d));a.push(...s.filter(d=>!a.includes(d)))}return e.collectionGroup&&a.push(Zi),xi(e,a,!0)}function vt(e,t,c){return e.dataType==="map"&&e.spreadChildren&&e.properties?Object.entries(e.properties).flatMap(([i,l])=>vt(l,`${t}.${i}`,c||!!e.disabled||!!e.readOnly)):[{key:t,disabled:c||!!e.disabled||!!e.readOnly}]}const B3={},Ri=f.createContext(B3),E3=()=>f.useContext(Ri),Kt=f.memo(function({forceFilter:t,actionsStart:c,actions:i,title:l,tableRowActionsBuilder:a,uniqueFieldValidator:s,getPropertyFor:d,onValueChange:u,selectionController:A,highlightedEntities:_,onEntityClick:g,onColumnResize:y,onSizeChanged:h,textSearchEnabled:I=!1,hoverRow:b=!0,inlineEditing:p=!1,additionalFields:w,displayedColumnIds:k,defaultSize:K,properties:m,tableController:{data:v,dataLoading:S,noMoreToLoad:B,dataLoadingError:P,filterValues:F,setFilterValues:D,sortBy:C,setSortBy:N,searchString:M,setSearchString:H,clearFilter:Z,itemCount:O,setItemCount:oe,pageSize:U=50,paginationEnabled:L,checkFilterCombination:X,setPopupCell:W},filterable:V=!0,sortable:Q=!0,endAdornment:q}){const R=Ge(),$=!!t,ne=A?.selectedEntities?.length>0?A?.selectedEntities:_,J=re(),[x,ie]=f.useState(K??"m"),[Y,Be]=f.useState(void 0),Oe=ne?.map(z=>z.id),Ue=!!F&&Object.keys(F).length>0,zn=()=>{!L||S||B||O!==void 0&&oe?.(O+U)},Ao=f.useCallback(()=>{oe?.(U)},[U]),kn=f.useCallback(({rowData:z})=>{if(!p)return g&&g(z)},[g,p]),Hn=f.useCallback(z=>{h&&h(z),ie(z)},[]),_o=f.useCallback(z=>H?.(z),[]),rn=f.useMemo(()=>w?w.map(z=>({[z.id]:z})).reduce((z,me)=>({...z,...me}),{}):{},[w]);f.useEffect(()=>{const z=me=>{me.keyCode===27&&G()};return document.addEventListener("keydown",z,!1),()=>{document.removeEventListener("keydown",z,!1)}});const yo=f.useCallback(z=>{Be(z)},[]),G=f.useCallback(()=>{Be(void 0)},[]),_e=s,ae=f.useCallback(({column:z,columnIndex:me,rowData:ve,rowIndex:Ye})=>{const fe=ve,tn=z.key;let Un=z.custom.disabled;const ho=fe.values?dn(fe.values,tn):void 0,Yn=d?.({propertyKey:tn,propertyValue:ho,entity:fe})??z.custom.resolvedProperty;return Yn?.disabled||(Un=!1),Yn?n.jsx(se,{children:fe?n.jsx(t3,{readonly:!p,align:z.align??"left",propertyKey:tn,property:Yn,value:fe?.values?dn(fe.values,tn):void 0,customFieldValidator:_e,columnIndex:me,width:z.width,height:Ln(x),entity:fe,disabled:Un,path:fe.path},`property_table_cell_${fe.id}_${tn}`):nn()}):null},[_e,p,x,Oe]),T=f.useCallback(({column:z,rowData:me,width:ve})=>{const Ye=me,fe=rn[z.key],tn=fe.dependencies?Object.entries(Ye.values).filter(([ho,Yn])=>fe.dependencies.includes(ho)).reduce((ho,Yn)=>({...ho,...Yn}),{}):Ye;fe.builder&&console.warn("`additionalField.builder` is deprecated. Use `additionalField.Builder` instead.");const Un=fe.builder??fe.Builder;if(!Un)throw new Error("No builder provided for additional field");return n.jsx(bt,{width:ve,size:x,value:tn,selected:!1,disabled:!0,align:"left",allowScroll:!1,showExpandIcon:!1,disabledTooltip:"This column can't be edited directly",children:n.jsx(se,{children:n.jsx(Un,{entity:Ye,context:J})})},`additional_table_cell_${Ye.id}_${z.key}`)},[rn,x,Oe]),le=f.useMemo(()=>{const z=Object.entries(m).flatMap(([ve,Ye])=>vt(Ye,ve)).map(({key:ve,disabled:Ye})=>{const fe=ut(m,ve);if(!fe)throw Error("Internal error: no property found in path "+ve);const tn=ea(fe);return{key:ve,align:Gz(fe),icon:Un=>we(fe,"small"),title:fe.name??ve,sortable:Q&&(t?Object.keys(t).includes(ve):!0),filter:!$&&tn,width:Vi(fe),resizable:!0,custom:{resolvedProperty:fe,disabled:Ye}}}),me=w?w.map(ve=>({key:ve.id,align:"left",sortable:!1,title:ve.name,width:ve.width??200})):[];return[...z,...me]},[w,$,t,m,Q]),he=f.useMemo(()=>({key:"id_ewcfedcswdf3",width:R?160:130,title:"ID",resizable:!1,frozen:R,headerAlign:"center"}),[R]),Le=f.useMemo(()=>[he,...k.map(z=>le.find(me=>me.key===z.key)).filter(Boolean)],[le,k,he]),mn=f.useCallback(z=>{const me=z.column,ve=z.columns,Ye=me.key;if(z.columnIndex===0)return a?a({entity:z.rowData,size:x,width:me.width,frozen:me.frozen}):n.jsx(pt,{entity:z.rowData,width:me.width,frozen:me.frozen,isSelected:!1,size:x});if(rn[Ye])return T(z);if(z.columnIndex<ve.length+1)return ae(z);throw Error("Internal: columns not mapped properly")},[rn,a,x,T,ae]),vn=f.useCallback(z=>{D?.({...z,...t})},[t]);return n.jsx(Ri.Provider,{value:{setPopupCell:W,select:yo,onValueChange:u,size:x,selectedCell:Y,selectedEntityIds:Oe},children:n.jsxs("div",{className:"h-full w-full flex flex-col bg-white dark:bg-gray-950",children:[n.jsx(y3,{forceFilter:$,filterIsSet:Ue,onTextSearch:I?_o:void 0,clearFilter:Z,size:x,onSizeChanged:Hn,title:l,actionsStart:c,actions:i,loading:S}),n.jsx(Yi,{data:v,columns:Le,cellRenderer:mn,onRowClick:p?void 0:g?kn:void 0,onEndReached:zn,onResetPagination:Ao,error:P,paginationEnabled:L,onColumnResize:y,size:x,loading:S,filter:F,onFilterUpdate:D?vn:void 0,sortBy:C,onSortByUpdate:N,hoverRow:b,checkFilterCombination:X,createFilterField:V?F3:void 0,rowClassName:f.useCallback(z=>Oe?.includes(z.id)?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",[Oe]),className:"flex-grow",endAdornment:q})]})})},de);function F3({id:e,filterValue:t,setFilterValue:c,column:i,popupOpen:l,setPopupOpen:a}){if(!i.custom)return null;const{resolvedProperty:s}=i.custom,d=s?.dataType==="array",u=d?s.of:s;if(!u)return null;if(u.dataType==="reference")return n.jsx(h3,{value:t,setValue:c,name:e,isArray:d,path:u.path,title:s?.name,previewProperties:u?.previewProperties,popupOpen:l,setPopupOpen:a});if(u.dataType==="number"||u.dataType==="string"){const A=u.name,_=u.enumValues?sn(u.enumValues):void 0;return n.jsx(g3,{value:t,setValue:c,name:e,dataType:u.dataType,isArray:d,enumValues:_,title:A})}else if(u.dataType==="boolean"){const A=u.name;return n.jsx(I3,{value:t,setValue:c,name:e,title:A})}else if(u.dataType==="date"){const A=u.name;return n.jsx(C3,{value:t,setValue:c,name:e,mode:u.mode,isArray:d,title:A})}return n.jsx("div",{children:`Currently the filter field ${s.dataType} is not supported`})}function ea(e,t=!1){return t?["string","number","date","reference"].includes(e.dataType):e.dataType==="array"?e.of?ea(e.of,!0):!1:["string","number","boolean","date","reference","array"].includes(e.dataType)}function P3({data:e,entitiesDisplayedFirst:t}){if(!t)return e;const c=new Set(t.map(i=>i.id));return[...t,...e.filter(i=>!c.has(i.id))]}function D3(e,t,c=5e3){const[i,l]=f.useState(e),a=f.useRef(i.length??0),s=f.useRef(!1),d=f.useRef(t),u=!de(d.current,t),A=e.length>=a.current||u;return f.useEffect(()=>{const _=()=>{de(i,e)||(d.current=t,a.current=e.length,l(e)),s.current=!1};s.current=!0;let g;return A?_():g=setTimeout(_,c),()=>{clearTimeout(g),s.current&&A&&_()}},[e,c,t,A]),A?e:i}const N3=50;function Ct({fullPath:e,collection:t,entitiesDisplayedFirst:c,lastDeleteTimestamp:i,forceFilter:l}){const{initialFilter:a,initialSort:s,forceFilter:d}=t,[u,A]=f.useState(void 0),_=Ae(),g=Qe(),y=f.useMemo(()=>_.resolveAliasesFrom(e),[e,_.resolveAliasesFrom]),h=l??d,I=t.pagination===void 0||!!t.pagination,b=typeof t.pagination=="number"?t.pagination:N3,[p,w]=f.useState(),[k,K]=f.useState(I?b:void 0),m=f.useCallback((U,L)=>g.isFilterCombinationValid?g.isFilterCombinationValid({path:y,collection:t,filterValues:U,sortBy:L}):!0,[]),v=f.useMemo(()=>{if(s&&h&&!m(h,s)){console.warn("Initial sort is not compatible with the force filter. Ignoring initial sort");return}return s},[s,h]),[S,B]=f.useState(h??a??void 0),[P,F]=f.useState(v),D=f.useCallback(()=>B(h??void 0),[h]),C=f.useCallback(U=>{if(h){console.warn("Filter is not compatible with the force filter. Ignoring filter");return}U&&Object.keys(U).length===0?B(void 0):B(U)},[h]),{data:N,dataLoading:M,noMoreToLoad:H,dataLoadingError:Z}=ec({path:e,collection:t,filterValues:S,sortBy:P,searchString:p,itemCount:k}),O=P3({data:N,entitiesDisplayedFirst:c});return{data:D3(O,{filterValues:S,sortBy:P,searchString:p,lastDeleteTimestamp:i}),dataLoading:M,noMoreToLoad:H,dataLoadingError:Z,filterValues:S,setFilterValues:C,sortBy:P,setSortBy:F,searchString:p,setSearchString:w,clearFilter:D,itemCount:k,setItemCount:K,paginationEnabled:I,pageSize:b,checkFilterCombination:m,popupCell:u,setPopupCell:A}}function M3(e,t){const[c,i]=f.useState(),{navigator:l}=f.useContext(Ie.UNSAFE_NavigationContext),a=Ie.useNavigate(),s=()=>{i(void 0)},d=()=>{t(),i(void 0),a(-1)},u=f.useCallback(({action:A,location:_,retry:g})=>{switch(A){case"REPLACE":{g();return}case"POP":i(_)}},[]);return f.useEffect(()=>{if(!e||c||!("block"in l))return;const A=l.block(_=>{const g={..._,retry(){A(),_.retry()}};u(g)});return A},[l,u,e,c]),{navigationWasBlocked:!!c,handleCancel:s,handleOk:d}}function T3({open:e,handleOk:t,handleCancel:c,body:i,title:l}){return n.jsxs(Zo,{open:e,onOpenChange:a=>a?c():t(),children:[n.jsxs(Xo,{children:[n.jsx(j,{variant:"h6",children:l}),i,n.jsx(j,{children:"Are you sure you want to leave this page?"})]}),n.jsxs(wn,{children:[n.jsx(te,{variant:"text",onClick:c,autoFocus:!0,children:" Cancel "}),n.jsx(te,{onClick:t,children:" Ok "})]})]})}const na=f.createContext({width:"",blocked:!1,setBlocked:e=>{},setBlockedNavigationMessage:e=>{},close:()=>{}}),Uo=()=>f.useContext(na);function O3(){const t=Xn().sidePanels,c=[...t];return c.push(void 0),n.jsx(n.Fragment,{children:c.map((i,l)=>n.jsx(L3,{panel:i,offsetPosition:t.length-l-1},`side_dialog_${l}`))})}function L3({offsetPosition:e,panel:t}){const[c,i]=f.useState(!1),[l,a]=f.useState(!1),[s,d]=f.useState(),u=f.useRef(t?.width),A=u.current,_=Xn(),{navigationWasBlocked:g,handleOk:y,handleCancel:h}=M3(l&&!c,()=>a(!1));f.useEffect(()=>{t&&(u.current=t.width)},[t]);const I=()=>{a(!1),i(!1),_.close(),t?.onClose?.()},b=()=>{i(!1)},p=w=>{l&&!w?i(!0):(_.close(),t?.onClose?.())};return n.jsxs(na.Provider,{value:{blocked:l,setBlocked:a,setBlockedNavigationMessage:d,width:A,close:p},children:[n.jsxs(Vt,{open:!!t,onOpenChange:w=>!w&&p(),children:[t&&n.jsx("div",{className:"transform max-w-[100vw] lg:max-w-[95vw] flex flex-col h-full transition-all duration-250 ease-in-out bg-white dark:bg-gray-900 ",style:{width:t.width,transform:`translateX(-${e*200}px)`},children:n.jsx(se,{children:t.component})}),!t&&n.jsx("div",{style:{width:A}})]}),n.jsx(T3,{open:g||c,handleOk:c?I:y,handleCancel:c?b:h,body:s})]})}function Q3({entityOrEntitiesToDelete:e,collection:t,onClose:c,open:i,callbacks:l,onEntityDelete:a,onMultipleEntitiesDelete:s,path:d}){const u=Qe(),A=cn(),[_,g]=f.useState(!1),[y,h]=f.useState(),[I,b]=f.useState(),p=re();f.useEffect(()=>{if(e){const C=Array.isArray(e)&&e.length===1?e[0]:e;h(C),b(Array.isArray(C))}},[e]);const w=f.useMemo(()=>Me({collection:t,path:d,fields:p.fields}),[t,d]),k=f.useCallback(()=>{c()},[c]),K=f.useCallback(C=>{console.debug("Deleted",C)},[]),m=f.useCallback((C,N)=>{A.open({type:"error",message:"Error deleting: "+N?.message}),console.error("Error deleting entity"),console.error(N)},[w.name]),v=f.useCallback((C,N)=>{A.open({type:"error",message:"Error before deleting: "+N?.message}),console.error(N)},[w.name]),S=f.useCallback((C,N)=>{A.open({type:"error",message:"Error after deleting: "+N?.message}),console.error(N)},[w.name]),B=f.useCallback(C=>nc({dataSource:u,entity:C,collection:w,callbacks:l,onDeleteSuccess:K,onDeleteFailure:m,onPreDeleteHookError:v,onDeleteSuccessHookError:S,context:p}),[u,w,l,K,m,v,S,p]),P=f.useCallback(async()=>{y&&(g(!0),I?Promise.all(y.map(B)).then(C=>{g(!1),s&&y&&s(d,y),C.every(Boolean)?A.open({type:"success",message:`${w.name}: multiple deleted`}):C.some(Boolean)?A.open({type:"warning",message:`${w.name}: Some of the entities have been deleted, but not all`}):A.open({type:"error",message:`${w.name}: Error deleting entities`}),c()}):B(y).then(C=>{g(!1),C&&(a&&y&&a(d,y),A.open({type:"success",message:`${w.singularName??w.name} deleted`}),c())}))},[y,I,B,s,d,c,A,w.name,a]);let F;if(y&&I)F=n.jsx(n.Fragment,{children:"Multiple entities"});else{const C=y;F=C?n.jsx(yt,{entity:C,collection:t,path:d}):n.jsx(n.Fragment,{})}const D=I?n.jsxs(n.Fragment,{children:[n.jsx("b",{children:w.name}),": Confirm multiple delete?"]}):`Would you like to delete this ${w.singularName??w.name}?`;return n.jsxs(Zo,{maxWidth:"2xl","aria-labelledby":"delete-dialog",open:i,onOpenChange:C=>C?void 0:c(),children:[n.jsxs(Xo,{fullHeight:!0,children:[n.jsx(j,{variant:"subtitle2",className:"p-4",children:D}),!I&&F]}),n.jsxs(wn,{children:[_&&n.jsx(Gn,{size:"small"}),n.jsx(te,{onClick:k,disabled:_,variant:"text",color:"primary",children:"Cancel"}),n.jsx(te,{autoFocus:!0,disabled:_,onClick:P,variant:"filled",color:"primary",children:"Ok"})]})]})}function Yo(e){return Array.isArray(e)?e:e?[e]:[]}function V3({collection:e,relativePath:t,parentPathSegments:c,onNewClick:i,onMultipleDeleteClick:l,selectionEnabled:a,path:s,selectionController:d,tableController:u,collectionEntitiesCount:A}){const _=re(),g=_.plugins??[],y=yn(),h=Ge(),I=d.selectedEntities,b=Vo(e,y,Xe(s),null)&&i&&(h?n.jsxs(te,{id:`add_entity_${s}`,onClick:i,startIcon:n.jsx(hn,{}),size:"large",variant:"filled",color:"primary",children:["Add ",e.singularName??e.name]}):n.jsx(te,{id:`add_entity_${s}`,onClick:i,size:"medium",variant:"filled",color:"primary",children:n.jsx(hn,{})})),p=At(e,y,Xe(s),null);let w;if(a){const v=h?n.jsxs(te,{variant:"text",disabled:!I?.length||!p,startIcon:n.jsx(wo,{}),onClick:l,color:"primary",className:"lg:w-20",children:["(",I?.length,")"]}):n.jsx(ee,{color:"primary",disabled:!I?.length||!p,onClick:l,children:n.jsx(wo,{})});w=n.jsx(ye,{title:p?"Delete":"You have selected at least one entity you cannot delete",children:v})}const k={path:s,relativePath:t,parentPathSegments:c,collection:e,selectionController:d,context:_,tableController:u,collectionEntitiesCount:A},K=[];K.push(...Yo(e.Actions)),g&&g.forEach(v=>{v.collections?.CollectionActions&&K.push(...Yo(v.collections?.CollectionActions))});const m=n.jsx(n.Fragment,{children:K.map((v,S)=>n.jsx(v,{...k},`actions_${S}`))});return n.jsxs(n.Fragment,{children:[m,w,b]})}function W3({containerRef:e,innerRef:t,x:c,y:i,onMove:l}){let a=0,s=0;const d=f.useRef(!1),u=I=>{if(I.button!==0||!e.current||I.defaultPrevented||I.innerClicked)return;const{x:b,y:p}=e.current.getBoundingClientRect();a=I.screenX-b,s=I.screenY-p,document.addEventListener("mousemove",y),document.addEventListener("mouseup",g),document.addEventListener("selectstart",_),d.current=!0},A=I=>{I.innerClicked=!0},_=I=>{I.preventDefault(),I.stopPropagation()},g=I=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",g),document.removeEventListener("selectstart",_),I.stopPropagation(),d.current=!1},y=I=>{I.target.localName==="input"||!d.current||(l({x:I.screenX-a,y:I.screenY-s}),I.stopPropagation())},h=()=>{e.current&&(e.current.style.top=`${i}px`,e.current.style.left=`${c}px`)};f.useEffect(()=>{const I=e.current,b=t.current;if(!(!I||!b))return b&&b.addEventListener("mousedown",A),I&&I.addEventListener("mousedown",u),h(),()=>{I&&I.removeEventListener("mousedown",u),b&&b.removeEventListener("mousedown",A)}})}function G3(){const[e,t]=f.useState({width:0,height:0});return f.useLayoutEffect(()=>{function c(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",c),c(),()=>window.removeEventListener("resize",c)},[]),e}const z3=({onResize:e})=>{const t=f.useRef(0),c=f.useRef(null),i=f.useRef(e);i.current=e;const l=f.useCallback(s=>{t.current&&cancelAnimationFrame(t.current),t.current=requestAnimationFrame(()=>{i.current(s)})},[]),a=f.useCallback(()=>{const s=c.current;s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.addEventListener("resize",l)},[l]);return f.useEffect(()=>{const s=c.current;return()=>{s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.removeEventListener("resize",l)}},[l]),n.jsx("object",{onLoad:a,ref:c,tabIndex:-1,type:"text/html",data:"about:blank",title:"",style:{position:"absolute",top:0,left:0,height:"100%",width:"100%",pointerEvents:"none",zIndex:-1,opacity:0}})};function H3(e){return e.open?n.jsx(U3,{...e}):null}function U3({tableKey:e,entity:t,customFieldValidator:c,propertyKey:i,collection:l,path:a,cellRect:s,open:d,onClose:u,columnIndex:A,onCellValueChange:_}){const g=Qe(),y=re(),[h,I]=f.useState(),[b,p]=f.useState(),w=t?.id,[k,K]=f.useState(t);f.useEffect(()=>w&&l?g.listenEntity?.({path:a,entityId:w,collection:l,onUpdate:K}):()=>{},[g,w,l,a]);const[m,v]=f.useState(k?.values),S=l?Me({collection:l,path:a,values:m,entityId:w,fields:y.fields}):void 0,B=G3(),P=f.useRef(null),F=f.useRef(null),D=f.useRef(!1),C=f.useCallback(()=>{if(!s)throw Error("getInitialLocation error");return{x:s.left<B.width-s.right?s.x+s.width/2:s.x-s.width/2,y:s.top<B.height-s.bottom?s.y+s.height/2:s.y-s.height/2}},[s,B.height,B.width]),N=f.useCallback(({x:L,y:X})=>{const W=P.current?.getBoundingClientRect();if(!W)throw Error("normalizePosition called before draggableBoundingRect is set");return{x:Math.max(0,Math.min(L,B.width-W.width)),y:Math.max(0,Math.min(X,B.height-W.height))}},[B]),M=f.useCallback(L=>{const X=P.current?.getBoundingClientRect();if(!s||!X)return;const W=N(L??C());(!b||W.x!==b.x||W.y!==b.y)&&p(W)},[s,C,N,b]);W3({containerRef:P,innerRef:F,x:b?.x,y:b?.y,onMove:M}),f.useEffect(()=>{D.current=!1},[i,k]),f.useEffect(()=>{D.current=!1},[i]),f.useLayoutEffect(()=>{const L=P.current?.getBoundingClientRect();!s||!L||D.current||(M(),D.current=!0)},[s,M,D.current]),f.useLayoutEffect(()=>{M(b)},[B,s]);const H=f.useMemo(()=>{if(!(!S||!w))return Ei(w,i&&S.properties[i]?{[i]:S.properties[i]}:{},c)},[S,w,i,c]),Z=f.useCallback(()=>M(b),[b,M]),O=async L=>(I(null),l&&k&&_&&i?_({value:L[i],propertyKey:i,entity:k,setError:I,onValueUpdated:()=>{},fullPath:a,context:y}):Promise.resolve());if(!k)return n.jsx(n.Fragment,{});const oe=k&&n.jsxs("div",{className:`text-gray-900 dark:text-white overflow-auto rounded rounded-md bg-white dark:bg-gray-950 ${d?"":"hidden"} cursor-grab`,children:[n.jsx(Fe.Formik,{initialValues:k?.values??{},validationSchema:H,validateOnMount:!0,validate:L=>console.debug("Validating",L),onSubmit:(L,X)=>{O(L).then(()=>u()).finally(()=>X.setSubmitting(!1))},children:({values:L,setFieldValue:X,handleSubmit:W,isSubmitting:V})=>{if(f.useEffect(()=>{de(L,m)||v(L)},[L]),!k)return n.jsx(pe,{error:"PopupFormField misconfiguration"});if(!S)return n.jsx(n.Fragment,{});const Q=V,q={collection:S,entityId:w,values:L,path:a,setFieldValue:X,save:O},R=i&&pn(S.properties,i),$=i&&R?{propertyKey:i,disabled:V||Nn(R)||!!R.disabled,property:R,includeDescription:!1,underlyingValueHasChanged:!1,context:q,tableMode:!0,partOfArray:!1,partOfBlock:!1,autoFocus:d}:void 0;let ne=n.jsx(n.Fragment,{children:n.jsx("div",{className:"w-[560px] max-w-full max-h-[85vh]",children:n.jsxs(Fe.Form,{onSubmit:W,noValidate:!0,children:[n.jsx("div",{className:"mb-1 p-4 flex flex-col relative",children:n.jsx("div",{ref:F,className:"cursor-auto",style:{cursor:"auto !important"},children:$&&n.jsx(bn,{...$})})}),n.jsx(wn,{children:n.jsx(te,{variant:"filled",color:"primary",type:"submit",disabled:Q,children:"Save"})})]})},`popup_form_${e}_${w}_${A}`)});const J=y.plugins;return J&&J.forEach(x=>{x.form?.provider&&(ne=n.jsx(x.form.provider.Component,{status:"existing",path:a,collection:S,entity:k,context:y,currentEntityId:w,formContext:q,...x.form.provider.props,children:ne}))}),ne}}),h&&n.jsx(j,{color:"error",children:h.message})]}),U=n.jsxs("div",{style:{boxShadow:"0 0 0 2px rgba(128,128,128,0.2)"},className:`inline-block fixed z-30 shadow-outline rounded-md bg-white dark:bg-gray-950 ${d?"visible":"invisible"} cursor-grab overflow-visible`,ref:P,children:[n.jsx(z3,{onResize:Z}),n.jsxs("div",{className:"overflow-hidden",children:[oe,n.jsx("div",{className:"absolute -top-3.5 -right-3.5 bg-gray-500 rounded-full",style:{width:"32px",height:"32px"},children:n.jsx(ee,{size:"small",onClick:L=>{L.stopPropagation(),u()},children:n.jsx(an,{className:"text-white",size:"small"})})})]})]},`draggable_${i}_${w}_${d}`);return n.jsx(La.Root,{asChild:!0,children:U})}const Y3="collectionGroupParent",St=f.memo(function({fullPath:t,parentPathSegments:c,isSubCollection:i,className:l,...a}){const s=Qe(),d=Ae(),u=Cn(),A=yn(),_=Bn(),g=re(),y=f.useMemo(()=>{const G=_?.getCollectionConfig(t);return G?Ze(a,G):a},[a,t,_?.getCollectionConfig]),[h,I]=f.useState(void 0),[b,p]=f.useState(void 0),[w,k]=f.useState(0),[K,m]=f.useState(0),v=f.useCallback(()=>{const G=h;setTimeout(()=>{G===h&&I(void 0)},2400)},[h]),S=f.useCallback(G=>ft(y,A,Xe(t),G??null)?y.inlineEditing===void 0||y.inlineEditing:!1,[y,A,t]),B=y.selectionEnabled===void 0||y.selectionEnabled,P=!S(),[F,D]=f.useState(!1),C=Bt(),N=y.selectionController??C,{selectedEntities:M,toggleEntitySelection:H,isEntitySelected:Z,setSelectedEntities:O}=N;f.useEffect(()=>{p(void 0)},[M]);const oe=Ct({fullPath:t,collection:y,entitiesDisplayedFirst:[],lastDeleteTimestamp:w}),U=f.useRef(Math.random().toString(36)),L=oe.popupCell,X=f.useCallback(()=>{oe.setPopupCell?.(void 0)},[oe.setPopupCell]),W=f.useCallback(G=>(I(G),g.onAnalyticsEvent?.("edit_entity_clicked",{path:G.path,entityId:G.id}),u.open({entityId:G.id,path:t,collection:y,updateUrl:!0,onClose:v})),[t,y,u]),V=f.useCallback(()=>{g.onAnalyticsEvent?.("new_entity_click",{path:t}),u.open({path:t,collection:y,updateUrl:!0,onClose:v})},[t,y,u]),Q=f.useCallback(G=>{g.onAnalyticsEvent?.("single_delete_dialog_open",{path:t}),p(G)},[g,t]),q=f.useCallback(()=>{g.onAnalyticsEvent?.("multiple_delete_dialog_open",{path:t}),p(M)},[g,t,M]),R=f.useCallback((G,_e)=>{g.onAnalyticsEvent?.("single_entity_deleted",{path:t}),O(ae=>ae.filter(T=>T.id!==_e.id)),k(Date.now())},[g,t,O]),$=f.useCallback((G,_e)=>{g.onAnalyticsEvent?.("multiple_entities_deleted",{path:t}),O([]),p(void 0),k(Date.now())},[O]),ne=f.useCallback((G,_e)=>{if(_){const ae=_.getCollectionConfig(G),T=Ze(ae,_e);_.onCollectionModified(G,T)}},[_]),J=f.useCallback(({width:G,key:_e})=>{if(!pn(y.properties,_e))return;const ae=oa(_e,G);ne(t,ae)},[y,ne,t]),x=f.useCallback(G=>{_&&ne(t,{defaultSize:G})},[ne,t,_]),ie=Vo(y,A,Xe(t),null),Y=f.useCallback(({name:G,value:_e,property:ae,entityId:T})=>s.checkUniqueField(t,G,_e,ae,T),[t]),Be=({fullPath:G,context:_e,value:ae,propertyKey:T,onValueUpdated:le,setError:he,entity:Le})=>{const mn=Fe.setIn({...Le.values},T,ae),vn={path:G,entityId:Le.id,values:mn,previousValues:Le.values,collection:y,status:"existing"};return dr({...vn,callbacks:y.callbacks,dataSource:s,context:_e,onSaveSuccess:()=>le(),onSaveFailure:z=>{console.error("Save failure"),console.error(z),he(z)}})},Oe=d.resolveAliasesFrom(t),Ue=f.useMemo(()=>Me({collection:y,path:t,fields:g.fields}),[y,t]),zn=f.useCallback(({propertyKey:G,propertyValue:_e,entity:ae})=>{let T=pn(y.properties,G);return T||(T=pn(Ue.properties,G)),Te({propertyKey:G,propertyOrBuilder:T,path:t,propertyValue:_e,values:ae.values,entityId:ae.id,fields:g.fields})},[y.properties,g.fields,t,Ue.properties]),Ao=Xi(Ue,!0),kn=f.useCallback(G=>{I(G),g.onAnalyticsEvent?.("copy_entity_click",{path:G.path,entityId:G.id}),u.open({entityId:G.id,path:t,copy:!0,collection:y,updateUrl:!0,onClose:v})},[u,y,t,v]),Hn=f.useCallback(G=>{I(G),g.onAnalyticsEvent?.("entity_click",{path:G.path,entityId:G.id}),u.open({entityId:G.id,path:G.path,collection:y,updateUrl:!0,onClose:v})},[u,y,t,v]),_o=f.useMemo(()=>{const G=y.subcollections?.map(ae=>({id:ht(ae),name:ae.name,width:200,dependencies:[],Builder:({entity:T})=>n.jsx(te,{color:"primary",startIcon:n.jsx(ko,{size:"small"}),onClick:le=>{le.stopPropagation(),u.open({path:t,entityId:T.id,selectedSubPath:ae.alias??ae.path,collection:y,updateUrl:!0})},children:ae.name})}))??[],_e=y.collectionGroup?[{id:Y3,name:"Parent entities",width:260,dependencies:[],Builder:({entity:ae})=>{const T=d.getParentReferencesFromPath(ae.path);return n.jsx(n.Fragment,{children:T.map(le=>n.jsx(on,{reference:le,size:"tiny"},le.path+"/"+le.id))})}}]:[];return[...y.additionalFields??y.additionalColumns??[],...G,..._e]},[y,t]),rn=f.useCallback(({entity:G,size:_e,width:ae,frozen:T})=>{const le=Z(G),he=At(y,A,Xe(t),G);return n.jsx(pt,{entity:G,width:ae,frozen:T,isSelected:le,selectionEnabled:B,size:_e,toggleEntitySelection:H,onEditClicked:Hn,onCopyClicked:ie?kn:void 0,onDeleteClicked:he?Q:void 0,hideId:y?.hideIdFromCollection})},[Z,y,A,t,B,H,Hn,ie,kn]),yo=n.jsx(Hi,{open:F,onOpenChange:D,enabled:!!y.description,trigger:n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx(j,{variant:"subtitle1",className:`leading-none truncate max-w-[160px] lg:max-w-[240px] ${y.description?"cursor-pointer":"cursor-auto"}`,onClick:y.description?G=>{D(!0),G.stopPropagation()}:void 0,children:`${y.name}`}),n.jsx($3,{fullPath:t,collection:y,filter:oe.filterValues,sortBy:oe.sortBy,onCountChange:m})]}),children:y.description&&n.jsx("div",{className:"m-4 text-gray-900 dark:text-white",children:n.jsx(co,{source:y.description})})});return n.jsxs("div",{className:E("overflow-hidden h-full w-full",l),children:[n.jsx(Kt,{additionalFields:_o,tableController:oe,displayedColumnIds:Ao,onSizeChanged:x,onEntityClick:W,onColumnResize:J,onValueChange:Be,tableRowActionsBuilder:rn,uniqueFieldValidator:Y,title:yo,selectionController:N,highlightedEntities:h?[h]:[],defaultSize:y.defaultSize,properties:Ue.properties,getPropertyFor:zn,actions:n.jsx(V3,{parentPathSegments:c??[],collection:y,tableController:oe,onMultipleDeleteClick:q,onNewClick:V,path:t,relativePath:y.path,selectionController:N,selectionEnabled:B,collectionEntitiesCount:K}),hoverRow:P,inlineEditing:S()},`collection_table_${t}`),n.jsx(H3,{open:!!L,onClose:X,cellRect:L?.cellRect,columnIndex:L?.columnIndex,propertyKey:L?.propertyKey,collection:y,entity:L?.entity,tableKey:U.current,customFieldValidator:Y,path:Oe,onCellValueChange:Be},`popup_form_${L?.columnIndex}_${L?.entity?.id}`),b&&n.jsx(Q3,{entityOrEntitiesToDelete:b,path:t,collection:y,callbacks:y.callbacks,open:!!b,onEntityDelete:R,onMultipleEntitiesDelete:$,onClose:()=>p(void 0)})]})},de);function Bt(){const[e,t]=f.useState([]),c=f.useCallback(l=>{let a;e.map(s=>s.id).includes(l.id)?a=e.filter(s=>s.id!==l.id):a=[...e,l],t(a)},[e]),i=f.useCallback(l=>e.map(a=>a.id).includes(l.id),[e]);return{selectedEntities:e,setSelectedEntities:t,isEntitySelected:i,toggleEntitySelection:c}}function $3({fullPath:e,collection:t,filter:c,sortBy:i,onCountChange:l}){const a=Qe(),s=Ae(),[d,u]=f.useState(void 0),[A,_]=f.useState(void 0),g=i?i[0]:void 0,y=i?i[1]:void 0,h=f.useMemo(()=>s.resolveAliasesFrom(e),[e,s.resolveAliasesFrom]);return f.useEffect(()=>{a.countEntities({path:h,collection:t,filter:c,orderBy:g,order:y}).then(u).catch(_)},[e,a,h,t,c,g,y]),f.useEffect(()=>{l&&l(d??0)},[l,d]),A?null:n.jsx(j,{className:"w-full text-ellipsis block overflow-hidden whitespace-nowrap max-w-xs text-left w-fit-content",variant:"caption",color:"secondary",children:d!==void 0?`${d} entities`:n.jsx(Ve,{className:"w-full max-w-[80px] mt-1"})})}function oa(e,t){if(e.includes(".")){const[c,...i]=e.split(".");return{properties:{[c]:oa(i.join("."),t)}}}return{properties:{[e]:{columnWidth:t}}}}function ra({onSingleEntitySelected:e,onMultipleEntitiesSelected:t,multiselect:c,collection:i,path:l,selectedEntityIds:a,description:s,forceFilter:d,maxSelection:u}){const A=Uo(),_=Cn(),g=Ae(),y=re(),h=g.resolveAliasesFrom(l),I=Qe(),[b,p]=f.useState([]),w=Bt();f.useEffect(()=>{let C=!1;const N=a?.map(M=>M?.toString()).filter(Boolean);return N&&i?Promise.all(N.map(M=>I.fetchEntity({path:h,entityId:M,collection:i}))).then(M=>{if(!C){const H=M.filter(Z=>Z!==void 0);w.setSelectedEntities(H),p(H)}}):(w.setSelectedEntities([]),p([])),()=>{C=!0}},[I,h,a,i,w.setSelectedEntities]);const k=f.useCallback(()=>{y.onAnalyticsEvent?.("reference_selection_clear",{path:h}),w.setSelectedEntities([]),!c&&e?e(null):t&&t([])},[c,t,e]),K=f.useCallback(C=>{let N;const M=w.selectedEntities;if(y.onAnalyticsEvent?.("reference_selection_toggle",{path:h,entityId:C.id}),M){if(M.map(H=>H.id).indexOf(C.id)>-1)N=M.filter(H=>H.id!==C.id);else{if(u&&M.length>=u)return;N=[...M,C]}w.setSelectedEntities(N),t&&t(N)}},[t,w.selectedEntities]),m=f.useCallback(C=>{!c&&e?(y.onAnalyticsEvent?.("reference_selected_single",{path:h,entityId:C.id}),e(C),A.close(!1)):K(C)},[A,c,e,K]),v=f.useCallback(()=>{y.onAnalyticsEvent?.("reference_selection_new_entity",{path:h}),_.open({path:h,collection:i,updateUrl:!0,onUpdate:({entity:C})=>{p([C,...b]),m(C)},closeOnSave:!0})},[_,h,i,b,m]),S=f.useCallback(({entity:C,size:N,width:M,frozen:H})=>{const Z=w.selectedEntities,O=Z&&Z.map(oe=>oe.id).indexOf(C.id)>-1;return n.jsx(pt,{width:M,frozen:H,entity:C,size:N,isSelected:O,selectionEnabled:c,toggleEntitySelection:K,hideId:i?.hideIdFromCollection})},[c,w.selectedEntities,K,i?.hideIdFromCollection]),B=f.useCallback(C=>{C.stopPropagation(),A.close(!1)},[A]);if(!i)return n.jsx(pe,{error:"Could not find collection with id "+i});const P=f.useMemo(()=>Me({collection:i,path:h,values:{},fields:y.fields}),[i,y.fields,h]),F=Xi(P,!1),D=Ct({fullPath:h,collection:i,entitiesDisplayedFirst:b,forceFilter:d});return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsx("div",{className:"flex-grow",children:b&&n.jsx(Kt,{displayedColumnIds:F,onEntityClick:m,tableController:D,tableRowActionsBuilder:S,title:n.jsx(j,{variant:"subtitle2",children:i.singularName?`Select ${i.singularName}`:`Select from ${i.name}`}),defaultSize:i.defaultSize,properties:P.properties,forceFilter:d,inlineEditing:!1,selectionController:w,actions:n.jsx(j3,{collection:i,path:h,onNewClick:v,onClear:k})})}),n.jsxs(wn,{translucent:!1,children:[s&&n.jsx(j,{variant:"body2",className:"flex-grow text-left",children:s}),n.jsx(te,{onClick:B,color:"primary",variant:"filled",children:"Done"})]})]})}function j3({collection:e,path:t,onClear:c,onNewClick:i}){const l=yn(),a=Ge(),s=i?u=>{u.preventDefault(),i()}:void 0,d=Vo(e,l,Xe(t),null)&&s&&(a?n.jsxs(te,{onClick:s,startIcon:n.jsx(hn,{}),variant:"outlined",color:"primary",children:["Add ",e.singularName??e.name]}):n.jsx(te,{onClick:s,size:"medium",variant:"outlined",color:"primary",children:n.jsx(hn,{})}));return n.jsxs(n.Fragment,{children:[n.jsx(te,{onClick:c,variant:"text",color:"primary",children:"Clear"}),d]})}function fn({title:e,children:t,invisible:c=!1,initiallyExpanded:i=!0,onExpandedChange:l,titleClassName:a,asField:s,className:d}){En("ExpandablePanel",`
|
|
1584
|
-
.CollapsibleContent {
|
|
1585
|
-
overflow: hidden;
|
|
1586
|
-
}
|
|
1587
|
-
.CollapsibleContent[data-state='open'] {
|
|
1588
|
-
animation: slideDown 220ms ease-out
|
|
1589
|
-
}
|
|
1590
|
-
.CollapsibleContent[data-state='closed'] {
|
|
1591
|
-
animation: slideUp 220ms ease-out;
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
@keyframes slideDown {
|
|
1595
|
-
from {
|
|
1596
|
-
height: 0;
|
|
1597
|
-
}
|
|
1598
|
-
to {
|
|
1599
|
-
height: var(--radix-collapsible-content-height);
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
@keyframes slideUp {
|
|
1604
|
-
from {
|
|
1605
|
-
height: var(--radix-collapsible-content-height);
|
|
1606
|
-
}
|
|
1607
|
-
to {
|
|
1608
|
-
height: 0;
|
|
1609
|
-
}
|
|
1610
|
-
}`);const[u,A]=f.useState(i),[_,g]=f.useState(u);return f.useEffect(()=>{u?setTimeout(()=>{g(!0)},220):g(!1)},[u]),n.jsx(n.Fragment,{children:n.jsxs(qn.Root,{className:E(!c&&ue+" border","rounded-md"),open:u,onOpenChange:y=>{l?.(y),A(y)},children:[n.jsxs(qn.Trigger,{className:E(ge,"rounded flex items-center justify-between w-full min-h-[52px]",c?"border-b px-2":"p-4",c&&ue,s&&qe,a),children:[e,n.jsx(eo,{className:E("transition",u?"rotate-180":"")})]}),n.jsx(qn.Content,{className:E("CollapsibleContent"),style:{overflow:_?"visible":"hidden"},children:n.jsx("div",{className:d,children:t})})]})})}function $o({children:e,group:t}){const c=Bn();return n.jsx(fn,{invisible:!0,titleClassName:"font-medium text-sm text-gray-600 dark:text-gray-400",className:"py-4",initiallyExpanded:!(c?.collapsedGroups??[]).includes(t??"ungrouped"),onExpandedChange:i=>{if(c)if(i)c.setCollapsedGroups((c.collapsedGroups??[]).filter(l=>l!==(t??"ungrouped")));else{const l=(c.collapsedGroups??[]).concat(t??"ungrouped");c.setCollapsedGroups(l)}},title:n.jsx(j,{color:"secondary",className:"font-medium ml-1",children:t?.toUpperCase()??"Views".toUpperCase()}),children:n.jsx("div",{className:"mb-8",children:e})})}function Et({view:e,path:t,collection:c,url:i,name:l,description:a,onClick:s}){const d=Bn(),u=Wo(c??e),A=Ie.useNavigate(),_=re(),g=(d?.favouritePaths??[]).includes(t);let y;if(_.plugins&&c){const h={path:t,collection:c,context:_};y=n.jsx(n.Fragment,{children:_.plugins.map((I,b)=>I.homePage?.CollectionActions?n.jsx(I.homePage.CollectionActions,{...h,extraProps:I.homePage.extraProps},`actions_${b}`):null)})}return n.jsx(ya,{className:E("h-full p-4 cursor-pointer min-h-[230px]"),onClick:()=>{s?.(),A(i),d&&d.setRecentlyVisitedPaths([t,...(d.recentlyVisitedPaths??[]).filter(h=>h!==t)])},children:n.jsxs("div",{className:"flex flex-col items-start h-full",children:[n.jsxs("div",{className:"flex-grow w-full",children:[n.jsxs("div",{className:"h-10 flex items-center w-full justify-between text-gray-300 dark:text-gray-600",children:[u,n.jsxs("div",{className:"flex items-center gap-1",onClick:h=>{h.preventDefault(),h.stopPropagation()},children:[y,d&&n.jsx(ee,{onClick:h=>{h.preventDefault(),h.stopPropagation(),g?d.setFavouritePaths(d.favouritePaths.filter(I=>I!==t)):d.setFavouritePaths([...d.favouritePaths,t])},children:g?n.jsx(Cr,{size:18,className:"text-secondary"}):n.jsx(Sr,{size:18,className:"text-gray-400 dark:text-gray-500"})})]})]}),n.jsx(j,{gutterBottom:!0,variant:"h5",component:"h2",children:l}),a&&n.jsx(j,{variant:"body2",color:"secondary",component:"div",children:n.jsx(co,{source:a})})]}),n.jsx("div",{style:{alignSelf:"flex-end"},children:n.jsx("div",{className:"p-4",children:n.jsx(uc,{className:"text-primary"})})})]})})}function q3({entry:e}){const t=Ie.useNavigate(),c=Bn();if(!c)return null;const i=c.favouritePaths.includes(e.path),l=a=>{a.preventDefault(),a.stopPropagation(),i?c.setFavouritePaths(c.favouritePaths.filter(s=>s!==e.path)):c.setFavouritePaths([...c.favouritePaths,e.path])};return n.jsx(Ko,{onClick:()=>t(e.url),icon:i?n.jsx(Cr,{onClick:l,size:18,className:"text-secondary"}):n.jsx(Sr,{onClick:l,size:18,className:"text-gray-400 dark:text-gray-500"}),children:e.name},e.path)}function J3({hidden:e}){const t=re(),c=Ae(),i=Bn();if(!i)return null;const l=(i?.favouritePaths??[]).map(d=>c.topLevelNavigation?.navigationEntries.find(u=>u.path===d)).filter(Boolean),a=(i?.recentlyVisitedPaths??[]).map(d=>c.topLevelNavigation?.navigationEntries.find(u=>u.path===d)).filter(Boolean).slice(0,5),s=n.jsx(To,{in:!e&&l.length>0,children:n.jsx($o,{group:"Favourites",children:n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:l.map(d=>n.jsx("div",{className:"col-span-1",children:n.jsx(Et,{...d,onClick:()=>{const u=d.type==="collection"?"home_favorite_navigate_to_collection":d.type==="view"?"home_favorite_navigate_to_view":"unmapped_event";t.onAnalyticsEvent?.(u,{path:d.path})}})},`nav_${d.group}_${d.name}`))})})});return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"flex flex-row flex-wrap gap-1 pb-2",children:a.map(d=>n.jsx(q3,{entry:d},d.path))}),s]})}const Ft={};function Z3(){const e=Ie.useLocation(),t=f.useRef(null),[c,i]=f.useState(0),[l,a]=f.useState("down"),s=f.useCallback(()=>{!t.current||!e.key||(Ft[e.key]=t.current.scrollTop,i(t.current.scrollTop),a(t.current.scrollTop>c?"down":"up"))},[t,e.key,c]);return f.useEffect(()=>{const d=t.current;if(d)return d.addEventListener("scroll",s,{passive:!0}),()=>{d&&d.removeEventListener("scroll",s)}},[t,s,e]),f.useEffect(()=>{!t.current||!Ft[e.key]||t.current.scrollTo({top:Ft[e.key],behavior:"auto"})},[e]),{containerRef:t,scroll:c,direction:l}}const Wn=new Oa.Search("url");Wn.addIndex("name"),Wn.addIndex("description"),Wn.addIndex("group"),Wn.addIndex("path");function ta({additionalChildrenStart:e,additionalChildrenEnd:t}){const c=re(),i=Ae();if(!i.topLevelNavigation)throw Error("Navigation not ready in FireCMSHomePage");const{containerRef:l,scroll:a,direction:s}=Z3(),{navigationEntries:d,groups:u}=i.topLevelNavigation,[A,_]=f.useState(null),g=A?d.filter(b=>A.includes(b.url)):d;f.useEffect(()=>{Wn.addDocuments(d)},[d]);const y=f.useCallback(b=>{if(!b||b==="")_(null);else{const p=Wn.search(b);_(p.map(w=>w.url))}},[]),h=[...u];(g.filter(b=>!b.group).length>0||g.length===0)&&h.push(void 0);let I;if(c.plugins){const b={context:c};I=n.jsx(n.Fragment,{children:c.plugins.filter(p=>p.homePage?.includeSection).map((p,w)=>{const k=p.homePage.includeSection(b);return n.jsx($o,{group:k.title,children:k.children},`plugin_section_${p.name}`)})})}return n.jsx("div",{id:"home_page",ref:l,className:"py-2 overflow-auto h-full w-full",children:n.jsxs(Ot,{maxWidth:"6xl",children:[n.jsx("div",{className:"sticky py-4 transition-all duration-400 ease-in-out top-0 z-10",style:{top:s==="down"?-84:0},children:n.jsx(Qt,{onTextSearch:y,placeholder:"Search collections",large:!1,className:"w-full"})}),n.jsx(J3,{hidden:!!A}),e,h.map((b,p)=>{const w=[],k={group:b,context:c};c.plugins&&c.plugins.forEach(m=>{m.homePage?.AdditionalCards&&w.push(...Yo(m.homePage?.AdditionalCards))});const K=g.filter(m=>m.group===b||!m.group&&b===void 0);return K.length===0&&w.length===0?null:n.jsx($o,{group:b,children:n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[K.map(m=>n.jsx("div",{className:"col-span-1",children:n.jsx(Et,{...m,onClick:()=>{const v=m.type==="collection"?"home_navigate_to_collection":m.type==="view"?"home_navigate_to_view":"unmapped_event";c.onAnalyticsEvent?.(v,{path:m.path})}})},`nav_${m.group}_${m.name}`)),w&&w.map((m,v)=>n.jsx("div",{children:n.jsx(m,{...k})},`nav_${b}_add_${v}`))]})},`plugin_section_${b}`)}),I,t]})})}function X3({widget:e}){const t="h-8 w-8 p-1 rounded-full shadow text-white";return n.jsx("div",{className:t,style:{background:e?.color??"#888"},children:dt(e,"medium")})}function x3({children:e,title:t,path:c}){const i=fr();return f.useEffect(()=>{i.set({breadcrumbs:[{title:t,url:c}]})},[c,t]),n.jsx(n.Fragment,{children:e})}function ca(){return n.jsx("div",{className:"flex w-full h-full",children:n.jsxs("div",{className:"m-auto flex items-center flex-col",children:[n.jsx(j,{variant:"h4",align:"center",gutterBottom:!0,children:"Page not found"}),n.jsx(j,{align:"center",gutterBottom:!0,children:"This page does not exist or you may not have access to it"}),n.jsx(te,{variant:"text",component:Ie.Link,to:"/",children:"Back to home"})]})})}function R3({open:e,onAccept:t,onCancel:c,title:i,loading:l,body:a}){return n.jsxs(Zo,{open:e,onOpenChange:s=>s?void 0:c(),children:[n.jsxs(Xo,{children:[n.jsx(j,{variant:"h6",className:"mb-2",children:i}),a]}),n.jsxs(wn,{children:[n.jsx(te,{variant:"text",onClick:c,autoFocus:!0,children:"Cancel"}),n.jsx(ha,{color:"primary",type:"submit",loading:l,onClick:t,children:"Ok"})]})]})}function ia({width:e,height:t,className:c,style:i}){return n.jsxs("svg",{width:e??"100%",height:t??"100%",viewBox:"0 0 599 599",version:"1.1",style:i,className:c,xmlns:"http://www.w3.org/2000/svg",children:[n.jsxs("defs",{children:[n.jsxs("radialGradient",{cx:"28.6213569%",cy:"43.1133328%",fx:"28.6213569%",fy:"43.1133328%",r:"71.5003456%",gradientTransform:"translate(0.286214,0.431133),rotate(3.343450),scale(1.000000,0.996175),translate(-0.286214,-0.431133)",id:"radialGradient-1",children:[n.jsx("stop",{stopColor:"#FF5B79",offset:"0%"}),n.jsx("stop",{stopColor:"#FA5574",offset:"28.0930803%"}),n.jsx("stop",{stopColor:"#EC4C51",offset:"44.7242531%"}),n.jsx("stop",{stopColor:"#9543C1",offset:"71.4578165%"}),n.jsx("stop",{stopColor:"#3857B3",offset:"100%"})]}),n.jsxs("radialGradient",{cx:"53.6205516%",cy:"47.2473036%",fx:"53.6205516%",fy:"47.2473036%",r:"50.8229649%",gradientTransform:"translate(0.536206,0.472473),rotate(90.000000),scale(1.000000,1.206631),translate(-0.536206,-0.472473)",id:"radialGradient-2",children:[n.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),n.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"75.3503173%"}),n.jsx("stop",{stopColor:"#0D060B",stopOpacity:"0.437431709",offset:"100%"})]}),n.jsxs("radialGradient",{cx:"53.8605015%",cy:"48.1990423%",fx:"53.8605015%",fy:"48.1990423%",r:"59.9151549%",gradientTransform:"translate(0.538605,0.481990),rotate(180.000000),scale(1.000000,0.925027),translate(-0.538605,-0.481990)",id:"radialGradient-3",children:[n.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),n.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"84.0867343%"}),n.jsx("stop",{stopColor:"#FF0000",stopOpacity:"0.567324765",offset:"100%"})]})]}),n.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:n.jsxs("g",{id:"firecms_logo",children:[n.jsx("circle",{fill:"url(#radialGradient-1)",cx:"299.5",cy:"299.5",r:"299.5"}),n.jsx("circle",{fill:"url(#radialGradient-2)",cx:"299.5",cy:"299.5",r:"299.5"}),n.jsx("circle",{fill:"url(#radialGradient-3)",cx:"299.5",cy:"299.5",r:"299.5"})]})})]})}const eH={info:"bg-sky-200 dark:bg-teal-900",warn:"bg-orange-200 dark:bg-yellow-950"};function nH({children:e,mode:t="info"}){return n.jsx("div",{className:E("my-3 py-1 px-2 rounded",eH[t]),children:e})}const aa=function({title:t,endAdornment:c,startAdornment:i,drawerOpen:l,dropDownActions:a,includeDrawer:s,className:d,style:u,user:A}){const _=Ae(),g=yn(),{mode:y,toggleMode:h}=ur(),I=Ge(),b=A??g.user;let p;if(b&&b.photoURL)p=n.jsx(Tt,{src:b.photoURL});else if(b===void 0||g.initialLoading)p=n.jsx("div",{className:"p-1 flex justify-center",children:n.jsx(Ve,{className:"w-10 h-10 rounded-full"})});else{const w=b?.displayName?b.displayName[0].toUpperCase():b?.email?b.email[0].toUpperCase():"A";p=n.jsx(Tt,{children:w})}return n.jsx("div",{style:u,className:E("pr-2",{"ml-[17rem]":l&&I,"ml-16":s&&!(l&&I)&&!i,"h-16":!0,"z-10":I,"transition-all":!0,"ease-in":!0,"duration-75":!0,"w-full":!s,"w-[calc(100%-64px)]":s&&!(l&&I),"w-[calc(100%-17rem)]":s&&l&&I,"duration-150":l&&I,fixed:!0},d),children:n.jsxs("div",{className:"flex flex-row gap-2 px-4 h-full items-center",children:[i,_&&n.jsx("div",{className:"mr-8 hidden lg:block",children:n.jsx(Ie.Link,{className:"visited:text-inherit visited:dark:text-inherit",to:_?.basePath??"/",children:n.jsx(j,{variant:"subtitle1",noWrap:!0,className:"ml-2 !font-medium",children:t})})}),n.jsx("div",{className:"flex-grow"}),c&&n.jsx(se,{children:c}),n.jsx(ee,{color:"inherit","aria-label":"Open drawer",onClick:h,size:"large",children:y==="dark"?n.jsx(hc,{}):n.jsx(Ec,{})}),n.jsxs(Qn,{trigger:p,children:[a,!a&&n.jsxs(ke,{onClick:g.signOut,children:[n.jsx(Nc,{}),"Log Out"]})]})]})})},oH=e=>e&&Array.isArray(e)&&e.length>0?e.map((t,c)=>t?{[Vr(t)+c]:fo()}:{}).reduce((t,c)=>({...t,...c}),{}):{};function Pt({droppableId:e,addLabel:t,value:c,disabled:i=!1,buildEntry:l,size:a,onInternalIdAdded:s,includeAddButton:d,newDefaultEntry:u,onValueChange:A}){const _=c&&Array.isArray(c)&&c.length>0,g=f.useRef(oH(c)),[y,h]=f.useState(_?Object.values(g.current):[]);f.useEffect(()=>{if(_&&c&&c.length!==y.length){const k=c.map((K,m)=>{const v=Vr(K)+m;if(v in g.current)return g.current[v];{const S=fo();return g.current[v]=S,S}});h(k)}},[_,y.length,c]);const I=k=>{if(k.preventDefault(),i)return;const K=fo(),m=[...y,K];s&&s(K),h(m),A([...c??[],u])},b=k=>{const K=[...y];K.splice(k,1),h(K),A(c.filter((m,v)=>v!==k))},p=k=>{const K=fo(),m=c[k],v=[...y.splice(0,k+1),K,...y.splice(k+1,y.length-k-1)];s&&s(K),h(v),A([...c.slice(0,k+1),m,...c.slice(k+1)])},w=k=>{if(!k.destination)return;const K=k.source.index,m=k.destination.index,v=[...y],S=v[K];v[K]=v[m],v[m]=S,h(v),A(rH(c,K,m))};return n.jsx(Kn.DragDropContext,{onDragEnd:w,children:n.jsx(Kn.Droppable,{droppableId:e,renderClone:(k,K,m)=>{const v=m.source.index,S=y[v];return n.jsx(Dt,{provided:k,internalId:S,index:v,size:a,disabled:i,buildEntry:l,remove:b,copy:p,isDragging:K.isDragging})},children:(k,K)=>n.jsxs("div",{...k.droppableProps,ref:k.innerRef,children:[_&&y.map((m,v)=>n.jsx(Kn.Draggable,{draggableId:`array_field_${m}`,isDragDisabled:i,index:v,children:(S,B)=>n.jsx(Dt,{provided:S,internalId:m,index:v,size:a,disabled:i,buildEntry:l,remove:b,copy:p,isDragging:B.isDragging})},`array_field_${m}`)),k.placeholder,d&&n.jsx("div",{className:"p-4 justify-center text-left",children:n.jsx(te,{variant:a==="small"?"text":"outlined",size:a==="small"?"small":"medium",color:"primary",disabled:i,startIcon:n.jsx(hn,{}),onClick:I,children:t??"Add"})})]})})})}function Dt({provided:e,index:t,internalId:c,size:i,disabled:l,buildEntry:a,remove:s,copy:d,isDragging:u}){const[A,_]=nr(),g=i!=="small"&&_.height===0,y=i!=="small"&&_.height<100,[h,I]=f.useState(!1),b=f.useCallback(()=>I(!0),[]),p=f.useCallback(()=>I(!1),[]);return n.jsx("div",{onMouseEnter:b,onMouseMove:b,onMouseLeave:p,ref:e.innerRef,...e.draggableProps,style:e.draggableProps.style,className:`${u||h?ze:""} mb-1 rounded-md opacity-100`,children:n.jsxs("div",{className:"flex items-start",children:[n.jsx("div",{ref:A,className:"flex-grow w-[calc(100%-48px)] text-text-primary dark:text-text-primary-dark",children:a(t,c)}),n.jsx(la,{direction:i==="small"?"row":"column",disabled:l,remove:s,index:t,provided:e,measuring:g,contentOverflow:y,copy:d})]})})}function la({direction:e,disabled:t,remove:c,index:i,provided:l,copy:a,contentOverflow:s,measuring:d}){return n.jsxs("div",{className:`p-1 flex ${e==="row"?"flex-row-reverse":"flex-col"} items-center`,...l.dragHandleProps,children:[n.jsx(ye,{side:e==="column"?"left":void 0,title:"Move",children:n.jsx(ee,{size:"small",disabled:t,className:`cursor-${t?"inherit":"grab"}`,children:n.jsx("svg",{focusable:"false",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 24 24",children:n.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})})})}),!d&&!s&&n.jsxs(n.Fragment,{children:[n.jsx(ye,{title:"Remove",side:e==="column"?"left":void 0,children:n.jsx(ee,{size:"small","aria-label":"remove",disabled:t,onClick:()=>c(i),children:n.jsx(oo,{size:"small"})})}),n.jsx(ye,{side:e==="column"?"left":void 0,title:"Copy in this position",children:n.jsx(ee,{size:"small","aria-label":"copy",disabled:t,onClick:()=>a(i),children:n.jsx(Rn,{size:"small"})})})]}),!d&&s&&n.jsx(n.Fragment,{children:n.jsxs(Qn,{trigger:n.jsx(ee,{size:"small",children:n.jsx(vr,{size:"small"})}),children:[n.jsxs(ke,{dense:!0,onClick:()=>c(i),children:[n.jsx(oo,{size:"small"}),"Remove"]}),n.jsxs(ke,{dense:!0,onClick:()=>a(i),children:[n.jsx(Rn,{size:"small"}),"Copy"]})]})})]})}function rH(e,t,c){const i=Array.from(e),[l]=i.splice(t,1);return i.splice(c,0,l),i}function fo(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}const tH="100vw",cH="55vw",sa="768px",jo="main_##Q$SC^#S6";function iH({path:e,entityId:t,selectedSubPath:c,copy:i,collection:l,onValuesAreModified:a,formWidth:s,onUpdate:d,onClose:u}){l.customId&&l.formAutoSave&&console.warn(`The collection ${l.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);const[A,_]=f.useState(!1),[g,y]=f.useState(void 0);Do(g,()=>{g&&x({entityId:W?.id,collection:l,path:e,values:g,closeAfterSave:!1})},!1,2e3);const h=Qe(),I=Uo(),b=Cn(),p=cn(),w=re(),k=yn(),[K,m]=f.useState(void 0),[v,S]=f.useState(i?"copy":t?"existing":"new"),B=f.useRef(void 0),P=B.current,F=(l.subcollections??[]).filter(T=>!T.hideFromNavigation),D=F?.length??0,C=l.views,N=C?.length??0,M=l.formAutoSave&&!l.customId,H=N>0||D>0,Z=c??$r(l?l.defaultSelectedView:void 0,{status:v,entityId:t}),O=f.useRef(Z??jo),oe=O.current===jo,{entity:U,dataLoading:L,dataLoadingError:X}=sr({path:e,entityId:t,collection:l,useCache:!1}),[W,V]=f.useState(U),[Q,q]=f.useState(void 0);f.useEffect(()=>{U&&V(U)},[U]),f.useEffect(()=>{if(v==="new")q(!1);else{const T=W?ft(l,k,Xe(e),W??null):!1;W&&q(!T)}},[k,W,v]);const R=f.useCallback(T=>{_(!1),p.open({type:"error",message:"Error before saving: "+T?.message}),console.error(T)},[p]),$=f.useCallback(T=>{_(!1),p.open({type:"error",message:"Error after saving (entity is saved): "+T?.message}),console.error(T)},[p]),ne=(T,le)=>{_(!1),M||p.open({type:"success",message:`${l.singularName??l.name}: Saved correctly`}),V(T),S("existing"),a(!1),d&&d({entity:T}),le?(I.setBlocked(!1),I.close(!0),u?.()):v!=="existing"&&b.replace({path:e,entityId:T.id,selectedSubPath:O.current,updateUrl:!0,collection:l})},J=f.useCallback(T=>{_(!1),p.open({type:"error",message:"Error saving: "+T?.message}),console.error("Error saving entity",e,t),console.error(T)},[t,e,p]),x=({values:T,previousValues:le,closeAfterSave:he,entityId:Le,collection:mn,path:vn})=>{_(!0),dr({path:vn,entityId:Le,values:T,previousValues:le,collection:mn,status:v,dataSource:h,context:w,onSaveSuccess:z=>ne(z,he),onSaveFailure:J,onPreSaveHookError:R,onSaveSuccessHookError:$}).then()},ie=async({collection:T,path:le,entityId:he,values:Le,previousValues:mn,closeAfterSave:vn,autoSave:z})=>{v&&(z?y(Le):x({collection:T,path:le,entityId:he,values:Le,previousValues:mn,closeAfterSave:vn}))},Y=C&&C.map((T,le)=>{if(O.current!==T.key)return null;const he=T.Builder;return he?n.jsx("div",{className:E(ue,"relative flex-grow w-full h-full overflow-auto "),role:"tabpanel",children:n.jsx(se,{children:K&&n.jsx(he,{collection:l,entity:W,modifiedValues:P??W?.values,formContext:K})})},`custom_view_${T.key}`):(console.error("customView.Builder is not defined"),null)}).filter(Boolean),Be=L&&!W||(!W||Q===void 0)&&(v==="existing"||v==="copy"),Oe=Be||A,Ue=F&&F.map((T,le)=>{const he=T.alias??T.path,Le=W?`${e}/${W?.id}/${be(he)}`:void 0;return O.current!==he?null:n.jsxs("div",{className:"relative flex-grow h-full overflow-auto w-full",role:"tabpanel",children:[Oe&&n.jsx(uo,{}),!Be&&(W&&Le?n.jsx(St,{fullPath:Le,parentPathSegments:Xe(e),isSubCollection:!0,...T}):n.jsx("div",{className:"flex items-center justify-center w-full h-full p-3",children:n.jsx(j,{variant:"label",children:"You need to save your entity before adding additional collections"})}))]},`subcol_${he}`)}).filter(Boolean),zn=f.useCallback(()=>{a(!1)},[]),Ao=T=>{O.current=T,b.replace({path:e,entityId:t,selectedSubPath:T===jo?void 0:T,updateUrl:!0,collection:l})},kn=f.useCallback(T=>{B.current=T},[]),Hn=f.useCallback(T=>{p.open({type:"error",message:"Error updating id, check the console"})},[]),_o=f.useCallback(T=>{V(le=>le?{...le,id:T}:void 0)},[]),rn=T=>{M||a(T)};function yo(){const T=w.plugins;let le=n.jsx(Pi,{status:v,path:e,collection:l,onEntitySaveRequested:ie,onDiscard:zn,onValuesChanged:kn,onModified:rn,entity:W,onIdChange:_o,onFormContextChange:m,hideId:l.hideIdFromForm,autoSave:M,onIdUpdateError:Hn});return T&&T.forEach(he=>{he.form?.provider&&(le=n.jsx(he.form.provider.Component,{status:v,path:e,collection:l,onDiscard:zn,onValuesChanged:kn,onModified:rn,entity:W,context:w,formContext:K,...he.form.provider.props,children:le}))}),n.jsx(se,{children:le})}const G=Q===void 0?n.jsx(n.Fragment,{}):Q?n.jsxs(n.Fragment,{children:[n.jsx(j,{className:"mt-16 mb-8 mx-8",variant:"h4",children:l.singularName??l.name}),n.jsx(yt,{className:"px-12",entity:W,path:e,collection:l})]}):yo(),_e=F&&F.map(T=>n.jsx(xo,{className:"text-sm min-w-[140px]",value:T.path,children:T.name},`entity_detail_collection_tab_${T.name}`)),ae=C&&C.map(T=>n.jsx(xo,{className:"text-sm min-w-[140px]",value:T.key,children:T.name},`entity_detail_collection_tab_${T.name}`));return n.jsx("div",{className:"flex flex-col h-full w-full transition-width duration-250 ease-in-out",children:n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:E(ue,"no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),children:[n.jsx("div",{className:"pb-1 self-center",children:n.jsx(ee,{onClick:()=>(u?.(),I.close(!1)),size:"large",children:n.jsx(pr,{})})}),n.jsx("div",{className:"flex-grow"}),Be&&n.jsx("div",{className:"self-center",children:n.jsx(Gn,{size:"small"})}),n.jsxs(ga,{value:O.current,onValueChange:T=>{Ao(T)},className:"pl-4 pr-4 pt-0",children:[n.jsx(xo,{disabled:!H,value:jo,className:`${H?"":"hidden"} text-sm min-w-[140px]`,children:l.singularName??l.name}),ae,_e]})]}),n.jsxs("div",{className:"flex-grow h-full flex overflow-auto flex-row w-full ",style:{},children:[n.jsx("div",{role:"tabpanel",hidden:!oe,id:`form_${e}`,className:" w-full",children:Be?n.jsx(uo,{}):G}),Y,Ue]})]})})}function aH(e){const{blocked:t,setBlocked:c,setBlockedNavigationMessage:i}=Uo(),l=Ae(),a=f.useMemo(()=>{if(!e)return;let d=e.collection;if(!d&&(d=l.getCollection(e.path,e.entityId),!d))throw console.error("ERROR: No collection found in path `",e.path,"`. Entity id: ",e.entityId),Error("ERROR: No collection found in path `"+e.path+"`. Make sure you have defined a collection for this path in the root navigation.");return d},[l,e]);f.useEffect(()=>{function d(u){t&&a&&(u.preventDefault(),u.returnValue=`You have unsaved changes in this ${a.name}. Are you sure you want to leave this page?`)}return typeof window<"u"&&window.addEventListener("beforeunload",d),()=>{typeof window<"u"&&window.removeEventListener("beforeunload",d)}},[t,a]);const s=f.useCallback(d=>{c(d),i(d?n.jsxs(n.Fragment,{children:[" You have unsaved changes in this ",n.jsx("b",{children:a?.singularName??a?.name}),"."]}):void 0)},[a?.name,c,i]);return!e||!a?n.jsx("div",{className:"w-full"}):n.jsx(n.Fragment,{children:n.jsx(se,{children:n.jsx(iH,{...e,formWidth:e.width,collection:a,onValuesAreModified:s})})})}const da="new";function lH(e,t){if(t)return tH;const c=!e.selectedSubPath,i=typeof e.width=="number"?`${e.width}px`:e.width;return c?i??sa:`calc(${cH} + ${i??sa})`}const sH=(e,t)=>{const c=Ie.useLocation(),i=f.useRef(!1),l=!Ge();f.useEffect(()=>{if(!e.loading&&!i.current){if(e.isUrlCollectionPath(c.pathname)){const u=c.hash===`#${da}`,A=e.urlPathToDataPath(c.pathname),_=dH(A,e.collections,u);t.replace(_.map(g=>Nt(g,e,l)))}i.current=!0}},[c,e,t,l]);const a=f.useCallback(()=>{t.close()},[t]),s=f.useCallback(u=>{if(u.copy&&!u.entityId)throw Error("If you want to copy an entity you need to provide an entityId");const A=$r(u.collection?u.collection.defaultSelectedView:void 0,{status:u.copy?"copy":u.entityId?"existing":"new",entityId:u.entityId});t.open(Nt({selectedSubPath:A,...u},e,l))},[t,e,l]),d=f.useCallback(u=>{if(u.copy&&!u.entityId)throw Error("If you want to copy an entity you need to provide an entityId");t.replace(Nt(u,e,l))},[e,t,l]);return{close:a,open:s,replace:d}};function dH(e,t,c){const i=cr({path:e,collections:t}),l=[];let a="";for(let s=0;s<i.length;s++){const d=i[s];if(d.type==="collection"&&(a=d.path),s>0){const u=i[s-1];if(d.type==="entity")l.push({path:d.path,entityId:d.entityId,copy:!1});else if(d.type==="custom_view"){if(u.type==="entity"){const A=l[l.length-1];A&&(A.selectedSubPath=d.view.key)}}else if(d.type==="collection"&&u.type==="entity"){const A=l[l.length-1];A&&(A.selectedSubPath=d.collection.alias??d.collection.path)}}}return c&&l.push({path:a,copy:!1}),l}const Nt=(e,t,c)=>{const i=be(e.path),l=e.entityId?t.buildUrlCollectionPath(`${i}/${e.entityId}/${e.selectedSubPath||""}`):t.buildUrlCollectionPath(`${i}#${da}`);return{key:`${e.path}/${e.entityId}`,component:n.jsx(aH,{...e}),urlPath:l,parentUrlPath:t.buildUrlCollectionPath(i),width:lH(e,c),onClose:e.onClose}};function ua(e){const{path:t,collections:c=[],currentFullPath:i}=e,l=be(t).split("/"),a=bo(l),s=[];for(let d=0;d<a.length;d++){const u=a[d],A=c&&c.find(_=>_.alias===u||_.path===u);if(A){const _=A.alias??A.path,g=i&&i.length>0?i+"/"+_:_,y=be(be(t).replace(u,"")),h=y.length>0?y.split("/"):[];if(h.length>0){const I=h[0],b=g+"/"+I;if(s.push(new Je(I,g)),h.length>1){const p=h.slice(1).join("/");if(!A)throw Error("collection not found resolving path: "+A);A.subcollections&&s.push(...ua({path:p,collections:A.subcollections,currentFullPath:b}))}}break}}return s}function uH({basePath:e,baseCollectionPath:t,authController:c,collections:i,views:l,userConfigPersistence:a,plugins:s,dataSource:d}){const u=Ie.useLocation(),[A,_]=f.useState(),[g,y]=f.useState(),[h,I]=f.useState(!1),[b,p]=f.useState(void 0),[w,k]=f.useState(!0),[K,m]=f.useState(void 0),v=be(e),S=be(t),B=v?`/${v}`:"/",P=v?`/${v}/${S}`:`/${S}`,F=f.useCallback(V=>v?`/${v}/${qo(V)}`:`/${qo(V)}`,[v]),D=f.useCallback(V=>`${be(t)}/${qo(V)}`,[t]),C=f.useCallback((V,Q)=>{const q=[...(V??[]).map($=>$.hideFromNavigation?void 0:{url:D($.alias??$.path),type:"collection",name:$.name.trim(),path:$.alias??$.path,collection:$,description:$.description?.trim(),group:$.group?.trim()}).filter(Boolean),...(Q??[]).map($=>$.hideFromNavigation?void 0:{url:F(Array.isArray($.path)?$.path[0]:$.path),name:$.name.trim(),type:"view",view:$,description:$.description?.trim(),group:$.group?.trim()}).filter(Boolean)],R=Object.values(q).map($=>$.group).filter(Boolean).filter(($,ne,J)=>J.indexOf($)===ne);return{navigationEntries:q,groups:R}},[F,D]),N=f.useCallback(async()=>{if(!c.initialLoading){try{const[V=[],Q=[]]=await Promise.all([fH(i,c,d,s),AH(l,c,d)]);_(V),y(Q),p(C(V??[],Q))}catch(V){console.error(V),m(V)}k(!1),I(!0)}},[i,c.user,c.initialLoading,d,s,l,C]);f.useEffect(()=>{N()},[N]);const M=f.useCallback((V,Q,q=!1)=>{if(!A)return;const R=Io(be(V),A),$=q?a?.getCollectionConfig(V):void 0,ne=R?Ze(R,$):void 0;let J=ne;if(ne){const x=ne.subcollections,ie=ne.callbacks,Y=ne.permissions;J={...J,subcollections:J?.subcollections??x,callbacks:J?.callbacks??ie,permissions:J?.permissions??Y}}if(J)return{...ne,...J}},[e,t,A]),H=f.useCallback(V=>{let Q=A;if(!Q)throw Error("Collections have not been initialised yet");for(let q=0;q<V.length;q++){const R=V[q],$=Q.find(ne=>ne.alias===R||ne.path===R);if(!$)return;if(Q=$.subcollections,q===V.length-1)return $}},[A]),Z=f.useCallback(V=>be(V+"/").startsWith(be(P)+"/"),[P]),O=f.useCallback(V=>{if(V.startsWith(P))return V.replace(P,"");throw Error("Expected path starting with "+P)},[P]),oe=f.useCallback(({path:V})=>`s/edit/${qo(V)}`,[]),U=f.useCallback(V=>{if(!A)throw Error("Collections have not been initialised yet");return tr(V,A)},[A]),L=u.state,X=L&&L.base_location?L.base_location:u,W=f.useCallback(V=>ua({path:V,collections:A}),[A]);return f.useMemo(()=>({collections:A??[],views:g??[],loading:!h||w,navigationLoadingError:K,homeUrl:B,basePath:e,baseCollectionPath:t,initialised:h,getCollection:M,getCollectionFromPaths:H,isUrlCollectionPath:Z,urlPathToDataPath:O,buildUrlCollectionPath:D,buildUrlEditCollectionPath:oe,buildCMSUrlPath:F,resolveAliasesFrom:U,topLevelNavigation:b,baseLocation:X,refreshNavigation:N,getParentReferencesFromPath:W}),[t,X,e,F,D,oe,A,W,M,H,B,h,Z,w,K,N,U,b,O,g])}function qo(e){return encodeURIComponent(be(e)).replaceAll("%2F","/").replaceAll("%23","#")}function fa(e,t){return e.filter(c=>c.permissions?so(c,t,[c.path],null).read!==!1:!0).map(c=>c.subcollections?{...c,subcollections:fa(c.subcollections,t)}:c)}async function fH(e,t,c,i){let l=[];return typeof e=="function"?l=await e({user:t.user,authController:t,dataSource:c}):Array.isArray(e)&&(l=e),l=fa(l,t),i&&i.forEach(a=>{a.collections?.injectCollections&&(l=a.collections?.injectCollections(l??[]))}),l}async function AH(e,t,c){let i=[];return typeof e=="function"?i=await e({user:t.user,authController:t,dataSource:c}):Array.isArray(e)&&(i=e),i}function _H(){const e=Ie.useLocation(),t=Ie.useNavigate(),[c,i]=f.useState([]),l=f.useRef(c),a=f.useRef({}),s=f.useRef(0),d=g=>{l.current=g,i(g)};f.useEffect(()=>{const h=(e.state?.panels??[]).map(I=>a.current[I]).filter(I=>!!I);de(l.current.map(I=>I.key),h.map(I=>I.key))||d(h)},[e]);const u=f.useCallback(()=>{if(c.length===0)return;const g=c[c.length-1],y=[...c.slice(0,-1)];if(d(y),s.current>0)g.urlPath&&t(-1),s.current--;else if(g.parentUrlPath){const h=e.state?.base_location??e;t(g.parentUrlPath,{replace:!0,state:{base_location:h,panels:y.map(I=>I.key)}})}},[c,t,e]),A=f.useCallback(g=>{const y=Array.isArray(g)?g:[g];y.forEach(b=>{a.current[b.key]=b}),s.current=s.current+y.length;const h=e.state?.base_location??e,I=[...c,...y];d(I),y.forEach(b=>{b.urlPath&&t(b.urlPath,{state:{base_location:h,panels:I.map(p=>p.key)}})})},[e,t,c]),_=f.useCallback(g=>{const y=Array.isArray(g)?g:[g];y.forEach(b=>{a.current[b.key]=b});const h=e.state?.base_location??e,I=[...c.slice(0,-y.length),...y];d(I),y.forEach(b=>{b.urlPath&&t(b.urlPath,{replace:!0,state:{base_location:h,panels:I.map(p=>p.key)}})})},[e,t,c]);return{sidePanels:c,close:u,open:A,replace:_}}function yH(e){f.useEffect(()=>{if(!e)return;const t=Ut[e];t&&(Ro.registerLocale(e,t),Ro.setDefaultLocale(e))},[e])}const hH="/",gH="/c";function IH(e){const t=ur(),{children:c,collections:i,views:l,entityLinkBuilder:a,userConfigPersistence:s,dateTimeFormat:d,locale:u,authController:A,storageSource:_,dataSource:g,basePath:y=hH,baseCollectionPath:h=gH,plugins:I,onAnalyticsEvent:b,fields:p}=e;yH(u);const w=uH({basePath:y,baseCollectionPath:h,authController:A,collections:i,views:l,userConfigPersistence:s,dataSource:g,plugins:I}),k=_H(),K=sH(w,k),m=A.initialLoading||w.loading||(I?.some(S=>S.loading)??!1);if(w.navigationLoadingError)return n.jsx(Lt,{maxWidth:"md",fullScreen:!0,children:n.jsx(pe,{title:"Error loading navigation",error:w.navigationLoadingError})});if(A.authError)return n.jsx(Lt,{maxWidth:"md",fullScreen:!0,children:n.jsx(pe,{title:"Error loading auth",error:A.authError})});const v={entityLinkBuilder:a,dateTimeFormat:d,locale:u,plugins:I,onAnalyticsEvent:b,fields:p??{}};return n.jsx(rr.Provider,{value:t,children:n.jsx(ar.Provider,{value:v,children:n.jsx(Rt.Provider,{value:s,children:n.jsx(xt.Provider,{value:_,children:n.jsx(qt.Provider,{value:g,children:n.jsx(ir.Provider,{value:A,children:n.jsx(Zt.Provider,{value:k,children:n.jsx(Xt.Provider,{value:K,children:n.jsx(Jt.Provider,{value:w,children:n.jsx(Va,{children:n.jsx(bH,{loading:m,children:c})})})})})})})})})})})}function bH({loading:e,children:t}){const c=re();let i=t({context:c,loading:e});const l=c.plugins;return!e&&l&&l.forEach(a=>{a.provider&&(i=n.jsx(a.provider.Component,{...a.provider.props,context:c,children:i}))}),n.jsx(n.Fragment,{children:i})}function Aa({hovered:e,drawerOpen:t,closeDrawer:c}){const i=re(),l=Ae(),a=e&&!t,s=Ge();if(!l.topLevelNavigation)throw Error("Navigation not ready in Drawer");const{navigationEntries:d,groups:u}=l.topLevelNavigation,A=Object.values(d).filter(y=>!y.group),_=f.useCallback(y=>t?n.jsx("div",{className:"pt-8 pl-6 pr-8 pb-2 flex flex-row items-center",children:n.jsx(j,{variant:"caption",color:"secondary",className:"font-medium flex-grow",children:y?y.toUpperCase():"Views".toUpperCase()})}):n.jsx("div",{className:"h-4"}),[t]),g=y=>{const h=y.type==="collection"?"drawer_navigate_to_collection":y.type==="view"?"drawer_navigate_to_view":"unmapped_event";i.onAnalyticsEvent?.(h,{url:y.url}),s||c()};return n.jsxs("div",{className:"flex-grow overflow-scroll no-scrollbar",children:[u.map(y=>n.jsxs(f.Fragment,{children:[_(y),Object.values(d).filter(h=>h.group===y).map((h,I)=>n.jsx(Mt,{icon:Wo(h.collection??h.view),tooltipsOpen:a,drawerOpen:t,onClick:()=>g(h),url:h.url,name:h.name},`navigation_${I}`))]},`drawer_group_${y}`)),A.length>0&&_(),A.map((y,h)=>n.jsx(Mt,{icon:Wo(y.collection??y.view),tooltipsOpen:a,onClick:()=>g(y),drawerOpen:t,url:y.url,name:y.name},`navigation_${h}`))]})}function Mt({name:e,icon:t,drawerOpen:c,tooltipsOpen:i,url:l,onClick:a}){const s=n.jsx("div",{className:"text-gray-600 dark:text-gray-500",children:t}),d=n.jsxs(Ie.NavLink,{onClick:a,className:({isActive:u})=>E("rounded-r-xl truncate","hover:bg-gray-200 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-gray-100","flex flex-row items-center w-full mr-8",c?"pl-8 h-12":"pl-6 h-11","font-medium text-sm",u?"bg-gray-100 dark:bg-gray-800":""),to:l,children:[s,n.jsx("div",{className:E(c?"opacity-100":"opacity-0 hidden","ml-4 font-inherit text-inherit"),children:e.toUpperCase()})]});return c?d:n.jsx(ye,{open:i,side:"right",title:e,children:d})}const pH=280,wH=f.memo(function(t){const{children:c,name:i,logo:l,includeDrawer:a=!0,autoOpenDrawer:s,Drawer:d=Aa,drawerProps:u,FireCMSAppBarComponent:A=aa,fireCMSAppBarComponentProps:_}=t,g=Ge(),y=Ae(),[h,I]=f.useState(!1),[b,p]=f.useState(!1),w=f.useCallback(()=>p(!0),[]),k=f.useCallback(()=>p(!1),[]),K=f.useCallback(()=>{I(!1)},[]),m=h||!!(g&&s&&b);return n.jsxs("div",{className:"flex h-screen w-screen bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-white overflow-hidden",style:{paddingTop:"env(safe-area-inset-top)",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)",paddingBottom:"env(safe-area-inset-bottom)",height:"100dvh"},children:[n.jsx(A,{title:i,includeDrawer:a,drawerOpen:m,..._}),n.jsx(mH,{displayed:a,onMouseEnter:w,onMouseMove:w,onMouseLeave:k,open:m,logo:l,hovered:b,setDrawerOpen:I,children:a&&(y.loading?n.jsx(uo,{}):n.jsx(d,{hovered:b,drawerOpen:m,closeDrawer:K,...u}))}),n.jsxs("main",{className:"flex flex-col flex-grow overflow-auto",children:[n.jsx(kH,{}),n.jsx("div",{className:E(ue,"flex-grow overflow-auto lg:m-0 lg:mx-4 lg:mb-4 lg:rounded-lg lg:border lg:border-solid m-0 mt-1"),children:n.jsx(se,{children:c})})]})]})},de),kH=()=>n.jsx("div",{className:"flex flex-col min-h-[68px]"});function mH(e){const t=Ae(),c=e.displayed?e.open?pH:72:0,i=n.jsxs("div",{className:"relative h-full no-scrollbar overflow-y-auto overflow-x-hidden",style:{width:c,transition:"left 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[!e.open&&e.displayed&&n.jsx(ye,{title:"Open menu",side:"right",sideOffset:12,className:"fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit",children:n.jsx(ee,{color:"inherit","aria-label":"Open menu",className:"sticky top-2 left-3 ",onClick:()=>e.setDrawerOpen(!0),size:"large",children:n.jsx(mr,{})})}),n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsx("div",{style:{transition:"padding 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",padding:e.open?"32px 96px 0px 24px":"72px 16px 0px"},className:E("cursor-pointer"),children:n.jsx(ye,{title:"Home",sideOffset:20,side:"right",children:n.jsx(Ie.Link,{to:t.basePath,children:e.logo?n.jsx("img",{src:e.logo,alt:"Logo",className:"max-w-full max-h-full"}):n.jsx(ia,{})})})}),e.children]})]});return Ge()?n.jsxs("div",{className:"relative",onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseLeave:e.onMouseLeave,style:{width:c,transition:"left 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[i,n.jsx("div",{className:`absolute right-0 top-4 ${e.open?"opacity-100":"opacity-0 invisible"} transition-opacity duration-1000 ease-in-out`,children:n.jsx(ee,{"aria-label":"Close drawer",onClick:()=>e.setDrawerOpen(!1),children:n.jsx(yc,{})})})]}):e.displayed?n.jsxs(n.Fragment,{children:[n.jsx(ee,{color:"inherit","aria-label":"Open drawer",onClick:()=>e.setDrawerOpen(!0),size:"large",className:"absolute top-2 left-6",children:n.jsx(mr,{})}),n.jsx(Vt,{side:"left",transparent:!0,open:e.open,onOpenChange:e.setDrawerOpen,children:i})]}):null}const vH=f.memo(function({HomePage:t=ta,customRoutes:c}){const i=Ie.useLocation(),l=Ae();if(!l)return n.jsx(n.Fragment,{});const a=i.state,s=a&&a.base_location?a.base_location:i,d=[];l.views&&l.views.forEach(y=>{Array.isArray(y.path)?d.push(...y.path.map(h=>_a(h,y))):d.push(_a(y.path,y))});const A=[...l.collections??[]].sort((y,h)=>h.path.length-y.path.length).map(y=>{const h=l.buildUrlCollectionPath(y.alias??y.path);return n.jsx(Ie.Route,{path:h+"/*",element:n.jsx(Jo,{path:h,title:y.name,type:"collection",children:n.jsx(St,{isSubCollection:!1,parentPathSegments:[],fullPath:y.alias??y.path,...y,Actions:Yo(y.Actions)},`collection_view_${y.alias??y.path}`)})},`navigation_${y.alias??y.path}`)}),_=n.jsx(Ie.Route,{path:"/",element:n.jsx(Jo,{path:l.homeUrl,title:"Home",type:"home",children:n.jsx(t,{})},"navigation_home")}),g=n.jsx(Ie.Route,{path:"*",element:n.jsx(ca,{})});return n.jsxs(Ie.Routes,{location:s,children:[A,d,_,g,c]})}),_a=(e,t)=>n.jsx(Ie.Route,{path:e,element:n.jsx(Jo,{path:e,title:t.name,type:"view",children:t.view},`navigation_${e}`)},"navigation_view_"+e),Jo=f.memo(function({children:t,title:c,path:i,type:l}){const a=fr();return f.useEffect(()=>{a.set({breadcrumbs:[{title:c,url:i}]})},[i,c]),n.jsx(n.Fragment,{children:t})},de);function KH(e){return e}function CH(e){return e}function SH(e){return e}function BH(e){return e}function EH(e){return e}function FH(e){return e}function PH(e){return e}function DH(e){return e}function NH(e){return e}function MH(){const e=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)"),c=(localStorage.getItem("prefers-dark-mode")!=null?localStorage.getItem("prefers-dark-mode")==="true":null)??e,[i,l]=f.useState(c?"dark":"light");f.useEffect(()=>{l(c?"dark":"light"),d(c?"dark":"light")},[c]);const a=f.useCallback(()=>{l("dark"),d("dark")},[e]),s=f.useCallback(()=>{l("light"),d("light")},[]),d=A=>{document.body.style.setProperty("color-scheme",A),document.documentElement.dataset.theme=A},u=f.useCallback(()=>{i==="light"?(e?localStorage.removeItem("prefers-dark-mode"):localStorage.setItem("prefers-dark-mode","true"),a()):(e?localStorage.setItem("prefers-dark-mode","false"):localStorage.removeItem("prefers-dark-mode"),s())},[i,e]);return{mode:i,setMode:l,toggleMode:u}}function TH(){const[e,t]=f.useState({}),c=f.useCallback(I=>{const b=localStorage.getItem(I);return b?JSON.parse(b):{}},[]),i=f.useCallback(I=>{const b=`collection_config::${jr(I)}`;return e[b]?e[b]:c(b)},[e,c]),l=f.useCallback((I,b)=>{const p=`collection_config::${jr(I)}`;localStorage.setItem(p,JSON.stringify(b)),t(w=>{const k=w[p],K=Ze(k??c(I),b);return Ze(w,K)})},[c]),[a,s]=f.useState([]),[d,u]=f.useState([]),[A,_]=f.useState([]);f.useEffect(()=>{s(localStorage.getItem("recently_visited_paths")?JSON.parse(localStorage.getItem("recently_visited_paths")):[]),u(localStorage.getItem("favourite_paths")?JSON.parse(localStorage.getItem("favourite_paths")):[]),_(localStorage.getItem("collapsed_groups")?JSON.parse(localStorage.getItem("collapsed_groups")):[])},[]);const g=f.useCallback(I=>{localStorage.setItem("recently_visited_paths",JSON.stringify(I)),s(I)},[]),y=f.useCallback(I=>{localStorage.setItem("favourite_paths",JSON.stringify(I)),u(I)},[]),h=f.useCallback(I=>{localStorage.setItem("collapsed_groups",JSON.stringify(I)),_(I)},[]);return{onCollectionModified:l,getCollectionConfig:i,recentlyVisitedPaths:a,setRecentlyVisitedPaths:g,favouritePaths:d,setFavouritePaths:y,collapsedGroups:A,setCollapsedGroups:h}}const OH=({children:e})=>n.jsx(Wt.SnackbarProvider,{maxSnack:3,autoHideDuration:3500,children:e}),LH=({ref:e})=>{const[t,c]=f.useState(!1),[i,l]=f.useState(!1);return f.useEffect(()=>{e.current&&(e.current.onfocus=()=>{c(!0),l(!0)},e.current.onblur=()=>{l(!1)})},[e]),{inputFocused:i,autoCompleteOpen:t,setAutoCompleteOpen:c}};function QH({children:e,open:t,setOpen:c}){const i=f.useRef(null);return Mo(i,()=>c(!1)),n.jsx(To,{in:t,duration:50,className:E("absolute top-full left-0 right-0 overflow-visible",t?"shadow":"","my-2","z-20","w-full"),children:n.jsx("div",{ref:i,className:E(t?He:"","bg-gray-50 dark:bg-gray-900 py-2"),children:e})})}function VH({children:e,onClick:t}){return n.jsx("div",{className:"flex w-full items-center pr-6 pl-14 h-[48px] cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800",onClick:t,children:e})}const WH=e=>{switch(e){case"error":return"bg-red-50 dark:bg-red-800 dark:text-red-100 text-red-900";case"warning":return"bg-amber-50 dark:bg-amber-800 dark:text-amber-100 text-amber-900";case"info":return"bg-blue-50 dark:bg-blue-800 dark:text-blue-100 text-blue-900";case"success":return"bg-emerald-50 dark:bg-emerald-800 dark:text-emerald-100 text-emerald-900";default:return"bg-blue-50 dark:bg-blue-800 dark:text-blue-100 text-blue-900"}},GH=({children:e,onDismiss:t,color:c="info",action:i,className:l,style:a})=>{const s=WH(c);return n.jsxs("div",{style:a,className:E("px-4 py-2 rounded-md flex items-center gap-2",s,l),children:[n.jsx("span",{className:"flex-grow",children:e}),t&&n.jsx("button",{className:"text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-400",onClick:t,children:"×"}),i]})},zH=({src:e,alt:t,children:c,className:i,...l},a)=>n.jsx("button",{ref:a,...l,className:E("rounded-full flex items-center justify-center overflow-hidden",ge,"p-1 hover:bg-gray-200 hover:dark:bg-gray-700",i),children:e?n.jsx("img",{className:"object-cover rounded-full w-10 h-10 bg-gray-100 dark:bg-gray-800",src:e,alt:t}):n.jsx("span",{className:"py-1.5 text-lg font-medium text-gray-900 dark:text-white rounded-full w-10 h-10 bg-gray-100 dark:bg-gray-800",children:c})}),Tt=f.forwardRef(zH);function ya({children:e,style:t,onClick:c,className:i}){const l=f.useCallback(a=>{(a.key==="Enter"||a.key===" ")&&c?.()},[c]);return n.jsx("div",{onKeyPress:l,role:c?"button":void 0,tabIndex:c?0:void 0,onClick:c,className:E(cc,c&&ge,c&&ic,i),style:t,children:e})}const HH={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},UH=({children:e,className:t,style:c,maxWidth:i="7xl"},l)=>{const a=i?HH[i]:"";return n.jsx("div",{ref:l,className:E("mx-auto px-3 md:px-4 lg-px-6",a,t),style:c,children:e})},Ot=f.forwardRef(UH);function Lt({children:e,maxWidth:t,fullScreen:c=!1,className:i}){return n.jsx("div",{className:"flex flex-col flex-grow h-full",children:n.jsx(Ot,{className:E("m-auto",i),maxWidth:t,children:e})})}function Gn({size:e="medium",className:t}){let c="";e==="small"?c="w-4 h-4 m-1":e==="medium"?c="w-8 h-8 m-1":c="w-10 h-10 m-1";let i="";return e==="small"?i="border-[3px]":e==="medium"?i="border-4":i="border-[6px]",n.jsx("div",{className:E(c,i,"inline-block animate-spin rounded-full border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]","text-blue-600 dark:text-blue-400",t),role:"status",children:n.jsx("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})}const YH={xs:"max-w-xs min-w-xs w-xs",sm:"max-w-sm min-w-sm w-sm",md:"max-w-md min-w-md w-md",lg:"max-w-lg min-w-lg w-lg",xl:"max-w-xl min-w-xl w-xl","2xl":"max-w-2xl min-w-2xl w-2xl","3xl":"max-w-3xl min-w-3xl w-3xl","4xl":"max-w-4xl min-w-4xl w-4xl","5xl":"max-w-5xl min-w-5xl w-5xl","6xl":"max-w-6xl min-w-6xl w-6xl","7xl":"max-w-7xl min-w-7xl w-7xl",full:"max-w-full min-w-full w-full"},Zo=({open:e,onOpenChange:t,children:c,className:i,fullWidth:l=!0,fullHeight:a,fullScreen:s,scrollable:d=!0,maxWidth:u="lg"})=>{const[A,_]=f.useState(!1);return f.useEffect(()=>{if(e)return _(!0),()=>{};{const g=setTimeout(()=>{_(!1)},250);return()=>clearTimeout(g)}},[e]),n.jsx($e.Root,{open:A||e,onOpenChange:t,children:n.jsx($e.Portal,{children:n.jsxs("div",{className:"fixed inset-0 z-40",children:[n.jsx($e.Overlay,{className:E("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 bg-black bg-opacity-50 dark:bg-opacity-60 backdrop-blur-sm ",A&&e?"opacity-100":"opacity-0","z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center"),style:{pointerEvents:A?"auto":"none"}}),n.jsx($e.Content,{className:E("h-full outline-none flex justify-center items-center z-50 opacity-100 transition-all duration-200 ease-in-out"),children:n.jsx("div",{className:E(He,"z-30","relative","outline-none focus:outline-none",l&&!s?"w-11/12":void 0,a&&!s?"h-full":void 0,"text-gray-900 dark:text-white","justify-center items-center",s?"h-screen w-screen":"max-h-[90vh] shadow-xl","ease-in-out duration-200",d&&"overflow-y-auto",A&&e?"opacity-100":"opacity-0",u&&!s?YH[u]:void 0,i),children:c})})]})})})};function wn({children:e,position:t="sticky",translucent:c=!0,className:i}){return n.jsx("div",{className:E(ue,"py-3 px-4 border-t flex flex-row items-center justify-end bottom-0 right-0 left-0 text-right z-2 gap-2",t,"bg-white bg-opacity-60 dark:bg-gray-900 dark:bg-opacity-60",c?"backdrop-blur-sm":"",i),children:e})}function Xo({children:e,className:t,fullHeight:c}){return c?n.jsx("div",{className:"flex-grow flex flex-col h-full relative",children:e}):n.jsx("div",{className:E("py-6 px-6 h-full flex-grow",t),children:e})}function $H({accept:e,onFilesAdded:t,onFilesRejected:c,maxSize:i,disabled:l,maxFiles:a,title:s,uploadDescription:d="Drag and drop a file here or click",children:u,preventDropOnDocument:A=!0,size:_}){const{getRootProps:g,getInputProps:y,isDragActive:h,isDragAccept:I,isDragReject:b}=er.useDropzone({accept:e,noDragEventsBubbling:!0,maxSize:i,onDrop:t,onDropRejected:c,disabled:l,maxFiles:a,preventDropOnDocument:A});return n.jsxs("div",{...g(),className:E(qe,ze,ge,"flex gap-2","p-4 box-border relative items-center border-2 border-solid border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",{"h-44":_==="medium","h-28":_==="small","cursor-pointer":!l,"hover:bg-field-hover dark:hover:bg-field-hover-dark":!h,"transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-red-500":b,"transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-green-500":I}),children:[n.jsx(j,{variant:"caption",color:"secondary",className:"absolute top-2 left-3.5 cursor-inherit",children:s}),n.jsx("input",{...y()}),u,n.jsx("div",{className:"flex-grow h-28 box-border flex flex-col items-center justify-center text-center",children:n.jsx(j,{align:"center",variant:"label",children:d})})]})}function ha({children:e,loading:t,disabled:c,onClick:i,startIcon:l,...a}){return n.jsxs(te,{disabled:t||c,onClick:i,component:a.component,...a,children:[t&&n.jsx(Gn,{size:"small"}),!t&&l,e]})}function jH({children:e,style:t,className:c}){return n.jsx("div",{className:E(He,c),style:t,children:e})}function xe({inputRef:e,open:t,name:c,id:i,onOpenChange:l,value:a,onChange:s,onValueChange:d,onMultiValueChange:u,className:A,inputClassName:_,placeholder:g,renderValue:y,renderValues:h,label:I,size:b="medium",includeFocusOutline:p=!0,error:w,disabled:k,padding:K=!0,position:m="item-aligned",endAdornment:v,multiple:S,invisible:B,children:P,...F}){const[D,C]=f.useState(!1);f.useEffect(()=>{C(t??!1)},[t]);const N=f.useCallback(M=>{S?Array.isArray(a)&&a.includes(M)?u?.(a.filter(H=>H!==M)):u?.([...a??[],M]):d?.(M),!S&&s&&s({target:{name:c,value:M}})},[S,s,a,u,d]);return n.jsxs(je.Root,{name:c,value:Array.isArray(a)?void 0:a,defaultOpen:t,open:D,disabled:k,onValueChange:N,onOpenChange:M=>{l?.(M),C(M)},...F,children:[typeof I=="string"?n.jsx(di,{error:w,children:I}):I,n.jsxs("div",{className:E(b==="small"?"min-h-[42px]":"min-h-[64px]","select-none rounded-md text-sm",B?yr:qe,k?en:ze,"relative flex items-center",A),children:[n.jsxs(je.Trigger,{ref:e,id:i,className:E("w-full h-full",b==="small"?"h-[42px]":"h-[64px]",K?"px-4 ":"","outlin e-none focus:outline-none","select-none rounded-md text-sm",w?"text-red-500 dark:text-red-600":"focus:text-text-primary dark:focus:text-text-primary-dark",w?"border border-red-500 dark:border-red-600":"",k?"text-gray-600 dark:text-gray-400":"text-gray-800 dark:text-gray-200","relative flex items-center",p?ge:"",_),children:[n.jsx(je.Value,{asChild:!0,children:n.jsxs("div",{className:E("flex-grow w-full max-w-full flex flex-row gap-2 items-center","overflow-visible",b==="small"?"h-[42px]":"h-[64px]"),children:[y&&(a&&Array.isArray(a)?a.map((M,H)=>n.jsx("div",{className:"flex items-center gap-1 max-w-full",children:y?y(M,H):M},M)):typeof a=="string"?y?y(a,0):a:g),h&&(!a||Array.isArray(a))?h(a??[]):null,!y&&!h&&a]})}),n.jsx(je.Icon,{className:E("px-2 h-full flex items-center"),children:n.jsx(eo,{size:"small",className:E("transition",t?"rotate-180":"")})})]}),v&&n.jsx("div",{className:E("absolute h-full flex items-center",b==="small"?"right-10":"right-14"),onClick:M=>M.stopPropagation(),children:v})]}),n.jsx(je.Portal,{children:n.jsx(je.Content,{position:m,className:"z-50 overflow-hidden relative border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-800 p-2 rounded-lg shadow-lg",children:n.jsx(je.Viewport,{children:P})})})]})}function Re({value:e,children:t,disabled:c,className:i}){return n.jsxs(je.Item,{value:e,disabled:c,onClick:l=>{l.preventDefault(),l.stopPropagation()},className:E("w-full","relative relative flex items-center p-2 rounded-md text-sm text-gray-700 dark:text-gray-300",ge,"focus:z-10","data-[state=checked]:bg-gray-100 data-[state=checked]:dark:bg-gray-900 focus:bg-gray-100 dark:focus:bg-gray-950","data-[state=checked]:focus:bg-gray-200 data-[state=checked]:dark:focus:bg-gray-950",c?"opacity-50 cursor-not-allowed":"cursor-pointer","[&>*]:w-full","overflow-visible",i),children:[n.jsx(je.ItemText,{children:t}),n.jsx("div",{className:"absolute left-1 data-[state=checked]:block hidden",children:n.jsx(_c,{size:16})})]},e)}function qH({label:e,children:t,className:c}){return n.jsxs(n.Fragment,{children:[n.jsx(je.Group,{className:E("text-xs text-gray-900 dark:text-gray-100 uppercase tracking-wider font-bold mt-6 first:mt-2","px-2 py-2",c),children:e}),t]})}function Qt({onTextSearch:e,placeholder:t="Search",expandable:c=!1,large:i=!1,className:l,autoFocus:a}){const[s,d]=f.useState(""),[u,A]=f.useState(!1),_=f.useDeferredValue(s);f.useEffect(()=>{e(_||void 0)},[_]);const g=f.useCallback(()=>{d(""),e(void 0)},[]);return n.jsxs("div",{className:E("relative",i?"h-14":"h-[42px]","bg-gray-50 dark:bg-gray-800 transition duration-150 ease-in-out border",ue,"rounded"),children:[n.jsx("div",{className:"absolute p-0 px-4 h-full absolute pointer-events-none flex items-center justify-center top-0",children:n.jsx(sc,{className:"text-gray-500"})}),n.jsx("input",{placeholder:t,value:s,onChange:y=>{d(y.target.value)},autoFocus:a,onFocus:()=>A(!0),onBlur:()=>A(!1),className:E("relative flex items-center rounded transition-all bg-transparent outline-none appearance-none border-none","pl-12 h-full text-current ",c?u?"w-[220px]":"w-[180px]":"",ge,l)}),s?n.jsx(ee,{className:`${i?"mr-2 top-1":"mr-1 top-0"} absolute right-0 z-10`,onClick:g,children:n.jsx(an,{size:"small"})}):n.jsx("div",{style:{width:26}})]})}const Vt=({children:e,side:t="right",open:c,onOpenChange:i,transparent:l,...a})=>{const[s,d]=f.useState(!1);f.useEffect(()=>{if(c)return d(!0),()=>{};{const A=setTimeout(()=>{d(!1)},250);return()=>clearTimeout(A)}},[c]);const u={top:"-translate-y-full",bottom:"translate-y-full",left:"-translate-x-full",right:"translate-x-full"};return n.jsx($e.Root,{open:s||c,onOpenChange:i,children:n.jsxs($e.Portal,{children:[n.jsx($e.Overlay,{className:E("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 backdrop-blur-sm",l?"bg-white bg-opacity-80":"bg-black bg-opacity-50","dark:bg-black dark:bg-opacity-60",s&&c?"opacity-100":"opacity-0"),style:{pointerEvents:s?"auto":"none"}}),n.jsx($e.Content,{...a,className:E("text-gray-900 dark:text-white","fixed transform z-20 transition-all duration-[240ms] ease-in-out","outline-none focus:outline-none",l?"":"shadow-md",t==="top"||t==="bottom"?"w-full":"h-full",t==="left"||t==="top"?"left-0 top-0":"right-0 bottom-0",s&&c?"opacity-100":"opacity-0",!s||!c?u[t]:""),children:e})]})})};function JH(){return n.jsxs("div",{role:"status",children:[n.jsxs("svg",{"aria-hidden":"true",className:"w-8 h-8 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-primary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),n.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),n.jsx("span",{className:"sr-only",children:"Loading..."})]})}function An({value:e,onChange:t,label:c,type:i="text",multiline:l=!1,invisible:a,rows:s,disabled:d,error:u,endAdornment:A,autoFocus:_,placeholder:g,size:y="medium",className:h,style:I,inputClassName:b,inputStyle:p,inputRef:w,...k}){const K=w??f.useRef(null),[m,v]=f.useState(document.activeElement===K.current),S=e!=null&&e!=="",B=f.useCallback(F=>{F.target.blur(),F.stopPropagation(),setTimeout(()=>{F.target.focus()},0)},[]),P=l?n.jsx(gt,{...k,ref:K,placeholder:g,autoFocus:_,rows:s,value:e??"",onChange:t,style:p,className:E(a?Ar:ge,"rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-[28px]",d&&"border border-transparent outline-none opacity-50 text-gray-600 dark:text-gray-500")}):n.jsx("input",{...k,ref:K,onWheel:i==="number"?B:void 0,disabled:d,style:p,className:E("w-full outline-none bg-transparent leading-normal px-3","rounded-md",a?Ar:ge,d?en:ze,y==="small"?"min-h-[48px]":"min-h-[64px]",c?y==="medium"?"pt-[28px] pb-2":"pt-4 pb-2":"py-2",m?"text-text-primary dark:text-text-primary-dark":"",A?"pr-10":"pr-3",b,d&&"border border-transparent outline-none opacity-50 dark:opacity-50 text-gray-800 dark:text-gray-200"),placeholder:g,autoFocus:_,onFocus:()=>v(!0),onBlur:()=>v(!1),type:i,value:Number.isNaN(e)?"":e??"",onChange:t});return n.jsxs("div",{className:E("rounded-md relative max-w-full",a?yr:qe,d?en:ze,u?"border border-red-500 dark:border-red-600":"",{"min-h-[48px]":!a&&y==="small","min-h-[64px]":!a&&y==="medium"},h),style:I,children:[c&&n.jsx(mt,{className:E("pointer-events-none absolute",y==="medium"?"top-1":"-top-1",u?"text-red-500 dark:text-red-600":m?"text-primary":"text-text-secondary dark:text-text-secondary-dark",d?"opacity-50":""),shrink:S||m,children:c}),P,A&&n.jsx("div",{className:"flex absolute right-0 top-3 mr-3 ",children:A})]})}function ga({value:e,onValueChange:t,className:c,children:i}){return n.jsx(or.Root,{value:e,onValueChange:t,children:n.jsx(or.List,{className:E("flex text-sm font-medium text-center text-gray-800 dark:text-gray-200",c),children:i})})}function xo({value:e,className:t,children:c,disabled:i}){return n.jsx(or.Trigger,{value:e,disabled:i,className:E(ge,"border-b-2 border-transparent","data-[state=active]:border-secondary",i?"text-gray-400 dark:text-gray-500":E("text-gray-700 dark:text-gray-300","data-[state=active]:text-gray-900 data-[state=active]:dark:text-gray-100","hover:text-gray-800 dark:hover:text-gray-200"),t),children:n.jsx("div",{className:E("uppercase inline-block p-2 px-4 m-2 rounded","hover:bg-gray-100 dark:hover:bg-gray-800"),children:c})})}const ZH=({children:e,className:t,style:c})=>n.jsx("table",{className:E("w-full text-left text-gray-800 dark:text-gray-200 rounded-md overflow-x-auto",t),style:c,children:e}),XH=({children:e,className:t})=>n.jsx("tbody",{className:E("bg-white text-sm dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700",t),children:e}),xH=({children:e,className:t})=>n.jsx("thead",{children:n.jsx("tr",{className:E(ue,"text-sm font-medium text-gray-700 dark:text-gray-300","bg-gray-50 border-b dark:bg-gray-900",t),children:e})}),RH=({children:e,className:t,onClick:c,style:i})=>n.jsx("tr",{onClick:c,style:i,className:E("divide-gray-100 dark:divide-gray-800","bg-white dark:bg-gray-950",c?"hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer":"",t),children:e}),eU=({children:e,header:t=!1,scope:c="",align:i,className:l,style:a,colspan:s})=>{const d=f.useRef(null),u=t||nU(d.current)==="TableHeader"?"th":"td";return n.jsx(u,{scope:c,colSpan:s,ref:d,style:a,className:E("px-4 py-3 text-clip ",i==="center"?"text-center":i==="right"?"text-right":"text-left",l),children:e})};function nU(e){if(e){const t=Object.keys(e).find(a=>a.startsWith("__reactFiber$")||a.startsWith("__reactInternalInstance$")),c=e[t],i=a=>{let s=a.return;for(;typeof s.type=="string";)s=s.return;return s};let l=i(c);return l=i(l),l?.elementType?.name}}o.AbcIcon=ts,o.AcUnitIcon=cs,o.AccessAlarmIcon=is,o.AccessAlarmsIcon=as,o.AccessTimeFilledIcon=ss,o.AccessTimeIcon=ls,o.AccessibilityIcon=ds,o.AccessibilityNewIcon=us,o.AccessibleForwardIcon=As,o.AccessibleIcon=fs,o.AccountBalanceIcon=_s,o.AccountBalanceWalletIcon=ys,o.AccountBoxIcon=hs,o.AccountCircleIcon=gs,o.AccountTreeIcon=Is,o.AdUnitsIcon=bs,o.AdbIcon=ps,o.AddAPhotoIcon=ws,o.AddAlarmIcon=ks,o.AddAlertIcon=ms,o.AddBoxIcon=vs,o.AddBusinessIcon=Ks,o.AddCardIcon=Cs,o.AddChartIcon=Ss,o.AddCircleIcon=Bs,o.AddCircleOutlineIcon=Es,o.AddCommentIcon=Fs,o.AddHomeIcon=Ps,o.AddHomeWorkIcon=Ds,o.AddIcCallIcon=Ns,o.AddIcon=hn,o.AddLinkIcon=dc,o.AddLocationAltIcon=Ts,o.AddLocationIcon=Ms,o.AddModeratorIcon=Os,o.AddPhotoAlternateIcon=Ls,o.AddReactionIcon=Qs,o.AddRoadIcon=Vs,o.AddShoppingCartIcon=Ws,o.AddTaskIcon=Gs,o.AddToDriveIcon=zs,o.AddToHomeScreenIcon=Hs,o.AddToPhotosIcon=Us,o.AddToQueueIcon=Ys,o.AdfScannerIcon=$s,o.AdjustIcon=js,o.AdminPanelSettingsIcon=qs,o.AdsClickIcon=Js,o.AgricultureIcon=Zs,o.AirIcon=Xs,o.AirlineSeatFlatAngledIcon=Rs,o.AirlineSeatFlatIcon=xs,o.AirlineSeatIndividualSuiteIcon=ed,o.AirlineSeatLegroomExtraIcon=nd,o.AirlineSeatLegroomNormalIcon=od,o.AirlineSeatLegroomReducedIcon=rd,o.AirlineSeatReclineExtraIcon=td,o.AirlineSeatReclineNormalIcon=cd,o.AirlineStopsIcon=id,o.AirlinesIcon=ad,o.AirplaneTicketIcon=ld,o.AirplanemodeActiveIcon=sd,o.AirplanemodeInactiveIcon=dd,o.AirplayIcon=ud,o.AirportShuttleIcon=fd,o.AlarmAddIcon=_d,o.AlarmIcon=Ad,o.AlarmOffIcon=yd,o.AlarmOnIcon=hd,o.AlbumIcon=gd,o.Alert=GH,o.AlignHorizontalCenterIcon=Id,o.AlignHorizontalLeftIcon=bd,o.AlignHorizontalRightIcon=pd,o.AlignVerticalBottomIcon=wd,o.AlignVerticalCenterIcon=kd,o.AlignVerticalTopIcon=md,o.AllInboxIcon=vd,o.AllInclusiveIcon=Kd,o.AllOutIcon=Cd,o.AltRouteIcon=Sd,o.AlternateEmailIcon=Bd,o.AnalyticsIcon=Ed,o.AnchorIcon=Fd,o.AndroidIcon=Pd,o.AnimationIcon=Dd,o.AnnouncementIcon=Nd,o.AodIcon=Md,o.ApartmentIcon=Td,o.ApiIcon=Od,o.AppBlockingIcon=Ld,o.AppRegistrationIcon=Qd,o.AppSettingsAltIcon=Vd,o.AppShortcutIcon=Wd,o.ApprovalIcon=Gd,o.AppsIcon=zd,o.AppsOutageIcon=Hd,o.ArchitectureIcon=Ud,o.ArchiveIcon=Yd,o.AreaChartIcon=$d,o.ArrayContainer=Pt,o.ArrayContainerItem=Dt,o.ArrayCustomShapedFieldBinding=Bi,o.ArrayEnumPreview=Mr,o.ArrayItemOptions=la,o.ArrayOfMapsPreview=Jc,o.ArrayOfReferencesFieldBinding=fi,o.ArrayOfReferencesPreview=Xc,o.ArrayOfStorageComponentsPreview=xc,o.ArrayOfStringsPreview=Rc,o.ArrayOneOfPreview=ei,o.ArrayPropertyEnumPreview=Tr,o.ArrayPropertyPreview=Nr,o.ArrowBackIcon=jd,o.ArrowBackIosIcon=qd,o.ArrowBackIosNewIcon=Jd,o.ArrowCircleDownIcon=Zd,o.ArrowCircleLeftIcon=Xd,o.ArrowCircleRightIcon=xd,o.ArrowCircleUpIcon=Rd,o.ArrowDownwardIcon=eu,o.ArrowDropDownCircleIcon=nu,o.ArrowDropDownIcon=gr,o.ArrowDropUpIcon=ou,o.ArrowForwardIcon=uc,o.ArrowForwardIosIcon=ru,o.ArrowLeftIcon=tu,o.ArrowOutwardIcon=cu,o.ArrowRightAltIcon=au,o.ArrowRightIcon=iu,o.ArrowUpwardIcon=po,o.ArtTrackIcon=lu,o.ArticleIcon=su,o.AspectRatioIcon=du,o.AssessmentIcon=uu,o.AssignmentIcon=fc,o.AssignmentIndIcon=fu,o.AssignmentLateIcon=Au,o.AssignmentReturnIcon=_u,o.AssignmentReturnedIcon=yu,o.AssignmentTurnedInIcon=hu,o.AssistWalkerIcon=gu,o.AssistantDirectionIcon=bu,o.AssistantIcon=Iu,o.AssistantPhotoIcon=pu,o.AssuredWorkloadIcon=wu,o.AsyncPreviewComponent=VG,o.AtmIcon=ku,o.AttachEmailIcon=mu,o.AttachFileIcon=vu,o.AttachMoneyIcon=Ku,o.AttachmentIcon=Cu,o.AttractionsIcon=Su,o.AttributionIcon=Bu,o.AudioFileIcon=Eu,o.AudiotrackIcon=Fu,o.AuthControllerContext=ir,o.AutoAwesomeIcon=Pu,o.AutoAwesomeMosaicIcon=Du,o.AutoAwesomeMotionIcon=Nu,o.AutoDeleteIcon=Mu,o.AutoFixHighIcon=Tu,o.AutoFixNormalIcon=Ou,o.AutoFixOffIcon=Lu,o.AutoGraphIcon=Qu,o.AutoModeIcon=Vu,o.AutoStoriesIcon=Wu,o.Autocomplete=QH,o.AutocompleteItem=VH,o.AutofpsSelectIcon=Gu,o.AutorenewIcon=zu,o.AvTimerIcon=Hu,o.Avatar=Tt,o.BabyChangingStationIcon=Uu,o.BackHandIcon=Yu,o.BackpackIcon=$u,o.BackspaceIcon=ju,o.BackupIcon=qu,o.BackupTableIcon=Ju,o.BadgeIcon=Zu,o.BakeryDiningIcon=Xu,o.BalanceIcon=xu,o.BalconyIcon=Ru,o.BallotIcon=Ir,o.BarChartIcon=ef,o.BatchPredictionIcon=nf,o.BathroomIcon=of,o.BathtubIcon=rf,o.Battery0BarIcon=tf,o.Battery1BarIcon=cf,o.Battery2BarIcon=af,o.Battery3BarIcon=lf,o.Battery4BarIcon=sf,o.Battery5BarIcon=df,o.Battery6BarIcon=uf,o.BatteryAlertIcon=ff,o.BatteryChargingFullIcon=Af,o.BatteryFullIcon=_f,o.BatterySaverIcon=yf,o.BatteryStdIcon=hf,o.BatteryUnknownIcon=gf,o.BeachAccessIcon=If,o.BedIcon=bf,o.BedroomBabyIcon=pf,o.BedroomChildIcon=wf,o.BedroomParentIcon=kf,o.BedtimeIcon=mf,o.BedtimeOffIcon=vf,o.BeenhereIcon=Kf,o.BentoIcon=Cf,o.BikeScooterIcon=Sf,o.BiotechIcon=Bf,o.BlenderIcon=Ef,o.BlindIcon=Ff,o.BlindsClosedIcon=Df,o.BlindsIcon=Pf,o.BlockFieldBinding=Ci,o.BlockIcon=Nf,o.BloodtypeIcon=Mf,o.BluetoothAudioIcon=Of,o.BluetoothConnectedIcon=Lf,o.BluetoothDisabledIcon=Qf,o.BluetoothDriveIcon=Vf,o.BluetoothIcon=Tf,o.BluetoothSearchingIcon=Wf,o.BlurCircularIcon=Gf,o.BlurLinearIcon=zf,o.BlurOffIcon=Hf,o.BlurOnIcon=Uf,o.BoltIcon=Yf,o.BookIcon=$f,o.BookOnlineIcon=jf,o.BookmarkAddIcon=Jf,o.BookmarkAddedIcon=Zf,o.BookmarkBorderIcon=Xf,o.BookmarkIcon=qf,o.BookmarkRemoveIcon=xf,o.BookmarksIcon=Rf,o.BooleanPreview=ti,o.BooleanSwitch=ot,o.BooleanSwitchWithLabel=On,o.BorderAllIcon=eA,o.BorderBottomIcon=nA,o.BorderClearIcon=oA,o.BorderColorIcon=rA,o.BorderHorizontalIcon=tA,o.BorderInnerIcon=cA,o.BorderLeftIcon=iA,o.BorderOuterIcon=aA,o.BorderRightIcon=lA,o.BorderStyleIcon=sA,o.BorderTopIcon=dA,o.BorderVerticalIcon=uA,o.BoyIcon=fA,o.BrandingWatermarkIcon=AA,o.BreadcrumbUpdater=x3,o.BreakfastDiningIcon=_A,o.Brightness1Icon=yA,o.Brightness2Icon=hA,o.Brightness3Icon=gA,o.Brightness4Icon=IA,o.Brightness5Icon=bA,o.Brightness6Icon=pA,o.Brightness7Icon=wA,o.BrightnessAutoIcon=kA,o.BrightnessHighIcon=mA,o.BrightnessLowIcon=vA,o.BrightnessMediumIcon=KA,o.BroadcastOnHomeIcon=CA,o.BroadcastOnPersonalIcon=SA,o.BrokenImageIcon=BA,o.BrowseGalleryIcon=EA,o.BrowserNotSupportedIcon=FA,o.BrowserUpdatedIcon=PA,o.BrunchDiningIcon=DA,o.BrushIcon=NA,o.BubbleChartIcon=MA,o.BugReportIcon=TA,o.BuildCircleIcon=LA,o.BuildIcon=OA,o.BungalowIcon=QA,o.BurstModeIcon=VA,o.BusAlertIcon=WA,o.BusinessCenterIcon=zA,o.BusinessIcon=GA,o.Button=te,o.COLLECTION_PATH_SEPARATOR=ai,o.CabinIcon=HA,o.CableIcon=UA,o.CachedIcon=YA,o.CakeIcon=$A,o.CalculateIcon=jA,o.CalendarMonthIcon=Ac,o.CalendarTodayIcon=qA,o.CalendarViewDayIcon=JA,o.CalendarViewMonthIcon=ZA,o.CalendarViewWeekIcon=XA,o.CallEndIcon=RA,o.CallIcon=xA,o.CallMadeIcon=e_,o.CallMergeIcon=n_,o.CallMissedIcon=o_,o.CallMissedOutgoingIcon=r_,o.CallReceivedIcon=t_,o.CallSplitIcon=c_,o.CallToActionIcon=i_,o.CameraAltIcon=l_,o.CameraEnhanceIcon=s_,o.CameraFrontIcon=d_,o.CameraIcon=a_,o.CameraIndoorIcon=u_,o.CameraOutdoorIcon=f_,o.CameraRearIcon=A_,o.CameraRollIcon=__,o.CameraswitchIcon=y_,o.CampaignIcon=h_,o.CancelIcon=g_,o.CancelPresentationIcon=I_,o.CancelScheduleSendIcon=b_,o.CandlestickChartIcon=p_,o.CarCrashIcon=w_,o.CarRentalIcon=k_,o.CarRepairIcon=m_,o.Card=ya,o.CardGiftcardIcon=v_,o.CardMembershipIcon=K_,o.CardTravelIcon=C_,o.CarpenterIcon=S_,o.CasesIcon=B_,o.CasinoIcon=E_,o.CastConnectedIcon=P_,o.CastForEducationIcon=D_,o.CastIcon=F_,o.CastleIcon=N_,o.CatchingPokemonIcon=M_,o.CategoryIcon=T_,o.CelebrationIcon=O_,o.CellTowerIcon=L_,o.CellWifiIcon=Q_,o.CenterFocusStrongIcon=V_,o.CenterFocusWeakIcon=W_,o.CenteredView=Lt,o.ChairAltIcon=z_,o.ChairIcon=G_,o.ChaletIcon=H_,o.ChangeCircleIcon=U_,o.ChangeHistoryIcon=Y_,o.ChargingStationIcon=$_,o.ChatBubbleIcon=q_,o.ChatBubbleOutlineIcon=J_,o.ChatIcon=j_,o.CheckBoxIcon=Z_,o.CheckBoxOutlineBlankIcon=X_,o.CheckCircleIcon=x_,o.CheckCircleOutlineIcon=R_,o.CheckIcon=_c,o.Checkbox=Lr,o.ChecklistIcon=ey,o.ChecklistRtlIcon=ny,o.CheckroomIcon=oy,o.ChevronLeftIcon=yc,o.ChevronRightIcon=ry,o.ChildCareIcon=ty,o.ChildFriendlyIcon=cy,o.Chip=Ko,o.ChromeReaderModeIcon=iy,o.ChurchIcon=ay,o.CircleIcon=br,o.CircleNotificationsIcon=ly,o.CircularProgress=Gn,o.CircularProgressCenter=uo,o.ClassIcon=sy,o.CleanHandsIcon=dy,o.CleaningServicesIcon=uy,o.ClearAllIcon=fy,o.ClearIcon=an,o.CloseFullscreenIcon=Ay,o.CloseIcon=pr,o.ClosedCaptionDisabledIcon=yy,o.ClosedCaptionIcon=_y,o.ClosedCaptionOffIcon=hy,o.CloudCircleIcon=Iy,o.CloudDoneIcon=by,o.CloudDownloadIcon=py,o.CloudIcon=gy,o.CloudOffIcon=wy,o.CloudQueueIcon=ky,o.CloudSyncIcon=my,o.CloudUploadIcon=vy,o.Co2Icon=Ky,o.CoPresentIcon=Cy,o.CodeIcon=Sy,o.CodeOffIcon=By,o.CoffeeIcon=Ey,o.CoffeeMakerIcon=Fy,o.Collapse=To,o.CollectionsBookmarkIcon=Dy,o.CollectionsIcon=Py,o.ColorLensIcon=Ny,o.ColorizeIcon=My,o.CommentBankIcon=Oy,o.CommentIcon=Ty,o.CommentsDisabledIcon=Ly,o.CommitIcon=Qy,o.CommuteIcon=Vy,o.CompareArrowsIcon=Gy,o.CompareIcon=Wy,o.CompassCalibrationIcon=zy,o.CompostIcon=Hy,o.CompressIcon=Uy,o.ComputerIcon=Yy,o.ConfirmationNumberIcon=$y,o.ConnectWithoutContactIcon=jy,o.ConnectedTvIcon=qy,o.ConnectingAirportsIcon=Jy,o.ConstructionIcon=Zy,o.ContactEmergencyIcon=Xy,o.ContactMailIcon=xy,o.ContactPageIcon=Ry,o.ContactPhoneIcon=eh,o.ContactSupportIcon=nh,o.ContactlessIcon=oh,o.ContactsIcon=rh,o.Container=Ot,o.ContentCopyIcon=Rn,o.ContentCutIcon=th,o.ContentPasteGoIcon=ih,o.ContentPasteIcon=ch,o.ContentPasteOffIcon=ah,o.ContentPasteSearchIcon=lh,o.ContrastIcon=sh,o.ControlCameraIcon=dh,o.ControlPointDuplicateIcon=fh,o.ControlPointIcon=uh,o.CookieIcon=Ah,o.CopyAllIcon=_h,o.CopyrightIcon=yh,o.CoronavirusIcon=hh,o.CorporateFareIcon=gh,o.CottageIcon=Ih,o.CountertopsIcon=bh,o.CreateIcon=ph,o.CreateNewFolderIcon=wh,o.CreditCardIcon=kh,o.CreditCardOffIcon=mh,o.CreditScoreIcon=vh,o.CribIcon=Kh,o.CrisisAlertIcon=Ch,o.Crop169Icon=Bh,o.Crop32Icon=Eh,o.Crop54Icon=Fh,o.Crop75Icon=Ph,o.CropDinIcon=Dh,o.CropFreeIcon=Nh,o.CropIcon=Sh,o.CropLandscapeIcon=Mh,o.CropOriginalIcon=Th,o.CropPortraitIcon=Oh,o.CropRotateIcon=Lh,o.CropSquareIcon=Qh,o.CrueltyFreeIcon=Vh,o.CssIcon=Wh,o.CurrencyBitcoinIcon=Gh,o.CurrencyExchangeIcon=zh,o.CurrencyFrancIcon=Hh,o.CurrencyLiraIcon=Uh,o.CurrencyPoundIcon=Yh,o.CurrencyRubleIcon=$h,o.CurrencyRupeeIcon=jh,o.CurrencyYenIcon=qh,o.CurrencyYuanIcon=Jh,o.CurtainsClosedIcon=Xh,o.CurtainsIcon=Zh,o.CycloneIcon=xh,o.DEFAULT_FIELD_CONFIGS=Di,o.DangerousIcon=Rh,o.DarkModeIcon=hc,o.DashboardCustomizeIcon=ng,o.DashboardIcon=eg,o.DataArrayIcon=og,o.DataExplorationIcon=rg,o.DataObjectIcon=tg,o.DataSaverOffIcon=cg,o.DataSaverOnIcon=ig,o.DataThresholdingIcon=ag,o.DataUsageIcon=lg,o.DatasetIcon=sg,o.DatasetLinkedIcon=dg,o.DatePreview=ri,o.DateRangeIcon=ug,o.DateTimeField=Vn,o.DateTimeFieldBinding=wi,o.DeblurIcon=fg,o.DebouncedTextField=RG,o.DeckIcon=Ag,o.DehazeIcon=_g,o.DeleteConfirmationDialog=R3,o.DeleteForeverIcon=yg,o.DeleteIcon=wo,o.DeleteOutlineIcon=hg,o.DeleteSweepIcon=gg,o.DeliveryDiningIcon=Ig,o.DensityLargeIcon=bg,o.DensityMediumIcon=pg,o.DensitySmallIcon=wg,o.DepartureBoardIcon=kg,o.DescriptionIcon=gc,o.DeselectIcon=mg,o.DesignServicesIcon=vg,o.DeskIcon=Kg,o.DesktopAccessDisabledIcon=Cg,o.DesktopMacIcon=Sg,o.DesktopWindowsIcon=Bg,o.DetailsIcon=Eg,o.DeveloperBoardIcon=Fg,o.DeveloperBoardOffIcon=Pg,o.DeveloperModeIcon=Dg,o.DeviceHubIcon=Ng,o.DeviceThermostatIcon=Mg,o.DeviceUnknownIcon=Tg,o.DevicesFoldIcon=Lg,o.DevicesIcon=Og,o.DevicesOtherIcon=Qg,o.DialerSipIcon=Vg,o.Dialog=Zo,o.DialogActions=wn,o.DialogContent=Xo,o.DialpadIcon=Wg,o.DiamondIcon=Gg,o.DifferenceIcon=zg,o.DiningIcon=Hg,o.DinnerDiningIcon=Ug,o.DirectionsBikeIcon=$g,o.DirectionsBoatFilledIcon=qg,o.DirectionsBoatIcon=jg,o.DirectionsBusFilledIcon=Zg,o.DirectionsBusIcon=Jg,o.DirectionsCarFilledIcon=xg,o.DirectionsCarIcon=Xg,o.DirectionsIcon=Yg,o.DirectionsOffIcon=Rg,o.DirectionsRailwayFilledIcon=nI,o.DirectionsRailwayIcon=eI,o.DirectionsRunIcon=oI,o.DirectionsSubwayFilledIcon=tI,o.DirectionsSubwayIcon=rI,o.DirectionsTransitFilledIcon=iI,o.DirectionsTransitIcon=cI,o.DirectionsWalkIcon=aI,o.DirtyLensIcon=lI,o.DisabledByDefaultIcon=sI,o.DisabledVisibleIcon=dI,o.DiscFullIcon=uI,o.DiscountIcon=fI,o.DisplaySettingsIcon=AI,o.Diversity1Icon=_I,o.Diversity2Icon=yI,o.Diversity3Icon=hI,o.DnsIcon=gI,o.DoDisturbAltIcon=bI,o.DoDisturbIcon=II,o.DoDisturbOffIcon=pI,o.DoDisturbOnIcon=wI,o.DoNotDisturbAltIcon=mI,o.DoNotDisturbIcon=kI,o.DoNotDisturbOffIcon=vI,o.DoNotDisturbOnIcon=KI,o.DoNotDisturbOnTotalSilenceIcon=CI,o.DoNotStepIcon=SI,o.DoNotTouchIcon=BI,o.DockIcon=EI,o.DocumentScannerIcon=FI,o.DomainAddIcon=DI,o.DomainDisabledIcon=NI,o.DomainIcon=PI,o.DomainVerificationIcon=MI,o.DoneAllIcon=OI,o.DoneIcon=TI,o.DoneOutlineIcon=LI,o.DonutLargeIcon=QI,o.DonutSmallIcon=VI,o.DoorBackIcon=WI,o.DoorFrontIcon=GI,o.DoorSlidingIcon=zI,o.DoorbellIcon=HI,o.DoubleArrowIcon=UI,o.DownhillSkiingIcon=YI,o.DownloadDoneIcon=jI,o.DownloadForOfflineIcon=qI,o.DownloadIcon=$I,o.DownloadingIcon=JI,o.DraftsIcon=ZI,o.DragHandleIcon=XI,o.DragIndicatorIcon=xI,o.DrawIcon=RI,o.Drawer=Aa,o.DrawerNavigationItem=Mt,o.DriveEtaIcon=eb,o.DriveFileMoveIcon=nb,o.DriveFileMoveRtlIcon=ob,o.DriveFileRenameOutlineIcon=rb,o.DriveFolderUploadIcon=Ic,o.DryCleaningIcon=cb,o.DryIcon=tb,o.DuoIcon=ib,o.DvrIcon=ab,o.DynamicFeedIcon=lb,o.DynamicFormIcon=sb,o.EMobiledataIcon=db,o.EarbudsBatteryIcon=fb,o.EarbudsIcon=ub,o.EastIcon=Ab,o.EdgesensorHighIcon=_b,o.EdgesensorLowIcon=yb,o.EditAttributesIcon=hb,o.EditCalendarIcon=gb,o.EditIcon=bc,o.EditLocationAltIcon=bb,o.EditLocationIcon=Ib,o.EditNoteIcon=pb,o.EditNotificationsIcon=wb,o.EditOffIcon=kb,o.EditRoadIcon=mb,o.EggAltIcon=Kb,o.EggIcon=vb,o.EjectIcon=Cb,o.ElderlyIcon=Sb,o.ElderlyWomanIcon=Bb,o.ElectricBikeIcon=Eb,o.ElectricBoltIcon=Fb,o.ElectricCarIcon=Pb,o.ElectricMeterIcon=Db,o.ElectricMopedIcon=Nb,o.ElectricRickshawIcon=Mb,o.ElectricScooterIcon=Tb,o.ElectricalServicesIcon=Ob,o.ElevatorIcon=Lb,o.EmailIcon=pc,o.EmergencyIcon=Qb,o.EmergencyRecordingIcon=Vb,o.EmergencyShareIcon=Wb,o.EmojiEmotionsIcon=Gb,o.EmojiEventsIcon=zb,o.EmojiFoodBeverageIcon=Hb,o.EmojiNatureIcon=Ub,o.EmojiObjectsIcon=Yb,o.EmojiPeopleIcon=$b,o.EmojiSymbolsIcon=jb,o.EmojiTransportationIcon=qb,o.EmptyValue=Fn,o.EnergySavingsLeafIcon=Jb,o.EngineeringIcon=Zb,o.EnhancedEncryptionIcon=Xb,o.EntityCollectionTable=Kt,o.EntityCollectionView=St,o.EntityForm=Pi,o.EntityPreview=yt,o.EntityReference=Je,o.EnumValuesChip=Ee,o.EqualizerIcon=xb,o.ErrorBoundary=se,o.ErrorIcon=wr,o.ErrorOutlineIcon=wc,o.ErrorView=pe,o.EscalatorIcon=Rb,o.EscalatorWarningIcon=ep,o.EuroIcon=np,o.EuroSymbolIcon=op,o.EvStationIcon=rp,o.EventAvailableIcon=cp,o.EventBusyIcon=ip,o.EventIcon=tp,o.EventNoteIcon=ap,o.EventRepeatIcon=lp,o.EventSeatIcon=sp,o.ExitToAppIcon=dp,o.ExpandCircleDownIcon=fp,o.ExpandIcon=up,o.ExpandLessIcon=Ap,o.ExpandMoreIcon=eo,o.ExpandablePanel=fn,o.ExplicitIcon=_p,o.ExploreIcon=yp,o.ExploreOffIcon=hp,o.ExposureIcon=gp,o.ExposureNeg1Icon=Ip,o.ExposureNeg2Icon=bp,o.ExposurePlus1Icon=pp,o.ExposurePlus2Icon=wp,o.ExposureZeroIcon=kp,o.ExtensionIcon=mp,o.ExtensionOffIcon=vp,o.Face2Icon=Cp,o.Face3Icon=Sp,o.Face4Icon=Bp,o.Face5Icon=Ep,o.Face6Icon=Fp,o.FaceIcon=Kp,o.FaceRetouchingNaturalIcon=Pp,o.FaceRetouchingOffIcon=Dp,o.FactCheckIcon=Np,o.FactoryIcon=Mp,o.FamilyRestroomIcon=Tp,o.FastForwardIcon=Op,o.FastRewindIcon=Lp,o.FastfoodIcon=Qp,o.FavoriteBorderIcon=Wp,o.FavoriteIcon=Vp,o.FaxIcon=Gp,o.FeaturedPlayListIcon=zp,o.FeaturedVideoIcon=Hp,o.FeedIcon=Up,o.FeedbackIcon=Yp,o.FemaleIcon=$p,o.FenceIcon=jp,o.FestivalIcon=qp,o.FiberDvrIcon=Jp,o.FiberManualRecordIcon=Zp,o.FiberNewIcon=Xp,o.FiberPinIcon=xp,o.FiberSmartRecordIcon=Rp,o.FieldConfigBadge=X3,o.FieldHelperText=Se,o.FileCopyIcon=kc,o.FileDownloadDoneIcon=nw,o.FileDownloadIcon=ew,o.FileDownloadOffIcon=ow,o.FileOpenIcon=rw,o.FilePresentIcon=tw,o.FileUpload=$H,o.FileUploadIcon=cw,o.Filter1Icon=aw,o.Filter2Icon=lw,o.Filter3Icon=sw,o.Filter4Icon=dw,o.Filter5Icon=uw,o.Filter6Icon=fw,o.Filter7Icon=Aw,o.Filter8Icon=_w,o.Filter9Icon=yw,o.Filter9PlusIcon=hw,o.FilterAltIcon=gw,o.FilterAltOffIcon=Iw,o.FilterBAndWIcon=bw,o.FilterCenterFocusIcon=pw,o.FilterDramaIcon=ww,o.FilterFramesIcon=kw,o.FilterHdrIcon=mw,o.FilterIcon=iw,o.FilterListIcon=vw,o.FilterListOffIcon=mc,o.FilterNoneIcon=Kw,o.FilterTiltShiftIcon=Cw,o.FilterVintageIcon=Sw,o.FindInPageIcon=Bw,o.FindReplaceIcon=Ew,o.FingerprintIcon=Fw,o.FireCMS=IH,o.FireCMSAppBar=aa,o.FireCMSContextInstance=ar,o.FireCMSHomePage=ta,o.FireCMSLogo=ia,o.FireExtinguisherIcon=Pw,o.FireHydrantAltIcon=Dw,o.FireTruckIcon=Nw,o.FireplaceIcon=Mw,o.FirstPageIcon=Tw,o.FitScreenIcon=Ow,o.FitbitIcon=Lw,o.FitnessCenterIcon=Qw,o.FlagCircleIcon=Vw,o.FlagIcon=vc,o.FlakyIcon=Ww,o.FlareIcon=Gw,o.FlashAutoIcon=zw,o.FlashOffIcon=Hw,o.FlashOnIcon=Uw,o.FlashlightOffIcon=Yw,o.FlashlightOnIcon=$w,o.FlatwareIcon=jw,o.FlightClassIcon=Jw,o.FlightIcon=qw,o.FlightLandIcon=Zw,o.FlightTakeoffIcon=Xw,o.FlipCameraAndroidIcon=Rw,o.FlipCameraIosIcon=ek,o.FlipIcon=xw,o.FlipToBackIcon=nk,o.FlipToFrontIcon=ok,o.FloodIcon=rk,o.FluorescentIcon=tk,o.FlutterDashIcon=ck,o.FmdBadIcon=ik,o.FmdGoodIcon=ak,o.FolderCopyIcon=sk,o.FolderDeleteIcon=dk,o.FolderIcon=lk,o.FolderOffIcon=uk,o.FolderOpenIcon=fk,o.FolderSharedIcon=Ak,o.FolderSpecialIcon=_k,o.FolderZipIcon=yk,o.FollowTheSignsIcon=hk,o.FontDownloadIcon=gk,o.FontDownloadOffIcon=Ik,o.FoodBankIcon=bk,o.ForestIcon=pk,o.ForkLeftIcon=wk,o.ForkRightIcon=kk,o.FormatAlignCenterIcon=mk,o.FormatAlignJustifyIcon=vk,o.FormatAlignLeftIcon=Kk,o.FormatAlignRightIcon=Ck,o.FormatBoldIcon=Sk,o.FormatClearIcon=Bk,o.FormatColorFillIcon=Ek,o.FormatColorResetIcon=Fk,o.FormatColorTextIcon=Pk,o.FormatIndentDecreaseIcon=Dk,o.FormatIndentIncreaseIcon=Nk,o.FormatItalicIcon=Mk,o.FormatLineSpacingIcon=Tk,o.FormatListBulletedIcon=Ok,o.FormatListNumberedIcon=kr,o.FormatListNumberedRtlIcon=Lk,o.FormatOverlineIcon=Qk,o.FormatPaintIcon=Vk,o.FormatQuoteIcon=Kc,o.FormatShapesIcon=Wk,o.FormatSizeIcon=Gk,o.FormatStrikethroughIcon=zk,o.FormatTextdirectionLToRIcon=Hk,o.FormatTextdirectionRToLIcon=Uk,o.FormatUnderlinedIcon=Yk,o.FormikArrayContainer=No,o.FortIcon=$k,o.ForumIcon=jk,o.Forward10Icon=Jk,o.Forward30Icon=Zk,o.Forward5Icon=Xk,o.ForwardIcon=qk,o.ForwardToInboxIcon=xk,o.FoundationIcon=Rk,o.FreeBreakfastIcon=em,o.FreeCancellationIcon=nm,o.FrontHandIcon=om,o.FullscreenExitIcon=tm,o.FullscreenIcon=rm,o.FunctionsIcon=Cc,o.GMobiledataIcon=cm,o.GTranslateIcon=im,o.GamepadIcon=am,o.GamesIcon=lm,o.GarageIcon=sm,o.GasMeterIcon=dm,o.GavelIcon=um,o.GeneratingTokensIcon=fm,o.GeoPoint=Br,o.GestureIcon=Am,o.GetAppIcon=_m,o.GifBoxIcon=hm,o.GifIcon=ym,o.GirlIcon=gm,o.GitHubIcon=el,o.GiteIcon=Im,o.GolfCourseIcon=bm,o.GppBadIcon=pm,o.GppGoodIcon=wm,o.GppMaybeIcon=km,o.GpsFixedIcon=mm,o.GpsNotFixedIcon=vm,o.GpsOffIcon=Km,o.GradeIcon=Cm,o.GradientIcon=Sm,o.GradingIcon=Bm,o.GrainIcon=Em,o.GraphicEqIcon=Fm,o.GrassIcon=Pm,o.Grid3x3Icon=Dm,o.Grid4x4Icon=Nm,o.GridGoldenratioIcon=Mm,o.GridOffIcon=Tm,o.GridOnIcon=Om,o.GridViewIcon=Lm,o.GroupAddIcon=Vm,o.GroupIcon=Qm,o.GroupOffIcon=Wm,o.GroupRemoveIcon=Gm,o.GroupWorkIcon=zm,o.Groups2Icon=Um,o.Groups3Icon=Ym,o.GroupsIcon=Hm,o.HMobiledataIcon=$m,o.HPlusMobiledataIcon=jm,o.HailIcon=qm,o.HandshakeIcon=Jm,o.HandymanIcon=Zm,o.HardwareIcon=Xm,o.HdIcon=xm,o.HdrAutoIcon=Rm,o.HdrAutoSelectIcon=ev,o.HdrEnhancedSelectIcon=nv,o.HdrOffIcon=ov,o.HdrOffSelectIcon=rv,o.HdrOnIcon=tv,o.HdrOnSelectIcon=cv,o.HdrPlusIcon=iv,o.HdrStrongIcon=av,o.HdrWeakIcon=lv,o.HeadphonesBatteryIcon=dv,o.HeadphonesIcon=sv,o.HeadsetIcon=uv,o.HeadsetMicIcon=fv,o.HeadsetOffIcon=Av,o.HealingIcon=_v,o.HealthAndSafetyIcon=yv,o.HearingDisabledIcon=gv,o.HearingIcon=hv,o.HeartBrokenIcon=Iv,o.HeatPumpIcon=bv,o.HeightIcon=pv,o.HelpCenterIcon=kv,o.HelpIcon=wv,o.HelpOutlineIcon=mv,o.HevcIcon=vv,o.HexagonIcon=Kv,o.HideImageIcon=Cv,o.HideSourceIcon=Sv,o.HighQualityIcon=Bv,o.HighlightAltIcon=Fv,o.HighlightIcon=Ev,o.HighlightOffIcon=Pv,o.HikingIcon=Dv,o.HistoryEduIcon=Mv,o.HistoryIcon=Nv,o.HistoryToggleOffIcon=Tv,o.HiveIcon=Ov,o.HlsIcon=Lv,o.HlsOffIcon=Qv,o.HolidayVillageIcon=Vv,o.HomeIcon=Wv,o.HomeMaxIcon=Gv,o.HomeMiniIcon=zv,o.HomeRepairServiceIcon=Hv,o.HomeWorkIcon=Uv,o.HorizontalDistributeIcon=Yv,o.HorizontalRuleIcon=$v,o.HorizontalSplitIcon=jv,o.HotTubIcon=qv,o.HotelClassIcon=Zv,o.HotelIcon=Jv,o.HourglassBottomIcon=Xv,o.HourglassDisabledIcon=xv,o.HourglassEmptyIcon=Rv,o.HourglassFullIcon=e0,o.HourglassTopIcon=n0,o.HouseIcon=o0,o.HouseSidingIcon=r0,o.HouseboatIcon=t0,o.HowToRegIcon=c0,o.HowToVoteIcon=i0,o.HtmlIcon=a0,o.HttpIcon=Sc,o.HttpsIcon=l0,o.HubIcon=s0,o.HvacIcon=d0,o.IceSkatingIcon=u0,o.IcecreamIcon=f0,o.Icon=r,o.IconButton=ee,o.ImageAspectRatioIcon=_0,o.ImageIcon=A0,o.ImageNotSupportedIcon=y0,o.ImagePreview=Gc,o.ImageSearchIcon=h0,o.ImagesearchRollerIcon=g0,o.ImportContactsIcon=I0,o.ImportExportIcon=b0,o.ImportantDevicesIcon=p0,o.InboxIcon=w0,o.IncompleteCircleIcon=k0,o.IndeterminateCheckBoxIcon=m0,o.InfoIcon=Bc,o.InfoLabel=nH,o.InputIcon=v0,o.InputLabel=mt,o.InsertChartIcon=K0,o.InsertChartOutlinedIcon=C0,o.InsertCommentIcon=S0,o.InsertDriveFileIcon=B0,o.InsertEmoticonIcon=E0,o.InsertInvitationIcon=F0,o.InsertLinkIcon=P0,o.InsertPageBreakIcon=D0,o.InsertPhotoIcon=N0,o.InsightsIcon=M0,o.InstallDesktopIcon=T0,o.InstallMobileIcon=O0,o.IntegrationInstructionsIcon=L0,o.InterestsIcon=Q0,o.InterpreterModeIcon=V0,o.Inventory2Icon=G0,o.InventoryIcon=W0,o.InvertColorsIcon=z0,o.InvertColorsOffIcon=H0,o.IosShareIcon=U0,o.IronIcon=Y0,o.IsoIcon=$0,o.JavascriptIcon=j0,o.JoinFullIcon=q0,o.JoinInnerIcon=J0,o.JoinLeftIcon=Z0,o.JoinRightIcon=X0,o.KayakingIcon=x0,o.KebabDiningIcon=R0,o.KeyIcon=eK,o.KeyOffIcon=nK,o.KeyValueFieldBinding=vi,o.KeyValuePreview=Or,o.KeyboardAltIcon=rK,o.KeyboardArrowDownIcon=tK,o.KeyboardArrowLeftIcon=cK,o.KeyboardArrowRightIcon=iK,o.KeyboardArrowUpIcon=aK,o.KeyboardBackspaceIcon=lK,o.KeyboardCapslockIcon=sK,o.KeyboardCommandKeyIcon=dK,o.KeyboardControlKeyIcon=uK,o.KeyboardDoubleArrowDownIcon=fK,o.KeyboardDoubleArrowLeftIcon=AK,o.KeyboardDoubleArrowRightIcon=_K,o.KeyboardDoubleArrowUpIcon=yK,o.KeyboardHideIcon=hK,o.KeyboardIcon=oK,o.KeyboardOptionKeyIcon=gK,o.KeyboardReturnIcon=IK,o.KeyboardTabIcon=ko,o.KeyboardVoiceIcon=bK,o.KingBedIcon=pK,o.KitchenIcon=wK,o.KitesurfingIcon=kK,o.LabelIcon=mK,o.LabelImportantIcon=vK,o.LabelOffIcon=KK,o.LabelWithIcon=Ce,o.LanIcon=CK,o.LandscapeIcon=SK,o.LandslideIcon=BK,o.LanguageIcon=EK,o.LaptopChromebookIcon=PK,o.LaptopIcon=FK,o.LaptopMacIcon=DK,o.LaptopWindowsIcon=NK,o.LastPageIcon=MK,o.LaunchIcon=TK,o.LayersClearIcon=LK,o.LayersIcon=OK,o.LeaderboardIcon=QK,o.LeakAddIcon=VK,o.LeakRemoveIcon=WK,o.LegendToggleIcon=GK,o.LensBlurIcon=HK,o.LensIcon=zK,o.LibraryAddCheckIcon=YK,o.LibraryAddIcon=UK,o.LibraryBooksIcon=$K,o.LibraryMusicIcon=jK,o.LightIcon=qK,o.LightModeIcon=Ec,o.LightbulbCircleIcon=ZK,o.LightbulbIcon=JK,o.LineAxisIcon=XK,o.LineStyleIcon=xK,o.LineWeightIcon=RK,o.LinearScaleIcon=eC,o.LinkIcon=Fc,o.LinkOffIcon=nC,o.LinkedCameraIcon=oC,o.LiquorIcon=rC,o.ListAltIcon=Dc,o.ListIcon=Pc,o.LiveHelpIcon=tC,o.LiveTvIcon=cC,o.LivingIcon=iC,o.LoadingButton=ha,o.LocalActivityIcon=aC,o.LocalAirportIcon=lC,o.LocalAtmIcon=sC,o.LocalBarIcon=dC,o.LocalCafeIcon=uC,o.LocalCarWashIcon=fC,o.LocalConvenienceStoreIcon=AC,o.LocalDiningIcon=_C,o.LocalDrinkIcon=yC,o.LocalFireDepartmentIcon=hC,o.LocalFloristIcon=gC,o.LocalGasStationIcon=IC,o.LocalGroceryStoreIcon=bC,o.LocalHospitalIcon=pC,o.LocalHotelIcon=wC,o.LocalLaundryServiceIcon=kC,o.LocalLibraryIcon=mC,o.LocalMallIcon=vC,o.LocalMoviesIcon=KC,o.LocalOfferIcon=CC,o.LocalParkingIcon=SC,o.LocalPharmacyIcon=BC,o.LocalPhoneIcon=EC,o.LocalPizzaIcon=FC,o.LocalPlayIcon=PC,o.LocalPoliceIcon=DC,o.LocalPostOfficeIcon=NC,o.LocalPrintshopIcon=MC,o.LocalSeeIcon=TC,o.LocalShippingIcon=OC,o.LocalTaxiIcon=LC,o.LocationCityIcon=QC,o.LocationDisabledIcon=VC,o.LocationOffIcon=WC,o.LocationOnIcon=GC,o.LocationSearchingIcon=zC,o.LockClockIcon=UC,o.LockIcon=HC,o.LockOpenIcon=YC,o.LockPersonIcon=$C,o.LockResetIcon=jC,o.LoginIcon=qC,o.LogoDevIcon=JC,o.LogoutIcon=Nc,o.Looks3Icon=XC,o.Looks4Icon=xC,o.Looks5Icon=RC,o.Looks6Icon=eS,o.LooksIcon=ZC,o.LooksOneIcon=nS,o.LooksTwoIcon=oS,o.LoopIcon=rS,o.LoupeIcon=tS,o.LowPriorityIcon=cS,o.LoyaltyIcon=iS,o.LteMobiledataIcon=aS,o.LtePlusMobiledataIcon=lS,o.LuggageIcon=sS,o.LunchDiningIcon=dS,o.LyricsIcon=uS,o.MacroOffIcon=fS,o.MailIcon=AS,o.MailLockIcon=_S,o.MailOutlineIcon=yS,o.MaleIcon=hS,o.Man2Icon=IS,o.Man3Icon=bS,o.Man4Icon=pS,o.ManIcon=gS,o.ManageAccountsIcon=wS,o.ManageHistoryIcon=kS,o.ManageSearchIcon=mS,o.MapFieldBinding=mi,o.MapIcon=vS,o.MapPropertyPreview=ni,o.MapsHomeWorkIcon=KS,o.MapsUgcIcon=CS,o.MarginIcon=SS,o.MarkAsUnreadIcon=BS,o.MarkChatReadIcon=ES,o.MarkChatUnreadIcon=FS,o.MarkEmailReadIcon=PS,o.MarkEmailUnreadIcon=DS,o.MarkUnreadChatAltIcon=NS,o.Markdown=co,o.MarkdownFieldBinding=Si,o.MarkunreadIcon=MS,o.MarkunreadMailboxIcon=TS,o.MasksIcon=OS,o.MaximizeIcon=LS,o.MediaBluetoothOffIcon=QS,o.MediaBluetoothOnIcon=VS,o.MediationIcon=WS,o.MedicalInformationIcon=GS,o.MedicalServicesIcon=zS,o.MedicationIcon=HS,o.MedicationLiquidIcon=US,o.MeetingRoomIcon=YS,o.MemoryIcon=$S,o.Menu=Qn,o.MenuBookIcon=jS,o.MenuIcon=mr,o.MenuItem=ke,o.MenuOpenIcon=qS,o.MergeIcon=JS,o.MergeTypeIcon=ZS,o.MessageIcon=XS,o.MicExternalOffIcon=RS,o.MicExternalOnIcon=eB,o.MicIcon=xS,o.MicNoneIcon=nB,o.MicOffIcon=oB,o.MicrowaveIcon=rB,o.MilitaryTechIcon=tB,o.MinimizeIcon=cB,o.MinorCrashIcon=iB,o.MiscellaneousServicesIcon=aB,o.MissedVideoCallIcon=lB,o.MmsIcon=sB,o.MobileFriendlyIcon=dB,o.MobileOffIcon=uB,o.MobileScreenShareIcon=fB,o.MobiledataOffIcon=AB,o.ModeCommentIcon=yB,o.ModeControllerProvider=Ga,o.ModeEditIcon=hB,o.ModeEditOutlineIcon=gB,o.ModeFanOffIcon=IB,o.ModeIcon=_B,o.ModeNightIcon=bB,o.ModeOfTravelIcon=pB,o.ModeStandbyIcon=wB,o.ModelTrainingIcon=kB,o.MonetizationOnIcon=mB,o.MoneyIcon=vB,o.MoneyOffCsredIcon=CB,o.MoneyOffIcon=KB,o.MonitorHeartIcon=BB,o.MonitorIcon=SB,o.MonitorWeightIcon=EB,o.MonochromePhotosIcon=FB,o.MoodBadIcon=DB,o.MoodIcon=PB,o.MopedIcon=NB,o.MoreHorizIcon=TB,o.MoreIcon=MB,o.MoreTimeIcon=OB,o.MoreVertIcon=vr,o.MosqueIcon=LB,o.MotionPhotosAutoIcon=QB,o.MotionPhotosOffIcon=VB,o.MotionPhotosOnIcon=WB,o.MotionPhotosPauseIcon=GB,o.MotionPhotosPausedIcon=zB,o.MouseIcon=HB,o.MoveDownIcon=UB,o.MoveToInboxIcon=YB,o.MoveUpIcon=$B,o.MovieCreationIcon=qB,o.MovieFilterIcon=JB,o.MovieIcon=jB,o.MovingIcon=ZB,o.MpIcon=XB,o.MultiSelect=Zr,o.MultiSelectBinding=xr,o.MultiSelectContext=Jr,o.MultiSelectItem=Xr,o.MultilineChartIcon=xB,o.MultipleStopIcon=RB,o.MuseumIcon=eE,o.MusicNoteIcon=nE,o.MusicOffIcon=oE,o.MusicVideoIcon=rE,o.MyLocationIcon=tE,o.NatIcon=cE,o.NatureIcon=iE,o.NaturePeopleIcon=aE,o.NavigateBeforeIcon=lE,o.NavigateNextIcon=sE,o.NavigationCollectionCard=Et,o.NavigationGroup=$o,o.NavigationIcon=dE,o.NavigationRoutes=vH,o.NearMeDisabledIcon=fE,o.NearMeIcon=uE,o.NearbyErrorIcon=AE,o.NearbyOffIcon=_E,o.NestCamWiredStandIcon=yE,o.NetworkCellIcon=hE,o.NetworkCheckIcon=gE,o.NetworkLockedIcon=IE,o.NetworkPingIcon=bE,o.NetworkWifi1BarIcon=wE,o.NetworkWifi2BarIcon=kE,o.NetworkWifi3BarIcon=mE,o.NetworkWifiIcon=pE,o.NewLabelIcon=vE,o.NewReleasesIcon=KE,o.NewspaperIcon=CE,o.NextPlanIcon=SE,o.NextWeekIcon=BE,o.NfcIcon=EE,o.NightShelterIcon=FE,o.NightlifeIcon=PE,o.NightlightIcon=DE,o.NightlightRoundIcon=NE,o.NightsStayIcon=ME,o.NoAccountsIcon=TE,o.NoAdultContentIcon=OE,o.NoBackpackIcon=LE,o.NoCellIcon=QE,o.NoCrashIcon=VE,o.NoDrinksIcon=WE,o.NoEncryptionGmailerrorredIcon=zE,o.NoEncryptionIcon=GE,o.NoFlashIcon=HE,o.NoFoodIcon=UE,o.NoLuggageIcon=YE,o.NoMealsIcon=$E,o.NoMeetingRoomIcon=jE,o.NoPhotographyIcon=qE,o.NoSimIcon=JE,o.NoStrollerIcon=ZE,o.NoTransferIcon=XE,o.NoiseAwareIcon=xE,o.NoiseControlOffIcon=RE,o.NordicWalkingIcon=eF,o.NorthEastIcon=oF,o.NorthIcon=nF,o.NorthWestIcon=rF,o.NotAccessibleIcon=tF,o.NotFoundPage=ca,o.NotInterestedIcon=cF,o.NotListedLocationIcon=iF,o.NotStartedIcon=aF,o.NoteAddIcon=sF,o.NoteAltIcon=dF,o.NoteIcon=lF,o.NotesIcon=uF,o.NotificationAddIcon=fF,o.NotificationImportantIcon=AF,o.NotificationsActiveIcon=yF,o.NotificationsIcon=_F,o.NotificationsNoneIcon=hF,o.NotificationsOffIcon=gF,o.NotificationsPausedIcon=IF,o.NumberPropertyPreview=ci,o.NumbersIcon=Mc,o.OfflineBoltIcon=bF,o.OfflinePinIcon=pF,o.OfflineShareIcon=wF,o.OilBarrelIcon=kF,o.OnDeviceTrainingIcon=mF,o.OndemandVideoIcon=vF,o.OnlinePredictionIcon=KF,o.OpacityIcon=CF,o.OpenInBrowserIcon=SF,o.OpenInFullIcon=BF,o.OpenInNewIcon=no,o.OpenInNewOffIcon=EF,o.OpenWithIcon=FF,o.OtherHousesIcon=PF,o.OutboundIcon=DF,o.OutboxIcon=NF,o.OutdoorGrillIcon=MF,o.OutletIcon=TF,o.OutlinedFlagIcon=OF,o.OutputIcon=LF,o.PaddingIcon=QF,o.PagesIcon=VF,o.PageviewIcon=WF,o.PaidIcon=GF,o.PaletteIcon=zF,o.PanToolAltIcon=UF,o.PanToolIcon=HF,o.PanoramaFishEyeIcon=$F,o.PanoramaHorizontalIcon=jF,o.PanoramaHorizontalSelectIcon=qF,o.PanoramaIcon=YF,o.PanoramaPhotosphereIcon=JF,o.PanoramaPhotosphereSelectIcon=ZF,o.PanoramaVerticalIcon=XF,o.PanoramaVerticalSelectIcon=xF,o.PanoramaWideAngleIcon=RF,o.PanoramaWideAngleSelectIcon=eP,o.Paper=jH,o.ParaglidingIcon=nP,o.ParkIcon=oP,o.PartyModeIcon=rP,o.PasswordIcon=tP,o.PatternIcon=cP,o.PauseCircleFilledIcon=lP,o.PauseCircleIcon=aP,o.PauseCircleOutlineIcon=sP,o.PauseIcon=iP,o.PausePresentationIcon=dP,o.PaymentIcon=uP,o.PaymentsIcon=fP,o.PedalBikeIcon=AP,o.PendingActionsIcon=yP,o.PendingIcon=_P,o.PentagonIcon=hP,o.PeopleAltIcon=IP,o.PeopleIcon=gP,o.PeopleOutlineIcon=bP,o.PercentIcon=pP,o.PermCameraMicIcon=wP,o.PermContactCalendarIcon=kP,o.PermDataSettingIcon=mP,o.PermDeviceInformationIcon=vP,o.PermIdentityIcon=KP,o.PermMediaIcon=CP,o.PermPhoneMsgIcon=SP,o.PermScanWifiIcon=BP,o.Person2Icon=FP,o.Person3Icon=PP,o.Person4Icon=DP,o.PersonAddAlt1Icon=TP,o.PersonAddAltIcon=MP,o.PersonAddDisabledIcon=OP,o.PersonAddIcon=NP,o.PersonIcon=EP,o.PersonOffIcon=LP,o.PersonOutlineIcon=QP,o.PersonPinCircleIcon=WP,o.PersonPinIcon=VP,o.PersonRemoveAlt1Icon=zP,o.PersonRemoveIcon=GP,o.PersonSearchIcon=HP,o.PersonalInjuryIcon=UP,o.PersonalVideoIcon=YP,o.PestControlIcon=$P,o.PestControlRodentIcon=jP,o.PetsIcon=qP,o.PhishingIcon=JP,o.PhoneAndroidIcon=XP,o.PhoneBluetoothSpeakerIcon=xP,o.PhoneCallbackIcon=RP,o.PhoneDisabledIcon=e1,o.PhoneEnabledIcon=n1,o.PhoneForwardedIcon=o1,o.PhoneIcon=ZP,o.PhoneIphoneIcon=r1,o.PhoneLockedIcon=t1,o.PhoneMissedIcon=c1,o.PhonePausedIcon=i1,o.PhonelinkEraseIcon=l1,o.PhonelinkIcon=a1,o.PhonelinkLockIcon=s1,o.PhonelinkOffIcon=d1,o.PhonelinkRingIcon=u1,o.PhonelinkSetupIcon=f1,o.PhotoAlbumIcon=_1,o.PhotoCameraBackIcon=h1,o.PhotoCameraFrontIcon=g1,o.PhotoCameraIcon=y1,o.PhotoFilterIcon=I1,o.PhotoIcon=A1,o.PhotoLibraryIcon=b1,o.PhotoSizeSelectActualIcon=p1,o.PhotoSizeSelectLargeIcon=w1,o.PhotoSizeSelectSmallIcon=k1,o.PhpIcon=m1,o.PianoIcon=v1,o.PianoOffIcon=K1,o.PictureAsPdfIcon=C1,o.PictureInPictureAltIcon=B1,o.PictureInPictureIcon=S1,o.PieChartIcon=E1,o.PieChartOutlineIcon=F1,o.PinDropIcon=D1,o.PinEndIcon=N1,o.PinIcon=P1,o.PinInvokeIcon=M1,o.PinchIcon=T1,o.PivotTableChartIcon=O1,o.PixIcon=L1,o.PlaceIcon=Q1,o.PlagiarismIcon=V1,o.PlayArrowIcon=W1,o.PlayCircleFilledIcon=z1,o.PlayCircleIcon=G1,o.PlayCircleOutlineIcon=H1,o.PlayDisabledIcon=U1,o.PlayForWorkIcon=Y1,o.PlayLessonIcon=$1,o.PlaylistAddCheckCircleIcon=J1,o.PlaylistAddCheckIcon=q1,o.PlaylistAddCircleIcon=Z1,o.PlaylistAddIcon=j1,o.PlaylistPlayIcon=X1,o.PlaylistRemoveIcon=x1,o.PlumbingIcon=R1,o.PlusOneIcon=eD,o.PodcastsIcon=nD,o.PointOfSaleIcon=oD,o.PolicyIcon=rD,o.PollIcon=tD,o.PolylineIcon=cD,o.PolymerIcon=iD,o.PoolIcon=aD,o.PortableWifiOffIcon=lD,o.PortraitIcon=sD,o.PostAddIcon=dD,o.PowerIcon=uD,o.PowerInputIcon=fD,o.PowerOffIcon=AD,o.PowerSettingsNewIcon=_D,o.PrecisionManufacturingIcon=yD,o.PregnantWomanIcon=hD,o.PresentToAllIcon=gD,o.PreviewIcon=ID,o.PriceChangeIcon=bD,o.PriceCheckIcon=pD,o.PrintDisabledIcon=kD,o.PrintIcon=wD,o.PriorityHighIcon=mD,o.PrivacyTipIcon=vD,o.PrivateConnectivityIcon=KD,o.ProductionQuantityLimitsIcon=CD,o.PropaneIcon=SD,o.PropaneTankIcon=BD,o.PropertyFieldBinding=bn,o.PropertyPreview=Ke,o.PsychologyAltIcon=FD,o.PsychologyIcon=ED,o.PublicIcon=PD,o.PublicOffIcon=DD,o.PublishIcon=ND,o.PublishedWithChangesIcon=MD,o.PunchClockIcon=TD,o.PushPinIcon=OD,o.QrCode2Icon=QD,o.QrCodeIcon=LD,o.QrCodeScannerIcon=VD,o.QueryBuilderIcon=WD,o.QueryStatsIcon=GD,o.QuestionAnswerIcon=zD,o.QuestionMarkIcon=HD,o.QueueIcon=UD,o.QueueMusicIcon=YD,o.QueuePlayNextIcon=$D,o.QuickreplyIcon=jD,o.QuizIcon=qD,o.RMobiledataIcon=JD,o.RadarIcon=ZD,o.RadioButtonCheckedIcon=xD,o.RadioButtonUncheckedIcon=RD,o.RadioIcon=XD,o.RailwayAlertIcon=eN,o.RamenDiningIcon=nN,o.RampLeftIcon=oN,o.RampRightIcon=rN,o.RateReviewIcon=tN,o.RawOffIcon=cN,o.RawOnIcon=iN,o.ReadMoreIcon=aN,o.ReadOnlyFieldBinding=rt,o.RealEstateAgentIcon=lN,o.ReceiptIcon=sN,o.ReceiptLongIcon=dN,o.RecentActorsIcon=uN,o.RecommendIcon=fN,o.RecordVoiceOverIcon=AN,o.RectangleIcon=_N,o.RecyclingIcon=yN,o.RedeemIcon=hN,o.RedoIcon=gN,o.ReduceCapacityIcon=IN,o.ReferenceFieldBinding=ki,o.ReferencePreview=on,o.ReferencePreviewContainer=Co,o.ReferenceSelectionInner=ra,o.RefreshIcon=bN,o.RememberMeIcon=pN,o.RemoveCircleIcon=Tc,o.RemoveCircleOutlineIcon=wN,o.RemoveDoneIcon=kN,o.RemoveFromQueueIcon=mN,o.RemoveIcon=oo,o.RemoveModeratorIcon=vN,o.RemoveRedEyeIcon=KN,o.RemoveRoadIcon=CN,o.RemoveShoppingCartIcon=SN,o.ReorderIcon=BN,o.RepartitionIcon=EN,o.RepeatFieldBinding=Ki,o.RepeatIcon=Kr,o.RepeatOnIcon=FN,o.RepeatOneIcon=PN,o.RepeatOneOnIcon=DN,o.Replay10Icon=MN,o.Replay30Icon=TN,o.Replay5Icon=ON,o.ReplayCircleFilledIcon=LN,o.ReplayIcon=NN,o.ReplyAllIcon=VN,o.ReplyIcon=QN,o.ReportGmailerrorredIcon=GN,o.ReportIcon=WN,o.ReportOffIcon=zN,o.ReportProblemIcon=HN,o.RequestPageIcon=UN,o.RequestQuoteIcon=YN,o.ResetTvIcon=$N,o.RestartAltIcon=jN,o.RestaurantIcon=qN,o.RestaurantMenuIcon=JN,o.RestoreFromTrashIcon=XN,o.RestoreIcon=ZN,o.RestorePageIcon=xN,o.ReviewsIcon=RN,o.RiceBowlIcon=eM,o.RingVolumeIcon=nM,o.RocketIcon=oM,o.RocketLaunchIcon=rM,o.RollerShadesClosedIcon=cM,o.RollerShadesIcon=tM,o.RollerSkatingIcon=iM,o.RoofingIcon=aM,o.RoomIcon=lM,o.RoomPreferencesIcon=sM,o.RoomServiceIcon=dM,o.Rotate90DegreesCcwIcon=uM,o.Rotate90DegreesCwIcon=fM,o.RotateLeftIcon=AM,o.RotateRightIcon=_M,o.RoundaboutLeftIcon=yM,o.RoundaboutRightIcon=hM,o.RoundedCornerIcon=gM,o.RouteIcon=IM,o.RouteWrapper=Jo,o.RouterIcon=bM,o.RowingIcon=pM,o.RssFeedIcon=wM,o.RsvpIcon=kM,o.RttIcon=mM,o.RuleFolderIcon=KM,o.RuleIcon=vM,o.RunCircleIcon=CM,o.RunningWithErrorsIcon=SM,o.RvHookupIcon=BM,o.SafetyCheckIcon=EM,o.SafetyDividerIcon=FM,o.SailingIcon=PM,o.SanitizerIcon=DM,o.SatelliteAltIcon=MM,o.SatelliteIcon=NM,o.SaveAltIcon=OM,o.SaveAsIcon=LM,o.SaveIcon=TM,o.SavedSearchIcon=QM,o.SavingsIcon=VM,o.Scaffold=wH,o.ScaleIcon=WM,o.ScannerIcon=GM,o.ScatterPlotIcon=zM,o.ScheduleIcon=Oc,o.ScheduleSendIcon=HM,o.SchemaIcon=UM,o.SchoolIcon=YM,o.ScienceIcon=$M,o.ScoreIcon=jM,o.ScoreboardIcon=qM,o.ScreenLockLandscapeIcon=JM,o.ScreenLockPortraitIcon=ZM,o.ScreenLockRotationIcon=XM,o.ScreenRotationAltIcon=RM,o.ScreenRotationIcon=xM,o.ScreenSearchDesktopIcon=eT,o.ScreenShareIcon=nT,o.ScreenshotIcon=oT,o.ScreenshotMonitorIcon=rT,o.ScubaDivingIcon=tT,o.SdCardAlertIcon=aT,o.SdCardIcon=iT,o.SdIcon=cT,o.SdStorageIcon=lT,o.SearchBar=Qt,o.SearchIcon=sc,o.SearchOffIcon=sT,o.SecurityIcon=dT,o.SecurityUpdateGoodIcon=fT,o.SecurityUpdateIcon=uT,o.SecurityUpdateWarningIcon=AT,o.SegmentIcon=_T,o.Select=xe,o.SelectAllIcon=yT,o.SelectFieldBinding=qr,o.SelectGroup=qH,o.SelectItem=Re,o.SelfImprovementIcon=hT,o.SellIcon=gT,o.SendAndArchiveIcon=bT,o.SendIcon=IT,o.SendTimeExtensionIcon=pT,o.SendToMobileIcon=wT,o.SensorDoorIcon=kT,o.SensorOccupiedIcon=mT,o.SensorWindowIcon=vT,o.SensorsIcon=KT,o.SensorsOffIcon=CT,o.SentimentDissatisfiedIcon=ST,o.SentimentNeutralIcon=BT,o.SentimentSatisfiedAltIcon=FT,o.SentimentSatisfiedIcon=ET,o.SentimentVeryDissatisfiedIcon=PT,o.SentimentVerySatisfiedIcon=DT,o.SetMealIcon=NT,o.SettingsAccessibilityIcon=TT,o.SettingsApplicationsIcon=OT,o.SettingsBackupRestoreIcon=LT,o.SettingsBluetoothIcon=QT,o.SettingsBrightnessIcon=VT,o.SettingsCellIcon=WT,o.SettingsEthernetIcon=GT,o.SettingsIcon=MT,o.SettingsInputAntennaIcon=zT,o.SettingsInputComponentIcon=HT,o.SettingsInputCompositeIcon=UT,o.SettingsInputHdmiIcon=YT,o.SettingsInputSvideoIcon=$T,o.SettingsOverscanIcon=jT,o.SettingsPhoneIcon=qT,o.SettingsPowerIcon=JT,o.SettingsRemoteIcon=ZT,o.SettingsSuggestIcon=XT,o.SettingsSystemDaydreamIcon=xT,o.SettingsVoiceIcon=RT,o.SevereColdIcon=e2,o.ShapeLineIcon=n2,o.ShareIcon=o2,o.ShareLocationIcon=r2,o.Sheet=Vt,o.ShieldIcon=t2,o.ShieldMoonIcon=c2,o.Shop2Icon=a2,o.ShopIcon=i2,o.ShopTwoIcon=l2,o.ShoppingBagIcon=s2,o.ShoppingBasketIcon=d2,o.ShoppingCartCheckoutIcon=f2,o.ShoppingCartIcon=u2,o.ShortTextIcon=Lc,o.ShortcutIcon=A2,o.ShowChartIcon=_2,o.ShowerIcon=y2,o.ShuffleIcon=h2,o.ShuffleOnIcon=g2,o.ShutterSpeedIcon=I2,o.SickIcon=b2,o.SideDialogs=O3,o.SignLanguageIcon=p2,o.SignalCellular0BarIcon=w2,o.SignalCellular4BarIcon=k2,o.SignalCellularAlt1BarIcon=v2,o.SignalCellularAlt2BarIcon=K2,o.SignalCellularAltIcon=m2,o.SignalCellularConnectedNoInternet0BarIcon=C2,o.SignalCellularConnectedNoInternet4BarIcon=S2,o.SignalCellularNoSimIcon=B2,o.SignalCellularNodataIcon=E2,o.SignalCellularNullIcon=F2,o.SignalCellularOffIcon=P2,o.SignalWifi0BarIcon=D2,o.SignalWifi4BarIcon=N2,o.SignalWifi4BarLockIcon=M2,o.SignalWifiBadIcon=T2,o.SignalWifiConnectedNoInternet4Icon=O2,o.SignalWifiOffIcon=L2,o.SignalWifiStatusbar4BarIcon=Q2,o.SignalWifiStatusbarConnectedNoInternet4Icon=V2,o.SignalWifiStatusbarNullIcon=W2,o.SignpostIcon=G2,o.SimCardAlertIcon=H2,o.SimCardDownloadIcon=U2,o.SimCardIcon=z2,o.SingleBedIcon=Y2,o.SipIcon=$2,o.SkateboardingIcon=j2,o.SkeletonPropertyComponent=Dn,o.SkipNextIcon=q2,o.SkipPreviousIcon=J2,o.SleddingIcon=Z2,o.SlideshowIcon=X2,o.SlowMotionVideoIcon=x2,o.SmartButtonIcon=R2,o.SmartDisplayIcon=eO,o.SmartScreenIcon=nO,o.SmartToyIcon=oO,o.SmartphoneIcon=rO,o.SmokeFreeIcon=tO,o.SmokingRoomsIcon=cO,o.SmsFailedIcon=aO,o.SmsIcon=iO,o.SnackbarProvider=OH,o.SnippetFolderIcon=lO,o.SnoozeIcon=sO,o.SnowboardingIcon=dO,o.SnowmobileIcon=uO,o.SnowshoeingIcon=fO,o.SoapIcon=AO,o.SocialDistanceIcon=_O,o.SolarPowerIcon=yO,o.SortByAlphaIcon=gO,o.SortIcon=hO,o.SosIcon=IO,o.SoupKitchenIcon=bO,o.SourceIcon=pO,o.SouthAmericaIcon=kO,o.SouthEastIcon=mO,o.SouthIcon=wO,o.SouthWestIcon=vO,o.SpaIcon=KO,o.SpaceBarIcon=CO,o.SpaceDashboardIcon=SO,o.SpatialAudioIcon=BO,o.SpatialAudioOffIcon=EO,o.SpatialTrackingIcon=FO,o.SpeakerGroupIcon=DO,o.SpeakerIcon=PO,o.SpeakerNotesIcon=NO,o.SpeakerNotesOffIcon=MO,o.SpeakerPhoneIcon=TO,o.SpeedIcon=OO,o.SpellcheckIcon=LO,o.Spinner=JH,o.SplitscreenIcon=QO,o.SpokeIcon=VO,o.SportsBarIcon=GO,o.SportsBaseballIcon=zO,o.SportsBasketballIcon=HO,o.SportsCricketIcon=UO,o.SportsEsportsIcon=YO,o.SportsFootballIcon=$O,o.SportsGolfIcon=jO,o.SportsGymnasticsIcon=qO,o.SportsHandballIcon=JO,o.SportsHockeyIcon=ZO,o.SportsIcon=WO,o.SportsKabaddiIcon=XO,o.SportsMartialArtsIcon=xO,o.SportsMmaIcon=RO,o.SportsMotorsportsIcon=eL,o.SportsRugbyIcon=nL,o.SportsScoreIcon=oL,o.SportsSoccerIcon=rL,o.SportsTennisIcon=tL,o.SportsVolleyballIcon=cL,o.SquareFootIcon=aL,o.SquareIcon=iL,o.SsidChartIcon=lL,o.StackedBarChartIcon=sL,o.StackedLineChartIcon=dL,o.StadiumIcon=uL,o.StairsIcon=fL,o.StarBorderIcon=Sr,o.StarBorderPurple500Icon=AL,o.StarHalfIcon=_L,o.StarIcon=Cr,o.StarOutlineIcon=yL,o.StarPurple500Icon=hL,o.StarRateIcon=gL,o.StarsIcon=IL,o.StartIcon=bL,o.StayCurrentLandscapeIcon=pL,o.StayCurrentPortraitIcon=wL,o.StayPrimaryLandscapeIcon=kL,o.StayPrimaryPortraitIcon=mL,o.StickyNote2Icon=vL,o.StopCircleIcon=CL,o.StopIcon=KL,o.StopScreenShareIcon=SL,o.StorageIcon=BL,o.StorageThumbnail=zc,o.StorageThumbnailInternal=Uc,o.StorageUploadFieldBinding=nt,o.StoreIcon=EL,o.StoreMallDirectoryIcon=FL,o.StorefrontIcon=PL,o.StormIcon=DL,o.StraightIcon=NL,o.StraightenIcon=ML,o.StreamIcon=TL,o.StreetviewIcon=OL,o.StrikethroughSIcon=LL,o.StringPropertyPreview=Dr,o.StrollerIcon=QL,o.StyleIcon=VL,o.SubdirectoryArrowLeftIcon=WL,o.SubdirectoryArrowRightIcon=GL,o.SubjectIcon=Qc,o.SubscriptIcon=zL,o.SubscriptionsIcon=HL,o.SubtitlesIcon=UL,o.SubtitlesOffIcon=YL,o.SubwayIcon=$L,o.SummarizeIcon=jL,o.SuperscriptIcon=qL,o.SupervisedUserCircleIcon=JL,o.SupervisorAccountIcon=ZL,o.SupportAgentIcon=xL,o.SupportIcon=XL,o.SurfingIcon=RL,o.SurroundSoundIcon=e4,o.SwapCallsIcon=n4,o.SwapHorizIcon=o4,o.SwapHorizontalCircleIcon=r4,o.SwapVertIcon=t4,o.SwapVerticalCircleIcon=c4,o.SwipeDownAltIcon=l4,o.SwipeDownIcon=a4,o.SwipeIcon=i4,o.SwipeLeftAltIcon=d4,o.SwipeLeftIcon=s4,o.SwipeRightAltIcon=f4,o.SwipeRightIcon=u4,o.SwipeUpAltIcon=_4,o.SwipeUpIcon=A4,o.SwipeVerticalIcon=y4,o.SwitchAccessShortcutAddIcon=g4,o.SwitchAccessShortcutIcon=h4,o.SwitchAccountIcon=I4,o.SwitchCameraIcon=b4,o.SwitchControl=ez,o.SwitchFieldBinding=pi,o.SwitchLeftIcon=p4,o.SwitchRightIcon=w4,o.SwitchVideoIcon=k4,o.SynagogueIcon=m4,o.SyncAltIcon=K4,o.SyncDisabledIcon=C4,o.SyncIcon=v4,o.SyncLockIcon=S4,o.SyncProblemIcon=B4,o.SystemSecurityUpdateGoodIcon=F4,o.SystemSecurityUpdateIcon=E4,o.SystemSecurityUpdateWarningIcon=P4,o.SystemUpdateAltIcon=N4,o.SystemUpdateIcon=D4,o.Tab=xo,o.TabIcon=M4,o.TabUnselectedIcon=T4,o.Table=ZH,o.TableBarIcon=O4,o.TableBody=XH,o.TableCell=eU,o.TableChartIcon=L4,o.TableHeader=xH,o.TableRestaurantIcon=Q4,o.TableRow=RH,o.TableRowsIcon=V4,o.TableViewIcon=W4,o.TabletAndroidIcon=z4,o.TabletIcon=G4,o.TabletMacIcon=H4,o.Tabs=ga,o.TagFacesIcon=Y4,o.TagIcon=U4,o.TakeoutDiningIcon=$4,o.TapAndPlayIcon=j4,o.TapasIcon=q4,o.TaskAltIcon=Z4,o.TaskIcon=J4,o.TaxiAlertIcon=X4,o.TempleBuddhistIcon=x4,o.TempleHinduIcon=R4,o.TerminalIcon=eQ,o.TerrainIcon=nQ,o.TextDecreaseIcon=oQ,o.TextField=An,o.TextFieldBinding=Tn,o.TextFieldsIcon=rQ,o.TextFormatIcon=tQ,o.TextIncreaseIcon=cQ,o.TextRotateUpIcon=iQ,o.TextRotateVerticalIcon=aQ,o.TextRotationAngledownIcon=lQ,o.TextRotationAngleupIcon=sQ,o.TextRotationDownIcon=dQ,o.TextRotationNoneIcon=uQ,o.TextSnippetIcon=fQ,o.TextareaAutosize=gt,o.TextsmsIcon=AQ,o.TextureIcon=_Q,o.TheaterComedyIcon=yQ,o.TheatersIcon=hQ,o.ThermostatAutoIcon=IQ,o.ThermostatIcon=gQ,o.ThumbDownAltIcon=pQ,o.ThumbDownIcon=bQ,o.ThumbDownOffAltIcon=wQ,o.ThumbUpAltIcon=mQ,o.ThumbUpIcon=kQ,o.ThumbUpOffAltIcon=vQ,o.ThumbsUpDownIcon=KQ,o.ThunderstormIcon=CQ,o.TimeToLeaveIcon=SQ,o.TimelapseIcon=BQ,o.TimelineIcon=EQ,o.Timer10Icon=PQ,o.Timer10SelectIcon=DQ,o.Timer3Icon=NQ,o.Timer3SelectIcon=MQ,o.TimerIcon=FQ,o.TimerOffIcon=TQ,o.TipsAndUpdatesIcon=OQ,o.TireRepairIcon=LQ,o.TitleIcon=QQ,o.TocIcon=VQ,o.TodayIcon=WQ,o.ToggleOffIcon=GQ,o.ToggleOnIcon=zQ,o.TokenIcon=HQ,o.TollIcon=UQ,o.TonalityIcon=YQ,o.Tooltip=ye,o.TopicIcon=$Q,o.TornadoIcon=jQ,o.TouchAppIcon=qQ,o.TourIcon=JQ,o.ToysIcon=ZQ,o.TrackChangesIcon=XQ,o.TrafficIcon=xQ,o.TrainIcon=RQ,o.TramIcon=eV,o.TranscribeIcon=nV,o.TransferWithinAStationIcon=oV,o.TransformIcon=rV,o.TransgenderIcon=tV,o.TransitEnterexitIcon=cV,o.TranslateIcon=iV,o.TravelExploreIcon=aV,o.TrendingDownIcon=lV,o.TrendingFlatIcon=sV,o.TrendingUpIcon=dV,o.TripOriginIcon=uV,o.TroubleshootIcon=fV,o.TryIcon=AV,o.TsunamiIcon=_V,o.TtyIcon=yV,o.TuneIcon=hV,o.TungstenIcon=gV,o.TurnLeftIcon=IV,o.TurnRightIcon=bV,o.TurnSharpLeftIcon=pV,o.TurnSharpRightIcon=wV,o.TurnSlightLeftIcon=kV,o.TurnSlightRightIcon=mV,o.TurnedInIcon=vV,o.TurnedInNotIcon=KV,o.TvIcon=CV,o.TvOffIcon=SV,o.TwoWheelerIcon=BV,o.TypeSpecimenIcon=EV,o.Typography=j,o.UTurnLeftIcon=FV,o.UTurnRightIcon=PV,o.UmbrellaIcon=DV,o.UnarchiveIcon=NV,o.UndoIcon=MV,o.UnfoldLessDoubleIcon=OV,o.UnfoldLessIcon=TV,o.UnfoldMoreDoubleIcon=QV,o.UnfoldMoreIcon=LV,o.UnpublishedIcon=VV,o.UnsubscribeIcon=WV,o.UpcomingIcon=GV,o.UpdateDisabledIcon=HV,o.UpdateIcon=zV,o.UpgradeIcon=UV,o.UploadFileIcon=Vc,o.UploadIcon=YV,o.UrlComponentPreview=ro,o.UsbIcon=$V,o.UsbOffIcon=jV,o.VaccinesIcon=qV,o.VapeFreeIcon=JV,o.VapingRoomsIcon=ZV,o.VerifiedIcon=XV,o.VerifiedUserIcon=xV,o.VerticalAlignBottomIcon=RV,o.VerticalAlignCenterIcon=e5,o.VerticalAlignTopIcon=n5,o.VerticalDistributeIcon=o5,o.VerticalShadesClosedIcon=t5,o.VerticalShadesIcon=r5,o.VerticalSplitIcon=c5,o.VibrationIcon=i5,o.VideoCallIcon=a5,o.VideoCameraBackIcon=l5,o.VideoCameraFrontIcon=s5,o.VideoChatIcon=d5,o.VideoFileIcon=u5,o.VideoLabelIcon=f5,o.VideoLibraryIcon=A5,o.VideoSettingsIcon=_5,o.VideoStableIcon=y5,o.VideocamIcon=h5,o.VideocamOffIcon=g5,o.VideogameAssetIcon=I5,o.VideogameAssetOffIcon=b5,o.ViewAgendaIcon=p5,o.ViewArrayIcon=w5,o.ViewCarouselIcon=k5,o.ViewColumnIcon=m5,o.ViewComfyAltIcon=K5,o.ViewComfyIcon=v5,o.ViewCompactAltIcon=S5,o.ViewCompactIcon=C5,o.ViewCozyIcon=B5,o.ViewDayIcon=E5,o.ViewHeadlineIcon=F5,o.ViewInArIcon=P5,o.ViewKanbanIcon=D5,o.ViewListIcon=N5,o.ViewModuleIcon=M5,o.ViewQuiltIcon=T5,o.ViewSidebarIcon=O5,o.ViewStreamIcon=Wc,o.ViewTimelineIcon=L5,o.ViewWeekIcon=Q5,o.VignetteIcon=V5,o.VillaIcon=W5,o.VirtualTable=Yi,o.VisibilityIcon=G5,o.VisibilityOffIcon=z5,o.VoiceChatIcon=H5,o.VoiceOverOffIcon=U5,o.VoicemailIcon=Y5,o.VolcanoIcon=$5,o.VolumeDownIcon=j5,o.VolumeMuteIcon=q5,o.VolumeOffIcon=J5,o.VolumeUpIcon=Z5,o.VolunteerActivismIcon=X5,o.VpnKeyIcon=x5,o.VpnKeyOffIcon=R5,o.VpnLockIcon=eW,o.VrpanoIcon=nW,o.WalletIcon=oW,o.WallpaperIcon=rW,o.WarehouseIcon=tW,o.WarningAmberIcon=iW,o.WarningIcon=cW,o.WashIcon=aW,o.WatchIcon=lW,o.WatchLaterIcon=sW,o.WatchOffIcon=dW,o.WaterDamageIcon=fW,o.WaterDropIcon=AW,o.WaterIcon=uW,o.WaterfallChartIcon=_W,o.WavesIcon=yW,o.WavingHandIcon=hW,o.WbAutoIcon=gW,o.WbCloudyIcon=IW,o.WbIncandescentIcon=bW,o.WbIridescentIcon=pW,o.WbShadeIcon=wW,o.WbSunnyIcon=kW,o.WbTwilightIcon=mW,o.WcIcon=vW,o.WebAssetIcon=CW,o.WebAssetOffIcon=SW,o.WebIcon=KW,o.WebStoriesIcon=BW,o.WebhookIcon=EW,o.WeekendIcon=FW,o.WestIcon=PW,o.WhatshotIcon=DW,o.WheelchairPickupIcon=NW,o.WhereToVoteIcon=MW,o.WidgetsIcon=TW,o.WidthFullIcon=OW,o.WidthNormalIcon=LW,o.WidthWideIcon=QW,o.Wifi1BarIcon=WW,o.Wifi2BarIcon=GW,o.WifiCalling3Icon=HW,o.WifiCallingIcon=zW,o.WifiChannelIcon=UW,o.WifiFindIcon=YW,o.WifiIcon=VW,o.WifiLockIcon=$W,o.WifiOffIcon=jW,o.WifiPasswordIcon=qW,o.WifiProtectedSetupIcon=JW,o.WifiTetheringErrorIcon=XW,o.WifiTetheringIcon=ZW,o.WifiTetheringOffIcon=xW,o.WindPowerIcon=RW,o.WindowIcon=eG,o.WineBarIcon=nG,o.Woman2Icon=rG,o.WomanIcon=oG,o.WorkHistoryIcon=cG,o.WorkIcon=tG,o.WorkOffIcon=iG,o.WorkOutlineIcon=aG,o.WorkspacePremiumIcon=lG,o.WorkspacesIcon=sG,o.WrapTextIcon=dG,o.WrongLocationIcon=uG,o.WysiwygIcon=fG,o.YardIcon=AG,o.YoutubeSearchedForIcon=_G,o.ZoomInIcon=yG,o.ZoomInMapIcon=hG,o.ZoomOutIcon=gG,o.ZoomOutMapIcon=IG,o._10kIcon=rl,o._10mpIcon=tl,o._11mpIcon=cl,o._123Icon=nl,o._12mpIcon=il,o._13mpIcon=al,o._14mpIcon=ll,o._15mpIcon=sl,o._16mpIcon=dl,o._17mpIcon=ul,o._18UpRatingIcon=fl,o._18mpIcon=Al,o._19mpIcon=_l,o._1kIcon=yl,o._1kPlusIcon=hl,o._1xMobiledataIcon=gl,o._20mpIcon=Il,o._21mpIcon=bl,o._22mpIcon=pl,o._23mpIcon=wl,o._24mpIcon=kl,o._2kIcon=ml,o._2kPlusIcon=vl,o._2mpIcon=Kl,o._30fpsIcon=Cl,o._30fpsSelectIcon=Sl,o._360Icon=ol,o._3dRotationIcon=Bl,o._3gMobiledataIcon=El,o._3kIcon=Fl,o._3kPlusIcon=Pl,o._3mpIcon=Dl,o._3pIcon=Nl,o._4gMobiledataIcon=Ml,o._4gPlusMobiledataIcon=Tl,o._4kIcon=Ol,o._4kPlusIcon=Ll,o._4mpIcon=Ql,o._5gIcon=Vl,o._5kIcon=Wl,o._5kPlusIcon=Gl,o._5mpIcon=zl,o._60fpsIcon=Hl,o._60fpsSelectIcon=Ul,o._6FtApartIcon=Yl,o._6kIcon=$l,o._6kPlusIcon=jl,o._6mpIcon=ql,o._7kIcon=Jl,o._7kPlusIcon=Zl,o._7mpIcon=Xl,o._8kIcon=xl,o._8kPlusIcon=Rl,o._8mpIcon=es,o._9kIcon=ns,o._9kPlusIcon=os,o._9mpIcon=rs,o.addInitialSlash=Ha,o.buildAdditionalFieldDelegate=DH,o.buildCollection=KH,o.buildEntityCallbacks=PH,o.buildEnumLabel=qc,o.buildEnumValueConfig=FH,o.buildEnumValues=EH,o.buildFieldConfig=NH,o.buildProperties=SH,o.buildPropertiesOrBuilder=BH,o.buildProperty=CH,o.canCreateEntity=Vo,o.canDeleteEntity=At,o.canEditEntity=ft,o.cardClickableMixin=ic,o.cardMixin=cc,o.cardSelectedMixin=Za,o.cn=E,o.coolIconKeys=hr,o.debounce=Li,o.defaultBorderMixin=ue,o.defaultDateFormat=oi,o.deleteEntityWithCallbacks=nc,o.enumToObjectEntries=sn,o.fieldBackgroundDisabledMixin=en,o.fieldBackgroundHoverMixin=ze,o.fieldBackgroundInvisibleMixin=yr,o.fieldBackgroundMixin=qe,o.flattenObject=_t,o.focusedClasses=_r,o.focusedInvisibleMixin=Ar,o.focusedMixin=ge,o.fullPathToCollectionSegments=Xe,o.getArrayValuesCount=Qi,o.getBracketNotation=Qz,o.getCollectionByPathOrAlias=Io,o.getCollectionPathsCombinations=bo,o.getColorForProperty=Lz,o.getColorScheme=jc,o.getDefaultValueFor=Eo,o.getDefaultValueForDataType=zr,o.getDefaultValuesFor=ao,o.getFieldConfig=Lo,o.getFieldId=at,o.getHashValue=Vr,o.getIcon=Ti,o.getIconForProperty=we,o.getIconForView=Wo,o.getIconForWidget=dt,o.getIdIcon=Oz,o.getLabelOrConfigFrom=vo,o.getLastSegment=Ua,o.getPropertiesWithPropertiesOrder=Mi,o.getPropertyInPath=pn,o.getRandomId=fo,o.getReferenceFrom=In,o.getReferencePreviewKeys=Oi,o.getResolvedPropertyInPath=ut,o.getValueInPath=dn,o.hydrateRegExp=si,o.iconKeys=lc,o.isEmptyObject=Gr,o.isEnumValueDisabled=NG,o.isHidden=io,o.isObject=Bo,o.isPropertyBuilder=We,o.isReadOnly=Nn,o.isReferenceProperty=Ni,o.isValidRegExp=XG,o.joinCollectionLists=UG,o.mergeCollections=Ur,o.mergeDeep=Ze,o.paperMixin=He,o.pick=ii,o.plural=Vz,o.randomColor=JG,o.randomString=Mn,o.removeFunctions=Qr,o.removeInPath=GG,o.removeInitialAndTrailingSlashes=be,o.removeInitialSlash=$t,o.removeTrailingSlash=jt,o.removeUndefined=Wr,o.renderSkeletonCaptionText=EG,o.renderSkeletonIcon=Pr,o.renderSkeletonImageThumbnail=Fr,o.renderSkeletonText=nn,o.resolveArrayProperty=un,o.resolveCollection=Me,o.resolveCollectionPathAliases=tr,o.resolveDefaultSelectedView=$r,o.resolveEnumValues=Tz,o.resolveNavigationFrom=oc,o.resolvePermissions=so,o.resolveProperties=lt,o.resolveProperty=Te,o.resolvePropertyEnum=st,o.sanitizeData=HG,o.saveEntityWithCallbacks=dr,o.segmentsToStrippedPath=li,o.serializeRegExp=ZG,o.singular=Wz,o.slugify=Po,o.sortProperties=Yr,o.stripCollectionPath=jr,o.toKebabCase=$G,o.toSnakeCase=qG,o.traverseValueProperty=Fo,o.traverseValuesProperties=Hr,o.unslugify=za,o.updateDateAutoValues=zG,o.useAuthController=yn,o.useAutoComplete=LH,o.useBreadcrumbsContext=fr,o.useBrowserTitleAndIcon=qa,o.useBuildLocalConfigurationPersistence=TH,o.useBuildModeController=MH,o.useClearRestoreValue=Ne,o.useClipboard=rc,o.useCollectionFetch=ec,o.useCollectionTableController=Ct,o.useDataSource=Qe,o.useDebounce=Do,o.useDebounceValue=xG,o.useEntityFetch=sr,o.useFireCMSContext=re,o.useLargeLayout=Ge,o.useModeController=ur,o.useNavigationContext=Ae,o.useOutsideAlerter=Mo,o.useReferenceDialog=xn,o.useResolvedNavigationFrom=Ya,o.useSelectionController=Bt,o.useSideDialogContext=Uo,o.useSideDialogsController=Xn,o.useSideEntityController=Cn,o.useSnackbarController=cn,o.useStorageSource=Sn,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
|
|
587
|
+
`;function Ro({propertyKey:e,value:t,error:n,showError:o,isSubmitting:l,setValue:i,tableMode:s,property:a,includeDescription:d,underlyingValueHasChanged:f,context:g,disabled:p}){if(J(),!Array.isArray(a.resolvedProperties))throw Error("ArrayCustomShapedFieldBinding misconfiguration. Property `of` not set");const h=a.expanded===void 0?!0:a.expanded;Fe({property:a,value:t,setValue:i});const u=r.jsx(Ce,{icon:pe(a,"small"),required:a.validation?.required,className:"text-text-secondary dark:text-text-secondary-dark",title:a.name}),m=a.resolvedProperties.map((b,y)=>{const C={propertyKey:`${e}[${y}]`,disabled:p,property:b,includeDescription:d,underlyingValueHasChanged:f,context:g,tableMode:!1,partOfArray:!0,partOfBlock:!1,autoFocus:!1};return r.jsx("div",{className:"pb-4",children:r.jsx(it,{...C})},`custom_shaped_array_${y}`)});return r.jsxs(r.Fragment,{children:[!s&&r.jsx(A.ExpandablePanel,{initiallyExpanded:h,title:u,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",children:m}),s&&m,r.jsx(we,{includeDescription:d,showError:o,error:n,disabled:p,property:a})]})}const Zs=({containerRef:e})=>{const{isSubmitting:t,isValidating:n,errors:o}=ke.useFormikContext();return c.useEffect(()=>{const l=Object.keys(o);if(l.length>0&&t&&!n){const i=e?.current?.querySelector(`#form_field_${l[0]}`);if(i&&e?.current){const s=el(e.current);if(s){const d=i.getBoundingClientRect().top;s.scrollTo({top:s.scrollTop+d-64,behavior:"smooth"})}const a=i.querySelector("input");a&&a.focus()}}},[t,n,o,e]),null},Xs=e=>{const t=e&&e.scrollHeight>e.clientHeight,n=e?window.getComputedStyle(e).overflowY:null,o=n&&n.indexOf("hidden")!==-1;return t&&!o},el=e=>!e||e===document.body?document.body:Xs(e)?e:el(e.parentNode);function Ks({customId:e,entityId:t,status:n,onChange:o,error:l,entity:i}){const s=n==="existing"||!e,a=n!=="existing"&&!e,d=c.useMemo(()=>{if(!(!e||typeof e=="boolean"||e==="optional"))return He(e)},[e]),f=Xe(),{copy:g}=io({onSuccess:u=>f.open({type:"success",message:`Copied ${u}`})}),p=J(),h={label:a?"ID is set automatically":"ID",disabled:s,name:"id",value:(i&&n==="existing"?i.id:t)??"",endAdornment:i?r.jsxs(r.Fragment,{children:[r.jsx(A.Tooltip,{title:"Copy",children:r.jsx(A.IconButton,{onClick:u=>g(i.id),"aria-label":"copy-id",children:r.jsx(A.ContentCopyIcon,{size:"small"})})}),p?.entityLinkBuilder&&r.jsx(A.Tooltip,{title:"Open in the console",children:r.jsx(A.IconButton,{component:"a",href:p.entityLinkBuilder({entity:i}),rel:"noopener noreferrer",target:"_blank",onClick:u=>u.stopPropagation(),"aria-label":"go-to-datasource",children:r.jsx(A.OpenInNewIcon,{size:"small"})})})]}):void 0};return r.jsxs(r.Fragment,{children:[d&&r.jsx(A.Select,{error:l,onValueChange:u=>o(u),...h,renderValue:u=>{const m=d.find(b=>b.id===u);return m?`${m.id} - ${m.label}`:u},children:d.map(u=>r.jsx(A.SelectItem,{value:String(u.id),children:r.jsx(Be,{enumKey:u.id,enumValues:d,size:"medium"})},u.id))}),!d&&r.jsx(A.TextField,{...h,error:l,placeholder:e==="optional"?"Autogenerated ID, it can be manually changed":n==="new"||n==="copy"?"ID of the new document":"ID of the document",onChange:u=>{let m=u.target.value;return m&&(m=m.trim()),o(m.length?m:void 0)}}),r.jsx(ke.ErrorMessage,{name:"id",component:"div",children:u=>"You need to specify an ID"})]})}const Rs={icon:r.jsx(A.KeyboardTabIcon,{}),name:"Edit",collapsed:!1,onClick({entity:e,collection:t,context:n,highlightEntity:o,unhighlightEntity:l}){return o?.(e),n.onAnalyticsEvent?.("entity_click",{path:e.path,entityId:e.id}),n.sideEntityController.open({entityId:e.id,path:e.path,collection:t,updateUrl:!0,onClose:()=>l?.(e)}),Promise.resolve(void 0)}},tl={icon:r.jsx(A.FileCopyIcon,{}),name:"Copy",onClick({entity:e,collection:t,context:n,highlightEntity:o,unhighlightEntity:l}){return o?.(e),n.onAnalyticsEvent?.("copy_entity_click",{path:e.path,entityId:e.id}),n.sideEntityController.open({entityId:e.id,path:e.path,copy:!0,collection:t,updateUrl:!0,onClose:()=>l?.(e)}),Promise.resolve(void 0)}},rl={icon:r.jsx(A.DeleteIcon,{}),name:"Delete",onClick({entity:e,fullPath:t,collection:n,context:o,selectionController:l,onCollectionChange:i,sideEntityController:s}){const{closeDialog:a}=o.dialogsController.open({key:"delete_entity_dialog_"+e.id,Component:({open:d})=>{if(!n||!t)throw new Error("deleteEntityAction: Collection is undefined");return r.jsx(Uo,{entityOrEntitiesToDelete:e,path:t,collection:n,callbacks:n.callbacks,open:d,onEntityDelete:()=>{o.onAnalyticsEvent?.("single_entity_deleted",{path:t}),l?.setSelectedEntities(l.selectedEntities.filter(f=>f.id!==e.id)),i?.(),s?.close()},onClose:a})}});return Promise.resolve(void 0)}},nl=c.memo(ea,(e,t)=>e.status===t.status&&e.path===t.path&&ie(e.entity?.values,t.entity?.values));function ea({status:e,path:t,collection:n,entity:o,onEntitySaveRequested:l,onDiscard:i,onModified:s,onValuesChanged:a,onIdChange:d,onFormContextChange:f,hideId:g,autoSave:p,onIdUpdateError:h}){const u=J(),m=Qe(),b=u.plugins,y=c.useMemo(()=>Ie({collection:n,path:t,values:o?.values,fields:u.propertyConfigs}),[o?.values,t]),C=(e==="new"||e==="copy")&&!!y.customId&&y.customId!=="optional",w=c.useMemo(()=>e==="new"||e==="copy"?C?void 0:m.generateEntityId(t):o?.id,[]),E=c.useRef(!1),k=c.useMemo(()=>{const T=y.properties;if((e==="existing"||e==="copy")&&o)return o.values??St(T);if(e==="new")return St(T);throw console.error({status:e,entity:o}),new Error("Form has not been initialised with the correct parameters")},[e,y,o]),[x,S]=c.useState(w),[B,I]=c.useState(!1),[F,Q]=c.useState(),N=c.useRef(o?.values??k),D=N.current,[G,H]=c.useState(D),L=T=>{H(T),a&&a(T),p&&T&&!ie(T,D)&&U(T)};c.useEffect(()=>{x&&d&&d(x)},[x,d]);const q=Ie({collection:n,path:t,entityId:x,values:G,previousValues:D,fields:u.propertyConfigs}),K=n.callbacks?.onIdUpdate;c.useEffect(()=>{if(K&&G&&(e==="new"||e==="copy"))try{const T=K({collection:q,path:t,entityId:x,values:G,context:u});S(T)}catch(T){h&&h(T),console.error(T)}},[x,G,e]);const W=c.useMemo(()=>D&&e==="existing"?Object.entries(q.properties).map(([T,V])=>{if(xt(V))return{};const $=D[T],Z=k[T];return ie($,Z)?{}:{[T]:Z}}).reduce((T,V)=>({...T,...V}),{}):{},[k,q.properties,D,e]),U=T=>l({collection:q,path:t,entityId:x,values:T,previousValues:o?.values,closeAfterSave:E.current,autoSave:p??!1}).then(V=>{const $=e==="new"?"new_entity_saved":e==="copy"?"entity_copied":e==="existing"?"entity_edited":"unmapped_event";u.onAnalyticsEvent?.($,{path:t}),N.current=T}).catch(V=>{console.error(V),Q(V)}).finally(()=>{E.current=!1}),X=(T,V)=>{if(C&&!x){console.error("Missing custom Id"),I(!0),V.setSubmitting(!1);return}if(Q(void 0),I(!1),e==="existing"){if(!o?.id)throw Error("Form misconfiguration when saving, no id for existing entity")}else if(e==="new"||e==="copy"){if(n.customId&&n.customId!=="optional"&&!x)throw Error("Form misconfiguration when saving, entityId should be set")}else throw Error("New FormType added, check EntityForm");U(T)?.then($=>{V.resetForm({values:T,submitCount:0,touched:{}})}).finally(()=>{V.setSubmitting(!1)})},Y=c.useCallback(({name:T,value:V,property:$})=>m.checkUniqueField(t,T,V,x),[m,t,x]),j=c.useMemo(()=>x?To(x,q.properties,Y):void 0,[x,q.properties,Y]),re=qe(),ce=c.useCallback(({entity:T,customEntityActions:V})=>{const $=ft(n,re,Pe(t),null),Z=T?qt(n,re,Pe(t),T):!0,P=[];return $&&P.push(tl),Z&&P.push(rl),V&&P.push(...V),P},[re,n,t]);return r.jsx(ke.Formik,{initialValues:k,onSubmit:X,validationSchema:j,validate:T=>console.debug("Validating",T),onReset:()=>i&&i(),children:T=>{const V=[],$={setFieldValue:T.setFieldValue,values:T.values,collection:q,entityId:x,path:t,save:U};if(c.useEffect(()=>{f&&f($)},[f,$]),b&&n){const Z={entityId:x,path:t,status:e,collection:n,context:u,currentEntityId:x,formContext:$};V.push(...b.map((P,M)=>P.form?.Actions?r.jsx(P.form.Actions,{...Z},`actions_${P.name}`):null).filter(Boolean))}return r.jsxs("div",{className:"h-full overflow-auto",children:[V.length>0&&r.jsx("div",{className:A.cn("w-full flex justify-end items-center sticky top-0 right-0 left-0 z-10 bg-opacity-60 bg-slate-200 dark:bg-opacity-60 dark:bg-slate-800 backdrop-blur-md"),children:V}),r.jsxs("div",{className:"pl-4 pr-4 pt-12 pb-16 md:pl-8",children:[r.jsx("div",{className:`w-full py-2 flex items-center mt-${4+(V?8:0)} lg:mt-${8+(V?8:0)} mb-8`,children:r.jsx(A.Typography,{className:"mt-4 flex-grow "+n.hideIdFromForm?"mb-2":"mb-0",variant:"h4",children:n.singularName??n.name})}),!g&&r.jsx(Ks,{customId:n.customId,entityId:x,status:e,onChange:S,error:B,entity:o}),x&&r.jsx(ta,{...T,initialValues:D,onModified:s,onValuesChanged:L,underlyingChanges:W,entity:o,resolvedCollection:q,formContext:$,status:e,savingError:F,closeAfterSaveRef:E,autoSave:p,entityActions:ce({entity:o,customEntityActions:n.entityActions})})]})]})}})}function ta(e){const{values:t,onModified:n,onValuesChanged:o,underlyingChanges:l,formContext:i,entity:s,touched:a,setFieldValue:d,resolvedCollection:f,isSubmitting:g,status:p,handleSubmit:h,savingError:u,dirty:m,closeAfterSaveRef:b,autoSave:y,entityActions:C}=e,w=J(),E=C.filter(F=>F.includeInForm===void 0||F.includeInForm),k=Ze(),x=m;c.useEffect(()=>{n&&n(x),o&&o(t)},[x,t]),c.useEffect(()=>{!y&&l&&s&&Object.entries(l).forEach(([F,Q])=>{const N=t[F];!ie(Q,N)&&!a[F]&&(console.debug("Updated value from the datasource:",F,Q),d(F,Q!==void 0?Q:null))})},[y,l,s,t,a,d]);const S=r.jsx("div",{className:"flex flex-col gap-8",children:(f.propertiesOrder??Object.keys(f.properties)).map(F=>{const Q=f.properties[F];if(!Q)return console.warn(`Property ${F} not found in collection ${f.name}`),null;const N=!!l&&Object.keys(l).includes(F)&&!!a[F],D=!y&&g||dt(Q)||!!Q.disabled;if(xt(Q))return null;const H={propertyKey:F,disabled:D,property:Q,includeDescription:Q.description||Q.longDescription,underlyingValueHasChanged:N&&!y,context:i,tableMode:!1,partOfArray:!1,partOfBlock:!1,autoFocus:!1};return r.jsx("div",{id:`form_field_${F}`,children:r.jsx(te,{children:r.jsx(it,{...H})})},`field_${f.name}_${F}`)}).filter(Boolean)}),B=g||!x&&p==="existing",I=c.useRef(null);return r.jsxs(ke.Form,{onSubmit:h,noValidate:!0,children:[r.jsxs("div",{className:"mt-12",ref:I,children:[S,r.jsx(Zs,{containerRef:I})]}),r.jsx("div",{className:"h-14"}),!y&&r.jsxs(A.DialogActions,{position:"absolute",children:[u&&r.jsx("div",{className:"text-right",children:r.jsx(A.Typography,{color:"error",children:u.message})}),s&&E.length>0&&r.jsx("div",{className:"flex-grow flex overflow-auto no-scrollbar",children:E.map(F=>r.jsx(A.IconButton,{color:"primary",onClick:Q=>{Q.stopPropagation(),s&&F.onClick({entity:s,fullPath:f.path,collection:f,context:w,sideEntityController:k})},children:F.icon},F.name))}),r.jsx(A.Button,{variant:"text",disabled:B,type:"reset",children:p==="existing"?"Discard":"Clear"}),r.jsxs(A.Button,{variant:"text",color:"primary",type:"submit",disabled:B,onClick:()=>{b.current=!1},children:[p==="existing"&&"Save",p==="copy"&&"Create copy",p==="new"&&"Create"]}),r.jsxs(A.Button,{variant:"filled",color:"primary",type:"submit",disabled:B,onClick:()=>{b.current=!0},children:[p==="existing"&&"Save and close",p==="copy"&&"Create copy and close",p==="new"&&"Create and close"]})]})]})}function ra(e){return e.open?r.jsx(na,{...e}):null}function na({tableKey:e,entity:t,customFieldValidator:n,propertyKey:o,collection:l,path:i,cellRect:s,open:a,onClose:d,onCellValueChange:f,container:g}){const p=Qe(),h=J(),[u,m]=c.useState(),[b,y]=c.useState(),C=t?.id,[w,E]=c.useState(t);c.useEffect(()=>C&&l?p.listenEntity?.({path:i,entityId:C,collection:l,onUpdate:U=>{E(U),x(U?.values)}}):()=>{},[p,C,l,i,a]);const[k,x]=c.useState(w?.values),S=l?Ie({collection:l,path:i,values:k,entityId:C,fields:h.propertyConfigs}):void 0,B=Ns(),I=c.useRef(null),F=c.useRef(null),Q=c.useRef(!1),N=c.useCallback(()=>{if(!s)throw Error("getInitialLocation error");return{x:s.left<B.width-s.right?s.x+s.width/2:s.x-s.width/2,y:s.top<B.height-s.bottom?s.y+s.height/2:s.y-s.height/2}},[s,B.height,B.width]),D=c.useCallback(({x:U,y:X})=>{const Y=I.current?.getBoundingClientRect();if(!Y)throw Error("normalizePosition called before draggableBoundingRect is set");return{x:Math.max(0,Math.min(U,B.width-Y.width)),y:Math.max(0,Math.min(X,B.height-Y.height))}},[B]),G=c.useCallback(U=>{const X=I.current?.getBoundingClientRect();if(!s||!X)return;const Y=U??D(N());(!b||Y.x!==b.x||Y.y!==b.y)&&y(Y)},[s,N,D,b]);Fs({containerRef:I,innerRef:F,x:b?.x,y:b?.y,onMove:G}),c.useEffect(()=>{Q.current=!1},[o,w]),c.useLayoutEffect(()=>{const U=I.current?.getBoundingClientRect();!s||!U||Q.current||(G(),Q.current=!0)},[s,G,Q.current]),c.useLayoutEffect(()=>{G(b)},[B,s]);const H=c.useMemo(()=>{if(!(!S||!C))return To(C,o&&S.properties[o]?{[o]:S.properties[o]}:{},n)},[S,C,o,n]),L=c.useCallback(()=>G(b),[b,G]),q=async U=>(m(null),l&&w&&f&&o?f({value:U[o],propertyKey:o,entity:w,setError:m,onValueUpdated:()=>{},fullPath:i,context:h}):Promise.resolve());if(!w)return r.jsx(r.Fragment,{});const K=w&&r.jsxs("div",{className:`text-gray-900 dark:text-white overflow-auto rounded rounded-md bg-white dark:bg-gray-950 ${a?"":"hidden"} cursor-grab max-w-[100vw]`,children:[r.jsx(ke.Formik,{initialValues:w?.values??{},enableReinitialize:!0,validationSchema:H,validateOnMount:!0,validate:U=>console.debug("Validating",U),onSubmit:(U,X)=>{q(U).then(()=>d()).finally(()=>X.setSubmitting(!1))},children:({values:U,setFieldValue:X,handleSubmit:Y,isSubmitting:j})=>{if(c.useEffect(()=>{ie(U,k)||x(U)},[U]),!w)return r.jsx(me,{error:"PopupFormField misconfiguration"});if(!S)return r.jsx(r.Fragment,{});const re=j,ce={collection:S,entityId:C,values:U,path:i,setFieldValue:X,save:q},T=o&&ot(S.properties,o),V=o&&T?{propertyKey:o,disabled:j||dt(T)||!!T.disabled,property:T,includeDescription:!1,underlyingValueHasChanged:!1,context:ce,tableMode:!0,partOfArray:!1,partOfBlock:!1,autoFocus:a}:void 0;let $=r.jsx(r.Fragment,{children:r.jsx("div",{className:"w-[560px] max-w-full max-h-[85vh]",children:r.jsxs(ke.Form,{onSubmit:Y,noValidate:!0,children:[r.jsx("div",{className:"mb-1 p-4 flex flex-col relative",children:r.jsx("div",{ref:F,className:"cursor-auto",style:{cursor:"auto !important"},children:V&&r.jsx(it,{...V})})}),r.jsx(A.DialogActions,{children:r.jsx(A.Button,{variant:"filled",color:"primary",type:"submit",disabled:re,children:"Save"})})]})},`popup_form_${e}_${C}_${o}`)});const Z=h.plugins;return Z&&Z.forEach(P=>{P.form?.provider&&($=r.jsx(P.form.provider.Component,{status:"existing",path:i,collection:S,entity:w,context:h,currentEntityId:C,formContext:ce,...P.form.provider.props,children:$}))}),$}}),u&&r.jsx(A.Typography,{color:"error",children:u.message})]}),W=r.jsxs("div",{style:{boxShadow:"0 0 0 2px rgba(128,128,128,0.2)"},className:`inline-block fixed z-20 shadow-outline rounded-md bg-white dark:bg-gray-950 ${a?"visible":"invisible"} cursor-grab overflow-visible`,ref:I,children:[r.jsx(Ts,{onResize:L}),r.jsxs("div",{className:"overflow-hidden",children:[K,r.jsx("div",{className:"absolute -top-3.5 -right-3.5 bg-gray-500 rounded-full",style:{width:"32px",height:"32px"},children:r.jsx(A.IconButton,{size:"small",onClick:U=>{U.stopPropagation(),d()},children:r.jsx(A.ClearIcon,{className:"text-white",size:"small"})})})]})]},`draggable_${o}_${C}_${a}`);return r.jsx(Nl.Root,{asChild:!0,container:g,children:W})}const oa="collectionGroupParent",An=c.memo(function({fullPath:t,parentCollectionIds:n,isSubCollection:o,className:l,...i}){const s=Qe(),a=ae(),d=Ze(),f=qe(),g=gt(),p=J(),h=c.useRef(null),u=c.useMemo(()=>{const _=g?.getCollectionConfig(t);return _?Te(i,_):i},[i,t,g?.getCollectionConfig]),m=ft(u,f,Pe(t),null),[b,y]=c.useState(void 0),[C,w]=c.useState(void 0),[E,k]=c.useState(!1),[x,S]=c.useState(0),[B,I]=c.useState(0),F=c.useCallback(()=>{const _=b;setTimeout(()=>{_===b&&y(void 0)},2400)},[b]),Q=c.useCallback(_=>Fr(u,f,Pe(t),_??null)?u.inlineEditing===void 0||u.inlineEditing:!1,[u,f,t]),N=u.selectionEnabled===void 0||u.selectionEnabled,D=!Q(),[G,H]=c.useState(!1),L=fn(),q=u.selectionController??L,{selectedEntities:K,toggleEntitySelection:W,isEntitySelected:U,setSelectedEntities:X}=q;c.useEffect(()=>{w(void 0)},[K]);const Y=rn({fullPath:t,collection:u,entitiesDisplayedFirst:[],lastDeleteTimestamp:x}),j=c.useRef(Math.random().toString(36)),re=Y.popupCell,ce=c.useCallback(()=>{Y.setPopupCell?.(void 0)},[Y.setPopupCell]),T=c.useCallback(_=>(y(_),p.onAnalyticsEvent?.("edit_entity_clicked",{path:_.path,entityId:_.id}),d.open({entityId:_.id,path:_.path,collection:u,updateUrl:!0,onClose:F})),[t,u,d]),V=c.useCallback(()=>{p.onAnalyticsEvent?.("new_entity_click",{path:t}),d.open({path:t,collection:u,updateUrl:!0,onClose:F})},[t,u,d]);c.useCallback(_=>{p.onAnalyticsEvent?.("single_delete_dialog_open",{path:t}),w(_)},[p,t]);const $=c.useCallback(()=>{p.onAnalyticsEvent?.("multiple_delete_dialog_open",{path:t}),w(K)},[p,t,K]),Z=c.useCallback((_,R)=>{p.onAnalyticsEvent?.("single_entity_deleted",{path:t}),X(oe=>oe.filter(O=>O.id!==R.id)),S(Date.now())},[p,t,X]),P=c.useCallback((_,R)=>{p.onAnalyticsEvent?.("multiple_entities_deleted",{path:t}),X([]),w(void 0),S(Date.now())},[X]);let M;p?.plugins&&(M=p.plugins.find(_=>_.collectionView?.AddColumnComponent)?.collectionView?.AddColumnComponent);const ne=c.useCallback((_,R)=>{if(g){const oe=g.getCollectionConfig(_),O=Te(oe,R);g.onCollectionModified(_,O)}},[g]),fe=c.useCallback(({width:_,key:R})=>{if(!ot(u.properties,R))return;const oe=ol(R,_);ne(t,oe)},[u,ne,t]),Ge=c.useCallback(_=>{g&&ne(t,{defaultSize:_})},[ne,t,g]),be=ft(u,f,Pe(t),null),ge=c.useCallback(({name:_,value:R,property:oe,entityId:O})=>s.checkUniqueField(t,_,R,O),[t]),Ct=({fullPath:_,context:R,value:oe,propertyKey:O,onValueUpdated:ee,setError:se,entity:Ee})=>{const le=ke.setIn({...Ee.values},O,oe),Ye={path:_,entityId:Ee.id,values:le,previousValues:Ee.values,collection:u,status:"existing"};return Dr({...Ye,collection:u,callbacks:u.callbacks,dataSource:s,context:R,onSaveSuccess:()=>ee(),onSaveFailure:Oe=>{console.error("Save failure"),console.error(Oe),se(Oe)}})},Re=a.resolveAliasesFrom(t),_e=c.useMemo(()=>Ie({collection:u,path:t,fields:p.propertyConfigs}),[u,t]),ze=c.useCallback(({propertyKey:_,propertyValue:R,entity:oe})=>{let O=ot(u.properties,_);return O||(O=ot(_e.properties,_)),Se({propertyKey:_,propertyOrBuilder:O,path:t,propertyValue:R,values:oe.values,entityId:oe.id,fields:p.propertyConfigs})},[u.properties,p.propertyConfigs,t,_e.properties]),Qt=Go(_e,!0),Mt=c.useMemo(()=>{const _=u.subcollections?.map(oe=>({key:jr(oe),name:oe.name,width:200,dependencies:[],Builder:({entity:O})=>r.jsx(A.Button,{color:"primary",variant:"outlined",startIcon:r.jsx(A.KeyboardTabIcon,{size:"small"}),onClick:ee=>{ee.stopPropagation(),d.open({path:t,entityId:O.id,selectedSubPath:oe.id??oe.path,collection:u,updateUrl:!0})},children:oe.name})}))??[],R=u.collectionGroup?[{key:oa,name:"Parent entities",width:260,dependencies:[],Builder:({entity:oe})=>{const O=a.getParentReferencesFromPath(oe.path);return r.jsx(r.Fragment,{children:O.map(ee=>r.jsx(Ve,{reference:ee,size:"tiny"},ee.path+"/"+ee.id))})}}]:[];return[...u.additionalFields??[],..._,...R]},[u,t]),Et=c.useCallback(()=>{S(Date.now())},[]),et=Me(),st=c.useCallback(({entity:_,customEntityActions:R})=>{const oe=_?qt(u,f,Pe(t),_):!0,O=[Rs];return be&&O.push(tl),oe&&O.push(rl),R&&O.push(...R),O},[f,u,be,t]),Dt=c.useCallback(()=>{const _=st({}),R=_.filter(ee=>ee.collapsed!==!1),O=_.filter(ee=>ee.collapsed===!1).length*(et?40:30);return(et?80+O:70+O)+(R.length>0?et?40:30:0)},[et,st]),tt=c.useCallback(({entity:_,size:R,width:oe,frozen:O})=>{const ee=U(_),se=st({entity:_,customEntityActions:u.entityActions});return r.jsx(Xr,{entity:_,width:oe,frozen:O,isSelected:ee,selectionEnabled:N,size:R,highlightEntity:y,unhighlightEntity:F,collection:u,fullPath:t,actions:se,hideId:u?.hideIdFromCollection,onCollectionChange:Et,selectionController:q})},[U,u,f,t,N,W,be]),z=r.jsx(A.Popover,{open:G,onOpenChange:H,enabled:!!u.description,trigger:r.jsxs("div",{className:"flex flex-col items-start",children:[r.jsx(A.Typography,{variant:"subtitle1",className:`leading-none truncate max-w-[160px] lg:max-w-[240px] ${u.description?"cursor-pointer":"cursor-auto"}`,onClick:u.description?_=>{H(!0),_.stopPropagation()}:void 0,children:`${u.name}`}),r.jsx(la,{fullPath:t,collection:u,filter:Y.filterValues,sortBy:Y.sortBy,onCountChange:I})]}),children:u.description&&r.jsx("div",{className:"m-4 text-gray-900 dark:text-white",children:r.jsx(A.Markdown,{source:u.description})})});function he({property:_,propertyKey:R,onHover:oe}){return p.plugins?r.jsx(r.Fragment,{children:p.plugins.filter(O=>O.collectionView?.HeaderAction).map((O,ee)=>{const se=O.collectionView.HeaderAction;return r.jsx(se,{onHover:oe,propertyKey:R,property:_,fullPath:t,collection:u,parentCollectionIds:n??[]},`plugin_header_action_${ee}`)})}):null}const ue=M?function(){return typeof M=="function"?r.jsx(M,{fullPath:t,parentCollectionIds:n??[],collection:u}):null}:void 0,[De,rt]=c.useState(!1);let We,Le=!!u.textSearchEnabled;return p?.plugins&&(We=p.plugins?.find(R=>!!R.collectionView?.onTextSearchClick)?()=>{k(!0),Promise.all(p.plugins?.map(R=>R.collectionView?.onTextSearchClick?R.collectionView.onTextSearchClick({context:p,path:Re,collection:u}):Promise.resolve(!0))).then(R=>{R.every(Boolean)&&rt(!0)}).finally(()=>k(!1))}:void 0,p.plugins?.forEach(R=>{Le||R.collectionView?.showTextSearchBar&&(Le=R.collectionView.showTextSearchBar({context:p,path:Re,collection:u}))})),r.jsxs("div",{className:A.cn("overflow-hidden h-full w-full",l),ref:h,children:[r.jsx(tn,{additionalFields:Mt,tableController:Y,displayedColumnIds:Qt,onSizeChanged:Ge,onEntityClick:T,onColumnResize:fe,onValueChange:Ct,tableRowActionsBuilder:tt,uniqueFieldValidator:ge,title:z,selectionController:q,highlightedEntities:b?[b]:[],defaultSize:u.defaultSize,properties:_e.properties,getPropertyFor:ze,onTextSearchClick:De?void 0:We,textSearchLoading:E,textSearchEnabled:Le,actions:r.jsx(Is,{parentCollectionIds:n??[],collection:u,tableController:Y,onMultipleDeleteClick:$,onNewClick:V,path:t,relativePath:u.path,selectionController:q,selectionEnabled:N,collectionEntitiesCount:B}),emptyComponent:m&&Y.filterValues===void 0&&Y.sortBy===void 0?r.jsxs("div",{className:"flex flex-col items-center justify-center",children:[r.jsx(A.Typography,{variant:"subtitle2",children:"So empty..."}),r.jsxs(A.Button,{color:"primary",variant:"outlined",onClick:V,className:"mt-4",children:[r.jsx(A.AddIcon,{}),"Create your first entity"]})]}):r.jsx(A.Typography,{variant:"label",children:"No results with the applied filter/sort"}),hoverRow:D,inlineEditing:Q(),AdditionalHeaderWidget:he,AddColumnComponent:ue,getIdColumnWidth:Dt,additionalIDHeaderWidget:r.jsx(ia,{path:t,collection:u})},`collection_table_${t}`),r.jsx(ra,{open:!!re,onClose:ce,cellRect:re?.cellRect,propertyKey:re?.propertyKey,collection:u,entity:re?.entity,tableKey:j.current,customFieldValidator:ge,path:Re,onCellValueChange:Ct,container:h.current},`popup_form_${re?.propertyKey}_${re?.entity?.id}`),C&&r.jsx(Uo,{entityOrEntitiesToDelete:C,path:t,collection:u,callbacks:u.callbacks,open:!!C,onEntityDelete:Z,onMultipleEntitiesDelete:P,onClose:()=>w(void 0)})]})},ie);function fn(){const[e,t]=c.useState([]),n=c.useCallback(l=>{let i;e.map(s=>s.id).includes(l.id)?i=e.filter(s=>s.id!==l.id):i=[...e,l],t(i)},[e]),o=c.useCallback(l=>e.map(i=>i.id).includes(l.id),[e]);return{selectedEntities:e,setSelectedEntities:t,isEntitySelected:o,toggleEntitySelection:n}}function la({fullPath:e,collection:t,filter:n,sortBy:o,onCountChange:l}){const i=Qe(),s=ae(),[a,d]=c.useState(void 0),[f,g]=c.useState(void 0),p=o?o[0]:void 0,h=o?o[1]:void 0,u=c.useMemo(()=>s.resolveAliasesFrom(e),[e,s.resolveAliasesFrom]);return c.useEffect(()=>{i.countEntities({path:u,collection:t,filter:n,orderBy:p,order:h}).then(d).catch(g)},[e,i,u,t,n,p,h]),c.useEffect(()=>{l&&l(a??0)},[l,a]),f?null:r.jsx(A.Typography,{className:"w-full text-ellipsis block overflow-hidden whitespace-nowrap max-w-xs text-left w-fit-content",variant:"caption",color:"secondary",children:a!==void 0?`${a} entities`:r.jsx(A.Skeleton,{className:"w-full max-w-[80px] mt-1"})})}function ol(e,t){if(e.includes(".")){const[n,...o]=e.split(".");return{properties:{[n]:ol(o.join("."),t)}}}return{properties:{[e]:{columnWidth:t}}}}function ia({collection:e,path:t}){const[n,o]=c.useState(!1),[l,i]=c.useState(""),s=Ze();return r.jsx(A.Tooltip,{title:n?void 0:"Find by ID",children:r.jsx(A.Popover,{open:n,onOpenChange:o,trigger:r.jsx(A.IconButton,{size:"small",children:r.jsx(A.SearchIcon,{size:"small"})}),children:r.jsx("form",{noValidate:!0,onSubmit:a=>{if(a.preventDefault(),!!l)return o(!1),s.open({entityId:l,path:t,collection:e,updateUrl:!0})},className:"text-gray-900 dark:text-white w-96 max-w-full",children:r.jsxs("div",{className:"flex p-4 w-full gap-4",children:[r.jsx(A.TextField,{placeholder:"Find entity by ID",size:"small",onChange:a=>i(a.target.value),value:l,className:"flex-grow"}),r.jsx(A.Button,{variant:"outlined",disabled:!l,type:"submit",children:"Go"})]})})})})}function ll({onSingleEntitySelected:e,onMultipleEntitiesSelected:t,multiselect:n,collection:o,path:l,selectedEntityIds:i,description:s,forceFilter:a,maxSelection:d}){const f=lr(),g=Ze(),p=ae(),h=J(),u=p.resolveAliasesFrom(l),m=Qe(),[b,y]=c.useState([]),C=fn();c.useEffect(()=>{let N=!1;const D=i?.map(G=>G?.toString()).filter(Boolean);return D&&o?Promise.all(D.map(G=>m.fetchEntity({path:u,entityId:G,collection:o}))).then(G=>{if(!N){const H=G.filter(L=>L!==void 0);C.setSelectedEntities(H),y(H)}}):(C.setSelectedEntities([]),y([])),()=>{N=!0}},[m,u,i,o,C.setSelectedEntities]);const w=()=>{h.onAnalyticsEvent?.("reference_selection_clear",{path:u}),C.setSelectedEntities([]),!n&&e?e(null):t&&t([])},E=N=>{console.debug("ReferenceSelectionInner toggleEntitySelection",N);let D;const G=C.selectedEntities;if(h.onAnalyticsEvent?.("reference_selection_toggle",{path:u,entityId:N.id}),G){if(G.map(H=>H.id).indexOf(N.id)>-1)D=G.filter(H=>H.id!==N.id);else{if(d&&G.length>=d)return;D=[...G,N]}C.setSelectedEntities(D),t&&t(D)}},k=N=>{console.debug("ReferenceSelectionInner onEntityClick",N),!n&&e?(h.onAnalyticsEvent?.("reference_selected_single",{path:u,entityId:N.id}),e(N),f.close(!1)):E(N)},x=()=>{h.onAnalyticsEvent?.("reference_selection_new_entity",{path:u}),g.open({path:u,collection:o,updateUrl:!0,onUpdate:({entity:N})=>{y([N,...b]),k(N)},closeOnSave:!0})},S=({entity:N,size:D,width:G,frozen:H})=>{const L=C.selectedEntities,q=L&&L.map(K=>K.id).indexOf(N.id)>-1;return r.jsx(Xr,{width:G,frozen:H,entity:N,size:D,isSelected:q,selectionEnabled:n,hideId:o?.hideIdFromCollection,fullPath:u,selectionController:C})},B=c.useCallback(N=>{N.stopPropagation(),f.close(!1)},[f]);if(!o)return r.jsx(me,{error:"Could not find collection with id "+o});const I=c.useMemo(()=>Ie({collection:o,path:u,values:{},fields:h.propertyConfigs}),[o,h.propertyConfigs,u]),F=Go(I,!1),Q=rn({fullPath:u,collection:o,entitiesDisplayedFirst:b,forceFilter:a});return r.jsxs("div",{className:"flex flex-col h-full",children:[r.jsx("div",{className:"flex-grow",children:b&&r.jsx(tn,{displayedColumnIds:F,onEntityClick:k,tableController:Q,tableRowActionsBuilder:S,title:r.jsx(A.Typography,{variant:"subtitle2",children:o.singularName?`Select ${o.singularName}`:`Select from ${o.name}`}),defaultSize:o.defaultSize,properties:I.properties,forceFilter:a,inlineEditing:!1,selectionController:C,actions:r.jsx(sa,{collection:o,path:u,onNewClick:x,onClear:w})})}),r.jsxs(A.DialogActions,{translucent:!1,children:[s&&r.jsx(A.Typography,{variant:"body2",className:"flex-grow text-left",children:s}),r.jsx(A.Button,{onClick:B,color:"primary",variant:"filled",children:"Done"})]})]})}function sa({collection:e,path:t,onClear:n,onNewClick:o}){const l=qe(),i=Me(),s=o?d=>{d.preventDefault(),o()}:void 0,a=ft(e,l,Pe(t),null)&&s&&(i?r.jsxs(A.Button,{onClick:s,startIcon:r.jsx(A.AddIcon,{}),variant:"outlined",color:"primary",children:["Add ",e.singularName??e.name]}):r.jsx(A.Button,{onClick:s,size:"medium",variant:"outlined",color:"primary",children:r.jsx(A.AddIcon,{})}));return r.jsxs(r.Fragment,{children:[r.jsx(A.Button,{onClick:n,variant:"text",color:"primary",children:"Clear"}),a]})}function un({children:e,group:t}){const n=gt();return r.jsx(A.ExpandablePanel,{invisible:!0,titleClassName:"font-medium text-sm text-gray-600 dark:text-gray-400",className:"py-4",initiallyExpanded:!(n?.collapsedGroups??[]).includes(t??"ungrouped"),onExpandedChange:o=>{if(n)if(o)n.setCollapsedGroups((n.collapsedGroups??[]).filter(l=>l!==(t??"ungrouped")));else{const l=(n.collapsedGroups??[]).concat(t??"ungrouped");n.setCollapsedGroups(l)}},title:r.jsx(A.Typography,{color:"secondary",className:"font-medium ml-1",children:t?.toUpperCase()??"Views".toUpperCase()}),children:r.jsx("div",{className:"mb-8",children:e})})}function il({view:e,path:t,collection:n,url:o,name:l,description:i,onClick:s}){const a=gt(),d=Zt(n??e),f=de.useNavigate(),g=J(),p=(a?.favouritePaths??[]).includes(t);let h;if(g.plugins&&n){const u={path:t,collection:n,context:g};h=r.jsx(r.Fragment,{children:g.plugins.map((m,b)=>m.homePage?.CollectionActions?r.jsx(m.homePage.CollectionActions,{...u,extraProps:m.homePage.extraProps},`actions_${b}`):null)})}return r.jsx(A.Card,{className:A.cn("h-full p-4 cursor-pointer min-h-[230px]"),onClick:()=>{s?.(),f(o),a&&a.setRecentlyVisitedPaths([t,...(a.recentlyVisitedPaths??[]).filter(u=>u!==t)])},children:r.jsxs("div",{className:"flex flex-col items-start h-full",children:[r.jsxs("div",{className:"flex-grow w-full",children:[r.jsxs("div",{className:"h-10 flex items-center w-full justify-between text-gray-300 dark:text-gray-600",children:[d,r.jsxs("div",{className:"flex items-center gap-1",onClick:u=>{u.preventDefault(),u.stopPropagation()},children:[h,a&&r.jsx(A.IconButton,{onClick:u=>{u.preventDefault(),u.stopPropagation(),p?a.setFavouritePaths(a.favouritePaths.filter(m=>m!==t)):a.setFavouritePaths([...a.favouritePaths,t])},children:p?r.jsx(A.StarIcon,{size:18,className:"text-secondary"}):r.jsx(A.StarBorderIcon,{size:18,className:"text-gray-400 dark:text-gray-500"})})]})]}),r.jsx(A.Typography,{gutterBottom:!0,variant:"h5",component:"h2",children:l}),i&&r.jsx(A.Typography,{variant:"body2",color:"secondary",component:"div",children:r.jsx(A.Markdown,{source:i})})]}),r.jsx("div",{style:{alignSelf:"flex-end"},children:r.jsx("div",{className:"p-4",children:r.jsx(A.ArrowForwardIcon,{className:"text-primary"})})})]})})}function aa({entry:e}){const t=de.useNavigate(),n=gt();if(!n)return null;const o=n.favouritePaths.includes(e.path),l=i=>{i.preventDefault(),i.stopPropagation(),o?n.setFavouritePaths(n.favouritePaths.filter(s=>s!==e.path)):n.setFavouritePaths([...n.favouritePaths,e.path])};return r.jsx(A.Chip,{onClick:()=>t(e.url),icon:o?r.jsx(A.StarIcon,{onClick:l,size:18,className:"text-secondary"}):r.jsx(A.StarBorderIcon,{onClick:l,size:18,className:"text-gray-400 dark:text-gray-500"}),children:e.name},e.path)}function ca({hidden:e}){const t=ae(),n=gt();if(!n)return null;const o=(n?.favouritePaths??[]).map(l=>t.topLevelNavigation?.navigationEntries.find(i=>i.path===l)).filter(Boolean);return r.jsx(A.Collapse,{in:o.length>0,children:r.jsx("div",{className:"flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]",children:o.map(l=>r.jsx(aa,{entry:l},l.path))})})}const gn={};function da(){const e=de.useLocation(),t=c.useRef(null),[n,o]=c.useState(0),[l,i]=c.useState("down"),s=c.useCallback(()=>{!t.current||!e.key||(gn[e.key]=t.current.scrollTop,o(t.current.scrollTop),i(t.current.scrollTop>n?"down":"up"))},[t,e.key,n]);return c.useEffect(()=>{const a=t.current;if(a)return a.addEventListener("scroll",s,{passive:!0}),()=>{a&&a.removeEventListener("scroll",s)}},[t,s,e]),c.useEffect(()=>{!t.current||!gn[e.key]||t.current.scrollTo({top:gn[e.key],behavior:"auto"})},[e]),{containerRef:t,scroll:n,direction:l}}const vt=new Fl.Search("url");vt.addIndex("name"),vt.addIndex("description"),vt.addIndex("group"),vt.addIndex("path");function sl({additionalActions:e,additionalChildrenStart:t,additionalChildrenEnd:n}){const o=J(),l=ae();if(!l.topLevelNavigation)throw Error("Navigation not ready in FireCMSHomePage");const{containerRef:i,scroll:s,direction:a}=da(),{navigationEntries:d,groups:f}=l.topLevelNavigation,[g,p]=c.useState(null),h=g?d.filter(w=>g.includes(w.url)):d;c.useEffect(()=>{vt.addDocuments(d)},[d]);const u=c.useCallback(w=>{if(!w||w==="")p(null);else{const E=vt.search(w);p(E.map(k=>k.url))}},[]),m=[...f];(h.filter(w=>!w.group).length>0||h.length===0)&&m.push(void 0);let b,y,C;if(o.plugins){const w={context:o};C=r.jsx(r.Fragment,{children:o.plugins.filter(E=>E.homePage?.includeSection).map((E,k)=>{const x=E.homePage.includeSection(w);return r.jsx(un,{group:x.title,children:x.children},`plugin_section_${E.name}`)})}),b=r.jsx("div",{className:"flex flex-col gap-2",children:o.plugins.filter(E=>E.homePage?.additionalChildrenStart).map((E,k)=>r.jsx("div",{children:E.homePage.additionalChildrenStart},`plugin_children_start_${k}`))}),y=r.jsx("div",{className:"flex flex-col gap-2",children:o.plugins.filter(E=>E.homePage?.additionalChildrenEnd).map((E,k)=>r.jsx("div",{children:E.homePage.additionalChildrenEnd},`plugin_children_start_${k}`))})}return r.jsx("div",{id:"home_page",ref:i,className:"py-2 overflow-auto h-full w-full",children:r.jsxs(A.Container,{maxWidth:"6xl",children:[r.jsxs("div",{className:"w-full sticky py-4 transition-all duration-400 ease-in-out top-0 z-10 flex flex-row gap-4",style:{top:a==="down"?-84:0},children:[r.jsx(A.SearchBar,{onTextSearch:u,placeholder:"Search collections",large:!1,innerClassName:"w-full",className:"w-full flex-grow"}),e]}),r.jsx(ca,{hidden:!!g}),t,b,m.map((w,E)=>{const k=[],x={group:w,context:o};o.plugins&&o.plugins.forEach(B=>{B.homePage?.AdditionalCards&&k.push(...tr(B.homePage?.AdditionalCards))});const S=h.filter(B=>B.group===w||!B.group&&w===void 0);return S.length===0&&k.length===0?null:r.jsx(un,{group:w,children:r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[S.map(B=>r.jsx("div",{className:"col-span-1",children:r.jsx(il,{...B,onClick:()=>{const I=B.type==="collection"?"home_navigate_to_collection":B.type==="view"?"home_navigate_to_view":"unmapped_event";o.onAnalyticsEvent?.(I,{path:B.path})}})},`nav_${B.group}_${B.name}`)),k&&k.map((B,I)=>r.jsx("div",{children:r.jsx(B,{...x})},`nav_${w}_add_${I}`))]})},`plugin_section_${w}`)}),C,y,n]})})}function Aa({propertyConfig:e}){const t="h-8 w-8 p-1 rounded-full shadow text-white",n=typeof e?.property=="object"?bl(e.property):void 0;return r.jsx("div",{className:t,style:{background:e?.color??n?.color??"#888"},children:e?.Icon?Ht(e,"medium"):Ht(n,"medium")})}function al(){return r.jsx("div",{className:"flex w-full h-full",children:r.jsxs("div",{className:"m-auto flex items-center flex-col",children:[r.jsx(A.Typography,{variant:"h4",align:"center",gutterBottom:!0,children:"Page not found"}),r.jsx(A.Typography,{align:"center",gutterBottom:!0,children:"This page does not exist or you may not have access to it"}),r.jsx(A.Button,{variant:"text",component:de.Link,to:"/",children:"Back to home"})]})})}function fa({open:e,onAccept:t,onCancel:n,title:o,loading:l,body:i}){return r.jsxs(A.Dialog,{open:e,onOpenChange:s=>s?void 0:n(),children:[r.jsxs(A.DialogContent,{children:[r.jsx(A.Typography,{variant:"h6",className:"mb-2",children:o}),i]}),r.jsxs(A.DialogActions,{children:[r.jsx(A.Button,{variant:"text",onClick:n,autoFocus:!0,children:"Cancel"}),r.jsx(A.LoadingButton,{color:"primary",type:"submit",loading:l,onClick:t,children:"Ok"})]})]})}function cl({width:e,height:t,className:n,style:o}){return r.jsxs("svg",{width:e??"100%",height:t??"100%",viewBox:"0 0 599 599",version:"1.1",style:o,className:n,xmlns:"http://www.w3.org/2000/svg",children:[r.jsxs("defs",{children:[r.jsxs("radialGradient",{cx:"28.6213569%",cy:"43.1133328%",fx:"28.6213569%",fy:"43.1133328%",r:"71.5003456%",gradientTransform:"translate(0.286214,0.431133),rotate(3.343450),scale(1.000000,0.996175),translate(-0.286214,-0.431133)",id:"radialGradient-1",children:[r.jsx("stop",{stopColor:"#FF5B79",offset:"0%"}),r.jsx("stop",{stopColor:"#FA5574",offset:"28.0930803%"}),r.jsx("stop",{stopColor:"#EC4C51",offset:"44.7242531%"}),r.jsx("stop",{stopColor:"#9543C1",offset:"71.4578165%"}),r.jsx("stop",{stopColor:"#3857B3",offset:"100%"})]}),r.jsxs("radialGradient",{cx:"53.6205516%",cy:"47.2473036%",fx:"53.6205516%",fy:"47.2473036%",r:"50.8229649%",gradientTransform:"translate(0.536206,0.472473),rotate(90.000000),scale(1.000000,1.206631),translate(-0.536206,-0.472473)",id:"radialGradient-2",children:[r.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),r.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"75.3503173%"}),r.jsx("stop",{stopColor:"#0D060B",stopOpacity:"0.437431709",offset:"100%"})]}),r.jsxs("radialGradient",{cx:"53.8605015%",cy:"48.1990423%",fx:"53.8605015%",fy:"48.1990423%",r:"59.9151549%",gradientTransform:"translate(0.538605,0.481990),rotate(180.000000),scale(1.000000,0.925027),translate(-0.538605,-0.481990)",id:"radialGradient-3",children:[r.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),r.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"84.0867343%"}),r.jsx("stop",{stopColor:"#FF0000",stopOpacity:"0.567324765",offset:"100%"})]})]}),r.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:r.jsxs("g",{id:"firecms_logo",children:[r.jsx("circle",{fill:"url(#radialGradient-1)",cx:"299.5",cy:"299.5",r:"299.5"}),r.jsx("circle",{fill:"url(#radialGradient-2)",cx:"299.5",cy:"299.5",r:"299.5"}),r.jsx("circle",{fill:"url(#radialGradient-3)",cx:"299.5",cy:"299.5",r:"299.5"})]})})]})}const dl=function({title:t,endAdornment:n,startAdornment:o,drawerOpen:l,dropDownActions:i,includeDrawer:s,className:a,style:d,user:f}){const g=ae(),p=qe(),{mode:h,toggleMode:u}=Or(),m=Me(),b=f??p.user;let y;if(b&&b.photoURL)y=r.jsx(A.Avatar,{src:b.photoURL});else if(b===void 0||p.initialLoading)y=r.jsx("div",{className:"p-1 flex justify-center",children:r.jsx(A.Skeleton,{className:"w-10 h-10 rounded-full"})});else{const C=b?.displayName?b.displayName[0].toUpperCase():b?.email?b.email[0].toUpperCase():"A";y=r.jsx(A.Avatar,{children:C})}return r.jsx("div",{style:d,className:A.cn("pr-2",{"ml-[17rem]":l&&m,"ml-16":s&&!(l&&m)&&!o,"h-16":!0,"z-10":m,"transition-all":!0,"ease-in":!0,"duration-75":!0,"w-full":!s,"w-[calc(100%-64px)]":s&&!(l&&m),"w-[calc(100%-17rem)]":s&&l&&m,"duration-150":l&&m,fixed:!0},a),children:r.jsxs("div",{className:"flex flex-row gap-2 px-4 h-full items-center",children:[o,g&&r.jsx("div",{className:"mr-8 hidden lg:block",children:r.jsx(de.Link,{className:"visited:text-inherit visited:dark:text-inherit",to:g?.basePath??"/",children:r.jsx(A.Typography,{variant:"subtitle1",noWrap:!0,className:"ml-2 !font-medium",children:t})})}),r.jsx("div",{className:"flex-grow"}),n&&r.jsx(te,{children:n}),r.jsx(A.IconButton,{color:"inherit","aria-label":"Open drawer",onClick:u,size:"large",children:h==="dark"?r.jsx(A.DarkModeIcon,{}):r.jsx(A.LightModeIcon,{})}),r.jsxs(A.Menu,{trigger:y,children:[i,!i&&r.jsxs(A.MenuItem,{onClick:p.signOut,children:[r.jsx(A.LogoutIcon,{}),"Log Out"]})]})]})})},ua=e=>e&&Array.isArray(e)&&e.length>0?e.map((t,n)=>t?{[pr(t)+n]:Pt()}:{}).reduce((t,n)=>({...t,...n}),{}):{};function hn({droppableId:e,addLabel:t,value:n,disabled:o=!1,buildEntry:l,size:i,onInternalIdAdded:s,includeAddButton:a,newDefaultEntry:d,onValueChange:f}){const g=n&&Array.isArray(n)&&n.length>0,p=c.useRef(ua(n)),[h,u]=c.useState(g?Object.values(p.current):[]);c.useEffect(()=>{if(g&&n&&n.length!==h.length){const w=n.map((E,k)=>{const x=pr(E)+k;if(x in p.current)return p.current[x];{const S=Pt();return p.current[x]=S,S}});u(w)}},[g,h.length,n]);const m=w=>{if(w.preventDefault(),o)return;const E=Pt(),k=[...h,E];s&&s(E),u(k),f([...n??[],d])},b=w=>{const E=[...h];E.splice(w,1),u(E),f(n.filter((k,x)=>x!==w))},y=w=>{const E=Pt(),k=n[w],x=[...h.splice(0,w+1),E,...h.splice(w+1,h.length-w-1)];s&&s(E),u(x),f([...n.slice(0,w+1),k,...n.slice(w+1)])},C=w=>{if(!w.destination)return;const E=w.source.index,k=w.destination.index,x=[...h],S=x[E];x[E]=x[k],x[k]=S,u(x),f(ga(n,E,k))};return r.jsx(ct.DragDropContext,{onDragEnd:C,children:r.jsx(ct.Droppable,{droppableId:e,renderClone:(w,E,k)=>{const x=k.source.index,S=h[x];return r.jsx(pn,{provided:w,internalId:S,index:x,size:i,disabled:o,buildEntry:l,remove:b,copy:y,isDragging:E.isDragging})},children:(w,E)=>r.jsxs("div",{...w.droppableProps,ref:w.innerRef,children:[g&&h.map((k,x)=>r.jsx(ct.Draggable,{draggableId:`array_field_${k}`,isDragDisabled:o,index:x,children:(S,B)=>r.jsx(pn,{provided:S,internalId:k,index:x,size:i,disabled:o,buildEntry:l,remove:b,copy:y,isDragging:B.isDragging})},`array_field_${k}`)),w.placeholder,a&&r.jsx("div",{className:"py-4 justify-center text-left",children:r.jsx(A.Button,{variant:"text",size:i==="small"?"small":"medium",color:"primary",disabled:o,startIcon:r.jsx(A.AddIcon,{}),onClick:m,children:t??"Add"})})]})})})}function pn({provided:e,index:t,internalId:n,size:o,disabled:l,buildEntry:i,remove:s,copy:a,isDragging:d}){const[f,g]=Ar(),p=o!=="small"&&g.height===0,h=o!=="small"&&g.height<100,[u,m]=c.useState(!1),b=c.useCallback(()=>m(!0),[]),y=c.useCallback(()=>m(!1),[]);return r.jsx("div",{onMouseEnter:b,onMouseMove:b,onMouseLeave:y,ref:e.innerRef,...e.draggableProps,style:e.draggableProps.style,className:`${d||u?A.fieldBackgroundHoverMixin:""} mb-1 rounded-md opacity-100`,children:r.jsxs("div",{className:"flex items-start",children:[r.jsx("div",{ref:f,className:"flex-grow w-[calc(100%-48px)] text-text-primary dark:text-text-primary-dark",children:i(t,n)}),r.jsx(Al,{direction:o==="small"?"row":"column",disabled:l,remove:s,index:t,provided:e,measuring:p,contentOverflow:h,copy:a})]})})}function Al({direction:e,disabled:t,remove:n,index:o,provided:l,copy:i,contentOverflow:s,measuring:a}){return r.jsxs("div",{className:`p-1 flex ${e==="row"?"flex-row-reverse":"flex-col"} items-center`,...l.dragHandleProps,children:[r.jsx(A.Tooltip,{side:e==="column"?"left":void 0,title:"Move",children:r.jsx(A.IconButton,{size:"small",disabled:t,className:`cursor-${t?"inherit":"grab"}`,children:r.jsx("svg",{focusable:"false",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})})})}),!a&&!s&&r.jsxs(r.Fragment,{children:[r.jsx(A.Tooltip,{title:"Remove",side:e==="column"?"left":void 0,children:r.jsx(A.IconButton,{size:"small","aria-label":"remove",disabled:t,onClick:()=>n(o),children:r.jsx(A.RemoveIcon,{size:"small"})})}),r.jsx(A.Tooltip,{side:e==="column"?"left":void 0,title:"Copy in this position",children:r.jsx(A.IconButton,{size:"small","aria-label":"copy",disabled:t,onClick:()=>i(o),children:r.jsx(A.ContentCopyIcon,{size:"small"})})})]}),!a&&s&&r.jsx(r.Fragment,{children:r.jsxs(A.Menu,{trigger:r.jsx(A.IconButton,{size:"small",children:r.jsx(A.MoreVertIcon,{size:"small"})}),children:[r.jsxs(A.MenuItem,{dense:!0,onClick:()=>n(o),children:[r.jsx(A.RemoveIcon,{size:"small"}),"Remove"]}),r.jsxs(A.MenuItem,{dense:!0,onClick:()=>i(o),children:[r.jsx(A.ContentCopyIcon,{size:"small"}),"Copy"]})]})})]})}function ga(e,t,n){const o=Array.from(e),[l]=o.splice(t,1);return o.splice(n,0,l),o}function Pt(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}function ha({name:e,multiselect:t=!1,path:n,disabled:o,value:l,onReferenceSelected:i,onMultipleReferenceSelected:s,previewProperties:a,forceFilter:d,size:f,className:g}){const p=ae(),h=c.useMemo(()=>p.getCollection(n),[n,p]);if(!h)throw Error(`Couldn't find the corresponding collection for the path: ${n}`);const u=c.useCallback(w=>{if(!o&&i){const E=w?Ue(w):null;i?.({reference:E,entity:w})}},[o,i]),m=c.useCallback(w=>{if(!o&&s){const E=w?w.map(k=>Ue(k)):null;s({references:E,entities:w})}},[o,i]),b=wt({multiselect:t,path:n,collection:h,onSingleEntitySelected:u,onMultipleEntitiesSelected:m,forceFilter:d});c.useCallback(w=>{w.stopPropagation(),t?m([]):u(null)},[i]);let y;const C=()=>{o||b.open()};return Array.isArray(l)?y=r.jsx("div",{className:"flex flex-col gap-4",children:l.map((w,E)=>r.jsx(Ve,{onClick:C,reference:w,disabled:o,previewProperties:a,size:f},`reference_preview_${E}`))}):l instanceof Ne&&(y=r.jsx(Ve,{reference:l,onClick:C,disabled:o,previewProperties:a,size:f})),r.jsxs("div",{className:A.cn("text-sm font-medium text-gray-500","min-w-80 flex flex-col gap-4","relative transition-colors duration-200 ease-in rounded font-medium",o?"bg-opacity-50":"hover:bg-opacity-75","text-opacity-50 dark:text-white dark:text-opacity-50",g),children:[y,!l&&r.jsx("div",{className:"justify-center text-left",children:r.jsxs(A.Button,{variant:"outlined",color:"primary",disabled:o,onClick:C,children:["Edit ",e]})})]})}function Ce({icon:e,title:t,small:n,className:o,required:l}){return r.jsxs("span",{className:`inline-flex items-center my-0.5 ${n?"gap-1":"gap-2"} ${o??""}`,children:[e,r.jsx("span",{className:`font-medium text-${n?"base":"sm"} origin-top-left transform ${n?"translate-x-2 scale-75":""}`,children:(t??"")+(l?" *":"")})]})}function wt(e){const t=ae(),n=Ft(),o=c.useCallback(()=>{if(e.path){let i=e.collection;if(i||(i=t.getCollection(e.path)),!i)throw Error("Not able to resolve the collection in useReferenceDialog");n.open({key:`reference_${e.path}`,component:r.jsx(ll,{collection:i,...e}),width:"90vw",onClose:()=>{e.onClose?.()}})}else throw Error("useReferenceDialog: You are trying to open a reference dialog, but have not declared the `path`")},[t,e,n]),l=c.useCallback(()=>{n.close()},[n]);return{open:o,close:l}}const pa=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAASAAAAEgARslrPgAAB9pJREFUWMONl12obVUVx39jzLk+9j7nHq9y1QT1qpcbSIaXQFGs24PQl3HroSQyqHwJFJF6qaceCsqQoJdELHoIC6EeJCSKsi/TFLGozGsKXksljRLxnrP3WmvOOUYPa+19zsmPWpux5pxrzTX///Exx5hb+B/X1y+/nuIlVKF5m0v1YbQ55tIcKTQXFerNQkumOZ1oTiXCqUH8saR+74L8ZIWWux7+7JuuL2/04s5jJyhWQlXV71KtbhCtr1WtD6s0KlrjNBRaEi3JGzpv6bymQ0sn9mwv9otB7Ls7kn9Xo+U7D9z8/xG4+bz3cs35SjE/HEK8NWr8RBOrs+tQUUlEtAYaijRkbxmY0fuMzucsfcbSWnZQtiWxJL3Uid09iH0jIM8/1f+d3/zuS29M4PvHrmG+cZA8dMdjiLfNYrx6owrMVKlVUQkgkeI1iYbBJ3A2WPpKNtnx+UQisy29L0gPDGKfrwkPn2bJPfd/Zo0ZVp0fvOOdnLGxheX+A/Mq3nGwqS8/q645o4psxkgbhFqdSgqVJKIkghgqjuDoWh+dlm1AI0gUC3o4C9d04idbmZ06euQDPPHMj3YJ3HnkrZx98Fys2PFZ1dxxsJkdPbOecaBqmcWGqBVBIkEiKkoQJ5IJJBTbY8aRgBMwjxgVJoJJwDScnYUrOy2PBamfv/CS4zz9zE+IAIfPuQQzPzyrmq9u1e3RM+qWeaipNCCiE4DjbjgF94xZQj2htpjeK84ImqlIUpO9JllgEKgJDFpfOoh8paN8chbOeQ4g/OTq97PdLXSz3fjiVjO7/sx6g804ow41QWuCrjQPBB3bkZQgAkpBJOMojmIEjIgRKV6RpaYIZHGKQlK5OIv0L8bul8eOfsxjDJGD8613z6rmhq1qxkY1o9YKFUFEEED2xqoE1MNoWgPBwQZMl2SrSbQM9NQyUMlA5S3Rlcqd6E50RdRvPMvn9yE8qP9+9WWtQvXxzdic8xrwPaJrUYJGoq4sVBM1Ukuiln4UBipJVJrGoHUhrARB0XMQ/cizbSd61uaZlzUhXjuvWmqt9oOyAmUPEabnkSDV2j0Rp2YgksZdQpoCtRBwAiN4cKYdw4m3pNnbY9Tw4SZUh9tQEda+ld1WpmThgoivU8fYDbgEggRcleiZ6BOoFNRXLQQX1Eelggsgh8GPx6DhWB2iRgkj2OTuVX8dBzJtMx93BAKK4hIwUUSEID4BGspecWTfDwSCw+UxqByJoqPf9+xmYWQg7H3u+5Poyk3o5BZDxRBxxH29fdkF3YcBXKHgF+m+hLxn4OvbnnbPzMkjsm/+f5cXec2ye6ZfpO6+OX7pE8TqPj1zcN/7Zu8CDm44Bu6skrKjuOs0FlxWCJNMYxMOqLlR3DAvsAKaZo6t7+u7r6nhjN/5RKIQKESKhykhjeIINgJi+0m4Fiuns2WKZQybtJ2AfAWzGu/ayt0wz5gXimeKQyKSPI4kiCMhDxSgyLiOiY9kxnW2NVs+1ZeBbAmzhLmtgd0d8z1k1mIUTxQbKD5gnkmuDN6QvCF5TaIie0UmkIU1id3WcfwZHUo61eWB3gayDdOiZR+JXUuMWmcbyGWcny2RzOi8obeWwRsGrxm8JlGPBHCyOJmpJkwkHHs09pnfL1L60KLqtBKZtprhU+lVmSq9+xRsBfOMW6L4QLFM7zWdz+l8Ru8tA+10YKlJIiSxkcC6dQqlmJc/xaHIvTuZT7UpHalFUHEqL6iGsfKtM8FEzMdy7J4oXui9mk5CczpGErtEKgacQUZJE3gSwzw/i+dfx2G7e6IcOPALCXIkakGkYx4iwceyq+uENPp+RSI7DN7Q+5ylb7JgJLH0+XRGbOlRerWJwNgmnOwJ83Tvq/7KX2KZb1nJfnfp5YRoda7hFC/MQyGI7Mteow2E4pHkDT2zyfS758HV4bSjolOjF2PYS4KBbN2L5vmHZ7DpsWQnDsvfLj1+Lwufy9LSO2y5M1Mnik8OEJxAoSJRk7xhoKX3+URiztI3WPgGS2/p1OnE6CcSvRQGH+htQfH07dPSP7Lp9ajcNy+9DnG/oMT67qqZHz/QtGxVyjworQqVCIjiPiaaTD1ttZZ+fTIeCXQ+Y6HCQm0tO5LYpmfHlyy9/1nCPi3ICw/99JbxUHrdvxr6Q4depdhTfeGapVeH+imKxwhv6ZnR+5zeN0aNGU2+ZIPON0cX0LBQYSnGQgsLSSzoWdiCHVvQ2fLP2fMtwf2vDz50K6TpVPxj/sn7Ni5iu9l6Tof+yd78yoWFQ0uvWYvVLK1h6e34B8RnY9DZnIW3LAijxpLYkZ6Fd+z4km3bYcd2WNry8ezppsZ5ZMd2+MfTv3xtjbr9/PfwyoFDzPvtq7I2t+Vq/m6pt4hxThVaojao1CANRkORmkwkiTCI00thKYWOzJJR+6V1JE8/z2JfqGgfW9jLPPLg7a9Xe8frHs7j5MVXESxfmLS5KYXmxhQ3z/a4icQNRFtEGlwjJkoRIamTmIKNTE+it57kw0sF+1ah3CkSXkiPf42Htl+3WL/2+vIFJ6ishJ3QXD1o9dEhVCcGbS7ModUcakwrigaKChkoYmQK2XMp5L8V/F7DfuDePYrEcv8f7npdnDcksEvkg9RewquhuayTcHzQeCyJXpFVD2fRzSxCFtkuwqks8mjB/ujYr9y6k0gs9528503X/w/F3eUgyIBI4wAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNS0xMFQxOToyODozMyswMDowMEzeSx4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDUtMTBUMTk6Mjg6MzMrMDA6MDA9g/OiAAAARnRFWHRzb2Z0d2FyZQBJbWFnZU1hZ2ljayA2LjcuOC05IDIwMTQtMDUtMTIgUTE2IGh0dHA6Ly93d3cuaW1hZ2VtYWdpY2sub3Jn3IbtAAAAABh0RVh0VGh1bWI6OkRvY3VtZW50OjpQYWdlcwAxp/+7LwAAABh0RVh0VGh1bWI6OkltYWdlOjpoZWlnaHQAMTkyDwByhQAAABd0RVh0VGh1bWI6OkltYWdlOjpXaWR0aAAxOTLTrCEIAAAAGXRFWHRUaHVtYjo6TWltZXR5cGUAaW1hZ2UvcG5nP7JWTgAAABd0RVh0VGh1bWI6Ok1UaW1lADE2MjA2NzQ5MTMk8oswAAAAD3RFWHRUaHVtYjo6U2l6ZQAwQkKUoj7sAAAAVnRFWHRUaHVtYjo6VVJJAGZpbGU6Ly8vbW50bG9nL2Zhdmljb25zLzIwMjEtMDUtMTAvOGIxNDNhYjgwODhkMjBlZThkYmUzOTFhN2NkNmQ3NmQuaWNvLnBuZ9msgG0AAAAASUVORK5CYII=
|
|
588
|
+
`;function ma(e,t){c.useEffect(()=>{if(document){document.title=`${e} - FireCMS`;let n=document.querySelector("link[rel~='icon']");n||(n=document.createElement("link"),n.rel="icon",document.getElementsByTagName("head")[0].appendChild(n)),n.href=t??pa}},[e,t])}const or="main_##Q$SC^#S6";function ba({path:e,entityId:t,selectedSubPath:n,copy:o,collection:l,parentCollectionIds:i,onValuesAreModified:s,formWidth:a,onUpdate:d,onClose:f}){l.customId&&l.formAutoSave&&console.warn(`The collection ${l.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);const[g,p]=c.useState(!1),[h,u]=c.useState(void 0);jt(h,()=>{h&&M({entityId:j?.id,collection:l,path:e,values:h,closeAfterSave:!1})},!1,2e3);const m=Qe(),b=lr(),y=Ze(),C=Xe(),w=J(),E=qe(),[k,x]=c.useState(void 0),[S,B]=c.useState(o?"copy":t?"existing":"new"),I=c.useRef(void 0),F=I.current,Q=(l.subcollections??[]).filter(z=>!z.hideFromNavigation),N=Q?.length??0,D=l.entityViews,G=D?.length??0,H=l.formAutoSave&&!l.customId,L=G>0||N>0,q=n??xr(l?l.defaultSelectedView:void 0,{status:S,entityId:t}),K=c.useRef(q??or),W=K.current===or,{entity:U,dataLoading:X,dataLoadingError:Y}=Mr({path:e,entityId:t,collection:l,useCache:!1}),[j,re]=c.useState(U),[ce,T]=c.useState(void 0);c.useEffect(()=>{U&&re(U)},[U]),c.useEffect(()=>{if(S==="new")T(!1);else{const z=j?Fr(l,E,Pe(e),j??null):!1;j&&T(!z)}},[E,j,S]);const V=c.useCallback(z=>{p(!1),C.open({type:"error",message:"Error before saving: "+z?.message}),console.error(z)},[C]),$=c.useCallback(z=>{p(!1),C.open({type:"error",message:"Error after saving (entity is saved): "+z?.message}),console.error(z)},[C]),Z=(z,he)=>{p(!1),H||C.open({type:"success",message:`${l.singularName??l.name}: Saved correctly`}),re(z),B("existing"),s(!1),d&&d({entity:z}),he?(b.setBlocked(!1),b.close(!0),f?.()):S!=="existing"&&y.replace({path:e,entityId:z.id,selectedSubPath:K.current,updateUrl:!0,collection:l})},P=c.useCallback(z=>{p(!1),C.open({type:"error",message:"Error saving: "+z?.message}),console.error("Error saving entity",e,t),console.error(z)},[t,e,C]),M=({values:z,previousValues:he,closeAfterSave:ue,entityId:De,collection:rt,path:We})=>{p(!0),Dr({path:We,entityId:De,values:z,previousValues:he,collection:rt,status:S,dataSource:m,context:w,onSaveSuccess:Le=>Z(Le,ue),onSaveFailure:P,onPreSaveHookError:V,onSaveSuccessHookError:$}).then()},ne=async({collection:z,path:he,entityId:ue,values:De,previousValues:rt,closeAfterSave:We,autoSave:Le})=>{S&&(Le?u(De):M({collection:z,path:he,entityId:ue,values:De,previousValues:rt,closeAfterSave:We}))},fe=D?D.map(z=>Er(z,w.entityViews)).filter(Boolean):[],Ge=D&&fe.map((z,he)=>{if(!z||K.current!==z.key)return null;const ue=z.Builder;return ue?r.jsx("div",{className:A.cn(A.defaultBorderMixin,"relative flex-grow w-full h-full overflow-auto "),role:"tabpanel",children:r.jsx(te,{children:k&&r.jsx(ue,{collection:l,entity:j,modifiedValues:F??j?.values,formContext:k})})},`custom_view_${z.key}`):(console.error("customView.Builder is not defined"),null)}).filter(Boolean),be=X&&!j||(!j||ce===void 0)&&(S==="existing"||S==="copy"),ge=be||g,Ct=Q&&Q.map((z,he)=>{const ue=z.id??z.path,De=j?`${e}/${j?.id}/${Ae(ue)}`:void 0;return K.current!==ue?null:r.jsxs("div",{className:"relative flex-grow h-full overflow-auto w-full",role:"tabpanel",children:[ge&&r.jsx(Rt,{}),!be&&(j&&De?r.jsx(An,{fullPath:De,parentCollectionIds:[...i,l.id],isSubCollection:!0,...z}):r.jsx("div",{className:"flex items-center justify-center w-full h-full p-3",children:r.jsx(A.Typography,{variant:"label",children:"You need to save your entity before adding additional collections"})}))]},`subcol_${ue}`)}).filter(Boolean),Re=c.useCallback(()=>{s(!1)},[]),_e=z=>{K.current=z,y.replace({path:e,entityId:t,selectedSubPath:z===or?void 0:z,updateUrl:!0,collection:l})},ze=c.useCallback(z=>{I.current=z},[]),Qt=c.useCallback(z=>{C.open({type:"error",message:"Error updating id, check the console"})},[]),Mt=c.useCallback(z=>{re(he=>he?{...he,id:z}:void 0)},[]),Et=z=>{H||s(z)};function et(){const z=w.plugins;let he=r.jsx(nl,{status:S,path:e,collection:l,onEntitySaveRequested:ne,onDiscard:Re,onValuesChanged:ze,onModified:Et,entity:j,onIdChange:Mt,onFormContextChange:x,hideId:l.hideIdFromForm,autoSave:H,onIdUpdateError:Qt});return z&&z.forEach(ue=>{ue.form?.provider&&(he=r.jsx(ue.form.provider.Component,{status:S,path:e,collection:l,onDiscard:Re,onValuesChanged:ze,onModified:Et,entity:j,context:w,formContext:k,...ue.form.provider.props,children:he}))}),r.jsx(te,{children:he})}const st=ce===void 0?r.jsx(r.Fragment,{}):ce?r.jsxs(r.Fragment,{children:[r.jsx(A.Typography,{className:"mt-16 mb-8 mx-8",variant:"h4",children:l.singularName??l.name}),r.jsx(Wr,{className:"px-12",entity:j,path:e,collection:l})]}):et(),Dt=Q&&Q.map(z=>r.jsx(A.Tab,{className:"text-sm min-w-[140px]",value:z.id,children:z.name},`entity_detail_collection_tab_${z.name}`)),tt=fe.map(z=>r.jsx(A.Tab,{className:"text-sm min-w-[140px]",value:z.key,children:z.name},`entity_detail_collection_tab_${z.name}`));return r.jsx("div",{className:"flex flex-col h-full w-full transition-width duration-250 ease-in-out",children:r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:A.cn(A.defaultBorderMixin,"no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),children:[r.jsx("div",{className:"pb-1 self-center",children:r.jsx(A.IconButton,{onClick:()=>(f?.(),b.close(!1)),size:"large",children:r.jsx(A.CloseIcon,{})})}),r.jsx("div",{className:"flex-grow"}),be&&r.jsx("div",{className:"self-center",children:r.jsx(A.CircularProgress,{size:"small"})}),r.jsxs(A.Tabs,{value:K.current,onValueChange:z=>{_e(z)},className:"pl-4 pr-4 pt-0",children:[r.jsx(A.Tab,{disabled:!L,value:or,className:`${L?"":"hidden"} text-sm min-w-[140px]`,children:l.singularName??l.name}),tt,Dt]})]}),r.jsxs("div",{className:"flex-grow h-full flex overflow-auto flex-row w-full ",style:{},children:[r.jsx("div",{role:"tabpanel",hidden:!W,id:`form_${e}`,className:" w-full",children:be?r.jsx(Rt,{}):st}),Ge,Ct]})]})})}function ya(e,t){const[n,o]=c.useState(),{navigator:l}=c.useContext(de.UNSAFE_NavigationContext),i=de.useNavigate(),s=()=>{o(void 0)},a=()=>{t(),o(void 0),i(-1)},d=c.useCallback(({action:f,location:g,retry:p})=>{switch(f){case"REPLACE":{p();return}case"POP":o(g)}},[]);return c.useEffect(()=>{if(!e||n||!("block"in l))return;const f=l.block(g=>{const p={...g,retry(){f(),g.retry()}};d(p)});return f},[l,d,e,n]),{navigationWasBlocked:!!n,handleCancel:s,handleOk:a}}function va({open:e,handleOk:t,handleCancel:n,body:o,title:l}){return r.jsxs(A.Dialog,{open:e,onOpenChange:i=>i?n():t(),children:[r.jsxs(A.DialogContent,{children:[r.jsx(A.Typography,{variant:"h6",children:l}),o,r.jsx(A.Typography,{children:"Are you sure you want to leave this page?"})]}),r.jsxs(A.DialogActions,{children:[r.jsx(A.Button,{variant:"text",onClick:n,autoFocus:!0,children:" Cancel "}),r.jsx(A.Button,{onClick:t,children:" Ok "})]})]})}const fl=c.createContext({width:"",blocked:!1,setBlocked:e=>{},setBlockedNavigationMessage:e=>{},close:()=>{}}),lr=()=>c.useContext(fl);function wa(){const t=Ft().sidePanels,n=[...t];return n.push(void 0),r.jsx(r.Fragment,{children:n.map((o,l)=>r.jsx(Ca,{panel:o,offsetPosition:t.length-l-1},`side_dialog_${l}`))})}function Ca({offsetPosition:e,panel:t}){const[n,o]=c.useState(!1),[l,i]=c.useState(!1),[s,a]=c.useState(),d=c.useRef(t?.width),f=d.current,g=Ft(),{navigationWasBlocked:p,handleOk:h,handleCancel:u}=ya(l&&!n,()=>i(!1));c.useEffect(()=>{t&&(d.current=t.width)},[t]);const m=()=>{i(!1),o(!1),g.close(),t?.onClose?.()},b=()=>{o(!1)},y=C=>{l&&!C?o(!0):(g.close(),t?.onClose?.())};return r.jsxs(fl.Provider,{value:{blocked:l,setBlocked:i,setBlockedNavigationMessage:a,width:f,close:y},children:[r.jsxs(A.Sheet,{open:!!t,onOpenChange:C=>!C&&y(),children:[t&&r.jsx("div",{className:"transform max-w-[100vw] lg:max-w-[95vw] flex flex-col h-full transition-all duration-250 ease-in-out bg-white dark:bg-gray-900 ",style:{width:t.width,transform:`translateX(-${e*200}px)`},children:r.jsx(te,{children:t.component})}),!t&&r.jsx("div",{style:{width:f}})]}),r.jsx(va,{open:p||n,handleOk:n?m:h,handleCancel:n?b:u,body:s})]})}function Ea(e){const{blocked:t,setBlocked:n,setBlockedNavigationMessage:o}=lr(),l=ae(),i=c.useMemo(()=>l.getParentCollectionIds(e.path),[l,e.path]),s=c.useMemo(()=>{if(!e)return;let d=e.collection;if(!d&&(d=l.getCollection(e.path,e.entityId),!d))throw console.error("ERROR: No collection found in path `",e.path,"`. Entity id: ",e.entityId),Error("ERROR: No collection found in path `"+e.path+"`. Make sure you have defined a collection for this path in the root navigation.");return d},[l,e]);c.useEffect(()=>{function d(f){t&&s&&(f.preventDefault(),f.returnValue=`You have unsaved changes in this ${s.name}. Are you sure you want to leave this page?`)}return typeof window<"u"&&window.addEventListener("beforeunload",d),()=>{typeof window<"u"&&window.removeEventListener("beforeunload",d)}},[t,s]);const a=c.useCallback(d=>{n(d),o(d?r.jsxs(r.Fragment,{children:[" You have unsaved changes in this ",r.jsx("b",{children:s?.singularName??s?.name}),"."]}):void 0)},[s?.name,n,o]);return!e||!s?r.jsx("div",{className:"w-full"}):r.jsx(r.Fragment,{children:r.jsx(te,{children:r.jsx(ba,{...e,formWidth:e.width,collection:s,parentCollectionIds:i,onValuesAreModified:a})})})}const ul="new";function Ba(e,t){if(t)return ci;const n=!e.selectedSubPath,o=typeof e.width=="number"?`${e.width}px`:e.width;return n?o??Zn:`calc(${di} + ${o??Zn})`}const ka=(e,t)=>{const n=de.useLocation(),o=c.useRef(!1),l=!Me();c.useEffect(()=>{if(!e.loading&&!o.current){if(e.isUrlCollectionPath(n.pathname)){const d=n.hash===`#${ul}`,f=e.urlPathToDataPath(n.pathname),g=xa(f,e.collections,d);for(let p=0;p<g.length;p++){const h=g[p];setTimeout(()=>{p===0?t.replace(ir(h,e,l)):t.open(ir(h,e,l))},1)}}o.current=!0}},[n,e,t,l]);const i=c.useCallback(()=>{t.close()},[t]),s=c.useCallback(d=>{if(d.copy&&!d.entityId)throw Error("If you want to copy an entity you need to provide an entityId");const f=xr(d.collection?d.collection.defaultSelectedView:void 0,{status:d.copy?"copy":d.entityId?"existing":"new",entityId:d.entityId});t.open(ir({selectedSubPath:f,...d},e,l))},[t,e,l]),a=c.useCallback(d=>{if(d.copy&&!d.entityId)throw Error("If you want to copy an entity you need to provide an entityId");t.replace(ir(d,e,l))},[e,t,l]);return{close:i,open:s,replace:a}};function xa(e,t,n){const o=Br({path:e,collections:t}),l=[];let i="";for(let s=0;s<o.length;s++){const a=o[s];if(a.type==="collection"&&(i=a.path),s>0){const d=o[s-1];if(a.type==="entity")l.push({path:a.path,entityId:a.entityId,copy:!1});else if(a.type==="custom_view"){if(d.type==="entity"){const f=l[l.length-1];f&&(f.selectedSubPath=a.view.key)}}else if(a.type==="collection"&&d.type==="entity"){const f=l[l.length-1];f&&(f.selectedSubPath=a.collection.id??a.collection.path)}}}return n&&l.push({path:i,copy:!1}),l}const ir=(e,t,n)=>{const o=Ae(e.path),l=e.entityId?t.buildUrlCollectionPath(`${o}/${e.entityId}/${e.selectedSubPath||""}`):t.buildUrlCollectionPath(`${o}#${ul}`);return{key:`${e.path}/${e.entityId}`,component:r.jsx(Ea,{...e}),urlPath:l,parentUrlPath:t.buildUrlCollectionPath(o),width:Ba(e,n),onClose:e.onClose}};function Sa(){const e=de.useLocation(),t=de.useNavigate(),[n,o]=c.useState([]),l=c.useRef(n),i=c.useRef({}),s=c.useRef(0),a=p=>{l.current=p,o(p)};c.useEffect(()=>{const u=(e.state?.panels??[]).map(m=>i.current[m]).filter(m=>!!m);ie(l.current.map(m=>m.key),u.map(m=>m.key))||a(u)},[e]);const d=c.useCallback(()=>{if(n.length===0)return;const p=n[n.length-1],h=[...n.slice(0,-1)];if(a(h),s.current>0)p.urlPath&&t(-1),s.current--;else if(p.parentUrlPath){const u=e.state?.base_location??e;t(p.parentUrlPath,{replace:!0,state:{base_location:u,panels:h.map(m=>m.key)}})}},[n,t,e]),f=c.useCallback(p=>{const h=Array.isArray(p)?p:[p];h.forEach(b=>{i.current[b.key]=b}),s.current=s.current+h.length;const u=e.state?.base_location??e,m=[...n,...h];a(m),h.forEach(b=>{b.urlPath&&t(b.urlPath,{state:{base_location:u,panels:m.map(y=>y.key)}})})},[e,t,n]),g=c.useCallback(p=>{const h=Array.isArray(p)?p:[p];h.forEach(b=>{i.current[b.key]=b});const u=e.state?.base_location??e,m=[...n.slice(0,-h.length),...h];a(m),h.forEach(b=>{b.urlPath&&t(b.urlPath,{replace:!0,state:{base_location:u,panels:m.map(y=>y.key)}})})},[e,t,n]);return{sidePanels:n,close:d,open:f,replace:g}}function Ia(e){c.useEffect(()=>{if(!e)return;const t=kn[e];t&&(Bn.registerLocale(e,t),Bn.setDefaultLocale(e))},[e])}function gl(e){const{path:t,collections:n=[],currentFullPath:o}=e,l=Ae(t).split("/"),i=Gt(l),s=[];for(let a=0;a<i.length;a++){const d=i[a],f=n&&n.find(g=>g.id===d||g.path===d);if(f){const g=f.id??f.path,p=o&&o.length>0?o+"/"+g:g,h=Ae(Ae(t).replace(d,"")),u=h.length>0?h.split("/"):[];if(u.length>0){const m=u[0],b=p+"/"+m;if(s.push(new Ne(m,p)),u.length>1){const y=u.slice(1).join("/");if(!f)throw Error("collection not found resolving path: "+f);f.subcollections&&s.push(...gl({path:y,collections:f.subcollections,currentFullPath:b}))}}break}}return s}const Fa="/",Na="/c";function Ta({basePath:e=Fa,baseCollectionPath:t=Na,authController:n,collections:o,views:l,userConfigPersistence:i,plugins:s,dataSource:a}){const d=de.useLocation(),[f,g]=c.useState(),[p,h]=c.useState(),[u,m]=c.useState(!1),[b,y]=c.useState(void 0),[C,w]=c.useState(!0),[E,k]=c.useState(void 0),x=Ae(e),S=Ae(t),B=x?`/${x}`:"/",I=x?`/${x}/${S}`:`/${S}`,F=c.useCallback(T=>x?`/${x}/${sr(T)}`:`/${sr(T)}`,[x]),Q=c.useCallback(T=>`${Ae(t)}/${sr(T)}`,[t]),N=c.useCallback((T,V)=>{const $=[...(T??[]).map(P=>P.hideFromNavigation?void 0:{url:Q(P.id??P.path),type:"collection",name:P.name.trim(),path:P.id??P.path,collection:P,description:P.description?.trim(),group:P.group?.trim()}).filter(Boolean),...(V??[]).map(P=>P.hideFromNavigation?void 0:{url:F(Array.isArray(P.path)?P.path[0]:P.path),name:P.name.trim(),type:"view",view:P,description:P.description?.trim(),group:P.group?.trim()}).filter(Boolean)],Z=Object.values($).map(P=>P.group).filter(Boolean).filter((P,M,ne)=>ne.indexOf(P)===M);return{navigationEntries:$,groups:Z}},[F,Q]),D=c.useCallback(async()=>{if(!n.initialLoading){try{const[T=[],V=[]]=await Promise.all([Pa(o,n,a,s),Qa(l,n,a)]);g(T),h(V),y(N(T??[],V))}catch(T){console.error(T),k(T)}w(!1),m(!0)}},[o,n.user,n.initialLoading,s,l,N]);c.useEffect(()=>{D()},[D]);const G=c.useCallback((T,V,$=!1)=>{if(!f)return;const Z=Vt(Ae(T),f),P=$?i?.getCollectionConfig(T):void 0,M=Z?Te(Z,P):void 0;let ne=M;if(M){const fe=M.subcollections,Ge=M.callbacks,be=M.permissions;ne={...ne,subcollections:ne?.subcollections??fe,callbacks:ne?.callbacks??Ge,permissions:ne?.permissions??be}}if(ne)return{...M,...ne}},[e,t,f]),H=c.useCallback(T=>{let V=f;if(!V)throw Error("Collections have not been initialised yet");for(let $=0;$<T.length;$++){const Z=T[$],P=V.find(M=>M.id===Z||M.path===Z);if(!P)return;if(V=P.subcollections,$===T.length-1)return P}},[f]),L=c.useCallback(T=>{let V=f;if(!V)throw Error("Collections have not been initialised yet");for(let $=0;$<T.length;$++){const Z=T[$],P=V.find(M=>M.id===Z);if(!P)return;if(V=P.subcollections,$===T.length-1)return P}},[f]),q=c.useCallback(T=>Ae(T+"/").startsWith(Ae(I)+"/"),[I]),K=c.useCallback(T=>{if(T.startsWith(I))return T.replace(I,"");throw Error("Expected path starting with "+I)},[I]),W=c.useCallback(({path:T})=>`s/edit/${sr(T)}`,[]),U=c.useCallback(T=>{if(!f)throw Error("Collections have not been initialised yet");return gr(T,f)},[f]),X=d.state,Y=X&&X.base_location?X.base_location:d,j=c.useCallback(T=>gl({path:T,collections:f}),[f]),re=c.useCallback(T=>j(T).map(V=>V.id),[j]),ce=c.useCallback(T=>{let V=f;const $=[];for(let Z=0;Z<T.length;Z++){const P=T[Z],M=V.find(ne=>ne.id===P);if(!M)throw Error(`Collection with id ${P} not found`);$.push(M.path),V=M.subcollections}return $},[L]);return c.useMemo(()=>({collections:f??[],views:p??[],loading:!u||C,navigationLoadingError:E,homeUrl:B,basePath:e,baseCollectionPath:t,initialised:u,getCollection:G,getCollectionFromPaths:H,getCollectionFromIds:L,isUrlCollectionPath:q,urlPathToDataPath:K,buildUrlCollectionPath:Q,buildUrlEditCollectionPath:W,buildCMSUrlPath:F,resolveAliasesFrom:U,topLevelNavigation:b,baseLocation:Y,refreshNavigation:D,getParentReferencesFromPath:j,getParentCollectionIds:re,convertIdsToPaths:ce}),[t,Y,e,F,Q,W,f,j,G,H,B,u,q,C,E,D,U,b,K,p])}function sr(e){return encodeURIComponent(Ae(e)).replaceAll("%2F","/").replaceAll("%23","#")}function hl(e,t){return e.filter(n=>n.permissions?It(n,t,[n.path],null).read!==!1:!0).map(n=>n.subcollections?{...n,subcollections:hl(n.subcollections,t)}:n)}async function Pa(e,t,n,o){let l=[];return typeof e=="function"?l=await e({user:t.user,authController:t,dataSource:n}):Array.isArray(e)&&(l=e),l=hl(l,t),o&&o.forEach(i=>{i.collections?.injectCollections&&(l=i.collections?.injectCollections(l??[]))}),l}async function Qa(e,t,n){let o=[];return typeof e=="function"?o=await e({user:t.user,authController:t,dataSource:n}):Array.isArray(e)&&(o=e),o}function Ma({delegate:e,propertyConfigs:t,navigationController:n}){return{fetchCollection:c.useCallback(({path:o,collection:l,filter:i,limit:s,startAfter:a,searchString:d,orderBy:f,order:g})=>e.fetchCollection({path:o,filter:i,limit:s,startAfter:a,searchString:d,orderBy:f,order:g}),[e]),listenCollection:e.listenCollection?c.useCallback(({path:o,collection:l,filter:i,limit:s,startAfter:a,searchString:d,orderBy:f,order:g,onUpdate:p,onError:h})=>{const u=l??n.getCollection(o),m=!!u?.collectionGroup;if(!e.listenCollection)throw Error("useBuildDataSource delegate not initialised");return e.listenCollection({path:o,filter:i,limit:s,startAfter:a,searchString:d,orderBy:f,order:g,onUpdate:p,onError:h,isCollectionGroup:m,collection:u})},[e,n.getCollection]):void 0,fetchEntity:c.useCallback(({path:o,entityId:l})=>e.fetchEntity({path:o,entityId:l}),[e]),listenEntity:e.listenEntity?c.useCallback(({path:o,entityId:l,collection:i,onUpdate:s,onError:a})=>{if(!e.listenEntity)throw Error("useBuildDataSource delegate not initialised");return e.listenEntity({path:o,entityId:l,onUpdate:s,onError:a})},[e.listenEntity]):void 0,saveEntity:c.useCallback(({path:o,entityId:l,values:i,collection:s,status:a})=>{const d=s??n.getCollection(o),g=(d?Ie({collection:d,path:o,entityId:l,fields:t}):void 0)?.properties,p=mn(i,e.buildReference,e.buildGeoPoint,e.buildDate,e.buildDeleteFieldValue),h=g?Nn({inputValues:p,properties:g,status:a,timestampNowValue:e.currentTime(),setDateToMidnight:e.setDateToMidnight}):p;return console.debug("Saving entity",o,l,h),e.saveEntity({path:o,entityId:l,values:h,status:a}).then(u=>({id:u.id,path:u.path,values:e.delegateToCMSModel(h)}))},[e.saveEntity,n.getCollection]),deleteEntity:c.useCallback(({entity:o})=>e.deleteEntity({entity:o}),[e.deleteEntity]),checkUniqueField:c.useCallback((o,l,i,s)=>e.checkUniqueField(o,l,i,s),[e.checkUniqueField]),generateEntityId:c.useCallback(o=>e.generateEntityId(o),[e.generateEntityId]),countEntities:c.useCallback(async({path:o,collection:l,filter:i,order:s,orderBy:a})=>e.countEntities({path:o,filter:i,orderBy:a,order:s,isCollectionGroup:!!l.collectionGroup}),[e.countEntities]),isFilterCombinationValid:c.useCallback(({path:o,filterValues:l,sortBy:i})=>e.isFilterCombinationValid?e.isFilterCombinationValid({path:o,filterValues:l,sortBy:i}):!0,[e.isFilterCombinationValid])}}function mn(e,t,n,o,l){return e===void 0?l():Array.isArray(e)?e.map(i=>mn(i,t,n,o,l)):e instanceof Ne?t(e):e instanceof Yt?n(e):e instanceof Date?o(e):e&&typeof e=="object"?Object.entries(e).map(([i,s])=>({[i]:mn(s,t,n,o,l)})).reduce((i,s)=>({...i,...s}),{}):e}function Da(e){const t=Or(),{children:n,entityLinkBuilder:o,userConfigPersistence:l,dateTimeFormat:i,locale:s,authController:a,storageSource:d,dataSourceDelegate:f,plugins:g,onAnalyticsEvent:p,propertyConfigs:h,entityViews:u,components:m,baseCollectionPath:b,basePath:y,collections:C,views:w}=e;Ia(s);const E=Ta({basePath:y,baseCollectionPath:b,authController:a,collections:C,views:w,userConfigPersistence:l,dataSource:f,plugins:g}),k=Ma({delegate:f,propertyConfigs:h,navigationController:E}),x=Sa(),S=ka(E,x),B=g?.some(Q=>Q.loading)??!1,I=a.initialLoading||E.loading||B,F=c.useMemo(()=>({entityLinkBuilder:o,dateTimeFormat:i,locale:s,plugins:g,onAnalyticsEvent:p,entityViews:u??[],propertyConfigs:h??{},components:m}),[i,s,g,u,h,m]);return E.navigationLoadingError?r.jsx(A.CenteredView,{maxWidth:"md",fullScreen:!0,children:r.jsx(me,{title:"Error loading navigation",error:E.navigationLoadingError})}):a.authError?r.jsx(A.CenteredView,{maxWidth:"md",fullScreen:!0,children:r.jsx(me,{title:"Error loading auth",error:a.authError})}):r.jsx(Ot.Provider,{value:t,children:r.jsx(Pr.Provider,{value:F,children:r.jsx(ro.Provider,{value:l,children:r.jsx(to.Provider,{value:d,children:r.jsx(Xn.Provider,{value:k,children:r.jsx(ur.Provider,{value:a,children:r.jsx(Rn.Provider,{value:x,children:r.jsx(eo.Provider,{value:S,children:r.jsx(Kn.Provider,{value:E,children:r.jsx(Ai,{children:r.jsx(Oa,{loading:I,children:n})})})})})})})})})})})}function Oa({loading:e,children:t}){const n=J();let o=t({context:n,loading:e});const l=n.plugins;return!e&&l&&l.forEach(i=>{i.provider&&(o=r.jsx(i.provider.Component,{...i.provider.props,context:n,children:o}))}),r.jsx(r.Fragment,{children:o})}function pl({hovered:e,drawerOpen:t,closeDrawer:n}){const o=J(),l=ae(),i=e&&!t,s=Me();if(!l.topLevelNavigation)throw Error("Navigation not ready in Drawer");const{navigationEntries:a,groups:d}=l.topLevelNavigation,f=Object.values(a).filter(h=>!h.group),g=c.useCallback(h=>t?r.jsx("div",{className:"pt-8 pl-6 pr-8 pb-2 flex flex-row items-center",children:r.jsx(A.Typography,{variant:"caption",color:"secondary",className:"font-medium flex-grow",children:h?h.toUpperCase():"Views".toUpperCase()})}):r.jsx("div",{className:"h-4"}),[t]),p=h=>{const u=h.type==="collection"?"drawer_navigate_to_collection":h.type==="view"?"drawer_navigate_to_view":"unmapped_event";o.onAnalyticsEvent?.(u,{url:h.url}),s||n()};return r.jsxs("div",{className:"flex-grow overflow-scroll no-scrollbar",children:[d.map(h=>r.jsxs(c.Fragment,{children:[g(h),Object.values(a).filter(u=>u.group===h).map((u,m)=>r.jsx(bn,{icon:Zt(u.collection??u.view),tooltipsOpen:i,drawerOpen:t,onClick:()=>p(u),url:u.url,name:u.name},`navigation_${m}`))]},`drawer_group_${h}`)),f.length>0&&g(),f.map((h,u)=>r.jsx(bn,{icon:Zt(h.collection??h.view),tooltipsOpen:i,onClick:()=>p(h),drawerOpen:t,url:h.url,name:h.name},`navigation_${u}`))]})}function bn({name:e,icon:t,drawerOpen:n,tooltipsOpen:o,url:l,onClick:i}){const s=r.jsx("div",{className:"text-gray-600 dark:text-gray-500",children:t}),a=r.jsxs(de.NavLink,{onClick:i,className:({isActive:d})=>A.cn("rounded-r-xl truncate","hover:bg-gray-200 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-gray-100","flex flex-row items-center w-full mr-8",n?"pl-8 h-12":"pl-6 h-11","font-medium text-sm",d?"bg-gray-100 dark:bg-gray-800":""),to:l,children:[s,r.jsx("div",{className:A.cn(n?"opacity-100":"opacity-0 hidden","ml-4 font-inherit text-inherit"),children:e.toUpperCase()})]});return n?a:r.jsx(A.Tooltip,{open:o,side:"right",title:e,children:a})}const Va=280,Ga=c.memo(function(t){const{children:n,name:o,logo:l,includeDrawer:i=!0,autoOpenDrawer:s,Drawer:a=pl,drawerProps:d,FireCMSAppBarComponent:f=dl,fireCMSAppBarComponentProps:g}=t,p=Me(),[h,u]=c.useState(!1),[m,b]=c.useState(!1),y=c.useCallback(()=>b(!0),[]),C=c.useCallback(()=>b(!1),[]),w=c.useCallback(()=>{u(!1)},[]),E=h||!!(p&&s&&m);return r.jsxs("div",{className:"flex h-screen w-screen bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-white overflow-hidden",style:{paddingTop:"env(safe-area-inset-top)",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)",paddingBottom:"env(safe-area-inset-bottom)",height:"100dvh"},children:[r.jsx(f,{title:o,includeDrawer:i,drawerOpen:E,...g}),r.jsx(za,{displayed:i,onMouseEnter:y,onMouseMove:y,onMouseLeave:C,open:E,logo:l,hovered:m,setDrawerOpen:u,children:i&&r.jsx(a,{hovered:m,drawerOpen:E,closeDrawer:w,...d})}),r.jsxs("main",{className:"flex flex-col flex-grow overflow-auto",children:[r.jsx(Ya,{}),r.jsx("div",{className:A.cn(A.defaultBorderMixin,"flex-grow overflow-auto lg:m-0 lg:mx-4 lg:mb-4 lg:rounded-lg lg:border lg:border-solid m-0 mt-1"),children:r.jsx(te,{children:n})})]})]})},ie),Ya=()=>r.jsx("div",{className:"flex flex-col min-h-[68px]"});function za(e){const t=ae(),n=e.displayed?e.open?Va:72:0,o=r.jsxs("div",{className:"relative h-full no-scrollbar overflow-y-auto overflow-x-hidden",style:{width:n,transition:"left 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[!e.open&&e.displayed&&r.jsx(A.Tooltip,{title:"Open menu",side:"right",sideOffset:12,className:"fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit",children:r.jsx(A.IconButton,{color:"inherit","aria-label":"Open menu",className:"sticky top-2 left-3 ",onClick:()=>e.setDrawerOpen(!0),size:"large",children:r.jsx(A.MenuIcon,{})})}),r.jsxs("div",{className:"flex flex-col h-full",children:[r.jsx("div",{style:{transition:"padding 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",padding:e.open?"32px 96px 0px 24px":"72px 16px 0px"},className:A.cn("cursor-pointer"),children:r.jsx(A.Tooltip,{title:"Home",sideOffset:20,side:"right",children:r.jsx(de.Link,{to:t.basePath,children:e.logo?r.jsx("img",{src:e.logo,alt:"Logo",className:A.cn("max-w-full max-h-full",e.open??"w-[160px] h-[160px]")}):r.jsx(cl,{})})})}),e.children]})]});return Me()?r.jsxs("div",{className:"relative",onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseLeave:e.onMouseLeave,style:{width:n,transition:"left 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[o,r.jsx("div",{className:`absolute right-0 top-4 ${e.open?"opacity-100":"opacity-0 invisible"} transition-opacity duration-1000 ease-in-out`,children:r.jsx(A.IconButton,{"aria-label":"Close drawer",onClick:()=>e.setDrawerOpen(!1),children:r.jsx(A.ChevronLeftIcon,{})})})]}):e.displayed?r.jsxs(r.Fragment,{children:[r.jsx(A.IconButton,{color:"inherit","aria-label":"Open drawer",onClick:()=>e.setDrawerOpen(!0),size:"large",className:"absolute top-2 left-6",children:r.jsx(A.MenuIcon,{})}),r.jsx(A.Sheet,{side:"left",transparent:!0,open:e.open,onOpenChange:e.setDrawerOpen,children:o})]}):null}function ml(e){return Object.keys(ar).includes(e)}const ar={text_field:{key:"text_field",name:"Text field",description:"Simple short text",Icon:A.ShortTextIcon,color:"#2d7ff9",property:{dataType:"string",Field:yt}},multiline:{key:"multiline",name:"Multiline",description:"Text with multiple lines",Icon:A.SubjectIcon,color:"#2d7ff9",property:{dataType:"string",multiline:!0,Field:yt}},markdown:{key:"markdown",name:"Markdown",description:"Text with advanced markdown syntax",Icon:A.FormatQuoteIcon,color:"#2d7ff9",property:{dataType:"string",markdown:!0,Field:Ko}},url:{key:"url",name:"Url",description:"Text with URL validation",Icon:A.HttpIcon,color:"#154fb3",property:{dataType:"string",url:!0,Field:yt}},email:{key:"email",name:"Email",description:"Text with email validation",Icon:A.EmailIcon,color:"#154fb3",property:{dataType:"string",email:!0,Field:yt}},select:{key:"select",name:"Select/enum",description:"Select one text value from within an enumeration",Icon:A.ListIcon,color:"#4223c9",property:{dataType:"string",enumValues:[],Field:nn}},multi_select:{key:"multi_select",name:"Multi select",description:"Select multiple text values from within an enumeration",Icon:A.ListAltIcon,color:"#4223c9",property:{dataType:"array",of:{dataType:"string",enumValues:[]},Field:on}},number_input:{key:"number_input",name:"Number input",description:"Simple number field with validation",Icon:A.NumbersIcon,color:"#bec920",property:{dataType:"number",Field:yt}},number_select:{key:"number_select",name:"Number select",description:"Select a number value from within an enumeration",Icon:A.FormatListNumberedIcon,color:"#bec920",property:{dataType:"number",enumValues:[],Field:nn}},multi_number_select:{key:"multi_number_select",name:"Multiple number select",description:"Select multiple number values from within an enumeration",Icon:A.FormatListNumberedIcon,color:"#bec920",property:{dataType:"array",of:{dataType:"number",enumValues:[]},Field:on}},file_upload:{key:"file_upload",name:"File upload",description:"Input for uploading single files",Icon:A.UploadFileIcon,color:"#f92d9a",property:{dataType:"string",storage:{storagePath:"{path}"},Field:ln}},multi_file_upload:{key:"multi_file_upload",name:"Multiple file upload",description:"Input for uploading multiple files",Icon:A.DriveFolderUploadIcon,color:"#f92d9a",property:{dataType:"array",of:{dataType:"string",storage:{storagePath:"{path}"}},Field:ln}},reference:{key:"reference",name:"Reference",description:"The value refers to a different collection",Icon:A.LinkIcon,color:"#ff0042",property:{dataType:"reference",Field:Ho}},multi_references:{key:"multi_references",name:"Multiple references",description:"Multiple values that refer to a different collection",Icon:A.AddLinkIcon,color:"#ff0042",property:{dataType:"array",of:{dataType:"reference"},Field:$o}},switch:{key:"switch",name:"Switch",description:"Boolean true or false field (or yes or no, 0 or 1...)",Icon:A.FlagIcon,color:"#20d9d2",property:{dataType:"boolean",Field:Wo}},date_time:{key:"date_time",name:"Date/time",description:"A date time select field",Icon:A.ScheduleIcon,color:"#8b46ff",property:{dataType:"date",Field:jo}},group:{key:"group",name:"Group",description:"Group of multiple fields",Icon:A.BallotIcon,color:"#ff9408",property:{dataType:"map",properties:{},Field:Jo}},key_value:{key:"key_value",name:"Key-value",description:"Flexible field that allows the user to add multiple key-value pairs",Icon:A.BallotIcon,color:"#ff9408",property:{dataType:"map",keyValue:!0,Field:qo}},repeat:{key:"repeat",name:"Repeat/list",description:"A field that gets repeated multiple times (e.g. multiple text fields)",Icon:A.RepeatIcon,color:"#ff9408",property:{dataType:"array",of:{dataType:"string"},Field:Zo}},custom_array:{key:"custom_array",name:"Custom array",description:"A field that saved its value as an array of custom objects",Icon:A.RepeatIcon,color:"#ff9408",property:{dataType:"array",of:[],Field:Ro}},block:{key:"block",name:"Block",description:"A complex field that allows the user to compose different fields together, with a key->value format",Icon:A.ViewStreamIcon,color:"#ff9408",property:{dataType:"array",oneOf:{properties:{}},Field:Xo}}};function bl(e){const t=dr(e);if(!t){console.error("No field id found for property",e);return}return ar[t]}function cr(e,t){const n=yn(e),o=dr(e);if(!o){console.error("No field id found for property",e);return}const l=ar[o],i=n?t[n]:void 0;return Te(l??{},i??{})}function dr(e){if(e.dataType==="string")return e.multiline?"multiline":e.markdown?"markdown":e.storage?"file_upload":e.url?"url":e.email?"email":e.enumValues?"select":"text_field";if(e.dataType==="number")return e.enumValues?"number_select":"number_input";if(e.dataType==="map"){if(e.keyValue)return"key_value";if(e.properties)return"group"}else if(e.dataType==="array"){const t=e.of;return e.oneOf?"block":Array.isArray(t)?"custom_array":ye(t)?"repeat":t?.dataType==="string"&&t.enumValues?"multi_select":t?.dataType==="number"&&t.enumValues?"multi_number_select":t?.dataType==="string"&&t.storage?"multi_file_upload":t?.dataType==="reference"?"multi_references":"repeat"}else{if(e.dataType==="boolean")return"switch";if(e.dataType==="date")return"date_time";if(e.dataType==="reference")return"reference"}console.error("Unsupported field config mapping",e)}function yn(e){return e.propertyConfig?e.propertyConfig:dr(e)}const La=c.memo(function({HomePage:t=sl,customRoutes:n}){const o=de.useLocation(),l=ae();if(!l)return r.jsx(r.Fragment,{});const i=o.state,s=i&&i.base_location?i.base_location:o,a=[];l.views&&l.views.forEach(h=>{Array.isArray(h.path)?a.push(...h.path.map(u=>yl(u,h))):a.push(yl(h.path,h))});const f=[...l.collections??[]].sort((h,u)=>u.path.length-h.path.length).map(h=>{const u=l.buildUrlCollectionPath(h.id??h.path);return r.jsx(de.Route,{path:u+"/*",element:r.jsx(An,{isSubCollection:!1,parentCollectionIds:[],fullPath:h.id??h.path,...h,Actions:tr(h.Actions)},`collection_view_${h.id??h.path}`)},`navigation_${h.id??h.path}`)}),g=r.jsx(de.Route,{path:"/",element:r.jsx(t,{})}),p=r.jsx(de.Route,{path:"*",element:r.jsx(al,{})});return r.jsxs(de.Routes,{location:s,children:[f,a,g,p,n]})}),yl=(e,t)=>r.jsx(de.Route,{path:e,element:t.view},"navigation_view_"+e);function Ua(){const e=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)"),n=(localStorage.getItem("prefers-dark-mode")!=null?localStorage.getItem("prefers-dark-mode")==="true":null)??e,[o,l]=c.useState(n?"dark":"light");c.useEffect(()=>{l(n?"dark":"light"),a(n?"dark":"light")},[n]);const i=c.useCallback(()=>{l("dark"),a("dark")},[e]),s=c.useCallback(()=>{l("light"),a("light")},[]),a=f=>{document.body.style.setProperty("color-scheme",f),document.documentElement.dataset.theme=f},d=c.useCallback(()=>{o==="light"?(e?localStorage.removeItem("prefers-dark-mode"):localStorage.setItem("prefers-dark-mode","true"),i()):(e?localStorage.setItem("prefers-dark-mode","false"):localStorage.removeItem("prefers-dark-mode"),s())},[o,e]);return{mode:o,setMode:l,toggleMode:d}}function $a(){const[e,t]=c.useState({}),n=c.useCallback(m=>{const b=localStorage.getItem(m);return b?JSON.parse(b):{}},[]),o=c.useCallback(m=>{const b=`collection_config::${Sr(m)}`;return e[b]?e[b]:n(b)},[e,n]),l=c.useCallback((m,b)=>{const y=`collection_config::${Sr(m)}`;localStorage.setItem(y,JSON.stringify(b)),t(C=>{const w=C[y],E=Te(w??n(m),b);return Te(C,E)})},[n]),[i,s]=c.useState([]),[a,d]=c.useState([]),[f,g]=c.useState([]);c.useEffect(()=>{s(localStorage.getItem("recently_visited_paths")?JSON.parse(localStorage.getItem("recently_visited_paths")):[]),d(localStorage.getItem("favourite_paths")?JSON.parse(localStorage.getItem("favourite_paths")):[]),g(localStorage.getItem("collapsed_groups")?JSON.parse(localStorage.getItem("collapsed_groups")):[])},[]);const p=c.useCallback(m=>{localStorage.setItem("recently_visited_paths",JSON.stringify(m)),s(m)},[]),h=c.useCallback(m=>{localStorage.setItem("favourite_paths",JSON.stringify(m)),d(m)},[]),u=c.useCallback(m=>{localStorage.setItem("collapsed_groups",JSON.stringify(m)),g(m)},[]);return{onCollectionModified:l,getCollectionConfig:o,recentlyVisitedPaths:i,setRecentlyVisitedPaths:p,favouritePaths:a,setFavouritePaths:h,collapsedGroups:f,setCollapsedGroups:u}}v.ArrayContainer=hn,v.ArrayContainerItem=pn,v.ArrayCustomShapedFieldBinding=Ro,v.ArrayEnumPreview=Ur,v.ArrayItemOptions=Al,v.ArrayOfMapsPreview=Pi,v.ArrayOfReferencesFieldBinding=$o,v.ArrayOfReferencesPreview=go,v.ArrayOfStorageComponentsPreview=ho,v.ArrayOfStringsPreview=po,v.ArrayOneOfPreview=mo,v.ArrayPropertyEnumPreview=$r,v.ArrayPropertyPreview=Lr,v.AsyncPreviewComponent=Qi,v.AuthControllerContext=ur,v.BlockFieldBinding=Xo,v.BooleanPreview=vo,v.COLLECTION_PATH_SEPARATOR=On,v.CircularProgressCenter=Rt,v.DEFAULT_FIELD_CONFIGS=ar,v.DatePreview=yo,v.DateTimeFieldBinding=jo,v.DefaultHomePage=sl,v.DeleteConfirmationDialog=fa,v.Drawer=pl,v.DrawerNavigationItem=bn,v.EmptyValue=ht,v.EntityCollectionTable=tn,v.EntityCollectionView=An,v.EntityForm=nl,v.EntityPreview=Wr,v.EntityReference=Ne,v.EnumValuesChip=Be,v.ErrorBoundary=te,v.ErrorView=me,v.FieldConfigBadge=Aa,v.FieldHelperText=we,v.FireCMS=Da,v.FireCMSAppBar=dl,v.FireCMSContextInstance=Pr,v.FireCMSLogo=cl,v.FormikArrayContainer=rr,v.GeoPoint=Yt,v.ImagePreview=ao,v.KeyValueFieldBinding=qo,v.KeyValuePreview=_r,v.LabelWithIcon=Ce,v.MapFieldBinding=Jo,v.MapPropertyPreview=bo,v.MarkdownFieldBinding=Ko,v.ModeControllerContext=Ot,v.ModeControllerProvider=Ql,v.MultiSelectBinding=on,v.NavigationCollectionCard=il,v.NavigationGroup=un,v.NavigationRoutes=La,v.NotFoundPage=al,v.NumberPropertyPreview=wo,v.PropertyFieldBinding=it,v.PropertyPreview=ve,v.ReadOnlyFieldBinding=sn,v.ReferenceFieldBinding=Ho,v.ReferencePreview=Ve,v.ReferencePreviewContainer=Kt,v.ReferenceSelectionInner=ll,v.ReferenceWidget=ha,v.RepeatFieldBinding=Zo,v.Scaffold=Ga,v.SelectFieldBinding=nn,v.SideDialogs=wa,v.SkeletonPropertyComponent=mt,v.SnackbarProvider=Tl,v.StorageThumbnail=co,v.StorageThumbnailInternal=fo,v.StorageUploadFieldBinding=ln,v.StringPropertyPreview=zr,v.SwitchControl=Ps,v.SwitchFieldBinding=Wo,v.TextFieldBinding=yt,v.UrlComponentPreview=Nt,v.VirtualTable=Po,v.addInitialSlash=Ml,v.buildAdditionalFieldDelegate=si,v.buildCollection=ei,v.buildEntityCallbacks=ii,v.buildEnumLabel=Mn,v.buildEnumValueConfig=li,v.buildEnumValues=oi,v.buildFieldConfig=ai,v.buildProperties=ri,v.buildPropertiesOrBuilder=ni,v.buildProperty=ti,v.canCreateEntity=ft,v.canDeleteEntity=qt,v.canEditEntity=Fr,v.defaultDateFormat=Dn,v.deleteEntityWithCallbacks=oo,v.enumToObjectEntries=He,v.flattenObject=Nr,v.fullPathToCollectionSegments=Pe,v.getArrayValuesCount=$n,v.getBracketNotation=Zl,v.getCollectionByPathOrId=Vt,v.getCollectionPathsCombinations=Gt,v.getColorForProperty=ql,v.getColorScheme=Qn,v.getDefaultFieldConfig=bl,v.getDefaultFieldId=dr,v.getDefaultPropertiesOrder=Xl,v.getDefaultValueFor=Ut,v.getDefaultValueForDataType=yr,v.getDefaultValuesFor=St,v.getFieldConfig=cr,v.getFieldId=yn,v.getHashValue=pr,v.getIcon=Ln,v.getIconForProperty=pe,v.getIconForView=Zt,v.getIconForWidget=Ht,v.getIdIcon=Jl,v.getLabelOrConfigFrom=_t,v.getLastSegment=Dl,v.getPropertiesWithPropertiesOrder=zn,v.getPropertyInPath=ot,v.getRandomId=Pt,v.getReferenceFrom=Ue,v.getReferencePreviewKeys=Un,v.getResolvedPropertyInPath=Ir,v.getValueInPath=je,v.hydrateRegExp=Gn,v.isDefaultFieldConfigId=ml,v.isEmptyObject=br,v.isEnumValueDisabled=Gl,v.isHidden=xt,v.isObject=zt,v.isPropertyBuilder=ye,v.isReadOnly=dt,v.isReferenceProperty=Yn,v.isValidRegExp=Hl,v.joinCollectionLists=jn,v.makePropertiesEditable=_n,v.makePropertiesNonEditable=Wn,v.mergeCollection=Hn,v.mergeDeep=Te,v.pick=In,v.plural=Kl,v.randomColor=_l,v.randomString=At,v.removeFunctions=hr,v.removeInPath=Ol,v.removeInitialAndTrailingSlashes=Ae,v.removeInitialSlash=xn,v.removePropsIfExisting=Fn,v.removeTrailingSlash=Sn,v.removeUndefined=mr,v.renderSkeletonCaptionText=xi,v.renderSkeletonIcon=Yr,v.renderSkeletonImageThumbnail=Gr,v.renderSkeletonText=$e,v.resolveArrayProperty=Je,v.resolveCollection=Ie,v.resolveCollectionPathIds=gr,v.resolveDefaultSelectedView=xr,v.resolveEntityView=Er,v.resolveEnumValues=Yl,v.resolveNavigationFrom=lo,v.resolvePermissions=It,v.resolveProperties=wr,v.resolveProperty=Se,v.resolvePropertyEnum=Cr,v.sanitizeData=Vl,v.saveEntityWithCallbacks=Dr,v.segmentsToStrippedPath=Vn,v.serializeRegExp=jl,v.singular=Rl,v.slugify=Wt,v.sortProperties=kr,v.stripCollectionPath=Sr,v.toKebabCase=Ll,v.toSnakeCase=$l,v.traverseValueProperty=$t,v.traverseValuesProperties=vr,v.unslugify=Wl,v.updateDateAutoValues=Nn,v.useAuthController=qe,v.useBrowserTitleAndIcon=ma,v.useBuildLocalConfigurationPersistence=$a,v.useBuildModeController=Ua,v.useClearRestoreValue=Fe,v.useClipboard=io,v.useCollectionFetch=ui,v.useDataSource=Qe,v.useDebounce=jt,v.useEntityCollectionTableController=rn,v.useEntityFetch=Mr,v.useFireCMSContext=J,v.useLargeLayout=Me,v.useModeController=Or,v.useNavigationController=ae,v.useReferenceDialog=wt,v.useResolvedNavigationFrom=gi,v.useSelectionController=fn,v.useSideDialogContext=lr,v.useSideDialogsController=Ft,v.useSideEntityController=Ze,v.useSnackbarController=Xe,v.useStorageSource=ut,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|
|
1611
589
|
//# sourceMappingURL=index.umd.js.map
|