ezux 1.1.4 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/EzContextMenu-C5fEFGzp.cjs +5 -0
- package/dist/EzContextMenu-OaCDOB5a.js +3500 -0
- package/dist/EzErrorBoundary-CEdz_hDo.cjs +41 -0
- package/dist/{EzErrorBoundary-BBTNUHqc.js → EzErrorBoundary-H8HQBTwU.js} +1200 -1103
- package/dist/EzEventModal-DuKSTESr.cjs +1 -0
- package/dist/EzEventModal-pq49mPrb.js +689 -0
- package/dist/EzGroupingPanel-Bn2JgaOA.cjs +1 -0
- package/dist/EzGroupingPanel-CmK7gVFq.js +143 -0
- package/dist/EzSchedulerQuickAdd-Bhp3B8DK.cjs +1 -0
- package/dist/EzSchedulerQuickAdd-CkR_EimA.js +118 -0
- package/dist/EzSchedulerToolbar-B0-uLBDr.js +248 -0
- package/dist/EzSchedulerToolbar-DDyth429.cjs +1 -0
- package/dist/EzSignature-BpFo1IzX.cjs +1 -0
- package/dist/EzSignature-Dgz265gl.js +419 -0
- package/dist/EzTableEditDialog-Bvb3hkWO.js +63 -0
- package/dist/EzTableEditDialog-C9vNta7y.cjs +1 -0
- package/dist/EzTableFooter-BxLdc13o.cjs +1 -0
- package/dist/{EzTableFooter-DNCi_19D.js → EzTableFooter-CI89S-UC.js} +14 -13
- package/dist/EzTableToolbar-_WyPYxTd.js +250 -0
- package/dist/EzTableToolbar-aY1sSBBb.cjs +1 -0
- package/dist/HighlightText-BDclEh_K.cjs +1 -0
- package/dist/HighlightText-qlGoV0mz.js +70 -0
- package/dist/NotificationPanel-CfIj_ycB.js +68 -0
- package/dist/NotificationPanel-HoqM63z8.cjs +1 -0
- package/dist/{TooltipWrapper-kSl3aqQ_.js → TooltipWrapper-CEHdYnI-.js} +243 -242
- package/dist/TooltipWrapper-gco5CexX.cjs +1 -0
- package/dist/avatar-CWOs3vxs.js +41 -0
- package/dist/avatar-m3tSATGp.cjs +1 -0
- package/dist/button-DT4Inu2c.cjs +1 -0
- package/dist/button-eeeIyCtP.js +139 -0
- package/dist/calendar-BE2zOlsW.cjs +1 -0
- package/dist/calendar-BR9W__-W.js +91 -0
- package/dist/checkbox-Bv_EiCrx.js +46 -0
- package/dist/checkbox-DrL8aED5.cjs +1 -0
- package/dist/chevron-down-DZVL7VHW.cjs +1 -0
- package/dist/chevron-down-tKbXGF9E.js +5 -0
- package/dist/circle-alert-77QqFR-z.cjs +1 -0
- package/dist/circle-alert-CQY8GSNi.js +9 -0
- package/dist/date-time-picker-Cl9JFWO8.cjs +1 -0
- package/dist/date-time-picker-DxkoL4hD.js +1636 -0
- package/dist/download-0ZhO2XaW.cjs +1 -0
- package/dist/download-CmRcT58S.js +9 -0
- package/dist/dropdown-menu-BWyO06-P.cjs +1 -0
- package/dist/{dropdown-menu-BbW7kfYz.js → dropdown-menu-DdkjXzq1.js} +123 -123
- package/dist/ellipsis-CCZF_cvh.js +9 -0
- package/dist/ellipsis-CzlqJf-i.cjs +1 -0
- package/dist/ezux.css +1 -1
- package/dist/index-B-TRhwk4.js +4644 -0
- package/dist/index-Btkuh0Jp.cjs +7 -0
- package/dist/{index-GTkUZR4A.js → index-BunKZUEt.js} +1893 -2111
- package/dist/index-BwJuUg0J.cjs +1 -0
- package/dist/index-D4eq_ohu.cjs +2 -0
- package/dist/index-DI80c2kw.js +3074 -0
- package/dist/index-DllNLSm8.cjs +2 -0
- package/dist/index-WRg7XmVa.js +5201 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +6293 -80
- package/dist/index.es.js +536 -477
- package/dist/info-BDmr8PJk.js +14 -0
- package/dist/info-BY2cfl1l.cjs +1 -0
- package/dist/input-BwEWZkMW.cjs +1 -0
- package/dist/{input-C19xkn7-.js → input-DqyAoZa9.js} +6 -5
- package/dist/isBefore-CTwR56mw.cjs +1 -0
- package/dist/isBefore-DxtoOU-T.js +15 -0
- package/dist/kanban.cjs +1 -1
- package/dist/kanban.d.ts +1343 -2
- package/dist/kanban.es.js +13 -12
- package/dist/label-CbmQD-s4.js +55 -0
- package/dist/label-Cm2Ayqls.cjs +1 -0
- package/dist/layers-DNHQOu07.js +27 -0
- package/dist/layers-xSPd-hz3.cjs +1 -0
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +604 -2
- package/dist/layout.es.js +12 -11
- package/dist/popover-2vzx8NRx.cjs +1 -0
- package/dist/popover-Bl6ydwov.js +22 -0
- package/dist/scheduler.cjs +1 -1
- package/dist/scheduler.d.ts +1430 -2
- package/dist/scheduler.es.js +7 -7
- package/dist/scroll-area-BCstMooj.cjs +1 -0
- package/dist/{scroll-area-DEvp8mJY.js → scroll-area-DtvmNg-L.js} +190 -189
- package/dist/select-CcLB-krA.js +35 -0
- package/dist/select-CyzLABFE.cjs +1 -0
- package/dist/settings-BHRhM0Qw.cjs +1 -0
- package/dist/settings-BkZ7kdog.js +20 -0
- package/dist/signature.cjs +1 -1
- package/dist/signature.d.ts +410 -2
- package/dist/signature.es.js +1 -1
- package/dist/sortable.esm-CPZHpcxS.js +477 -0
- package/dist/sortable.esm-DU16Scox.cjs +1 -0
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +1041 -2
- package/dist/table.es.js +11 -10
- package/dist/theme-vars.css +156 -0
- package/dist/treeview.cjs +2 -2
- package/dist/treeview.d.ts +656 -2
- package/dist/treeview.es.js +615 -642
- package/dist/useInitCoreServices-BCuuNsu5.cjs +1 -0
- package/dist/useInitCoreServices-J1k9YgF4.js +3847 -0
- package/dist/useService-DKtODQpB.cjs +1 -0
- package/dist/useService-HK9_CuU3.js +10 -0
- package/dist/useServiceState-BGQiGyXF.cjs +1 -0
- package/dist/useServiceState-cBut6x4E.js +24 -0
- package/package.json +42 -15
- package/dist/EzContextMenu-BB19nvhS.js +0 -1075
- package/dist/EzContextMenu-CzPSo01A.cjs +0 -4
- package/dist/EzErrorBoundary-C8JWh0B9.cjs +0 -41
- package/dist/EzEventModal-B2svzJED.cjs +0 -1
- package/dist/EzEventModal-D5MTqQeg.js +0 -688
- package/dist/EzGroupingPanel-BsKFXdSQ.js +0 -140
- package/dist/EzGroupingPanel-W44CHD2R.cjs +0 -1
- package/dist/EzSchedulerQuickAdd-ClIyg-wI.cjs +0 -1
- package/dist/EzSchedulerQuickAdd-yTAobHbh.js +0 -115
- package/dist/EzSchedulerToolbar-BhVE2RRr.cjs +0 -1
- package/dist/EzSchedulerToolbar-D614BIt6.js +0 -233
- package/dist/EzSignature-CiyZx58z.cjs +0 -1
- package/dist/EzSignature-YP6VjvRY.js +0 -415
- package/dist/EzTableEditDialog-CNh29uTt.cjs +0 -1
- package/dist/EzTableEditDialog-xdCr_h0S.js +0 -63
- package/dist/EzTableFooter-D--qWYiL.cjs +0 -1
- package/dist/EzTableToolbar-CQtfc9HK.js +0 -208
- package/dist/EzTableToolbar-ftmASzJO.cjs +0 -1
- package/dist/HighlightText-B0pjKGte.js +0 -68
- package/dist/HighlightText-DEYd46Sf.cjs +0 -1
- package/dist/NotificationPanel-2hS6oAQl.js +0 -64
- package/dist/NotificationPanel-DxbgmBkY.cjs +0 -1
- package/dist/TooltipWrapper-DOlf73HH.cjs +0 -1
- package/dist/avatar-K6i83kOM.cjs +0 -1
- package/dist/avatar-zBIHA1no.js +0 -40
- package/dist/button-B8uJYiZM.js +0 -108
- package/dist/button-BKnbxC7F.cjs +0 -1
- package/dist/calendar-BMXzTbEH.cjs +0 -1
- package/dist/calendar-BTT8H0Ri.js +0 -71
- package/dist/checkbox-C_yJXmCP.cjs +0 -1
- package/dist/checkbox-Z2t8UKVo.js +0 -30
- package/dist/components/EzKanban/EzKanban.types.d.ts +0 -808
- package/dist/components/EzKanban/components/CardEditorModal.d.ts +0 -23
- package/dist/components/EzKanban/components/EzKanbanErrorFallback.d.ts +0 -1
- package/dist/components/EzKanban/components/FilterPopover.d.ts +0 -10
- package/dist/components/EzKanban/components/KanbanBoard.d.ts +0 -59
- package/dist/components/EzKanban/components/KanbanCard.d.ts +0 -46
- package/dist/components/EzKanban/components/KanbanColumn.d.ts +0 -53
- package/dist/components/EzKanban/components/KanbanSwimlane.d.ts +0 -45
- package/dist/components/EzKanban/components/KanbanToolbar.d.ts +0 -41
- package/dist/components/EzKanban/exports.d.ts +0 -4
- package/dist/components/EzKanban/hooks/useKanbanCards.d.ts +0 -36
- package/dist/components/EzKanban/hooks/useKanbanColumns.d.ts +0 -27
- package/dist/components/EzKanban/hooks/useKanbanDragDrop.d.ts +0 -31
- package/dist/components/EzKanban/hooks/useKanbanFilters.d.ts +0 -23
- package/dist/components/EzKanban/hooks/useKanbanState.d.ts +0 -79
- package/dist/components/EzKanban/hooks/useKanbanSwimlanes.d.ts +0 -27
- package/dist/components/EzKanban/hooks/useKanbanVirtualization.d.ts +0 -16
- package/dist/components/EzKanban/index.d.ts +0 -51
- package/dist/components/EzKanban/services/KanbanService.d.ts +0 -30
- package/dist/components/EzKanban/state/kanban.store.d.ts +0 -33
- package/dist/components/EzKanban/useEzKanban.d.ts +0 -162
- package/dist/components/EzKanban/views/KanbanTimelineView.d.ts +0 -15
- package/dist/components/EzLayout/Authentication/AuthSlider.d.ts +0 -13
- package/dist/components/EzLayout/Authentication/InputPassword.d.ts +0 -7
- package/dist/components/EzLayout/Authentication/SignInForm.d.ts +0 -21
- package/dist/components/EzLayout/Authentication/SignUpForm.d.ts +0 -20
- package/dist/components/EzLayout/EzHeader.d.ts +0 -35
- package/dist/components/EzLayout/EzLanguageSwitcher.d.ts +0 -4
- package/dist/components/EzLayout/EzLayout.types.d.ts +0 -233
- package/dist/components/EzLayout/EzSidebar.d.ts +0 -14
- package/dist/components/EzLayout/EzThemeColorChanger.d.ts +0 -9
- package/dist/components/EzLayout/EzThemeSwitcher.d.ts +0 -8
- package/dist/components/EzLayout/EzUserProfile.d.ts +0 -23
- package/dist/components/EzLayout/components/MainContent.d.ts +0 -13
- package/dist/components/EzLayout/hooks/useLayoutImperative.d.ts +0 -17
- package/dist/components/EzLayout/hooks/useLayoutState.d.ts +0 -25
- package/dist/components/EzLayout/index.d.ts +0 -19
- package/dist/components/EzLayout/useEzLayout.d.ts +0 -26
- package/dist/components/EzScheduler/EzScheduler.types.d.ts +0 -1173
- package/dist/components/EzScheduler/EzSchedulerToolbar.d.ts +0 -117
- package/dist/components/EzScheduler/components/EzEventModal.d.ts +0 -17
- package/dist/components/EzScheduler/components/EzOverlapAlert.d.ts +0 -12
- package/dist/components/EzScheduler/components/EzQuickInfoPopup.d.ts +0 -22
- package/dist/components/EzScheduler/components/EzResourceSidebar.d.ts +0 -33
- package/dist/components/EzScheduler/components/EzSchedulerContent.d.ts +0 -123
- package/dist/components/EzScheduler/components/EzSchedulerQuickAdd.d.ts +0 -17
- package/dist/components/EzScheduler/components/RecurrenceEditor.d.ts +0 -7
- package/dist/components/EzScheduler/components/SchedulerLoadingSpinner.d.ts +0 -2
- package/dist/components/EzScheduler/components/dnd/DraggableEvent.d.ts +0 -22
- package/dist/components/EzScheduler/components/dnd/DroppableSlot.d.ts +0 -19
- package/dist/components/EzScheduler/hooks/useRecurrence.d.ts +0 -2
- package/dist/components/EzScheduler/hooks/useSchedulerEventHandlers.d.ts +0 -11
- package/dist/components/EzScheduler/hooks/useSchedulerEvents.d.ts +0 -27
- package/dist/components/EzScheduler/hooks/useSchedulerImperative.d.ts +0 -19
- package/dist/components/EzScheduler/hooks/useSchedulerNavigation.d.ts +0 -9
- package/dist/components/EzScheduler/hooks/useSchedulerResources.d.ts +0 -10
- package/dist/components/EzScheduler/hooks/useSchedulerState.d.ts +0 -14
- package/dist/components/EzScheduler/hooks/useSchedulerVirtualization.d.ts +0 -9
- package/dist/components/EzScheduler/index.d.ts +0 -41
- package/dist/components/EzScheduler/models/EventSettings.d.ts +0 -11
- package/dist/components/EzScheduler/models/View.d.ts +0 -49
- package/dist/components/EzScheduler/models/index.d.ts +0 -2
- package/dist/components/EzScheduler/services/AttendeeService.d.ts +0 -15
- package/dist/components/EzScheduler/services/AuditService.d.ts +0 -15
- package/dist/components/EzScheduler/services/CollisionDetectionService.d.ts +0 -19
- package/dist/components/EzScheduler/services/DragAndDropService.d.ts +0 -16
- package/dist/components/EzScheduler/services/HistoryService.d.ts +0 -31
- package/dist/components/EzScheduler/services/ICalendarImportService.d.ts +0 -16
- package/dist/components/EzScheduler/services/PrintService.d.ts +0 -7
- package/dist/components/EzScheduler/services/RecurrenceEngine.d.ts +0 -7
- package/dist/components/EzScheduler/services/ReminderService.d.ts +0 -17
- package/dist/components/EzScheduler/services/SchedulerService.d.ts +0 -69
- package/dist/components/EzScheduler/services/SearchService.d.ts +0 -11
- package/dist/components/EzScheduler/services/SecurityService.d.ts +0 -25
- package/dist/components/EzScheduler/services/TimezoneService.d.ts +0 -20
- package/dist/components/EzScheduler/services/VirtualScrollingService.d.ts +0 -34
- package/dist/components/EzScheduler/state/scheduler.store.d.ts +0 -27
- package/dist/components/EzScheduler/templates/CellTemplate.d.ts +0 -42
- package/dist/components/EzScheduler/templates/EditorTemplate.d.ts +0 -32
- package/dist/components/EzScheduler/templates/HeaderTemplate.d.ts +0 -36
- package/dist/components/EzScheduler/tests/phase1_rendering.spec.d.ts +0 -1
- package/dist/components/EzScheduler/tests/phase2_events.spec.d.ts +0 -1
- package/dist/components/EzScheduler/tests/phase3_templates.spec.d.ts +0 -1
- package/dist/components/EzScheduler/tests/phase4_export.spec.d.ts +0 -1
- package/dist/components/EzScheduler/tests/phase5_advanced.spec.d.ts +0 -1
- package/dist/components/EzScheduler/tests/phase6_security.spec.d.ts +0 -1
- package/dist/components/EzScheduler/tests/phase7_regression.spec.d.ts +0 -1
- package/dist/components/EzScheduler/useEzScheduler.d.ts +0 -156
- package/dist/components/EzScheduler/utils/createDragConstraint.d.ts +0 -7
- package/dist/components/EzScheduler/utils/getWeekNumber.d.ts +0 -8
- package/dist/components/EzScheduler/utils/sanitizeHtml.d.ts +0 -17
- package/dist/components/EzScheduler/views/AgendaView.d.ts +0 -28
- package/dist/components/EzScheduler/views/DayWeekView.d.ts +0 -177
- package/dist/components/EzScheduler/views/MonthView.d.ts +0 -60
- package/dist/components/EzScheduler/views/TimelineView.d.ts +0 -116
- package/dist/components/EzSignature/EzSignature.d.ts +0 -42
- package/dist/components/EzSignature/EzSignature.test.d.ts +0 -1
- package/dist/components/EzSignature/EzSignature.types.d.ts +0 -132
- package/dist/components/EzSignature/index.d.ts +0 -2
- package/dist/components/EzTable/EzColumnMenu.d.ts +0 -7
- package/dist/components/EzTable/EzDateFilterTree.d.ts +0 -7
- package/dist/components/EzTable/EzExcelFilter.d.ts +0 -7
- package/dist/components/EzTable/EzFilterBuilder.d.ts +0 -12
- package/dist/components/EzTable/EzGroupingPanel.d.ts +0 -9
- package/dist/components/EzTable/EzHeaderContextMenu.d.ts +0 -8
- package/dist/components/EzTable/EzPagination.d.ts +0 -19
- package/dist/components/EzTable/EzTable.types.d.ts +0 -1483
- package/dist/components/EzTable/EzTableEditDialog.d.ts +0 -15
- package/dist/components/EzTable/EzTableFooter.d.ts +0 -10
- package/dist/components/EzTable/EzTableOverlays.d.ts +0 -11
- package/dist/components/EzTable/EzTableStatusBar.d.ts +0 -6
- package/dist/components/EzTable/EzTableToolbar.d.ts +0 -58
- package/dist/components/EzTable/SmartCell.d.ts +0 -7
- package/dist/components/EzTable/__tests__/EzTableDX.test.d.ts +0 -0
- package/dist/components/EzTable/__tests__/EzTableEnterprise.test.d.ts +0 -1
- package/dist/components/EzTable/__tests__/useEzTable.test.d.ts +0 -1
- package/dist/components/EzTable/components/AdvancedColumnFilter.d.ts +0 -16
- package/dist/components/EzTable/components/BooleanFilterSection.d.ts +0 -7
- package/dist/components/EzTable/components/EzDraggableHeader.d.ts +0 -10
- package/dist/components/EzTable/components/EzHeaderDragPreview.d.ts +0 -7
- package/dist/components/EzTable/components/EzTableBodySection.d.ts +0 -70
- package/dist/components/EzTable/components/EzTableCell.d.ts +0 -46
- package/dist/components/EzTable/components/EzTableHeaderSection.d.ts +0 -22
- package/dist/components/EzTable/components/EzTablePaginationSection.d.ts +0 -31
- package/dist/components/EzTable/components/EzTableRow.d.ts +0 -56
- package/dist/components/EzTable/components/FilterActionButtons.d.ts +0 -16
- package/dist/components/EzTable/components/FilterRuleSelect.d.ts +0 -26
- package/dist/components/EzTable/components/SelectAllCheckbox.d.ts +0 -21
- package/dist/components/EzTable/components/SelectFilterSection.d.ts +0 -18
- package/dist/components/EzTable/components/VirtualizedFilterList.d.ts +0 -21
- package/dist/components/EzTable/constants/filterOptions.d.ts +0 -47
- package/dist/components/EzTable/context/EzTableContext.d.ts +0 -10
- package/dist/components/EzTable/context/TableConfigContext.d.ts +0 -13
- package/dist/components/EzTable/context/TableStore.d.ts +0 -17
- package/dist/components/EzTable/filterUtils.d.ts +0 -5
- package/dist/components/EzTable/hooks/useAutoFit.d.ts +0 -4
- package/dist/components/EzTable/hooks/useCellEventHandlers.d.ts +0 -16
- package/dist/components/EzTable/hooks/useColumnSizeVars.d.ts +0 -6
- package/dist/components/EzTable/hooks/useContainerResize.d.ts +0 -11
- package/dist/components/EzTable/hooks/useDialogStateInitialization.d.ts +0 -8
- package/dist/components/EzTable/hooks/useFilterSelection.d.ts +0 -12
- package/dist/components/EzTable/hooks/useTableFiltering.d.ts +0 -23
- package/dist/components/EzTable/hooks/useTableHistory.d.ts +0 -87
- package/dist/components/EzTable/hooks/useTableImperative.d.ts +0 -42
- package/dist/components/EzTable/hooks/useTableSelection.d.ts +0 -32
- package/dist/components/EzTable/hooks/useTableState.d.ts +0 -33
- package/dist/components/EzTable/hooks/useTableVirtualization.d.ts +0 -33
- package/dist/components/EzTable/index.d.ts +0 -51
- package/dist/components/EzTable/renderers/index.d.ts +0 -6
- package/dist/components/EzTable/services/TableService.d.ts +0 -26
- package/dist/components/EzTable/useEzTable.d.ts +0 -17
- package/dist/components/EzTable/utils/TextMeasurer.d.ts +0 -1
- package/dist/components/EzTable/utils/TruncatedTooltip.d.ts +0 -7
- package/dist/components/EzTable/utils/columnTypeDetector.d.ts +0 -5
- package/dist/components/EzTable/utils/filterTypeGuards.d.ts +0 -3
- package/dist/components/EzTable/utils/index.d.ts +0 -1
- package/dist/components/EzTreeView/EzTreeView.types.d.ts +0 -364
- package/dist/components/EzTreeView/EzTreeViewItem.d.ts +0 -89
- package/dist/components/EzTreeView/EzVirtualTree.d.ts +0 -84
- package/dist/components/EzTreeView/components/EzTreeViewLoadingSpinner.d.ts +0 -2
- package/dist/components/EzTreeView/hooks/useTreeDragDrop.d.ts +0 -31
- package/dist/components/EzTreeView/hooks/useTreeExpansion.d.ts +0 -21
- package/dist/components/EzTreeView/hooks/useTreeImperative.d.ts +0 -28
- package/dist/components/EzTreeView/hooks/useTreeSelection.d.ts +0 -31
- package/dist/components/EzTreeView/hooks/useTreeState.d.ts +0 -21
- package/dist/components/EzTreeView/hooks/useTreeVirtualization.d.ts +0 -18
- package/dist/components/EzTreeView/index.d.ts +0 -40
- package/dist/components/EzTreeView/services/TreeService.d.ts +0 -11
- package/dist/components/EzTreeView/useEzTreeView.d.ts +0 -62
- package/dist/components/EzTreeView/utils/treeUtils.d.ts +0 -17
- package/dist/components/shared/components/EzErrorBoundary.d.ts +0 -18
- package/dist/components/shared/components/EzLayoutErrorFallback.d.ts +0 -2
- package/dist/components/shared/components/EzLoadingSpinner.d.ts +0 -8
- package/dist/components/shared/components/EzSchedulerErrorFallback.d.ts +0 -2
- package/dist/components/shared/components/EzSortableList.d.ts +0 -12
- package/dist/components/shared/components/EzTableErrorFallback.d.ts +0 -2
- package/dist/components/shared/components/EzTreeViewErrorFallback.d.ts +0 -2
- package/dist/components/ui/avatar.d.ts +0 -5
- package/dist/components/ui/badge.d.ts +0 -9
- package/dist/components/ui/breadcrumb.d.ts +0 -19
- package/dist/components/ui/button.d.ts +0 -12
- package/dist/components/ui/calendar.d.ts +0 -15
- package/dist/components/ui/card.d.ts +0 -8
- package/dist/components/ui/checkbox.d.ts +0 -7
- package/dist/components/ui/command.d.ts +0 -78
- package/dist/components/ui/context-menu.d.ts +0 -27
- package/dist/components/ui/date-time-picker.d.ts +0 -13
- package/dist/components/ui/dropdown-menu.d.ts +0 -31
- package/dist/components/ui/index.d.ts +0 -26
- package/dist/components/ui/input.d.ts +0 -5
- package/dist/components/ui/label.d.ts +0 -5
- package/dist/components/ui/modal.d.ts +0 -9
- package/dist/components/ui/password-input.d.ts +0 -5
- package/dist/components/ui/popover.d.ts +0 -8
- package/dist/components/ui/progress.d.ts +0 -7
- package/dist/components/ui/radio-group.d.ts +0 -5
- package/dist/components/ui/scroll-area.d.ts +0 -5
- package/dist/components/ui/select.d.ts +0 -24
- package/dist/components/ui/skeleton.d.ts +0 -2
- package/dist/components/ui/switch.d.ts +0 -4
- package/dist/components/ui/table.d.ts +0 -10
- package/dist/components/ui/tabs.d.ts +0 -14
- package/dist/components/ui/textarea.d.ts +0 -5
- package/dist/components/ui/tooltip.d.ts +0 -7
- package/dist/date-time-picker-B2tSbaRc.js +0 -159
- package/dist/date-time-picker-Deh93EDj.cjs +0 -1
- package/dist/dropdown-menu-CWJm63sY.cjs +0 -1
- package/dist/index-CKMsfSAw.cjs +0 -1
- package/dist/index-CedkIiOJ.cjs +0 -7
- package/dist/index-CkfgA8Bi.js +0 -2770
- package/dist/index-CttEX_uI.cjs +0 -1
- package/dist/index-DOG_BjY5.js +0 -5160
- package/dist/index-DsqdsQCA.cjs +0 -2
- package/dist/index-pQsRNx7n.js +0 -3059
- package/dist/input-CLx5saxs.cjs +0 -1
- package/dist/label-BKm-cRhA.js +0 -55
- package/dist/label-LCQNWTby.cjs +0 -1
- package/dist/lib/perfect-freehand.d.ts +0 -221
- package/dist/lib/utils.d.ts +0 -2
- package/dist/popover-BeeqWciu.js +0 -20
- package/dist/popover-XTqxzU8e.cjs +0 -1
- package/dist/scroll-area-DSLYCq0c.cjs +0 -1
- package/dist/select-C2ilzzSU.js +0 -29
- package/dist/select-CRGSbNAp.cjs +0 -1
- package/dist/shared/components/AnimatedText.d.ts +0 -44
- package/dist/shared/components/BaseCell.d.ts +0 -14
- package/dist/shared/components/BooleanRenderer.d.ts +0 -34
- package/dist/shared/components/ChartRenderer.d.ts +0 -19
- package/dist/shared/components/DeleteConfirmationModal.d.ts +0 -11
- package/dist/shared/components/EzContextMenu.d.ts +0 -12
- package/dist/shared/components/EzNotificationDropdown.d.ts +0 -1
- package/dist/shared/components/HighlightText.d.ts +0 -4
- package/dist/shared/components/Modal.d.ts +0 -13
- package/dist/shared/components/NotificationPanel.d.ts +0 -2
- package/dist/shared/components/PrimitiveRenderer.d.ts +0 -39
- package/dist/shared/components/SearchableSelect.d.ts +0 -13
- package/dist/shared/components/SelectRenderer.d.ts +0 -33
- package/dist/shared/components/StatusBadge.d.ts +0 -17
- package/dist/shared/components/TooltipWrapper.d.ts +0 -12
- package/dist/shared/components/index.d.ts +0 -9
- package/dist/shared/hooks/index.d.ts +0 -56
- package/dist/shared/hooks/useBaseComponent.d.ts +0 -59
- package/dist/shared/hooks/useComponentImperativeAPI.d.ts +0 -11
- package/dist/shared/hooks/useComponentState.d.ts +0 -39
- package/dist/shared/hooks/useCurrentTime.d.ts +0 -6
- package/dist/shared/hooks/useDataChangeEvents.d.ts +0 -53
- package/dist/shared/hooks/useDebounce.d.ts +0 -10
- package/dist/shared/hooks/useDeleteConfirmation.d.ts +0 -9
- package/dist/shared/hooks/useDialogState.d.ts +0 -21
- package/dist/shared/hooks/useDndHandlers.d.ts +0 -19
- package/dist/shared/hooks/useEditing.d.ts +0 -107
- package/dist/shared/hooks/useEventHandlers.d.ts +0 -61
- package/dist/shared/hooks/useEzTheme.d.ts +0 -22
- package/dist/shared/hooks/useFieldValidation.d.ts +0 -24
- package/dist/shared/hooks/useHistory.d.ts +0 -13
- package/dist/shared/hooks/useI18n.d.ts +0 -9
- package/dist/shared/hooks/useImperativeAPI.d.ts +0 -8
- package/dist/shared/hooks/useInitCoreServices.d.ts +0 -5
- package/dist/shared/hooks/useKeyboardNavigation.d.ts +0 -36
- package/dist/shared/hooks/useKeyboardShortcuts.d.ts +0 -14
- package/dist/shared/hooks/useLifecycleEvents.d.ts +0 -22
- package/dist/shared/hooks/useLoadingState.d.ts +0 -17
- package/dist/shared/hooks/useMediaQuery.d.ts +0 -6
- package/dist/shared/hooks/useNotificationService.d.ts +0 -8
- package/dist/shared/hooks/usePerformanceMonitor.d.ts +0 -15
- package/dist/shared/hooks/useRowSelectionEvents.d.ts +0 -44
- package/dist/shared/hooks/useSelection.d.ts +0 -73
- package/dist/shared/hooks/useService.d.ts +0 -12
- package/dist/shared/hooks/useServiceState.d.ts +0 -1
- package/dist/shared/hooks/useStateChangeEvents.d.ts +0 -61
- package/dist/shared/hooks/useTheme.d.ts +0 -13
- package/dist/shared/hooks/useVirtualization.d.ts +0 -85
- package/dist/shared/services/BaseService.d.ts +0 -57
- package/dist/shared/services/ContextMenuService.d.ts +0 -58
- package/dist/shared/services/ExportService.d.ts +0 -35
- package/dist/shared/services/FocusManagerService.d.ts +0 -33
- package/dist/shared/services/HierarchyService.d.ts +0 -43
- package/dist/shared/services/I18nService.d.ts +0 -83
- package/dist/shared/services/LayoutService.d.ts +0 -80
- package/dist/shared/services/NotificationService.d.ts +0 -44
- package/dist/shared/services/PersistenceService.d.ts +0 -69
- package/dist/shared/services/ServiceRegistry.d.ts +0 -51
- package/dist/shared/services/ThemeService.d.ts +0 -49
- package/dist/shared/services/VirtualizationService.d.ts +0 -51
- package/dist/shared/state/store.d.ts +0 -10
- package/dist/shared/themes.d.ts +0 -25
- package/dist/shared/types/BaseProps.d.ts +0 -18
- package/dist/shared/types/common.d.ts +0 -292
- package/dist/shared/types/commonTypes.d.ts +0 -101
- package/dist/shared/types/index.d.ts +0 -2
- package/dist/shared/utils/canvasUtils.d.ts +0 -16
- package/dist/shared/utils/commonUtils.d.ts +0 -28
- package/dist/shared/utils/csvUtils.d.ts +0 -7
- package/dist/shared/utils/dateUtils.d.ts +0 -5
- package/dist/shared/utils/dndUtils.d.ts +0 -16
- package/dist/shared/utils/ezStyleUtils.d.ts +0 -64
- package/dist/shared/utils/formatUtils.d.ts +0 -20
- package/dist/shared/utils/imperativeApiUtils.d.ts +0 -36
- package/dist/shared/utils/index.d.ts +0 -11
- package/dist/shared/utils/renderUtils.d.ts +0 -6
- package/dist/shared/utils/serviceUtils.d.ts +0 -10
- package/dist/shared/utils/styleUtils.d.ts +0 -62
- package/dist/shared/utils/validationUtils.d.ts +0 -16
- package/dist/useInitCoreServices-BcaFmvd7.cjs +0 -6
- package/dist/useInitCoreServices-D7ULb_o1.js +0 -1123
- package/dist/useService-DyObZbms.js +0 -10
- package/dist/useService-HnwXFVZ4.cjs +0 -1
- package/dist/useServiceState-BB--S9SC.js +0 -254
- package/dist/useServiceState-DTwwV2II.cjs +0 -1
|
@@ -0,0 +1,3500 @@
|
|
|
1
|
+
import * as R from "react";
|
|
2
|
+
import P, { useRef as N, useState as X, useEffect as E, useMemo as M, useCallback as V, useLayoutEffect as mr, createContext as je, memo as br, useReducer as xr, useContext as we, cloneElement as yr, forwardRef as wr } from "react";
|
|
3
|
+
import { defaultRangeExtractor as Cr, elementScroll as Sr, useVirtualizer as qt } from "@tanstack/react-virtual";
|
|
4
|
+
import { u as dn, c as le } from "./useInitCoreServices-J1k9YgF4.js";
|
|
5
|
+
import { Virtualizer as Rr, elementScroll as Dr } from "@tanstack/virtual-core";
|
|
6
|
+
import { g as Er, x as Mr, R as Nr, A as Ar, P as Or, b as Le, e as fn, f as Tr, h as zr, S as Ir, I as Pr, i as Lr, G as kr, l as _r, u as Br, m as Fr, j as $r, k as Vr, L as jr, n as Ur, o as Xr, p as Gr, q as Yr, r as Kr, s as Wr, C as Hr } from "./EzErrorBoundary-H8HQBTwU.js";
|
|
7
|
+
import { unstable_batchedUpdates as Qe, createPortal as qr } from "react-dom";
|
|
8
|
+
import { jsx as p, jsxs as se, Fragment as et } from "react/jsx-runtime";
|
|
9
|
+
class Jr {
|
|
10
|
+
name = "VirtualizationService";
|
|
11
|
+
// In a real implementation, we might store multiple virtualizer instances mapped by ID
|
|
12
|
+
virtualizers = /* @__PURE__ */ new Map();
|
|
13
|
+
/**
|
|
14
|
+
* Creates and registers a new virtualizer instance.
|
|
15
|
+
* @param id Unique identifier for the virtualizer.
|
|
16
|
+
* @param options Configuration for the virtualizer.
|
|
17
|
+
* @returns The newly created virtualizer instance.
|
|
18
|
+
* @group Methods
|
|
19
|
+
*/
|
|
20
|
+
createVirtualizer(t, n) {
|
|
21
|
+
const r = new Rr({
|
|
22
|
+
count: n.count,
|
|
23
|
+
getScrollElement: n.getScrollElement,
|
|
24
|
+
estimateSize: n.estimateSize,
|
|
25
|
+
overscan: n.overscan ?? 5,
|
|
26
|
+
horizontal: n.horizontal ?? !1,
|
|
27
|
+
scrollToFn: Dr,
|
|
28
|
+
observeElementRect: (o, i) => {
|
|
29
|
+
const a = o.scrollElement;
|
|
30
|
+
if (!a || a === window) return;
|
|
31
|
+
const s = new ResizeObserver((c) => {
|
|
32
|
+
i(c[0].contentRect);
|
|
33
|
+
});
|
|
34
|
+
return s.observe(a), () => s.disconnect();
|
|
35
|
+
},
|
|
36
|
+
observeElementOffset: (o, i) => {
|
|
37
|
+
const a = o.scrollElement;
|
|
38
|
+
if (!a) return;
|
|
39
|
+
const s = () => {
|
|
40
|
+
i(a === window ? window.scrollY : a.scrollTop, !0);
|
|
41
|
+
};
|
|
42
|
+
return a.addEventListener("scroll", s, { passive: !0 }), i(a === window ? window.scrollY : a.scrollTop, !1), () => a.removeEventListener("scroll", s);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return this.virtualizers.set(t, r), r;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Registers an existing virtualizer instance with the service.
|
|
49
|
+
* @param id Unique identifier for the virtualizer.
|
|
50
|
+
* @param virtualizer The virtualizer instance to register.
|
|
51
|
+
* @group Methods
|
|
52
|
+
*/
|
|
53
|
+
registerVirtualizer(t, n) {
|
|
54
|
+
this.virtualizers.set(t, n);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Retrieves a registered virtualizer instance by its ID.
|
|
58
|
+
* @group Methods
|
|
59
|
+
*/
|
|
60
|
+
getVirtualizer(t) {
|
|
61
|
+
return this.virtualizers.get(t);
|
|
62
|
+
}
|
|
63
|
+
cleanup() {
|
|
64
|
+
this.virtualizers.clear();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const ss = (e) => {
|
|
68
|
+
const {
|
|
69
|
+
rowCount: t,
|
|
70
|
+
rowHeight: n = 48,
|
|
71
|
+
overscanCount: r = 5,
|
|
72
|
+
enableRowVirtualization: o = !0,
|
|
73
|
+
columnCount: i = 0,
|
|
74
|
+
columnWidth: a = 150,
|
|
75
|
+
enableColumnVirtualization: s = !1,
|
|
76
|
+
scrollMargin: c = 0,
|
|
77
|
+
scrollPaddingStart: l = 0,
|
|
78
|
+
scrollPaddingEnd: d = 0,
|
|
79
|
+
progressiveRendering: u = !1,
|
|
80
|
+
prefetchDistance: f = 5,
|
|
81
|
+
adaptiveSizing: h = !1,
|
|
82
|
+
languageDirection: S = "ltr",
|
|
83
|
+
debug: g = !1,
|
|
84
|
+
customRangeExtractor: v,
|
|
85
|
+
onScroll: x,
|
|
86
|
+
onScrollStart: w,
|
|
87
|
+
onScrollStop: y
|
|
88
|
+
} = e, z = N(null), [C, A] = X(u ? 1 : r || f), b = N(null), m = N(null), O = N(!1), L = "lanugageDirection";
|
|
89
|
+
E(() => {
|
|
90
|
+
if (!u) return;
|
|
91
|
+
let I;
|
|
92
|
+
const B = () => {
|
|
93
|
+
A(1), clearTimeout(I), I = setTimeout(() => {
|
|
94
|
+
A(r || f);
|
|
95
|
+
}, 150);
|
|
96
|
+
}, de = z.current;
|
|
97
|
+
if (de)
|
|
98
|
+
return de.addEventListener("scroll", B, { passive: !0 }), () => {
|
|
99
|
+
de.removeEventListener("scroll", B), clearTimeout(I);
|
|
100
|
+
};
|
|
101
|
+
}, [u, r, f]);
|
|
102
|
+
const T = M(() => v || ((I) => {
|
|
103
|
+
const B = Cr(I);
|
|
104
|
+
return B.length === 0 && I.count > 0 ? [0] : B;
|
|
105
|
+
}), [v]), H = V(
|
|
106
|
+
(I, B, de) => {
|
|
107
|
+
Sr(I, B, de);
|
|
108
|
+
},
|
|
109
|
+
[]
|
|
110
|
+
), Q = M(() => ({
|
|
111
|
+
count: t,
|
|
112
|
+
getScrollElement: () => z.current,
|
|
113
|
+
estimateSize: typeof n == "function" ? n : () => n,
|
|
114
|
+
overscan: C,
|
|
115
|
+
scrollMargin: c,
|
|
116
|
+
scrollPaddingStart: l,
|
|
117
|
+
scrollPaddingEnd: d,
|
|
118
|
+
rangeExtractor: T,
|
|
119
|
+
scrollToFn: H,
|
|
120
|
+
[L]: S,
|
|
121
|
+
onChange: (I) => {
|
|
122
|
+
const B = I.scrollOffset ?? 0;
|
|
123
|
+
m.current !== null && cancelAnimationFrame(m.current), m.current = requestAnimationFrame(() => {
|
|
124
|
+
x?.(B), m.current = null;
|
|
125
|
+
}), I.isScrolling ? O.current || (O.current = !0, w?.()) : O.current && (O.current = !1, y?.());
|
|
126
|
+
}
|
|
127
|
+
}), [
|
|
128
|
+
t,
|
|
129
|
+
n,
|
|
130
|
+
C,
|
|
131
|
+
h,
|
|
132
|
+
c,
|
|
133
|
+
l,
|
|
134
|
+
d,
|
|
135
|
+
T,
|
|
136
|
+
H,
|
|
137
|
+
x,
|
|
138
|
+
w,
|
|
139
|
+
y
|
|
140
|
+
]), k = qt(Q);
|
|
141
|
+
E(() => {
|
|
142
|
+
g && console.log("[DEBUG_VIRTUAL] Virtualizer instance changed");
|
|
143
|
+
}, [k, g]);
|
|
144
|
+
const Ke = dn(), Ce = M(() => Er(
|
|
145
|
+
Ke,
|
|
146
|
+
"VirtualizationService",
|
|
147
|
+
() => new Jr()
|
|
148
|
+
), []);
|
|
149
|
+
E(() => {
|
|
150
|
+
e.id && Ce && Ce.registerVirtualizer(e.id, k);
|
|
151
|
+
}, [e.id, k, Ce]);
|
|
152
|
+
const Z = M(() => ({
|
|
153
|
+
horizontal: !0,
|
|
154
|
+
count: s && i ? i : 0,
|
|
155
|
+
getScrollElement: () => z.current,
|
|
156
|
+
estimateSize: typeof a == "function" ? a : () => a,
|
|
157
|
+
overscan: C,
|
|
158
|
+
rangeExtractor: T,
|
|
159
|
+
[L]: S
|
|
160
|
+
}), [s, i, a, C, T]), We = qt(Z), ee = s && i ? We : void 0;
|
|
161
|
+
E(() => () => {
|
|
162
|
+
b.current && clearTimeout(b.current), m.current !== null && cancelAnimationFrame(m.current);
|
|
163
|
+
}, []), E(() => {
|
|
164
|
+
g && process.env.NODE_ENV !== "production" && console.log("Virtualization Debug:", {
|
|
165
|
+
rowCount: t,
|
|
166
|
+
visibleRows: k.getVirtualItems().length,
|
|
167
|
+
activeOverscan: C,
|
|
168
|
+
scrollOffset: k.scrollOffset
|
|
169
|
+
});
|
|
170
|
+
}, [g, t, k, C]);
|
|
171
|
+
const Se = (I, B) => {
|
|
172
|
+
k.scrollToIndex(I, B);
|
|
173
|
+
};
|
|
174
|
+
return {
|
|
175
|
+
parentRef: z,
|
|
176
|
+
rowVirtualizer: k,
|
|
177
|
+
columnVirtualizer: ee,
|
|
178
|
+
scrollToIndex: Se,
|
|
179
|
+
scrollToRow: Se,
|
|
180
|
+
scrollToColumn: ee ? (I, B) => {
|
|
181
|
+
ee.scrollToIndex(I, B);
|
|
182
|
+
} : void 0,
|
|
183
|
+
getVirtualItems: () => k.getVirtualItems(),
|
|
184
|
+
scrollOffset: k.scrollOffset ?? 0
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
function as() {
|
|
188
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
189
|
+
t[n] = arguments[n];
|
|
190
|
+
return M(
|
|
191
|
+
() => (r) => {
|
|
192
|
+
t.forEach((o) => o(r));
|
|
193
|
+
},
|
|
194
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
195
|
+
t
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
const ut = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
199
|
+
function Ae(e) {
|
|
200
|
+
const t = Object.prototype.toString.call(e);
|
|
201
|
+
return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
|
|
202
|
+
t === "[object global]";
|
|
203
|
+
}
|
|
204
|
+
function Nt(e) {
|
|
205
|
+
return "nodeType" in e;
|
|
206
|
+
}
|
|
207
|
+
function G(e) {
|
|
208
|
+
var t, n;
|
|
209
|
+
return e ? Ae(e) ? e : Nt(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
|
|
210
|
+
}
|
|
211
|
+
function At(e) {
|
|
212
|
+
const {
|
|
213
|
+
Document: t
|
|
214
|
+
} = G(e);
|
|
215
|
+
return e instanceof t;
|
|
216
|
+
}
|
|
217
|
+
function Ue(e) {
|
|
218
|
+
return Ae(e) ? !1 : e instanceof G(e).HTMLElement;
|
|
219
|
+
}
|
|
220
|
+
function hn(e) {
|
|
221
|
+
return e instanceof G(e).SVGElement;
|
|
222
|
+
}
|
|
223
|
+
function Oe(e) {
|
|
224
|
+
return e ? Ae(e) ? e.document : Nt(e) ? At(e) ? e : Ue(e) || hn(e) ? e.ownerDocument : document : document : document;
|
|
225
|
+
}
|
|
226
|
+
const ce = ut ? mr : E;
|
|
227
|
+
function dt(e) {
|
|
228
|
+
const t = N(e);
|
|
229
|
+
return ce(() => {
|
|
230
|
+
t.current = e;
|
|
231
|
+
}), V(function() {
|
|
232
|
+
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
233
|
+
r[o] = arguments[o];
|
|
234
|
+
return t.current == null ? void 0 : t.current(...r);
|
|
235
|
+
}, []);
|
|
236
|
+
}
|
|
237
|
+
function Qr() {
|
|
238
|
+
const e = N(null), t = V((r, o) => {
|
|
239
|
+
e.current = setInterval(r, o);
|
|
240
|
+
}, []), n = V(() => {
|
|
241
|
+
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
242
|
+
}, []);
|
|
243
|
+
return [t, n];
|
|
244
|
+
}
|
|
245
|
+
function Fe(e, t) {
|
|
246
|
+
t === void 0 && (t = [e]);
|
|
247
|
+
const n = N(e);
|
|
248
|
+
return ce(() => {
|
|
249
|
+
n.current !== e && (n.current = e);
|
|
250
|
+
}, t), n;
|
|
251
|
+
}
|
|
252
|
+
function Xe(e, t) {
|
|
253
|
+
const n = N();
|
|
254
|
+
return M(
|
|
255
|
+
() => {
|
|
256
|
+
const r = e(n.current);
|
|
257
|
+
return n.current = r, r;
|
|
258
|
+
},
|
|
259
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
260
|
+
[...t]
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
function ot(e) {
|
|
264
|
+
const t = dt(e), n = N(null), r = V(
|
|
265
|
+
(o) => {
|
|
266
|
+
o !== n.current && t?.(o, n.current), n.current = o;
|
|
267
|
+
},
|
|
268
|
+
//eslint-disable-next-line
|
|
269
|
+
[]
|
|
270
|
+
);
|
|
271
|
+
return [n, r];
|
|
272
|
+
}
|
|
273
|
+
function it(e) {
|
|
274
|
+
const t = N();
|
|
275
|
+
return E(() => {
|
|
276
|
+
t.current = e;
|
|
277
|
+
}, [e]), t.current;
|
|
278
|
+
}
|
|
279
|
+
let yt = {};
|
|
280
|
+
function ft(e, t) {
|
|
281
|
+
return M(() => {
|
|
282
|
+
if (t)
|
|
283
|
+
return t;
|
|
284
|
+
const n = yt[e] == null ? 0 : yt[e] + 1;
|
|
285
|
+
return yt[e] = n, e + "-" + n;
|
|
286
|
+
}, [e, t]);
|
|
287
|
+
}
|
|
288
|
+
function gn(e) {
|
|
289
|
+
return function(t) {
|
|
290
|
+
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
291
|
+
r[o - 1] = arguments[o];
|
|
292
|
+
return r.reduce((i, a) => {
|
|
293
|
+
const s = Object.entries(a);
|
|
294
|
+
for (const [c, l] of s) {
|
|
295
|
+
const d = i[c];
|
|
296
|
+
d != null && (i[c] = d + e * l);
|
|
297
|
+
}
|
|
298
|
+
return i;
|
|
299
|
+
}, {
|
|
300
|
+
...t
|
|
301
|
+
});
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
const Ne = /* @__PURE__ */ gn(1), st = /* @__PURE__ */ gn(-1);
|
|
305
|
+
function Zr(e) {
|
|
306
|
+
return "clientX" in e && "clientY" in e;
|
|
307
|
+
}
|
|
308
|
+
function Ot(e) {
|
|
309
|
+
if (!e)
|
|
310
|
+
return !1;
|
|
311
|
+
const {
|
|
312
|
+
KeyboardEvent: t
|
|
313
|
+
} = G(e.target);
|
|
314
|
+
return t && e instanceof t;
|
|
315
|
+
}
|
|
316
|
+
function eo(e) {
|
|
317
|
+
if (!e)
|
|
318
|
+
return !1;
|
|
319
|
+
const {
|
|
320
|
+
TouchEvent: t
|
|
321
|
+
} = G(e.target);
|
|
322
|
+
return t && e instanceof t;
|
|
323
|
+
}
|
|
324
|
+
function at(e) {
|
|
325
|
+
if (eo(e)) {
|
|
326
|
+
if (e.touches && e.touches.length) {
|
|
327
|
+
const {
|
|
328
|
+
clientX: t,
|
|
329
|
+
clientY: n
|
|
330
|
+
} = e.touches[0];
|
|
331
|
+
return {
|
|
332
|
+
x: t,
|
|
333
|
+
y: n
|
|
334
|
+
};
|
|
335
|
+
} else if (e.changedTouches && e.changedTouches.length) {
|
|
336
|
+
const {
|
|
337
|
+
clientX: t,
|
|
338
|
+
clientY: n
|
|
339
|
+
} = e.changedTouches[0];
|
|
340
|
+
return {
|
|
341
|
+
x: t,
|
|
342
|
+
y: n
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return Zr(e) ? {
|
|
347
|
+
x: e.clientX,
|
|
348
|
+
y: e.clientY
|
|
349
|
+
} : null;
|
|
350
|
+
}
|
|
351
|
+
const $e = /* @__PURE__ */ Object.freeze({
|
|
352
|
+
Translate: {
|
|
353
|
+
toString(e) {
|
|
354
|
+
if (!e)
|
|
355
|
+
return;
|
|
356
|
+
const {
|
|
357
|
+
x: t,
|
|
358
|
+
y: n
|
|
359
|
+
} = e;
|
|
360
|
+
return "translate3d(" + (t ? Math.round(t) : 0) + "px, " + (n ? Math.round(n) : 0) + "px, 0)";
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
Scale: {
|
|
364
|
+
toString(e) {
|
|
365
|
+
if (!e)
|
|
366
|
+
return;
|
|
367
|
+
const {
|
|
368
|
+
scaleX: t,
|
|
369
|
+
scaleY: n
|
|
370
|
+
} = e;
|
|
371
|
+
return "scaleX(" + t + ") scaleY(" + n + ")";
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
Transform: {
|
|
375
|
+
toString(e) {
|
|
376
|
+
if (e)
|
|
377
|
+
return [$e.Translate.toString(e), $e.Scale.toString(e)].join(" ");
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
Transition: {
|
|
381
|
+
toString(e) {
|
|
382
|
+
let {
|
|
383
|
+
property: t,
|
|
384
|
+
duration: n,
|
|
385
|
+
easing: r
|
|
386
|
+
} = e;
|
|
387
|
+
return t + " " + n + "ms " + r;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}), Jt = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
391
|
+
function to(e) {
|
|
392
|
+
return e.matches(Jt) ? e : e.querySelector(Jt);
|
|
393
|
+
}
|
|
394
|
+
const no = {
|
|
395
|
+
display: "none"
|
|
396
|
+
};
|
|
397
|
+
function ro(e) {
|
|
398
|
+
let {
|
|
399
|
+
id: t,
|
|
400
|
+
value: n
|
|
401
|
+
} = e;
|
|
402
|
+
return P.createElement("div", {
|
|
403
|
+
id: t,
|
|
404
|
+
style: no
|
|
405
|
+
}, n);
|
|
406
|
+
}
|
|
407
|
+
function oo(e) {
|
|
408
|
+
let {
|
|
409
|
+
id: t,
|
|
410
|
+
announcement: n,
|
|
411
|
+
ariaLiveType: r = "assertive"
|
|
412
|
+
} = e;
|
|
413
|
+
const o = {
|
|
414
|
+
position: "fixed",
|
|
415
|
+
top: 0,
|
|
416
|
+
left: 0,
|
|
417
|
+
width: 1,
|
|
418
|
+
height: 1,
|
|
419
|
+
margin: -1,
|
|
420
|
+
border: 0,
|
|
421
|
+
padding: 0,
|
|
422
|
+
overflow: "hidden",
|
|
423
|
+
clip: "rect(0 0 0 0)",
|
|
424
|
+
clipPath: "inset(100%)",
|
|
425
|
+
whiteSpace: "nowrap"
|
|
426
|
+
};
|
|
427
|
+
return P.createElement("div", {
|
|
428
|
+
id: t,
|
|
429
|
+
style: o,
|
|
430
|
+
role: "status",
|
|
431
|
+
"aria-live": r,
|
|
432
|
+
"aria-atomic": !0
|
|
433
|
+
}, n);
|
|
434
|
+
}
|
|
435
|
+
function io() {
|
|
436
|
+
const [e, t] = X("");
|
|
437
|
+
return {
|
|
438
|
+
announce: V((r) => {
|
|
439
|
+
r != null && t(r);
|
|
440
|
+
}, []),
|
|
441
|
+
announcement: e
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
const pn = /* @__PURE__ */ je(null);
|
|
445
|
+
function so(e) {
|
|
446
|
+
const t = we(pn);
|
|
447
|
+
E(() => {
|
|
448
|
+
if (!t)
|
|
449
|
+
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
450
|
+
return t(e);
|
|
451
|
+
}, [e, t]);
|
|
452
|
+
}
|
|
453
|
+
function ao() {
|
|
454
|
+
const [e] = X(() => /* @__PURE__ */ new Set()), t = V((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
455
|
+
return [V((r) => {
|
|
456
|
+
let {
|
|
457
|
+
type: o,
|
|
458
|
+
event: i
|
|
459
|
+
} = r;
|
|
460
|
+
e.forEach((a) => {
|
|
461
|
+
var s;
|
|
462
|
+
return (s = a[o]) == null ? void 0 : s.call(a, i);
|
|
463
|
+
});
|
|
464
|
+
}, [e]), t];
|
|
465
|
+
}
|
|
466
|
+
const co = {
|
|
467
|
+
draggable: `
|
|
468
|
+
To pick up a draggable item, press the space bar.
|
|
469
|
+
While dragging, use the arrow keys to move the item.
|
|
470
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
471
|
+
`
|
|
472
|
+
}, lo = {
|
|
473
|
+
onDragStart(e) {
|
|
474
|
+
let {
|
|
475
|
+
active: t
|
|
476
|
+
} = e;
|
|
477
|
+
return "Picked up draggable item " + t.id + ".";
|
|
478
|
+
},
|
|
479
|
+
onDragOver(e) {
|
|
480
|
+
let {
|
|
481
|
+
active: t,
|
|
482
|
+
over: n
|
|
483
|
+
} = e;
|
|
484
|
+
return n ? "Draggable item " + t.id + " was moved over droppable area " + n.id + "." : "Draggable item " + t.id + " is no longer over a droppable area.";
|
|
485
|
+
},
|
|
486
|
+
onDragEnd(e) {
|
|
487
|
+
let {
|
|
488
|
+
active: t,
|
|
489
|
+
over: n
|
|
490
|
+
} = e;
|
|
491
|
+
return n ? "Draggable item " + t.id + " was dropped over droppable area " + n.id : "Draggable item " + t.id + " was dropped.";
|
|
492
|
+
},
|
|
493
|
+
onDragCancel(e) {
|
|
494
|
+
let {
|
|
495
|
+
active: t
|
|
496
|
+
} = e;
|
|
497
|
+
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
function uo(e) {
|
|
501
|
+
let {
|
|
502
|
+
announcements: t = lo,
|
|
503
|
+
container: n,
|
|
504
|
+
hiddenTextDescribedById: r,
|
|
505
|
+
screenReaderInstructions: o = co
|
|
506
|
+
} = e;
|
|
507
|
+
const {
|
|
508
|
+
announce: i,
|
|
509
|
+
announcement: a
|
|
510
|
+
} = io(), s = ft("DndLiveRegion"), [c, l] = X(!1);
|
|
511
|
+
if (E(() => {
|
|
512
|
+
l(!0);
|
|
513
|
+
}, []), so(M(() => ({
|
|
514
|
+
onDragStart(u) {
|
|
515
|
+
let {
|
|
516
|
+
active: f
|
|
517
|
+
} = u;
|
|
518
|
+
i(t.onDragStart({
|
|
519
|
+
active: f
|
|
520
|
+
}));
|
|
521
|
+
},
|
|
522
|
+
onDragMove(u) {
|
|
523
|
+
let {
|
|
524
|
+
active: f,
|
|
525
|
+
over: h
|
|
526
|
+
} = u;
|
|
527
|
+
t.onDragMove && i(t.onDragMove({
|
|
528
|
+
active: f,
|
|
529
|
+
over: h
|
|
530
|
+
}));
|
|
531
|
+
},
|
|
532
|
+
onDragOver(u) {
|
|
533
|
+
let {
|
|
534
|
+
active: f,
|
|
535
|
+
over: h
|
|
536
|
+
} = u;
|
|
537
|
+
i(t.onDragOver({
|
|
538
|
+
active: f,
|
|
539
|
+
over: h
|
|
540
|
+
}));
|
|
541
|
+
},
|
|
542
|
+
onDragEnd(u) {
|
|
543
|
+
let {
|
|
544
|
+
active: f,
|
|
545
|
+
over: h
|
|
546
|
+
} = u;
|
|
547
|
+
i(t.onDragEnd({
|
|
548
|
+
active: f,
|
|
549
|
+
over: h
|
|
550
|
+
}));
|
|
551
|
+
},
|
|
552
|
+
onDragCancel(u) {
|
|
553
|
+
let {
|
|
554
|
+
active: f,
|
|
555
|
+
over: h
|
|
556
|
+
} = u;
|
|
557
|
+
i(t.onDragCancel({
|
|
558
|
+
active: f,
|
|
559
|
+
over: h
|
|
560
|
+
}));
|
|
561
|
+
}
|
|
562
|
+
}), [i, t])), !c)
|
|
563
|
+
return null;
|
|
564
|
+
const d = P.createElement(P.Fragment, null, P.createElement(ro, {
|
|
565
|
+
id: r,
|
|
566
|
+
value: o.draggable
|
|
567
|
+
}), P.createElement(oo, {
|
|
568
|
+
id: s,
|
|
569
|
+
announcement: a
|
|
570
|
+
}));
|
|
571
|
+
return n ? qr(d, n) : d;
|
|
572
|
+
}
|
|
573
|
+
var _;
|
|
574
|
+
(function(e) {
|
|
575
|
+
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
576
|
+
})(_ || (_ = {}));
|
|
577
|
+
function ct() {
|
|
578
|
+
}
|
|
579
|
+
function cs(e, t) {
|
|
580
|
+
return M(
|
|
581
|
+
() => ({
|
|
582
|
+
sensor: e,
|
|
583
|
+
options: t ?? {}
|
|
584
|
+
}),
|
|
585
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
586
|
+
[e, t]
|
|
587
|
+
);
|
|
588
|
+
}
|
|
589
|
+
function ls() {
|
|
590
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
591
|
+
t[n] = arguments[n];
|
|
592
|
+
return M(
|
|
593
|
+
() => [...t].filter((r) => r != null),
|
|
594
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
595
|
+
[...t]
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
const re = /* @__PURE__ */ Object.freeze({
|
|
599
|
+
x: 0,
|
|
600
|
+
y: 0
|
|
601
|
+
});
|
|
602
|
+
function Tt(e, t) {
|
|
603
|
+
return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
|
|
604
|
+
}
|
|
605
|
+
function fo(e, t) {
|
|
606
|
+
const n = at(e);
|
|
607
|
+
if (!n)
|
|
608
|
+
return "0 0";
|
|
609
|
+
const r = {
|
|
610
|
+
x: (n.x - t.left) / t.width * 100,
|
|
611
|
+
y: (n.y - t.top) / t.height * 100
|
|
612
|
+
};
|
|
613
|
+
return r.x + "% " + r.y + "%";
|
|
614
|
+
}
|
|
615
|
+
function zt(e, t) {
|
|
616
|
+
let {
|
|
617
|
+
data: {
|
|
618
|
+
value: n
|
|
619
|
+
}
|
|
620
|
+
} = e, {
|
|
621
|
+
data: {
|
|
622
|
+
value: r
|
|
623
|
+
}
|
|
624
|
+
} = t;
|
|
625
|
+
return n - r;
|
|
626
|
+
}
|
|
627
|
+
function ho(e, t) {
|
|
628
|
+
let {
|
|
629
|
+
data: {
|
|
630
|
+
value: n
|
|
631
|
+
}
|
|
632
|
+
} = e, {
|
|
633
|
+
data: {
|
|
634
|
+
value: r
|
|
635
|
+
}
|
|
636
|
+
} = t;
|
|
637
|
+
return r - n;
|
|
638
|
+
}
|
|
639
|
+
function Rt(e) {
|
|
640
|
+
let {
|
|
641
|
+
left: t,
|
|
642
|
+
top: n,
|
|
643
|
+
height: r,
|
|
644
|
+
width: o
|
|
645
|
+
} = e;
|
|
646
|
+
return [{
|
|
647
|
+
x: t,
|
|
648
|
+
y: n
|
|
649
|
+
}, {
|
|
650
|
+
x: t + o,
|
|
651
|
+
y: n
|
|
652
|
+
}, {
|
|
653
|
+
x: t,
|
|
654
|
+
y: n + r
|
|
655
|
+
}, {
|
|
656
|
+
x: t + o,
|
|
657
|
+
y: n + r
|
|
658
|
+
}];
|
|
659
|
+
}
|
|
660
|
+
function go(e, t) {
|
|
661
|
+
if (!e || e.length === 0)
|
|
662
|
+
return null;
|
|
663
|
+
const [n] = e;
|
|
664
|
+
return n[t];
|
|
665
|
+
}
|
|
666
|
+
function Qt(e, t, n) {
|
|
667
|
+
return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
|
|
668
|
+
x: t + e.width * 0.5,
|
|
669
|
+
y: n + e.height * 0.5
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
const us = (e) => {
|
|
673
|
+
let {
|
|
674
|
+
collisionRect: t,
|
|
675
|
+
droppableRects: n,
|
|
676
|
+
droppableContainers: r
|
|
677
|
+
} = e;
|
|
678
|
+
const o = Qt(t, t.left, t.top), i = [];
|
|
679
|
+
for (const a of r) {
|
|
680
|
+
const {
|
|
681
|
+
id: s
|
|
682
|
+
} = a, c = n.get(s);
|
|
683
|
+
if (c) {
|
|
684
|
+
const l = Tt(Qt(c), o);
|
|
685
|
+
i.push({
|
|
686
|
+
id: s,
|
|
687
|
+
data: {
|
|
688
|
+
droppableContainer: a,
|
|
689
|
+
value: l
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
return i.sort(zt);
|
|
695
|
+
}, ds = (e) => {
|
|
696
|
+
let {
|
|
697
|
+
collisionRect: t,
|
|
698
|
+
droppableRects: n,
|
|
699
|
+
droppableContainers: r
|
|
700
|
+
} = e;
|
|
701
|
+
const o = Rt(t), i = [];
|
|
702
|
+
for (const a of r) {
|
|
703
|
+
const {
|
|
704
|
+
id: s
|
|
705
|
+
} = a, c = n.get(s);
|
|
706
|
+
if (c) {
|
|
707
|
+
const l = Rt(c), d = o.reduce((f, h, S) => f + Tt(l[S], h), 0), u = Number((d / 4).toFixed(4));
|
|
708
|
+
i.push({
|
|
709
|
+
id: s,
|
|
710
|
+
data: {
|
|
711
|
+
droppableContainer: a,
|
|
712
|
+
value: u
|
|
713
|
+
}
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
return i.sort(zt);
|
|
718
|
+
};
|
|
719
|
+
function po(e, t) {
|
|
720
|
+
const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), a = o - r, s = i - n;
|
|
721
|
+
if (r < o && n < i) {
|
|
722
|
+
const c = t.width * t.height, l = e.width * e.height, d = a * s, u = d / (c + l - d);
|
|
723
|
+
return Number(u.toFixed(4));
|
|
724
|
+
}
|
|
725
|
+
return 0;
|
|
726
|
+
}
|
|
727
|
+
const vo = (e) => {
|
|
728
|
+
let {
|
|
729
|
+
collisionRect: t,
|
|
730
|
+
droppableRects: n,
|
|
731
|
+
droppableContainers: r
|
|
732
|
+
} = e;
|
|
733
|
+
const o = [];
|
|
734
|
+
for (const i of r) {
|
|
735
|
+
const {
|
|
736
|
+
id: a
|
|
737
|
+
} = i, s = n.get(a);
|
|
738
|
+
if (s) {
|
|
739
|
+
const c = po(s, t);
|
|
740
|
+
c > 0 && o.push({
|
|
741
|
+
id: a,
|
|
742
|
+
data: {
|
|
743
|
+
droppableContainer: i,
|
|
744
|
+
value: c
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
return o.sort(ho);
|
|
750
|
+
};
|
|
751
|
+
function mo(e, t) {
|
|
752
|
+
const {
|
|
753
|
+
top: n,
|
|
754
|
+
left: r,
|
|
755
|
+
bottom: o,
|
|
756
|
+
right: i
|
|
757
|
+
} = t;
|
|
758
|
+
return n <= e.y && e.y <= o && r <= e.x && e.x <= i;
|
|
759
|
+
}
|
|
760
|
+
const fs = (e) => {
|
|
761
|
+
let {
|
|
762
|
+
droppableContainers: t,
|
|
763
|
+
droppableRects: n,
|
|
764
|
+
pointerCoordinates: r
|
|
765
|
+
} = e;
|
|
766
|
+
if (!r)
|
|
767
|
+
return [];
|
|
768
|
+
const o = [];
|
|
769
|
+
for (const i of t) {
|
|
770
|
+
const {
|
|
771
|
+
id: a
|
|
772
|
+
} = i, s = n.get(a);
|
|
773
|
+
if (s && mo(r, s)) {
|
|
774
|
+
const l = Rt(s).reduce((u, f) => u + Tt(r, f), 0), d = Number((l / 4).toFixed(4));
|
|
775
|
+
o.push({
|
|
776
|
+
id: a,
|
|
777
|
+
data: {
|
|
778
|
+
droppableContainer: i,
|
|
779
|
+
value: d
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
return o.sort(zt);
|
|
785
|
+
};
|
|
786
|
+
function bo(e, t, n) {
|
|
787
|
+
return {
|
|
788
|
+
...e,
|
|
789
|
+
scaleX: t && n ? t.width / n.width : 1,
|
|
790
|
+
scaleY: t && n ? t.height / n.height : 1
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
function vn(e, t) {
|
|
794
|
+
return e && t ? {
|
|
795
|
+
x: e.left - t.left,
|
|
796
|
+
y: e.top - t.top
|
|
797
|
+
} : re;
|
|
798
|
+
}
|
|
799
|
+
function xo(e) {
|
|
800
|
+
return function(n) {
|
|
801
|
+
for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
802
|
+
o[i - 1] = arguments[i];
|
|
803
|
+
return o.reduce((a, s) => ({
|
|
804
|
+
...a,
|
|
805
|
+
top: a.top + e * s.y,
|
|
806
|
+
bottom: a.bottom + e * s.y,
|
|
807
|
+
left: a.left + e * s.x,
|
|
808
|
+
right: a.right + e * s.x
|
|
809
|
+
}), {
|
|
810
|
+
...n
|
|
811
|
+
});
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
const yo = /* @__PURE__ */ xo(1);
|
|
815
|
+
function mn(e) {
|
|
816
|
+
if (e.startsWith("matrix3d(")) {
|
|
817
|
+
const t = e.slice(9, -1).split(/, /);
|
|
818
|
+
return {
|
|
819
|
+
x: +t[12],
|
|
820
|
+
y: +t[13],
|
|
821
|
+
scaleX: +t[0],
|
|
822
|
+
scaleY: +t[5]
|
|
823
|
+
};
|
|
824
|
+
} else if (e.startsWith("matrix(")) {
|
|
825
|
+
const t = e.slice(7, -1).split(/, /);
|
|
826
|
+
return {
|
|
827
|
+
x: +t[4],
|
|
828
|
+
y: +t[5],
|
|
829
|
+
scaleX: +t[0],
|
|
830
|
+
scaleY: +t[3]
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
return null;
|
|
834
|
+
}
|
|
835
|
+
function wo(e, t, n) {
|
|
836
|
+
const r = mn(t);
|
|
837
|
+
if (!r)
|
|
838
|
+
return e;
|
|
839
|
+
const {
|
|
840
|
+
scaleX: o,
|
|
841
|
+
scaleY: i,
|
|
842
|
+
x: a,
|
|
843
|
+
y: s
|
|
844
|
+
} = r, c = e.left - a - (1 - o) * parseFloat(n), l = e.top - s - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), d = o ? e.width / o : e.width, u = i ? e.height / i : e.height;
|
|
845
|
+
return {
|
|
846
|
+
width: d,
|
|
847
|
+
height: u,
|
|
848
|
+
top: l,
|
|
849
|
+
right: c + d,
|
|
850
|
+
bottom: l + u,
|
|
851
|
+
left: c
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
const Co = {
|
|
855
|
+
ignoreTransform: !1
|
|
856
|
+
};
|
|
857
|
+
function Ge(e, t) {
|
|
858
|
+
t === void 0 && (t = Co);
|
|
859
|
+
let n = e.getBoundingClientRect();
|
|
860
|
+
if (t.ignoreTransform) {
|
|
861
|
+
const {
|
|
862
|
+
transform: l,
|
|
863
|
+
transformOrigin: d
|
|
864
|
+
} = G(e).getComputedStyle(e);
|
|
865
|
+
l && (n = wo(n, l, d));
|
|
866
|
+
}
|
|
867
|
+
const {
|
|
868
|
+
top: r,
|
|
869
|
+
left: o,
|
|
870
|
+
width: i,
|
|
871
|
+
height: a,
|
|
872
|
+
bottom: s,
|
|
873
|
+
right: c
|
|
874
|
+
} = n;
|
|
875
|
+
return {
|
|
876
|
+
top: r,
|
|
877
|
+
left: o,
|
|
878
|
+
width: i,
|
|
879
|
+
height: a,
|
|
880
|
+
bottom: s,
|
|
881
|
+
right: c
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
function Zt(e) {
|
|
885
|
+
return Ge(e, {
|
|
886
|
+
ignoreTransform: !0
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
function So(e) {
|
|
890
|
+
const t = e.innerWidth, n = e.innerHeight;
|
|
891
|
+
return {
|
|
892
|
+
top: 0,
|
|
893
|
+
left: 0,
|
|
894
|
+
right: t,
|
|
895
|
+
bottom: n,
|
|
896
|
+
width: t,
|
|
897
|
+
height: n
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
function Ro(e, t) {
|
|
901
|
+
return t === void 0 && (t = G(e).getComputedStyle(e)), t.position === "fixed";
|
|
902
|
+
}
|
|
903
|
+
function Do(e, t) {
|
|
904
|
+
t === void 0 && (t = G(e).getComputedStyle(e));
|
|
905
|
+
const n = /(auto|scroll|overlay)/;
|
|
906
|
+
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
907
|
+
const i = t[o];
|
|
908
|
+
return typeof i == "string" ? n.test(i) : !1;
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
function It(e, t) {
|
|
912
|
+
const n = [];
|
|
913
|
+
function r(o) {
|
|
914
|
+
if (t != null && n.length >= t || !o)
|
|
915
|
+
return n;
|
|
916
|
+
if (At(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
|
|
917
|
+
return n.push(o.scrollingElement), n;
|
|
918
|
+
if (!Ue(o) || hn(o) || n.includes(o))
|
|
919
|
+
return n;
|
|
920
|
+
const i = G(e).getComputedStyle(o);
|
|
921
|
+
return o !== e && Do(o, i) && n.push(o), Ro(o, i) ? n : r(o.parentNode);
|
|
922
|
+
}
|
|
923
|
+
return e ? r(e) : n;
|
|
924
|
+
}
|
|
925
|
+
function bn(e) {
|
|
926
|
+
const [t] = It(e, 1);
|
|
927
|
+
return t ?? null;
|
|
928
|
+
}
|
|
929
|
+
function wt(e) {
|
|
930
|
+
return !ut || !e ? null : Ae(e) ? e : Nt(e) ? At(e) || e === Oe(e).scrollingElement ? window : Ue(e) ? e : null : null;
|
|
931
|
+
}
|
|
932
|
+
function xn(e) {
|
|
933
|
+
return Ae(e) ? e.scrollX : e.scrollLeft;
|
|
934
|
+
}
|
|
935
|
+
function yn(e) {
|
|
936
|
+
return Ae(e) ? e.scrollY : e.scrollTop;
|
|
937
|
+
}
|
|
938
|
+
function Dt(e) {
|
|
939
|
+
return {
|
|
940
|
+
x: xn(e),
|
|
941
|
+
y: yn(e)
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
var F;
|
|
945
|
+
(function(e) {
|
|
946
|
+
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
947
|
+
})(F || (F = {}));
|
|
948
|
+
function wn(e) {
|
|
949
|
+
return !ut || !e ? !1 : e === document.scrollingElement;
|
|
950
|
+
}
|
|
951
|
+
function Cn(e) {
|
|
952
|
+
const t = {
|
|
953
|
+
x: 0,
|
|
954
|
+
y: 0
|
|
955
|
+
}, n = wn(e) ? {
|
|
956
|
+
height: window.innerHeight,
|
|
957
|
+
width: window.innerWidth
|
|
958
|
+
} : {
|
|
959
|
+
height: e.clientHeight,
|
|
960
|
+
width: e.clientWidth
|
|
961
|
+
}, r = {
|
|
962
|
+
x: e.scrollWidth - n.width,
|
|
963
|
+
y: e.scrollHeight - n.height
|
|
964
|
+
}, o = e.scrollTop <= t.y, i = e.scrollLeft <= t.x, a = e.scrollTop >= r.y, s = e.scrollLeft >= r.x;
|
|
965
|
+
return {
|
|
966
|
+
isTop: o,
|
|
967
|
+
isLeft: i,
|
|
968
|
+
isBottom: a,
|
|
969
|
+
isRight: s,
|
|
970
|
+
maxScroll: r,
|
|
971
|
+
minScroll: t
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
const Eo = {
|
|
975
|
+
x: 0.2,
|
|
976
|
+
y: 0.2
|
|
977
|
+
};
|
|
978
|
+
function Mo(e, t, n, r, o) {
|
|
979
|
+
let {
|
|
980
|
+
top: i,
|
|
981
|
+
left: a,
|
|
982
|
+
right: s,
|
|
983
|
+
bottom: c
|
|
984
|
+
} = n;
|
|
985
|
+
r === void 0 && (r = 10), o === void 0 && (o = Eo);
|
|
986
|
+
const {
|
|
987
|
+
isTop: l,
|
|
988
|
+
isBottom: d,
|
|
989
|
+
isLeft: u,
|
|
990
|
+
isRight: f
|
|
991
|
+
} = Cn(e), h = {
|
|
992
|
+
x: 0,
|
|
993
|
+
y: 0
|
|
994
|
+
}, S = {
|
|
995
|
+
x: 0,
|
|
996
|
+
y: 0
|
|
997
|
+
}, g = {
|
|
998
|
+
height: t.height * o.y,
|
|
999
|
+
width: t.width * o.x
|
|
1000
|
+
};
|
|
1001
|
+
return !l && i <= t.top + g.height ? (h.y = F.Backward, S.y = r * Math.abs((t.top + g.height - i) / g.height)) : !d && c >= t.bottom - g.height && (h.y = F.Forward, S.y = r * Math.abs((t.bottom - g.height - c) / g.height)), !f && s >= t.right - g.width ? (h.x = F.Forward, S.x = r * Math.abs((t.right - g.width - s) / g.width)) : !u && a <= t.left + g.width && (h.x = F.Backward, S.x = r * Math.abs((t.left + g.width - a) / g.width)), {
|
|
1002
|
+
direction: h,
|
|
1003
|
+
speed: S
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1006
|
+
function No(e) {
|
|
1007
|
+
if (e === document.scrollingElement) {
|
|
1008
|
+
const {
|
|
1009
|
+
innerWidth: i,
|
|
1010
|
+
innerHeight: a
|
|
1011
|
+
} = window;
|
|
1012
|
+
return {
|
|
1013
|
+
top: 0,
|
|
1014
|
+
left: 0,
|
|
1015
|
+
right: i,
|
|
1016
|
+
bottom: a,
|
|
1017
|
+
width: i,
|
|
1018
|
+
height: a
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
const {
|
|
1022
|
+
top: t,
|
|
1023
|
+
left: n,
|
|
1024
|
+
right: r,
|
|
1025
|
+
bottom: o
|
|
1026
|
+
} = e.getBoundingClientRect();
|
|
1027
|
+
return {
|
|
1028
|
+
top: t,
|
|
1029
|
+
left: n,
|
|
1030
|
+
right: r,
|
|
1031
|
+
bottom: o,
|
|
1032
|
+
width: e.clientWidth,
|
|
1033
|
+
height: e.clientHeight
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
function Sn(e) {
|
|
1037
|
+
return e.reduce((t, n) => Ne(t, Dt(n)), re);
|
|
1038
|
+
}
|
|
1039
|
+
function Ao(e) {
|
|
1040
|
+
return e.reduce((t, n) => t + xn(n), 0);
|
|
1041
|
+
}
|
|
1042
|
+
function Oo(e) {
|
|
1043
|
+
return e.reduce((t, n) => t + yn(n), 0);
|
|
1044
|
+
}
|
|
1045
|
+
function Rn(e, t) {
|
|
1046
|
+
if (t === void 0 && (t = Ge), !e)
|
|
1047
|
+
return;
|
|
1048
|
+
const {
|
|
1049
|
+
top: n,
|
|
1050
|
+
left: r,
|
|
1051
|
+
bottom: o,
|
|
1052
|
+
right: i
|
|
1053
|
+
} = t(e);
|
|
1054
|
+
bn(e) && (o <= 0 || i <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
1055
|
+
block: "center",
|
|
1056
|
+
inline: "center"
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
const To = [["x", ["left", "right"], Ao], ["y", ["top", "bottom"], Oo]];
|
|
1060
|
+
class Pt {
|
|
1061
|
+
constructor(t, n) {
|
|
1062
|
+
this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
|
|
1063
|
+
const r = It(n), o = Sn(r);
|
|
1064
|
+
this.rect = {
|
|
1065
|
+
...t
|
|
1066
|
+
}, this.width = t.width, this.height = t.height;
|
|
1067
|
+
for (const [i, a, s] of To)
|
|
1068
|
+
for (const c of a)
|
|
1069
|
+
Object.defineProperty(this, c, {
|
|
1070
|
+
get: () => {
|
|
1071
|
+
const l = s(r), d = o[i] - l;
|
|
1072
|
+
return this.rect[c] + d;
|
|
1073
|
+
},
|
|
1074
|
+
enumerable: !0
|
|
1075
|
+
});
|
|
1076
|
+
Object.defineProperty(this, "rect", {
|
|
1077
|
+
enumerable: !1
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
class ke {
|
|
1082
|
+
constructor(t) {
|
|
1083
|
+
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
1084
|
+
this.listeners.forEach((n) => {
|
|
1085
|
+
var r;
|
|
1086
|
+
return (r = this.target) == null ? void 0 : r.removeEventListener(...n);
|
|
1087
|
+
});
|
|
1088
|
+
}, this.target = t;
|
|
1089
|
+
}
|
|
1090
|
+
add(t, n, r) {
|
|
1091
|
+
var o;
|
|
1092
|
+
(o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
function zo(e) {
|
|
1096
|
+
const {
|
|
1097
|
+
EventTarget: t
|
|
1098
|
+
} = G(e);
|
|
1099
|
+
return e instanceof t ? e : Oe(e);
|
|
1100
|
+
}
|
|
1101
|
+
function Ct(e, t) {
|
|
1102
|
+
const n = Math.abs(e.x), r = Math.abs(e.y);
|
|
1103
|
+
return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
|
|
1104
|
+
}
|
|
1105
|
+
var J;
|
|
1106
|
+
(function(e) {
|
|
1107
|
+
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
1108
|
+
})(J || (J = {}));
|
|
1109
|
+
function en(e) {
|
|
1110
|
+
e.preventDefault();
|
|
1111
|
+
}
|
|
1112
|
+
function Io(e) {
|
|
1113
|
+
e.stopPropagation();
|
|
1114
|
+
}
|
|
1115
|
+
var D;
|
|
1116
|
+
(function(e) {
|
|
1117
|
+
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
1118
|
+
})(D || (D = {}));
|
|
1119
|
+
const Dn = {
|
|
1120
|
+
start: [D.Space, D.Enter],
|
|
1121
|
+
cancel: [D.Esc],
|
|
1122
|
+
end: [D.Space, D.Enter, D.Tab]
|
|
1123
|
+
}, Po = (e, t) => {
|
|
1124
|
+
let {
|
|
1125
|
+
currentCoordinates: n
|
|
1126
|
+
} = t;
|
|
1127
|
+
switch (e.code) {
|
|
1128
|
+
case D.Right:
|
|
1129
|
+
return {
|
|
1130
|
+
...n,
|
|
1131
|
+
x: n.x + 25
|
|
1132
|
+
};
|
|
1133
|
+
case D.Left:
|
|
1134
|
+
return {
|
|
1135
|
+
...n,
|
|
1136
|
+
x: n.x - 25
|
|
1137
|
+
};
|
|
1138
|
+
case D.Down:
|
|
1139
|
+
return {
|
|
1140
|
+
...n,
|
|
1141
|
+
y: n.y + 25
|
|
1142
|
+
};
|
|
1143
|
+
case D.Up:
|
|
1144
|
+
return {
|
|
1145
|
+
...n,
|
|
1146
|
+
y: n.y - 25
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1149
|
+
};
|
|
1150
|
+
class En {
|
|
1151
|
+
constructor(t) {
|
|
1152
|
+
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
|
|
1153
|
+
const {
|
|
1154
|
+
event: {
|
|
1155
|
+
target: n
|
|
1156
|
+
}
|
|
1157
|
+
} = t;
|
|
1158
|
+
this.props = t, this.listeners = new ke(Oe(n)), this.windowListeners = new ke(G(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
1159
|
+
}
|
|
1160
|
+
attach() {
|
|
1161
|
+
this.handleStart(), this.windowListeners.add(J.Resize, this.handleCancel), this.windowListeners.add(J.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(J.Keydown, this.handleKeyDown));
|
|
1162
|
+
}
|
|
1163
|
+
handleStart() {
|
|
1164
|
+
const {
|
|
1165
|
+
activeNode: t,
|
|
1166
|
+
onStart: n
|
|
1167
|
+
} = this.props, r = t.node.current;
|
|
1168
|
+
r && Rn(r), n(re);
|
|
1169
|
+
}
|
|
1170
|
+
handleKeyDown(t) {
|
|
1171
|
+
if (Ot(t)) {
|
|
1172
|
+
const {
|
|
1173
|
+
active: n,
|
|
1174
|
+
context: r,
|
|
1175
|
+
options: o
|
|
1176
|
+
} = this.props, {
|
|
1177
|
+
keyboardCodes: i = Dn,
|
|
1178
|
+
coordinateGetter: a = Po,
|
|
1179
|
+
scrollBehavior: s = "smooth"
|
|
1180
|
+
} = o, {
|
|
1181
|
+
code: c
|
|
1182
|
+
} = t;
|
|
1183
|
+
if (i.end.includes(c)) {
|
|
1184
|
+
this.handleEnd(t);
|
|
1185
|
+
return;
|
|
1186
|
+
}
|
|
1187
|
+
if (i.cancel.includes(c)) {
|
|
1188
|
+
this.handleCancel(t);
|
|
1189
|
+
return;
|
|
1190
|
+
}
|
|
1191
|
+
const {
|
|
1192
|
+
collisionRect: l
|
|
1193
|
+
} = r.current, d = l ? {
|
|
1194
|
+
x: l.left,
|
|
1195
|
+
y: l.top
|
|
1196
|
+
} : re;
|
|
1197
|
+
this.referenceCoordinates || (this.referenceCoordinates = d);
|
|
1198
|
+
const u = a(t, {
|
|
1199
|
+
active: n,
|
|
1200
|
+
context: r.current,
|
|
1201
|
+
currentCoordinates: d
|
|
1202
|
+
});
|
|
1203
|
+
if (u) {
|
|
1204
|
+
const f = st(u, d), h = {
|
|
1205
|
+
x: 0,
|
|
1206
|
+
y: 0
|
|
1207
|
+
}, {
|
|
1208
|
+
scrollableAncestors: S
|
|
1209
|
+
} = r.current;
|
|
1210
|
+
for (const g of S) {
|
|
1211
|
+
const v = t.code, {
|
|
1212
|
+
isTop: x,
|
|
1213
|
+
isRight: w,
|
|
1214
|
+
isLeft: y,
|
|
1215
|
+
isBottom: z,
|
|
1216
|
+
maxScroll: C,
|
|
1217
|
+
minScroll: A
|
|
1218
|
+
} = Cn(g), b = No(g), m = {
|
|
1219
|
+
x: Math.min(v === D.Right ? b.right - b.width / 2 : b.right, Math.max(v === D.Right ? b.left : b.left + b.width / 2, u.x)),
|
|
1220
|
+
y: Math.min(v === D.Down ? b.bottom - b.height / 2 : b.bottom, Math.max(v === D.Down ? b.top : b.top + b.height / 2, u.y))
|
|
1221
|
+
}, O = v === D.Right && !w || v === D.Left && !y, L = v === D.Down && !z || v === D.Up && !x;
|
|
1222
|
+
if (O && m.x !== u.x) {
|
|
1223
|
+
const T = g.scrollLeft + f.x, H = v === D.Right && T <= C.x || v === D.Left && T >= A.x;
|
|
1224
|
+
if (H && !f.y) {
|
|
1225
|
+
g.scrollTo({
|
|
1226
|
+
left: T,
|
|
1227
|
+
behavior: s
|
|
1228
|
+
});
|
|
1229
|
+
return;
|
|
1230
|
+
}
|
|
1231
|
+
H ? h.x = g.scrollLeft - T : h.x = v === D.Right ? g.scrollLeft - C.x : g.scrollLeft - A.x, h.x && g.scrollBy({
|
|
1232
|
+
left: -h.x,
|
|
1233
|
+
behavior: s
|
|
1234
|
+
});
|
|
1235
|
+
break;
|
|
1236
|
+
} else if (L && m.y !== u.y) {
|
|
1237
|
+
const T = g.scrollTop + f.y, H = v === D.Down && T <= C.y || v === D.Up && T >= A.y;
|
|
1238
|
+
if (H && !f.x) {
|
|
1239
|
+
g.scrollTo({
|
|
1240
|
+
top: T,
|
|
1241
|
+
behavior: s
|
|
1242
|
+
});
|
|
1243
|
+
return;
|
|
1244
|
+
}
|
|
1245
|
+
H ? h.y = g.scrollTop - T : h.y = v === D.Down ? g.scrollTop - C.y : g.scrollTop - A.y, h.y && g.scrollBy({
|
|
1246
|
+
top: -h.y,
|
|
1247
|
+
behavior: s
|
|
1248
|
+
});
|
|
1249
|
+
break;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
this.handleMove(t, Ne(st(u, this.referenceCoordinates), h));
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
handleMove(t, n) {
|
|
1257
|
+
const {
|
|
1258
|
+
onMove: r
|
|
1259
|
+
} = this.props;
|
|
1260
|
+
t.preventDefault(), r(n);
|
|
1261
|
+
}
|
|
1262
|
+
handleEnd(t) {
|
|
1263
|
+
const {
|
|
1264
|
+
onEnd: n
|
|
1265
|
+
} = this.props;
|
|
1266
|
+
t.preventDefault(), this.detach(), n();
|
|
1267
|
+
}
|
|
1268
|
+
handleCancel(t) {
|
|
1269
|
+
const {
|
|
1270
|
+
onCancel: n
|
|
1271
|
+
} = this.props;
|
|
1272
|
+
t.preventDefault(), this.detach(), n();
|
|
1273
|
+
}
|
|
1274
|
+
detach() {
|
|
1275
|
+
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
En.activators = [{
|
|
1279
|
+
eventName: "onKeyDown",
|
|
1280
|
+
handler: (e, t, n) => {
|
|
1281
|
+
let {
|
|
1282
|
+
keyboardCodes: r = Dn,
|
|
1283
|
+
onActivation: o
|
|
1284
|
+
} = t, {
|
|
1285
|
+
active: i
|
|
1286
|
+
} = n;
|
|
1287
|
+
const {
|
|
1288
|
+
code: a
|
|
1289
|
+
} = e.nativeEvent;
|
|
1290
|
+
if (r.start.includes(a)) {
|
|
1291
|
+
const s = i.activatorNode.current;
|
|
1292
|
+
return s && e.target !== s ? !1 : (e.preventDefault(), o?.({
|
|
1293
|
+
event: e.nativeEvent
|
|
1294
|
+
}), !0);
|
|
1295
|
+
}
|
|
1296
|
+
return !1;
|
|
1297
|
+
}
|
|
1298
|
+
}];
|
|
1299
|
+
function tn(e) {
|
|
1300
|
+
return !!(e && "distance" in e);
|
|
1301
|
+
}
|
|
1302
|
+
function nn(e) {
|
|
1303
|
+
return !!(e && "delay" in e);
|
|
1304
|
+
}
|
|
1305
|
+
class Lt {
|
|
1306
|
+
constructor(t, n, r) {
|
|
1307
|
+
var o;
|
|
1308
|
+
r === void 0 && (r = zo(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
|
|
1309
|
+
const {
|
|
1310
|
+
event: i
|
|
1311
|
+
} = t, {
|
|
1312
|
+
target: a
|
|
1313
|
+
} = i;
|
|
1314
|
+
this.props = t, this.events = n, this.document = Oe(a), this.documentListeners = new ke(this.document), this.listeners = new ke(r), this.windowListeners = new ke(G(a)), this.initialCoordinates = (o = at(i)) != null ? o : re, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
|
|
1315
|
+
}
|
|
1316
|
+
attach() {
|
|
1317
|
+
const {
|
|
1318
|
+
events: t,
|
|
1319
|
+
props: {
|
|
1320
|
+
options: {
|
|
1321
|
+
activationConstraint: n,
|
|
1322
|
+
bypassActivationConstraint: r
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
} = this;
|
|
1326
|
+
if (this.listeners.add(t.move.name, this.handleMove, {
|
|
1327
|
+
passive: !1
|
|
1328
|
+
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(J.Resize, this.handleCancel), this.windowListeners.add(J.DragStart, en), this.windowListeners.add(J.VisibilityChange, this.handleCancel), this.windowListeners.add(J.ContextMenu, en), this.documentListeners.add(J.Keydown, this.handleKeydown), n) {
|
|
1329
|
+
if (r != null && r({
|
|
1330
|
+
event: this.props.event,
|
|
1331
|
+
activeNode: this.props.activeNode,
|
|
1332
|
+
options: this.props.options
|
|
1333
|
+
}))
|
|
1334
|
+
return this.handleStart();
|
|
1335
|
+
if (nn(n)) {
|
|
1336
|
+
this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
|
|
1337
|
+
return;
|
|
1338
|
+
}
|
|
1339
|
+
if (tn(n)) {
|
|
1340
|
+
this.handlePending(n);
|
|
1341
|
+
return;
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
this.handleStart();
|
|
1345
|
+
}
|
|
1346
|
+
detach() {
|
|
1347
|
+
this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
|
|
1348
|
+
}
|
|
1349
|
+
handlePending(t, n) {
|
|
1350
|
+
const {
|
|
1351
|
+
active: r,
|
|
1352
|
+
onPending: o
|
|
1353
|
+
} = this.props;
|
|
1354
|
+
o(r, t, this.initialCoordinates, n);
|
|
1355
|
+
}
|
|
1356
|
+
handleStart() {
|
|
1357
|
+
const {
|
|
1358
|
+
initialCoordinates: t
|
|
1359
|
+
} = this, {
|
|
1360
|
+
onStart: n
|
|
1361
|
+
} = this.props;
|
|
1362
|
+
t && (this.activated = !0, this.documentListeners.add(J.Click, Io, {
|
|
1363
|
+
capture: !0
|
|
1364
|
+
}), this.removeTextSelection(), this.documentListeners.add(J.SelectionChange, this.removeTextSelection), n(t));
|
|
1365
|
+
}
|
|
1366
|
+
handleMove(t) {
|
|
1367
|
+
var n;
|
|
1368
|
+
const {
|
|
1369
|
+
activated: r,
|
|
1370
|
+
initialCoordinates: o,
|
|
1371
|
+
props: i
|
|
1372
|
+
} = this, {
|
|
1373
|
+
onMove: a,
|
|
1374
|
+
options: {
|
|
1375
|
+
activationConstraint: s
|
|
1376
|
+
}
|
|
1377
|
+
} = i;
|
|
1378
|
+
if (!o)
|
|
1379
|
+
return;
|
|
1380
|
+
const c = (n = at(t)) != null ? n : re, l = st(o, c);
|
|
1381
|
+
if (!r && s) {
|
|
1382
|
+
if (tn(s)) {
|
|
1383
|
+
if (s.tolerance != null && Ct(l, s.tolerance))
|
|
1384
|
+
return this.handleCancel();
|
|
1385
|
+
if (Ct(l, s.distance))
|
|
1386
|
+
return this.handleStart();
|
|
1387
|
+
}
|
|
1388
|
+
if (nn(s) && Ct(l, s.tolerance))
|
|
1389
|
+
return this.handleCancel();
|
|
1390
|
+
this.handlePending(s, l);
|
|
1391
|
+
return;
|
|
1392
|
+
}
|
|
1393
|
+
t.cancelable && t.preventDefault(), a(c);
|
|
1394
|
+
}
|
|
1395
|
+
handleEnd() {
|
|
1396
|
+
const {
|
|
1397
|
+
onAbort: t,
|
|
1398
|
+
onEnd: n
|
|
1399
|
+
} = this.props;
|
|
1400
|
+
this.detach(), this.activated || t(this.props.active), n();
|
|
1401
|
+
}
|
|
1402
|
+
handleCancel() {
|
|
1403
|
+
const {
|
|
1404
|
+
onAbort: t,
|
|
1405
|
+
onCancel: n
|
|
1406
|
+
} = this.props;
|
|
1407
|
+
this.detach(), this.activated || t(this.props.active), n();
|
|
1408
|
+
}
|
|
1409
|
+
handleKeydown(t) {
|
|
1410
|
+
t.code === D.Esc && this.handleCancel();
|
|
1411
|
+
}
|
|
1412
|
+
removeTextSelection() {
|
|
1413
|
+
var t;
|
|
1414
|
+
(t = this.document.getSelection()) == null || t.removeAllRanges();
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
const Lo = {
|
|
1418
|
+
cancel: {
|
|
1419
|
+
name: "pointercancel"
|
|
1420
|
+
},
|
|
1421
|
+
move: {
|
|
1422
|
+
name: "pointermove"
|
|
1423
|
+
},
|
|
1424
|
+
end: {
|
|
1425
|
+
name: "pointerup"
|
|
1426
|
+
}
|
|
1427
|
+
};
|
|
1428
|
+
class Mn extends Lt {
|
|
1429
|
+
constructor(t) {
|
|
1430
|
+
const {
|
|
1431
|
+
event: n
|
|
1432
|
+
} = t, r = Oe(n.target);
|
|
1433
|
+
super(t, Lo, r);
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
Mn.activators = [{
|
|
1437
|
+
eventName: "onPointerDown",
|
|
1438
|
+
handler: (e, t) => {
|
|
1439
|
+
let {
|
|
1440
|
+
nativeEvent: n
|
|
1441
|
+
} = e, {
|
|
1442
|
+
onActivation: r
|
|
1443
|
+
} = t;
|
|
1444
|
+
return !n.isPrimary || n.button !== 0 ? !1 : (r?.({
|
|
1445
|
+
event: n
|
|
1446
|
+
}), !0);
|
|
1447
|
+
}
|
|
1448
|
+
}];
|
|
1449
|
+
const ko = {
|
|
1450
|
+
move: {
|
|
1451
|
+
name: "mousemove"
|
|
1452
|
+
},
|
|
1453
|
+
end: {
|
|
1454
|
+
name: "mouseup"
|
|
1455
|
+
}
|
|
1456
|
+
};
|
|
1457
|
+
var Et;
|
|
1458
|
+
(function(e) {
|
|
1459
|
+
e[e.RightClick = 2] = "RightClick";
|
|
1460
|
+
})(Et || (Et = {}));
|
|
1461
|
+
class _o extends Lt {
|
|
1462
|
+
constructor(t) {
|
|
1463
|
+
super(t, ko, Oe(t.event.target));
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
_o.activators = [{
|
|
1467
|
+
eventName: "onMouseDown",
|
|
1468
|
+
handler: (e, t) => {
|
|
1469
|
+
let {
|
|
1470
|
+
nativeEvent: n
|
|
1471
|
+
} = e, {
|
|
1472
|
+
onActivation: r
|
|
1473
|
+
} = t;
|
|
1474
|
+
return n.button === Et.RightClick ? !1 : (r?.({
|
|
1475
|
+
event: n
|
|
1476
|
+
}), !0);
|
|
1477
|
+
}
|
|
1478
|
+
}];
|
|
1479
|
+
const St = {
|
|
1480
|
+
cancel: {
|
|
1481
|
+
name: "touchcancel"
|
|
1482
|
+
},
|
|
1483
|
+
move: {
|
|
1484
|
+
name: "touchmove"
|
|
1485
|
+
},
|
|
1486
|
+
end: {
|
|
1487
|
+
name: "touchend"
|
|
1488
|
+
}
|
|
1489
|
+
};
|
|
1490
|
+
class Bo extends Lt {
|
|
1491
|
+
constructor(t) {
|
|
1492
|
+
super(t, St);
|
|
1493
|
+
}
|
|
1494
|
+
static setup() {
|
|
1495
|
+
return window.addEventListener(St.move.name, t, {
|
|
1496
|
+
capture: !1,
|
|
1497
|
+
passive: !1
|
|
1498
|
+
}), function() {
|
|
1499
|
+
window.removeEventListener(St.move.name, t);
|
|
1500
|
+
};
|
|
1501
|
+
function t() {
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
Bo.activators = [{
|
|
1506
|
+
eventName: "onTouchStart",
|
|
1507
|
+
handler: (e, t) => {
|
|
1508
|
+
let {
|
|
1509
|
+
nativeEvent: n
|
|
1510
|
+
} = e, {
|
|
1511
|
+
onActivation: r
|
|
1512
|
+
} = t;
|
|
1513
|
+
const {
|
|
1514
|
+
touches: o
|
|
1515
|
+
} = n;
|
|
1516
|
+
return o.length > 1 ? !1 : (r?.({
|
|
1517
|
+
event: n
|
|
1518
|
+
}), !0);
|
|
1519
|
+
}
|
|
1520
|
+
}];
|
|
1521
|
+
var _e;
|
|
1522
|
+
(function(e) {
|
|
1523
|
+
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
1524
|
+
})(_e || (_e = {}));
|
|
1525
|
+
var lt;
|
|
1526
|
+
(function(e) {
|
|
1527
|
+
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
1528
|
+
})(lt || (lt = {}));
|
|
1529
|
+
function Fo(e) {
|
|
1530
|
+
let {
|
|
1531
|
+
acceleration: t,
|
|
1532
|
+
activator: n = _e.Pointer,
|
|
1533
|
+
canScroll: r,
|
|
1534
|
+
draggingRect: o,
|
|
1535
|
+
enabled: i,
|
|
1536
|
+
interval: a = 5,
|
|
1537
|
+
order: s = lt.TreeOrder,
|
|
1538
|
+
pointerCoordinates: c,
|
|
1539
|
+
scrollableAncestors: l,
|
|
1540
|
+
scrollableAncestorRects: d,
|
|
1541
|
+
delta: u,
|
|
1542
|
+
threshold: f
|
|
1543
|
+
} = e;
|
|
1544
|
+
const h = Vo({
|
|
1545
|
+
delta: u,
|
|
1546
|
+
disabled: !i
|
|
1547
|
+
}), [S, g] = Qr(), v = N({
|
|
1548
|
+
x: 0,
|
|
1549
|
+
y: 0
|
|
1550
|
+
}), x = N({
|
|
1551
|
+
x: 0,
|
|
1552
|
+
y: 0
|
|
1553
|
+
}), w = M(() => {
|
|
1554
|
+
switch (n) {
|
|
1555
|
+
case _e.Pointer:
|
|
1556
|
+
return c ? {
|
|
1557
|
+
top: c.y,
|
|
1558
|
+
bottom: c.y,
|
|
1559
|
+
left: c.x,
|
|
1560
|
+
right: c.x
|
|
1561
|
+
} : null;
|
|
1562
|
+
case _e.DraggableRect:
|
|
1563
|
+
return o;
|
|
1564
|
+
}
|
|
1565
|
+
}, [n, o, c]), y = N(null), z = V(() => {
|
|
1566
|
+
const A = y.current;
|
|
1567
|
+
if (!A)
|
|
1568
|
+
return;
|
|
1569
|
+
const b = v.current.x * x.current.x, m = v.current.y * x.current.y;
|
|
1570
|
+
A.scrollBy(b, m);
|
|
1571
|
+
}, []), C = M(() => s === lt.TreeOrder ? [...l].reverse() : l, [s, l]);
|
|
1572
|
+
E(
|
|
1573
|
+
() => {
|
|
1574
|
+
if (!i || !l.length || !w) {
|
|
1575
|
+
g();
|
|
1576
|
+
return;
|
|
1577
|
+
}
|
|
1578
|
+
for (const A of C) {
|
|
1579
|
+
if (r?.(A) === !1)
|
|
1580
|
+
continue;
|
|
1581
|
+
const b = l.indexOf(A), m = d[b];
|
|
1582
|
+
if (!m)
|
|
1583
|
+
continue;
|
|
1584
|
+
const {
|
|
1585
|
+
direction: O,
|
|
1586
|
+
speed: L
|
|
1587
|
+
} = Mo(A, m, w, t, f);
|
|
1588
|
+
for (const T of ["x", "y"])
|
|
1589
|
+
h[T][O[T]] || (L[T] = 0, O[T] = 0);
|
|
1590
|
+
if (L.x > 0 || L.y > 0) {
|
|
1591
|
+
g(), y.current = A, S(z, a), v.current = L, x.current = O;
|
|
1592
|
+
return;
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
v.current = {
|
|
1596
|
+
x: 0,
|
|
1597
|
+
y: 0
|
|
1598
|
+
}, x.current = {
|
|
1599
|
+
x: 0,
|
|
1600
|
+
y: 0
|
|
1601
|
+
}, g();
|
|
1602
|
+
},
|
|
1603
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1604
|
+
[
|
|
1605
|
+
t,
|
|
1606
|
+
z,
|
|
1607
|
+
r,
|
|
1608
|
+
g,
|
|
1609
|
+
i,
|
|
1610
|
+
a,
|
|
1611
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1612
|
+
JSON.stringify(w),
|
|
1613
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1614
|
+
JSON.stringify(h),
|
|
1615
|
+
S,
|
|
1616
|
+
l,
|
|
1617
|
+
C,
|
|
1618
|
+
d,
|
|
1619
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1620
|
+
JSON.stringify(f)
|
|
1621
|
+
]
|
|
1622
|
+
);
|
|
1623
|
+
}
|
|
1624
|
+
const $o = {
|
|
1625
|
+
x: {
|
|
1626
|
+
[F.Backward]: !1,
|
|
1627
|
+
[F.Forward]: !1
|
|
1628
|
+
},
|
|
1629
|
+
y: {
|
|
1630
|
+
[F.Backward]: !1,
|
|
1631
|
+
[F.Forward]: !1
|
|
1632
|
+
}
|
|
1633
|
+
};
|
|
1634
|
+
function Vo(e) {
|
|
1635
|
+
let {
|
|
1636
|
+
delta: t,
|
|
1637
|
+
disabled: n
|
|
1638
|
+
} = e;
|
|
1639
|
+
const r = it(t);
|
|
1640
|
+
return Xe((o) => {
|
|
1641
|
+
if (n || !r || !o)
|
|
1642
|
+
return $o;
|
|
1643
|
+
const i = {
|
|
1644
|
+
x: Math.sign(t.x - r.x),
|
|
1645
|
+
y: Math.sign(t.y - r.y)
|
|
1646
|
+
};
|
|
1647
|
+
return {
|
|
1648
|
+
x: {
|
|
1649
|
+
[F.Backward]: o.x[F.Backward] || i.x === -1,
|
|
1650
|
+
[F.Forward]: o.x[F.Forward] || i.x === 1
|
|
1651
|
+
},
|
|
1652
|
+
y: {
|
|
1653
|
+
[F.Backward]: o.y[F.Backward] || i.y === -1,
|
|
1654
|
+
[F.Forward]: o.y[F.Forward] || i.y === 1
|
|
1655
|
+
}
|
|
1656
|
+
};
|
|
1657
|
+
}, [n, t, r]);
|
|
1658
|
+
}
|
|
1659
|
+
function jo(e, t) {
|
|
1660
|
+
const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
|
|
1661
|
+
return Xe((o) => {
|
|
1662
|
+
var i;
|
|
1663
|
+
return t == null ? null : (i = r ?? o) != null ? i : null;
|
|
1664
|
+
}, [r, t]);
|
|
1665
|
+
}
|
|
1666
|
+
function Uo(e, t) {
|
|
1667
|
+
return M(() => e.reduce((n, r) => {
|
|
1668
|
+
const {
|
|
1669
|
+
sensor: o
|
|
1670
|
+
} = r, i = o.activators.map((a) => ({
|
|
1671
|
+
eventName: a.eventName,
|
|
1672
|
+
handler: t(a.handler, r)
|
|
1673
|
+
}));
|
|
1674
|
+
return [...n, ...i];
|
|
1675
|
+
}, []), [e, t]);
|
|
1676
|
+
}
|
|
1677
|
+
var Ve;
|
|
1678
|
+
(function(e) {
|
|
1679
|
+
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
1680
|
+
})(Ve || (Ve = {}));
|
|
1681
|
+
var Mt;
|
|
1682
|
+
(function(e) {
|
|
1683
|
+
e.Optimized = "optimized";
|
|
1684
|
+
})(Mt || (Mt = {}));
|
|
1685
|
+
const rn = /* @__PURE__ */ new Map();
|
|
1686
|
+
function Xo(e, t) {
|
|
1687
|
+
let {
|
|
1688
|
+
dragging: n,
|
|
1689
|
+
dependencies: r,
|
|
1690
|
+
config: o
|
|
1691
|
+
} = t;
|
|
1692
|
+
const [i, a] = X(null), {
|
|
1693
|
+
frequency: s,
|
|
1694
|
+
measure: c,
|
|
1695
|
+
strategy: l
|
|
1696
|
+
} = o, d = N(e), u = v(), f = Fe(u), h = V(function(x) {
|
|
1697
|
+
x === void 0 && (x = []), !f.current && a((w) => w === null ? x : w.concat(x.filter((y) => !w.includes(y))));
|
|
1698
|
+
}, [f]), S = N(null), g = Xe((x) => {
|
|
1699
|
+
if (u && !n)
|
|
1700
|
+
return rn;
|
|
1701
|
+
if (!x || x === rn || d.current !== e || i != null) {
|
|
1702
|
+
const w = /* @__PURE__ */ new Map();
|
|
1703
|
+
for (let y of e) {
|
|
1704
|
+
if (!y)
|
|
1705
|
+
continue;
|
|
1706
|
+
if (i && i.length > 0 && !i.includes(y.id) && y.rect.current) {
|
|
1707
|
+
w.set(y.id, y.rect.current);
|
|
1708
|
+
continue;
|
|
1709
|
+
}
|
|
1710
|
+
const z = y.node.current, C = z ? new Pt(c(z), z) : null;
|
|
1711
|
+
y.rect.current = C, C && w.set(y.id, C);
|
|
1712
|
+
}
|
|
1713
|
+
return w;
|
|
1714
|
+
}
|
|
1715
|
+
return x;
|
|
1716
|
+
}, [e, i, n, u, c]);
|
|
1717
|
+
return E(() => {
|
|
1718
|
+
d.current = e;
|
|
1719
|
+
}, [e]), E(
|
|
1720
|
+
() => {
|
|
1721
|
+
u || h();
|
|
1722
|
+
},
|
|
1723
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1724
|
+
[n, u]
|
|
1725
|
+
), E(
|
|
1726
|
+
() => {
|
|
1727
|
+
i && i.length > 0 && a(null);
|
|
1728
|
+
},
|
|
1729
|
+
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1730
|
+
[JSON.stringify(i)]
|
|
1731
|
+
), E(
|
|
1732
|
+
() => {
|
|
1733
|
+
u || typeof s != "number" || S.current !== null || (S.current = setTimeout(() => {
|
|
1734
|
+
h(), S.current = null;
|
|
1735
|
+
}, s));
|
|
1736
|
+
},
|
|
1737
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1738
|
+
[s, u, h, ...r]
|
|
1739
|
+
), {
|
|
1740
|
+
droppableRects: g,
|
|
1741
|
+
measureDroppableContainers: h,
|
|
1742
|
+
measuringScheduled: i != null
|
|
1743
|
+
};
|
|
1744
|
+
function v() {
|
|
1745
|
+
switch (l) {
|
|
1746
|
+
case Ve.Always:
|
|
1747
|
+
return !1;
|
|
1748
|
+
case Ve.BeforeDragging:
|
|
1749
|
+
return n;
|
|
1750
|
+
default:
|
|
1751
|
+
return !n;
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
function kt(e, t) {
|
|
1756
|
+
return Xe((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
1757
|
+
}
|
|
1758
|
+
function Go(e, t) {
|
|
1759
|
+
return kt(e, t);
|
|
1760
|
+
}
|
|
1761
|
+
function Yo(e) {
|
|
1762
|
+
let {
|
|
1763
|
+
callback: t,
|
|
1764
|
+
disabled: n
|
|
1765
|
+
} = e;
|
|
1766
|
+
const r = dt(t), o = M(() => {
|
|
1767
|
+
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
1768
|
+
return;
|
|
1769
|
+
const {
|
|
1770
|
+
MutationObserver: i
|
|
1771
|
+
} = window;
|
|
1772
|
+
return new i(r);
|
|
1773
|
+
}, [r, n]);
|
|
1774
|
+
return E(() => () => o?.disconnect(), [o]), o;
|
|
1775
|
+
}
|
|
1776
|
+
function ht(e) {
|
|
1777
|
+
let {
|
|
1778
|
+
callback: t,
|
|
1779
|
+
disabled: n
|
|
1780
|
+
} = e;
|
|
1781
|
+
const r = dt(t), o = M(
|
|
1782
|
+
() => {
|
|
1783
|
+
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
1784
|
+
return;
|
|
1785
|
+
const {
|
|
1786
|
+
ResizeObserver: i
|
|
1787
|
+
} = window;
|
|
1788
|
+
return new i(r);
|
|
1789
|
+
},
|
|
1790
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1791
|
+
[n]
|
|
1792
|
+
);
|
|
1793
|
+
return E(() => () => o?.disconnect(), [o]), o;
|
|
1794
|
+
}
|
|
1795
|
+
function Ko(e) {
|
|
1796
|
+
return new Pt(Ge(e), e);
|
|
1797
|
+
}
|
|
1798
|
+
function on(e, t, n) {
|
|
1799
|
+
t === void 0 && (t = Ko);
|
|
1800
|
+
const [r, o] = X(null);
|
|
1801
|
+
function i() {
|
|
1802
|
+
o((c) => {
|
|
1803
|
+
if (!e)
|
|
1804
|
+
return null;
|
|
1805
|
+
if (e.isConnected === !1) {
|
|
1806
|
+
var l;
|
|
1807
|
+
return (l = c ?? n) != null ? l : null;
|
|
1808
|
+
}
|
|
1809
|
+
const d = t(e);
|
|
1810
|
+
return JSON.stringify(c) === JSON.stringify(d) ? c : d;
|
|
1811
|
+
});
|
|
1812
|
+
}
|
|
1813
|
+
const a = Yo({
|
|
1814
|
+
callback(c) {
|
|
1815
|
+
if (e)
|
|
1816
|
+
for (const l of c) {
|
|
1817
|
+
const {
|
|
1818
|
+
type: d,
|
|
1819
|
+
target: u
|
|
1820
|
+
} = l;
|
|
1821
|
+
if (d === "childList" && u instanceof HTMLElement && u.contains(e)) {
|
|
1822
|
+
i();
|
|
1823
|
+
break;
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
}), s = ht({
|
|
1828
|
+
callback: i
|
|
1829
|
+
});
|
|
1830
|
+
return ce(() => {
|
|
1831
|
+
i(), e ? (s?.observe(e), a?.observe(document.body, {
|
|
1832
|
+
childList: !0,
|
|
1833
|
+
subtree: !0
|
|
1834
|
+
})) : (s?.disconnect(), a?.disconnect());
|
|
1835
|
+
}, [e]), r;
|
|
1836
|
+
}
|
|
1837
|
+
function Wo(e) {
|
|
1838
|
+
const t = kt(e);
|
|
1839
|
+
return vn(e, t);
|
|
1840
|
+
}
|
|
1841
|
+
const sn = [];
|
|
1842
|
+
function Ho(e) {
|
|
1843
|
+
const t = N(e), n = Xe((r) => e ? r && r !== sn && e && t.current && e.parentNode === t.current.parentNode ? r : It(e) : sn, [e]);
|
|
1844
|
+
return E(() => {
|
|
1845
|
+
t.current = e;
|
|
1846
|
+
}, [e]), n;
|
|
1847
|
+
}
|
|
1848
|
+
function qo(e) {
|
|
1849
|
+
const [t, n] = X(null), r = N(e), o = V((i) => {
|
|
1850
|
+
const a = wt(i.target);
|
|
1851
|
+
a && n((s) => s ? (s.set(a, Dt(a)), new Map(s)) : null);
|
|
1852
|
+
}, []);
|
|
1853
|
+
return E(() => {
|
|
1854
|
+
const i = r.current;
|
|
1855
|
+
if (e !== i) {
|
|
1856
|
+
a(i);
|
|
1857
|
+
const s = e.map((c) => {
|
|
1858
|
+
const l = wt(c);
|
|
1859
|
+
return l ? (l.addEventListener("scroll", o, {
|
|
1860
|
+
passive: !0
|
|
1861
|
+
}), [l, Dt(l)]) : null;
|
|
1862
|
+
}).filter((c) => c != null);
|
|
1863
|
+
n(s.length ? new Map(s) : null), r.current = e;
|
|
1864
|
+
}
|
|
1865
|
+
return () => {
|
|
1866
|
+
a(e), a(i);
|
|
1867
|
+
};
|
|
1868
|
+
function a(s) {
|
|
1869
|
+
s.forEach((c) => {
|
|
1870
|
+
const l = wt(c);
|
|
1871
|
+
l?.removeEventListener("scroll", o);
|
|
1872
|
+
});
|
|
1873
|
+
}
|
|
1874
|
+
}, [o, e]), M(() => e.length ? t ? Array.from(t.values()).reduce((i, a) => Ne(i, a), re) : Sn(e) : re, [e, t]);
|
|
1875
|
+
}
|
|
1876
|
+
function an(e, t) {
|
|
1877
|
+
t === void 0 && (t = []);
|
|
1878
|
+
const n = N(null);
|
|
1879
|
+
return E(
|
|
1880
|
+
() => {
|
|
1881
|
+
n.current = null;
|
|
1882
|
+
},
|
|
1883
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1884
|
+
t
|
|
1885
|
+
), E(() => {
|
|
1886
|
+
const r = e !== re;
|
|
1887
|
+
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
1888
|
+
}, [e]), n.current ? st(e, n.current) : re;
|
|
1889
|
+
}
|
|
1890
|
+
function Jo(e) {
|
|
1891
|
+
E(
|
|
1892
|
+
() => {
|
|
1893
|
+
if (!ut)
|
|
1894
|
+
return;
|
|
1895
|
+
const t = e.map((n) => {
|
|
1896
|
+
let {
|
|
1897
|
+
sensor: r
|
|
1898
|
+
} = n;
|
|
1899
|
+
return r.setup == null ? void 0 : r.setup();
|
|
1900
|
+
});
|
|
1901
|
+
return () => {
|
|
1902
|
+
for (const n of t)
|
|
1903
|
+
n?.();
|
|
1904
|
+
};
|
|
1905
|
+
},
|
|
1906
|
+
// TO-DO: Sensors length could theoretically change which would not be a valid dependency
|
|
1907
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1908
|
+
e.map((t) => {
|
|
1909
|
+
let {
|
|
1910
|
+
sensor: n
|
|
1911
|
+
} = t;
|
|
1912
|
+
return n;
|
|
1913
|
+
})
|
|
1914
|
+
);
|
|
1915
|
+
}
|
|
1916
|
+
function Qo(e, t) {
|
|
1917
|
+
return M(() => e.reduce((n, r) => {
|
|
1918
|
+
let {
|
|
1919
|
+
eventName: o,
|
|
1920
|
+
handler: i
|
|
1921
|
+
} = r;
|
|
1922
|
+
return n[o] = (a) => {
|
|
1923
|
+
i(a, t);
|
|
1924
|
+
}, n;
|
|
1925
|
+
}, {}), [e, t]);
|
|
1926
|
+
}
|
|
1927
|
+
function Nn(e) {
|
|
1928
|
+
return M(() => e ? So(e) : null, [e]);
|
|
1929
|
+
}
|
|
1930
|
+
const cn = [];
|
|
1931
|
+
function Zo(e, t) {
|
|
1932
|
+
t === void 0 && (t = Ge);
|
|
1933
|
+
const [n] = e, r = Nn(n ? G(n) : null), [o, i] = X(cn);
|
|
1934
|
+
function a() {
|
|
1935
|
+
i(() => e.length ? e.map((c) => wn(c) ? r : new Pt(t(c), c)) : cn);
|
|
1936
|
+
}
|
|
1937
|
+
const s = ht({
|
|
1938
|
+
callback: a
|
|
1939
|
+
});
|
|
1940
|
+
return ce(() => {
|
|
1941
|
+
s?.disconnect(), a(), e.forEach((c) => s?.observe(c));
|
|
1942
|
+
}, [e]), o;
|
|
1943
|
+
}
|
|
1944
|
+
function An(e) {
|
|
1945
|
+
if (!e)
|
|
1946
|
+
return null;
|
|
1947
|
+
if (e.children.length > 1)
|
|
1948
|
+
return e;
|
|
1949
|
+
const t = e.children[0];
|
|
1950
|
+
return Ue(t) ? t : e;
|
|
1951
|
+
}
|
|
1952
|
+
function ei(e) {
|
|
1953
|
+
let {
|
|
1954
|
+
measure: t
|
|
1955
|
+
} = e;
|
|
1956
|
+
const [n, r] = X(null), o = V((l) => {
|
|
1957
|
+
for (const {
|
|
1958
|
+
target: d
|
|
1959
|
+
} of l)
|
|
1960
|
+
if (Ue(d)) {
|
|
1961
|
+
r((u) => {
|
|
1962
|
+
const f = t(d);
|
|
1963
|
+
return u ? {
|
|
1964
|
+
...u,
|
|
1965
|
+
width: f.width,
|
|
1966
|
+
height: f.height
|
|
1967
|
+
} : f;
|
|
1968
|
+
});
|
|
1969
|
+
break;
|
|
1970
|
+
}
|
|
1971
|
+
}, [t]), i = ht({
|
|
1972
|
+
callback: o
|
|
1973
|
+
}), a = V((l) => {
|
|
1974
|
+
const d = An(l);
|
|
1975
|
+
i?.disconnect(), d && i?.observe(d), r(d ? t(d) : null);
|
|
1976
|
+
}, [t, i]), [s, c] = ot(a);
|
|
1977
|
+
return M(() => ({
|
|
1978
|
+
nodeRef: s,
|
|
1979
|
+
rect: n,
|
|
1980
|
+
setRef: c
|
|
1981
|
+
}), [n, s, c]);
|
|
1982
|
+
}
|
|
1983
|
+
const ti = [{
|
|
1984
|
+
sensor: Mn,
|
|
1985
|
+
options: {}
|
|
1986
|
+
}, {
|
|
1987
|
+
sensor: En,
|
|
1988
|
+
options: {}
|
|
1989
|
+
}], ni = {
|
|
1990
|
+
current: {}
|
|
1991
|
+
}, tt = {
|
|
1992
|
+
draggable: {
|
|
1993
|
+
measure: Zt
|
|
1994
|
+
},
|
|
1995
|
+
droppable: {
|
|
1996
|
+
measure: Zt,
|
|
1997
|
+
strategy: Ve.WhileDragging,
|
|
1998
|
+
frequency: Mt.Optimized
|
|
1999
|
+
},
|
|
2000
|
+
dragOverlay: {
|
|
2001
|
+
measure: Ge
|
|
2002
|
+
}
|
|
2003
|
+
};
|
|
2004
|
+
class Be extends Map {
|
|
2005
|
+
get(t) {
|
|
2006
|
+
var n;
|
|
2007
|
+
return t != null && (n = super.get(t)) != null ? n : void 0;
|
|
2008
|
+
}
|
|
2009
|
+
toArray() {
|
|
2010
|
+
return Array.from(this.values());
|
|
2011
|
+
}
|
|
2012
|
+
getEnabled() {
|
|
2013
|
+
return this.toArray().filter((t) => {
|
|
2014
|
+
let {
|
|
2015
|
+
disabled: n
|
|
2016
|
+
} = t;
|
|
2017
|
+
return !n;
|
|
2018
|
+
});
|
|
2019
|
+
}
|
|
2020
|
+
getNodeFor(t) {
|
|
2021
|
+
var n, r;
|
|
2022
|
+
return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
const ri = {
|
|
2026
|
+
activatorEvent: null,
|
|
2027
|
+
active: null,
|
|
2028
|
+
activeNode: null,
|
|
2029
|
+
activeNodeRect: null,
|
|
2030
|
+
collisions: null,
|
|
2031
|
+
containerNodeRect: null,
|
|
2032
|
+
draggableNodes: /* @__PURE__ */ new Map(),
|
|
2033
|
+
droppableRects: /* @__PURE__ */ new Map(),
|
|
2034
|
+
droppableContainers: /* @__PURE__ */ new Be(),
|
|
2035
|
+
over: null,
|
|
2036
|
+
dragOverlay: {
|
|
2037
|
+
nodeRef: {
|
|
2038
|
+
current: null
|
|
2039
|
+
},
|
|
2040
|
+
rect: null,
|
|
2041
|
+
setRef: ct
|
|
2042
|
+
},
|
|
2043
|
+
scrollableAncestors: [],
|
|
2044
|
+
scrollableAncestorRects: [],
|
|
2045
|
+
measuringConfiguration: tt,
|
|
2046
|
+
measureDroppableContainers: ct,
|
|
2047
|
+
windowRect: null,
|
|
2048
|
+
measuringScheduled: !1
|
|
2049
|
+
}, On = {
|
|
2050
|
+
activatorEvent: null,
|
|
2051
|
+
activators: [],
|
|
2052
|
+
active: null,
|
|
2053
|
+
activeNodeRect: null,
|
|
2054
|
+
ariaDescribedById: {
|
|
2055
|
+
draggable: ""
|
|
2056
|
+
},
|
|
2057
|
+
dispatch: ct,
|
|
2058
|
+
draggableNodes: /* @__PURE__ */ new Map(),
|
|
2059
|
+
over: null,
|
|
2060
|
+
measureDroppableContainers: ct
|
|
2061
|
+
}, Ye = /* @__PURE__ */ je(On), Tn = /* @__PURE__ */ je(ri);
|
|
2062
|
+
function oi() {
|
|
2063
|
+
return {
|
|
2064
|
+
draggable: {
|
|
2065
|
+
active: null,
|
|
2066
|
+
initialCoordinates: {
|
|
2067
|
+
x: 0,
|
|
2068
|
+
y: 0
|
|
2069
|
+
},
|
|
2070
|
+
nodes: /* @__PURE__ */ new Map(),
|
|
2071
|
+
translate: {
|
|
2072
|
+
x: 0,
|
|
2073
|
+
y: 0
|
|
2074
|
+
}
|
|
2075
|
+
},
|
|
2076
|
+
droppable: {
|
|
2077
|
+
containers: new Be()
|
|
2078
|
+
}
|
|
2079
|
+
};
|
|
2080
|
+
}
|
|
2081
|
+
function ii(e, t) {
|
|
2082
|
+
switch (t.type) {
|
|
2083
|
+
case _.DragStart:
|
|
2084
|
+
return {
|
|
2085
|
+
...e,
|
|
2086
|
+
draggable: {
|
|
2087
|
+
...e.draggable,
|
|
2088
|
+
initialCoordinates: t.initialCoordinates,
|
|
2089
|
+
active: t.active
|
|
2090
|
+
}
|
|
2091
|
+
};
|
|
2092
|
+
case _.DragMove:
|
|
2093
|
+
return e.draggable.active == null ? e : {
|
|
2094
|
+
...e,
|
|
2095
|
+
draggable: {
|
|
2096
|
+
...e.draggable,
|
|
2097
|
+
translate: {
|
|
2098
|
+
x: t.coordinates.x - e.draggable.initialCoordinates.x,
|
|
2099
|
+
y: t.coordinates.y - e.draggable.initialCoordinates.y
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
};
|
|
2103
|
+
case _.DragEnd:
|
|
2104
|
+
case _.DragCancel:
|
|
2105
|
+
return {
|
|
2106
|
+
...e,
|
|
2107
|
+
draggable: {
|
|
2108
|
+
...e.draggable,
|
|
2109
|
+
active: null,
|
|
2110
|
+
initialCoordinates: {
|
|
2111
|
+
x: 0,
|
|
2112
|
+
y: 0
|
|
2113
|
+
},
|
|
2114
|
+
translate: {
|
|
2115
|
+
x: 0,
|
|
2116
|
+
y: 0
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
};
|
|
2120
|
+
case _.RegisterDroppable: {
|
|
2121
|
+
const {
|
|
2122
|
+
element: n
|
|
2123
|
+
} = t, {
|
|
2124
|
+
id: r
|
|
2125
|
+
} = n, o = new Be(e.droppable.containers);
|
|
2126
|
+
return o.set(r, n), {
|
|
2127
|
+
...e,
|
|
2128
|
+
droppable: {
|
|
2129
|
+
...e.droppable,
|
|
2130
|
+
containers: o
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
2133
|
+
}
|
|
2134
|
+
case _.SetDroppableDisabled: {
|
|
2135
|
+
const {
|
|
2136
|
+
id: n,
|
|
2137
|
+
key: r,
|
|
2138
|
+
disabled: o
|
|
2139
|
+
} = t, i = e.droppable.containers.get(n);
|
|
2140
|
+
if (!i || r !== i.key)
|
|
2141
|
+
return e;
|
|
2142
|
+
const a = new Be(e.droppable.containers);
|
|
2143
|
+
return a.set(n, {
|
|
2144
|
+
...i,
|
|
2145
|
+
disabled: o
|
|
2146
|
+
}), {
|
|
2147
|
+
...e,
|
|
2148
|
+
droppable: {
|
|
2149
|
+
...e.droppable,
|
|
2150
|
+
containers: a
|
|
2151
|
+
}
|
|
2152
|
+
};
|
|
2153
|
+
}
|
|
2154
|
+
case _.UnregisterDroppable: {
|
|
2155
|
+
const {
|
|
2156
|
+
id: n,
|
|
2157
|
+
key: r
|
|
2158
|
+
} = t, o = e.droppable.containers.get(n);
|
|
2159
|
+
if (!o || r !== o.key)
|
|
2160
|
+
return e;
|
|
2161
|
+
const i = new Be(e.droppable.containers);
|
|
2162
|
+
return i.delete(n), {
|
|
2163
|
+
...e,
|
|
2164
|
+
droppable: {
|
|
2165
|
+
...e.droppable,
|
|
2166
|
+
containers: i
|
|
2167
|
+
}
|
|
2168
|
+
};
|
|
2169
|
+
}
|
|
2170
|
+
default:
|
|
2171
|
+
return e;
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
function si(e) {
|
|
2175
|
+
let {
|
|
2176
|
+
disabled: t
|
|
2177
|
+
} = e;
|
|
2178
|
+
const {
|
|
2179
|
+
active: n,
|
|
2180
|
+
activatorEvent: r,
|
|
2181
|
+
draggableNodes: o
|
|
2182
|
+
} = we(Ye), i = it(r), a = it(n?.id);
|
|
2183
|
+
return E(() => {
|
|
2184
|
+
if (!t && !r && i && a != null) {
|
|
2185
|
+
if (!Ot(i) || document.activeElement === i.target)
|
|
2186
|
+
return;
|
|
2187
|
+
const s = o.get(a);
|
|
2188
|
+
if (!s)
|
|
2189
|
+
return;
|
|
2190
|
+
const {
|
|
2191
|
+
activatorNode: c,
|
|
2192
|
+
node: l
|
|
2193
|
+
} = s;
|
|
2194
|
+
if (!c.current && !l.current)
|
|
2195
|
+
return;
|
|
2196
|
+
requestAnimationFrame(() => {
|
|
2197
|
+
for (const d of [c.current, l.current]) {
|
|
2198
|
+
if (!d)
|
|
2199
|
+
continue;
|
|
2200
|
+
const u = to(d);
|
|
2201
|
+
if (u) {
|
|
2202
|
+
u.focus();
|
|
2203
|
+
break;
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
});
|
|
2207
|
+
}
|
|
2208
|
+
}, [r, t, o, a, i]), null;
|
|
2209
|
+
}
|
|
2210
|
+
function zn(e, t) {
|
|
2211
|
+
let {
|
|
2212
|
+
transform: n,
|
|
2213
|
+
...r
|
|
2214
|
+
} = t;
|
|
2215
|
+
return e != null && e.length ? e.reduce((o, i) => i({
|
|
2216
|
+
transform: o,
|
|
2217
|
+
...r
|
|
2218
|
+
}), n) : n;
|
|
2219
|
+
}
|
|
2220
|
+
function ai(e) {
|
|
2221
|
+
return M(
|
|
2222
|
+
() => ({
|
|
2223
|
+
draggable: {
|
|
2224
|
+
...tt.draggable,
|
|
2225
|
+
...e?.draggable
|
|
2226
|
+
},
|
|
2227
|
+
droppable: {
|
|
2228
|
+
...tt.droppable,
|
|
2229
|
+
...e?.droppable
|
|
2230
|
+
},
|
|
2231
|
+
dragOverlay: {
|
|
2232
|
+
...tt.dragOverlay,
|
|
2233
|
+
...e?.dragOverlay
|
|
2234
|
+
}
|
|
2235
|
+
}),
|
|
2236
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2237
|
+
[e?.draggable, e?.droppable, e?.dragOverlay]
|
|
2238
|
+
);
|
|
2239
|
+
}
|
|
2240
|
+
function ci(e) {
|
|
2241
|
+
let {
|
|
2242
|
+
activeNode: t,
|
|
2243
|
+
measure: n,
|
|
2244
|
+
initialRect: r,
|
|
2245
|
+
config: o = !0
|
|
2246
|
+
} = e;
|
|
2247
|
+
const i = N(!1), {
|
|
2248
|
+
x: a,
|
|
2249
|
+
y: s
|
|
2250
|
+
} = typeof o == "boolean" ? {
|
|
2251
|
+
x: o,
|
|
2252
|
+
y: o
|
|
2253
|
+
} : o;
|
|
2254
|
+
ce(() => {
|
|
2255
|
+
if (!a && !s || !t) {
|
|
2256
|
+
i.current = !1;
|
|
2257
|
+
return;
|
|
2258
|
+
}
|
|
2259
|
+
if (i.current || !r)
|
|
2260
|
+
return;
|
|
2261
|
+
const l = t?.node.current;
|
|
2262
|
+
if (!l || l.isConnected === !1)
|
|
2263
|
+
return;
|
|
2264
|
+
const d = n(l), u = vn(d, r);
|
|
2265
|
+
if (a || (u.x = 0), s || (u.y = 0), i.current = !0, Math.abs(u.x) > 0 || Math.abs(u.y) > 0) {
|
|
2266
|
+
const f = bn(l);
|
|
2267
|
+
f && f.scrollBy({
|
|
2268
|
+
top: u.y,
|
|
2269
|
+
left: u.x
|
|
2270
|
+
});
|
|
2271
|
+
}
|
|
2272
|
+
}, [t, a, s, r, n]);
|
|
2273
|
+
}
|
|
2274
|
+
const gt = /* @__PURE__ */ je({
|
|
2275
|
+
...re,
|
|
2276
|
+
scaleX: 1,
|
|
2277
|
+
scaleY: 1
|
|
2278
|
+
});
|
|
2279
|
+
var me;
|
|
2280
|
+
(function(e) {
|
|
2281
|
+
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
2282
|
+
})(me || (me = {}));
|
|
2283
|
+
const hs = /* @__PURE__ */ br(function(t) {
|
|
2284
|
+
var n, r, o, i;
|
|
2285
|
+
let {
|
|
2286
|
+
id: a,
|
|
2287
|
+
accessibility: s,
|
|
2288
|
+
autoScroll: c = !0,
|
|
2289
|
+
children: l,
|
|
2290
|
+
sensors: d = ti,
|
|
2291
|
+
collisionDetection: u = vo,
|
|
2292
|
+
measuring: f,
|
|
2293
|
+
modifiers: h,
|
|
2294
|
+
...S
|
|
2295
|
+
} = t;
|
|
2296
|
+
const g = xr(ii, void 0, oi), [v, x] = g, [w, y] = ao(), [z, C] = X(me.Uninitialized), A = z === me.Initialized, {
|
|
2297
|
+
draggable: {
|
|
2298
|
+
active: b,
|
|
2299
|
+
nodes: m,
|
|
2300
|
+
translate: O
|
|
2301
|
+
},
|
|
2302
|
+
droppable: {
|
|
2303
|
+
containers: L
|
|
2304
|
+
}
|
|
2305
|
+
} = v, T = b != null ? m.get(b) : null, H = N({
|
|
2306
|
+
initial: null,
|
|
2307
|
+
translated: null
|
|
2308
|
+
}), Q = M(() => {
|
|
2309
|
+
var j;
|
|
2310
|
+
return b != null ? {
|
|
2311
|
+
id: b,
|
|
2312
|
+
// It's possible for the active node to unmount while dragging
|
|
2313
|
+
data: (j = T?.data) != null ? j : ni,
|
|
2314
|
+
rect: H
|
|
2315
|
+
} : null;
|
|
2316
|
+
}, [b, T]), k = N(null), [Ke, Ce] = X(null), [Z, We] = X(null), ee = Fe(S, Object.values(S)), Se = ft("DndDescribedBy", a), pt = M(() => L.getEnabled(), [L]), ue = ai(f), {
|
|
2317
|
+
droppableRects: I,
|
|
2318
|
+
measureDroppableContainers: B,
|
|
2319
|
+
measuringScheduled: de
|
|
2320
|
+
} = Xo(pt, {
|
|
2321
|
+
dragging: A,
|
|
2322
|
+
dependencies: [O.x, O.y],
|
|
2323
|
+
config: ue.droppable
|
|
2324
|
+
}), te = jo(m, b), Bt = M(() => Z ? at(Z) : null, [Z]), Ft = vr(), $t = Go(te, ue.draggable.measure);
|
|
2325
|
+
ci({
|
|
2326
|
+
activeNode: b != null ? m.get(b) : null,
|
|
2327
|
+
config: Ft.layoutShiftCompensation,
|
|
2328
|
+
initialRect: $t,
|
|
2329
|
+
measure: ue.draggable.measure
|
|
2330
|
+
});
|
|
2331
|
+
const ne = on(te, ue.draggable.measure, $t), vt = on(te ? te.parentElement : null), be = N({
|
|
2332
|
+
activatorEvent: null,
|
|
2333
|
+
active: null,
|
|
2334
|
+
activeNode: te,
|
|
2335
|
+
collisionRect: null,
|
|
2336
|
+
collisions: null,
|
|
2337
|
+
droppableRects: I,
|
|
2338
|
+
draggableNodes: m,
|
|
2339
|
+
draggingNode: null,
|
|
2340
|
+
draggingNodeRect: null,
|
|
2341
|
+
droppableContainers: L,
|
|
2342
|
+
over: null,
|
|
2343
|
+
scrollableAncestors: [],
|
|
2344
|
+
scrollAdjustedTranslate: null
|
|
2345
|
+
}), Vt = L.getNodeFor((n = be.current.over) == null ? void 0 : n.id), xe = ei({
|
|
2346
|
+
measure: ue.dragOverlay.measure
|
|
2347
|
+
}), He = (r = xe.nodeRef.current) != null ? r : te, Re = A ? (o = xe.rect) != null ? o : ne : null, jt = !!(xe.nodeRef.current && xe.rect), Ut = Wo(jt ? null : ne), mt = Nn(He ? G(He) : null), fe = Ho(A ? Vt ?? te : null), qe = Zo(fe), Je = zn(h, {
|
|
2348
|
+
transform: {
|
|
2349
|
+
x: O.x - Ut.x,
|
|
2350
|
+
y: O.y - Ut.y,
|
|
2351
|
+
scaleX: 1,
|
|
2352
|
+
scaleY: 1
|
|
2353
|
+
},
|
|
2354
|
+
activatorEvent: Z,
|
|
2355
|
+
active: Q,
|
|
2356
|
+
activeNodeRect: ne,
|
|
2357
|
+
containerNodeRect: vt,
|
|
2358
|
+
draggingNodeRect: Re,
|
|
2359
|
+
over: be.current.over,
|
|
2360
|
+
overlayNodeRect: xe.rect,
|
|
2361
|
+
scrollableAncestors: fe,
|
|
2362
|
+
scrollableAncestorRects: qe,
|
|
2363
|
+
windowRect: mt
|
|
2364
|
+
}), Xt = Bt ? Ne(Bt, O) : null, Gt = qo(fe), lr = an(Gt), ur = an(Gt, [ne]), De = Ne(Je, lr), Ee = Re ? yo(Re, Je) : null, Te = Q && Ee ? u({
|
|
2365
|
+
active: Q,
|
|
2366
|
+
collisionRect: Ee,
|
|
2367
|
+
droppableRects: I,
|
|
2368
|
+
droppableContainers: pt,
|
|
2369
|
+
pointerCoordinates: Xt
|
|
2370
|
+
}) : null, Yt = go(Te, "id"), [he, Kt] = X(null), dr = jt ? Je : Ne(Je, ur), fr = bo(dr, (i = he?.rect) != null ? i : null, ne), bt = N(null), Wt = V(
|
|
2371
|
+
(j, Y) => {
|
|
2372
|
+
let {
|
|
2373
|
+
sensor: K,
|
|
2374
|
+
options: ge
|
|
2375
|
+
} = Y;
|
|
2376
|
+
if (k.current == null)
|
|
2377
|
+
return;
|
|
2378
|
+
const q = m.get(k.current);
|
|
2379
|
+
if (!q)
|
|
2380
|
+
return;
|
|
2381
|
+
const W = j.nativeEvent, oe = new K({
|
|
2382
|
+
active: k.current,
|
|
2383
|
+
activeNode: q,
|
|
2384
|
+
event: W,
|
|
2385
|
+
options: ge,
|
|
2386
|
+
// Sensors need to be instantiated with refs for arguments that change over time
|
|
2387
|
+
// otherwise they are frozen in time with the stale arguments
|
|
2388
|
+
context: be,
|
|
2389
|
+
onAbort($) {
|
|
2390
|
+
if (!m.get($))
|
|
2391
|
+
return;
|
|
2392
|
+
const {
|
|
2393
|
+
onDragAbort: ie
|
|
2394
|
+
} = ee.current, ae = {
|
|
2395
|
+
id: $
|
|
2396
|
+
};
|
|
2397
|
+
ie?.(ae), w({
|
|
2398
|
+
type: "onDragAbort",
|
|
2399
|
+
event: ae
|
|
2400
|
+
});
|
|
2401
|
+
},
|
|
2402
|
+
onPending($, pe, ie, ae) {
|
|
2403
|
+
if (!m.get($))
|
|
2404
|
+
return;
|
|
2405
|
+
const {
|
|
2406
|
+
onDragPending: Ie
|
|
2407
|
+
} = ee.current, ve = {
|
|
2408
|
+
id: $,
|
|
2409
|
+
constraint: pe,
|
|
2410
|
+
initialCoordinates: ie,
|
|
2411
|
+
offset: ae
|
|
2412
|
+
};
|
|
2413
|
+
Ie?.(ve), w({
|
|
2414
|
+
type: "onDragPending",
|
|
2415
|
+
event: ve
|
|
2416
|
+
});
|
|
2417
|
+
},
|
|
2418
|
+
onStart($) {
|
|
2419
|
+
const pe = k.current;
|
|
2420
|
+
if (pe == null)
|
|
2421
|
+
return;
|
|
2422
|
+
const ie = m.get(pe);
|
|
2423
|
+
if (!ie)
|
|
2424
|
+
return;
|
|
2425
|
+
const {
|
|
2426
|
+
onDragStart: ae
|
|
2427
|
+
} = ee.current, ze = {
|
|
2428
|
+
activatorEvent: W,
|
|
2429
|
+
active: {
|
|
2430
|
+
id: pe,
|
|
2431
|
+
data: ie.data,
|
|
2432
|
+
rect: H
|
|
2433
|
+
}
|
|
2434
|
+
};
|
|
2435
|
+
Qe(() => {
|
|
2436
|
+
ae?.(ze), C(me.Initializing), x({
|
|
2437
|
+
type: _.DragStart,
|
|
2438
|
+
initialCoordinates: $,
|
|
2439
|
+
active: pe
|
|
2440
|
+
}), w({
|
|
2441
|
+
type: "onDragStart",
|
|
2442
|
+
event: ze
|
|
2443
|
+
}), Ce(bt.current), We(W);
|
|
2444
|
+
});
|
|
2445
|
+
},
|
|
2446
|
+
onMove($) {
|
|
2447
|
+
x({
|
|
2448
|
+
type: _.DragMove,
|
|
2449
|
+
coordinates: $
|
|
2450
|
+
});
|
|
2451
|
+
},
|
|
2452
|
+
onEnd: Me(_.DragEnd),
|
|
2453
|
+
onCancel: Me(_.DragCancel)
|
|
2454
|
+
});
|
|
2455
|
+
bt.current = oe;
|
|
2456
|
+
function Me($) {
|
|
2457
|
+
return async function() {
|
|
2458
|
+
const {
|
|
2459
|
+
active: ie,
|
|
2460
|
+
collisions: ae,
|
|
2461
|
+
over: ze,
|
|
2462
|
+
scrollAdjustedTranslate: Ie
|
|
2463
|
+
} = be.current;
|
|
2464
|
+
let ve = null;
|
|
2465
|
+
if (ie && Ie) {
|
|
2466
|
+
const {
|
|
2467
|
+
cancelDrop: Pe
|
|
2468
|
+
} = ee.current;
|
|
2469
|
+
ve = {
|
|
2470
|
+
activatorEvent: W,
|
|
2471
|
+
active: ie,
|
|
2472
|
+
collisions: ae,
|
|
2473
|
+
delta: Ie,
|
|
2474
|
+
over: ze
|
|
2475
|
+
}, $ === _.DragEnd && typeof Pe == "function" && await Promise.resolve(Pe(ve)) && ($ = _.DragCancel);
|
|
2476
|
+
}
|
|
2477
|
+
k.current = null, Qe(() => {
|
|
2478
|
+
x({
|
|
2479
|
+
type: $
|
|
2480
|
+
}), C(me.Uninitialized), Kt(null), Ce(null), We(null), bt.current = null;
|
|
2481
|
+
const Pe = $ === _.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2482
|
+
if (ve) {
|
|
2483
|
+
const xt = ee.current[Pe];
|
|
2484
|
+
xt?.(ve), w({
|
|
2485
|
+
type: Pe,
|
|
2486
|
+
event: ve
|
|
2487
|
+
});
|
|
2488
|
+
}
|
|
2489
|
+
});
|
|
2490
|
+
};
|
|
2491
|
+
}
|
|
2492
|
+
},
|
|
2493
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2494
|
+
[m]
|
|
2495
|
+
), hr = V((j, Y) => (K, ge) => {
|
|
2496
|
+
const q = K.nativeEvent, W = m.get(ge);
|
|
2497
|
+
if (
|
|
2498
|
+
// Another sensor is already instantiating
|
|
2499
|
+
k.current !== null || // No active draggable
|
|
2500
|
+
!W || // Event has already been captured
|
|
2501
|
+
q.dndKit || q.defaultPrevented
|
|
2502
|
+
)
|
|
2503
|
+
return;
|
|
2504
|
+
const oe = {
|
|
2505
|
+
active: W
|
|
2506
|
+
};
|
|
2507
|
+
j(K, Y.options, oe) === !0 && (q.dndKit = {
|
|
2508
|
+
capturedBy: Y.sensor
|
|
2509
|
+
}, k.current = ge, Wt(K, Y));
|
|
2510
|
+
}, [m, Wt]), Ht = Uo(d, hr);
|
|
2511
|
+
Jo(d), ce(() => {
|
|
2512
|
+
ne && z === me.Initializing && C(me.Initialized);
|
|
2513
|
+
}, [ne, z]), E(
|
|
2514
|
+
() => {
|
|
2515
|
+
const {
|
|
2516
|
+
onDragMove: j
|
|
2517
|
+
} = ee.current, {
|
|
2518
|
+
active: Y,
|
|
2519
|
+
activatorEvent: K,
|
|
2520
|
+
collisions: ge,
|
|
2521
|
+
over: q
|
|
2522
|
+
} = be.current;
|
|
2523
|
+
if (!Y || !K)
|
|
2524
|
+
return;
|
|
2525
|
+
const W = {
|
|
2526
|
+
active: Y,
|
|
2527
|
+
activatorEvent: K,
|
|
2528
|
+
collisions: ge,
|
|
2529
|
+
delta: {
|
|
2530
|
+
x: De.x,
|
|
2531
|
+
y: De.y
|
|
2532
|
+
},
|
|
2533
|
+
over: q
|
|
2534
|
+
};
|
|
2535
|
+
Qe(() => {
|
|
2536
|
+
j?.(W), w({
|
|
2537
|
+
type: "onDragMove",
|
|
2538
|
+
event: W
|
|
2539
|
+
});
|
|
2540
|
+
});
|
|
2541
|
+
},
|
|
2542
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2543
|
+
[De.x, De.y]
|
|
2544
|
+
), E(
|
|
2545
|
+
() => {
|
|
2546
|
+
const {
|
|
2547
|
+
active: j,
|
|
2548
|
+
activatorEvent: Y,
|
|
2549
|
+
collisions: K,
|
|
2550
|
+
droppableContainers: ge,
|
|
2551
|
+
scrollAdjustedTranslate: q
|
|
2552
|
+
} = be.current;
|
|
2553
|
+
if (!j || k.current == null || !Y || !q)
|
|
2554
|
+
return;
|
|
2555
|
+
const {
|
|
2556
|
+
onDragOver: W
|
|
2557
|
+
} = ee.current, oe = ge.get(Yt), Me = oe && oe.rect.current ? {
|
|
2558
|
+
id: oe.id,
|
|
2559
|
+
rect: oe.rect.current,
|
|
2560
|
+
data: oe.data,
|
|
2561
|
+
disabled: oe.disabled
|
|
2562
|
+
} : null, $ = {
|
|
2563
|
+
active: j,
|
|
2564
|
+
activatorEvent: Y,
|
|
2565
|
+
collisions: K,
|
|
2566
|
+
delta: {
|
|
2567
|
+
x: q.x,
|
|
2568
|
+
y: q.y
|
|
2569
|
+
},
|
|
2570
|
+
over: Me
|
|
2571
|
+
};
|
|
2572
|
+
Qe(() => {
|
|
2573
|
+
Kt(Me), W?.($), w({
|
|
2574
|
+
type: "onDragOver",
|
|
2575
|
+
event: $
|
|
2576
|
+
});
|
|
2577
|
+
});
|
|
2578
|
+
},
|
|
2579
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2580
|
+
[Yt]
|
|
2581
|
+
), ce(() => {
|
|
2582
|
+
be.current = {
|
|
2583
|
+
activatorEvent: Z,
|
|
2584
|
+
active: Q,
|
|
2585
|
+
activeNode: te,
|
|
2586
|
+
collisionRect: Ee,
|
|
2587
|
+
collisions: Te,
|
|
2588
|
+
droppableRects: I,
|
|
2589
|
+
draggableNodes: m,
|
|
2590
|
+
draggingNode: He,
|
|
2591
|
+
draggingNodeRect: Re,
|
|
2592
|
+
droppableContainers: L,
|
|
2593
|
+
over: he,
|
|
2594
|
+
scrollableAncestors: fe,
|
|
2595
|
+
scrollAdjustedTranslate: De
|
|
2596
|
+
}, H.current = {
|
|
2597
|
+
initial: Re,
|
|
2598
|
+
translated: Ee
|
|
2599
|
+
};
|
|
2600
|
+
}, [Q, te, Te, Ee, m, He, Re, I, L, he, fe, De]), Fo({
|
|
2601
|
+
...Ft,
|
|
2602
|
+
delta: O,
|
|
2603
|
+
draggingRect: Ee,
|
|
2604
|
+
pointerCoordinates: Xt,
|
|
2605
|
+
scrollableAncestors: fe,
|
|
2606
|
+
scrollableAncestorRects: qe
|
|
2607
|
+
});
|
|
2608
|
+
const gr = M(() => ({
|
|
2609
|
+
active: Q,
|
|
2610
|
+
activeNode: te,
|
|
2611
|
+
activeNodeRect: ne,
|
|
2612
|
+
activatorEvent: Z,
|
|
2613
|
+
collisions: Te,
|
|
2614
|
+
containerNodeRect: vt,
|
|
2615
|
+
dragOverlay: xe,
|
|
2616
|
+
draggableNodes: m,
|
|
2617
|
+
droppableContainers: L,
|
|
2618
|
+
droppableRects: I,
|
|
2619
|
+
over: he,
|
|
2620
|
+
measureDroppableContainers: B,
|
|
2621
|
+
scrollableAncestors: fe,
|
|
2622
|
+
scrollableAncestorRects: qe,
|
|
2623
|
+
measuringConfiguration: ue,
|
|
2624
|
+
measuringScheduled: de,
|
|
2625
|
+
windowRect: mt
|
|
2626
|
+
}), [Q, te, ne, Z, Te, vt, xe, m, L, I, he, B, fe, qe, ue, de, mt]), pr = M(() => ({
|
|
2627
|
+
activatorEvent: Z,
|
|
2628
|
+
activators: Ht,
|
|
2629
|
+
active: Q,
|
|
2630
|
+
activeNodeRect: ne,
|
|
2631
|
+
ariaDescribedById: {
|
|
2632
|
+
draggable: Se
|
|
2633
|
+
},
|
|
2634
|
+
dispatch: x,
|
|
2635
|
+
draggableNodes: m,
|
|
2636
|
+
over: he,
|
|
2637
|
+
measureDroppableContainers: B
|
|
2638
|
+
}), [Z, Ht, Q, ne, x, Se, m, he, B]);
|
|
2639
|
+
return P.createElement(pn.Provider, {
|
|
2640
|
+
value: y
|
|
2641
|
+
}, P.createElement(Ye.Provider, {
|
|
2642
|
+
value: pr
|
|
2643
|
+
}, P.createElement(Tn.Provider, {
|
|
2644
|
+
value: gr
|
|
2645
|
+
}, P.createElement(gt.Provider, {
|
|
2646
|
+
value: fr
|
|
2647
|
+
}, l)), P.createElement(si, {
|
|
2648
|
+
disabled: s?.restoreFocus === !1
|
|
2649
|
+
})), P.createElement(uo, {
|
|
2650
|
+
...s,
|
|
2651
|
+
hiddenTextDescribedById: Se
|
|
2652
|
+
}));
|
|
2653
|
+
function vr() {
|
|
2654
|
+
const j = Ke?.autoScrollEnabled === !1, Y = typeof c == "object" ? c.enabled === !1 : c === !1, K = A && !j && !Y;
|
|
2655
|
+
return typeof c == "object" ? {
|
|
2656
|
+
...c,
|
|
2657
|
+
enabled: K
|
|
2658
|
+
} : {
|
|
2659
|
+
enabled: K
|
|
2660
|
+
};
|
|
2661
|
+
}
|
|
2662
|
+
}), li = /* @__PURE__ */ je(null), ln = "button", ui = "Draggable";
|
|
2663
|
+
function gs(e) {
|
|
2664
|
+
let {
|
|
2665
|
+
id: t,
|
|
2666
|
+
data: n,
|
|
2667
|
+
disabled: r = !1,
|
|
2668
|
+
attributes: o
|
|
2669
|
+
} = e;
|
|
2670
|
+
const i = ft(ui), {
|
|
2671
|
+
activators: a,
|
|
2672
|
+
activatorEvent: s,
|
|
2673
|
+
active: c,
|
|
2674
|
+
activeNodeRect: l,
|
|
2675
|
+
ariaDescribedById: d,
|
|
2676
|
+
draggableNodes: u,
|
|
2677
|
+
over: f
|
|
2678
|
+
} = we(Ye), {
|
|
2679
|
+
role: h = ln,
|
|
2680
|
+
roleDescription: S = "draggable",
|
|
2681
|
+
tabIndex: g = 0
|
|
2682
|
+
} = o ?? {}, v = c?.id === t, x = we(v ? gt : li), [w, y] = ot(), [z, C] = ot(), A = Qo(a, t), b = Fe(n);
|
|
2683
|
+
ce(
|
|
2684
|
+
() => (u.set(t, {
|
|
2685
|
+
id: t,
|
|
2686
|
+
key: i,
|
|
2687
|
+
node: w,
|
|
2688
|
+
activatorNode: z,
|
|
2689
|
+
data: b
|
|
2690
|
+
}), () => {
|
|
2691
|
+
const O = u.get(t);
|
|
2692
|
+
O && O.key === i && u.delete(t);
|
|
2693
|
+
}),
|
|
2694
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2695
|
+
[u, t]
|
|
2696
|
+
);
|
|
2697
|
+
const m = M(() => ({
|
|
2698
|
+
role: h,
|
|
2699
|
+
tabIndex: g,
|
|
2700
|
+
"aria-disabled": r,
|
|
2701
|
+
"aria-pressed": v && h === ln ? !0 : void 0,
|
|
2702
|
+
"aria-roledescription": S,
|
|
2703
|
+
"aria-describedby": d.draggable
|
|
2704
|
+
}), [r, h, g, v, S, d.draggable]);
|
|
2705
|
+
return {
|
|
2706
|
+
active: c,
|
|
2707
|
+
activatorEvent: s,
|
|
2708
|
+
activeNodeRect: l,
|
|
2709
|
+
attributes: m,
|
|
2710
|
+
isDragging: v,
|
|
2711
|
+
listeners: r ? void 0 : A,
|
|
2712
|
+
node: w,
|
|
2713
|
+
over: f,
|
|
2714
|
+
setNodeRef: y,
|
|
2715
|
+
setActivatorNodeRef: C,
|
|
2716
|
+
transform: x
|
|
2717
|
+
};
|
|
2718
|
+
}
|
|
2719
|
+
function di() {
|
|
2720
|
+
return we(Tn);
|
|
2721
|
+
}
|
|
2722
|
+
const fi = "Droppable", hi = {
|
|
2723
|
+
timeout: 25
|
|
2724
|
+
};
|
|
2725
|
+
function ps(e) {
|
|
2726
|
+
let {
|
|
2727
|
+
data: t,
|
|
2728
|
+
disabled: n = !1,
|
|
2729
|
+
id: r,
|
|
2730
|
+
resizeObserverConfig: o
|
|
2731
|
+
} = e;
|
|
2732
|
+
const i = ft(fi), {
|
|
2733
|
+
active: a,
|
|
2734
|
+
dispatch: s,
|
|
2735
|
+
over: c,
|
|
2736
|
+
measureDroppableContainers: l
|
|
2737
|
+
} = we(Ye), d = N({
|
|
2738
|
+
disabled: n
|
|
2739
|
+
}), u = N(!1), f = N(null), h = N(null), {
|
|
2740
|
+
disabled: S,
|
|
2741
|
+
updateMeasurementsFor: g,
|
|
2742
|
+
timeout: v
|
|
2743
|
+
} = {
|
|
2744
|
+
...hi,
|
|
2745
|
+
...o
|
|
2746
|
+
}, x = Fe(g ?? r), w = V(
|
|
2747
|
+
() => {
|
|
2748
|
+
if (!u.current) {
|
|
2749
|
+
u.current = !0;
|
|
2750
|
+
return;
|
|
2751
|
+
}
|
|
2752
|
+
h.current != null && clearTimeout(h.current), h.current = setTimeout(() => {
|
|
2753
|
+
l(Array.isArray(x.current) ? x.current : [x.current]), h.current = null;
|
|
2754
|
+
}, v);
|
|
2755
|
+
},
|
|
2756
|
+
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2757
|
+
[v]
|
|
2758
|
+
), y = ht({
|
|
2759
|
+
callback: w,
|
|
2760
|
+
disabled: S || !a
|
|
2761
|
+
}), z = V((m, O) => {
|
|
2762
|
+
y && (O && (y.unobserve(O), u.current = !1), m && y.observe(m));
|
|
2763
|
+
}, [y]), [C, A] = ot(z), b = Fe(t);
|
|
2764
|
+
return E(() => {
|
|
2765
|
+
!y || !C.current || (y.disconnect(), u.current = !1, y.observe(C.current));
|
|
2766
|
+
}, [C, y]), E(
|
|
2767
|
+
() => (s({
|
|
2768
|
+
type: _.RegisterDroppable,
|
|
2769
|
+
element: {
|
|
2770
|
+
id: r,
|
|
2771
|
+
key: i,
|
|
2772
|
+
disabled: n,
|
|
2773
|
+
node: C,
|
|
2774
|
+
rect: f,
|
|
2775
|
+
data: b
|
|
2776
|
+
}
|
|
2777
|
+
}), () => s({
|
|
2778
|
+
type: _.UnregisterDroppable,
|
|
2779
|
+
key: i,
|
|
2780
|
+
id: r
|
|
2781
|
+
})),
|
|
2782
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2783
|
+
[r]
|
|
2784
|
+
), E(() => {
|
|
2785
|
+
n !== d.current.disabled && (s({
|
|
2786
|
+
type: _.SetDroppableDisabled,
|
|
2787
|
+
id: r,
|
|
2788
|
+
key: i,
|
|
2789
|
+
disabled: n
|
|
2790
|
+
}), d.current.disabled = n);
|
|
2791
|
+
}, [r, i, n, s]), {
|
|
2792
|
+
active: a,
|
|
2793
|
+
rect: f,
|
|
2794
|
+
isOver: c?.id === r,
|
|
2795
|
+
node: C,
|
|
2796
|
+
over: c,
|
|
2797
|
+
setNodeRef: A
|
|
2798
|
+
};
|
|
2799
|
+
}
|
|
2800
|
+
function gi(e) {
|
|
2801
|
+
let {
|
|
2802
|
+
animation: t,
|
|
2803
|
+
children: n
|
|
2804
|
+
} = e;
|
|
2805
|
+
const [r, o] = X(null), [i, a] = X(null), s = it(n);
|
|
2806
|
+
return !n && !r && s && o(s), ce(() => {
|
|
2807
|
+
if (!i)
|
|
2808
|
+
return;
|
|
2809
|
+
const c = r?.key, l = r?.props.id;
|
|
2810
|
+
if (c == null || l == null) {
|
|
2811
|
+
o(null);
|
|
2812
|
+
return;
|
|
2813
|
+
}
|
|
2814
|
+
Promise.resolve(t(l, i)).then(() => {
|
|
2815
|
+
o(null);
|
|
2816
|
+
});
|
|
2817
|
+
}, [t, r, i]), P.createElement(P.Fragment, null, n, r ? yr(r, {
|
|
2818
|
+
ref: a
|
|
2819
|
+
}) : null);
|
|
2820
|
+
}
|
|
2821
|
+
const pi = {
|
|
2822
|
+
x: 0,
|
|
2823
|
+
y: 0,
|
|
2824
|
+
scaleX: 1,
|
|
2825
|
+
scaleY: 1
|
|
2826
|
+
};
|
|
2827
|
+
function vi(e) {
|
|
2828
|
+
let {
|
|
2829
|
+
children: t
|
|
2830
|
+
} = e;
|
|
2831
|
+
return P.createElement(Ye.Provider, {
|
|
2832
|
+
value: On
|
|
2833
|
+
}, P.createElement(gt.Provider, {
|
|
2834
|
+
value: pi
|
|
2835
|
+
}, t));
|
|
2836
|
+
}
|
|
2837
|
+
const mi = {
|
|
2838
|
+
position: "fixed",
|
|
2839
|
+
touchAction: "none"
|
|
2840
|
+
}, bi = (e) => Ot(e) ? "transform 250ms ease" : void 0, xi = /* @__PURE__ */ wr((e, t) => {
|
|
2841
|
+
let {
|
|
2842
|
+
as: n,
|
|
2843
|
+
activatorEvent: r,
|
|
2844
|
+
adjustScale: o,
|
|
2845
|
+
children: i,
|
|
2846
|
+
className: a,
|
|
2847
|
+
rect: s,
|
|
2848
|
+
style: c,
|
|
2849
|
+
transform: l,
|
|
2850
|
+
transition: d = bi
|
|
2851
|
+
} = e;
|
|
2852
|
+
if (!s)
|
|
2853
|
+
return null;
|
|
2854
|
+
const u = o ? l : {
|
|
2855
|
+
...l,
|
|
2856
|
+
scaleX: 1,
|
|
2857
|
+
scaleY: 1
|
|
2858
|
+
}, f = {
|
|
2859
|
+
...mi,
|
|
2860
|
+
width: s.width,
|
|
2861
|
+
height: s.height,
|
|
2862
|
+
top: s.top,
|
|
2863
|
+
left: s.left,
|
|
2864
|
+
transform: $e.Transform.toString(u),
|
|
2865
|
+
transformOrigin: o && r ? fo(r, s) : void 0,
|
|
2866
|
+
transition: typeof d == "function" ? d(r) : d,
|
|
2867
|
+
...c
|
|
2868
|
+
};
|
|
2869
|
+
return P.createElement(n, {
|
|
2870
|
+
className: a,
|
|
2871
|
+
style: f,
|
|
2872
|
+
ref: t
|
|
2873
|
+
}, i);
|
|
2874
|
+
}), yi = (e) => (t) => {
|
|
2875
|
+
let {
|
|
2876
|
+
active: n,
|
|
2877
|
+
dragOverlay: r
|
|
2878
|
+
} = t;
|
|
2879
|
+
const o = {}, {
|
|
2880
|
+
styles: i,
|
|
2881
|
+
className: a
|
|
2882
|
+
} = e;
|
|
2883
|
+
if (i != null && i.active)
|
|
2884
|
+
for (const [s, c] of Object.entries(i.active))
|
|
2885
|
+
c !== void 0 && (o[s] = n.node.style.getPropertyValue(s), n.node.style.setProperty(s, c));
|
|
2886
|
+
if (i != null && i.dragOverlay)
|
|
2887
|
+
for (const [s, c] of Object.entries(i.dragOverlay))
|
|
2888
|
+
c !== void 0 && r.node.style.setProperty(s, c);
|
|
2889
|
+
return a != null && a.active && n.node.classList.add(a.active), a != null && a.dragOverlay && r.node.classList.add(a.dragOverlay), function() {
|
|
2890
|
+
for (const [c, l] of Object.entries(o))
|
|
2891
|
+
n.node.style.setProperty(c, l);
|
|
2892
|
+
a != null && a.active && n.node.classList.remove(a.active);
|
|
2893
|
+
};
|
|
2894
|
+
}, wi = (e) => {
|
|
2895
|
+
let {
|
|
2896
|
+
transform: {
|
|
2897
|
+
initial: t,
|
|
2898
|
+
final: n
|
|
2899
|
+
}
|
|
2900
|
+
} = e;
|
|
2901
|
+
return [{
|
|
2902
|
+
transform: $e.Transform.toString(t)
|
|
2903
|
+
}, {
|
|
2904
|
+
transform: $e.Transform.toString(n)
|
|
2905
|
+
}];
|
|
2906
|
+
}, Ci = {
|
|
2907
|
+
duration: 250,
|
|
2908
|
+
easing: "ease",
|
|
2909
|
+
keyframes: wi,
|
|
2910
|
+
sideEffects: /* @__PURE__ */ yi({
|
|
2911
|
+
styles: {
|
|
2912
|
+
active: {
|
|
2913
|
+
opacity: "0"
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
})
|
|
2917
|
+
};
|
|
2918
|
+
function Si(e) {
|
|
2919
|
+
let {
|
|
2920
|
+
config: t,
|
|
2921
|
+
draggableNodes: n,
|
|
2922
|
+
droppableContainers: r,
|
|
2923
|
+
measuringConfiguration: o
|
|
2924
|
+
} = e;
|
|
2925
|
+
return dt((i, a) => {
|
|
2926
|
+
if (t === null)
|
|
2927
|
+
return;
|
|
2928
|
+
const s = n.get(i);
|
|
2929
|
+
if (!s)
|
|
2930
|
+
return;
|
|
2931
|
+
const c = s.node.current;
|
|
2932
|
+
if (!c)
|
|
2933
|
+
return;
|
|
2934
|
+
const l = An(a);
|
|
2935
|
+
if (!l)
|
|
2936
|
+
return;
|
|
2937
|
+
const {
|
|
2938
|
+
transform: d
|
|
2939
|
+
} = G(a).getComputedStyle(a), u = mn(d);
|
|
2940
|
+
if (!u)
|
|
2941
|
+
return;
|
|
2942
|
+
const f = typeof t == "function" ? t : Ri(t);
|
|
2943
|
+
return Rn(c, o.draggable.measure), f({
|
|
2944
|
+
active: {
|
|
2945
|
+
id: i,
|
|
2946
|
+
data: s.data,
|
|
2947
|
+
node: c,
|
|
2948
|
+
rect: o.draggable.measure(c)
|
|
2949
|
+
},
|
|
2950
|
+
draggableNodes: n,
|
|
2951
|
+
dragOverlay: {
|
|
2952
|
+
node: a,
|
|
2953
|
+
rect: o.dragOverlay.measure(l)
|
|
2954
|
+
},
|
|
2955
|
+
droppableContainers: r,
|
|
2956
|
+
measuringConfiguration: o,
|
|
2957
|
+
transform: u
|
|
2958
|
+
});
|
|
2959
|
+
});
|
|
2960
|
+
}
|
|
2961
|
+
function Ri(e) {
|
|
2962
|
+
const {
|
|
2963
|
+
duration: t,
|
|
2964
|
+
easing: n,
|
|
2965
|
+
sideEffects: r,
|
|
2966
|
+
keyframes: o
|
|
2967
|
+
} = {
|
|
2968
|
+
...Ci,
|
|
2969
|
+
...e
|
|
2970
|
+
};
|
|
2971
|
+
return (i) => {
|
|
2972
|
+
let {
|
|
2973
|
+
active: a,
|
|
2974
|
+
dragOverlay: s,
|
|
2975
|
+
transform: c,
|
|
2976
|
+
...l
|
|
2977
|
+
} = i;
|
|
2978
|
+
if (!t)
|
|
2979
|
+
return;
|
|
2980
|
+
const d = {
|
|
2981
|
+
x: s.rect.left - a.rect.left,
|
|
2982
|
+
y: s.rect.top - a.rect.top
|
|
2983
|
+
}, u = {
|
|
2984
|
+
scaleX: c.scaleX !== 1 ? a.rect.width * c.scaleX / s.rect.width : 1,
|
|
2985
|
+
scaleY: c.scaleY !== 1 ? a.rect.height * c.scaleY / s.rect.height : 1
|
|
2986
|
+
}, f = {
|
|
2987
|
+
x: c.x - d.x,
|
|
2988
|
+
y: c.y - d.y,
|
|
2989
|
+
...u
|
|
2990
|
+
}, h = o({
|
|
2991
|
+
...l,
|
|
2992
|
+
active: a,
|
|
2993
|
+
dragOverlay: s,
|
|
2994
|
+
transform: {
|
|
2995
|
+
initial: c,
|
|
2996
|
+
final: f
|
|
2997
|
+
}
|
|
2998
|
+
}), [S] = h, g = h[h.length - 1];
|
|
2999
|
+
if (JSON.stringify(S) === JSON.stringify(g))
|
|
3000
|
+
return;
|
|
3001
|
+
const v = r?.({
|
|
3002
|
+
active: a,
|
|
3003
|
+
dragOverlay: s,
|
|
3004
|
+
...l
|
|
3005
|
+
}), x = s.node.animate(h, {
|
|
3006
|
+
duration: t,
|
|
3007
|
+
easing: n,
|
|
3008
|
+
fill: "forwards"
|
|
3009
|
+
});
|
|
3010
|
+
return new Promise((w) => {
|
|
3011
|
+
x.onfinish = () => {
|
|
3012
|
+
v?.(), w();
|
|
3013
|
+
};
|
|
3014
|
+
});
|
|
3015
|
+
};
|
|
3016
|
+
}
|
|
3017
|
+
let un = 0;
|
|
3018
|
+
function Di(e) {
|
|
3019
|
+
return M(() => {
|
|
3020
|
+
if (e != null)
|
|
3021
|
+
return un++, un;
|
|
3022
|
+
}, [e]);
|
|
3023
|
+
}
|
|
3024
|
+
const vs = /* @__PURE__ */ P.memo((e) => {
|
|
3025
|
+
let {
|
|
3026
|
+
adjustScale: t = !1,
|
|
3027
|
+
children: n,
|
|
3028
|
+
dropAnimation: r,
|
|
3029
|
+
style: o,
|
|
3030
|
+
transition: i,
|
|
3031
|
+
modifiers: a,
|
|
3032
|
+
wrapperElement: s = "div",
|
|
3033
|
+
className: c,
|
|
3034
|
+
zIndex: l = 999
|
|
3035
|
+
} = e;
|
|
3036
|
+
const {
|
|
3037
|
+
activatorEvent: d,
|
|
3038
|
+
active: u,
|
|
3039
|
+
activeNodeRect: f,
|
|
3040
|
+
containerNodeRect: h,
|
|
3041
|
+
draggableNodes: S,
|
|
3042
|
+
droppableContainers: g,
|
|
3043
|
+
dragOverlay: v,
|
|
3044
|
+
over: x,
|
|
3045
|
+
measuringConfiguration: w,
|
|
3046
|
+
scrollableAncestors: y,
|
|
3047
|
+
scrollableAncestorRects: z,
|
|
3048
|
+
windowRect: C
|
|
3049
|
+
} = di(), A = we(gt), b = Di(u?.id), m = zn(a, {
|
|
3050
|
+
activatorEvent: d,
|
|
3051
|
+
active: u,
|
|
3052
|
+
activeNodeRect: f,
|
|
3053
|
+
containerNodeRect: h,
|
|
3054
|
+
draggingNodeRect: v.rect,
|
|
3055
|
+
over: x,
|
|
3056
|
+
overlayNodeRect: v.rect,
|
|
3057
|
+
scrollableAncestors: y,
|
|
3058
|
+
scrollableAncestorRects: z,
|
|
3059
|
+
transform: A,
|
|
3060
|
+
windowRect: C
|
|
3061
|
+
}), O = kt(f), L = Si({
|
|
3062
|
+
config: r,
|
|
3063
|
+
draggableNodes: S,
|
|
3064
|
+
droppableContainers: g,
|
|
3065
|
+
measuringConfiguration: w
|
|
3066
|
+
}), T = O ? v.setRef : void 0;
|
|
3067
|
+
return P.createElement(vi, null, P.createElement(gi, {
|
|
3068
|
+
animation: L
|
|
3069
|
+
}, u && b ? P.createElement(xi, {
|
|
3070
|
+
key: b,
|
|
3071
|
+
id: u.id,
|
|
3072
|
+
ref: T,
|
|
3073
|
+
as: s,
|
|
3074
|
+
activatorEvent: d,
|
|
3075
|
+
adjustScale: t,
|
|
3076
|
+
className: c,
|
|
3077
|
+
transition: i,
|
|
3078
|
+
rect: O,
|
|
3079
|
+
style: {
|
|
3080
|
+
zIndex: l,
|
|
3081
|
+
...o
|
|
3082
|
+
},
|
|
3083
|
+
transform: m
|
|
3084
|
+
}, n) : null));
|
|
3085
|
+
});
|
|
3086
|
+
var _t = "ContextMenu", [Ei] = Lr(_t, [
|
|
3087
|
+
fn
|
|
3088
|
+
]), U = fn(), [Mi, In] = Ei(_t), Pn = (e) => {
|
|
3089
|
+
const { __scopeContextMenu: t, children: n, onOpenChange: r, dir: o, modal: i = !0 } = e, [a, s] = R.useState(!1), c = U(t), l = Mr(r), d = R.useCallback(
|
|
3090
|
+
(u) => {
|
|
3091
|
+
s(u), l(u);
|
|
3092
|
+
},
|
|
3093
|
+
[l]
|
|
3094
|
+
);
|
|
3095
|
+
return /* @__PURE__ */ p(
|
|
3096
|
+
Mi,
|
|
3097
|
+
{
|
|
3098
|
+
scope: t,
|
|
3099
|
+
open: a,
|
|
3100
|
+
onOpenChange: d,
|
|
3101
|
+
modal: i,
|
|
3102
|
+
children: /* @__PURE__ */ p(
|
|
3103
|
+
Nr,
|
|
3104
|
+
{
|
|
3105
|
+
...c,
|
|
3106
|
+
dir: o,
|
|
3107
|
+
open: a,
|
|
3108
|
+
onOpenChange: d,
|
|
3109
|
+
modal: i,
|
|
3110
|
+
children: n
|
|
3111
|
+
}
|
|
3112
|
+
)
|
|
3113
|
+
}
|
|
3114
|
+
);
|
|
3115
|
+
};
|
|
3116
|
+
Pn.displayName = _t;
|
|
3117
|
+
var Ln = "ContextMenuTrigger", kn = R.forwardRef(
|
|
3118
|
+
(e, t) => {
|
|
3119
|
+
const { __scopeContextMenu: n, disabled: r = !1, ...o } = e, i = In(Ln, n), a = U(n), s = R.useRef({ x: 0, y: 0 }), c = R.useRef({
|
|
3120
|
+
getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...s.current })
|
|
3121
|
+
}), l = R.useRef(0), d = R.useCallback(
|
|
3122
|
+
() => window.clearTimeout(l.current),
|
|
3123
|
+
[]
|
|
3124
|
+
), u = (f) => {
|
|
3125
|
+
s.current = { x: f.clientX, y: f.clientY }, i.onOpenChange(!0);
|
|
3126
|
+
};
|
|
3127
|
+
return R.useEffect(() => d, [d]), R.useEffect(() => {
|
|
3128
|
+
r && d();
|
|
3129
|
+
}, [r, d]), /* @__PURE__ */ se(et, { children: [
|
|
3130
|
+
/* @__PURE__ */ p(Ar, { ...a, virtualRef: c }),
|
|
3131
|
+
/* @__PURE__ */ p(
|
|
3132
|
+
Or.span,
|
|
3133
|
+
{
|
|
3134
|
+
"data-state": i.open ? "open" : "closed",
|
|
3135
|
+
"data-disabled": r ? "" : void 0,
|
|
3136
|
+
...o,
|
|
3137
|
+
ref: t,
|
|
3138
|
+
style: { WebkitTouchCallout: "none", ...e.style },
|
|
3139
|
+
onContextMenu: r ? e.onContextMenu : Le(e.onContextMenu, (f) => {
|
|
3140
|
+
d(), u(f), f.preventDefault();
|
|
3141
|
+
}),
|
|
3142
|
+
onPointerDown: r ? e.onPointerDown : Le(
|
|
3143
|
+
e.onPointerDown,
|
|
3144
|
+
Ze((f) => {
|
|
3145
|
+
d(), l.current = window.setTimeout(() => u(f), 700);
|
|
3146
|
+
})
|
|
3147
|
+
),
|
|
3148
|
+
onPointerMove: r ? e.onPointerMove : Le(e.onPointerMove, Ze(d)),
|
|
3149
|
+
onPointerCancel: r ? e.onPointerCancel : Le(e.onPointerCancel, Ze(d)),
|
|
3150
|
+
onPointerUp: r ? e.onPointerUp : Le(e.onPointerUp, Ze(d))
|
|
3151
|
+
}
|
|
3152
|
+
)
|
|
3153
|
+
] });
|
|
3154
|
+
}
|
|
3155
|
+
);
|
|
3156
|
+
kn.displayName = Ln;
|
|
3157
|
+
var Ni = "ContextMenuPortal", _n = (e) => {
|
|
3158
|
+
const { __scopeContextMenu: t, ...n } = e, r = U(t);
|
|
3159
|
+
return /* @__PURE__ */ p(Tr, { ...r, ...n });
|
|
3160
|
+
};
|
|
3161
|
+
_n.displayName = Ni;
|
|
3162
|
+
var Bn = "ContextMenuContent", Fn = R.forwardRef(
|
|
3163
|
+
(e, t) => {
|
|
3164
|
+
const { __scopeContextMenu: n, ...r } = e, o = In(Bn, n), i = U(n), a = R.useRef(!1);
|
|
3165
|
+
return /* @__PURE__ */ p(
|
|
3166
|
+
zr,
|
|
3167
|
+
{
|
|
3168
|
+
...i,
|
|
3169
|
+
...r,
|
|
3170
|
+
ref: t,
|
|
3171
|
+
side: "right",
|
|
3172
|
+
sideOffset: 2,
|
|
3173
|
+
align: "start",
|
|
3174
|
+
onCloseAutoFocus: (s) => {
|
|
3175
|
+
e.onCloseAutoFocus?.(s), !s.defaultPrevented && a.current && s.preventDefault(), a.current = !1;
|
|
3176
|
+
},
|
|
3177
|
+
onInteractOutside: (s) => {
|
|
3178
|
+
e.onInteractOutside?.(s), !s.defaultPrevented && !o.modal && (a.current = !0);
|
|
3179
|
+
},
|
|
3180
|
+
style: {
|
|
3181
|
+
...e.style,
|
|
3182
|
+
"--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
3183
|
+
"--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
3184
|
+
"--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
3185
|
+
"--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
3186
|
+
"--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
);
|
|
3190
|
+
}
|
|
3191
|
+
);
|
|
3192
|
+
Fn.displayName = Bn;
|
|
3193
|
+
var Ai = "ContextMenuGroup", $n = R.forwardRef(
|
|
3194
|
+
(e, t) => {
|
|
3195
|
+
const { __scopeContextMenu: n, ...r } = e, o = U(n);
|
|
3196
|
+
return /* @__PURE__ */ p(kr, { ...o, ...r, ref: t });
|
|
3197
|
+
}
|
|
3198
|
+
);
|
|
3199
|
+
$n.displayName = Ai;
|
|
3200
|
+
var Oi = "ContextMenuLabel", Vn = R.forwardRef(
|
|
3201
|
+
(e, t) => {
|
|
3202
|
+
const { __scopeContextMenu: n, ...r } = e, o = U(n);
|
|
3203
|
+
return /* @__PURE__ */ p(jr, { ...o, ...r, ref: t });
|
|
3204
|
+
}
|
|
3205
|
+
);
|
|
3206
|
+
Vn.displayName = Oi;
|
|
3207
|
+
var Ti = "ContextMenuItem", jn = R.forwardRef(
|
|
3208
|
+
(e, t) => {
|
|
3209
|
+
const { __scopeContextMenu: n, ...r } = e, o = U(n);
|
|
3210
|
+
return /* @__PURE__ */ p(Pr, { ...o, ...r, ref: t });
|
|
3211
|
+
}
|
|
3212
|
+
);
|
|
3213
|
+
jn.displayName = Ti;
|
|
3214
|
+
var zi = "ContextMenuCheckboxItem", Un = R.forwardRef((e, t) => {
|
|
3215
|
+
const { __scopeContextMenu: n, ...r } = e, o = U(n);
|
|
3216
|
+
return /* @__PURE__ */ p($r, { ...o, ...r, ref: t });
|
|
3217
|
+
});
|
|
3218
|
+
Un.displayName = zi;
|
|
3219
|
+
var Ii = "ContextMenuRadioGroup", Xn = R.forwardRef((e, t) => {
|
|
3220
|
+
const { __scopeContextMenu: n, ...r } = e, o = U(n);
|
|
3221
|
+
return /* @__PURE__ */ p(_r, { ...o, ...r, ref: t });
|
|
3222
|
+
});
|
|
3223
|
+
Xn.displayName = Ii;
|
|
3224
|
+
var Pi = "ContextMenuRadioItem", Gn = R.forwardRef((e, t) => {
|
|
3225
|
+
const { __scopeContextMenu: n, ...r } = e, o = U(n);
|
|
3226
|
+
return /* @__PURE__ */ p(Ur, { ...o, ...r, ref: t });
|
|
3227
|
+
});
|
|
3228
|
+
Gn.displayName = Pi;
|
|
3229
|
+
var Li = "ContextMenuItemIndicator", Yn = R.forwardRef((e, t) => {
|
|
3230
|
+
const { __scopeContextMenu: n, ...r } = e, o = U(n);
|
|
3231
|
+
return /* @__PURE__ */ p(Vr, { ...o, ...r, ref: t });
|
|
3232
|
+
});
|
|
3233
|
+
Yn.displayName = Li;
|
|
3234
|
+
var ki = "ContextMenuSeparator", Kn = R.forwardRef((e, t) => {
|
|
3235
|
+
const { __scopeContextMenu: n, ...r } = e, o = U(n);
|
|
3236
|
+
return /* @__PURE__ */ p(Ir, { ...o, ...r, ref: t });
|
|
3237
|
+
});
|
|
3238
|
+
Kn.displayName = ki;
|
|
3239
|
+
var _i = "ContextMenuArrow", Bi = R.forwardRef(
|
|
3240
|
+
(e, t) => {
|
|
3241
|
+
const { __scopeContextMenu: n, ...r } = e, o = U(n);
|
|
3242
|
+
return /* @__PURE__ */ p(Yr, { ...o, ...r, ref: t });
|
|
3243
|
+
}
|
|
3244
|
+
);
|
|
3245
|
+
Bi.displayName = _i;
|
|
3246
|
+
var Wn = "ContextMenuSub", Hn = (e) => {
|
|
3247
|
+
const { __scopeContextMenu: t, children: n, onOpenChange: r, open: o, defaultOpen: i } = e, a = U(t), [s, c] = Br({
|
|
3248
|
+
prop: o,
|
|
3249
|
+
defaultProp: i ?? !1,
|
|
3250
|
+
onChange: r,
|
|
3251
|
+
caller: Wn
|
|
3252
|
+
});
|
|
3253
|
+
return /* @__PURE__ */ p(Fr, { ...a, open: s, onOpenChange: c, children: n });
|
|
3254
|
+
};
|
|
3255
|
+
Hn.displayName = Wn;
|
|
3256
|
+
var Fi = "ContextMenuSubTrigger", qn = R.forwardRef((e, t) => {
|
|
3257
|
+
const { __scopeContextMenu: n, ...r } = e, o = U(n);
|
|
3258
|
+
return /* @__PURE__ */ p(Gr, { ...o, ...r, ref: t });
|
|
3259
|
+
});
|
|
3260
|
+
qn.displayName = Fi;
|
|
3261
|
+
var $i = "ContextMenuSubContent", Jn = R.forwardRef((e, t) => {
|
|
3262
|
+
const { __scopeContextMenu: n, ...r } = e, o = U(n);
|
|
3263
|
+
return /* @__PURE__ */ p(
|
|
3264
|
+
Xr,
|
|
3265
|
+
{
|
|
3266
|
+
...o,
|
|
3267
|
+
...r,
|
|
3268
|
+
ref: t,
|
|
3269
|
+
style: {
|
|
3270
|
+
...e.style,
|
|
3271
|
+
"--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
3272
|
+
"--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
3273
|
+
"--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
3274
|
+
"--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
3275
|
+
"--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
);
|
|
3279
|
+
});
|
|
3280
|
+
Jn.displayName = $i;
|
|
3281
|
+
function Ze(e) {
|
|
3282
|
+
return (t) => t.pointerType !== "mouse" ? e(t) : void 0;
|
|
3283
|
+
}
|
|
3284
|
+
var Vi = Pn, ji = kn, Qn = _n, Zn = Fn, Ui = $n, er = Vn, tr = jn, nr = Un, Xi = Xn, rr = Gn, or = Yn, ir = Kn, Gi = Hn, sr = qn, ar = Jn;
|
|
3285
|
+
const Yi = Vi, Ki = ji, ms = Ui, bs = Qn, xs = Gi, ys = Xi, Wi = R.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ se(
|
|
3286
|
+
sr,
|
|
3287
|
+
{
|
|
3288
|
+
ref: o,
|
|
3289
|
+
className: le(
|
|
3290
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[state=open]:bg-zinc-100 data-[state=open]:text-zinc-900 dark:focus:bg-zinc-800 dark:focus:text-zinc-50 dark:data-[state=open]:bg-zinc-800 dark:data-[state=open]:text-zinc-50",
|
|
3291
|
+
t && "pl-8",
|
|
3292
|
+
e
|
|
3293
|
+
),
|
|
3294
|
+
...r,
|
|
3295
|
+
children: [
|
|
3296
|
+
n,
|
|
3297
|
+
/* @__PURE__ */ p(Hr, { className: "ml-auto h-4 w-4" })
|
|
3298
|
+
]
|
|
3299
|
+
}
|
|
3300
|
+
));
|
|
3301
|
+
Wi.displayName = sr.displayName;
|
|
3302
|
+
const Hi = R.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
|
|
3303
|
+
ar,
|
|
3304
|
+
{
|
|
3305
|
+
ref: n,
|
|
3306
|
+
className: le(
|
|
3307
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 bg-white p-1 text-zinc-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50",
|
|
3308
|
+
e
|
|
3309
|
+
),
|
|
3310
|
+
...t
|
|
3311
|
+
}
|
|
3312
|
+
));
|
|
3313
|
+
Hi.displayName = ar.displayName;
|
|
3314
|
+
const cr = R.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(Qn, { children: /* @__PURE__ */ p(
|
|
3315
|
+
Zn,
|
|
3316
|
+
{
|
|
3317
|
+
ref: n,
|
|
3318
|
+
className: le(
|
|
3319
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 bg-white p-1 text-zinc-950 shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50",
|
|
3320
|
+
e
|
|
3321
|
+
),
|
|
3322
|
+
...t
|
|
3323
|
+
}
|
|
3324
|
+
) }));
|
|
3325
|
+
cr.displayName = Zn.displayName;
|
|
3326
|
+
const ye = R.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ p(
|
|
3327
|
+
tr,
|
|
3328
|
+
{
|
|
3329
|
+
ref: r,
|
|
3330
|
+
className: le(
|
|
3331
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-zinc-800 dark:focus:text-zinc-50",
|
|
3332
|
+
t && "pl-8",
|
|
3333
|
+
e
|
|
3334
|
+
),
|
|
3335
|
+
...n
|
|
3336
|
+
}
|
|
3337
|
+
));
|
|
3338
|
+
ye.displayName = tr.displayName;
|
|
3339
|
+
const qi = R.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ se(
|
|
3340
|
+
nr,
|
|
3341
|
+
{
|
|
3342
|
+
ref: o,
|
|
3343
|
+
className: le(
|
|
3344
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-zinc-800 dark:focus:text-zinc-50",
|
|
3345
|
+
e
|
|
3346
|
+
),
|
|
3347
|
+
checked: n,
|
|
3348
|
+
...r,
|
|
3349
|
+
children: [
|
|
3350
|
+
/* @__PURE__ */ p("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ p(or, { children: /* @__PURE__ */ p(Kr, { className: "h-4 w-4" }) }) }),
|
|
3351
|
+
t
|
|
3352
|
+
]
|
|
3353
|
+
}
|
|
3354
|
+
));
|
|
3355
|
+
qi.displayName = nr.displayName;
|
|
3356
|
+
const Ji = R.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ se(
|
|
3357
|
+
rr,
|
|
3358
|
+
{
|
|
3359
|
+
ref: r,
|
|
3360
|
+
className: le(
|
|
3361
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-zinc-800 dark:focus:text-zinc-50",
|
|
3362
|
+
e
|
|
3363
|
+
),
|
|
3364
|
+
...n,
|
|
3365
|
+
children: [
|
|
3366
|
+
/* @__PURE__ */ p("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ p(or, { children: /* @__PURE__ */ p(Wr, { className: "h-2 w-2 fill-current" }) }) }),
|
|
3367
|
+
t
|
|
3368
|
+
]
|
|
3369
|
+
}
|
|
3370
|
+
));
|
|
3371
|
+
Ji.displayName = rr.displayName;
|
|
3372
|
+
const Qi = R.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ p(
|
|
3373
|
+
er,
|
|
3374
|
+
{
|
|
3375
|
+
ref: r,
|
|
3376
|
+
className: le(
|
|
3377
|
+
"px-2 py-1.5 text-sm font-semibold text-zinc-950 dark:text-zinc-50",
|
|
3378
|
+
t && "pl-8",
|
|
3379
|
+
e
|
|
3380
|
+
),
|
|
3381
|
+
...n
|
|
3382
|
+
}
|
|
3383
|
+
));
|
|
3384
|
+
Qi.displayName = er.displayName;
|
|
3385
|
+
const nt = R.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(
|
|
3386
|
+
ir,
|
|
3387
|
+
{
|
|
3388
|
+
ref: n,
|
|
3389
|
+
className: le(
|
|
3390
|
+
"-mx-1 my-1 h-px bg-zinc-200 dark:bg-zinc-800",
|
|
3391
|
+
e
|
|
3392
|
+
),
|
|
3393
|
+
...t
|
|
3394
|
+
}
|
|
3395
|
+
));
|
|
3396
|
+
nt.displayName = ir.displayName;
|
|
3397
|
+
const rt = ({
|
|
3398
|
+
className: e,
|
|
3399
|
+
...t
|
|
3400
|
+
}) => /* @__PURE__ */ p(
|
|
3401
|
+
"span",
|
|
3402
|
+
{
|
|
3403
|
+
className: le(
|
|
3404
|
+
"ml-auto text-xs tracking-widest text-zinc-500 dark:text-zinc-400",
|
|
3405
|
+
e
|
|
3406
|
+
),
|
|
3407
|
+
...t
|
|
3408
|
+
}
|
|
3409
|
+
);
|
|
3410
|
+
rt.displayName = "ContextMenuShortcut";
|
|
3411
|
+
const ws = ({ row: e, data: t, contextId: n, children: r, enabled: o = !0, onAction: i }) => {
|
|
3412
|
+
const a = dn();
|
|
3413
|
+
if (!o)
|
|
3414
|
+
return /* @__PURE__ */ p(et, { children: r });
|
|
3415
|
+
const s = t || e?.original, l = (() => {
|
|
3416
|
+
if (!n) return [];
|
|
3417
|
+
const f = a.get("ContextMenuService");
|
|
3418
|
+
return f ? f.getItems(n, s) : [];
|
|
3419
|
+
})(), d = l.length > 0, u = (f) => {
|
|
3420
|
+
i?.(f, s);
|
|
3421
|
+
};
|
|
3422
|
+
return /* @__PURE__ */ se(Yi, { children: [
|
|
3423
|
+
/* @__PURE__ */ p(Ki, { asChild: !0, children: /* @__PURE__ */ p("span", { className: "contents", children: r }) }),
|
|
3424
|
+
/* @__PURE__ */ p(cr, { className: "w-64", children: d ? l.map((f, h) => /* @__PURE__ */ p(P.Fragment, { children: f.isSeparator ? /* @__PURE__ */ p(nt, {}) : /* @__PURE__ */ se(
|
|
3425
|
+
ye,
|
|
3426
|
+
{
|
|
3427
|
+
inset: !0,
|
|
3428
|
+
onSelect: () => {
|
|
3429
|
+
f.onClick ? f.onClick(s) : u(f.action);
|
|
3430
|
+
},
|
|
3431
|
+
disabled: f.disabled,
|
|
3432
|
+
className: f.className,
|
|
3433
|
+
children: [
|
|
3434
|
+
f.label,
|
|
3435
|
+
f.shortcut && /* @__PURE__ */ p(rt, { children: f.shortcut })
|
|
3436
|
+
]
|
|
3437
|
+
}
|
|
3438
|
+
) }, f.id || h)) : (
|
|
3439
|
+
/* Default EzTable Actions (Legacy Fallback) */
|
|
3440
|
+
/* @__PURE__ */ se(et, { children: [
|
|
3441
|
+
/* @__PURE__ */ se(ye, { inset: !0, onSelect: () => u("copy"), children: [
|
|
3442
|
+
"Copy Data",
|
|
3443
|
+
/* @__PURE__ */ p(rt, { children: "⌘C" })
|
|
3444
|
+
] }),
|
|
3445
|
+
/* @__PURE__ */ p(nt, {}),
|
|
3446
|
+
e && /* @__PURE__ */ se(et, { children: [
|
|
3447
|
+
e.getIsPinned() !== "top" && /* @__PURE__ */ p(ye, { inset: !0, onSelect: () => u("pin-top"), children: "Pin to Top" }),
|
|
3448
|
+
e.getIsPinned() !== "bottom" && /* @__PURE__ */ p(ye, { inset: !0, onSelect: () => u("pin-bottom"), children: "Pin to Bottom" }),
|
|
3449
|
+
e.getIsPinned() && /* @__PURE__ */ p(ye, { inset: !0, onSelect: () => u("unpin"), children: "Unpin Row" }),
|
|
3450
|
+
/* @__PURE__ */ p(nt, {})
|
|
3451
|
+
] }),
|
|
3452
|
+
/* @__PURE__ */ se(ye, { inset: !0, className: "text-red-600 focus:text-red-600 focus:bg-red-50 dark:focus:bg-red-950/50", onSelect: () => u("delete"), children: [
|
|
3453
|
+
"Delete Row",
|
|
3454
|
+
/* @__PURE__ */ p(rt, { children: "⌘⌫" })
|
|
3455
|
+
] })
|
|
3456
|
+
] })
|
|
3457
|
+
) })
|
|
3458
|
+
] });
|
|
3459
|
+
};
|
|
3460
|
+
export {
|
|
3461
|
+
nt as A,
|
|
3462
|
+
rt as B,
|
|
3463
|
+
$e as C,
|
|
3464
|
+
hs as D,
|
|
3465
|
+
ws as E,
|
|
3466
|
+
xs as F,
|
|
3467
|
+
Hi as G,
|
|
3468
|
+
Wi as H,
|
|
3469
|
+
Ki as I,
|
|
3470
|
+
vs as J,
|
|
3471
|
+
D as K,
|
|
3472
|
+
fs as L,
|
|
3473
|
+
Mn as P,
|
|
3474
|
+
ft as a,
|
|
3475
|
+
ce as b,
|
|
3476
|
+
ps as c,
|
|
3477
|
+
gs as d,
|
|
3478
|
+
as as e,
|
|
3479
|
+
ds as f,
|
|
3480
|
+
go as g,
|
|
3481
|
+
It as h,
|
|
3482
|
+
Ot as i,
|
|
3483
|
+
Ge as j,
|
|
3484
|
+
ls as k,
|
|
3485
|
+
cs as l,
|
|
3486
|
+
us as m,
|
|
3487
|
+
En as n,
|
|
3488
|
+
ss as o,
|
|
3489
|
+
Yi as p,
|
|
3490
|
+
qi as q,
|
|
3491
|
+
cr as r,
|
|
3492
|
+
st as s,
|
|
3493
|
+
ms as t,
|
|
3494
|
+
di as u,
|
|
3495
|
+
ye as v,
|
|
3496
|
+
Qi as w,
|
|
3497
|
+
bs as x,
|
|
3498
|
+
ys as y,
|
|
3499
|
+
Ji as z
|
|
3500
|
+
};
|