@wandelbots/wandelbots-js-react-components 6.3.0 → 6.4.0-pr.chore-playground-tool-steps.664.4537d63

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.
Files changed (191) hide show
  1. package/README.md +323 -120
  2. package/dist/3d.cjs +1 -1
  3. package/dist/3d.d.ts +5 -3
  4. package/dist/3d.js +24 -23
  5. package/dist/CurrentPoseBar/index.cjs +1 -0
  6. package/dist/CurrentPoseBar/index.d.ts +2 -0
  7. package/dist/CurrentPoseBar/index.js +5 -0
  8. package/dist/JoggingButtons/index.cjs +1 -0
  9. package/dist/JoggingButtons/index.d.ts +3 -0
  10. package/dist/JoggingButtons/index.js +5 -0
  11. package/dist/JoggingGizmo/index.cjs +1 -0
  12. package/dist/JoggingGizmo/index.d.ts +4 -0
  13. package/dist/JoggingGizmo/index.js +7 -0
  14. package/dist/JoggingJointSlider/index.cjs +1 -0
  15. package/dist/JoggingJointSlider/index.d.ts +2 -0
  16. package/dist/JoggingJointSlider/index.js +5 -0
  17. package/dist/RobotControlPanel/index.cjs +1 -0
  18. package/dist/RobotControlPanel/index.d.ts +2 -0
  19. package/dist/RobotControlPanel/index.js +5 -0
  20. package/dist/RobotHeader/index.cjs +1 -0
  21. package/dist/RobotHeader/index.d.ts +4 -0
  22. package/dist/RobotHeader/index.js +5 -0
  23. package/dist/SafetyBar/index.cjs +1 -1
  24. package/dist/SafetyBar/index.js +1 -1
  25. package/dist/chunks/CurrentPoseBar-CyHUWmjM.cjs +1 -0
  26. package/dist/chunks/CurrentPoseBar-zTZi68tY.js +505 -0
  27. package/dist/chunks/JoggingButtons-CXaozFVz.js +108 -0
  28. package/dist/chunks/JoggingButtons-CbL-5LMK.cjs +1 -0
  29. package/dist/chunks/JoggingGizmo-DGbFLWgT.cjs +1 -0
  30. package/dist/chunks/JoggingGizmo-SuS9MmL7.js +810 -0
  31. package/dist/chunks/JoggingGizmoOrientation-dzned4f4.cjs +1 -0
  32. package/dist/chunks/JoggingGizmoOrientation-x_crT_64.js +14 -0
  33. package/dist/chunks/JoggingJointSlider-CZ-k6XCa.js +406 -0
  34. package/dist/chunks/JoggingJointSlider-R3_A9Ppj.cjs +1 -0
  35. package/dist/chunks/Robot-D0ZqUCn3.cjs +1 -0
  36. package/dist/chunks/Robot-UoykZeYH.js +1272 -0
  37. package/dist/chunks/RobotControlPanel-BnMfmO41.js +822 -0
  38. package/dist/chunks/RobotControlPanel-BuDGcxPR.cjs +1 -0
  39. package/dist/chunks/RobotHeader-BZci9ahT.js +244 -0
  40. package/dist/chunks/RobotHeader-CqK0700U.cjs +1 -0
  41. package/dist/chunks/SafetyBar-Bbg-o8h9.cjs +1 -0
  42. package/dist/chunks/{SafetyBar-Cy9DiXp9.js → SafetyBar-Cuak4ffd.js} +11 -10
  43. package/dist/chunks/SmallSelect-BdD9uLKK.js +52 -0
  44. package/dist/chunks/SmallSelect-Dcsd7_6_.cjs +1 -0
  45. package/dist/chunks/TrajectoryExecutionStore-DPqfDcfn.js +3398 -0
  46. package/dist/chunks/TrajectoryExecutionStore-DV6mLEx9.cjs +3 -0
  47. package/dist/chunks/converters-C8I_A_tA.cjs +1 -0
  48. package/dist/chunks/converters-DpNB_WNQ.js +39 -0
  49. package/dist/chunks/externalizeComponent-BdxGBLIv.cjs +2 -0
  50. package/dist/chunks/externalizeComponent-_w2d1_pz.js +283 -0
  51. package/dist/chunks/holdSafety-BtoZ5We3.cjs +1 -0
  52. package/dist/chunks/holdSafety-Di1GZAWg.js +37 -0
  53. package/dist/chunks/joggingColors-CuT5u0H8.js +135 -0
  54. package/dist/chunks/joggingColors-ZDc_2UCp.cjs +1 -0
  55. package/dist/chunks/useEveryFrame-G_-ma1nC.js +142 -0
  56. package/dist/chunks/useEveryFrame-dmPPTKtT.cjs +1 -0
  57. package/dist/chunks/useSmoothedMotionState-COMJRcOt.js +214 -0
  58. package/dist/chunks/useSmoothedMotionState-Con0E5Bx.cjs +1 -0
  59. package/dist/components/AppHeader.d.ts +1 -1
  60. package/dist/components/currentPoseBar/CurrentPoseBar.d.ts +48 -0
  61. package/dist/components/currentPoseBar/OrientationFormatPopover.d.ts +19 -0
  62. package/dist/components/currentPoseBar/StreamStatus.d.ts +10 -0
  63. package/dist/components/currentPoseBar/orientation.d.ts +34 -0
  64. package/dist/components/currentPoseBar/poseValues.d.ts +15 -0
  65. package/dist/components/jogging/JoggingButtons.d.ts +16 -0
  66. package/dist/components/jogging/JoggingCartesianAxisControl.d.ts +1 -1
  67. package/dist/components/jogging/JoggingJointTab.d.ts +1 -1
  68. package/dist/components/jogging/JoggingPanel.d.ts +6 -3
  69. package/dist/components/jogging/JoggingStore.d.ts +96 -19
  70. package/dist/components/jogging/gizmo/JoggingGizmo.d.ts +43 -0
  71. package/dist/components/jogging/gizmo/JoggingGizmoOrientation.d.ts +26 -0
  72. package/dist/components/jogging/gizmo/RotationHandles.d.ts +7 -0
  73. package/dist/components/jogging/gizmo/RotationScene.d.ts +6 -0
  74. package/dist/components/jogging/gizmo/TranslationHandles.d.ts +6 -0
  75. package/dist/components/jogging/gizmo/TranslationScene.d.ts +6 -0
  76. package/dist/components/jogging/gizmo/arcGrabAreas.d.ts +58 -0
  77. package/dist/components/jogging/gizmo/arcs.d.ts +54 -0
  78. package/dist/components/jogging/gizmo/arrows.d.ts +63 -0
  79. package/dist/components/jogging/gizmo/gizmoShared.d.ts +125 -0
  80. package/dist/components/jogging/gizmo/gizmoView.d.ts +42 -0
  81. package/dist/components/jogging/gizmo/useGizmoTurn.d.ts +11 -0
  82. package/dist/components/jogging/holdSafety.d.ts +44 -0
  83. package/dist/components/jogging/jogError.d.ts +9 -0
  84. package/dist/components/jogging/jogHandle.d.ts +23 -0
  85. package/dist/components/jogging/joggingColors.d.ts +24 -0
  86. package/dist/components/jogging/joggingVelocity.d.ts +21 -0
  87. package/dist/components/jogging/joint/JoggingJointSlider.d.ts +52 -0
  88. package/dist/components/jogging/joint/JointSliderTrack.d.ts +27 -0
  89. package/dist/components/jogging/joint/jointJog.d.ts +55 -0
  90. package/dist/components/jogging/joint/useJointJogHold.d.ts +48 -0
  91. package/dist/components/jogging/useHold.d.ts +38 -0
  92. package/dist/components/jogging/useJogControls.d.ts +45 -0
  93. package/dist/components/robotControl/CartesianJogTab.d.ts +21 -0
  94. package/dist/components/robotControl/HoldToMoveButton.d.ts +25 -0
  95. package/dist/components/robotControl/JogArea.d.ts +22 -0
  96. package/dist/components/robotControl/JogModeToggle.d.ts +8 -0
  97. package/dist/components/robotControl/JointJogTab.d.ts +11 -0
  98. package/dist/components/robotControl/MoveToTab.d.ts +18 -0
  99. package/dist/components/robotControl/PanelSelect.d.ts +13 -0
  100. package/dist/components/robotControl/PoseField.d.ts +21 -0
  101. package/dist/components/robotControl/RobotControlPanel.d.ts +212 -0
  102. package/dist/components/robotControl/Section.d.ts +5 -0
  103. package/dist/components/robotControl/SmallSelect.d.ts +15 -0
  104. package/dist/components/robotControl/VelocityRow.d.ts +14 -0
  105. package/dist/components/robotControl/atPose.d.ts +8 -0
  106. package/dist/components/robotControl/poseText.d.ts +15 -0
  107. package/dist/components/robotControl/units.d.ts +16 -0
  108. package/dist/components/robotControl/useCopyText.d.ts +12 -0
  109. package/dist/components/robotControl/useEveryFrame.d.ts +6 -0
  110. package/dist/components/robotHeader/ActivationSwitch.d.ts +7 -0
  111. package/dist/components/robotHeader/AppNavigation.d.ts +15 -0
  112. package/dist/components/robotHeader/RobotHeader.d.ts +42 -0
  113. package/dist/components/robots/GenericRobot.d.ts +2 -1
  114. package/dist/components/robots/LinearAxis.d.ts +1 -1
  115. package/dist/components/robots/LinearAxisAnimator.d.ts +11 -2
  116. package/dist/components/robots/Robot.d.ts +1 -1
  117. package/dist/components/robots/robotModelLogic.d.ts +11 -9
  118. package/dist/components/utils/hooks.d.ts +1 -6
  119. package/dist/core.cjs +1 -1
  120. package/dist/core.d.ts +13 -18
  121. package/dist/core.js +37 -51
  122. package/dist/index.cjs +1 -1
  123. package/dist/index.js +58 -71
  124. package/dist/lib/ConnectedMotionGroup.d.ts +5 -7
  125. package/dist/lib/JoggerConnection.d.ts +137 -27
  126. package/dist/lib/MotionStreamConnection.d.ts +15 -6
  127. package/dist/lib/Pose3.d.ts +22 -0
  128. package/dist/lib/PoseTransformer.d.ts +25 -0
  129. package/dist/lib/TrajectoryExecutionStore.d.ts +129 -0
  130. package/dist/lib/connectionLogger.d.ts +9 -0
  131. package/dist/lib/incrementalCartesianMotion.d.ts +40 -0
  132. package/dist/lib/motionStateUpdate.d.ts +27 -0
  133. package/dist/lib/novaConnection.d.ts +23 -0
  134. package/dist/lib/planErrorTranslation.d.ts +8 -0
  135. package/dist/lib/rotation.d.ts +12 -0
  136. package/package.json +31 -66
  137. package/dist/Setup.d.ts +0 -11
  138. package/dist/chunks/MotionGroupVisualizer-DshWR1wY.js +0 -1653
  139. package/dist/chunks/MotionGroupVisualizer-eD7yFEcF.cjs +0 -1
  140. package/dist/chunks/SafetyBar-DPrv_OQA.cjs +0 -1
  141. package/dist/chunks/externalizeComponent-EDymnaGR.js +0 -268
  142. package/dist/chunks/externalizeComponent-OO4jcrz5.cjs +0 -2
  143. package/dist/chunks/theming-DfSy4-Ic.cjs +0 -4
  144. package/dist/chunks/theming-mF9Rt8SS.js +0 -5542
  145. package/dist/chunks/useSmoothedMotionState-DyDgSVYX.js +0 -478
  146. package/dist/chunks/useSmoothedMotionState-VYxEIyfr.cjs +0 -1
  147. package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -11
  148. package/dist/components/AdornedTextField.d.ts +0 -7
  149. package/dist/components/CopyableText.d.ts +0 -6
  150. package/dist/components/CycleTimer/CycleTimer.d.ts +0 -3
  151. package/dist/components/CycleTimer/DefaultVariant.d.ts +0 -9
  152. package/dist/components/CycleTimer/SmallVariant.d.ts +0 -10
  153. package/dist/components/CycleTimer/index.d.ts +0 -27
  154. package/dist/components/CycleTimer/types.d.ts +0 -49
  155. package/dist/components/CycleTimer/useAnimations.d.ts +0 -14
  156. package/dist/components/CycleTimer/useTimerLogic.d.ts +0 -24
  157. package/dist/components/CycleTimer/utils.d.ts +0 -21
  158. package/dist/components/CycleTimer.d.ts +0 -3
  159. package/dist/components/DataGrid.d.ts +0 -66
  160. package/dist/components/LogPanel.d.ts +0 -38
  161. package/dist/components/LogStore.d.ts +0 -12
  162. package/dist/components/LogViewer.d.ts +0 -46
  163. package/dist/components/ProgramControl.d.ts +0 -55
  164. package/dist/components/ProgramStateIndicator.d.ts +0 -26
  165. package/dist/components/RobotCard.d.ts +0 -98
  166. package/dist/components/RobotListItem.d.ts +0 -34
  167. package/dist/components/RobotSetupReadinessIndicator.d.ts +0 -37
  168. package/dist/components/SelectableFab.d.ts +0 -7
  169. package/dist/components/TabBar.d.ts +0 -45
  170. package/dist/components/ThemeSelect.d.ts +0 -6
  171. package/dist/components/Timer/Timer.d.ts +0 -3
  172. package/dist/components/Timer/TimerDefaultVariant.d.ts +0 -9
  173. package/dist/components/Timer/TimerSmallVariant.d.ts +0 -10
  174. package/dist/components/Timer/index.d.ts +0 -19
  175. package/dist/components/Timer/types.d.ts +0 -35
  176. package/dist/components/Timer/useTimerAnimations.d.ts +0 -10
  177. package/dist/components/Timer/useTimerLogic.d.ts +0 -19
  178. package/dist/components/Timer/utils.d.ts +0 -17
  179. package/dist/components/Timer.d.ts +0 -3
  180. package/dist/components/TransparentOverlay.d.ts +0 -4
  181. package/dist/components/jogging/JoggingFreedriveTab.d.ts +0 -1
  182. package/dist/components/jogging/PoseCartesianValues.d.ts +0 -9
  183. package/dist/components/jogging/PoseJointValues.d.ts +0 -8
  184. package/dist/components/robots/AxisConfig.d.ts +0 -2
  185. package/dist/components/robots/manufacturerHomePositions.d.ts +0 -20
  186. package/dist/icons/DropdownArrowIcon.d.ts +0 -2
  187. package/dist/icons/index.d.ts +0 -12
  188. package/dist/lib/novaCompat.d.ts +0 -16
  189. package/dist/themes/createDarkTheme.d.ts +0 -7
  190. package/dist/themes/themeTypes.d.ts +0 -40
  191. package/dist/themes/theming.d.ts +0 -24
