@daisforge/ui 1.22.0 → 1.24.0
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/chunks/AiAgentPopup-CLGSjg5L.cjs +11 -0
- package/chunks/AiAgentPopup-CtMhai1X.mjs +797 -0
- package/chunks/AnalyticalWidget-Bvcm1qpU.cjs +43 -0
- package/chunks/AnalyticalWidget-CRfihris.mjs +352 -0
- package/chunks/ApprovalCenter-D7K7J-QB.cjs +1 -0
- package/chunks/{ApprovalCenter-DLKZP2AO.mjs → ApprovalCenter-dJpI91uN.mjs} +10 -10
- package/chunks/BlockTitle-CcYYHiOo.cjs +1 -0
- package/chunks/{BlockTitle-DsXxImR6.mjs → BlockTitle-DCmM-9AN.mjs} +2 -2
- package/chunks/{Container-DbZwlfIM.mjs → Container-C7PzvUwd.mjs} +1 -1
- package/chunks/{Container-DHnX1sHY.cjs → Container-bVqI3en9.cjs} +1 -1
- package/chunks/{EmptyState-DH1xawxg.cjs → EmptyState-D-bmtvmy.cjs} +1 -1
- package/chunks/{EmptyState-CUCseg9M.mjs → EmptyState-ZsOlvU4d.mjs} +1 -1
- package/chunks/{FiltersActions-BJ5gD6Nx.mjs → FiltersActions-DA06ZTCK.mjs} +15 -15
- package/chunks/FiltersActions-DqIbyWHy.cjs +1 -0
- package/chunks/{FormSegmentGroup-BYQ6yMK1.cjs → FormSegmentGroup-CNIqOYfm.cjs} +1 -1
- package/chunks/{FormSegmentGroup-C9qYxYT9.mjs → FormSegmentGroup-DwTRM58f.mjs} +1 -1
- package/chunks/{GridDND-DK6SAO8q.cjs → GridDND-Bwmr7gla.cjs} +1 -1
- package/chunks/{GridDND-CqvpXgCY.mjs → GridDND-DC5VoxEY.mjs} +83 -83
- package/chunks/{LeftPanel-C5SsoRJS.mjs → LeftPanel-C10BLKIn.mjs} +1 -1
- package/chunks/{LeftPanel-AyuV7bGS.cjs → LeftPanel-upGFk7jM.cjs} +1 -1
- package/chunks/{ListOfFilters-CfV2bs_4.mjs → ListOfFilters-Cwqz354m.mjs} +3 -3
- package/chunks/{ListOfFilters-mqTsQbq_.cjs → ListOfFilters-DSysYwOU.cjs} +1 -1
- package/chunks/{MassActions-C6LY-g9r.mjs → MassActions-Bzf8AR_L.mjs} +46 -46
- package/chunks/MassActions-yxSUA4Vl.cjs +1 -0
- package/chunks/PageTitle-Bg4PNEXS.cjs +9 -0
- package/chunks/{PageTitle-DkfAiZM4.mjs → PageTitle-CXtNgH-b.mjs} +7 -7
- package/chunks/{SplitView-BqS1Jbo4.mjs → SplitView-BzamJzNc.mjs} +17 -17
- package/chunks/{SplitView-DNmd4sJe.cjs → SplitView-DeJ3V-kq.cjs} +1 -1
- package/chunks/Stories-CNlL0Bcb.cjs +1 -0
- package/chunks/{Stories-BnHxMCEZ.mjs → Stories-UUV0GNEV.mjs} +33 -33
- package/chunks/{Table-tUWuA3Ri.mjs → Table-C-03ZtkJ.mjs} +2719 -2671
- package/chunks/Table-C1u87WP_.cjs +31 -0
- package/chunks/TableCanvas-IDEevoRM.cjs +30 -0
- package/chunks/{TableCanvas-BX5aciu7.mjs → TableCanvas-SPpKEgwz.mjs} +5988 -5636
- package/chunks/TableGlide-eny8NAi4.cjs +1 -0
- package/chunks/TableGlide-oNq4dFXT.mjs +9222 -0
- package/chunks/{styles-CJ5y9FKW.mjs → styles-CJPkBVWK.mjs} +6 -6
- package/chunks/{styles-kUWPuNSD.cjs → styles-CpC_FuBg.cjs} +1 -1
- package/chunks/{utils-u1KJ37g3.mjs → utils-Hu77fGGe.mjs} +102 -102
- package/chunks/{utils-ChDQGRjv.cjs → utils-OQNruMpn.cjs} +5 -5
- package/components/AiAgentPopover/index.cjs +1 -1
- package/components/AiAgentPopover/index.mjs +1 -1
- package/components/AiAgentPopup/AiAgentInput.d.ts +3 -0
- package/components/AiAgentPopup/AiAgentLeftPanel.d.ts +6 -0
- package/components/AiAgentPopup/AiAgentPopup.constants.d.ts +32 -0
- package/components/AiAgentPopup/AiAgentPopup.d.ts +3 -0
- package/components/AiAgentPopup/AiAgentPopup.styled.d.ts +33 -0
- package/components/AiAgentPopup/AiAgentPopup.types.d.ts +83 -0
- package/components/AiAgentPopup/AiAgentPopup.utils.d.ts +12 -0
- package/components/AiAgentPopup/AiAgentSurface.d.ts +6 -0
- package/components/AiAgentPopup/hooks/useDrag.d.ts +18 -0
- package/components/AiAgentPopup/hooks/useIsDarkTheme.d.ts +1 -0
- package/components/AiAgentPopup/hooks/usePopupPosition.d.ts +20 -0
- package/components/AiAgentPopup/hooks/usePopupResize.d.ts +40 -0
- package/components/AiAgentPopup/hooks/useStateStorage.d.ts +6 -0
- package/components/AiAgentPopup/index.cjs +1 -0
- package/components/AiAgentPopup/index.d.ts +3 -0
- package/components/AiAgentPopup/index.mjs +5 -0
- package/components/AnalyticalWidget/AnalyticalWidget.d.ts +8 -24
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.d.ts +8 -24
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.mjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.mjs +2 -2
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +2 -2
- package/components/AnalyticalWidget/index.cjs +1 -1
- package/components/AnalyticalWidget/index.mjs +1 -1
- package/components/ApprovalCenter/components/index.cjs +1 -1
- package/components/ApprovalCenter/components/index.mjs +1 -1
- package/components/ApprovalCenter/index.cjs +1 -1
- package/components/ApprovalCenter/index.mjs +1 -1
- package/components/Autocomplete/Autocomplete.d.ts +128 -128
- package/components/AutocompleteSearch/index.cjs +1 -1
- package/components/AutocompleteSearch/index.mjs +2 -2
- package/components/BlockGradientScroll/index.cjs +1 -1
- package/components/BlockGradientScroll/index.mjs +1 -1
- package/components/BlockTitle/index.cjs +1 -1
- package/components/BlockTitle/index.mjs +1 -1
- package/components/BlockTitle/utils/index.cjs +1 -1
- package/components/BlockTitle/utils/index.mjs +1 -1
- package/components/Collapse/index.cjs +1 -1
- package/components/Collapse/index.mjs +1 -1
- package/components/Combobox/index.cjs +1 -1
- package/components/Combobox/index.mjs +1 -1
- package/components/EmptyState/components/index.cjs +1 -1
- package/components/EmptyState/components/index.mjs +1 -1
- package/components/EmptyState/index.cjs +1 -1
- package/components/EmptyState/index.mjs +1 -1
- package/components/GridDND/index.cjs +1 -1
- package/components/GridDND/index.mjs +1 -1
- package/components/GridDND/utils/index.cjs +1 -1
- package/components/GridDND/utils/index.mjs +1 -1
- package/components/IconButton/index.cjs +1 -1
- package/components/IconButton/index.mjs +1 -1
- package/components/LeftPanel/components/index.cjs +1 -1
- package/components/LeftPanel/components/index.mjs +1 -1
- package/components/LeftPanel/hooks/index.cjs +1 -1
- package/components/LeftPanel/hooks/index.mjs +1 -1
- package/components/LeftPanel/index.cjs +1 -1
- package/components/LeftPanel/index.mjs +1 -1
- package/components/LeftPanel/utils/index.cjs +1 -1
- package/components/LeftPanel/utils/index.mjs +1 -1
- package/components/ListOfFilters/index.cjs +1 -1
- package/components/ListOfFilters/index.mjs +1 -1
- package/components/MassActions/hooks/index.cjs +1 -1
- package/components/MassActions/hooks/index.mjs +1 -1
- package/components/MassActions/index.cjs +1 -1
- package/components/MassActions/index.mjs +1 -1
- package/components/ModalDF/index.cjs +1 -1
- package/components/ModalDF/index.mjs +1 -1
- package/components/Notification/index.cjs +1 -1
- package/components/Notification/index.mjs +6 -6
- package/components/PageTitle/index.cjs +1 -1
- package/components/PageTitle/index.mjs +1 -1
- package/components/PageTitle/utils/index.cjs +1 -1
- package/components/PageTitle/utils/index.mjs +1 -1
- package/components/PopoverDF/index.cjs +1 -1
- package/components/PopoverDF/index.mjs +9 -9
- package/components/PopoverDF/styled.d.ts +1 -23
- package/components/PopupDF/index.cjs +1 -1
- package/components/PopupDF/index.mjs +118 -143
- package/components/SplitView/index.cjs +1 -1
- package/components/SplitView/index.mjs +1 -1
- package/components/SplitView/utils/index.cjs +1 -1
- package/components/SplitView/utils/index.mjs +1 -1
- package/components/Stories/components/StoriesBanner/index.cjs +1 -1
- package/components/Stories/components/StoriesBanner/index.mjs +1 -1
- package/components/Stories/components/StoriesContent/index.cjs +1 -1
- package/components/Stories/components/StoriesContent/index.mjs +1 -1
- package/components/Stories/components/StoriesPreview/index.cjs +1 -1
- package/components/Stories/components/StoriesPreview/index.mjs +1 -1
- package/components/Stories/components/StoriesProgress/index.cjs +1 -1
- package/components/Stories/components/StoriesProgress/index.mjs +1 -1
- package/components/Stories/components/StoriesViewer/index.cjs +1 -1
- package/components/Stories/components/StoriesViewer/index.mjs +1 -1
- package/components/Stories/index.cjs +1 -1
- package/components/Stories/index.mjs +1 -1
- package/components/Table/components/TableDropdown/index.cjs +1 -1
- package/components/Table/components/TableDropdown/index.mjs +1 -1
- package/components/Table/feature-collapse-table/index.cjs +1 -1
- package/components/Table/feature-collapse-table/index.mjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/Table/feature-column-control/columnsStateDiff.d.ts +11 -0
- package/components/Table/feature-column-control/index.cjs +1 -1
- package/components/Table/feature-column-control/index.mjs +1 -1
- package/components/Table/feature-column-control/types.d.ts +2 -0
- package/components/Table/feature-columns-grouping/index.cjs +1 -1
- package/components/Table/feature-columns-grouping/index.mjs +1 -1
- package/components/Table/feature-context-menu/index.cjs +1 -1
- package/components/Table/feature-context-menu/index.mjs +1 -1
- package/components/Table/feature-edit/index.cjs +1 -1
- package/components/Table/feature-edit/index.mjs +1 -1
- package/components/Table/feature-filtering/combobox/index.cjs +1 -1
- package/components/Table/feature-filtering/combobox/index.mjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/Table/feature-filtering/index.cjs +1 -1
- package/components/Table/feature-filtering/index.mjs +1 -1
- package/components/Table/feature-filtering/popover.d.ts +1 -23
- package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/Table/feature-infinity-scroll/index.cjs +1 -1
- package/components/Table/feature-infinity-scroll/index.mjs +1 -1
- package/components/Table/feature-key-text/index.cjs +1 -1
- package/components/Table/feature-key-text/index.mjs +1 -1
- package/components/Table/feature-pagination/index.cjs +1 -1
- package/components/Table/feature-pagination/index.mjs +1 -1
- package/components/Table/feature-right-sidebar/index.cjs +1 -1
- package/components/Table/feature-right-sidebar/index.mjs +1 -1
- package/components/Table/feature-row-detail/index.cjs +1 -1
- package/components/Table/feature-row-detail/index.mjs +1 -1
- package/components/Table/feature-row-instruments/index.cjs +1 -1
- package/components/Table/feature-row-instruments/index.mjs +1 -1
- package/components/Table/feature-row-size/index.cjs +1 -1
- package/components/Table/feature-row-size/index.mjs +1 -1
- package/components/Table/feature-rows-grouping/index.cjs +1 -1
- package/components/Table/feature-rows-grouping/index.mjs +1 -1
- package/components/Table/feature-searching/index.cjs +1 -1
- package/components/Table/feature-searching/index.mjs +1 -1
- package/components/Table/feature-searching/styled.d.ts +128 -128
- package/components/Table/feature-select-row/index.cjs +1 -1
- package/components/Table/feature-select-row/index.mjs +1 -1
- package/components/Table/feature-sorting/index.cjs +1 -1
- package/components/Table/feature-sorting/index.mjs +1 -1
- package/components/Table/feature-table-settings/index.cjs +1 -1
- package/components/Table/feature-table-settings/index.mjs +1 -1
- package/components/Table/feature-tree/index.cjs +1 -1
- package/components/Table/feature-tree/index.mjs +1 -1
- package/components/Table/index.cjs +1 -1
- package/components/Table/index.mjs +1 -1
- package/components/Table/renders/formatCell/index.cjs +1 -1
- package/components/Table/renders/formatCell/index.mjs +1 -1
- package/components/Table/styles/index.cjs +1 -1
- package/components/Table/styles/index.mjs +1 -1
- package/components/Table/table-hooks/index.cjs +1 -1
- package/components/Table/table-hooks/index.mjs +1 -1
- package/components/Table/types/index.cjs +1 -1
- package/components/Table/types/index.mjs +1 -1
- package/components/Table/types/utils.type.d.ts +1 -1
- package/components/Table/utils/index.cjs +1 -1
- package/components/Table/utils/index.mjs +1 -1
- package/components/Table/widgets/control-block/index.cjs +1 -1
- package/components/Table/widgets/control-block/index.mjs +1 -1
- package/components/Table/widgets/control-block/right-side/index.cjs +1 -1
- package/components/Table/widgets/control-block/right-side/index.mjs +1 -1
- package/components/Table/widgets/index.cjs +1 -1
- package/components/Table/widgets/index.mjs +1 -1
- package/components/Table/widgets/mass-actions/index.cjs +1 -1
- package/components/Table/widgets/mass-actions/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/TableGlideInstance.d.ts +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.mjs +6 -6
- package/components/TableCanvas/TableGlideInstance/type.d.ts +5 -2
- package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +2 -2
- package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.mjs +2 -2
- package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
- package/components/TableCanvas/contexts.d.ts +8 -2
- package/components/TableCanvas/feature-borders/resolveBorders.d.ts +5 -0
- package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.mjs +11 -11
- package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.mjs +2 -2
- package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +2 -2
- package/components/TableCanvas/feature-column-control/columnsStateDiff.d.ts +11 -0
- package/components/TableCanvas/feature-column-control/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/index.mjs +2 -2
- package/components/TableCanvas/feature-column-control/types.d.ts +2 -0
- package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-content-state/index.cjs +1 -1
- package/components/TableCanvas/feature-content-state/index.mjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
- package/components/TableCanvas/feature-edit/index.cjs +1 -1
- package/components/TableCanvas/feature-edit/index.mjs +6 -6
- package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.mjs +4 -4
- package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/index.mjs +3 -3
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.mjs +4 -4
- package/components/TableCanvas/feature-key-text/index.cjs +1 -1
- package/components/TableCanvas/feature-key-text/index.mjs +5 -5
- package/components/TableCanvas/feature-notifications/index.cjs +1 -1
- package/components/TableCanvas/feature-notifications/index.mjs +2 -2
- package/components/TableCanvas/feature-pagination/TablePagination.d.ts +2 -0
- package/components/TableCanvas/feature-pagination/index.cjs +1 -1
- package/components/TableCanvas/feature-pagination/index.mjs +5 -5
- package/components/TableCanvas/feature-popover-table/components/styled.d.ts +1 -23
- package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.mjs +6 -6
- package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/compatibility.d.ts +8 -0
- package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.d.ts +2 -3
- package/components/TableCanvas/feature-right-sidebar/index.mjs +4 -4
- package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.mjs +7 -7
- package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
- package/components/TableCanvas/feature-row-size/index.cjs +1 -1
- package/components/TableCanvas/feature-row-size/index.mjs +4 -4
- package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.mjs +10 -10
- package/components/TableCanvas/feature-searching/index.cjs +1 -1
- package/components/TableCanvas/feature-searching/index.mjs +2 -2
- package/components/TableCanvas/feature-searching/styled.d.ts +128 -128
- package/components/TableCanvas/feature-select-row/index.cjs +1 -1
- package/components/TableCanvas/feature-select-row/index.mjs +1 -1
- package/components/TableCanvas/feature-sidebar/constants.d.ts +7 -0
- package/components/TableCanvas/feature-sidebar/getCustomSidebarTabs.d.ts +4 -0
- package/components/TableCanvas/feature-sidebar/index.cjs +1 -0
- package/components/TableCanvas/feature-sidebar/index.d.ts +1 -0
- package/components/TableCanvas/feature-sidebar/index.mjs +4 -0
- package/components/TableCanvas/feature-sidebar/ui/BottomSheet.d.ts +6 -0
- package/components/TableCanvas/feature-sidebar/ui/BottomSheet.styled.d.ts +6 -0
- package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/SidebarContentLayout.d.ts +1 -0
- package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/SidebarTabs.d.ts +2 -1
- package/components/TableCanvas/feature-sidebar/ui/TableSidebar.d.ts +16 -0
- package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/styled.d.ts +5 -2
- package/components/TableCanvas/feature-sidebar/useSidebarTabsState.d.ts +14 -0
- package/components/TableCanvas/feature-sorting/index.cjs +1 -1
- package/components/TableCanvas/feature-sorting/index.mjs +2 -2
- package/components/TableCanvas/feature-sticky/index.cjs +1 -0
- package/components/TableCanvas/feature-sticky/index.d.ts +3 -0
- package/components/TableCanvas/feature-sticky/index.mjs +5 -0
- package/components/TableCanvas/feature-sticky/types.d.ts +2 -0
- package/components/TableCanvas/feature-sticky/useStickyColumnIndexes.d.ts +8 -0
- package/components/TableCanvas/feature-sticky/useStickyRowIndexes.d.ts +3 -0
- package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
- package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.mjs +2 -2
- package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.mjs +4 -4
- package/components/TableCanvas/feature-tree/index.cjs +1 -1
- package/components/TableCanvas/feature-tree/index.mjs +1 -1
- package/components/TableCanvas/index.cjs +1 -1
- package/components/TableCanvas/index.d.ts +2 -1
- package/components/TableCanvas/index.mjs +58 -54
- package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
- package/components/TableCanvas/styles/classNames.d.ts +1 -0
- package/components/TableCanvas/styles/getReservedTableHeight.d.ts +18 -0
- package/components/TableCanvas/styles/index.cjs +1 -1
- package/components/TableCanvas/styles/index.mjs +26 -24
- package/components/TableCanvas/styles/styles.constants.d.ts +3 -1
- package/components/TableCanvas/styles/styles.d.ts +4 -6
- package/components/TableCanvas/table-hooks/index.cjs +1 -1
- package/components/TableCanvas/table-hooks/index.mjs +4 -4
- package/components/TableCanvas/table-hooks/useInlineStyle.d.ts +2 -1
- package/components/TableCanvas/table-hooks/useLeftSidebarValues.d.ts +7 -0
- package/components/TableCanvas/table-hooks/useSidebarOpenState.d.ts +11 -0
- package/components/TableCanvas/table-hooks/useSidebarValues.d.ts +1 -0
- package/components/TableCanvas/types/index.cjs +1 -1
- package/components/TableCanvas/types/index.mjs +2 -2
- package/components/TableCanvas/types/table-config.type.d.ts +21 -2
- package/components/TableCanvas/utils/calculateMinColumnWidth.d.ts +6 -1
- package/components/TableCanvas/utils/index.cjs +1 -1
- package/components/TableCanvas/utils/index.mjs +4 -4
- package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/control-block.constants.d.ts +6 -0
- package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.mjs +5 -5
- package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.mjs +2 -2
- package/components/TableCanvas/widgets/control-block/types.d.ts +1 -0
- package/components/TableCanvas/widgets/header-buttons-state.d.ts +16 -0
- package/components/TableCanvas/widgets/index.cjs +1 -1
- package/components/TableCanvas/widgets/index.mjs +5 -5
- package/components/TableCanvas/widgets/mass-actions/MassActions.d.ts +2 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +3 -3
- package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsCanvasWidth.d.ts +1 -0
- package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsCompression.d.ts +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsSidebar.d.ts +4 -1
- package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
- package/components/TableCanvas/widgets/table-or-card-UI.d.ts +8 -4
- package/components/TableContract/index.cjs +1 -1
- package/components/TableContract/index.mjs +2 -2
- package/components/TableGlide/TableGlide.d.ts +1 -1
- package/components/TableGlide/constants.d.ts +3 -3
- package/components/TableGlide/content-tokens.generated.d.ts +612 -0
- package/components/TableGlide/hooks/selection/index.cjs +1 -1
- package/components/TableGlide/hooks/selection/index.mjs +1 -1
- package/components/TableGlide/hooks/selection/useBaseHighlightRegions.d.ts +3 -1
- package/components/TableGlide/hooks/selection/useColoringLayers.d.ts +3 -3
- package/components/TableGlide/hooks/selection/useColumnRowHighlightRegions.d.ts +2 -4
- package/components/TableGlide/hooks/selection/useSelectionGeometry.d.ts +3 -1
- package/components/TableGlide/hooks/useErrorCellRanges.d.ts +1 -2
- package/components/TableGlide/index.cjs +1 -1
- package/components/TableGlide/index.mjs +46 -46
- package/components/TableGlide/lib/canvas/cells/buttons/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/buttons/index.mjs +14 -14
- package/components/TableGlide/lib/canvas/cells/iconSprites/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/iconSprites/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/index.mjs +18 -18
- package/components/TableGlide/lib/canvas/cells/renderer/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/renderer/index.mjs +4 -4
- package/components/TableGlide/lib/canvas/core/CanvasNode.d.ts +1 -0
- package/components/TableGlide/lib/canvas/core/CanvasNode.type.d.ts +1 -0
- package/components/TableGlide/lib/canvas/core/helpers/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/core/helpers/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/core/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/core/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/hooks/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/hooks/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/index.mjs +46 -46
- package/components/TableGlide/lib/canvas/miniflex/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/miniflex/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/miniflex/types.d.ts +1 -0
- package/components/TableGlide/lib/canvas/primitives/CanvasLink.d.ts +2 -2
- package/components/TableGlide/lib/canvas/primitives/CanvasText.d.ts +5 -1
- package/components/TableGlide/lib/canvas/primitives/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/primitives/index.mjs +5 -5
- package/components/TableGlide/lib/canvas/utils/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/utils/index.mjs +4 -4
- package/components/TableGlide/lib/canvas/utils/textOverflow.d.ts +1 -0
- package/components/TableGlide/theming/activeTheme.type.d.ts +3 -1
- package/components/TableGlide/theming/cell-fill-override.d.ts +31 -0
- package/components/TableGlide/theming/custom-colors.d.ts +52 -11
- package/components/TableGlide/theming/fill-states.d.ts +19 -0
- package/components/TableGlide/theming/glide-colors.d.ts +14 -14
- package/components/TableGlide/theming/index.cjs +1 -1
- package/components/TableGlide/theming/index.d.ts +2 -2
- package/components/TableGlide/theming/index.mjs +1 -1
- package/components/TableGlide/theming/size-tokens.d.ts +1 -1
- package/components/TableGlide/theming/table-colors.generated.d.ts +569 -0
- package/components/TableGlide/tokens.d.ts +1 -104
- package/components/TableGlide/types.d.ts +10 -5
- package/components/TableTabs/index.cjs +1 -1
- package/components/TableTabs/index.mjs +1 -1
- package/components/Tooltip/index.cjs +1 -1
- package/components/Tooltip/index.mjs +1 -1
- package/components/TourWidget/index.cjs +3 -3
- package/components/TourWidget/index.mjs +14 -14
- package/components/Typography/index.cjs +1 -1
- package/components/Typography/index.mjs +1 -1
- package/components/Widget/index.cjs +1 -1
- package/components/Widget/index.mjs +2 -2
- package/formComponents/FormCombobox/index.cjs +1 -1
- package/formComponents/FormCombobox/index.mjs +1 -1
- package/formComponents/FormRadioGroupBox/index.cjs +1 -1
- package/formComponents/FormRadioGroupBox/index.mjs +1 -1
- package/formComponents/FormSegments/index.cjs +1 -1
- package/formComponents/FormSegments/index.mjs +1 -1
- package/formComponents/FormSwitch/index.cjs +1 -1
- package/formComponents/FormSwitch/index.mjs +1 -1
- package/index.cjs +1 -1
- package/index.d.ts +3 -1
- package/index.mjs +1864 -1859
- package/layouts/Container/index.cjs +1 -1
- package/layouts/Container/index.mjs +1 -1
- package/layouts/Container/lib/utils/index.cjs +1 -1
- package/layouts/Container/lib/utils/index.mjs +1 -1
- package/layouts/ErrorPage/index.cjs +1 -1
- package/layouts/ErrorPage/index.mjs +1 -1
- package/layouts/FiltersActions/hooks/index.cjs +1 -1
- package/layouts/FiltersActions/hooks/index.mjs +1 -1
- package/layouts/FiltersActions/index.cjs +1 -1
- package/layouts/FiltersActions/index.mjs +1 -1
- package/layouts/Layout/index.cjs +1 -1
- package/layouts/Layout/index.mjs +1 -1
- package/layouts/PageLayout/index.cjs +1 -1
- package/layouts/PageLayout/index.mjs +1 -1
- package/mcp-data/component-index.json +6385 -10584
- package/mixins/index.cjs +4 -4
- package/mixins/index.mjs +61 -54
- package/package.json +6 -6
- package/shared/utils/resizable/index.cjs +1 -0
- package/shared/utils/resizable/index.d.ts +2 -0
- package/shared/utils/resizable/index.mjs +39 -0
- package/shared/utils/resizable/resizableConfig.d.ts +16 -0
- package/styles/index.cjs +1 -1
- package/styles/index.mjs +1 -1
- package/types/index.d.ts +1 -0
- package/types/utility.d.ts +1 -0
- package/utils/breakpoint/index.cjs +1 -1
- package/utils/breakpoint/index.mjs +2 -2
- package/utils/clickStream/index.cjs +1 -1
- package/utils/clickStream/index.mjs +1 -1
- package/utils/eventBus/index.cjs +1 -1
- package/utils/eventBus/index.mjs +1 -1
- package/utils/getActiveTheme.d.ts +1 -1
- package/utils/hooks/index.cjs +1 -1
- package/utils/hooks/index.mjs +1 -1
- package/utils/index.cjs +1 -1
- package/utils/index.mjs +8 -8
- package/utils/react/index.cjs +1 -1
- package/utils/react/index.mjs +1 -1
- package/utils/styles/index.cjs +1 -1
- package/utils/styles/index.mjs +1 -1
- package/chunks/AnalyticalWidget-BtyWKJuu.mjs +0 -537
- package/chunks/AnalyticalWidget-YytE3Rlw.cjs +0 -43
- package/chunks/ApprovalCenter-DdsLEipZ.cjs +0 -1
- package/chunks/BlockTitle-DC1McGof.cjs +0 -1
- package/chunks/FiltersActions-Bg5wvHFG.cjs +0 -1
- package/chunks/MassActions-BTrj9l-R.cjs +0 -1
- package/chunks/PageTitle-CrBeieoq.cjs +0 -9
- package/chunks/Stories-UYVANawW.cjs +0 -1
- package/chunks/Table-vv1HTrxe.cjs +0 -31
- package/chunks/TableCanvas-qnwh4c5g.cjs +0 -30
- package/chunks/TableGlide-BLbbkn4C.mjs +0 -8154
- package/chunks/TableGlide-CZ2mkokV.cjs +0 -1
- package/components/TableCanvas/feature-right-sidebar/constants.d.ts +0 -1
- package/components/TableCanvas/feature-right-sidebar/ui/TableSidebar.d.ts +0 -16
- /package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/TableSidebar.classnames.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const I=require("@glideappsfinal/glide-data-grid"),Ii=require("@salutejs/sdds-themes/tokens/sdds_finai"),Sa=require("canvas-hypertxt"),F=require("react"),wa=require("react-dom/server"),At=require("react/jsx-runtime");require("@glideappsfinal/glide-data-grid/dist/index.css");const jt=require("./utils-OQNruMpn.cjs"),qe=require("react-dom"),Ge=require("../components/TableCanvasSharedConstants/index.cjs"),Ko=require("styled-components"),w={bgCell:{light:"#FFFFFF",dark:"#060A0C",betaCoreLight:"#FFFFFF",betaCoreDark:"#060A0D",highContrastLight:"#FFFFFF",highContrastDark:"#060A0C"},bgRowHovered:{light:"#F5F7F9",dark:"#0C1013",betaCoreLight:"#F4F8FA",betaCoreDark:"#0C1013",highContrastLight:"#E8EEF2",highContrastDark:"#0C1013"},bgHeader:{light:"#ECF6FC",dark:"#071A26",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#CFE5F2",highContrastDark:"#071A26"},bgHeaderHasFocus:{light:"#ECF6FC",dark:"#071A26",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#CFE5F2",highContrastDark:"#071A26"},bgGroupHeader:{light:"#ECF6FC",dark:"#071A26",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#CFE5F2",highContrastDark:"#071A26"},bgHeaderHovered:{light:"#DEF0FA",dark:"#0A212F",betaCoreLight:"#E1F2FF",betaCoreDark:"#11212D",highContrastLight:"#C2DEEE",highContrastDark:"#0A212F"},bgGroupHeaderHovered:{light:"#DEF0FA",dark:"#0A212F",betaCoreLight:"#E1F2FF",betaCoreDark:"#11212D",highContrastLight:"#C2DEEE",highContrastDark:"#0A212F"},selectionServiceActiveBg:{light:"#D1E9F8",dark:"#09314B",betaCoreLight:"#D2EBFB",betaCoreDark:"#0A3248",highContrastLight:"#B6D8EE",highContrastDark:"#09314B"},bgHeaderSelectedHovered:{light:"#C3E3F6",dark:"#0C3956",betaCoreLight:"#C4E5FA",betaCoreDark:"#0D3A53",highContrastLight:"#A9D1EB",highContrastDark:"#0C3956"},selectionCheckboxBg:{light:"#ECF6FC",dark:"#071A26",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#CFE5F2",highContrastDark:"#071A26"},selectionServiceBg:{light:"#ECF6FC",dark:"#071A26",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#CFE5F2",highContrastDark:"#071A26"},bgSelectedRowHovered:{light:"#DEF0FA",dark:"#0A212F",betaCoreLight:"#E1F2FF",betaCoreDark:"#11212D",highContrastLight:"#C2DEEE",highContrastDark:"#0A212F"},bgSelectedRowActiveHovered:{light:"#D0EAF8",dark:"#0E2839",betaCoreLight:"#D3ECFF",betaCoreDark:"#162836",highContrastLight:"#B5D7EA",highContrastDark:"#0E2839"},bgServiceRowHovered:{light:"#DEF0FA",dark:"#0A212F",betaCoreLight:"#E1F2FF",betaCoreDark:"#11212D",highContrastLight:"#C2DEEE",highContrastDark:"#0A212F"},selectionServiceActiveHoveredBg:{light:"#C3E3F6",dark:"#0C3956",betaCoreLight:"#C4E5FA",betaCoreDark:"#0D3A53",highContrastLight:"#A9D1EB",highContrastDark:"#0C3956"},selectionActiveBg:{light:"#E2F1FB",dark:"#082436",betaCoreLight:"#E0F2FB",betaCoreDark:"#052536",highContrastLight:"#E0EEFA",highContrastDark:"#082436"},accentLight:{light:"#E2F1FB",dark:"#082436",betaCoreLight:"#E0F2FB",betaCoreDark:"#052536",highContrastLight:"#E0EEFA",highContrastDark:"#082436"},selectionActiveCheckboxBg:{light:"#D1E9F8",dark:"#09314B",betaCoreLight:"#D2EBFB",betaCoreDark:"#0A3248",highContrastLight:"#B6D8EE",highContrastDark:"#09314B"},selectionActiveHoveredBg:{light:"#D5EBF9",dark:"#0B2B40",betaCoreLight:"#D2ECF9",betaCoreDark:"#072D40",highContrastLight:"#D3E7F8",highContrastDark:"#0B2B40"},selectionActiveCheckboxHoveredBg:{light:"#C3E3F6",dark:"#0C3956",betaCoreLight:"#C4E5FA",betaCoreDark:"#0D3A53",highContrastLight:"#A9D1EB",highContrastDark:"#0C3956"},bgEditableCell:{light:"#FFF6E5",dark:"#211807",betaCoreLight:"#FFF5E7",betaCoreDark:"#211607",highContrastLight:"#F1DDB8",highContrastDark:"#211807"},bgEditableCellHovered:{light:"#FFEFD2",dark:"#291F0A",betaCoreLight:"#FFEDD5",betaCoreDark:"#291C0A",highContrastLight:"#EED5A8",highContrastDark:"#291F0A"},bgEditableCellActive:{light:"#E2E9E4",dark:"#1E2F32",betaCoreLight:"#E0E9E5",betaCoreDark:"#1A2E31",highContrastLight:"#D4D0BB",highContrastDark:"#1E2F32"},bgEditableCellActiveHovered:{light:"#D8E2DB",dark:"#24373A",betaCoreLight:"#D6E2DC",betaCoreDark:"#1F3639",highContrastLight:"#CDC8B0",highContrastDark:"#24373A"},bgEditableCellRowActiveHovered:{light:"#FFE8BF",dark:"#31260E",betaCoreLight:"#FFE5C3",betaCoreDark:"#32230E",highContrastLight:"#EBCD97",highContrastDark:"#31260E"},editedSuccessfullyCellColor:{light:"#EDF8FF",dark:"#0A1924",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#DAE8F1",highContrastDark:"#0A1924"},editedSuccessfullyCellHoverColor:{light:"#DEF2FF",dark:"#0E202D",betaCoreLight:"#E1F2FF",betaCoreDark:"#11212D",highContrastLight:"#CEE1ED",highContrastDark:"#0E202D"},editedSuccessfullyCellActiveColor:{light:"#D2EBFB",dark:"#0B3049",betaCoreLight:"#D2EBFB",betaCoreDark:"#0A3248",highContrastLight:"#BFDAED",highContrastDark:"#0B3049"},editedSuccessfullyCellActiveHoverColor:{light:"#C4E5FA",dark:"#0E3854",betaCoreLight:"#C4E5FA",betaCoreDark:"#0D3A53",highContrastLight:"#B3D3E9",highContrastDark:"#0E3854"},editedSuccessfullyCellRowActiveHoverColor:{light:"#CFECFF",dark:"#122736",betaCoreLight:"#D3ECFF",betaCoreDark:"#162836",highContrastLight:"#C2DAE9",highContrastDark:"#122736"},bgCellPositive:{light:"#E3F3E6",dark:"#0A2814",betaCoreLight:"#E4F3E7",betaCoreDark:"#0B2816",highContrastLight:"#E3F1E0",highContrastDark:"#0A2814"},bgCellPositiveHovered:{light:"#D7EEDB",dark:"#0E3019",betaCoreLight:"#D8EEDC",betaCoreDark:"#0F301B",highContrastLight:"#D8EBD4",highContrastDark:"#0E3019"},bgCellPositiveActive:{light:"#C9E6E5",dark:"#0B3C3D",betaCoreLight:"#C8E7E5",betaCoreDark:"#093D3D",highContrastLight:"#C7E2DE",highContrastDark:"#0B3C3D"},bgCellPositiveActiveHovered:{light:"#BBE0DF",dark:"#0E4546",betaCoreLight:"#BAE1DF",betaCoreDark:"#0C4646",highContrastLight:"#BADCD7",highContrastDark:"#0E4546"},bgCellPositiveRowActiveHovered:{light:"#CBE9D0",dark:"#12381E",betaCoreLight:"#CCE9D1",betaCoreDark:"#133821",highContrastLight:"#CDE5C8",highContrastDark:"#12381E"},bgCellNegative:{light:"#FFE0E3",dark:"#4A0D13",betaCoreLight:"#FEDFDE",betaCoreDark:"#480B11",highContrastLight:"#FFE0E3",highContrastDark:"#4A0D13"},bgCellNegativeHovered:{light:"#FED6DA",dark:"#561117",betaCoreLight:"#FDD5D4",betaCoreDark:"#540E15",highContrastLight:"#FED6DA",highContrastDark:"#561117"},bgCellNegativeActive:{light:"#E2D6E3",dark:"#3F263C",betaCoreLight:"#DFD5DE",betaCoreDark:"#3A2639",highContrastLight:"#E2D6E3",highContrastDark:"#3F263C"},bgCellNegativeActiveHovered:{light:"#DCCDDD",dark:"#482C45",betaCoreLight:"#D8CCD7",betaCoreDark:"#432C42",highContrastLight:"#DCCDDD",highContrastDark:"#482C45"},bgCellNegativeRowActiveHovered:{light:"#FDCCD1",dark:"#62151B",betaCoreLight:"#FCCBCA",betaCoreDark:"#601119",highContrastLight:"#FDCCD1",highContrastDark:"#62151B"},bgCellWarning:{light:"#FEECE1",dark:"#371B0B",betaCoreLight:"#FBEAE0",betaCoreDark:"#32190A",highContrastLight:"#FAEBE0",highContrastDark:"#371B0B"},bgCellWarningHovered:{light:"#FDE3D3",dark:"#41210F",betaCoreLight:"#F9E1D2",betaCoreDark:"#3C1F0E",highContrastLight:"#F8E2D2",highContrastDark:"#41210F"},bgCellWarningActive:{light:"#E1E0E1",dark:"#2F3235",betaCoreLight:"#DCDFDF",betaCoreDark:"#283134",highContrastLight:"#DCDDDE",highContrastDark:"#2F3235"},bgCellWarningActiveHovered:{light:"#CFDAE5",dark:"#363A3D",betaCoreLight:"#C7D9E7",betaCoreDark:"#2F393C",highContrastLight:"#D4D5D6",highContrastDark:"#363A3D"},bgCellWarningRowActiveHovered:{light:"#FCDAC5",dark:"#4B2713",betaCoreLight:"#F7D8C4",betaCoreDark:"#462512",highContrastLight:"#F6D9C4",highContrastDark:"#4B2713"},bgCellInfo:{light:"#CFECFF",dark:"#0C283B",betaCoreLight:"#D3EBFF",betaCoreDark:"#09283D",highContrastLight:"#CFECFF",highContrastDark:"#0C283B"},bgCellInfoHovered:{light:"#C0E6FF",dark:"#103045",betaCoreLight:"#C5E5FF",betaCoreDark:"#0C3048",highContrastLight:"#C0E6FF",highContrastDark:"#103045"},bgCellInfoActive:{light:"#B8E0FB",dark:"#0D3C5C",betaCoreLight:"#B9E0FB",betaCoreDark:"#073D5C",highContrastLight:"#B8E0FB",highContrastDark:"#0D3C5C"},bgCellInfoActiveHovered:{light:"#AADAFA",dark:"#104467",betaCoreLight:"#ABDAFA",betaCoreDark:"#094567",highContrastLight:"#AADAFA",highContrastDark:"#104467"},bgCellInfoRowActiveHovered:{light:"#B1E0FF",dark:"#14384F",betaCoreLight:"#B7DFFF",betaCoreDark:"#0F3853",highContrastLight:"#B1E0FF",highContrastDark:"#14384F"},textDark:{light:"#13181BF5",dark:"#F2F5F8F5",betaCoreLight:"#14191DF5",betaCoreDark:"#F3F7FAF5",highContrastLight:"#13181BF5",highContrastDark:"#F2F5F8F5"},textHeader:{light:"#13181BF5",dark:"#F2F5F8F5",betaCoreLight:"#14191DF5",betaCoreDark:"#F3F7FAF5",highContrastLight:"#13181BF5",highContrastDark:"#F2F5F8F5"},textHeaderSelected:{light:"#13181BF5",dark:"#F2F5F8F5",betaCoreLight:"#14191DF5",betaCoreDark:"#F3F7FAF5",highContrastLight:"#13181BF5",highContrastDark:"#F2F5F8F5"},textGroupHeader:{light:"#13181BF5",dark:"#F2F5F8F5",betaCoreLight:"#14191DF5",betaCoreDark:"#F3F7FAF5",highContrastLight:"#13181BF5",highContrastDark:"#F2F5F8F5"},borderColor:{light:"#D5DFE6",dark:"#23292D",betaCoreLight:"#CFDBE4",betaCoreDark:"#262626",highContrastLight:"#C4CFD7",highContrastDark:"#23292D"},accentColor:{light:"#0B7ECB",dark:"#199AF0",betaCoreLight:"#0087CD",betaCoreDark:"#1F9EEB",highContrastLight:"#0058A2",highContrastDark:"#199AF0"},hiddenColumnsIndicatorColor:{light:"#0B7ECB",dark:"#199AF0",betaCoreLight:"#0087CD",betaCoreDark:"#1F9EEB",highContrastLight:"#0058A2",highContrastDark:"#199AF0"},errorOutlineColor:{light:"#FF293E",dark:"#FF293E",betaCoreLight:"#F81C42",betaCoreDark:"#F81C42",highContrastLight:"#E7002F",highContrastDark:"#FF293E"},fadeWhite:{light:"#FFFFFF",dark:"#060A0C",betaCoreLight:"#FFFFFF",betaCoreDark:"#060A0D",highContrastLight:"#FFFFFF",highContrastDark:"#060A0C"},fadeGray:{light:"#F2F5F8",dark:"#060A0C",betaCoreLight:"#F3F7FA",betaCoreDark:"#060A0D",highContrastLight:"#F2F5F8",highContrastDark:"#060A0C"},textHeaderClean:{light:"#485056B0",dark:"#D5DFE69E",betaCoreLight:"#475158B0",betaCoreDark:"#CFDBE49E",highContrastLight:"#03070CB0",highContrastDark:"#D5DFE69E"},bgZebraRow:{light:"#F4F7F9",dark:"#15181A",betaCoreLight:"#F3F6F8",betaCoreDark:"#15181B",highContrastLight:"#E7ECEF",highContrastDark:"#15181A"},bgZebraRowHovered:{light:"#E9EFF3",dark:"#1B1F21",betaCoreLight:"#E9EEF2",betaCoreDark:"#1B1F23",highContrastLight:"#DDE4E8",highContrastDark:"#1B1F21"},bgZebraRowActive:{light:"#D8EAF6",dark:"#142F41",betaCoreLight:"#D5EAF4",betaCoreDark:"#113041",highContrastLight:"#CBDEEB",highContrastDark:"#142F41"},bgZebraRowActiveHovered:{light:"#CBE3F3",dark:"#18374B",betaCoreLight:"#C8E3F0",betaCoreDark:"#15384B",highContrastLight:"#C0D7E7",highContrastDark:"#18374B"}},Ta={light:{mode:"light",stepFactor:1,cardHex:"#FFFFFFFF",primaryHex:"#F2F5F8",selectionHex:"#118CDF1F"},dark:{mode:"dark",stepFactor:1.2,cardHex:"#060A0C",primaryHex:"#13181B",selectionHex:"#118CDF33"},betaCoreLight:{mode:"light",stepFactor:1,cardHex:"#FFFFFF",primaryHex:"#F3F7FA",selectionHex:"#0090DA1F"},betaCoreDark:{mode:"dark",stepFactor:1.2,cardHex:"#060A0D",primaryHex:"#14191D",selectionHex:"#0090DA33"},highContrastLight:{mode:"light",stepFactor:1,cardHex:"#FFFFFF",primaryHex:null,selectionHex:"#0076D21F"},highContrastDark:{mode:"dark",stepFactor:1.2,cardHex:"#060A0C",primaryHex:"#13181B",selectionHex:"#118CDF33"}},tt={small:{rowHeight:20,cellVerticalPadding:4,cellHorizontalPadding:4,textfieldSize:"xs"},medium:{rowHeight:32,cellVerticalPadding:7,cellHorizontalPadding:6,textfieldSize:"s"},big:{rowHeight:48,cellVerticalPadding:12,cellHorizontalPadding:16,textfieldSize:"s"}},je=i=>tt[i].rowHeight,Ri=i=>tt[i].textfieldSize,Zo={small:tt.small.rowHeight,medium:tt.medium.rowHeight,big:tt.big.rowHeight},Ha={kind:I.GridCellKind.Text,data:"",displayData:"",allowOverlay:!0,readonly:!0},qo={big:{cellVerticalPadding:tt.big.cellVerticalPadding,cellHorizontalPadding:tt.big.cellHorizontalPadding,textfieldSize:tt.big.textfieldSize},medium:{cellVerticalPadding:tt.medium.cellVerticalPadding,cellHorizontalPadding:tt.medium.cellHorizontalPadding,textfieldSize:tt.medium.textfieldSize},small:{cellVerticalPadding:tt.small.cellVerticalPadding,cellHorizontalPadding:tt.small.cellHorizontalPadding,textfieldSize:tt.small.textfieldSize}},Mi={"padding-block":"0px","padding-inline":"0px"},Ut=i=>`${i}px`,Ba={small:{rowHeight:je("small"),cell:{"padding-block":Ut(tt.small.cellVerticalPadding),"padding-inline":Ut(tt.small.cellHorizontalPadding)},editorCell:Mi,input:Ri("small"),icon:"xs",combobox:"s",checkboxOfCombobox:"s",switch:"s",font:()=>Ii.bodyXXS},medium:{rowHeight:je("medium"),cell:{"padding-block":Ut(tt.medium.cellVerticalPadding),"padding-inline":Ut(tt.medium.cellHorizontalPadding)},editorCell:Mi,input:Ri("medium"),icon:"s",combobox:"m",checkboxOfCombobox:"m",switch:"s",font:()=>Ii.bodyS},big:{rowHeight:je("big"),cell:{"padding-block":Ut(tt.big.cellVerticalPadding),"padding-inline":Ut(tt.big.cellHorizontalPadding)},editorCell:Mi,input:Ri("big"),icon:"m",combobox:"l",checkboxOfCombobox:"l",switch:"l",font:()=>Ii.bodyM}},ei=33,ka={bodyM:{"font-size":"1rem","font-weight":400,"line-height":"1.25rem","bold-font-size":"1rem","bold-font-weight":600,"bold-line-height":"1.25rem"},bodyS:{"font-size":"0.875rem","font-weight":400,"line-height":"1.125rem","bold-font-size":"0.875rem","bold-font-weight":600,"bold-line-height":"1.125rem"},bodyXS:{"font-size":"0.75rem","font-weight":400,"line-height":"0.875rem","bold-font-size":"0.75rem","bold-font-weight":600,"bold-line-height":"0.875rem"},bodyXXS:{"font-size":"0.625rem","font-weight":400,"line-height":"0.75rem","bold-font-size":"0.625rem","bold-font-weight":600,"bold-line-height":"0.75rem"}},La=16;function lo(i,t=La){const e=parseFloat(i);return Number.isFinite(e)?i.endsWith("rem")?e*t:e:0}const Pa=(i,t=!1)=>{const e=t?i["bold-font-weight"]:i["font-weight"],r=t?i["bold-font-size"]:i["font-size"],o=t?i["bold-line-height"]:i["line-height"];return`${e} normal ${r}/${o}`},Ia=(i,t=!1)=>{const e=t?i["bold-font-size"]:i["font-size"],r=t?i["bold-line-height"]:i["line-height"];return{fontSize:lo(e),lineHeightPx:lo(r)}},jo=i=>Object.entries(ka).reduce((t,[e,r])=>{const o=e;return t.push([o,i(r)],[`${o}Bold`,i(r,!0)]),t},[]),ii=Object.fromEntries(jo(Pa)),Jo=Object.fromEntries(jo(Ia)),Ra={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto",width:void 0,height:void 0,minWidth:void 0,crossAxisSizing:"auto"},Ma={top:0,right:0,bottom:0,left:0};class Qo{constructor(t=Ra){this.size={width:0,height:0},this.position={x:0,y:0},this.style={flexGrow:t.flexGrow??0,flexShrink:t.flexShrink??1,flexBasis:t.flexBasis??0,alignSelf:t.alignSelf??"auto",width:t.width,height:t.height,minWidth:t.minWidth,crossAxisSizing:t.crossAxisSizing??"auto",id:t.id,metadata:t.metadata},this.id=t.id,this.metadata=t.metadata}}class tn extends Qo{build(){}}class Et extends Qo{constructor(t,e,r={}){super({}),this.children=[],this.direction="row",this.wrap="nowrap",this.columnGap=0,this.rowGap=0,this.justifyContent="flex-start",this.alignItems="stretch",this.alignContent="stretch",this.padding={top:0,right:0,bottom:0,left:0},this.size.width=t,this.size.height=e,this.id=r.id,r.direction!==void 0&&(this.direction=r.direction),r.wrap!==void 0&&(this.wrap=r.wrap),r.columnGap!==void 0&&(this.columnGap=r.columnGap),r.rowGap!==void 0&&(this.rowGap=r.rowGap),r.justifyContent!==void 0&&(this.justifyContent=r.justifyContent),r.alignItems!==void 0&&(this.alignItems=r.alignItems),r.alignContent!==void 0&&(this.alignContent=r.alignContent),this.padding=en(r.padding)}addChild(t,e){if(t instanceof Et){const o=t;if(e){const n=o.style;n.flexGrow=e.flexGrow??0,n.flexShrink=e.flexShrink??1,n.flexBasis=e.flexBasis??0,n.alignSelf=e.alignSelf??"auto",n.width=e.width,n.height=e.height,n.minWidth=e.minWidth,n.crossAxisSizing=e.crossAxisSizing??"auto"}return this.children.push(o),o}const r=new tn(t);return this.children.push(r),r}getContainerMetrics(){const t=this.direction==="row"||this.direction==="row-reverse",{left:e,right:r,top:o,bottom:n}=this.padding,{width:s,height:a}=this.size;return t?{main:s-e-r,cross:a-o-n,mainGap:this.columnGap,crossGap:this.rowGap}:{main:a-o-n,cross:s-e-r,mainGap:this.rowGap,crossGap:this.columnGap}}buildFlexLines(t,e){if(this.wrap==="nowrap")return[t];const r=[];let o=[],n=0;for(const s of t){const a=s.style.flexBasis,c=o.length>0?e.mainGap:0;o.length>0&&n+c+a>e.main&&(r.push(o),o=[],n=0),o.push(s),n+=(o.length>1?e.mainGap:0)+a}return o.length>0&&r.push(o),this.wrap==="wrap-reverse"&&r.reverse(),r}measureLineCrossSizes(t,e){const r=[];for(const o of t){let n=0;for(const s of o){if(this.isDeferredCrossAxisPercentChild(s,e))continue;const a=e?s.style.height:s.style.width,c=a!==void 0?a:e?s.size.height:s.size.width;c>n&&(n=c)}r.push(n)}return r}isDeferredCrossAxisPercentChild(t,e){const r=e?t.style.height:t.style.width;return(t.style.alignSelf!=="auto"?t.style.alignSelf:this.alignItems)==="stretch"&&r===void 0&&t.style.crossAxisSizing==="deferred-percent-stretch"}resolveCrossAxisLayout(t,e){const r=t.length,o=t.reduce((d,h)=>d+h,0),n=e.crossGap*(r>1?r-1:0),s=e.cross-o-n;let a=0,c=e.crossGap;if(this.wrap==="nowrap"&&r===1)t[0]=e.cross;else if(this.wrap!=="nowrap"){const{crossStart:d,crossBetween:h}=this.calculateAlignContent(s,r,e.crossGap);if(a=d,c=h,this.alignContent==="stretch"&&s>0){const l=s/r;for(let u=0;u<r;u++)t[u]+=l}}return{crossStart:a,crossBetween:c}}calculateAlignContent(t,e,r){let o=0,n=r;switch(this.alignContent){case"flex-end":o=t;break;case"center":o=t/2;break;case"space-between":n=e>1?r+t/(e-1):0;break;case"space-around":n=r+t/e,o=n/2;break;case"space-evenly":n=r+t/(e+1),o=n;break}return{crossStart:o,crossBetween:n}}distributeMainAxisSizes(t,e,r){let o=0,n=0,s=0;for(const h of t){const l=h.style.flexBasis;o+=l,n+=h.style.flexGrow,s+=h.style.flexShrink*l}const a=t.length>1?e.mainGap*(t.length-1):0,c=e.main-o-a;let d=0;for(const h of t){const{style:l}=h;let u=l.flexBasis;c>0&&n>0?u+=c*l.flexGrow/n:c<0&&s>0&&(u+=c*l.flexShrink*u/s),u<0&&(u=0),r&&l.minWidth!==void 0&&u<l.minWidth&&(u=l.minWidth),r?h.size.width=u:h.size.height=u,d+=u}return{lineMainUsed:d,totalGrow:n}}calculateJustifySpacing(t,e,r,o){let n=0,s=r.mainGap;if(o===0){const a=t>1?r.mainGap*(t-1):0;let c=r.main-e-a;switch(c<0&&(c=0),this.justifyContent){case"flex-end":n=c;break;case"center":n=c/2;break;case"space-between":s=t>1?r.mainGap+c/(t-1):0;break;case"space-around":s=r.mainGap+c/t,n=s/2;break;case"space-evenly":s=r.mainGap+c/(t+1),n=s;break}}return{leading:n,between:s}}getFinalLineHeight(t,e,r){if(this.wrap!=="nowrap")return e;let o=e;for(const n of t){if(this.isDeferredCrossAxisPercentChild(n,r))continue;const s=r?n.style.height:n.style.width,a=s!==void 0?s:r?n.size.height:n.size.width;a>o&&(o=a)}return o}getCrossSize(t,e,r){const o=r?t.style.height:t.style.width,n=t.style.alignSelf!=="auto"?t.style.alignSelf:this.alignItems;return o!==void 0?(r?t.size.height=o:t.size.width=o,o):n==="stretch"?(r?t.size.height=e:t.size.width=e,e):r?t.size.height:t.size.width}positionChildren(t,e,r,o,n,s,a,c,d){const h=this.direction==="row-reverse"||this.direction==="column-reverse",l=h?t.length-1:0,u=h?-1:t.length,f=h?-1:1;let g=n;for(let v=l;v!==u;v+=f){const C=t[v];if(C!==void 0){const m=C.style,p=C.size,A=C.position;if(r){const S=this.direction==="row"?g:e.main-g-p.width;A.x=a+S}else{const S=this.direction==="column"?g:e.main-g-p.height;A.y=c+S}const y=m.alignSelf!=="auto"?m.alignSelf:this.alignItems,E=this.getCrossSize(C,o,r);let D=0;y==="flex-end"?D=o-E:y==="center"&&(D=(o-E)*.5),r?(A.y=c+d+D,g+=p.width+s):(A.x=a+d+D,g+=p.height+s)}}}build(){const{children:t}=this;if(t.length===0)return;const e=this.direction==="row"||this.direction==="row-reverse",r=this.getContainerMetrics(),o=this.buildFlexLines(t,r);if(o.length===0)return;const n=this.measureLineCrossSizes(o,e),{crossStart:s,crossBetween:a}=this.resolveCrossAxisLayout(n,r),c=this.padding.left,d=this.padding.top;let h=s;for(let l=0;l<o.length;l++){const u=o[l];if(u===void 0||u.length===0)continue;const{lineMainUsed:f,totalGrow:g}=this.distributeMainAxisSizes(u,r,e),{leading:v,between:C}=this.calculateJustifySpacing(u.length,f,r,g),m=this.getFinalLineHeight(u,n[l],e);this.positionChildren(u,r,e,m,v,C,c,d,h),h+=m+a}for(const l of t)l instanceof Et&&l.build()}}function en(i){return i===void 0?Ma:typeof i=="number"?{top:i,right:i,bottom:i,left:i}:{top:i.top??0,right:i.right??0,bottom:i.bottom??0,left:i.left??0}}class mr extends Et{constructor(t,e,r={}){super(t,e,r)}getLayout(){this.build();const t={};return this._collectLayout(this,t,{counter:0}),t}_collectLayout(t,e,r){for(const o of t.children){const n=o.id??`_$$${r.counter++}`;e[n]={position:o.position,size:o.size},o instanceof Et&&this._collectLayout(o,e,r)}}}const he={direction:"row",columnGap:0,rowGap:0,justifyContent:"flex-start",alignItems:"stretch"};function rn(i){const t=i;return{id:i.id,direction:t.direction??he.direction,columnGap:t.columnGap??he.columnGap,rowGap:t.rowGap??he.rowGap,justifyContent:t.justifyContent??he.justifyContent,alignItems:t.alignItems??he.alignItems}}function on(i,t){if(t!=null&&t.length)for(const e of t)if(e.children&&e.children.length>0){const r=new Et(e.width??0,e.height??0,rn(e));i.addChild(r,e),on(r,e.children)}else i.addChild(e)}const _a=i=>{const t=i.width??0,e=i.height??0,r=rn(i),o=new mr(t,e,r);return on(o,i.children),o.getLayout()},di=class di{constructor(t){this.debugColor="magenta",this.parent=null,this.children=[],this.rect={x:0,y:0,width:0,height:0},this.zIndex=0,this.minContentWidth=void 0,this._intrinsicWidth=0,this._intrinsicHeight=0,this._layoutDirty=!0,this._measureDirty=!0,this._style={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto"},this._position="static",this.backgroundColor="transparent",this.borderColor="transparent",this.borderWidth=0,this.portalHoverEnabled=!1,this.id=t}get style(){return this._style}set style(t){this._style=t,this.markLayoutDirty()}get position(){return this._position}set position(t){this._position!==t&&(this._position=t,this.markLayoutDirty())}get left(){return this._left}set left(t){this._left!==t&&(this._left=t,this.markLayoutDirty())}get top(){return this._top}set top(t){this._top!==t&&(this._top=t,this.markLayoutDirty())}get right(){return this._right}set right(t){this._right!==t&&(this._right=t,this.markLayoutDirty())}get bottom(){return this._bottom}set bottom(t){this._bottom!==t&&(this._bottom=t,this.markLayoutDirty())}isAbsolute(){return this._position==="absolute"}isPositioningContext(){return this._position!=="static"}markLayoutDirty(){var t;this._layoutDirty||(this._layoutDirty=!0,(t=this.parent)==null||t.markLayoutDirty())}markMeasureDirty(){this._measureDirty||(this._measureDirty=!0,this.markLayoutDirty())}isLayoutDirty(){return this._layoutDirty}isMeasureDirty(){return this._measureDirty}clearLayoutDirty(){this._layoutDirty=!1}clearMeasureDirty(){this._measureDirty=!1}addChild(t){this.attachChild(t,(e,r)=>e.push(r))}addChildStart(t){this.attachChild(t,(e,r)=>e.unshift(r))}removeChild(t){const e=this.children.indexOf(t);e!==-1&&(this.children.splice(e,1),t.parent=null,this.markLayoutDirty())}getTooltip(){return this.tooltip}paint(t,e){const r=t.getZIndex();t.setZIndex(r+this.zIndex),this.onPaint(t,e),di.DEBUG&&t.strokeRect(this.rect.x,this.rect.y,this.rect.width,this.rect.height,this.debugColor,1),t.setZIndex(r)}hitTest(t,e){const r=[];return this.collectHitCandidates(t,e,0,{value:0},r),r.sort((o,n)=>n.cumulativeZIndex-o.cumulativeZIndex||n.order-o.order),r.map(({node:o})=>o)}requestLayout(){this.parent&&this.parent.requestLayout()}requestPaint(){this.parent&&this.parent.requestPaint()}onClick(t){}onMouseDown(t){}onMouseUp(t){}onMouseEnter(t){}onMouseLeave(t){}onMouseMove(t){}onDoubleClick(t){}attachChild(t,e){t.parent=this,e(this.children,t),this.markLayoutDirty()}collectHitCandidates(t,e,r,o,n){if(!this.containsHitPoint(t,e))return;const s=r+this.zIndex;n.push({node:this,cumulativeZIndex:s,order:o.value}),o.value+=1;for(const a of this.children)a.collectHitCandidates(t,e,s,o,n)}containsHitPoint(t,e){return t>=this.rect.x&&t<=this.rect.x+this.rect.width&&e>=this.rect.y&&e<=this.rect.y+this.rect.height}};di.DEBUG=!1;let Mt=di;class nn{constructor(){this.defaultFlexStyle={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto",width:void 0,height:void 0,minWidth:void 0,crossAxisSizing:"auto"}}build(t,e,r){const o=r??t.children.filter(c=>!c.isAbsolute()),n=o.length,s=e.direction,a=s==="row"||s==="row-reverse";for(let c=0;c<n;c+=1){const d=o[c],h=d.style,l=this.extractChildFlexProperties(d,h);this.handlePercentageDimensions(l,h.width,h.height,a,d.rect),this.defaultFlexStyle.flexGrow=l.flexGrow,this.defaultFlexStyle.flexShrink=l.flexShrink,this.defaultFlexStyle.flexBasis=l.flexBasis,this.defaultFlexStyle.alignSelf=l.alignSelf,this.defaultFlexStyle.width=l.width,this.defaultFlexStyle.height=l.height,this.defaultFlexStyle.minWidth=l.minWidth,this.defaultFlexStyle.crossAxisSizing=l.crossAxisSizing,this.isContainer(d)?this.addContainerChild(d,e):this.addLeafChild(d,e)}}extractChildFlexProperties(t,e){const r=e.flexGrow??0,o=e.flexShrink??1,n=e.flexBasis??0;return{width:typeof e.width=="number"?e.width:void 0,height:typeof e.height=="number"?e.height:void 0,flexGrow:r,flexShrink:o,flexBasis:n,minWidth:e.minWidth??t.minContentWidth,alignSelf:e.alignSelf??"auto",crossAxisSizing:"auto"}}handlePercentageDimensions(t,e,r,o,n){e==="100%"&&(o?(t.width=void 0,t.flexGrow===0&&(t.flexGrow=1)):(t.width=void 0,t.alignSelf="stretch",t.crossAxisSizing="deferred-percent-stretch")),r==="100%"&&(o?(t.height=void 0,t.alignSelf="stretch",t.crossAxisSizing="deferred-percent-stretch"):(t.height=void 0,t.flexGrow===0&&(t.flexGrow=1))),t.flexBasis===0&&(t.flexBasis=o?n.width:n.height)}isContainer(t){return"flexOptions"in t}addContainerChild(t,e){const r=new Et(0,0,t.flexOptions);r.size.width=t.rect.width,r.size.height=t.rect.height,e.addChild(r,this.defaultFlexStyle),this.build(t,r)}addLeafChild(t,e){const r=e.addChild(this.defaultFlexStyle);r.size.width=t.rect.width,r.size.height=t.rect.height}}const $e=.5;class sn{constructor(t){this.positionResolver=t}reconcile(t,e,r,o,n,s=!1){let a=!1;const{parent:c}=e,d=c!==null?c.rect:n;a=this.updateNodePosition(e,r,d??e.rect);const h=o??e.children.filter(u=>!u.isAbsolute()),l=h.length>0;if(l&&r instanceof Et){const u=this.reconcileChildLayouts(t,h,r,n);if(a=a||u,this.isContainer(e)&&!s){const f=this.updateContainerFromContent(e,r);a=a||f}}else if(!l){const u=this.remeasureAndUpdateLeaf(t,e,r);a=a||u}return this.positionNestedAbsoluteChildren(t,e),a}updateNodePosition(t,e,r){const o=t.rect,n=e.position,s=e.size;o.x=r.x+n.x,o.y=r.y+n.y;const a=o.width!==s.width,c=o.height!==s.height;return o.width=s.width,o.height=s.height,a||c}reconcileChildLayouts(t,e,r,o){let n=!1;const s=r.children,a=e.length;for(let c=0;c<a;c+=1){const d=this.reconcile(t,e[c],s[c],void 0,o);n=n||d}return n}updateContainerFromContent(t,e){const r=this.getContainerCachedIsRow(t),o=this.getContainerCachedPadding(t),n=e.children,s=n.length;let a=0;if(r){for(let u=0;u<s;u+=1){const f=n[u],g=f.position.y+f.size.height;g>a&&(a=g)}const c=a>0?a+o.bottom:0,d=t.style.height;if(d==="100%")return!1;const h=typeof d=="number"?d:0,l=c>h?c:h;if(l>t.rect.height+$e)return t.rect.height=l,this.syncFlexNodeSizeFromRect(t,e,!1,!0),!0}else{let c=0;for(let C=0;C<s;C+=1){const m=n[C],p=m.position.x+m.size.width,A=m.position.y+m.size.height;p>a&&(a=p),A>c&&(c=A)}const d=a>0?a+o.right:0,h=t.style.width;let l=!1,u=!1,f=!1;if(h!=="100%"){const C=typeof h=="number"?h:0,m=d>C?d:C;m>t.rect.width+$e&&(t.rect.width=m,l=!0,u=!0)}const g=c>0?c+o.bottom:0,v=t.style.height;if(v!=="100%"){const C=typeof v=="number"?v:0,m=g>C?g:C;m>t.rect.height+$e&&(t.rect.height=m,l=!0,f=!0)}return l&&this.syncFlexNodeSizeFromRect(t,e,u,f),l}return!1}syncFlexNodeSizeFromRect(t,e,r,o){r&&(e.size.width=t.rect.width),o&&(e.size.height=t.rect.height),this.syncAutoMainAxisFlexBasis(t,e,r,o)}syncAutoMainAxisFlexBasis(t,e,r,o){const n=t.parent;if(n===null||!this.isContainer(n)||t.style.flexBasis!==void 0&&t.style.flexBasis!==0)return;const s=this.getContainerCachedIsRow(n);s&&r?e.style.flexBasis=t.rect.width:!s&&o&&(e.style.flexBasis=t.rect.height)}remeasureAndUpdateLeaf(t,e,r){const o=e.rect.height,n=e.rect.width;e.measure(t),e.rect.width=n;const s=e.rect.height-o;return Math.abs(s)>$e?(this.syncFlexNodeSizeFromRect(e,r,!1,!0),!0):!1}positionNestedAbsoluteChildren(t,e){if(!this.isContainer(e)||!e.isPositioningContext())return;const r=e,n=r.children.filter(a=>a.isAbsolute());if(n.length===0)return;const s=this.getContainerCachedPadding(r);this.positionResolver.positionAbsoluteChildren(r.rect,s,n,a=>a.measure(t),a=>this.layoutAbsoluteChildSubtree(t,a))}layoutAbsoluteChildSubtree(t,e){if(!this.isContainer(e))return;const r=e.parent;e.parent=null;try{e.performLayout(t,!0)}finally{e.parent=r}}isContainer(t){return"flexOptions"in t}getContainerCachedIsRow(t){return t.cachedIsRow??!0}getContainerCachedPadding(t){return t.cachedPadding??{top:0,right:0,bottom:0,left:0}}}class Dt{static resolvePositionValue(t,e){if(t!==void 0){if(typeof t=="number")return t;if(typeof t=="string"&&t.endsWith("%"))return parseFloat(t)/100*e}}static applyAxisPositioning(t,e,r,o,n){const s=n?e.x:e.y,a=s+(n?e.width:e.height),c=n?e.width:e.height;if(r!==void 0&&o!==void 0){const d=Math.max(0,c-r-o);n?(t.x=s+r,t.width=d):(t.y=s+r,t.height=d)}else r!==void 0&&(n?t.x=s+r:t.y=s+r);o!==void 0&&r===void 0?n?t.x=a-t.width-o:t.y=a-t.height-o:o===void 0&&r===void 0&&(n?t.x=s:t.y=s)}applyAbsolutePositioning(t,e){const r=Dt.resolvePositionValue(t.left,e.width),o=Dt.resolvePositionValue(t.right,e.width),n=Dt.resolvePositionValue(t.top,e.height),s=Dt.resolvePositionValue(t.bottom,e.height),a=t.rect;Dt.applyAxisPositioning(a,e,r,o,!0),Dt.applyAxisPositioning(a,e,n,s,!1)}positionAbsoluteChildren(t,e,r,o,n){const s={x:t.x+e.left,y:t.y+e.top,width:t.width-e.left-e.right,height:t.height-e.top-e.bottom};for(const a of r)o(a),this.applyAbsolutePositioning(a,s),n==null||n(a)}}class ui{constructor(){this.width=0,this.height=0,this.maxCrossSize=0,this.childCount=0,this.isRow=!0}reset(){this.width=0,this.height=0,this.maxCrossSize=0,this.childCount=0,this.isRow=!0}accumulate(t,e){this.isRow=e,e?(this.width+=t.width,this.maxCrossSize=Math.max(this.maxCrossSize,t.height)):(this.height+=t.height,this.maxCrossSize=Math.max(this.maxCrossSize,t.width)),this.childCount+=1}addGap(t,e){if(this.childCount>1){const r=t*(this.childCount-1);e?this.width+=r:this.height+=r}}getSize(){return this.isRow?{width:this.width,height:this.maxCrossSize}:{width:this.maxCrossSize,height:this.height}}static computeIntrinsicSize(t,e,r){const o=new ui;for(const n of t)o.accumulate(n,e);return o.addGap(r,e),o.getSize()}}const Na=3,an={top:0,right:0,bottom:0,left:0},Oa=i=>i===void 0||i==="row"||i==="row-reverse",cn=i=>i===void 0?an:typeof i=="number"?{top:i,right:i,bottom:i,left:i}:{top:i.top??0,right:i.right??0,bottom:i.bottom??0,left:i.left??0};class dt extends Mt{constructor(t,e={},r="transparent"){super(t),this.cachedPadding=an,this.cachedIsRow=!0,this.cachedGap=0,this.optionsCacheValid=!1,this.flexOptionsValue=e,this.positionResolver=new Dt,this.flexTreeBuilder=new nn,this.layoutReconciler=new sn(this.positionResolver),this.invalidateOptionsCache(),this.backgroundColor=r}get flexOptions(){return this.flexOptionsValue}set flexOptions(t){this.flexOptionsValue=t,this.invalidateOptionsCache(),this.markLayoutDirty()}setFlexOptions(t){Object.assign(this.flexOptionsValue,t),this.invalidateOptionsCache(),this.markLayoutDirty()}invalidateOptionsCache(){this.optionsCacheValid=!1}ensureOptionsCache(){if(this.optionsCacheValid)return;const t=this.flexOptionsValue;this.cachedIsRow=Oa(t.direction),this.cachedGap=this.cachedIsRow?t.columnGap??0:t.rowGap??0,this.cachedPadding=cn(t.padding),this.optionsCacheValid=!0}measure(t){this.measureChildren(t),this.computeIntrinsicSize(),this.applySizeConstraints(),this.clearMeasureDirty()}measureChildren(t){const{children:e}=this;for(let r=0;r<e.length;r+=1)e[r].measure(t)}computeIntrinsicSize(){this.ensureOptionsCache();const{layoutChildren:t}=this.separateChildrenByLayoutMode(),e=t.map(s=>s.rect),{width:r,height:o}=ui.computeIntrinsicSize(e,this.cachedIsRow,this.cachedGap),n=this.cachedPadding;this._intrinsicWidth=r+n.left+n.right,this._intrinsicHeight=o+n.top+n.bottom}applySizeConstraints(){const{style:t}=this,e=this.resolveStyleDimension(t.width,"width"),r=this.resolveStyleDimension(t.height,"height");this.rect.width=e??this._intrinsicWidth,this.rect.height=r??this._intrinsicHeight,e===void 0&&this.clampWidthToParent()}resolveStyleDimension(t,e){if(typeof t=="number")return t;if(t!=="100%")return;const r=this.resolveParentContentSize(e);return r!==void 0?r:this.rect[e]>0?this.rect[e]:void 0}resolveParentContentSize(t){const{parent:e}=this;if(!(e instanceof dt))return e!=null&&e.rect[t]&&e.rect[t]>0?e.rect[t]:void 0;e.ensureOptionsCache();const r=e.cachedPadding,o=t==="width"?r.left+r.right:r.top+r.bottom,n=e.rect[t]-o;return n>0?n:void 0}performLayout(t,e=!1){if(e?(this.measureChildren(t),this.clearMeasureDirty()):this.measure(t),this.children.length===0){this.clearLayoutDirty();return}const{layoutChildren:r,absoluteChildren:o}=this.separateChildrenByLayoutMode();r.length>0&&this.layoutPhase1Flexbox(t,r,e),o.length>0&&this.isPositioningContext()&&this.layoutPhase2Absolute(t,o),this.clearLayoutDirty()}layoutPhase1Flexbox(t,e,r=!1){const o=new mr(this.rect.width,this.rect.height,this.flexOptionsValue);this.flexTreeBuilder.build(this,o,e);let n=0,s;do o.build(),s=this.layoutReconciler.reconcile(t,this,o,e,this.rect,r),n+=1;while(s&&n<Na)}layoutPhase2Absolute(t,e){this.ensureOptionsCache(),this.positionResolver.positionAbsoluteChildren(this.rect,this.cachedPadding,e,r=>r.measure(t),r=>this.layoutAbsoluteChildSubtree(t,r))}layoutAbsoluteChildSubtree(t,e){if(!(e instanceof dt))return;const r=e.parent;e.parent=null;try{e.performLayout(t,!0)}finally{e.parent=r}}clampWidthToParent(){const{parent:t}=this;if(t===null||t.rect.width<=0)return;let e=t.rect.width;t instanceof dt&&(t.ensureOptionsCache(),e-=t.cachedPadding.left+t.cachedPadding.right),e=Math.max(0,e),this.rect.width>e&&(this.rect.width=e)}separateChildrenByLayoutMode(){const t=[],e=[];for(const r of this.children)r.isAbsolute()?e.push(r):t.push(r);return{layoutChildren:t,absoluteChildren:e}}onPaint(t,e){this.backgroundColor!=="transparent"&&t.fillRect(this.rect.x,this.rect.y,this.rect.width,this.rect.height,this.backgroundColor);for(const r of this.children)r.paint(t,e)}}const za={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},Wa=(i,t)=>({minX:Math.min(i.minX,t.rect.x),minY:Math.min(i.minY,t.rect.y),maxX:Math.max(i.maxX,t.rect.x+t.rect.width),maxY:Math.max(i.maxY,t.rect.y+t.rect.height)}),Ga=i=>i.minX===1/0||i.maxX===-1/0;class $a extends dt{performLayout(t){const e=this.layoutChildren(t);if(!e){this.clearLayoutDirty();return}this.expandToFitBounds(e),this.clearLayoutDirty()}layoutChildren(t){let e={...za};return this.children.forEach(r=>{r instanceof dt?r.performLayout(t):r.measure(t),e=Wa(e,r)}),Ga(e)?null:e}expandToFitBounds(t){const e=t.maxX-this.rect.x,r=t.maxY-this.rect.y;e>this.rect.width&&(this.rect.width=e),r>this.rect.height&&(this.rect.height=r)}onPaint(t,e){this.backgroundColor&&this.backgroundColor!=="transparent"&&t.fillRect(this.rect.x,this.rect.y,this.rect.width,this.rect.height,this.backgroundColor),this.borderWidth>0&&this.borderColor&&this.borderColor!=="transparent"&&t.strokeRect(this.rect.x+this.borderWidth/2,this.rect.y+this.borderWidth/2,this.rect.width-this.borderWidth,this.rect.height-this.borderWidth,this.borderColor,this.borderWidth),super.onPaint(t,e)}}class pr{constructor(t={}){this.options=t,this.hoveredNode=null,this.activePortalNode=null,this.currentCursor="default",this.bounds=null}setAbsoluteBounds(t){this.bounds=t?{...t}:null}handlePointerMove(t,e){this.transitionHover(t[0],e),this.updateCursor(t)}handlePointerLeave(){this.transitionHover(void 0,null),this.updateCursor([])}handlePortalReset(){this.activePortalNode&&this.dispatchPortalHover({visible:!1,x:0,y:0,width:0,height:0,originId:this.activePortalNode.id,source:this.options.portalSource}),this.activePortalNode=null}computeCursor(t,e,r){var n;const o=r.hitTest(t,e);for(const s of o){const a=(n=s.style)==null?void 0:n.cursor;if(a)return a}return"default"}getCurrentCursor(){return this.currentCursor}transitionHover(t,e){if(this.hoveredNode===t){this.updatePortalHover(t,e);return}this.hoveredNode&&this.hoveredNode.onMouseLeave(this.buildEvent("mouseleave",this.hoveredNode,e)),t&&t.onMouseEnter(this.buildEvent("mouseenter",t,e)),this.hoveredNode=t??null,this.updatePortalHover(t,e)}buildEvent(t,e,r){return r?{...r,type:t,target:e,currentTarget:e}:{type:t,x:0,y:0,originalEvent:{},stopPropagation:()=>{},preventDefault:()=>{},target:e,currentTarget:e}}updateCursor(t){var r,o,n;let e="default";for(const s of t){const a=(r=s.style)==null?void 0:r.cursor;if(a){e=a;break}}e!==this.currentCursor&&(this.currentCursor=e,(n=(o=this.options).onCursorChange)==null||n.call(o,e))}findPortalTarget(t){let e=t;for(;e;){if(e.portalHoverEnabled)return e;e=e.parent}return null}updatePortalHover(t,e=null){var a,c,d,h,l,u;const r=this.findPortalTarget(t),o=r?{...r.rect}:null,n=this.activePortalNode,s=r&&o?{id:r.id,rect:o}:null;if(r&&(n==null?void 0:n.id)===r.id){(c=(a=this.options).onPortalTargetChange)==null||c.call(a,r,e);return}if(this.activePortalNode=s,(h=(d=this.options).onPortalTargetChange)==null||h.call(d,r??null,e),!!this.options.portalHoverDispatch)if(r&&o&&this.bounds){const f=((u=(l=this.options).getTooltipContext)==null?void 0:u.call(l))??void 0;this.dispatchPortalHover({visible:!0,x:this.bounds.x+o.x,y:this.bounds.y+o.y,width:o.width,height:o.height,nodeId:r.id,originId:r.id,source:this.options.portalSource,tooltipContext:f,tooltipFromNode:r.getTooltip(),priority:1})}else n&&this.dispatchPortalHover({visible:!1,x:0,y:0,width:0,height:0,originId:n.id,source:this.options.portalSource})}dispatchPortalHover(t){var r,o,n,s;const e=((o=(r=this.options).getPortalEventTarget)==null?void 0:o.call(r))??null;(s=(n=this.options).portalHoverDispatch)==null||s.call(n,t,e)}}class vt extends Mt{addChild(){throw new Error("CanvasLeaf cannot have children")}}const ge={selection:"normal",cellClick:"normal",editor:"normal",contextMenu:"normal"};function Ua(i){return i.selection!==void 0||i.cellClick!==void 0||i.editor!==void 0||i.contextMenu!==void 0}function ln(i){if(!i||!Ua(i))return;const t={selection:i.selection??ge.selection,cellClick:i.cellClick??ge.cellClick,editor:i.editor??ge.editor,contextMenu:i.contextMenu??ge.contextMenu};return t.editor==="open-on-click"&&t.selection==="keep"&&(console.warn('[TableCanvas interaction] `editor: "open-on-click"` требует обычного selection. Editor не будет открыт, чтобы не менять выделение неожиданно.'),t.editor="normal"),t.editor==="open-on-click"&&t.cellClick==="stop"&&(console.warn('[TableCanvas interaction] `editor: "open-on-click"` требует обычного cellClick, потому что editor открывается через click pipeline таблицы. Editor не будет открыт.'),t.editor="normal"),t}function hn(){return{...ge}}class dn{constructor(){this.nodes=new Map,this.listeners=new Set}register(t,e){this.nodes.set(t,e),this.notify(t)}unregister(t){this.nodes.delete(t)}get(t){return this.nodes.get(t)}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}notify(t){this.listeners.forEach(e=>e(t))}}class Xa{constructor(){this.isActive=!1,this.displayed=new Map,this.painted=new Set}beginFrame(t){var e,r,o;this.isActive=!0,(((e=this.resources)==null?void 0:e.loader)!==(t==null?void 0:t.loader)||((r=this.resources)==null?void 0:r.colIndex)!==(t==null?void 0:t.colIndex)||((o=this.resources)==null?void 0:o.rowIndex)!==(t==null?void 0:t.rowIndex))&&this.displayed.clear(),this.resources=t?{...t}:void 0,this.painted.clear()}getAvatarImage(t,e,r){const{resources:o}=this;if(!r||!o){this.displayed.delete(t);return}this.painted.add(t);const n=this.displayed.get(t);(n==null?void 0:n.name)!==e&&this.displayed.delete(t);const s=o.loader.loadOrGetImage(r,o.colIndex,o.rowIndex);if(s)return this.displayed.set(t,{name:e,url:r}),s;if(n&&n.name===e&&n.url!==r)return o.loader.loadOrGetImage(n.url,o.colIndex,o.rowIndex)}endFrame(){this.isActive=!1,this.displayed.forEach((t,e)=>{this.painted.has(e)||this.displayed.delete(e)}),this.painted.clear()}}function Va(i,t){return i.zIndex!==t.zIndex?i.zIndex-t.zIndex:i.order-t.order}const ho=typeof Path2D<"u"&&typeof CanvasRenderingContext2D.prototype.roundRect=="function";class fi{constructor(){this.imageTransitions=new Xa,this.commands=[],this.orderCounter=0,this.currentZIndex=0}setAnimationContext(t){return this.animationContext=t,this}getAnimationContext(){return this.animationContext}setZIndex(t){return this.currentZIndex=t,this}getZIndex(){return this.currentZIndex}pushZIndex(t=1){return this.currentZIndex+=t,this}popZIndex(t=1){return this.currentZIndex-=t,this}fillRect(t,e,r,o,n){return this.commands.push({type:"fillRect",x:t,y:e,width:r,height:o,fillStyle:n,zIndex:this.currentZIndex,order:this.orderCounter++}),this}strokeRect(t,e,r,o,n,s=1){return this.commands.push({type:"strokeRect",x:t,y:e,width:r,height:o,strokeStyle:n,lineWidth:s,zIndex:this.currentZIndex,order:this.orderCounter++}),this}fillText(t,e,r,o,n,s="middle",a){return this.commands.push({type:"fillText",text:t,x:e,y:r,font:o,fillStyle:n,textBaseline:s,textAlign:a,zIndex:this.currentZIndex,order:this.orderCounter++}),this}fillTextClipped(t,e,r,o,n,s,a="middle",c){return this.commands.push({type:"fillTextClipped",text:t,x:e,y:r,font:o,fillStyle:n,textBaseline:a,textAlign:c,clipX:s.x,clipY:s.y,clipWidth:s.width,clipHeight:s.height,zIndex:this.currentZIndex,order:this.orderCounter++}),this}drawImage(t,e,r,o,n){return this.commands.push({type:"drawImage",image:t,x:e,y:r,width:o,height:n,zIndex:this.currentZIndex,order:this.orderCounter++}),this}roundedRect(t,e,r,o,n,s){return this.commands.push({type:"roundedRect",x:t,y:e,width:r,height:o,radius:n,fillStyle:s==null?void 0:s.fillStyle,strokeStyle:s==null?void 0:s.strokeStyle,lineWidth:s==null?void 0:s.lineWidth,zIndex:this.currentZIndex,order:this.orderCounter++}),this}linearGradientRect(t,e,r,o,n,s,a=90){return this.commands.push({type:"linearGradientRect",x:t,y:e,width:r,height:o,radius:n,gradientStops:s,angle:a,zIndex:this.currentZIndex,order:this.orderCounter++}),this}custom(t){return this.commands.push({type:"custom",fn:t,zIndex:this.currentZIndex,order:this.orderCounter++}),this}clear(){return this.commands.length=0,this.orderCounter=0,this.currentZIndex=0,this.animationContext=void 0,this}get commandCount(){return this.commands.length}flush(t){const{commands:e}=this,r=e.length;if(r===0)return;e.sort(Va);let o="",n="",s=-1,a="",c="",d="";for(let h=0;h<r;h++){const l=e[h];if(l!==void 0)switch(l.type){case"fillRect":o!==l.fillStyle&&(t.fillStyle=l.fillStyle,o=l.fillStyle),t.fillRect(l.x,l.y,l.width,l.height);break;case"strokeRect":n!==l.strokeStyle&&(t.strokeStyle=l.strokeStyle,n=l.strokeStyle),s!==l.lineWidth&&(t.lineWidth=l.lineWidth,s=l.lineWidth),t.strokeRect(l.x,l.y,l.width,l.height);break;case"fillText":a!==l.font&&(t.font=l.font,a=l.font),o!==l.fillStyle&&(t.fillStyle=l.fillStyle,o=l.fillStyle),c!==l.textBaseline&&(t.textBaseline=l.textBaseline,c=l.textBaseline),l.textAlign&&d!==l.textAlign&&(t.textAlign=l.textAlign,d=l.textAlign),t.fillText(l.text,l.x,l.y);break;case"fillTextClipped":a!==l.font&&(t.font=l.font,a=l.font),o!==l.fillStyle&&(t.fillStyle=l.fillStyle,o=l.fillStyle),c!==l.textBaseline&&(t.textBaseline=l.textBaseline,c=l.textBaseline),l.textAlign&&d!==l.textAlign&&(t.textAlign=l.textAlign,d=l.textAlign),this.executeFillTextClipped(t,l);break;case"drawImage":t.drawImage(l.image,l.x,l.y,l.width,l.height);break;case"roundedRect":this.executeRoundedRect(t,l),l.fillStyle&&(o=l.fillStyle),l.strokeStyle&&(n=l.strokeStyle),l.lineWidth!==void 0&&(s=l.lineWidth);break;case"linearGradientRect":this.executeLinearGradientRect(t,l);break;case"custom":l.fn(t),o="",n="",s=-1,a="",c="",d="";break}}this.clear()}executeLinearGradientRect(t,e){const{x:r,y:o,width:n,height:s,radius:a,gradientStops:c,angle:d}=e,h=(d-90)*Math.PI/180,l=Math.cos(h),u=Math.sin(h),f=n/2,g=s/2,v=r+f,C=o+g,p=(Math.abs(l*n)+Math.abs(u*s))/2,A=v-l*p,y=C-u*p,E=v+l*p,D=C+u*p,S=t.createLinearGradient(A,y,E,D);for(const H of c)S.addColorStop(H.offset,H.color);if(t.fillStyle=S,a>0)if(ho)t.beginPath(),t.roundRect(r,o,n,s,a),t.fill();else{const H=a,B=r+n,M=o+s;t.beginPath(),t.moveTo(r+H,o),t.lineTo(B-H,o),t.quadraticCurveTo(B,o,B,o+H),t.lineTo(B,M-H),t.quadraticCurveTo(B,M,B-H,M),t.lineTo(r+H,M),t.quadraticCurveTo(r,M,r,M-H),t.lineTo(r,o+H),t.quadraticCurveTo(r,o,r+H,o),t.closePath(),t.fill()}else t.fillRect(r,o,n,s)}executeFillTextClipped(t,e){e.clipWidth<=0||e.clipHeight<=0||e.text.length===0||(t.save(),t.beginPath(),t.rect(e.clipX,e.clipY,e.clipWidth,e.clipHeight),t.clip(),t.fillText(e.text,e.x,e.y),t.restore())}executeRoundedRect(t,e){const{x:r,y:o,width:n,height:s,radius:a,fillStyle:c,strokeStyle:d,lineWidth:h}=e;if(ho)t.beginPath(),t.roundRect(r,o,n,s,a);else{const l=a,u=r+n,f=o+s;t.beginPath(),t.moveTo(r+l,o),t.lineTo(u-l,o),t.quadraticCurveTo(u,o,u,o+l),t.lineTo(u,f-l),t.quadraticCurveTo(u,f,u-l,f),t.lineTo(r+l,f),t.quadraticCurveTo(r,f,r,f-l),t.lineTo(r,o+l),t.quadraticCurveTo(r,o,r+l,o),t.closePath()}c&&(t.fillStyle=c,t.fill()),d&&(t.strokeStyle=d,h!==void 0&&(t.lineWidth=h),t.stroke())}}const Ya=new fi;class Ka{constructor(t,e){this.eventHandlers=new Map,this.batcher=new fi,this.canvas=t,this.ctx=t.getContext("2d",{alpha:!1}),this.rootNode=e,this.hoverController=new pr({onCursorChange:r=>{var o;return(o=this.onCursorChange)==null?void 0:o.call(this,r)},onPortalTargetChange:(r,o)=>{var n;return(n=this.onPortalHoverTargetChange)==null?void 0:n.call(this,r,o)}}),this.setupEvents()}setupEvents(){["click","mousedown","mouseup","mousemove","dblclick"].forEach(e=>{const r=o=>this.dispatchPointerEvent(o,e);this.eventHandlers.set(e,r),this.canvas.addEventListener(e,r)})}destroy(){this.eventHandlers.forEach((t,e)=>{this.canvas.removeEventListener(e,t)}),this.eventHandlers.clear()}dispatchPointerEvent(t,e){const{x:r,y:o}=this.getEventCoords(t),n=this.rootNode.hitTest(r,o),s=n[0];let a=!1;const c={type:e,x:r,y:o,originalEvent:t,target:s,stopPropagation:()=>{a=!0},preventDefault:()=>t.preventDefault()};this.bubbleEvent(n,c,e,()=>a),e==="mousemove"&&(this.dispatchMouseMove(n,c,()=>a),this.hoverController.handlePointerMove(n,c))}getEventCoords(t){const e=this.canvas.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}bubbleEvent(t,e,r,o){t.length!==0&&this.dispatchToNodes(t,e,(n,s)=>this.invokePointerHandler(n,r,s),o)}dispatchMouseMove(t,e,r){this.dispatchToNodes(t,e,(o,n)=>o.onMouseMove(n),r)}dispatchToNodes(t,e,r,o){for(const n of t){if(o())break;r(n,{...e,currentTarget:n})}}invokePointerHandler(t,e,r){switch(e){case"click":t.onClick(r);break;case"mousedown":t.onMouseDown(r);break;case"mouseup":t.onMouseUp(r);break;case"dblclick":t.onDoubleClick(r);break}}render(){const t=window.devicePixelRatio||1,e=this.canvas.getBoundingClientRect();this.clearCanvas(),this.applyResolutionScale(t),this.updateRootRect(e),this.layoutRoot(),this.batcher.clear(),this.rootNode.paint(this.batcher,this.ctx),this.batcher.flush(this.ctx)}clearCanvas(){this.ctx.fillStyle="#ffffff",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}applyResolutionScale(t){this.ctx.setTransform(1,0,0,1,0,0),this.ctx.scale(t,t)}updateRootRect(t){this.rootNode.rect.width=t.width,this.rootNode.rect.height=t.height,this.rootNode.rect.x=0,this.rootNode.rect.y=0}layoutRoot(){this.rootNode instanceof dt?this.rootNode.performLayout(this.ctx):this.rootNode.measure(this.ctx)}}const Za={textPrimary:"#13181BF5",textPrimaryHover:"#13181B93",textPrimaryActive:"#13181BC4",textSecondary:"#485056B0",textSecondaryHover:"#485056FF",textSecondaryActive:"#485056D3",textTertiary:"#707C847A",textTertiaryHover:"#717C84FF",textTertiaryActive:"#717C8493",textTertiaryBase:"#707C847A",textTertiaryVariant:"#707C847A",textParagraph:"#13181BCC",textParagraphHover:"#13181B7A",textParagraphActive:"#13181BA3",textAccent:"#0B7ECB",textAccentHover:"#0D96F2FF",textAccentActive:"#0966A5FF",textAccentTransparent20:"#0B7ECB33",textPositive:"#108E26",textPositiveHover:"#14B32EFF",textPositiveActive:"#0C6A1BFF",textWarning:"#FA5F05",textWarningHover:"#FB782DFF",textWarningActive:"#D25004FF",textNegative:"#E31227",textNegativeHover:"#EE2F43FF",textNegativeActive:"#BD0F21FF",inverseTextPrimary:"#F2F5F8F5",onDarkTextPrimary:"#F2F5F8F5",onDarkTextPrimaryHover:"#F2F5F893",onDarkTextPrimaryActive:"#F2F5F8C4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#13181BF5",onLightTextPrimaryHover:"#13181B93",onLightTextPrimaryActive:"#13181BC4",surfaceSolidCard:"#FFFFFFFF",surfaceAccentMinor:"#ECF6FCFF",surfaceSolidDefault:"#060A0C",surfaceSolidTertiary:"#D5DFE6",surfaceAccent:"#199AF0",surfaceAccentHover:"#36A7F2FF",surfaceAccentActive:"#0F90E6FF",surfaceTransparentSecondary:"#ADB9C238",surfaceTransparentSecondaryHover:"#ADB9C247",surfaceTransparentSecondaryActive:"#ADB9C24D",surfaceTransparentTertiary:"#8A959D47",surfaceTransparentDeep:"#30373CC7",surfaceClear:"#FFFFFF00",surfacePositive:"#1A9E32",surfacePositiveHover:"#1EB83AFF",surfacePositiveActive:"#178C2CFF",surfaceWarning:"#FA5F05",surfaceWarningHover:"#FB782DFF",surfaceWarningActive:"#E65705FF",surfaceWarningMinor56:"#F3A9128E",surfaceNegative:"#FF293E",surfaceNegativeHover:"#FF5263FF",surfaceNegativeActive:"#FF142CFF",surfaceTransparentAccent:"#118CDF1F",surfaceTransparentAccentActive:"#118CDF33",surfaceTransparentAccent12:"#118CDF1E",surfaceTransparentAccent20:"#118CDF33",surfaceTransparentPositive:"#1A9E321F",surfaceTransparentPositive12:"#1A9E321E",surfaceTransparentPositive20:"#1A9E3233",surfaceTransparentWarning:"#FA5F051F",surfaceTransparentWarning12:"#FA5F051E",surfaceTransparentWarning20:"#FA5F0533",surfaceTransparentNegative:"#FF293E1F",surfaceTransparentNegative12:"#FF293E1E",surfaceTransparentNegative20:"#FF293E33",onLightSurfaceSolidDefault:"#060A0C",onLightSurfaceTransparentDeep:"#30373CC7",onDarkSurfaceSolidDefault:"#F7F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#0B7ECB",outlineSolidPrimary:"#D5DFE6",outlineSolidPrimary26:"#D5DFE642",dataBlueMinor:"#CFECFF",dataBlueMinorActive:"#C2E7FFFF",dataBlue:"#8BB2FC",dataAccentMinorHover:"#52BAFF",dataPositive:"#28D247",dataPositiveMinor:"#9EFAAF",dataNegative:"#FF8F9A",dataNegativeMinor:"#FFE0E3",dataWarning:"#FD9C68",dataWarningMinor:"#FEE2D2",dataOrange:"#F3A912",dataOrangeMinor:"#FFD37A",dataViolet:"#C46BFF",dataVioletMinor:"#DEB7F7",dataPink:"#FF8FBC",dataMagenta:"#F391E2",dataCyan:"#00DDE0",dataCyanDark:"#04C6C9",dataLime:"#93E006",dataTeal:"#14CC98"},qa={textPrimary:"#F2F5F8F5",textPrimaryHover:"#F2F5F893",textPrimaryActive:"#F2F5F8C4",textSecondary:"#D5DFE69E",textSecondaryHover:"#D6DFE6FF",textSecondaryActive:"#D6DFE6BE",textTertiary:"#D5DFE64D",textTertiaryHover:"#D6DFE6FF",textTertiaryActive:"#D6DFE65C",textTertiaryBase:"#D5DFE64D",textTertiaryVariant:"#D5DFE64D",textParagraph:"#F2F5F8CC",textParagraphHover:"#F2F5F87A",textParagraphActive:"#F2F5F8A3",textAccent:"#199AF0",textAccentHover:"#66BCF5FF",textAccentActive:"#0E8ADDFF",textAccentTransparent20:"#199AF033",textPositive:"#24B23E",textPositiveHover:"#2ACB47FF",textPositiveActive:"#1F9835FF",textWarning:"#FF7024",textWarningHover:"#FF8442FF",textWarningActive:"#FF5D05FF",textNegative:"#FF3D51",textNegativeHover:"#FF5C6CFF",textNegativeActive:"#FF1F35FF",inverseTextPrimary:"#13181BF5",onDarkTextPrimary:"#F2F5F8F5",onDarkTextPrimaryHover:"#F2F5F893",onDarkTextPrimaryActive:"#F2F5F8C4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#13181BF5",onLightTextPrimaryHover:"#13181B93",onLightTextPrimaryActive:"#13181BC4",surfaceSolidCard:"#060A0C",surfaceAccentMinor:"#071A26FF",surfaceSolidDefault:"#F7F9FB",surfaceSolidTertiary:"#30373C",surfaceAccent:"#199AF0",surfaceAccentHover:"#36A7F2FF",surfaceAccentActive:"#0F96F0FF",surfaceTransparentSecondary:"#D5DFE624",surfaceTransparentSecondaryHover:"#D6DFE642",surfaceTransparentSecondaryActive:"#D6DFE614",surfaceTransparentTertiary:"#D5DFE63D",surfaceTransparentDeep:"#D5DFE6BD",surfaceClear:"#FFFFFF00",surfacePositive:"#1A9E32",surfacePositiveHover:"#1DAF37FF",surfacePositiveActive:"#18952FFF",surfaceWarning:"#FA5F05",surfaceWarningHover:"#FB7223FF",surfaceWarningActive:"#F05B05FF",surfaceWarningMinor56:"#A16B008E",surfaceNegative:"#FF293E",surfaceNegativeHover:"#FF475AFF",surfaceNegativeActive:"#FF1F35FF",surfaceTransparentAccent:"#118CDF33",surfaceTransparentAccentActive:"#118CDF24",surfaceTransparentAccent12:"#118CDF1E",surfaceTransparentAccent20:"#118CDF33",surfaceTransparentPositive:"#1A9E3233",surfaceTransparentPositive12:"#1A9E321E",surfaceTransparentPositive20:"#1A9E3233",surfaceTransparentWarning:"#FA5F0533",surfaceTransparentWarning12:"#FA5F051E",surfaceTransparentWarning20:"#FA5F0533",surfaceTransparentNegative:"#FF293E33",surfaceTransparentNegative12:"#FF293E1E",surfaceTransparentNegative20:"#FF293E33",onLightSurfaceSolidDefault:"#060A0C",onLightSurfaceTransparentDeep:"#30373CC7",onDarkSurfaceSolidDefault:"#F7F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#199AF0",outlineSolidPrimary:"#23292D",outlineSolidPrimary26:"#23292D42",dataBlueMinor:"#0D3B59",dataBlueMinorActive:"#0B3550FF",dataBlue:"#1549AB",dataAccentMinorHover:"#0C72B6",dataPositive:"#0D8523",dataPositiveMinor:"#0A2B10",dataNegative:"#9C1422",dataNegativeMinor:"#4A0D13",dataWarning:"#85380C",dataWarningMinor:"#3D1D0A",dataOrange:"#A16B00",dataOrangeMinor:"#493203",dataViolet:"#A139E5",dataVioletMinor:"#722BA1",dataPink:"#9B0D46",dataMagenta:"#8A2178",dataCyan:"#0C585A",dataCyanDark:"#007D80",dataLime:"#0D8523",dataTeal:"#14CC98"},ja={textPrimary:"#14191DF5",textPrimaryHover:"#151A1E93",textPrimaryActive:"#151A1EC4",textSecondary:"#475158B0",textSecondaryHover:"#465058FF",textSecondaryActive:"#465058D3",textTertiary:"#707F897A",textTertiaryHover:"#707F89FF",textTertiaryActive:"#707F8993",textTertiaryBase:"#707F897A",textTertiaryVariant:"#707F897A",textParagraph:"#14191DCC",textParagraphHover:"#151A1E7A",textParagraphActive:"#151A1EA3",textAccent:"#0087CD",textAccentHover:"#00A3F5FF",textAccentActive:"#006DA3FF",textAccentTransparent20:"#0087CD33",textPositive:"#219532",textPositiveHover:"#28B83EFF",textPositiveActive:"#1A7527FF",textWarning:"#E15400",textWarningHover:"#FF640AFF",textWarningActive:"#B84300FF",textNegative:"#D60033",textNegativeHover:"#FF003BFF",textNegativeActive:"#AD0028FF",inverseTextPrimary:"#F3F7FAF5",onDarkTextPrimary:"#F3F7FAF5",onDarkTextPrimaryHover:"#F4F8FA93",onDarkTextPrimaryActive:"#F4F8FAC4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#14191DF5",onLightTextPrimaryHover:"#151A1E93",onLightTextPrimaryActive:"#151A1EC4",surfaceSolidCard:"#FFFFFF",surfaceAccentMinor:"#EFF8FF",surfaceSolidDefault:"#060A0D",surfaceSolidTertiary:"#CFDBE4",surfaceAccent:"#1F9EEB",surfaceAccentHover:"#3AA9EEFF",surfaceAccentActive:"#1492E1FF",surfaceTransparentSecondary:"#A8B6BF38",surfaceTransparentSecondaryHover:"#A7B5BE47",surfaceTransparentSecondaryActive:"#A7B5BE4D",surfaceTransparentTertiary:"#8B98A247",surfaceTransparentDeep:"#30383EC7",surfaceClear:"#FFFFFF00",surfacePositive:"#21A038",surfacePositiveHover:"#24B23EFF",surfacePositiveActive:"#1D9032FF",surfaceWarning:"#E15400",surfaceWarningHover:"#F55A00FF",surfaceWarningActive:"#CC4B00FF",surfaceWarningMinor56:"#E9A4318E",surfaceNegative:"#F81C42",surfaceNegativeHover:"#F94361FF",surfaceNegativeActive:"#F70830FF",surfaceTransparentAccent:"#0090DA1F",surfaceTransparentAccentActive:"#0092DB33",surfaceTransparentAccent12:"#0090DA1E",surfaceTransparentAccent20:"#0090DA33",surfaceTransparentPositive:"#21A0381F",surfaceTransparentPositive12:"#21A0381E",surfaceTransparentPositive20:"#21A03833",surfaceTransparentWarning:"#E154001F",surfaceTransparentWarning12:"#E154001E",surfaceTransparentWarning20:"#E1540033",surfaceTransparentNegative:"#F81C421F",surfaceTransparentNegative12:"#F81C421E",surfaceTransparentNegative20:"#F81C4233",onLightSurfaceSolidDefault:"#060A0D",onLightSurfaceTransparentDeep:"#30383EC7",onDarkSurfaceSolidDefault:"#F6F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#0087CD",outlineSolidPrimary:"#CFDBE4",outlineSolidPrimary26:"#CFDBE442",dataBlueMinor:"#D3EBFF",dataBlueMinorActive:"#C2E3FFFF",dataBlue:"#8BB4FD",dataAccentMinorHover:"#62BDFF",dataPositive:"#31D64B",dataPositiveMinor:"#AFFFB1",dataNegative:"#FE8E8E",dataNegativeMinor:"#FFE0E3",dataWarning:"#F79772",dataWarningMinor:"#FEE2D2",dataOrange:"#E9A431",dataOrangeMinor:"#FFD191",dataViolet:"#BF62FD",dataVioletMinor:"#D9B5F6",dataPink:"#FC8CA6",dataMagenta:"#EF8BDA",dataCyan:"#56DDE0",dataCyanDark:"#3DCACD",dataLime:"#A0E720",dataTeal:"#14CC98"},Ja={textPrimary:"#F3F7FAF5",textPrimaryHover:"#F4F8FA93",textPrimaryActive:"#F4F8FAC4",textSecondary:"#CFDBE49E",textSecondaryHover:"#CEDAE3FF",textSecondaryActive:"#CEDAE3BE",textTertiary:"#CFDBE44D",textTertiaryHover:"#CEDAE3FF",textTertiaryActive:"#CEDAE35C",textTertiaryBase:"#CFDBE44D",textTertiaryVariant:"#CFDBE44D",textParagraph:"#F3F7FACC",textParagraphHover:"#F4F8FA7A",textParagraphActive:"#F4F8FAA3",textAccent:"#1F9EEB",textAccentHover:"#69BDF2FF",textAccentActive:"#138CD8FF",textAccentTransparent20:"#1F9EEB33",textPositive:"#20B43A",textPositiveHover:"#25D044FF",textPositiveActive:"#1C9C33FF",textWarning:"#F3621C",textWarningHover:"#F57738FF",textWarningActive:"#E4540CFF",textNegative:"#FF4B59",textNegativeHover:"#FF6B77FF",textNegativeActive:"#FF2E3FFF",inverseTextPrimary:"#14191DF5",onDarkTextPrimary:"#F3F7FAF5",onDarkTextPrimaryHover:"#F4F8FA93",onDarkTextPrimaryActive:"#F4F8FAC4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#14191DF5",onLightTextPrimaryHover:"#151A1E93",onLightTextPrimaryActive:"#151A1EC4",surfaceSolidCard:"#060A0D",surfaceAccentMinor:"#0C1A24",surfaceSolidDefault:"#F6F9FB",surfaceSolidTertiary:"#30383E",surfaceAccent:"#1F9EEB",surfaceAccentHover:"#3AA9EEFF",surfaceAccentActive:"#1498EBFF",surfaceTransparentSecondary:"#CFDBE424",surfaceTransparentSecondaryHover:"#CEDAE342",surfaceTransparentSecondaryActive:"#CEDAE314",surfaceTransparentTertiary:"#CFDBE43D",surfaceTransparentDeep:"#CFDBE4BD",surfaceClear:"#FFFFFF00",surfacePositive:"#21A038",surfacePositiveHover:"#24B23EFF",surfacePositiveActive:"#1F9835FF",surfaceWarning:"#E15400",surfaceWarningHover:"#F55A00FF",surfaceWarningActive:"#D64F00FF",surfaceWarningMinor56:"#9A67008E",surfaceNegative:"#F81C42",surfaceNegativeHover:"#F93959FF",surfaceNegativeActive:"#F81238FF",surfaceTransparentAccent:"#0090DA33",surfaceTransparentAccentActive:"#0092DB24",surfaceTransparentAccent12:"#0090DA1E",surfaceTransparentAccent20:"#0090DA33",surfaceTransparentPositive:"#21A03833",surfaceTransparentPositive12:"#21A0381E",surfaceTransparentPositive20:"#21A03833",surfaceTransparentWarning:"#E1540033",surfaceTransparentWarning12:"#E154001E",surfaceTransparentWarning20:"#E1540033",surfaceTransparentNegative:"#F81C4233",surfaceTransparentNegative12:"#F81C421E",surfaceTransparentNegative20:"#F81C4233",onLightSurfaceSolidDefault:"#060A0D",onLightSurfaceTransparentDeep:"#30383EC7",onDarkSurfaceSolidDefault:"#F6F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#1F9EEB",outlineSolidPrimary:"#262626",outlineSolidPrimary26:"#26262642",dataBlueMinor:"#003A5C",dataBlueMinorActive:"#003452FF",dataBlue:"#0B45AF",dataAccentMinorHover:"#0079B9",dataPositive:"#1C892D",dataPositiveMinor:"#0F2D11",dataNegative:"#980022",dataNegativeMinor:"#4A0D13",dataWarning:"#872F00",dataWarningMinor:"#3D1D0A",dataOrange:"#9A6700",dataOrangeMinor:"#4A3107",dataViolet:"#9E28DF",dataVioletMinor:"#7012A1",dataPink:"#940041",dataMagenta:"#880077",dataCyan:"#005C5D",dataCyanDark:"#008385",dataLime:"#548200",dataTeal:"#14CC98"},Qa={textPrimary:"#13181BF5",textPrimaryHover:"#16181D93",textPrimaryActive:"#16181DC4",textSecondary:"#03070CB0",textSecondaryHover:"#16181DFF",textSecondaryActive:"#16181DAB",textTertiary:"#000206A8",textTertiaryHover:"#16181DFF",textTertiaryActive:"#16181D56",textTertiaryBase:"#000206A8",textTertiaryVariant:"#000206A8",textParagraph:"#13181BCC",textParagraphHover:"#16181D7A",textParagraphActive:"#16181DA3",textAccent:"#0058A2",textAccentHover:"#00D69AFF",textAccentActive:"#00855FFF",textAccentTransparent20:"#0058A233",textPositive:"#0F5E00",textPositiveHover:"#2BD44AFF",textPositiveActive:"#1D9032FF",textWarning:"#983B00",textWarningHover:"#FF8B4DFF",textWarningActive:"#FA5700FF",textNegative:"#A50016",textNegativeHover:"#FF6675FF",textNegativeActive:"#FF142CFF",inverseTextPrimary:"#F2F5F8F5",onDarkTextPrimary:"#F2F5F8F5",onDarkTextPrimaryHover:"#F8F9FC93",onDarkTextPrimaryActive:"#F8F9FCC4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#13181BF5",onLightTextPrimaryHover:"#16181D93",onLightTextPrimaryActive:"#16181DC4",surfaceSolidCard:"#FFFFFF",surfaceAccentMinor:"#CFE5F2",surfaceSolidDefault:"#060A0C",surfaceSolidTertiary:"#C4CFD7",surfaceAccent:"#0076D2",surfaceAccentHover:"#00C28BFF",surfaceAccentActive:"#00996EFF",surfaceTransparentSecondary:"#7D96A84D",surfaceTransparentSecondaryHover:"#08090C1A",surfaceTransparentSecondaryActive:"#08090C1F",surfaceTransparentTertiary:"#516E834D",surfaceTransparentDeep:"#30373DC7",surfaceClear:"#FFFFFF00",surfacePositive:"#198A00",surfacePositiveHover:"#28C344FF",surfacePositiveActive:"#21A138FF",surfaceWarning:"#D95800",surfaceWarningHover:"#FF8B4DFF",surfaceWarningActive:"#FF630FFF",surfaceWarningMinor56:"#D491008E",surfaceNegative:"#E7002F",surfaceNegativeHover:"#FF6675FF",surfaceNegativeActive:"#FF293EFF",surfaceTransparentAccent:"#0076D240",surfaceTransparentAccentActive:"#00AD7C33",surfaceTransparentAccent12:"#0076D21E",surfaceTransparentAccent20:"#0076D233",surfaceTransparentPositive:"#198A004D",surfaceTransparentPositive12:"#198A001E",surfaceTransparentPositive20:"#198A0033",surfaceTransparentWarning:"#D958004D",surfaceTransparentWarning12:"#D958001E",surfaceTransparentWarning20:"#D9580033",surfaceTransparentNegative:"#E7002F4D",surfaceTransparentNegative12:"#E7002F1E",surfaceTransparentNegative20:"#E7002F33",onLightSurfaceSolidDefault:"#060A0C",onLightSurfaceTransparentDeep:"#30373CC7",onDarkSurfaceSolidDefault:"#F7F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#0058A2",outlineSolidPrimary:"#A3ACB4",outlineSolidPrimary26:"#A3ACB442",dataBlueMinor:"#9CD5FF",dataBlueMinorActive:"#C2E7FFFF",dataBlue:"#8BB2FC",dataAccentMinorHover:"#0077C1",dataPositive:"#05AF32",dataPositiveMinor:"#96DAA1",dataNegative:"#BA5161",dataNegativeMinor:"#FFE0E3",dataWarning:"#B35B10",dataWarningMinor:"#FEE2D2",dataOrange:"#D49100",dataOrangeMinor:"#F3B400",dataViolet:"#9A29E0",dataVioletMinor:"#D48BFF",dataPink:"#FB5AA5",dataMagenta:"#F391E2",dataCyan:"#00C1C3",dataCyanDark:"#00AAAD",dataLime:"#7FC400",dataTeal:"#00B082"},tc={textPrimary:"#F2F5F8F5",textPrimaryHover:"#F8F9FC93",textPrimaryActive:"#F8F9FCC4",textSecondary:"#D5DFE69E",textSecondaryHover:"#F8F9FCFF",textSecondaryActive:"#F8F9FCAB",textTertiary:"#D5DFE64D",textTertiaryHover:"#F8F9FCFF",textTertiaryActive:"#F8F9FC56",textTertiaryBase:"#D5DFE64D",textTertiaryVariant:"#D5DFE64D",textParagraph:"#F2F5F8CC",textParagraphHover:"#F8F9FC7A",textParagraphActive:"#F8F9FCA3",textAccent:"#199AF0",textAccentHover:"#71F4CFFF",textAccentActive:"#38F0BCFF",textAccentTransparent20:"#199AF033",textPositive:"#24B23E",textPositiveHover:"#93F6A5FF",textPositiveActive:"#5BF176FF",textWarning:"#FF7024",textWarningHover:"#FFA97AFF",textWarningActive:"#FFBD99FF",textNegative:"#FF3D51",textNegativeHover:"#FD919CFF",textNegativeActive:"#FDAFB7FF",inverseTextPrimary:"#13181BF5",onDarkTextPrimary:"#F2F5F8F5",onDarkTextPrimaryHover:"#F8F9FC93",onDarkTextPrimaryActive:"#F8F9FCC4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#13181BF5",onLightTextPrimaryHover:"#16181D93",onLightTextPrimaryActive:"#16181DC4",surfaceSolidCard:"#060A0C",surfaceAccentMinor:"#071A26",surfaceSolidDefault:"#F7F9FB",surfaceSolidTertiary:"#30373C",surfaceAccent:"#118CDF",surfaceAccentHover:"#16DFA6FF",surfaceAccentActive:"#13C391FF",surfaceTransparentSecondary:"#D5DFE624",surfaceTransparentSecondaryHover:"#F8F9FC3D",surfaceTransparentSecondaryActive:"#F8F9FC0F",surfaceTransparentTertiary:"#D5DFE63D",surfaceTransparentDeep:"#D5DFE6BD",surfaceClear:"#FFFFFF00",surfacePositive:"#1A9E32",surfacePositiveHover:"#36D954FF",surfacePositiveActive:"#26C944FF",surfaceWarning:"#FA5F05",surfaceWarningHover:"#FDA97CFF",surfaceWarningActive:"#FD965EFF",surfaceWarningMinor56:"#A16B008E",surfaceNegative:"#FF293E",surfaceNegativeHover:"#FFA3ACFF",surfaceNegativeActive:"#FF8591FF",surfaceTransparentAccent:"#118CDF33",surfaceTransparentAccentActive:"#14CC9824",surfaceTransparentAccent12:"#118CDF1E",surfaceTransparentAccent20:"#118CDF33",surfaceTransparentPositive:"#1A9E3233",surfaceTransparentPositive12:"#1A9E321E",surfaceTransparentPositive20:"#1A9E3233",surfaceTransparentWarning:"#FA5F0533",surfaceTransparentWarning12:"#FA5F051E",surfaceTransparentWarning20:"#FA5F0533",surfaceTransparentNegative:"#FF293E33",surfaceTransparentNegative12:"#FF293E1E",surfaceTransparentNegative20:"#FF293E33",onLightSurfaceSolidDefault:"#060A0C",onLightSurfaceTransparentDeep:"#30373CC7",onDarkSurfaceSolidDefault:"#F7F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#199AF0",outlineSolidPrimary:"#25262D",outlineSolidPrimary26:"#25262D42",dataBlueMinor:"#0D3B59",dataBlueMinorActive:"#0B3550FF",dataBlue:"#1549AB",dataAccentMinorHover:"#0C72B6",dataPositive:"#0D8523",dataPositiveMinor:"#0A2B10",dataNegative:"#9C1422",dataNegativeMinor:"#4A0D13",dataWarning:"#85380C",dataWarningMinor:"#3D1D0A",dataOrange:"#A16B00",dataOrangeMinor:"#493203",dataViolet:"#AD42F5",dataVioletMinor:"#722BA1",dataPink:"#9B0D46",dataMagenta:"#8A2178",dataCyan:"#0C585A",dataCyanDark:"#007D80",dataLime:"#567D0C",dataTeal:"#14CC98"},ec={light:{...Za,surfaceAccent20:"#199AF033"},dark:qa,highContrastLight:Qa,highContrastDark:tc,betaCoreLight:ja,betaCoreDark:Ja},un=(i="light")=>ec[i],Zi={step:.8,cutoutRadius:.58,rightCutoutCenter:1.3,leftCutoutCenter:-.3};function fn(i,t){return i?t==null?void 0:t.loader.loadOrGetImage(i,t.colIndex,t.rowIndex):void 0}function ic(i,t,e,r){if(i<=0||t<=0||e.width<=0||e.height<=0)return;const o={x:0,y:0,width:i,height:t},n={...e};if(r==="cover"){const s=Math.max(e.width/i,e.height/t);o.width=e.width/s,o.height=e.height/s,o.x=(i-o.width)/2,o.y=(t-o.height)/2}else if(r==="contain"){const s=Math.min(e.width/i,e.height/t);n.width=i*s,n.height=t*s,n.x+=(e.width-n.width)/2,n.y+=(e.height-n.height)/2}return{source:o,destination:n}}function gn(i,t,e,r){const o="naturalWidth"in t?t.naturalWidth:t.width,n="naturalHeight"in t?t.naturalHeight:t.height,s=ic(o,n,e,r);if(!s)return;const{source:a,destination:c}=s;i.drawImage(t,a.x,a.y,a.width,a.height,c.x,c.y,c.width,c.height)}const rc=600,oc={s:{diameter:24,fontSize:8},m:{diameter:36,fontSize:14},l:{diameter:48,fontSize:20},xxl:{diameter:88,fontSize:32}};function nc(i=""){return i.split(" ").slice(0,2).map(t=>t[0]??"").join("").toUpperCase()}class ye extends vt{constructor(t,e={}){super(t),this.options=e,this.cutLeft=!1,this.cutRight=!1;const{diameter:r}=this.metrics;this.style={width:r,height:r,flexShrink:0}}set style(t){super.style={...super.style,...t}}get style(){return super.style}get metrics(){return oc[this.options.size??"s"]}measure(){this.rect.width=this.metrics.diameter,this.rect.height=this.metrics.diameter}onPaint(t){var v;const{diameter:e,fontSize:r}=this.metrics,o={x:this.rect.x,y:this.rect.y,width:e,height:e},n=this.options.customText?void 0:this.options.url,s=t.imageTransitions.isActive?t.imageTransitions.getAvatarImage(this.id,this.options.name,n):fn(n,t.imageResources),a=this.options.customText||nc(this.options.name),c=((v=this.options.theme)==null?void 0:v.tokens)??un(),d=this.groupClip&&{...this.groupClip},{cutLeft:h,cutRight:l}=this,{cutoutRadius:u,leftCutoutCenter:f,rightCutoutCenter:g}=Zi;t.custom(C=>{var m;C.save();try{d&&(C.beginPath(),C.rect(d.x,d.y,d.width,d.height),C.clip()),[h?f:void 0,l?g:void 0].forEach(p=>{p!==void 0&&(C.beginPath(),C.rect(o.x,o.y,e,e),C.moveTo(o.x+p*e+u*e,o.y+e/2),C.arc(o.x+p*e,o.y+e/2,u*e,0,Math.PI*2),C.clip("evenodd"))}),C.beginPath(),C.arc(o.x+e/2,o.y+e/2,e/2,0,Math.PI*2),C.clip(),C.fillStyle=c.surfaceAccent20??c.surfaceTransparentAccentActive,C.fillRect(o.x,o.y,e,e),s?gn(C,s,o,"fill"):(C.font=`${rc} ${r}px ${((m=this.options.theme)==null?void 0:m.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}`,C.textAlign="center",C.textBaseline="middle",C.fillStyle=c.textAccent,C.fillText(a,o.x+e/2,o.y+e/2))}finally{C.restore()}})}}function uo(i,t){return i===void 0||!Number.isFinite(i)?t:Math.min(Number.MAX_SAFE_INTEGER,Math.max(0,Math.floor(i)))}function sc(i,t,e){const r=Math.min(i,uo(t,3)),o=Math.max(i,uo(e,i)),n=o-r;return{visible:r,total:o,hidden:n,slots:r+(n>0?1:0)}}class yr extends dt{constructor(t,e){var a;super(t),this.options=e,this.activeIndex=-1,this.avatars=[];const r=sc(e.items.length,e.visibleCount,e.totalCount),o=e.items.slice(0,r.visible);if(new Set(e.items.map(c=>c.id)).size!==e.items.length)throw new Error("Canvas.AvatarGroup items must have unique ids");if(o.forEach((c,d)=>{const h=new ye(`${t}:item:${c.id}`,{...c,size:e.size,theme:e.theme});h.tooltip=c.tooltip,h.onClick=l=>{var u;l.target===h&&((u=e.onItemClick)==null||u.call(e,{item:c,index:d,event:l}))},e.onItemClick&&(h.style.cursor="pointer"),this.appendAvatar(h)}),r.hidden>0){const c=new ye(`${t}:overflow`,{customText:`+${r.hidden}`,size:e.size,theme:e.theme});c.tooltip=e.overflowTooltip??`+${r.hidden}`,c.onClick=d=>{var h;d.target===c&&((h=e.onOverflowClick)==null||h.call(e,{hiddenCount:r.hidden,hiddenItems:e.items.slice(r.visible),totalCount:r.total,event:d}))},e.onOverflowClick&&(c.style.cursor="pointer"),this.appendAvatar(c)}const s=((a=this.avatars[0])==null?void 0:a.metrics.diameter)??0;this.position="relative",this.style={width:r.slots?s+(r.slots-1)*Zi.step*s:0,height:s,flexShrink:0}}set style(t){super.style={...super.style,...t}}get style(){return super.style}appendAvatar(t){const e=this.avatars.length;t.position="absolute",t.left=e*Zi.step*t.metrics.diameter,t.top=0,t.portalHoverEnabled=t.tooltip!==void 0,t.onMouseEnter=()=>{this.activeIndex=e},t.onMouseLeave=()=>{this.activeIndex===e&&(this.activeIndex=-1)},this.avatars.push(t),this.addChild(t)}onPaint(t,e){this.avatars.forEach((r,o)=>{r.groupClip=this.rect,r.cutRight=o<this.avatars.length-1&&o!==this.activeIndex,r.cutLeft=this.activeIndex>=0&&o===this.activeIndex+1,r.paint(t,e)})}}const at={xs:{height:24,fontSize:12,borderRadius:4,paddingX:8,iconSize:14},s:{height:32,fontSize:13,borderRadius:6,paddingX:12,iconSize:16},m:{height:40,fontSize:14,borderRadius:8,paddingX:16,iconSize:18},l:{height:48,fontSize:16,borderRadius:10,paddingX:20,iconSize:20}};function Cn(i){return{default:{bgColor:i.surfaceSolidDefault,bgColorHover:i.surfaceSolidDefault,borderColor:i.surfaceSolidDefault,textColor:i.inverseTextPrimary,iconColor:i.inverseTextPrimary},primary:{bgColor:i.surfaceSolidDefault,bgColorHover:i.surfaceSolidDefault,borderColor:i.surfaceSolidDefault,textColor:i.inverseTextPrimary,iconColor:i.inverseTextPrimary},accent:{bgColor:i.surfaceAccent,bgColorHover:i.surfaceAccentHover,borderColor:i.surfaceAccent,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},secondary:{bgColor:i.surfaceTransparentSecondary,bgColorHover:i.surfaceTransparentSecondaryHover,borderColor:"transparent",textColor:i.textPrimary,iconColor:i.textPrimary},clear:{bgColor:i.surfaceClear,bgColorHover:i.surfaceTransparentSecondaryHover,borderColor:"transparent",textColor:i.textPrimary,iconColor:i.textPrimary},success:{bgColor:i.surfacePositive,bgColorHover:i.surfacePositiveHover,borderColor:i.surfacePositive,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},warning:{bgColor:i.surfaceWarning,bgColorHover:i.surfaceWarningHover,borderColor:i.surfaceWarning,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},critical:{bgColor:i.surfaceNegative,bgColorHover:i.surfaceNegativeHover,borderColor:i.surfaceNegative,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},dark:{bgColor:i.onLightSurfaceTransparentDeep,bgColorHover:i.onLightSurfaceTransparentDeep,borderColor:i.onLightSurfaceTransparentDeep,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},black:{bgColor:i.onLightSurfaceSolidDefault,bgColorHover:i.onLightSurfaceSolidDefault,borderColor:i.onLightSurfaceSolidDefault,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},white:{bgColor:i.onDarkSurfaceSolidDefault,bgColorHover:i.onDarkSurfaceSolidDefault,borderColor:i.onDarkSurfaceSolidDefault,textColor:i.onLightTextPrimary,iconColor:i.onLightTextPrimary}}}const fo={bgColor:"#060A0C",bgColorHover:"#13181B",borderColor:"transparent",textColor:"#FFFFFF",textColorHover:"#F2F5F893",iconColor:"#FFFFFF",iconColorHover:"#F2F5F893"},gi={default:fo,primary:{bgColor:"#060A0C",bgColorHover:"#111C22",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},accent:{bgColor:"#118CDF",bgColorHover:"#1798EE",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},secondary:{bgColor:"#ADB9C238",bgColorHover:"#ADB9C247",borderColor:"transparent",textColor:"#060A0C",iconColor:"#060A0C"},clear:{bgColor:"transparent",bgColorHover:"rgba(6, 10, 12, 0.08)",borderColor:"transparent",textColor:"#060A0C",iconColor:"#060A0C"},success:{bgColor:"#1A9E32",bgColorHover:"#1EB83A",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},warning:{bgColor:"#FA5F05",bgColorHover:"#FB782D",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},critical:{bgColor:"#FF293E",bgColorHover:"#FF5263",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},dark:{bgColor:"#30373CC7",bgColorHover:"#30373CC7",borderColor:"transparent",textColor:"#FFFFFF",textColorHover:"#F2F5F893",iconColor:"#FFFFFF",iconColorHover:"#F2F5F893"},black:fo,white:{bgColor:"#FFFFFF",bgColorHover:"#FFFFFF",borderColor:"transparent",textColor:"#060A0C",textColorHover:"#13181B93",iconColor:"#060A0C",iconColorHover:"#13181B93"}},ee=4,ie=4,vn=16,br=20,Ar=4,St=1,Dr=6,ac=4,Ci="s",vi="default",xr="#d32f2f",be="#ffffff",Fn="rgba(30, 136, 229, 0.08)",qi="#ffffff",mn="#E8EEF2",pn="#D5DFE6",ji="#8A959D",Er="|",yn="#",bn=35,Sr=15,Ji=new Map,Qi=new Map;function wr(i,t){if(i.charCodeAt(0)===bn){const e=parseInt(i.slice(1),16),r=Math.min(255,(e>>16&255)+t),o=Math.min(255,(e>>8&255)+t),n=Math.min(255,(e&255)+t);return`${yn}${(r<<16|o<<8|n).toString(16).padStart(6,"0")}`}return i}function go(i,t){const e=Math.min(1,Math.max(0,t));if(i.charCodeAt(0)!==35)throw new Error("Only HEX color format is supported");let r=i.slice(1),o,n,s;if((r.length===3||r.length===4)&&(r=r.split("").map(a=>a+a).join("")),r.length===6)o=parseInt(r.slice(0,2),16),n=parseInt(r.slice(2,4),16),s=parseInt(r.slice(4,6),16);else if(r.length===8)o=parseInt(r.slice(0,2),16),n=parseInt(r.slice(2,4),16),s=parseInt(r.slice(4,6),16);else throw new Error(`Invalid HEX color format: ${i}`);return`rgba(${o}, ${n}, ${s}, ${e})`}function An(i,t){const e=`${i}${Er}${t}`;let r=Ji.get(e);return r===void 0&&(r=wr(i,t),Ji.set(e,r)),r}function Tr(i,t,e){const r=`${e}${Er}${t}`;let o=Qi.get(r);return o===void 0&&(i.font=e,o=i.measureText(t).width,Qi.set(r,o)),o}function Hr(i,t,e,r,o,n){if(i!=="auto")return i;let s=0;return o&&(s+=e+r),n&&(s+=e+r),t+s+4}function Br(i,t,e,r,o){let n=i;return r&&(n+=t+e),o&&(n+=t+e),n}function cc(){Ji.clear(),Qi.clear()}const lc=wr(xr,Sr);function kr(i,t,e,r){if(e)return{bgColor:i.bgCell,borderColor:i.borderColor,textColor:i.textLight,iconColor:i.textLight};switch(t){case"primary":return tr(i,r);case"secondary":return Dn(i,r);case"danger":return xn(r);default:return tr(i,r)}}function hc(i,t,e,r,o){const{accentColor:n}=i,s=i.accentFg||be,a=i.accentFg||be,c=.4;if(t||e){const u=o?go(n,c):n;return{bgColor:u,borderColor:u,textColor:s,iconColor:a}}const d="#485056B0",h="white",l=o?go(d,c):d;return{bgColor:h,borderColor:l,textColor:s,iconColor:a}}function tr(i,t){const{accentColor:e}=i,r=t?An(e,Sr):e;return{bgColor:r,borderColor:r,textColor:i.accentFg||be,iconColor:i.accentFg||be}}function Dn(i,t){return{bgColor:t?i.accentLight||Fn:i.bgCell,borderColor:i.accentColor,textColor:i.accentColor,iconColor:i.accentColor}}function xn(i){const t=i?lc:xr;return{bgColor:t,borderColor:t,textColor:qi,iconColor:qi}}function Lr(i,t,e){return t?{bgColor:mn,borderColor:pn,textColor:ji,iconColor:ji}:{bgColor:e?i.bgColorHover:i.bgColor,borderColor:i.borderColor,textColor:e&&i.textColorHover?i.textColorHover:i.textColor,iconColor:e&&i.iconColorHover?i.iconColorHover:i.iconColor}}const Kt=-1,Co=0,gt={colIndex:Kt,rowIndex:Kt},et={x:Co,y:Co},dc=2;function Je(i){const{location:t}=i;if(Array.isArray(t)&&t.length>=dc)return gt.colIndex=t[0]??Kt,gt.rowIndex=t[1]??Kt,gt;const{col:e}=i,{row:r}=i;if(typeof e=="number"&&typeof r=="number")return gt.colIndex=e,gt.rowIndex=r,gt;const{colIndex:o}=i,{rowIndex:n}=i;return typeof o=="number"&&typeof n=="number"?(gt.colIndex=o,gt.rowIndex=n,gt):(gt.colIndex=Kt,gt.rowIndex=Kt,gt)}const Ue="-",vo=0;function Jt(i,t){const{colIndex:e,rowIndex:r}=i;return e>=vo&&r>=vo?`${e}${Ue}${r}`:`${t.x}${Ue}${t.y}${Ue}${t.width}${Ue}${t.height}`}function er(i){const{posX:t}=i,{posY:e}=i;if(typeof t=="number"&&typeof e=="number"&&t===t&&e===e)return et.x=t,et.y=e,et;const{x:r}=i,{y:o}=i;if(typeof r=="number"&&typeof o=="number"&&r===r&&o===o)return et.x=r,et.y=o,et;const{location:n}=i;if(Array.isArray(n)&&n.length>=2){const s=n[0],a=n[1];if(typeof s=="number"&&typeof a=="number")return et.x=s,et.y=a,et}return null}function ir(i,t){const e=i.x,r=i.y,o=t.x,n=t.y;return e>=o&&e<=o+t.width&&r>=n&&r<=n+t.height?(et.x=e-o,et.y=r-n,et):i}function En(i,t,e){if(typeof i!="number"||typeof t!="number")return;const r=e.width,o=e.height,n=e.x,s=e.y;if(i>=-1&&i<=r+1&&t>=-1&&t<=o+1)return et.x=i,et.y=t,et;if(i>=n-1&&i<=n+r+1&&t>=s-1&&t<=s+o+1)return et.x=i-n,et.y=t-s,et}function Pr(i,t,e){const r=e.x,o=e.y;return i>=r&&i<=r+e.width&&t>=o&&t<=o+e.height}function _t(i,t){if(typeof i=="object"&&i){const{hoverX:e}=i,{hoverY:r}=i,{rectX:o}=i,{rectY:n}=i;if(typeof e=="number"&&typeof r=="number"&&typeof o=="number"&&typeof n=="number"){const s=t.x-o,a=t.y-n;return e>=s&&e<=s+t.width&&r>=a&&r<=a+t.height}}return!!i}function Qe(){return typeof window<"u"?Math.ceil(window.devicePixelRatio):1}function Sn(i){let t=0;for(let e=0;e<i.length;e++)t=(t<<5)-t+i.charCodeAt(e),t|=0;return t.toString(36)}function rr(i,t){let e=i;return t&&(e=e.replace(/currentColor/g,t),!e.includes("fill=")&&!e.includes("stroke=")&&(e=e.replace("<svg",`<svg fill="${t}"`))),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}class wn{constructor(){this.iconRegistry=new Map,this.svgDataUrlCache=new Map,this.spriteCache=new Map,this.pendingLoads=new Set,this.loadListeners=new Set,this.inFlightCount=0,this.stats={requests:0,hits:0,misses:0,cacheSize:0,inFlight:0}}onLoad(t){return this.loadListeners.add(t),()=>this.loadListeners.delete(t)}register(t,e={}){const r=Array.isArray(t)?t:Object.entries(t).map(([o,n])=>({name:o,svg:n}));for(const{name:o,svg:n}of r)o&&n&&(e.overwrite||!this.iconRegistry.has(o))&&this.iconRegistry.set(o,n);return this}getSprite(t,e,r){const o=this.resolveKey(t,e,r);if(!o)return null;this.stats.requests++;const n=this.spriteCache.get(o.key);return n?(this.stats.hits++,n):(this.stats.misses++,this.loadSprite(o.key,o.url,e,!0),null)}preload(t,e){const r=Array.isArray(t)?t:[t];for(const o of r){const n=this.resolveKey(o,e.size,e.color);n&&this.loadSprite(n.key,n.url,e.size,!1)}return this}draw(t,e,r,o,n,s){const a=this.getSprite(e,n,s);if(a){const c=n*Qe();t.drawImage(a,0,0,c,c,r,o,n,n)}}getImageDirect(t){return t&&t instanceof HTMLImageElement&&t.complete&&t.naturalHeight!==0?t:null}getStats(){return{...this.stats}}reset(){return this.spriteCache.clear(),this.svgDataUrlCache.clear(),this.pendingLoads.clear(),this.stats={requests:0,hits:0,misses:0,cacheSize:0,inFlight:0},this}clearSpriteCache(){return this.spriteCache.clear(),this.pendingLoads.clear(),this.stats.cacheSize=0,this}has(t){return this.iconRegistry.has(t)}getSvg(t){return this.iconRegistry.get(t)}resolveKey(t,e,r){if(!t||e<=0)return null;const o=e*Qe();if(typeof t=="string"){const{key:n,url:s}=this.resolveIconUrl(t,r);return{key:`${n}@${o}`,url:s}}return t instanceof HTMLImageElement?{key:`img:${t.src}:${r??""}@${o}`,url:t.src}:null}resolveIconUrl(t,e){const r=e??"",o=this.iconRegistry.get(t);if(o){const s=`r:${t}:${r}`;return this.svgDataUrlCache.has(s)||this.svgDataUrlCache.set(s,rr(o,e)),{key:s,url:this.svgDataUrlCache.get(s)}}const n=t.trimStart();if(n.startsWith("<svg")){const s=`s:${Sn(n)}:${r}`;return this.svgDataUrlCache.has(s)||this.svgDataUrlCache.set(s,rr(n,e)),{key:s,url:this.svgDataUrlCache.get(s)}}return{key:`u:${t}:${r}`,url:t}}loadSprite(t,e,r,o){var a;if(this.spriteCache.has(t)||this.pendingLoads.has(t))return;this.pendingLoads.add(t),this.inFlightCount++,this.stats.inFlight=this.inFlightCount;const n=new Image;n.src=e;const s=r*Qe();(a=n.decode)==null||a.call(n).then(()=>{const c=document.createElement("canvas");c.width=s,c.height=s;const d=c.getContext("2d");d&&(d.drawImage(n,0,0,s,s),this.spriteCache.set(t,c),this.stats.cacheSize=this.spriteCache.size),o&&this.notifyListeners()}).catch(()=>{}).finally(()=>{this.pendingLoads.delete(t),this.inFlightCount--,this.stats.inFlight=this.inFlightCount,!o&&this.inFlightCount===0&&this.notifyListeners()})}notifyListeners(){this.loadListeners.forEach(t=>t())}}const wt=new wn;function Tn(i){return wt.onLoad(i)}function uc(i,t={}){wt.register(i,t)}function Hn(i,t,e){return wt.getSprite(i,t,e)}function Bn(i,t){wt.preload(i,t)}function kn(i,t,e,r,o,n){wt.draw(i,t,e,r,o,n)}function Ln(i,t){return wt.getImageDirect(i)}function fc(){return wt.getStats()}function gc(){wt.clearSpriteCache()}const Cc=kn;function Ct(i,t,e,r,o,n){if(!t||o<=0)return;const s=Hn(t,o,n);if(s){i.drawImage(s,e,r,o,o);return}const a=Ln(t);a&&i.drawImage(a,e,r,o,o)}function Pn(i,t,e,r,o,n,s,a="primary",c=!1,d=!1,h,l,u,f=Dr){const g=ee,v=o-g*2,C=Math.min(v-ie,vn),m=s.baseFontFull,p=u?Tr(u,n,m):0,A=Hr(r,p,C,f,h,l),y=e+g,E=_t(d,{x:t,y:e,width:A,height:o}),D=kr(s,a,c,E),S=t+A*.5,H=y+v*.5;i.roundedRect(t,y,A,v,Ar,{fillStyle:D.bgColor,strokeStyle:D.borderColor,lineWidth:St});const B=Br(p,C,f,h,l);let M=S-B*.5;if(h){const G=H-C*.5;Ct(i,h,M,G,C,D.textColor),M+=C+f}if(i.fillText(n,M,H,m,D.textColor,"middle","left"),l){const G=M+p+f,V=H-C*.5;Ct(i,l,G,V,C,D.textColor)}return{x:t,y,width:A,height:v,actualWidth:A}}function In(i,t,e,r,o,n=vi,s=Ci,a=!1,c=!1,d,h,l,u=Dr,f){const g=at[s],v=f?f[n]:gi[n],C=`${g.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,m=l?Tr(l,o,C):0,p=Hr(r,m,g.iconSize,u,d,h),A=_t(c,{x:t,y:e,width:p,height:g.height}),y=Lr(v,a,A),E=t+p*.5,D=e+g.height*.5;y.bgColor!=="transparent"?i.roundedRect(t,e,p,g.height,g.borderRadius,{fillStyle:y.bgColor,strokeStyle:y.borderColor!=="transparent"?y.borderColor:void 0,lineWidth:y.borderColor!=="transparent"?St:0}):y.borderColor!=="transparent"&&i.roundedRect(t,e,p,g.height,g.borderRadius,{fillStyle:y.bgColor,strokeStyle:y.borderColor,lineWidth:St});const S=Br(m,g.iconSize,u,d,h);let H=E-S*.5;if(d){const B=D-g.iconSize*.5;Ct(i,d,H,B,g.iconSize,y.textColor),H+=g.iconSize+u}if(i.fillText(o,H,D,C,y.textColor,"middle","left"),h){const B=H+m+u,M=D-g.iconSize*.5;Ct(i,h,B,M,g.iconSize,y.textColor)}return{x:t,y:e,width:p,height:g.height,actualWidth:p}}const vc={100:"FF",90:"E6",80:"CC",75:"BF",70:"B3",60:"99",50:"80",40:"66",30:"4D",25:"40",20:"33",10:"1A",0:"00"},Fc=(i,t)=>i.length!==6?i:i.slice(0,4)+vc[t],Xt="transparent",mc=Object.fromEntries(Object.entries(gi).map(([i,t])=>i==="secondary"?[i,{bgColor:Xt,borderColor:Xt,textColor:"#485056B0",bgColorHover:Xt,iconColor:"#485056B0",iconColorHovered:"#485056FF"}]:[i,{bgColor:Xt,borderColor:Xt,textColor:t.bgColor,bgColorHover:Xt,iconColor:t.bgColor,iconColorHovered:t.bgColorHover}]));function Rn(i,t,e,r,o=vi,n=Ci,s=!1,a=!1,c){const d=at[n],h=mc[o],l=(c==null?void 0:c.overrideSquareSize)??d.height,u=(c==null?void 0:c.overrideIconSize)??d.iconSize,f=_t(a,{x:t,y:e,width:l,height:l}),g=h,v=t+l*.5,C=e+l*.5,m=v-u*.5,p=C-u*.5;g.bgColor!=="transparent"?i.roundedRect(t,e,l,l,d.borderRadius,{fillStyle:g.bgColor,strokeStyle:g.borderColor!=="transparent"?g.borderColor:void 0,lineWidth:g.borderColor!=="transparent"?St:0}):g.borderColor!=="transparent"&&i.roundedRect(t,e,l,l,d.borderRadius,{fillStyle:g.bgColor,strokeStyle:g.borderColor,lineWidth:St});const A=(c==null?void 0:c.iconColor)??g.iconColor,y=(c==null?void 0:c.iconColorHovered)??(c==null?void 0:c.iconColor)??g.iconColorHovered,E=s?Fc(A,40):f?y:A;return Ct(i,r,m,p,u,E),{x:t,y:e,width:l,height:l}}function Ir(i,t,e,r,o,n,s,a="primary",c=!1,d=!1){const h=ee,l=o-h*2,u=Math.min(l-ie,br),f=r==="auto"?u:r,g=e+h,v=_t(d,{x:t,y:e,width:f,height:o}),C=kr(s,a,c,v),m=t+f*.5,p=g+l*.5,A=m-u*.5,y=p-u*.5;return i.roundedRect(t,g,f,l,Ar,{fillStyle:C.bgColor,strokeStyle:C.borderColor,lineWidth:St}),Ct(i,n,A,y,u,C.iconColor),{x:t,y:g,width:f,height:l}}function Mn(i,t,e,r,o=vi,n=Ci,s=!1,a=!1){const c=at[n],d=gi[o],h=c.height,l=_t(a,{x:t,y:e,width:h,height:h}),u=Lr(d,s,l),f=t+h*.5,g=e+h*.5,v=f-c.iconSize*.5,C=g-c.iconSize*.5;return u.bgColor!=="transparent"?i.roundedRect(t,e,h,h,c.borderRadius,{fillStyle:u.bgColor,strokeStyle:u.borderColor!=="transparent"?u.borderColor:void 0,lineWidth:u.borderColor!=="transparent"?St:0}):u.borderColor!=="transparent"&&i.roundedRect(t,e,h,h,c.borderRadius,{fillStyle:u.bgColor,strokeStyle:u.borderColor,lineWidth:St}),Ct(i,r,v,C,c.iconSize,u.iconColor),{x:t,y:e,width:h,height:h}}const Fo={xs:{height:16,fontSize:10,paddingX:4,borderRadius:4},s:{height:20,fontSize:11,paddingX:6,borderRadius:5},m:{height:24,fontSize:12,paddingX:8,borderRadius:6},l:{height:28,fontSize:13,paddingX:10,borderRadius:7}};function pc(i){return{default:{bgColor:i.surfaceSolidDefault,bgColorTransparent:i.surfaceTransparentSecondary,textColor:i.inverseTextPrimary,textColorOnTransparent:i.textPrimary},accent:{bgColor:i.surfaceAccent,bgColorTransparent:i.surfaceTransparentAccent,textColor:i.onDarkTextPrimary,textColorOnTransparent:i.textAccent},positive:{bgColor:i.surfacePositive,bgColorTransparent:i.surfaceTransparentPositive,textColor:i.onDarkTextPrimary,textColorOnTransparent:i.textPositive},warning:{bgColor:i.surfaceWarning,bgColorTransparent:i.surfaceTransparentWarning,textColor:i.onDarkTextPrimary,textColorOnTransparent:i.textWarning},negative:{bgColor:i.surfaceNegative,bgColorTransparent:i.surfaceTransparentNegative,textColor:i.onDarkTextPrimary,textColorOnTransparent:i.textNegative},dark:{bgColor:i.onLightSurfaceSolidDefault,bgColorTransparent:i.onLightSurfaceTransparentDeep,textColor:i.onDarkTextPrimary,textColorOnTransparent:i.onLightTextPrimary},light:{bgColor:i.onDarkSurfaceSolidDefault,bgColorTransparent:i.onDarkSurfaceTransparentCard,textColor:i.onLightTextPrimary,textColorOnTransparent:i.onDarkTextPrimary}}}const yc="|",Xe=6,mo=new Map,po={xs:10,s:12,m:14,l:16};class _n extends vt{constructor(t,e,r){var o;super(t),this.view="default",this.size="s",this.transparent=!1,this.clear=!1,this.pilled=!1,this.viewColors={},this.text=e,r&&(r.view!==void 0&&(this.view=r.view),r.size!==void 0&&(this.size=r.size),r.transparent!==void 0&&(this.transparent=r.transparent),r.clear!==void 0&&(this.clear=r.clear),r.pilled!==void 0&&(this.pilled=r.pilled),this.leftIcon=r.leftIcon,this.rightIcon=r.rightIcon,this.customColor=r.customColor,this.customBackgroundColor=r.customBackgroundColor,(o=r.theme)!=null&&o.tokens&&(this.viewColors=pc(r.theme.tokens)))}measure(t){const e=Fo[this.size],r=po[this.size],o=`${e.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,n=yo(t,o,this.text),s=this.text.length>0;let a=0;this.leftIcon&&(a+=r+(s?Xe:0)),this.rightIcon&&(a+=r+(s?Xe:0)),this.rect.width=n+a+e.paddingX*2,this.rect.height=e.height}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect,a=Fo[this.size],c=po[this.size],d=this.viewColors[this.view];if(!d)return;const h=`${a.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`;let l,u;if(this.clear?(l="transparent",u=this.customColor??d.textColorOnTransparent):this.transparent?(l=this.customBackgroundColor??d.bgColorTransparent,u=this.customColor??d.textColorOnTransparent):(l=this.customBackgroundColor??d.bgColor,u=this.customColor??d.textColor),!this.clear){const v=this.pilled?s/2:a.borderRadius;t.roundedRect(r,o,n,s,v,{fillStyle:l})}const f=o+s/2;let g=r+a.paddingX;if(this.leftIcon){const v=f-c/2;Ct(t,this.leftIcon,g,v,c,u),g+=c+Xe}if(t.fillText(this.text,g,f,h,u,"middle"),this.rightIcon){const v=yo(e,h,this.text),C=g+v+Xe,m=f-c/2;Ct(t,this.rightIcon,C,m,c,u)}}}function yo(i,t,e){const r=`${t}${yc}${e}`;let o=mo.get(r);return o===void 0&&(i.font=t,o=i.measureText(e).width,mo.set(r,o)),o}const bc="default",Ac="s",_i="pointer",Ve=8,Dc={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e",baseFontFull:"13px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},bo=new Map;class Nn extends vt{constructor(t,e,r){var o;super(t),this.variant="primary",this.view=bc,this.size=Ac,this.disabled=!1,this.isHovered=!1,this.useNewApi=!1,this.text=e,super.style={...super.style,cursor:_i},r&&(r.view!==void 0?(this.view=r.view,this.useNewApi=!0):r.variant!==void 0&&(this.variant=r.variant),r.size!==void 0&&(this.size=r.size,this.useNewApi=!0),this.leftIcon=r.leftIcon,this.rightIcon=r.rightIcon,r.disabled!==void 0&&(this.disabled=r.disabled),r.onClick&&(this.onClick=r.onClick),(o=r.theme)!=null&&o.tokens&&(this.viewColors=Cn(r.theme.tokens)))}set style(t){super.style={...super.style,cursor:_i,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=_i),t}measure(t){const e=at[this.size],r=`${e.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,o=xc(t,this.text,r);let n=0;this.leftIcon&&(n+=e.iconSize+Ve),this.rightIcon&&(n+=e.iconSize+Ve),this.rect.width=o+n+e.paddingX*2,this.rect.height=e.height}onPaint(t,e){const{x:r,y:o,width:n}=this.rect;if(this.useNewApi)In(t,r,o,n,this.text,this.view,this.size,this.disabled,this.isHovered,this.leftIcon,this.rightIcon,e,Ve,this.viewColors);else{const s=at[this.size];Pn(t,r,o,n,s.height,this.text,Dc,this.variant,this.disabled,this.isHovered,this.leftIcon,this.rightIcon,e,Ve)}}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}}function xc(i,t,e){const r=`${e}|${t}`;let o=bo.get(r);return o===void 0&&(i.font=e,o=i.measureText(t).width,bo.set(r,o)),o}const Ao=16,Do="black",xo=0,Ec=Math.PI/2,Sc=1.8,Vt={startX:-3.5,startY:-4.25,middleX:2.75,middleY:0,endX:-3.5,endY:4.25};class wc extends vt{constructor(t,e={}){super(t),this.rotation=xo,this.color=Do,this.rotation=e.rotation??xo,this.color=e.color??Do,this.rect.width=Ao,this.rect.height=Ao}measure(t){}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect,a=r+n/2,c=o+s/2,d=this.rotation*Ec;t.custom(h=>{h.save(),h.translate(a,c),h.rotate(d),h.strokeStyle=this.color,h.lineWidth=Sc,h.lineCap="round",h.lineJoin="round",h.beginPath(),h.moveTo(Vt.startX,Vt.startY),h.lineTo(Vt.middleX,Vt.middleY),h.lineTo(Vt.endX,Vt.endY),h.stroke(),h.restore()})}}const Tc=28,Hc="default",Bc="s",kc="pointer",Lc=20,Pc={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e"};class or extends vt{constructor(t,e,r){super(t),this.view=Hc,this.buttonSize=Bc,this.isHovered=!1,this.useNewApi=!1,this.getDisabled=()=>this.disabled?"default":kc,this.icon=e,this.size=(r==null?void 0:r.size)??"auto",this.variant=(r==null?void 0:r.variant)??"primary",this.disabled=(r==null?void 0:r.disabled)??!1,super.style={...super.style,cursor:this.getDisabled()},(r==null?void 0:r.view)!==void 0&&(this.view=r.view,this.useNewApi=!0),(r==null?void 0:r.buttonSize)!==void 0&&(this.buttonSize=r.buttonSize,this.useNewApi=!0),(r==null?void 0:r.overrideSquareSize)!==void 0&&(this.overrideSquareSize=r.overrideSquareSize),(r==null?void 0:r.overrideIconSize)!==void 0&&(this.overrideIconSize=r.overrideIconSize),(r==null?void 0:r.overrideWidth)!==void 0&&(this.overrideWidth=r.overrideWidth),(r==null?void 0:r.iconColor)!==void 0&&(this.iconColor=r.iconColor),(r==null?void 0:r.iconColorHovered)!==void 0&&(this.iconColorHovered=r.iconColorHovered),r!=null&&r.onClick&&(this.onClick=o=>{var n;return(n=r.onClick)==null?void 0:n.call(r,o)})}set style(t){super.style={...super.style,cursor:this.getDisabled(),...t}}get style(){const t=super.style;return t.cursor||(t.cursor=this.getDisabled()),t}measure(t){if(this.useNewApi){const e=at[this.buttonSize],r=this.overrideSquareSize??e.height;this.rect.height=r,this.rect.width=this.overrideWidth??r}else{const e=Eo(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect;if(this.useNewApi){const a=this.overrideSquareSize!==void 0||this.overrideIconSize!==void 0||this.iconColor!==void 0||this.iconColorHovered!==void 0?{overrideSquareSize:this.overrideSquareSize,overrideIconSize:this.overrideIconSize,iconColor:this.iconColor,iconColorHovered:this.iconColorHovered}:void 0;if(Rn(t,r,o,this.icon,this.view,this.buttonSize,this.disabled,this.isHovered,a),Mt.DEBUG){const c=at[this.buttonSize],d=this.overrideSquareSize??c.height,h=this.overrideIconSize??c.iconSize,l=r+(d-h)*.5,u=o+(d-h)*.5;t.strokeRect(l,u,h,h,"cyan",1)}}else Ir(t,r,o,n,s,this.icon,Pc,this.variant,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}containsHitPoint(t,e){if(this.useNewApi){const n=at[this.buttonSize],s=this.overrideSquareSize??n.height,a={x:this.rect.x,y:this.rect.y,width:this.overrideWidth??s,height:s};return So(t,e,a)}const r=Eo(this.size,this.rect.height),o=Ic(this.rect.x,this.rect.y,r);return So(t,e,o)}}function Eo(i,t){const e=typeof i=="number"?i:t??Tc,r=0,o=ee,n=Math.min(e-o*2-ie,Lc),s=typeof i=="number"?i:n+r*2;return{height:e,width:s,paddingX:r,paddingY:o,iconSize:n}}function Ic(i,t,e){return{x:i+e.paddingX,y:t+e.paddingY,width:e.width-e.paddingX*2,height:e.height-e.paddingY*2}}function So(i,t,e){return i>=e.x&&i<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}const Rc=16,Mc="transparent";class On extends vt{constructor(t,e,r){super(t),this.icon=e,this.size=(r==null?void 0:r.size)??Rc,this.color=r==null?void 0:r.color}measure(t){this.rect.width=this.size,this.rect.height=this.size}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect;this.backgroundColor&&this.backgroundColor!==Mc&&t.fillRect(r,o,n,s,this.backgroundColor),Ct(t,this.icon,r,o,this.size,this.color)}}const _c=28,Nc="default",Oc="s",Ni="pointer",zc=20,Wc={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e"};class zn extends vt{constructor(t,e,r){super(t),this.view=Nc,this.buttonSize=Oc,this.isHovered=!1,this.useNewApi=!1,this.icon=e,this.size=(r==null?void 0:r.size)??"auto",this.variant=(r==null?void 0:r.variant)??"primary",this.disabled=(r==null?void 0:r.disabled)??!1,super.style={...super.style,cursor:Ni},(r==null?void 0:r.view)!==void 0&&(this.view=r.view,this.useNewApi=!0),(r==null?void 0:r.buttonSize)!==void 0&&(this.buttonSize=r.buttonSize,this.useNewApi=!0),r!=null&&r.onClick&&(this.onClick=o=>{var n;return(n=r.onClick)==null?void 0:n.call(r,o)})}set style(t){super.style={...super.style,cursor:Ni,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=Ni),t}measure(t){if(this.useNewApi){const e=at[this.buttonSize];this.rect.height=e.height,this.rect.width=e.height}else{const e=wo(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect;this.useNewApi?Mn(t,r,o,this.icon,this.view,this.buttonSize,this.disabled,this.isHovered):Ir(t,r,o,n,s,this.icon,Wc,this.variant,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}containsHitPoint(t,e){if(this.useNewApi){const n=at[this.buttonSize],s={x:this.rect.x,y:this.rect.y,width:n.height,height:n.height};return To(t,e,s)}const r=wo(this.size,this.rect.height),o=Gc(this.rect.x,this.rect.y,r);return To(t,e,o)}}function wo(i,t){const e=typeof i=="number"?i:t??_c,r=0,o=ee,n=Math.min(e-o*2-ie,zc),s=typeof i=="number"?i:n+r*2;return{height:e,width:s,paddingX:r,paddingY:o,iconSize:n}}function Gc(i,t,e){return{x:i+e.paddingX,y:t+e.paddingY,width:e.width-e.paddingX*2,height:e.height-e.paddingY*2}}function To(i,t,e){return i>=e.x&&i<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}class Rr extends vt{constructor(t,e){super(t),this.options=e,this.style={flexShrink:0}}set style(t){super.style={...super.style,...t}}get style(){return super.style}measure(){typeof this.style.width=="number"&&(this.rect.width=this.style.width),typeof this.style.height=="number"&&(this.rect.height=this.style.height)}onPaint(t){const e=fn(this.options.src,t.imageResources);if(!e)return;const r={...this.rect};t.custom(o=>{o.save();try{o.beginPath(),o.rect(r.x,r.y,r.width,r.height),o.clip(),gn(o,e,r,this.options.fit??"cover")}finally{o.restore()}})}}function $c(i,t){const e=i.replace("#","");let r,o,n,s=255;e.length===3||e.length===4?(r=parseInt(e[0]+e[0],16),o=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),e.length===4&&(s=parseInt(e[3]+e[3],16))):(r=parseInt(e.slice(0,2),16),o=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16),e.length===8&&(s=parseInt(e.slice(6,8),16)));const a=Math.round(s*t),c=d=>d.toString(16).padStart(2,"0");return`#${c(r)}${c(o)}${c(n)}${c(a)}`}const Wn="|",Uc=2,Xc=1e4,nr=new Map,sr=new Map;function Gn(i,t,e){i.size>=Xc&&i.clear(),i.set(t,e)}function Vc(i,t){return`${i}${Wn}${t}`}function Yc({text:i,font:t,maxWidth:e,textOverflow:r,ellipsis:o,forceEllipsis:n}){return[t,i,e.toFixed(Uc),r,o,n?"force":"normal"].join(Wn)}function ri(i,t,e){const r=Vc(e,t);let o=nr.get(r);return o===void 0&&(i.font=e,o=i.measureText(t).width,Gn(nr,r,o)),o}function $n(i){const t=typeof Intl<"u"?Intl.Segmenter:void 0;if(typeof t=="function"){const e=new t(void 0,{granularity:"grapheme"});return Array.from(e.segment(i),({segment:r})=>r)}return Array.from(i)}function Kc(i,t,e,r){const o=$n(t)[0]??"";return ri(i,o+r,e)}function Zc(i,t,e,r,o){const n=ri(i,o,e);if(n>r)return{text:"",didTruncate:!0,width:0};const s=$n(t);let a=0,c=s.length,d=o,h=n;for(;a<=c;){const l=Math.floor((a+c)/2),u=`${s.slice(0,l).join("")}${o}`,f=ri(i,u,e);f<=r?(d=u,h=f,a=l+1):c=l-1}return{text:d,didTruncate:!0,width:h}}function ar(i){const{ctx:t,text:e,font:r,maxWidth:o,textOverflow:n,ellipsis:s,forceEllipsis:a=!1}=i,c=Math.max(0,o);if(c<=0||e.length===0&&!(a&&n==="ellipsis"))return{text:"",didTruncate:e.length>0,width:0};const d=Yc({text:e,font:r,maxWidth:c,textOverflow:n,ellipsis:s,forceEllipsis:a}),h=sr.get(d);if(h)return h;const l=ri(t,e,r);let u;return l<=c&&!a?u={text:e,didTruncate:!1,width:l}:n==="clip"?u={text:e,didTruncate:!0,width:l}:u=Zc(t,e,r,c,s),Gn(sr,d,u),u}function Ho({ctx:i,lines:t,font:e,maxWidth:r,maxLines:o,textOverflow:n,ellipsis:s}){const a=Math.max(0,Math.floor(o)),c=Math.min(t.length,a),d=t.slice(0,c),h=t.length>c;if(n==="ellipsis"&&d.length>0){const l=d.length-1,u=d[l]??"";d[l]=ar({ctx:i,text:u,font:e,maxWidth:r,textOverflow:n,ellipsis:s,forceEllipsis:h}).text}return{lines:d,didClamp:h}}function qc(){nr.clear(),sr.clear()}const jc="14px sans-serif",Jc="black",Qc=1,tl=14,el="visible",il="clip",rl="…",ol=/(\d*\.?\d+)px/,yt="|",nl=30,sl=`${yt}precise-wrap`,al=1e4,cl=5e3,ll=/[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F\u200D\uFE0E\uFE0F\u2600-\u27BF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/,cr=new Map,lr=new Map,hr=new Map;let Oi=null;function hl(){return Oi===null&&typeof document<"u"&&(Oi=document.createElement("canvas").getContext("2d")),Oi}function Un(i,t,e,r){i.size>=r&&i.clear(),i.set(t,e)}function dl(i,t,e,r){return`${i}${yt}${t}${yt}${e??""}${yt}${r??""}`}function ul(i,t){return`${i}${yt}${t}`}function fl(i,t,e){return`${i}${yt}${t}${yt}${e}`}function Xn(i,t,e,r){return`${i}${yt}${t}${yt}${e}${yt}${r}`}class Mr extends Mt{constructor(t,e,r){super(t),this.font=jc,this.color=Jc,this.wordWrap=!1,this.lineHeight=Qc,this.overflow=el,this.textOverflow=il,this.ellipsis=rl,this.minWidthByContent=!1,this.lastMeasureKey="",this.cachedLines=null,this.cachedLinesKey="",this.lastPaintedTextWidth=0,this.text=e,r&&(r.font&&(this.font=r.font),r.fontSize!==void 0&&(this.fontSize=r.fontSize),r.lineHeightPx!==void 0&&(this.lineHeightPx=r.lineHeightPx),r.color&&(this.color=r.color),r.wordWrap!==void 0&&(this.wordWrap=r.wordWrap),r.lineHeight!==void 0&&(this.lineHeight=r.lineHeight,this.lineHeightPx=void 0),r.overflow!==void 0&&(this.overflow=r.overflow),r.textOverflow!==void 0&&(this.textOverflow=r.textOverflow),r.ellipsis!==void 0&&(this.ellipsis=r.ellipsis),r.minWidthByContent!==void 0&&(this.minWidthByContent=r.minWidthByContent),r.maxLines!==void 0&&(this.maxLines=r.maxLines),r.autoTooltip!==void 0&&(this.autoTooltip=r.autoTooltip))}measure(t){const{font:e,text:r,wordWrap:o,lineHeight:n,rect:s,fontSize:a}=this,{lineHeightPx:c}=zi(e,n,a,this.lineHeightPx);this.isSingleLineClampEnabled()?this.measureSingleLineClamp(t,e,r,c,s):o?this.measureWordWrap(t,e,r,c,s):this.measureSingleLine(t,e,r,c,s),this.minContentWidth=this.minWidthByContent&&!o&&this.overflow==="hidden"&&this.textOverflow==="ellipsis"&&r.length>0?Kc(t,r,e,this.ellipsis):void 0}measureWordWrap(t,e,r,o,n){const s=Bo(this.style.width,n.width);if(s>0){const a=this.getResolvedMaxLines(),d=!(this.overflow==="hidden"&&a!==void 0&&a>1&&Cl(r)),h=Xn(e,r,s,d);(h!==this.cachedLinesKey||this.cachedLines===null)&&(this.cachedLines=gl(t,r,e,s,d),this.cachedLinesKey=h),n.width=s;const l=a!==void 0&&this.overflow==="hidden"?Math.min(this.cachedLines.length,a):this.cachedLines.length;n.height=l*o}else n.width=de(t,r,e),n.height=o,this.cachedLines=null}measureSingleLineClamp(t,e,r,o,n){const s=Bo(this.style.width,n.width);s>0?(n.width=s,n.height=o):(n.width=de(t,r,e),n.height=o),this.cachedLines=null}measureSingleLine(t,e,r,o,n){const s=fl(e,r,o);s!==this.lastMeasureKey&&(this.lastMeasureKey=s,n.width=de(t,r,e),n.height=o),this.cachedLines=null}getLastPaintedTextWidth(){return this.lastPaintedTextWidth}measureTextWidth(t,e){return de(t,e,this.font)}onPaintLine(t,e,r,o,n,s,a){}getTooltip(){if(this.tooltip)return this.tooltip;const t=this.autoTooltip;if(!t)return;const e=typeof t=="object"?t:void 0;if(!(e?e.enabled!==!1:t===!0)||!this.computeIsTruncated())return;let o=this.text;if(e&&typeof e.text=="function"?o=e.text(this.text):e&&typeof e.text=="string"&&(o=e.text),o===null||o==="")return;if(!e)return o;const{enabled:n,text:s,...a}=e;return{...a,text:o}}computeIsTruncated(){if(this.overflow!=="hidden"||this.textOverflow!=="ellipsis")return!1;const t=hl();if(!t)return!1;const e=this.cachedLines;if(e!==null&&e.length>0){const r=this.getResolvedMaxLines();return r===void 0?!1:Ho({ctx:t,lines:e,font:this.font,maxWidth:this.rect.width,maxLines:r,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).didClamp}return ar({ctx:t,text:this.text,font:this.font,maxWidth:this.rect.width,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).didTruncate}getResolvedMaxLines(){if(this.maxLines===void 0||!Number.isFinite(this.maxLines)||this.maxLines<=0)return;const t=Math.floor(this.maxLines);return t>0?t:void 0}isSingleLineClampEnabled(){return this.wordWrap&&this.overflow==="hidden"&&this.getResolvedMaxLines()===1}isMultilineClampEnabled(){return this.wordWrap&&this.overflow==="hidden"&&this.getResolvedMaxLines()!==void 0}onPaint(t,e){const{font:r,text:o,rect:n,color:s}=this,a=this.cachedLines;a!==null&&a.length>0?this.paintMultiline(t,e,r,s,a,n):this.paintSingleLine(t,e,o,r,s,n)}paintMultiline(t,e,r,o,n,s){const{fontSize:a,lineHeightPx:c}=zi(r,this.lineHeight,this.fontSize,this.lineHeightPx),d=this.getResolvedMaxLines(),h=this.isMultilineClampEnabled()&&d!==void 0?Ho({ctx:e,lines:n,font:r,maxWidth:s.width,maxLines:d,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).lines:n,l=h.length*c;let u=s.y+Math.max(0,(s.height-l)*.5);this.lastPaintedTextWidth=0;for(let f=0,g=h.length;f<g;f+=1){const v=h[f];if(v!==void 0){const C=u+c/2;this.overflow==="hidden"?t.fillTextClipped(v,s.x,C,r,o,s,"middle","left"):t.fillText(v,s.x,C,r,o,"middle"),this.onPaintLine(t,e,v,s.x,C,a,c),u+=c}}}paintSingleLine(t,e,r,o,n,s){const a=s.y+s.height*.5,{fontSize:c,lineHeightPx:d}=zi(o,this.lineHeight,this.fontSize,this.lineHeightPx);if(this.overflow==="hidden"){const h=ar({ctx:e,text:r,font:o,maxWidth:s.width,textOverflow:this.textOverflow,ellipsis:this.ellipsis});if(this.lastPaintedTextWidth=Math.min(h.width,Math.max(0,s.width)),h.text.length===0)return;t.fillTextClipped(h.text,s.x,a,o,n,s,"middle","left"),this.onPaintLine(t,e,h.text,s.x,a,c,d);return}this.lastPaintedTextWidth=de(e,r,o),t.fillText(r,s.x,a,o,n,"middle"),this.onPaintLine(t,e,r,s.x,a,c,d)}}function zi(i,t,e,r){const o=dl(i,t,e,r);let n=cr.get(o);if(n===void 0){const s=ol.exec(i),a=e??(s&&s[1]!==void 0?Number(s[1]):tl);n={fontSize:a,lineHeightPx:r??a*t},cr.set(o,n)}return n}function de(i,t,e){const r=ul(e,t);let o=lr.get(r);return o===void 0&&(i.font=e,o=i.measureText(t).width,Un(lr,r,o,al)),o}function gl(i,t,e,r,o){i.font=e;const n=Math.max(r,nl),s=Xn(e,t,n,o);let a=hr.get(s);if(!a){const c=o?e:`${e}${sl}`;a=vl(Sa.split(i,t,c,n,o)),Un(hr,s,a,cl)}return a}function Bo(i,t){return typeof i=="number"&&i>0?i:t>0?t:0}function Cl(i){return ll.test(i)}function vl(i){if(Array.isArray(i))return i;const t=i;return t.lines&&Array.isArray(t.lines)?t.lines:[]}function Fl(){cr.clear(),lr.clear(),hr.clear(),qc()}function ml(i){return{default:{color:i.textPrimary,colorHover:i.textPrimaryHover,colorActive:i.textPrimaryActive},accent:{color:i.textAccent,colorHover:i.textAccentHover,colorActive:i.textAccentActive},secondary:{color:i.textSecondary,colorHover:i.textSecondaryHover,colorActive:i.textSecondaryActive},tertiary:{color:i.textTertiary,colorHover:i.textTertiaryHover,colorActive:i.textTertiaryActive},paragraph:{color:i.textParagraph,colorHover:i.textParagraphHover,colorActive:i.textParagraphActive},positive:{color:i.textPositive,colorHover:i.textPositiveHover,colorActive:i.textPositiveActive},warning:{color:i.textWarning,colorHover:i.textWarningHover,colorActive:i.textWarningActive},negative:{color:i.textNegative,colorHover:i.textNegativeHover,colorActive:i.textNegativeActive},clear:{color:i.textPrimary,colorHover:i.textPrimaryHover,colorActive:i.textPrimaryActive}}}const pl="default",Wi="pointer",yl=.4,bl=2,ko=1;class Vn extends Mr{constructor(t,e,r){var o;super(t,e,r),this.view=pl,this.disabled=!1,this.isHovered=!1,this.isActive=!1,this.hasCustomColor=!1,super.style={...super.style,cursor:Wi},r&&(this.href=r.href,this.target=r.target,this.rel=r.rel,r.view!==void 0&&(this.view=r.view),r.disabled!==void 0&&(this.disabled=r.disabled),this.hasCustomColor=r.color!==void 0,(o=r.theme)!=null&&o.tokens&&(this.viewColors=ml(r.theme.tokens))),!this.hasCustomColor&&this.viewColors&&(this.color=this.viewColors[this.view].color)}set style(t){super.style={...super.style,cursor:Wi,...t}}get style(){const t=super.style;return t.cursor=this.disabled?"not-allowed":Wi,t}setOnClick(t){this.customClickHandler=t}resolveColor(){let t;if(this.hasCustomColor||!this.viewColors)t=this.color;else{const e=this.viewColors[this.view];this.isActive?t=e.colorActive:this.isHovered?t=e.colorHover:t=e.color}return this.disabled&&(t=$c(t,yl)),t}onPaint(t,e){const r=this.color;this.color=this.resolveColor();try{super.onPaint(t,e)}finally{this.color=r}}onPaintLine(t,e,r,o,n,s,a){const{view:c,isHovered:d}=this;if(!(c==="default"||c==="clear"||!this.disabled&&d)||r.length===0)return;const u=this.measureTextWidth(e,r);if(u<=0)return;const f=n+Math.min(s/2+bl,a/2-ko/2),{color:g}=this,v=this.overflow==="hidden"?{...this.rect}:void 0;t.custom(C=>{C.save(),v&&(C.beginPath(),C.rect(v.x,v.y,v.width,v.height),C.clip()),C.beginPath(),C.moveTo(o,f),C.lineTo(o+u,f),C.strokeStyle=g,C.lineWidth=ko,C.lineCap="butt",C.stroke(),C.restore()})}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1,this.isActive=!1}onMouseDown(){this.disabled||(this.isActive=!0)}onMouseUp(){this.isActive=!1}onClick(t){if(this.disabled)return;let e=!1;const r=t.preventDefault;t.preventDefault=()=>{e=!0,r.call(t)},!(this.customClickHandler&&(this.customClickHandler(t),e))&&this.navigate()}navigate(){if(!this.href)return;const t=this.target||"_self";if(t==="_self")window.location.href=this.href;else{const e=this.rel??(t==="_blank"?"noopener,noreferrer":void 0);window.open(this.href,t,e)}}}const ue="transparent",Al=0;class Yn extends vt{constructor(t,e=ue){super(t),this.color=ue,this.borderColor=ue,this.borderWidth=Al,this.color=e}measure(t){const{style:e,rect:r}=this;typeof e.width=="number"&&(r.width=e.width),typeof e.height=="number"&&(r.height=e.height)}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect;if(this.color!==ue&&t.fillRect(r,o,n,s,this.color),this.borderWidth>0&&this.borderColor!==ue){const a=this.borderWidth/2;t.strokeRect(r+a,o+a,n-this.borderWidth,s-this.borderWidth,this.borderColor,this.borderWidth)}}}const Ce={250:15.625,32:2,28:1.75,24:1.5,20:1.25,18:1.125,16:1,14:.875,12:.75,8:.5,0:0},Lo=16,fe=16,Kn=90,Po="rgba(8, 8, 8, 0.08)",Dl=4e3,xl=1920,El="linear-gradient( 90deg, rgba(8, 8, 8, 0.09) 0%, rgba(8, 8, 8, 0.08) 6.25%, rgba(8, 8, 8, 0.05) 12.5%, rgba(8, 8, 8, 0.01) 25%, rgba(8, 8, 8, 0.05) 37.5%, rgba(8, 8, 8, 0.08) 43.75%, rgba(8, 8, 8, 0.09) 50%, rgba(8, 8, 8, 0.08) 56.25%, rgba(8, 8, 8, 0.05) 62.5%, rgba(8, 8, 8, 0.01) 75%, rgba(8, 8, 8, 0.05) 87.5%, rgba(8, 8, 8, 0.08) 93.75%, rgba(8, 8, 8, 0.09) 100% )",Sl="linear-gradient( 90deg, rgba(8, 8, 8, 0.36) 0%, rgba(8, 8, 8, 0.32) 6.25%, rgba(8, 8, 8, 0.20) 12.5%, rgba(8, 8, 8, 0.04) 25%, rgba(8, 8, 8, 0.20) 37.5%, rgba(8, 8, 8, 0.32) 43.75%, rgba(8, 8, 8, 0.36) 50%, rgba(8, 8, 8, 0.08) 56.25%, rgba(8, 8, 8, 0.20) 62.5%, rgba(8, 8, 8, 0.04) 75%, rgba(8, 8, 8, 0.20) 87.5%, rgba(8, 8, 8, 0.32) 93.75%, rgba(8, 8, 8, 0.36) 100% )";let Io=null;const wl={right:90,left:270,top:0,bottom:180,"top right":45,"right top":45,"bottom right":135,"right bottom":135,"bottom left":225,"left bottom":225,"top left":315,"left top":315};class Zn extends vt{constructor(t,e){super(t),this._gradientStops=null,this._gradientAngle=Kn;const r=(e==null?void 0:e.customGradientColor)??(e!=null&&e.lighter?Sl:El),o=kl(r);o&&(this._gradientStops=o.stops,this._gradientAngle=o.angle),this.borderRadius=Tl(e==null?void 0:e.roundness),this.animated=(e==null?void 0:e.animated)??!0,this.shimmerDuration=(e==null?void 0:e.shimmerDuration)??Dl}measure(t){const{style:e,rect:r}=this;typeof e.width=="number"&&(r.width=e.width),typeof e.height=="number"&&(r.height=e.height)}onPaint(t,e){var f;const{x:r,y:o,width:n,height:s}=this.rect;if(n<=0||s<=0)return;const{_gradientStops:a,borderRadius:c}=this;if(!a||a.length<2){c>0?t.roundedRect(r,o,n,s,c,{fillStyle:Po}):t.fillRect(r,o,n,s,Po);return}const d=t.getAnimationContext(),h=d==null?void 0:d.frameTime;if(!this.animated||h===void 0){t.linearGradientRect(r,o,n,s,c,a,this._gradientAngle);return}Io??(Io=h);const u=(h-Io)%this.shimmerDuration/this.shimmerDuration;t.custom(g=>{g.save(),g.beginPath(),c>0?g.roundRect(r,o,n,s,c):g.rect(r,o,n,s),g.clip();const{startX:v,startY:C,endX:m,endY:p}=Ll(r,o,s,u),A=g.createLinearGradient(v,C,m,p);for(const y of a)A.addColorStop(y.offset,y.color);g.fillStyle=A,g.fillRect(r,o,n,s),g.restore()}),(f=d==null?void 0:d.requestAnimationFrame)==null||f.call(d)}}function Ro(i){return i in Ce}function Tl(i){if(i===void 0)return Ce[Lo]*fe;if(typeof i=="number")return Ro(i)?Ce[i]*fe:i;const t=i.trim(),e=Number(t);if(!Number.isNaN(e))return Ro(e)?Ce[e]*fe:e;const r=t.match(/^(-?\d+(?:\.\d+)?)px$/i);if(r){const[,n]=r;return parseFloat(n)}const o=t.match(/^(-?\d+(?:\.\d+)?)rem$/i);if(o){const[,n]=o;return parseFloat(n)*fe}return Ce[Lo]*fe}function Hl(i){var r;const t=i.trim(),e=t.match(/^var\s*\(\s*[^,]+,\s*([\s\S]+)\s*\)$/i);return((r=e==null?void 0:e[1])==null?void 0:r.trim())??t}function Bl(i,t){switch(t.toLowerCase()){case"rad":return i*180/Math.PI;case"turn":return i*360;case"grad":return i*180/200;default:return i}}function kl(i){const e=Hl(i).match(/^linear-gradient\s*\(([\s\S]+)\)$/i);if(!(e!=null&&e[1]))return null;const r=[];let o="",n=0;for(const u of e[1])u==="("&&n++,u===")"&&n--,u===","&&n===0?(r.push(o.trim()),o=""):o+=u;o.trim()&&r.push(o.trim());const[s]=r;if(r.length<2||!s)return null;let a=Kn,c=0;const d=s.match(/^(-?\d+(?:\.\d+)?)(deg|rad|turn|grad)?$/i);if(d!=null&&d[1]){const[,u,f="deg"]=d;a=Bl(parseFloat(u),f),c=1}else if(s.startsWith("to ")){const u=s.substring(3).trim().toLowerCase(),f=wl[u];f!==void 0&&(a=f,c=1)}const h=[],l=r.slice(c);for(let u=0;u<l.length;u++){const f=l[u];if(!f)continue;const g=f.trim().match(/^(#[0-9a-fA-F]{3,8}|rgba?\s*\([^)]+\)|hsla?\s*\([^)]+\)|[a-zA-Z]+)(?:\s+(-?\d+(?:\.\d+)?)(%))?$/);if(!(g!=null&&g[1]))continue;const[,v,C,m]=g,p=m==="%"?parseFloat(C)/100:l.length>1?u/(l.length-1):0;h.push({offset:Math.max(0,Math.min(1,p)),color:v})}return h.length<2?null:{stops:h,angle:a}}function Ll(i,t,e,r){const o=xl,n=r*o,s=i-o+n,a=i+o+n,c=t+e/2;return{startX:s,startY:c,endX:a,endY:c}}let ve=0;const oi=new Set;function Pl(){ve++,ve===1&&oi.forEach(t=>t(!0));let i=!1;return()=>{i||(i=!0,ve--,ve===0&&oi.forEach(t=>t(!1)))}}function Il(){return ve>0}function Rl(i){return oi.add(i),()=>{oi.delete(i)}}const ni="basic-grid-canvas-portal-hover",Ml=400;let _l=0;const Gi="__canvasPortalTargetId";function Nl(i){var r;if(!i)return"window";const t=i;if((r=t.dataset)!=null&&r.portalTargetId)return t.dataset.portalTargetId;const e=i;return e[Gi]||(e[Gi]=++_l),String(e[Gi])}const te=new Map;function Ol(i,t){return`${i??"default"}:${t??"default"}`}function dr(i,t){const e=new CustomEvent(ni,{detail:i});t?t.dispatchEvent(e):window.dispatchEvent(e)}function Mo(i){const t=te.get(i);t!==void 0&&(window.clearTimeout(t),te.delete(i))}function zl(i){const t=`${i}:`;for(const[e,r]of te.entries())e.startsWith(t)&&(window.clearTimeout(r),te.delete(e))}function Wl(i,t,e){const r=window.setTimeout(()=>{te.delete(i),dr(t,e)},Ml);te.set(i,r)}function Zt(i,t,e){if(typeof window>"u")return;const r=Nl(t),o=`${r}:${Ol(i.source,i.originId)}`;i.visible?(zl(r),dr(i,t)):e?(Mo(o),dr(i,t)):(Mo(o),Wl(o,i,t))}function Gl(i,t){if(typeof window>"u")return()=>{};const e=t??window,r=o=>{const n=o;n.detail&&i(n.detail)};return e.addEventListener(ni,r),()=>{e.removeEventListener(ni,r)}}const $l="cell";class bt{constructor(t,e){this.bounds=null,this.batcher=new fi,this.portalEventTarget=null,this.tooltipContext=void 0,this.rootNode=t,this.hoverController=new pr({onCursorChange:r=>{var o;return(o=this.onCursorChange)==null?void 0:o.call(this,r)},portalHoverDispatch:Zt,getPortalEventTarget:()=>this.portalEventTarget,portalSource:$l,getTooltipContext:()=>this.tooltipContext})}setPortalEventTarget(t){this.portalEventTarget=t}setTooltipContext(t){this.tooltipContext=t}setRootNode(t){this.rootNode=t}setOriginId(t){}render(t,e,r,o,n,s){this.bounds={...o??e},this.hoverController.setAbsoluteBounds(this.bounds),t.save(),t.translate(e.x,e.y),this.prepareRootNode(t,e),r?this.dispatchPointerEvent("mousemove",r.x,r.y):this.handleMouseLeave(),this.batcher.clear(),this.batcher.setAnimationContext(n),this.batcher.imageResources=s,this.batcher.imageTransitions.beginFrame(s);try{this.rootNode.paint(this.batcher,t),this.batcher.flush(t)}finally{this.batcher.imageTransitions.endFrame()}t.restore()}dispatchPointerEvent(t,e,r,o){var h;if(!this.bounds)return{propagationStopped:!1,suppressGridDefault:!1};const n=this.rootNode.hitTest(e,r),s=(h=n.find(l=>l.interaction!==void 0))==null?void 0:h.interaction;let a=!1,c=!1;const d={type:t,x:e,y:r,originalEvent:o??{},target:n[0],stopPropagation:()=>{a=!0},preventDefault:()=>{c=!0,o==null||o.preventDefault()}};return n.length===0?(t==="mousemove"&&this.hoverController.handlePointerMove([],null),{propagationStopped:!1,suppressGridDefault:c,...s?{interaction:s}:{}}):(this.dispatchEventToNodes(n,d,t),t==="mousemove"&&this.hoverController.handlePointerMove(n,d),{propagationStopped:a,suppressGridDefault:c,...s?{interaction:s}:{}})}getInteractionAtPoint(t,e){var r;if(this.bounds)return(r=this.rootNode.hitTest(t,e).find(o=>o.interaction))==null?void 0:r.interaction}dispatchEventToNodes(t,e,r){let o=!1;const n={...e,stopPropagation:()=>{o=!0,e.stopPropagation()}};for(const s of t){if(o)break;const a={...n,currentTarget:s};this.invokeNodeHandler(s,r,a)}}invokeNodeHandler(t,e,r){switch(e){case"click":t.onClick({...r,cellBounds:this.bounds});break;case"mousedown":t.onMouseDown(r);break;case"mouseup":t.onMouseUp(r);break;case"dblclick":t.onDoubleClick(r);break;case"mousemove":t.onMouseMove(r);break;case"mouseenter":t.onMouseEnter(r);break;case"mouseleave":t.onMouseLeave(r);break}}handleMouseLeave(){this.hoverController.handlePointerLeave()}prepareRootNode(t,e){this.rootNode.rect.x=0,this.rootNode.rect.y=0,this.rootNode.rect.width=e.width,this.rootNode.rect.height=e.height,this.rootNode instanceof dt?this.rootNode.performLayout(t):this.rootNode.measure(t)}computeCursor(t,e){return this.hoverController.computeCursor(t,e,this.rootNode)}getCurrentCursor(){return this.hoverController.getCurrentCursor()}forcePortalHide(){this.hoverController.handlePortalReset()}}const Fi="canvas-cell";function qn(i,t,e,r){return{kind:I.GridCellKind.Custom,allowOverlay:!1,readonly:!0,copyData:e??"",data:{kind:Fi,render:i,onClick:t},...r}}function _r(i){var e;const t=i;return!!(t&&t.kind===I.GridCellKind.Custom&&((e=t.data)==null?void 0:e.kind)===Fi)}const Fe=5,jn=[["hoverX","hoverY"],["mouseX","mouseY"],["pointerX","pointerY"],["posX","posY"],["x","y"]],Jn="default",Qn="pointer";function ts(i,t){for(const[e,r]of jn){const o=i[e],n=i[r];if(typeof o=="number"&&typeof n=="number"&&!Number.isNaN(o)&&!Number.isNaN(n)){if(es(o,n,t))return{x:o-t.x,y:n-t.y};if(is(o,n,t))return{x:o,y:n}}}}function es(i,t,e){return i>=e.x&&i<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}function is(i,t,e){return i>=-Fe&&i<=e.width+Fe&&t>=-Fe&&t<=e.height+Fe}function rs(i,t,e){if((i==null?void 0:i.canvasRoot)instanceof bt){const r=e?"nativeEvent"in e?e.nativeEvent:e:void 0;return i.canvasRoot.dispatchPointerEvent("click",t.x,t.y,r)}return{propagationStopped:!1,suppressGridDefault:!1}}function os(i,t){if(i!=null&&i.clickHandlers&&Array.isArray(i.clickHandlers)){for(const{area:e,handler:r}of i.clickHandlers)if(Pr(t.x,t.y,e))return r(),!0}return!1}function ns(i,t,e,r,o,n){const{onClick:s}=i.data;return s?!!s(t.x,t.y,e,r,o,n??void 0):!1}const ur=new WeakMap,ss=new Map;function as(i,t,e){const r={...e??{}};return delete r.hoveredAreas,ss.set(i,r),t.data.renderData=r,r}function Qt(i,t){return t.data.renderData??ss.get(i)}function cs(i,t){var r,o;(((r=ur.get(i))==null?void 0:r.hovered)??!1)!==t&&(ur.set(i,{hovered:t}),t?(o=i.onMouseEnter)==null||o.call(i):Ul(i))}function Ul(i){const{renderData:t}=i;(t==null?void 0:t.canvasRoot)instanceof bt&&t.canvasRoot.forcePortalHide()}function ls(i){var t;return(t=ur.get(i))==null?void 0:t.hovered}function hs(i,t,e,r){var o;if(i instanceof bt)if(t){if(e.event){const s="nativeEvent"in e.event?e.event.nativeEvent:e.event;i.dispatchPointerEvent("mousemove",t.x,t.y,s)}const n=i.computeCursor(t.x,t.y);n&&n!==Jn&&((o=r.overrideCursor)==null||o.call(r,n))}else i.handleMouseLeave(),i.forcePortalHide()}function ds(i,t,e,r,o){var c;const n=!!(t&&e.some(d=>Pr(t.x,t.y,d))),s=ls(i)??!1,a=!!t;a!==s&&cs(i,a),n&&!r&&((c=o.overrideCursor)==null||c.call(o,Qn))}function Nr({cell:i,rect:t,relativePoint:e,renderData:r,rowData:o,rowIndex:n,event:s}){const a=rs(r,e,s);return a.propagationStopped?{handled:!0,propagationStopped:!0,suppressGridDefault:a.suppressGridDefault}:os(r,e)?{handled:!0,propagationStopped:!1,suppressGridDefault:a.suppressGridDefault}:ns(i,e,t,o,n,r)?{handled:!0,propagationStopped:!1,suppressGridDefault:a.suppressGridDefault}:{handled:!1,propagationStopped:!1,suppressGridDefault:a.suppressGridDefault}}function us(i){const t=i.selection==="keep",e=i.cellClick==="stop",r=i.editor==="never",o=i.contextMenu==="keep-selection"?"manual-keep-selection":i.contextMenu==="none"?"none":"normal";return{suppressEarlyGridSelect:t,suppressExternalCellClick:e,suppressGridDefaultFor:{pointerdown:t,click:r,contextmenu:o!=="normal"},contextMenuMode:o,...i.editor==="open-on-click"?{editorRequest:{target:"self"}}:{}}}function Xl({decision:i,propagationStopped:t,suppressGridDefault:e}){const r=i.suppressGridDefaultFor.click||e,o={suppressExternalCellClick:i.suppressExternalCellClick||t,suppressGridDefaultForClick:r};return!r&&i.editorRequest&&(o.editorRequest=i.editorRequest),o}function fs({renderData:i,relativePoint:t}){const e=(i==null?void 0:i.canvasRoot)instanceof bt?i.canvasRoot.getInteractionAtPoint(t.x,t.y):void 0;return e?{handled:!0,suppressEarlyGridSelect:us(e).suppressEarlyGridSelect,interaction:e}:{handled:!1,suppressEarlyGridSelect:!1}}function Or(i={}){return{kind:I.GridCellKind.Custom,isMatch:t=>{var e;return((e=t.data)==null?void 0:e.kind)===Fi},needsHover:!0,needsHoverPosition:!0,onSelect:t=>{var u;const e=t.cell,r=t.bounds,o=er(t);if(!o)return;const n=ir(o,r),s=Je(t),a=Jt(s,r),c=Qt(a,e),d=fs({renderData:c,relativePoint:n}),h=t.location??[s.colIndex,s.rowIndex],l=d.interaction&&i.beginOrGetInteractionSession?i.beginOrGetInteractionSession({cell:h,relativePoint:n,interaction:d.interaction,source:"pointer",...t.button!==void 0?{button:t.button}:{}}):void 0;(l!=null&&l.decision.suppressEarlyGridSelect||d.suppressEarlyGridSelect)&&((u=t.preventDefault)==null||u.call(t))},onClick:t=>{var u,f;const e=t.cell,r=t.bounds,o=er(t);if(!o)return;const n=ir(o,r),s=Je(t),a=Jt(s,r),c=Qt(a,e),d=t.location??[s.colIndex,s.rowIndex],l=((u=i.consumeCanvasClickResult)==null?void 0:u.call(i,{cell:d,relativePoint:n,...t.button!==void 0?{button:t.button}:{}}))??Nr({cell:e,rect:r,relativePoint:n,renderData:c,rowData:t.row??t.rowData,rowIndex:s.rowIndex,event:t.event});l.suppressGridDefault&&((f=t.preventDefault)==null||f.call(t)),l.handled},draw:(t,e)=>{const{ctx:r,rect:o,theme:n}=t,{render:s}=e.data,a=t.cellFillColor!==void 0?{...n,bgCell:t.cellFillColor}:n,c=Je(t),d=Jt(c,o),h={hoverX:t.hoverX,hoverY:t.hoverY,row:t.row,imageResources:t.imageLoader&&typeof t.col=="number"&&typeof t.row=="number"?{loader:t.imageLoader,colIndex:t.col,rowIndex:t.row}:void 0,rowData:t.rowData,event:t.event,frameTime:t.frameTime,requestAnimationFrame:t.requestAnimationFrame},l=En(t.hoverX,t.hoverY,o)??ts(h,o);r.save();const u=Qt(d,e),f=s(r,o,a,l==null?void 0:l.x,l==null?void 0:l.y,{...h,canvasRoot:u==null?void 0:u.canvasRoot}),g=(f==null?void 0:f.hoveredAreas)??[];as(d,e,f);const v=(f==null?void 0:f.canvasRoot)??(u==null?void 0:u.canvasRoot);hs(v,l,h,t),ds(e.data,l,g,v,t),r.restore()},onPaste:()=>{}}}const Vl=Or(),si=new Map;function gs(i){const t=Yl(i),e=si.get(t);if(e)return e;const o=wa.renderToString(i).match(/<svg[\s\S]*?<\/svg>/);if(!o)return console.warn("Could not extract SVG from React icon component:",i.type),"";const n=o[0];return si.set(t,n),n}function Yl(i){const t=i.type,e=typeof t=="function"||typeof t=="object"?t.displayName||t.name||"Anonymous":String(t),{size:r,color:o,className:n}=i.props||{},s=JSON.stringify({size:r,color:o,className:n});return`${e}:${s}`}function xt(i){return F.isValidElement(i)}function pt(i){return typeof i=="string"?i:xt(i)?gs(i):""}function Kl(){si.clear()}function Zl(){return si.size}const fr=i=>{if(i===void 0)return;if(typeof i=="number")return i;const t=i.trim();if(t==="100%")return"100%";const e=t.match(/^(-?\d+(?:\.\d+)?)px$/i);if(e)return Number(e[1]);const r=t.match(/^(-?\d+(?:\.\d+)?)rem$/i);if(r)return Number(r[1])*16;const o=Number(t);if(!Number.isNaN(o))return o},_o={small:{radius:4,stroke:1.5},medium:{radius:4,stroke:1.5},big:{radius:6,stroke:2}};function ql(i,t,e,r,o,n,s,a,c,d,h=!1,l=!1){const f=s-0,v=Math.min(f-0,br),C=n==="auto"?v:n,m=e+0,p=(c==null?void 0:c.rowSize)||"medium",A=!r&&!o,y=_t(l,{x:t,y:e,width:C,height:s}),E=hc(c,r,o,y,h),D=t+C*.5,S=m+f*.5,H=D-v*.5,B=S-v*.5;return i.roundedRect(t,m,C,f,_o[p].radius,{fillStyle:E.bgColor,strokeStyle:E.borderColor,lineWidth:A?_o[p].stroke:void 0}),Ct(i,a,H,B,v,E.iconColor),{x:t,y:m,width:C,height:f}}const jl=28,Jl="default",Ql="s",No="pointer",th=20,gr={indeterminateIcon:'<svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" fill="none"><path stroke-linecap="round" stroke-width="2" stroke="currentColor" d="m5.09449,9.0315l8,0"></path></svg>',checkedIcon:'<svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" fill="none"><path fill="currentColor" d="m5.70711,8.15582c-0.39053,-0.39052 -1.02369,-0.39052 -1.41422,0c-0.39052,0.39053 -0.39052,1.02369 0,1.41422l3.70666,3.70666l6.71095,-6.70248c0.3908,-0.39027 0.3912,-1.02344 0.0009,-1.41421c-0.3903,-0.39077 -1.02344,-0.39117 -1.41421,-0.00089l-5.29674,5.29004l-2.29334,-2.29334z"></path></svg>'},eh=Object.values(gr),ih={accentColor:"#1e88e5",accentFg:"#ffffff"};class rh extends vt{constructor(t,e,r=!1,o=!1,n){super(t),this.view=Jl,this.buttonSize=Ql,this.isHovered=!1,this.useNewApi=!1,this.icon=e,this.checked=r,this.indeterminate=o,this.size=(n==null?void 0:n.size)??"auto",this.theme=n==null?void 0:n.theme,this.view=(n==null?void 0:n.view)??"primary",this.disabled=(n==null?void 0:n.disabled)??!1,super.style={...super.style,cursor:this.disabled?"auto":No},!this.disabled&&(n!=null&&n.onClick)&&(this.onClick=s=>{var a;return(a=n.onClick)==null?void 0:a.call(n,s)})}set style(t){super.style={...super.style,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=No),t}measure(t){if(this.useNewApi){const e=at[this.buttonSize];this.rect.height=e.height,this.rect.width=e.height}else{const e=oh(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect;ql(t,r,o,this.checked,this.indeterminate,n,s,this.icon,this.theme??ih,this.view,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}}function oh(i,t){const e=typeof i=="number"?i:jl,r=0,o=ee,n=Math.min(e-o*2-ie,th),s=typeof i=="number"?i:n+r*2;return{height:e,width:s,paddingX:r,paddingY:o,iconSize:n}}const nh=({backgroundColor:i,__backgroundColorResolver:t},e)=>(t==null?void 0:t(e))??i,lt=i=>{const t=e=>null;return t.__canvasType=i,t},sh=F.memo(({cellId:i,renderContent:t,nodeRegistry:e,onRegistryChange:r})=>{const o=t(),n=F.useRef(null);return F.useLayoutEffect(()=>{const s=e.current,a=n.current;a&&a!==i&&s.delete(a);const c=s.get(i),d=c!==void 0;s.set(i,o),d&&c!==o&&(r==null||r()),n.current=i},[i,o,e,r]),F.useLayoutEffect(()=>()=>{const s=e.current;n.current&&(s.delete(n.current),n.current=null)},[e]),null}),ah=lt("Skeleton"),ch=lt("Container"),lh=lt("Text"),hh=lt("Icon"),dh=lt("Button"),uh=lt("IconButton"),fh=lt("EmbedIconButton"),gh=lt("Rect"),Ch=lt("Badge"),vh=lt("Checkbox"),Fh=lt("Link"),me={Image:lt("Image"),Avatar:lt("Avatar"),AvatarGroup:lt("AvatarGroup"),Container:ch,Text:lh,Icon:hh,Button:dh,IconButton:uh,EmbedIconButton:fh,Checkbox:vh,Rect:gh,Badge:Ch,Skeleton:ah,Link:Fh,icon:pt};function ht(i,t){if(i)return function(e){i.call(this,e)}}function ai({element:i,idPrefix:t="root",theme:e}){const r=[],o=Cs(i,t,0,r,e);if(r.length>0){const n=new Map;for(const{icon:s,size:a}of r){if(!s)continue;const c=n.get(a)??[];c.push(s),n.set(a,c)}n.forEach((s,a)=>{Bn(s,{size:a})})}return o}function Cr(i){return i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)?i.map(Cr).join(""):""}function Oo(i,t,e){const r=i.fontMetrics,o=i.fonts;if(r===void 0||o===void 0)return{};const n=t??i.baseFontStyle,s=Object.keys(o).find(c=>o[c]===n);if(s===void 0)return{};const a=r[s];return a===void 0?{}:{fontSize:a.fontSize,...e===void 0?{lineHeightPx:a.lineHeightPx}:{}}}function Cs(i,t,e,r,o){if(!i||!F.isValidElement(i))throw new Error("Invalid element. Use Canvas.* components.");const n=i.type,s=n.__canvasType;if(!s)throw new Error(`Unknown canvas component. Use Canvas.* components. Got: ${(n==null?void 0:n.name)||n}`);const a=i.props,d=(i.key!=null?String(i.key):null)??e,h=a.id??`${t}-${s.toLowerCase()}-${d}`,l=g=>xt(g)?pt(g):g;if(s==="Icon"&&a.icon)r.push({icon:l(a.icon),size:a.size??16});else if(s==="IconButton"&&a.icon){const g=a.buttonSize??"s",{iconSize:v}=at[g];r.push({icon:l(a.icon),size:v})}else if(s==="EmbedIconButton"&&a.icon){const g=a.buttonSize??"s",v=a.overrideIconSize??at[g].iconSize;r.push({icon:l(a.icon),size:v})}else if(s==="Checkbox")eh.forEach(g=>{r.push({icon:l(g),size:20})});else if(s==="Button"){const g=a.size??"s",{iconSize:v}=at[g];a.leftIcon&&r.push({icon:l(a.leftIcon),size:v}),a.rightIcon&&r.push({icon:l(a.rightIcon),size:v})}else if(s==="Badge"){const g=a.size??"s",C={xs:10,s:12,m:14,l:16}[g]??12;a.leftIcon&&r.push({icon:l(a.leftIcon),size:C}),a.rightIcon&&r.push({icon:l(a.rightIcon),size:C})}const u=mh(s,h,a,o);if(a.portalHoverEnabled&&(u.portalHoverEnabled=!0),a.tooltip!==void 0&&(u.tooltip=a.tooltip),a.autoTooltip!==void 0){const g=a.autoTooltip;(g===!0||typeof g=="object"&&g!==null&&g.enabled!==!1)&&(u.portalHoverEnabled=!0)}a.interaction!==void 0&&(u.interaction=ln(a.interaction)),typeof a.zIndex=="number"&&(u.zIndex=a.zIndex),a.style&&(u.style=a.style);const{children:f}=a;return f&&u instanceof dt&&F.Children.toArray(f).forEach((v,C)=>{if(F.isValidElement(v)){const m=Cs(v,h,C,r,o);u.addChild(m)}}),u}function $i(i,t,e){if(t.children!==void 0)throw new Error(`Canvas.${e} does not accept children`);t.position&&(i.position=t.position),t.left!==void 0&&(i.left=t.left),t.top!==void 0&&(i.top=t.top),t.right!==void 0&&(i.right=t.right),t.bottom!==void 0&&(i.bottom=t.bottom);for(const r of["onClick","onMouseEnter","onMouseLeave"]){const o=ht(t[r]);if(o){const n=i[r].bind(i);i[r]=s=>{n(s),o.call(i,s)}}}return t.tooltip!==void 0&&(i.portalHoverEnabled=!0),t.onClick&&(i.style={...i.style,cursor:"pointer"}),i}function mh(i,t,e,r){switch(i){case"Image":return $i(new Rr(t,e),e,i);case"Avatar":return $i(new ye(t,{...e,theme:r}),e,i);case"AvatarGroup":return $i(new yr(t,{...e,theme:r}),e,i);case"Container":{const o=e,{id:n,gap:s,columnGap:a,rowGap:c,position:d,left:h,top:l,right:u,bottom:f,zIndex:g,onClick:v,onMouseEnter:C,onMouseLeave:m,onMouseDown:p,backgroundColor:A,__backgroundColorResolver:y,portalHoverEnabled:E,...D}=o,S={...D,columnGap:a??s??0,rowGap:c??s??0},H=new dt(t,S,nh(o,r));d&&(H.position=d),h!==void 0&&(H.left=h),l!==void 0&&(H.top=l),u!==void 0&&(H.right=u),f!==void 0&&(H.bottom=f);const B=ht(v),M=ht(C),G=ht(m),V=ht(p);return B&&(H.onClick=B),M&&(H.onMouseEnter=M),G&&(H.onMouseLeave=G),V&&(H.onMouseDown=V),H}case"Text":{const{children:o,font:n,color:s,wordWrap:a,lineHeight:c,overflow:d,textOverflow:h,ellipsis:l,maxLines:u,autoTooltip:f,minWidthByContent:g,position:v,left:C,top:m,right:p,bottom:A,portalHoverEnabled:y}=e,E=Cr(o),D=r.fontFamily||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';let S;n?S=/["']|sans-serif|serif|monospace/i.test(n)?n:`${n} ${D}`:S=r.baseFontStyle?`${r.baseFontStyle} ${D}`:`13px ${D}`;const H=Oo(r,n,c),B=new Mr(t,E,{font:S,...H,color:s,wordWrap:a,lineHeight:c,overflow:d,textOverflow:h,ellipsis:l,maxLines:u,autoTooltip:f,minWidthByContent:g});return v&&(B.position=v),C!==void 0&&(B.left=C),m!==void 0&&(B.top=m),p!==void 0&&(B.right=p),A!==void 0&&(B.bottom=A),B}case"Icon":{const{icon:o,size:n,color:s,backgroundColor:a,position:c,left:d,top:h,right:l,bottom:u,onClick:f,onMouseEnter:g,onMouseLeave:v,onMouseDown:C}=e,m=xt(o)?pt(o):o,p=new On(t,m,{size:n,color:s});a&&(p.backgroundColor=a),c&&(p.position=c),d!==void 0&&(p.left=d),h!==void 0&&(p.top=h),l!==void 0&&(p.right=l),u!==void 0&&(p.bottom=u);const A=ht(f),y=ht(g),E=ht(v),D=ht(C);return A&&(p.onClick=A),y&&(p.onMouseEnter=y),E&&(p.onMouseLeave=E),D&&(p.onMouseDown=D),p}case"Button":{const{children:o,variant:n,view:s,size:a,leftIcon:c,rightIcon:d,disabled:h,position:l,left:u,top:f,right:g,bottom:v,onClick:C}=e,m=typeof o=="string"?o:"",p=xt(c)?pt(c):c,A=xt(d)?pt(d):d,y=new Nn(t,m,{variant:n,view:s,size:a,leftIcon:p,rightIcon:A,disabled:h,theme:r});if(l&&(y.position=l),u!==void 0&&(y.left=u),f!==void 0&&(y.top=f),g!==void 0&&(y.right=g),v!==void 0&&(y.bottom=v),!h){const E=ht(C);E&&(y.onClick=E)}return y}case"EmbedIconButton":case"IconButton":{const{icon:o,size:n,variant:s,view:a,buttonSize:c,overrideSquareSize:d,overrideIconSize:h,disabled:l,position:u,left:f,top:g,right:v,bottom:C,onClick:m}=e,p=xt(o)?pt(o):o,A=i==="IconButton"?zn:or,y=new A(t,p,{size:n,variant:s,view:a,buttonSize:c,overrideSquareSize:d,overrideIconSize:h,disabled:l});if(y instanceof or){const{iconColor:E,iconColorHovered:D,overrideWidth:S}=e;S!==void 0&&(y.overrideWidth=S),E!==void 0&&(y.iconColor=E),D!==void 0&&(y.iconColorHovered=D)}if(u&&(y.position=u),f!==void 0&&(y.left=f),g!==void 0&&(y.top=g),v!==void 0&&(y.right=v),C!==void 0&&(y.bottom=C),!l){const E=ht(m);E&&(y.onClick=E)}return y}case"Checkbox":{const{checked:o,indeterminate:n,size:s="auto",theme:a,view:c,buttonSize:d,disabled:h,position:l,left:u,top:f,right:g,bottom:v,onClick:C}=e,m=pt(o?gr.checkedIcon:gr.indeterminateIcon),p=new rh(t,m,o,n,{size:s,theme:a??r,view:c,buttonSize:d,disabled:h});if(l&&(p.position=l),u!==void 0&&(p.left=u),f!==void 0&&(p.top=f),g!==void 0&&(p.right=g),v!==void 0&&(p.bottom=v),!h){const A=ht(C);A&&(p.onClick=A)}return p}case"Rect":{const{color:o,borderColor:n,borderWidth:s,position:a,left:c,top:d,right:h,bottom:l}=e,u=new Yn(t,o);return n&&(u.borderColor=n),s&&(u.borderWidth=s),a&&(u.position=a),c!==void 0&&(u.left=c),d!==void 0&&(u.top=d),h!==void 0&&(u.right=h),l!==void 0&&(u.bottom=l),u}case"Badge":{const{text:o,view:n,size:s,transparent:a,clear:c,leftIcon:d,rightIcon:h,customColor:l,customBackgroundColor:u,position:f,left:g,top:v,right:C,bottom:m,portalHoverEnabled:p,pilled:A}=e,y=xt(d)?pt(d):d,E=xt(h)?pt(h):h,D=new _n(t,o,{view:n,size:s,transparent:a,clear:c,leftIcon:y,rightIcon:E,pilled:A,customColor:l,customBackgroundColor:u,theme:r});return f&&(D.position=f),g!==void 0&&(D.left=g),v!==void 0&&(D.top=v),C!==void 0&&(D.right=C),m!==void 0&&(D.bottom=m),D}case"Skeleton":{const{width:o,height:n,roundness:s,lighter:a,customGradientColor:c,animated:d,shimmerDuration:h,style:l,portalHoverEnabled:u}=e,f=fr(o),g=fr(n),v={...l,...f!==void 0?{width:f}:null,...g!==void 0?{height:g}:null},C=new Zn(t,{roundness:s,lighter:a,customGradientColor:c,shimmerDuration:h,animated:d});return C.style=v,C}case"Link":{const{children:o,href:n,target:s,view:a,disabled:c,font:d,color:h,wordWrap:l,lineHeight:u,overflow:f,textOverflow:g,ellipsis:v,maxLines:C,autoTooltip:m,position:p,left:A,top:y,right:E,bottom:D,onClick:S,portalHoverEnabled:H}=e,B=Cr(o),M=r.fontFamily||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';let G;d?G=/["']|sans-serif|serif|monospace/i.test(d)?d:`${d} ${M}`:G=r.baseFontStyle?`${r.baseFontStyle} ${M}`:`13px ${M}`;const V=Oo(r,d,u),Z=new Vn(t,B,{font:G,...V,color:h,wordWrap:l,lineHeight:u,overflow:f,textOverflow:g,ellipsis:v,maxLines:C,autoTooltip:m,href:n,target:s,view:a,disabled:c,theme:r});if(p&&(Z.position=p),A!==void 0&&(Z.left=A),y!==void 0&&(Z.top=y),E!==void 0&&(Z.right=E),D!==void 0&&(Z.bottom=D),!c){const Ft=ht(S);Ft&&Z.setOnClick(Ft)}return Z}default:throw new Error(`Unknown canvas component type: ${i}`)}}const ph='400 normal 1rem/1.25rem "SB Sans Text", sans-serif, Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif',yh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",bh=30,Ah=50,Dh=3;async function vs(){return typeof document>"u"||!document.fonts?Promise.resolve():document.fonts.ready.then(()=>{})}function Fs(i={}){const{testFont:t=ph,testText:e=yh,maxChecks:r=bh,checkInterval:o=Ah,stableThreshold:n=Dh}=i;return new Promise(s=>{if(typeof document>"u"){s();return}const c=document.createElement("canvas").getContext("2d");if(!c){s();return}let d=-1,h=0,l=0;const u=()=>{c.font=t;const{width:f}=c.measureText(e);f!==d?(d=f,h=0):h+=1,l+=1,h>=n||l>=r?s():setTimeout(u,o)};u()})}function ms(i){return vs().then(()=>Fs(i))}function zr({dataEditorRef:i,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:r}){const o=i.current;if(!o)return;const n=Math.min(30,t),s=e,a=[];for(let c=0-r;c<n;c+=1)for(let d=0;d<s;d+=1)a.push({cell:[d,c]});a.length>0&&o.updateCells(a)}function Wr(i){let t=null;return()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,i()}))}}function xh(){const i=F.useRef(null),t=F.useCallback(()=>(i.current||(i.current=new dn),i.current),[]);return{registry:t(),getRegistry:t}}function ps({dataEditorRef:i,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:r}){F.useLayoutEffect(()=>{const o=Wr(()=>{Fl(),zr({dataEditorRef:i,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:r})});ms().then(o)},[i,t,e,r])}function ys({dataEditorRef:i,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:r}){F.useEffect(()=>{const o=Wr(()=>{zr({dataEditorRef:i,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:r})});return Tn(o)},[i,t,e,r])}I.GridCellKind.Text;const ci=(i,t)=>({kind:I.GridCellKind.Text,data:i,displayData:i,allowOverlay:!0,readonly:!0,...t}),qt=i=>{const{data:t,...e}=i??{};return{kind:I.GridCellKind.Text,data:"",displayData:"",allowOverlay:!0,readonly:!0,...e}};function bs(i){const t=i;return!!(t!=null&&t.kind)}function Eh(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function Gr(i){return typeof i!="object"&&!Array.isArray(i)||i===null}function As(i){return i==null||typeof i=="boolean"}const mi=i=>{if(!i||!F.isValidElement(i))return!1;const t=i.type;return!!(t!=null&&t.__canvasType)},$r=i=>typeof i=="string",vr=i=>$r(i)?!0:mi(i),Sh=i=>$r(i)?!0:mi(i),zo=({jsxElement:i,canvasCellCache:t,cellInfo:e,options:r})=>{let o=null;if(bs(i))return{...i,...r};if(Gr(i))return As(i)?qt(r):ci(String(i),r);if(!mi(i)){const m="передан НЕ CanvasEl";return ci(m,{...r,data:m})}const{colInd:n,rowInd:s,row:a,column:c}=e,{id:d}=c,{getPortalEventTarget:h}=r;let l=null;const u=`cell-${n}-${s}`,f=(m,p,A,y,E,D)=>{let S=(D==null?void 0:D.canvasRoot)instanceof bt?D.canvasRoot:l;{if(!i)return{};let M=ai({element:i,idPrefix:`cell-${n}-${s}-${d}`,theme:A});if(M instanceof Rr||M instanceof ye||M instanceof yr){const G=new dt(`${M.id}:cell-root`);G.addChild(M),M=G}S?(S.setRootNode(M),S.setOriginId(u)):S=new bt(M,u),l=S}if(!S)return{};const H=y!==void 0&&E!==void 0?{x:y,y:E}:void 0;S.rootNode.style={width:p.width,height:p.height},o||(o=m.canvas.getBoundingClientRect());const B={x:o.left+p.x,y:o.top+p.y,width:p.width,height:p.height};return S.setPortalEventTarget((h==null?void 0:h())??null),S.setTooltipContext({column:e.column,row:e.row,ctxs:e.ctxs,refTable:r.refTable}),S.render(m,p,H,B,{frameTime:D==null?void 0:D.frameTime,requestAnimationFrame:D==null?void 0:D.requestAnimationFrame},D==null?void 0:D.imageResources),l=S,{canvasRoot:S}},{data:g,...v}=r;let C=g;return c.copyData&&(C=typeof c.copyData=="function"?c.copyData(a):c.copyData),qn(f,void 0,C,v)},Ds=(i,t,e)=>i?t>=i.x&&t<i.x+i.width&&e>=i.y&&e<i.y+i.height:!1,wh=i=>{const t=i.findIndex(e=>!e.isServiceColumn);return t===-1?i.length:t},Th=(i,t)=>{if(!i)return;const e=Math.max(i.x,t),r=Math.max(0,i.x+i.width-e);if(!(r<=0||i.height<=0))return{x:e,y:i.y,width:r,height:i.height}};function Hh({cellsSelectionMode:i,selection:t,baseTheme:e,serviceColumnsCount:r,activeDataRange:o,outlineRange:n,checkboxSelectedRowIndexes:s,highlightActiveRow:a,errorCellRanges:c,highlightRegionsExternal:d,serviceZoneFollowsRow:h=!1}){return F.useMemo(()=>{const l=[...d??[]],u=t.current,f=()=>{if(c!=null&&c.length)for(const p of c)l.push({color:e.errorOutlineColor,range:p,style:"solid-outline",drawAboveSelection:!0})};if(!u||i==="disabled")return f(),l.length>0?l:void 0;const[,g]=u.cell,C=(s==null?void 0:s.has(g))??!1?e.selectionActiveCheckboxBg:e.selectionActiveBg,m=e.selectionServiceActiveBg;return o&&r>0&&l.push({color:m,range:{x:0,y:o.y,width:r,height:o.height},style:h?"accent":"no-outline"}),o&&i==="cell"&&o.width===1&&o.height===1&&o.y!==a&&l.push({color:C,range:o,style:"no-outline"}),n&&l.push({color:e.accentColor,range:n,style:"solid-outline"}),f(),l.length>0?l:void 0},[i,t,e.selectionActiveBg,e.selectionActiveCheckboxBg,e.selectionServiceActiveBg,e.errorOutlineColor,e.accentColor,r,o,n,s,a,c,h,d])}function Bh({baseRegions:i,selectedColumnIndexes:t,headerSelectedRowIndexes:e,selectionRangeStack:r,totalRows:o,firstDataCol:n,columnsCount:s,theme:a,serviceZoneFollowsRow:c=!1}){const d=c?"accent":"no-outline";return F.useMemo(()=>{const h=t.length>0,l=e.length>0,u=((r==null?void 0:r.length)??0)>0;if(!h&&!l&&!u)return i;const f=s-n,g=[...i??[]],v=(C,m)=>{const[p,...A]=[...C].sort((S,H)=>S-H);if(p===void 0)return;let y=p,E=p;const D=(S,H)=>{g.push({color:a.accentColor,range:m(S,H),style:"solid-outline"})};for(const S of A)S===E+1||(D(y,E),y=S),E=S;D(y,E)};if(h){n>0&&g.push({color:a.selectionServiceActiveBg,range:{x:0,y:0,width:n,height:o},style:d});for(const C of t)g.push({color:a.selectionActiveBg,range:{x:C,y:0,width:1,height:o},style:"accent"});v(t,(C,m)=>({x:C,y:0,width:m-C+1,height:o}))}if(l&&f>0){if(n>0)for(const C of e)g.push({color:a.selectionServiceActiveBg,range:{x:0,y:C,width:n,height:1},style:d});for(const C of e)g.push({color:a.selectionActiveBg,range:{x:n,y:C,width:f,height:1},style:"accent"});v(e,(C,m)=>({x:n,y:C,width:f,height:m-C+1}))}if(u&&r&&n>0){const C=new Set;for(const m of r){const p=Math.max(m.x,n);if(!(m.x+m.width-p<=0||m.height<=0))for(let y=m.y;y<m.y+m.height;y+=1)C.add(y)}for(const m of C)g.push({color:a.selectionServiceActiveBg,range:{x:0,y:m,width:n,height:1},style:d})}return g},[i,t,e,r,o,n,s,a.selectionActiveBg,a.selectionServiceActiveBg,a.accentColor,d])}function xs({theme:i,cellsSelectionMode:t,selection:e,serviceColumnsCount:r,activeDataRange:o,outlineRange:n,checkboxSelectedRowIndexes:s,activeRow:a,errorCellRanges:c,highlightRegionsExternal:d,selectedColumnIndexes:h,headerSelectedRowIndexes:l,totalRows:u,columnsCount:f,isRowHoverEnabled:g,hoverRow:v,dataRowsCount:C,serviceZoneFollowsRow:m=!1}){var y;const p=Hh({cellsSelectionMode:t,selection:e,baseTheme:i,serviceColumnsCount:r,activeDataRange:o,outlineRange:n,checkboxSelectedRowIndexes:s,highlightActiveRow:a,errorCellRanges:c,highlightRegionsExternal:d,serviceZoneFollowsRow:m}),A=Bh({baseRegions:p,selectedColumnIndexes:h,headerSelectedRowIndexes:l,selectionRangeStack:(y=e.current)==null?void 0:y.rangeStack,totalRows:u,firstDataCol:r,columnsCount:f,theme:i,serviceZoneFollowsRow:m});return F.useMemo(()=>!g||m||v===void 0||v>C-1||r===0?A:[{color:i.bgServiceRowHovered,range:{x:0,y:v,width:r,height:1},style:"no-outline"},...A??[]],[A,r,g,m,v,C,i.bgServiceRowHovered])}const Ye={columns:I.CompactSelection.empty(),rows:I.CompactSelection.empty(),current:void 0};function Es({cellsSelectionMode:i,gridSelection:t,onGridSelectionChange:e,onSelectionEmit:r}){const[o,n]=F.useState(Ye),s=t!==void 0,a=t??o,c=F.useCallback(l=>{s?e==null||e(l):n(l),r==null||r(l)},[s,e,r]),d=F.useCallback(()=>{s?e==null||e(Ye):n(Ye),r==null||r(Ye)},[s,e,r]),h=F.useMemo(()=>i==="range-cell"?"rect":i==="multi-range-cell"?"multi-rect":i==="disabled"?"none":"cell",[i]);return{selection:a,handleGridSelectionChange:c,handleSelectionCleared:d,rangeSelect:h}}const Yt=new Set,Wo=({start:i,length:t})=>{const e=new Set;for(let r=0;r<t;r+=1)e.add(i+r);return e};function Ss({columns:i,selection:t,cellsSelectionMode:e,checkboxSelectedRowIndexes:r}){return F.useMemo(()=>{const o=t.current,n=wh(i);if(!(e!=="disabled"&&o!==void 0)||!o)return{hasAnyActiveSelection:!1,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:Yt,activeColumns:Yt,activeDataRange:void 0,soloDataCell:void 0,isSingleCellCustomHighlight:!1,outlineRange:void 0,isServiceColumn:f=>{var g;return!!((g=i[f])!=null&&g.isServiceColumn)},isActiveRow:f=>!1,isCheckboxSelectedRow:f=>(r==null?void 0:r.has(f))??!1,isActiveDataCell:(f,g)=>!1,isActiveHeaderColumn:f=>!1};const a=Th(o.range,n),c=a!==void 0,d=e==="cell"&&a!==void 0&&a.width===1&&a.height===1;if(!c)return{hasAnyActiveSelection:!1,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:Yt,activeColumns:Yt,activeDataRange:void 0,soloDataCell:void 0,isSingleCellCustomHighlight:!1,outlineRange:void 0,isServiceColumn:f=>{var g;return!!((g=i[f])!=null&&g.isServiceColumn)},isActiveRow:f=>!1,isCheckboxSelectedRow:f=>(r==null?void 0:r.has(f))??!1,isActiveDataCell:(f,g)=>!1,isActiveHeaderColumn:f=>!1};const h=a!=null&&a.height&&a.height>0?Wo({start:a.y,length:a.height}):Yt,l=a!=null&&a.width&&a.width>0?Wo({start:a.x,length:a.width}):Yt,u=a.width===1&&a.height===1?[a.x,a.y]:void 0;return{hasAnyActiveSelection:c,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:h,activeColumns:l,activeDataRange:a,soloDataCell:u,isSingleCellCustomHighlight:d,outlineRange:d?a:void 0,isServiceColumn:f=>{var g;return!!((g=i[f])!=null&&g.isServiceColumn)},isActiveRow:f=>h.has(f),isCheckboxSelectedRow:f=>(r==null?void 0:r.has(f))??!1,isActiveDataCell:(f,g)=>Ds(a,f,g),isActiveHeaderColumn:f=>i[f]?l.has(f):!1}},[i,e,r,t])}function kh({highlightActiveRow:i,onHighlightActiveRowChange:t,isHighlightActiveRowControlled:e}){const[r,o]=F.useState(void 0),n=e??t!==void 0,s=n?i:r,a=F.useCallback(c=>{n||o(c),t==null||t(c)},[n,t]);return{activeRow:s,commitActiveRow:a}}function Lh({columns:i}){const[t,e]=F.useState(()=>I.CompactSelection.empty()),r=F.useMemo(()=>t.toArray().filter(d=>{var h;return!((h=i[d])!=null&&h.isServiceColumn)}),[t,i]),o=F.useMemo(()=>new Set(r),[r]),n=F.useRef(void 0),[s,a]=F.useState(!1),c=F.useCallback(()=>{e(I.CompactSelection.empty())},[]);return{selectedColumns:t,setSelectedColumns:e,selectedColumnIndexes:r,selectedColumnSet:o,lastSelectedColumnRef:n,isNativeColumnSelection:s,setIsNativeColumnSelection:a,clearColumnSelection:c}}function Ph(){const[i,t]=F.useState(()=>I.CompactSelection.empty()),e=F.useMemo(()=>i.toArray(),[i]),r=F.useRef(i);r.current=i;const o=F.useRef(!1),n=F.useRef(I.CompactSelection.empty()),s=F.useRef(!1);F.useEffect(()=>{const c=h=>{o.current=h.ctrlKey||h.metaKey,n.current=r.current,s.current=!0},d=()=>{s.current=!1};return window.addEventListener("pointerdown",c,!0),window.addEventListener("pointerup",d,!0),()=>{window.removeEventListener("pointerdown",c,!0),window.removeEventListener("pointerup",d,!0)}},[]);const a=F.useCallback(()=>{t(I.CompactSelection.empty())},[]);return{selectedRows:i,setSelectedRows:t,headerSelectedRowIndexes:e,selectedRowsRef:r,ctrlGestureRef:o,ctrlBaseRowsRef:n,pointerGestureRef:s,clearRowSelection:a}}function ws({columns:i,selection:t,cellsSelectionMode:e,highlightActiveType:r,enableColumnSelection:o,enableRowSelection:n,enableSelectAll:s,leadingServiceColumnsCount:a,dataRowCount:c,handleGridSelectionChange:d,handleSelectionCleared:h,onSelectionEmit:l,highlightActiveRow:u,onHighlightActiveRowChange:f,isHighlightActiveRowControlled:g}){const{selectedColumns:v,setSelectedColumns:C,selectedColumnIndexes:m,selectedColumnSet:p,lastSelectedColumnRef:A,isNativeColumnSelection:y,setIsNativeColumnSelection:E}=Lh({columns:i}),{setSelectedRows:D,headerSelectedRowIndexes:S,ctrlGestureRef:H,ctrlBaseRowsRef:B,pointerGestureRef:M}=Ph(),{activeRow:G,commitActiveRow:V}=kh({highlightActiveRow:u,onHighlightActiveRowChange:f,isHighlightActiveRowControlled:g}),Z=F.useMemo(()=>i.findIndex(O=>O.isServiceColumn&&O.id==="row-markers"),[i]),Ft=F.useCallback(O=>{const{current:$}=O;if(!$)return O;const X=a,{range:J}=$;if(J.x>=X)return O;const U=J.x+J.width-X;return U<=0?{current:void 0,rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()}:{...O,current:{...$,cell:[Math.max($.cell[0],X),$.cell[1]],range:{...J,x:X,width:U}}}},[a]),re=F.useCallback(O=>{const $=O.current;if(n&&Z>=0&&$&&$.cell[0]===Z){const J=a,U=$.range.y,Q=U+Math.max($.range.height,1);if(H.current){const _=Q-U<=1;let rt=B.current;if(rt.length===0&&t.current&&t.current.cell[0]===Z){const mt=t.current.range;rt=I.CompactSelection.empty().add([mt.y,mt.y+Math.max(mt.height,1)]),B.current=rt}let ut;_?ut=rt.hasIndex(U)?rt.remove(U):rt.add(U):ut=rt.add([U,Q]),C(I.CompactSelection.empty()),D(ut),V(void 0),E(!1),d({...O,current:{...$,range:{x:J,y:$.range.y,width:0,height:$.range.height}}}),l==null||l({current:void 0,rows:ut,columns:I.CompactSelection.empty()});return}const it=Math.max(i.length-J,0);C(I.CompactSelection.empty()),D(I.CompactSelection.empty()),V(void 0),E(!1),d({...O,current:{...$,range:{x:J,y:$.range.y,width:it,height:$.range.height}}});return}const X=Ft(O);(X.current!==void 0||X.rows.length>0)&&(C(I.CompactSelection.empty()),D(I.CompactSelection.empty())),E(!1),r==="row"?M.current&&X.current&&V(X.current.cell[1]):V(void 0),d(X)},[i,t,d,Ft,Z,n,a,r,l,V,H,B,M,C,D,E]),pi=F.useCallback(()=>{C(I.CompactSelection.empty()),D(I.CompactSelection.empty()),V(void 0),E(!1),h()},[h,V,C,D,E]),Ae=F.useRef([]),oe=F.useMemo(()=>{var J;const O=new Set(m);if(y&&t.current){const{x:U,width:Q}=t.current.range;for(let it=U;it<U+Q;it+=1)(J=i[it])!=null&&J.isServiceColumn||O.add(it)}const $=Array.from(O).sort((U,Q)=>U-Q).map(U=>{var Q;return(Q=i[U])==null?void 0:Q.id}).filter(U=>!!U),X=Ae.current;return X.length===$.length&&X.every((U,Q)=>U===$[Q])?X:(Ae.current=$,$)},[m,y,t,i]),Ht=(e==="range-cell"||e==="multi-range-cell")&&!y&&!(t.current!==void 0&&t.current.cell[0]<a),yi=F.useCallback((O,$)=>{if(s&&Z>=0&&O===Z&&e!=="disabled"){const _=a,rt=Math.max(i.length-_,0);if(rt===0||c===0)return;C(I.CompactSelection.empty()),D(I.CompactSelection.empty()),V(void 0),E(!0),d({current:{cell:[_,0],range:{x:_,y:0,width:rt,height:c},rangeStack:[]},rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()});return}if(!o)return;const X=i[O];if(!X||X.isServiceColumn)return;const J=$.shiftKey;if($.ctrlKey||$.metaKey){let _=v;if(_.length===0&&y&&t.current){const ut=t.current.range;_=_.add([ut.x,ut.x+ut.width])}const rt=_.hasIndex(O)?_.remove(O):_.add(O);A.current=O,C(rt),D(I.CompactSelection.empty()),V(void 0),E(!1),d({current:void 0,rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()}),l==null||l({current:void 0,rows:I.CompactSelection.empty(),columns:rt});return}let Q,it;J&&A.current!==void 0?(Q=Math.min(A.current,O),it=Math.max(A.current,O)):(Q=O,it=O,A.current=O),C(I.CompactSelection.empty()),D(I.CompactSelection.empty()),V(void 0),E(!0),d({current:{cell:[Q,0],range:{x:Q,y:0,width:it-Q+1,height:c},rangeStack:[]},rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()})},[o,s,Z,e,a,i,t,y,v,c,d,l,V,A,C,D,E]),De=F.useCallback(O=>{const $=new Set(O),X=i.map((_,rt)=>!_.isServiceColumn&&$.has(_.id)?rt:-1).filter(_=>_>=0);if(D(I.CompactSelection.empty()),V(void 0),X.length===0){C(I.CompactSelection.empty()),E(!1),d({current:void 0,rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()});return}const J=X[0],U=X[X.length-1];if(J===void 0||U===void 0)return;const Q=U-J===X.length-1;if(A.current=U,Q){C(I.CompactSelection.empty()),E(!0),d({current:{cell:[J,0],range:{x:J,y:0,width:U-J+1,height:c},rangeStack:[]},rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()});return}let it=I.CompactSelection.empty();X.forEach(_=>{it=it.add(_)}),C(it),E(!1),d({current:void 0,rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()})},[i,c,d,C,D,E,V,A]);return{selectedColumnIndexes:m,selectedColumnKeysAll:oe,selectColumnsByKeys:De,selectedColumnSet:p,headerSelectedRowIndexes:S,activeRow:G,numberingColumnIndex:Z,drawFocusRing:Ht,selectColumnFromHeader:yi,handleGridSelectionWithColumnReset:re,handleSelectionClearedWithColumns:pi}}function Ih(i,t,e,r){const o=performance.now();function n(s){const a=s-o,c=Math.min(a/r,1),d=t+(e-t)*c;i(Math.round(d)),c<1&&requestAnimationFrame(n)}requestAnimationFrame(n)}const Rh=i=>{const t=typeof i=="number",[e,r]=F.useState(()=>t?i:56);return F.useEffect(()=>{t&&Ih(r,e,i,300)},[i]),t?e:i};function Mh({columns:i,rows:t,freezeColumns:e}){const[r,o]=F.useState(null),n=F.useRef(r);n.current=r;const s=F.useRef(null),a=F.useRef(0),c=F.useMemo(()=>i.some(f=>!f.isServiceColumn&&f.isErrorCell),[i]),d=F.useRef({cols:0,rows:0,freeze:0});d.current={cols:i.length,rows:t.length,freeze:e??0};const h=F.useCallback(()=>{a.current||(a.current=requestAnimationFrame(()=>{a.current=0;const f=s.current;if(!f)return;const{cols:g,rows:v,freeze:C}=d.current,m=Math.max(f.width,1),p=Math.max(f.height,1),A=n.current;if(A){const H=A.x+A.width,B=A.y+A.height,M=A.x>0&&f.x-A.x<m/2,G=A.y>0&&f.y-A.y<p/2,V=H<g&&H-(f.x+f.width)<m/2,Z=B<v&&B-(f.y+f.height)<p/2;if(!M&&!G&&!V&&!Z)return}const y=C>0?0:Math.max(0,f.x-m),E=Math.max(0,f.y-p),D=Math.min(g,f.x+f.width+m),S=Math.min(v,f.y+f.height+p);o({x:y,y:E,width:D-y,height:S-E})}))},[]);F.useEffect(()=>()=>{a.current&&cancelAnimationFrame(a.current)},[]),F.useEffect(()=>{c&&h()},[c,h]);const l=F.useCallback(f=>{s.current=f,h()},[h]);return{errorCellRanges:F.useMemo(()=>{const f=[];if(!c)return f;const g=r??{x:0,y:0,width:Math.min(i.length,60),height:Math.min(t.length,300)},v=Math.max(0,g.x),C=Math.min(i.length,g.x+g.width),m=Math.max(0,g.y),p=Math.min(t.length,g.y+g.height);for(let A=v;A<C;A+=1){const y=i[A],{isErrorCell:E}=y??{};if(!(!y||y.isServiceColumn||!E))for(let D=m;D<p;D+=1){const S=t[D];S!==void 0&&E(S)&&f.push({x:A,y:D,width:1,height:1})}}return f},[i,t,r,c]),trackVisibleRegion:l}}function Ts({cell:i,glideCell:t,rect:e,renderData:r,relativePoint:o,mouseArgs:n}){const s=(r==null?void 0:r.canvasRoot)instanceof bt?r.canvasRoot.getInteractionAtPoint(o.x,o.y):void 0;if(s)return{cell:i,glideCell:t,rect:e,renderData:r,relativePoint:o,interaction:s,...n?{mouseArgs:n}:{}}}function _h({dataEditor:i,getCellContent:t,clientX:e,clientY:r,nativeEvent:o}){const n=i==null?void 0:i.getMouseArgsForPosition(e,r,o);if(!n||n.kind!=="cell")return;const s=[n.location[0],n.location[1]],a=t(s);if(!_r(a))return;const c=n.bounds,d=Jt({colIndex:s[0],rowIndex:s[1]},c),h=Qt(d,a),l={x:n.localEventX,y:n.localEventY};return Ts({cell:s,mouseArgs:n,glideCell:a,rect:c,renderData:h,relativePoint:l})}function Nh({eventTarget:i,dataEditorRef:t,getCellContent:e,interactionSessionStore:r,onCellContextMenuExternal:o}){F.useEffect(()=>{if(!i)return;const n=s=>{var g;if(!(s instanceof MouseEvent))return;const a=s;if(a.clientX===0&&a.clientY===0)return;const c=_h({dataEditor:t.current,getCellContent:e,clientX:a.clientX,clientY:a.clientY,nativeEvent:a});if(!c)return;const{cell:d,interaction:h,mouseArgs:l,relativePoint:u}=c,f=r.beginOrGet({cell:d,relativePoint:u,interaction:h,button:a.button,source:"contextmenu"});if(f.decision.contextMenuMode!=="normal"){if(r.consumePhase(f,"contextmenu-capture"),a.stopPropagation(),(g=a.stopImmediatePropagation)==null||g.call(a),f.decision.contextMenuMode==="none"){a.cancelable&&a.preventDefault();return}!l||!o||o(d,{...l,preventDefault:()=>{a.cancelable&&a.preventDefault()}})}};return i.addEventListener("contextmenu",n,!0),()=>{i.removeEventListener("contextmenu",n,!0)}},[t,i,e,r,o])}const Oh=250;function zh(i){return F.useCallback((t,e)=>{const r=i.consumeEditorRequest(t,Oh);return!r||r.target!=="self"?e:{...e,activationBehaviorOverride:"single-click"}},[i])}const ti=350;function Go(i){return Math.round(i)}function Wh({cell:i,relativePoint:t,button:e}){return[i[0],i[1],e??"unknown",Go(t.x),Go(t.y)].join(":")}function li(i,t){return i[0]===t[0]&&i[1]===t[1]}function Hs(i,t){return Math.abs(i.x-t.x)<=1&&Math.abs(i.y-t.y)<=1}function Gh(i,t){return!li(i.cell,t.cell)||i.button!==void 0&&t.button!==void 0&&i.button!==t.button?!1:Hs(i.relativePoint,t.relativePoint)}function $h(i,t){return Date.now()-i.startedAt>(t.maxAgeMs??ti)||!li(i.cell,t.cell)||i.button!==void 0&&t.button!==void 0&&i.button!==t.button?!1:Hs(i.relativePoint,t.relativePoint)}function Uh(){let i,t=1;const e=r=>{if(!(!i||!$h(i,r)))return i};return{beginOrGet:r=>{const o=e(r);return o||(i={id:t++,key:Wh(r),cell:r.cell,relativePoint:r.relativePoint,interaction:r.interaction,decision:us(r.interaction),consumedPhases:new Set,startedAt:r.startedAt??Date.now(),source:r.source,...r.button!==void 0?{button:r.button}:{}},i)},findMatching:e,getCurrent:()=>i,storeClickResult:(r,o)=>{r.clickResult=o},consumeClickResult:r=>{const o=i;if(!(o!=null&&o.clickResult))return;if(!Gh(o,r)){delete o.clickResult;return}const n=o.clickResult;return delete o.clickResult,o.consumedPhases.add("renderer-click"),n},consumePhase:(r,o)=>r.consumedPhases.has(o)?!1:(r.consumedPhases.add(o),!0),armEditorRequest:(r,o)=>{var n;(n=r.editorRequest)!=null&&n.consumed||(r.editorRequest={target:o.target,armedAt:Date.now()})},consumeEditorRequest:(r,o=ti)=>{const n=i;if(!n)return;const s=n.editorRequest;if(!(s!=null&&s.consumed)&&s){if(Date.now()-s.armedAt>o){i=void 0;return}if(li(n.cell,r))return s.consumed=!0,n.consumedPhases.add("editor-activation"),s}},isMatchingRecent:(r,o,n=ti)=>{const s=i;return!s||!s.consumedPhases.has(r)?!1:Date.now()-s.startedAt<=n&&li(s.cell,o)},clearStale:(r=ti)=>{i&&Date.now()-i.startedAt>r&&(i=void 0)},clear:()=>{i=void 0}}}function Xh(){const i=F.useMemo(()=>Uh(),[]),t=F.useCallback(r=>i.beginOrGet(r),[i]),e=F.useCallback(r=>i.consumeClickResult(r),[i]);return{interactionSessionStore:i,beginOrGetInteractionSession:t,consumeCanvasClickResult:e}}function Vh(i={}){const t=F.useMemo(()=>!0,[]);return F.useMemo(()=>{const e=[];return t&&e.push(Or({beginOrGetInteractionSession:i.beginOrGetInteractionSession,consumeCanvasClickResult:i.consumeCanvasClickResult})),e.length>0?e:void 0},[t,i.beginOrGetInteractionSession,i.consumeCanvasClickResult])}const Ui={glideScroller:"dvn-scroller",glideTable:"gdg-table",glideUnderlay:"dvn-underlay"};function Bs(i){const t=(i==null?void 0:i.querySelector(`.${Ui.glideTable}`))??null,e=(t==null?void 0:t.querySelector(`.${Ui.glideScroller}`))??null,r=(t==null?void 0:t.querySelector(`.${Ui.glideUnderlay}`))??null;return{container:t,scroller:e,underlay:r}}const $o="[useGlideElements]";function Yh(i,t){const[e,r]=F.useState(null),[o,n]=F.useState(null),[s,a]=F.useState(null),c=F.useRef(null);F.useEffect(()=>{const h=i==null?void 0:i.current;if(jt.tableDebug($o,"useEffect fired",{hasWrapper:!!h,fullScreened:t}),!h)return;const l=()=>{const{container:f,scroller:g,underlay:v}=Bs(h);return jt.tableDebug($o,"tryFind",{containerFound:!!f,scrollerFound:!!g,underlayFound:!!v}),f?(r(C=>C===f?C:f),n(C=>C===g?C:g),a(C=>C===v?C:v),c.current&&(c.current.disconnect(),c.current=null),!0):!1},u=requestAnimationFrame(()=>{if(l())return;const f=new MutationObserver(()=>{l()});f.observe(h,{childList:!0,subtree:!0}),c.current=f});return()=>{cancelAnimationFrame(u),c.current&&(c.current.disconnect(),c.current=null),r(null),n(null),a(null)}},[i,t]);const d=F.useCallback(h=>e?qe.createPortal(h,e):null,[e]);return{glideContainer:e,glideScroller:o,glideUnderlay:s,isReady:!!e,renderInContainer:d}}function Kh({isRowHoverEnabled:i,dataEditorRef:t,columnsCount:e,rowsCount:r}){const o=F.useRef(null),n=F.useCallback((...h)=>{var g;const l=t.current;if(!l)return;const u=new Set;h.forEach(v=>{typeof v=="number"&&v>=0&&v<r&&u.add(v)});const f=[];u.forEach(v=>{for(let C=0;C<e;C+=1)f.push({cell:[C,v]})}),f.length>0&&((g=l.updateCells)==null||g.call(l,f))},[t,e,r]),s=F.useCallback(h=>{const l=o.current;(l==null?void 0:l.colInd)===(h==null?void 0:h.colInd)&&(l==null?void 0:l.rowInd)===(h==null?void 0:h.rowInd)||(o.current=h,n(l==null?void 0:l.rowInd,h==null?void 0:h.rowInd))},[n]),[a,c]=F.useState(void 0),d=F.useCallback(h=>{c(l=>l===h?l:h)},[]);return{hoveredCellRef:o,setHoveredCell:s,hoverRow:a,onHoverRowChange:i?d:void 0}}function Zh(i){const t=document.createElement("div");t.style.cssText="position:fixed;left:0;top:0;width:0;height:0;pointer-events:none;visibility:hidden",i.appendChild(t);const e=t.getBoundingClientRect();return i.removeChild(t),{x:e.left,y:e.top}}function qh(i,t){F.useEffect(()=>{if(!t)return;const e=i.current;if(!e)return;const r=jt.throttleWithLastCall(()=>{const{x:o,y:n}=Zh(e);e.style.setProperty("--gdg-portal-offset-x",`${o}px`),e.style.setProperty("--gdg-portal-offset-y",`${n}px`)},100);return r(),window.addEventListener("resize",r),e.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),e.removeEventListener("resize",r)}},[i,t])}function jh(i,t){const{columnsLast:e,rows:r,ctxs:o,refTable:n,theme:s,portalEventTargetRef:a,externalOnItemHovered:c,onHoverRowChange:d}=i,h=F.useRef(null),l=F.useCallback(g=>{const v=h.current;h.current=null,Zt({visible:!1,x:0,y:0,width:0,height:0,source:"cell",originId:v??void 0,nodeId:v??void 0},g,!0)},[]),u=F.useCallback(g=>{var p,A,y,E,D;c==null||c(g),d==null||d(g.kind==="cell"?((p=g.rawLocation)==null?void 0:p[1])??g.location[1]:void 0);const v=(a==null?void 0:a.current)??null,C=(A=g.location)==null?void 0:A[0],m=C!=null?e[C]:void 0;if((g.kind==="header"||g.kind==="group-header")&&g.hiddenIndicatorCol!=null){const S=g.hiddenIndicatorCol;h.current===Ge.HEADER_TOOLTIP_HIDDEN_COLS_ID||l(v);const B=e.length,M=Math.min(S,B-1),G=(y=t.current)==null?void 0:y.getBounds(M,-1);if(!G)return;const V=S>=B?G.x+G.width:G.x,Z=g.hiddenIndicatorAboveLeaf??0;h.current=Ge.HEADER_TOOLTIP_HIDDEN_COLS_ID,Zt({visible:!0,x:V-2,y:G.y-Z,width:4,height:G.height+Z,source:"header",originId:Ge.HEADER_TOOLTIP_HIDDEN_COLS_ID,nodeId:Ge.HEADER_TOOLTIP_HIDDEN_COLS_ID,priority:1},v);return}if(g.kind==="header"){if(!(m!=null&&m.headerCellTooltip)){l(v);return}const S=`header-tooltip-${C}`;h.current===S||l(v);const B=(E=t.current)==null?void 0:E.getBounds(C,-1);if(!B)return;h.current=S,Zt({visible:!0,x:B.x,y:B.y,width:B.width,height:B.height,source:"header",originId:S,nodeId:S,priority:0,tooltipContext:{column:m,ctxs:o,refTable:n,colInd:C,theme:s}},v);return}if(g.kind==="cell"){const S=g.location[1],H=r[S];if(!m||!H||!m.cellTooltip){l(v);return}const B=`col-tooltip-${C}-${S}`;h.current===B||l(v);const G=(D=t.current)==null?void 0:D.getBounds(C,S);if(!G)return;h.current=B,Zt({visible:!0,x:G.x,y:G.y,width:G.width,height:G.height,source:"cell",originId:B,nodeId:B,priority:0,tooltipContext:{column:m,row:H,ctxs:o,refTable:n,colInd:C,rowInd:S,theme:s}},v);return}l(v)},[e,r,o,n,s,a,c,d,l,t]),f=F.useCallback(()=>{l((a==null?void 0:a.current)??null)},[l,a]);return{onItemHovered:u,hideTooltip:f}}function Jh({enabled:i,portalEventTargetRef:t,headerHeight:e,groupHeaderHeight:r,experimental:o}){const[n,s]=F.useState(0),a=F.useRef(null),c=F.useMemo(()=>{const u=e??ei;let f=typeof u=="number"?u:ei;return Array.isArray(r)?f+=r.reduce((g,v)=>g+v,0):typeof r=="number"&&(f+=r),f},[e,r]),d=F.useRef(c);d.current=c;const h=F.useCallback(u=>{var m;if((m=a.current)==null||m.call(a),a.current=null,!u)return;if(!i){s(0);return}const f=t==null?void 0:t.current;if(!f)return;const g=f.querySelector(".dvn-scroller"),v=f.querySelector(".dvn-underlay");if(!g||!v)return;const C=()=>{const p=g.scrollTop,A=Math.min(p,d.current);s(-1*A),v.style.overflowY="visible",v.style.transform=`translateY(-${A}px)`};g.addEventListener("scroll",C),a.current=()=>{g.removeEventListener("scroll",C),v.style.transform="",v.style.overflowY=""}},[i,t]),l=F.useMemo(()=>i?{...o,paddingBottom:n}:o,[i,n,o]);return{unstickyCallbackRef:h,mergedExperimental:l}}const Xi=Ko.div.withConfig({displayName:"styled__StyledOverlayPortal"})(["[id^='gdg-overlay-']{position:fixed;z-index:9001;margin-left:calc(-1 * var(--gdg-portal-offset-x,0px));margin-top:calc(-1 * var(--gdg-portal-offset-y,0px));}"]),Qh=Ko(I).withConfig({displayName:"styled__StyledGlideDataEditor"})([""]),td=i=>({tokens:un(i),fonts:ii,fontMetrics:Jo,bgEditableCell:w.bgEditableCell[i],bgEditableCellHovered:w.bgEditableCellHovered[i],bgEditableCellActive:w.bgEditableCellActive[i],bgEditableCellActiveHovered:w.bgEditableCellActiveHovered[i],bgEditableCellRowActiveHovered:w.bgEditableCellRowActiveHovered[i],selectionCheckboxBg:w.selectionCheckboxBg[i],bgSelectedRowActiveHovered:w.bgSelectedRowActiveHovered[i],selectionActiveBg:w.selectionActiveBg[i],selectionActiveCheckboxBg:w.selectionActiveCheckboxBg[i],selectionServiceBg:w.selectionServiceBg[i],selectionServiceActiveBg:w.selectionServiceActiveBg[i],errorOutlineColor:w.errorOutlineColor[i],bgRowHovered:w.bgRowHovered[i],bgServiceRowHovered:w.bgServiceRowHovered[i],bgSelectedRowHovered:w.bgSelectedRowHovered[i],selectionActiveHoveredBg:w.selectionActiveHoveredBg[i],selectionActiveCheckboxHoveredBg:w.selectionActiveCheckboxHoveredBg[i],selectionServiceActiveHoveredBg:w.selectionServiceActiveHoveredBg[i],bgHeaderSelectedHovered:w.bgHeaderSelectedHovered[i],editedSuccessfullyCellColor:w.editedSuccessfullyCellColor[i],editedSuccessfullyCellHoverColor:w.editedSuccessfullyCellHoverColor[i],editedSuccessfullyCellActiveColor:w.editedSuccessfullyCellActiveColor[i],editedSuccessfullyCellActiveHoverColor:w.editedSuccessfullyCellActiveHoverColor[i],editedSuccessfullyCellRowActiveHoverColor:w.editedSuccessfullyCellRowActiveHoverColor[i],bgCellPositive:w.bgCellPositive[i],bgCellPositiveHovered:w.bgCellPositiveHovered[i],bgCellPositiveActive:w.bgCellPositiveActive[i],bgCellPositiveActiveHovered:w.bgCellPositiveActiveHovered[i],bgCellPositiveRowActiveHovered:w.bgCellPositiveRowActiveHovered[i],bgCellNegative:w.bgCellNegative[i],bgCellNegativeHovered:w.bgCellNegativeHovered[i],bgCellNegativeActive:w.bgCellNegativeActive[i],bgCellNegativeActiveHovered:w.bgCellNegativeActiveHovered[i],bgCellNegativeRowActiveHovered:w.bgCellNegativeRowActiveHovered[i],bgCellWarning:w.bgCellWarning[i],bgCellWarningHovered:w.bgCellWarningHovered[i],bgCellWarningActive:w.bgCellWarningActive[i],bgCellWarningActiveHovered:w.bgCellWarningActiveHovered[i],bgCellWarningRowActiveHovered:w.bgCellWarningRowActiveHovered[i],bgCellInfo:w.bgCellInfo[i],bgCellInfoHovered:w.bgCellInfoHovered[i],bgCellInfoActive:w.bgCellInfoActive[i],bgCellInfoActiveHovered:w.bgCellInfoActiveHovered[i],bgCellInfoRowActiveHovered:w.bgCellInfoRowActiveHovered[i],bgZebraRow:w.bgZebraRow[i],bgZebraRowHovered:w.bgZebraRowHovered[i],bgZebraRowActive:w.bgZebraRowActive[i],bgZebraRowActiveHovered:w.bgZebraRowActiveHovered[i],textHeaderClean:w.textHeaderClean[i],bgSummaryRow:w.bgHeader[i],fadeWhite:w.fadeWhite[i],fadeGray:w.fadeGray[i]}),ed=i=>({accentColor:w.accentColor[i],accentLight:w.accentLight[i],textDark:w.textDark[i],textHeader:w.textHeader[i],textHeaderSelected:w.textHeaderSelected[i],textGroupHeader:w.textGroupHeader[i],bgCell:w.bgCell[i],bgHeader:w.bgHeader[i],bgHeaderHasFocus:w.bgHeaderHasFocus[i],bgHeaderHovered:w.bgHeaderHovered[i],borderColor:w.borderColor[i],bgGroupHeader:w.bgGroupHeader[i],bgGroupHeaderHovered:w.bgGroupHeaderHovered[i],hiddenColumnsIndicatorColor:w.hiddenColumnsIndicatorColor[i]}),Uo={small:"bodyXXS",medium:"bodyS",big:"bodyM"},id=(i="big")=>{const t=ii[Uo[i]],e=Jo[Uo[i]],r=`${e.fontSize}px`,o=e.lineHeightPx,n=qo[i],{cellHorizontalPadding:s,cellVerticalPadding:a}=n;return{headerFontStyle:ii.bodyXSBold,baseFontStyle:t,fontFamily:'"SB Sans Text", sans-serif, Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif',editorFontSize:r,lineHeight:o,cellHorizontalPadding:s,cellVerticalPadding:a,activeSizes:n}},rd=i=>{const t={bgHeader:i.bgCell,bgHeaderHasFocus:i.bgCell,bgHeaderHovered:i.bgRowHovered,bgGroupHeader:i.bgCell,bgGroupHeaderHovered:i.bgRowHovered,borderColor:"transparent",horizontalBorderColor:"transparent",headerBottomBorderColor:"transparent",textHeader:i.textHeaderClean,textHeaderSelected:i.textHeaderClean,textGroupHeader:i.textHeaderClean,selectionServiceBg:i.bgCell,bgServiceRowHovered:i.bgRowHovered,selectionServiceActiveBg:i.selectionActiveBg,selectionServiceActiveHoveredBg:i.selectionActiveHoveredBg,bgHeaderSelectedHovered:i.selectionActiveHoveredBg};return{...i,...t}},Ur=(i="big",t="light",e="default")=>{const r={...ed(t),...id(i),...td(t),rowSize:i};return e==="clean"?rd(r):r},od=Ur(),nd=.025,ks=.004,Fr=i=>{let t=i.trim().replace("#","");if(t.length===3&&(t=t.split("").map(e=>e+e).join("")),t.length===6&&(t+="FF"),!/^[0-9a-fA-F]{8}$/.test(t))throw new Error(`Не hex: ${i}`);return[0,2,4,6].map(e=>parseInt(t.slice(e,e+2),16)/255)},Ls=i=>Math.round(Math.min(1,Math.max(0,i))*255).toString(16).padStart(2,"0"),sd=i=>i<=.04045?i/12.92:((i+.055)/1.055)**2.4,ad=i=>i<=.0031308?12.92*i:1.055*i**(1/2.4)-.055,Ke=(i,t="#FFFFFF")=>{const[e,r,o,n]=Fr(i),[s,a,c]=Fr(t),d=(h,l)=>Ls(Math.round((h*n+l*(1-n))*255)/255);return`#${d(e,s)}${d(r,a)}${d(o,c)}`.toUpperCase()},hi=i=>{const[t,e,r]=Fr(i),[o,n,s]=[t,e,r].map(sd),a=Math.cbrt(.4122214708*o+.5363325363*n+.0514459929*s),c=Math.cbrt(.2119034982*o+.6806995451*n+.1073969566*s),d=Math.cbrt(.0883024619*o+.2817188376*n+.6299787005*s),h=.2104542553*a+.793617785*c-.0040720468*d,l=1.9779984951*a-2.428592205*c+.4505937099*d,u=.0259040371*a+.7827717662*c-.808675766*d;return{l:h,c:Math.hypot(l,u),h:(Math.atan2(u,l)*180/Math.PI+360)%360}},Vi=({l:i,c:t,h:e})=>{const r=t*Math.cos(e*Math.PI/180),o=t*Math.sin(e*Math.PI/180),n=(i+.3963377774*r+.2158037573*o)**3,s=(i-.1055613458*r-.0638541728*o)**3,a=(i-.0894841775*r-1.291485548*o)**3;return[4.0767416621*n-3.3077115913*s+.2309699292*a,-1.2684380046*n+2.6097574011*s-.3413193965*a,-.0041960863*n-.7034186147*s+1.707614701*a]},Xo=i=>i.every(t=>t>=-1e-6&&t<=1+1e-6),cd=i=>{const t={...i,l:Math.min(1,Math.max(0,i.l))};let e=Vi(t);if(!Xo(e)){let r=0,o=t.c;for(let n=0;n<24;n+=1){const s=(r+o)/2;Xo(Vi({...t,c:s}))?r=s:o=s}e=Vi({...t,c:r})}return`#${e.map(r=>Ls(ad(Math.min(1,Math.max(0,r))))).join("")}`.toUpperCase()},pe=(i,t,e,r)=>{const o=hi(i),n=e==="light"?1:0,s=r?hi(r):o,a=Math.abs(s.l-n),c=a>1e-6?s.c/a:0,d=t/Math.sqrt(1+c*c),h=e==="light"?o.l-d:o.l+d;return cd({l:h,c:c*Math.abs(h-n),h:s.h})},ld=(i,t,e,r)=>{if(!i)return null;const o=hi(i).c<ks;return pe(i,t,e,o?r:void 0)},hd=(i,t,e={})=>{const r=Ke(e.cardHex??(t==="light"?"#FFFFFF":"#000000")),o=Ke(i,r),n=nd*(e.stepFactor??(t==="dark"?1.2:1)),s=e.selectionHex?Ke(e.selectionHex,o):null,a=e.primaryHex?Ke(e.primaryHex,r):void 0,c=ld(s,n,t,a);if(e.achromatic||hi(o).c<ks){if(!a)return{rest:o,hover:null,hover2:null,active:s,hoverActive:c};const h=pe(o,n,t,a);return{rest:o,hover:h,hover2:pe(h,n,t,a),active:s,hoverActive:c}}const d=pe(o,n,t);return{rest:o,hover:d,hover2:pe(d,n,t),active:s,hoverActive:c}},Ze=new Map,dd=1024,ud=(i,t)=>{const e=`${t}/${i}`,r=Ze.get(e);if(r)return r;const o=Ta[t],n=hd(i,o.mode,{stepFactor:o.stepFactor,cardHex:o.cardHex,primaryHex:o.primaryHex,selectionHex:o.selectionHex});return Ze.size>=dd&&Ze.clear(),Ze.set(e,n),n},Ps=(i,{rowHover:t,rowActive:e})=>{const r=i.hover??i.rest,o=i.hover2??r;let n;e?n=t?o:r:n=t?r:i.rest;const s=t?i.hoverActive??i.active:i.active;return{bgCell:n,...s?{accentLight:s}:{}}},fd=(i,t,e)=>{try{return Ps(ud(i,t),e)}catch{return{bgCell:i}}},gd=i=>({rest:i.bgEditableCell,hover:i.bgEditableCellHovered,hover2:i.bgEditableCellRowActiveHovered,active:i.bgEditableCellActive,hoverActive:i.bgEditableCellActiveHovered}),Vo=(i,{rowHover:t,checkboxChecked:e})=>{const r=Number(t)+Number(e);return[i.selectionCheckboxBg,i.bgSelectedRowHovered,i.bgSelectedRowActiveHovered][r]??i.selectionCheckboxBg},Is=(i,t,e,r)=>{let o=i;for(let s=i;s>=0;s-=1){const a=e(s,t);if(a&&a[0]<=i&&a[1]>=i){o=a[0];break}}const n=r(o,t);return[o,n?n[0]:t]},Yi=(i,t)=>{if(i==null)return null;const e=typeof i=="number"?i:i(t);return e<=0?null:[t.colInd,t.colInd+e]},Yo=(i,t)=>i==null?null:i(t);function Cd(...i){}const vd={},Ki=i=>Array.isArray(i)?i.filter(t=>typeof t=="string"):typeof i=="string"?[i]:[],Fd=({columns:i,rows:t,bottomSummaryRows:e,rowHeight:r,width:o,rowSize:n="medium",ctxs:s=vd,freezeColumns:a,onColumnResize:c,renderGroupHeader:d,groupAlignMap:h,refTable:l,onColumnsReorder:u,portalEventTargetRef:f,onItemHovered:g,unstickyHeader:v,resizableColumn:C=!0,minColumnWidth:m=56,maxColumnWidth:p,maxColumnAutoWidth:A,containerRef:y,containerClassName:E,containerStyle:D,renderOverlayFeatures:S,hideGrid:H,contentStateNode:B,containerSlot:M,fullScreened:G,editorOverlayPortal:V,highlightActiveType:Z="disabled",cellsSelectionMode:Ft="range-cell",enableColumnSelection:re=!0,enableRowSelection:pi=!0,enableSelectAll:Ae=!0,enableLowDprHairline:oe,gridSelection:Ht,onGridSelectionChange:yi,onSelectionEmit:De,onColumnSelectionChange:O,pendingColumnSelectionKeys:$,onColumnSelectionApplied:X,highlightActiveRow:J,onHighlightActiveRowChange:U,highlightActiveRowControlled:Q,highlightRegions:it,checkboxSelectedRowIndexes:_,checkboxVisibleRowIndexes:rt,hoverEffects:ut,appearance:mt,onCellClicked:Bt,onCellContextMenu:ne,onGroupHeaderClicked:kt,onMouseMove:xe,onVisibleRegionChanged:Ee,portalElementRef:md,...Nt})=>{const Se=jt.useActiveTheme(),se=(mt==null?void 0:mt.variant)??"default",k=F.useMemo(()=>Ur(n,Se,se),[n,Se,se]),Rs=F.useMemo(()=>{const b=typeof r=="number"?r:void 0;if(b)return b;const x=Zo[n],T=typeof r=="function"?r:void 0;return T?R=>{const P=t[R];if(!P)return b??x;const N=T(P,{rowSizeName:n,rowSizeValue:x},R);return typeof N=="number"&&!Number.isNaN(N)?N:x}:x},[t,r,n]),Ot=(e==null?void 0:e.length)??0,Ms=Rh(Rs),[we,_s]=F.useState(new Map),Te=F.useRef(null),Ns=F.useCallback((b,x,T,R)=>{var L;const P=b;P.id&&(P.minWidth!==void 0&&P.minWidth===P.maxWidth||((L=Te.current)==null||L.call(Te),c==null||c(P,x,T,R),_s(N=>(N.set(P.id,x),new Map(N)))))},[c]),Lt=F.useMemo(()=>we.size===0?i:i.map(b=>we.has(b.id)?{...b,width:we.get(b.id),grow:0}:b),[i,we]),[Xr,pd]=F.useState(0),bi=F.useMemo(()=>new WeakMap,[]),Pt=F.useRef(null);F.useEffect(()=>{var b;(Ht==null?void 0:Ht.current)!==void 0&&((b=Pt.current)==null||b.focus())},[Ht]);const{interactionSessionStore:ft,beginOrGetInteractionSession:Os,consumeCanvasClickResult:zs}=Xh(),Vr=zh(ft),{selection:zt,handleGridSelectionChange:Ws,handleSelectionCleared:Gs,rangeSelect:$s}=Es({cellsSelectionMode:Ft,gridSelection:Ht,onGridSelectionChange:yi,onSelectionEmit:De}),ct=Ss({columns:Lt,selection:zt,cellsSelectionMode:Ft,checkboxSelectedRowIndexes:_}),Us=F.useMemo(()=>U?b=>U(b,b!==void 0?t[b]:void 0):void 0,[U,t]),{selectedColumnIndexes:Xs,selectedColumnKeysAll:Yr,selectColumnsByKeys:He,selectedColumnSet:Be,headerSelectedRowIndexes:Kr,activeRow:Wt,numberingColumnIndex:Zr,drawFocusRing:Vs,selectColumnFromHeader:qr,handleGridSelectionWithColumnReset:Ys,handleSelectionClearedWithColumns:Ks}=ws({columns:Lt,selection:zt,cellsSelectionMode:Ft,highlightActiveType:Z,enableColumnSelection:re,enableRowSelection:pi,enableSelectAll:Ae,leadingServiceColumnsCount:ct.leadingServiceColumnsCount,dataRowCount:t.length+Ot,handleGridSelectionChange:Ws,handleSelectionCleared:Gs,onSelectionEmit:De,highlightActiveRow:J,onHighlightActiveRowChange:Us,isHighlightActiveRowControlled:Q});F.useEffect(()=>{O==null||O(Yr)},[Yr,O]),F.useEffect(()=>{if(!$)return;He($);const b=setTimeout(()=>X==null?void 0:X(),0);return()=>clearTimeout(b)},[$,Lt,He,X]);const ke=Kr.length>0,Le=F.useMemo(()=>{var T;const b=new Set,x=(T=zt.current)==null?void 0:T.rangeStack;if(x){const R=ct.firstDataColumnIndex;for(const P of x){const L=Math.max(P.x,R);for(let N=L;N<P.x+P.width;N+=1)b.add(N)}}return b},[zt,ct.firstDataColumnIndex]),Pe=F.useCallback(b=>ct.isActiveHeaderColumn(b)||Be.has(b)||Le.has(b),[ct,Be,Le]),q=F.useMemo(()=>Lt.map((b,x)=>{const T={...b.themeOverride??{}};let R=Object.keys(T).length>0;return b.isServiceColumn&&(T.bgCell=k.selectionServiceBg,R=!0),x===Zr&&(se!=="clean"&&(T.accentLight="transparent"),T.accentColor="transparent",R=!0),(Pe(x)||ke&&!b.isServiceColumn)&&(T.bgHeader=k.selectionServiceActiveBg,T.bgHeaderHasFocus=k.selectionServiceActiveBg,T.bgHeaderHovered=k.bgHeaderSelectedHovered,R=!0),R?{...b,themeOverride:T}:b}),[Lt,Pe,ke,Zr,se,k.selectionServiceBg,k.selectionServiceActiveBg,k.bgHeaderSelectedHovered]),Gt=(ut==null?void 0:ut.row)!==!1,Ai=(mt==null?void 0:mt.zebra)===!0,{hoveredCellRef:Zs,setHoveredCell:Ie,hoverRow:Di,onHoverRowChange:qs}=Kh({isRowHoverEnabled:Gt,dataEditorRef:Pt,columnsCount:q.length,rowsCount:t.length}),{errorCellRanges:js,trackVisibleRegion:jr}=Mh({columns:Lt,rows:t,freezeColumns:a}),Js=F.useCallback((b,x,T,R)=>{jr(b),Ee==null||Ee(b,x,T,R)},[jr,Ee]),ae=F.useCallback(([b,x],T)=>{var ze,no,We,so;Cd(Xr);const R=(T==null?void 0:T.applyCanvasEditorActivation)!==!1,P=nt=>R?Vr([b,x],nt):nt,L=!!e&&x>t.length-1,N=t[x],W=q[b];if(!W)return qt();if(L){const nt=e[x-t.length],{renderSummaryCell:Tt,colSpan:st}=W,ao={bgCell:k.bgSummaryRow};if(!Tt||!nt)return qt({themeOverride:ao});const Pi={row:nt,column:W,colInd:b,rowInd:x,ctxs:s,theme:k,hovered:{cellHover:!1,rowHover:!1},active:{cellActive:!1,rowActive:!1}},xa=Tt(Pi),co=Yi(st,Pi),Ea={data:"",themeOverride:ao,...co&&{span:co}};return P(zo({jsxElement:xa,canvasCellCache:bi,cellInfo:Pi,options:{...Ea,getPortalEventTarget:()=>(f==null?void 0:f.current)??null,refTable:l}}))}if(!N)return qt();const ot=(nt,Tt,st)=>({row:t[st],column:nt,colInd:Tt,rowInd:st,ctxs:s,theme:k,hovered:{cellHover:!1,rowHover:!1},active:{cellActive:!1,rowActive:!1}}),[K,j]=Is(b,x,(nt,Tt)=>{const st=q[nt];return st!=null&&st.colSpan?Yi(st.colSpan,ot(st,nt,Tt)):null},(nt,Tt)=>{const st=q[nt];return st!=null&&st.rowSpan?Yo(st.rowSpan,ot(st,nt,Tt)):null});if(K!==b||j!==x)return ae([K,j],T);const Y=Zs.current,z={row:N,column:W,colInd:b,rowInd:x,ctxs:s,theme:k,hovered:{cellHover:(Y==null?void 0:Y.colInd)===b&&(Y==null?void 0:Y.rowInd)===x,rowHover:(Y==null?void 0:Y.rowInd)===x},active:{cellActive:ct.isActiveDataCell(b,x),rowActive:ct.isActiveRow(x)}},{renderCell:$t,id:le,colSpan:wi,rowSpan:pa,spanAlign:Re,editable:Me,contentAlign:ya,columnThemeOverride:ro}=W,ba=((no=(ze=N[le])==null?void 0:ze.toString)==null?void 0:no.call(ze))??"NOT FOUND",_e=Yi(wi,z),Ne=Yo(pa,z),Ti=(_e||Ne)&&Re?typeof Re=="function"?Re(z):Re:void 0,oo=Me?typeof Me=="boolean"?Me:Me(N):!1,Rt=typeof ro=="function"?ro(z):void 0,Oe={rowHover:Gt&&z.hovered.rowHover,rowActive:x===Wt},Hi=oo?Ps(gd(k),Oe):Rt!=null&&Rt.bgCell?fd(Rt.bgCell,Se,Oe):void 0,{soloDataCell:Bi}=ct,Aa=Oe.rowActive&&Bi!==void 0&&Bi[0]===b&&Bi[1]===x?{accentLight:Hi?Hi.bgCell:Vo(k,{rowHover:Oe.rowHover,checkboxChecked:(_==null?void 0:_.has(x))??!1})}:void 0,ki={data:((so=(We=N[le])==null?void 0:We.toString)==null?void 0:so.call(We))??"NOT FOUND",...oo?{readonly:!1,allowOverlay:!0}:{readonly:!0,...W.hasPreview===!0&&{allowOverlay:!0},...W.hasPreview==="none"&&{allowOverlay:!1}},themeOverride:{...Rt,...Hi,...Aa},contentAlign:ya,..._e&&{span:_e},...Ne&&{spanRows:Ne},...Ti&&{spanAlign:Ti}};if(!$t){const nt=String(ba);return Gr(nt)?P(ci(nt,ki)):P(qt(ki))}const Li=Rt?{...z,theme:{...k,...Rt}}:z,Da=$t(_e||Ne?{...Li,__mergedCell:{align:Ti}}:Li);return P(zo({jsxElement:Da,canvasCellCache:bi,cellInfo:Li,options:{...ki,getPortalEventTarget:()=>(f==null?void 0:f.current)??null,refTable:l}}))},[Xr,e,t,q,s,k,Se,Gt,Wt,_,ct,bi,f,Vr]),Qs=F.useCallback((b,x)=>{var z;const T=ae(b,{applyCanvasEditorActivation:!1});if(!_r(T)){Bt==null||Bt(b,x);return}let R=!1;const P=x.preventDefault;x.preventDefault=()=>{R=!0,P()};const L=Jt({colIndex:b[0],rowIndex:b[1]},x.bounds),N=Qt(L,T),W={x:x.localEventX,y:x.localEventY},ot=Ts({cell:b,glideCell:T,rect:x.bounds,renderData:N,relativePoint:W}),K=ot?ft.beginOrGet({cell:b,relativePoint:W,interaction:ot.interaction,button:x.button,source:"click"}):ft.beginOrGet({cell:b,relativePoint:W,interaction:hn(),button:x.button,source:"click"}),j=Nr({cell:T,rect:x.bounds,relativePoint:W,renderData:N,rowData:t[b[1]],rowIndex:b[1]}),Y=K?Xl({decision:K.decision,propagationStopped:j.propagationStopped,suppressGridDefault:j.suppressGridDefault}):{suppressExternalCellClick:j.propagationStopped,suppressGridDefaultForClick:j.suppressGridDefault};if(K&&(ft.consumePhase(K,"cell-click"),ft.storeClickResult(K,j)),x.button===0&&((z=Y.editorRequest)==null?void 0:z.target)==="self"&&ft.armEditorRequest(K,Y.editorRequest),Y.suppressGridDefaultForClick&&(x.preventDefault(),K!=null&&K.decision.editorRequest&&ft.clear()),Y.suppressExternalCellClick||Bt==null||Bt(b,x),R||x.button===1){ft.clear();return}},[ae,ft,Bt,t]),ta=F.useCallback((b,x)=>{ft.isMatchingRecent("contextmenu-capture",b)||ne==null||ne(b,x)},[ft,ne]),ea=Vh({beginOrGetInteractionSession:Os,consumeCanvasClickResult:zs}),ce=F.useMemo(()=>new Map,[]),Jr=F.useMemo(()=>new Map,[]),xi=F.useRef(null),It=F.useRef(null),ia=F.useMemo(()=>jt.mergeRefs(It,y),[y]),{drawHeader:ra,onHeaderClicked:oa}=F.useMemo(()=>({drawHeader:(T,R)=>{const{ctx:P,rect:L,columnIndex:N}=T,W=q[N];if(!W||!W.renderHeaderCell)return R();const ot={column:W,drawArgs:T,columnIsSelected:Pe(N),ctxs:s,theme:k};let K=W.renderHeaderCell(ot);if(!vr(K))return R();typeof K=="string"&&(K=At.jsx(me.Container,{style:{width:"100%"},alignItems:"center",children:At.jsx(me.Text,{children:K})}));const j=`header-${W.id}-${N}`,Y=ai({element:K,idPrefix:j,theme:k});let z;ce.has(W.id)?(z=ce.get(W.id),z==null||z.setRootNode(Y),z!=null&&z.rootNode&&(z.rootNode.style={width:L.width,height:L.height})):(z=new bt(Y,j),z.rootNode.style={width:L.width,height:L.height},ce.set(W.id,z)),z==null||z.setPortalEventTarget((f==null?void 0:f.current)??null),z==null||z.setTooltipContext({column:W,ctxs:s,refTable:l,theme:k});const $t=T.isHovered&&T.hoverX!==void 0&&T.hoverY!==void 0?{x:T.hoverX,y:T.hoverY}:void 0,le=P.canvas.getBoundingClientRect(),wi={x:le.left+L.x,y:le.top+L.y,width:L.width,height:L.height};return z==null?void 0:z.render(P,L,$t,wi)},onHeaderClicked:(T,R)=>{const P=q[T];if(P){if(P.renderHeaderCell){const L=ce.get(P.id);if(L){const N=L.getInteractionAtPoint(R.localEventX,R.localEventY);if(L.dispatchPointerEvent("click",R.localEventX,R.localEventY),N)return}}qr(T,R)}}}),[q,s,k,Pe,ce,f,Pt,qr]),na=F.useCallback((b,x)=>{const T=q[b];if(!re||!T){kt==null||kt(b,x);return}const R=Ki(T.group),P=Math.max(0,R.indexOf(x.group)),L=R.slice(0,P+1).join("\0"),N=j=>{const Y=q[j];return Y!==void 0&&Ki(Y.group).slice(0,P+1).join("\0")===L};let W=b,ot=b;for(;W-1>=0&&N(W-1);)W-=1;for(;ot+1<q.length&&N(ot+1);)ot+=1;const K=[];for(let j=W;j<=ot;j+=1){const Y=q[j];Y&&!Y.isServiceColumn&&K.push(Y.id)}K.length>0&&He(K),kt==null||kt(b,x)},[re,q,He,kt]),Qr=F.useMemo(()=>{const b=new Map;q.forEach((T,R)=>{if(T.isServiceColumn)return;const P=ct.isActiveHeaderColumn(R)||Be.has(R)||Le.has(R)||ke;Ki(T.group).forEach(L=>{if(L==="")return;const N=b.get(L);b.set(L,(N??!0)&&P)})});const x=new Set;return b.forEach((T,R)=>{T&&x.add(R)}),x},[q,ct,Be,Le,ke]),sa=F.useCallback(b=>{const x=h==null?void 0:h.get(b),T={name:b,...x&&{spanAlign:x}};return Qr.has(b)?{...T,overrideTheme:{bgGroupHeader:k.selectionServiceActiveBg,bgGroupHeaderHovered:k.bgHeaderSelectedHovered}}:T},[h,Qr,k.selectionServiceActiveBg,k.bgHeaderSelectedHovered]),{glideContainer:Ei,isReady:aa,renderInContainer:ca}=Yh(It,G),to=V==="inside";qh(It,to),Nh({eventTarget:Ei??It.current,dataEditorRef:Pt,getCellContent:ae,interactionSessionStore:ft,onCellContextMenuExternal:ne});const{unstickyCallbackRef:eo,mergedExperimental:Si}=Jh({enabled:v,portalEventTargetRef:f,headerHeight:Nt.headerHeight,groupHeaderHeight:Nt.groupHeaderHeight,experimental:Nt.experimental}),la=F.useMemo(()=>jt.mergeRefs(Pt,l,eo),[l,eo]),ha=F.useMemo(()=>oe===void 0?Si:{...Si,enableLowDprHairline:oe},[oe,Si]),da=F.useCallback(b=>{xe==null||xe(b),b.kind==="cell"?(()=>{const T=b.location[0],R=b.location[1],P=t[R],L=q[T];if(!P||!L||L.isServiceColumn){Ie(null);return}Ie({colInd:T,rowInd:R})})():Ie(null)},[q,xe,t,Ie]),io={dataEditorRef:Pt,rowCount:t.length,columnCount:q.length,headerAndGroupHeaderRowsCount:1+(Nt.groupHeaderHeight??[]).length};ys(io),ps(io);const ua=F.useMemo(()=>u?(x,T)=>{var L,N;const R=(L=q[x])==null?void 0:L.id,P=(N=q[T])==null?void 0:N.id;typeof R!="string"||typeof P!="string"||u(R,P)}:void 0,[q,u]),fa=F.useMemo(()=>{if(d)return(b,x)=>{const T=d(b);if(T==="default")return x();if("defaultWithCustomGroupName"in T)return x(T.defaultWithCustomGroupName);const{groupName:P,rect:L,ctx:N}=b;let W=T;if(!vr(W))return x();typeof W=="string"&&(W=At.jsx(me.Container,{style:{width:"100%"},alignItems:"center",children:At.jsx(me.Text,{children:W})}));const ot=P,K=ai({element:W,idPrefix:ot,theme:k}),j=new bt(K,ot);j.rootNode.style={width:L.width,height:L.height},j.setPortalEventTarget((f==null?void 0:f.current)??null),Jr.set(ot,j);const Y=b.isHovered&&b.hoverX!==void 0&&b.hoverY!==void 0?{x:b.hoverX,y:b.hoverY}:void 0,z=N.canvas.getBoundingClientRect(),$t={x:z.left+L.x,y:z.top+L.y,width:L.width,height:L.height};return j.render(N,L,Y,$t)}},[Jr,d,k,f]),ga=F.useMemo(()=>{const b=!!(_!=null&&_.size),x=Gt?Di:void 0;if(!Ot&&!b&&!Ai&&x===void 0&&Wt===void 0)return;const T=t.length,R=k.bgRowHovered;return P=>{if(P===Wt){const L=P===x;return{bgCell:Vo(k,{rowHover:L,checkboxChecked:(_==null?void 0:_.has(P))??!1}),accentLight:L?k.selectionActiveCheckboxHoveredBg:k.selectionActiveCheckboxBg}}if(_!=null&&_.has(P)){const L=P===x;return{bgCell:L?k.bgSelectedRowHovered:k.selectionCheckboxBg,accentLight:L?k.selectionActiveCheckboxHoveredBg:k.selectionActiveCheckboxBg}}if(Ai&&P%2===0&&P<T){const L=P===x;return{bgCell:L?k.bgZebraRowHovered:k.bgZebraRow,accentLight:L?k.bgZebraRowActiveHovered:k.bgZebraRowActive}}return P===x&&P<T?{bgCell:R,accentLight:k.selectionActiveHoveredBg}:{}}},[Ot,k.selectionCheckboxBg,k.bgRowHovered,k.bgSelectedRowHovered,k.bgSelectedRowActiveHovered,k.selectionActiveCheckboxBg,k.selectionActiveCheckboxHoveredBg,k.selectionActiveHoveredBg,k.bgZebraRow,k.bgZebraRowHovered,k.bgZebraRowActive,k.bgZebraRowActiveHovered,_,Gt,Ai,t.length,Di,Wt]),{onItemHovered:Ca,hideTooltip:va}=jh({columnsLast:q,rows:t,ctxs:s,refTable:l,theme:k,portalEventTargetRef:f,externalOnItemHovered:g,onHoverRowChange:qs},Pt);Te.current=va;const Fa=xs({theme:k,cellsSelectionMode:Ft,selection:zt,serviceColumnsCount:ct.leadingServiceColumnsCount,activeDataRange:ct.activeDataRange,outlineRange:ct.outlineRange,checkboxSelectedRowIndexes:_,errorCellRanges:js,highlightRegionsExternal:it,selectedColumnIndexes:Xs,headerSelectedRowIndexes:Kr,activeRow:Wt,totalRows:t.length+Ot,columnsCount:Lt.length,isRowHoverEnabled:Gt,hoverRow:Di,dataRowsCount:t.length,serviceZoneFollowsRow:se==="clean"}),ma=F.useMemo(()=>{if(!(!D&&!B&&!H))return{...D,...B?{position:"relative"}:void 0,...H?{height:"100%",minHeight:0}:void 0}},[D,B,H]);return At.jsxs("div",{ref:ia,className:E,style:ma,children:[to?qe.createPortal(At.jsx(Xi,{ref:xi,onAnimationEndCapture:b=>b.stopPropagation(),id:"portal"}),(It==null?void 0:It.current)??document.body):qe.createPortal(At.jsx(Xi,{id:"portal",ref:xi}),document.body),qe.createPortal(At.jsx(Xi,{id:"portal2"}),document.body),!H&&At.jsx(Qh,{ref:la,className:"gdg-table",portalElementRef:xi,theme:k,getRowThemeOverride:ga,onHeaderClicked:oa,onGroupHeaderClicked:na,onMouseMove:da,drawHeader:ra,drawGroupHeader:fa,getGroupDetails:sa,getCellContent:ae,columns:q,rows:t.length+Ot,freezeTrailingRows:Ot,freezeColumns:a,minColumnWidth:m,maxColumnAutoWidth:A,maxColumnWidth:p,columnSelect:"none",columnSelectionBlending:"exclusive",drawFocusRing:Vs,gridSelection:zt,onGridSelectionChange:Ys,onSelectionCleared:Ks,width:o??"100%",onColumnMoved:ua,onColumnResize:C?Ns:void 0,customRenderers:ea,rowHeight:Ms,highlightRegions:Fa,rangeSelect:$s,smoothScrollX:!0,smoothScrollY:!0,headerHeight:ei,onCellClicked:Qs,onCellContextMenu:ta,onItemHovered:Ca,onVisibleRegionChanged:Js,...Nt,experimental:ha,keybindings:{...Nt.keybindings,copy:!1,paste:!1},onPaste:!1}),B,M,aa&&Ei&&(S==null?void 0:S({containerElement:Ei,renderInContainer:ca}))]})};exports.BUTTON_PADDING_Y=ee;exports.CACHE_SEPARATOR=Er;exports.CANVAS_CELL_KIND=Fi;exports.CANVAS_PORTAL_EVENT=ni;exports.Canvas=me;exports.CanvasAbsoluteContainer=$a;exports.CanvasAvatar=ye;exports.CanvasAvatarGroup=yr;exports.CanvasBadge=_n;exports.CanvasButton=Nn;exports.CanvasChevron=wc;exports.CanvasContainer=dt;exports.CanvasEmbedIconButton=or;exports.CanvasHoverController=pr;exports.CanvasIcon=On;exports.CanvasIconButton=zn;exports.CanvasImage=Rr;exports.CanvasLeaf=vt;exports.CanvasLink=Vn;exports.CanvasNode=Mt;exports.CanvasRect=Yn;exports.CanvasRegistry=dn;exports.CanvasRoot=Ka;exports.CanvasSkeleton=Zn;exports.CanvasText=Mr;exports.CellCanvasRoot=bt;exports.DANGER_COLOR=xr;exports.DANGER_TEXT_COLOR=qi;exports.DEFAULT_ACCENT_FG=be;exports.DEFAULT_BORDER_WIDTH=St;exports.DEFAULT_BUTTON_RADIUS=Ar;exports.DEFAULT_CURSOR=Jn;exports.DEFAULT_HEADER_HEIGHT=ei;exports.DEFAULT_ICON_SIZE=vn;exports.DEFAULT_ICON_SPACING=Dr;exports.DEFAULT_ROW_HEIGHT=Zo;exports.DEFAULT_SECONDARY_HOVER=Fn;exports.DEFAULT_SIZE=Ci;exports.DEFAULT_TEXT_PADDING=ac;exports.DEFAULT_VIEW=vi;exports.DISABLED_BG_COLOR=mn;exports.DISABLED_BORDER_COLOR=pn;exports.DISABLED_TEXT_COLOR=ji;exports.DrawBatcher=fi;exports.EMPTY_CELL_OBJ=Ha;exports.FlexBox=Et;exports.FlexElement=tn;exports.FlexTreeBuilder=nn;exports.HEX_COLOR_CHAR_CODE=bn;exports.HEX_COLOR_PREFIX=yn;exports.ICON_SIZE_ADJUSTMENT=ie;exports.IconSpriteManager=wn;exports.LEGACY_HOVER_CURSOR=Qn;exports.LIGHTEN_AMOUNT=Sr;exports.LayoutReconciler=sn;exports.MAX_ICON_SIZE=br;exports.POINTER_CANDIDATE_KEYS=jn;exports.PositionResolver=Dt;exports.RELATIVE_COORD_TOLERANCE=Fe;exports.ROW_SIZE_TOKENS=tt;exports.RootBridge=sh;exports.RootFlexBox=mr;exports.SIZES=qo;exports.SIZE_CONFIG=at;exports.SizeAccumulator=ui;exports.TABLE_GLIDE_SIZES=Ba;exports.TABLE_STATE_COLORS=w;exports.THEME=od;exports.TableGlide=Fd;exports.VIEW_COLORS=gi;exports.buildButtonViewColors=Cn;exports.buildCanvasTree=ai;exports.buildCellId=Jt;exports.calculateButtonWidth=Hr;exports.calculateContentWidth=Br;exports.canvasCellRenderer=Vl;exports.clearButtonCaches=cc;exports.clearIconCache=Kl;exports.createCanvasCell=qn;exports.createCanvasCellRenderer=Or;exports.createEmptyCellGlide=qt;exports.createNormalCanvasInteraction=hn;exports.createRafUpdate=Wr;exports.createSvgDataUrl=rr;exports.createTextCellGlide=ci;exports.defaultBatcher=Ya;exports.defaultIconManager=wt;exports.dispatchCanvasPortalHover=Zt;exports.drawButton=Pn;exports.drawButtonWithView=In;exports.drawEmbedIconButtonWithView=Rn;exports.drawIcon=kn;exports.drawIcon$1=Ct;exports.drawIconButton=Ir;exports.drawIconButtonWithView=Mn;exports.drawIconDirect=Cc;exports.findBlockOrigin=Is;exports.flexBoxLayout=_a;exports.fontStyles=ii;exports.getCachedTextWidth=Tr;exports.getCellIndices=Je;exports.getDpr=Qe;exports.getHoverState=ls;exports.getIconCacheSize=Zl;exports.getIconImageDirect=Ln;exports.getIconSprite=Hn;exports.getIconSpriteStats=fc;exports.getRelativePointerPosition=ts;exports.getRowHeightBySize=je;exports.getTheme=Ur;exports.handleCanvasRootClick=rs;exports.handleCanvasRootHover=hs;exports.handleCellClick=ns;exports.handleClickHandlers=os;exports.hashString=Sn;exports.isAbsoluteCoords=es;exports.isCanvasCell=_r;exports.isCanvasContent=vr;exports.isCanvasEl=mi;exports.isCanvasString=$r;exports.isGlideCellObj=Sh;exports.isGlideGridCellObj=bs;exports.isHoveringBounds=_t;exports.isObject=Eh;exports.isPointInArea=Pr;exports.isPortalHoverLocked=Il;exports.isPrimitive=Gr;exports.isReactIcon=xt;exports.isRelativeCoords=is;exports.isValueEmpty=As;exports.lightenColor=wr;exports.lightenColorCached=An;exports.lockPortalHover=Pl;exports.normalizeCanvasInteraction=ln;exports.normalizeDimensionValue=fr;exports.normalizeHoverPoint=En;exports.normalizeIcon=pt;exports.onAnyIconLoad=Tn;exports.performCanvasClick=Nr;exports.performCanvasPointerDownIntent=fs;exports.preloadIconSprites=Bn;exports.queryGlideElements=Bs;exports.reactIconToSvg=gs;exports.rectContainsCell=Ds;exports.registerIconDefinitions=uc;exports.resetIconSpriteCache=gc;exports.resolveButtonColors=kr;exports.resolveClickPoint=er;exports.resolveDangerColors=xn;exports.resolvePaddingBox=en;exports.resolvePaddingBox$1=cn;exports.resolvePrimaryColors=tr;exports.resolveSecondaryColors=Dn;exports.resolveViewColors=Lr;exports.retrieveRenderData=Qt;exports.storeRenderData=as;exports.subscribeToCanvasPortalHover=Gl;exports.subscribeToPortalHoverLock=Rl;exports.toRelativePoint=ir;exports.updateGridCells=zr;exports.updateHoverState=cs;exports.updateHoverStateIfNeeded=ds;exports.useCanvasRegistry=xh;exports.useColoringLayers=xs;exports.useFontLoadRedraw=ps;exports.useIconLoadRedraw=ys;exports.useNativeGridSelection=Es;exports.useSelectionGeometry=Ss;exports.useTableSelectionSystem=ws;exports.waitForCanvasFonts=Fs;exports.waitForDocumentFonts=vs;exports.waitForFonts=ms;
|