@labelbee/lb-components 1.0.0-alpha.1
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 +41 -0
- package/dist/App.js +1 -0
- package/dist/assets/annotation/common/icon_adapt.svg.js +1 -0
- package/dist/assets/annotation/common/icon_adapt_black.svg.js +1 -0
- package/dist/assets/annotation/common/icon_back.svg.js +1 -0
- package/dist/assets/annotation/common/icon_backA.svg.js +1 -0
- package/dist/assets/annotation/common/icon_clear.svg.js +1 -0
- package/dist/assets/annotation/common/icon_clearSmall.svg.js +1 -0
- package/dist/assets/annotation/common/icon_clearSmall_a.svg.js +1 -0
- package/dist/assets/annotation/common/icon_clear_a.svg.js +1 -0
- package/dist/assets/annotation/common/icon_invalid.svg.js +1 -0
- package/dist/assets/annotation/common/icon_invalid_a.svg.js +1 -0
- package/dist/assets/annotation/common/icon_next.svg.js +1 -0
- package/dist/assets/annotation/common/icon_nextA.svg.js +1 -0
- package/dist/assets/annotation/common/icon_r.svg.js +1 -0
- package/dist/assets/annotation/common/icon_rA.svg.js +1 -0
- package/dist/assets/annotation/common/icon_save.svg.js +1 -0
- package/dist/assets/annotation/common/icon_saveA.svg.js +1 -0
- package/dist/assets/annotation/image/brightness.svg.js +1 -0
- package/dist/assets/annotation/image/contrast.svg.js +1 -0
- package/dist/assets/annotation/image/icon_yuantu.svg.js +1 -0
- package/dist/assets/annotation/image/saturation.svg.js +1 -0
- package/dist/assets/annotation/lineTool/icon_line.svg.js +1 -0
- package/dist/assets/annotation/lineTool/icon_line_a.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/copy.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/nextBox.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/nodata.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/patse.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/prevBox.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/selectAll.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/unitAttribute.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/unitAttributeForbid.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/unitAttributeHover.svg.js +1 -0
- package/dist/assets/annotation/pointTool/icon_point.svg.js +1 -0
- package/dist/assets/annotation/pointTool/icon_point_a.svg.js +1 -0
- package/dist/assets/annotation/polygonTool/icon_polygon.svg.js +1 -0
- package/dist/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -0
- package/dist/assets/annotation/rectTool/icon_rect.svg.js +1 -0
- package/dist/assets/annotation/rectTool/icon_rect_a.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_segment.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/setValid.svg.js +1 -0
- package/dist/assets/annotation/video/icon_keyboard_h.svg.js +1 -0
- package/dist/assets/attributeIcon/eraser.svg.js +1 -0
- package/dist/assets/attributeIcon/eraser_a.svg.js +1 -0
- package/dist/assets/attributeIcon/pen.svg.js +1 -0
- package/dist/assets/attributeIcon/pen_a.svg.js +1 -0
- package/dist/assets/attributeIcon/zoomUp.svg.js +1 -0
- package/dist/assets/icons/25541b4d.svg +10 -0
- package/dist/assets/icons/25ef334b.svg +8 -0
- package/dist/assets/icons/7eadb9c4.svg +5 -0
- package/dist/assets/icons/9d70807.svg +5 -0
- package/dist/assets/icons/aa147cfc.png +0 -0
- package/dist/assets/icons/c5b4262e.png +0 -0
- package/dist/assets/icons/cc550fff.svg +23 -0
- package/dist/assets/icons/dc9b6bfc.svg +10 -0
- package/dist/assets/icons/e4f0b7fe.png +0 -0
- package/dist/assets/predictTracking/icon.svg.js +1 -0
- package/dist/assets/toolStyle/icon_border.svg.js +1 -0
- package/dist/assets/toolStyle/icon_borderColor.svg.js +1 -0
- package/dist/assets/toolStyle/icon_opacityFill.svg.js +1 -0
- package/dist/assets/toolStyle/icon_opacityStroke.svg.js +1 -0
- package/dist/components/AnnotationView/index.js +1 -0
- package/dist/components/AnnotationView/pointCloudAnnotationView.js +1 -0
- package/dist/components/annotationStepPopover/index.js +1 -0
- package/dist/components/attributeList/index.js +1 -0
- package/dist/components/checkboxList/index.js +1 -0
- package/dist/components/colorTag/index.js +1 -0
- package/dist/components/customAntd/IconWithText/index.js +1 -0
- package/dist/components/customResizeHook/index.js +1 -0
- package/dist/components/fileException/FileError.js +1 -0
- package/dist/components/fileException/FileInvalid.js +1 -0
- package/dist/components/fileException/index.js +1 -0
- package/dist/components/pointCloudView/PointCloud2DView.js +1 -0
- package/dist/components/pointCloudView/PointCloud3DView.js +1 -0
- package/dist/components/pointCloudView/PointCloudBackView.js +1 -0
- package/dist/components/pointCloudView/PointCloudContext.js +1 -0
- package/dist/components/pointCloudView/PointCloudInfos.js +1 -0
- package/dist/components/pointCloudView/PointCloudLayout.js +1 -0
- package/dist/components/pointCloudView/PointCloudListener.js +1 -0
- package/dist/components/pointCloudView/PointCloudSideView.js +1 -0
- package/dist/components/pointCloudView/PointCloudTopView.js +1 -0
- package/dist/components/pointCloudView/components/EmptyPage/index.js +1 -0
- package/dist/components/pointCloudView/components/UnifyParamsModal/index.js +1 -0
- package/dist/components/pointCloudView/hooks/useAttribute.js +1 -0
- package/dist/components/pointCloudView/hooks/useBoxes.js +1 -0
- package/dist/components/pointCloudView/hooks/useConfig.js +1 -0
- package/dist/components/pointCloudView/hooks/useHistory.js +1 -0
- package/dist/components/pointCloudView/hooks/useLine.js +1 -0
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -0
- package/dist/components/pointCloudView/hooks/usePolygon.js +1 -0
- package/dist/components/pointCloudView/hooks/useRotate.js +1 -0
- package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -0
- package/dist/components/pointCloudView/hooks/useSphere.js +1 -0
- package/dist/components/pointCloudView/hooks/useStatus.js +1 -0
- package/dist/components/pointCloudView/hooks/useZoom.js +1 -0
- package/dist/components/pointCloudView/index.js +1 -0
- package/dist/components/predictTracking/index.js +1 -0
- package/dist/components/predictTracking/predictTrackingIcon/index.js +1 -0
- package/dist/components/predictTracking/previewResult/index.js +1 -0
- package/dist/components/predictTracking/previewResult/util.js +1 -0
- package/dist/components/videoAnnotate/index.js +1 -0
- package/dist/components/videoPlayer/TagToolInstanceAdaptor.js +1 -0
- package/dist/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js +1 -0
- package/dist/components/videoPlayer/VideoTagLayer.js +1 -0
- package/dist/components/videoPlayer/components/controller/index.js +1 -0
- package/dist/components/videoPlayer/index.js +1 -0
- package/dist/components/videoPlayer/utils.js +1 -0
- package/dist/configureStore.js +1 -0
- package/dist/constant/index.js +1 -0
- package/dist/constant/styleString.js +1 -0
- package/dist/data/Style.js +1 -0
- package/dist/data/enums/AnnotationSize.js +1 -0
- package/dist/data/enums/ToolType.js +1 -0
- package/dist/hooks/annotation.js +1 -0
- package/dist/hooks/useRafState.js +1 -0
- package/dist/hooks/useRefCache.js +1 -0
- package/dist/hooks/useSafeSate.js +1 -0
- package/dist/hooks/useSize.js +1 -0
- package/dist/hooks/useUnmountedRef.js +1 -0
- package/dist/index.css +1549 -0
- package/dist/index.js +1 -0
- package/dist/store/Actions.js +1 -0
- package/dist/store/annotation/actionCreators.js +1 -0
- package/dist/store/annotation/map.js +1 -0
- package/dist/store/annotation/reducer.js +1 -0
- package/dist/store/annotation/selectors.js +1 -0
- package/dist/store/ctx.js +1 -0
- package/dist/store/imgAttribute/actionCreators.js +1 -0
- package/dist/store/imgAttribute/reducer.js +1 -0
- package/dist/store/index.js +1 -0
- package/dist/store/toolStyle/actionCreators.js +1 -0
- package/dist/store/toolStyle/reducer.js +1 -0
- package/dist/types/App.d.ts +75 -0
- package/dist/types/components/AnnotationView/index.d.ts +27 -0
- package/dist/types/components/AnnotationView/pointCloudAnnotationView.d.ts +13 -0
- package/dist/types/components/annotationStepPopover/index.d.ts +9 -0
- package/dist/types/components/attributeList/index.d.ts +18 -0
- package/dist/types/components/checkboxList/index.d.ts +9 -0
- package/dist/types/components/colorTag/index.d.ts +2 -0
- package/dist/types/components/customAntd/IconWithText/index.d.ts +9 -0
- package/dist/types/components/customResizeHook/index.d.ts +31 -0
- package/dist/types/components/fileException/FileError.d.ts +15 -0
- package/dist/types/components/fileException/FileInvalid.d.ts +12 -0
- package/dist/types/components/fileException/index.d.ts +17 -0
- package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +4 -0
- package/dist/types/components/pointCloudView/PointCloud3DView.d.ts +6 -0
- package/dist/types/components/pointCloudView/PointCloudBackView.d.ts +7 -0
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +54 -0
- package/dist/types/components/pointCloudView/PointCloudInfos.d.ts +23 -0
- package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +7 -0
- package/dist/types/components/pointCloudView/PointCloudListener.d.ts +9 -0
- package/dist/types/components/pointCloudView/PointCloudSideView.d.ts +9 -0
- package/dist/types/components/pointCloudView/PointCloudTopView.d.ts +12 -0
- package/dist/types/components/pointCloudView/components/EmptyPage/index.d.ts +3 -0
- package/dist/types/components/pointCloudView/components/UnifyParamsModal/index.d.ts +13 -0
- package/dist/types/components/pointCloudView/hooks/useAttribute.d.ts +7 -0
- package/dist/types/components/pointCloudView/hooks/useBoxes.d.ts +12 -0
- package/dist/types/components/pointCloudView/hooks/useConfig.d.ts +5 -0
- package/dist/types/components/pointCloudView/hooks/useHistory.d.ts +22 -0
- package/dist/types/components/pointCloudView/hooks/useLine.d.ts +12 -0
- package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +101 -0
- package/dist/types/components/pointCloudView/hooks/usePolygon.d.ts +12 -0
- package/dist/types/components/pointCloudView/hooks/useRotate.d.ts +8 -0
- package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +18 -0
- package/dist/types/components/pointCloudView/hooks/useSphere.d.ts +6 -0
- package/dist/types/components/pointCloudView/hooks/useStatus.d.ts +11 -0
- package/dist/types/components/pointCloudView/hooks/useZoom.d.ts +11 -0
- package/dist/types/components/pointCloudView/index.d.ts +19 -0
- package/dist/types/components/predictTracking/index.d.ts +2 -0
- package/dist/types/components/predictTracking/predictTrackingIcon/index.d.ts +7 -0
- package/dist/types/components/predictTracking/previewResult/index.d.ts +10 -0
- package/dist/types/components/predictTracking/previewResult/util.d.ts +43 -0
- package/dist/types/components/videoAnnotate/index.d.ts +15 -0
- package/dist/types/components/videoPlayer/TagToolInstanceAdaptor.d.ts +90 -0
- package/dist/types/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.d.ts +9 -0
- package/dist/types/components/videoPlayer/VideoTagLayer.d.ts +12 -0
- package/dist/types/components/videoPlayer/components/controller/index.d.ts +3 -0
- package/dist/types/components/videoPlayer/index.d.ts +73 -0
- package/dist/types/components/videoPlayer/types.d.ts +8 -0
- package/dist/types/components/videoPlayer/utils.d.ts +36 -0
- package/dist/types/configureStore.d.ts +3 -0
- package/dist/types/constant/index.d.ts +22 -0
- package/dist/types/constant/styleString.d.ts +2 -0
- package/dist/types/data/Style.d.ts +37 -0
- package/dist/types/data/enums/AnnotationSize.d.ts +32 -0
- package/dist/types/data/enums/ToolType.d.ts +54 -0
- package/dist/types/hooks/annotation.d.ts +37 -0
- package/dist/types/hooks/useRafState.d.ts +3 -0
- package/dist/types/hooks/useRefCache.d.ts +8 -0
- package/dist/types/hooks/useSafeSate.d.ts +4 -0
- package/dist/types/hooks/useSize.d.ts +7 -0
- package/dist/types/hooks/useUnmountedRef.d.ts +3 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/store/Actions.d.ts +48 -0
- package/dist/types/store/annotation/actionCreators.d.ts +95 -0
- package/dist/types/store/annotation/map.d.ts +29 -0
- package/dist/types/store/annotation/reducer.d.ts +53 -0
- package/dist/types/store/annotation/selectors.d.ts +7 -0
- package/dist/types/store/annotation/types.d.ts +158 -0
- package/dist/types/store/ctx.d.ts +4 -0
- package/dist/types/store/imgAttribute/actionCreators.d.ts +8 -0
- package/dist/types/store/imgAttribute/reducer.d.ts +8 -0
- package/dist/types/store/imgAttribute/types.d.ts +23 -0
- package/dist/types/store/index.d.ts +3 -0
- package/dist/types/store/toolStyle/actionCreators.d.ts +8 -0
- package/dist/types/store/toolStyle/reducer.d.ts +13 -0
- package/dist/types/store/toolStyle/types.d.ts +23 -0
- package/dist/types/utils/AnnotationDataUtils.d.ts +77 -0
- package/dist/types/utils/ConfigUtils.d.ts +9 -0
- package/dist/types/utils/PageOperator.d.ts +48 -0
- package/dist/types/utils/StepUtils.d.ts +32 -0
- package/dist/types/utils/TextUtils.d.ts +7 -0
- package/dist/types/utils/ToolStyleUtils.d.ts +18 -0
- package/dist/types/utils/ToolUtils.d.ts +12 -0
- package/dist/types/utils/data.d.ts +15 -0
- package/dist/types/utils/dom.d.ts +11 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/views/MainView/annotationOperation/index.d.ts +18 -0
- package/dist/types/views/MainView/annotationTips/index.d.ts +7 -0
- package/dist/types/views/MainView/index.d.ts +10 -0
- package/dist/types/views/MainView/sidebar/AnnotationText/index.d.ts +9 -0
- package/dist/types/views/MainView/sidebar/ClearIcon/index.d.ts +3 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +14 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +19 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/useOperationList.d.ts +12 -0
- package/dist/types/views/MainView/sidebar/ImgAttributeInfo/index.d.ts +7 -0
- package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.d.ts +20 -0
- package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/index.d.ts +14 -0
- package/dist/types/views/MainView/sidebar/ScribbleSidebar/index.d.ts +6 -0
- package/dist/types/views/MainView/sidebar/SwitchAttributeList/index.d.ts +11 -0
- package/dist/types/views/MainView/sidebar/TagSidebar/index.d.ts +11 -0
- package/dist/types/views/MainView/sidebar/TextAreaFormat/index.d.ts +9 -0
- package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +22 -0
- package/dist/types/views/MainView/sidebar/ToolIcons.d.ts +12 -0
- package/dist/types/views/MainView/sidebar/ToolStyle/index.d.ts +8 -0
- package/dist/types/views/MainView/sidebar/index.d.ts +10 -0
- package/dist/types/views/MainView/toolFooter/AnnotatedAttributes/index.d.ts +5 -0
- package/dist/types/views/MainView/toolFooter/FooterPopover.d.ts +10 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.d.ts +132 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/cuboid/index.d.ts +6 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/index.d.ts +23 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.d.ts +71 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.d.ts +27 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.d.ts +5 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.d.ts +85 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.d.ts +38 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/scribble/index.d.ts +6 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.d.ts +3 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.d.ts +6 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.d.ts +3 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/index.d.ts +3 -0
- package/dist/types/views/MainView/toolFooter/HiddenTips/index.d.ts +7 -0
- package/dist/types/views/MainView/toolFooter/PageNumber/index.d.ts +7 -0
- package/dist/types/views/MainView/toolFooter/Pagination.d.ts +22 -0
- package/dist/types/views/MainView/toolFooter/ZoomController/ZoomLevel/index.d.ts +10 -0
- package/dist/types/views/MainView/toolFooter/ZoomController/index.d.ts +21 -0
- package/dist/types/views/MainView/toolFooter/index.d.ts +24 -0
- package/dist/types/views/MainView/toolHeader/ExportData/index.d.ts +15 -0
- package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +14 -0
- package/dist/types/views/MainView/toolHeader/headerOption/index.d.ts +8 -0
- package/dist/types/views/MainView/toolHeader/index.d.ts +23 -0
- package/dist/utils/AnnotationDataUtils.js +1 -0
- package/dist/utils/ConfigUtils.js +1 -0
- package/dist/utils/PageOperator.js +1 -0
- package/dist/utils/StepUtils.js +1 -0
- package/dist/utils/TextUtils.js +1 -0
- package/dist/utils/ToolStyleUtils.js +1 -0
- package/dist/utils/ToolUtils.js +1 -0
- package/dist/utils/data.js +1 -0
- package/dist/utils/dom.js +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/views/MainView/annotationOperation/index.js +1 -0
- package/dist/views/MainView/annotationTips/index.js +1 -0
- package/dist/views/MainView/index.js +1 -0
- package/dist/views/MainView/sidebar/AnnotationText/index.js +1 -0
- package/dist/views/MainView/sidebar/ClearIcon/index.js +1 -0
- package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -0
- package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -0
- package/dist/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -0
- package/dist/views/MainView/sidebar/ImgAttributeInfo/index.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -0
- package/dist/views/MainView/sidebar/ScribbleSidebar/index.js +1 -0
- package/dist/views/MainView/sidebar/SwitchAttributeList/index.js +1 -0
- package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -0
- package/dist/views/MainView/sidebar/TextAreaFormat/index.js +1 -0
- package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -0
- package/dist/views/MainView/sidebar/ToolIcons.js +1 -0
- package/dist/views/MainView/sidebar/ToolStyle/index.js +1 -0
- package/dist/views/MainView/sidebar/index.js +1 -0
- package/dist/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterPopover.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/cuboid/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/scribble/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/index.js +1 -0
- package/dist/views/MainView/toolFooter/HiddenTips/index.js +1 -0
- package/dist/views/MainView/toolFooter/PageNumber/index.js +1 -0
- package/dist/views/MainView/toolFooter/Pagination.js +1 -0
- package/dist/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js +1 -0
- package/dist/views/MainView/toolFooter/ZoomController/index.js +1 -0
- package/dist/views/MainView/toolFooter/index.js +1 -0
- package/dist/views/MainView/toolHeader/ExportData/index.js +1 -0
- package/dist/views/MainView/toolHeader/StepSwitch/index.js +1 -0
- package/dist/views/MainView/toolHeader/headerOption/index.js +1 -0
- package/dist/views/MainView/toolHeader/index.js +1 -0
- package/es/App.js +1 -0
- package/es/assets/annotation/common/icon_adapt.svg.js +1 -0
- package/es/assets/annotation/common/icon_adapt_black.svg.js +1 -0
- package/es/assets/annotation/common/icon_back.svg.js +1 -0
- package/es/assets/annotation/common/icon_backA.svg.js +1 -0
- package/es/assets/annotation/common/icon_clear.svg.js +1 -0
- package/es/assets/annotation/common/icon_clearSmall.svg.js +1 -0
- package/es/assets/annotation/common/icon_clearSmall_a.svg.js +1 -0
- package/es/assets/annotation/common/icon_clear_a.svg.js +1 -0
- package/es/assets/annotation/common/icon_invalid.svg.js +1 -0
- package/es/assets/annotation/common/icon_invalid_a.svg.js +1 -0
- package/es/assets/annotation/common/icon_next.svg.js +1 -0
- package/es/assets/annotation/common/icon_nextA.svg.js +1 -0
- package/es/assets/annotation/common/icon_r.svg.js +1 -0
- package/es/assets/annotation/common/icon_rA.svg.js +1 -0
- package/es/assets/annotation/common/icon_save.svg.js +1 -0
- package/es/assets/annotation/common/icon_saveA.svg.js +1 -0
- package/es/assets/annotation/image/brightness.svg.js +1 -0
- package/es/assets/annotation/image/contrast.svg.js +1 -0
- package/es/assets/annotation/image/icon_yuantu.svg.js +1 -0
- package/es/assets/annotation/image/saturation.svg.js +1 -0
- package/es/assets/annotation/lineTool/icon_line.svg.js +1 -0
- package/es/assets/annotation/lineTool/icon_line_a.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/copy.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/nextBox.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/nodata.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/patse.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/prevBox.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/selectAll.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/unitAttribute.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/unitAttributeForbid.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/unitAttributeHover.svg.js +1 -0
- package/es/assets/annotation/pointTool/icon_point.svg.js +1 -0
- package/es/assets/annotation/pointTool/icon_point_a.svg.js +1 -0
- package/es/assets/annotation/polygonTool/icon_polygon.svg.js +1 -0
- package/es/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -0
- package/es/assets/annotation/rectTool/icon_rect.svg.js +1 -0
- package/es/assets/annotation/rectTool/icon_rect_a.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_segment.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/setValid.svg.js +1 -0
- package/es/assets/annotation/video/icon_keyboard_h.svg.js +1 -0
- package/es/assets/attributeIcon/eraser.svg.js +1 -0
- package/es/assets/attributeIcon/eraser_a.svg.js +1 -0
- package/es/assets/attributeIcon/pen.svg.js +1 -0
- package/es/assets/attributeIcon/pen_a.svg.js +1 -0
- package/es/assets/attributeIcon/zoomUp.svg.js +1 -0
- package/es/assets/predictTracking/icon.svg.js +1 -0
- package/es/assets/toolStyle/icon_border.svg.js +1 -0
- package/es/assets/toolStyle/icon_borderColor.svg.js +1 -0
- package/es/assets/toolStyle/icon_opacityFill.svg.js +1 -0
- package/es/assets/toolStyle/icon_opacityStroke.svg.js +1 -0
- package/es/components/AnnotationView/index.js +1 -0
- package/es/components/AnnotationView/pointCloudAnnotationView.js +1 -0
- package/es/components/annotationStepPopover/index.js +1 -0
- package/es/components/attributeList/index.js +1 -0
- package/es/components/checkboxList/index.js +1 -0
- package/es/components/colorTag/index.js +1 -0
- package/es/components/customAntd/IconWithText/index.js +1 -0
- package/es/components/customResizeHook/index.js +1 -0
- package/es/components/fileException/FileError.js +1 -0
- package/es/components/fileException/FileInvalid.js +1 -0
- package/es/components/fileException/index.js +1 -0
- package/es/components/pointCloudView/PointCloud2DView.js +1 -0
- package/es/components/pointCloudView/PointCloud3DView.js +1 -0
- package/es/components/pointCloudView/PointCloudBackView.js +1 -0
- package/es/components/pointCloudView/PointCloudContext.js +1 -0
- package/es/components/pointCloudView/PointCloudInfos.js +1 -0
- package/es/components/pointCloudView/PointCloudLayout.js +1 -0
- package/es/components/pointCloudView/PointCloudListener.js +1 -0
- package/es/components/pointCloudView/PointCloudSideView.js +1 -0
- package/es/components/pointCloudView/PointCloudTopView.js +1 -0
- package/es/components/pointCloudView/components/EmptyPage/index.js +1 -0
- package/es/components/pointCloudView/components/UnifyParamsModal/index.js +1 -0
- package/es/components/pointCloudView/hooks/useAttribute.js +1 -0
- package/es/components/pointCloudView/hooks/useBoxes.js +1 -0
- package/es/components/pointCloudView/hooks/useConfig.js +1 -0
- package/es/components/pointCloudView/hooks/useHistory.js +1 -0
- package/es/components/pointCloudView/hooks/useLine.js +1 -0
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -0
- package/es/components/pointCloudView/hooks/usePolygon.js +1 -0
- package/es/components/pointCloudView/hooks/useRotate.js +1 -0
- package/es/components/pointCloudView/hooks/useSingleBox.js +1 -0
- package/es/components/pointCloudView/hooks/useSphere.js +1 -0
- package/es/components/pointCloudView/hooks/useStatus.js +1 -0
- package/es/components/pointCloudView/hooks/useZoom.js +1 -0
- package/es/components/pointCloudView/index.js +1 -0
- package/es/components/predictTracking/index.js +1 -0
- package/es/components/predictTracking/predictTrackingIcon/index.js +1 -0
- package/es/components/predictTracking/previewResult/index.js +1 -0
- package/es/components/predictTracking/previewResult/util.js +1 -0
- package/es/components/videoAnnotate/index.js +1 -0
- package/es/components/videoPlayer/TagToolInstanceAdaptor.js +1 -0
- package/es/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js +1 -0
- package/es/components/videoPlayer/VideoTagLayer.js +1 -0
- package/es/components/videoPlayer/components/controller/index.js +1 -0
- package/es/components/videoPlayer/index.js +1 -0
- package/es/components/videoPlayer/utils.js +1 -0
- package/es/configureStore.js +1 -0
- package/es/constant/index.js +1 -0
- package/es/constant/styleString.js +1 -0
- package/es/data/Style.js +1 -0
- package/es/data/enums/AnnotationSize.js +1 -0
- package/es/data/enums/ToolType.js +1 -0
- package/es/hooks/annotation.js +1 -0
- package/es/hooks/useRafState.js +1 -0
- package/es/hooks/useRefCache.js +1 -0
- package/es/hooks/useSafeSate.js +1 -0
- package/es/hooks/useSize.js +1 -0
- package/es/hooks/useUnmountedRef.js +1 -0
- package/es/index.css +1549 -0
- package/es/index.js +1 -0
- package/es/store/Actions.js +1 -0
- package/es/store/annotation/actionCreators.js +1 -0
- package/es/store/annotation/map.js +1 -0
- package/es/store/annotation/reducer.js +1 -0
- package/es/store/annotation/selectors.js +1 -0
- package/es/store/ctx.js +1 -0
- package/es/store/imgAttribute/actionCreators.js +1 -0
- package/es/store/imgAttribute/reducer.js +1 -0
- package/es/store/index.js +1 -0
- package/es/store/toolStyle/actionCreators.js +1 -0
- package/es/store/toolStyle/reducer.js +1 -0
- package/es/utils/AnnotationDataUtils.js +1 -0
- package/es/utils/ConfigUtils.js +1 -0
- package/es/utils/PageOperator.js +1 -0
- package/es/utils/StepUtils.js +1 -0
- package/es/utils/TextUtils.js +1 -0
- package/es/utils/ToolStyleUtils.js +1 -0
- package/es/utils/ToolUtils.js +1 -0
- package/es/utils/data.js +1 -0
- package/es/utils/dom.js +1 -0
- package/es/utils/index.js +1 -0
- package/es/views/MainView/annotationOperation/index.js +1 -0
- package/es/views/MainView/annotationTips/index.js +1 -0
- package/es/views/MainView/index.js +1 -0
- package/es/views/MainView/sidebar/AnnotationText/index.js +1 -0
- package/es/views/MainView/sidebar/ClearIcon/index.js +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -0
- package/es/views/MainView/sidebar/ImgAttributeInfo/index.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/ScribbleSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/SwitchAttributeList/index.js +1 -0
- package/es/views/MainView/sidebar/TagSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/TextAreaFormat/index.js +1 -0
- package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/ToolIcons.js +1 -0
- package/es/views/MainView/sidebar/ToolStyle/index.js +1 -0
- package/es/views/MainView/sidebar/index.js +1 -0
- package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterPopover.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/cuboid/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/scribble/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/index.js +1 -0
- package/es/views/MainView/toolFooter/HiddenTips/index.js +1 -0
- package/es/views/MainView/toolFooter/PageNumber/index.js +1 -0
- package/es/views/MainView/toolFooter/Pagination.js +1 -0
- package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js +1 -0
- package/es/views/MainView/toolFooter/ZoomController/index.js +1 -0
- package/es/views/MainView/toolFooter/index.js +1 -0
- package/es/views/MainView/toolHeader/ExportData/index.js +1 -0
- package/es/views/MainView/toolHeader/StepSwitch/index.js +1 -0
- package/es/views/MainView/toolHeader/headerOption/index.js +1 -0
- package/es/views/MainView/toolHeader/index.js +1 -0
- package/package.json +102 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getClassName as u}from"../../utils/dom.js";import{PointCloud as N}from"@labelbee/lb-annotation";import{PointCloudUtils as D,toolStyleConverter as z,EPerspectiveView as C}from"@labelbee/lb-utils";import k from"classnames";import n,{useContext as _,useState as R,useRef as A,useEffect as v,useMemo as F}from"react";import{PointCloudContainer as M}from"./PointCloudLayout.js";import{PointCloudContext as U}from"./PointCloudContext.js";import{a2MapStateToProps as Z}from"../../store/annotation/map.js";import{connect as q}from"react-redux";import{jsonParser as G}from"../../utils/index.js";import{useSingleBox as H}from"./hooks/useSingleBox.js";import{useSphere as J}from"./hooks/useSphere.js";import{Switch as K,Tooltip as Q}from"antd";import W from"../../hooks/useSize.js";import{usePointCloudViews as X}from"./hooks/usePointCloudViews.js";import{useTranslation as x}from"react-i18next";import{LabelBeeContext as Y}from"../../store/ctx.js";var $=Object.defineProperty,ee=Object.defineProperties,te=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,T=(e,i,a)=>i in e?$(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a,S=(e,i)=>{for(var a in i||(i={}))oe.call(i,a)&&T(e,a,i[a]);if(b)for(var a of b(i))ne.call(i,a)&&T(e,a,i[a]);return e},ie=(e,i)=>ee(e,te(i));const re="LABELBEE-POINTCLOUD",g=n.createContext({isActive:!1,setTarget3DView:()=>{},reset3DView:()=>{},followTopView:()=>{}}),p=({perspectiveView:e})=>{const{isActive:i,setTarget3DView:a}=_(g),o=V=>k({[u("point-cloud-3d-view",V)]:!0,active:i});return n.createElement("span",{onClick:()=>{a(C[e])},className:o(e.toLocaleLowerCase())})},ae=()=>{const{reset3DView:e,followTopView:i}=_(g),{t:a}=x();return n.createElement("div",{className:u("point-cloud-3d-sidebar")},n.createElement(p,{perspectiveView:"Top"}),n.createElement(p,{perspectiveView:"Front"}),n.createElement(p,{perspectiveView:"Left"}),n.createElement(p,{perspectiveView:"Back"}),n.createElement(p,{perspectiveView:"Right"}),n.createElement(p,{perspectiveView:"LFT"}),n.createElement(p,{perspectiveView:"RBT"}),n.createElement(Q,{title:a("CameraFollowTopView")},n.createElement("span",{onClick:()=>{i()},className:u("point-cloud-3d-view","followTop")})),n.createElement("span",{onClick:()=>{e()},className:u("point-cloud-3d-view","reset")}))},le=({currentData:e,config:i})=>{var a;const o=_(U),[V,j]=R(!0),w=A(null),{initPointCloud3d:E}=X(),m=W(w),{t:I}=x();v(()=>{!o.mainViewInstance||E==null||E(m)},[m]);const{selectedBox:d}=H(),{selectedSphere:f}=J(),P=t=>{var r,l;const s=d==null?void 0:d.info;if(s){const c=S({},s.center);c.x=c.x-.01,c.z=10;const h=t===C.Top;(r=o.mainViewInstance)==null||r.updateCameraByBox(s,t,h?c:void 0)}f&&((l=o.mainViewInstance)==null||l.updateCameraBySphere(f,t))},O=()=>{var t;(t=o.mainViewInstance)==null||t.resetCamera()},y=()=>{var t,r;const l=(t=o.topViewInstance)==null?void 0:t.pointCloudInstance.camera;l&&((r=o.mainViewInstance)==null||r.applyCameraTarget(l))};v(()=>{if(w.current&&(e==null?void 0:e.url)){let t=o.mainViewInstance;if(!t&&m.width){const r={left:-m.width/2,right:m.width/2,top:m.height/2,bottom:-m.height/2,near:100,far:-100};t=new N({container:w.current,isOrthographicCamera:!0,orthographicParams:r,config:i}),o.setMainViewInstance(t)}}},[m]),v(()=>{var t;if(w.current&&(e==null?void 0:e.url)&&e.result&&o.mainViewInstance){let r=o.mainViewInstance;const l=D.getBoxParamsFromResultList(e.result);l.forEach(s=>{var c;const h=(c=z.getColorFromConfig({attribute:s.attribute},ie(S({},i),{attributeConfigurable:!0}),{}))==null?void 0:c.hex;r==null||r.generateBox(s,h)}),o.setPointCloudResult(l),o.setPointCloudValid((t=G(e.result))==null?void 0:t.valid)}},[e,o.mainViewInstance]),v(()=>{var t,r,l,s;if(d){P(C.Top);const c=(l=(r=(t=o.topViewInstance)==null?void 0:t.pointCloudInstance)==null?void 0:r.camera.zoom)!=null?l:1;(s=o.mainViewInstance)==null||s.updateCameraZoom(c)}},[d]),v(()=>{var t,r,l,s;if(f){P(C.Top);const c=(l=(r=(t=o.topViewInstance)==null?void 0:t.pointCloudInstance)==null?void 0:r.camera.zoom)!=null?l:1;(s=o.mainViewInstance)==null||s.updateCameraZoom(c)}},[f]);const B=F(()=>({reset3DView:O,setTarget3DView:P,isActive:!!d,followTopView:y}),[d,o.mainViewInstance]),L=n.createElement("div",null,n.createElement("span",{style:{marginRight:8}},I("ShowArrows")),n.createElement(K,{size:"small",checked:V,onChange:t=>{var r;j(t),(r=o.mainViewInstance)==null||r.setShowDirection(t)}}));return n.createElement(M,{className:u("point-cloud-3d-container"),title:I("3DView"),toolbar:L,style:{height:e.mappingImgList&&((a=e.mappingImgList)==null?void 0:a.length)>0?"55%":"100%"}},n.createElement("div",{className:u("point-cloud-3d-content")},n.createElement(g.Provider,{value:B},n.createElement(ae,null)),n.createElement("div",{className:u("point-cloud-3d-view"),id:re,ref:w})))};var se=q(Z,null,null,{context:Y})(le);export{se as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PointCloudAnnotation as B}from"@labelbee/lb-annotation";import{getClassName as w}from"../../utils/dom.js";import{PointCloudContainer as y}from"./PointCloudLayout.js";import m,{useRef as k,useEffect as h}from"react";import{PointCloudContext as v}from"./PointCloudContext.js";import{EPerspectiveView as b}from"@labelbee/lb-utils";import{useSingleBox as V}from"./hooks/useSingleBox.js";import{useSphere as j}from"./hooks/useSphere.js";import{useZoom as S}from"./hooks/useZoom.js";import{SizeInfoForView as E}from"./PointCloudInfos.js";import{connect as I}from"react-redux";import{a2MapStateToProps as D}from"../../store/annotation/map.js";import{usePointCloudViews as T}from"./hooks/usePointCloudViews.js";import N from"../../hooks/useSize.js";import O from"./components/EmptyPage/index.js";import{useTranslation as M}from"react-i18next";import{LabelBeeContext as X}from"../../store/ctx.js";import U from"../../utils/ToolUtils.js";const Z=(l,r,a=1)=>{const{width:e,height:o}=r,t={x:l.x+e*a/2,y:l.y+o*a/2},u={x:r.width/2,y:r.height/2};return{offsetX:(u.x-t.x)/a,offsetY:-(u.y-t.y)/a}},g=(l,r,a,e,o)=>{const{offsetX:t,offsetY:u}=Z(l,a,r);if(o.camera.zoom=r,l){const d=Math.cos(e),f=Math.sin(e),x=t*d,C=t*f,{x:p,y:n,z:c}=o.initCameraPosition;o.camera.position.set(p+C,n-x,c+u)}o.camera.updateProjectionMatrix(),o.render()},A=({currentData:l,config:r,checkMode:a})=>{const e=m.useContext(v),o=k(null),t=N(o),{selectedBox:u}=V(),{selectedSphere:d}=j(),{syncBackviewToolZoom:f}=S(),{t:x}=M(),{backViewUpdateBox:C,backViewUpdatePoint:p}=T();return h(()=>{if(o.current){const n={width:o.current.clientWidth,height:o.current.clientHeight},c=new B({container:o.current,size:n,extraProps:{showDirectionLine:!1,forbidAddNew:!0,forbidDelete:!0},config:r,checkMode:a,toolName:U.getPointCloudToolList()});e.setBackViewInstance(c)}},[]),h(()=>{if(!t||!e.backViewInstance)return;const{toolInstance:n,pointCloudInstance:c}=e.backViewInstance;n.singleOn("renderZoom",(i,s)=>{if(e.selectedPointCloudBox){g(s,i,t,e.selectedPointCloudBox.rotation,c),f(s,i,t);return}if(d){g(s,i,t,0,c),f(s,i,t);return}}),n.singleOn("dragMove",({currentPos:i,zoom:s})=>{!e.selectedPointCloudBox&&!d||g(i,s,t,e.selectedPointCloudBox?e.selectedPointCloudBox.rotation:0,c)}),n.singleOn("updatePointByDrag",(i,s)=>{d&&(p==null||p(i,s[0]))}),n.singleOn("updatePolygonByDrag",i=>{if(e.selectedIDs.length===1&&i.length===1){const{newPolygon:s,originPolygon:P}=i[0];s&&P&&C(s,P)}})},[e,t]),h(()=>{var n;(n=e==null?void 0:e.backViewInstance)==null||n.initSize(t)},[t]),m.createElement(y,{className:w("point-cloud-container","back-view"),title:x("BackView"),toolbar:m.createElement(E,{perspectiveView:b.Back})},m.createElement("div",{className:w("point-cloud-container","bottom-view-content")},m.createElement("div",{className:w("point-cloud-container","core-instance"),ref:o}),!u&&!d&&m.createElement(O,null)))};var L=I(D,null,null,{context:X})(A);export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import M,{useState as o,useRef as lt,useMemo as N,useEffect as dt}from"react";import{ActionsHistory as T,EToolName as j}from"@labelbee/lb-annotation";const z=M.createContext({pointCloudBoxList:[],pointCloudSphereList:[],displayPointCloudList:[],displaySphereList:[],polygonList:[],lineList:[],selectedID:"",selectedIDs:[],valid:!0,setSelectedIDs:()=>{},setPointCloudResult:()=>{},setPointCloudSphereList:()=>{},setPointCloudValid:()=>{},setTopViewInstance:()=>{},setSideViewInstance:()=>{},setBackViewInstance:()=>{},setMainViewInstance:()=>{},addSelectedID:()=>{},selectedAllBoxes:()=>{},addPointCloudBox:()=>[],addPointCloudSphere:()=>[],setPolygonList:()=>{},setLineList:()=>{},zoom:1,setZoom:()=>{},history:new T,hideAttributes:[],setHideAttributes:()=>{},toggleAttributesVisible:()=>{},reRender:()=>{},setAttrPanelLayout:()=>{},attrPanelLayout:"",syncAllViewPointCloudColor:()=>{},defaultAttribute:"",setDefaultAttribute:()=>{},pointCloudPattern:j.Rect,setPointCloudPattern:()=>{},selectSpecAttr:()=>{}}),rt=({children:F})=>{const[d,h]=o([]),[a,m]=o([]),[f,Z]=o([]),[L,q]=o([]),[r,A]=o([]),[y,G]=o(!0),[w,J]=o(1),[i,K]=o(),[I,Q]=o(),[V,U]=o(),[n,W]=o(),[g,X]=o(""),[x,Y]=o(j.Rect),$=lt(new T).current,[l,v]=o([]),[B,_]=o(""),R=N(()=>r.length===1?r[0]:"",[r]),D=N(()=>{const c=d.find(t=>t.id===R),S=t=>{const e=d.concat(t);return h(e),e},b=t=>{const e=a.concat(t);return m(e),e},P=t=>{G(t!==!1)},s=t=>{t===void 0&&A([]),typeof t=="string"&&A([t]),Array.isArray(t)&&A(Array.from(new Set(t)))},et=t=>{r.includes(t)?s(r.filter(e=>e!==t)):s([...r,t])},ot=()=>{s(d.map(t=>t.id))},nt=t=>{s(d.filter(e=>e.attribute===t).map(e=>e.id))},E=d.filter(t=>!l.includes(t.attribute)),H=a.filter(t=>!l.includes(t.attribute)),it=t=>{if(l.includes(t))v(l.filter(e=>e!==t));else{const e=l.concat(t);v(e)}},st=(t=E,e=f,C=H,p=L)=>{d.forEach(u=>{n==null||n.removeObjectByName(u.id)}),a.forEach(u=>{n==null||n.removeObjectByName(u.id)}),i==null||i.updatePolygonList(t,e),i==null||i.updatePointList(C),i==null||i.updateLineList(p),n==null||n.generateBoxes(t),n==null||n.generateSpheres(C),O(t)},O=t=>{const e=n==null?void 0:n.highlightOriginPointCloud(t);return new Promise(C=>{e==null||e.then(p=>{[i].forEach(u=>{var k;p&&((k=u==null?void 0:u.pointCloudInstance)==null||k.updateColor(p),C({color:p}))})})})};return{selectedID:R,pointCloudBoxList:d,pointCloudSphereList:a,displayPointCloudList:E,displaySphereList:H,selectedIDs:r,setPointCloudResult:h,setSelectedIDs:s,addPointCloudBox:S,addPointCloudSphere:b,setPointCloudSphereList:m,valid:y,selectedPointCloudBox:c,setPointCloudValid:P,addSelectedID:et,selectedAllBoxes:ot,topViewInstance:i,setTopViewInstance:K,sideViewInstance:I,setSideViewInstance:Q,backViewInstance:V,setBackViewInstance:U,mainViewInstance:n,setMainViewInstance:W,polygonList:f,setPolygonList:Z,lineList:L,setLineList:q,zoom:w,setZoom:J,history:$,toggleAttributesVisible:it,hideAttributes:l,setHideAttributes:v,reRender:st,attrPanelLayout:B,setAttrPanelLayout:_,syncAllViewPointCloudColor:O,defaultAttribute:g,setDefaultAttribute:X,pointCloudPattern:x,setPointCloudPattern:Y,selectSpecAttr:nt}},[y,r,d,a,f,L,i,I,V,n,w,l,B,g,x]),tt=()=>{const c=d.filter(s=>l.includes(s.attribute)),{setSelectedIDs:S,reRender:b}=D,P=c.map(s=>s.id);P.length>0&&S(r.filter(s=>!P.includes(s))),b()};return dt(()=>{var c;tt(),(c=i==null?void 0:i.pointCloud2dOperation)==null||c.setHiddenAttributes(l)},[l]),M.createElement(z.Provider,{value:D},F)};export{z as PointCloudContext,rt as PointCloudProvider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PointCloudUtils as m,EPerspectiveView as B}from"@labelbee/lb-utils";import e,{useState as E,useEffect as I}from"react";import{PointCloudContext as x}from"./PointCloudContext.js";import{UnitUtils as S}from"@labelbee/lb-annotation";import{useSingleBox as w}from"./hooks/useSingleBox.js";import{useTranslation as g}from"react-i18next";const r=2,P=({perspectiveView:a})=>{const{pointCloudBoxList:l,selectedID:u}=e.useContext(x),t=l.find(s=>s.id===u),h=g(),{t:n}=h;if(u&&t){const{length:s,width:i,height:c}=m.transferBox2Kitti(t),o=a===B.Back?[{label:n("Width"),value:i},{label:n("Height"),value:c}]:[{label:n("Length"),value:s},{label:n("Height"),value:c}];return e.createElement(e.Fragment,null,o.map((b,d)=>e.createElement("span",{key:d,style:{marginRight:d===0?16:0,fontSize:12}},`${b.label}: ${b.value.toFixed(r)}`)))}return null},A=({checkMode:a,config:l})=>{const u=e.useContext(x),{selectedBox:t}=w(),[h,n]=E([]),s=g(),{t:i,i18n:c}=s;return I(()=>{var o;if(!t)return;const{length:b,width:d,height:v,rotation_y:C}=m.transferBox2Kitti(t.info);let f=[{label:i("Length"),value:b.toFixed(r)},{label:i("Width"),value:d.toFixed(r)},{label:i("Height"),value:v.toFixed(r)},{label:i("Rotation_y"),value:S.rad2deg(C).toFixed(r)}];(o=u.mainViewInstance)==null||o.filterPointsByBox(t.info).then(p=>{if(!p){n(f);return}f.push({label:i("PointCount"),value:`${p.num}`}),a===!0&&t.info.subAttribute&&l&&m.getSubAttributeName(t.info.subAttribute,l).forEach(y=>f.push(y)),n(f)})},[t,c.language]),t?e.createElement("div",{style:{position:"absolute",color:"white",backgroundColor:"rgba(153, 153, 153, 0.3)",right:8,top:8,fontSize:12,padding:8,zIndex:20}},h.map(o=>e.createElement("div",{key:o.label},`${o.label}: ${o.value}`))):null},F=()=>{const a=e.useContext(x),{t:l}=g();return a.valid===!1?e.createElement("div",{style:{position:"absolute",backgroundColor:"rgb(242, 101, 73)",color:"white",opacity:.7,left:0,top:0,fontSize:30,padding:"8px 16px",zIndex:20,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},l("Invalid")):null};export{A as BoxInfos,F as PointCloudValidity,P as SizeInfoForView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getClassName as e}from"../../utils/dom.js";import s from"classnames";import t from"react";const i=({title:o,toolbar:a,children:n,className:r,style:c})=>t.createElement("div",{className:s([r,e("point-cloud-container")]),style:c},t.createElement("div",{className:e("point-cloud-container","header")},t.createElement("span",{className:e("point-cloud-container","header-title")},o),a&&t.createElement("div",{className:e("point-cloud-container","header-toolbar")},a)),n);export{i as PointCloudContainer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PointCloudContext as Q}from"./PointCloudContext.js";import{useRotate as X}from"./hooks/useRotate.js";import{useBoxes as Z}from"./hooks/useBoxes.js";import{useSingleBox as ee}from"./hooks/useSingleBox.js";import{useSphere as te}from"./hooks/useSphere.js";import{useContext as oe,useEffect as d}from"react";import{CommonToolUtils as re,AttributeUtils as ne,EToolName as b,cTool as se}from"@labelbee/lb-annotation";import{message as C}from"antd";import{connect as ie}from"react-redux";import{a2MapStateToProps as ae}from"../../store/annotation/map.js";import{useCustomToolInstance as le}from"../../hooks/annotation.js";import{useStatus as ue}from"./hooks/useStatus.js";import{jsonParser as ce}from"../../utils/index.js";import{usePointCloudViews as de}from"./hooks/usePointCloudViews.js";import{LabelBeeContext as pe}from"../../store/ctx.js";import{useHistory as me}from"./hooks/useHistory.js";import{useAttribute as fe}from"./hooks/useAttribute.js";import{useConfig as be}from"./hooks/useConfig.js";import{usePolygon as Pe}from"./hooks/usePolygon.js";import{useTranslation as ye}from"react-i18next";var ve=Object.defineProperty,we=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,j=(l,r,a)=>r in l?ve(l,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[r]=a,h=(l,r)=>{for(var a in r||(r={}))he.call(r,a)&&j(l,a,r[a]);if(O)for(var a of O(r))xe.call(r,a)&&j(l,a,r[a]);return l},x=(l,r)=>we(l,Ce(r));const{EPolygonPattern:ge}=se,ke=({currentData:l,config:r,checkMode:a,configString:A,imgIndex:g})=>{const t=oe(Q),{changeSelectedBoxValid:D,selectNextBox:T,selectPrevBox:E,updateSelectedBox:k,deleteSelectedPointCloudBoxAndPolygon:R}=ee(),{selectedSphere:P,updatePointCloudSphere:K}=te(),{clearAllResult:y,updatePointCloudPattern:N}=ue(),H=ce(l.result),{copySelectedBoxes:U,pasteSelectedBoxes:z,copiedBoxes:F}=Z({config:r}),{toolInstanceRef:i}=le({basicInfo:H}),{updateRotate:v}=X({currentData:l}),{updatePointCloudData:m,topViewSelectedChanged:S}=de(),{redo:_,undo:L,pushHistoryWithList:q,pushHistoryUnderUpdatePolygon:G}=me(),{syncThreeViewsAttribute:B}=fe(),{syncAllViewsConfig:M,reRenderTopViewRange:W}=be(),{selectedPolygon:I}=Pe(),{t:w}=ye(),f=e=>{var o;const{topViewInstance:n}=t;!n||(o=n.pointCloud2dOperation)==null||o.updateSelectedPolygonsPoints(e)},Y=(e,o)=>{var n;const{topViewInstance:s,mainViewInstance:u}=t;if(!s)return;const{pointCloud2dOperation:c}=s;switch(e){case"q":{v(2);break}case"e":v(-2);break;case"g":v(180);break;case"u":{const p=c.pattern===ge.Normal?b.Rect:b.Polygon;N(p);const J={[b.Polygon]:w("PolygonPattern"),[b.Rect]:w("RectPattern")};C.success(w("ChangePatternMsg",{pattern:J[p]})),c.clearActiveStatus(),c.clearDrawingStatus()}break;case"+":u==null||u.updatePointSize(!0);break;case"-":u==null||u.updatePointSize(!1);break;case"v":t.setPointCloudValid(!t.valid);break;case"tab":if(o.shiftKey){E();break}T(),o.preventDefault();break;case"f":D();break;case"arrowup":f({y:-1});break;case"arrowdown":f({y:1});break;case"arrowleft":f({x:-1});break;case"arrowright":f({x:1});break;case"delete":R();break;default:{if(((n=r.attributeList)==null?void 0:n.length)>0){const p=ne.getAttributeByKeycode(o.keyCode,r.attributeList);p!==void 0&&i.current.setDefaultAttribute(p)}return}}},$=(e,o)=>{switch(e){case"c":U();break;case"v":z();break;case"a":o.preventDefault(),t.selectedAllBoxes();break;case"z":{o.shiftKey?_():L();break}}},V=e=>{if(!re.hotkeyFilter(e)||a===!0)return;const o=e.key.toLocaleLowerCase();if(e.ctrlKey){$(o,e);return}Y(o,e)};return d(()=>{const{topViewInstance:e}=t;if(!!e)return window.addEventListener("keydown",V),()=>{window.removeEventListener("keydown",V)}},[t,F,r,t.pointCloudBoxList,t.polygonList]),d(()=>{M(r)},[A]),d(()=>{(r==null?void 0:r.radius)&&W(r==null?void 0:r.radius)},[r==null?void 0:r.radius]),d(()=>{m==null||m()},[g,t.mainViewInstance]),d(()=>{t.setHideAttributes([])},[g]),d(()=>{i.current.exportData=()=>[t.pointCloudBoxList,{valid:t.valid}],i.current.exportCustomData=()=>{var e,o,n;return{resultPolygon:(e=t.polygonList)!=null?e:[],resultLine:(o=t.lineList)!=null?o:[],resultPoint:(n=t.pointCloudSphereList)!=null?n:[]}},i.current.setDefaultAttribute=e=>{var o;B(e);const n=t.selectedPointCloudBox;if(n){n.attribute=e;const s=k(n);t.mainViewInstance&&S({newSelectedBox:n,newPointCloudList:s})}if(I&&G(x(h({},I),{attribute:e})),P){const s=K(x(h({},P),{attribute:e}));t.mainViewInstance&&((o=t.mainViewInstance)==null||o.generateSpheres(s),S({newSelectedSphere:P,newSphereList:s}))}},i.current.setSubAttribute=(e,o)=>{var n;const s=t.selectedPointCloudBox;if(s){const u=(n=s==null?void 0:s.subAttribute)!=null?n:{};s.subAttribute=x(h({},u),{[e]:o}),k(s)}},i.current.clearResult=()=>{y==null||y()},i.current.redo=()=>{_()},i.current.undo=()=>{L()},i.current.setValid=e=>{i.current.valid=e,setTimeout(()=>{t.setPointCloudValid(e),e===!1&&y()})},i.current.setForbidOperation=e=>{var o,n;(n=(o=t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null||n.setForbidOperation(e),e===!0&&t.setSelectedIDs(void 0)},i.current.setShowDefaultCursor=e=>{var o,n;(n=(o=t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null||n.setShowDefaultCursor(e)},i.current.asyncData=e=>{setTimeout(()=>{m==null||m(e)})}},[t.pointCloudBoxList,t.pointCloudSphereList,t.selectedID,t.valid,t.polygonList,t.lineList,t.mainViewInstance]),d(()=>{i.current.history={pushHistory:e=>{q({pointCloudBoxList:e})},initRecord:()=>{}}},[]),d(()=>{var e;const o=(e=t.topViewInstance)==null?void 0:e.toolInstance;if(!o||a)return;const n=c=>{B(c)},s=c=>{C.error(c)},u=c=>{C.info(c)};return o.on("syncAttribute",n),o.on("messageError",s),o.on("messageInfo",u),()=>{o.unbind("syncAttribute",n),o.unbind("messageError",s),o.unbind("messageInfo",u)}},[t.topViewInstance]),null};var Se=ie(ae,null,null,{context:pe})(ke);export{Se as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PointCloudAnnotation as P}from"@labelbee/lb-annotation";import{getClassName as w}from"../../utils/dom.js";import{PointCloudContainer as v}from"./PointCloudLayout.js";import f,{useRef as y,useEffect as C}from"react";import{EPerspectiveView as V}from"@labelbee/lb-utils";import{PointCloudContext as j}from"./PointCloudContext.js";import{SizeInfoForView as B}from"./PointCloudInfos.js";import{connect as S}from"react-redux";import{a2MapStateToProps as b}from"../../store/annotation/map.js";import{usePointCloudViews as E}from"./hooks/usePointCloudViews.js";import{useSingleBox as I}from"./hooks/useSingleBox.js";import{useSphere as T}from"./hooks/useSphere.js";import D from"./components/EmptyPage/index.js";import N from"../../hooks/useSize.js";import{useTranslation as k}from"react-i18next";import{LabelBeeContext as M}from"../../store/ctx.js";import O from"../../utils/ToolUtils.js";import{useZoom as X}from"./hooks/useZoom.js";const L=(c,l,e=1)=>{const{width:u,height:i}=l,d={x:c.x+u*e/2,y:c.y+i*e/2},r={x:l.width/2,y:l.height/2};return{offsetX:(r.x-d.x)/e,offsetY:-(r.y-d.y)/e}},h=(c,l,e,u,i)=>{const{offsetX:d,offsetY:r}=L(c,e,l);if(i.camera.zoom=l,c){const a=Math.cos(u),o=Math.sin(u),x=d*a,p=d*o,{x:n,y:m,z:t}=i.initCameraPosition;i.camera.position.set(n-x,m-p,t+r)}i.camera.updateProjectionMatrix(),i.render()},U=({config:c,checkMode:l})=>{const e=f.useContext(j),{sideViewUpdateBox:u,sideViewUpdatePoint:i}=E(),{selectedBox:d}=I(),{selectedSphere:r}=T(),a=y(null),o=N(a),{t:x}=k(),{syncSideviewToolZoom:p}=X();return C(()=>{if(a.current){const n={width:a.current.clientWidth,height:a.current.clientHeight},m=new P({container:a.current,size:n,extraProps:{showDirectionLine:!1,forbidAddNew:!0,forbidDelete:!0},config:c,checkMode:l,toolName:O.getPointCloudToolList()});e.setSideViewInstance(m)}},[]),C(()=>{if(!o||!e.sideViewInstance)return;const{toolInstance:n,pointCloudInstance:m}=e.sideViewInstance;n.singleOn("renderZoom",(t,s)=>{if(e.selectedPointCloudBox){h(s,t,o,e.selectedPointCloudBox.rotation,m),p(s,t,o);return}r&&(h(s,t,o,0,m),p(s,t,o))}),n.singleOn("dragMove",({currentPos:t,zoom:s})=>{!e.selectedPointCloudBox&&!r||h(t,s,o,e.selectedPointCloudBox?e.selectedPointCloudBox.rotation:0,m)}),n.singleOn("updatePointByDrag",(t,s)=>{r&&(i==null||i(t,s[0]))}),n.singleOn("updatePolygonByDrag",t=>{if(e.selectedIDs.length===1&&t.length===1){const{newPolygon:s,originPolygon:g}=t[0];u(s,g)}})},[e,o]),C(()=>{var n;(n=e==null?void 0:e.sideViewInstance)==null||n.initSize(o)},[o]),f.createElement(v,{className:w("point-cloud-container","side-view"),title:x("SideView"),toolbar:f.createElement(B,{perspectiveView:V.Left})},f.createElement("div",{className:w("point-cloud-container","bottom-view-content")},f.createElement("div",{className:w("point-cloud-container","core-instance"),ref:a}),!d&&!r&&f.createElement(D,null)))};var Z=S(b,null,null,{context:M})(U);export{Z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getClassName as x}from"../../utils/dom.js";import{FooterDivider as B}from"../../views/MainView/toolFooter/index.js";import{ZoomController as Q}from"../../views/MainView/toolFooter/ZoomController/index.js";import{UpSquareOutlined as ee,DownSquareOutlined as te}from"@ant-design/icons";import{PointCloudAnnotation as oe,cTool as ne}from"@labelbee/lb-annotation";import{PointCloudUtils as D}from"@labelbee/lb-utils";import r,{useState as N,useRef as ie,useLayoutEffect as se,useEffect as h}from"react";import{PointCloudContext as le}from"./PointCloudContext.js";import{useRotate as re}from"./hooks/useRotate.js";import{useSingleBox as U}from"./hooks/useSingleBox.js";import{PointCloudContainer as ae}from"./PointCloudLayout.js";import{BoxInfos as ce,PointCloudValidity as de}from"./PointCloudInfos.js";import{usePolygon as pe}from"./hooks/usePolygon.js";import{useLine as ue}from"./hooks/useLine.js";import{useSphere as me}from"./hooks/useSphere.js";import{useZoom as Z}from"./hooks/useZoom.js";import{Slider as fe}from"antd";import{a2MapStateToProps as we}from"../../store/annotation/map.js";import{connect as ge}from"react-redux";import{usePointCloudViews as ve}from"./hooks/usePointCloudViews.js";import Ce from"../../hooks/useSize.js";import{useTranslation as Pe}from"react-i18next";import{LabelBeeContext as Ie}from"../../store/ctx.js";import{jsonParser as xe}from"../../utils/index.js";import ye from"../../utils/ToolUtils.js";var Ve=Object.defineProperty,he=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,z=(o,s,l)=>s in o?Ve(o,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):o[s]=l,E=(o,s)=>{for(var l in s||(s={}))Se.call(s,l)&&z(o,l,s[l]);if(R)for(var l of R(s))be.call(s,l)&&z(o,l,s[l]);return o},T=(o,s)=>he(o,Oe(s));const{EPolygonPattern:_e}=ne,F=(o,s,l=1)=>{const{width:m,height:g}=s,C={x:o.x+m*l/2,y:o.y+g*l/2},v={x:s.width/2,y:s.height/2};return{offsetX:(v.x-C.x)/l,offsetY:-(v.y-C.y)/l}},Le=({currentData:o})=>{const{zoom:s,zoomIn:l,zoomOut:m,initialPosition:g}=Z(),{selectNextBox:C,selectPrevBox:v}=U(),{updateRotate:P}=re({currentData:o}),y=2,V=()=>{P(-y)},f=()=>{P(y)},t=()=>{P(180)};return r.createElement(r.Fragment,null,r.createElement("span",{onClick:f,className:x("point-cloud","rotate-reserve")}),r.createElement("span",{onClick:V,className:x("point-cloud","rotate")}),r.createElement("span",{onClick:t,className:x("point-cloud","rotate-180")}),r.createElement(B,null),r.createElement(ee,{onClick:()=>{v()},className:x("point-cloud","prev")}),r.createElement(te,{onClick:()=>{C()},className:x("point-cloud","next")}),r.createElement(B,null),r.createElement(Q,{initialPosition:g,zoomIn:l,zoomOut:m,zoom:s}))},je=({setZAxisLimit:o,zAxisLimit:s,checkMode:l})=>l?null:r.createElement("div",{style:{position:"absolute",top:128,right:8,height:"50%",zIndex:20}},r.createElement(fe,{vertical:!0,step:.5,max:10,min:.5,defaultValue:s,onAfterChange:m=>{o(m)}})),Ee=({currentData:o,imgList:s,stepInfo:l,drawLayerSlot:m,checkMode:g,intelligentFit:C})=>{var v,P;const[y,V]=N({zoom:1,currentPos:{x:0,y:0}}),f=ie(null),t=r.useContext(le),a=Ce(f),I=xe(l.config),{setZoom:W,syncTopviewToolZoom:M}=Z(),{hideAttributes:k}=t,{addPolygon:X,deletePolygon:Y}=pe(),{addLine:q,deleteLine:H}=ue(),{deletePointCloudSphere:$}=me(),{deletePointCloudBox:A,changeValidByID:G}=U(),[O,J]=N(10),{t:K}=Pe(),p=ve();return se(()=>{if(!t.topViewInstance&&f.current&&(o==null?void 0:o.url)&&(o==null?void 0:o.result)){const n={width:f.current.clientWidth,height:f.current.clientHeight},u=new oe({container:f.current,size:n,pcdPath:o.url,config:T(E({},I),{pointCloudPattern:t.pointCloudPattern}),checkMode:g,toolName:ye.getPointCloudToolList()});t.setTopViewInstance(u)}},[o]),h(()=>{if(!a||!t.topViewInstance||!t.sideViewInstance)return;const{toolInstance:n}=t.topViewInstance;n.singleOn("lineCreated",(e,i)=>{const d=T(E({},e),{pointList:e.pointList.map(c=>D.transferCanvas2World(c,a))});q(d),t.setSelectedIDs(k.includes(e.attribute)?"":e.id)}),n.singleOn("lineDeleted",e=>{A(e),H(e)}),n.singleOn("lineSelected",e=>{t.setSelectedIDs([e])}),n.singleOn("updateLineByDrag",e=>{var i;(i=p.topViewUpdateLine)==null||i.call(p,e,a)}),n.singleOn("pointCreated",(e,i)=>{p.topViewAddSphere({newPoint:e,size:a,trackConfigurable:I.trackConfigurable,zoom:i})}),n.singleOn("pointDeleted",e=>{$(e)}),n.singleOn("pointSelected",e=>{t.setSelectedIDs([e])}),n.singleOn("updatePointByDrag",(e,i)=>{var d;(d=p.topViewUpdatePoint)==null||d.call(p,e,a)}),n.singleOn("polygonCreated",(e,i)=>{if(n.pattern===_e.Normal||!(o==null?void 0:o.url)){const d=T(E({},e),{pointList:e.pointList.map(c=>D.transferCanvas2World(c,a))});X(d),t.setSelectedIDs(k.includes(e.attribute)?"":e.id);return}p.topViewAddBox({polygon:e,size:a,imgList:s,trackConfigurable:I.trackConfigurable,zoom:i,intelligentFit:C})}),n.singleOn("deletedObject",({id:e})=>{A(e),Y(e)}),n.singleOn("deleteSelectedIDs",()=>{t.setSelectedIDs([])}),n.singleOn("addSelectedIDs",e=>{t.addSelectedID(e)}),n.singleOn("setSelectedIDs",e=>{t.setSelectedIDs(e)}),n.singleOn("updatePolygonByDrag",e=>{var i;(i=p.topViewUpdateBox)==null||i.call(p,e,a)});const u=e=>{var i;const d=G(e);d&&t.syncAllViewPointCloudColor(d),t.polygonList.find(c=>c.id===e)&&((i=t.topViewInstance)==null||i.toolInstance.setPolygonValidAndRender(e,!0))};return n.on("validUpdate",u),()=>{n.unbind("validUpdate",u)}},[t,a,o,p,t.polygonList,t.lineList,(v=t.topViewInstance)==null?void 0:v.toolInstance]),h(()=>{var n,u;if(!(a==null?void 0:a.width)||!t.topViewInstance)return;const e=(u=(n=I==null?void 0:I.attributeList)==null?void 0:n[0])==null?void 0:u.value;e&&t.topViewInstance.toolInstance.setDefaultAttribute(e),t.topViewInstance.initSize(a),t.topViewInstance.updatePolygonList(t.displayPointCloudList,t.polygonList),t.topViewInstance.updatePointList(t.displaySphereList);const{topViewInstance:{pointCloudInstance:i,toolInstance:d}}=t;d.singleOn("renderZoom",(c,w)=>{const{offsetX:S,offsetY:b}=F(w,a,c);if(i.camera.zoom=c,w){const{x:_,y:L,z:j}=i.initCameraPosition;i.camera.position.set(_+b,L-S,j)}i.camera.updateProjectionMatrix(),i.render(),W(c),M(w,c,a),V({zoom:c,currentPos:w})}),d.singleOn("dragMove",({currentPos:c,zoom:w})=>{const{offsetX:S,offsetY:b}=F(c,a,w);i.camera.zoom=w;const{x:_,y:L,z:j}=i.initCameraPosition;i.camera.position.set(_+b,L-S,j),i.render(),V({zoom:w,currentPos:c})})},[a,t.topViewInstance,(P=t.topViewInstance)==null?void 0:P.toolInstance]),h(()=>{var n,u;(u=(n=t.topViewInstance)==null?void 0:n.pointCloudInstance)==null||u.applyZAxisPoints(O)},[O]),h(()=>{p.topViewSelectedChanged({})},[t.selectedIDs]),r.createElement(ae,{className:x("point-cloud-container","top-view"),title:K("TopView"),toolbar:r.createElement(Le,{currentData:o})},r.createElement("div",{style:{position:"relative",flex:1}},r.createElement("div",{style:{width:"100%",height:"100%"},ref:f},m==null?void 0:m(y)),r.createElement(ce,{checkMode:g,config:I}),r.createElement(je,{checkMode:g,zAxisLimit:O,setZAxisLimit:J}),r.createElement(de,null)))};var Te=ge(we,null,null,{context:Ie})(Ee);export{Te as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"react";import o from"../../../../assets/annotation/pointCloudTool/nodata.svg.js";import{getClassName as e}from"../../../../utils/dom.js";import{useTranslation as n}from"react-i18next";const m=()=>{const{t:a}=n();return t.createElement("div",{className:e("point-cloud-container","empty-page")},t.createElement("img",{src:o}),t.createElement("span",{className:e("point-cloud-container","empty-page","text")},a("NoData")))};export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ESubmitType as L}from"../../../../constant/index.js";import{ToSubmitFileData as z,BatchUpdateResultByTrackID as R}from"../../../../store/annotation/actionCreators.js";import{LabelBeeContext as T,useDispatch as M}from"../../../../store/ctx.js";import{Form as u,Modal as q,InputNumber as F,Select as g,Popover as N,message as V}from"antd";import e,{useState as H,useEffect as K,useCallback as Q}from"react";import{useTranslation as W}from"react-i18next";import{QuestionCircleOutlined as $}from"@ant-design/icons";import{PointCloudUtils as _}from"@labelbee/lb-utils";import{connect as G}from"react-redux";import{useSingleBox as J}from"../../hooks/useSingleBox.js";import{MathUtils as X}from"@labelbee/lb-annotation";var Y=Object.defineProperty,Z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,w=(r,n,a)=>n in r?Y(r,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[n]=a,v=(r,n)=>{for(var a in n||(n={}))te.call(n,a)&&w(r,a,n[a]);if(B)for(var a of B(n))re.call(n,a)&&w(r,a,n[a]);return r},ne=(r,n)=>Z(r,ee(n));const ae={labelCol:{span:8},wrapperCol:{span:16}},O=[{required:!0,message:"\u8BF7\u586B\u5199\u4E00\u4E2A\u6570\u5B57"}],le=[{required:!0,message:"\u8BF7\u9009\u62E9\u4E3B\u5C5E\u6027"}],h=2,k=({text:r})=>e.createElement("span",{style:{borderRadius:"4px 0px 0px 4px",padding:"0px 12px",background:"#FAFAFA",border:"1px solid rgb(217 217 217)",borderRight:"0",display:"flex",alignItems:"center",height:32}},r),ie=({id:r,visible:n,onCancel:a,config:m,imgList:y,imgIndex:A})=>{const P=M(),{selectedBox:i}=J(),[p,E]=H(),[d]=u.useForm(),{t:o}=W();K(()=>{n===!1?(d.resetFields(),E(void 0)):b()},[n]);const C=t=>{var s;if(!r)return;if(!p){V.info("\u8BE5\u8303\u56F4\u4E0D\u5B58\u5728\u66F4\u6539\u6570\u636E, \u8BF7\u66F4\u6539\u7EDF\u4E00\u8303\u56F4");return}P(z(L.SyncImgList));const l={attribute:t.attribute};if(m.secondaryAttributeConfigurable){const c={};(s=m.inputList)==null||s.forEach(f=>{const x=t[f.value];x!==void 0&&Object.assign(c,{[f.value]:x})}),Object.keys(c).length>0&&Object.assign(l,{subAttribute:c})}p&&Object.assign(l,p),P(R(r,l,[t.prevPage-1,t.nextPage-1])),a()},b=Q(()=>{var t;const{prevPage:s,nextPage:l}=d.getFieldsValue(["prevPage","nextPage"]),c=y.filter((x,U)=>X.isInRange(U,[s-1,l-1]));if(!((c==null?void 0:c.length)>0)||!(i==null?void 0:i.info)||((t=i==null?void 0:i.info)==null?void 0:t.trackID)===void 0){E(void 0);return}const f=_.getMaxSizeFromBox({trackID:i.info.trackID,imgList:c});E(f)},[y,i,A]),D=()=>d.submit(),j=()=>{if(!p||!(i==null?void 0:i.info))return;const t={marginRight:16},{length:s,width:l,height:c}=_.transferBox2Kitti(v(v({},i==null?void 0:i.info),p));return e.createElement("div",null,e.createElement("span",{style:t},o("Length"),": ",s.toFixed(h)),e.createElement("span",{style:t},o("Width"),": ",l.toFixed(h)),e.createElement("span",{style:t},o("Height"),": ",c.toFixed(h)),e.createElement(N,{placement:"rightBottom",content:"\u7EDF\u4E00\u5C3A\u5BF8\u4E3A\u8BE5ID\u7684\u6240\u6709\u6807\u6CE8\u6846\u4E2D\u6700\u5927\u7684\u5C3A\u5BF8"},e.createElement($,null)))},S={width:"200px"},I={marginBottom:"24px",display:"flex",alignItems:"center"};return e.createElement(q,{title:o("UnifyParams"),visible:n,onCancel:a,onOk:D,wrapClassName:"labelbee-custom-modal"},e.createElement(u,ne(v({},ae),{form:d,onFinish:C}),e.createElement(u.Item,{name:"id",label:o("UnifyTrackID")},r),e.createElement(u.Item,{label:o("UnifyAttributeRange"),required:!0},e.createElement(u.Item,{style:{display:"inline-block"},rules:O,name:"prevPage",noStyle:!0,initialValue:1},e.createElement(F,{precision:0,min:1,style:{width:"80px"},onChange:()=>b()})),e.createElement("span",{style:{display:"inline-block",width:"24px",textAlign:"center"}},"-"),e.createElement(u.Item,{style:{display:"inline-block"},rules:O,name:"nextPage",noStyle:!0,initialValue:y.length},e.createElement(F,{precision:0,min:1,style:{width:"80px"},onChange:()=>b()})),e.createElement("span",{style:{display:"inline-block",width:"40x",marginLeft:"10px",textAlign:"center"}},o("Page"))),e.createElement(u.Item,{name:"UnifySize",label:o("UnifySize")},j()),e.createElement(u.Item,{label:o("UnifyTag"),required:!0},e.createElement("div",{style:I},e.createElement(k,{text:o("Attribute")}),e.createElement(u.Item,{name:"attribute",noStyle:!0,rules:le},e.createElement(g,{style:S},m.attributeList.map(t=>e.createElement(g.Option,{key:t.value,value:t.value},t.key))))),m.secondaryAttributeConfigurable&&m.inputList.map(t=>{var s;return e.createElement("div",{key:t.value,style:I},e.createElement(k,{text:t.key}),e.createElement(u.Item,{name:t.value,noStyle:!0,required:!1},e.createElement(g,{style:S},(s=t.subSelected)==null?void 0:s.map(l=>e.createElement(g.Option,{key:l.value,value:l.value},l.key)))))}))))},oe=r=>({imgIndex:r.annotation.imgIndex});var ue=G(oe,null,null,{context:T})(ie);export{ue as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as a,useEffect as s}from"react";import{PointCloudContext as c}from"../PointCloudContext.js";const d=()=>{const{topViewInstance:t,sideViewInstance:n,backViewInstance:o,mainViewInstance:u,defaultAttribute:i,setDefaultAttribute:r}=a(c);return s(()=>{if(!(t==null?void 0:t.toolInstance))return;const e=()=>{r(t==null?void 0:t.toolInstance.defaultAttribute)};return t==null||t.toolInstance.on("changeAttributeSidebar",e),()=>{t==null||t.toolInstance.unbind("changeAttributeSidebar",e)}},[t==null?void 0:t.toolInstance]),{syncThreeViewsAttribute:e=>{[t==null?void 0:t.toolInstance,n==null?void 0:n.toolInstance,o==null?void 0:o.toolInstance].forEach(l=>{l==null||l.setDefaultAttribute(e)})},updateDefaultAttribute:e=>{t==null||t.toolInstance.setDefaultAttribute(e)},reRenderPointCloud3DBox:e=>{u==null||u.generateBox(e)},defaultAttribute:i}};export{d as useAttribute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as y,useState as B,useMemo as h,useCallback as p}from"react";import R from"lodash";import{message as C,Modal as w}from"antd";import{usePointCloudViews as H}from"./usePointCloudViews.js";import{PointCloudContext as M}from"../PointCloudContext.js";import{useTranslation as S}from"react-i18next";const V=({config:m})=>{const{selectedIDs:l,pointCloudBoxList:a,displayPointCloudList:o,setPointCloudResult:f,syncAllViewPointCloudColor:D}=y(M),[t,i]=B([]),{pointCloudBoxListUpdated:c}=H(),{t:n,i18n:d}=S(),x=s=>m.trackConfigurable!==!0?!1:a.some(r=>s.some(e=>e.trackID===r.trackID)),u=h(()=>o.filter(s=>l.includes(s.id)),[l,o]),P=p(()=>{u.length>0?i(R.cloneDeep(u)):(i([]),C.error(n("CopyEmptyInPointCloud")))},[l,o,d.language]),I=p(()=>{if(t.length===0){C.error(n("PasteEmptyInPointCloud"));return}const s=x(t),r=e=>{f(e),c==null||c(e),i([]),D(e)};if(s)w.confirm({title:n("HasDuplicateIDHeader"),content:n("HasDuplicateIDMsg"),onOk:()=>{const e=a.filter(g=>!t.find(k=>k.trackID===g.trackID)).concat(t);r(e)}});else{const e=[...o,...t];r(e)}},[t,o,d.language]);return{copySelectedBoxes:P,pasteSelectedBoxes:I,copiedBoxes:t,selectedBoxes:u}};export{V as useBoxes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PointCloudContext as r}from"../PointCloudContext.js";import{useContext as s}from"react";const v=()=>{const{topViewInstance:t,sideViewInstance:d,backViewInstance:a,mainViewInstance:i}=s(r);return{syncAllViewsConfig:n=>{[t,d,a].forEach(e=>{var o,l;e==null||e.updateConfig(n);const u=(l=(o=n==null?void 0:n.attributeList)==null?void 0:o[0])==null?void 0:l.value;u&&(e==null||e.pointCloud2dOperation.setDefaultAttribute(u))}),i==null||i.setConfig(n)},reRenderTopViewRange:n=>{var e,o,l;(o=(e=t==null?void 0:t.pointCloudInstance)==null?void 0:e.generateRange)==null||o.call(e,n),(l=t==null?void 0:t.pointCloudInstance)==null||l.render()}}};export{v as useConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as j}from"react";import{PointCloudContext as E}from"../PointCloudContext.js";var R=Object.defineProperty,P=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,h=(n,s,r)=>s in n?R(n,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[s]=r,g=(n,s)=>{for(var r in s||(s={}))S.call(s,r)&&h(n,r,s[r]);if(P)for(var r of P(s))V.call(s,r)&&h(n,r,s[r]);return n};const b=()=>{const{history:n,setPointCloudResult:s,setSelectedIDs:r,pointCloudBoxList:l,pointCloudSphereList:x,mainViewInstance:p,topViewInstance:L,polygonList:u,setPolygonList:f,lineList:c,setLineList:a,syncAllViewPointCloudColor:v}=j(E),H=({newBoxParams:t,newPolygon:o,newLine:i})=>{const e={pointCloudBoxList:l,polygonList:u,lineList:c};t&&(e.pointCloudBoxList=l.concat(t)),o&&(e.polygonList=u.concat(o)),i&&(e.lineList=c.concat(i)),n.pushHistory(e)},_=t=>{const o={pointCloudBoxList:l,polygonList:u,lineList:c};t.pointCloudBoxList&&(o.pointCloudBoxList=t.pointCloudBoxList),t.polygonList&&(o.polygonList=t.polygonList),t.lineList&&(o.lineList=t.lineList),n.pushHistory(o)},w=t=>{if(c.find(i=>i.id===t.id)){const i=c.map(e=>e.id===t.id?t:g({},e));n.pushHistory({lineList:i}),a(i)}},B=t=>{t&&n.pushHistory({pointCloudSphereList:x})},O=t=>{if(u.find(i=>i.id===t.id)){const i=u.map(e=>e.id===t.id?t:g({},e));n.pushHistory({pointCloudBoxList:l,polygonList:i}),f(i)}},m=({pointCloudBoxList:t,polygonList:o})=>{n.initRecord({pointCloudBoxList:t,polygonList:o},!0)},C=t=>{if(!t)return;const{pointCloudBoxList:o=[],polygonList:i=[],lineList:e=[]}=t;if(o){l.length!==o.length&&r();const U=l.filter(d=>o.every(y=>y.id!==d.id)),I=o.filter(d=>l.every(y=>y.id!==d.id));U.forEach(d=>{p==null||p.removeObjectByName(d.id)}),I.forEach(d=>{p==null||p.generateBox(d)}),s(o),v(o)}i&&f(i),e&&a(e),L==null||L.updatePolygonList(o!=null?o:[],i!=null?i:[]),L==null||L.updateLineList(e!=null?e:[])};return{addHistory:H,pushHistoryWithList:_,initHistory:m,pushHistoryUnderUpdatePoint:B,pushHistoryUnderUpdatePolygon:O,pushHistoryUnderUpdateLine:w,redo:()=>{C(n.redo())},undo:()=>{C(n.undo())}}};export{b as useHistory};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as u}from"react";import{PointCloudContext as f}from"../PointCloudContext.js";import{useHistory as L}from"./useHistory.js";var _=Object.defineProperty,m=Object.defineProperties,P=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,d=(t,e,r)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,p=(t,e)=>{for(var r in e||(e={}))y.call(e,r)&&d(t,r,e[r]);if(a)for(var r of a(e))O.call(e,r)&&d(t,r,e[r]);return t},w=(t,e)=>m(t,P(e));const v=()=>{const{lineList:t,setLineList:e,selectedID:r}=u(f),{addHistory:c,pushHistoryWithList:l}=L(),s=t.find(i=>i.id===r);return{addLine:i=>{e(t.concat(i)),c({newLine:i})},deleteLine:i=>{const o=t.filter(n=>n.id!==i).map(n=>p({},n));e(o),l({lineList:o})},selectedLine:s,updateSelectedLine:i=>{s&&e(t.map(o=>o.id===r?i:o))},updateLineValidByID:i=>{t.find(n=>n.id===i)&&e(t.map(n=>n.id===i?w(p({},n),{valid:!n.valid}):n))}}};export{v as useLine};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{MathUtils as x,getCuboidFromPointCloudBox as Vt}from"@labelbee/lb-annotation";import{EPerspectiveView as N,PointCloudUtils as I,DEFAULT_SPHERE_PARAMS as Ut}from"@labelbee/lb-utils";import{useContext as kt}from"react";import{PointCloudContext as At}from"../PointCloudContext.js";import{useSingleBox as st}from"./useSingleBox.js";import{useSphere as jt}from"./useSphere.js";import{useSelector as Tt,useDispatch as zt}from"../../../store/ctx.js";import Rt from"../../../utils/StepUtils.js";import{jsonParser as rt}from"../../../utils/index.js";import{SetPointCloudLoading as dt}from"../../../store/annotation/actionCreators.js";import{message as Et}from"antd";import{useTranslation as Ht}from"react-i18next";import{useHistory as Ft}from"./useHistory.js";import{usePolygon as Nt}from"./usePolygon.js";var Wt=Object.defineProperty,Zt=Object.defineProperties,Mt=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,Gt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,at=(t,e,n)=>e in t?Wt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,L=(t,e)=>{for(var n in e||(e={}))Gt.call(e,n)&&at(t,n,e[n]);if(lt)for(var n of lt(e))Xt.call(e,n)&&at(t,n,e[n]);return t},V=(t,e)=>Zt(t,Mt(e)),q=(t,e,n)=>new Promise((r,o)=>{var c=d=>{try{s(n.next(d))}catch(g){o(g)}},p=d=>{try{s(n.throw(d))}catch(g){o(g)}},s=d=>d.done?r(d.value):Promise.resolve(d.value).then(c,p);s((n=n.apply(t,e)).next())});const G=5,X=90,y={"3D":"3D",Top:"Top",Side:"Side",Back:"Back"},J=(t,e,n,r,o)=>{const{x:c,y:p}=I.transferCanvas2World(t,e),{defaultZ:s}=Ut,d={center:{x:c,y:p,z:s},id:t.id},g=r?L(L({},r),d):V(L({},d),{attribute:"",valid:!0});return o&&Object.assign(g,o),g},K=(t,e,n,r,o,c)=>{let p=t.pointList.map(m=>I.transferCanvas2World(m,e)),s=0,d=1,g={};if(n){const m=n.getSensesPointZAxisInPolygon(p,void 0,c);c&&m.fittedCoordinates.length>0&&(p=m.fittedCoordinates),s=(m.maxZ+m.minZ)/2,d=m.maxZ-m.minZ,g={count:m.zCount}}const[P,B,H]=p,U=x.getLineCenterPoint([P,H]),T=x.getLineLength(P,B),z=x.getLineLength(B,H),R=x.getRadiusFromQuadrangle(t.pointList);r&&(s=r.center.z,d=r.depth);const k={center:{x:U.x,y:U.y,z:s},width:z,height:T,depth:d,rotation:R,id:t.id},A=L(r?L(L({},r),k):V(L({},k),{attribute:"",valid:!0}),g);o&&Object.assign(A,o);const j=p.map(m=>I.transferWorld2Canvas(m,e));return{boxParams:A,newPointList:j}},ct=(t,e,n)=>{const r={x:t.x-e.x,y:t.y-e.y};return V(L({},n),{center:{x:n.center.x-r.x,y:n.center.y,z:n.center.z-r.y}})},ut=(t,e,n,r)=>{const[o,c,p]=t.pointList,[s,d,g]=e.pointList,P=x.getLineCenterPoint([o,p]),B=x.getLineCenterPoint([s,g]),U={x:{x:P.x-B.x,y:P.y-B.y}.x,y:0,z:P.y-B.y},T=x.getLineLength(o,c),z=x.getLineLength(s,d),R=T-z,k=x.getLineLength(c,p),A=x.getLineLength(d,g),j=k-A,{newBoxParams:m}=r.getNewBoxBySideUpdate(U,j,R,n);return m},Yt=(t,e,n)=>{const r={x:t.x-e.x,y:t.y-e.y};return V(L({},n),{center:{x:n.center.x,y:n.center.y-r.x,z:n.center.z-r.y}})},Qt=(t,e,n,r)=>{const[o,c,p]=t.pointList,[s,d,g]=e.pointList,P=x.getLineCenterPoint([o,p]),B=x.getLineCenterPoint([s,g]),U={x:{x:P.x-B.x,y:P.y-B.y}.x,y:0,z:P.y-B.y},T=x.getLineLength(o,c),z=x.getLineLength(s,d),R=T-z,k=x.getLineLength(c,p),A=x.getLineLength(d,g),j=k-A;let{newBoxParams:m}=r.getNewBoxByBackUpdate(U,j,R,n);return m},pt=(t,e,n,r,o)=>{var c;if(!n)return;const{toolInstance:p,pointCloudInstance:s}=n;s.loadPCDFile(r,(c=o==null?void 0:o.radius)!=null?c:X);const{cameraPositionVector:d}=s.updateOrthoCameraBySphere(t,N.Left);s.setInitCameraPosition(d);const{point2d:g,zoom:P}=s.getSphereSidePoint2DCoordinate(t);s.camera.zoom=P,s.camera.updateProjectionMatrix(),s.render(),p.initPosition(),p.zoomChangeOnCenter(P),p.setResult([V(L(L({},e),g),{valid:t.valid,textAttribute:"",attribute:t.attribute})]),p.setSelectedID(e.id)},ft=(t,e,n,r)=>{if(!n)return;const{pointCloud2dOperation:o,pointCloudInstance:c}=n;c.loadPCDFileByBox(r,t,{width:G,depth:G});const{cameraPositionVector:p}=c.updateOrthoCamera(t,N.Left);c.setInitCameraPosition(p);const{polygon2d:s,zoom:d}=c.getBoxSidePolygon2DCoordinate(t);c.camera.zoom=d,c.camera.updateProjectionMatrix(),c.render(),o.initPosition(),o.zoomChangeOnCenter(d),o.setResultAndSelectedID([{id:e.id,valid:t.valid,pointList:s,textAttribute:"",isRect:!0,attribute:t.attribute}],e.id)},Ct=(t,e,n,r,o)=>{var c;if(!n)return;const{toolInstance:p,pointCloudInstance:s}=n;s.loadPCDFile(r,(c=o==null?void 0:o.radius)!=null?c:X);const{cameraPositionVector:d}=s.updateOrthoCameraBySphere(t,N.Back);s.setInitCameraPosition(d);const{point2d:g,zoom:P}=s.getSphereBackPoint2DCoordinate(t);s.camera.zoom=P,s.camera.updateProjectionMatrix(),s.render(),p.initPosition(),p.zoomChangeOnCenter(P),p.setResult([V(L(L({},e),g),{valid:t.valid,textAttribute:"",attribute:t.attribute})]),p.setSelectedID(e.id)},gt=(t,e,n,r)=>{if(!n)return;const{pointCloud2dOperation:o,pointCloudInstance:c}=n;c.loadPCDFileByBox(r,t,{height:G,depth:G});const{cameraPositionVector:p}=c.updateOrthoCamera(t,N.Back);c.setInitCameraPosition(p);const{polygon2d:s,zoom:d}=c.getBoxBackPolygon2DCoordinate(t);c.camera.zoom=d,c.camera.updateProjectionMatrix(),c.render(),o.initPosition(),o.zoomChangeOnCenter(d),o.setResultAndSelectedID([{id:e.id,valid:t.valid,pointList:s,textAttribute:"",isRect:!0,attribute:t.attribute}],e.id)},Pt=(t,e,n,r)=>{if(!n||!r)return;r.generateSphere(t),r.updateCameraBySphere(t,N.Top),r.render();const{toolInstance:o,pointCloudInstance:c}=n,{point2d:p}=c.getSphereTopPoint2DCoordinate(t),s=[...o.pointList].map(d=>d.id===e.id?V(L(L({},e),p),{valid:t.valid,textAttribute:"",attribute:t.attribute}):d);o.setResult(s),o.setSelectedID(e.id)},$=(t,e,n,r)=>{var o;if(!n||!r)return;r.generateBox(t,e.id),r.render();const{pointCloud2dOperation:c,pointCloudInstance:p}=n,{polygon2d:s}=p.getBoxTopPolygon2DCoordinate(t),d=[...c.polygonList],g=d.find(P=>P.id===e.id);g?g.pointList=s:d.push({id:e.id,pointList:s,textAttribute:"",isRect:!0,valid:(o=t.valid)!=null?o:!0}),c.setResultAndSelectedID(d,e.id)},qt=()=>{const t=kt(At),{topViewInstance:e,sideViewInstance:n,backViewInstance:r,mainViewInstance:o,addPointCloudBox:c,addPointCloudSphere:p,setSelectedIDs:s,selectedIDs:d,pointCloudBoxList:g,pointCloudSphereList:P,hideAttributes:B}=t,{addHistory:H,initHistory:U,pushHistoryUnderUpdatePolygon:T,pushHistoryUnderUpdatePoint:z,pushHistoryUnderUpdateLine:R}=Ft(),{selectedPolygon:k}=Nt(),{updateSelectedBox:A,updateSelectedBoxes:j,getPointCloudByID:m}=st(),{getPointCloudSphereByID:ht,updatePointCloudSphere:tt,selectedSphere:W}=jt(),{currentData:D,config:S}=Tt(i=>{const{stepList:l,step:f,imgList:u,imgIndex:a}=i.annotation;return{currentData:u[a],config:rt(Rt.getCurrentStepInfo(f,l).config)}}),ot=zt(),{selectedBox:F}=st(),{t:yt}=Ht(),et=F==null?void 0:F.info;if(!e||!n||!r)return{topViewAddSphere:()=>{},topViewAddBox:()=>{},topViewSelectedChanged:()=>{},sideViewUpdateBox:()=>{},backViewUpdateBox:()=>{}};const{pointCloudInstance:Y}=e,Lt=i=>{o==null||o.generateBox(i),o==null||o.controls.update(),o==null||o.render()},mt=i=>{o==null||o.generateSphere(i),o==null||o.controls.update(),o==null||o.render()},xt=({newPoint:i,size:l,zoom:f,trackConfigurable:u})=>{var a;const C={attribute:(a=e.toolInstance.defaultAttribute)!=null?a:""};u===!0&&Object.assign(C,{trackID:I.getNextTrackID({imgList:[],extraBoxList:[],extraSphereList:P})});const h=J(i,l,Y,void 0,C);s(i.id);const v=p(h);Z(y.Top,i,h,f,v,S)},vt=({polygon:i,size:l,imgList:f,trackConfigurable:u,zoom:a,intelligentFit:C})=>{var h;const v={attribute:(h=e.toolInstance.defaultAttribute)!=null?h:""};u===!0&&Object.assign(v,{trackID:I.getNextTrackID({imgList:[],extraBoxList:g,extraSphereList:P})});const w=e==null?void 0:e.toolInstance,O=L({},i),{boxParams:b,newPointList:E}=K(O,l,Y,void 0,v,C);if((S==null?void 0:S.lowerLimitPointsNumInBox)&&typeof b.count=="number"&&b.count<S.lowerLimitPointsNumInBox){Et.info(yt("LowerLimitPointsNumInBox",{num:S.lowerLimitPointsNumInBox})),w.deletePolygon(b.id);return}C&&(E==null?void 0:E.length)&&(O.pointList=E);const Q=B.includes(O.attribute),_=c(b);Q?s([]):(s(b.id),w.setSelectedIDs([O.id]),M(y.Top,O,b,a,_),C&&$(b,O,e,o)),H({newBoxParams:b})},Bt=({newSelectedBox:i,newPointCloudList:l,newSelectedSphere:f,newSphereList:u})=>{const a=e==null?void 0:e.toolInstance;if(!(d.length===0||!a)){if(i||(F==null?void 0:F.info)){const C=i!=null?i:F==null?void 0:F.info;a.setSelectedIDs(d);const h=a.selectedPolygon;if(d.length===1&&C){M(y.Top,h,C,void 0,l);return}}if((f||W)&&d.length===1){const C=f!=null?f:W;a.setSelectedID(d[0]);const h=a.selectedPoint;C&&Z(y.Top,h,C,void 0,u,S)}}},nt=(i,l,f)=>{if(et){let u,a;switch(f){case y.Back:u=Qt;break;case y.Side:u=ut;break;default:u=ut;break}if(a=u(i,l,et,n.pointCloudInstance),o){const{count:h}=o.getSensesPointZAxisInPolygon(Vt(a).polygonPointList,[a.center.z-a.depth/2,a.center.z+a.depth/2]);a=V(L({},a),{count:h})}const C=A(a);return M(f,i,a,void 0,C),C}},it=(i,l,f)=>{if(W){let u,a;switch(f){case y.Back:u=Yt;break;case y.Side:u=ct;break;default:u=ct;break}a=u(i,l,W);const C=tt(a);return Z(f,i,a,void 0,C,S),C}},St=(i,l)=>{it(i,l,y.Side)},bt=(i,l)=>{it(i,l,y.Back)},wt=(i,l)=>{nt(i,l,y.Side)},It=(i,l)=>{nt(i,l,y.Back)},Dt=(i,l)=>{R(i)},Ot=(i,l)=>{const{x:f,y:u}=I.transferCanvas2World(i,l);z(V(L({},i),{x:f,y:u}));const a=ht(i.id),C=J(i,l,Y,a),h=tt(C);Z(y.Top,i,C,void 0,h,S)},_t=(i,l)=>{if(k){const u=i[0].newPolygon;u.pointList=u.pointList.map(a=>I.transferCanvas2World(a,l)),T(i[0].newPolygon);return}const f=i.map(({newPolygon:u})=>{const a=m(u.id),{boxParams:C}=K(u,l,e.pointCloudInstance,a);return C});if(f.length===1){const{newPolygon:u}=i[0],a=j(f);M(y.Top,u,f[0],void 0,a)}else{const u=j(f);u&&t.syncAllViewPointCloudColor(u)}},Z=(i,l,f,u,a,C)=>q(void 0,null,function*(){const h=D==null?void 0:D.url,v={[y.Side]:()=>{pt(f,l,n,h,C)},[y.Back]:()=>{r&&Ct(f,l,r,h,C)},[y.Top]:()=>{Pt(f,l,e,o)}};Object.keys(v).forEach(w=>{w!==i&&v[w]()}),u&&(o==null||o.updateCameraZoom(u)),mt(f)}),M=(i,l,f,u,a)=>q(void 0,null,function*(){const C=D==null?void 0:D.url;a&&(yield t.syncAllViewPointCloudColor(a));const h={[y.Side]:()=>{ft(f,l,n,C)},[y.Back]:()=>{r&>(f,l,r,C)},[y.Top]:()=>{$(f,l,e,o)}};Object.keys(h).forEach(v=>{v!==i&&h[v]()}),u&&(o==null||o.updateCameraZoom(u)),Lt(f)});return{topViewAddSphere:xt,topViewAddBox:vt,topViewSelectedChanged:Bt,topViewUpdatePoint:Ot,sideViewUpdatePoint:St,backViewUpdatePoint:bt,topViewUpdateBox:_t,topViewUpdateLine:Dt,sideViewUpdateBox:wt,backViewUpdateBox:It,pointCloudBoxListUpdated:i=>{e.updatePolygonList(i),o==null||o.generateBoxes(i)},initPointCloud3d:i=>{if(!o)return;const l={left:-i.width/2,right:i.width/2,top:i.height/2,bottom:-i.height/2,near:100,far:-100};o.initOrthographicCamera(l),o.initRenderer(),o.render()},updatePointCloudData:(...i)=>q(void 0,[...i],function*(l=D){var f,u,a,C,h,v;if(!(l==null?void 0:l.url)||!o)return;dt(ot,!0),yield o.loadPCDFile(l.url,(f=S==null?void 0:S.radius)!=null?f:X),g.forEach(_=>{o==null||o.removeObjectByName(_.id)}),P.forEach(_=>{o==null||o.removeObjectByName(_.id)});let w=[],O=[],b=[],E=[];D.result?(w=I.getBoxParamsFromResultList(D.result),b=I.getPolygonListFromResultList(D.result),O=I.getLineListFromResultList(D.result),E=I.getSphereParamsFromResultList(D.result),w.forEach(_=>{o==null||o.generateBox(_)}),E.forEach(_=>{o==null||o.generateSphere(_)}),t.syncAllViewPointCloudColor(w),t.setPointCloudResult(w),t.setPolygonList(b),t.setLineList(O),t.setPointCloudSphereList(E)):(t.setPointCloudResult([]),t.setPolygonList([]),t.setPointCloudSphereList([]),t.setLineList([])),U({pointCloudBoxList:w,polygonList:b}),o.updateTopCamera();const Q=(a=(u=rt(l.result))==null?void 0:u.valid)!=null?a:!0;t.setPointCloudValid(Q),(C=t.sideViewInstance)==null||C.clearAllData(),(h=t.backViewInstance)==null||h.clearAllData(),e.updateData(l.url,l.result,{radius:(v=S==null?void 0:S.radius)!=null?v:X}),dt(ot,!1)})}};export{Ct as syncBackViewByPoint,pt as syncSideViewByPoint,Pt as syncTopViewByPoint,gt as synchronizeBackView,ft as synchronizeSideView,$ as synchronizeTopView,J as topViewPoint2PointCloud,K as topViewPolygon2PointCloud,qt as usePointCloudViews};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as c}from"react";import{PointCloudContext as P}from"../PointCloudContext.js";import{useHistory as u}from"./useHistory.js";var f=Object.defineProperty,g=Object.defineProperties,_=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,a=(e,o,t)=>o in e?f(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,p=(e,o)=>{for(var t in o||(o={}))m.call(o,t)&&a(e,t,o[t]);if(l)for(var t of l(o))O.call(o,t)&&a(e,t,o[t]);return e},w=(e,o)=>g(e,_(o));const v=()=>{const{polygonList:e,setPolygonList:o,selectedID:t}=c(P),{addHistory:d,pushHistoryWithList:y}=u(),i=e.find(r=>r.id===t);return{addPolygon:r=>{o(e.concat(r)),d({newPolygon:r})},deletePolygon:r=>{const s=e.filter(n=>n.id!==r).map(n=>p({},n));o(s),y({polygonList:s})},selectedPolygon:i,updateSelectedPolygon:r=>{i&&o(e.map(s=>s.id===t?r:s))},updatePolygonValidByID:r=>{e.find(n=>n.id===r)&&o(e.map(n=>n.id===r?w(p({},n),{valid:!n.valid}):n))}}};export{v as usePolygon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as p,useCallback as C}from"react";import{synchronizeSideView as m,synchronizeBackView as P}from"./usePointCloudViews.js";import{useSingleBox as w}from"./useSingleBox.js";import{PointCloudContext as x}from"../PointCloudContext.js";import{cAnnotation as b}from"@labelbee/lb-annotation";import{PointCloudUtils as V}from"@labelbee/lb-utils";const{ERotateDirection:f}=b,g=({currentData:t})=>{const o=p(x),{selectedBox:i,updateSelectedBox:u}=w();return{updateRotate:C(l=>{const{topViewInstance:s,mainViewInstance:n,syncAllViewPointCloudColor:d}=o;if(!s||!n)return;const{pointCloud2dOperation:c}=s,e=i==null?void 0:i.info;if(!e||!(t==null?void 0:t.url)||!o.backViewInstance)return;const a=u({rotation:V.restrictAngleRange(e.rotation+Number(Math.PI*l)/180)});c.rotatePolygon(l,f.Anticlockwise);const r=c.selectedPolygon;n.generateBox(e),d(a),m(e,r,o.sideViewInstance,t.url),P(e,r,o.backViewInstance,t.url),n.render()},[o.selectedID,o.pointCloudBoxList,o.setPointCloudResult,o.topViewInstance,t])}};export{g as useRotate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as k,useMemo as O,useCallback as u}from"react";import a from"lodash";import{PointCloudContext as q}from"../PointCloudContext.js";import{cAnnotation as z}from"@labelbee/lb-annotation";import{useHistory as F}from"./useHistory.js";import{usePolygon as G}from"./usePolygon.js";var J=Object.defineProperty,K=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,V=(e,i,n)=>i in e?J(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,Y=(e,i)=>{for(var n in i||(i={}))U.call(i,n)&&V(e,n,i[n]);if(_)for(var n of _(i))X.call(i,n)&&V(e,n,i[n]);return e},Z=(e,i)=>K(e,Q(i));const{ESortDirection:D}=z,$=()=>{const{pointCloudBoxList:e,setPointCloudResult:i,topViewInstance:n,backViewInstance:y,sideViewInstance:g,selectedIDs:f,selectedID:v,mainViewInstance:s,setSelectedIDs:b,syncAllViewPointCloudColor:C,polygonList:h}=k(q),{selectedPolygon:c,updateSelectedPolygon:L,updatePolygonValidByID:S,deletePolygon:j}=G(),{pushHistoryWithList:m}=F(),l=O(()=>{const o=e.findIndex(t=>t.id===v);if(o>-1)return{info:e[o],index:o}},[v,e]),B=u(o=>{if(l==null?void 0:l.info){e.splice(l.index,1,a.merge(l.info,o));const t=a.cloneDeep(e);return i(t),m({pointCloudBoxList:t}),t}return e},[v,e]),A=u((o,t)=>{const d=e.findIndex(r=>r.id===t);if(d>-1){e.splice(d,1,a.merge(e[d],o));const r=a.cloneDeep(e);return i(r),r}return e},[e]),P=u(o=>{n==null||n.pointCloud2dOperation.setPolygonValidAndRender(o,!0),g==null||g.pointCloud2dOperation.setPolygonValidAndRender(o,!0),y==null||y.pointCloud2dOperation.setPolygonValidAndRender(o,!0)},[n,g,y]),N=u(()=>{if(l==null?void 0:l.info){const{id:o,valid:t=!0}=l.info,d=B({valid:!t});C(d),P(o)}c&&(L(Z(Y({},c),{valid:!c.valid})),n==null||n.pointCloud2dOperation.setPolygonValidAndRender(c.id,!0))},[P,l,c]),R=u(o=>{const t=e.find(d=>d.id===o);if(t){const{id:d,valid:r=!0}=t,p=A({valid:!r},d);return P(d),p}S(o)},[P,e,h]),w=u((o=D.ascend)=>{if(!n||f.length>1)return;const{pointCloud2dOperation:t}=n,d=t.switchToNextPolygon(o);d&&b(d)},[n]),E=()=>{w(D.descend)},I=o=>{const t=e.filter(d=>d.id!==o);i(t),s==null||s.removeObjectByName(o),s==null||s.render(),C(t)},H=()=>{l&&(I(l.info.id),n==null||n.pointCloud2dOperation.deletePolygon(l.info.id)),c&&(j(c.id),n==null||n.pointCloud2dOperation.deletePolygon(c.id))},M=O(()=>e.filter(o=>f.includes(o.id)),[f,e]),T=u(o=>{const t=a.cloneDeep(e);let d=!1;if(o.forEach(r=>{const p=t.findIndex(x=>x.id===r.id);if(p>-1){const x=a.merge(t[p],r);t.splice(p,1,x),s==null||s.generateBox(x),d=!0}}),d)return i(t),m({pointCloudBoxList:t}),s==null||s.render(),t},[f,e]),W=u(o=>e.find(t=>t.id===o),[e]);return{selectedBox:l,updateSelectedBox:B,changeSelectedBoxValid:N,changeValidByID:R,selectNextBox:w,selectPrevBox:E,deletePointCloudBox:I,selectedBoxes:M,updateSelectedBoxes:T,getPointCloudByID:W,deleteSelectedPointCloudBoxAndPolygon:H}};export{$ as useSingleBox};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as h,useMemo as m,useCallback as i}from"react";import{PointCloudContext as S}from"../PointCloudContext.js";import l from"lodash";const f=()=>{const{pointCloudSphereList:e,setPointCloudSphereList:d,selectedID:s,mainViewInstance:r}=h(S),u=m(()=>e.find(t=>t.id===s),[s,e]),c=i(t=>e.find(o=>o.id===t),[e]),p=i(t=>{const o=e.findIndex(n=>n.id===t.id);if(o>-1){e.splice(o,1,l.merge(e[o],t));const n=l.cloneDeep(e);return d(n),n}return e},[e]),C=i(t=>{const o=e.filter(n=>n.id!==t);d(o),r==null||r.removeObjectByName(t),r==null||r.render()},[e]);return{selectedSphere:u,getPointCloudSphereByID:c,updatePointCloudSphere:p,deletePointCloudSphere:C}};export{f as useSphere};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as w}from"react";import{PointCloudContext as b}from"../PointCloudContext.js";import{cTool as L}from"@labelbee/lb-annotation";import{useHistory as R}from"./useHistory.js";const{EToolName:t,EPolygonPattern:d}=L,E=()=>{const{topViewInstance:r,sideViewInstance:a,backViewInstance:u,mainViewInstance:e,pointCloudBoxList:P,pointCloudSphereList:C,setPointCloudResult:v,setPointCloudSphereList:h,setPolygonList:p,pointCloudPattern:c,setPointCloudPattern:n,syncAllViewPointCloudColor:m}=w(b),{pushHistoryWithList:y}=R(),f=()=>{P.forEach(l=>{e==null||e.removeObjectByName(l.id)}),C.forEach(l=>{e==null||e.removeObjectByName(l.id)}),e==null||e.render(),v([]),p([]),h([]),r==null||r.toolScheduler.clearStatusAndResult(),m([]),y({pointCloudBoxList:[],polygonList:[]})},i=()=>{a==null||a.toolInstance.clearResult(),u==null||u.toolInstance.clearResult()};return{clearAllResult:f,updatePointCloudPattern:l=>{if(l===c)return;const s=[r,a,u];switch(l){case t.Rect:i(),s.forEach(o=>{o==null||o.switchToCanvas(t.PointCloudPolygon),o==null||o.toolInstance.setPattern(d.Rect)}),n(t.Rect);break;case t.Polygon:i(),s.forEach(o=>{o==null||o.switchToCanvas(t.PointCloudPolygon),o==null||o.toolInstance.setPattern(d.Normal)}),n(t.Polygon);break;case t.Point:i(),s.forEach(o=>{o==null||o.switchToCanvas(t.Point)}),n(t.Point);break;case t.Line:i(),s.forEach(o=>{o==null||o.switchToCanvas(t.Line)}),n(t.Line);break}},pointCloudPattern:c}};export{E as useStatus};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as s}from"react";import{PointCloudContext as c}from"../PointCloudContext.js";const m=()=>{const{topViewInstance:o,sideViewInstance:l,backViewInstance:e}=s(c),{zoom:d,setZoom:u}=s(c);return{zoom:d,setZoom:u,initialPosition:()=>{o==null||o.pointCloud2dOperation.initImgPos()},zoomOut:()=>{o==null||o.pointCloud2dOperation.zoomChanged(!1)},zoomIn:()=>{o==null||o.pointCloud2dOperation.zoomChanged(!0)},syncTopviewToolZoom:(n,t,i)=>{o==null||o.toolScheduler.syncPosition(n,t,i,o==null?void 0:o.toolInstance)},syncSideviewToolZoom:(n,t,i)=>{l==null||l.toolScheduler.syncPosition(n,t,i,l==null?void 0:l.toolInstance)},syncBackviewToolZoom:(n,t,i)=>{e==null||e.toolScheduler.syncPosition(n,t,i,e==null?void 0:e.toolInstance)}}};export{m as useZoom};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getClassName as t}from"../../utils/dom.js";import e from"react";import a from"./PointCloud3DView.js";import m from"./PointCloudBackView.js";import u from"./PointCloudTopView.js";import s from"./PointCloudSideView.js";import c from"./PointCloud2DView.js";import d from"./PointCloudListener.js";import{connect as p}from"react-redux";import{LabelBeeContext as C}from"../../store/ctx.js";import{AnnotatedAttributesPanelFixedLeft as P,AnnotatedAttributesPanelFixedRight as f}from"../../views/MainView/toolFooter/AnnotatedAttributes/index.js";const w=({imgList:n,drawLayerSlot:i,checkMode:o,intelligentFit:l})=>n.length===0?null:e.createElement(e.Fragment,null,e.createElement(d,{checkMode:o}),e.createElement("div",{className:t("point-cloud-layout"),onContextMenu:r=>r.preventDefault()},e.createElement("div",{className:t("point-cloud-wrapper")},e.createElement(P,null),e.createElement("div",{className:t("point-cloud-content")},e.createElement("div",{className:t("point-cloud-container","left")},e.createElement(c,null),e.createElement(a,null)),e.createElement("div",{className:t("point-cloud-container","right")},e.createElement(u,{drawLayerSlot:i,checkMode:o,intelligentFit:l}),e.createElement("div",{className:t("point-cloud-container","right-bottom")},e.createElement(s,{checkMode:o}),e.createElement(m,{checkMode:o})))),e.createElement(f,null)))),E=n=>({imgList:n.annotation.imgList});var V=p(E,null,null,{context:C})(w);export{V as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./predictTrackingIcon/index.js";export{default}from"./predictTrackingIcon/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Button as p,message as l}from"antd";import u from"react";import{useTranslation as g}from"react-i18next";import{connect as x}from"react-redux";import h from"../../../assets/predictTracking/icon.svg.js";import{useSingleBox as y}from"../../pointCloudView/hooks/useSingleBox.js";import{ChangeSave as P,GetBoxesByID as v,SetPointCloudLoading as B,SetPredictResult as S,SetPredictResultVisible as k}from"../../../store/annotation/actionCreators.js";import{LabelBeeContext as C,useDispatch as T}from"../../../store/ctx.js";import{predict as I}from"../previewResult/util.js";var j=(i,n,e)=>new Promise((a,c)=>{var d=t=>{try{r(e.next(t))}catch(o){c(o)}},s=t=>{try{r(e.throw(t))}catch(o){c(o)}},r=t=>t.done?a(t.value):Promise.resolve(t.value).then(d,s);r((e=e.apply(i,n)).next())});const D=i=>{const n=T(),{t:e}=g(),{loading:a}=i,{selectedBox:c}=y(),d=()=>j(void 0,null,function*(){if(a)return;const s=c==null?void 0:c.info.trackID;if(!s){l.error(e("BeforePredictStarting"));return}yield n(P);const r=yield n(v(s));if(r.length<2){l.error(e("BeforePredictStarting"));return}const t=r[r.length-2],o=r[r.length-1],m=o.index-t.index;if(m<2){l.error(e("BeforePredictStarting"));return}if(m>8){l.error(e("ThePredictedPointCloud"));return}B(n,!0);const f=I(t,o);S(n,f),k(n,!0)});return u.createElement(p,{type:"link",onClick:d,style:{display:"flex",flexDirection:"column",height:"auto",alignItems:"center"}},u.createElement("img",{src:h,style:{alignSelf:"center"}}),u.createElement("span",{style:{color:"#797979"}},e("ComplementaryTracking")))},w=i=>({loading:i.annotation.loading});var R=x(w,null,null,{context:C})(D);export{R as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import C from"classnames";import n,{useState as j,useRef as S,useEffect as F}from"react";import{useTranslation as _}from"react-i18next";import{connect as L}from"react-redux";import{PointCloudContext as B}from"../../pointCloudView/PointCloudContext.js";import{SetPredictResultVisible as D,SetPredictResult as T,SetPointCloudLoading as v,BatchUpdateImgListResultByPredictResult as I}from"../../../store/annotation/actionCreators.js";import{LabelBeeContext as $,useDispatch as E}from"../../../store/ctx.js";import{getClassName as o}from"../../../utils/dom.js";import{PointCloud as z}from"@labelbee/lb-annotation";import{toolStyleConverter as U}from"@labelbee/lb-utils";import{views as A,sleep as G,getViewsDataUrl as Z}from"./util.js";var q=Object.defineProperty,H=Object.defineProperties,J=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,N=(i,e,t)=>e in i?q(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Q=(i,e)=>{for(var t in e||(e={}))K.call(e,t)&&N(i,t,e[t]);if(k)for(var t of k(e))M.call(e,t)&&N(i,t,e[t]);return i},W=(i,e)=>H(i,J(e)),O=(i,e,t)=>new Promise((d,r)=>{var s=c=>{try{l(t.next(c))}catch(u){r(u)}},a=c=>{try{l(t.throw(c))}catch(u){r(u)}},l=c=>c.done?d(c.value):Promise.resolve(c.value).then(s,a);l((t=t.apply(i,e)).next())});const X=i=>{const{predictionResult:e,predictionResultVisible:t,imgList:d}=i,[r,s]=j([]),a=E(),{t:l}=_(),c=()=>{D(a,!1),T(a,[]),s([])},u=()=>O(void 0,null,function*(){v(a,!0),yield a(I()),v(a,!1),c()});return t?n.createElement(n.Fragment,null,r.length>0&&n.createElement("div",{className:o("point-cloud-predict-tracking-container")},n.createElement("div",{className:o("point-cloud-predict-tracking-container","bar")},n.createElement("div",{className:o("point-cloud-predict-tracking-container","title")},n.createElement("div",null,l("ComplementaryTrackingPrediction"),r.length>0?`\uFF08${r.length}\uFF09`:""),n.createElement("div",{className:o("point-cloud-predict-tracking-container","option")},n.createElement("div",{className:C([o("point-cloud-predict-tracking-container","cancelOption"),o("point-cloud-predict-tracking-container","button")]),onClick:c},l("Cancel")),n.createElement("div",{className:C([o("point-cloud-predict-tracking-container","okOption"),o("point-cloud-predict-tracking-container","button")]),onClick:u},l("Apply")))),n.createElement("div",{className:o("point-cloud-predict-tracking-container","content")},n.createElement(Y,{list:r})))),e.length>0&&n.createElement(ee,{result:e,imgList:d,setList:s})):null},Y=i=>{const{list:e}=i,{t}=_(),d=[t("TopView"),t("SideView"),t("BackView")];return n.createElement(n.Fragment,null,n.createElement("div",{className:o("point-cloud-predict-tracking-container","left")},d.map(r=>n.createElement("div",{className:o("point-cloud-predict-tracking-container","title"),key:r},r))),n.createElement("div",{className:o("point-cloud-predict-tracking-container","right")},e.map(r=>n.createElement("div",{className:o("point-cloud-predict-tracking-container","item"),key:r.id},A.map(s=>{const a=r[s];return n.createElement("div",{className:o("point-cloud-predict-tracking-container","view"),key:`${r.id}-${s}`},n.createElement("img",{src:a}))})))))},ee=i=>{const e=n.useContext(B),t=E(),{result:d,imgList:r,setList:s}=i,a=S(null),l={width:600,height:600};return F(()=>{(()=>O(void 0,null,function*(){var u,h,y,P,w,b;const f=(u=e.mainViewInstance)==null?void 0:u.config;if(f&&a.current){const R={left:-l.width/2,right:l.width/2,top:l.height/2,bottom:-l.height/2,near:200,far:-200},p=new z({container:a.current,isOrthographicCamera:!0,orthographicParams:R,config:f});p.setShowDirection(!1);for(const m of d){const{index:g}=m,x=r[g].url?r[g].url:(w=(P=(y=(h=r[g])==null?void 0:h.webPointCloudFile)==null?void 0:y.lidar)==null?void 0:P.url)!=null?w:"";yield p.loadPCDFileByBox(x,m,{width:2,height:2,depth:2}),yield p.updateCameraZoom(e.zoom);const V=(b=U.getColorFromConfig({attribute:m.attribute},W(Q({},f),{attributeConfigurable:!0}),{}))==null?void 0:b.hex;p.generateBox(m,V),yield G(500),yield Z(p,m,e.zoom),yield p.removeObjectByName(m.id),yield p.clearPointCloudAndRender()}s(d),v(t,!1)}}))()},[]),n.createElement("div",{style:l,ref:a,className:"generate-view"})},te=i=>({predictionResult:i.annotation.predictionResult,predictionResultVisible:i.annotation.predictionResultVisible,imgList:i.annotation.imgList});var ne=L(te,null,null,{context:$})(X);export{ne as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsonParser as E}from"../../../utils/index.js";import{uuid as O}from"@labelbee/lb-annotation";import{EPerspectiveView as f}from"@labelbee/lb-utils";var b=Object.defineProperty,g=Object.defineProperties,I=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,m=(t,e,r)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_=(t,e)=>{for(var r in e||(e={}))B.call(e,r)&&m(t,r,e[r]);if(v)for(var r of v(e))D.call(e,r)&&m(t,r,e[r]);return t},w=(t,e)=>g(t,I(e)),P=(t,e,r)=>new Promise((o,i)=>{var s=n=>{try{c(r.next(n))}catch(l){i(l)}},u=n=>{try{c(r.throw(n))}catch(l){i(l)}},c=n=>n.done?o(n.value):Promise.resolve(n.value).then(s,u);c((r=r.apply(t,e)).next())});const h={width:160,height:110},j=(t,e=2)=>P(void 0,null,function*(){return S(t.domElement,h.width,h.height,e)}),A=(t=300)=>new Promise(e=>{setTimeout(()=>{e("")},t)}),x=[f.Top,f.Left,f.Back],C=(t,e,r)=>P(void 0,null,function*(){for(const o of x)yield t.updateCameraByBox(e,o),e[o]=yield j(t.renderer,r)}),S=(t,e,r,o)=>{if(!t)return"";const i=t.width/2,s=t.height/2,u=i-e/2,c=s-r/2,n=document.createElement("canvas");n.width=e*o,n.height=r*o;const l=n.getContext("2d");return l==null||l.drawImage(t,u,c,e,r,0,0,e*o,r*o),n.toDataURL()},V=(t,e,r)=>{const o=[];return t.forEach((i,s)=>{var u;const c=E(i==null?void 0:i.result),n=(u=c==null?void 0:c[`step_${e}`])==null?void 0:u.result,l=n==null?void 0:n.find(p=>p.trackID===r);l&&o.push(w(_({},l),{index:s}))}),o},L=(t,e)=>{const o=e.index-t.index-1,i=[],s={},u=["x","y","z"],c=["center","depth","height","index","rotation","width"];u.forEach(n=>{s[n]=y(t.center[n],e.center[n],o)}),c.forEach(n=>{n!=="center"&&(s[n]=y(t[n],e[n],o))});for(let n=0;n<o;n++){const l=u.reduce((a,d)=>(a[d]=s[d][n],a),{x:0,y:0,z:0}),p=c.reduce((a,d)=>(d==="center"||(a[d]=s[d][n]),a),w(_({},t),{id:O(),center:l}));i.push(p)}return i},y=(t=0,e=0,r=0)=>{const o=(e-t)/(r+1),i=new Array(r);for(let s=0;s<r;s++)i[s]=t+o*(s+1);return i};export{V as getBoxesByTrackID,C as getViewsDataUrl,L as predict,A as sleep,x as views};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import d from"react";import{connect as m}from"react-redux";import{LabelBeeContext as l,useDispatch as T}from"../../store/ctx.js";import{ANNOTATION_ACTIONS as a}from"../../store/Actions.js";import{PageBackward as g,PageForward as u,PageJump as A}from"../../store/annotation/actionCreators.js";import{TagToolInstanceAdaptor as f}from"../videoPlayer/TagToolInstanceAdaptor.js";const O=o=>{const{imgList:n,imgIndex:r,stepList:s,step:c}=o.annotation,t=T(),p=e=>{t({type:a.SET_TOOL,payload:{instance:e}})},i=()=>{t({type:a.SET_TOOL,payload:{instance:void 0}})};return d.createElement(f,{imgIndex:r,imgList:n,pageBackward:()=>t(g()),pageForward:()=>t(u()),pageJump:e=>t(A(~~e)),onMounted:p,onUnmounted:i,stepList:s,step:c})};var x=m(({annotation:o})=>({annotation:o}),null,null,{context:l})(O);export{x as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import h from"react";import{CommonToolUtils as p,uuid as f}from"@labelbee/lb-annotation";import y from"../../utils/StepUtils.js";import{jsonParser as c}from"../../utils/index.js";import{VideoPlayer as L}from"./index.js";import{VideoTagLayer as R}from"./VideoTagLayer.js";import g from"lodash";import{getKeyCodeNumber as b}from"./utils.js";class S extends h.Component{constructor(i){super(i);this.fns={},this.labelSelectedList=[],this.clearResult=(t=!0,e)=>{const s=e?this.state.tagResult.map(l=>((l==null?void 0:l.result[e])&&delete l.result[e],l)):[];this.setState({tagResult:s},()=>this.emitEvent("render"))},this.exportData=()=>{var t,e,s,l,r,n,o;const a=(e=(t=this.videoRef)==null?void 0:t.duration)!=null?e:0,d=(s=this.videoRef)==null?void 0:s.getVideoPlaybackQuality(),u=d==null?void 0:d.totalVideoFrames,m=(r=(l=this.videoRef)==null?void 0:l.videoWidth)!=null?r:0,v=(o=(n=this.videoRef)==null?void 0:n.videoHeight)!=null?o:0;return[this.state.tagResult,{valid:this.state.valid,duration:a,frames:u,videoWidth:m,videoHeight:v}]},this.emitEvent=t=>{this.fns[t]&&this.fns[t]()},this.combineResult=(t,e={})=>{var s,l;const{isMulti:r}=t,{key:n,value:o}=t.value;if(r){let a=(l=(s=e[n])==null?void 0:s.split(";"))!=null?l:[];a.includes(o)?a=a.filter(u=>u!==o):a.push(o);const d=new Set(a);return e[n]=Array.from(d).join(";"),g.pickBy(e,u=>u)}return e[n]=e[n]===o?void 0:o,g.pickBy(e,a=>a)},this.setResult=t=>{this.setState({tagResult:t}),this.fns.render&&this.fns.render()},this.setLabel=(t,e)=>{this.setLabelBySelectedList(t,e)},this.keydown=t=>{const e=b(t.keyCode);if(e){const s=e-1;if(this.config.inputList.length===1){this.labelSelectedList=[0,s],this.setLabel(0,s),setTimeout(()=>{this.labelSelectedList=[],this.emitEvent("render")},500);return}this.labelSelectedList.length===1?(this.labelSelectedList=[this.labelSelectedList[0],s],this.setLabel(this.labelSelectedList[0],s),setTimeout(()=>{this.labelSelectedList=[],this.emitEvent("render")},500)):(this.labelSelectedList=[s],this.emitEvent("expend"))}},this.setValid=t=>{this.setState({valid:t}),t===!1&&this.setState({tagResult:[]}),this.emitEvent("render")},this.setResultFromImgList=t=>{var e;const{imgList:s,imgIndex:l,step:r}=t;if(!s[l])return;const n=c(s[l].result),o=n[`step_${r}`];this.setState({tagResult:(e=o==null?void 0:o.result)!=null?e:[],valid:(n==null?void 0:n.valid)===void 0?!0:n.valid})},this.state={tagResult:[],labelSelectedList:[],valid:!0}}get config(){const i=y.getCurrentStepInfo(this.props.step,this.props.stepList);return c(i==null?void 0:i.config)}get history(){return{initRecord:()=>{},pushHistory:()=>{}}}get currentTagResult(){var i;return(i=this.state.tagResult[0])!=null?i:{}}get valid(){return this.state.valid}singleOn(i,t){this.fns[i]=t}on(i,t){this.singleOn(i,t)}getTagResultByCode(i,t){var e,s,l;try{const r=(s=(e=this.config)==null?void 0:e.inputList)!=null?s:[],n=r.length>1,o=t!==void 0?i:0,a=t!==void 0?t:i,d=n?r[o]:r[0],u=((l=d.subSelected)!=null?l:[])[a];if(d&&u)return{value:{key:d.value,value:u.value},isMulti:d.isMulti}}catch(r){return}}setLabelBySelectedList(i,t){var e,s,l,r;const n=this.getTagResultByCode(i,t);if(n){const o=this.combineResult(n,(s=(e=this.state.tagResult[0])==null?void 0:e.result)!=null?s:{}),a=[{sourceID:p.getSourceID(),id:(r=(l=this.currentTagResult)==null?void 0:l.id)!=null?r:f(8,62),result:o}];this.setState({tagResult:a},()=>this.emitEvent("render"))}}componentDidMount(){document.addEventListener("keydown",this.keydown),this.props.onMounted(this),this.setResultFromImgList(this.props)}componentWillUnmount(){document.addEventListener("keydown",this.keydown),this.props.onUnmounted()}shouldComponentUpdate(i){return i.imgIndex!==this.props.imgIndex&&this.setResultFromImgList(i),!0}render(){var i;const{imgIndex:t,imgList:e,pageForward:s,pageJump:l,pageBackward:r}=this.props,{tagResult:n,valid:o}=this.state;return h.createElement("div",{style:{height:"100%",width:"100%",position:"relative"}},h.createElement(L,{imgIndex:t,imgList:e,pageBackward:r,pageForward:s,pageJump:l,valid:o,setVideoRef:a=>{this.videoRef=a}}),h.createElement(R,{result:n,inputList:(i=this.config)==null?void 0:i.inputList}))}}export{S as TagToolInstanceAdaptor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o,{useEffect as c}from"react";import{i18n as a}from"@labelbee/lb-utils";import{I18nextProvider as i}from"react-i18next";import{TagToolInstanceAdaptor as p}from"./TagToolInstanceAdaptor.js";var f=Object.defineProperty,n=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,l=(e,r,t)=>r in e?f(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,u=(e,r)=>{for(var t in r||(r={}))m.call(r,t)&&l(e,t,r[t]);if(n)for(var t of n(r))s.call(r,t)&&l(e,t,r[t]);return e};const _=e=>(c(()=>{a.changeLanguage(e.lang)},[e.lang]),o.createElement(i,{i18n:a},o.createElement(p,u({},e))));export{_ as VideoTagTool};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import{result2LabelKey as n}from"./utils.js";const i={position:"absolute",zIndex:20,padding:"0 20px",color:"white",fontSize:15,lineHeight:"32px",background:"rgba(0, 255, 255, 0.32)",top:0,right:0,maxHeight:"calc(100% - 80px)",overflowY:"scroll"},c=({result:r,inputList:l})=>{const a=n(r,l);return e.createElement("div",{style:i},e.createElement("table",null,e.createElement("tbody",null,a.map(({keyLabel:t,valuesLabelArray:o})=>e.createElement("tr",{key:t},e.createElement("td",{style:{paddingRight:8}},`${t}:`),e.createElement("td",null,`${o.join("\u3001")}`))))))};export{c as VideoTagLayer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import{getClassName as o}from"../../../../utils/dom.js";import{PauseOutlined as y,CaretRightOutlined as N,CaretUpOutlined as C,CaretDownOutlined as T}from"@ant-design/icons";import{VideoPlayerCtx as c}from"../../index.js";import{Pagination as x}from"../../../../views/MainView/toolFooter/Pagination.js";import P from"../../../../assets/annotation/video/icon_keyboard_h.svg.js";import h from"../../../../views/MainView/toolFooter/FooterTips/ToolHotKey/index.js";import{useTranslation as u}from"react-i18next";import{decimalReserved as d}from"../../utils.js";import{cTool as w}from"@labelbee/lb-annotation";const{EVideoToolName:V}=w,p=t=>{const n=Math.floor(t/60),r=~~(t%60).toFixed(),a=(t*10).toString().split("").pop(),l=s=>s<10?`0${s}`:s;return`${l(n)}:${l(r)}:${a}`},k=()=>{const{currentTime:t,duration:n,buffered:r,setCurrentTime:a}=e.useContext(c),l=e.useRef(null),s=`${d(r/n*100,1)}%`,m=`${d(t/n*100,1)}%`,v=i=>{if(l.current){const E=i.clientX,f=l.current.clientWidth,g=d(E/f*n,1);a(g)}};return e.createElement("div",{className:o("video-progress"),ref:l,onClick:i=>{i.stopPropagation(),i.nativeEvent.stopImmediatePropagation(),v(i)}},e.createElement("div",{className:o("video-slider")},e.createElement("div",{className:o("video-slider","played"),style:{width:m}}),e.createElement("div",{className:o("video-slider","loaded"),style:{width:s}}),e.createElement("div",{className:o("video-slider","played"),style:{width:m}})),e.createElement("div",{className:o("video-slider-bar"),style:{left:m}}))},b=()=>{const{updateNextPlaybackRate:t,playbackRate:n}=e.useContext(c),{t:r}=u();return e.createElement("span",{className:o("video-controller","speed")},e.createElement("span",null,r("Speed")),e.createElement("span",{className:o("video-controller","speedNum")},`${n}x`),e.createElement("span",{className:o("video-controller","speedButton")},e.createElement(C,{onClick:()=>{t()}}),e.createElement(T,{onClick:()=>{t(!1)}})))},$=()=>{const{t}=u();return e.createElement(h,{title:e.createElement("span",{className:o("video-controller","hotkey")},e.createElement("img",{src:P}),t("Hotkeys")),style:{},toolName:V.VideoTagTool})},R=()=>{const{imgIndex:t,imgList:n,pageBackward:r,pageJump:a,pageForward:l}=e.useContext(c);return e.createElement(x,{isVideo:!0,pageBackward:r,imgIndex:t,pageJump:a,totalPage:n.length,pageForward:l,footerCls:o("video-controller")})},j=()=>{const{currentTime:t,duration:n}=e.useContext(c),r=n*10-t*10,a=(r>0?r:0)/10;return e.createElement("div",{className:o("video-controller","time")},`${p(t)} / -${p(a)}`)},F=()=>{const{playPause:t,isPlay:n}=e.useContext(c);return e.createElement("div",{className:o("video-controller","wrapper")},e.createElement(k,null),e.createElement("div",{className:o("video-controller")},e.createElement("span",{onClick:()=>{t()},className:o("video-controller","playButton")},n?e.createElement(y,null):e.createElement(N,null)),e.createElement(j,null),e.createElement(b,null),e.createElement("div",{className:o("video-controller","holder")}),e.createElement(R,null),e.createElement($,null)))};export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"react";import D from"./components/controller/index.js";import{getClassName as d}from"../../utils/dom.js";import{cKeyCode as I}from"@labelbee/lb-annotation";import{decimalReserved as h}from"./utils.js";import N from"../fileException/index.js";const s=I.default,u=r.createContext({isPlay:!1,playPause:()=>{},updateNextPlaybackRate:()=>{},playbackRate:1,currentTime:0,duration:0,buffered:0,setCurrentTime:()=>{},imgList:[],imgIndex:-1,pageBackward:()=>{},pageJump:f=>{},pageForward:()=>{}}),L=50,m=.1,l=[.5,1,1.5,2,4,6,8,16];class c extends r.Component{constructor(i){super(i);this.changePlaybackPate=e=>{this.videoElm&&(this.videoElm.playbackRate=e,this.setState({playbackRate:e}))},this.playPause=()=>{var e,t,a;((e=this.videoElm)==null?void 0:e.paused)?(t=this.videoElm)==null||t.play():(a=this.videoElm)==null||a.pause()},this.updateNextPlaybackRate=(e=!0)=>{const t=l.findIndex(o=>o===this.state.playbackRate);let a=e?Math.min(t+1,l.length-1):Math.max(t-1,0);this.changePlaybackPate(l[a])},this.fastForward=()=>{this.videoElm&&this.setCurrentTime(this.videoElm.currentTime+m)},this.rewind=()=>{this.videoElm&&this.setCurrentTime(this.videoElm.currentTime-m)},this.keydown=e=>{e.keyCode===s.Space&&(e.preventDefault(),this.playPause()),e.keyCode===s.Up&&(e.preventDefault(),this.updateNextPlaybackRate()),e.keyCode===s.Down&&(e.preventDefault(),this.updateNextPlaybackRate(!1)),e.keyCode===s.Left&&(e.preventDefault(),this.rewind()),e.keyCode===s.Right&&(e.preventDefault(),this.fastForward())},this.onPlay=()=>{this.setState({isPlay:!0},this.onVideoStart)},this.onPause=()=>{this.onVideoStopped()},this.onVideoStopped=()=>{this.setState({isPlay:!1}),this.timeInterval&&(clearInterval(this.timeInterval),this.timeInterval=void 0),this.videoElm&&this.setCurrentTime(this.videoElm.currentTime)},this.onVideoStart=()=>{this.timeInterval=window.setInterval(()=>{var e,t,a;if(this.videoElm)try{if(((e=this.videoElm)==null?void 0:e.buffered.length)>0){const o=(t=this.videoElm)==null?void 0:t.buffered.end(0);this.setState({currentTime:h((a=this.videoElm)==null?void 0:a.currentTime,1),buffered:o})}}catch(o){console.error(o)}},L)},this.resetVideoData=()=>{this.setState({currentTime:0,buffered:0,error:!1,isPlay:!1}),this.videoElm&&(this.videoElm.playbackRate=this.state.playbackRate),this.onVideoStopped()},this.setDuration=()=>{var e;if(this.videoElm){const t=h((e=this.videoElm)==null?void 0:e.duration,1);this.setState({duration:t})}},this.setCurrentTime=e=>{this.videoElm&&(this.videoElm.currentTime=e,this.setState({currentTime:e}))},this.reload=()=>{var e;(e=this.videoElm)==null||e.load()},this.onError=()=>{this.resetVideoData(),this.setState({error:!0})},this.state={playbackRate:1,currentTime:0,isPlay:!1,duration:0,buffered:0,error:!1},this.videoRef=r.createRef()}get videoElm(){var i;return(i=this.videoRef)==null?void 0:i.current}get videoSrc(){var i,e;const{imgIndex:t,imgList:a}=this.props;return t>-1&&(e=(i=a[t])==null?void 0:i.url)!=null?e:""}componentDidMount(){var i,e;window.addEventListener("keydown",this.keydown),((i=this.videoRef)==null?void 0:i.current)&&this.props.setVideoRef&&this.props.setVideoRef((e=this.videoRef)==null?void 0:e.current)}componentWillUnmount(){window.removeEventListener("keydown",this.keydown)}render(){const{isPlay:i,playbackRate:e,currentTime:t,duration:a,buffered:o,error:v}=this.state,{imgList:p,imgIndex:y,pageBackward:E,pageJump:P,pageForward:R,valid:b}=this.props,{playPause:n,updateNextPlaybackRate:k,onPause:g,onPlay:w,resetVideoData:C,setDuration:x,setCurrentTime:T,onError:S,videoRef:_,videoSrc:V}=this;return r.createElement(u.Provider,{value:{videoRef:this.videoRef,isPlay:i,playPause:n,updateNextPlaybackRate:k,playbackRate:e,currentTime:t,duration:a,buffered:o,setCurrentTime:T,imgIndex:y,imgList:p,pageBackward:E,pageJump:P,pageForward:R}},r.createElement("div",{className:d("video-wrapper")},r.createElement("div",{className:d("video-container")},r.createElement("video",{ref:_,className:d("video"),src:V,onPause:g,onPlay:w,onLoadedMetadata:C,onError:S,onDurationChange:x,width:"100%",height:"100%",onClick:n}),r.createElement(N,{fileType:"video",errorProps:{reloadImage:this.reload,backgroundColor:"#e2e2e2",ignoreOffsetY:!0,isError:v},invalidProps:{isValid:b}})),r.createElement(D,null)))}}export{c as VideoPlayer,u as VideoPlayerCtx,c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=(e,r,l)=>{const a=l.find(n=>n.value===e),u=a.subSelected.find(n=>n.value===r);return{keyLabel:a.key,valueLabel:u.key}},c=(e,r)=>e.sort((l,a)=>{const u=r.findIndex(t=>l===t.value),n=r.findIndex(t=>a===t.value);return u-n}),f=(e,r)=>{var l;try{return(l=e==null?void 0:e.reduce((a,u)=>(c(Object.keys(u.result),r).forEach(n=>{var t;const s=(t=u.result[n])==null?void 0:t.split(";");b(s,n,r,a)}),a),[]))!=null?l:[]}catch(a){return[]}},b=(e,r,l,a)=>{e.forEach(u=>{const{keyLabel:n,valueLabel:t}=o(r,u,l),s=a.find(d=>d.keyLabel===n);s?s.valuesLabelArray.push(t):a.push({keyLabel:n,valuesLabelArray:[t]})})},i=e=>e<=57&&e>=49?e-48:e<=105&&e>=97?e-96:0,v=(e,r=2)=>typeof e=="number"?parseFloat(e.toFixed(r)):e;export{v as decimalReserved,o as findTagLabel,i as getKeyCodeNumber,f as result2LabelKey,c as tagsSortThruInputList};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createStore as r,applyMiddleware as e}from"redux";import o from"redux-thunk";import{rootReducer as t}from"./store/index.js";function u(){return r(t,e(o))}export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c;(function(a){a[a.Check=0]="Check",a[a.ANNOTATION=1]="ANNOTATION",a[a.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",a[a.PRE_ANNOTATION=3]="PRE_ANNOTATION",a[a.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"})(c||(c={}));var N;(function(a){a[a.Backward=1]="Backward",a[a.Forward=2]="Forward",a[a.Jump=3]="Jump",a[a.Quit=4]="Quit",a[a.Export=5]="Export",a[a.StepChanged=6]="StepChanged",a[a.Save=7]="Save",a[a.BatchUpdateTrackID=8]="BatchUpdateTrackID",a[a.BatchUpdateImgList=9]="BatchUpdateImgList",a[a.SyncImgList=10001]="SyncImgList",a[a.SyncCurrentPageData=10002]="SyncCurrentPageData"})(N||(N={}));const n="bee",r=`${n}-component`;export{c as EStepType,N as ESubmitType,r as componentCls,n as prefix};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r='{"color":1,"width":2,"borderOpacity":9,"fillOpacity":9,"toolColor":{"1":{"valid":{"stroke":"rgba(0,0,255,0.50)","fill":"rgba(0,0,255,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validSelected":{"stroke":"rgba(0,15,255,1.00)","fill":"rgba(0,15,255,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,0.80)","fill":"rgba(255,153,102,0.19)"},"validHover":{"stroke":"rgba(0,15,255,0.80)","fill":"rgba(0,15,255,0.51)"},"invalidHover":{"stroke":"rgba(255,153,102,0.50)","fill":"rgba(255,153,102,0.32)"}},"3":{"valid":{"stroke":"rgba(0,255,255,0.50)","fill":"rgba(0,255,255,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validSelected":{"stroke":"rgba(0,212,255,1.00)","fill":"rgba(0,212,255,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,0.80)","fill":"rgba(255,153,102,0.19)"},"validHover":{"stroke":"rgba(0,212,255,0.80)","fill":"rgba(0,212,255,0.51)"},"invalidHover":{"stroke":"rgba(255,153,102,0.50)","fill":"rgba(255,153,102,0.32)"}},"5":{"valid":{"stroke":"rgba(0,255,0,0.50)","fill":"rgba(0,255,0,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validSelected":{"stroke":"rgba(149,255,1.00)","fill":"rgba(149,255,0,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,0.80)","fill":"rgba(255,153,102,0.19)"},"validHover":{"stroke":"rgba(149,255,0,0.80)","fill":"rgba(149,255,0,0.51)"},"invalidHover":{"stroke":"rgba(255,153,102,0.50)","fill":"rgba(255,153,102,0.32)"}},"7":{"valid":{"stroke":"rgba(255,255,0,0.50)","fill":"rgba(255,255,0,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validSelected":{"stroke":"rgba(255,230,102,1.00)","fill":"rgba(255,213,0,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,0.80)","fill":"rgba(255,153,102,0.19)"},"validHover":{"stroke":"rgba(255,230,102,0.80)","fill":"rgba(255,230,102,0.51)"},"invalidHover":{"stroke":"rgba(255,153,102,0.50)","fill":"rgba(255,153,102,0.32)"}},"9":{"valid":{"stroke":"rgba(255,0,255,0.50)","fill":"rgba(255,0,255,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validSelected":{"stroke":"rgba(230,102,255,1.00)","fill":"rgba(213,0,255,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,0.80)","fill":"rgba(255,153,102,0.19)"},"validHover":{"stroke":"rgba(230,102,255,0.80)","fill":"rgba(230,102,255,0.51)"},"invalidHover":{"stroke":"rgba(255,153,102,0.50)","fill":"rgba(255,153,102,0.32)"}}},"attributeColor":[{"valid":{"stroke":"rgba(204,204,204,1.00)","fill":"rgba(204,204,204,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(204,204,204,1.00)","fill":"rgba(204,204,204,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(204,204,204,1.00)","fill":"rgba(204,204,204,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(128,12,249,1.00)","fill":"rgba(128,12,249,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(128,12,249,1.00)","fill":"rgba(128,12,249,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(128,12,249,1.00)","fill":"rgba(128,12,249,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(0,255,48,1.00)","fill":"rgba(0,255,48,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(0,255,48,1.00)","fill":"rgba(0,255,48,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(0,255,48,1.00)","fill":"rgba(0,255,48,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(255,136,247,1.00)","fill":"rgba(255,136,247,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(255,136,247,1.00)","fill":"rgba(255,136,247,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(255,136,247,1.00)","fill":"rgba(255,136,247,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(255,226,50,1.00)","fill":"rgba(255,226,50,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(255,226,50,1.00)","fill":"rgba(255,226,50,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(255,226,50,1.00)","fill":"rgba(255,226,50,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(153,66,23,1.00)","fill":"rgba(153,66,23,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(153,66,23,1.00)","fill":"rgba(153,66,23,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(153,66,23,1.00)","fill":"rgba(153,66,23,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(2,130,250,1.00)","fill":"rgba(2,130,250,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(2,130,250,1.00)","fill":"rgba(2,130,250,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(2,130,250,1.00)","fill":"rgba(2,130,250,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(255,35,35,1.00)","fill":"rgba(255,35,35,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(255,35,35,1.00)","fill":"rgba(255,35,35,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(255,35,35,1.00)","fill":"rgba(255,35,35,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}},{"valid":{"stroke":"rgba(0,255,234,1.00)","fill":"rgba(0,255,234,0.32)"},"invalid":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.32)"},"validSelected":{"stroke":"rgba(0,255,234,1.00)","fill":"rgba(0,255,234,0.64)"},"invalidSelected":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"},"validHover":{"stroke":"rgba(0,255,234,1.00)","fill":"rgba(0,255,234,0.64)"},"invalidHover":{"stroke":"rgba(255,153,102,1.00)","fill":"rgba(255,153,102,0.64)"}}],"lineColor":{"1":"rgba(102, 111, 255, 1 )","3":"rgba(102, 230, 255, 1)","5":"rgba(191, 255, 102, 1)","7":"rgba(255, 230, 102, 1)","9":"rgba(230, 102, 255, 1)"},"attributeLineColor":["rgba(204, 204, 204, 1)","rgba(128, 12, 249, 1)","rgba(0, 255, 48, 1)","rgba(255, 136, 247, 1)","rgba(255, 226, 50, 1)","rgba(153, 66, 23, 1)","rgba(2, 130, 250, 1)","rgba(255, 35, 35, 1)","rgba(0, 255, 234, 1)"]}';export{r as default};
|
package/es/data/Style.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r=["rgba(128, 12, 249, 1)","rgba(0, 255, 48, 1)","rgba(255, 136, 247, 1)","rgba(255, 226, 50, 1)","rgba(153, 66, 23, 1)","rgba(2, 130, 250, 1)","rgba(255, 35, 35, 1)","rgba(0, 255, 234, 1)"],a="rgba(204, 204, 204, 1)",b={valid:{stroke:"rgba(102, 111, 255, 0.6)",fill:"rgba(102, 111, 255, 0.3)"},invalid:{stroke:"rgba(255, 153, 102,1)",fill:"rgba(255, 153, 102, 0.5)"},validSelected:{stroke:"rgba(0, 15, 255, 0.8)",fill:"rgba(0, 15, 255, 0.4)"},invalidSelected:{stroke:"rgba(255,153,102,0.8)",fill:"rgba(255,153,102,0.3)"},validHover:{stroke:"rgba(0, 15, 255, 1)",fill:"rgba(0, 15, 255, 0.5)"},invalidHover:{stroke:"rgba(255,153,102,1)",fill:"rgba(255,153,102,0.5)"}},g={1:{valid:"rgba(0, 0, 255, 0.5)",select:{stroke:"rgba(0, 15, 255, 1)",fill:"rgba(0,15,255, 1)"},hover:"rgba(0, 15, 255, 0.8)",line:"rgba(102, 111, 255, 1 )"},3:{valid:"rgba(0, 255, 255, 0.5)",select:{stroke:"rgba(0, 212, 255, 1)",fill:"rgba(0,212,255, 1)"},hover:"rgba(0, 212, 255, 0.8)",line:"rgba(102, 230, 255, 1)"},5:{valid:"rgba(0, 255, 0, 0.5)",select:{stroke:"rgba(149, 255, 1)",fill:"rgba(149,255,0, 1)"},hover:"rgba(149, 255, 0, 0.8)",line:"rgba(191, 255, 102, 1)"},7:{valid:"rgba(255, 255, 0, 0.5)",select:{stroke:"rgba(255, 230, 102, 1)",fill:"rgba(255,213,0, 1)"},hover:"rgba(255, 230, 102, 0.8)",line:"rgba(255, 230, 102, 1)"},9:{valid:"rgba(255, 0, 255, 0.5)",select:{stroke:"rgba(230, 102, 255, 1)",fill:"rgba(213,0,255, 1)"},hover:"rgba(230, 102, 255, 0.8)",line:"rgba(230, 102, 255, 1)"}},l={0:0,1:.2,3:.4,5:.6,7:.8,9:1,10:1},e={1:0,3:.2,5:.4,7:.6,9:.8,10:1};export{l as BORDER_OPACITY_LEVEL,g as CHANGE_COLOR,r as COLORS_ARRAY,b as DEFAULT_COLOR,e as FILL_OPACITY_LEVEL,a as NULL_COLOR};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const O=61,d=40,i=240,n=320;var A;(function(N){N[N.ANNOTATION=1]="ANNOTATION",N[N.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",N[N.PRE_ANNOTATION=3]="PRE_ANNOTATION",N[N.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"})(A||(A={}));var o;(function(N){N[N.Backward=0]="Backward",N[N.Forward=1]="Forward",N[N.Jump=2]="Jump"})(o||(o={}));var I;(function(N){N[N.Start=0]="Start",N[N.Stop=1]="Stop",N[N.Wait=2]="Wait"})(I||(I={}));var c;(function(N){N[N.Point=0]="Point",N[N.Line=1]="Line",N[N.Plane=2]="Plane"})(c||(c={}));export{I as EDragStatus,c as EDragTarget,o as EPageTurningOperation,A as EStepType,n as editStepWidth,d as footerHeight,O as headerHeight,i as sidebarWidth};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o;(function(n){n[n.Scribble=1]="Scribble",n[n.Erase=2]="Erase"})(o||(o={}));var t;(function(n){n.Rect="rectTool",n.Tag="tagTool",n.Point="pointTool",n.PointMarker="pointMarkerTool",n.Segmentation="segmentationTool",n.Filter="filterTool",n.Text="textTool",n.Polygon="polygonTool",n.Line="lineTool",n.LineMarker="lineMarkerTool",n.Empty="emptyTool",n.FolderTag="folderTagTool",n.RectTrack="rectTrackTool",n.ScribbleTool="scribbleTool",n.Face="faceTool",n.ClientAttribute="clientAttributeTool",n.OCRRelation="OCRRelationTool",n.SegmentByRect="segmentByRectTool",n.Cuboid="cuboidTool",n.PointCloudPolygon="pointCloudPolygon"})(t||(t={}));var r;(function(n){n[n.AnyString=0]="AnyString",n[n.Order=1]="Order",n[n.EnglishOnly=2]="EnglishOnly",n[n.NumberOnly=3]="NumberOnly",n[n.CustomFormat=4]="CustomFormat"})(r||(r={}));const i=1e3;export{o as EScribblePattern,r as ETextType,t as EToolName,i as TEXT_ATTRIBUTE_MAX_LENGTH};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useRef as i,useEffect as l}from"react";import{useDispatch as c}from"../store/ctx.js";import{ANNOTATION_ACTIONS as n}from"../store/Actions.js";const d=({basicInfo:e}={})=>{var o;const r=c(),s=i({valid:(o=e==null?void 0:e.valid)!=null?o:!0,exportData:()=>[[],{}],exportCustomData:()=>({}),clearResult:()=>{},singleOn:()=>{},on:()=>{},unbind:()=>{},setResult:()=>{},history:{initRecord:()=>{},pushHistory:()=>{}},setDefaultAttribute:t=>{},setForbidOperation:()=>{},setShowDefaultCursor:()=>{},setSubAttribute:(t,p)=>{},setValid:()=>{},updateRotate:()=>{},redo:()=>{},undo:()=>{}}),u=t=>{r({type:n.SET_TOOL,payload:{instance:t}})},a=()=>{r({type:n.SET_TOOL,payload:{instance:void 0}})};return l(()=>(u(s.current),()=>{a()}),[]),{toolInstanceRef:s}};export{d as useCustomToolInstance};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useRef as s,useState as u,useCallback as o,useEffect as m}from"react";const f=t=>{const e=s(0),[a,r]=u(t),n=o(c=>{cancelAnimationFrame(e.current),e.current=requestAnimationFrame(()=>{r(c)})},[]);return m(()=>()=>cancelAnimationFrame(e.current),[]),[a,n]};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useRef as f,useEffect as t}from"react";const c=e=>{const r=f(e);return t(()=>{r.current=e},[e]),r};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"react";import o from"./useUnmountedRef.js";function f(e){const n=o(),[u,r]=t.useState(e),s=t.useCallback(a=>{n.current||r(a)},[]);return[u,s]}export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useLayoutEffect as c}from"react";import f from"resize-observer-polyfill";import{getTargetElement as l}from"../utils/dom.js";import h from"./useRafState.js";function m(i){const[a,u]=h(()=>{var e,t;const r=l(i);return{width:(e=(r||{}).clientWidth)!=null?e:0,height:(t=(r||{}).clientHeight)!=null?t:0}});return c(()=>{const e=l(i);if(!e)return()=>{};const t=new f(r=>{r.forEach(s=>{var n,o;u({width:(n=s.target.clientWidth)!=null?n:0,height:(o=s.target.clientHeight)!=null?o:0})})});return t.observe(e),()=>{t.disconnect()}},[i]),a}export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useRef as t,useEffect as r}from"react";const u=()=>{const e=t(!1);return r(()=>(e.current=!1,()=>{e.current=!0}),[]),e};export{u as default};
|