@wandelbots/wandelbots-js-react-components 2.40.0 → 2.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/TabBar.d.ts +2 -0
- package/dist/components/TabBar.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +84 -73
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/TabBar.tsx +35 -8
package/dist/index.cjs
CHANGED
|
@@ -151,5 +151,5 @@ and limitations under the License.
|
|
|
151
151
|
`,h);const f=(yield t.api.controller.getRobotController(l.controller)).configuration.kind==="VirtualController",m=yield Ie(this,null,function*(){try{return yield t.api.motionGroupInfos.getMounting(c.motion_group)}catch(C){return console.error(`Error fetching mounting for ${c.motion_group}`,C),null}}),b=t.openReconnectingWebsocket(`/controllers/${l.controller}/state-stream?response_rate=1000`),S=yield b.firstMessage(),_=(o=cr(S.data))==null?void 0:o.result;if(!_)throw new Error(`Unable to parse initial controller state message ${S.data}`);console.log(`Connected controller state websocket to controller ${l.controller}. Initial state:
|
|
152
152
|
`,_);const{tcps:w}=yield t.api.motionGroupInfos.listTcps(r),O=yield t.api.motionGroupInfos.getMotionGroupSpecification(r),A=yield t.api.motionGroupInfos.getSafetySetup(r);return new wf(t,l,c,h,u,f,w,O,A,m,_,b)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}get dhParameters(){return this.motionGroupSpecification.dh_parameters}get safetyZones(){return this.safetySetup.safety_zones}get mountingPosition(){return this.mounting?[this.mounting.pose.position.x/1e3,this.mounting.pose.position.y/1e3,this.mounting.pose.position.z/1e3]:[0,0,0]}get mountingQuaternion(){var t,r,n,a,o,s;const i=new ve.Vector3(((r=(t=this.mounting)==null?void 0:t.pose.orientation)==null?void 0:r.x)||0,((a=(n=this.mounting)==null?void 0:n.pose.orientation)==null?void 0:a.y)||0,((s=(o=this.mounting)==null?void 0:o.pose.orientation)==null?void 0:s.z)||0),l=i.length(),c=i.normalize();return new ve.Quaternion().setFromAxisAngle(c,l)}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"}deactivate(){return Ie(this,null,function*(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}ke.runInAction(()=>{this.activationState="deactivating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_MONITOR"),ke.runInAction(()=>{this.activationState="inactive"})}catch(t){throw ke.runInAction(()=>{this.activationState="active"}),t}})}activate(){return Ie(this,null,function*(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}ke.runInAction(()=>{this.activationState="activating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_CONTROL"),ke.runInAction(()=>{this.activationState="active"})}catch(t){throw ke.runInAction(()=>{this.activationState="inactive"}),t}})}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingCartesianSocket&&this.connectedJoggingCartesianSocket.close(),this.connectedJoggingJointsSocket&&this.connectedJoggingJointsSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}},ZE=class Cf{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return Ie(this,arguments,function*(n,a,o={}){const s=yield n.connectMotionStream(a);return new Cf(s,o)})}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}get activeJoggingMode(){return this.cartesianWebsocket?"cartesian":this.jointWebsocket?"joint":"increment"}get activeWebsocket(){return this.cartesianWebsocket||this.jointWebsocket}stop(){return Ie(this,null,function*(){this.cartesianWebsocket&&this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:{x:0,y:0,z:0},rotation_direction:{x:0,y:0,z:0},position_velocity:0,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId}),this.jointWebsocket&&this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:new Array(this.numJoints).fill(0)})})}dispose(){this.cartesianWebsocket&&this.cartesianWebsocket.dispose(),this.jointWebsocket&&this.jointWebsocket.dispose()}setJoggingMode(t,r){console.log("Setting jogging mode to",t),r&&(n2(this.cartesianJoggingOpts,r)||this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),this.cartesianJoggingOpts=r),t!=="cartesian"&&this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),t!=="joint"&&this.jointWebsocket&&(this.jointWebsocket.dispose(),this.jointWebsocket=null),t==="cartesian"&&!this.cartesianWebsocket&&(this.cartesianWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-tcp"),this.cartesianWebsocket.addEventListener("message",n=>{const a=cr(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)})),t==="joint"&&!this.jointWebsocket&&(this.jointWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-joint"),this.jointWebsocket.addEventListener("message",n=>{const a=cr(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)}))}startJointRotation(t){return Ie(this,arguments,function*({joint:r,direction:n,velocityRadsPerSec:a}){if(!this.jointWebsocket)throw new Error("Joint jogging websocket not connected; call setJoggingMode first");const o=new Array(this.numJoints).fill(0);o[r]=n==="-"?-a:a,this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:o})})}startTCPTranslation(t){return Ie(this,arguments,function*({axis:r,direction:n,velocityMmPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const o={x:0,y:0,z:0},s=Object.assign({},o);s[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:s,rotation_direction:o,position_velocity:a,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}startTCPRotation(t){return Ie(this,arguments,function*({axis:r,direction:n,velocityRadsPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const o={x:0,y:0,z:0},s=Object.assign({},o);s[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:o,rotation_direction:s,position_velocity:0,rotation_velocity:a,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}runIncrementalCartesianMotion(t){return Ie(this,arguments,function*({currentTcpPose:r,currentJoints:n,coordSystemId:a,velocityInRelevantUnits:o,axis:s,direction:i,motion:l}){var c;const u=[];if(!x2(r.coordinate_system,a))throw new Error(`Current TCP pose coordinate system ${r.coordinate_system} does not match target coordinate system ${a}`);if(l.type==="translate"){const p=Object.assign({},r.position);p[s]+=l.distanceMm*(i==="-"?-1:1),u.push({settings:{limits_override:{tcp_velocity_limit:o}},line:{position:p,orientation:r.orientation,coordinate_system:a}})}else if(l.type==="rotate"){const p=new mn(r.orientation.x,r.orientation.y,r.orientation.z),f=p.length(),m=p.clone().normalize(),b=l.distanceRads*(i==="-"?-1:1),S=new mn(0,0,0);S[s]=1;const _=Math.cos(.5*b)*Math.cos(.5*f),w=Math.sin(.5*b)*Math.sin(.5*f),O=Math.sin(.5*b)*Math.cos(.5*f),A=Math.cos(.5*b)*Math.sin(.5*f),C=S.dot(m),T=S.clone().cross(m),E=2*Math.acos(_-w*C),V=E/Math.sin(.5*E),y=new mn().addScaledVector(T,w).addScaledVector(S,O).addScaledVector(m,A).multiplyScalar(V);u.push({settings:{limits_override:{tcp_orientation_velocity_limit:o}},line:{position:r.position,orientation:y,coordinate_system:a}})}const d=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,tcp:this.cartesianJoggingOpts.tcpId,commands:u}),h=(c=d.plan_successful_response)==null?void 0:c.motion;if(!h)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(d)}`);yield this.nova.api.motion.streamMoveForward(h,100,void 0,void 0,void 0,{timeout:1e3*60})})}runIncrementalJointRotation(t){return Ie(this,arguments,function*({joint:r,currentJoints:n,velocityRadsPerSec:a,direction:o,distanceRads:s}){var i;const l=[...n.joints];l[r]+=s*(o==="-"?-1:1);const c=new Array(n.joints.length).fill(a),u=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,commands:[{settings:{limits_override:{joint_velocity_limits:{joints:c}}},joint_ptp:{joints:l}}]}),d=(i=u.plan_successful_response)==null?void 0:i.motion;if(!d){console.error("Failed to plan jogging increment motion",u);return}yield this.nova.api.motion.streamMoveForward(d,100,void 0,void 0,void 0,{timeout:1e3*60})})}},ih=1e-4;function eI(e,t){const r=new Ct.Vector3(t.x,t.y,t.z),n=new Ct.Vector3(e.x,e.y,e.z),a=r.length(),o=r.normalize();let s=n.length(),i=n.normalize();i.dot(o)<0&&(s=-s,i=i.multiplyScalar(-1));let l=s-a;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),s=a+l,i.multiplyScalar(s)}var tI=class Of{constructor(t,r,n,a,o){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=a,this.motionStateSocket=o,this.rapidlyChangingMotionState=a,o.addEventListener("message",s=>{var i;const l=(i=cr(s.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${s.data}`);vf(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,ih)||ke.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),Sf(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,ih)||ke.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:eI(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation),tcp:l.tcp_pose.tcp,coordinate_system:l.tcp_pose.coordinate_system}})}),ke.makeAutoObservable(this)}static open(t,r){return Ie(this,null,function*(){var n;const{instances:a}=yield t.api.controller.listControllers(),[o,s]=r.split("@"),i=a.find(h=>h.controller===s),l=i==null?void 0:i.physical_motion_groups.find(h=>h.motion_group===r);if(!i||!l)throw new Error(`Controller ${s} or motion group ${r} not found`);const c=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),u=yield c.firstMessage();console.log("got first message",u);const d=(n=cr(u.data))==null?void 0:n.result;if(!d)throw new Error(`Unable to parse initial motion state message ${u.data}`);return console.log(`Connected motion state websocket to motion group ${l.motion_group}. Initial state:
|
|
153
153
|
`,d),new Of(t,i,l,d,c)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}dispose(){this.motionStateSocket.close()}},rI=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(LE),this.cell=this.withUnwrappedResponsesOnly(tE),this.deviceConfig=this.withCellId(cE),this.motionGroup=this.withCellId(SE),this.motionGroupInfos=this.withCellId(CE),this.controller=this.withCellId(nE),this.program=this.withCellId(_E),this.programValues=this.withCellId(IE),this.controllerIOs=this.withCellId(oE),this.motionGroupKinematic=this.withCellId(RE),this.motion=this.withCellId(xE),this.coordinateSystems=this.withCellId(iE),this.application=this.withCellId(nh),this.applicationGlobal=this.withUnwrappedResponsesOnly(nh),this.motionGroupJogging=this.withCellId(TE),this.virtualRobot=this.withCellId(FE),this.virtualRobotSetup=this.withCellId(WE),this.virtualRobotMode=this.withCellId(HE),this.virtualRobotBehavior=this.withCellId(zE),this.libraryProgramMetadata=this.withCellId(pE),this.libraryProgram=this.withCellId(dE),this.libraryRecipeMetadata=this.withCellId(yE),this.libraryRecipe=this.withCellId(fE),this.storeObject=this.withCellId(UE),this.storeCollisionComponents=this.withCellId(ME),this.storeCollisionScenes=this.withCellId(kE)}withCellId(e){var t,r;const n=new e(hl(cn({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:I.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const o=n[a];n[a]=(...s)=>o.apply(n,[this.cellId,...s]).then(i=>i.data)}return n}withUnwrappedResponsesOnly(e){var t,r;const n=new e(hl(cn({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:I.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const o=n[a];n[a]=(...s)=>o.apply(n,s).then(i=>i.data)}return n}},nI=class{constructor(){this.connections=[]}handleAPIRequest(e){return Ie(this,null,function*(){var t,r,n;const a=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return{instances:[{controller:"mock-ur5e",model_name:"UniversalRobots::Controller",host:"mock-ur5e",allow_software_install_on_controller:!0,physical_motion_groups:[{motion_group:"0@mock-ur5e",name_from_controller:"UR5e",active:!1,model_from_controller:"UniversalRobots_UR5e"}],has_error:!1,error_details:""}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{kind:"VirtualController",manufacturer:"universalrobots",position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/specification",handle(){return{dh_parameters:[{alpha:1.5707963267948966,theta:0,a:0,d:162.25,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-425,d:0,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-392.2,d:0,reverse_rotation_direction:!1},{alpha:1.5707963267948966,theta:0,a:0,d:133.3,reverse_rotation_direction:!1},{alpha:-1.5707963267948966,theta:0,a:0,d:99.7,reverse_rotation_direction:!1},{alpha:0,theta:0,a:0,d:99.6,reverse_rotation_direction:!1}],mechanical_joint_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/safety-setup",handle(){return{safety_settings:[{safety_state:"SAFETY_NORMAL",settings:{joint_position_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-2.96705961227417,upper_limit:2.96705961227417,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-1.7453292608261108,upper_limit:2.7925267219543457,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-3.3161256313323975,upper_limit:.40142571926116943,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-3.4906585216522217,upper_limit:3.4906585216522217,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-2.4434609413146973,upper_limit:2.4434609413146973,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-4.71238899230957,upper_limit:4.71238899230957,unlimited:!1}],joint_velocity_limits:[{joint:"JOINTNAME_AXIS_1",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_2",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_3",limit:3.4906585216522217},{joint:"JOINTNAME_AXIS_4",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_5",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_6",limit:6.981317043304443}],joint_acceleration_limits:[],joint_torque_limits:[],tcp_velocity_limit:1800}}],safety_zones:[{id:1,priority:0,geometry:{compound:{child_geometries:[{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820},{x:-800,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:-1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:-800,y:1330,z:-1820},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500},{x:1650,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:1650,y:-1330,z:1500},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Cell workzone"},motion_group_uid:1},{id:2,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-1850},{x:865,y:1330,z:-1850},{x:865,y:-720,z:-1850},{x:1650,y:-720,z:-1850},{x:1650,y:1330,z:-920},{x:865,y:1330,z:-920},{x:865,y:-720,z:-920},{x:1650,y:-720,z:-920}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Transport"},motion_group_uid:1},{id:3,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-600},{x:865,y:1330,z:-600},{x:865,y:430,z:-600},{x:1650,y:430,z:-600},{x:1650,y:1330,z:-1250},{x:865,y:1330,z:-1250},{x:865,y:430,z:-1250},{x:1650,y:430,z:-1250}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Tunel"},motion_group_uid:1},{id:4,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:-760,z:-440},{x:900,y:-760,z:-440},{x:900,y:-1330,z:-440},{x:1650,y:-1330,z:-440},{x:1650,y:-760,z:-1800},{x:900,y:-760,z:-1800},{x:900,y:-1330,z:-1800},{x:1650,y:-1330,z:-1800}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Fanuc controller"},motion_group_uid:1},{id:6,priority:0,geometry:{convex_hull:{vertices:[{x:-200,y:-200,z:-1900},{x:200,y:-200,z:-1900},{x:200,y:200,z:-1900},{x:-200,y:200,z:-1900},{x:-200,y:-200,z:-350},{x:200,y:-200,z:-350},{x:200,y:200,z:-350},{x:-200,y:200,z:-350}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Robot base"},motion_group_uid:1}],robot_model_geometries:[{link_index:1,geometry:{sphere:{radius:270},init_pose:{position:{x:-70,y:-70,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link1_sphere"}},{link_index:2,geometry:{capsule:{radius:160,cylinder_height:800},init_pose:{position:{x:-450,y:40,z:170},orientation:{x:0,y:-.7071067811865475,z:0,w:.7071067811865476}},id:"link2_capsule"}},{link_index:3,geometry:{sphere:{radius:270},init_pose:{position:{x:-110,y:10,z:-100},orientation:{x:0,y:0,z:0,w:1}},id:"link3_sphere"}},{link_index:4,geometry:{capsule:{radius:110,cylinder_height:600},init_pose:{position:{x:0,y:300,z:40},orientation:{x:-.7071067811865475,y:0,z:0,w:.7071067811865476}},id:"link4_capsule"}},{link_index:5,geometry:{sphere:{radius:75},init_pose:{position:{x:0,y:0,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link5_sphere"}}],tool_geometries:[]}}},{method:"GET",path:"/cells/:cellId/coordinate-systems",handle(){return{coordinatesystems:[{coordinate_system:"",name:"world",reference_uid:"",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0],type:"ROTATION_VECTOR"}}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/tcps",handle(){return{tcps:[{id:"Flange",readable_name:"Default-Flange",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0,0],type:"ROTATION_VECTOR"}},{id:"complex-tcp-position",readable_name:"Complex TCP Position",position:{x:-200,y:300,z:150},rotation:{angles:[-.12139440409113832,-.06356210998212003,-.2023240068185639,0],type:"ROTATION_VECTOR"}}]}}}],o=((t=e.method)==null?void 0:t.toUpperCase())||"GET",s="/cells"+((n=(r=e.url)==null?void 0:r.split("/cells")[1])==null?void 0:n.split("?")[0]);for(const i of a){const l=QE.match(i.path)(s||"");if(o===i.method&&l){const c=i.handle();return{status:200,statusText:"Success",data:JSON.stringify(c),headers:{},config:e,request:{responseURL:e.url}}}}throw new xl(`No mock handler matched this request: ${o} ${s}`,"404",e)})}handleWebsocketConnection(e){this.connections.push(e),setTimeout(()=>{e.dispatchEvent(new Event("open")),console.log("Websocket connection opened from",e.url),e.url.includes("/state-stream")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify(aI)})),e.url.includes("/move-joint")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:48:26.096266444Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3492152690887451,-1.5659207105636597,1.6653711795806885,-1.0991662740707397,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:""},tcp_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"671259"}],sequence_number:"671259"},movement_state:"MOVEMENT_STATE_MOVING"}})})),e.url.includes("/move-tcp")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:43:12.188335774Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3352527618408203,-1.5659207105636597,1.6653711795806885,-1.110615611076355,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:""},tcp_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"627897"}],sequence_number:"627897"},movement_state:"MOVEMENT_STATE_MOVING"}})}))},10)}handleWebsocketMessage(e,t){console.log(`Received message on ${e.url}`,t)}},aI={result:{state:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",joint_position:{joints:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:""},tcp_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"1"},tcp_pose:{position:{x:302.90748476115556,y:-152.87065869452337,z:424.0454619321661},orientation:{x:2.3403056115045353,y:-1.1706836379431356,z:.9772511964246311},coordinate_system:"",tcp:"Flange"}}},oI=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=cn({cellId:r},e),this.accessToken=e.accessToken||Ei.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new nI);const n=I.create({baseURL:Ui(this.config.instanceUrl,"/api/v1"),headers:{"User-Agent":"Wandelbots-Nova-JS-SDK"}});n.interceptors.request.use(a=>Ie(this,null,function*(){return a.headers.Authorization||(this.accessToken?a.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(a.headers.Authorization=`Basic ${btoa(e.username+":"+e.password)}`)),a})),typeof window<"u"&&n.interceptors.response.use(a=>a,a=>Ie(this,null,function*(){var o,s;if(Q_(a))if(((o=a.response)==null?void 0:o.status)===401)try{if(yield this.renewAuthentication(),a.config)return this.accessToken?a.config.headers.Authorization=`Bearer ${this.accessToken}`:delete a.config.headers.Authorization,n.request(a.config)}catch(i){return Promise.reject(i)}else((s=a.response)==null?void 0:s.status)===503&&(yield fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(a)})),this.api=new rI(r,hl(cn({},e),{basePath:Ui(this.config.instanceUrl,"/api/v1"),isJsonMime:a=>a==="application/json",baseOptions:cn(cn({},this.mock?{adapter:a=>this.mock.handleAPIRequest(a)}:{}),e.baseOptions),axiosInstance:n}))}renewAuthentication(){return Ie(this,null,function*(){if(!this.authPromise){this.authPromise=S2(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?Ei.setString("wbjs.access_token",this.accessToken):Ei.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL(Ui(this.config.instanceUrl,`/api/v1/cells/${this.config.cellId}`,e));return t.protocol=t.protocol.replace("http","ws"),t.protocol=t.protocol.replace("https","wss"),this.accessToken?t.searchParams.append("token",this.accessToken):this.config.username&&this.config.password&&(t.username=this.config.username,t.password=this.config.password),t.toString()}openReconnectingWebsocket(e){return new y2(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return Ie(this,null,function*(){return yield tI.open(this,e)})}connectJogger(e){return Ie(this,null,function*(){return yield ZE.open(this,e)})}connectMotionGroups(e){return Ie(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>XE.connect(this,r,t)))})}connectMotionGroup(e){return Ie(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function sI(e){try{return JSON.stringify(e)}catch{return}}function iI(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function lI(e){var t,r,n,a;return e instanceof xl&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof xl&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((a=e.response)==null?void 0:a.data)}`:e instanceof Error?e.message:`Unexpected error: ${sI(e)||e}`}const Tc=e=>{const t=e.softTimeout||3e3,[r,n]=W.useState(!1),a=R.useTheme();return W.useEffect(()=>{const o=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(o)}),g.jsx(R.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:a.palette.text.primary},children:e.error?g.jsx(Tf,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(R.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(R.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:a.palette.text.secondary},children:"This is taking longer than expected..."})]})})},Tf=e=>{const t=lI(e.error),r=e.error instanceof Error?e.error.stack:null,n=R.useTheme();return g.jsxs(R.Stack,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:n.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${_l.lowerFirst(R.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})},cI=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),uI=W.forwardRef(cI),dI=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),hI=W.forwardRef(dI),pI=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),mI=W.forwardRef(pI),fI=({title:e,titleId:t,...r},n)=>N.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,...r},e?N.createElement("title",{id:t},e):null,N.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"})),gI=W.forwardRef(fI);function yI(){this.__data__=[],this.size=0}function Pf(e,t){return e===t||e!==e&&t!==t}function zs(e,t){for(var r=e.length;r--;)if(Pf(e[r][0],t))return r;return-1}var bI=Array.prototype,xI=bI.splice;function vI(e){var t=this.__data__,r=zs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():xI.call(t,r,1),--this.size,!0}function SI(e){var t=this.__data__,r=zs(t,e);return r<0?void 0:t[r][1]}function wI(e){return zs(this.__data__,e)>-1}function CI(e,t){var r=this.__data__,n=zs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function er(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}er.prototype.clear=yI;er.prototype.delete=vI;er.prototype.get=SI;er.prototype.has=wI;er.prototype.set=CI;function OI(){this.__data__=new er,this.size=0}function TI(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function PI(e){return this.__data__.get(e)}function RI(e){return this.__data__.has(e)}var AI="[object AsyncFunction]",_I="[object Function]",EI="[object GeneratorFunction]",II="[object Proxy]";function Rf(e){if(!Er(e))return!1;var t=Br(e);return t==_I||t==EI||t==AI||t==II}var Di=Lt["__core-js_shared__"],lh=function(){var e=/[^.]+$/.exec(Di&&Di.keys&&Di.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function VI(e){return!!lh&&lh in e}var MI=Function.prototype,jI=MI.toString;function Nr(e){if(e!=null){try{return jI.call(e)}catch{}try{return e+""}catch{}}return""}var kI=/[\\^$.*+?()[\]{}|]/g,$I=/^\[object .+?Constructor\]$/,UI=Function.prototype,DI=Object.prototype,LI=UI.toString,BI=DI.hasOwnProperty,FI=RegExp("^"+LI.call(BI).replace(kI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function NI(e){if(!Er(e)||VI(e))return!1;var t=Rf(e)?FI:$I;return t.test(Nr(e))}function zI(e,t){return e==null?void 0:e[t]}function zr(e,t){var r=zI(e,t);return NI(r)?r:void 0}var Oa=zr(Lt,"Map"),Ta=zr(Object,"create");function GI(){this.__data__=Ta?Ta(null):{},this.size=0}function HI(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var qI="__lodash_hash_undefined__",WI=Object.prototype,JI=WI.hasOwnProperty;function YI(e){var t=this.__data__;if(Ta){var r=t[e];return r===qI?void 0:r}return JI.call(t,e)?t[e]:void 0}var KI=Object.prototype,QI=KI.hasOwnProperty;function XI(e){var t=this.__data__;return Ta?t[e]!==void 0:QI.call(t,e)}var ZI="__lodash_hash_undefined__";function eV(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ta&&t===void 0?ZI:t,this}function Mr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mr.prototype.clear=GI;Mr.prototype.delete=HI;Mr.prototype.get=YI;Mr.prototype.has=XI;Mr.prototype.set=eV;function tV(){this.size=0,this.__data__={hash:new Mr,map:new(Oa||er),string:new Mr}}function rV(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gs(e,t){var r=e.__data__;return rV(t)?r[typeof t=="string"?"string":"hash"]:r.map}function nV(e){var t=Gs(this,e).delete(e);return this.size-=t?1:0,t}function aV(e){return Gs(this,e).get(e)}function oV(e){return Gs(this,e).has(e)}function sV(e,t){var r=Gs(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function tr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}tr.prototype.clear=tV;tr.prototype.delete=nV;tr.prototype.get=aV;tr.prototype.has=oV;tr.prototype.set=sV;var iV=200;function lV(e,t){var r=this.__data__;if(r instanceof er){var n=r.__data__;if(!Oa||n.length<iV-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new tr(n)}return r.set(e,t),this.size=r.size,this}function Wt(e){var t=this.__data__=new er(e);this.size=t.size}Wt.prototype.clear=OI;Wt.prototype.delete=TI;Wt.prototype.get=PI;Wt.prototype.has=RI;Wt.prototype.set=lV;var cV="__lodash_hash_undefined__";function uV(e){return this.__data__.set(e,cV),this}function dV(e){return this.__data__.has(e)}function Zo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new tr;++t<r;)this.add(e[t])}Zo.prototype.add=Zo.prototype.push=uV;Zo.prototype.has=dV;function hV(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function pV(e,t){return e.has(t)}var mV=1,fV=2;function Af(e,t,r,n,a,o){var s=r&mV,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&fV?new Zo:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var b=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!hV(t,function(S,_){if(!pV(p,_)&&(f===S||a(f,S,r,n,o)))return p.push(_)})){h=!1;break}}else if(!(f===m||a(f,m,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var ch=Lt.Uint8Array;function gV(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function yV(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var bV=1,xV=2,vV="[object Boolean]",SV="[object Date]",wV="[object Error]",CV="[object Map]",OV="[object Number]",TV="[object RegExp]",PV="[object Set]",RV="[object String]",AV="[object Symbol]",_V="[object ArrayBuffer]",EV="[object DataView]",uh=pr?pr.prototype:void 0,Li=uh?uh.valueOf:void 0;function IV(e,t,r,n,a,o,s){switch(r){case EV:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _V:return!(e.byteLength!=t.byteLength||!o(new ch(e),new ch(t)));case vV:case SV:case OV:return Pf(+e,+t);case wV:return e.name==t.name&&e.message==t.message;case TV:case RV:return e==t+"";case CV:var i=gV;case PV:var l=n&bV;if(i||(i=yV),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=xV,s.set(e,t);var u=Af(i(e),i(t),n,a,o,s);return s.delete(e),u;case AV:if(Li)return Li.call(e)==Li.call(t)}return!1}function VV(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Dt=Array.isArray;function MV(e,t,r){var n=t(e);return Dt(e)?n:VV(n,r(e))}function jV(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[a++]=s)}return o}function kV(){return[]}var $V=Object.prototype,UV=$V.propertyIsEnumerable,dh=Object.getOwnPropertySymbols,DV=dh?function(e){return e==null?[]:(e=Object(e),jV(dh(e),function(t){return UV.call(e,t)}))}:kV;function LV(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var BV="[object Arguments]";function hh(e){return Ir(e)&&Br(e)==BV}var _f=Object.prototype,FV=_f.hasOwnProperty,NV=_f.propertyIsEnumerable,Ef=hh(function(){return arguments}())?hh:function(e){return Ir(e)&&FV.call(e,"callee")&&!NV.call(e,"callee")};function zV(){return!1}var If=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ph=If&&typeof module=="object"&&module&&!module.nodeType&&module,GV=ph&&ph.exports===If,mh=GV?Lt.Buffer:void 0,HV=mh?mh.isBuffer:void 0,Sl=HV||zV,qV=9007199254740991,WV=/^(?:0|[1-9]\d*)$/;function Vf(e,t){var r=typeof e;return t=t??qV,!!t&&(r=="number"||r!="symbol"&&WV.test(e))&&e>-1&&e%1==0&&e<t}var JV=9007199254740991;function Pc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=JV}var YV="[object Arguments]",KV="[object Array]",QV="[object Boolean]",XV="[object Date]",ZV="[object Error]",eM="[object Function]",tM="[object Map]",rM="[object Number]",nM="[object Object]",aM="[object RegExp]",oM="[object Set]",sM="[object String]",iM="[object WeakMap]",lM="[object ArrayBuffer]",cM="[object DataView]",uM="[object Float32Array]",dM="[object Float64Array]",hM="[object Int8Array]",pM="[object Int16Array]",mM="[object Int32Array]",fM="[object Uint8Array]",gM="[object Uint8ClampedArray]",yM="[object Uint16Array]",bM="[object Uint32Array]",Ee={};Ee[uM]=Ee[dM]=Ee[hM]=Ee[pM]=Ee[mM]=Ee[fM]=Ee[gM]=Ee[yM]=Ee[bM]=!0;Ee[YV]=Ee[KV]=Ee[lM]=Ee[QV]=Ee[cM]=Ee[XV]=Ee[ZV]=Ee[eM]=Ee[tM]=Ee[rM]=Ee[nM]=Ee[aM]=Ee[oM]=Ee[sM]=Ee[iM]=!1;function xM(e){return Ir(e)&&Pc(e.length)&&!!Ee[Br(e)]}function vM(e){return function(t){return e(t)}}var Mf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ca=Mf&&typeof module=="object"&&module&&!module.nodeType&&module,SM=ca&&ca.exports===Mf,Bi=SM&&Im.process,fh=function(){try{var e=ca&&ca.require&&ca.require("util").types;return e||Bi&&Bi.binding&&Bi.binding("util")}catch{}}(),gh=fh&&fh.isTypedArray,jf=gh?vM(gh):xM,wM=Object.prototype,CM=wM.hasOwnProperty;function OM(e,t){var r=Dt(e),n=!r&&Ef(e),a=!r&&!n&&Sl(e),o=!r&&!n&&!a&&jf(e),s=r||n||a||o,i=s?LV(e.length,String):[],l=i.length;for(var c in e)CM.call(e,c)&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vf(c,l)))&&i.push(c);return i}var TM=Object.prototype;function PM(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||TM;return e===r}function RM(e,t){return function(r){return e(t(r))}}var AM=RM(Object.keys,Object),_M=Object.prototype,EM=_M.hasOwnProperty;function IM(e){if(!PM(e))return AM(e);var t=[];for(var r in Object(e))EM.call(e,r)&&r!="constructor"&&t.push(r);return t}function kf(e){return e!=null&&Pc(e.length)&&!Rf(e)}function Rc(e){return kf(e)?OM(e):IM(e)}function yh(e){return MV(e,Rc,DV)}var VM=1,MM=Object.prototype,jM=MM.hasOwnProperty;function kM(e,t,r,n,a,o){var s=r&VM,i=yh(e),l=i.length,c=yh(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:jM.call(t,h)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);for(var b=s;++d<l;){h=i[d];var S=e[h],_=t[h];if(n)var w=s?n(_,S,h,t,e,o):n(S,_,h,e,t,o);if(!(w===void 0?S===_||a(S,_,r,n,o):w)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var O=e.constructor,A=t.constructor;O!=A&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof A=="function"&&A instanceof A)&&(m=!1)}return o.delete(e),o.delete(t),m}var wl=zr(Lt,"DataView"),Cl=zr(Lt,"Promise"),Ol=zr(Lt,"Set"),Tl=zr(Lt,"WeakMap"),bh="[object Map]",$M="[object Object]",xh="[object Promise]",vh="[object Set]",Sh="[object WeakMap]",wh="[object DataView]",UM=Nr(wl),DM=Nr(Oa),LM=Nr(Cl),BM=Nr(Ol),FM=Nr(Tl),ir=Br;(wl&&ir(new wl(new ArrayBuffer(1)))!=wh||Oa&&ir(new Oa)!=bh||Cl&&ir(Cl.resolve())!=xh||Ol&&ir(new Ol)!=vh||Tl&&ir(new Tl)!=Sh)&&(ir=function(e){var t=Br(e),r=t==$M?e.constructor:void 0,n=r?Nr(r):"";if(n)switch(n){case UM:return wh;case DM:return bh;case LM:return xh;case BM:return vh;case FM:return Sh}return t});var NM=1,Ch="[object Arguments]",Oh="[object Array]",ho="[object Object]",zM=Object.prototype,Th=zM.hasOwnProperty;function GM(e,t,r,n,a,o){var s=Dt(e),i=Dt(t),l=s?Oh:ir(e),c=i?Oh:ir(t);l=l==Ch?ho:l,c=c==Ch?ho:c;var u=l==ho,d=c==ho,h=l==c;if(h&&Sl(e)){if(!Sl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Wt),s||jf(e)?Af(e,t,r,n,a,o):IV(e,t,l,r,n,a,o);if(!(r&NM)){var p=u&&Th.call(e,"__wrapped__"),f=d&&Th.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,b=f?t.value():t;return o||(o=new Wt),a(m,b,r,n,o)}}return h?(o||(o=new Wt),kM(e,t,r,n,a,o)):!1}function Hs(e,t,r,n,a){return e===t?!0:e==null||t==null||!Ir(e)&&!Ir(t)?e!==e&&t!==t:GM(e,t,r,n,Hs,a)}function HM(e,t){return Hs(e,t)}const $f=({store:e})=>{const{t}=Re.useTranslation(),[r,n]=W.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),a=W.useRef(r);An(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;HM(a.current,s)||(a.current=s,n(s))});const o=[];for(const[s,i]of r.entries())i&&o.push(s);return g.jsx(R.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:o.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:o.map(s=>s+1).join(", ")})})},qM=R.styled(R.FormControl)(({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 po({labelValue:e,...t}){return g.jsxs(qM,{fullWidth:!0,variant:"filled",children:[g.jsx(R.InputLabel,{id:t.labelId,children:e}),g.jsx(R.Select,{...t})]})}var Ph=function(){try{var e=zr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function WM(e,t,r){t=="__proto__"&&Ph?Ph(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function JM(e,t,r,n){for(var a=-1,o=e==null?0:e.length;++a<o;){var s=e[a];t(n,s,r(s),e)}return n}function YM(e){return function(t,r,n){for(var a=-1,o=Object(t),s=n(t),i=s.length;i--;){var l=s[++a];if(r(o[l],l,o)===!1)break}return t}}var KM=YM();function QM(e,t){return e&&KM(e,t,Rc)}function XM(e,t){return function(r,n){if(r==null)return r;if(!kf(r))return e(r,n);for(var a=r.length,o=-1,s=Object(r);++o<a&&n(s[o],o,s)!==!1;);return r}}var ZM=XM(QM);function e5(e,t,r,n){return ZM(e,function(a,o,s){t(n,a,r(a),s)}),n}var t5=1,r5=2;function n5(e,t,r,n){var a=r.length,o=a;if(e==null)return!o;for(e=Object(e);a--;){var s=r[a];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<o;){s=r[a];var i=s[0],l=e[i],c=s[1];if(s[2]){if(l===void 0&&!(i in e))return!1}else{var u=new Wt,d;if(!(d===void 0?Hs(c,l,t5|r5,n,u):d))return!1}}return!0}function Uf(e){return e===e&&!Er(e)}function a5(e){for(var t=Rc(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Uf(a)]}return t}function Df(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function o5(e){var t=a5(e);return t.length==1&&t[0][2]?Df(t[0][0],t[0][1]):function(r){return r===e||n5(r,e,t)}}var s5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i5=/^\w*$/;function Ac(e,t){if(Dt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ms(e)?!0:i5.test(e)||!s5.test(e)||t!=null&&e in Object(t)}var l5="Expected a function";function _c(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(l5);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var s=e.apply(this,n);return r.cache=o.set(a,s)||o,s};return r.cache=new(_c.Cache||tr),r}_c.Cache=tr;var c5=500;function u5(e){var t=_c(e,function(n){return r.size===c5&&r.clear(),n}),r=t.cache;return t}var d5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h5=/\\(\\)?/g,p5=u5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(d5,function(r,n,a,o){t.push(a?o.replace(h5,"$1"):n||r)}),t});function m5(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var Rh=pr?pr.prototype:void 0,Ah=Rh?Rh.toString:void 0;function Lf(e){if(typeof e=="string")return e;if(Dt(e))return m5(e,Lf)+"";if(Ms(e))return Ah?Ah.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Bf(e){return e==null?"":Lf(e)}function Ff(e,t){return Dt(e)?e:Ac(e,t)?[e]:p5(Bf(e))}function qs(e){if(typeof e=="string"||Ms(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Nf(e,t){t=Ff(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[qs(t[r++])];return r&&r==n?e:void 0}function f5(e,t,r){var n=e==null?void 0:Nf(e,t);return n===void 0?r:n}function g5(e,t){return e!=null&&t in Object(e)}function y5(e,t,r){t=Ff(t,e);for(var n=-1,a=t.length,o=!1;++n<a;){var s=qs(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=a?o:(a=e==null?0:e.length,!!a&&Pc(a)&&Vf(s,a)&&(Dt(e)||Ef(e)))}function b5(e,t){return e!=null&&y5(e,t,g5)}var x5=1,v5=2;function S5(e,t){return Ac(e)&&Uf(t)?Df(qs(e),t):function(r){var n=f5(r,e);return n===void 0&&n===t?b5(r,e):Hs(t,n,x5|v5)}}function w5(e){return e}function C5(e){return function(t){return t==null?void 0:t[e]}}function O5(e){return function(t){return Nf(t,e)}}function T5(e){return Ac(e)?C5(qs(e)):O5(e)}function P5(e){return typeof e=="function"?e:e==null?w5:typeof e=="object"?Dt(e)?S5(e[0],e[1]):o5(e):T5(e)}function R5(e,t){return function(r,n){var a=Dt(r)?JM:e5,o={};return a(r,e,P5(n),o)}}var mo=R5(function(e,t,r){WM(e,r,t)}),A5=0;function _5(e){var t=++A5;return Bf(e)+t}const Pl=[{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}],E5=[{id:"continuous"},...Pl],I5=["coordsys","tool"];class Ws{constructor(t,r,n,a){var o,s;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=a,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.showCoordSystemSelect=!0,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[];for(const i of n)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((o=n[0])==null?void 0:o.coordinate_system)||"world",this.selectedTcpId=((s=a[0])==null?void 0:s.id)||"",ke.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(ke.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,{coordinatesystems:a},{tcps:o}]=await Promise.all([r.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),r.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),r.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new Ws(t,n,a||[],o||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return _l.countBy(this.coordSystems,t=>t.name)}async deactivate(){const t=this.jogger.activeWebsocket;this.jogger.setJoggingMode("increment"),t&&await t.closed()}async activate(){if(this.currentTab.id==="cartesian"){const t={tcpId:this.selectedTcpId,coordSystemId:this.activeCoordSystemId};this.activeDiscreteIncrement?this.jogger.setJoggingMode("increment",t):this.jogger.setJoggingMode("cartesian",t)}else this.jogger.setJoggingMode("joint");return this.jogger}loadFromLocalStorage(){const t=Tr.tryParseJson(localStorage.getItem("joggingToolStore"));t&&(this.tabsById[t.selectedTabId]&&(this.selectedTabId=t.selectedTabId),this.coordSystemsById[t.selectedCoordSystemId]&&(this.selectedCoordSystemId=t.selectedCoordSystemId),this.tcpsById[t.selectedTcpId]&&(this.selectedTcpId=t.selectedTcpId),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 localStorageSave(){return{selectedTabId:this.selectedTabId,selectedCoordSystemId:this.selectedCoordSystemId,selectedTcpId:this.selectedTcpId,selectedOrientation:this.selectedOrientation,selectedIncrementId:this.selectedIncrementId,selectedCartesianMotionType:this.selectedCartesianMotionType}}get tabs(){return[{id:"cartesian",label:"cartesian"},{id:"joint",label:"joint"}]}get incrementOptions(){return E5}get discreteIncrementOptions(){return Pl}get incrementOptionsById(){return mo(this.incrementOptions,t=>t.id)}get tabsById(){return mo(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 mo(this.coordSystems,t=>t.coordinate_system)}get selectedCoordSystem(){return this.coordSystemsById[this.selectedCoordSystemId]}get activeCoordSystemId(){return this.selectedOrientation==="tool"?"tool":this.selectedCoordSystemId}get tcpsById(){return mo(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Pl.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInDisplayUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.maxTranslationVelocityMmPerSec:this.maxRotationVelocityDegPerSec}get currentMotionType(){return this.selectedTabId==="cartesian"&&this.selectedCartesianMotionType==="translate"?"translate":"rotate"}onTabChange(t,r){const n=this.tabs[r]||this.tabs[0];this.selectedTabId=n.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.selectedTcpId=t}setSelectedOrientation(t){this.selectedOrientation=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}async withMotionLock(t){const r=_5();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const V5=ye.observer(({store:e})=>{var a;const{t}=Re.useTranslation(),r=[];function n(o){switch(o){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return o}}return e.showCoordSystemSelect&&r.push(g.jsx(po,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:o=>e.setSelectedCoordSystemId(o.target.value),disabled:e.isLocked,children:e.coordSystems.map(o=>g.jsx(R.MenuItem,{value:o.coordinate_system,children:o.name&&e.coordSystemCountByName[o.name]>1?`${o.name} / ${o.coordinate_system}`:o.name||o.coordinate_system},o.coordinate_system))},"coord")),e.showTcpSelect&&r.push(g.jsx(po,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:o=>e.setSelectedTcpId(o.target.value),disabled:e.isLocked,children:e.tcps.map(o=>g.jsx(R.MenuItem,{value:o.id,children:o.id},o.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(po,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:o=>e.setSelectedOrientation(o.target.value),disabled:e.isLocked,children:I5.map(o=>g.jsx(R.MenuItem,{value:o,children:n(o)},o))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(po,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((a=e.activeDiscreteIncrement)==null?void 0:a.id)||"continuous",onChange:o=>e.setSelectedIncrementId(o.target.value),disabled:e.isLocked,children:[g.jsx(R.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>g.jsx(R.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]},"increment")),g.jsx(R.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((o,s)=>g.jsx(R.Box,{sx:{gridColumn:r.length%2===1&&s===r.length-1?"span 2":"auto"},children:o},s))})}),M5=R.styled(R.ToggleButtonGroup)(({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"}}}}});function _h(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function j5(e){return typeof e=="string"}function k5(e,t,r){return e===void 0||j5(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Po(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Eh(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function $5(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:a,className:o}=e;if(!t){const p=Pt(r==null?void 0:r.className,o,a==null?void 0:a.className,n==null?void 0:n.className),f={...r==null?void 0:r.style,...a==null?void 0:a.style,...n==null?void 0:n.style},m={...r,...a,...n};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:void 0}}const s=Po({...a,...n}),i=Eh(n),l=Eh(a),c=t(s),u=Pt(c==null?void 0:c.className,r==null?void 0:r.className,o,a==null?void 0:a.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...a==null?void 0:a.style,...n==null?void 0:n.style},h={...c,...r,...l,...i};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function U5(e,t,r){return typeof e=="function"?e(t,r):e}function sr(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:a=!1,...o}=e,s=a?{}:U5(r,n),{props:i,internalRef:l}=$5({...o,externalSlotProps:s}),c=ms(l,s==null?void 0:s.ref,(d=e.additionalProps)==null?void 0:d.ref);return k5(t,{...i,ref:c},n)}function Ih(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
154
|
-
`))}return!1}const D5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function L5(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const B5=2;function on(e,t,r,n,a){return r===1?Math.min(e+t,a):Math.max(e-t,n)}function zf(e,t){return e-t}function Vh(e,t){const{index:r}=e.reduce((n,a,o)=>{const s=Math.abs(t-a);return n===null||s<n.distance||s===n.distance?{distance:s,index:o}:n},null)??{};return r}function fo(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const a=r.changedTouches[n];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function es(e,t,r){return(e-t)*100/(r-t)}function F5(e,t,r){return(r-t)*e+t}function N5(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function z5(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(N5(t)))}function Mh({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(zf)}function go({sliderRef:e,activeIndex:t,setActive:r}){var a,o,s;const n=sa(e.current);(!((a=e.current)!=null&&a.contains(n.activeElement))||Number((o=n==null?void 0:n.activeElement)==null?void 0:o.getAttribute("data-index"))!==t)&&((s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function yo(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?L5(e,t):!1}const G5={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},H5=e=>e;let bo;function jh(){return bo===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?bo=CSS.supports("touch-action","none"):bo=!0),bo}function q5(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:o=!1,marks:s=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=H5,step:m=1,shiftStep:b=10,tabIndex:S,value:_}=e,w=N.useRef(void 0),[O,A]=N.useState(-1),[C,T]=N.useState(-1),[E,V]=N.useState(!1),y=N.useRef(0),P=N.useRef(null),[z,M]=oO({controlled:_,default:r??l,name:"Slider"}),G=u&&((Q,te,se)=>{const fe=Q.nativeEvent||Q,Oe=new fe.constructor(fe.type,fe);Object.defineProperty(Oe,"target",{writable:!0,value:{value:te,name:c}}),P.current=te,u(Oe,te,se)}),ne=Array.isArray(z);let re=ne?z.slice().sort(zf):[z];re=re.map(Q=>Q==null?l:sn(Q,l,i));const ae=s===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Q,te)=>({value:l+m*te})):s||[],ee=ae.map(Q=>Q.value),[le,J]=N.useState(-1),Z=N.useRef(null),he=ms(p,Z),Ae=Q=>te=>{var fe;const se=Number(te.currentTarget.getAttribute("data-index"));Ih(te.target)&&J(se),T(se),(fe=Q==null?void 0:Q.onFocus)==null||fe.call(Q,te)},ze=Q=>te=>{var se;Ih(te.target)||J(-1),T(-1),(se=Q==null?void 0:Q.onBlur)==null||se.call(Q,te)},Ce=(Q,te)=>{const se=Number(Q.currentTarget.getAttribute("data-index")),fe=re[se],Oe=ee.indexOf(fe);let ie=te;if(ae&&m==null){const He=ee[ee.length-1];ie>=He?ie=He:ie<=ee[0]?ie=ee[0]:ie=ie<fe?ee[Oe-1]:ee[Oe+1]}if(ie=sn(ie,l,i),ne){a&&(ie=sn(ie,re[se-1]||-1/0,re[se+1]||1/0));const He=ie;ie=Mh({values:re,newValue:ie,index:se});let Ze=se;a||(Ze=ie.indexOf(He)),go({sliderRef:Z,activeIndex:Ze})}M(ie),J(se),G&&!yo(ie,z)&&G(Q,ie,se),d&&d(Q,P.current??ie)},lt=Q=>te=>{var se;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(te.key)){te.preventDefault();const fe=Number(te.currentTarget.getAttribute("data-index")),Oe=re[fe];let ie=null;if(m!=null){const He=te.shiftKey?b:m;switch(te.key){case"ArrowUp":ie=on(Oe,He,1,l,i);break;case"ArrowRight":ie=on(Oe,He,o?-1:1,l,i);break;case"ArrowDown":ie=on(Oe,He,-1,l,i);break;case"ArrowLeft":ie=on(Oe,He,o?1:-1,l,i);break;case"PageUp":ie=on(Oe,b,1,l,i);break;case"PageDown":ie=on(Oe,b,-1,l,i);break;case"Home":ie=l;break;case"End":ie=i;break}}else if(ae){const He=ee[ee.length-1],Ze=ee.indexOf(Oe),Be=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Be.includes(te.key)?Ze===0?ie=ee[0]:ie=ee[Ze-1]:mt.includes(te.key)&&(Ze===ee.length-1?ie=He:ie=ee[Ze+1])}ie!=null&&Ce(te,ie)}(se=Q==null?void 0:Q.onKeyDown)==null||se.call(Q,te)};Ut(()=>{var Q;n&&Z.current.contains(document.activeElement)&&((Q=document.activeElement)==null||Q.blur())},[n]),n&&O!==-1&&A(-1),n&&le!==-1&&J(-1);const rt=Q=>te=>{var se;(se=Q.onChange)==null||se.call(Q,te),Ce(te,te.target.valueAsNumber)},be=N.useRef(void 0);let X=h;o&&h==="horizontal"&&(X+="-reverse");const oe=({finger:Q,move:te=!1})=>{const{current:se}=Z,{width:fe,height:Oe,bottom:ie,left:He}=se.getBoundingClientRect();let Ze;X.startsWith("vertical")?Ze=(ie-Q.y)/Oe:Ze=(Q.x-He)/fe,X.includes("-reverse")&&(Ze=1-Ze);let Be;if(Be=F5(Ze,l,i),m)Be=z5(Be,m,l);else{const $n=Vh(ee,Be);Be=ee[$n]}Be=sn(Be,l,i);let mt=0;if(ne){te?mt=be.current:mt=Vh(re,Be),a&&(Be=sn(Be,re[mt-1]||-1/0,re[mt+1]||1/0));const $n=Be;Be=Mh({values:re,newValue:Be,index:mt}),a&&te||(mt=Be.indexOf($n),be.current=mt)}return{newValue:Be,activeIndex:mt}},ce=qt(Q=>{const te=fo(Q,w);if(!te)return;if(y.current+=1,Q.type==="mousemove"&&Q.buttons===0){Y(Q);return}const{newValue:se,activeIndex:fe}=oe({finger:te,move:!0});go({sliderRef:Z,activeIndex:fe,setActive:A}),M(se),!E&&y.current>B5&&V(!0),G&&!yo(se,z)&&G(Q,se,fe)}),Y=qt(Q=>{const te=fo(Q,w);if(V(!1),!te)return;const{newValue:se}=oe({finger:te,move:!0});A(-1),Q.type==="touchend"&&T(-1),d&&d(Q,P.current??se),w.current=void 0,me()}),xe=qt(Q=>{if(n)return;jh()||Q.preventDefault();const te=Q.changedTouches[0];te!=null&&(w.current=te.identifier);const se=fo(Q,w);if(se!==!1){const{newValue:Oe,activeIndex:ie}=oe({finger:se});go({sliderRef:Z,activeIndex:ie,setActive:A}),M(Oe),G&&!yo(Oe,z)&&G(Q,Oe,ie)}y.current=0;const fe=sa(Z.current);fe.addEventListener("touchmove",ce,{passive:!0}),fe.addEventListener("touchend",Y,{passive:!0})}),me=N.useCallback(()=>{const Q=sa(Z.current);Q.removeEventListener("mousemove",ce),Q.removeEventListener("mouseup",Y),Q.removeEventListener("touchmove",ce),Q.removeEventListener("touchend",Y)},[Y,ce]);N.useEffect(()=>{const{current:Q}=Z;return Q.addEventListener("touchstart",xe,{passive:jh()}),()=>{Q.removeEventListener("touchstart",xe),me()}},[me,xe]),N.useEffect(()=>{n&&me()},[n,me]);const We=Q=>te=>{var Oe;if((Oe=Q.onMouseDown)==null||Oe.call(Q,te),n||te.defaultPrevented||te.button!==0)return;te.preventDefault();const se=fo(te,w);if(se!==!1){const{newValue:ie,activeIndex:He}=oe({finger:se});go({sliderRef:Z,activeIndex:He,setActive:A}),M(ie),G&&!yo(ie,z)&&G(te,ie,He)}y.current=0;const fe=sa(Z.current);fe.addEventListener("mousemove",ce,{passive:!0}),fe.addEventListener("mouseup",Y)},Ge=es(ne?re[0]:l,l,i),je=es(re[re.length-1],l,i)-Ge,rr=(Q={})=>{const te=Po(Q),se={onMouseDown:We(te||{})},fe={...te,...se};return{...Q,ref:he,...fe}},Da=Q=>te=>{var fe;(fe=Q.onMouseOver)==null||fe.call(Q,te);const se=Number(te.currentTarget.getAttribute("data-index"));T(se)},La=Q=>te=>{var se;(se=Q.onMouseLeave)==null||se.call(Q,te),T(-1)},Ba=(Q={})=>{const te=Po(Q),se={onMouseOver:Da(te||{}),onMouseLeave:La(te||{})};return{...Q,...te,...se}},Fa=Q=>({pointerEvents:O!==-1&&O!==Q?"none":void 0});let Gr;return h==="vertical"&&(Gr=o?"vertical-rl":"vertical-lr"),{active:O,axis:X,axisProps:G5,dragging:E,focusedThumbIndex:le,getHiddenInputProps:(Q={})=>{const te=Po(Q),se={onChange:rt(te||{}),onFocus:Ae(te||{}),onBlur:ze(te||{}),onKeyDown:lt(te||{})},fe={...te,...se};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(i),"aria-valuemin":f(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Q,...fe,style:{...D5,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:Gr}}},getRootProps:rr,getThumbProps:Ba,marks:ae,open:C,range:ne,rootRef:he,trackLeap:je,trackOffset:Ge,values:re,getThumbStyle:Fa}}function Ro(e){return typeof e=="string"}const W5=e=>!e||!Ro(e);function J5(e){return typeof e.main=="string"}function Y5(e,t=[]){if(!J5(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Ec(e=[]){return([,t])=>t&&Y5(t,e)}function K5(e){return On("MuiSlider",e)}const bt=Vl("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Q5=e=>{const{open:t}=e;return{offset:Pt(t&&bt.valueLabelOpen),circle:bt.valueLabelCircle,label:bt.valueLabelLabel}};function Gf(e){const{children:t,className:r,value:n}=e,a=Q5(e);return t?N.cloneElement(t,{className:t.props.className},g.jsxs(N.Fragment,{children:[t.props.children,g.jsx("span",{className:Pt(a.offset,r),"aria-hidden":!0,children:g.jsx("span",{className:a.circle,children:g.jsx("span",{className:a.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Gf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function kh(e){return e}const X5=pt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${et(r.color)}`],r.size!=="medium"&&t[`size${et(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(Lr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${bt.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${bt.dragging}`]:{[`& .${bt.thumb}, & .${bt.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Ec()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),Z5=pt("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),e3=pt("span",{name:"MuiSlider",slot:"Track"})(Lr(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Ec()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:da(e.palette[t].main,.62),borderColor:da(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:ua(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:ua(e.palette[t].main,.5)})}}}))]}))),t3=pt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${et(r.color)}`],r.size!=="medium"&&t[`thumbSize${et(r.size)}`]]}})(Lr(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${bt.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Ec()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${bt.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Gi(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${bt.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Gi(e.palette[t].main,.16)}`}}}}))]}))),Hf=pt(Gf,{name:"MuiSlider",slot:"ValueLabel"})(Lr(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${bt.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${bt.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(Hf.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const r3=pt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>kl(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(Lr(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),n3=pt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>kl(e)&&e!=="markLabelActive"})(Lr(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),a3=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:o,classes:s,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",i&&`color${et(i)}`,l&&`size${et(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${et(l)}`,i&&`thumbColor${et(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return ts(c,K5,s)},o3=({children:e})=>e,qf=N.forwardRef(function(t,r){const n=Sc({props:t,name:"MuiSlider"}),a=g0(),{"aria-label":o,"aria-valuetext":s,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:b,getAriaValueText:S,marks:_=!1,max:w=100,min:O=0,name:A,onChange:C,onChangeCommitted:T,orientation:E="horizontal",shiftStep:V=10,size:y="medium",step:P=1,scale:z=kh,slotProps:M,slots:G,tabIndex:ne,track:re="normal",value:ae,valueLabelDisplay:ee="off",valueLabelFormat:le=kh,...J}=n,Z={...n,isRtl:a,max:w,min:O,classes:h,disabled:m,disableSwap:f,orientation:E,marks:_,color:d,size:y,step:P,shiftStep:V,scale:z,track:re,valueLabelDisplay:ee,valueLabelFormat:le},{axisProps:he,getRootProps:Ae,getHiddenInputProps:ze,getThumbProps:Ce,open:lt,active:rt,axis:be,focusedThumbIndex:X,range:oe,dragging:ce,marks:Y,values:xe,trackOffset:me,trackLeap:We,getThumbStyle:Ge}=q5({...Z,rootRef:r});Z.marked=Y.length>0&&Y.some(Le=>Le.label),Z.dragging=ce,Z.focusedThumbIndex=X;const je=a3(Z),rr=(G==null?void 0:G.root)??c.Root??X5,Da=(G==null?void 0:G.rail)??c.Rail??Z5,La=(G==null?void 0:G.track)??c.Track??e3,Ba=(G==null?void 0:G.thumb)??c.Thumb??t3,Fa=(G==null?void 0:G.valueLabel)??c.ValueLabel??Hf,Gr=(G==null?void 0:G.mark)??c.Mark??r3,Na=(G==null?void 0:G.markLabel)??c.MarkLabel??n3,Q=(G==null?void 0:G.input)??c.Input??"input",te=(M==null?void 0:M.root)??u.root,se=(M==null?void 0:M.rail)??u.rail,fe=(M==null?void 0:M.track)??u.track,Oe=(M==null?void 0:M.thumb)??u.thumb,ie=(M==null?void 0:M.valueLabel)??u.valueLabel,He=(M==null?void 0:M.mark)??u.mark,Ze=(M==null?void 0:M.markLabel)??u.markLabel,Be=(M==null?void 0:M.input)??u.input,mt=sr({elementType:rr,getSlotProps:Ae,externalSlotProps:te,externalForwardedProps:J,additionalProps:{...W5(rr)&&{as:l}},ownerState:{...Z,...te==null?void 0:te.ownerState},className:[je.root,p]}),$n=sr({elementType:Da,externalSlotProps:se,ownerState:Z,className:je.rail}),sg=sr({elementType:La,externalSlotProps:fe,additionalProps:{style:{...he[be].offset(me),...he[be].leap(We)}},ownerState:{...Z,...fe==null?void 0:fe.ownerState},className:je.track}),Js=sr({elementType:Ba,getSlotProps:Ce,externalSlotProps:Oe,ownerState:{...Z,...Oe==null?void 0:Oe.ownerState},className:je.thumb}),ig=sr({elementType:Fa,externalSlotProps:ie,ownerState:{...Z,...ie==null?void 0:ie.ownerState},className:je.valueLabel}),Ys=sr({elementType:Gr,externalSlotProps:He,ownerState:Z,className:je.mark}),Ks=sr({elementType:Na,externalSlotProps:Ze,ownerState:Z,className:je.markLabel}),lg=sr({elementType:Q,getSlotProps:ze,externalSlotProps:Be,ownerState:Z});return g.jsxs(rr,{...mt,children:[g.jsx(Da,{...$n}),g.jsx(La,{...sg}),Y.filter(Le=>Le.value>=O&&Le.value<=w).map((Le,Je)=>{const Qs=es(Le.value,O,w),za=he[be].offset(Qs);let Bt;return re===!1?Bt=xe.includes(Le.value):Bt=re==="normal"&&(oe?Le.value>=xe[0]&&Le.value<=xe[xe.length-1]:Le.value<=xe[0])||re==="inverted"&&(oe?Le.value<=xe[0]||Le.value>=xe[xe.length-1]:Le.value>=xe[0]),g.jsxs(N.Fragment,{children:[g.jsx(Gr,{"data-index":Je,...Ys,...!Ro(Gr)&&{markActive:Bt},style:{...za,...Ys.style},className:Pt(Ys.className,Bt&&je.markActive)}),Le.label!=null?g.jsx(Na,{"aria-hidden":!0,"data-index":Je,...Ks,...!Ro(Na)&&{markLabelActive:Bt},style:{...za,...Ks.style},className:Pt(je.markLabel,Ks.className,Bt&&je.markLabelActive),children:Le.label}):null]},Je)}),xe.map((Le,Je)=>{const Qs=es(Le,O,w),za=he[be].offset(Qs),Bt=ee==="off"?o3:Fa;return g.jsx(Bt,{...!Ro(Bt)&&{valueLabelFormat:le,valueLabelDisplay:ee,value:typeof le=="function"?le(z(Le),Je):le,index:Je,open:lt===Je||rt===Je||ee==="on",disabled:m},...ig,children:g.jsx(Ba,{"data-index":Je,...Js,className:Pt(je.thumb,Js.className,rt===Je&&je.active,X===Je&&je.focusVisible),style:{...za,...Ge(Je),...Js.style},children:g.jsx(Q,{"data-index":Je,"aria-label":b?b(Je):o,"aria-valuenow":z(Le),"aria-labelledby":i,"aria-valuetext":S?S(z(Le),Je):s,value:xe[Je],...lg})})},Je)})]})});process.env.NODE_ENV!=="production"&&(qf.propTypes={"aria-label":_h(x.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-label"]!=null?new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":x.string,"aria-valuetext":_h(x.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-valuetext"]!=null?new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),children:x.node,classes:x.object,className:x.string,color:x.oneOfType([x.oneOf(["primary","secondary","error","info","success","warning"]),x.string]),components:x.shape({Input:x.elementType,Mark:x.elementType,MarkLabel:x.elementType,Rail:x.elementType,Root:x.elementType,Thumb:x.elementType,Track:x.elementType,ValueLabel:x.elementType}),componentsProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),defaultValue:x.oneOfType([x.arrayOf(x.number),x.number]),disabled:x.bool,disableSwap:x.bool,getAriaLabel:x.func,getAriaValueText:x.func,marks:x.oneOfType([x.arrayOf(x.shape({label:x.node,value:x.number.isRequired})),x.bool]),max:x.number,min:x.number,name:x.string,onChange:x.func,onChangeCommitted:x.func,orientation:x.oneOf(["horizontal","vertical"]),scale:x.func,shiftStep:x.number,size:x.oneOfType([x.oneOf(["small","medium"]),x.string]),slotProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),slots:x.shape({input:x.elementType,mark:x.elementType,markLabel:x.elementType,rail:x.elementType,root:x.elementType,thumb:x.elementType,track:x.elementType,valueLabel:x.elementType}),step:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),tabIndex:x.number,track:x.oneOf(["inverted","normal",!1]),value:x.oneOfType([x.arrayOf(x.number),x.number]),valueLabelDisplay:x.oneOf(["auto","off","on"]),valueLabelFormat:x.oneOfType([x.func,x.string])});var s3="[object Number]";function i3(e){return typeof e=="number"||Ir(e)&&Br(e)==s3}const Wf=ye.observer(e=>{var o,s,i;const t=R.useTheme(),{store:r}=e,{t:n}=Re.useTranslation();function a(l,c){c===e.velocity||!i3(c)||e.onVelocityChange(c)}return g.jsxs(R.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(R.Typography,{sx:{color:(i=(s=(o=t.componentsExt)==null?void 0:o.JoggingPanel)==null?void 0:s.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(qf,{value:e.velocity,color:"secondary",onChange:a,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),r.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):g.jsx(Ic,{value:e.velocity.toString()}))]})});function Ic({value:e,sx:t}){var n;const r=R.useTheme();return g.jsx(R.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(n=r.palette.backgroundPaperElevation)==null?void 0:n[8],borderRadius:"10px",minWidth:"111px",...t},children:g.jsx(R.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Jf=ye.observer(({store:e})=>{const{t}=Re.useTranslation(),r=ye.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?n=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:n})}`:n=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:n})}`}}));return g.jsx(Wf,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(Ic,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),l3=ye.observer(({store:e,children:t})=>{const{t:r}=Re.useTranslation(),n=R.useTheme();function a(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Em(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}&response_coordinate_system=${e.selectedCoordSystemId}`))},{fireImmediately:!0});async function o(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,b=f.motionStream.rapidlyChangingMotionState.state.joint_position;m&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:b,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:Tr.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function s(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return o(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.startTCPTranslation({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,p,f){var b,S,_;const m=(_=(S=(b=f.componentsExt)==null?void 0:b.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:_.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(uI,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(hI,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(mI,{}),colors:l("Z",e.selectedCartesianMotionType,n)}];function u(h){return r("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return r("General.degree.variable",{amount:Tr.radiansToDegrees(h).toFixed(1)})}return g.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(R.Stack,{gap:2,children:[g.jsx(V5,{store:e}),g.jsx(Jf,{store:e}),g.jsx(R.Divider,{})]}),g.jsx(R.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(R.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(M5,{value:e.selectedCartesianMotionType,onChange:a,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(R.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(R.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(ol,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[h.icon,g.jsx(R.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m;return u(((m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.position[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(ol,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[g.jsx(gI,{}),g.jsx(R.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,b;return d(((b=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:b[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx($f,{store:e}),t&&g.jsx(R.Divider,{}),t]})}),c3=ye.observer(({store:e,children:t})=>{const r=R.useTheme();async function n(o){await e.activate(),await e.jogger.startJointRotation({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function a(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Jf,{store:e}),g.jsx(R.Divider,{}),g.jsx(R.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(R.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(o=>{var c;const s=(c=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:c[o.index],i=(s==null?void 0:s.lower_limit)!==void 0?Tr.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?Tr.radiansToDegrees(s.upper_limit):void 0;return g.jsxs(R.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(R.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${o.index+1}`}),g.jsx(Mm,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return u!==void 0?Tr.radiansToDegrees(u):void 0},startJogging:u=>n({joint:o.index,direction:u}),stopJogging:a})]},`joint-${o.index}`)})})}),g.jsx($f,{store:e}),t&&g.jsx(R.Divider,{}),t]})}),u3=Ke(ye.observer(e=>{const t=_l.isString(e.nova)?new oI({instanceUrl:e.nova}):e.nova,r=ye.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){ke.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let a=e.store;if(!a){const o=await t.connectJogger(e.motionGroupId);a=await Ws.loadFor(o)}ke.runInAction(()=>{r.joggingStore=a}),e.onSetup&&e.onSetup(a)}catch(a){r.loadingError=a}}return W.useEffect(()=>(n(),e.store?()=>null:()=>{var a;(a=r.joggingStore)==null||a.dispose()}),[e.store,e.nova,e.motionGroupId]),W.useEffect(()=>{const a=r.joggingStore;a&&(e.locked?a.lock("external"):a.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(R.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(d3,{store:r.joggingStore,children:e.children}):g.jsx(Tc,{message:"Loading jogging",error:r.loadingError})})})),d3=ye.observer(({store:e,children:t})=>{const{t:r}=Re.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(l3,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(c3,{store:e,children:t})})}return g.jsxs(R.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(R.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(a=>{const o=a.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),s=a.label==="cartesian"?g.jsx(DO,{fontSize:"small",sx:{mr:1}}):g.jsx(LO,{fontSize:"small",sx:{mr:1}});return g.jsx(R.Tab,{label:e.showTabIcons?g.jsxs(R.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${a.id}`,"aria-controls":`jogging-tab-${a.id}`},a.id)})}),g.jsx(R.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),Yf=e=>{var i;const{value:t,ref:r}=e,n=R.useTheme(),[a,o]=W.useState(!1);async function s(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),o(!0),!0}catch(l){console.error(l);const c=window.getSelection();if(c&&r&&"current"in r&&r.current){const u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}}return!1}return W.useEffect(()=>{if(!a)return;const l=setTimeout(()=>o(!1),3e3);return()=>{l&&clearTimeout(l)}},[a]),g.jsx(R.Tooltip,{open:a,title:"Copied!",children:g.jsx(R.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(i=n.palette.backgroundPaperElevation)==null?void 0:i[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>s(),children:g.jsx(R.Typography,{ref:r,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:n.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})};function h3(e,t){if(e)return e;if(t)return{rapidlyChangingMotionState:t.rapidlyChangingMotionState}}const p3=ye.observer(({motionStream:e,connectedMotionGroup:t,showCopyButton:r=!1})=>{const n=W.useRef(null),[a,o]=W.useState(""),s=h3(e,t);if(!s)throw new Error("PoseCartesianValues requires either motionStream or connectedMotionGroup prop");function i(){if(!s)return"";const c=s.rapidlyChangingMotionState.tcp_pose;return c?Tr.poseToWandelscriptString(c):""}const l=async()=>{try{await navigator.clipboard.writeText(i()),o("Copied!"),setTimeout(()=>o(""),2e3)}catch{o("Copy failed"),setTimeout(()=>o(""),2e3)}};return An(()=>{if(!n.current)return;const c=i();n.current.textContent!==c&&(n.current.textContent=c)}),g.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:[g.jsx(Yf,{value:i(),ref:n}),r&&g.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:l,sx:{flexShrink:0},children:"Copy"}),a&&g.jsx(R.Typography,{variant:"caption",color:"success.main",children:a})]})});function m3(e,t){if(e)return e;if(t)return{rapidlyChangingMotionState:t.rapidlyChangingMotionState}}const f3=ye.observer(({motionStream:e,connectedMotionGroup:t,showCopyButton:r=!1})=>{const n=W.useRef(null),[a,o]=W.useState(""),s=m3(e,t);if(!s)throw new Error("PoseJointValues requires either motionStream or connectedMotionGroup prop");function i(){if(!s)return"";const{joints:c}=s.rapidlyChangingMotionState.state.joint_position;return`[${c.map(u=>parseFloat(u.toFixed(4))).join(", ")}]`}const l=async()=>{try{await navigator.clipboard.writeText(i()),o("Copied!"),setTimeout(()=>o(""),2e3)}catch{o("Copy failed"),setTimeout(()=>o(""),2e3)}};return An(()=>{if(!n.current)return;const c=i();n.current.textContent!==c&&(n.current.textContent=c)}),g.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:[g.jsx(Yf,{value:i(),ref:n}),r&&g.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:l,sx:{flexShrink:0},children:"Copy"}),a&&g.jsx(R.Typography,{variant:"caption",color:"success.main",children:a})]})});class Kf{constructor(){this.messages=[],this.addMessage=(t,r="info")=>{const n={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:r};this.messages.push(n)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},ke.makeObservable(this,{messages:ke.observable,addMessage:ke.action,clearMessages:ke.action})}}const Ua=(e,t,r)=>({id:r||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),g3=(e,t)=>Ua(e,"debug",t),y3=(e,t)=>Ua(e,"info",t),b3=(e,t)=>Ua(e,"warning",t),x3=(e,t)=>Ua(e,"error",t),Qf=Ke(ye.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:a}=e,o=R.useTheme(),s=W.useRef(null);W.useEffect(()=>{if(t.length===0)return;const d=s.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const i=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return o.palette.error.main;case"warning":return o.palette.warning.main;case"info":return o.palette.info.main;case"debug":return o.palette.text.disabled;default:return o.palette.text.secondary}},c=({message:d})=>{const[h,p]=W.useState(!1),[f,m]=W.useState(!1),[b,S]=W.useState(!1),_=d.message.length>150,w=async()=>{try{await navigator.clipboard.writeText(d.message),m(!0),setTimeout(()=>m(!1),2e3)}catch(A){console.error("Failed to copy message:",A)}},O=_&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(R.Box,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:o.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxs(R.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:o.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:l(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:O}),g.jsxs(R.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:b?1:0,transition:"opacity 0.2s ease-in-out",visibility:b?"visible":"hidden"},children:[g.jsx(R.IconButton,{size:"small",onClick:w,sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:f?"Copied!":"Copy message",children:g.jsx(zt.ContentCopy,{sx:{fontSize:12}})}),_&&g.jsx(R.IconButton,{size:"small",onClick:()=>p(!h),sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsx(zt.ExpandLess,{sx:{fontSize:12}}):g.jsx(zt.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(R.Paper,{sx:{backgroundColor:((u=o.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:n,display:"flex",flexDirection:"column",overflow:"hidden",...a},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(zt.DescriptionOutlined,{sx:{fontSize:16,color:o.palette.action.active,opacity:.56}}),g.jsx(R.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:o.palette.text.primary},children:"Log"})]}),g.jsx(R.Button,{onClick:r,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:o.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:o.palette.primary.main+"14"}},children:"Clear"})]}),g.jsx(R.Box,{ref:s,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${o.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:o.palette.divider}}},children:t.length===0?g.jsx(R.Typography,{sx:{color:o.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>g.jsx(c,{message:d},d.id))})]})})),v3=Ke(ye.observer(e=>{const{store:t,onStoreReady:r,...n}=e,a=W.useRef(r);W.useEffect(()=>{a.current=r},[r]);const o=W.useMemo(()=>{var l;const i=t||new Kf;return(l=a.current)==null||l.call(a,i),i},[t]),s=()=>{o.clearMessages()};return g.jsx(Qf,{...n,messages:o.messages,onClear:s})}));function S3(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function w3({baseUrl:e=S3(),...t}){return g.jsxs(R.Dialog,{"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:[g.jsx(R.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(R.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(R.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(R.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(R.DialogActions,{children:g.jsxs(R.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(R.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(R.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var Sr=(e=>(e.IDLE="idle",e.RUNNING="running",e.PAUSED="paused",e.STOPPING="stopping",e.ERROR="error",e))(Sr||{});const C3=Ke(ye.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:a,requiresManualReset:o=!1,variant:s="with_pause",className:i})=>{const l=R.useTheme(),{t:c}=Re.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="paused"||e==="error",label:c(e==="paused"?"ProgramControl.Resume.bt":e==="error"?"ProgramControl.Retry.bt":"ProgramControl.Start.bt"),color:l.palette.success.main,onClick:t},pause:{enabled:e==="running",label:c("ProgramControl.Pause.bt"),color:"#FFFFFF33",onClick:r||(()=>{})},stop:{enabled:e==="running"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return s==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(s==="without_pause")return p===0?g.jsx(zt.PlayArrow,{...f}):g.jsx(zt.Stop,{...f});switch(p){case 0:return g.jsx(zt.PlayArrow,{...f});case 1:return g.jsx(zt.Pause,{...f});case 2:return g.jsx(zt.Stop,{...f});default:return null}},h=u();return g.jsx(R.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(R.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(R.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(R.Button,{variant:"contained",disabled:!p.enabled||e==="stopping"&&!o,onClick:p.onClick,sx:{width:"88px",height:"88px",borderRadius:"88px",backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!o)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!o)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"88px",flexShrink:0},children:d(f)}),g.jsx(R.Typography,{variant:"body1",sx:{color:p.enabled&&!(e==="stopping"&&!o)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&!(e==="stopping"&&!o)?1:.3},children:p.label})]},p.label))})})})),Rl=Ke(ye.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const a=R.useTheme(),{t:o}=Re.useTranslation(),s=()=>{if(t==="SAFETY_STATE_DEVICE_EMERGENCY_STOP"||t==="SAFETY_STATE_ROBOT_EMERGENCY_STOP"||t==="SAFETY_STATE_STOP_0"||t==="SAFETY_STATE_STOP_1"||t==="SAFETY_STATE_STOP_2"||t==="SAFETY_STATE_PROTECTIVE_STOP"||t==="SAFETY_STATE_STOP"||t==="SAFETY_STATE_REDUCED"||t==="SAFETY_STATE_MASTERING"||t==="SAFETY_STATE_CONFIRM_SAFETY"||t==="SAFETY_STATE_OPERATOR_SAFETY"||t==="SAFETY_STATE_RECOVERY"||t==="SAFETY_STATE_VIOLATION")return{label:o("ProgramStateIndicator.EStop.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:o("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case Sr.RUNNING:return{label:o("ProgramStateIndicator.Running.lb"),color:a.palette.success.main};case Sr.PAUSED:return{label:o("ProgramStateIndicator.Paused.lb"),color:a.palette.grey[600]};case Sr.STOPPING:return{label:o("ProgramStateIndicator.Stopped.lb"),color:a.palette.error.main};case Sr.ERROR:return{label:o("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};case Sr.IDLE:default:return{label:o("ProgramStateIndicator.Ready.lb"),color:a.palette.success.main}}return{label:o("ProgramStateIndicator.Idle.lb"),color:a.palette.grey[600]}},{label:i,color:l}=s(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return o("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return o("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return o("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return o("ProgramStateIndicator.ManualT2.lb");default:return o("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(R.Chip,{className:n,label:g.jsx(R.Typography,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:u}),variant:"filled",sx:{backgroundColor:l,color:a.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),$h="0.0.0-semantically-released";function Vc(e){let t=$h;return $h.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function O3(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Zf(r))}function Xf(e){return e.name.endsWith("_FLG")}function Zf(e){return/_J[0-9]+$/.test(e.name)}function T3(e,t){let r;function n(a){if(Xf(a)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${a.name}. Only one _FLG group is allowed.`);r=a}Zf(a),a.children.map(n)}if(n(e.scene),!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function eg({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const a=W.useRef([]),o=W.useRef([]),s=W.useRef(null),{invalidate:i}=Ao.useThree();W.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return s.current=new vc(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=s.current)==null||h.destroy()}},[]),Ao.useFrame((d,h)=>{if(s.current){const p=s.current.update(h);u(),p||i()}});function l(d){d&&(o.current=O3(d),u(),i())}function c(d){var h;a.current=d,(h=s.current)==null||h.setTarget(d)}function u(){var h;const d=((h=s.current)==null?void 0:h.getCurrentValues())||[];if(r)r(o.current,d);else for(const[p,f]of o.current.entries()){const m=t[p],b=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+b}}return _m(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const P3="line",R3="mesh";function A3({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new Ct.Matrix4,a=W.useRef([]),o=W.useRef([]);W.useEffect(()=>{a.current=new Array(t.length).fill(null),o.current=new Array(t.length).fill(null)},[t.length]);function s(c,u){const d=new Ct.Vector3,h=new Ct.Quaternion,p=new Ct.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new Ct.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new Ct.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new Ct.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new Ct.Matrix4().makeRotationX(c.alpha));return n.multiply(m),n.decompose(d,h,p),{a:f,b:d}}function i(c,u,d,h){if(!t)return;const p=t[c];if(!p)return;const{a:f,b:m}=s(p,h);u.geometry.setPositions([f.toArray(),m.toArray()].flat()),d.position.set(m.x,m.y,m.z)}function l(c,u){n.identity();for(let d=0;d<Math.min(c.length,u.length);d++){const h=a.current[d],p=o.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(eg,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:l,children:g.jsxs("group",{...r,name:"Scene",children:[g.jsxs("mesh",{children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((c,u)=>{const{a:d,b:h}=s(c,e.state.joint_position.joints[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(ut.Line,{ref:f=>{a.current[u]=f},name:P3,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{o.current[u]=f},name:R3,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const _3=console.warn;function E3(){return W.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&_3(e)}},[]),g.jsx(g.Fragment,{})}function I3(e){return e.type==="Mesh"}function V3({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:a}=T3(ut.useGLTF(e),e.split("/").pop()||e),o=W.useCallback(i=>{i&&r&&r()},[e]);function s(i){return I3(i)?g.jsx("mesh",{name:i.name,geometry:i.geometry,material:i.material,position:i.position,rotation:i.rotation},i.uuid):g.jsx("group",{name:i.name,position:i.position,rotation:i.rotation,ref:Xf(i)?t:void 0,children:i.children.map(s)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:o,children:s(a.scene)})}const M3=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof ve.Mesh){r.material instanceof ve.Material&&(r.material.colorWrite=!1);const n=r.clone(),a=r.clone();n.material=new ve.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:ve.DoubleSide}),n.userData.isGhost=!0,a.material=new ve.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:ve.DoubleSide}),a.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(a))}}),e.userData.isGhost=!0)},j3=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof ve.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof ve.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},tg=Ke(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Vc,flangeRef:a,postModelRender:o,transparentColor:s,...i})=>{const[l,c]=W.useState(null),u=W.useCallback(h=>{c(h)},[]);W.useEffect(()=>{l&&(s?M3(l,s):j3(l))},[l,s]);const d=g.jsx(A3,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(vg.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(W.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(eg,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(V3,{modelURL:n(t),postModelRender:o,flangeRef:a,...i})})})}),g.jsx(E3,{})]})});function rg({connectedMotionGroup:e,getModel:t=Vc,flangeRef:r,transparentColor:n,postModelRender:a,...o}){return e.dhParameters?g.jsx(tg,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:a,...o}):null}const k3=Ke(ye.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:a=!1,onDriveToHomePress:o,onDriveToHomeRelease:s,connectedMotionGroup:i,robotComponent:l=rg,customContentComponent:c,className:u})=>{var M;const d=R.useTheme(),{t:h}=Re.useTranslation(),[p,f]=W.useState(!1),m=W.useRef(null),b=W.useRef(null),[S,_]=W.useState(!1),[w,O]=W.useState({width:400,height:600}),[A,C]=W.useState(0);W.useEffect(()=>{const G=()=>{if(b.current){const{offsetWidth:re,offsetHeight:ae}=b.current;_(re>ae),O({width:re,height:ae})}};G();const ne=new ResizeObserver(G);return b.current&&ne.observe(b.current),()=>{ne.disconnect()}},[]);const T=W.useCallback(()=>{C(G=>G+1)},[]),E=W.useCallback(()=>{!a||!o||(f(!0),o())},[a,o]),V=W.useCallback(()=>{!a||!s||(f(!1),s())},[a,s]),y=W.useCallback(()=>{p&&s&&(f(!1),s())},[p,s]),P=S?w.width<350:w.height<200,z=S?w.height<310:w.height<450;return g.jsx(R.Card,{ref:b,className:u,sx:{width:"100%",height:"100%",display:"flex",flexDirection:S?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:S?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${d.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((M=d.palette.backgroundPaperElevation)==null?void 0:M[8])||"#2A2A3F",backgroundImage:"none"},children:S?g.jsxs(g.Fragment,{children:[g.jsx(R.Box,{sx:{flex:"0 0 50%",position:"relative",height:"100%",minHeight:"100%",maxHeight:"100%",borderRadius:1,m:{xs:1.5,sm:2,md:3},mr:{xs:.75,sm:1,md:1.5},overflow:"hidden",display:P?"none":"block"},children:!P&&g.jsxs(Ao.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(Ni,{}),g.jsx(ut.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:T})})]})}),g.jsxs(R.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:P?"100%":"50%"},children:[g.jsxs(R.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(R.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Rl,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(R.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!z&&c&&g.jsxs(R.Box,{children:[g.jsx(c,{}),g.jsx(R.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(R.Box,{sx:{mt:!z&&c?"auto":0},children:g.jsx(R.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:1.5,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(R.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:E,onMouseUp:V,onMouseLeave:y,onTouchStart:E,onTouchEnd:V,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(R.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(R.Box,{children:[g.jsx(R.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Rl,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(R.Box,{sx:{flex:P?0:1,position:"relative",minHeight:P?0:{xs:120,sm:150,md:200},height:P?0:"auto",borderRadius:1,overflow:"hidden",display:P?"none":"block"},children:!P&&g.jsxs(Ao.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(Ni,{}),g.jsx(ut.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:T})})]})}),g.jsxs(R.Box,{children:[!z&&c&&g.jsxs(g.Fragment,{children:[g.jsx(c,{}),g.jsx(R.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(R.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:!z&&c?{xs:1,sm:2,md:5}:{xs:.5,sm:1,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(R.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:E,onMouseUp:V,onMouseLeave:y,onTouchStart:E,onTouchEnd:V,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})]})]})})})})),$3=gr(g.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),U3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#38C6F4",fillRule:"evenodd",d:"M6.359 14.25v2.934h7.63v-3.521L10.196 9.87 9 8.674l.859-.859.337-.337.858-.858.565.565.631.63.565.565 1.196-1.195.543-.544 1.196-1.195-1.196-1.196-2.304-2.304L11.054.75 9.86 1.946 3.446 8.359 2.25 9.554l1.196 1.196 2.913 2.913zm1.69 0v1.244h4.249v-1.13L7.804 9.87 6.608 8.674l1.196-1.196L9.86 5.424l.007-.008-.543-.543-4.681 4.681 2.912 2.913.496.496v.113h2.124l1.174 1.174zm3.005-10.022-.294.294-.543-.543.837-.837 2.304 2.304-.543.543-.565-.565z",clipRule:"evenodd"})),D3=W.forwardRef(U3);var Mc=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.READY="READY",e))(Mc||{});const ng=Ke(ye.observer(({setupState:e,className:t})=>{const r=R.useTheme(),{t:n}=Re.useTranslation(),a=()=>{var c,u,d,h;switch(e){case"READY":return{label:n("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=r.palette.tertiary)==null?void 0:c.main)||r.palette.primary.main,backgroundColor:((u=r.palette.backgroundPaperElevation)==null?void 0:u[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:n("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:r.palette.error.main,backgroundColor:((d=r.palette.backgroundPaperElevation)==null?void 0:d[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:r.palette.error.main,backgroundColor:((h=r.palette.backgroundPaperElevation)==null?void 0:h[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText}}},{label:o,indicatorColor:s,backgroundColor:i,textColor:l}=a();return g.jsx(R.Chip,{className:t,label:g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(R.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),g.jsx(R.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:o})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),L3=Ke(ye.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=ng,className:a})=>{var l;const o=R.useTheme(),s=t||"Robot",i=r===Mc.READY;return g.jsxs(R.Box,{className:a,sx:{border:`1px solid ${o.palette.divider}`,background:((l=o.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(R.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${o.palette.primary.main} !important`},"& svg path":{fill:`${o.palette.primary.main} !important`}},children:g.jsx(D3,{})}):g.jsx($3,{sx:{color:o.palette.error.main,fontSize:24}}),g.jsx(R.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(R.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),n&&g.jsx(n,{setupState:r})]})})),B3=Array(6).fill(2*Math.PI),Al={[jt.Abb]:[0,0,0,0,Math.PI/2,0,0],[jt.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[jt.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[jt.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[jt.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function ag(e){const[t]=e.split("_");switch(t){case"ABB":return jt.Abb;case"FANUC":return jt.Fanuc;case"YASKAWA":return jt.Yaskawa;case"KUKA":return jt.Kuka;case"UniversalRobots":return jt.Universalrobots;default:return null}}function F3(e,t){const r=ag(e);return r&&r in Al?Al[r]:t||null}const N3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),z3=W.forwardRef(N3),G3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),H3=W.forwardRef(G3),kt=ye.observer(({id:e,icon:t,color:r,title:n,name:a,label:o,explanation:s,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=ye.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return g.jsxs(g.Fragment,{children:[g.jsxs(R.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[g.jsx(R.SvgIcon,{component:t,sx:{color:r}}),o&&g.jsx("div",{style:{color:r},children:o})]}),g.jsx(R.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:g.jsxs(R.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(R.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(R.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:a})]}),g.jsx(R.Typography,{fontSize:"14px",children:s}),i&&g.jsx(R.Typography,{fontSize:"12px",children:i})]})})]})}),q3=ye.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:a})=>{const o=R.useTheme(),{t:s}=Re.useTranslation();return e?g.jsx(kt,{id:"motion-group-virtual",icon:H3,color:o.palette.tertiary.main,name:s("SafetyBar.ControllerType.Virtual.lb"),label:a?null:s("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(Re.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",g.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):g.jsx(kt,{id:"motion-group-physical",icon:z3,color:o.palette.primary.main,name:s("SafetyBar.ControllerType.Physical.lb"),label:a?null:s("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),W3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),J3=W.forwardRef(W3),Y3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),K3=W.forwardRef(Y3),Q3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),X3=W.forwardRef(Q3),Z3=ye.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Re.useTranslation(),o=R.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(kt,{id:"operation-mode-auto",icon:J3,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Automatic.ti"),label:n?null:a("SafetyBar.OperationMode.Automatic.ti"),color:o.palette.text.secondary,explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return g.jsx(kt,{id:"operation-mode-manual",icon:X3,color:o.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Manual.lb"),label:n?null:a("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"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."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:return g.jsx(kt,{id:"operation-mode-error",icon:K3,color:o.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Error.lb"),label:n?null:a("SafetyBar.OperationMode.Error.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:r})}}),ej=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),tj=W.forwardRef(ej),rj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),nj=W.forwardRef(rj),aj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),oj=W.forwardRef(aj),sj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),ij=W.forwardRef(sj),lj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),cj=W.forwardRef(lj),uj=ye.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Re.useTranslation(),o=R.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(kt,{id:"safety-state-normal",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Normal.lb"),label:n?null:a("SafetyBar.SafetyState.Normal.lb"),icon:ij,color:o.palette.text.secondary,explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return g.jsx(kt,{id:"safety-state-estop",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Estop.lb"),label:n?null:a("SafetyBar.SafetyState.Estop.lb"),icon:nj,color:o.palette.error.main,explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return g.jsx(kt,{id:"safety-state-stop",icon:cj,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Stop.lb"),label:n?null:a("SafetyBar.SafetyState.Stop.lb"),color:o.palette.warning.main,explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return g.jsx(kt,{id:"safety-state-manual-action-required",icon:oj,color:o.palette.warning.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:a("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return g.jsx(kt,{id:"safety-state-error",icon:tj,color:o.palette.error.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Error.lb"),label:n?null:a("SafetyBar.SafetyState.Error.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:iI(e,`Unknown safety state ${e}`)}}),dj=Ke(ye.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s=!0})=>{const i=s?1:2;return g.jsxs(R.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(uj,{safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(Z3,{operationMode:r,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(q3,{isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:o,compact:s})]})})),hj=R.styled(R.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:a})=>!a,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:a})=>a,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),pj=e=>{const{ref:t,...r}=e;return g.jsx(hj,{ref:t,selected:e.selected,...r,color:"secondary",variant:"circular"})};function mj(e){const{children:t,value:r,index:n,...a}=e;return g.jsx("div",{role:"tabpanel",hidden:r!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,...a,children:r===n&&g.jsx(R.Box,{children:t})})}const fj=Ke(ye.observer(e=>{const{items:t,defaultActiveTab:r=0,onTabChange:n,sx:a,ref:o}=e,[s,i]=W.useState(r),l=(c,u)=>{i(u),n==null||n(u)};return g.jsxs(R.Box,{ref:o,sx:{height:"100%",display:"flex",flexDirection:"column",...a},children:[g.jsx(R.Box,{sx:{px:0,py:0},children:g.jsx(R.Tabs,{value:s,onChange:l,sx:{minHeight:"32px",backgroundColor:"transparent","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2}},children:t.map((c,u)=>g.jsx(R.Tab,{label:c.label,icon:c.icon,iconPosition:"start",disableRipple:!0,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:d=>{var h;return((h=d.palette.backgroundPaperElevation)==null?void 0:h[11])||"#32344B"},color:"text.primary",opacity:s===u?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out","&:hover":{opacity:s===u?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:d=>{var h;return((h=d.palette.backgroundPaperElevation)==null?void 0:h[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},c.id))})}),g.jsx(R.Box,{sx:{mt:"32px",borderBottom:1,borderColor:"divider"}}),g.jsx(R.Box,{sx:{flex:1,overflow:"auto"},children:t.map((c,u)=>g.jsx(mj,{value:s,index:u,children:c.content},c.id))})]})})),gj={$schema:"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",name:"wandelscript",patterns:[{include:"#keywords"},{include:"#strings"},{include:"#comments"},{include:"#functions"}],repository:{keywords:{patterns:[{name:"keyword.control.flow.wandelscript",match:"\\b(move|via|to|interrupt|def|False|True|for|if|else|elif|while|return|switch|activate|deactivate|print|and|or|not)\\b"}]},strings:{name:"string.quoted.double.wandelscript",begin:'"',end:'"',patterns:[{name:"constant.character.escape.wandelscript",match:"\\\\."}]},comments:{patterns:[{begin:"#",beginCaptures:{0:{name:"punctuation.definition.comment.wandelscript"}},end:"$",name:"comment.line.number-sign.wandelscript"}]},functions:{patterns:[{match:"[a-zA-Z_-]+\\(",name:"entity.name.function.wandelscript"}]}},scopeName:"source.wandelscript"},yj=W.lazy(()=>import("@monaco-editor/react"));let Fi=null;async function bj(){if(!Fi){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);Fi={shiki:await e({langs:[gj],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return Fi}const xj=Ke(e=>{const t=R.useTheme(),[r,n]=W.useState("dark-plus"),a=t.palette.mode==="dark"?"dark-plus":"light-plus";async function o(s){var c,u;s.languages.register({id:"wandelscript"}),s.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await bj();l(i,s),s.editor.defineTheme(a,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(s),n(a)}return g.jsx(W.Suspense,{fallback:g.jsx(Tc,{}),children:g.jsx(yj,{value:e.code,onMount:(s,i)=>{o(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function og(){var t,r,n,a,o,s,i;const e=R.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`},".MuiDataGrid-panelContent":{borderRadius:"16px !important","& .MuiPaper-root":{borderRadius:"16px !important"}},".MuiDataGrid-filterForm":{borderRadius:"16px !important","& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}},"& .MuiTextField-root":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}},".MuiDataGrid-filterFormValueInput":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}}},MuiDataGrid:{styleOverrides:{root:{},panelContent:{borderRadius:"16px !important"},filterForm:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}},filterFormValueInput:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(a=e.palette.backgroundPaperElevation)==null?void 0:a[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(s=(o=e.paletteExt)==null?void 0:o.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":R.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function vj(){const e=og();return e.palette.mode="light",e}function Sj(e){var n,a,o,s;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((a=e.palette)==null?void 0:a.mode)!=="dark"&&(t=!(typeof window<"u"&&((s=(o=window.matchMedia)==null?void 0:o.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const r=t?og():vj();return op(r,e)}exports.AppHeader=Ug;exports.CollisionSceneRenderer=Ag;exports.CycleTimer=tO;exports.JoggingCartesianAxisControl=ol;exports.JoggingJointRotationControl=Mm;exports.JoggingPanel=u3;exports.JoggingStore=Ws;exports.LoadingCover=Tc;exports.LoadingErrorMessage=Tf;exports.LogPanel=v3;exports.LogStore=Kf;exports.LogViewer=Qf;exports.MANUFACTURER_HOME_CONFIGS=Al;exports.NoMotionGroupModal=w3;exports.PoseCartesianValues=p3;exports.PoseJointValues=f3;exports.PresetEnvironment=Ni;exports.ProgramControl=C3;exports.ProgramState=Sr;exports.ProgramStateIndicator=Rl;exports.Robot=rg;exports.RobotCard=k3;exports.RobotListItem=L3;exports.RobotSetupReadinessIndicator=ng;exports.RobotSetupReadinessState=Mc;exports.SafetyBar=dj;exports.SafetyZonesRenderer=Ig;exports.SelectableFab=pj;exports.SupportedRobot=tg;exports.TabBar=fj;exports.TrajectoryRenderer=Vg;exports.ValueInterpolator=vc;exports.VelocitySlider=Wf;exports.VelocitySliderLabel=Ic;exports.WandelbotsDataGrid=Am;exports.WandelscriptEditor=xj;exports.createDebugMessage=g3;exports.createErrorMessage=x3;exports.createInfoMessage=y3;exports.createLogMessage=Ua;exports.createNovaMuiTheme=Sj;exports.createWarningMessage=b3;exports.defaultAxisConfig=B3;exports.defaultGetModel=Vc;exports.extractManufacturer=ag;exports.getDefaultHomeConfig=F3;exports.i18n=El;exports.useAnimationFrame=An;exports.useAutorun=_m;exports.useInterpolation=Rm;exports.useMounted=Vs;exports.useReaction=Em;
|
|
154
|
+
`))}return!1}const D5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function L5(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const B5=2;function on(e,t,r,n,a){return r===1?Math.min(e+t,a):Math.max(e-t,n)}function zf(e,t){return e-t}function Vh(e,t){const{index:r}=e.reduce((n,a,o)=>{const s=Math.abs(t-a);return n===null||s<n.distance||s===n.distance?{distance:s,index:o}:n},null)??{};return r}function fo(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const a=r.changedTouches[n];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function es(e,t,r){return(e-t)*100/(r-t)}function F5(e,t,r){return(r-t)*e+t}function N5(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function z5(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(N5(t)))}function Mh({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(zf)}function go({sliderRef:e,activeIndex:t,setActive:r}){var a,o,s;const n=sa(e.current);(!((a=e.current)!=null&&a.contains(n.activeElement))||Number((o=n==null?void 0:n.activeElement)==null?void 0:o.getAttribute("data-index"))!==t)&&((s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function yo(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?L5(e,t):!1}const G5={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},H5=e=>e;let bo;function jh(){return bo===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?bo=CSS.supports("touch-action","none"):bo=!0),bo}function q5(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:o=!1,marks:s=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=H5,step:m=1,shiftStep:b=10,tabIndex:S,value:_}=e,w=N.useRef(void 0),[O,A]=N.useState(-1),[C,T]=N.useState(-1),[E,V]=N.useState(!1),y=N.useRef(0),P=N.useRef(null),[z,M]=oO({controlled:_,default:r??l,name:"Slider"}),G=u&&((Q,te,se)=>{const fe=Q.nativeEvent||Q,Oe=new fe.constructor(fe.type,fe);Object.defineProperty(Oe,"target",{writable:!0,value:{value:te,name:c}}),P.current=te,u(Oe,te,se)}),ne=Array.isArray(z);let re=ne?z.slice().sort(zf):[z];re=re.map(Q=>Q==null?l:sn(Q,l,i));const ae=s===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Q,te)=>({value:l+m*te})):s||[],ee=ae.map(Q=>Q.value),[le,J]=N.useState(-1),Z=N.useRef(null),he=ms(p,Z),Ae=Q=>te=>{var fe;const se=Number(te.currentTarget.getAttribute("data-index"));Ih(te.target)&&J(se),T(se),(fe=Q==null?void 0:Q.onFocus)==null||fe.call(Q,te)},ze=Q=>te=>{var se;Ih(te.target)||J(-1),T(-1),(se=Q==null?void 0:Q.onBlur)==null||se.call(Q,te)},Ce=(Q,te)=>{const se=Number(Q.currentTarget.getAttribute("data-index")),fe=re[se],Oe=ee.indexOf(fe);let ie=te;if(ae&&m==null){const He=ee[ee.length-1];ie>=He?ie=He:ie<=ee[0]?ie=ee[0]:ie=ie<fe?ee[Oe-1]:ee[Oe+1]}if(ie=sn(ie,l,i),ne){a&&(ie=sn(ie,re[se-1]||-1/0,re[se+1]||1/0));const He=ie;ie=Mh({values:re,newValue:ie,index:se});let Ze=se;a||(Ze=ie.indexOf(He)),go({sliderRef:Z,activeIndex:Ze})}M(ie),J(se),G&&!yo(ie,z)&&G(Q,ie,se),d&&d(Q,P.current??ie)},lt=Q=>te=>{var se;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(te.key)){te.preventDefault();const fe=Number(te.currentTarget.getAttribute("data-index")),Oe=re[fe];let ie=null;if(m!=null){const He=te.shiftKey?b:m;switch(te.key){case"ArrowUp":ie=on(Oe,He,1,l,i);break;case"ArrowRight":ie=on(Oe,He,o?-1:1,l,i);break;case"ArrowDown":ie=on(Oe,He,-1,l,i);break;case"ArrowLeft":ie=on(Oe,He,o?1:-1,l,i);break;case"PageUp":ie=on(Oe,b,1,l,i);break;case"PageDown":ie=on(Oe,b,-1,l,i);break;case"Home":ie=l;break;case"End":ie=i;break}}else if(ae){const He=ee[ee.length-1],Ze=ee.indexOf(Oe),Be=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Be.includes(te.key)?Ze===0?ie=ee[0]:ie=ee[Ze-1]:mt.includes(te.key)&&(Ze===ee.length-1?ie=He:ie=ee[Ze+1])}ie!=null&&Ce(te,ie)}(se=Q==null?void 0:Q.onKeyDown)==null||se.call(Q,te)};Ut(()=>{var Q;n&&Z.current.contains(document.activeElement)&&((Q=document.activeElement)==null||Q.blur())},[n]),n&&O!==-1&&A(-1),n&&le!==-1&&J(-1);const rt=Q=>te=>{var se;(se=Q.onChange)==null||se.call(Q,te),Ce(te,te.target.valueAsNumber)},be=N.useRef(void 0);let X=h;o&&h==="horizontal"&&(X+="-reverse");const oe=({finger:Q,move:te=!1})=>{const{current:se}=Z,{width:fe,height:Oe,bottom:ie,left:He}=se.getBoundingClientRect();let Ze;X.startsWith("vertical")?Ze=(ie-Q.y)/Oe:Ze=(Q.x-He)/fe,X.includes("-reverse")&&(Ze=1-Ze);let Be;if(Be=F5(Ze,l,i),m)Be=z5(Be,m,l);else{const $n=Vh(ee,Be);Be=ee[$n]}Be=sn(Be,l,i);let mt=0;if(ne){te?mt=be.current:mt=Vh(re,Be),a&&(Be=sn(Be,re[mt-1]||-1/0,re[mt+1]||1/0));const $n=Be;Be=Mh({values:re,newValue:Be,index:mt}),a&&te||(mt=Be.indexOf($n),be.current=mt)}return{newValue:Be,activeIndex:mt}},ce=qt(Q=>{const te=fo(Q,w);if(!te)return;if(y.current+=1,Q.type==="mousemove"&&Q.buttons===0){Y(Q);return}const{newValue:se,activeIndex:fe}=oe({finger:te,move:!0});go({sliderRef:Z,activeIndex:fe,setActive:A}),M(se),!E&&y.current>B5&&V(!0),G&&!yo(se,z)&&G(Q,se,fe)}),Y=qt(Q=>{const te=fo(Q,w);if(V(!1),!te)return;const{newValue:se}=oe({finger:te,move:!0});A(-1),Q.type==="touchend"&&T(-1),d&&d(Q,P.current??se),w.current=void 0,me()}),xe=qt(Q=>{if(n)return;jh()||Q.preventDefault();const te=Q.changedTouches[0];te!=null&&(w.current=te.identifier);const se=fo(Q,w);if(se!==!1){const{newValue:Oe,activeIndex:ie}=oe({finger:se});go({sliderRef:Z,activeIndex:ie,setActive:A}),M(Oe),G&&!yo(Oe,z)&&G(Q,Oe,ie)}y.current=0;const fe=sa(Z.current);fe.addEventListener("touchmove",ce,{passive:!0}),fe.addEventListener("touchend",Y,{passive:!0})}),me=N.useCallback(()=>{const Q=sa(Z.current);Q.removeEventListener("mousemove",ce),Q.removeEventListener("mouseup",Y),Q.removeEventListener("touchmove",ce),Q.removeEventListener("touchend",Y)},[Y,ce]);N.useEffect(()=>{const{current:Q}=Z;return Q.addEventListener("touchstart",xe,{passive:jh()}),()=>{Q.removeEventListener("touchstart",xe),me()}},[me,xe]),N.useEffect(()=>{n&&me()},[n,me]);const We=Q=>te=>{var Oe;if((Oe=Q.onMouseDown)==null||Oe.call(Q,te),n||te.defaultPrevented||te.button!==0)return;te.preventDefault();const se=fo(te,w);if(se!==!1){const{newValue:ie,activeIndex:He}=oe({finger:se});go({sliderRef:Z,activeIndex:He,setActive:A}),M(ie),G&&!yo(ie,z)&&G(te,ie,He)}y.current=0;const fe=sa(Z.current);fe.addEventListener("mousemove",ce,{passive:!0}),fe.addEventListener("mouseup",Y)},Ge=es(ne?re[0]:l,l,i),je=es(re[re.length-1],l,i)-Ge,rr=(Q={})=>{const te=Po(Q),se={onMouseDown:We(te||{})},fe={...te,...se};return{...Q,ref:he,...fe}},Da=Q=>te=>{var fe;(fe=Q.onMouseOver)==null||fe.call(Q,te);const se=Number(te.currentTarget.getAttribute("data-index"));T(se)},La=Q=>te=>{var se;(se=Q.onMouseLeave)==null||se.call(Q,te),T(-1)},Ba=(Q={})=>{const te=Po(Q),se={onMouseOver:Da(te||{}),onMouseLeave:La(te||{})};return{...Q,...te,...se}},Fa=Q=>({pointerEvents:O!==-1&&O!==Q?"none":void 0});let Gr;return h==="vertical"&&(Gr=o?"vertical-rl":"vertical-lr"),{active:O,axis:X,axisProps:G5,dragging:E,focusedThumbIndex:le,getHiddenInputProps:(Q={})=>{const te=Po(Q),se={onChange:rt(te||{}),onFocus:Ae(te||{}),onBlur:ze(te||{}),onKeyDown:lt(te||{})},fe={...te,...se};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(i),"aria-valuemin":f(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Q,...fe,style:{...D5,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:Gr}}},getRootProps:rr,getThumbProps:Ba,marks:ae,open:C,range:ne,rootRef:he,trackLeap:je,trackOffset:Ge,values:re,getThumbStyle:Fa}}function Ro(e){return typeof e=="string"}const W5=e=>!e||!Ro(e);function J5(e){return typeof e.main=="string"}function Y5(e,t=[]){if(!J5(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Ec(e=[]){return([,t])=>t&&Y5(t,e)}function K5(e){return On("MuiSlider",e)}const bt=Vl("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Q5=e=>{const{open:t}=e;return{offset:Pt(t&&bt.valueLabelOpen),circle:bt.valueLabelCircle,label:bt.valueLabelLabel}};function Gf(e){const{children:t,className:r,value:n}=e,a=Q5(e);return t?N.cloneElement(t,{className:t.props.className},g.jsxs(N.Fragment,{children:[t.props.children,g.jsx("span",{className:Pt(a.offset,r),"aria-hidden":!0,children:g.jsx("span",{className:a.circle,children:g.jsx("span",{className:a.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Gf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function kh(e){return e}const X5=pt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${et(r.color)}`],r.size!=="medium"&&t[`size${et(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(Lr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${bt.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${bt.dragging}`]:{[`& .${bt.thumb}, & .${bt.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Ec()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),Z5=pt("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),e3=pt("span",{name:"MuiSlider",slot:"Track"})(Lr(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Ec()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:da(e.palette[t].main,.62),borderColor:da(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:ua(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:ua(e.palette[t].main,.5)})}}}))]}))),t3=pt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${et(r.color)}`],r.size!=="medium"&&t[`thumbSize${et(r.size)}`]]}})(Lr(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${bt.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Ec()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${bt.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Gi(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${bt.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Gi(e.palette[t].main,.16)}`}}}}))]}))),Hf=pt(Gf,{name:"MuiSlider",slot:"ValueLabel"})(Lr(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${bt.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${bt.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(Hf.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const r3=pt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>kl(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(Lr(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),n3=pt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>kl(e)&&e!=="markLabelActive"})(Lr(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),a3=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:o,classes:s,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",i&&`color${et(i)}`,l&&`size${et(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${et(l)}`,i&&`thumbColor${et(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return ts(c,K5,s)},o3=({children:e})=>e,qf=N.forwardRef(function(t,r){const n=Sc({props:t,name:"MuiSlider"}),a=g0(),{"aria-label":o,"aria-valuetext":s,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:b,getAriaValueText:S,marks:_=!1,max:w=100,min:O=0,name:A,onChange:C,onChangeCommitted:T,orientation:E="horizontal",shiftStep:V=10,size:y="medium",step:P=1,scale:z=kh,slotProps:M,slots:G,tabIndex:ne,track:re="normal",value:ae,valueLabelDisplay:ee="off",valueLabelFormat:le=kh,...J}=n,Z={...n,isRtl:a,max:w,min:O,classes:h,disabled:m,disableSwap:f,orientation:E,marks:_,color:d,size:y,step:P,shiftStep:V,scale:z,track:re,valueLabelDisplay:ee,valueLabelFormat:le},{axisProps:he,getRootProps:Ae,getHiddenInputProps:ze,getThumbProps:Ce,open:lt,active:rt,axis:be,focusedThumbIndex:X,range:oe,dragging:ce,marks:Y,values:xe,trackOffset:me,trackLeap:We,getThumbStyle:Ge}=q5({...Z,rootRef:r});Z.marked=Y.length>0&&Y.some(Le=>Le.label),Z.dragging=ce,Z.focusedThumbIndex=X;const je=a3(Z),rr=(G==null?void 0:G.root)??c.Root??X5,Da=(G==null?void 0:G.rail)??c.Rail??Z5,La=(G==null?void 0:G.track)??c.Track??e3,Ba=(G==null?void 0:G.thumb)??c.Thumb??t3,Fa=(G==null?void 0:G.valueLabel)??c.ValueLabel??Hf,Gr=(G==null?void 0:G.mark)??c.Mark??r3,Na=(G==null?void 0:G.markLabel)??c.MarkLabel??n3,Q=(G==null?void 0:G.input)??c.Input??"input",te=(M==null?void 0:M.root)??u.root,se=(M==null?void 0:M.rail)??u.rail,fe=(M==null?void 0:M.track)??u.track,Oe=(M==null?void 0:M.thumb)??u.thumb,ie=(M==null?void 0:M.valueLabel)??u.valueLabel,He=(M==null?void 0:M.mark)??u.mark,Ze=(M==null?void 0:M.markLabel)??u.markLabel,Be=(M==null?void 0:M.input)??u.input,mt=sr({elementType:rr,getSlotProps:Ae,externalSlotProps:te,externalForwardedProps:J,additionalProps:{...W5(rr)&&{as:l}},ownerState:{...Z,...te==null?void 0:te.ownerState},className:[je.root,p]}),$n=sr({elementType:Da,externalSlotProps:se,ownerState:Z,className:je.rail}),sg=sr({elementType:La,externalSlotProps:fe,additionalProps:{style:{...he[be].offset(me),...he[be].leap(We)}},ownerState:{...Z,...fe==null?void 0:fe.ownerState},className:je.track}),Js=sr({elementType:Ba,getSlotProps:Ce,externalSlotProps:Oe,ownerState:{...Z,...Oe==null?void 0:Oe.ownerState},className:je.thumb}),ig=sr({elementType:Fa,externalSlotProps:ie,ownerState:{...Z,...ie==null?void 0:ie.ownerState},className:je.valueLabel}),Ys=sr({elementType:Gr,externalSlotProps:He,ownerState:Z,className:je.mark}),Ks=sr({elementType:Na,externalSlotProps:Ze,ownerState:Z,className:je.markLabel}),lg=sr({elementType:Q,getSlotProps:ze,externalSlotProps:Be,ownerState:Z});return g.jsxs(rr,{...mt,children:[g.jsx(Da,{...$n}),g.jsx(La,{...sg}),Y.filter(Le=>Le.value>=O&&Le.value<=w).map((Le,Je)=>{const Qs=es(Le.value,O,w),za=he[be].offset(Qs);let Bt;return re===!1?Bt=xe.includes(Le.value):Bt=re==="normal"&&(oe?Le.value>=xe[0]&&Le.value<=xe[xe.length-1]:Le.value<=xe[0])||re==="inverted"&&(oe?Le.value<=xe[0]||Le.value>=xe[xe.length-1]:Le.value>=xe[0]),g.jsxs(N.Fragment,{children:[g.jsx(Gr,{"data-index":Je,...Ys,...!Ro(Gr)&&{markActive:Bt},style:{...za,...Ys.style},className:Pt(Ys.className,Bt&&je.markActive)}),Le.label!=null?g.jsx(Na,{"aria-hidden":!0,"data-index":Je,...Ks,...!Ro(Na)&&{markLabelActive:Bt},style:{...za,...Ks.style},className:Pt(je.markLabel,Ks.className,Bt&&je.markLabelActive),children:Le.label}):null]},Je)}),xe.map((Le,Je)=>{const Qs=es(Le,O,w),za=he[be].offset(Qs),Bt=ee==="off"?o3:Fa;return g.jsx(Bt,{...!Ro(Bt)&&{valueLabelFormat:le,valueLabelDisplay:ee,value:typeof le=="function"?le(z(Le),Je):le,index:Je,open:lt===Je||rt===Je||ee==="on",disabled:m},...ig,children:g.jsx(Ba,{"data-index":Je,...Js,className:Pt(je.thumb,Js.className,rt===Je&&je.active,X===Je&&je.focusVisible),style:{...za,...Ge(Je),...Js.style},children:g.jsx(Q,{"data-index":Je,"aria-label":b?b(Je):o,"aria-valuenow":z(Le),"aria-labelledby":i,"aria-valuetext":S?S(z(Le),Je):s,value:xe[Je],...lg})})},Je)})]})});process.env.NODE_ENV!=="production"&&(qf.propTypes={"aria-label":_h(x.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-label"]!=null?new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":x.string,"aria-valuetext":_h(x.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-valuetext"]!=null?new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),children:x.node,classes:x.object,className:x.string,color:x.oneOfType([x.oneOf(["primary","secondary","error","info","success","warning"]),x.string]),components:x.shape({Input:x.elementType,Mark:x.elementType,MarkLabel:x.elementType,Rail:x.elementType,Root:x.elementType,Thumb:x.elementType,Track:x.elementType,ValueLabel:x.elementType}),componentsProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),defaultValue:x.oneOfType([x.arrayOf(x.number),x.number]),disabled:x.bool,disableSwap:x.bool,getAriaLabel:x.func,getAriaValueText:x.func,marks:x.oneOfType([x.arrayOf(x.shape({label:x.node,value:x.number.isRequired})),x.bool]),max:x.number,min:x.number,name:x.string,onChange:x.func,onChangeCommitted:x.func,orientation:x.oneOf(["horizontal","vertical"]),scale:x.func,shiftStep:x.number,size:x.oneOfType([x.oneOf(["small","medium"]),x.string]),slotProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),slots:x.shape({input:x.elementType,mark:x.elementType,markLabel:x.elementType,rail:x.elementType,root:x.elementType,thumb:x.elementType,track:x.elementType,valueLabel:x.elementType}),step:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),tabIndex:x.number,track:x.oneOf(["inverted","normal",!1]),value:x.oneOfType([x.arrayOf(x.number),x.number]),valueLabelDisplay:x.oneOf(["auto","off","on"]),valueLabelFormat:x.oneOfType([x.func,x.string])});var s3="[object Number]";function i3(e){return typeof e=="number"||Ir(e)&&Br(e)==s3}const Wf=ye.observer(e=>{var o,s,i;const t=R.useTheme(),{store:r}=e,{t:n}=Re.useTranslation();function a(l,c){c===e.velocity||!i3(c)||e.onVelocityChange(c)}return g.jsxs(R.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(R.Typography,{sx:{color:(i=(s=(o=t.componentsExt)==null?void 0:o.JoggingPanel)==null?void 0:s.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(qf,{value:e.velocity,color:"secondary",onChange:a,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),r.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):g.jsx(Ic,{value:e.velocity.toString()}))]})});function Ic({value:e,sx:t}){var n;const r=R.useTheme();return g.jsx(R.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(n=r.palette.backgroundPaperElevation)==null?void 0:n[8],borderRadius:"10px",minWidth:"111px",...t},children:g.jsx(R.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Jf=ye.observer(({store:e})=>{const{t}=Re.useTranslation(),r=ye.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?n=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:n})}`:n=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:n})}`}}));return g.jsx(Wf,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(Ic,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),l3=ye.observer(({store:e,children:t})=>{const{t:r}=Re.useTranslation(),n=R.useTheme();function a(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Em(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}&response_coordinate_system=${e.selectedCoordSystemId}`))},{fireImmediately:!0});async function o(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,b=f.motionStream.rapidlyChangingMotionState.state.joint_position;m&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:b,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:Tr.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function s(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return o(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.startTCPTranslation({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,p,f){var b,S,_;const m=(_=(S=(b=f.componentsExt)==null?void 0:b.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:_.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(uI,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(hI,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(mI,{}),colors:l("Z",e.selectedCartesianMotionType,n)}];function u(h){return r("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return r("General.degree.variable",{amount:Tr.radiansToDegrees(h).toFixed(1)})}return g.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(R.Stack,{gap:2,children:[g.jsx(V5,{store:e}),g.jsx(Jf,{store:e}),g.jsx(R.Divider,{})]}),g.jsx(R.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(R.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(M5,{value:e.selectedCartesianMotionType,onChange:a,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(R.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(R.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(ol,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[h.icon,g.jsx(R.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m;return u(((m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.position[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(ol,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[g.jsx(gI,{}),g.jsx(R.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,b;return d(((b=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:b[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx($f,{store:e}),t&&g.jsx(R.Divider,{}),t]})}),c3=ye.observer(({store:e,children:t})=>{const r=R.useTheme();async function n(o){await e.activate(),await e.jogger.startJointRotation({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function a(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Jf,{store:e}),g.jsx(R.Divider,{}),g.jsx(R.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(R.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(o=>{var c;const s=(c=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:c[o.index],i=(s==null?void 0:s.lower_limit)!==void 0?Tr.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?Tr.radiansToDegrees(s.upper_limit):void 0;return g.jsxs(R.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(R.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${o.index+1}`}),g.jsx(Mm,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return u!==void 0?Tr.radiansToDegrees(u):void 0},startJogging:u=>n({joint:o.index,direction:u}),stopJogging:a})]},`joint-${o.index}`)})})}),g.jsx($f,{store:e}),t&&g.jsx(R.Divider,{}),t]})}),u3=Ke(ye.observer(e=>{const t=_l.isString(e.nova)?new oI({instanceUrl:e.nova}):e.nova,r=ye.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){ke.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let a=e.store;if(!a){const o=await t.connectJogger(e.motionGroupId);a=await Ws.loadFor(o)}ke.runInAction(()=>{r.joggingStore=a}),e.onSetup&&e.onSetup(a)}catch(a){r.loadingError=a}}return W.useEffect(()=>(n(),e.store?()=>null:()=>{var a;(a=r.joggingStore)==null||a.dispose()}),[e.store,e.nova,e.motionGroupId]),W.useEffect(()=>{const a=r.joggingStore;a&&(e.locked?a.lock("external"):a.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(R.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(d3,{store:r.joggingStore,children:e.children}):g.jsx(Tc,{message:"Loading jogging",error:r.loadingError})})})),d3=ye.observer(({store:e,children:t})=>{const{t:r}=Re.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(l3,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(c3,{store:e,children:t})})}return g.jsxs(R.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(R.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(a=>{const o=a.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),s=a.label==="cartesian"?g.jsx(DO,{fontSize:"small",sx:{mr:1}}):g.jsx(LO,{fontSize:"small",sx:{mr:1}});return g.jsx(R.Tab,{label:e.showTabIcons?g.jsxs(R.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${a.id}`,"aria-controls":`jogging-tab-${a.id}`},a.id)})}),g.jsx(R.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),Yf=e=>{var i;const{value:t,ref:r}=e,n=R.useTheme(),[a,o]=W.useState(!1);async function s(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),o(!0),!0}catch(l){console.error(l);const c=window.getSelection();if(c&&r&&"current"in r&&r.current){const u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}}return!1}return W.useEffect(()=>{if(!a)return;const l=setTimeout(()=>o(!1),3e3);return()=>{l&&clearTimeout(l)}},[a]),g.jsx(R.Tooltip,{open:a,title:"Copied!",children:g.jsx(R.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(i=n.palette.backgroundPaperElevation)==null?void 0:i[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>s(),children:g.jsx(R.Typography,{ref:r,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:n.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})};function h3(e,t){if(e)return e;if(t)return{rapidlyChangingMotionState:t.rapidlyChangingMotionState}}const p3=ye.observer(({motionStream:e,connectedMotionGroup:t,showCopyButton:r=!1})=>{const n=W.useRef(null),[a,o]=W.useState(""),s=h3(e,t);if(!s)throw new Error("PoseCartesianValues requires either motionStream or connectedMotionGroup prop");function i(){if(!s)return"";const c=s.rapidlyChangingMotionState.tcp_pose;return c?Tr.poseToWandelscriptString(c):""}const l=async()=>{try{await navigator.clipboard.writeText(i()),o("Copied!"),setTimeout(()=>o(""),2e3)}catch{o("Copy failed"),setTimeout(()=>o(""),2e3)}};return An(()=>{if(!n.current)return;const c=i();n.current.textContent!==c&&(n.current.textContent=c)}),g.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:[g.jsx(Yf,{value:i(),ref:n}),r&&g.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:l,sx:{flexShrink:0},children:"Copy"}),a&&g.jsx(R.Typography,{variant:"caption",color:"success.main",children:a})]})});function m3(e,t){if(e)return e;if(t)return{rapidlyChangingMotionState:t.rapidlyChangingMotionState}}const f3=ye.observer(({motionStream:e,connectedMotionGroup:t,showCopyButton:r=!1})=>{const n=W.useRef(null),[a,o]=W.useState(""),s=m3(e,t);if(!s)throw new Error("PoseJointValues requires either motionStream or connectedMotionGroup prop");function i(){if(!s)return"";const{joints:c}=s.rapidlyChangingMotionState.state.joint_position;return`[${c.map(u=>parseFloat(u.toFixed(4))).join(", ")}]`}const l=async()=>{try{await navigator.clipboard.writeText(i()),o("Copied!"),setTimeout(()=>o(""),2e3)}catch{o("Copy failed"),setTimeout(()=>o(""),2e3)}};return An(()=>{if(!n.current)return;const c=i();n.current.textContent!==c&&(n.current.textContent=c)}),g.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:[g.jsx(Yf,{value:i(),ref:n}),r&&g.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:l,sx:{flexShrink:0},children:"Copy"}),a&&g.jsx(R.Typography,{variant:"caption",color:"success.main",children:a})]})});class Kf{constructor(){this.messages=[],this.addMessage=(t,r="info")=>{const n={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:r};this.messages.push(n)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},ke.makeObservable(this,{messages:ke.observable,addMessage:ke.action,clearMessages:ke.action})}}const Ua=(e,t,r)=>({id:r||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),g3=(e,t)=>Ua(e,"debug",t),y3=(e,t)=>Ua(e,"info",t),b3=(e,t)=>Ua(e,"warning",t),x3=(e,t)=>Ua(e,"error",t),Qf=Ke(ye.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:a}=e,o=R.useTheme(),s=W.useRef(null);W.useEffect(()=>{if(t.length===0)return;const d=s.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const i=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return o.palette.error.main;case"warning":return o.palette.warning.main;case"info":return o.palette.info.main;case"debug":return o.palette.text.disabled;default:return o.palette.text.secondary}},c=({message:d})=>{const[h,p]=W.useState(!1),[f,m]=W.useState(!1),[b,S]=W.useState(!1),_=d.message.length>150,w=async()=>{try{await navigator.clipboard.writeText(d.message),m(!0),setTimeout(()=>m(!1),2e3)}catch(A){console.error("Failed to copy message:",A)}},O=_&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(R.Box,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:o.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxs(R.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:o.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:l(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:O}),g.jsxs(R.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:b?1:0,transition:"opacity 0.2s ease-in-out",visibility:b?"visible":"hidden"},children:[g.jsx(R.IconButton,{size:"small",onClick:w,sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:f?"Copied!":"Copy message",children:g.jsx(zt.ContentCopy,{sx:{fontSize:12}})}),_&&g.jsx(R.IconButton,{size:"small",onClick:()=>p(!h),sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsx(zt.ExpandLess,{sx:{fontSize:12}}):g.jsx(zt.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(R.Paper,{sx:{backgroundColor:((u=o.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:n,display:"flex",flexDirection:"column",overflow:"hidden",...a},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(zt.DescriptionOutlined,{sx:{fontSize:16,color:o.palette.action.active,opacity:.56}}),g.jsx(R.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:o.palette.text.primary},children:"Log"})]}),g.jsx(R.Button,{onClick:r,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:o.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:o.palette.primary.main+"14"}},children:"Clear"})]}),g.jsx(R.Box,{ref:s,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${o.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:o.palette.divider}}},children:t.length===0?g.jsx(R.Typography,{sx:{color:o.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>g.jsx(c,{message:d},d.id))})]})})),v3=Ke(ye.observer(e=>{const{store:t,onStoreReady:r,...n}=e,a=W.useRef(r);W.useEffect(()=>{a.current=r},[r]);const o=W.useMemo(()=>{var l;const i=t||new Kf;return(l=a.current)==null||l.call(a,i),i},[t]),s=()=>{o.clearMessages()};return g.jsx(Qf,{...n,messages:o.messages,onClear:s})}));function S3(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function w3({baseUrl:e=S3(),...t}){return g.jsxs(R.Dialog,{"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:[g.jsx(R.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(R.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(R.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(R.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(R.DialogActions,{children:g.jsxs(R.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(R.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(R.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var Sr=(e=>(e.IDLE="idle",e.RUNNING="running",e.PAUSED="paused",e.STOPPING="stopping",e.ERROR="error",e))(Sr||{});const C3=Ke(ye.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:a,requiresManualReset:o=!1,variant:s="with_pause",className:i})=>{const l=R.useTheme(),{t:c}=Re.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="paused"||e==="error",label:c(e==="paused"?"ProgramControl.Resume.bt":e==="error"?"ProgramControl.Retry.bt":"ProgramControl.Start.bt"),color:l.palette.success.main,onClick:t},pause:{enabled:e==="running",label:c("ProgramControl.Pause.bt"),color:"#FFFFFF33",onClick:r||(()=>{})},stop:{enabled:e==="running"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return s==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(s==="without_pause")return p===0?g.jsx(zt.PlayArrow,{...f}):g.jsx(zt.Stop,{...f});switch(p){case 0:return g.jsx(zt.PlayArrow,{...f});case 1:return g.jsx(zt.Pause,{...f});case 2:return g.jsx(zt.Stop,{...f});default:return null}},h=u();return g.jsx(R.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(R.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(R.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(R.Button,{variant:"contained",disabled:!p.enabled||e==="stopping"&&!o,onClick:p.onClick,sx:{width:"88px",height:"88px",borderRadius:"88px",backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!o)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!o)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"88px",flexShrink:0},children:d(f)}),g.jsx(R.Typography,{variant:"body1",sx:{color:p.enabled&&!(e==="stopping"&&!o)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&!(e==="stopping"&&!o)?1:.3},children:p.label})]},p.label))})})})),Rl=Ke(ye.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const a=R.useTheme(),{t:o}=Re.useTranslation(),s=()=>{if(t==="SAFETY_STATE_DEVICE_EMERGENCY_STOP"||t==="SAFETY_STATE_ROBOT_EMERGENCY_STOP"||t==="SAFETY_STATE_STOP_0"||t==="SAFETY_STATE_STOP_1"||t==="SAFETY_STATE_STOP_2"||t==="SAFETY_STATE_PROTECTIVE_STOP"||t==="SAFETY_STATE_STOP"||t==="SAFETY_STATE_REDUCED"||t==="SAFETY_STATE_MASTERING"||t==="SAFETY_STATE_CONFIRM_SAFETY"||t==="SAFETY_STATE_OPERATOR_SAFETY"||t==="SAFETY_STATE_RECOVERY"||t==="SAFETY_STATE_VIOLATION")return{label:o("ProgramStateIndicator.EStop.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:o("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case Sr.RUNNING:return{label:o("ProgramStateIndicator.Running.lb"),color:a.palette.success.main};case Sr.PAUSED:return{label:o("ProgramStateIndicator.Paused.lb"),color:a.palette.grey[600]};case Sr.STOPPING:return{label:o("ProgramStateIndicator.Stopped.lb"),color:a.palette.error.main};case Sr.ERROR:return{label:o("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};case Sr.IDLE:default:return{label:o("ProgramStateIndicator.Ready.lb"),color:a.palette.success.main}}return{label:o("ProgramStateIndicator.Idle.lb"),color:a.palette.grey[600]}},{label:i,color:l}=s(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return o("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return o("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return o("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return o("ProgramStateIndicator.ManualT2.lb");default:return o("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(R.Chip,{className:n,label:g.jsx(R.Typography,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:u}),variant:"filled",sx:{backgroundColor:l,color:a.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),$h="0.0.0-semantically-released";function Vc(e){let t=$h;return $h.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function O3(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Zf(r))}function Xf(e){return e.name.endsWith("_FLG")}function Zf(e){return/_J[0-9]+$/.test(e.name)}function T3(e,t){let r;function n(a){if(Xf(a)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${a.name}. Only one _FLG group is allowed.`);r=a}Zf(a),a.children.map(n)}if(n(e.scene),!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function eg({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const a=W.useRef([]),o=W.useRef([]),s=W.useRef(null),{invalidate:i}=Ao.useThree();W.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return s.current=new vc(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=s.current)==null||h.destroy()}},[]),Ao.useFrame((d,h)=>{if(s.current){const p=s.current.update(h);u(),p||i()}});function l(d){d&&(o.current=O3(d),u(),i())}function c(d){var h;a.current=d,(h=s.current)==null||h.setTarget(d)}function u(){var h;const d=((h=s.current)==null?void 0:h.getCurrentValues())||[];if(r)r(o.current,d);else for(const[p,f]of o.current.entries()){const m=t[p],b=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+b}}return _m(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const P3="line",R3="mesh";function A3({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new Ct.Matrix4,a=W.useRef([]),o=W.useRef([]);W.useEffect(()=>{a.current=new Array(t.length).fill(null),o.current=new Array(t.length).fill(null)},[t.length]);function s(c,u){const d=new Ct.Vector3,h=new Ct.Quaternion,p=new Ct.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new Ct.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new Ct.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new Ct.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new Ct.Matrix4().makeRotationX(c.alpha));return n.multiply(m),n.decompose(d,h,p),{a:f,b:d}}function i(c,u,d,h){if(!t)return;const p=t[c];if(!p)return;const{a:f,b:m}=s(p,h);u.geometry.setPositions([f.toArray(),m.toArray()].flat()),d.position.set(m.x,m.y,m.z)}function l(c,u){n.identity();for(let d=0;d<Math.min(c.length,u.length);d++){const h=a.current[d],p=o.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(eg,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:l,children:g.jsxs("group",{...r,name:"Scene",children:[g.jsxs("mesh",{children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((c,u)=>{const{a:d,b:h}=s(c,e.state.joint_position.joints[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(ut.Line,{ref:f=>{a.current[u]=f},name:P3,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{o.current[u]=f},name:R3,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const _3=console.warn;function E3(){return W.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&_3(e)}},[]),g.jsx(g.Fragment,{})}function I3(e){return e.type==="Mesh"}function V3({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:a}=T3(ut.useGLTF(e),e.split("/").pop()||e),o=W.useCallback(i=>{i&&r&&r()},[e]);function s(i){return I3(i)?g.jsx("mesh",{name:i.name,geometry:i.geometry,material:i.material,position:i.position,rotation:i.rotation},i.uuid):g.jsx("group",{name:i.name,position:i.position,rotation:i.rotation,ref:Xf(i)?t:void 0,children:i.children.map(s)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:o,children:s(a.scene)})}const M3=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof ve.Mesh){r.material instanceof ve.Material&&(r.material.colorWrite=!1);const n=r.clone(),a=r.clone();n.material=new ve.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:ve.DoubleSide}),n.userData.isGhost=!0,a.material=new ve.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:ve.DoubleSide}),a.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(a))}}),e.userData.isGhost=!0)},j3=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof ve.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof ve.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},tg=Ke(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Vc,flangeRef:a,postModelRender:o,transparentColor:s,...i})=>{const[l,c]=W.useState(null),u=W.useCallback(h=>{c(h)},[]);W.useEffect(()=>{l&&(s?M3(l,s):j3(l))},[l,s]);const d=g.jsx(A3,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(vg.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(W.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(eg,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(V3,{modelURL:n(t),postModelRender:o,flangeRef:a,...i})})})}),g.jsx(E3,{})]})});function rg({connectedMotionGroup:e,getModel:t=Vc,flangeRef:r,transparentColor:n,postModelRender:a,...o}){return e.dhParameters?g.jsx(tg,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:a,...o}):null}const k3=Ke(ye.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:a=!1,onDriveToHomePress:o,onDriveToHomeRelease:s,connectedMotionGroup:i,robotComponent:l=rg,customContentComponent:c,className:u})=>{var M;const d=R.useTheme(),{t:h}=Re.useTranslation(),[p,f]=W.useState(!1),m=W.useRef(null),b=W.useRef(null),[S,_]=W.useState(!1),[w,O]=W.useState({width:400,height:600}),[A,C]=W.useState(0);W.useEffect(()=>{const G=()=>{if(b.current){const{offsetWidth:re,offsetHeight:ae}=b.current;_(re>ae),O({width:re,height:ae})}};G();const ne=new ResizeObserver(G);return b.current&&ne.observe(b.current),()=>{ne.disconnect()}},[]);const T=W.useCallback(()=>{C(G=>G+1)},[]),E=W.useCallback(()=>{!a||!o||(f(!0),o())},[a,o]),V=W.useCallback(()=>{!a||!s||(f(!1),s())},[a,s]),y=W.useCallback(()=>{p&&s&&(f(!1),s())},[p,s]),P=S?w.width<350:w.height<200,z=S?w.height<310:w.height<450;return g.jsx(R.Card,{ref:b,className:u,sx:{width:"100%",height:"100%",display:"flex",flexDirection:S?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:S?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${d.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((M=d.palette.backgroundPaperElevation)==null?void 0:M[8])||"#2A2A3F",backgroundImage:"none"},children:S?g.jsxs(g.Fragment,{children:[g.jsx(R.Box,{sx:{flex:"0 0 50%",position:"relative",height:"100%",minHeight:"100%",maxHeight:"100%",borderRadius:1,m:{xs:1.5,sm:2,md:3},mr:{xs:.75,sm:1,md:1.5},overflow:"hidden",display:P?"none":"block"},children:!P&&g.jsxs(Ao.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(Ni,{}),g.jsx(ut.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:T})})]})}),g.jsxs(R.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:P?"100%":"50%"},children:[g.jsxs(R.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(R.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Rl,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(R.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!z&&c&&g.jsxs(R.Box,{children:[g.jsx(c,{}),g.jsx(R.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(R.Box,{sx:{mt:!z&&c?"auto":0},children:g.jsx(R.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:1.5,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(R.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:E,onMouseUp:V,onMouseLeave:y,onTouchStart:E,onTouchEnd:V,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(R.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(R.Box,{children:[g.jsx(R.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Rl,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(R.Box,{sx:{flex:P?0:1,position:"relative",minHeight:P?0:{xs:120,sm:150,md:200},height:P?0:"auto",borderRadius:1,overflow:"hidden",display:P?"none":"block"},children:!P&&g.jsxs(Ao.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(Ni,{}),g.jsx(ut.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:T})})]})}),g.jsxs(R.Box,{children:[!z&&c&&g.jsxs(g.Fragment,{children:[g.jsx(c,{}),g.jsx(R.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(R.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:!z&&c?{xs:1,sm:2,md:5}:{xs:.5,sm:1,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(R.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:E,onMouseUp:V,onMouseLeave:y,onTouchStart:E,onTouchEnd:V,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})]})]})})})})),$3=gr(g.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),U3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#38C6F4",fillRule:"evenodd",d:"M6.359 14.25v2.934h7.63v-3.521L10.196 9.87 9 8.674l.859-.859.337-.337.858-.858.565.565.631.63.565.565 1.196-1.195.543-.544 1.196-1.195-1.196-1.196-2.304-2.304L11.054.75 9.86 1.946 3.446 8.359 2.25 9.554l1.196 1.196 2.913 2.913zm1.69 0v1.244h4.249v-1.13L7.804 9.87 6.608 8.674l1.196-1.196L9.86 5.424l.007-.008-.543-.543-4.681 4.681 2.912 2.913.496.496v.113h2.124l1.174 1.174zm3.005-10.022-.294.294-.543-.543.837-.837 2.304 2.304-.543.543-.565-.565z",clipRule:"evenodd"})),D3=W.forwardRef(U3);var Mc=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.READY="READY",e))(Mc||{});const ng=Ke(ye.observer(({setupState:e,className:t})=>{const r=R.useTheme(),{t:n}=Re.useTranslation(),a=()=>{var c,u,d,h;switch(e){case"READY":return{label:n("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=r.palette.tertiary)==null?void 0:c.main)||r.palette.primary.main,backgroundColor:((u=r.palette.backgroundPaperElevation)==null?void 0:u[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:n("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:r.palette.error.main,backgroundColor:((d=r.palette.backgroundPaperElevation)==null?void 0:d[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:r.palette.error.main,backgroundColor:((h=r.palette.backgroundPaperElevation)==null?void 0:h[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText}}},{label:o,indicatorColor:s,backgroundColor:i,textColor:l}=a();return g.jsx(R.Chip,{className:t,label:g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(R.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),g.jsx(R.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:o})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),L3=Ke(ye.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=ng,className:a})=>{var l;const o=R.useTheme(),s=t||"Robot",i=r===Mc.READY;return g.jsxs(R.Box,{className:a,sx:{border:`1px solid ${o.palette.divider}`,background:((l=o.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(R.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${o.palette.primary.main} !important`},"& svg path":{fill:`${o.palette.primary.main} !important`}},children:g.jsx(D3,{})}):g.jsx($3,{sx:{color:o.palette.error.main,fontSize:24}}),g.jsx(R.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(R.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),n&&g.jsx(n,{setupState:r})]})})),B3=Array(6).fill(2*Math.PI),Al={[jt.Abb]:[0,0,0,0,Math.PI/2,0,0],[jt.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[jt.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[jt.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[jt.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function ag(e){const[t]=e.split("_");switch(t){case"ABB":return jt.Abb;case"FANUC":return jt.Fanuc;case"YASKAWA":return jt.Yaskawa;case"KUKA":return jt.Kuka;case"UniversalRobots":return jt.Universalrobots;default:return null}}function F3(e,t){const r=ag(e);return r&&r in Al?Al[r]:t||null}const N3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),z3=W.forwardRef(N3),G3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),H3=W.forwardRef(G3),kt=ye.observer(({id:e,icon:t,color:r,title:n,name:a,label:o,explanation:s,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=ye.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return g.jsxs(g.Fragment,{children:[g.jsxs(R.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[g.jsx(R.SvgIcon,{component:t,sx:{color:r}}),o&&g.jsx("div",{style:{color:r},children:o})]}),g.jsx(R.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:g.jsxs(R.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(R.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(R.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:a})]}),g.jsx(R.Typography,{fontSize:"14px",children:s}),i&&g.jsx(R.Typography,{fontSize:"12px",children:i})]})})]})}),q3=ye.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:a})=>{const o=R.useTheme(),{t:s}=Re.useTranslation();return e?g.jsx(kt,{id:"motion-group-virtual",icon:H3,color:o.palette.tertiary.main,name:s("SafetyBar.ControllerType.Virtual.lb"),label:a?null:s("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(Re.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",g.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):g.jsx(kt,{id:"motion-group-physical",icon:z3,color:o.palette.primary.main,name:s("SafetyBar.ControllerType.Physical.lb"),label:a?null:s("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),W3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),J3=W.forwardRef(W3),Y3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),K3=W.forwardRef(Y3),Q3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),X3=W.forwardRef(Q3),Z3=ye.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Re.useTranslation(),o=R.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(kt,{id:"operation-mode-auto",icon:J3,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Automatic.ti"),label:n?null:a("SafetyBar.OperationMode.Automatic.ti"),color:o.palette.text.secondary,explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return g.jsx(kt,{id:"operation-mode-manual",icon:X3,color:o.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Manual.lb"),label:n?null:a("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"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."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:return g.jsx(kt,{id:"operation-mode-error",icon:K3,color:o.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Error.lb"),label:n?null:a("SafetyBar.OperationMode.Error.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:r})}}),ej=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),tj=W.forwardRef(ej),rj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),nj=W.forwardRef(rj),aj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),oj=W.forwardRef(aj),sj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),ij=W.forwardRef(sj),lj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),cj=W.forwardRef(lj),uj=ye.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Re.useTranslation(),o=R.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(kt,{id:"safety-state-normal",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Normal.lb"),label:n?null:a("SafetyBar.SafetyState.Normal.lb"),icon:ij,color:o.palette.text.secondary,explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return g.jsx(kt,{id:"safety-state-estop",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Estop.lb"),label:n?null:a("SafetyBar.SafetyState.Estop.lb"),icon:nj,color:o.palette.error.main,explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return g.jsx(kt,{id:"safety-state-stop",icon:cj,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Stop.lb"),label:n?null:a("SafetyBar.SafetyState.Stop.lb"),color:o.palette.warning.main,explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return g.jsx(kt,{id:"safety-state-manual-action-required",icon:oj,color:o.palette.warning.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:a("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return g.jsx(kt,{id:"safety-state-error",icon:tj,color:o.palette.error.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Error.lb"),label:n?null:a("SafetyBar.SafetyState.Error.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:iI(e,`Unknown safety state ${e}`)}}),dj=Ke(ye.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s=!0})=>{const i=s?1:2;return g.jsxs(R.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(uj,{safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(Z3,{operationMode:r,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(q3,{isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:o,compact:s})]})})),hj=R.styled(R.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:a})=>!a,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:a})=>a,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),pj=e=>{const{ref:t,...r}=e;return g.jsx(hj,{ref:t,selected:e.selected,...r,color:"secondary",variant:"circular"})};function mj(e){const{children:t,value:r,index:n,...a}=e;return g.jsx("div",{role:"tabpanel",hidden:r!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,...a,children:r===n&&g.jsx(R.Box,{children:t})})}const fj=Ke(ye.observer(e=>{const{items:t,activeTab:r,defaultActiveTab:n=0,onTabChange:a,sx:o,ref:s}=e,i=r!==void 0,[l,c]=W.useState(n);W.useEffect(()=>{i||t.length!==0&&(l<0||l>t.length-1)&&c(0)},[t.length,i,l]);const u=i?r:l,d=(h,p)=>{i||c(p),a==null||a(p)};return g.jsxs(R.Box,{ref:s,sx:{height:"100%",display:"flex",flexDirection:"column",...o},children:[g.jsx(R.Box,{sx:{px:0,py:0},children:g.jsx(R.Tabs,{value:u,onChange:d,sx:{minHeight:"32px",backgroundColor:"transparent","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2}},children:t.map((h,p)=>g.jsx(R.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:f=>{var m;return((m=f.palette.backgroundPaperElevation)==null?void 0:m[11])||"#32344B"},color:"text.primary",opacity:u===p?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out","&:hover":{opacity:u===p?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:f=>{var m;return((m=f.palette.backgroundPaperElevation)==null?void 0:m[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id))})}),g.jsx(R.Box,{sx:{mt:"32px",borderBottom:1,borderColor:"divider"}}),g.jsx(R.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,p)=>g.jsx(mj,{value:u,index:p,children:h.content},h.id))})]})})),gj={$schema:"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",name:"wandelscript",patterns:[{include:"#keywords"},{include:"#strings"},{include:"#comments"},{include:"#functions"}],repository:{keywords:{patterns:[{name:"keyword.control.flow.wandelscript",match:"\\b(move|via|to|interrupt|def|False|True|for|if|else|elif|while|return|switch|activate|deactivate|print|and|or|not)\\b"}]},strings:{name:"string.quoted.double.wandelscript",begin:'"',end:'"',patterns:[{name:"constant.character.escape.wandelscript",match:"\\\\."}]},comments:{patterns:[{begin:"#",beginCaptures:{0:{name:"punctuation.definition.comment.wandelscript"}},end:"$",name:"comment.line.number-sign.wandelscript"}]},functions:{patterns:[{match:"[a-zA-Z_-]+\\(",name:"entity.name.function.wandelscript"}]}},scopeName:"source.wandelscript"},yj=W.lazy(()=>import("@monaco-editor/react"));let Fi=null;async function bj(){if(!Fi){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);Fi={shiki:await e({langs:[gj],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return Fi}const xj=Ke(e=>{const t=R.useTheme(),[r,n]=W.useState("dark-plus"),a=t.palette.mode==="dark"?"dark-plus":"light-plus";async function o(s){var c,u;s.languages.register({id:"wandelscript"}),s.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await bj();l(i,s),s.editor.defineTheme(a,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(s),n(a)}return g.jsx(W.Suspense,{fallback:g.jsx(Tc,{}),children:g.jsx(yj,{value:e.code,onMount:(s,i)=>{o(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function og(){var t,r,n,a,o,s,i;const e=R.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`},".MuiDataGrid-panelContent":{borderRadius:"16px !important","& .MuiPaper-root":{borderRadius:"16px !important"}},".MuiDataGrid-filterForm":{borderRadius:"16px !important","& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}},"& .MuiTextField-root":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}},".MuiDataGrid-filterFormValueInput":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}}},MuiDataGrid:{styleOverrides:{root:{},panelContent:{borderRadius:"16px !important"},filterForm:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}},filterFormValueInput:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(a=e.palette.backgroundPaperElevation)==null?void 0:a[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(s=(o=e.paletteExt)==null?void 0:o.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":R.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function vj(){const e=og();return e.palette.mode="light",e}function Sj(e){var n,a,o,s;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((a=e.palette)==null?void 0:a.mode)!=="dark"&&(t=!(typeof window<"u"&&((s=(o=window.matchMedia)==null?void 0:o.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const r=t?og():vj();return op(r,e)}exports.AppHeader=Ug;exports.CollisionSceneRenderer=Ag;exports.CycleTimer=tO;exports.JoggingCartesianAxisControl=ol;exports.JoggingJointRotationControl=Mm;exports.JoggingPanel=u3;exports.JoggingStore=Ws;exports.LoadingCover=Tc;exports.LoadingErrorMessage=Tf;exports.LogPanel=v3;exports.LogStore=Kf;exports.LogViewer=Qf;exports.MANUFACTURER_HOME_CONFIGS=Al;exports.NoMotionGroupModal=w3;exports.PoseCartesianValues=p3;exports.PoseJointValues=f3;exports.PresetEnvironment=Ni;exports.ProgramControl=C3;exports.ProgramState=Sr;exports.ProgramStateIndicator=Rl;exports.Robot=rg;exports.RobotCard=k3;exports.RobotListItem=L3;exports.RobotSetupReadinessIndicator=ng;exports.RobotSetupReadinessState=Mc;exports.SafetyBar=dj;exports.SafetyZonesRenderer=Ig;exports.SelectableFab=pj;exports.SupportedRobot=tg;exports.TabBar=fj;exports.TrajectoryRenderer=Vg;exports.ValueInterpolator=vc;exports.VelocitySlider=Wf;exports.VelocitySliderLabel=Ic;exports.WandelbotsDataGrid=Am;exports.WandelscriptEditor=xj;exports.createDebugMessage=g3;exports.createErrorMessage=x3;exports.createInfoMessage=y3;exports.createLogMessage=Ua;exports.createNovaMuiTheme=Sj;exports.createWarningMessage=b3;exports.defaultAxisConfig=B3;exports.defaultGetModel=Vc;exports.extractManufacturer=ag;exports.getDefaultHomeConfig=F3;exports.i18n=El;exports.useAnimationFrame=An;exports.useAutorun=_m;exports.useInterpolation=Rm;exports.useMounted=Vs;exports.useReaction=Em;
|
|
155
155
|
//# sourceMappingURL=index.cjs.map
|