@labelbee/lb-components 1.23.0-alpha.44 → 1.23.0-alpha.45

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.
@@ -0,0 +1 @@
1
+ "use strict";require("react");var img="data:image/svg+xml,%3csvg t='1717751173252' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='3511' width='16' height='16'%3e %3cpath d='M490.666667 59.733333C240.896 59.733333 38.4 262.229333 38.4 512c0 249.770667 202.496 452.266667 452.266667 452.266667a452.266667 452.266667 0 0 0 406.954666-254.72 25.6 25.6 0 0 0-46.08-22.4A401.066667 401.066667 0 1 1 891.733333 512a25.6 25.6 0 0 0 51.242667 0c0-249.770667-202.496-452.266667-452.266667-452.266667z' fill='black' p-id='3512' %3e%3c/path%3e %3cpath d='M917.333333 192a21.333333 21.333333 0 0 0-20.992 17.493333L896 213.333333v298.666667a21.333333 21.333333 0 0 0 42.325333 3.84L938.666667 512V213.333333a21.333333 21.333333 0 0 0-21.333334-21.333333z' fill='black' p-id='3513' %3e%3c/path%3e %3cpath d='M322.688 523.093333c-29.568 0-45.696-20.736-45.696-56.832 0-36.864 19.2-58.752 43.392-58.752 30.72 0 51.84 25.344 56.064 81.024-16.896 24.576-36.48 34.56-53.76 34.56z m-82.176 113.28c16.512 16.896 39.552 29.952 72.192 29.952 54.528 0 105.216-44.544 105.216-155.904 0-93.312-43.776-137.088-97.92-137.088-45.696 0-84.096 36.864-84.096 92.928 0 59.136 31.872 88.704 79.104 88.704 21.504 0 45.696-12.672 62.208-33.024-2.688 80.64-32.256 108.288-66.432 108.288-18.048 0-35.328-8.448-46.464-21.12l-23.808 27.264zM547.712 666.325333c55.296 0 91.392-49.152 91.392-147.456 0-97.536-36.096-145.536-91.392-145.536-55.68 0-91.392 47.616-91.392 145.536 0 98.304 35.712 147.456 91.392 147.456z m0-34.944c-28.8 0-49.152-30.72-49.152-112.512 0-81.024 20.352-110.592 49.152-110.592 28.8 0 49.152 29.568 49.152 110.592 0 81.792-20.352 112.512-49.152 112.512zM730.88 480.085333c31.104 0 56.832-23.04 56.832-57.216 0-34.176-25.728-57.216-56.832-57.216-30.336 0-56.448 23.04-56.448 57.216 0 34.176 26.112 57.216 56.448 57.216z m0-23.04c-18.432 0-31.104-14.208-31.104-34.176 0-20.352 12.672-34.56 31.104-34.56 18.816 0 31.488 14.208 31.488 34.56 0 19.968-12.672 34.176-31.488 34.176z' fill='black' p-id='3514' %3e%3c/path%3e%3c/svg%3e";module.exports=img;
@@ -0,0 +1,26 @@
1
+ <svg
2
+ t="1717751173252"
3
+ class="icon"
4
+ viewBox="0 0 1024 1024"
5
+ version="1.1"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ p-id="3511"
8
+ width="24"
9
+ height="24"
10
+ >
11
+ <path
12
+ d="M490.666667 59.733333C240.896 59.733333 38.4 262.229333 38.4 512c0 249.770667 202.496 452.266667 452.266667 452.266667a452.266667 452.266667 0 0 0 406.954666-254.72 25.6 25.6 0 0 0-46.08-22.4A401.066667 401.066667 0 1 1 891.733333 512a25.6 25.6 0 0 0 51.242667 0c0-249.770667-202.496-452.266667-452.266667-452.266667z"
13
+ fill="#ffffff"
14
+ p-id="3512"
15
+ ></path>
16
+ <path
17
+ d="M917.333333 192a21.333333 21.333333 0 0 0-20.992 17.493333L896 213.333333v298.666667a21.333333 21.333333 0 0 0 42.325333 3.84L938.666667 512V213.333333a21.333333 21.333333 0 0 0-21.333334-21.333333z"
18
+ fill="#ffffff"
19
+ p-id="3513"
20
+ ></path>
21
+ <path
22
+ d="M322.688 523.093333c-29.568 0-45.696-20.736-45.696-56.832 0-36.864 19.2-58.752 43.392-58.752 30.72 0 51.84 25.344 56.064 81.024-16.896 24.576-36.48 34.56-53.76 34.56z m-82.176 113.28c16.512 16.896 39.552 29.952 72.192 29.952 54.528 0 105.216-44.544 105.216-155.904 0-93.312-43.776-137.088-97.92-137.088-45.696 0-84.096 36.864-84.096 92.928 0 59.136 31.872 88.704 79.104 88.704 21.504 0 45.696-12.672 62.208-33.024-2.688 80.64-32.256 108.288-66.432 108.288-18.048 0-35.328-8.448-46.464-21.12l-23.808 27.264zM547.712 666.325333c55.296 0 91.392-49.152 91.392-147.456 0-97.536-36.096-145.536-91.392-145.536-55.68 0-91.392 47.616-91.392 145.536 0 98.304 35.712 147.456 91.392 147.456z m0-34.944c-28.8 0-49.152-30.72-49.152-112.512 0-81.024 20.352-110.592 49.152-110.592 28.8 0 49.152 29.568 49.152 110.592 0 81.792-20.352 112.512-49.152 112.512zM730.88 480.085333c31.104 0 56.832-23.04 56.832-57.216 0-34.176-25.728-57.216-56.832-57.216-30.336 0-56.448 23.04-56.448 57.216 0 34.176 26.112 57.216 56.448 57.216z m0-23.04c-18.432 0-31.104-14.208-31.104-34.176 0-20.352 12.672-34.56 31.104-34.56 18.816 0 31.488 14.208 31.488 34.56 0 19.968-12.672 34.176-31.488 34.176z"
23
+ fill="#ffffff"
24
+ p-id="3514"
25
+ ></path>
26
+ </svg>
@@ -1 +1 @@
1
- "use strict";var PointCloudContext=require("./PointCloudContext.js"),useRotate=require("./hooks/useRotate.js"),useBoxes=require("./hooks/useBoxes.js"),useSingleBox=require("./hooks/useSingleBox.js"),useSphere=require("./hooks/useSphere.js"),React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),antd=require("antd"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),useStatus=require("./hooks/useStatus.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),ctx=require("../../store/ctx.js"),useHistory=require("./hooks/useHistory.js"),useAttribute=require("./hooks/useAttribute.js"),useConfig=require("./hooks/useConfig.js"),usePolygon=require("./hooks/usePolygon.js"),useLine=require("./hooks/useLine.js"),reactI18next=require("react-i18next"),actionCreators=require("../../store/annotation/actionCreators.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(l,r,u)=>r in l?__defProp(l,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[r]=u,__spreadValues=(l,r)=>{for(var u in r||(r={}))__hasOwnProp.call(r,u)&&__defNormalProp(l,u,r[u]);if(__getOwnPropSymbols)for(var u of __getOwnPropSymbols(r))__propIsEnum.call(r,u)&&__defNormalProp(l,u,r[u]);return l},__spreadProps=(l,r)=>__defProps(l,__getOwnPropDescs(r));const{EPolygonPattern}=lbAnnotation.cTool,PointCloudListener=({currentData:l,config:r,checkMode:u,configString:B,imgIndex:f,toolInstanceRef:a})=>{const t=React.useContext(PointCloudContext.PointCloudContext),{changeSelectedBoxValid:L,selectNextBox:E,selectPrevBox:O,updateSelectedBox:m,deleteSelectedPointCloudBoxAndPolygon:q}=useSingleBox.useSingleBox(),{selectedSphere:P,updatePointCloudSphere:A}=useSphere.useSphere(),{clearAllResult:y,updatePointCloudPattern:j}=useStatus.useStatus(),{copySelectedBoxes:I,pasteSelectedBoxes:T,copiedBoxes:D}=useBoxes.useBoxes({config:r}),{updateRotate:w}=useRotate.useRotate({currentData:l}),{updatePointCloudData:v,topViewSelectedChanged:g}=usePointCloudViews.usePointCloudViews(),{redo:S,undo:h,pushHistoryWithList:N,pushHistoryUnderUpdatePolygon:H,pushHistoryUnderUpdateLine:K}=useHistory.useHistory(),U=ctx.useDispatch(),{syncThreeViewsAttribute:x}=useAttribute.useAttribute(),{syncAllViewsConfig:R,reRenderTopViewRange:z}=useConfig.useConfig(),{selectedPolygon:k}=usePolygon.usePolygon(),{selectedLine:_}=useLine.useLine(),{t:C}=reactI18next.useTranslation(),b=e=>{var o;const{topViewInstance:s}=t;!s||(o=s.pointCloud2dOperation)==null||o.updateSelectedPolygonsPoints(e)},F=(e,o)=>{var s,i;const{topViewInstance:c,mainViewInstance:n}=t;if(!c)return;const{pointCloud2dOperation:d}=c;switch(e){case"q":{w(t.rectRotateSensitivity);break}case"e":w(-Number(t.rectRotateSensitivity));break;case"g":w(180);break;case"u":{const p=d.pattern===EPolygonPattern.Normal?lbAnnotation.EToolName.Rect:lbAnnotation.EToolName.Polygon;j(p);const M={[lbAnnotation.EToolName.Polygon]:C("PolygonPattern"),[lbAnnotation.EToolName.Rect]:C("RectPattern")};antd.message.success(C("ChangePatternMsg",{pattern:M[p]})),d.clearActiveStatus(),d.clearDrawingStatus()}break;case"+":n==null||n.updatePointSize({zoomIn:!0});break;case"-":n==null||n.updatePointSize({zoomIn:!1});break;case"v":t.setPointCloudValid(!t.valid);break;case"tab":if(o.shiftKey){O();break}E(),o.preventDefault();break;case"f":L();break;case"arrowup":b({y:-1});break;case"arrowdown":b({y:1});break;case"arrowleft":b({x:-1});break;case"arrowright":b({x:1});break;case"delete":q();break;default:{if(((s=r.attributeList)==null?void 0:s.length)>0){const p=lbAnnotation.AttributeUtils.getAttributeByKeycode(o.keyCode,r.attributeList);p!==void 0&&((i=a.current)==null||i.setDefaultAttribute(p))}return}}},G=(e,o)=>{switch(e){case"c":I();break;case"v":T();break;case"a":o.preventDefault(),t.selectedAllBoxes();break;case"z":{o.shiftKey?S():h();break}}},V=e=>{if(!lbAnnotation.CommonToolUtils.hotkeyFilter(e)||u===!0)return;const o=e.key.toLocaleLowerCase();if(e.ctrlKey){G(o,e);return}F(o,e)};return React.useEffect(()=>{const{topViewInstance:e}=t;if(!!e)return window.addEventListener("keydown",V),()=>{window.removeEventListener("keydown",V)}},[t,D,r,t.pointCloudBoxList,t.polygonList]),React.useEffect(()=>{R(r)},[B]),React.useEffect(()=>{(r==null?void 0:r.radius)&&z(r==null?void 0:r.radius)},[r==null?void 0:r.radius]),React.useEffect(()=>{v==null||v()},[f,t.mainViewInstance]),React.useEffect(()=>{t.setHideAttributes([])},[f]),React.useEffect(()=>{a.current.setDefaultAttribute=e=>{var o,s,i,c;x(e);const n=t.selectedPointCloudBox;if(n){n.attribute=e;const d=U(actionCreators.PreDataProcess({tool:lbAnnotation.EPointCloudName.PointCloud,dataList:[n],stepConfig:r,action:"viewUpdateBox"}));n.valid=d[0].valid;const p=m(n);(i=(s=(o=t==null?void 0:t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null?void 0:s.setPolygonValidAndRender)==null||i.call(s,n.id,!0,n.valid),t.mainViewInstance&&g({newSelectedBox:n,newPointCloudList:p})}if(k&&H(__spreadProps(__spreadValues({},k),{attribute:e})),_&&K(__spreadProps(__spreadValues({},_),{attribute:e})),P){const d=A(__spreadProps(__spreadValues({},P),{attribute:e}));t.mainViewInstance&&((c=t.mainViewInstance)==null||c.generateSpheres(d),g({newSelectedSphere:P,newSphereList:d}))}},a.current.setSubAttribute=(e,o)=>{var s;const i=t.selectedPointCloudBox;if(i){const c=(s=i==null?void 0:i.subAttribute)!=null?s:{};i.subAttribute=__spreadProps(__spreadValues({},c),{[e]:o}),m(i)}},a.current.clearResult=()=>{y==null||y()},a.current.redo=()=>{S()},a.current.undo=()=>{h()},a.current.setValid=e=>{a.current.valid=e,setTimeout(()=>{t.setPointCloudValid(e),e===!1&&y()})},a.current.setForbidOperation=e=>{var o,s;(s=(o=t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null||s.setForbidOperation(e),e===!0&&t.setSelectedIDs(void 0)},a.current.setShowDefaultCursor=e=>{var o,s;(s=(o=t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null||s.setShowDefaultCursor(e)},a.current.asyncData=e=>{setTimeout(()=>{v==null||v(e)})}},[t.pointCloudBoxList,t.pointCloudSphereList,t.selectedID,t.valid,t.polygonList,t.lineList,t.mainViewInstance,t.ptSegmentInstance]),React.useEffect(()=>{a.current.updateSegmentTool=e=>{var o;(o=t.ptSegmentInstance)==null||o.emit(e)},a.current.segmentInstance=t.ptSegmentInstance},[t.ptSegmentInstance]),React.useEffect(()=>{a.current.history={pushHistory:e=>{N({pointCloudBoxList:e})},initRecord:()=>{}}},[]),React.useEffect(()=>{var e;const o=(e=t.topViewInstance)==null?void 0:e.toolInstance;if(!o||u)return;const s=n=>{x(n)},i=n=>{antd.message.error(n)},c=n=>{antd.message.info(n)};return o.on("syncAttribute",s),o.on("messageError",i),o.on("messageInfo",c),()=>{o.unbind("syncAttribute",s),o.unbind("messageError",i),o.unbind("messageInfo",c)}},[t.topViewInstance]),null};var PointCloudListener$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudListener);module.exports=PointCloudListener$1;
1
+ "use strict";var PointCloudContext=require("./PointCloudContext.js"),useRotate=require("./hooks/useRotate.js"),useRotateEdge=require("./hooks/useRotateEdge.js"),useBoxes=require("./hooks/useBoxes.js"),useSingleBox=require("./hooks/useSingleBox.js"),useSphere=require("./hooks/useSphere.js"),React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),antd=require("antd"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),useStatus=require("./hooks/useStatus.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),ctx=require("../../store/ctx.js"),useHistory=require("./hooks/useHistory.js"),useAttribute=require("./hooks/useAttribute.js"),useConfig=require("./hooks/useConfig.js"),usePolygon=require("./hooks/usePolygon.js"),useLine=require("./hooks/useLine.js"),reactI18next=require("react-i18next"),actionCreators=require("../../store/annotation/actionCreators.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(l,r,u)=>r in l?__defProp(l,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[r]=u,__spreadValues=(l,r)=>{for(var u in r||(r={}))__hasOwnProp.call(r,u)&&__defNormalProp(l,u,r[u]);if(__getOwnPropSymbols)for(var u of __getOwnPropSymbols(r))__propIsEnum.call(r,u)&&__defNormalProp(l,u,r[u]);return l},__spreadProps=(l,r)=>__defProps(l,__getOwnPropDescs(r));const{EPolygonPattern}=lbAnnotation.cTool,PointCloudListener=({currentData:l,config:r,checkMode:u,configString:V,imgIndex:C,toolInstanceRef:a})=>{const t=React.useContext(PointCloudContext.PointCloudContext),{changeSelectedBoxValid:B,selectNextBox:L,selectPrevBox:q,updateSelectedBox:f,deleteSelectedPointCloudBoxAndPolygon:O}=useSingleBox.useSingleBox(),{selectedSphere:P,updatePointCloudSphere:A}=useSphere.useSphere(),{clearAllResult:y,updatePointCloudPattern:j}=useStatus.useStatus(),{copySelectedBoxes:I,pasteSelectedBoxes:T,copiedBoxes:D}=useBoxes.useBoxes({config:r}),{updateRotate:g}=useRotate.useRotate({currentData:l}),{updateRotateEdge:N}=useRotateEdge.useRotateEdge({currentData:l}),{updatePointCloudData:v,topViewSelectedChanged:m}=usePointCloudViews.usePointCloudViews(),{redo:h,undo:S,pushHistoryWithList:R,pushHistoryUnderUpdatePolygon:H,pushHistoryUnderUpdateLine:K}=useHistory.useHistory(),U=ctx.useDispatch(),{syncThreeViewsAttribute:x}=useAttribute.useAttribute(),{syncAllViewsConfig:z,reRenderTopViewRange:F}=useConfig.useConfig(),{selectedPolygon:k}=usePolygon.usePolygon(),{selectedLine:_}=useLine.useLine(),{t:w}=reactI18next.useTranslation(),b=e=>{var o;const{topViewInstance:s}=t;!s||(o=s.pointCloud2dOperation)==null||o.updateSelectedPolygonsPoints(e)},G=(e,o)=>{var s,i;const{topViewInstance:c,mainViewInstance:n}=t;if(!c)return;const{pointCloud2dOperation:d}=c;switch(e){case"q":{g(t.rectRotateSensitivity);break}case"e":g(-Number(t.rectRotateSensitivity));break;case"g":N(-90);break;case"u":{const p=d.pattern===EPolygonPattern.Normal?lbAnnotation.EToolName.Rect:lbAnnotation.EToolName.Polygon;j(p);const W={[lbAnnotation.EToolName.Polygon]:w("PolygonPattern"),[lbAnnotation.EToolName.Rect]:w("RectPattern")};antd.message.success(w("ChangePatternMsg",{pattern:W[p]})),d.clearActiveStatus(),d.clearDrawingStatus()}break;case"+":n==null||n.updatePointSize({zoomIn:!0});break;case"-":n==null||n.updatePointSize({zoomIn:!1});break;case"v":t.setPointCloudValid(!t.valid);break;case"tab":if(o.shiftKey){q();break}L(),o.preventDefault();break;case"f":B();break;case"arrowup":b({y:-1});break;case"arrowdown":b({y:1});break;case"arrowleft":b({x:-1});break;case"arrowright":b({x:1});break;case"delete":O();break;default:{if(((s=r.attributeList)==null?void 0:s.length)>0){const p=lbAnnotation.AttributeUtils.getAttributeByKeycode(o.keyCode,r.attributeList);p!==void 0&&((i=a.current)==null||i.setDefaultAttribute(p))}return}}},M=(e,o)=>{switch(e){case"c":I();break;case"v":T();break;case"a":o.preventDefault(),t.selectedAllBoxes();break;case"z":{o.shiftKey?h():S();break}}},E=e=>{if(!lbAnnotation.CommonToolUtils.hotkeyFilter(e)||u===!0)return;const o=e.key.toLocaleLowerCase();if(e.ctrlKey){M(o,e);return}G(o,e)};return React.useEffect(()=>{const{topViewInstance:e}=t;if(!!e)return window.addEventListener("keydown",E),()=>{window.removeEventListener("keydown",E)}},[t,D,r,t.pointCloudBoxList,t.polygonList]),React.useEffect(()=>{z(r)},[V]),React.useEffect(()=>{(r==null?void 0:r.radius)&&F(r==null?void 0:r.radius)},[r==null?void 0:r.radius]),React.useEffect(()=>{v==null||v()},[C,t.mainViewInstance]),React.useEffect(()=>{t.setHideAttributes([])},[C]),React.useEffect(()=>{a.current.setDefaultAttribute=e=>{var o,s,i,c;x(e);const n=t.selectedPointCloudBox;if(n){n.attribute=e;const d=U(actionCreators.PreDataProcess({tool:lbAnnotation.EPointCloudName.PointCloud,dataList:[n],stepConfig:r,action:"viewUpdateBox"}));n.valid=d[0].valid;const p=f(n);(i=(s=(o=t==null?void 0:t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null?void 0:s.setPolygonValidAndRender)==null||i.call(s,n.id,!0,n.valid),t.mainViewInstance&&m({newSelectedBox:n,newPointCloudList:p})}if(k&&H(__spreadProps(__spreadValues({},k),{attribute:e})),_&&K(__spreadProps(__spreadValues({},_),{attribute:e})),P){const d=A(__spreadProps(__spreadValues({},P),{attribute:e}));t.mainViewInstance&&((c=t.mainViewInstance)==null||c.generateSpheres(d),m({newSelectedSphere:P,newSphereList:d}))}},a.current.setSubAttribute=(e,o)=>{var s;const i=t.selectedPointCloudBox;if(i){const c=(s=i==null?void 0:i.subAttribute)!=null?s:{};i.subAttribute=__spreadProps(__spreadValues({},c),{[e]:o}),f(i)}},a.current.clearResult=()=>{y==null||y()},a.current.redo=()=>{h()},a.current.undo=()=>{S()},a.current.setValid=e=>{a.current.valid=e,setTimeout(()=>{t.setPointCloudValid(e),e===!1&&y()})},a.current.setForbidOperation=e=>{var o,s;(s=(o=t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null||s.setForbidOperation(e),e===!0&&t.setSelectedIDs(void 0)},a.current.setShowDefaultCursor=e=>{var o,s;(s=(o=t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null||s.setShowDefaultCursor(e)},a.current.asyncData=e=>{setTimeout(()=>{v==null||v(e)})}},[t.pointCloudBoxList,t.pointCloudSphereList,t.selectedID,t.valid,t.polygonList,t.lineList,t.mainViewInstance,t.ptSegmentInstance]),React.useEffect(()=>{a.current.updateSegmentTool=e=>{var o;(o=t.ptSegmentInstance)==null||o.emit(e)},a.current.segmentInstance=t.ptSegmentInstance},[t.ptSegmentInstance]),React.useEffect(()=>{a.current.history={pushHistory:e=>{R({pointCloudBoxList:e})},initRecord:()=>{}}},[]),React.useEffect(()=>{var e;const o=(e=t.topViewInstance)==null?void 0:e.toolInstance;if(!o||u)return;const s=n=>{x(n)},i=n=>{antd.message.error(n)},c=n=>{antd.message.info(n)};return o.on("syncAttribute",s),o.on("messageError",i),o.on("messageInfo",c),()=>{o.unbind("syncAttribute",s),o.unbind("messageError",i),o.unbind("messageInfo",c)}},[t.topViewInstance]),null};var PointCloudListener$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudListener);module.exports=PointCloudListener$1;
@@ -1 +1 @@
1
- "use strict";var dom=require("../../utils/dom.js"),index$3=require("../../views/MainView/toolFooter/index.js"),index$4=require("../../views/MainView/toolFooter/ZoomController/index.js"),icons=require("@ant-design/icons"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),useRotate=require("./hooks/useRotate.js"),useSingleBox=require("./hooks/useSingleBox.js"),PointCloudLayout=require("./PointCloudLayout.js"),PointCloudInfos=require("./PointCloudInfos.js"),usePolygon=require("./hooks/usePolygon.js"),useSphere=require("./hooks/useSphere.js"),useZoom=require("./hooks/useZoom.js"),antd=require("antd"),map=require("../../store/annotation/map.js"),reactRedux=require("react-redux"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSize=require("../../hooks/useSize.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js"),index=require("../../utils/index.js"),ToolUtils=require("../../utils/ToolUtils.js"),_=require("lodash"),index$2=require("./components/PointCloudSizeSlider/index.js"),useHistory=require("./hooks/useHistory.js"),index$1=require("./components/TitleButton/index.js");function _interopDefaultLegacy(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var React__default=_interopDefaultLegacy(React),___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(o,l,s)=>l in o?__defProp(o,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[l]=s,__spreadValues=(o,l)=>{for(var s in l||(l={}))__hasOwnProp.call(l,s)&&__defNormalProp(o,s,l[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(l))__propIsEnum.call(l,s)&&__defNormalProp(o,s,l[s]);return o},__spreadProps=(o,l)=>__defProps(o,__getOwnPropDescs(l));const{EPolygonPattern,EToolName}=lbAnnotation.cTool,{ESortDirection}=lbAnnotation.cAnnotation,EKeyCode=lbAnnotation.cKeyCode.default,TransferCanvas2WorldOffset=(o,l,s=1)=>{const{width:v,height:c}=l,g={x:o.x+v*s/2,y:o.y+c*s/2},P={x:l.width/2,y:l.height/2};return{offsetX:(P.x-g.x)/s,offsetY:-(P.y-g.y)/s}},TopViewToolbar=({currentData:o})=>{var l,s;const{zoom:v,zoomIn:c,zoomOut:g,initialPosition:P}=useZoom.useZoom(),{selectNextBox:h,selectPrevBox:S}=useSingleBox.useSingleBox(),{switchToNextSphere:y}=useSphere.useSphere(),{updateRotate:x}=useRotate.useRotate({currentData:o}),C=React__default.default.useContext(PointCloudContext.PointCloudContext),{topViewInstance:V}=C,I=(s=(l=C==null?void 0:C.topViewInstance)==null?void 0:l.toolScheduler)==null?void 0:s.getCurrentToolName(),m=()=>{x(-Number(C.rectRotateSensitivity))},e=()=>{x(C.rectRotateSensitivity)},r=()=>{x(180)};return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(index$2,{onChange:p=>{var E;(E=V==null?void 0:V.pointCloudInstance)==null||E.updatePointSize({customSize:p})}}),React__default.default.createElement("span",{onClick:e,className:dom.getClassName("point-cloud","rotate-reserve")}),React__default.default.createElement("span",{onClick:m,className:dom.getClassName("point-cloud","rotate")}),React__default.default.createElement("span",{onClick:r,className:dom.getClassName("point-cloud","rotate-180")}),React__default.default.createElement(index$3.FooterDivider,null),React__default.default.createElement(icons.UpSquareOutlined,{onClick:()=>{if(I===EToolName.Point){y(ESortDirection.descend);return}S(!0)},className:dom.getClassName("point-cloud","prev")}),React__default.default.createElement(icons.DownSquareOutlined,{onClick:()=>{if(I===EToolName.Point){y(ESortDirection.ascend);return}h(!0)},className:dom.getClassName("point-cloud","next")}),React__default.default.createElement(index$3.FooterDivider,null),React__default.default.createElement(index$4.ZoomController,{initialPosition:P,zoomIn:c,zoomOut:g,zoom:v}))},ZAxisSlider=({setZAxisLimit:o,zAxisLimit:l,checkMode:s})=>s?null:React__default.default.createElement("div",{style:{position:"absolute",top:128,right:8,height:"50%",zIndex:20}},React__default.default.createElement(antd.Slider,{vertical:!0,step:.5,max:10,min:.5,defaultValue:l,onAfterChange:v=>{o(v)}})),PointCloudTopView=({currentData:o,imgList:l,stepInfo:s,drawLayerSlot:v,checkMode:c,intelligentFit:g,setIsEnlargeTopView:P,isEnlargeTopView:h,onExitZoom:S,highlightAttribute:y})=>{var x,C;const[V,I]=React.useState({zoom:1,currentPos:{x:0,y:0}}),m=React.useRef(null),e=React__default.default.useContext(PointCloudContext.PointCloudContext),r=useSize(m),p=index.jsonParser(s.config),{setZoom:E,syncTopviewToolZoom:N}=useZoom.useZoom(),{hideAttributes:D}=e,{addPolygon:B,deletePolygon:R}=usePolygon.usePolygon(),{deletePointCloudSphere:U}=useSphere.useSphere(),{deletePointCloudBox:Z,changeValidByID:z}=useSingleBox.useSingleBox(),[b,H]=React.useState(10),{t:k}=reactI18next.useTranslation(),w=usePointCloudViews.usePointCloudViews(),{pushHistoryWithList:F}=useHistory.useHistory();React.useLayoutEffect(()=>{if(!e.topViewInstance&&m.current&&(o==null?void 0:o.url)&&(o==null?void 0:o.result)){const n={width:m.current.clientWidth,height:m.current.clientHeight},a=new lbAnnotation.PointCloudAnnotation({container:m.current,size:n,pcdPath:o.url,config:__spreadProps(__spreadValues({},p),{pointCloudPattern:e.pointCloudPattern}),checkMode:c,toolName:ToolUtils.getPointCloudToolList(),proxyMode:c});e.setTopViewInstance(a)}},[o]),React.useEffect(()=>{if(!r||!e.topViewInstance||!e.sideViewInstance)return;const{toolInstance:n}=e.topViewInstance;n.singleOn("dataUpdated",(t,i)=>{const d=___default.default.cloneDeep(t).map(u=>__spreadProps(__spreadValues({},u),{pointList:lbUtils.PointCloudUtils.pointListTransferCanvas2World(u.pointList,r)}));e.setSelectedIDs(i),e.setLineList(d),F({lineList:d})}),n.singleOn("pointCreated",(t,i)=>{w.topViewAddSphere({newPoint:t,size:r,trackConfigurable:p.trackConfigurable,zoom:i})}),n.singleOn("pointDeleted",t=>{U(t)}),n.singleOn("pointSelected",t=>{e.setSelectedIDs([t])}),n.singleOn("updatePointByDrag",(t,i)=>{var d;(d=w.topViewUpdatePoint)==null||d.call(w,t,r)}),n.singleOn("polygonCreated",(t,i)=>{if(n.pattern===EPolygonPattern.Normal||!(o==null?void 0:o.url)){const d=__spreadProps(__spreadValues({},t),{pointList:t.pointList.map(u=>lbUtils.PointCloudUtils.transferCanvas2World(u,r))});B(d),e.setSelectedIDs(D.includes(t.attribute)?"":t.id);return}w.topViewAddBox({polygon:t,size:r,imgList:l,trackConfigurable:p.trackConfigurable,zoom:i,intelligentFit:g})}),n.singleOn("deletedObject",({id:t})=>{Z(t),R(t)}),n.singleOn("deleteSelectedIDs",()=>{e.setSelectedIDs([])}),n.singleOn("addSelectedIDs",t=>{e.addSelectedID(t)}),n.singleOn("setSelectedIDs",t=>{e.setSelectedIDs(t)}),n.singleOn("updatePolygonByDrag",t=>{var i;(i=w.topViewUpdateBox)==null||i.call(w,t,r)});const a=t=>{var i;const d=z(t);d&&e.syncAllViewPointCloudColor(d),e.polygonList.find(u=>u.id===t)&&((i=e.topViewInstance)==null||i.toolInstance.setPolygonValidAndRender(t,!0))};return n.on("validUpdate",a),()=>{n.unbind("validUpdate",a)}},[e,r,o,w,e.polygonList,e.lineList,(x=e.topViewInstance)==null?void 0:x.toolInstance]),React.useEffect(()=>{var n,a;if(!(r==null?void 0:r.width)||!e.topViewInstance)return;const t=(a=(n=p==null?void 0:p.attributeList)==null?void 0:n[0])==null?void 0:a.value;t&&e.topViewInstance.toolInstance.setDefaultAttribute(t),e.topViewInstance.initSize(r),e.topViewInstance.updatePolygonList(e.displayPointCloudList,e.polygonList),e.topViewInstance.updatePointList(e.displaySphereList),e.topViewInstance.updateLineList(e.displayLineList);const{topViewInstance:{pointCloudInstance:i,toolInstance:d}}=e;d.singleOn("renderZoom",(u,f)=>{const{offsetX:L,offsetY:O}=TransferCanvas2WorldOffset(f,r,u);if(i.camera.zoom=u,f){const{x:q,y:j,z:T}=i.initCameraPosition;i.camera.position.set(q+O,j-L,T)}i.camera.updateProjectionMatrix(),i.render(),E(u),N(f,u,r),I({zoom:u,currentPos:f})}),d.singleOn("dragMove",({currentPos:u,zoom:f})=>{const{offsetX:L,offsetY:O}=TransferCanvas2WorldOffset(u,r,f);i.camera.zoom=f;const{x:q,y:j,z:T}=i.initCameraPosition;i.camera.position.set(q+O,j-L,T),i.render(),N(u,f,r),I({zoom:f,currentPos:u})})},[r,e.topViewInstance,(C=e.topViewInstance)==null?void 0:C.toolInstance]),React.useEffect(()=>{var n,a;(a=(n=e.topViewInstance)==null?void 0:n.pointCloudInstance)==null||a.applyZAxisPoints(b)},[b]),React.useEffect(()=>{var n,a,t,i;w.topViewSelectedChanged({}),(i=(t=(a=(n=e.topViewInstance)==null?void 0:n.toolInstance)==null?void 0:a.selection)==null?void 0:t.hardSetSelectedIDs)==null||i.call(t,e.selectedIDs)},[e.selectedIDs]),React.useEffect(()=>(window.addEventListener("keydown",A),()=>{window.removeEventListener("keydown",A)}),[]);const A=n=>{const{keyCode:a}=n;a===EKeyCode.Esc&&S()};return React.useEffect(()=>{var n,a,t;(t=(a=(n=e.topViewInstance)==null?void 0:n.pointCloud2dOperation)==null?void 0:a.setHighlightAttribute)==null||t.call(a,y)},[e.topViewInstance,y]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","top-view"),title:h?React__default.default.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative"}},React__default.default.createElement(icons.LeftOutlined,{style:{cursor:"pointer",marginRight:"12px"},onClick:()=>{S()}}),React__default.default.createElement("span",null,k("TopView")),React__default.default.createElement(PointCloudInfos.BoxInfos,{checkMode:c,config:p,style:{display:"flex",position:"initial",margin:"0px 20px"}})):React__default.default.createElement(index$1,{title:k("TopView"),onClick:()=>{P(!0)}}),toolbar:React__default.default.createElement(TopViewToolbar,{currentData:o})},React__default.default.createElement("div",{style:{position:"relative",flex:1}},React__default.default.createElement("div",{style:{width:"100%",height:"100%"},ref:m},v==null?void 0:v(V)),!h&&React__default.default.createElement(PointCloudInfos.BoxInfos,{checkMode:c,config:p}),React__default.default.createElement(ZAxisSlider,{checkMode:c,zAxisLimit:b,setZAxisLimit:H}),React__default.default.createElement(PointCloudInfos.PointCloudValidity,null)))};var PointCloudTopView$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudTopView);module.exports=PointCloudTopView$1;
1
+ "use strict";var dom=require("../../utils/dom.js"),index$3=require("../../views/MainView/toolFooter/index.js"),index$4=require("../../views/MainView/toolFooter/ZoomController/index.js"),icons=require("@ant-design/icons"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),useRotate=require("./hooks/useRotate.js"),useRotateEdge=require("./hooks/useRotateEdge.js"),useSingleBox=require("./hooks/useSingleBox.js"),PointCloudLayout=require("./PointCloudLayout.js"),PointCloudInfos=require("./PointCloudInfos.js"),usePolygon=require("./hooks/usePolygon.js"),useSphere=require("./hooks/useSphere.js"),useZoom=require("./hooks/useZoom.js"),antd=require("antd"),map=require("../../store/annotation/map.js"),reactRedux=require("react-redux"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSize=require("../../hooks/useSize.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js"),index=require("../../utils/index.js"),ToolUtils=require("../../utils/ToolUtils.js"),_=require("lodash"),index$2=require("./components/PointCloudSizeSlider/index.js"),useHistory=require("./hooks/useHistory.js"),index$1=require("./components/TitleButton/index.js");function _interopDefaultLegacy(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var React__default=_interopDefaultLegacy(React),___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(o,l,s)=>l in o?__defProp(o,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[l]=s,__spreadValues=(o,l)=>{for(var s in l||(l={}))__hasOwnProp.call(l,s)&&__defNormalProp(o,s,l[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(l))__propIsEnum.call(l,s)&&__defNormalProp(o,s,l[s]);return o},__spreadProps=(o,l)=>__defProps(o,__getOwnPropDescs(l));const{EPolygonPattern,EToolName}=lbAnnotation.cTool,{ESortDirection}=lbAnnotation.cAnnotation,EKeyCode=lbAnnotation.cKeyCode.default,TransferCanvas2WorldOffset=(o,l,s=1)=>{const{width:C,height:c}=l,w={x:o.x+C*s/2,y:o.y+c*s/2},P={x:l.width/2,y:l.height/2};return{offsetX:(P.x-w.x)/s,offsetY:-(P.y-w.y)/s}},TopViewToolbar=({currentData:o})=>{var l,s;const{zoom:C,zoomIn:c,zoomOut:w,initialPosition:P}=useZoom.useZoom(),{selectNextBox:S,selectPrevBox:V}=useSingleBox.useSingleBox(),{switchToNextSphere:x}=useSphere.useSphere(),{updateRotate:y}=useRotate.useRotate({currentData:o}),{updateRotateEdge:E}=useRotateEdge.useRotateEdge({currentData:o}),g=React__default.default.useContext(PointCloudContext.PointCloudContext),{topViewInstance:I}=g,p=(s=(l=g==null?void 0:g.topViewInstance)==null?void 0:l.toolScheduler)==null?void 0:s.getCurrentToolName(),e=()=>{y(-Number(g.rectRotateSensitivity))},r=()=>{y(g.rectRotateSensitivity)},f=()=>{E(-90)};return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(index$2,{onChange:b=>{var h;(h=I==null?void 0:I.pointCloudInstance)==null||h.updatePointSize({customSize:b})}}),React__default.default.createElement("span",{onClick:r,className:dom.getClassName("point-cloud","rotate-reserve")}),React__default.default.createElement("span",{onClick:e,className:dom.getClassName("point-cloud","rotate")}),React__default.default.createElement("span",{onClick:f,className:dom.getClassName("point-cloud","rotate-90")}),React__default.default.createElement(index$3.FooterDivider,null),React__default.default.createElement(icons.UpSquareOutlined,{onClick:()=>{if(p===EToolName.Point){x(ESortDirection.descend);return}V(!0)},className:dom.getClassName("point-cloud","prev")}),React__default.default.createElement(icons.DownSquareOutlined,{onClick:()=>{if(p===EToolName.Point){x(ESortDirection.ascend);return}S(!0)},className:dom.getClassName("point-cloud","next")}),React__default.default.createElement(index$3.FooterDivider,null),React__default.default.createElement(index$4.ZoomController,{initialPosition:P,zoomIn:c,zoomOut:w,zoom:C}))},ZAxisSlider=({setZAxisLimit:o,zAxisLimit:l,checkMode:s})=>s?null:React__default.default.createElement("div",{style:{position:"absolute",top:128,right:8,height:"50%",zIndex:20}},React__default.default.createElement(antd.Slider,{vertical:!0,step:.5,max:10,min:.5,defaultValue:l,onAfterChange:C=>{o(C)}})),PointCloudTopView=({currentData:o,imgList:l,stepInfo:s,drawLayerSlot:C,checkMode:c,intelligentFit:w,setIsEnlargeTopView:P,isEnlargeTopView:S,onExitZoom:V,highlightAttribute:x})=>{var y,E;const[g,I]=React.useState({zoom:1,currentPos:{x:0,y:0}}),p=React.useRef(null),e=React__default.default.useContext(PointCloudContext.PointCloudContext),r=useSize(p),f=index.jsonParser(s.config),{setZoom:b,syncTopviewToolZoom:h}=useZoom.useZoom(),{hideAttributes:A}=e,{addPolygon:B,deletePolygon:D}=usePolygon.usePolygon(),{deletePointCloudSphere:U}=useSphere.useSphere(),{deletePointCloudBox:Z,changeValidByID:z}=useSingleBox.useSingleBox(),[L,H]=React.useState(10),{t:k}=reactI18next.useTranslation(),m=usePointCloudViews.usePointCloudViews(),{pushHistoryWithList:F}=useHistory.useHistory();React.useLayoutEffect(()=>{if(!e.topViewInstance&&p.current&&(o==null?void 0:o.url)&&(o==null?void 0:o.result)){const n={width:p.current.clientWidth,height:p.current.clientHeight},a=new lbAnnotation.PointCloudAnnotation({container:p.current,size:n,pcdPath:o.url,config:__spreadProps(__spreadValues({},f),{pointCloudPattern:e.pointCloudPattern}),checkMode:c,toolName:ToolUtils.getPointCloudToolList(),proxyMode:c});e.setTopViewInstance(a)}},[o]),React.useEffect(()=>{if(!r||!e.topViewInstance||!e.sideViewInstance)return;const{toolInstance:n}=e.topViewInstance;n.singleOn("dataUpdated",(t,i)=>{const d=___default.default.cloneDeep(t).map(u=>__spreadProps(__spreadValues({},u),{pointList:lbUtils.PointCloudUtils.pointListTransferCanvas2World(u.pointList,r)}));e.setSelectedIDs(i),e.setLineList(d),F({lineList:d})}),n.singleOn("pointCreated",(t,i)=>{m.topViewAddSphere({newPoint:t,size:r,trackConfigurable:f.trackConfigurable,zoom:i})}),n.singleOn("pointDeleted",t=>{U(t)}),n.singleOn("pointSelected",t=>{e.setSelectedIDs([t])}),n.singleOn("updatePointByDrag",(t,i)=>{var d;(d=m.topViewUpdatePoint)==null||d.call(m,t,r)}),n.singleOn("polygonCreated",(t,i)=>{if(n.pattern===EPolygonPattern.Normal||!(o==null?void 0:o.url)){const d=__spreadProps(__spreadValues({},t),{pointList:t.pointList.map(u=>lbUtils.PointCloudUtils.transferCanvas2World(u,r))});B(d),e.setSelectedIDs(A.includes(t.attribute)?"":t.id);return}m.topViewAddBox({polygon:t,size:r,imgList:l,trackConfigurable:f.trackConfigurable,zoom:i,intelligentFit:w})}),n.singleOn("deletedObject",({id:t})=>{Z(t),D(t)}),n.singleOn("deleteSelectedIDs",()=>{e.setSelectedIDs([])}),n.singleOn("addSelectedIDs",t=>{e.addSelectedID(t)}),n.singleOn("setSelectedIDs",t=>{e.setSelectedIDs(t)}),n.singleOn("updatePolygonByDrag",t=>{var i;(i=m.topViewUpdateBox)==null||i.call(m,t,r)});const a=t=>{var i;const d=z(t);d&&e.syncAllViewPointCloudColor(d),e.polygonList.find(u=>u.id===t)&&((i=e.topViewInstance)==null||i.toolInstance.setPolygonValidAndRender(t,!0))};return n.on("validUpdate",a),()=>{n.unbind("validUpdate",a)}},[e,r,o,m,e.polygonList,e.lineList,(y=e.topViewInstance)==null?void 0:y.toolInstance]),React.useEffect(()=>{var n,a;if(!(r==null?void 0:r.width)||!e.topViewInstance)return;const t=(a=(n=f==null?void 0:f.attributeList)==null?void 0:n[0])==null?void 0:a.value;t&&e.topViewInstance.toolInstance.setDefaultAttribute(t),e.topViewInstance.initSize(r),e.topViewInstance.updatePolygonList(e.displayPointCloudList,e.polygonList),e.topViewInstance.updatePointList(e.displaySphereList),e.topViewInstance.updateLineList(e.displayLineList);const{topViewInstance:{pointCloudInstance:i,toolInstance:d}}=e;d.singleOn("renderZoom",(u,v)=>{const{offsetX:O,offsetY:q}=TransferCanvas2WorldOffset(v,r,u);if(i.camera.zoom=u,v){const{x:j,y:T,z:N}=i.initCameraPosition;i.camera.position.set(j+q,T-O,N)}i.camera.updateProjectionMatrix(),i.render(),b(u),h(v,u,r),I({zoom:u,currentPos:v})}),d.singleOn("dragMove",({currentPos:u,zoom:v})=>{const{offsetX:O,offsetY:q}=TransferCanvas2WorldOffset(u,r,v);i.camera.zoom=v;const{x:j,y:T,z:N}=i.initCameraPosition;i.camera.position.set(j+q,T-O,N),i.render(),h(u,v,r),I({zoom:v,currentPos:u})})},[r,e.topViewInstance,(E=e.topViewInstance)==null?void 0:E.toolInstance]),React.useEffect(()=>{var n,a;(a=(n=e.topViewInstance)==null?void 0:n.pointCloudInstance)==null||a.applyZAxisPoints(L)},[L]),React.useEffect(()=>{var n,a,t,i;m.topViewSelectedChanged({}),(i=(t=(a=(n=e.topViewInstance)==null?void 0:n.toolInstance)==null?void 0:a.selection)==null?void 0:t.hardSetSelectedIDs)==null||i.call(t,e.selectedIDs)},[e.selectedIDs]),React.useEffect(()=>(window.addEventListener("keydown",R),()=>{window.removeEventListener("keydown",R)}),[]);const R=n=>{const{keyCode:a}=n;a===EKeyCode.Esc&&V()};return React.useEffect(()=>{var n,a,t;(t=(a=(n=e.topViewInstance)==null?void 0:n.pointCloud2dOperation)==null?void 0:a.setHighlightAttribute)==null||t.call(a,x)},[e.topViewInstance,x]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","top-view"),title:S?React__default.default.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative"}},React__default.default.createElement(icons.LeftOutlined,{style:{cursor:"pointer",marginRight:"12px"},onClick:()=>{V()}}),React__default.default.createElement("span",null,k("TopView")),React__default.default.createElement(PointCloudInfos.BoxInfos,{checkMode:c,config:f,style:{display:"flex",position:"initial",margin:"0px 20px"}})):React__default.default.createElement(index$1,{title:k("TopView"),onClick:()=>{P(!0)}}),toolbar:React__default.default.createElement(TopViewToolbar,{currentData:o})},React__default.default.createElement("div",{style:{position:"relative",flex:1}},React__default.default.createElement("div",{style:{width:"100%",height:"100%"},ref:p},C==null?void 0:C(g)),!S&&React__default.default.createElement(PointCloudInfos.BoxInfos,{checkMode:c,config:f}),React__default.default.createElement(ZAxisSlider,{checkMode:c,zAxisLimit:L,setZAxisLimit:H}),React__default.default.createElement(PointCloudInfos.PointCloudValidity,null)))};var PointCloudTopView$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudTopView);module.exports=PointCloudTopView$1;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),usePointCloudViews=require("./usePointCloudViews.js"),useSingleBox=require("./useSingleBox.js"),PointCloudContext=require("../PointCloudContext.js"),ahooks=require("ahooks"),lbUtils=require("@labelbee/lb-utils");const useRotateEdge=({currentData:t})=>{const o=React.useContext(PointCloudContext.PointCloudContext),{selectedBox:l,updateSelectedBox:d}=useSingleBox.useSingleBox(),{run:c}=ahooks.useThrottleFn(a=>{const{topViewInstance:r,mainViewInstance:i,syncAllViewPointCloudColor:P}=o;if(!r||!i)return;const{pointCloud2dOperation:s}=r,e=l==null?void 0:l.info;if(!e||!(t==null?void 0:t.url)||!o.backViewInstance)return;const n=s.selectedPolygon.pointList||[],g=n.shift();n.push(g);const C=d({newPointList:n,rotation:lbUtils.PointCloudUtils.restrictAngleRange(e.rotation+Number(Math.PI*a)/180),width:e.height,height:e.width});s.rotatePolygonEdge(n);const u=s.selectedPolygon;i.generateBox(e),P(C),usePointCloudViews.synchronizeSideView(e,u,o.sideViewInstance,t.url),usePointCloudViews.synchronizeBackView(e,u,o.backViewInstance,t.url),i.render()},{wait:800});return{updateRotateEdge:c}};exports.useRotateEdge=useRotateEdge;
package/dist/index.css CHANGED
@@ -2539,14 +2539,14 @@
2539
2539
  margin-right: 16px;
2540
2540
  background-image: url("../dist/assets/icons/7eadb9c4.svg");
2541
2541
  }
2542
- .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-180 {
2542
+ .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-90 {
2543
2543
  display: inline-block;
2544
2544
  height: 24px;
2545
2545
  width: 24px;
2546
2546
  background-repeat: no-repeat;
2547
2547
  cursor: pointer;
2548
2548
  flex: none;
2549
- background-image: url("../dist/assets/icons/9d70807.svg");
2549
+ background-image: url("../dist/assets/icons/ad33251.svg");
2550
2550
  }
2551
2551
  .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__next {
2552
2552
  font-size: 24px;
@@ -0,0 +1,9 @@
1
+ /// <reference types="lodash" />
2
+ import { IAnnotationStateProps } from '@/store/annotation/map';
3
+ /**
4
+ * PointCloud Rotate Hook
5
+ * @returns
6
+ */
7
+ export declare const useRotateEdge: ({ currentData }: IAnnotationStateProps) => {
8
+ updateRotateEdge: import("lodash").DebouncedFunc<(angle: number) => void>;
9
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("../common/index.js"),icon_move_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js"),icon_mouse_left_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js"),icon_mouse_right_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js"),changePointCloudValid=require("../../../../../../assets/annotation/pointCloudTool/changePointCloudValid.svg.js"),copy=require("../../../../../../assets/annotation/pointCloudTool/copy.svg.js"),nextBox=require("../../../../../../assets/annotation/pointCloudTool/nextBox.svg.js"),patse=require("../../../../../../assets/annotation/pointCloudTool/patse.svg.js"),prevBox=require("../../../../../../assets/annotation/pointCloudTool/prevBox.svg.js"),rotate180_black=require("../../../../../../assets/annotation/pointCloudTool/rotate180_black.svg.js"),selectAll=require("../../../../../../assets/annotation/pointCloudTool/selectAll.svg.js"),selectMultiple=require("../../../../../../assets/annotation/pointCloudTool/selectMultiple.svg.js"),icon_tab_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js"),icon_del_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js"),lassoSelector=require("../../../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js"),icon_rect=require("../../../../../../assets/annotation/rectTool/icon_rect.svg.js"),circleSelector=require("../../../../../../assets/annotation/pointCloudTool/circleSelector.svg.js"),addSvg=require("../../../../../../assets/annotation/pointCloudTool/addSvg.svg.js"),clearSvg=require("../../../../../../assets/annotation/pointCloudTool/clearSvg.svg.js"),React=require("react"),icons=require("@ant-design/icons"),index$1=require("../polygon/index.js");function _interopDefaultLegacy(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var React__default=_interopDefaultLegacy(React);const changePointSize={name:"PointThickness",icon:React__default.default.createElement("span",{style:{display:" inline-block",width:14,height:14,borderRadius:"50%",border:"1px solid"}}),shortCut:["+","-"],linkSymbol:""},rotateRoundCenter={name:"RotateAroundCenterPoint",icon:React__default.default.createElement(icons.ReloadOutlined,null),shortCut:[icon_mouse_left_kj],noticeInfo:"DragOperation"},Drag3D={name:"PointCloudViewTranslate",icon:icon_move_kj,shortCut:[icon_mouse_right_kj],noticeInfo:"Drag"},DragTopView={name:"TopViewTranslate",icon:icon_move_kj,shortCut:[icon_mouse_right_kj]},ChangeInvalid={name:"ChangePointCloudValid",icon:changePointCloudValid,shortCut:["V"]},CopyBox={name:"CopyBox",icon:copy,shortCut:["Ctrl","C"]},PasteBox={name:"PasteBox",icon:patse,shortCut:["Ctrl","V"]},LeftRotate={name:"RotateLeft",icon:React__default.default.createElement(icons.RotateLeftOutlined,null),shortCut:["Q"]},RightRotate={name:"RotateRight",icon:React__default.default.createElement(icons.RotateRightOutlined,null),shortCut:["E"]},PrevBox={name:"PreviousBox",icon:prevBox,shortCut:["Shift","Tab"]},NextBox={name:"NextBox",icon:nextBox,shortCut:["Tab"]},Rotate180={name:"Rotate180",icon:rotate180_black,shortCut:["G"],noticeInfo:"SelectedStatus"},CopyPrevPage={name:"CopyPrevPage",icon:copy,shortCut:["Alt","C"]},ChangeBoxInvalid={name:"ChangeBoxValid",icon:icon_tab_kj,shortCut:["F"],noticeInfo:"SelectedStatus"},SelectMulti={name:"MultiSelect",icon:selectMultiple,shortCut:["Ctrl",icon_mouse_right_kj]},SelectAll={name:"SelectAllBox",icon:selectAll,shortCut:["Ctrl","A"]},deleteBox={name:"Delete",icon:icon_del_kj,shortCut:["Del"],noticeInfo:"SelectedStatus"},LassoSelector={name:"LassoSelector",icon:lassoSelector,shortCut:["H"],noticeInfo:"SelectorMsg"},RectSelector={name:"RectSelector",icon:icon_rect,shortCut:["J"],noticeInfo:"SelectorMsg"},CircleSelector={name:"CircleSelector",icon:circleSelector,shortCut:["K"],noticeInfo:"SelectorMsg"},Drag3DBySpace={name:"PointCloudViewTranslate",icon:icon_move_kj,shortCut:["space",icon_mouse_right_kj]},AddMove={name:"AddPoint",icon:addSvg,shortCut:["U"]},DeletePoint={name:"DeletePoint",icon:clearSvg,shortCut:["I"]},pointCloudShortCutTable=[{name:"GeneralOperation"},index.backward,index.forward,changePointSize,index.scale,rotateRoundCenter,Drag3D,DragTopView,ChangeInvalid,{name:"RectPattern"},CopyBox,PasteBox,LeftRotate,RightRotate,PrevBox,NextBox,Rotate180,CopyPrevPage,ChangeBoxInvalid,deleteBox,SelectMulti,SelectAll,index.fullScreen],pointCloudShortCutTable_POLYGON=[{name:"GeneralOperation"},index.backward,index.forward,changePointSize,index.scale,rotateRoundCenter,Drag3D,DragTopView,ChangeInvalid,{name:"PolygonPattern"},index$1.polygon,index$1.invalidPolygon,index$1.selectedPolygon,index$1.changePolygonAttribute,index$1.deletePolygon,index$1.insertPolygonPoint,index$1.deletePolygonPoint],pointCloudShortCutTable_SEGMENT=[index.backward,index.forward,rotateRoundCenter,Drag3DBySpace,LassoSelector,RectSelector,CircleSelector,AddMove,DeletePoint];exports.default=pointCloudShortCutTable,exports.pointCloudShortCutTable_POLYGON=pointCloudShortCutTable_POLYGON,exports.pointCloudShortCutTable_SEGMENT=pointCloudShortCutTable_SEGMENT;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("../common/index.js"),icon_move_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js"),icon_mouse_left_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js"),icon_mouse_right_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js"),changePointCloudValid=require("../../../../../../assets/annotation/pointCloudTool/changePointCloudValid.svg.js"),copy=require("../../../../../../assets/annotation/pointCloudTool/copy.svg.js"),nextBox=require("../../../../../../assets/annotation/pointCloudTool/nextBox.svg.js"),patse=require("../../../../../../assets/annotation/pointCloudTool/patse.svg.js"),prevBox=require("../../../../../../assets/annotation/pointCloudTool/prevBox.svg.js"),rotate90_black=require("../../../../../../assets/annotation/pointCloudTool/rotate90_black.svg.js"),selectAll=require("../../../../../../assets/annotation/pointCloudTool/selectAll.svg.js"),selectMultiple=require("../../../../../../assets/annotation/pointCloudTool/selectMultiple.svg.js"),icon_tab_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js"),icon_del_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js"),lassoSelector=require("../../../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js"),icon_rect=require("../../../../../../assets/annotation/rectTool/icon_rect.svg.js"),circleSelector=require("../../../../../../assets/annotation/pointCloudTool/circleSelector.svg.js"),addSvg=require("../../../../../../assets/annotation/pointCloudTool/addSvg.svg.js"),clearSvg=require("../../../../../../assets/annotation/pointCloudTool/clearSvg.svg.js"),React=require("react"),icons=require("@ant-design/icons"),index$1=require("../polygon/index.js");function _interopDefaultLegacy(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var React__default=_interopDefaultLegacy(React);const changePointSize={name:"PointThickness",icon:React__default.default.createElement("span",{style:{display:" inline-block",width:14,height:14,borderRadius:"50%",border:"1px solid"}}),shortCut:["+","-"],linkSymbol:""},rotateRoundCenter={name:"RotateAroundCenterPoint",icon:React__default.default.createElement(icons.ReloadOutlined,null),shortCut:[icon_mouse_left_kj],noticeInfo:"DragOperation"},Drag3D={name:"PointCloudViewTranslate",icon:icon_move_kj,shortCut:[icon_mouse_right_kj],noticeInfo:"Drag"},DragTopView={name:"TopViewTranslate",icon:icon_move_kj,shortCut:[icon_mouse_right_kj]},ChangeInvalid={name:"ChangePointCloudValid",icon:changePointCloudValid,shortCut:["V"]},CopyBox={name:"CopyBox",icon:copy,shortCut:["Ctrl","C"]},PasteBox={name:"PasteBox",icon:patse,shortCut:["Ctrl","V"]},LeftRotate={name:"RotateLeft",icon:React__default.default.createElement(icons.RotateLeftOutlined,null),shortCut:["Q"]},RightRotate={name:"RotateRight",icon:React__default.default.createElement(icons.RotateRightOutlined,null),shortCut:["E"]},PrevBox={name:"PreviousBox",icon:prevBox,shortCut:["Shift","Tab"]},NextBox={name:"NextBox",icon:nextBox,shortCut:["Tab"]},Rotate90={name:"Rotate90",icon:rotate90_black,shortCut:["G"],noticeInfo:"SelectedStatus"},CopyPrevPage={name:"CopyPrevPage",icon:copy,shortCut:["Alt","C"]},ChangeBoxInvalid={name:"ChangeBoxValid",icon:icon_tab_kj,shortCut:["F"],noticeInfo:"SelectedStatus"},SelectMulti={name:"MultiSelect",icon:selectMultiple,shortCut:["Ctrl",icon_mouse_right_kj]},SelectAll={name:"SelectAllBox",icon:selectAll,shortCut:["Ctrl","A"]},deleteBox={name:"Delete",icon:icon_del_kj,shortCut:["Del"],noticeInfo:"SelectedStatus"},LassoSelector={name:"LassoSelector",icon:lassoSelector,shortCut:["H"],noticeInfo:"SelectorMsg"},RectSelector={name:"RectSelector",icon:icon_rect,shortCut:["J"],noticeInfo:"SelectorMsg"},CircleSelector={name:"CircleSelector",icon:circleSelector,shortCut:["K"],noticeInfo:"SelectorMsg"},Drag3DBySpace={name:"PointCloudViewTranslate",icon:icon_move_kj,shortCut:["space",icon_mouse_right_kj]},AddMove={name:"AddPoint",icon:addSvg,shortCut:["U"]},DeletePoint={name:"DeletePoint",icon:clearSvg,shortCut:["I"]},pointCloudShortCutTable=[{name:"GeneralOperation"},index.backward,index.forward,changePointSize,index.scale,rotateRoundCenter,Drag3D,DragTopView,ChangeInvalid,{name:"RectPattern"},CopyBox,PasteBox,LeftRotate,RightRotate,PrevBox,NextBox,Rotate90,CopyPrevPage,ChangeBoxInvalid,deleteBox,SelectMulti,SelectAll,index.fullScreen],pointCloudShortCutTable_POLYGON=[{name:"GeneralOperation"},index.backward,index.forward,changePointSize,index.scale,rotateRoundCenter,Drag3D,DragTopView,ChangeInvalid,{name:"PolygonPattern"},index$1.polygon,index$1.invalidPolygon,index$1.selectedPolygon,index$1.changePolygonAttribute,index$1.deletePolygon,index$1.insertPolygonPoint,index$1.deletePolygonPoint],pointCloudShortCutTable_SEGMENT=[index.backward,index.forward,rotateRoundCenter,Drag3DBySpace,LassoSelector,RectSelector,CircleSelector,AddMove,DeletePoint];exports.default=pointCloudShortCutTable,exports.pointCloudShortCutTable_POLYGON=pointCloudShortCutTable_POLYGON,exports.pointCloudShortCutTable_SEGMENT=pointCloudShortCutTable_SEGMENT;
@@ -0,0 +1 @@
1
+ import"react";var a="data:image/svg+xml,%3csvg t='1717751173252' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='3511' width='16' height='16'%3e %3cpath d='M490.666667 59.733333C240.896 59.733333 38.4 262.229333 38.4 512c0 249.770667 202.496 452.266667 452.266667 452.266667a452.266667 452.266667 0 0 0 406.954666-254.72 25.6 25.6 0 0 0-46.08-22.4A401.066667 401.066667 0 1 1 891.733333 512a25.6 25.6 0 0 0 51.242667 0c0-249.770667-202.496-452.266667-452.266667-452.266667z' fill='black' p-id='3512' %3e%3c/path%3e %3cpath d='M917.333333 192a21.333333 21.333333 0 0 0-20.992 17.493333L896 213.333333v298.666667a21.333333 21.333333 0 0 0 42.325333 3.84L938.666667 512V213.333333a21.333333 21.333333 0 0 0-21.333334-21.333333z' fill='black' p-id='3513' %3e%3c/path%3e %3cpath d='M322.688 523.093333c-29.568 0-45.696-20.736-45.696-56.832 0-36.864 19.2-58.752 43.392-58.752 30.72 0 51.84 25.344 56.064 81.024-16.896 24.576-36.48 34.56-53.76 34.56z m-82.176 113.28c16.512 16.896 39.552 29.952 72.192 29.952 54.528 0 105.216-44.544 105.216-155.904 0-93.312-43.776-137.088-97.92-137.088-45.696 0-84.096 36.864-84.096 92.928 0 59.136 31.872 88.704 79.104 88.704 21.504 0 45.696-12.672 62.208-33.024-2.688 80.64-32.256 108.288-66.432 108.288-18.048 0-35.328-8.448-46.464-21.12l-23.808 27.264zM547.712 666.325333c55.296 0 91.392-49.152 91.392-147.456 0-97.536-36.096-145.536-91.392-145.536-55.68 0-91.392 47.616-91.392 145.536 0 98.304 35.712 147.456 91.392 147.456z m0-34.944c-28.8 0-49.152-30.72-49.152-112.512 0-81.024 20.352-110.592 49.152-110.592 28.8 0 49.152 29.568 49.152 110.592 0 81.792-20.352 112.512-49.152 112.512zM730.88 480.085333c31.104 0 56.832-23.04 56.832-57.216 0-34.176-25.728-57.216-56.832-57.216-30.336 0-56.448 23.04-56.448 57.216 0 34.176 26.112 57.216 56.448 57.216z m0-23.04c-18.432 0-31.104-14.208-31.104-34.176 0-20.352 12.672-34.56 31.104-34.56 18.816 0 31.488 14.208 31.488 34.56 0 19.968-12.672 34.176-31.488 34.176z' fill='black' p-id='3514' %3e%3c/path%3e%3c/svg%3e";export{a as default};
@@ -1 +1 @@
1
- import{PointCloudContext as ee}from"./PointCloudContext.js";import{useRotate as te}from"./hooks/useRotate.js";import{useBoxes as oe}from"./hooks/useBoxes.js";import{useSingleBox as re}from"./hooks/useSingleBox.js";import{useSphere as ne}from"./hooks/useSphere.js";import{useContext as se,useEffect as c}from"react";import{EPointCloudName as ie,CommonToolUtils as ae,AttributeUtils as ue,EToolName as P,cTool as le}from"@labelbee/lb-annotation";import{message as g}from"antd";import{connect as de}from"react-redux";import{a2MapStateToProps as ce}from"../../store/annotation/map.js";import{useStatus as pe}from"./hooks/useStatus.js";import{usePointCloudViews as me}from"./hooks/usePointCloudViews.js";import{LabelBeeContext as ve,useDispatch as be}from"../../store/ctx.js";import{useHistory as Pe}from"./hooks/useHistory.js";import{useAttribute as ye}from"./hooks/useAttribute.js";import{useConfig as fe}from"./hooks/useConfig.js";import{usePolygon as we}from"./hooks/usePolygon.js";import{useLine as Ce}from"./hooks/useLine.js";import{useTranslation as he}from"react-i18next";import{PreDataProcess as Se}from"../../store/annotation/actionCreators.js";var ge=Object.defineProperty,xe=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,I=(l,r,u)=>r in l?ge(l,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[r]=u,y=(l,r)=>{for(var u in r||(r={}))_e.call(r,u)&&I(l,u,r[u]);if(D)for(var u of D(r))Ve.call(r,u)&&I(l,u,r[u]);return l},f=(l,r)=>xe(l,ke(r));const{EPolygonPattern:Le}=le,Be=({currentData:l,config:r,checkMode:u,configString:E,imgIndex:x,toolInstanceRef:i})=>{const t=se(ee),{changeSelectedBoxValid:T,selectNextBox:N,selectPrevBox:H,updateSelectedBox:k,deleteSelectedPointCloudBoxAndPolygon:K}=re(),{selectedSphere:w,updatePointCloudSphere:U}=ne(),{clearAllResult:C,updatePointCloudPattern:z}=pe(),{copySelectedBoxes:F,pasteSelectedBoxes:R,copiedBoxes:q}=oe({config:r}),{updateRotate:h}=te({currentData:l}),{updatePointCloudData:v,topViewSelectedChanged:_}=me(),{redo:V,undo:L,pushHistoryWithList:G,pushHistoryUnderUpdatePolygon:M,pushHistoryUnderUpdateLine:W}=Pe(),Y=be(),{syncThreeViewsAttribute:B}=ye(),{syncAllViewsConfig:$,reRenderTopViewRange:J}=fe(),{selectedPolygon:O}=we(),{selectedLine:j}=Ce(),{t:S}=he(),b=e=>{var o;const{topViewInstance:n}=t;!n||(o=n.pointCloud2dOperation)==null||o.updateSelectedPolygonsPoints(e)},Q=(e,o)=>{var n,a;const{topViewInstance:d,mainViewInstance:s}=t;if(!d)return;const{pointCloud2dOperation:p}=d;switch(e){case"q":{h(t.rectRotateSensitivity);break}case"e":h(-Number(t.rectRotateSensitivity));break;case"g":h(180);break;case"u":{const m=p.pattern===Le.Normal?P.Rect:P.Polygon;z(m);const Z={[P.Polygon]:S("PolygonPattern"),[P.Rect]:S("RectPattern")};g.success(S("ChangePatternMsg",{pattern:Z[m]})),p.clearActiveStatus(),p.clearDrawingStatus()}break;case"+":s==null||s.updatePointSize({zoomIn:!0});break;case"-":s==null||s.updatePointSize({zoomIn:!1});break;case"v":t.setPointCloudValid(!t.valid);break;case"tab":if(o.shiftKey){H();break}N(),o.preventDefault();break;case"f":T();break;case"arrowup":b({y:-1});break;case"arrowdown":b({y:1});break;case"arrowleft":b({x:-1});break;case"arrowright":b({x:1});break;case"delete":K();break;default:{if(((n=r.attributeList)==null?void 0:n.length)>0){const m=ue.getAttributeByKeycode(o.keyCode,r.attributeList);m!==void 0&&((a=i.current)==null||a.setDefaultAttribute(m))}return}}},X=(e,o)=>{switch(e){case"c":F();break;case"v":R();break;case"a":o.preventDefault(),t.selectedAllBoxes();break;case"z":{o.shiftKey?V():L();break}}},A=e=>{if(!ae.hotkeyFilter(e)||u===!0)return;const o=e.key.toLocaleLowerCase();if(e.ctrlKey){X(o,e);return}Q(o,e)};return c(()=>{const{topViewInstance:e}=t;if(!!e)return window.addEventListener("keydown",A),()=>{window.removeEventListener("keydown",A)}},[t,q,r,t.pointCloudBoxList,t.polygonList]),c(()=>{$(r)},[E]),c(()=>{(r==null?void 0:r.radius)&&J(r==null?void 0:r.radius)},[r==null?void 0:r.radius]),c(()=>{v==null||v()},[x,t.mainViewInstance]),c(()=>{t.setHideAttributes([])},[x]),c(()=>{i.current.setDefaultAttribute=e=>{var o,n,a,d;B(e);const s=t.selectedPointCloudBox;if(s){s.attribute=e;const p=Y(Se({tool:ie.PointCloud,dataList:[s],stepConfig:r,action:"viewUpdateBox"}));s.valid=p[0].valid;const m=k(s);(a=(n=(o=t==null?void 0:t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null?void 0:n.setPolygonValidAndRender)==null||a.call(n,s.id,!0,s.valid),t.mainViewInstance&&_({newSelectedBox:s,newPointCloudList:m})}if(O&&M(f(y({},O),{attribute:e})),j&&W(f(y({},j),{attribute:e})),w){const p=U(f(y({},w),{attribute:e}));t.mainViewInstance&&((d=t.mainViewInstance)==null||d.generateSpheres(p),_({newSelectedSphere:w,newSphereList:p}))}},i.current.setSubAttribute=(e,o)=>{var n;const a=t.selectedPointCloudBox;if(a){const d=(n=a==null?void 0:a.subAttribute)!=null?n:{};a.subAttribute=f(y({},d),{[e]:o}),k(a)}},i.current.clearResult=()=>{C==null||C()},i.current.redo=()=>{V()},i.current.undo=()=>{L()},i.current.setValid=e=>{i.current.valid=e,setTimeout(()=>{t.setPointCloudValid(e),e===!1&&C()})},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(()=>{v==null||v(e)})}},[t.pointCloudBoxList,t.pointCloudSphereList,t.selectedID,t.valid,t.polygonList,t.lineList,t.mainViewInstance,t.ptSegmentInstance]),c(()=>{i.current.updateSegmentTool=e=>{var o;(o=t.ptSegmentInstance)==null||o.emit(e)},i.current.segmentInstance=t.ptSegmentInstance},[t.ptSegmentInstance]),c(()=>{i.current.history={pushHistory:e=>{G({pointCloudBoxList:e})},initRecord:()=>{}}},[]),c(()=>{var e;const o=(e=t.topViewInstance)==null?void 0:e.toolInstance;if(!o||u)return;const n=s=>{B(s)},a=s=>{g.error(s)},d=s=>{g.info(s)};return o.on("syncAttribute",n),o.on("messageError",a),o.on("messageInfo",d),()=>{o.unbind("syncAttribute",n),o.unbind("messageError",a),o.unbind("messageInfo",d)}},[t.topViewInstance]),null};var Oe=de(ce,null,null,{context:ve})(Be);export{Oe as default};
1
+ import{PointCloudContext as te}from"./PointCloudContext.js";import{useRotate as oe}from"./hooks/useRotate.js";import{useRotateEdge as re}from"./hooks/useRotateEdge.js";import{useBoxes as ne}from"./hooks/useBoxes.js";import{useSingleBox as se}from"./hooks/useSingleBox.js";import{useSphere as ie}from"./hooks/useSphere.js";import{useContext as ae,useEffect as c}from"react";import{EPointCloudName as ue,CommonToolUtils as le,AttributeUtils as de,EToolName as P,cTool as ce}from"@labelbee/lb-annotation";import{message as h}from"antd";import{connect as pe}from"react-redux";import{a2MapStateToProps as me}from"../../store/annotation/map.js";import{useStatus as ve}from"./hooks/useStatus.js";import{usePointCloudViews as be}from"./hooks/usePointCloudViews.js";import{LabelBeeContext as Pe,useDispatch as ye}from"../../store/ctx.js";import{useHistory as fe}from"./hooks/useHistory.js";import{useAttribute as we}from"./hooks/useAttribute.js";import{useConfig as Ce}from"./hooks/useConfig.js";import{usePolygon as ge}from"./hooks/usePolygon.js";import{useLine as he}from"./hooks/useLine.js";import{useTranslation as Se}from"react-i18next";import{PreDataProcess as ke}from"../../store/annotation/actionCreators.js";var xe=Object.defineProperty,_e=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,I=(l,r,u)=>r in l?xe(l,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[r]=u,y=(l,r)=>{for(var u in r||(r={}))Le.call(r,u)&&I(l,u,r[u]);if(E)for(var u of E(r))Be.call(r,u)&&I(l,u,r[u]);return l},f=(l,r)=>_e(l,Ve(r));const{EPolygonPattern:Oe}=ce,je=({currentData:l,config:r,checkMode:u,configString:D,imgIndex:S,toolInstanceRef:i})=>{const t=ae(te),{changeSelectedBoxValid:T,selectNextBox:N,selectPrevBox:H,updateSelectedBox:k,deleteSelectedPointCloudBoxAndPolygon:K}=se(),{selectedSphere:w,updatePointCloudSphere:U}=ie(),{clearAllResult:C,updatePointCloudPattern:R}=ve(),{copySelectedBoxes:z,pasteSelectedBoxes:F,copiedBoxes:q}=ne({config:r}),{updateRotate:x}=oe({currentData:l}),{updateRotateEdge:G}=re({currentData:l}),{updatePointCloudData:v,topViewSelectedChanged:_}=be(),{redo:V,undo:L,pushHistoryWithList:M,pushHistoryUnderUpdatePolygon:W,pushHistoryUnderUpdateLine:Y}=fe(),$=ye(),{syncThreeViewsAttribute:B}=we(),{syncAllViewsConfig:J,reRenderTopViewRange:Q}=Ce(),{selectedPolygon:O}=ge(),{selectedLine:j}=he(),{t:g}=Se(),b=e=>{var o;const{topViewInstance:n}=t;!n||(o=n.pointCloud2dOperation)==null||o.updateSelectedPolygonsPoints(e)},X=(e,o)=>{var n,a;const{topViewInstance:d,mainViewInstance:s}=t;if(!d)return;const{pointCloud2dOperation:p}=d;switch(e){case"q":{x(t.rectRotateSensitivity);break}case"e":x(-Number(t.rectRotateSensitivity));break;case"g":G(-90);break;case"u":{const m=p.pattern===Oe.Normal?P.Rect:P.Polygon;R(m);const ee={[P.Polygon]:g("PolygonPattern"),[P.Rect]:g("RectPattern")};h.success(g("ChangePatternMsg",{pattern:ee[m]})),p.clearActiveStatus(),p.clearDrawingStatus()}break;case"+":s==null||s.updatePointSize({zoomIn:!0});break;case"-":s==null||s.updatePointSize({zoomIn:!1});break;case"v":t.setPointCloudValid(!t.valid);break;case"tab":if(o.shiftKey){H();break}N(),o.preventDefault();break;case"f":T();break;case"arrowup":b({y:-1});break;case"arrowdown":b({y:1});break;case"arrowleft":b({x:-1});break;case"arrowright":b({x:1});break;case"delete":K();break;default:{if(((n=r.attributeList)==null?void 0:n.length)>0){const m=de.getAttributeByKeycode(o.keyCode,r.attributeList);m!==void 0&&((a=i.current)==null||a.setDefaultAttribute(m))}return}}},Z=(e,o)=>{switch(e){case"c":z();break;case"v":F();break;case"a":o.preventDefault(),t.selectedAllBoxes();break;case"z":{o.shiftKey?V():L();break}}},A=e=>{if(!le.hotkeyFilter(e)||u===!0)return;const o=e.key.toLocaleLowerCase();if(e.ctrlKey){Z(o,e);return}X(o,e)};return c(()=>{const{topViewInstance:e}=t;if(!!e)return window.addEventListener("keydown",A),()=>{window.removeEventListener("keydown",A)}},[t,q,r,t.pointCloudBoxList,t.polygonList]),c(()=>{J(r)},[D]),c(()=>{(r==null?void 0:r.radius)&&Q(r==null?void 0:r.radius)},[r==null?void 0:r.radius]),c(()=>{v==null||v()},[S,t.mainViewInstance]),c(()=>{t.setHideAttributes([])},[S]),c(()=>{i.current.setDefaultAttribute=e=>{var o,n,a,d;B(e);const s=t.selectedPointCloudBox;if(s){s.attribute=e;const p=$(ke({tool:ue.PointCloud,dataList:[s],stepConfig:r,action:"viewUpdateBox"}));s.valid=p[0].valid;const m=k(s);(a=(n=(o=t==null?void 0:t.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null?void 0:n.setPolygonValidAndRender)==null||a.call(n,s.id,!0,s.valid),t.mainViewInstance&&_({newSelectedBox:s,newPointCloudList:m})}if(O&&W(f(y({},O),{attribute:e})),j&&Y(f(y({},j),{attribute:e})),w){const p=U(f(y({},w),{attribute:e}));t.mainViewInstance&&((d=t.mainViewInstance)==null||d.generateSpheres(p),_({newSelectedSphere:w,newSphereList:p}))}},i.current.setSubAttribute=(e,o)=>{var n;const a=t.selectedPointCloudBox;if(a){const d=(n=a==null?void 0:a.subAttribute)!=null?n:{};a.subAttribute=f(y({},d),{[e]:o}),k(a)}},i.current.clearResult=()=>{C==null||C()},i.current.redo=()=>{V()},i.current.undo=()=>{L()},i.current.setValid=e=>{i.current.valid=e,setTimeout(()=>{t.setPointCloudValid(e),e===!1&&C()})},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(()=>{v==null||v(e)})}},[t.pointCloudBoxList,t.pointCloudSphereList,t.selectedID,t.valid,t.polygonList,t.lineList,t.mainViewInstance,t.ptSegmentInstance]),c(()=>{i.current.updateSegmentTool=e=>{var o;(o=t.ptSegmentInstance)==null||o.emit(e)},i.current.segmentInstance=t.ptSegmentInstance},[t.ptSegmentInstance]),c(()=>{i.current.history={pushHistory:e=>{M({pointCloudBoxList:e})},initRecord:()=>{}}},[]),c(()=>{var e;const o=(e=t.topViewInstance)==null?void 0:e.toolInstance;if(!o||u)return;const n=s=>{B(s)},a=s=>{h.error(s)},d=s=>{h.info(s)};return o.on("syncAttribute",n),o.on("messageError",a),o.on("messageInfo",d),()=>{o.unbind("syncAttribute",n),o.unbind("messageError",a),o.unbind("messageInfo",d)}},[t.topViewInstance]),null};var Ae=pe(me,null,null,{context:Pe})(je);export{Ae as default};
@@ -1 +1 @@
1
- import{getClassName as x}from"../../utils/dom.js";import{FooterDivider as z}from"../../views/MainView/toolFooter/index.js";import{ZoomController as ae}from"../../views/MainView/toolFooter/ZoomController/index.js";import{LeftOutlined as ce,UpSquareOutlined as de,DownSquareOutlined as pe}from"@ant-design/icons";import{cKeyCode as ue,PointCloudAnnotation as me,cTool as fe,cAnnotation as ve}from"@labelbee/lb-annotation";import{PointCloudUtils as H}from"@labelbee/lb-utils";import i,{useState as W,useRef as we,useLayoutEffect as Ce,useEffect as h}from"react";import{PointCloudContext as F}from"./PointCloudContext.js";import{useRotate as Pe}from"./hooks/useRotate.js";import{useSingleBox as K}from"./hooks/useSingleBox.js";import{PointCloudContainer as ge}from"./PointCloudLayout.js";import{BoxInfos as X,PointCloudValidity as ye}from"./PointCloudInfos.js";import{usePolygon as Ie}from"./hooks/usePolygon.js";import{useSphere as Y}from"./hooks/useSphere.js";import{useZoom as q}from"./hooks/useZoom.js";import{Slider as xe}from"antd";import{a2MapStateToProps as he}from"../../store/annotation/map.js";import{connect as Ve}from"react-redux";import{usePointCloudViews as Se}from"./hooks/usePointCloudViews.js";import _e from"../../hooks/useSize.js";import{useTranslation as Ee}from"react-i18next";import{LabelBeeContext as Le}from"../../store/ctx.js";import{jsonParser as Oe}from"../../utils/index.js";import be from"../../utils/ToolUtils.js";import je from"lodash";import Te from"./components/PointCloudSizeSlider/index.js";import{useHistory as ke}from"./hooks/useHistory.js";import Ae from"./components/TitleButton/index.js";var Ne=Object.defineProperty,De=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,$=(n,s,r)=>s in n?Ne(n,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[s]=r,D=(n,s)=>{for(var r in s||(s={}))Re.call(s,r)&&$(n,r,s[r]);if(M)for(var r of M(s))Ue.call(s,r)&&$(n,r,s[r]);return n},B=(n,s)=>De(n,Be(s));const{EPolygonPattern:Ze,EToolName:G}=fe,{ESortDirection:J}=ve,ze=ue.default,Q=(n,s,r=1)=>{const{width:v,height:u}=s,g={x:n.x+v*r/2,y:n.y+u*r/2},y={x:s.width/2,y:s.height/2};return{offsetX:(y.x-g.x)/r,offsetY:-(y.y-g.y)/r}},He=({currentData:n})=>{var s,r;const{zoom:v,zoomIn:u,zoomOut:g,initialPosition:y}=q(),{selectNextBox:_,selectPrevBox:E}=K(),{switchToNextSphere:V}=Y(),{updateRotate:I}=Pe({currentData:n}),w=i.useContext(F),{topViewInstance:L}=w,S=(r=(s=w==null?void 0:w.topViewInstance)==null?void 0:s.toolScheduler)==null?void 0:r.getCurrentToolName(),C=()=>{I(-Number(w.rectRotateSensitivity))},e=()=>{I(w.rectRotateSensitivity)},c=()=>{I(180)};return i.createElement(i.Fragment,null,i.createElement(Te,{onChange:m=>{var O;(O=L==null?void 0:L.pointCloudInstance)==null||O.updatePointSize({customSize:m})}}),i.createElement("span",{onClick:e,className:x("point-cloud","rotate-reserve")}),i.createElement("span",{onClick:C,className:x("point-cloud","rotate")}),i.createElement("span",{onClick:c,className:x("point-cloud","rotate-180")}),i.createElement(z,null),i.createElement(de,{onClick:()=>{if(S===G.Point){V(J.descend);return}E(!0)},className:x("point-cloud","prev")}),i.createElement(pe,{onClick:()=>{if(S===G.Point){V(J.ascend);return}_(!0)},className:x("point-cloud","next")}),i.createElement(z,null),i.createElement(ae,{initialPosition:y,zoomIn:u,zoomOut:g,zoom:v}))},We=({setZAxisLimit:n,zAxisLimit:s,checkMode:r})=>r?null:i.createElement("div",{style:{position:"absolute",top:128,right:8,height:"50%",zIndex:20}},i.createElement(xe,{vertical:!0,step:.5,max:10,min:.5,defaultValue:s,onAfterChange:v=>{n(v)}})),Fe=({currentData:n,imgList:s,stepInfo:r,drawLayerSlot:v,checkMode:u,intelligentFit:g,setIsEnlargeTopView:y,isEnlargeTopView:_,onExitZoom:E,highlightAttribute:V})=>{var I,w;const[L,S]=W({zoom:1,currentPos:{x:0,y:0}}),C=we(null),e=i.useContext(F),c=_e(C),m=Oe(r.config),{setZoom:O,syncTopviewToolZoom:R}=q(),{hideAttributes:ee}=e,{addPolygon:te,deletePolygon:oe}=Ie(),{deletePointCloudSphere:ne}=Y(),{deletePointCloudBox:ie,changeValidByID:le}=K(),[b,se]=W(10),{t:U}=Ee(),P=Se(),{pushHistoryWithList:re}=ke();Ce(()=>{if(!e.topViewInstance&&C.current&&(n==null?void 0:n.url)&&(n==null?void 0:n.result)){const o={width:C.current.clientWidth,height:C.current.clientHeight},a=new me({container:C.current,size:o,pcdPath:n.url,config:B(D({},m),{pointCloudPattern:e.pointCloudPattern}),checkMode:u,toolName:be.getPointCloudToolList(),proxyMode:u});e.setTopViewInstance(a)}},[n]),h(()=>{if(!c||!e.topViewInstance||!e.sideViewInstance)return;const{toolInstance:o}=e.topViewInstance;o.singleOn("dataUpdated",(t,l)=>{const p=je.cloneDeep(t).map(d=>B(D({},d),{pointList:H.pointListTransferCanvas2World(d.pointList,c)}));e.setSelectedIDs(l),e.setLineList(p),re({lineList:p})}),o.singleOn("pointCreated",(t,l)=>{P.topViewAddSphere({newPoint:t,size:c,trackConfigurable:m.trackConfigurable,zoom:l})}),o.singleOn("pointDeleted",t=>{ne(t)}),o.singleOn("pointSelected",t=>{e.setSelectedIDs([t])}),o.singleOn("updatePointByDrag",(t,l)=>{var p;(p=P.topViewUpdatePoint)==null||p.call(P,t,c)}),o.singleOn("polygonCreated",(t,l)=>{if(o.pattern===Ze.Normal||!(n==null?void 0:n.url)){const p=B(D({},t),{pointList:t.pointList.map(d=>H.transferCanvas2World(d,c))});te(p),e.setSelectedIDs(ee.includes(t.attribute)?"":t.id);return}P.topViewAddBox({polygon:t,size:c,imgList:s,trackConfigurable:m.trackConfigurable,zoom:l,intelligentFit:g})}),o.singleOn("deletedObject",({id:t})=>{ie(t),oe(t)}),o.singleOn("deleteSelectedIDs",()=>{e.setSelectedIDs([])}),o.singleOn("addSelectedIDs",t=>{e.addSelectedID(t)}),o.singleOn("setSelectedIDs",t=>{e.setSelectedIDs(t)}),o.singleOn("updatePolygonByDrag",t=>{var l;(l=P.topViewUpdateBox)==null||l.call(P,t,c)});const a=t=>{var l;const p=le(t);p&&e.syncAllViewPointCloudColor(p),e.polygonList.find(d=>d.id===t)&&((l=e.topViewInstance)==null||l.toolInstance.setPolygonValidAndRender(t,!0))};return o.on("validUpdate",a),()=>{o.unbind("validUpdate",a)}},[e,c,n,P,e.polygonList,e.lineList,(I=e.topViewInstance)==null?void 0:I.toolInstance]),h(()=>{var o,a;if(!(c==null?void 0:c.width)||!e.topViewInstance)return;const t=(a=(o=m==null?void 0:m.attributeList)==null?void 0:o[0])==null?void 0:a.value;t&&e.topViewInstance.toolInstance.setDefaultAttribute(t),e.topViewInstance.initSize(c),e.topViewInstance.updatePolygonList(e.displayPointCloudList,e.polygonList),e.topViewInstance.updatePointList(e.displaySphereList),e.topViewInstance.updateLineList(e.displayLineList);const{topViewInstance:{pointCloudInstance:l,toolInstance:p}}=e;p.singleOn("renderZoom",(d,f)=>{const{offsetX:j,offsetY:T}=Q(f,c,d);if(l.camera.zoom=d,f){const{x:k,y:A,z:N}=l.initCameraPosition;l.camera.position.set(k+T,A-j,N)}l.camera.updateProjectionMatrix(),l.render(),O(d),R(f,d,c),S({zoom:d,currentPos:f})}),p.singleOn("dragMove",({currentPos:d,zoom:f})=>{const{offsetX:j,offsetY:T}=Q(d,c,f);l.camera.zoom=f;const{x:k,y:A,z:N}=l.initCameraPosition;l.camera.position.set(k+T,A-j,N),l.render(),R(d,f,c),S({zoom:f,currentPos:d})})},[c,e.topViewInstance,(w=e.topViewInstance)==null?void 0:w.toolInstance]),h(()=>{var o,a;(a=(o=e.topViewInstance)==null?void 0:o.pointCloudInstance)==null||a.applyZAxisPoints(b)},[b]),h(()=>{var o,a,t,l;P.topViewSelectedChanged({}),(l=(t=(a=(o=e.topViewInstance)==null?void 0:o.toolInstance)==null?void 0:a.selection)==null?void 0:t.hardSetSelectedIDs)==null||l.call(t,e.selectedIDs)},[e.selectedIDs]),h(()=>(window.addEventListener("keydown",Z),()=>{window.removeEventListener("keydown",Z)}),[]);const Z=o=>{const{keyCode:a}=o;a===ze.Esc&&E()};return h(()=>{var o,a,t;(t=(a=(o=e.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null?void 0:a.setHighlightAttribute)==null||t.call(a,V)},[e.topViewInstance,V]),i.createElement(ge,{className:x("point-cloud-container","top-view"),title:_?i.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative"}},i.createElement(ce,{style:{cursor:"pointer",marginRight:"12px"},onClick:()=>{E()}}),i.createElement("span",null,U("TopView")),i.createElement(X,{checkMode:u,config:m,style:{display:"flex",position:"initial",margin:"0px 20px"}})):i.createElement(Ae,{title:U("TopView"),onClick:()=>{y(!0)}}),toolbar:i.createElement(He,{currentData:n})},i.createElement("div",{style:{position:"relative",flex:1}},i.createElement("div",{style:{width:"100%",height:"100%"},ref:C},v==null?void 0:v(L)),!_&&i.createElement(X,{checkMode:u,config:m}),i.createElement(We,{checkMode:u,zAxisLimit:b,setZAxisLimit:se}),i.createElement(ye,null)))};var Ke=Ve(he,null,null,{context:Le})(Fe);export{Ke as default};
1
+ import{getClassName as I}from"../../utils/dom.js";import{FooterDivider as z}from"../../views/MainView/toolFooter/index.js";import{ZoomController as ae}from"../../views/MainView/toolFooter/ZoomController/index.js";import{LeftOutlined as ce,UpSquareOutlined as de,DownSquareOutlined as pe}from"@ant-design/icons";import{cKeyCode as ue,PointCloudAnnotation as me,cTool as fe,cAnnotation as ve}from"@labelbee/lb-annotation";import{PointCloudUtils as H}from"@labelbee/lb-utils";import i,{useState as W,useRef as we,useLayoutEffect as Ce,useEffect as x}from"react";import{PointCloudContext as F}from"./PointCloudContext.js";import{useRotate as ge}from"./hooks/useRotate.js";import{useRotateEdge as Pe}from"./hooks/useRotateEdge.js";import{useSingleBox as K}from"./hooks/useSingleBox.js";import{PointCloudContainer as ye}from"./PointCloudLayout.js";import{BoxInfos as X,PointCloudValidity as Ie}from"./PointCloudInfos.js";import{usePolygon as xe}from"./hooks/usePolygon.js";import{useSphere as Y}from"./hooks/useSphere.js";import{useZoom as q}from"./hooks/useZoom.js";import{Slider as he}from"antd";import{a2MapStateToProps as Ve}from"../../store/annotation/map.js";import{connect as Se}from"react-redux";import{usePointCloudViews as _e}from"./hooks/usePointCloudViews.js";import Ee from"../../hooks/useSize.js";import{useTranslation as Le}from"react-i18next";import{LabelBeeContext as Oe}from"../../store/ctx.js";import{jsonParser as be}from"../../utils/index.js";import je from"../../utils/ToolUtils.js";import Te from"lodash";import ke from"./components/PointCloudSizeSlider/index.js";import{useHistory as Ae}from"./hooks/useHistory.js";import Ne from"./components/TitleButton/index.js";var Re=Object.defineProperty,Be=Object.defineProperties,De=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,$=(n,l,r)=>l in n?Re(n,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[l]=r,B=(n,l)=>{for(var r in l||(l={}))Ue.call(l,r)&&$(n,r,l[r]);if(M)for(var r of M(l))Ze.call(l,r)&&$(n,r,l[r]);return n},D=(n,l)=>Be(n,De(l));const{EPolygonPattern:ze,EToolName:G}=fe,{ESortDirection:J}=ve,He=ue.default,Q=(n,l,r=1)=>{const{width:w,height:u}=l,P={x:n.x+w*r/2,y:n.y+u*r/2},y={x:l.width/2,y:l.height/2};return{offsetX:(y.x-P.x)/r,offsetY:-(y.y-P.y)/r}},We=({currentData:n})=>{var l,r;const{zoom:w,zoomIn:u,zoomOut:P,initialPosition:y}=q(),{selectNextBox:E,selectPrevBox:L}=K(),{switchToNextSphere:h}=Y(),{updateRotate:V}=ge({currentData:n}),{updateRotateEdge:O}=Pe({currentData:n}),g=i.useContext(F),{topViewInstance:S}=g,m=(r=(l=g==null?void 0:g.topViewInstance)==null?void 0:l.toolScheduler)==null?void 0:r.getCurrentToolName(),e=()=>{V(-Number(g.rectRotateSensitivity))},c=()=>{V(g.rectRotateSensitivity)},f=()=>{O(-90)};return i.createElement(i.Fragment,null,i.createElement(ke,{onChange:b=>{var _;(_=S==null?void 0:S.pointCloudInstance)==null||_.updatePointSize({customSize:b})}}),i.createElement("span",{onClick:c,className:I("point-cloud","rotate-reserve")}),i.createElement("span",{onClick:e,className:I("point-cloud","rotate")}),i.createElement("span",{onClick:f,className:I("point-cloud","rotate-90")}),i.createElement(z,null),i.createElement(de,{onClick:()=>{if(m===G.Point){h(J.descend);return}L(!0)},className:I("point-cloud","prev")}),i.createElement(pe,{onClick:()=>{if(m===G.Point){h(J.ascend);return}E(!0)},className:I("point-cloud","next")}),i.createElement(z,null),i.createElement(ae,{initialPosition:y,zoomIn:u,zoomOut:P,zoom:w}))},Fe=({setZAxisLimit:n,zAxisLimit:l,checkMode:r})=>r?null:i.createElement("div",{style:{position:"absolute",top:128,right:8,height:"50%",zIndex:20}},i.createElement(he,{vertical:!0,step:.5,max:10,min:.5,defaultValue:l,onAfterChange:w=>{n(w)}})),Ke=({currentData:n,imgList:l,stepInfo:r,drawLayerSlot:w,checkMode:u,intelligentFit:P,setIsEnlargeTopView:y,isEnlargeTopView:E,onExitZoom:L,highlightAttribute:h})=>{var V,O;const[g,S]=W({zoom:1,currentPos:{x:0,y:0}}),m=we(null),e=i.useContext(F),c=Ee(m),f=be(r.config),{setZoom:b,syncTopviewToolZoom:_}=q(),{hideAttributes:ee}=e,{addPolygon:te,deletePolygon:oe}=xe(),{deletePointCloudSphere:ne}=Y(),{deletePointCloudBox:ie,changeValidByID:se}=K(),[j,le]=W(10),{t:U}=Le(),C=_e(),{pushHistoryWithList:re}=Ae();Ce(()=>{if(!e.topViewInstance&&m.current&&(n==null?void 0:n.url)&&(n==null?void 0:n.result)){const o={width:m.current.clientWidth,height:m.current.clientHeight},a=new me({container:m.current,size:o,pcdPath:n.url,config:D(B({},f),{pointCloudPattern:e.pointCloudPattern}),checkMode:u,toolName:je.getPointCloudToolList(),proxyMode:u});e.setTopViewInstance(a)}},[n]),x(()=>{if(!c||!e.topViewInstance||!e.sideViewInstance)return;const{toolInstance:o}=e.topViewInstance;o.singleOn("dataUpdated",(t,s)=>{const p=Te.cloneDeep(t).map(d=>D(B({},d),{pointList:H.pointListTransferCanvas2World(d.pointList,c)}));e.setSelectedIDs(s),e.setLineList(p),re({lineList:p})}),o.singleOn("pointCreated",(t,s)=>{C.topViewAddSphere({newPoint:t,size:c,trackConfigurable:f.trackConfigurable,zoom:s})}),o.singleOn("pointDeleted",t=>{ne(t)}),o.singleOn("pointSelected",t=>{e.setSelectedIDs([t])}),o.singleOn("updatePointByDrag",(t,s)=>{var p;(p=C.topViewUpdatePoint)==null||p.call(C,t,c)}),o.singleOn("polygonCreated",(t,s)=>{if(o.pattern===ze.Normal||!(n==null?void 0:n.url)){const p=D(B({},t),{pointList:t.pointList.map(d=>H.transferCanvas2World(d,c))});te(p),e.setSelectedIDs(ee.includes(t.attribute)?"":t.id);return}C.topViewAddBox({polygon:t,size:c,imgList:l,trackConfigurable:f.trackConfigurable,zoom:s,intelligentFit:P})}),o.singleOn("deletedObject",({id:t})=>{ie(t),oe(t)}),o.singleOn("deleteSelectedIDs",()=>{e.setSelectedIDs([])}),o.singleOn("addSelectedIDs",t=>{e.addSelectedID(t)}),o.singleOn("setSelectedIDs",t=>{e.setSelectedIDs(t)}),o.singleOn("updatePolygonByDrag",t=>{var s;(s=C.topViewUpdateBox)==null||s.call(C,t,c)});const a=t=>{var s;const p=se(t);p&&e.syncAllViewPointCloudColor(p),e.polygonList.find(d=>d.id===t)&&((s=e.topViewInstance)==null||s.toolInstance.setPolygonValidAndRender(t,!0))};return o.on("validUpdate",a),()=>{o.unbind("validUpdate",a)}},[e,c,n,C,e.polygonList,e.lineList,(V=e.topViewInstance)==null?void 0:V.toolInstance]),x(()=>{var o,a;if(!(c==null?void 0:c.width)||!e.topViewInstance)return;const t=(a=(o=f==null?void 0:f.attributeList)==null?void 0:o[0])==null?void 0:a.value;t&&e.topViewInstance.toolInstance.setDefaultAttribute(t),e.topViewInstance.initSize(c),e.topViewInstance.updatePolygonList(e.displayPointCloudList,e.polygonList),e.topViewInstance.updatePointList(e.displaySphereList),e.topViewInstance.updateLineList(e.displayLineList);const{topViewInstance:{pointCloudInstance:s,toolInstance:p}}=e;p.singleOn("renderZoom",(d,v)=>{const{offsetX:T,offsetY:k}=Q(v,c,d);if(s.camera.zoom=d,v){const{x:A,y:N,z:R}=s.initCameraPosition;s.camera.position.set(A+k,N-T,R)}s.camera.updateProjectionMatrix(),s.render(),b(d),_(v,d,c),S({zoom:d,currentPos:v})}),p.singleOn("dragMove",({currentPos:d,zoom:v})=>{const{offsetX:T,offsetY:k}=Q(d,c,v);s.camera.zoom=v;const{x:A,y:N,z:R}=s.initCameraPosition;s.camera.position.set(A+k,N-T,R),s.render(),_(d,v,c),S({zoom:v,currentPos:d})})},[c,e.topViewInstance,(O=e.topViewInstance)==null?void 0:O.toolInstance]),x(()=>{var o,a;(a=(o=e.topViewInstance)==null?void 0:o.pointCloudInstance)==null||a.applyZAxisPoints(j)},[j]),x(()=>{var o,a,t,s;C.topViewSelectedChanged({}),(s=(t=(a=(o=e.topViewInstance)==null?void 0:o.toolInstance)==null?void 0:a.selection)==null?void 0:t.hardSetSelectedIDs)==null||s.call(t,e.selectedIDs)},[e.selectedIDs]),x(()=>(window.addEventListener("keydown",Z),()=>{window.removeEventListener("keydown",Z)}),[]);const Z=o=>{const{keyCode:a}=o;a===He.Esc&&L()};return x(()=>{var o,a,t;(t=(a=(o=e.topViewInstance)==null?void 0:o.pointCloud2dOperation)==null?void 0:a.setHighlightAttribute)==null||t.call(a,h)},[e.topViewInstance,h]),i.createElement(ye,{className:I("point-cloud-container","top-view"),title:E?i.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative"}},i.createElement(ce,{style:{cursor:"pointer",marginRight:"12px"},onClick:()=>{L()}}),i.createElement("span",null,U("TopView")),i.createElement(X,{checkMode:u,config:f,style:{display:"flex",position:"initial",margin:"0px 20px"}})):i.createElement(Ne,{title:U("TopView"),onClick:()=>{y(!0)}}),toolbar:i.createElement(We,{currentData:n})},i.createElement("div",{style:{position:"relative",flex:1}},i.createElement("div",{style:{width:"100%",height:"100%"},ref:m},w==null?void 0:w(g)),!E&&i.createElement(X,{checkMode:u,config:f}),i.createElement(Fe,{checkMode:u,zAxisLimit:j,setZAxisLimit:le}),i.createElement(Ie,null)))};var Xe=Se(Ve,null,null,{context:Oe})(Ke);export{Xe as default};
@@ -0,0 +1 @@
1
+ import{useContext as m}from"react";import{synchronizeSideView as w,synchronizeBackView as C}from"./usePointCloudViews.js";import{useSingleBox as h}from"./useSingleBox.js";import{PointCloudContext as x}from"../PointCloudContext.js";import{useThrottleFn as f}from"ahooks";import{PointCloudUtils as V}from"@labelbee/lb-utils";const y=({currentData:t})=>{const e=m(x),{selectedBox:l,updateSelectedBox:c}=h(),{run:u}=f(a=>{const{topViewInstance:r,mainViewInstance:i,syncAllViewPointCloudColor:p}=e;if(!r||!i)return;const{pointCloud2dOperation:s}=r,o=l==null?void 0:l.info;if(!o||!(t==null?void 0:t.url)||!e.backViewInstance)return;const n=s.selectedPolygon.pointList||[],P=n.shift();n.push(P);const g=c({newPointList:n,rotation:V.restrictAngleRange(o.rotation+Number(Math.PI*a)/180),width:o.height,height:o.width});s.rotatePolygonEdge(n);const d=s.selectedPolygon;i.generateBox(o),p(g),w(o,d,e.sideViewInstance,t.url),C(o,d,e.backViewInstance,t.url),i.render()},{wait:800});return{updateRotateEdge:u}};export{y as useRotateEdge};
package/es/index.css CHANGED
@@ -2539,14 +2539,14 @@
2539
2539
  margin-right: 16px;
2540
2540
  background-image: url("../dist/assets/icons/7eadb9c4.svg");
2541
2541
  }
2542
- .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-180 {
2542
+ .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-90 {
2543
2543
  display: inline-block;
2544
2544
  height: 24px;
2545
2545
  width: 24px;
2546
2546
  background-repeat: no-repeat;
2547
2547
  cursor: pointer;
2548
2548
  flex: none;
2549
- background-image: url("../dist/assets/icons/9d70807.svg");
2549
+ background-image: url("../dist/assets/icons/ad33251.svg");
2550
2550
  }
2551
2551
  .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__next {
2552
2552
  font-size: 24px;
@@ -1 +1 @@
1
- import{backward as n,forward as e,scale as a,fullScreen as u}from"../common/index.js";import s from"../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js";import C from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import d from"../../../../../../assets/annotation/pointCloudTool/changePointCloudValid.svg.js";import l from"../../../../../../assets/annotation/pointCloudTool/copy.svg.js";import p from"../../../../../../assets/annotation/pointCloudTool/nextBox.svg.js";import h from"../../../../../../assets/annotation/pointCloudTool/patse.svg.js";import f from"../../../../../../assets/annotation/pointCloudTool/prevBox.svg.js";import S from"../../../../../../assets/annotation/pointCloudTool/rotate180_black.svg.js";import v from"../../../../../../assets/annotation/pointCloudTool/selectAll.svg.js";import P from"../../../../../../assets/annotation/pointCloudTool/selectMultiple.svg.js";import j from"../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js";import T from"../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js";import y from"../../../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import x from"../../../../../../assets/annotation/rectTool/icon_rect.svg.js";import R from"../../../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import _ from"../../../../../../assets/annotation/pointCloudTool/addSvg.svg.js";import $ from"../../../../../../assets/annotation/pointCloudTool/clearSvg.svg.js";import t from"react";import{ReloadOutlined as I,RotateLeftOutlined as B,RotateRightOutlined as b}from"@ant-design/icons";import{polygon as D,invalidPolygon as k,selectedPolygon as A,changePolygonAttribute as V,deletePolygon as M,insertPolygonPoint as O,deletePolygonPoint as w}from"../polygon/index.js";const r={name:"PointThickness",icon:t.createElement("span",{style:{display:" inline-block",width:14,height:14,borderRadius:"50%",border:"1px solid"}}),shortCut:["+","-"],linkSymbol:""},i={name:"RotateAroundCenterPoint",icon:t.createElement(I,null),shortCut:[C],noticeInfo:"DragOperation"},c={name:"PointCloudViewTranslate",icon:s,shortCut:[o],noticeInfo:"Drag"},m={name:"TopViewTranslate",icon:s,shortCut:[o]},g={name:"ChangePointCloudValid",icon:d,shortCut:["V"]},E={name:"CopyBox",icon:l,shortCut:["Ctrl","C"]},H={name:"PasteBox",icon:h,shortCut:["Ctrl","V"]},K={name:"RotateLeft",icon:t.createElement(B,null),shortCut:["Q"]},L={name:"RotateRight",icon:t.createElement(b,null),shortCut:["E"]},G={name:"PreviousBox",icon:f,shortCut:["Shift","Tab"]},N={name:"NextBox",icon:p,shortCut:["Tab"]},z={name:"Rotate180",icon:S,shortCut:["G"],noticeInfo:"SelectedStatus"},F={name:"CopyPrevPage",icon:l,shortCut:["Alt","C"]},J={name:"ChangeBoxValid",icon:j,shortCut:["F"],noticeInfo:"SelectedStatus"},Q={name:"MultiSelect",icon:P,shortCut:["Ctrl",o]},U={name:"SelectAllBox",icon:v,shortCut:["Ctrl","A"]},Y={name:"Delete",icon:T,shortCut:["Del"],noticeInfo:"SelectedStatus"},q={name:"LassoSelector",icon:y,shortCut:["H"],noticeInfo:"SelectorMsg"},W={name:"RectSelector",icon:x,shortCut:["J"],noticeInfo:"SelectorMsg"},X={name:"CircleSelector",icon:R,shortCut:["K"],noticeInfo:"SelectorMsg"},Z={name:"PointCloudViewTranslate",icon:s,shortCut:["space",o]},oo={name:"AddPoint",icon:_,shortCut:["U"]},to={name:"DeletePoint",icon:$,shortCut:["I"]},no=[{name:"GeneralOperation"},n,e,r,a,i,c,m,g,{name:"RectPattern"},E,H,K,L,G,N,z,F,J,Y,Q,U,u],eo=[{name:"GeneralOperation"},n,e,r,a,i,c,m,g,{name:"PolygonPattern"},D,k,A,V,M,O,w],so=[n,e,i,Z,q,W,X,oo,to];export{no as default,eo as pointCloudShortCutTable_POLYGON,so as pointCloudShortCutTable_SEGMENT};
1
+ import{backward as n,forward as e,scale as a,fullScreen as u}from"../common/index.js";import s from"../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js";import C from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import d from"../../../../../../assets/annotation/pointCloudTool/changePointCloudValid.svg.js";import l from"../../../../../../assets/annotation/pointCloudTool/copy.svg.js";import p from"../../../../../../assets/annotation/pointCloudTool/nextBox.svg.js";import h from"../../../../../../assets/annotation/pointCloudTool/patse.svg.js";import f from"../../../../../../assets/annotation/pointCloudTool/prevBox.svg.js";import S from"../../../../../../assets/annotation/pointCloudTool/rotate90_black.svg.js";import v from"../../../../../../assets/annotation/pointCloudTool/selectAll.svg.js";import P from"../../../../../../assets/annotation/pointCloudTool/selectMultiple.svg.js";import j from"../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js";import T from"../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js";import y from"../../../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import x from"../../../../../../assets/annotation/rectTool/icon_rect.svg.js";import R from"../../../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import _ from"../../../../../../assets/annotation/pointCloudTool/addSvg.svg.js";import $ from"../../../../../../assets/annotation/pointCloudTool/clearSvg.svg.js";import t from"react";import{ReloadOutlined as I,RotateLeftOutlined as B,RotateRightOutlined as b}from"@ant-design/icons";import{polygon as D,invalidPolygon as k,selectedPolygon as A,changePolygonAttribute as V,deletePolygon as M,insertPolygonPoint as O,deletePolygonPoint as w}from"../polygon/index.js";const r={name:"PointThickness",icon:t.createElement("span",{style:{display:" inline-block",width:14,height:14,borderRadius:"50%",border:"1px solid"}}),shortCut:["+","-"],linkSymbol:""},i={name:"RotateAroundCenterPoint",icon:t.createElement(I,null),shortCut:[C],noticeInfo:"DragOperation"},c={name:"PointCloudViewTranslate",icon:s,shortCut:[o],noticeInfo:"Drag"},m={name:"TopViewTranslate",icon:s,shortCut:[o]},g={name:"ChangePointCloudValid",icon:d,shortCut:["V"]},E={name:"CopyBox",icon:l,shortCut:["Ctrl","C"]},H={name:"PasteBox",icon:h,shortCut:["Ctrl","V"]},K={name:"RotateLeft",icon:t.createElement(B,null),shortCut:["Q"]},L={name:"RotateRight",icon:t.createElement(b,null),shortCut:["E"]},G={name:"PreviousBox",icon:f,shortCut:["Shift","Tab"]},N={name:"NextBox",icon:p,shortCut:["Tab"]},z={name:"Rotate90",icon:S,shortCut:["G"],noticeInfo:"SelectedStatus"},F={name:"CopyPrevPage",icon:l,shortCut:["Alt","C"]},J={name:"ChangeBoxValid",icon:j,shortCut:["F"],noticeInfo:"SelectedStatus"},Q={name:"MultiSelect",icon:P,shortCut:["Ctrl",o]},U={name:"SelectAllBox",icon:v,shortCut:["Ctrl","A"]},Y={name:"Delete",icon:T,shortCut:["Del"],noticeInfo:"SelectedStatus"},q={name:"LassoSelector",icon:y,shortCut:["H"],noticeInfo:"SelectorMsg"},W={name:"RectSelector",icon:x,shortCut:["J"],noticeInfo:"SelectorMsg"},X={name:"CircleSelector",icon:R,shortCut:["K"],noticeInfo:"SelectorMsg"},Z={name:"PointCloudViewTranslate",icon:s,shortCut:["space",o]},oo={name:"AddPoint",icon:_,shortCut:["U"]},to={name:"DeletePoint",icon:$,shortCut:["I"]},no=[{name:"GeneralOperation"},n,e,r,a,i,c,m,g,{name:"RectPattern"},E,H,K,L,G,N,z,F,J,Y,Q,U,u],eo=[{name:"GeneralOperation"},n,e,r,a,i,c,m,g,{name:"PolygonPattern"},D,k,A,V,M,O,w],so=[n,e,i,Z,q,W,X,oo,to];export{no as default,eo as pointCloudShortCutTable_POLYGON,so as pointCloudShortCutTable_SEGMENT};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@labelbee/lb-components",
3
- "version": "1.23.0-alpha.44",
3
+ "version": "1.23.0-alpha.45",
4
4
  "description": "Provide a complete library of annotation components",
5
5
  "main": "./dist/index.js",
6
6
  "es": "./es/index.js",
@@ -43,8 +43,8 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@ant-design/icons": "^4.6.2",
46
- "@labelbee/lb-annotation": "1.27.0-alpha.21",
47
- "@labelbee/lb-utils": "1.19.0-alpha.15",
46
+ "@labelbee/lb-annotation": "1.27.0-alpha.22",
47
+ "@labelbee/lb-utils": "1.19.0-alpha.16",
48
48
  "@labelbee/wavesurfer": "1.0.0",
49
49
  "@types/react-dom": "^18.2.7",
50
50
  "@types/react-transition-group": "^4.4.9",
@@ -1 +0,0 @@
1
- "use strict";require("react");var img="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M14.0606 2.74219V5.16642H11.6364' stroke='%23666666' stroke-width='0.8' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M14.6667 8.50016C14.6667 12.1821 11.6819 15.1668 8.00002 15.1668C4.31812 15.1668 1.33335 12.1821 1.33335 8.50016C1.33335 4.81826 4.31812 1.8335 8.00002 1.8335C10.4674 1.8335 12.6217 3.17387 13.7744 5.1662' stroke='%23666666' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.219 11V6.016H3.281L2.518 6.611V7.661L3.281 7.115V11H4.219ZM7.6968 9.572C7.6968 9.299 7.6758 9.012 7.5638 8.781C7.4938 8.641 7.3958 8.529 7.2628 8.424C7.3818 8.326 7.4658 8.221 7.5288 8.095C7.6408 7.857 7.6618 7.612 7.6618 7.353C7.6618 6.926 7.5918 6.562 7.3048 6.275C7.0878 6.058 6.7798 5.96 6.4438 5.96C6.1078 5.96 5.8138 6.058 5.5968 6.275C5.3098 6.562 5.2398 6.926 5.2398 7.353C5.2398 7.612 5.2608 7.857 5.3728 8.095C5.4358 8.221 5.5198 8.326 5.6388 8.424C5.5058 8.529 5.4078 8.641 5.3378 8.781C5.2258 9.012 5.2048 9.299 5.2048 9.572C5.2048 10.041 5.2328 10.412 5.5618 10.734C5.7858 10.951 6.1148 11.056 6.4508 11.056C6.7868 11.056 7.1158 10.951 7.3398 10.734C7.6688 10.412 7.6968 10.041 7.6968 9.572ZM6.7588 9.523C6.7588 9.656 6.7728 9.978 6.6748 10.111C6.6258 10.174 6.5418 10.216 6.4508 10.216C6.3598 10.216 6.2758 10.181 6.2268 10.111C6.1288 9.971 6.1428 9.656 6.1428 9.523C6.1428 9.39 6.1218 9.061 6.2268 8.921C6.2758 8.851 6.3598 8.816 6.4508 8.816C6.5418 8.816 6.6188 8.851 6.6748 8.921C6.7798 9.061 6.7588 9.39 6.7588 9.523ZM6.7238 7.402C6.7238 7.528 6.7518 7.843 6.6258 7.969C6.5838 8.011 6.5208 8.032 6.4508 8.032C6.3808 8.032 6.3248 8.011 6.2758 7.969C6.1428 7.85 6.1778 7.528 6.1778 7.402C6.1778 7.283 6.1568 7.003 6.2548 6.884C6.3038 6.828 6.3738 6.8 6.4508 6.8C6.5278 6.8 6.5978 6.828 6.6468 6.884C6.7448 7.003 6.7238 7.283 6.7238 7.402ZM10.6496 9.838V7.178C10.6496 6.744 10.5306 6.492 10.3066 6.282C10.0826 6.065 9.75359 5.96 9.41759 5.96C9.08159 5.96 8.75259 6.065 8.52859 6.282C8.30459 6.492 8.18559 6.744 8.18559 7.178V9.838C8.18559 10.272 8.30459 10.524 8.52859 10.734C8.75259 10.951 9.08159 11.056 9.41759 11.056C9.75359 11.056 10.0826 10.951 10.3066 10.734C10.5306 10.524 10.6496 10.272 10.6496 9.838ZM9.71159 9.873C9.71159 10.104 9.58559 10.216 9.41759 10.216C9.24959 10.216 9.12359 10.104 9.12359 9.873V7.143C9.12359 6.912 9.24959 6.8 9.41759 6.8C9.58559 6.8 9.71159 6.912 9.71159 7.143V9.873ZM13.6304 7.129C13.6304 6.443 13.0774 5.89 12.3914 5.89C11.7054 5.89 11.1524 6.443 11.1524 7.129C11.1524 7.815 11.7054 8.368 12.3914 8.368C13.0774 8.368 13.6304 7.815 13.6304 7.129ZM12.8044 7.129C12.8044 7.36 12.6224 7.542 12.3914 7.542C12.1604 7.542 11.9784 7.36 11.9784 7.129C11.9784 6.898 12.1604 6.716 12.3914 6.716C12.6224 6.716 12.8044 6.898 12.8044 7.129Z' fill='%23666666'/%3e%3c/svg%3e";module.exports=img;
@@ -1,5 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M21.0908 3.36377V7.00012H17.4544" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3
- <path d="M22 12C22 17.5229 17.5229 22 12 22C6.47715 22 2 17.5229 2 12C2 6.47715 6.47715 2 12 2C15.701 2 18.9324 4.01056 20.6616 6.99905" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
4
- <path d="M8.536 15V9.304H7.464L6.592 9.984V11.184L7.464 10.56V15H8.536ZM12.5106 13.368C12.5106 13.056 12.4866 12.728 12.3586 12.464C12.2786 12.304 12.1666 12.176 12.0146 12.056C12.1506 11.944 12.2466 11.824 12.3186 11.68C12.4466 11.408 12.4706 11.128 12.4706 10.832C12.4706 10.344 12.3906 9.928 12.0626 9.6C11.8146 9.352 11.4626 9.24 11.0786 9.24C10.6946 9.24 10.3586 9.352 10.1106 9.6C9.78263 9.928 9.70263 10.344 9.70263 10.832C9.70263 11.128 9.72663 11.408 9.85463 11.68C9.92663 11.824 10.0226 11.944 10.1586 12.056C10.0066 12.176 9.89463 12.304 9.81463 12.464C9.68663 12.728 9.66263 13.056 9.66263 13.368C9.66263 13.904 9.69463 14.328 10.0706 14.696C10.3266 14.944 10.7026 15.064 11.0866 15.064C11.4706 15.064 11.8466 14.944 12.1026 14.696C12.4786 14.328 12.5106 13.904 12.5106 13.368ZM11.4386 13.312C11.4386 13.464 11.4546 13.832 11.3426 13.984C11.2866 14.056 11.1906 14.104 11.0866 14.104C10.9826 14.104 10.8866 14.064 10.8306 13.984C10.7186 13.824 10.7346 13.464 10.7346 13.312C10.7346 13.16 10.7106 12.784 10.8306 12.624C10.8866 12.544 10.9826 12.504 11.0866 12.504C11.1906 12.504 11.2786 12.544 11.3426 12.624C11.4626 12.784 11.4386 13.16 11.4386 13.312ZM11.3986 10.888C11.3986 11.032 11.4306 11.392 11.2866 11.536C11.2386 11.584 11.1666 11.608 11.0866 11.608C11.0066 11.608 10.9426 11.584 10.8866 11.536C10.7346 11.4 10.7746 11.032 10.7746 10.888C10.7746 10.752 10.7506 10.432 10.8626 10.296C10.9186 10.232 10.9986 10.2 11.0866 10.2C11.1746 10.2 11.2546 10.232 11.3106 10.296C11.4226 10.432 11.3986 10.752 11.3986 10.888ZM15.8853 13.672V10.632C15.8853 10.136 15.7493 9.848 15.4933 9.608C15.2373 9.36 14.8613 9.24 14.4773 9.24C14.0933 9.24 13.7173 9.36 13.4613 9.608C13.2053 9.848 13.0693 10.136 13.0693 10.632V13.672C13.0693 14.168 13.2053 14.456 13.4613 14.696C13.7173 14.944 14.0933 15.064 14.4773 15.064C14.8613 15.064 15.2373 14.944 15.4933 14.696C15.7493 14.456 15.8853 14.168 15.8853 13.672ZM14.8133 13.712C14.8133 13.976 14.6693 14.104 14.4773 14.104C14.2853 14.104 14.1413 13.976 14.1413 13.712V10.592C14.1413 10.328 14.2853 10.2 14.4773 10.2C14.6693 10.2 14.8133 10.328 14.8133 10.592V13.712ZM19.2919 10.576C19.2919 9.792 18.6599 9.16 17.8759 9.16C17.0919 9.16 16.4599 9.792 16.4599 10.576C16.4599 11.36 17.0919 11.992 17.8759 11.992C18.6599 11.992 19.2919 11.36 19.2919 10.576ZM18.3479 10.576C18.3479 10.84 18.1399 11.048 17.8759 11.048C17.6119 11.048 17.4039 10.84 17.4039 10.576C17.4039 10.312 17.6119 10.104 17.8759 10.104C18.1399 10.104 18.3479 10.312 18.3479 10.576Z" fill="white"/>
5
- </svg>
@@ -1 +0,0 @@
1
- import"react";var C="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M14.0606 2.74219V5.16642H11.6364' stroke='%23666666' stroke-width='0.8' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M14.6667 8.50016C14.6667 12.1821 11.6819 15.1668 8.00002 15.1668C4.31812 15.1668 1.33335 12.1821 1.33335 8.50016C1.33335 4.81826 4.31812 1.8335 8.00002 1.8335C10.4674 1.8335 12.6217 3.17387 13.7744 5.1662' stroke='%23666666' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.219 11V6.016H3.281L2.518 6.611V7.661L3.281 7.115V11H4.219ZM7.6968 9.572C7.6968 9.299 7.6758 9.012 7.5638 8.781C7.4938 8.641 7.3958 8.529 7.2628 8.424C7.3818 8.326 7.4658 8.221 7.5288 8.095C7.6408 7.857 7.6618 7.612 7.6618 7.353C7.6618 6.926 7.5918 6.562 7.3048 6.275C7.0878 6.058 6.7798 5.96 6.4438 5.96C6.1078 5.96 5.8138 6.058 5.5968 6.275C5.3098 6.562 5.2398 6.926 5.2398 7.353C5.2398 7.612 5.2608 7.857 5.3728 8.095C5.4358 8.221 5.5198 8.326 5.6388 8.424C5.5058 8.529 5.4078 8.641 5.3378 8.781C5.2258 9.012 5.2048 9.299 5.2048 9.572C5.2048 10.041 5.2328 10.412 5.5618 10.734C5.7858 10.951 6.1148 11.056 6.4508 11.056C6.7868 11.056 7.1158 10.951 7.3398 10.734C7.6688 10.412 7.6968 10.041 7.6968 9.572ZM6.7588 9.523C6.7588 9.656 6.7728 9.978 6.6748 10.111C6.6258 10.174 6.5418 10.216 6.4508 10.216C6.3598 10.216 6.2758 10.181 6.2268 10.111C6.1288 9.971 6.1428 9.656 6.1428 9.523C6.1428 9.39 6.1218 9.061 6.2268 8.921C6.2758 8.851 6.3598 8.816 6.4508 8.816C6.5418 8.816 6.6188 8.851 6.6748 8.921C6.7798 9.061 6.7588 9.39 6.7588 9.523ZM6.7238 7.402C6.7238 7.528 6.7518 7.843 6.6258 7.969C6.5838 8.011 6.5208 8.032 6.4508 8.032C6.3808 8.032 6.3248 8.011 6.2758 7.969C6.1428 7.85 6.1778 7.528 6.1778 7.402C6.1778 7.283 6.1568 7.003 6.2548 6.884C6.3038 6.828 6.3738 6.8 6.4508 6.8C6.5278 6.8 6.5978 6.828 6.6468 6.884C6.7448 7.003 6.7238 7.283 6.7238 7.402ZM10.6496 9.838V7.178C10.6496 6.744 10.5306 6.492 10.3066 6.282C10.0826 6.065 9.75359 5.96 9.41759 5.96C9.08159 5.96 8.75259 6.065 8.52859 6.282C8.30459 6.492 8.18559 6.744 8.18559 7.178V9.838C8.18559 10.272 8.30459 10.524 8.52859 10.734C8.75259 10.951 9.08159 11.056 9.41759 11.056C9.75359 11.056 10.0826 10.951 10.3066 10.734C10.5306 10.524 10.6496 10.272 10.6496 9.838ZM9.71159 9.873C9.71159 10.104 9.58559 10.216 9.41759 10.216C9.24959 10.216 9.12359 10.104 9.12359 9.873V7.143C9.12359 6.912 9.24959 6.8 9.41759 6.8C9.58559 6.8 9.71159 6.912 9.71159 7.143V9.873ZM13.6304 7.129C13.6304 6.443 13.0774 5.89 12.3914 5.89C11.7054 5.89 11.1524 6.443 11.1524 7.129C11.1524 7.815 11.7054 8.368 12.3914 8.368C13.0774 8.368 13.6304 7.815 13.6304 7.129ZM12.8044 7.129C12.8044 7.36 12.6224 7.542 12.3914 7.542C12.1604 7.542 11.9784 7.36 11.9784 7.129C11.9784 6.898 12.1604 6.716 12.3914 6.716C12.6224 6.716 12.8044 6.898 12.8044 7.129Z' fill='%23666666'/%3e%3c/svg%3e";export{C as default};