@wandelbots/wandelbots-js-react-components 5.4.2 → 5.5.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/3d.cjs +2 -0
- package/dist/3d.cjs.map +1 -0
- package/dist/3d.js +31 -0
- package/dist/3d.js.map +1 -0
- package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts +1 -0
- package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts.map +1 -1
- package/dist/components/3d-viewport/PresetEnvironment.cjs +2 -0
- package/dist/components/3d-viewport/PresetEnvironment.cjs.map +1 -0
- package/dist/components/3d-viewport/PresetEnvironment.d.ts +1 -0
- package/dist/components/3d-viewport/PresetEnvironment.d.ts.map +1 -1
- package/dist/components/3d-viewport/PresetEnvironment.js +81 -0
- package/dist/components/3d-viewport/PresetEnvironment.js.map +1 -0
- package/dist/components/3d-viewport/SafetyZonesRenderer.cjs +2 -0
- package/dist/components/3d-viewport/SafetyZonesRenderer.cjs.map +1 -0
- package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts +1 -0
- package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts.map +1 -1
- package/dist/components/3d-viewport/SafetyZonesRenderer.js +131 -0
- package/dist/components/3d-viewport/SafetyZonesRenderer.js.map +1 -0
- package/dist/components/3d-viewport/TrajectoryRenderer.cjs +2 -0
- package/dist/components/3d-viewport/TrajectoryRenderer.cjs.map +1 -0
- package/dist/components/3d-viewport/TrajectoryRenderer.d.ts +1 -0
- package/dist/components/3d-viewport/TrajectoryRenderer.d.ts.map +1 -1
- package/dist/components/3d-viewport/TrajectoryRenderer.js +31 -0
- package/dist/components/3d-viewport/TrajectoryRenderer.js.map +1 -0
- package/dist/components/3d-viewport/collider/ColliderCollection.cjs +2 -0
- package/dist/components/3d-viewport/collider/ColliderCollection.cjs.map +1 -0
- package/dist/components/3d-viewport/collider/ColliderCollection.js +22 -0
- package/dist/components/3d-viewport/collider/ColliderCollection.js.map +1 -0
- package/dist/components/3d-viewport/collider/ColliderElement.cjs +2 -0
- package/dist/components/3d-viewport/collider/ColliderElement.cjs.map +1 -0
- package/dist/components/3d-viewport/collider/ColliderElement.js +29 -0
- package/dist/components/3d-viewport/collider/ColliderElement.js.map +1 -0
- package/dist/components/3d-viewport/collider/CollisionSceneRenderer.cjs +2 -0
- package/dist/components/3d-viewport/collider/CollisionSceneRenderer.cjs.map +1 -0
- package/dist/components/3d-viewport/collider/CollisionSceneRenderer.js +19 -0
- package/dist/components/3d-viewport/collider/CollisionSceneRenderer.js.map +1 -0
- package/dist/components/3d-viewport/collider/colliderShapeToBufferGeometry.cjs +2 -0
- package/dist/components/3d-viewport/collider/colliderShapeToBufferGeometry.cjs.map +1 -0
- package/dist/components/3d-viewport/collider/colliderShapeToBufferGeometry.js +43 -0
- package/dist/components/3d-viewport/collider/colliderShapeToBufferGeometry.js.map +1 -0
- package/dist/components/AppHeader.cjs +2 -0
- package/dist/components/AppHeader.cjs.map +1 -0
- package/dist/components/AppHeader.d.ts +1 -0
- package/dist/components/AppHeader.d.ts.map +1 -1
- package/dist/components/AppHeader.js +139 -0
- package/dist/components/AppHeader.js.map +1 -0
- package/dist/components/ConsoleFilter.cjs +2 -0
- package/dist/components/ConsoleFilter.cjs.map +1 -0
- package/dist/components/ConsoleFilter.js +13 -0
- package/dist/components/ConsoleFilter.js.map +1 -0
- package/dist/components/CopyableText.cjs +2 -0
- package/dist/components/CopyableText.cjs.map +1 -0
- package/dist/components/CopyableText.d.ts +1 -0
- package/dist/components/CopyableText.d.ts.map +1 -1
- package/dist/components/CopyableText.js +71 -0
- package/dist/components/CopyableText.js.map +1 -0
- package/dist/components/CycleTimer/CycleTimer.d.ts +1 -0
- package/dist/components/CycleTimer/CycleTimer.d.ts.map +1 -1
- package/dist/components/CycleTimer/DefaultVariant.cjs +2 -0
- package/dist/components/CycleTimer/DefaultVariant.cjs.map +1 -0
- package/dist/components/CycleTimer/DefaultVariant.js +301 -0
- package/dist/components/CycleTimer/DefaultVariant.js.map +1 -0
- package/dist/components/CycleTimer/SmallVariant.cjs +2 -0
- package/dist/components/CycleTimer/SmallVariant.cjs.map +1 -0
- package/dist/components/CycleTimer/SmallVariant.js +150 -0
- package/dist/components/CycleTimer/SmallVariant.js.map +1 -0
- package/dist/components/CycleTimer/index.cjs +2 -0
- package/dist/components/CycleTimer/index.cjs.map +1 -0
- package/dist/components/CycleTimer/index.d.ts +1 -0
- package/dist/components/CycleTimer/index.d.ts.map +1 -1
- package/dist/components/CycleTimer/index.js +86 -0
- package/dist/components/CycleTimer/index.js.map +1 -0
- package/dist/components/CycleTimer/useAnimations.cjs +2 -0
- package/dist/components/CycleTimer/useAnimations.cjs.map +1 -0
- package/dist/components/CycleTimer/useAnimations.js +105 -0
- package/dist/components/CycleTimer/useAnimations.js.map +1 -0
- package/dist/components/CycleTimer/useTimerLogic.cjs +2 -0
- package/dist/components/CycleTimer/useTimerLogic.cjs.map +1 -0
- package/dist/components/CycleTimer/useTimerLogic.js +191 -0
- package/dist/components/CycleTimer/useTimerLogic.js.map +1 -0
- package/dist/components/CycleTimer/utils.cjs +2 -0
- package/dist/components/CycleTimer/utils.cjs.map +1 -0
- package/dist/components/CycleTimer/utils.js +20 -0
- package/dist/components/CycleTimer/utils.js.map +1 -0
- package/dist/components/CycleTimer.cjs +2 -0
- package/dist/components/CycleTimer.cjs.map +1 -0
- package/dist/components/CycleTimer.d.ts +1 -0
- package/dist/components/CycleTimer.d.ts.map +1 -1
- package/dist/components/CycleTimer.js +6 -0
- package/dist/components/CycleTimer.js.map +1 -0
- package/dist/components/DataGrid.cjs +2 -0
- package/dist/components/DataGrid.cjs.map +1 -0
- package/dist/components/DataGrid.d.ts +1 -0
- package/dist/components/DataGrid.d.ts.map +1 -1
- package/dist/components/DataGrid.js +535 -0
- package/dist/components/DataGrid.js.map +1 -0
- package/dist/components/LoadingCover.cjs +2 -0
- package/dist/components/LoadingCover.cjs.map +1 -0
- package/dist/components/LoadingCover.d.ts +1 -0
- package/dist/components/LoadingCover.d.ts.map +1 -1
- package/dist/components/LoadingCover.js +77 -0
- package/dist/components/LoadingCover.js.map +1 -0
- package/dist/components/LogPanel.cjs +2 -0
- package/dist/components/LogPanel.cjs.map +1 -0
- package/dist/components/LogPanel.d.ts +1 -0
- package/dist/components/LogPanel.d.ts.map +1 -1
- package/dist/components/LogPanel.js +34 -0
- package/dist/components/LogPanel.js.map +1 -0
- package/dist/components/LogStore.cjs +2 -0
- package/dist/components/LogStore.cjs.map +1 -0
- package/dist/components/LogStore.d.ts +1 -0
- package/dist/components/LogStore.d.ts.map +1 -1
- package/dist/components/LogStore.js +33 -0
- package/dist/components/LogStore.js.map +1 -0
- package/dist/components/LogViewer.cjs +2 -0
- package/dist/components/LogViewer.cjs.map +1 -0
- package/dist/components/LogViewer.d.ts +1 -0
- package/dist/components/LogViewer.d.ts.map +1 -1
- package/dist/components/LogViewer.js +299 -0
- package/dist/components/LogViewer.js.map +1 -0
- package/dist/components/ProgramControl.cjs +2 -0
- package/dist/components/ProgramControl.cjs.map +1 -0
- package/dist/components/ProgramControl.d.ts +1 -0
- package/dist/components/ProgramControl.d.ts.map +1 -1
- package/dist/components/ProgramControl.js +147 -0
- package/dist/components/ProgramControl.js.map +1 -0
- package/dist/components/ProgramStateIndicator.cjs +2 -0
- package/dist/components/ProgramStateIndicator.cjs.map +1 -0
- package/dist/components/ProgramStateIndicator.d.ts +1 -0
- package/dist/components/ProgramStateIndicator.d.ts.map +1 -1
- package/dist/components/ProgramStateIndicator.js +140 -0
- package/dist/components/ProgramStateIndicator.js.map +1 -0
- package/dist/components/RobotCard.cjs +2 -0
- package/dist/components/RobotCard.cjs.map +1 -0
- package/dist/components/RobotCard.d.ts +1 -0
- package/dist/components/RobotCard.d.ts.map +1 -1
- package/dist/components/RobotCard.js +360 -0
- package/dist/components/RobotCard.js.map +1 -0
- package/dist/components/RobotListItem.cjs +2 -0
- package/dist/components/RobotListItem.cjs.map +1 -0
- package/dist/components/RobotListItem.d.ts +1 -0
- package/dist/components/RobotListItem.d.ts.map +1 -1
- package/dist/components/RobotListItem.js +122 -0
- package/dist/components/RobotListItem.js.map +1 -0
- package/dist/components/RobotSetupReadinessIndicator.cjs +2 -0
- package/dist/components/RobotSetupReadinessIndicator.cjs.map +1 -0
- package/dist/components/RobotSetupReadinessIndicator.d.ts +1 -0
- package/dist/components/RobotSetupReadinessIndicator.d.ts.map +1 -1
- package/dist/components/RobotSetupReadinessIndicator.js +122 -0
- package/dist/components/RobotSetupReadinessIndicator.js.map +1 -0
- package/dist/components/SelectableFab.cjs +2 -0
- package/dist/components/SelectableFab.cjs.map +1 -0
- package/dist/components/SelectableFab.d.ts +1 -1
- package/dist/components/SelectableFab.d.ts.map +1 -1
- package/dist/components/SelectableFab.js +51 -0
- package/dist/components/SelectableFab.js.map +1 -0
- package/dist/components/TabBar.cjs +2 -0
- package/dist/components/TabBar.cjs.map +1 -0
- package/dist/components/TabBar.d.ts +1 -0
- package/dist/components/TabBar.d.ts.map +1 -1
- package/dist/components/TabBar.js +212 -0
- package/dist/components/TabBar.js.map +1 -0
- package/dist/components/ThemeSelect.d.ts +1 -1
- package/dist/components/ThemeSelect.d.ts.map +1 -1
- package/dist/components/Timer/Timer.d.ts +1 -0
- package/dist/components/Timer/Timer.d.ts.map +1 -1
- package/dist/components/Timer/TimerDefaultVariant.cjs +2 -0
- package/dist/components/Timer/TimerDefaultVariant.cjs.map +1 -0
- package/dist/components/Timer/TimerDefaultVariant.js +136 -0
- package/dist/components/Timer/TimerDefaultVariant.js.map +1 -0
- package/dist/components/Timer/TimerSmallVariant.cjs +2 -0
- package/dist/components/Timer/TimerSmallVariant.cjs.map +1 -0
- package/dist/components/Timer/TimerSmallVariant.js +128 -0
- package/dist/components/Timer/TimerSmallVariant.js.map +1 -0
- package/dist/components/Timer/index.cjs +2 -0
- package/dist/components/Timer/index.cjs.map +1 -0
- package/dist/components/Timer/index.d.ts +1 -0
- package/dist/components/Timer/index.d.ts.map +1 -1
- package/dist/components/Timer/index.js +68 -0
- package/dist/components/Timer/index.js.map +1 -0
- package/dist/components/Timer/useTimerAnimations.cjs +2 -0
- package/dist/components/Timer/useTimerAnimations.cjs.map +1 -0
- package/dist/components/Timer/useTimerAnimations.js +48 -0
- package/dist/components/Timer/useTimerAnimations.js.map +1 -0
- package/dist/components/Timer/useTimerLogic.cjs +2 -0
- package/dist/components/Timer/useTimerLogic.cjs.map +1 -0
- package/dist/components/Timer/useTimerLogic.js +113 -0
- package/dist/components/Timer/useTimerLogic.js.map +1 -0
- package/dist/components/Timer/utils.cjs +2 -0
- package/dist/components/Timer/utils.cjs.map +1 -0
- package/dist/components/Timer/utils.js +19 -0
- package/dist/components/Timer/utils.js.map +1 -0
- package/dist/components/Timer.cjs +2 -0
- package/dist/components/Timer.cjs.map +1 -0
- package/dist/components/Timer.d.ts +4 -0
- package/dist/components/Timer.d.ts.map +1 -0
- package/dist/components/Timer.js +6 -0
- package/dist/components/Timer.js.map +1 -0
- package/dist/components/TransparentOverlay.d.ts +1 -0
- package/dist/components/TransparentOverlay.d.ts.map +1 -1
- package/dist/components/VelocitySlider.cjs +2 -0
- package/dist/components/VelocitySlider.cjs.map +1 -0
- package/dist/components/VelocitySlider.d.ts +1 -1
- package/dist/components/VelocitySlider.d.ts.map +1 -1
- package/dist/components/VelocitySlider.js +97 -0
- package/dist/components/VelocitySlider.js.map +1 -0
- package/dist/components/experimental/utils/AdornedSelect.cjs +2 -0
- package/dist/components/experimental/utils/AdornedSelect.cjs.map +1 -0
- package/dist/components/experimental/utils/AdornedSelect.js +35 -0
- package/dist/components/experimental/utils/AdornedSelect.js.map +1 -0
- package/dist/components/jogging/JoggingBlocked.cjs +2 -0
- package/dist/components/jogging/JoggingBlocked.cjs.map +1 -0
- package/dist/components/jogging/JoggingBlocked.js +46 -0
- package/dist/components/jogging/JoggingBlocked.js.map +1 -0
- package/dist/components/jogging/JoggingCartesianAxisControl.cjs +2 -0
- package/dist/components/jogging/JoggingCartesianAxisControl.cjs.map +1 -0
- package/dist/components/jogging/JoggingCartesianAxisControl.d.ts +1 -1
- package/dist/components/jogging/JoggingCartesianAxisControl.d.ts.map +1 -1
- package/dist/components/jogging/JoggingCartesianAxisControl.js +186 -0
- package/dist/components/jogging/JoggingCartesianAxisControl.js.map +1 -0
- package/dist/components/jogging/JoggingCartesianTab.cjs +2 -0
- package/dist/components/jogging/JoggingCartesianTab.cjs.map +1 -0
- package/dist/components/jogging/JoggingCartesianTab.js +267 -0
- package/dist/components/jogging/JoggingCartesianTab.js.map +1 -0
- package/dist/components/jogging/JoggingJointLimitDetector.cjs +2 -0
- package/dist/components/jogging/JoggingJointLimitDetector.cjs.map +1 -0
- package/dist/components/jogging/JoggingJointLimitDetector.js +42 -0
- package/dist/components/jogging/JoggingJointLimitDetector.js.map +1 -0
- package/dist/components/jogging/JoggingJointTab.cjs +2 -0
- package/dist/components/jogging/JoggingJointTab.cjs.map +1 -0
- package/dist/components/jogging/JoggingJointTab.js +114 -0
- package/dist/components/jogging/JoggingJointTab.js.map +1 -0
- package/dist/components/jogging/JoggingJointValueControl.cjs +2 -0
- package/dist/components/jogging/JoggingJointValueControl.cjs.map +1 -0
- package/dist/components/jogging/JoggingJointValueControl.d.ts +1 -1
- package/dist/components/jogging/JoggingJointValueControl.d.ts.map +1 -1
- package/dist/components/jogging/JoggingJointValueControl.js +240 -0
- package/dist/components/jogging/JoggingJointValueControl.js.map +1 -0
- package/dist/components/jogging/JoggingOptions.cjs +2 -0
- package/dist/components/jogging/JoggingOptions.cjs.map +1 -0
- package/dist/components/jogging/JoggingOptions.js +117 -0
- package/dist/components/jogging/JoggingOptions.js.map +1 -0
- package/dist/components/jogging/JoggingPanel.cjs +2 -0
- package/dist/components/jogging/JoggingPanel.cjs.map +1 -0
- package/dist/components/jogging/JoggingPanel.d.ts +1 -0
- package/dist/components/jogging/JoggingPanel.d.ts.map +1 -1
- package/dist/components/jogging/JoggingPanel.js +121 -0
- package/dist/components/jogging/JoggingPanel.js.map +1 -0
- package/dist/components/jogging/JoggingStore.cjs +2 -0
- package/dist/components/jogging/JoggingStore.cjs.map +1 -0
- package/dist/components/jogging/JoggingStore.d.ts +1 -1
- package/dist/components/jogging/JoggingStore.d.ts.map +1 -1
- package/dist/components/jogging/JoggingStore.js +219 -0
- package/dist/components/jogging/JoggingStore.js.map +1 -0
- package/dist/components/jogging/JoggingToggleButtonGroup.cjs +2 -0
- package/dist/components/jogging/JoggingToggleButtonGroup.cjs.map +1 -0
- package/dist/components/jogging/JoggingToggleButtonGroup.js +29 -0
- package/dist/components/jogging/JoggingToggleButtonGroup.js.map +1 -0
- package/dist/components/jogging/JoggingVelocitySlider.cjs +2 -0
- package/dist/components/jogging/JoggingVelocitySlider.cjs.map +1 -0
- package/dist/components/jogging/JoggingVelocitySlider.js +40 -0
- package/dist/components/jogging/JoggingVelocitySlider.js.map +1 -0
- package/dist/components/jogging/PoseCartesianValues.cjs +2 -0
- package/dist/components/jogging/PoseCartesianValues.cjs.map +1 -0
- package/dist/components/jogging/PoseCartesianValues.d.ts +1 -0
- package/dist/components/jogging/PoseCartesianValues.d.ts.map +1 -1
- package/dist/components/jogging/PoseCartesianValues.js +48 -0
- package/dist/components/jogging/PoseCartesianValues.js.map +1 -0
- package/dist/components/jogging/PoseJointValues.cjs +2 -0
- package/dist/components/jogging/PoseJointValues.cjs.map +1 -0
- package/dist/components/jogging/PoseJointValues.d.ts +1 -0
- package/dist/components/jogging/PoseJointValues.d.ts.map +1 -1
- package/dist/components/jogging/PoseJointValues.js +47 -0
- package/dist/components/jogging/PoseJointValues.js.map +1 -0
- package/dist/components/modal/NoMotionGroupModal.cjs +2 -0
- package/dist/components/modal/NoMotionGroupModal.cjs.map +1 -0
- package/dist/components/modal/NoMotionGroupModal.d.ts +1 -0
- package/dist/components/modal/NoMotionGroupModal.d.ts.map +1 -1
- package/dist/components/modal/NoMotionGroupModal.js +92 -0
- package/dist/components/modal/NoMotionGroupModal.js.map +1 -0
- package/dist/components/robots/AxisConfig.cjs +2 -0
- package/dist/components/robots/AxisConfig.cjs.map +1 -0
- package/dist/components/robots/AxisConfig.js +5 -0
- package/dist/components/robots/AxisConfig.js.map +1 -0
- package/dist/components/robots/DHLinearAxis.cjs +2 -0
- package/dist/components/robots/DHLinearAxis.cjs.map +1 -0
- package/dist/components/robots/DHLinearAxis.d.ts +1 -0
- package/dist/components/robots/DHLinearAxis.d.ts.map +1 -1
- package/dist/components/robots/DHLinearAxis.js +92 -0
- package/dist/components/robots/DHLinearAxis.js.map +1 -0
- package/dist/components/robots/DHRobot.cjs +2 -0
- package/dist/components/robots/DHRobot.cjs.map +1 -0
- package/dist/components/robots/DHRobot.d.ts +1 -0
- package/dist/components/robots/DHRobot.d.ts.map +1 -1
- package/dist/components/robots/DHRobot.js +94 -0
- package/dist/components/robots/DHRobot.js.map +1 -0
- package/dist/components/robots/GenericRobot.cjs +2 -0
- package/dist/components/robots/GenericRobot.cjs.map +1 -0
- package/dist/components/robots/GenericRobot.d.ts +1 -0
- package/dist/components/robots/GenericRobot.d.ts.map +1 -1
- package/dist/components/robots/GenericRobot.js +91 -0
- package/dist/components/robots/GenericRobot.js.map +1 -0
- package/dist/components/robots/LinearAxis.cjs +2 -0
- package/dist/components/robots/LinearAxis.cjs.map +1 -0
- package/dist/components/robots/LinearAxis.d.ts +1 -0
- package/dist/components/robots/LinearAxis.d.ts.map +1 -1
- package/dist/components/robots/LinearAxis.js +42 -0
- package/dist/components/robots/LinearAxis.js.map +1 -0
- package/dist/components/robots/LinearAxisAnimator.cjs +2 -0
- package/dist/components/robots/LinearAxisAnimator.cjs.map +1 -0
- package/dist/components/robots/LinearAxisAnimator.js +66 -0
- package/dist/components/robots/LinearAxisAnimator.js.map +1 -0
- package/dist/components/robots/MotionGroupVisualizer.cjs +2 -0
- package/dist/components/robots/MotionGroupVisualizer.cjs.map +1 -0
- package/dist/components/robots/MotionGroupVisualizer.d.ts +1 -0
- package/dist/components/robots/MotionGroupVisualizer.d.ts.map +1 -1
- package/dist/components/robots/MotionGroupVisualizer.js +21 -0
- package/dist/components/robots/MotionGroupVisualizer.js.map +1 -0
- package/dist/components/robots/Robot.cjs +2 -0
- package/dist/components/robots/Robot.cjs.map +1 -0
- package/dist/components/robots/Robot.d.ts +1 -0
- package/dist/components/robots/Robot.d.ts.map +1 -1
- package/dist/components/robots/Robot.js +31 -0
- package/dist/components/robots/Robot.js.map +1 -0
- package/dist/components/robots/RobotAnimator.cjs +2 -0
- package/dist/components/robots/RobotAnimator.cjs.map +1 -0
- package/dist/components/robots/RobotAnimator.js +66 -0
- package/dist/components/robots/RobotAnimator.js.map +1 -0
- package/dist/components/robots/SupportedLinearAxis.cjs +2 -0
- package/dist/components/robots/SupportedLinearAxis.cjs.map +1 -0
- package/dist/components/robots/SupportedLinearAxis.d.ts +1 -0
- package/dist/components/robots/SupportedLinearAxis.d.ts.map +1 -1
- package/dist/components/robots/SupportedLinearAxis.js +82 -0
- package/dist/components/robots/SupportedLinearAxis.js.map +1 -0
- package/dist/components/robots/SupportedRobot.cjs +2 -0
- package/dist/components/robots/SupportedRobot.cjs.map +1 -0
- package/dist/components/robots/SupportedRobot.d.ts +1 -0
- package/dist/components/robots/SupportedRobot.d.ts.map +1 -1
- package/dist/components/robots/SupportedRobot.js +82 -0
- package/dist/components/robots/SupportedRobot.js.map +1 -0
- package/dist/components/robots/ghostStyle.cjs +2 -0
- package/dist/components/robots/ghostStyle.cjs.map +1 -0
- package/dist/components/robots/ghostStyle.js +40 -0
- package/dist/components/robots/ghostStyle.js.map +1 -0
- package/dist/components/robots/manufacturerHomePositions.cjs +2 -0
- package/dist/components/robots/manufacturerHomePositions.cjs.map +1 -0
- package/dist/components/robots/manufacturerHomePositions.js +51 -0
- package/dist/components/robots/manufacturerHomePositions.js.map +1 -0
- package/dist/components/robots/robotModelLogic.cjs +2 -0
- package/dist/components/robots/robotModelLogic.cjs.map +1 -0
- package/dist/components/robots/robotModelLogic.js +61 -0
- package/dist/components/robots/robotModelLogic.js.map +1 -0
- package/dist/components/safetyBar/ControllerTypeIndicator.cjs +2 -0
- package/dist/components/safetyBar/ControllerTypeIndicator.cjs.map +1 -0
- package/dist/components/safetyBar/ControllerTypeIndicator.d.ts +1 -1
- package/dist/components/safetyBar/ControllerTypeIndicator.d.ts.map +1 -1
- package/dist/components/safetyBar/ControllerTypeIndicator.js +71 -0
- package/dist/components/safetyBar/ControllerTypeIndicator.js.map +1 -0
- package/dist/components/safetyBar/IndicatorWithExplanation.cjs +2 -0
- package/dist/components/safetyBar/IndicatorWithExplanation.cjs.map +1 -0
- package/dist/components/safetyBar/IndicatorWithExplanation.d.ts +1 -0
- package/dist/components/safetyBar/IndicatorWithExplanation.d.ts.map +1 -1
- package/dist/components/safetyBar/IndicatorWithExplanation.js +123 -0
- package/dist/components/safetyBar/IndicatorWithExplanation.js.map +1 -0
- package/dist/components/safetyBar/OperationModeIndicator.cjs +2 -0
- package/dist/components/safetyBar/OperationModeIndicator.cjs.map +1 -0
- package/dist/components/safetyBar/OperationModeIndicator.d.ts +1 -1
- package/dist/components/safetyBar/OperationModeIndicator.d.ts.map +1 -1
- package/dist/components/safetyBar/OperationModeIndicator.js +75 -0
- package/dist/components/safetyBar/OperationModeIndicator.js.map +1 -0
- package/dist/components/safetyBar/SafetyBar.cjs +2 -0
- package/dist/components/safetyBar/SafetyBar.cjs.map +1 -0
- package/dist/components/safetyBar/SafetyBar.d.ts +1 -0
- package/dist/components/safetyBar/SafetyBar.d.ts.map +1 -1
- package/dist/components/safetyBar/SafetyBar.js +66 -0
- package/dist/components/safetyBar/SafetyBar.js.map +1 -0
- package/dist/components/safetyBar/SafetyStateIndicator.cjs +2 -0
- package/dist/components/safetyBar/SafetyStateIndicator.cjs.map +1 -0
- package/dist/components/safetyBar/SafetyStateIndicator.d.ts +1 -1
- package/dist/components/safetyBar/SafetyStateIndicator.d.ts.map +1 -1
- package/dist/components/safetyBar/SafetyStateIndicator.js +126 -0
- package/dist/components/safetyBar/SafetyStateIndicator.js.map +1 -0
- package/dist/components/safetyBar/icons/controller-type-physical.svg.cjs +2 -0
- package/dist/components/safetyBar/icons/controller-type-physical.svg.cjs.map +1 -0
- package/dist/components/safetyBar/icons/controller-type-physical.svg.d.ts +3 -0
- package/dist/components/safetyBar/icons/controller-type-physical.svg.js +11 -0
- package/dist/components/safetyBar/icons/controller-type-physical.svg.js.map +1 -0
- package/dist/components/safetyBar/icons/controller-type-virtual.svg.cjs +2 -0
- package/dist/components/safetyBar/icons/controller-type-virtual.svg.cjs.map +1 -0
- package/dist/components/safetyBar/icons/controller-type-virtual.svg.d.ts +3 -0
- package/dist/components/safetyBar/icons/controller-type-virtual.svg.js +11 -0
- package/dist/components/safetyBar/icons/controller-type-virtual.svg.js.map +1 -0
- package/dist/components/safetyBar/icons/operation-mode-automatic.svg.cjs +2 -0
- package/dist/components/safetyBar/icons/operation-mode-automatic.svg.cjs.map +1 -0
- package/dist/components/safetyBar/icons/operation-mode-automatic.svg.d.ts +3 -0
- package/dist/components/safetyBar/icons/operation-mode-automatic.svg.js +11 -0
- package/dist/components/safetyBar/icons/operation-mode-automatic.svg.js.map +1 -0
- package/dist/components/safetyBar/icons/operation-mode-error.svg.cjs +2 -0
- package/dist/components/safetyBar/icons/operation-mode-error.svg.cjs.map +1 -0
- package/dist/components/safetyBar/icons/operation-mode-error.svg.d.ts +3 -0
- package/dist/components/safetyBar/icons/operation-mode-error.svg.js +11 -0
- package/dist/components/safetyBar/icons/operation-mode-error.svg.js.map +1 -0
- package/dist/components/safetyBar/icons/operation-mode-manual.svg.cjs +2 -0
- package/dist/components/safetyBar/icons/operation-mode-manual.svg.cjs.map +1 -0
- package/dist/components/safetyBar/icons/operation-mode-manual.svg.d.ts +3 -0
- package/dist/components/safetyBar/icons/operation-mode-manual.svg.js +11 -0
- package/dist/components/safetyBar/icons/operation-mode-manual.svg.js.map +1 -0
- package/dist/components/safetyBar/icons/safety-state-error.svg.cjs +2 -0
- package/dist/components/safetyBar/icons/safety-state-error.svg.cjs.map +1 -0
- package/dist/components/safetyBar/icons/safety-state-error.svg.d.ts +3 -0
- package/dist/components/safetyBar/icons/safety-state-error.svg.js +11 -0
- package/dist/components/safetyBar/icons/safety-state-error.svg.js.map +1 -0
- package/dist/components/safetyBar/icons/safety-state-estop.svg.cjs +2 -0
- package/dist/components/safetyBar/icons/safety-state-estop.svg.cjs.map +1 -0
- package/dist/components/safetyBar/icons/safety-state-estop.svg.d.ts +3 -0
- package/dist/components/safetyBar/icons/safety-state-estop.svg.js +11 -0
- package/dist/components/safetyBar/icons/safety-state-estop.svg.js.map +1 -0
- package/dist/components/safetyBar/icons/safety-state-manual-action-required.svg.cjs +2 -0
- package/dist/components/safetyBar/icons/safety-state-manual-action-required.svg.cjs.map +1 -0
- package/dist/components/safetyBar/icons/safety-state-manual-action-required.svg.d.ts +3 -0
- package/dist/components/safetyBar/icons/safety-state-manual-action-required.svg.js +11 -0
- package/dist/components/safetyBar/icons/safety-state-manual-action-required.svg.js.map +1 -0
- package/dist/components/safetyBar/icons/safety-state-normal.svg.cjs +2 -0
- package/dist/components/safetyBar/icons/safety-state-normal.svg.cjs.map +1 -0
- package/dist/components/safetyBar/icons/safety-state-normal.svg.d.ts +3 -0
- package/dist/components/safetyBar/icons/safety-state-normal.svg.js +11 -0
- package/dist/components/safetyBar/icons/safety-state-normal.svg.js.map +1 -0
- package/dist/components/safetyBar/icons/safety-state-stop.svg.cjs +2 -0
- package/dist/components/safetyBar/icons/safety-state-stop.svg.cjs.map +1 -0
- package/dist/components/safetyBar/icons/safety-state-stop.svg.d.ts +3 -0
- package/dist/components/safetyBar/icons/safety-state-stop.svg.js +11 -0
- package/dist/components/safetyBar/icons/safety-state-stop.svg.js.map +1 -0
- package/dist/components/utils/converters.cjs +2 -0
- package/dist/components/utils/converters.cjs.map +1 -0
- package/dist/components/utils/converters.js +40 -0
- package/dist/components/utils/converters.js.map +1 -0
- package/dist/components/utils/errorHandling.cjs +2 -0
- package/dist/components/utils/errorHandling.cjs.map +1 -0
- package/dist/components/utils/errorHandling.js +14 -0
- package/dist/components/utils/errorHandling.js.map +1 -0
- package/dist/components/utils/hooks.cjs +2 -0
- package/dist/components/utils/hooks.cjs.map +1 -0
- package/dist/components/utils/hooks.js +29 -0
- package/dist/components/utils/hooks.js.map +1 -0
- package/dist/components/utils/interpolation.cjs +2 -0
- package/dist/components/utils/interpolation.cjs.map +1 -0
- package/dist/components/utils/interpolation.js +138 -0
- package/dist/components/utils/interpolation.js.map +1 -0
- package/dist/core.cjs +2 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.js +81 -0
- package/dist/core.js.map +1 -0
- package/dist/externalizeComponent.cjs +2 -0
- package/dist/externalizeComponent.cjs.map +1 -0
- package/dist/externalizeComponent.js +13 -0
- package/dist/externalizeComponent.js.map +1 -0
- package/dist/i18n/config.cjs +2 -0
- package/dist/i18n/config.cjs.map +1 -0
- package/dist/i18n/config.js +25 -0
- package/dist/i18n/config.js.map +1 -0
- package/dist/i18n/locales/de/translations.json.cjs +3 -0
- package/dist/i18n/locales/de/translations.json.cjs.map +1 -0
- package/dist/i18n/locales/de/translations.json.js +94 -0
- package/dist/i18n/locales/de/translations.json.js.map +1 -0
- package/dist/i18n/locales/en/translations.json.cjs +2 -0
- package/dist/i18n/locales/en/translations.json.cjs.map +1 -0
- package/dist/i18n/locales/en/translations.json.js +94 -0
- package/dist/i18n/locales/en/translations.json.js.map +1 -0
- package/dist/icons/DropdownArrowIcon.cjs +2 -0
- package/dist/icons/DropdownArrowIcon.cjs.map +1 -0
- package/dist/icons/DropdownArrowIcon.js +14 -0
- package/dist/icons/DropdownArrowIcon.js.map +1 -0
- package/dist/icons/axis-x.svg.cjs +2 -0
- package/dist/icons/axis-x.svg.cjs.map +1 -0
- package/dist/icons/axis-x.svg.d.ts +3 -0
- package/dist/icons/axis-x.svg.js +11 -0
- package/dist/icons/axis-x.svg.js.map +1 -0
- package/dist/icons/axis-y.svg.cjs +2 -0
- package/dist/icons/axis-y.svg.cjs.map +1 -0
- package/dist/icons/axis-y.svg.d.ts +3 -0
- package/dist/icons/axis-y.svg.js +11 -0
- package/dist/icons/axis-y.svg.js.map +1 -0
- package/dist/icons/axis-z.svg.cjs +2 -0
- package/dist/icons/axis-z.svg.cjs.map +1 -0
- package/dist/icons/axis-z.svg.d.ts +3 -0
- package/dist/icons/axis-z.svg.js +11 -0
- package/dist/icons/axis-z.svg.js.map +1 -0
- package/dist/icons/home.svg.cjs +2 -0
- package/dist/icons/home.svg.cjs.map +1 -0
- package/dist/icons/home.svg.d.ts +3 -0
- package/dist/icons/home.svg.js +11 -0
- package/dist/icons/home.svg.js.map +1 -0
- package/dist/icons/jog-minus.svg.cjs +2 -0
- package/dist/icons/jog-minus.svg.cjs.map +1 -0
- package/dist/icons/jog-minus.svg.d.ts +3 -0
- package/dist/icons/jog-minus.svg.js +11 -0
- package/dist/icons/jog-minus.svg.js.map +1 -0
- package/dist/icons/jog-plus.svg.cjs +2 -0
- package/dist/icons/jog-plus.svg.cjs.map +1 -0
- package/dist/icons/jog-plus.svg.d.ts +3 -0
- package/dist/icons/jog-plus.svg.js +11 -0
- package/dist/icons/jog-plus.svg.js.map +1 -0
- package/dist/icons/jogging.svg.cjs +2 -0
- package/dist/icons/jogging.svg.cjs.map +1 -0
- package/dist/icons/jogging.svg.d.ts +3 -0
- package/dist/icons/jogging.svg.js +11 -0
- package/dist/icons/jogging.svg.js.map +1 -0
- package/dist/icons/orientation-coord-system.svg.cjs +2 -0
- package/dist/icons/orientation-coord-system.svg.cjs.map +1 -0
- package/dist/icons/orientation-coord-system.svg.d.ts +3 -0
- package/dist/icons/orientation-coord-system.svg.js +11 -0
- package/dist/icons/orientation-coord-system.svg.js.map +1 -0
- package/dist/icons/orientation-tool.svg.cjs +2 -0
- package/dist/icons/orientation-tool.svg.cjs.map +1 -0
- package/dist/icons/orientation-tool.svg.d.ts +3 -0
- package/dist/icons/orientation-tool.svg.js +11 -0
- package/dist/icons/orientation-tool.svg.js.map +1 -0
- package/dist/icons/robot.svg.cjs +2 -0
- package/dist/icons/robot.svg.cjs.map +1 -0
- package/dist/icons/robot.svg.d.ts +3 -0
- package/dist/icons/robot.svg.js +11 -0
- package/dist/icons/robot.svg.js.map +1 -0
- package/dist/icons/rotation.svg.cjs +2 -0
- package/dist/icons/rotation.svg.cjs.map +1 -0
- package/dist/icons/rotation.svg.d.ts +3 -0
- package/dist/icons/rotation.svg.js +11 -0
- package/dist/icons/rotation.svg.js.map +1 -0
- package/dist/icons/wbLogo.svg.cjs +2 -0
- package/dist/icons/wbLogo.svg.cjs.map +1 -0
- package/dist/icons/wbLogo.svg.d.ts +3 -0
- package/dist/icons/wbLogo.svg.js +11 -0
- package/dist/icons/wbLogo.svg.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +153 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/ConnectedMotionGroup.cjs +4 -0
- package/dist/lib/ConnectedMotionGroup.cjs.map +1 -0
- package/dist/lib/ConnectedMotionGroup.d.ts +1 -0
- package/dist/lib/ConnectedMotionGroup.d.ts.map +1 -1
- package/dist/lib/ConnectedMotionGroup.js +250 -0
- package/dist/lib/ConnectedMotionGroup.js.map +1 -0
- package/dist/lib/JoggerConnection.cjs +2 -0
- package/dist/lib/JoggerConnection.cjs.map +1 -0
- package/dist/lib/JoggerConnection.d.ts +1 -0
- package/dist/lib/JoggerConnection.d.ts.map +1 -1
- package/dist/lib/JoggerConnection.js +342 -0
- package/dist/lib/JoggerConnection.js.map +1 -0
- package/dist/lib/MotionStreamConnection.cjs +3 -0
- package/dist/lib/MotionStreamConnection.cjs.map +1 -0
- package/dist/lib/MotionStreamConnection.d.ts +1 -0
- package/dist/lib/MotionStreamConnection.d.ts.map +1 -1
- package/dist/lib/MotionStreamConnection.js +94 -0
- package/dist/lib/MotionStreamConnection.js.map +1 -0
- package/dist/lib/motionStateUpdate.cjs +2 -0
- package/dist/lib/motionStateUpdate.cjs.map +1 -0
- package/dist/lib/motionStateUpdate.js +49 -0
- package/dist/lib/motionStateUpdate.js.map +1 -0
- package/dist/test/consumer.test.d.ts +2 -0
- package/dist/test/consumer.test.d.ts.map +1 -0
- package/dist/themes/createDarkTheme.cjs +2 -0
- package/dist/themes/createDarkTheme.cjs.map +1 -0
- package/dist/themes/createDarkTheme.js +344 -0
- package/dist/themes/createDarkTheme.js.map +1 -0
- package/dist/themes/createLightTheme.cjs +2 -0
- package/dist/themes/createLightTheme.cjs.map +1 -0
- package/dist/themes/createLightTheme.js +9 -0
- package/dist/themes/createLightTheme.js.map +1 -0
- package/dist/themes/theming.cjs +2 -0
- package/dist/themes/theming.cjs.map +1 -0
- package/dist/themes/theming.js +14 -0
- package/dist/themes/theming.js.map +1 -0
- package/dist/wb-icons.cjs +2 -0
- package/dist/wb-icons.cjs.map +1 -0
- package/dist/wb-icons.js +47 -0
- package/dist/wb-icons.js.map +1 -0
- package/package.json +20 -9
- package/src/components/3d-viewport/CoordinateSystemTransform.tsx +2 -0
- package/src/components/3d-viewport/PresetEnvironment.tsx +2 -0
- package/src/components/3d-viewport/SafetyZonesRenderer.tsx +2 -0
- package/src/components/3d-viewport/TrajectoryRenderer.tsx +2 -0
- package/src/components/AppHeader.tsx +2 -0
- package/src/components/CopyableText.tsx +2 -0
- package/src/components/CycleTimer/CycleTimer.ts +2 -0
- package/src/components/CycleTimer/index.tsx +2 -0
- package/src/components/CycleTimer.tsx +2 -0
- package/src/components/DataGrid.tsx +2 -0
- package/src/components/LoadingCover.tsx +2 -0
- package/src/components/LogPanel.tsx +2 -0
- package/src/components/LogStore.ts +2 -0
- package/src/components/LogViewer.tsx +2 -0
- package/src/components/ProgramControl.tsx +2 -0
- package/src/components/ProgramStateIndicator.tsx +2 -0
- package/src/components/RobotCard.tsx +2 -0
- package/src/components/RobotListItem.tsx +2 -0
- package/src/components/RobotSetupReadinessIndicator.tsx +2 -0
- package/src/components/SelectableFab.tsx +2 -0
- package/src/components/TabBar.tsx +2 -0
- package/src/components/ThemeSelect.tsx +2 -0
- package/src/components/Timer/Timer.ts +2 -0
- package/src/components/Timer/index.tsx +2 -0
- package/src/components/Timer.ts +4 -0
- package/src/components/TransparentOverlay.tsx +2 -0
- package/src/components/VelocitySlider.tsx +2 -0
- package/src/components/jogging/JoggingCartesianAxisControl.tsx +2 -0
- package/src/components/jogging/JoggingJointValueControl.tsx +2 -0
- package/src/components/jogging/JoggingPanel.tsx +2 -0
- package/src/components/jogging/JoggingStore.ts +2 -0
- package/src/components/jogging/PoseCartesianValues.tsx +2 -0
- package/src/components/jogging/PoseJointValues.tsx +2 -0
- package/src/components/modal/NoMotionGroupModal.tsx +2 -0
- package/src/components/robots/DHLinearAxis.tsx +2 -0
- package/src/components/robots/DHRobot.tsx +2 -0
- package/src/components/robots/GenericRobot.tsx +2 -0
- package/src/components/robots/LinearAxis.tsx +2 -0
- package/src/components/robots/MotionGroupVisualizer.tsx +2 -0
- package/src/components/robots/Robot.tsx +2 -0
- package/src/components/robots/SupportedLinearAxis.tsx +2 -0
- package/src/components/robots/SupportedRobot.tsx +2 -0
- package/src/components/safetyBar/ControllerTypeIndicator.tsx +2 -0
- package/src/components/safetyBar/IndicatorWithExplanation.tsx +2 -0
- package/src/components/safetyBar/OperationModeIndicator.tsx +2 -0
- package/src/components/safetyBar/SafetyBar.tsx +2 -0
- package/src/components/safetyBar/SafetyStateIndicator.tsx +2 -0
- package/src/lib/ConnectedMotionGroup.ts +2 -0
- package/src/lib/JoggerConnection.ts +2 -0
- package/src/lib/MotionStreamConnection.ts +2 -0
- package/src/test/consumer.test.ts +230 -0
- package/dist/3d.cjs.js +0 -2
- package/dist/3d.cjs.js.map +0 -1
- package/dist/3d.es.js +0 -19
- package/dist/3d.es.js.map +0 -1
- package/dist/MotionGroupVisualizer-B-e22qXF.cjs +0 -2
- package/dist/MotionGroupVisualizer-B-e22qXF.cjs.map +0 -1
- package/dist/MotionGroupVisualizer-CIASsBC6.js +0 -1433
- package/dist/MotionGroupVisualizer-CIASsBC6.js.map +0 -1
- package/dist/auth0-spa-js.production.esm-CVEdrQ4-.cjs +0 -5
- package/dist/auth0-spa-js.production.esm-CVEdrQ4-.cjs.map +0 -1
- package/dist/auth0-spa-js.production.esm-Cr9w0sUa.js +0 -4217
- package/dist/auth0-spa-js.production.esm-Cr9w0sUa.js.map +0 -1
- package/dist/core.cjs.js +0 -2
- package/dist/core.cjs.js.map +0 -1
- package/dist/core.es.js +0 -52
- package/dist/core.es.js.map +0 -1
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js +0 -92
- package/dist/index.es.js.map +0 -1
- package/dist/interpolation-BIB6FC35.cjs +0 -198
- package/dist/interpolation-BIB6FC35.cjs.map +0 -1
- package/dist/interpolation-lSTX6ZXZ.js +0 -14559
- package/dist/interpolation-lSTX6ZXZ.js.map +0 -1
- package/dist/safety-state-stop-ClWLVLMl.cjs +0 -2
- package/dist/safety-state-stop-ClWLVLMl.cjs.map +0 -1
- package/dist/safety-state-stop-DuMBCxN5.js +0 -91
- package/dist/safety-state-stop-DuMBCxN5.js.map +0 -1
- package/dist/theming-D_pShDEg.js +0 -32236
- package/dist/theming-D_pShDEg.js.map +0 -1
- package/dist/theming-L5E8VSae.cjs +0 -84
- package/dist/theming-L5E8VSae.cjs.map +0 -1
- package/dist/wb-icons.cjs.js +0 -2
- package/dist/wb-icons.cjs.js.map +0 -1
- package/dist/wb-icons.es.js +0 -27
- package/dist/wb-icons.es.js.map +0 -1
- package/dist/wbLogo-CObCmqTw.js +0 -31
- package/dist/wbLogo-CObCmqTw.js.map +0 -1
- package/dist/wbLogo-G_IfZ03l.cjs +0 -2
- package/dist/wbLogo-G_IfZ03l.cjs.map +0 -1
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";var ph=Object.defineProperty;var fh=(e,t,n)=>t in e?ph(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var se=(e,t,n)=>fh(e,typeof t!="symbol"?t+"":t,n);const c=require("./interpolation-BIB6FC35.cjs"),Oe=require("mobx-react-lite"),L=require("react"),s=require("prop-types"),Pe=require("react-i18next"),xt=require("@mui/x-data-grid"),oa=require("lodash-es"),Ie=require("mobx"),Ge=require("@wandelbots/nova-js"),He=require("./safety-state-stop-ClWLVLMl.cjs"),wr=require("react-dom"),Al=require("axios"),hh=require("@mui/x-charts"),ks=require("three");function ia(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const C=ia(L),mh=ia(wr),_l=ia(ks);function gh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const xh=c.createStyled();function yh(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:c.resolveProps(t.components[n].defaultProps,r)}function dd({props:e,name:t,defaultTheme:n,themeId:r}){let o=c.useTheme$1(n);return r&&(o=o[r]||o),yh({theme:o,name:t,props:e})}const bh="exact-prop: ";function pd(e){return process.env.NODE_ENV==="production"?e:{...e,[bh]:t=>{const n=Object.keys(t).filter(r=>!e.hasOwnProperty(r));return n.length>0?new Error(`The following props are not supported: ${n.map(r=>`\`${r}\``).join(", ")}. Please remove them.`):null}}}const vh=C.createContext();process.env.NODE_ENV!=="production"&&(s.node,s.bool);const sr=()=>C.useContext(vh)??!1;function ts(e,t){var n,r,o;return C.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}const Eh=c.createTheme(),Th=xh("div",{name:"MuiStack",slot:"Root"});function Sh(e){return dd({props:e,name:"MuiStack",defaultTheme:Eh})}function wh(e,t){const n=C.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i<n.length-1&&r.push(C.cloneElement(t,{key:`separator-${i}`})),r),[])}const Ch=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Rh=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...c.handleBreakpoints({theme:t},c.resolveBreakpointValues({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=c.createUnarySpacing(t),o=Object.keys(t.breakpoints.values).reduce((u,d)=>((typeof e.spacing=="object"&&e.spacing[d]!=null||typeof e.direction=="object"&&e.direction[d]!=null)&&(u[d]=!0),u),{}),i=c.resolveBreakpointValues({values:e.direction,base:o}),a=c.resolveBreakpointValues({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((u,d,p)=>{if(!i[u]){const h=d>0?i[p[d-1]]:"column";i[u]=h}});const l=(u,d)=>e.useFlexGap?{gap:c.getValue(r,u)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Ch(d?i[d]:e.direction)}`]:c.getValue(r,u)}};n=c.deepmerge(n,c.handleBreakpoints({theme:t},a,l))}return n=c.mergeBreakpointsInOrder(t.breakpoints,n),n};function jh(e={}){const{createStyledComponent:t=Th,useThemeProps:n=Sh,componentName:r="MuiStack"}=e,o=()=>{const l={root:["root"]};return c.composeClasses(l,u=>c.generateUtilityClass(r,u),{})},i=t(Rh),a=C.forwardRef(function(u,d){const p=n(u),f=c.extendSxProp(p),{component:h="div",direction:m="column",spacing:g=0,divider:y,children:x,className:b,useFlexGap:T=!1,...v}=f,E={direction:m,spacing:g,useFlexGap:T},w=o();return c.jsxRuntimeExports.jsx(i,{as:h,ownerState:E,ref:d,className:c.clsx(w.root,b),...v,children:y?wh(x,y):x})});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:s.node,direction:s.oneOfType([s.oneOf(["column-reverse","column","row-reverse","row"]),s.arrayOf(s.oneOf(["column-reverse","column","row-reverse","row"])),s.object]),divider:s.node,spacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])}),a}function Mh({props:e,name:t}){return dd({props:e,name:t,defaultTheme:c.defaultTheme,themeId:c.THEME_ID})}function Dl(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function fi(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function Ve(e){return e&&e.ownerDocument||document}function ht(e){return Ve(e).defaultView||window}function Nl(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Lo(e){const{controlled:t,default:n,name:r,state:o="value"}=e,{current:i}=C.useRef(t!==void 0),[a,l]=C.useState(n),u=i?t:a;if(process.env.NODE_ENV!=="production"){C.useEffect(()=>{i!==(t!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${o} state of ${r} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
2
|
-
`))},[o,r,t]);const{current:p}=C.useRef(n);C.useEffect(()=>{!i&&JSON.stringify(n)!==JSON.stringify(p)&&console.error([`MUI: A component is changing the default ${o} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
|
|
3
|
-
`))},[JSON.stringify(n)])}const d=C.useCallback(p=>{i||l(p)},[]);return[u,d]}function Oh(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function Ih(e,t){if(!e)return t;function n(a,l){const u={};return Object.keys(l).forEach(d=>{Oh(d,l[d])&&typeof a[d]=="function"&&(u[d]=(...p)=>{a[d](...p),l[d](...p)})}),u}if(typeof e=="function"||typeof t=="function")return a=>{const l=typeof t=="function"?t(a):t,u=typeof e=="function"?e({...a,...l}):e,d=c.clsx(a==null?void 0:a.className,l==null?void 0:l.className,u==null?void 0:u.className),p=n(u,l);return{...l,...u,...p,...!!d&&{className:d},...(l==null?void 0:l.style)&&(u==null?void 0:u.style)&&{style:{...l.style,...u.style}},...(l==null?void 0:l.sx)&&(u==null?void 0:u.sx)&&{sx:[...Array.isArray(l.sx)?l.sx:[l.sx],...Array.isArray(u.sx)?u.sx:[u.sx]]}}};const r=t,o=n(e,r),i=c.clsx(r==null?void 0:r.className,e==null?void 0:e.className);return{...t,...e,...o,...!!i&&{className:i},...(r==null?void 0:r.style)&&(e==null?void 0:e.style)&&{style:{...r.style,...e.style}},...(r==null?void 0:r.sx)&&(e==null?void 0:e.sx)&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const $l={disabled:!1};var Ph=process.env.NODE_ENV!=="production"?s.oneOfType([s.number,s.shape({enter:s.number,exit:s.number,appear:s.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&s.oneOfType([s.string,s.shape({enter:s.string,exit:s.string,active:s.string}),s.shape({enter:s.string,enterDone:s.string,enterActive:s.string,exit:s.string,exitDone:s.string,exitActive:s.string})]);var kh=function(t){return t.scrollTop},Cr="unmounted",mn="exited",gn="entering",Un="entered",As="exiting",_t=(function(e){c._inheritsLoose(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,l=a&&!a.isMounting?r.enter:r.appear,u;return i.appearStatus=null,r.in?l?(u=mn,i.appearStatus=gn):u=Un:r.unmountOnExit||r.mountOnEnter?u=Cr:u=mn,i.state={status:u},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Cr?{status:mn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==gn&&a!==Un&&(i=gn):(a===gn||a===Un)&&(i=As)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,l;return i=a=l=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,l=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:l}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===gn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:wr.findDOMNode(this);a&&kh(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===mn&&this.setState({status:Cr})},n.performEnter=function(o){var i=this,a=this.props.enter,l=this.context?this.context.isMounting:o,u=this.props.nodeRef?[l]:[wr.findDOMNode(this),l],d=u[0],p=u[1],f=this.getTimeouts(),h=l?f.appear:f.enter;if(!o&&!a||$l.disabled){this.safeSetState({status:Un},function(){i.props.onEntered(d)});return}this.props.onEnter(d,p),this.safeSetState({status:gn},function(){i.props.onEntering(d,p),i.onTransitionEnd(h,function(){i.safeSetState({status:Un},function(){i.props.onEntered(d,p)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),l=this.props.nodeRef?void 0:wr.findDOMNode(this);if(!i||$l.disabled){this.safeSetState({status:mn},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:As},function(){o.props.onExiting(l),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:mn},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(l){a&&(a=!1,i.nextCallback=null,o(l))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:wr.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!a||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],d=u[0],p=u[1];this.props.addEndListener(d,p)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Cr)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var l=c._objectWithoutPropertiesLoose(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return L.createElement(c.TransitionGroupContext.Provider,{value:null},typeof a=="function"?a(o,l):L.cloneElement(L.Children.only(a),l))},t})(L.Component);_t.contextType=c.TransitionGroupContext;_t.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:s.shape({current:typeof Element>"u"?s.any:function(e,t,n,r,o,i){var a=e[t];return s.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,o,i)}}),children:s.oneOfType([s.func.isRequired,s.element.isRequired]).isRequired,in:s.bool,mountOnEnter:s.bool,unmountOnExit:s.bool,appear:s.bool,enter:s.bool,exit:s.bool,timeout:function(t){var n=Ph;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.apply(void 0,[t].concat(o))},addEndListener:s.func,onEnter:s.func,onEntering:s.func,onEntered:s.func,onExit:s.func,onExiting:s.func,onExited:s.func}:{};function $n(){}_t.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:$n,onEntering:$n,onEntered:$n,onExit:$n,onExiting:$n,onExited:$n};_t.UNMOUNTED=Cr;_t.EXITED=mn;_t.ENTERING=gn;_t.ENTERED=Un;_t.EXITING=As;function Ah(e){return c.generateUtilityClass("MuiAppBar",e)}c.generateUtilityClasses("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const _h=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${c.capitalize(t)}`,`position${c.capitalize(n)}`]};return c.composeClasses(o,Ah,r)},zl=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,Dh=c.styled(c.Paper,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${c.capitalize(n.position)}`],t[`color${c.capitalize(n.color)}`]]}})(c.memoTheme(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit",color:"var(--AppBar-color)"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?zl(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?zl(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),fd=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:l="fixed",...u}=r,d={...r,color:i,position:l,enableColorOnDark:a},p=_h(d);return c.jsxRuntimeExports.jsx(Dh,{square:!0,component:"header",ownerState:d,elevation:4,className:c.clsx(p.root,o,l==="fixed"&&"mui-fixed"),ref:n,...u})});process.env.NODE_ENV!=="production"&&(fd.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["default","inherit","primary","secondary","transparent","error","info","success","warning"]),s.string]),elevation:s.number,enableColorOnDark:s.bool,position:s.oneOf(["absolute","fixed","relative","static","sticky"]),square:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Nh(e){const{prototype:t={}}=e;return!!t.isReactComponent}function hd(e,t,n,r,o){const i=e[t],a=o||t;if(i==null||typeof window>"u")return null;let l;const u=i.type;return typeof u=="function"&&!Nh(u)&&(l="Did you accidentally use a plain function component for an element instead?"),l!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const ar=c.chainPropTypes(s.element,hd);ar.isRequired=c.chainPropTypes(s.element.isRequired,hd);function lr(e){var t;return parseInt(C.version,10)>=19?((t=e==null?void 0:e.props)==null?void 0:t.ref)||null:(e==null?void 0:e.ref)||null}const md=e=>e.scrollTop;function Fo(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}const $h={entering:{opacity:1},entered:{opacity:1}},yt=C.forwardRef(function(t,n){const r=c.useTheme(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:l,easing:u,in:d,onEnter:p,onEntered:f,onEntering:h,onExit:m,onExited:g,onExiting:y,style:x,timeout:b=o,TransitionComponent:T=_t,...v}=t,E=C.useRef(null),w=c.useForkRef(E,lr(l),n),S=P=>N=>{if(P){const _=E.current;N===void 0?P(_):P(_,N)}},R=S(h),j=S((P,N)=>{md(P);const _=Fo({style:x,timeout:b,easing:u},{mode:"enter"});P.style.webkitTransition=r.transitions.create("opacity",_),P.style.transition=r.transitions.create("opacity",_),p&&p(P,N)}),M=S(f),I=S(y),k=S(P=>{const N=Fo({style:x,timeout:b,easing:u},{mode:"exit"});P.style.webkitTransition=r.transitions.create("opacity",N),P.style.transition=r.transitions.create("opacity",N),m&&m(P)}),D=S(g),O=P=>{i&&i(E.current,P)};return c.jsxRuntimeExports.jsx(T,{appear:a,in:d,nodeRef:E,onEnter:j,onEntered:M,onEntering:R,onExit:k,onExited:D,onExiting:I,addEndListener:O,timeout:b,...v,children:(P,{ownerState:N,..._})=>C.cloneElement(l,{style:{opacity:0,visibility:P==="exited"&&!d?"hidden":void 0,...$h[P],...x,...l.props.style},ref:w,..._})})});process.env.NODE_ENV!=="production"&&(yt.propTypes={addEndListener:s.func,appear:s.bool,children:ar.isRequired,easing:s.oneOfType([s.shape({enter:s.string,exit:s.string}),s.string]),in:s.bool,onEnter:s.func,onEntered:s.func,onEntering:s.func,onExit:s.func,onExited:s.func,onExiting:s.func,style:s.object,timeout:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});function zh(e){return c.generateUtilityClass("MuiBackdrop",e)}c.generateUtilityClasses("MuiBackdrop",["root","invisible"]);const Lh=e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return c.composeClasses(r,zh,t)},Fh=c.styled("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),Kr=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:l=!1,open:u,components:d={},componentsProps:p={},slotProps:f={},slots:h={},TransitionComponent:m,transitionDuration:g,...y}=r,x={...r,component:a,invisible:l},b=Lh(x),T={transition:m,root:d.Root,...h},v={...p,...f},E={component:a,slots:T,slotProps:v},[w,S]=c.useSlot("root",{elementType:Fh,externalForwardedProps:E,className:c.clsx(b.root,i),ownerState:x}),[R,j]=c.useSlot("transition",{elementType:yt,externalForwardedProps:E,ownerState:x});return c.jsxRuntimeExports.jsx(R,{in:u,timeout:g,...y,...j,children:c.jsxRuntimeExports.jsx(w,{"aria-hidden":!0,...S,ref:n,children:o})})});process.env.NODE_ENV!=="production"&&(Kr.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,components:s.shape({Root:s.elementType}),componentsProps:s.shape({root:s.object}),invisible:s.bool,open:s.bool.isRequired,slotProps:s.shape({root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),TransitionComponent:s.elementType,transitionDuration:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});function Bh(e){return c.generateUtilityClass("MuiIconButton",e)}const Ll=c.generateUtilityClasses("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Uh=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e,l={root:["root",a&&"loading",n&&"disabled",r!=="default"&&`color${c.capitalize(r)}`,o&&`edge${c.capitalize(o)}`,`size${c.capitalize(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return c.composeClasses(l,Bh,t)},Vh=c.styled(c.ButtonBase,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${c.capitalize(n.color)}`],n.edge&&t[`edge${c.capitalize(n.edge)}`],t[`size${c.capitalize(n.size)}`]]}})(c.memoTheme(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),c.memoTheme(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Ll.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Ll.loading}`]:{color:"transparent"}}))),Wh=c.styled("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Ut=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:l="default",disabled:u=!1,disableFocusRipple:d=!1,size:p="medium",id:f,loading:h=null,loadingIndicator:m,...g}=r,y=c.useId(f),x=m??c.jsxRuntimeExports.jsx(c.CircularProgress,{"aria-labelledby":y,color:"inherit",size:16}),b={...r,edge:o,color:l,disabled:u,disableFocusRipple:d,loading:h,loadingIndicator:x,size:p},T=Uh(b);return c.jsxRuntimeExports.jsxs(Vh,{id:h?y:f,className:c.clsx(T.root,a),centerRipple:!0,focusRipple:!d,disabled:u||h,ref:n,...g,ownerState:b,children:[typeof h=="boolean"&&c.jsxRuntimeExports.jsx("span",{className:T.loadingWrapper,style:{display:"contents"},children:c.jsxRuntimeExports.jsx(Wh,{className:T.loadingIndicator,ownerState:b,children:h&&x})}),i]})});process.env.NODE_ENV!=="production"&&(Ut.propTypes={children:c.chainPropTypes(s.node,e=>C.Children.toArray(e.children).some(n=>C.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
4
|
-
`)):null),classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),s.string]),disabled:s.bool,disableFocusRipple:s.bool,disableRipple:s.bool,edge:s.oneOf(["end","start",!1]),id:s.string,loading:s.bool,loadingIndicator:s.node,size:s.oneOfType([s.oneOf(["small","medium","large"]),s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Vt(e,t,n,r,o){if(process.env.NODE_ENV==="production")return null;const i=e[t],a=o||t;return i==null?null:i&&i.nodeType!==1?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}function et(e){var f;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:c.resolveComponentProps(n,r),{props:l,internalRef:u}=c.mergeSlotProps({...i,externalSlotProps:a}),d=c.useForkRef(u,a==null?void 0:a.ref,(f=e.additionalProps)==null?void 0:f.ref);return c.appendOwnerState(t,{...l,ref:d},r)}const Bo=C.createContext({});process.env.NODE_ENV!=="production"&&(Bo.displayName="ListContext");function Gh(e){return c.generateUtilityClass("MuiList",e)}c.generateUtilityClasses("MuiList",["root","padding","dense","subheader"]);const Hh=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e,i={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return c.composeClasses(i,Gh,t)},qh=c.styled("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),gd=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:l=!1,disablePadding:u=!1,subheader:d,...p}=r,f=C.useMemo(()=>({dense:l}),[l]),h={...r,component:a,dense:l,disablePadding:u},m=Hh(h);return c.jsxRuntimeExports.jsx(Bo.Provider,{value:f,children:c.jsxRuntimeExports.jsxs(qh,{as:a,className:c.clsx(m.root,i),ref:n,ownerState:h,...p,children:[d,o]})})});process.env.NODE_ENV!=="production"&&(gd.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,dense:s.bool,disablePadding:s.bool,subheader:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Vn(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function xd(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function ns(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Fl(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function yd(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function fr(e,t,n,r,o,i){let a=!1,l=o(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const u=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!yd(l,i)||u)l=o(e,l,n);else return l.focus(),!0}return!1}const bd=C.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:l,disabledItemsFocusable:u=!1,disableListWrap:d=!1,onKeyDown:p,variant:f="selectedMenu",...h}=t,m=C.useRef(null),g=C.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});c.useEnhancedEffect(()=>{o&&m.current.focus()},[o]),C.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(v,{direction:E})=>{const w=!m.current.style.width;if(v.clientHeight<m.current.clientHeight&&w){const S=`${xd(ht(v))}px`;m.current.style[E==="rtl"?"paddingLeft":"paddingRight"]=S,m.current.style.width=`calc(100% + ${S})`}return m.current}}),[]);const y=v=>{const E=m.current,w=v.key;if(v.ctrlKey||v.metaKey||v.altKey){p&&p(v);return}const R=Vn(Ve(E));if(w==="ArrowDown")v.preventDefault(),fr(E,R,d,u,ns);else if(w==="ArrowUp")v.preventDefault(),fr(E,R,d,u,Fl);else if(w==="Home")v.preventDefault(),fr(E,null,d,u,ns);else if(w==="End")v.preventDefault(),fr(E,null,d,u,Fl);else if(w.length===1){const j=g.current,M=w.toLowerCase(),I=performance.now();j.keys.length>0&&(I-j.lastTime>500?(j.keys=[],j.repeating=!0,j.previousKeyMatched=!0):j.repeating&&M!==j.keys[0]&&(j.repeating=!1)),j.lastTime=I,j.keys.push(M);const k=R&&!j.repeating&&yd(R,j);j.previousKeyMatched&&(k||fr(E,R,!1,u,ns,j))?v.preventDefault():j.previousKeyMatched=!1}p&&p(v)},x=c.useForkRef(m,n);let b=-1;C.Children.forEach(a,(v,E)=>{if(!C.isValidElement(v)){b===E&&(b+=1,b>=a.length&&(b=-1));return}process.env.NODE_ENV!=="production"&&c.reactIsExports.isFragment(v)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
5
|
-
`)),v.props.disabled||(f==="selectedMenu"&&v.props.selected||b===-1)&&(b=E),b===E&&(v.props.disabled||v.props.muiSkipListHighlight||v.type.muiSkipListHighlight)&&(b+=1,b>=a.length&&(b=-1))});const T=C.Children.map(a,(v,E)=>{if(E===b){const w={};return i&&(w.autoFocus=!0),v.props.tabIndex===void 0&&f==="selectedMenu"&&(w.tabIndex=0),C.cloneElement(v,w)}return v});return c.jsxRuntimeExports.jsx(gd,{role:"menu",ref:x,className:l,onKeyDown:y,tabIndex:o?0:-1,...h,children:T})});process.env.NODE_ENV!=="production"&&(bd.propTypes={autoFocus:s.bool,autoFocusItem:s.bool,children:s.node,className:s.string,disabledItemsFocusable:s.bool,disableListWrap:s.bool,onKeyDown:s.func,variant:s.oneOf(["menu","selectedMenu"])});function _s(e){return`scale(${e}, ${e**2})`}const Yh={entering:{opacity:1,transform:_s(1)},entered:{opacity:1,transform:"none"}},rs=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Dr=C.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:l,onEnter:u,onEntered:d,onEntering:p,onExit:f,onExited:h,onExiting:m,style:g,timeout:y="auto",TransitionComponent:x=_t,...b}=t,T=c.useTimeout(),v=C.useRef(),E=c.useTheme(),w=C.useRef(null),S=c.useForkRef(w,lr(i),n),R=N=>_=>{if(N){const z=w.current;_===void 0?N(z):N(z,_)}},j=R(p),M=R((N,_)=>{md(N);const{duration:z,delay:B,easing:W}=Fo({style:g,timeout:y,easing:a},{mode:"enter"});let K;y==="auto"?(K=E.transitions.getAutoHeightDuration(N.clientHeight),v.current=K):K=z,N.style.transition=[E.transitions.create("opacity",{duration:K,delay:B}),E.transitions.create("transform",{duration:rs?K:K*.666,delay:B,easing:W})].join(","),u&&u(N,_)}),I=R(d),k=R(m),D=R(N=>{const{duration:_,delay:z,easing:B}=Fo({style:g,timeout:y,easing:a},{mode:"exit"});let W;y==="auto"?(W=E.transitions.getAutoHeightDuration(N.clientHeight),v.current=W):W=_,N.style.transition=[E.transitions.create("opacity",{duration:W,delay:z}),E.transitions.create("transform",{duration:rs?W:W*.666,delay:rs?z:z||W*.333,easing:B})].join(","),N.style.opacity=0,N.style.transform=_s(.75),f&&f(N)}),O=R(h),P=N=>{y==="auto"&&T.start(v.current||0,N),r&&r(w.current,N)};return c.jsxRuntimeExports.jsx(x,{appear:o,in:l,nodeRef:w,onEnter:M,onEntered:I,onEntering:j,onExit:D,onExited:O,onExiting:k,addEndListener:P,timeout:y==="auto"?null:y,...b,children:(N,{ownerState:_,...z})=>C.cloneElement(i,{style:{opacity:0,transform:_s(.75),visibility:N==="exited"&&!l?"hidden":void 0,...Yh[N],...g,...i.props.style},ref:S,...z})})});process.env.NODE_ENV!=="production"&&(Dr.propTypes={addEndListener:s.func,appear:s.bool,children:ar.isRequired,easing:s.oneOfType([s.shape({enter:s.string,exit:s.string}),s.string]),in:s.bool,onEnter:s.func,onEntered:s.func,onEntering:s.func,onExit:s.func,onExited:s.func,onExiting:s.func,style:s.object,timeout:s.oneOfType([s.oneOf(["auto"]),s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});Dr&&(Dr.muiSupportAuto=!0);function Kh(e){const t=Ve(e);return t.body===e?ht(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Or(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Bl(e){return parseFloat(ht(e).getComputedStyle(e).paddingRight)||0}function Xh(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function Ul(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const l=!i.includes(a),u=!Xh(a);l&&u&&Or(a,o)})}function os(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function Jh(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Kh(r)){const a=xd(ht(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Bl(r)+a}px`;const l=Ve(r).querySelectorAll(".mui-fixed");[].forEach.call(l,u=>{n.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${Bl(u)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Ve(r).body;else{const a=r.parentElement,l=ht(r);i=(a==null?void 0:a.nodeName)==="HTML"&&l.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:l})=>{i?a.style.setProperty(l,i):a.style.removeProperty(l)})}}function Zh(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Qh{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Or(t.modalRef,!1);const o=Zh(n);Ul(n,t.mount,t.modalRef,o,!0);const i=os(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=os(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=Jh(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=os(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&Or(t.modalRef,n),Ul(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&Or(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const em=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function tm(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function nm(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function rm(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||nm(e))}function om(e){const t=[],n=[];return Array.from(e.querySelectorAll(em)).forEach((r,o)=>{const i=tm(r);i===-1||!rm(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function im(){return!0}function Uo(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=om,isEnabled:a=im,open:l}=e,u=C.useRef(!1),d=C.useRef(null),p=C.useRef(null),f=C.useRef(null),h=C.useRef(null),m=C.useRef(!1),g=C.useRef(null),y=c.useForkRef(lr(t),g),x=C.useRef(null);C.useEffect(()=>{!l||!g.current||(m.current=!n)},[n,l]),C.useEffect(()=>{if(!l||!g.current)return;const v=Ve(g.current),E=Vn(v);return g.current.contains(E)||(g.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
6
|
-
`)),g.current.setAttribute("tabIndex","-1")),m.current&&g.current.focus()),()=>{o||(f.current&&f.current.focus&&(u.current=!0,f.current.focus()),f.current=null)}},[l]),C.useEffect(()=>{if(!l||!g.current)return;const v=Ve(g.current),E=R=>{if(x.current=R,r||!a()||R.key!=="Tab")return;Vn(v)===g.current&&R.shiftKey&&(u.current=!0,p.current&&p.current.focus())},w=()=>{var I,k;const R=g.current;if(R===null)return;const j=Vn(v);if(!v.hasFocus()||!a()||u.current){u.current=!1;return}if(R.contains(j)||r&&j!==d.current&&j!==p.current)return;if(j!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let M=[];if((j===d.current||j===p.current)&&(M=i(g.current)),M.length>0){const D=!!((I=x.current)!=null&&I.shiftKey&&((k=x.current)==null?void 0:k.key)==="Tab"),O=M[0],P=M[M.length-1];typeof O!="string"&&typeof P!="string"&&(D?P.focus():O.focus())}else R.focus()};v.addEventListener("focusin",w),v.addEventListener("keydown",E,!0);const S=setInterval(()=>{const R=Vn(v);R&&R.tagName==="BODY"&&w()},50);return()=>{clearInterval(S),v.removeEventListener("focusin",w),v.removeEventListener("keydown",E,!0)}},[n,r,o,a,l,i]);const b=v=>{f.current===null&&(f.current=v.relatedTarget),m.current=!0,h.current=v.target;const E=t.props.onFocus;E&&E(v)},T=v=>{f.current===null&&(f.current=v.relatedTarget),m.current=!0};return c.jsxRuntimeExports.jsxs(C.Fragment,{children:[c.jsxRuntimeExports.jsx("div",{tabIndex:l?0:-1,onFocus:T,ref:d,"data-testid":"sentinelStart"}),C.cloneElement(t,{ref:y,onFocus:b}),c.jsxRuntimeExports.jsx("div",{tabIndex:l?0:-1,onFocus:T,ref:p,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Uo.propTypes={children:ar,disableAutoFocus:s.bool,disableEnforceFocus:s.bool,disableRestoreFocus:s.bool,getTabbable:s.func,isEnabled:s.func,open:s.bool.isRequired});process.env.NODE_ENV!=="production"&&(Uo.propTypes=pd(Uo.propTypes));function sm(e){return typeof e=="function"?e():e}const Nr=C.forwardRef(function(t,n){const{children:r,container:o,disablePortal:i=!1}=t,[a,l]=C.useState(null),u=c.useForkRef(C.isValidElement(r)?lr(r):null,n);if(c.useEnhancedEffect(()=>{i||l(sm(o)||document.body)},[o,i]),c.useEnhancedEffect(()=>{if(a&&!i)return Nl(n,a),()=>{Nl(n,null)}},[n,a,i]),i){if(C.isValidElement(r)){const d={ref:u};return C.cloneElement(r,d)}return r}return a&&mh.createPortal(r,a)});process.env.NODE_ENV!=="production"&&(Nr.propTypes={children:s.node,container:s.oneOfType([Vt,s.func]),disablePortal:s.bool});process.env.NODE_ENV!=="production"&&(Nr.propTypes=pd(Nr.propTypes));function am(e){return typeof e=="function"?e():e}function lm(e){return e?e.props.hasOwnProperty("in"):!1}const Vl=()=>{},ao=new Qh;function cm(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:l,onClose:u,open:d,rootRef:p}=e,f=C.useRef({}),h=C.useRef(null),m=C.useRef(null),g=c.useForkRef(m,p),[y,x]=C.useState(!d),b=lm(l);let T=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(T=!1);const v=()=>Ve(h.current),E=()=>(f.current.modalRef=m.current,f.current.mount=h.current,f.current),w=()=>{ao.mount(E(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},S=c.useEventCallback(()=>{const N=am(t)||v().body;ao.add(E(),N),m.current&&w()}),R=()=>ao.isTopModal(E()),j=c.useEventCallback(N=>{h.current=N,N&&(d&&R()?w():m.current&&Or(m.current,T))}),M=C.useCallback(()=>{ao.remove(E(),T)},[T]);C.useEffect(()=>()=>{M()},[M]),C.useEffect(()=>{d?S():(!b||!o)&&M()},[d,M,b,o,S]);const I=N=>_=>{var z;(z=N.onKeyDown)==null||z.call(N,_),!(_.key!=="Escape"||_.which===229||!R())&&(n||(_.stopPropagation(),u&&u(_,"escapeKeyDown")))},k=N=>_=>{var z;(z=N.onClick)==null||z.call(N,_),_.target===_.currentTarget&&u&&u(_,"backdropClick")};return{getRootProps:(N={})=>{const _=c.extractEventHandlers(e);delete _.onTransitionEnter,delete _.onTransitionExited;const z={..._,...N};return{role:"presentation",...z,onKeyDown:I(z),ref:g}},getBackdropProps:(N={})=>{const _=N;return{"aria-hidden":!0,..._,onClick:k(_),open:d}},getTransitionProps:()=>{const N=()=>{x(!1),i&&i()},_=()=>{x(!0),a&&a(),o&&M()};return{onEnter:Dl(N,(l==null?void 0:l.props.onEnter)??Vl),onExited:Dl(_,(l==null?void 0:l.props.onExited)??Vl)}},rootRef:g,portalRef:j,isTopModal:R,exited:y,hasTransition:b}}function um(e){return c.generateUtilityClass("MuiModal",e)}c.generateUtilityClasses("MuiModal",["root","hidden","backdrop"]);const dm=e=>{const{open:t,exited:n,classes:r}=e,o={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return c.composeClasses(o,um,r)},pm=c.styled("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(c.memoTheme(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),fm=c.styled(Kr,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),sa=C.forwardRef(function(t,n){const r=c.useDefaultProps({name:"MuiModal",props:t}),{BackdropComponent:o=fm,BackdropProps:i,classes:a,className:l,closeAfterTransition:u=!1,children:d,container:p,component:f,components:h={},componentsProps:m={},disableAutoFocus:g=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:x=!1,disablePortal:b=!1,disableRestoreFocus:T=!1,disableScrollLock:v=!1,hideBackdrop:E=!1,keepMounted:w=!1,onClose:S,onTransitionEnter:R,onTransitionExited:j,open:M,slotProps:I={},slots:k={},theme:D,...O}=r,P={...r,closeAfterTransition:u,disableAutoFocus:g,disableEnforceFocus:y,disableEscapeKeyDown:x,disablePortal:b,disableRestoreFocus:T,disableScrollLock:v,hideBackdrop:E,keepMounted:w},{getRootProps:N,getBackdropProps:_,getTransitionProps:z,portalRef:B,isTopModal:W,exited:K,hasTransition:$}=cm({...P,rootRef:n}),ne={...P,exited:K},le=dm(ne),xe={};if(d.props.tabIndex===void 0&&(xe.tabIndex="-1"),$){const{onEnter:V,onExited:G}=z();xe.onEnter=V,xe.onExited=G}const de={slots:{root:h.Root,backdrop:h.Backdrop,...k},slotProps:{...m,...I}},[pe,fe]=c.useSlot("root",{ref:n,elementType:pm,externalForwardedProps:{...de,...O,component:f},getSlotProps:N,ownerState:ne,className:c.clsx(l,le==null?void 0:le.root,!ne.open&&ne.exited&&(le==null?void 0:le.hidden))}),[he,U]=c.useSlot("backdrop",{ref:i==null?void 0:i.ref,elementType:o,externalForwardedProps:de,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:V=>_({...V,onClick:G=>{V!=null&&V.onClick&&V.onClick(G)}}),className:c.clsx(i==null?void 0:i.className,le==null?void 0:le.backdrop),ownerState:ne});return!w&&!M&&(!$||K)?null:c.jsxRuntimeExports.jsx(Nr,{ref:B,container:p,disablePortal:b,children:c.jsxRuntimeExports.jsxs(pe,{...fe,children:[!E&&o?c.jsxRuntimeExports.jsx(he,{...U}):null,c.jsxRuntimeExports.jsx(Uo,{disableEnforceFocus:y,disableAutoFocus:g,disableRestoreFocus:T,isEnabled:W,open:M,children:C.cloneElement(d,xe)})]})})});process.env.NODE_ENV!=="production"&&(sa.propTypes={BackdropComponent:s.elementType,BackdropProps:s.object,children:ar.isRequired,classes:s.object,className:s.string,closeAfterTransition:s.bool,component:s.elementType,components:s.shape({Backdrop:s.elementType,Root:s.elementType}),componentsProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),container:s.oneOfType([Vt,s.func]),disableAutoFocus:s.bool,disableEnforceFocus:s.bool,disableEscapeKeyDown:s.bool,disablePortal:s.bool,disableRestoreFocus:s.bool,disableScrollLock:s.bool,hideBackdrop:s.bool,keepMounted:s.bool,onClose:s.func,onTransitionEnter:s.func,onTransitionExited:s.func,open:s.bool.isRequired,slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,root:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function hm(e){return c.generateUtilityClass("MuiPopover",e)}c.generateUtilityClasses("MuiPopover",["root","paper"]);function Wl(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Gl(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function Hl(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Rr(e){return typeof e=="function"?e():e}const mm=e=>{const{classes:t}=e,n={root:["root"],paper:["paper"]};return c.composeClasses(n,hm,t)},gm=c.styled(sa,{name:"MuiPopover",slot:"Root"})({}),vd=c.styled(c.Paper,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),aa=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:l,anchorReference:u="anchorEl",children:d,className:p,container:f,elevation:h=8,marginThreshold:m=16,open:g,PaperProps:y={},slots:x={},slotProps:b={},transformOrigin:T={vertical:"top",horizontal:"left"},TransitionComponent:v,transitionDuration:E="auto",TransitionProps:w={},disableScrollLock:S=!1,...R}=r,j=C.useRef(),M={...r,anchorOrigin:a,anchorReference:u,elevation:h,marginThreshold:m,transformOrigin:T,TransitionComponent:v,transitionDuration:E,TransitionProps:w},I=mm(M),k=C.useCallback(()=>{if(u==="anchorPosition")return process.env.NODE_ENV!=="production"&&(l||console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),l;const V=Rr(i),G=V&&V.nodeType===1?V:Ve(j.current).body,A=G.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const Z=G.getBoundingClientRect();process.env.NODE_ENV!=="test"&&Z.top===0&&Z.left===0&&Z.right===0&&Z.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
7
|
-
`))}return{top:A.top+Wl(A,a.vertical),left:A.left+Gl(A,a.horizontal)}},[i,a.horizontal,a.vertical,l,u]),D=C.useCallback(V=>({vertical:Wl(V,T.vertical),horizontal:Gl(V,T.horizontal)}),[T.horizontal,T.vertical]),O=C.useCallback(V=>{const G={width:V.offsetWidth,height:V.offsetHeight},A=D(G);if(u==="none")return{top:null,left:null,transformOrigin:Hl(A)};const Z=k();let q=Z.top-A.vertical,oe=Z.left-A.horizontal;const me=q+G.height,ae=oe+G.width,ve=ht(Rr(i)),Re=ve.innerHeight-m,ke=ve.innerWidth-m;if(m!==null&&q<m){const Ee=q-m;q-=Ee,A.vertical+=Ee}else if(m!==null&&me>Re){const Ee=me-Re;q-=Ee,A.vertical+=Ee}if(process.env.NODE_ENV!=="production"&&G.height>Re&&G.height&&Re&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${G.height-Re}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
|
|
8
|
-
`)),m!==null&&oe<m){const Ee=oe-m;oe-=Ee,A.horizontal+=Ee}else if(ae>ke){const Ee=ae-ke;oe-=Ee,A.horizontal+=Ee}return{top:`${Math.round(q)}px`,left:`${Math.round(oe)}px`,transformOrigin:Hl(A)}},[i,u,k,D,m]),[P,N]=C.useState(g),_=C.useCallback(()=>{const V=j.current;if(!V)return;const G=O(V);G.top!==null&&V.style.setProperty("top",G.top),G.left!==null&&(V.style.left=G.left),V.style.transformOrigin=G.transformOrigin,N(!0)},[O]);C.useEffect(()=>(S&&window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_)),[i,S,_]);const z=()=>{_()},B=()=>{N(!1)};C.useEffect(()=>{g&&_()}),C.useImperativeHandle(o,()=>g?{updatePosition:()=>{_()}}:null,[g,_]),C.useEffect(()=>{if(!g)return;const V=fi(()=>{_()}),G=ht(Rr(i));return G.addEventListener("resize",V),()=>{V.clear(),G.removeEventListener("resize",V)}},[i,g,_]);let W=E;const K={slots:{transition:v,...x},slotProps:{transition:w,paper:y,...b}},[$,ne]=c.useSlot("transition",{elementType:Dr,externalForwardedProps:K,ownerState:M,getSlotProps:V=>({...V,onEntering:(G,A)=>{var Z;(Z=V.onEntering)==null||Z.call(V,G,A),z()},onExited:G=>{var A;(A=V.onExited)==null||A.call(V,G),B()}}),additionalProps:{appear:!0,in:g}});E==="auto"&&!$.muiSupportAuto&&(W=void 0);const le=f||(i?Ve(Rr(i)).body:void 0),[xe,{slots:de,slotProps:pe,...fe}]=c.useSlot("root",{ref:n,elementType:gm,externalForwardedProps:{...K,...R},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:x.backdrop},slotProps:{backdrop:Ih(typeof b.backdrop=="function"?b.backdrop(M):b.backdrop,{invisible:!0})},container:le,open:g},ownerState:M,className:c.clsx(I.root,p)}),[he,U]=c.useSlot("paper",{ref:j,className:I.paper,elementType:vd,externalForwardedProps:K,shouldForwardComponentProp:!0,additionalProps:{elevation:h,style:P?void 0:{opacity:0}},ownerState:M});return c.jsxRuntimeExports.jsx(xe,{...fe,...!c.isHostComponent(xe)&&{slots:de,slotProps:pe,disableScrollLock:S},children:c.jsxRuntimeExports.jsx($,{...ne,timeout:W,children:c.jsxRuntimeExports.jsx(he,{...U,children:d})})})});process.env.NODE_ENV!=="production"&&(aa.propTypes={action:c.refType,anchorEl:c.chainPropTypes(s.oneOfType([Vt,s.func]),e=>{if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){const t=Rr(e.anchorEl);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
9
|
-
`))}else return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${t}\` instead.`].join(`
|
|
10
|
-
`))}return null}),anchorOrigin:s.shape({horizontal:s.oneOfType([s.oneOf(["center","left","right"]),s.number]).isRequired,vertical:s.oneOfType([s.oneOf(["bottom","center","top"]),s.number]).isRequired}),anchorPosition:s.shape({left:s.number.isRequired,top:s.number.isRequired}),anchorReference:s.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:s.elementType,BackdropProps:s.object,children:s.node,classes:s.object,className:s.string,container:s.oneOfType([Vt,s.func]),disableScrollLock:s.bool,elevation:c.integerPropType,marginThreshold:s.number,onClose:s.func,open:s.bool.isRequired,PaperProps:s.shape({component:c.elementTypeAcceptingRef}),slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),paper:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,paper:s.elementType,root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),transformOrigin:s.shape({horizontal:s.oneOfType([s.oneOf(["center","left","right"]),s.number]).isRequired,vertical:s.oneOfType([s.oneOf(["bottom","center","top"]),s.number]).isRequired}),TransitionComponent:s.elementType,transitionDuration:s.oneOfType([s.oneOf(["auto"]),s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})]),TransitionProps:s.object});function xm(e){return c.generateUtilityClass("MuiMenu",e)}c.generateUtilityClasses("MuiMenu",["root","paper","list"]);const ym={vertical:"top",horizontal:"right"},bm={vertical:"top",horizontal:"left"},vm=e=>{const{classes:t}=e,n={root:["root"],paper:["paper"],list:["list"]};return c.composeClasses(n,xm,t)},Em=c.styled(aa,{shouldForwardProp:e=>c.rootShouldForwardProp(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),Tm=c.styled(vd,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Sm=c.styled(bd,{name:"MuiMenu",slot:"List"})({outline:0}),la=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:l=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:f={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:g,...y}={},variant:x="selectedMenu",slots:b={},slotProps:T={},...v}=r,E=sr(),w={...r,autoFocus:o,disableAutoFocusItem:l,MenuListProps:u,onEntering:g,PaperProps:f,transitionDuration:m,TransitionProps:y,variant:x},S=vm(w),R=o&&!l&&p,j=C.useRef(null),M=(W,K)=>{j.current&&j.current.adjustStyleForScrollbar(W,{direction:E?"rtl":"ltr"}),g&&g(W,K)},I=W=>{W.key==="Tab"&&(W.preventDefault(),d&&d(W,"tabKeyDown"))};let k=-1;C.Children.map(i,(W,K)=>{C.isValidElement(W)&&(process.env.NODE_ENV!=="production"&&c.reactIsExports.isFragment(W)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
11
|
-
`)),W.props.disabled||(x==="selectedMenu"&&W.props.selected||k===-1)&&(k=K))});const D={slots:b,slotProps:{list:u,transition:y,paper:f,...T}},O=et({elementType:b.root,externalSlotProps:T.root,ownerState:w,className:[S.root,a]}),[P,N]=c.useSlot("paper",{className:S.paper,elementType:Tm,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:w}),[_,z]=c.useSlot("list",{className:c.clsx(S.list,u.className),elementType:Sm,shouldForwardComponentProp:!0,externalForwardedProps:D,getSlotProps:W=>({...W,onKeyDown:K=>{var $;I(K),($=W.onKeyDown)==null||$.call(W,K)}}),ownerState:w}),B=typeof D.slotProps.transition=="function"?D.slotProps.transition(w):D.slotProps.transition;return c.jsxRuntimeExports.jsx(Em,{onClose:d,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?ym:bm,slots:{root:b.root,paper:P,backdrop:b.backdrop,...b.transition&&{transition:b.transition}},slotProps:{root:O,paper:N,backdrop:typeof T.backdrop=="function"?T.backdrop(w):T.backdrop,transition:{...B,onEntering:(...W)=>{var K;M(...W),(K=B==null?void 0:B.onEntering)==null||K.call(B,...W)}}},open:p,ref:n,transitionDuration:m,ownerState:w,...v,classes:h,children:c.jsxRuntimeExports.jsx(_,{actions:j,autoFocus:o&&(k===-1||l),autoFocusItem:R,variant:x,...z,children:i})})});process.env.NODE_ENV!=="production"&&(la.propTypes={anchorEl:s.oneOfType([Vt,s.func]),autoFocus:s.bool,children:s.node,classes:s.object,className:s.string,disableAutoFocusItem:s.bool,MenuListProps:s.object,onClose:s.func,open:s.bool.isRequired,PaperProps:s.object,PopoverClasses:s.object,slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),list:s.oneOfType([s.func,s.object]),paper:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,list:s.elementType,paper:s.elementType,root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),transitionDuration:s.oneOfType([s.oneOf(["auto"]),s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})]),TransitionProps:s.object,variant:s.oneOf(["menu","selectedMenu"])});const ql=c.generateUtilityClasses("MuiListItemIcon",["root","alignItemsFlexStart"]),Yl=c.generateUtilityClasses("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function wm(e){return c.generateUtilityClass("MuiMenuItem",e)}const hr=c.generateUtilityClasses("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Cm=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Rm=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l={root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},u=c.composeClasses(l,wm,a);return{...a,...u}},jm=c.styled(c.ButtonBase,{shouldForwardProp:e=>c.rootShouldForwardProp(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Cm})(c.memoTheme(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${hr.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${hr.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${hr.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${hr.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${hr.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${c.dividerClasses.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${c.dividerClasses.inset}`]:{marginLeft:52},[`& .${Yl.root}`]:{marginTop:0,marginBottom:0},[`& .${Yl.inset}`]:{paddingLeft:36},[`& .${ql.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${ql.root} svg`]:{fontSize:"1.25rem"}}}]}))),yn=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:l=!1,disableGutters:u=!1,focusVisibleClassName:d,role:p="menuitem",tabIndex:f,className:h,...m}=r,g=C.useContext(Bo),y=C.useMemo(()=>({dense:a||g.dense||!1,disableGutters:u}),[g.dense,a,u]),x=C.useRef(null);c.useEnhancedEffect(()=>{o&&(x.current?x.current.focus():process.env.NODE_ENV!=="production"&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))},[o]);const b={...r,dense:y.dense,divider:l,disableGutters:u},T=Rm(r),v=c.useForkRef(x,n);let E;return r.disabled||(E=f!==void 0?f:-1),c.jsxRuntimeExports.jsx(Bo.Provider,{value:y,children:c.jsxRuntimeExports.jsx(jm,{ref:v,role:p,tabIndex:E,component:i,focusVisibleClassName:c.clsx(T.focusVisible,d),className:c.clsx(T.root,h),...m,ownerState:b,classes:T})})});process.env.NODE_ENV!=="production"&&(yn.propTypes={autoFocus:s.bool,children:s.node,classes:s.object,className:s.string,component:s.elementType,dense:s.bool,disabled:s.bool,disableGutters:s.bool,divider:s.bool,focusVisibleClassName:s.string,role:s.string,selected:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number});function Mm(e){return c.generateUtilityClass("MuiToolbar",e)}c.generateUtilityClasses("MuiToolbar",["root","gutters","regular","dense"]);const Om=e=>{const{classes:t,disableGutters:n,variant:r}=e,o={root:["root",!n&&"gutters",r]};return c.composeClasses(o,Mm,t)},Im=c.styled("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(c.memoTheme(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),Ed=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:l="regular",...u}=r,d={...r,component:i,disableGutters:a,variant:l},p=Om(d);return c.jsxRuntimeExports.jsx(Im,{as:i,className:c.clsx(p.root,o),ref:n,ownerState:d,...u})});process.env.NODE_ENV!=="production"&&(Ed.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,disableGutters:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["dense","regular"]),s.string])});const Pm=e=>c.jsxRuntimeExports.jsx(c.SvgIcon,{...e,viewBox:"0 0 10 8",children:c.jsxRuntimeExports.jsx("path",{d:"M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",fill:"currentColor",fillOpacity:"0.56"})}),km=c.externalizeComponent(Oe.observer(e=>{const{appIcon:t,appName:n,apps:r=[],onAppSelect:o,disabled:i=!1,sx:a}=e,[l,u]=L.useState(null),d=!!l,p=m=>{u(m.currentTarget)},f=()=>{u(null)},h=m=>{f(),m.onClick?m.onClick():m.href&&(window.location.href=m.href),o==null||o(m)};return c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(fd,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...a},children:c.jsxRuntimeExports.jsxs(Ed,{sx:{minHeight:"62px !important"},children:[c.jsxRuntimeExports.jsx(c.Box,{sx:{mr:1,display:"flex",alignItems:"center"},children:t}),c.jsxRuntimeExports.jsxs(c.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[c.jsxRuntimeExports.jsx(c.Typography,{component:"h1",sx:{fontWeight:"bold",fontSize:"1rem"},children:n}),r.length>0&&c.jsxRuntimeExports.jsx(Ut,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:p,disabled:i,sx:{ml:1,width:28,height:28,borderRadius:"6px",padding:0,backgroundColor:m=>c.alpha(m.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:m=>c.alpha(m.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"8px",width:"8px",height:"6px"}},children:c.jsxRuntimeExports.jsx(Pm,{})})]})]})}),c.jsxRuntimeExports.jsx(Kr,{open:d,onClick:f,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:m=>m.zIndex.modal-1}}),c.jsxRuntimeExports.jsx(la,{id:"app-menu",anchorEl:l,open:d,onClose:f,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:m=>m.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:r.map(m=>c.jsxRuntimeExports.jsxs(yn,{onClick:()=>h(m),children:[c.jsxRuntimeExports.jsx(c.Box,{sx:{display:"flex",alignItems:"center"},children:m.icon}),c.jsxRuntimeExports.jsx(c.Typography,{variant:"body1",sx:{ml:2},children:m.name})]},m.id))})]})}));var Am=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
12
|
-
\`createSelector([state => state.todos], todos => todos)\`
|
|
13
|
-
This could lead to inefficient memoization and unnecessary re-renders.
|
|
14
|
-
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},_m=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:a}=e,l=r(()=>({}),...o);if(!(l.apply(null,i)===l.apply(null,a))){let d;try{throw new Error}catch(p){({stack:d}=p)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
15
|
-
This means your output selector will likely run more frequently than intended.
|
|
16
|
-
Avoid returning a new reference inside your input selector, e.g.
|
|
17
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:a,stack:d})}},Dm={inputStabilityCheck:"once",identityFunctionCheck:"once"},Vo=Symbol("NOT_FOUND");function Nm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function $m(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function zm(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Kl=e=>Array.isArray(e)?e:[e];function Lm(e){const t=Array.isArray(e[0])?e[0]:e;return zm(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Xl(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Fm=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Dm,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:Am},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:_m}}};function Bm(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Vo},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Um(e,t){let n=[];function r(l){const u=n.findIndex(d=>t(l,d.key));if(u>-1){const d=n[u];return u>0&&(n.splice(u,1),n.unshift(d)),d.value}return Vo}function o(l,u){r(l)===Vo&&(n.unshift({key:l,value:u}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var Vm=(e,t)=>e===t;function Wm(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function Gm(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=Vm,maxSize:o=1,resultEqualityCheck:i}=n,a=Wm(r);let l=0;const u=o<=1?Bm(a):Um(o,a);function d(){let p=u.get(arguments);if(p===Vo){if(p=e.apply(null,arguments),l++,i){const h=u.getEntries().find(m=>i(m.value,p));h&&(p=h.value,l!==0&&l--)}u.put(arguments,p)}return p}return d.clearCache=()=>{u.clear(),d.resetResultsCount()},d.resultsCount=()=>l,d.resetResultsCount=()=>{l=0},d}var Hm=class{constructor(e){this.value=e}deref(){return this.value}},qm=typeof WeakRef<"u"?WeakRef:Hm,Ym=0,Jl=1;function lo(){return{s:Ym,v:void 0,o:null,p:null}}function Td(e,t={}){let n=lo();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var f;let l=n;const{length:u}=arguments;for(let h=0,m=u;h<m;h++){const g=arguments[h];if(typeof g=="function"||typeof g=="object"&&g!==null){let y=l.o;y===null&&(l.o=y=new WeakMap);const x=y.get(g);x===void 0?(l=lo(),y.set(g,l)):l=x}else{let y=l.p;y===null&&(l.p=y=new Map);const x=y.get(g);x===void 0?(l=lo(),y.set(g,l)):l=x}}const d=l;let p;if(l.s===Jl)p=l.v;else if(p=e.apply(null,arguments),i++,r){const h=((f=o==null?void 0:o.deref)==null?void 0:f.call(o))??o;h!=null&&r(h,p)&&(p=h,i!==0&&i--),o=typeof p=="object"&&p!==null||typeof p=="function"?new qm(p):p}return d.s=Jl,d.v=p,p}return a.clearCache=()=>{n=lo(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Sd(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,l,u={},d=o.pop();typeof d=="object"&&(u=d,d=o.pop()),Nm(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const p={...n,...u},{memoize:f,memoizeOptions:h=[],argsMemoize:m=Td,argsMemoizeOptions:g=[],devModeChecks:y={}}=p,x=Kl(h),b=Kl(g),T=Lm(o),v=f(function(){return i++,d.apply(null,arguments)},...x);let E=!0;const w=m(function(){a++;const R=Xl(T,arguments);if(l=v.apply(null,R),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:j,inputStabilityCheck:M}=Fm(E,y);if(j.shouldRun&&j.run(d,R,l),M.shouldRun){const I=Xl(T,arguments);M.run({inputSelectorResults:R,inputSelectorResultsCopy:I},{memoize:f,memoizeOptions:x},arguments)}E&&(E=!1)}return l},...b);return Object.assign(w,{resultFunc:d,memoizedResultFunc:v,dependencies:T,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>l,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var Km=Sd(Td),Xm=Object.assign((e,t=Km)=>{$m(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,l,u)=>(a[n[u]]=l,a),{}))},{withTypes:()=>Xm});const Jm=Sd({memoize:Gm,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),ue=(e,t,n,r,o,i,a,l,...u)=>{if(u.length>0)throw new Error("Unsupported number of selectors");let d;if(e&&t&&n&&r&&o&&i&&a&&l)d=(p,f,h,m)=>{const g=e(p,f,h,m),y=t(p,f,h,m),x=n(p,f,h,m),b=r(p,f,h,m),T=o(p,f,h,m),v=i(p,f,h,m),E=a(p,f,h,m);return l(g,y,x,b,T,v,E,f,h,m)};else if(e&&t&&n&&r&&o&&i&&a)d=(p,f,h,m)=>{const g=e(p,f,h,m),y=t(p,f,h,m),x=n(p,f,h,m),b=r(p,f,h,m),T=o(p,f,h,m),v=i(p,f,h,m);return a(g,y,x,b,T,v,f,h,m)};else if(e&&t&&n&&r&&o&&i)d=(p,f,h,m)=>{const g=e(p,f,h,m),y=t(p,f,h,m),x=n(p,f,h,m),b=r(p,f,h,m),T=o(p,f,h,m);return i(g,y,x,b,T,f,h,m)};else if(e&&t&&n&&r&&o)d=(p,f,h,m)=>{const g=e(p,f,h,m),y=t(p,f,h,m),x=n(p,f,h,m),b=r(p,f,h,m);return o(g,y,x,b,f,h,m)};else if(e&&t&&n&&r)d=(p,f,h,m)=>{const g=e(p,f,h,m),y=t(p,f,h,m),x=n(p,f,h,m);return r(g,y,x,f,h,m)};else if(e&&t&&n)d=(p,f,h,m)=>{const g=e(p,f,h,m),y=t(p,f,h,m);return n(g,y,f,h,m)};else if(e&&t)d=(p,f,h,m)=>{const g=e(p,f,h,m);return t(g,f,h,m)};else if(e)d=e;else throw new Error("Missing arguments");return d},ca=e=>(...t)=>{const n=new WeakMap;let r=1;const o=t[t.length-1],i=t.length-1||1,a=Math.max(o.length-i,0);if(a>3)throw new Error("Unsupported number of arguments");return(u,d,p,f)=>{let h=u.__cacheKey__;h||(h={id:r},u.__cacheKey__=h,r+=1);let m=n.get(h);if(!m){const g=t.length===1?[b=>b,o]:t;let y=t;const x=[void 0,void 0,void 0];switch(a){case 0:break;case 1:{y=[...g.slice(0,-1),()=>x[0],o];break}case 2:{y=[...g.slice(0,-1),()=>x[0],()=>x[1],o];break}case 3:{y=[...g.slice(0,-1),()=>x[0],()=>x[1],()=>x[2],o];break}default:throw new Error("Unsupported number of arguments")}e&&(y=[...y,e]),m=Jm(...y),m.selectorArgs=x,n.set(h,m)}switch(a){case 3:m.selectorArgs[2]=f;case 2:m.selectorArgs[1]=p;case 1:m.selectorArgs[0]=d}switch(a){case 0:return m(u);case 1:return m(u,d);case 2:return m(u,d,p);case 3:return m(u,d,p,f);default:throw new Error("unreachable")}}},Fe=ca();var co={exports:{}},is={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* use-sync-external-store-shim.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Zl;function Zm(){if(Zl)return is;Zl=1;var e=L;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function l(f,h){var m=h(),g=r({inst:{value:m,getSnapshot:h}}),y=g[0].inst,x=g[1];return i(function(){y.value=m,y.getSnapshot=h,u(y)&&x({inst:y})},[f,m,h]),o(function(){return u(y)&&x({inst:y}),f(function(){u(y)&&x({inst:y})})},[f]),a(m),m}function u(f){var h=f.getSnapshot;f=f.value;try{var m=h();return!n(f,m)}catch{return!0}}function d(f,h){return h()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return is.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,is}var ss={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* use-sync-external-store-shim.development.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Ql;function Qm(){return Ql||(Ql=1,process.env.NODE_ENV!=="production"&&(function(){function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}function t(m,g){p||o.startTransition===void 0||(p=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=g();if(!f){var x=g();i(y,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}x=a({inst:{value:y,getSnapshot:g}});var b=x[0].inst,T=x[1];return u(function(){b.value=y,b.getSnapshot=g,n(b)&&T({inst:b})},[m,y,g]),l(function(){return n(b)&&T({inst:b}),m(function(){n(b)&&T({inst:b})})},[m]),d(y),y}function n(m){var g=m.getSnapshot;m=m.value;try{var y=g();return!i(m,y)}catch{return!0}}function r(m,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=L,i=typeof Object.is=="function"?Object.is:e,a=o.useState,l=o.useEffect,u=o.useLayoutEffect,d=o.useDebugValue,p=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;ss.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),ss}var ec;function ua(){return ec||(ec=1,process.env.NODE_ENV==="production"?co.exports=Zm():co.exports=Qm()),co.exports}var eg=ua(),uo={exports:{}},as={};/**
|
|
34
|
-
* @license React
|
|
35
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var tc;function tg(){if(tc)return as;tc=1;var e=L,t=ua();function n(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,l=e.useMemo,u=e.useDebugValue;return as.useSyncExternalStoreWithSelector=function(d,p,f,h,m){var g=i(null);if(g.current===null){var y={hasValue:!1,value:null};g.current=y}else y=g.current;g=l(function(){function b(S){if(!T){if(T=!0,v=S,S=h(S),m!==void 0&&y.hasValue){var R=y.value;if(m(R,S))return E=R}return E=S}if(R=E,r(v,S))return R;var j=h(S);return m!==void 0&&m(R,j)?(v=S,R):(v=S,E=j)}var T=!1,v,E,w=f===void 0?null:f;return[function(){return b(p())},w===null?void 0:function(){return b(w())}]},[p,f,h,m]);var x=o(d,g[0],g[1]);return a(function(){y.hasValue=!0,y.value=x},[x]),u(x),x},as}var ls={};/**
|
|
42
|
-
* @license React
|
|
43
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
44
|
-
*
|
|
45
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
46
|
-
*
|
|
47
|
-
* This source code is licensed under the MIT license found in the
|
|
48
|
-
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/var nc;function ng(){return nc||(nc=1,process.env.NODE_ENV!=="production"&&(function(){function e(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=L,n=ua(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,l=t.useMemo,u=t.useDebugValue;ls.useSyncExternalStoreWithSelector=function(d,p,f,h,m){var g=i(null);if(g.current===null){var y={hasValue:!1,value:null};g.current=y}else y=g.current;g=l(function(){function b(S){if(!T){if(T=!0,v=S,S=h(S),m!==void 0&&y.hasValue){var R=y.value;if(m(R,S))return E=R}return E=S}if(R=E,r(v,S))return R;var j=h(S);return m!==void 0&&m(R,j)?(v=S,R):(v=S,E=j)}var T=!1,v,E,w=f===void 0?null:f;return[function(){return b(p())},w===null?void 0:function(){return b(w())}]},[p,f,h,m]);var x=o(d,g[0],g[1]);return a(function(){y.hasValue=!0,y.value=x},[x]),u(x),x},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),ls}var rc;function rg(){return rc||(rc=1,process.env.NODE_ENV==="production"?uo.exports=tg():uo.exports=ng()),uo.exports}var og=rg();const ig=parseInt(C.version,10),sg=ig>=19,ag=sg?cg:ug;function lg(e,t,n,r,o){return ag(e,t,n,r,o)}function cg(e,t,n,r,o){const i=C.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return eg.useSyncExternalStore(e.subscribe,i,i)}function ug(e,t,n,r,o){return og.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}const oc={};function dg(e,t){const n=C.useRef(oc);return n.current===oc&&(n.current=e(t)),n}const pg=[];function fg(e){C.useEffect(e,pg)}const hg=()=>{};function mg(e,t,n){const r=dg(gg,{store:e,selector:t}).current;r.effect=n,fg(r.onMount)}function gg(e){const{store:t,selector:n}=e;let r=n(t.state);const o={effect:hg,dispose:null,subscribe:()=>{o.dispose??(o.dispose=t.subscribe(i=>{const a=n(i);if(!Object.is(r,a)){const l=r;r=a,o.effect(l,a)}}))},onMount:()=>(o.subscribe(),()=>{var i;(i=o.dispose)==null||i.call(o),o.dispose=null})};return o.subscribe(),o}class da{constructor(t){se(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));se(this,"getSnapshot",()=>this.state);se(this,"use",(t,n,r,o)=>lg(this,t,n,r,o));this.state=t,this.listeners=new Set,this.updateTick=0}static create(t){return new da(t)}setState(t){this.state=t,this.updateTick+=1;const n=this.updateTick,r=this.listeners.values();let o;for(;o=r.next(),!o.done;){if(n!==this.updateTick)return;const i=o.value;i(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState(c._extends({},this.state,t));return}}set(t,n){Object.is(this.state[t],n)||this.setState(c._extends({},this.state,{[t]:n}))}}const hi=({params:e,store:t})=>{C.useEffect(()=>{t.set("animation",c._extends({},t.state.animation,{skip:e.skipAnimation}))},[t,e.skipAnimation]);const n=C.useCallback(()=>{let r=!1;return t.set("animation",c._extends({},t.state.animation,{skipAnimationRequests:t.state.animation.skipAnimationRequests+1})),()=>{r||(r=!0,t.set("animation",c._extends({},t.state.animation,{skipAnimationRequests:t.state.animation.skipAnimationRequests-1})))}},[t]);return c.useEnhancedEffect(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let o;const i=l=>{l.matches?o=n():o==null||o()},a=window.matchMedia("(prefers-reduced-motion)");return i(a),a.addEventListener("change",i),()=>{a.removeEventListener("change",i)}},[n,t]),{instance:{disableAnimation:n}}};hi.params={skipAnimation:!0};hi.getDefaultizedParams=({params:e})=>c._extends({},e,{skipAnimation:e.skipAnimation??!1});hi.getInitialState=({skipAnimation:e})=>{const t=typeof window>"u"||!(window!=null&&window.matchMedia),n=process.env.NODE_ENV==="test"?t:!1;return{animation:{skip:e,skipAnimationRequests:n?1:0}}};const xg=e=>e.animation,yg=ue(xg,e=>e.skip||e.skipAnimationRequests>0);function wd(e,t){const n=C.useRef(!0);C.useEffect(()=>{if(n.current){n.current=!1;return}return e()},t)}const bg="DEFAULT_X_AXIS_KEY",vg="DEFAULT_Y_AXIS_KEY",Eg={top:20,bottom:20,left:20,right:20},Tg=45,Sg=25,Cd=20,rn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},on=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},wg=ue(on,function(t){return(t??[]).reduce((n,r)=>{var o;return r.position==="left"?n+(r.width||0)+((o=r.zoom)!=null&&o.slider.enabled?r.zoom.slider.size:0):n},0)}),Cg=ue(on,function(t){return(t??[]).reduce((n,r)=>{var o;return r.position==="right"?n+(r.width||0)+((o=r.zoom)!=null&&o.slider.enabled?r.zoom.slider.size:0):n},0)}),Rg=ue(rn,function(t){return(t??[]).reduce((n,r)=>{var o;return r.position==="top"?n+(r.height||0)+((o=r.zoom)!=null&&o.slider.enabled?r.zoom.slider.size:0):n},0)}),jg=ue(rn,function(t){return(t??[]).reduce((n,r)=>{var o;return r.position==="bottom"?n+(r.height||0)+((o=r.zoom)!=null&&o.slider.enabled?r.zoom.slider.size:0):n},0)}),Mg=Fe(wg,Cg,Rg,jg,function(t,n,r,o){return{left:t,right:n,top:r,bottom:o}}),Xr=e=>e.dimensions,Og=e=>e.dimensions.margin,Dt=Fe(Xr,Og,Mg,function({width:t,height:n},{top:r,right:o,bottom:i,left:a},{left:l,right:u,top:d,bottom:p}){return{width:t-a-o-l-u,left:a+l,right:o+u,height:n-r-i-d-p,top:r+d,bottom:i+p}}),Ig=ue(Xr,e=>e.width),Pg=ue(Xr,e=>e.height),kg=ue(Xr,e=>e.propsWidth),Ag=ue(Xr,e=>e.propsHeight);function Rd(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?c._extends({},t,e):e}const _g=10,mi=({params:e,store:t,svgRef:n})=>{const r=e.width!==void 0&&e.height!==void 0,o=C.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[i,a]=C.useState(0),[l,u]=C.useState(0),d=C.useCallback(()=>{const g=n==null?void 0:n.current;if(!g)return{};const x=ht(g).getComputedStyle(g),b=Math.floor(parseFloat(x.height))||0,T=Math.floor(parseFloat(x.width))||0;return(t.state.dimensions.width!==T||t.state.dimensions.height!==b)&&t.set("dimensions",{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??T,height:e.height??b,propsWidth:e.width,propsHeight:e.height}),{height:b,width:T}},[t,n,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);wd(()=>{const g=e.width??t.state.dimensions.width,y=e.height??t.state.dimensions.height;t.set("dimensions",{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:g,height:y,propsHeight:e.height,propsWidth:e.width})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),C.useEffect(()=>{o.current.displayError=!0},[]),c.useEnhancedEffect(()=>{if(r||!o.current.initialCompute||o.current.computeRun>_g)return;const g=d();g.width!==i||g.height!==l?(o.current.computeRun+=1,g.width!==void 0&&a(g.width),g.height!==void 0&&u(g.height)):o.current.initialCompute&&(o.current.initialCompute=!1)},[l,i,d,r]),c.useEnhancedEffect(()=>{if(r)return()=>{};d();const g=n.current;if(typeof ResizeObserver>"u")return()=>{};let y;const x=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{d()})});return g&&x.observe(g),()=>{y&&cancelAnimationFrame(y),g&&x.unobserve(g)}},[d,r,n]),process.env.NODE_ENV!=="production"&&(o.current.displayError&&e.width===void 0&&i===0&&(console.error("MUI X Charts: ChartContainer does not have `width` prop, and its container has no `width` defined."),o.current.displayError=!1),o.current.displayError&&e.height===void 0&&l===0&&(console.error("MUI X Charts: ChartContainer does not have `height` prop, and its container has no `height` defined."),o.current.displayError=!1));const p=t.use(Dt),f=C.useCallback(g=>g>=p.left-1&&g<=p.left+p.width,[p.left,p.width]),h=C.useCallback(g=>g>=p.top-1&&g<=p.top+p.height,[p.height,p.top]);return{instance:{isPointInside:C.useCallback((g,y,x)=>x&&"closest"in x&&x.closest("[data-drawing-container]")?!0:f(g)&&h(y),[f,h]),isXInside:f,isYInside:h}}};mi.params={width:!0,height:!0,margin:!0};mi.getDefaultizedParams=({params:e})=>c._extends({},e,{margin:Rd(e.margin,Eg)});mi.getInitialState=({width:e,height:t,margin:n})=>({dimensions:{margin:n,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const pa=({params:e,store:t})=>(c.useEnhancedEffect(()=>{t.set("experimentalFeatures",e.experimentalFeatures)},[t,e.experimentalFeatures]),{});pa.params={experimentalFeatures:!0};pa.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const Dg=e=>e.experimentalFeatures,gi=ue(Dg,e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let ic=0;const Ng=()=>(ic+=1,`mui-chart-${ic}`),fa=({params:e,store:t})=>(C.useEffect(()=>{e.id===void 0||e.id===t.state.id.providedChartId&&t.state.id.chartId!==void 0||t.set("id",c._extends({},t.state.id,{chartId:e.id??Ng()}))},[t,e.id]),{});fa.params={id:!0};fa.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const $g=e=>e.id,zg=ue($g,e=>e.chartId),Lg=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],Fg=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],jd=e=>e==="dark"?Fg:Lg,Md=({series:e,colors:t,seriesConfig:n})=>{const r={};return e.forEach((o,i)=>{var u;const a=n[o.type].getSeriesWithDefaultValues(o,i,t),l=a.id;if(r[o.type]===void 0&&(r[o.type]={series:{},seriesOrder:[]}),((u=r[o.type])==null?void 0:u.series[l])!==void 0)throw new Error(`MUI X Charts: series' id "${l}" is not unique.`);r[o.type].series[l]=a,r[o.type].seriesOrder.push(l)}),r},Bg=(e,t,n,r)=>{const o={};return Object.keys(t).forEach(i=>{var l,u;const a=e[i];a!==void 0&&(o[i]=((u=(l=t[i])==null?void 0:l.seriesProcessor)==null?void 0:u.call(l,a,n,r))??a)}),o},Ug=(e,t,n)=>{let r=!1;const o={};return Object.keys(e).forEach(i=>{var u;const a=(u=t[i])==null?void 0:u.seriesLayout,l=e[i];if(a!==void 0&&l!==void 0){const d=a(l,n);d&&d!==e[i]&&(r=!0,o[i]=d)}}),r?o:{}},Od=(e,t)=>{var r;const n=(r=e[t.type])==null?void 0:r.identifierSerializer;if(!n)throw new Error(`MUI X Charts: No identifier serializer found for series type "${t.type}".`);return n(t)},xi=({params:e,store:t,seriesConfig:n})=>{const{series:r,dataset:o,theme:i,colors:a}=e;return wd(()=>{t.set("series",c._extends({},t.state.series,{defaultizedSeries:Md({series:r,colors:typeof a=="function"?a(i):a,seriesConfig:n}),dataset:o}))},[a,o,r,i,n,t]),{instance:{serializeIdentifier:c.useEventCallback(u=>Od(n,u))}}};xi.params={dataset:!0,series:!0,colors:!0,theme:!0};const Vg=[];xi.getDefaultizedParams=({params:e})=>{var t;return c._extends({},e,{series:(t=e.series)!=null&&t.length?e.series:Vg,colors:e.colors??jd,theme:e.theme??"light"})};xi.getInitialState=({series:e=[],colors:t,theme:n,dataset:r},o,i)=>({series:{seriesConfig:i,defaultizedSeries:Md({series:e,colors:typeof t=="function"?t(n):t,seriesConfig:i}),dataset:r}});const Wg=(e,t,n)=>{const r=Od(n,t);return!e.has(r)},Gg=e=>e.visibilityManager,Hg=new Map,qg=ue(Gg,e=>(e==null?void 0:e.visibilityMap)??Hg),Yg=Fe(qg,e=>(t,n)=>Wg(e,n,t)),ha=e=>e.series,Kg=ue(ha,e=>e.defaultizedSeries),sn=ue(ha,e=>e.seriesConfig),Xg=ue(ha,e=>e.dataset),Je=Fe(Kg,sn,Xg,Yg,function(t,n,r,o){return Bg(t,n,r,i=>o(n,i))});Fe(Je,sn,Dt,function(t,n,r){return Ug(t,n,r)});const Jg={abort:!0,animationcancel:!0,animationend:!0,animationiteration:!0,animationstart:!0,auxclick:!0,beforeinput:!0,beforetoggle:!0,blur:!0,cancel:!0,canplay:!0,canplaythrough:!0,change:!0,click:!0,close:!0,compositionend:!0,compositionstart:!0,compositionupdate:!0,contextlost:!0,contextmenu:!0,contextrestored:!0,copy:!0,cuechange:!0,cut:!0,dblclick:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0,durationchange:!0,emptied:!0,ended:!0,error:!0,focus:!0,focusin:!0,focusout:!0,formdata:!0,gotpointercapture:!0,input:!0,invalid:!0,keydown:!0,keypress:!0,keyup:!0,load:!0,loadeddata:!0,loadedmetadata:!0,loadstart:!0,lostpointercapture:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,paste:!0,pause:!0,play:!0,playing:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,progress:!0,ratechange:!0,reset:!0,resize:!0,scroll:!0,scrollend:!0,securitypolicyviolation:!0,seeked:!0,seeking:!0,select:!0,selectionchange:!0,selectstart:!0,slotchange:!0,stalled:!0,submit:!0,suspend:!0,timeupdate:!0,toggle:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,transitioncancel:!0,transitionend:!0,transitionrun:!0,transitionstart:!0,volumechange:!0,waiting:!0,webkitanimationend:!0,webkitanimationiteration:!0,webkitanimationstart:!0,webkittransitionend:!0,wheel:!0,beforematch:!0,pointerrawupdate:!0};class Id{constructor(t){se(this,"customData",{});se(this,"handleOptionsChange",t=>{t&&t.detail&&this.updateOptions(t.detail)});se(this,"handleStateChange",t=>{t&&t.detail&&this.updateState(t.detail)});if(!t||!t.name)throw new Error("Gesture must be initialized with a valid name.");if(t.name in Jg)throw new Error(`Gesture can't be created with a native event name. Tried to use "${t.name}". Please use a custom name instead.`);this.name=t.name,this.preventDefault=t.preventDefault??!1,this.stopPropagation=t.stopPropagation??!1,this.preventIf=t.preventIf??[],this.requiredKeys=t.requiredKeys??[],this.pointerMode=t.pointerMode??[],this.pointerOptions=t.pointerOptions??{}}init(t,n,r,o){this.element=t,this.pointerManager=n,this.gesturesRegistry=r,this.keyboardManager=o;const i=`${this.name}ChangeOptions`;this.element.addEventListener(i,this.handleOptionsChange);const a=`${this.name}ChangeState`;this.element.addEventListener(a,this.handleStateChange)}updateOptions(t){this.preventDefault=t.preventDefault??this.preventDefault,this.stopPropagation=t.stopPropagation??this.stopPropagation,this.preventIf=t.preventIf??this.preventIf,this.requiredKeys=t.requiredKeys??this.requiredKeys,this.pointerMode=t.pointerMode??this.pointerMode,this.pointerOptions=t.pointerOptions??this.pointerOptions}getBaseConfig(){return{requiredKeys:this.requiredKeys}}getEffectiveConfig(t,n){if(t!=="mouse"&&t!=="touch"&&t!=="pen")return n;const r=this.pointerOptions[t];return r?c._extends({},n,r):n}updateState(t){Object.assign(this.state,t)}getTargetElement(t){return this.isActive||this.element===t.target||"contains"in this.element&&this.element.contains(t.target)||"getRootNode"in this.element&&this.element.getRootNode()instanceof ShadowRoot&&t.composedPath().includes(this.element)?this.element:null}set isActive(t){t?this.gesturesRegistry.registerActiveGesture(this.element,this):this.gesturesRegistry.unregisterActiveGesture(this.element,this)}get isActive(){return this.gesturesRegistry.isGestureActive(this.element,this)??!1}shouldPreventGesture(t,n){const r=this.getEffectiveConfig(n,this.getBaseConfig());if(!this.keyboardManager.areKeysPressed(r.requiredKeys))return!0;if(this.preventIf.length===0)return!1;const o=this.gesturesRegistry.getActiveGestures(t);return this.preventIf.some(i=>o[i])}isPointerTypeAllowed(t){return!this.pointerMode||this.pointerMode.length===0?!0:this.pointerMode.includes(t)}destroy(){const t=`${this.name}ChangeOptions`;this.element.removeEventListener(t,this.handleOptionsChange);const n=`${this.name}ChangeState`;this.element.removeEventListener(n,this.handleStateChange)}}class Zg{constructor(){se(this,"activeGestures",new Map)}registerActiveGesture(t,n){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const r=this.activeGestures.get(t),o={gesture:n,element:t};r.add(o)}unregisterActiveGesture(t,n){const r=this.activeGestures.get(t);r&&(r.forEach(o=>{o.gesture===n&&r.delete(o)}),r.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const n=this.activeGestures.get(t);return n?Array.from(n).reduce((r,o)=>(r[o.gesture.name]=!0,r),{}):{}}isGestureActive(t,n){const r=this.activeGestures.get(t);return r?Array.from(r).some(o=>o.gesture===n):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class Qg{constructor(){se(this,"pressedKeys",new Set);se(this,"handleKeyDown",t=>{this.pressedKeys.add(t.key)});se(this,"handleKeyUp",t=>{this.pressedKeys.delete(t.key)});se(this,"clearKeys",()=>{this.pressedKeys.clear()});this.initialize()}initialize(){typeof window>"u"||(window.addEventListener("keydown",this.handleKeyDown),window.addEventListener("keyup",this.handleKeyUp),window.addEventListener("blur",this.clearKeys))}areKeysPressed(t){return!t||t.length===0?!0:t.every(n=>n==="ControlOrMeta"?navigator.platform.includes("Mac")?this.pressedKeys.has("Meta"):this.pressedKeys.has("Control"):this.pressedKeys.has(n))}destroy(){typeof window<"u"&&(window.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("keyup",this.handleKeyUp),window.removeEventListener("blur",this.clearKeys)),this.clearKeys()}}class ex{constructor(t){se(this,"preventEventInterruption",!0);se(this,"pointers",new Map);se(this,"gestureHandlers",new Set);se(this,"handleInterruptEvents",t=>{if(this.preventEventInterruption&&"pointerType"in t&&t.pointerType==="touch"){t.preventDefault();return}const n=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),r=this.pointers.values().next().value;if(this.pointers.size>0&&r){Object.defineProperties(n,{clientX:{value:r.clientX},clientY:{value:r.clientY},pointerId:{value:r.pointerId},pointerType:{value:r.pointerType}});for(const[o,i]of this.pointers.entries()){const a=c._extends({},i,{type:"forceCancel"});this.pointers.set(o,a)}}this.notifyHandlers(n),this.pointers.clear()});se(this,"handlePointerEvent",t=>{const{type:n,pointerId:r}=t;if(n==="pointerdown"||n==="pointermove")this.pointers.set(r,this.createPointerData(t));else if(n==="pointerup"||n==="pointercancel"||n==="forceCancel"){this.pointers.set(r,this.createPointerData(t)),this.notifyHandlers(t),this.pointers.delete(r);return}this.notifyHandlers(t)});this.root=t.root??document.getRootNode({composed:!0})??document.body,this.touchAction=t.touchAction||"auto",this.passive=t.passive??!1,this.preventEventInterruption=t.preventEventInterruption??!0,this.setupEventListeners()}registerGestureHandler(t){return this.gestureHandlers.add(t),()=>{this.gestureHandlers.delete(t)}}getPointers(){return new Map(this.pointers)}setupEventListeners(){this.touchAction!=="auto"&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener("pointerdown",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointermove",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointerup",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointercancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("forceCancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("blur",this.handleInterruptEvents),this.root.addEventListener("contextmenu",this.handleInterruptEvents)}notifyHandlers(t){this.gestureHandlers.forEach(n=>n(this.pointers,t))}createPointerData(t){return{pointerId:t.pointerId,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,target:t.target,timeStamp:t.timeStamp,type:t.type,isPrimary:t.isPrimary,pressure:t.pressure,width:t.width,height:t.height,pointerType:t.pointerType,srcEvent:t}}destroy(){this.root.removeEventListener("pointerdown",this.handlePointerEvent),this.root.removeEventListener("pointermove",this.handlePointerEvent),this.root.removeEventListener("pointerup",this.handlePointerEvent),this.root.removeEventListener("pointercancel",this.handlePointerEvent),this.root.removeEventListener("forceCancel",this.handlePointerEvent),this.root.removeEventListener("blur",this.handleInterruptEvents),this.root.removeEventListener("contextmenu",this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}}class tx{constructor(t){se(this,"gestureTemplates",new Map);se(this,"elementGestureMap",new Map);se(this,"activeGesturesRegistry",new Zg);se(this,"keyboardManager",new Qg);this.pointerManager=new ex({root:t.root,touchAction:t.touchAction,passive:t.passive}),t.gestures&&t.gestures.length>0&&t.gestures.forEach(n=>{this.addGestureTemplate(n)})}addGestureTemplate(t){this.gestureTemplates.has(t.name)&&console.warn(`Gesture template with name "${t.name}" already exists. It will be overwritten.`),this.gestureTemplates.set(t.name,t)}setGestureOptions(t,n,r){const o=this.elementGestureMap.get(n);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const i=new CustomEvent(`${t}ChangeOptions`,{detail:r,bubbles:!1,cancelable:!1,composed:!1});n.dispatchEvent(i)}setGestureState(t,n,r){const o=this.elementGestureMap.get(n);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const i=new CustomEvent(`${t}ChangeState`,{detail:r,bubbles:!1,cancelable:!1,composed:!1});n.dispatchEvent(i)}registerElement(t,n,r){return Array.isArray(t)||(t=[t]),t.forEach(o=>{const i=r==null?void 0:r[o];this.registerSingleGesture(o,n,i)}),n}registerSingleGesture(t,n,r){const o=this.gestureTemplates.get(t);if(!o)return console.error(`Gesture template "${t}" not found.`),!1;this.elementGestureMap.has(n)||this.elementGestureMap.set(n,new Map);const i=this.elementGestureMap.get(n);i.has(t)&&(console.warn(`Element already has gesture "${t}" registered. It will be replaced.`),this.unregisterElement(t,n));const a=o.clone(r);return a.init(n,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),i.set(t,a),!0}unregisterElement(t,n){const r=this.elementGestureMap.get(n);return!r||!r.has(t)?!1:(r.get(t).destroy(),r.delete(t),this.activeGesturesRegistry.unregisterElement(n),r.size===0&&this.elementGestureMap.delete(n),!0)}unregisterAllGestures(t){const n=this.elementGestureMap.get(t);if(n){for(const[,r]of n)r.destroy(),this.activeGesturesRegistry.unregisterElement(t);this.elementGestureMap.delete(t)}}destroy(){for(const[t]of this.elementGestureMap)this.unregisterAllGestures(t);this.gestureTemplates.clear(),this.elementGestureMap.clear(),this.activeGesturesRegistry.destroy(),this.keyboardManager.destroy(),this.pointerManager.destroy()}}class Pn extends Id{constructor(n){super(n);se(this,"unregisterHandler",null);se(this,"originalTarget",null);this.minPointers=n.minPointers??1,this.maxPointers=n.maxPointers??1/0}init(n,r,o,i){super.init(n,r,o,i),this.unregisterHandler=this.pointerManager.registerGestureHandler(this.handlePointerEvent)}updateOptions(n){super.updateOptions(n),this.minPointers=n.minPointers??this.minPointers,this.maxPointers=n.maxPointers??this.maxPointers}getBaseConfig(){return{requiredKeys:this.requiredKeys,minPointers:this.minPointers,maxPointers:this.maxPointers}}isWithinPointerCount(n,r){const o=this.getEffectiveConfig(r,this.getBaseConfig());return n.length>=o.minPointers&&n.length<=o.maxPointers}getRelevantPointers(n,r){return n.filter(o=>this.isPointerTypeAllowed(o.pointerType)&&(r===o.target||o.target===this.originalTarget||r===this.originalTarget||"contains"in r&&r.contains(o.target))||"getRootNode"in r&&r.getRootNode()instanceof ShadowRoot&&o.srcEvent.composedPath().includes(r))}destroy(){this.unregisterHandler&&(this.unregisterHandler(),this.unregisterHandler=null),super.destroy()}}function nx(e,t){const n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)}function po(e){if(e.length<2)return 0;let t=0,n=0;for(let r=0;r<e.length;r+=1)for(let o=r+1;o<e.length;o+=1)t+=nx({x:e[r].clientX,y:e[r].clientY},{x:e[o].clientX,y:e[o].clientY}),n+=1;return n>0?t/n:0}function Et(e){if(e.length===0)return{x:0,y:0};const t=e.reduce((n,r)=>(n.x+=r.clientX,n.y+=r.clientY,n),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}function pt(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const fo=1e-5,Zt=1e-5,sc=.15;function rx(e,t){const n=t.x-e.x,r=t.y-e.y,o={vertical:null,horizontal:null,mainAxis:null},i=ox(t,e),a=Math.abs(n)>Math.abs(r)?"horizontal":"vertical",l=i||a==="horizontal"?fo:sc,u=i?fo:a==="horizontal"?sc:fo;return Math.abs(n)>l&&(o.horizontal=n>0?"right":"left"),Math.abs(r)>u&&(o.vertical=r>0?"down":"up"),o.mainAxis=i?"diagonal":a,o}function ox(e,t){const n=t.x-e.x,r=t.y-e.y,o=Math.atan2(r,n)*180/Math.PI;return o>=-45+Zt&&o<=-22.5+Zt||o>=22.5+Zt&&o<=45+Zt||o>=135+Zt&&o<=157.5+Zt||o>=-157.5+Zt&&o<=-135+Zt}function ix(e,t){if(!e.vertical&&!e.horizontal)return!1;if(t.length===0)return!0;const n=e.vertical===null||t.includes(e.vertical),r=e.horizontal===null||t.includes(e.horizontal);return n&&r}const ac=0,sx=e=>e>ac?1:e<-ac?-1:0,en=e=>{e.cancelable&&e.preventDefault()};class ma extends Pn{constructor(n){super(n);se(this,"state",{lastPosition:null});se(this,"handleElementEnter",n=>{if(n.pointerType!=="mouse"&&n.pointerType!=="pen")return;const r=this.pointerManager.getPointers()||new Map,o=Array.from(r.values());if(this.isWithinPointerCount(o,n.pointerType)){this.isActive=!0;const i={x:n.clientX,y:n.clientY};this.state.lastPosition=i,this.emitMoveEvent(this.element,"start",o,n),this.emitMoveEvent(this.element,"ongoing",o,n)}});se(this,"handleElementLeave",n=>{if(n.pointerType!=="mouse"&&n.pointerType!=="pen"||!this.isActive)return;const r=this.pointerManager.getPointers()||new Map,o=Array.from(r.values());this.emitMoveEvent(this.element,"end",o,n),this.resetState()});se(this,"handlePointerEvent",(n,r)=>{if(r.type!=="pointermove"||r.pointerType!=="mouse"&&r.pointerType!=="pen")return;this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const o=Array.from(n.values()),i=this.getTargetElement(r);if(!i||!this.isWithinPointerCount(o,r.pointerType))return;if(this.shouldPreventGesture(i,r.pointerType)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(i,"end",o,r);return}const a={x:r.clientX,y:r.clientY};this.state.lastPosition=a,this.isActive||(this.isActive=!0,this.emitMoveEvent(i,"start",o,r)),this.emitMoveEvent(i,"ongoing",o,r)});this.threshold=n.threshold||0}clone(n){return new ma(c._extends({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},n))}init(n,r,o,i){super.init(n,r,o,i),this.element.addEventListener("pointerenter",this.handleElementEnter),this.element.addEventListener("pointerleave",this.handleElementLeave)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnter),this.element.removeEventListener("pointerleave",this.handleElementLeave),this.resetState(),super.destroy()}updateOptions(n){super.updateOptions(n)}resetState(){this.isActive=!1,this.state={lastPosition:null}}emitMoveEvent(n,r,o,i){const a=this.state.lastPosition||Et(o),l=this.gesturesRegistry.getActiveGestures(n),u={gestureName:this.name,centroid:a,target:i.target,srcEvent:i,phase:r,pointers:o,timeStamp:i.timeStamp,activeGestures:l,customData:this.customData},d=pt(this.name,r),p=new CustomEvent(d,{bubbles:!0,cancelable:!0,composed:!0,detail:u});n.dispatchEvent(p)}}class Sn extends Pn{constructor(n){super(n);se(this,"state",{startPointers:new Map,startCentroid:null,lastCentroid:null,movementThresholdReached:!1,totalDeltaX:0,totalDeltaY:0,activeDeltaX:0,activeDeltaY:0,lastDirection:{vertical:null,horizontal:null,mainAxis:null},lastDeltas:null});se(this,"handlePointerEvent",(n,r)=>{var l;const o=Array.from(n.values());if(r.type==="forceCancel"){this.cancel(r.target,o,r);return}const i=this.getTargetElement(r);if(!i)return;if(this.shouldPreventGesture(i,r.pointerType)){this.cancel(i,o,r);return}const a=this.getRelevantPointers(o,i);if(!this.isWithinPointerCount(a,r.pointerType)){this.cancel(i,a,r);return}switch(r.type){case"pointerdown":if(!this.isActive&&!this.state.startCentroid)a.forEach(u=>{this.state.startPointers.set(u.pointerId,u)}),this.originalTarget=i,this.state.startCentroid=Et(a),this.state.lastCentroid=c._extends({},this.state.startCentroid);else if(this.state.startCentroid&&this.state.lastCentroid){const u=this.state.lastCentroid,d=Et(a),p=d.x-u.x,f=d.y-u.y;this.state.startCentroid={x:this.state.startCentroid.x+p,y:this.state.startCentroid.y+f},this.state.lastCentroid=d,a.forEach(h=>{this.state.startPointers.has(h.pointerId)||this.state.startPointers.set(h.pointerId,h)})}break;case"pointermove":if(this.state.startCentroid&&this.isWithinPointerCount(o,r.pointerType)){const u=Et(a),d=u.x-this.state.startCentroid.x,p=u.y-this.state.startCentroid.y,f=Math.sqrt(d*d+p*p),h=rx(this.state.lastCentroid??this.state.startCentroid,u),m=this.state.lastCentroid?u.x-this.state.lastCentroid.x:0,g=this.state.lastCentroid?u.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&f>=this.threshold&&ix(h,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:m,y:g},this.state.totalDeltaX+=m,this.state.totalDeltaY+=g,this.state.activeDeltaX+=m,this.state.activeDeltaY+=g,this.emitPanEvent(i,"start",a,r,u),this.emitPanEvent(i,"ongoing",a,r,u)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:m,y:g},this.state.totalDeltaX+=m,this.state.totalDeltaY+=g,this.state.activeDeltaX+=m,this.state.activeDeltaY+=g,this.emitPanEvent(i,"ongoing",a,r,u)),this.state.lastCentroid=u,this.state.lastDirection=h}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){const u=a.filter(d=>d.type!=="pointerup"&&d.type!=="pointercancel");if(this.isWithinPointerCount(u,r.pointerType)){if(u.length>=1&&this.state.lastCentroid){const d=Et(u),p=d.x-this.state.lastCentroid.x,f=d.y-this.state.lastCentroid.y;this.state.startCentroid={x:this.state.startCentroid.x+p,y:this.state.startCentroid.y+f},this.state.lastCentroid=d;const h=(l=a.find(m=>m.type==="pointerup"||m.type==="pointercancel"))==null?void 0:l.pointerId;h!==void 0&&this.state.startPointers.delete(h)}}else{const d=this.state.lastCentroid||this.state.startCentroid;r.type==="pointercancel"&&this.emitPanEvent(i,"cancel",a,r,d),this.emitPanEvent(i,"end",a,r,d),this.resetState()}}else this.resetState();break}});this.direction=n.direction||["up","down","left","right"],this.threshold=n.threshold||0}clone(n){return new Sn(c._extends({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},n))}destroy(){this.resetState(),super.destroy()}updateOptions(n){super.updateOptions(n),this.direction=n.direction||this.direction,this.threshold=n.threshold??this.threshold}resetState(){this.isActive=!1,this.state=c._extends({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}emitPanEvent(n,r,o,i,a){var T,v;if(!this.state.startCentroid)return;const l=((T=this.state.lastDeltas)==null?void 0:T.x)??0,u=((v=this.state.lastDeltas)==null?void 0:v.y)??0,d=this.state.startPointers.values().next().value,p=d?(i.timeStamp-d.timeStamp)/1e3:0,f=p>0?l/p:0,h=p>0?u/p:0,m=Math.sqrt(f*f+h*h),g=this.gesturesRegistry.getActiveGestures(n),y={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:a,target:i.target,srcEvent:i,phase:r,pointers:o,timeStamp:i.timeStamp,deltaX:l,deltaY:u,direction:this.state.lastDirection,velocityX:f,velocityY:h,velocity:m,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,activeDeltaX:this.state.activeDeltaX,activeDeltaY:this.state.activeDeltaY,activeGestures:g,customData:this.customData},x=pt(this.name,r),b=new CustomEvent(x,{bubbles:!0,cancelable:!0,composed:!0,detail:y});n.dispatchEvent(b),this.preventDefault&&i.preventDefault(),this.stopPropagation&&i.stopPropagation()}cancel(n,r,o){if(this.isActive){const i=n??this.element;this.emitPanEvent(i,"cancel",r,o,this.state.lastCentroid),this.emitPanEvent(i,"end",r,o,this.state.lastCentroid)}this.resetState()}}class ga extends Pn{constructor(n){super(c._extends({},n,{minPointers:n.minPointers??2}));se(this,"state",{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,totalScale:1,deltaScale:0});se(this,"handlePointerEvent",(n,r)=>{const o=Array.from(n.values()),i=this.getTargetElement(r);if(!i)return;if(this.shouldPreventGesture(i,r.pointerType)){this.isActive&&(this.emitPinchEvent(i,"cancel",o,r),this.resetState());return}const a=this.getRelevantPointers(o,i);switch(r.type){case"pointerdown":if(a.length>=2&&!this.isActive){const l=po(a);this.state.startDistance=l,this.state.lastDistance=l,this.state.lastTime=r.timeStamp,this.originalTarget=i}else if(this.isActive&&a.length>=2){const l=po(a);this.state.startDistance=l/this.state.lastScale,this.state.lastDistance=l,this.state.lastTime=r.timeStamp}break;case"pointermove":if(this.state.startDistance&&this.isWithinPointerCount(a,r.pointerType)){const l=po(a),u=Math.abs(l-this.state.lastDistance);if(u!==0&&u>=this.threshold){const d=this.state.startDistance?l/this.state.startDistance:1,p=d/this.state.lastScale;this.state.totalScale*=p;const f=(r.timeStamp-this.state.lastTime)/1e3;if(this.state.lastDistance){const m=(l-this.state.lastDistance)/f;this.state.velocity=Number.isNaN(m)?0:m}this.state.lastDistance=l,this.state.deltaScale=d-this.state.lastScale,this.state.lastScale=d,this.state.lastTime=r.timeStamp,this.isActive?this.emitPinchEvent(i,"ongoing",a,r):(this.isActive=!0,this.emitPinchEvent(i,"start",a,r),this.emitPinchEvent(i,"ongoing",a,r))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const l=a.filter(u=>u.type!=="pointerup"&&u.type!=="pointercancel");if(!this.isWithinPointerCount(l,r.pointerType))r.type==="pointercancel"&&this.emitPinchEvent(i,"cancel",a,r),this.emitPinchEvent(i,"end",a,r),this.resetState();else if(l.length>=2){const u=po(l);this.state.startDistance=u/this.state.lastScale,this.state.lastDistance=u,this.state.lastTime=r.timeStamp}}break}});this.threshold=n.threshold??0}clone(n){return new ga(c._extends({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},n))}destroy(){this.resetState(),super.destroy()}updateOptions(n){super.updateOptions(n)}resetState(){this.isActive=!1,this.state=c._extends({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}emitPinchEvent(n,r,o,i){const a=Et(o),l=this.state.lastDistance,u=this.state.lastScale,d=this.gesturesRegistry.getActiveGestures(n),p={gestureName:this.name,centroid:a,target:i.target,srcEvent:i,phase:r,pointers:o,timeStamp:i.timeStamp,scale:u,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:l,velocity:this.state.velocity,activeGestures:d,direction:sx(this.state.velocity),customData:this.customData};this.preventDefault&&i.preventDefault(),this.stopPropagation&&i.stopPropagation();const f=pt(this.name,r),h=new CustomEvent(f,{bubbles:!0,cancelable:!0,composed:!0,detail:p});n.dispatchEvent(h)}}class yi extends Pn{constructor(n){super(n);se(this,"state",{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1});se(this,"handlePointerEvent",(n,r)=>{const o=Array.from(n.values());if(r.type==="forceCancel"){this.cancelPress(r.target,o,r);return}const i=this.getTargetElement(r);if(!i)return;if(this.shouldPreventGesture(i,r.pointerType)){this.isActive&&this.cancelPress(i,o,r);return}const a=this.getRelevantPointers(o,i);if(!this.isWithinPointerCount(a,r.pointerType)){this.isActive&&this.cancelPress(i,a,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=Et(a),this.state.lastPosition=c._extends({},this.state.startCentroid),this.state.startTime=r.timeStamp,this.isActive=!0,this.originalTarget=i,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const l=this.state.lastPosition;this.emitPressEvent(i,"start",a,r,l),this.emitPressEvent(i,"ongoing",a,r,l)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const l=Et(a);this.state.lastPosition=l;const u=l.x-this.state.startCentroid.x,d=l.y-this.state.startCentroid.y;Math.sqrt(u*u+d*d)>this.maxDistance&&this.cancelPress(i,a,r)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const l=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(i,"end",a,r,l)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(i,a,r);break}});this.duration=n.duration??500,this.maxDistance=n.maxDistance??10}clone(n){return new yi(c._extends({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,duration:this.duration,maxDistance:this.maxDistance,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},n))}destroy(){this.clearPressTimer(),this.resetState(),super.destroy()}updateOptions(n){super.updateOptions(n),this.duration=n.duration??this.duration,this.maxDistance=n.maxDistance??this.maxDistance}resetState(){this.clearPressTimer(),this.isActive=!1,this.state=c._extends({},this.state,{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1})}clearPressTimer(){this.state.timerId!==null&&(clearTimeout(this.state.timerId),this.state.timerId=null)}emitPressEvent(n,r,o,i,a){const l=this.gesturesRegistry.getActiveGestures(n),u=i.timeStamp-this.state.startTime,d={gestureName:this.name,centroid:a,target:i.target,srcEvent:i,phase:r,pointers:o,timeStamp:i.timeStamp,x:a.x,y:a.y,duration:u,activeGestures:l,customData:this.customData},p=pt(this.name,r),f=new CustomEvent(p,{bubbles:!0,cancelable:!0,composed:!0,detail:d});n.dispatchEvent(f),this.preventDefault&&i.preventDefault(),this.stopPropagation&&i.stopPropagation()}cancelPress(n,r,o){if(this.isActive&&this.state.pressThresholdReached){const i=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(n??this.element,"cancel",r,o,i),this.emitPressEvent(n??this.element,"end",r,o,i)}this.resetState()}}class xa extends Pn{constructor(n){super(n);se(this,"state",{phase:"waitingForPress",dragTimeoutId:null});se(this,"pressHandler",()=>{this.state.phase==="waitingForPress"&&(this.state.phase="pressDetected",this.setTouchAction(),this.state.dragTimeoutId=setTimeout(()=>{this.resetState()},this.dragTimeout))});se(this,"dragStartHandler",n=>{this.state.phase==="pressDetected"&&(this.state.dragTimeoutId!==null&&(clearTimeout(this.state.dragTimeoutId),this.state.dragTimeoutId=null),this.restoreTouchAction(),this.state.phase="dragging",this.isActive=!0,this.element.dispatchEvent(new CustomEvent(pt(this.name,n.detail.phase),n)))});se(this,"dragMoveHandler",n=>{this.state.phase==="dragging"&&this.element.dispatchEvent(new CustomEvent(pt(this.name,n.detail.phase),n))});se(this,"dragEndHandler",n=>{this.state.phase==="dragging"&&(this.resetState(),this.element.dispatchEvent(new CustomEvent(pt(this.name,n.detail.phase),n)))});this.pressDuration=n.pressDuration??500,this.pressMaxDistance=n.pressMaxDistance??10,this.dragTimeout=n.dragTimeout??1e3,this.dragThreshold=n.dragThreshold??0,this.dragDirection=n.dragDirection||["up","down","left","right"],this.pressGesture=new yi({name:`${this.name}-press`,duration:this.pressDuration,maxDistance:this.pressMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}),this.panGesture=new Sn({name:`${this.name}-pan`,minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)})}clone(n){return new xa(c._extends({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,pressDuration:this.pressDuration,pressMaxDistance:this.pressMaxDistance,dragTimeout:this.dragTimeout,dragThreshold:this.dragThreshold,dragDirection:[...this.dragDirection],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},n))}init(n,r,o,i){super.init(n,r,o,i),this.pressGesture.init(n,r,o,i),this.panGesture.init(n,r,o,i),this.element.addEventListener(this.pressGesture.name,this.pressHandler),this.element.addEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.addEventListener(this.panGesture.name,this.dragMoveHandler),this.element.addEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.addEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler)}destroy(){this.resetState(),this.pressGesture.destroy(),this.panGesture.destroy(),this.element.removeEventListener(this.pressGesture.name,this.pressHandler),this.element.removeEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.removeEventListener(this.panGesture.name,this.dragMoveHandler),this.element.removeEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.removeEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler),super.destroy()}updateOptions(n){super.updateOptions(n),this.pressDuration=n.pressDuration??this.pressDuration,this.pressMaxDistance=n.pressMaxDistance??this.pressMaxDistance,this.dragTimeout=n.dragTimeout??this.dragTimeout,this.dragThreshold=n.dragThreshold??this.dragThreshold,this.dragDirection=n.dragDirection||this.dragDirection,this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`,{detail:{minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}})),this.element.dispatchEvent(new CustomEvent(`${this.pressGesture.name}ChangeOptions`,{detail:{duration:this.pressDuration,maxDistance:this.pressMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}}))}resetState(){this.state.dragTimeoutId!==null&&clearTimeout(this.state.dragTimeoutId),this.restoreTouchAction(),this.isActive=!1,this.state={phase:"waitingForPress",dragTimeoutId:null}}handlePointerEvent(){}setTouchAction(){this.element.addEventListener("touchstart",en,{passive:!1}),this.element.addEventListener("touchmove",en,{passive:!1}),this.element.addEventListener("touchend",en,{passive:!1})}restoreTouchAction(){this.element.removeEventListener("touchstart",en),this.element.removeEventListener("touchmove",en),this.element.removeEventListener("touchend",en)}}class $r extends Pn{constructor(n){super(n);se(this,"state",{startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null});se(this,"handlePointerEvent",(n,r)=>{const o=Array.from(n.values()),i=this.getTargetElement(r);if(!i)return;const a=this.getRelevantPointers(o,i);if(this.shouldPreventGesture(i,r.pointerType)||!this.isWithinPointerCount(a,r.pointerType)){this.isActive&&this.cancelTap(i,a,r);return}switch(r.type){case"pointerdown":this.isActive||(this.state.startCentroid=Et(a),this.state.lastPosition=c._extends({},this.state.startCentroid),this.isActive=!0,this.originalTarget=i);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const l=Et(a);this.state.lastPosition=l;const u=l.x-this.state.startCentroid.x,d=l.y-this.state.startCentroid.y;Math.sqrt(u*u+d*d)>this.maxDistance&&this.cancelTap(i,a,r)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const l=this.state.lastPosition||this.state.startCentroid;if(!l){this.cancelTap(i,a,r);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(i,a,r,l),this.resetState()):(this.state.lastTapTime=r.timeStamp,this.isActive=!1,this.state.startCentroid=null,setTimeout(()=>{this.state&&this.state.currentTapCount>0&&this.state.currentTapCount<this.taps&&(this.state.currentTapCount=0)},300))}break;case"pointercancel":case"forceCancel":this.cancelTap(i,a,r);break}});this.maxDistance=n.maxDistance??10,this.taps=n.taps??1}clone(n){return new $r(c._extends({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},n))}destroy(){this.resetState(),super.destroy()}updateOptions(n){super.updateOptions(n),this.maxDistance=n.maxDistance??this.maxDistance,this.taps=n.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}fireTapEvent(n,r,o,i){const a=this.gesturesRegistry.getActiveGestures(n),l={gestureName:this.name,centroid:i,target:o.target,srcEvent:o,phase:"end",pointers:r,timeStamp:o.timeStamp,x:i.x,y:i.y,tapCount:this.state.currentTapCount,activeGestures:a,customData:this.customData},u=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,composed:!0,detail:l});n.dispatchEvent(u),this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation()}cancelTap(n,r,o){if(this.state.startCentroid||this.state.lastPosition){const i=this.state.lastPosition||this.state.startCentroid,a=this.gesturesRegistry.getActiveGestures(n),l={gestureName:this.name,centroid:i,target:o.target,srcEvent:o,phase:"cancel",pointers:r,timeStamp:o.timeStamp,x:i.x,y:i.y,tapCount:this.state.currentTapCount,activeGestures:a,customData:this.customData},u=pt(this.name,"cancel"),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,composed:!0,detail:l});n.dispatchEvent(d)}this.resetState()}}class ya extends Pn{constructor(n){super(n);se(this,"state",{phase:"waitingForTap",dragTimeoutId:null});se(this,"tapHandler",()=>{this.state.phase==="waitingForTap"&&(this.state.phase="tapDetected",this.setTouchAction(),this.state.dragTimeoutId=setTimeout(()=>{this.resetState()},this.dragTimeout))});se(this,"dragStartHandler",n=>{this.state.phase==="tapDetected"&&(this.state.dragTimeoutId!==null&&(clearTimeout(this.state.dragTimeoutId),this.state.dragTimeoutId=null),this.restoreTouchAction(),this.state.phase="dragging",this.isActive=!0,this.element.dispatchEvent(new CustomEvent(pt(this.name,n.detail.phase),n)))});se(this,"dragMoveHandler",n=>{this.state.phase==="dragging"&&this.element.dispatchEvent(new CustomEvent(pt(this.name,n.detail.phase),n))});se(this,"dragEndHandler",n=>{this.state.phase==="dragging"&&(this.resetState(),this.element.dispatchEvent(new CustomEvent(pt(this.name,n.detail.phase),n)))});this.tapMaxDistance=n.tapMaxDistance??10,this.dragTimeout=n.dragTimeout??1e3,this.dragThreshold=n.dragThreshold??0,this.dragDirection=n.dragDirection||["up","down","left","right"],this.tapGesture=new $r({name:`${this.name}-tap`,maxDistance:this.tapMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}),this.panGesture=new Sn({name:`${this.name}-pan`,minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)})}clone(n){return new ya(c._extends({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,tapMaxDistance:this.tapMaxDistance,dragTimeout:this.dragTimeout,dragThreshold:this.dragThreshold,dragDirection:[...this.dragDirection],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},n))}init(n,r,o,i){super.init(n,r,o,i),this.tapGesture.init(n,r,o,i),this.panGesture.init(n,r,o,i),this.element.addEventListener(this.tapGesture.name,this.tapHandler),this.element.addEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.addEventListener(this.panGesture.name,this.dragMoveHandler),this.element.addEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.addEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler)}destroy(){this.resetState(),this.tapGesture.destroy(),this.panGesture.destroy(),this.element.removeEventListener(this.tapGesture.name,this.tapHandler),this.element.removeEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.removeEventListener(this.panGesture.name,this.dragMoveHandler),this.element.removeEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.removeEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler),super.destroy()}updateOptions(n){super.updateOptions(n),this.tapMaxDistance=n.tapMaxDistance??this.tapMaxDistance,this.dragTimeout=n.dragTimeout??this.dragTimeout,this.dragThreshold=n.dragThreshold??this.dragThreshold,this.dragDirection=n.dragDirection||this.dragDirection,this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`,{detail:{minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}})),this.element.dispatchEvent(new CustomEvent(`${this.tapGesture.name}ChangeOptions`,{detail:{maxDistance:this.tapMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}}))}resetState(){this.state.dragTimeoutId!==null&&clearTimeout(this.state.dragTimeoutId),this.restoreTouchAction(),this.isActive=!1,this.state={phase:"waitingForTap",dragTimeoutId:null}}handlePointerEvent(){}setTouchAction(){this.element.addEventListener("touchstart",en,{passive:!1})}restoreTouchAction(){this.element.removeEventListener("touchstart",en)}}class Wo extends Id{constructor(n){super(n);se(this,"state",{totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0});se(this,"handleWheelEvent",n=>{if(this.shouldPreventGesture(this.element,"mouse"))return;const r=this.pointerManager.getPointers()||new Map,o=Array.from(r.values());this.state.totalDeltaX+=n.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=n.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=n.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(i=>{this.state[i]<this.min&&(this.state[i]=this.min),this.state[i]>this.max&&(this.state[i]=this.max)}),this.emitWheelEvent(o,n)});this.sensitivity=n.sensitivity??1,this.max=n.max??Number.MAX_SAFE_INTEGER,this.min=n.min??Number.MIN_SAFE_INTEGER,this.initialDelta=n.initialDelta??0,this.invert=n.invert??!1,this.state.totalDeltaX=this.initialDelta,this.state.totalDeltaY=this.initialDelta,this.state.totalDeltaZ=this.initialDelta}clone(n){return new Wo(c._extends({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,sensitivity:this.sensitivity,max:this.max,min:this.min,initialDelta:this.initialDelta,invert:this.invert,requiredKeys:[...this.requiredKeys],preventIf:[...this.preventIf]},n))}init(n,r,o,i){super.init(n,r,o,i),this.element.addEventListener("wheel",this.handleWheelEvent)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEvent),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(n){super.updateOptions(n),this.sensitivity=n.sensitivity??this.sensitivity,this.max=n.max??this.max,this.min=n.min??this.min,this.initialDelta=n.initialDelta??this.initialDelta,this.invert=n.invert??this.invert}emitWheelEvent(n,r){const o=n.length>0?Et(n):{x:r.clientX,y:r.clientY},i=this.gesturesRegistry.getActiveGestures(this.element),a={gestureName:this.name,centroid:o,target:r.target,srcEvent:r,phase:"ongoing",pointers:n,timeStamp:r.timeStamp,deltaX:r.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:r.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:r.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:r.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:i,customData:this.customData};this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const l=pt(this.name,"ongoing"),u=new CustomEvent(l,{bubbles:!0,cancelable:!0,composed:!0,detail:a});this.element.dispatchEvent(u)}}const zn=e=>e.preventDefault(),ba=({svgRef:e})=>{const t=C.useRef(null);C.useEffect(()=>{const o=e.current;t.current||(t.current=new tx({gestures:[new Sn({name:"pan",threshold:0,maxPointers:1}),new ma({name:"move",preventIf:["pan","zoomPinch","zoomPan"]}),new $r({name:"tap",preventIf:["pan","zoomPinch","zoomPan"]}),new yi({name:"quickPress",duration:50}),new Sn({name:"brush",threshold:0,maxPointers:1}),new Sn({name:"zoomPan",threshold:0,preventIf:["zoomTapAndDrag","zoomPressAndDrag"]}),new ga({name:"zoomPinch",threshold:5}),new Wo({name:"zoomTurnWheel",sensitivity:.01,initialDelta:1}),new Wo({name:"panTurnWheel",sensitivity:.5}),new ya({name:"zoomTapAndDrag",dragThreshold:10}),new xa({name:"zoomPressAndDrag",dragThreshold:10,preventIf:["zoomPinch"]}),new $r({name:"zoomDoubleTapReset",taps:2})]}));const i=t.current;if(!(!o||!i))return i.registerElement(["pan","move","zoomPinch","zoomPan","zoomTurnWheel","panTurnWheel","tap","quickPress","zoomTapAndDrag","zoomPressAndDrag","zoomDoubleTapReset","brush"],o),()=>{i.unregisterAllGestures(o)}},[e,t]);const n=C.useCallback((o,i,a)=>{const l=e.current;return l==null||l.addEventListener(o,i,a),{cleanup:()=>l==null?void 0:l.removeEventListener(o,i)}},[e]),r=C.useCallback((o,i)=>{const a=e.current,l=t.current;!l||!a||l.setGestureOptions(o,a,i??{})},[e,t]);return C.useEffect(()=>{const o=e.current;return o==null||o.addEventListener("gesturestart",zn),o==null||o.addEventListener("gesturechange",zn),o==null||o.addEventListener("gestureend",zn),()=>{o==null||o.removeEventListener("gesturestart",zn),o==null||o.removeEventListener("gesturechange",zn),o==null||o.removeEventListener("gestureend",zn)}},[e]),{instance:{addInteractionListener:n,updateZoomInteractionListeners:r}}};ba.params={};ba.getInitialState=()=>({});const ax=[fa,pa,mi,xi,ba,hi],lx=["apiRef"],cx=e=>{let{plugins:t}=e,n=c._objectWithoutPropertiesLoose(e.props,lx);const r={};t.forEach(a=>{Object.assign(r,a.params)});const o={};return Object.keys(n).forEach(a=>{const l=n[a];r[a]&&(o[a]=l)}),t.reduce((a,l)=>l.getDefaultizedParams?l.getDefaultizedParams({params:a}):a,o)};let lc=0;function ux(e,t,n){const r=c.useId(),o=C.useMemo(()=>[...ax,...e],[e]),i=cx({plugins:o,props:t});i.id=i.id??r;const l=C.useRef({}).current,u=px(t.apiRef),d=C.useRef(null),p=C.useRef(null),f=C.useRef(null);if(f.current==null){lc+=1;const g={cacheKey:{id:lc}};o.forEach(y=>{y.getInitialState&&Object.assign(g,y.getInitialState(i,g,n))}),f.current=new da(g)}const h=g=>{const y=g({instance:l,params:i,plugins:o,store:f.current,svgRef:p,chartRootRef:d,seriesConfig:n});y.publicAPI&&Object.assign(u.current,y.publicAPI),y.instance&&Object.assign(l,y.instance)};return o.forEach(h),{contextValue:C.useMemo(()=>({store:f.current,publicAPI:u.current,instance:l,svgRef:p,chartRootRef:d}),[l,u])}}function dx(e){return e.current==null&&(e.current={}),e}function px(e){const t=C.useRef({});return e?dx(e):t}const va=C.createContext(null);process.env.NODE_ENV!=="production"&&(va.displayName="ChartContext");const cc=new Set;function qn(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
|
|
50
|
-
`):e;cc.has(n)||(cc.add(n),t==="error"?console.error(n):console.warn(n))}function fx(e){const{componentName:t,propName:n,controlled:r,defaultValue:o,warningPrefix:i="MUI X"}=e,[{initialDefaultValue:a,isControlled:l}]=C.useState({initialDefaultValue:o,isControlled:r!==void 0});l!==(r!==void 0)&&qn([`${i}: A component is changing the ${l?"":"un"}controlled ${n} state of ${t} to be ${l?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"],"error"),JSON.stringify(a)!==JSON.stringify(o)&&qn([`${i}: A component is changing the default ${n} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`],"error")}const Ea=process.env.NODE_ENV==="production"?()=>{}:fx,Pd=4,kd=20+2*Pd,hx=40+2*Pd,mx="hover",ho={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",reverse:!1,slider:{enabled:!1,preview:!1,size:kd,showTooltip:mx}},Ta=(e,t,n,r)=>{var o;if(e)return e===!0?c._extends({axisId:t,axisDirection:n},ho,{reverse:r??!1}):c._extends({axisId:t,axisDirection:n},ho,{reverse:r??!1},e,{slider:c._extends({},ho.slider,{size:((o=e.slider)==null?void 0:o.preview)??ho.slider.preview?hx:kd},e.slider)})};function Ad(e,t){const n={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:bg,scaleType:"linear"}]).map((i,a)=>{var m;const l=i.dataKey,u=a===0?"bottom":"none",d=i.position??u,p=Sg+(i.label?Cd:0),f=i.id??`defaultized-x-axis-${a}`,h=c._extends({offset:n[d]},i,{id:f,position:d,height:i.height??p,zoom:Ta(i.zoom,f,"x",i.reverse)});if(d!=="none"&&(n[d]+=h.height,(m=h.zoom)!=null&&m.slider.enabled&&(n[d]+=h.zoom.slider.size)),l===void 0||i.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: x-axis uses `dataKey` but no `dataset` is provided.");return c._extends({},h,{data:t.map(g=>g[l])})})}function _d(e,t){const n={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:vg,scaleType:"linear"}]).map((i,a)=>{var m;const l=i.dataKey,u=a===0?"left":"none",d=i.position??u,p=Tg+(i.label?Cd:0),f=i.id??`defaultized-y-axis-${a}`,h=c._extends({offset:n[d]},i,{id:f,position:d,width:i.width??p,zoom:Ta(i.zoom,f,"y",i.reverse)});if(d!=="none"&&(n[d]+=h.width,(m=h.zoom)!=null&&m.slider.enabled&&(n[d]+=h.zoom.slider.size)),l===void 0||i.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: y-axis uses `dataKey` but no `dataset` is provided.");return c._extends({},h,{data:t.map(g=>g[l])})})}function gx(e,t){return function(r,o){if(o.location==="tick"){const i=o.scale.domain();return i[0]===i[1]?o.scale.tickFormat(1)(r):o.scale.tickFormat(e)(r)}return o.location==="zoom-slider-tooltip"?t.tickFormat(2)(r):`${r}`}}function cr(e){return e.scaleType==="band"}function ur(e){return e.scaleType==="point"}function xx(e){return e.scaleType==="symlog"}function No(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function yx(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Sa(e){let t,n,r;e.length!==2?(t=No,n=(l,u)=>No(e(l),u),r=(l,u)=>e(l)-u):(t=e===No||e===yx?e:bx,n=e,r=e);function o(l,u,d=0,p=l.length){if(d<p){if(t(u,u)!==0)return p;do{const f=d+p>>>1;n(l[f],u)<0?d=f+1:p=f}while(d<p)}return d}function i(l,u,d=0,p=l.length){if(d<p){if(t(u,u)!==0)return p;do{const f=d+p>>>1;n(l[f],u)<=0?d=f+1:p=f}while(d<p)}return d}function a(l,u,d=0,p=l.length){const f=o(l,u,d,p-1);return f>d&&r(l[f-1],u)>-r(l[f],u)?f-1:f}return{left:o,center:a,right:i}}function bx(){return 0}function vx(e){return e===null?NaN:+e}const Ex=Sa(No),Dd=Ex.right;Sa(vx).center;class Go extends Map{constructor(t,n=wx){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(uc(this,t))}has(t){return super.has(uc(this,t))}set(t,n){return super.set(Tx(this,t),n)}delete(t){return super.delete(Sx(this,t))}}function uc({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Tx({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Sx({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function wx(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Cx=Math.sqrt(50),Rx=Math.sqrt(10),jx=Math.sqrt(2);function Ho(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=Cx?10:i>=Rx?5:i>=jx?2:1;let l,u,d;return o<0?(d=Math.pow(10,-o)/a,l=Math.round(e*d),u=Math.round(t*d),l/d<e&&++l,u/d>t&&--u,d=-d):(d=Math.pow(10,o)*a,l=Math.round(e/d),u=Math.round(t/d),l*d<e&&++l,u*d>t&&--u),u<l&&.5<=n&&n<2?Ho(e,t,n*2):[l,u,d]}function Ds(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[o,i,a]=r?Ho(t,e,n):Ho(e,t,n);if(!(i>=o))return[];const l=i-o+1,u=new Array(l);if(r)if(a<0)for(let d=0;d<l;++d)u[d]=(i-d)/-a;else for(let d=0;d<l;++d)u[d]=(i-d)*a;else if(a<0)for(let d=0;d<l;++d)u[d]=(o+d)/-a;else for(let d=0;d<l;++d)u[d]=(o+d)*a;return u}function Ns(e,t,n){return t=+t,e=+e,n=+n,Ho(e,t,n)[2]}function $s(e,t,n){t=+t,e=+e,n=+n;const r=t<e,o=r?Ns(t,e,n):Ns(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function Mx(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r<o;)i[r]=e+r*n;return i}function an(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ox(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const dc=Symbol("implicit");function zs(){var e=new Go,t=[],n=[],r=dc;function o(i){let a=e.get(i);if(a===void 0){if(r!==dc)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Go;for(const a of i)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return zs(t,n).unknown(r)},an.apply(o,arguments),o}function wa(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Nd(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Jr(){}var zr=.7,qo=1/zr,Gn="\\s*([+-]?\\d+)\\s*",Lr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",It="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ix=/^#([0-9a-f]{3,8})$/,Px=new RegExp(`^rgb\\(${Gn},${Gn},${Gn}\\)$`),kx=new RegExp(`^rgb\\(${It},${It},${It}\\)$`),Ax=new RegExp(`^rgba\\(${Gn},${Gn},${Gn},${Lr}\\)$`),_x=new RegExp(`^rgba\\(${It},${It},${It},${Lr}\\)$`),Dx=new RegExp(`^hsl\\(${Lr},${It},${It}\\)$`),Nx=new RegExp(`^hsla\\(${Lr},${It},${It},${Lr}\\)$`),pc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};wa(Jr,Fr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fc,formatHex:fc,formatHex8:$x,formatHsl:zx,formatRgb:hc,toString:hc});function fc(){return this.rgb().formatHex()}function $x(){return this.rgb().formatHex8()}function zx(){return $d(this).formatHsl()}function hc(){return this.rgb().formatRgb()}function Fr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ix.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?mc(t):n===3?new tt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?mo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?mo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Px.exec(e))?new tt(t[1],t[2],t[3],1):(t=kx.exec(e))?new tt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ax.exec(e))?mo(t[1],t[2],t[3],t[4]):(t=_x.exec(e))?mo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Dx.exec(e))?yc(t[1],t[2]/100,t[3]/100,1):(t=Nx.exec(e))?yc(t[1],t[2]/100,t[3]/100,t[4]):pc.hasOwnProperty(e)?mc(pc[e]):e==="transparent"?new tt(NaN,NaN,NaN,0):null}function mc(e){return new tt(e>>16&255,e>>8&255,e&255,1)}function mo(e,t,n,r){return r<=0&&(e=t=n=NaN),new tt(e,t,n,r)}function Lx(e){return e instanceof Jr||(e=Fr(e)),e?(e=e.rgb(),new tt(e.r,e.g,e.b,e.opacity)):new tt}function Ls(e,t,n,r){return arguments.length===1?Lx(e):new tt(e,t,n,r??1)}function tt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}wa(tt,Ls,Nd(Jr,{brighter(e){return e=e==null?qo:Math.pow(qo,e),new tt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?zr:Math.pow(zr,e),new tt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tt(wn(this.r),wn(this.g),wn(this.b),Yo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:gc,formatHex:gc,formatHex8:Fx,formatRgb:xc,toString:xc}));function gc(){return`#${bn(this.r)}${bn(this.g)}${bn(this.b)}`}function Fx(){return`#${bn(this.r)}${bn(this.g)}${bn(this.b)}${bn((isNaN(this.opacity)?1:this.opacity)*255)}`}function xc(){const e=Yo(this.opacity);return`${e===1?"rgb(":"rgba("}${wn(this.r)}, ${wn(this.g)}, ${wn(this.b)}${e===1?")":`, ${e})`}`}function Yo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function bn(e){return e=wn(e),(e<16?"0":"")+e.toString(16)}function yc(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new bt(e,t,n,r)}function $d(e){if(e instanceof bt)return new bt(e.h,e.s,e.l,e.opacity);if(e instanceof Jr||(e=Fr(e)),!e)return new bt;if(e instanceof bt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,l=i-o,u=(i+o)/2;return l?(t===i?a=(n-r)/l+(n<r)*6:n===i?a=(r-t)/l+2:a=(t-n)/l+4,l/=u<.5?i+o:2-i-o,a*=60):l=u>0&&u<1?0:a,new bt(a,l,u,e.opacity)}function Bx(e,t,n,r){return arguments.length===1?$d(e):new bt(e,t,n,r??1)}function bt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}wa(bt,Bx,Nd(Jr,{brighter(e){return e=e==null?qo:Math.pow(qo,e),new bt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?zr:Math.pow(zr,e),new bt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new tt(cs(e>=240?e-240:e+120,o,r),cs(e,o,r),cs(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new bt(bc(this.h),go(this.s),go(this.l),Yo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Yo(this.opacity);return`${e===1?"hsl(":"hsla("}${bc(this.h)}, ${go(this.s)*100}%, ${go(this.l)*100}%${e===1?")":`, ${e})`}`}}));function bc(e){return e=(e||0)%360,e<0?e+360:e}function go(e){return Math.max(0,Math.min(1,e||0))}function cs(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Ca=e=>()=>e;function Ux(e,t){return function(n){return e+n*t}}function Vx(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Wx(e){return(e=+e)==1?zd:function(t,n){return n-t?Vx(t,n,e):Ca(isNaN(t)?n:t)}}function zd(e,t){var n=t-e;return n?Ux(e,n):Ca(isNaN(e)?t:e)}const vc=(function e(t){var n=Wx(t);function r(o,i){var a=n((o=Ls(o)).r,(i=Ls(i)).r),l=n(o.g,i.g),u=n(o.b,i.b),d=zd(o.opacity,i.opacity);return function(p){return o.r=a(p),o.g=l(p),o.b=u(p),o.opacity=d(p),o+""}}return r.gamma=e,r})(1);function Gx(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function Hx(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function qx(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),a;for(a=0;a<r;++a)o[a]=bi(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(l){for(a=0;a<r;++a)i[a]=o[a](l);return i}}function Ra(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function vt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Yx(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=bi(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Fs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,us=new RegExp(Fs.source,"g");function Kx(e){return function(){return e}}function Xx(e){return function(t){return e(t)+""}}function Jx(e,t){var n=Fs.lastIndex=us.lastIndex=0,r,o,i,a=-1,l=[],u=[];for(e=e+"",t=t+"";(r=Fs.exec(e))&&(o=us.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),l[a]?l[a]+=i:l[++a]=i),(r=r[0])===(o=o[0])?l[a]?l[a]+=o:l[++a]=o:(l[++a]=null,u.push({i:a,x:vt(r,o)})),n=us.lastIndex;return n<t.length&&(i=t.slice(n),l[a]?l[a]+=i:l[++a]=i),l.length<2?u[0]?Xx(u[0].x):Kx(t):(t=u.length,function(d){for(var p=0,f;p<t;++p)l[(f=u[p]).i]=f.x(d);return l.join("")})}function bi(e,t){var n=typeof t,r;return t==null||n==="boolean"?Ca(t):(n==="number"?vt:n==="string"?(r=Fr(t))?(t=r,vc):Jx:t instanceof Fr?vc:t instanceof Date?Ra:Hx(t)?Gx:Array.isArray(t)?qx:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Yx:vt)(e,t)}function Ld(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Zx(e){return function(){return e}}function Qx(e){return+e}var Ec=[0,1];function ct(e){return e}function Bs(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Zx(isNaN(t)?NaN:.5)}function ey(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function ty(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=Bs(o,r),i=n(a,i)):(r=Bs(r,o),i=n(i,a)),function(l){return i(r(l))}}function ny(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=Bs(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(l){var u=Dd(e,l,1,r)-1;return i[u](o[u](l))}}function Zr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function vi(){var e=Ec,t=Ec,n=bi,r,o,i,a=ct,l,u,d;function p(){var h=Math.min(e.length,t.length);return a!==ct&&(a=ey(e[0],e[h-1])),l=h>2?ny:ty,u=d=null,f}function f(h){return h==null||isNaN(h=+h)?i:(u||(u=l(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(o((d||(d=l(t,e.map(r),vt)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Qx),p()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),p()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=Ld,p()},f.clamp=function(h){return arguments.length?(a=h?!0:ct,p()):a!==ct},f.interpolate=function(h){return arguments.length?(n=h,p()):n},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,m){return r=h,o=m,p()}}function Fd(){return vi()(ct,ct)}function ry(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ko(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Yn(e){return e=Ko(Math.abs(e)),e?e[1]:NaN}function oy(e,t){return function(n,r){for(var o=n.length,i=[],a=0,l=e[0],u=0;o>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),i.push(n.substring(o-=l,o+l)),!((u+=l+1)>r));)l=e[a=(a+1)%e.length];return i.reverse().join(t)}}function iy(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var sy=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Br(e){if(!(t=sy.exec(e)))throw new Error("invalid format: "+e);var t;return new ja({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Br.prototype=ja.prototype;function ja(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}ja.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ay(e){e:for(var t=e.length,n=1,r=-1,o;n<t;++n)switch(e[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var Bd;function ly(e,t){var n=Ko(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Bd=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Ko(e,Math.max(0,t+i-1))[0]}function Tc(e,t){var n=Ko(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const Sc={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ry,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Tc(e*100,t),r:Tc,s:ly,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function wc(e){return e}var Cc=Array.prototype.map,Rc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function cy(e){var t=e.grouping===void 0||e.thousands===void 0?wc:oy(Cc.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?wc:iy(Cc.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function d(f){f=Br(f);var h=f.fill,m=f.align,g=f.sign,y=f.symbol,x=f.zero,b=f.width,T=f.comma,v=f.precision,E=f.trim,w=f.type;w==="n"?(T=!0,w="g"):Sc[w]||(v===void 0&&(v=12),E=!0,w="g"),(x||h==="0"&&m==="=")&&(x=!0,h="0",m="=");var S=y==="$"?n:y==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",R=y==="$"?r:/[%p]/.test(w)?a:"",j=Sc[w],M=/[defgprs%]/.test(w);v=v===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function I(k){var D=S,O=R,P,N,_;if(w==="c")O=j(k)+O,k="";else{k=+k;var z=k<0||1/k<0;if(k=isNaN(k)?u:j(Math.abs(k),v),E&&(k=ay(k)),z&&+k==0&&g!=="+"&&(z=!1),D=(z?g==="("?g:l:g==="-"||g==="("?"":g)+D,O=(w==="s"?Rc[8+Bd/3]:"")+O+(z&&g==="("?")":""),M){for(P=-1,N=k.length;++P<N;)if(_=k.charCodeAt(P),48>_||_>57){O=(_===46?o+k.slice(P+1):k.slice(P))+O,k=k.slice(0,P);break}}}T&&!x&&(k=t(k,1/0));var B=D.length+k.length+O.length,W=B<b?new Array(b-B+1).join(h):"";switch(T&&x&&(k=t(W+k,W.length?b-O.length:1/0),W=""),m){case"<":k=D+k+O+W;break;case"=":k=D+W+k+O;break;case"^":k=W.slice(0,B=W.length>>1)+D+k+O+W.slice(B);break;default:k=W+D+k+O;break}return i(k)}return I.toString=function(){return f+""},I}function p(f,h){var m=d((f=Br(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Yn(h)/3)))*3,y=Math.pow(10,-g),x=Rc[8+g/3];return function(b){return m(y*b)+x}}return{format:d,formatPrefix:p}}var xo,Ma,Ud;uy({thousands:",",grouping:[3],currency:["$",""]});function uy(e){return xo=cy(e),Ma=xo.format,Ud=xo.formatPrefix,xo}function dy(e){return Math.max(0,-Yn(Math.abs(e)))}function py(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yn(t)/3)))*3-Yn(Math.abs(e)))}function fy(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Yn(t)-Yn(e))+1}function hy(e,t,n,r){var o=$s(e,t,n),i;switch(r=Br(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=py(o,a))&&(r.precision=i),Ud(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=fy(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=dy(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ma(r)}function Ei(e){var t=e.domain;return e.ticks=function(n){var r=t();return Ds(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return hy(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],l=r[i],u,d,p=10;for(l<a&&(d=a,a=l,l=d,d=o,o=i,i=d);p-- >0;){if(d=Ns(a,l,n),d===u)return r[o]=a,r[i]=l,t(r);if(d>0)a=Math.floor(a/d)*d,l=Math.ceil(l/d)*d;else if(d<0)a=Math.ceil(a*d)/d,l=Math.floor(l*d)/d;else break;u=d}return e},e}function Oa(){var e=Fd();return e.copy=function(){return Zr(e,Oa())},an.apply(e,arguments),Ei(e)}function Vd(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return i<o&&(a=n,n=r,r=a,a=o,o=i,i=a),e[n]=t.floor(o),e[r]=t.ceil(i),e}function jc(e){return Math.log(e)}function Mc(e){return Math.exp(e)}function my(e){return-Math.log(-e)}function gy(e){return-Math.exp(-e)}function xy(e){return isFinite(e)?+("1e"+e):e<0?0:e}function yy(e){return e===10?xy:e===Math.E?Math.exp:t=>Math.pow(e,t)}function by(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Oc(e){return(t,n)=>-e(-t,n)}function vy(e){const t=e(jc,Mc),n=t.domain;let r=10,o,i;function a(){return o=by(r),i=yy(r),n()[0]<0?(o=Oc(o),i=Oc(i),e(my,gy)):e(jc,Mc),t}return t.base=function(l){return arguments.length?(r=+l,a()):r},t.domain=function(l){return arguments.length?(n(l),a()):n()},t.ticks=l=>{const u=n();let d=u[0],p=u[u.length-1];const f=p<d;f&&([d,p]=[p,d]);let h=o(d),m=o(p),g,y;const x=l==null?10:+l;let b=[];if(!(r%1)&&m-h<x){if(h=Math.floor(h),m=Math.ceil(m),d>0){for(;h<=m;++h)for(g=1;g<r;++g)if(y=h<0?g/i(-h):g*i(h),!(y<d)){if(y>p)break;b.push(y)}}else for(;h<=m;++h)for(g=r-1;g>=1;--g)if(y=h>0?g/i(-h):g*i(h),!(y<d)){if(y>p)break;b.push(y)}b.length*2<x&&(b=Ds(d,p,x))}else b=Ds(h,m,Math.min(m-h,x)).map(i);return f?b.reverse():b},t.tickFormat=(l,u)=>{if(l==null&&(l=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Br(u)).precision==null&&(u.trim=!0),u=Ma(u)),l===1/0)return u;const d=Math.max(1,r*l/t.ticks().length);return p=>{let f=p/i(Math.round(o(p)));return f*r<r-.5&&(f*=r),f<=d?u(p):""}},t.nice=()=>n(Vd(n(),{floor:l=>i(Math.floor(o(l))),ceil:l=>i(Math.ceil(o(l)))})),t}function Xo(){const e=vy(vi()).domain([1,10]);return e.copy=()=>Zr(e,Xo()).base(e.base()),an.apply(e,arguments),e}function Ic(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Pc(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ey(e){var t=1,n=e(Ic(t),Pc(t));return n.constant=function(r){return arguments.length?e(Ic(t=+r),Pc(t)):t},Ei(n)}function Wd(){var e=Ey(vi());return e.copy=function(){return Zr(e,Wd()).constant(e.constant())},an.apply(e,arguments)}function kc(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ty(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Sy(e){return e<0?-e*e:e*e}function wy(e){var t=e(ct,ct),n=1;function r(){return n===1?e(ct,ct):n===.5?e(Ty,Sy):e(kc(n),kc(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},Ei(t)}function Ia(){var e=wy(vi());return e.copy=function(){return Zr(e,Ia()).exponent(e.exponent())},an.apply(e,arguments),e}function Cy(){return Ia.apply(null,arguments).exponent(.5)}function Gd(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[Dd(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Gd().domain(e).range(t).unknown(n)},an.apply(o,arguments)}const ds=new Date,ps=new Date;function Be(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),l=o.ceil(i);return i-a<l-i?a:l},o.offset=(i,a)=>(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,l)=>{const u=[];if(i=o.ceil(i),l=l==null?1:Math.floor(l),!(i<a)||!(l>0))return u;let d;do u.push(d=new Date(+i)),t(i,l),e(i);while(d<i&&i<a);return u},o.filter=i=>Be(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,l)=>{if(a>=a)if(l<0)for(;++l<=0;)for(;t(a,-1),!i(a););else for(;--l>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(ds.setTime(+i),ps.setTime(+a),e(ds),e(ps),Math.floor(n(ds,ps))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const Jo=Be(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Jo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Be(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Jo);Jo.range;const Lt=1e3,ut=Lt*60,Ft=ut*60,Wt=Ft*24,Pa=Wt*7,Ac=Wt*30,fs=Wt*365,vn=Be(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Lt)},(e,t)=>(t-e)/Lt,e=>e.getUTCSeconds());vn.range;const ka=Be(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lt)},(e,t)=>{e.setTime(+e+t*ut)},(e,t)=>(t-e)/ut,e=>e.getMinutes());ka.range;const Aa=Be(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ut)},(e,t)=>(t-e)/ut,e=>e.getUTCMinutes());Aa.range;const _a=Be(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lt-e.getMinutes()*ut)},(e,t)=>{e.setTime(+e+t*Ft)},(e,t)=>(t-e)/Ft,e=>e.getHours());_a.range;const Da=Be(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ft)},(e,t)=>(t-e)/Ft,e=>e.getUTCHours());Da.range;const Qr=Be(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ut)/Wt,e=>e.getDate()-1);Qr.range;const Ti=Be(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wt,e=>e.getUTCDate()-1);Ti.range;const Hd=Be(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wt,e=>Math.floor(e/Wt));Hd.range;function kn(e){return Be(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ut)/Pa)}const Si=kn(0),Zo=kn(1),Ry=kn(2),jy=kn(3),Kn=kn(4),My=kn(5),Oy=kn(6);Si.range;Zo.range;Ry.range;jy.range;Kn.range;My.range;Oy.range;function An(e){return Be(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Pa)}const wi=An(0),Qo=An(1),Iy=An(2),Py=An(3),Xn=An(4),ky=An(5),Ay=An(6);wi.range;Qo.range;Iy.range;Py.range;Xn.range;ky.range;Ay.range;const Na=Be(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Na.range;const $a=Be(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());$a.range;const Gt=Be(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Gt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Be(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Gt.range;const Ht=Be(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ht.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Be(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Ht.range;function qd(e,t,n,r,o,i){const a=[[vn,1,Lt],[vn,5,5*Lt],[vn,15,15*Lt],[vn,30,30*Lt],[i,1,ut],[i,5,5*ut],[i,15,15*ut],[i,30,30*ut],[o,1,Ft],[o,3,3*Ft],[o,6,6*Ft],[o,12,12*Ft],[r,1,Wt],[r,2,2*Wt],[n,1,Pa],[t,1,Ac],[t,3,3*Ac],[e,1,fs]];function l(d,p,f){const h=p<d;h&&([d,p]=[p,d]);const m=f&&typeof f.range=="function"?f:u(d,p,f),g=m?m.range(d,+p+1):[];return h?g.reverse():g}function u(d,p,f){const h=Math.abs(p-d)/f,m=Sa(([,,x])=>x).right(a,h);if(m===a.length)return e.every($s(d/fs,p/fs,f));if(m===0)return Jo.every(Math.max($s(d,p,f),1));const[g,y]=a[h/a[m-1][2]<a[m][2]/h?m-1:m];return g.every(y)}return[l,u]}const[_y,Dy]=qd(Ht,$a,wi,Hd,Da,Aa),[Ny,$y]=qd(Gt,Na,Si,Qr,_a,ka);function hs(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ms(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function mr(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function zy(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,l=e.months,u=e.shortMonths,d=gr(o),p=xr(o),f=gr(i),h=xr(i),m=gr(a),g=xr(a),y=gr(l),x=xr(l),b=gr(u),T=xr(u),v={a:z,A:B,b:W,B:K,c:null,d:Lc,e:Lc,f:ab,g:xb,G:bb,H:ob,I:ib,j:sb,L:Yd,m:lb,M:cb,p:$,q:ne,Q:Uc,s:Vc,S:ub,u:db,U:pb,V:fb,w:hb,W:mb,x:null,X:null,y:gb,Y:yb,Z:vb,"%":Bc},E={a:le,A:xe,b:de,B:pe,c:null,d:Fc,e:Fc,f:wb,g:_b,G:Nb,H:Eb,I:Tb,j:Sb,L:Xd,m:Cb,M:Rb,p:fe,q:he,Q:Uc,s:Vc,S:jb,u:Mb,U:Ob,V:Ib,w:Pb,W:kb,x:null,X:null,y:Ab,Y:Db,Z:$b,"%":Bc},w={a:I,A:k,b:D,B:O,c:P,d:$c,e:$c,f:eb,g:Nc,G:Dc,H:zc,I:zc,j:Xy,L:Qy,m:Ky,M:Jy,p:M,q:Yy,Q:nb,s:rb,S:Zy,u:Vy,U:Wy,V:Gy,w:Uy,W:Hy,x:N,X:_,y:Nc,Y:Dc,Z:qy,"%":tb};v.x=S(n,v),v.X=S(r,v),v.c=S(t,v),E.x=S(n,E),E.X=S(r,E),E.c=S(t,E);function S(U,V){return function(G){var A=[],Z=-1,q=0,oe=U.length,me,ae,ve;for(G instanceof Date||(G=new Date(+G));++Z<oe;)U.charCodeAt(Z)===37&&(A.push(U.slice(q,Z)),(ae=_c[me=U.charAt(++Z)])!=null?me=U.charAt(++Z):ae=me==="e"?" ":"0",(ve=V[me])&&(me=ve(G,ae)),A.push(me),q=Z+1);return A.push(U.slice(q,Z)),A.join("")}}function R(U,V){return function(G){var A=mr(1900,void 0,1),Z=j(A,U,G+="",0),q,oe;if(Z!=G.length)return null;if("Q"in A)return new Date(A.Q);if("s"in A)return new Date(A.s*1e3+("L"in A?A.L:0));if(V&&!("Z"in A)&&(A.Z=0),"p"in A&&(A.H=A.H%12+A.p*12),A.m===void 0&&(A.m="q"in A?A.q:0),"V"in A){if(A.V<1||A.V>53)return null;"w"in A||(A.w=1),"Z"in A?(q=ms(mr(A.y,0,1)),oe=q.getUTCDay(),q=oe>4||oe===0?Qo.ceil(q):Qo(q),q=Ti.offset(q,(A.V-1)*7),A.y=q.getUTCFullYear(),A.m=q.getUTCMonth(),A.d=q.getUTCDate()+(A.w+6)%7):(q=hs(mr(A.y,0,1)),oe=q.getDay(),q=oe>4||oe===0?Zo.ceil(q):Zo(q),q=Qr.offset(q,(A.V-1)*7),A.y=q.getFullYear(),A.m=q.getMonth(),A.d=q.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),oe="Z"in A?ms(mr(A.y,0,1)).getUTCDay():hs(mr(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(oe+5)%7:A.w+A.U*7-(oe+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,ms(A)):hs(A)}}function j(U,V,G,A){for(var Z=0,q=V.length,oe=G.length,me,ae;Z<q;){if(A>=oe)return-1;if(me=V.charCodeAt(Z++),me===37){if(me=V.charAt(Z++),ae=w[me in _c?V.charAt(Z++):me],!ae||(A=ae(U,G,A))<0)return-1}else if(me!=G.charCodeAt(A++))return-1}return A}function M(U,V,G){var A=d.exec(V.slice(G));return A?(U.p=p.get(A[0].toLowerCase()),G+A[0].length):-1}function I(U,V,G){var A=m.exec(V.slice(G));return A?(U.w=g.get(A[0].toLowerCase()),G+A[0].length):-1}function k(U,V,G){var A=f.exec(V.slice(G));return A?(U.w=h.get(A[0].toLowerCase()),G+A[0].length):-1}function D(U,V,G){var A=b.exec(V.slice(G));return A?(U.m=T.get(A[0].toLowerCase()),G+A[0].length):-1}function O(U,V,G){var A=y.exec(V.slice(G));return A?(U.m=x.get(A[0].toLowerCase()),G+A[0].length):-1}function P(U,V,G){return j(U,t,V,G)}function N(U,V,G){return j(U,n,V,G)}function _(U,V,G){return j(U,r,V,G)}function z(U){return a[U.getDay()]}function B(U){return i[U.getDay()]}function W(U){return u[U.getMonth()]}function K(U){return l[U.getMonth()]}function $(U){return o[+(U.getHours()>=12)]}function ne(U){return 1+~~(U.getMonth()/3)}function le(U){return a[U.getUTCDay()]}function xe(U){return i[U.getUTCDay()]}function de(U){return u[U.getUTCMonth()]}function pe(U){return l[U.getUTCMonth()]}function fe(U){return o[+(U.getUTCHours()>=12)]}function he(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var V=S(U+="",v);return V.toString=function(){return U},V},parse:function(U){var V=R(U+="",!1);return V.toString=function(){return U},V},utcFormat:function(U){var V=S(U+="",E);return V.toString=function(){return U},V},utcParse:function(U){var V=R(U+="",!0);return V.toString=function(){return U},V}}}var _c={"-":"",_:" ",0:"0"},We=/^\s*\d+/,Ly=/^%/,Fy=/[\\^$*+?|[\]().{}]/g;function Te(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function By(e){return e.replace(Fy,"\\$&")}function gr(e){return new RegExp("^(?:"+e.map(By).join("|")+")","i")}function xr(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Uy(e,t,n){var r=We.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Vy(e,t,n){var r=We.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Wy(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Gy(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Hy(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Dc(e,t,n){var r=We.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Nc(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qy(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Yy(e,t,n){var r=We.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ky(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $c(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Xy(e,t,n){var r=We.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function zc(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Jy(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Zy(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Qy(e,t,n){var r=We.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function eb(e,t,n){var r=We.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function tb(e,t,n){var r=Ly.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function nb(e,t,n){var r=We.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function rb(e,t,n){var r=We.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Lc(e,t){return Te(e.getDate(),t,2)}function ob(e,t){return Te(e.getHours(),t,2)}function ib(e,t){return Te(e.getHours()%12||12,t,2)}function sb(e,t){return Te(1+Qr.count(Gt(e),e),t,3)}function Yd(e,t){return Te(e.getMilliseconds(),t,3)}function ab(e,t){return Yd(e,t)+"000"}function lb(e,t){return Te(e.getMonth()+1,t,2)}function cb(e,t){return Te(e.getMinutes(),t,2)}function ub(e,t){return Te(e.getSeconds(),t,2)}function db(e){var t=e.getDay();return t===0?7:t}function pb(e,t){return Te(Si.count(Gt(e)-1,e),t,2)}function Kd(e){var t=e.getDay();return t>=4||t===0?Kn(e):Kn.ceil(e)}function fb(e,t){return e=Kd(e),Te(Kn.count(Gt(e),e)+(Gt(e).getDay()===4),t,2)}function hb(e){return e.getDay()}function mb(e,t){return Te(Zo.count(Gt(e)-1,e),t,2)}function gb(e,t){return Te(e.getFullYear()%100,t,2)}function xb(e,t){return e=Kd(e),Te(e.getFullYear()%100,t,2)}function yb(e,t){return Te(e.getFullYear()%1e4,t,4)}function bb(e,t){var n=e.getDay();return e=n>=4||n===0?Kn(e):Kn.ceil(e),Te(e.getFullYear()%1e4,t,4)}function vb(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Te(t/60|0,"0",2)+Te(t%60,"0",2)}function Fc(e,t){return Te(e.getUTCDate(),t,2)}function Eb(e,t){return Te(e.getUTCHours(),t,2)}function Tb(e,t){return Te(e.getUTCHours()%12||12,t,2)}function Sb(e,t){return Te(1+Ti.count(Ht(e),e),t,3)}function Xd(e,t){return Te(e.getUTCMilliseconds(),t,3)}function wb(e,t){return Xd(e,t)+"000"}function Cb(e,t){return Te(e.getUTCMonth()+1,t,2)}function Rb(e,t){return Te(e.getUTCMinutes(),t,2)}function jb(e,t){return Te(e.getUTCSeconds(),t,2)}function Mb(e){var t=e.getUTCDay();return t===0?7:t}function Ob(e,t){return Te(wi.count(Ht(e)-1,e),t,2)}function Jd(e){var t=e.getUTCDay();return t>=4||t===0?Xn(e):Xn.ceil(e)}function Ib(e,t){return e=Jd(e),Te(Xn.count(Ht(e),e)+(Ht(e).getUTCDay()===4),t,2)}function Pb(e){return e.getUTCDay()}function kb(e,t){return Te(Qo.count(Ht(e)-1,e),t,2)}function Ab(e,t){return Te(e.getUTCFullYear()%100,t,2)}function _b(e,t){return e=Jd(e),Te(e.getUTCFullYear()%100,t,2)}function Db(e,t){return Te(e.getUTCFullYear()%1e4,t,4)}function Nb(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Xn(e):Xn.ceil(e),Te(e.getUTCFullYear()%1e4,t,4)}function $b(){return"+0000"}function Bc(){return"%"}function Uc(e){return+e}function Vc(e){return Math.floor(+e/1e3)}var Ln,Zd,Qd;zb({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function zb(e){return Ln=zy(e),Zd=Ln.format,Ln.parse,Qd=Ln.utcFormat,Ln.utcParse,Ln}function Lb(e){return new Date(e)}function Fb(e){return e instanceof Date?+e:+new Date(+e)}function za(e,t,n,r,o,i,a,l,u,d){var p=Fd(),f=p.invert,h=p.domain,m=d(".%L"),g=d(":%S"),y=d("%I:%M"),x=d("%I %p"),b=d("%a %d"),T=d("%b %d"),v=d("%B"),E=d("%Y");function w(S){return(u(S)<S?m:l(S)<S?g:a(S)<S?y:i(S)<S?x:r(S)<S?o(S)<S?b:T:n(S)<S?v:E)(S)}return p.invert=function(S){return new Date(f(S))},p.domain=function(S){return arguments.length?h(Array.from(S,Fb)):h().map(Lb)},p.ticks=function(S){var R=h();return e(R[0],R[R.length-1],S??10)},p.tickFormat=function(S,R){return R==null?w:d(R)},p.nice=function(S){var R=h();return(!S||typeof S.range!="function")&&(S=t(R[0],R[R.length-1],S??10)),S?h(Vd(R,S)):p},p.copy=function(){return Zr(p,za(e,t,n,r,o,i,a,l,u,d))},p}function ep(){return an.apply(za(Ny,$y,Gt,Na,Si,Qr,_a,ka,vn,Zd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Bb(){return an.apply(za(_y,Dy,Ht,$a,wi,Ti,Da,Aa,vn,Qd).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ub(){var e=0,t=1,n,r,o,i,a=ct,l=!1,u;function d(f){return f==null||isNaN(f=+f)?u:a(o===0?.5:(f=(i(f)-n)*o,l?Math.max(0,Math.min(1,f)):f))}d.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),o=n===r?0:1/(r-n),d):[e,t]},d.clamp=function(f){return arguments.length?(l=!!f,d):l},d.interpolator=function(f){return arguments.length?(a=f,d):a};function p(f){return function(h){var m,g;return arguments.length?([m,g]=h,a=f(m,g),d):[a(0),a(1)]}}return d.range=p(bi),d.rangeRound=p(Ld),d.unknown=function(f){return arguments.length?(u=f,d):u},function(f){return i=f,n=f(e),r=f(t),o=n===r?0:1/(r-n),d}}function Vb(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function tp(){var e=Ei(Ub()(ct));return e.copy=function(){return Vb(e,tp())},Ox.apply(e,arguments)}function np(e){return e.type==="piecewise"?Gd(e.thresholds,e.colors):tp([e.min??0,e.max??100],e.color)}function ei(e){return e.values?zs(e.values,e.colors).unknown(e.unknownColor??null):zs(e.colors.map((t,n)=>n),e.colors).unknown(e.unknownColor??null)}function Us(e){return e.type==="ordinal"?ei(e):np(e)}function La(e,t,n){const{tickMaxStep:r,tickMinStep:o,tickNumber:i}=e,a=o===void 0?999:Math.floor(Math.abs(t[1]-t[0])/o),l=r===void 0?2:Math.ceil(Math.abs(t[1]-t[0])/r);return Math.min(a,Math.max(l,i??n))}function Wb(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function rp(e){return Math.floor(Math.abs(e)/50)}function Wc(e){return Array.isArray(e)?JSON.stringify(e):typeof e=="object"&&e!==null?e.valueOf():e}function Fa(...e){let t=new Go(void 0,Wc),n=[],r=[],o=0,i=1,a,l,u=!1,d=0,p=0,f=.5;const h=x=>{const b=t.get(x);if(b!==void 0)return r[b%r.length]},m=()=>{const x=n.length,b=i<o,T=b?i:o,v=b?o:i;a=(v-T)/Math.max(1,x-d+p*2),u&&(a=Math.floor(a));const E=T+(v-T-a*(x-d))*f;l=a*(1-d);const w=u?Math.round(E):E;l=u?Math.round(l):l;const R=Mx(x).map(j=>w+a*j);return r=b?R.reverse():R,h};h.domain=function(x){if(!arguments.length)return n.slice();n=[],t=new Go(void 0,Wc);for(const b of x)t.has(b)||t.set(b,n.push(b)-1);return m()},h.range=function(x){if(!arguments.length)return[o,i];const[b,T]=x;return o=+b,i=+T,m()},h.rangeRound=function(x){const[b,T]=x;return o=+b,i=+T,u=!0,m()},h.bandwidth=function(){return l},h.step=function(){return a},h.round=function(x){return arguments.length?(u=!!x,m()):u},h.padding=function(x){return arguments.length?(d=Math.min(1,p=+x),m()):d},h.paddingInner=function(x){return arguments.length?(d=Math.min(1,x),m()):d},h.paddingOuter=function(x){return arguments.length?(p=+x,m()):p},h.align=function(x){return arguments.length?(f=Math.max(0,Math.min(1,x)),m()):f},h.copy=()=>Fa(n,[o,i]).round(u).paddingInner(d).paddingOuter(p).align(f);const[g,y]=e;return e.length>1?(h.domain(g),h.range(y)):g?h.range(g):m(),h}function Gb(...e){const t=Fa(...e).paddingInner(1),n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=()=>{const r=n();return r.padding=r.paddingOuter,delete r.paddingInner,delete r.paddingOuter,r.copy=t.copy,r},t}function op(...e){const t=Wd(...e),n=t.ticks,{negativeScale:r,linearScale:o,positiveScale:i}=Hb(t);return t.ticks=a=>{const l=n(a),u=t.constant();let d=0,p=0,f=0;l.forEach(m=>{m>-u&&m<u&&(p+=1),m<=-u&&(d+=1),m>=u&&(f+=1)});const h=[];if(d>0&&h.push(...r.ticks(d)),p>0){const m=o.ticks(p);h.at(-1)===m[0]?h.push(...m.slice(1)):h.push(...m)}if(f>0){const m=i.ticks(f);h.at(-1)===m[0]?h.push(...m.slice(1)):h.push(...m)}return h},t.tickFormat=(a=10,l)=>{const u=t.constant(),[d,p]=t.domain(),f=p-d,h=r.domain(),m=h[1]-h[0],y=(f===0?0:m/f)*a,x=o.domain(),b=x[1]-x[0],v=(f===0?0:b/f)*a,E=i.domain(),w=E[1]-E[0],R=(f===0?0:w/f)*a,j=r.tickFormat(y,l),M=o.tickFormat(v,l),I=i.tickFormat(R,l);return k=>(k.valueOf()<=-u?j:k.valueOf()>=u?I:M)(k)},t.copy=()=>op(t.domain(),t.range()).constant(t.constant()),t}function Hb(e){const t=e.constant(),n=e.domain(),r=[n[0],Math.min(n[1],-t)],o=Xo(r,e.range()),i=[Math.max(n[0],-t),Math.min(n[1],t)],a=Oa(i,e.range()),l=[Math.max(n[0],t),n[1]],u=Xo(l,e.range());return{negativeScale:o,linearScale:a,positiveScale:u}}function Ba(e,t,n){switch(e){case"log":return Xo(t,n);case"pow":return Ia(t,n);case"sqrt":return Cy(t,n);case"time":return ep(t,n);case"utc":return Bb(t,n);case"symlog":return op(t,n);default:return Oa(t,n)}}const qb=e=>(e==null?void 0:e[0])instanceof Date;function Yb(e,t,n){const r=ep(e,t);return(o,{location:i})=>i==="tick"?r.tickFormat(n)(o):`${o.toLocaleString()}`}let Gc,Hc;class Kb{constructor(){se(this,"types",new Set);if(Gc)throw new Error("You can only create one instance!");Gc=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class Xb{constructor(){se(this,"types",new Set);if(Hc)throw new Error("You can only create one instance!");Hc=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const Ci=new Kb;Ci.addType("bar");Ci.addType("line");Ci.addType("scatter");const Jb=new Xb;Jb.addType("radar");function ip(e){return Ci.getTypes().has(e)}const Zb=(e,t,n,r)=>{const o=new Set;return Object.keys(t).filter(ip).forEach(a=>{var d,p,f;const l=((d=n[a])==null?void 0:d.series)??{},u=(f=(p=t[a]).axisTooltipGetter)==null?void 0:f.call(p,l);u!==void 0&&u.forEach(({axisId:h,direction:m})=>{m===e&&o.add(h??r)})}),o};function eo(e){return e.bandwidth!==void 0}function Qb(e){return eo(e)&&e.paddingOuter!==void 0}function ev(e,t,n){const r=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n?[r[1],r[0]]:r}function tv(e,t){return e.step()*t<.1}const nv=.2,rv=.1;function sp({scales:e,drawingArea:t,formattedSeries:n,axis:r,seriesConfig:o,axisDirection:i,zoomMap:a,domains:l}){if(r===void 0)return{axis:{},axisIds:[]};const u=Zb(i,o,n,r[0].id),d={};return r.forEach(p=>{const f=p,h=e[f.id],m=a==null?void 0:a.get(f.id),g=m?[m.start,m.end]:[0,100],y=ev(t,i,f.reverse??!1),x=l[f.id].tickNumber,b=!f.ignoreTooltip&&u.has(f.id),T=Wb(x,g),v=f.data??[];if(eo(h)){const S=i==="y"?[y[1],y[0]]:y;if(Qb(h)&&cr(f)){const R=f.categoryGapRatio??nv,j=tv(h,R),M=j?0:R,I=j?0:f.barGapRatio??rv;d[f.id]=c._extends({offset:0,height:0,categoryGapRatio:M,barGapRatio:I,triggerTooltip:b},f,{data:v,scale:j?h.copy().padding(0):h,tickNumber:T,colorScale:f.colorMap&&(f.colorMap.type==="ordinal"?ei(c._extends({values:f.data},f.colorMap)):Us(f.colorMap))})}if(ur(f)&&(d[f.id]=c._extends({offset:0,height:0,triggerTooltip:b},f,{data:v,scale:h,tickNumber:T,colorScale:f.colorMap&&(f.colorMap.type==="ordinal"?ei(c._extends({values:f.data},f.colorMap)):Us(f.colorMap))})),qb(f.data)){const R=Yb(f.data,S,f.tickNumber);d[f.id].valueFormatter=f.valueFormatter??R}return}if(f.scaleType==="band"||f.scaleType==="point")return;const E=f,w=E.scaleType??"linear";d[f.id]=c._extends({offset:0,height:0,triggerTooltip:b},E,{data:v,scaleType:w,scale:h,tickNumber:T,colorScale:E.colorMap&&np(E.colorMap),valueFormatter:f.valueFormatter??gx(T,Ba(w,y.map(S=>h.invert(S)),y))})}),{axis:d,axisIds:r.map(({id:p})=>p)}}function ov(e){return e!=null}function iv(e,t,n,r){const o=(e==null?void 0:e.length)??0,i=Math.floor(t*o/100),a=Math.ceil(n*o/100);return function(u,d){return(u[r]??(e==null?void 0:e[d]))==null?!0:d>=i&&d<a}}function sv(e,t,n,r,o){const i=e[0].valueOf(),a=e[1].valueOf(),l=i+t*(a-i)/100,u=i+n*(a-i)/100;return function(p,f){const h=p[r]??(o==null?void 0:o[f]);return h==null?!0:h>=l&&h<=u}}const av=e=>({currentAxisId:t,seriesXAxisId:n,seriesYAxisId:r,isDefaultAxis:o})=>(i,a)=>{var d,p;return!(t===n?r:n)||o?((p=(d=Object.values(e??{}))[0])==null?void 0:p.call(d,i,a))??!0:[r,n].filter(f=>f!==t).map(f=>e[f??""]).filter(ov).every(f=>f(i,a))},qc=e=>(t=[])=>t.reduce((n,r)=>{const{zoom:o,id:i,reverse:a}=r,l=Ta(o,i,e,a);return l&&(n[i]=l),n},{}),lv=.2;function ap(e,t,n){const r=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n.reverse?[r[1],r[0]]:r}function lp(e,t){const n=[0,1];if(cr(e)){const i=e.categoryGapRatio??lv;return Fa(t,n).paddingInner(i).paddingOuter(i/2)}if(ur(e))return Gb(t,n);const r=e.scaleType??"linear",o=Ba(r,t,n);return xx(e)&&e.constant!=null&&o.constant(e.constant),o}const cp=(e,t)=>{const n=e[1]-e[0],r=t[1]-t[0],o=e[0]-t[0]*n/r,i=e[1]+(100-t[1])*n/r;return[o,i]},cv=(e,t,n,r,o,i,a)=>{var d;const l=n==="x"?r[e].xExtremumGetter:r[e].yExtremumGetter,u=((d=i[e])==null?void 0:d.series)??{};return(l==null?void 0:l({series:u,axis:t,axisIndex:o,isDefaultAxis:o===0,getFilters:a}))??[1/0,-1/0]};function Ri(e,t,n,r,o,i){const a=Object.keys(n).filter(ip);let l=[1/0,-1/0];for(const u of a){const[d,p]=cv(u,e,t,n,r,o,i);l=[Math.min(l[0],d),Math.max(l[1],p)]}return Number.isNaN(l[0])||Number.isNaN(l[1])?[1/0,-1/0]:l}const uv=(e,t,n,r)=>{var o;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const i of((o=r.line)==null?void 0:o.seriesOrder)??[]){const a=r.line.series[i];if(a.xAxisId===e.id||a.xAxisId===void 0&&n===0)return"strict"}return"nice"};function up(e,t,n){return Ba(e??"linear",t,[0,1]).nice(n).domain()}function dp(e,t,n,r,[o,i],a,l){const u=fp(e,t,n,r,l);let d=hp(e,o,i);if(typeof u=="function"){const{min:f,max:h}=u(o.valueOf(),i.valueOf());d[0]=f,d[1]=h}const p=La(e,d,a);return u==="nice"&&(d=up(e.scaleType,d,p)),d=["min"in e?e.min??d[0]:d[0],"max"in e?e.max??d[1]:d[1]],{domain:d,tickNumber:p}}function pp(e,t,n,r,[o,i],a,l){const u=fp(e,t,n,r,l);let d=hp(e,o,i);if(typeof u=="function"){const{min:p,max:f}=u(o.valueOf(),i.valueOf());d[0]=p,d[1]=f}return u==="nice"&&(d=up(e.scaleType,d,a)),[e.min??d[0],e.max??d[1]]}function fp(e,t,n,r,o){return o?uv(e,t,n,r):e.domainLimit??"nice"}function hp(e,t,n){let r=t,o=n;return"max"in e&&e.max!=null&&e.max<t&&(r=e.max),"min"in e&&e.min!=null&&e.min>t&&(o=e.min),!("min"in e)&&!("max"in e)?[r,o]:[e.min??r,e.max??o]}class dv{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,n){let r=this.length++;for(;r>0;){const o=r-1>>1,i=this.values[o];if(n>=i)break;this.ids[r]=this.ids[o],this.values[r]=i,r=o}this.ids[r]=t,this.values[r]=n}pop(){if(this.length===0)return;const t=this.ids,n=this.values,r=t[0],o=--this.length;if(o>0){const i=t[o],a=n[o];let l=0;const u=o>>1;for(;l<u;){const d=(l<<1)+1,p=d+1,f=d+(+(p<o)&+(n[p]<n[d]));if(n[f]>=a)break;t[l]=t[f],n[l]=n[f],l=f}t[l]=i,n[l]=a}return r}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){this.ids.length=this.values.length=this.length}}const Yc=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],gs=3;class Ua{static from(t,n=0){if(n%8!==0)throw new Error("byteOffset must be 8-byte aligned.");if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[r,o]=new Uint8Array(t,n+0,2);if(r!==251)throw new Error("Data does not appear to be in a Flatbush format.");const i=o>>4;if(i!==gs)throw new Error(`Got v${i} data when expected v${gs}.`);const a=Yc[o&15];if(!a)throw new Error("Unrecognized array type.");const[l]=new Uint16Array(t,n+2,1),[u]=new Uint32Array(t,n+4,1);return new Ua(u,l,a,void 0,t,n)}constructor(t,n=16,r=Float64Array,o=ArrayBuffer,i,a=0){if(t===void 0)throw new Error("Missing required argument: numItems.");if(isNaN(t)||t<=0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.byteOffset=a;let l=t,u=l;this._levelBounds=[l*4];do l=Math.ceil(l/this.nodeSize),u+=l,this._levelBounds.push(u*4);while(l!==1);this.ArrayType=r,this.IndexArrayType=u<16384?Uint16Array:Uint32Array;const d=Yc.indexOf(r),p=u*4*r.BYTES_PER_ELEMENT;if(d<0)throw new Error(`Unexpected typed array class: ${r}.`);if(i)this.data=i,this._boxes=new r(i,a+8,u*4),this._indices=new this.IndexArrayType(i,a+8+p,u),this._pos=u*4,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{const f=this.data=new o(8+p+u*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new r(f,8,u*4),this._indices=new this.IndexArrayType(f,8+p,u),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(f,0,2).set([251,(gs<<4)+d]),new Uint16Array(f,2,1)[0]=n,new Uint32Array(f,4,1)[0]=t}this._queue=new dv}add(t,n,r=t,o=n){const i=this._pos>>2,a=this._boxes;return this._indices[i]=i,a[this._pos++]=t,a[this._pos++]=n,a[this._pos++]=r,a[this._pos++]=o,t<this.minX&&(this.minX=t),n<this.minY&&(this.minY=n),r>this.maxX&&(this.maxX=r),o>this.maxY&&(this.maxY=o),i}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);const t=this._boxes;if(this.numItems<=this.nodeSize){t[this._pos++]=this.minX,t[this._pos++]=this.minY,t[this._pos++]=this.maxX,t[this._pos++]=this.maxY;return}const n=this.maxX-this.minX||1,r=this.maxY-this.minY||1,o=new Uint32Array(this.numItems),i=65535;for(let a=0,l=0;a<this.numItems;a++){const u=t[l++],d=t[l++],p=t[l++],f=t[l++],h=Math.floor(i*((u+p)/2-this.minX)/n),m=Math.floor(i*((d+f)/2-this.minY)/r);o[a]=hv(h,m)}Vs(o,t,this._indices,0,this.numItems-1,this.nodeSize);for(let a=0,l=0;a<this._levelBounds.length-1;a++){const u=this._levelBounds[a];for(;l<u;){const d=l;let p=t[l++],f=t[l++],h=t[l++],m=t[l++];for(let g=1;g<this.nodeSize&&l<u;g++)p=Math.min(p,t[l++]),f=Math.min(f,t[l++]),h=Math.max(h,t[l++]),m=Math.max(m,t[l++]);this._indices[this._pos>>2]=d,t[this._pos++]=p,t[this._pos++]=f,t[this._pos++]=h,t[this._pos++]=m}}}search(t,n,r,o,i){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let a=this._boxes.length-4;const l=[],u=[];for(;a!==void 0;){const d=Math.min(a+this.nodeSize*4,Kc(a,this._levelBounds));for(let p=a;p<d;p+=4){if(r<this._boxes[p]||o<this._boxes[p+1]||t>this._boxes[p+2]||n>this._boxes[p+3])continue;const f=this._indices[p>>2]|0;a>=this.numItems*4?l.push(f):(i===void 0||i(f))&&(u.push(f),u.push(this._boxes[p]),u.push(this._boxes[p+1]))}a=l.pop()}return u}neighbors(t,n,r=1/0,o=1/0,i,a=pv){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let l=this._boxes.length-4;const u=this._queue,d=[];e:for(;l!==void 0;){const p=Math.min(l+this.nodeSize*4,Kc(l,this._levelBounds));for(let f=l;f<p;f+=4){const h=this._indices[f>>2]|0,m=this._boxes[f],g=this._boxes[f+1],y=this._boxes[f+2],x=this._boxes[f+3],b=t<m?m-t:t>y?t-y:0,T=n<g?g-n:n>x?n-x:0,v=a(b,T);v>o||(l>=this.numItems*4?u.push(h<<1,v):(i===void 0||i(h))&&u.push((h<<1)+1,v))}for(;u.length&&u.peek()&1;)if(u.peekValue()>o||(d.push(u.pop()>>1),d.length===r))break e;l=u.length?u.pop()>>1:void 0}return u.clear(),d}}function pv(e,t){return e*e+t*t}function Kc(e,t){let n=0,r=t.length-1;for(;n<r;){const o=n+r>>1;t[o]>e?r=o:n=o+1}return t[n]}function Vs(e,t,n,r,o,i){if(Math.floor(r/i)>=Math.floor(o/i))return;const a=e[r],l=e[r+o>>1],u=e[o];let d=u;const p=Math.max(a,l);u>p?d=p:p===a?d=Math.max(l,u):p===l&&(d=Math.max(a,u));let f=r-1,h=o+1;for(;;){do f++;while(e[f]<d);do h--;while(e[h]>d);if(f>=h)break;fv(e,t,n,f,h)}Vs(e,t,n,r,h,i),Vs(e,t,n,h+1,o,i)}function fv(e,t,n,r,o){const i=e[r];e[r]=e[o],e[o]=i;const a=4*r,l=4*o,u=t[a],d=t[a+1],p=t[a+2],f=t[a+3];t[a]=t[l],t[a+1]=t[l+1],t[a+2]=t[l+2],t[a+3]=t[l+3],t[l]=u,t[l+1]=d,t[l+2]=p,t[l+3]=f;const h=n[r];n[r]=n[o],n[o]=h}function hv(e,t){let n=e^t,r=65535^n,o=65535^(e|t),i=e&(t^65535),a=n|r>>1,l=n>>1^n,u=o>>1^r&i>>1^o,d=n&o>>1^i>>1^i;n=a,r=l,o=u,i=d,a=n&n>>2^r&r>>2,l=n&r>>2^r&(n^r)>>2,u^=n&o>>2^r&i>>2,d^=r&o>>2^(n^r)&i>>2,n=a,r=l,o=u,i=d,a=n&n>>4^r&r>>4,l=n&r>>4^r&(n^r)>>4,u^=n&o>>4^r&i>>4,d^=r&o>>4^(n^r)&i>>4,n=a,r=l,o=u,i=d,u^=n&o>>8^r&i>>8,d^=r&o>>8^(n^r)&i>>8,n=u^u>>1,r=d^d>>1;let p=e^t,f=r|65535^(p|n);return p=(p|p<<8)&16711935,p=(p|p<<4)&252645135,p=(p|p<<2)&858993459,p=(p|p<<1)&1431655765,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,(f<<1|p)>>>0}const mv=e=>{const t=new Map;return e.forEach(n=>{t.set(n.axisId,n)}),t},mp=e=>e.zoom;ue(mp,e=>e==null?void 0:e.isInteracting);const ln=Fe(mp,function(t){return(t==null?void 0:t.zoomData)&&mv(t==null?void 0:t.zoomData)});ue(ln,(e,t)=>e==null?void 0:e.get(t));const ji=Fe(rn,on,function(t,n){return c._extends({},qc("x")(t),qc("y")(n))});ue(ji,(e,t)=>e[t]);const gv=ue(Dt,function(t){return rp(t.width)}),xv=ue(Dt,function(t){return rp(t.height)}),Va=Fe(rn,Je,sn,gi,gv,function(t,n,r,o,i){const l={};return t==null||t.forEach((u,d)=>{var h,m;const p=u;if(cr(p)||ur(p)){l[p.id]={domain:p.data},p.ordinalTimeTicks!==void 0&&(l[p.id].tickNumber=La(p,[(h=p.data)==null?void 0:h.find(g=>g!==null),(m=p.data)==null?void 0:m.findLast(g=>g!==null)],i));return}const f=Ri(p,"x",r,d,n);l[p.id]=dp(p,"x",d,n,f,i,o)}),{axes:t,domains:l}}),Wa=Fe(on,Je,sn,gi,xv,function(t,n,r,o,i){const l={};return t==null||t.forEach((u,d)=>{var h,m;const p=u;if(cr(p)||ur(p)){l[p.id]={domain:p.data},p.ordinalTimeTicks!==void 0&&(l[p.id].tickNumber=La(p,[(h=p.data)==null?void 0:h.find(g=>g!==null),(m=p.data)==null?void 0:m.findLast(g=>g!==null)],i));return}const f=Ri(p,"y",r,d,n);l[p.id]=dp(p,"y",d,n,f,i,o)}),{axes:t,domains:l}}),gp=Fe(ln,ji,Va,Wa,function(t,n,{axes:r,domains:o},{axes:i,domains:a}){if(!t||!n)return;let l=!1;const u={},d=[...r??[],...i??[]];for(let p=0;p<d.length;p+=1){const f=d[p];if(!n[f.id]||n[f.id].filterMode!=="discard")continue;const h=t.get(f.id);if(h===void 0||h.start<=0&&h.end>=100)continue;const m=p<((r==null?void 0:r.length)??0)?"x":"y";if(f.scaleType==="band"||f.scaleType==="point")u[f.id]=iv(f.data,h.start,h.end,m);else{const{domain:g}=m==="x"?o[f.id]:a[f.id];u[f.id]=sv(g,h.start,h.end,m,f.data)}l=!0}if(l)return av(u)}),yv=Fe(Je,sn,ln,ji,gp,gi,Va,function(t,n,r,o,i,a,{axes:l,domains:u}){const d={};return l==null||l.forEach((p,f)=>{const h=u[p.id].domain;if(cr(p)||ur(p)){d[p.id]=h;return}const m=r==null?void 0:r.get(p.id),g=o==null?void 0:o[p.id],y=m===void 0&&!g?i:void 0;if(!y){d[p.id]=h;return}const x=u[p.id].tickNumber,b=Ri(p,"x",n,f,t,y);d[p.id]=pp(p,"x",f,t,b,x,a)}),d}),bv=Fe(Je,sn,ln,ji,gp,gi,Wa,function(t,n,r,o,i,a,{axes:l,domains:u}){const d={};return l==null||l.forEach((p,f)=>{const h=u[p.id].domain;if(cr(p)||ur(p)){d[p.id]=h;return}const m=r==null?void 0:r.get(p.id),g=o==null?void 0:o[p.id],y=m===void 0&&!g?i:void 0;if(!y){d[p.id]=h;return}const x=u[p.id].tickNumber,b=Ri(p,"y",n,f,t,y);d[p.id]=pp(p,"y",f,t,b,x,a)}),d}),xp=Fe(rn,yv,function(t,n){const r={};return t==null||t.forEach(o=>{const i=o,a=n[i.id];r[i.id]=lp(i,a)}),r}),yp=Fe(on,bv,function(t,n){const r={};return t==null||t.forEach(o=>{const i=o,a=n[i.id];r[i.id]=lp(i,a)}),r}),vv=Fe(rn,xp,Dt,ln,function(t,n,r,o){const i={};return t==null||t.forEach(a=>{const l=a,u=o==null?void 0:o.get(l.id),d=u?[u.start,u.end]:[0,100],p=ap(r,"x",l),f=n[l.id].copy(),h=cp(p,d);f.range(h),i[l.id]=f}),i}),Ev=Fe(on,yp,Dt,ln,function(t,n,r,o){const i={};return t==null||t.forEach(a=>{const l=a,u=o==null?void 0:o.get(l.id),d=u?[u.start,u.end]:[0,100],p=ap(r,"y",l),f=n[l.id].copy(),h=eo(f)?p.reverse():p,m=cp(h,d);f.range(m),i[l.id]=f}),i}),cn=Fe(Dt,Je,sn,ln,Va,vv,function(t,n,r,o,{axes:i,domains:a},l){return sp({scales:l,drawingArea:t,formattedSeries:n,axis:i,seriesConfig:r,axisDirection:"x",zoomMap:o,domains:a})}),un=Fe(Dt,Je,sn,ln,Wa,Ev,function(t,n,r,o,{axes:i,domains:a},l){return sp({scales:l,drawingArea:t,formattedSeries:n,axis:i,seriesConfig:r,axisDirection:"y",zoomMap:o,domains:a})});ue(cn,un,(e,t,n)=>(e==null?void 0:e.axis[n])??(t==null?void 0:t.axis[n]));ue(rn,on,(e,t,n)=>{const r=(e==null?void 0:e.find(o=>o.id===n))??(t==null?void 0:t.find(o=>o.id===n))??null;if(r)return r});const Tv=ue(rn,e=>e[0].id),Sv=ue(on,e=>e[0].id);Fe(Je,xp,yp,Tv,Sv,function(t,n,r,o,i){const a=t.scatter,l=new Map;return a&&a.seriesOrder.forEach(u=>{const{data:d,xAxisId:p=o,yAxisId:f=i}=a.series[u],h=new Ua(d.length),m=n[p],g=r[f];for(const y of d)h.add(m(y.x),g(y.y));h.finish(),l.set(u,h)}),l});function Fn(e){return e instanceof Date?e.getTime():e}function Jn(e,t){const{scale:n,data:r,reverse:o}=e;if(!eo(n)){const a=n.invert(t);if(r===void 0)return-1;const l=Fn(a);return r==null?void 0:r.findIndex((d,p)=>{const f=Fn(d);return f>l&&(p===0||Math.abs(l-f)<=Math.abs(l-Fn(r[p-1])))||f<=l&&(p===r.length-1||Math.abs(Fn(a)-f)<Math.abs(Fn(a)-Fn(r[p+1])))})}const i=n.bandwidth()===0?Math.floor((t-Math.min(...n.range())+n.step()/2)/n.step()):Math.floor((t-Math.min(...n.range()))/n.step());return i<0||i>=r.length?-1:o?r.length-1-i:i}function Xc(e,t,n,r){if(!eo(e)){if(r===null){const o=e.invert(n);return Number.isNaN(o)?null:o}return t[r]}return r===null||r<0||r>=t.length?null:t[r]}function Jc(e,t){const n=e.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n.matrixTransform(e.getScreenCTM().inverse())}const Ga=({store:e})=>{const t=c.useEventCallback(function(){e.update({interaction:c._extends({},e.state.interaction,{pointer:null})})}),n=c.useEventCallback(function(l){e.state.interaction.lastUpdate!==l&&e.set("interaction",c._extends({},e.state.interaction,{lastUpdate:l}))}),r=c.useEventCallback(function(l){e.set("interaction",c._extends({},e.state.interaction,{pointer:l,lastUpdate:l!==null?"pointer":e.state.interaction.lastUpdate}))}),o=c.useEventCallback(function(l){e.set("interaction",c._extends({},e.state.interaction,{pointerType:l.pointerType}))}),i=c.useEventCallback(function(){e.set("interaction",c._extends({},e.state.interaction,{pointerType:null}))});return{instance:{cleanInteraction:t,setLastUpdateSource:n,setPointerCoordinate:r,handlePointerEnter:o,handlePointerLeave:i}}};Ga.getInitialState=()=>({interaction:{item:null,pointer:null,lastUpdate:"pointer",pointerType:null}});Ga.params={};const Mi=e=>e.interaction,wv=ue(Mi,e=>e!==void 0),bp=ue(Mi,e=>(e==null?void 0:e.pointer)??null),Oi=ue(bp,e=>e&&e.x),Ii=ue(bp,e=>e&&e.y);ue(Mi,e=>e==null?void 0:e.lastUpdate);ue(Mi,e=>(e==null?void 0:e.pointerType)??null);function Ir(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i+=1)if(!Ir(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let i=0;i<o.length;i+=1)if(!t.has(o[i][0]))return!1;for(let i=0;i<o.length;i+=1){const a=o[i];if(!Ir(a[1],t.get(a[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let i=0;i<o.length;i+=1)if(!t.has(o[i][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i+=1)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),r=n.length;if(r!==Object.keys(t).length)return!1;for(let o=0;o<r;o+=1)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(let o=0;o<r;o+=1){const i=n[o];if(!Ir(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ws(e,t,n=t.axisIds[0]){return Array.isArray(n)?n.map(r=>Jn(t.axis[r],e)):Jn(t.axis[n],e)}const vp=(e,t,n)=>{if(e===null)return null;const r=Ws(e,t,n);return r===-1?null:r},Cv=ue(Oi,cn,vp),Rv=ue(Ii,un,vp),jv=ue(Oi,Ii,cn,un,(e,t,n,r)=>[...e===null?[]:n.axisIds.map(o=>({axisId:o,dataIndex:Ws(e,n,o)})),...t===null?[]:r.axisIds.map(o=>({axisId:o,dataIndex:Ws(t,r,o)}))].filter(o=>o.dataIndex!==null&&o.dataIndex>=0));function Ep(e,t,n,r=t.axisIds[0]){return Array.isArray(r)?r.map((o,i)=>{const a=t.axis[o];return Xc(a.scale,a.data,e,n[i])}):Xc(t.axis[r].scale,t.axis[r].data,e,n)}ue(Oi,cn,Cv,(e,t,n,r)=>e===null||t.axisIds.length===0?null:Ep(e,t,n,r));ue(Ii,un,Rv,(e,t,n,r)=>e===null||t.axisIds.length===0?null:Ep(e,t,n,r));const Tp=[],Mv=ca({memoizeOptions:{resultEqualityCheck:Ir}})(Oi,cn,(e,t)=>e===null?Tp:t.axisIds.filter(n=>t.axis[n].triggerTooltip).map(n=>({axisId:n,dataIndex:Jn(t.axis[n],e)})).filter(({dataIndex:n})=>n>=0)),Ov=ca({memoizeOptions:{resultEqualityCheck:Ir}})(Ii,un,(e,t)=>e===null?Tp:t.axisIds.filter(n=>t.axis[n].triggerTooltip).map(n=>({axisId:n,dataIndex:Jn(t.axis[n],e)})).filter(({dataIndex:n})=>n>=0));ue(Mv,Ov,(e,t)=>e.length>0||t.length>0);function Iv(e){return e.setPointerCoordinate!==void 0}const Pv=new Set(["bar","rangeBar","line"]),Pi=({params:e,store:t,seriesConfig:n,svgRef:r,instance:o})=>{const{xAxis:i,yAxis:a,dataset:l,onHighlightedAxisChange:u}=e;if(process.env.NODE_ENV!=="production"){const E=[...i??[],...a??[]].filter(S=>S.id).map(S=>S.id),w=new Set(E.filter((S,R)=>E.indexOf(S)!==R));w.size>0&&qn([`MUI X Charts: The following axis ids are duplicated: ${Array.from(w).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
51
|
-
`),"error")}const d=t.use(Dt),p=t.use(Je),f=t.use(wv),{axis:h,axisIds:m}=t.use(cn),{axis:g,axisIds:y}=t.use(un);Ea({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),c.useEnhancedEffect(()=>{e.highlightedAxis!==void 0&&t.set("controlledCartesianAxisHighlight",e.highlightedAxis)},[t,e.highlightedAxis]);const x=C.useRef(!0);C.useEffect(()=>{if(x.current){x.current=!1;return}t.set("cartesianAxis",{x:Ad(i,l),y:_d(a,l)})},[n,d,i,a,l,t]);const b=m[0],T=y[0];mg(t,jv,(E,w)=>{if(u&&!Object.is(E,w)){if(E.length!==w.length){u(w);return}E!=null&&E.some(({axisId:S,dataIndex:R},j)=>w[j].axisId!==S||w[j].dataIndex!==R)&&u(w)}});const v=Iv(o);return C.useEffect(()=>{const E=r.current;if(!f||!v||!E||e.disableAxisListener)return()=>{};const w=o.addInteractionListener("moveEnd",D=>{D.detail.activeGestures.pan||o.cleanInteraction()}),S=o.addInteractionListener("panEnd",D=>{D.detail.activeGestures.move||o.cleanInteraction()}),R=o.addInteractionListener("quickPressEnd",D=>{!D.detail.activeGestures.move&&!D.detail.activeGestures.pan&&o.cleanInteraction()}),j=D=>{var _;const O=D.detail.srcEvent,P=D.detail.target,N=Jc(E,O);if(D.detail.srcEvent.buttons>=1&&(P!=null&&P.hasPointerCapture(D.detail.srcEvent.pointerId))&&!(P!=null&&P.closest("[data-charts-zoom-slider]"))&&(P==null||P.releasePointerCapture(D.detail.srcEvent.pointerId)),!o.isPointInside(N.x,N.y,P)){(_=o.cleanInteraction)==null||_.call(o);return}o.setPointerCoordinate(N)},M=o.addInteractionListener("move",j),I=o.addInteractionListener("pan",j),k=o.addInteractionListener("quickPress",j);return()=>{M.cleanup(),w.cleanup(),I.cleanup(),S.cleanup(),k.cleanup(),R.cleanup()}},[r,t,h,b,g,T,o,e.disableAxisListener,f,v]),C.useEffect(()=>{const E=r.current,w=e.onAxisClick;if(E===null||!w)return()=>{};const S=o.addInteractionListener("tap",R=>{let j=null,M=!1;const I=Jc(E,R.detail.srcEvent),k=Jn(h[b],I.x);M=k!==-1,j=M?k:Jn(g[T],I.y);const D=M?m[0]:y[0];if(j==null||j===-1)return;const O=(M?h:g)[D].data[j],P={};Object.keys(p).filter(N=>Pv.has(N)).forEach(N=>{const _=p[N];_==null||_.seriesOrder.forEach(z=>{const B=_.series[z],W=B.xAxisId,K=B.yAxisId,$=M?W:K;($===void 0||$===D)&&(P[z]=B.data[j])})}),w(R.detail.srcEvent,{dataIndex:j,axisValue:O,seriesValues:P})});return()=>{S.cleanup()}},[e.onAxisClick,p,r,h,m,g,y,b,T,o]),{}};Pi.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};Pi.getDefaultizedParams=({params:e})=>c._extends({},e,{colors:e.colors??jd,theme:e.theme??"light",defaultizedXAxis:Ad(e.xAxis,e.dataset),defaultizedYAxis:_d(e.yAxis,e.dataset)});Pi.getInitialState=e=>c._extends({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});const kv=Object.is;function ti(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!kv(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}const to=e=>e.keyboardNavigation;ue(to,(e,t)=>(e==null?void 0:e.item)!=null&&ti(e.item,t));const Av=ue(to,e=>(e==null?void 0:e.item)!=null),Sp=ue(to,e=>(e==null?void 0:e.item)??null),_v=ue(to,e=>!!(e!=null&&e.enableKeyboardNavigation)),wp=e=>(t,n,r)=>{var a;if(t==null||!("dataIndex"in t)||t.dataIndex===void 0)return;const o=(a=r[t.type])==null?void 0:a.series[t.seriesId];if(!o)return;let i=e==="x"?"xAxisId"in o&&o.xAxisId:"yAxisId"in o&&o.yAxisId;return(i===void 0||i===!1)&&(i=n.axisIds[0]),{axisId:i,dataIndex:t.dataIndex}};ue(Sp,cn,Je,wp("x"));ue(Sp,un,Je,wp("y"));ue(to,function(t){if((t==null?void 0:t.item)==null)return null;const{type:n,seriesId:r}=t.item;return n===void 0||r===void 0?null:t.item});const Ha=({store:e,params:t})=>{Ea({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"tooltipItem",controlled:t.tooltipItem,defaultValue:null}),c.useEnhancedEffect(()=>{e.state.tooltip.item!==t.tooltipItem&&e.set("tooltip",c._extends({},e.state.tooltip,{item:t.tooltipItem}))},[e,t.tooltipItem]);const n=c.useEventCallback(function(i){var l;const a=e.state.tooltip.item;if(a!==null&&(!i||ti(a,i))){(l=t.onTooltipItemChange)==null||l.call(t,null),e.state.tooltip.itemIsControlled||e.set("tooltip",c._extends({},e.state.tooltip,{item:null}));return}});return{instance:{setTooltipItem:c.useEventCallback(function(i){var a;ti(e.state.tooltip.item,i)||((a=t.onTooltipItemChange)==null||a.call(t,i),e.state.tooltip.itemIsControlled||e.set("tooltip",c._extends({},e.state.tooltip,{item:i})))}),removeTooltipItem:n}}};Ha.getInitialState=e=>({tooltip:{itemIsControlled:e.tooltipItem!==void 0,item:e.tooltipItem??null}});Ha.params={tooltipItem:!0,onTooltipItemChange:!0};const En=(e,t)=>e===void 0?t:Math.PI*e/180;function Zc(e,t){return e.id!==void 0?e:c._extends({id:t},e)}function Qc(e){return e.colorMap?c._extends({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?ei(c._extends({values:e.data},e.colorMap)):Us(e.colorMap.type==="continuous"?c._extends({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function Cp(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const n={},r=[];return e.forEach((o,i)=>{const a=o.dataKey,l=o.id??`defaultized-z-axis-${i}`;if(a===void 0||o.data!==void 0){n[l]=Qc(Zc(o,l)),r.push(l);return}if(t===void 0)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");n[l]=Qc(Zc(c._extends({},o,{data:t.map(u=>u[a])}),l)),r.push(l)}),{axis:n,axisIds:r}}const qa=({params:e,store:t})=>{const{zAxis:n,dataset:r}=e,o=C.useRef(!0);return C.useEffect(()=>{if(o.current){o.current=!1;return}t.set("zAxis",Cp(n,r))},[n,r,t]),{}};qa.params={zAxis:!0,dataset:!0};qa.getInitialState=e=>({zAxis:Cp(e.zAxis,e.dataset)});const Dv=e=>e,Nv=ue(Dv,e=>e.zAxis),Ya=({store:e,params:t})=>{Ea({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),c.useEnhancedEffect(()=>{e.state.highlight.item!==t.highlightedItem&&e.set("highlight",c._extends({},e.state.highlight,{item:t.highlightedItem})),process.env.NODE_ENV!=="production"&&t.highlightedItem!==void 0&&!e.state.highlight.isControlled&&qn(["MUI X Charts: The `highlightedItem` switched between controlled and uncontrolled state.","To remove the highlight when using controlled state, you must provide `null` to the `highlightedItem` prop instead of `undefined`."].join(`
|
|
52
|
-
`))},[e,t.highlightedItem]);const n=c.useEventCallback(()=>{var i;(i=t.onHighlightChange)==null||i.call(t,null);const o=e.state.highlight;o.item===null||o.isControlled||e.set("highlight",{item:null,lastUpdate:"pointer",isControlled:!1})}),r=c.useEventCallback(o=>{var a;const i=e.state.highlight;ti(i.item,o)||((a=t.onHighlightChange)==null||a.call(t,o),!i.isControlled&&e.set("highlight",{item:o,lastUpdate:"pointer",isControlled:!1}))});return{instance:{clearHighlight:n,setHighlight:r}}};Ya.getInitialState=e=>({highlight:{item:e.highlightedItem,lastUpdate:"pointer",isControlled:e.highlightedItem!==void 0}});Ya.params={highlightedItem:!0,onHighlightChange:!0};function Ur(e){let t=1/0,n=-1/0;for(const r of e??[])r<t&&(t=r),r>n&&(n=r);return[t,n]}const eu=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},Rp=e=>{var a;const{axis:t,getFilters:n,isDefaultAxis:r}=e,o=n==null?void 0:n({currentAxisId:t.id,isDefaultAxis:r}),i=o?(a=t.data)==null?void 0:a.filter((l,u)=>o({x:null,y:null},u)):t.data;return Ur(i??[])},jp=e=>t=>{const{series:n,axis:r,getFilters:o,isDefaultAxis:i}=t;return Object.keys(n).filter(a=>{const l=e==="x"?n[a].xAxisId:n[a].yAxisId;return l===r.id||i&&l===void 0}).reduce((a,l)=>{const{stackedData:u}=n[l],d=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:i,seriesXAxisId:n[l].xAxisId,seriesYAxisId:n[l].yAxisId}),[p,f]=(u==null?void 0:u.reduce((h,m,g)=>d&&(!d(eu(m[0],e),g)||!d(eu(m[1],e),g))?h:[Math.min(...m,h[0]),Math.max(...m,h[1])],[1/0,-1/0]))??[1/0,-1/0];return[Math.min(p,a[0]),Math.max(f,a[1])]},[1/0,-1/0])},$v=e=>Object.keys(e.series).some(n=>e.series[n].layout==="horizontal")?jp("x")(e):Rp(e),zv=e=>Object.keys(e.series).some(n=>e.series[n].layout==="horizontal")?Rp(e):jp("y")(e);function Le(e){return function(){return e}}const tu=Math.abs,Ke=Math.atan2,fn=Math.cos,Lv=Math.max,xs=Math.min,Ct=Math.sin,Wn=Math.sqrt,Qe=1e-12,Vr=Math.PI,ni=Vr/2,$o=2*Vr;function Fv(e){return e>1?0:e<-1?Vr:Math.acos(e)}function nu(e){return e>=1?ni:e<=-1?-ni:Math.asin(e)}const Gs=Math.PI,Hs=2*Gs,xn=1e-6,Bv=Hs-xn;function Mp(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Uv(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Mp;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;o<i;++o)this._+=Math.round(arguments[o]*n)/n+r[o]}}class Vv{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Mp:Uv(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,o){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+o}`}bezierCurveTo(t,n,r,o,i,a){this._append`C${+t},${+n},${+r},${+o},${this._x1=+i},${this._y1=+a}`}arcTo(t,n,r,o,i){if(t=+t,n=+n,r=+r,o=+o,i=+i,i<0)throw new Error(`negative radius: ${i}`);let a=this._x1,l=this._y1,u=r-t,d=o-n,p=a-t,f=l-n,h=p*p+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>xn)if(!(Math.abs(f*u-d*p)>xn)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,g=o-l,y=u*u+d*d,x=m*m+g*g,b=Math.sqrt(y),T=Math.sqrt(h),v=i*Math.tan((Gs-Math.acos((y+h-x)/(2*b*T)))/2),E=v/T,w=v/b;Math.abs(E-1)>xn&&this._append`L${t+E*p},${n+E*f}`,this._append`A${i},${i},0,0,${+(f*m>p*g)},${this._x1=t+w*u},${this._y1=n+w*d}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(o),u=r*Math.sin(o),d=t+l,p=n+u,f=1^a,h=a?o-i:i-o;this._x1===null?this._append`M${d},${p}`:(Math.abs(this._x1-d)>xn||Math.abs(this._y1-p)>xn)&&this._append`L${d},${p}`,r&&(h<0&&(h=h%Hs+Hs),h>Bv?this._append`A${r},${r},0,1,${f},${t-l},${n-u}A${r},${r},0,1,${f},${this._x1=d},${this._y1=p}`:h>xn&&this._append`A${r},${r},0,${+(h>=Gs)},${f},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function Wv(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Vv(t)}function Gv(e){return e.innerRadius}function Hv(e){return e.outerRadius}function qv(e){return e.startAngle}function Yv(e){return e.endAngle}function Kv(e){return e&&e.padAngle}function Xv(e,t,n,r,o,i,a,l){var u=n-e,d=r-t,p=a-o,f=l-i,h=f*u-p*d;if(!(h*h<Qe))return h=(p*(t-i)-f*(e-o))/h,[e+h*u,t+h*d]}function yo(e,t,n,r,o,i,a){var l=e-n,u=t-r,d=(a?i:-i)/Wn(l*l+u*u),p=d*u,f=-d*l,h=e+p,m=t+f,g=n+p,y=r+f,x=(h+g)/2,b=(m+y)/2,T=g-h,v=y-m,E=T*T+v*v,w=o-i,S=h*y-g*m,R=(v<0?-1:1)*Wn(Lv(0,w*w*E-S*S)),j=(S*v-T*R)/E,M=(-S*T-v*R)/E,I=(S*v+T*R)/E,k=(-S*T+v*R)/E,D=j-x,O=M-b,P=I-x,N=k-b;return D*D+O*O>P*P+N*N&&(j=I,M=k),{cx:j,cy:M,x01:-p,y01:-f,x11:j*(o/w-1),y11:M*(o/w-1)}}function Op(){var e=Gv,t=Hv,n=Le(0),r=null,o=qv,i=Yv,a=Kv,l=null,u=Wv(d);function d(){var p,f,h=+e.apply(this,arguments),m=+t.apply(this,arguments),g=o.apply(this,arguments)-ni,y=i.apply(this,arguments)-ni,x=tu(y-g),b=y>g;if(l||(l=p=u()),m<h&&(f=m,m=h,h=f),!(m>Qe))l.moveTo(0,0);else if(x>$o-Qe)l.moveTo(m*fn(g),m*Ct(g)),l.arc(0,0,m,g,y,!b),h>Qe&&(l.moveTo(h*fn(y),h*Ct(y)),l.arc(0,0,h,y,g,b));else{var T=g,v=y,E=g,w=y,S=x,R=x,j=a.apply(this,arguments)/2,M=j>Qe&&(r?+r.apply(this,arguments):Wn(h*h+m*m)),I=xs(tu(m-h)/2,+n.apply(this,arguments)),k=I,D=I,O,P;if(M>Qe){var N=nu(M/h*Ct(j)),_=nu(M/m*Ct(j));(S-=N*2)>Qe?(N*=b?1:-1,E+=N,w-=N):(S=0,E=w=(g+y)/2),(R-=_*2)>Qe?(_*=b?1:-1,T+=_,v-=_):(R=0,T=v=(g+y)/2)}var z=m*fn(T),B=m*Ct(T),W=h*fn(w),K=h*Ct(w);if(I>Qe){var $=m*fn(v),ne=m*Ct(v),le=h*fn(E),xe=h*Ct(E),de;if(x<Vr)if(de=Xv(z,B,le,xe,$,ne,W,K)){var pe=z-de[0],fe=B-de[1],he=$-de[0],U=ne-de[1],V=1/Ct(Fv((pe*he+fe*U)/(Wn(pe*pe+fe*fe)*Wn(he*he+U*U)))/2),G=Wn(de[0]*de[0]+de[1]*de[1]);k=xs(I,(h-G)/(V-1)),D=xs(I,(m-G)/(V+1))}else k=D=0}R>Qe?D>Qe?(O=yo(le,xe,z,B,m,D,b),P=yo($,ne,W,K,m,D,b),l.moveTo(O.cx+O.x01,O.cy+O.y01),D<I?l.arc(O.cx,O.cy,D,Ke(O.y01,O.x01),Ke(P.y01,P.x01),!b):(l.arc(O.cx,O.cy,D,Ke(O.y01,O.x01),Ke(O.y11,O.x11),!b),l.arc(0,0,m,Ke(O.cy+O.y11,O.cx+O.x11),Ke(P.cy+P.y11,P.cx+P.x11),!b),l.arc(P.cx,P.cy,D,Ke(P.y11,P.x11),Ke(P.y01,P.x01),!b))):(l.moveTo(z,B),l.arc(0,0,m,T,v,!b)):l.moveTo(z,B),!(h>Qe)||!(S>Qe)?l.lineTo(W,K):k>Qe?(O=yo(W,K,$,ne,h,-k,b),P=yo(z,B,le,xe,h,-k,b),l.lineTo(O.cx+O.x01,O.cy+O.y01),k<I?l.arc(O.cx,O.cy,k,Ke(O.y01,O.x01),Ke(P.y01,P.x01),!b):(l.arc(O.cx,O.cy,k,Ke(O.y01,O.x01),Ke(O.y11,O.x11),!b),l.arc(0,0,h,Ke(O.cy+O.y11,O.cx+O.x11),Ke(P.cy+P.y11,P.cx+P.x11),b),l.arc(P.cx,P.cy,k,Ke(P.y11,P.x11),Ke(P.y01,P.x01),!b))):l.arc(0,0,h,w,E,b)}if(l.closePath(),p)return l=null,p+""||null}return d.centroid=function(){var p=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+o.apply(this,arguments)+ +i.apply(this,arguments))/2-Vr/2;return[fn(f)*p,Ct(f)*p]},d.innerRadius=function(p){return arguments.length?(e=typeof p=="function"?p:Le(+p),d):e},d.outerRadius=function(p){return arguments.length?(t=typeof p=="function"?p:Le(+p),d):t},d.cornerRadius=function(p){return arguments.length?(n=typeof p=="function"?p:Le(+p),d):n},d.padRadius=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:Le(+p),d):r},d.startAngle=function(p){return arguments.length?(o=typeof p=="function"?p:Le(+p),d):o},d.endAngle=function(p){return arguments.length?(i=typeof p=="function"?p:Le(+p),d):i},d.padAngle=function(p){return arguments.length?(a=typeof p=="function"?p:Le(+p),d):a},d.context=function(p){return arguments.length?(l=p??null,d):l},d}function Ip(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Jv(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Zv(e){return e}function Qv(){var e=Zv,t=Jv,n=null,r=Le(0),o=Le($o),i=Le(0);function a(l){var u,d=(l=Ip(l)).length,p,f,h=0,m=new Array(d),g=new Array(d),y=+r.apply(this,arguments),x=Math.min($o,Math.max(-$o,o.apply(this,arguments)-y)),b,T=Math.min(Math.abs(x)/d,i.apply(this,arguments)),v=T*(x<0?-1:1),E;for(u=0;u<d;++u)(E=g[m[u]=u]=+e(l[u],u,l))>0&&(h+=E);for(t!=null?m.sort(function(w,S){return t(g[w],g[S])}):n!=null&&m.sort(function(w,S){return n(l[w],l[S])}),u=0,f=h?(x-d*v)/h:0;u<d;++u,y=b)p=m[u],E=g[p],b=y+(E>0?E*f:0)+v,g[p]={data:l[p],index:u,value:E,startAngle:y,endAngle:b,padAngle:T};return g}return a.value=function(l){return arguments.length?(e=typeof l=="function"?l:Le(+l),a):e},a.sortValues=function(l){return arguments.length?(t=l,n=null,a):t},a.sort=function(l){return arguments.length?(n=l,t=null,a):n},a.startAngle=function(l){return arguments.length?(r=typeof l=="function"?l:Le(+l),a):r},a.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:Le(+l),a):o},a.padAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Le(+l),a):i},a}function Zn(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,l=i.length;n<a;++n)for(o=i,i=e[t[n]],r=0;r<l;++r)i[r][1]+=i[r][0]=isNaN(o[r][1])?o[r][0]:o[r][1]}function Qn(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function e0(e,t){return e[t]}function t0(e){const t=[];return t.key=e,t}function ri(){var e=Le([]),t=Qn,n=Zn,r=e0;function o(i){var a=Array.from(e.apply(this,arguments),t0),l,u=a.length,d=-1,p;for(const f of i)for(l=0,++d;l<u;++l)(a[l][d]=[0,+r(f,a[l].key,d,i)]).data=f;for(l=0,p=Ip(t(a));l<u;++l)a[p[l]].index=l;return n(a,p),a}return o.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Le(Array.from(i)),o):e},o.value=function(i){return arguments.length?(r=typeof i=="function"?i:Le(+i),o):r},o.order=function(i){return arguments.length?(t=i==null?Qn:typeof i=="function"?i:Le(Array.from(i)),o):t},o.offset=function(i){return arguments.length?(n=i??Zn,o):n},o}function n0(e,t){if((r=e.length)>0){for(var n,r,o=0,i=e[0].length,a;o<i;++o){for(a=n=0;n<r;++n)a+=e[n][o][1]||0;if(a)for(n=0;n<r;++n)e[n][o][1]/=a}Zn(e,t)}}function r0(e,t){if((o=e.length)>0){for(var n=0,r=e[t[0]],o,i=r.length;n<i;++n){for(var a=0,l=0;a<o;++a)l+=e[a][n][1]||0;r[n][1]+=r[n][0]=-l/2}Zn(e,t)}}function o0(e,t){if(!(!((a=e.length)>0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r<i;++r){for(var l=0,u=0,d=0;l<a;++l){for(var p=e[t[l]],f=p[r][1]||0,h=p[r-1][1]||0,m=(f-h)/2,g=0;g<l;++g){var y=e[t[g]],x=y[r][1]||0,b=y[r-1][1]||0;m+=x-b}u+=f,d+=m*f}o[r-1][1]+=o[r-1][0]=n,u&&(n-=d/u)}o[r-1][1]+=o[r-1][0]=n,Zn(e,t)}}function Pp(e){var t=e.map(i0);return Qn(e).sort(function(n,r){return t[n]-t[r]})}function i0(e){for(var t=-1,n=0,r=e.length,o,i=-1/0;++t<r;)(o=+e[t][1])>i&&(i=o,n=t);return n}function kp(e){var t=e.map(Ap);return Qn(e).sort(function(n,r){return t[n]-t[r]})}function Ap(e){for(var t=0,n=-1,r=e.length,o;++n<r;)(o=+e[n][1])&&(t+=o);return t}function s0(e){return kp(e).reverse()}function a0(e){var t=e.length,n,r,o=e.map(Ap),i=Pp(e),a=0,l=0,u=[],d=[];for(n=0;n<t;++n)r=i[n],a<l?(a+=o[r],u.push(r)):(l+=o[r],d.push(r));return d.reverse().concat(u)}function l0(e){return Qn(e).reverse()}function c0(e,t){if(e.length===0)return;const n=e.length,r=t,o=e[r[0]].length;for(let i=0;i<o;i+=1){let a=0,l=0;for(let u=0;u<n;u+=1){const d=e[r[u]],p=d[i],f=p[1]-p[0];f>0?(p[0]=a,a+=f,p[1]=a):f<0?(p[1]=l,l+=f,p[0]=l):p.data[d.key]>0?(p[0]=a,p[1]=a):p.data[d.key]<0?(p[1]=l,p[0]=l):(p[0]=0,p[1]=0)}}}const ys={appearance:Pp,ascending:kp,descending:s0,insideOut:a0,none:Qn,reverse:l0},bs={expand:n0,diverging:c0,none:Zn,silhouette:r0,wiggle:o0},_p=e=>{const{series:t,seriesOrder:n,defaultStrategy:r}=e,o=[],i={};return n.forEach(a=>{const{stack:l,stackOrder:u,stackOffset:d}=t[a];l===void 0?o.push({ids:[a],stackingOrder:ys.none,stackingOffset:bs.none}):i[l]===void 0?(i[l]=o.length,o.push({ids:[a],stackingOrder:ys[u??(r==null?void 0:r.stackOrder)??"none"],stackingOffset:bs[d??(r==null?void 0:r.stackOffset)??"diverging"]})):(o[i[l]].ids.push(a),u!==void 0&&(o[i[l]].stackingOrder=ys[u]),d!==void 0&&(o[i[l]].stackingOffset=bs[d]))}),o},u0=e=>e==null?"":e.toLocaleString(),d0=(e,t,n)=>{const{seriesOrder:r,series:o}=e,i=_p(e),a=t??[];r.forEach(u=>{const d=o[u].data;if(d!==void 0)d.forEach((p,f)=>{a.length<=f?a.push({[u]:p}):a[f][u]=p});else if(t===void 0)throw new Error([`MUI X Charts: bar series with id='${u}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
53
|
-
`));if(process.env.NODE_ENV!=="production"&&!d&&t){const p=o[u].dataKey;if(!p)throw new Error([`MUI X Charts: bar series with id='${u}' has no data and no dataKey.`,"You must provide a dataKey when using the dataset prop."].join(`
|
|
54
|
-
`));t.forEach((f,h)=>{const m=f[p];m!=null&&typeof m!="number"&&qn([`MUI X Charts: your dataset key "${p}" is used for plotting bars, but the dataset contains the non-null non-numerical element "${m}" at index ${h}.`,"Bar plots only support numeric and null values."].join(`
|
|
55
|
-
`))})}});const l={};return i.forEach(u=>{const{ids:d,stackingOffset:p,stackingOrder:f}=u,h=d.map(b=>{const T=o[b].dataKey;return o[b].data===void 0&&T!==void 0?T:b}),m=ri().keys(h).value((b,T)=>b[T]??0).order(f).offset(p)(a),g=m.map(b=>b.index),y=()=>g,x=ri().keys(h).value((b,T)=>{const v=h.indexOf(T),E=d[v];return n!=null&&n({type:"bar",seriesId:E})?b[T]??0:0}).order(y).offset(p)(a);d.forEach((b,T)=>{const v=o[b].dataKey,E=v?t.map(S=>{const R=S[v];return typeof R=="number"?R:null}):o[b].data,w=!(n!=null&&n({type:"bar",seriesId:b}));l[b]=c._extends({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:o[b].valueFormatter??u0},o[b],{data:E,hidden:w,stackedData:m[T],visibleStackedData:x[T]})})}),{seriesOrder:r,stackingGroups:i,series:l}};function Yt(e,t){return typeof e=="function"?e(t):e}const p0=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,o)=>{const i=Yt(n[o].label,"legend");return i===void 0||r.push({type:"bar",markType:n[o].labelMarkType,id:o,seriesId:o,color:n[o].color,label:i}),r},[])};function Ka(e){return e.colorGetter?e.colorGetter:()=>e.color}const f0=(e,t,n)=>{const r=e.layout==="vertical",o=r?t==null?void 0:t.colorScale:n==null?void 0:n.colorScale,i=r?n==null?void 0:n.colorScale:t==null?void 0:t.colorScale,a=r?t==null?void 0:t.data:n==null?void 0:n.data,l=Ka(e);return i?u=>{if(u===void 0)return e.color;const d=e.data[u],p=d===null?l({value:d,dataIndex:u}):i(d);return p===null?l({value:d,dataIndex:u}):p}:o&&a?u=>{if(u===void 0)return e.color;const d=a[u],p=d===null?l({value:d,dataIndex:u}):o(d);return p===null?l({value:d,dataIndex:u}):p}:u=>{if(u===void 0)return e.color;const d=e.data[u];return l({value:d,dataIndex:u})}};function Dp(e,t){return Object.keys(e).filter(n=>t.has(n)).flatMap(n=>{const r=e[n];return r.seriesOrder.filter(o=>r.series[o].data.length>0&&r.series[o].data.some(i=>i!=null)).map(o=>({type:n,seriesId:o}))})}function Np(e,t,n,r){const o=Dp(e,t);if(o.length===0)return null;const i=n!==void 0&&r!==void 0?o.findIndex(a=>a.type===n&&a.seriesId===r):-1;return i<=0?o[o.length-1]:o[(i-1+o.length)%o.length]}function $p(e,t){return Object.keys(e).filter(n=>t.has(n)).flatMap(n=>{const r=e[n];return r.seriesOrder.filter(o=>r.series[o].data.length>0&&r.series[o].data.some(i=>i!=null)).map(o=>r.series[o].data.length)}).reduce((n,r)=>Math.max(n,r),0)}function zp(e,t,n,r){const o=Dp(e,t);if(o.length===0)return null;const i=n!==void 0&&r!==void 0?o.findIndex(a=>a.type===n&&a.seriesId===r):-1;return o[(i+1)%o.length]}function Lp(e,t,n){var o,i;if(t==="sankey")return!1;const r=(i=(o=e[t])==null?void 0:o.series[n])==null?void 0:i.data;return r!=null&&r.length>0}function ki(e,t=!1){return function(r,o){const i=Je(o);let a=r==null?void 0:r.seriesId,l=r==null?void 0:r.type;if(!l||a==null||!Lp(i,l,a)){const p=zp(i,e,l,a);if(p===null)return null;l=p.type,a=p.seriesId}const u=$p(i,e);let d=(r==null?void 0:r.dataIndex)==null?0:r.dataIndex+1;return t?d=d%u:d=Math.min(u-1,d),{type:l,seriesId:a,dataIndex:d}}}function Ai(e,t=!1){return function(r,o){const i=Je(o);let a=r==null?void 0:r.seriesId,l=r==null?void 0:r.type;if(!l||a==null||!Lp(i,l,a)){const p=Np(i,e,l,a);if(p===null)return null;l=p.type,a=p.seriesId}const u=$p(i,e);let d=(r==null?void 0:r.dataIndex)==null?u-1:r.dataIndex-1;return t?d=(u+d)%u:d=Math.max(0,d),{type:l,seriesId:a,dataIndex:d}}}function _i(e){return function(n,r){const o=Je(r);let i=n==null?void 0:n.seriesId,a=n==null?void 0:n.type;const l=zp(o,e,a,i);if(l===null)return null;a=l.type,i=l.seriesId;const u=(n==null?void 0:n.dataIndex)==null?0:n.dataIndex;return{type:a,seriesId:i,dataIndex:u}}}function Di(e){return function(n,r){const o=Je(r);let i=n==null?void 0:n.seriesId,a=n==null?void 0:n.type;const l=Np(o,e,a,i);if(l===null)return null;a=l.type,i=l.seriesId;const u=o[a].series[i].data,d=(n==null?void 0:n.dataIndex)==null?u.length-1:n.dataIndex;return{type:a,seriesId:i,dataIndex:d}}}const bo=new Set(["bar","line","scatter"]),h0=e=>{switch(e.key){case"ArrowRight":return ki(bo);case"ArrowLeft":return Ai(bo);case"ArrowDown":return Di(bo);case"ArrowUp":return _i(bo);default:return null}},m0=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const o=Yt(t.label,"tooltip"),i=t.data[r.dataIndex];if(i==null)return null;const a=t.valueFormatter(i,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:o,value:i,formattedValue:a,markType:t.labelMarkType}},g0=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId});function x0(e,t,n){if(n===0)return{barWidth:e/t,offset:0};const r=e/(t+(t-1)*n),o=n*r;return{barWidth:r,offset:o}}function y0(e,t,n){const r=e&&t>0,o=!e&&t<0,i=r||o;return n?!i:i}function b0(e){const{verticalLayout:t,xAxisConfig:n,yAxisConfig:r,series:o,dataIndex:i,numberOfGroups:a,groupIndex:l}=e,u=t?n:r,d=(t?r.reverse:n.reverse)??!1,{barWidth:p,offset:f}=x0(u.scale.bandwidth(),a,u.barGapRatio),h=l*(p+f),m=n.scale,g=r.scale,y=u.data[i],x=o.data[i];if(x==null)return null;const T=o.visibleStackedData[i].map(j=>t?g(j):m(j)),[v,E]=Ur(T).map(j=>Math.round(j));let w=0;x!==0&&(o.hidden||(w=Math.max(o.minBarSize,E-v)));const S=y0(t,x,d);let R=0;return S?R=E-w:R=v,{x:t?m(y)+h:R,y:t?R:g(y)+h,height:t?w:p,width:t?p:w}}const v0=e=>{var f;const{series:t,identifier:n,axesConfig:r,placement:o}=e;if(!n||n.dataIndex===void 0)return null;const i=(f=t.bar)==null?void 0:f.series[n.seriesId];if(t.bar==null||i==null||r.x===void 0||r.y===void 0)return null;const a=b0({verticalLayout:i.layout==="vertical",xAxisConfig:r.x,yAxisConfig:r.y,series:i,dataIndex:n.dataIndex,numberOfGroups:t.bar.stackingGroups.length,groupIndex:t.bar.stackingGroups.findIndex(h=>h.ids.includes(i.id))});if(a==null)return null;const{x:l,y:u,width:d,height:p}=a;switch(o){case"right":return{x:l+d,y:u+p/2};case"bottom":return{x:l+d/2,y:u+p};case"left":return{x:l,y:u+p/2};case"top":default:return{x:l+d/2,y:u}}};function E0(e,t,n){return c._extends({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]})}const T0=e=>`Type(${e})`,S0=e=>`Series(${e})`,w0=e=>e===void 0?"":`Index(${e})`,Ni=e=>`${T0(e.type)}${S0(e.seriesId)}${w0(e.dataIndex)}`,C0={seriesProcessor:d0,colorProcessor:f0,legendGetter:p0,tooltipGetter:m0,tooltipItemPositionGetter:v0,axisTooltipGetter:g0,xExtremumGetter:$v,yExtremumGetter:zv,getSeriesWithDefaultValues:E0,keyboardFocusHandler:h0,identifierSerializer:Ni},R0=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:o}=e;let i=1/0,a=-1/0;for(const l in t){if(!Object.hasOwn(t,l))continue;const u=t[l].xAxisId;if(!(u===n.id||u===void 0&&r))continue;const d=o==null?void 0:o({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[l].xAxisId,seriesYAxisId:t[l].yAxisId}),p=t[l].data??[];for(let f=0;f<p.length;f+=1){const h=p[f];d&&!d(h,f)||h.x!==null&&(h.x<i&&(i=h.x),h.x>a&&(a=h.x))}}return[i,a]},j0=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:o}=e;let i=1/0,a=-1/0;for(const l in t){if(!Object.hasOwn(t,l))continue;const u=t[l].yAxisId;if(!(u===n.id||u===void 0&&r))continue;const d=o==null?void 0:o({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[l].xAxisId,seriesYAxisId:t[l].yAxisId}),p=t[l].data??[];for(let f=0;f<p.length;f+=1){const h=p[f];d&&!d(h,f)||h.y!==null&&(h.y<i&&(i=h.y),h.y>a&&(a=h.y))}}return[i,a]},M0=({series:e,seriesOrder:t},n,r)=>({series:Object.fromEntries(Object.entries(e).map(([i,a])=>{const l=a==null?void 0:a.datasetKeys,u=["x","y"].filter(p=>typeof(l==null?void 0:l[p])!="string");if(a!=null&&a.datasetKeys&&u.length>0)throw new Error([`MUI X Charts: scatter series with id='${i}' has incomplete datasetKeys.`,`Properties ${u.map(p=>`"${p}"`).join(", ")} are missing.`].join(`
|
|
56
|
-
`));const d=l?(n==null?void 0:n.map(p=>({x:p[l.x]??null,y:p[l.y]??null,z:l.z&&p[l.z],id:l.id&&p[l.id]})))??[]:a.data??[];return[i,c._extends({labelMarkType:"circle",markerSize:4},a,{preview:c._extends({markerSize:1},a==null?void 0:a.preview),data:d,hidden:!(r!=null&&r({type:"scatter",seriesId:i})),valueFormatter:a.valueFormatter??(p=>p&&`(${p.x}, ${p.y})`)})]})),seriesOrder:t}),O0=(e,t,n,r)=>{const o=r==null?void 0:r.colorScale,i=n==null?void 0:n.colorScale,a=t==null?void 0:t.colorScale,l=Ka(e);return o?u=>{var f,h;if(u===void 0)return e.color;if(((f=r==null?void 0:r.data)==null?void 0:f[u])!==void 0){const m=o((h=r==null?void 0:r.data)==null?void 0:h[u]);if(m!==null)return m}const d=e.data[u],p=d===null?l({value:d,dataIndex:u}):o(d.z);return p===null?l({value:d,dataIndex:u}):p}:i?u=>{if(u===void 0)return e.color;const d=e.data[u],p=d===null?l({value:d,dataIndex:u}):i(d.y);return p===null?l({value:d,dataIndex:u}):p}:a?u=>{if(u===void 0)return e.color;const d=e.data[u],p=d===null?l({value:d,dataIndex:u}):a(d.x);return p===null?l({value:d,dataIndex:u}):p}:u=>{if(u===void 0)return e.color;const d=e.data[u];return l({value:d,dataIndex:u})}},I0=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,o)=>{const i=Yt(n[o].label,"legend");return i===void 0||r.push({type:"scatter",markType:n[o].labelMarkType,id:o,seriesId:o,color:n[o].color,label:i}),r},[])},P0=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const o=Yt(t.label,"tooltip"),i=t.data[r.dataIndex],a=t.valueFormatter(i,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:o,value:i,formattedValue:a,markType:t.labelMarkType}},k0=(e,t,n)=>c._extends({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]}),A0=e=>{var l,u,d;const{series:t,identifier:n,axesConfig:r}=e;if(!n||n.dataIndex===void 0)return null;const o=(l=t.scatter)==null?void 0:l.series[n.seriesId];if(o==null||r.x===void 0||r.y===void 0)return null;const i=(u=o.data)==null?void 0:u[n.dataIndex].x,a=(d=o.data)==null?void 0:d[n.dataIndex].y;return i==null||a==null?null:{x:r.x.scale(i),y:r.y.scale(a)}},vo=new Set(["bar","line","scatter"]),_0=e=>{switch(e.key){case"ArrowRight":return ki(vo);case"ArrowLeft":return Ai(vo);case"ArrowDown":return Di(vo);case"ArrowUp":return _i(vo);default:return null}},D0={seriesProcessor:M0,colorProcessor:O0,legendGetter:I0,tooltipGetter:P0,tooltipItemPositionGetter:A0,xExtremumGetter:R0,yExtremumGetter:j0,getSeriesWithDefaultValues:k0,keyboardFocusHandler:_0,identifierSerializer:Ni},N0=e=>{const{axis:t}=e;return Ur(t.data??[])};function $0(e,t,n,r){return n.reduce((o,i,a)=>{if(t[a]===null)return o;const[l,u]=e(i);return r&&(!r({y:l,x:null},a)||!r({y:u,x:null},a))?o:[Math.min(l,u,o[0]),Math.max(l,u,o[1])]},[1/0,-1/0])}const z0=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:o}=e;return Object.keys(t).filter(i=>{const a=t[i].yAxisId;return a===n.id||r&&a===void 0}).reduce((i,a)=>{const{area:l,stackedData:u,data:d}=t[a],p=l!==void 0,f=o==null?void 0:o({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[a].xAxisId,seriesYAxisId:t[a].yAxisId}),h=p&&n.scaleType!=="log"&&typeof t[a].baseline!="string"?x=>x:x=>[x[1],x[1]],m=$0(h,d,u,f),[g,y]=m;return[Math.min(g,i[0]),Math.max(y,i[1])]},[1/0,-1/0])},L0=e=>e==null?"":e.toLocaleString(),F0=(e,t,n)=>{const{seriesOrder:r,series:o}=e,i=_p(c._extends({},e,{defaultStrategy:{stackOffset:"none"}})),a=t??[];r.forEach(u=>{const d=o[u].data;if(d!==void 0)d.forEach((p,f)=>{a.length<=f?a.push({[u]:p}):a[f][u]=p});else if(t===void 0&&process.env.NODE_ENV!=="production")throw new Error([`MUI X Charts: line series with id='${u}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
57
|
-
`));if(process.env.NODE_ENV!=="production"&&!d&&t){const p=o[u].dataKey;if(!p)throw new Error([`MUI X Charts: line series with id='${u}' has no data and no dataKey.`,"You must provide a dataKey when using the dataset prop."].join(`
|
|
58
|
-
`));t.forEach((f,h)=>{const m=f[p];m!=null&&typeof m!="number"&&qn([`MUI X Charts: your dataset key "${p}" is used for plotting lines, but the dataset contains the non-null non-numerical element "${m}" at index ${h}.`,"Line plots only support numeric and null values."].join(`
|
|
59
|
-
`))})}});const l={};return i.forEach(u=>{const{ids:d,stackingOffset:p,stackingOrder:f}=u,h=d.map(b=>{const T=o[b].dataKey;return o[b].data===void 0&&T!==void 0?T:b}),m=ri().keys(h).value((b,T)=>b[T]??0).order(f).offset(p)(a),g=m.map(b=>b.index),y=()=>g,x=ri().keys(h).value((b,T)=>{const v=h.indexOf(T),E=d[v];return n!=null&&n({type:"line",seriesId:E})?b[T]??0:0}).order(y).offset(p)(a);d.forEach((b,T)=>{const v=o[b].dataKey,E=v?t.map(S=>{const R=S[v];return typeof R=="number"?R:null}):o[b].data,w=!(n!=null&&n({type:"line",seriesId:b}));l[b]=c._extends({labelMarkType:"line"},o[b],{data:E,valueFormatter:o[b].valueFormatter??L0,hidden:w,stackedData:m[T],visibleStackedData:x[T]})})}),{seriesOrder:r,stackingGroups:i,series:l}},B0=(e,t,n)=>{const r=n==null?void 0:n.colorScale,o=t==null?void 0:t.colorScale,i=Ka(e);return r?a=>{if(a===void 0)return e.color;const l=e.data[a],u=l===null?i({value:l,dataIndex:a}):r(l);return u===null?i({value:l,dataIndex:a}):u}:o?a=>{var d;if(a===void 0)return e.color;const l=(d=t.data)==null?void 0:d[a],u=l===null?i({value:l,dataIndex:a}):o(l);return u===null?i({value:l,dataIndex:a}):u}:a=>{if(a===void 0)return e.color;const l=e.data[a];return i({value:l,dataIndex:a})}},U0=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,o)=>{const i=Yt(n[o].label,"legend");return i===void 0||r.push({type:"line",markType:n[o].labelMarkType,id:o,seriesId:o,color:n[o].color,label:i}),r},[])},V0=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const o=Yt(t.label,"tooltip"),i=t.data[r.dataIndex],a=t.valueFormatter(i,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:o,value:i,formattedValue:a,markType:t.labelMarkType}},W0=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),G0=(e,t,n)=>c._extends({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]}),H0=e=>{var l,u;const{series:t,identifier:n,axesConfig:r}=e;if(!n||n.dataIndex===void 0)return null;const o=(l=t.line)==null?void 0:l.series[n.seriesId];if(o==null||r.x===void 0||r.y===void 0)return null;const i=(u=r.x.data)==null?void 0:u[n.dataIndex],a=o.data[n.dataIndex]==null?null:o.visibleStackedData[n.dataIndex][1];return i==null||a==null?null:{x:r.x.scale(i),y:r.y.scale(a)}},Eo=new Set(["bar","line","scatter"]),q0=e=>{switch(e.key){case"ArrowRight":return ki(Eo);case"ArrowLeft":return Ai(Eo);case"ArrowDown":return Di(Eo);case"ArrowUp":return _i(Eo);default:return null}},Y0={colorProcessor:B0,seriesProcessor:F0,legendGetter:U0,tooltipGetter:V0,tooltipItemPositionGetter:H0,axisTooltipGetter:W0,xExtremumGetter:N0,yExtremumGetter:z0,getSeriesWithDefaultValues:G0,keyboardFocusHandler:q0,identifierSerializer:Ni},K0=(e="none")=>{if(typeof e=="function")return e;switch(e){case"none":return null;case"desc":return(t,n)=>n-t;case"asc":return(t,n)=>t-n;default:return null}},X0=(e,t,n)=>{const{seriesOrder:r,series:o}=e,i={};return r.forEach(a=>{const l=o[a].data.filter((p,f)=>n==null?void 0:n({type:"pie",seriesId:a,dataIndex:f})),u=Qv().startAngle(En(o[a].startAngle??0)).endAngle(En(o[a].endAngle??360)).padAngle(En(o[a].paddingAngle??0)).sortValues(K0(o[a].sortingValues??"none"))(l.map(p=>p.value));let d=0;i[a]=c._extends({labelMarkType:"circle",valueFormatter:p=>p.value.toLocaleString()},o[a],{data:o[a].data.map((p,f)=>{var x,b;const h=p.id??`auto-generated-pie-id-${a}-${f}`,m=!(n!=null&&n({type:"pie",seriesId:a,dataIndex:f}));let g;if(m){const T=d>0?u[d-1].endAngle:En(o[a].startAngle??0);g={startAngle:T,endAngle:T,padAngle:0,value:p.value,index:f}}else g=u[d],d+=1;const y=c._extends({},p,{id:h,hidden:m},g);return c._extends({labelMarkType:"circle"},y,{formattedValue:((b=(x=o[a]).valueFormatter)==null?void 0:b.call(x,c._extends({},y,{label:Yt(y.label,"arc")}),{dataIndex:f}))??y.value.toLocaleString()})})})}),{seriesOrder:r,series:i}},J0=e=>t=>e.data[t].color,Z0=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,o)=>(n[o].data.forEach((i,a)=>{const l=Yt(i.label,"legend");if(l===void 0)return;const u=i.id??a;r.push({type:"pie",markType:i.labelMarkType??n[o].labelMarkType,seriesId:o,id:u,itemId:u,dataIndex:a,color:i.color,label:l})}),r),[])},Q0=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const o=t.data[r.dataIndex];if(o==null)return null;const i=Yt(o.label,"tooltip"),a=c._extends({},o,{label:i}),l=t.valueFormatter(a,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:a,formattedValue:l,markType:o.labelMarkType??t.labelMarkType}};function Mt(e,t){if(typeof e=="number")return e;if(e==="100%")return t;if(e.endsWith("%")){const n=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(n))return n*t/100}if(e.endsWith("px")){const n=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(n))return n}throw new Error(`MUI X Charts: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function eE(e,t){const{height:n,width:r}=t,{cx:o,cy:i}=e,a=Math.min(r,n)/2,l=Mt(o??"50%",r),u=Mt(i??"50%",n);return{cx:l,cy:u,availableRadius:a}}const tE=(e,t)=>{const n={};for(const r of e.seriesOrder){const{innerRadius:o,outerRadius:i,arcLabelRadius:a,cx:l,cy:u}=e.series[r],{cx:d,cy:p,availableRadius:f}=eE({cx:l,cy:u},{width:t.width,height:t.height}),h=Mt(i??f,f),m=Mt(o??0,f),g=a===void 0?(m+h)/2:Mt(a,f);n[r]={radius:{available:f,inner:m,outer:h,label:g},center:{x:t.left+d,y:t.top+p}}}return n},nE=(e,t,n)=>c._extends({},e,{id:e.id??`auto-generated-id-${t}`,data:e.data.map((r,o)=>c._extends({},r,{color:r.color??n[o%n.length]}))}),rE=e=>{var x,b;const{series:t,identifier:n,placement:r,seriesLayout:o}=e;if(!n||n.dataIndex===void 0)return null;const i=(x=t.pie)==null?void 0:x.series[n.seriesId],a=(b=o.pie)==null?void 0:b[n.seriesId];if(i==null||a==null)return null;const{center:l,radius:u}=a,{data:d}=i,p=d[n.dataIndex];if(!p)return null;const f=[[u.inner,p.startAngle],[u.inner,p.endAngle],[u.outer,p.startAngle],[u.outer,p.endAngle]].map(([T,v])=>({x:l.x+T*Math.sin(v),y:l.y-T*Math.cos(v)})),[h,m]=Ur(f.map(T=>T.x)),[g,y]=Ur(f.map(T=>T.y));switch(r){case"bottom":return{x:(m+h)/2,y};case"left":return{x:h,y:(y+g)/2};case"right":return{x:m,y:(y+g)/2};case"top":default:return{x:(m+h)/2,y:g}}},To=new Set(["pie"]),oE=e=>{switch(e.key){case"ArrowRight":return ki(To);case"ArrowLeft":return Ai(To);case"ArrowDown":return Di(To);case"ArrowUp":return _i(To);default:return null}},iE={colorProcessor:J0,seriesProcessor:X0,seriesLayout:tE,legendGetter:Z0,tooltipGetter:Q0,tooltipItemPositionGetter:rE,getSeriesWithDefaultValues:nE,keyboardFocusHandler:oE,identifierSerializer:Ni},sE={bar:C0,scatter:D0,line:Y0,pie:iE},aE=[qa,Ha,Ga,Pi,Ya];function lE(e){const{children:t,plugins:n=aE,pluginParams:r={},seriesConfig:o=sE}=e,{contextValue:i}=ux(n,r,o);return c.jsxRuntimeExports.jsx(va.Provider,{value:i,children:t})}const Xa=()=>{const e=C.useContext(va);if(e==null)throw new Error(["MUI X Charts: Could not find the Chart context.","It looks like you rendered your component outside of a ChartDataProvider.","This can also happen if you are bundling multiple versions of the library."].join(`
|
|
60
|
-
`));return e};function dr(){const e=Xa();if(!e)throw new Error(["MUI X Charts: Could not find the charts context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
|
|
61
|
-
`));return e.store}function Fp(){return dr().use(Dt)}function Bp(){return dr().use(zg)}function cE(){const e=dr(),{axis:t,axisIds:n}=e.use(cn);return{xAxis:t,xAxisIds:n}}function uE(){const e=dr(),{axis:t,axisIds:n}=e.use(un);return{yAxis:t,yAxisIds:n}}function dE(){const e=dr(),{axis:t,axisIds:n}=e.use(Nv)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:n}}function pE(){const e=Xa();if(!e)throw new Error(["MUI X Charts: Could not find the svg ref context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
|
|
62
|
-
`));return e.svgRef}function fE(){const e=Bp();return C.useCallback(t=>`${e}-gradient-${t}`,[e])}function hE(){const e=Bp();return C.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var vs,ru;function mE(){if(ru)return vs;ru=1;var e=4,t=.001,n=1e-7,r=10,o=11,i=1/(o-1),a=typeof Float32Array=="function";function l(y,x){return 1-3*x+3*y}function u(y,x){return 3*x-6*y}function d(y){return 3*y}function p(y,x,b){return((l(x,b)*y+u(x,b))*y+d(x))*y}function f(y,x,b){return 3*l(x,b)*y*y+2*u(x,b)*y+d(x)}function h(y,x,b,T,v){var E,w,S=0;do w=x+(b-x)/2,E=p(w,T,v)-y,E>0?b=w:x=w;while(Math.abs(E)>n&&++S<r);return w}function m(y,x,b,T){for(var v=0;v<e;++v){var E=f(x,b,T);if(E===0)return x;var w=p(x,b,T)-y;x-=w/E}return x}function g(y){return y}return vs=function(x,b,T,v){if(!(0<=x&&x<=1&&0<=T&&T<=1))throw new Error("bezier x values must be in [0, 1] range");if(x===b&&T===v)return g;for(var E=a?new Float32Array(o):new Array(o),w=0;w<o;++w)E[w]=p(w*i,x,T);function S(R){for(var j=0,M=1,I=o-1;M!==I&&E[M]<=R;++M)j+=i;--M;var k=(R-E[M])/(E[M+1]-E[M]),D=j+k*i,O=f(D,x,T);return O>=t?m(R,D,x,T):O===0?D:h(R,j,j+i,x,T)}return function(j){return j===0?0:j===1?1:p(S(j),b,v)}},vs}var gE=mE();const xE=gh(gE),yE=300,bE=xE(.66,0,.34,1);var er=0,jr=0,yr=0,Up=1e3,oi,Mr,ii=0,Rn=0,$i=0,Wr=typeof performance=="object"&&performance.now?performance:Date,Vp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ja(){return Rn||(Vp(vE),Rn=Wr.now()+$i)}function vE(){Rn=0}function si(){this._call=this._time=this._next=null}si.prototype=Wp.prototype={constructor:si,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ja():+n)+(t==null?0:+t),!this._next&&Mr!==this&&(Mr?Mr._next=this:oi=this,Mr=this),this._call=e,this._time=n,qs()},stop:function(){this._call&&(this._call=null,this._time=1/0,qs())}};function Wp(e,t,n){var r=new si;return r.restart(e,t,n),r}function EE(){Ja(),++er;for(var e=oi,t;e;)(t=Rn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--er}function ou(){Rn=(ii=Wr.now())+$i,er=jr=0;try{EE()}finally{er=0,SE(),Rn=0}}function TE(){var e=Wr.now(),t=e-ii;t>Up&&($i-=t,ii=e)}function SE(){for(var e,t=oi,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:oi=n);Mr=e,qs(r)}function qs(e){if(!er){jr&&(jr=clearTimeout(jr));var t=e-Rn;t>24?(e<1/0&&(jr=setTimeout(ou,e-Wr.now()-$i)),yr&&(yr=clearInterval(yr))):(yr||(ii=Wr.now(),yr=setInterval(TE,Up)),er=1,Vp(ou))}}function wE(e,t,n){var r=new si;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}class CE{constructor(t,n,r){se(this,"elapsed",0);se(this,"timer",null);this.duration=t,this.easingFn=n,this.onTickCallback=r,this.resume()}get running(){return this.timer!==null}timerCallback(t){this.elapsed=Math.min(t,this.duration);const n=this.duration===0?1:this.elapsed/this.duration,r=this.easingFn(n);this.onTickCallback(r),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;const t=Ja()-this.elapsed;return this.timer=Wp(n=>this.timerCallback(n),0,t),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),wE(()=>this.timerCallback(this.duration)),this}}function RE(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o+=1){const i=n[o];if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1}return!0}function jE(e,{createInterpolator:t,applyProps:n,skip:r,initialProps:o=e}){const i=C.useRef(o),a=C.useRef(null),l=C.useRef(null),u=C.useRef(e);c.useEnhancedEffect(()=>{u.current=e},[e]),c.useEnhancedEffect(()=>{var f;r&&((f=a.current)==null||f.finish(),a.current=null,l.current=null,i.current=e)},[e,r]);const d=C.useCallback(f=>{const h=i.current,m=t(h,e);a.current=new CE(yE,bE,g=>{const y=m(g);i.current=y,n(f,y)})},[n,t,e]);return[C.useCallback(f=>{var m,g,y,x;if(f===null){(m=a.current)==null||m.stop();return}const h=l.current;if(h===f){if(RE(u.current,e)){(g=a.current)==null||g.resume();return}(y=a.current)==null||y.stop()}h&&((x=a.current)==null||x.stop()),l.current=f,(a.current||!r)&&d(f)},[d,e,r]),i.current]}function ME(e,{createInterpolator:t,transformProps:n,applyProps:r,skip:o,initialProps:i=e,ref:a}){const l=n??(f=>f),[u,d]=jE(e,{initialProps:i,createInterpolator:t,applyProps:(f,h)=>r(f,l(h)),skip:o}),p=n(o?e:d);return c._extends({},p,{ref:c.useForkRef(u,a)})}function iu(e){const{isReversed:t,gradientId:n,size:r,direction:o,scale:i,colorMap:a}=e;return r<=0?null:c.jsxRuntimeExports.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${t?1:2}`]:`${r}px`,gradientUnits:"userSpaceOnUse",children:a.thresholds.map((l,u)=>{const d=i(l);if(d===void 0)return null;const p=t?1-d/r:d/r;return Number.isNaN(p)?null:c.jsxRuntimeExports.jsxs(C.Fragment,{children:[c.jsxRuntimeExports.jsx("stop",{offset:p,stopColor:a.colors[u],stopOpacity:1}),c.jsxRuntimeExports.jsx("stop",{offset:p,stopColor:a.colors[u+1],stopOpacity:1})]},l.toString()+u)})})}const OE=10;function su(e){const{gradientUnits:t,isReversed:n,gradientId:r,size:o,direction:i,scale:a,colorScale:l,colorMap:u}=e,d=[u.min??0,u.max??100],p=d.map(a).filter(g=>g!==void 0);if(p.length!==2)return null;const f=typeof d[0]=="number"?vt(d[0],d[1]):Ra(d[0],d[1]),h=Math.round((Math.max(...p)-Math.min(...p))/OE),m=`${d[0]}-${d[1]}-`;return c.jsxRuntimeExports.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${i}${n?1:2}`]:t==="objectBoundingBox"?1:`${o}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(g,y)=>{const x=f(y/h);if(x===void 0)return null;const b=a(x);if(b===void 0)return null;const T=n?1-b/o:b/o,v=l(x);return v===null?null:c.jsxRuntimeExports.jsx("stop",{offset:T,stopColor:v,stopOpacity:1},m+y)})})}const IE=10,PE=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function Es(e){const{isReversed:t,gradientId:n,colorScale:r,colorMap:o}=e,i=[o.min??0,o.max??100],a=typeof i[0]=="number"?vt(i[0],i[1]):Ra(i[0],i[1]),l=IE,u=`${i[0]}-${i[1]}-`;return c.jsxRuntimeExports.jsx("linearGradient",c._extends({id:n},PE(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:l+1},(d,p)=>{const f=p/l,h=a(f);if(h===void 0)return null;const m=r(h);return m===null?null:c.jsxRuntimeExports.jsx("stop",{offset:f,stopColor:m,stopOpacity:1},u+p)})}))}function kE(){const{top:e,height:t,bottom:n,left:r,width:o,right:i}=Fp(),a=e+t+n,l=r+o+i,u=fE(),d=hE(),{xAxis:p,xAxisIds:f}=cE(),{yAxis:h,yAxisIds:m}=uE(),{zAxis:g,zAxisIds:y}=dE(),x=m.filter(v=>h[v].colorMap!==void 0),b=f.filter(v=>p[v].colorMap!==void 0),T=y.filter(v=>g[v].colorMap!==void 0);return x.length===0&&b.length===0&&T.length===0?null:c.jsxRuntimeExports.jsxs("defs",{children:[x.map(v=>{const E=u(v),w=d(v),{colorMap:S,scale:R,colorScale:j,reverse:M}=h[v];return(S==null?void 0:S.type)==="piecewise"?c.jsxRuntimeExports.jsx(iu,{isReversed:!M,scale:R,colorMap:S,size:a,gradientId:E,direction:"y"},E):(S==null?void 0:S.type)==="continuous"?c.jsxRuntimeExports.jsxs(C.Fragment,{children:[c.jsxRuntimeExports.jsx(su,{isReversed:!M,scale:R,colorScale:j,colorMap:S,size:a,gradientId:E,direction:"y"}),c.jsxRuntimeExports.jsx(Es,{isReversed:M,colorScale:j,colorMap:S,gradientId:w})]},E):null}),b.map(v=>{const E=u(v),w=d(v),{colorMap:S,scale:R,reverse:j,colorScale:M}=p[v];return(S==null?void 0:S.type)==="piecewise"?c.jsxRuntimeExports.jsx(iu,{isReversed:j,scale:R,colorMap:S,size:l,gradientId:E,direction:"x"},E):(S==null?void 0:S.type)==="continuous"?c.jsxRuntimeExports.jsxs(C.Fragment,{children:[c.jsxRuntimeExports.jsx(su,{isReversed:j,scale:R,colorScale:M,colorMap:S,size:l,gradientId:E,direction:"x"}),c.jsxRuntimeExports.jsx(Es,{isReversed:j,colorScale:M,colorMap:S,gradientId:w})]},E):null}),T.map(v=>{const E=d(v),{colorMap:w,colorScale:S}=g[v];return(w==null?void 0:w.type)==="continuous"?c.jsxRuntimeExports.jsx(Es,{colorScale:S,colorMap:w,gradientId:E},E):null})]})}function AE(e){return c.generateUtilityClass("MuiChartsSurface",e)}const _E=()=>{const e={root:["root"]};return c.composeClasses(e,AE)};c.generateUtilityClasses("MuiChartsSurface",["root"]);const DE=["children","className","title","desc"],NE=c.styled("svg",{name:"MuiChartsSurface",slot:"Root"})(({ownerState:e})=>({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",touchAction:"pan-y",userSelect:"none",gridArea:"chart","&:focus":{outline:"none"}})),Za=C.forwardRef(function(t,n){const{store:r,instance:o}=Xa(),i=r.use(Ig),a=r.use(Pg),l=r.use(kg),u=r.use(Ag),d=r.use(_v),p=r.use(Av),f=pE(),h=c.useForkRef(f,n),m=Mh({props:t,name:"MuiChartsSurface"}),{children:g,className:y,title:x,desc:b}=m,T=c._objectWithoutPropertiesLoose(m,DE),v=_E(),E=a>0&&i>0;return c.jsxRuntimeExports.jsxs(NE,c._extends({ownerState:{width:l,height:u},viewBox:`0 0 ${i} ${a}`,className:c.clsx(v.root,y),tabIndex:d?0:void 0,"data-has-focused-item":p||void 0},T,{onPointerEnter:w=>{var S,R;(S=T.onPointerEnter)==null||S.call(T,w),(R=o.handlePointerEnter)==null||R.call(o,w)},onPointerLeave:w=>{var S,R;(S=T.onPointerLeave)==null||S.call(T,w),(R=o.handlePointerLeave)==null||R.call(o,w)},onClick:w=>{var S,R;(S=T.onClick)==null||S.call(T,w),(R=o.handleClick)==null||R.call(o,w)},ref:h,children:[x&&c.jsxRuntimeExports.jsx("title",{children:x}),b&&c.jsxRuntimeExports.jsx("desc",{children:b}),c.jsxRuntimeExports.jsx(kE,{}),E&&g]}))});process.env.NODE_ENV!=="production"&&(Za.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(Za.propTypes={children:s.node,className:s.string,desc:s.string,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),title:s.string});function Ts(e){const t=En(e);return[Math.sin(t),-Math.cos(t)]}function $E(e,t){const n=[[0,0],Ts(e),Ts(t)],r=Math.min(e,t),o=Math.max(e,t),i=Math.floor(r/90)*90;for(let p=1;p<=4;p+=1){const f=i+p*90;f<o&&n.push(Ts(f))}const a=Math.min(...n.map(([p])=>p)),l=Math.max(...n.map(([p])=>p)),u=Math.min(...n.map(([,p])=>p)),d=Math.max(...n.map(([,p])=>p));return{cx:-a/(l-a),cy:-u/(d-u),minX:a,maxX:l,minY:u,maxY:d}}function zE(e,t,n,r,{minX:o,maxX:i,minY:a,maxY:l}){return Math.min(...[{ratio:Math.abs(o),space:e},{ratio:Math.abs(i),space:n-e},{ratio:Math.abs(a),space:t},{ratio:Math.abs(l),space:r-t}].map(({ratio:u,space:d})=>u<1e-5?1/0:d/u))}const Qa=C.createContext({value:null,valueMin:0,valueMax:0,startAngle:0,endAngle:0,innerRadius:0,outerRadius:0,cornerRadius:0,cx:0,cy:0,maxRadius:0,valueAngle:null});process.env.NODE_ENV!=="production"&&(Qa.displayName="GaugeContext");function LE(e){const{value:t=null,valueMin:n=0,valueMax:r=100,startAngle:o=0,endAngle:i=360,outerRadius:a,innerRadius:l,cornerRadius:u,cx:d,cy:p,children:f}=e,{left:h,top:m,width:g,height:y}=Fp(),x=$E(o,i),b=d?Mt(d,g):x.cx*g,T=p?Mt(p,y):x.cy*y;let v=h+b,E=m+T;const w=zE(b,T,g,y,x);if(d===void 0){const I=w*(x.maxX-x.minX);v=h+(g-I)/2+x.cx*I}if(p===void 0){const I=w*(x.maxY-x.minY);E=m+(y-I)/2+x.cy*I}const S=Mt(a??w,w),R=Mt(l??"80%",w),j=Mt(u??0,S-R),M=C.useMemo(()=>{const I=En(o),k=En(i);return{value:t,valueMin:n,valueMax:r,startAngle:I,endAngle:k,outerRadius:S,innerRadius:R,cornerRadius:j,cx:v,cy:E,maxRadius:w,valueAngle:t===null?null:I+(k-I)*(t-n)/(r-n)}},[t,n,r,o,i,S,R,j,v,E,w]);return c.jsxRuntimeExports.jsx(Qa.Provider,{value:M,children:f})}function el(){return C.useContext(Qa)}const FE=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],BE=c.styled("g",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),tl=C.forwardRef(function(t,n){const{width:r,height:o,margin:i,title:a,desc:l,value:u,valueMin:d=0,valueMax:p=100,startAngle:f,endAngle:h,outerRadius:m,innerRadius:g,cornerRadius:y,cx:x,cy:b,children:T}=t,v=c._objectWithoutPropertiesLoose(t,FE);return c.jsxRuntimeExports.jsx(lE,{pluginParams:{width:r,height:o,margin:Rd(i,{left:10,right:10,top:10,bottom:10})},plugins:[],children:c.jsxRuntimeExports.jsx(LE,{value:u,valueMin:d,valueMax:p,startAngle:f,endAngle:h,outerRadius:m,innerRadius:g,cornerRadius:y,cx:x,cy:b,children:c.jsxRuntimeExports.jsx(Za,c._extends({title:a,desc:l,role:"meter","aria-valuenow":u===null?void 0:u,"aria-valuemin":d,"aria-valuemax":p},v,{ref:n,children:c.jsxRuntimeExports.jsx(BE,{"aria-hidden":"true",children:T})}))})})});process.env.NODE_ENV!=="production"&&(tl.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(tl.propTypes={children:s.node,className:s.string,cornerRadius:s.oneOfType([s.number,s.string]),cx:s.oneOfType([s.number,s.string]),cy:s.oneOfType([s.number,s.string]),desc:s.string,endAngle:s.number,height:s.number,id:s.string,innerRadius:s.oneOfType([s.number,s.string]),margin:s.oneOfType([s.number,s.shape({bottom:s.number,left:s.number,right:s.number,top:s.number})]),outerRadius:s.oneOfType([s.number,s.string]),skipAnimation:s.bool,startAngle:s.number,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),title:s.string,value:s.number,valueMax:s.number,valueMin:s.number,width:s.number});function UE(e){const n=dr().use(yg);return e||n}function VE(e,t){const n=vt(e.startAngle,t.startAngle),r=vt(e.endAngle,t.endAngle),o=vt(e.innerRadius,t.innerRadius),i=vt(e.outerRadius,t.outerRadius),a=vt(e.cornerRadius,t.cornerRadius);return l=>({startAngle:n(l),endAngle:r(l),innerRadius:o(l),outerRadius:i(l),cornerRadius:a(l)})}function WE(e){return ME({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:VE,transformProps:t=>({d:Op().cornerRadius(t.cornerRadius)({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle})}),applyProps(t,n){t.setAttribute("d",n.d)},initialProps:{startAngle:e.startAngle,endAngle:e.startAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},skip:e.skipAnimation,ref:e.ref})}function GE(e){return c.generateUtilityClass("MuiGauge",e)}const nl=c.generateUtilityClasses("MuiGauge",["root","valueArc","referenceArc","valueText"]),HE=["className"],qE=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],YE=c.styled("path",{name:"MuiGauge",slot:"ValueArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function Gp(e){let{className:t}=e,n=c._objectWithoutPropertiesLoose(e,HE);const{value:r,valueMin:o,valueMax:i,startAngle:a,endAngle:l,outerRadius:u,innerRadius:d,cornerRadius:p,cx:f,cy:h}=el();if(r===null)return null;const m=a+(r-o)/(i-o)*(l-a);return c.jsxRuntimeExports.jsx(Hp,c._extends({},n,{className:c.clsx(nl.valueArc,t),cx:f,cy:h,startAngle:a,endAngle:m,cornerRadius:p,innerRadius:d,outerRadius:u}))}process.env.NODE_ENV!=="production"&&(Gp.propTypes={skipAnimation:s.bool});function Hp(e){let{cx:t,cy:n,startAngle:r,endAngle:o,cornerRadius:i,innerRadius:a,outerRadius:l,skipAnimation:u}=e,d=c._objectWithoutPropertiesLoose(e,qE);const p=UE(u),f=WE({startAngle:r,endAngle:o,cornerRadius:i,innerRadius:a,outerRadius:l,skipAnimation:p});return c.jsxRuntimeExports.jsx(YE,c._extends({},f,{transform:`translate(${t}, ${n})`},d))}process.env.NODE_ENV!=="production"&&(Hp.propTypes={cornerRadius:s.number.isRequired,cx:s.number.isRequired,cy:s.number.isRequired,endAngle:s.number.isRequired,innerRadius:s.number.isRequired,outerRadius:s.number.isRequired,skipAnimation:s.bool,startAngle:s.number.isRequired});const KE=["className"],XE=c.styled("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function JE(e){let{className:t}=e,n=c._objectWithoutPropertiesLoose(e,KE);const{startAngle:r,endAngle:o,outerRadius:i,innerRadius:a,cornerRadius:l,cx:u,cy:d}=el();return c.jsxRuntimeExports.jsx(XE,c._extends({className:c.clsx(nl.referenceArc,t),transform:`translate(${u}, ${d})`,d:Op().cornerRadius(l)({startAngle:r,endAngle:o,innerRadius:a,outerRadius:i})},n))}function ZE(){return typeof window>"u"}const So=new Map,QE=2e3,eT=new Set(["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"]);function qp(e,t){return eT.has(e)&&t===+t?`${t}px`:t}const tT=/([A-Z])/g;function Yp(e){return String(e).replace(tT,t=>`-${t.toLowerCase()}`)}function nT(e){let t="";for(const n in e)if(Object.hasOwn(e,n)){const r=n,o=e[r];if(o===void 0)continue;t+=`${Yp(r)}:${qp(r,o)};`}return t}const rT=(e,t={})=>{if(e==null||ZE())return{width:0,height:0};const n=String(e),r=nT(t),o=`${n}-${r}`,i=So.get(o);if(i)return i;try{const a=iT(),l=document.createElementNS("http://www.w3.org/2000/svg","text");Object.keys(t).map(d=>(l.style[Yp(d)]=qp(d,t[d]),d)),l.textContent=n,a.replaceChildren(l);const u=oT(l);return So.set(o,u),So.size+1>QE&&So.clear(),process.env.NODE_ENV==="test"&&a.replaceChildren(),u}catch{return{width:0,height:0}}};function oT(e){try{const t=e.getBBox();return{width:t.width,height:t.height}}catch{const t=e.getBoundingClientRect();return{width:t.width,height:t.height}}}let Ze=null;function iT(){return Ze===null&&(Ze=document.createElementNS("http://www.w3.org/2000/svg","svg"),Ze.setAttribute("aria-hidden","true"),Ze.style.position="absolute",Ze.style.top="-20000px",Ze.style.left="0",Ze.style.padding="0",Ze.style.margin="0",Ze.style.border="none",Ze.style.pointerEvents="none",Ze.style.visibility="hidden",Ze.style.contain="strict",document.body.appendChild(Ze)),Ze}function sT({style:e,needsComputation:t,text:n}){return n.split(`
|
|
63
|
-
`).map(r=>c._extends({text:r},t?rT(r,e):{width:0,height:0}))}function aT(){const[e,t]=C.useState(!1);return C.useEffect(()=>{t(!0)},[]),e}const lT=["x","y","style","text","ownerState"],cT=["angle","textAnchor","dominantBaseline"];function Kp(e){const{x:t,y:n,style:r,text:o}=e,i=c._objectWithoutPropertiesLoose(e,lT),a=r??{},{angle:l,textAnchor:u,dominantBaseline:d}=a,p=c._objectWithoutPropertiesLoose(a,cT),f=aT(),h=C.useMemo(()=>sT({style:p,needsComputation:f&&o.includes(`
|
|
64
|
-
`),text:o}),[p,o,f]);let m;switch(d){case"hanging":case"text-before-edge":m=0;break;case"central":m=(h.length-1)/2*-h[0].height;break;default:m=(h.length-1)*-h[0].height;break}return c.jsxRuntimeExports.jsx("text",c._extends({},i,{transform:l?`rotate(${l}, ${t}, ${n})`:void 0,x:t,y:n,textAnchor:u,dominantBaseline:d,style:p,children:h.map((g,y)=>c.jsxRuntimeExports.jsx("tspan",{x:t,dy:`${y===0?m:h[0].height}px`,dominantBaseline:d,children:g.text},y))}))}process.env.NODE_ENV!=="production"&&(Kp.propTypes={lineHeight:s.number,needsComputation:s.bool,ownerState:s.any,style:s.object,text:s.string.isRequired});const uT=["text","className"];function dT({value:e}){return e===null?null:e.toLocaleString()}function Xp(e){const{text:t=dT,className:n}=e,r=c._objectWithoutPropertiesLoose(e,uT),{value:o,valueMin:i,valueMax:a,cx:l,cy:u}=el(),d=typeof t=="function"?t({value:o,valueMin:i,valueMax:a}):t;return d===null?null:c.jsxRuntimeExports.jsx("g",{className:c.clsx(nl.valueText,n),children:c.jsxRuntimeExports.jsx(Kp,c._extends({x:l,y:u,text:d,style:{textAnchor:"middle",dominantBaseline:"central"}},r))})}process.env.NODE_ENV!=="production"&&(Xp.propTypes={lineHeight:s.number,needsComputation:s.bool,ownerState:s.any,style:s.object,text:s.oneOfType([s.func,s.string])});const pT=["text","children","classes","className","skipAnimation"],fT=e=>{const{classes:t}=e,n={root:["root"]};return c.composeClasses(n,GE,t)},rl=C.forwardRef(function(t,n){const{text:r,children:o,className:i,skipAnimation:a}=t,l=c._objectWithoutPropertiesLoose(t,pT),u=fT(t);return c.jsxRuntimeExports.jsxs(tl,c._extends({},l,{className:c.clsx(u.root,i),ref:n,children:[c.jsxRuntimeExports.jsx(JE,{}),c.jsxRuntimeExports.jsx(Gp,{skipAnimation:a}),c.jsxRuntimeExports.jsx(Xp,{text:r}),o]}))});process.env.NODE_ENV!=="production"&&(rl.displayName="Gauge");process.env.NODE_ENV!=="production"&&(rl.propTypes={children:s.node,classes:s.object,className:s.string,cornerRadius:s.oneOfType([s.number,s.string]),cx:s.oneOfType([s.number,s.string]),cy:s.oneOfType([s.number,s.string]),desc:s.string,endAngle:s.number,height:s.number,id:s.string,innerRadius:s.oneOfType([s.number,s.string]),margin:s.oneOfType([s.number,s.shape({bottom:s.number,left:s.number,right:s.number,top:s.number})]),outerRadius:s.oneOfType([s.number,s.string]),skipAnimation:s.bool,startAngle:s.number,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),text:s.oneOfType([s.func,s.string]),title:s.string,value:s.number,valueMax:s.number,valueMin:s.number,width:s.number});const hT=e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),o=e%60,i=[];return t>0?(i.push(t.toString()),i.push(n.toString().padStart(2,"0")),i.push(r.toString().padStart(2,"0")),i.push(o.toString().padStart(2,"0"))):n>0?(i.push(n.toString()),i.push(r.toString().padStart(2,"0")),i.push(o.toString().padStart(2,"0"))):(i.push(r.toString()),i.push(o.toString().padStart(2,"0"))),i.join(":")},jt=(e,t)=>{const n=Math.floor(e/86400),r=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),i=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const l={};return n>0&&(l.days=n),r>0&&(l.hours=r),o>0&&(l.minutes=o),(i>0||Object.keys(l).length===0)&&(l.seconds=i),new Intl.DurationFormat(t,{style:"narrow"}).format(l)}catch{}const a=[];return n>0&&a.push(`${n}d`),r>0&&a.push(`${r}h`),o>0&&a.push(`${o}m`),(i>0||a.length===0)&&a.push(`${i}s`),a.join(" ")},mT=(e,t,n)=>e==="countdown"&&n!==null?Math.min(100,t/n*100):e==="measuring"?t/60%1*100:0,gT=({timerState:e,animationState:t,hasError:n,className:r})=>{const{t:o,i18n:i}=Pe.useTranslation(),a=c.useTheme(),{currentState:l,remainingTime:u,maxTime:d,currentProgress:p}=e,{showErrorAnimation:f,showPauseAnimation:h,showPulsatingText:m,pulsatingFinished:g,showLabels:y,showMainText:x,showIdlePulsating:b,idleDotsCount:T}=t;return c.jsxRuntimeExports.jsxs(c.Box,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[c.jsxRuntimeExports.jsx(rl,{width:264,height:264,value:l==="idle"?0:p,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:h||f?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:n?a.palette.error.light:a.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),c.jsxRuntimeExports.jsxs(c.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:[c.jsxRuntimeExports.jsx(c.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:c.jsxRuntimeExports.jsx(yt,{in:y&&!n&&l!=="idle"&&l!=="success",timeout:300,children:c.jsxRuntimeExports.jsx(c.Typography,{variant:"body2",sx:{fontSize:"12px",color:l==="measured"&&(m||g)?a.palette.success.main:a.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:c.jsxRuntimeExports.jsx("span",{style:{opacity:l==="measured"&&g?m?1:.6:1,transition:"opacity 2s ease-in-out"},children:l==="measuring"||l==="measured"?o("CycleTimer.CycleTime.lb","Cycle Time"):l==="countdown"?o("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),c.jsxRuntimeExports.jsxs(c.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[c.jsxRuntimeExports.jsx(yt,{in:x&&l==="idle"&&!n,timeout:200,children:c.jsxRuntimeExports.jsxs(c.Typography,{variant:"body2",sx:{position:"absolute",fontSize:"12px",fontWeight:400,color:"rgba(255, 255, 255, 0.7)",lineHeight:"166%",letterSpacing:"0.17px",textAlign:"center",width:"200px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:[c.jsxRuntimeExports.jsx("span",{style:{opacity:b?1:.6,transition:"opacity 2s ease-in-out"},children:o("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),c.jsxRuntimeExports.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:b?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(T)})]})}),c.jsxRuntimeExports.jsx(yt,{in:x&&n,timeout:200,children:c.jsxRuntimeExports.jsx(c.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:o("CycleTimer.Error.lb","Error")})}),c.jsxRuntimeExports.jsx(yt,{in:x&&!n&&l!=="idle"&&l!=="success",timeout:300,children:c.jsxRuntimeExports.jsx(c.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:a.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:c.jsxRuntimeExports.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:hT(u)})})})]}),c.jsxRuntimeExports.jsx(c.Box,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:c.jsxRuntimeExports.jsx(yt,{in:y&&!n&&l!=="idle"&&l!=="success",timeout:300,children:c.jsxRuntimeExports.jsx(c.Typography,{variant:"body2",sx:{fontSize:"12px",color:l==="measured"&&(m||g)?a.palette.success.main:a.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:c.jsxRuntimeExports.jsx("span",{style:{opacity:l==="measured"&&g?m?1:.6:1,transition:"opacity 2s ease-in-out"},children:l==="measuring"?o("CycleTimer.Measuring.lb","measuring..."):l==="measured"?o("CycleTimer.Determined.lb","determined"):l==="countdown"&&d!==null?o("CycleTimer.OfTime.lb",{time:jt(d,i.language)}):""})})})})]})]})},xT=({timerState:e,animationState:t,hasError:n,compact:r,className:o})=>{const{t:i,i18n:a}=Pe.useTranslation(),l=c.useTheme(),{currentState:u,remainingTime:d,maxTime:p}=e,{showErrorAnimation:f,showPauseAnimation:h,showPulsatingText:m,pulsatingFinished:g,showIdlePulsating:y,idleDotsCount:x}=t;return r&&u==="idle"?c.jsxRuntimeExports.jsx(c.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0},children:c.jsxRuntimeExports.jsx(c.Typography,{variant:"body2",sx:{color:n?l.palette.error.light:l.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:n?i("CycleTimer.Error.lb","Error"):u==="idle"?"0s":jt(d,a.language)})}):c.jsxRuntimeExports.jsxs(c.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(u==="idle"&&r)&&c.jsxRuntimeExports.jsx(c.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:h||f?.6:1,transition:"opacity 0.5s ease-out"},children:c.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[c.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?l.palette.error.light:u==="measured"?m||g?l.palette.success.main:l.palette.text.secondary:l.palette.success.main,strokeWidth:"2",opacity:u==="measured"&&g?m?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),c.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?l.palette.error.light:u==="measured"?m||g?l.palette.success.main:l.palette.text.secondary:l.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(u==="idle"?0:e.currentProgress)/100)}`,style:{opacity:u==="measured"&&g?m?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),c.jsxRuntimeExports.jsx(c.Typography,{variant:"body2",sx:{color:n?l.palette.error.light:u==="idle"?"rgba(255, 255, 255, 0.7)":u==="measured"?m||g?l.palette.success.main:l.palette.text.secondary:l.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:u==="idle"?y?1:.6:u==="measured"&&g?m?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:n?i("CycleTimer.Error.lb","Error"):u==="idle"?c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx("span",{children:i("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),c.jsxRuntimeExports.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(x)})]}):u==="measuring"?r?jt(d,a.language):`${jt(d,a.language)} / ${i("CycleTimer.Measuring.lb","measuring...")}`:u==="measured"?r?jt(d,a.language):`${jt(d,a.language)} / ${i("CycleTimer.Determined.lb","determined")}`:u==="countdown"&&p!==null?r?jt(d,a.language):`${jt(d,a.language)} / ${i("CycleTimer.Time.lb",{time:jt(p,a.language)})}`:jt(d,a.language)})]})},yT=()=>{const[e,t]=L.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),n=L.useRef(null),r=L.useRef(null),o=L.useRef(null),i=L.useRef(null),a=L.useRef(0),l=L.useRef(null),u=L.useRef(null),d=L.useCallback(()=>{t(v=>({...v,showPauseAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(v=>({...v,showPauseAnimation:!1}))},800)},[]),p=L.useCallback(()=>{t(v=>({...v,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(v=>({...v,showErrorAnimation:!1}))},600)},[]),f=L.useCallback(()=>{t(v=>({...v,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),h=L.useCallback(v=>{a.current=0,t(E=>({...E,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{t(E=>({...E,pulsatingFinished:!0})),o.current=setInterval(()=>{t(E=>({...E,showPulsatingText:!E.showPulsatingText}))},2e3),v&&v()},800)},[]),m=L.useCallback(()=>{o.current&&(clearInterval(o.current),o.current=null),t(v=>({...v,showPulsatingText:!1,pulsatingFinished:!1})),a.current=0},[]),g=L.useCallback(()=>{t(v=>({...v,showIdlePulsating:!0})),l.current=setInterval(()=>{t(v=>({...v,showIdlePulsating:!v.showIdlePulsating}))},2e3),u.current=setInterval(()=>{t(v=>({...v,idleDotsCount:(v.idleDotsCount+1)%4}))},800)},[]),y=L.useCallback(()=>{l.current&&(clearInterval(l.current),l.current=null),u.current&&(clearInterval(u.current),u.current=null),t(v=>({...v,showIdlePulsating:!1,idleDotsCount:0}))},[]),x=L.useCallback(()=>{t(v=>({...v,showLabels:!1,showMainText:!1})),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{t(v=>({...v,showLabels:!0,showMainText:!0}))},200)},[]),b=L.useCallback(()=>{t(v=>({...v,showLabels:!0,showMainText:!0}))},[]),T=L.useCallback(()=>{n.current&&clearTimeout(n.current),r.current&&clearTimeout(r.current),i.current&&clearTimeout(i.current),o.current&&clearInterval(o.current),l.current&&clearInterval(l.current),u.current&&clearInterval(u.current)},[]);return{animationState:e,triggerPauseAnimation:d,triggerErrorAnimation:p,clearErrorAnimation:f,startPulsatingAnimation:h,stopPulsatingAnimation:m,startIdleAnimations:g,stopIdleAnimations:y,triggerFadeTransition:x,setInitialAnimationState:b,cleanup:T}},bT=({autoStart:e,onCycleEnd:t,onMeasuringComplete:n,hasError:r,onPauseAnimation:o,onErrorAnimation:i,onClearErrorAnimation:a,onStartPulsating:l})=>{const[u,d]=L.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),p=L.useRef(null),f=L.useRef(null),h=L.useRef(0),[m]=c.useInterpolation([0],{tension:80,friction:18,onChange:([w])=>{d(S=>({...S,currentProgress:w}))}}),g=L.useCallback(()=>{d(w=>({...w,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),h.current=0,f.current=null,m.setImmediate([0])},[m]),y=L.useCallback((w=0)=>{const S=w/60%1*100;d(R=>({...R,currentState:"measuring",maxTime:null,remainingTime:w,isPausedState:!1,currentProgress:S})),h.current=0,m.setImmediate([S]),e?(f.current=Date.now()-w*1e3,d(R=>({...R,isRunning:!0}))):f.current=null},[e,m]),x=L.useCallback((w,S=0)=>{d(M=>({...M,isRunning:!1})),f.current=null,d(M=>({...M,currentState:"countdown",maxTime:w,isPausedState:!1})),h.current=0;const R=Math.max(0,w-S),j=S>0?S/w*100:0;d(M=>({...M,remainingTime:R,currentProgress:j})),m.setImmediate([j]),R===0?(d(M=>({...M,isRunning:!1})),f.current=null,t&&queueMicrotask(()=>t())):e?setTimeout(()=>{f.current=Date.now()-S*1e3,d(M=>({...M,isRunning:!0}))},0):f.current=null},[e,t,m]),b=L.useCallback(()=>{d(w=>({...w,isRunning:!1,currentState:"measured"})),f.current=null,l(()=>{n&&n()})},[l,n]),T=L.useCallback(()=>{if(f.current&&u.isRunning){const S=Date.now()-f.current;h.current+=S;const R=h.current/1e3,j=mT(u.currentState,R,u.maxTime);m.setTarget([j])}d(w=>({...w,isRunning:!1,isPausedState:!0})),o()},[u.isRunning,u.currentState,u.maxTime,m,o]),v=L.useCallback(()=>{u.isPausedState&&(u.remainingTime>0||u.currentState!=="countdown")&&(f.current=Date.now(),d(w=>({...w,isRunning:!0,isPausedState:!1})))},[u.isPausedState,u.remainingTime,u.currentState]),E=L.useCallback(()=>u.isPausedState,[u.isPausedState]);return L.useEffect(()=>{r?(u.isRunning&&!u.isPausedState&&(d(w=>({...w,wasRunningBeforeError:!0})),T()),i()):(u.wasRunningBeforeError&&u.isPausedState&&(d(w=>({...w,wasRunningBeforeError:!1})),v()),a())},[r,u.isRunning,u.isPausedState,u.wasRunningBeforeError,T,v,i,a]),L.useEffect(()=>{if(u.isRunning){const w=()=>{if(f.current){const R=(Date.now()-f.current+h.current)/1e3;if(u.currentState==="countdown"&&u.maxTime!==null){const j=Math.max(0,u.maxTime-R);d(I=>({...I,remainingTime:Math.ceil(j)}));const M=Math.min(100,R/u.maxTime*100);if(m.setTarget([M]),j<=0){d(I=>({...I,isRunning:!1,remainingTime:0})),f.current=null,m.setTarget([100]),t&&queueMicrotask(()=>t());return}}else if(u.currentState==="measuring"){d(M=>({...M,remainingTime:Math.floor(R)}));const j=R/60%1*100;m.setTarget([j])}u.isRunning&&(p.current=requestAnimationFrame(w))}};p.current=requestAnimationFrame(w)}else p.current&&(cancelAnimationFrame(p.current),p.current=null);return()=>{p.current&&cancelAnimationFrame(p.current)}},[u.isRunning,t,u.currentState,u.maxTime,m]),L.useEffect(()=>{let w=null;const S=()=>{m.update(1/60),w=requestAnimationFrame(S)};return w=requestAnimationFrame(S),()=>{w&&cancelAnimationFrame(w)}},[m]),{timerState:u,controls:{startNewCycle:x,startMeasuring:y,setIdle:g,completeMeasuring:b,pause:T,resume:v,isPaused:E}}},vT=c.externalizeComponent(Oe.observer(({onCycleComplete:e,onCycleEnd:t,onMeasuringComplete:n,autoStart:r=!0,variant:o="default",compact:i=!1,className:a,hasError:l=!1})=>{const u=L.useRef(void 0),{animationState:d,triggerPauseAnimation:p,triggerErrorAnimation:f,clearErrorAnimation:h,startPulsatingAnimation:m,stopPulsatingAnimation:g,startIdleAnimations:y,stopIdleAnimations:x,triggerFadeTransition:b,setInitialAnimationState:T,cleanup:v}=yT(),{timerState:E,controls:w}=bT({autoStart:r,onCycleEnd:t,onMeasuringComplete:n,hasError:l,onPauseAnimation:p,onErrorAnimation:f,onClearErrorAnimation:h,onStartPulsating:m});return L.useEffect(()=>{const S=u.current;u.current!==void 0&&S!==E.currentState?(S==="measured"&&g(),S==="idle"&&x(),b()):T(),E.currentState==="idle"&&y(),u.current=E.currentState},[E.currentState,g,x,y,b,T]),L.useEffect(()=>{let S=!0;const R=setTimeout(()=>{S&&e(w)},0);return()=>{S=!1,clearTimeout(R)}},[e,w]),L.useEffect(()=>v,[v]),o==="small"?c.jsxRuntimeExports.jsx(xT,{timerState:E,animationState:d,hasError:l,compact:i,className:a}):c.jsxRuntimeExports.jsx(gT,{timerState:E,animationState:d,hasError:l,className:a})})),ET=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),TT=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),au=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),Jp=c.externalizeComponent(Oe.observer(({data:e,columns:t,getRowData:n,onRowClick:r,selectedItem:o,getItemId:i,title:a,showCount:l=!0,searchPlaceholder:u="Search programs",dataGridProps:d,CustomToolbar:p,selectFirstByDefault:f=!1,sx:h})=>{var j;const m=c.useTheme(),g=xt.useGridApiRef(),y=L.useRef(null),[x,b]=L.useState(null),T=L.useMemo(()=>e.map(n),[e,n]);L.useEffect(()=>{g.current&&T.length>0&&g.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(M=>M.field)})},[T,t,g]),L.useEffect(()=>{if(!y.current||!g.current)return;const M=new ResizeObserver(()=>{setTimeout(()=>{g.current&&T.length>0&&g.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(I=>I.field)})},100)});return M.observe(y.current),()=>{M.disconnect()}},[g,T.length,t]);const v=L.useMemo(()=>{if(o!==void 0)return o;if(x!==null)return x;if(f&&e.length>0){const M=e[0];return b(M),M}return null},[f,e,o,x]),E=M=>{const I=e.find(k=>n(k).id===M.id);I&&(o===void 0&&b(I),r&&r(I,M))},w=L.useMemo(()=>!v||!i?null:i(v),[v,i]);function S(){return c.jsxRuntimeExports.jsx(xt.Toolbar,{children:c.jsxRuntimeExports.jsxs(c.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[a&&c.jsxRuntimeExports.jsxs(c.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[a,l&&` (${e.length})`]}),c.jsxRuntimeExports.jsxs(c.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[c.jsxRuntimeExports.jsx(xt.FilterPanelTrigger,{render:c.jsxRuntimeExports.jsx(xt.ToolbarButton,{"aria-label":"Show filters",children:c.jsxRuntimeExports.jsx(TT,{fontSize:"small"})})}),c.jsxRuntimeExports.jsx(c.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),c.jsxRuntimeExports.jsx(xt.QuickFilter,{render:(M,I)=>c.jsxRuntimeExports.jsxs(c.Box,{...M,sx:{display:"flex",overflow:"hidden"},children:[!I.expanded&&c.jsxRuntimeExports.jsx(xt.QuickFilterTrigger,{render:c.jsxRuntimeExports.jsx(xt.ToolbarButton,{"aria-label":"Search",children:c.jsxRuntimeExports.jsx(au,{fontSize:"small"})})}),c.jsxRuntimeExports.jsxs(c.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:I.expanded?"200px":"0px",position:"relative"},children:[c.jsxRuntimeExports.jsxs(c.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:I.expanded&&I.value!==""?"40px":"12px",color:"white",fontSize:"14px",border:"none !important",outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"},"&:hover":{"&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&:focus-within":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&.Mui-focused":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"& .MuiInputBase-input":{padding:"8px 0",border:"none !important",outline:"none !important",boxShadow:"none !important","&:focus":{outline:"none !important",boxShadow:"none !important",border:"none !important"},"&::placeholder":{color:"rgba(255, 255, 255, 0.3)",opacity:1}},"& fieldset":{border:"none !important",display:"none !important"},"& .MuiOutlinedInput-notchedOutline":{border:"none !important",display:"none !important"}}},children:[I.expanded&&c.jsxRuntimeExports.jsx(au,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),c.jsxRuntimeExports.jsx(xt.QuickFilterControl,{placeholder:u})]}),I.expanded&&I.value!==""&&c.jsxRuntimeExports.jsx(xt.QuickFilterClear,{render:c.jsxRuntimeExports.jsx(c.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:c.jsxRuntimeExports.jsx(c.Box,{sx:{minWidth:"24px",width:"24px",height:"24px",padding:0,color:"rgba(255, 255, 255, 0.6)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},children:c.jsxRuntimeExports.jsx(xt.ToolbarButton,{"aria-label":"Clear",children:c.jsxRuntimeExports.jsx(ET,{fontSize:"small"})})})})})]})]})})]})]})})}const R=p||S;return c.jsxRuntimeExports.jsx(c.Box,{ref:y,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${m.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:m.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:m.palette.action.hover}},...h},children:c.jsxRuntimeExports.jsx(xt.DataGrid,{apiRef:g,rows:T,columns:t,onRowClick:E,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:R},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...d==null?void 0:d.initialState},...d,autosizeOnMount:!0,autosizeOptions:{...(d==null?void 0:d.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((j=d==null?void 0:d.autosizeOptions)==null?void 0:j.columns)||t.map(M=>M.field)},sx:{border:"none",width:"100%","& .MuiPaper-root":{boxShadow:"none !important"},"& .MuiDataGrid-overlay":{},"& .MuiDataGrid-main":{border:"none","& .MuiPaper-root":{}},"& .MuiDataGrid-container--top [role=row]":{},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important"},"& .MuiDataGrid-row":{cursor:r?"pointer":"default",border:"none",margin:"1px 0",position:"relative",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"action.hover",borderRadius:"16px",zIndex:0}},"&.Mui-selected":{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"}},...w!==null&&{[`&[data-id="${w}"]`]:{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"rgba(255, 255, 255, 0.08) !important",borderRadius:"16px",zIndex:0},"&:hover":{backgroundColor:"transparent !important"},"&:hover::before":{backgroundColor:"rgba(255, 255, 255, 0.12) !important"}}}},"& .MuiDataGrid-cell--textLeft":{paddingLeft:"40px"},"& .MuiDataGrid-cell":{border:"none",position:"relative",zIndex:1,"&:focus":{outline:"none"},"&:focus-within":{outline:"none"},"&:hover":{backgroundColor:"transparent !important"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{},"& .MuiFormControl-root":{},"& .MuiInputBase-root":{},"& .MuiPaper-root":{boxShadow:"none !important"},"& *":{borderBottom:"none !important"}},"& .MuiDataGrid-toolbar":{borderBottom:"none !important"},"& .MuiDataGrid-toolbarFilterList":{border:"none"},"& .MuiDataGrid-withBorderColor":{borderColor:"transparent !important"},"& .MuiDataGrid-columnSeparator":{display:"none"},"& .MuiDataGrid-footerContainer":{display:"none"},"& .MuiDataGrid-filler":{border:"none !important",borderTop:"none !important",borderBottom:"none !important",borderLeft:"none !important",borderRight:"none !important","--rowBorderColor":"none !important"},"& .MuiBackdrop-root":{},"& .MuiModal-backdrop":{},...d==null?void 0:d.sx}})})}));Jp.displayName="WandelbotsDataGrid";const Ce=jh({createStyledComponent:c.styled("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>c.useDefaultProps({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(Ce.propTypes={children:s.node,component:s.elementType,direction:s.oneOfType([s.oneOf(["column-reverse","column","row-reverse","row"]),s.arrayOf(s.oneOf(["column-reverse","column","row-reverse","row"])),s.object]),divider:s.node,spacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),useFlexGap:s.bool});const Ys=c.externalizeComponent(Oe.observer(({colors:e,label:t,getDisplayedValue:n,startJogging:r,stopJogging:o,disabled:i,activeJoggingDirection:a,...l})=>{var v,E,w,S,R,j,M;c.useAnimationFrame(()=>{const I=n(),k=h.current;k&&(k.textContent=I)});const u=c.useTheme(),[d,p]=L.useState(null);L.useEffect(()=>{i&&T()},[i]);const f=a||d,h=L.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const m=f?(v=e.buttonBackgroundColor)==null?void 0:v.pressed:e.borderColor,g={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},y={...g,backgroundColor:(E=e.buttonBackgroundColor)==null?void 0:E.default,":hover":{backgroundColor:(w=e.buttonBackgroundColor)==null?void 0:w.hovered},":active":{backgroundColor:(S=e.buttonBackgroundColor)==null?void 0:S.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(R=e.buttonBackgroundColor)==null?void 0:R.disabled,"svg path":{fill:u.palette.action.disabled}}},x={...g,backgroundColor:(j=e.buttonBackgroundColor)==null?void 0:j.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(M=e.buttonBackgroundColor)==null?void 0:M.pressed,"svg path":{fill:u.palette.action.disabled}}};function b(I,k){i||I.button===0&&(p(k),r(k))}function T(){p(null),o()}return c.jsxRuntimeExports.jsxs(Ce,{height:"64px",direction:"row",justifyContent:"center",...l,children:[c.jsxRuntimeExports.jsx(Ut,{disabled:i,disableRipple:!0,onPointerDown:I=>b(I,"-"),onPointerUp:T,onPointerOut:T,size:"large",sx:{...f==="-"?x:y,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${m??"#fff"}`,borderBottom:`2px solid ${m??"#fff"}`,borderTop:`2px solid ${m??"#fff"}`},children:c.jsxRuntimeExports.jsx(He.ForwardRef$13,{})}),c.jsxRuntimeExports.jsxs(Ce,{spacing:"6px",sx:{width:"150px",backgroundColor:e.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${m??"#fff"}`,borderTop:`2px solid ${m??"#fff"}`},children:[c.jsxRuntimeExports.jsx(Ce,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...i?{color:u.palette.action.disabled}:{}},...i?{"svg path":{fill:u.palette.action.disabled}}:{}},children:t}),c.jsxRuntimeExports.jsx(c.Typography,{height:"22px",sx:{fontSize:"15px",color:i?u.palette.action.disabled:e.color,fontWeight:700,fontVariantNumeric:"tabular-nums",minWidth:"80px",textAlign:"center"},ref:h,children:n()})]}),c.jsxRuntimeExports.jsx(Ut,{disableRipple:!0,disabled:i,onPointerDown:I=>b(I,"+"),onPointerUp:T,onPointerOut:T,size:"large",sx:{...f==="+"?x:y,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${m??"#fff"}`,borderBottom:`2px solid ${m??"#fff"}`,borderTop:`2px solid ${m??"#fff"}`},children:c.jsxRuntimeExports.jsx(He.ForwardRef$14,{})})]})})),ST=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),wT=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),CT={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function RT(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const jT=2;function Bn(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}function Zp(e,t){return e-t}function lu(e,t){const{index:n}=e.reduce((r,o,i)=>{const a=Math.abs(t-o);return r===null||a<r.distance||a===r.distance?{distance:a,index:i}:r},null)??{};return n}function wo(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function ai(e,t,n){return(e-t)*100/(n-t)}function MT(e,t,n){return(n-t)*e+t}function OT(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function IT(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(OT(t)))}function cu({values:e,newValue:t,index:n}){const r=e.slice();return r[n]=t,r.sort(Zp)}function Co({sliderRef:e,activeIndex:t,setActive:n}){var o,i,a;const r=Ve(e.current);(!((o=e.current)!=null&&o.contains(r.activeElement))||Number((i=r==null?void 0:r.activeElement)==null?void 0:i.getAttribute("data-index"))!==t)&&((a=e.current)==null||a.querySelector(`[type="range"][data-index="${t}"]`).focus()),n&&n(t)}function Ro(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?RT(e,t):!1}const PT={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}%`})}},kT=e=>e;let jo;function uu(){return jo===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?jo=CSS.supports("touch-action","none"):jo=!0),jo}function AT(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:o=!1,isRtl:i=!1,marks:a=!1,max:l=100,min:u=0,name:d,onChange:p,onChangeCommitted:f,orientation:h="horizontal",rootRef:m,scale:g=kT,step:y=1,shiftStep:x=10,tabIndex:b,value:T}=e,v=C.useRef(void 0),[E,w]=C.useState(-1),[S,R]=C.useState(-1),[j,M]=C.useState(!1),I=C.useRef(0),k=C.useRef(null),[D,O]=Lo({controlled:T,default:n??u,name:"Slider"}),P=p&&((F,H,J)=>{const ie=F.nativeEvent||F,ge=new ie.constructor(ie.type,ie);Object.defineProperty(ge,"target",{writable:!0,value:{value:H,name:d}}),k.current=H,p(ge,H,J)}),N=Array.isArray(D);let _=N?D.slice().sort(Zp):[D];_=_.map(F=>F==null?u:c.clamp(F,u,l));const z=a===!0&&y!==null?[...Array(Math.floor((l-u)/y)+1)].map((F,H)=>({value:u+y*H})):a||[],B=z.map(F=>F.value),[W,K]=C.useState(-1),$=C.useRef(null),ne=c.useForkRef(m,$),le=F=>H=>{var ie;const J=Number(H.currentTarget.getAttribute("data-index"));c.isFocusVisible(H.target)&&K(J),R(J),(ie=F==null?void 0:F.onFocus)==null||ie.call(F,H)},xe=F=>H=>{var J;c.isFocusVisible(H.target)||K(-1),R(-1),(J=F==null?void 0:F.onBlur)==null||J.call(F,H)},de=(F,H)=>{const J=Number(F.currentTarget.getAttribute("data-index")),ie=_[J],ge=B.indexOf(ie);let ee=H;if(z&&y==null){const Q=B[B.length-1];ee>=Q?ee=Q:ee<=B[0]?ee=B[0]:ee=ee<ie?B[ge-1]:B[ge+1]}if(ee=c.clamp(ee,u,l),N){o&&(ee=c.clamp(ee,_[J-1]||-1/0,_[J+1]||1/0));const Q=ee;ee=cu({values:_,newValue:ee,index:J});let Me=J;o||(Me=ee.indexOf(Q)),Co({sliderRef:$,activeIndex:Me})}O(ee),K(J),P&&!Ro(ee,D)&&P(F,ee,J),f&&f(F,k.current??ee)},pe=F=>H=>{var J;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(H.key)){H.preventDefault();const ie=Number(H.currentTarget.getAttribute("data-index")),ge=_[ie];let ee=null;if(y!=null){const Q=H.shiftKey?x:y;switch(H.key){case"ArrowUp":ee=Bn(ge,Q,1,u,l);break;case"ArrowRight":ee=Bn(ge,Q,i?-1:1,u,l);break;case"ArrowDown":ee=Bn(ge,Q,-1,u,l);break;case"ArrowLeft":ee=Bn(ge,Q,i?1:-1,u,l);break;case"PageUp":ee=Bn(ge,x,1,u,l);break;case"PageDown":ee=Bn(ge,x,-1,u,l);break;case"Home":ee=u;break;case"End":ee=l;break}}else if(z){const Q=B[B.length-1],Me=B.indexOf(ge),ye=[i?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],Se=[i?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];ye.includes(H.key)?Me===0?ee=B[0]:ee=B[Me-1]:Se.includes(H.key)&&(Me===B.length-1?ee=Q:ee=B[Me+1])}ee!=null&&de(H,ee)}(J=F==null?void 0:F.onKeyDown)==null||J.call(F,H)};c.useEnhancedEffect(()=>{var F;r&&$.current.contains(document.activeElement)&&((F=document.activeElement)==null||F.blur())},[r]),r&&E!==-1&&w(-1),r&&W!==-1&&K(-1);const fe=F=>H=>{var J;(J=F.onChange)==null||J.call(F,H),de(H,H.target.valueAsNumber)},he=C.useRef(void 0);let U=h;i&&h==="horizontal"&&(U+="-reverse");const V=({finger:F,move:H=!1})=>{const{current:J}=$,{width:ie,height:ge,bottom:ee,left:Q}=J.getBoundingClientRect();let Me;U.startsWith("vertical")?Me=(ee-F.y)/ge:Me=(F.x-Q)/ie,U.includes("-reverse")&&(Me=1-Me);let ye;if(ye=MT(Me,u,l),y)ye=IT(ye,y,u);else{const qe=lu(B,ye);ye=B[qe]}ye=c.clamp(ye,u,l);let Se=0;if(N){H?Se=he.current:Se=lu(_,ye),o&&(ye=c.clamp(ye,_[Se-1]||-1/0,_[Se+1]||1/0));const qe=ye;ye=cu({values:_,newValue:ye,index:Se}),o&&H||(Se=ye.indexOf(qe),he.current=Se)}return{newValue:ye,activeIndex:Se}},G=c.useEventCallback(F=>{const H=wo(F,v);if(!H)return;if(I.current+=1,F.type==="mousemove"&&F.buttons===0){A(F);return}const{newValue:J,activeIndex:ie}=V({finger:H,move:!0});Co({sliderRef:$,activeIndex:ie,setActive:w}),O(J),!j&&I.current>jT&&M(!0),P&&!Ro(J,D)&&P(F,J,ie)}),A=c.useEventCallback(F=>{const H=wo(F,v);if(M(!1),!H)return;const{newValue:J}=V({finger:H,move:!0});w(-1),F.type==="touchend"&&R(-1),f&&f(F,k.current??J),v.current=void 0,q()}),Z=c.useEventCallback(F=>{if(r)return;uu()||F.preventDefault();const H=F.changedTouches[0];H!=null&&(v.current=H.identifier);const J=wo(F,v);if(J!==!1){const{newValue:ge,activeIndex:ee}=V({finger:J});Co({sliderRef:$,activeIndex:ee,setActive:w}),O(ge),P&&!Ro(ge,D)&&P(F,ge,ee)}I.current=0;const ie=Ve($.current);ie.addEventListener("touchmove",G,{passive:!0}),ie.addEventListener("touchend",A,{passive:!0})}),q=C.useCallback(()=>{const F=Ve($.current);F.removeEventListener("mousemove",G),F.removeEventListener("mouseup",A),F.removeEventListener("touchmove",G),F.removeEventListener("touchend",A)},[A,G]);C.useEffect(()=>{const{current:F}=$;return F.addEventListener("touchstart",Z,{passive:uu()}),()=>{F.removeEventListener("touchstart",Z),q()}},[q,Z]),C.useEffect(()=>{r&&q()},[r,q]);const oe=F=>H=>{var ge;if((ge=F.onMouseDown)==null||ge.call(F,H),r||H.defaultPrevented||H.button!==0)return;H.preventDefault();const J=wo(H,v);if(J!==!1){const{newValue:ee,activeIndex:Q}=V({finger:J});Co({sliderRef:$,activeIndex:Q,setActive:w}),O(ee),P&&!Ro(ee,D)&&P(H,ee,Q)}I.current=0;const ie=Ve($.current);ie.addEventListener("mousemove",G,{passive:!0}),ie.addEventListener("mouseup",A)},me=ai(N?_[0]:u,u,l),ae=ai(_[_.length-1],u,l)-me,ve=(F={})=>{const H=c.extractEventHandlers(F),J={onMouseDown:oe(H||{})},ie={...H,...J};return{...F,ref:ne,...ie}},Re=F=>H=>{var ie;(ie=F.onMouseOver)==null||ie.call(F,H);const J=Number(H.currentTarget.getAttribute("data-index"));R(J)},ke=F=>H=>{var J;(J=F.onMouseLeave)==null||J.call(F,H),R(-1)},Ee=(F={})=>{const H=c.extractEventHandlers(F),J={onMouseOver:Re(H||{}),onMouseLeave:ke(H||{})};return{...F,...H,...J}},Ue=F=>({pointerEvents:E!==-1&&E!==F?"none":void 0});let ze;return h==="vertical"&&(ze=i?"vertical-rl":"vertical-lr"),{active:E,axis:U,axisProps:PT,dragging:j,focusedThumbIndex:W,getHiddenInputProps:(F={})=>{const H=c.extractEventHandlers(F),J={onChange:fe(H||{}),onFocus:le(H||{}),onBlur:xe(H||{}),onKeyDown:pe(H||{})},ie={...H,...J};return{tabIndex:b,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":g(l),"aria-valuemin":g(u),name:d,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:r,...F,...ie,style:{...CT,direction:i?"rtl":"ltr",width:"100%",height:"100%",writingMode:ze}}},getRootProps:ve,getThumbProps:Ee,marks:z,open:S,range:N,rootRef:ne,trackLeap:ae,trackOffset:me,values:_,getThumbStyle:Ue}}const _T=e=>!e||!c.isHostComponent(e);function DT(e){return c.generateUtilityClass("MuiSlider",e)}const dt=c.generateUtilityClasses("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"]),NT=e=>{const{open:t}=e;return{offset:c.clsx(t&&dt.valueLabelOpen),circle:dt.valueLabelCircle,label:dt.valueLabelLabel}};function Qp(e){const{children:t,className:n,value:r}=e,o=NT(e);return t?C.cloneElement(t,{className:t.props.className},c.jsxRuntimeExports.jsxs(C.Fragment,{children:[t.props.children,c.jsxRuntimeExports.jsx("span",{className:c.clsx(o.offset,n),"aria-hidden":!0,children:c.jsxRuntimeExports.jsx("span",{className:o.circle,children:c.jsxRuntimeExports.jsx("span",{className:o.label,children:r})})})]})):null}process.env.NODE_ENV!=="production"&&(Qp.propTypes={children:s.element.isRequired,className:s.string,value:s.node});function du(e){return e}const $T=c.styled("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${c.capitalize(n.color)}`],n.size!=="medium"&&t[`size${c.capitalize(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(c.memoTheme(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${dt.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${dt.dragging}`]:{[`& .${dt.thumb}, & .${dt.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter()).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}}]}))),zT=c.styled("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}}]}),LT=c.styled("span",{name:"MuiSlider",slot:"Track"})(c.memoTheme(({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(c.createSimplePaletteValueFilter()).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:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),FT=c.styled("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${c.capitalize(n.color)}`],n.size!=="medium"&&t[`thumbSize${c.capitalize(n.size)}`]]}})(c.memoTheme(({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%)"},[`&.${dt.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(c.createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${dt.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${dt.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),ef=c.styled(Qp,{name:"MuiSlider",slot:"ValueLabel"})(c.memoTheme(({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%"},[`&.${dt.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%"},[`&.${dt.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"&&(ef.propTypes={children:s.element.isRequired,index:s.number.isRequired,open:s.bool.isRequired,value:s.node});const BT=c.styled("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>c.slotShouldForwardProp(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(c.memoTheme(({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}}]}))),UT=c.styled("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>c.slotShouldForwardProp(e)&&e!=="markLabelActive"})(c.memoTheme(({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}}]}))),VT=e=>{const{disabled:t,dragging:n,marked:r,orientation:o,track:i,classes:a,color:l,size:u}=e,d={root:["root",t&&"disabled",n&&"dragging",r&&"marked",o==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",l&&`color${c.capitalize(l)}`,u&&`size${c.capitalize(u)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",u&&`thumbSize${c.capitalize(u)}`,l&&`thumbColor${c.capitalize(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return c.composeClasses(d,DT,a)},WT=({children:e})=>e,ol=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiSlider"}),o=sr(),{"aria-label":i,"aria-valuetext":a,"aria-labelledby":l,component:u="span",components:d={},componentsProps:p={},color:f="primary",classes:h,className:m,disableSwap:g=!1,disabled:y=!1,getAriaLabel:x,getAriaValueText:b,marks:T=!1,max:v=100,min:E=0,name:w,onChange:S,onChangeCommitted:R,orientation:j="horizontal",shiftStep:M=10,size:I="medium",step:k=1,scale:D=du,slotProps:O,slots:P,tabIndex:N,track:_="normal",value:z,valueLabelDisplay:B="off",valueLabelFormat:W=du,...K}=r,$={...r,isRtl:o,max:v,min:E,classes:h,disabled:y,disableSwap:g,orientation:j,marks:T,color:f,size:I,step:k,shiftStep:M,scale:D,track:_,valueLabelDisplay:B,valueLabelFormat:W},{axisProps:ne,getRootProps:le,getHiddenInputProps:xe,getThumbProps:de,open:pe,active:fe,axis:he,focusedThumbIndex:U,range:V,dragging:G,marks:A,values:Z,trackOffset:q,trackLeap:oe,getThumbStyle:me}=AT({...$,rootRef:n});$.marked=A.length>0&&A.some(Y=>Y.label),$.dragging=G,$.focusedThumbIndex=U;const ae=VT($),ve=(P==null?void 0:P.root)??d.Root??$T,Re=(P==null?void 0:P.rail)??d.Rail??zT,ke=(P==null?void 0:P.track)??d.Track??LT,Ee=(P==null?void 0:P.thumb)??d.Thumb??FT,Ue=(P==null?void 0:P.valueLabel)??d.ValueLabel??ef,ze=(P==null?void 0:P.mark)??d.Mark??BT,je=(P==null?void 0:P.markLabel)??d.MarkLabel??UT,F=(P==null?void 0:P.input)??d.Input??"input",H=(O==null?void 0:O.root)??p.root,J=(O==null?void 0:O.rail)??p.rail,ie=(O==null?void 0:O.track)??p.track,ge=(O==null?void 0:O.thumb)??p.thumb,ee=(O==null?void 0:O.valueLabel)??p.valueLabel,Q=(O==null?void 0:O.mark)??p.mark,Me=(O==null?void 0:O.markLabel)??p.markLabel,ye=(O==null?void 0:O.input)??p.input,Se=et({elementType:ve,getSlotProps:le,externalSlotProps:H,externalForwardedProps:K,additionalProps:{..._T(ve)&&{as:u}},ownerState:{...$,...H==null?void 0:H.ownerState},className:[ae.root,m]}),qe=et({elementType:Re,externalSlotProps:J,ownerState:$,className:ae.rail}),$t=et({elementType:ke,externalSlotProps:ie,additionalProps:{style:{...ne[he].offset(q),...ne[he].leap(oe)}},ownerState:{...$,...ie==null?void 0:ie.ownerState},className:ae.track}),Tt=et({elementType:Ee,getSlotProps:de,externalSlotProps:ge,ownerState:{...$,...ge==null?void 0:ge.ownerState},className:ae.thumb}),at=et({elementType:Ue,externalSlotProps:ee,ownerState:{...$,...ee==null?void 0:ee.ownerState},className:ae.valueLabel}),ot=et({elementType:ze,externalSlotProps:Q,ownerState:$,className:ae.mark}),St=et({elementType:je,externalSlotProps:Me,ownerState:$,className:ae.markLabel}),Jt=et({elementType:F,getSlotProps:xe,externalSlotProps:ye,ownerState:$});return c.jsxRuntimeExports.jsxs(ve,{...Se,children:[c.jsxRuntimeExports.jsx(Re,{...qe}),c.jsxRuntimeExports.jsx(ke,{...$t}),A.filter(Y=>Y.value>=E&&Y.value<=v).map((Y,re)=>{const Ae=ai(Y.value,E,v),Xe=ne[he].offset(Ae);let Ye;return _===!1?Ye=Z.includes(Y.value):Ye=_==="normal"&&(V?Y.value>=Z[0]&&Y.value<=Z[Z.length-1]:Y.value<=Z[0])||_==="inverted"&&(V?Y.value<=Z[0]||Y.value>=Z[Z.length-1]:Y.value>=Z[0]),c.jsxRuntimeExports.jsxs(C.Fragment,{children:[c.jsxRuntimeExports.jsx(ze,{"data-index":re,...ot,...!c.isHostComponent(ze)&&{markActive:Ye},style:{...Xe,...ot.style},className:c.clsx(ot.className,Ye&&ae.markActive)}),Y.label!=null?c.jsxRuntimeExports.jsx(je,{"aria-hidden":!0,"data-index":re,...St,...!c.isHostComponent(je)&&{markLabelActive:Ye},style:{...Xe,...St.style},className:c.clsx(ae.markLabel,St.className,Ye&&ae.markLabelActive),children:Y.label}):null]},re)}),Z.map((Y,re)=>{const Ae=ai(Y,E,v),Xe=ne[he].offset(Ae),Ye=B==="off"?WT:Ue;return c.jsxRuntimeExports.jsx(Ye,{...!c.isHostComponent(Ye)&&{valueLabelFormat:W,valueLabelDisplay:B,value:typeof W=="function"?W(D(Y),re):W,index:re,open:pe===re||fe===re||B==="on",disabled:y},...at,children:c.jsxRuntimeExports.jsx(Ee,{"data-index":re,...Tt,className:c.clsx(ae.thumb,Tt.className,fe===re&&ae.active,U===re&&ae.focusVisible),style:{...Xe,...me(re),...Tt.style},children:c.jsxRuntimeExports.jsx(F,{"data-index":re,"aria-label":x?x(re):i,"aria-valuenow":D(Y),"aria-labelledby":l,"aria-valuetext":b?b(D(Y),re):a,value:Z[re],...Jt})})},re)})]})});process.env.NODE_ENV!=="production"&&(ol.propTypes={"aria-label":c.chainPropTypes(s.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":s.string,"aria-valuetext":c.chainPropTypes(s.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:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),components:s.shape({Input:s.elementType,Mark:s.elementType,MarkLabel:s.elementType,Rail:s.elementType,Root:s.elementType,Thumb:s.elementType,Track:s.elementType,ValueLabel:s.elementType}),componentsProps:s.shape({input:s.oneOfType([s.func,s.object]),mark:s.oneOfType([s.func,s.object]),markLabel:s.oneOfType([s.func,s.object]),rail:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),thumb:s.oneOfType([s.func,s.object]),track:s.oneOfType([s.func,s.object]),valueLabel:s.oneOfType([s.func,s.shape({children:s.element,className:s.string,open:s.bool,style:s.object,value:s.node,valueLabelDisplay:s.oneOf(["auto","off","on"])})])}),defaultValue:s.oneOfType([s.arrayOf(s.number),s.number]),disabled:s.bool,disableSwap:s.bool,getAriaLabel:s.func,getAriaValueText:s.func,marks:s.oneOfType([s.arrayOf(s.shape({label:s.node,value:s.number.isRequired})),s.bool]),max:s.number,min:s.number,name:s.string,onChange:s.func,onChangeCommitted:s.func,orientation:s.oneOf(["horizontal","vertical"]),scale:s.func,shiftStep:s.number,size:s.oneOfType([s.oneOf(["small","medium"]),s.string]),slotProps:s.shape({input:s.oneOfType([s.func,s.object]),mark:s.oneOfType([s.func,s.object]),markLabel:s.oneOfType([s.func,s.object]),rail:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),thumb:s.oneOfType([s.func,s.object]),track:s.oneOfType([s.func,s.object]),valueLabel:s.oneOfType([s.func,s.shape({children:s.element,className:s.string,open:s.bool,style:s.object,value:s.node,valueLabelDisplay:s.oneOf(["auto","off","on"])})])}),slots:s.shape({input:s.elementType,mark:s.elementType,markLabel:s.elementType,rail:s.elementType,root:s.elementType,thumb:s.elementType,track:s.elementType,valueLabel:s.elementType}),step:s.number,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,track:s.oneOf(["inverted","normal",!1]),value:s.oneOfType([s.arrayOf(s.number),s.number]),valueLabelDisplay:s.oneOf(["auto","off","on"]),valueLabelFormat:s.oneOfType([s.func,s.string])});function jn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var tf=typeof global=="object"&&global&&global.Object===Object&&global,GT=typeof self=="object"&&self&&self.Object===Object&&self,Nt=tf||GT||Function("return this")(),Ss=function(){return Nt.Date.now()},HT=/\s/;function qT(e){for(var t=e.length;t--&&HT.test(e.charAt(t)););return t}var YT=/^\s+/;function KT(e){return e&&e.slice(0,qT(e)+1).replace(YT,"")}var nn=Nt.Symbol,nf=Object.prototype,XT=nf.hasOwnProperty,JT=nf.toString,br=nn?nn.toStringTag:void 0;function ZT(e){var t=XT.call(e,br),n=e[br];try{e[br]=void 0;var r=!0}catch{}var o=JT.call(e);return r&&(t?e[br]=n:delete e[br]),o}var QT=Object.prototype,e1=QT.toString;function t1(e){return e1.call(e)}var n1="[object Null]",r1="[object Undefined]",pu=nn?nn.toStringTag:void 0;function _n(e){return e==null?e===void 0?r1:n1:pu&&pu in Object(e)?ZT(e):t1(e)}function Mn(e){return e!=null&&typeof e=="object"}var o1="[object Symbol]";function zi(e){return typeof e=="symbol"||Mn(e)&&_n(e)==o1}var fu=NaN,i1=/^[-+]0x[0-9a-f]+$/i,s1=/^0b[01]+$/i,a1=/^0o[0-7]+$/i,l1=parseInt;function hu(e){if(typeof e=="number")return e;if(zi(e))return fu;if(jn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=jn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=KT(e);var n=s1.test(e);return n||a1.test(e)?l1(e.slice(2),n?2:8):i1.test(e)?fu:+e}var c1="Expected a function",u1=Math.max,d1=Math.min;function p1(e,t,n){var r,o,i,a,l,u,d=0,p=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(c1);t=hu(t)||0,jn(n)&&(p=!!n.leading,f="maxWait"in n,i=f?u1(hu(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function m(S){var R=r,j=o;return r=o=void 0,d=S,a=e.apply(j,R),a}function g(S){return d=S,l=setTimeout(b,t),p?m(S):a}function y(S){var R=S-u,j=S-d,M=t-R;return f?d1(M,i-j):M}function x(S){var R=S-u,j=S-d;return u===void 0||R>=t||R<0||f&&j>=i}function b(){var S=Ss();if(x(S))return T(S);l=setTimeout(b,y(S))}function T(S){return l=void 0,h&&r?m(S):(r=o=void 0,a)}function v(){l!==void 0&&clearTimeout(l),d=0,r=u=o=l=void 0}function E(){return l===void 0?a:T(Ss())}function w(){var S=Ss(),R=x(S);if(r=arguments,o=this,u=S,R){if(l===void 0)return g(u);if(f)return clearTimeout(l),l=setTimeout(b,t),m(u)}return l===void 0&&(l=setTimeout(b,t)),a}return w.cancel=v,w.flush=E,w}var f1="Expected a function";function h1(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(f1);return jn(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),p1(e,t,{leading:r,maxWait:t,trailing:o})}const rf=c.externalizeComponent(Oe.observer(({startJogging:e,stopJogging:t,lowerLimit:n,upperLimit:r,useDegree:o,getValue:i,disabled:a,...l})=>{var S,R,j,M,I,k,D,O,P,N,_,z,B,W,K;const{t:u}=Pe.useTranslation(),[d,p]=L.useState(),f=c.useTheme(),h={background:(S=f.palette.backgroundPaperElevation)==null?void 0:S[4],color:(R=f.palette.backgroundPaperElevation)==null?void 0:R[11]},m=Oe.useLocalObservable(()=>({activeJoggingDir:null,startJogging($){this.activeJoggingDir=$,e($)},stopJogging(){this.activeJoggingDir=null,t()}})),g=h1(()=>{const $=o?y(i()):i();($===void 0||d===void 0||Math.abs(d-$)>1e-9)&&p($)},50);c.useAnimationFrame(g);function y($){if($!==void 0)return Ge.radiansToDegrees($)}function x($){$.button===0&&m.startJogging("-")}function b($){$.button===0&&m.startJogging("+")}function T($){m.stopJogging()}function v($){m.stopJogging()}function E($,ne=1){if($===void 0||Number.isNaN($))return"";const le=u("General.degree.variable",{amount:$.toFixed(ne)});return $>0&&ne===0?`+${le}`:le}function w($,ne=1){if($===void 0||Number.isNaN($))return"";const le=u("General.mm.variable",{amount:$.toFixed(ne)});return $>0&&ne===0?`+${le}`:le}return c.jsxRuntimeExports.jsxs(Ce,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...l,sx:{"& .MuiIconButton-root":{width:"52px",color:f.palette.text.primary,alignContent:"center",backgroundColor:(j=f.palette.backgroundPaperElevation)==null?void 0:j[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(M=f.palette.backgroundPaperElevation)==null?void 0:M[11],color:f.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(I=f.palette.backgroundPaperElevation)==null?void 0:I[9]},"&:active":{...h}}},children:[c.jsxRuntimeExports.jsx(Ut,{onPointerDown:x,onPointerUp:T,onPointerOut:v,disabled:a,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...m.activeJoggingDir==="-"?h:{}},children:c.jsxRuntimeExports.jsx(ST,{sx:{pointerEvents:"none",color:(P=(O=(D=(k=f.componentsExt)==null?void 0:k.JoggingPanel)==null?void 0:D.JoggingJoint)==null?void 0:O.Joint)==null?void 0:P.arrowColor}})}),c.jsxRuntimeExports.jsxs(Ce,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(N=f.palette.backgroundPaperElevation)==null?void 0:N[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[c.jsxRuntimeExports.jsx(c.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",fontVariantNumeric:"tabular-nums",minWidth:"80px",textAlign:"center",color:a?f.palette.action.disabled:f.palette.text.primary},children:o?E(d):w(d)}),c.jsxRuntimeExports.jsx(ol,{disabled:!0,"aria-label":"Joint position",min:o?y(n):n,max:o?y(r):r,value:d||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:a?f.palette.action.disabled:f.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:a?f.palette.action.disabled:f.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(_=f.palette.backgroundPaperElevation)==null?void 0:_[5],opacity:1}},marks:n!==void 0&&r!==void 0&&[{value:o?y(n):n,label:o?E(y(n),0):w(n)},{value:o?y(r):r,label:o?E(y(r),0):w(r)}]})]}),c.jsxRuntimeExports.jsx(Ut,{onPointerDown:b,onPointerUp:T,onPointerOut:v,disabled:a,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...m.activeJoggingDir==="+"?h:{}},children:c.jsxRuntimeExports.jsx(wT,{sx:{pointerEvents:"none",color:(K=(W=(B=(z=f.componentsExt)==null?void 0:z.JoggingPanel)==null?void 0:B.JoggingJoint)==null?void 0:W.Joint)==null?void 0:K.arrowColor}})})]})})),m1=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M10 9h4V6h3l-5-5-5 5h3zm-1 1H6V7l-5 5 5 5v-3h3zm14 2-5-5v3h-3v4h3v3zm-9 3h-4v3H7l5 5 5-5h-3z"}),"OpenWith"),g1=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92"}),"Share");function x1(e){return c.generateUtilityClass("MuiTab",e)}const lt=c.generateUtilityClasses("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),y1=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:l,disabled:u}=e,d={root:["root",i&&a&&"labelIcon",`textColor${c.capitalize(n)}`,r&&"fullWidth",o&&"wrapped",l&&"selected",u&&"disabled"],icon:["iconWrapper","icon"]};return c.composeClasses(d,x1,t)},b1=c.styled(c.ButtonBase,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${c.capitalize(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${lt.iconWrapper}`]:t.iconWrapper},{[`& .${lt.icon}`]:t.icon}]}})(c.memoTheme(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${lt.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${lt.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${lt.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${lt.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${lt.selected}`]:{opacity:1},[`&.${lt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${lt.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${lt.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${lt.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${lt.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),il=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:l,icon:u,iconPosition:d="top",indicator:p,label:f,onChange:h,onClick:m,onFocus:g,selected:y,selectionFollowsFocus:x,textColor:b="inherit",value:T,wrapped:v=!1,...E}=r,w={...r,disabled:i,disableFocusRipple:a,selected:y,icon:!!u,iconPosition:d,label:!!f,fullWidth:l,textColor:b,wrapped:v},S=y1(w),R=u&&f&&C.isValidElement(u)?C.cloneElement(u,{className:c.clsx(S.icon,u.props.className)}):u,j=I=>{!y&&h&&h(I,T),m&&m(I)},M=I=>{x&&!y&&h&&h(I,T),g&&g(I)};return c.jsxRuntimeExports.jsxs(b1,{focusRipple:!a,className:c.clsx(S.root,o),ref:n,role:"tab","aria-selected":y,disabled:i,onClick:j,onFocus:M,ownerState:w,tabIndex:y?0:-1,...E,children:[d==="top"||d==="start"?c.jsxRuntimeExports.jsxs(C.Fragment,{children:[R,f]}):c.jsxRuntimeExports.jsxs(C.Fragment,{children:[f,R]}),p]})});process.env.NODE_ENV!=="production"&&(il.propTypes={children:c.unsupportedProp,classes:s.object,className:s.string,disabled:s.bool,disableFocusRipple:s.bool,disableRipple:s.bool,icon:s.oneOfType([s.element,s.string]),iconPosition:s.oneOf(["bottom","end","start","top"]),label:s.node,onChange:s.func,onClick:s.func,onFocus:s.func,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.any,wrapped:s.bool});function v1(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function E1(e,t,n,r={},o=()=>{}){const{ease:i=v1,duration:a=300}=r;let l=null;const u=t[e];let d=!1;const p=()=>{d=!0},f=h=>{if(d){o(new Error("Animation cancelled"));return}l===null&&(l=h);const m=Math.min(1,(h-l)/a);if(t[e]=i(m)*(n-u)+u,m>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(f)};return u===n?(o(new Error("Element already at target position")),p):(requestAnimationFrame(f),p)}const T1={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function of(e){const{onChange:t,...n}=e,r=C.useRef(),o=C.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return c.useEnhancedEffect(()=>{const a=fi(()=>{const u=r.current;i(),u!==r.current&&t(r.current)}),l=ht(o.current);return l.addEventListener("resize",a),()=>{a.clear(),l.removeEventListener("resize",a)}},[t]),C.useEffect(()=>{i(),t(r.current)},[t]),c.jsxRuntimeExports.jsx("div",{style:T1,...n,ref:o})}process.env.NODE_ENV!=="production"&&(of.propTypes={onChange:s.func.isRequired});const S1=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),w1=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function C1(e){return c.generateUtilityClass("MuiTabScrollButton",e)}const R1=c.generateUtilityClasses("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),j1=e=>{const{classes:t,orientation:n,disabled:r}=e,o={root:["root",n,r&&"disabled"]};return c.composeClasses(o,C1,t)},M1=c.styled(c.ButtonBase,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${R1.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),sf=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:a={},direction:l,orientation:u,disabled:d,...p}=r,f=sr(),h={isRtl:f,...r},m=j1(h),g=i.StartScrollButtonIcon??S1,y=i.EndScrollButtonIcon??w1,x=et({elementType:g,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),b=et({elementType:y,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return c.jsxRuntimeExports.jsx(M1,{component:"div",className:c.clsx(m.root,o),ref:n,role:null,ownerState:h,tabIndex:null,...p,style:{...p.style,...u==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:l==="left"?c.jsxRuntimeExports.jsx(g,{...x}):c.jsxRuntimeExports.jsx(y,{...b})})});process.env.NODE_ENV!=="production"&&(sf.propTypes={children:s.node,classes:s.object,className:s.string,direction:s.oneOf(["left","right"]).isRequired,disabled:s.bool,orientation:s.oneOf(["horizontal","vertical"]).isRequired,slotProps:s.shape({endScrollButtonIcon:s.oneOfType([s.func,s.object]),startScrollButtonIcon:s.oneOfType([s.func,s.object])}),slots:s.shape({EndScrollButtonIcon:s.elementType,StartScrollButtonIcon:s.elementType}),style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function O1(e){return c.generateUtilityClass("MuiTabs",e)}const ws=c.generateUtilityClasses("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),mu=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,gu=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Mo=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},I1=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:l,classes:u}=e,d={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return c.composeClasses(d,O1,u)},P1=c.styled("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ws.scrollButtons}`]:t.scrollButtons},{[`& .${ws.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(c.memoTheme(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${ws.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),k1=c.styled("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),A1=c.styled("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),_1=c.styled("span",{name:"MuiTabs",slot:"Indicator"})(c.memoTheme(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),D1=c.styled(of)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),xu={};let yu=!1;const sl=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiTabs"}),o=c.useTheme(),i=sr(),{"aria-label":a,"aria-labelledby":l,action:u,centered:d=!1,children:p,className:f,component:h="div",allowScrollButtonsMobile:m=!1,indicatorColor:g="primary",onChange:y,orientation:x="horizontal",ScrollButtonComponent:b,scrollButtons:T="auto",selectionFollowsFocus:v,slots:E={},slotProps:w={},TabIndicatorProps:S={},TabScrollButtonProps:R={},textColor:j="primary",value:M,variant:I="standard",visibleScrollbar:k=!1,...D}=r,O=I==="scrollable",P=x==="vertical",N=P?"scrollTop":"scrollLeft",_=P?"top":"left",z=P?"bottom":"right",B=P?"clientHeight":"clientWidth",W=P?"height":"width",K={...r,component:h,allowScrollButtonsMobile:m,indicatorColor:g,orientation:x,vertical:P,scrollButtons:T,textColor:j,variant:I,visibleScrollbar:k,fixed:!O,hideScrollbar:O&&!k,scrollableX:O&&!P,scrollableY:O&&P,centered:d&&!O,scrollButtonsHideMobile:!m},$=I1(K),ne=et({elementType:E.StartScrollButtonIcon,externalSlotProps:w.startScrollButtonIcon,ownerState:K}),le=et({elementType:E.EndScrollButtonIcon,externalSlotProps:w.endScrollButtonIcon,ownerState:K});process.env.NODE_ENV!=="production"&&d&&O&&console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');const[xe,de]=C.useState(!1),[pe,fe]=C.useState(xu),[he,U]=C.useState(!1),[V,G]=C.useState(!1),[A,Z]=C.useState(!1),[q,oe]=C.useState({overflow:"hidden",scrollbarWidth:0}),me=new Map,ae=C.useRef(null),ve=C.useRef(null),Re={slots:E,slotProps:{indicator:S,scrollButtons:R,...w}},ke=()=>{const X=ae.current;let te;if(X){const we=X.getBoundingClientRect();te={clientWidth:X.clientWidth,scrollLeft:X.scrollLeft,scrollTop:X.scrollTop,scrollWidth:X.scrollWidth,top:we.top,bottom:we.bottom,left:we.left,right:we.right}}let be;if(X&&M!==!1){const we=ve.current.children;if(we.length>0){const Ne=we[me.get(M)];process.env.NODE_ENV!=="production"&&(Ne||console.error(["MUI: The `value` provided to the Tabs component is invalid.",`None of the Tabs' children match with "${M}".`,me.keys?`You can provide one of the following values: ${Array.from(me.keys()).join(", ")}.`:null].join(`
|
|
65
|
-
`))),be=Ne?Ne.getBoundingClientRect():null,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&!yu&&be&&be.width===0&&be.height===0&&te.clientWidth!==0&&(te=null,console.error(["MUI: The `value` provided to the Tabs component is invalid.",`The Tab with this \`value\` ("${M}") is not part of the document layout.`,"Make sure the tab item is present in the document or that it's not `display: none`."].join(`
|
|
66
|
-
`)),yu=!0)}}return{tabsMeta:te,tabMeta:be}},Ee=c.useEventCallback(()=>{const{tabsMeta:X,tabMeta:te}=ke();let be=0,we;P?(we="top",te&&X&&(be=te.top-X.top+X.scrollTop)):(we=i?"right":"left",te&&X&&(be=(i?-1:1)*(te[we]-X[we]+X.scrollLeft)));const Ne={[we]:be,[W]:te?te[W]:0};if(typeof pe[we]!="number"||typeof pe[W]!="number")fe(Ne);else{const wt=Math.abs(pe[we]-Ne[we]),pn=Math.abs(pe[W]-Ne[W]);(wt>=1||pn>=1)&&fe(Ne)}}),Ue=(X,{animation:te=!0}={})=>{te?E1(N,ae.current,X,{duration:o.transitions.duration.standard}):ae.current[N]=X},ze=X=>{let te=ae.current[N];P?te+=X:te+=X*(i?-1:1),Ue(te)},je=()=>{const X=ae.current[B];let te=0;const be=Array.from(ve.current.children);for(let we=0;we<be.length;we+=1){const Ne=be[we];if(te+Ne[B]>X){we===0&&(te=X);break}te+=Ne[B]}return te},F=()=>{ze(-1*je())},H=()=>{ze(je())},[J,{onChange:ie,...ge}]=c.useSlot("scrollbar",{className:c.clsx($.scrollableX,$.hideScrollbar),elementType:D1,shouldForwardComponentProp:!0,externalForwardedProps:Re,ownerState:K}),ee=C.useCallback(X=>{ie==null||ie(X),oe({overflow:null,scrollbarWidth:X})},[ie]),[Q,Me]=c.useSlot("scrollButtons",{className:c.clsx($.scrollButtons,R.className),elementType:sf,externalForwardedProps:Re,ownerState:K,additionalProps:{orientation:x,slots:{StartScrollButtonIcon:E.startScrollButtonIcon||E.StartScrollButtonIcon,EndScrollButtonIcon:E.endScrollButtonIcon||E.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:ne,endScrollButtonIcon:le}}}),ye=()=>{const X={};X.scrollbarSizeListener=O?c.jsxRuntimeExports.jsx(J,{...ge,onChange:ee}):null;const be=O&&(T==="auto"&&(he||V)||T===!0);return X.scrollButtonStart=be?c.jsxRuntimeExports.jsx(Q,{direction:i?"right":"left",onClick:F,disabled:!he,...Me}):null,X.scrollButtonEnd=be?c.jsxRuntimeExports.jsx(Q,{direction:i?"left":"right",onClick:H,disabled:!V,...Me}):null,X},Se=c.useEventCallback(X=>{const{tabsMeta:te,tabMeta:be}=ke();if(!(!be||!te)){if(be[_]<te[_]){const we=te[N]+(be[_]-te[_]);Ue(we,{animation:X})}else if(be[z]>te[z]){const we=te[N]+(be[z]-te[z]);Ue(we,{animation:X})}}}),qe=c.useEventCallback(()=>{O&&T!==!1&&Z(!A)});C.useEffect(()=>{const X=fi(()=>{ae.current&&Ee()});let te;const be=wt=>{wt.forEach(pn=>{pn.removedNodes.forEach(pr=>{te==null||te.unobserve(pr)}),pn.addedNodes.forEach(pr=>{te==null||te.observe(pr)})}),X(),qe()},we=ht(ae.current);we.addEventListener("resize",X);let Ne;return typeof ResizeObserver<"u"&&(te=new ResizeObserver(X),Array.from(ve.current.children).forEach(wt=>{te.observe(wt)})),typeof MutationObserver<"u"&&(Ne=new MutationObserver(be),Ne.observe(ve.current,{childList:!0})),()=>{X.clear(),we.removeEventListener("resize",X),Ne==null||Ne.disconnect(),te==null||te.disconnect()}},[Ee,qe]),C.useEffect(()=>{const X=Array.from(ve.current.children),te=X.length;if(typeof IntersectionObserver<"u"&&te>0&&O&&T!==!1){const be=X[0],we=X[te-1],Ne={root:ae.current,threshold:.99},wt=es=>{U(!es[0].isIntersecting)},pn=new IntersectionObserver(wt,Ne);pn.observe(be);const pr=es=>{G(!es[0].isIntersecting)},kl=new IntersectionObserver(pr,Ne);return kl.observe(we),()=>{pn.disconnect(),kl.disconnect()}}},[O,T,A,p==null?void 0:p.length]),C.useEffect(()=>{de(!0)},[]),C.useEffect(()=>{Ee()}),C.useEffect(()=>{Se(xu!==pe)},[Se,pe]),C.useImperativeHandle(u,()=>({updateIndicator:Ee,updateScrollButtons:qe}),[Ee,qe]);const[$t,Tt]=c.useSlot("indicator",{className:c.clsx($.indicator,S.className),elementType:_1,externalForwardedProps:Re,ownerState:K,additionalProps:{style:pe}}),at=c.jsxRuntimeExports.jsx($t,{...Tt});let ot=0;const St=C.Children.map(p,X=>{if(!C.isValidElement(X))return null;process.env.NODE_ENV!=="production"&&c.reactIsExports.isFragment(X)&&console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
67
|
-
`));const te=X.props.value===void 0?ot:X.props.value;me.set(te,ot);const be=te===M;return ot+=1,C.cloneElement(X,{fullWidth:I==="fullWidth",indicator:be&&!xe&&at,selected:be,selectionFollowsFocus:v,onChange:y,textColor:j,value:te,...ot===1&&M===!1&&!X.props.tabIndex?{tabIndex:0}:{}})}),Jt=X=>{if(X.altKey||X.shiftKey||X.ctrlKey||X.metaKey)return;const te=ve.current,be=Vn(Ve(te));if((be==null?void 0:be.getAttribute("role"))!=="tab")return;let Ne=x==="horizontal"?"ArrowLeft":"ArrowUp",wt=x==="horizontal"?"ArrowRight":"ArrowDown";switch(x==="horizontal"&&i&&(Ne="ArrowRight",wt="ArrowLeft"),X.key){case Ne:X.preventDefault(),Mo(te,be,gu);break;case wt:X.preventDefault(),Mo(te,be,mu);break;case"Home":X.preventDefault(),Mo(te,null,mu);break;case"End":X.preventDefault(),Mo(te,null,gu);break}},Y=ye(),[re,Ae]=c.useSlot("root",{ref:n,className:c.clsx($.root,f),elementType:P1,externalForwardedProps:{...Re,...D,component:h},ownerState:K}),[Xe,Ye]=c.useSlot("scroller",{ref:ae,className:$.scroller,elementType:k1,externalForwardedProps:Re,ownerState:K,additionalProps:{style:{overflow:q.overflow,[P?`margin${i?"Left":"Right"}`:"marginBottom"]:k?void 0:-q.scrollbarWidth}}}),[ce,it]=c.useSlot("list",{ref:ve,className:c.clsx($.list,$.flexContainer),elementType:A1,externalForwardedProps:Re,ownerState:K,getSlotProps:X=>({...X,onKeyDown:te=>{var be;Jt(te),(be=X.onKeyDown)==null||be.call(X,te)}})});return c.jsxRuntimeExports.jsxs(re,{...Ae,children:[Y.scrollButtonStart,Y.scrollbarSizeListener,c.jsxRuntimeExports.jsxs(Xe,{...Ye,children:[c.jsxRuntimeExports.jsx(ce,{"aria-label":a,"aria-labelledby":l,"aria-orientation":x==="vertical"?"vertical":null,role:"tablist",...it,children:St}),xe&&at]}),Y.scrollButtonEnd]})});process.env.NODE_ENV!=="production"&&(sl.propTypes={action:c.refType,allowScrollButtonsMobile:s.bool,"aria-label":s.string,"aria-labelledby":s.string,centered:s.bool,children:s.node,classes:s.object,className:s.string,component:s.elementType,indicatorColor:s.oneOfType([s.oneOf(["primary","secondary"]),s.string]),onChange:s.func,orientation:s.oneOf(["horizontal","vertical"]),ScrollButtonComponent:s.elementType,scrollButtons:s.oneOf(["auto",!1,!0]),selectionFollowsFocus:s.bool,slotProps:s.shape({endScrollButtonIcon:s.oneOfType([s.func,s.object]),indicator:s.oneOfType([s.func,s.object]),list:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),scrollbar:s.oneOfType([s.func,s.object]),scrollButtons:s.oneOfType([s.func,s.object]),scroller:s.oneOfType([s.func,s.object]),startScrollButtonIcon:s.oneOfType([s.func,s.object])}),slots:s.shape({endScrollButtonIcon:s.elementType,EndScrollButtonIcon:s.elementType,indicator:s.elementType,list:s.elementType,root:s.elementType,scrollbar:s.elementType,scrollButtons:s.elementType,scroller:s.elementType,startScrollButtonIcon:s.elementType,StartScrollButtonIcon:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),TabIndicatorProps:s.object,TabScrollButtonProps:s.object,textColor:s.oneOf(["inherit","primary","secondary"]),value:s.any,variant:s.oneOf(["fullWidth","scrollable","standard"]),visibleScrollbar:s.bool});function N1(...e){const t="THREE."+e.shift();console.warn(t,...e)}function zt(e,t,n){return Math.max(t,Math.min(n,e))}class $1{constructor(t=0,n=0,r=0,o=1){this.isQuaternion=!0,this._x=t,this._y=n,this._z=r,this._w=o}static slerpFlat(t,n,r,o,i,a,l){let u=r[o+0],d=r[o+1],p=r[o+2],f=r[o+3],h=i[a+0],m=i[a+1],g=i[a+2],y=i[a+3];if(l<=0){t[n+0]=u,t[n+1]=d,t[n+2]=p,t[n+3]=f;return}if(l>=1){t[n+0]=h,t[n+1]=m,t[n+2]=g,t[n+3]=y;return}if(f!==y||u!==h||d!==m||p!==g){let x=u*h+d*m+p*g+f*y;x<0&&(h=-h,m=-m,g=-g,y=-y,x=-x);let b=1-l;if(x<.9995){const T=Math.acos(x),v=Math.sin(T);b=Math.sin(b*T)/v,l=Math.sin(l*T)/v,u=u*b+h*l,d=d*b+m*l,p=p*b+g*l,f=f*b+y*l}else{u=u*b+h*l,d=d*b+m*l,p=p*b+g*l,f=f*b+y*l;const T=1/Math.sqrt(u*u+d*d+p*p+f*f);u*=T,d*=T,p*=T,f*=T}}t[n]=u,t[n+1]=d,t[n+2]=p,t[n+3]=f}static multiplyQuaternionsFlat(t,n,r,o,i,a){const l=r[o],u=r[o+1],d=r[o+2],p=r[o+3],f=i[a],h=i[a+1],m=i[a+2],g=i[a+3];return t[n]=l*g+p*f+u*m-d*h,t[n+1]=u*g+p*h+d*f-l*m,t[n+2]=d*g+p*m+l*h-u*f,t[n+3]=p*g-l*f-u*h-d*m,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,n,r,o){return this._x=t,this._y=n,this._z=r,this._w=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,n=!0){const r=t._x,o=t._y,i=t._z,a=t._order,l=Math.cos,u=Math.sin,d=l(r/2),p=l(o/2),f=l(i/2),h=u(r/2),m=u(o/2),g=u(i/2);switch(a){case"XYZ":this._x=h*p*f+d*m*g,this._y=d*m*f-h*p*g,this._z=d*p*g+h*m*f,this._w=d*p*f-h*m*g;break;case"YXZ":this._x=h*p*f+d*m*g,this._y=d*m*f-h*p*g,this._z=d*p*g-h*m*f,this._w=d*p*f+h*m*g;break;case"ZXY":this._x=h*p*f-d*m*g,this._y=d*m*f+h*p*g,this._z=d*p*g+h*m*f,this._w=d*p*f-h*m*g;break;case"ZYX":this._x=h*p*f-d*m*g,this._y=d*m*f+h*p*g,this._z=d*p*g-h*m*f,this._w=d*p*f+h*m*g;break;case"YZX":this._x=h*p*f+d*m*g,this._y=d*m*f+h*p*g,this._z=d*p*g-h*m*f,this._w=d*p*f-h*m*g;break;case"XZY":this._x=h*p*f-d*m*g,this._y=d*m*f-h*p*g,this._z=d*p*g+h*m*f,this._w=d*p*f+h*m*g;break;default:N1("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,n){const r=n/2,o=Math.sin(r);return this._x=t.x*o,this._y=t.y*o,this._z=t.z*o,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(t){const n=t.elements,r=n[0],o=n[4],i=n[8],a=n[1],l=n[5],u=n[9],d=n[2],p=n[6],f=n[10],h=r+l+f;if(h>0){const m=.5/Math.sqrt(h+1);this._w=.25/m,this._x=(p-u)*m,this._y=(i-d)*m,this._z=(a-o)*m}else if(r>l&&r>f){const m=2*Math.sqrt(1+r-l-f);this._w=(p-u)/m,this._x=.25*m,this._y=(o+a)/m,this._z=(i+d)/m}else if(l>f){const m=2*Math.sqrt(1+l-r-f);this._w=(i-d)/m,this._x=(o+a)/m,this._y=.25*m,this._z=(u+p)/m}else{const m=2*Math.sqrt(1+f-r-l);this._w=(a-o)/m,this._x=(i+d)/m,this._y=(u+p)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(t,n){let r=t.dot(n)+1;return r<1e-8?(r=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=r):(this._x=0,this._y=-t.z,this._z=t.y,this._w=r)):(this._x=t.y*n.z-t.z*n.y,this._y=t.z*n.x-t.x*n.z,this._z=t.x*n.y-t.y*n.x,this._w=r),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(zt(this.dot(t),-1,1)))}rotateTowards(t,n){const r=this.angleTo(t);if(r===0)return this;const o=Math.min(1,n/r);return this.slerp(t,o),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,n){const r=t._x,o=t._y,i=t._z,a=t._w,l=n._x,u=n._y,d=n._z,p=n._w;return this._x=r*p+a*l+o*d-i*u,this._y=o*p+a*u+i*l-r*d,this._z=i*p+a*d+r*u-o*l,this._w=a*p-r*l-o*u-i*d,this._onChangeCallback(),this}slerp(t,n){if(n<=0)return this;if(n>=1)return this.copy(t);let r=t._x,o=t._y,i=t._z,a=t._w,l=this.dot(t);l<0&&(r=-r,o=-o,i=-i,a=-a,l=-l);let u=1-n;if(l<.9995){const d=Math.acos(l),p=Math.sin(d);u=Math.sin(u*d)/p,n=Math.sin(n*d)/p,this._x=this._x*u+r*n,this._y=this._y*u+o*n,this._z=this._z*u+i*n,this._w=this._w*u+a*n,this._onChangeCallback()}else this._x=this._x*u+r*n,this._y=this._y*u+o*n,this._z=this._z*u+i*n,this._w=this._w*u+a*n,this.normalize();return this}slerpQuaternions(t,n,r){return this.copy(t).slerp(n,r)}random(){const t=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),r=Math.random(),o=Math.sqrt(1-r),i=Math.sqrt(r);return this.set(o*Math.sin(t),o*Math.cos(t),i*Math.sin(n),i*Math.cos(n))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,n=0){return this._x=t[n],this._y=t[n+1],this._z=t[n+2],this._w=t[n+3],this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._w,t}fromBufferAttribute(t,n){return this._x=t.getX(n),this._y=t.getY(n),this._z=t.getZ(n),this._w=t.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Hn{constructor(t=0,n=0,r=0){Hn.prototype.isVector3=!0,this.x=t,this.y=n,this.z=r}set(t,n,r){return r===void 0&&(r=this.z),this.x=t,this.y=n,this.z=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,n){switch(t){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,n){return this.x=t.x+n.x,this.y=t.y+n.y,this.z=t.z+n.z,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this.z+=t.z*n,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,n){return this.x=t.x-n.x,this.y=t.y-n.y,this.z=t.z-n.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,n){return this.x=t.x*n.x,this.y=t.y*n.y,this.z=t.z*n.z,this}applyEuler(t){return this.applyQuaternion(bu.setFromEuler(t))}applyAxisAngle(t,n){return this.applyQuaternion(bu.setFromAxisAngle(t,n))}applyMatrix3(t){const n=this.x,r=this.y,o=this.z,i=t.elements;return this.x=i[0]*n+i[3]*r+i[6]*o,this.y=i[1]*n+i[4]*r+i[7]*o,this.z=i[2]*n+i[5]*r+i[8]*o,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const n=this.x,r=this.y,o=this.z,i=t.elements,a=1/(i[3]*n+i[7]*r+i[11]*o+i[15]);return this.x=(i[0]*n+i[4]*r+i[8]*o+i[12])*a,this.y=(i[1]*n+i[5]*r+i[9]*o+i[13])*a,this.z=(i[2]*n+i[6]*r+i[10]*o+i[14])*a,this}applyQuaternion(t){const n=this.x,r=this.y,o=this.z,i=t.x,a=t.y,l=t.z,u=t.w,d=2*(a*o-l*r),p=2*(l*n-i*o),f=2*(i*r-a*n);return this.x=n+u*d+a*f-l*p,this.y=r+u*p+l*d-i*f,this.z=o+u*f+i*p-a*d,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const n=this.x,r=this.y,o=this.z,i=t.elements;return this.x=i[0]*n+i[4]*r+i[8]*o,this.y=i[1]*n+i[5]*r+i[9]*o,this.z=i[2]*n+i[6]*r+i[10]*o,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,n){return this.x=zt(this.x,t.x,n.x),this.y=zt(this.y,t.y,n.y),this.z=zt(this.z,t.z,n.z),this}clampScalar(t,n){return this.x=zt(this.x,t,n),this.y=zt(this.y,t,n),this.z=zt(this.z,t,n),this}clampLength(t,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(zt(r,t,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this.z+=(t.z-this.z)*n,this}lerpVectors(t,n,r){return this.x=t.x+(n.x-t.x)*r,this.y=t.y+(n.y-t.y)*r,this.z=t.z+(n.z-t.z)*r,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,n){const r=t.x,o=t.y,i=t.z,a=n.x,l=n.y,u=n.z;return this.x=o*u-i*l,this.y=i*a-r*u,this.z=r*l-o*a,this}projectOnVector(t){const n=t.lengthSq();if(n===0)return this.set(0,0,0);const r=t.dot(this)/n;return this.copy(t).multiplyScalar(r)}projectOnPlane(t){return Cs.copy(this).projectOnVector(t),this.sub(Cs)}reflect(t){return this.sub(Cs.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const n=Math.sqrt(this.lengthSq()*t.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(t)/n;return Math.acos(zt(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const n=this.x-t.x,r=this.y-t.y,o=this.z-t.z;return n*n+r*r+o*o}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,n,r){const o=Math.sin(n)*t;return this.x=o*Math.sin(r),this.y=Math.cos(n)*t,this.z=o*Math.cos(r),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,n,r){return this.x=t*Math.sin(n),this.y=r,this.z=t*Math.cos(n),this}setFromMatrixPosition(t){const n=t.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(t){const n=this.setFromMatrixColumn(t,0).length(),r=this.setFromMatrixColumn(t,1).length(),o=this.setFromMatrixColumn(t,2).length();return this.x=n,this.y=r,this.z=o,this}setFromMatrixColumn(t,n){return this.fromArray(t.elements,n*4)}setFromMatrix3Column(t,n){return this.fromArray(t.elements,n*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,n=0){return this.x=t[n],this.y=t[n+1],this.z=t[n+2],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t[n+2]=this.z,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this.z=t.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,n=Math.random()*2-1,r=Math.sqrt(1-n*n);return this.x=r*Math.cos(t),this.y=n,this.z=r*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Cs=new Hn,bu=new $1;function al(e,t,n){if(t.length!==e.length)return!0;for(let r=0;r<t.length;r++)if(Math.abs(t[r]-e[r])>n)return!1;return!0}function af(e,t,n){if(e===void 0&&t||e&&t===void 0||(e==null?void 0:e.orientation)===void 0||(t==null?void 0:t.orientation)===void 0||(e==null?void 0:e.position)===void 0||(t==null?void 0:t.position)===void 0)return!1;if(e===void 0||t===void 0)return!0;let r=0;return r+=Math.abs(e.orientation[0]-t.orientation[0]),r+=Math.abs(e.orientation[1]-t.orientation[1]),r+=Math.abs(e.orientation[2]-t.orientation[2]),r+=Math.abs(e.position[0]-t.position[0]),r+=Math.abs(e.position[1]-t.position[1]),r+=Math.abs(e.position[2]-t.position[2]),r<=n}function ll(e,t,n){return e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp&&af(e.tcp_pose,t.tcp_pose,n)}function lf(e,t){const n=new ks.Vector3(t[0],t[1],t[2]),r=new ks.Vector3(e[0],e[1],e[2]),o=n.length(),i=n.normalize();let a=r.length(),l=r.normalize();l.dot(i)<0&&(a=-a,l=l.multiplyScalar(-1));let u=a-o;return u-=2*Math.PI*Math.floor((u+Math.PI)/(2*Math.PI)),a=o+u,[...l.multiplyScalar(a)]}const vu=1e-4;class Li{constructor(t,n,r,o,i,a){this.nova=t,this.controller=n,this.motionGroup=r,this.description=o,this.initialMotionState=i,this.motionStateSocket=a,this.rapidlyChangingMotionState=i,a.addEventListener("message",l=>{var d;const u=(d=Ge.tryParseJson(l.data))==null?void 0:d.result;if(!u)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${l.data}`);al(this.rapidlyChangingMotionState.joint_position,u.joint_position,vu)||Ie.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=u.joint_position}),ll(this.rapidlyChangingMotionState,u,vu)||Ie.runInAction(()=>{var p,f,h;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=u.tcp_pose:(p=u.tcp_pose)!=null&&p.orientation&&((f=u.tcp_pose)!=null&&f.position)&&((h=this.rapidlyChangingMotionState.tcp_pose)!=null&&h.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:u.tcp_pose.position,orientation:lf(u.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:console.warn("Received incomplete tcp_pose, ignoring",u.tcp_pose)}),this.rapidlyChangingMotionState.standstill!==u.standstill&&Ie.runInAction(()=>{this.rapidlyChangingMotionState.standstill=u.standstill})}),Ie.makeAutoObservable(this)}static async open(t,n){var f;const[r,o]=n.split("@"),i=await t.api.controller.getCurrentRobotControllerState(o),a=i==null?void 0:i.motion_groups.find(h=>h.motion_group===n);if(!i||!a)throw new Error(`Controller ${o} or motion group ${n} not found`);const l=t.openReconnectingWebsocket(`/controllers/${o}/motion-groups/${n}/state-stream`),u=await l.firstMessage(),d=(f=Ge.tryParseJson(u.data))==null?void 0:f.result;if(!d)throw new Error(`Unable to parse initial motion state message ${u.data}`);console.log(`Connected motion state websocket to motion group ${a.motion_group}. Initial state:
|
|
68
|
-
`,d);const p=await t.api.motionGroup.getMotionGroupDescription(o,a.motion_group);return new Li(t,i,a,p,d,l)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get joints(){return this.initialMotionState.joint_position.map((t,n)=>({index:n}))}dispose(){this.motionStateSocket.close()}}const Eu="Movement request rejected. Another client is currently executing a 'Jogging' motion!";class Fi{constructor(t,n={}){this.motionStream=t,this.options=n,this.ENDPOINT_JOGGING="/execution/jogging",this.ENDPOINT_TRAJECTORY="/execution/trajectory",this.DEFAULT_MODE="off",this.DEFAULT_TCP="Flange",this.NO_TCP=void 0,this.DEFAULT_INIT_TIMEOUT=5e3,this.DEFAULT_ORIENTATION="coordsys",this.mode="off",this.joggingSocket=null,this.trajectorySocket=null,this.timeout=this.DEFAULT_INIT_TIMEOUT,this.tcp=(n==null?void 0:n.tcp)||t.motionGroup.tcp||this.getDefaultTcp(t),this.orientation=(n==null?void 0:n.orientation)||this.DEFAULT_ORIENTATION,this.timeout=(n==null?void 0:n.timeout)||this.DEFAULT_INIT_TIMEOUT,this.mode=(n==null?void 0:n.mode)||this.DEFAULT_MODE,this.onError=n==null?void 0:n.onError}static async open(t,n,r={}){const o=await Li.open(t,n),i=new Fi(o,r);return await i.setJoggingMode(i.mode),i}getDefaultTcp(t){var r,o;const n=(o=(r=t.description.dh_parameters)==null?void 0:r[0])==null?void 0:o.type;return t.joints.length<6&&(n===c.JointTypeEnum.RevoluteJoint||n===c.JointTypeEnum.PrismaticJoint)?this.NO_TCP:this.DEFAULT_TCP}async setOptions(t){t.tcp&&(this.tcp=t.tcp),t.orientation&&(this.orientation=t.orientation),t.timeout&&(this.timeout=t.timeout),t.mode&&(this.mode=t.mode),t.onError&&(this.onError=t.onError),this.setJoggingMode(this.mode,!1)}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}async stop(){if(this.joggingSocket){const t=new Array(this.numJoints).fill(0);this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:t})}this.trajectorySocket&&this.trajectorySocket.sendJson({message_type:"PauseMovementRequest"})}async dispose(){const t=[this.joggingSocket,this.trajectorySocket].filter(n=>n!==null);return t.forEach(n=>{n.dispose()}),this.joggingSocket=null,this.trajectorySocket=null,Promise.all(t.map(n=>n.closed()))}async setJoggingMode(t,n=!0){if(!(this.mode===t&&n)&&(this.dispose(),this.mode=t,this.mode==="jogging"))return this.initializeJoggingWebsocket()}async initializeJoggingWebsocket(){return new Promise((t,n)=>{const r=setTimeout(()=>{n(new Error(`Jogging initialization timeout after ${this.timeout} seconds`))},this.timeout);this.joggingSocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_JOGGING),this.joggingSocket.addEventListener("message",o=>{var a,l,u,d;const i=Ge.tryParseJson(o.data);if(((a=i==null?void 0:i.result)==null?void 0:a.kind)==="INITIALIZE_RECEIVED"){clearTimeout(r),t();return}if(((l=i==null?void 0:i.result)==null?void 0:l.kind)==="MOTION_ERROR")if(clearTimeout(r),this.onBlocked&&((u=i==null?void 0:i.result)!=null&&u.message.includes(Eu))){(d=this.joggingSocket)==null||d.dispose(),this.onBlocked();return}else this.onError?this.onError(o.data):n(new Error(o.data))}),this.joggingSocket.sendJson({message_type:"InitializeJoggingRequest",motion_group:this.motionGroupId,...this.tcp?{tcp:this.tcp}:{}})})}async rotateJoints({joint:t,direction:n,velocityValue:r,velocityUnit:o}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'");const i=new Array(this.numJoints).fill(0);i[t]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:i})}async translateTCP({axis:t,direction:n,velocityMmPerSec:r}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=[0,0,0],i=[0,0,0];i[Ge.XYZ_TO_VECTOR[t]]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:i,rotation:o,use_tool_coordinate_system:this.orientation==="tool"})}async rotateTCP({axis:t,direction:n,velocityRadsPerSec:r}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=[0,0,0],i=[0,0,0];o[Ge.XYZ_TO_VECTOR[t]]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:i,rotation:o})}async runIncrementalCartesianMotion({currentTcpPose:t,currentJoints:n,velocityInRelevantUnits:r,axis:o,direction:i,motion:a}){const l=[];if(this.mode!=="trajectory")throw new Error("Set jogging mode to 'trajectory' to run incremental cartesian motions");if(a.type==="translate"){if(!t.position)throw new Error("Current pose has no position, cannot perform translation");const x=[...t.position];x[Ge.XYZ_TO_VECTOR[o]]+=a.distanceMm*(i==="-"?-1:1),l.push({limits_override:{tcp_velocity_limit:r},path:{path_definition_name:"PathLine",target_pose:{position:x,orientation:t.orientation}}})}else if(a.type==="rotate"){if(!t.orientation)throw new Error("Current pose has no orientation, cannot perform rotation");const x=new Hn(t.orientation[0],t.orientation[1],t.orientation[2]),b=x.length(),T=x.clone().normalize(),v=a.distanceRads*(i==="-"?-1:1),E=new Hn(0,0,0);E[o]=1;const w=Math.cos(.5*v)*Math.cos(.5*b),S=Math.sin(.5*v)*Math.sin(.5*b),R=Math.sin(.5*v)*Math.cos(.5*b),j=Math.cos(.5*v)*Math.sin(.5*b),M=E.dot(T),I=E.clone().cross(T),k=2*Math.acos(w-S*M),D=k/Math.sin(.5*k),O=new Hn().addScaledVector(I,S).addScaledVector(E,R).addScaledVector(T,j).multiplyScalar(D);l.push({limits_override:{tcp_orientation_velocity_limit:r},path:{path_definition_name:"PathLine",target_pose:{position:t.position,orientation:[...O]}}})}const u=this.motionStream.description;if(u.cycle_time===void 0){console.warn("Current motion group has no cycle time, cannot plan jogging motion");return}const d={motion_group_model:u.motion_group_model,cycle_time:u.cycle_time,mounting:u.mounting,global:u.operation_limits.auto_limits},p=await this.nova.api.trajectoryPlanning.planTrajectory({motion_group_setup:d,start_joint_position:n,motion_commands:l}),f=p.response;if(!f)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(p)}`);this.trajectorySocket&&(console.warn("Trajectory jogging websocket already open; will close"),this.trajectorySocket.dispose()),this.trajectorySocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_TRAJECTORY);const h=x=>{var b;if(!x||x.add_trajectory_error||x.message)if(this.onError)this.onError(x);else throw new Error(((b=x==null?void 0:x.add_trajectory_error)==null?void 0:b.message)||(x==null?void 0:x.message)||"Failed to execute trajectory, unknown error");if(!this.trajectorySocket)throw new Error("Failed to execute trajectory, websocket not available anymore");this.trajectorySocket.sendJson({message_type:"StartMovementRequest",direction:"DIRECTION_FORWARD"})},m=async()=>{var x;await Ie.when(()=>!this.motionStream.rapidlyChangingMotionState.standstill),await Ie.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(x=this.trajectorySocket)==null||x.dispose(),this.trajectorySocket=null},g=async()=>{var x;await Ie.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(x=this.trajectorySocket)==null||x.dispose(),this.trajectorySocket=null},y=async x=>{if(x!=null&&x.message)if(this.onError){this.onError(x);return}else throw new Error(x.message||"Failed to execute trajectory, unknown error");this.motionStream.rapidlyChangingMotionState.standstill?await m():await g()};this.trajectorySocket.addEventListener("message",x=>{var T,v;const b=Ge.tryParseJson(x.data);if(!((T=b==null?void 0:b.result)!=null&&T.kind))throw new Error(`Failed to execute trajectory: Received invalid message ${x.data}`);if(this.onBlocked&&((v=b.result.message)!=null&&v.includes(Eu))){this.onBlocked();return}if(b.result.kind==="INITIALIZE_RECEIVED")h(b.result);else if(b.result.kind==="START_RECEIVED")y(b);else if(b.result.kind!=="PAUSE_RECEIVED")if(b.result.kind==="MOTION_ERROR"&&b.result.message)if(this.onError){this.onError(b);return}else throw new Error(b.result.message);else throw new Error(`Failed to execute trajectory, cannot handle message type "${b.result.kind}"`)}),this.trajectorySocket.sendJson({message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.motionGroupId,data:f,tcp:this.tcp}})}}function z1(e,t){throw new Error(`${t} ${JSON.stringify(e)}`)}function L1(e){var t,n,r,o;return e instanceof Al.AxiosError&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof Al.AxiosError&&e.response?`${(t=e.response)==null?void 0:t.status} ${(n=e.response)==null?void 0:n.statusText} from ${(r=e.response)==null?void 0:r.config.url}: ${JSON.stringify((o=e.response)==null?void 0:o.data)}`:e instanceof Error?e.message:`Unexpected error: ${c.tryStringifyJson(e)||e}`}const cf=e=>{const t=e.softTimeout||3e3,[n,r]=L.useState(!1),o=c.useTheme();return L.useEffect(()=>{const i=setTimeout(()=>{r(!0)},t);return()=>clearTimeout(i)}),c.jsxRuntimeExports.jsx(Ce,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:o.palette.text.primary},children:e.error?c.jsxRuntimeExports.jsx(uf,{loadingMessage:e.message,error:e.error}):c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(c.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&c.jsxRuntimeExports.jsx("div",{children:e.message}),c.jsxRuntimeExports.jsx(Ce,{sx:{visibility:n?"visible":"hidden",marginTop:"1rem",color:o.palette.text.secondary},children:"This is taking longer than expected..."})]})})},uf=e=>{const t=L1(e.error),n=e.error instanceof Error?e.error.stack:null,r=c.useTheme();return c.jsxRuntimeExports.jsxs(Ce,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:r.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${oa.lowerFirst(c.capitalize(e.loadingMessage))} - `:"")+t,c.jsxRuntimeExports.jsx("br",{}),n&&c.jsxRuntimeExports.jsx("pre",{children:n})]})};function F1(e){return c.generateUtilityClass("MuiAlert",e)}const Tu=c.generateUtilityClasses("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),B1=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),U1=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),V1=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),W1=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),G1=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),H1=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${c.capitalize(n||r)}`,`${t}${c.capitalize(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return c.composeClasses(i,F1,o)},q1=c.styled(c.Paper,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${c.capitalize(n.color||n.severity)}`]]}})(c.memoTheme(({theme:e})=>{const t=e.palette.mode==="light"?e.darken:e.lighten,n=e.palette.mode==="light"?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${Tu.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${Tu.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),Y1=c.styled("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),K1=c.styled("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),X1=c.styled("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),J1={success:c.jsxRuntimeExports.jsx(B1,{fontSize:"inherit"}),warning:c.jsxRuntimeExports.jsx(U1,{fontSize:"inherit"}),error:c.jsxRuntimeExports.jsx(V1,{fontSize:"inherit"}),info:c.jsxRuntimeExports.jsx(W1,{fontSize:"inherit"})},df=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiAlert"}),{action:o,children:i,className:a,closeText:l="Close",color:u,components:d={},componentsProps:p={},icon:f,iconMapping:h=J1,onClose:m,role:g="alert",severity:y="success",slotProps:x={},slots:b={},variant:T="standard",...v}=r,E={...r,color:u,severity:y,variant:T,colorSeverity:u||y},w=H1(E),S={slots:{closeButton:d.CloseButton,closeIcon:d.CloseIcon,...b},slotProps:{...p,...x}},[R,j]=c.useSlot("root",{ref:n,shouldForwardComponentProp:!0,className:c.clsx(w.root,a),elementType:q1,externalForwardedProps:{...S,...v},ownerState:E,additionalProps:{role:g,elevation:0}}),[M,I]=c.useSlot("icon",{className:w.icon,elementType:Y1,externalForwardedProps:S,ownerState:E}),[k,D]=c.useSlot("message",{className:w.message,elementType:K1,externalForwardedProps:S,ownerState:E}),[O,P]=c.useSlot("action",{className:w.action,elementType:X1,externalForwardedProps:S,ownerState:E}),[N,_]=c.useSlot("closeButton",{elementType:Ut,externalForwardedProps:S,ownerState:E}),[z,B]=c.useSlot("closeIcon",{elementType:G1,externalForwardedProps:S,ownerState:E});return c.jsxRuntimeExports.jsxs(R,{...j,children:[f!==!1?c.jsxRuntimeExports.jsx(M,{...I,children:f||h[y]}):null,c.jsxRuntimeExports.jsx(k,{...D,children:i}),o!=null?c.jsxRuntimeExports.jsx(O,{...P,children:o}):null,o==null&&m?c.jsxRuntimeExports.jsx(O,{...P,children:c.jsxRuntimeExports.jsx(N,{size:"small","aria-label":l,title:l,color:"inherit",onClick:m,..._,children:c.jsxRuntimeExports.jsx(z,{fontSize:"small",...B})})}):null]})});process.env.NODE_ENV!=="production"&&(df.propTypes={action:s.node,children:s.node,classes:s.object,className:s.string,closeText:s.string,color:s.oneOfType([s.oneOf(["error","info","success","warning"]),s.string]),components:s.shape({CloseButton:s.elementType,CloseIcon:s.elementType}),componentsProps:s.shape({closeButton:s.object,closeIcon:s.object}),icon:s.node,iconMapping:s.shape({error:s.node,info:s.node,success:s.node,warning:s.node}),onClose:s.func,role:s.string,severity:s.oneOfType([s.oneOf(["error","info","success","warning"]),s.string]),slotProps:s.shape({action:s.oneOfType([s.func,s.object]),closeButton:s.oneOfType([s.func,s.object]),closeIcon:s.oneOfType([s.func,s.object]),icon:s.oneOfType([s.func,s.object]),message:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),slots:s.shape({action:s.elementType,closeButton:s.elementType,closeIcon:s.elementType,icon:s.elementType,message:s.elementType,root:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["filled","outlined","standard"]),s.string])});function Z1(e){return c.generateUtilityClass("MuiAlertTitle",e)}c.generateUtilityClasses("MuiAlertTitle",["root"]);const Q1=e=>{const{classes:t}=e,n={root:["root"]};return c.composeClasses(n,Z1,t)},eS=c.styled(c.Typography,{name:"MuiAlertTitle",slot:"Root"})(c.memoTheme(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),pf=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiAlertTitle"}),{className:o,...i}=r,a=r,l=Q1(a);return c.jsxRuntimeExports.jsx(eS,{gutterBottom:!0,component:"div",ownerState:a,ref:n,className:c.clsx(l.root,o),...i})});process.env.NODE_ENV!=="production"&&(pf.propTypes={children:s.node,classes:s.object,className:s.string,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const tS=Oe.observer(({store:e})=>{const{t}=Pe.useTranslation();return c.jsxRuntimeExports.jsx(Kr,{"data-testid":"jogging-blocked","aria-label":"jogging-blocked",open:!0,sx:{position:"absolute",zIndex:n=>n.zIndex.drawer+1,color:"#fff",background:"rgba(15, 15, 15, 0.88)",justifyContent:"flex-start",alignItems:"flex-start"},children:c.jsxRuntimeExports.jsxs(Ce,{sx:{m:2,width:"100%"},children:[c.jsxRuntimeExports.jsxs(df,{severity:"error",sx:{mb:2},children:[c.jsxRuntimeExports.jsx(pf,{children:t("Jogging.Blocked.ti")}),t("Jogging.Blocked.lb")]}),c.jsxRuntimeExports.jsx(c.Button,{variant:"contained",color:"secondary",onClick:()=>e.unblock(),children:t("Jogging.Blocked.Reenable.bt")})]})})});function nS(e){return c.generateUtilityClass("MuiToggleButton",e)}const Tn=c.generateUtilityClasses("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),cl=C.createContext({});process.env.NODE_ENV!=="production"&&(cl.displayName="ToggleButtonGroupContext");const ul=C.createContext(void 0);process.env.NODE_ENV!=="production"&&(ul.displayName="ToggleButtonGroupButtonContext");function rS(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const oS=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,l={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${c.capitalize(i)}`,a]};return c.composeClasses(l,nS,t)},iS=c.styled(c.ButtonBase,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${c.capitalize(n.size)}`]]}})(c.memoTheme(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${Tn.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${Tn.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{[`&.${Tn.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),Ks=C.forwardRef(function(t,n){const{value:r,...o}=C.useContext(cl),i=C.useContext(ul),a=c.resolveProps({...o,selected:rS(t.value,r)},t),l=c.useDefaultProps({props:a,name:"MuiToggleButton"}),{children:u,className:d,color:p="standard",disabled:f=!1,disableFocusRipple:h=!1,fullWidth:m=!1,onChange:g,onClick:y,selected:x,size:b="medium",value:T,...v}=l,E={...l,color:p,disabled:f,disableFocusRipple:h,fullWidth:m,size:b},w=oS(E),S=j=>{y&&(y(j,T),j.defaultPrevented)||g&&g(j,T)},R=i||"";return c.jsxRuntimeExports.jsx(iS,{className:c.clsx(o.className,w.root,d,R),disabled:f,focusRipple:!h,ref:n,onClick:S,onChange:g,value:T,ownerState:E,"aria-pressed":x,...v,children:u})});process.env.NODE_ENV!=="production"&&(Ks.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["standard","primary","secondary","error","info","success","warning"]),s.string]),disabled:s.bool,disableFocusRipple:s.bool,disableRipple:s.bool,fullWidth:s.bool,onChange:s.func,onClick:s.func,selected:s.bool,size:s.oneOfType([s.oneOf(["small","medium","large"]),s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.any.isRequired});function sS(){this.__data__=[],this.size=0}function ff(e,t){return e===t||e!==e&&t!==t}function Bi(e,t){for(var n=e.length;n--;)if(ff(e[n][0],t))return n;return-1}var aS=Array.prototype,lS=aS.splice;function cS(e){var t=this.__data__,n=Bi(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():lS.call(t,n,1),--this.size,!0}function uS(e){var t=this.__data__,n=Bi(t,e);return n<0?void 0:t[n][1]}function dS(e){return Bi(this.__data__,e)>-1}function pS(e,t){var n=this.__data__,r=Bi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Kt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Kt.prototype.clear=sS;Kt.prototype.delete=cS;Kt.prototype.get=uS;Kt.prototype.has=dS;Kt.prototype.set=pS;function fS(){this.__data__=new Kt,this.size=0}function hS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function mS(e){return this.__data__.get(e)}function gS(e){return this.__data__.has(e)}var xS="[object AsyncFunction]",yS="[object Function]",bS="[object GeneratorFunction]",vS="[object Proxy]";function hf(e){if(!jn(e))return!1;var t=_n(e);return t==yS||t==bS||t==xS||t==vS}var Rs=Nt["__core-js_shared__"],Su=(function(){var e=/[^.]+$/.exec(Rs&&Rs.keys&&Rs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function ES(e){return!!Su&&Su in e}var TS=Function.prototype,SS=TS.toString;function Dn(e){if(e!=null){try{return SS.call(e)}catch{}try{return e+""}catch{}}return""}var wS=/[\\^$.*+?()[\]{}|]/g,CS=/^\[object .+?Constructor\]$/,RS=Function.prototype,jS=Object.prototype,MS=RS.toString,OS=jS.hasOwnProperty,IS=RegExp("^"+MS.call(OS).replace(wS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function PS(e){if(!jn(e)||ES(e))return!1;var t=hf(e)?IS:CS;return t.test(Dn(e))}function kS(e,t){return e==null?void 0:e[t]}function Nn(e,t){var n=kS(e,t);return PS(n)?n:void 0}var Gr=Nn(Nt,"Map"),Hr=Nn(Object,"create");function AS(){this.__data__=Hr?Hr(null):{},this.size=0}function _S(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var DS="__lodash_hash_undefined__",NS=Object.prototype,$S=NS.hasOwnProperty;function zS(e){var t=this.__data__;if(Hr){var n=t[e];return n===DS?void 0:n}return $S.call(t,e)?t[e]:void 0}var LS=Object.prototype,FS=LS.hasOwnProperty;function BS(e){var t=this.__data__;return Hr?t[e]!==void 0:FS.call(t,e)}var US="__lodash_hash_undefined__";function VS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Hr&&t===void 0?US:t,this}function On(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}On.prototype.clear=AS;On.prototype.delete=_S;On.prototype.get=zS;On.prototype.has=BS;On.prototype.set=VS;function WS(){this.size=0,this.__data__={hash:new On,map:new(Gr||Kt),string:new On}}function GS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ui(e,t){var n=e.__data__;return GS(t)?n[typeof t=="string"?"string":"hash"]:n.map}function HS(e){var t=Ui(this,e).delete(e);return this.size-=t?1:0,t}function qS(e){return Ui(this,e).get(e)}function YS(e){return Ui(this,e).has(e)}function KS(e,t){var n=Ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Xt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Xt.prototype.clear=WS;Xt.prototype.delete=HS;Xt.prototype.get=qS;Xt.prototype.has=YS;Xt.prototype.set=KS;var XS=200;function JS(e,t){var n=this.__data__;if(n instanceof Kt){var r=n.__data__;if(!Gr||r.length<XS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Xt(r)}return n.set(e,t),this.size=n.size,this}function Bt(e){var t=this.__data__=new Kt(e);this.size=t.size}Bt.prototype.clear=fS;Bt.prototype.delete=hS;Bt.prototype.get=mS;Bt.prototype.has=gS;Bt.prototype.set=JS;var ZS="__lodash_hash_undefined__";function QS(e){return this.__data__.set(e,ZS),this}function ew(e){return this.__data__.has(e)}function li(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Xt;++t<n;)this.add(e[t])}li.prototype.add=li.prototype.push=QS;li.prototype.has=ew;function tw(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function nw(e,t){return e.has(t)}var rw=1,ow=2;function mf(e,t,n,r,o,i){var a=n&rw,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var f=-1,h=!0,m=n&ow?new li:void 0;for(i.set(e,t),i.set(t,e);++f<l;){var g=e[f],y=t[f];if(r)var x=a?r(y,g,f,t,e,i):r(g,y,f,e,t,i);if(x!==void 0){if(x)continue;h=!1;break}if(m){if(!tw(t,function(b,T){if(!nw(m,T)&&(g===b||o(g,b,n,r,i)))return m.push(T)})){h=!1;break}}else if(!(g===y||o(g,y,n,r,i))){h=!1;break}}return i.delete(e),i.delete(t),h}var wu=Nt.Uint8Array;function iw(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function sw(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var aw=1,lw=2,cw="[object Boolean]",uw="[object Date]",dw="[object Error]",pw="[object Map]",fw="[object Number]",hw="[object RegExp]",mw="[object Set]",gw="[object String]",xw="[object Symbol]",yw="[object ArrayBuffer]",bw="[object DataView]",Cu=nn?nn.prototype:void 0,js=Cu?Cu.valueOf:void 0;function vw(e,t,n,r,o,i,a){switch(n){case bw:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case yw:return!(e.byteLength!=t.byteLength||!i(new wu(e),new wu(t)));case cw:case uw:case fw:return ff(+e,+t);case dw:return e.name==t.name&&e.message==t.message;case hw:case gw:return e==t+"";case pw:var l=iw;case mw:var u=r&aw;if(l||(l=sw),e.size!=t.size&&!u)return!1;var d=a.get(e);if(d)return d==t;r|=lw,a.set(e,t);var p=mf(l(e),l(t),r,o,i,a);return a.delete(e),p;case xw:if(js)return js.call(e)==js.call(t)}return!1}function Ew(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var kt=Array.isArray;function Tw(e,t,n){var r=t(e);return kt(e)?r:Ew(r,n(e))}function Sw(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function ww(){return[]}var Cw=Object.prototype,Rw=Cw.propertyIsEnumerable,Ru=Object.getOwnPropertySymbols,jw=Ru?function(e){return e==null?[]:(e=Object(e),Sw(Ru(e),function(t){return Rw.call(e,t)}))}:ww;function Mw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Ow="[object Arguments]";function ju(e){return Mn(e)&&_n(e)==Ow}var gf=Object.prototype,Iw=gf.hasOwnProperty,Pw=gf.propertyIsEnumerable,xf=ju((function(){return arguments})())?ju:function(e){return Mn(e)&&Iw.call(e,"callee")&&!Pw.call(e,"callee")};function kw(){return!1}var yf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mu=yf&&typeof module=="object"&&module&&!module.nodeType&&module,Aw=Mu&&Mu.exports===yf,Ou=Aw?Nt.Buffer:void 0,_w=Ou?Ou.isBuffer:void 0,Xs=_w||kw,Dw=9007199254740991,Nw=/^(?:0|[1-9]\d*)$/;function bf(e,t){var n=typeof e;return t=t??Dw,!!t&&(n=="number"||n!="symbol"&&Nw.test(e))&&e>-1&&e%1==0&&e<t}var $w=9007199254740991;function dl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$w}var zw="[object Arguments]",Lw="[object Array]",Fw="[object Boolean]",Bw="[object Date]",Uw="[object Error]",Vw="[object Function]",Ww="[object Map]",Gw="[object Number]",Hw="[object Object]",qw="[object RegExp]",Yw="[object Set]",Kw="[object String]",Xw="[object WeakMap]",Jw="[object ArrayBuffer]",Zw="[object DataView]",Qw="[object Float32Array]",eC="[object Float64Array]",tC="[object Int8Array]",nC="[object Int16Array]",rC="[object Int32Array]",oC="[object Uint8Array]",iC="[object Uint8ClampedArray]",sC="[object Uint16Array]",aC="[object Uint32Array]",De={};De[Qw]=De[eC]=De[tC]=De[nC]=De[rC]=De[oC]=De[iC]=De[sC]=De[aC]=!0;De[zw]=De[Lw]=De[Jw]=De[Fw]=De[Zw]=De[Bw]=De[Uw]=De[Vw]=De[Ww]=De[Gw]=De[Hw]=De[qw]=De[Yw]=De[Kw]=De[Xw]=!1;function lC(e){return Mn(e)&&dl(e.length)&&!!De[_n(e)]}function cC(e){return function(t){return e(t)}}var vf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pr=vf&&typeof module=="object"&&module&&!module.nodeType&&module,uC=Pr&&Pr.exports===vf,Ms=uC&&tf.process,Iu=(function(){try{var e=Pr&&Pr.require&&Pr.require("util").types;return e||Ms&&Ms.binding&&Ms.binding("util")}catch{}})(),Pu=Iu&&Iu.isTypedArray,Ef=Pu?cC(Pu):lC,dC=Object.prototype,pC=dC.hasOwnProperty;function fC(e,t){var n=kt(e),r=!n&&xf(e),o=!n&&!r&&Xs(e),i=!n&&!r&&!o&&Ef(e),a=n||r||o||i,l=a?Mw(e.length,String):[],u=l.length;for(var d in e)pC.call(e,d)&&!(a&&(d=="length"||o&&(d=="offset"||d=="parent")||i&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||bf(d,u)))&&l.push(d);return l}var hC=Object.prototype;function mC(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||hC;return e===n}function gC(e,t){return function(n){return e(t(n))}}var xC=gC(Object.keys,Object),yC=Object.prototype,bC=yC.hasOwnProperty;function vC(e){if(!mC(e))return xC(e);var t=[];for(var n in Object(e))bC.call(e,n)&&n!="constructor"&&t.push(n);return t}function Tf(e){return e!=null&&dl(e.length)&&!hf(e)}function pl(e){return Tf(e)?fC(e):vC(e)}function ku(e){return Tw(e,pl,jw)}var EC=1,TC=Object.prototype,SC=TC.hasOwnProperty;function wC(e,t,n,r,o,i){var a=n&EC,l=ku(e),u=l.length,d=ku(t),p=d.length;if(u!=p&&!a)return!1;for(var f=u;f--;){var h=l[f];if(!(a?h in t:SC.call(t,h)))return!1}var m=i.get(e),g=i.get(t);if(m&&g)return m==t&&g==e;var y=!0;i.set(e,t),i.set(t,e);for(var x=a;++f<u;){h=l[f];var b=e[h],T=t[h];if(r)var v=a?r(T,b,h,t,e,i):r(b,T,h,e,t,i);if(!(v===void 0?b===T||o(b,T,n,r,i):v)){y=!1;break}x||(x=h=="constructor")}if(y&&!x){var E=e.constructor,w=t.constructor;E!=w&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof w=="function"&&w instanceof w)&&(y=!1)}return i.delete(e),i.delete(t),y}var Js=Nn(Nt,"DataView"),Zs=Nn(Nt,"Promise"),Qs=Nn(Nt,"Set"),ea=Nn(Nt,"WeakMap"),Au="[object Map]",CC="[object Object]",_u="[object Promise]",Du="[object Set]",Nu="[object WeakMap]",$u="[object DataView]",RC=Dn(Js),jC=Dn(Gr),MC=Dn(Zs),OC=Dn(Qs),IC=Dn(ea),tn=_n;(Js&&tn(new Js(new ArrayBuffer(1)))!=$u||Gr&&tn(new Gr)!=Au||Zs&&tn(Zs.resolve())!=_u||Qs&&tn(new Qs)!=Du||ea&&tn(new ea)!=Nu)&&(tn=function(e){var t=_n(e),n=t==CC?e.constructor:void 0,r=n?Dn(n):"";if(r)switch(r){case RC:return $u;case jC:return Au;case MC:return _u;case OC:return Du;case IC:return Nu}return t});var PC=1,zu="[object Arguments]",Lu="[object Array]",Oo="[object Object]",kC=Object.prototype,Fu=kC.hasOwnProperty;function AC(e,t,n,r,o,i){var a=kt(e),l=kt(t),u=a?Lu:tn(e),d=l?Lu:tn(t);u=u==zu?Oo:u,d=d==zu?Oo:d;var p=u==Oo,f=d==Oo,h=u==d;if(h&&Xs(e)){if(!Xs(t))return!1;a=!0,p=!1}if(h&&!p)return i||(i=new Bt),a||Ef(e)?mf(e,t,n,r,o,i):vw(e,t,u,n,r,o,i);if(!(n&PC)){var m=p&&Fu.call(e,"__wrapped__"),g=f&&Fu.call(t,"__wrapped__");if(m||g){var y=m?e.value():e,x=g?t.value():t;return i||(i=new Bt),o(y,x,n,r,i)}}return h?(i||(i=new Bt),wC(e,t,n,r,o,i)):!1}function Vi(e,t,n,r,o){return e===t?!0:e==null||t==null||!Mn(e)&&!Mn(t)?e!==e&&t!==t:AC(e,t,n,r,Vi,o)}function _C(e,t){return Vi(e,t)}const Sf=Oe.observer(({store:e})=>{const{t}=Pe.useTranslation(),[n,r]=L.useState(e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached),o=L.useRef(n);c.useAnimationFrame(()=>{const a=e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;_C(o.current,a)||(o.current=a,r(a))});const i=[];for(const[a,l]of n.entries())l&&i.push(a);return c.jsxRuntimeExports.jsx(c.Typography,{"data-testid":"jogging-joint-limit-detector","aria-label":"jogging-joint-limit-detector",color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:i.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:i.map(a=>a+1).join(", ")})})});function Bu(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function ci(e,t=!1){return e&&(Bu(e.value)&&e.value!==""||t&&Bu(e.defaultValue)&&e.defaultValue!=="")}function DC(e){return e.startAdornment}const Wi=C.createContext(void 0);process.env.NODE_ENV!=="production"&&(Wi.displayName="FormControlContext");function NC(e){return c.generateUtilityClass("MuiFormControl",e)}c.generateUtilityClasses("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const $C=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${c.capitalize(n)}`,r&&"fullWidth"]};return c.composeClasses(o,NC,t)},zC=c.styled("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${c.capitalize(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),wf=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:l="div",disabled:u=!1,error:d=!1,focused:p,fullWidth:f=!1,hiddenLabel:h=!1,margin:m="none",required:g=!1,size:y="medium",variant:x="outlined",...b}=r,T={...r,color:a,component:l,disabled:u,error:d,fullWidth:f,hiddenLabel:h,margin:m,required:g,size:y,variant:x},v=$C(T),[E,w]=C.useState(()=>{let _=!1;return o&&C.Children.forEach(o,z=>{if(!ts(z,["Input","Select"]))return;const B=ts(z,["Select"])?z.props.input:z;B&&DC(B.props)&&(_=!0)}),_}),[S,R]=C.useState(()=>{let _=!1;return o&&C.Children.forEach(o,z=>{ts(z,["Input","Select"])&&(ci(z.props,!0)||ci(z.props.inputProps,!0))&&(_=!0)}),_}),[j,M]=C.useState(!1);u&&j&&M(!1);const I=p!==void 0&&!u?p:j;let k;const D=C.useRef(!1);process.env.NODE_ENV!=="production"&&(k=()=>(D.current&&console.error(["MUI: There are multiple `InputBase` components inside a FormControl.","This creates visual inconsistencies, only use one `InputBase`."].join(`
|
|
69
|
-
`)),D.current=!0,()=>{D.current=!1}));const O=C.useCallback(()=>{R(!0)},[]),P=C.useCallback(()=>{R(!1)},[]),N=C.useMemo(()=>({adornedStart:E,setAdornedStart:w,color:a,disabled:u,error:d,filled:S,focused:I,fullWidth:f,hiddenLabel:h,size:y,onBlur:()=>{M(!1)},onFocus:()=>{M(!0)},onEmpty:P,onFilled:O,registerEffect:k,required:g,variant:x}),[E,a,u,d,S,I,f,h,k,P,O,g,y,x]);return c.jsxRuntimeExports.jsx(Wi.Provider,{value:N,children:c.jsxRuntimeExports.jsx(zC,{as:l,ownerState:T,className:c.clsx(v.root,i),ref:n,...b,children:o})})});process.env.NODE_ENV!=="production"&&(wf.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),component:s.elementType,disabled:s.bool,error:s.bool,focused:s.bool,fullWidth:s.bool,hiddenLabel:s.bool,margin:s.oneOf(["dense","none","normal"]),required:s.bool,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOf(["filled","outlined","standard"])});function no(){return C.useContext(Wi)}function ro({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}function LC(e){return c.generateUtilityClass("MuiFormLabel",e)}const kr=c.generateUtilityClasses("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),FC=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:l}=e,u={root:["root",`color${c.capitalize(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",i&&"error"]};return c.composeClasses(u,LC,t)},BC=c.styled("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(c.memoTheme(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{[`&.${kr.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${kr.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${kr.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),UC=c.styled("span",{name:"MuiFormLabel",slot:"Asterisk"})(c.memoTheme(({theme:e})=>({[`&.${kr.error}`]:{color:(e.vars||e).palette.error.main}}))),Cf=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:l="label",disabled:u,error:d,filled:p,focused:f,required:h,...m}=r,g=no(),y=ro({props:r,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),x={...r,color:y.color||"primary",component:l,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required},b=FC(x);return c.jsxRuntimeExports.jsxs(BC,{as:l,ownerState:x,className:c.clsx(b.root,i),ref:n,...m,children:[o,y.required&&c.jsxRuntimeExports.jsxs(UC,{ownerState:x,"aria-hidden":!0,className:b.asterisk,children:[" ","*"]})]})});process.env.NODE_ENV!=="production"&&(Cf.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["error","info","primary","secondary","success","warning"]),s.string]),component:s.elementType,disabled:s.bool,error:s.bool,filled:s.bool,focused:s.bool,required:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function VC(e){return c.generateUtilityClass("MuiInputLabel",e)}c.generateUtilityClasses("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const WC=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:l}=e,u={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="medium"&&`size${c.capitalize(r)}`,a],asterisk:[l&&"asterisk"]},d=c.composeClasses(u,VC,t);return{...t,...d}},GC=c.styled(Cf,{shouldForwardProp:e=>c.rootShouldForwardProp(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${kr.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(c.memoTheme(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Rf=C.forwardRef(function(t,n){const r=c.useDefaultProps({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:l,className:u,...d}=r,p=no();let f=a;typeof f>"u"&&p&&(f=p.filled||p.focused||p.adornedStart);const h=ro({props:r,muiFormControl:p,states:["size","variant","required","focused"]}),m={...r,disableAnimation:o,formControl:p,shrink:f,size:h.size,variant:h.variant,required:h.required,focused:h.focused},g=WC(m);return c.jsxRuntimeExports.jsx(GC,{"data-shrink":f,ref:n,className:c.clsx(g.root,u),...d,ownerState:m,classes:g})});process.env.NODE_ENV!=="production"&&(Rf.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["error","info","primary","secondary","success","warning"]),s.string]),disableAnimation:s.bool,disabled:s.bool,error:s.bool,focused:s.bool,margin:s.oneOf(["dense"]),required:s.bool,shrink:s.bool,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOf(["filled","outlined","standard"])});function HC(e){return c.generateUtilityClass("MuiNativeSelect",e)}const fl=c.generateUtilityClasses("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),qC=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${c.capitalize(n)}`,i&&"iconOpen",r&&"disabled"]};return c.composeClasses(l,HC,t)},jf=c.styled("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${fl.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),YC=c.styled(jf,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:c.rootShouldForwardProp,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${fl.multiple}`]:t.multiple}]}})({}),Mf=c.styled("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${fl.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),KC=c.styled(Mf,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${c.capitalize(n.variant)}`],n.open&&t.iconOpen]}})({}),Of=C.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:l,variant:u="standard",...d}=t,p={...t,disabled:o,variant:u,error:i},f=qC(p);return c.jsxRuntimeExports.jsxs(C.Fragment,{children:[c.jsxRuntimeExports.jsx(YC,{ownerState:p,className:c.clsx(f.select,r),disabled:o,ref:l||n,...d}),t.multiple?null:c.jsxRuntimeExports.jsx(KC,{as:a,ownerState:p,className:f.icon})]})});process.env.NODE_ENV!=="production"&&(Of.propTypes={children:s.node,classes:s.object,className:s.string,disabled:s.bool,error:s.bool,IconComponent:s.elementType.isRequired,inputRef:c.refType,multiple:s.bool,name:s.string,onChange:s.func,value:s.any,variant:s.oneOf(["standard","outlined","filled"])});function If(e){return c.generateUtilityClass("MuiSelect",e)}const vr=c.generateUtilityClasses("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Uu;const XC=c.styled(jf,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${vr.select}`]:t.select},{[`&.${vr.select}`]:t[n.variant]},{[`&.${vr.error}`]:t.error},{[`&.${vr.multiple}`]:t.multiple}]}})({[`&.${vr.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),JC=c.styled(Mf,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${c.capitalize(n.variant)}`],n.open&&t.iconOpen]}})({}),ZC=c.styled("input",{shouldForwardProp:e=>c.slotShouldForwardProp(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Vu(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function QC(e){return e==null||typeof e=="string"&&!e.trim()}const eR=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${c.capitalize(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return c.composeClasses(l,If,t)},Pf=C.forwardRef(function(t,n){var at,ot,St,Jt;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:l,className:u,defaultOpen:d,defaultValue:p,disabled:f,displayEmpty:h,error:m=!1,IconComponent:g,inputRef:y,labelId:x,MenuProps:b={},multiple:T,name:v,onBlur:E,onChange:w,onClose:S,onFocus:R,onKeyDown:j,onMouseDown:M,onOpen:I,open:k,readOnly:D,renderValue:O,required:P,SelectDisplayProps:N={},tabIndex:_,type:z,value:B,variant:W="standard",...K}=t,[$,ne]=Lo({controlled:B,default:p,name:"Select"}),[le,xe]=Lo({controlled:k,default:d,name:"Select"}),de=C.useRef(null),pe=C.useRef(null),[fe,he]=C.useState(null),{current:U}=C.useRef(k!=null),[V,G]=C.useState(),A=c.useForkRef(n,y),Z=C.useCallback(Y=>{pe.current=Y,Y&&he(Y)},[]),q=fe==null?void 0:fe.parentNode;C.useImperativeHandle(A,()=>({focus:()=>{pe.current.focus()},node:de.current,value:$}),[$]);const oe=fe!==null&≤C.useEffect(()=>{if(!oe||!q||a||typeof ResizeObserver>"u")return;const Y=new ResizeObserver(()=>{G(q.clientWidth)});return Y.observe(q),()=>{Y.disconnect()}},[oe,q,a]),C.useEffect(()=>{d&&le&&fe&&!U&&(G(a?null:q.clientWidth),pe.current.focus())},[fe,a]),C.useEffect(()=>{i&&pe.current.focus()},[i]),C.useEffect(()=>{if(!x)return;const Y=Ve(pe.current).getElementById(x);if(Y){const re=()=>{getSelection().isCollapsed&&pe.current.focus()};return Y.addEventListener("click",re),()=>{Y.removeEventListener("click",re)}}},[x]);const me=(Y,re)=>{Y?I&&I(re):S&&S(re),U||(G(a?null:q.clientWidth),xe(Y))},ae=Y=>{M==null||M(Y),Y.button===0&&(Y.preventDefault(),pe.current.focus(),me(!0,Y))},ve=Y=>{me(!1,Y)},Re=C.Children.toArray(l),ke=Y=>{const re=Re.find(Ae=>Ae.props.value===Y.target.value);re!==void 0&&(ne(re.props.value),w&&w(Y,re))},Ee=Y=>re=>{let Ae;if(re.currentTarget.hasAttribute("tabindex")){if(T){Ae=Array.isArray($)?$.slice():[];const Xe=$.indexOf(Y.props.value);Xe===-1?Ae.push(Y.props.value):Ae.splice(Xe,1)}else Ae=Y.props.value;if(Y.props.onClick&&Y.props.onClick(re),$!==Ae&&(ne(Ae),w)){const Xe=re.nativeEvent||re,Ye=new Xe.constructor(Xe.type,Xe);Object.defineProperty(Ye,"target",{writable:!0,value:{value:Ae,name:v}}),w(Ye,Y)}T||me(!1,re)}},Ue=Y=>{D||([" ","ArrowUp","ArrowDown","Enter"].includes(Y.key)&&(Y.preventDefault(),me(!0,Y)),j==null||j(Y))},ze=Y=>{!oe&&E&&(Object.defineProperty(Y,"target",{writable:!0,value:{value:$,name:v}}),E(Y))};delete K["aria-invalid"];let je,F;const H=[];let J=!1,ie=!1;(ci({value:$})||h)&&(O?je=O($):J=!0);const ge=Re.map(Y=>{if(!C.isValidElement(Y))return null;process.env.NODE_ENV!=="production"&&c.reactIsExports.isFragment(Y)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
70
|
-
`));let re;if(T){if(!Array.isArray($))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":c.formatMuiErrorMessage(2));re=$.some(Ae=>Vu(Ae,Y.props.value)),re&&J&&H.push(Y.props.children)}else re=Vu($,Y.props.value),re&&J&&(F=Y.props.children);return re&&(ie=!0),C.cloneElement(Y,{"aria-selected":re?"true":"false",onClick:Ee(Y),onKeyUp:Ae=>{Ae.key===" "&&Ae.preventDefault(),Y.props.onKeyUp&&Y.props.onKeyUp(Ae)},role:"option",selected:re,value:void 0,"data-value":Y.props.value})});process.env.NODE_ENV!=="production"&&C.useEffect(()=>{if(!ie&&!T&&$!==""){const Y=Re.map(re=>re.props.value);console.warn([`MUI: You have provided an out-of-range value \`${$}\` for the select ${v?`(name="${v}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${Y.filter(re=>re!=null).map(re=>`\`${re}\``).join(", ")||'""'}.`].join(`
|
|
71
|
-
`))}},[ie,Re,T,v,$]),J&&(T?H.length===0?je=null:je=H.reduce((Y,re,Ae)=>(Y.push(re),Ae<H.length-1&&Y.push(", "),Y),[]):je=F);let ee=V;!a&&U&&fe&&(ee=q.clientWidth);let Q;typeof _<"u"?Q=_:Q=f?null:0;const Me=N.id||(v?`mui-component-select-${v}`:void 0),ye={...t,variant:W,value:$,open:oe,error:m},Se=eR(ye),qe={...b.PaperProps,...typeof((at=b.slotProps)==null?void 0:at.paper)=="function"?b.slotProps.paper(ye):(ot=b.slotProps)==null?void 0:ot.paper},$t={...b.MenuListProps,...typeof((St=b.slotProps)==null?void 0:St.list)=="function"?b.slotProps.list(ye):(Jt=b.slotProps)==null?void 0:Jt.list},Tt=c.useId();return c.jsxRuntimeExports.jsxs(C.Fragment,{children:[c.jsxRuntimeExports.jsx(XC,{as:"div",ref:Z,tabIndex:Q,role:"combobox","aria-controls":oe?Tt:void 0,"aria-disabled":f?"true":void 0,"aria-expanded":oe?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[x,Me].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":P?"true":void 0,"aria-invalid":m?"true":void 0,onKeyDown:Ue,onMouseDown:f||D?null:ae,onBlur:ze,onFocus:R,...N,ownerState:ye,className:c.clsx(N.className,Se.select,u),id:Me,children:QC(je)?Uu||(Uu=c.jsxRuntimeExports.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):je}),c.jsxRuntimeExports.jsx(ZC,{"aria-invalid":m,value:Array.isArray($)?$.join(","):$,name:v,ref:de,"aria-hidden":!0,onChange:ke,tabIndex:-1,disabled:f,className:Se.nativeInput,autoFocus:i,required:P,...K,ownerState:ye}),c.jsxRuntimeExports.jsx(JC,{as:g,className:Se.icon,ownerState:ye}),c.jsxRuntimeExports.jsx(la,{id:`menu-${v||""}`,anchorEl:q,open:oe,onClose:ve,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...b,slotProps:{...b.slotProps,list:{"aria-labelledby":x,role:"listbox","aria-multiselectable":T?"true":void 0,disableListWrap:!0,id:Tt,...$t},paper:{...qe,style:{minWidth:ee,...qe!=null?qe.style:null}}},children:ge})]})});process.env.NODE_ENV!=="production"&&(Pf.propTypes={"aria-describedby":s.string,"aria-label":s.string,autoFocus:s.bool,autoWidth:s.bool,children:s.node,classes:s.object,className:s.string,defaultOpen:s.bool,defaultValue:s.any,disabled:s.bool,displayEmpty:s.bool,error:s.bool,IconComponent:s.elementType.isRequired,inputRef:c.refType,labelId:s.string,MenuProps:s.object,multiple:s.bool,name:s.string,onBlur:s.func,onChange:s.func,onClose:s.func,onFocus:s.func,onOpen:s.func,open:s.bool,readOnly:s.bool,renderValue:s.func,required:s.bool,SelectDisplayProps:s.object,tabIndex:s.oneOfType([s.number,s.string]),type:s.any,value:s.any,variant:s.oneOf(["standard","outlined","filled"])});const tR=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Io(e){return parseInt(e,10)||0}const nR={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function rR(e){for(const t in e)return!1;return!0}function Wu(e){return rR(e)||e.outerHeightStyle===0&&!e.overflowing}const kf=C.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:l,...u}=t,{current:d}=C.useRef(l!=null),p=C.useRef(null),f=c.useForkRef(n,p),h=C.useRef(null),m=C.useRef(null),g=C.useCallback(()=>{const v=p.current,E=m.current;if(!v||!E)return;const S=ht(v).getComputedStyle(v);if(S.width==="0px")return{outerHeightStyle:0,overflowing:!1};E.style.width=S.width,E.value=v.value||t.placeholder||"x",E.value.slice(-1)===`
|
|
72
|
-
`&&(E.value+=" ");const R=S.boxSizing,j=Io(S.paddingBottom)+Io(S.paddingTop),M=Io(S.borderBottomWidth)+Io(S.borderTopWidth),I=E.scrollHeight;E.value="x";const k=E.scrollHeight;let D=I;i&&(D=Math.max(Number(i)*k,D)),o&&(D=Math.min(Number(o)*k,D)),D=Math.max(D,k);const O=D+(R==="border-box"?j+M:0),P=Math.abs(D-I)<=1;return{outerHeightStyle:O,overflowing:P}},[o,i,t.placeholder]),y=c.useEventCallback(()=>{const v=p.current,E=g();if(!v||!E||Wu(E))return!1;const w=E.outerHeightStyle;return h.current!=null&&h.current!==w}),x=C.useCallback(()=>{const v=p.current,E=g();if(!v||!E||Wu(E))return;const w=E.outerHeightStyle;h.current!==w&&(h.current=w,v.style.height=`${w}px`),v.style.overflow=E.overflowing?"hidden":""},[g]),b=C.useRef(-1);c.useEnhancedEffect(()=>{const v=fi(x),E=p==null?void 0:p.current;if(!E)return;const w=ht(E);w.addEventListener("resize",v);let S;return typeof ResizeObserver<"u"&&(S=new ResizeObserver(()=>{y()&&(S.unobserve(E),cancelAnimationFrame(b.current),x(),b.current=requestAnimationFrame(()=>{S.observe(E)}))}),S.observe(E)),()=>{v.clear(),cancelAnimationFrame(b.current),w.removeEventListener("resize",v),S&&S.disconnect()}},[g,x,y]),c.useEnhancedEffect(()=>{x()});const T=v=>{d||x();const E=v.target,w=E.value.length,S=E.value.endsWith(`
|
|
73
|
-
`),R=E.selectionStart===w;S&&R&&E.setSelectionRange(w,w),r&&r(v)};return c.jsxRuntimeExports.jsxs(C.Fragment,{children:[c.jsxRuntimeExports.jsx("textarea",{value:l,onChange:T,ref:f,rows:i,style:a,...u}),c.jsxRuntimeExports.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:m,tabIndex:-1,style:{...nR.shadow,...a,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(kf.propTypes={className:s.string,maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),onChange:s.func,placeholder:s.string,style:s.object,value:s.oneOfType([s.arrayOf(s.string),s.number,s.string])});function oR(e){return c.generateUtilityClass("MuiInputBase",e)}const tr=c.generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Gu;const Gi=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${c.capitalize(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Hi=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},iR=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:l,fullWidth:u,hiddenLabel:d,multiline:p,readOnly:f,size:h,startAdornment:m,type:g}=e,y={root:["root",`color${c.capitalize(n)}`,r&&"disabled",o&&"error",u&&"fullWidth",a&&"focused",l&&"formControl",h&&h!=="medium"&&`size${c.capitalize(h)}`,p&&"multiline",m&&"adornedStart",i&&"adornedEnd",d&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",g==="search"&&"inputTypeSearch",p&&"inputMultiline",h==="small"&&"inputSizeSmall",d&&"inputHiddenLabel",m&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return c.composeClasses(y,oR,t)},qi=c.styled("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Gi})(c.memoTheme(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${tr.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),Yi=c.styled("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Hi})(c.memoTheme(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${tr.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${tr.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),Hu=c.globalCss({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Ki=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:l,color:u,components:d={},componentsProps:p={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:m,endAdornment:g,error:y,fullWidth:x=!1,id:b,inputComponent:T="input",inputProps:v={},inputRef:E,margin:w,maxRows:S,minRows:R,multiline:j=!1,name:M,onBlur:I,onChange:k,onClick:D,onFocus:O,onKeyDown:P,onKeyUp:N,placeholder:_,readOnly:z,renderSuffix:B,rows:W,size:K,slotProps:$={},slots:ne={},startAdornment:le,type:xe="text",value:de,...pe}=r,fe=v.value!=null?v.value:de,{current:he}=C.useRef(fe!=null),U=C.useRef(),V=C.useCallback(Q=>{process.env.NODE_ENV!=="production"&&Q&&Q.nodeName!=="INPUT"&&!Q.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
74
|
-
`))},[]),G=c.useForkRef(U,E,v.ref,V),[A,Z]=C.useState(!1),q=no();process.env.NODE_ENV!=="production"&&C.useEffect(()=>{if(q)return q.registerEffect()},[q]);const oe=ro({props:r,muiFormControl:q,states:["color","disabled","error","hiddenLabel","size","required","filled"]});oe.focused=q?q.focused:A,C.useEffect(()=>{!q&&h&&A&&(Z(!1),I&&I())},[q,h,A,I]);const me=q&&q.onFilled,ae=q&&q.onEmpty,ve=C.useCallback(Q=>{ci(Q)?me&&me():ae&&ae()},[me,ae]);c.useEnhancedEffect(()=>{he&&ve({value:fe})},[fe,ve,he]);const Re=Q=>{O&&O(Q),v.onFocus&&v.onFocus(Q),q&&q.onFocus?q.onFocus(Q):Z(!0)},ke=Q=>{I&&I(Q),v.onBlur&&v.onBlur(Q),q&&q.onBlur?q.onBlur(Q):Z(!1)},Ee=(Q,...Me)=>{if(!he){const ye=Q.target||U.current;if(ye==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":c.formatMuiErrorMessage(1));ve({value:ye.value})}v.onChange&&v.onChange(Q,...Me),k&&k(Q,...Me)};C.useEffect(()=>{ve(U.current)},[]);const Ue=Q=>{U.current&&Q.currentTarget===Q.target&&U.current.focus(),D&&D(Q)};let ze=T,je=v;j&&ze==="input"&&(W?(process.env.NODE_ENV!=="production"&&(R||S)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),je={type:void 0,minRows:W,maxRows:W,...je}):je={type:void 0,maxRows:S,minRows:R,...je},ze=kf);const F=Q=>{ve(Q.animationName==="mui-auto-fill-cancel"?U.current:{value:"x"})};C.useEffect(()=>{q&&q.setAdornedStart(!!le)},[q,le]);const H={...r,color:oe.color||"primary",disabled:oe.disabled,endAdornment:g,error:oe.error,focused:oe.focused,formControl:q,fullWidth:x,hiddenLabel:oe.hiddenLabel,multiline:j,size:oe.size,startAdornment:le,type:xe},J=iR(H),ie=ne.root||d.Root||qi,ge=$.root||p.root||{},ee=ne.input||d.Input||Yi;return je={...je,...$.input??p.input},c.jsxRuntimeExports.jsxs(C.Fragment,{children:[!m&&typeof Hu=="function"&&(Gu||(Gu=c.jsxRuntimeExports.jsx(Hu,{}))),c.jsxRuntimeExports.jsxs(ie,{...ge,ref:n,onClick:Ue,...pe,...!c.isHostComponent(ie)&&{ownerState:{...H,...ge.ownerState}},className:c.clsx(J.root,ge.className,l,z&&"MuiInputBase-readOnly"),children:[le,c.jsxRuntimeExports.jsx(Wi.Provider,{value:null,children:c.jsxRuntimeExports.jsx(ee,{"aria-invalid":oe.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:f,disabled:oe.disabled,id:b,onAnimationStart:F,name:M,placeholder:_,readOnly:z,required:oe.required,rows:W,value:fe,onKeyDown:P,onKeyUp:N,type:xe,...je,...!c.isHostComponent(ee)&&{as:ze,ownerState:{...H,...je.ownerState}},ref:G,className:c.clsx(J.input,je.className,z&&"MuiInputBase-readOnly"),onBlur:ke,onChange:Ee,onFocus:Re})}),g,B?B({...oe,startAdornment:le}):null]})]})});process.env.NODE_ENV!=="production"&&(Ki.propTypes={"aria-describedby":s.string,autoComplete:s.string,autoFocus:s.bool,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),componentsProps:s.shape({input:s.object,root:s.object}),defaultValue:s.any,disabled:s.bool,disableInjectingGlobalStyles:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,id:s.string,inputComponent:c.elementTypeAcceptingRef,inputProps:s.object,inputRef:c.refType,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onBlur:s.func,onChange:s.func,onClick:s.func,onFocus:s.func,onInvalid:s.func,onKeyDown:s.func,onKeyUp:s.func,placeholder:s.string,readOnly:s.bool,renderSuffix:s.func,required:s.bool,rows:s.oneOfType([s.number,s.string]),size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),slotProps:s.shape({input:s.object,root:s.object}),slots:s.shape({input:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});function sR(e){return c.generateUtilityClass("MuiInput",e)}const Er={...tr,...c.generateUtilityClasses("MuiInput",["root","underline","input"])},aR=e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},o=c.composeClasses(r,sR,t);return{...t,...o}},lR=c.styled(qi,{shouldForwardProp:e=>c.rootShouldForwardProp(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Gi(e,t),!n.disableUnderline&&t.underline]}})(c.memoTheme(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Er.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Er.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Er.disabled}, .${Er.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Er.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),cR=c.styled(Yi,{name:"MuiInput",slot:"Input",overridesResolver:Hi})({}),hl=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:l=!1,inputComponent:u="input",multiline:d=!1,slotProps:p,slots:f={},type:h="text",...m}=r,g=aR(r),x={root:{ownerState:{disableUnderline:o}}},b=p??a?c.deepmerge(p??a,x):x,T=f.root??i.Root??lR,v=f.input??i.Input??cR;return c.jsxRuntimeExports.jsx(Ki,{slots:{root:T,input:v},slotProps:b,fullWidth:l,inputComponent:u,multiline:d,ref:n,type:h,...m,classes:g})});process.env.NODE_ENV!=="production"&&(hl.propTypes={autoComplete:s.string,autoFocus:s.bool,classes:s.object,color:s.oneOfType([s.oneOf(["primary","secondary"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),componentsProps:s.shape({input:s.object,root:s.object}),defaultValue:s.any,disabled:s.bool,disableUnderline:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,id:s.string,inputComponent:s.elementType,inputProps:s.object,inputRef:c.refType,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onChange:s.func,placeholder:s.string,readOnly:s.bool,required:s.bool,rows:s.oneOfType([s.number,s.string]),slotProps:s.shape({input:s.object,root:s.object}),slots:s.shape({input:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});hl.muiName="Input";function uR(e){return c.generateUtilityClass("MuiFilledInput",e)}const hn={...tr,...c.generateUtilityClasses("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},dR=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:l}=e,u={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${c.capitalize(i)}`,a&&"hiddenLabel",l&&"multiline"],input:["input"]},d=c.composeClasses(u,uR,t);return{...t,...d}},pR=c.styled(qi,{shouldForwardProp:e=>c.rootShouldForwardProp(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Gi(e,t),!n.disableUnderline&&t.underline]}})(c.memoTheme(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${hn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${hn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${hn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${hn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${hn.disabled}, .${hn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${hn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter()).map(([a])=>{var l;return{props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(l=(e.vars||e).palette[a])==null?void 0:l.main}`}}}}),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:l})=>a.multiline&&l==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),fR=c.styled(Yi,{name:"MuiFilledInput",slot:"Input",overridesResolver:Hi})(c.memoTheme(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),ml=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:l=!1,hiddenLabel:u,inputComponent:d="input",multiline:p=!1,slotProps:f,slots:h={},type:m="text",...g}=r,y={...r,disableUnderline:o,fullWidth:l,inputComponent:d,multiline:p,type:m},x=dR(r),b={root:{ownerState:y},input:{ownerState:y}},T=f??a?c.deepmerge(b,f??a):b,v=h.root??i.Root??pR,E=h.input??i.Input??fR;return c.jsxRuntimeExports.jsx(Ki,{slots:{root:v,input:E},slotProps:T,fullWidth:l,inputComponent:d,multiline:p,ref:n,type:m,...g,classes:x})});process.env.NODE_ENV!=="production"&&(ml.propTypes={autoComplete:s.string,autoFocus:s.bool,classes:s.object,color:s.oneOfType([s.oneOf(["primary","secondary"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),componentsProps:s.shape({input:s.object,root:s.object}),defaultValue:s.any,disabled:s.bool,disableUnderline:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,hiddenLabel:s.bool,id:s.string,inputComponent:s.elementType,inputProps:s.object,inputRef:c.refType,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onChange:s.func,placeholder:s.string,readOnly:s.bool,required:s.bool,rows:s.oneOfType([s.number,s.string]),slotProps:s.shape({input:s.object,root:s.object}),slots:s.shape({input:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});ml.muiName="Input";var qu;const hR=c.styled("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:c.rootShouldForwardProp})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),mR=c.styled("legend",{name:"MuiNotchedOutlined",shouldForwardProp:c.rootShouldForwardProp})(c.memoTheme(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Af(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,l=o!=null&&o!=="",u={...e,notched:i,withLabel:l};return c.jsxRuntimeExports.jsx(hR,{"aria-hidden":!0,className:r,ownerState:u,...a,children:c.jsxRuntimeExports.jsx(mR,{ownerState:u,children:l?c.jsxRuntimeExports.jsx("span",{children:o}):qu||(qu=c.jsxRuntimeExports.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}process.env.NODE_ENV!=="production"&&(Af.propTypes={children:s.node,classes:s.object,className:s.string,label:s.node,notched:s.bool.isRequired,style:s.object});function gR(e){return c.generateUtilityClass("MuiOutlinedInput",e)}const Rt={...tr,...c.generateUtilityClasses("MuiOutlinedInput",["root","notchedOutline","input"])},xR=e=>{const{classes:t}=e,n={root:["root"],notchedOutline:["notchedOutline"],input:["input"]},r=c.composeClasses(n,gR,t);return{...t,...r}},yR=c.styled(qi,{shouldForwardProp:e=>c.rootShouldForwardProp(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Gi})(c.memoTheme(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Rt.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Rt.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Rt.focused} .${Rt.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter()).map(([n])=>({props:{color:n},style:{[`&.${Rt.focused} .${Rt.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Rt.error} .${Rt.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Rt.disabled} .${Rt.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),bR=c.styled(Af,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(c.memoTheme(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),vR=c.styled(Yi,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Hi})(c.memoTheme(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),gl=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiOutlinedInput"}),{components:o={},fullWidth:i=!1,inputComponent:a="input",label:l,multiline:u=!1,notched:d,slots:p={},slotProps:f={},type:h="text",...m}=r,g=xR(r),y=no(),x=ro({props:r,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...r,color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:y,fullWidth:i,hiddenLabel:x.hiddenLabel,multiline:u,size:x.size,type:h},T=p.root??o.Root??yR,v=p.input??o.Input??vR,[E,w]=c.useSlot("notchedOutline",{elementType:bR,className:g.notchedOutline,shouldForwardComponentProp:!0,ownerState:b,externalForwardedProps:{slots:p,slotProps:f},additionalProps:{label:l!=null&&l!==""&&x.required?c.jsxRuntimeExports.jsxs(C.Fragment,{children:[l," ","*"]}):l}});return c.jsxRuntimeExports.jsx(Ki,{slots:{root:T,input:v},slotProps:f,renderSuffix:S=>c.jsxRuntimeExports.jsx(E,{...w,notched:typeof d<"u"?d:!!(S.startAdornment||S.filled||S.focused)}),fullWidth:i,inputComponent:a,multiline:u,ref:n,type:h,...m,classes:{...g,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(gl.propTypes={autoComplete:s.string,autoFocus:s.bool,classes:s.object,color:s.oneOfType([s.oneOf(["primary","secondary"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),defaultValue:s.any,disabled:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,id:s.string,inputComponent:s.elementType,inputProps:s.object,inputRef:c.refType,label:s.node,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,notched:s.bool,onChange:s.func,placeholder:s.string,readOnly:s.bool,required:s.bool,rows:s.oneOfType([s.number,s.string]),slotProps:s.shape({input:s.object,notchedOutline:s.oneOfType([s.func,s.object]),root:s.object}),slots:s.shape({input:s.elementType,notchedOutline:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});gl.muiName="Input";const ER=e=>{const{classes:t}=e,n={root:["root"]},r=c.composeClasses(n,If,t);return{...t,...r}},xl={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>c.rootShouldForwardProp(e)&&e!=="variant"},TR=c.styled(hl,xl)(""),SR=c.styled(gl,xl)(""),wR=c.styled(ml,xl)(""),yl=C.forwardRef(function(t,n){const r=c.useDefaultProps({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:l,defaultOpen:u=!1,displayEmpty:d=!1,IconComponent:p=tR,id:f,input:h,inputProps:m,label:g,labelId:y,MenuProps:x,multiple:b=!1,native:T=!1,onClose:v,onOpen:E,open:w,renderValue:S,SelectDisplayProps:R,variant:j="outlined",...M}=r,I=T?Of:Pf,k=no(),D=ro({props:r,muiFormControl:k,states:["variant","error"]}),O=D.variant||j,P={...r,variant:O,classes:a},N=ER(P),{root:_,...z}=N,B=h||{standard:c.jsxRuntimeExports.jsx(TR,{ownerState:P}),outlined:c.jsxRuntimeExports.jsx(SR,{label:g,ownerState:P}),filled:c.jsxRuntimeExports.jsx(wR,{ownerState:P})}[O],W=c.useForkRef(n,lr(B));return c.jsxRuntimeExports.jsx(C.Fragment,{children:C.cloneElement(B,{inputComponent:I,inputProps:{children:i,error:D.error,IconComponent:p,variant:O,type:void 0,multiple:b,...T?{id:f}:{autoWidth:o,defaultOpen:u,displayEmpty:d,labelId:y,MenuProps:x,onClose:v,onOpen:E,open:w,renderValue:S,SelectDisplayProps:{id:f,...R}},...m,classes:m?c.deepmerge(z,m.classes):z,...h?h.props.inputProps:{}},...(b&&T||d)&&O==="outlined"?{notched:!0}:{},ref:W,className:c.clsx(B.props.className,l,N.root),...!h&&{variant:O},...M})})});process.env.NODE_ENV!=="production"&&(yl.propTypes={autoWidth:s.bool,children:s.node,classes:s.object,className:s.string,defaultOpen:s.bool,defaultValue:s.any,displayEmpty:s.bool,IconComponent:s.elementType,id:s.string,input:s.element,inputProps:s.object,label:s.node,labelId:s.string,MenuProps:s.object,multiple:s.bool,native:s.bool,onChange:s.func,onClose:s.func,onOpen:s.func,open:s.bool,renderValue:s.func,SelectDisplayProps:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.oneOfType([s.oneOf([""]),s.any]),variant:s.oneOf(["filled","outlined","standard"])});yl.muiName="Select";const CR=c.styled(wf)(({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 c.jsxRuntimeExports.jsxs(CR,{fullWidth:!0,variant:"filled",children:[c.jsxRuntimeExports.jsx(Rf,{id:t.labelId,children:e}),c.jsxRuntimeExports.jsx(yl,{...t})]})}var Yu=(function(){try{var e=Nn(Object,"defineProperty");return e({},"",{}),e}catch{}})();function RR(e,t,n){t=="__proto__"&&Yu?Yu(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function jR(e,t,n,r){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function MR(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[++o];if(n(i[u],u,i)===!1)break}return t}}var OR=MR();function IR(e,t){return e&&OR(e,t,pl)}function PR(e,t){return function(n,r){if(n==null)return n;if(!Tf(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var kR=PR(IR);function AR(e,t,n,r){return kR(e,function(o,i,a){t(r,o,n(o),a)}),r}var _R=1,DR=2;function NR(e,t,n,r){var o=n.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var a=n[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){a=n[o];var l=a[0],u=e[l],d=a[1];if(a[2]){if(u===void 0&&!(l in e))return!1}else{var p=new Bt,f;if(!(f===void 0?Vi(d,u,_R|DR,r,p):f))return!1}}return!0}function _f(e){return e===e&&!jn(e)}function $R(e){for(var t=pl(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,_f(o)]}return t}function Df(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function zR(e){var t=$R(e);return t.length==1&&t[0][2]?Df(t[0][0],t[0][1]):function(n){return n===e||NR(n,e,t)}}var LR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FR=/^\w*$/;function bl(e,t){if(kt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||zi(e)?!0:FR.test(e)||!LR.test(e)||t!=null&&e in Object(t)}var BR="Expected a function";function vl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(BR);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(vl.Cache||Xt),n}vl.Cache=Xt;var UR=500;function VR(e){var t=vl(e,function(r){return n.size===UR&&n.clear(),r}),n=t.cache;return t}var WR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,GR=/\\(\\)?/g,HR=VR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WR,function(n,r,o,i){t.push(o?i.replace(GR,"$1"):r||n)}),t});function qR(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Ku=nn?nn.prototype:void 0,Xu=Ku?Ku.toString:void 0;function Nf(e){if(typeof e=="string")return e;if(kt(e))return qR(e,Nf)+"";if(zi(e))return Xu?Xu.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function $f(e){return e==null?"":Nf(e)}function zf(e,t){return kt(e)?e:bl(e,t)?[e]:HR($f(e))}function Xi(e){if(typeof e=="string"||zi(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Lf(e,t){t=zf(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Xi(t[n++])];return n&&n==r?e:void 0}function YR(e,t,n){var r=e==null?void 0:Lf(e,t);return r===void 0?n:r}function KR(e,t){return e!=null&&t in Object(e)}function XR(e,t,n){t=zf(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=Xi(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&dl(o)&&bf(a,o)&&(kt(e)||xf(e)))}function JR(e,t){return e!=null&&XR(e,t,KR)}var ZR=1,QR=2;function ej(e,t){return bl(e)&&_f(t)?Df(Xi(e),t):function(n){var r=YR(n,e);return r===void 0&&r===t?JR(n,e):Vi(t,r,ZR|QR)}}function tj(e){return e}function nj(e){return function(t){return t==null?void 0:t[e]}}function rj(e){return function(t){return Lf(t,e)}}function oj(e){return bl(e)?nj(Xi(e)):rj(e)}function ij(e){return typeof e=="function"?e:e==null?tj:typeof e=="object"?kt(e)?ej(e[0],e[1]):zR(e):oj(e)}function sj(e,t){return function(n,r){var o=kt(n)?jR:AR,i={};return o(n,e,ij(r),i)}}var ko=sj(function(e,t,n){RR(e,n,t)}),aj=0;function lj(e){var t=++aj;return $f(e)+t}const ta=[{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}],cj=[{id:"continuous"},...ta],uj=["coordsys","tool"];class Ji{constructor(t,n,r,o,i){var a,l,u,d;this.jogger=t,this.coordSystems=n,this.motionGroupDescription=r,this.tcps=o,this.inverseSolverValue=i,this.selectedTabId="cartesian",this.locks=new Set,this.blocked=!1,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=!1,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[],this.inverseSolver=void 0,this.jointType=c.JointTypeEnum.RevoluteJoint;for(const p of n)if(p.coordinate_system===""){p.coordinate_system="world";break}this.selectedCoordSystemId=((a=n[0])==null?void 0:a.coordinate_system)||"world",this.selectedTcpId=((l=o[0])==null?void 0:l.id)||"",this.inverseSolver=i,this.jointType=((d=(u=r==null?void 0:r.dh_parameters)==null?void 0:u[0])==null?void 0:d.type)??c.JointTypeEnum.RevoluteJoint,Ie.makeAutoObservable(this,{},{autoBind:!0}),this.jogger.onBlocked=()=>{this.block()},this.loadFromLocalStorage(),this.disposers.push(Ie.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:n}=t,[r,o]=await Promise.all([n.api.controller.listCoordinateSystems(t.motionStream.controllerId,"ROTATION_VECTOR"),n.api.motionGroup.getMotionGroupDescription(t.motionStream.controllerId,t.motionGroupId)]),i=await n.api.motionGroupModels.getMotionGroupKinematicModel(o.motion_group_model),a=Object.entries(o.tcps||{}).map(([l,u])=>({id:l,readable_name:u.name,position:u.pose.position,orientation:u.pose.orientation}));return new Ji(t,r||[],o,a,i.inverse_solver)}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return oa.countBy(this.coordSystems,t=>t.name)}async deactivate(){if(this.jogger.mode==="jogging")return this.jogger.stop()}async activate(){return this.currentTab.id==="cartesian"?((this.jogger.tcp!==this.selectedTcpId||this.jogger.orientation!==this.selectedOrientation)&&this.jogger.setOptions({tcp:this.selectedTcpId,orientation:this.selectedOrientation}),this.activeDiscreteIncrement?this.jogger.setJoggingMode("trajectory"):this.jogger.setJoggingMode("jogging")):this.jogger.setJoggingMode("jogging"),this.jogger}loadFromLocalStorage(){const t=Ge.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(){const t=[{id:"joint",label:"Joints"}];return this.inverseSolver!==null&&t.unshift({id:"cartesian",label:"Cartesian"}),t}get incrementOptions(){return cj}get discreteIncrementOptions(){return ta}get incrementOptionsById(){return ko(this.incrementOptions,t=>t.id)}get tabsById(){return ko(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 ko(this.coordSystems,t=>t.coordinate_system)}get activeCoordSystemId(){return this.selectedOrientation==="tool"?"tool":this.selectedCoordSystemId}get tcpsById(){return ko(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:ta.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}velocityInDisplayUnits(t){return t?this.rotationVelocityDegPerSec:this.translationVelocityMmPerSec}minVelocityInDisplayUnits(t){return t?this.minRotationVelocityDegPerSec:this.minTranslationVelocityMmPerSec}maxVelocityInDisplayUnits(t){return t?this.maxRotationVelocityDegPerSec:this.maxTranslationVelocityMmPerSec}onTabChange(t,n){const r=this.tabs[n]||this.tabs[0];this.selectedTabId=r.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,n){n?this.rotationVelocityDegPerSec=t:this.translationVelocityMmPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}block(){this.blocked=!0}unblock(){this.blocked=!1,this.jogger.mode==="jogging"&&this.jogger.initializeJoggingWebsocket()}async withMotionLock(t){const n=lj();this.lock(n);try{return await t()}finally{this.unlock(n)}}}const dj=Oe.observer(({store:e,useDegree:t})=>{var a;const{t:n}=Pe.useTranslation(),r=L.useId(),o=[];function i(l){switch(l){case"coordsys":return n("Jogging.Orientation.coordsys");case"tool":return n("Jogging.Orientation.tool");default:return l}}return e.showCoordSystemSelect&&o.push(c.jsxRuntimeExports.jsx(Po,{labelId:`jogging-coord-select-${r}`,labelValue:n("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:l=>e.setSelectedCoordSystemId(l.target.value),disabled:e.isLocked,children:e.coordSystems.map(l=>c.jsxRuntimeExports.jsx(yn,{value:l.coordinate_system,children:l.name&&e.coordSystemCountByName[l.name]>1?`${l.name} / ${l.coordinate_system}`:l.name||l.coordinate_system},l.coordinate_system))},"coord")),e.showTcpSelect&&o.push(c.jsxRuntimeExports.jsx(Po,{labelId:`jogging-tcp-select-${r}`,labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:l=>e.setSelectedTcpId(l.target.value),disabled:e.isLocked,children:e.tcps.map(l=>c.jsxRuntimeExports.jsx(yn,{value:l.id,children:l.id},l.id))},"tcp")),e.showOrientationSelect&&o.push(c.jsxRuntimeExports.jsx(Po,{labelValue:n("Jogging.Cartesian.Orientation.lb"),labelId:`orientation-select-${r}`,value:e.selectedOrientation,onChange:l=>e.setSelectedOrientation(l.target.value),disabled:e.isLocked,children:uj.map(l=>c.jsxRuntimeExports.jsx(yn,{value:l,children:i(l)},l))},"orientation")),e.showIncrementSelect&&o.push(c.jsxRuntimeExports.jsxs(Po,{labelValue:n("Jogging.Increment.hlb"),labelId:`jogging-increment-select-${r}`,size:"small",variant:"filled",value:((a=e.activeDiscreteIncrement)==null?void 0:a.id)||"continuous",onChange:l=>e.setSelectedIncrementId(l.target.value),disabled:e.isLocked,children:[c.jsxRuntimeExports.jsx(yn,{value:"continuous",children:n("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(l=>c.jsxRuntimeExports.jsx(yn,{value:l.id,children:t?`${l.degrees}°`:`${l.mm}mm`},l.id))]},"increment")),c.jsxRuntimeExports.jsx(c.Box,{component:"div","data-testid":"jogging-options","aria-label":"jogging-options",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:o.map((l,u)=>c.jsxRuntimeExports.jsx(c.Box,{sx:{gridColumn:o.length%2===1&&u===o.length-1?"span 2":"auto"},children:l},u))})});function pj(e){return C.Children.toArray(e).filter(t=>C.isValidElement(t))}function fj(e){return c.generateUtilityClass("MuiToggleButtonGroup",e)}const _e=c.generateUtilityClasses("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),hj=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${c.capitalize(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return c.composeClasses(i,fj,t)},mj=c.styled("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${_e.grouped}`]:t.grouped},{[`& .${_e.grouped}`]:t[`grouped${c.capitalize(n.orientation)}`]},{[`& .${_e.firstButton}`]:t.firstButton},{[`& .${_e.lastButton}`]:t.lastButton},{[`& .${_e.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(c.memoTheme(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${_e.grouped}`]:{[`&.${_e.selected} + .${_e.grouped}.${_e.selected}`]:{borderTop:0,marginTop:0}},[`& .${_e.firstButton},& .${_e.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${_e.lastButton},& .${_e.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${_e.lastButton}.${Tn.disabled},& .${_e.middleButton}.${Tn.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${_e.grouped}`]:{[`&.${_e.selected} + .${_e.grouped}.${_e.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${_e.firstButton},& .${_e.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${_e.lastButton},& .${_e.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${_e.lastButton}.${Tn.disabled},& .${_e.middleButton}.${Tn.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),Ff=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:i,color:a="standard",disabled:l=!1,exclusive:u=!1,fullWidth:d=!1,onChange:p,orientation:f="horizontal",size:h="medium",value:m,...g}=r,y={...r,disabled:l,fullWidth:d,orientation:f,size:h},x=hj(y),b=C.useCallback((R,j)=>{if(!p)return;const M=m&&m.indexOf(j);let I;m&&M>=0?(I=m.slice(),I.splice(M,1)):I=m?m.concat(j):[j],p(R,I)},[p,m]),T=C.useCallback((R,j)=>{p&&p(R,m===j?null:j)},[p,m]),v=C.useMemo(()=>({className:x.grouped,onChange:u?T:b,value:m,size:h,fullWidth:d,color:a,disabled:l}),[x.grouped,u,T,b,m,h,d,a,l]),E=pj(o),w=E.length,S=R=>{const j=R===0,M=R===w-1;return j&&M?"":j?x.firstButton:M?x.lastButton:x.middleButton};return c.jsxRuntimeExports.jsx(mj,{role:"group",className:c.clsx(x.root,i),ref:n,ownerState:y,...g,children:c.jsxRuntimeExports.jsx(cl.Provider,{value:v,children:E.map((R,j)=>(process.env.NODE_ENV!=="production"&&c.reactIsExports.isFragment(R)&&console.error(["MUI: The ToggleButtonGroup component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
75
|
-
`)),c.jsxRuntimeExports.jsx(ul.Provider,{value:S(j),children:R},j)))})})});process.env.NODE_ENV!=="production"&&(Ff.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["standard","primary","secondary","error","info","success","warning"]),s.string]),disabled:s.bool,exclusive:s.bool,fullWidth:s.bool,onChange:s.func,orientation:s.oneOf(["horizontal","vertical"]),size:s.oneOfType([s.oneOf(["small","medium","large"]),s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.any});const gj=c.styled(Ff)(({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"}}}}});var xj="[object Number]";function yj(e){return typeof e=="number"||Mn(e)&&_n(e)==xj}const Bf=Oe.observer(e=>{var i,a,l;const t=c.useTheme(),{store:n}=e,{t:r}=Pe.useTranslation();function o(u,d){d===e.velocity||!yj(d)||e.onVelocityChange(d,e.useDegree)}return c.jsxRuntimeExports.jsxs(Ce,{direction:"row",gap:2,alignItems:"center","data-testid":"velocity-slider","aria-label":"velocity-slider",children:[n.showVelocityLegend&&c.jsxRuntimeExports.jsx(c.Typography,{sx:{color:(l=(a=(i=t.componentsExt)==null?void 0:i.JoggingPanel)==null?void 0:a.VelocitySlider)==null?void 0:l.sliderLegendColor,fontSize:"14px"},children:r("Jogging.Velocity.bt")}),c.jsxRuntimeExports.jsx(ol,{value:e.velocity,color:"secondary",onChange:o,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),n.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):c.jsxRuntimeExports.jsx(El,{value:e.velocity.toString()}))]})});function El({value:e,sx:t}){var r;const n=c.useTheme();return c.jsxRuntimeExports.jsx(Ce,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(r=n.palette.backgroundPaperElevation)==null?void 0:r[8],borderRadius:"10px",minWidth:"111px",...t},children:c.jsxRuntimeExports.jsx(c.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:n.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Uf=Oe.observer(({store:e,useDegree:t})=>{const{t:n}=Pe.useTranslation();function r(o,i){return i?`ω = ${n("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:o})}`:`v = ${n("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:o})}`}return c.jsxRuntimeExports.jsx(Bf,{store:e,velocity:e.velocityInDisplayUnits(t),min:e.minVelocityInDisplayUnits(t),max:e.maxVelocityInDisplayUnits(t),onVelocityChange:e.setVelocityFromSlider,useDegree:t,disabled:e.isLocked,renderValue:o=>c.jsxRuntimeExports.jsx(El,{value:r(o,t),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),bj=Oe.observer(({store:e,children:t})=>{const{t:n}=Pe.useTranslation(),r=c.useTheme();function o(h,m){(m==="translate"||m==="rotate")&&e.setSelectedCartesianMotionType(m)}c.useReaction(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/controllers/${e.jogger.motionStream.controllerId}/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}`))},{fireImmediately:!0});async function i(h,m){const g=await e.activate(),y=g.motionStream.rapidlyChangingMotionState.tcp_pose,x=g.motionStream.rapidlyChangingMotionState.joint_position;y&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:y,currentJoints:x,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:m.mm}:{type:"rotate",distanceRads:Ge.degreesToRadians(m.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function a(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return i(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.translateTCP({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.rotateTCP({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function l(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function u(h,m,g){var x,b,T;const y=(T=(b=(x=g.componentsExt)==null?void 0:x.JoggingPanel)==null?void 0:b.JoggingCartesian)==null?void 0:T.Axis;if(y)return m==="translate"?y[h]:y.CustomRotation??y[h]}const d=[{id:"x",icon:c.jsxRuntimeExports.jsx(He.ForwardRef$10,{}),colors:u("X",e.selectedCartesianMotionType,r)},{id:"y",icon:c.jsxRuntimeExports.jsx(He.ForwardRef$11,{}),colors:u("Y",e.selectedCartesianMotionType,r)},{id:"z",icon:c.jsxRuntimeExports.jsx(He.ForwardRef$12,{}),colors:u("Z",e.selectedCartesianMotionType,r)}];function p(h){return n("General.mm.variable",{amount:h.toFixed(1)})}function f(h){return n("General.degree.variable",{amount:Ge.radiansToDegrees(h).toFixed(1)})}return c.jsxRuntimeExports.jsxs(Ce,{"data-testid":"jogging-cartesian-tab","aria-label":"jogging-cartesian-tab",flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[c.jsxRuntimeExports.jsxs(Ce,{gap:2,children:[c.jsxRuntimeExports.jsx(dj,{store:e,useDegree:e.selectedCartesianMotionType==="rotate"}),c.jsxRuntimeExports.jsx(Uf,{store:e,useDegree:e.selectedCartesianMotionType==="rotate"}),c.jsxRuntimeExports.jsx(c.Divider,{})]}),c.jsxRuntimeExports.jsx(Ce,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:c.jsxRuntimeExports.jsxs(Ce,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[c.jsxRuntimeExports.jsxs(gj,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":n("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[c.jsxRuntimeExports.jsx(Ks,{value:"translate",children:n("Jogging.Cartesian.Translation.bt")}),c.jsxRuntimeExports.jsx(Ks,{value:"rotate",children:n("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&d.map(h=>{var m,g;return c.jsxRuntimeExports.jsx(Ys,{"data-testid":`jogging-cartesian-axis-control-${h.id}`,"aria-label":`jogging-cartesian-axis-control-${h.id}`,colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((m=e.incrementJogInProgress)==null?void 0:m.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[h.icon,c.jsxRuntimeExports.jsx(c.Typography,{sx:{fontSize:"24px",color:((g=h.colors)==null?void 0:g.labelColor)??r.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var y,x;return p(((x=(y=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:y.position)==null?void 0:x[Ge.XYZ_TO_VECTOR[h.id]])||0)},startJogging:y=>a({axis:h.id,motionType:"translate",direction:y}),stopJogging:l},h.id)}),e.selectedCartesianMotionType==="rotate"&&d.map(h=>{var m,g;return c.jsxRuntimeExports.jsx(Ys,{"data-testid":`jogging-cartesian-axis-control-${h.id}`,"aria-label":`jogging-cartesian-axis-control-${h.id}`,colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((m=e.incrementJogInProgress)==null?void 0:m.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(He.ForwardRef$16,{}),c.jsxRuntimeExports.jsx(c.Typography,{sx:{fontSize:"24px",color:((g=h.colors)==null?void 0:g.labelColor)??r.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var y,x;return f(((x=(y=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:y.orientation)==null?void 0:x[Ge.XYZ_TO_VECTOR[h.id]])||0)},startJogging:y=>a({axis:h.id,motionType:"rotate",direction:y}),stopJogging:l},h.id)})]})}),c.jsxRuntimeExports.jsx(Sf,{store:e}),t&&c.jsxRuntimeExports.jsx(c.Divider,{}),t]})}),vj=Oe.observer(({store:e,children:t})=>{const n=c.useTheme();async function r(i){await e.activate(),await e.jogger.rotateJoints({joint:i.joint,direction:i.direction,velocityUnit:e.jointType===c.JointTypeEnum.PrismaticJoint?"mm/s":"rad/s",velocityValue:e.jointType===c.JointTypeEnum.PrismaticJoint?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec})}async function o(){await e.jogger.stop(),await e.deactivate()}return c.jsxRuntimeExports.jsxs(Ce,{"data-testid":"jogging-joint-tab","aria-label":"jogging-joint-tab",flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[c.jsxRuntimeExports.jsx(Uf,{store:e,useDegree:e.jointType===c.JointTypeEnum.RevoluteJoint}),c.jsxRuntimeExports.jsx(c.Divider,{}),c.jsxRuntimeExports.jsx(Ce,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},children:c.jsxRuntimeExports.jsx(Ce,{"data-testid":"jogging-joint-value-controls-wrapper","aria-label":"jogging-joint-value-controls-wrapper",alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(i=>{var l,u,d;const a=(d=(u=(l=e.motionGroupDescription.operation_limits.auto_limits)==null?void 0:l.joints)==null?void 0:u[i.index])==null?void 0:d.position;return c.jsxRuntimeExports.jsxs(Ce,{"data-testid":`jogging-joint-value-control-${i.index}`,"aria-label":`jogging-joint-value-control-${i.index}`,direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&c.jsxRuntimeExports.jsx(c.Typography,{color:e.isLocked?n.palette.text.disabled:n.palette.text.secondary,children:`G${i.index+1}`}),c.jsxRuntimeExports.jsx(rf,{disabled:e.isLocked,lowerLimit:a==null?void 0:a.lower_limit,upperLimit:a==null?void 0:a.upper_limit,useDegree:e.jointType===c.JointTypeEnum.RevoluteJoint,getValue:()=>{const p=e.jogger.motionStream.rapidlyChangingMotionState.joint_position[i.index];return p!==void 0?p:void 0},startJogging:p=>r({joint:i.index,direction:p}),stopJogging:o})]},`joint-${i.index}`)})})}),c.jsxRuntimeExports.jsx(Sf,{store:e}),t&&c.jsxRuntimeExports.jsx(c.Divider,{}),t]})}),Ej=c.externalizeComponent(Oe.observer(e=>{const t=oa.isString(e.nova)?new c.NovaClient({instanceUrl:e.nova}):e.nova,n=Oe.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function r(){Ie.runInAction(()=>{n.loadingError=null,n.joggingStore=null});try{let o=e.store;if(!o){const i=await Fi.open(t,e.motionGroupId);o=await Ji.loadFor(i)}Ie.runInAction(()=>{n.joggingStore=o}),e.onSetup&&e.onSetup(o)}catch(o){n.loadingError=o}}return L.useEffect(()=>(r(),e.store?()=>null:()=>{var o;(o=n.joggingStore)==null||o.dispose()}),[e.store,e.nova,e.motionGroupId]),L.useEffect(()=>{const o=n.joggingStore;o&&(e.locked?o.lock("external"):o.unlock("external"))},[n.joggingStore,e.locked]),c.jsxRuntimeExports.jsx(Ce,{"data-testid":"jogging-panel","aria-label":"jogging-panel",sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:n.joggingStore?c.jsxRuntimeExports.jsx(Tj,{store:n.joggingStore,children:e.children}):c.jsxRuntimeExports.jsx(cf,{message:"Loading jogging",error:n.loadingError})})})),Tj=Oe.observer(({store:e,children:t})=>{const{t:n}=Pe.useTranslation();function r(){if(e.currentTab.id==="cartesian")return c.jsxRuntimeExports.jsx(bj,{store:e,children:t});if(e.currentTab.id==="joint")return c.jsxRuntimeExports.jsx(vj,{store:e,children:t})}return c.jsxRuntimeExports.jsxs(Ce,{flexGrow:1,sx:{overflow:"hidden"},children:[c.jsxRuntimeExports.jsx(sl,{"data-testid":"jogging-tabs","aria-label":"jogging-tabs",value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(o=>{const i=o.label==="Cartesian"?n("Jogging.Cartesian.bt"):n("Jogging.Joints.bt"),a=o.label==="cartesian"?c.jsxRuntimeExports.jsx(m1,{fontSize:"small",sx:{mr:1}}):c.jsxRuntimeExports.jsx(g1,{fontSize:"small",sx:{mr:1}});return c.jsxRuntimeExports.jsx(il,{"data-testid":`jogging-tab-${o.id}`,"aria-label":`jogging-tab-${o.id}`,label:e.showTabIcons?c.jsxRuntimeExports.jsxs(Ce,{direction:"row",alignItems:"center",children:[a,i]}):i,id:`jogging-tab-${o.id}`,"aria-controls":`jogging-tab-${o.id}`},o.id)})}),c.jsxRuntimeExports.jsx(Ce,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:r()}),e.blocked&&c.jsxRuntimeExports.jsx(tS,{store:e})]})});var nt="top",mt="bottom",gt="right",rt="left",Tl="auto",oo=[nt,mt,gt,rt],nr="start",qr="end",Sj="clippingParents",Vf="viewport",Tr="popper",wj="reference",Ju=oo.reduce(function(e,t){return e.concat([t+"-"+nr,t+"-"+qr])},[]),Wf=[].concat(oo,[Tl]).reduce(function(e,t){return e.concat([t,t+"-"+nr,t+"-"+qr])},[]),Cj="beforeRead",Rj="read",jj="afterRead",Mj="beforeMain",Oj="main",Ij="afterMain",Pj="beforeWrite",kj="write",Aj="afterWrite",_j=[Cj,Rj,jj,Mj,Oj,Ij,Pj,kj,Aj];function At(e){return e?(e.nodeName||"").toLowerCase():null}function st(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function In(e){var t=st(e).Element;return e instanceof t||e instanceof Element}function ft(e){var t=st(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Sl(e){if(typeof ShadowRoot>"u")return!1;var t=st(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Dj(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!ft(i)||!At(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var l=o[a];l===!1?i.removeAttribute(a):i.setAttribute(a,l===!0?"":l)}))})}function Nj(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=a.reduce(function(u,d){return u[d]="",u},{});!ft(o)||!At(o)||(Object.assign(o.style,l),Object.keys(i).forEach(function(u){o.removeAttribute(u)}))})}}const $j={name:"applyStyles",enabled:!0,phase:"write",fn:Dj,effect:Nj,requires:["computeStyles"]};function Pt(e){return e.split("-")[0]}var Cn=Math.max,ui=Math.min,rr=Math.round;function na(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Gf(){return!/^((?!chrome|android).)*safari/i.test(na())}function or(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&ft(e)&&(o=e.offsetWidth>0&&rr(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&rr(r.height)/e.offsetHeight||1);var a=In(e)?st(e):window,l=a.visualViewport,u=!Gf()&&n,d=(r.left+(u&&l?l.offsetLeft:0))/o,p=(r.top+(u&&l?l.offsetTop:0))/i,f=r.width/o,h=r.height/i;return{width:f,height:h,top:p,right:d+f,bottom:p+h,left:d,x:d,y:p}}function wl(e){var t=or(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Hf(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Sl(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qt(e){return st(e).getComputedStyle(e)}function zj(e){return["table","td","th"].indexOf(At(e))>=0}function dn(e){return((In(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zi(e){return At(e)==="html"?e:e.assignedSlot||e.parentNode||(Sl(e)?e.host:null)||dn(e)}function Zu(e){return!ft(e)||qt(e).position==="fixed"?null:e.offsetParent}function Lj(e){var t=/firefox/i.test(na()),n=/Trident/i.test(na());if(n&&ft(e)){var r=qt(e);if(r.position==="fixed")return null}var o=Zi(e);for(Sl(o)&&(o=o.host);ft(o)&&["html","body"].indexOf(At(o))<0;){var i=qt(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function io(e){for(var t=st(e),n=Zu(e);n&&zj(n)&&qt(n).position==="static";)n=Zu(n);return n&&(At(n)==="html"||At(n)==="body"&&qt(n).position==="static")?t:n||Lj(e)||t}function Cl(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ar(e,t,n){return Cn(e,ui(t,n))}function Fj(e,t,n){var r=Ar(e,t,n);return r>n?n:r}function qf(){return{top:0,right:0,bottom:0,left:0}}function Yf(e){return Object.assign({},qf(),e)}function Kf(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Bj=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Yf(typeof t!="number"?t:Kf(t,oo))};function Uj(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=Pt(n.placement),u=Cl(l),d=[rt,gt].indexOf(l)>=0,p=d?"height":"width";if(!(!i||!a)){var f=Bj(o.padding,n),h=wl(i),m=u==="y"?nt:rt,g=u==="y"?mt:gt,y=n.rects.reference[p]+n.rects.reference[u]-a[u]-n.rects.popper[p],x=a[u]-n.rects.reference[u],b=io(i),T=b?u==="y"?b.clientHeight||0:b.clientWidth||0:0,v=y/2-x/2,E=f[m],w=T-h[p]-f[g],S=T/2-h[p]/2+v,R=Ar(E,S,w),j=u;n.modifiersData[r]=(t={},t[j]=R,t.centerOffset=R-S,t)}}function Vj(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Hf(t.elements.popper,o)&&(t.elements.arrow=o))}const Wj={name:"arrow",enabled:!0,phase:"main",fn:Uj,effect:Vj,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ir(e){return e.split("-")[1]}var Gj={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Hj(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:rr(n*o)/o||0,y:rr(r*o)/o||0}}function Qu(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,l=e.position,u=e.gpuAcceleration,d=e.adaptive,p=e.roundOffsets,f=e.isFixed,h=a.x,m=h===void 0?0:h,g=a.y,y=g===void 0?0:g,x=typeof p=="function"?p({x:m,y}):{x:m,y};m=x.x,y=x.y;var b=a.hasOwnProperty("x"),T=a.hasOwnProperty("y"),v=rt,E=nt,w=window;if(d){var S=io(n),R="clientHeight",j="clientWidth";if(S===st(n)&&(S=dn(n),qt(S).position!=="static"&&l==="absolute"&&(R="scrollHeight",j="scrollWidth")),S=S,o===nt||(o===rt||o===gt)&&i===qr){E=mt;var M=f&&S===w&&w.visualViewport?w.visualViewport.height:S[R];y-=M-r.height,y*=u?1:-1}if(o===rt||(o===nt||o===mt)&&i===qr){v=gt;var I=f&&S===w&&w.visualViewport?w.visualViewport.width:S[j];m-=I-r.width,m*=u?1:-1}}var k=Object.assign({position:l},d&&Gj),D=p===!0?Hj({x:m,y},st(n)):{x:m,y};if(m=D.x,y=D.y,u){var O;return Object.assign({},k,(O={},O[E]=T?"0":"",O[v]=b?"0":"",O.transform=(w.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",O))}return Object.assign({},k,(t={},t[E]=T?y+"px":"",t[v]=b?m+"px":"",t.transform="",t))}function qj(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,l=n.roundOffsets,u=l===void 0?!0:l,d={placement:Pt(t.placement),variation:ir(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Qu(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Qu(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Yj={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:qj,data:{}};var Ao={passive:!0};function Kj(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,l=a===void 0?!0:a,u=st(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&d.forEach(function(p){p.addEventListener("scroll",n.update,Ao)}),l&&u.addEventListener("resize",n.update,Ao),function(){i&&d.forEach(function(p){p.removeEventListener("scroll",n.update,Ao)}),l&&u.removeEventListener("resize",n.update,Ao)}}const Xj={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Kj,data:{}};var Jj={left:"right",right:"left",bottom:"top",top:"bottom"};function zo(e){return e.replace(/left|right|bottom|top/g,function(t){return Jj[t]})}var Zj={start:"end",end:"start"};function ed(e){return e.replace(/start|end/g,function(t){return Zj[t]})}function Rl(e){var t=st(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function jl(e){return or(dn(e)).left+Rl(e).scrollLeft}function Qj(e,t){var n=st(e),r=dn(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;var d=Gf();(d||!d&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l+jl(e),y:u}}function eM(e){var t,n=dn(e),r=Rl(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Cn(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Cn(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+jl(e),u=-r.scrollTop;return qt(o||n).direction==="rtl"&&(l+=Cn(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:u}}function Ml(e){var t=qt(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Xf(e){return["html","body","#document"].indexOf(At(e))>=0?e.ownerDocument.body:ft(e)&&Ml(e)?e:Xf(Zi(e))}function _r(e,t){var n;t===void 0&&(t=[]);var r=Xf(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=st(r),a=o?[i].concat(i.visualViewport||[],Ml(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(_r(Zi(a)))}function ra(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function tM(e,t){var n=or(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function td(e,t,n){return t===Vf?ra(Qj(e,n)):In(t)?tM(t,n):ra(eM(dn(e)))}function nM(e){var t=_r(Zi(e)),n=["absolute","fixed"].indexOf(qt(e).position)>=0,r=n&&ft(e)?io(e):e;return In(r)?t.filter(function(o){return In(o)&&Hf(o,r)&&At(o)!=="body"}):[]}function rM(e,t,n,r){var o=t==="clippingParents"?nM(e):[].concat(t),i=[].concat(o,[n]),a=i[0],l=i.reduce(function(u,d){var p=td(e,d,r);return u.top=Cn(p.top,u.top),u.right=ui(p.right,u.right),u.bottom=ui(p.bottom,u.bottom),u.left=Cn(p.left,u.left),u},td(e,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Jf(e){var t=e.reference,n=e.element,r=e.placement,o=r?Pt(r):null,i=r?ir(r):null,a=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,u;switch(o){case nt:u={x:a,y:t.y-n.height};break;case mt:u={x:a,y:t.y+t.height};break;case gt:u={x:t.x+t.width,y:l};break;case rt:u={x:t.x-n.width,y:l};break;default:u={x:t.x,y:t.y}}var d=o?Cl(o):null;if(d!=null){var p=d==="y"?"height":"width";switch(i){case nr:u[d]=u[d]-(t[p]/2-n[p]/2);break;case qr:u[d]=u[d]+(t[p]/2-n[p]/2);break}}return u}function Yr(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,l=n.boundary,u=l===void 0?Sj:l,d=n.rootBoundary,p=d===void 0?Vf:d,f=n.elementContext,h=f===void 0?Tr:f,m=n.altBoundary,g=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,b=Yf(typeof x!="number"?x:Kf(x,oo)),T=h===Tr?wj:Tr,v=e.rects.popper,E=e.elements[g?T:h],w=rM(In(E)?E:E.contextElement||dn(e.elements.popper),u,p,a),S=or(e.elements.reference),R=Jf({reference:S,element:v,placement:o}),j=ra(Object.assign({},v,R)),M=h===Tr?j:S,I={top:w.top-M.top+b.top,bottom:M.bottom-w.bottom+b.bottom,left:w.left-M.left+b.left,right:M.right-w.right+b.right},k=e.modifiersData.offset;if(h===Tr&&k){var D=k[o];Object.keys(I).forEach(function(O){var P=[gt,mt].indexOf(O)>=0?1:-1,N=[nt,mt].indexOf(O)>=0?"y":"x";I[O]+=D[N]*P})}return I}function oM(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,d=u===void 0?Wf:u,p=ir(r),f=p?l?Ju:Ju.filter(function(g){return ir(g)===p}):oo,h=f.filter(function(g){return d.indexOf(g)>=0});h.length===0&&(h=f);var m=h.reduce(function(g,y){return g[y]=Yr(e,{placement:y,boundary:o,rootBoundary:i,padding:a})[Pt(y)],g},{});return Object.keys(m).sort(function(g,y){return m[g]-m[y]})}function iM(e){if(Pt(e)===Tl)return[];var t=zo(e);return[ed(e),t,ed(t)]}function sM(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,l=a===void 0?!0:a,u=n.fallbackPlacements,d=n.padding,p=n.boundary,f=n.rootBoundary,h=n.altBoundary,m=n.flipVariations,g=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,b=Pt(x),T=b===x,v=u||(T||!g?[zo(x)]:iM(x)),E=[x].concat(v).reduce(function(xe,de){return xe.concat(Pt(de)===Tl?oM(t,{placement:de,boundary:p,rootBoundary:f,padding:d,flipVariations:g,allowedAutoPlacements:y}):de)},[]),w=t.rects.reference,S=t.rects.popper,R=new Map,j=!0,M=E[0],I=0;I<E.length;I++){var k=E[I],D=Pt(k),O=ir(k)===nr,P=[nt,mt].indexOf(D)>=0,N=P?"width":"height",_=Yr(t,{placement:k,boundary:p,rootBoundary:f,altBoundary:h,padding:d}),z=P?O?gt:rt:O?mt:nt;w[N]>S[N]&&(z=zo(z));var B=zo(z),W=[];if(i&&W.push(_[D]<=0),l&&W.push(_[z]<=0,_[B]<=0),W.every(function(xe){return xe})){M=k,j=!1;break}R.set(k,W)}if(j)for(var K=g?3:1,$=function(de){var pe=E.find(function(fe){var he=R.get(fe);if(he)return he.slice(0,de).every(function(U){return U})});if(pe)return M=pe,"break"},ne=K;ne>0;ne--){var le=$(ne);if(le==="break")break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}}const aM={name:"flip",enabled:!0,phase:"main",fn:sM,requiresIfExists:["offset"],data:{_skip:!1}};function nd(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function rd(e){return[nt,gt,mt,rt].some(function(t){return e[t]>=0})}function lM(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Yr(t,{elementContext:"reference"}),l=Yr(t,{altBoundary:!0}),u=nd(a,r),d=nd(l,o,i),p=rd(u),f=rd(d);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:d,isReferenceHidden:p,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}const cM={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:lM};function uM(e,t,n){var r=Pt(e),o=[rt,nt].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],l=i[1];return a=a||0,l=(l||0)*o,[rt,gt].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}function dM(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=Wf.reduce(function(p,f){return p[f]=uM(f,t.rects,i),p},{}),l=a[t.placement],u=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=a}const pM={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:dM};function fM(e){var t=e.state,n=e.name;t.modifiersData[n]=Jf({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const hM={name:"popperOffsets",enabled:!0,phase:"read",fn:fM,data:{}};function mM(e){return e==="x"?"y":"x"}function gM(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,l=a===void 0?!1:a,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.padding,h=n.tether,m=h===void 0?!0:h,g=n.tetherOffset,y=g===void 0?0:g,x=Yr(t,{boundary:u,rootBoundary:d,padding:f,altBoundary:p}),b=Pt(t.placement),T=ir(t.placement),v=!T,E=Cl(b),w=mM(E),S=t.modifiersData.popperOffsets,R=t.rects.reference,j=t.rects.popper,M=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,I=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(S){if(i){var O,P=E==="y"?nt:rt,N=E==="y"?mt:gt,_=E==="y"?"height":"width",z=S[E],B=z+x[P],W=z-x[N],K=m?-j[_]/2:0,$=T===nr?R[_]:j[_],ne=T===nr?-j[_]:-R[_],le=t.elements.arrow,xe=m&&le?wl(le):{width:0,height:0},de=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:qf(),pe=de[P],fe=de[N],he=Ar(0,R[_],xe[_]),U=v?R[_]/2-K-he-pe-I.mainAxis:$-he-pe-I.mainAxis,V=v?-R[_]/2+K+he+fe+I.mainAxis:ne+he+fe+I.mainAxis,G=t.elements.arrow&&io(t.elements.arrow),A=G?E==="y"?G.clientTop||0:G.clientLeft||0:0,Z=(O=k==null?void 0:k[E])!=null?O:0,q=z+U-Z-A,oe=z+V-Z,me=Ar(m?ui(B,q):B,z,m?Cn(W,oe):W);S[E]=me,D[E]=me-z}if(l){var ae,ve=E==="x"?nt:rt,Re=E==="x"?mt:gt,ke=S[w],Ee=w==="y"?"height":"width",Ue=ke+x[ve],ze=ke-x[Re],je=[nt,rt].indexOf(b)!==-1,F=(ae=k==null?void 0:k[w])!=null?ae:0,H=je?Ue:ke-R[Ee]-j[Ee]-F+I.altAxis,J=je?ke+R[Ee]+j[Ee]-F-I.altAxis:ze,ie=m&&je?Fj(H,ke,J):Ar(m?H:Ue,ke,m?J:ze);S[w]=ie,D[w]=ie-ke}t.modifiersData[r]=D}}const xM={name:"preventOverflow",enabled:!0,phase:"main",fn:gM,requiresIfExists:["offset"]};function yM(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function bM(e){return e===st(e)||!ft(e)?Rl(e):yM(e)}function vM(e){var t=e.getBoundingClientRect(),n=rr(t.width)/e.offsetWidth||1,r=rr(t.height)/e.offsetHeight||1;return n!==1||r!==1}function EM(e,t,n){n===void 0&&(n=!1);var r=ft(t),o=ft(t)&&vM(t),i=dn(t),a=or(e,o,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((At(t)!=="body"||Ml(i))&&(l=bM(t)),ft(t)?(u=or(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=jl(i))),{x:a.left+l.scrollLeft-u.x,y:a.top+l.scrollTop-u.y,width:a.width,height:a.height}}function TM(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var u=t.get(l);u&&o(u)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function SM(e){var t=TM(e);return _j.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function wM(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function CM(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var od={placement:"bottom",modifiers:[],strategy:"absolute"};function id(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function RM(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?od:o;return function(l,u,d){d===void 0&&(d=i);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},od,i),modifiersData:{},elements:{reference:l,popper:u},attributes:{},styles:{}},f=[],h=!1,m={state:p,setOptions:function(b){var T=typeof b=="function"?b(p.options):b;y(),p.options=Object.assign({},i,p.options,T),p.scrollParents={reference:In(l)?_r(l):l.contextElement?_r(l.contextElement):[],popper:_r(u)};var v=SM(CM([].concat(r,p.options.modifiers)));return p.orderedModifiers=v.filter(function(E){return E.enabled}),g(),m.update()},forceUpdate:function(){if(!h){var b=p.elements,T=b.reference,v=b.popper;if(id(T,v)){p.rects={reference:EM(T,io(v),p.options.strategy==="fixed"),popper:wl(v)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(I){return p.modifiersData[I.name]=Object.assign({},I.data)});for(var E=0;E<p.orderedModifiers.length;E++){if(p.reset===!0){p.reset=!1,E=-1;continue}var w=p.orderedModifiers[E],S=w.fn,R=w.options,j=R===void 0?{}:R,M=w.name;typeof S=="function"&&(p=S({state:p,options:j,name:M,instance:m})||p)}}}},update:wM(function(){return new Promise(function(x){m.forceUpdate(),x(p)})}),destroy:function(){y(),h=!0}};if(!id(l,u))return m;m.setOptions(d).then(function(x){!h&&d.onFirstUpdate&&d.onFirstUpdate(x)});function g(){p.orderedModifiers.forEach(function(x){var b=x.name,T=x.options,v=T===void 0?{}:T,E=x.effect;if(typeof E=="function"){var w=E({state:p,name:b,instance:m,options:v}),S=function(){};f.push(w||S)}})}function y(){f.forEach(function(x){return x()}),f=[]}return m}}var jM=[Xj,hM,Yj,$j,pM,aM,xM,Wj,cM],MM=RM({defaultModifiers:jM});function OM(e){return c.generateUtilityClass("MuiPopper",e)}c.generateUtilityClasses("MuiPopper",["root"]);function IM(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function di(e){return typeof e=="function"?e():e}function Qi(e){return e.nodeType!==void 0}function PM(e){return!Qi(e)}const kM=e=>{const{classes:t}=e,n={root:["root"]};return c.composeClasses(n,OM,t)},AM={},_M=C.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:l,open:u,placement:d,popperOptions:p,popperRef:f,slotProps:h={},slots:m={},TransitionProps:g,ownerState:y,...x}=t,b=C.useRef(null),T=c.useForkRef(b,n),v=C.useRef(null),E=c.useForkRef(v,f),w=C.useRef(E);c.useEnhancedEffect(()=>{w.current=E},[E]),C.useImperativeHandle(f,()=>v.current,[]);const S=IM(d,i),[R,j]=C.useState(S),[M,I]=C.useState(di(r));C.useEffect(()=>{v.current&&v.current.forceUpdate()}),C.useEffect(()=>{r&&I(di(r))},[r]),c.useEnhancedEffect(()=>{if(!M||!u)return;const N=B=>{j(B.placement)};if(process.env.NODE_ENV!=="production"&&M&&Qi(M)&&M.nodeType===1){const B=M.getBoundingClientRect();process.env.NODE_ENV!=="test"&&B.top===0&&B.left===0&&B.right===0&&B.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
76
|
-
`))}let _=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:B})=>{N(B)}}];l!=null&&(_=_.concat(l)),p&&p.modifiers!=null&&(_=_.concat(p.modifiers));const z=MM(M,b.current,{placement:S,...p,modifiers:_});return w.current(z),()=>{z.destroy(),w.current(null)}},[M,a,l,u,p,S]);const k={placement:R};g!==null&&(k.TransitionProps=g);const D=kM(t),O=m.root??"div",P=et({elementType:O,externalSlotProps:h.root,externalForwardedProps:x,additionalProps:{role:"tooltip",ref:T},ownerState:t,className:D.root});return c.jsxRuntimeExports.jsx(O,{...P,children:typeof o=="function"?o(k):o})}),Zf=C.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:l=!1,keepMounted:u=!1,modifiers:d,open:p,placement:f="bottom",popperOptions:h=AM,popperRef:m,style:g,transition:y=!1,slotProps:x={},slots:b={},...T}=t,[v,E]=C.useState(!0),w=()=>{E(!1)},S=()=>{E(!0)};if(!u&&!p&&(!y||v))return null;let R;if(i)R=i;else if(r){const I=di(r);R=I&&Qi(I)?Ve(I).body:Ve(null).body}const j=!p&&u&&(!y||v)?"none":void 0,M=y?{in:p,onEnter:w,onExited:S}:void 0;return c.jsxRuntimeExports.jsx(Nr,{disablePortal:l,container:R,children:c.jsxRuntimeExports.jsx(_M,{anchorEl:r,direction:a,disablePortal:l,modifiers:d,ref:n,open:y?!v:p,placement:f,popperOptions:h,popperRef:m,slotProps:x,slots:b,...T,style:{position:"fixed",top:0,left:0,display:j,...g},TransitionProps:M,children:o})})});process.env.NODE_ENV!=="production"&&(Zf.propTypes={anchorEl:c.chainPropTypes(s.oneOfType([Vt,s.object,s.func]),e=>{if(e.open){const t=di(e.anchorEl);if(t&&Qi(t)&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
77
|
-
`))}else if(!t||typeof t.getBoundingClientRect!="function"||PM(t)&&t.contextElement!=null&&t.contextElement.nodeType!==1)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
|
|
78
|
-
`))}return null}),children:s.oneOfType([s.node,s.func]),container:s.oneOfType([Vt,s.func]),direction:s.oneOf(["ltr","rtl"]),disablePortal:s.bool,keepMounted:s.bool,modifiers:s.arrayOf(s.shape({data:s.object,effect:s.func,enabled:s.bool,fn:s.func,name:s.any,options:s.object,phase:s.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:s.arrayOf(s.string),requiresIfExists:s.arrayOf(s.string)})),open:s.bool.isRequired,placement:s.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:s.shape({modifiers:s.array,onFirstUpdate:s.func,placement:s.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:s.oneOf(["absolute","fixed"])}),popperRef:c.refType,slotProps:s.shape({root:s.oneOfType([s.func,s.object])}),slots:s.shape({root:s.elementType}),transition:s.bool});const DM=c.styled(Zf,{name:"MuiPopper",slot:"Root"})({}),Ol=C.forwardRef(function(t,n){const r=sr(),o=c.useDefaultProps({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:l,componentsProps:u,container:d,disablePortal:p,keepMounted:f,modifiers:h,open:m,placement:g,popperOptions:y,popperRef:x,transition:b,slots:T,slotProps:v,...E}=o,w=(T==null?void 0:T.root)??(l==null?void 0:l.Root),S={anchorEl:i,container:d,disablePortal:p,keepMounted:f,modifiers:h,open:m,placement:g,popperOptions:y,popperRef:x,transition:b,...E};return c.jsxRuntimeExports.jsx(DM,{as:a,direction:r?"rtl":"ltr",slots:{root:w},slotProps:v??u,...S,ref:n})});process.env.NODE_ENV!=="production"&&(Ol.propTypes={anchorEl:s.oneOfType([Vt,s.object,s.func]),children:s.oneOfType([s.node,s.func]),component:s.elementType,components:s.shape({Root:s.elementType}),componentsProps:s.shape({root:s.oneOfType([s.func,s.object])}),container:s.oneOfType([Vt,s.func]),disablePortal:s.bool,keepMounted:s.bool,modifiers:s.arrayOf(s.shape({data:s.object,effect:s.func,enabled:s.bool,fn:s.func,name:s.any,options:s.object,phase:s.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:s.arrayOf(s.string),requiresIfExists:s.arrayOf(s.string)})),open:s.bool.isRequired,placement:s.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:s.shape({modifiers:s.array,onFirstUpdate:s.func,placement:s.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:s.oneOf(["absolute","fixed"])}),popperRef:c.refType,slotProps:s.shape({root:s.oneOfType([s.func,s.object])}),slots:s.shape({root:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),transition:s.bool});function NM(e){return c.generateUtilityClass("MuiTooltip",e)}const $e=c.generateUtilityClasses("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function $M(e){return Math.round(e*1e5)/1e5}const zM=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${c.capitalize(i.split("-")[0])}`],arrow:["arrow"]};return c.composeClasses(a,NM,t)},LM=c.styled(Ol,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(c.memoTheme(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${$e.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${$e.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${$e.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${$e.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${$e.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${$e.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${$e.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${$e.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),FM=c.styled("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${c.capitalize(n.placement.split("-")[0])}`]]}})(c.memoTheme(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${$e.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${$e.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${$e.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${$e.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${$M(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${$e.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${$e.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${$e.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${$e.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${$e.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${$e.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${$e.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${$e.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${$e.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${$e.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),BM=c.styled("span",{name:"MuiTooltip",slot:"Arrow"})(c.memoTheme(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let _o=!1;const sd=new c.Timeout;let Sr={x:0,y:0};function Do(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Qf=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:l={},componentsProps:u={},describeChild:d=!1,disableFocusListener:p=!1,disableHoverListener:f=!1,disableInteractive:h=!1,disableTouchListener:m=!1,enterDelay:g=100,enterNextDelay:y=0,enterTouchDelay:x=700,followCursor:b=!1,id:T,leaveDelay:v=0,leaveTouchDelay:E=1500,onClose:w,onOpen:S,open:R,placement:j="bottom",PopperComponent:M,PopperProps:I={},slotProps:k={},slots:D={},title:O,TransitionComponent:P,TransitionProps:N,..._}=r,z=C.isValidElement(i)?i:c.jsxRuntimeExports.jsx("span",{children:i}),B=c.useTheme(),W=sr(),[K,$]=C.useState(),[ne,le]=C.useState(null),xe=C.useRef(!1),de=h||b,pe=c.useTimeout(),fe=c.useTimeout(),he=c.useTimeout(),U=c.useTimeout(),[V,G]=Lo({controlled:R,default:!1,name:"Tooltip",state:"open"});let A=V;if(process.env.NODE_ENV!=="production"){const{current:ce}=C.useRef(R!==void 0);C.useEffect(()=>{K&&K.disabled&&!ce&&O!==""&&K.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
|
|
79
|
-
`))},[O,K,ce])}const Z=c.useId(T),q=C.useRef(),oe=c.useEventCallback(()=>{q.current!==void 0&&(document.body.style.WebkitUserSelect=q.current,q.current=void 0),U.clear()});C.useEffect(()=>oe,[oe]);const me=ce=>{sd.clear(),_o=!0,G(!0),S&&!A&&S(ce)},ae=c.useEventCallback(ce=>{sd.start(800+v,()=>{_o=!1}),G(!1),w&&A&&w(ce),pe.start(B.transitions.duration.shortest,()=>{xe.current=!1})}),ve=ce=>{xe.current&&ce.type!=="touchstart"||(K&&K.removeAttribute("title"),fe.clear(),he.clear(),g||_o&&y?fe.start(_o?y:g,()=>{me(ce)}):me(ce))},Re=ce=>{fe.clear(),he.start(v,()=>{ae(ce)})},[,ke]=C.useState(!1),Ee=ce=>{c.isFocusVisible(ce.target)||(ke(!1),Re(ce))},Ue=ce=>{K||$(ce.currentTarget),c.isFocusVisible(ce.target)&&(ke(!0),ve(ce))},ze=ce=>{xe.current=!0;const it=z.props;it.onTouchStart&&it.onTouchStart(ce)},je=ce=>{ze(ce),he.clear(),pe.clear(),oe(),q.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",U.start(x,()=>{document.body.style.WebkitUserSelect=q.current,ve(ce)})},F=ce=>{z.props.onTouchEnd&&z.props.onTouchEnd(ce),oe(),he.start(E,()=>{ae(ce)})};C.useEffect(()=>{if(!A)return;function ce(it){it.key==="Escape"&&ae(it)}return document.addEventListener("keydown",ce),()=>{document.removeEventListener("keydown",ce)}},[ae,A]);const H=c.useForkRef(lr(z),$,n);!O&&O!==0&&(A=!1);const J=C.useRef(),ie=ce=>{const it=z.props;it.onMouseMove&&it.onMouseMove(ce),Sr={x:ce.clientX,y:ce.clientY},J.current&&J.current.update()},ge={},ee=typeof O=="string";d?(ge.title=!A&&ee&&!f?O:null,ge["aria-describedby"]=A?Z:null):(ge["aria-label"]=ee?O:null,ge["aria-labelledby"]=A&&!ee?Z:null);const Q={...ge,..._,...z.props,className:c.clsx(_.className,z.props.className),onTouchStart:ze,ref:H,...b?{onMouseMove:ie}:{}};process.env.NODE_ENV!=="production"&&(Q["data-mui-internal-clone-element"]=!0,C.useEffect(()=>{K&&!K.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
|
|
80
|
-
`))},[K]));const Me={};m||(Q.onTouchStart=je,Q.onTouchEnd=F),f||(Q.onMouseOver=Do(ve,Q.onMouseOver),Q.onMouseLeave=Do(Re,Q.onMouseLeave),de||(Me.onMouseOver=ve,Me.onMouseLeave=Re)),p||(Q.onFocus=Do(Ue,Q.onFocus),Q.onBlur=Do(Ee,Q.onBlur),de||(Me.onFocus=Ue,Me.onBlur=Ee)),process.env.NODE_ENV!=="production"&&z.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${z.props.title}\` or the Tooltip component.`].join(`
|
|
81
|
-
`));const ye={...r,isRtl:W,arrow:o,disableInteractive:de,placement:j,PopperComponentProp:M,touch:xe.current},Se=typeof k.popper=="function"?k.popper(ye):k.popper,qe=C.useMemo(()=>{var it,X;let ce=[{name:"arrow",enabled:!!ne,options:{element:ne,padding:4}}];return(it=I.popperOptions)!=null&&it.modifiers&&(ce=ce.concat(I.popperOptions.modifiers)),(X=Se==null?void 0:Se.popperOptions)!=null&&X.modifiers&&(ce=ce.concat(Se.popperOptions.modifiers)),{...I.popperOptions,...Se==null?void 0:Se.popperOptions,modifiers:ce}},[ne,I.popperOptions,Se==null?void 0:Se.popperOptions]),$t=zM(ye),Tt=typeof k.transition=="function"?k.transition(ye):k.transition,at={slots:{popper:l.Popper,transition:l.Transition??P,tooltip:l.Tooltip,arrow:l.Arrow,...D},slotProps:{arrow:k.arrow??u.arrow,popper:{...I,...Se??u.popper},tooltip:k.tooltip??u.tooltip,transition:{...N,...Tt??u.transition}}},[ot,St]=c.useSlot("popper",{elementType:LM,externalForwardedProps:at,ownerState:ye,className:c.clsx($t.popper,I==null?void 0:I.className)}),[Jt,Y]=c.useSlot("transition",{elementType:Dr,externalForwardedProps:at,ownerState:ye}),[re,Ae]=c.useSlot("tooltip",{elementType:FM,className:$t.tooltip,externalForwardedProps:at,ownerState:ye}),[Xe,Ye]=c.useSlot("arrow",{elementType:BM,className:$t.arrow,externalForwardedProps:at,ownerState:ye,ref:le});return c.jsxRuntimeExports.jsxs(C.Fragment,{children:[C.cloneElement(z,Q),c.jsxRuntimeExports.jsx(ot,{as:M??Ol,placement:j,anchorEl:b?{getBoundingClientRect:()=>({top:Sr.y,left:Sr.x,right:Sr.x,bottom:Sr.y,width:0,height:0})}:K,popperRef:J,open:K?A:!1,id:Z,transition:!0,...Me,...St,popperOptions:qe,children:({TransitionProps:ce})=>c.jsxRuntimeExports.jsx(Jt,{timeout:B.transitions.duration.shorter,...ce,...Y,children:c.jsxRuntimeExports.jsxs(re,{...Ae,children:[O,o?c.jsxRuntimeExports.jsx(Xe,{...Ye}):null]})})})]})});process.env.NODE_ENV!=="production"&&(Qf.propTypes={arrow:s.bool,children:ar.isRequired,classes:s.object,className:s.string,components:s.shape({Arrow:s.elementType,Popper:s.elementType,Tooltip:s.elementType,Transition:s.elementType}),componentsProps:s.shape({arrow:s.object,popper:s.object,tooltip:s.object,transition:s.object}),describeChild:s.bool,disableFocusListener:s.bool,disableHoverListener:s.bool,disableInteractive:s.bool,disableTouchListener:s.bool,enterDelay:s.number,enterNextDelay:s.number,enterTouchDelay:s.number,followCursor:s.bool,id:s.string,leaveDelay:s.number,leaveTouchDelay:s.number,onClose:s.func,onOpen:s.func,open:s.bool,placement:s.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:s.elementType,PopperProps:s.object,slotProps:s.shape({arrow:s.oneOfType([s.func,s.object]),popper:s.oneOfType([s.func,s.object]),tooltip:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({arrow:s.elementType,popper:s.elementType,tooltip:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),title:s.node,TransitionComponent:s.elementType,TransitionProps:s.object});const eh=e=>{var l;const{value:t,ref:n}=e,r=c.useTheme(),[o,i]=L.useState(!1);async function a(){if(!n||!("current"in n))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),i(!0),!0}catch(u){console.error(u);const d=window.getSelection();if(d&&n&&"current"in n&&n.current){const p=document.createRange();p.selectNodeContents(n.current),d.removeAllRanges(),d.addRange(p)}}return!1}return L.useEffect(()=>{if(!o)return;const u=setTimeout(()=>i(!1),3e3);return()=>{u&&clearTimeout(u)}},[o]),c.jsxRuntimeExports.jsx(Qf,{open:o,title:"Copied!",children:c.jsxRuntimeExports.jsx(Ce,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(l=r.palette.backgroundPaperElevation)==null?void 0:l[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>a(),children:c.jsxRuntimeExports.jsx(c.Typography,{ref:n,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:r.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})},UM=c.externalizeComponent(Oe.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[n,r]=L.useState(null),o=c.poseToWandelscriptString(e),i=async()=>{try{await navigator.clipboard.writeText(o),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return c.jsxRuntimeExports.jsxs(Ce,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[c.jsxRuntimeExports.jsx(eh,{value:o}),t&&c.jsxRuntimeExports.jsx(c.Button,{variant:"contained",color:"secondary",size:"small",onClick:i,sx:{flexShrink:0},children:n||"Copy"})]})})),VM=c.externalizeComponent(Oe.observer(({joints:e,showCopyButton:t=!1})=>{const[n,r]=L.useState(null),o=`[${e.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`,i=async()=>{try{await navigator.clipboard.writeText(o),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return c.jsxRuntimeExports.jsxs(Ce,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[c.jsxRuntimeExports.jsx(eh,{value:o}),t&&c.jsxRuntimeExports.jsx(c.Button,{variant:"contained",color:"secondary",size:"small",onClick:i,sx:{flexShrink:0},children:n||"Copy"})]})}));class th{constructor(){this.messages=[],this.addMessage=(t,n="info")=>{const r={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:n};this.messages.push(r)},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")},Ie.makeObservable(this,{messages:Ie.observable,addMessage:Ie.action,clearMessages:Ie.action})}}const WM=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),GM=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"}),"DescriptionOutlined"),HM=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),qM=c.createSvgIcon(c.jsxRuntimeExports.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),so=(e,t,n)=>({id:n||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),YM=(e,t)=>so(e,"debug",t),KM=(e,t)=>so(e,"info",t),XM=(e,t)=>so(e,"warning",t),JM=(e,t)=>so(e,"error",t),nh=c.externalizeComponent(Oe.observer(e=>{var p;const{messages:t=[],onClear:n,height:r=400,sx:o}=e,i=c.useTheme(),a=L.useRef(null);L.useEffect(()=>{if(t.length===0)return;const f=a.current;if(!f)return;const h=setTimeout(()=>{f.scrollTop=f.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const l=f=>f.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),u=f=>{switch(f){case"error":return i.palette.error.main;case"warning":return i.palette.warning.main;case"info":return i.palette.info.main;case"debug":return i.palette.text.disabled;default:return i.palette.text.secondary}},d=({message:f})=>{const[h,m]=L.useState(!1),[g,y]=L.useState(!1),[x,b]=L.useState(!1),T=f.message.length>150,v=async()=>{try{await navigator.clipboard.writeText(f.message),y(!0),setTimeout(()=>y(!1),2e3)}catch(w){console.error("Failed to copy message:",w)}},E=T&&!h?`${f.message.substring(0,150)}...`:f.message;return c.jsxRuntimeExports.jsx(c.Box,{onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:i.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:c.jsxRuntimeExports.jsxs(c.Box,{sx:{display:"flex",gap:1},children:[c.jsxRuntimeExports.jsxs(c.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:i.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",l(f.timestamp),"]"]}),c.jsxRuntimeExports.jsx(c.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:u(f.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:E}),c.jsxRuntimeExports.jsxs(c.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:x?1:0,transition:"opacity 0.2s ease-in-out",visibility:x?"visible":"hidden"},children:[c.jsxRuntimeExports.jsx(Ut,{size:"small",onClick:v,sx:{padding:"2px",color:i.palette.text.secondary,"&:hover":{backgroundColor:i.palette.action.hover}},title:g?"Copied!":"Copy message",children:c.jsxRuntimeExports.jsx(WM,{sx:{fontSize:12}})}),T&&c.jsxRuntimeExports.jsx(Ut,{size:"small",onClick:()=>m(!h),sx:{padding:"2px",color:i.palette.text.secondary,"&:hover":{backgroundColor:i.palette.action.hover}},title:h?"Collapse":"Expand",children:h?c.jsxRuntimeExports.jsx(HM,{sx:{fontSize:12}}):c.jsxRuntimeExports.jsx(qM,{sx:{fontSize:12}})})]})]})},f.id)};return c.jsxRuntimeExports.jsxs(c.Paper,{sx:{backgroundColor:((p=i.palette.backgroundPaperElevation)==null?void 0:p[2])||"#171927",backgroundImage:"none",height:r,display:"flex",flexDirection:"column",overflow:"hidden",...o},children:[c.jsxRuntimeExports.jsxs(c.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[c.jsxRuntimeExports.jsxs(c.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsxRuntimeExports.jsx(GM,{sx:{fontSize:16,color:i.palette.action.active,opacity:.56}}),c.jsxRuntimeExports.jsx(c.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:i.palette.text.primary},children:"Log"})]}),c.jsxRuntimeExports.jsx(c.Button,{onClick:n,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:i.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:`${i.palette.primary.main}14`}},children:"Clear"})]}),c.jsxRuntimeExports.jsx(c.Box,{ref:a,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${i.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:i.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:i.palette.divider}}},children:t.length===0?c.jsxRuntimeExports.jsx(c.Typography,{sx:{color:i.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(f=>c.jsxRuntimeExports.jsx(d,{message:f},f.id))})]})})),ZM=c.externalizeComponent(Oe.observer(e=>{const{store:t,onStoreReady:n,...r}=e,o=L.useRef(n);L.useEffect(()=>{o.current=n},[n]);const i=L.useMemo(()=>{var u;const l=t||new th;return(u=o.current)==null||u.call(o,l),l},[t]),a=()=>{i.clearMessages()};return c.jsxRuntimeExports.jsx(nh,{...r,messages:i.messages,onClear:a})}));function QM(e){return c.generateUtilityClass("MuiDialog",e)}const Os=c.generateUtilityClasses("MuiDialog",["root","backdrop","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Il=C.createContext({});process.env.NODE_ENV!=="production"&&(Il.displayName="DialogContext");const eO=c.styled(Kr,{name:"MuiDialog",slot:"Backdrop"})({zIndex:-1}),tO=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],backdrop:["backdrop"],container:["container",`scroll${c.capitalize(n)}`],paper:["paper",`paperScroll${c.capitalize(n)}`,`paperWidth${c.capitalize(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return c.composeClasses(a,QM,t)},nO=c.styled(sa,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),rO=c.styled("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${c.capitalize(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),oO=c.styled(c.Paper,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${c.capitalize(n.scroll)}`],t[`paperWidth${c.capitalize(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(c.memoTheme(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Os.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Os.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Os.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),rh=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiDialog"}),o=c.useTheme(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":l,"aria-modal":u=!0,BackdropComponent:d,BackdropProps:p,children:f,className:h,disableEscapeKeyDown:m=!1,fullScreen:g=!1,fullWidth:y=!1,maxWidth:x="sm",onClick:b,onClose:T,open:v,PaperComponent:E=c.Paper,PaperProps:w={},scroll:S="paper",slots:R={},slotProps:j={},TransitionComponent:M=yt,transitionDuration:I=i,TransitionProps:k,...D}=r,O={...r,disableEscapeKeyDown:m,fullScreen:g,fullWidth:y,maxWidth:x,scroll:S},P=tO(O),N=C.useRef(),_=Z=>{N.current=Z.target===Z.currentTarget},z=Z=>{b&&b(Z),N.current&&(N.current=null,T&&T(Z,"backdropClick"))},B=c.useId(l),W=C.useMemo(()=>({titleId:B}),[B]),K={transition:M,...R},$={transition:k,paper:w,backdrop:p,...j},ne={slots:K,slotProps:$},[le,xe]=c.useSlot("root",{elementType:nO,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:O,className:c.clsx(P.root,h),ref:n}),[de,pe]=c.useSlot("backdrop",{elementType:eO,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:O,className:P.backdrop}),[fe,he]=c.useSlot("paper",{elementType:oO,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:O,className:c.clsx(P.paper,w.className)}),[U,V]=c.useSlot("container",{elementType:rO,externalForwardedProps:ne,ownerState:O,className:P.container}),[G,A]=c.useSlot("transition",{elementType:yt,externalForwardedProps:ne,ownerState:O,additionalProps:{appear:!0,in:v,timeout:I,role:"presentation"}});return c.jsxRuntimeExports.jsx(le,{closeAfterTransition:!0,slots:{backdrop:de},slotProps:{backdrop:{transitionDuration:I,as:d,...pe}},disableEscapeKeyDown:m,onClose:T,open:v,onClick:z,...xe,...D,children:c.jsxRuntimeExports.jsx(G,{...A,children:c.jsxRuntimeExports.jsx(U,{onMouseDown:_,...V,children:c.jsxRuntimeExports.jsx(fe,{as:E,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":B,"aria-modal":u,...he,children:c.jsxRuntimeExports.jsx(Il.Provider,{value:W,children:f})})})})})});process.env.NODE_ENV!=="production"&&(rh.propTypes={"aria-describedby":s.string,"aria-labelledby":s.string,"aria-modal":s.oneOfType([s.oneOf(["false","true"]),s.bool]),BackdropComponent:s.elementType,BackdropProps:s.object,children:s.node,classes:s.object,className:s.string,disableEscapeKeyDown:s.bool,fullScreen:s.bool,fullWidth:s.bool,maxWidth:s.oneOfType([s.oneOf(["xs","sm","md","lg","xl",!1]),s.string]),onClick:s.func,onClose:s.func,open:s.bool.isRequired,PaperComponent:s.elementType,PaperProps:s.object,scroll:s.oneOf(["body","paper"]),slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),container:s.oneOfType([s.func,s.object]),paper:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,container:s.elementType,paper:s.elementType,root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),TransitionComponent:s.elementType,transitionDuration:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})]),TransitionProps:s.object});function iO(e){return c.generateUtilityClass("MuiDialogActions",e)}c.generateUtilityClasses("MuiDialogActions",["root","spacing"]);const sO=e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return c.composeClasses(r,iO,t)},aO=c.styled("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),oh=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,l={...r,disableSpacing:i},u=sO(l);return c.jsxRuntimeExports.jsx(aO,{className:c.clsx(u.root,o),ownerState:l,ref:n,...a})});process.env.NODE_ENV!=="production"&&(oh.propTypes={children:s.node,classes:s.object,className:s.string,disableSpacing:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function lO(e){return c.generateUtilityClass("MuiDialogContent",e)}c.generateUtilityClasses("MuiDialogContent",["root","dividers"]);function cO(e){return c.generateUtilityClass("MuiDialogTitle",e)}const uO=c.generateUtilityClasses("MuiDialogTitle",["root"]),dO=e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return c.composeClasses(r,lO,t)},pO=c.styled("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(c.memoTheme(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${uO.root} + &`]:{paddingTop:0}}}]}))),ih=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,l={...r,dividers:i},u=dO(l);return c.jsxRuntimeExports.jsx(pO,{className:c.clsx(u.root,o),ownerState:l,ref:n,...a})});process.env.NODE_ENV!=="production"&&(ih.propTypes={children:s.node,classes:s.object,className:s.string,dividers:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const fO=e=>{const{classes:t}=e,n={root:["root"]};return c.composeClasses(n,cO,t)},hO=c.styled(c.Typography,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),sh=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,l=r,u=fO(l),{titleId:d=i}=C.useContext(Il);return c.jsxRuntimeExports.jsx(hO,{component:"h2",className:c.clsx(u.root,o),ownerState:l,ref:n,variant:"h6",id:i??d,...a})});process.env.NODE_ENV!=="production"&&(sh.propTypes={children:s.node,classes:s.object,className:s.string,id:s.string,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function mO(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function gO({baseUrl:e=mO(),...t}){return c.jsxRuntimeExports.jsxs(rh,{"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:[c.jsxRuntimeExports.jsx(sh,{id:"no-motion-group-modal-title",children:"No motion group found"}),c.jsxRuntimeExports.jsxs(ih,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[c.jsxRuntimeExports.jsx(c.Typography,{color:"#fff",children:"Found no devices to connect to."}),c.jsxRuntimeExports.jsx(c.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),c.jsxRuntimeExports.jsx(oh,{children:c.jsxRuntimeExports.jsxs(Ce,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[c.jsxRuntimeExports.jsx(c.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),c.jsxRuntimeExports.jsx(c.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const xO=c.createSvgIcon(c.jsxRuntimeExports.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");var Pl=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.CELL_OPEN="CELL_OPEN",e.E_STOP="E_STOP",e.MANUAL_MODE="MANUAL_MODE",e.READY="READY",e))(Pl||{});const ah=c.externalizeComponent(Oe.observer(({setupState:e,className:t})=>{const n=c.useTheme(),{t:r}=Pe.useTranslation(),o=()=>{var d,p,f,h,m,g,y;switch(e){case"READY":return{label:r("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((d=n.palette.tertiary)==null?void 0:d.main)||n.palette.primary.main,backgroundColor:((p=n.palette.backgroundPaperElevation)==null?void 0:p[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:r("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:n.palette.error.main,backgroundColor:((f=n.palette.backgroundPaperElevation)==null?void 0:f[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"CELL_OPEN":return{label:r("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:n.palette.error.main,backgroundColor:((h=n.palette.backgroundPaperElevation)==null?void 0:h[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"E_STOP":return{label:r("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:n.palette.error.main,backgroundColor:((m=n.palette.backgroundPaperElevation)==null?void 0:m[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"MANUAL_MODE":return{label:r("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:n.palette.error.main,backgroundColor:((g=n.palette.backgroundPaperElevation)==null?void 0:g[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};default:return{label:r("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:n.palette.error.main,backgroundColor:((y=n.palette.backgroundPaperElevation)==null?void 0:y[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText}}},{label:i,indicatorColor:a,backgroundColor:l,textColor:u}=o();return c.jsxRuntimeExports.jsx(c.Chip,{className:t,label:c.jsxRuntimeExports.jsxs(c.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsxRuntimeExports.jsx(c.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:a,flexShrink:0}}),c.jsxRuntimeExports.jsx(c.Typography,{variant:"body2",sx:{color:u,fontSize:"0.75rem",lineHeight:1.2},children:i})]}),variant:"filled",sx:{backgroundColor:l,color:n.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),yO=c.externalizeComponent(Oe.observer(({robotName:e,robotType:t,setupState:n,PreconditionComponent:r=ah,className:o})=>{var u;const i=c.useTheme(),a=t||"Robot",l=n===Pl.READY;return c.jsxRuntimeExports.jsxs(c.Box,{className:o,sx:{border:`1px solid ${i.palette.divider}`,background:((u=i.palette.backgroundPaperElevation)==null?void 0:u[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[c.jsxRuntimeExports.jsxs(c.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[l?c.jsxRuntimeExports.jsx(c.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${i.palette.primary.main} !important`},"& svg path":{fill:`${i.palette.primary.main} !important`}},children:c.jsxRuntimeExports.jsx(He.ForwardRef$15,{})}):c.jsxRuntimeExports.jsx(xO,{sx:{color:i.palette.error.main,fontSize:24}}),c.jsxRuntimeExports.jsx(c.Typography,{variant:"body1",sx:{fontWeight:500,color:i.palette.text.primary},children:e}),c.jsxRuntimeExports.jsx(c.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:i.palette.text.secondary,opacity:.3,width:"1px"}}),c.jsxRuntimeExports.jsx(c.Typography,{variant:"body2",sx:{color:i.palette.text.secondary},children:a})]}),r&&c.jsxRuntimeExports.jsx(r,{setupState:n})]})})),Ot=Oe.observer(({id:e,icon:t,color:n,title:r,name:o,label:i,explanation:a,literalValue:l,anchorOrigin:u,transformOrigin:d})=>{const p=Oe.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!p.anchorEl},openPopover(f){p.anchorEl=f.currentTarget},closePopover(){p.anchorEl=null}}));return c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsxs(Ce,{"aria-owns":p.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:p.openPopover,onMouseLeave:p.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[c.jsxRuntimeExports.jsx(c.SvgIcon,{component:t,sx:{color:n}}),i&&c.jsxRuntimeExports.jsx("div",{style:{color:n},children:i})]}),c.jsxRuntimeExports.jsx(aa,{id:e,sx:{pointerEvents:"none"},open:p.isPopoverOpen,anchorEl:p.anchorEl,anchorOrigin:u??{vertical:"bottom",horizontal:"left"},transformOrigin:d??{vertical:"top",horizontal:"left"},onClose:p.closePopover,disableRestoreFocus:!0,children:c.jsxRuntimeExports.jsxs(Ce,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[c.jsxRuntimeExports.jsxs("div",{children:[r&&c.jsxRuntimeExports.jsx(c.Typography,{component:"span",fontSize:"14px",children:`${r}: `}),c.jsxRuntimeExports.jsx(c.Typography,{component:"span",color:n,fontWeight:"bold",fontSize:"14px",children:o})]}),c.jsxRuntimeExports.jsx(c.Typography,{fontSize:"14px",children:a}),l&&c.jsxRuntimeExports.jsx(c.Typography,{fontSize:"12px",children:l})]})})]})}),bO=Oe.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:n,transformOrigin:r,compact:o})=>{const i=c.useTheme(),a=L.useId(),{t:l}=Pe.useTranslation();return e?c.jsxRuntimeExports.jsx(Ot,{id:`motion-group-virtual-${a}`,icon:He.ForwardRef$1,color:i.palette.tertiary.main,name:l("SafetyBar.ControllerType.Virtual.lb"),label:o?null:l("SafetyBar.ControllerType.Virtual.lb"),explanation:c.jsxRuntimeExports.jsxs(Pe.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",c.jsxRuntimeExports.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:n,transformOrigin:r}):c.jsxRuntimeExports.jsx(Ot,{id:`motion-group-physical-${a}`,icon:He.ForwardRef,color:i.palette.primary.main,name:l("SafetyBar.ControllerType.Physical.lb"),label:o?null:l("SafetyBar.ControllerType.Physical.lb"),explanation:c.jsxRuntimeExports.jsx(Pe.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:c.jsxRuntimeExports.jsx("code",{}),strong:c.jsxRuntimeExports.jsx("strong",{})}}),anchorOrigin:n,transformOrigin:r})}),vO=Oe.observer(({operationMode:e,anchorOrigin:t,transformOrigin:n,compact:r})=>{const{t:o}=Pe.useTranslation(),i=c.useTheme(),a=L.useId();switch(e){case"OPERATION_MODE_AUTO":return c.jsxRuntimeExports.jsx(Ot,{id:`operation-mode-auto-${a}`,icon:He.ForwardRef$2,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Automatic.ti"),label:r?null:o("SafetyBar.OperationMode.Automatic.ti"),color:i.palette.text.secondary,explanation:c.jsxRuntimeExports.jsx(Pe.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:n});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return c.jsxRuntimeExports.jsx(Ot,{id:`operation-mode-manual-${a}`,icon:He.ForwardRef$4,color:i.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Manual.lb"),label:r?null:o("SafetyBar.OperationMode.Manual.lb"),explanation:c.jsxRuntimeExports.jsx(Pe.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:n});default:return c.jsxRuntimeExports.jsx(Ot,{id:`operation-mode-error-${a}`,icon:He.ForwardRef$3,color:i.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Error.lb"),label:r?null:o("SafetyBar.OperationMode.Error.lb"),explanation:c.jsxRuntimeExports.jsx(Pe.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:n})}}),EO=Oe.observer(({safetyState:e,anchorOrigin:t,transformOrigin:n,compact:r})=>{const{t:o}=Pe.useTranslation(),i=c.useTheme(),a=L.useId();switch(e){case"SAFETY_STATE_NORMAL":return c.jsxRuntimeExports.jsx(Ot,{id:`safety-state-normal-${a}`,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Normal.lb"),label:r?null:o("SafetyBar.SafetyState.Normal.lb"),icon:He.ForwardRef$8,color:i.palette.text.secondary,explanation:c.jsxRuntimeExports.jsx(Pe.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:n});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return c.jsxRuntimeExports.jsx(Ot,{id:`safety-state-estop-${a}`,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Estop.lb"),label:r?null:o("SafetyBar.SafetyState.Estop.lb"),icon:He.ForwardRef$6,color:i.palette.error.main,explanation:c.jsxRuntimeExports.jsx(Pe.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:n});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 c.jsxRuntimeExports.jsx(Ot,{id:`safety-state-stop-${a}`,icon:He.ForwardRef$9,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Stop.lb"),label:r?null:o("SafetyBar.SafetyState.Stop.lb"),color:i.palette.warning.main,explanation:c.jsxRuntimeExports.jsx(Pe.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:n});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 c.jsxRuntimeExports.jsx(Ot,{id:`safety-state-manual-action-required-${a}`,icon:He.ForwardRef$7,color:i.palette.warning.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.ManualActionRequired.lb"),label:r?null:o("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:c.jsxRuntimeExports.jsx(Pe.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:n});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return c.jsxRuntimeExports.jsx(Ot,{id:`safety-state-error-${a}`,icon:He.ForwardRef$5,color:i.palette.error.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Error.lb"),label:r?null:o("SafetyBar.SafetyState.Error.lb"),explanation:c.jsxRuntimeExports.jsx(Pe.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:n});default:z1(e,`Unknown safety state ${e}`)}}),TO=c.externalizeComponent(Oe.observer(({isVirtual:e,motionGroupId:t,operationMode:n,safetyState:r,anchorOrigin:o,transformOrigin:i,compact:a=!0})=>{const l=a?1:2;return c.jsxRuntimeExports.jsxs(Ce,{direction:"row",gap:l,alignItems:"center",sx:{height:"24px"},children:[c.jsxRuntimeExports.jsx(EO,{safetyState:r,anchorOrigin:o,transformOrigin:i,compact:a}),c.jsxRuntimeExports.jsx(c.Divider,{orientation:"vertical",flexItem:!0}),c.jsxRuntimeExports.jsx(vO,{operationMode:n,anchorOrigin:o,transformOrigin:i,compact:a}),c.jsxRuntimeExports.jsx(c.Divider,{orientation:"vertical",flexItem:!0}),c.jsxRuntimeExports.jsx(bO,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:i,compact:a})]})}));function SO(e){return c.generateUtilityClass("MuiFab",e)}const ad=c.generateUtilityClasses("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),wO=e=>{const{color:t,variant:n,classes:r,size:o}=e,i={root:["root",n,`size${c.capitalize(o)}`,t==="inherit"?"colorInherit":t]},a=c.composeClasses(i,SO,r);return{...r,...a}},CO=c.styled(c.ButtonBase,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>c.rootShouldForwardProp(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${c.capitalize(n.size)}`],n.color==="inherit"&&t.colorInherit,t[c.capitalize(n.size)],t[n.color]]}})(c.memoTheme(({theme:e})=>{var t,n;return{...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${ad.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}}),c.memoTheme(({theme:e})=>({variants:[...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),c.memoTheme(({theme:e})=>({[`&.${ad.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),lh=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiFab"}),{children:o,className:i,color:a="default",component:l="button",disabled:u=!1,disableFocusRipple:d=!1,focusVisibleClassName:p,size:f="large",variant:h="circular",...m}=r,g={...r,color:a,component:l,disabled:u,disableFocusRipple:d,size:f,variant:h},y=wO(g);return c.jsxRuntimeExports.jsx(CO,{className:c.clsx(y.root,i),component:l,disabled:u,focusRipple:!d,focusVisibleClassName:c.clsx(y.focusVisible,p),ownerState:g,ref:n,...m,classes:y,children:o})});process.env.NODE_ENV!=="production"&&(lh.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["default","error","info","inherit","primary","secondary","success","warning"]),s.string]),component:s.elementType,disabled:s.bool,disableFocusRipple:s.bool,disableRipple:s.bool,focusVisibleClassName:s.string,href:s.string,size:s.oneOfType([s.oneOf(["small","medium","large"]),s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["circular","extended"]),s.string])});const RO=c.styled(lh,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,n,r;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:o})=>!o,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:o})=>o,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),jO=e=>{const{ref:t,...n}=e;return c.jsxRuntimeExports.jsx(RO,{ref:t,selected:e.selected,...n,color:"secondary",variant:"circular"})};function ch(e){const t=C.useRef({});return C.useEffect(()=>{t.current=e}),t.current}function MO(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=ch({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:l,max:u=r}=a?i:e,d=l&&Number(l)>u?`${u}+`:l;return{badgeContent:l,invisible:a,max:u,displayValue:d}}function OO(e){return c.generateUtilityClass("MuiBadge",e)}const Qt=c.generateUtilityClasses("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),Is=10,Ps=4,IO=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,l={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${c.capitalize(n.vertical)}${c.capitalize(n.horizontal)}`,`anchorOrigin${c.capitalize(n.vertical)}${c.capitalize(n.horizontal)}${c.capitalize(o)}`,`overlap${c.capitalize(o)}`,t!=="default"&&`color${c.capitalize(t)}`]};return c.composeClasses(l,OO,a)},PO=c.styled("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),kO=c.styled("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${c.capitalize(n.anchorOrigin.vertical)}${c.capitalize(n.anchorOrigin.horizontal)}${c.capitalize(n.overlap)}`],n.color!=="default"&&t[`color${c.capitalize(n.color)}`],n.invisible&&t.invisible]}})(c.memoTheme(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:Is*2,lineHeight:1,padding:"0 6px",height:Is*2,borderRadius:Is,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(c.createSimplePaletteValueFilter(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:Ps,height:Ps*2,minWidth:Ps*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Qt.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Qt.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Qt.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Qt.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Qt.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Qt.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Qt.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Qt.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function ld(e){return{vertical:(e==null?void 0:e.vertical)??"top",horizontal:(e==null?void 0:e.horizontal)??"right"}}const uh=C.forwardRef(function(t,n){const r=c.useDefaultProps({props:t,name:"MuiBadge"}),{anchorOrigin:o,className:i,classes:a,component:l,components:u={},componentsProps:d={},children:p,overlap:f="rectangular",color:h="default",invisible:m=!1,max:g=99,badgeContent:y,slots:x,slotProps:b,showZero:T=!1,variant:v="standard",...E}=r,{badgeContent:w,invisible:S,max:R,displayValue:j}=MO({max:g,invisible:m,badgeContent:y,showZero:T}),M=ch({anchorOrigin:ld(o),color:h,overlap:f,variant:v,badgeContent:y}),I=S||w==null&&v!=="dot",{color:k=h,overlap:D=f,anchorOrigin:O,variant:P=v}=I?M:r,N=ld(O),_=P!=="dot"?j:void 0,z={...r,badgeContent:w,invisible:I,max:R,displayValue:_,showZero:T,anchorOrigin:N,color:k,overlap:D,variant:P},B=IO(z),W={slots:{root:(x==null?void 0:x.root)??u.Root,badge:(x==null?void 0:x.badge)??u.Badge},slotProps:{root:(b==null?void 0:b.root)??d.root,badge:(b==null?void 0:b.badge)??d.badge}},[K,$]=c.useSlot("root",{elementType:PO,externalForwardedProps:{...W,...E},ownerState:z,className:c.clsx(B.root,i),ref:n,additionalProps:{as:l}}),[ne,le]=c.useSlot("badge",{elementType:kO,externalForwardedProps:W,ownerState:z,className:B.badge});return c.jsxRuntimeExports.jsxs(K,{...$,children:[p,c.jsxRuntimeExports.jsx(ne,{...le,children:_})]})});process.env.NODE_ENV!=="production"&&(uh.propTypes={anchorOrigin:s.shape({horizontal:s.oneOf(["left","right"]),vertical:s.oneOf(["bottom","top"])}),badgeContent:s.node,children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["default","primary","secondary","error","info","success","warning"]),s.string]),component:s.elementType,components:s.shape({Badge:s.elementType,Root:s.elementType}),componentsProps:s.shape({badge:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),invisible:s.bool,max:s.number,overlap:s.oneOf(["circular","rectangular"]),showZero:s.bool,slotProps:s.shape({badge:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),slots:s.shape({badge:s.elementType,root:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["dot","standard"]),s.string])});function AO(e){const{children:t,value:n,index:r,...o}=e;return c.jsxRuntimeExports.jsx("div",{role:"tabpanel",hidden:n!==r,id:`tabpanel-${r}`,"aria-labelledby":`tab-${r}`,...o,children:n===r&&c.jsxRuntimeExports.jsx(c.Box,{children:t})})}function _O({children:e,...t}){const{fullWidth:n,indicator:r,onChange:o,orientation:i,scrollButtons:a,selectionFollowsFocus:l,textColor:u,value:d,variant:p,...f}=t;return c.jsxRuntimeExports.jsx(c.Box,{...f,children:e})}const DO=c.externalizeComponent(Oe.observer(e=>{const{items:t,activeTab:n,defaultActiveTab:r=0,onTabChange:o,sx:i,ref:a}=e,l=n!==void 0,[u,d]=L.useState(r),p=l?n:u;L.useEffect(()=>{l||t.length!==0&&(u<0||u>t.length-1)&&d(0)},[t.length,l,u]);const f=(h,m)=>{l||d(m),o==null||o(m)};return c.jsxRuntimeExports.jsxs(c.Box,{ref:a,sx:{height:"100%",display:"flex",flexDirection:"column",...i},children:[c.jsxRuntimeExports.jsx(c.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:c.jsxRuntimeExports.jsx(sl,{value:p,onChange:f,sx:{minHeight:"32px",backgroundColor:"transparent",overflow:"visible","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2,overflow:"visible",paddingTop:0,paddingBottom:0},"& .MuiTabs-scroller":{overflow:"visible !important"},"& .MuiTab-root":{overflow:"visible"}},children:t.map((h,m)=>{var E,w,S;const g=()=>{if(!h.badge)return;const R=h.badge.content,j=h.badge.max;return typeof R=="number"&&j&&R>j?`${j}+`:R},y=()=>{if(!h.badge)return!1;const R=h.badge.content,j=h.badge.showZero;return!(R===0&&!j)},x=g(),b=y(),T=()=>{l||d(m),o==null||o(m)},v=c.jsxRuntimeExports.jsx(il,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:T,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:R=>{var j;return((j=R.palette.backgroundPaperElevation)==null?void 0:j[11])||"#32344B"},color:"text.primary",opacity:p===m?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:p===m?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:R=>{var j;return((j=R.palette.backgroundPaperElevation)==null?void 0:j[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return b?c.jsxRuntimeExports.jsx(_O,{component:"span",sx:{display:"inline-flex"},children:c.jsxRuntimeExports.jsx(uh,{badgeContent:x,color:((E=h.badge)==null?void 0:E.color)||"error",max:(w=h.badge)==null?void 0:w.max,showZero:(S=h.badge)==null?void 0:S.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:v})},h.id):v})})}),c.jsxRuntimeExports.jsx(c.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),c.jsxRuntimeExports.jsx(c.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,m)=>c.jsxRuntimeExports.jsx(AO,{value:p,index:m,children:h.content},h.id))})]})})),NO=e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),o=e%60,i=[];return t>0?(i.push(t.toString()),i.push(n.toString().padStart(2,"0")),i.push(r.toString().padStart(2,"0")),i.push(o.toString().padStart(2,"0"))):n>0?(i.push(n.toString()),i.push(r.toString().padStart(2,"0")),i.push(o.toString().padStart(2,"0"))):(i.push(r.toString()),i.push(o.toString().padStart(2,"0"))),i.join(":")},cd=(e,t)=>{const n=Math.floor(e/86400),r=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),i=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const l={};return n>0&&(l.days=n),r>0&&(l.hours=r),o>0&&(l.minutes=o),(i>0||Object.keys(l).length===0)&&(l.seconds=i),new Intl.DurationFormat(t,{style:"narrow"}).format(l)}catch{}const a=[];return n>0&&a.push(`${n}d`),r>0&&a.push(`${r}h`),o>0&&a.push(`${o}m`),(i>0||a.length===0)&&a.push(`${i}s`),a.join(" ")},$O=({timerState:e,animationState:t,hasError:n,className:r})=>{const{t:o}=Pe.useTranslation(),i=c.useTheme(),{elapsedTime:a,currentProgress:l}=e,{showErrorAnimation:u,showPauseAnimation:d,showMainText:p}=t;return c.jsxRuntimeExports.jsxs(c.Box,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[c.jsxRuntimeExports.jsx(hh.Gauge,{width:264,height:264,value:l,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:d||u?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:n?i.palette.error.light:i.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),c.jsxRuntimeExports.jsx(c.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:c.jsxRuntimeExports.jsxs(c.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[c.jsxRuntimeExports.jsx(yt,{in:p&&n,timeout:200,children:c.jsxRuntimeExports.jsx(c.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:i.palette.error.light},children:o("timer.error")})}),c.jsxRuntimeExports.jsx(yt,{in:p&&!n,timeout:300,children:c.jsxRuntimeExports.jsx(c.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:i.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:NO(a)})})]})})]})},zO=({timerState:e,animationState:t,hasError:n,compact:r,className:o})=>{const{t:i,i18n:a}=Pe.useTranslation(),l=c.useTheme(),{elapsedTime:u,currentProgress:d}=e,{showErrorAnimation:p,showPauseAnimation:f}=t;return r?c.jsxRuntimeExports.jsx(c.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0},children:c.jsxRuntimeExports.jsx(c.Typography,{variant:"body2",sx:{color:n?l.palette.error.light:l.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:n?i("timer.error"):cd(u,a.language)})}):c.jsxRuntimeExports.jsxs(c.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[c.jsxRuntimeExports.jsx(c.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:f||p?.6:1,transition:"opacity 0.5s ease-out"},children:c.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[c.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?l.palette.error.light:l.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),c.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?l.palette.error.light:l.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-d/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),c.jsxRuntimeExports.jsx(c.Typography,{variant:"body2",sx:{color:n?l.palette.error.light:l.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:n?i("timer.error"):cd(u,a.language)})]})},LO=()=>{const[e,t]=L.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),n=L.useRef(null),r=L.useRef(null),o=L.useRef(null),i=L.useCallback(()=>{t(f=>({...f,showPauseAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(f=>({...f,showPauseAnimation:!1}))},800)},[]),a=L.useCallback(()=>{t(f=>({...f,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(f=>({...f,showErrorAnimation:!1}))},600)},[]),l=L.useCallback(()=>{t(f=>({...f,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),u=L.useCallback(()=>{t(f=>({...f,showMainText:!1})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{t(f=>({...f,showMainText:!0}))},200)},[]),d=L.useCallback(()=>{t(f=>({...f,showMainText:!0}))},[]),p=L.useCallback(()=>{n.current&&clearTimeout(n.current),r.current&&clearTimeout(r.current),o.current&&clearTimeout(o.current)},[]);return{animationState:e,triggerPauseAnimation:i,triggerErrorAnimation:a,clearErrorAnimation:l,triggerFadeTransition:u,setInitialAnimationState:d,cleanup:p}},FO=({autoStart:e,hasError:t,onPauseAnimation:n,onErrorAnimation:r,onClearErrorAnimation:o})=>{const[i,a]=L.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),l=L.useRef(null),u=L.useRef(null),d=L.useRef(0),p=L.useRef(0),[f]=c.useInterpolation([0],{tension:80,friction:18,onChange:([b])=>{a(T=>({...T,currentProgress:b}))}}),h=L.useCallback((b=0)=>{const T=b/60%1*100;a(v=>({...v,elapsedTime:b,isPausedState:!1,currentProgress:T})),d.current=0,p.current=T,f.setImmediate([T]),e?(u.current=Date.now()-b*1e3,a(v=>({...v,isRunning:!0}))):u.current=null},[e,f]),m=L.useCallback(()=>{if(u.current&&i.isRunning){const T=(Date.now()-u.current)/1e3+d.current,v=T/60%1*100;f.setTarget([v]),a(E=>({...E,elapsedTime:Math.floor(T)}))}a(b=>({...b,isRunning:!1,isPausedState:!0})),n()},[i.isRunning,f,n]),g=L.useCallback(()=>{i.isPausedState&&(d.current=i.elapsedTime,u.current=Date.now(),a(b=>({...b,isRunning:!0,isPausedState:!1})))},[i.isPausedState,i.elapsedTime]),y=L.useCallback(()=>{a(b=>({...b,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),d.current=0,u.current=null,p.current=0,f.setImmediate([0])},[f]),x=L.useCallback(()=>i.isPausedState,[i.isPausedState]);return L.useEffect(()=>{t?(i.isRunning&&(a(b=>({...b,wasRunningBeforeError:!0})),m()),r()):(i.wasRunningBeforeError&&!i.isRunning&&(a(b=>({...b,wasRunningBeforeError:!1})),g()),o())},[t,i.isRunning,i.wasRunningBeforeError,m,g,r,o]),L.useEffect(()=>{if(i.isRunning){const b=()=>{if(u.current){const v=(Date.now()-u.current)/1e3+d.current,E=v/60%1*100;a(S=>({...S,elapsedTime:Math.floor(v)})),Math.abs(E-p.current)>.1&&(f.setTarget([E]),p.current=E)}l.current=requestAnimationFrame(b)};l.current=requestAnimationFrame(b)}else l.current&&(cancelAnimationFrame(l.current),l.current=null);return()=>{l.current&&(cancelAnimationFrame(l.current),l.current=null)}},[i.isRunning,f]),L.useEffect(()=>{let b=null;const T=()=>{f.update(),b=requestAnimationFrame(T)};return b=requestAnimationFrame(T),()=>{b&&cancelAnimationFrame(b)}},[f]),{timerState:i,controls:{start:h,pause:m,resume:g,reset:y,isPaused:x}}},BO=c.externalizeComponent(Oe.observer(({onTimerReady:e,autoStart:t=!0,variant:n="default",compact:r=!1,className:o,hasError:i=!1})=>{const{animationState:a,triggerPauseAnimation:l,triggerErrorAnimation:u,clearErrorAnimation:d,setInitialAnimationState:p,cleanup:f}=LO(),{timerState:h,controls:m}=FO({autoStart:t,hasError:i,onPauseAnimation:l,onErrorAnimation:u,onClearErrorAnimation:d});return L.useEffect(()=>{p()},[p]),L.useEffect(()=>{let g=!0;const y=setTimeout(()=>{g&&e(m)},0);return()=>{g=!1,clearTimeout(y)}},[e,m]),L.useEffect(()=>f,[f]),n==="small"?c.jsxRuntimeExports.jsx(zO,{timerState:h,animationState:a,hasError:i,compact:r,className:o}):c.jsxRuntimeExports.jsx($O,{timerState:h,animationState:a,hasError:i,className:o})})),ud=1e-4,UO={a:0,d:0,alpha:0,theta:0,reverse_rotation_direction:!1};class pi{constructor(t,n,r,o,i,a,l,u,d,p){this.nova=t,this.controller=n,this.motionGroup=r,this.initialMotionState=o,this.motionStateSocket=i,this.isVirtual=a,this.tcps=l,this.description=u,this.initialControllerState=d,this.controllerStateSocket=p,this.connectedJoggingSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=o,this.controllerState=d,p.addEventListener("message",f=>{var m;const h=(m=Ge.tryParseJson(f.data))==null?void 0:m.result;h&&Ie.runInAction(()=>{this.controllerState=h})}),i.addEventListener("message",f=>{var m;const h=(m=Ge.tryParseJson(f.data))==null?void 0:m.result;if(!h)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${f.data}`);al(this.rapidlyChangingMotionState.joint_position,h.joint_position,ud)||Ie.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=h.joint_position}),ll(this.rapidlyChangingMotionState,h,ud)||Ie.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=h.tcp_pose}),this.rapidlyChangingMotionState.standstill!==h.standstill&&Ie.runInAction(()=>{this.rapidlyChangingMotionState.standstill=h.standstill})}),Ie.makeAutoObservable(this)}static async connectMultiple(t,n){return Promise.all(n.map(r=>pi.connect(t,r)))}static async connect(t,n){var b,T;const[r,o]=n.split("@"),i=await t.api.controller.getCurrentRobotControllerState(o),a=i==null?void 0:i.motion_groups.find(v=>v.motion_group===n);if(!i||!a)throw new Error(`Controller ${o} or motion group ${n} not found`);const l=t.openReconnectingWebsocket(`/controllers/${o}/motion-groups/${n}/state-stream`),u=await l.firstMessage(),d=(b=Ge.tryParseJson(u.data))==null?void 0:b.result;if(!d)throw new Error(`Unable to parse initial motion state message ${u.data}`);console.log(`Connected motion state websocket to motion group ${a.motion_group}. Initial state:
|
|
82
|
-
`,d);const f=(await t.api.controller.getRobotController(i.controller)).configuration.kind==="VirtualController",h=await t.api.motionGroup.getMotionGroupDescription(o,a.motion_group),m=Object.entries(h.tcps||{}).map(([v,E])=>({id:v,readable_name:E.name,position:E.pose.position,orientation:E.pose.orientation})),g=t.openReconnectingWebsocket(`/controllers/${i.controller}/state-stream?response_rate=1000`),y=await g.firstMessage(),x=(T=Ge.tryParseJson(y.data))==null?void 0:T.result;if(!x)throw new Error(`Unable to parse initial controller state message ${y.data}`);return console.log(`Connected controller state websocket to controller ${i.controller}. Initial state:
|
|
83
|
-
`,x),new pi(t,i,a,d,l,f,m,h,x,g)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.description.motion_group_model}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.joint_position.map((t,n)=>({index:n}))}get dhParameters(){if(this.description.dh_parameters!==void 0)return this.description.dh_parameters.map(t=>({...UO,...t}))}get safetyZones(){return this.description.safety_zones}get mountingPosition(){var t,n,r;return this.description.mounting?[(((t=this.description.mounting.position)==null?void 0:t[0])||0)/1e3,(((n=this.description.mounting.position)==null?void 0:n[1])||0)/1e3,(((r=this.description.mounting.position)==null?void 0:r[2])||0)/1e3]:[0,0,0]}get mountingQuaternion(){var o,i,a,l,u,d;const t=new _l.Vector3(((i=(o=this.description.mounting)==null?void 0:o.orientation)==null?void 0:i[0])||0,((l=(a=this.description.mounting)==null?void 0:a.orientation)==null?void 0:l[1])||0,((d=(u=this.description.mounting)==null?void 0:u.orientation)==null?void 0:d[2])||0),n=t.length(),r=t.normalize();return new _l.Quaternion().setFromAxisAngle(r,n)}get isEstopActive(){return["SAFETY_STATE_ROBOT_EMERGENCY_STOP","SAFETY_STATE_DEVICE_EMERGENCY_STOP"].includes(this.controllerState.safety_state)}get isMoveableSafetyState(){return["SAFETY_STATE_NORMAL","SAFETY_STATE_REDUCED"].includes(this.controllerState.safety_state)}get isMoveableOperationMode(){return["OPERATION_MODE_AUTO","OPERATION_MODE_MANUAL","OPERATION_MODE_MANUAL_T1","OPERATION_MODE_MANUAL_T2"].includes(this.controllerState.operation_mode)}get canBeMoved(){return this.isMoveableSafetyState&&this.isMoveableOperationMode&&this.activationState==="active"}async deactivate(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}Ie.runInAction(()=>{this.activationState="deactivating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_MONITOR"),Ie.runInAction(()=>{this.activationState="inactive"})}catch(t){throw Ie.runInAction(()=>{this.activationState="active"}),t}}async activate(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}Ie.runInAction(()=>{this.activationState="activating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_CONTROL"),Ie.runInAction(()=>{this.activationState="active"})}catch(t){throw Ie.runInAction(()=>{this.activationState="inactive"}),t}}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingSocket&&this.connectedJoggingSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}}function dh(){var t,n,r,o,i,a;const e=c.createTheme$1({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:(r=(n=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:n.tonal)==null?void 0:r.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:(o=e.palette.backgroundPaperElevation)==null?void 0:o[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:(a=(i=e.paletteExt)==null?void 0:i.secondary)==null?void 0:a.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}}}}}function VO(){const e=dh();return e.palette.mode="light",e}function WO(e){var r,o,i,a;let t=!0;((r=e.palette)==null?void 0:r.mode)==="light"?t=!1:((o=e.palette)==null?void 0:o.mode)!=="dark"&&(t=!(typeof window<"u"&&((a=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-color-scheme: light)"))==null?void 0:a.matches)));const n=t?dh():VO();return c.createTheme$1(n,e)}exports.AppHeader=km;exports.ConnectedMotionGroup=pi;exports.CycleTimer=vT;exports.JoggerConnection=Fi;exports.JoggingCartesianAxisControl=Ys;exports.JoggingJointValueControl=rf;exports.JoggingPanel=Ej;exports.JoggingStore=Ji;exports.LoadingCover=cf;exports.LoadingErrorMessage=uf;exports.LogPanel=ZM;exports.LogStore=th;exports.LogViewer=nh;exports.MotionStreamConnection=Li;exports.NoMotionGroupModal=gO;exports.PoseCartesianValues=UM;exports.PoseJointValues=VM;exports.RobotListItem=yO;exports.RobotSetupReadinessIndicator=ah;exports.RobotSetupReadinessState=Pl;exports.SafetyBar=TO;exports.SelectableFab=jO;exports.TabBar=DO;exports.Timer=BO;exports.VelocitySlider=Bf;exports.VelocitySliderLabel=El;exports.WandelbotsDataGrid=Jp;exports.createDebugMessage=YM;exports.createErrorMessage=JM;exports.createInfoMessage=KM;exports.createLogMessage=so;exports.createNovaMuiTheme=WO;exports.createWarningMessage=XM;exports.jointValuesEqual=al;exports.poseEqual=af;exports.tcpMotionEqual=ll;exports.unwrapRotationVector=lf;
|
|
84
|
-
//# sourceMappingURL=theming-L5E8VSae.cjs.map
|