@@ -0,0 +1,3 @@
1
+ "use strict";const r=require("react/jsx-runtime"),qt=require("@mui/material/AppBar"),xt=require("@mui/material/Backdrop"),L=require("@mui/material/Box"),$t=require("@mui/material/Menu"),$=require("@mui/material/MenuItem"),Bt=require("@mui/material/Toolbar"),w=require("@mui/material/Typography"),zt=require("@wandelbots/design-tokens"),Ut=require("@wandelbots/icons/ExpandMoreFilled"),Gt=require("@wandelbots/mui"),T=require("mobx-react-lite"),v=require("react"),Z=require("./externalizeComponent-BdxGBLIv.cjs"),Wt=require("@mui/icons-material/OpenWith"),Ht=require("@mui/icons-material/Share"),b=require("@mui/material/Stack"),Kt=require("@mui/material/Tab"),Yt=require("@mui/material/Tabs"),y=require("mobx"),D=require("react-i18next"),_=require("@wandelbots/nova-js"),F=require("@wandelbots/nova-js/v2"),I=require("three"),P=require("./useSmoothedMotionState-Con0E5Bx.cjs"),jt=require("@mui/material/CircularProgress"),Qt=require("@mui/material/utils"),bt=require("lodash-es"),Zt=require("./SafetyBar-Bbg-o8h9.cjs"),Xt=require("@mui/material/Alert"),te=require("@mui/material/AlertTitle"),it=require("@mui/material/Button"),q=require("@mui/material/styles"),B=require("@mui/material/Divider"),ht=require("@mui/material/ToggleButton"),tt=require("@mui/material/IconButton"),z=require("./joggingColors-ZDc_2UCp.cjs"),ee=require("lodash-es/isEqual.js"),oe=require("@mui/material/InputAdornment"),ne=require("@mui/material/FormControl"),ie=require("@mui/material/InputLabel"),re=require("@mui/material/Select"),K=require("lodash-es/keyBy.js"),se=require("lodash-es/uniqueId.js"),ae=require("@mui/material/ToggleButtonGroup"),vt=require("@mui/material/Slider"),ce=require("lodash-es/isNumber.js"),le=require("@mui/icons-material/ChevronLeft"),de=require("@mui/icons-material/ChevronRight"),ge=require("lodash-es/throttle.js"),ue=require("@mui/material/Dialog"),he=require("@mui/material/DialogActions"),me=require("@mui/material/DialogContent"),pe=require("@mui/material/DialogTitle");function Ct(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const j=Ct(v),mt=Ct(I),fe=Z.externalizeComponent(T.observer(e=>{const{appIcon:t,appName:o,apps:n=[],onAppSelect:i,disabled:s=!1,sx:a}=e,[c,u]=v.useState(null),h=!!c,g=l=>{u(l.currentTarget)},m=()=>{u(null)},d=l=>{m(),l.onClick?l.onClick():l.href&&(window.location.href=l.href),i==null||i(l)};return r.jsxs(r.Fragment,{children:[r.jsx(qt,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...a},children:r.jsxs(Bt,{sx:{minHeight:"62px !important"},children:[r.jsx(L,{sx:{mr:1,display:"flex",alignItems:"center"},children:t}),r.jsxs(L,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[r.jsx(w,{component:"h1",variant:"subtitle1",children:o}),n.length>0&&r.jsx(Gt.RoundedIconButton,{icon:r.jsx(Ut.ExpandMoreFilled,{size:20}),ariaLabel:"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:g,disabled:s,sx:{ml:1}})]})]})}),r.jsx(xt,{open:h,onClick:m,sx:{backdropFilter:"blur(4px)",backgroundColor:zt.ZeroGravityComponentsBackdropFill,zIndex:l=>l.zIndex.modal-1}}),r.jsx($t,{id:"app-menu",anchorEl:c,open:h,onClose:m,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:l=>l.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:n.map(l=>r.jsxs($,{onClick:()=>d(l),children:[r.jsx(L,{sx:{display:"flex",alignItems:"center"},children:l.icon}),r.jsx(w,{variant:"body1",sx:{ml:2},children:l.name})]},l.id))})]})})),ye=({title:e,titleId:t,...o},n)=>j.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...o},e?j.createElement("title",{id:t},e):null,j.createElement("g",{id:"JogMinus"},j.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),Se=v.forwardRef(ye),xe=({title:e,titleId:t,...o},n)=>j.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...o},e?j.createElement("title",{id:t},e):null,j.createElement("g",{id:"JogPlus"},j.createElement("g",{id:"Plus"},j.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),j.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),j.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),je=v.forwardRef(xe),rt=Z.externalizeComponent(T.observer(({colors:e,label:t,getDisplayedValue:o,startJogging:n,stopJogging:i,disabled:s,activeJoggingDirection:a,...c})=>{var O,R,J,C,A,U,G;P.useAnimationFrame(()=>{const V=o(),N=d.current;N&&(N.textContent=V)});const u=q.useTheme(),[h,g]=v.useState(null);v.useEffect(()=>{s&&M()},[s]);const m=a||h,d=v.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const l=m?(O=e.buttonBackgroundColor)==null?void 0:O.pressed:e.borderColor,f={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},p={...f,backgroundColor:(R=e.buttonBackgroundColor)==null?void 0:R.default,":hover":{backgroundColor:(J=e.buttonBackgroundColor)==null?void 0:J.hovered},":active":{backgroundColor:(C=e.buttonBackgroundColor)==null?void 0:C.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(A=e.buttonBackgroundColor)==null?void 0:A.disabled,"svg path":{fill:u.palette.action.disabled}}},x={...f,backgroundColor:(U=e.buttonBackgroundColor)==null?void 0:U.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(G=e.buttonBackgroundColor)==null?void 0:G.pressed,"svg path":{fill:u.palette.action.disabled}}};function k(V,N){s||V.button===0&&(g(N),n(N))}function M(){g(null),i()}return r.jsxs(b,{height:"64px",direction:"row",justifyContent:"center",...c,children:[r.jsx(tt,{disabled:s,disableRipple:!0,onPointerDown:V=>k(V,"-"),onPointerUp:M,onPointerOut:M,size:"large",sx:{...m==="-"?x:p,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${l??"#fff"}`,borderBottom:`2px solid ${l??"#fff"}`,borderTop:`2px solid ${l??"#fff"}`},children:r.jsx(Se,{})}),r.jsxs(b,{spacing:"6px",sx:{width:"150px",backgroundColor:e.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${l??"#fff"}`,borderTop:`2px solid ${l??"#fff"}`},children:[r.jsx(b,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...s?{color:u.palette.action.disabled}:{}},...s?{"svg path":{fill:u.palette.action.disabled}}:{}},children:t}),r.jsx(w,{height:"22px",sx:{fontSize:"15px",color:s?u.palette.action.disabled:e.color,fontWeight:700,fontVariantNumeric:"tabular-nums",minWidth:"80px",textAlign:"center"},ref:d,children:o()})]}),r.jsx(tt,{disableRipple:!0,disabled:s,onPointerDown:V=>k(V,"+"),onPointerUp:M,onPointerOut:M,size:"large",sx:{...m==="+"?x:p,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${l??"#fff"}`,borderBottom:`2px solid ${l??"#fff"}`,borderTop:`2px solid ${l??"#fff"}`},children:r.jsx(je,{})})]})})),It=Z.externalizeComponent(T.observer(({startJogging:e,stopJogging:t,lowerLimit:o,upperLimit:n,useDegree:i,getValue:s,disabled:a,...c})=>{var C,A,U,G,V,N,ut;const{t:u}=D.useTranslation(),[h,g]=v.useState(),m=q.useTheme(),d={background:(C=m.palette.backgroundPaperElevation)==null?void 0:C[4],color:(A=m.palette.backgroundPaperElevation)==null?void 0:A[11]},l=T.useLocalObservable(()=>({activeJoggingDir:null,startJogging(S){this.activeJoggingDir=S,e(S)},stopJogging(){this.activeJoggingDir=null,t()}})),f=ge(()=>{const S=i?p(s()):s();(S===void 0||h===void 0||Math.abs(h-S)>1e-9)&&g(S)},50);P.useAnimationFrame(f);function p(S){if(S!==void 0)return _.radiansToDegrees(S)}function x(S){S.button===0&&l.startJogging("-")}function k(S){S.button===0&&l.startJogging("+")}function M(S){l.stopJogging()}function O(S){l.stopJogging()}function R(S,W=1){if(S===void 0||Number.isNaN(S))return"";const H=u("General.degree.variable",{amount:S.toFixed(W)});return S>0&&W===0?`+${H}`:H}function J(S,W=1){if(S===void 0||Number.isNaN(S))return"";const H=u("General.mm.variable",{amount:S.toFixed(W)});return S>0&&W===0?`+${H}`:H}return r.jsxs(b,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...c,sx:{"& .MuiIconButton-root":{width:"52px",color:m.palette.text.primary,alignContent:"center",backgroundColor:(U=m.palette.backgroundPaperElevation)==null?void 0:U[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(G=m.palette.backgroundPaperElevation)==null?void 0:G[11],color:m.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(V=m.palette.backgroundPaperElevation)==null?void 0:V[9]},"&:active":{...d}}},children:[r.jsx(tt,{onPointerDown:x,onPointerUp:M,onPointerOut:O,disabled:a,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...l.activeJoggingDir==="-"?d:{}},children:r.jsx(le,{sx:{pointerEvents:"none",color:z.jointArrowColor}})}),r.jsxs(b,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(N=m.palette.backgroundPaperElevation)==null?void 0:N[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[r.jsx(w,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",fontVariantNumeric:"tabular-nums",minWidth:"80px",textAlign:"center",color:a?m.palette.action.disabled:m.palette.text.primary},children:i?R(h):J(h)}),r.jsx(vt,{disabled:!0,"aria-label":"Joint position",min:i?p(o):o,max:i?p(n):n,value:h||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:a?m.palette.action.disabled:m.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:a?m.palette.action.disabled:m.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(ut=m.palette.backgroundPaperElevation)==null?void 0:ut[5],opacity:1}},marks:o!==void 0&&n!==void 0&&[{value:i?p(o):o,label:i?R(p(o),0):J(o)},{value:i?p(n):n,label:i?R(p(n),0):J(n)}]})]}),r.jsx(tt,{onPointerDown:k,onPointerUp:M,onPointerOut:O,disabled:a,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...l.activeJoggingDir==="+"?d:{}},children:r.jsx(de,{sx:{pointerEvents:"none",color:z.jointArrowColor}})})]})}));function Y(e,t){if(t==="QUATERNION"&&e)return new I.Quaternion(...e);if(t==="ROTATION_VECTOR"&&e){if(e&&e.length<3)throw new Error(`Invalid rotation vector length: ${e.length}. Expected at least 3 values.`);const o=new I.Vector3(e[0],e[1],e[2]),n=o.length(),i=o.normalize();return new I.Quaternion().setFromAxisAngle(i,n)}else return console.warn(`Unsupported rotation type '${t}'. Only QUATERNION and ROTATION_VECTOR are supported for now.`),new I.Quaternion}function wt(e){const t=new I.Vector3(e.x,e.y,e.z),o=2*Math.atan2(t.length(),Math.abs(e.w));t.normalize();const n=(e.w>=0?1:0)-(e.w<0?1:0);return t.multiplyScalar(n).multiplyScalar(o)}function be({currentTcpPose:e,axis:t,direction:o,motion:n,useToolCoordinateSystem:i,coordinateSystemRotation:s}){const a=o==="-"?-1:1;if(n.type==="translate"){if(!e.position)throw new Error("Current pose has no position, cannot perform translation");const m=n.distanceMm*a,d=new I.Vector3;if(d[t]=m,i){if(!e.orientation)throw new Error("Current pose has no orientation, cannot translate relative to tool");d.applyQuaternion(Y(e.orientation,"ROTATION_VECTOR"))}else s&&d.applyQuaternion(s);const l=[...e.position];return l[0]=(l[0]??0)+d.x,l[1]=(l[1]??0)+d.y,l[2]=(l[2]??0)+d.z,{position:l,orientation:e.orientation}}if(!e.orientation)throw new Error("Current pose has no orientation, cannot perform rotation");const c=Y(e.orientation,"ROTATION_VECTOR"),u=new I.Vector3;u[t]=1,!i&&s&&u.applyQuaternion(s);const h=new I.Quaternion().setFromAxisAngle(u,n.distanceRads*a),g=i?c.multiply(h):h.multiply(c);return{position:e.position,orientation:[...wt(g)]}}function _t(e,t,o){return t.length!==e.length?!1:Et(e,t,o)}function lt(e,t,o){return t.length!==e.length?!0:Et(e,t,o)}function Et(e,t,o){for(let n=0;n<t.length;n++)if(Math.abs((t[n]??0)-(e[n]??0))>o)return!1;return!0}function Tt(e,t,o){if(e===void 0&&t||e&&t===void 0||(e==null?void 0:e.orientation)===void 0||(t==null?void 0:t.orientation)===void 0||(e==null?void 0:e.position)===void 0||(t==null?void 0:t.position)===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation[0]-t.orientation[0]),n+=Math.abs(e.orientation[1]-t.orientation[1]),n+=Math.abs(e.orientation[2]-t.orientation[2]),n+=Math.abs(e.position[0]-t.position[0]),n+=Math.abs(e.position[1]-t.position[1]),n+=Math.abs(e.position[2]-t.position[2]),n<=o}function dt(e,t,o){return e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp&&Tt(e.tcp_pose,t.tcp_pose,o)}function Mt(e,t){const o=new I.Vector3(t[0],t[1],t[2]),n=new I.Vector3(e[0],e[1],e[2]),i=o.length(),s=o.normalize();let a=n.length(),c=n.normalize();c.dot(s)<0&&(a=-a,c=c.multiplyScalar(-1));let u=a-i;return u-=2*Math.PI*Math.floor((u+Math.PI)/(2*Math.PI)),a=i+u,[...c.multiplyScalar(a)]}const ve=2e-4;function kt(e){const{joint_position:t,tcp_pose:o,tcp:n,coordinate_system:i}=e;return{joint_position:t,tcp_pose:o,tcp:n,coordinate_system:i}}function Ot(e,t){return e.tcp===t.tcp&&e.coordinate_system===t.coordinate_system&&e.tcp_pose===void 0==(t.tcp_pose===void 0)&&_t(e.joint_position,t.joint_position,ve)}const pt=1e-4;class ot{constructor(t,o,n,i,s,a,c="cell",u={}){this.controller=o,this.motionGroup=n,this.description=i,this.initialMotionState=s,this.motionStateSocket=a,this.cellId=c,this.nova=P.createNovaClient(t),this.logger=u.logger??console,this.rapidlyChangingMotionState=s,a.addEventListener("message",h=>{var l;const g=(l=_.tryParseJson(h.data))==null?void 0:l.result;if(!g)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${h.data}`);dt(this.rapidlyChangingMotionState,g,pt)||y.runInAction(()=>{var f,p,x;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=g.tcp_pose:(f=g.tcp_pose)!=null&&f.orientation&&((p=g.tcp_pose)!=null&&p.position)&&((x=this.rapidlyChangingMotionState.tcp_pose)!=null&&x.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:g.tcp_pose.position,orientation:Mt(g.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:this.logger.debug("Received incomplete tcp_pose, ignoring",{tcpPose:g.tcp_pose})}),lt(this.rapidlyChangingMotionState.joint_position,g.joint_position,pt)||y.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=g.joint_position}),g.tcp!==void 0&&this.rapidlyChangingMotionState.tcp!==g.tcp&&y.runInAction(()=>{this.rapidlyChangingMotionState.tcp=g.tcp}),this.rapidlyChangingMotionState.standstill!==g.standstill&&y.runInAction(()=>{this.rapidlyChangingMotionState.standstill=g.standstill});const m=this.rapidlyChangingMotionState.joint_limit_reached.limit_reached,d=g.joint_limit_reached.limit_reached;m.some((f,p)=>f!==d[p])&&y.runInAction(()=>{this.rapidlyChangingMotionState.joint_limit_reached=g.joint_limit_reached}),this.rapidlyChangingMotionState.execute!==g.execute&&y.runInAction(()=>{this.rapidlyChangingMotionState.execute=g.execute})}),y.makeAutoObservable(this,{logger:!1,readoutState:y.computed({equals:Ot,keepAlive:!0})})}static async open(t,o,n={}){var p;const i=P.createNovaClient(t),s=n.cellId??P.cellIdOf(t)??"cell",[a,c]=o.split("@"),u=await i.api.controller.getCurrentRobotControllerState(s,c),h=u==null?void 0:u.motion_groups.find(x=>x.motion_group===o);if(!u||!h)throw new Error(`Controller ${c} or motion group ${o} not found`);const g=i.openReconnectingWebsocket(`/cells/${s}/controllers/${c}/motion-groups/${o}/state-stream`),m=await g.firstMessage(),d=(p=_.tryParseJson(m.data))==null?void 0:p.result;if(!d)throw new Error(`Unable to parse initial motion state message ${m.data}`);const l=n.logger??console;l.info("Connected motion state websocket to motion group",{motionGroup:h.motion_group,initialMotionState:d});const f=await i.api.motionGroup.getMotionGroupDescription(s,c,h.motion_group);return new ot(i,u,h,f,d,g,s,{logger:l})}get readoutState(){return kt(this.rapidlyChangingMotionState)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get joints(){return this.initialMotionState.joint_position.map((t,o)=>({index:o}))}dispose(){this.motionStateSocket.close()}}class E{constructor(t,o){this.position=t,this.quaternion=o}static fromPose(t){const o=t.orientation?Y(t.orientation,"ROTATION_VECTOR"):new I.Quaternion,n=t.position??[0,0,0];return new E(new I.Vector3(n[0]??0,n[1]??0,n[2]??0),o)}static fromRobotTcp(t){const o=t.orientation?Y(t.orientation,t.orientation_type??"ROTATION_VECTOR"):new I.Quaternion,n=t.position??[0,0,0];return new E(new I.Vector3(n[0]??0,n[1]??0,n[2]??0),o)}static fromCoordinateSystem(t){const o=t.orientation?Y(t.orientation,t.orientation_type??"ROTATION_VECTOR"):new I.Quaternion,n=t.position??[0,0,0];return new E(new I.Vector3(n[0]??0,n[1]??0,n[2]??0),o)}inverse(){const t=this.quaternion.clone().invert();return new E(this.position.clone().applyQuaternion(t).multiplyScalar(-1),t)}multiply(t){return new E(this.position.clone().add(t.position.clone().applyQuaternion(this.quaternion)),this.quaternion.clone().multiply(t.quaternion).normalize())}get orientation(){return wt(this.quaternion)}}const ft="Movement request rejected. Another client is currently executing a 'Jogging' motion!",Ce=500,Ie=5e3;function we(e){var o;return(((o=e.times)==null?void 0:o[e.times.length-1])??0)*2e3+Ie}class nt{constructor(t,o={}){this.motionStream=t,this.options=o,this.DEFAULT_MODE="off",this.DEFAULT_TCP="Flange",this.NO_TCP=void 0,this.DEFAULT_INIT_TIMEOUT=5e3,this.DEFAULT_ORIENTATION="coordsys",this.mode="off",this.joggingSocket=null,this.trajectorySocket=null,this.timeout=this.DEFAULT_INIT_TIMEOUT,this.incrementalMotionInFlight=!1,this.ownsMotionStream=!1,this.tcp=(o==null?void 0:o.tcp)||t.motionGroup.tcp||this.getDefaultTcp(t),this.coordinateSystem=o==null?void 0:o.coordinateSystem,this.orientation=(o==null?void 0:o.orientation)||this.DEFAULT_ORIENTATION,this.timeout=(o==null?void 0:o.timeout)||this.DEFAULT_INIT_TIMEOUT,this.mode=(o==null?void 0:o.mode)||this.DEFAULT_MODE,this.onError=o==null?void 0:o.onError,this.logger=(o==null?void 0:o.logger)??console}static async open(t,o,n={}){const i=await ot.open(t,o,{cellId:n.cellId,logger:n.logger}),s=new nt(i,n);s.ownsMotionStream=!0;try{await s.setJoggingMode(s.mode)}catch(a){throw s.dispose(),a}return s}getDefaultTcp(t){var n,i;const o=(i=(n=t.description.dh_parameters)==null?void 0:n[0])==null?void 0:i.type;return t.joints.length<6&&(o===F.JointTypeEnum.RevoluteJoint||o===F.JointTypeEnum.PrismaticJoint)?this.NO_TCP:this.DEFAULT_TCP}async setOptions(t){return t.tcp&&(this.tcp=t.tcp),t.orientation&&(this.orientation=t.orientation),"coordinateSystem"in t&&(this.coordinateSystem=t.coordinateSystem),t.timeout&&(this.timeout=t.timeout),t.mode&&(this.mode=t.mode),t.onError&&(this.onError=t.onError),this.setJoggingMode(this.mode,!1)}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get cellId(){return this.motionStream.cellId}get numJoints(){return this.motionStream.joints.length}async stop(){if(this.joggingSocket){const t=new Array(this.numJoints).fill(0);this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:t})}this.trajectorySocket&&this.trajectorySocket.sendJson({message_type:"PauseMovementRequest"})}async dispose(){const t=this.closeJoggingSockets();return this.ownsMotionStream&&this.motionStream.dispose(),t}closeJoggingSockets(){var o,n;(o=this.endJoggingInit)==null||o.call(this),(n=this.endIncrementalMotion)==null||n.call(this);const t=[this.joggingSocket,this.trajectorySocket].filter(i=>i!==null);return t.forEach(i=>{i.dispose()}),this.joggingSocket=null,this.trajectorySocket=null,Promise.all(t.map(i=>i.closed()))}async setJoggingMode(t,o=!0){if(!(this.mode===t&&o)&&(this.closeJoggingSockets(),this.mode=t,this.mode==="jogging"))return this.initializeJoggingWebsocket()}async initializeJoggingWebsocket(){return new Promise((t,o)=>{const n=this.nova.openReconnectingWebsocket(`/cells/${this.cellId}/controllers/${this.motionStream.controllerId}/execution/jogging`);this.joggingSocket=n;let i=!1;const s=setTimeout(()=>{a(new Error(`Jogging initialization timeout after ${this.timeout} ms`))},this.timeout),a=h=>{i||(i=!0,clearTimeout(s),n.removeEventListener("close",u),this.endJoggingInit===c&&(this.endJoggingInit=void 0),h?o(h):t())},c=()=>a(),u=()=>{n.disposed&&a()};this.endJoggingInit=c,n.addEventListener("close",u),n.addEventListener("message",h=>{var m,d,l;const g=_.tryParseJson(h.data);if(((m=g==null?void 0:g.result)==null?void 0:m.kind)==="INITIALIZE_RECEIVED"){a();return}if(((d=g==null?void 0:g.result)==null?void 0:d.kind)==="MOTION_ERROR")if(this.onBlocked&&((l=g==null?void 0:g.result)!=null&&l.message.includes(ft))){a(),n.dispose(),this.onBlocked();return}else this.onError?(a(),this.onError(h.data)):a(new Error(h.data))}),n.sendJson({message_type:"InitializeJoggingRequest",motion_group:this.motionGroupId,...this.tcp?{tcp:this.tcp}:{}})})}async rotateJoints({joint:t,direction:o,velocityValue:n,velocityUnit:i}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'");const s=new Array(this.numJoints).fill(0);s[t]=o==="-"?-n:n,this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:s})}async translateTCP({axis:t,direction:o,velocityMmPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:this.velocityAlongAxis(t,o==="-"?-n:n),rotation:[0,0,0],use_tool_coordinate_system:this.orientation==="tool"})}async rotateTCP({axis:t,direction:o,velocityRadsPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:[0,0,0],rotation:this.velocityAlongAxis(t,o==="-"?-n:n),use_tool_coordinate_system:this.orientation==="tool"})}get coordinateSystemRotation(){if(!(this.orientation==="tool"||!this.coordinateSystem))return E.fromCoordinateSystem(this.coordinateSystem).quaternion}velocityAlongAxis(t,o){const n=new I.Vector3;n[t]=o;const i=this.coordinateSystemRotation;return i&&n.applyQuaternion(i),[n.x,n.y,n.z]}async runIncrementalCartesianMotion(t){if(this.mode!=="trajectory")throw new Error("Set jogging mode to 'trajectory' to run incremental cartesian motions");if(!this.incrementalMotionInFlight){this.incrementalMotionInFlight=!0;try{const o=await this.planIncrementalCartesianMotion(t);o&&await this.executeTrajectory(o)}finally{this.incrementalMotionInFlight=!1}}}async planIncrementalCartesianMotion({currentTcpPose:t,currentJoints:o,velocityInRelevantUnits:n,axis:i,direction:s,motion:a}){var p,x,k;const c=[],u=be({currentTcpPose:t,axis:i,direction:s,motion:a,useToolCoordinateSystem:this.orientation==="tool",coordinateSystemRotation:this.coordinateSystemRotation});c.push({limits_override:a.type==="translate"?{tcp_velocity_limit:n}:{tcp_orientation_velocity_limit:n},path:{path_definition_name:"PathLine",target_pose:{position:u.position,orientation:u.orientation}}});const h=this.motionStream.description;if(h.cycle_time===void 0){this.logger.warn("Current motion group has no cycle time, cannot plan jogging motion");return}const g=this.motionStream.rapidlyChangingMotionState.tcp,m=g?(x=(p=h.tcps)==null?void 0:p[g])==null?void 0:x.pose:void 0,d={motion_group_model:((k=this.options)==null?void 0:k.motionGroupModel)??h.motion_group_model,cycle_time:h.cycle_time,mounting:h.mounting,tcp_offset:m,global:h.operation_limits.auto_limits},l=await this.nova.api.trajectoryPlanning.planTrajectory(this.cellId,{motion_group_setup:d,start_joint_position:o,motion_commands:c}),f=l.response;if(!f)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(l)}`);if("error_feedback"in f){if(this.onError){this.onError(f);return}throw new Error(`Failed to plan jogging increment motion: ${JSON.stringify(f.error_feedback)}`)}return f}async executeTrajectory(t){const o=this.nova.openReconnectingWebsocket(`/cells/${this.cellId}/controllers/${this.motionStream.controllerId}/execution/trajectory`);this.trajectorySocket=o;const n=new AbortController;let i,s;try{await new Promise((a,c)=>{let u=!1;const h=()=>{u||(u=!0,a())},g=d=>{if(!u){if(u=!0,this.onError){this.onError(d),a();return}c(d instanceof Error?d:new Error(`Failed to execute trajectory: ${JSON.stringify(d)}`))}};s=h,this.endIncrementalMotion=h;const m=we(t);i=setTimeout(()=>{g(new Error(`Jogging motion did not complete within ${m}ms`))},m),o.addEventListener("message",d=>{var f,p;const l=(f=_.tryParseJson(d.data))==null?void 0:f.result;if(!(l!=null&&l.kind)){g(new Error(`Failed to execute trajectory: Received invalid message ${d.data}`));return}if(this.onBlocked&&((p=l.message)!=null&&p.includes(ft))){this.onBlocked(),h();return}if(l.kind==="INITIALIZE_RECEIVED"){if(l.add_trajectory_error||l.message){g(l);return}o.sendJson({message_type:"StartMovementRequest",direction:"DIRECTION_FORWARD"})}else if(l.kind==="START_RECEIVED"){if(l.message){g(l);return}this.waitForMotionToFinish(n.signal).then(h,g)}else l.kind==="PAUSE_RECEIVED"||(l.kind==="MOTION_ERROR"&&l.message?g(l):g(new Error(`Failed to execute trajectory, cannot handle message type "${l.kind}"`)))}),o.sendJson({message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.motionGroupId,data:t,tcp:this.tcp}})})}finally{clearTimeout(i),n.abort(),this.endIncrementalMotion===s&&(this.endIncrementalMotion=void 0),o.dispose(),this.trajectorySocket===o&&(this.trajectorySocket=null)}}async waitForMotionToFinish(t){const o=()=>this.motionStream.rapidlyChangingMotionState.standstill;await y.when(()=>!o(),{timeout:Ce,signal:t}).catch(()=>{}),await y.when(o,{signal:t})}}const Rt=e=>{const t=e.softTimeout||3e3,[o,n]=v.useState(!1);return v.useEffect(()=>{const i=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(i)}),r.jsx(b,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:"text.primary"},children:e.error?r.jsx(Jt,{loadingMessage:e.message,error:e.error}):r.jsxs(r.Fragment,{children:[r.jsx(jt,{sx:{mb:3}}),!!e.message&&r.jsx(w,{variant:"body1",children:e.message}),r.jsx(w,{variant:"body2",sx:{visibility:o?"visible":"hidden",mt:2,color:"text.secondary"},children:"This is taking longer than expected..."})]})})},Jt=e=>{const t=Zt.makeErrorMessage(e.error),o=e.error instanceof Error?e.error.stack:null;return r.jsxs(b,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",p:2,overflow:"auto",color:"error.main"},children:[r.jsx(w,{variant:"body1",children:(e.loadingMessage?`Error while ${bt.lowerFirst(Qt.capitalize(e.loadingMessage))} - `:"")+t}),o&&r.jsx(L,{component:"pre",sx:{typography:"body2",fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word",mt:2,pb:6},children:o})]})},_e=T.observer(({store:e})=>{const{t}=D.useTranslation();return r.jsx(xt,{"data-testid":"jogging-blocked","aria-label":"jogging-blocked",open:!0,sx:{position:"absolute",zIndex:o=>o.zIndex.drawer+1,color:"#fff",background:"rgba(15, 15, 15, 0.88)",justifyContent:"flex-start",alignItems:"flex-start"},children:r.jsxs(b,{sx:{m:2,width:"100%"},children:[r.jsxs(Xt,{severity:"error",sx:{mb:2},children:[r.jsx(te,{children:t("Jogging.Blocked.ti")}),t("Jogging.Blocked.lb")]}),r.jsx(it,{variant:"contained",color:"secondary",onClick:()=>e.unblock(),children:t("Jogging.Blocked.Reenable.bt")})]})})}),Ee=({title:e,titleId:t,...o},n)=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...o},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),Te=v.forwardRef(Ee),Me=({title:e,titleId:t,...o},n)=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...o},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),ke=v.forwardRef(Me),Oe=({title:e,titleId:t,...o},n)=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...o},e?j.createElement("title",{id:t},e):null,j.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z",clipRule:"evenodd"})),Re=v.forwardRef(Oe),Je=({title:e,titleId:t,...o},n)=>j.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...o},e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z",fill:"white"})),Ae=v.forwardRef(Je),At=T.observer(({store:e})=>{const{t}=D.useTranslation(),[o,n]=v.useState(e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached),i=v.useRef(o);P.useAnimationFrame(()=>{const a=e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;ee(i.current,a)||(i.current=a,n(a))});const s=[];for(const[a,c]of o.entries())c&&s.push(a);return r.jsx(L,{sx:{display:"flex",flexDirection:"row",justifyContent:"center"},children:r.jsx(w,{"data-testid":"jogging-joint-limit-detector","aria-label":"jogging-joint-limit-detector",color:"error",variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2,visibility:s.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:s.map(a=>a+1).join(", ")})})})}),Pe=q.styled(ne)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function X({labelValue:e,...t}){return r.jsxs(Pe,{fullWidth:!0,variant:"filled",children:[r.jsx(ie,{id:t.labelId,children:e}),r.jsx(re,{...t})]})}function yt(e){const t=e.lastIndexOf("On");return t>0?e.slice(0,t):e}function Pt(e,t){const o=e[t];if(o)return o;const n=yt(t),i=e[n];if(i)return i;const s=Object.keys(e).filter(c=>yt(c)===n);if(s.length!==1)return;const a=s[0];return a?e[a]:void 0}const Ve={coordinate_system:"world",name:"world",reference_coordinate_system:"",position:[0,0,0],orientation:[0,0,0],orientation_type:"ROTATION_VECTOR"};function Vt(e){const t=K(e.map(i=>({...i,coordinate_system:i.coordinate_system||"world"})),"coordinate_system");t.world??(t.world=Ve);const o={},n=i=>{const s=o[i];if(s)return s;const a=Pt(t,i);if(!a)throw new Error(`Unknown coordinate system ${i}. Known coordinate systems are: ${Object.keys(t).join(", ")}`);const c=a.reference_coordinate_system||"world";let u;if(c==="world")u=a;else{const h=n(c),g=E.fromCoordinateSystem(h).multiply(E.fromCoordinateSystem(a));u={...a,position:[g.position.x,g.position.y,g.position.z],orientation:[g.orientation.x,g.orientation.y,g.orientation.z],orientation_type:"ROTATION_VECTOR",reference_coordinate_system:h.reference_coordinate_system}}return o[i]=u,u};return Object.fromEntries(Object.keys(t).map(i=>[i,n(i)]))}function st(e,t){const o=Pt(e,t||"world");if(!o)throw new Error(`Unknown coordinate system ${t}. Known coordinate systems are: ${Object.keys(e).join(", ")}`);return o}function De(e,t){return st(Vt(t),e)}function at(e,t,o){if(e.coordinateSystemId===t)return e;const n=Vt(o),i=st(n,e.coordinateSystemId||"world"),s=st(n,t);if(i.coordinate_system===s.coordinate_system)return{...e,coordinateSystemId:s.coordinate_system};const a=E.fromCoordinateSystem(s).inverse().multiply(E.fromCoordinateSystem(i).multiply(E.fromPose(e.pose)));return{pose:{position:[a.position.x,a.position.y,a.position.z],orientation:[a.orientation.x,a.orientation.y,a.orientation.z]},coordinateSystemId:s.coordinate_system}}function Ne(e,t,o){const n=E.fromPose(e).multiply(E.fromRobotTcp(t).inverse()).multiply(E.fromRobotTcp(o)),{position:i,orientation:s}=n;return{position:[i.x,i.y,i.z],orientation:[s.x,s.y,s.z]}}function Dt(e){var t,o,n,i,s;if(typeof e=="string"){const a=_.tryParseJson(e);return a?Dt(a):e}if(e&&typeof e=="object"){const a=e;return((t=a.error_feedback)==null?void 0:t.error_feedback_name)||((o=a.add_trajectory_error)==null?void 0:o.message)||a.message||((i=(n=a.result)==null?void 0:n.add_trajectory_error)==null?void 0:i.message)||((s=a.result)==null?void 0:s.message)||"Jogging motion failed"}return"Jogging motion failed"}const Fe=[{pattern:/^FeedbackSingularity$/,translationKey:"Jogging.StreamStateSection.Error.Singularity.lb"},{pattern:/^FeedbackJointLimitExceeded$/,translationKey:"Jogging.StreamStateSection.Error.JointLimit.lb"},{pattern:/^FeedbackOutOfWorkspace$/,translationKey:"Jogging.StreamStateSection.Error.OutOfWorkspace.lb"},{pattern:/^FeedbackCollision$/,translationKey:"Jogging.StreamStateSection.Error.Collision.lb"},{pattern:/^FeedbackNoSolutionInCurrentConfiguration$/,translationKey:"Jogging.StreamStateSection.Error.NoSolutionInConfiguration.lb"},{pattern:/^Feedback\w+$/,translationKey:"Jogging.StreamStateSection.Error.PlanningFailed.lb"}];function Le(e){var t;return((t=Fe.find(({pattern:o})=>o.test(e)))==null?void 0:t.translationKey)??null}const qe=5,$e=250;function Be(e){var n,i,s,a;const t=[(i=(n=e==null?void 0:e.manual_t1_limits)==null?void 0:n.tcp)==null?void 0:i.velocity,(a=(s=e==null?void 0:e.manual_limits)==null?void 0:s.tcp)==null?void 0:a.velocity].filter(c=>typeof c=="number"&&Number.isFinite(c)&&c>0);return Math.min($e,...t)/10}const ct=[{id:"0.1",mm:.1,degrees:.05},{id:"1",mm:1,degrees:.5},{id:"5",mm:5,degrees:2.5},{id:"10",mm:10,degrees:5}],ze=[{id:"continuous"},...ct],Ue=["coordsys","tool"];class Q{constructor(t,o,n,i,s){var c,u,h;this.jogger=t,this.coordSystems=o,this.motionGroupDescription=n,this.tcps=i,this.inverseSolverValue=s,this.selectedTabId="cartesian",this.locks=new Set,this.blocked=!1,this.selectedCoordSystemId="world",this.jogCoordSystemId="world",this.selectedTcpId="",this.tcpChangeInProgress=!1,this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.lastJogError=null,this.onBeforeActivate=null,this.rotationVelocityDegPerSec=qe,this.minTranslationVelocityMmPerSec=1,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.showCoordSystemSelect=!1,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[],this.inverseSolver=void 0,this.jointType=F.JointTypeEnum.RevoluteJoint;for(const g of o)if(g.coordinate_system===""){g.coordinate_system="world";break}this.selectedCoordSystemId=((c=o[0])==null?void 0:c.coordinate_system)||"world",this.jogCoordSystemId=this.selectedCoordSystemId,this.selectedTcpId=t.motionStream.rapidlyChangingMotionState.tcp??"",this.tcpChangeInProgress=this.tcps.length>0&&!this.selectedTcpId,this.inverseSolver=s,this.translationVelocityMmPerSec=Be(n==null?void 0:n.operation_limits),this.jointType=((h=(u=n==null?void 0:n.dh_parameters)==null?void 0:u[0])==null?void 0:h.type)??F.JointTypeEnum.RevoluteJoint,y.makeAutoObservable(this,{},{autoBind:!0}),this.jogger.onBlocked=()=>{this.block()};const a=this.jogger.onError;this.jogger.onError=g=>{this.setLastJogError(Dt(g)),a==null||a(g)},this.loadFromLocalStorage(),this.disposers.push(y.autorun(()=>this.saveToLocalStorage())),this.disposers.push(y.autorun(()=>{const g=this.jogger.motionStream.rapidlyChangingMotionState.tcp;g&&g!==this.selectedTcpId&&y.runInAction(()=>{this.selectedTcpId=g,this.tcpChangeInProgress=!1})})),window.joggingStore=this}static async loadFor(t){const{nova:o,cellId:n}=t,[i,s]=await Promise.all([o.api.controller.listCoordinateSystems(n,t.motionStream.controllerId,"ROTATION_VECTOR"),o.api.motionGroup.getMotionGroupDescription(n,t.motionStream.controllerId,t.motionGroupId)]),a=await o.api.motionGroupModels.getMotionGroupKinematicModel(s.motion_group_model);return Q.create(t,{coordinateSystems:i||[],description:s,kinematicModel:a})}static create(t,o){const{coordinateSystems:n,description:i,kinematicModel:s}=o,a=Object.entries(i.tcps||{}).map(([c,u])=>({id:c,readable_name:u.name,position:u.pose.position,orientation:u.pose.orientation}));return new Q(t,n,i,a,s.inverse_solver)}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return bt.countBy(this.coordSystems,t=>t.name)}async deactivate(){this.jogger.mode==="jogging"&&await this.jogger.setJoggingMode("off")}async activate(){var t;return this.lastJogError=null,await((t=this.onBeforeActivate)==null?void 0:t.call(this)),this.currentTab.id==="cartesian"?((this.jogger.tcp!==this.selectedTcpId||this.jogger.orientation!==this.selectedOrientation)&&await this.jogger.setOptions({tcp:this.selectedTcpId||void 0,orientation:this.selectedOrientation}),this.jogger.coordinateSystem=this.jogCoordSystem,this.activeDiscreteIncrement?await this.jogger.setJoggingMode("trajectory"):await this.jogger.setJoggingMode("jogging")):await this.jogger.setJoggingMode("jogging"),this.jogger}loadFromLocalStorage(){const t=_.tryParseJson(localStorage.getItem("joggingToolStore"));t&&(this.tabsById[t.selectedTabId]&&(this.selectedTabId=t.selectedTabId),this.coordSystemsById[t.selectedCoordSystemId]&&(this.selectedCoordSystemId=t.selectedCoordSystemId),this.coordSystemsById[t.jogCoordSystemId]&&(this.jogCoordSystemId=t.jogCoordSystemId),this.incrementOptionsById[t.selectedIncrementId]&&(this.selectedIncrementId=t.selectedIncrementId),["translate","rotate"].includes(t.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=t.selectedCartesianMotionType),["coordsys","tool"].includes(t.selectedOrientation)&&(this.selectedOrientation=t.selectedOrientation))}saveToLocalStorage(){localStorage.setItem("joggingToolStore",JSON.stringify(this.localStorageSave))}get isLocked(){return this.locks.size>0}get lastJogErrorTranslationKey(){return this.lastJogError?Le(this.lastJogError):null}get localStorageSave(){return{selectedTabId:this.selectedTabId,selectedCoordSystemId:this.selectedCoordSystemId,jogCoordSystemId:this.jogCoordSystemId,selectedOrientation:this.selectedOrientation,selectedIncrementId:this.selectedIncrementId,selectedCartesianMotionType:this.selectedCartesianMotionType}}get tabs(){const t=[{id:"joint",label:"Joints"}];return this.inverseSolver!==null&&t.unshift({id:"cartesian",label:"Cartesian"}),t}get incrementOptions(){return ze}get discreteIncrementOptions(){return ct}get incrementOptionsById(){return K(this.incrementOptions,t=>t.id)}get tabsById(){return K(this.tabs,t=>t.id)}get currentTab(){return this.tabsById[this.selectedTabId]||this.tabs[0]}get tabIndex(){return this.tabs.indexOf(this.currentTab)}get coordSystemsById(){return K(this.coordSystems,t=>t.coordinate_system)}get activeCoordSystemId(){return this.selectedOrientation==="tool"?"tool":this.selectedCoordSystemId}get jogCoordSystem(){return De(this.jogCoordSystemId,this.coordSystems)}get tcpPoseInSelectedCoordSystem(){const{tcp_pose:t,coordinate_system:o}=this.jogger.motionStream.readoutState;return!(t!=null&&t.position)||!t.orientation?t:at({pose:{position:t.position,orientation:t.orientation},coordinateSystemId:o||"world"},this.selectedCoordSystemId,this.coordSystems).pose}get tcpsById(){return K(this.tcps,t=>t.id)}tcpPoseIn(t,o){const{tcp_pose:n,tcp:i,coordinate_system:s}=this.jogger.motionStream.readoutState,a=this.tcpsById[i||this.selectedTcpId],c=this.tcpsById[t];if(!(!(n!=null&&n.position)||!n.orientation)&&!(!a||!c))try{return at({pose:Ne(n,a,c),coordinateSystemId:s||"world"},o,this.coordSystems).pose}catch{return}}get activeDiscreteIncrement(){return ct.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}velocityInDisplayUnits(t){return t?this.rotationVelocityDegPerSec:this.translationVelocityMmPerSec}minVelocityInDisplayUnits(t){return t?this.minRotationVelocityDegPerSec:this.minTranslationVelocityMmPerSec}maxVelocityInDisplayUnits(t){return t?this.maxRotationVelocityDegPerSec:this.maxTranslationVelocityMmPerSec}onTabChange(t,o){const n=this.tabs[o]||this.tabs[0];this.selectedTabId=n.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.requestTcpChange(t).catch(o=>{console.error("Failed to change TCP:",o)})}async requestTcpChange(t){if(t===this.selectedTcpId)return;this.tcpChangeInProgress=!0;const o=this.jogger.tcp,n=this.jogger.mode!=="jogging";try{this.jogger.tcp=t,n?await this.jogger.setJoggingMode("jogging"):await this.jogger.setJoggingMode("jogging",!1);let i=await this.waitForTcpConfirmation(t,1e3);n&&await this.jogger.setJoggingMode("off"),i||(i=await this.waitForTcpConfirmation(t,2e3)),y.runInAction(()=>{i?this.selectedTcpId=t:(this.jogger.tcp=o,this.selectedTcpId=this.jogger.motionStream.rapidlyChangingMotionState.tcp??"")})}catch(i){throw n&&await this.jogger.setJoggingMode("off").catch(()=>{}),y.runInAction(()=>{this.jogger.tcp=o,this.selectedTcpId=this.jogger.motionStream.rapidlyChangingMotionState.tcp??""}),i}finally{y.runInAction(()=>{this.tcpChangeInProgress=!1})}}waitForTcpConfirmation(t,o){return new Promise(n=>{const i=setTimeout(()=>{s(),n(!1)},o),s=y.when(()=>this.jogger.motionStream.rapidlyChangingMotionState.tcp===t,()=>{clearTimeout(i),n(!0)})})}setSelectedOrientation(t){this.selectedOrientation=t}setMoveRelativeToSelectedTcp(){this.selectedOrientation="tool"}setMoveRelativeToCoordSystem(t){this.selectedOrientation="coordsys",this.jogCoordSystemId=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setLastJogError(t){this.lastJogError=t}setVelocityFromSlider(t,o){!Number.isFinite(t)||t<this.minVelocityInDisplayUnits(o)||t>this.maxVelocityInDisplayUnits(o)||(o?this.rotationVelocityDegPerSec=t:this.translationVelocityMmPerSec=t)}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}block(){this.blocked=!0}unblock(){this.blocked=!1,this.jogger.mode==="jogging"&&this.jogger.initializeJoggingWebsocket().catch(t=>{console.error("Failed to initialize jogging:",t)})}async withMotionLock(t){const o=se();this.lock(o);try{return await t()}finally{this.unlock(o)}}}const Ge=T.observer(({store:e,useDegree:t})=>{var a;const{t:o}=D.useTranslation(),n=v.useId(),i=[];function s(c){switch(c){case"coordsys":return o("Jogging.Orientation.coordsys");case"tool":return o("Jogging.Orientation.tool");default:return c}}return e.showCoordSystemSelect&&i.push(r.jsx(X,{labelId:`jogging-coord-select-${n}`,labelValue:o("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:c=>e.setSelectedCoordSystemId(c.target.value),children:e.coordSystems.map(c=>r.jsx($,{value:c.coordinate_system,children:c.name&&e.coordSystemCountByName[c.name]>1?`${c.name} / ${c.coordinate_system}`:c.name||c.coordinate_system},c.coordinate_system))},"coord")),e.showTcpSelect&&i.push(r.jsx(X,{labelId:`jogging-tcp-select-${n}`,labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",displayEmpty:e.tcpChangeInProgress,onChange:c=>{e.requestTcpChange(c.target.value).catch(u=>{console.error("Failed to change TCP:",u)})},disabled:e.tcpChangeInProgress,endAdornment:e.tcpChangeInProgress?r.jsx(oe,{position:"end",children:r.jsx(jt,{size:16})}):void 0,children:e.tcps.map(c=>r.jsx($,{value:c.id,children:c.id},c.id))},"tcp")),e.showOrientationSelect&&i.push(r.jsx(X,{labelValue:o("Jogging.Cartesian.Orientation.lb"),labelId:`orientation-select-${n}`,value:e.selectedOrientation,onChange:c=>e.setSelectedOrientation(c.target.value),children:Ue.map(c=>r.jsx($,{value:c,children:s(c)},c))},"orientation")),e.showIncrementSelect&&i.push(r.jsxs(X,{labelValue:o("Jogging.Increment.hlb"),labelId:`jogging-increment-select-${n}`,size:"small",variant:"filled",value:((a=e.activeDiscreteIncrement)==null?void 0:a.id)||"continuous",onChange:c=>e.setSelectedIncrementId(c.target.value),children:[r.jsx($,{value:"continuous",children:o("Jogging.Increment.Continuous.dd")},"continuous"),e.discreteIncrementOptions.map(c=>r.jsx($,{value:c.id,children:t?`${c.degrees}°`:`${c.mm}mm`},c.id))]},"increment")),r.jsx(L,{component:"div","data-testid":"jogging-options","aria-label":"jogging-options",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:i.map((c,u)=>r.jsx(L,{sx:{gridColumn:i.length%2===1&&u===i.length-1?"span 2":"auto"},children:c},u))})}),We=q.styled(ae)(({theme:e})=>{var t;return{"&.MuiToggleButtonGroup-root":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[8],borderRadius:"8px",padding:"4px",gap:"4px",button:{border:"none",borderRadius:"4px",flex:"1 1 0px",minWidth:0,"&.MuiToggleButtonGroup-firstButton":{borderRadius:"8px 4px 4px 8px"},"&.MuiToggleButtonGroup-lastButton":{borderRadius:"4px 8px 8px 4px"}}}}}),Nt=Z.externalizeComponent(T.observer(e=>{const{store:t}=e,{t:o}=D.useTranslation();function n(i,s){s===e.velocity||!ce(s)||e.onVelocityChange(s,e.useDegree)}return r.jsxs(b,{direction:"row",gap:2,alignItems:"center","data-testid":"velocity-slider","aria-label":"velocity-slider",children:[t.showVelocityLegend&&r.jsx(w,{sx:{color:z.velocitySliderLegendColor,fontSize:"14px"},children:o("Jogging.Velocity.bt")}),r.jsx(vt,{value:e.velocity,color:"secondary",onChange:n,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),t.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):r.jsx(gt,{value:e.velocity.toString()}))]})}));function gt({value:e,sx:t}){var n;const o=q.useTheme();return r.jsx(b,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(n=o.palette.backgroundPaperElevation)==null?void 0:n[8],borderRadius:"10px",minWidth:"111px",...t},children:r.jsx(w,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:o.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Ft=T.observer(({store:e,useDegree:t})=>{const{t:o}=D.useTranslation();function n(i,s){return s?`ω = ${o("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:i})}`:`v = ${o("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:i})}`}return r.jsx(Nt,{store:e,velocity:e.velocityInDisplayUnits(t),min:e.minVelocityInDisplayUnits(t),max:e.maxVelocityInDisplayUnits(t),onVelocityChange:e.setVelocityFromSlider,useDegree:t,disabled:e.isLocked,renderValue:i=>r.jsx(gt,{value:n(i,t),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),Lt=T.observer(({store:e})=>{var a,c,u;const{t}=D.useTranslation(),o=q.useTheme(),n=((u=(c=(a=e.jogger.motionStream.rapidlyChangingMotionState.execute)==null?void 0:a.details)==null?void 0:c.state)==null?void 0:u.kind)??"KIND_UNKNOWN",i=e.lastJogError,s=e.lastJogErrorTranslationKey;return r.jsxs(L,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",color:o.palette.text.primary},children:[r.jsx(w,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:t("Jogging.StreamStateSection.lb")}),r.jsx(w,{variant:"body2",color:i?"error":void 0,sx:{fontSize:"0.75rem",lineHeight:1.2,textAlign:"right"},"data-testid":i?"JOG_ERROR":n,children:i?s?t(s):i:t(`Jogging.StreamStateSection.${n}.lb`)})]})}),He=T.observer(({store:e,children:t})=>{const{t:o}=D.useTranslation(),n=q.useTheme(),i=v.useRef(0);function s(d,l){(l==="translate"||l==="rotate")&&e.setSelectedCartesianMotionType(l)}async function a(d,l){const f=await e.activate(),p=f.motionStream.rapidlyChangingMotionState.tcp_pose,x=f.motionStream.rapidlyChangingMotionState.joint_position;p&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:d.axis,direction:d.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:p,currentJoints:x,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:d.axis,direction:d.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:l.mm}:{type:"rotate",distanceRads:_.degreesToRadians(l.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function c(d){if(e.isLocked)return;const l=++i.current;try{if(await e.activate(),l!==i.current)return;if(e.activeDiscreteIncrement)return await a(d,e.activeDiscreteIncrement);d.motionType==="translate"?await e.jogger.translateTCP({axis:d.axis,direction:d.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.rotateTCP({axis:d.axis,direction:d.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}catch(f){console.error("Jogging failed:",f)}}async function u(){e.isLocked||e.activeDiscreteIncrement||(i.current++,await e.deactivate())}const h=[{id:"x",icon:r.jsx(Te,{}),colors:z.cartesianAxisColors.X},{id:"y",icon:r.jsx(ke,{}),colors:z.cartesianAxisColors.Y},{id:"z",icon:r.jsx(Re,{}),colors:z.cartesianAxisColors.Z}];function g(d){return o("General.mm.variable",{amount:d.toFixed(1)})}function m(d){return o("General.degree.variable",{amount:_.radiansToDegrees(d).toFixed(1)})}return r.jsxs(b,{"data-testid":"jogging-cartesian-tab","aria-label":"jogging-cartesian-tab",flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[r.jsxs(b,{gap:2,children:[r.jsx(Ge,{store:e,useDegree:e.selectedCartesianMotionType==="rotate"}),r.jsx(Ft,{store:e,useDegree:e.selectedCartesianMotionType==="rotate"}),r.jsx(B,{})]}),r.jsx(b,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:r.jsxs(b,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[r.jsxs(We,{value:e.selectedCartesianMotionType,onChange:s,exclusive:!0,"aria-label":o("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[r.jsx(ht,{value:"translate",children:o("Jogging.Cartesian.Translation.bt")}),r.jsx(ht,{value:"rotate",children:o("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&h.map(d=>{var l,f;return r.jsx(rt,{"data-testid":`jogging-cartesian-axis-control-${d.id}`,"aria-label":`jogging-cartesian-axis-control-${d.id}`,colors:d.colors,disabled:e.isLocked,activeJoggingDirection:((l=e.incrementJogInProgress)==null?void 0:l.axis)===d.id?e.incrementJogInProgress.direction:void 0,label:r.jsxs(r.Fragment,{children:[d.icon,r.jsx(w,{sx:{fontSize:"24px",color:((f=d.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:d.id.toUpperCase()})]}),getDisplayedValue:()=>{var p,x;return g(((x=(p=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:p.position)==null?void 0:x[_.XYZ_TO_VECTOR[d.id]])||0)},startJogging:p=>c({axis:d.id,motionType:"translate",direction:p}),stopJogging:u},d.id)}),e.selectedCartesianMotionType==="rotate"&&h.map(d=>{var l,f;return r.jsx(rt,{"data-testid":`jogging-cartesian-axis-control-${d.id}`,"aria-label":`jogging-cartesian-axis-control-${d.id}`,colors:d.colors,disabled:e.isLocked,activeJoggingDirection:((l=e.incrementJogInProgress)==null?void 0:l.axis)===d.id?e.incrementJogInProgress.direction:void 0,label:r.jsxs(r.Fragment,{children:[r.jsx(Ae,{}),r.jsx(w,{sx:{fontSize:"24px",color:((f=d.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:d.id.toUpperCase()})]}),getDisplayedValue:()=>{var p,x;return m(((x=(p=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:p.orientation)==null?void 0:x[_.XYZ_TO_VECTOR[d.id]])||0)},startJogging:p=>c({axis:d.id,motionType:"rotate",direction:p}),stopJogging:u},d.id)})]})}),r.jsx(At,{store:e}),r.jsx(B,{}),r.jsx(Lt,{store:e}),t&&r.jsx(B,{}),t]})}),Ke=T.observer(({store:e,children:t})=>{const o=q.useTheme(),n=v.useRef(0);async function i(a){const c=++n.current;try{if(await e.activate(),c!==n.current)return;await e.jogger.rotateJoints({joint:a.joint,direction:a.direction,velocityUnit:e.jointType===F.JointTypeEnum.PrismaticJoint?"mm/s":"rad/s",velocityValue:e.jointType===F.JointTypeEnum.PrismaticJoint?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec})}catch(u){console.error("Jogging failed:",u)}}async function s(){n.current++,await e.jogger.stop(),await e.deactivate()}return r.jsxs(b,{"data-testid":"jogging-joint-tab","aria-label":"jogging-joint-tab",flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[r.jsx(Ft,{store:e,useDegree:e.jointType===F.JointTypeEnum.RevoluteJoint}),r.jsx(B,{}),r.jsx(b,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},children:r.jsx(b,{"data-testid":"jogging-joint-value-controls-wrapper","aria-label":"jogging-joint-value-controls-wrapper",alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(a=>{var u,h,g;const c=(g=(h=(u=e.motionGroupDescription.operation_limits.auto_limits)==null?void 0:u.joints)==null?void 0:h[a.index])==null?void 0:g.position;return r.jsxs(b,{"data-testid":`jogging-joint-value-control-${a.index}`,"aria-label":`jogging-joint-value-control-${a.index}`,direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&r.jsx(w,{color:e.isLocked?o.palette.text.disabled:o.palette.text.secondary,children:`G${a.index+1}`}),r.jsx(It,{disabled:e.isLocked,lowerLimit:c==null?void 0:c.lower_limit,upperLimit:c==null?void 0:c.upper_limit,useDegree:e.jointType===F.JointTypeEnum.RevoluteJoint,getValue:()=>{const m=e.jogger.motionStream.rapidlyChangingMotionState.joint_position[a.index];return m!==void 0?m:void 0},startJogging:m=>i({joint:a.index,direction:m}),stopJogging:s})]},`joint-${a.index}`)})})}),r.jsx(At,{store:e}),r.jsx(B,{}),r.jsx(Lt,{store:e}),t&&r.jsx(B,{}),t]})}),Ye=Z.externalizeComponent(T.observer(e=>{const t=T.useLocalObservable(()=>({joggingStore:null,loadingError:null}));return v.useEffect(()=>{let o=!1,n;async function i(){y.runInAction(()=>{t.loadingError=null,t.joggingStore=null});try{let s=e.store;if(!s){const a=await nt.open(e.nova,e.motionGroupId,{cellId:e.cellId});if(o){a.dispose();return}try{s=await Q.loadFor(a)}catch(c){throw a.dispose(),c}if(n=s,o){s.dispose();return}}y.runInAction(()=>{t.joggingStore=s}),e.onSetup&&e.onSetup(s)}catch(s){if(o)return;y.runInAction(()=>{t.loadingError=s})}}return i(),()=>{o=!0,n==null||n.dispose()}},[e.store,e.nova,e.motionGroupId,e.cellId]),v.useEffect(()=>{const o=t.joggingStore;o&&(e.locked?o.lock("external"):o.unlock("external"))},[t.joggingStore,e.locked]),r.jsx(b,{"data-testid":"jogging-panel","aria-label":"jogging-panel",sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:t.joggingStore?r.jsx(Qe,{store:t.joggingStore,children:e.children}):r.jsx(Rt,{message:"Loading jogging",error:t.loadingError})})})),Qe=T.observer(({store:e,children:t})=>{const{t:o}=D.useTranslation();function n(){if(e.currentTab.id==="cartesian")return r.jsx(He,{store:e,children:t});if(e.currentTab.id==="joint")return r.jsx(Ke,{store:e,children:t})}return r.jsxs(b,{flexGrow:1,sx:{overflow:"hidden"},children:[r.jsx(Yt,{"data-testid":"jogging-tabs","aria-label":"jogging-tabs",value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(i=>{const s=i.label==="Cartesian"?o("Jogging.Cartesian.bt"):o("Jogging.Joints.bt"),a=i.label==="cartesian"?r.jsx(Wt,{fontSize:"small",sx:{mr:1}}):r.jsx(Ht,{fontSize:"small",sx:{mr:1}});return r.jsx(Kt,{"data-testid":`jogging-tab-${i.id}`,"aria-label":`jogging-tab-${i.id}`,label:e.showTabIcons?r.jsxs(b,{direction:"row",alignItems:"center",children:[a,s]}):s,id:`jogging-tab-${i.id}`,"aria-controls":`jogging-tab-${i.id}`},i.id)})}),r.jsx(b,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()}),e.blocked&&r.jsx(_e,{store:e})]})});function Ze(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Xe({baseUrl:e=Ze(),...t}){return r.jsxs(ue,{"aria-labelledby":"no-motion-group-modal-title",open:!0,fullWidth:!0,sx:{"& .MuiModal-backdrop":{backdropFilter:"blur(10px)"},"& .MuiDialog-paper":{"::before":{content:'""',height:"8px",width:"100%",background:"linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)"},background:"#101629"}},children:[r.jsx(pe,{id:"no-motion-group-modal-title",children:"No motion group found"}),r.jsxs(me,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[r.jsx(w,{color:"#fff",children:"Found no devices to connect to."}),r.jsx(w,{color:"#fff",children:"Please ensure a motion group has been created."})]}),r.jsx(he,{children:r.jsxs(b,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[r.jsx(it,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),r.jsx(it,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const St=1e-4,to={a:0,d:0,alpha:0,theta:0,reverse_rotation_direction:!1};class et{constructor(t,o,n,i,s,a,c,u,h,g,m="cell"){this.controller=o,this.motionGroup=n,this.initialMotionState=i,this.motionStateSocket=s,this.isVirtual=a,this.tcps=c,this.description=u,this.initialControllerState=h,this.controllerStateSocket=g,this.cellId=m,this.connectedJoggingSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.nova=P.createNovaClient(t),this.rapidlyChangingMotionState=i,this.controllerState=h,g.addEventListener("message",d=>{var f;const l=(f=_.tryParseJson(d.data))==null?void 0:f.result;l&&y.runInAction(()=>{this.controllerState=l})}),s.addEventListener("message",d=>{var f;const l=(f=_.tryParseJson(d.data))==null?void 0:f.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${d.data}`);lt(this.rapidlyChangingMotionState.joint_position,l.joint_position,St)||y.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=l.joint_position}),dt(this.rapidlyChangingMotionState,l,St)||y.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose}),l.tcp!==void 0&&this.rapidlyChangingMotionState.tcp!==l.tcp&&y.runInAction(()=>{this.rapidlyChangingMotionState.tcp=l.tcp}),this.rapidlyChangingMotionState.standstill!==l.standstill&&y.runInAction(()=>{this.rapidlyChangingMotionState.standstill=l.standstill})}),y.makeAutoObservable(this)}static async connectMultiple(t,o,n={}){const i=P.createNovaClient(t),s=n.cellId??P.cellIdOf(t);return Promise.all(o.map(a=>et.connect(i,a,{...n,cellId:s})))}static async connect(t,o,n={}){var R,J;const i=P.createNovaClient(t),s=n.cellId??P.cellIdOf(t)??"cell",[a,c]=o.split("@"),u=await i.api.controller.getCurrentRobotControllerState(s,c),h=u==null?void 0:u.motion_groups.find(C=>C.motion_group===o);if(!u||!h)throw new Error(`Controller ${c} or motion group ${o} not found`);const g=i.openReconnectingWebsocket(`/cells/${s}/controllers/${c}/motion-groups/${o}/state-stream`),m=await g.firstMessage(),d=(R=_.tryParseJson(m.data))==null?void 0:R.result;if(!d)throw new Error(`Unable to parse initial motion state message ${m.data}`);console.log(`Connected motion state websocket to motion group ${h.motion_group}. Initial state:
2
+ `,d);const f=(await i.api.controller.getRobotController(s,u.controller)).configuration.kind==="VirtualController",p=await i.api.motionGroup.getMotionGroupDescription(s,c,h.motion_group),x=Object.entries(p.tcps||{}).map(([C,A])=>({id:C,readable_name:A.name,position:A.pose.position,orientation:A.pose.orientation})),k=i.openReconnectingWebsocket(`/cells/${s}/controllers/${u.controller}/state-stream?response_rate=1000`),M=await k.firstMessage(),O=(J=_.tryParseJson(M.data))==null?void 0:J.result;if(!O)throw new Error(`Unable to parse initial controller state message ${M.data}`);return console.log(`Connected controller state websocket to controller ${u.controller}. Initial state:
3
+ `,O),new et(i,u,h,d,g,f,x,p,O,k,s)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.description.motion_group_model}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.joint_position.map((t,o)=>({index:o}))}get dhParameters(){if(this.description.dh_parameters!==void 0)return this.description.dh_parameters.map(t=>({...to,...t}))}get safetyZones(){return this.description.safety_zones}get mountingPosition(){var t,o,n;return this.description.mounting?[(((t=this.description.mounting.position)==null?void 0:t[0])||0)/1e3,(((o=this.description.mounting.position)==null?void 0:o[1])||0)/1e3,(((n=this.description.mounting.position)==null?void 0:n[2])||0)/1e3]:[0,0,0]}get mountingQuaternion(){var i,s,a,c,u,h;const t=new mt.Vector3(((s=(i=this.description.mounting)==null?void 0:i.orientation)==null?void 0:s[0])||0,((c=(a=this.description.mounting)==null?void 0:a.orientation)==null?void 0:c[1])||0,((h=(u=this.description.mounting)==null?void 0:u.orientation)==null?void 0:h[2])||0),o=t.length(),n=t.normalize();return new mt.Quaternion().setFromAxisAngle(n,o)}get isEstopActive(){return["SAFETY_STATE_ROBOT_EMERGENCY_STOP","SAFETY_STATE_DEVICE_EMERGENCY_STOP"].includes(this.controllerState.safety_state)}get isMoveableSafetyState(){return["SAFETY_STATE_NORMAL","SAFETY_STATE_REDUCED"].includes(this.controllerState.safety_state)}get isMoveableOperationMode(){return["OPERATION_MODE_AUTO","OPERATION_MODE_MANUAL","OPERATION_MODE_MANUAL_T1","OPERATION_MODE_MANUAL_T2"].includes(this.controllerState.operation_mode)}get canBeMoved(){return this.isMoveableSafetyState&&this.isMoveableOperationMode&&this.activationState==="active"}async deactivate(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}y.runInAction(()=>{this.activationState="deactivating"});try{await this.nova.api.controller.setDefaultMode(this.cellId,this.controllerId,"ROBOT_SYSTEM_MODE_MONITOR"),y.runInAction(()=>{this.activationState="inactive"})}catch(t){throw y.runInAction(()=>{this.activationState="active"}),t}}async activate(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}y.runInAction(()=>{this.activationState="activating"});try{await this.nova.api.controller.setDefaultMode(this.cellId,this.controllerId,"ROBOT_SYSTEM_MODE_CONTROL"),y.runInAction(()=>{this.activationState="active"})}catch(t){throw y.runInAction(()=>{this.activationState="inactive"}),t}}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.controllerStateSocket.close(),this.connectedJoggingSocket&&this.connectedJoggingSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}}const eo=["FeedbackOutOfWorkspace","FeedbackJointLimitExceeded","FeedbackAxisRangeExceeded","FeedbackNoSolutionInCurrentConfiguration"];function oo(e){return e==="FeedbackSingularity"?"Jogging.TargetPose.Error.Singularity.lb":e==="FeedbackCollision"?"Jogging.TargetPose.Error.Collision.lb":eo.includes(e)?"Jogging.TargetPose.Error.NotReachable.lb":"Jogging.TargetPose.Error.PlanningFailed.lb"}class no{constructor(t){this.options=t,this.plannedTrajectory=null,this.trajectoryState="idle",this.lastError=null,this.disposers=[],this.logger=t.logger??console,y.makeAutoObservable(this,{socket:!1,disposers:!1,logger:!1,options:!1},{autoBind:!0}),this.socket=this.openSocket(),this.disposers.push(y.reaction(()=>this.executionState,o=>{o==="END_OF_TRAJECTORY"&&this.reset()}))}get joggingStore(){return this.options.joggingStore}get jogger(){return this.options.joggingStore.jogger}get motionStream(){return this.options.joggingStore.jogger.motionStream}get executionState(){var t,o;return(o=(t=this.motionStream.rapidlyChangingMotionState.execute)==null?void 0:t.details)==null?void 0:o.state.kind}async planTrajectory(t){var k,M,O,R,J;if((M=(k=this.options).isLocked)!=null&&M.call(k))throw this.reset(),new Error("Cannot plan trajectory: the robot is locked");await this.ensureMovementOwnership();const o=this.motionStream.rapidlyChangingMotionState.joint_position??[],{cycle_time:n,mounting:i,motion_group_model:s,tcps:a}=this.motionStream.description,c=this.joggingStore.selectedTcpId,u=c?(O=a==null?void 0:a[c])==null?void 0:O.pose:void 0,h={motion_group_model:((R=this.jogger.options)==null?void 0:R.motionGroupModel)??s,cycle_time:n??0,mounting:i,...u&&{tcp_offset:u}};let g;if(t.type==="cartesian"){let C=t.pose;const A=t.coordinateSystemId||"world";if(A!=="world")try{C=at({pose:{position:C.position??[0,0,0],orientation:C.orientation??[0,0,0]},coordinateSystemId:A},"world",this.joggingStore.coordSystems).pose}catch{return this.reset(),{ok:!1,errorFeedbackName:"FeedbackUnknown"}}g={limits_override:{tcp_velocity_limit:this.joggingStore.translationVelocityMmPerSec},path:{target_pose:C,path_definition_name:"PathCartesianPTP"}}}else g={limits_override:{joint_velocity_limits:Array(o.length).fill(this.joggingStore.rotationVelocityRadsPerSec)},path:{target_joint_position:t.joints,path_definition_name:"PathJointPTP"}};y.runInAction(()=>{this.lastError=null,this.trajectoryState="planning"});let m;try{m=await this.jogger.nova.api.trajectoryPlanning.planTrajectory(this.jogger.cellId,{motion_group_setup:h,start_joint_position:o,motion_commands:[g]})}catch(C){throw this.reset(),C}const d=m.response;if("error_feedback"in d){const C=((J=d.error_feedback)==null?void 0:J.error_feedback_name)??"FeedbackUnknown";return this.reset(),{ok:!1,errorFeedbackName:C}}const l=d.joint_positions,f=l[0],p=l[l.length-1];if(!f||!p)throw this.reset(),new Error("Trajectory returned invalid joint positions");const x={message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.jogger.motionGroupId,tcp:c||void 0,data:d}};return this.socket.sendJson(x),y.runInAction(()=>{this.plannedTrajectory={startJoints:f,endJoints:p}}),{ok:!0}}start(){if(!this.plannedTrajectory)throw new Error("Cannot start trajectory: no planned trajectory exists");if(this.trajectoryState!=="planned")throw new Error(`Cannot start trajectory: expected state "planned", got "${this.trajectoryState}"`);if(this.executionState==="RUNNING")throw new Error("Cannot start trajectory: robot is already running");const t={message_type:"StartMovementRequest",direction:"DIRECTION_FORWARD"};this.socket.sendJson(t)}async pause(){if(this.trajectoryState!=="moving")throw new Error(`Cannot pause trajectory: expected state "moving", got "${this.trajectoryState}"`);if(this.executionState==="PAUSED_BY_USER")throw new Error("Cannot pause trajectory: robot is already paused");const t={message_type:"PauseMovementRequest"};this.socket.sendJson(t),await this.waitUntilStopped(),y.runInAction(()=>{this.trajectoryState=this.plannedTrajectory?"planned":"idle"})}async stopAndReset(){try{if(this.executionState==="RUNNING"||this.trajectoryState==="moving"){const t={message_type:"PauseMovementRequest"};this.socket.sendJson(t),await this.waitUntilStopped()}}catch(t){this.logger.warn("Failed to stop trajectory execution cleanly",t)}finally{this.reset(),this.closeSocket(),this.socket=this.openSocket()}}reset(){this.plannedTrajectory=null,this.trajectoryState="idle"}clearError(){this.lastError=null}dispose(){for(const t of this.disposers)t();this.closeSocket()}async ensureMovementOwnership(){if(this.options.ensureMovementOwnership){await this.options.ensureMovementOwnership();return}this.jogger.mode!=="trajectory"&&(await this.joggingStore.deactivate(),await this.jogger.setJoggingMode("trajectory"))}async waitUntilStopped(){await y.when(()=>this.motionStream.rapidlyChangingMotionState.standstill)}handleMessage(t){var n,i;const o=(n=_.tryParseJson(t.data))==null?void 0:n.result;if(o)switch(o.kind){case"INITIALIZE_RECEIVED":o.add_trajectory_error||o.message?(this.lastError=((i=o.add_trajectory_error)==null?void 0:i.message)??o.message??"NOVA refused the trajectory",this.reset()):this.trajectoryState="planned";break;case"START_RECEIVED":this.trajectoryState="moving";break;case"PAUSE_RECEIVED":this.trajectoryState==="moving"&&(this.trajectoryState="stopping");break;case"MOTION_ERROR":this.lastError=o.message,this.reset();break}}openSocket(){const t=this.jogger.nova.openReconnectingWebsocket(`/cells/${this.jogger.cellId}/controllers/${this.motionStream.controllerId}/execution/trajectory`);return t.addEventListener("message",this.handleMessage),t}closeSocket(){this.socket.removeEventListener("message",this.handleMessage),this.socket.dispose()}}exports.AppHeader=fe;exports.ConnectedMotionGroup=et;exports.JoggerConnection=nt;exports.JoggingCartesianAxisControl=rt;exports.JoggingJointValueControl=It;exports.JoggingPanel=Ye;exports.JoggingStore=Q;exports.LoadingCover=Rt;exports.LoadingErrorMessage=Jt;exports.MotionStreamConnection=ot;exports.NoMotionGroupModal=Xe;exports.TrajectoryExecutionStore=no;exports.VelocitySlider=Nt;exports.VelocitySliderLabel=gt;exports.jointValuesEqual=_t;exports.jointValuesUnchanged=lt;exports.planErrorTranslationKey=oo;exports.poseEqual=Tt;exports.readoutOf=kt;exports.readoutsEqual=Ot;exports.tcpMotionEqual=dt;exports.unwrapRotationVector=Mt;
@@ -0,0 +1 @@
1
+ "use strict";const d=require("three");function g(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const r=g(d);function y(n){try{return JSON.stringify(n)}catch{return}}function b(n){const e=n.length(),t=new r.Quaternion;if(e>1e-6){const o=n.clone().normalize();t.setFromAxisAngle(o,e)}return t}function z(n){if(!n||n.length===0)return 5;const o=n.reduce((i,c)=>i+Math.abs(c.a??0)/1e3+Math.abs(c.d??0)/1e3,0)*2;return!Number.isFinite(o)||o<=0?5:o}function V(n){if(n.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const e=new r.Vector3(n[0].x,n[0].y,n[0].z),t=new r.Vector3(n[1].x,n[1].y,n[1].z),o=new r.Vector3(n[2].x,n[2].y,n[2].z),i=new r.Vector3().subVectors(t,e),c=new r.Vector3().subVectors(o,e),s=new r.Vector3().crossVectors(i,c).normalize();for(let a=3;a<n.length;a++){const u=new r.Vector3(n[a].x,n[a].y,n[a].z),l=new r.Vector3().subVectors(u,e),f=s.dot(l);if(Math.abs(f)>1e-6)return console.log("Vertices are not on the same plane"),{isCoplanar:!1}}return{isCoplanar:!0,normal:s}}exports.dhParametersToPlaneSize=z;exports.orientationToQuaternion=b;exports.tryStringifyJson=y;exports.verticesToCoplanarity=V;
@@ -0,0 +1,39 @@
1
+ import * as o from "three";
2
+ function V(n) {
3
+ try {
4
+ return JSON.stringify(n);
5
+ } catch {
6
+ return;
7
+ }
8
+ }
9
+ function d(n) {
10
+ const t = n.length(), r = new o.Quaternion();
11
+ if (t > 1e-6) {
12
+ const e = n.clone().normalize();
13
+ r.setFromAxisAngle(e, t);
14
+ }
15
+ return r;
16
+ }
17
+ function g(n) {
18
+ if (!n || n.length === 0)
19
+ return 5;
20
+ const e = n.reduce((c, s) => c + Math.abs(s.a ?? 0) / 1e3 + Math.abs(s.d ?? 0) / 1e3, 0) * 2;
21
+ return !Number.isFinite(e) || e <= 0 ? 5 : e;
22
+ }
23
+ function h(n) {
24
+ if (n.length < 3)
25
+ return console.log("Not enough vertices to define a plane"), { isCoplanar: !1 };
26
+ const t = new o.Vector3(n[0].x, n[0].y, n[0].z), r = new o.Vector3(n[1].x, n[1].y, n[1].z), e = new o.Vector3(n[2].x, n[2].y, n[2].z), c = new o.Vector3().subVectors(r, t), s = new o.Vector3().subVectors(e, t), l = new o.Vector3().crossVectors(c, s).normalize();
27
+ for (let a = 3; a < n.length; a++) {
28
+ const u = new o.Vector3(n[a].x, n[a].y, n[a].z), i = new o.Vector3().subVectors(u, t), f = l.dot(i);
29
+ if (Math.abs(f) > 1e-6)
30
+ return console.log("Vertices are not on the same plane"), { isCoplanar: !1 };
31
+ }
32
+ return { isCoplanar: !0, normal: l };
33
+ }
34
+ export {
35
+ g as d,
36
+ d as o,
37
+ V as t,
38
+ h as v
39
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";const t=require("react/jsx-runtime"),i=require("react"),a=require("react-i18next"),l=require("i18next"),g=require("i18next-browser-languagedetector"),s={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Geschwindigkeit","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Blocked.ti":"Verbindung blockiert","Jogging.Blocked.lb":"Ein anderer Client kontrolliert das Jogging.","Jogging.Blocked.Reenable.bt":"Neu verbinden","Jogging.Cartesian.MotionType.lb":"Bewegungstyp","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Gelenkwerte","Jogging.Increment.Continuous.dd":"Fortlaufend","Jogging.Cartesian.Orientation.lb":"Orientierung","Jogging.JointLimitsReached.lb":"Gelenkgrenzen für Gelenk {{jointNumbers}} erreicht","Jogging.Orientation.coordsys":"Roboterbasis","Jogging.Orientation.tool":"Werkzeug","Jogging.StreamStateSection.lb":"Status Stream:","Jogging.StreamStateSection.RUNNING.lb":"In Bewegung","Jogging.StreamStateSection.PAUSED_BY_USER.lb":"Pausiert (Nutzer)","Jogging.StreamStateSection.PAUSED_NEAR_COLLISION.lb":"Pausiert (Kollisionsnähe)","Jogging.StreamStateSection.PAUSED_NEAR_JOINT_LIMIT.lb":"Pausiert (nahe Gelenkgrenze)","Jogging.StreamStateSection.PAUSED_NEAR_SINGULARITY.lb":"Pausiert (nahe Singularität)","Jogging.StreamStateSection.PAUSED_ON_IO.lb":"Pausiert (I/O-Ereignis)","Jogging.StreamStateSection.END_OF_TRAJECTORY.lb":"Trajektorie beendet","Jogging.StreamStateSection.WAIT_FOR_IO.lb":"Warte auf I/O","Jogging.StreamStateSection.KIND_UNKNOWN.lb":"Bereit","Jogging.StreamStateSection.Error.Collision.lb":"Bewegung kann nicht geplant werden: sie würde zu einer Kollision führen","Jogging.StreamStateSection.Error.JointLimit.lb":"Bewegung kann nicht geplant werden: eine Gelenkgrenze würde überschritten","Jogging.StreamStateSection.Error.NoSolutionInConfiguration.lb":"Bewegung kann in der aktuellen Roboterkonfiguration nicht geplant werden","Jogging.StreamStateSection.Error.OutOfWorkspace.lb":"Bewegung kann nicht geplant werden: das Ziel liegt außerhalb des Arbeitsraums","Jogging.StreamStateSection.Error.PlanningFailed.lb":"Die angeforderte Bewegung konnte nicht geplant werden","Jogging.StreamStateSection.Error.Singularity.lb":"Bewegung kann nicht geplant werden: der Pfad führt durch eine Singularität. Versuche eine andere Achse oder bewege die Gelenke direkt","Jogging.TargetPose.Error.Collision.lb":"Die Bewegung zur aktuellen Pose würde eine Kollision verursachen. Bitte ändere die Posen-Koordinaten.","Jogging.TargetPose.Error.NotReachable.lb":"Die aktuelle Pose ist nicht erreichbar. Bitte ändere die Posen-Koordinaten.","Jogging.TargetPose.Error.PlanningFailed.lb":"Die Bewegung zu dieser Pose konnte nicht geplant werden. Bitte ändere die Posen-Koordinaten.","Jogging.TargetPose.Error.Singularity.lb":"Die aktuelle Pose würde eine Singularität erzeugen. Bitte ändere die Posen-Koordinaten.","SafetyBar.ActivationToggle.Activate.bt":"Aktivieren","SafetyBar.ActivationToggle.Activated.bt":"Aktiviert","SafetyBar.ActivationToggle.Activating.bt":"Wird aktiviert…","SafetyBar.ActivationToggle.Deactivating.bt":"Wird deaktiviert…","SafetyBar.ControllerType.Physical.lb":"Physisch","SafetyBar.ControllerType.Virtual.lb":"Virtuell","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> ist ein physische Robotersteuerung. Für die Bewegung dieses Roboters sind <strong>Sicherheitsmaßnahmen</strong> aktiv.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> ist eine virtuelle Robotersteuerung ohne physisches Gegenstück. Der Roboter kann ohne Sicherheitsmaßnahmen bewegt werden.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatischer Betriebsmodus der Robotersteuerung aktiv. Automatisierte Bewegung ohne manuelle Bestätigung freigegeben.","SafetyBar.OperationMode.Automatic.ti":"Automatisch","SafetyBar.OperationMode.Error.Explanation.lb":"Fehler beim Abrufen des Betriebsmodus. Originalhandbediengerät des Roboters verwenden, um Fehler zu lösen.","SafetyBar.OperationMode.Error.lb":"Fehler","SafetyBar.OperationMode.Manual.Explanation.lb":`Die Robotersteuerung befindet sich im manuellen Betriebsmodus.
2
+ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabeschalter gedrückt werden muss, damit sich der Roboter erfolgreich bewegen kann.`,"SafetyBar.OperationMode.Manual.lb":"Manuell","SafetyBar.OperationMode.ti":"Betriebsmodus","SafetyBar.SafetyState.Error.Explanation.lb":"Die Robotersteuerung ist in einen unerwarteten Sicherheitszustand eingetreten.","SafetyBar.SafetyState.Error.lb":"Fehler","SafetyBar.SafetyState.Estop.lb":"NOT-AUS","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"Die Robotersteuerung ist in einen Sicherheitszustand eingetreten, der manuelle Maßnahmen zur Behebung erfordert.","SafetyBar.SafetyState.ManualActionRequired.lb":"Aktion erforderlich","SafetyBar.SafetyState.Normal.Explanation.lb":"Die Robotersteuerung befindet sich in einem sicheren Zustand. Roboterbewegungen sind möglich.","SafetyBar.SafetyState.Normal.lb":"Sicher","SafetyBar.SafetyState.Stop.Explanation.lb":"Die Robotersteuerung ist in einen Stoppzustand übergegangen. Bis der Stoppzustand aufgelöst ist, ist keine Bewegung mehr möglich.","SafetyBar.SafetyState.Stop.lb":"Stopp","SafetyBar.SafetyState.ti":"Sicherheitszustand","SafetyBar.StopState.Estop.Explanation.lb":"NOT-AUS aktiviert. NOT-AUS freischalten, um Roboter zu bewegen.","Jogging.Increment.hlb":"Schrittgröße","Jogging.CoordinateSystem.hlb":"Koordinatensystem","Jogging.Cartesian.bt":"Kartesisch","Jogging.Joints.bt":"Gelenke","Jogging.Velocity.bt":"Geschwindigkeit","Jogging.Handle.lb":"{{handle}} verfahren","RobotControl.Title.ti":"Robotersteuerung","RobotControl.Close.bt":"Schließen","RobotControl.Tab.Translate.bt":"Verschieben","RobotControl.Tab.Rotate.bt":"Drehen","RobotControl.Tcp.lb":"TCP","RobotControl.JogFrame.lb":"Bewegen relativ zu","RobotControl.JogMode.lb":"Verfahrmodus","RobotControl.JogMode.Continuous.bt":"Fortlaufend","RobotControl.JogMode.Increment.bt":"Schrittweise","RobotControl.Velocity.lb":"Geschwindigkeit","RobotControl.StepSize.lb":"Schrittgröße","RobotControl.JogArea.ShowGizmo.bt":"Gizmo-Steuerung","RobotControl.JogArea.ShowButtons.bt":"Tasten-Steuerung","RobotControl.JogArea.Hint.HoldHandle.lb":"Griff halten zum Verfahren · Loslassen zum Stoppen","RobotControl.JogArea.Hint.HoldButton.lb":"Taste halten zum Verfahren · Loslassen zum Stoppen","RobotControl.JogArea.Hint.ClickHandle.lb":"Griff klicken für einen Schritt","RobotControl.JogArea.Hint.ClickButton.lb":"Taste klicken für einen Schritt","RobotControl.Tab.Joint.bt":"Gelenk","RobotControl.Tab.MoveTo.bt":"Bewegen zu","RobotControl.MoveTo.TargetPose.lb":"Zielpose","RobotControl.MoveTo.RelativeTo.lb":"Relativ zu","RobotControl.MoveTo.Coordinates.lb":"Koordinaten XYZ (mm) · Rotationsvektor (rad)","RobotControl.MoveTo.Copy.bt":"Kopieren","RobotControl.MoveTo.Copied.lb":"Pose kopiert","RobotControl.MoveTo.Edit.bt":"Pose bearbeiten","RobotControl.MoveTo.Cancel.bt":"Abbrechen","RobotControl.MoveTo.ConfirmEdit.lb":"Bearbeitete Pose übernehmen","RobotControl.MoveTo.InvalidPose.lb":"Bitte gültige Posen-Koordinaten eingeben.","RobotControl.MoveTo.Reset.lb":"Pose auf vorherige Position zurücksetzen","RobotControl.MoveTo.MoveTo.bt":"Hierhin bewegen","RobotControl.MoveTo.Moving.bt":"Bewegung aktiv…","RobotControl.MoveTo.Stopping.bt":"Anhalten","RobotControl.MoveTo.HoldToMove.lb":"Zum Bewegen gedrückt halten","RobotControl.MoveTo.AtPose.lb":"Der Roboter befindet sich bereits in dieser Pose","CurrentPose.Title.lb":"Aktuelle Position","CurrentPose.RelativeTo.lb":"Relativ zu","CurrentPose.Copy.bt":"Kopieren","CurrentPose.Copied.lb":"Pose kopiert","CurrentPose.OrientationFormat.ti":"Orientierungsformat","CurrentPose.Format.lb":"Format","CurrentPose.Format.RotationVector.lb":"Rotationsvektor","CurrentPose.Format.EulerAngles.lb":"Euler-Winkel","CurrentPose.Format.Quaternion.lb":"Quaternion","CurrentPose.AngleUnit.lb":"Winkeleinheit","CurrentPose.AngleUnit.Radians.lb":"Radiant","CurrentPose.AngleUnit.Degrees.lb":"Grad","CurrentPose.EulerConvention.lb":"Euler-Konvention","CurrentPose.EulerConvention.Intrinsic.hlb":"Intrinsische Rotationen","CurrentPose.EulerConvention.Extrinsic.hlb":"Extrinsische Rotationen","CurrentPose.EulerConvention.Intrinsic.lb":"Intrinsisch {{axes}}","CurrentPose.EulerConvention.Extrinsic.lb":"Extrinsisch {{axes}}","RobotHeader.Apps.bt":"Apps","RobotHeader.Search.bt":"Suchen","RobotHeader.MotionGroup.lb":"Bewegungsgruppe"},b={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Velocity","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Blocked.ti":"Connection blocked","Jogging.Blocked.lb":"Another client is currently controlling the jogging.","Jogging.Blocked.Reenable.bt":"Reconnect","Jogging.Cartesian.MotionType.lb":"Motion type","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Joint values","Jogging.Increment.Continuous.dd":"Continuous","Jogging.Cartesian.Orientation.lb":"Orientation","Jogging.Activating.lb":"Activating jogging","Jogging.JointLimitsReached.lb":"Joint limit reached for joint {{jointNumbers}}","Jogging.Orientation.coordsys":"Robot base","Jogging.Orientation.tool":"Tool","Jogging.StreamStateSection.lb":"State stream:","Jogging.StreamStateSection.RUNNING.lb":"Running","Jogging.StreamStateSection.PAUSED_BY_USER.lb":"Paused (by user)","Jogging.StreamStateSection.PAUSED_NEAR_COLLISION.lb":"Paused (collision proximity)","Jogging.StreamStateSection.PAUSED_NEAR_JOINT_LIMIT.lb":"Paused (near joint limit)","Jogging.StreamStateSection.PAUSED_NEAR_SINGULARITY.lb":"Paused (near singularity)","Jogging.StreamStateSection.PAUSED_ON_IO.lb":"Paused (I/O event)","Jogging.StreamStateSection.END_OF_TRAJECTORY.lb":"End of trajectory","Jogging.StreamStateSection.WAIT_FOR_IO.lb":"Waiting for I/O","Jogging.StreamStateSection.KIND_UNKNOWN.lb":"Ready","Jogging.StreamStateSection.Error.Collision.lb":"Cannot plan this motion: it would cause a collision","Jogging.StreamStateSection.Error.JointLimit.lb":"Cannot plan this motion: a joint limit would be exceeded","Jogging.StreamStateSection.Error.NoSolutionInConfiguration.lb":"Cannot plan this motion in the current robot configuration","Jogging.StreamStateSection.Error.OutOfWorkspace.lb":"Cannot plan this motion: the target is outside the robot's workspace","Jogging.StreamStateSection.Error.PlanningFailed.lb":"The requested motion could not be planned","Jogging.StreamStateSection.Error.Singularity.lb":"Cannot plan this motion: the path passes through a singularity. Try a different axis or jog the joints directly","Jogging.TargetPose.Error.Collision.lb":"Moving to the current pose would cause a collision. Please change the pose coordinates.","Jogging.TargetPose.Error.NotReachable.lb":"The current pose is not reachable. Please change the pose coordinates.","Jogging.TargetPose.Error.PlanningFailed.lb":"Planning a motion to this pose failed. Please change the pose coordinates.","Jogging.TargetPose.Error.Singularity.lb":"The current pose would create a singularity. Please change the pose coordinates.","SafetyBar.ActivationToggle.Activate.bt":"Activate","SafetyBar.ActivationToggle.Activated.bt":"Activated","SafetyBar.ActivationToggle.Activating.bt":"Activating","SafetyBar.ActivationToggle.Deactivating.bt":"Deactivating","SafetyBar.ControllerType.Physical.lb":"Physical","SafetyBar.ControllerType.Virtual.lb":"Virtual","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatic operation mode active. Automated movement without manual confirmation enabled.","SafetyBar.OperationMode.Automatic.ti":"Automatic","SafetyBar.OperationMode.Error.Explanation.lb":"Failed to get operation mode. Use the original control panel to resolve the error.","SafetyBar.OperationMode.Error.lb":"Error","SafetyBar.OperationMode.Manual.Explanation.lb":"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully.","SafetyBar.OperationMode.Manual.lb":"Manual","SafetyBar.OperationMode.ti":"Operation mode","SafetyBar.SafetyState.Error.Explanation.lb":"The robot controller has entered an unexpected safety state.","SafetyBar.SafetyState.Error.lb":"Error","SafetyBar.SafetyState.Estop.lb":"E-Stop","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"The robot controller has entered a safety state requiring manual action to resolve.","SafetyBar.SafetyState.ManualActionRequired.lb":"Action required","SafetyBar.SafetyState.Normal.Explanation.lb":"The robot controller is in a safe state. Robot movement is enabled.","SafetyBar.SafetyState.Normal.lb":"Safe","SafetyBar.SafetyState.Stop.Explanation.lb":"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved.","SafetyBar.SafetyState.Stop.lb":"Stop","SafetyBar.SafetyState.ti":"Safety state","SafetyBar.StopState.Estop.Explanation.lb":"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released.","Jogging.Increment.hlb":"Increment","Jogging.CoordinateSystem.hlb":"Coordinate system","Jogging.Cartesian.bt":"Cartesian","Jogging.Joints.bt":"Joints","Jogging.Velocity.bt":"Velocity","Jogging.Handle.lb":"Jog {{handle}}","RobotControl.Title.ti":"Robot control","RobotControl.Close.bt":"Close","RobotControl.Tab.Translate.bt":"Translate","RobotControl.Tab.Rotate.bt":"Rotate","RobotControl.Tcp.lb":"TCP","RobotControl.JogFrame.lb":"Move relative to","RobotControl.JogMode.lb":"Jog mode","RobotControl.JogMode.Continuous.bt":"Continuous","RobotControl.JogMode.Increment.bt":"Increment","RobotControl.Velocity.lb":"Velocity","RobotControl.StepSize.lb":"Step size","RobotControl.JogArea.ShowGizmo.bt":"Gizmo controls","RobotControl.JogArea.ShowButtons.bt":"Button controls","RobotControl.JogArea.Hint.HoldHandle.lb":"Hold a handle to jog · Release to stop","RobotControl.JogArea.Hint.HoldButton.lb":"Hold a button to jog · Release to stop","RobotControl.JogArea.Hint.ClickHandle.lb":"Click a handle to jog one step","RobotControl.JogArea.Hint.ClickButton.lb":"Click a button to jog one step","RobotControl.Tab.Joint.bt":"Joint","RobotControl.Tab.MoveTo.bt":"Move to","RobotControl.MoveTo.TargetPose.lb":"Target pose","RobotControl.MoveTo.RelativeTo.lb":"Relative to","RobotControl.MoveTo.Coordinates.lb":"Coordinates XYZ (mm) · Rotation vector (rad)","RobotControl.MoveTo.Copy.bt":"Copy","RobotControl.MoveTo.Copied.lb":"Pose copied","RobotControl.MoveTo.Edit.bt":"Edit pose","RobotControl.MoveTo.Cancel.bt":"Cancel","RobotControl.MoveTo.ConfirmEdit.lb":"Save pose edit","RobotControl.MoveTo.InvalidPose.lb":"Please enter valid pose coordinates.","RobotControl.MoveTo.Reset.lb":"Reset pose to previous one","RobotControl.MoveTo.MoveTo.bt":"Move to","RobotControl.MoveTo.Moving.bt":"Moving…","RobotControl.MoveTo.Stopping.bt":"Stopping…","RobotControl.MoveTo.HoldToMove.lb":"Click and hold to move","RobotControl.MoveTo.AtPose.lb":"Robot is already at this pose","CurrentPose.Title.lb":"Current position","CurrentPose.RelativeTo.lb":"Relative to","CurrentPose.Copy.bt":"Copy","CurrentPose.Copied.lb":"Pose copied","CurrentPose.OrientationFormat.ti":"Orientation format","CurrentPose.Format.lb":"Format","CurrentPose.Format.RotationVector.lb":"Rotation vector","CurrentPose.Format.EulerAngles.lb":"Euler angles","CurrentPose.Format.Quaternion.lb":"Quaternion","CurrentPose.AngleUnit.lb":"Angle unit","CurrentPose.AngleUnit.Radians.lb":"Radians","CurrentPose.AngleUnit.Degrees.lb":"Degrees","CurrentPose.EulerConvention.lb":"Euler convention","CurrentPose.EulerConvention.Intrinsic.hlb":"Intrinsic rotations","CurrentPose.EulerConvention.Extrinsic.hlb":"Extrinsic rotations","CurrentPose.EulerConvention.Intrinsic.lb":"Intrinsic {{axes}}","CurrentPose.EulerConvention.Extrinsic.lb":"Extrinsic {{axes}}","RobotHeader.Apps.bt":"Apps","RobotHeader.Search.bt":"Search","RobotHeader.MotionGroup.lb":"Motion group"},o=l.createInstance();o.use(g).init({supportedLngs:["en","de"],resources:{en:{translations:b},de:{translations:s}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function u(e){const n=i.memo(e);return(r=>t.jsx(c,{children:t.jsx(n,{...r})}))}const c=({children:e})=>t.jsx(a.I18nextProvider,{i18n:o,children:e});exports.externalizeComponent=u;exports.i18n=o;
@@ -0,0 +1,283 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { memo as i } from "react";
3
+ import { I18nextProvider as a } from "react-i18next";
4
+ import l from "i18next";
5
+ import g from "i18next-browser-languagedetector";
6
+ const s = {
7
+ "Jogging.Cartesian.Translation.velocityMmPerSec.lb": "{{amount}} mm/s",
8
+ "Jogging.Cartesian.Rotation.velocityDegPerSec.lb": "{{amount}}°/s",
9
+ "Jogging.Velocity.lb": "Geschwindigkeit",
10
+ "General.degree.variable": "{{amount}}°",
11
+ "General.mm.variable": "{{amount}} mm",
12
+ "Jogging.Blocked.ti": "Verbindung blockiert",
13
+ "Jogging.Blocked.lb": "Ein anderer Client kontrolliert das Jogging.",
14
+ "Jogging.Blocked.Reenable.bt": "Neu verbinden",
15
+ "Jogging.Cartesian.MotionType.lb": "Bewegungstyp",
16
+ "Jogging.Cartesian.Translation.bt": "Translation",
17
+ "Jogging.Cartesian.Rotation.bt": "Rotation",
18
+ "Jogging.Joints.JointValues.lb": "Gelenkwerte",
19
+ "Jogging.Increment.Continuous.dd": "Fortlaufend",
20
+ "Jogging.Cartesian.Orientation.lb": "Orientierung",
21
+ "Jogging.JointLimitsReached.lb": "Gelenkgrenzen für Gelenk {{jointNumbers}} erreicht",
22
+ "Jogging.Orientation.coordsys": "Roboterbasis",
23
+ "Jogging.Orientation.tool": "Werkzeug",
24
+ "Jogging.StreamStateSection.lb": "Status Stream:",
25
+ "Jogging.StreamStateSection.RUNNING.lb": "In Bewegung",
26
+ "Jogging.StreamStateSection.PAUSED_BY_USER.lb": "Pausiert (Nutzer)",
27
+ "Jogging.StreamStateSection.PAUSED_NEAR_COLLISION.lb": "Pausiert (Kollisionsnähe)",
28
+ "Jogging.StreamStateSection.PAUSED_NEAR_JOINT_LIMIT.lb": "Pausiert (nahe Gelenkgrenze)",
29
+ "Jogging.StreamStateSection.PAUSED_NEAR_SINGULARITY.lb": "Pausiert (nahe Singularität)",
30
+ "Jogging.StreamStateSection.PAUSED_ON_IO.lb": "Pausiert (I/O-Ereignis)",
31
+ "Jogging.StreamStateSection.END_OF_TRAJECTORY.lb": "Trajektorie beendet",
32
+ "Jogging.StreamStateSection.WAIT_FOR_IO.lb": "Warte auf I/O",
33
+ "Jogging.StreamStateSection.KIND_UNKNOWN.lb": "Bereit",
34
+ "Jogging.StreamStateSection.Error.Collision.lb": "Bewegung kann nicht geplant werden: sie würde zu einer Kollision führen",
35
+ "Jogging.StreamStateSection.Error.JointLimit.lb": "Bewegung kann nicht geplant werden: eine Gelenkgrenze würde überschritten",
36
+ "Jogging.StreamStateSection.Error.NoSolutionInConfiguration.lb": "Bewegung kann in der aktuellen Roboterkonfiguration nicht geplant werden",
37
+ "Jogging.StreamStateSection.Error.OutOfWorkspace.lb": "Bewegung kann nicht geplant werden: das Ziel liegt außerhalb des Arbeitsraums",
38
+ "Jogging.StreamStateSection.Error.PlanningFailed.lb": "Die angeforderte Bewegung konnte nicht geplant werden",
39
+ "Jogging.StreamStateSection.Error.Singularity.lb": "Bewegung kann nicht geplant werden: der Pfad führt durch eine Singularität. Versuche eine andere Achse oder bewege die Gelenke direkt",
40
+ "Jogging.TargetPose.Error.Collision.lb": "Die Bewegung zur aktuellen Pose würde eine Kollision verursachen. Bitte ändere die Posen-Koordinaten.",
41
+ "Jogging.TargetPose.Error.NotReachable.lb": "Die aktuelle Pose ist nicht erreichbar. Bitte ändere die Posen-Koordinaten.",
42
+ "Jogging.TargetPose.Error.PlanningFailed.lb": "Die Bewegung zu dieser Pose konnte nicht geplant werden. Bitte ändere die Posen-Koordinaten.",
43
+ "Jogging.TargetPose.Error.Singularity.lb": "Die aktuelle Pose würde eine Singularität erzeugen. Bitte ändere die Posen-Koordinaten.",
44
+ "SafetyBar.ActivationToggle.Activate.bt": "Aktivieren",
45
+ "SafetyBar.ActivationToggle.Activated.bt": "Aktiviert",
46
+ "SafetyBar.ActivationToggle.Activating.bt": "Wird aktiviert…",
47
+ "SafetyBar.ActivationToggle.Deactivating.bt": "Wird deaktiviert…",
48
+ "SafetyBar.ControllerType.Physical.lb": "Physisch",
49
+ "SafetyBar.ControllerType.Virtual.lb": "Virtuell",
50
+ "SafetyBar.MotionGroup.Physical.Explanation.lb": "<code>{{motionGroupId}}</code> ist ein physische Robotersteuerung. Für die Bewegung dieses Roboters sind <strong>Sicherheitsmaßnahmen</strong> aktiv.",
51
+ "SafetyBar.MotionGroup.Virtual.Explanation.lb": "<1>{{motionGroupId}}</1> ist eine virtuelle Robotersteuerung ohne physisches Gegenstück. Der Roboter kann ohne Sicherheitsmaßnahmen bewegt werden.",
52
+ "SafetyBar.OperationMode.Auto.Explanation.lb": "Automatischer Betriebsmodus der Robotersteuerung aktiv. Automatisierte Bewegung ohne manuelle Bestätigung freigegeben.",
53
+ "SafetyBar.OperationMode.Automatic.ti": "Automatisch",
54
+ "SafetyBar.OperationMode.Error.Explanation.lb": "Fehler beim Abrufen des Betriebsmodus. Originalhandbediengerät des Roboters verwenden, um Fehler zu lösen.",
55
+ "SafetyBar.OperationMode.Error.lb": "Fehler",
56
+ "SafetyBar.OperationMode.Manual.Explanation.lb": `Die Robotersteuerung befindet sich im manuellen Betriebsmodus.
57
+ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabeschalter gedrückt werden muss, damit sich der Roboter erfolgreich bewegen kann.`,
58
+ "SafetyBar.OperationMode.Manual.lb": "Manuell",
59
+ "SafetyBar.OperationMode.ti": "Betriebsmodus",
60
+ "SafetyBar.SafetyState.Error.Explanation.lb": "Die Robotersteuerung ist in einen unerwarteten Sicherheitszustand eingetreten.",
61
+ "SafetyBar.SafetyState.Error.lb": "Fehler",
62
+ "SafetyBar.SafetyState.Estop.lb": "NOT-AUS",
63
+ "SafetyBar.SafetyState.ManualActionRequired.Explanation.lb": "Die Robotersteuerung ist in einen Sicherheitszustand eingetreten, der manuelle Maßnahmen zur Behebung erfordert.",
64
+ "SafetyBar.SafetyState.ManualActionRequired.lb": "Aktion erforderlich",
65
+ "SafetyBar.SafetyState.Normal.Explanation.lb": "Die Robotersteuerung befindet sich in einem sicheren Zustand. Roboterbewegungen sind möglich.",
66
+ "SafetyBar.SafetyState.Normal.lb": "Sicher",
67
+ "SafetyBar.SafetyState.Stop.Explanation.lb": "Die Robotersteuerung ist in einen Stoppzustand übergegangen. Bis der Stoppzustand aufgelöst ist, ist keine Bewegung mehr möglich.",
68
+ "SafetyBar.SafetyState.Stop.lb": "Stopp",
69
+ "SafetyBar.SafetyState.ti": "Sicherheitszustand",
70
+ "SafetyBar.StopState.Estop.Explanation.lb": "NOT-AUS aktiviert. NOT-AUS freischalten, um Roboter zu bewegen.",
71
+ "Jogging.Increment.hlb": "Schrittgröße",
72
+ "Jogging.CoordinateSystem.hlb": "Koordinatensystem",
73
+ "Jogging.Cartesian.bt": "Kartesisch",
74
+ "Jogging.Joints.bt": "Gelenke",
75
+ "Jogging.Velocity.bt": "Geschwindigkeit",
76
+ "Jogging.Handle.lb": "{{handle}} verfahren",
77
+ "RobotControl.Title.ti": "Robotersteuerung",
78
+ "RobotControl.Close.bt": "Schließen",
79
+ "RobotControl.Tab.Translate.bt": "Verschieben",
80
+ "RobotControl.Tab.Rotate.bt": "Drehen",
81
+ "RobotControl.Tcp.lb": "TCP",
82
+ "RobotControl.JogFrame.lb": "Bewegen relativ zu",
83
+ "RobotControl.JogMode.lb": "Verfahrmodus",
84
+ "RobotControl.JogMode.Continuous.bt": "Fortlaufend",
85
+ "RobotControl.JogMode.Increment.bt": "Schrittweise",
86
+ "RobotControl.Velocity.lb": "Geschwindigkeit",
87
+ "RobotControl.StepSize.lb": "Schrittgröße",
88
+ "RobotControl.JogArea.ShowGizmo.bt": "Gizmo-Steuerung",
89
+ "RobotControl.JogArea.ShowButtons.bt": "Tasten-Steuerung",
90
+ "RobotControl.JogArea.Hint.HoldHandle.lb": "Griff halten zum Verfahren · Loslassen zum Stoppen",
91
+ "RobotControl.JogArea.Hint.HoldButton.lb": "Taste halten zum Verfahren · Loslassen zum Stoppen",
92
+ "RobotControl.JogArea.Hint.ClickHandle.lb": "Griff klicken für einen Schritt",
93
+ "RobotControl.JogArea.Hint.ClickButton.lb": "Taste klicken für einen Schritt",
94
+ "RobotControl.Tab.Joint.bt": "Gelenk",
95
+ "RobotControl.Tab.MoveTo.bt": "Bewegen zu",
96
+ "RobotControl.MoveTo.TargetPose.lb": "Zielpose",
97
+ "RobotControl.MoveTo.RelativeTo.lb": "Relativ zu",
98
+ "RobotControl.MoveTo.Coordinates.lb": "Koordinaten XYZ (mm) · Rotationsvektor (rad)",
99
+ "RobotControl.MoveTo.Copy.bt": "Kopieren",
100
+ "RobotControl.MoveTo.Copied.lb": "Pose kopiert",
101
+ "RobotControl.MoveTo.Edit.bt": "Pose bearbeiten",
102
+ "RobotControl.MoveTo.Cancel.bt": "Abbrechen",
103
+ "RobotControl.MoveTo.ConfirmEdit.lb": "Bearbeitete Pose übernehmen",
104
+ "RobotControl.MoveTo.InvalidPose.lb": "Bitte gültige Posen-Koordinaten eingeben.",
105
+ "RobotControl.MoveTo.Reset.lb": "Pose auf vorherige Position zurücksetzen",
106
+ "RobotControl.MoveTo.MoveTo.bt": "Hierhin bewegen",
107
+ "RobotControl.MoveTo.Moving.bt": "Bewegung aktiv…",
108
+ "RobotControl.MoveTo.Stopping.bt": "Anhalten",
109
+ "RobotControl.MoveTo.HoldToMove.lb": "Zum Bewegen gedrückt halten",
110
+ "RobotControl.MoveTo.AtPose.lb": "Der Roboter befindet sich bereits in dieser Pose",
111
+ "CurrentPose.Title.lb": "Aktuelle Position",
112
+ "CurrentPose.RelativeTo.lb": "Relativ zu",
113
+ "CurrentPose.Copy.bt": "Kopieren",
114
+ "CurrentPose.Copied.lb": "Pose kopiert",
115
+ "CurrentPose.OrientationFormat.ti": "Orientierungsformat",
116
+ "CurrentPose.Format.lb": "Format",
117
+ "CurrentPose.Format.RotationVector.lb": "Rotationsvektor",
118
+ "CurrentPose.Format.EulerAngles.lb": "Euler-Winkel",
119
+ "CurrentPose.Format.Quaternion.lb": "Quaternion",
120
+ "CurrentPose.AngleUnit.lb": "Winkeleinheit",
121
+ "CurrentPose.AngleUnit.Radians.lb": "Radiant",
122
+ "CurrentPose.AngleUnit.Degrees.lb": "Grad",
123
+ "CurrentPose.EulerConvention.lb": "Euler-Konvention",
124
+ "CurrentPose.EulerConvention.Intrinsic.hlb": "Intrinsische Rotationen",
125
+ "CurrentPose.EulerConvention.Extrinsic.hlb": "Extrinsische Rotationen",
126
+ "CurrentPose.EulerConvention.Intrinsic.lb": "Intrinsisch {{axes}}",
127
+ "CurrentPose.EulerConvention.Extrinsic.lb": "Extrinsisch {{axes}}",
128
+ "RobotHeader.Apps.bt": "Apps",
129
+ "RobotHeader.Search.bt": "Suchen",
130
+ "RobotHeader.MotionGroup.lb": "Bewegungsgruppe"
131
+ }, b = {
132
+ "Jogging.Cartesian.Translation.velocityMmPerSec.lb": "{{amount}} mm/s",
133
+ "Jogging.Cartesian.Rotation.velocityDegPerSec.lb": "{{amount}}°/s",
134
+ "Jogging.Velocity.lb": "Velocity",
135
+ "General.degree.variable": "{{amount}}°",
136
+ "General.mm.variable": "{{amount}} mm",
137
+ "Jogging.Blocked.ti": "Connection blocked",
138
+ "Jogging.Blocked.lb": "Another client is currently controlling the jogging.",
139
+ "Jogging.Blocked.Reenable.bt": "Reconnect",
140
+ "Jogging.Cartesian.MotionType.lb": "Motion type",
141
+ "Jogging.Cartesian.Translation.bt": "Translation",
142
+ "Jogging.Cartesian.Rotation.bt": "Rotation",
143
+ "Jogging.Joints.JointValues.lb": "Joint values",
144
+ "Jogging.Increment.Continuous.dd": "Continuous",
145
+ "Jogging.Cartesian.Orientation.lb": "Orientation",
146
+ "Jogging.Activating.lb": "Activating jogging",
147
+ "Jogging.JointLimitsReached.lb": "Joint limit reached for joint {{jointNumbers}}",
148
+ "Jogging.Orientation.coordsys": "Robot base",
149
+ "Jogging.Orientation.tool": "Tool",
150
+ "Jogging.StreamStateSection.lb": "State stream:",
151
+ "Jogging.StreamStateSection.RUNNING.lb": "Running",
152
+ "Jogging.StreamStateSection.PAUSED_BY_USER.lb": "Paused (by user)",
153
+ "Jogging.StreamStateSection.PAUSED_NEAR_COLLISION.lb": "Paused (collision proximity)",
154
+ "Jogging.StreamStateSection.PAUSED_NEAR_JOINT_LIMIT.lb": "Paused (near joint limit)",
155
+ "Jogging.StreamStateSection.PAUSED_NEAR_SINGULARITY.lb": "Paused (near singularity)",
156
+ "Jogging.StreamStateSection.PAUSED_ON_IO.lb": "Paused (I/O event)",
157
+ "Jogging.StreamStateSection.END_OF_TRAJECTORY.lb": "End of trajectory",
158
+ "Jogging.StreamStateSection.WAIT_FOR_IO.lb": "Waiting for I/O",
159
+ "Jogging.StreamStateSection.KIND_UNKNOWN.lb": "Ready",
160
+ "Jogging.StreamStateSection.Error.Collision.lb": "Cannot plan this motion: it would cause a collision",
161
+ "Jogging.StreamStateSection.Error.JointLimit.lb": "Cannot plan this motion: a joint limit would be exceeded",
162
+ "Jogging.StreamStateSection.Error.NoSolutionInConfiguration.lb": "Cannot plan this motion in the current robot configuration",
163
+ "Jogging.StreamStateSection.Error.OutOfWorkspace.lb": "Cannot plan this motion: the target is outside the robot's workspace",
164
+ "Jogging.StreamStateSection.Error.PlanningFailed.lb": "The requested motion could not be planned",
165
+ "Jogging.StreamStateSection.Error.Singularity.lb": "Cannot plan this motion: the path passes through a singularity. Try a different axis or jog the joints directly",
166
+ "Jogging.TargetPose.Error.Collision.lb": "Moving to the current pose would cause a collision. Please change the pose coordinates.",
167
+ "Jogging.TargetPose.Error.NotReachable.lb": "The current pose is not reachable. Please change the pose coordinates.",
168
+ "Jogging.TargetPose.Error.PlanningFailed.lb": "Planning a motion to this pose failed. Please change the pose coordinates.",
169
+ "Jogging.TargetPose.Error.Singularity.lb": "The current pose would create a singularity. Please change the pose coordinates.",
170
+ "SafetyBar.ActivationToggle.Activate.bt": "Activate",
171
+ "SafetyBar.ActivationToggle.Activated.bt": "Activated",
172
+ "SafetyBar.ActivationToggle.Activating.bt": "Activating",
173
+ "SafetyBar.ActivationToggle.Deactivating.bt": "Deactivating",
174
+ "SafetyBar.ControllerType.Physical.lb": "Physical",
175
+ "SafetyBar.ControllerType.Virtual.lb": "Virtual",
176
+ "SafetyBar.MotionGroup.Physical.Explanation.lb": "<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.",
177
+ "SafetyBar.MotionGroup.Virtual.Explanation.lb": "<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.",
178
+ "SafetyBar.OperationMode.Auto.Explanation.lb": "Automatic operation mode active. Automated movement without manual confirmation enabled.",
179
+ "SafetyBar.OperationMode.Automatic.ti": "Automatic",
180
+ "SafetyBar.OperationMode.Error.Explanation.lb": "Failed to get operation mode. Use the original control panel to resolve the error.",
181
+ "SafetyBar.OperationMode.Error.lb": "Error",
182
+ "SafetyBar.OperationMode.Manual.Explanation.lb": "The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully.",
183
+ "SafetyBar.OperationMode.Manual.lb": "Manual",
184
+ "SafetyBar.OperationMode.ti": "Operation mode",
185
+ "SafetyBar.SafetyState.Error.Explanation.lb": "The robot controller has entered an unexpected safety state.",
186
+ "SafetyBar.SafetyState.Error.lb": "Error",
187
+ "SafetyBar.SafetyState.Estop.lb": "E-Stop",
188
+ "SafetyBar.SafetyState.ManualActionRequired.Explanation.lb": "The robot controller has entered a safety state requiring manual action to resolve.",
189
+ "SafetyBar.SafetyState.ManualActionRequired.lb": "Action required",
190
+ "SafetyBar.SafetyState.Normal.Explanation.lb": "The robot controller is in a safe state. Robot movement is enabled.",
191
+ "SafetyBar.SafetyState.Normal.lb": "Safe",
192
+ "SafetyBar.SafetyState.Stop.Explanation.lb": "The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved.",
193
+ "SafetyBar.SafetyState.Stop.lb": "Stop",
194
+ "SafetyBar.SafetyState.ti": "Safety state",
195
+ "SafetyBar.StopState.Estop.Explanation.lb": "An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released.",
196
+ "Jogging.Increment.hlb": "Increment",
197
+ "Jogging.CoordinateSystem.hlb": "Coordinate system",
198
+ "Jogging.Cartesian.bt": "Cartesian",
199
+ "Jogging.Joints.bt": "Joints",
200
+ "Jogging.Velocity.bt": "Velocity",
201
+ "Jogging.Handle.lb": "Jog {{handle}}",
202
+ "RobotControl.Title.ti": "Robot control",
203
+ "RobotControl.Close.bt": "Close",
204
+ "RobotControl.Tab.Translate.bt": "Translate",
205
+ "RobotControl.Tab.Rotate.bt": "Rotate",
206
+ "RobotControl.Tcp.lb": "TCP",
207
+ "RobotControl.JogFrame.lb": "Move relative to",
208
+ "RobotControl.JogMode.lb": "Jog mode",
209
+ "RobotControl.JogMode.Continuous.bt": "Continuous",
210
+ "RobotControl.JogMode.Increment.bt": "Increment",
211
+ "RobotControl.Velocity.lb": "Velocity",
212
+ "RobotControl.StepSize.lb": "Step size",
213
+ "RobotControl.JogArea.ShowGizmo.bt": "Gizmo controls",
214
+ "RobotControl.JogArea.ShowButtons.bt": "Button controls",
215
+ "RobotControl.JogArea.Hint.HoldHandle.lb": "Hold a handle to jog · Release to stop",
216
+ "RobotControl.JogArea.Hint.HoldButton.lb": "Hold a button to jog · Release to stop",
217
+ "RobotControl.JogArea.Hint.ClickHandle.lb": "Click a handle to jog one step",
218
+ "RobotControl.JogArea.Hint.ClickButton.lb": "Click a button to jog one step",
219
+ "RobotControl.Tab.Joint.bt": "Joint",
220
+ "RobotControl.Tab.MoveTo.bt": "Move to",
221
+ "RobotControl.MoveTo.TargetPose.lb": "Target pose",
222
+ "RobotControl.MoveTo.RelativeTo.lb": "Relative to",
223
+ "RobotControl.MoveTo.Coordinates.lb": "Coordinates XYZ (mm) · Rotation vector (rad)",
224
+ "RobotControl.MoveTo.Copy.bt": "Copy",
225
+ "RobotControl.MoveTo.Copied.lb": "Pose copied",
226
+ "RobotControl.MoveTo.Edit.bt": "Edit pose",
227
+ "RobotControl.MoveTo.Cancel.bt": "Cancel",
228
+ "RobotControl.MoveTo.ConfirmEdit.lb": "Save pose edit",
229
+ "RobotControl.MoveTo.InvalidPose.lb": "Please enter valid pose coordinates.",
230
+ "RobotControl.MoveTo.Reset.lb": "Reset pose to previous one",
231
+ "RobotControl.MoveTo.MoveTo.bt": "Move to",
232
+ "RobotControl.MoveTo.Moving.bt": "Moving…",
233
+ "RobotControl.MoveTo.Stopping.bt": "Stopping…",
234
+ "RobotControl.MoveTo.HoldToMove.lb": "Click and hold to move",
235
+ "RobotControl.MoveTo.AtPose.lb": "Robot is already at this pose",
236
+ "CurrentPose.Title.lb": "Current position",
237
+ "CurrentPose.RelativeTo.lb": "Relative to",
238
+ "CurrentPose.Copy.bt": "Copy",
239
+ "CurrentPose.Copied.lb": "Pose copied",
240
+ "CurrentPose.OrientationFormat.ti": "Orientation format",
241
+ "CurrentPose.Format.lb": "Format",
242
+ "CurrentPose.Format.RotationVector.lb": "Rotation vector",
243
+ "CurrentPose.Format.EulerAngles.lb": "Euler angles",
244
+ "CurrentPose.Format.Quaternion.lb": "Quaternion",
245
+ "CurrentPose.AngleUnit.lb": "Angle unit",
246
+ "CurrentPose.AngleUnit.Radians.lb": "Radians",
247
+ "CurrentPose.AngleUnit.Degrees.lb": "Degrees",
248
+ "CurrentPose.EulerConvention.lb": "Euler convention",
249
+ "CurrentPose.EulerConvention.Intrinsic.hlb": "Intrinsic rotations",
250
+ "CurrentPose.EulerConvention.Extrinsic.hlb": "Extrinsic rotations",
251
+ "CurrentPose.EulerConvention.Intrinsic.lb": "Intrinsic {{axes}}",
252
+ "CurrentPose.EulerConvention.Extrinsic.lb": "Extrinsic {{axes}}",
253
+ "RobotHeader.Apps.bt": "Apps",
254
+ "RobotHeader.Search.bt": "Search",
255
+ "RobotHeader.MotionGroup.lb": "Motion group"
256
+ }, o = l.createInstance();
257
+ o.use(g).init({
258
+ supportedLngs: ["en", "de"],
259
+ resources: {
260
+ en: {
261
+ translations: b
262
+ },
263
+ de: {
264
+ translations: s
265
+ }
266
+ },
267
+ ns: ["translations"],
268
+ defaultNS: "translations",
269
+ detection: {
270
+ order: ["navigator", "htmlTag"]
271
+ }
272
+ });
273
+ function h(e) {
274
+ const n = i(e);
275
+ return ((r) => /* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(n, { ...r }) }));
276
+ }
277
+ const u = ({
278
+ children: e
279
+ }) => /* @__PURE__ */ t(a, { i18n: o, children: e });
280
+ export {
281
+ h as e,
282
+ o as i
283
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("react");function u(e){return e.button===0&&!e.ctrlKey}function o(e){return!e.repeat&&!e.metaKey}function s(e){return!e.repeat}function d(e){return(e.buttons&1)===0}function a(e){e.preventDefault()}function c(e,r,t){n.useEffect(()=>{r&&t()},[r,t]),n.useEffect(()=>()=>t(),[t]),n.useEffect(()=>{if(!e)return;const i=()=>{document.visibilityState==="hidden"&&t()};return window.addEventListener("blur",t),document.addEventListener("visibilitychange",i),()=>{window.removeEventListener("blur",t),document.removeEventListener("visibilitychange",i)}},[e,t])}exports.endsHold=s;exports.preventContextMenu=a;exports.primaryReleased=d;exports.startsKeyHold=o;exports.startsPointerHold=u;exports.useEndHoldWhenUnattended=c;
@@ -0,0 +1,37 @@
1
+ import { useEffect as n } from "react";
2
+ function u(t) {
3
+ return t.button === 0 && !t.ctrlKey;
4
+ }
5
+ function s(t) {
6
+ return !t.repeat && !t.metaKey;
7
+ }
8
+ function a(t) {
9
+ return !t.repeat;
10
+ }
11
+ function c(t) {
12
+ return (t.buttons & 1) === 0;
13
+ }
14
+ function d(t) {
15
+ t.preventDefault();
16
+ }
17
+ function f(t, r, e) {
18
+ n(() => {
19
+ r && e();
20
+ }, [r, e]), n(() => () => e(), [e]), n(() => {
21
+ if (!t) return;
22
+ const i = () => {
23
+ document.visibilityState === "hidden" && e();
24
+ };
25
+ return window.addEventListener("blur", e), document.addEventListener("visibilitychange", i), () => {
26
+ window.removeEventListener("blur", e), document.removeEventListener("visibilitychange", i);
27
+ };
28
+ }, [t, e]);
29
+ }
30
+ export {
31
+ c as a,
32
+ u as b,
33
+ a as e,
34
+ d as p,
35
+ s,
36
+ f as u
37
+ };