@synnaxlabs/pluto 0.43.0 → 0.44.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/Animated-CCN9ByY6.cjs +1 -0
- package/dist/Animated-Owbkpo6B.js +27 -0
- package/dist/Menu-BSLsdSQe.cjs +1 -0
- package/dist/Menu-DZ-gh1ky.js +61 -0
- package/dist/Toggle-BUJcWkDS.js +26 -0
- package/dist/Toggle-BWcSF1BX.cjs +1 -0
- package/dist/{Video-BuzHLiXL.cjs → Video-BcSAFYkH.cjs} +1 -1
- package/dist/{Video-Bq_WSdfc.js → Video-DqCXiObt.js} +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/css-BR-Ih764.cjs +8 -0
- package/dist/css-Cg4qHNg7.js +4329 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +5 -11
- package/dist/dialog.cjs +1 -0
- package/dist/dialog.js +4 -0
- package/dist/eraser-BPrMJQSi.js +13325 -0
- package/dist/eraser-DeKDbhe4.cjs +63 -0
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +46 -47
- package/dist/external-BHiMn0_8.cjs +1 -0
- package/dist/external-BKWucUPD.cjs +1 -0
- package/dist/external-BXXtl81l.js +82 -0
- package/dist/external-BZs08bQT.js +30 -0
- package/dist/external-Be6wSMuJ.cjs +1 -0
- package/dist/external-BhHJuw2t.js +25 -0
- package/dist/external-C4JmDQou.cjs +1 -0
- package/dist/external-CO49SSMt.js +69 -0
- package/dist/external-CcIlyM7a.cjs +1 -0
- package/dist/external-Cdszmp1I.cjs +1 -0
- package/dist/external-CmXsU6yu.cjs +1 -0
- package/dist/external-CwWs_qf4.js +10 -0
- package/dist/external-D2eCxMkQ.cjs +46 -0
- package/dist/external-D7fvHJwL.cjs +1 -0
- package/dist/external-D9Mbu0wy.cjs +1 -0
- package/dist/external-DCftrpz2.js +319 -0
- package/dist/external-DVV0t11f.cjs +1 -0
- package/dist/external-Dd9YnYGw.js +126 -0
- package/dist/external-Dr1KTRgM.js +75 -0
- package/dist/external-E3bYM0JI.cjs +1 -0
- package/dist/external-JZqEUnPB.js +69 -0
- package/dist/external-O7GBl914.cjs +1 -0
- package/dist/external-SZ8meWoz.js +42 -0
- package/dist/external-ZbSTG-v-.js +43 -0
- package/dist/{external-firJ8w9n.js → external-bO6dVXFd.js} +2050 -2056
- package/dist/external-fKroctog.js +375 -0
- package/dist/flex.cjs +1 -0
- package/dist/flex.js +4 -0
- package/dist/{fontString-CynarMI1.js → fontString-BCV37JOn.js} +12 -13
- package/dist/fontString-DUff-KJe.cjs +1 -0
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +12627 -11601
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/provider-Dx_qX7Wi.cjs +53 -0
- package/dist/provider-Y8rmJd2z.js +6031 -0
- package/dist/src/aether/aether/aether.d.ts +11 -5
- package/dist/src/aether/aether/aether.d.ts.map +1 -1
- package/dist/src/aether/aether/aether.spec.d.ts +1 -1
- package/dist/src/aether/aether/aether.spec.d.ts.map +1 -1
- package/dist/src/aether/main.d.ts +2 -2
- package/dist/src/aether/main.d.ts.map +1 -1
- package/dist/src/aether/main.spec.d.ts +1 -1
- package/dist/src/aether/main.spec.d.ts.map +1 -1
- package/dist/src/alamos/aether/alamos.d.ts +1 -1
- package/dist/src/alamos/aether/alamos.d.ts.map +1 -1
- package/dist/src/breadcrumb/Breadcrumb.d.ts +15 -42
- package/dist/src/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/src/button/Button.d.ts +16 -32
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/button/Toggle.d.ts +3 -36
- package/dist/src/button/Toggle.d.ts.map +1 -1
- package/dist/src/button/external.d.ts +0 -2
- package/dist/src/button/external.d.ts.map +1 -1
- package/dist/src/caret/Animated.d.ts +2 -2
- package/dist/src/caret/Animated.d.ts.map +1 -1
- package/dist/src/channel/AliasContext.d.ts +19 -0
- package/dist/src/channel/AliasContext.d.ts.map +1 -0
- package/dist/src/channel/AliasInput.d.ts +9 -0
- package/dist/src/channel/AliasInput.d.ts.map +1 -0
- package/dist/src/channel/AliasProvider.d.ts +1 -19
- package/dist/src/channel/AliasProvider.d.ts.map +1 -1
- package/dist/src/channel/LinePlot.d.ts +2 -2
- package/dist/src/channel/LinePlot.d.ts.map +1 -1
- package/dist/src/channel/Select.d.ts +9 -11
- package/dist/src/channel/Select.d.ts.map +1 -1
- package/dist/src/channel/external.d.ts +3 -0
- package/dist/src/channel/external.d.ts.map +1 -1
- package/dist/src/channel/queries.d.ts +69 -0
- package/dist/src/channel/queries.d.ts.map +1 -0
- package/dist/src/channel/queries.spec.d.ts +2 -0
- package/dist/src/channel/queries.spec.d.ts.map +1 -0
- package/dist/src/color/Picker.d.ts.map +1 -1
- package/dist/src/color/Provider.d.ts +2 -2
- package/dist/src/color/Provider.d.ts.map +1 -1
- package/dist/src/color/Swatch.d.ts +3 -3
- package/dist/src/color/Swatch.d.ts.map +1 -1
- package/dist/src/component/SelectSize.d.ts +7 -0
- package/dist/src/component/SelectSize.d.ts.map +1 -0
- package/dist/src/component/external.d.ts +5 -0
- package/dist/src/component/external.d.ts.map +1 -0
- package/dist/src/component/index.d.ts +2 -0
- package/dist/src/component/index.d.ts.map +1 -0
- package/dist/src/component/removeProps.d.ts.map +1 -0
- package/dist/src/component/removeProps.spec.d.ts.map +1 -0
- package/dist/src/{util → component}/renderProp.d.ts +1 -1
- package/dist/src/component/renderProp.d.ts.map +1 -0
- package/dist/src/component/size.d.ts +12 -0
- package/dist/src/component/size.d.ts.map +1 -0
- package/dist/src/css/bem.d.ts +6 -6
- package/dist/src/css/bem.d.ts.map +1 -1
- package/dist/src/css/css.d.ts +6 -6
- package/dist/src/css/css.d.ts.map +1 -1
- package/dist/src/css/units.d.ts +1 -1
- package/dist/src/css/units.d.ts.map +1 -1
- package/dist/src/dialog/Background.d.ts +8 -0
- package/dist/src/dialog/Background.d.ts.map +1 -0
- package/dist/src/dialog/Dialog.d.ts +6 -0
- package/dist/src/dialog/Dialog.d.ts.map +1 -0
- package/dist/src/dialog/Dialog.spec.d.ts +2 -0
- package/dist/src/dialog/Dialog.spec.d.ts.map +1 -0
- package/dist/src/dialog/Frame.d.ts +48 -0
- package/dist/src/dialog/Frame.d.ts.map +1 -0
- package/dist/src/dialog/Trigger.d.ts +7 -0
- package/dist/src/dialog/Trigger.d.ts.map +1 -0
- package/dist/src/dialog/external.d.ts +5 -0
- package/dist/src/dialog/external.d.ts.map +1 -0
- package/dist/src/dialog/index.d.ts +1 -1
- package/dist/src/dialog/index.d.ts.map +1 -1
- package/dist/src/dialog/position.d.ts +10 -0
- package/dist/src/dialog/position.d.ts.map +1 -0
- package/dist/src/direction/Select.d.ts +8 -0
- package/dist/src/direction/Select.d.ts.map +1 -0
- package/dist/src/direction/index.d.ts +2 -0
- package/dist/src/direction/index.d.ts.map +1 -0
- package/dist/src/divider/Divider.d.ts +4 -5
- package/dist/src/divider/Divider.d.ts.map +1 -1
- package/dist/src/flex/Box.d.ts +128 -0
- package/dist/src/flex/Box.d.ts.map +1 -0
- package/dist/src/flex/Box.spec.d.ts +2 -0
- package/dist/src/flex/Box.spec.d.ts.map +1 -0
- package/dist/src/flex/Select.d.ts +7 -0
- package/dist/src/flex/Select.d.ts.map +1 -0
- package/dist/src/flex/external.d.ts +3 -0
- package/dist/src/flex/external.d.ts.map +1 -0
- package/dist/src/flex/index.d.ts +2 -0
- package/dist/src/flex/index.d.ts.map +1 -0
- package/dist/src/flux/Context.d.ts +4 -0
- package/dist/src/flux/Context.d.ts.map +1 -0
- package/dist/src/flux/Provider.d.ts +9 -0
- package/dist/src/flux/Provider.d.ts.map +1 -0
- package/dist/src/flux/aether/external.d.ts +5 -0
- package/dist/src/flux/aether/external.d.ts.map +1 -0
- package/dist/src/flux/aether/index.d.ts +2 -0
- package/dist/src/flux/aether/index.d.ts.map +1 -0
- package/dist/src/flux/aether/listeners.d.ts +16 -0
- package/dist/src/flux/aether/listeners.d.ts.map +1 -0
- package/dist/src/flux/aether/params.d.ts +31 -0
- package/dist/src/flux/aether/params.d.ts.map +1 -0
- package/dist/src/flux/aether/provider.d.ts +29 -0
- package/dist/src/flux/aether/provider.d.ts.map +1 -0
- package/dist/src/flux/aether/streamer.d.ts +22 -0
- package/dist/src/flux/aether/streamer.d.ts.map +1 -0
- package/dist/src/flux/aether/streamer.spec.d.ts +2 -0
- package/dist/src/flux/aether/streamer.spec.d.ts.map +1 -0
- package/dist/src/flux/aether/types.d.ts +13 -0
- package/dist/src/flux/aether/types.d.ts.map +1 -0
- package/dist/src/flux/external.d.ts +12 -0
- package/dist/src/flux/external.d.ts.map +1 -0
- package/dist/src/flux/form.d.ts +112 -0
- package/dist/src/flux/form.d.ts.map +1 -0
- package/dist/src/flux/form.spec.d.ts +2 -0
- package/dist/src/flux/form.spec.d.ts.map +1 -0
- package/dist/src/flux/index.d.ts +2 -0
- package/dist/src/flux/index.d.ts.map +1 -0
- package/dist/src/flux/list.d.ts +251 -0
- package/dist/src/flux/list.d.ts.map +1 -0
- package/dist/src/flux/list.spec.d.ts +2 -0
- package/dist/src/flux/list.spec.d.ts.map +1 -0
- package/dist/src/flux/listeners.d.ts +4 -0
- package/dist/src/flux/listeners.d.ts.map +1 -0
- package/dist/src/flux/listeners.spec.d.ts +2 -0
- package/dist/src/flux/listeners.spec.d.ts.map +1 -0
- package/dist/src/flux/result.d.ts +101 -0
- package/dist/src/flux/result.d.ts.map +1 -0
- package/dist/src/flux/result.spec.d.ts +2 -0
- package/dist/src/flux/result.spec.d.ts.map +1 -0
- package/dist/src/flux/retrieve.d.ts +213 -0
- package/dist/src/flux/retrieve.d.ts.map +1 -0
- package/dist/src/flux/retrieve.spec.d.ts +2 -0
- package/dist/src/flux/retrieve.spec.d.ts.map +1 -0
- package/dist/src/flux/update.d.ts +132 -0
- package/dist/src/flux/update.d.ts.map +1 -0
- package/dist/src/flux/update.spec.d.ts +2 -0
- package/dist/src/flux/update.spec.d.ts.map +1 -0
- package/dist/src/flux/useMountListeners.d.ts +7 -0
- package/dist/src/flux/useMountListeners.d.ts.map +1 -0
- package/dist/src/form/Context.d.ts +34 -0
- package/dist/src/form/Context.d.ts.map +1 -0
- package/dist/src/form/Field.d.ts +23 -27
- package/dist/src/form/Field.d.ts.map +1 -1
- package/dist/src/form/Form.d.ts +2 -173
- package/dist/src/form/Form.d.ts.map +1 -1
- package/dist/src/form/external.d.ts +3 -0
- package/dist/src/form/external.d.ts.map +1 -1
- package/dist/src/form/state.d.ts +53 -0
- package/dist/src/form/state.d.ts.map +1 -0
- package/dist/src/form/state.spec.d.ts +2 -0
- package/dist/src/form/state.spec.d.ts.map +1 -0
- package/dist/src/form/synced.d.ts +5 -4
- package/dist/src/form/synced.d.ts.map +1 -1
- package/dist/src/form/use.d.ts +24 -0
- package/dist/src/form/use.d.ts.map +1 -0
- package/dist/src/form/useField.d.ts +64 -0
- package/dist/src/form/useField.d.ts.map +1 -0
- package/dist/src/generic/Generic.d.ts +8 -3
- package/dist/src/generic/Generic.d.ts.map +1 -1
- package/dist/src/generic/Generic.spec.d.ts +2 -0
- package/dist/src/generic/Generic.spec.d.ts.map +1 -0
- package/dist/src/hardware/device/Select.d.ts +5 -7
- package/dist/src/hardware/device/Select.d.ts.map +1 -1
- package/dist/src/hardware/device/StatusIndicator.d.ts +8 -0
- package/dist/src/hardware/device/StatusIndicator.d.ts.map +1 -0
- package/dist/src/hardware/device/external.d.ts +4 -0
- package/dist/src/hardware/device/external.d.ts.map +1 -0
- package/dist/src/hardware/device/index.d.ts +1 -1
- package/dist/src/hardware/device/index.d.ts.map +1 -1
- package/dist/src/hardware/device/queries.d.ts +12 -0
- package/dist/src/hardware/device/queries.d.ts.map +1 -0
- package/dist/src/hardware/device/queries.spec.d.ts +2 -0
- package/dist/src/hardware/device/queries.spec.d.ts.map +1 -0
- package/dist/src/hardware/rack/Select.d.ts +6 -2
- package/dist/src/hardware/rack/Select.d.ts.map +1 -1
- package/dist/src/hardware/rack/StatusIndicator.d.ts +8 -0
- package/dist/src/hardware/rack/StatusIndicator.d.ts.map +1 -0
- package/dist/src/hardware/rack/external.d.ts +7 -0
- package/dist/src/hardware/rack/external.d.ts.map +1 -0
- package/dist/src/hardware/rack/index.d.ts +1 -1
- package/dist/src/hardware/rack/index.d.ts.map +1 -1
- package/dist/src/hardware/rack/queries.d.ts +10 -0
- package/dist/src/hardware/rack/queries.d.ts.map +1 -0
- package/dist/src/hardware/rack/queries.spec.d.ts +2 -0
- package/dist/src/hardware/rack/queries.spec.d.ts.map +1 -0
- package/dist/src/hardware/rack/synchronizers.d.ts +3 -0
- package/dist/src/hardware/rack/synchronizers.d.ts.map +1 -0
- package/dist/src/hardware/rack/use.d.ts +3 -0
- package/dist/src/hardware/rack/use.d.ts.map +1 -0
- package/dist/src/hardware/rack/useStatus.d.ts +3 -0
- package/dist/src/hardware/rack/useStatus.d.ts.map +1 -0
- package/dist/src/hardware/task/index.d.ts +2 -0
- package/dist/src/hardware/task/index.d.ts.map +1 -0
- package/dist/src/hardware/task/queries.d.ts +17 -0
- package/dist/src/hardware/task/queries.d.ts.map +1 -0
- package/dist/src/hardware/task/queries.spec.d.ts +2 -0
- package/dist/src/hardware/task/queries.spec.d.ts.map +1 -0
- package/dist/src/haul/Haul.d.ts +5 -4
- package/dist/src/haul/Haul.d.ts.map +1 -1
- package/dist/src/header/Actions.d.ts +4 -6
- package/dist/src/header/Actions.d.ts.map +1 -1
- package/dist/src/header/Header.d.ts +4 -3
- package/dist/src/header/Header.d.ts.map +1 -1
- package/dist/src/header/Title.d.ts +1 -1
- package/dist/src/header/Title.d.ts.map +1 -1
- package/dist/src/hooks/index.d.ts +3 -2
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/ref.d.ts +2 -2
- package/dist/src/hooks/ref.d.ts.map +1 -1
- package/dist/src/hooks/useAsyncEffect.d.ts +45 -0
- package/dist/src/hooks/useAsyncEffect.d.ts.map +1 -0
- package/dist/src/hooks/useAsyncEffect.spec.d.ts +2 -0
- package/dist/src/hooks/useAsyncEffect.spec.d.ts.map +1 -0
- package/dist/src/hooks/useEffectCompare.d.ts +3 -0
- package/dist/src/hooks/useEffectCompare.d.ts.map +1 -0
- package/dist/src/hooks/useRequiredContext.d.ts +1 -1
- package/dist/src/hooks/useRequiredContext.d.ts.map +1 -1
- package/dist/src/icon/Icon.d.ts +14 -16
- package/dist/src/icon/Icon.d.ts.map +1 -1
- package/dist/src/icon/external.d.ts +3 -0
- package/dist/src/icon/external.d.ts.map +1 -0
- package/dist/src/icon/index.d.ts +1 -1
- package/dist/src/icon/index.d.ts.map +1 -1
- package/dist/src/icon/registry.d.ts +206 -0
- package/dist/src/icon/registry.d.ts.map +1 -0
- package/dist/src/index.d.ts +7 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Boolean.d.ts +11 -0
- package/dist/src/input/Boolean.d.ts.map +1 -0
- package/dist/src/input/Checkbox.d.ts +17 -0
- package/dist/src/input/Checkbox.d.ts.map +1 -0
- package/dist/src/input/Date.d.ts +3 -3
- package/dist/src/input/Date.d.ts.map +1 -1
- package/dist/src/input/DateTime.d.ts +3 -2
- package/dist/src/input/DateTime.d.ts.map +1 -1
- package/dist/src/input/DragButton.d.ts +2 -2
- package/dist/src/input/DragButton.d.ts.map +1 -1
- package/dist/src/input/HelpText.d.ts +1 -1
- package/dist/src/input/HelpText.d.ts.map +1 -1
- package/dist/src/input/Item.d.ts +4 -4
- package/dist/src/input/Item.d.ts.map +1 -1
- package/dist/src/input/Numeric.d.ts +4 -4
- package/dist/src/input/Numeric.d.ts.map +1 -1
- package/dist/src/input/Switch.d.ts +4 -3
- package/dist/src/input/Switch.d.ts.map +1 -1
- package/dist/src/input/Text.d.ts +12 -9
- package/dist/src/input/Text.d.ts.map +1 -1
- package/dist/src/input/TextArea.d.ts +9 -5
- package/dist/src/input/TextArea.d.ts.map +1 -1
- package/dist/src/input/Time.d.ts +6 -5
- package/dist/src/input/Time.d.ts.map +1 -1
- package/dist/src/input/external.d.ts +1 -0
- package/dist/src/input/external.d.ts.map +1 -1
- package/dist/src/input/types.d.ts +7 -22
- package/dist/src/input/types.d.ts.map +1 -1
- package/dist/src/label/Select.d.ts +6 -5
- package/dist/src/label/Select.d.ts.map +1 -1
- package/dist/src/label/external.d.ts +1 -0
- package/dist/src/label/external.d.ts.map +1 -1
- package/dist/src/label/queries.d.ts +38 -0
- package/dist/src/label/queries.d.ts.map +1 -0
- package/dist/src/label/queries.spec.d.ts +2 -0
- package/dist/src/label/queries.spec.d.ts.map +1 -0
- package/dist/src/list/Frame.d.ts +33 -0
- package/dist/src/list/Frame.d.ts.map +1 -0
- package/dist/src/list/Item.d.ts +17 -7
- package/dist/src/list/Item.d.ts.map +1 -1
- package/dist/src/list/Items.d.ts +13 -0
- package/dist/src/list/Items.d.ts.map +1 -0
- package/dist/src/list/external.d.ts +6 -10
- package/dist/src/list/external.d.ts.map +1 -1
- package/dist/src/list/pager.d.ts +62 -0
- package/dist/src/list/pager.d.ts.map +1 -0
- package/dist/src/list/pager.spec.d.ts +2 -0
- package/dist/src/list/pager.spec.d.ts.map +1 -0
- package/dist/src/list/useKeysData.d.ts +7 -0
- package/dist/src/list/useKeysData.d.ts.map +1 -0
- package/dist/src/list/useKeysData.spec.d.ts +2 -0
- package/dist/src/list/useKeysData.spec.d.ts.map +1 -0
- package/dist/src/list/useMapData.d.ts +18 -0
- package/dist/src/list/useMapData.d.ts.map +1 -0
- package/dist/src/list/useMapData.spec.d.ts +2 -0
- package/dist/src/list/useMapData.spec.d.ts.map +1 -0
- package/dist/src/list/useStaticData.d.ts +19 -0
- package/dist/src/list/useStaticData.d.ts.map +1 -0
- package/dist/src/list/useStaticData.spec.d.ts +2 -0
- package/dist/src/list/useStaticData.spec.d.ts.map +1 -0
- package/dist/src/memo/useMemoCompare.d.ts +1 -1
- package/dist/src/memo/useMemoCompare.d.ts.map +1 -1
- package/dist/src/menu/ContextMenu.d.ts +3 -3
- package/dist/src/menu/ContextMenu.d.ts.map +1 -1
- package/dist/src/menu/Item.d.ts +3 -28
- package/dist/src/menu/Item.d.ts.map +1 -1
- package/dist/src/menu/Menu.d.ts +6 -5
- package/dist/src/menu/Menu.d.ts.map +1 -1
- package/dist/src/mosaic/Mosaic.d.ts +2 -2
- package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
- package/dist/src/mosaic/types.d.ts +1 -1
- package/dist/src/mosaic/types.d.ts.map +1 -1
- package/dist/src/nav/Bar.d.ts +3 -3
- package/dist/src/nav/Bar.d.ts.map +1 -1
- package/dist/src/notation/Select.d.ts +3 -3
- package/dist/src/notation/Select.d.ts.map +1 -1
- package/dist/src/note/Note.d.ts +2 -2
- package/dist/src/note/Note.d.ts.map +1 -1
- package/dist/src/observe/use.d.ts +0 -7
- package/dist/src/observe/use.d.ts.map +1 -1
- package/dist/src/ontology/external.d.ts +2 -0
- package/dist/src/ontology/external.d.ts.map +1 -0
- package/dist/src/ontology/index.d.ts +2 -0
- package/dist/src/ontology/index.d.ts.map +1 -0
- package/dist/src/ontology/queries.d.ts +27 -0
- package/dist/src/ontology/queries.d.ts.map +1 -0
- package/dist/src/ontology/queries.spec.d.ts +2 -0
- package/dist/src/ontology/queries.spec.d.ts.map +1 -0
- package/dist/src/os/Controls/Mac.d.ts.map +1 -1
- package/dist/src/os/Controls/Windows.d.ts +1 -1
- package/dist/src/os/Controls/Windows.d.ts.map +1 -1
- package/dist/src/os/Controls/types.d.ts +4 -4
- package/dist/src/os/Controls/types.d.ts.map +1 -1
- package/dist/src/pluto/Pluto.d.ts.map +1 -1
- package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
- package/dist/src/ranger/Breadcrumb.d.ts +9 -0
- package/dist/src/ranger/Breadcrumb.d.ts.map +1 -0
- package/dist/src/ranger/Select.d.ts +13 -5
- package/dist/src/ranger/Select.d.ts.map +1 -1
- package/dist/src/ranger/TimeRangeChip.d.ts +3 -4
- package/dist/src/ranger/TimeRangeChip.d.ts.map +1 -1
- package/dist/src/ranger/external.d.ts +2 -1
- package/dist/src/ranger/external.d.ts.map +1 -1
- package/dist/src/ranger/queries.d.ts +97 -0
- package/dist/src/ranger/queries.d.ts.map +1 -0
- package/dist/src/ranger/queries.spec.d.ts +2 -0
- package/dist/src/ranger/queries.spec.d.ts.map +1 -0
- package/dist/src/resize/Core.d.ts +3 -3
- package/dist/src/resize/Core.d.ts.map +1 -1
- package/dist/src/resize/Multiple.d.ts +2 -2
- package/dist/src/resize/Multiple.d.ts.map +1 -1
- package/dist/src/select/Button.d.ts +10 -44
- package/dist/src/select/Button.d.ts.map +1 -1
- package/dist/src/select/Button.spec.d.ts +2 -0
- package/dist/src/select/Button.spec.d.ts.map +1 -0
- package/dist/src/select/Dialog.d.ts +16 -0
- package/dist/src/select/Dialog.d.ts.map +1 -0
- package/dist/src/select/Dialog.spec.d.ts +2 -0
- package/dist/src/select/Dialog.spec.d.ts.map +1 -0
- package/dist/src/select/Frame.d.ts +41 -0
- package/dist/src/select/Frame.d.ts.map +1 -0
- package/dist/src/select/ListItem.d.ts +6 -0
- package/dist/src/select/ListItem.d.ts.map +1 -0
- package/dist/src/select/Multiple.d.ts +16 -51
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/select/Multiple.spec.d.ts +2 -0
- package/dist/src/select/Multiple.spec.d.ts.map +1 -0
- package/dist/src/select/MultipleTrigger.d.ts +24 -0
- package/dist/src/select/MultipleTrigger.d.ts.map +1 -0
- package/dist/src/select/SearchInput.d.ts +10 -0
- package/dist/src/select/SearchInput.d.ts.map +1 -0
- package/dist/src/select/Single.d.ts +15 -49
- package/dist/src/select/Single.d.ts.map +1 -1
- package/dist/src/select/Single.spec.d.ts +2 -0
- package/dist/src/select/Single.spec.d.ts.map +1 -0
- package/dist/src/select/SingleTrigger.d.ts +14 -0
- package/dist/src/select/SingleTrigger.d.ts.map +1 -0
- package/dist/src/select/Static.d.ts +12 -0
- package/dist/src/select/Static.d.ts.map +1 -0
- package/dist/src/select/Static.spec.d.ts +2 -0
- package/dist/src/select/Static.spec.d.ts.map +1 -0
- package/dist/src/select/external.d.ts +8 -4
- package/dist/src/select/external.d.ts.map +1 -1
- package/dist/src/select/text/Level.d.ts +2 -6
- package/dist/src/select/text/Level.d.ts.map +1 -1
- package/dist/src/select/text/Weight.d.ts +2 -6
- package/dist/src/select/text/Weight.d.ts.map +1 -1
- package/dist/src/select/use.d.ts +42 -0
- package/dist/src/select/use.d.ts.map +1 -0
- package/dist/src/select/use.spec.d.ts +2 -0
- package/dist/src/select/use.spec.d.ts.map +1 -0
- package/dist/src/select/useHover.d.ts +11 -0
- package/dist/src/select/useHover.d.ts.map +1 -0
- package/dist/src/select/useHover.spec.d.ts +2 -0
- package/dist/src/select/useHover.spec.d.ts.map +1 -0
- package/dist/src/select/variant.d.ts +6 -0
- package/dist/src/select/variant.d.ts.map +1 -0
- package/dist/src/showcase/BreadcrumbShowcase.d.ts +2 -0
- package/dist/src/showcase/BreadcrumbShowcase.d.ts.map +1 -0
- package/dist/src/showcase/ButtonShowcase.d.ts +2 -0
- package/dist/src/showcase/ButtonShowcase.d.ts.map +1 -0
- package/dist/src/showcase/DisplaySelector.d.ts +8 -0
- package/dist/src/showcase/DisplaySelector.d.ts.map +1 -0
- package/dist/src/showcase/DividerShowcase.d.ts +2 -0
- package/dist/src/showcase/DividerShowcase.d.ts.map +1 -0
- package/dist/src/showcase/FlexShowcase.d.ts +2 -0
- package/dist/src/showcase/FlexShowcase.d.ts.map +1 -0
- package/dist/src/showcase/HeaderShowcase.d.ts +2 -0
- package/dist/src/showcase/HeaderShowcase.d.ts.map +1 -0
- package/dist/src/showcase/InputShowcase.d.ts +19 -0
- package/dist/src/showcase/InputShowcase.d.ts.map +1 -0
- package/dist/src/showcase/MenuShowcase.d.ts +2 -0
- package/dist/src/showcase/MenuShowcase.d.ts.map +1 -0
- package/dist/src/showcase/NavShowcase.d.ts +2 -0
- package/dist/src/showcase/NavShowcase.d.ts.map +1 -0
- package/dist/src/showcase/NoteShowcase.d.ts +2 -0
- package/dist/src/showcase/NoteShowcase.d.ts.map +1 -0
- package/dist/src/showcase/SelectShowcase.d.ts +3 -0
- package/dist/src/showcase/SelectShowcase.d.ts.map +1 -0
- package/dist/src/showcase/Showcase.d.ts +2 -0
- package/dist/src/showcase/Showcase.d.ts.map +1 -0
- package/dist/src/showcase/SubcategorySection.d.ts +6 -0
- package/dist/src/showcase/SubcategorySection.d.ts.map +1 -0
- package/dist/src/showcase/TagShowcase.d.ts +2 -0
- package/dist/src/showcase/TagShowcase.d.ts.map +1 -0
- package/dist/src/showcase/TextShowcase.d.ts +2 -0
- package/dist/src/showcase/TextShowcase.d.ts.map +1 -0
- package/dist/src/showcase/constants.d.ts +8 -0
- package/dist/src/showcase/constants.d.ts.map +1 -0
- package/dist/src/showcase/index.d.ts +16 -0
- package/dist/src/showcase/index.d.ts.map +1 -0
- package/dist/src/state/state.d.ts +24 -24
- package/dist/src/state/state.d.ts.map +1 -1
- package/dist/src/status/Aggregator.d.ts +5 -5
- package/dist/src/status/Aggregator.d.ts.map +1 -1
- package/dist/src/status/Indicator.d.ts +2 -2
- package/dist/src/status/Indicator.d.ts.map +1 -1
- package/dist/src/status/Notification.d.ts +2 -2
- package/dist/src/status/Notification.d.ts.map +1 -1
- package/dist/src/status/Summary.d.ts +8 -0
- package/dist/src/status/Summary.d.ts.map +1 -0
- package/dist/src/status/aether/aggregator.d.ts +13 -30
- package/dist/src/status/aether/aggregator.d.ts.map +1 -1
- package/dist/src/status/aether/index.d.ts +1 -1
- package/dist/src/status/aether/index.d.ts.map +1 -1
- package/dist/src/status/external.d.ts +1 -2
- package/dist/src/status/external.d.ts.map +1 -1
- package/dist/src/steps/Steps.d.ts +2 -2
- package/dist/src/steps/Steps.d.ts.map +1 -1
- package/dist/src/store/index.d.ts +2 -0
- package/dist/src/store/index.d.ts.map +1 -0
- package/dist/src/store/store.d.ts +7 -0
- package/dist/src/store/store.d.ts.map +1 -0
- package/dist/src/store/store.spec.d.ts +2 -0
- package/dist/src/store/store.spec.d.ts.map +1 -0
- package/dist/src/synnax/Provider.d.ts +11 -0
- package/dist/src/synnax/Provider.d.ts.map +1 -1
- package/dist/src/synnax/aether/provider.d.ts +7 -7
- package/dist/src/synnax/aether/provider.d.ts.map +1 -1
- package/dist/src/table/Table.d.ts +1 -1
- package/dist/src/table/Table.d.ts.map +1 -1
- package/dist/src/table/aether/Table.d.ts +1 -1
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts +6 -6
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/table/cells/Forms.d.ts +4 -0
- package/dist/src/table/cells/Forms.d.ts.map +1 -1
- package/dist/src/table/cells/external.d.ts +4 -0
- package/dist/src/table/cells/external.d.ts.map +1 -0
- package/dist/src/table/cells/index.d.ts +1 -1
- package/dist/src/table/cells/registry.d.ts +1 -1
- package/dist/src/table/cells/registry.d.ts.map +1 -1
- package/dist/src/tabs/Selector.d.ts +9 -9
- package/dist/src/tabs/Selector.d.ts.map +1 -1
- package/dist/src/tabs/Tabs.d.ts +6 -6
- package/dist/src/tabs/Tabs.d.ts.map +1 -1
- package/dist/src/tabs/types.d.ts +3 -3
- package/dist/src/tabs/types.d.ts.map +1 -1
- package/dist/src/tabs/useContext.d.ts +3 -3
- package/dist/src/tabs/useContext.d.ts.map +1 -1
- package/dist/src/tag/Tag.d.ts +6 -6
- package/dist/src/tag/Tag.d.ts.map +1 -1
- package/dist/src/tag/Tags.d.ts +5 -0
- package/dist/src/tag/Tags.d.ts.map +1 -0
- package/dist/src/tag/external.d.ts +3 -0
- package/dist/src/tag/external.d.ts.map +1 -0
- package/dist/src/tag/index.d.ts +1 -1
- package/dist/src/tag/index.d.ts.map +1 -1
- package/dist/src/telem/SelectDataType.d.ts +7 -0
- package/dist/src/telem/SelectDataType.d.ts.map +1 -0
- package/dist/src/telem/aether/context.d.ts +1 -0
- package/dist/src/telem/aether/context.d.ts.map +1 -1
- package/dist/src/telem/aether/noop.d.ts.map +1 -1
- package/dist/src/telem/aether/pipeline.d.ts +1 -1
- package/dist/src/telem/aether/pipeline.d.ts.map +1 -1
- package/dist/src/telem/aether/provider.d.ts +1 -1
- package/dist/src/telem/aether/provider.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts +13 -13
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/static.d.ts +3 -3
- package/dist/src/telem/aether/static.d.ts.map +1 -1
- package/dist/src/telem/aether/telem.d.ts +3 -4
- package/dist/src/telem/aether/telem.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts +4 -5
- package/dist/src/telem/aether/transformers.d.ts.map +1 -1
- package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
- package/dist/src/telem/client/cache/static.d.ts +1 -1
- package/dist/src/telem/client/cache/static.d.ts.map +1 -1
- package/dist/src/telem/client/reader.spec.d.ts +1 -3
- package/dist/src/telem/client/reader.spec.d.ts.map +1 -1
- package/dist/src/telem/client/streamer.d.ts.map +1 -1
- package/dist/src/telem/control/Chip.d.ts +2 -2
- package/dist/src/telem/control/Chip.d.ts.map +1 -1
- package/dist/src/telem/control/Controller.d.ts +1 -1
- package/dist/src/telem/control/Controller.d.ts.map +1 -1
- package/dist/src/telem/control/Indicator.d.ts +4 -1
- package/dist/src/telem/control/Indicator.d.ts.map +1 -1
- package/dist/src/telem/control/Legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts +22 -25
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/controller.d.ts +14 -4
- package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts +31 -24
- package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
- package/dist/src/telem/control/aether/legend.d.ts +3 -3
- package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts +2 -2
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/telem/external.d.ts +3 -0
- package/dist/src/telem/external.d.ts.map +1 -0
- package/dist/src/telem/index.d.ts +1 -1
- package/dist/src/testutil/Aether.d.ts +4 -0
- package/dist/src/testutil/Aether.d.ts.map +1 -0
- package/dist/src/testutil/Synnax.d.ts +9 -0
- package/dist/src/testutil/Synnax.d.ts.map +1 -0
- package/dist/src/text/DateTime.d.ts +3 -3
- package/dist/src/text/DateTime.d.ts.map +1 -1
- package/dist/src/text/Editable.d.ts +5 -6
- package/dist/src/text/Editable.d.ts.map +1 -1
- package/dist/src/text/Text.d.ts +17 -11
- package/dist/src/text/Text.d.ts.map +1 -1
- package/dist/src/text/core/types.d.ts +7 -8
- package/dist/src/text/core/types.d.ts.map +1 -1
- package/dist/src/text/external.d.ts +0 -3
- package/dist/src/text/external.d.ts.map +1 -1
- package/dist/src/text/symbols.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts +4 -4
- package/dist/src/theming/aether/provider.d.ts.map +1 -1
- package/dist/src/theming/core/fontString.d.ts +2 -2
- package/dist/src/theming/core/fontString.d.ts.map +1 -1
- package/dist/src/theming/core/theme.d.ts +2 -2
- package/dist/src/theming/core/theme.d.ts.map +1 -1
- package/dist/src/tooltip/Dialog.d.ts +1 -1
- package/dist/src/tooltip/Dialog.d.ts.map +1 -1
- package/dist/src/tree/Item.d.ts +11 -0
- package/dist/src/tree/Item.d.ts.map +1 -0
- package/dist/src/tree/Tree.d.ts +28 -48
- package/dist/src/tree/Tree.d.ts.map +1 -1
- package/dist/src/tree/core.d.ts +59 -71
- package/dist/src/tree/core.d.ts.map +1 -1
- package/dist/src/tree/external.d.ts +1 -0
- package/dist/src/tree/external.d.ts.map +1 -1
- package/dist/src/triggers/Text.d.ts +3 -2
- package/dist/src/triggers/Text.d.ts.map +1 -1
- package/dist/src/triggers/triggers.d.ts +6 -6
- package/dist/src/triggers/triggers.d.ts.map +1 -1
- package/dist/src/util/children.d.ts.map +1 -1
- package/dist/src/util/zod.d.ts +1 -1
- package/dist/src/util/zod.d.ts.map +1 -1
- package/dist/src/viewport/SelectMode.d.ts +3 -3
- package/dist/src/viewport/SelectMode.d.ts.map +1 -1
- package/dist/src/viewport/use.d.ts +3 -3
- package/dist/src/viewport/use.d.ts.map +1 -1
- package/dist/src/vis/axis/axis.d.ts +1 -1
- package/dist/src/vis/axis/axis.d.ts.map +1 -1
- package/dist/src/vis/axis/ticks.d.ts +1 -1
- package/dist/src/vis/axis/ticks.d.ts.map +1 -1
- package/dist/src/vis/button/SelectMode.d.ts +8 -0
- package/dist/src/vis/button/SelectMode.d.ts.map +1 -0
- package/dist/src/vis/button/aether/button.d.ts +2 -1
- package/dist/src/vis/button/aether/button.d.ts.map +1 -1
- package/dist/src/vis/button/external.d.ts +3 -0
- package/dist/src/vis/button/external.d.ts.map +1 -0
- package/dist/src/vis/button/index.d.ts +1 -1
- package/dist/src/vis/button/index.d.ts.map +1 -1
- package/dist/src/vis/button/use.d.ts +3 -1
- package/dist/src/vis/button/use.d.ts.map +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
- package/dist/src/vis/diagram/Diagram.d.ts +6 -6
- package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/types.d.ts +1 -1
- package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/connector/connector.d.ts +1 -1
- package/dist/src/vis/diagram/edge/connector/connector.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/paths.d.ts +2 -3
- package/dist/src/vis/diagram/edge/paths.d.ts.map +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
- package/dist/src/vis/grid/grid.d.ts +1 -1
- package/dist/src/vis/grid/grid.d.ts.map +1 -1
- package/dist/src/vis/legend/Container.d.ts +3 -3
- package/dist/src/vis/legend/Container.d.ts.map +1 -1
- package/dist/src/vis/legend/Simple.d.ts +8 -7
- package/dist/src/vis/legend/Simple.d.ts.map +1 -1
- package/dist/src/vis/light/aether/light.d.ts +1 -1
- package/dist/src/vis/light/aether/light.d.ts.map +1 -1
- package/dist/src/vis/light/use.d.ts +1 -1
- package/dist/src/vis/light/use.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +1 -1
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Axis.d.ts +3 -3
- package/dist/src/vis/lineplot/Axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Title.d.ts +2 -2
- package/dist/src/vis/lineplot/Title.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts +1 -1
- package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/XAxis.d.ts +56 -56
- package/dist/src/vis/lineplot/aether/YAxis.d.ts +56 -56
- package/dist/src/vis/lineplot/aether/axis.d.ts +2 -2
- package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/Annotation.d.ts +1 -1
- package/dist/src/vis/lineplot/range/Annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/Provider.d.ts +1 -1
- package/dist/src/vis/lineplot/range/Provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts +9 -9
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts +51 -21
- package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts +1 -1
- package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts +1 -1
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +1 -1
- package/dist/src/vis/log/Log.d.ts +3 -3
- package/dist/src/vis/log/Log.d.ts.map +1 -1
- package/dist/src/vis/log/aether/Log.d.ts +4 -4
- package/dist/src/vis/log/aether/Log.d.ts.map +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
- package/dist/src/vis/rule/Rule.d.ts +3 -3
- package/dist/src/vis/rule/Rule.d.ts.map +1 -1
- package/dist/src/vis/rule/aether/aether.d.ts +1 -1
- package/dist/src/vis/rule/aether/aether.d.ts.map +1 -1
- package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
- package/dist/src/vis/schematic/Grid.d.ts.map +1 -1
- package/dist/src/vis/schematic/SelectOrientation.d.ts +3 -3
- package/dist/src/vis/schematic/SelectOrientation.d.ts.map +1 -1
- package/dist/src/vis/schematic/Symbols.d.ts +15 -12
- package/dist/src/vis/schematic/Symbols.d.ts.map +1 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts +3 -3
- package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
- package/dist/src/vis/schematic/registry.d.ts +3 -3
- package/dist/src/vis/schematic/registry.d.ts.map +1 -1
- package/dist/src/vis/setpoint/aether/setpoint.d.ts +1 -1
- package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
- package/dist/src/vis/setpoint/use.d.ts +1 -1
- package/dist/src/vis/setpoint/use.d.ts.map +1 -1
- package/dist/src/vis/toggle/aether/toggle.d.ts +1 -1
- package/dist/src/vis/toggle/aether/toggle.d.ts.map +1 -1
- package/dist/src/vis/toggle/use.d.ts +1 -1
- package/dist/src/vis/toggle/use.d.ts.map +1 -1
- package/dist/src/vis/value/RedlineForm.d.ts +6 -0
- package/dist/src/vis/value/RedlineForm.d.ts.map +1 -0
- package/dist/src/vis/value/TelemForm.d.ts +6 -0
- package/dist/src/vis/value/TelemForm.d.ts.map +1 -0
- package/dist/src/vis/value/aether/value.d.ts +31 -4
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/external.d.ts +3 -1
- package/dist/src/vis/value/external.d.ts.map +1 -1
- package/dist/src/vis/value/redline.d.ts +18 -0
- package/dist/src/vis/value/redline.d.ts.map +1 -0
- package/dist/src/vis/value/use.d.ts +12 -3
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/src/workspace/index.d.ts +2 -0
- package/dist/src/workspace/index.d.ts.map +1 -0
- package/dist/src/workspace/queries.d.ts +12 -0
- package/dist/src/workspace/queries.d.ts.map +1 -0
- package/dist/src/workspace/queries.spec.d.ts +2 -0
- package/dist/src/workspace/queries.spec.d.ts.map +1 -0
- package/dist/symbols-BtW1eE35.cjs +92 -0
- package/dist/{external-Cjnx793K.js → symbols-DT8-7-NW.js} +21546 -16277
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/units-DR4EJndw.cjs +1 -0
- package/dist/units-ts2tUMPH.js +14 -0
- package/dist/useKeysData-B1kiZOOw.js +14 -0
- package/dist/useKeysData-G9Mk3mA6.cjs +1 -0
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +24 -23
- package/dist/Center-Bq5L7oy0.js +0 -24
- package/dist/Center-DE_BtCCX.cjs +0 -1
- package/dist/ContextMenu-BC5x7XR5.cjs +0 -1
- package/dist/ContextMenu-DLM5eLLG.js +0 -95
- package/dist/DateTime-CdNKxVxT.js +0 -17
- package/dist/DateTime-DC19AIGq.cjs +0 -1
- package/dist/Divider-CDFHLK9U.js +0 -1358
- package/dist/Divider-D74_FAXn.cjs +0 -22
- package/dist/Dropdown-BpoU-xVd.cjs +0 -1
- package/dist/Dropdown-CQu3yo3v.js +0 -327
- package/dist/Haul-D6kpOYBa.js +0 -124
- package/dist/Haul-De8axVdi.cjs +0 -1
- package/dist/Item-BgUwEjzV.js +0 -109
- package/dist/Item-BrHZi6Fl.cjs +0 -1
- package/dist/Keyboard-CiNuYBa3.cjs +0 -1
- package/dist/Keyboard-DjeQa-Nx.js +0 -31
- package/dist/Link-Bngd8rrL.cjs +0 -1
- package/dist/Link-y133HE5v.js +0 -14
- package/dist/Pack-80N7XB5O.cjs +0 -1
- package/dist/Pack-BiS6QIuA.js +0 -52
- package/dist/Provider-B1j7nPL9.cjs +0 -1
- package/dist/Provider-CAR23fYq.js +0 -464
- package/dist/Space-ByFmfiTa.cjs +0 -1
- package/dist/Space-DxHm2ok7.js +0 -100
- package/dist/Stack-BbwDtaE6.cjs +0 -1
- package/dist/Stack-D50qN0Vu.js +0 -13
- package/dist/Text-B1uUpUKk.js +0 -1247
- package/dist/Text-CLsJyQGy.cjs +0 -4
- package/dist/Text-CacHYC7L.js +0 -35
- package/dist/Text-DTPuORh0.cjs +0 -1
- package/dist/Text-Ddc0C5JU.cjs +0 -1
- package/dist/Text-P0b041la.js +0 -137
- package/dist/Toggle-BC1o8qt5.js +0 -383
- package/dist/Toggle-D-vvd8lz.cjs +0 -1
- package/dist/WithIcon-B7VPBqA2.js +0 -95
- package/dist/WithIcon-CCnlO2LC.cjs +0 -1
- package/dist/align.cjs +0 -1
- package/dist/align.js +0 -4
- package/dist/array-CPtP5Oov.js +0 -7
- package/dist/array-CZHEGH95.cjs +0 -1
- package/dist/css-C7rJrqRi.cjs +0 -38
- package/dist/css-DjQu2Qyf.js +0 -12511
- package/dist/debounce-CW9Q-DsR.js +0 -17
- package/dist/debounce-heEWeOqL.cjs +0 -1
- package/dist/deep-BRgXTyZn.cjs +0 -1
- package/dist/deep-D72Fid_q.js +0 -193
- package/dist/dimensions-BmlCx5q4.cjs +0 -1
- package/dist/dimensions-FnMV2fyj.js +0 -19
- package/dist/dropdown.cjs +0 -1
- package/dist/dropdown.js +0 -4
- package/dist/eraser-C0Kv4_kL.cjs +0 -11
- package/dist/eraser-CupVBBBp.js +0 -967
- package/dist/external-8zJ3fvo2.js +0 -431
- package/dist/external-BDh272rT.js +0 -19
- package/dist/external-BYsOdgw5.js +0 -20
- package/dist/external-BgKH42un.cjs +0 -1
- package/dist/external-BmeMUsxr.js +0 -399
- package/dist/external-CKag7gXR.js +0 -1265
- package/dist/external-CVHgvs0C.js +0 -28
- package/dist/external-CjTwWT6m.cjs +0 -1
- package/dist/external-D1gwMWza.cjs +0 -1
- package/dist/external-D38Y0J6S.cjs +0 -1
- package/dist/external-D8mHEAIG.cjs +0 -46
- package/dist/external-DC1RT1Js.cjs +0 -1
- package/dist/external-DHw0SdIj.cjs +0 -1
- package/dist/external-DOujCKRS.cjs +0 -1
- package/dist/external-DlyrUZhP.cjs +0 -1
- package/dist/external-Ds5GDIp9.cjs +0 -1
- package/dist/external-DuvwfKLw.js +0 -13
- package/dist/external-GjPk23XZ.cjs +0 -1
- package/dist/external-IsogMmdT.cjs +0 -85
- package/dist/external-ZV7pEm55.js +0 -111
- package/dist/external-l7imNJRR.js +0 -78
- package/dist/external-upR9Jz-8.js +0 -60
- package/dist/font-C5EV9fq1.cjs +0 -1
- package/dist/font-Cy9UYjyY.js +0 -15
- package/dist/fontString-CUy7T-OR.cjs +0 -1
- package/dist/hooks-B92WH57y.cjs +0 -1
- package/dist/hooks-u_TgL0Xi.js +0 -296
- package/dist/provider-B8IM-N4g.cjs +0 -154
- package/dist/provider-CQqS-teQ.js +0 -31994
- package/dist/src/accordion/Accordion.d.ts +0 -39
- package/dist/src/accordion/Accordion.d.ts.map +0 -1
- package/dist/src/accordion/Accordion.spec.d.ts +0 -2
- package/dist/src/accordion/Accordion.spec.d.ts.map +0 -1
- package/dist/src/accordion/index.d.ts +0 -2
- package/dist/src/accordion/index.d.ts.map +0 -1
- package/dist/src/align/Center.d.ts +0 -8
- package/dist/src/align/Center.d.ts.map +0 -1
- package/dist/src/align/Pack.d.ts +0 -24
- package/dist/src/align/Pack.d.ts.map +0 -1
- package/dist/src/align/Space.d.ts +0 -74
- package/dist/src/align/Space.d.ts.map +0 -1
- package/dist/src/align/Space.spec.d.ts +0 -2
- package/dist/src/align/Space.spec.d.ts.map +0 -1
- package/dist/src/align/Stack.d.ts +0 -7
- package/dist/src/align/Stack.d.ts.map +0 -1
- package/dist/src/align/external.d.ts +0 -5
- package/dist/src/align/external.d.ts.map +0 -1
- package/dist/src/align/index.d.ts +0 -2
- package/dist/src/align/index.d.ts.map +0 -1
- package/dist/src/button/Icon.d.ts +0 -30
- package/dist/src/button/Icon.d.ts.map +0 -1
- package/dist/src/button/Link.d.ts +0 -18
- package/dist/src/button/Link.d.ts.map +0 -1
- package/dist/src/dialog/use.d.ts +0 -51
- package/dist/src/dialog/use.d.ts.map +0 -1
- package/dist/src/dropdown/Dropdown.d.ts +0 -34
- package/dist/src/dropdown/Dropdown.d.ts.map +0 -1
- package/dist/src/dropdown/Dropdown.spec.d.ts +0 -2
- package/dist/src/dropdown/Dropdown.spec.d.ts.map +0 -1
- package/dist/src/dropdown/index.d.ts +0 -2
- package/dist/src/dropdown/index.d.ts.map +0 -1
- package/dist/src/hooks/effect.d.ts +0 -15
- package/dist/src/hooks/effect.d.ts.map +0 -1
- package/dist/src/hooks/useFilter.d.ts +0 -23
- package/dist/src/hooks/useFilter.d.ts.map +0 -1
- package/dist/src/list/Column.d.ts +0 -57
- package/dist/src/list/Column.d.ts.map +0 -1
- package/dist/src/list/Core.d.ts +0 -41
- package/dist/src/list/Core.d.ts.map +0 -1
- package/dist/src/list/Data.d.ts +0 -31
- package/dist/src/list/Data.d.ts.map +0 -1
- package/dist/src/list/Filter.d.ts +0 -27
- package/dist/src/list/Filter.d.ts.map +0 -1
- package/dist/src/list/Hover.d.ts +0 -14
- package/dist/src/list/Hover.d.ts.map +0 -1
- package/dist/src/list/Infinite.d.ts +0 -15
- package/dist/src/list/Infinite.d.ts.map +0 -1
- package/dist/src/list/List.d.ts +0 -21
- package/dist/src/list/List.d.ts.map +0 -1
- package/dist/src/list/Search.d.ts +0 -18
- package/dist/src/list/Search.d.ts.map +0 -1
- package/dist/src/list/Selector.d.ts +0 -18
- package/dist/src/list/Selector.d.ts.map +0 -1
- package/dist/src/list/types.d.ts +0 -15
- package/dist/src/list/types.d.ts.map +0 -1
- package/dist/src/list/useSelect.d.ts +0 -84
- package/dist/src/list/useSelect.d.ts.map +0 -1
- package/dist/src/list/useSelect.spec.d.ts +0 -2
- package/dist/src/list/useSelect.spec.d.ts.map +0 -1
- package/dist/src/modal/Modal.d.ts +0 -15
- package/dist/src/modal/Modal.d.ts.map +0 -1
- package/dist/src/modal/index.d.ts +0 -2
- package/dist/src/modal/index.d.ts.map +0 -1
- package/dist/src/ranger/SelectLabel.d.ts +0 -7
- package/dist/src/ranger/SelectLabel.d.ts.map +0 -1
- package/dist/src/select/Alignment.d.ts +0 -13
- package/dist/src/select/Alignment.d.ts.map +0 -1
- package/dist/src/select/ClearButton.d.ts +0 -4
- package/dist/src/select/ClearButton.d.ts.map +0 -1
- package/dist/src/select/ComponentSize.d.ts +0 -12
- package/dist/src/select/ComponentSize.d.ts.map +0 -1
- package/dist/src/select/DataType.d.ts +0 -12
- package/dist/src/select/DataType.d.ts.map +0 -1
- package/dist/src/select/Direction.d.ts +0 -14
- package/dist/src/select/Direction.d.ts.map +0 -1
- package/dist/src/select/List.d.ts +0 -15
- package/dist/src/select/List.d.ts.map +0 -1
- package/dist/src/select/Select.spec.d.ts +0 -10
- package/dist/src/select/Select.spec.d.ts.map +0 -1
- package/dist/src/status/Text.d.ts +0 -20
- package/dist/src/status/Text.d.ts.map +0 -1
- package/dist/src/status/aether/external.d.ts +0 -3
- package/dist/src/status/aether/external.d.ts.map +0 -1
- package/dist/src/status/aether/types.d.ts +0 -26
- package/dist/src/status/aether/types.d.ts.map +0 -1
- package/dist/src/text/Keyboard.d.ts +0 -6
- package/dist/src/text/Keyboard.d.ts.map +0 -1
- package/dist/src/text/Link.d.ts +0 -11
- package/dist/src/text/Link.d.ts.map +0 -1
- package/dist/src/text/WithIcon.d.ts +0 -21
- package/dist/src/text/WithIcon.d.ts.map +0 -1
- package/dist/src/tree/Tree.spec.d.ts +0 -2
- package/dist/src/tree/Tree.spec.d.ts.map +0 -1
- package/dist/src/util/component.d.ts +0 -12
- package/dist/src/util/component.d.ts.map +0 -1
- package/dist/src/util/removeProps.d.ts.map +0 -1
- package/dist/src/util/removeProps.spec.d.ts.map +0 -1
- package/dist/src/util/renderProp.d.ts.map +0 -1
- package/dist/src/vis/value/Form.d.ts +0 -9
- package/dist/src/vis/value/Form.d.ts.map +0 -1
- package/dist/state-DAFH2z9y.js +0 -4082
- package/dist/state-DwM4WaEw.cjs +0 -27
- package/dist/useClickOutside-CUa496t0.cjs +0 -1
- package/dist/useClickOutside-Dw3KdU3w.js +0 -106
- package/dist/useDebouncedCallback-Bx-HX76R.cjs +0 -1
- package/dist/useDebouncedCallback-Cvo_HNow.js +0 -7
- package/dist/useMemoCompare-B5QPDK2p.js +0 -19
- package/dist/useMemoCompare-BDs2sKw5.cjs +0 -1
- package/dist/useVirtualCursorDragWebKit-CUbBopD6.cjs +0 -1
- package/dist/useVirtualCursorDragWebKit-CfxbToxm.js +0 -65
- package/dist/value-BVL4mfhG.cjs +0 -55
- package/dist/value-DLy5XRhS.js +0 -10797
- /package/dist/src/{util → component}/removeProps.d.ts +0 -0
- /package/dist/src/{util → component}/removeProps.spec.d.ts +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Af=Object.defineProperty;var If=(e,t,n)=>t in e?Af(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var tt=(e,t,n)=>If(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-CITbqOLs.cjs"),g=require("react"),K=require("./Divider-D74_FAXn.cjs"),u=require("./css-C7rJrqRi.cjs"),os=require("./external-DHw0SdIj.cjs"),ce=require("./state-DwM4WaEw.cjs"),$f=require("./Stack-BbwDtaE6.cjs"),he=require("./external-IsogMmdT.cjs"),ne=require("./Space-ByFmfiTa.cjs"),De=require("./hooks-B92WH57y.cjs"),Bf=require("./useVirtualCursorDragWebKit-CUbBopD6.cjs"),Q=require("./Provider-B1j7nPL9.cjs"),Df=require("./external-GjPk23XZ.cjs"),Te=require("./external-Ds5GDIp9.cjs"),bl=require("./external-DC1RT1Js.cjs"),As=require("./WithIcon-CCnlO2LC.cjs"),Pe=require("./array-CZHEGH95.cjs"),Of=require("./external-BgKH42un.cjs"),An=require("./external-DlyrUZhP.cjs"),fe=require("./Toggle-D-vvd8lz.cjs"),pt=require("./Text-Ddc0C5JU.cjs"),bt=require("./provider-B8IM-N4g.cjs"),Ce=require("./Text-CLsJyQGy.cjs"),B=require("./value-BVL4mfhG.cjs"),me=require("./Haul-De8axVdi.cjs"),Ae=require("./useMemoCompare-BDs2sKw5.cjs"),si=require("./dimensions-BmlCx5q4.cjs"),er=require("./font-C5EV9fq1.cjs"),Ye=require("./Dropdown-BpoU-xVd.cjs"),Be=require("./deep-BRgXTyZn.cjs"),Ge=require("./external-D8mHEAIG.cjs"),Is=require("./Pack-80N7XB5O.cjs"),vt=require("./ContextMenu-BC5x7XR5.cjs"),zf=require("./Text-DTPuORh0.cjs"),vl=require("./external-DOujCKRS.cjs");require("./Item-BrHZi6Fl.cjs");const kl=require("react-dom"),kt=require("./external-CjTwWT6m.cjs"),Ml=require("./css.cjs"),Vf=require("./useClickOutside-CUa496t0.cjs"),tr=require("./useDebouncedCallback-Bx-HX76R.cjs"),Ff=require("./external-D1gwMWza.cjs"),ps=require("./eraser-C0Kv4_kL.cjs"),_o=require("./DateTime-DC19AIGq.cjs"),Hf=require("./external-D38Y0J6S.cjs"),Zf=require("./Video-BuzHLiXL.cjs"),Kf=e=>e.nullable().transform(t=>t===null?void 0:t).optional(),Pl=e=>Be.u(e,(t,n,s)=>{const r=n===s.length-1,i=!isNaN(parseInt(t)),l=!isNaN(parseInt(s[n+1]));return i&&(t="element"),r||l?t:[t,"shape"]}),oi=(e,t)=>{if(e==null)return null;const n=e[t];return n==null&&typeof e=="object"&&"sourceType"in e?e.sourceType()[t]:n},Wf=(e,t,n)=>Be.c(oi(e,"shape"),Pl(t),{...n,getter:oi}),Yf=Object.freeze(Object.defineProperty({__proto__:null,getFieldSchema:Wf,getFieldSchemaPath:Pl,nullToUndefined:Kf},Symbol.toStringTag,{value:"Module"})),Gf=(e,t,n=150)=>{const[s,r]=g.useState(e);return g.useEffect(()=>{const i=setTimeout(()=>r(t),n);return()=>clearTimeout(i)},[t,n]),s},qf=Object.freeze(Object.defineProperty({__proto__:null,Config:fe.Config,Dialog:fe.Dialog,chooseLocation:fe.chooseLocation,formatTip:fe.formatTip,useConfig:fe.useConfig,wrap:fe.wrap},Symbol.toStringTag,{value:"Module"})),nr=({ref:e,location:t,style:n,size:s,className:r,children:i,onDragStart:l,sizeUnits:c="px",showHandle:a=!0,...d})=>{const x=u.K$1.construct(t),p=u.K$1.direction(x),m=u.g.dimension(p);return o.jsxRuntimeExports.jsxs(ne.Core,{className:u.CSS(u.CSS.B("resize"),u.CSS.loc(x),u.CSS.dir(p),r),style:{[m]:`${s}${c}`,...n},ref:e,...d,children:[i,a&&o.jsxRuntimeExports.jsx("div",{draggable:!0,className:u.CSS(u.CSS.BE("resize","handle"),u.CSS.bordered(u.K$1.swap(x))),onDragStart:l,onDrag:he.preventDefault,onDragEnd:he.preventDefault})]})},sr=({onResize:e,count:t,initialSizes:n=[],minSize:s=100,direction:r="x"})=>{const i=g.useRef(null),[l,c]=g.useState({sizeDistribution:Xf(n,t),root:null}),a=g.useCallback((p,m,f)=>{if(i.current==null)return;const h=u.Pt.dim(u.Pt.construct(i.current),r);c(j=>mo(j,h,p,s,m,f))},[s,c,r]);g.useEffect(()=>e==null?void 0:e(l.sizeDistribution),[l.sizeDistribution,e]);const d=g.useCallback((p,m)=>{p.preventDefault();const f=r==="x"?"clientX":"clientY",h=y=>a(m,y[f]),j=()=>{c(y=>({...y,root:null})),document.removeEventListener("mousemove",h)};c(y=>({...y,root:p[f]})),document.addEventListener("mousemove",h),document.addEventListener("mouseup",j,{once:!0})},[c,r,mo]);return{setSize:g.useCallback((p,m)=>a(p,void 0,m),[mo]),props:{direction:r,sizeDistribution:l.sizeDistribution,onDragHandle:d,ref:i}}},or=({ref:e,direction:t="x",children:n,sizeDistribution:s,onDragHandle:r,className:i,...l})=>{const c=u.g.construct(t),a=g.Children.toArray(n);return s=Uf(s),o.jsxRuntimeExports.jsx(ne.Space,{...l,ref:e,direction:c,className:u.CSS(u.CSS.B("resize-multiple"),i),empty:!0,grow:!0,children:a.map((d,x)=>o.jsxRuntimeExports.jsx(nr,{onDragStart:p=>r(p,x),location:u.g.location(c),size:s[x]*100,sizeUnits:"%",showHandle:x!==a.length-1,children:d},x))})},Xf=(e,t)=>{const n=e.reduce((r,i)=>r+i,0),s=t-e.length;if(s<=0)return e.slice(0,t).map(r=>r/n);if(e.every(r=>r<=1)){const r=1-n;return[...e,...Array(s).fill(r/s)]}return e.map(()=>1/t)},po=.001,Uf=e=>e.every(t=>u.nd.closeTo(t,1/e.length),po)?e.map((t,n)=>n%2===0?t+po:n===e.length-1?t:t-po):e,mo=(e,t,n,s,r,i)=>{const l=_l(e,t,n,r,i),[c,a]=Jf(e.sizeDistribution,n,l,s/t),d=a?r??null:e.root;return{...e,sizeDistribution:c,root:d}},_l=(e,t,n,s,r)=>{let i;if(r!=null)r>1&&(r/=t),i=r-e.sizeDistribution[n];else if(s!=null){if(e.root===null)throw new Error("resize root is null during handle drag");i=(s-e.root)/t}else throw new Error("must provide either a MouseEvent or a targetSize");return i},Jf=(e,t,n,s)=>{let r=t;for(;r>0&&e[r]+n<=s;)r--;const i=e[r]+n,l=Qf(r,e,s,n),c=e[l]-n;return i<s||c<s?[e,!1]:[e.map((a,d)=>d===r?i:d===l?c:a),!0]},Qf=(e,t,n,s)=>(e===t.length-1?th:eh)(e,t,n,s),eh=(e,t,n,s)=>{let r=e+1;for(;r<t.length-1&&t[r]-s<=n;)r++;return r},th=(e,t,n,s)=>{let r=e-1;for(;r>0&&t[r]-s<=n;)r--;return r},fo=2,nh=100,Ll=({onCollapse:e,onResize:t,location:n="left",minSize:s,maxSize:r,initialSize:i=200,collapseThreshold:l=1/0,className:c,...a})=>{const[d,x]=g.useState(u.D$1(i,s,r)),p=g.useRef(null),m=u.K$1.construct(n),f=g.useCallback(E=>{if(p.current===null)return 0;const R=u.Pt.dim(E,u.K$1.direction(m),!0)*(1-2*Number(["bottom","right"].includes(m))),M=p.current+R,_=u.D$1(M,s,r);return(_-M)/(s??nh)>l?fo:_},[m,s,r,l]),h=g.useRef(null),j=g.useCallback(E=>{const R=f(E);x(R),h.current!=null&&(t==null||t(R,u.Pt.construct(h.current)))},[t,f]),y=g.useCallback(()=>x(E=>(p.current=E,E)),[x]),S=g.useCallback(E=>f(E)===fo&&(e==null?void 0:e()),[e,f]);g.useEffect(()=>{s==null||r==null||x(E=>{const R=u.D$1(E,s,r);return p.current=R,R})},[s,r]);const b=Ge.useCursorDrag({onMove:j,onStart:y,onEnd:S});return o.jsxRuntimeExports.jsx(nr,{ref:h,location:m,size:d,onDragStart:b,className:u.clsx(c,u.CSS.expanded(d!==fo)),...a})},sh=Object.freeze(Object.defineProperty({__proto__:null,Core:nr,Multiple:or,Single:Ll,calculateDiffPercentage:_l,useMultiple:sr},Symbol.toStringTag,{value:"Module"})),rs="y",ri=28,oh=32,rh=40,ih=.5,lh=({data:e,...t})=>{const{setSize:n,props:{sizeDistribution:s,ref:r,...i}}=sr({direction:rs,count:e.length,minSize:ri}),l=c=>{if(r.current==null)return;const a=u.Pt.dim(u.Pt.construct(r.current),rs);s[c]<rh/a?n(c,e[c].initialSize??ih):n(c,ri+1)};return o.jsxRuntimeExports.jsx(or,{empty:!0,className:u.CSS.B("accordion"),sizeDistribution:s,ref:r,...t,...i,children:e.map((c,a)=>g.createElement(uh,{...c,key:c.key,index:a,direction:rs,onExpand:l,parent:r,size:s[a]}))})},ch=o.jsxRuntimeExports.jsx(K.y4.Caret.Down,{"aria-label":"contract"}),ah=o.jsxRuntimeExports.jsx(K.y4.Caret.Right,{"aria-label":"expand"}),uh=({index:e,name:t,content:n,actions:s,size:r,parent:i,onExpand:l})=>{let c=!0;if(i.current!=null){const d=u.Pt.dim(u.Pt.construct(i.current),rs);c=r*d>oh}const a=c?ch:ah;return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs(os.Header,{level:"p",className:u.CSS.expanded(c),empty:!0,children:[o.jsxRuntimeExports.jsx(os.ButtonTitle,{startIcon:a,onClick:()=>l(e),children:t}),s!=null&&o.jsxRuntimeExports.jsx(os.Actions,{children:s})]}),n]})},dh=Object.freeze(Object.defineProperty({__proto__:null,Accordion:lh},Symbol.toStringTag,{value:"Module"})),xh=(e,t)=>Pe.t.toArray(e).map(s=>typeof s=="string"?s.split(t).map(r=>({label:r})):s).flat(),Nl=({segments:e,shade:t,level:n,weight:s,separator:r,transform:i})=>{let c=xh(e,r);return i!=null&&(c=c.map(i)),c.map(({label:a,icon:d,href:x,...p},m)=>{const f=[o.jsxRuntimeExports.jsx(K.y4.Caret.Right,{style:{transform:"scale(0.8) translateY(0.5px)",color:u.CSS.shade(t)}},`${a}-${m}`)];if(d!=null){const j=Te.resolve(d);j!=null&&f.push(j)}const h={weight:s,shade:t,level:n,style:{marginLeft:d!=null?"0.5rem":"0"},children:a,...p};return x!=null?f.push(o.jsxRuntimeExports.jsx(bl.Link,{...h,href:x},a)):f.push(o.jsxRuntimeExports.jsx(K.Text,{...h},a)),f}).flat()},Tl=({children:e,icon:t,shade:n=9,weight:s,size:r=.5,url:i,level:l="p",separator:c=".",className:a,hideFirst:d=!0,...x})=>{i!=null&&(e=i);const p=Nl({segments:e,separator:c,shade:n,level:l,weight:s});return d&&p.shift(),o.jsxRuntimeExports.jsxs(As.WithIcon,{className:u.CSS(a,u.CSS.B("breadcrumb"),d&&u.CSS.M("hide-first")),level:l,shade:n,weight:s,size:r,x:!0,...x,children:[Te.resolve(t),...p]})},ph=({url:e,className:t,level:n="p",separator:s="/",weight:r,shade:i=9})=>{const l=Nl({segments:e,separator:s,shade:i,level:n,weight:r,transform:(c,a)=>({...c,label:c.label.split("-").map(d=>u.d$1.capitalize(d)).join(" "),href:`/${e.split(s).slice(0,a+1).join("/")}`})});return o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(t,u.CSS.B("breadcrumb"),u.CSS.BM("breadcrumb","url")),x:!0,size:"small",align:"center",children:l})},mh=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumb:Tl,URL:ph},Symbol.toStringTag,{value:"Module"})),Al=({variant:e="info",...t})=>e==="loading"?o.jsxRuntimeExports.jsx(K.y4.Loading,{...t}):o.jsxRuntimeExports.jsx(K.y4.Circle,{color:Ce.VARIANT_COLORS[e],...t}),fh=({action:e})=>g.isValidElement(e)?e:g.createElement(fe.Button,{...e,key:e.key}),hh=({status:{key:e,time:t,count:n,message:s,description:r,variant:i},silence:l,actions:c,className:a,children:d,...x})=>{const p=g.useRef(null);return o.jsxRuntimeExports.jsxs(ne.Space,{className:u.CSS(u.CSS.B("notification"),a),y:!0,empty:!0,ref:p,...x,children:[o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,justify:"spaceBetween",grow:!0,style:{width:"100%"},children:[o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",size:"small",children:[o.jsxRuntimeExports.jsx(Al,{style:{height:"2.25rem",width:"2.5rem"},variant:i}),o.jsxRuntimeExports.jsx(K.Text,{level:"small",shade:11,children:`x${n}`}),o.jsxRuntimeExports.jsx(_o.DateTime,{className:u.CSS(u.CSS.BE("notification","time")),level:"small",format:"time",children:t})]}),o.jsxRuntimeExports.jsx(fe.Icon,{className:u.CSS(u.CSS.BE("notification","silence")),variant:"outlined",size:"small",onClick:()=>l(e),children:o.jsxRuntimeExports.jsx(K.y4.Close,{})})]}),o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,align:"start",className:u.CSS(u.CSS.BE("notification","content")),size:"small",children:[d??o.jsxRuntimeExports.jsx(K.Text,{className:u.CSS(u.CSS.BE("notification","message")),level:"p",style:{flexGrow:1},children:s}),r!=null&&o.jsxRuntimeExports.jsx(K.Text,{className:u.CSS(u.CSS.BE("notification","description")),level:"small",style:{flexGrow:1},children:r})]}),c!=null&&o.jsxRuntimeExports.jsx(ne.Space,{x:!0,align:"center",justify:"end",className:u.CSS(u.CSS.BE("notification","actions")),children:Pe.t.toArray(c).map(m=>o.jsxRuntimeExports.jsx(fh,{action:m},m.key))})]},t.toString())},gh=Object.freeze(Object.defineProperty({__proto__:null,Aggregator:Ce.Aggregator,Indicator:Al,Notification:hh,Text:Ce.Text,VARIANT_COLORS:Ce.VARIANT_COLORS,specZ:bt.specZ,useAdder:Ce.useAdder,useErrorHandler:Ce.useErrorHandler,useNotifications:Ce.useNotifications},Symbol.toStringTag,{value:"Module"})),rr=({aetherKey:e,enabled:t=!0})=>{const{setState:n}=Q.useLifecycle({aetherKey:e,type:ps.Eraser.TYPE,schema:ps.eraserStateZ,initialState:{region:u.Pt.ZERO,enabled:t}}),s=K.useSyncedRef(t);return{erase:g.useCallback(i=>{n({enabled:s.current,region:i})},[n,s])}},jh=({aetherKey:e,children:t})=>{const{erase:n}=rr({aetherKey:e}),s=Ye.useResize(n);return o.jsxRuntimeExports.jsx("div",{ref:s,className:u.CSS(u.CSS.inheritDims()),children:t})},Eh=Object.freeze(Object.defineProperty({__proto__:null,Eraser:jh,use:rr},Symbol.toStringTag,{value:"Module"})),yh=({items:e,initialKey:t})=>{const[n,s]=g.useState(t),r=l=>s(l===n?void 0:l),i=e.find(l=>l.key===n);return{onSelect:r,activeItem:i}},Sh=({activeItem:e,children:t,onSelect:n,location:s="left",collapseThreshold:r=.65,className:i,onResize:l,onCollapse:c,eraseEnabled:a,...d})=>{const x=u.K$1.direction(s);a??(a=e!=null);const p=g.useCallback(()=>{c?c():e!=null&&(n==null||n(e.key))},[n,e==null?void 0:e.key,c]),{erase:m}=rr({enabled:a}),f=g.useCallback((b,E)=>{l==null||l(b,E),m(E)},[l,m]),{content:h,minSize:j,maxSize:y,initialSize:S=0}=e??{};return o.jsxRuntimeExports.jsx(Ll,{className:u.CSS(u.CSS.B("nav-drawer"),u.CSS.dir(x),u.CSS.visible(e!=null),i),collapseThreshold:r,onCollapse:p,location:s,onResize:f,minSize:j,maxSize:y,initialSize:S,...d,children:h})},Rh=Object.freeze(Object.defineProperty({__proto__:null,Bar:he.Bar,Drawer:Sh,useDrawer:yh},Symbol.toStringTag,{value:"Module"})),is={...B.ZERO_CONTEXT_VALUE,state:bt.gF.connectivity.DEFAULT},Il=g.createContext(is),$l=()=>g.use(Il),qe=()=>$l().client,Ch=()=>$l().state,Lo={connected:"success",connecting:"loading",disconnected:"info",failed:"error"},Bl="serverVersionMismatch",wh=(e,t,n)=>`Cluster version ${n!=null?`${n} `:""}is ${e?"older":"newer"} than client version ${t}. Compatibility issues may arise.`,Dl=({children:e,connParams:t})=>{const[n,s,r]=K.useCombinedStateAndRef(is),{path:i}=Q.useUnidirectional({type:B.Provider.TYPE,schema:B.Provider.stateZ,state:{props:t??null,state:null}}),l=Ce.useAdder(),c=g.useCallback(a=>{r.current.state.status!==a.status&&l({variant:Lo[a.status],message:a.message??u.d$1.capitalize(a.status)}),s(d=>({...d,state:a}))},[l]);return Q.useAsyncEffect(async()=>{if(n.client!=null&&n.client.close(),t==null)return s(is);const a=new bt.gF({...t,connectivityPollFrequency:bt.M.seconds(2)});s({client:a,state:{clusterKey:"",status:"connecting",message:"Connecting...",clientServerCompatible:!1,clientVersion:a.clientVersion}});const d=await a.connectivity.check();if(s({client:a,state:d}),l({variant:Lo[d.status],message:d.message??d.status.toUpperCase()}),d.status==="connected"&&!d.clientServerCompatible){const x=d.nodeVersion==null||u.dd.semVerOlder(d.nodeVersion,d.clientVersion),p=wh(x,d.clientVersion,d.nodeVersion);l({variant:"warning",message:"Incompatible cluster version",description:p,data:{type:Bl,oldServer:x,nodeVersion:d.nodeVersion,clientVersion:d.clientVersion}})}return a.connectivity.onChange(c),()=>{a.close(),s(is)}},[t,c]),o.jsxRuntimeExports.jsx(Il,{value:n,children:o.jsxRuntimeExports.jsx(Q.Composite,{path:i,children:e})})},bh=Object.freeze(Object.defineProperty({__proto__:null,CONNECTION_STATE_VARIANTS:Lo,Provider:Dl,SERVER_VERSION_MISMATCH:Bl,use:qe,useConnectionState:Ch},Symbol.toStringTag,{value:"Module"})),Ol=g.createContext({aliases:{},getName:async()=>await Promise.resolve(void 0),setAlias:null}),cn=()=>g.use(Ol),zl=e=>cn().aliases[e]??null,$s=()=>cn().aliases,Bs=(e,t="")=>{const{getName:n}=cn(),[s,r]=g.useState(t);return Q.useAsyncEffect(async()=>{const i=await n(e);r(i)},[e,n]),s??t},ir=()=>cn().activeRange??void 0,Vl=({activeRange:e,children:t})=>{const n=qe(),[s,r]=g.useState({}),i=g.useCallback(a=>{r(d=>{const x={...d};return a.forEach(({variant:p,key:m,value:f})=>{const h=Number(m.split("---")[1]);p==="delete"?delete x[h]:x[f.channel]=f.alias}),x})},[r]),l=g.useCallback(async(a,d)=>{if(n==null||e==null)return;await(await n.ranges.retrieve(e)).setAlias(a,d)},[n,e]),c=g.useCallback(async a=>{if(n==null||a===0)return;const d=s[a];return d??(await n.channels.retrieve(a)).name},[s,n]);return Q.useAsyncEffect(async()=>{if(n==null||e==null){r({});return}const a=await n.ranges.retrieve(e),d=await a.listAliases();r(d);const x=await a.openAliasTracker(),p=x.onChange(i);return()=>{p(),x.close()}},[n,e]),o.jsxRuntimeExports.jsx(Ol,{value:{aliases:s,activeRange:e,setAlias:e!=null?l:null,getName:c},children:t})},vh=({channelKey:e,value:t,shadow:n,className:s,...r})=>{const[i,l]=g.useState(!1),{setAlias:c}=cn(),a=zl(e),d=Bs(e);let x=o.jsxRuntimeExports.jsx(K.y4.Rename,{});i?x=o.jsxRuntimeExports.jsx(K.y4.Loading,{}):a===t&&(x=o.jsxRuntimeExports.jsx(K.y4.Check,{}));const p=c!=null&&!i&&a!==t&&e!==0,m=Ce.useErrorHandler(),f=()=>{p&&m(async()=>{l(!0),await c(e,t),l(!1)},"Failed to set channel alias")},h=()=>{var y;a!=null&&((y=r.onChange)==null||y.call(r,a))},j=()=>e===0?o.jsxRuntimeExports.jsx(K.Text,{level:"small",children:"Select a channel to enable alias syncing with this label"}):c==null?o.jsxRuntimeExports.jsx(K.Text,{level:"small",children:"Select a range to enable alias syncing with this label"}):t.length===0?o.jsxRuntimeExports.jsx(K.Text,{level:"small",children:"Enter a value to enable alias syncing with this label"}):a===t?o.jsxRuntimeExports.jsx(K.Text,{level:"small",children:"Alias synced with this label"}):o.jsxRuntimeExports.jsxs(K.Text,{level:"small",children:["Sync alias for ",d," with this label"]});return o.jsxRuntimeExports.jsxs(pt.Text,{value:t,...r,children:[p&&o.jsxRuntimeExports.jsx(fe.Icon,{onClick:h,tooltip:o.jsxRuntimeExports.jsxs(K.Text,{level:"small",children:["Set ",d," as label"]}),tooltipLocation:{y:"top"},variant:"outlined",children:o.jsxRuntimeExports.jsx(K.y4.Sync,{})}),o.jsxRuntimeExports.jsx(fe.Icon,{onClick:f,disabled:!p,tooltip:o.jsxRuntimeExports.jsx(j,{}),tooltipLocation:{y:"top"},variant:"outlined",children:x})]})},nt="channel";var ii=180/Math.PI,No={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fl(e,t,n,s,r,i){var l,c,a;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(a=e*n+t*s)&&(n-=e*a,s-=t*a),(c=Math.sqrt(n*n+s*s))&&(n/=c,s/=c,a/=c),e*s<t*n&&(e=-e,t=-t,a=-a,l=-l),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*ii,skewX:Math.atan(a)*ii,scaleX:l,scaleY:c}}var Gn;function kh(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?No:Fl(t.a,t.b,t.c,t.d,t.e,t.f)}function Mh(e){return e==null||(Gn||(Gn=document.createElementNS("http://www.w3.org/2000/svg","g")),Gn.setAttribute("transform",e),!(e=Gn.transform.baseVal.consolidate()))?No:(e=e.matrix,Fl(e.a,e.b,e.c,e.d,e.e,e.f))}function Hl(e,t,n,s){function r(d){return d.length?d.pop()+" ":""}function i(d,x,p,m,f,h){if(d!==p||x!==m){var j=f.push("translate(",null,t,null,n);h.push({i:j-4,x:B.interpolateNumber(d,p)},{i:j-2,x:B.interpolateNumber(x,m)})}else(p||m)&&f.push("translate("+p+t+m+n)}function l(d,x,p,m){d!==x?(d-x>180?x+=360:x-d>180&&(d+=360),m.push({i:p.push(r(p)+"rotate(",null,s)-2,x:B.interpolateNumber(d,x)})):x&&p.push(r(p)+"rotate("+x+s)}function c(d,x,p,m){d!==x?m.push({i:p.push(r(p)+"skewX(",null,s)-2,x:B.interpolateNumber(d,x)}):x&&p.push(r(p)+"skewX("+x+s)}function a(d,x,p,m,f,h){if(d!==p||x!==m){var j=f.push(r(f)+"scale(",null,",",null,")");h.push({i:j-4,x:B.interpolateNumber(d,p)},{i:j-2,x:B.interpolateNumber(x,m)})}else(p!==1||m!==1)&&f.push(r(f)+"scale("+p+","+m+")")}return function(d,x){var p=[],m=[];return d=e(d),x=e(x),i(d.translateX,d.translateY,x.translateX,x.translateY,p,m),l(d.rotate,x.rotate,p,m),c(d.skewX,x.skewX,p,m),a(d.scaleX,d.scaleY,x.scaleX,x.scaleY,p,m),d=x=null,function(f){for(var h=-1,j=m.length,y;++h<j;)p[(y=m[h]).i]=y.x(f);return p.join("")}}}var Ph=Hl(kh,"px, ","px)","deg)"),_h=Hl(Mh,", ",")",")"),Lh=1e-12;function li(e){return((e=Math.exp(e))+1/e)/2}function Nh(e){return((e=Math.exp(e))-1/e)/2}function Th(e){return((e=Math.exp(2*e))-1)/(e+1)}const ls=function e(t,n,s){function r(i,l){var c=i[0],a=i[1],d=i[2],x=l[0],p=l[1],m=l[2],f=x-c,h=p-a,j=f*f+h*h,y,S;if(j<Lh)S=Math.log(m/d)/t,y=function(L){return[c+L*f,a+L*h,d*Math.exp(t*L*S)]};else{var b=Math.sqrt(j),E=(m*m-d*d+s*j)/(2*d*n*b),R=(m*m-d*d-s*j)/(2*m*n*b),M=Math.log(Math.sqrt(E*E+1)-E),_=Math.log(Math.sqrt(R*R+1)-R);S=(_-M)/t,y=function(L){var A=L*S,$=li(M),O=d/(n*b)*($*Th(t*A+M)-Nh(M));return[c+O*f,a+O*h,d*$/li(t*A+M)]}}return y.duration=S*1e3*t/Math.SQRT2,y}return r.rho=function(i){var l=Math.max(.001,+i),c=l*l,a=c*c;return e(l,c,a)},r}(Math.SQRT2,2,4),Ah=Object.freeze(Object.defineProperty({__proto__:null,Base:B.Base,Bottom:B.Bottom,Right:B.Right,Top:B.Top,axisStateZ:B.axisStateZ,newCanvas:B.newCanvas,newTickFactory:B.newTickFactory,tickFactoryProps:B.tickFactoryProps,tickType:B.tickType},Symbol.toStringTag,{value:"Module"})),Ih={region:u.Pt.ZERO,dpr:1,os:u.S.getOS()},$h={gl:null,lower2d:null,upper2d:null,bootstrapped:!1},Bh=({children:e,resizeDebounce:t=100,className:n,...s})=>{const[{path:r},{bootstrapped:i,dpr:l},c]=Q.use$1({type:B.Canvas.TYPE,schema:B.canvasStateZ,initialState:Ih}),a=g.useRef({...$h}),d=g.useRef(!1),x=g.useCallback(j=>{a.current.bootstrapped&&(c(()=>({bootstrapped:!0,region:j,dpr:window.devicePixelRatio,os:u.S.getOS({default:"Windows"})})),d.current=!0)},[c]),p=g.useRef(null),m=Ye.useResize(x,{debounce:t}),f=K.useCombinedRefs(p,m);g.useEffect(()=>{const j=()=>{window.devicePixelRatio===l||!a.current.bootstrapped||p.current==null||c(y=>({...y,region:u.Pt.construct(p.current),dpr:window.devicePixelRatio}))};window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener("change",j,{once:!0})},[l]),g.useEffect(()=>{const j=()=>{!a.current.bootstrapped||p.current==null||c(y=>({...y,region:u.Pt.construct(p.current),glCanvas:void 0,upper2dCanvas:void 0,lower2dCanvas:void 0}))};window.addEventListener("focus",j),window.addEventListener("blur",j)},[c]);const h=g.useCallback(j=>{if(j==null)return;j.className.includes("gl")?a.current.gl=j:j.className.includes("upper2d")?a.current.upper2d=j:a.current.lower2d=j;const{gl:y,lower2d:S,upper2d:b,bootstrapped:E}=a.current;if(y==null||S==null||b==null||E)return;a.current.bootstrapped=!0;const R=y.transferControlToOffscreen(),M=b.transferControlToOffscreen(),_=S.transferControlToOffscreen();c({glCanvas:R,upper2dCanvas:M,lower2dCanvas:_,bootstrap:!0,bootstrapped:!1,region:u.Pt.construct(y),dpr:window.devicePixelRatio,os:u.S.getOS({default:"Windows"})},[R,M,_])},[c]);return o.jsxRuntimeExports.jsxs("div",{ref:f,className:u.CSS(u.CSS.B("canvas-container"),n),...s,children:[o.jsxRuntimeExports.jsx("canvas",{ref:h,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","lower2d"))}),o.jsxRuntimeExports.jsx("canvas",{ref:h,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","gl"))}),o.jsxRuntimeExports.jsx("canvas",{ref:h,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","upper2d"))}),o.jsxRuntimeExports.jsx(Q.Composite,{path:r,children:i&&e})]})},In=(e,t)=>Ye.useResize(g.useCallback((n,s)=>{const r=document.querySelector(".pluto-canvas--lower2d");r!=null&&e(u.A.XY.translate(u.K.scale(u.Pt.topLeft(r),-1)).box(n),s)},[e]),t),Dh=Object.freeze(Object.defineProperty({__proto__:null,Canvas:Bh,useRegion:In},Symbol.toStringTag,{value:"Module"})),Zl=g.createContext(null),st=e=>{const t=g.use(Zl);if(t==null)throw new Error(`Cannot to use ${e} as a non-child of LinePlot.`);return t},Kl=e=>{const t=st("Viewport"),{addViewportHandler:n}=t;g.useEffect(()=>n(e),[n,e])},$n=(e,t)=>{const{setGridEntry:n,removeGridEntry:s}=st(t),{key:r}=e;return Q.useEffectCompare(()=>{u.K$1.outer.parse(e.loc),n(e)},([c],[a])=>Be.J.equal(c,a),[e]),g.useEffect(()=>()=>s(r),[]),{gridArea:u.g.swap(u.K$1.direction(e.loc))==="x"?`axis-start-${r} / plot-start / axis-end-${r} / plot-end`:`plot-start / axis-start-${r} / plot-end / axis-end-${r}`}},Wl=({aetherKey:e,style:t,resizeDebounce:n=0,clearOverScan:s=u.K.ZERO,children:r,hold:i=!1,onHold:l,visible:c,...a})=>{const[d,x]=g.useState([]),p=Ae.useMemoDeepEqualProps({clearOverScan:s,hold:i,visible:c}),[{path:m},{grid:f},h]=Q.use$1({aetherKey:e,type:B.LinePlot.TYPE,schema:B.linePlotStateZ,initialState:{container:u.Pt.ZERO,viewport:u.Pt.DECIMAL,grid:{},...p}}),j=g.useCallback(z=>{c&&h(k=>({...k,container:z}))},[h,c]),y=In(j,{debounce:n});g.useEffect(()=>h(z=>({...z,...p})),[p]);const S=g.useRef(new Map),b=g.useCallback(z=>(S.current.set(z,null),()=>S.current.delete(z)),[S]),E=g.useCallback(z=>{const{mode:k,box:C,stage:P}=z;(k==="pan"&&P!=="start"||k==="zoom"||k==="zoomReset"&&P==="start")&&h(v=>({...v,viewport:C})),S.current.forEach((v,N)=>N(z))},[h]),R=g.useCallback(z=>{h(k=>({...k,grid:{...k.grid,[z.key]:z}}))},[h]),M=g.useCallback(z=>h(k=>{const{[z]:C,...P}=k.grid;return{...k,grid:P}}),[h]),_=g.useCallback(z=>{x(k=>[...k.filter(({key:C})=>C!==z.key),z])},[x]),L=g.useCallback(z=>x(k=>k.filter(({key:C})=>C!==z)),[_]),A=g.useMemo(()=>Oh(f),[f]),$=g.useCallback(z=>{h(k=>({...k,hold:z})),l==null||l(z)},[h,l]),O=`line-plot-${e}`,V=g.useMemo(()=>({lines:d,setGridEntry:R,removeGridEntry:M,setLine:_,removeLine:L,setViewport:E,addViewportHandler:b,setHold:$,id:O}),[O,d,R,M,_,L,E,b,$]);return o.jsxRuntimeExports.jsx("div",{id:O,className:u.CSS.B("line-plot"),style:{...t,...A},ref:y,...a,children:o.jsxRuntimeExports.jsx(Zl,{value:V,children:o.jsxRuntimeExports.jsx(Q.Composite,{path:m,children:r})})})},Oh=e=>{const t=u.CSS.newGridBuilder();return B.regions("top",e).forEach(({key:n,size:s})=>t.row(`axis-start-${n}`,`axis-end-${n}`,s)),t.row("plot-start","plot-end","minmax(0, 1fr)"),B.regions("bottom",e).reverse().forEach(({key:n,size:s})=>t.row(`axis-start-${n}`,`axis-end-${n}`,s)),B.regions("left",e).forEach(({key:n,size:s})=>t.col(`axis-start-${n}`,`axis-end-${n}`,s)),t.col("plot-start","plot-end","minmax(0, 1fr)"),B.regions("right",e).forEach(({key:n,size:s})=>t.col(`axis-start-${n}`,`axis-end-${n}`,s)),t.build()},lr=e=>{const t=e==="x"?"bottom":"left",n=e==="x"?B.XAxis.TYPE:B.YAxis.TYPE,s=`${e}-axis`,r=({aetherKey:i,children:l,location:c=t,label:a="",labelLevel:d="small",labelDirection:x=e,onLabelChange:p,color:m,labelSize:f,showGrid:h,type:j,bounds:y,className:S,tickSpacing:b,autoBounds:E,axisKey:R,autoBoundUpdateInterval:M,onAutoBoundsChange:_,style:L,...A})=>{const $=((a==null?void 0:a.length)??0)>0,O=Q.useUniqueKey(i),V=Ae.useMemoDeepEqualProps({location:c,showGrid:h,type:j,bounds:y,axisKey:R,label:a,labelDirection:x,tickSpacing:b,autoBounds:E,autoBoundUpdateInterval:M}),[{path:z},{size:k,labelSize:C,...P},v]=Q.use$1({aetherKey:O,type:n,schema:B.coreAxisStateZ,initialState:V});g.useEffect(()=>v(F=>({...F,...V})),[V]),g.useEffect(()=>{const{lower:F,upper:H}=B.parseAutoBounds(P.autoBounds);P.bounds!=null&&(F&&(y==null?void 0:y.lower)!==P.bounds.lower||H&&(y==null?void 0:y.upper)!==P.bounds.upper)&&(_==null||_(P.bounds))},[P.autoBounds,P.bounds]);const N=$n({loc:c,key:`${n}-${O}`,size:k+C,order:1},`${e.toUpperCase()}Axis`),D=er.useTypography(d).toString(),I=g.useRef(0);return g.useEffect(()=>{if(e==="y"){if(a==null)return;let H=si.dimensions(a,D)[u.g.dimension(u.g.construct(x))];H>0&&(H+=9),v(Z=>({...Z,labelSize:H}))}else{let H=si.dimensions(a,D).height*1.3;H>0&&(H+=12);const Z=I.current;B.withinSizeThreshold(Z,H)||(I.current=H,v(ee=>({...ee,labelSize:H})))}},[a,x,D]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(S,u.CSS.B("axis"),u.CSS.B(s),u.CSS.loc(c)),style:{...L,...N},align:"center",justify:c!=="left"?"end":"start",direction:u.g.swap(e),...A,children:$&&o.jsxRuntimeExports.jsx(K.MaybeEditable,{className:u.CSS(u.CSS.BE("axis","label"),u.CSS.dir(x)),value:a,onChange:p,level:d})}),o.jsxRuntimeExports.jsx(Q.Composite,{path:z,children:l})]})};return r.displayName=`${e.toUpperCase()}Axis`,r},Yl=lr("x"),Gl=lr("y"),ql=u.K.xy.extend({root:u.K$1.corner,units:ce.object({x:ce._enum(["px","decimal"]),y:ce._enum(["px","decimal"])})}),zh=ql.partial({root:!0,units:!0}),Vh=e=>{var n,s,r,i;const t={};return t[((n=e.root)==null?void 0:n.x)??"left"]=((s=e==null?void 0:e.units)==null?void 0:s.x)==="px"?`${e.x}px`:`${e.x*100}%`,t[((r=e.root)==null?void 0:r.y)??"top"]=((i=e==null?void 0:e.units)==null?void 0:i.y)==="px"?`${e.y}px`:`${e.y*100}%`,t},Fh=(e,t)=>{var i,l,c,a,d,x;const n={x:e.x,y:e.y};if(t.current==null)return n;const s=u.Pt.construct(t.current),r=u.Pt.construct(t.current.parentElement);return((i=e.units)==null?void 0:i.x)==="decimal"?((l=e.root)==null?void 0:l.x)==="right"&&(n.x=1-e.x):((c=e.root)==null?void 0:c.x)==="right"?n.x=1-(e.x+u.Pt.width(s))/u.Pt.width(r):n.x/=u.Pt.width(r),((a=e.units)==null?void 0:a.y)==="decimal"?((d=e.root)==null?void 0:d.y)==="bottom"&&(n.y=1-e.y):((x=e.root)==null?void 0:x.y)==="bottom"?n.y=1-(e.y+u.Pt.height(s))/u.Pt.height(r):n.y/=u.Pt.height(r),n},Xl=(e,t)=>{if(t.current==null)return null;const n=u.Pt.construct(t.current.parentElement),s=u.Pt.construct(t.current),r={x:e.x,y:e.y,root:{...u.K$1.TOP_LEFT},units:{x:"px",y:"px"}};return e.x>.8?(r.x=(1-e.x)*u.Pt.width(n)-u.Pt.width(s),r.root.x="right"):e.x<.2?r.x=e.x*u.Pt.width(n):r.units.x="decimal",e.y>.8?(r.y=(1-e.y)*u.Pt.height(n)-u.Pt.height(s),r.root.y="bottom"):e.y<.2?r.y=e.y*u.Pt.height(n):r.units.y="decimal",r.x=Math.round(r.x*100)/100,{...r,...u.K.truncate(r,3)}},ci=u.Pt.reRoot(u.Pt.DECIMAL,u.K$1.TOP_LEFT),Hh={x:.1,y:.1,root:u.K$1.TOP_LEFT,units:{x:"decimal",y:"decimal"}},cr=g.memo(({className:e,value:t,onChange:n,style:s,draggable:r=!0,initial:i=Hh,...l})=>{const[c,a]=ce.usePurePassthrough({value:t,onChange:n,initial:i}),d=g.useRef(c),x=K.useSyncedRef(r===!1),p=g.useRef(null);c!==null&&(s={...s,...Vh(c)});const m=g.useCallback(h=>{var M;if(((M=p.current)==null?void 0:M.parentElement)==null)return d.current;const j=u.Pt.construct(p.current.parentElement),y=u.A.XY.scale(j).scale(ci),S=y.box(u.Pt.construct(p.current)),b=u.A.XY.clamp(u.Pt.construct(u.Pt.topLeft(ci),{width:1-u.Pt.width(S),height:1-u.Pt.height(S)})),E=u.K.translate(u.K.construct(d.current),u.Pt.signedDims(y.box(h))),R=b.pos(E);return Xl(R,p)},[]),f=Ge.useCursorDrag({onStart:g.useCallback(()=>{d.current=Fh(d.current,p)},[]),onMove:g.useCallback(h=>{if(x.current)return;const j=m(h);j!==null&&a(j)},[]),onEnd:g.useCallback(h=>{if(x.current)return;const j=m(h);j!==null&&(d.current=j)},[])});return o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(e,u.CSS.B("legend")),bordered:!0,rounded:!0,style:s,onDragStart:f,draggable:r,borderShade:5,ref:p,onDrag:he.preventDefault,onDragEnd:he.preventDefault,background:1,...l})});cr.displayName="Legend.Container";const Ds=g.memo(({data:e,onEntryChange:t,onVisibleChange:n,allowVisibleChange:s=!0,shade:r=1})=>o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:e.sort((i,l)=>i.label.localeCompare(l.label)).map(({key:i,color:l,label:c,visible:a=!0})=>o.jsxRuntimeExports.jsxs(ne.Space,{style:{cursor:"pointer"},x:!0,align:"center",size:"small",justify:"spaceBetween",grow:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{direction:"x",align:"center",size:"small",children:[o.jsxRuntimeExports.jsx(Ge.Swatch,{value:l,onChange:d=>t==null?void 0:t({key:i,color:d,label:c,visible:a}),onVisibleChange:n,allowChange:t!=null,draggable:!1,size:"tiny"}),o.jsxRuntimeExports.jsx(K.MaybeEditable,{level:"small",value:c,onChange:d=>t==null?void 0:t({key:i,color:l,label:d,visible:a}),noWrap:!0,shade:a?10:7,onDoubleClick:d=>d.stopPropagation()})]}),s&&o.jsxRuntimeExports.jsx(fe.Icon,{className:u.CSS.B("visible-toggle"),onClick:d=>{d.stopPropagation(),t==null||t({key:i,color:l,label:c,visible:!a})},onDoubleClick:d=>d.stopPropagation(),size:"tiny",shade:r,children:a?o.jsxRuntimeExports.jsx(K.y4.Visible,{}):o.jsxRuntimeExports.jsx(K.y4.Hidden,{})})]},i))}));Ds.displayName="LegendSwatches";const ar=({data:e=[],onEntryChange:t,position:n,onPositionChange:s,allowVisibleChange:r=!0,...i})=>{const[l,c]=g.useState(!1);return e.length===0?null:o.jsxRuntimeExports.jsx(cr,{...i,className:r?u.CSS.M("with-visible-toggle"):void 0,draggable:!l,value:n,onChange:s,size:r?0:"tiny",children:o.jsxRuntimeExports.jsx(Ds,{data:e,onEntryChange:t,onVisibleChange:c,allowVisibleChange:r})})},Zh=Object.freeze(Object.defineProperty({__proto__:null,Container:cr,LegendSwatches:Ds,Simple:ar,calcStickyPos:Xl,completeStickyXYz:ql,stickyXYz:zh},Symbol.toStringTag,{value:"Module"})),ur=g.memo(({className:e,style:t,onLineChange:n,...s})=>{const{lines:r}=st("Legend");return st("Legend"),o.jsxRuntimeExports.jsx(ar,{data:r,onEntryChange:n,...s})});ur.displayName="FloatingLegend";const Kh=({onLineChange:e})=>{const{lines:t}=st("Legend"),n=Q.useUniqueKey(),s=$n({key:n,size:t.length>0?36:0,loc:"bottom",order:5},"Legend");return o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS.BE("legend","container"),align:"center",x:!0,style:{...s,padding:"0 1rem",height:"var(--pluto-height-medium)",margin:"1rem 0 ",width:"fit-content"},children:o.jsxRuntimeExports.jsx(Ds,{data:t,onEntryChange:e,shade:0})})},Ul=({variant:e="floating",...t})=>e==="floating"?o.jsxRuntimeExports.jsx(ur,{...t}):o.jsxRuntimeExports.jsx(Kh,{...t}),dr=g.memo(({aetherKey:e,...t})=>(Q.useUnidirectional({aetherKey:e,type:B.Line.TYPE,schema:B.stateZ,state:t}),null));dr.displayName="Line";const Wh=Object.freeze(Object.defineProperty({__proto__:null,Line:dr},Symbol.toStringTag,{value:"Module"})),xr=({aetherKey:e,color:t,label:n="",visible:s=!0,...r})=>{const i=Q.useUniqueKey(e),{setLine:l,removeLine:c}=st("Line");return g.useEffect(()=>(l({key:i,color:t,label:n,visible:s}),()=>c(i)),[n,t,s]),o.jsxRuntimeExports.jsx(dr,{aetherKey:i,color:t,label:n,visible:s,...r})},Jl=({level:e="h2",...t})=>{const n=Q.useUniqueKey(),s=er.useTypography(e),r=$n({key:n,size:(s.lineHeight+2)*s.baseSize,loc:"top",order:10},"Title");return o.jsxRuntimeExports.jsx(ne.Space,{justify:"center",align:"center",style:r,children:o.jsxRuntimeExports.jsx(K.MaybeEditable,{...t,level:e})})},Ql=({aetherKey:e,...t})=>{const n=Q.useUniqueKey(e),[,,s]=Q.use$1({aetherKey:n,type:B.Tooltip.TYPE,schema:B.tooltipStateZ,initialState:{position:null,...t}}),r=g.useRef(null),i=g.useCallback(c=>{const a=document.querySelector(".pluto-canvas-container");if(a==null)return;const d=u.Pt.topLeft(a);s({position:u.K.translation(d,u.K.construct(c))})},[s]),l=g.useCallback(()=>s({position:null}),[s]);return g.useEffect(()=>{if(r.current===null)return;const c=r.current.parentElement;if(c!=null)return c.addEventListener("mousemove",i),c.addEventListener("mouseleave",l),()=>{c.removeEventListener("mousemove",i),c.removeEventListener("mouseleave",l)}},[i]),o.jsxRuntimeExports.jsx("span",{ref:r})},Yh=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:Ql},Symbol.toStringTag,{value:"Module"})),ec=()=>{const e=g.useRef(new Map),t=g.useCallback(s=>{const{request:r,response:i}=s,l=e.current.get(r);l!=null&&(l(i.bounds),e.current.delete(r))},[]),[,,n]=Q.use$1({type:B.BoundQuerier.TYPE,schema:B.boundQuerierStateZ,onAetherChange:t,initialState:{request:"",response:{request:"",bounds:{}}}});return g.useCallback(async()=>await new Promise(s=>{const r=u.we.create();e.current.set(r,s),n(i=>({...i,request:r}))}),[])},Gh=({ref:e})=>(e.current=ec(),null),qh={select:"pointer",zoom:"crosshair",pan:"grab",zoomReset:"crosshair",click:"pointer",cancel:"default"},tc=({className:e,mode:t,maskBox:n,children:s,style:r,...i})=>o.jsxRuntimeExports.jsxs("div",{className:u.CSS(u.CSS.noSelect,u.CSS.BE("viewport-mask","container"),e),style:{cursor:qh[t],...r},...i,children:[o.jsxRuntimeExports.jsx("div",{style:{...u.Pt.css(n),display:u.Pt.areaIsZero(n)?"none":"block"},className:u.CSS.BE("viewport-mask","selection")}),s]}),Xh=[],pr=({data:e,emptyContent:t,value:n,onChange:s,allowMultiple:r,allowNone:i,hideColumnHeader:l=!1,columns:c=Xh,visible:a,itemHeight:d=Ce.Column.itemHeight,listItem:x=fe.componentRenderProp(Ce.Column.Item),replaceOnSingle:p,omit:m,autoSelectOnNone:f,trigger:h,extraDialogContent:j,variant:y="connected",...S})=>{let b=o.jsxRuntimeExports.jsxs(Ce.Hover,{disabled:!a,children:[j,o.jsxRuntimeExports.jsx(Ce.Column.Header,{hide:l||x!=null,columns:c,children:o.jsxRuntimeExports.jsx(Ce.Core.Virtual,{itemHeight:d,children:x})})]});return y!=="connected"&&(b=o.jsxRuntimeExports.jsx(Is.Pack,{y:!0,className:u.CSS.B("select-dialog-content"),children:b})),o.jsxRuntimeExports.jsx(Ce.List,{data:e,emptyContent:t,omit:m,children:o.jsxRuntimeExports.jsx(Ce.Selector,{value:n,onChange:s,allowMultiple:r,allowNone:i,replaceOnSingle:p,autoSelectOnNone:f,children:o.jsxRuntimeExports.jsxs(Ye.Dialog,{visible:a,className:u.CSS.B("select"),keepMounted:!1,variant:y,...S,children:[h,b]})})})},ot=({children:e=Uh,value:t,onChange:n,entryRenderKey:s="key",tooltipKey:r,allowNone:i=!1,allowMultiple:l=!1,data:c,replaceOnSingle:a,className:d,size:x="medium",actions:p,pack:m=!0,variant:f,tooltipLocation:h,tooltipDelay:j,...y})=>{const{onSelect:S}=Ce.useSelect({allowMultiple:l,allowNone:i,replaceOnSingle:a,data:c,value:t,onChange:n}),b=R=>{f!=="preview"&&S(R)},E=c==null?void 0:c.map(R=>e({key:R.key,onClick:()=>b(R.key),size:x,selected:R.key===t,entry:R,title:R[s],tooltip:r?R[r]:void 0,tooltipLocation:h,tooltipDelay:j}));return m?o.jsxRuntimeExports.jsxs(Is.Pack,{borderShade:5,className:u.CSS(u.CSS.B("select-button"),d),size:x,...y,children:[E,p]}):o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:E})},Uh=({key:e,onClick:t,selected:n,title:s,size:r,tooltip:i,tooltipLocation:l,tooltipDelay:c})=>o.jsxRuntimeExports.jsx(fe.Button,{onClick:t,variant:n?"filled":"outlined",size:r,tooltip:i,tooltipLocation:l,tooltipDelay:c,children:s},e),nc=({selected:e,renderKey:t,toggle:n,visible:s,children:r,...i})=>o.jsxRuntimeExports.jsx(fe.Button,{className:u.CSS.B("select-dropdown-button"),onClick:n,variant:"outlined",endIcon:o.jsxRuntimeExports.jsx(An.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:s}),...i,children:r??(e==null?void 0:e[t])}),sc=fe.componentRenderProp(nc),Os=({data:e,value:t,columns:n=[],children:s=sc,entryRenderKey:r="key",allowNone:i=!1,onChange:l,disabled:c,hideColumnHeader:a=!0,variant:d,dropdownVariant:x,...p})=>{const{close:m,visible:f,toggle:h}=Ye.use(),[j,y]=g.useState((e==null?void 0:e.find(E=>E.key===t))??null);g.useEffect(()=>{y((e==null?void 0:e.find(E=>E.key===t))??null)},[e,t]);const S=g.useCallback((E,R)=>{if(!(Array.isArray(E)||E===null)){if(m(),E==null)return y(null),l(t);y(R.entries[0]),l(E)}},[l,t,m,y]),b={selected:j,renderKey:r,toggle:h,visible:f,disabled:c};return d!=null&&(b.variant=d),o.jsxRuntimeExports.jsx(pr,{close:m,data:e,visible:f,value:t,onChange:S,allowMultiple:!1,allowNone:i,columns:n,hideColumnHeader:a,variant:x,trigger:o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:s(b)}),...p})},Jh=[{key:"start",icon:o.jsxRuntimeExports.jsx(K.y4.TextAlign.Left,{})},{key:"center",icon:o.jsxRuntimeExports.jsx(K.y4.TextAlign.Center,{})},{key:"end",icon:o.jsxRuntimeExports.jsx(K.y4.TextAlign.Right,{})}],Qh=({key:e,entry:t,onClick:n,selected:s})=>o.jsxRuntimeExports.jsx(fe.Icon,{variant:s?"filled":"outlined",onClick:n,children:t.icon},e),zs=({children:e=Qh,...t})=>o.jsxRuntimeExports.jsx(ot,{...t,allowMultiple:!1,data:Jh,children:e}),e1=[{key:"large",label:"L"},{key:"medium",label:"M"},{key:"small",label:"S"}],oc=e=>o.jsxRuntimeExports.jsx(ot,{...e,data:e1,entryRenderKey:"label"}),t1=new Set([u.m.UUID,u.m.JSON]),rc=u.m.ALL.filter(e=>e!==u.m.UNKNOWN).map(e=>({key:e.toString(),name:t1.has(e)?e.toString().toUpperCase():u.d$1.capitalize(e.toString())})),n1=rc.filter(e=>!new u.m(e.key).isVariable),s1=[{key:"name",name:"Name"}],o1=({hideVariableDensity:e=!1,...t})=>o.jsxRuntimeExports.jsx(Os,{...t,data:e?n1:rc,columns:s1,entryRenderKey:"name"}),r1=[{key:"x",icon:o.jsxRuntimeExports.jsx(K.y4.Arrow.Right,{})},{key:"y",icon:o.jsxRuntimeExports.jsx(K.y4.Arrow.Up,{})}],i1=[{key:"x",icon:o.jsxRuntimeExports.jsx(K.y4.Arrow.Right,{})},{key:"y",icon:o.jsxRuntimeExports.jsx(K.y4.Arrow.Down,{})}],l1=({key:e,entry:t,onClick:n,selected:s})=>o.jsxRuntimeExports.jsx(fe.Icon,{variant:s?"filled":"outlined",onClick:n,children:t.icon},e),ic=({children:e=l1,yDirection:t="up",...n})=>o.jsxRuntimeExports.jsx(ot,{...n,allowMultiple:!1,data:t==="up"?r1:i1,children:e}),lc=e=>o.jsxRuntimeExports.jsx(fe.Icon,{className:u.CSS.BE("select","clear"),variant:"outlined",...e,children:o.jsxRuntimeExports.jsx(K.y4.Close,{"aria-label":"clear"})}),mt=({onChange:e,value:t,entryRenderKey:n="key",data:s,inputProps:r,allowNone:i=!0,searcher:l,className:c,variant:a="button",hideColumnHeader:d=!1,disabled:x,children:p,dropdownVariant:m="connected",placeholder:f=Vs,inputPlaceholder:h=f,triggerTooltip:j,dropdownZIndex:y,filter:S,actions:b,...E})=>{const{visible:R,open:M,close:_,toggle:L}=Ye.use(),[A,$]=g.useState(null),O=l!=null;Q.useAsyncEffect(async()=>{if(Ce.selectValueIsZero(t))return $(null);if((A==null?void 0:A.key)===t)return;let P=null;if(O)try{[P]=await l.retrieve([t])}finally{P??(P=null)}else s!=null&&(P=s.find(v=>v.key===t)??null);$(P)},[l,t,s]);const V=g.useCallback((P,v)=>{Array.isArray(P)||($(P==null?null:v.entries[0]),_(),e(P,v))},[e,i]),z=g.useMemo(()=>O?kt.Search:kt.Filter,[O]),k=o.jsxRuntimeExports.jsx(z,{searcher:l,filter:S,children:({onChange:P})=>o.jsxRuntimeExports.jsx(c1,{...r,autoFocus:m==="modal",variant:a,onChange:P,onFocus:M,selected:A,entryRenderKey:n,visible:R,allowNone:i,className:c,dropdownVariant:m,disabled:x,placeholder:h,children:b})}),C=o.jsxRuntimeExports.jsx(fe.Button,{tooltip:j,variant:"outlined",onClick:L,disabled:x,children:A!=null?cc(n,A):f});return o.jsxRuntimeExports.jsx(pr,{close:_,zIndex:y,data:s,allowMultiple:!1,visible:R,value:t,hideColumnHeader:d,onChange:V,allowNone:i,listItem:p,variant:m,trigger:m!=="modal"?k:C,extraDialogContent:m==="modal"?k:void 0,keepMounted:!1,...E})},Vs="Select",cc=(e,t)=>t==null?"":typeof e=="function"?e(t):t[e].toString(),c1=({entryRenderKey:e,selected:t,visible:n,onChange:s,onFocus:r,allowNone:i=!0,placeholder:l=Vs,className:c,disabled:a,dropdownVariant:d,children:x,...p})=>{const{clear:m}=Ce.useSelectionUtils(),[f,h]=g.useState("");g.useEffect(()=>{if(!n){if(u.G$1.isZero(t==null?void 0:t.key))return h("");t!=null&&h(cc(e,t))}},[t,n,e]);const j=R=>{s(R),h(R)},y=()=>{f===""&&s(""),h(""),r==null||r()},S=R=>{n||(R.preventDefault(),r==null||r())},b=()=>{h(""),m==null||m()};let E;return d!=="modal"&&(E=o.jsxRuntimeExports.jsx(An.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:n})),o.jsxRuntimeExports.jsxs(pt.Text,{className:u.CSS(u.CSS.BE("select","input"),c),value:f,onChange:j,onFocus:y,onKeyDown:De.matchCallback([["Enter"]],R=>{R.preventDefault(),!n&&(r==null||r())}),endContent:E,style:{flexGrow:1},onClick:S,placeholder:l,disabled:a,...p,children:[x,i&&o.jsxRuntimeExports.jsx(lc,{onClick:b,disabled:a})]})},wn=({children:e="",size:t="medium",color:n,icon:s,onClose:r,className:i,onDragStart:l,...c})=>{const a=u.od.cssString(n);s==null&&n!=null&&(s=o.jsxRuntimeExports.jsx(K.y4.Circle,{fill:a}));const d=r==null?void 0:o.jsxRuntimeExports.jsx(fe.Icon,{"aria-label":"close",size:"small",className:u.CSS.BE("tag","close"),shade:1,sharp:!0,onClick:x=>{x.stopPropagation(),r()},children:o.jsxRuntimeExports.jsx(K.y4.Close,{})});return o.jsxRuntimeExports.jsx(As.WithIcon,{startIcon:s,endIcon:d,className:u.CSS(i,u.CSS.B("tag"),u.CSS.size(t),r!=null&&u.CSS.BM("tag","closeable")),level:ce.ComponentSizeLevels[t],noWrap:!0,align:"center",size:"small",onDragStart:l,...c,children:e})},a1=Object.freeze(Object.defineProperty({__proto__:null,Tag:wn},Symbol.toStringTag,{value:"Module"})),mr=({entryKey:e,entryRenderKey:t,entry:n,loading:s,...r})=>{let i=e;return n!=null&&(i=typeof t=="function"?t(n):n[t]),g.createElement(wn,{size:"small",variant:"outlined",className:u.CSS(n==null&&!s&&u.CSS.BEM("select-multiple","tag","invalid")),draggable:!0,...r,key:e.toString()},u.fd(i))},u1=fe.componentRenderProp(mr),an=({onChange:e,value:t,className:n,data:s,columns:r=[],entryRenderKey:i="key",emptyContent:l,searcher:c,renderTag:a=u1,placeholder:d,onTagDragStart:x,allowMultiple:p,allowNone:m,replaceOnSingle:f,onTagDragEnd:h,style:j,addPlaceholder:y="Add",children:S,dropdownVariant:b="connected",actions:E,...R})=>{const{visible:M,open:_,close:L}=Ye.use(),[A,$]=g.useState([]),[O,V]=g.useState(!1),z=c!=null;Q.useAsyncEffect(async()=>{V(!0),Ce.selectValueIsZero(t)&&$([]);const N=A.map(F=>F.key),D=Pe.t.toArray(t);if(u.L.unorderedPrimitiveArrays(N,D)===u.L.EQUAL)return;let I=[];if(z)try{I=await c.retrieve(D)}finally{V(!1)}else s!=null&&(I=s.filter(F=>D.includes(F.key)));$(I)},[c,z,t,s]);const k=g.useCallback((N,D)=>{N!=null&&($(D.entries),e(Pe.t.toArray(N),D))},[e]),C=g.useMemo(()=>z?kt.Search:kt.Filter,[z]);let P,v;if(b==="connected")v=o.jsxRuntimeExports.jsx(C,{searcher:c,children:({onChange:N,value:D})=>o.jsxRuntimeExports.jsx(d1,{dropdownVariant:b,value:D,selectedKeys:t,className:n,onChange:N,loading:O,selected:A,onFocus:_,entryRenderKey:i,visible:M,renderTag:a,placeholder:d,onTagDragStart:x,onTagDragEnd:h,style:j,children:E})});else{const N=Pe.t.toArray(t);v=o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",grow:!0,style:j,size:"small",children:[N.map(D=>{const I=A.find(F=>F.key===D);return a({key:D,entryKey:D,entryRenderKey:i,loading:O,entry:I,onClose:()=>{const F=N.filter(H=>H!==D);e(F,{clicked:null,clickedIndex:-1,entries:[]})},onDragStart:F=>x==null?void 0:x(F,D),onDragEnd:F=>h==null?void 0:h(F,D)})}),N.length>0?o.jsxRuntimeExports.jsx(fe.Icon,{onClick:_,children:o.jsxRuntimeExports.jsx(K.y4.Add,{style:{color:"var(--pluto-gray-l9)"}})}):o.jsxRuntimeExports.jsx(fe.Button,{onClick:_,shade:0,textShade:9,startIcon:o.jsxRuntimeExports.jsx(K.y4.Add,{}),variant:"text",children:y})]}),P=o.jsxRuntimeExports.jsx(C,{searcher:c,children:D=>o.jsxRuntimeExports.jsx(pt.Text,{autoFocus:!0,placeholder:"Search",...D,children:E})})}return o.jsxRuntimeExports.jsx(pr,{close:L,data:s,emptyContent:l,visible:M,value:t,onChange:k,allowNone:m,replaceOnSingle:f,columns:r,allowMultiple:!0,listItem:S,trigger:v,extraDialogContent:P,variant:b,...R})},d1=({selectedKeys:e,loading:t,selected:n,onChange:s,onFocus:r,visible:i,entryRenderKey:l,renderTag:c,placeholder:a=Vs,onTagDragStart:d,onTagDragEnd:x,value:p,className:m,children:f,dropdownVariant:h,...j})=>{const{onSelect:y,clear:S}=Ce.useSelectionUtils(),b=g.useRef(null);g.useLayoutEffect(()=>{var L;i&&((L=b.current)==null||L.focus())},[i,n]);const E=()=>{i||s(""),r==null||r()},R=()=>{i||r==null||r()},M=()=>{i||s("")};let _;return h!=="modal"&&(_=o.jsxRuntimeExports.jsx(An.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:i})),o.jsxRuntimeExports.jsxs(pt.Text,{ref:b,className:u.CSS(u.CSS.BE("select-multiple","input"),u.CSS.visible(i),m),onBlur:M,placeholder:a,value:p,onChange:s,onFocus:E,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",onClick:R,endContent:_,variant:"button",...j,children:[o.jsxRuntimeExports.jsx(ne.Space,{x:!0,className:u.CSS.BE("select-multiple","tags"),align:"center",grow:!0,size:"small",children:Pe.t.toArray(e).map(L=>{const A=n.find($=>$.key===L);return c({key:L,entryKey:L,entryRenderKey:l,loading:t,entry:A,onClose:()=>y==null?void 0:y(L),onDragStart:$=>d==null?void 0:d($,L),onDragEnd:$=>x==null?void 0:x($,L)})})}),f,o.jsxRuntimeExports.jsx(lc,{onClick:S})]})},x1=[{key:"h2",label:"XL"},{key:"h3",label:"L"},{key:"h4",label:"M"},{key:"h5",label:"S"},{key:"small",label:"XS"}],un=e=>o.jsxRuntimeExports.jsx(ot,{...e,data:x1,entryRenderKey:"label"}),p1=[{key:600,label:"Bold"},{key:500,label:"Medium"},{key:400,label:"Normal"},{key:250,label:"Light"}],ac=e=>o.jsxRuntimeExports.jsx(ot,{...e,data:p1,entryRenderKey:"label"}),m1=Object.freeze(Object.defineProperty({__proto__:null,Level:un,Weight:ac},Symbol.toStringTag,{value:"Module"})),f1=Object.freeze(Object.defineProperty({__proto__:null,BaseButton:nc,Button:ot,ComponentSize:oc,DEFAULT_PLACEHOLDER:Vs,DataType:o1,Direction:ic,DropdownButton:Os,Multiple:an,MultipleTag:mr,Single:mt,Text:m1,TextAlignment:zs,defaultButton:sc},Symbol.toStringTag,{value:"Module"})),h1=11,g1=6,j1=2,ai=5,E1=e=>u.Pt.width(e)<ai&&u.Pt.height(e)<ai,gn=e=>{const t=u.Pt.width(e),n=u.Pt.height(e);return Math.min(t,n)<.001?h1:g1},y1=["zoom","pan","select","zoomReset","cancel"],Sn=[...y1,"click"],S1=ce._enum(Sn),uc=["zoom","select"],jn={defaultMode:"zoom",zoom:[["MouseLeft"]],zoomReset:[["MouseLeft","Control"]],pan:[["MouseLeft","Shift"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},dc={defaultMode:"pan",pan:[["MouseLeft"]],zoom:[["MouseLeft","Shift"]],zoomReset:[["MouseLeft","Control"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},xc={defaultMode:"select",select:[["MouseLeft"]],pan:[["MouseLeft","Shift"]],zoom:[["MouseLeft","Alt"]],zoomReset:[["MouseLeft","Control"]],cancel:[["Escape"]]},fr={zoom:jn,pan:dc,select:xc,zoomReset:jn,click:jn,cancel:jn},R1=e=>{const t=Object.entries(e);return Object.fromEntries(t.map(([n,s])=>n==="defaultMode"?[n,s]:[n,s.map(r=>r.filter(i=>i!=="MouseLeft")).filter(r=>r.length>0)]))},C1=u.Pt.construct(0,0,1,1,u.K$1.TOP_LEFT),w1={width:30,height:50},pc=({onChange:e,triggers:t,initial:n=C1,threshold:s=w1,ref:r})=>{const i=(t==null?void 0:t.defaultMode)??"zoom",[l,c]=g.useState(u.Pt.ZERO),[a,d]=g.useState(i),[x,p]=K.useStateRef(n),m=g.useRef(u.K.ZERO),f=g.useRef(null),h=u.A$1.construct(s);g.useEffect(()=>p(()=>u.Pt.truncate(n,gn(n))),[n]),g.useEffect(()=>d(i),[i]);const[j,y,S,b]=Ae.useMemoCompare(()=>{const A={...fr[i],...t},$=De.flattenConfig(A),O=R1(A);return[A,$,O,De.flattenConfig(O)]},De.compareModeConfigs,[t]),E=g.useCallback(({box:A,triggers:$,stage:O,cursor:V})=>{if(f.current==null)return;const z=De.determineMode(j,$),k=u.Pt.construct(f.current);if(z==null)return;if(z==="cancel"){c(u.Pt.ZERO),e==null||e({box:x.current,mode:z,stage:O,cursor:V});return}if(z==="zoomReset")return c(u.Pt.ZERO),e==null||e({box:u.Pt.DECIMAL,mode:z,stage:O,cursor:V}),p(u.Pt.DECIMAL);const C=E1(A);if(O==="end"){if(C){z==="zoom"&&c(u.Pt.ZERO),e==null||e({box:x.current,mode:"click",stage:O,cursor:V});return}return p(v=>{if(z==="pan"){const D=ui(A,v,k);return D===null||u.Pt.equals(D,v)?v:(e==null||e({box:D,mode:z,stage:O,cursor:V}),D)}const N=R(A,v,k);return N===null?v:(e==null||e({box:N,mode:z,stage:O,cursor:V}),z==="zoom"?(c(u.Pt.ZERO),N):u.Pt.truncate(v,gn(v)))})}if(uc.includes(z))return C?void 0:c(u.A.XY.scale(k).clamp(k).translate({x:-u.Pt.left(k),y:-u.Pt.top(k)}).box(di(h,A,k)));if(c(v=>u.Pt.areaIsZero(v)?v:u.Pt.ZERO),u.K.distance(V,m.current)<j1)return;m.current=V;const P=ui(A,x.current,k);e==null||e({box:P,mode:z,stage:O,cursor:V})},[c,d,e,j,s.height,s.width,p,f,gn]);g.useImperativeHandle(r,()=>({reset:()=>{c(u.Pt.ZERO),p(u.Pt.DECIMAL),e==null||e({box:u.Pt.DECIMAL,mode:"zoomReset",stage:"start",cursor:u.K.ZERO})}}),[e]);const R=g.useCallback((A,$,O)=>{const V=To($,O).box(di(h,A,O));return u.Pt.truncate(V,gn(V))},[s]),M=De.useHeldRef({triggers:[["Control"]]}),_=De.useHeldRef({triggers:[["Alt"]]});g.useEffect(()=>{const A=$=>{if(f.current==null)return;let O=1;$.deltaY<0?O-=.035:O+=.035;const V=u.Pt.construct(f.current),z=u.K.construct($);if(Array.from(f.current.children).push(f.current),!u.Pt.contains(V,z)||f.current!==$.target&&Ye.findParent($.target,D=>D===f.current)==null)return;const P=To(x.current,u.Pt.construct(f.current)).pos(u.K.construct($));let N=u.A.XY.magnify({x:M.current.held?1:O,y:_.current.held?1:O}).box(x.current);N=u.Pt.translate(N,{x:M.current.held?0:P.x*(1-O),y:_.current.held?0:P.y*(1-O)}),p(N),e==null||e({stage:"end",box:N,cursor:u.K.construct($),mode:"zoom"})};return window.addEventListener("wheel",A),()=>window.removeEventListener("wheel",A)},[p,e]),vl.useDrag({bound:f,onDrag:E,triggers:y,loose:!0});const L=g.useCallback(({triggers:A,stage:$})=>{if($==="end")return d(i);const O=De.determineMode(S,A);O!=null&&d(O)},[S,i,e]);return De.use({triggers:b,callback:L,region:f}),{maskBox:l,ref:f,mode:a}},To=(e,t)=>u.A.XY.scale(t).clamp(t).scale(e),ui=(e,t,n)=>{let s=u.Pt.signedDims(To(t,n).box(e));s={signedWidth:-s.signedWidth,signedHeight:-s.signedHeight};const r=u.A.XY.translate(u.K.construct(s)).box(t);return u.Pt.truncate(r,gn(r))},di=(e,t,n)=>u.Pt.height(t)<=e.height?u.Pt.construct(u.Pt.left(t),u.Pt.top(n),u.Pt.width(t),u.Pt.height(n)):u.Pt.width(t)<=e.width?u.Pt.construct(u.Pt.left(n),u.Pt.top(t),u.Pt.width(n),u.Pt.height(t)):t,b1=({mode:e,triggers:t})=>o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",children:[o.jsxRuntimeExports.jsx(K.Text,{level:"small",children:u.d$1.capitalize(e)}),o.jsxRuntimeExports.jsx(ne.Space,{empty:!0,x:!0,align:"center",children:o.jsxRuntimeExports.jsx(zf.Text,{trigger:t[0],level:"small"})})]}),v1={zoom:o.jsxRuntimeExports.jsx(K.y4.Zoom,{}),pan:o.jsxRuntimeExports.jsx(K.y4.Pan,{}),select:o.jsxRuntimeExports.jsx(K.y4.Selection,{}),zoomReset:o.jsxRuntimeExports.jsx(K.y4.Expand,{}),click:o.jsxRuntimeExports.jsx(K.y4.Bolt,{})},k1=({triggers:e,disable:t=["zoomReset","click"],...n})=>{const s=[...t,"cancel"],r=Object.entries(e).filter(([i])=>!s.includes(i)&&Sn.includes(i)).map(([i,l])=>({key:i,icon:v1[i],tooltip:o.jsxRuntimeExports.jsx(b1,{mode:i,triggers:l})})).sort((i,l)=>Sn.indexOf(i.key)-Sn.indexOf(l.key));return o.jsxRuntimeExports.jsx(ot,{...n,data:r,entryRenderKey:"icon",children:({title:i,entry:l,...c})=>g.createElement(fe.Icon,{...c,key:l.key,variant:c.selected?"filled":"outlined",size:"small",tooltip:l.tooltip,tooltipLocation:u.K$1.BOTTOM_LEFT},l.icon)})},M1=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_TRIGGERS:fr,MASK_MODES:uc,MODES:Sn,Mask:tc,PAN_DEFAULT_TRIGGERS:dc,SELECT_DEFAULT_TRIGGERS:xc,SelectMode:k1,ZOOM_DEFAULT_TRIGGERS:jn,modeZ:S1,use:pc},Symbol.toStringTag,{value:"Module"})),P1=e=>e==null?null:e.closest(".pluto-line-plot__viewport")??null,mc=({ref:e,children:t,initial:n=u.Pt.DECIMAL,onChange:s,...r})=>{const{setViewport:i}=st("Viewport");g.useLayoutEffect(()=>{i({box:n,mode:"zoom",cursor:u.K.ZERO,stage:"start"})},[i,n]);const l=g.useCallback(a=>{i(a),s==null||s(a)},[s,i]),c=pc({onChange:l,initial:n,ref:e,...r});return o.jsxRuntimeExports.jsx(tc,{className:u.CSS.BE("line-plot","viewport"),...c,children:t})},_1=Object.freeze(Object.defineProperty({__proto__:null,BoundsQuerier:Gh,Floating:ur,Legend:Ul,Line:xr,LinePlot:Wl,Title:Jl,Tooltip:Yh,Viewport:mc,XAxis:Yl,YAxis:Gl,axisFactory:lr,selectViewportEl:P1,useBoundQuerier:ec,useContext:st,useGridEntry:$n,useViewport:Kl},Symbol.toStringTag,{value:"Module"})),L1=({aetherKey:e,...t})=>(Q.use$1({aetherKey:e,type:B.Annotation.TYPE,schema:B.annotationStateZ,initialState:t}),null),fc=({aetherKey:e,menu:t,...n})=>{const s=Q.useUniqueKey(e),{setViewport:r,setHold:i}=st("Range.Provider"),[,{hovered:l,count:c},a]=Q.use$1({aetherKey:s,type:B.Provider$1.TYPE,schema:B.providerStateZ,initialState:{...n,cursor:null,hovered:null,count:0}}),d=$n({key:s,loc:"top",size:c>0?32:0,order:3},"Annotation.Provider"),x=vt.useContextMenu(),p=K.useSyncedRef(x.visible),m=g.useCallback(f=>{const h=y=>{a(S=>({...S,cursor:{x:y.clientX,y:y.clientY}}))},j=f.currentTarget;j.addEventListener("mousemove",h),j.addEventListener("mouseleave",()=>{j.removeEventListener("mousemove",h),p.current||a(y=>({...y,cursor:null}))},{once:!0})},[a]);return o.jsxRuntimeExports.jsx(vt.ContextMenu,{...x,menu:()=>t==null||l==null?null:t(l),children:o.jsxRuntimeExports.jsx(ne.Space,{style:{...d,cursor:l!=null?"pointer":"default",width:"100%",height:"100%"},onContextMenu:x.open,className:x.className,onClick:()=>{l!=null&&(r({box:u.Pt.construct({x:l.viewport.lower,y:0},{x:l.viewport.upper,y:1}),mode:"zoom",cursor:u.K.ZERO,stage:"start"}),i(!0))},onMouseEnter:m})})},N1=Object.freeze(Object.defineProperty({__proto__:null,Annotation:L1,Provider:fc},Symbol.toStringTag,{value:"Module"})),hc={defaultMode:"empty",one:[["1"]],two:[["2"]],clear:[["Shift"]],empty:[[]]},T1=De.flattenConfig(hc),gc=({aetherKey:e})=>{const t=Q.useUniqueKey(e),[,,n]=Q.use$1({aetherKey:t,type:B.Measure.TYPE,schema:B.measureStateZ,initialState:{hover:null,one:null,two:null}}),s=g.useRef(null),r=De.useHeldRef({triggers:T1,loose:!0}),i=g.useCallback(({mode:a,cursor:d})=>{if(a==="click"){const x=De.determineMode(hc,r.current.triggers,{loose:!0});if(["one","two"].includes(x))return n(p=>({...p,[x]:d}));n(x==="clear"?p=>({...p,one:null,two:null}):p=>({...p,one:p.one??d,two:p.one!==null?d:p.two}))}},[n,r]);Kl(i);const l=g.useCallback(a=>n(d=>({...d,hover:u.K.construct(a)})),[n]),c=g.useCallback(()=>{n(a=>({...a,hover:null}))},[n]);return g.useEffect(()=>{if(s.current===null)return;const a=s.current.parentElement;if(a!=null)return a.addEventListener("mousemove",l),a.addEventListener("mouseleave",c),()=>{a.removeEventListener("mousemove",l),a.removeEventListener("mouseleave",c)}},[i]),o.jsxRuntimeExports.jsx("span",{ref:s})},A1=Object.freeze(Object.defineProperty({__proto__:null,Measure:gc},Symbol.toStringTag,{value:"Module"})),hr=({aetherKey:e,label:t,position:n,onLabelChange:s,onPositionChange:r,onUnitsChange:i,units:l="",color:c,lineWidth:a,lineDash:d,className:x,onSelect:p,style:m,...f})=>{const[h,j]=ce.usePurePassthrough({value:t,onChange:s,initial:""}),y=K.useSyncedRef(r),[,{pixelPosition:S},b]=Q.use$1({aetherKey:e,type:B.Rule.TYPE,schema:B.ruleStateZ,initialState:{color:c,dragging:!1,position:n,lineWidth:a,lineDash:d},onAetherChange:g.useCallback(({position:z})=>{var k;z!=null&&((k=y.current)==null||k.call(y,z))},[y])}),E=g.useRef(S);S!==E.current&&(E.current=S);const{id:R}=st("Rule"),M=document.getElementById(R),_=M==null?void 0:M.querySelector(".pluto-line-plot__viewport"),L=g.useRef(S);g.useEffect(()=>{b(z=>({...z,position:n,color:c,lineWidth:a,lineDash:d}))},[n,c,a,d]);const A=Ge.useCursorDrag({onStart:g.useCallback(()=>{p==null||p(),b(z=>({...z,dragging:!0})),L.current=E.current},[]),onMove:z=>{b(k=>({...k,pixelPosition:(L.current??0)+u.Pt.signedHeight(z)}))},onEnd:g.useCallback(()=>{b(z=>({...z,dragging:!1})),L.current=S},[])}),$=g.useRef(null);if(n==null||S==null)return null;const O=u.od.pickByContrast(c,u.od.BLACK,u.od.WHITE),V=o.jsxRuntimeExports.jsxs("div",{ref:$,className:u.CSS.B("rule"),style:{top:`calc(${S}px - 0.5rem)`},children:[o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("rule","drag-handle"),onDragStart:A,draggable:!0}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",className:u.CSS(x,u.CSS.BE("rule","tag")),bordered:!0,onClick:p,size:1,rounded:!0,style:{borderColor:u.od.cssString(c),backgroundColor:u.od.hex(u.od.setAlpha(c,.7)),...m},...f,children:[o.jsxRuntimeExports.jsx(K.Editable,{className:u.CSS.B("label"),level:"small",value:h,onChange:j,color:O}),o.jsxRuntimeExports.jsx(As.Divider,{y:!0,style:{borderColor:u.od.cssString(c)}}),o.jsxRuntimeExports.jsxs(ne.Space,{size:"small",x:!0,align:"center",children:[o.jsxRuntimeExports.jsx(K.Editable,{value:n.toFixed(2),onChange:z=>{const k=Number(z);isFinite(k)&&(r==null||r(k))},level:"small",color:O}),o.jsxRuntimeExports.jsx(K.MaybeEditable,{level:"small",color:O,value:l,onChange:i})]})]})]});return _==null?V:kl.createPortal(V,_)},I1=Object.freeze(Object.defineProperty({__proto__:null,Rule:hr},Symbol.toStringTag,{value:"Module"})),jc=me.canDropOfType(nt),$1=({lines:e,axes:t,showTitle:n=!0,title:s="",onTitleChange:r,showLegend:i=!0,legendPosition:l,onLegendPositionChange:c,titleLevel:a="h4",onLineChange:d,onRuleChange:x,onAxisChannelDrop:p,onAxisChange:m,rules:f,enableTooltip:h=!0,enableMeasure:j=!1,initialViewport:y=u.Pt.DECIMAL,legendVariant:S,onViewportChange:b,viewportTriggers:E,annotationProvider:R,onSelectRule:M,children:_,...L})=>{var z;const A=t.filter(({location:k})=>u.K$1.isY(k)),$=g.useRef(null),O=K.usePrevious(e.length),V=K.usePrevious(L.hold);return(O===0&&e.length!==0||V===!0&&L.hold===!1)&&((z=$.current)==null||z.reset()),o.jsxRuntimeExports.jsxs(Wl,{...L,children:[A.map((k,C)=>{const P=e.filter(D=>D.axes.x===k.key),v=t.filter(({location:D})=>u.K$1.isX(D)),N=f==null?void 0:f.filter(D=>[...v.map(({key:I})=>I),k.key].includes(D.axis));return o.jsxRuntimeExports.jsx(B1,{axis:k,index:C,lines:P,yAxes:v,rules:N,onAxisChannelDrop:p,onAxisChange:m,annotationProvider:R,onRuleChange:x,onSelectRule:M},k.key)}),i&&o.jsxRuntimeExports.jsx(Ul,{onLineChange:d,position:l,onPositionChange:c,variant:S}),n&&o.jsxRuntimeExports.jsx(Jl,{value:s,onChange:r,level:a}),o.jsxRuntimeExports.jsxs(mc,{initial:y,onChange:b,triggers:E,ref:$,children:[h&&o.jsxRuntimeExports.jsx(Ql,{}),j&&o.jsxRuntimeExports.jsx(gc,{}),_]})]})},B1=({yAxes:e,lines:t,index:n,rules:s,onRuleChange:r,onSelectRule:i,onAxisChannelDrop:l,onAxisChange:c,axis:{location:a,key:d,showGrid:x,...p},annotationProvider:m})=>{const f=me.useDrop({type:"Channel.LinePlot.XAxis",canDrop:jc,onDrop:g.useCallback(({items:y})=>{const S=me.filterByType(nt,y);return l==null||l(d,S.map(({key:b})=>b)),S},[d,l])}),h=s==null?void 0:s.filter(y=>y.axis===d),j=me.useDraggingState();return o.jsxRuntimeExports.jsxs(Yl,{...p,...f,location:a,axisKey:d,showGrid:x??n===0,className:u.CSS(u.CSS.dropRegion(me.canDropOfType(nt)(j))),onAutoBoundsChange:y=>c==null?void 0:c({key:d,bounds:y}),children:[e.map((y,S)=>{const b=t.filter(R=>R.axes.y===y.key),E=s==null?void 0:s.filter(R=>R.axis===y.key);return o.jsxRuntimeExports.jsx(O1,{axis:{...y,showGrid:x??(n===0&&S===0)},lines:b,rules:E,onRuleChange:r,onAxisChannelDrop:l,onAxisChange:c,onSelectRule:i},y.key)}),h==null?void 0:h.map(y=>g.createElement(hr,{aetherKey:y.key,...y,key:y.key,onLabelChange:S=>r==null?void 0:r({key:y.key,label:S}),onPositionChange:S=>r==null?void 0:r({key:y.key,position:S}),onUnitsChange:S=>r==null?void 0:r({key:y.key,units:S}),onSelect:()=>i==null?void 0:i(y.key)})),o.jsxRuntimeExports.jsx(fc,{...m})]})},D1=({channels:{x:e,y:t}})=>`${e??0}-${t}`,O1=({lines:e,rules:t,onRuleChange:n,onAxisChannelDrop:s,onAxisChange:r,axis:{key:i,location:l,...c},onSelectRule:a})=>{const d=me.useDrop({type:"Channel.LinePlot.YAxis",canDrop:jc,onDrop:g.useCallback(({items:p})=>{const m=me.filterByType(nt,p);return s==null||s(i,m.map(({key:f})=>f)),m},[i,s])}),x=me.useDraggingState();return o.jsxRuntimeExports.jsxs(Gl,{...c,...d,location:l,axisKey:i,className:u.CSS(u.CSS.dropRegion(me.canDropOfType(nt)(x))),onAutoBoundsChange:p=>r==null?void 0:r({key:i,bounds:p}),children:[e.map(p=>o.jsxRuntimeExports.jsx(z1,{line:p},D1(p))),t==null?void 0:t.map(p=>g.createElement(hr,{aetherKey:p.key,...p,key:p.key,onLabelChange:m=>n==null?void 0:n({key:p.key,label:m}),onPositionChange:m=>n==null?void 0:n({key:p.key,position:m}),onUnitsChange:m=>n==null?void 0:n({key:p.key,units:m}),onClick:()=>a==null?void 0:a(p.key)}))]})},z1=({line:e})=>e.variant==="static"?o.jsxRuntimeExports.jsx(F1,{line:e}):o.jsxRuntimeExports.jsx(V1,{line:e}),V1=({line:{key:e,timeSpan:t,channels:{x:n,y:s},axes:r,...i}})=>{const{xTelem:l,yTelem:c}=g.useMemo(()=>{const a=Number(t.valueOf())*3,d=B.streamChannelData({timeSpan:t,channel:s,keepFor:a}),x=n!=null&&n!==0;return{xTelem:B.streamChannelData({timeSpan:t,channel:x?n:s,useIndexOfChannel:!x,keepFor:a}),yTelem:d}},[t.valueOf(),n,s]);return o.jsxRuntimeExports.jsx(xr,{aetherKey:e,y:c,x:l,...i})},F1=({line:{timeRange:e,key:t,channels:{x:n,y:s},...r}})=>{const{xTelem:i,yTelem:l}=g.useMemo(()=>{const c=B.channelData({timeRange:e,channel:s}),a=n!=null&&n!==0;return{xTelem:B.channelData({timeRange:e,channel:a?n:s,useIndexOfChannel:!a}),yTelem:c}},[e.start.valueOf(),e.end.valueOf(),n,s]);return o.jsxRuntimeExports.jsx(xr,{aetherKey:t,y:l,x:i,...r})},xi=[{key:"name",name:"Name"},{key:"alias",name:"Alias"},{key:"rate",name:"Rate"},{key:"dataType",name:"Data Type"},{key:"index",name:"Index"},{key:"key",name:"Key"},{key:"isIndex",name:"Is Index"}],ms=({items:e},t)=>{const n=me.filterByType(nt,e);return n.length>0&&!n.every(s=>t.includes(s.key))},Ec=["name","alias"],yc=e=>{const t=$s();return g.useMemo(()=>e.length===0?xi:xi.filter(n=>e.includes(n.key)),[e,t])},Sc=e=>{if(e==null)return K.y4.Channel;if(bt.tq.isCalculated(e))return K.y4.Calculation;if(e.isIndex)return K.y4.Index;const t=new u.m(e.dataType);return t.isInteger?K.y4.Binary:t.isFloat?K.y4.Decimal:t.equals(u.m.STRING)?K.y4.String:t.equals(u.m.JSON)?K.y4.JSON:K.y4.Channel},H1=({key:e,...t})=>{const n=Sc(t.entry);return o.jsxRuntimeExports.jsx(mr,{icon:o.jsxRuntimeExports.jsx(n,{}),...t},e)},Z1=({columns:e=Ec,onChange:t,className:n,value:s,searchOptions:r,...i})=>{const l=qe(),c=$s(),a=yc(e),d=ir(),x=Ae.useMemoDeepEqualProps(r),p=g.useMemo(()=>l==null?void 0:l.channels.newSearcherWithOptions({rangeKey:d,internal:!1,...x}),[l,d,x]),m=l!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:f,onDragEnd:h,...j}=me.useDragAndDrop({type:"Channel.SelectMultiple",canDrop:g.useCallback(R=>ms(R,Pe.t.toArray(s)),[s]),onDrop:g.useCallback(({items:R})=>{const M=me.filterByType(nt,R);if(M.length===0)return[];const _=u.c.unique([...Pe.t.toArray(s),...M.map(L=>L.key)]);return t(_,{clickedIndex:null,clicked:null,entries:[]}),M},[t,s])}),y=me.useDraggingState(),S=g.useCallback(({dropped:R})=>{t(Pe.t.toArray(s).filter(M=>!R.some(_=>_.key===M)),{clickedIndex:null,clicked:null,entries:[]})},[t,s]),b=g.useCallback((R,M)=>f([{key:M,type:nt}],S),[f,S]),E=g.useCallback(R=>c[R.key]??R.name,[c]);return o.jsxRuntimeExports.jsx(an,{className:u.CSS(n,u.CSS.dropRegion(ms(y,Pe.t.toArray(s)))),value:s,onTagDragStart:b,onTagDragEnd:h,searcher:p,onChange:t,columns:a,emptyContent:m,entryRenderKey:E,renderTag:H1,...j,...i})},$t=({columns:e=Ec,onChange:t,value:n,className:s,data:r,searchOptions:i,...l})=>{const c=qe(),a=$s(),d=yc(e),x=ir(),p=Ae.useMemoDeepEqualProps(i),m=g.useMemo(()=>{if(!(r!=null&&r.length>0))return c==null?void 0:c.channels.newSearcherWithOptions({rangeKey:x,internal:!1,...p})},[c,x,r==null?void 0:r.length,p]),f=c!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),h=g.useId(),j=g.useMemo(()=>({key:h,type:"Channel.SelectMultiple"}),[h]),{startDrag:y,onDragEnd:S,...b}=me.useDragAndDrop({type:"Channel.SelectSingle",canDrop:g.useCallback(_=>ms(_,Pe.t.toArray(n)),[n]),onDrop:g.useCallback(({items:_})=>{const L=me.filterByType(nt,_);return L.length===0?[]:(t(L[0].key,{clickedIndex:null,clicked:null,entries:[]}),L)},[j,t])}),E=me.useDraggingState(),R=g.useCallback(()=>n!=null&&y([{type:nt,key:n}]),[y,n]),M=g.useCallback(_=>a[_.key]??_.name,[a]);return o.jsxRuntimeExports.jsx(mt,{data:r,className:u.CSS(s,u.CSS.dropRegion(ms(E,Pe.t.toArray(n)))),value:n,onDragStart:R,onDragEnd:S,onChange:t,searcher:m,columns:d,emptyContent:f,entryRenderKey:M,...b,...l})},K1=Object.freeze(Object.defineProperty({__proto__:null,AliasInput:vh,AliasProvider:Vl,LinePlot:$1,SelectMultiple:Z1,SelectSingle:$t,resolveIcon:Sc,useActiveRange:ir,useAlias:zl,useAliases:$s,useContext:cn,useName:Bs},Symbol.toStringTag,{value:"Module"})),Mt=({path:e,optional:t=!1,onChange:n,defaultValue:s})=>{const r=ft(),{get:i,bind:l,set:c,setStatus:a}=r,[d,x]=g.useState(()=>{const h=i(e,{optional:t||s!=null});return h!=null||s==null||t?h:{value:s,status:{key:"",variant:"success",message:""},touched:!1,required:!1}});g.useEffect(()=>(i(e,{optional:t||s!=null})==null&&s!=null&&c(e,s),x(i(e,{optional:t})),l({path:e,onChange:x,listenToChildren:!1})),[e,n,l,i,t,s]);const p=g.useCallback(h=>{n==null||n(h,{...r,path:e}),c(e,h)},[e,c,n]),m=g.useCallback(h=>a(e,h),[e,a]);if(d==null){if(!t)throw new Error(`Field state is null: ${e}`);return null}let f;return r.mode==="preview"&&(f="preview"),{onChange:p,setStatus:m,variant:f,...d}},Rc=(e,t=!1,n)=>{const{get:s,bind:r}=ft(n),[,i]=g.useState(0);return g.useEffect(()=>(i(l=>l+1),r({path:e,onChange:()=>i(l=>l+1)})),[e,r]),s(e,{optional:t})??null},Cc=(e,t=!1,n)=>{var l;const{get:s,bind:r}=ft(n),[,i]=g.useState(0);return g.useEffect(()=>(i(c=>c+1),r({path:e,onChange:()=>i(c=>c+1)})),[e,r]),((l=s(e,{optional:t}))==null?void 0:l.value)??null},W1=e=>{var t,n;return((n=(t=Rc(e,!0))==null?void 0:t.status)==null?void 0:n.variant)==="success"},Y1=({path:e,ctx:t,onChange:n})=>{const s=ft(t);g.useEffect(()=>s.bind({path:e,onChange:r=>n(r,s),listenToChildren:!1}),[e,s])},G1=({path:e,optional:t=!1})=>{const{bind:n,get:s}=ft(),[r,i]=g.useState(s(e,{optional:t}));if(g.useEffect(()=>(i(s(e,{optional:t})),n({path:e,onChange:l=>i({...l,value:u.vd(l.value)}),listenToChildren:!0})),[e,n,s]),r==null&&!t)throw new Error("Field state is null");return(r==null?void 0:r.value)??null},wc=(e,t)=>({add:(n,s)=>{const r=u.vd(e.get(t).value);r.splice(s,0,...Pe.t.toArray(n)),e.set(t,r,{validateChildren:!1})},push:(n,s)=>{const r=u.vd(e.get(t).value);r.push(...Pe.t.toArray(n)),s!=null&&r.sort(s),e.set(t,r,{validateChildren:!1})},remove:n=>{const s=e.get(t).value,r=new Set(Pe.t.toArray(n));e.set(t,s.filter((i,l)=>!r.has(l)))},keepOnly:n=>{const s=e.get(t).value,r=new Set(Pe.t.toArray(n));e.set(t,s.filter((i,l)=>r.has(l)))},set:n=>e.set(t,ce.executeSetter(n,e.get(t).value)),sort:n=>{const s=u.vd(e.get(t).value);s.sort(n),e.set(t,s)}}),q1=({path:e,updateOnChildren:t=!1,ctx:n})=>{const s=ft(n),{bind:r,get:i}=s,[l,c]=g.useState(i(e).value);return g.useEffect(()=>(c(i(e).value),r({path:e,onChange:a=>{c(u.vd(a.value))},listenToChildren:t})),[e,r,i,c]),g.useMemo(()=>({value:l,...wc(s,e)}),[l,s,e])},bc=g.createContext({mode:"normal",bind:()=>()=>{},set:()=>{},reset:()=>{},remove:()=>{},get:()=>({value:void 0,status:{key:"",variant:"success",message:""},touched:!1,required:!1}),validate:()=>!1,validateAsync:()=>Promise.resolve(!1),value:()=>({}),has:()=>!1,setStatus:()=>{},clearStatuses:()=>{},setCurrentStateAsInitialValues:()=>{}}),ft=e=>{const t=g.use(bc);return e??t},pi=e=>({key:e,variant:"success",message:""}),X1=e=>e.code===B.ZodIssueCode.custom&&e.params!=null&&"variant"in e.params?e.params.variant:"error",vc=({values:e,sync:t=!1,schema:n,mode:s="normal",onChange:r,onHasTouched:i})=>{const l=K.useInitializerRef(()=>({state:Be.J.copy(e),statuses:new Map,touched:new Set,listeners:new Map,parentListeners:new Map})),c=K.useSyncedRef(n),a=K.useSyncedRef(r),d=K.useSyncedRef(e),x=K.useSyncedRef(i),p=Ce.useErrorHandler(),m=g.useCallback(()=>{d.current=Be.J.copy(l.current.state),S()},[]),f=g.useCallback(({path:k,onChange:C,listenToChildren:P=!1})=>{var I;const{parentListeners:v,listeners:N}=l.current,D=P?v:N;return D.has(k)||D.set(k,new Set),(I=D.get(k))==null||I.add(C),()=>{var F;return(F=D.get(k))==null?void 0:F.delete(C)}},[]),h=g.useCallback((k,{optional:C}={optional:!1})=>{const{state:P,statuses:v,touched:N}=l.current,D=Be.J.get(P,k,{optional:C});if(D==null)return null;const I={value:D,status:v.get(k)??pi(k),touched:N.has(k),required:!1};if(c.current==null)return I;const F=c.current,H=Yf.getFieldSchema(F,k,{optional:!0});return H==null||"isOptional"in H&&typeof H.isOptional=="function"&&(I.required=!H.isOptional()),I},[]),j=g.useCallback(k=>{var N;const{touched:C}=l.current,P=C.size===0;C.add(k);const v=C.size===0;P!==v&&((N=x.current)==null||N.call(x,!v))},[]),y=g.useCallback(k=>{var N;const{touched:C}=l.current,P=C.size===0;C.delete(k);const v=C.size===0;P!==v&&((N=x.current)==null||N.call(x,!v))},[]),S=g.useCallback(()=>{var v;const{touched:k}=l.current,C=k.size===0;k.clear();const P=k.size===0;C!==P&&((v=x.current)==null||v.call(x,!P))},[]),b=g.useCallback(k=>{const{state:C,statuses:P,listeners:v,parentListeners:N}=l.current;Be.J.remove(C,k),P.delete(k),y(k),v.delete(k),N.delete(k)},[]),E=g.useCallback(k=>{const{statuses:C}=l.current;l.current.state=k??Be.J.copy(d.current),M(""),C.clear(),S()},[]),R=g.useCallback(k=>{var v;const{listeners:C}=l.current,P=h(k,{optional:!0});P!=null&&((v=C.get(k))==null||v.forEach(N=>N(P)))},[]),M=g.useCallback(k=>{const{listeners:C,parentListeners:P}=l.current,v=C.get(k);if(k==""&&([...C.keys()].forEach(I=>{var H;const F=h(I,{optional:!0});F!=null&&((H=C.get(I))==null||H.forEach(Z=>{Z(F)}))}),[...P.keys()].forEach(I=>{var H;const F=h(I,{optional:!0});F!=null&&((H=P.get(I))==null||H.forEach(Z=>{Z(F)}))})),v!=null){const N=h(k,{optional:!0});N!=null&&v.forEach(D=>{D(N)})}P.forEach((N,D)=>{if(Be.J.pathsMatch(k,D)){const F=h(D,{optional:!0});F!=null&&N.forEach(H=>{H(F)})}})},[]),_=g.useCallback((k,C="",P=!0)=>{const{statuses:v,listeners:N}=l.current;if(k.success){const H=[...v.keys()];return v.clear(),H.forEach(Z=>R(Z)),!0}let D=!0;const I=new Set(k.error.issues.map(H=>H.path.join(".")));let F=(H,Z)=>H===Z;return P&&(F=(H,Z)=>Be.J.pathsMatch(H,Z)),k.error.issues.forEach(H=>{var oe;const{message:Z}=H,ee=H.path.join(".");if(!F(ee,C))return;const te=X1(H);te!=="warning"&&(D=!1),v.set(ee,{key:ee,variant:te,message:Z}),j(ee);let se=h(ee,{optional:!0});se??(se={value:void 0,status:v.get(ee)??pi(ee),touched:!1,required:!1}),(oe=N.get(ee))==null||oe.forEach(xe=>xe(se))}),v.forEach((H,Z)=>{I.has(Z)||(v.delete(Z),R(Z))}),D},[]),L=g.useCallback((k,C)=>{if(c.current==null)return!0;const{state:P}=l.current,v=c.current.safeParse(P);return _(v,k,C)},[_]),A=g.useCallback(async(k,C)=>{if(c.current==null)return!0;const{state:P}=l.current,v=await c.current.safeParseAsync(P);return _(v,k,C)},[_]),$=g.useCallback((k,C,P={})=>{const v=Be.J.get(l.current.state,k,{optional:!0}),{validateChildren:N=!0}=P,{state:D}=l.current,I=Be.J.get(d.current,k,{optional:!0});Be.J.equal(I,C)?y(k):j(k),k.length===0?l.current.state=C:Be.J.set(D,k,C),M(k),p(async()=>{var Z;let H;try{H=L(k,N)}catch{H=await A(k,N)}(Z=a.current)==null||Z.call(a,{values:l.current.state,path:k,prev:v,valid:H})},"Failed to validate form")},[]),O=g.useCallback(k=>Be.J.has(l.current.state,k),[]),V=g.useCallback((k,C)=>{l.current.statuses.set(k,C),j(k),R(k)},[]),z=g.useCallback(()=>{const{statuses:k}=l.current;k.clear(),k.forEach((C,P)=>R(P))},[]);return g.useEffect(()=>{if(!t)return;const{listeners:k}=l.current;l.current.state=e,k.forEach((C,P)=>{const v=h(P,{optional:!0});v!=null&&C.forEach(N=>N(v))})},[t,e]),g.useMemo(()=>({bind:f,set:$,get:h,mode:s,validate:L,validateAsync:A,value:()=>l.current.state,has:O,remove:b,setStatus:V,clearStatuses:z,reset:E,setCurrentStateAsInitialValues:m}),[f,$,h,L,A,O,b,V,z,E,s,m])},U1=({children:e,...t})=>o.jsxRuntimeExports.jsx(bc,{value:t,children:e}),J1=fe.componentRenderProp(pt.Text),we=({path:e,children:t=J1,label:n,padHelpText:s=!0,visible:r=!0,hideIfNull:i=!1,optional:l,onChange:c,className:a,defaultValue:d,...x})=>{const p=Mt({path:e,optional:l??i,onChange:c,defaultValue:d}),m=ft();if(p==null)return null;if(e==null)throw new Error("No path provided to Form Field");if(n??(n=u.d$1.capitalize(Be.J.element(e,-1))),r=typeof r=="function"?r(p,m):r,!r)return null;const f=p.status.message,{onChange:h,value:j}=p,y={onChange:h,value:j};return p.variant!=null&&(y.variant=p.variant),o.jsxRuntimeExports.jsx(he.Item,{padHelpText:s,helpText:f,helpTextVariant:p.status.variant,label:n,required:p.required,className:u.CSS(a,u.CSS.BE("field",e.split(".").join("-")),u.CSS.M(p.status.variant)),...x,children:t(y)})},Pt=e=>({fieldKey:t,fieldProps:n,inputProps:s})=>{const r=({inputProps:i,path:l,fieldKey:c=t,optional:a,defaultValue:d,...x})=>o.jsxRuntimeExports.jsx(we,{...n,...x,defaultValue:d,optional:a,path:c?`${l}.${c}`:l,children:p=>o.jsxRuntimeExports.jsx(e,{...p,...s,...i})});return r.displayName=e.displayName,r},kc=Pt(he.Numeric),Ze=kc({}),Mc=Pt(pt.Text),gr=Mc({}),Pc=Pt(Q.Switch$1),Fs=Pc({}),Q1=Pt(mt),eg=Pt(an),tg=Pt(Os),_c=Pt(ot),jr=({key:e,open:t,onChange:n})=>{const s=Ae.useMemoPrimitiveArray(e);Q.useAsyncEffect(async()=>{if(t==null)return;const r=await t();if(r==null)return;const i=r.onChange(n);return async()=>{i(),await r.close()}},[t==null,s])},ng=({fetchInitialValue:e,...t})=>{const[n,s]=g.useState(void 0);return Q.useAsyncEffect(async()=>{s(await e())},[e]),jr({...t,onChange:s}),n},sg=Object.freeze(Object.defineProperty({__proto__:null,useListener:jr,useState:ng},Symbol.toStringTag,{value:"Module"})),og=({key:e,name:t,queryFn:n,values:s,openObservable:r,applyChanges:i,applyObservable:l,...c})=>{const a=qe(),d=Ce.useErrorHandler(),x=Ae.useMemoPrimitiveArray(e),p=vc({values:s,...c,sync:!1,onChange:h=>{a!=null&&d(async()=>{await(i==null?void 0:i({...h,client:a}))},`Failed to apply changes for ${t}`)}});Q.useAsyncEffect(async()=>{if(a!=null)try{const h=await n({client:a});p.set("",h)}catch(h){d(h,`Failed to retrieve ${t}`)}},[x,a==null?void 0:a.key]);const m=g.useCallback(async()=>{if(a!=null)return await(r==null?void 0:r(a))},[x,a==null?void 0:a.key]),f=g.useCallback(h=>l==null?void 0:l({changes:h,ctx:p}),[x,l]);return jr({key:x,open:m,onChange:f}),p},rg=Object.freeze(Object.defineProperty({__proto__:null,Field:we,Form:U1,NumericField:Ze,SwitchField:Fs,TextField:gr,buildButtonSelectField:_c,buildDropdownButtonSelectField:tg,buildNumericField:kc,buildSelectMultiField:eg,buildSelectSingleField:Q1,buildSwitchField:Pc,buildTextField:Mc,fieldArrayUtils:wc,fieldBuilder:Pt,use:vc,useChildFieldValues:G1,useContext:ft,useField:Mt,useFieldArray:q1,useFieldListener:Y1,useFieldState:Rc,useFieldValid:W1,useFieldValue:Cc,useSynced:og},Symbol.toStringTag,{value:"Module"})),ig=[{key:"name",name:"Name"},{key:"location",name:"Location",render:({entry:{location:e,rackName:t}})=>o.jsxRuntimeExports.jsx(Tl,{level:"small",shade:9,weight:450,style:{marginTop:"0.25rem"},size:"tiny",children:t?`${t}.${e}`:e})}],lg=({searchOptions:e,filter:t,...n})=>{const s=qe();let r=s==null?void 0:s.hardware.devices;e!=null&&s!=null&&(r=s.hardware.devices.newSearcherWithOptions(e));const[i,l]=g.useState(new Map),c=g.useCallback(a=>((t==null?void 0:t(a))??a).map(x=>({...x,rackName:i.get(x.rack)})),[t,i]);return Q.useAsyncEffect(async()=>{if(s==null){l(new Map);return}const a=await s.hardware.racks.retrieve([]);l(new Map(a.map(({key:d,name:x})=>[d,x])))},[s==null?void 0:s.key]),o.jsxRuntimeExports.jsx(mt,{columns:ig,searcher:r,entryRenderKey:"name",filter:c,...n})},cg=Object.freeze(Object.defineProperty({__proto__:null,SelectSingle:lg},Symbol.toStringTag,{value:"Module"})),ag=[{key:"name",name:"Name"},{key:"location",name:"Location"}],ug=e=>{const t=qe();return o.jsxRuntimeExports.jsx(mt,{columns:ag,searcher:t==null?void 0:t.hardware.racks,entryRenderKey:"name",...e})},dg=Object.freeze(Object.defineProperty({__proto__:null,SelectSingle:ug},Symbol.toStringTag,{value:"Module"})),Qt="label",Er=[{key:"color",name:"Color",render:({entry:e})=>o.jsxRuntimeExports.jsx(K.y4.Circle,{name:"circle",color:e.color,style:{height:"2.5rem",width:"2.5rem"}})},{key:"name",name:"Name"}],fs=({items:e},t)=>{const n=me.filterByType(Qt,e);return n.length>0&&!n.every(s=>t.includes(s.key))},xg=({entry:e,loading:t,entryKey:n,entryRenderKey:s,...r})=>o.jsxRuntimeExports.jsx(wn,{color:e==null?void 0:e.color,...r,children:e==null?void 0:e.name}),pg=fe.componentRenderProp(xg),mg=({onChange:e,className:t,value:n,...s})=>{const r=qe(),i=r!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:l,onDragEnd:c,...a}=me.useDragAndDrop({type:"Label.SelectMultiple",canDrop:g.useCallback(m=>fs(m,Pe.t.toArray(n)),[n]),onDrop:g.useCallback(({items:m})=>{const f=me.filterByType(Qt,m);if(f.length===0)return[];const h=u.c.unique([...Pe.t.toArray(n),...f.map(j=>j.key)]);return e(h,{clickedIndex:null,clicked:null,entries:[]}),f},[e,n])}),d=me.useDraggingState(),x=g.useCallback(({dropped:m})=>{e(Pe.t.toArray(n).filter(f=>!m.some(h=>h.key===f)),{clickedIndex:null,clicked:null,entries:[]})},[e,n]),p=g.useCallback((m,f)=>l([{key:f,type:Qt}],x),[l,x]);return o.jsxRuntimeExports.jsx(an,{className:u.CSS(t,u.CSS.dropRegion(fs(d,Pe.t.toArray(n)))),value:n,onTagDragStart:p,onTagDragEnd:c,searcher:r==null?void 0:r.labels,onChange:e,columns:Er,emptyContent:i,renderTag:pg,addPlaceholder:"Label",...a,...s})},Lc=({value:e,onChange:t})=>{const n=qe(),s=n!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),r=g.useId(),i=g.useMemo(()=>({key:r,type:"Label.SelectMultiple"}),[r]),l=me.useDragAndDrop({type:"Label.SelectSingle",canDrop:g.useCallback(d=>fs(d,Pe.t.toArray(e)),[e]),onDrop:g.useCallback(({items:d})=>{const x=me.filterByType(Qt,d);return x.length===0?[]:(t(x[0].key,{clickedIndex:null,clicked:null,entries:[]}),x)},[i,t])}),c=me.useDraggingState(),a=g.useCallback(()=>e!=null&&l.startDrag([{type:Qt,key:e}]),[l.startDrag,e]);return{emptyContent:s,dragging:c,...l,onDragStart:a,searcher:n==null?void 0:n.labels}},fg=({onChange:e,value:t,className:n,data:s,...r})=>{const{dragging:i,...l}=Lc({value:t,onChange:e});return o.jsxRuntimeExports.jsx(mt,{data:s,className:u.CSS(n,u.CSS.dropRegion(fs(i,Pe.t.toArray(t)))),value:t,onChange:e,columns:Er,entryRenderKey:"name",...l,...r})},hg=({data:e,value:t,onChange:n,...s})=>{const{dragging:r,...i}=Lc({value:t,onChange:n});return o.jsxRuntimeExports.jsx(mt,{data:e,value:t,onChange:n,columns:Er,entryRenderKey:"name",...i,...s})},gg=Object.freeze(Object.defineProperty({__proto__:null,HAUL_TYPE:Qt,SelectButton:hg,SelectMultiple:mg,SelectSingle:fg},Symbol.toStringTag,{value:"Module"})),Hs=new Error("Tab not found"),jg=new Error("Invalid Mosaic"),hs=(e,t,n="center",s,r)=>{if(e=rt(e),s===void 0)return Ao(e,t);const i=Io(e,s);if(n==="center")return i.tabs||(i.tabs=[]),r!==void 0&&r>=0&&r<=i.tabs.length?i.tabs.splice(r,0,t):i.tabs.push(t),i.selected=t.tabKey,e;const l=i.key*2,c=i.key*2+1,a=n==="top"||n==="left"?l:c;if(Io(e,a).key!==i.key)return hs(e,t,"center",a);if(i.tabs==null||i.tabs.length===0)return hs(e,t,"center",s);const[d,x,p]=wg(n);if(i.direction=p,i[d]={key:0,tabs:[t],selected:t.tabKey},i[x]={key:0,tabs:i.tabs,selected:i.selected},i.first==null||i.last==null)throw jg;return i.first.key=l,i.last.key=c,i.tabs=void 0,i.size=void 0,i.selected=void 0,e},Eg=(e,t,n)=>{var i;e=rt(e);const[s,r]=Bt(e,t);if(s==null||r==null)throw Hs;return r.tabs=(i=r.tabs)==null?void 0:i.map(l=>l.tabKey===t?n(l):l),e},Ao=(e,t)=>(e=rt(e),e.tabs!=null?(e.tabs.push(t),e.selected=t.tabKey,e):(e.first!=null?e.first=Ao(e.first,t):e.last!=null&&(e.last=Ao(e.last,t)),e)),gs=e=>{e=rt(e);const t=[];if(e.tabs!=null&&(e.selected=Te.resetSelection(e.selected,e.tabs),e.selected!=null&&t.push(e.selected)),e.first!=null){const[n,s]=gs(e.first);e.first=n,t.push(...s)}if(e.last!=null){const[n,s]=gs(e.last);e.last=n,t.push(...s)}return[e,t]},yr=(e,t)=>{var r;e=rt(e);const[,n]=Bt(e,t);if(n==null)return[e,null];n.tabs=(r=n.tabs)==null?void 0:r.filter(i=>i.tabKey!==t),n.selected=Te.resetSelection(n.selected,n.tabs),e=Cg(e);const s=n.selected??js(e);return[e,s]},js=e=>e.selected!=null?e.selected:e.first!=null?js(e.first):e.last!=null?js(e.last):null,Nc=(e,t)=>{e=rt(e);const[n,s]=Bt(e,t);if(n==null||s==null)throw Hs;return s.selected=t,e},Tc=(e,t,n,s,r)=>{e=rt(e);const[i,l]=Bt(e,t);if(i==null||l==null)throw Hs;const[c,a]=yr(e,t);return[hs(c,i,n,s,r),a]},bn=(e,t)=>{if(e.tabs!=null)return e.tabs.some(n=>n.tabKey===t)?e:void 0;if(e.first!=null){const n=bn(e.first,t);if(n!=null)return n}if(e.last!=null){const n=bn(e.last,t);if(n!=null)return n}},Ac=(e,t,n)=>{const s=Es(e,t);if(s==null)throw new Error("Node not found");return s.size=n,e},yg=(e,t,n)=>{e=rt(e);const s=bn(e,t);if(s==null)throw new Error("Tab not found");if(s.tabs==null||s.tabs.length===0)throw new Error("Node has no tabs");const r=s.tabs.findIndex(x=>x.tabKey===t);if(r===-1)throw new Error("Tab not found in node");const i=s.tabs[r];s.tabs=s.tabs.filter(x=>x.tabKey!==t);const l=s.key*2,a={key:s.key*2+1,tabs:[i],selected:i.tabKey},d={key:l,tabs:s.tabs,selected:s.selected};return d.selected=Te.resetSelection(d.selected,d.tabs),s.direction=n,s.first=d,s.last=a,s.tabs=void 0,s.selected=void 0,e},Sg=(e,t)=>{const n=bn(e,t);return n==null?!1:n.tabs!=null&&n.tabs.length>1},Ic=(e,t,n)=>{e=rt(e);const[,s]=Bt(e,t);if((s==null?void 0:s.tabs)==null)throw Hs;return s.tabs=Te.rename(t,n,(s==null?void 0:s.tabs)??[]),e},Rg=e=>e.tabs!=null?e.tabs.length===0:e.first==null&&e.last==null,Io=(e,t)=>{const n=Es(e,t);if(n!=null)return n;const s=Math.floor(t/2);return s===0?e:Io(e,s)},Cg=e=>{let t=!0;for(;t;)[e,t]=$o(e);return e=Do(e,1),e},$o=e=>{if(e.first==null||e.last==null)return[e,!1];if(fi(e.first))return[mi(e.last),!0];if(fi(e.last))return[mi(e.first),!0];let t,n;return[e.first,t]=$o(e.first),[e.last,n]=$o(e.last),[e,t||n]},mi=e=>(e.size=void 0,e),fi=e=>e.first==null&&e.last==null&&(e.tabs==null||e.tabs.length===0),Bt=(e,t)=>{if(e.tabs!=null){const l=e.tabs.find(c=>c.tabKey===t);if(l!=null)return[l,e]}if(e.first==null||e.last==null)return[void 0,void 0];const[n,s]=Bt(e.first,t);if(n!=null&&s!=null)return[n,s];const[r,i]=Bt(e.last,t);return[r,i]},Es=(e,t)=>{if(e.key===t)return e;if(e.first==null||e.last==null)return;const n=Es(e.first,t);return n??Es(e.last,t)},wg=e=>{switch(e){case"top":return["first","last","y"];case"left":return["first","last","x"];case"bottom":return["last","first","y"];case"right":return["last","first","x"];case"center":throw new Error("cannot split a center placed tab")}},rt=e=>Be.J.copy(e),ys=(e,t,n=[])=>(n.push(t(e)),e.first!=null&&ys(e.first,t,n),e.last!=null&&ys(e.last,t,n),n),Bo=(e,t)=>{t(e),e.first!=null&&Bo(e.first,t),e.last!=null&&Bo(e.last,t)},Do=(e,t)=>(e=rt(e),e.key=t,e.first!=null&&(e.first=Do(e.first,t*2)),e.last!=null&&(e.last=Do(e.last,t*2+1)),e);class $c{constructor(t={}){tt(this,"parent");tt(this,"stub");tt(this,"el");this.el=document.createElement("div"),Object.entries(t).forEach(([n,s])=>this.el.setAttribute(n,s))}mount(t,n){n!==this.stub&&(this.unmount(null),t.replaceChild(this.el,n),this.parent=t,this.stub=n)}unmount(t){t!=null&&t!==this.stub||this.parent==null||this.stub==null||(this.parent.replaceChild(this.stub,this.el),this.parent=void 0,this.stub=void 0)}}const bg=({node:e})=>{const t=g.createRef(),n=g.useRef(e);return g.useEffect(()=>{const s=t.current;if(s==null)return;const r=s.parentNode;if(r!=null)return e.mount(r,s),()=>{t.current!=null&&e.unmount(t.current)}},[]),g.useEffect(()=>{n.current!=null&&e!==n.current&&(n.current.unmount(t.current),n.current=e);const s=t.current;if(s==null)return;const r=s.parentNode;r!=null&&e.mount(r,s)},[e]),o.jsxRuntimeExports.jsx("div",{ref:t})},Bc=({node:e,children:t})=>kl.createPortal(t,e.el),vg=Object.freeze(Object.defineProperty({__proto__:null,In:Bc,Node:$c,Out:bg},Symbol.toStringTag,{value:"Module"})),Ss=g.memo(({root:e,onDrop:t,onResize:n,onCreate:s,onFileDrop:r,children:i,activeTab:l,emptyContent:c,onSelect:a,onClose:d,onRename:x,onReorder:p,contextMenu:m,addTooltip:f,...h})=>{const{tabs:j,direction:y,first:S,last:b,key:E,size:R}=e,M={onDrop:t,onResize:n,onCreate:s,onFileDrop:r,children:i,onClose:d,contextMenu:m,onSelect:a,onRename:x,onReorder:p,activeTab:l,addTooltip:f},_=g.useCallback(([O])=>n(E,O),[n]),{props:L}=sr({direction:y,onResize:_,count:2,initialSizes:R!=null?[R]:void 0});let A={};E==1&&(A={...h,className:u.CSS(u.CSS.B("mosaic"))});let $;return j!==void 0?$=o.jsxRuntimeExports.jsx(Dc,{root:e,emptyContent:c,...A,...M}):S!=null&&b!=null?$=o.jsxRuntimeExports.jsxs(or,{id:`mosaic-${E}`,align:"stretch",...L,...A,children:[o.jsxRuntimeExports.jsx(Ss,{...M,root:S,onResize:n},S.key),o.jsxRuntimeExports.jsx(Ss,{...M,root:b,onResize:n},b.key)]}):($=null,console.warn("Mosaic tree is malformed")),$});Ss.displayName="Mosaic";const Rs="pluto-mosaic-tab-drop",Sr="pluto-mosaic-tab-create",kg=(e,t,n)=>{if(me.filterByType(me.FILE_TYPE,t).length>0&&n)return!0;const r=me.filterByType(Rs,t).map(c=>c.key),i=e.filter(c=>!r.includes(c.tabKey)).length>0;return me.filterByType(Sr,t).length>0||r.length>0&&(i||e.length===0)},Dc=g.memo(({root:e,onDrop:t,onCreate:n,activeTab:s,children:r,className:i,onReorder:l,onFileDrop:c,addTooltip:a,...d})=>{const{key:x,tabs:p}=e,[m,f]=g.useState(null),h=c!=null,j=g.useCallback(({items:$})=>kg(p,$,h),[p,h]),y=g.useCallback(({items:$,event:O})=>{if(O==null)return[];const V=Pg(O);f(null);const z=me.filterByType(me.FILE_TYPE,$).length>0,{percents:k}=hi(O),C=p.length===0?"center":gi(k);if(z)return c==null||c(x,C,O),$;const P=me.filterByType(Rs,$);if(P.length>0){const N=P.map(({key:D})=>D)[0];t(x,N,C,V)}const v=me.filterByType(Sr,$);if(v.length>0){const N=v.map(({key:D})=>D);n==null||n(x,C,N)}return P},[t,p.length]),S=g.useCallback(({event:$})=>{if($==null)return;const{percents:O,inSelector:V}=hi($);let z=null;V||(z=p.length===0?"center":gi(O)),f(z)},[p.length]),{startDrag:b,...E}=me.useDragAndDrop({type:"Mosaic",canDrop:j,onDrop:y,onDragOver:S}),R=j(me.useDraggingState()),M=g.useCallback(()=>f(null),[]),_=g.useCallback(($,{tabKey:O})=>{b([{key:O,type:Rs,elementID:$.currentTarget.id}])},[b]),L=g.useCallback(()=>n==null?void 0:n(x,"center"),[x]),A=x==1&&p.length==0;return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:o.jsxRuntimeExports.jsxs(Te.Tabs,{id:`tab-${x}`,tabs:p,className:u.CSS(i,A&&m!=null&&u.CSS.M("drag-over")),onDragLeave:M,selected:e.selected,selectedAltColor:s===e.selected,onDragStart:_,onCreate:L,addTooltip:a,...E,...d,children:[e.selected!=null&&r(p.find($=>$.tabKey===e.selected)),R&&o.jsxRuntimeExports.jsx("div",{style:{zIndex:1e3,position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),m!=null&&o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("mosaic","mask"),style:Mg[m]})]})})});Dc.displayName="MosaicTabLeaf";const Mg={top:{left:"0%",top:"0%",width:"100%",height:"50%"},bottom:{left:"0%",top:"50%",width:"100%",height:"50%"},left:{left:"0%",top:"0%",width:"50%",height:"100%"},right:{left:"50%",top:"0%",width:"50%",height:"100%"},center:{left:"0%",top:"0%",width:"100%",height:"100%"}},hi=e=>{const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,s=e.clientY-t.top;return s<24?{percents:{x:.5,y:.5},inSelector:!0}:{percents:{x:n/t.width,y:s/t.height},inSelector:!1}},Pg=e=>{var n;const t=e.target.closest(".pluto-tabs-selector__btn");if(t!=null)return Array.from(((n=t.parentElement)==null?void 0:n.children)??[]).indexOf(t)},_g=e=>e,Lg=e=>1-e,gi=({x:e,y:t})=>{if(e>.33&&e<.66&&t>.33&&t<.66)return"center";const[n,s]=[_g(e),Lg(e)];if(t>n&&t>s)return"bottom";if(t<n&&t<s)return"top";if(t>n&&t<s)return"left";if(t<n&&t>s)return"right";throw new Error("[bug] - invalid insert position")},Ng=({root:e,onSelect:t,children:n})=>{const s=g.useRef(new Map),r=new Set,i=ys(e,l=>{var c;return(c=l.tabs)==null?void 0:c.map(a=>{let d=s.current.get(a.tabKey);return a==null?null:(d==null&&(d=new $c({style:"width: 100%; height: 100%; position: relative;"}),d.el.addEventListener("click",()=>t==null?void 0:t(a.tabKey)),s.current.set(a.tabKey,d)),r.add(a.tabKey),o.jsxRuntimeExports.jsx(Bc,{node:d,children:n({...a,visible:a.tabKey===l.selected})},a.tabKey))})}).flat().filter(l=>l!=null);return s.current.forEach((l,c)=>!r.has(c)&&s.current.delete(c)),[s,i]},Oo=ce.object({key:ce.number(),tabs:ce.array(Te.tabZ).optional(),selected:ce.string().optional(),direction:u.g.direction.optional(),size:ce.number().optional(),get first(){return Oo.optional()},get last(){return Oo.optional()}}),Tg=({allowRename:e=!1,initialTree:t})=>{const[n,s]=g.useState(t);return g.useEffect(()=>s(gs(t)[0]),[t]),{root:n,onDrop:(d,x,p)=>s(m=>Tc(m,x,p,d)[0]),onClose:d=>s(x=>yr(x,d)[0]),onSelect:d=>s(x=>Nc(x,d)),onResize:(d,x)=>s(p=>Ac(p,d,x)),onRename:e?(d,x)=>s(p=>Ic(p,d,x)):void 0}},Ag=Object.freeze(Object.defineProperty({__proto__:null,HAUL_CREATE_TYPE:Sr,HAUL_DROP_TYPE:Rs,Mosaic:Ss,autoSelectTabs:gs,canSplit:Sg,findSelected:js,findTabNode:bn,forEachNode:Bo,insertTab:hs,isEmpty:Rg,mapNodes:ys,moveTab:Tc,nodeZ:Oo,removeTab:yr,renameTab:Ic,resizeNode:Ac,selectTab:Nc,split:yg,updateTab:Eg,use:Tg,usePortal:Ng},Symbol.toStringTag,{value:"Module"})),Ig=({variant:e,className:t,...n})=>o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(t,u.CSS.B("note"),u.CSS.M(e)),align:"stretch",empty:!0,...n}),$g=Object.freeze(Object.defineProperty({__proto__:null,Note:Ig},Symbol.toStringTag,{value:"Module"})),ho={Close:o.jsxRuntimeExports.jsxs("svg",{width:"124",height:"124",viewBox:"0 0 124 124",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"88.3883",width:"87",height:"11",transform:"rotate(-45 26.8701 88.3883)",fill:"#7E0508"}),o.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"34.6482",width:"11",height:"87",transform:"rotate(-45 26.8701 34.6482)",fill:"#7E0508"})]}),Minimize:o.jsxRuntimeExports.jsx("svg",{width:"87",height:"11",viewBox:"0 0 87 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsxRuntimeExports.jsx("rect",{x:"15",width:"60",height:"11",fill:"#985712"})}),Maximize:o.jsxRuntimeExports.jsxs("svg",{width:"143",height:"143",viewBox:"0 0 143 143",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsxRuntimeExports.jsx("path",{d:"M108.242 32.8833C108.797 32.8817 109.247 33.3317 109.245 33.8862L109.092 87.5891C109.09 88.4786 108.014 88.9223 107.385 88.2933L53.8351 34.7432C53.2061 34.1142 53.6499 33.0387 54.5394 33.0361L108.242 32.8833Z",fill:"#0B650D"}),o.jsxRuntimeExports.jsx("path",{d:"M33.8862 109.245C33.3317 109.247 32.8818 108.797 32.8833 108.242L33.0361 54.5394C33.0387 53.6499 34.1142 53.2061 34.7432 53.8351L88.2934 107.385C88.9223 108.014 88.4786 109.09 87.5891 109.092L33.8862 109.245Z",fill:"#0B650D"})]})},Bg=({disabled:e=[],className:t,focused:n=!0,onMinimize:s,onMaximize:r,onFullscreen:i,onClose:l,...c})=>o.jsxRuntimeExports.jsxs(ne.Space,{size:1.5,x:!0,className:u.CSS(u.CSS.B("macos-controls"),!n&&u.CSS.BM("macos-controls","blurred"),t),...c,children:[o.jsxRuntimeExports.jsx(go,{onClick:l,className:u.CSS.BM("macos-control","close"),disabled:e.includes("close"),children:ho.Close}),o.jsxRuntimeExports.jsx(go,{onClick:s,className:u.CSS.BM("macos-control","minimize"),disabled:e.includes("minimize"),children:ho.Minimize}),o.jsxRuntimeExports.jsx(go,{onClick:i,className:u.CSS.BM("macos-control","maximize"),disabled:e.includes("maximize"),children:ho.Maximize})]}),go=({className:e,disabled:t,color:n,...s})=>o.jsxRuntimeExports.jsx("button",{className:u.CSS(u.CSS.B("macos-control"),u.CSS.disabled(t),e),tabIndex:-1,disabled:t,size:"",...s}),Dg=({disabled:e=[],onMinimize:t,onMaximize:n,onClose:s,onFullscreen:r,focused:i,shade:l=2,...c})=>o.jsxRuntimeExports.jsxs(Is.Pack,{...c,children:[o.jsxRuntimeExports.jsx(jo,{className:u.CSS.BM("windows-control","minimize"),onClick:t,disabled:e.includes("minimize"),shade:l,children:o.jsxRuntimeExports.jsx(K.y4.Subtract,{})}),o.jsxRuntimeExports.jsx(jo,{className:u.CSS.BM("windows-control","maximize"),onClick:n,disabled:e.includes("maximize"),shade:l,children:o.jsxRuntimeExports.jsx(K.y4.Box,{})}),o.jsxRuntimeExports.jsx(jo,{onClick:s,className:u.CSS.BM("windows-control","close"),disabled:e.includes("close"),shade:l,children:o.jsxRuntimeExports.jsx(K.y4.Close,{})})]}),jo=({disabled:e=!1,className:t,...n})=>e?null:o.jsxRuntimeExports.jsx(fe.Icon,{className:u.CSS(u.CSS.B("windows-control"),t),tabIndex:-1,...n}),Oc=u.S.getOS,Og="Windows",zg=({forceOS:e,visibleIfOS:t,...n})=>{const s=Oc({force:e,default:Og});if(t!=null&&t!==s)return null;const r=s==="macOS"?Bg:Dg;return o.jsxRuntimeExports.jsx(r,{...n})},Vg=Object.freeze(Object.defineProperty({__proto__:null,Controls:zg,use:Oc},Symbol.toStringTag,{value:"Module"})),Fg=(e,t)=>{const n=s=>o.jsxRuntimeExports.jsx(e,{...t,...s});return n.displayName=e.displayName,n},Hg=Object.freeze(Object.defineProperty({__proto__:null,createComponent:Fg},Symbol.toStringTag,{value:"Module"}));g.createContext({instrumentation:bt.C.NOOP});const Zg=({children:e,...t})=>{const{path:n}=Q.useUnidirectional({type:ps.Provider.TYPE,schema:ps.providerStateZ,state:t});return o.jsxRuntimeExports.jsx(Q.Composite,{path:n,children:e})},Kg="data:video/mp2t;base64,Ly8gQ29weXJpZ2h0IDIwMjUgU3lubmF4IExhYnMsIEluYy4KLy8KLy8gVXNlIG9mIHRoaXMgc29mdHdhcmUgaXMgZ292ZXJuZWQgYnkgdGhlIEJ1c2luZXNzIFNvdXJjZSBMaWNlbnNlIGluY2x1ZGVkIGluIHRoZSBmaWxlCi8vIGxpY2Vuc2VzL0JTTC50eHQuCi8vCi8vIEFzIG9mIHRoZSBDaGFuZ2UgRGF0ZSBzcGVjaWZpZWQgaW4gdGhhdCBmaWxlLCBpbiBhY2NvcmRhbmNlIHdpdGggdGhlIEJ1c2luZXNzIFNvdXJjZQovLyBMaWNlbnNlLCB1c2Ugb2YgdGhpcyBzb2Z0d2FyZSB3aWxsIGJlIGdvdmVybmVkIGJ5IHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAsCi8vIGluY2x1ZGVkIGluIHRoZSBmaWxlIGxpY2Vuc2VzL0FQTC50eHQuCgppbXBvcnQgeyBwbHV0byB9IGZyb20gIkAvcGx1dG8vYWV0aGVyIjsKCnBsdXRvLnJlbmRlcigpOwo=",zc=({children:e})=>{const{path:t}=Q.useUnidirectional({type:B.BaseProvider.TYPE,schema:B.providerStateZ$1,state:{}});return o.jsxRuntimeExports.jsx(Q.Composite,{path:t,children:e})},Wg=Object.freeze(Object.defineProperty({__proto__:null,Provider:zc},Symbol.toStringTag,{value:"Module"})),Yg=Object.freeze(Object.defineProperty({__proto__:null,AcquireChannelControl:B.AcquireChannelControl,AuthoritySource:B.AuthoritySource,Chip:B.Chip,Controller:B.Controller,Indicator:B.Indicator,Legend:B.Legend,REGISTRY:B.REGISTRY$15,STATUSES:B.STATUSES,SetChannelValue:B.SetChannelValue,StateProvider:B.StateProvider,acquireChannelControl:B.acquireChannelControl,acquireChannelControlPropsZ:B.acquireChannelControlPropsZ,authoritySource:B.authoritySource,authoritySourceProps:B.authoritySourceProps,chipStateZ:B.chipStateZ,controllerStateZ:B.controllerStateZ,indicatorStateZ:B.indicatorStateZ,legendStateZ:B.legendStateZ,setChannelValue:B.setChannelValue,setChannelValuePropsZ:B.setChannelValuePropsZ,stateProviderStateZ:B.stateProviderStateZ,statusZ:B.statusZ,sugaredStateZ:B.sugaredStateZ},Symbol.toStringTag,{value:"Module"})),Gg=e=>{var t,n;switch(e.variant){case"disabled":return((t=e.data)==null?void 0:t.valid)===!0?{message:"Uncontrolled. Click to take control.",chipColor:"var(--pluto-gray-l12)"}:{message:"No channel connected. This element cannot be controlled.",chipColor:"var(--pluto-gray-l7)",disabled:!0};case"error":return{message:"Not controlled by you. Click to take absolute control.",chipColor:"var(--pluto-error-z)"};case"success":return((n=e.data)==null?void 0:n.authority)===bt.dq.ABSOLUTE_AUTHORITY?{message:"You have absolute control. Click to release.",chipColor:"var(--pluto-secondary-z)",buttonStyle:{background:"var(--pluto-secondary-z-30)"}}:{message:"You're in control. Release schematic to release control.",chipColor:"var(--pluto-primary-z)"};default:return{message:"Unexpected status.",chipColor:"var(--pluto-error-z)"}}},Vc=({source:e,sink:t,className:n,...s})=>{const r=Ae.useMemoDeepEqualProps({source:e,sink:t}),[,{status:i},l]=Q.use$1({type:B.Chip.TYPE,schema:B.chipStateZ,initialState:{triggered:!1,...r,status:{key:"no_chip",variant:"disabled",message:"No chip connected.",time:u.d.now()}}});g.useEffect(()=>{l(m=>({...m,...r}))},[r,l]);const c=g.useCallback(()=>l(m=>({...m,triggered:!m.triggered})),[l]),{message:a,chipColor:d,buttonStyle:x,disabled:p}=Gg(i);return o.jsxRuntimeExports.jsx(fe.Icon,{variant:"text",className:u.CSS(u.CSS.B("control-chip"),n),disabled:p,onClick:c,tooltip:o.jsxRuntimeExports.jsx(K.Text,{level:"small",children:a}),style:x,...s,children:o.jsxRuntimeExports.jsx(K.y4.Circle,{color:d})})},Fc=g.createContext({needsControlOf:[]}),Hc=()=>g.use(Fc),qg=({children:e,onStatusChange:t,...n})=>{const s=Ae.useMemoDeepEqualProps(n),[{path:r},{status:i,needsControlOf:l},c]=Q.use$1({type:B.Controller.TYPE,schema:B.controllerStateZ,initialState:s});return g.useEffect(()=>{i!=null&&(t==null||t(i))},[i,t]),g.useEffect(()=>{c(a=>({...a,...s}))},[s,c]),g.useEffect(()=>()=>t==null?void 0:t("released"),[]),o.jsxRuntimeExports.jsxs(Fc,{value:{needsControlOf:l},children:[o.jsxRuntimeExports.jsx(Q.Composite,{path:r,children:e}),";"]})},Zc=({colorSource:e,statusSource:t})=>{var c;const n=Ae.useMemoDeepEqualProps({colorSource:e,statusSource:t}),[,{color:s,status:r},i]=Q.use$1({type:B.Indicator.TYPE,initialState:{...n,status:{key:"no_chip",variant:"warning",message:"No chip connected.",time:u.d.now()}},schema:B.indicatorStateZ});g.useEffect(()=>{i(a=>({...a,...n}))},[n,i]);let l;return((c=r.data)==null?void 0:c.color)!=null?l=u.od.colorZ.parse(r.data.color):s!=null&&!u.od.isZero(s)?l=s:l="var(--pluto-gray-l10)",o.jsxRuntimeExports.jsxs(fe.Dialog,{location:{x:"center",y:"bottom"},children:[o.jsxRuntimeExports.jsx(K.Text,{level:"p",children:r.message}),o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("indicator"),style:{backgroundColor:u.od.cssString(l),flexGrow:1}})]})},Xg=e=>{const{needsControlOf:t}=Hc(),[,{states:n},s]=Q.use$1({type:B.Legend.TYPE,schema:B.legendStateZ,initialState:{states:[],needsControlOf:t}});g.useEffect(()=>{s(l=>({...l,needsControlOf:t}))},[t]);const i=u.c.unique(n.map(l=>l.subject.key)).map(l=>{const c=n.find(a=>a.subject.key===l);if(c==null)throw new bt.ti("Legend subject not found");return{key:c.subject.key,label:c.subject.name,color:c.subjectColor}});return o.jsxRuntimeExports.jsx(ar,{data:i,...e})},Kc=({children:e})=>{const[{path:t}]=Q.use$1({type:B.StateProvider.TYPE,schema:B.stateProviderStateZ,initialState:{}});return o.jsxRuntimeExports.jsx(Q.Composite,{path:t,children:e})},Ug=Object.freeze(Object.defineProperty({__proto__:null,Chip:Vc,Controller:qg,Indicator:Zc,Legend:Xg,StateProvider:Kc,useContext:Hc},Symbol.toStringTag,{value:"Module"})),Wc=e=>{const t=({disabled:n=!1,...s})=>n?s.children:o.jsxRuntimeExports.jsx(e,{...s});return t.displayName=e.displayName,t},Jg=Wc(zc),Qg=Wc(Q.Provider$2),e0=({children:e,connParams:t,workerEnabled:n=!0,workerURL:s,theming:r,tooltip:i,triggers:l,alamos:c,haul:a,channelAlias:d,telem:x,color:p})=>o.jsxRuntimeExports.jsx(De.Provider,{...l,children:o.jsxRuntimeExports.jsx(fe.Config,{...i,children:o.jsxRuntimeExports.jsx(me.Provider,{...a,children:o.jsxRuntimeExports.jsx(Q.Provider$1,{url:s??Kg,enabled:n,children:o.jsxRuntimeExports.jsx(Qg,{workerKey:"vis",children:o.jsxRuntimeExports.jsx(Zg,{...c,children:o.jsxRuntimeExports.jsx(Ce.Aggregator,{children:o.jsxRuntimeExports.jsx(Dl,{connParams:t,children:o.jsxRuntimeExports.jsx(Vl,{...d,children:o.jsxRuntimeExports.jsx(Ge.Provider,{...p,children:o.jsxRuntimeExports.jsx(Q.Provider,{...r,children:o.jsxRuntimeExports.jsx(Jg,{...x,children:o.jsxRuntimeExports.jsx(Kc,{children:e})})})})})})})})})})})})}),t0=Object.freeze(Object.defineProperty({__proto__:null,Provider:e0},Symbol.toStringTag,{value:"Module"})),n0=({value:e})=>o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("progress"),children:o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("progress-bar"),style:{width:`${e}%`}})}),s0=Object.freeze(Object.defineProperty({__proto__:null,Progress:n0},Symbol.toStringTag,{value:"Module"})),vn="range",Rr=[{key:"name",name:"Name"}],Cs=({items:e},t)=>{const n=me.filterByType(vn,e);return n.length>0&&!n.every(s=>t.includes(s.key))},o0=({onChange:e,className:t,value:n,...s})=>{const r=qe(),i=r!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:l,onDragEnd:c,...a}=me.useDragAndDrop({type:"Ranger.SelectMultiple",canDrop:g.useCallback(m=>Cs(m,Pe.t.toArray(n)),[n]),onDrop:g.useCallback(({items:m})=>{const f=me.filterByType(vn,m);if(f.length===0)return[];const h=u.c.unique([...Pe.t.toArray(n),...f.map(j=>j.key)]);return e(h,{clickedIndex:null,clicked:null,entries:[]}),f},[e,n])}),d=me.useDraggingState(),x=g.useCallback(({dropped:m})=>{e(Pe.t.toArray(n).filter(f=>!m.some(h=>h.key===f)),{clickedIndex:null,clicked:null,entries:[]})},[e,n]),p=g.useCallback((m,f)=>l([{key:f,type:vn}],x),[l,x]);return o.jsxRuntimeExports.jsx(an,{className:u.CSS(t,u.CSS.dropRegion(Cs(d,Pe.t.toArray(n)))),value:n,onTagDragStart:p,onTagDragEnd:c,searcher:r==null?void 0:r.ranges,onChange:e,columns:Rr,emptyContent:i,entryRenderKey:"name",...a,...s})},Yc=({value:e,onChange:t})=>{const n=qe(),s=n!=null?void 0:o.jsxRuntimeExports.jsx(Ce.Text.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),r=g.useId(),i=g.useMemo(()=>({key:r,type:"Ranger.SelectMultiple"}),[r]),{startDrag:l,...c}=me.useDragAndDrop({type:"Ranger.SelectSingle",canDrop:g.useCallback(x=>Cs(x,Pe.t.toArray(e)),[e]),onDrop:g.useCallback(({items:x})=>{const p=me.filterByType(vn,x);return p.length===0?[]:(t(p[0].key,{clickedIndex:null,clicked:null,entries:[]}),p)},[i,t])}),a=me.useDraggingState(),d=g.useCallback(()=>e!=null&&l([{type:vn,key:e}]),[l,e]);return{emptyContent:s,dragging:a,...c,onDragStart:d,searcher:n==null?void 0:n.ranges}},r0=({onChange:e,value:t,className:n,data:s,...r})=>{const{dragging:i,...l}=Yc({value:t,onChange:e});return o.jsxRuntimeExports.jsx(mt,{data:s,className:u.CSS(n,u.CSS.dropRegion(Cs(i,Pe.t.toArray(t)))),value:t,onChange:e,columns:Rr,entryRenderKey:"name",...l,...r})},i0=({data:e,value:t,onChange:n,...s})=>{const{dragging:r,...i}=Yc({value:t,onChange:n});return o.jsxRuntimeExports.jsx(mt,{data:e,value:t,onChange:n,columns:Rr,entryRenderKey:"name",...i,...s})},l0=[{key:"color",name:"Color",width:50,render:e=>o.jsxRuntimeExports.jsx(K.y4.Circle,{style:{fontSize:10,marginLeft:10,marginRight:30},color:e.entry.color})},{key:"name",name:"Name"}],c0=e=>{const t=qe();return o.jsxRuntimeExports.jsx(an,{...e,searcher:t==null?void 0:t.labels,columns:l0,renderTag:n=>n.entry==null?o.jsxRuntimeExports.jsx(wn,{color:"gray",children:n.entryKey}):o.jsxRuntimeExports.jsx(wn,{color:n.entry.color,children:n.entry.name})})},a0=({timeRange:e,level:t="p",shade:n=9,showSpan:s=!1,labeled:r=!1,...i})=>{const l=new u.d(e.start),c=l.isToday?"time":"dateTime",a=new u.d(e.end),d=a.equals(u.d.MAX),x=a.span(l)<u.g$2.DAY?"time":"dateTime",p=l.span(a);let m=o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",size:"small",children:[l.isToday&&o.jsxRuntimeExports.jsx(K.Text,{level:t,shade:n,weight:450,children:"Today"}),o.jsxRuntimeExports.jsx(_o.DateTime,{level:t,displayTZ:"local",format:c,shade:n,weight:450,children:l})]}),f=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[d?o.jsxRuntimeExports.jsx(K.Text,{level:t,children:"Now"}):o.jsxRuntimeExports.jsx(_o.DateTime,{level:t,displayTZ:"local",format:x,shade:n,weight:450,children:a}),!p.isZero&&s&&o.jsxRuntimeExports.jsxs(K.Text,{level:t,shade:n,weight:450,children:["(",l.span(a).truncate(u.g$2.MILLISECOND).toString(),")"]})]});r&&(m=o.jsxRuntimeExports.jsx(he.Item,{label:"Start",showHelpText:!1,children:m}),f=o.jsxRuntimeExports.jsx(he.Item,{label:"End",showHelpText:!1,children:f}));const h=u.CSS.levelSizeVar(t);return o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,size:"small",className:u.CSS(u.CSS.B("time-range-chip")),align:"center",...i,children:[m,o.jsxRuntimeExports.jsx(K.y4.Arrow.Right,{color:"var(--pluto-gray-l9)",style:{width:h,height:h}}),f]})},u0=Object.freeze(Object.defineProperty({__proto__:null,SelectButton:i0,SelectLabels:c0,SelectMultiple:o0,SelectSingle:r0,TimeRangeChip:a0},Symbol.toStringTag,{value:"Module"})),d0=({steps:e,value:t,onChange:n,...s})=>{const r=e.findIndex(i=>i.key===t);return o.jsxRuntimeExports.jsx(ne.Space,{x:!0,align:"center",className:u.CSS.B("steps"),...s,children:e.map((i,l)=>o.jsxRuntimeExports.jsxs(g.Fragment,{children:[o.jsxRuntimeExports.jsxs(fe.Button,{onClick:()=>n(i.key),variant:"outlined",disabled:l>r,children:[l+1,". ",i.title]},i.key),l!==e.length-1&&o.jsxRuntimeExports.jsx(K.y4.Arrow.Right,{style:{fontSize:"15px",color:"var(--pluto-gray-l10)"}})]},i.key))})},x0=Object.freeze(Object.defineProperty({__proto__:null,Steps:d0},Symbol.toStringTag,{value:"Module"})),p0=({children:e,className:t,visible:n,...s})=>{const[{path:r},,i]=Q.use$1({type:B.Table.TYPE,schema:B.Table.stateZ,initialState:{region:u.Pt.ZERO,visible:n}});g.useEffect(()=>{i(c=>({...c,visible:n}))},[n]);const l=In(c=>i(a=>({...a,region:c})));return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{ref:l,style:{right:0,bottom:0,position:"absolute",top:6,left:6}}),o.jsxRuntimeExports.jsx("table",{className:u.CSS(u.CSS.B("table"),t),...s,children:o.jsxRuntimeExports.jsx("tbody",{children:o.jsxRuntimeExports.jsx(Q.Composite,{path:r,children:e})})})]})},m0=({children:e,className:t,size:n,index:s,onResize:r,onSelect:i,position:l,...c})=>o.jsxRuntimeExports.jsxs("tr",{className:u.CSS(u.CSS.BE("table","row"),t),...c,children:[r!=null&&o.jsxRuntimeExports.jsx(qc,{onSelect:i,index:s,value:n,onChange:r,position:l,direction:"y"}),e]}),Cr=({ref:e,children:t,className:n,selected:s=!1,...r})=>o.jsxRuntimeExports.jsx("td",{ref:e,...r,className:u.CSS(u.CSS.BE("table","cell"),u.CSS.selected(s),n),children:t}),Gc="ABCDEFGHIJKLMNOPQRSTUVWXYZ",f0=e=>Gc[e],qc=({value:e,selected:t=!1,index:n,onChange:s,position:r,direction:i="x",onSelect:l})=>{const c=K.useSyncedRef(e),a=g.useRef(e),d=Ge.useCursorDrag({onStart:g.useCallback(()=>{a.current=c.current},[]),onMove:g.useCallback(x=>s(a.current+u.Pt.dim(x,i,!0),n),[s,n])});return o.jsxRuntimeExports.jsxs("td",{id:`resizer-${i}-${n}`,className:u.CSS(u.CSS.BE("table","resizer"),u.CSS.dir(i),u.CSS.selected(t),vt.CONTEXT_TARGET,t&&vt.CONTEXT_SELECTED),style:{[u.g.dimension(i)]:e},onClick:()=>l(n),onContextMenu:()=>l(n),children:[o.jsxRuntimeExports.jsx(K.Text,{level:"p",shade:11,style:{width:"100%",textAlign:"center"},children:i==="x"?Gc[n]:n+1}),o.jsxRuntimeExports.jsx("button",{onClick:x=>x.stopPropagation(),style:{[u.g.location(i)]:r+e},onDragStart:d,draggable:!0})]})},h0=({selected:e,onSelect:t,columns:n,onResize:s})=>{let r=15;return o.jsxRuntimeExports.jsxs("tr",{className:u.CSS(u.CSS.BE("table","row"),u.CSS.BE("table","col-resizer")),children:[o.jsxRuntimeExports.jsx("td",{}),n.map((i,l)=>{const c=r;return r+=i,o.jsxRuntimeExports.jsx(qc,{onSelect:t,position:c,selected:e.includes(l),index:l,value:i,onChange:a=>s(a,l),direction:"x"},l)})]})},g0=Object.freeze(Object.defineProperty({__proto__:null,Cell:Cr,ColumnIndicators:h0,Row:m0,Table:p0,getCellColumn:f0},Symbol.toStringTag,{value:"Module"})),j0=[{key:"standard",name:"Standard"},{key:"scientific",name:"Scientific"},{key:"engineering",name:"Engineering"}],E0=e=>o.jsxRuntimeExports.jsx(ot,{...e,entryRenderKey:"name",data:j0}),Xc=[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],wr=({path:e})=>{var f;const{value:t,onChange:n}=Mt({path:e}),s=B.sourcePipelinePropsZ.parse((f=t.telem)==null?void 0:f.props),r=B.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=B.stringifyNumberProps.parse(s.segments.stringifier.props),l=B.rollingAverageProps.parse(s.segments.rollingAverage.props),c=h=>{const j=B.sourcePipeline("string",{connections:Xc,segments:{valueStream:B.streamChannelValue({channel:r.channel}),stringifier:B.stringifyNumber({precision:i.precision??2,notation:i.notation}),rollingAverage:B.rollingAverage({windowSize:l.windowSize??1}),...h},outlet:"stringifier"});n({...t,telem:j})},a=h=>c({valueStream:B.streamChannelValue({channel:h??0})}),d=h=>c({stringifier:B.stringifyNumber({...i,notation:h})}),x=h=>c({stringifier:B.stringifyNumber({...i,precision:h})}),p=h=>c({rollingAverage:B.rollingAverage({windowSize:h})}),m=Bs(r.channel);return g.useEffect(()=>n({...t,tooltip:[m]}),[m]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(he.Item,{label:"Input Channel",grow:!0,children:o.jsxRuntimeExports.jsx($t,{value:r.channel,onChange:a})}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(he.Item,{label:"Notation",children:o.jsxRuntimeExports.jsx(E0,{value:i.notation,onChange:d})}),o.jsxRuntimeExports.jsx(he.Item,{label:"Precision",align:"start",children:o.jsxRuntimeExports.jsx(he.Numeric,{value:i.precision??2,bounds:{lower:0,upper:10},onChange:x})}),o.jsxRuntimeExports.jsx(he.Item,{label:"Averaging Window",align:"start",children:o.jsxRuntimeExports.jsx(he.Numeric,{value:l.windowSize??1,bounds:{lower:1,upper:100},onChange:p})})]})]})},y0=B.Value.z.partial({color:!0}).extend({level:ce.levelZ.optional()}),br=({aetherKey:e,box:t,telem:n,color:s,precision:r,minWidth:i,level:l="small",backgroundTelem:c,notation:a,location:d})=>{const x=Ae.useMemoDeepEqualProps({box:t,telem:n,color:s,precision:r,level:l,minWidth:i,notation:a,backgroundTelem:c,location:d}),[,p,m]=Q.use$1({aetherKey:e,type:B.Value.TYPE,schema:B.Value.z,initialState:x});return g.useEffect(()=>m(f=>({...f,...x})),[x]),{width:p.width??p.minWidth}},S0=Object.freeze(Object.defineProperty({__proto__:null,TelemForm:wr,VALUE_CONNECTIONS:Xc,corePropsZ:y0,use:br},Symbol.toStringTag,{value:"Module"})),R0=ce.object({value:ce.string(),level:ce.levelZ,weight:ce.weightZ,align:u.K$1.x.or(u.K$1.center),backgroundColor:u.od.crudeZ}),C0=({cellKey:e,onChange:t,value:n,selected:s,onSelect:r,align:i,level:l,weight:c,backgroundColor:a})=>{const d=p=>r(e,p),x=p=>t({level:l,value:p,weight:c,align:i,backgroundColor:a});return o.jsxRuntimeExports.jsx(Cr,{id:e,className:u.CSS(vt.CONTEXT_TARGET,s&&vt.CONTEXT_SELECTED,u.CSS.BEM("table","cell","text")),selected:s,onClick:d,onContextMenu:d,style:{backgroundColor:u.od.cssString(a)},children:o.jsxRuntimeExports.jsx(K.Editable,{level:l,value:n,weight:c,onChange:x,style:{justifyContent:i},allowEmpty:!0,outline:!1})})},w0=ce.object({telem:B.stringSourceSpecZ,redline:ce.object({bounds:u.G.bounds,gradient:u.od.gradientZ}),level:ce.levelZ,color:ce.string(),units:ce.string()}),b0=({cellKey:e,telem:t,level:n,color:s,redline:{gradient:r,bounds:i},selected:l,box:c,onSelect:a})=>{const{width:d}=br({aetherKey:e,box:c,telem:t,level:n,color:s,backgroundTelem:B.sourcePipeline("color",{connections:[{from:"source",to:"scale"},{from:"scale",to:"gradient"}],segments:{source:t,scale:B.scaleNumber({scale:u.A.Scale.scale(i).scale(0,1).transform}),gradient:B.colorGradient({gradient:r})},outlet:"gradient"}),location:{x:"center",y:"center"}}),x=p=>a(e,p);return o.jsxRuntimeExports.jsx(Cr,{id:e,selected:l,onClick:x,onContextMenu:x,style:{height:"5rem",width:d},className:u.CSS(vt.CONTEXT_TARGET,l&&vt.CONTEXT_SELECTED,u.CSS.BEM("table","cell","value"))})},v0=({onVariantChange:e})=>{const t=g.useCallback(({tabKey:s})=>{switch(s){case"telem":return o.jsxRuntimeExports.jsx(ne.Space,{y:!0,style:{padding:"2rem"},children:o.jsxRuntimeExports.jsx(wr,{path:""})});case"redline":return o.jsxRuntimeExports.jsx(ne.Space,{y:!0,style:{padding:"2rem"},children:o.jsxRuntimeExports.jsx(k0,{})});default:return o.jsxRuntimeExports.jsx(ne.Space,{y:!0,grow:!0,empty:!0,style:{padding:"2rem"},children:o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(he.Item,{label:"Variant",padHelpText:!1,children:o.jsxRuntimeExports.jsx(Uc,{onChange:e,value:"value"})}),o.jsxRuntimeExports.jsx(we,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,path:"color",children:({value:r,onChange:i,variant:l,...c})=>o.jsxRuntimeExports.jsx(Ge.Swatch,{value:r??u.od.setAlpha(u.od.ZERO,1),onChange:i,...c,bordered:!0})}),o.jsxRuntimeExports.jsx(we,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:r=>o.jsxRuntimeExports.jsx(un,{...r})})]})})}},[]),n=Te.useStatic({tabs:[{tabKey:"style",name:"Style"},{tabKey:"telem",name:"Telemetry"},{tabKey:"redline",name:"Redline"}],content:t});return o.jsxRuntimeExports.jsx(Te.Tabs,{...n})},k0=()=>{const{set:e,get:t}=ft(),n=Cc("redline.bounds"),s=u.A.Scale.scale(0,1).scale(n);return o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(Ze,{inputProps:{size:"small",showDragHandle:!1},style:{width:60},label:"Lower",path:"redline.bounds.lower"}),o.jsxRuntimeExports.jsx(we,{path:"redline.gradient",label:"Gradient",align:"start",padHelpText:!1,children:({value:r,onChange:i})=>o.jsxRuntimeExports.jsx(Ge.GradientPicker,{value:Be.J.copy(r),scale:s,onChange:l=>{const a={...t("redline.bounds").value},d=l.map(j=>j.position),x=s.pos(Math.max(...d)),p=s.pos(Math.min(...d)),m=x>a.upper,f=p<a.lower;m&&(l[l.length-1].position=1,a.upper=x),f&&(l[0].position=0,a.lower=p);const h=l.map(j=>({...j,color:u.od.hex(j.color)}));m||f?e("redline",{bounds:a,gradient:h}):i(l.map(j=>({...j,color:u.od.hex(j.color)})))}})}),o.jsxRuntimeExports.jsx(Ze,{inputProps:{size:"small",showDragHandle:!1},style:{width:60},label:"Upper",path:"redline.bounds.upper"})]})},M0=({onVariantChange:e})=>o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,style:{padding:"2rem"},children:[o.jsxRuntimeExports.jsx(he.Item,{label:"Variant",padHelpText:!1,children:o.jsxRuntimeExports.jsx(Uc,{onChange:e,value:"text"})}),o.jsxRuntimeExports.jsx(gr,{path:"value",label:"Text"}),o.jsxRuntimeExports.jsx(we,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(un,{...t})}),o.jsxRuntimeExports.jsx(we,{path:"weight",label:"Weight",padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(ac,{...t})}),o.jsxRuntimeExports.jsx(we,{path:"align",label:"Alignment",hideIfNull:!0,children:t=>o.jsxRuntimeExports.jsx(zs,{...t})}),o.jsxRuntimeExports.jsx(we,{path:"backgroundColor",label:"Background",align:"start",padHelpText:!1,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(Ge.Swatch,{value:t,onChange:n})})]}),P0=[{key:"text",name:"Text"},{key:"value",name:"Value"}],Uc=e=>o.jsxRuntimeExports.jsx(ot,{...e,data:P0,allowMultiple:!1,entryRenderKey:"name"}),_0=["text","value"],L0=ce._enum(_0),N0={key:"value",name:"Value",Form:v0,Cell:b0,defaultProps:e=>({telem:B.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:B.streamChannelValue({channel:0}),rollingAverage:B.rollingAverage({windowSize:1}),stringifier:B.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"}),redline:{bounds:{lower:0,upper:1},gradient:[]},color:u.od.hex(e.colors.gray.l10),level:"h5",units:""}),schema:w0},T0={key:"text",name:"Text",Form:M0,Cell:C0,defaultProps:()=>({value:"",level:"h5",units:"",weight:400,align:"center",backgroundColor:"#00000000"}),schema:R0},A0={text:T0,value:N0},I0=Object.freeze(Object.defineProperty({__proto__:null,CELLS:A0,variantZ:L0},Symbol.toStringTag,{value:"Module"})),ji=({sourcePos:e,targetPos:t,next:n,prev:s})=>{const r=Nt(e,...n);return u.K.distance(r,t)<1?!0:(console.warn("Connector is out of sync with target"),console.log("Theoretical target",r),console.log("Actual target",t),console.log("Segments",n),console.log("Prev segments",s),!1)},Ei=({sourceStumpTip:e,sourceOrientation:t,sourceBox:n,targetStumpTip:s,targetOrientation:r,targetBox:i})=>{if(!$0({sourcePos:e,sourceOrientation:t,targetPos:s}))return;const l=u.g.construct(t),c=u.g.swap(l);let a=At(c,s[c]-e[c]);const d=u.Pt.loc(n,a);if(u.K$1.swap(t)===r){const x=u.Pt.loc(i,u.K$1.swap(a));Math.abs(d-x)<Fe&&(a=u.K$1.swap(a))}return{direction:c,length:d-e[c]+Dt(a,Fe)}},zo=ce.object({direction:u.g.direction,length:ce.number()}),Nt=(e,...t)=>{let n=e;for(const s of t)n=u.K.translate(n,s.direction,s.length);return n},Jc=(e,t,n,s)=>{try{let r=e;const i=[e,...t.map(f=>(r=u.K.translate(r,f.direction,f.length),r))];if(!s)return i;const l=t[0],c=At(l.direction,l.length),a=yi(c),d=4*(2-n**.5);i[0]=u.K.translate(i[0],{[l.direction]:-1*a*d,[u.g.swap(l.direction)]:0});const x=t[t.length-1],p=At(x.direction,x.length),m=yi(p);return i[i.length-1]=u.K.translate(i[i.length-1],{[x.direction]:m*d,[u.g.swap(x.direction)]:0}),i}catch{return[]}},Fe=10,yi=e=>e==="top"||e==="left"?-1:1,Dt=(e,t)=>e==="top"||e==="left"?-t:t,At=(e,t)=>e==="x"?t>0?"right":"left":t>0?"bottom":"top",Rt=e=>At(e.direction,e.length),$0=({sourcePos:e,targetPos:t,sourceOrientation:n})=>{const s=u.g.construct(n),r=t[s]-e[s];return Dt(n,r)<0},qn=e=>({direction:u.g.construct(e),length:Dt(e,Fe)}),Si={top:qn("top"),bottom:qn("bottom"),left:qn("left"),right:qn("right")},B0=4,D0=.25,Zs=e=>Vo(O0(Vo(e))),O0=e=>{const t=[...e],n=e.findIndex((s,r)=>{const i=Math.abs(s.length);if(i<B0){if(r===0||r===e.length-1)return!1;if(i<D0)return!0;if(e.length<=3)return!1;if(r+2<e.length){const l=t[r+2];if(l.direction!==s.direction)return!1;t[r+2]={...l,length:l.length+s.length}}else{const l=t[r-2];if(l.direction!==s.direction)return!1;t[r-2]={...l,length:l.length+s.length}}return!0}return!1});return n!==-1&&t.splice(n,1),t},Vo=e=>{const t=[...e];return e.findIndex((s,r)=>{const i=t[r-1];if(r===0||s.direction!==i.direction)return!1;if(r===1){const l=r-1,c=r,a=Rt(i),d=Rt(s);if(a===d)return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0;if(Math.abs(i.length)===Fe)return!1;const x=Dt(a,Fe),p=t[l].length-x,m=t[c].length+p;return Math.abs(m)<Fe?!1:(t[l]={...t[l],length:x},t[c]={...t[c],length:m},!0)}if(r===e.length-1){const l=r,c=r-1,a=Rt(s),d=Rt(i);if(a===d)return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0;if(Math.abs(s.length)===Fe)return!1;const x=Dt(a,Fe),p=t[l].length-x,m=t[c].length+p;return Math.abs(m)<Fe?!1:(t[l]={...t[l],length:x},t[c]={...t[c],length:m},!0)}return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0})!==-1?Vo(t):t},qt=e=>Zs(z0(e)),z0=({sourceBox:e,targetBox:t,sourcePos:n,targetPos:s,targetOrientation:r,sourceOrientation:i})=>{let l=i,c=r,a={...Si[i]},d=Nt(n,a);const x={...Si[r]};let p=Nt(s,x);const m=Math.abs(d.x-p.x),f=Math.abs(d.y-p.y);m<2*Fe&&f<10&&(a.length-=m/2,x.length+=m/2,d=Nt(n,a),p=Nt(s,x));const h=[a],j=Ei({sourceStumpTip:d,sourceOrientation:i,sourceBox:e,targetStumpTip:p,targetOrientation:r,targetBox:t});j!=null&&(h.push(j),d=Nt(d,j),l=Rt(j),a=j);const y=Ei({sourceStumpTip:p,sourceOrientation:c,sourceBox:t,targetStumpTip:d,targetOrientation:l,targetBox:e});y!=null&&(p=Nt(p,y),c=At(y.direction,y.length));const S=()=>{y!=null&&(y.length*=-1,h.push(y)),x.length*=-1,h.push(x)};if(u.K$1.swap(l)===r){const L=u.g.construct(l),A=(p[L]-d[L])/2;h.push({direction:L,length:A});const $=u.g.swap(L);return h.push({direction:$,length:p[$]-d[$]}),h.push({direction:L,length:A}),S(),h}const b=p[a.direction]-d[a.direction];let E=u.g.swap(a.direction);const R=d[E]-p[E];let M;At(a.direction,b)===l&&At(E,R)===c?M={direction:a.direction,length:b}:(M={direction:E,length:p[E]-d[E]},E=u.g.swap(E)),h.push(M);const _={direction:E,length:p[E]-d[E]};return h.push(_),S(),h},V0=e=>Zs(F0(e)),F0=({segments:e,index:t,magnitude:n})=>{const s=[...e],r=s[t],i=u.g.swap(r.direction),l=Rt(r);if(t===0){s.unshift({direction:i,length:n});const c=Dt(l,Fe);s.unshift({direction:r.direction,length:c}),t+=2,s[t]={...s[t],length:s[t].length-c}}else s[t-1]={direction:s[t-1].direction,length:s[t-1].length+n};if(t===s.length-1){s.push({direction:i,length:-n});const c=Dt(l,Fe);s.push({direction:r.direction,length:c}),s[t]={...s[t],length:s[t].length-c}}else s[t+1]={direction:s[t+1].direction,length:s[t+1].length-n};return s},H0=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n))return n;return-1},Z0=(e,t,n=!1,...s)=>{const r=(i,l)=>!s.includes(l)&&t(i,l);return n?H0(e,r):e.findIndex(r)},K0=({delta:e,segments:t})=>Zs(Qc(e,t,!1)),W0=({delta:e,segments:t})=>Zs(Qc(e,t,!0)),Qc=(e,t,n)=>{let s=[...t];return e.x!==0&&(s=Ci("x",e,s,n)),e.y!==0&&(s=Ci("y",e,s,n)),s},Ri=(e,t,n)=>{if(t.direction!==e)return!1;const s={...t,length:t.length-n[e]},r=Rt(t),i=Rt(s),l=Math.abs(s.length),c=Math.abs(t.length);return(l>c||l>Fe)&&r===i},Ci=(e,t,n,s)=>{const r=u.g.swap(e),i=s?n.length-1:0,l=n[i];if(Ri(e,l,t)){const p=n[n.length-1];return p.direction===e&&Math.abs(l.length)<Fe?(n[n.length-1]={...p,length:p.length-t[e]},n):(n[i]={...l,length:l.length-t[e]},n)}const c=s?0:n.length-1,d=Z0(n,p=>p.direction===e,s,i);if(d===c){const p=n[c];return Ri(e,p,t)?(n[c]={...p,length:p.length-t[e]},n):(l.direction===e&&Math.abs(l.length)>p.length?n[i]={...l,length:l.length-t[e]}:n[c]={...p,length:p.length-t[e]},n)}if(d===-1)return n.length===1?n[0].direction===e?[{direction:e,length:n[0].length-t[e]}]:[{direction:r,length:n[0].length/2},{direction:e,length:-t[e]},{direction:r,length:n[0].length/2}]:l.direction===e?(n[i]={...l,length:l.length-t[e]},n):[{direction:r,length:n[0].length},{direction:e,length:-t[e]},...n.slice(1)];const x=n[d];return n[d]={...x,length:x.length-t[e]},n},Y0=ce.object({position:u.K.xy,zoom:ce.number()}),ea=ce.object({color:u.od.crudeZ,variant:ce.string().optional(),segments:ce.array(zo)}),G0=ea.extend({key:ce.string(),source:ce.string(),target:ce.string(),segments:ce.array(zo),color:u.od.crudeZ,id:ce.string(),data:ce.object({segments:ce.array(zo),color:u.od.crudeZ,variant:ce.string().optional()}).optional(),selected:ce.boolean(),sourceHandle:ce.string().nullable().optional(),targetHandle:ce.string().nullable().optional()}),q0=ce.object({key:ce.string(),position:u.K.xy,selected:ce.boolean().optional(),zIndex:ce.number().optional(),type:ce.string().optional(),data:u.p.optional(),measured:ce.object({width:ce.number().optional(),height:ce.number().optional()}).optional()}),vr=(e,t)=>e.map(n=>({id:n.key,type:"custom",zIndex:n.zIndex,measured:{...n.measured},position:{...n.position},selected:n.selected,data:{},dragHandle:t})),kr=e=>e.map(({segments:t,color:n,variant:s,...r})=>({...r,id:r.key,data:{segments:t,color:n,variant:s}})),ta=e=>e.map(t=>({key:t.id,...t})),na=(e,t)=>e.map(n=>{var s,r,i;return n.data??(n.data={segments:[],color:t,variant:"pipe"}),{key:n.id,segments:((s=n.data)==null?void 0:s.segments)??[],selected:n.selected??!1,color:((r=n.data)==null?void 0:r.color)??t,variant:((i=n.data)==null?void 0:i.variant)??"pipe",...n}}),sa=e=>({...e.position,zoom:e.zoom}),oa=e=>({position:u.K.construct(e),zoom:e.zoom}),ra=(e,t)=>ta(t(vr(e))),cs=(e,t,n)=>na(t(kr(e)),n),X0=(e,t="x")=>{if(e.length===0)return[];const n=u.K$1.construct(t),s=u.K$1.swap(n);return e.sort((r,i)=>u.Pt.loc(r.box,n)-u.Pt.loc(i.box,n)),e.forEach((r,i)=>{if(i===0)return;const c=e[i-1].handles.find(f=>f.orientation===s),a=r.handles.find(f=>f.orientation===n);if(c==null||a==null)return;const d=c.absolutePosition,x=a.absolutePosition,p=u.K.set(u.K.translation(x,d),t,0),m=u.K.translate(u.Pt.topLeft(r.box),p);r.box=u.Pt.construct(m,u.Pt.dims(r.box))}),e};function $e(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,s;n<e.length;n++)(s=$e(e[n]))!==""&&(t+=(t&&" ")+s);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var U0={value:()=>{}};function Ks(){for(var e=0,t=arguments.length,n={},s;e<t;++e){if(!(s=arguments[e]+"")||s in n||/[\s.]/.test(s))throw new Error("illegal type: "+s);n[s]=[]}return new as(n)}function as(e){this._=e}function J0(e,t){return e.trim().split(/^|\s+/).map(function(n){var s="",r=n.indexOf(".");if(r>=0&&(s=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:s}})}as.prototype=Ks.prototype={constructor:as,on:function(e,t){var n=this._,s=J0(e+"",n),r,i=-1,l=s.length;if(arguments.length<2){for(;++i<l;)if((r=(e=s[i]).type)&&(r=Q0(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<l;)if(r=(e=s[i]).type)n[r]=wi(n[r],e.name,t);else if(t==null)for(r in n)n[r]=wi(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new as(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),s=0,r,i;s<r;++s)n[s]=arguments[s+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],s=0,r=i.length;s<r;++s)i[s].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)}};function Q0(e,t){for(var n=0,s=e.length,r;n<s;++n)if((r=e[n]).name===t)return r.value}function wi(e,t,n){for(var s=0,r=e.length;s<r;++s)if(e[s].name===t){e[s]=U0,e=e.slice(0,s).concat(e.slice(s+1));break}return n!=null&&e.push({name:t,value:n}),e}var Fo="http://www.w3.org/1999/xhtml";const bi={svg:"http://www.w3.org/2000/svg",xhtml:Fo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ws(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),bi.hasOwnProperty(t)?{space:bi[t],local:e}:e}function ej(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Fo&&t.documentElement.namespaceURI===Fo?t.createElement(e):t.createElementNS(n,e)}}function tj(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ia(e){var t=Ws(e);return(t.local?tj:ej)(t)}function nj(){}function Mr(e){return e==null?nj:function(){return this.querySelector(e)}}function sj(e){typeof e!="function"&&(e=Mr(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,c=s[r]=new Array(l),a,d,x=0;x<l;++x)(a=i[x])&&(d=e.call(a,a.__data__,x,i))&&("__data__"in a&&(d.__data__=a.__data__),c[x]=d);return new We(s,this._parents)}function oj(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function rj(){return[]}function la(e){return e==null?rj:function(){return this.querySelectorAll(e)}}function ij(e){return function(){return oj(e.apply(this,arguments))}}function lj(e){typeof e=="function"?e=ij(e):e=la(e);for(var t=this._groups,n=t.length,s=[],r=[],i=0;i<n;++i)for(var l=t[i],c=l.length,a,d=0;d<c;++d)(a=l[d])&&(s.push(e.call(a,a.__data__,d,l)),r.push(a));return new We(s,r)}function ca(e){return function(){return this.matches(e)}}function aa(e){return function(t){return t.matches(e)}}var cj=Array.prototype.find;function aj(e){return function(){return cj.call(this.children,e)}}function uj(){return this.firstElementChild}function dj(e){return this.select(e==null?uj:aj(typeof e=="function"?e:aa(e)))}var xj=Array.prototype.filter;function pj(){return Array.from(this.children)}function mj(e){return function(){return xj.call(this.children,e)}}function fj(e){return this.selectAll(e==null?pj:mj(typeof e=="function"?e:aa(e)))}function hj(e){typeof e!="function"&&(e=ca(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,c=s[r]=[],a,d=0;d<l;++d)(a=i[d])&&e.call(a,a.__data__,d,i)&&c.push(a);return new We(s,this._parents)}function ua(e){return new Array(e.length)}function gj(){return new We(this._enter||this._groups.map(ua),this._parents)}function ws(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ws.prototype={constructor:ws,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function jj(e){return function(){return e}}function Ej(e,t,n,s,r,i){for(var l=0,c,a=t.length,d=i.length;l<d;++l)(c=t[l])?(c.__data__=i[l],s[l]=c):n[l]=new ws(e,i[l]);for(;l<a;++l)(c=t[l])&&(r[l]=c)}function yj(e,t,n,s,r,i,l){var c,a,d=new Map,x=t.length,p=i.length,m=new Array(x),f;for(c=0;c<x;++c)(a=t[c])&&(m[c]=f=l.call(a,a.__data__,c,t)+"",d.has(f)?r[c]=a:d.set(f,a));for(c=0;c<p;++c)f=l.call(e,i[c],c,i)+"",(a=d.get(f))?(s[c]=a,a.__data__=i[c],d.delete(f)):n[c]=new ws(e,i[c]);for(c=0;c<x;++c)(a=t[c])&&d.get(m[c])===a&&(r[c]=a)}function Sj(e){return e.__data__}function Rj(e,t){if(!arguments.length)return Array.from(this,Sj);var n=t?yj:Ej,s=this._parents,r=this._groups;typeof e!="function"&&(e=jj(e));for(var i=r.length,l=new Array(i),c=new Array(i),a=new Array(i),d=0;d<i;++d){var x=s[d],p=r[d],m=p.length,f=Cj(e.call(x,x&&x.__data__,d,s)),h=f.length,j=c[d]=new Array(h),y=l[d]=new Array(h),S=a[d]=new Array(m);n(x,p,j,y,S,f,t);for(var b=0,E=0,R,M;b<h;++b)if(R=j[b]){for(b>=E&&(E=b+1);!(M=y[E])&&++E<h;);R._next=M||null}}return l=new We(l,s),l._enter=c,l._exit=a,l}function Cj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function wj(){return new We(this._exit||this._groups.map(ua),this._parents)}function bj(e,t,n){var s=this.enter(),r=this,i=this.exit();return typeof e=="function"?(s=e(s),s&&(s=s.selection())):s=s.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),s&&r?s.merge(r).order():r}function vj(e){for(var t=e.selection?e.selection():e,n=this._groups,s=t._groups,r=n.length,i=s.length,l=Math.min(r,i),c=new Array(r),a=0;a<l;++a)for(var d=n[a],x=s[a],p=d.length,m=c[a]=new Array(p),f,h=0;h<p;++h)(f=d[h]||x[h])&&(m[h]=f);for(;a<r;++a)c[a]=n[a];return new We(c,this._parents)}function kj(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var s=e[t],r=s.length-1,i=s[r],l;--r>=0;)(l=s[r])&&(i&&l.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(l,i),i=l);return this}function Mj(e){e||(e=Pj);function t(p,m){return p&&m?e(p.__data__,m.__data__):!p-!m}for(var n=this._groups,s=n.length,r=new Array(s),i=0;i<s;++i){for(var l=n[i],c=l.length,a=r[i]=new Array(c),d,x=0;x<c;++x)(d=l[x])&&(a[x]=d);a.sort(t)}return new We(r,this._parents).order()}function Pj(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function _j(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Lj(){return Array.from(this)}function Nj(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var s=e[t],r=0,i=s.length;r<i;++r){var l=s[r];if(l)return l}return null}function Tj(){let e=0;for(const t of this)++e;return e}function Aj(){return!this.node()}function Ij(e){for(var t=this._groups,n=0,s=t.length;n<s;++n)for(var r=t[n],i=0,l=r.length,c;i<l;++i)(c=r[i])&&e.call(c,c.__data__,i,r);return this}function $j(e){return function(){this.removeAttribute(e)}}function Bj(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Dj(e,t){return function(){this.setAttribute(e,t)}}function Oj(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function zj(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Vj(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Fj(e,t){var n=Ws(e);if(arguments.length<2){var s=this.node();return n.local?s.getAttributeNS(n.space,n.local):s.getAttribute(n)}return this.each((t==null?n.local?Bj:$j:typeof t=="function"?n.local?Vj:zj:n.local?Oj:Dj)(n,t))}function da(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Hj(e){return function(){this.style.removeProperty(e)}}function Zj(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Kj(e,t,n){return function(){var s=t.apply(this,arguments);s==null?this.style.removeProperty(e):this.style.setProperty(e,s,n)}}function Wj(e,t,n){return arguments.length>1?this.each((t==null?Hj:typeof t=="function"?Kj:Zj)(e,t,n??"")):en(this.node(),e)}function en(e,t){return e.style.getPropertyValue(t)||da(e).getComputedStyle(e,null).getPropertyValue(t)}function Yj(e){return function(){delete this[e]}}function Gj(e,t){return function(){this[e]=t}}function qj(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Xj(e,t){return arguments.length>1?this.each((t==null?Yj:typeof t=="function"?qj:Gj)(e,t)):this.node()[e]}function xa(e){return e.trim().split(/^|\s+/)}function Pr(e){return e.classList||new pa(e)}function pa(e){this._node=e,this._names=xa(e.getAttribute("class")||"")}pa.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ma(e,t){for(var n=Pr(e),s=-1,r=t.length;++s<r;)n.add(t[s])}function fa(e,t){for(var n=Pr(e),s=-1,r=t.length;++s<r;)n.remove(t[s])}function Uj(e){return function(){ma(this,e)}}function Jj(e){return function(){fa(this,e)}}function Qj(e,t){return function(){(t.apply(this,arguments)?ma:fa)(this,e)}}function e2(e,t){var n=xa(e+"");if(arguments.length<2){for(var s=Pr(this.node()),r=-1,i=n.length;++r<i;)if(!s.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?Qj:t?Uj:Jj)(n,t))}function t2(){this.textContent=""}function n2(e){return function(){this.textContent=e}}function s2(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function o2(e){return arguments.length?this.each(e==null?t2:(typeof e=="function"?s2:n2)(e)):this.node().textContent}function r2(){this.innerHTML=""}function i2(e){return function(){this.innerHTML=e}}function l2(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function c2(e){return arguments.length?this.each(e==null?r2:(typeof e=="function"?l2:i2)(e)):this.node().innerHTML}function a2(){this.nextSibling&&this.parentNode.appendChild(this)}function u2(){return this.each(a2)}function d2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function x2(){return this.each(d2)}function p2(e){var t=typeof e=="function"?e:ia(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function m2(){return null}function f2(e,t){var n=typeof e=="function"?e:ia(e),s=t==null?m2:typeof t=="function"?t:Mr(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),s.apply(this,arguments)||null)})}function h2(){var e=this.parentNode;e&&e.removeChild(this)}function g2(){return this.each(h2)}function j2(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function E2(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function y2(e){return this.select(e?E2:j2)}function S2(e){return arguments.length?this.property("__data__",e):this.node().__data__}function R2(e){return function(t){e.call(this,t,this.__data__)}}function C2(e){return e.trim().split(/^|\s+/).map(function(t){var n="",s=t.indexOf(".");return s>=0&&(n=t.slice(s+1),t=t.slice(0,s)),{type:t,name:n}})}function w2(e){return function(){var t=this.__on;if(t){for(var n=0,s=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++s]=i;++s?t.length=s:delete this.__on}}}function b2(e,t,n){return function(){var s=this.__on,r,i=R2(t);if(s){for(var l=0,c=s.length;l<c;++l)if((r=s[l]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},s?s.push(r):this.__on=[r]}}function v2(e,t,n){var s=C2(e+""),r,i=s.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var a=0,d=c.length,x;a<d;++a)for(r=0,x=c[a];r<i;++r)if((l=s[r]).type===x.type&&l.name===x.name)return x.value}return}for(c=t?b2:w2,r=0;r<i;++r)this.each(c(s[r],t,n));return this}function ha(e,t,n){var s=da(e),r=s.CustomEvent;typeof r=="function"?r=new r(t,n):(r=s.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function k2(e,t){return function(){return ha(this,e,t)}}function M2(e,t){return function(){return ha(this,e,t.apply(this,arguments))}}function P2(e,t){return this.each((typeof t=="function"?M2:k2)(e,t))}function*_2(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var s=e[t],r=0,i=s.length,l;r<i;++r)(l=s[r])&&(yield l)}var ga=[null];function We(e,t){this._groups=e,this._parents=t}function Bn(){return new We([[document.documentElement]],ga)}function L2(){return this}We.prototype=Bn.prototype={constructor:We,select:sj,selectAll:lj,selectChild:dj,selectChildren:fj,filter:hj,data:Rj,enter:gj,exit:wj,join:bj,merge:vj,selection:L2,order:kj,sort:Mj,call:_j,nodes:Lj,node:Nj,size:Tj,empty:Aj,each:Ij,attr:Fj,style:Wj,property:Xj,classed:e2,text:o2,html:c2,raise:u2,lower:x2,append:p2,insert:f2,remove:g2,clone:y2,datum:S2,on:v2,dispatch:P2,[Symbol.iterator]:_2};function Ke(e){return typeof e=="string"?new We([[document.querySelector(e)]],[document.documentElement]):new We([[e]],ga)}function N2(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ue(e,t){if(e=N2(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var s=n.createSVGPoint();return s.x=e.clientX,s.y=e.clientY,s=s.matrixTransform(t.getScreenCTM().inverse()),[s.x,s.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const T2={passive:!1},kn={capture:!0,passive:!1};function Eo(e){e.stopImmediatePropagation()}function Jt(e){e.preventDefault(),e.stopImmediatePropagation()}function ja(e){var t=e.document.documentElement,n=Ke(e).on("dragstart.drag",Jt,kn);"onselectstart"in t?n.on("selectstart.drag",Jt,kn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Ea(e,t){var n=e.document.documentElement,s=Ke(e).on("dragstart.drag",null);t&&(s.on("click.drag",Jt,kn),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in n?s.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Xn=e=>()=>e;function Ho(e,{sourceEvent:t,subject:n,target:s,identifier:r,active:i,x:l,y:c,dx:a,dy:d,dispatch:x}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:x}})}Ho.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function A2(e){return!e.ctrlKey&&!e.button}function I2(){return this.parentNode}function $2(e,t){return t??{x:e.x,y:e.y}}function B2(){return navigator.maxTouchPoints||"ontouchstart"in this}function ya(){var e=A2,t=I2,n=$2,s=B2,r={},i=Ks("start","drag","end"),l=0,c,a,d,x,p=0;function m(R){R.on("mousedown.drag",f).filter(s).on("touchstart.drag",y).on("touchmove.drag",S,T2).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(R,M){if(!(x||!e.call(this,R,M))){var _=E(this,t.call(this,R,M),R,M,"mouse");_&&(Ke(R.view).on("mousemove.drag",h,kn).on("mouseup.drag",j,kn),ja(R.view),Eo(R),d=!1,c=R.clientX,a=R.clientY,_("start",R))}}function h(R){if(Jt(R),!d){var M=R.clientX-c,_=R.clientY-a;d=M*M+_*_>p}r.mouse("drag",R)}function j(R){Ke(R.view).on("mousemove.drag mouseup.drag",null),Ea(R.view,d),Jt(R),r.mouse("end",R)}function y(R,M){if(e.call(this,R,M)){var _=R.changedTouches,L=t.call(this,R,M),A=_.length,$,O;for($=0;$<A;++$)(O=E(this,L,R,M,_[$].identifier,_[$]))&&(Eo(R),O("start",R,_[$]))}}function S(R){var M=R.changedTouches,_=M.length,L,A;for(L=0;L<_;++L)(A=r[M[L].identifier])&&(Jt(R),A("drag",R,M[L]))}function b(R){var M=R.changedTouches,_=M.length,L,A;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),L=0;L<_;++L)(A=r[M[L].identifier])&&(Eo(R),A("end",R,M[L]))}function E(R,M,_,L,A,$){var O=i.copy(),V=Ue($||_,M),z,k,C;if((C=n.call(R,new Ho("beforestart",{sourceEvent:_,target:m,identifier:A,active:l,x:V[0],y:V[1],dx:0,dy:0,dispatch:O}),L))!=null)return z=C.x-V[0]||0,k=C.y-V[1]||0,function P(v,N,D){var I=V,F;switch(v){case"start":r[A]=P,F=l++;break;case"end":delete r[A],--l;case"drag":V=Ue(D||N,M),F=l;break}O.call(v,R,new Ho(v,{sourceEvent:N,subject:C,target:m,identifier:A,active:F,x:V[0]+z,y:V[1]+k,dx:V[0]-I[0],dy:V[1]-I[1],dispatch:O}),L)}}return m.filter=function(R){return arguments.length?(e=typeof R=="function"?R:Xn(!!R),m):e},m.container=function(R){return arguments.length?(t=typeof R=="function"?R:Xn(R),m):t},m.subject=function(R){return arguments.length?(n=typeof R=="function"?R:Xn(R),m):n},m.touchable=function(R){return arguments.length?(s=typeof R=="function"?R:Xn(!!R),m):s},m.on=function(){var R=i.on.apply(i,arguments);return R===i?m:R},m.clickDistance=function(R){return arguments.length?(p=(R=+R)*R,m):Math.sqrt(p)},m}var tn=0,En=0,fn=0,Sa=1e3,bs,yn,vs=0,Ot=0,Ys=0,Mn=typeof performance=="object"&&performance.now?performance:Date,Ra=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _r(){return Ot||(Ra(D2),Ot=Mn.now()+Ys)}function D2(){Ot=0}function ks(){this._call=this._time=this._next=null}ks.prototype=Ca.prototype={constructor:ks,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?_r():+n)+(t==null?0:+t),!this._next&&yn!==this&&(yn?yn._next=this:bs=this,yn=this),this._call=e,this._time=n,Zo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zo())}};function Ca(e,t,n){var s=new ks;return s.restart(e,t,n),s}function O2(){_r(),++tn;for(var e=bs,t;e;)(t=Ot-e._time)>=0&&e._call.call(void 0,t),e=e._next;--tn}function vi(){Ot=(vs=Mn.now())+Ys,tn=En=0;try{O2()}finally{tn=0,V2(),Ot=0}}function z2(){var e=Mn.now(),t=e-vs;t>Sa&&(Ys-=t,vs=e)}function V2(){for(var e,t=bs,n,s=1/0;t;)t._call?(s>t._time&&(s=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:bs=n);yn=e,Zo(s)}function Zo(e){if(!tn){En&&(En=clearTimeout(En));var t=e-Ot;t>24?(e<1/0&&(En=setTimeout(vi,e-Mn.now()-Ys)),fn&&(fn=clearInterval(fn))):(fn||(vs=Mn.now(),fn=setInterval(z2,Sa)),tn=1,Ra(vi))}}function ki(e,t,n){var s=new ks;return t=t==null?0:+t,s.restart(r=>{s.stop(),e(r+t)},t,n),s}var F2=Ks("start","end","cancel","interrupt"),H2=[],wa=0,Mi=1,Ko=2,us=3,Pi=4,Wo=5,ds=6;function Gs(e,t,n,s,r,i){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;Z2(e,n,{name:t,index:s,group:r,on:F2,tween:H2,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:wa})}function Lr(e,t){var n=et(e,t);if(n.state>wa)throw new Error("too late; already scheduled");return n}function it(e,t){var n=et(e,t);if(n.state>us)throw new Error("too late; already running");return n}function et(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Z2(e,t,n){var s=e.__transition,r;s[t]=n,n.timer=Ca(i,0,n.time);function i(d){n.state=Mi,n.timer.restart(l,n.delay,n.time),n.delay<=d&&l(d-n.delay)}function l(d){var x,p,m,f;if(n.state!==Mi)return a();for(x in s)if(f=s[x],f.name===n.name){if(f.state===us)return ki(l);f.state===Pi?(f.state=ds,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete s[x]):+x<t&&(f.state=ds,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete s[x])}if(ki(function(){n.state===us&&(n.state=Pi,n.timer.restart(c,n.delay,n.time),c(d))}),n.state=Ko,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ko){for(n.state=us,r=new Array(m=n.tween.length),x=0,p=-1;x<m;++x)(f=n.tween[x].value.call(e,e.__data__,n.index,n.group))&&(r[++p]=f);r.length=p+1}}function c(d){for(var x=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(a),n.state=Wo,1),p=-1,m=r.length;++p<m;)r[p].call(e,x);n.state===Wo&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=ds,n.timer.stop(),delete s[t];for(var d in s)return;delete e.__transition}}function xs(e,t){var n=e.__transition,s,r,i=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((s=n[l]).name!==t){i=!1;continue}r=s.state>Ko&&s.state<Wo,s.state=ds,s.timer.stop(),s.on.call(r?"interrupt":"cancel",e,e.__data__,s.index,s.group),delete n[l]}i&&delete e.__transition}}function K2(e){return this.each(function(){xs(this,e)})}function W2(e,t){var n,s;return function(){var r=it(this,e),i=r.tween;if(i!==n){s=n=i;for(var l=0,c=s.length;l<c;++l)if(s[l].name===t){s=s.slice(),s.splice(l,1);break}}r.tween=s}}function Y2(e,t,n){var s,r;if(typeof n!="function")throw new Error;return function(){var i=it(this,e),l=i.tween;if(l!==s){r=(s=l).slice();for(var c={name:t,value:n},a=0,d=r.length;a<d;++a)if(r[a].name===t){r[a]=c;break}a===d&&r.push(c)}i.tween=r}}function G2(e,t){var n=this._id;if(e+="",arguments.length<2){for(var s=et(this.node(),n).tween,r=0,i=s.length,l;r<i;++r)if((l=s[r]).name===e)return l.value;return null}return this.each((t==null?W2:Y2)(n,e,t))}function Nr(e,t,n){var s=e._id;return e.each(function(){var r=it(this,s);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return et(r,s).value[t]}}function ba(e,t){var n;return(typeof t=="number"?B.interpolateNumber:t instanceof B.color?B.interpolateRgb:(n=B.color(t))?(t=n,B.interpolateRgb):B.interpolateString)(e,t)}function q2(e){return function(){this.removeAttribute(e)}}function X2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function U2(e,t,n){var s,r=n+"",i;return function(){var l=this.getAttribute(e);return l===r?null:l===s?i:i=t(s=l,n)}}function J2(e,t,n){var s,r=n+"",i;return function(){var l=this.getAttributeNS(e.space,e.local);return l===r?null:l===s?i:i=t(s=l,n)}}function Q2(e,t,n){var s,r,i;return function(){var l,c=n(this),a;return c==null?void this.removeAttribute(e):(l=this.getAttribute(e),a=c+"",l===a?null:l===s&&a===r?i:(r=a,i=t(s=l,c)))}}function e3(e,t,n){var s,r,i;return function(){var l,c=n(this),a;return c==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),a=c+"",l===a?null:l===s&&a===r?i:(r=a,i=t(s=l,c)))}}function t3(e,t){var n=Ws(e),s=n==="transform"?_h:ba;return this.attrTween(e,typeof t=="function"?(n.local?e3:Q2)(n,s,Nr(this,"attr."+e,t)):t==null?(n.local?X2:q2)(n):(n.local?J2:U2)(n,s,t))}function n3(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function s3(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function o3(e,t){var n,s;function r(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&s3(e,i)),n}return r._value=t,r}function r3(e,t){var n,s;function r(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&n3(e,i)),n}return r._value=t,r}function i3(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var s=Ws(e);return this.tween(n,(s.local?o3:r3)(s,t))}function l3(e,t){return function(){Lr(this,e).delay=+t.apply(this,arguments)}}function c3(e,t){return t=+t,function(){Lr(this,e).delay=t}}function a3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?l3:c3)(t,e)):et(this.node(),t).delay}function u3(e,t){return function(){it(this,e).duration=+t.apply(this,arguments)}}function d3(e,t){return t=+t,function(){it(this,e).duration=t}}function x3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?u3:d3)(t,e)):et(this.node(),t).duration}function p3(e,t){if(typeof t!="function")throw new Error;return function(){it(this,e).ease=t}}function m3(e){var t=this._id;return arguments.length?this.each(p3(t,e)):et(this.node(),t).ease}function f3(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;it(this,e).ease=n}}function h3(e){if(typeof e!="function")throw new Error;return this.each(f3(this._id,e))}function g3(e){typeof e!="function"&&(e=ca(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,c=s[r]=[],a,d=0;d<l;++d)(a=i[d])&&e.call(a,a.__data__,d,i)&&c.push(a);return new xt(s,this._parents,this._name,this._id)}function j3(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,s=t.length,r=n.length,i=Math.min(s,r),l=new Array(s),c=0;c<i;++c)for(var a=t[c],d=n[c],x=a.length,p=l[c]=new Array(x),m,f=0;f<x;++f)(m=a[f]||d[f])&&(p[f]=m);for(;c<s;++c)l[c]=t[c];return new xt(l,this._parents,this._name,this._id)}function E3(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function y3(e,t,n){var s,r,i=E3(t)?Lr:it;return function(){var l=i(this,e),c=l.on;c!==s&&(r=(s=c).copy()).on(t,n),l.on=r}}function S3(e,t){var n=this._id;return arguments.length<2?et(this.node(),n).on.on(e):this.each(y3(n,e,t))}function R3(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function C3(){return this.on("end.remove",R3(this._id))}function w3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Mr(e));for(var s=this._groups,r=s.length,i=new Array(r),l=0;l<r;++l)for(var c=s[l],a=c.length,d=i[l]=new Array(a),x,p,m=0;m<a;++m)(x=c[m])&&(p=e.call(x,x.__data__,m,c))&&("__data__"in x&&(p.__data__=x.__data__),d[m]=p,Gs(d[m],t,n,m,d,et(x,n)));return new xt(i,this._parents,t,n)}function b3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=la(e));for(var s=this._groups,r=s.length,i=[],l=[],c=0;c<r;++c)for(var a=s[c],d=a.length,x,p=0;p<d;++p)if(x=a[p]){for(var m=e.call(x,x.__data__,p,a),f,h=et(x,n),j=0,y=m.length;j<y;++j)(f=m[j])&&Gs(f,t,n,j,m,h);i.push(m),l.push(x)}return new xt(i,l,t,n)}var v3=Bn.prototype.constructor;function k3(){return new v3(this._groups,this._parents)}function M3(e,t){var n,s,r;return function(){var i=en(this,e),l=(this.style.removeProperty(e),en(this,e));return i===l?null:i===n&&l===s?r:r=t(n=i,s=l)}}function va(e){return function(){this.style.removeProperty(e)}}function P3(e,t,n){var s,r=n+"",i;return function(){var l=en(this,e);return l===r?null:l===s?i:i=t(s=l,n)}}function _3(e,t,n){var s,r,i;return function(){var l=en(this,e),c=n(this),a=c+"";return c==null&&(a=c=(this.style.removeProperty(e),en(this,e))),l===a?null:l===s&&a===r?i:(r=a,i=t(s=l,c))}}function L3(e,t){var n,s,r,i="style."+t,l="end."+i,c;return function(){var a=it(this,e),d=a.on,x=a.value[i]==null?c||(c=va(t)):void 0;(d!==n||r!==x)&&(s=(n=d).copy()).on(l,r=x),a.on=s}}function N3(e,t,n){var s=(e+="")=="transform"?Ph:ba;return t==null?this.styleTween(e,M3(e,s)).on("end.style."+e,va(e)):typeof t=="function"?this.styleTween(e,_3(e,s,Nr(this,"style."+e,t))).each(L3(this._id,e)):this.styleTween(e,P3(e,s,t),n).on("end.style."+e,null)}function T3(e,t,n){return function(s){this.style.setProperty(e,t.call(this,s),n)}}function A3(e,t,n){var s,r;function i(){var l=t.apply(this,arguments);return l!==r&&(s=(r=l)&&T3(e,l,n)),s}return i._value=t,i}function I3(e,t,n){var s="style."+(e+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(t==null)return this.tween(s,null);if(typeof t!="function")throw new Error;return this.tween(s,A3(e,t,n??""))}function $3(e){return function(){this.textContent=e}}function B3(e){return function(){var t=e(this);this.textContent=t??""}}function D3(e){return this.tween("text",typeof e=="function"?B3(Nr(this,"text",e)):$3(e==null?"":e+""))}function O3(e){return function(t){this.textContent=e.call(this,t)}}function z3(e){var t,n;function s(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&O3(r)),t}return s._value=e,s}function V3(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,z3(e))}function F3(){for(var e=this._name,t=this._id,n=ka(),s=this._groups,r=s.length,i=0;i<r;++i)for(var l=s[i],c=l.length,a,d=0;d<c;++d)if(a=l[d]){var x=et(a,t);Gs(a,e,n,d,l,{time:x.time+x.delay+x.duration,delay:0,duration:x.duration,ease:x.ease})}return new xt(s,this._parents,e,n)}function H3(){var e,t,n=this,s=n._id,r=n.size();return new Promise(function(i,l){var c={value:l},a={value:function(){--r===0&&i()}};n.each(function(){var d=it(this,s),x=d.on;x!==e&&(t=(e=x).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(a)),d.on=t}),r===0&&i()})}var Z3=0;function xt(e,t,n,s){this._groups=e,this._parents=t,this._name=n,this._id=s}function ka(){return++Z3}var ct=Bn.prototype;xt.prototype={constructor:xt,select:w3,selectAll:b3,selectChild:ct.selectChild,selectChildren:ct.selectChildren,filter:g3,merge:j3,selection:k3,transition:F3,call:ct.call,nodes:ct.nodes,node:ct.node,size:ct.size,empty:ct.empty,each:ct.each,on:S3,attr:t3,attrTween:i3,style:N3,styleTween:I3,text:D3,textTween:V3,remove:C3,tween:G2,delay:a3,duration:x3,ease:m3,easeVarying:h3,end:H3,[Symbol.iterator]:ct[Symbol.iterator]};function K3(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var W3={time:null,delay:0,duration:250,ease:K3};function Y3(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function G3(e){var t,n;e instanceof xt?(t=e._id,e=e._name):(t=ka(),(n=W3).time=_r(),e=e==null?null:e+"");for(var s=this._groups,r=s.length,i=0;i<r;++i)for(var l=s[i],c=l.length,a,d=0;d<c;++d)(a=l[d])&&Gs(a,e,t,d,l,n||Y3(a,t));return new xt(s,this._parents,e,t)}Bn.prototype.interrupt=K2;Bn.prototype.transition=G3;const Un=e=>()=>e;function q3(e,{sourceEvent:t,target:n,transform:s,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:r}})}function ut(e,t,n){this.k=e,this.x=t,this.y=n}ut.prototype={constructor:ut,scale:function(e){return e===1?this:new ut(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ut(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var qs=new ut(1,0,0);Ma.prototype=ut.prototype;function Ma(e){for(;!e.__zoom;)if(!(e=e.parentNode))return qs;return e.__zoom}function yo(e){e.stopImmediatePropagation()}function hn(e){e.preventDefault(),e.stopImmediatePropagation()}function X3(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function U3(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function _i(){return this.__zoom||qs}function J3(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Q3(){return navigator.maxTouchPoints||"ontouchstart"in this}function e5(e,t,n){var s=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r),l>i?(i+l)/2:Math.min(0,i)||Math.max(0,l))}function Pa(){var e=X3,t=U3,n=e5,s=J3,r=Q3,i=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,a=ls,d=Ks("start","zoom","end"),x,p,m,f=500,h=150,j=0,y=10;function S(C){C.property("__zoom",_i).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",O).filter(r).on("touchstart.zoom",V).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function(C,P,v,N){var D=C.selection?C.selection():C;D.property("__zoom",_i),C!==D?M(C,P,v,N):D.interrupt().each(function(){_(this,arguments).event(N).start().zoom(null,typeof P=="function"?P.apply(this,arguments):P).end()})},S.scaleBy=function(C,P,v,N){S.scaleTo(C,function(){var D=this.__zoom.k,I=typeof P=="function"?P.apply(this,arguments):P;return D*I},v,N)},S.scaleTo=function(C,P,v,N){S.transform(C,function(){var D=t.apply(this,arguments),I=this.__zoom,F=v==null?R(D):typeof v=="function"?v.apply(this,arguments):v,H=I.invert(F),Z=typeof P=="function"?P.apply(this,arguments):P;return n(E(b(I,Z),F,H),D,l)},v,N)},S.translateBy=function(C,P,v,N){S.transform(C,function(){return n(this.__zoom.translate(typeof P=="function"?P.apply(this,arguments):P,typeof v=="function"?v.apply(this,arguments):v),t.apply(this,arguments),l)},null,N)},S.translateTo=function(C,P,v,N,D){S.transform(C,function(){var I=t.apply(this,arguments),F=this.__zoom,H=N==null?R(I):typeof N=="function"?N.apply(this,arguments):N;return n(qs.translate(H[0],H[1]).scale(F.k).translate(typeof P=="function"?-P.apply(this,arguments):-P,typeof v=="function"?-v.apply(this,arguments):-v),I,l)},N,D)};function b(C,P){return P=Math.max(i[0],Math.min(i[1],P)),P===C.k?C:new ut(P,C.x,C.y)}function E(C,P,v){var N=P[0]-v[0]*C.k,D=P[1]-v[1]*C.k;return N===C.x&&D===C.y?C:new ut(C.k,N,D)}function R(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function M(C,P,v,N){C.on("start.zoom",function(){_(this,arguments).event(N).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(N).end()}).tween("zoom",function(){var D=this,I=arguments,F=_(D,I).event(N),H=t.apply(D,I),Z=v==null?R(H):typeof v=="function"?v.apply(D,I):v,ee=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),te=D.__zoom,se=typeof P=="function"?P.apply(D,I):P,oe=a(te.invert(Z).concat(ee/te.k),se.invert(Z).concat(ee/se.k));return function(xe){if(xe===1)xe=se;else{var J=oe(xe),ae=ee/J[2];xe=new ut(ae,Z[0]-J[0]*ae,Z[1]-J[1]*ae)}F.zoom(null,xe)}})}function _(C,P,v){return!v&&C.__zooming||new L(C,P)}function L(C,P){this.that=C,this.args=P,this.active=0,this.sourceEvent=null,this.extent=t.apply(C,P),this.taps=0}L.prototype={event:function(C){return C&&(this.sourceEvent=C),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,P){return this.mouse&&C!=="mouse"&&(this.mouse[1]=P.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=P.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=P.invert(this.touch1[0])),this.that.__zoom=P,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){var P=Ke(this.that).datum();d.call(C,this.that,new q3(C,{sourceEvent:this.sourceEvent,target:S,transform:this.that.__zoom,dispatch:d}),P)}};function A(C,...P){if(!e.apply(this,arguments))return;var v=_(this,P).event(C),N=this.__zoom,D=Math.max(i[0],Math.min(i[1],N.k*Math.pow(2,s.apply(this,arguments)))),I=Ue(C);if(v.wheel)(v.mouse[0][0]!==I[0]||v.mouse[0][1]!==I[1])&&(v.mouse[1]=N.invert(v.mouse[0]=I)),clearTimeout(v.wheel);else{if(N.k===D)return;v.mouse=[I,N.invert(I)],xs(this),v.start()}hn(C),v.wheel=setTimeout(F,h),v.zoom("mouse",n(E(b(N,D),v.mouse[0],v.mouse[1]),v.extent,l));function F(){v.wheel=null,v.end()}}function $(C,...P){if(m||!e.apply(this,arguments))return;var v=C.currentTarget,N=_(this,P,!0).event(C),D=Ke(C.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",ee,!0),I=Ue(C,v),F=C.clientX,H=C.clientY;ja(C.view),yo(C),N.mouse=[I,this.__zoom.invert(I)],xs(this),N.start();function Z(te){if(hn(te),!N.moved){var se=te.clientX-F,oe=te.clientY-H;N.moved=se*se+oe*oe>j}N.event(te).zoom("mouse",n(E(N.that.__zoom,N.mouse[0]=Ue(te,v),N.mouse[1]),N.extent,l))}function ee(te){D.on("mousemove.zoom mouseup.zoom",null),Ea(te.view,N.moved),hn(te),N.event(te).end()}}function O(C,...P){if(e.apply(this,arguments)){var v=this.__zoom,N=Ue(C.changedTouches?C.changedTouches[0]:C,this),D=v.invert(N),I=v.k*(C.shiftKey?.5:2),F=n(E(b(v,I),N,D),t.apply(this,P),l);hn(C),c>0?Ke(this).transition().duration(c).call(M,F,N,C):Ke(this).call(S.transform,F,N,C)}}function V(C,...P){if(e.apply(this,arguments)){var v=C.touches,N=v.length,D=_(this,P,C.changedTouches.length===N).event(C),I,F,H,Z;for(yo(C),F=0;F<N;++F)H=v[F],Z=Ue(H,this),Z=[Z,this.__zoom.invert(Z),H.identifier],D.touch0?!D.touch1&&D.touch0[2]!==Z[2]&&(D.touch1=Z,D.taps=0):(D.touch0=Z,I=!0,D.taps=1+!!x);x&&(x=clearTimeout(x)),I&&(D.taps<2&&(p=Z[0],x=setTimeout(function(){x=null},f)),xs(this),D.start())}}function z(C,...P){if(this.__zooming){var v=_(this,P).event(C),N=C.changedTouches,D=N.length,I,F,H,Z;for(hn(C),I=0;I<D;++I)F=N[I],H=Ue(F,this),v.touch0&&v.touch0[2]===F.identifier?v.touch0[0]=H:v.touch1&&v.touch1[2]===F.identifier&&(v.touch1[0]=H);if(F=v.that.__zoom,v.touch1){var ee=v.touch0[0],te=v.touch0[1],se=v.touch1[0],oe=v.touch1[1],xe=(xe=se[0]-ee[0])*xe+(xe=se[1]-ee[1])*xe,J=(J=oe[0]-te[0])*J+(J=oe[1]-te[1])*J;F=b(F,Math.sqrt(xe/J)),H=[(ee[0]+se[0])/2,(ee[1]+se[1])/2],Z=[(te[0]+oe[0])/2,(te[1]+oe[1])/2]}else if(v.touch0)H=v.touch0[0],Z=v.touch0[1];else return;v.zoom("touch",n(E(F,H,Z),v.extent,l))}}function k(C,...P){if(this.__zooming){var v=_(this,P).event(C),N=C.changedTouches,D=N.length,I,F;for(yo(C),m&&clearTimeout(m),m=setTimeout(function(){m=null},f),I=0;I<D;++I)F=N[I],v.touch0&&v.touch0[2]===F.identifier?delete v.touch0:v.touch1&&v.touch1[2]===F.identifier&&delete v.touch1;if(v.touch1&&!v.touch0&&(v.touch0=v.touch1,delete v.touch1),v.touch0)v.touch0[1]=this.__zoom.invert(v.touch0[0]);else if(v.end(),v.taps===2&&(F=Ue(F,this),Math.hypot(p[0]-F[0],p[1]-F[1])<y)){var H=Ke(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return S.wheelDelta=function(C){return arguments.length?(s=typeof C=="function"?C:Un(+C),S):s},S.filter=function(C){return arguments.length?(e=typeof C=="function"?C:Un(!!C),S):e},S.touchable=function(C){return arguments.length?(r=typeof C=="function"?C:Un(!!C),S):r},S.extent=function(C){return arguments.length?(t=typeof C=="function"?C:Un([[+C[0][0],+C[0][1]],[+C[1][0],+C[1][1]]]),S):t},S.scaleExtent=function(C){return arguments.length?(i[0]=+C[0],i[1]=+C[1],S):[i[0],i[1]]},S.translateExtent=function(C){return arguments.length?(l[0][0]=+C[0][0],l[1][0]=+C[1][0],l[0][1]=+C[0][1],l[1][1]=+C[1][1],S):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},S.constrain=function(C){return arguments.length?(n=C,S):n},S.duration=function(C){return arguments.length?(c=+C,S):c},S.interpolate=function(C){return arguments.length?(a=C,S):a},S.on=function(){var C=d.on.apply(d,arguments);return C===d?S:C},S.clickDistance=function(C){return arguments.length?(j=(C=+C)*C,S):Math.sqrt(j)},S.tapDistance=function(C){return arguments.length?(y=+C,S):y},S}const Oe={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:s})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:s}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Pn=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],_a=["Enter"," ","Escape"],La={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var zt;(function(e){e.Strict="strict",e.Loose="loose"})(zt||(zt={}));var It;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(It||(It={}));var nn;(function(e){e.Partial="partial",e.Full="full"})(nn||(nn={}));const Na={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var St;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(St||(St={}));var Ms;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ms||(Ms={}));var U;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(U||(U={}));const Li={[U.Left]:U.Right,[U.Right]:U.Left,[U.Top]:U.Bottom,[U.Bottom]:U.Top};function Ta(e){return e===null?null:e?"valid":"invalid"}const Aa=e=>"id"in e&&"source"in e&&"target"in e,t5=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Tr=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Dn=(e,t=[0,0])=>{const{width:n,height:s}=ht(e),r=e.origin??t,i=n*r[0],l=s*r[1];return{x:e.position.x-i,y:e.position.y-l}},n5=(e,t={nodeOrigin:[0,0]})=>{if(process.env.NODE_ENV==="development"&&!t.nodeLookup&&console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows."),e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((s,r)=>{const i=typeof r=="string";let l=!t.nodeLookup&&!i?r:void 0;t.nodeLookup&&(l=i?t.nodeLookup.get(r):Tr(r)?r:t.nodeLookup.get(r.id));const c=l?Ps(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Xs(s,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Us(n)},On=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(s=>{if(t.filter===void 0||t.filter(s)){const r=Ps(s);n=Xs(n,r)}}),Us(n)},Ar=(e,t,[n,s,r]=[0,0,1],i=!1,l=!1)=>{const c={...zn(t,[n,s,r]),width:t.width/r,height:t.height/r},a=[];for(const d of e.values()){const{measured:x,selectable:p=!0,hidden:m=!1}=d;if(l&&!p||m)continue;const f=x.width??d.width??d.initialWidth??null,h=x.height??d.height??d.initialHeight??null,j=_n(c,on(d)),y=(f??0)*(h??0),S=i&&j>0;(!d.internals.handleBounds||S||j>=y||d.dragging)&&a.push(d)}return a},s5=(e,t)=>{const n=new Set;return e.forEach(s=>{n.add(s.id)}),t.filter(s=>n.has(s.source)||n.has(s.target))};function o5(e,t){const n=new Map,s=t!=null&&t.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!r.hidden)&&(!s||s.has(r.id))&&n.set(r.id,r)}),n}async function r5({nodes:e,width:t,height:n,panZoom:s,minZoom:r,maxZoom:i},l){if(e.size===0)return Promise.resolve(!0);const c=o5(e,l),a=On(c),d=Ir(a,t,n,(l==null?void 0:l.minZoom)??r,(l==null?void 0:l.maxZoom)??i,(l==null?void 0:l.padding)??.1);return await s.setViewport(d,{duration:l==null?void 0:l.duration,ease:l==null?void 0:l.ease,interpolate:l==null?void 0:l.interpolate}),Promise.resolve(!0)}function Ia({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:s=[0,0],nodeExtent:r,onError:i}){const l=n.get(e),c=l.parentId?n.get(l.parentId):void 0,{x:a,y:d}=c?c.internals.positionAbsolute:{x:0,y:0},x=l.origin??s;let p=r;if(l.extent==="parent"&&!l.expandParent)if(!c)i==null||i("005",Oe.error005());else{const f=c.measured.width,h=c.measured.height;f&&h&&(p=[[a,d],[a+f,d+h]])}else c&&rn(l.extent)&&(p=[[l.extent[0][0]+a,l.extent[0][1]+d],[l.extent[1][0]+a,l.extent[1][1]+d]]);const m=rn(p)?Vt(t,p,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&(i==null||i("015",Oe.error015())),{position:{x:m.x-a+(l.measured.width??0)*x[0],y:m.y-d+(l.measured.height??0)*x[1]},positionAbsolute:m}}async function i5({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:s,onBeforeDelete:r}){const i=new Set(e.map(m=>m.id)),l=[];for(const m of n){if(m.deletable===!1)continue;const f=i.has(m.id),h=!f&&m.parentId&&l.find(j=>j.id===m.parentId);(f||h)&&l.push(m)}const c=new Set(t.map(m=>m.id)),a=s.filter(m=>m.deletable!==!1),x=s5(l,a);for(const m of a)c.has(m.id)&&!x.find(h=>h.id===m.id)&&x.push(m);if(!r)return{edges:x,nodes:l};const p=await r({nodes:l,edges:x});return typeof p=="boolean"?p?{edges:x,nodes:l}:{edges:[],nodes:[]}:p}const sn=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Vt=(e={x:0,y:0},t,n)=>({x:sn(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:sn(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function $a(e,t,n){const{width:s,height:r}=ht(n),{x:i,y:l}=n.internals.positionAbsolute;return Vt(e,[[i,l],[i+s,l+r]],t)}const Ni=(e,t,n)=>e<t?sn(Math.abs(e-t),1,t)/t:e>n?-sn(Math.abs(e-n),1,t)/t:0,Ba=(e,t,n=15,s=40)=>{const r=Ni(e.x,s,t.width-s)*n,i=Ni(e.y,s,t.height-s)*n;return[r,i]},Xs=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Yo=({x:e,y:t,width:n,height:s})=>({x:e,y:t,x2:e+n,y2:t+s}),Us=({x:e,y:t,x2:n,y2:s})=>({x:e,y:t,width:n-e,height:s-t}),on=(e,t=[0,0])=>{var r,i;const{x:n,y:s}=Tr(e)?e.internals.positionAbsolute:Dn(e,t);return{x:n,y:s,width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Ps=(e,t=[0,0])=>{var r,i;const{x:n,y:s}=Tr(e)?e.internals.positionAbsolute:Dn(e,t);return{x:n,y:s,x2:n+(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0),y2:s+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},Da=(e,t)=>Us(Xs(Yo(e),Yo(t))),_n=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),s=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*s)},Ti=e=>Je(e.width)&&Je(e.height)&&Je(e.x)&&Je(e.y),Je=e=>!isNaN(e)&&isFinite(e),_s=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},Js=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),zn=({x:e,y:t},[n,s,r],i=!1,l=[1,1])=>{const c={x:(e-n)/r,y:(t-s)/r};return i?Js(c,l):c},Ls=({x:e,y:t},[n,s,r])=>({x:e*r+n,y:t*r+s});function Gt(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function l5(e,t,n){if(typeof e=="string"||typeof e=="number"){const s=Gt(e,n),r=Gt(e,t);return{top:s,right:r,bottom:s,left:r,x:r*2,y:s*2}}if(typeof e=="object"){const s=Gt(e.top??e.y??0,n),r=Gt(e.bottom??e.y??0,n),i=Gt(e.left??e.x??0,t),l=Gt(e.right??e.x??0,t);return{top:s,right:l,bottom:r,left:i,x:i+l,y:s+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function c5(e,t,n,s,r,i){const{x:l,y:c}=Ls(e,[t,n,s]),{x:a,y:d}=Ls({x:e.x+e.width,y:e.y+e.height},[t,n,s]),x=r-a,p=i-d;return{left:Math.floor(l),top:Math.floor(c),right:Math.floor(x),bottom:Math.floor(p)}}const Ir=(e,t,n,s,r,i)=>{const l=l5(i,t,n),c=(t-l.x)/e.width,a=(n-l.y)/e.height,d=Math.min(c,a),x=sn(d,s,r),p=e.x+e.width/2,m=e.y+e.height/2,f=t/2-p*x,h=n/2-m*x,j=c5(e,f,h,x,t,n),y={left:Math.min(j.left-l.left,0),top:Math.min(j.top-l.top,0),right:Math.min(j.right-l.right,0),bottom:Math.min(j.bottom-l.bottom,0)};return{x:f-y.left+y.right,y:h-y.top+y.bottom,zoom:x}},Ns=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function rn(e){return e!==void 0&&e!=="parent"}function ht(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Oa(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function za(e,t={width:0,height:0},n,s,r){const i={...e},l=s.get(n);if(l){const c=l.origin||r;i.x+=l.internals.positionAbsolute.x-(t.width??0)*c[0],i.y+=l.internals.positionAbsolute.y-(t.height??0)*c[1]}return i}function Ai(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function a5(){let e,t;return{promise:new Promise((s,r)=>{e=s,t=r}),resolve:e,reject:t}}function u5(e){return{...La,...e||{}}}function Rn(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:s,containerBounds:r}){const{x:i,y:l}=dt(e),c=zn({x:i-((r==null?void 0:r.left)??0),y:l-((r==null?void 0:r.top)??0)},s),{x:a,y:d}=n?Js(c,t):c;return{xSnapped:a,ySnapped:d,...c}}const $r=e=>({width:e.offsetWidth,height:e.offsetHeight}),Va=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},d5=["INPUT","SELECT","TEXTAREA"];function Fa(e){var s,r;const t=((r=(s=e.composedPath)==null?void 0:s.call(e))==null?void 0:r[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:d5.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Ha=e=>"clientX"in e,dt=(e,t)=>{var i,l;const n=Ha(e),s=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,r=n?e.clientY:(l=e.touches)==null?void 0:l[0].clientY;return{x:s-((t==null?void 0:t.left)??0),y:r-((t==null?void 0:t.top)??0)}},Ii=(e,t,n,s,r)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(l=>{const c=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:r,position:l.getAttribute("data-handlepos"),x:(c.left-n.left)/s,y:(c.top-n.top)/s,...$r(l)}})};function Za({sourceX:e,sourceY:t,targetX:n,targetY:s,sourceControlX:r,sourceControlY:i,targetControlX:l,targetControlY:c}){const a=e*.125+r*.375+l*.375+n*.125,d=t*.125+i*.375+c*.375+s*.125,x=Math.abs(a-e),p=Math.abs(d-t);return[a,d,x,p]}function Jn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function $i({pos:e,x1:t,y1:n,x2:s,y2:r,c:i}){switch(e){case U.Left:return[t-Jn(t-s,i),n];case U.Right:return[t+Jn(s-t,i),n];case U.Top:return[t,n-Jn(n-r,i)];case U.Bottom:return[t,n+Jn(r-n,i)]}}function Ka({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:s,targetY:r,targetPosition:i=U.Top,curvature:l=.25}){const[c,a]=$i({pos:n,x1:e,y1:t,x2:s,y2:r,c:l}),[d,x]=$i({pos:i,x1:s,y1:r,x2:e,y2:t,c:l}),[p,m,f,h]=Za({sourceX:e,sourceY:t,targetX:s,targetY:r,sourceControlX:c,sourceControlY:a,targetControlX:d,targetControlY:x});return[`M${e},${t} C${c},${a} ${d},${x} ${s},${r}`,p,m,f,h]}function Wa({sourceX:e,sourceY:t,targetX:n,targetY:s}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,l=Math.abs(s-t)/2,c=s<t?s+l:s-l;return[i,c,r,l]}function x5({sourceNode:e,targetNode:t,selected:n=!1,zIndex:s=0,elevateOnSelect:r=!1}){if(!r)return s;const i=n||t.selected||e.selected,l=Math.max(e.internals.z||0,t.internals.z||0,1e3);return s+(i?l:0)}function p5({sourceNode:e,targetNode:t,width:n,height:s,transform:r}){const i=Xs(Ps(e),Ps(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const l={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:s/r[2]};return _n(l,Us(i))>0}const Ya=({source:e,sourceHandle:t,target:n,targetHandle:s})=>`xy-edge__${e}${t||""}-${n}${s||""}`,m5=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Ga=(e,t)=>{if(!e.source||!e.target)return _s("006",Oe.error006()),t;let n;return Aa(e)?n={...e}:n={...e,id:Ya(e)},m5(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))},f5=(e,t,n,s={shouldReplaceId:!0})=>{const{id:r,...i}=e;if(!t.source||!t.target)return _s("006",Oe.error006()),n;if(!n.find(a=>a.id===e.id))return _s("007",Oe.error007(r)),n;const c={...i,id:s.shouldReplaceId?Ya(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(a=>a.id!==r).concat(c)};function qa({sourceX:e,sourceY:t,targetX:n,targetY:s}){const[r,i,l,c]=Wa({sourceX:e,sourceY:t,targetX:n,targetY:s});return[`M ${e},${t}L ${n},${s}`,r,i,l,c]}const Bi={[U.Left]:{x:-1,y:0},[U.Right]:{x:1,y:0},[U.Top]:{x:0,y:-1},[U.Bottom]:{x:0,y:1}},h5=({source:e,sourcePosition:t=U.Bottom,target:n})=>t===U.Left||t===U.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Di=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function g5({source:e,sourcePosition:t=U.Bottom,target:n,targetPosition:s=U.Top,center:r,offset:i}){const l=Bi[t],c=Bi[s],a={x:e.x+l.x*i,y:e.y+l.y*i},d={x:n.x+c.x*i,y:n.y+c.y*i},x=h5({source:a,sourcePosition:t,target:d}),p=x.x!==0?"x":"y",m=x[p];let f=[],h,j;const y={x:0,y:0},S={x:0,y:0},[b,E,R,M]=Wa({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[p]*c[p]===-1){h=r.x??b,j=r.y??E;const L=[{x:h,y:a.y},{x:h,y:d.y}],A=[{x:a.x,y:j},{x:d.x,y:j}];l[p]===m?f=p==="x"?L:A:f=p==="x"?A:L}else{const L=[{x:a.x,y:d.y}],A=[{x:d.x,y:a.y}];if(p==="x"?f=l.x===m?A:L:f=l.y===m?L:A,t===s){const k=Math.abs(e[p]-n[p]);if(k<=i){const C=Math.min(i-1,i-k);l[p]===m?y[p]=(a[p]>e[p]?-1:1)*C:S[p]=(d[p]>n[p]?-1:1)*C}}if(t!==s){const k=p==="x"?"y":"x",C=l[p]===c[k],P=a[k]>d[k],v=a[k]<d[k];(l[p]===1&&(!C&&P||C&&v)||l[p]!==1&&(!C&&v||C&&P))&&(f=p==="x"?L:A)}const $={x:a.x+y.x,y:a.y+y.y},O={x:d.x+S.x,y:d.y+S.y},V=Math.max(Math.abs($.x-f[0].x),Math.abs(O.x-f[0].x)),z=Math.max(Math.abs($.y-f[0].y),Math.abs(O.y-f[0].y));V>=z?(h=($.x+O.x)/2,j=f[0].y):(h=f[0].x,j=($.y+O.y)/2)}return[[e,{x:a.x+y.x,y:a.y+y.y},...f,{x:d.x+S.x,y:d.y+S.y},n],h,j,R,M]}function j5(e,t,n,s){const r=Math.min(Di(e,t)/2,Di(t,n)/2,s),{x:i,y:l}=t;if(e.x===i&&i===n.x||e.y===l&&l===n.y)return`L${i} ${l}`;if(e.y===l){const d=e.x<n.x?-1:1,x=e.y<n.y?1:-1;return`L ${i+r*d},${l}Q ${i},${l} ${i},${l+r*x}`}const c=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${i},${l+r*a}Q ${i},${l} ${i+r*c},${l}`}function Go({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:s,targetY:r,targetPosition:i=U.Top,borderRadius:l=5,centerX:c,centerY:a,offset:d=20}){const[x,p,m,f,h]=g5({source:{x:e,y:t},sourcePosition:n,target:{x:s,y:r},targetPosition:i,center:{x:c,y:a},offset:d});return[x.reduce((y,S,b)=>{let E="";return b>0&&b<x.length-1?E=j5(x[b-1],S,x[b+1],l):E=`${b===0?"M":"L"}${S.x} ${S.y}`,y+=E,y},""),p,m,f,h]}function Oi(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function E5(e){var p;const{sourceNode:t,targetNode:n}=e;if(!Oi(t)||!Oi(n))return null;const s=t.internals.handleBounds||zi(t.handles),r=n.internals.handleBounds||zi(n.handles),i=Vi((s==null?void 0:s.source)??[],e.sourceHandle),l=Vi(e.connectionMode===zt.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),e.targetHandle);if(!i||!l)return(p=e.onError)==null||p.call(e,"008",Oe.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(i==null?void 0:i.position)||U.Bottom,a=(l==null?void 0:l.position)||U.Top,d=Ln(t,i,c),x=Ln(n,l,a);return{sourceX:d.x,sourceY:d.y,targetX:x.x,targetY:x.y,sourcePosition:c,targetPosition:a}}function zi(e){if(!e)return null;const t=[],n=[];for(const s of e)s.width=s.width??1,s.height=s.height??1,s.type==="source"?t.push(s):s.type==="target"&&n.push(s);return{source:t,target:n}}function Ln(e,t,n=U.Left,s=!1){const r=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:l,height:c}=t??ht(e);if(s)return{x:r+l/2,y:i+c/2};switch((t==null?void 0:t.position)??n){case U.Top:return{x:r+l/2,y:i};case U.Right:return{x:r+l,y:i+c/2};case U.Bottom:return{x:r+l/2,y:i+c};case U.Left:return{x:r,y:i+c/2}}}function Vi(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function qo(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(s=>`${s}=${e[s]}`).join("&")}`:""}function y5(e,{id:t,defaultColor:n,defaultMarkerStart:s,defaultMarkerEnd:r}){const i=new Set;return e.reduce((l,c)=>([c.markerStart||s,c.markerEnd||r].forEach(a=>{if(a&&typeof a=="object"){const d=qo(a,t);i.has(d)||(l.push({id:d,color:a.color||n,...a}),i.add(d))}}),l),[]).sort((l,c)=>l.id.localeCompare(c.id))}const Br={nodeOrigin:[0,0],nodeExtent:Pn,elevateNodesOnSelect:!0,defaults:{}},S5={...Br,checkEquality:!0};function Dr(e,t){const n={...e};for(const s in t)t[s]!==void 0&&(n[s]=t[s]);return n}function R5(e,t,n){const s=Dr(Br,n);for(const r of e.values())if(r.parentId)Or(r,e,t,s);else{const i=Dn(r,s.nodeOrigin),l=rn(r.extent)?r.extent:s.nodeExtent,c=Vt(i,l,ht(r));r.internals.positionAbsolute=c}}function Xo(e,t,n,s){var a,d;const r=Dr(S5,s);let i=e.length>0;const l=new Map(t),c=r!=null&&r.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const x of e){let p=l.get(x.id);if(r.checkEquality&&x===(p==null?void 0:p.internals.userNode))t.set(x.id,p);else{const m=Dn(x,r.nodeOrigin),f=rn(x.extent)?x.extent:r.nodeExtent,h=Vt(m,f,ht(x));p={...r.defaults,...x,measured:{width:(a=x.measured)==null?void 0:a.width,height:(d=x.measured)==null?void 0:d.height},internals:{positionAbsolute:h,handleBounds:x.measured?p==null?void 0:p.internals.handleBounds:void 0,z:Xa(x,c),userNode:x}},t.set(x.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(i=!1),x.parentId&&Or(p,t,n,s)}return i}function C5(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Or(e,t,n,s){const{elevateNodesOnSelect:r,nodeOrigin:i,nodeExtent:l}=Dr(Br,s),c=e.parentId,a=t.get(c);if(!a){console.warn(`Parent node ${c} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}C5(e,n);const d=r?1e3:0,{x,y:p,z:m}=w5(e,a,i,l,d),{positionAbsolute:f}=e.internals,h=x!==f.x||p!==f.y;(h||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x,y:p}:f,z:m}})}function Xa(e,t){return(Je(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function w5(e,t,n,s,r){const{x:i,y:l}=t.internals.positionAbsolute,c=ht(e),a=Dn(e,n),d=rn(e.extent)?Vt(a,e.extent,c):a;let x=Vt({x:i+d.x,y:l+d.y},s,c);e.extent==="parent"&&(x=$a(x,c,t));const p=Xa(e,r),m=t.internals.z??0;return{x:x.x,y:x.y,z:m>p?m:p}}function zr(e,t,n,s=[0,0]){var l;const r=[],i=new Map;for(const c of e){const a=t.get(c.parentId);if(!a)continue;const d=((l=i.get(c.parentId))==null?void 0:l.expandedRect)??on(a),x=Da(d,c.rect);i.set(c.parentId,{expandedRect:x,parent:a})}return i.size>0&&i.forEach(({expandedRect:c,parent:a},d)=>{var E;const x=a.internals.positionAbsolute,p=ht(a),m=a.origin??s,f=c.x<x.x?Math.round(Math.abs(x.x-c.x)):0,h=c.y<x.y?Math.round(Math.abs(x.y-c.y)):0,j=Math.max(p.width,Math.round(c.width)),y=Math.max(p.height,Math.round(c.height)),S=(j-p.width)*m[0],b=(y-p.height)*m[1];(f>0||h>0||S||b)&&(r.push({id:d,type:"position",position:{x:a.position.x-f+S,y:a.position.y-h+b}}),(E=n.get(d))==null||E.forEach(R=>{e.some(M=>M.id===R.id)||r.push({id:R.id,type:"position",position:{x:R.position.x+f,y:R.position.y+h}})})),(p.width<c.width||p.height<c.height||f||h)&&r.push({id:d,type:"dimensions",setAttributes:!0,dimensions:{width:j+(f?m[0]*f-S:0),height:y+(h?m[1]*h-b:0)}})}),r}function b5(e,t,n,s,r,i){const l=s==null?void 0:s.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const a=[],d=window.getComputedStyle(l),{m22:x}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const m of e.values()){const f=t.get(m.id);if(!f)continue;if(f.hidden){t.set(f.id,{...f,internals:{...f.internals,handleBounds:void 0}}),c=!0;continue}const h=$r(m.nodeElement),j=f.measured.width!==h.width||f.measured.height!==h.height;if(!!(h.width&&h.height&&(j||!f.internals.handleBounds||m.force))){const S=m.nodeElement.getBoundingClientRect(),b=rn(f.extent)?f.extent:i;let{positionAbsolute:E}=f.internals;f.parentId&&f.extent==="parent"?E=$a(E,h,t.get(f.parentId)):b&&(E=Vt(E,b,h));const R={...f,measured:h,internals:{...f.internals,positionAbsolute:E,handleBounds:{source:Ii("source",m.nodeElement,S,x,f.id),target:Ii("target",m.nodeElement,S,x,f.id)}}};t.set(f.id,R),f.parentId&&Or(R,t,n,{nodeOrigin:r}),c=!0,j&&(a.push({id:f.id,type:"dimensions",dimensions:h}),f.expandParent&&f.parentId&&p.push({id:f.id,parentId:f.parentId,rect:on(R,r)}))}}if(p.length>0){const m=zr(p,t,n,r);a.push(...m)}return{changes:a,updatedInternals:c}}async function v5({delta:e,panZoom:t,transform:n,translateExtent:s,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],s),c=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(c)}function Fi(e,t,n,s,r,i){let l=r;const c=s.get(l)||new Map;s.set(l,c.set(n,t)),l=`${r}-${e}`;const a=s.get(l)||new Map;if(s.set(l,a.set(n,t)),i){l=`${r}-${e}-${i}`;const d=s.get(l)||new Map;s.set(l,d.set(n,t))}}function Ua(e,t,n){e.clear(),t.clear();for(const s of n){const{source:r,target:i,sourceHandle:l=null,targetHandle:c=null}=s,a={edgeId:s.id,source:r,target:i,sourceHandle:l,targetHandle:c},d=`${r}-${l}--${i}-${c}`,x=`${i}-${c}--${r}-${l}`;Fi("source",a,x,e,r,l),Fi("target",a,d,e,i,c),t.set(s.id,s)}}function Ja(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Ja(n,t):!1}function Hi(e,t,n){var r;let s=e;do{if((r=s==null?void 0:s.matches)!=null&&r.call(s,t))return!0;if(s===n)return!1;s=s==null?void 0:s.parentElement}while(s);return!1}function k5(e,t,n,s){const r=new Map;for(const[i,l]of e)if((l.selected||l.id===s)&&(!l.parentId||!Ja(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){const c=e.get(i);c&&r.set(i,{id:i,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return r}function So({nodeId:e,dragItems:t,nodeLookup:n,dragging:s=!0}){var l,c,a;const r=[];for(const[d,x]of t){const p=(l=n.get(d))==null?void 0:l.internals.userNode;p&&r.push({...p,position:x.position,dragging:s})}if(!e)return[r[0],r];const i=(c=n.get(e))==null?void 0:c.internals.userNode;return[i?{...i,position:((a=t.get(e))==null?void 0:a.position)||i.position,dragging:s}:r[0],r]}function M5({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:s,onDragStop:r}){let i={x:null,y:null},l=0,c=new Map,a=!1,d={x:0,y:0},x=null,p=!1,m=null,f=!1;function h({noDragClassName:y,handleSelector:S,domNode:b,isSelectable:E,nodeId:R,nodeClickDistance:M=0}){m=Ke(b);function _({x:O,y:V},z){const{nodeLookup:k,nodeExtent:C,snapGrid:P,snapToGrid:v,nodeOrigin:N,onNodeDrag:D,onSelectionDrag:I,onError:F,updateNodePositions:H}=t();i={x:O,y:V};let Z=!1,ee={x:0,y:0,x2:0,y2:0};if(c.size>1&&C){const te=On(c);ee=Yo(te)}for(const[te,se]of c){if(!k.has(te))continue;let oe={x:O-se.distance.x,y:V-se.distance.y};v&&(oe=Js(oe,P));let xe=[[C[0][0],C[0][1]],[C[1][0],C[1][1]]];if(c.size>1&&C&&!se.extent){const{positionAbsolute:je}=se.internals,ge=je.x-ee.x+C[0][0],W=je.x+se.measured.width-ee.x2+C[1][0],le=je.y-ee.y+C[0][1],ue=je.y+se.measured.height-ee.y2+C[1][1];xe=[[ge,le],[W,ue]]}const{position:J,positionAbsolute:ae}=Ia({nodeId:te,nextPosition:oe,nodeLookup:k,nodeExtent:xe,nodeOrigin:N,onError:F});Z=Z||se.position.x!==J.x||se.position.y!==J.y,se.position=J,se.internals.positionAbsolute=ae}if(Z&&(H(c,!0),z&&(s||D||!R&&I))){const[te,se]=So({nodeId:R,dragItems:c,nodeLookup:k});s==null||s(z,c,te,se),D==null||D(z,te,se),R||I==null||I(z,se)}}async function L(){if(!x)return;const{transform:O,panBy:V,autoPanSpeed:z,autoPanOnNodeDrag:k}=t();if(!k){a=!1,cancelAnimationFrame(l);return}const[C,P]=Ba(d,x,z);(C!==0||P!==0)&&(i.x=(i.x??0)-C/O[2],i.y=(i.y??0)-P/O[2],await V({x:C,y:P})&&_(i,null)),l=requestAnimationFrame(L)}function A(O){var Z;const{nodeLookup:V,multiSelectionActive:z,nodesDraggable:k,transform:C,snapGrid:P,snapToGrid:v,selectNodesOnDrag:N,onNodeDragStart:D,onSelectionDragStart:I,unselectNodesAndEdges:F}=t();p=!0,(!N||!E)&&!z&&R&&((Z=V.get(R))!=null&&Z.selected||F()),E&&N&&R&&(e==null||e(R));const H=Rn(O.sourceEvent,{transform:C,snapGrid:P,snapToGrid:v,containerBounds:x});if(i=H,c=k5(V,k,H,R),c.size>0&&(n||D||!R&&I)){const[ee,te]=So({nodeId:R,dragItems:c,nodeLookup:V});n==null||n(O.sourceEvent,c,ee,te),D==null||D(O.sourceEvent,ee,te),R||I==null||I(O.sourceEvent,te)}}const $=ya().clickDistance(M).on("start",O=>{const{domNode:V,nodeDragThreshold:z,transform:k,snapGrid:C,snapToGrid:P}=t();x=(V==null?void 0:V.getBoundingClientRect())||null,f=!1,z===0&&A(O),i=Rn(O.sourceEvent,{transform:k,snapGrid:C,snapToGrid:P,containerBounds:x}),d=dt(O.sourceEvent,x)}).on("drag",O=>{const{autoPanOnNodeDrag:V,transform:z,snapGrid:k,snapToGrid:C,nodeDragThreshold:P,nodeLookup:v}=t(),N=Rn(O.sourceEvent,{transform:z,snapGrid:k,snapToGrid:C,containerBounds:x});if((O.sourceEvent.type==="touchmove"&&O.sourceEvent.touches.length>1||R&&!v.has(R))&&(f=!0),!f){if(!a&&V&&p&&(a=!0,L()),!p){const D=N.xSnapped-(i.x??0),I=N.ySnapped-(i.y??0);Math.sqrt(D*D+I*I)>P&&A(O)}(i.x!==N.xSnapped||i.y!==N.ySnapped)&&c&&p&&(d=dt(O.sourceEvent,x),_(N,O.sourceEvent))}}).on("end",O=>{if(!(!p||f)&&(a=!1,p=!1,cancelAnimationFrame(l),c.size>0)){const{nodeLookup:V,updateNodePositions:z,onNodeDragStop:k,onSelectionDragStop:C}=t();if(z(c,!1),r||k||!R&&C){const[P,v]=So({nodeId:R,dragItems:c,nodeLookup:V,dragging:!1});r==null||r(O.sourceEvent,c,P,v),k==null||k(O.sourceEvent,P,v),R||C==null||C(O.sourceEvent,v)}}}).filter(O=>{const V=O.target;return!O.button&&(!y||!Hi(V,`.${y}`,b))&&(!S||Hi(V,S,b))});m.call($)}function j(){m==null||m.on(".drag",null)}return{update:h,destroy:j}}function P5(e,t,n){const s=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())_n(r,on(i))>0&&s.push(i);return s}const _5=250;function L5(e,t,n,s){var c,a;let r=[],i=1/0;const l=P5(e,n,t+_5);for(const d of l){const x=[...((c=d.internals.handleBounds)==null?void 0:c.source)??[],...((a=d.internals.handleBounds)==null?void 0:a.target)??[]];for(const p of x){if(s.nodeId===p.nodeId&&s.type===p.type&&s.id===p.id)continue;const{x:m,y:f}=Ln(d,p,p.position,!0),h=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(f-e.y,2));h>t||(h<i?(r=[{...p,x:m,y:f}],i=h):h===i&&r.push({...p,x:m,y:f}))}}if(!r.length)return null;if(r.length>1){const d=s.type==="source"?"target":"source";return r.find(x=>x.type===d)??r[0]}return r[0]}function Qa(e,t,n,s,r,i=!1){var d,x,p;const l=s.get(e);if(!l)return null;const c=r==="strict"?(d=l.internals.handleBounds)==null?void 0:d[t]:[...((x=l.internals.handleBounds)==null?void 0:x.source)??[],...((p=l.internals.handleBounds)==null?void 0:p.target)??[]],a=(n?c==null?void 0:c.find(m=>m.id===n):c==null?void 0:c[0])??null;return a&&i?{...a,...Ln(l,a,a.position,!0)}:a}function eu(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function N5(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const tu=()=>!0;function T5(e,{connectionMode:t,connectionRadius:n,handleId:s,nodeId:r,edgeUpdaterType:i,isTarget:l,domNode:c,nodeLookup:a,lib:d,autoPanOnConnect:x,flowId:p,panBy:m,cancelConnection:f,onConnectStart:h,onConnect:j,onConnectEnd:y,isValidConnection:S=tu,onReconnectEnd:b,updateConnection:E,getTransform:R,getFromHandle:M,autoPanSpeed:_}){const L=Va(e.target);let A=0,$;const{x:O,y:V}=dt(e),z=L==null?void 0:L.elementFromPoint(O,V),k=eu(i,z),C=c==null?void 0:c.getBoundingClientRect();if(!C||!k)return;const P=Qa(r,k,s,a,t);if(!P)return;let v=dt(e,C),N=!1,D=null,I=!1,F=null;function H(){if(!x||!C)return;const[ae,je]=Ba(v,C,_);m({x:ae,y:je}),A=requestAnimationFrame(H)}const Z={...P,nodeId:r,type:k,position:P.position},ee=a.get(r),se={inProgress:!0,isValid:null,from:Ln(ee,Z,U.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:ee,to:v,toHandle:null,toPosition:Li[Z.position],toNode:null};E(se);let oe=se;h==null||h(e,{nodeId:r,handleId:s,handleType:k});function xe(ae){if(!M()||!Z){J(ae);return}const je=R();v=dt(ae,C),$=L5(zn(v,je,!1,[1,1]),n,a,Z),N||(H(),N=!0);const ge=nu(ae,{handle:$,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:l?"target":"source",isValidConnection:S,doc:L,lib:d,flowId:p,nodeLookup:a});F=ge.handleDomNode,D=ge.connection,I=N5(!!$,ge.isValid);const W={...oe,isValid:I,to:ge.toHandle&&I?Ls({x:ge.toHandle.x,y:ge.toHandle.y},je):v,toHandle:ge.toHandle,toPosition:I&&ge.toHandle?ge.toHandle.position:Li[Z.position],toNode:ge.toHandle?a.get(ge.toHandle.nodeId):null};I&&$&&oe.toHandle&&W.toHandle&&oe.toHandle.type===W.toHandle.type&&oe.toHandle.nodeId===W.toHandle.nodeId&&oe.toHandle.id===W.toHandle.id&&oe.to.x===W.to.x&&oe.to.y===W.to.y||(E(W),oe=W)}function J(ae){($||F)&&D&&I&&(j==null||j(D));const{inProgress:je,...ge}=oe,W={...ge,toPosition:oe.toHandle?oe.toPosition:null};y==null||y(ae,W),i&&(b==null||b(ae,W)),f(),cancelAnimationFrame(A),N=!1,I=!1,D=null,F=null,L.removeEventListener("mousemove",xe),L.removeEventListener("mouseup",J),L.removeEventListener("touchmove",xe),L.removeEventListener("touchend",J)}L.addEventListener("mousemove",xe),L.addEventListener("mouseup",J),L.addEventListener("touchmove",xe),L.addEventListener("touchend",J)}function nu(e,{handle:t,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:i,doc:l,lib:c,flowId:a,isValidConnection:d=tu,nodeLookup:x}){const p=i==="target",m=t?l.querySelector(`.${c}-flow__handle[data-id="${a}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:f,y:h}=dt(e),j=l.elementFromPoint(f,h),y=j!=null&&j.classList.contains(`${c}-flow__handle`)?j:m,S={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){const b=eu(void 0,y),E=y.getAttribute("data-nodeid"),R=y.getAttribute("data-handleid"),M=y.classList.contains("connectable"),_=y.classList.contains("connectableend");if(!E||!b)return S;const L={source:p?E:s,sourceHandle:p?R:r,target:p?s:E,targetHandle:p?r:R};S.connection=L;const $=M&&_&&(n===zt.Strict?p&&b==="source"||!p&&b==="target":E!==s||R!==r);S.isValid=$&&d(L),S.toHandle=Qa(E,b,R,x,n,!0)}return S}const Uo={onPointerDown:T5,isValid:nu};function A5({domNode:e,panZoom:t,getTransform:n,getViewScale:s}){const r=Ke(e);function i({translateExtent:c,width:a,height:d,zoomStep:x=10,pannable:p=!0,zoomable:m=!0,inversePan:f=!1}){const h=E=>{const R=n();if(E.sourceEvent.type!=="wheel"||!t)return;const M=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*x,_=R[2]*Math.pow(2,M);t.scaleTo(_)};let j=[0,0];const y=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(j=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},S=E=>{const R=n();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!t)return;const M=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],_=[M[0]-j[0],M[1]-j[1]];j=M;const L=s()*Math.max(R[2],Math.log(R[2]))*(f?-1:1),A={x:R[0]-_[0]*L,y:R[1]-_[1]*L},$=[[0,0],[a,d]];t.setViewportConstrained({x:A.x,y:A.y,zoom:R[2]},$,c)},b=Pa().on("start",y).on("zoom",p?S:null).on("zoom.wheel",m?h:null);r.call(b,{})}function l(){r.on("zoom",null)}return{update:i,destroy:l,pointer:Ue}}const I5=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Qs=e=>({x:e.x,y:e.y,zoom:e.k}),Ro=({x:e,y:t,zoom:n})=>qs.translate(e,t).scale(n),Xt=(e,t)=>e.target.closest(`.${t}`),su=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),$5=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Co=(e,t=0,n=$5,s=()=>{})=>{const r=typeof t=="number"&&t>0;return r||s(),r?e.transition().duration(t).ease(n).on("end",s):e},ou=e=>{const t=e.ctrlKey&&Ns()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function B5({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:s,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:l,onPanZoomStart:c,onPanZoom:a,onPanZoomEnd:d}){return x=>{if(Xt(x,t))return!1;x.preventDefault(),x.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(x.ctrlKey&&l){const y=Ue(x),S=ou(x),b=p*Math.pow(2,S);s.scaleTo(n,b,y,x);return}const m=x.deltaMode===1?20:1;let f=r===It.Vertical?0:x.deltaX*m,h=r===It.Horizontal?0:x.deltaY*m;!Ns()&&x.shiftKey&&r!==It.Vertical&&(f=x.deltaY*m,h=0),s.translateBy(n,-(f/p)*i,-(h/p)*i,{internal:!0});const j=Qs(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,c==null||c(x,j)),e.isPanScrolling&&(a==null||a(x,j),e.panScrollTimeout=setTimeout(()=>{d==null||d(x,j),e.isPanScrolling=!1},150))}}function D5({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(s,r){const i=s.type==="wheel",l=!t&&i&&!s.ctrlKey,c=Xt(s,e);if(s.ctrlKey&&i&&c&&s.preventDefault(),l||c)return null;s.preventDefault(),n.call(this,s,r)}}function O5({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return s=>{var i,l,c;if((i=s.sourceEvent)!=null&&i.internal)return;const r=Qs(s.transform);e.mouseButton=((l=s.sourceEvent)==null?void 0:l.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=r,((c=s.sourceEvent)==null?void 0:c.type)==="mousedown"&&t(!0),n&&(n==null||n(s.sourceEvent,r))}}function z5({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:s,onPanZoom:r}){return i=>{var l,c;e.usedRightMouseButton=!!(n&&su(t,e.mouseButton??0)),(l=i.sourceEvent)!=null&&l.sync||s([i.transform.x,i.transform.y,i.transform.k]),r&&!((c=i.sourceEvent)!=null&&c.internal)&&(r==null||r(i.sourceEvent,Qs(i.transform)))}}function V5({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:s,onPanZoomEnd:r,onPaneContextMenu:i}){return l=>{var c;if(!((c=l.sourceEvent)!=null&&c.internal)&&(e.isZoomingOrPanning=!1,i&&su(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&i(l.sourceEvent),e.usedRightMouseButton=!1,s(!1),r&&I5(e.prevViewport,l.transform))){const a=Qs(l.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r==null||r(l.sourceEvent,a)},n?150:0)}}}function F5({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:s,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:l,noWheelClassName:c,noPanClassName:a,lib:d}){return x=>{var h;const p=e||t,m=n&&x.ctrlKey;if(x.button===1&&x.type==="mousedown"&&(Xt(x,`${d}-flow__node`)||Xt(x,`${d}-flow__edge`)))return!0;if(!s&&!p&&!r&&!i&&!n||l||Xt(x,c)&&x.type==="wheel"||Xt(x,a)&&(x.type!=="wheel"||r&&x.type==="wheel"&&!e)||!n&&x.ctrlKey&&x.type==="wheel")return!1;if(!n&&x.type==="touchstart"&&((h=x.touches)==null?void 0:h.length)>1)return x.preventDefault(),!1;if(!p&&!r&&!m&&x.type==="wheel"||!s&&(x.type==="mousedown"||x.type==="touchstart")||Array.isArray(s)&&!s.includes(x.button)&&x.type==="mousedown")return!1;const f=Array.isArray(s)&&s.includes(x.button)||!x.button||x.button<=1;return(!x.ctrlKey||x.type==="wheel")&&f}}function H5({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:s,translateExtent:r,viewport:i,onPanZoom:l,onPanZoomStart:c,onPanZoomEnd:a,onDraggingChange:d}){const x={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=e.getBoundingClientRect(),m=Pa().clickDistance(!Je(s)||s<0?0:s).scaleExtent([t,n]).translateExtent(r),f=Ke(e).call(m);E({x:i.x,y:i.y,zoom:sn(i.zoom,t,n)},[[0,0],[p.width,p.height]],r);const h=f.on("wheel.zoom"),j=f.on("dblclick.zoom");m.wheelDelta(ou);function y(z,k){return f?new Promise(C=>{m==null||m.interpolate((k==null?void 0:k.interpolate)==="linear"?B.interpolate:ls).transform(Co(f,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>C(!0)),z)}):Promise.resolve(!1)}function S({noWheelClassName:z,noPanClassName:k,onPaneContextMenu:C,userSelectionActive:P,panOnScroll:v,panOnDrag:N,panOnScrollMode:D,panOnScrollSpeed:I,preventScrolling:F,zoomOnPinch:H,zoomOnScroll:Z,zoomOnDoubleClick:ee,zoomActivationKeyPressed:te,lib:se,onTransformChange:oe}){P&&!x.isZoomingOrPanning&&b();const J=v&&!te&&!P?B5({zoomPanValues:x,noWheelClassName:z,d3Selection:f,d3Zoom:m,panOnScrollMode:D,panOnScrollSpeed:I,zoomOnPinch:H,onPanZoomStart:c,onPanZoom:l,onPanZoomEnd:a}):D5({noWheelClassName:z,preventScrolling:F,d3ZoomHandler:h});if(f.on("wheel.zoom",J,{passive:!1}),!P){const je=O5({zoomPanValues:x,onDraggingChange:d,onPanZoomStart:c});m.on("start",je);const ge=z5({zoomPanValues:x,panOnDrag:N,onPaneContextMenu:!!C,onPanZoom:l,onTransformChange:oe});m.on("zoom",ge);const W=V5({zoomPanValues:x,panOnDrag:N,panOnScroll:v,onPaneContextMenu:C,onPanZoomEnd:a,onDraggingChange:d});m.on("end",W)}const ae=F5({zoomActivationKeyPressed:te,panOnDrag:N,zoomOnScroll:Z,panOnScroll:v,zoomOnDoubleClick:ee,zoomOnPinch:H,userSelectionActive:P,noPanClassName:k,noWheelClassName:z,lib:se});m.filter(ae),ee?f.on("dblclick.zoom",j):f.on("dblclick.zoom",null)}function b(){m.on("zoom",null)}async function E(z,k,C){const P=Ro(z),v=m==null?void 0:m.constrain()(P,k,C);return v&&await y(v),new Promise(N=>N(v))}async function R(z,k){const C=Ro(z);return await y(C,k),new Promise(P=>P(C))}function M(z){if(f){const k=Ro(z),C=f.property("__zoom");(C.k!==z.zoom||C.x!==z.x||C.y!==z.y)&&(m==null||m.transform(f,k,null,{sync:!0}))}}function _(){const z=f?Ma(f.node()):{x:0,y:0,k:1};return{x:z.x,y:z.y,zoom:z.k}}function L(z,k){return f?new Promise(C=>{m==null||m.interpolate((k==null?void 0:k.interpolate)==="linear"?B.interpolate:ls).scaleTo(Co(f,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>C(!0)),z)}):Promise.resolve(!1)}function A(z,k){return f?new Promise(C=>{m==null||m.interpolate((k==null?void 0:k.interpolate)==="linear"?B.interpolate:ls).scaleBy(Co(f,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>C(!0)),z)}):Promise.resolve(!1)}function $(z){m==null||m.scaleExtent(z)}function O(z){m==null||m.translateExtent(z)}function V(z){const k=!Je(z)||z<0?0:z;m==null||m.clickDistance(k)}return{update:S,destroy:b,setViewport:R,setViewportConstrained:E,getViewport:_,scaleTo:L,scaleBy:A,setScaleExtent:$,setTranslateExtent:O,syncViewport:M,setClickDistance:V}}var ln;(function(e){e.Line="line",e.Handle="handle"})(ln||(ln={}));function Z5({width:e,prevWidth:t,height:n,prevHeight:s,affectsX:r,affectsY:i}){const l=e-t,c=n-s,a=[l>0?1:l<0?-1:0,c>0?1:c<0?-1:0];return l&&r&&(a[0]=a[0]*-1),c&&i&&(a[1]=a[1]*-1),a}function K5(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),s=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:s,affectsY:r}}function jt(e,t){return Math.max(0,t-e)}function Et(e,t){return Math.max(0,e-t)}function Qn(e,t,n){return Math.max(0,t-e,e-n)}function Zi(e,t){return e?!t:t}function W5(e,t,n,s,r,i,l,c){let{affectsX:a,affectsY:d}=t;const{isHorizontal:x,isVertical:p}=t,m=x&&p,{xSnapped:f,ySnapped:h}=n,{minWidth:j,maxWidth:y,minHeight:S,maxHeight:b}=s,{x:E,y:R,width:M,height:_,aspectRatio:L}=e;let A=Math.floor(x?f-e.pointerX:0),$=Math.floor(p?h-e.pointerY:0);const O=M+(a?-A:A),V=_+(d?-$:$),z=-i[0]*M,k=-i[1]*_;let C=Qn(O,j,y),P=Qn(V,S,b);if(l){let D=0,I=0;a&&A<0?D=jt(E+A+z,l[0][0]):!a&&A>0&&(D=Et(E+O+z,l[1][0])),d&&$<0?I=jt(R+$+k,l[0][1]):!d&&$>0&&(I=Et(R+V+k,l[1][1])),C=Math.max(C,D),P=Math.max(P,I)}if(c){let D=0,I=0;a&&A>0?D=Et(E+A,c[0][0]):!a&&A<0&&(D=jt(E+O,c[1][0])),d&&$>0?I=Et(R+$,c[0][1]):!d&&$<0&&(I=jt(R+V,c[1][1])),C=Math.max(C,D),P=Math.max(P,I)}if(r){if(x){const D=Qn(O/L,S,b)*L;if(C=Math.max(C,D),l){let I=0;!a&&!d||a&&!d&&m?I=Et(R+k+O/L,l[1][1])*L:I=jt(R+k+(a?A:-A)/L,l[0][1])*L,C=Math.max(C,I)}if(c){let I=0;!a&&!d||a&&!d&&m?I=jt(R+O/L,c[1][1])*L:I=Et(R+(a?A:-A)/L,c[0][1])*L,C=Math.max(C,I)}}if(p){const D=Qn(V*L,j,y)/L;if(P=Math.max(P,D),l){let I=0;!a&&!d||d&&!a&&m?I=Et(E+V*L+z,l[1][0])/L:I=jt(E+(d?$:-$)*L+z,l[0][0])/L,P=Math.max(P,I)}if(c){let I=0;!a&&!d||d&&!a&&m?I=jt(E+V*L,c[1][0])/L:I=Et(E+(d?$:-$)*L,c[0][0])/L,P=Math.max(P,I)}}}$=$+($<0?P:-P),A=A+(A<0?C:-C),r&&(m?O>V*L?$=(Zi(a,d)?-A:A)/L:A=(Zi(a,d)?-$:$)*L:x?($=A/L,d=a):(A=$*L,a=d));const v=a?E+A:E,N=d?R+$:R;return{width:M+(a?-A:A),height:_+(d?-$:$),x:i[0]*A*(a?-1:1)+v,y:i[1]*$*(d?-1:1)+N}}const ru={width:0,height:0,x:0,y:0},Y5={...ru,pointerX:0,pointerY:0,aspectRatio:1};function G5(e){return[[0,0],[e.measured.width,e.measured.height]]}function q5(e,t,n){const s=t.position.x+e.position.x,r=t.position.y+e.position.y,i=e.measured.width??0,l=e.measured.height??0,c=n[0]*i,a=n[1]*l;return[[s-c,r-a],[s+i-c,r+l-a]]}function X5({domNode:e,nodeId:t,getStoreItems:n,onChange:s,onEnd:r}){const i=Ke(e);function l({controlPosition:a,boundaries:d,keepAspectRatio:x,resizeDirection:p,onResizeStart:m,onResize:f,onResizeEnd:h,shouldResize:j}){let y={...ru},S={...Y5};const b=K5(a);let E,R=null,M=[],_,L,A;const $=ya().on("start",O=>{const{nodeLookup:V,transform:z,snapGrid:k,snapToGrid:C,nodeOrigin:P,paneDomNode:v}=n();if(E=V.get(t),!E)return;R=(v==null?void 0:v.getBoundingClientRect())??null;const{xSnapped:N,ySnapped:D}=Rn(O.sourceEvent,{transform:z,snapGrid:k,snapToGrid:C,containerBounds:R});y={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},S={...y,pointerX:N,pointerY:D,aspectRatio:y.width/y.height},_=void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(_=V.get(E.parentId),L=_&&E.extent==="parent"?G5(_):void 0),M=[],A=void 0;for(const[I,F]of V)if(F.parentId===t&&(M.push({id:I,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){const H=q5(F,E,F.origin??P);A?A=[[Math.min(H[0][0],A[0][0]),Math.min(H[0][1],A[0][1])],[Math.max(H[1][0],A[1][0]),Math.max(H[1][1],A[1][1])]]:A=H}m==null||m(O,{...y})}).on("drag",O=>{const{transform:V,snapGrid:z,snapToGrid:k,nodeOrigin:C}=n(),P=Rn(O.sourceEvent,{transform:V,snapGrid:z,snapToGrid:k,containerBounds:R}),v=[];if(!E)return;const{x:N,y:D,width:I,height:F}=y,H={},Z=E.origin??C,{width:ee,height:te,x:se,y:oe}=W5(S,b,P,d,x,Z,L,A),xe=ee!==I,J=te!==F,ae=se!==N&&xe,je=oe!==D&&J;if(!ae&&!je&&!xe&&!J)return;if((ae||je||Z[0]===1||Z[1]===1)&&(H.x=ae?se:y.x,H.y=je?oe:y.y,y.x=H.x,y.y=H.y,M.length>0)){const ue=se-N,Me=oe-D;for(const Le of M)Le.position={x:Le.position.x-ue+Z[0]*(ee-I),y:Le.position.y-Me+Z[1]*(te-F)},v.push(Le)}if((xe||J)&&(H.width=xe&&(!p||p==="horizontal")?ee:y.width,H.height=J&&(!p||p==="vertical")?te:y.height,y.width=H.width,y.height=H.height),_&&E.expandParent){const ue=Z[0]*(H.width??0);H.x&&H.x<ue&&(y.x=ue,S.x=S.x-(H.x-ue));const Me=Z[1]*(H.height??0);H.y&&H.y<Me&&(y.y=Me,S.y=S.y-(H.y-Me))}const ge=Z5({width:y.width,prevWidth:I,height:y.height,prevHeight:F,affectsX:b.affectsX,affectsY:b.affectsY}),W={...y,direction:ge};(j==null?void 0:j(O,W))!==!1&&(f==null||f(O,W),s(H,v))}).on("end",O=>{h==null||h(O,{...y}),r==null||r({...y})});i.call($)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}var es={exports:{}},wo={},ts={exports:{}},bo={};/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./symbols-BtW1eE35.cjs"),o=require("./jsx-runtime-CITbqOLs.cjs"),g=require("react"),u=require("./css-BR-Ih764.cjs"),N=require("./eraser-DeKDbhe4.cjs"),Lh=require("./external-BKWucUPD.cjs"),zl=require("./Animated-CCN9ByY6.cjs"),_=require("./provider-Dx_qX7Wi.cjs"),Hl=require("react-dom"),Qe=require("./external-C4JmDQou.cjs"),Vl=require("./external-BHiMn0_8.cjs"),Te=require("./external-CcIlyM7a.cjs"),se=require("zod"),Pe=require("./external-D2eCxMkQ.cjs"),ws=require("./external-D7fvHJwL.cjs"),Fl=require("./external-DVV0t11f.cjs"),Zl=require("./Menu-BSLsdSQe.cjs"),fe=require("./external-D9Mbu0wy.cjs"),Yl=require("./units-DR4EJndw.cjs"),Ph=require("./external-O7GBl914.cjs"),Th=require("./external-E3bYM0JI.cjs"),Ne=require("./external-Be6wSMuJ.cjs"),Ah=require("./external-CmXsU6yu.cjs"),Ih=require("./external-Cdszmp1I.cjs"),Oh=require("./Video-BcSAFYkH.cjs"),Wl=require("./Toggle-BWcSF1BX.cjs"),$h=e=>e.nullable().transform(t=>t===null?void 0:t).optional(),Bh=e=>se.array(e).or(e.transform(t=>[t])),Kl=e=>N.f(e,(t,n,s)=>{const r=n===s.length-1,i=!isNaN(parseInt(t)),l=!isNaN(parseInt(s[n+1]));return i&&(t="element"),r||l?t:[t,"shape"]}),hi=(e,t)=>{if(e==null)return null;const n=e[t];return n==null&&typeof e=="object"&&"sourceType"in e?e.sourceType()[t]:n},Dh=(e,t,n)=>N.c(hi(e,"shape"),Kl(t),{...n,getter:hi}),zh=Object.freeze(Object.defineProperty({__proto__:null,getFieldSchema:Dh,getFieldSchemaPath:Kl,nullToUndefined:$h,toArray:Bh},Symbol.toStringTag,{value:"Module"})),Gl=Symbol(),Xo=Symbol(),cn="a",es="w";let Hh=(e,t)=>new Proxy(e,t);const Ro=Object.getPrototypeOf,gi=new WeakMap,Uo=e=>e&&(gi.has(e)?gi.get(e):Ro(e)===Object.prototype||Ro(e)===Array.prototype),ji=e=>typeof e=="object"&&e!==null,Ei=new WeakMap,Xl=e=>e[Xo]||e,Ul=(e,t,n)=>{if(!Uo(e))return e;const s=Xl(e),r=(l=>Object.isFrozen(l)||Object.values(Object.getOwnPropertyDescriptors(l)).some(a=>!a.writable))(s);let i=n&&n.get(s);return i&&i[1].f===r||(i=((l,a)=>{const c={f:a};let d=!1;const x=(m,h)=>{if(!d){let j=c[cn].get(l);if(j||(j={},c[cn].set(l,j)),m===es)j[es]=!0;else{let E=j[m];E||(E=new Set,j[m]=E),E.add(h)}}},p={get:(m,h)=>h===Xo?l:(x("k",h),Ul(Reflect.get(m,h),c[cn],c.c)),has:(m,h)=>h===Gl?(d=!0,c[cn].delete(l),!0):(x("h",h),Reflect.has(m,h)),getOwnPropertyDescriptor:(m,h)=>(x("o",h),Reflect.getOwnPropertyDescriptor(m,h)),ownKeys:m=>(x(es),Reflect.ownKeys(m))};return a&&(p.set=p.deleteProperty=()=>!1),[p,c]})(s,r),i[1].p=Hh(r?(l=>{let a=Ei.get(l);if(!a){if(Array.isArray(l))a=Array.from(l);else{const c=Object.getOwnPropertyDescriptors(l);Object.values(c).forEach(d=>{d.configurable=!0}),a=Object.create(Ro(l),c)}Ei.set(l,a)}return a})(s):s,i[0]),n&&n.set(s,i)),i[1][cn]=t,i[1].c=n,i[1].p},ql=(e,t,n,s)=>{if(Object.is(e,t))return!1;if(!ji(e)||!ji(t))return!0;const r=n.get(Xl(e));if(!r)return!0;if(s){const l=s.get(e);if(l&&l.n===t)return l.g;s.set(e,{n:t,g:!1})}let i=null;try{for(const l of r.h||[])if(i=Reflect.has(e,l)!==Reflect.has(t,l),i)return i;if(r[es]===!0){if(i=((l,a)=>{const c=Reflect.ownKeys(l),d=Reflect.ownKeys(a);return c.length!==d.length||c.some((x,p)=>x!==d[p])})(e,t),i)return i}else for(const l of r.o||[])if(i=!!Reflect.getOwnPropertyDescriptor(e,l)!=!!Reflect.getOwnPropertyDescriptor(t,l),i)return i;for(const l of r.k||[])if(i=ql(e[l],t[l],n,s),i)return i;return i===null&&(i=!0),i}finally{s&&s.set(e,{n:t,g:i})}},Vh=e=>!!Uo(e)&&Gl in e,Jl=e=>Uo(e)&&e[Xo]||null,Fh="h",Zh="w",Yh="o",Wh="k",Co=e=>typeof e=="object"&&e!==null,Ql=(e,t)=>{if(!Co(e))return e;const n=Jl(e);return n!==null?(Vh(e),n):(t.has(e)||(t.add(e),Object.entries(e).forEach(([s,r])=>{const i=Ql(r,t);Object.is(i,r)||(e[s]=i)})),e)},wo=(e,t,n)=>{var s,r,i;if(!Co(e)||!Co(t))return;const l=n.get(Jl(t)||t);l&&((s=l[Fh])==null||s.forEach(a=>{Reflect.has(e,a)}),l[Zh]===!0&&Reflect.ownKeys(e),(r=l[Yh])==null||r.forEach(a=>{Reflect.getOwnPropertyDescriptor(e,a)}),(i=l[Wh])==null||i.forEach(a=>{wo(e[a],t[a],n)}))},Qs="o",eo="r",to="a";function Kh(e,t){var n;let s=0;const r=(n=t?.size)!=null?n:1,i=[],l=t!=null&&t.noWeakMap?null:new WeakMap;return c=>{const d=l?.get(c);if(d)return d[eo];for(let j=0;j<r;j+=1){const E=i[(s+j)%r];if(!E)break;if(!ql(E[Qs],c,E[to],new WeakMap))return wo(c,E[Qs],E[to]),l?.set(c,E),E[eo]}const x=new WeakMap,p=Ul(c,x),m=Ql(e(p),new Set);wo(c,c,x);const h={[Qs]:c,[eo]:m,[to]:x};return s=(s-1+r)%r,i[s]=h,l?.set(c,h),m}}const Gh=(e,t)=>u.S.RUNTIME==="browser"?Kh(e,t):e,Ke=(e,t)=>{g.useEffect(()=>{const n=new AbortController,s=n.signal,i=(async()=>(await u.ur(),await e(s)))().catch(console.error);return()=>{n.abort(),i.then(l=>l?.()).catch(console.error)}},t)},Xh=(e,t,n=150)=>{const[s,r]=g.useState(e);return g.useEffect(()=>{const i=setTimeout(()=>r(t),n);return()=>clearTimeout(i)},[t,n]),s},Uh=({transforms:e=[]})=>{const[t,n]=g.useState(e),s=g.useCallback((l,a,c=0)=>n(d=>{const x=d.filter(p=>p.key!==l);return x.push({key:l,transform:a,priority:c}),x.sort((p,m)=>m.priority-p.priority),x}),[n]),r=g.useCallback(l=>n(a=>a.filter(c=>c.key!==l)),[s]);return{transform:g.useCallback(l=>t.reduce((a,c)=>c.transform(a),{...l,transformed:!1}),[t]),setTransform:s,deleteTransform:r}},qh=Object.freeze(Object.defineProperty({__proto__:null,Access:f.Access,Acquire:f.Acquire,Add:f.Add,Align:f.Align,Analyze:f.Analyze,Annotate:f.Annotate,Array:f.Array,Arrow:f.Arrow,Attachment:f.Attachment,Auto:f.Auto,AutoFitWidth:f.AutoFitWidth,Binary:f.Binary,Bolt:f.Bolt,Box:f.Box$1,Bridge:f.Bridge,Calculation:f.Calculation,Calendar:f.Calendar$1,Caret:f.Caret,Channel:f.Channel,Check:f.Check,Circle:f.Circle,Close:f.Close,Cluster:f.Cluster,Commit:f.Commit,Concepts:f.Concepts,Connect:f.Connect,Constant:f.Constant,Control:f.Control,Copy:f.Copy,Decimal:f.Decimal,Delete:f.Delete,Details:f.Details,Device:f.Device,Disable:f.Disable,Disconnect:f.Disconnect,Download:f.Download,Downsample:f.Downsample,Drag:f.Drag,Dynamic:f.Dynamic,Edit:f.Edit,EditOff:f.EditOff,Enable:f.Enable,Expand:f.Expand,Explore:f.Explore,Export:f.Export,Feedback:f.Feedback,Filter:f.Filter,Focus:f.Focus,Function:f.Function,Group:f.Group,Guide:f.Guide,Hardware:f.Hardware,Heart:f.Heart,Hidden:f.Hidden,Import:f.Import,Index:f.Index,Info:f.Info,JSON:f.JSON,Keyboard:f.Keyboard,Label:f.Label,LinePlot:f.LinePlot,Linear:f.Linear,Link:f.Link,LinkExternal:f.LinkExternal,Loading:f.Loading,Log:f.Log,Logo:f.Logo,Map:f.Map,Menu:f.Menu,MoveToMainWindow:f.MoveToMainWindow,NPM:f.NPM,Node:f.Node,None:f.None,OpenExternal:f.OpenExternal,OpenInNewWindow:f.OpenInNewWindow,PNPM:f.PNPM,Pan:f.Pan,Pause:f.Pause,Play:f.Play,Python:f.Python,QuestionMark:f.QuestionMark,Rack:f.Rack,Range:f.Range,Reference:f.Reference,Refresh:f.Refresh,Release:f.Release,Rename:f.Rename,Resources:f.Resources,Rotate:f.Rotate,Rule:f.Rule,Save:f.Save,Schematic:f.Schematic,Search:f.Search,Selection:f.Selection,Settings:f.Settings,Snapshot:f.Snapshot,Snooze:f.Snooze,Sound:f.Sound,SplitX:f.SplitX,SplitY:f.SplitY,StarFilled:f.StarFilled,StarOutlined:f.StarOutlined,String:f.String,StrokeWidth:f.StrokeWidth,Subtract:f.Subtract,Sync:f.Sync,Table:f.Table,Tare:f.Tare,Task:f.Task,Text:f.Text$3,TextAlign:f.TextAlign,Time:f.Time$1,Tooltip:f.Tooltip,Type:f.Type,TypeScript:f.TypeScript,Units:f.Units,User:f.User,Value:f.Value,Variable:f.Variable,Virtual:f.Virtual,Visible:f.Visible,Visualize:f.Visualize,Warning:f.Warning,Wave:f.Wave,Workspace:f.Workspace,Yarn:f.Yarn,Zoom:f.Zoom,createComposite:f.createComposite,resolve:f.resolve,wrapSVGIcon:f.wrapSVGIcon},Symbol.toStringTag,{value:"Module"})),Jh=Object.freeze(Object.defineProperty({__proto__:null,Config:f.Config,Dialog:f.Dialog$1,chooseLocation:f.chooseLocation,formatTip:f.formatTip,useConfig:f.useConfig,wrap:f.wrap},Symbol.toStringTag,{value:"Module"})),qo=({ref:e,location:t,style:n,size:s,className:r,children:i,onDragStart:l,sizeUnits:a="px",showHandle:c=!0,...d})=>{const x=u.K.construct(t),p=u.K.direction(x),m=u.g.dimension(p);return o.jsxRuntimeExports.jsxs(f.Box,{className:u.CSS(u.CSS.B("resize"),u.CSS.loc(x),r),style:{[m]:`${s}${a}`,...n},ref:e,direction:p,empty:!0,...d,children:[i,c&&o.jsxRuntimeExports.jsx("div",{draggable:!0,className:u.CSS(u.CSS.BE("resize","handle"),u.CSS.bordered(u.K.swap(x))),onDragStart:l,onDrag:f.preventDefault,onDragEnd:f.preventDefault})]})},ea=({onResize:e,count:t,initialSizes:n=[],minSize:s=100,direction:r="x"})=>{const i=g.useRef(null),[l,a]=g.useState({sizeDistribution:Qh(n,t),root:null}),c=g.useCallback((p,m,h)=>{if(i.current==null)return;const j=u.$t.dim(u.$t.construct(i.current),r);a(E=>so(E,j,p,s,m,h))},[s,a,r]);g.useEffect(()=>e?.(l.sizeDistribution),[l.sizeDistribution,e]);const d=g.useCallback((p,m)=>{p.preventDefault();const h=r==="x"?"clientX":"clientY",j=S=>c(m,S[h]),E=()=>{a(S=>({...S,root:null})),document.removeEventListener("mousemove",j)};a(S=>({...S,root:p[h]})),document.addEventListener("mousemove",j),document.addEventListener("mouseup",E,{once:!0})},[a,r,so]);return{setSize:g.useCallback((p,m)=>c(p,void 0,m),[so]),props:{direction:r,sizeDistribution:l.sizeDistribution,onDragHandle:d,ref:i}}},ta=({ref:e,direction:t="x",children:n,sizeDistribution:s,onDragHandle:r,className:i,...l})=>{const a=u.g.construct(t),c=g.Children.toArray(n);return s=eg(s),o.jsxRuntimeExports.jsx(f.Box,{...l,ref:e,direction:a,className:u.CSS(u.CSS.B("resize-multiple"),i),empty:!0,grow:!0,children:c.map((d,x)=>o.jsxRuntimeExports.jsx(qo,{onDragStart:p=>r(p,x),location:u.g.location(a),size:s[x]*100,sizeUnits:"%",showHandle:x!==c.length-1,children:d},x))})},Qh=(e,t)=>{const n=e.reduce((r,i)=>r+i,0),s=t-e.length;if(s<=0)return e.slice(0,t).map(r=>r/n);if(e.every(r=>r<=1)){const r=1-n;return[...e,...Array(s).fill(r/s)]}return e.map(()=>1/t)},no=.001,eg=e=>e.every(t=>u.nr.closeTo(t,1/e.length),no)?e.map((t,n)=>n%2===0?t+no:n===e.length-1?t:t-no):e,so=(e,t,n,s,r,i)=>{const l=na(e,t,n,r,i),[a,c]=tg(e.sizeDistribution,n,l,s/t),d=c?r??null:e.root;return{...e,sizeDistribution:a,root:d}},na=(e,t,n,s,r)=>{let i;if(r!=null)r>1&&(r/=t),i=r-e.sizeDistribution[n];else if(s!=null){if(e.root===null)throw new Error("resize root is null during handle drag");i=(s-e.root)/t}else throw new Error("must provide either a MouseEvent or a targetSize");return i},tg=(e,t,n,s)=>{let r=t;for(;r>0&&e[r]+n<=s;)r--;const i=e[r]+n,l=ng(r,e,s,n),a=e[l]-n;return i<s||a<s?[e,!1]:[e.map((c,d)=>d===r?i:d===l?a:c),!0]},ng=(e,t,n,s)=>(e===t.length-1?og:sg)(e,t,n,s),sg=(e,t,n,s)=>{let r=e+1;for(;r<t.length-1&&t[r]-s<=n;)r++;return r},og=(e,t,n,s)=>{let r=e-1;for(;r>0&&t[r]-s<=n;)r--;return r},oo=2,rg=100,sa=({onCollapse:e,onResize:t,location:n="left",minSize:s,maxSize:r,initialSize:i=200,collapseThreshold:l=1/0,className:a,...c})=>{const[d,x]=g.useState(u.R(i,s,r)),p=g.useRef(null),m=u.K.construct(n),h=g.useCallback(y=>{if(p.current===null)return 0;const C=u.$t.dim(y,u.K.direction(m),!0)*(1-2*Number(["bottom","right"].includes(m))),M=p.current+C,k=u.R(M,s,r);return(k-M)/(s??rg)>l?oo:k},[m,s,r,l]),j=g.useRef(null),E=g.useCallback(y=>{const C=h(y);x(C),j.current!=null&&t?.(C,u.$t.construct(j.current))},[t,h]),S=g.useCallback(()=>x(y=>(p.current=y,y)),[x]),R=g.useCallback(y=>h(y)===oo&&e?.(),[e,h]);g.useEffect(()=>{s==null||r==null||x(y=>{const C=u.R(y,s,r);return p.current=C,C})},[s,r]);const v=Pe.useCursorDrag({onMove:E,onStart:S,onEnd:R});return o.jsxRuntimeExports.jsx(qo,{ref:j,location:m,size:d,onDragStart:v,className:u.clsx(a,u.CSS.expanded(d!==oo)),...c})},ig=Object.freeze(Object.defineProperty({__proto__:null,Core:qo,Multiple:ta,Single:sa,calculateDiffPercentage:na,useMultiple:ea},Symbol.toStringTag,{value:"Module"})),Jo=({aetherKey:e,enabled:t=!0})=>{const{setState:n}=f.useLifecycle({aetherKey:e,type:N.Eraser.TYPE,schema:N.eraserStateZ,initialState:{region:u.$t.ZERO,enabled:t}}),s=f.useSyncedRef(t);return{erase:g.useCallback(i=>{n({enabled:s.current,region:i})},[n,s])}},lg=({aetherKey:e,children:t})=>{const{erase:n}=Jo({aetherKey:e}),s=f.useResize(n);return o.jsxRuntimeExports.jsx("div",{ref:s,className:u.CSS(u.CSS.inheritDims()),children:t})},ag=Object.freeze(Object.defineProperty({__proto__:null,Eraser:lg,use:Jo},Symbol.toStringTag,{value:"Module"})),cg=({items:e,initialKey:t})=>{const[n,s]=g.useState(t),r=l=>s(l===n?void 0:l),i=e.find(l=>l.key===n);return{onSelect:r,activeItem:i}},ug=({activeItem:e,children:t,onSelect:n,location:s="left",collapseThreshold:r=.65,className:i,onResize:l,onCollapse:a,eraseEnabled:c,...d})=>{const x=u.K.direction(s);c??=e!=null;const p=g.useCallback(()=>{a?a():e!=null&&n?.(e.key)},[n,e?.key,a]),{erase:m}=Jo({enabled:c}),h=g.useCallback((v,y)=>{l?.(v,y),m(y)},[l,m]),{content:j,minSize:E,maxSize:S,initialSize:R=0}=e??{};return o.jsxRuntimeExports.jsx(sa,{className:u.CSS(u.CSS.B("nav-drawer"),u.CSS.dir(x),u.CSS.visible(e!=null),i),collapseThreshold:r,onCollapse:p,location:s,onResize:h,minSize:E,maxSize:S,initialSize:R,...d,children:j})},dg=Object.freeze(Object.defineProperty({__proto__:null,Bar:f.Bar,Drawer:ug,useDrawer:cg},Symbol.toStringTag,{value:"Module"})),Qo={info:"var(--pluto-text-color)",error:"var(--pluto-error-z)",warning:"var(--pluto-warning-m1)",success:"var(--pluto-primary-z)",loading:"var(--pluto-text-color)",disabled:"var(--pluto-gray-l8)"},er=({variant:e,...t})=>e==="loading"?o.jsxRuntimeExports.jsx(f.Loading,{...t}):o.jsxRuntimeExports.jsx(f.Circle,{color:e!=null?Qo[e]:void 0,...t}),xg=({action:e})=>g.isValidElement(e)?e:g.createElement(f.Button,{...e,key:e.key,size:"tiny"}),pg=({status:{key:e,time:t,count:n,message:s,description:r,variant:i},silence:l,actions:a,className:c,children:d,...x})=>{const p=g.useRef(null);return o.jsxRuntimeExports.jsxs(f.Box,{className:u.CSS(u.CSS.B("notification"),c),y:!0,empty:!0,ref:p,...x,children:[o.jsxRuntimeExports.jsxs(f.Box,{x:!0,justify:"between",grow:!0,style:{width:"100%"},children:[o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",gap:"small",children:[o.jsxRuntimeExports.jsx(er,{style:{height:"2.25rem",width:"2.5rem"},variant:i}),o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:`x${n}`}),o.jsxRuntimeExports.jsx(f.DateTime,{className:u.CSS(u.CSS.BE("notification","time")),level:"small",format:"time",children:t})]}),o.jsxRuntimeExports.jsx(f.Button,{className:u.CSS(u.CSS.BE("notification","silence")),variant:"outlined",size:"small",onClick:()=>l(e),children:o.jsxRuntimeExports.jsx(f.Close,{})})]}),o.jsxRuntimeExports.jsxs(f.Box,{y:!0,align:"start",className:u.CSS(u.CSS.BE("notification","content")),gap:"small",children:[d??o.jsxRuntimeExports.jsx(f.Text,{className:u.CSS(u.CSS.BE("notification","message")),style:{flexGrow:1},children:s}),r!=null&&o.jsxRuntimeExports.jsx(f.Text,{className:u.CSS(u.CSS.BE("notification","description")),level:"small",style:{flexGrow:1},children:r})]}),a!=null&&o.jsxRuntimeExports.jsx(f.Box,{x:!0,align:"center",justify:"end",className:u.CSS(u.CSS.BE("notification","actions")),children:N.t.toArray(a).map(m=>o.jsxRuntimeExports.jsx(xg,{action:m},m.key))})]},t.toString())},mg=Object.freeze(Object.defineProperty({__proto__:null,Aggregator:f.Aggregator,Indicator:er,Notification:pg,Summary:f.Summary,VARIANT_COLORS:Qo,useAdder:f.useAdder,useErrorHandler:f.useErrorHandler,useNotifications:f.useNotifications},Symbol.toStringTag,{value:"Module"})),oa=e=>e==="preview"?"connected":e,ra=e=>e==="preview"?"preview":void 0,bs=({resourceName:e,value:t,onChange:n,data:s,getItem:r,subscribe:i,haulType:l,icon:a,disabled:c,onSearch:d,emptyContent:x,status:p,onFetchMore:m,children:h,renderTag:j,actions:E,allowNone:S,replaceOnSingle:R,triggerProps:v,virtual:y=!0,dialogProps:C,variant:M="connected",...k})=>o.jsxRuntimeExports.jsx(f.Frame,{variant:oa(M),...k,children:o.jsxRuntimeExports.jsxs(f.Frame$1,{multiple:!0,value:t,onChange:n,data:s,getItem:r,subscribe:i,onFetchMore:m,allowNone:S,replaceOnSingle:R,virtual:y,children:[o.jsxRuntimeExports.jsx(la,{haulType:l,icon:a,placeholder:`Select ${e}s`,disabled:c,variant:ra(M),...v,children:j}),o.jsxRuntimeExports.jsx(f.Dialog$2,{onSearch:d,emptyContent:x,status:p,actions:E,resourceName:e,...C,children:h})]})}),Ge=(e,t)=>{const n={};t.forEach(r=>n[r]=void 0);const s=r=>{const{...i}={...r,...n};return o.jsxRuntimeExports.jsx(e,{...i})};return s.displayName=`RemoveProps(${e.displayName})`,s},ia=e=>o.jsxRuntimeExports.jsxs(fe.Buttons,{...e,keys:N.SIZES,children:[o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"tiny",children:"L"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"small",children:"M"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"medium",children:"L"})]}),fg=Object.freeze(Object.defineProperty({__proto__:null,SIZES:N.SIZES,SelectSize:ia,isRenderProp:f.isRenderProp,isSize:N.isSize,removeProps:Ge,renderProp:f.renderProp,size:N.size},Symbol.toStringTag,{value:"Module"})),vs=({children:e="",size:t="medium",color:n,icon:s,onClose:r,className:i,onDragStart:l,...a})=>{const c=u.ir.cssString(n);s==null&&n!=null&&(s=o.jsxRuntimeExports.jsx(f.Circle,{color:c}));const d=r==null?void 0:o.jsxRuntimeExports.jsx(f.Button,{"aria-label":"close",size:t==="tiny"?"small":t,variant:"text",className:u.CSS.BE("tag","close"),sharp:!0,onClick:x=>{x.stopPropagation(),r()},children:o.jsxRuntimeExports.jsx(f.Close,{})});return o.jsxRuntimeExports.jsxs(f.Button,{el:"div",className:u.CSS(i,u.CSS.B("tag"),r!=null&&u.CSS.BM("tag","closeable")),size:t,overflow:"nowrap",align:"center",gap:"small",onDragStart:l,...a,children:[s,d,e]})},tr=({children:e,onClick:t,variant:n="outlined",size:s="medium",...r})=>o.jsxRuntimeExports.jsx(f.Button,{el:"div",variant:n,size:s,x:!0,onClick:t,align:"center",gap:"small",style:{padding:"0rem 0.5rem",paddingRight:"2rem"},rounded:!0,...r,children:e}),hg=Object.freeze(Object.defineProperty({__proto__:null,Tag:vs,Tags:tr},Symbol.toStringTag,{value:"Module"})),gg=({itemKey:e,icon:t,onDragStart:n})=>{const s=f.useItem(e),{onSelect:r}=f.useItemState(e);if(s==null)return null;const{name:i,icon:l}=s;return o.jsxRuntimeExports.jsx(vs,{onClose:r,onDragStart:()=>n(e),draggable:!0,size:"small",icon:l??t,children:i})},jg=f.renderProp(gg),nr=({items:e},t,n,s)=>{if(t===""||s===!0)return!1;const r=f.filterByType(t,e);return r.length>0&&!r.every(i=>n.includes(i.key))},la=({haulType:e="",disabled:t,placeholder:n="Select...",variant:s="outlined",icon:r,children:i=jg})=>{const l=f.useSelection(),a=f.useSyncedRef(l),{setSelected:c}=f.useContext$2(),{toggle:d,visible:x}=f.useContext$1(),p=g.useCallback(v=>nr(v,e,N.t.toArray(l),t),[e,l,t]),{startDrag:m,...h}=f.useDragAndDrop({type:e,canDrop:p,onDrop:f.useFilterByTypeCallback(e,({items:v})=>{const y=N.t.toArray(a.current);return c(u.c.unique([...N.t.toArray(y),...v.map(C=>C.key)])),v},[c])}),j=g.useCallback(({dropped:v})=>{const y=l.filter(C=>!v.some(M=>M.key===C));c(y)},[c,l]),E=g.useCallback(v=>{m([{key:v,type:e}],j)},[m,j,e]),S=f.useDraggingState(),R=s==="text"&&l.length!==0;return o.jsxRuntimeExports.jsxs(tr,{full:"x",onClick:()=>{R||d()},...h,className:u.CSS(u.CSS.dropRegion(p(S)),u.CSS.BE("dialog","trigger"),u.CSS.BM("variant",s)),variant:s,preventClick:R,grow:!0,children:[l.length===0&&o.jsxRuntimeExports.jsxs(f.Text,{color:8,weight:400,style:{padding:"0 1rem"},children:[r,n]}),l.map(v=>i({key:v,itemKey:v,onDragStart:E,icon:r})),s!=="text"&&o.jsxRuntimeExports.jsx(zl.Animated,{className:u.CSS.level("p"),enabled:x,enabledLoc:"bottom",disabledLoc:"left",color:8}),R&&o.jsxRuntimeExports.jsx(f.Button,{variant:s,onClick:v=>{v.stopPropagation(),d()},children:o.jsxRuntimeExports.jsx(f.Add,{color:8})})]})},It=({resourceName:e,onChange:t,value:n,allowNone:s,emptyContent:r,haulType:i,data:l,getItem:a,subscribe:c,itemHeight:d,onFetchMore:x,disabled:p,onSearch:m,status:h,icon:j,children:E,variant:S="connected",actions:R,dialogProps:v,triggerProps:y,virtual:C=!0,closeDialogOnSelect:M=!0,...k})=>o.jsxRuntimeExports.jsx(f.Frame,{...k,variant:oa(S),children:o.jsxRuntimeExports.jsxs(f.Frame$1,{value:n,onChange:t,data:l,getItem:a,subscribe:c,allowNone:s,onFetchMore:x,itemHeight:d,virtual:C,closeDialogOnSelect:M,children:[o.jsxRuntimeExports.jsx(aa,{haulType:i,icon:j,placeholder:`Select a ${e}`,disabled:p,variant:ra(S),...y}),o.jsxRuntimeExports.jsx(f.Dialog$2,{onSearch:m,resourceName:e,emptyContent:r,status:h,actions:R,...v,children:E})]})}),aa=({haulType:e="",placeholder:t,icon:n,disabled:s,iconOnly:r=!1,hideCaret:i=!1,...l})=>{const a=f.useSelection(),{setSelected:c}=f.useContext$2(),[d]=a,x=f.useItem(d),{name:p,icon:m}=x??{},h=g.useCallback(S=>nr(S,e,a,s),[e,a,s]),j=f.useDrop({type:e,canDrop:h,onDrop:f.useFilterByTypeCallback(e,({items:S})=>(S.length!==0&&c([S[0].key]),S),[c])}),E=f.useDraggingState();return o.jsxRuntimeExports.jsxs(Vl.Trigger,{variant:"outlined",gap:"small",className:u.CSS(u.CSS.dropRegion(h(E))),disabled:s,...j,...l,hideCaret:i||r,textColor:p==null?8:void 0,children:[m??n,!r&&(p??t)]})},Eg=f.renderProp(e=>{const{itemKey:t}=e,n=f.useItem(t);if(n==null)return null;const{name:s,icon:r}=n;return o.jsxRuntimeExports.jsxs(f.ListItem,{...e,children:[r,s]})}),Mn=({data:e,filter:t,children:n=Eg,...s})=>{const{retrieve:r,...i}=f.useStaticData({data:e,filter:t}),{fetchMore:l,search:a}=Qe.usePager({retrieve:r});return o.jsxRuntimeExports.jsx(It,{...s,...i,onFetchMore:l,onSearch:a,children:n})},nn=e=>o.jsxRuntimeExports.jsxs(fe.Buttons,{...e,keys:N.LEVELS,children:[o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"h2",square:!0,children:"XL"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"h3",square:!0,children:"L"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"h4",square:!0,children:"M"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"h5",square:!0,children:"S"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"small",square:!0,children:"XS"})]}),yg=[250,400,500,600],ca=e=>o.jsxRuntimeExports.jsxs(fe.Buttons,{...e,keys:yg,children:[o.jsxRuntimeExports.jsx(fe.Button,{itemKey:250,children:"Light"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:400,children:"Normal"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:500,children:"Medium"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:600,children:"Bold"})]}),Sg=Object.freeze(Object.defineProperty({__proto__:null,Level:nn,Weight:ca},Symbol.toStringTag,{value:"Module"})),Rg=Object.freeze(Object.defineProperty({__proto__:null,Button:fe.Button,Buttons:fe.Buttons,Core:f.Core,Dialog:f.Dialog$2,Frame:f.Frame$1,ListItem:f.ListItem,Multiple:bs,MultipleTrigger:la,Single:It,SingleTrigger:aa,Static:Mn,Text:Sg,staticCanDrop:nr,useClear:f.useClear,useContext:f.useContext$2,useHover:f.useHover,useItemState:f.useItemState,useMultiple:f.useMultiple,useSelection:f.useSelection,useSingle:f.useSingle},Symbol.toStringTag,{value:"Module"})),Cg=()=>o.jsxRuntimeExports.jsx(f.Caret.Right,{className:u.CSS.BE("breadcrumb","separator")}),En=({children:e,...t})=>o.jsxRuntimeExports.jsx(f.Text,{className:u.CSS.BE("breadcrumb","segment"),...t,defaultEl:"span",children:e}),sr=({children:e,highlightVariant:t,...n})=>o.jsxRuntimeExports.jsx(f.Text,{className:u.CSS(u.CSS.B("breadcrumb"),t!=null&&u.CSS.BM("breadcrumb","highlight",t)),x:!0,align:"center",gap:"small",...n,children:g.Children.map(e,(s,r)=>s==null||typeof s=="boolean"?null:o.jsxRuntimeExports.jsxs(g.Fragment,{children:[r>0&&o.jsxRuntimeExports.jsx(Cg,{}),typeof s=="string"?o.jsxRuntimeExports.jsx(En,{children:s}):s]},r))}),wg=(e,t)=>{const n=e.split("/");return n.map((s,r)=>t({href:n.slice(0,r+1).join("/"),segment:s,index:r}))},bg=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumb:sr,Segment:En,mapURLSegments:wg},Symbol.toStringTag,{value:"Module"})),or=g.createContext(null),rr=()=>f.useRequiredContext(or),vt=(e,t,n,s)=>({variant:"loading",status:u._r.create({variant:"loading",message:`${u.z.capitalize(t)} ${e}`}),data:n,listenersMounted:s}),Ue=(e,t,n,s)=>({variant:"success",status:u._r.create({variant:"success",message:`${u.z.capitalize(t)} ${e}`}),data:n,listenersMounted:s}),lt=(e,t,n,s)=>({variant:"error",status:u._r.fromException(n,`Failed to ${t} ${e}`),data:null,listenersMounted:s}),_s=(e,t,n)=>lt(e,t,new N.bm(`Cannot ${t} ${e} because no cluster is connected.`),n),ua=()=>{const e=g.useRef({mountCalled:!1,destructor:()=>{}}),t=rr();return g.useEffect(()=>()=>e.current.destructor(),[]),g.useCallback(({listeners:n,onOpen:s})=>{if(n==null||n.length===0||e.current.mountCalled)return;e.current.mountCalled=!0;let r=0;const i=()=>{r++,r===n.length&&s?.()},l=n.map(({channel:a,handler:c})=>t({channel:a,handler:c,onOpen:i}));e.current.destructor=()=>l.forEach(a=>a())},[t])},hn={..._.ZERO_CONTEXT_VALUE,state:N.Qp.connectivity.DEFAULT},ir=g.createContext(hn),da=()=>g.use(ir),et=()=>da().client,vg=()=>da().state,bo={connected:"success",connecting:"loading",disconnected:"disabled",failed:"error"},xa="serverVersionMismatch",_g=(e,t,n)=>`Cluster version ${n!=null?`${n} `:""}is ${e?"older":"newer"} than client version ${t}. Compatibility issues may arise.`,Mg=({children:e,client:t})=>{const{path:n}=f.useUnidirectional({type:_.Provider.TYPE,schema:_.Provider.stateZ,state:{props:null,state:null}});return o.jsxRuntimeExports.jsx(ir,{value:{...hn,client:t},children:o.jsxRuntimeExports.jsx(f.Composite,{path:n,children:e})})},pa=({children:e,connParams:t})=>{const[n,s,r]=f.useCombinedStateAndRef(hn),{path:i}=f.useUnidirectional({type:_.Provider.TYPE,schema:_.Provider.stateZ,state:{props:t??null,state:null}}),l=f.useAdder(),a=g.useCallback(c=>{r.current.state.status!==c.status&&l({variant:bo[c.status],message:c.message??u.z.capitalize(c.status)}),s(d=>({...d,state:c}))},[l]);return Ke(async c=>{if(n.client!=null&&n.client.close(),t==null)return s(hn);const d=new N.Qp({...t,connectivityPollFrequency:N.O$1.seconds(2)});s({client:d,state:{clusterKey:"",status:"connecting",message:"Connecting...",clientServerCompatible:!1,clientVersion:d.clientVersion}});const x=await d.connectivity.check();if(!c.aborted){if(s({client:d,state:x}),l({variant:bo[x.status],message:x.message??x.status.toUpperCase()}),x.status==="connected"&&!x.clientServerCompatible){const p=x.nodeVersion==null||u.pr.semVerOlder(x.nodeVersion,x.clientVersion),m=_g(p,x.clientVersion,x.nodeVersion);l({variant:"warning",message:"Incompatible cluster version",description:m,details:{type:xa,oldServer:p,nodeVersion:x.nodeVersion,clientVersion:x.clientVersion}})}return d.connectivity.onChange(a),()=>{d.close(),s(hn)}}},[t,a]),o.jsxRuntimeExports.jsx(ir,{value:n,children:o.jsxRuntimeExports.jsx(f.Composite,{path:i,children:e})})},Ng=Object.freeze(Object.defineProperty({__proto__:null,CONNECTION_STATE_VARIANTS:bo,Provider:pa,SERVER_VERSION_MISMATCH:xa,TestProvider:Mg,use:et,useConnectionState:vg},Symbol.toStringTag,{value:"Module"})),ma=e=>{const[t,n]=g.useState(vt(e.name,"retrieving",null,!1));return{...t,...fa({...e,onChange:n})}},fa=({retrieve:e,listeners:t=[],name:n,onChange:s})=>{const r=et(),i=g.useRef(null),l=f.useInitializerRef(()=>new _.Mutex),a=ua(),c=g.useCallback(async(x,p={})=>{const{signal:m}=p,h=N.executeSetter(x,i.current??{});i.current=h;try{if(r==null)return s(E=>_s(n,"retrieve",E.listenersMounted));s(E=>vt(n,"retrieving",E.data,E.listenersMounted));const j=await e({client:r,params:h});if(m?.aborted)return;a({onOpen:()=>s(E=>({...E,listenersMounted:!0})),listeners:t.map(E=>({channel:E.channel,handler:S=>void l.current.runExclusive(async()=>{if(!(r==null||i.current==null))try{await E.onChange({client:r,params:i.current,changed:S.get(E.channel),onChange:R=>{s(v=>{if(v.data==null)return v;const y=N.executeSetter(R,v.data);return Ue(n,"retrieved",y,v.listenersMounted)})}})}catch(R){if(m?.aborted)return;s(v=>lt(n,"retrieve",R,v.listenersMounted))}})}))}),s(E=>Ue(n,"retrieved",j,E.listenersMounted))}catch(j){if(m?.aborted)return;s(E=>lt(n,"retrieve",j,E.listenersMounted))}},[r,n,a]);return{retrieve:g.useCallback((x,p)=>void c(x,p),[c]),retrieveAsync:c}},kg=({params:e,...t})=>{const{retrieveAsync:n,retrieve:s,...r}=ma(t),i=f.useMemoDeepEqual(e);return Ke(async l=>await n(i,{signal:l}),[n,i]),r},Lg=({params:e,...t})=>{const{retrieveAsync:n}=fa(t),s=f.useMemoDeepEqual(e);Ke(async r=>await n(s,{signal:r}),[n,s])},ct=e=>({useDirect:t=>kg({...e,...t}),useStateful:()=>ma(e),useEffect:t=>Lg({...e,...t})}),ha=({onChange:e,params:t,update:n,name:s})=>{const r=et(),i=g.useCallback(async(a,c={})=>{const{signal:d}=c;try{if(r==null)return e(p=>_s(s,"update",p.listenersMounted)),!1;e(p=>vt(s,"updating",p.data,p.listenersMounted));let x=!1;return await n({client:r,onChange:p=>{x=!0,e(m=>Ue(s,"updated",p,m.listenersMounted))},value:a,params:t}),d?.aborted===!0?!1:(x||e(p=>Ue(s,"updated",a,p.listenersMounted)),!0)}catch(x){return d?.aborted!==!0&&e(p=>lt(s,"update",x,p.listenersMounted)),!1}},[s,t]);return{update:g.useCallback((a,c)=>void i(a,c),[i]),updateAsync:i}},Pg=({params:e,name:t,...n})=>{const[s,r]=g.useState(Ue(t,"updated",null,!1)),i=ha({...n,name:t,onChange:r,params:e});return{...s,...i}},Ot=e=>({useObservable:t=>ha({...t,...e}),useDirect:t=>Pg({...t,...e})}),lr=g.createContext({mode:"normal",bind:()=>()=>{},set:()=>{},reset:()=>{},remove:()=>{},get:()=>({value:void 0,status:{key:"",variant:"success",message:""},touched:!1,required:!1}),validate:()=>!1,validateAsync:()=>Promise.resolve(!1),value:()=>({}),has:()=>!1,setStatus:()=>{},clearStatuses:()=>{},setCurrentStateAsInitialValues:()=>{}}),sn=e=>{const t=g.use(lr);return e??t},Et=(e,t={})=>{const{optional:n=!1,onChange:s,defaultValue:r}=t,i=sn(t?.ctx),{get:l,bind:a,set:c,setStatus:d}=i,x=g.useCallback(j=>{s?.(j,{...i,path:e}),c(e,j)},[e,c,s]),p=g.useCallback(j=>d(e,j),[e,d]),m=g.useSyncExternalStore(a,g.useCallback(()=>l(e,{optional:n,defaultValue:r}),[e,l,n,r]));if(m==null){if(!n)throw new Error(`Field state is null: ${e}`);return null}const h=i.mode==="preview"?"preview":void 0;return{onChange:x,setStatus:p,variant:h,...m}},ar=(e,t)=>{const{get:n,bind:s}=sn(t?.ctx);return g.useSyncExternalStore(s,g.useCallback(()=>n(e,t),[e,n,t]))},cr=(e,t)=>ar(e,t)?.value??null,Tg=e=>ar(e,{optional:!0})?.status?.variant==="success",ga=(e,t)=>({value:()=>e.get(t).value,add:(n,s)=>{const r=u.br(e.get(t).value);r.splice(s,0,...N.t.toArray(n)),e.set(t,r)},push:(n,s)=>{const r=u.br(e.get(t).value);r.push(...N.t.toArray(n)),s!=null&&r.sort(s),e.set(t,r)},remove:n=>{const s=e.get(t).value,r=new Set(N.t.toArray(n)),i=s.filter(({key:l})=>!r.has(l));return e.set(t,i),i.map(({key:l})=>l)},keepOnly:n=>{const s=e.get(t).value,r=new Set(N.t.toArray(n)),i=s.filter(({key:l})=>r.has(l));return e.set(t,i),i.map(({key:l})=>l)},set:n=>e.set(t,N.executeSetter(n,e.get(t).value)),sort:n=>{const s=u.br(e.get(t).value);s.sort(n),e.set(t,s)}}),Ag=(e,t={})=>{const n=sn(t?.ctx),s=cr(e,t);return g.useMemo(()=>({data:s.map(({key:r})=>r),...ga(n,e)}),[s,n,e])},Ig=f.renderProp(e=>o.jsxRuntimeExports.jsx(f.Text$2,{...e})),Ee=({path:e,children:t=Ig,label:n,padHelpText:s=!0,visible:r=!0,hideIfNull:i=!1,optional:l,onChange:a,className:c,defaultValue:d,...x})=>{const p=Et(e,{optional:l??i,onChange:a,defaultValue:d}),m=sn();if(p==null)return null;if(e==null)throw new Error("No path provided to Form Field");if(n??=u.z.capitalize(N.m.element(e,-1)),r=typeof r=="function"?r(p,m):r,!r)return null;const h=p.status.message,{onChange:j,value:E}=p,S={onChange:j,value:E};return p.variant!=null&&(S.variant=p.variant),o.jsxRuntimeExports.jsx(Te.Item,{padHelpText:s,helpText:h,status:p.status.variant,label:n,required:p.required,className:u.CSS(c,u.CSS.BE("field",e.split(".").join("-")),u.CSS.M(p.status.variant)),...x,children:t(S)})},Nn=e=>({fieldKey:t,fieldProps:n,inputProps:s})=>{const r=({inputProps:i,path:l,fieldKey:a=t,optional:c,defaultValue:d,...x})=>o.jsxRuntimeExports.jsx(Ee,{...n,...x,defaultValue:d,optional:c,path:a?`${l}.${a}`:l,children:p=>o.jsxRuntimeExports.jsx(e,{...p,...s,...i})});return r.displayName=e.displayName,r},ja=Nn(f.Numeric),De=ja({inputProps:{}}),Ea=Nn(f.Text$2),ur=Ea({inputProps:{}}),ya=Nn(f.Switch$1),Ms=ya({inputProps:{}}),Og=e=>Nn(Mn)(e),$g=({children:e,...t})=>o.jsxRuntimeExports.jsx(lr,{value:t,children:e}),Bg=e=>e.code==="custom"&&e.params!=null&&"variant"in e.params?e.params.variant:"error";class Dg extends _.a.Observer{schema;values;initialValues;statuses;touched;cachedRefs;constructor(t,n){super(),this.schema=n,this.values=N.m.copy(t),this.statuses=new Map,this.touched=new Set,this.cachedRefs=new Map,this.initialValues=N.m.copy(this.values)}setValue(t,n){t==""?this.values=N.m.copy(n):N.m.set(this.values,t,n),this.checkTouched(t,n),this.updateCachedRefs(t)}checkTouched(t,n){const s=N.m.get(this.initialValues,t,{optional:!0});N.m.equal(s,n)?this.clearTouched(t):this.setTouched(t)}setStatus(t,n){this.statuses.set(t,n),this.updateCachedRefs(t)}clearStatus(t=""){this.statuses.delete(t),this.updateCachedRefs(t)}reset(t){t!=null&&(this.initialValues=t);const n=N.m.copy(this.initialValues);this.statuses.clear(),this.touched.clear();const s=new Set;this.cachedRefs.forEach((r,i)=>{const l=N.m.get(this.values,i,{optional:!0}),a=N.m.get(n,i,{optional:!0});l!==a&&s.add(i)}),s.forEach(r=>this.cachedRefs.delete(r)),this.values=n}setCurrentStateAsInitialValues(){this.initialValues=N.m.copy(this.values),this.touched.clear(),this.cachedRefs.clear()}setTouched(t){this.touched.add(t),this.updateCachedRefs(t)}clearTouched(t=""){t===""?this.touched.clear():this.touched.delete(t),this.updateCachedRefs(t),this.notify()}remove(t){N.m.remove(this.values,t),this.statuses.delete(t),this.clearTouched(t),this.cachedRefs.delete(t)}validate(t,n){if(this.schema==null)return!0;const s=this.schema.safeParse(this.values);return this.processValidation(t,s,n)}async validateAsync(t,n){if(this.schema==null)return!0;const s=await this.schema.safeParseAsync(this.values);return this.processValidation(t,s,n)}processValidation(t=!1,n,s){if(this.schema==null)return!0;const r=new Set;if(this.statuses.forEach((l,a)=>{l.variant!=="success"&&r.add(a)}),r.forEach(l=>this.clearStatus(l)),n.success)return!0;let i=!0;return n.error.issues.forEach(l=>{const{message:a}=l,c=l.path.join(".");if(s!=null&&!N.m.pathsMatch(c,s)&&!N.m.pathsMatch(s,c)||!t&&!this.touched.has(c))return;const d=Bg(l);d!=="warning"&&(i=!1),this.setStatus(c,{key:c,variant:d,message:a})}),i}get hasBeenTouched(){return this.touched.size>0}getState(t,n={}){const{optional:s=!1,defaultValue:r=void 0}=n,i=u.hr.getOrSetDefault(this.cachedRefs,t,{});let l=N.m.get(this.values,t,{optional:s||r!=null});if(l==null){if(r==null)return null;l=r,this.setValue(t,l)}if(i.value=l,i.required=!1,this.schema!=null){const a=zh.getFieldSchema(this.schema,t,{optional:!0});a!=null&&(i.required=!a.safeParse(void 0).success)}return i.status=u.hr.getOrSetDefault(this.statuses,t,{key:t,variant:"success",message:""}),i.touched=this.touched.has(t),i}updateCachedRefs(t){this.cachedRefs.forEach((n,s)=>{(N.m.pathsMatch(s,t)||N.m.pathsMatch(t,s))&&this.cachedRefs.set(s,{})})}}const dr=({values:e,sync:t=!1,schema:n,mode:s="normal",onChange:r,onHasTouched:i})=>{const l=f.useInitializerRef(()=>new Dg(e,n)),a=f.useSyncedRef(r),c=f.useErrorHandler(),d=f.useSyncedRef(i),x=g.useCallback(()=>{l.current.setCurrentStateAsInitialValues(),d.current?.(!1)},[]),p=g.useCallback(M=>l.current.onChange(M),[]),m=g.useCallback((M,k)=>l.current.getState(M,k),[]),h=g.useCallback(M=>{l.current.remove(M),l.current.notify()},[]),j=g.useCallback(M=>{const k=l.current.values,A=l.current.hasBeenTouched;l.current.reset(M),k!==l.current.values&&a.current?.({values:l.current.values,path:"",prev:k,valid:!0}),l.current.notify();const B=l.current.hasBeenTouched;B!==A&&d.current?.(B)},[]),E=g.useCallback(async M=>{const k=await l.current.validateAsync(!0,M);return l.current.notify(),k},[]),S=g.useCallback(M=>{const k=l.current.validate(!0,M);return l.current.notify(),k},[]),R=g.useCallback((M,k)=>{const A=N.m.get(l.current.values,M,{optional:!0}),I=l.current.hasBeenTouched;l.current.setValue(M,k);const B=()=>{a.current?.({values:l.current.values,path:M,prev:A,valid:!0}),l.current.notify();const V=l.current.hasBeenTouched;V!==I&&d.current?.(V)};try{l.current.validate()}catch{return c(async()=>{await l.current.validateAsync(),B()},"Failed to validate form")}B()},[]),v=g.useCallback(M=>N.m.has(l.current.values,M),[]),y=g.useCallback((M,k)=>{const A=l.current.hasBeenTouched;l.current.setStatus(M,k),l.current.notify();const I=l.current.hasBeenTouched;I!==A&&d.current?.(I)},[]),C=g.useCallback(()=>{l.current.clearStatus(),l.current.notify()},[]);return g.useEffect(()=>{t&&(l.current.reset(e),l.current.notify())},[t,e]),g.useMemo(()=>({bind:p,set:R,get:m,mode:s,validate:S,validateAsync:E,value:()=>l.current.values,has:v,remove:h,setStatus:y,clearStatuses:C,reset:j,setCurrentStateAsInitialValues:x}),[p,R,m,S,E,v,h,y,C,j,s,x])},Sa=({key:e,open:t,onChange:n})=>{const s=f.useMemoPrimitiveArray(e);Ke(async()=>{if(t==null)return;const r=await t();if(r==null)return;const i=r.onChange(n);return async()=>{i(),await r.close()}},[t==null,s])},zg=Object.freeze(Object.defineProperty({__proto__:null,useListener:Sa},Symbol.toStringTag,{value:"Module"})),Hg=({key:e,name:t,queryFn:n,values:s,openObservable:r,applyChanges:i,applyObservable:l,...a})=>{const c=et(),d=f.useErrorHandler(),x=f.useMemoPrimitiveArray(e),p=dr({values:s,...a,sync:!1,onChange:j=>{c!=null&&d(async()=>{await i?.({...j,client:c})},`Failed to apply changes for ${t}`)}});Ke(async()=>{if(c!=null)try{const j=await n({client:c});p.set("",j)}catch(j){d(j,`Failed to retrieve ${t}`)}},[x,c?.key]);const m=g.useCallback(async()=>{if(c!=null)return await r?.(c)},[x,c?.key]),h=g.useCallback(j=>l?.({changes:j,ctx:p}),[x,l]);return Sa({key:x,open:m,onChange:h}),p},Vg=Object.freeze(Object.defineProperty({__proto__:null,Context:lr,Field:Ee,Form:$g,NumericField:De,SwitchField:Ms,TextField:ur,buildNumericField:ja,buildSelectField:Og,buildSwitchField:ya,buildTextField:Ea,fieldBuilder:Nn,fieldListUtils:ga,use:dr,useContext:sn,useField:Et,useFieldList:Ag,useFieldState:ar,useFieldValid:Tg,useFieldValue:cr,useSynced:Hg},Symbol.toStringTag,{value:"Module"})),$t=({name:e,schema:t,retrieve:n,listeners:s,update:r,initialValues:i})=>{const l=ct({name:e,retrieve:n,listeners:s}),a=Ot({name:e,update:r});return({params:c,initialValues:d,autoSave:x=!1,afterSave:p,sync:m,onHasTouched:h,mode:j})=>{const[E,S,R]=f.useCombinedStateAndRef(vt(e,"retrieving",null,!1)),v=dr({schema:t,values:d??i,onChange:({path:A})=>{x&&A!==""&&k()},sync:m,onHasTouched:h,mode:j}),y=g.useCallback((A,I=!0)=>{const B=N.executeSetter(A,R.current);R.current=B,B.data!=null&&(v.set("",B.data),I&&v.setCurrentStateAsInitialValues()),S(B)},[v]);l.useEffect({params:c,onChange:y});const C=g.useCallback(A=>y(A,!1),[y]),{updateAsync:M}=a.useObservable({params:c,onChange:C}),k=g.useCallback(A=>void(async()=>{try{if(!await v.validateAsync()||!await M(v.value(),A))return;p?.({form:v,params:c}),v.setCurrentStateAsInitialValues()}catch(I){S(B=>lt(e,"update",I,B.listenersMounted))}})(),[v,M,p,c]);return{form:v,save:k,...E}}},Fg=()=>!0,Zg=u.a.milliseconds(100),Ve=({name:e,listeners:t,retrieve:n,retrieveByKey:s})=>(r={})=>{const{filter:i=Fg,sort:l,initialParams:a,retrieveDebounce:c=Zg}=r,d=f.useSyncedRef(i),x=f.useSyncedRef(l),p=et(),m=g.useRef(new Map),h=f.useInitializerRef(()=>({mounted:!1,listeners:new Map})),[j,E,S]=f.useCombinedStateAndRef(vt(e,"retrieving",null,!1)),R=g.useRef(!0),v=g.useRef(a??null),y=ua(),C=g.useCallback(D=>h.current.listeners.forEach(($,H)=>{$===D&&H()}),[h]),M=g.useCallback(D=>{if(x.current==null)return D;const $=D.map(H=>m.current.get(H)).filter(H=>H!=null);return $.sort(x.current),$.map(H=>H.key)},[x]),k=g.useCallback(async(D,$={})=>{const{signal:H,mode:w="replace"}=$,P=N.executeSetter(D,v.current??{});v.current=P;try{if(p==null)return E(z=>_s(e,"retrieve",z.listenersMounted));if(E(z=>vt(e,"retrieving",z.data,!1)),w==="replace")R.current=!0;else if(w==="append"&&!R.current)return E(z=>Ue(e,"retrieved",z.data??[],z.listenersMounted));let L=await n({client:p,params:P});if(H?.aborted)return;L=L.filter(d.current),x.current!=null&&(L=L.sort(x.current)),L.length===0&&(R.current=!1);const O=L.map(z=>z.key);return S.current.data!=null&&u.O.primitiveArrays(S.current.data,O)===u.O.EQUAL?E(z=>Ue(e,"retrieved",z.data??[],z.listenersMounted)):(L.forEach(z=>m.current.set(z.key,z)),y({onOpen:()=>{E(z=>({...z,listenersMounted:!0}))},listeners:t?.map(z=>({channel:z.channel,handler:F=>void(async()=>{if(!(p==null||v.current==null))try{await z.onChange({client:p,params:v.current,changed:F.get(z.channel),onDelete:Z=>{m.current.delete(Z),E(Y=>Y.data==null?Y:{...Y,data:Y.data.filter(q=>q!==Z)})},onChange:(Z,Y,q={})=>{const{mode:oe="append"}=q,Q=m.current.get(Z)??null;if(Q!=null&&!d.current(Q))return;const ue=N.executeSetter(Y,Q);ue==null||!d.current(ue)||(m.current.set(Z,ue),E(te=>{if(te.data==null)return te;let ne;if(Q==null)x.current!=null?ne=M([...te.data,Z]):ne=oe==="prepend"?[Z,...te.data]:[...te.data,Z];else if(x.current!=null){const ee=te.data.indexOf(Z),le=M(te.data),ge=le.indexOf(Z);ee!==ge?ne=le:ne=te.data}else ne=te.data;return{...te,data:ne}}),C(Z))}})}catch(Z){if(H?.aborted)return;E(Y=>lt(e,"retrieve",Z,Y.listenersMounted))}})()}))}),E(z=>{if(w==="replace"||z.data==null)return Ue(e,"retrieved",O,z.listenersMounted);const F=new Set(O);return Ue(e,"retrieved",[...z.data.filter(Z=>!F.has(Z)),...O],z.listenersMounted)}))}catch(L){if(H?.aborted)return;E(O=>lt(e,"retrieve",L,O.listenersMounted))}},[p,e,y,d]),A=g.useCallback((D,$={})=>{const{signal:H}=$;(async()=>{try{if(p==null||u.F.isZero(D))return;const w=await s({client:p,key:D,params:v.current??{}});if(H?.aborted||w==null)return;if(!d.current(w)){m.current.set(D,null);return}m.current.set(D,w),C(D)}catch(w){if(H?.aborted)return;m.current.set(D,null),E(P=>lt(e,"retrieve",w,P.listenersMounted))}})()},[s,p,C]),I=g.useCallback(D=>{if(D==null)return;if(Array.isArray(D))return D.map(H=>I(H)).filter(H=>H!=null);const $=m.current.get(D);return $===void 0&&A(D),$},[A]),B=g.useCallback((D,$)=>$==null?()=>{}:(h.current.listeners.set(D,$),()=>h.current.listeners.delete(D)),[]);return{retrieve:Pe.useDebouncedCallback((D,$={})=>void k(D,$),new u.a(c).milliseconds,[k]),retrieveAsync:k,subscribe:B,getItem:I,...j,data:j?.data??[]}},Yg=({key:e,subscribe:t,getItem:n})=>g.useSyncExternalStore(g.useCallback(s=>t(s,e),[t,e]),g.useCallback(()=>n(e),[n,e])),Wg=Object.freeze(Object.defineProperty({__proto__:null,AcquireChannelControl:_.AcquireChannelControl,AuthoritySource:_.AuthoritySource,Chip:_.Chip,Controller:_.Controller,Indicator:_.Indicator,Legend:_.Legend,REGISTRY:_.REGISTRY$16,STATUSES:_.STATUSES,SetChannelValue:_.SetChannelValue,StateProvider:_.StateProvider,acquireChannelControl:_.acquireChannelControl,acquireChannelControlPropsZ:_.acquireChannelControlPropsZ,authoritySource:_.authoritySource,authoritySourceDetailsZ:_.authoritySourceDetailsZ,authoritySourceProps:_.authoritySourceProps,chipStateZ:_.chipStateZ,chipStatusDetailsZ:_.chipStatusDetailsZ,controllerStateZ:_.controllerStateZ,indicatorStateZ:_.indicatorStateZ,indicatorStatusDetailsZ:_.indicatorStatusDetailsZ,legendStateZ:_.legendStateZ,setChannelValue:_.setChannelValue,setChannelValuePropsZ:_.setChannelValuePropsZ,stateProviderStateZ:_.stateProviderStateZ,statusZ:_.statusZ,sugaredStateZ:_.sugaredStateZ},Symbol.toStringTag,{value:"Module"}));var yi=180/Math.PI,vo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ra(e,t,n,s,r,i){var l,a,c;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(c=e*n+t*s)&&(n-=e*c,s-=t*c),(a=Math.sqrt(n*n+s*s))&&(n/=a,s/=a,c/=a),e*s<t*n&&(e=-e,t=-t,c=-c,l=-l),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*yi,skewX:Math.atan(c)*yi,scaleX:l,scaleY:a}}var Zn;function Kg(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?vo:Ra(t.a,t.b,t.c,t.d,t.e,t.f)}function Gg(e){return e==null||(Zn||(Zn=document.createElementNS("http://www.w3.org/2000/svg","g")),Zn.setAttribute("transform",e),!(e=Zn.transform.baseVal.consolidate()))?vo:(e=e.matrix,Ra(e.a,e.b,e.c,e.d,e.e,e.f))}function Ca(e,t,n,s){function r(d){return d.length?d.pop()+" ":""}function i(d,x,p,m,h,j){if(d!==p||x!==m){var E=h.push("translate(",null,t,null,n);j.push({i:E-4,x:_.interpolateNumber(d,p)},{i:E-2,x:_.interpolateNumber(x,m)})}else(p||m)&&h.push("translate("+p+t+m+n)}function l(d,x,p,m){d!==x?(d-x>180?x+=360:x-d>180&&(d+=360),m.push({i:p.push(r(p)+"rotate(",null,s)-2,x:_.interpolateNumber(d,x)})):x&&p.push(r(p)+"rotate("+x+s)}function a(d,x,p,m){d!==x?m.push({i:p.push(r(p)+"skewX(",null,s)-2,x:_.interpolateNumber(d,x)}):x&&p.push(r(p)+"skewX("+x+s)}function c(d,x,p,m,h,j){if(d!==p||x!==m){var E=h.push(r(h)+"scale(",null,",",null,")");j.push({i:E-4,x:_.interpolateNumber(d,p)},{i:E-2,x:_.interpolateNumber(x,m)})}else(p!==1||m!==1)&&h.push(r(h)+"scale("+p+","+m+")")}return function(d,x){var p=[],m=[];return d=e(d),x=e(x),i(d.translateX,d.translateY,x.translateX,x.translateY,p,m),l(d.rotate,x.rotate,p,m),a(d.skewX,x.skewX,p,m),c(d.scaleX,d.scaleY,x.scaleX,x.scaleY,p,m),d=x=null,function(h){for(var j=-1,E=m.length,S;++j<E;)p[(S=m[j]).i]=S.x(h);return p.join("")}}}var Xg=Ca(Kg,"px, ","px)","deg)"),Ug=Ca(Gg,", ",")",")"),qg=1e-12;function Si(e){return((e=Math.exp(e))+1/e)/2}function Jg(e){return((e=Math.exp(e))-1/e)/2}function Qg(e){return((e=Math.exp(2*e))-1)/(e+1)}const ts=function e(t,n,s){function r(i,l){var a=i[0],c=i[1],d=i[2],x=l[0],p=l[1],m=l[2],h=x-a,j=p-c,E=h*h+j*j,S,R;if(E<qg)R=Math.log(m/d)/t,S=function(A){return[a+A*h,c+A*j,d*Math.exp(t*A*R)]};else{var v=Math.sqrt(E),y=(m*m-d*d+s*E)/(2*d*n*v),C=(m*m-d*d-s*E)/(2*m*n*v),M=Math.log(Math.sqrt(y*y+1)-y),k=Math.log(Math.sqrt(C*C+1)-C);R=(k-M)/t,S=function(A){var I=A*R,B=Si(M),V=d/(n*v)*(B*Qg(t*I+M)-Jg(M));return[a+V*h,c+V*j,d*B/Si(t*I+M)]}}return S.duration=R*1e3*t/Math.SQRT2,S}return r.rho=function(i){var l=Math.max(.001,+i),a=l*l,c=a*a;return e(l,a,c)},r}(Math.SQRT2,2,4),e1=Object.freeze(Object.defineProperty({__proto__:null,Base:_.Base,Bottom:_.Bottom,Right:_.Right,Top:_.Top,axisStateZ:_.axisStateZ,newCanvas:_.newCanvas,newTickFactory:_.newTickFactory,tickFactoryProps:_.tickFactoryProps,tickType:_.tickType},Symbol.toStringTag,{value:"Module"})),Ie=e=>{const t=rr(),n=f.useErrorHandler();g.useEffect(()=>_.mountListeners(t,n,e),[t,n])},t1=u.a.seconds(5),wa=({children:e,openStreamer:t,streamerRemovalDelay:n=t1})=>{const s=et(),r=f.useErrorHandler(),i=g.useRef(new _.Streamer({handleError:r,removalDelay:n})),{path:l}=f.useLifecycle({type:_.Provider$1.TYPE,schema:_.providerStateZ,initialState:{}}),a=g.useMemo(()=>t??s?.openStreamer.bind(s),[s,t]);Ke(async()=>{if(a!=null)return await i.current.updateStreamer(a),i.current.close.bind(i.current)},[a]);const c=g.useCallback(({channel:d,handler:x,onOpen:p})=>i.current.addListener(x,d,p),[]);return o.jsxRuntimeExports.jsx(f.Composite,{path:l,children:o.jsxRuntimeExports.jsx(or,{value:c,children:e})})},n1=Object.freeze(Object.defineProperty({__proto__:null,Context:or,Provider:wa,createForm:$t,createList:Ve,createRetrieve:ct,createUpdate:Ot,errorResult:lt,nullClientResult:_s,parsedHandler:_.parsedHandler,pendingResult:vt,stringHandler:_.stringHandler,successResult:Ue,useAddListener:rr,useListItem:Yg,useListener:Ie},Symbol.toStringTag,{value:"Module"})),ba=e=>Ie({channel:N.Sm.RESOURCE_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.idZ,async({changed:t})=>e(t))}),s1=e=>Ie({channel:N.Sm.RESOURCE_DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.idZ,async({changed:t})=>{e(t)})}),o1=e=>Ie({channel:N.Sm.RELATIONSHIP_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:t})=>{e(t)})}),r1=e=>Ie({channel:N.Sm.RELATIONSHIP_DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:t})=>{e(t)})}),va=e=>Ve({name:"useDependents",retrieve:async({client:t,params:{id:n}})=>n==null?[]:await t.ontology.retrieve([n],{children:e==="to",parents:e==="from"}),retrieveByKey:async({client:t,key:n})=>await t.ontology.retrieve(N.Sm.idZ.parse(n)),listeners:[{channel:N.Sm.RELATIONSHIP_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({client:t,changed:n,params:s,onChange:r})=>{if(!("id"in s))return;const{id:i}=s;if(!N.Sm.matchRelationship(n,{type:"parent",[N.Sm.oppositeRelationshipDirection(e)]:i}))return;const l=await t.ontology.retrieve(n[e]);r(l.key,l)})},{channel:N.Sm.RELATIONSHIP_DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:t,params:n,onDelete:s})=>{if(!("id"in n))return;const{id:r}=n;N.Sm.matchRelationship(t,{type:"parent",[N.Sm.oppositeRelationshipDirection(e)]:r})&&s(N.Sm.idToString(t[e]))})},{channel:N.Sm.RESOURCE_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.idZ,async({client:t,changed:n,params:s,onChange:r})=>{const{id:i}=s;if(i==null||!N.Sm.idsEqual(i,n))return;const l=await t.ontology.retrieve(n);r(l.key,l)})}]}),i1=va("to"),l1=Ve({name:"useResourceList",retrieve:async({client:e,params:t})=>await e.ontology.retrieve(t),retrieveByKey:async({client:e,key:t})=>await e.ontology.retrieve(N.Sm.idZ.parse(t)),listeners:[{channel:N.Sm.RESOURCE_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.idZ,async({changed:e,onChange:t,client:n})=>t(e.key,await n.ontology.retrieve(e)))},{channel:N.Sm.RESOURCE_DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.idZ,async({changed:e,onDelete:t})=>{t(e.key)})}]}),a1=ct({name:"useParentID",retrieve:async({client:e,params:{id:t,type:n}})=>{const s=await e.ontology.retrieveParents(t);if(n==null)return s[0].id;const r=s.find(({id:i})=>i.type===n);return r==null?null:r.id},listeners:[{channel:N.Sm.RELATIONSHIP_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:e,params:{id:t,type:n},onChange:s})=>{e.type===N.Sm.PARENT_OF_RELATIONSHIP_TYPE&&(n==null||e.from.type===n)&&N.Sm.idsEqual(e.to,t)&&s(e.to)})},{channel:N.Sm.RELATIONSHIP_DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:e,params:{id:t,type:n},onChange:s})=>{e.type===N.Sm.PARENT_OF_RELATIONSHIP_TYPE&&(n==null||e.from.type===n)&&N.Sm.idsEqual(e.to,t)&&s(null)})}]}),c1=Object.freeze(Object.defineProperty({__proto__:null,createDependentsListHook:va,retrieveParentID:a1,useChildren:i1,useRelationshipDeleteSynchronizer:r1,useRelationshipSetSynchronizer:o1,useResourceDeleteSynchronizer:s1,useResourceList:l1,useResourceSetSynchronizer:ba},Symbol.toStringTag,{value:"Module"})),_a=g.createContext(void 0),kn=()=>{const e=g.use(_a);if(e==null)throw new Error("Channel.AliasProvider not found");return e},u1=()=>kn().activeRange,xr=e=>kn().aliases[e]??null,Ma=()=>kn().aliases,Ns=(e,t="")=>{const n=et(),s=f.useErrorHandler(),r=g.useCallback(p=>{N.Sm.idsEqual(p,N.Rm.ontologyID(e))&&i==null&&s(async()=>{const m=await n?.ontology.retrieve(p);d(m?.name)},"Failed to retrieve resource")},[n,s,e]);ba(r);const i=xr(e),{getName:l,setAlias:a}=kn(),[c,d]=g.useState(t);Ke(async p=>{const m=await l(e);p.aborted||d(m)},[e,l]);const x=g.useCallback(p=>{s(async()=>{const m=c;try{if(i!=null){if(a==null)throw new Error("AliasSetter not found");await a(e,p);return}if(n==null)throw new N.bm;await n.channels.rename(e,p)}catch(h){throw d(m),h}},"Failed to rename channel")},[i,a,e,s,c]);return[c??t,x]},Na=()=>kn().setAlias,d1=({channelKey:e,shadow:t,className:n,...s})=>{const{value:r,onChange:i}=s,[l,a]=g.useState(!1),c=Na(),d=xr(e),[x]=Ns(e);let p=o.jsxRuntimeExports.jsx(f.Rename,{});l?p=o.jsxRuntimeExports.jsx(f.Loading,{}):d===r&&(p=o.jsxRuntimeExports.jsx(f.Check,{}));const m=c!=null&&!l&&d!==r&&e!==0,h=f.useErrorHandler(),j=()=>{m&&h(async()=>{a(!0);try{await c(e,r),a(!1)}catch(R){throw a(!1),R}},"Failed to set channel alias")},E=()=>{d!=null&&i?.(d)},S=e===0?o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Select a channel to enable alias syncing with this label"}):c==null?o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Select a range to enable alias syncing with this label"}):r.length===0?o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Enter a value to enable alias syncing with this label"}):d===r?o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Alias synced with this label"}):o.jsxRuntimeExports.jsxs(f.Text,{level:"small",children:["Sync alias for ",x," with this label"]});return o.jsxRuntimeExports.jsxs(f.Text$2,{selectOnFocus:!0,...s,children:[m&&o.jsxRuntimeExports.jsx(f.Button,{onClick:E,tooltip:o.jsxRuntimeExports.jsxs(f.Text,{level:"small",children:["Set ",x," as label"]}),tooltipLocation:{y:"top"},variant:"outlined",children:o.jsxRuntimeExports.jsx(f.Sync,{})}),o.jsxRuntimeExports.jsx(f.Button,{onClick:j,disabled:!m,tooltip:S,tooltipLocation:{y:"top"},variant:"outlined",children:p})]})},_t=(e,t)=>N.Sm.matchRelationship(e,{from:t,type:N.Jm.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE}),ka=ct({name:"Labels",retrieve:async({client:e,params:{id:t}})=>await e.labels.retrieve({for:t}),listeners:[{channel:N.Jm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Jm.labelZ,async({changed:e,onChange:t})=>t(n=>{const s=n.filter(r=>r.key!==e.key);return s.length===n.length?n:[...s,e]}))},{channel:N.Jm.DELETE_CHANNEL_NAME,onChange:_.stringHandler(async({changed:e,onChange:t})=>t(n=>n.filter(s=>s.key!==e)))},{channel:N.Sm.RELATIONSHIP_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({client:e,changed:t,onChange:n,params:{id:s}})=>{if(!_t(t,s))return;const{key:r}=t.to,i=await e.labels.retrieve({key:r});n(l=>[...l.filter(a=>a.key!==r),i])})},{channel:N.Sm.RELATIONSHIP_DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:e,onChange:t,params:{id:n}})=>{_t(e,n)&&t(s=>s.filter(r=>r.key!==e.to.key))})}]}),La=se.z.object({labels:se.z.array(N.Jm.keyZ)}),x1=$t({name:"Labels",schema:La,initialValues:{labels:[]},retrieve:async({client:e,params:{id:t}})=>t==null?null:{labels:(await e.labels.retrieve({for:t})).map(s=>s.key)},update:async({client:e,value:t,params:{id:n}})=>{await e.labels.label(n,t.labels,{replace:!0})},listeners:[{channel:N.Sm.RELATIONSHIP_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({client:e,changed:t,onChange:n,params:{id:s}})=>{if(!_t(t,s))return;const{key:r}=t.to,i=await e.labels.retrieve({key:r});n(l=>l==null?{labels:[i.key]}:{labels:[...l.labels.filter(a=>a!==r),i.key]})})},{channel:N.Sm.RELATIONSHIP_DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:e,onChange:t,params:{id:n}})=>{_t(e,n)&&t(s=>s==null?{labels:[]}:{labels:s.labels.filter(r=>r!==e.to.key)})})}]}),p1=e=>Ie({channel:N.Jm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Jm.labelZ,async t=>{e(t.changed)})}),m1=e=>Ie({channel:N.Jm.DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Jm.keyZ,async t=>{e(t.changed)})}),pr=Ve({name:"Labels",retrieve:async({client:e,params:t})=>await e.labels.retrieve(t),retrieveByKey:async({client:e,key:t})=>await e.labels.retrieve({key:t}),listeners:[{channel:N.Jm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Jm.labelZ,async({changed:e,onChange:t})=>{t(e.key,e,{mode:"prepend"})})},{channel:N.Jm.DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Jm.keyZ,async({changed:e,onDelete:t})=>t(e))}]}),Pa=N.Jm.labelZ.partial({key:!0}),f1=$t({name:"Label",initialValues:{name:"",color:"#000000"},schema:Pa,retrieve:async({client:e,params:{key:t}})=>t==null?null:await e.labels.retrieve({key:t}),update:async({client:e,value:t,onChange:n})=>n(await e.labels.create(t)),listeners:[{channel:N.Jm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Jm.labelZ,async({changed:e,onChange:t,params:n})=>{n.key==null||e.key!==n.key||t(e)})}]}),h1=Ot({name:"Label",update:async({client:e,params:{key:t}})=>await e.labels.delete(t)}).useDirect,mr="label",g1=({itemKey:e,...t})=>{const n=f.useItem(e),{selected:s,onSelect:r,hovered:i}=f.useItemState(e);return n==null?null:o.jsxRuntimeExports.jsx(f.Item,{itemKey:e,onSelect:r,selected:s,hovered:i,...t,children:o.jsxRuntimeExports.jsxs(f.Text,{align:"center",children:[o.jsxRuntimeExports.jsx(f.Circle,{color:n?.color,size:"2.5em"}),n?.name]})})},Ta=f.renderProp(g1),j1=f.renderProp(e=>{const{itemKey:t}=e,n=f.useItem(t),{onSelect:s}=f.useItemState(t);return n==null?null:o.jsxRuntimeExports.jsx(vs,{color:n.color,onClose:s,size:"small",children:n.name})}),E1={variant:"text"},y1=({onChange:e,value:t,emptyContent:n,filter:s,initialParams:r,...i})=>{const{data:l,retrieve:a,getItem:c,subscribe:d,status:x}=pr({filter:s,initialParams:r}),{fetchMore:p,search:m}=Qe.usePager({retrieve:a});return o.jsxRuntimeExports.jsx(bs,{resourceName:"Label",haulType:mr,value:t,onChange:e,data:l,getItem:c,subscribe:d,onFetchMore:p,onSearch:m,emptyContent:n,status:x,renderTag:j1,icon:o.jsxRuntimeExports.jsx(f.Label,{}),triggerProps:E1,variant:"floating",...i,children:Ta})},S1=({onChange:e,value:t,allowNone:n,emptyContent:s,filter:r,initialParams:i,...l})=>{const{data:a,retrieve:c,getItem:d,subscribe:x,status:p}=pr({filter:r,initialParams:i}),{fetchMore:m,search:h}=Qe.usePager({retrieve:c});return o.jsxRuntimeExports.jsx(It,{resourceName:"Label",value:t,onChange:e,data:a,getItem:d,subscribe:x,allowNone:n,onFetchMore:m,onSearch:h,emptyContent:s,status:p,haulType:mr,...l,children:Ta})},R1=Object.freeze(Object.defineProperty({__proto__:null,HAUL_TYPE:mr,SelectMultiple:y1,SelectSingle:S1,formSchema:Pa,labelsOfFormSchema:La,matchRelationship:_t,retrieveLabelsOf:ka,useDelete:h1,useDeleteSynchronizer:m1,useForm:f1,useLabelsOfForm:x1,useList:pr,useSetSynchronizer:p1},Symbol.toStringTag,{value:"Module"})),C1=e=>Ie({channel:N.Xm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Xm.payloadZ,async t=>{e(t.changed)})}),Aa=e=>Ie({channel:N.Xm.SET_ALIAS_CHANNEL_NAME,onChange:_.parsedHandler(N.Xm.aliasZ,async t=>{e(t.changed)})}),Ia=e=>Ie({channel:N.Xm.DELETE_ALIAS_CHANNEL_NAME,onChange:_.stringHandler(async t=>{e(N.Xm.decodeDeleteAliasChange(t.changed))})}),Oa=async({changed:e,onChange:t,client:n})=>{if(N.Sm.matchRelationship(e,{from:{type:"range"},type:N.Jm.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE,to:{type:"label"}})){const r=await n.labels.retrieve({key:e.to.key});t(e.from.key,i=>i==null?i:n.ranges.sugarOne({...i,labels:[...i.labels,r]}))}},$a=async({changed:e,onChange:t,client:n})=>{if(N.Sm.matchRelationship(e,{from:{type:"range"},type:N.Sm.PARENT_OF_RELATIONSHIP_TYPE,to:{type:"range"}})){const r=await n.ranges.retrieve(e.from.key);t(e.to.key,i=>i==null?i:n.ranges.sugarOne({...i,parent:r}))}},w1=Ve({name:"Range",retrieve:async({client:e,params:{key:t}})=>{const n=await e.ontology.retrieveChildren(N.Xm.ontologyID(t),{types:["range"]});return n.length===0?[]:await e.ranges.retrieve({keys:n.map(({id:{key:s}})=>s),includeParent:!0,includeLabels:!0})},retrieveByKey:async({client:e,key:t})=>await e.ranges.retrieve(t),listeners:[{channel:N.Xm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Xm.payloadZ,async({changed:e,onChange:t,client:n})=>{t(e.key,s=>s==null?s:n.ranges.sugarOne({...s.payload,...e,parent:s.parent??e.parent,labels:s.labels??[]}))})},{channel:N.Xm.DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Xm.keyZ,async({changed:e,onDelete:t})=>t(e))},{channel:N.Sm.RELATIONSHIP_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async e=>{const{changed:t,onChange:n,client:s,params:r}=e;if(!("key"in r))return;if(N.Sm.matchRelationship(t,{from:N.Xm.ontologyID(r.key),type:N.Sm.PARENT_OF_RELATIONSHIP_TYPE,to:{type:"range"}})){const l=await s.ranges.retrieve({keys:[t.to.key],includeParent:!0,includeLabels:!0});return n(t.to.key,l[0])}await Oa(e),await $a(e)})},{channel:N.Sm.RELATIONSHIP_DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:e,onDelete:t,onChange:n,client:s,params:{key:r}})=>{if(N.Sm.matchRelationship(e,{type:"parent",to:N.Xm.ontologyID(r)}))return t(e.to.key);e.type===N.Jm.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE&&n(e.from.key,a=>a==null?a:s.ranges.sugarOne({...a,labels:a.labels.filter(c=>c.key!==e.to.key)}))})}]}),b1=ct({name:"Range",retrieve:async({client:e,params:{key:t}})=>{const s=(await e.ontology.retrieveParents(N.Xm.ontologyID(t))).find(({id:{type:r}})=>r==="range");return s==null?null:e.ranges.sugarOntologyResource(s)},listeners:[{channel:N.Sm.RELATIONSHIP_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:e,onChange:t,params:{key:n},client:s})=>N.Sm.matchRelationship(e,{type:"parent",to:N.Xm.ontologyID(n)})&&t(await s.ranges.retrieve(e.from.key)))},{channel:N.Sm.RELATIONSHIP_DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:e,onChange:t,params:{key:n},client:s})=>N.Sm.matchRelationship(e,{type:"parent",from:N.Xm.ontologyID(n)})&&t(await s.ranges.retrieve(e.from.key)))},{channel:N.Xm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Xm.payloadZ,async({changed:e,onChange:t,client:n})=>{t(s=>s==null||s.key!==e.key?s:n.ranges.sugarOne({...s.payload,...e}))})}]}),v1={channel:N.Xm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Xm.payloadZ,async({client:e,changed:t,params:{key:n},onChange:s})=>{t.key===n&&s(e.ranges.sugarOne(t))})},Ba=ct({name:"Range",retrieve:async({client:e,params:{key:t}})=>await e.ranges.retrieve(t),listeners:[v1]}),_1=Ba.useDirect,Da=se.z.object({...N.Xm.payloadZ.omit({timeRange:!0}).partial({key:!0}).shape,labels:se.z.array(N.Jm.keyZ),parent:se.z.string().optional(),timeRange:se.z.object({start:se.z.number(),end:se.z.number()})}),_o=async(e,t,n)=>({...e.payload,timeRange:e.timeRange.numeric,labels:t??(await e.retrieveLabels()).map(s=>s.key),parent:n??(await e.retrieveParent())?.key??""}),M1={name:"",labels:[],parent:"",timeRange:{start:0,end:0}},N1=$t({name:"Range",schema:Da,initialValues:M1,retrieve:async({client:e,params:{key:t}})=>t==null?null:await _o(await e.ranges.retrieve(t)),update:async({client:e,value:t,onChange:n})=>{const s=u.F.isZero(t.parent)?void 0:N.Xm.ontologyID(t.parent),r=await e.ranges.create(t,{parent:s});await e.labels.label(r.ontologyID,t.labels,{replace:!0}),n({...t,...r.payload,timeRange:r.timeRange.numeric,labels:t.labels,parent:t.parent})},listeners:[{channel:N.Xm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Xm.payloadZ,async({client:e,changed:t,onChange:n})=>{const s=await _o(e.ranges.sugarOne(t));n(r=>r?.key!==t.key?r:{...s,labels:r.labels,parent:r.parent})})},{channel:N.Sm.RELATIONSHIP_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:e,onChange:t})=>{t(n=>{if(n==null||n.key==null)return n;const s=N.Xm.ontologyID(n.key);return _t(e,s)?{...n,labels:[...n.labels.filter(l=>l!==e.to.key),e.to.key]}:N.Sm.matchRelationship(e,{type:N.Sm.PARENT_OF_RELATIONSHIP_TYPE,to:s})?{...n,parent:e.from.key}:n})})},{channel:N.Sm.RELATIONSHIP_DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:e,onChange:t,params:{key:n}})=>{n==null||!_t(e,N.Xm.ontologyID(n))||t(s=>{if(s==null)return s;const r=s.labels.filter(i=>i!==e.to.key);return{...s,labels:r}})})}]}),k1=e=>ka.useDirect({params:{id:N.Xm.ontologyID(e)}}),L1={includeParent:!0,includeLabels:!0},fr=Ve({name:"Ranges",retrieve:async({client:e,params:t})=>await e.ranges.retrieve({...L1,...t}),retrieveByKey:async({client:e,key:t})=>await e.ranges.retrieve(t),listeners:[{channel:N.Xm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Xm.payloadZ,async({changed:e,onChange:t,client:n})=>t(e.key,s=>{const r={...s?.payload,...e,parent:s?.parent??e.parent,labels:s?.labels??[]};return n.ranges.sugarOne(r)}))},{channel:N.Xm.DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Xm.keyZ,async({changed:e,onDelete:t})=>t(e))},{channel:N.Sm.RELATIONSHIP_SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async e=>{await Oa(e),await $a(e)})},{channel:N.Sm.RELATIONSHIP_DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Sm.relationshipZ,async({changed:e,onChange:t,client:n})=>{if(e.type===N.Jm.LABELED_BY_ONTOLOGY_RELATIONSHIP_TYPE)return t(e.from.key,s=>s==null?s:n.ranges.sugarOne({...s,labels:s.labels.filter(r=>r.key!==e.to.key)}))})}]}),P1=se.z.object({pairs:se.z.array(se.z.object({key:se.z.string(),value:se.z.string()}))}),T1=se.z.string().transform(e=>e.split("<--->")).transform(([e,t])=>({key:t,range:e})),A1=Ve({name:"Range Meta Data",retrieve:async({client:e,params:{rangeKey:t}})=>{const s=await e.ranges.getKV(t).list();return Object.entries(s).map(([r,i])=>({key:r,value:i,range:t}))},retrieveByKey:async({client:e,key:t,params:{rangeKey:n}})=>{if(n==null)return;const r=await e.ranges.getKV(n).get(t);return{key:t,value:r,range:n}},listeners:[{channel:N.Xm.KV_SET_CHANNEL,onChange:_.parsedHandler(N.Xm.kvPairZ,async({changed:e,onChange:t,params:{rangeKey:n}})=>{e.range===n&&t(e.key,e)})},{channel:N.Xm.KV_DELETE_CHANNEL,onChange:_.parsedHandler(T1,async({changed:e,onDelete:t,params:{rangeKey:n}})=>{e.range===n&&t(e.key)})}]}),za=N.Xm.kvPairZ,I1=$t({name:"Range Meta Data",schema:za,retrieve:async()=>null,update:async({client:e,value:t})=>{await e.ranges.getKV(t.range).set(t.key,t.value)},initialValues:{key:"",value:"",range:""}}),O1=Ot({name:"Range Meta Data",update:async({client:e,value:t,params:{rangeKey:n}})=>{await e.ranges.getKV(n).delete(t)}}),$1=Ot({name:"Range Meta Data",update:async({client:e,value:t,onChange:n})=>{await e.ranges.getKV(t.range).set(t.key,t.value),n(t)}}),B1=Ot({name:"Range",update:async({client:e,value:t,onChange:n})=>n(await e.ranges.create(t))}),D1=Ot({name:"Range",update:async({client:e,value:t})=>await e.ranges.delete(t)}),Ha=({timeRange:e,level:t="p",color:n=9,showSpan:s=!1,...r})=>{const i=new u.n(e.start),l=i.isToday?"time":"dateTime",a=new u.n(e.end),c=a.equals(u.n.MAX),d=a.span(i)<u.a.DAY?"time":"dateTime",x=i.span(a),p=o.jsxRuntimeExports.jsxs(f.Text,{x:!0,align:"center",gap:"small",children:[i.isToday&&o.jsxRuntimeExports.jsx(f.Text,{level:t,color:n,weight:450,children:"Today"}),o.jsxRuntimeExports.jsx(f.DateTime,{el:"span",level:t,displayTZ:"local",format:l,color:n,weight:450,children:i})]}),m=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[c?o.jsxRuntimeExports.jsx(f.Text,{level:t,el:"span",children:"Now"}):o.jsxRuntimeExports.jsx(f.DateTime,{level:t,el:"span",displayTZ:"local",format:d,color:n,weight:450,children:a}),!x.isZero&&s&&o.jsxRuntimeExports.jsxs(f.Text,{level:t,color:n,weight:450,el:"span",children:["(",i.span(a).truncate(u.a.MILLISECOND).toString(),")"]})]});return o.jsxRuntimeExports.jsxs(f.Text,{x:!0,gap:"small",className:u.CSS(u.CSS.B("time-range-chip")),align:"center",level:t,color:n,...r,children:[p,o.jsxRuntimeExports.jsx(f.Arrow.Right,{color:9}),m]})},hr="range",gr=g.memo(({itemKey:e,showParent:t=!0,showLabels:n=!0,...s})=>{const r=f.useItem(e);if(r==null)return null;const{name:i,parent:l,timeRange:a,labels:c}=r;return o.jsxRuntimeExports.jsxs(f.ListItem,{itemKey:e,justify:"between",...s,children:[o.jsxRuntimeExports.jsxs(sr,{children:[o.jsxRuntimeExports.jsx(En,{weight:450,color:10,children:i}),l!=null&&t&&o.jsxRuntimeExports.jsx(En,{weight:400,color:8,children:l.name})]}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Ha,{level:"small",timeRange:a}),n&&o.jsxRuntimeExports.jsx(tr,{children:c?.map(d=>o.jsxRuntimeExports.jsx(vs,{color:d.color,size:"small",children:d.name},d.key))})]})]})});gr.displayName="Ranger.ListItem";const Va=f.renderProp(gr),Fa=o.jsxRuntimeExports.jsx(f.Range,{}),z1=({onChange:e,value:t,emptyContent:n,filter:s,initialParams:r,...i})=>{const{data:l,retrieve:a,getItem:c,subscribe:d,status:x}=fr({filter:s,initialParams:r}),{fetchMore:p,search:m}=Qe.usePager({retrieve:a});return o.jsxRuntimeExports.jsx(bs,{resourceName:"Range",haulType:hr,value:t,onChange:e,data:l,getItem:c,icon:Fa,subscribe:d,onFetchMore:p,onSearch:m,emptyContent:n,status:x,...i,children:Va})},H1={style:{width:800}},V1=({onChange:e,value:t,filter:n,allowNone:s,emptyContent:r,initialParams:i,...l})=>{const{data:a,retrieve:c,subscribe:d,getItem:x,status:p}=fr({filter:n,initialParams:i}),{fetchMore:m,search:h}=Qe.usePager({retrieve:c});return o.jsxRuntimeExports.jsx(It,{resourceName:"Range",variant:"modal",value:t,onChange:e,data:a,allowNone:s,haulType:hr,onFetchMore:m,getItem:x,subscribe:d,status:p,onSearch:h,emptyContent:r,icon:Fa,itemHeight:45,dialogProps:H1,...l,children:Va})},F1=Object.freeze(Object.defineProperty({__proto__:null,HAUL_TYPE:hr,ListItem:gr,SelectMultiple:z1,SelectSingle:V1,TimeRangeChip:Ha,formSchema:Da,kvPairFormSchema:za,metaDataFormSchema:P1,retrieveParent:b1,retrieveQuery:Ba,toFormValues:_o,useAliasDeleteSynchronizer:Ia,useAliasSetSynchronizer:Aa,useChildren:w1,useDelete:D1,useDeleteKV:O1,useForm:N1,useKVPairForm:I1,useLabels:k1,useList:fr,useListKV:A1,useRetrieve:_1,useSetSynchronizer:C1,useUpdate:B1,useUpdateKV:$1},Symbol.toStringTag,{value:"Module"})),Ri={},Za=({activeRange:e,...t})=>{const n=et(),[s,r]=g.useState(Ri);Ke(async x=>{if(n==null||e==null){r(Ri);return}const p=await n.ranges.retrieve(e);if(x.aborted)return;const m=await p.listAliases();x.aborted||r(m)},[n,e]);const i=g.useCallback(({alias:x,channel:p,range:m})=>r(h=>{if(m!==e)return h;const j={...h};return j[p]=x,j}),[e]);Aa(i);const l=g.useCallback(({channel:x,range:p})=>r(m=>{if(p!==e)return m;const h={...m};return delete h[x],h}),[e]);Ia(l);const a=g.useCallback(async(x,p)=>{if(n==null||e==null)return;await(await n.ranges.retrieve(e)).setAlias(x,p)},[n,e]),c=g.useCallback(async x=>{if(n==null||x===0)return;const p=s[x];if(p!=null)return p;const{name:m}=await n.channels.retrieve(x);return m},[s,n]),d=g.useMemo(()=>({aliases:s,activeRange:e,setAlias:e!=null?a:null,getName:c}),[s,e,a,c]);return o.jsxRuntimeExports.jsx(_a,{...t,value:d})},Mt="channel",Z1={region:u.$t.ZERO,dpr:1,os:u.S.getOS()},Y1={gl:null,lower2d:null,upper2d:null,bootstrapped:!1},W1=({children:e,resizeDebounce:t=100,className:n,...s})=>{const[{path:r},{bootstrapped:i,dpr:l},a]=f.use$2({type:_.Canvas.TYPE,schema:_.canvasStateZ,initialState:Z1}),c=g.useRef({...Y1}),d=g.useRef(!1),x=g.useCallback(E=>{c.current.bootstrapped&&(a(()=>({bootstrapped:!0,region:E,dpr:window.devicePixelRatio,os:u.S.getOS({default:"Windows"})})),d.current=!0)},[a]),p=g.useRef(null),m=f.useResize(x,{debounce:t}),h=f.useCombinedRefs(p,m);g.useEffect(()=>{const E=()=>{window.devicePixelRatio===l||!c.current.bootstrapped||p.current==null||a(S=>({...S,region:u.$t.construct(p.current),dpr:window.devicePixelRatio}))};window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener("change",E,{once:!0})},[l]),g.useEffect(()=>{const E=()=>{!c.current.bootstrapped||p.current==null||a(S=>({...S,region:u.$t.construct(p.current),glCanvas:void 0,upper2dCanvas:void 0,lower2dCanvas:void 0}))};window.addEventListener("focus",E),window.addEventListener("blur",E)},[a]);const j=g.useCallback(E=>{if(E==null)return;E.className.includes("gl")?c.current.gl=E:E.className.includes("upper2d")?c.current.upper2d=E:c.current.lower2d=E;const{gl:S,lower2d:R,upper2d:v,bootstrapped:y}=c.current;if(S==null||R==null||v==null||y)return;c.current.bootstrapped=!0;const C=S.transferControlToOffscreen(),M=v.transferControlToOffscreen(),k=R.transferControlToOffscreen();a({glCanvas:C,upper2dCanvas:M,lower2dCanvas:k,bootstrap:!0,bootstrapped:!1,region:u.$t.construct(S),dpr:window.devicePixelRatio,os:u.S.getOS({default:"Windows"})},[C,M,k])},[a]);return o.jsxRuntimeExports.jsxs("div",{ref:h,className:u.CSS(u.CSS.B("canvas-container"),n),...s,children:[o.jsxRuntimeExports.jsx("canvas",{ref:j,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","lower2d"))}),o.jsxRuntimeExports.jsx("canvas",{ref:j,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","gl"))}),o.jsxRuntimeExports.jsx("canvas",{ref:j,className:u.CSS(u.CSS.B("canvas"),u.CSS.BM("canvas","upper2d"))}),o.jsxRuntimeExports.jsx(f.Composite,{path:r,children:i&&e})]})},Ln=(e,t)=>f.useResize(g.useCallback((n,s)=>{const r=document.querySelector(".pluto-canvas--lower2d");r!=null&&e(u.C.XY.translate(u.J.scale(u.$t.topLeft(r),-1)).box(n),s)},[e]),t),K1=Object.freeze(Object.defineProperty({__proto__:null,Canvas:W1,useRegion:Ln},Symbol.toStringTag,{value:"Module"})),Ya=g.createContext(null),Je=e=>{const t=g.use(Ya);if(t==null)throw new Error(`Cannot to use ${e} as a non-child of LinePlot.`);return t},Wa=e=>{const{addViewportHandler:t}=Je("Viewport");g.useEffect(()=>t(e),[t,e])},Pn=(e,t)=>{const{setGridEntry:n,removeGridEntry:s}=Je(t),{key:r}=e;return f.useEffectCompare(()=>{u.K.outer.parse(e.loc),n(e)},([a],[c])=>N.m.equal(a,c),[e]),g.useEffect(()=>()=>s(r),[]),{gridArea:u.g.swap(u.K.direction(e.loc))==="x"?`axis-start-${r} / plot-start / axis-end-${r} / plot-end`:`plot-start / axis-start-${r} / plot-end / axis-end-${r}`}},Ka=({aetherKey:e,style:t,resizeDebounce:n=0,clearOverScan:s=u.J.ZERO,children:r,hold:i=!1,onHold:l,visible:a,...c})=>{const[d,x]=g.useState([]),p=f.useMemoDeepEqual({clearOverScan:s,hold:i,visible:a}),[{path:m},{grid:h},j]=f.use$2({aetherKey:e,type:_.LinePlot.TYPE,schema:_.linePlotStateZ,initialState:{container:u.$t.ZERO,viewport:u.$t.DECIMAL,grid:{},...p}}),E=g.useCallback($=>{a&&j(H=>({...H,container:$}))},[j,a]),S=Ln(E,{debounce:n});g.useEffect(()=>j($=>({...$,...p})),[p]);const R=g.useRef(new Map),v=g.useCallback($=>(R.current.set($,null),()=>R.current.delete($)),[R]),y=g.useCallback($=>{const{mode:H,box:w,stage:P}=$;(H==="pan"&&P!=="start"||H==="zoom"||H==="zoomReset"&&P==="start")&&j(L=>({...L,viewport:w})),R.current.forEach((L,O)=>O($))},[j]),C=g.useCallback($=>{j(H=>({...H,grid:{...H.grid,[$.key]:$}}))},[j]),M=g.useCallback($=>j(H=>{const{[$]:w,...P}=H.grid;return{...H,grid:P}}),[j]),k=g.useCallback($=>{x(H=>[...H.filter(({key:w})=>w!==$.key),$])},[x]),A=g.useCallback($=>x(H=>H.filter(({key:w})=>w!==$)),[k]),I=g.useMemo(()=>G1(h),[h]),B=g.useCallback($=>{j(H=>({...H,hold:$})),l?.($)},[j,l]),V=`line-plot-${e}`,D=g.useMemo(()=>({lines:d,setGridEntry:C,removeGridEntry:M,setLine:k,removeLine:A,setViewport:y,addViewportHandler:v,setHold:B,id:V}),[V,d,C,M,k,A,y,v,B]);return o.jsxRuntimeExports.jsx("div",{id:V,className:u.CSS.B("line-plot"),style:{...t,...I},ref:S,...c,children:o.jsxRuntimeExports.jsx(Ya,{value:D,children:o.jsxRuntimeExports.jsx(f.Composite,{path:m,children:r})})})},G1=e=>{const t=u.CSS.newGridBuilder();return _.regions("top",e).forEach(({key:n,size:s})=>t.row(`axis-start-${n}`,`axis-end-${n}`,s)),t.row("plot-start","plot-end","minmax(0, 1fr)"),_.regions("bottom",e).reverse().forEach(({key:n,size:s})=>t.row(`axis-start-${n}`,`axis-end-${n}`,s)),_.regions("left",e).forEach(({key:n,size:s})=>t.col(`axis-start-${n}`,`axis-end-${n}`,s)),t.col("plot-start","plot-end","minmax(0, 1fr)"),_.regions("right",e).forEach(({key:n,size:s})=>t.col(`axis-start-${n}`,`axis-end-${n}`,s)),t.build()},jr=e=>{const t=e==="x"?"bottom":"left",n=e==="x"?_.XAxis.TYPE:_.YAxis.TYPE,s=`${e}-axis`,r=({aetherKey:i,children:l,location:a=t,label:c="",labelLevel:d="small",labelDirection:x=e,onLabelChange:p,color:m,labelSize:h,showGrid:j,type:E,bounds:S,className:R,tickSpacing:v,autoBounds:y,axisKey:C,autoBoundUpdateInterval:M,onAutoBoundsChange:k,style:A,...I})=>{const B=(c?.length??0)>0,V=f.useUniqueKey(i),D=f.useMemoDeepEqual({location:a,showGrid:j,type:E,bounds:S,axisKey:C,label:c,labelDirection:x,tickSpacing:v,autoBounds:y,autoBoundUpdateInterval:M}),[{path:$},{size:H,labelSize:w,...P},L]=f.use$2({aetherKey:V,type:n,schema:_.coreAxisStateZ,initialState:D});g.useEffect(()=>L(Z=>({...Z,...D})),[D]),g.useEffect(()=>{const{lower:Z,upper:Y}=_.parseAutoBounds(P.autoBounds);P.bounds!=null&&(Z&&S?.lower!==P.bounds.lower||Y&&S?.upper!==P.bounds.upper)&&k?.(P.bounds)},[P.autoBounds,P.bounds]);const O=Pn({loc:a,key:`${n}-${V}`,size:H+w,order:1},`${e.toUpperCase()}Axis`),z=ws.useTypography(d).toString(),F=g.useRef(0);return g.useEffect(()=>{if(e==="y"){if(c==null)return;let Y=N.dimensions(c,z)[u.g.dimension(u.g.construct(x))];Y>0&&(Y+=9),L(q=>({...q,labelSize:Y}))}else{let Y=N.dimensions(c,z).height*1.3;Y>0&&(Y+=12);const q=F.current;_.withinSizeThreshold(q,Y)||(F.current=Y,L(oe=>({...oe,labelSize:Y})))}},[c,x,z]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(R,u.CSS.B("axis"),u.CSS.B(s),u.CSS.loc(a)),style:{...A,...O},align:"center",justify:a!=="left"?"end":"start",direction:u.g.swap(e),...I,children:B&&o.jsxRuntimeExports.jsx(f.MaybeEditable,{className:u.CSS(u.CSS.BE("axis","label"),u.CSS.dir(x)),value:c,onChange:p,level:d})}),o.jsxRuntimeExports.jsx(f.Composite,{path:$,children:l})]})};return r.displayName=`${e.toUpperCase()}Axis`,r},Ga=jr("x"),Xa=jr("y"),Ua=u.J.xy.extend({root:u.K.corner,units:se.z.object({x:se.z.enum(["px","decimal"]),y:se.z.enum(["px","decimal"])})}),X1=Ua.partial({root:!0,units:!0}),U1=e=>{const t={};return t[e.root?.x??"left"]=e?.units?.x==="px"?`${e.x}px`:`${e.x*100}%`,t[e.root?.y??"top"]=e?.units?.y==="px"?`${e.y}px`:`${e.y*100}%`,t},q1=(e,t)=>{const n={x:e.x,y:e.y};if(t.current==null)return n;const s=u.$t.construct(t.current),r=u.$t.construct(t.current.parentElement);return e.units?.x==="decimal"?e.root?.x==="right"&&(n.x=1-e.x):e.root?.x==="right"?n.x=1-(e.x+u.$t.width(s))/u.$t.width(r):n.x/=u.$t.width(r),e.units?.y==="decimal"?e.root?.y==="bottom"&&(n.y=1-e.y):e.root?.y==="bottom"?n.y=1-(e.y+u.$t.height(s))/u.$t.height(r):n.y/=u.$t.height(r),n},qa=(e,t)=>{if(t.current==null)return null;const n=u.$t.construct(t.current.parentElement),s=u.$t.construct(t.current),r={x:e.x,y:e.y,root:{...u.K.TOP_LEFT},units:{x:"px",y:"px"}};return e.x>.8?(r.x=(1-e.x)*u.$t.width(n)-u.$t.width(s),r.root.x="right"):e.x<.2?r.x=e.x*u.$t.width(n):r.units.x="decimal",e.y>.8?(r.y=(1-e.y)*u.$t.height(n)-u.$t.height(s),r.root.y="bottom"):e.y<.2?r.y=e.y*u.$t.height(n):r.units.y="decimal",r.x=Math.round(r.x*100)/100,{...r,...u.J.truncate(r,3)}},Ci=u.$t.reRoot(u.$t.DECIMAL,u.K.TOP_LEFT),J1={x:.1,y:.1,root:u.K.TOP_LEFT,units:{x:"decimal",y:"decimal"}},Er=g.memo(({className:e,value:t,onChange:n,style:s,draggable:r=!0,initial:i=J1,...l})=>{const[a,c]=N.usePurePassthrough({value:t,onChange:n,initial:i}),d=g.useRef(a),x=f.useSyncedRef(r===!1),p=g.useRef(null);a!==null&&(s={...s,...U1(a)});const m=g.useCallback(j=>{if(p.current?.parentElement==null)return d.current;const E=u.$t.construct(p.current.parentElement),S=u.C.XY.scale(E).scale(Ci),R=S.box(u.$t.construct(p.current)),v=u.C.XY.clamp(u.$t.construct(u.$t.topLeft(Ci),{width:1-u.$t.width(R),height:1-u.$t.height(R)})),y=u.J.translate(u.J.construct(d.current),u.$t.signedDims(S.box(j))),C=v.pos(y);return qa(C,p)},[]),h=Pe.useCursorDrag({onStart:g.useCallback(()=>{d.current=q1(d.current,p)},[]),onMove:g.useCallback(j=>{if(x.current)return;const E=m(j);E!==null&&c(E)},[]),onEnd:g.useCallback(j=>{if(x.current)return;const E=m(j);E!==null&&(d.current=E)},[])});return o.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(e,u.CSS.B("legend")),bordered:!0,style:s,onDragStart:h,draggable:r,borderColor:5,ref:p,onDrag:f.preventDefault,onDragEnd:f.preventDefault,background:1,rounded:1,...l})});Er.displayName="Legend.Container";const ks=g.memo(({data:e,onEntryChange:t,onVisibleChange:n,allowVisibleChange:s=!0,background:r=1})=>o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:e.sort((i,l)=>i.label.localeCompare(l.label)).map(({key:i,color:l,label:a,visible:c=!0})=>o.jsxRuntimeExports.jsxs(f.Box,{style:{cursor:"pointer",height:"3rem"},x:!0,align:"center",gap:"small",justify:"between",grow:!0,children:[o.jsxRuntimeExports.jsxs(f.Box,{direction:"x",align:"center",gap:"small",children:[o.jsxRuntimeExports.jsx(Pe.Swatch,{value:l,onChange:d=>t?.({key:i,color:d,label:a,visible:c}),onVisibleChange:n,allowChange:t!=null,draggable:!1,size:"tiny"}),o.jsxRuntimeExports.jsx(f.MaybeEditable,{level:"small",value:a,onChange:d=>t?.({key:i,color:l,label:d,visible:c}),overflow:"nowrap",color:c?10:7,onDoubleClick:d=>d.stopPropagation()})]}),s&&o.jsxRuntimeExports.jsx(f.Button,{className:u.CSS.B("visible-toggle"),onClick:d=>{d.stopPropagation(),t?.({key:i,color:l,label:a,visible:!c})},onDoubleClick:d=>d.stopPropagation(),size:"tiny",contrast:r,variant:"text",children:c?o.jsxRuntimeExports.jsx(f.Visible,{}):o.jsxRuntimeExports.jsx(f.Hidden,{})})]},i))}));ks.displayName="LegendSwatches";const yr=({data:e=[],onEntryChange:t,position:n,onPositionChange:s,allowVisibleChange:r=!0,background:i=1,...l})=>{const[a,c]=g.useState(!1);return e.length===0?null:o.jsxRuntimeExports.jsx(Er,{...l,className:r?u.CSS.M("with-visible-toggle"):void 0,draggable:!a,value:n,onChange:s,gap:r?0:"small",background:i,children:o.jsxRuntimeExports.jsx(ks,{data:e,onEntryChange:t,onVisibleChange:c,allowVisibleChange:r,background:i})})},Q1=Object.freeze(Object.defineProperty({__proto__:null,Container:Er,LegendSwatches:ks,Simple:yr,calcStickyPos:qa,completeStickyXYz:Ua,stickyXYz:X1},Symbol.toStringTag,{value:"Module"})),Sr=g.memo(({className:e,style:t,onLineChange:n,...s})=>{const{lines:r}=Je("Legend");return Je("Legend"),o.jsxRuntimeExports.jsx(yr,{data:r,onEntryChange:n,...s})});Sr.displayName="FloatingLegend";const e0=({onLineChange:e})=>{const{lines:t}=Je("Legend"),n=f.useUniqueKey(),s=Pn({key:n,size:t.length>0?36:0,loc:"bottom",order:5},"Legend");return o.jsxRuntimeExports.jsx(f.Box,{className:u.CSS.BE("legend","container"),align:"center",x:!0,style:{...s,padding:"0 1rem",height:"var(--pluto-height-medium)",margin:"1rem 0 ",width:"fit-content"},children:o.jsxRuntimeExports.jsx(ks,{data:t,onEntryChange:e,background:0})})},Ja=({variant:e="floating",...t})=>e==="floating"?o.jsxRuntimeExports.jsx(Sr,{...t}):o.jsxRuntimeExports.jsx(e0,{...t}),Rr=g.memo(({aetherKey:e,...t})=>(f.useUnidirectional({aetherKey:e,type:_.Line.TYPE,schema:_.stateZ,state:t}),null));Rr.displayName="Line";const t0=Object.freeze(Object.defineProperty({__proto__:null,Line:Rr},Symbol.toStringTag,{value:"Module"})),Cr=({aetherKey:e,color:t,label:n="",visible:s=!0,...r})=>{const i=f.useUniqueKey(e),{setLine:l,removeLine:a}=Je("Line");return g.useEffect(()=>(l({key:i,color:t,label:n,visible:s}),()=>a(i)),[n,t,s]),o.jsxRuntimeExports.jsx(Rr,{aetherKey:i,color:t,label:n,visible:s,...r})},Qa=({level:e="h2",...t})=>{const n=f.useUniqueKey(),s=ws.useTypography(e),r=Pn({key:n,size:(s.lineHeight+2)*s.baseSize,loc:"top",order:10},"Title");return o.jsxRuntimeExports.jsx(f.Box,{justify:"center",align:"center",style:r,children:o.jsxRuntimeExports.jsx(f.MaybeEditable,{...t,level:e})})},ec=({aetherKey:e,...t})=>{const n=f.useUniqueKey(e),[,,s]=f.use$2({aetherKey:n,type:_.Tooltip.TYPE,schema:_.tooltipStateZ,initialState:{position:null,...t}}),r=g.useRef(null),i=g.useCallback(a=>{const c=document.querySelector(".pluto-canvas-container");if(c==null)return;const d=u.$t.topLeft(c);s({position:u.J.translation(d,u.J.construct(a))})},[s]),l=g.useCallback(()=>s({position:null}),[s]);return g.useEffect(()=>{if(r.current===null)return;const a=r.current.parentElement;if(a!=null)return a.addEventListener("mousemove",i),a.addEventListener("mouseleave",l),()=>{a.removeEventListener("mousemove",i),a.removeEventListener("mouseleave",l)}},[i]),o.jsxRuntimeExports.jsx("span",{ref:r})},n0=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:ec},Symbol.toStringTag,{value:"Module"})),tc=()=>{const e=g.useRef(new Map),t=g.useCallback(s=>{const{request:r,response:i}=s,l=e.current.get(r);l!=null&&(l(i.bounds),e.current.delete(r))},[]),[,,n]=f.use$2({type:_.BoundQuerier.TYPE,schema:_.boundQuerierStateZ,onAetherChange:t,initialState:{request:"",response:{request:"",bounds:{}}}});return g.useCallback(async()=>await new Promise(s=>{const r=u.$t$1.create();e.current.set(r,s),n(i=>({...i,request:r}))}),[])},s0=({ref:e})=>(e.current=tc(),null),o0={select:"pointer",zoom:"crosshair",pan:"grab",zoomReset:"crosshair",click:"pointer",cancel:"default"},nc=({className:e,mode:t,maskBox:n,children:s,style:r,...i})=>o.jsxRuntimeExports.jsxs("div",{className:u.CSS(u.CSS.noSelect,u.CSS.BE("viewport-mask","container"),e),style:{cursor:o0[t],...r},...i,children:[o.jsxRuntimeExports.jsx("div",{style:{...u.$t.css(n),display:u.$t.areaIsZero(n)?"none":"block"},className:u.CSS.BE("viewport-mask","selection")}),s]}),r0=(e,t)=>{for(;e!=null&&!t(e);)e=e.parentElement;return e},i0=11,l0=6,a0=2,wi=5,c0=e=>u.$t.width(e)<wi&&u.$t.height(e)<wi,xn=e=>{const t=u.$t.width(e),n=u.$t.height(e);return Math.min(t,n)<.001?i0:l0},u0=["zoom","pan","select","zoomReset","cancel"],wr=[...u0,"click"],d0=se.z.enum(wr),sc=["zoom","select"],pn={defaultMode:"zoom",zoom:[["MouseLeft"]],zoomReset:[["MouseLeft","Control"]],pan:[["MouseLeft","Shift"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},oc={defaultMode:"pan",pan:[["MouseLeft"]],zoom:[["MouseLeft","Shift"]],zoomReset:[["MouseLeft","Control"]],select:[["MouseLeft","Alt"]],cancel:[["Escape"]]},rc={defaultMode:"select",select:[["MouseLeft"]],pan:[["MouseLeft","Shift"]],zoom:[["MouseLeft","Alt"]],zoomReset:[["MouseLeft","Control"]],cancel:[["Escape"]]},br={zoom:pn,pan:oc,select:rc,zoomReset:pn,click:pn,cancel:pn},x0=e=>{const t=Object.entries(e);return Object.fromEntries(t.map(([n,s])=>n==="defaultMode"?[n,s]:[n,s.map(r=>r.filter(i=>i!=="MouseLeft")).filter(r=>r.length>0)]))},p0=u.$t.construct(0,0,1,1,u.K.TOP_LEFT),m0={width:30,height:50},ic=({onChange:e,triggers:t,initial:n=p0,threshold:s=m0,ref:r})=>{const i=t?.defaultMode??"zoom",[l,a]=g.useState(u.$t.ZERO),[c,d]=g.useState(i),[x,p]=f.useStateRef(n),m=g.useRef(u.J.ZERO),h=g.useRef(null),j=u._.construct(s);g.useEffect(()=>p(()=>u.$t.truncate(n,xn(n))),[n]),g.useEffect(()=>d(i),[i]);const[E,S,R,v]=f.useMemoCompare(()=>{const I={...br[i],...t},B=f.flattenConfig(I),V=x0(I);return[I,B,V,f.flattenConfig(V)]},f.compareModeConfigs,[t]),y=g.useCallback(({box:I,triggers:B,stage:V,cursor:D})=>{if(h.current==null)return;const $=f.determineMode(E,B),H=u.$t.construct(h.current);if($==null)return;if($==="cancel"){a(u.$t.ZERO),e?.({box:x.current,mode:$,stage:V,cursor:D});return}if($==="zoomReset")return a(u.$t.ZERO),e?.({box:u.$t.DECIMAL,mode:$,stage:V,cursor:D}),p(u.$t.DECIMAL);const w=c0(I);if(V==="end"){if(w){$==="zoom"&&a(u.$t.ZERO),e?.({box:x.current,mode:"click",stage:V,cursor:D});return}return p(L=>{if($==="pan"){const z=bi(I,L,H);return z===null||u.$t.equals(z,L)?L:(e?.({box:z,mode:$,stage:V,cursor:D}),z)}const O=C(I,L,H);return O===null?L:(e?.({box:O,mode:$,stage:V,cursor:D}),$==="zoom"?(a(u.$t.ZERO),O):u.$t.truncate(L,xn(L)))})}if(sc.includes($))return w?void 0:a(u.C.XY.scale(H).clamp(H).translate({x:-u.$t.left(H),y:-u.$t.top(H)}).box(vi(j,I,H)));if(a(L=>u.$t.areaIsZero(L)?L:u.$t.ZERO),u.J.distance(D,m.current)<a0)return;m.current=D;const P=bi(I,x.current,H);e?.({box:P,mode:$,stage:V,cursor:D})},[a,d,e,E,s.height,s.width,p,h,xn]);g.useImperativeHandle(r,()=>({reset:()=>{a(u.$t.ZERO),p(u.$t.DECIMAL),e?.({box:u.$t.DECIMAL,mode:"zoomReset",stage:"start",cursor:u.J.ZERO})}}),[e]);const C=g.useCallback((I,B,V)=>{const D=Mo(B,V).box(vi(j,I,V));return u.$t.truncate(D,xn(D))},[s]),M=f.useHeldRef({triggers:[["Control"]]}),k=f.useHeldRef({triggers:[["Alt"]]});g.useEffect(()=>{const I=B=>{if(h.current==null)return;let V=1;B.deltaY<0?V-=.035:V+=.035;const D=u.$t.construct(h.current),$=u.J.construct(B);if(Array.from(h.current.children).push(h.current),!u.$t.contains(D,$)||h.current!==B.target&&r0(B.target,z=>z===h.current)==null)return;const P=Mo(x.current,u.$t.construct(h.current)).pos(u.J.construct(B));let O=u.C.XY.magnify({x:M.current.held?1:V,y:k.current.held?1:V}).box(x.current);O=u.$t.translate(O,{x:M.current.held?0:P.x*(1-V),y:k.current.held?0:P.y*(1-V)}),p(O),e?.({stage:"end",box:O,cursor:u.J.construct(B),mode:"zoom"})};return window.addEventListener("wheel",I),()=>window.removeEventListener("wheel",I)},[p,e]),Fl.useDrag({bound:h,onDrag:y,triggers:S,loose:!0});const A=g.useCallback(({triggers:I,stage:B})=>{if(B==="end")return d(i);const V=f.determineMode(R,I);V!=null&&d(V)},[R,i,e]);return f.use$1({triggers:v,callback:A,region:h}),{maskBox:l,ref:h,mode:c}},Mo=(e,t)=>u.C.XY.scale(t).clamp(t).scale(e),bi=(e,t,n)=>{let s=u.$t.signedDims(Mo(t,n).box(e));s={signedWidth:-s.signedWidth,signedHeight:-s.signedHeight};const r=u.C.XY.translate(u.J.construct(s)).box(t);return u.$t.truncate(r,xn(r))},vi=(e,t,n)=>u.$t.height(t)<=e.height?u.$t.construct(u.$t.left(t),u.$t.top(n),u.$t.width(t),u.$t.height(n)):u.$t.width(t)<=e.width?u.$t.construct(u.$t.left(n),u.$t.top(t),u.$t.width(n),u.$t.height(t)):t,ro=({mode:e,triggers:t})=>o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",children:[o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:u.z.capitalize(e)}),o.jsxRuntimeExports.jsx(f.Box,{empty:!0,x:!0,align:"center",children:o.jsxRuntimeExports.jsx(f.Text$1,{trigger:t[0],level:"small"})})]}),f0=({triggers:e,value:t,onChange:n,disable:s=["zoomReset","click","cancel"],...r})=>{const i=g.useMemo(()=>wr.filter(l=>!s.includes(l)),[s]);return o.jsxRuntimeExports.jsxs(fe.Buttons,{...r,keys:i,value:t,onChange:n,children:[o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"zoom",tooltip:o.jsxRuntimeExports.jsx(ro,{mode:"zoom",triggers:e.zoom}),size:"small",children:o.jsxRuntimeExports.jsx(f.Zoom,{})}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"pan",tooltip:o.jsxRuntimeExports.jsx(ro,{mode:"pan",triggers:e.pan}),size:"small",children:o.jsxRuntimeExports.jsx(f.Pan,{})}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"select",tooltip:o.jsxRuntimeExports.jsx(ro,{mode:"select",triggers:e.select}),size:"small",children:o.jsxRuntimeExports.jsx(f.Selection,{})})]})},h0=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_TRIGGERS:br,MASK_MODES:sc,MODES:wr,Mask:nc,PAN_DEFAULT_TRIGGERS:oc,SELECT_DEFAULT_TRIGGERS:rc,SelectMode:f0,ZOOM_DEFAULT_TRIGGERS:pn,modeZ:d0,use:ic},Symbol.toStringTag,{value:"Module"})),g0=e=>e==null?null:e.closest(".pluto-line-plot__viewport")??null,lc=({ref:e,children:t,initial:n=u.$t.DECIMAL,onChange:s,...r})=>{const{setViewport:i}=Je("Viewport");g.useLayoutEffect(()=>{i({box:n,mode:"zoom",cursor:u.J.ZERO,stage:"start"})},[i,n]);const l=g.useCallback(c=>{i(c),s?.(c)},[s,i]),a=ic({onChange:l,initial:n,ref:e,...r});return o.jsxRuntimeExports.jsx(nc,{className:u.CSS.BE("line-plot","viewport"),...a,children:t})},j0=Object.freeze(Object.defineProperty({__proto__:null,BoundsQuerier:s0,Floating:Sr,Legend:Ja,Line:Cr,LinePlot:Ka,Title:Qa,Tooltip:n0,Viewport:lc,XAxis:Ga,YAxis:Xa,axisFactory:jr,selectViewportEl:g0,useBoundQuerier:tc,useContext:Je,useGridEntry:Pn,useViewport:Wa},Symbol.toStringTag,{value:"Module"})),E0=({aetherKey:e,...t})=>(f.use$2({aetherKey:e,type:_.Annotation.TYPE,schema:_.annotationStateZ,initialState:t}),null),ac=({aetherKey:e,menu:t,...n})=>{const s=f.useUniqueKey(e),{setViewport:r,setHold:i}=Je("Range.Provider"),[,{hovered:l,count:a},c]=f.use$2({aetherKey:s,type:_.Provider$2.TYPE,schema:_.providerStateZ$1,initialState:{...n,cursor:null,hovered:null,count:0}}),d=Pn({key:s,loc:"top",size:a>0?32:0,order:3},"Annotation.Provider"),x=f.useContextMenu(),p=f.useSyncedRef(x.visible),m=g.useCallback(j=>c(E=>({...E,cursor:{x:j.clientX,y:j.clientY}})),[c]),h=g.useCallback(()=>{p.current||c(j=>({...j,cursor:null}))},[c,p]);return o.jsxRuntimeExports.jsx(f.ContextMenu,{...x,menu:()=>t==null||l==null?null:t(l),children:o.jsxRuntimeExports.jsx(f.Box,{style:{...d,cursor:l!=null?"pointer":"default",width:"100%",height:"100%"},onContextMenu:x.open,className:x.className,onClick:()=>{l!=null&&(r({box:u.$t.construct({x:l.viewport.lower,y:0},{x:l.viewport.upper,y:1}),mode:"zoom",cursor:u.J.ZERO,stage:"start"}),i(!0))},onMouseMove:m,onMouseLeave:h})})},y0=Object.freeze(Object.defineProperty({__proto__:null,Annotation:E0,Provider:ac},Symbol.toStringTag,{value:"Module"})),cc={defaultMode:"empty",one:[["1"]],two:[["2"]],clear:[["Shift"]],empty:[[]]},S0=f.flattenConfig(cc),uc=({aetherKey:e})=>{const t=f.useUniqueKey(e),[,,n]=f.use$2({aetherKey:t,type:_.Measure.TYPE,schema:_.measureStateZ,initialState:{hover:null,one:null,two:null}}),s=g.useRef(null),r=f.useHeldRef({triggers:S0,loose:!0}),i=g.useCallback(({mode:c,cursor:d})=>{if(c==="click"){const x=f.determineMode(cc,r.current.triggers,{loose:!0});if(["one","two"].includes(x))return n(p=>({...p,[x]:d}));n(x==="clear"?p=>({...p,one:null,two:null}):p=>({...p,one:p.one??d,two:p.one!==null?d:p.two}))}},[n,r]);Wa(i);const l=g.useCallback(c=>n(d=>({...d,hover:u.J.construct(c)})),[n]),a=g.useCallback(()=>{n(c=>({...c,hover:null}))},[n]);return g.useEffect(()=>{if(s.current===null)return;const c=s.current.parentElement;if(c!=null)return c.addEventListener("mousemove",l),c.addEventListener("mouseleave",a),()=>{c.removeEventListener("mousemove",l),c.removeEventListener("mouseleave",a)}},[i]),o.jsxRuntimeExports.jsx("span",{ref:s})},R0=Object.freeze(Object.defineProperty({__proto__:null,Measure:uc},Symbol.toStringTag,{value:"Module"})),vr=({aetherKey:e,label:t,position:n,onLabelChange:s,onPositionChange:r,onUnitsChange:i,units:l="",color:a,lineWidth:c,lineDash:d,className:x,onSelect:p,style:m,...h})=>{const[j,E]=N.usePurePassthrough({value:t,onChange:s,initial:""}),S=f.useSyncedRef(r),[,{pixelPosition:R},v]=f.use$2({aetherKey:e,type:_.Rule.TYPE,schema:_.ruleStateZ,initialState:{color:a,dragging:!1,position:n,lineWidth:c,lineDash:d},onAetherChange:g.useCallback(({position:$})=>{$!=null&&S.current?.($)},[S])}),y=g.useRef(R);R!==y.current&&(y.current=R);const{id:C}=Je("Rule"),k=document.getElementById(C)?.querySelector(".pluto-line-plot__viewport"),A=g.useRef(R);g.useEffect(()=>{v($=>({...$,position:n,color:a,lineWidth:c,lineDash:d}))},[n,a,c,d]);const I=Pe.useCursorDrag({onStart:g.useCallback(()=>{p?.(),v($=>({...$,dragging:!0})),A.current=y.current},[]),onMove:$=>{v(H=>({...H,pixelPosition:(A.current??0)+u.$t.signedHeight($)}))},onEnd:g.useCallback(()=>{v($=>({...$,dragging:!1})),A.current=R},[])}),B=g.useRef(null);if(n==null||R==null)return null;const V=u.ir.pickByContrast(a,u.ir.BLACK,u.ir.WHITE),D=o.jsxRuntimeExports.jsxs("div",{ref:B,className:u.CSS.B("rule"),style:{top:`calc(${R}px - 0.5rem)`},children:[o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("rule","drag-handle"),onDragStart:I,draggable:!0}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",className:u.CSS(x,u.CSS.BE("rule","tag")),bordered:!0,onClick:p,empty:!0,rounded:!0,style:{borderColor:u.ir.cssString(a),backgroundColor:u.ir.hex(u.ir.setAlpha(a,.7)),...m},...h,children:[o.jsxRuntimeExports.jsx(f.Editable,{className:u.CSS.BE("rule","label"),level:"small",value:j,onChange:E,color:V}),o.jsxRuntimeExports.jsx(Zl.Divider$1,{y:!0,style:{borderColor:u.ir.cssString(a)}}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",className:u.CSS.BE("rule","value"),children:[o.jsxRuntimeExports.jsx(f.Editable,{value:n.toFixed(2),onChange:$=>{const H=Number($);isFinite(H)&&r?.(H)},level:"small",color:V}),l.length>0&&o.jsxRuntimeExports.jsx(f.MaybeEditable,{level:"small",color:V,value:l,onChange:i})]})]})]});return k==null?D:Hl.createPortal(D,k)},C0=Object.freeze(Object.defineProperty({__proto__:null,Rule:vr},Symbol.toStringTag,{value:"Module"})),dc=f.canDropOfType(Mt),w0=({lines:e,axes:t,showTitle:n=!0,title:s="",onTitleChange:r,showLegend:i=!0,legendPosition:l,onLegendPositionChange:a,titleLevel:c="h4",onLineChange:d,onRuleChange:x,onAxisChannelDrop:p,onAxisChange:m,rules:h,enableTooltip:j=!0,enableMeasure:E=!1,initialViewport:S=u.$t.DECIMAL,legendVariant:R,onViewportChange:v,viewportTriggers:y,rangeAnnotationProvider:C,onSelectRule:M,children:k,...A})=>{const I=t.filter(({location:H})=>u.K.isY(H)),B=g.useRef(null),V=f.usePrevious(e.length),D=f.usePrevious(A.hold),$=V===0&&e.length!==0||D===!0&&A.hold===!1;return g.useEffect(()=>{$&&B.current?.reset()},[$]),o.jsxRuntimeExports.jsxs(Ka,{...A,children:[I.map((H,w)=>{const P=e.filter(z=>z.axes.x===H.key),L=t.filter(({location:z})=>u.K.isX(z)),O=h?.filter(z=>[...L.map(({key:F})=>F),H.key].includes(z.axis));return o.jsxRuntimeExports.jsx(b0,{axis:H,index:w,lines:P,yAxes:L,rules:O,onAxisChannelDrop:p,onAxisChange:m,annotationProvider:C,onRuleChange:x,onSelectRule:M},H.key)}),i&&o.jsxRuntimeExports.jsx(Ja,{onLineChange:d,position:l,onPositionChange:a,variant:R}),n&&o.jsxRuntimeExports.jsx(Qa,{value:s,onChange:r,level:c}),o.jsxRuntimeExports.jsxs(lc,{initial:S,onChange:v,triggers:y,ref:B,children:[j&&o.jsxRuntimeExports.jsx(ec,{}),E&&o.jsxRuntimeExports.jsx(uc,{}),k]})]})},b0=({yAxes:e,lines:t,index:n,rules:s,onRuleChange:r,onSelectRule:i,onAxisChannelDrop:l,onAxisChange:a,axis:{location:c,key:d,showGrid:x,...p},annotationProvider:m})=>{const h=f.useDrop({type:"Channel.LinePlot.XAxis",canDrop:dc,onDrop:g.useCallback(({items:S})=>{const R=f.filterByType(Mt,S);return l?.(d,R.map(({key:v})=>v)),R},[d,l])}),j=s?.filter(S=>S.axis===d),E=f.useDraggingState();return o.jsxRuntimeExports.jsxs(Ga,{...p,...h,location:c,axisKey:d,showGrid:x??n===0,className:u.CSS(u.CSS.dropRegion(f.canDropOfType(Mt)(E))),onAutoBoundsChange:S=>a?.({key:d,bounds:S}),onLabelChange:S=>a?.({key:d,label:S}),children:[e.map((S,R)=>{const v=t.filter(C=>C.axes.y===S.key),y=s?.filter(C=>C.axis===S.key);return o.jsxRuntimeExports.jsx(_0,{axis:{...S,showGrid:x??(n===0&&R===0)},lines:v,rules:y,onRuleChange:r,onAxisChannelDrop:l,onAxisChange:a,onSelectRule:i},S.key)}),j?.map(S=>g.createElement(vr,{aetherKey:S.key,...S,key:S.key,onLabelChange:R=>r?.({key:S.key,label:R}),onPositionChange:R=>r?.({key:S.key,position:R}),onUnitsChange:R=>r?.({key:S.key,units:R}),onSelect:()=>i?.(S.key)})),o.jsxRuntimeExports.jsx(ac,{...m})]})},v0=({channels:{x:e,y:t}})=>`${e??0}-${t}`,_0=({lines:e,rules:t,onRuleChange:n,onAxisChannelDrop:s,onAxisChange:r,axis:{key:i,location:l,...a},onSelectRule:c})=>{const d=f.useDrop({type:"Channel.LinePlot.YAxis",canDrop:dc,onDrop:g.useCallback(({items:p})=>{const m=f.filterByType(Mt,p);return s?.(i,m.map(({key:h})=>h)),m},[i,s])}),x=f.useDraggingState();return o.jsxRuntimeExports.jsxs(Xa,{...a,...d,location:l,axisKey:i,className:u.CSS(u.CSS.dropRegion(f.canDropOfType(Mt)(x))),onAutoBoundsChange:p=>r?.({key:i,bounds:p}),onLabelChange:p=>r?.({key:i,label:p}),children:[e.map(p=>o.jsxRuntimeExports.jsx(M0,{line:p},v0(p))),t?.map(p=>g.createElement(vr,{aetherKey:p.key,...p,key:p.key,onLabelChange:m=>n?.({key:p.key,label:m}),onPositionChange:m=>n?.({key:p.key,position:m}),onUnitsChange:m=>n?.({key:p.key,units:m}),onClick:()=>c?.(p.key)}))]})},M0=({line:e})=>e.variant==="static"?o.jsxRuntimeExports.jsx(k0,{line:e}):o.jsxRuntimeExports.jsx(N0,{line:e}),N0=({line:{key:e,timeSpan:t,channels:{x:n,y:s},axes:r,...i}})=>{const{xTelem:l,yTelem:a}=g.useMemo(()=>{const c=Number(t.valueOf())*3,d=_.streamChannelData({timeSpan:t,channel:s,keepFor:c}),x=n!=null&&n!==0;return{xTelem:_.streamChannelData({timeSpan:t,channel:x?n:s,useIndexOfChannel:!x,keepFor:c}),yTelem:d}},[t.valueOf(),n,s]);return o.jsxRuntimeExports.jsx(Cr,{aetherKey:e,y:a,x:l,...i})},k0=({line:{timeRange:e,key:t,channels:{x:n,y:s},...r}})=>{const{xTelem:i,yTelem:l}=g.useMemo(()=>{const a=_.channelData({timeRange:e,channel:s}),c=n!=null&&n!==0;return{xTelem:_.channelData({timeRange:e,channel:c?n:s,useIndexOfChannel:!c}),yTelem:a}},[e.start.valueOf(),e.end.valueOf(),n,s]);return o.jsxRuntimeExports.jsx(Cr,{aetherKey:t,y:l,x:i,...r})},L0=e=>Ie({channel:N.Rm.CALCULATION_STATUS_CHANNEL_NAME,onChange:_.parsedHandler(N.Rm.calculationStatusZ,async t=>{e(t.changed)})}),_r=N.Rm.newZ.extend({name:se.z.string().min(1,"Name must not be empty"),dataType:N.$.z.transform(e=>e.toString())}).refine(e=>!e.isIndex||N.$.z.parse(e.dataType).equals(N.$.TIMESTAMP),{message:"Index channel must have data type TIMESTAMP",path:["dataType"]}).refine(e=>e.isIndex||e.index!==0||e.virtual,{message:"Data channel must have an index",path:["index"]}).refine(e=>e.virtual||!N.$.z.parse(e.dataType).isVariable,{message:"Persisted channels must have a fixed-size data type",path:["dataType"]}),xc=_r.extend({expression:se.z.string().min(1,"Expression must not be empty").refine(e=>e.includes("return"),{message:"Expression must contain a return statement"})}).refine(e=>e.requires?.length>0,{message:"Expression must use at least one channel",path:["requires"]}),Ls=e=>({...e.payload,dataType:e.dataType.toString()}),Mr={key:0,name:"",index:0,dataType:N.$.FLOAT32.toString(),internal:!1,isIndex:!1,leaseholder:0,virtual:!1,expression:"",requires:[]},pc=async({client:e,params:{key:t}})=>{if(t==null)return null;const n=await e.channels.retrieve(t);return Ls(n)},mc=async({client:e,value:t,onChange:n})=>{const s=await e.channels.create(t);n(Ls(s))},P0=e=>$t({name:"Channel",schema:_r,initialValues:Mr,retrieve:pc,update:mc,listeners:[{channel:N.Rm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Rm.keyZ,async({changed:t,onChange:n,params:s,client:r})=>{s.key===t&&n(Ls(await r.channels.retrieve(t)))})}]})(e),T0=e=>$t({name:"Calculated Channel",schema:xc,initialValues:Mr,retrieve:pc,update:mc,listeners:[{channel:N.Rm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Rm.keyZ,async({changed:t,onChange:n,params:s,client:r})=>{s.key===t&&n(Ls(await r.channels.retrieve(t)))})}]})(e),A0={internal:!1},Nr=Ve({name:"Channels",retrieve:async({client:e,params:t})=>await e.channels.retrieve({...A0,...t,searchTerm:t.searchTerm}),retrieveByKey:async({client:e,key:t})=>await e.channels.retrieve(t),listeners:[{channel:N.Rm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Rm.keyZ,async({changed:e,onChange:t,client:n})=>{t(e,await n.channels.retrieve(e))})},{channel:N.Rm.DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Rm.keyZ,async({changed:e,onDelete:t})=>t(e))}]}),fc=e=>{if(e==null)return f.Channel;if(N.Rm.isCalculated(e))return f.Calculation;if(e.isIndex)return f.Index;const t=new u.r(e.dataType);return t.isInteger?f.Binary:t.isFloat?f.Decimal:t.equals(u.r.STRING)?f.String:t.equals(u.r.JSON)?f.JSON:f.Channel},hc=f.renderProp(({itemKey:e,...t})=>{const n=f.useItem(e),s=Ma(),r=fc(n?.payload),i=s[n?.key??0]??n?.name??"";return o.jsxRuntimeExports.jsxs(f.ListItem,{itemKey:e,...t,children:[o.jsxRuntimeExports.jsx(r,{}),i]})}),I0=({onChange:e,value:t,emptyContent:n,initialParams:s,filter:r,...i})=>{const{data:l,retrieve:a,getItem:c,subscribe:d,status:x}=Nr({initialParams:s,filter:r}),{fetchMore:p,search:m}=Qe.usePager({retrieve:a});return o.jsxRuntimeExports.jsx(bs,{resourceName:"Channel",value:t,onChange:e,data:l,haulType:Mt,getItem:c,subscribe:d,onFetchMore:p,onSearch:m,emptyContent:n,status:x,icon:o.jsxRuntimeExports.jsx(f.Channel,{}),...i,children:hc})},Nt=({onChange:e,value:t,allowNone:n,emptyContent:s,initialParams:r,filter:i,...l})=>{const{data:a,retrieve:c,getItem:d,subscribe:x,status:p}=Nr({initialParams:r,filter:i}),{fetchMore:m,search:h}=Qe.usePager({retrieve:c});return o.jsxRuntimeExports.jsx(It,{resourceName:"Channel",onChange:e,value:t,allowNone:n,emptyContent:s,onFetchMore:m,onSearch:h,data:a,getItem:d,subscribe:x,status:p,haulType:Mt,icon:o.jsxRuntimeExports.jsx(f.Channel,{}),...l,children:hc})},O0=Object.freeze(Object.defineProperty({__proto__:null,AliasInput:d1,AliasProvider:Za,LinePlot:w0,SelectMultiple:I0,SelectSingle:Nt,ZERO_FORM_VALUES:Mr,calculatedFormSchema:xc,formSchema:_r,resolveIcon:fc,useActiveRange:u1,useAlias:xr,useAliasSetter:Na,useAliases:Ma,useCalculatedForm:T0,useCalculationStatusSynchronizer:L0,useForm:P0,useList:Nr,useName:Ns},Symbol.toStringTag,{value:"Module"})),gc=({yDirection:e="up",...t})=>o.jsxRuntimeExports.jsxs(fe.Buttons,{...t,keys:u.g.DIRECTIONS,children:[o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"x",children:o.jsxRuntimeExports.jsx(f.Arrow.Right,{})}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"y",children:e==="up"?o.jsxRuntimeExports.jsx(f.Arrow.Up,{}):o.jsxRuntimeExports.jsx(f.Arrow.Down,{})})]}),$0=Object.freeze(Object.defineProperty({__proto__:null,Select:gc},Symbol.toStringTag,{value:"Module"})),B0=e=>Ie({channel:N.Ym.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Ym.deviceZ,async({changed:t})=>e(t))}),D0=()=>ct({name:"Device",retrieve:async({client:e,params:t})=>await e.hardware.devices.retrieve({key:t.key,includeStatus:!0}),listeners:[{channel:N.Ym.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Ym.deviceZ,async({onChange:e,changed:t})=>e(n=>t.key!==n.key?n:t))},{channel:N.Ym.STATUS_CHANNEL_NAME,onChange:_.parsedHandler(N.Ym.statusZ,async({changed:e,onChange:t})=>{t(n=>(e.details.device!==n.key||(n.status=e),n))})}]}),jc=Ve({name:"Devices",retrieve:async({client:e,params:t})=>await e.hardware.devices.retrieve({includeStatus:!0,...t}),retrieveByKey:async({client:e,key:t})=>await e.hardware.devices.retrieve({key:t,includeStatus:!0}),listeners:[{channel:N.Ym.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Ym.deviceZ,async({onChange:e,changed:t})=>e(t.key,t))},{channel:N.Ym.DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Ym.keyZ,async({changed:e,onDelete:t})=>t(e))},{channel:N.Ym.STATUS_CHANNEL_NAME,onChange:_.parsedHandler(N.Ym.statusZ,async({changed:e,onChange:t})=>{t(e.details.device,n=>n==null?n:{...n,status:e})})}]}),z0=f.renderProp(({itemKey:e,...t})=>{const n=f.useItem(e);return o.jsxRuntimeExports.jsxs(f.ListItem,{itemKey:e,...t,className:u.CSS.BE("device","list-item"),justify:"between",align:"center",children:[o.jsxRuntimeExports.jsxs(f.Text,{align:"center",children:[o.jsxRuntimeExports.jsx(Ec,{status:n?.status}),n?.name]}),o.jsxRuntimeExports.jsx(sr,{level:"small",color:9,weight:450,style:{marginTop:"0.25rem"},gap:"tiny",children:n?.location.split(".").map(s=>o.jsxRuntimeExports.jsx(En,{children:s},s))})]})}),H0=({onChange:e,value:t,filter:n,allowNone:s,emptyContent:r,initialParams:i,disabled:l,icon:a=o.jsxRuntimeExports.jsx(f.Device,{}),...c})=>{const{data:d,retrieve:x,getItem:p,subscribe:m,status:h}=jc({filter:n,initialParams:i}),{fetchMore:j,search:E}=Qe.usePager({retrieve:x});return o.jsxRuntimeExports.jsx(It,{resourceName:"Device",value:t,onChange:e,data:d,getItem:p,subscribe:m,onFetchMore:j,onSearch:E,emptyContent:r,status:h,disabled:l,icon:a,...c,children:z0})},Ec=({status:e,tooltipLocation:t="right"})=>{const n=e?.variant??"disabled",s=e?.message??"Device Status Unknown";return o.jsxRuntimeExports.jsxs(f.Dialog$1,{location:t,children:[o.jsxRuntimeExports.jsx(f.Summary,{variant:n,hideIcon:!0,level:"small",weight:450,children:s}),o.jsxRuntimeExports.jsx(er,{variant:n,className:u.CSS.BE("device","status-indicator")})]})},V0=Object.freeze(Object.defineProperty({__proto__:null,SelectSingle:H0,StatusIndicator:Ec,retrieve:D0,useList:jc,useSetSynchronizer:B0},Symbol.toStringTag,{value:"Module"})),yc=Ve({name:"Racks",retrieve:async({client:e,params:t})=>await e.hardware.racks.retrieve(t),retrieveByKey:async({client:e,key:t})=>await e.hardware.racks.retrieve({key:t}),listeners:[{channel:N.Wm.STATUS_CHANNEL_NAME,onChange:_.parsedHandler(N.Wm.statusZ,async({changed:e,onChange:t})=>t(e.details.rack,n=>n==null?n:{...n,status:e}))},{channel:N.Wm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Wm.keyZ,async({changed:e,onChange:t,client:n})=>t(e,(await n.hardware.racks.retrieve({key:e})).payload))},{channel:N.Wm.DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Wm.keyZ,async({changed:e,onDelete:t})=>t(e))}]}),F0=f.renderProp(e=>{const{itemKey:t}=e,n=f.useItem(t);return o.jsxRuntimeExports.jsxs(f.ListItem,{...e,align:"center",justify:"between",children:[o.jsxRuntimeExports.jsx(f.Text,{children:n?.name}),o.jsxRuntimeExports.jsx(Sc,{status:n?.status,tooltipLocation:"left"})]})}),Z0=({value:e,onChange:t,filter:n,allowNone:s,emptyContent:r,initialParams:i,...l})=>{const{data:a,retrieve:c,getItem:d,subscribe:x,status:p}=yc({initialParams:{includeStatus:!0,...i},filter:n}),{fetchMore:m,search:h}=Qe.usePager({retrieve:c});return o.jsxRuntimeExports.jsx(It,{resourceName:"Driver",value:e,onChange:t,data:a,getItem:d,subscribe:x,onFetchMore:m,onSearch:h,emptyContent:r,status:p,icon:o.jsxRuntimeExports.jsx(f.Rack,{}),...l,children:F0})},Sc=({status:e,tooltipLocation:t="right"})=>{const n=g.useRef(null),s=e?.variant??"disabled";return g.useEffect(()=>{if(s!=="success")return;const r=n.current;r&&(r.classList.remove(u.CSS.BEM("rack","heartbeat","beat")),requestAnimationFrame(()=>r.classList.add(u.CSS.BEM("rack","heartbeat","beat"))))},[e]),o.jsxRuntimeExports.jsxs(f.Dialog$1,{location:t,children:[o.jsxRuntimeExports.jsx(f.Summary,{variant:s,hideIcon:!0,level:"small",weight:450,children:e?.message}),o.jsxRuntimeExports.jsx(f.Heart,{ref:n,className:u.CSS.BE("rack","heartbeat"),style:{color:Qo[s]}})]})},kr=e=>Ie({channel:N.Wm.STATUS_CHANNEL_NAME,onChange:_.parsedHandler(N.Wm.statusZ,async t=>{e(t.changed)})}),Y0=e=>{const t=et(),[n,s]=g.useState(void 0);Ke(async i=>{if(t==null||e===0){s(void 0);return}const l=await t.hardware.racks.retrieve({key:e});i.aborted||s(l)},[t,e]);const r=g.useCallback(i=>{n==null||t==null||s(t.hardware.racks.sugar({...n.payload,status:i}))},[n,t]);return kr(r),n},W0=e=>{const t=et(),[n,s]=g.useState(void 0);Ke(async i=>{if(t==null)return;const{status:l}=await t.hardware.racks.retrieve({key:e,includeStatus:!0});i.aborted||s(l)},[t]);const r=g.useCallback(i=>{i.details.rack===e&&s(i)},[e]);return kr(r),n},K0=Object.freeze(Object.defineProperty({__proto__:null,SelectSingle:Z0,StatusIndicator:Sc,use:Y0,useList:yc,useStatus:W0,useStatusSynchronizer:kr},Symbol.toStringTag,{value:"Module"})),G0=e=>Ie({channel:N.Hm.COMMAND_CHANNEL_NAME,onChange:_.parsedHandler(N.Hm.commandZ,async t=>{e(t.changed)})}),X0=(e,t=se.z.unknown())=>Ie({channel:N.Hm.STATUS_CHANNEL_NAME,onChange:_.parsedHandler(N.Hm.statusZ(t),async n=>{e(n.changed)})}),U0=["start","stop"],q0=e=>ct({name:"Task",retrieve:async({client:t,params:{key:n}})=>n==null?null:await t.hardware.tasks.retrieve({key:n,includeStatus:!0,schemas:e}),listeners:[{channel:N.Hm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Hm.keyZ,async({client:t,changed:n,onChange:s,params:{key:r}})=>{r==null||n!==r||s(await t.hardware.tasks.retrieve({key:r,schemas:e}))})}]}),J0=Ve({name:"Task",retrieve:async({client:e,params:t})=>await e.hardware.tasks.retrieve({includeStatus:!0,...t}),retrieveByKey:async({client:e,key:t})=>await e.hardware.tasks.retrieve({key:t}),listeners:[{channel:N.Hm.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.Hm.keyZ,async({client:e,changed:t,onChange:n})=>n(t,await e.hardware.tasks.retrieve({key:t})))},{channel:N.Hm.DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.Hm.keyZ,async({changed:e,onDelete:t})=>t(e))},{channel:N.Hm.STATUS_CHANNEL_NAME,onChange:_.parsedHandler(N.Hm.statusZ(se.z.unknown()),async({changed:e,onChange:t,client:n})=>{t(e.details.task,s=>s==null?s:n.hardware.tasks.sugar({...s,status:e}))})},{channel:N.Hm.COMMAND_CHANNEL_NAME,onChange:_.parsedHandler(N.Hm.commandZ,async({changed:e,onChange:t,client:n})=>{t(e.task,s=>s==null||!U0.includes(e.type)?s:n.hardware.tasks.sugar({...s,status:u._r.create({variant:"loading",message:"Executing command...",details:{task:e.task,running:!0,data:{}}})}))})}]}),Q0=Object.freeze(Object.defineProperty({__proto__:null,createRetrieveQuery:q0,useCommandSynchronizer:G0,useList:J0,useStatusSynchronizer:X0},Symbol.toStringTag,{value:"Module"})),Ps=new Error("Tab not found"),ej=new Error("Invalid Mosaic"),ls=(e,t,n="center",s,r)=>{if(e=tt(e),s===void 0)return No(e,t);const i=ko(e,s);if(n==="center")return i.tabs||=[],r!==void 0&&r>=0&&r<=i.tabs.length?i.tabs.splice(r,0,t):i.tabs.push(t),i.selected=t.tabKey,e;const l=i.key*2,a=i.key*2+1,c=n==="top"||n==="left"?l:a;if(ko(e,c).key!==i.key)return ls(e,t,"center",c);if(i.tabs==null||i.tabs.length===0)return ls(e,t,"center",s);const[d,x,p]=ij(n);if(i.direction=p,i[d]={key:0,tabs:[t],selected:t.tabKey},i[x]={key:0,tabs:i.tabs,selected:i.selected},i.first==null||i.last==null)throw ej;return i.first.key=l,i.last.key=a,i.tabs=void 0,i.size=void 0,i.selected=void 0,e},tj=(e,t,n)=>{e=tt(e);const[s,r]=kt(e,t);if(s==null||r==null)throw Ps;return r.tabs=r.tabs?.map(i=>i.tabKey===t?n(i):i),e},No=(e,t)=>(e=tt(e),e.tabs!=null?(e.tabs.push(t),e.selected=t.tabKey,e):(e.first!=null?e.first=No(e.first,t):e.last!=null&&(e.last=No(e.last,t)),e)),as=e=>{e=tt(e);const t=[];if(e.tabs!=null&&(e.selected=Ne.resetSelection(e.selected,e.tabs),e.selected!=null&&t.push(e.selected)),e.first!=null){const[n,s]=as(e.first);e.first=n,t.push(...s)}if(e.last!=null){const[n,s]=as(e.last);e.last=n,t.push(...s)}return[e,t]},Lr=(e,t)=>{e=tt(e);const[,n]=kt(e,t);if(n==null)return[e,null];n.tabs=n.tabs?.filter(r=>r.tabKey!==t),n.selected=Ne.resetSelection(n.selected,n.tabs),e=rj(e);const s=n.selected??cs(e);return[e,s]},cs=e=>e.selected!=null?e.selected:e.first!=null?cs(e.first):e.last!=null?cs(e.last):null,Rc=(e,t)=>{e=tt(e);const[n,s]=kt(e,t);if(n==null||s==null)throw Ps;return s.selected=t,e},Cc=(e,t,n,s,r)=>{e=tt(e);const[i,l]=kt(e,t);if(i==null||l==null)throw Ps;const[a,c]=Lr(e,t);return[ls(a,i,n,s,r),c]},yn=(e,t)=>{if(e.tabs!=null)return e.tabs.some(n=>n.tabKey===t)?e:void 0;if(e.first!=null){const n=yn(e.first,t);if(n!=null)return n}if(e.last!=null){const n=yn(e.last,t);if(n!=null)return n}},wc=(e,t,n)=>{const s=us(e,t);if(s==null)throw new Error("Node not found");return s.size=n,e},nj=(e,t,n)=>{e=tt(e);const s=yn(e,t);if(s==null)throw new Error("Tab not found");if(s.tabs==null||s.tabs.length===0)throw new Error("Node has no tabs");const r=s.tabs.findIndex(x=>x.tabKey===t);if(r===-1)throw new Error("Tab not found in node");const i=s.tabs[r];s.tabs=s.tabs.filter(x=>x.tabKey!==t);const l=s.key*2,c={key:s.key*2+1,tabs:[i],selected:i.tabKey},d={key:l,tabs:s.tabs,selected:s.selected};return d.selected=Ne.resetSelection(d.selected,d.tabs),s.direction=n,s.first=d,s.last=c,s.tabs=void 0,s.selected=void 0,e},sj=(e,t)=>{const n=yn(e,t);return n==null?!1:n.tabs!=null&&n.tabs.length>1},bc=(e,t,n)=>{e=tt(e);const[,s]=kt(e,t);if(s?.tabs==null)throw Ps;return s.tabs=Ne.rename(t,n,s?.tabs??[]),e},oj=e=>e.tabs!=null?e.tabs.length===0:e.first==null&&e.last==null,ko=(e,t)=>{const n=us(e,t);if(n!=null)return n;const s=Math.floor(t/2);return s===0?e:ko(e,s)},rj=e=>{let t=!0;for(;t;)[e,t]=Lo(e);return e=To(e,1),e},Lo=e=>{if(e.first==null||e.last==null)return[e,!1];if(Mi(e.first))return[_i(e.last),!0];if(Mi(e.last))return[_i(e.first),!0];let t,n;return[e.first,t]=Lo(e.first),[e.last,n]=Lo(e.last),[e,t||n]},_i=e=>(e.size=void 0,e),Mi=e=>e.first==null&&e.last==null&&(e.tabs==null||e.tabs.length===0),kt=(e,t)=>{if(e.tabs!=null){const l=e.tabs.find(a=>a.tabKey===t);if(l!=null)return[l,e]}if(e.first==null||e.last==null)return[void 0,void 0];const[n,s]=kt(e.first,t);if(n!=null&&s!=null)return[n,s];const[r,i]=kt(e.last,t);return[r,i]},us=(e,t)=>{if(e.key===t)return e;if(e.first==null||e.last==null)return;const n=us(e.first,t);return n??us(e.last,t)},ij=e=>{switch(e){case"top":return["first","last","y"];case"left":return["first","last","x"];case"bottom":return["last","first","y"];case"right":return["last","first","x"];case"center":throw new Error("cannot split a center placed tab")}},tt=e=>N.m.copy(e),ds=(e,t,n=[])=>(n.push(t(e)),e.first!=null&&ds(e.first,t,n),e.last!=null&&ds(e.last,t,n),n),Po=(e,t)=>{t(e),e.first!=null&&Po(e.first,t),e.last!=null&&Po(e.last,t)},To=(e,t)=>(e=tt(e),e.key=t,e.first!=null&&(e.first=To(e.first,t*2)),e.last!=null&&(e.last=To(e.last,t*2+1)),e);class vc{parent;stub;el;constructor(t={}){this.el=document.createElement("div"),Object.entries(t).forEach(([n,s])=>this.el.setAttribute(n,s))}mount(t,n){n!==this.stub&&(this.unmount(null),t.replaceChild(this.el,n),this.parent=t,this.stub=n)}unmount(t){t!=null&&t!==this.stub||this.parent==null||this.stub==null||(this.parent.replaceChild(this.stub,this.el),this.parent=void 0,this.stub=void 0)}}const lj=({node:e})=>{const t=g.createRef(),n=g.useRef(e);return g.useEffect(()=>{const s=t.current;if(s==null)return;const r=s.parentNode;if(r!=null)return e.mount(r,s),()=>{t.current!=null&&e.unmount(t.current)}},[]),g.useEffect(()=>{n.current!=null&&e!==n.current&&(n.current.unmount(t.current),n.current=e);const s=t.current;if(s==null)return;const r=s.parentNode;r!=null&&e.mount(r,s)},[e]),o.jsxRuntimeExports.jsx("div",{ref:t})},_c=({node:e,children:t})=>Hl.createPortal(t,e.el),aj=Object.freeze(Object.defineProperty({__proto__:null,In:_c,Node:vc,Out:lj},Symbol.toStringTag,{value:"Module"})),xs=g.memo(({root:e,onDrop:t,onResize:n,onCreate:s,onFileDrop:r,children:i,activeTab:l,emptyContent:a,onSelect:c,onClose:d,onRename:x,onReorder:p,contextMenu:m,addTooltip:h,...j})=>{const{tabs:E,direction:S,first:R,last:v,key:y,size:C}=e,M={onDrop:t,onResize:n,onCreate:s,onFileDrop:r,children:i,onClose:d,contextMenu:m,onSelect:c,onRename:x,onReorder:p,activeTab:l,addTooltip:h},k=g.useCallback(([V])=>n(y,V),[n]),{props:A}=ea({direction:S,onResize:k,count:2,initialSizes:C!=null?[C]:void 0});let I={};y==1&&(I={...j,className:u.CSS(u.CSS.B("mosaic"))});let B;return E!==void 0?B=o.jsxRuntimeExports.jsx(Mc,{root:e,emptyContent:a,...I,...M}):R!=null&&v!=null?B=o.jsxRuntimeExports.jsxs(ta,{id:`mosaic-${y}`,align:"stretch",...A,...I,children:[o.jsxRuntimeExports.jsx(xs,{...M,root:R,onResize:n},R.key),o.jsxRuntimeExports.jsx(xs,{...M,root:v,onResize:n},v.key)]}):(B=null,console.warn("Mosaic tree is malformed")),B});xs.displayName="Mosaic";const ps="pluto-mosaic-tab-drop",Pr="pluto-mosaic-tab-create",cj=(e,t,n)=>{if(f.filterByType(f.FILE_TYPE,t).length>0&&n)return!0;const r=f.filterByType(ps,t).map(a=>a.key),i=e.filter(a=>!r.includes(a.tabKey)).length>0;return f.filterByType(Pr,t).length>0||r.length>0&&(i||e.length===0)},Mc=g.memo(({root:e,onDrop:t,onCreate:n,activeTab:s,children:r,className:i,onReorder:l,onFileDrop:a,addTooltip:c,...d})=>{const{key:x,tabs:p}=e,[m,h]=g.useState(null),j=a!=null,E=g.useCallback(({items:B})=>cj(p,B,j),[p,j]),S=g.useCallback(({items:B,event:V})=>{if(V==null)return[];const D=dj(V);h(null);const $=f.filterByType(f.FILE_TYPE,B).length>0,{percents:H}=Ni(V),w=p.length===0?"center":ki(H);if($)return a?.(x,w,V),B;const P=f.filterByType(ps,B);if(P.length>0){const O=P.map(({key:z})=>z)[0];t(x,O,w,D)}const L=f.filterByType(Pr,B);if(L.length>0){const O=L.map(({key:z})=>z);n?.(x,w,O)}return P},[t,p.length]),R=g.useCallback(({event:B})=>{if(B==null)return;const{percents:V,inSelector:D}=Ni(B);let $=null;D||($=p.length===0?"center":ki(V)),h($)},[p.length]),{startDrag:v,...y}=f.useDragAndDrop({type:"Mosaic",canDrop:E,onDrop:S,onDragOver:R}),C=E(f.useDraggingState()),M=g.useCallback(()=>h(null),[]),k=g.useCallback((B,{tabKey:V})=>{v([{key:V,type:ps,elementID:B.currentTarget.id}])},[v]),A=g.useCallback(()=>n?.(x,"center"),[x]),I=x==1&&p.length==0;return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:o.jsxRuntimeExports.jsxs(Ne.Tabs,{id:`tab-${x}`,tabs:p,className:u.CSS(i,I&&m!=null&&u.CSS.M("drag-over")),onDragLeave:M,selected:e.selected,selectedAltColor:s===e.selected,onDragStart:k,onCreate:A,addTooltip:c,...y,...d,children:[e.selected!=null&&r(p.find(B=>B.tabKey===e.selected)),C&&o.jsxRuntimeExports.jsx("div",{style:{zIndex:1e3,position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),m!=null&&o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("mosaic","mask"),style:uj[m]})]})})});Mc.displayName="MosaicTabLeaf";const uj={top:{left:"0%",top:"0%",width:"100%",height:"50%"},bottom:{left:"0%",top:"50%",width:"100%",height:"50%"},left:{left:"0%",top:"0%",width:"50%",height:"100%"},right:{left:"50%",top:"0%",width:"50%",height:"100%"},center:{left:"0%",top:"0%",width:"100%",height:"100%"}},Ni=e=>{const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,s=e.clientY-t.top;return s<24?{percents:{x:.5,y:.5},inSelector:!0}:{percents:{x:n/t.width,y:s/t.height},inSelector:!1}},dj=e=>{const t=e.target.closest(".pluto-tabs-selector__btn");if(t!=null)return Array.from(t.parentElement?.children??[]).indexOf(t)},xj=e=>e,pj=e=>1-e,ki=({x:e,y:t})=>{if(e>.33&&e<.66&&t>.33&&t<.66)return"center";const[n,s]=[xj(e),pj(e)];if(t>n&&t>s)return"bottom";if(t<n&&t<s)return"top";if(t>n&&t<s)return"left";if(t<n&&t>s)return"right";throw new Error("[bug] - invalid insert position")},mj=({root:e,onSelect:t,children:n})=>{const s=g.useRef(new Map),r=new Set,i=ds(e,l=>l.tabs?.map(a=>{let c=s.current.get(a.tabKey);return a==null?null:(c==null&&(c=new vc({style:"width: 100%; height: 100%; position: relative;"}),c.el.addEventListener("click",()=>t?.(a.tabKey)),s.current.set(a.tabKey,c)),r.add(a.tabKey),o.jsxRuntimeExports.jsx(_c,{node:c,children:n({...a,visible:a.tabKey===l.selected})},a.tabKey))})).flat().filter(l=>l!=null);return s.current.forEach((l,a)=>!r.has(a)&&s.current.delete(a)),[s,i]},Ao=se.z.object({key:se.z.number(),tabs:se.z.array(Ne.tabZ).optional(),selected:se.z.string().optional(),direction:u.g.direction.optional(),size:se.z.number().optional(),get first(){return Ao.optional()},get last(){return Ao.optional()}}),fj=({allowRename:e=!1,initialTree:t})=>{const[n,s]=g.useState(t);return g.useEffect(()=>s(as(t)[0]),[t]),{root:n,onDrop:(d,x,p)=>s(m=>Cc(m,x,p,d)[0]),onClose:d=>s(x=>Lr(x,d)[0]),onSelect:d=>s(x=>Rc(x,d)),onResize:(d,x)=>s(p=>wc(p,d,x)),onRename:e?(d,x)=>s(p=>bc(p,d,x)):void 0}},hj=Object.freeze(Object.defineProperty({__proto__:null,HAUL_CREATE_TYPE:Pr,HAUL_DROP_TYPE:ps,Mosaic:xs,autoSelectTabs:as,canSplit:sj,findSelected:cs,findTabNode:yn,forEachNode:Po,insertTab:ls,isEmpty:oj,mapNodes:ds,moveTab:Cc,nodeZ:Ao,removeTab:Lr,renameTab:bc,resizeNode:wc,selectTab:Rc,split:nj,updateTab:tj,use:fj,usePortal:mj},Symbol.toStringTag,{value:"Module"})),gj=({variant:e,className:t,...n})=>o.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(t,u.CSS.B("note"),u.CSS.M(e)),align:"stretch",empty:!0,...n}),jj=Object.freeze(Object.defineProperty({__proto__:null,Note:gj},Symbol.toStringTag,{value:"Module"})),io={Close:o.jsxRuntimeExports.jsxs("svg",{width:"124",height:"124",viewBox:"0 0 124 124",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"88.3883",width:"87",height:"11",transform:"rotate(-45 26.8701 88.3883)",fill:"#7E0508"}),o.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"34.6482",width:"11",height:"87",transform:"rotate(-45 26.8701 34.6482)",fill:"#7E0508"})]}),Minimize:o.jsxRuntimeExports.jsx("svg",{width:"87",height:"11",viewBox:"0 0 87 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsxRuntimeExports.jsx("rect",{x:"15",width:"60",height:"11",fill:"#985712"})}),Maximize:o.jsxRuntimeExports.jsxs("svg",{width:"143",height:"143",viewBox:"0 0 143 143",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsxRuntimeExports.jsx("path",{d:"M108.242 32.8833C108.797 32.8817 109.247 33.3317 109.245 33.8862L109.092 87.5891C109.09 88.4786 108.014 88.9223 107.385 88.2933L53.8351 34.7432C53.2061 34.1142 53.6499 33.0387 54.5394 33.0361L108.242 32.8833Z",fill:"#0B650D"}),o.jsxRuntimeExports.jsx("path",{d:"M33.8862 109.245C33.3317 109.247 32.8818 108.797 32.8833 108.242L33.0361 54.5394C33.0387 53.6499 34.1142 53.2061 34.7432 53.8351L88.2934 107.385C88.9223 108.014 88.4786 109.09 87.5891 109.092L33.8862 109.245Z",fill:"#0B650D"})]})},Ej=({disabled:e=[],className:t,focused:n=!0,onMinimize:s,onMaximize:r,onFullscreen:i,onClose:l,...a})=>o.jsxRuntimeExports.jsxs(f.Box,{gap:1.5,x:!0,className:u.CSS(u.CSS.B("macos-controls"),!n&&u.CSS.BM("macos-controls","blurred"),t),...a,children:[o.jsxRuntimeExports.jsx(lo,{onClick:l,className:u.CSS.BM("macos-control","close"),disabled:e.includes("close"),children:io.Close}),o.jsxRuntimeExports.jsx(lo,{onClick:s,className:u.CSS.BM("macos-control","minimize"),disabled:e.includes("minimize"),children:io.Minimize}),o.jsxRuntimeExports.jsx(lo,{onClick:i,className:u.CSS.BM("macos-control","maximize"),disabled:e.includes("maximize"),children:io.Maximize})]}),lo=({className:e,disabled:t,color:n,...s})=>o.jsxRuntimeExports.jsx("button",{className:u.CSS(u.CSS.B("macos-control"),u.CSS.disabled(t),e),tabIndex:-1,disabled:t,...s}),yj=({disabled:e=[],onMinimize:t,onMaximize:n,onClose:s,onFullscreen:r,focused:i,contrast:l=2,...a})=>o.jsxRuntimeExports.jsxs(f.Box,{pack:!0,...a,children:[o.jsxRuntimeExports.jsx(ao,{className:u.CSS.BM("windows-control","minimize"),onClick:t,disabled:e.includes("minimize"),contrast:l,children:o.jsxRuntimeExports.jsx(f.Subtract,{})}),o.jsxRuntimeExports.jsx(ao,{className:u.CSS.BM("windows-control","maximize"),onClick:n,disabled:e.includes("maximize"),contrast:l,children:o.jsxRuntimeExports.jsx(f.Box$1,{})}),o.jsxRuntimeExports.jsx(ao,{onClick:s,className:u.CSS.BM("windows-control","close"),disabled:e.includes("close"),contrast:l,children:o.jsxRuntimeExports.jsx(f.Close,{})})]}),ao=({disabled:e=!1,className:t,...n})=>e?null:o.jsxRuntimeExports.jsx(f.Button,{className:u.CSS(u.CSS.B("windows-control"),t),tabIndex:-1,...n}),Nc=u.S.getOS,Sj="Windows",Rj=({forceOS:e,visibleIfOS:t,...n})=>{const s=Nc({force:e,default:Sj});if(t!=null&&t!==s)return null;const r=s==="macOS"?Ej:yj;return o.jsxRuntimeExports.jsx(r,{...n})},Cj=Object.freeze(Object.defineProperty({__proto__:null,Controls:Rj,use:Nc},Symbol.toStringTag,{value:"Module"})),wj=(e,t)=>{const n=s=>o.jsxRuntimeExports.jsx(e,{...t,...s});return n.displayName=e.displayName,n},bj=Object.freeze(Object.defineProperty({__proto__:null,createComponent:wj},Symbol.toStringTag,{value:"Module"}));g.createContext({instrumentation:N.O.NOOP});const vj=({children:e,...t})=>{const{path:n}=f.useUnidirectional({type:N.Provider$1.TYPE,schema:N.providerStateZ,state:t});return o.jsxRuntimeExports.jsx(f.Composite,{path:n,children:e})},_j="data:video/mp2t;base64,Ly8gQ29weXJpZ2h0IDIwMjUgU3lubmF4IExhYnMsIEluYy4KLy8KLy8gVXNlIG9mIHRoaXMgc29mdHdhcmUgaXMgZ292ZXJuZWQgYnkgdGhlIEJ1c2luZXNzIFNvdXJjZSBMaWNlbnNlIGluY2x1ZGVkIGluIHRoZSBmaWxlCi8vIGxpY2Vuc2VzL0JTTC50eHQuCi8vCi8vIEFzIG9mIHRoZSBDaGFuZ2UgRGF0ZSBzcGVjaWZpZWQgaW4gdGhhdCBmaWxlLCBpbiBhY2NvcmRhbmNlIHdpdGggdGhlIEJ1c2luZXNzIFNvdXJjZQovLyBMaWNlbnNlLCB1c2Ugb2YgdGhpcyBzb2Z0d2FyZSB3aWxsIGJlIGdvdmVybmVkIGJ5IHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAsCi8vIGluY2x1ZGVkIGluIHRoZSBmaWxlIGxpY2Vuc2VzL0FQTC50eHQuCgppbXBvcnQgeyBwbHV0byB9IGZyb20gIkAvcGx1dG8vYWV0aGVyIjsKCnBsdXRvLnJlbmRlcigpOwo=",kc=({children:e})=>{const{path:t}=f.useUnidirectional({type:_.BaseProvider.TYPE,schema:_.providerStateZ$2,state:{}});return o.jsxRuntimeExports.jsx(f.Composite,{path:t,children:e})},Mj=new Set([u.r.UUID,u.r.JSON]),Nj=e=>{if(e.equals(u.r.JSON))return o.jsxRuntimeExports.jsx(f.JSON,{});if(e.isInteger)return o.jsxRuntimeExports.jsx(f.Binary,{});if(e.isFloat)return o.jsxRuntimeExports.jsx(f.Decimal,{});if(e.equals(u.r.STRING)||e.equals(u.r.UUID))return o.jsxRuntimeExports.jsx(f.String,{});if(e.equals(u.r.TIMESTAMP))return o.jsxRuntimeExports.jsx(f.Time$1,{})},Lc=u.r.ALL.filter(e=>e!==u.r.UNKNOWN).map(e=>({key:e.toString(),name:Mj.has(e)?e.toString().toUpperCase():u.z.capitalize(e.toString()),icon:Nj(e)})),kj=Lc.filter(e=>!new u.r(e.key).isVariable),Lj=({hideVariableDensity:e=!1,...t})=>{const n=e?kj:Lc;return o.jsxRuntimeExports.jsx(Mn,{...t,data:n,resourceName:"Data Type"})},Pj=Object.freeze(Object.defineProperty({__proto__:null,Provider:kc,SelectDataType:Lj},Symbol.toStringTag,{value:"Module"})),Tj=e=>{switch(e.variant){case"disabled":return e.details?.valid===!0?{message:"Uncontrolled. Click to take control.",chipColor:"var(--pluto-gray-l12)"}:{message:"No channel connected. This element cannot be controlled.",chipColor:"var(--pluto-gray-l7)",disabled:!0};case"error":return{message:"Not controlled by you. Click to take absolute control.",chipColor:"var(--pluto-error-z)"};case"success":return e.details?.authority===N.Bm.ABSOLUTE_AUTHORITY?{message:"You have absolute control. Click to release.",chipColor:"var(--pluto-secondary-z)",buttonStyle:{background:"var(--pluto-secondary-z-30)"}}:{message:"You're in control. Release schematic to release control.",chipColor:"var(--pluto-primary-z)"};default:return{message:"Unexpected status.",chipColor:"var(--pluto-error-z)"}}},Pc=({source:e,sink:t,className:n,...s})=>{const r=f.useMemoDeepEqual({source:e,sink:t}),[,{status:i},l]=f.use$2({type:_.Chip.TYPE,schema:_.chipStateZ,initialState:{triggered:!1,...r,status:{key:"no_chip",variant:"disabled",message:"No chip connected.",time:u.n.now(),details:{}}}});g.useEffect(()=>{l(m=>({...m,...r}))},[r,l]);const a=g.useCallback(()=>l(m=>({...m,triggered:!m.triggered})),[l]),{message:c,chipColor:d,buttonStyle:x,disabled:p}=Tj(i);return o.jsxRuntimeExports.jsx(f.Button,{variant:"text",className:u.CSS(u.CSS.B("control-chip"),n),disabled:p,onClick:a,tooltip:o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:c}),style:x,...s,children:o.jsxRuntimeExports.jsx(f.Circle,{color:d})})},Tc=g.createContext({needsControlOf:[]}),Ac=()=>g.use(Tc),Aj=({children:e,onStatusChange:t,...n})=>{const s=f.useMemoDeepEqual(n),[{path:r},{status:i,needsControlOf:l},a]=f.use$2({type:_.Controller.TYPE,schema:_.controllerStateZ,initialState:s});return g.useEffect(()=>{i!=null&&t?.(i)},[i,t]),g.useEffect(()=>{a(c=>({...c,...s}))},[s,a]),g.useEffect(()=>()=>t?.("released"),[]),o.jsxRuntimeExports.jsxs(Tc,{value:{needsControlOf:l},children:[o.jsxRuntimeExports.jsx(f.Composite,{path:r,children:e}),";"]})},Ic=({colorSource:e,statusSource:t})=>{const n=f.useMemoDeepEqual({colorSource:e,statusSource:t}),[,{color:s,status:r},i]=f.use$2({type:_.Indicator.TYPE,initialState:{...n,status:{key:"no_chip",variant:"warning",message:"No chip connected.",time:u.n.now(),details:{color:void 0}}},schema:_.indicatorStateZ});g.useEffect(()=>{i(a=>({...a,...n}))},[n,i]);let l;return r.details?.color!=null?l=u.ir.colorZ.parse(r.details.color):s!=null&&!u.ir.isZero(s)?l=s:l="var(--pluto-gray-l10)",o.jsxRuntimeExports.jsxs(f.Dialog$1,{location:{x:"center",y:"bottom"},children:[o.jsxRuntimeExports.jsx(f.Text,{children:r.message}),o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("indicator"),style:{backgroundColor:u.ir.cssString(l),flexGrow:1}})]})},Ij=e=>{const{needsControlOf:t}=Ac(),[,{states:n},s]=f.use$2({type:_.Legend.TYPE,schema:_.legendStateZ,initialState:{states:[],needsControlOf:t}});g.useEffect(()=>{s(l=>({...l,needsControlOf:t}))},[t]);const i=u.c.unique(n.map(l=>l.subject.key)).map(l=>{const a=n.find(c=>c.subject.key===l);if(a==null)throw new N.lt("Legend subject not found");return{key:a.subject.key,label:a.subject.name,color:a.subjectColor}});return o.jsxRuntimeExports.jsx(yr,{data:i,...e})},Oc=({children:e})=>{const[{path:t}]=f.use$2({type:_.StateProvider.TYPE,schema:_.stateProviderStateZ,initialState:{}});return o.jsxRuntimeExports.jsx(f.Composite,{path:t,children:e})},Oj=Object.freeze(Object.defineProperty({__proto__:null,Chip:Pc,Controller:Aj,Indicator:Ic,Legend:Ij,StateProvider:Oc,useContext:Ac},Symbol.toStringTag,{value:"Module"})),$c=e=>{const t=({disabled:n=!1,...s})=>n?s.children:o.jsxRuntimeExports.jsx(e,{...s});return t.displayName=e.displayName,t},$j=$c(kc),Bj=$c(f.Provider$4),Dj=({children:e,connParams:t,workerEnabled:n=!0,workerURL:s,theming:r,tooltip:i,triggers:l,alamos:a,haul:c,channelAlias:d,telem:x,color:p})=>o.jsxRuntimeExports.jsx(f.Provider$1,{...l,children:o.jsxRuntimeExports.jsx(f.Config,{...i,children:o.jsxRuntimeExports.jsx(f.Provider$2,{...c,children:o.jsxRuntimeExports.jsx(f.Provider$3,{url:s??_j,enabled:n,children:o.jsxRuntimeExports.jsx(Bj,{workerKey:"vis",children:o.jsxRuntimeExports.jsx(vj,{...a,children:o.jsxRuntimeExports.jsx(f.Aggregator,{children:o.jsxRuntimeExports.jsx(pa,{connParams:t,children:o.jsxRuntimeExports.jsx(wa,{children:o.jsxRuntimeExports.jsx(Za,{...d,children:o.jsxRuntimeExports.jsx(Pe.Provider,{...p,children:o.jsxRuntimeExports.jsx(f.Provider,{...r,children:o.jsxRuntimeExports.jsx($j,{...x,children:o.jsxRuntimeExports.jsx(Oc,{children:e})})})})})})})})})})})})})}),zj=Object.freeze(Object.defineProperty({__proto__:null,Provider:Dj},Symbol.toStringTag,{value:"Module"})),Hj=({value:e})=>o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("progress"),children:o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("progress-bar"),style:{width:`${e}%`}})}),Vj=Object.freeze(Object.defineProperty({__proto__:null,Progress:Hj},Symbol.toStringTag,{value:"Module"})),Fj=({steps:e,value:t,onChange:n,...s})=>{const r=e.findIndex(i=>i.key===t);return o.jsxRuntimeExports.jsx(f.Box,{x:!0,align:"center",className:u.CSS.B("steps"),...s,children:e.map((i,l)=>o.jsxRuntimeExports.jsxs(g.Fragment,{children:[o.jsxRuntimeExports.jsxs(f.Button,{onClick:()=>n(i.key),variant:"outlined",disabled:l>r,children:[l+1,". ",i.title]},i.key),l!==e.length-1&&o.jsxRuntimeExports.jsx(f.Arrow.Right,{style:{fontSize:"15px",color:"var(--pluto-gray-l10)"}})]},i.key))})},Zj=Object.freeze(Object.defineProperty({__proto__:null,Steps:Fj},Symbol.toStringTag,{value:"Module"})),Yj=({children:e,className:t,visible:n,...s})=>{const[{path:r},,i]=f.use$2({type:_.Table.TYPE,schema:_.Table.stateZ,initialState:{region:u.$t.ZERO,visible:n}});g.useEffect(()=>{i(a=>({...a,visible:n}))},[n]);const l=Ln(a=>i(c=>({...c,region:a})));return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{ref:l,style:{right:0,bottom:0,position:"absolute",top:6,left:6}}),o.jsxRuntimeExports.jsx("table",{className:u.CSS(u.CSS.B("table"),t),...s,children:o.jsxRuntimeExports.jsx("tbody",{children:o.jsxRuntimeExports.jsx(f.Composite,{path:r,children:e})})})]})},Wj=({children:e,className:t,size:n,index:s,onResize:r,onSelect:i,position:l,...a})=>o.jsxRuntimeExports.jsxs("tr",{className:u.CSS(u.CSS.BE("table","row"),t),...a,children:[r!=null&&o.jsxRuntimeExports.jsx(Dc,{onSelect:i,index:s,value:n,onChange:r,position:l,direction:"y"}),e]}),Tr=({ref:e,children:t,className:n,selected:s=!1,...r})=>o.jsxRuntimeExports.jsx("td",{ref:e,...r,className:u.CSS(u.CSS.BE("table","cell"),u.CSS.selected(s),n),children:t}),Bc="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Kj=e=>Bc[e],Dc=({value:e,selected:t=!1,index:n,onChange:s,position:r,direction:i="x",onSelect:l})=>{const a=f.useSyncedRef(e),c=g.useRef(e),d=Pe.useCursorDrag({onStart:g.useCallback(()=>{c.current=a.current},[]),onMove:g.useCallback(x=>s(c.current+u.$t.dim(x,i,!0),n),[s,n])});return o.jsxRuntimeExports.jsxs("td",{id:`resizer-${i}-${n}`,className:u.CSS(u.CSS.BE("table","resizer"),u.CSS.dir(i),u.CSS.selected(t),f.CONTEXT_TARGET,t&&f.CONTEXT_SELECTED),style:{[u.g.dimension(i)]:e},onClick:()=>l(n),onContextMenu:()=>l(n),children:[o.jsxRuntimeExports.jsx(f.Text,{full:"x",justify:"center",align:"center",square:!1,children:i==="x"?Bc[n]:n+1}),o.jsxRuntimeExports.jsx("button",{onClick:x=>x.stopPropagation(),style:{[u.g.location(i)]:r+e},onDragStart:d,draggable:!0})]})},Gj=({selected:e,onSelect:t,columns:n,onResize:s})=>{let r=15;return o.jsxRuntimeExports.jsxs("tr",{className:u.CSS(u.CSS.BE("table","row"),u.CSS.BE("table","col-resizer")),children:[o.jsxRuntimeExports.jsx("td",{}),n.map((i,l)=>{const a=r;return r+=i,o.jsxRuntimeExports.jsx(Dc,{onSelect:t,position:a,selected:e.includes(l),index:l,value:i,onChange:c=>s(c,l),direction:"x"},l)})]})},Xj=Object.freeze(Object.defineProperty({__proto__:null,Cell:Tr,ColumnIndicators:Gj,Row:Wj,Table:Yj,getCellColumn:Kj},Symbol.toStringTag,{value:"Module"})),zc=se.z.object({bounds:u.W.bounds,gradient:u.ir.gradientZ}),Ar={bounds:{lower:0,upper:1},gradient:[]},Li={size:"small",showDragHandle:!1},Pi={width:60},Uj=u.C.Scale.scale(0,1),Ir=({path:e})=>{const{set:t,get:n}=sn(),s=cr(`${e}.bounds`),r=Uj.scale(s);return o.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(De,{inputProps:Li,style:Pi,label:"Lower",path:`${e}.bounds.lower`}),o.jsxRuntimeExports.jsx(Ee,{path:`${e}.gradient`,label:"Gradient",align:"start",padHelpText:!1,children:({value:i,onChange:l})=>o.jsxRuntimeExports.jsx(Pe.GradientPicker,{value:N.m.copy(i),scale:r,onChange:a=>{const d={...n(`${e}.bounds`).value},x=a.map(S=>S.position),p=r.pos(Math.max(...x)),m=r.pos(Math.min(...x)),h=p>d.upper,j=m<d.lower;h&&(a[a.length-1].position=1,d.upper=p),j&&(a[0].position=0,d.lower=m);const E=a.map(S=>({...S,color:u.ir.hex(S.color)}));h||j?t(e,{bounds:d,gradient:E}):l(a.map(S=>({...S,color:u.ir.hex(S.color)})))}})}),o.jsxRuntimeExports.jsx(De,{inputProps:Li,style:Pi,label:"Upper",path:`${e}.bounds.upper`})]})},qj=e=>o.jsxRuntimeExports.jsxs(fe.Buttons,{...e,keys:u.mr.NOTATIONS,children:[o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"standard",children:"Standard"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"scientific",children:"Scientific"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"engineering",children:"Engineering"})]}),Jj=[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],Or=({path:e})=>{const{value:t,onChange:n}=Et(e),s=_.sourcePipelinePropsZ.parse(t.telem?.props),r=_.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=_.stringifyNumberProps.parse(s.segments.stringifier.props),l=_.rollingAverageProps.parse(s.segments.rollingAverage.props),a=h=>{const j=_.sourcePipeline("string",{connections:Jj,segments:{valueStream:_.streamChannelValue({channel:r.channel}),stringifier:_.stringifyNumber({precision:i.precision??2,notation:i.notation}),rollingAverage:_.rollingAverage({windowSize:l.windowSize??1}),...h},outlet:"stringifier"});n({...t,telem:j})},c=h=>a({valueStream:_.streamChannelValue({channel:h??0})}),d=h=>a({stringifier:_.stringifyNumber({...i,notation:h})}),x=h=>a({stringifier:_.stringifyNumber({...i,precision:h})}),p=h=>a({rollingAverage:_.rollingAverage({windowSize:h})});if(typeof r.channel!="number")throw new Error("Must pass in a channel by key to Value.TelemForm");const[m]=Ns(r.channel);return g.useEffect(()=>n({...t,tooltip:[m]}),[m]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Te.Item,{label:"Input Channel",grow:!0,children:o.jsxRuntimeExports.jsx(Nt,{value:r.channel,onChange:c})}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Te.Item,{label:"Notation",children:o.jsxRuntimeExports.jsx(qj,{value:i.notation,onChange:d})}),o.jsxRuntimeExports.jsx(Te.Item,{label:"Precision",align:"start",children:o.jsxRuntimeExports.jsx(f.Numeric,{value:i.precision??2,bounds:{lower:0,upper:10},onChange:x})}),o.jsxRuntimeExports.jsx(Te.Item,{label:"Averaging Window",align:"start",children:o.jsxRuntimeExports.jsx(f.Numeric,{value:l.windowSize??1,bounds:{lower:1,upper:100},onChange:p})})]})]})},Qj=_.Value.z.partial({color:!0}).extend({level:N.levelZ.optional()}),$r=({aetherKey:e,box:t,telem:n,color:s,precision:r,minWidth:i,level:l="small",backgroundTelem:a,notation:c,location:d,useWidthForBackground:x,valueBackgroundOverScan:p,valueBackgroundShift:m})=>{const h=f.useMemoDeepEqual({box:t,telem:n,color:s,precision:r,level:l,minWidth:i,notation:c,backgroundTelem:a,location:d,useWidthForBackground:x,valueBackgroundOverScan:p,valueBackgroundShift:m}),[,j,E]=f.use$2({aetherKey:e,type:_.Value.TYPE,schema:_.Value.z,initialState:h});return g.useEffect(()=>E(S=>({...S,...h})),[h]),{width:j.width??j.minWidth}},e2=Object.freeze(Object.defineProperty({__proto__:null,RedlineForm:Ir,TelemForm:Or,ZERO_READLINE:Ar,corePropsZ:Qj,redlineZ:zc,use:$r},Symbol.toStringTag,{value:"Module"})),t2="text",Hc=se.z.object({value:se.z.string(),level:N.levelZ,weight:N.weightZ,align:u.K.x.or(u.K.center),backgroundColor:u.ir.crudeZ}),Vc=({cellKey:e,onChange:t,value:n,selected:s,onSelect:r,align:i,level:l,weight:a,backgroundColor:c})=>{const d=p=>r(e,p),x=p=>t({level:l,value:p,weight:a,align:i,backgroundColor:c});return o.jsxRuntimeExports.jsx(Tr,{id:e,className:u.CSS(f.CONTEXT_TARGET,s&&f.CONTEXT_SELECTED,u.CSS.BEM("table","cell","text")),selected:s,onClick:d,onContextMenu:d,style:{backgroundColor:u.ir.cssString(c)},children:o.jsxRuntimeExports.jsx(f.Editable,{level:l,value:n,weight:a,onChange:x,style:{justifyContent:i},allowEmpty:!0,outline:!1})})},n2="value",Fc=se.z.object({telem:_.stringSourceSpecZ,redline:zc,level:N.levelZ,color:se.z.string(),units:se.z.string()}),Zc=({cellKey:e,telem:t,level:n,color:s,redline:{gradient:r,bounds:i},selected:l,box:a,onSelect:c})=>{const{width:d}=$r({aetherKey:e,box:a,telem:t,level:n,color:s,backgroundTelem:_.sourcePipeline("color",{connections:[{from:"source",to:"scale"},{from:"scale",to:"gradient"}],segments:{source:t,scale:_.scaleNumber({scale:u.C.Scale.scale(i).scale(0,1).transform}),gradient:_.colorGradient({gradient:r})},outlet:"gradient"}),location:{x:"center",y:"center"}}),x=p=>c(e,p);return o.jsxRuntimeExports.jsx(Tr,{id:e,selected:l,onClick:x,onContextMenu:x,style:{height:"5rem",width:d},className:u.CSS(f.CONTEXT_TARGET,l&&f.CONTEXT_SELECTED,u.CSS.BEM("table","cell","value"))})},s2={padding:"2rem"},co=e=>o.jsxRuntimeExports.jsx(f.Box,{...e,style:s2,y:!0}),o2=[{tabKey:"style",name:"Style"},{tabKey:"telem",name:"Telemetry"},{tabKey:"redline",name:"Redline"}],Yc=({onVariantChange:e})=>{const t=g.useCallback(({tabKey:s})=>{switch(s){case"telem":return o.jsxRuntimeExports.jsx(co,{children:o.jsxRuntimeExports.jsx(Or,{path:""})});case"redline":return o.jsxRuntimeExports.jsx(co,{children:o.jsxRuntimeExports.jsx(Ir,{path:"redline"})});default:return o.jsxRuntimeExports.jsx(co,{children:o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Te.Item,{label:"Variant",padHelpText:!1,children:o.jsxRuntimeExports.jsx(Br,{onChange:e,value:"value"})}),o.jsxRuntimeExports.jsx(Ee,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,path:"color",children:({value:r,onChange:i,variant:l,...a})=>o.jsxRuntimeExports.jsx(Pe.Swatch,{value:r??u.ir.setAlpha(u.ir.ZERO,1),onChange:i,...a,bordered:!0})}),o.jsxRuntimeExports.jsx(Ee,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:r,onChange:i,variant:l,...a})=>o.jsxRuntimeExports.jsx(nn,{value:r,onChange:i,...a})})]})})}},[]),n=Ne.useStatic({tabs:o2,content:t});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...n,size:"small"})},r2={padding:"2rem"},Wc=({onVariantChange:e})=>o.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,style:r2,children:[o.jsxRuntimeExports.jsx(Te.Item,{label:"Variant",padHelpText:!1,children:o.jsxRuntimeExports.jsx(Br,{onChange:e,value:"text"})}),o.jsxRuntimeExports.jsx(ur,{path:"value",label:"Text"}),o.jsxRuntimeExports.jsx(Ee,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:t,onChange:n,variant:s,...r})=>o.jsxRuntimeExports.jsx(nn,{value:t,onChange:n,...r})}),o.jsxRuntimeExports.jsx(Ee,{path:"weight",label:"Weight",padHelpText:!1,children:({value:t,onChange:n,variant:s,...r})=>o.jsxRuntimeExports.jsx(ca,{value:t,onChange:n,...r})}),o.jsxRuntimeExports.jsx(Ee,{path:"align",label:"Alignment",hideIfNull:!0,children:({value:t,onChange:n,variant:s,...r})=>o.jsxRuntimeExports.jsx(fe.SelectAlignment,{value:t,onChange:n,...r})}),o.jsxRuntimeExports.jsx(Ee,{path:"backgroundColor",label:"Background",align:"start",padHelpText:!1,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(Pe.Swatch,{value:t,onChange:n})})]}),i2=[{key:"text",name:"Text",icon:o.jsxRuntimeExports.jsx(f.Text$3,{})},{key:"value",name:"Value",icon:o.jsxRuntimeExports.jsx(f.Channel,{})}],Br=e=>o.jsxRuntimeExports.jsx(Mn,{...e,data:i2,resourceName:"Variant"}),l2=["text","value"],a2=se.z.enum(l2),c2={key:"value",name:"Value",Form:Yc,Cell:Zc,defaultProps:e=>({telem:_.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:_.streamChannelValue({channel:0}),rollingAverage:_.rollingAverage({windowSize:1}),stringifier:_.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"}),redline:Ar,color:u.ir.hex(e.colors.gray.l10),level:"h5",units:""}),schema:Fc},u2={key:"text",name:"Text",Form:Wc,Cell:Vc,defaultProps:()=>({value:"",level:"h5",units:"",weight:400,align:"center",backgroundColor:"#00000000"}),schema:Hc},d2={text:u2,value:c2},x2=Object.freeze(Object.defineProperty({__proto__:null,CELLS:d2,SelectVariant:Br,TEXT_TYPE:t2,Text:Vc,TextForm:Wc,VALUE_TYPE:n2,Value:Zc,ValueForm:Yc,textPropsZ:Hc,valuePropsZ:Fc,variantZ:a2},Symbol.toStringTag,{value:"Module"})),Ti=({sourcePos:e,targetPos:t,next:n,prev:s})=>{const r=Rt(e,...n);return u.J.distance(r,t)<1?!0:(console.warn("Connector is out of sync with target"),console.log("Theoretical target",r),console.log("Actual target",t),console.log("Segments",n),console.log("Prev segments",s),!1)},Ai=({sourceStumpTip:e,sourceOrientation:t,sourceBox:n,targetStumpTip:s,targetOrientation:r,targetBox:i})=>{if(!p2({sourcePos:e,sourceOrientation:t,targetPos:s}))return;const l=u.g.construct(t),a=u.g.swap(l);let c=wt(a,s[a]-e[a]);const d=u.$t.loc(n,c);if(u.K.swap(t)===r){const x=u.$t.loc(i,u.K.swap(c));Math.abs(d-x)<$e&&(c=u.K.swap(c))}return{direction:a,length:d-e[a]+Lt(c,$e)}},Io=se.z.object({direction:u.g.direction,length:se.z.number()}),Rt=(e,...t)=>{let n=e;for(const s of t)n=u.J.translate(n,s.direction,s.length);return n},Kc=(e,t,n,s)=>{try{let r=e;const i=[e,...t.map(h=>(r=u.J.translate(r,h.direction,h.length),r))];if(!s)return i;const l=t[0],a=wt(l.direction,l.length),c=Ii(a),d=4*(2-n**.5);i[0]=u.J.translate(i[0],{[l.direction]:-1*c*d,[u.g.swap(l.direction)]:0});const x=t[t.length-1],p=wt(x.direction,x.length),m=Ii(p);return i[i.length-1]=u.J.translate(i[i.length-1],{[x.direction]:m*d,[u.g.swap(x.direction)]:0}),i}catch{return[]}},$e=10,Ii=e=>e==="top"||e==="left"?-1:1,Lt=(e,t)=>e==="top"||e==="left"?-t:t,wt=(e,t)=>e==="x"?t>0?"right":"left":t>0?"bottom":"top",ht=e=>wt(e.direction,e.length),p2=({sourcePos:e,targetPos:t,sourceOrientation:n})=>{const s=u.g.construct(n),r=t[s]-e[s];return Lt(n,r)<0},Yn=e=>({direction:u.g.construct(e),length:Lt(e,$e)}),Oi={top:Yn("top"),bottom:Yn("bottom"),left:Yn("left"),right:Yn("right")},m2=4,f2=.25,Ts=e=>Oo(h2(Oo(e))),h2=e=>{const t=[...e],n=e.findIndex((s,r)=>{const i=Math.abs(s.length);if(i<m2){if(r===0||r===e.length-1)return!1;if(i<f2)return!0;if(e.length<=3)return!1;if(r+2<e.length){const l=t[r+2];if(l.direction!==s.direction)return!1;t[r+2]={...l,length:l.length+s.length}}else{const l=t[r-2];if(l.direction!==s.direction)return!1;t[r-2]={...l,length:l.length+s.length}}return!0}return!1});return n!==-1&&t.splice(n,1),t},Oo=e=>{const t=[...e];return e.findIndex((s,r)=>{const i=t[r-1];if(r===0||s.direction!==i.direction)return!1;if(r===1){const l=r-1,a=r,c=ht(i),d=ht(s);if(c===d)return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0;if(Math.abs(i.length)===$e)return!1;const x=Lt(c,$e),p=t[l].length-x,m=t[a].length+p;return Math.abs(m)<$e?!1:(t[l]={...t[l],length:x},t[a]={...t[a],length:m},!0)}if(r===e.length-1){const l=r,a=r-1,c=ht(s),d=ht(i);if(c===d)return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0;if(Math.abs(s.length)===$e)return!1;const x=Lt(c,$e),p=t[l].length-x,m=t[a].length+p;return Math.abs(m)<$e?!1:(t[l]={...t[l],length:x},t[a]={...t[a],length:m},!0)}return t[r-1]={direction:t[r-1].direction,length:t[r-1].length+t[r].length},t.splice(r,1),!0})!==-1?Oo(t):t},Yt=e=>Ts(g2(e)),g2=({sourceBox:e,targetBox:t,sourcePos:n,targetPos:s,targetOrientation:r,sourceOrientation:i})=>{let l=i,a=r,c={...Oi[i]},d=Rt(n,c);const x={...Oi[r]};let p=Rt(s,x);const m=Math.abs(d.x-p.x),h=Math.abs(d.y-p.y);m<2*$e&&h<10&&(c.length-=m/2,x.length+=m/2,d=Rt(n,c),p=Rt(s,x));const j=[c],E=Ai({sourceStumpTip:d,sourceOrientation:i,sourceBox:e,targetStumpTip:p,targetOrientation:r,targetBox:t});E!=null&&(j.push(E),d=Rt(d,E),l=ht(E),c=E);const S=Ai({sourceStumpTip:p,sourceOrientation:a,sourceBox:t,targetStumpTip:d,targetOrientation:l,targetBox:e});S!=null&&(p=Rt(p,S),a=wt(S.direction,S.length));const R=()=>{S!=null&&(S.length*=-1,j.push(S)),x.length*=-1,j.push(x)};if(u.K.swap(l)===r){const A=u.g.construct(l),I=(p[A]-d[A])/2;j.push({direction:A,length:I});const B=u.g.swap(A);return j.push({direction:B,length:p[B]-d[B]}),j.push({direction:A,length:I}),R(),j}const v=p[c.direction]-d[c.direction];let y=u.g.swap(c.direction);const C=d[y]-p[y];let M;wt(c.direction,v)===l&&wt(y,C)===a?M={direction:c.direction,length:v}:(M={direction:y,length:p[y]-d[y]},y=u.g.swap(y)),j.push(M);const k={direction:y,length:p[y]-d[y]};return j.push(k),R(),j},j2=e=>Ts(E2(e)),E2=({segments:e,index:t,magnitude:n})=>{const s=[...e],r=s[t],i=u.g.swap(r.direction),l=ht(r);if(t===0){s.unshift({direction:i,length:n});const a=Lt(l,$e);s.unshift({direction:r.direction,length:a}),t+=2,s[t]={...s[t],length:s[t].length-a}}else s[t-1]={direction:s[t-1].direction,length:s[t-1].length+n};if(t===s.length-1){s.push({direction:i,length:-n});const a=Lt(l,$e);s.push({direction:r.direction,length:a}),s[t]={...s[t],length:s[t].length-a}}else s[t+1]={direction:s[t+1].direction,length:s[t+1].length-n};return s},y2=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n))return n;return-1},S2=(e,t,n=!1,...s)=>{const r=(i,l)=>!s.includes(l)&&t(i,l);return n?y2(e,r):e.findIndex(r)},R2=({delta:e,segments:t})=>Ts(Gc(e,t,!1)),C2=({delta:e,segments:t})=>Ts(Gc(e,t,!0)),Gc=(e,t,n)=>{let s=[...t];return e.x!==0&&(s=Bi("x",e,s,n)),e.y!==0&&(s=Bi("y",e,s,n)),s},$i=(e,t,n)=>{if(t.direction!==e)return!1;const s={...t,length:t.length-n[e]},r=ht(t),i=ht(s),l=Math.abs(s.length),a=Math.abs(t.length);return(l>a||l>$e)&&r===i},Bi=(e,t,n,s)=>{const r=u.g.swap(e),i=s?n.length-1:0,l=n[i];if($i(e,l,t)){const p=n[n.length-1];return p.direction===e&&Math.abs(l.length)<$e?(n[n.length-1]={...p,length:p.length-t[e]},n):(n[i]={...l,length:l.length-t[e]},n)}const a=s?0:n.length-1,d=S2(n,p=>p.direction===e,s,i);if(d===a){const p=n[a];return $i(e,p,t)?(n[a]={...p,length:p.length-t[e]},n):(l.direction===e&&Math.abs(l.length)>p.length?n[i]={...l,length:l.length-t[e]}:n[a]={...p,length:p.length-t[e]},n)}if(d===-1)return n.length===1?n[0].direction===e?[{direction:e,length:n[0].length-t[e]}]:[{direction:r,length:n[0].length/2},{direction:e,length:-t[e]},{direction:r,length:n[0].length/2}]:l.direction===e?(n[i]={...l,length:l.length-t[e]},n):[{direction:r,length:n[0].length},{direction:e,length:-t[e]},...n.slice(1)];const x=n[d];return n[d]={...x,length:x.length-t[e]},n},w2=se.z.object({position:u.J.xy,zoom:se.z.number()}),Xc=se.z.object({color:u.ir.crudeZ,variant:se.z.string().optional(),segments:se.z.array(Io)}),b2=Xc.extend({key:se.z.string(),source:se.z.string(),target:se.z.string(),segments:se.z.array(Io),color:u.ir.crudeZ,id:se.z.string(),data:se.z.object({segments:se.z.array(Io),color:u.ir.crudeZ,variant:se.z.string().optional()}).optional(),selected:se.z.boolean(),sourceHandle:se.z.string().nullable().optional(),targetHandle:se.z.string().nullable().optional()}),v2=se.z.object({key:se.z.string(),position:u.J.xy,selected:se.z.boolean().optional(),zIndex:se.z.number().optional(),type:se.z.string().optional(),data:u.u.unknownZ.optional(),measured:se.z.object({width:se.z.number().optional(),height:se.z.number().optional()}).optional()}),Dr=(e,t)=>e.map(n=>({id:n.key,type:"custom",zIndex:n.zIndex,measured:{...n.measured},position:{...n.position},selected:n.selected,data:{},dragHandle:t})),zr=e=>e.map(({segments:t,color:n,variant:s,...r})=>({...r,id:r.key,data:{segments:t,color:n,variant:s}})),Uc=e=>e.map(t=>({key:t.id,...t})),qc=(e,t)=>e.map(n=>(n.data??={segments:[],color:t,variant:"pipe"},{key:n.id,segments:n.data?.segments??[],selected:n.selected??!1,color:n.data?.color??t,variant:n.data?.variant??"pipe",...n})),Jc=e=>({...e.position,zoom:e.zoom}),Qc=e=>({position:u.J.construct(e),zoom:e.zoom}),eu=(e,t)=>Uc(t(Dr(e))),ns=(e,t,n)=>qc(t(zr(e)),n),_2=(e,t="x")=>{if(e.length===0)return[];const n=u.K.construct(t),s=u.K.swap(n);return e.sort((r,i)=>u.$t.loc(r.box,n)-u.$t.loc(i.box,n)),e.forEach((r,i)=>{if(i===0)return;const a=e[i-1].handles.find(h=>h.orientation===s),c=r.handles.find(h=>h.orientation===n);if(a==null||c==null)return;const d=a.absolutePosition,x=c.absolutePosition,p=u.J.set(u.J.translation(x,d),t,0),m=u.J.translate(u.$t.topLeft(r.box),p);r.box=u.$t.construct(m,u.$t.dims(r.box))}),e};function Me(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,s;n<e.length;n++)(s=Me(e[n]))!==""&&(t+=(t&&" ")+s);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var M2={value:()=>{}};function As(){for(var e=0,t=arguments.length,n={},s;e<t;++e){if(!(s=arguments[e]+"")||s in n||/[\s.]/.test(s))throw new Error("illegal type: "+s);n[s]=[]}return new ss(n)}function ss(e){this._=e}function N2(e,t){return e.trim().split(/^|\s+/).map(function(n){var s="",r=n.indexOf(".");if(r>=0&&(s=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:s}})}ss.prototype=As.prototype={constructor:ss,on:function(e,t){var n=this._,s=N2(e+"",n),r,i=-1,l=s.length;if(arguments.length<2){for(;++i<l;)if((r=(e=s[i]).type)&&(r=k2(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<l;)if(r=(e=s[i]).type)n[r]=Di(n[r],e.name,t);else if(t==null)for(r in n)n[r]=Di(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ss(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),s=0,r,i;s<r;++s)n[s]=arguments[s+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],s=0,r=i.length;s<r;++s)i[s].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)}};function k2(e,t){for(var n=0,s=e.length,r;n<s;++n)if((r=e[n]).name===t)return r.value}function Di(e,t,n){for(var s=0,r=e.length;s<r;++s)if(e[s].name===t){e[s]=M2,e=e.slice(0,s).concat(e.slice(s+1));break}return n!=null&&e.push({name:t,value:n}),e}var $o="http://www.w3.org/1999/xhtml";const zi={svg:"http://www.w3.org/2000/svg",xhtml:$o,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Is(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),zi.hasOwnProperty(t)?{space:zi[t],local:e}:e}function L2(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===$o&&t.documentElement.namespaceURI===$o?t.createElement(e):t.createElementNS(n,e)}}function P2(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function tu(e){var t=Is(e);return(t.local?P2:L2)(t)}function T2(){}function Hr(e){return e==null?T2:function(){return this.querySelector(e)}}function A2(e){typeof e!="function"&&(e=Hr(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,a=s[r]=new Array(l),c,d,x=0;x<l;++x)(c=i[x])&&(d=e.call(c,c.__data__,x,i))&&("__data__"in c&&(d.__data__=c.__data__),a[x]=d);return new He(s,this._parents)}function I2(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function O2(){return[]}function nu(e){return e==null?O2:function(){return this.querySelectorAll(e)}}function $2(e){return function(){return I2(e.apply(this,arguments))}}function B2(e){typeof e=="function"?e=$2(e):e=nu(e);for(var t=this._groups,n=t.length,s=[],r=[],i=0;i<n;++i)for(var l=t[i],a=l.length,c,d=0;d<a;++d)(c=l[d])&&(s.push(e.call(c,c.__data__,d,l)),r.push(c));return new He(s,r)}function su(e){return function(){return this.matches(e)}}function ou(e){return function(t){return t.matches(e)}}var D2=Array.prototype.find;function z2(e){return function(){return D2.call(this.children,e)}}function H2(){return this.firstElementChild}function V2(e){return this.select(e==null?H2:z2(typeof e=="function"?e:ou(e)))}var F2=Array.prototype.filter;function Z2(){return Array.from(this.children)}function Y2(e){return function(){return F2.call(this.children,e)}}function W2(e){return this.selectAll(e==null?Z2:Y2(typeof e=="function"?e:ou(e)))}function K2(e){typeof e!="function"&&(e=su(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,a=s[r]=[],c,d=0;d<l;++d)(c=i[d])&&e.call(c,c.__data__,d,i)&&a.push(c);return new He(s,this._parents)}function ru(e){return new Array(e.length)}function G2(){return new He(this._enter||this._groups.map(ru),this._parents)}function ms(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ms.prototype={constructor:ms,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function X2(e){return function(){return e}}function U2(e,t,n,s,r,i){for(var l=0,a,c=t.length,d=i.length;l<d;++l)(a=t[l])?(a.__data__=i[l],s[l]=a):n[l]=new ms(e,i[l]);for(;l<c;++l)(a=t[l])&&(r[l]=a)}function q2(e,t,n,s,r,i,l){var a,c,d=new Map,x=t.length,p=i.length,m=new Array(x),h;for(a=0;a<x;++a)(c=t[a])&&(m[a]=h=l.call(c,c.__data__,a,t)+"",d.has(h)?r[a]=c:d.set(h,c));for(a=0;a<p;++a)h=l.call(e,i[a],a,i)+"",(c=d.get(h))?(s[a]=c,c.__data__=i[a],d.delete(h)):n[a]=new ms(e,i[a]);for(a=0;a<x;++a)(c=t[a])&&d.get(m[a])===c&&(r[a]=c)}function J2(e){return e.__data__}function Q2(e,t){if(!arguments.length)return Array.from(this,J2);var n=t?q2:U2,s=this._parents,r=this._groups;typeof e!="function"&&(e=X2(e));for(var i=r.length,l=new Array(i),a=new Array(i),c=new Array(i),d=0;d<i;++d){var x=s[d],p=r[d],m=p.length,h=e3(e.call(x,x&&x.__data__,d,s)),j=h.length,E=a[d]=new Array(j),S=l[d]=new Array(j),R=c[d]=new Array(m);n(x,p,E,S,R,h,t);for(var v=0,y=0,C,M;v<j;++v)if(C=E[v]){for(v>=y&&(y=v+1);!(M=S[y])&&++y<j;);C._next=M||null}}return l=new He(l,s),l._enter=a,l._exit=c,l}function e3(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function t3(){return new He(this._exit||this._groups.map(ru),this._parents)}function n3(e,t,n){var s=this.enter(),r=this,i=this.exit();return typeof e=="function"?(s=e(s),s&&(s=s.selection())):s=s.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),s&&r?s.merge(r).order():r}function s3(e){for(var t=e.selection?e.selection():e,n=this._groups,s=t._groups,r=n.length,i=s.length,l=Math.min(r,i),a=new Array(r),c=0;c<l;++c)for(var d=n[c],x=s[c],p=d.length,m=a[c]=new Array(p),h,j=0;j<p;++j)(h=d[j]||x[j])&&(m[j]=h);for(;c<r;++c)a[c]=n[c];return new He(a,this._parents)}function o3(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var s=e[t],r=s.length-1,i=s[r],l;--r>=0;)(l=s[r])&&(i&&l.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(l,i),i=l);return this}function r3(e){e||(e=i3);function t(p,m){return p&&m?e(p.__data__,m.__data__):!p-!m}for(var n=this._groups,s=n.length,r=new Array(s),i=0;i<s;++i){for(var l=n[i],a=l.length,c=r[i]=new Array(a),d,x=0;x<a;++x)(d=l[x])&&(c[x]=d);c.sort(t)}return new He(r,this._parents).order()}function i3(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function l3(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function a3(){return Array.from(this)}function c3(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var s=e[t],r=0,i=s.length;r<i;++r){var l=s[r];if(l)return l}return null}function u3(){let e=0;for(const t of this)++e;return e}function d3(){return!this.node()}function x3(e){for(var t=this._groups,n=0,s=t.length;n<s;++n)for(var r=t[n],i=0,l=r.length,a;i<l;++i)(a=r[i])&&e.call(a,a.__data__,i,r);return this}function p3(e){return function(){this.removeAttribute(e)}}function m3(e){return function(){this.removeAttributeNS(e.space,e.local)}}function f3(e,t){return function(){this.setAttribute(e,t)}}function h3(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function g3(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function j3(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function E3(e,t){var n=Is(e);if(arguments.length<2){var s=this.node();return n.local?s.getAttributeNS(n.space,n.local):s.getAttribute(n)}return this.each((t==null?n.local?m3:p3:typeof t=="function"?n.local?j3:g3:n.local?h3:f3)(n,t))}function iu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function y3(e){return function(){this.style.removeProperty(e)}}function S3(e,t,n){return function(){this.style.setProperty(e,t,n)}}function R3(e,t,n){return function(){var s=t.apply(this,arguments);s==null?this.style.removeProperty(e):this.style.setProperty(e,s,n)}}function C3(e,t,n){return arguments.length>1?this.each((t==null?y3:typeof t=="function"?R3:S3)(e,t,n??"")):Xt(this.node(),e)}function Xt(e,t){return e.style.getPropertyValue(t)||iu(e).getComputedStyle(e,null).getPropertyValue(t)}function w3(e){return function(){delete this[e]}}function b3(e,t){return function(){this[e]=t}}function v3(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function _3(e,t){return arguments.length>1?this.each((t==null?w3:typeof t=="function"?v3:b3)(e,t)):this.node()[e]}function lu(e){return e.trim().split(/^|\s+/)}function Vr(e){return e.classList||new au(e)}function au(e){this._node=e,this._names=lu(e.getAttribute("class")||"")}au.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function cu(e,t){for(var n=Vr(e),s=-1,r=t.length;++s<r;)n.add(t[s])}function uu(e,t){for(var n=Vr(e),s=-1,r=t.length;++s<r;)n.remove(t[s])}function M3(e){return function(){cu(this,e)}}function N3(e){return function(){uu(this,e)}}function k3(e,t){return function(){(t.apply(this,arguments)?cu:uu)(this,e)}}function L3(e,t){var n=lu(e+"");if(arguments.length<2){for(var s=Vr(this.node()),r=-1,i=n.length;++r<i;)if(!s.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?k3:t?M3:N3)(n,t))}function P3(){this.textContent=""}function T3(e){return function(){this.textContent=e}}function A3(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function I3(e){return arguments.length?this.each(e==null?P3:(typeof e=="function"?A3:T3)(e)):this.node().textContent}function O3(){this.innerHTML=""}function $3(e){return function(){this.innerHTML=e}}function B3(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function D3(e){return arguments.length?this.each(e==null?O3:(typeof e=="function"?B3:$3)(e)):this.node().innerHTML}function z3(){this.nextSibling&&this.parentNode.appendChild(this)}function H3(){return this.each(z3)}function V3(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function F3(){return this.each(V3)}function Z3(e){var t=typeof e=="function"?e:tu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Y3(){return null}function W3(e,t){var n=typeof e=="function"?e:tu(e),s=t==null?Y3:typeof t=="function"?t:Hr(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),s.apply(this,arguments)||null)})}function K3(){var e=this.parentNode;e&&e.removeChild(this)}function G3(){return this.each(K3)}function X3(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function U3(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function q3(e){return this.select(e?U3:X3)}function J3(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Q3(e){return function(t){e.call(this,t,this.__data__)}}function eE(e){return e.trim().split(/^|\s+/).map(function(t){var n="",s=t.indexOf(".");return s>=0&&(n=t.slice(s+1),t=t.slice(0,s)),{type:t,name:n}})}function tE(e){return function(){var t=this.__on;if(t){for(var n=0,s=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++s]=i;++s?t.length=s:delete this.__on}}}function nE(e,t,n){return function(){var s=this.__on,r,i=Q3(t);if(s){for(var l=0,a=s.length;l<a;++l)if((r=s[l]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},s?s.push(r):this.__on=[r]}}function sE(e,t,n){var s=eE(e+""),r,i=s.length,l;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,d=a.length,x;c<d;++c)for(r=0,x=a[c];r<i;++r)if((l=s[r]).type===x.type&&l.name===x.name)return x.value}return}for(a=t?nE:tE,r=0;r<i;++r)this.each(a(s[r],t,n));return this}function du(e,t,n){var s=iu(e),r=s.CustomEvent;typeof r=="function"?r=new r(t,n):(r=s.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function oE(e,t){return function(){return du(this,e,t)}}function rE(e,t){return function(){return du(this,e,t.apply(this,arguments))}}function iE(e,t){return this.each((typeof t=="function"?rE:oE)(e,t))}function*lE(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var s=e[t],r=0,i=s.length,l;r<i;++r)(l=s[r])&&(yield l)}var xu=[null];function He(e,t){this._groups=e,this._parents=t}function Tn(){return new He([[document.documentElement]],xu)}function aE(){return this}He.prototype=Tn.prototype={constructor:He,select:A2,selectAll:B2,selectChild:V2,selectChildren:W2,filter:K2,data:Q2,enter:G2,exit:t3,join:n3,merge:s3,selection:aE,order:o3,sort:r3,call:l3,nodes:a3,node:c3,size:u3,empty:d3,each:x3,attr:E3,style:C3,property:_3,classed:L3,text:I3,html:D3,raise:H3,lower:F3,append:Z3,insert:W3,remove:G3,clone:q3,datum:J3,on:sE,dispatch:iE,[Symbol.iterator]:lE};function ze(e){return typeof e=="string"?new He([[document.querySelector(e)]],[document.documentElement]):new He([[e]],xu)}function cE(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ze(e,t){if(e=cE(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var s=n.createSVGPoint();return s.x=e.clientX,s.y=e.clientY,s=s.matrixTransform(t.getScreenCTM().inverse()),[s.x,s.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const uE={passive:!1},Sn={capture:!0,passive:!1};function uo(e){e.stopImmediatePropagation()}function Gt(e){e.preventDefault(),e.stopImmediatePropagation()}function pu(e){var t=e.document.documentElement,n=ze(e).on("dragstart.drag",Gt,Sn);"onselectstart"in t?n.on("selectstart.drag",Gt,Sn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function mu(e,t){var n=e.document.documentElement,s=ze(e).on("dragstart.drag",null);t&&(s.on("click.drag",Gt,Sn),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in n?s.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Wn=e=>()=>e;function Bo(e,{sourceEvent:t,subject:n,target:s,identifier:r,active:i,x:l,y:a,dx:c,dy:d,dispatch:x}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:x}})}Bo.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function dE(e){return!e.ctrlKey&&!e.button}function xE(){return this.parentNode}function pE(e,t){return t??{x:e.x,y:e.y}}function mE(){return navigator.maxTouchPoints||"ontouchstart"in this}function fu(){var e=dE,t=xE,n=pE,s=mE,r={},i=As("start","drag","end"),l=0,a,c,d,x,p=0;function m(C){C.on("mousedown.drag",h).filter(s).on("touchstart.drag",S).on("touchmove.drag",R,uE).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(C,M){if(!(x||!e.call(this,C,M))){var k=y(this,t.call(this,C,M),C,M,"mouse");k&&(ze(C.view).on("mousemove.drag",j,Sn).on("mouseup.drag",E,Sn),pu(C.view),uo(C),d=!1,a=C.clientX,c=C.clientY,k("start",C))}}function j(C){if(Gt(C),!d){var M=C.clientX-a,k=C.clientY-c;d=M*M+k*k>p}r.mouse("drag",C)}function E(C){ze(C.view).on("mousemove.drag mouseup.drag",null),mu(C.view,d),Gt(C),r.mouse("end",C)}function S(C,M){if(e.call(this,C,M)){var k=C.changedTouches,A=t.call(this,C,M),I=k.length,B,V;for(B=0;B<I;++B)(V=y(this,A,C,M,k[B].identifier,k[B]))&&(uo(C),V("start",C,k[B]))}}function R(C){var M=C.changedTouches,k=M.length,A,I;for(A=0;A<k;++A)(I=r[M[A].identifier])&&(Gt(C),I("drag",C,M[A]))}function v(C){var M=C.changedTouches,k=M.length,A,I;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),A=0;A<k;++A)(I=r[M[A].identifier])&&(uo(C),I("end",C,M[A]))}function y(C,M,k,A,I,B){var V=i.copy(),D=Ze(B||k,M),$,H,w;if((w=n.call(C,new Bo("beforestart",{sourceEvent:k,target:m,identifier:I,active:l,x:D[0],y:D[1],dx:0,dy:0,dispatch:V}),A))!=null)return $=w.x-D[0]||0,H=w.y-D[1]||0,function P(L,O,z){var F=D,Z;switch(L){case"start":r[I]=P,Z=l++;break;case"end":delete r[I],--l;case"drag":D=Ze(z||O,M),Z=l;break}V.call(L,C,new Bo(L,{sourceEvent:O,subject:w,target:m,identifier:I,active:Z,x:D[0]+$,y:D[1]+H,dx:D[0]-F[0],dy:D[1]-F[1],dispatch:V}),A)}}return m.filter=function(C){return arguments.length?(e=typeof C=="function"?C:Wn(!!C),m):e},m.container=function(C){return arguments.length?(t=typeof C=="function"?C:Wn(C),m):t},m.subject=function(C){return arguments.length?(n=typeof C=="function"?C:Wn(C),m):n},m.touchable=function(C){return arguments.length?(s=typeof C=="function"?C:Wn(!!C),m):s},m.on=function(){var C=i.on.apply(i,arguments);return C===i?m:C},m.clickDistance=function(C){return arguments.length?(p=(C=+C)*C,m):Math.sqrt(p)},m}var Ut=0,mn=0,un=0,hu=1e3,fs,fn,hs=0,Pt=0,Os=0,Rn=typeof performance=="object"&&performance.now?performance:Date,gu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Fr(){return Pt||(gu(fE),Pt=Rn.now()+Os)}function fE(){Pt=0}function gs(){this._call=this._time=this._next=null}gs.prototype=ju.prototype={constructor:gs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Fr():+n)+(t==null?0:+t),!this._next&&fn!==this&&(fn?fn._next=this:fs=this,fn=this),this._call=e,this._time=n,Do()},stop:function(){this._call&&(this._call=null,this._time=1/0,Do())}};function ju(e,t,n){var s=new gs;return s.restart(e,t,n),s}function hE(){Fr(),++Ut;for(var e=fs,t;e;)(t=Pt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ut}function Hi(){Pt=(hs=Rn.now())+Os,Ut=mn=0;try{hE()}finally{Ut=0,jE(),Pt=0}}function gE(){var e=Rn.now(),t=e-hs;t>hu&&(Os-=t,hs=e)}function jE(){for(var e,t=fs,n,s=1/0;t;)t._call?(s>t._time&&(s=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:fs=n);fn=e,Do(s)}function Do(e){if(!Ut){mn&&(mn=clearTimeout(mn));var t=e-Pt;t>24?(e<1/0&&(mn=setTimeout(Hi,e-Rn.now()-Os)),un&&(un=clearInterval(un))):(un||(hs=Rn.now(),un=setInterval(gE,hu)),Ut=1,gu(Hi))}}function Vi(e,t,n){var s=new gs;return t=t==null?0:+t,s.restart(r=>{s.stop(),e(r+t)},t,n),s}var EE=As("start","end","cancel","interrupt"),yE=[],Eu=0,Fi=1,zo=2,os=3,Zi=4,Ho=5,rs=6;function $s(e,t,n,s,r,i){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;SE(e,n,{name:t,index:s,group:r,on:EE,tween:yE,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Eu})}function Zr(e,t){var n=Xe(e,t);if(n.state>Eu)throw new Error("too late; already scheduled");return n}function nt(e,t){var n=Xe(e,t);if(n.state>os)throw new Error("too late; already running");return n}function Xe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function SE(e,t,n){var s=e.__transition,r;s[t]=n,n.timer=ju(i,0,n.time);function i(d){n.state=Fi,n.timer.restart(l,n.delay,n.time),n.delay<=d&&l(d-n.delay)}function l(d){var x,p,m,h;if(n.state!==Fi)return c();for(x in s)if(h=s[x],h.name===n.name){if(h.state===os)return Vi(l);h.state===Zi?(h.state=rs,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete s[x]):+x<t&&(h.state=rs,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete s[x])}if(Vi(function(){n.state===os&&(n.state=Zi,n.timer.restart(a,n.delay,n.time),a(d))}),n.state=zo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===zo){for(n.state=os,r=new Array(m=n.tween.length),x=0,p=-1;x<m;++x)(h=n.tween[x].value.call(e,e.__data__,n.index,n.group))&&(r[++p]=h);r.length=p+1}}function a(d){for(var x=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(c),n.state=Ho,1),p=-1,m=r.length;++p<m;)r[p].call(e,x);n.state===Ho&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=rs,n.timer.stop(),delete s[t];for(var d in s)return;delete e.__transition}}function is(e,t){var n=e.__transition,s,r,i=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((s=n[l]).name!==t){i=!1;continue}r=s.state>zo&&s.state<Ho,s.state=rs,s.timer.stop(),s.on.call(r?"interrupt":"cancel",e,e.__data__,s.index,s.group),delete n[l]}i&&delete e.__transition}}function RE(e){return this.each(function(){is(this,e)})}function CE(e,t){var n,s;return function(){var r=nt(this,e),i=r.tween;if(i!==n){s=n=i;for(var l=0,a=s.length;l<a;++l)if(s[l].name===t){s=s.slice(),s.splice(l,1);break}}r.tween=s}}function wE(e,t,n){var s,r;if(typeof n!="function")throw new Error;return function(){var i=nt(this,e),l=i.tween;if(l!==s){r=(s=l).slice();for(var a={name:t,value:n},c=0,d=r.length;c<d;++c)if(r[c].name===t){r[c]=a;break}c===d&&r.push(a)}i.tween=r}}function bE(e,t){var n=this._id;if(e+="",arguments.length<2){for(var s=Xe(this.node(),n).tween,r=0,i=s.length,l;r<i;++r)if((l=s[r]).name===e)return l.value;return null}return this.each((t==null?CE:wE)(n,e,t))}function Yr(e,t,n){var s=e._id;return e.each(function(){var r=nt(this,s);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return Xe(r,s).value[t]}}function yu(e,t){var n;return(typeof t=="number"?_.interpolateNumber:t instanceof _.color?_.interpolateRgb:(n=_.color(t))?(t=n,_.interpolateRgb):_.interpolateString)(e,t)}function vE(e){return function(){this.removeAttribute(e)}}function _E(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ME(e,t,n){var s,r=n+"",i;return function(){var l=this.getAttribute(e);return l===r?null:l===s?i:i=t(s=l,n)}}function NE(e,t,n){var s,r=n+"",i;return function(){var l=this.getAttributeNS(e.space,e.local);return l===r?null:l===s?i:i=t(s=l,n)}}function kE(e,t,n){var s,r,i;return function(){var l,a=n(this),c;return a==null?void this.removeAttribute(e):(l=this.getAttribute(e),c=a+"",l===c?null:l===s&&c===r?i:(r=c,i=t(s=l,a)))}}function LE(e,t,n){var s,r,i;return function(){var l,a=n(this),c;return a==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),c=a+"",l===c?null:l===s&&c===r?i:(r=c,i=t(s=l,a)))}}function PE(e,t){var n=Is(e),s=n==="transform"?Ug:yu;return this.attrTween(e,typeof t=="function"?(n.local?LE:kE)(n,s,Yr(this,"attr."+e,t)):t==null?(n.local?_E:vE)(n):(n.local?NE:ME)(n,s,t))}function TE(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function AE(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function IE(e,t){var n,s;function r(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&AE(e,i)),n}return r._value=t,r}function OE(e,t){var n,s;function r(){var i=t.apply(this,arguments);return i!==s&&(n=(s=i)&&TE(e,i)),n}return r._value=t,r}function $E(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var s=Is(e);return this.tween(n,(s.local?IE:OE)(s,t))}function BE(e,t){return function(){Zr(this,e).delay=+t.apply(this,arguments)}}function DE(e,t){return t=+t,function(){Zr(this,e).delay=t}}function zE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?BE:DE)(t,e)):Xe(this.node(),t).delay}function HE(e,t){return function(){nt(this,e).duration=+t.apply(this,arguments)}}function VE(e,t){return t=+t,function(){nt(this,e).duration=t}}function FE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?HE:VE)(t,e)):Xe(this.node(),t).duration}function ZE(e,t){if(typeof t!="function")throw new Error;return function(){nt(this,e).ease=t}}function YE(e){var t=this._id;return arguments.length?this.each(ZE(t,e)):Xe(this.node(),t).ease}function WE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;nt(this,e).ease=n}}function KE(e){if(typeof e!="function")throw new Error;return this.each(WE(this._id,e))}function GE(e){typeof e!="function"&&(e=su(e));for(var t=this._groups,n=t.length,s=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,a=s[r]=[],c,d=0;d<l;++d)(c=i[d])&&e.call(c,c.__data__,d,i)&&a.push(c);return new at(s,this._parents,this._name,this._id)}function XE(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,s=t.length,r=n.length,i=Math.min(s,r),l=new Array(s),a=0;a<i;++a)for(var c=t[a],d=n[a],x=c.length,p=l[a]=new Array(x),m,h=0;h<x;++h)(m=c[h]||d[h])&&(p[h]=m);for(;a<s;++a)l[a]=t[a];return new at(l,this._parents,this._name,this._id)}function UE(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function qE(e,t,n){var s,r,i=UE(t)?Zr:nt;return function(){var l=i(this,e),a=l.on;a!==s&&(r=(s=a).copy()).on(t,n),l.on=r}}function JE(e,t){var n=this._id;return arguments.length<2?Xe(this.node(),n).on.on(e):this.each(qE(n,e,t))}function QE(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function e5(){return this.on("end.remove",QE(this._id))}function t5(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Hr(e));for(var s=this._groups,r=s.length,i=new Array(r),l=0;l<r;++l)for(var a=s[l],c=a.length,d=i[l]=new Array(c),x,p,m=0;m<c;++m)(x=a[m])&&(p=e.call(x,x.__data__,m,a))&&("__data__"in x&&(p.__data__=x.__data__),d[m]=p,$s(d[m],t,n,m,d,Xe(x,n)));return new at(i,this._parents,t,n)}function n5(e){var t=this._name,n=this._id;typeof e!="function"&&(e=nu(e));for(var s=this._groups,r=s.length,i=[],l=[],a=0;a<r;++a)for(var c=s[a],d=c.length,x,p=0;p<d;++p)if(x=c[p]){for(var m=e.call(x,x.__data__,p,c),h,j=Xe(x,n),E=0,S=m.length;E<S;++E)(h=m[E])&&$s(h,t,n,E,m,j);i.push(m),l.push(x)}return new at(i,l,t,n)}var s5=Tn.prototype.constructor;function o5(){return new s5(this._groups,this._parents)}function r5(e,t){var n,s,r;return function(){var i=Xt(this,e),l=(this.style.removeProperty(e),Xt(this,e));return i===l?null:i===n&&l===s?r:r=t(n=i,s=l)}}function Su(e){return function(){this.style.removeProperty(e)}}function i5(e,t,n){var s,r=n+"",i;return function(){var l=Xt(this,e);return l===r?null:l===s?i:i=t(s=l,n)}}function l5(e,t,n){var s,r,i;return function(){var l=Xt(this,e),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(e),Xt(this,e))),l===c?null:l===s&&c===r?i:(r=c,i=t(s=l,a))}}function a5(e,t){var n,s,r,i="style."+t,l="end."+i,a;return function(){var c=nt(this,e),d=c.on,x=c.value[i]==null?a||(a=Su(t)):void 0;(d!==n||r!==x)&&(s=(n=d).copy()).on(l,r=x),c.on=s}}function c5(e,t,n){var s=(e+="")=="transform"?Xg:yu;return t==null?this.styleTween(e,r5(e,s)).on("end.style."+e,Su(e)):typeof t=="function"?this.styleTween(e,l5(e,s,Yr(this,"style."+e,t))).each(a5(this._id,e)):this.styleTween(e,i5(e,s,t),n).on("end.style."+e,null)}function u5(e,t,n){return function(s){this.style.setProperty(e,t.call(this,s),n)}}function d5(e,t,n){var s,r;function i(){var l=t.apply(this,arguments);return l!==r&&(s=(r=l)&&u5(e,l,n)),s}return i._value=t,i}function x5(e,t,n){var s="style."+(e+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(t==null)return this.tween(s,null);if(typeof t!="function")throw new Error;return this.tween(s,d5(e,t,n??""))}function p5(e){return function(){this.textContent=e}}function m5(e){return function(){var t=e(this);this.textContent=t??""}}function f5(e){return this.tween("text",typeof e=="function"?m5(Yr(this,"text",e)):p5(e==null?"":e+""))}function h5(e){return function(t){this.textContent=e.call(this,t)}}function g5(e){var t,n;function s(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&h5(r)),t}return s._value=e,s}function j5(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,g5(e))}function E5(){for(var e=this._name,t=this._id,n=Ru(),s=this._groups,r=s.length,i=0;i<r;++i)for(var l=s[i],a=l.length,c,d=0;d<a;++d)if(c=l[d]){var x=Xe(c,t);$s(c,e,n,d,l,{time:x.time+x.delay+x.duration,delay:0,duration:x.duration,ease:x.ease})}return new at(s,this._parents,e,n)}function y5(){var e,t,n=this,s=n._id,r=n.size();return new Promise(function(i,l){var a={value:l},c={value:function(){--r===0&&i()}};n.each(function(){var d=nt(this,s),x=d.on;x!==e&&(t=(e=x).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(c)),d.on=t}),r===0&&i()})}var S5=0;function at(e,t,n,s){this._groups=e,this._parents=t,this._name=n,this._id=s}function Ru(){return++S5}var ot=Tn.prototype;at.prototype={constructor:at,select:t5,selectAll:n5,selectChild:ot.selectChild,selectChildren:ot.selectChildren,filter:GE,merge:XE,selection:o5,transition:E5,call:ot.call,nodes:ot.nodes,node:ot.node,size:ot.size,empty:ot.empty,each:ot.each,on:JE,attr:PE,attrTween:$E,style:c5,styleTween:x5,text:f5,textTween:j5,remove:e5,tween:bE,delay:zE,duration:FE,ease:YE,easeVarying:KE,end:y5,[Symbol.iterator]:ot[Symbol.iterator]};function R5(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var C5={time:null,delay:0,duration:250,ease:R5};function w5(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function b5(e){var t,n;e instanceof at?(t=e._id,e=e._name):(t=Ru(),(n=C5).time=Fr(),e=e==null?null:e+"");for(var s=this._groups,r=s.length,i=0;i<r;++i)for(var l=s[i],a=l.length,c,d=0;d<a;++d)(c=l[d])&&$s(c,e,t,d,l,n||w5(c,t));return new at(s,this._parents,e,t)}Tn.prototype.interrupt=RE;Tn.prototype.transition=b5;const Kn=e=>()=>e;function v5(e,{sourceEvent:t,target:n,transform:s,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:r}})}function it(e,t,n){this.k=e,this.x=t,this.y=n}it.prototype={constructor:it,scale:function(e){return e===1?this:new it(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new it(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Bs=new it(1,0,0);Cu.prototype=it.prototype;function Cu(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Bs;return e.__zoom}function xo(e){e.stopImmediatePropagation()}function dn(e){e.preventDefault(),e.stopImmediatePropagation()}function _5(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function M5(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Yi(){return this.__zoom||Bs}function N5(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function k5(){return navigator.maxTouchPoints||"ontouchstart"in this}function L5(e,t,n){var s=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r),l>i?(i+l)/2:Math.min(0,i)||Math.max(0,l))}function wu(){var e=_5,t=M5,n=L5,s=N5,r=k5,i=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],a=250,c=ts,d=As("start","zoom","end"),x,p,m,h=500,j=150,E=0,S=10;function R(w){w.property("__zoom",Yi).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",B).on("dblclick.zoom",V).filter(r).on("touchstart.zoom",D).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}R.transform=function(w,P,L,O){var z=w.selection?w.selection():w;z.property("__zoom",Yi),w!==z?M(w,P,L,O):z.interrupt().each(function(){k(this,arguments).event(O).start().zoom(null,typeof P=="function"?P.apply(this,arguments):P).end()})},R.scaleBy=function(w,P,L,O){R.scaleTo(w,function(){var z=this.__zoom.k,F=typeof P=="function"?P.apply(this,arguments):P;return z*F},L,O)},R.scaleTo=function(w,P,L,O){R.transform(w,function(){var z=t.apply(this,arguments),F=this.__zoom,Z=L==null?C(z):typeof L=="function"?L.apply(this,arguments):L,Y=F.invert(Z),q=typeof P=="function"?P.apply(this,arguments):P;return n(y(v(F,q),Z,Y),z,l)},L,O)},R.translateBy=function(w,P,L,O){R.transform(w,function(){return n(this.__zoom.translate(typeof P=="function"?P.apply(this,arguments):P,typeof L=="function"?L.apply(this,arguments):L),t.apply(this,arguments),l)},null,O)},R.translateTo=function(w,P,L,O,z){R.transform(w,function(){var F=t.apply(this,arguments),Z=this.__zoom,Y=O==null?C(F):typeof O=="function"?O.apply(this,arguments):O;return n(Bs.translate(Y[0],Y[1]).scale(Z.k).translate(typeof P=="function"?-P.apply(this,arguments):-P,typeof L=="function"?-L.apply(this,arguments):-L),F,l)},O,z)};function v(w,P){return P=Math.max(i[0],Math.min(i[1],P)),P===w.k?w:new it(P,w.x,w.y)}function y(w,P,L){var O=P[0]-L[0]*w.k,z=P[1]-L[1]*w.k;return O===w.x&&z===w.y?w:new it(w.k,O,z)}function C(w){return[(+w[0][0]+ +w[1][0])/2,(+w[0][1]+ +w[1][1])/2]}function M(w,P,L,O){w.on("start.zoom",function(){k(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(O).end()}).tween("zoom",function(){var z=this,F=arguments,Z=k(z,F).event(O),Y=t.apply(z,F),q=L==null?C(Y):typeof L=="function"?L.apply(z,F):L,oe=Math.max(Y[1][0]-Y[0][0],Y[1][1]-Y[0][1]),Q=z.__zoom,ue=typeof P=="function"?P.apply(z,F):P,te=c(Q.invert(q).concat(oe/Q.k),ue.invert(q).concat(oe/ue.k));return function(ne){if(ne===1)ne=ue;else{var ee=te(ne),le=oe/ee[2];ne=new it(le,q[0]-ee[0]*le,q[1]-ee[1]*le)}Z.zoom(null,ne)}})}function k(w,P,L){return!L&&w.__zooming||new A(w,P)}function A(w,P){this.that=w,this.args=P,this.active=0,this.sourceEvent=null,this.extent=t.apply(w,P),this.taps=0}A.prototype={event:function(w){return w&&(this.sourceEvent=w),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(w,P){return this.mouse&&w!=="mouse"&&(this.mouse[1]=P.invert(this.mouse[0])),this.touch0&&w!=="touch"&&(this.touch0[1]=P.invert(this.touch0[0])),this.touch1&&w!=="touch"&&(this.touch1[1]=P.invert(this.touch1[0])),this.that.__zoom=P,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(w){var P=ze(this.that).datum();d.call(w,this.that,new v5(w,{sourceEvent:this.sourceEvent,target:R,transform:this.that.__zoom,dispatch:d}),P)}};function I(w,...P){if(!e.apply(this,arguments))return;var L=k(this,P).event(w),O=this.__zoom,z=Math.max(i[0],Math.min(i[1],O.k*Math.pow(2,s.apply(this,arguments)))),F=Ze(w);if(L.wheel)(L.mouse[0][0]!==F[0]||L.mouse[0][1]!==F[1])&&(L.mouse[1]=O.invert(L.mouse[0]=F)),clearTimeout(L.wheel);else{if(O.k===z)return;L.mouse=[F,O.invert(F)],is(this),L.start()}dn(w),L.wheel=setTimeout(Z,j),L.zoom("mouse",n(y(v(O,z),L.mouse[0],L.mouse[1]),L.extent,l));function Z(){L.wheel=null,L.end()}}function B(w,...P){if(m||!e.apply(this,arguments))return;var L=w.currentTarget,O=k(this,P,!0).event(w),z=ze(w.view).on("mousemove.zoom",q,!0).on("mouseup.zoom",oe,!0),F=Ze(w,L),Z=w.clientX,Y=w.clientY;pu(w.view),xo(w),O.mouse=[F,this.__zoom.invert(F)],is(this),O.start();function q(Q){if(dn(Q),!O.moved){var ue=Q.clientX-Z,te=Q.clientY-Y;O.moved=ue*ue+te*te>E}O.event(Q).zoom("mouse",n(y(O.that.__zoom,O.mouse[0]=Ze(Q,L),O.mouse[1]),O.extent,l))}function oe(Q){z.on("mousemove.zoom mouseup.zoom",null),mu(Q.view,O.moved),dn(Q),O.event(Q).end()}}function V(w,...P){if(e.apply(this,arguments)){var L=this.__zoom,O=Ze(w.changedTouches?w.changedTouches[0]:w,this),z=L.invert(O),F=L.k*(w.shiftKey?.5:2),Z=n(y(v(L,F),O,z),t.apply(this,P),l);dn(w),a>0?ze(this).transition().duration(a).call(M,Z,O,w):ze(this).call(R.transform,Z,O,w)}}function D(w,...P){if(e.apply(this,arguments)){var L=w.touches,O=L.length,z=k(this,P,w.changedTouches.length===O).event(w),F,Z,Y,q;for(xo(w),Z=0;Z<O;++Z)Y=L[Z],q=Ze(Y,this),q=[q,this.__zoom.invert(q),Y.identifier],z.touch0?!z.touch1&&z.touch0[2]!==q[2]&&(z.touch1=q,z.taps=0):(z.touch0=q,F=!0,z.taps=1+!!x);x&&(x=clearTimeout(x)),F&&(z.taps<2&&(p=q[0],x=setTimeout(function(){x=null},h)),is(this),z.start())}}function $(w,...P){if(this.__zooming){var L=k(this,P).event(w),O=w.changedTouches,z=O.length,F,Z,Y,q;for(dn(w),F=0;F<z;++F)Z=O[F],Y=Ze(Z,this),L.touch0&&L.touch0[2]===Z.identifier?L.touch0[0]=Y:L.touch1&&L.touch1[2]===Z.identifier&&(L.touch1[0]=Y);if(Z=L.that.__zoom,L.touch1){var oe=L.touch0[0],Q=L.touch0[1],ue=L.touch1[0],te=L.touch1[1],ne=(ne=ue[0]-oe[0])*ne+(ne=ue[1]-oe[1])*ne,ee=(ee=te[0]-Q[0])*ee+(ee=te[1]-Q[1])*ee;Z=v(Z,Math.sqrt(ne/ee)),Y=[(oe[0]+ue[0])/2,(oe[1]+ue[1])/2],q=[(Q[0]+te[0])/2,(Q[1]+te[1])/2]}else if(L.touch0)Y=L.touch0[0],q=L.touch0[1];else return;L.zoom("touch",n(y(Z,Y,q),L.extent,l))}}function H(w,...P){if(this.__zooming){var L=k(this,P).event(w),O=w.changedTouches,z=O.length,F,Z;for(xo(w),m&&clearTimeout(m),m=setTimeout(function(){m=null},h),F=0;F<z;++F)Z=O[F],L.touch0&&L.touch0[2]===Z.identifier?delete L.touch0:L.touch1&&L.touch1[2]===Z.identifier&&delete L.touch1;if(L.touch1&&!L.touch0&&(L.touch0=L.touch1,delete L.touch1),L.touch0)L.touch0[1]=this.__zoom.invert(L.touch0[0]);else if(L.end(),L.taps===2&&(Z=Ze(Z,this),Math.hypot(p[0]-Z[0],p[1]-Z[1])<S)){var Y=ze(this).on("dblclick.zoom");Y&&Y.apply(this,arguments)}}}return R.wheelDelta=function(w){return arguments.length?(s=typeof w=="function"?w:Kn(+w),R):s},R.filter=function(w){return arguments.length?(e=typeof w=="function"?w:Kn(!!w),R):e},R.touchable=function(w){return arguments.length?(r=typeof w=="function"?w:Kn(!!w),R):r},R.extent=function(w){return arguments.length?(t=typeof w=="function"?w:Kn([[+w[0][0],+w[0][1]],[+w[1][0],+w[1][1]]]),R):t},R.scaleExtent=function(w){return arguments.length?(i[0]=+w[0],i[1]=+w[1],R):[i[0],i[1]]},R.translateExtent=function(w){return arguments.length?(l[0][0]=+w[0][0],l[1][0]=+w[1][0],l[0][1]=+w[0][1],l[1][1]=+w[1][1],R):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},R.constrain=function(w){return arguments.length?(n=w,R):n},R.duration=function(w){return arguments.length?(a=+w,R):a},R.interpolate=function(w){return arguments.length?(c=w,R):c},R.on=function(){var w=d.on.apply(d,arguments);return w===d?R:w},R.clickDistance=function(w){return arguments.length?(E=(w=+w)*w,R):Math.sqrt(E)},R.tapDistance=function(w){return arguments.length?(S=+w,R):S},R}const Ae={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:s})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:s}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Cn=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],bu=["Enter"," ","Escape"],vu={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Tt;(function(e){e.Strict="strict",e.Loose="loose"})(Tt||(Tt={}));var bt;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(bt||(bt={}));var qt;(function(e){e.Partial="partial",e.Full="full"})(qt||(qt={}));const _u={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var ft;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ft||(ft={}));var js;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(js||(js={}));var J;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(J||(J={}));const Wi={[J.Left]:J.Right,[J.Right]:J.Left,[J.Top]:J.Bottom,[J.Bottom]:J.Top};function Mu(e){return e===null?null:e?"valid":"invalid"}const Nu=e=>"id"in e&&"source"in e&&"target"in e,P5=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Wr=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),An=(e,t=[0,0])=>{const{width:n,height:s}=ut(e),r=e.origin??t,i=n*r[0],l=s*r[1];return{x:e.position.x-i,y:e.position.y-l}},T5=(e,t={nodeOrigin:[0,0]})=>{if(process.env.NODE_ENV==="development"&&!t.nodeLookup&&console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows."),e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((s,r)=>{const i=typeof r=="string";let l=!t.nodeLookup&&!i?r:void 0;t.nodeLookup&&(l=i?t.nodeLookup.get(r):Wr(r)?r:t.nodeLookup.get(r.id));const a=l?Es(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ds(s,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return zs(n)},In=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(s=>{if(t.filter===void 0||t.filter(s)){const r=Es(s);n=Ds(n,r)}}),zs(n)},Kr=(e,t,[n,s,r]=[0,0,1],i=!1,l=!1)=>{const a={...On(t,[n,s,r]),width:t.width/r,height:t.height/r},c=[];for(const d of e.values()){const{measured:x,selectable:p=!0,hidden:m=!1}=d;if(l&&!p||m)continue;const h=x.width??d.width??d.initialWidth??null,j=x.height??d.height??d.initialHeight??null,E=wn(a,Qt(d)),S=(h??0)*(j??0),R=i&&E>0;(!d.internals.handleBounds||R||E>=S||d.dragging)&&c.push(d)}return c},A5=(e,t)=>{const n=new Set;return e.forEach(s=>{n.add(s.id)}),t.filter(s=>n.has(s.source)||n.has(s.target))};function I5(e,t){const n=new Map,s=t?.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&(t?.includeHiddenNodes||!r.hidden)&&(!s||s.has(r.id))&&n.set(r.id,r)}),n}async function O5({nodes:e,width:t,height:n,panZoom:s,minZoom:r,maxZoom:i},l){if(e.size===0)return Promise.resolve(!0);const a=I5(e,l),c=In(a),d=Gr(c,t,n,l?.minZoom??r,l?.maxZoom??i,l?.padding??.1);return await s.setViewport(d,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)}function ku({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:s=[0,0],nodeExtent:r,onError:i}){const l=n.get(e),a=l.parentId?n.get(l.parentId):void 0,{x:c,y:d}=a?a.internals.positionAbsolute:{x:0,y:0},x=l.origin??s;let p=r;if(l.extent==="parent"&&!l.expandParent)if(!a)i?.("005",Ae.error005());else{const h=a.measured.width,j=a.measured.height;h&&j&&(p=[[c,d],[c+h,d+j]])}else a&&en(l.extent)&&(p=[[l.extent[0][0]+c,l.extent[0][1]+d],[l.extent[1][0]+c,l.extent[1][1]+d]]);const m=en(p)?At(t,p,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&i?.("015",Ae.error015()),{position:{x:m.x-c+(l.measured.width??0)*x[0],y:m.y-d+(l.measured.height??0)*x[1]},positionAbsolute:m}}async function $5({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:s,onBeforeDelete:r}){const i=new Set(e.map(m=>m.id)),l=[];for(const m of n){if(m.deletable===!1)continue;const h=i.has(m.id),j=!h&&m.parentId&&l.find(E=>E.id===m.parentId);(h||j)&&l.push(m)}const a=new Set(t.map(m=>m.id)),c=s.filter(m=>m.deletable!==!1),x=A5(l,c);for(const m of c)a.has(m.id)&&!x.find(j=>j.id===m.id)&&x.push(m);if(!r)return{edges:x,nodes:l};const p=await r({nodes:l,edges:x});return typeof p=="boolean"?p?{edges:x,nodes:l}:{edges:[],nodes:[]}:p}const Jt=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),At=(e={x:0,y:0},t,n)=>({x:Jt(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Jt(e.y,t[0][1],t[1][1]-(n?.height??0))});function Lu(e,t,n){const{width:s,height:r}=ut(n),{x:i,y:l}=n.internals.positionAbsolute;return At(e,[[i,l],[i+s,l+r]],t)}const Ki=(e,t,n)=>e<t?Jt(Math.abs(e-t),1,t)/t:e>n?-Jt(Math.abs(e-n),1,t)/t:0,Pu=(e,t,n=15,s=40)=>{const r=Ki(e.x,s,t.width-s)*n,i=Ki(e.y,s,t.height-s)*n;return[r,i]},Ds=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Vo=({x:e,y:t,width:n,height:s})=>({x:e,y:t,x2:e+n,y2:t+s}),zs=({x:e,y:t,x2:n,y2:s})=>({x:e,y:t,width:n-e,height:s-t}),Qt=(e,t=[0,0])=>{const{x:n,y:s}=Wr(e)?e.internals.positionAbsolute:An(e,t);return{x:n,y:s,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Es=(e,t=[0,0])=>{const{x:n,y:s}=Wr(e)?e.internals.positionAbsolute:An(e,t);return{x:n,y:s,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:s+(e.measured?.height??e.height??e.initialHeight??0)}},Tu=(e,t)=>zs(Ds(Vo(e),Vo(t))),wn=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),s=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*s)},Gi=e=>Ye(e.width)&&Ye(e.height)&&Ye(e.x)&&Ye(e.y),Ye=e=>!isNaN(e)&&isFinite(e),ys=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},Hs=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),On=({x:e,y:t},[n,s,r],i=!1,l=[1,1])=>{const a={x:(e-n)/r,y:(t-s)/r};return i?Hs(a,l):a},Ss=({x:e,y:t},[n,s,r])=>({x:e*r+n,y:t*r+s});function Zt(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function B5(e,t,n){if(typeof e=="string"||typeof e=="number"){const s=Zt(e,n),r=Zt(e,t);return{top:s,right:r,bottom:s,left:r,x:r*2,y:s*2}}if(typeof e=="object"){const s=Zt(e.top??e.y??0,n),r=Zt(e.bottom??e.y??0,n),i=Zt(e.left??e.x??0,t),l=Zt(e.right??e.x??0,t);return{top:s,right:l,bottom:r,left:i,x:i+l,y:s+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function D5(e,t,n,s,r,i){const{x:l,y:a}=Ss(e,[t,n,s]),{x:c,y:d}=Ss({x:e.x+e.width,y:e.y+e.height},[t,n,s]),x=r-c,p=i-d;return{left:Math.floor(l),top:Math.floor(a),right:Math.floor(x),bottom:Math.floor(p)}}const Gr=(e,t,n,s,r,i)=>{const l=B5(i,t,n),a=(t-l.x)/e.width,c=(n-l.y)/e.height,d=Math.min(a,c),x=Jt(d,s,r),p=e.x+e.width/2,m=e.y+e.height/2,h=t/2-p*x,j=n/2-m*x,E=D5(e,h,j,x,t,n),S={left:Math.min(E.left-l.left,0),top:Math.min(E.top-l.top,0),right:Math.min(E.right-l.right,0),bottom:Math.min(E.bottom-l.bottom,0)};return{x:h-S.left+S.right,y:j-S.top+S.bottom,zoom:x}},Rs=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function en(e){return e!==void 0&&e!=="parent"}function ut(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Au(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function Iu(e,t={width:0,height:0},n,s,r){const i={...e},l=s.get(n);if(l){const a=l.origin||r;i.x+=l.internals.positionAbsolute.x-(t.width??0)*a[0],i.y+=l.internals.positionAbsolute.y-(t.height??0)*a[1]}return i}function Xi(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function z5(){let e,t;return{promise:new Promise((s,r)=>{e=s,t=r}),resolve:e,reject:t}}function H5(e){return{...vu,...e||{}}}function gn(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:s,containerBounds:r}){const{x:i,y:l}=qe(e),a=On({x:i-(r?.left??0),y:l-(r?.top??0)},s),{x:c,y:d}=n?Hs(a,t):a;return{xSnapped:c,ySnapped:d,...a}}const Xr=e=>({width:e.offsetWidth,height:e.offsetHeight}),Ou=e=>e?.getRootNode?.()||window?.document,V5=["INPUT","SELECT","TEXTAREA"];function $u(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:V5.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Bu=e=>"clientX"in e,qe=(e,t)=>{const n=Bu(e),s=n?e.clientX:e.touches?.[0].clientX,r=n?e.clientY:e.touches?.[0].clientY;return{x:s-(t?.left??0),y:r-(t?.top??0)}},Ui=(e,t,n,s,r)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(l=>{const a=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:r,position:l.getAttribute("data-handlepos"),x:(a.left-n.left)/s,y:(a.top-n.top)/s,...Xr(l)}})};function Du({sourceX:e,sourceY:t,targetX:n,targetY:s,sourceControlX:r,sourceControlY:i,targetControlX:l,targetControlY:a}){const c=e*.125+r*.375+l*.375+n*.125,d=t*.125+i*.375+a*.375+s*.125,x=Math.abs(c-e),p=Math.abs(d-t);return[c,d,x,p]}function Gn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function qi({pos:e,x1:t,y1:n,x2:s,y2:r,c:i}){switch(e){case J.Left:return[t-Gn(t-s,i),n];case J.Right:return[t+Gn(s-t,i),n];case J.Top:return[t,n-Gn(n-r,i)];case J.Bottom:return[t,n+Gn(r-n,i)]}}function zu({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:s,targetY:r,targetPosition:i=J.Top,curvature:l=.25}){const[a,c]=qi({pos:n,x1:e,y1:t,x2:s,y2:r,c:l}),[d,x]=qi({pos:i,x1:s,y1:r,x2:e,y2:t,c:l}),[p,m,h,j]=Du({sourceX:e,sourceY:t,targetX:s,targetY:r,sourceControlX:a,sourceControlY:c,targetControlX:d,targetControlY:x});return[`M${e},${t} C${a},${c} ${d},${x} ${s},${r}`,p,m,h,j]}function Hu({sourceX:e,sourceY:t,targetX:n,targetY:s}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,l=Math.abs(s-t)/2,a=s<t?s+l:s-l;return[i,a,r,l]}function F5({sourceNode:e,targetNode:t,selected:n=!1,zIndex:s,elevateOnSelect:r=!1}){if(s!==void 0)return s;const i=r&&n?1e3:0,l=Math.max(e.parentId?e.internals.z:0,t.parentId?t.internals.z:0);return i+l}function Z5({sourceNode:e,targetNode:t,width:n,height:s,transform:r}){const i=Ds(Es(e),Es(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const l={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:s/r[2]};return wn(l,zs(i))>0}const Vu=({source:e,sourceHandle:t,target:n,targetHandle:s})=>`xy-edge__${e}${t||""}-${n}${s||""}`,Y5=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Fu=(e,t)=>{if(!e.source||!e.target)return ys("006",Ae.error006()),t;let n;return Nu(e)?n={...e}:n={...e,id:Vu(e)},Y5(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))},W5=(e,t,n,s={shouldReplaceId:!0})=>{const{id:r,...i}=e;if(!t.source||!t.target)return ys("006",Ae.error006()),n;if(!n.find(c=>c.id===e.id))return ys("007",Ae.error007(r)),n;const a={...i,id:s.shouldReplaceId?Vu(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(c=>c.id!==r).concat(a)};function Zu({sourceX:e,sourceY:t,targetX:n,targetY:s}){const[r,i,l,a]=Hu({sourceX:e,sourceY:t,targetX:n,targetY:s});return[`M ${e},${t}L ${n},${s}`,r,i,l,a]}const Ji={[J.Left]:{x:-1,y:0},[J.Right]:{x:1,y:0},[J.Top]:{x:0,y:-1},[J.Bottom]:{x:0,y:1}},K5=({source:e,sourcePosition:t=J.Bottom,target:n})=>t===J.Left||t===J.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Qi=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function G5({source:e,sourcePosition:t=J.Bottom,target:n,targetPosition:s=J.Top,center:r,offset:i}){const l=Ji[t],a=Ji[s],c={x:e.x+l.x*i,y:e.y+l.y*i},d={x:n.x+a.x*i,y:n.y+a.y*i},x=K5({source:c,sourcePosition:t,target:d}),p=x.x!==0?"x":"y",m=x[p];let h=[],j,E;const S={x:0,y:0},R={x:0,y:0},[v,y,C,M]=Hu({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[p]*a[p]===-1){j=r.x??v,E=r.y??y;const A=[{x:j,y:c.y},{x:j,y:d.y}],I=[{x:c.x,y:E},{x:d.x,y:E}];l[p]===m?h=p==="x"?A:I:h=p==="x"?I:A}else{const A=[{x:c.x,y:d.y}],I=[{x:d.x,y:c.y}];if(p==="x"?h=l.x===m?I:A:h=l.y===m?A:I,t===s){const H=Math.abs(e[p]-n[p]);if(H<=i){const w=Math.min(i-1,i-H);l[p]===m?S[p]=(c[p]>e[p]?-1:1)*w:R[p]=(d[p]>n[p]?-1:1)*w}}if(t!==s){const H=p==="x"?"y":"x",w=l[p]===a[H],P=c[H]>d[H],L=c[H]<d[H];(l[p]===1&&(!w&&P||w&&L)||l[p]!==1&&(!w&&L||w&&P))&&(h=p==="x"?A:I)}const B={x:c.x+S.x,y:c.y+S.y},V={x:d.x+R.x,y:d.y+R.y},D=Math.max(Math.abs(B.x-h[0].x),Math.abs(V.x-h[0].x)),$=Math.max(Math.abs(B.y-h[0].y),Math.abs(V.y-h[0].y));D>=$?(j=(B.x+V.x)/2,E=h[0].y):(j=h[0].x,E=(B.y+V.y)/2)}return[[e,{x:c.x+S.x,y:c.y+S.y},...h,{x:d.x+R.x,y:d.y+R.y},n],j,E,C,M]}function X5(e,t,n,s){const r=Math.min(Qi(e,t)/2,Qi(t,n)/2,s),{x:i,y:l}=t;if(e.x===i&&i===n.x||e.y===l&&l===n.y)return`L${i} ${l}`;if(e.y===l){const d=e.x<n.x?-1:1,x=e.y<n.y?1:-1;return`L ${i+r*d},${l}Q ${i},${l} ${i},${l+r*x}`}const a=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${l+r*c}Q ${i},${l} ${i+r*a},${l}`}function Fo({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:s,targetY:r,targetPosition:i=J.Top,borderRadius:l=5,centerX:a,centerY:c,offset:d=20}){const[x,p,m,h,j]=G5({source:{x:e,y:t},sourcePosition:n,target:{x:s,y:r},targetPosition:i,center:{x:a,y:c},offset:d});return[x.reduce((S,R,v)=>{let y="";return v>0&&v<x.length-1?y=X5(x[v-1],R,x[v+1],l):y=`${v===0?"M":"L"}${R.x} ${R.y}`,S+=y,S},""),p,m,h,j]}function el(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function U5(e){const{sourceNode:t,targetNode:n}=e;if(!el(t)||!el(n))return null;const s=t.internals.handleBounds||tl(t.handles),r=n.internals.handleBounds||tl(n.handles),i=nl(s?.source??[],e.sourceHandle),l=nl(e.connectionMode===Tt.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),e.targetHandle);if(!i||!l)return e.onError?.("008",Ae.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=i?.position||J.Bottom,c=l?.position||J.Top,d=bn(t,i,a),x=bn(n,l,c);return{sourceX:d.x,sourceY:d.y,targetX:x.x,targetY:x.y,sourcePosition:a,targetPosition:c}}function tl(e){if(!e)return null;const t=[],n=[];for(const s of e)s.width=s.width??1,s.height=s.height??1,s.type==="source"?t.push(s):s.type==="target"&&n.push(s);return{source:t,target:n}}function bn(e,t,n=J.Left,s=!1){const r=(t?.x??0)+e.internals.positionAbsolute.x,i=(t?.y??0)+e.internals.positionAbsolute.y,{width:l,height:a}=t??ut(e);if(s)return{x:r+l/2,y:i+a/2};switch(t?.position??n){case J.Top:return{x:r+l/2,y:i};case J.Right:return{x:r+l,y:i+a/2};case J.Bottom:return{x:r+l/2,y:i+a};case J.Left:return{x:r,y:i+a/2}}}function nl(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Zo(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(s=>`${s}=${e[s]}`).join("&")}`:""}function q5(e,{id:t,defaultColor:n,defaultMarkerStart:s,defaultMarkerEnd:r}){const i=new Set;return e.reduce((l,a)=>([a.markerStart||s,a.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const d=Zo(c,t);i.has(d)||(l.push({id:d,color:c.color||n,...c}),i.add(d))}}),l),[]).sort((l,a)=>l.id.localeCompare(a.id))}const Ur={nodeOrigin:[0,0],nodeExtent:Cn,elevateNodesOnSelect:!0,defaults:{}},J5={...Ur,checkEquality:!0};function qr(e,t){const n={...e};for(const s in t)t[s]!==void 0&&(n[s]=t[s]);return n}function Q5(e,t,n){const s=qr(Ur,n);for(const r of e.values())if(r.parentId)Jr(r,e,t,s);else{const i=An(r,s.nodeOrigin),l=en(r.extent)?r.extent:s.nodeExtent,a=At(i,l,ut(r));r.internals.positionAbsolute=a}}function Yo(e,t,n,s){const r=qr(J5,s);let i=e.length>0;const l=new Map(t),a=r?.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const c of e){let d=l.get(c.id);if(r.checkEquality&&c===d?.internals.userNode)t.set(c.id,d);else{const x=An(c,r.nodeOrigin),p=en(c.extent)?c.extent:r.nodeExtent,m=At(x,p,ut(c));d={...r.defaults,...c,measured:{width:c.measured?.width,height:c.measured?.height},internals:{positionAbsolute:m,handleBounds:c.measured?d?.internals.handleBounds:void 0,z:Yu(c,a),userNode:c}},t.set(c.id,d)}(d.measured===void 0||d.measured.width===void 0||d.measured.height===void 0)&&!d.hidden&&(i=!1),c.parentId&&Jr(d,t,n,s)}return i}function ey(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Jr(e,t,n,s){const{elevateNodesOnSelect:r,nodeOrigin:i,nodeExtent:l}=qr(Ur,s),a=e.parentId,c=t.get(a);if(!c){console.warn(`Parent node ${a} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}ey(e,n);const d=r?1e3:0,{x,y:p,z:m}=ty(e,c,i,l,d),{positionAbsolute:h}=e.internals,j=x!==h.x||p!==h.y;(j||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:j?{x,y:p}:h,z:m}})}function Yu(e,t){return(Ye(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function ty(e,t,n,s,r){const{x:i,y:l}=t.internals.positionAbsolute,a=ut(e),c=An(e,n),d=en(e.extent)?At(c,e.extent,a):c;let x=At({x:i+d.x,y:l+d.y},s,a);e.extent==="parent"&&(x=Lu(x,a,t));const p=Yu(e,r),m=t.internals.z??0;return{x:x.x,y:x.y,z:m>=p?m+1:p}}function Qr(e,t,n,s=[0,0]){const r=[],i=new Map;for(const l of e){const a=t.get(l.parentId);if(!a)continue;const c=i.get(l.parentId)?.expandedRect??Qt(a),d=Tu(c,l.rect);i.set(l.parentId,{expandedRect:d,parent:a})}return i.size>0&&i.forEach(({expandedRect:l,parent:a},c)=>{const d=a.internals.positionAbsolute,x=ut(a),p=a.origin??s,m=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,h=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,j=Math.max(x.width,Math.round(l.width)),E=Math.max(x.height,Math.round(l.height)),S=(j-x.width)*p[0],R=(E-x.height)*p[1];(m>0||h>0||S||R)&&(r.push({id:c,type:"position",position:{x:a.position.x-m+S,y:a.position.y-h+R}}),n.get(c)?.forEach(v=>{e.some(y=>y.id===v.id)||r.push({id:v.id,type:"position",position:{x:v.position.x+m,y:v.position.y+h}})})),(x.width<l.width||x.height<l.height||m||h)&&r.push({id:c,type:"dimensions",setAttributes:!0,dimensions:{width:j+(m?p[0]*m-S:0),height:E+(h?p[1]*h-R:0)}})}),r}function ny(e,t,n,s,r,i){const l=s?.querySelector(".xyflow__viewport");let a=!1;if(!l)return{changes:[],updatedInternals:a};const c=[],d=window.getComputedStyle(l),{m22:x}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const m of e.values()){const h=t.get(m.id);if(!h)continue;if(h.hidden){t.set(h.id,{...h,internals:{...h.internals,handleBounds:void 0}}),a=!0;continue}const j=Xr(m.nodeElement),E=h.measured.width!==j.width||h.measured.height!==j.height;if(!!(j.width&&j.height&&(E||!h.internals.handleBounds||m.force))){const R=m.nodeElement.getBoundingClientRect(),v=en(h.extent)?h.extent:i;let{positionAbsolute:y}=h.internals;h.parentId&&h.extent==="parent"?y=Lu(y,j,t.get(h.parentId)):v&&(y=At(y,v,j));const C={...h,measured:j,internals:{...h.internals,positionAbsolute:y,handleBounds:{source:Ui("source",m.nodeElement,R,x,h.id),target:Ui("target",m.nodeElement,R,x,h.id)}}};t.set(h.id,C),h.parentId&&Jr(C,t,n,{nodeOrigin:r}),a=!0,E&&(c.push({id:h.id,type:"dimensions",dimensions:j}),h.expandParent&&h.parentId&&p.push({id:h.id,parentId:h.parentId,rect:Qt(C,r)}))}}if(p.length>0){const m=Qr(p,t,n,r);c.push(...m)}return{changes:c,updatedInternals:a}}async function sy({delta:e,panZoom:t,transform:n,translateExtent:s,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],s),a=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(a)}function sl(e,t,n,s,r,i){let l=r;const a=s.get(l)||new Map;s.set(l,a.set(n,t)),l=`${r}-${e}`;const c=s.get(l)||new Map;if(s.set(l,c.set(n,t)),i){l=`${r}-${e}-${i}`;const d=s.get(l)||new Map;s.set(l,d.set(n,t))}}function Wu(e,t,n){e.clear(),t.clear();for(const s of n){const{source:r,target:i,sourceHandle:l=null,targetHandle:a=null}=s,c={edgeId:s.id,source:r,target:i,sourceHandle:l,targetHandle:a},d=`${r}-${l}--${i}-${a}`,x=`${i}-${a}--${r}-${l}`;sl("source",c,x,e,r,l),sl("target",c,d,e,i,a),t.set(s.id,s)}}function Ku(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Ku(n,t):!1}function ol(e,t,n){let s=e;do{if(s?.matches?.(t))return!0;if(s===n)return!1;s=s?.parentElement}while(s);return!1}function oy(e,t,n,s){const r=new Map;for(const[i,l]of e)if((l.selected||l.id===s)&&(!l.parentId||!Ku(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){const a=e.get(i);a&&r.set(i,{id:i,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return r}function po({nodeId:e,dragItems:t,nodeLookup:n,dragging:s=!0}){const r=[];for(const[l,a]of t){const c=n.get(l)?.internals.userNode;c&&r.push({...c,position:a.position,dragging:s})}if(!e)return[r[0],r];const i=n.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:s}:r[0],r]}function ry({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:s,onDragStop:r}){let i={x:null,y:null},l=0,a=new Map,c=!1,d={x:0,y:0},x=null,p=!1,m=null,h=!1,j=!1;function E({noDragClassName:R,handleSelector:v,domNode:y,isSelectable:C,nodeId:M,nodeClickDistance:k=0}){m=ze(y);function A({x:D,y:$},H){const{nodeLookup:w,nodeExtent:P,snapGrid:L,snapToGrid:O,nodeOrigin:z,onNodeDrag:F,onSelectionDrag:Z,onError:Y,updateNodePositions:q}=t();i={x:D,y:$};let oe=!1,Q={x:0,y:0,x2:0,y2:0};if(a.size>1&&P){const ue=In(a);Q=Vo(ue)}for(const[ue,te]of a){if(!w.has(ue))continue;let ne={x:D-te.distance.x,y:$-te.distance.y};O&&(ne=Hs(ne,L));let ee=[[P[0][0],P[0][1]],[P[1][0],P[1][1]]];if(a.size>1&&P&&!te.extent){const{positionAbsolute:ye}=te.internals,G=ye.x-Q.x+P[0][0],re=ye.x+te.measured.width-Q.x2+P[1][0],ie=ye.y-Q.y+P[0][1],we=ye.y+te.measured.height-Q.y2+P[1][1];ee=[[G,ie],[re,we]]}const{position:le,positionAbsolute:ge}=ku({nodeId:ue,nextPosition:ne,nodeLookup:w,nodeExtent:ee,nodeOrigin:z,onError:Y});oe=oe||te.position.x!==le.x||te.position.y!==le.y,te.position=le,te.internals.positionAbsolute=ge}if(j=j||oe,!!oe&&(q(a,!0),H&&(s||F||!M&&Z))){const[ue,te]=po({nodeId:M,dragItems:a,nodeLookup:w});s?.(H,a,ue,te),F?.(H,ue,te),M||Z?.(H,te)}}async function I(){if(!x)return;const{transform:D,panBy:$,autoPanSpeed:H,autoPanOnNodeDrag:w}=t();if(!w){c=!1,cancelAnimationFrame(l);return}const[P,L]=Pu(d,x,H);(P!==0||L!==0)&&(i.x=(i.x??0)-P/D[2],i.y=(i.y??0)-L/D[2],await $({x:P,y:L})&&A(i,null)),l=requestAnimationFrame(I)}function B(D){const{nodeLookup:$,multiSelectionActive:H,nodesDraggable:w,transform:P,snapGrid:L,snapToGrid:O,selectNodesOnDrag:z,onNodeDragStart:F,onSelectionDragStart:Z,unselectNodesAndEdges:Y}=t();p=!0,(!z||!C)&&!H&&M&&($.get(M)?.selected||Y()),C&&z&&M&&e?.(M);const q=gn(D.sourceEvent,{transform:P,snapGrid:L,snapToGrid:O,containerBounds:x});if(i=q,a=oy($,w,q,M),a.size>0&&(n||F||!M&&Z)){const[oe,Q]=po({nodeId:M,dragItems:a,nodeLookup:$});n?.(D.sourceEvent,a,oe,Q),F?.(D.sourceEvent,oe,Q),M||Z?.(D.sourceEvent,Q)}}const V=fu().clickDistance(k).on("start",D=>{const{domNode:$,nodeDragThreshold:H,transform:w,snapGrid:P,snapToGrid:L}=t();x=$?.getBoundingClientRect()||null,h=!1,j=!1,H===0&&B(D),i=gn(D.sourceEvent,{transform:w,snapGrid:P,snapToGrid:L,containerBounds:x}),d=qe(D.sourceEvent,x)}).on("drag",D=>{const{autoPanOnNodeDrag:$,transform:H,snapGrid:w,snapToGrid:P,nodeDragThreshold:L,nodeLookup:O}=t(),z=gn(D.sourceEvent,{transform:H,snapGrid:w,snapToGrid:P,containerBounds:x});if((D.sourceEvent.type==="touchmove"&&D.sourceEvent.touches.length>1||M&&!O.has(M))&&(h=!0),!h){if(!c&&$&&p&&(c=!0,I()),!p){const F=z.xSnapped-(i.x??0),Z=z.ySnapped-(i.y??0);Math.sqrt(F*F+Z*Z)>L&&B(D)}(i.x!==z.xSnapped||i.y!==z.ySnapped)&&a&&p&&(d=qe(D.sourceEvent,x),A(z,D.sourceEvent))}}).on("end",D=>{if(!(!p||h)&&(c=!1,p=!1,cancelAnimationFrame(l),a.size>0)){const{nodeLookup:$,updateNodePositions:H,onNodeDragStop:w,onSelectionDragStop:P}=t();if(j&&(H(a,!1),j=!1),r||w||!M&&P){const[L,O]=po({nodeId:M,dragItems:a,nodeLookup:$,dragging:!1});r?.(D.sourceEvent,a,L,O),w?.(D.sourceEvent,L,O),M||P?.(D.sourceEvent,O)}}}).filter(D=>{const $=D.target;return!D.button&&(!R||!ol($,`.${R}`,y))&&(!v||ol($,v,y))});m.call(V)}function S(){m?.on(".drag",null)}return{update:E,destroy:S}}function iy(e,t,n){const s=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())wn(r,Qt(i))>0&&s.push(i);return s}const ly=250;function ay(e,t,n,s){let r=[],i=1/0;const l=iy(e,n,t+ly);for(const a of l){const c=[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]];for(const d of c){if(s.nodeId===d.nodeId&&s.type===d.type&&s.id===d.id)continue;const{x,y:p}=bn(a,d,d.position,!0),m=Math.sqrt(Math.pow(x-e.x,2)+Math.pow(p-e.y,2));m>t||(m<i?(r=[{...d,x,y:p}],i=m):m===i&&r.push({...d,x,y:p}))}}if(!r.length)return null;if(r.length>1){const a=s.type==="source"?"target":"source";return r.find(c=>c.type===a)??r[0]}return r[0]}function Gu(e,t,n,s,r,i=!1){const l=s.get(e);if(!l)return null;const a=r==="strict"?l.internals.handleBounds?.[t]:[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]],c=(n?a?.find(d=>d.id===n):a?.[0])??null;return c&&i?{...c,...bn(l,c,c.position,!0)}:c}function Xu(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function cy(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Uu=()=>!0;function uy(e,{connectionMode:t,connectionRadius:n,handleId:s,nodeId:r,edgeUpdaterType:i,isTarget:l,domNode:a,nodeLookup:c,lib:d,autoPanOnConnect:x,flowId:p,panBy:m,cancelConnection:h,onConnectStart:j,onConnect:E,onConnectEnd:S,isValidConnection:R=Uu,onReconnectEnd:v,updateConnection:y,getTransform:C,getFromHandle:M,autoPanSpeed:k,dragThreshold:A=1}){const I=Ou(e.target);let B=0,V;const{x:D,y:$}=qe(e),H=I?.elementFromPoint(D,$),w=Xu(i,H),P=a?.getBoundingClientRect();let L=!1;if(!P||!w)return;const O=Gu(r,w,s,c,t);if(!O)return;let z=qe(e,P),F=!1,Z=null,Y=!1,q=null;function oe(){if(!x||!P)return;const[ye,G]=Pu(z,P,k);m({x:ye,y:G}),B=requestAnimationFrame(oe)}const Q={...O,nodeId:r,type:w,position:O.position},ue=c.get(r);let ne={inProgress:!0,isValid:null,from:bn(ue,Q,J.Left,!0),fromHandle:Q,fromPosition:Q.position,fromNode:ue,to:z,toHandle:null,toPosition:Wi[Q.position],toNode:null};function ee(){L=!0,y(ne),j?.(e,{nodeId:r,handleId:s,handleType:w})}A===0&&ee();function le(ye){if(!L){const{x:we,y:ke}=qe(ye),st=we-D,Vt=ke-$;if(!(st*st+Vt*Vt>A*A))return;ee()}if(!M()||!Q){ge(ye);return}const G=C();z=qe(ye,P),V=ay(On(z,G,!1,[1,1]),n,c,Q),F||(oe(),F=!0);const re=qu(ye,{handle:V,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:l?"target":"source",isValidConnection:R,doc:I,lib:d,flowId:p,nodeLookup:c});q=re.handleDomNode,Z=re.connection,Y=cy(!!V,re.isValid);const ie={...ne,isValid:Y,to:re.toHandle&&Y?Ss({x:re.toHandle.x,y:re.toHandle.y},G):z,toHandle:re.toHandle,toPosition:Y&&re.toHandle?re.toHandle.position:Wi[Q.position],toNode:re.toHandle?c.get(re.toHandle.nodeId):null};Y&&V&&ne.toHandle&&ie.toHandle&&ne.toHandle.type===ie.toHandle.type&&ne.toHandle.nodeId===ie.toHandle.nodeId&&ne.toHandle.id===ie.toHandle.id&&ne.to.x===ie.to.x&&ne.to.y===ie.to.y||(y(ie),ne=ie)}function ge(ye){if(L){(V||q)&&Z&&Y&&E?.(Z);const{inProgress:G,...re}=ne,ie={...re,toPosition:ne.toHandle?ne.toPosition:null};S?.(ye,ie),i&&v?.(ye,ie)}h(),cancelAnimationFrame(B),F=!1,Y=!1,Z=null,q=null,I.removeEventListener("mousemove",le),I.removeEventListener("mouseup",ge),I.removeEventListener("touchmove",le),I.removeEventListener("touchend",ge)}I.addEventListener("mousemove",le),I.addEventListener("mouseup",ge),I.addEventListener("touchmove",le),I.addEventListener("touchend",ge)}function qu(e,{handle:t,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:i,doc:l,lib:a,flowId:c,isValidConnection:d=Uu,nodeLookup:x}){const p=i==="target",m=t?l.querySelector(`.${a}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:j}=qe(e),E=l.elementFromPoint(h,j),S=E?.classList.contains(`${a}-flow__handle`)?E:m,R={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const v=Xu(void 0,S),y=S.getAttribute("data-nodeid"),C=S.getAttribute("data-handleid"),M=S.classList.contains("connectable"),k=S.classList.contains("connectableend");if(!y||!v)return R;const A={source:p?y:s,sourceHandle:p?C:r,target:p?s:y,targetHandle:p?r:C};R.connection=A;const B=M&&k&&(n===Tt.Strict?p&&v==="source"||!p&&v==="target":y!==s||C!==r);R.isValid=B&&d(A),R.toHandle=Gu(y,v,C,x,n,!0)}return R}const Wo={onPointerDown:uy,isValid:qu};function dy({domNode:e,panZoom:t,getTransform:n,getViewScale:s}){const r=ze(e);function i({translateExtent:a,width:c,height:d,zoomStep:x=10,pannable:p=!0,zoomable:m=!0,inversePan:h=!1}){const j=y=>{const C=n();if(y.sourceEvent.type!=="wheel"||!t)return;const M=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*x,k=C[2]*Math.pow(2,M);t.scaleTo(k)};let E=[0,0];const S=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(E=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},R=y=>{const C=n();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!t)return;const M=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],k=[M[0]-E[0],M[1]-E[1]];E=M;const A=s()*Math.max(C[2],Math.log(C[2]))*(h?-1:1),I={x:C[0]-k[0]*A,y:C[1]-k[1]*A},B=[[0,0],[c,d]];t.setViewportConstrained({x:I.x,y:I.y,zoom:C[2]},B,a)},v=wu().on("start",S).on("zoom",p?R:null).on("zoom.wheel",m?j:null);r.call(v,{})}function l(){r.on("zoom",null)}return{update:i,destroy:l,pointer:Ze}}const xy=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Vs=e=>({x:e.x,y:e.y,zoom:e.k}),mo=({x:e,y:t,zoom:n})=>Bs.translate(e,t).scale(n),Wt=(e,t)=>e.target.closest(`.${t}`),Ju=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),py=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,fo=(e,t=0,n=py,s=()=>{})=>{const r=typeof t=="number"&&t>0;return r||s(),r?e.transition().duration(t).ease(n).on("end",s):e},Qu=e=>{const t=e.ctrlKey&&Rs()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function my({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:s,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:l,onPanZoomStart:a,onPanZoom:c,onPanZoomEnd:d}){return x=>{if(Wt(x,t))return!1;x.preventDefault(),x.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(x.ctrlKey&&l){const S=Ze(x),R=Qu(x),v=p*Math.pow(2,R);s.scaleTo(n,v,S,x);return}const m=x.deltaMode===1?20:1;let h=r===bt.Vertical?0:x.deltaX*m,j=r===bt.Horizontal?0:x.deltaY*m;!Rs()&&x.shiftKey&&r!==bt.Vertical&&(h=x.deltaY*m,j=0),s.translateBy(n,-(h/p)*i,-(j/p)*i,{internal:!0});const E=Vs(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,a?.(x,E)),e.isPanScrolling&&(c?.(x,E),e.panScrollTimeout=setTimeout(()=>{d?.(x,E),e.isPanScrolling=!1},150))}}function fy({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(s,r){const i=s.type==="wheel",l=!t&&i&&!s.ctrlKey,a=Wt(s,e);if(s.ctrlKey&&i&&a&&s.preventDefault(),l||a)return null;s.preventDefault(),n.call(this,s,r)}}function hy({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return s=>{if(s.sourceEvent?.internal)return;const r=Vs(s.transform);e.mouseButton=s.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=r,s.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(s.sourceEvent,r)}}function gy({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:s,onPanZoom:r}){return i=>{e.usedRightMouseButton=!!(n&&Ju(t,e.mouseButton??0)),i.sourceEvent?.sync||s([i.transform.x,i.transform.y,i.transform.k]),r&&!i.sourceEvent?.internal&&r?.(i.sourceEvent,Vs(i.transform))}}function jy({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:s,onPanZoomEnd:r,onPaneContextMenu:i}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&Ju(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&i(l.sourceEvent),e.usedRightMouseButton=!1,s(!1),r&&xy(e.prevViewport,l.transform))){const a=Vs(l.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r?.(l.sourceEvent,a)},n?150:0)}}}function Ey({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:s,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:l,noWheelClassName:a,noPanClassName:c,lib:d}){return x=>{const p=e||t,m=n&&x.ctrlKey;if(x.button===1&&x.type==="mousedown"&&(Wt(x,`${d}-flow__node`)||Wt(x,`${d}-flow__edge`)))return!0;if(!s&&!p&&!r&&!i&&!n||l||Wt(x,a)&&x.type==="wheel"||Wt(x,c)&&(x.type!=="wheel"||r&&x.type==="wheel"&&!e)||!n&&x.ctrlKey&&x.type==="wheel")return!1;if(!n&&x.type==="touchstart"&&x.touches?.length>1)return x.preventDefault(),!1;if(!p&&!r&&!m&&x.type==="wheel"||!s&&(x.type==="mousedown"||x.type==="touchstart")||Array.isArray(s)&&!s.includes(x.button)&&x.type==="mousedown")return!1;const h=Array.isArray(s)&&s.includes(x.button)||!x.button||x.button<=1;return(!x.ctrlKey||x.type==="wheel")&&h}}function yy({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:s,translateExtent:r,viewport:i,onPanZoom:l,onPanZoomStart:a,onPanZoomEnd:c,onDraggingChange:d}){const x={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=e.getBoundingClientRect(),m=wu().clickDistance(!Ye(s)||s<0?0:s).scaleExtent([t,n]).translateExtent(r),h=ze(e).call(m);y({x:i.x,y:i.y,zoom:Jt(i.zoom,t,n)},[[0,0],[p.width,p.height]],r);const j=h.on("wheel.zoom"),E=h.on("dblclick.zoom");m.wheelDelta(Qu);function S($,H){return h?new Promise(w=>{m?.interpolate(H?.interpolate==="linear"?_.interpolate:ts).transform(fo(h,H?.duration,H?.ease,()=>w(!0)),$)}):Promise.resolve(!1)}function R({noWheelClassName:$,noPanClassName:H,onPaneContextMenu:w,userSelectionActive:P,panOnScroll:L,panOnDrag:O,panOnScrollMode:z,panOnScrollSpeed:F,preventScrolling:Z,zoomOnPinch:Y,zoomOnScroll:q,zoomOnDoubleClick:oe,zoomActivationKeyPressed:Q,lib:ue,onTransformChange:te}){P&&!x.isZoomingOrPanning&&v();const ee=L&&!Q&&!P?my({zoomPanValues:x,noWheelClassName:$,d3Selection:h,d3Zoom:m,panOnScrollMode:z,panOnScrollSpeed:F,zoomOnPinch:Y,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:c}):fy({noWheelClassName:$,preventScrolling:Z,d3ZoomHandler:j});if(h.on("wheel.zoom",ee,{passive:!1}),!P){const ge=hy({zoomPanValues:x,onDraggingChange:d,onPanZoomStart:a});m.on("start",ge);const ye=gy({zoomPanValues:x,panOnDrag:O,onPaneContextMenu:!!w,onPanZoom:l,onTransformChange:te});m.on("zoom",ye);const G=jy({zoomPanValues:x,panOnDrag:O,panOnScroll:L,onPaneContextMenu:w,onPanZoomEnd:c,onDraggingChange:d});m.on("end",G)}const le=Ey({zoomActivationKeyPressed:Q,panOnDrag:O,zoomOnScroll:q,panOnScroll:L,zoomOnDoubleClick:oe,zoomOnPinch:Y,userSelectionActive:P,noPanClassName:H,noWheelClassName:$,lib:ue});m.filter(le),oe?h.on("dblclick.zoom",E):h.on("dblclick.zoom",null)}function v(){m.on("zoom",null)}async function y($,H,w){const P=mo($),L=m?.constrain()(P,H,w);return L&&await S(L),new Promise(O=>O(L))}async function C($,H){const w=mo($);return await S(w,H),new Promise(P=>P(w))}function M($){if(h){const H=mo($),w=h.property("__zoom");(w.k!==$.zoom||w.x!==$.x||w.y!==$.y)&&m?.transform(h,H,null,{sync:!0})}}function k(){const $=h?Cu(h.node()):{x:0,y:0,k:1};return{x:$.x,y:$.y,zoom:$.k}}function A($,H){return h?new Promise(w=>{m?.interpolate(H?.interpolate==="linear"?_.interpolate:ts).scaleTo(fo(h,H?.duration,H?.ease,()=>w(!0)),$)}):Promise.resolve(!1)}function I($,H){return h?new Promise(w=>{m?.interpolate(H?.interpolate==="linear"?_.interpolate:ts).scaleBy(fo(h,H?.duration,H?.ease,()=>w(!0)),$)}):Promise.resolve(!1)}function B($){m?.scaleExtent($)}function V($){m?.translateExtent($)}function D($){const H=!Ye($)||$<0?0:$;m?.clickDistance(H)}return{update:R,destroy:v,setViewport:C,setViewportConstrained:y,getViewport:k,scaleTo:A,scaleBy:I,setScaleExtent:B,setTranslateExtent:V,syncViewport:M,setClickDistance:D}}var tn;(function(e){e.Line="line",e.Handle="handle"})(tn||(tn={}));function Sy({width:e,prevWidth:t,height:n,prevHeight:s,affectsX:r,affectsY:i}){const l=e-t,a=n-s,c=[l>0?1:l<0?-1:0,a>0?1:a<0?-1:0];return l&&r&&(c[0]=c[0]*-1),a&&i&&(c[1]=c[1]*-1),c}function Ry(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),s=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:s,affectsY:r}}function xt(e,t){return Math.max(0,t-e)}function pt(e,t){return Math.max(0,e-t)}function Xn(e,t,n){return Math.max(0,t-e,e-n)}function rl(e,t){return e?!t:t}function Cy(e,t,n,s,r,i,l,a){let{affectsX:c,affectsY:d}=t;const{isHorizontal:x,isVertical:p}=t,m=x&&p,{xSnapped:h,ySnapped:j}=n,{minWidth:E,maxWidth:S,minHeight:R,maxHeight:v}=s,{x:y,y:C,width:M,height:k,aspectRatio:A}=e;let I=Math.floor(x?h-e.pointerX:0),B=Math.floor(p?j-e.pointerY:0);const V=M+(c?-I:I),D=k+(d?-B:B),$=-i[0]*M,H=-i[1]*k;let w=Xn(V,E,S),P=Xn(D,R,v);if(l){let z=0,F=0;c&&I<0?z=xt(y+I+$,l[0][0]):!c&&I>0&&(z=pt(y+V+$,l[1][0])),d&&B<0?F=xt(C+B+H,l[0][1]):!d&&B>0&&(F=pt(C+D+H,l[1][1])),w=Math.max(w,z),P=Math.max(P,F)}if(a){let z=0,F=0;c&&I>0?z=pt(y+I,a[0][0]):!c&&I<0&&(z=xt(y+V,a[1][0])),d&&B>0?F=pt(C+B,a[0][1]):!d&&B<0&&(F=xt(C+D,a[1][1])),w=Math.max(w,z),P=Math.max(P,F)}if(r){if(x){const z=Xn(V/A,R,v)*A;if(w=Math.max(w,z),l){let F=0;!c&&!d||c&&!d&&m?F=pt(C+H+V/A,l[1][1])*A:F=xt(C+H+(c?I:-I)/A,l[0][1])*A,w=Math.max(w,F)}if(a){let F=0;!c&&!d||c&&!d&&m?F=xt(C+V/A,a[1][1])*A:F=pt(C+(c?I:-I)/A,a[0][1])*A,w=Math.max(w,F)}}if(p){const z=Xn(D*A,E,S)/A;if(P=Math.max(P,z),l){let F=0;!c&&!d||d&&!c&&m?F=pt(y+D*A+$,l[1][0])/A:F=xt(y+(d?B:-B)*A+$,l[0][0])/A,P=Math.max(P,F)}if(a){let F=0;!c&&!d||d&&!c&&m?F=xt(y+D*A,a[1][0])/A:F=pt(y+(d?B:-B)*A,a[0][0])/A,P=Math.max(P,F)}}}B=B+(B<0?P:-P),I=I+(I<0?w:-w),r&&(m?V>D*A?B=(rl(c,d)?-I:I)/A:I=(rl(c,d)?-B:B)*A:x?(B=I/A,d=c):(I=B*A,c=d));const L=c?y+I:y,O=d?C+B:C;return{width:M+(c?-I:I),height:k+(d?-B:B),x:i[0]*I*(c?-1:1)+L,y:i[1]*B*(d?-1:1)+O}}const ed={width:0,height:0,x:0,y:0},wy={...ed,pointerX:0,pointerY:0,aspectRatio:1};function by(e){return[[0,0],[e.measured.width,e.measured.height]]}function vy(e,t,n){const s=t.position.x+e.position.x,r=t.position.y+e.position.y,i=e.measured.width??0,l=e.measured.height??0,a=n[0]*i,c=n[1]*l;return[[s-a,r-c],[s+i-a,r+l-c]]}function _y({domNode:e,nodeId:t,getStoreItems:n,onChange:s,onEnd:r}){const i=ze(e);function l({controlPosition:c,boundaries:d,keepAspectRatio:x,resizeDirection:p,onResizeStart:m,onResize:h,onResizeEnd:j,shouldResize:E}){let S={...ed},R={...wy};const v=Ry(c);let y,C=null,M=[],k,A,I;const B=fu().on("start",V=>{const{nodeLookup:D,transform:$,snapGrid:H,snapToGrid:w,nodeOrigin:P,paneDomNode:L}=n();if(y=D.get(t),!y)return;C=L?.getBoundingClientRect()??null;const{xSnapped:O,ySnapped:z}=gn(V.sourceEvent,{transform:$,snapGrid:H,snapToGrid:w,containerBounds:C});S={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},R={...S,pointerX:O,pointerY:z,aspectRatio:S.width/S.height},k=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(k=D.get(y.parentId),A=k&&y.extent==="parent"?by(k):void 0),M=[],I=void 0;for(const[F,Z]of D)if(Z.parentId===t&&(M.push({id:F,position:{...Z.position},extent:Z.extent}),Z.extent==="parent"||Z.expandParent)){const Y=vy(Z,y,Z.origin??P);I?I=[[Math.min(Y[0][0],I[0][0]),Math.min(Y[0][1],I[0][1])],[Math.max(Y[1][0],I[1][0]),Math.max(Y[1][1],I[1][1])]]:I=Y}m?.(V,{...S})}).on("drag",V=>{const{transform:D,snapGrid:$,snapToGrid:H,nodeOrigin:w}=n(),P=gn(V.sourceEvent,{transform:D,snapGrid:$,snapToGrid:H,containerBounds:C}),L=[];if(!y)return;const{x:O,y:z,width:F,height:Z}=S,Y={},q=y.origin??w,{width:oe,height:Q,x:ue,y:te}=Cy(R,v,P,d,x,q,A,I),ne=oe!==F,ee=Q!==Z,le=ue!==O&&ne,ge=te!==z&ⅇif(!le&&!ge&&!ne&&!ee)return;if((le||ge||q[0]===1||q[1]===1)&&(Y.x=le?ue:S.x,Y.y=ge?te:S.y,S.x=Y.x,S.y=Y.y,M.length>0)){const ie=ue-O,we=te-z;for(const ke of M)ke.position={x:ke.position.x-ie+q[0]*(oe-F),y:ke.position.y-we+q[1]*(Q-Z)},L.push(ke)}if((ne||ee)&&(Y.width=ne&&(!p||p==="horizontal")?oe:S.width,Y.height=ee&&(!p||p==="vertical")?Q:S.height,S.width=Y.width,S.height=Y.height),k&&y.expandParent){const ie=q[0]*(Y.width??0);Y.x&&Y.x<ie&&(S.x=ie,R.x=R.x-(Y.x-ie));const we=q[1]*(Y.height??0);Y.y&&Y.y<we&&(S.y=we,R.y=R.y-(Y.y-we))}const ye=Sy({width:S.width,prevWidth:F,height:S.height,prevHeight:Z,affectsX:v.affectsX,affectsY:v.affectsY}),G={...S,direction:ye};E?.(V,G)!==!1&&(h?.(V,G),s(Y,L))}).on("end",V=>{j?.(V,{...S}),r?.({...S})});i.call(B)}function a(){i.on(".drag",null)}return{update:l,destroy:a}}var Un={exports:{}},ho={},qn={exports:{}},go={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var il;function My(){if(il)return go;il=1;var e=g;function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,s=e.useState,r=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function a(p,m){var h=m(),j=s({inst:{value:h,getSnapshot:m}}),E=j[0].inst,S=j[1];return i(function(){E.value=h,E.getSnapshot=m,c(E)&&S({inst:E})},[p,h,m]),r(function(){return c(E)&&S({inst:E}),p(function(){c(E)&&S({inst:E})})},[p]),l(h),h}function c(p){var m=p.getSnapshot;p=p.value;try{var h=m();return!n(p,h)}catch{return!0}}function d(p,m){return m()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return go.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:x,go}var jo={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* use-sync-external-store-shim.development.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var ll;function Ny(){return ll||(ll=1,process.env.NODE_ENV!=="production"&&function(){function e(h,j){return h===j&&(h!==0||1/h===1/j)||h!==h&&j!==j}function t(h,j){x||r.startTransition===void 0||(x=!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 E=j();if(!p){var S=j();i(E,S)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}S=l({inst:{value:E,getSnapshot:j}});var R=S[0].inst,v=S[1];return c(function(){R.value=E,R.getSnapshot=j,n(R)&&v({inst:R})},[h,E,j]),a(function(){return n(R)&&v({inst:R}),h(function(){n(R)&&v({inst:R})})},[h]),d(E),E}function n(h){var j=h.getSnapshot;h=h.value;try{var E=j();return!i(h,E)}catch{return!0}}function s(h,j){return j()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=g,i=typeof Object.is=="function"?Object.is:e,l=r.useState,a=r.useEffect,c=r.useLayoutEffect,d=r.useDebugValue,x=!1,p=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:t;jo.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),jo}var al;function td(){return al||(al=1,process.env.NODE_ENV==="production"?qn.exports=My():qn.exports=Ny()),qn.exports}/**
|
|
18
18
|
* @license React
|
|
19
19
|
* use-sync-external-store-shim/with-selector.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var
|
|
25
|
+
*/var cl;function ky(){if(cl)return ho;cl=1;var e=g,t=td();function n(d,x){return d===x&&(d!==0||1/d===1/x)||d!==d&&x!==x}var s=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,i=e.useRef,l=e.useEffect,a=e.useMemo,c=e.useDebugValue;return ho.useSyncExternalStoreWithSelector=function(d,x,p,m,h){var j=i(null);if(j.current===null){var E={hasValue:!1,value:null};j.current=E}else E=j.current;j=a(function(){function R(k){if(!v){if(v=!0,y=k,k=m(k),h!==void 0&&E.hasValue){var A=E.value;if(h(A,k))return C=A}return C=k}if(A=C,s(y,k))return A;var I=m(k);return h!==void 0&&h(A,I)?(y=k,A):(y=k,C=I)}var v=!1,y,C,M=p===void 0?null:p;return[function(){return R(x())},M===null?void 0:function(){return R(M())}]},[x,p,m,h]);var S=r(d,j[0],j[1]);return l(function(){E.hasValue=!0,E.value=S},[S]),c(S),S},ho}var Eo={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* use-sync-external-store-shim/with-selector.development.js
|
|
28
28
|
*
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
33
|
+
*/var ul;function Ly(){return ul||(ul=1,process.env.NODE_ENV!=="production"&&function(){function e(d,x){return d===x&&(d!==0||1/d===1/x)||d!==d&&x!==x}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=g,n=td(),s=typeof Object.is=="function"?Object.is:e,r=n.useSyncExternalStore,i=t.useRef,l=t.useEffect,a=t.useMemo,c=t.useDebugValue;Eo.useSyncExternalStoreWithSelector=function(d,x,p,m,h){var j=i(null);if(j.current===null){var E={hasValue:!1,value:null};j.current=E}else E=j.current;j=a(function(){function R(k){if(!v){if(v=!0,y=k,k=m(k),h!==void 0&&E.hasValue){var A=E.value;if(h(A,k))return C=A}return C=k}if(A=C,s(y,k))return A;var I=m(k);return h!==void 0&&h(A,I)?(y=k,A):(y=k,C=I)}var v=!1,y,C,M=p===void 0?null:p;return[function(){return R(x())},M===null?void 0:function(){return R(M())}]},[x,p,m,h]);var S=r(d,j[0],j[1]);return l(function(){E.hasValue=!0,E.value=S},[S]),c(S),S},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Eo}var dl;function Py(){return dl||(dl=1,process.env.NODE_ENV==="production"?Un.exports=ky():Un.exports=Ly()),Un.exports}var Ty=Py();const Ay=f.getDefaultExportFromCjs(Ty),Iy={},xl=e=>{let t;const n=new Set,s=(x,p)=>{const m=typeof x=="function"?x(t):x;if(!Object.is(m,t)){const h=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(j=>j(t,h))}},r=()=>t,c={setState:s,getState:r,getInitialState:()=>d,subscribe:x=>(n.add(x),()=>n.delete(x)),destroy:()=>{(Iy?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(s,r,c);return c},Oy=e=>e?xl(e):xl,{useDebugValue:$y}=g,{useSyncExternalStoreWithSelector:By}=Ay,Dy=e=>e;function nd(e,t=Dy,n){const s=By(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return $y(s),s}const pl=(e,t)=>{const n=Oy(e),s=(r,i=t)=>nd(n,r,i);return Object.assign(s,n),s},zy=(e,t)=>e?pl(e,t):pl;function ve(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[s,r]of e)if(!Object.is(r,t.get(s)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const s of n)if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1;return!0}const Fs=g.createContext(null),Hy=Fs.Provider,sd=Ae.error001();function je(e,t){const n=g.useContext(Fs);if(n===null)throw new Error(sd);return nd(n,e,t)}function be(){const e=g.useContext(Fs);if(e===null)throw new Error(sd);return g.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const ml={display:"none"},Vy={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},od="react-flow__node-desc",rd="react-flow__edge-desc",Fy="react-flow__aria-live",Zy=e=>e.ariaLiveMessage,Yy=e=>e.ariaLabelConfig;function Wy({rfId:e}){const t=je(Zy);return o.jsxRuntimeExports.jsx("div",{id:`${Fy}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Vy,children:t})}function Ky({rfId:e,disableKeyboardA11y:t}){const n=je(Yy);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{id:`${od}-${e}`,style:ml,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),o.jsxRuntimeExports.jsx("div",{id:`${rd}-${e}`,style:ml,children:n["edge.a11yDescription.default"]}),!t&&o.jsxRuntimeExports.jsx(Wy,{rfId:e})]})}const Zs=g.forwardRef(({position:e="top-left",children:t,className:n,style:s,...r},i)=>{const l=`${e}`.split("-");return o.jsxRuntimeExports.jsx("div",{className:Me(["react-flow__panel",n,...l]),style:s,ref:i,...r,children:t})});Zs.displayName="Panel";function Gy({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:o.jsxRuntimeExports.jsx(Zs,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:o.jsxRuntimeExports.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Xy=e=>{const t=[],n=[];for(const[,s]of e.nodeLookup)s.selected&&t.push(s.internals.userNode);for(const[,s]of e.edgeLookup)s.selected&&n.push(s);return{selectedNodes:t,selectedEdges:n}},Jn=e=>e.id;function Uy(e,t){return ve(e.selectedNodes.map(Jn),t.selectedNodes.map(Jn))&&ve(e.selectedEdges.map(Jn),t.selectedEdges.map(Jn))}function qy({onSelectionChange:e}){const t=be(),{selectedNodes:n,selectedEdges:s}=je(Xy,Uy);return g.useEffect(()=>{const r={nodes:n,edges:s};e?.(r),t.getState().onSelectionChangeHandlers.forEach(i=>i(r))},[n,s,e]),null}const Jy=e=>!!e.onSelectionChangeHandlers;function Qy({onSelectionChange:e}){const t=je(Jy);return e||t?o.jsxRuntimeExports.jsx(qy,{onSelectionChange:e}):null}const id=[0,0],eS={x:0,y:0,zoom:1},tS=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance","ariaLabelConfig"],fl=[...tS,"rfId"],nS=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),hl={translateExtent:Cn,nodeOrigin:id,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function sS(e){const{setNodes:t,setEdges:n,setMinZoom:s,setMaxZoom:r,setTranslateExtent:i,setNodeExtent:l,reset:a,setDefaultNodesAndEdges:c,setPaneClickDistance:d}=je(nS,ve),x=be();g.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{p.current=hl,a()}),[]);const p=g.useRef(hl);return g.useEffect(()=>{for(const m of fl){const h=e[m],j=p.current[m];h!==j&&(typeof e[m]>"u"||(m==="nodes"?t(h):m==="edges"?n(h):m==="minZoom"?s(h):m==="maxZoom"?r(h):m==="translateExtent"?i(h):m==="nodeExtent"?l(h):m==="paneClickDistance"?d(h):m==="ariaLabelConfig"?x.setState({ariaLabelConfig:H5(h)}):m==="fitView"?x.setState({fitViewQueued:h}):m==="fitViewOptions"?x.setState({fitViewOptions:h}):x.setState({[m]:h})))}p.current=e},fl.map(m=>e[m])),null}function gl(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function oS(e){const[t,n]=g.useState(e==="system"?null:e);return g.useEffect(()=>{if(e!=="system"){n(e);return}const s=gl(),r=()=>n(s?.matches?"dark":"light");return r(),s?.addEventListener("change",r),()=>{s?.removeEventListener("change",r)}},[e]),t!==null?t:gl()?.matches?"dark":"light"}const jl=typeof document<"u"?document:null;function vn(e=null,t={target:jl,actInsideInputWithModifier:!0}){const[n,s]=g.useState(!1),r=g.useRef(!1),i=g.useRef(new Set([])),[l,a]=g.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
|
|
34
34
|
`).replace(`
|
|
35
35
|
|
|
36
36
|
`,`
|
|
37
37
|
+`).split(`
|
|
38
|
-
`)),x=d.reduce((p,m)=>p.concat(...m),[]);return[d,x]}return[[],[]]},[e]);return g.useEffect(()=>{const a=(t==null?void 0:t.target)??sl,d=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const x=f=>{var y,S;if(r.current=f.ctrlKey||f.metaKey||f.shiftKey||f.altKey,(!r.current||r.current&&!d)&&Fa(f))return!1;const j=rl(f.code,c);if(i.current.add(f[j]),ol(l,i.current,!1)){const b=((S=(y=f.composedPath)==null?void 0:y.call(f))==null?void 0:S[0])||f.target,E=(b==null?void 0:b.nodeName)==="BUTTON"||(b==null?void 0:b.nodeName)==="A";t.preventDefault!==!1&&(r.current||!E)&&f.preventDefault(),s(!0)}},p=f=>{const h=rl(f.code,c);ol(l,i.current,!0)?(s(!1),i.current.clear()):i.current.delete(f[h]),f.key==="Meta"&&i.current.clear(),r.current=!1},m=()=>{i.current.clear(),s(!1)};return a==null||a.addEventListener("keydown",x),a==null||a.addEventListener("keyup",p),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{a==null||a.removeEventListener("keydown",x),a==null||a.removeEventListener("keyup",p),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,s]),n}function ol(e,t,n){return e.filter(s=>n||s.length===t.size).some(s=>s.every(r=>t.has(r)))}function rl(e,t){return t.includes(e)?"code":"key"}const PE=()=>{const e=_e();return g.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:s}=e.getState();return s?s.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[s,r,i],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??s,y:t.y??r,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,s]=e.getState().transform;return{x:t,y:n,zoom:s}},setCenter:async(t,n,s)=>e.getState().setCenter(t,n,s),fitBounds:async(t,n)=>{const{width:s,height:r,minZoom:i,maxZoom:l,panZoom:c}=e.getState(),a=Ir(t,s,r,i,l,(n==null?void 0:n.padding)??.1);return c?(await c.setViewport(a,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:s,snapGrid:r,snapToGrid:i,domNode:l}=e.getState();if(!l)return t;const{x:c,y:a}=l.getBoundingClientRect(),d={x:t.x-c,y:t.y-a},x=n.snapGrid??r,p=n.snapToGrid??i;return zn(d,s,p,x)},flowToScreenPosition:t=>{const{transform:n,domNode:s}=e.getState();if(!s)return t;const{x:r,y:i}=s.getBoundingClientRect(),l=Ls(t,n);return{x:l.x+r,y:l.y+i}}}),[])};function xu(e,t){const n=[],s=new Map,r=[];for(const i of e)if(i.type==="add"){r.push(i);continue}else if(i.type==="remove"||i.type==="replace")s.set(i.id,[i]);else{const l=s.get(i.id);l?l.push(i):s.set(i.id,[i])}for(const i of t){const l=s.get(i.id);if(!l){n.push(i);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}const c={...i};for(const a of l)_E(a,c);n.push(c)}return r.length&&r.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function _E(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??(t.measured={}),t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function pu(e,t){return xu(e,t)}function mu(e,t){return xu(e,t)}function Tt(e,t){return{id:e,type:"select",selected:t}}function Ut(e,t=new Set,n=!1){const s=[];for(const[r,i]of e){const l=t.has(r);!(i.selected===void 0&&!l)&&i.selected!==l&&(n&&(i.selected=l),s.push(Tt(i.id,l)))}return s}function il({items:e=[],lookup:t}){var r;const n=[],s=new Map(e.map(i=>[i.id,i]));for(const[i,l]of e.entries()){const c=t.get(l.id),a=((r=c==null?void 0:c.internals)==null?void 0:r.userNode)??c;a!==void 0&&a!==l&&n.push({id:l.id,item:l,type:"replace"}),a===void 0&&n.push({item:l,type:"add",index:i})}for(const[i]of t)s.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function ll(e){return{id:e.id,type:"remove"}}const cl=e=>t5(e),LE=e=>Aa(e);function fu(e){return g.forwardRef(e)}const NE=typeof window<"u"?g.useLayoutEffect:g.useEffect;function al(e){const[t,n]=g.useState(BigInt(0)),[s]=g.useState(()=>TE(()=>n(r=>r+BigInt(1))));return NE(()=>{const r=s.get();r.length&&(e(r),s.reset())},[t]),s}function TE(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const hu=g.createContext(null);function AE({children:e}){const t=_e(),n=g.useCallback(c=>{const{nodes:a=[],setNodes:d,hasDefaultNodes:x,onNodesChange:p,nodeLookup:m,fitViewQueued:f}=t.getState();let h=a;for(const y of c)h=typeof y=="function"?y(h):y;const j=il({items:h,lookup:m});x&&d(h),j.length>0?p==null||p(j):f&&window.requestAnimationFrame(()=>{const{fitViewQueued:y,nodes:S,setNodes:b}=t.getState();y&&b(S)})},[]),s=al(n),r=g.useCallback(c=>{const{edges:a=[],setEdges:d,hasDefaultEdges:x,onEdgesChange:p,edgeLookup:m}=t.getState();let f=a;for(const h of c)f=typeof h=="function"?h(f):h;x?d(f):p&&p(il({items:f,lookup:m}))},[]),i=al(r),l=g.useMemo(()=>({nodeQueue:s,edgeQueue:i}),[]);return o.jsxRuntimeExports.jsx(hu.Provider,{value:l,children:e})}function IE(){const e=g.useContext(hu);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const $E=e=>!!e.panZoom;function Ft(){const e=PE(),t=_e(),n=IE(),s=Se($E),r=g.useMemo(()=>{const i=p=>t.getState().nodeLookup.get(p),l=p=>{n.nodeQueue.push(p)},c=p=>{n.edgeQueue.push(p)},a=p=>{var S,b;const{nodeLookup:m,nodeOrigin:f}=t.getState(),h=cl(p)?p:m.get(p.id),j=h.parentId?za(h.position,h.measured,h.parentId,m,f):h.position,y={...h,position:j,width:((S=h.measured)==null?void 0:S.width)??h.width,height:((b=h.measured)==null?void 0:b.height)??h.height};return on(y)},d=(p,m,f={replace:!1})=>{l(h=>h.map(j=>{if(j.id===p){const y=typeof m=="function"?m(j):m;return f.replace&&cl(y)?y:{...j,...y}}return j}))},x=(p,m,f={replace:!1})=>{c(h=>h.map(j=>{if(j.id===p){const y=typeof m=="function"?m(j):m;return f.replace&&LE(y)?y:{...j,...y}}return j}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>{var m;return(m=i(p))==null?void 0:m.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(m=>({...m}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:l,setEdges:c,addNodes:p=>{const m=Array.isArray(p)?p:[p];n.nodeQueue.push(f=>[...f,...m])},addEdges:p=>{const m=Array.isArray(p)?p:[p];n.edgeQueue.push(f=>[...f,...m])},toObject:()=>{const{nodes:p=[],edges:m=[],transform:f}=t.getState(),[h,j,y]=f;return{nodes:p.map(S=>({...S})),edges:m.map(S=>({...S})),viewport:{x:h,y:j,zoom:y}}},deleteElements:async({nodes:p=[],edges:m=[]})=>{const{nodes:f,edges:h,onNodesDelete:j,onEdgesDelete:y,triggerNodeChanges:S,triggerEdgeChanges:b,onDelete:E,onBeforeDelete:R}=t.getState(),{nodes:M,edges:_}=await i5({nodesToRemove:p,edgesToRemove:m,nodes:f,edges:h,onBeforeDelete:R}),L=_.length>0,A=M.length>0;if(L){const $=_.map(ll);y==null||y(_),b($)}if(A){const $=M.map(ll);j==null||j(M),S($)}return(A||L)&&(E==null||E({nodes:M,edges:_})),{deletedNodes:M,deletedEdges:_}},getIntersectingNodes:(p,m=!0,f)=>{const h=Ti(p),j=h?p:a(p),y=f!==void 0;return j?(f||t.getState().nodes).filter(S=>{const b=t.getState().nodeLookup.get(S.id);if(b&&!h&&(S.id===p.id||!b.internals.positionAbsolute))return!1;const E=on(y?S:b),R=_n(E,j);return m&&R>0||R>=j.width*j.height}):[]},isNodeIntersecting:(p,m,f=!0)=>{const j=Ti(p)?p:a(p);if(!j)return!1;const y=_n(j,m);return f&&y>0||y>=j.width*j.height},updateNode:d,updateNodeData:(p,m,f={replace:!1})=>{d(p,h=>{const j=typeof m=="function"?m(h):m;return f.replace?{...h,data:j}:{...h,data:{...h.data,...j}}},f)},updateEdge:x,updateEdgeData:(p,m,f={replace:!1})=>{x(p,h=>{const j=typeof m=="function"?m(h):m;return f.replace?{...h,data:j}:{...h,data:{...h.data,...j}}},f)},getNodesBounds:p=>{const{nodeLookup:m,nodeOrigin:f}=t.getState();return n5(p,{nodeLookup:m,nodeOrigin:f})},getHandleConnections:({type:p,id:m,nodeId:f})=>{var h;return Array.from(((h=t.getState().connectionLookup.get(`${f}-${p}${m?`-${m}`:""}`))==null?void 0:h.values())??[])},getNodeConnections:({type:p,handleId:m,nodeId:f})=>{var h;return Array.from(((h=t.getState().connectionLookup.get(`${f}${p?m?`-${p}-${m}`:`-${p}`:""}`))==null?void 0:h.values())??[])},fitView:async p=>{const m=t.getState().fitViewResolver??a5();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:m}),n.nodeQueue.push(f=>[...f]),m.promise}}},[]);return g.useMemo(()=>({...r,...e,viewportInitialized:s}),[s])}const ul=e=>e.selected,BE=typeof window<"u"?window:void 0;function DE({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=_e(),{deleteElements:s}=Ft(),r=Nn(e,{actInsideInputWithModifier:!1}),i=Nn(t,{target:BE});g.useEffect(()=>{if(r){const{edges:l,nodes:c}=n.getState();s({nodes:c.filter(ul),edges:l.filter(ul)}),n.setState({nodesSelectionActive:!1})}},[r]),g.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function OE(e){const t=_e();g.useEffect(()=>{const n=()=>{var r,i;if(!e.current)return!1;const s=$r(e.current);(s.height===0||s.width===0)&&((i=(r=t.getState()).onError)==null||i.call(r,"004",Oe.error004())),t.setState({width:s.width||500,height:s.height||500})};if(e.current){n(),window.addEventListener("resize",n);const s=new ResizeObserver(()=>n());return s.observe(e.current),()=>{window.removeEventListener("resize",n),s&&e.current&&s.unobserve(e.current)}}},[])}const no={position:"absolute",width:"100%",height:"100%",top:0,left:0},zE=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function VE({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:s=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=It.Free,zoomOnDoubleClick:l=!0,panOnDrag:c=!0,defaultViewport:a,translateExtent:d,minZoom:x,maxZoom:p,zoomActivationKeyCode:m,preventScrolling:f=!0,children:h,noWheelClassName:j,noPanClassName:y,onViewportChange:S,isControlledViewport:b,paneClickDistance:E}){const R=_e(),M=g.useRef(null),{userSelectionActive:_,lib:L}=Se(zE,Ne),A=Nn(m),$=g.useRef();OE(M);const O=g.useCallback(V=>{S==null||S({x:V[0],y:V[1],zoom:V[2]}),b||R.setState({transform:V})},[S,b]);return g.useEffect(()=>{if(M.current){$.current=H5({domNode:M.current,minZoom:x,maxZoom:p,translateExtent:d,viewport:a,paneClickDistance:E,onDraggingChange:C=>R.setState({paneDragging:C}),onPanZoomStart:(C,P)=>{const{onViewportChangeStart:v,onMoveStart:N}=R.getState();N==null||N(C,P),v==null||v(P)},onPanZoom:(C,P)=>{const{onViewportChange:v,onMove:N}=R.getState();N==null||N(C,P),v==null||v(P)},onPanZoomEnd:(C,P)=>{const{onViewportChangeEnd:v,onMoveEnd:N}=R.getState();N==null||N(C,P),v==null||v(P)}});const{x:V,y:z,zoom:k}=$.current.getViewport();return R.setState({panZoom:$.current,transform:[V,z,k],domNode:M.current.closest(".react-flow")}),()=>{var C;(C=$.current)==null||C.destroy()}}},[]),g.useEffect(()=>{var V;(V=$.current)==null||V.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:s,panOnScrollSpeed:r,panOnScrollMode:i,zoomOnDoubleClick:l,panOnDrag:c,zoomActivationKeyPressed:A,preventScrolling:f,noPanClassName:y,userSelectionActive:_,noWheelClassName:j,lib:L,onTransformChange:O})},[e,t,n,s,r,i,l,c,A,f,y,_,j,L,O]),o.jsxRuntimeExports.jsx("div",{className:"react-flow__renderer",ref:M,style:no,children:h})}const FE=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function HE(){const{userSelectionActive:e,userSelectionRect:t}=Se(FE,Ne);return e&&t?o.jsxRuntimeExports.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Mo=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},ZE=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function KE({isSelecting:e,selectionKeyPressed:t,selectionMode:n=nn.Full,panOnDrag:s,selectionOnDrag:r,onSelectionStart:i,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:a,onPaneScroll:d,onPaneMouseEnter:x,onPaneMouseMove:p,onPaneMouseLeave:m,children:f}){const h=_e(),{userSelectionActive:j,elementsSelectable:y,dragging:S,connectionInProgress:b}=Se(ZE,Ne),E=y&&(e||j),R=g.useRef(null),M=g.useRef(),_=g.useRef(new Set),L=g.useRef(new Set),A=g.useRef(!1),$=g.useRef(!1),O=N=>{if(A.current||b){A.current=!1;return}c==null||c(N),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},V=N=>{if(Array.isArray(s)&&(s!=null&&s.includes(2))){N.preventDefault();return}a==null||a(N)},z=d?N=>d(N):void 0,k=N=>{var Z,ee;const{resetSelectedElements:D,domNode:I}=h.getState();if(M.current=I==null?void 0:I.getBoundingClientRect(),!y||!e||N.button!==0||N.target!==R.current||!M.current)return;(ee=(Z=N.target)==null?void 0:Z.setPointerCapture)==null||ee.call(Z,N.pointerId),$.current=!0,A.current=!1;const{x:F,y:H}=dt(N.nativeEvent,M.current);D(),h.setState({userSelectionRect:{width:0,height:0,startX:F,startY:H,x:F,y:H}}),i==null||i(N)},C=N=>{const{userSelectionRect:D,transform:I,nodeLookup:F,edgeLookup:H,connectionLookup:Z,triggerNodeChanges:ee,triggerEdgeChanges:te,defaultEdgeOptions:se}=h.getState();if(!M.current||!D)return;A.current=!0;const{x:oe,y:xe}=dt(N.nativeEvent,M.current),{startX:J,startY:ae}=D,je={startX:J,startY:ae,x:oe<J?oe:J,y:xe<ae?xe:ae,width:Math.abs(oe-J),height:Math.abs(xe-ae)},ge=_.current,W=L.current;_.current=new Set(Ar(F,je,I,n===nn.Partial,!0).map(ue=>ue.id)),L.current=new Set;const le=(se==null?void 0:se.selectable)??!0;for(const ue of _.current){const Me=Z.get(ue);if(Me)for(const{edgeId:Le}of Me.values()){const Wt=H.get(Le);Wt&&(Wt.selectable??le)&&L.current.add(Le)}}if(!Ai(ge,_.current)){const ue=Ut(F,_.current,!0);ee(ue)}if(!Ai(W,L.current)){const ue=Ut(H,L.current);te(ue)}h.setState({userSelectionRect:je,userSelectionActive:!0,nodesSelectionActive:!1})},P=N=>{var I,F;if(N.button!==0||!$.current)return;(F=(I=N.target)==null?void 0:I.releasePointerCapture)==null||F.call(I,N.pointerId);const{userSelectionRect:D}=h.getState();!j&&D&&N.target===R.current&&(O==null||O(N)),h.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:_.current.size>0}),l==null||l(N),(t||r)&&(A.current=!1),$.current=!1},v=s===!0||Array.isArray(s)&&s.includes(0);return o.jsxRuntimeExports.jsxs("div",{className:$e(["react-flow__pane",{draggable:v,dragging:S,selection:e}]),onClick:E?void 0:Mo(O,R),onContextMenu:Mo(V,R),onWheel:Mo(z,R),onPointerEnter:E?void 0:x,onPointerDown:E?k:p,onPointerMove:E?C:p,onPointerUp:E?P:void 0,onPointerLeave:m,ref:R,style:no,children:[f,o.jsxRuntimeExports.jsx(HE,{})]})}function Jo({id:e,store:t,unselect:n=!1,nodeRef:s}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:l,nodeLookup:c,onError:a}=t.getState(),d=c.get(e);if(!d){a==null||a("012",Oe.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&l)&&(i({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var x;return(x=s==null?void 0:s.current)==null?void 0:x.blur()})):r([e])}function gu({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:s,nodeId:r,isSelectable:i,nodeClickDistance:l}){const c=_e(),[a,d]=g.useState(!1),x=g.useRef();return g.useEffect(()=>{x.current=M5({getStoreItems:()=>c.getState(),onNodeMouseDown:p=>{Jo({id:p,store:c,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),g.useEffect(()=>{var p,m;if(t)(p=x.current)==null||p.destroy();else if(e.current)return(m=x.current)==null||m.update({noDragClassName:n,handleSelector:s,domNode:e.current,isSelectable:i,nodeId:r,nodeClickDistance:l}),()=>{var f;(f=x.current)==null||f.destroy()}},[n,s,t,i,e,r]),a}const WE=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function ju(){const e=_e();return g.useCallback(n=>{const{nodeExtent:s,snapToGrid:r,snapGrid:i,nodesDraggable:l,onError:c,updateNodePositions:a,nodeLookup:d,nodeOrigin:x}=e.getState(),p=new Map,m=WE(l),f=r?i[0]:5,h=r?i[1]:5,j=n.direction.x*f*n.factor,y=n.direction.y*h*n.factor;for(const[,S]of d){if(!m(S))continue;let b={x:S.internals.positionAbsolute.x+j,y:S.internals.positionAbsolute.y+y};r&&(b=Js(b,i));const{position:E,positionAbsolute:R}=Ia({nodeId:S.id,nextPosition:b,nodeLookup:d,nodeExtent:s,nodeOrigin:x,onError:c});S.position=E,S.internals.positionAbsolute=R,p.set(S.id,S)}a(p)},[])}const Vr=g.createContext(null),YE=Vr.Provider;Vr.Consumer;const Eu=()=>g.useContext(Vr),GE=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),qE=(e,t,n)=>s=>{const{connectionClickStartHandle:r,connectionMode:i,connection:l}=s,{fromHandle:c,toHandle:a,isValid:d}=l,x=(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n;return{connectingFrom:(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n,connectingTo:x,clickConnecting:(r==null?void 0:r.nodeId)===e&&(r==null?void 0:r.id)===t&&(r==null?void 0:r.type)===n,isPossibleEndHandle:i===zt.Strict?(c==null?void 0:c.type)!==n:e!==(c==null?void 0:c.nodeId)||t!==(c==null?void 0:c.id),connectionInProcess:!!c,clickConnectionInProcess:!!r,valid:x&&d}};function XE({type:e="source",position:t=U.Top,isValidConnection:n,isConnectable:s=!0,isConnectableStart:r=!0,isConnectableEnd:i=!0,id:l,onConnect:c,children:a,className:d,onMouseDown:x,onTouchStart:p,...m},f){var P,v;const h=l||null,j=e==="target",y=_e(),S=Eu(),{connectOnClick:b,noPanClassName:E,rfId:R}=Se(GE,Ne),{connectingFrom:M,connectingTo:_,clickConnecting:L,isPossibleEndHandle:A,connectionInProcess:$,clickConnectionInProcess:O,valid:V}=Se(qE(S,h,e),Ne);S||(v=(P=y.getState()).onError)==null||v.call(P,"010",Oe.error010());const z=N=>{const{defaultEdgeOptions:D,onConnect:I,hasDefaultEdges:F}=y.getState(),H={...D,...N};if(F){const{edges:Z,setEdges:ee}=y.getState();ee(Ga(H,Z))}I==null||I(H),c==null||c(H)},k=N=>{if(!S)return;const D=Ha(N.nativeEvent);if(r&&(D&&N.button===0||!D)){const I=y.getState();Uo.onPointerDown(N.nativeEvent,{autoPanOnConnect:I.autoPanOnConnect,connectionMode:I.connectionMode,connectionRadius:I.connectionRadius,domNode:I.domNode,nodeLookup:I.nodeLookup,lib:I.lib,isTarget:j,handleId:h,nodeId:S,flowId:I.rfId,panBy:I.panBy,cancelConnection:I.cancelConnection,onConnectStart:I.onConnectStart,onConnectEnd:I.onConnectEnd,updateConnection:I.updateConnection,onConnect:z,isValidConnection:n||I.isValidConnection,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,autoPanSpeed:I.autoPanSpeed})}D?x==null||x(N):p==null||p(N)},C=N=>{const{onClickConnectStart:D,onClickConnectEnd:I,connectionClickStartHandle:F,connectionMode:H,isValidConnection:Z,lib:ee,rfId:te,nodeLookup:se,connection:oe}=y.getState();if(!S||!F&&!r)return;if(!F){D==null||D(N.nativeEvent,{nodeId:S,handleId:h,handleType:e}),y.setState({connectionClickStartHandle:{nodeId:S,type:e,id:h}});return}const xe=Va(N.target),J=n||Z,{connection:ae,isValid:je}=Uo.isValid(N.nativeEvent,{handle:{nodeId:S,id:h,type:e},connectionMode:H,fromNodeId:F.nodeId,fromHandleId:F.id||null,fromType:F.type,isValidConnection:J,flowId:te,doc:xe,lib:ee,nodeLookup:se});je&&ae&&z(ae);const ge=structuredClone(oe);delete ge.inProgress,ge.toPosition=ge.toHandle?ge.toHandle.position:null,I==null||I(N,ge),y.setState({connectionClickStartHandle:null})};return o.jsxRuntimeExports.jsx("div",{"data-handleid":h,"data-nodeid":S,"data-handlepos":t,"data-id":`${R}-${S}-${h}-${e}`,className:$e(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,d,{source:!j,target:j,connectable:s,connectablestart:r,connectableend:i,clickconnecting:L,connectingfrom:M,connectingto:_,valid:V,connectionindicator:s&&(!$||A)&&($||O?i:r)}]),onMouseDown:k,onTouchStart:k,onClick:b?C:void 0,ref:f,...m,children:a})}const Tn=g.memo(fu(XE));function UE({data:e,isConnectable:t,sourcePosition:n=U.Bottom}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[e==null?void 0:e.label,o.jsxRuntimeExports.jsx(Tn,{type:"source",position:n,isConnectable:t})]})}function JE({data:e,isConnectable:t,targetPosition:n=U.Top,sourcePosition:s=U.Bottom}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Tn,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,o.jsxRuntimeExports.jsx(Tn,{type:"source",position:s,isConnectable:t})]})}function QE(){return null}function e4({data:e,isConnectable:t,targetPosition:n=U.Top}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Tn,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Ts={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},dl={input:UE,default:JE,output:e4,group:QE};function t4(e){var t,n,s,r;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((s=e.style)==null?void 0:s.width),height:e.height??((r=e.style)==null?void 0:r.height)}}const n4=e=>{const{width:t,height:n,x:s,y:r}=On(e.nodeLookup,{filter:i=>!!i.selected});return{width:Je(t)?t:null,height:Je(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${s}px,${r}px)`}};function s4({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const s=_e(),{width:r,height:i,transformString:l,userSelectionActive:c}=Se(n4,Ne),a=ju(),d=g.useRef(null);if(g.useEffect(()=>{var m;n||(m=d.current)==null||m.focus({preventScroll:!0})},[n]),gu({nodeRef:d}),c||!r||!i)return null;const x=e?m=>{const f=s.getState().nodes.filter(h=>h.selected);e(m,f)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(Ts,m.key)&&(m.preventDefault(),a({direction:Ts[m.key],factor:m.shiftKey?4:1}))};return o.jsxRuntimeExports.jsx("div",{className:$e(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:o.jsxRuntimeExports.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:r,height:i}})})}const xl=typeof window<"u"?window:void 0,o4=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function yu({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:l,paneClickDistance:c,deleteKeyCode:a,selectionKeyCode:d,selectionOnDrag:x,selectionMode:p,onSelectionStart:m,onSelectionEnd:f,multiSelectionKeyCode:h,panActivationKeyCode:j,zoomActivationKeyCode:y,elementsSelectable:S,zoomOnScroll:b,zoomOnPinch:E,panOnScroll:R,panOnScrollSpeed:M,panOnScrollMode:_,zoomOnDoubleClick:L,panOnDrag:A,defaultViewport:$,translateExtent:O,minZoom:V,maxZoom:z,preventScrolling:k,onSelectionContextMenu:C,noWheelClassName:P,noPanClassName:v,disableKeyboardA11y:N,onViewportChange:D,isControlledViewport:I}){const{nodesSelectionActive:F,userSelectionActive:H}=Se(o4),Z=Nn(d,{target:xl}),ee=Nn(j,{target:xl}),te=ee||A,se=ee||R,oe=x&&te!==!0,xe=Z||H||oe;return DE({deleteKeyCode:a,multiSelectionKeyCode:h}),o.jsxRuntimeExports.jsx(VE,{onPaneContextMenu:i,elementsSelectable:S,zoomOnScroll:b,zoomOnPinch:E,panOnScroll:se,panOnScrollSpeed:M,panOnScrollMode:_,zoomOnDoubleClick:L,panOnDrag:!Z&&te,defaultViewport:$,translateExtent:O,minZoom:V,maxZoom:z,zoomActivationKeyCode:y,preventScrolling:k,noWheelClassName:P,noPanClassName:v,onViewportChange:D,isControlledViewport:I,paneClickDistance:c,children:o.jsxRuntimeExports.jsxs(KE,{onSelectionStart:m,onSelectionEnd:f,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:l,panOnDrag:te,isSelecting:!!xe,selectionMode:p,selectionKeyPressed:Z,selectionOnDrag:oe,children:[e,F&&o.jsxRuntimeExports.jsx(s4,{onSelectionContextMenu:C,noPanClassName:v,disableKeyboardA11y:N})]})})}yu.displayName="FlowRenderer";const r4=g.memo(yu),i4=e=>t=>e?Ar(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function l4(e){return Se(g.useCallback(i4(e),[e]),Ne)}const c4=e=>e.updateNodeInternals;function a4(){const e=Se(c4),[t]=g.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const s=new Map;n.forEach(r=>{const i=r.target.getAttribute("data-id");s.set(i,{id:i,nodeElement:r.target,force:!0})}),e(s)}));return g.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function u4({node:e,nodeType:t,hasDimensions:n,resizeObserver:s}){const r=_e(),i=g.useRef(null),l=g.useRef(null),c=g.useRef(e.sourcePosition),a=g.useRef(e.targetPosition),d=g.useRef(t),x=n&&!!e.internals.handleBounds;return g.useEffect(()=>{i.current&&!e.hidden&&(!x||l.current!==i.current)&&(l.current&&(s==null||s.unobserve(l.current)),s==null||s.observe(i.current),l.current=i.current)},[x,e.hidden]),g.useEffect(()=>()=>{l.current&&(s==null||s.unobserve(l.current),l.current=null)},[]),g.useEffect(()=>{if(i.current){const p=d.current!==t,m=c.current!==e.sourcePosition,f=a.current!==e.targetPosition;(p||m||f)&&(d.current=t,c.current=e.sourcePosition,a.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function d4({id:e,onClick:t,onMouseEnter:n,onMouseMove:s,onMouseLeave:r,onContextMenu:i,onDoubleClick:l,nodesDraggable:c,elementsSelectable:a,nodesConnectable:d,nodesFocusable:x,resizeObserver:p,noDragClassName:m,noPanClassName:f,disableKeyboardA11y:h,rfId:j,nodeTypes:y,nodeClickDistance:S,onError:b}){const{node:E,internals:R,isParent:M}=Se(J=>{const ae=J.nodeLookup.get(e),je=J.parentLookup.has(e);return{node:ae,internals:ae.internals,isParent:je}},Ne);let _=E.type||"default",L=(y==null?void 0:y[_])||dl[_];L===void 0&&(b==null||b("003",Oe.error003(_)),_="default",L=dl.default);const A=!!(E.draggable||c&&typeof E.draggable>"u"),$=!!(E.selectable||a&&typeof E.selectable>"u"),O=!!(E.connectable||d&&typeof E.connectable>"u"),V=!!(E.focusable||x&&typeof E.focusable>"u"),z=_e(),k=Oa(E),C=u4({node:E,nodeType:_,hasDimensions:k,resizeObserver:p}),P=gu({nodeRef:C,disabled:E.hidden||!A,noDragClassName:m,handleSelector:E.dragHandle,nodeId:e,isSelectable:$,nodeClickDistance:S}),v=ju();if(E.hidden)return null;const N=ht(E),D=t4(E),I=$||A||t||n||s||r,F=n?J=>n(J,{...R.userNode}):void 0,H=s?J=>s(J,{...R.userNode}):void 0,Z=r?J=>r(J,{...R.userNode}):void 0,ee=i?J=>i(J,{...R.userNode}):void 0,te=l?J=>l(J,{...R.userNode}):void 0,se=J=>{const{selectNodesOnDrag:ae,nodeDragThreshold:je}=z.getState();$&&(!ae||!A||je>0)&&Jo({id:e,store:z,nodeRef:C}),t&&t(J,{...R.userNode})},oe=J=>{if(!(Fa(J.nativeEvent)||h)){if(_a.includes(J.key)&&$){const ae=J.key==="Escape";Jo({id:e,store:z,unselect:ae,nodeRef:C})}else if(A&&E.selected&&Object.prototype.hasOwnProperty.call(Ts,J.key)){J.preventDefault();const{ariaLabelConfig:ae}=z.getState();z.setState({ariaLiveMessage:ae["node.a11yDescription.ariaLiveMessage"]({direction:J.key.replace("Arrow","").toLowerCase(),x:~~R.positionAbsolute.x,y:~~R.positionAbsolute.y})}),v({direction:Ts[J.key],factor:J.shiftKey?4:1})}}},xe=()=>{var ue;if(h||!((ue=C.current)!=null&&ue.matches(":focus-visible")))return;const{transform:J,width:ae,height:je,autoPanOnNodeFocus:ge,setCenter:W}=z.getState();if(!ge)return;Ar(new Map([[e,E]]),{x:0,y:0,width:ae,height:je},J,!0).length>0||W(E.position.x+N.width/2,E.position.y+N.height/2,{zoom:J[2]})};return o.jsxRuntimeExports.jsx("div",{className:$e(["react-flow__node",`react-flow__node-${_}`,{[f]:A},E.className,{selected:E.selected,selectable:$,parent:M,draggable:A,dragging:P}]),ref:C,style:{zIndex:R.z,transform:`translate(${R.positionAbsolute.x}px,${R.positionAbsolute.y}px)`,pointerEvents:I?"all":"none",visibility:k?"visible":"hidden",...E.style,...D},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:F,onMouseMove:H,onMouseLeave:Z,onContextMenu:ee,onClick:se,onDoubleClick:te,onKeyDown:V?oe:void 0,tabIndex:V?0:void 0,onFocus:V?xe:void 0,role:E.ariaRole??(V?"group":void 0),"aria-roledescription":"node","aria-describedby":h?void 0:`${au}-${j}`,"aria-label":E.ariaLabel,...E.domAttributes,children:o.jsxRuntimeExports.jsx(YE,{value:e,children:o.jsxRuntimeExports.jsx(L,{id:e,data:E.data,type:_,positionAbsoluteX:R.positionAbsolute.x,positionAbsoluteY:R.positionAbsolute.y,selected:E.selected??!1,selectable:$,draggable:A,deletable:E.deletable??!0,isConnectable:O,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:P,dragHandle:E.dragHandle,zIndex:R.z,parentId:E.parentId,...N})})})}const x4=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Su(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:r,onError:i}=Se(x4,Ne),l=l4(e.onlyRenderVisibleElements),c=a4();return o.jsxRuntimeExports.jsx("div",{className:"react-flow__nodes",style:no,children:l.map(a=>o.jsxRuntimeExports.jsx(d4,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:c,nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}Su.displayName="NodeRenderer";const p4=g.memo(Su);function m4(e){return Se(g.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const s=[];if(n.width&&n.height)for(const r of n.edges){const i=n.nodeLookup.get(r.source),l=n.nodeLookup.get(r.target);i&&l&&p5({sourceNode:i,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&s.push(r.id)}return s},[e]),Ne)}const f4=({color:e="none",strokeWidth:t=1})=>o.jsxRuntimeExports.jsx("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),h4=({color:e="none",strokeWidth:t=1})=>o.jsxRuntimeExports.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),pl={[Ms.Arrow]:f4,[Ms.ArrowClosed]:h4};function g4(e){const t=_e();return g.useMemo(()=>{var r,i;return Object.prototype.hasOwnProperty.call(pl,e)?pl[e]:((i=(r=t.getState()).onError)==null||i.call(r,"009",Oe.error009(e)),null)},[e])}const j4=({id:e,type:t,color:n,width:s=12.5,height:r=12.5,markerUnits:i="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const a=g4(t);return a?o.jsxRuntimeExports.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${s}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:c,refX:"0",refY:"0",children:o.jsxRuntimeExports.jsx(a,{color:n,strokeWidth:l})}):null},Ru=({defaultColor:e,rfId:t})=>{const n=Se(i=>i.edges),s=Se(i=>i.defaultEdgeOptions),r=g.useMemo(()=>y5(n,{id:t,defaultColor:e,defaultMarkerStart:s==null?void 0:s.markerStart,defaultMarkerEnd:s==null?void 0:s.markerEnd}),[n,s,t,e]);return r.length?o.jsxRuntimeExports.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:o.jsxRuntimeExports.jsx("defs",{children:r.map(i=>o.jsxRuntimeExports.jsx(j4,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};Ru.displayName="MarkerDefinitions";var E4=g.memo(Ru);function Cu({x:e,y:t,label:n,labelStyle:s,labelShowBg:r=!0,labelBgStyle:i,labelBgPadding:l=[2,4],labelBgBorderRadius:c=2,children:a,className:d,...x}){const[p,m]=g.useState({x:1,y:0,width:0,height:0}),f=$e(["react-flow__edge-textwrapper",d]),h=g.useRef(null);return g.useEffect(()=>{if(h.current){const j=h.current.getBBox();m({x:j.x,y:j.y,width:j.width,height:j.height})}},[n]),n?o.jsxRuntimeExports.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:f,visibility:p.width?"visible":"hidden",...x,children:[r&&o.jsxRuntimeExports.jsx("rect",{width:p.width+2*l[0],x:-l[0],y:-l[1],height:p.height+2*l[1],className:"react-flow__edge-textbg",style:i,rx:c,ry:c}),o.jsxRuntimeExports.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:h,style:s,children:n}),a]}):null}Cu.displayName="EdgeText";const y4=g.memo(Cu);function Qe({path:e,labelX:t,labelY:n,label:s,labelStyle:r,labelShowBg:i,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:a,interactionWidth:d=20,...x}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("path",{...x,d:e,fill:"none",className:$e(["react-flow__edge-path",x.className])}),d&&o.jsxRuntimeExports.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}),s&&Je(t)&&Je(n)?o.jsxRuntimeExports.jsx(y4,{x:t,y:n,label:s,labelStyle:r,labelShowBg:i,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:a}):null]})}function ml({pos:e,x1:t,y1:n,x2:s,y2:r}){return e===U.Left||e===U.Right?[.5*(t+s),n]:[t,.5*(n+r)]}function wu({sourceX:e,sourceY:t,sourcePosition:n=U.Bottom,targetX:s,targetY:r,targetPosition:i=U.Top}){const[l,c]=ml({pos:n,x1:e,y1:t,x2:s,y2:r}),[a,d]=ml({pos:i,x1:s,y1:r,x2:e,y2:t}),[x,p,m,f]=Za({sourceX:e,sourceY:t,targetX:s,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:a,targetControlY:d});return[`M${e},${t} C${l},${c} ${a},${d} ${s},${r}`,x,p,m,f]}function bu(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,sourcePosition:l,targetPosition:c,label:a,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,interactionWidth:S})=>{const[b,E,R]=wu({sourceX:n,sourceY:s,sourcePosition:l,targetX:r,targetY:i,targetPosition:c}),M=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Qe,{id:M,path:b,labelX:E,labelY:R,label:a,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,interactionWidth:S})})}const S4=bu({isInternal:!1}),vu=bu({isInternal:!0});S4.displayName="SimpleBezierEdge";vu.displayName="SimpleBezierEdgeInternal";function ku(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,sourcePosition:f=U.Bottom,targetPosition:h=U.Top,markerEnd:j,markerStart:y,pathOptions:S,interactionWidth:b})=>{const[E,R,M]=Go({sourceX:n,sourceY:s,sourcePosition:f,targetX:r,targetY:i,targetPosition:h,borderRadius:S==null?void 0:S.borderRadius,offset:S==null?void 0:S.offset}),_=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Qe,{id:_,path:E,labelX:R,labelY:M,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:j,markerStart:y,interactionWidth:b})})}const Mu=ku({isInternal:!1}),Pu=ku({isInternal:!0});Mu.displayName="SmoothStepEdge";Pu.displayName="SmoothStepEdgeInternal";function _u(e){return g.memo(({id:t,...n})=>{var r;const s=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Mu,{...n,id:s,pathOptions:g.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(r=n.pathOptions)==null?void 0:r.offset])})})}const R4=_u({isInternal:!1}),Lu=_u({isInternal:!0});R4.displayName="StepEdge";Lu.displayName="StepEdgeInternal";function Nu(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:f,markerStart:h,interactionWidth:j})=>{const[y,S,b]=qa({sourceX:n,sourceY:s,targetX:r,targetY:i}),E=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Qe,{id:E,path:y,labelX:S,labelY:b,label:l,labelStyle:c,labelShowBg:a,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:f,markerStart:h,interactionWidth:j})})}const C4=Nu({isInternal:!1}),Tu=Nu({isInternal:!0});C4.displayName="StraightEdge";Tu.displayName="StraightEdgeInternal";function Au(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,sourcePosition:l=U.Bottom,targetPosition:c=U.Top,label:a,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,pathOptions:S,interactionWidth:b})=>{const[E,R,M]=Ka({sourceX:n,sourceY:s,sourcePosition:l,targetX:r,targetY:i,targetPosition:c,curvature:S==null?void 0:S.curvature}),_=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Qe,{id:_,path:E,labelX:R,labelY:M,label:a,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:f,style:h,markerEnd:j,markerStart:y,interactionWidth:b})})}const w4=Au({isInternal:!1}),Iu=Au({isInternal:!0});w4.displayName="BezierEdge";Iu.displayName="BezierEdgeInternal";const fl={default:Iu,straight:Tu,step:Lu,smoothstep:Pu,simplebezier:vu},hl={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},b4=(e,t,n)=>n===U.Left?e-t:n===U.Right?e+t:e,v4=(e,t,n)=>n===U.Top?e-t:n===U.Bottom?e+t:e,gl="react-flow__edgeupdater";function jl({position:e,centerX:t,centerY:n,radius:s=10,onMouseDown:r,onMouseEnter:i,onMouseOut:l,type:c}){return o.jsxRuntimeExports.jsx("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:l,className:$e([gl,`${gl}-${c}`]),cx:b4(t,s,e),cy:v4(n,s,e),r:s,stroke:"transparent",fill:"transparent"})}function k4({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:s,sourceY:r,targetX:i,targetY:l,sourcePosition:c,targetPosition:a,onReconnect:d,onReconnectStart:x,onReconnectEnd:p,setReconnecting:m,setUpdateHover:f}){const h=_e(),j=(R,M)=>{if(R.button!==0)return;const{autoPanOnConnect:_,domNode:L,isValidConnection:A,connectionMode:$,connectionRadius:O,lib:V,onConnectStart:z,onConnectEnd:k,cancelConnection:C,nodeLookup:P,rfId:v,panBy:N,updateConnection:D}=h.getState(),I=M.type==="target";m(!0),x==null||x(R,n,M.type);const F=(Z,ee)=>{m(!1),p==null||p(Z,n,M.type,ee)},H=Z=>d==null?void 0:d(n,Z);Uo.onPointerDown(R.nativeEvent,{autoPanOnConnect:_,connectionMode:$,connectionRadius:O,domNode:L,handleId:M.id,nodeId:M.nodeId,nodeLookup:P,isTarget:I,edgeUpdaterType:M.type,lib:V,flowId:v,cancelConnection:C,panBy:N,isValidConnection:A,onConnect:H,onConnectStart:z,onConnectEnd:k,onReconnectEnd:F,updateConnection:D,getTransform:()=>h.getState().transform,getFromHandle:()=>h.getState().connection.fromHandle})},y=R=>j(R,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),S=R=>j(R,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),b=()=>f(!0),E=()=>f(!1);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[(e===!0||e==="source")&&o.jsxRuntimeExports.jsx(jl,{position:c,centerX:s,centerY:r,radius:t,onMouseDown:y,onMouseEnter:b,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&o.jsxRuntimeExports.jsx(jl,{position:a,centerX:i,centerY:l,radius:t,onMouseDown:S,onMouseEnter:b,onMouseOut:E,type:"target"})]})}function M4({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:s,onClick:r,onDoubleClick:i,onContextMenu:l,onMouseEnter:c,onMouseMove:a,onMouseLeave:d,reconnectRadius:x,onReconnect:p,onReconnectStart:m,onReconnectEnd:f,rfId:h,edgeTypes:j,noPanClassName:y,onError:S,disableKeyboardA11y:b}){let E=Se(W=>W.edgeLookup.get(e));const R=Se(W=>W.defaultEdgeOptions);E=R?{...R,...E}:E;let M=E.type||"default",_=(j==null?void 0:j[M])||fl[M];_===void 0&&(S==null||S("011",Oe.error011(M)),M="default",_=fl.default);const L=!!(E.focusable||t&&typeof E.focusable>"u"),A=typeof p<"u"&&(E.reconnectable||n&&typeof E.reconnectable>"u"),$=!!(E.selectable||s&&typeof E.selectable>"u"),O=g.useRef(null),[V,z]=g.useState(!1),[k,C]=g.useState(!1),P=_e(),{zIndex:v,sourceX:N,sourceY:D,targetX:I,targetY:F,sourcePosition:H,targetPosition:Z}=Se(g.useCallback(W=>{const le=W.nodeLookup.get(E.source),ue=W.nodeLookup.get(E.target);if(!le||!ue)return{zIndex:E.zIndex,...hl};const Me=E5({id:e,sourceNode:le,targetNode:ue,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:W.connectionMode,onError:S});return{zIndex:x5({selected:E.selected,zIndex:E.zIndex,sourceNode:le,targetNode:ue,elevateOnSelect:W.elevateEdgesOnSelect}),...Me||hl}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),Ne),ee=g.useMemo(()=>E.markerStart?`url('#${qo(E.markerStart,h)}')`:void 0,[E.markerStart,h]),te=g.useMemo(()=>E.markerEnd?`url('#${qo(E.markerEnd,h)}')`:void 0,[E.markerEnd,h]);if(E.hidden||N===null||D===null||I===null||F===null)return null;const se=W=>{var Le;const{addSelectedEdges:le,unselectNodesAndEdges:ue,multiSelectionActive:Me}=P.getState();$&&(P.setState({nodesSelectionActive:!1}),E.selected&&Me?(ue({nodes:[],edges:[E]}),(Le=O.current)==null||Le.blur()):le([e])),r&&r(W,E)},oe=i?W=>{i(W,{...E})}:void 0,xe=l?W=>{l(W,{...E})}:void 0,J=c?W=>{c(W,{...E})}:void 0,ae=a?W=>{a(W,{...E})}:void 0,je=d?W=>{d(W,{...E})}:void 0,ge=W=>{var le;if(!b&&_a.includes(W.key)&&$){const{unselectNodesAndEdges:ue,addSelectedEdges:Me}=P.getState();W.key==="Escape"?((le=O.current)==null||le.blur(),ue({edges:[E]})):Me([e])}};return o.jsxRuntimeExports.jsx("svg",{style:{zIndex:v},children:o.jsxRuntimeExports.jsxs("g",{className:$e(["react-flow__edge",`react-flow__edge-${M}`,E.className,y,{selected:E.selected,animated:E.animated,inactive:!$&&!r,updating:V,selectable:$}]),onClick:se,onDoubleClick:oe,onContextMenu:xe,onMouseEnter:J,onMouseMove:ae,onMouseLeave:je,onKeyDown:L?ge:void 0,tabIndex:L?0:void 0,role:E.ariaRole??(L?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":L?`${uu}-${h}`:void 0,ref:O,...E.domAttributes,children:[!k&&o.jsxRuntimeExports.jsx(_,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:$,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:N,sourceY:D,targetX:I,targetY:F,sourcePosition:H,targetPosition:Z,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:ee,markerEnd:te,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),A&&o.jsxRuntimeExports.jsx(k4,{edge:E,isReconnectable:A,reconnectRadius:x,onReconnect:p,onReconnectStart:m,onReconnectEnd:f,sourceX:N,sourceY:D,targetX:I,targetY:F,sourcePosition:H,targetPosition:Z,setUpdateHover:z,setReconnecting:C})]})})}const P4=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function $u({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:s,noPanClassName:r,onReconnect:i,onEdgeContextMenu:l,onEdgeMouseEnter:c,onEdgeMouseMove:a,onEdgeMouseLeave:d,onEdgeClick:x,reconnectRadius:p,onEdgeDoubleClick:m,onReconnectStart:f,onReconnectEnd:h,disableKeyboardA11y:j}){const{edgesFocusable:y,edgesReconnectable:S,elementsSelectable:b,onError:E}=Se(P4,Ne),R=m4(t);return o.jsxRuntimeExports.jsxs("div",{className:"react-flow__edges",children:[o.jsxRuntimeExports.jsx(E4,{defaultColor:e,rfId:n}),R.map(M=>o.jsxRuntimeExports.jsx(M4,{id:M,edgesFocusable:y,edgesReconnectable:S,elementsSelectable:b,noPanClassName:r,onReconnect:i,onContextMenu:l,onMouseEnter:c,onMouseMove:a,onMouseLeave:d,onClick:x,reconnectRadius:p,onDoubleClick:m,onReconnectStart:f,onReconnectEnd:h,rfId:n,onError:E,edgeTypes:s,disableKeyboardA11y:j},M))]})}$u.displayName="EdgeRenderer";const _4=g.memo($u),L4=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function N4({children:e}){const t=Se(L4);return o.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function T4(e){const t=Ft(),n=g.useRef(!1);g.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const A4=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function I4(e){const t=Se(A4),n=_e();return g.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function $4(e){return e.connection.inProgress?{...e.connection,to:zn(e.connection.to,e.transform)}:{...e.connection}}function B4(e){return $4}function D4(e){const t=B4();return Se(t,Ne)}const O4=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function z4({containerStyle:e,style:t,type:n,component:s}){const{nodesConnectable:r,width:i,height:l,isValid:c,inProgress:a}=Se(O4,Ne);return!(i&&r&&a)?null:o.jsxRuntimeExports.jsx("svg",{style:e,width:i,height:l,className:"react-flow__connectionline react-flow__container",children:o.jsxRuntimeExports.jsx("g",{className:$e(["react-flow__connection",Ta(c)]),children:o.jsxRuntimeExports.jsx(Bu,{style:t,type:n,CustomComponent:s,isValid:c})})})}const Bu=({style:e,type:t=St.Bezier,CustomComponent:n,isValid:s})=>{const{inProgress:r,from:i,fromNode:l,fromHandle:c,fromPosition:a,to:d,toNode:x,toHandle:p,toPosition:m}=D4();if(!r)return;if(n)return o.jsxRuntimeExports.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:c,fromX:i.x,fromY:i.y,toX:d.x,toY:d.y,fromPosition:a,toPosition:m,connectionStatus:Ta(s),toNode:x,toHandle:p});let f="";const h={sourceX:i.x,sourceY:i.y,sourcePosition:a,targetX:d.x,targetY:d.y,targetPosition:m};switch(t){case St.Bezier:[f]=Ka(h);break;case St.SimpleBezier:[f]=wu(h);break;case St.Step:[f]=Go({...h,borderRadius:0});break;case St.SmoothStep:[f]=Go(h);break;default:[f]=qa(h)}return o.jsxRuntimeExports.jsx("path",{d:f,fill:"none",className:"react-flow__connection-path",style:e})};Bu.displayName="ConnectionLine";const V4={};function El(e=V4){const t=g.useRef(e),n=_e();g.useEffect(()=>{var s,r;if(process.env.NODE_ENV==="development"){const i=new Set([...Object.keys(t.current),...Object.keys(e)]);for(const l of i)if(t.current[l]!==e[l]){(r=(s=n.getState()).onError)==null||r.call(s,"002",Oe.error002());break}t.current=e}},[e])}function F4(){const e=_e(),t=g.useRef(!1);g.useEffect(()=>{var n,s;if(process.env.NODE_ENV==="development"&&!t.current){const r=document.querySelector(".react-flow__pane");r&&window.getComputedStyle(r).zIndex!=="1"&&((s=(n=e.getState()).onError)==null||s.call(n,"013",Oe.error013("react"))),t.current=!0}},[])}function Du({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:s,onEdgeClick:r,onNodeDoubleClick:i,onEdgeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:a,onNodeMouseLeave:d,onNodeContextMenu:x,onSelectionContextMenu:p,onSelectionStart:m,onSelectionEnd:f,connectionLineType:h,connectionLineStyle:j,connectionLineComponent:y,connectionLineContainerStyle:S,selectionKeyCode:b,selectionOnDrag:E,selectionMode:R,multiSelectionKeyCode:M,panActivationKeyCode:_,zoomActivationKeyCode:L,deleteKeyCode:A,onlyRenderVisibleElements:$,elementsSelectable:O,defaultViewport:V,translateExtent:z,minZoom:k,maxZoom:C,preventScrolling:P,defaultMarkerColor:v,zoomOnScroll:N,zoomOnPinch:D,panOnScroll:I,panOnScrollSpeed:F,panOnScrollMode:H,zoomOnDoubleClick:Z,panOnDrag:ee,onPaneClick:te,onPaneMouseEnter:se,onPaneMouseMove:oe,onPaneMouseLeave:xe,onPaneScroll:J,onPaneContextMenu:ae,paneClickDistance:je,nodeClickDistance:ge,onEdgeContextMenu:W,onEdgeMouseEnter:le,onEdgeMouseMove:ue,onEdgeMouseLeave:Me,reconnectRadius:Le,onReconnect:Wt,onReconnectStart:lo,onReconnectEnd:co,noDragClassName:Zn,noWheelClassName:Kn,noPanClassName:xn,disableKeyboardA11y:pn,nodeExtent:ao,rfId:Wn,viewport:Yt,onViewportChange:mn}){return El(e),El(t),F4(),T4(n),I4(Yt),o.jsxRuntimeExports.jsx(r4,{onPaneClick:te,onPaneMouseEnter:se,onPaneMouseMove:oe,onPaneMouseLeave:xe,onPaneContextMenu:ae,onPaneScroll:J,paneClickDistance:je,deleteKeyCode:A,selectionKeyCode:b,selectionOnDrag:E,selectionMode:R,onSelectionStart:m,onSelectionEnd:f,multiSelectionKeyCode:M,panActivationKeyCode:_,zoomActivationKeyCode:L,elementsSelectable:O,zoomOnScroll:N,zoomOnPinch:D,zoomOnDoubleClick:Z,panOnScroll:I,panOnScrollSpeed:F,panOnScrollMode:H,panOnDrag:ee,defaultViewport:V,translateExtent:z,minZoom:k,maxZoom:C,onSelectionContextMenu:p,preventScrolling:P,noDragClassName:Zn,noWheelClassName:Kn,noPanClassName:xn,disableKeyboardA11y:pn,onViewportChange:mn,isControlledViewport:!!Yt,children:o.jsxRuntimeExports.jsxs(N4,{children:[o.jsxRuntimeExports.jsx(_4,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:l,onReconnect:Wt,onReconnectStart:lo,onReconnectEnd:co,onlyRenderVisibleElements:$,onEdgeContextMenu:W,onEdgeMouseEnter:le,onEdgeMouseMove:ue,onEdgeMouseLeave:Me,reconnectRadius:Le,defaultMarkerColor:v,noPanClassName:xn,disableKeyboardA11y:pn,rfId:Wn}),o.jsxRuntimeExports.jsx(z4,{style:j,type:h,component:y,containerStyle:S}),o.jsxRuntimeExports.jsx("div",{className:"react-flow__edgelabel-renderer"}),o.jsxRuntimeExports.jsx(p4,{nodeTypes:e,onNodeClick:s,onNodeDoubleClick:i,onNodeMouseEnter:c,onNodeMouseMove:a,onNodeMouseLeave:d,onNodeContextMenu:x,nodeClickDistance:ge,onlyRenderVisibleElements:$,noPanClassName:xn,noDragClassName:Zn,disableKeyboardA11y:pn,nodeExtent:ao,rfId:Wn}),o.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport-portal"})]})})}Du.displayName="GraphView";const H4=g.memo(Du),yl=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,fitViewOptions:c,minZoom:a=.5,maxZoom:d=2,nodeOrigin:x,nodeExtent:p}={})=>{const m=new Map,f=new Map,h=new Map,j=new Map,y=s??t??[],S=n??e??[],b=x??[0,0],E=p??Pn;Ua(h,j,y);const R=Xo(S,m,f,{nodeOrigin:b,nodeExtent:E,elevateNodesOnSelect:!1});let M=[0,0,1];if(l&&r&&i){const _=On(m,{filter:O=>!!((O.width||O.initialWidth)&&(O.height||O.initialHeight))}),{x:L,y:A,zoom:$}=Ir(_,r,i,a,d,(c==null?void 0:c.padding)??.1);M=[L,A,$]}return{rfId:"1",width:0,height:0,transform:M,nodes:S,nodesInitialized:R,nodeLookup:m,parentLookup:f,edges:y,edgeLookup:j,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:a,maxZoom:d,translateExtent:Pn,nodeExtent:E,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:zt.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:b,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:l??!1,fitViewOptions:c,fitViewResolver:null,connection:{...Na},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:_s,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:La}},Z4=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,fitViewOptions:c,minZoom:a,maxZoom:d,nodeOrigin:x,nodeExtent:p})=>aE((m,f)=>{async function h(){const{nodeLookup:j,panZoom:y,fitViewOptions:S,fitViewResolver:b,width:E,height:R,minZoom:M,maxZoom:_}=f();y&&(await r5({nodes:j,width:E,height:R,panZoom:y,minZoom:M,maxZoom:_},S),b==null||b.resolve(!0),m({fitViewResolver:null}))}return{...yl({nodes:e,edges:t,width:r,height:i,fitView:l,fitViewOptions:c,minZoom:a,maxZoom:d,nodeOrigin:x,nodeExtent:p,defaultNodes:n,defaultEdges:s}),setNodes:j=>{const{nodeLookup:y,parentLookup:S,nodeOrigin:b,elevateNodesOnSelect:E,fitViewQueued:R}=f(),M=Xo(j,y,S,{nodeOrigin:b,nodeExtent:p,elevateNodesOnSelect:E,checkEquality:!0});R&&M?(h(),m({nodes:j,nodesInitialized:M,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:j,nodesInitialized:M})},setEdges:j=>{const{connectionLookup:y,edgeLookup:S}=f();Ua(y,S,j),m({edges:j})},setDefaultNodesAndEdges:(j,y)=>{if(j){const{setNodes:S}=f();S(j),m({hasDefaultNodes:!0})}if(y){const{setEdges:S}=f();S(y),m({hasDefaultEdges:!0})}},updateNodeInternals:j=>{const{triggerNodeChanges:y,nodeLookup:S,parentLookup:b,domNode:E,nodeOrigin:R,nodeExtent:M,debug:_,fitViewQueued:L}=f(),{changes:A,updatedInternals:$}=b5(j,S,b,E,R,M);$&&(R5(S,b,{nodeOrigin:R,nodeExtent:M}),L?(h(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(A==null?void 0:A.length)>0&&(_&&console.log("React Flow: trigger node changes",A),y==null||y(A)))},updateNodePositions:(j,y=!1)=>{const S=[],b=[],{nodeLookup:E,triggerNodeChanges:R}=f();for(const[M,_]of j){const L=E.get(M),A=!!(L!=null&&L.expandParent&&(L!=null&&L.parentId)&&(_!=null&&_.position)),$={id:M,type:"position",position:A?{x:Math.max(0,_.position.x),y:Math.max(0,_.position.y)}:_.position,dragging:y};A&&L.parentId&&S.push({id:M,parentId:L.parentId,rect:{..._.internals.positionAbsolute,width:_.measured.width??0,height:_.measured.height??0}}),b.push($)}if(S.length>0){const{parentLookup:M,nodeOrigin:_}=f(),L=zr(S,E,M,_);b.push(...L)}R(b)},triggerNodeChanges:j=>{const{onNodesChange:y,setNodes:S,nodes:b,hasDefaultNodes:E,debug:R}=f();if(j!=null&&j.length){if(E){const M=pu(j,b);S(M)}R&&console.log("React Flow: trigger node changes",j),y==null||y(j)}},triggerEdgeChanges:j=>{const{onEdgesChange:y,setEdges:S,edges:b,hasDefaultEdges:E,debug:R}=f();if(j!=null&&j.length){if(E){const M=mu(j,b);S(M)}R&&console.log("React Flow: trigger edge changes",j),y==null||y(j)}},addSelectedNodes:j=>{const{multiSelectionActive:y,edgeLookup:S,nodeLookup:b,triggerNodeChanges:E,triggerEdgeChanges:R}=f();if(y){const M=j.map(_=>Tt(_,!0));E(M);return}E(Ut(b,new Set([...j]),!0)),R(Ut(S))},addSelectedEdges:j=>{const{multiSelectionActive:y,edgeLookup:S,nodeLookup:b,triggerNodeChanges:E,triggerEdgeChanges:R}=f();if(y){const M=j.map(_=>Tt(_,!0));R(M);return}R(Ut(S,new Set([...j]))),E(Ut(b,new Set,!0))},unselectNodesAndEdges:({nodes:j,edges:y}={})=>{const{edges:S,nodes:b,nodeLookup:E,triggerNodeChanges:R,triggerEdgeChanges:M}=f(),_=j||b,L=y||S,A=_.map(O=>{const V=E.get(O.id);return V&&(V.selected=!1),Tt(O.id,!1)}),$=L.map(O=>Tt(O.id,!1));R(A),M($)},setMinZoom:j=>{const{panZoom:y,maxZoom:S}=f();y==null||y.setScaleExtent([j,S]),m({minZoom:j})},setMaxZoom:j=>{const{panZoom:y,minZoom:S}=f();y==null||y.setScaleExtent([S,j]),m({maxZoom:j})},setTranslateExtent:j=>{var y;(y=f().panZoom)==null||y.setTranslateExtent(j),m({translateExtent:j})},setPaneClickDistance:j=>{var y;(y=f().panZoom)==null||y.setClickDistance(j)},resetSelectedElements:()=>{const{edges:j,nodes:y,triggerNodeChanges:S,triggerEdgeChanges:b,elementsSelectable:E}=f();if(!E)return;const R=y.reduce((_,L)=>L.selected?[..._,Tt(L.id,!1)]:_,[]),M=j.reduce((_,L)=>L.selected?[..._,Tt(L.id,!1)]:_,[]);S(R),b(M)},setNodeExtent:j=>{const{nodes:y,nodeLookup:S,parentLookup:b,nodeOrigin:E,elevateNodesOnSelect:R,nodeExtent:M}=f();j[0][0]===M[0][0]&&j[0][1]===M[0][1]&&j[1][0]===M[1][0]&&j[1][1]===M[1][1]||(Xo(y,S,b,{nodeOrigin:E,nodeExtent:j,elevateNodesOnSelect:R,checkEquality:!1}),m({nodeExtent:j}))},panBy:j=>{const{transform:y,width:S,height:b,panZoom:E,translateExtent:R}=f();return v5({delta:j,panZoom:E,transform:y,translateExtent:R,width:S,height:b})},setCenter:async(j,y,S)=>{const{width:b,height:E,maxZoom:R,panZoom:M}=f();if(!M)return Promise.resolve(!1);const _=typeof(S==null?void 0:S.zoom)<"u"?S.zoom:R;return await M.setViewport({x:b/2-j*_,y:E/2-y*_,zoom:_},{duration:S==null?void 0:S.duration,ease:S==null?void 0:S.ease,interpolate:S==null?void 0:S.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...Na}})},updateConnection:j=>{m({connection:j})},reset:()=>m({...yl()})}},Object.is);function Ou({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:s,initialWidth:r,initialHeight:i,initialMinZoom:l,initialMaxZoom:c,initialFitViewOptions:a,fitView:d,nodeOrigin:x,nodeExtent:p,children:m}){const[f]=g.useState(()=>Z4({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:d,minZoom:l,maxZoom:c,fitViewOptions:a,nodeOrigin:x,nodeExtent:p}));return o.jsxRuntimeExports.jsx(uE,{value:f,children:o.jsxRuntimeExports.jsx(AE,{children:m})})}function K4({children:e,nodes:t,edges:n,defaultNodes:s,defaultEdges:r,width:i,height:l,fitView:c,fitViewOptions:a,minZoom:d,maxZoom:x,nodeOrigin:p,nodeExtent:m}){return g.useContext(eo)?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:e}):o.jsxRuntimeExports.jsx(Ou,{initialNodes:t,initialEdges:n,defaultNodes:s,defaultEdges:r,initialWidth:i,initialHeight:l,fitView:c,initialFitViewOptions:a,initialMinZoom:d,initialMaxZoom:x,nodeOrigin:p,nodeExtent:m,children:e})}const W4={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Y4({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,className:r,nodeTypes:i,edgeTypes:l,onNodeClick:c,onEdgeClick:a,onInit:d,onMove:x,onMoveStart:p,onMoveEnd:m,onConnect:f,onConnectStart:h,onConnectEnd:j,onClickConnectStart:y,onClickConnectEnd:S,onNodeMouseEnter:b,onNodeMouseMove:E,onNodeMouseLeave:R,onNodeContextMenu:M,onNodeDoubleClick:_,onNodeDragStart:L,onNodeDrag:A,onNodeDragStop:$,onNodesDelete:O,onEdgesDelete:V,onDelete:z,onSelectionChange:k,onSelectionDragStart:C,onSelectionDrag:P,onSelectionDragStop:v,onSelectionContextMenu:N,onSelectionStart:D,onSelectionEnd:I,onBeforeDelete:F,connectionMode:H,connectionLineType:Z=St.Bezier,connectionLineStyle:ee,connectionLineComponent:te,connectionLineContainerStyle:se,deleteKeyCode:oe="Backspace",selectionKeyCode:xe="Shift",selectionOnDrag:J=!1,selectionMode:ae=nn.Full,panActivationKeyCode:je="Space",multiSelectionKeyCode:ge=Ns()?"Meta":"Control",zoomActivationKeyCode:W=Ns()?"Meta":"Control",snapToGrid:le,snapGrid:ue,onlyRenderVisibleElements:Me=!1,selectNodesOnDrag:Le,nodesDraggable:Wt,autoPanOnNodeFocus:lo,nodesConnectable:co,nodesFocusable:Zn,nodeOrigin:Kn=du,edgesFocusable:xn,edgesReconnectable:pn,elementsSelectable:ao=!0,defaultViewport:Wn=wE,minZoom:Yt=.5,maxZoom:mn=2,translateExtent:qr=Pn,preventScrolling:Nm=!0,nodeExtent:uo,defaultMarkerColor:Tm="#b1b1b7",zoomOnScroll:Am=!0,zoomOnPinch:Im=!0,panOnScroll:$m=!1,panOnScrollSpeed:Bm=.5,panOnScrollMode:Dm=It.Free,zoomOnDoubleClick:Om=!0,panOnDrag:zm=!0,onPaneClick:Vm,onPaneMouseEnter:Fm,onPaneMouseMove:Hm,onPaneMouseLeave:Zm,onPaneScroll:Km,onPaneContextMenu:Wm,paneClickDistance:Xr=0,nodeClickDistance:Ym=0,children:Gm,onReconnect:qm,onReconnectStart:Xm,onReconnectEnd:Um,onEdgeContextMenu:Jm,onEdgeDoubleClick:Qm,onEdgeMouseEnter:ef,onEdgeMouseMove:tf,onEdgeMouseLeave:nf,reconnectRadius:sf=10,onNodesChange:of,onEdgesChange:rf,noDragClassName:lf="nodrag",noWheelClassName:cf="nowheel",noPanClassName:Ur="nopan",fitView:Jr,fitViewOptions:Qr,connectOnClick:af,attributionPosition:uf,proOptions:df,defaultEdgeOptions:xf,elevateNodesOnSelect:pf,elevateEdgesOnSelect:mf,disableKeyboardA11y:ei=!1,autoPanOnConnect:ff,autoPanOnNodeDrag:hf,autoPanSpeed:gf,connectionRadius:jf,isValidConnection:Ef,onError:yf,style:Sf,id:ti,nodeDragThreshold:Rf,viewport:Cf,onViewportChange:wf,width:bf,height:vf,colorMode:kf="light",debug:Mf,onScroll:Yn,ariaLabelConfig:Pf,..._f},Lf){const xo=ti||"1",Nf=ME(kf),Tf=g.useCallback(ni=>{ni.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Yn==null||Yn(ni)},[Yn]);return o.jsxRuntimeExports.jsx("div",{"data-testid":"rf__wrapper",..._f,onScroll:Tf,style:{...Sf,...W4},ref:Lf,className:$e(["react-flow",r,Nf]),id:ti,role:"application",children:o.jsxRuntimeExports.jsxs(K4,{nodes:e,edges:t,width:bf,height:vf,fitView:Jr,fitViewOptions:Qr,minZoom:Yt,maxZoom:mn,nodeOrigin:Kn,nodeExtent:uo,children:[o.jsxRuntimeExports.jsx(H4,{onInit:d,onNodeClick:c,onEdgeClick:a,onNodeMouseEnter:b,onNodeMouseMove:E,onNodeMouseLeave:R,onNodeContextMenu:M,onNodeDoubleClick:_,nodeTypes:i,edgeTypes:l,connectionLineType:Z,connectionLineStyle:ee,connectionLineComponent:te,connectionLineContainerStyle:se,selectionKeyCode:xe,selectionOnDrag:J,selectionMode:ae,deleteKeyCode:oe,multiSelectionKeyCode:ge,panActivationKeyCode:je,zoomActivationKeyCode:W,onlyRenderVisibleElements:Me,defaultViewport:Wn,translateExtent:qr,minZoom:Yt,maxZoom:mn,preventScrolling:Nm,zoomOnScroll:Am,zoomOnPinch:Im,zoomOnDoubleClick:Om,panOnScroll:$m,panOnScrollSpeed:Bm,panOnScrollMode:Dm,panOnDrag:zm,onPaneClick:Vm,onPaneMouseEnter:Fm,onPaneMouseMove:Hm,onPaneMouseLeave:Zm,onPaneScroll:Km,onPaneContextMenu:Wm,paneClickDistance:Xr,nodeClickDistance:Ym,onSelectionContextMenu:N,onSelectionStart:D,onSelectionEnd:I,onReconnect:qm,onReconnectStart:Xm,onReconnectEnd:Um,onEdgeContextMenu:Jm,onEdgeDoubleClick:Qm,onEdgeMouseEnter:ef,onEdgeMouseMove:tf,onEdgeMouseLeave:nf,reconnectRadius:sf,defaultMarkerColor:Tm,noDragClassName:lf,noWheelClassName:cf,noPanClassName:Ur,rfId:xo,disableKeyboardA11y:ei,nodeExtent:uo,viewport:Cf,onViewportChange:wf}),o.jsxRuntimeExports.jsx(kE,{nodes:e,edges:t,defaultNodes:n,defaultEdges:s,onConnect:f,onConnectStart:h,onConnectEnd:j,onClickConnectStart:y,onClickConnectEnd:S,nodesDraggable:Wt,autoPanOnNodeFocus:lo,nodesConnectable:co,nodesFocusable:Zn,edgesFocusable:xn,edgesReconnectable:pn,elementsSelectable:ao,elevateNodesOnSelect:pf,elevateEdgesOnSelect:mf,minZoom:Yt,maxZoom:mn,nodeExtent:uo,onNodesChange:of,onEdgesChange:rf,snapToGrid:le,snapGrid:ue,connectionMode:H,translateExtent:qr,connectOnClick:af,defaultEdgeOptions:xf,fitView:Jr,fitViewOptions:Qr,onNodesDelete:O,onEdgesDelete:V,onDelete:z,onNodeDragStart:L,onNodeDrag:A,onNodeDragStop:$,onSelectionDrag:P,onSelectionDragStart:C,onSelectionDragStop:v,onMove:x,onMoveStart:p,onMoveEnd:m,noPanClassName:Ur,nodeOrigin:Kn,rfId:xo,autoPanOnConnect:ff,autoPanOnNodeDrag:hf,autoPanSpeed:gf,onError:yf,connectionRadius:jf,isValidConnection:Ef,selectNodesOnDrag:Le,nodeDragThreshold:Rf,onBeforeDelete:F,paneClickDistance:Xr,debug:Mf,ariaLabelConfig:Pf}),o.jsxRuntimeExports.jsx(CE,{onSelectionChange:k}),Gm,o.jsxRuntimeExports.jsx(jE,{proOptions:df,position:uf}),o.jsxRuntimeExports.jsx(hE,{rfId:xo,disableKeyboardA11y:ei})]})})}var G4=fu(Y4);function q4(){const e=_e();return g.useCallback(t=>{const{domNode:n,updateNodeInternals:s}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach(l=>{const c=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${l}"]`);c&&i.set(l,{id:l,nodeElement:c,force:!0})}),requestAnimationFrame(()=>s(i,{triggerFitView:!1}))},[])}function X4({onStart:e,onChange:t,onEnd:n}){const s=_e();g.useEffect(()=>{s.setState({onViewportChangeStart:e})},[e]),g.useEffect(()=>{s.setState({onViewportChange:t})},[t]),g.useEffect(()=>{s.setState({onViewportChangeEnd:n})},[n])}function U4({dimensions:e,lineWidth:t,variant:n,className:s}){return o.jsxRuntimeExports.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:$e(["react-flow__background-pattern",n,s])})}function J4({radius:e,className:t}){return o.jsxRuntimeExports.jsx("circle",{cx:e,cy:e,r:e,className:$e(["react-flow__background-pattern","dots",t])})}var Ct;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ct||(Ct={}));const Q4={[Ct.Dots]:1,[Ct.Lines]:1,[Ct.Cross]:6},ey=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function zu({id:e,variant:t=Ct.Dots,gap:n=20,size:s,lineWidth:r=1,offset:i=0,color:l,bgColor:c,style:a,className:d,patternClassName:x}){const p=g.useRef(null),{transform:m,patternId:f}=Se(ey,Ne),h=s||Q4[t],j=t===Ct.Dots,y=t===Ct.Cross,S=Array.isArray(n)?n:[n,n],b=[S[0]*m[2]||1,S[1]*m[2]||1],E=h*m[2],R=Array.isArray(i)?i:[i,i],M=y?[E,E]:b,_=[R[0]*m[2]||1+M[0]/2,R[1]*m[2]||1+M[1]/2],L=`${f}${e||""}`;return o.jsxRuntimeExports.jsxs("svg",{className:$e(["react-flow__background",d]),style:{...a,...no,"--xy-background-color-props":c,"--xy-background-pattern-color-props":l},ref:p,"data-testid":"rf__background",children:[o.jsxRuntimeExports.jsx("pattern",{id:L,x:m[0]%b[0],y:m[1]%b[1],width:b[0],height:b[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:j?o.jsxRuntimeExports.jsx(J4,{radius:E/2,className:x}):o.jsxRuntimeExports.jsx(U4,{dimensions:M,lineWidth:r,variant:t,className:x})}),o.jsxRuntimeExports.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${L})`})]})}zu.displayName="Background";const ty=g.memo(zu);function ny(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:o.jsxRuntimeExports.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function sy(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:o.jsxRuntimeExports.jsx("path",{d:"M0 0h32v4.2H0z"})})}function oy(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:o.jsxRuntimeExports.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function ry(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsxRuntimeExports.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function iy(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsxRuntimeExports.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function ss({children:e,className:t,...n}){return o.jsxRuntimeExports.jsx("button",{type:"button",className:$e(["react-flow__controls-button",t]),...n,children:e})}const ly=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Vu({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:s=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:l,onFitView:c,onInteractiveChange:a,className:d,children:x,position:p="bottom-left",orientation:m="vertical","aria-label":f}){const h=_e(),{isInteractive:j,minZoomReached:y,maxZoomReached:S,ariaLabelConfig:b}=Se(ly,Ne),{zoomIn:E,zoomOut:R,fitView:M}=Ft(),_=()=>{E(),i==null||i()},L=()=>{R(),l==null||l()},A=()=>{M(r),c==null||c()},$=()=>{h.setState({nodesDraggable:!j,nodesConnectable:!j,elementsSelectable:!j}),a==null||a(!j)},O=m==="horizontal"?"horizontal":"vertical";return o.jsxRuntimeExports.jsxs(to,{className:$e(["react-flow__controls",O,d]),position:p,style:e,"data-testid":"rf__controls","aria-label":f??b["controls.ariaLabel"],children:[t&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(ss,{onClick:_,className:"react-flow__controls-zoomin",title:b["controls.zoomIn.ariaLabel"],"aria-label":b["controls.zoomIn.ariaLabel"],disabled:S,children:o.jsxRuntimeExports.jsx(ny,{})}),o.jsxRuntimeExports.jsx(ss,{onClick:L,className:"react-flow__controls-zoomout",title:b["controls.zoomOut.ariaLabel"],"aria-label":b["controls.zoomOut.ariaLabel"],disabled:y,children:o.jsxRuntimeExports.jsx(sy,{})})]}),n&&o.jsxRuntimeExports.jsx(ss,{className:"react-flow__controls-fitview",onClick:A,title:b["controls.fitView.ariaLabel"],"aria-label":b["controls.fitView.ariaLabel"],children:o.jsxRuntimeExports.jsx(oy,{})}),s&&o.jsxRuntimeExports.jsx(ss,{className:"react-flow__controls-interactive",onClick:$,title:b["controls.interactive.ariaLabel"],"aria-label":b["controls.interactive.ariaLabel"],children:j?o.jsxRuntimeExports.jsx(iy,{}):o.jsxRuntimeExports.jsx(ry,{})}),x]})}Vu.displayName="Controls";g.memo(Vu);function cy({id:e,x:t,y:n,width:s,height:r,style:i,color:l,strokeColor:c,strokeWidth:a,className:d,borderRadius:x,shapeRendering:p,selected:m,onClick:f}){const{background:h,backgroundColor:j}=i||{},y=l||h||j;return o.jsxRuntimeExports.jsx("rect",{className:$e(["react-flow__minimap-node",{selected:m},d]),x:t,y:n,rx:x,ry:x,width:s,height:r,style:{fill:y,stroke:c,strokeWidth:a},shapeRendering:p,onClick:f?S=>f(S,e):void 0})}const ay=g.memo(cy),uy=e=>e.nodes.map(t=>t.id),Po=e=>e instanceof Function?e:()=>e;function dy({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:s=5,nodeStrokeWidth:r,nodeComponent:i=ay,onClick:l}){const c=Se(uy,Ne),a=Po(t),d=Po(e),x=Po(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:c.map(m=>o.jsxRuntimeExports.jsx(py,{id:m,nodeColorFunc:a,nodeStrokeColorFunc:d,nodeClassNameFunc:x,nodeBorderRadius:s,nodeStrokeWidth:r,NodeComponent:i,onClick:l,shapeRendering:p},m))})}function xy({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:s,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:l,NodeComponent:c,onClick:a}){const{node:d,x,y:p,width:m,height:f}=Se(h=>{const{internals:j}=h.nodeLookup.get(e),y=j.userNode,{x:S,y:b}=j.positionAbsolute,{width:E,height:R}=ht(y);return{node:y,x:S,y:b,width:E,height:R}},Ne);return!d||d.hidden||!Oa(d)?null:o.jsxRuntimeExports.jsx(c,{x,y:p,width:m,height:f,style:d.style,selected:!!d.selected,className:s(d),color:t(d),borderRadius:r,strokeColor:n(d),strokeWidth:i,shapeRendering:l,onClick:a,id:d.id})}const py=g.memo(xy);var my=g.memo(dy);const fy=200,hy=150,gy=e=>!e.hidden,jy=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Da(On(e.nodeLookup,{filter:gy}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Ey="react-flow__minimap-desc";function Fu({style:e,className:t,nodeStrokeColor:n,nodeColor:s,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:l,nodeComponent:c,bgColor:a,maskColor:d,maskStrokeColor:x,maskStrokeWidth:p,position:m="bottom-right",onClick:f,onNodeClick:h,pannable:j=!1,zoomable:y=!1,ariaLabel:S,inversePan:b,zoomStep:E=10,offsetScale:R=5}){const M=_e(),_=g.useRef(null),{boundingRect:L,viewBB:A,rfId:$,panZoom:O,translateExtent:V,flowWidth:z,flowHeight:k,ariaLabelConfig:C}=Se(jy,Ne),P=(e==null?void 0:e.width)??fy,v=(e==null?void 0:e.height)??hy,N=L.width/P,D=L.height/v,I=Math.max(N,D),F=I*P,H=I*v,Z=R*I,ee=L.x-(F-L.width)/2-Z,te=L.y-(H-L.height)/2-Z,se=F+Z*2,oe=H+Z*2,xe=`${Ey}-${$}`,J=g.useRef(0),ae=g.useRef();J.current=I,g.useEffect(()=>{if(_.current&&O)return ae.current=A5({domNode:_.current,panZoom:O,getTransform:()=>M.getState().transform,getViewScale:()=>J.current}),()=>{var le;(le=ae.current)==null||le.destroy()}},[O]),g.useEffect(()=>{var le;(le=ae.current)==null||le.update({translateExtent:V,width:z,height:k,inversePan:b,pannable:j,zoomStep:E,zoomable:y})},[j,y,b,E,V,z,k]);const je=f?le=>{var Le;const[ue,Me]=((Le=ae.current)==null?void 0:Le.pointer(le))||[0,0];f(le,{x:ue,y:Me})}:void 0,ge=h?g.useCallback((le,ue)=>{const Me=M.getState().nodeLookup.get(ue).internals.userNode;h(le,Me)},[]):void 0,W=S??C["minimap.ariaLabel"];return o.jsxRuntimeExports.jsx(to,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*I:void 0,"--xy-minimap-node-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:$e(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:o.jsxRuntimeExports.jsxs("svg",{width:P,height:v,viewBox:`${ee} ${te} ${se} ${oe}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":xe,ref:_,onClick:je,children:[W&&o.jsxRuntimeExports.jsx("title",{id:xe,children:W}),o.jsxRuntimeExports.jsx(my,{onClick:ge,nodeColor:s,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:r,nodeStrokeWidth:l,nodeComponent:c}),o.jsxRuntimeExports.jsx("path",{className:"react-flow__minimap-mask",d:`M${ee-Z},${te-Z}h${se+Z*2}v${oe+Z*2}h${-se-Z*2}z
|
|
39
|
-
M${A.x},${A.y}h${A.width}v${A.height}h${-A.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Fu.displayName="MiniMap";g.memo(Fu);const yy=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,Sy={[ln.Line]:"right",[ln.Handle]:"bottom-right"};function Ry({nodeId:e,position:t,variant:n=ln.Handle,className:s,style:r=void 0,children:i,color:l,minWidth:c=10,minHeight:a=10,maxWidth:d=Number.MAX_VALUE,maxHeight:x=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:m,autoScale:f=!0,shouldResize:h,onResizeStart:j,onResize:y,onResizeEnd:S}){const b=Eu(),E=typeof e=="string"?e:b,R=_e(),M=g.useRef(null),_=n===ln.Handle,L=Se(g.useCallback(yy(_&&f),[_,f]),Ne),A=g.useRef(null),$=t??Sy[n];g.useEffect(()=>{if(!(!M.current||!E))return A.current||(A.current=X5({domNode:M.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:V,transform:z,snapGrid:k,snapToGrid:C,nodeOrigin:P,domNode:v}=R.getState();return{nodeLookup:V,transform:z,snapGrid:k,snapToGrid:C,nodeOrigin:P,paneDomNode:v}},onChange:(V,z)=>{const{triggerNodeChanges:k,nodeLookup:C,parentLookup:P,nodeOrigin:v}=R.getState(),N=[],D={x:V.x,y:V.y},I=C.get(E);if(I&&I.expandParent&&I.parentId){const F=I.origin??v,H=V.width??I.measured.width??0,Z=V.height??I.measured.height??0,ee={id:I.id,parentId:I.parentId,rect:{width:H,height:Z,...za({x:V.x??I.position.x,y:V.y??I.position.y},{width:H,height:Z},I.parentId,C,F)}},te=zr([ee],C,P,v);N.push(...te),D.x=V.x?Math.max(F[0]*H,V.x):void 0,D.y=V.y?Math.max(F[1]*Z,V.y):void 0}if(D.x!==void 0&&D.y!==void 0){const F={id:E,type:"position",position:{...D}};N.push(F)}if(V.width!==void 0&&V.height!==void 0){const H={id:E,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:V.width,height:V.height}};N.push(H)}for(const F of z){const H={...F,type:"position"};N.push(H)}k(N)},onEnd:({width:V,height:z})=>{const k={id:E,type:"dimensions",resizing:!1,dimensions:{width:V,height:z}};R.getState().triggerNodeChanges([k])}})),A.current.update({controlPosition:$,boundaries:{minWidth:c,minHeight:a,maxWidth:d,maxHeight:x},keepAspectRatio:p,resizeDirection:m,onResizeStart:j,onResize:y,onResizeEnd:S,shouldResize:h}),()=>{var V;(V=A.current)==null||V.destroy()}},[$,c,a,d,x,p,j,y,S,h]);const O=$.split("-");return o.jsxRuntimeExports.jsx("div",{className:$e(["react-flow__resize-control","nodrag",...O,n,s]),ref:M,style:{...r,scale:L,...l&&{[_?"backgroundColor":"borderColor"]:l}},children:i})}g.memo(Ry);const Cy=(e,t)=>e.map((n,s)=>u.K.translate(n,t[s])),Hu=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(Qe,{path:wt(e),style:{stroke:u.od.cssString(t)},...n}),wy=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(Qe,{path:wt(e),style:{stroke:u.od.cssString(t),strokeDasharray:"12,4"},...n}),by=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(Qe,{path:wt(e),style:{stroke:u.od.cssString(t),strokeDasharray:"12,4,4"},...n}),vy=({points:e,color:t,...n})=>{const s=u.K.calculateMiters(e,6),r=e.map((a,d)=>u.K.translate(a,s[d])),i=e.map((a,d)=>u.K.translate(a,u.K.scale(s[d],-1))),l=u.od.cssString(t),c=.7;return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Qe,{path:wt(r),style:{stroke:l,opacity:c},...n}),o.jsxRuntimeExports.jsx(Qe,{path:wt(e),style:{stroke:l},...n}),o.jsxRuntimeExports.jsx(Qe,{path:wt(i),style:{stroke:l,opacity:c},...n})]})},Sl=5,ky=(e,t)=>{const n=[],s=[];for(let c=0;c<e.length-1;c++){const a=u.K.distance(e[c],e[c+1]);s.push(a)}const r=t;let i=0,l=r;for(let c=0;c<s.length;c++){const a=s[c],d=e[c],x=e[c+1];for(;i+a>=l;){const p=(l-i)/a,m={x:d.x+p*(x.x-d.x),y:d.y+p*(x.y-d.y)};let f="x";Math.abs(x.x-d.x)<1&&(f="y"),l+=r,!(u.K.distance(m,x)<Sl||u.K.distance(m,d)<Sl)&&n.push({position:m,direction:f})}i+=a}return n},My=({color:e,position:t,direction:n})=>{const r="M0,0 L0,-10 L10,-10";return n==="x"?t.y+=10/2:t.x+=10/2,o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.od.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(270)`,strokeLinecap:"round"})},Py=({color:e,position:t,direction:n})=>{const r="M0,0 L0,-10";n==="x"?t.y+=10/3:t.x-=10/3;let i=u.K.translateX(t,-10),l=45;return n==="y"&&(i=u.K.translateY(t,-10),l+=90),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.od.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(${l})`,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.od.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${i.x},${i.y}) rotate(${l})`,strokeLinecap:"round"})]})},_y=({color:e,position:t})=>o.jsxRuntimeExports.jsx("circle",{cx:t.x,cy:t.y,r:3,fill:"var(--pluto-gray-l0)",stroke:u.od.cssString(e),strokeWidth:2}),Fr=e=>{const t=({points:n,color:s,...r})=>{const i=wt(n),l=ky(n,40);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Qe,{path:i,...r,style:{stroke:u.od.cssString(s)}}),l.map(({position:c,direction:a},d)=>o.jsxRuntimeExports.jsx(e,{position:c,direction:a,color:s},d))]})};return t.displayName=`SymbolLine(${e.displayName})`,t},Ly=Fr(My),Ny=Fr(Py),Ty=Fr(_y),wt=e=>{let t="";const s=e.length+-1;for(let r=0;r<s;r++){const i=e[r%e.length],l=e[(r+1)%e.length],c=Math.min(6/Math.hypot(l.x-i.x,l.y-i.y),.5);r>0&&(t+=`Q${i.x},${i.y} ${i.x*(1-c)+l.x*c},${i.y*(1-c)+l.y*c}`),r===0?t+=`M${i.x},${i.y}`:r===0&&(t+=`M${i.x*(1-c)+l.x*c},${i.y*(1-c)+l.y*c}`),r===s-1?t+=`L${l.x},${l.y}`:r<s-1&&(t+=`L${i.x*c+l.x*(1-c)},${i.y*c+l.y*(1-c)}`)}return t},Zu={pipe:Hu,electric:wy,secondary:by,jacketed:vy,hydraulic:Ly,pneumatic:Ny,data:Ty},Ku=Hu,Wu=[{key:"pipe",name:"Pipe"},{key:"electric",name:"Electric Signal"},{key:"secondary",name:"Secondary"},{key:"jacketed",name:"Jacketed"},{key:"hydraulic",name:"Hydraulic"},{key:"pneumatic",name:"Pneumatic"},{key:"data",name:"Data"}],Ay=e=>o.jsxRuntimeExports.jsx(Os,{columns:[{key:"name",name:"Type"}],data:Wu,style:{width:200},entryRenderKey:"name",...e}),so=e=>{const t=document.querySelector(`[data-id="${e}"]`);if(t==null)throw new Error(`[diagram] - cannot find node with key: ${e}`);return t},Ve=(e,t)=>{const n=so(t),s=e.getNodes().find(r=>r.id===t);if(s==null)throw new Error(`[diagram] - cannot find node with key: ${t}`);return u.Pt.construct(s.position,u.A$1.scale(u.Pt.dims(u.Pt.construct(n)),1/e.getZoom()))},Iy=(e,t)=>oo.fromFlow(e,t);class Yu{constructor(t,n){tt(this,"node_",null);tt(this,"position");tt(this,"orientation");this.position=t,this.orientation=n}set node(t){this.node_=t}get node(){if(this.node_==null)throw new Error("[schematic] - handle has no node");return this.node_}get absolutePosition(){return u.K.translate(u.Pt.topLeft(this.node.box),this.position)}}class oo{constructor(t,n,s){tt(this,"key");tt(this,"box");tt(this,"handles");this.key=t,this.box=n,this.handles=s,s.forEach(r=>r.node=this)}static fromFlow(t,n){const s=Ve(n,t),r=so(t),i=r.getElementsByClassName("react-flow__handle"),l=u.Pt.construct(r),c=Array.from(i).map(a=>{const d=u.Pt.center(u.Pt.construct(a)),x=u.K.translation(u.Pt.topLeft(l),d),p=a.className.match(/react-flow__handle-(\w+)/);if(p==null)throw new Error("[schematic] - cannot find handle orientation");const m=u.K$1.construct(p[0]);return new Yu(x,m)});return new oo(t,s,c)}}const $y=({fromX:e,fromY:t,toX:n,toY:s,fromPosition:r,toPosition:i,fromNode:l,connectionLineStyle:c,connectionStatus:a})=>{const d=document.querySelector(".react-flow__handle-connecting"),x=d==null?void 0:d.className.match(/react-flow__handle-(\w+)/);if(x!=null){const h=u.K$1.outer.safeParse(x[1]);h.success&&(i=h.data)}const p=Ft(),m=qt({sourcePos:u.K.construct(e,t),targetPos:u.K.construct(n,s),sourceOrientation:r,targetOrientation:i,sourceBox:Ve(p,(l==null?void 0:l.id)??""),targetBox:Ve(p,(l==null?void 0:l.id)??"")}),f=Jc(u.K.construct(e,t),m,p.getZoom(),!1);return o.jsxRuntimeExports.jsx(Ku,{points:f,style:{...c,stroke:u.od.cssString(a==="invalid"?"var(--pluto-error-z)":"var(--pluto-gray-l11)"),strokeWidth:2,fill:"none"}})},By=({id:e,source:t,target:n,sourcePosition:s,targetHandleId:r,targetPosition:i,style:l,segments:c=[],onSegmentsChange:a,color:d="var(--pluto-gray-l11)",selected:x=!1,variant:p="pipe",...m})=>{const f=u.K.construct(m.sourceX,m.sourceY),h=g.useRef(f),j=u.K.equals(f,h.current),y=u.K.construct(m.targetX,m.targetY),S=g.useRef(y),b=u.K.equals(y,S.current),E=Ft(),[R,M,_]=K.useCombinedStateAndRef(()=>c.length>0?c:qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Ve(E,t),targetBox:Ve(E,n)})),L=g.useRef(i),A=g.useRef(s),$=tr.useDebouncedCallback(a,100,[a]);if(!j||!b){let C=R;const P=u.K.translation(h.current,f),v=u.K.translation(y,S.current);u.K.equals(P,u.K.scale(v,-1),.001)?(h.current=f,S.current=y):(j?b||(C=W0({delta:v,segments:C}),L.current!==i&&(L.current=i,C=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Ve(E,t),targetBox:Ve(E,n)})),ji({sourcePos:f,targetPos:y,next:C,prev:R})||(C=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Ve(E,t),targetBox:Ve(E,n)})),S.current=y):(C=K0({delta:P,segments:C}),A.current!==s&&(A.current=s,C=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Ve(E,t),targetBox:Ve(E,n)})),ji({sourcePos:f,targetPos:y,next:C,prev:R})||(C=qt({sourcePos:f,targetPos:y,sourceOrientation:s,targetOrientation:i,sourceBox:Ve(E,t),targetBox:Ve(E,n)})),h.current=f),$(C),M(C))}const O=g.useRef(null),V=Ge.useCursorDrag({onStart:g.useCallback((C,P,v)=>{O.current={index:Number(v.currentTarget.id.split("-")[1]),segments:[..._.current]}},[]),onMove:g.useCallback(C=>{if(O.current==null)return;const P=V0({segments:O.current.segments,index:O.current.index,magnitude:u.Pt.dim(C,u.g.swap(O.current.segments[O.current.index].direction),!0)/E.getZoom()});M(P)},[]),onEnd:g.useCallback(()=>a(_.current),[a])}),z=Jc(f,R,E.getZoom(),!0),k=Zu[p];return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(k,{points:z,color:d}),x&&Dy(z).map((C,P)=>{const v=R[P].direction,N=u.g.swap(v),D={[u.g.dimension(v)]:"18px",[u.g.dimension(N)]:"4px"},I={[v]:C[v]-9,[N]:C[N]-2};return o.jsxRuntimeExports.jsxs(g.Fragment,{children:[o.jsxRuntimeExports.jsx("rect",{className:u.CSS.BE("diagram-edge-handle","background"),fill:"var(--pluto-gray-l0)",stroke:"var(--pluto-primary-z)",...D,...I,rx:"2px",ry:"2px"}),o.jsxRuntimeExports.jsx("foreignObject",{x:C.x-9,y:C.y-9,width:"18px",height:"18px",children:o.jsxRuntimeExports.jsx("div",{id:`handle-${P}`,className:u.CSS(u.CSS.BE("diagram-edge-handle","dragger"),u.CSS.dir(v)),draggable:!0,onDragStart:V})})]},P)})]})},Dy=e=>e.slice(1).map((t,n)=>{const s=e[n];return u.K.construct((t.x+s.x)/2,(t.y+s.y)/2)}),Oy=({initialNodes:e,initialEdges:t,allowEdit:n=!0,initialViewport:s={position:u.K.ZERO,zoom:1}})=>{const[r,i]=g.useState(n),[l,c]=g.useState(e),[a,d]=g.useState(t),[x,p]=g.useState(s),[m,f]=g.useState(!1);return{viewport:x,onViewportChange:p,edges:a,nodes:l,onNodesChange:c,onEdgesChange:d,editable:r,onEditableChange:i,fitViewOnResize:m,setFitViewOnResize:f}},zy=()=>!0,Vy={nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,zoomOnDoubleClick:!1,nodeClickDistance:5,reconnectRadius:15,connectionRadius:30},Fy={connectionRadius:0,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!1,panOnScroll:!1,zoomOnScroll:!1,zoomOnDoubleClick:!1,zoomOnPinch:!1,edgesFocusable:!1,edgesReconnectable:!1,nodesFocusable:!1,reconnectRadius:0},Qo={maxZoom:1,minZoom:.5,padding:.05},Hy={hideAttribution:!0},Gu=g.createContext({editable:!0,visible:!0,onEditableChange:()=>{},registerNodeRenderer:()=>{},fitViewOnResize:!1,setFitViewOnResize:()=>{}}),Vn=()=>g.use(Gu),qu=g.memo(({children:e})=>{const{registerNodeRenderer:t}=Vn();return g.useEffect(()=>t(e),[t,e]),null});qu.displayName="NodeRenderer";const Zy=["Backspace","Delete"],Ky=({aetherKey:e,onNodesChange:t,onEdgesChange:n,nodes:s,edges:r,onEditableChange:i,editable:l,viewport:c,triggers:a,onViewportChange:d,fitViewOnResize:x,setFitViewOnResize:p,visible:m,dragHandleSelector:f,...h})=>{const j=Ae.useMemoDeepEqualProps({visible:m}),[{path:y},,S]=Q.use$1({aetherKey:e,type:B.Diagram$1.TYPE,schema:B.diagramStateZ,initialState:{position:c.position,region:u.Pt.ZERO,zoom:c.zoom,...j}}),{fitView:b}=Ft(),E=tr.useDebouncedCallback(W=>void b(W),50,[b]),R=In(g.useCallback(W=>{x&&E(Qo),S(le=>({...le,region:W}))},[S,E,x]));g.useEffect(()=>S(W=>({...W,...j})),[j]);const M=u.od.hex(Q.use().colors.gray.l11),_=Ae.useMemoCompare(()=>a??fr.zoom,De.compareModeConfigs,[a]),L=g.useRef(null),A=g.useCallback(W=>{const le=L.current;le!=null&&le.x===W.x&&le.y===W.y&&le.zoom===W.zoom||(L.current=W,!(isNaN(W.x)||isNaN(W.y)||isNaN(W.zoom))&&(S(ue=>({...ue,position:W,zoom:W.zoom})),d(oa(W))))},[S,d]);X4({onStart:A,onChange:A,onEnd:A});const[$,O]=g.useState(()=>()=>null),V=g.useCallback(W=>O(()=>W),[]),z=g.useMemo(()=>({custom:({id:W,positionAbsoluteX:le,positionAbsoluteY:ue,selected:Me=!1,draggable:Le=!0})=>$({symbolKey:W,position:{x:le,y:ue},selected:Me,draggable:Le})}),[$]),k=g.useRef(r),C=g.useMemo(()=>(k.current=r,kr(r)),[r]),P=g.useRef(s),v=g.useMemo(()=>(P.current=s,vr(s,f)),[s,f]),N=g.useCallback(W=>t(ra(P.current,le=>pu(W,le)),W),[t]),D=g.useCallback(W=>n(cs(k.current,le=>mu(W,le),M)),[n,M]),I=g.useCallback((W,le)=>n(cs(k.current,ue=>f5(W,le,ue),M)),[]),F=g.useCallback(W=>n(cs(k.current,le=>Ga(W,le),M)),[n,M]),H=g.useCallback((W,le)=>{const ue=[...k.current],Me=ue.findIndex(Le=>Le.key===W);Me!==-1&&(ue[Me]={...ue[Me],segments:le},k.current=ue,n(ue))},[n]),Z=l?Vy:Fy,ee=K.useSyncedRef(H),te=g.useMemo(()=>({default:W=>{var le,ue,Me;return o.jsxRuntimeExports.jsx(By,{...W,segments:((le=W.data)==null?void 0:le.segments)??[],color:(ue=W.data)==null?void 0:ue.color,variant:(Me=W.data)==null?void 0:Me.variant,onSegmentsChange:g.useCallback(Le=>ee.current(W.id,Le),[W.id])},W.id)}}),[]),se=g.useRef(null);De.use({triggers:_.zoomReset,callback:g.useCallback(({stage:W,cursor:le})=>{const ue=se.current;ue==null||W!=="start"||!u.Pt.contains(ue,le)||b()},[b])});const oe=De.purgeMouse(_.select)[0]??null,xe=De.purgeMouse(_.pan)[0]??null,J=De.purgeMouse(_.zoom)[0]??null,ae={selectionOnDrag:oe==null,panOnDrag:xe==null,selectionKeyCode:oe,panActivationKeyCode:xe,zoomActivationKeyCode:J},je=K.useCombinedRefs(se,R),ge=g.useMemo(()=>({visible:m,editable:l,onEditableChange:i,registerNodeRenderer:V,fitViewOnResize:x,setFitViewOnResize:p}),[l,m,i,V,x]);return o.jsxRuntimeExports.jsx(Gu,{value:ge,children:o.jsxRuntimeExports.jsx(Q.Composite,{path:y,children:m&&o.jsxRuntimeExports.jsx(G4,{...ae,className:u.CSS(u.CSS.B("diagram"),u.CSS.editable(l),u.CSS.BE("symbol","container")),nodes:v,edges:C,nodeTypes:z,edgeTypes:te,ref:je,fitView:!0,onNodesChange:N,onEdgesChange:D,onConnect:F,onReconnect:I,defaultViewport:sa(c),connectionLineComponent:$y,elevateEdgesOnSelect:!0,minZoom:.5,maxZoom:1.2,isValidConnection:zy,connectionMode:zt.Loose,fitViewOptions:Qo,selectionMode:nn.Partial,proOptions:Hy,deleteKeyCode:Zy,...h,style:{[u.CSS.var("diagram-zoom")]:c.zoom,...h.style},...Z,nodesDraggable:l})})})},Wy=()=>{const{editable:e}=Vn();return e?o.jsxRuntimeExports.jsx(ty,{}):null},Yy=e=>o.jsxRuntimeExports.jsx(Is.Pack,{borderShade:5,className:u.CSS.BE("diagram","controls"),...e}),Gy=({onClick:e,...t})=>{const{editable:n,onEditableChange:s}=Vn();return o.jsxRuntimeExports.jsx(fe.ToggleIcon,{onChange:()=>s(!n),value:n,uncheckedVariant:"outlined",checkedVariant:"filled",tooltipLocation:u.K$1.BOTTOM_LEFT,size:"small",tooltip:`${n?"Disable":"Enable"} editing`,...t,children:n?o.jsxRuntimeExports.jsx(K.y4.EditOff,{}):o.jsxRuntimeExports.jsx(K.y4.Edit,{})})},qy=({onClick:e,...t})=>{const{fitView:n}=Ft(),{fitViewOnResize:s,setFitViewOnResize:r}=Vn();return o.jsxRuntimeExports.jsx(fe.ToggleIcon,{onClick:i=>{n(Qo),e==null||e(i)},value:s,onChange:i=>r(i),rightClickToggle:!0,tooltip:o.jsxRuntimeExports.jsx(K.Text,{level:"small",children:"Fit view to contents"}),tooltipLocation:u.K$1.BOTTOM_LEFT,variant:"outlined",size:"small",...t,children:o.jsxRuntimeExports.jsx(K.y4.Expand,{})})},Xy=e=>o.jsxRuntimeExports.jsx(Ou,{children:o.jsxRuntimeExports.jsx(Ky,{...e})}),Uy=Object.freeze(Object.defineProperty({__proto__:null,Background:Wy,Controls:Yy,DefaultPath:Ku,Diagram:Xy,FitViewControl:qy,HandleLayout:Yu,NodeLayout:oo,NodeRenderer:qu,PATHS:Zu,PATH_TYPES:Wu,SelectPathType:Ay,ToggleEditControl:Gy,alignNodes:X0,calcPath:wt,edgeConverter:cs,edgeZ:G0,nodeConverter:ra,nodeZ:q0,offsetPath:Cy,rfEdgeDataZ:ea,selectNode:so,selectNodeBox:Ve,selectNodeLayout:Iy,translateEdgesBackward:na,translateEdgesForward:kr,translateNodesBackward:ta,translateNodesForward:vr,translateViewportBackward:oa,translateViewportForward:sa,use:Oy,useContext:Vn,viewportZ:Y0},Symbol.toStringTag,{value:"Module"})),Jy=({aetherKey:e,font:t,className:n,visible:s=!0,emptyContent:r=o.jsxRuntimeExports.jsx(Ce.Text.Centered,{level:"h3",variant:"disabled",hideIcon:!0,children:"Empty Log"}),color:i,telem:l,...c})=>{const a=Ae.useMemoDeepEqualProps({font:t,color:i,telem:l,visible:s}),[,{scrolling:d,empty:x},p]=Q.use$1({type:B.Log.TYPE,schema:B.logState,initialState:{empty:!0,region:u.Pt.ZERO,scrolling:!1,wheelPos:0,...a}});g.useEffect(()=>{p(f=>({...f,...a}))},[a,p]);const m=In(g.useCallback(f=>p(h=>({...h,region:f})),[p]));return o.jsxRuntimeExports.jsx("div",{ref:m,className:u.CSS(u.CSS.B("log"),n),onWheel:f=>{p(h=>({...h,wheelPos:h.wheelPos-f.deltaY,scrolling:h.scrolling?h.scrolling:f.deltaY<0}))},...c,children:x?r:o.jsxRuntimeExports.jsx(fe.Icon,{className:u.CSS(u.CSS.BE("log","live"),d&&u.CSS.M("active")),variant:"outlined",onClick:()=>p(f=>({...f,scrolling:!f.scrolling})),tooltip:d?"Resume Scrolling":"Pause Scrolling",tooltipLocation:u.K$1.BOTTOM_LEFT,children:o.jsxRuntimeExports.jsx(K.y4.Dynamic,{})})})},Qy=Object.freeze(Object.defineProperty({__proto__:null,Log:Jy},Symbol.toStringTag,{value:"Module"})),eS="Schematic.Grid",ro=u.CSS.B("drag-handle"),tS=e=>{const n=so(e).closest(".react-flow__pane");n!=null&&K.triggerReflow(n)},Fn=e=>{const t=({symbolKey:s,items:r,onLocationChange:i})=>{const l=`${s}.${eS}`,[c,a]=g.useState(!1),d=g.useMemo(()=>me.canDropOfType(l),[l]),x=K.useSyncedRef(i),{startDrag:p,onDragEnd:m,...f}=me.useDragAndDrop({type:l,canDrop:d,onDrop:g.useCallback(({items:S})=>(a(!1),S),[]),onDragOver:g.useCallback(S=>{const{items:b}=S;a(d(S)),b.forEach(({key:E})=>x.current(E,e))},[])}),h=r.filter(S=>S.location===e),j=g.useCallback((S,b)=>{p([{key:b,type:l}]),document.addEventListener("mousemove",m,{once:!0})},[p,l,m]),y=d(me.useDraggingState());return o.jsxRuntimeExports.jsx(ne.Space,{direction:u.K$1.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e),u.CSS.dropRegion(y),c&&u.CSS.B("dragging-over"),y&&u.CSS.B("dragging")),onDragLeave:()=>a(!1),empty:!0,...f,children:h.map(({element:S,key:b})=>o.jsxRuntimeExports.jsx(g.Fragment,{children:g.cloneElement(S,{draggable:!0,onDragStart:E=>j(E,b),onDragEnd:m,style:{...S.props.style,cursor:"grab"}})},b))})};return({symbolKey:s,...r})=>{const{editable:i,items:l}=r;if(i)return o.jsxRuntimeExports.jsx(t,{symbolKey:s,...r});const c=l.filter(a=>a.location===e);return c.length===0?null:o.jsxRuntimeExports.jsx(ne.Space,{direction:u.K$1.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e)),empty:!0,children:c.map(({element:a,key:d})=>o.jsxRuntimeExports.jsx(g.Fragment,{children:a},d))})}},nS=Fn("top"),sS=Fn("left"),oS=Fn("right"),rS=Fn("bottom"),iS=Fn("center"),Ht=({editable:e,allowRotate:t=!0,children:n,allowCenter:s,onRotate:r,symbolKey:i,...l})=>{const c=g.useRef(e);return e!==c.current&&(tS(i),c.current=e),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(nS,{editable:e,symbolKey:i,...l},`top-${i}`),o.jsxRuntimeExports.jsx(sS,{editable:e,symbolKey:i,...l},`left-${i}`),o.jsxRuntimeExports.jsx(oS,{editable:e,symbolKey:i,...l},`right-${i}`),o.jsxRuntimeExports.jsx(rS,{editable:e,symbolKey:i,...l},`bottom-${i}`),s&&o.jsxRuntimeExports.jsx(iS,{editable:e,symbolKey:i,...l},`center-${i}`),e&&t&&o.jsxRuntimeExports.jsx(fe.Icon,{className:u.CSS.BE("grid","rotate"),size:"small",variant:"filled",onClick:r,children:o.jsxRuntimeExports.jsx(K.y4.Rotate,{})}),o.jsxRuntimeExports.jsx("div",{className:ro,children:n})]})},lt=(e,t)=>{const n={};t.forEach(r=>n[r]=void 0);const s=r=>{const{...i}={...r,...n};return o.jsxRuntimeExports.jsx(e,{...i})};return s.displayName=`RemoveProps(${e.displayName})`,s},lS=({value:e,hideOuter:t=!1,showOuterCenter:n=!1,hideInner:s,onChange:r})=>{const{outer:i}=e,l=c=>()=>r({...e,...c});return t?o.jsxRuntimeExports.jsx(Rl,{className:u.CSS.B("orientation-control"),value:e,onChange:r}):o.jsxRuntimeExports.jsxs(ne.Space,{className:u.CSS.B("orientation-control"),align:"center",justify:"center",size:"tiny",children:[o.jsxRuntimeExports.jsx(at,{selected:i==="top",onClick:l({outer:"top"})}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",justify:"center",size:"tiny",children:[o.jsxRuntimeExports.jsx(at,{selected:i==="left",onClick:l({outer:"left"})}),o.jsxRuntimeExports.jsx(Rl,{hideInner:s,value:e,onChange:r,showOuterCenter:n}),o.jsxRuntimeExports.jsx(at,{selected:i==="right",onClick:l({outer:"right"})})]}),o.jsxRuntimeExports.jsx(at,{selected:i==="bottom",onClick:l({outer:"bottom"})})]})},Rl=({value:e,onChange:t,className:n,hideInner:s=!1,showOuterCenter:r=!1,...i})=>{const{inner:l}=e,c=x=>()=>t({...e,...x});let a={};s&&(a={opacity:0,userSelect:"none",width:"1.5rem",height:"1.5rem"});let d=null;return r?d=o.jsxRuntimeExports.jsx(at,{selected:e.outer==="center",onClick:c({outer:"center"})}):d=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(at,{style:a,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:l==="top",onClick:c({inner:"top"})}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"center",justify:"center",children:[o.jsxRuntimeExports.jsx(at,{style:a,disabled:s,selected:l==="left",onClick:c({inner:"left"})}),o.jsxRuntimeExports.jsx(at,{style:a,disabled:s,selected:l==="right",onClick:c({inner:"right"})})]}),o.jsxRuntimeExports.jsx(at,{style:a,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:l==="bottom",onClick:c({inner:"bottom"})})]}),o.jsxRuntimeExports.jsx(ne.Space,{className:u.CSS(n,u.CSS.B("value"),r&&u.CSS.M("show-outer-center")),y:!0,align:"center",justify:"center",empty:!0,...i,children:d})},at=({selected:e,className:t,...n})=>o.jsxRuntimeExports.jsx(fe.Icon,{variant:"text",className:u.CSS(t,u.CSS.selected(e)),...n,children:o.jsxRuntimeExports.jsx("div",{className:"symbol"})}),ze=({className:e,direction:t,...n})=>o.jsxRuntimeExports.jsx(ne.Space,{direction:t,align:"stretch",className:u.CSS(u.CSS.B("symbol-form"),e),size:t==="x"?"large":"medium",...n}),_t=({hideOuter:e,hideInner:t,showOuterCenter:n,...s})=>t&&e?null:o.jsxRuntimeExports.jsx(we,{label:"Orientation",padHelpText:!1,...s,children:({value:r,onChange:i})=>{var l;return o.jsxRuntimeExports.jsx(lS,{value:{inner:r.orientation??"top",outer:((l=r.label)==null?void 0:l.orientation)??"top"},hideInner:t,hideOuter:e,showOuterCenter:n,onChange:c=>i({...r,orientation:c.inner,label:{...r.label,orientation:c.outer}})})}}),gt=({path:e,omit:t=[]})=>o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(we,{path:`${e}.label`,label:"Label",padHelpText:!1,grow:!0,children:n=>o.jsxRuntimeExports.jsx(pt.Text,{selectOnFocus:!0,...n})}),o.jsxRuntimeExports.jsx(Ze,{visible:!t.includes("maxInlineSize"),style:{maxWidth:125},path:`${e}.maxInlineSize`,hideIfNull:!0,label:"Label Wrap Width",inputProps:{endContent:"px",dragScale:{x:1,y:.5}},padHelpText:!1}),o.jsxRuntimeExports.jsx(we,{hideIfNull:!0,visible:!t.includes("level"),path:`${e}.level`,label:"Label Size",padHelpText:!1,children:n=>o.jsxRuntimeExports.jsx(un,{...n})}),o.jsxRuntimeExports.jsx(we,{visible:!t.includes("align"),path:`${e}.align`,label:"Label Alignment",padHelpText:!1,hideIfNull:!0,children:n=>o.jsxRuntimeExports.jsx(zs,{...n})}),o.jsxRuntimeExports.jsx(we,{visible:!t.includes("direction"),path:`${e}.direction`,label:"Label Direction",padHelpText:!1,hideIfNull:!0,children:n=>o.jsxRuntimeExports.jsx(ic,{...n,yDirection:"down"})})]}),He=e=>o.jsxRuntimeExports.jsx(we,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n,variant:s,...r})=>o.jsxRuntimeExports.jsx(Ge.Swatch,{value:t??u.od.setAlpha(u.od.ZERO,1),onChange:n,...r,bordered:!0})}),Xu=e=>o.jsxRuntimeExports.jsx(we,{hideIfNull:!0,label:"Scale",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(he.Numeric,{dragScale:{x:.75,y:.5},bounds:{lower:50,upper:1e3},endContent:"%",value:Math.round(t*100),onChange:s=>n(parseFloat((s/100).toFixed(2)))})}),pe=({omit:e,hideInnerOrientation:t,hideOuterOrientation:n})=>o.jsxRuntimeExports.jsxs(ze,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(gt,{omit:e,path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color",optional:!0}),o.jsxRuntimeExports.jsx(we,{path:"normallyOpen",label:"Normally Open",padHelpText:!1,hideIfNull:!0,optional:!0,children:s=>o.jsxRuntimeExports.jsx(Q.Switch$1,{...s})}),o.jsxRuntimeExports.jsx(Xu,{path:"scale"})]})]}),o.jsxRuntimeExports.jsx(_t,{path:"",hideInner:t,hideOuter:n})]}),cS=({path:e})=>{var d,x;const{value:t,onChange:n}=Mt({path:e}),s=B.sourcePipelinePropsZ.parse((d=t.source)==null?void 0:d.props),r=B.sinkPipelinePropsZ.parse((x=t.sink)==null?void 0:x.props),i=B.streamChannelValuePropsZ.parse(s.segments.valueStream.props),l=B.setChannelValuePropsZ.parse(r.segments.setter.props),c=p=>{p??(p=0);const m=B.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:B.streamChannelValue({channel:p}),threshold:B.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"});n({...t,source:m})},a=p=>{p??(p=0);const m=B.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:B.setChannelValue({channel:p}),setpoint:B.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),f=B.authoritySource({channel:p}),h=B.acquireChannelControl({channel:p,authority:255});n({...t,sink:m,control:{showChip:!0,showIndicator:!0,...t.control,chip:{sink:h,source:f},indicator:{statusSource:f}}})};return o.jsxRuntimeExports.jsxs(ze,{x:!0,grow:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(he.Item,{label:"State Channel",grow:!0,children:o.jsxRuntimeExports.jsx($t,{value:i.channel,onChange:c})}),o.jsxRuntimeExports.jsx(he.Item,{label:"Command Channel",grow:!0,children:o.jsxRuntimeExports.jsx($t,{value:l.channel,onChange:a})}),o.jsxRuntimeExports.jsx(Fs,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},Hr=[{tabKey:"style",name:"Style"},{tabKey:"control",name:"Control"}],be=({hideInnerOrientation:e})=>{const t=g.useCallback(({tabKey:s})=>{switch(s){case"control":return o.jsxRuntimeExports.jsx(cS,{path:""});default:return o.jsxRuntimeExports.jsx(pe,{hideInnerOrientation:e})}},[e]),n=Te.useStatic({tabs:Hr,content:t});return o.jsxRuntimeExports.jsx(Te.Tabs,{...n})},yt={y:2,x:.25},Cn={lower:0,upper:2e3},Cl={lower:0,upper:51},Uu=({includeBorderRadius:e=!1,includeStrokeWidth:t=!1})=>o.jsxRuntimeExports.jsxs(ze,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(gt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(He,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(we,{path:"borderRadius.x",hideIfNull:!0,optional:!0,label:"X Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(he.Numeric,{dragScale:yt,bounds:Cl,endContent:"%",...n})}),o.jsxRuntimeExports.jsx(we,{path:"borderRadius.y",hideIfNull:!0,optional:!0,label:"Y Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(he.Numeric,{dragScale:yt,bounds:Cl,endContent:"%",...n})}),e&&o.jsxRuntimeExports.jsx(we,{path:"borderRadius",hideIfNull:!0,optional:!0,label:"Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(he.Numeric,{dragScale:yt,bounds:Cn,endContent:"px",...n})}),t&&o.jsxRuntimeExports.jsx(we,{path:"strokeWidth",hideIfNull:!0,optional:!0,label:"Border Width",grow:!0,children:n=>o.jsxRuntimeExports.jsx(he.Numeric,{dragScale:yt,bounds:{lower:0,upper:21},endContent:"px",...n})}),o.jsxRuntimeExports.jsx(we,{path:"dimensions.width",label:"Width",grow:!0,children:({value:n,...s})=>o.jsxRuntimeExports.jsx(he.Numeric,{value:n??200,dragScale:yt,bounds:Cn,endContent:"px",...s})}),o.jsxRuntimeExports.jsx(we,{path:"dimensions.height",label:"Height",grow:!0,children:({value:n,...s})=>o.jsxRuntimeExports.jsx(he.Numeric,{value:n??200,dragScale:yt,bounds:Cn,endContent:"px",...s})})]})]}),o.jsxRuntimeExports.jsx(_t,{path:"",hideInner:!0,showOuterCenter:!0,label:"Label Location"})]}),aS=()=>o.jsxRuntimeExports.jsx(ze,{direction:"x",align:"stretch",children:o.jsxRuntimeExports.jsxs(ne.Space,{direction:"y",grow:!0,children:[o.jsxRuntimeExports.jsx(gt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{direction:"x",children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(He,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(Ze,{path:"rotation",label:"Rotation",inputProps:{dragScale:{x:1,y:.25},bounds:{lower:0,upper:360},endContent:"°"},grow:!0}),o.jsxRuntimeExports.jsx(Ze,{path:"numSides",label:"Number of Sides",inputProps:{dragScale:{x:.5,y:.1},bounds:{lower:3,upper:21}},grow:!0}),o.jsxRuntimeExports.jsx(Ze,{path:"sideLength",label:"Side Length",inputProps:{dragScale:{x:1,y:1},bounds:{lower:10,upper:500},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(Ze,{path:"cornerRounding",label:"Corner Rounding",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:181},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(Ze,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),uS=()=>o.jsxRuntimeExports.jsx(ze,{direction:"x",align:"stretch",children:o.jsxRuntimeExports.jsxs(ne.Space,{direction:"y",grow:!0,children:[o.jsxRuntimeExports.jsx(gt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{direction:"x",children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(He,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(Ze,{path:"radius",label:"Radius",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:500},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(Ze,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),Ju=[{tabKey:"style",name:"Style"},{tabKey:"telemetry",name:"Telemetry"}],dS=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return o.jsxRuntimeExports.jsxs(ze,{y:!0,empty:!0,children:[o.jsxRuntimeExports.jsx(wr,{path:""}),";"]});default:return o.jsxRuntimeExports.jsxs(ze,{x:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(gt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(we,{path:"units",label:"Units",align:"start",padHelpText:!1,children:s=>o.jsxRuntimeExports.jsx(pt.Text,{...s})}),o.jsxRuntimeExports.jsx(Ze,{path:"inlineSize",label:"Value Width",hideIfNull:!0,inputProps:{dragScale:{x:1,y:.25},bounds:{lower:40,upper:500},endContent:"px"}}),o.jsxRuntimeExports.jsx(we,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:s=>o.jsxRuntimeExports.jsx(un,{...s})})]})]}),o.jsxRuntimeExports.jsx(_t,{path:"",hideInner:!0})]})}},[]),t=Te.useStatic({tabs:Ju,content:e});return o.jsxRuntimeExports.jsx(Te.Tabs,{...t})},xS=({path:e})=>{var d;const{value:t,onChange:n}=Mt({path:e}),s=B.sourcePipelinePropsZ.parse((d=t.source)==null?void 0:d.props),r=B.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=B.withinBoundsProps.parse(s.segments.threshold.props),l=x=>{x??(x=0);const p=B.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:B.streamChannelValue({channel:x}),threshold:B.withinBounds({trueBound:{lower:i.trueBound.lower??.9,upper:i.trueBound.upper??1.1}})},outlet:"threshold"});n({...t,source:p})},c=x=>{const p=B.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:B.streamChannelValue({channel:r.channel}),threshold:B.withinBounds({trueBound:x})},outlet:"threshold"});n({...t,source:p})},a=Bs(r.channel);return g.useEffect(()=>n({...t}),[a]),o.jsxRuntimeExports.jsxs(ze,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(he.Item,{label:"Input Channel",grow:!0,children:o.jsxRuntimeExports.jsx($t,{value:r.channel,onChange:l})}),o.jsxRuntimeExports.jsx(he.Item,{label:"Lower Threshold",children:o.jsxRuntimeExports.jsx(he.Numeric,{value:i.trueBound.lower??.9,onChange:x=>c({...i.trueBound,lower:x})})}),o.jsxRuntimeExports.jsx(he.Item,{label:"Upper Threshold",children:o.jsxRuntimeExports.jsx(he.Numeric,{value:i.trueBound.upper??1.1,onChange:x=>c({...i.trueBound,upper:x})})})]})},pS=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return o.jsxRuntimeExports.jsx(xS,{path:""});default:return o.jsxRuntimeExports.jsx(pe,{})}},[]),t=Te.useStatic({tabs:Ju,content:e});return o.jsxRuntimeExports.jsx(Te.Tabs,{...t})},mS=_c({fieldProps:{label:"Mode"},inputProps:{entryRenderKey:"name",tooltipKey:"tooltip",tooltipLocation:u.K$1.TOP_RIGHT,data:[{key:"fire",name:"Fire",tooltip:"Output true when clicked"},{key:"momentary",name:"Momentary",tooltip:"Output true on press, false on release"},{key:"pulse",name:"Pulse",tooltip:"Output true and then immediately output false on click"}],allowNone:!1}}),fS=({path:e})=>{var l;const{value:t,onChange:n}=Mt({path:e}),s=B.sinkPipelinePropsZ.parse((l=t.sink)==null?void 0:l.props),r=B.setChannelValuePropsZ.parse(s.segments.setter.props),i=c=>{c??(c=0);const a=B.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:B.setChannelValue({channel:c}),setpoint:B.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),d=B.authoritySource({channel:c}),x=B.acquireChannelControl({channel:c,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:x,source:d},showIndicator:!0,indicator:{statusSource:d}}})};return o.jsxRuntimeExports.jsxs(ze,{y:!0,empty:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(he.Item,{label:"Output Channel",grow:!0,padHelpText:!1,children:o.jsxRuntimeExports.jsx($t,{value:r.channel,onChange:i})}),o.jsxRuntimeExports.jsx(Ze,{label:"Activation Delay",path:"onClickDelay",inputProps:{endContent:"ms"},hideIfNull:!0,padHelpText:!1}),o.jsxRuntimeExports.jsx(Fs,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0,padHelpText:!1})]}),o.jsxRuntimeExports.jsx(mS,{path:"mode",optional:!0,defaultValue:"fire"})]})},hS=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"control":return o.jsxRuntimeExports.jsx(fS,{path:""});default:return o.jsxRuntimeExports.jsx(pe,{omit:["align","maxInlineSize"],hideInnerOrientation:!0,hideOuterOrientation:!0})}},[]),t=Te.useStatic({tabs:Hr,content:e});return o.jsxRuntimeExports.jsx(Te.Tabs,{...t})},gS=({path:e})=>{var l;const{value:t,onChange:n}=Mt({path:e}),s=B.sinkPipelinePropsZ.parse((l=t.sink)==null?void 0:l.props),r=B.setChannelValuePropsZ.parse(s.segments.setter.props),i=c=>{c??(c=0);const a=B.sinkPipeline("number",{connections:[],segments:{setter:B.setChannelValue({channel:c})},inlet:"setter"}),d=B.authoritySource({channel:c}),x=B.acquireChannelControl({channel:c,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:x,source:d},showIndicator:!0,indicator:{statusSource:d}},disabled:c==0})};return o.jsxRuntimeExports.jsx(ze,{x:!0,grow:!0,align:"stretch",children:o.jsxRuntimeExports.jsx(he.Item,{label:"Command Channel",grow:!0,children:o.jsxRuntimeExports.jsx($t,{value:r.channel,onChange:i})})})},jS=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"control":return o.jsxRuntimeExports.jsx(gS,{path:""});default:return o.jsxRuntimeExports.jsxs(ze,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,align:"stretch",grow:!0,size:"small",children:[o.jsxRuntimeExports.jsx(gt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(gr,{path:"units",label:"Units",align:"start",padHelpText:!1}),o.jsxRuntimeExports.jsx(we,{path:"size",label:"Size",hideIfNull:!0,padHelpText:!1,children:s=>o.jsxRuntimeExports.jsx(oc,{...s})}),o.jsxRuntimeExports.jsx(He,{path:"color"})]})]}),o.jsxRuntimeExports.jsx(_t,{path:"",hideInner:!0})]})}},[]),t=Te.useStatic({tabs:Hr,content:e});return o.jsxRuntimeExports.jsx(Te.Tabs,{...t})},ES=()=>{const e=Mt({path:"autoFit",optional:!0});return o.jsxRuntimeExports.jsxs(ze,{x:!0,align:"stretch",grow:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(we,{path:"value",label:"Text",padHelpText:!1,grow:!0,children:t=>o.jsxRuntimeExports.jsx(pt.Text,{...t})}),o.jsxRuntimeExports.jsx(we,{path:"level",label:"Text Size",padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(un,{...t})}),o.jsxRuntimeExports.jsx(we,{path:"align",label:"Alignment",padHelpText:!1,hideIfNull:!0,children:t=>o.jsxRuntimeExports.jsx(zs,{...t})})]}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(we,{onChange:(t,{set:n})=>n("autoFit",!1),path:"width",label:"Wrap Width",padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(he.Numeric,{...t,bounds:{lower:0,upper:2e3},dragScale:5,endContent:"px",children:o.jsxRuntimeExports.jsx(fe.Icon,{onClick:()=>e==null?void 0:e.onChange(!0),disabled:(e==null?void 0:e.value)===!0,variant:"outlined",tooltip:(e==null?void 0:e.value)===!0?"Manually enter value to disable auto fit":"Enable auto fit",children:o.jsxRuntimeExports.jsx(K.y4.AutoFitWidth,{})})})})]})]}),o.jsxRuntimeExports.jsx(_t,{path:""})]})},yS=()=>o.jsxRuntimeExports.jsxs(ze,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(gt,{path:"label",omit:["maxInlineSize","align","direction"]}),o.jsxRuntimeExports.jsx(He,{path:"color"})]}),o.jsxRuntimeExports.jsx(_t,{path:"",hideOuter:!0})]}),SS=()=>o.jsxRuntimeExports.jsxs(ze,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(gt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(He,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(we,{path:"dimensions.width",label:"Width",grow:!0,children:({value:e,...t})=>o.jsxRuntimeExports.jsx(he.Numeric,{value:e??200,dragScale:yt,bounds:Cn,endContent:"px",...t})}),o.jsxRuntimeExports.jsx(we,{path:"dimensions.height",label:"Height",grow:!0,children:({value:e,...t})=>o.jsxRuntimeExports.jsx(he.Numeric,{value:e??200,dragScale:yt,bounds:Cn,endContent:"px",...t})})]})]}),o.jsxRuntimeExports.jsx(_t,{path:"",hideInner:!0})]}),Zt=()=>o.jsxRuntimeExports.jsxs(ze,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(ne.Space,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(gt,{path:"label"}),o.jsxRuntimeExports.jsxs(ne.Space,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(He,{path:"color"}),o.jsxRuntimeExports.jsx(Xu,{path:"scale"}),o.jsxRuntimeExports.jsx(Fs,{path:"clickable",label:"Clickable",hideIfNull:!0,optional:!0})]})]}),o.jsxRuntimeExports.jsx(_t,{path:""})]}),RS=()=>o.jsxRuntimeExports.jsx(Uu,{includeBorderRadius:!0,includeStrokeWidth:!0}),CS=()=>o.jsxRuntimeExports.jsx(be,{hideInnerOrientation:!0}),T=e=>o.jsxRuntimeExports.jsx("path",{vectorEffect:"non-scaling-stroke",...e}),Re=e=>o.jsxRuntimeExports.jsx("rect",{vectorEffect:"non-scaling-stroke",...e}),Ie=e=>o.jsxRuntimeExports.jsx("circle",{vectorEffect:"non-scaling-stroke",...e}),Ee=e=>o.jsxRuntimeExports.jsx("line",{vectorEffect:"non-scaling-stroke",...e}),wS={left:{left:U.Left,right:U.Right,top:U.Top,bottom:U.Bottom},right:{left:U.Right,right:U.Left,top:U.Bottom,bottom:U.Top},top:{left:U.Bottom,right:U.Top,top:U.Left,bottom:U.Right},bottom:{left:U.Top,right:U.Bottom,top:U.Right,bottom:U.Left}},bS=(e,t)=>wS[t][e],vS=(e,t=!1)=>{if(t)return e;switch(e){case U.Left:return U.Right;case U.Right:return U.Left;case U.Top:return U.Bottom;case U.Bottom:return U.Top;default:return U.Top}},kS=(e,t,n,s=!1)=>s?{left:t,top:e}:n==="left"?{top:e,left:t}:n==="right"?{top:100-e,left:100-t}:n==="top"?{top:100-t,left:e}:{top:t,left:100-e},G=({children:e,orientation:t,refreshDeps:n})=>{let s;try{s=q4()}catch{return null}const r=g.useRef(null),i=g.useRef(!0);return g.useEffect(()=>{if(r.current==null)return;if(i.current){i.current=!1;return}const l=r.current.closest(".react-flow__node"),c=l==null?void 0:l.getAttribute("data-id");c!=null&&(s==null||s(c))},[t,n]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("span",{ref:r}),e]})},w=({location:e,orientation:t,preventAutoAdjust:n,left:s,swap:r,top:i,style:l,...c})=>{const a=kS(i,s,t,n);return o.jsxRuntimeExports.jsx(Tn,{position:vS(bS(e,t),!r),...c,type:"source",onClick:d=>d.stopPropagation(),className:(u.CSS.B("handle"),u.CSS.BE("handle",c.id)),style:{left:`${a.left}%`,top:`${a.top}%`,...l}})},ye=({className:e,enabled:t=!1,triggered:n=!1,orientation:s="left",color:r,...i})=>o.jsxRuntimeExports.jsx("button",{className:u.CSS(u.CSS.B("symbol-primitive"),u.CSS.B("symbol-primitive-toggle"),s!=null&&u.CSS.loc(s),t&&u.CSS.M("enabled"),n&&u.CSS.M("triggered"),e),color:u.od.cssString(r),...i}),re=({className:e,...t})=>o.jsxRuntimeExports.jsx("div",{className:u.CSS(u.CSS.B("symbol-primitive"),e),...t}),MS=.8,X=({dimensions:e,orientation:t="left",children:n,className:s,color:r,style:i={},scale:l=1,...c})=>{e=u.g.construct(t)==="y"?u.A$1.swap(e):e;const d=u.od.cssString(r),x=Q.use();let p={...i,aspectRatio:`${e.width} / ${e.height}`,width:u.A$1.scale(e,l*MS).width};return r!=null&&(p={...p,[u.CSS.var("symbol-color")]:u.od.rgbString(r),[u.CSS.var("symbol-color-contrast")]:u.od.rgbString(u.od.pickByContrast(r,x.colors.gray.l0,x.colors.gray.l11))}),o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:u.A$1.svgViewBox(e),className:u.CSS(u.CSS.loc(t),s),fill:d,stroke:d,...c,style:p,children:o.jsxRuntimeExports.jsx("g",{children:n})})},Qu=({className:e,orientation:t="left",scale:n,color:s,...r})=>{const i=u.od.cssString(s);return o.jsxRuntimeExports.jsxs(ye,{...r,orientation:t,className:u.CSS(u.CSS.B("four-way-valve"),e),children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:12.037,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:87.963,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:7.2916,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:92.6084,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:108,height:96},color:s,scale:n,children:[o.jsxRuntimeExports.jsx(T,{d:"M3.02937 72.7038C2.50936 73.1041 2.50936 73.8883 3.02937 74.2886L7.14001 77.453C7.79757 77.9592 8.75 77.4904 8.75 76.6606V70.3318C8.75 69.502 7.79757 69.0332 7.14001 69.5394L3.02937 72.7038Z",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M54.2 48L17.0545 29.2035C15.059 28.1937 12.7 29.6438 12.7 31.8803V64.1197C12.7 66.3562 15.059 67.8063 17.0545 66.7965L54.2 48ZM54.2 48L91.3455 29.2035C93.341 28.1937 95.7 29.6438 95.7 31.8803V64.1197C95.7 66.3562 93.341 67.8063 91.3455 66.7965L54.2 48Z"}),o.jsxRuntimeExports.jsx(T,{d:"M54.2 48L35.4035 85.1455C34.3937 87.141 35.8439 89.5 38.0803 89.5H70.3197C72.5562 89.5 74.0063 87.141 72.9965 85.1455L54.2 48ZM54.2 48L35.4035 10.8545C34.3937 8.85901 35.8439 6.5 38.0803 6.5H70.3197C72.5562 6.5 74.0063 8.85901 72.9965 10.8545L54.2 48Z"}),o.jsxRuntimeExports.jsx(T,{d:"M8.70001 73.5C24.7 73.5 28.7 86.8333 28.7 93.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M105.371 23.2962C105.891 22.8959 105.891 22.1117 105.371 21.7114L101.26 18.547C100.602 18.0408 99.65 18.5096 99.65 19.3394V25.6682C99.65 26.498 100.602 26.9668 101.26 26.4606L105.371 23.2962Z",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M99.7 22.5C83.7 22.5 79.7 9.16667 79.7 2.5",strokeLinecap:"round"})]})]})},ed=({color:e,orientation:t="left",scale:n,...s})=>o.jsxRuntimeExports.jsxs(ye,{...s,className:u.CSS(u.CSS.B("three-way-valve")),orientation:t,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50,top:97.0278,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:33.1308,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:33.1308,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:64},color:e,orientation:t,scale:n,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(T,{d:"M44.3923 22.3611C44.0222 21.6298 42.9778 21.6298 42.6077 22.3611L24.7035 57.7433C23.6937 59.7388 25.1438 62.0978 27.3803 62.0978L59.6197 62.0978C61.8562 62.0978 63.3063 59.7388 62.2965 57.7433L44.3923 22.3611Z"})]})]}),td=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(ye,{...s,children:[o.jsxRuntimeExports.jsxs(G,{orientation:e,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:e,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:e,left:97.7701,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:87,height:42},color:t,orientation:e,scale:n,children:o.jsxRuntimeExports.jsx(T,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"})})]}),nd=({className:e,color:t,orientation:n="left",normallyOpen:s=!1,scale:r,...i})=>o.jsxRuntimeExports.jsxs(ye,{className:u.CSS(u.CSS.B("solenoid-valve"),s&&u.CSS.M("normally-open"),e),...i,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:69.5652,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:69.5652,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:33.3333,top:17.7778,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:2.8986,id:"4"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:66.6667,top:17.7778,id:"5"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:69},color:t,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(T,{className:u.CSS.B("body"),d:"M43.5 48L6.35453 29.2035C4.35901 28.1937 2 29.6438 2 31.8803V64.1197C2 66.3562 4.35901 67.8063 6.35453 66.7965L43.5 48ZM43.5 48L80.6455 29.2035C82.641 28.1937 85 29.6438 85 31.8803V64.1197C85 66.3562 82.641 67.8063 80.6455 66.7965L43.5 48Z"}),o.jsxRuntimeExports.jsx(Ee,{x1:43.5,x2:43.5,y1:24.5333,y2:48}),o.jsxRuntimeExports.jsx(Re,{x:"29",y:"2",width:"29",height:"22.5333",rx:"1"})]})]}),sd=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{className:u.CSS(u.CSS.B("relief-valve"),e),enabled:r,...i,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:63.7931,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:63.7931,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:58},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 37L6.35453 18.2035C4.35901 17.1937 2 18.6438 2 20.8803V53.1197C2 55.3562 4.35901 56.8063 6.35453 55.7965L43.5 37ZM43.5 37L80.6455 18.2035C82.641 17.1937 85 18.6438 85 20.8803V53.1197C85 55.3562 82.641 56.8063 80.6455 55.7965L43.5 37Z"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 2 L43.5 37",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31.8011 14.0802L55.1773 4.29611",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31.8011 20.0802L55.1773 10.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31.8011 26.0802L55.1773 16.2961",strokeLinecap:"round"})]})]}),od=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{orientation:t,className:u.CSS(u.CSS.B("check-valve"),e),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:4.2222,top:48.8372,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:94.2038,top:48.8372,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:45,height:43},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Ee,{x1:"42.3917",y1:"2",x2:"42.3917",y2:"41",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M41.6607 21.8946C42.3917 21.5238 42.3906 20.4794 41.6589 20.1101L6.25889 2.2412C4.26237 1.23341 1.90481 2.68589 1.90704 4.92235L1.93925 37.1617C1.94148 39.3982 4.30194 40.846 6.29644 39.8342L41.6607 21.8946Z"})]})]}),rd=({className:e,orientation:t="left",color:n,scale:s,...r})=>{const i=u.od.cssString(n);return o.jsxRuntimeExports.jsxs(re,{...r,orientation:t,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:8.3333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.4286,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:84,height:42},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Ie,{cx:"7",cy:"7",r:"4",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M7 39.5V11.5941C7 9.42886 9.22384 7.97669 11.2063 8.84738L76.7937 37.6526C78.7762 38.5233 81 37.0711 81 34.9059V6",strokeLinecap:"round"})]})]})},id=({className:e,orientation:t="left",color:n,scale:s,...r})=>{const i=u.od.cssString(n);return o.jsxRuntimeExports.jsxs(re,{orientation:t,className:u.CSS(u.CSS.B("check-valve-with-arrow"),e),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:8.602,top:60.65,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.775,top:60.65,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:93,height:57},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M67.4706 5.20759C67.9906 5.6079 67.9906 6.3921 67.4706 6.79241L63.36 9.95678C62.7024 10.463 61.75 9.99421 61.75 9.16437V2.83563C61.75 2.00579 62.7024 1.53702 63.36 2.04322L67.4706 5.20759Z",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M62.5 6H32.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ie,{cx:"7.5",cy:"13.5",r:"6",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M49 34.5L11.8545 15.7035C9.85901 14.6937 7.5 16.1438 7.5 18.3803V50.6197C7.5 52.8562 9.85901 54.3063 11.8545 53.2965L49 34.5ZM49 34.5L86.1455 15.7035C88.141 14.6937 90.5 16.1438 90.5 18.3803V50.6197C90.5 52.8562 88.141 54.3063 86.1455 53.2965L49 34.5Z"})]})]})},ld=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,orientation:n,className:u.CSS(u.CSS.B("angled-valve"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:32.8125,top:97.0278,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.0278,top:32.8125,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M22.3611 20.1077C21.6298 20.4778 21.6298 21.5222 22.3611 21.8923L57.7433 39.7965C59.7388 40.8063 62.0978 39.3562 62.0978 37.1197L62.0978 4.88029C62.0978 2.64384 59.7388 1.19372 57.7433 2.2035L22.3611 20.1077Z"}),o.jsxRuntimeExports.jsx(T,{d:"M21.8923 22.3611C21.5222 21.6298 20.4778 21.6298 20.1077 22.3611L2.20349 57.7433C1.19372 59.7388 2.64384 62.0978 4.8803 62.0978L37.1197 62.0978C39.3562 62.0978 40.8063 59.7388 39.7965 57.7433L21.8923 22.3611Z"})]})]}),cd=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("ball-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ie,{cx:"43.5978",cy:"20.972",r:"19"}),o.jsxRuntimeExports.jsx(T,{d:"M26.5 12.8472L6.35452 2.17563C4.35901 1.16585 2 2.61598 2 4.85243V37.0918C2 39.3283 4.35901 40.7784 6.35453 39.7686L26.5 29.3472"}),o.jsxRuntimeExports.jsx(T,{d:"M60.5 28.8486L80.6455 39.5202C82.641 40.5299 85 39.0798 85 36.8434V4.60396C85 2.36751 82.641 0.917381 80.6455 1.92716L60.5 12.3486"})]})]}),ad=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("three-way-ball-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.8,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:33.1308,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:33.1308,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ie,{cx:"43.5978",cy:"21.722",r:"19"}),o.jsxRuntimeExports.jsx(T,{d:"M26.5 13.5972L6.35452 2.92563C4.35901 1.91585 2 3.36598 2 5.60243V37.8418C2 40.0783 4.35901 41.5284 6.35453 40.5186L26.5 30.0972"}),o.jsxRuntimeExports.jsx(T,{d:"M60.5 29.5986L80.6455 40.2702C82.641 41.2799 85 39.8298 85 37.5934V5.35396C85 3.11751 82.641 1.66738 80.6455 2.67716L60.5 13.0986"}),o.jsxRuntimeExports.jsx(T,{d:"M35.3737 38.7499L24.7021 58.8954C23.6923 60.8909 25.1425 63.2499 27.3789 63.2499H59.6183C61.8548 63.2499 63.3049 60.8909 62.2951 58.8954L51.8737 38.7499"})]})]}),ud=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("gate-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 2 L43.5 39.7965"})]})]}),dd=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-one"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 2V40"}),o.jsxRuntimeExports.jsx(Ie,{cx:"43.5",cy:"21",r:"10",fill:u.od.cssString(e)})]})]}),xd=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-two"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ie,{cx:"43.5",cy:"21",r:"10",fill:u.od.cssString(e)}),o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"83",height:"38",rx:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M2.29001 2.29004L84.7069 39.676"})]})]}),pd=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("breather-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:8.081,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:91.919,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:99,height:57},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ie,{cx:"91",cy:"49.5",r:"6",fill:u.od.cssString(e)}),o.jsxRuntimeExports.jsx(Ie,{cx:"8",cy:"7.5",r:"6",fill:u.od.cssString(e)}),o.jsxRuntimeExports.jsx(T,{d:"M49.5 28.5L12.3545 9.70349C10.359 8.69372 8 10.1438 8 12.3803V44.6197C8 46.8562 10.359 48.3063 12.3545 47.2965L49.5 28.5ZM49.5 28.5L86.6455 9.70349C88.641 8.69372 91 10.1438 91 12.3803V44.6197C91 46.8562 88.641 48.3063 86.6455 47.2965L49.5 28.5Z"})]})]}),md=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ie,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)})]})]}),fd=({className:e,color:t,orientation:n="left",scale:s,...r})=>{const i=u.od.cssString(t);return o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("symbol"),e),children:[o.jsxRuntimeExports.jsx(G,{orientation:n,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:5,top:50,id:"1"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:40,height:48},color:t,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"}),o.jsxRuntimeExports.jsx(T,{d:"M37.9706 23.2076C38.4906 23.6079 38.4906 24.3921 37.9706 24.7924L33.86 27.9568C33.2024 28.463 32.25 27.9942 32.25 27.1644V20.8356C32.25 20.0058 33.2024 19.537 33.86 20.0432L37.9706 23.2076Z",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M33 24H2",strokeLinecap:"round"})]})]})},hd=({className:e,color:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("symbol"),e),children:[o.jsxRuntimeExports.jsx(G,{orientation:n,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:11.1111,top:50,id:"1"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:36,height:72},color:t,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"4",y:"4",width:"28",height:"64",rx:"2",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M13 68V47C13 46.4477 13.4489 45.9892 13.9928 45.8933C16.1351 45.5152 21 43.7981 21 36C21 28.2019 16.1351 26.4848 13.9928 26.1068C13.4489 26.0108 13 25.5523 13 25V4",strokeWidth:"2"})]})]}),gd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("cap"),e),...r,children:[o.jsxRuntimeExports.jsx(G,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:7.6923,top:50,id:"1"})}),o.jsxRuntimeExports.jsx(X,{color:n,dimensions:{width:26,height:48},orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"})})]}),jd=({className:e,orientation:t="left",color:n,scale:s=1,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("cap"),e),...r,children:[o.jsxRuntimeExports.jsx(G,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:50,top:50,id:"1"})}),o.jsxRuntimeExports.jsx(X,{color:n,dimensions:{width:36,height:48},orientation:t,scale:s*.6,children:o.jsxRuntimeExports.jsx(T,{d:"M3 3H30C31.6569 3 33 4.34315 33 6V42C33 43.6569 31.6569 45 30 45H3",strokeLinecap:"round"})})]}),Ed=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:t,className:u.CSS(u.CSS.B("manual-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:56.25,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:56.25,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:48},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Ee,{x1:"43.5",y1:"27",x2:"43.5",y2:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M19.64 1 L66.68 1",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 27L6.35453 8.20349C4.35901 7.19372 2 8.64384 2 10.8803V43.1197C2 45.3562 4.35901 46.8063 6.35453 45.7965L43.5 27ZM43.5 27L80.6455 8.20349C82.641 7.19372 85 8.64384 85 10.8803V43.1197C85 45.3562 82.641 46.8063 80.6455 45.7965L43.5 27Z"})]})]}),yd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("orifice_plate"),e),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.875,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{color:n,dimensions:{width:72,height:36},orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 2V7.5V13",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 33V22",strokeLinecap:"round"})]})]}),wl=(e,t)=>e/t*100,Sd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("filter"),e),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:11.5385,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:88.4615,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:52,height:34},orientation:t,color:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M6 17L24.8 2.9C25.5111 2.36667 26.4889 2.36667 27.2 2.9L46 17M6 17L24.8 31.1C25.5111 31.6333 26.4889 31.6333 27.2 31.1L46 17"})})]}),Rd=e=>typeof e=="number"?{topLeft:u.K.construct(e),topRight:u.K.construct(e),bottomLeft:u.K.construct(e),bottomRight:u.K.construct(e)}:"x"in e?{topLeft:e,topRight:e,bottomLeft:e,bottomRight:e}:typeof e.bottomLeft=="number"?{topLeft:u.K.construct(e.topLeft),topRight:u.K.construct(e.topRight),bottomLeft:u.K.construct(e.bottomLeft),bottomRight:u.K.construct(e.bottomRight)}:e,PS=e=>{const{topLeft:t,topRight:n,bottomLeft:s,bottomRight:r}=e;return`${t.x}% ${n.x}% ${r.x}% ${s.x}% / ${t.y}% ${n.y}% ${r.y}% ${s.y}%`},Cd={width:40,height:80},Zr={x:50,y:10},io=({className:e,dimensions:t=Cd,borderRadius:n=Zr,boxBorderRadius:s,color:r,backgroundColor:i,strokeWidth:l=2,...c})=>{const a=Rd(n),d=s==null,x=Q.use(),{width:p,height:m}=t,f=g.useMemo(()=>[t,n,a],[a.bottomLeft,a.bottomRight,a.topLeft,a.topRight,m,p]),h=wl(1,p),j=100-h,y=wl(1,m),S=100-y;return o.jsxRuntimeExports.jsx(re,{className:u.CSS(e,u.CSS.B("tank")),style:{...t,borderRadius:s??PS(a),borderColor:u.od.cssString(r??x.colors.gray.l11),backgroundColor:u.od.cssString(i),borderWidth:l},...c,children:o.jsxRuntimeExports.jsxs(G,{refreshDeps:f,orientation:"left",children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:y,id:"1"}),d&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:h,top:a.topLeft.y,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:j,top:a.topRight.y,id:"3"})]}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:S,id:"4"}),d&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:h,top:100-a.bottomLeft.y,id:"5"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:j,top:100-a.bottomRight.y,id:"6"})]}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:h,top:50,id:"7"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:j,top:50,id:"8"})]})})},_S=20,LS=(e,t,n=0,s=4)=>{const r=2*Math.PI/e,i=n*Math.PI/180,l=t/(2*Math.sin(Math.PI/e)),c=l+s/2;return Array.from({length:e}).map((a,d)=>{const x=r*d+i-Math.PI/2;return{x:c+l*Math.cos(x),y:c+l*Math.sin(x)}})},NS=(e,t,n)=>{const s=[],r=Math.min(n,t/2),i=e.length;if(i<3||r<=0)return`M ${e.map(l=>`${l.x},${l.y}`).join(" L ")} Z`;for(let l=0;l<i;l++){const c=e[(l-1+i)%i],a=e[l],d=e[(l+1)%i],x=a.x-c.x,p=a.y-c.y,m=d.x-a.x,f=d.y-a.y,h=Math.hypot(x,p),j=Math.hypot(m,f),y=r/h,S=r/j,b=a.x-x*y,E=a.y-p*y,R=a.x+m*S,M=a.y+f*S;l===0?s.push(`M ${b},${E}`):s.push(`L ${b},${E}`),s.push(`Q ${a.x},${a.y} ${R},${M}`)}return s.push("Z"),s.join(" ")},Kr=({numSides:e,sideLength:t,rotation:n=0,color:s,backgroundColor:r,className:i,cornerRounding:l,strokeWidth:c,...a})=>{const d=Q.use(),x=g.useMemo(()=>2*((c??2)+1),[c]),p=g.useMemo(()=>LS(e,t,n,x),[e,t,n,x]),m=g.useMemo(()=>NS(p,t,l??0),[p,t,l]),f=g.useMemo(()=>2*(t/(2*Math.sin(Math.PI/e)))+x,[t,e,x]);return o.jsxRuntimeExports.jsx(re,{className:u.CSS(i,u.CSS.B("polygon")),...a,children:o.jsxRuntimeExports.jsx(X,{dimensions:{width:f,height:f},children:o.jsxRuntimeExports.jsx(T,{d:m,fill:u.od.cssString(r??d.colors.gray.l1),stroke:u.od.cssString(s??d.colors.gray.l9),strokeWidth:c??2})})})},wd=({radius:e,color:t,backgroundColor:n,className:s,strokeWidth:r,...i})=>{const l=(r??2)+1,c=e*2,a=c+2*l,d=c+2*l;return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(s,u.CSS.B("circle-shape")),...i,children:[o.jsxRuntimeExports.jsxs(G,{orientation:"left",refreshDeps:e,children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:l/d*100,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:(d-l)/d*100,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:l/a*100,top:50,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:(a-l)/a*100,top:50,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:a,height:d},children:o.jsxRuntimeExports.jsx(Ie,{cx:a/2,cy:d/2,r:e,stroke:u.od.cssString(t),strokeWidth:r??2,fill:u.od.cssString(n)})})]})},bd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator")),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.4091,top:66.25,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7273,top:66.25,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50.9091,top:12.5,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:88,height:80},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M44.5 53L7.35453 34.2035C5.35901 33.1937 3 34.6438 3 36.8803V69.1197C3 71.3562 5.35901 72.8063 7.35453 71.7965L44.5 53ZM44.5 53L81.6455 34.2035C83.641 33.1937 86 34.6438 86 36.8803V69.1197C86 71.3562 83.641 72.8063 81.6455 71.7965L44.5 53Z"}),o.jsxRuntimeExports.jsx(T,{d:"M61 30C62.6569 30 64.0231 28.6494 63.7755 27.0111C63.141 22.8129 61.181 18.8968 58.1421 15.8579C54.3914 12.1071 49.3043 10 44 10C38.6957 10 33.6086 12.1071 29.8579 15.8579C26.819 18.8968 24.859 22.8129 24.2245 27.0111C23.9769 28.6494 25.3431 30 27 30L44.5 30H61Z"}),o.jsxRuntimeExports.jsx(Ee,{x1:"44.5",y1:"53",x2:"44.5",y2:"30",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M44.5 10V8C44.5 6.34315 45.3431 5 47 5H80C81.6569 5 83 6.34315 83 8V24.4281C83 25.4126 82.517 26.3344 81.7076 26.8947L44.5 53"})]})]}),vd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator-manual")),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:2.2989,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.381,top:75,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.619,top:75,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:84},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 20L43.5 2",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M19.5 2L67.5 2",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 63L6.35453 44.2035C4.35901 43.1937 2 44.6438 2 46.8803V79.1197C2 81.3562 4.35901 82.8063 6.35453 81.7965L43.5 63ZM43.5 63L80.6455 44.2035C82.641 43.1937 85 44.6438 85 46.8803V79.1197C85 81.3562 82.641 82.8063 80.6455 81.7965L43.5 63Z"}),o.jsxRuntimeExports.jsx(T,{d:"M60.5 40C62.1569 40 63.5231 38.6494 63.2755 37.0111C62.641 32.8129 60.681 28.8968 57.6421 25.8579C53.8914 22.1071 48.8043 20 43.5 20C38.1957 20 33.1086 22.1071 29.3579 25.8579C26.319 28.8968 24.359 32.8129 23.7245 37.0111C23.4769 38.6494 24.8431 40 26.5 40L43.5 40H60.5Z"}),o.jsxRuntimeExports.jsx(T,{d:"M60.5 40C62.1569 40 63.5231 38.6494 63.2755 37.0111C62.641 32.8129 60.681 28.8968 57.6421 25.8579C53.8914 22.1071 48.8043 20 43.5 20C38.1957 20 33.1086 22.1071 29.3579 25.8579C26.319 28.8968 24.359 32.8129 23.7245 37.0111C23.4769 38.6494 24.8431 40 26.5 40L43.5 40H60.5Z"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43.5",y1:"63",x2:"43.5",y2:"40"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 20V18C43.5 16.3431 44.8431 15 46.5 15H79.5C81.1569 15 82.5 16.3431 82.5 18V34.4281C82.5 35.4126 82.017 36.3344 81.2076 36.8947L43.5 63"})]})]}),kd=({className:e,orientation:t="left",scale:n,color:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("orifice"),e),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.8571,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.1429,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:70,height:34},orientation:t,color:s,scale:n,children:[o.jsxRuntimeExports.jsx(T,{d:"M2 2.5C27.451 21.3469 60.0915 12.0132 68 2.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M2 32.5C27.451 13.6531 60.0915 22.9868 68 32.5",strokeLinecap:"round"})]})]}),Md=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:t,className:u.CSS(u.CSS.B("needle-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:51.1905,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:51.1905,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:42},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.0152 21.5391L38.237 2.62245C38.1573 2.30658 38.396 2 38.7218 2L48.2782 2C48.604 2 48.8427 2.30658 48.763 2.62245L43.9848 21.5391C43.8576 22.0425 43.1424 22.0425 43.0152 21.5391Z",fill:u.od.cssString(n)}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 21.5L6.35453 2.70349C4.35901 1.69372 2 3.14384 2 5.38029V37.6197C2 39.8562 4.35901 41.3063 6.35453 40.2965L43.5 21.5ZM43.5 21.5L80.6455 2.70349C82.641 1.69372 85 3.14384 85 5.3803V37.6197C85 39.8562 82.641 41.3063 80.6455 40.2965L43.5 21.5Z"})]})]}),Pd=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(ye,{...i,orientation:n,className:u.CSS(u.CSS.B("angled-relief-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:32.8125,top:97.5922,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.0278,top:45.5639,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:79},orientation:n,color:e,scale:s,children:[o.jsxRuntimeExports.jsx(Ee,{x1:21,y1:2,x2:21,y2:36.7,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M9.05106 14.0802L32.4273 4.29611",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M9.05106 20.0802L32.4273 10.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M9.05106 26.0802L32.4273 16.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M22.3611 35.1077C21.6298 35.4778 21.6298 36.5222 22.3611 36.8923L57.7433 54.7965C59.7388 55.8063 62.0978 54.3562 62.0978 52.1197L62.0978 19.8803C62.0978 17.6438 59.7388 16.1937 57.7433 17.2035L22.3611 35.1077Z"}),o.jsxRuntimeExports.jsx(T,{d:"M21.8923 37.3611C21.5222 36.6298 20.4778 36.6298 20.1077 37.3611L2.20349 72.7433C1.19372 74.7388 2.64384 77.0978 4.8803 77.0978H37.1197C39.3562 77.0978 40.8063 74.7388 39.7965 72.7433L21.8923 37.3611Z"})]})]}),_d=({className:e,color:t,dimensions:n,orientation:s="left",units:r="psi",unitsLevel:i="small",children:l,inlineSize:c=80,...a})=>{const d=u.od.cssString(t),x=Q.use(),p=t==null?"var(--pluto-gray-l0)":u.od.cssString(u.od.pickByContrast(t,x.colors.gray.l0,x.colors.gray.l11));return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("value"),e),...a,style:{borderColor:d,height:n==null?void 0:n.height,width:"100%"},children:[o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("value","content"),style:{flexGrow:1,minWidth:n==null?void 0:n.width,inlineSize:c},children:l}),o.jsxRuntimeExports.jsxs(G,{orientation:s,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:100,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:-2,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:102,id:"4"})]}),o.jsxRuntimeExports.jsx("div",{className:u.CSS(u.CSS.BE("value","units"),u.CSS.M(i)),style:{background:d},children:o.jsxRuntimeExports.jsx(K.Text,{level:i,color:p,children:r})})]})},Ld=({enabled:e=!1,onClick:t,orientation:n="left"})=>o.jsxRuntimeExports.jsxs(re,{orientation:n,children:[o.jsxRuntimeExports.jsx(Q.Switch$1,{value:e,onClick:t,onChange:()=>{}}),o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:100,top:50,id:"2"})]})]}),Nd=({onClick:e,onMouseDown:t,onMouseUp:n,orientation:s="left",label:r="",color:i,size:l,level:c,onClickDelay:a})=>o.jsxRuntimeExports.jsxs(re,{orientation:s,children:[o.jsxRuntimeExports.jsx(fe.Button,{onClick:e,onMouseDown:t,onMouseUp:n,color:i,size:l,level:c,onClickDelay:a,children:r}),o.jsxRuntimeExports.jsxs(G,{orientation:s,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:s,left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:s,left:100,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:s,left:50,top:0,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:s,left:50,top:100,id:"4"})]})]}),Wr=({className:e,orientation:t="left",width:n,color:s,level:r,autoFit:i,align:l="center",value:c,onChange:a,...d})=>{const x={textAlign:l};return u.g.construct(t)==="y"?x.height=i?"fit-content":n:x.width=i?"fit-content":n,o.jsxRuntimeExports.jsx(re,{style:x,orientation:t,className:u.CSS(u.CSS.B("text-box"),u.CSS.loc(t),e),...d,children:o.jsxRuntimeExports.jsx(K.MaybeEditable,{color:u.od.cssString(s),level:r,value:c,onChange:a})})},Td=({orientation:e="left",className:t,onClick:n,children:s,value:r,units:i,color:l,onChange:c,size:a="small",disabled:d,...x})=>{const[p,m]=g.useState(r);return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("setpoint"),t),orientation:e,...x,children:[o.jsxRuntimeExports.jsxs(G,{orientation:e,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:e,left:.5,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:e,left:100,top:50,id:"2",style:{zIndex:5}}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:50,top:-2,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:e,left:50,top:102,id:"4"})]}),o.jsxRuntimeExports.jsx(he.Numeric,{size:a,value:p,onChange:m,showDragHandle:!1,selectOnFocus:!0,endContent:i,outlineColor:l,borderWidth:1,disabled:d,children:o.jsxRuntimeExports.jsx(fe.Button,{size:a,variant:"filled",onClick:()=>c(p),color:l,children:"Set"})})]})},Ad=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("screw-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ie,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(T,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(32, 32)",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(T,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(42, 32)",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)})]})]}),Id=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("vacuum-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"})})]}),$d=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("cavity-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ie,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(T,{d:"M 17 26 C 17 20.6667 23 20.6667 23 26 C 23 31.3333 29 31.3333 29 26 C 29 20.6667 35 20.6667 35 26",strokeLinecap:"round",transform:"translate(6, 6)",className:u.CSS(u.CSS.M("detail"),t)})]})]}),Bd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("piston-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Ie,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(T,{d:"M 23 32, h 16, m 0 -8, v 16",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"})]})]}),Dd=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("static-mixer"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.5152,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.4848,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.3333,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.6667,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:30},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"1",y:"1",width:"64",height:"28",rx:"2",ry:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M17 10C23 10 27 20 33 20C39 20 43 10 49 10",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M17 20C23 20 27 10 33 10C39 10 43 20 49 20",strokeLinecap:"round"})]})]}),Od=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("rotary-mixer"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:2,top:48.4849,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:97.5,top:48.4849,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:50,height:33},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M1 30V2C1 1.44772 1.44772 1 2 1H35.4545C35.7434 1 36.0181 1.12487 36.208 1.34247L48.4262 15.3425C48.7549 15.7192 48.7549 16.2808 48.4262 16.6575L36.208 30.6575C36.0181 30.8751 35.7434 31 35.4545 31H2C1.44772 31 1 30.5523 1 30Z"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"16",x2:"40",y2:"16",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"16",x2:"28",y2:"22.9282",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(Ee,{x1:"32",y1:"16",x2:"28",y2:"9.0717",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)})]})]}),zd=({className:e,color:t,orientation:n="left",enabled:s,scale:r,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,orientation:n,className:u.CSS(u.CSS.B("light"),s&&u.CSS.M("enabled"),e),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.75,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:64,height:64},color:t,orientation:n,scale:r,children:o.jsxRuntimeExports.jsx(Ie,{cx:"32",cy:"32",r:"30"})})]}),Vd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator")),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.29885,top:69.565,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.70115,top:69.565,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:23.1479,top:23.61,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:11.11,id:"4"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:76.8521,top:23.61,id:"5"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:69},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 49L6.35453 30.2035C4.35901 29.1937 2 30.6438 2 32.8803V65.1197C2 67.3562 4.35901 68.8063 6.35453 67.7965L43.5 49ZM43.5 49L80.6455 30.2035C82.641 29.1937 85 30.6438 85 32.8803V65.1197C85 67.3562 82.641 68.8063 80.6455 67.7965L43.5 49Z"}),o.jsxRuntimeExports.jsx(Re,{x:"21",y:"6.5",width:"44",height:"18",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M43 6.5V4C43 2.34315 44.3431 1 46 1H79C80.6569 1 82 2.34315 82 4V20.4281C82 21.4126 81.517 22.3344 80.7076 22.8947L43 49"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"49",x2:"43",y2:"24.5"})]})]}),Fd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("regulator-motorized")),...r,orientation:t,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:35.6321,top:13.72549,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:1.96078,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:64.3679,top:13.72549,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:24.1379,top:46.078,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:75.8621,top:46.078,id:"5"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.2989,top:78.43137,id:"6"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97.7011,top:78.43137,id:"7"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:102},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 80.5L6.35453 61.7035C4.35901 60.6937 2 62.1438 2 64.3803V96.6197C2 98.8562 4.35901 100.306 6.35453 99.2965L43.5 80.5ZM43.5 80.5L80.6455 61.7035C82.641 60.6937 85 62.1438 85 64.3803V96.6197C85 98.8562 82.641 100.306 80.6455 99.2965L43.5 80.5Z"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"80.5",x2:"43",y2:"56"}),o.jsxRuntimeExports.jsx(T,{d:"M43 38V35.5C43 33.8431 44.3431 32.5 46 32.5H79C80.6569 32.5 82 33.8431 82 35.5V51.9281C82 52.9126 81.517 53.8344 80.7076 54.3947L43 80.5"}),o.jsxRuntimeExports.jsx(Re,{x:"21",y:"38",width:"44",height:"18",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M43 38V26",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ie,{cx:"43",cy:"14",r:"12"})]})]}),Hd=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(ye,{...s,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(G,{orientation:e,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:50,top:1,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:88,height:86},color:t,orientation:e,scale:n,children:[o.jsxRuntimeExports.jsx(T,{d:"M1 85V48.8541C1 46.624 3.34694 45.1735 5.34164 46.1708L80.6584 83.8292 C82.6531 84.8265 85 83.376 85 81.1459 V44"}),o.jsxRuntimeExports.jsx(T,{d:"M43 1L45 65"})]})]}),Zd=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(ye,{...s,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(G,{orientation:e,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:87},color:t,orientation:e,scale:n,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 69.573L14.9534 55.6147C8.97428 52.6911 2 57.0443 2 63.6999V75.4462C2 82.1018 8.97429 86.455 14.9534 83.5314L43.5 69.573ZM43.5 69.573L72.0466 55.6147C78.0257 52.6911 85 57.0443 85 63.6999V75.4462C85 82.1018 78.0257 86.455 72.0466 83.5314L43.5 69.573Z"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 69.6L43.5 2",strokeLinecap:"round"})]})]}),Kd=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(ye,{...s,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(G,{orientation:e,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:e,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:87},color:t,orientation:e,scale:n,children:[o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"1",x2:"43",y2:"49"}),o.jsxRuntimeExports.jsx(Re,{x:"3",y:"49",width:"80",height:"34",rx:"3",strokeLinecap:"round"})]})]}),Wd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(G,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"1",x2:"43",y2:"49"}),o.jsxRuntimeExports.jsx(Re,{x:"3",y:"49",width:"80",height:"34",rx:"3"}),o.jsxRuntimeExports.jsx(Ee,{x1:"3.8",y1:"82.1",x2:"43",y2:"49",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"49",x2:"43",y2:"83",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"83",x2:"82.2",y2:"49.9",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"})]})]}),Yd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(G,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"3",y1:"49",x2:"83",y2:"49",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"3",y1:"83",x2:"83",y2:"83",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"43",y1:"49",x2:"43",y2:"83",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Re,{x:"3",y:"49",width:"80",height:"34",strokeWidth:0})]})]}),Gd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(G,{orientation:t,children:o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Ee,{x1:43,y1:1,x2:43,y2:60,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M5.375 36L70.8204 48.7138C74.0584 49.3428 74.0573 53.9765 70.8189 54.6039L14.7952 65.4584C11.5729 66.0827 11.5494 70.6856 14.7651 71.3429L81.5208 84.9873",strokeLinecap:"round"})]})]}),qd=({id:e,className:t,orientation:n="right",label:s="text",color:r,level:i="p",onLabelChange:l,...c})=>{const a=document.querySelector(`[data-id="${e}"]`);a&&a.classList.add(n);const d=u.g.construct(n)==="y";return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("arrow"),u.CSS.loc(n),t),orientation:n,...c,children:[o.jsxRuntimeExports.jsx("div",{className:"wrapper",children:o.jsxRuntimeExports.jsx("div",{className:"outline",style:{backgroundColor:u.od.cssString(r)},children:o.jsxRuntimeExports.jsx("div",{className:"bg",children:o.jsxRuntimeExports.jsx(K.MaybeEditable,{value:s,onChange:l,level:i,className:u.CSS.BE("symbol","label")})})})}),o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,preventAutoAdjust:!0,left:98,top:50,swap:d,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",preventAutoAdjust:!0,orientation:n,left:1,top:50,swap:d,id:"2"})]}),o.jsxRuntimeExports.jsx("svg",{style:{visibility:"hidden",position:"absolute"},width:"0",height:"0",xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:o.jsxRuntimeExports.jsx("defs",{children:o.jsxRuntimeExports.jsxs("filter",{id:"goo",children:[o.jsxRuntimeExports.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.5",result:"blur"}),o.jsxRuntimeExports.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9",result:"goo"}),o.jsxRuntimeExports.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})})]})},Xd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("vent"),e),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:22.7273,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:80,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{color:n,dimensions:{width:22,height:32},orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M5 3L16.6325 13.8016C17.9107 14.9885 17.9107 17.0115 16.6325 18.1984L5 29",strokeLinecap:"round"})})]}),Ud=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("iso-filter"),e),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:95,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:5,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:60,height:42},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"3",y:"3",width:"54",height:"36",rx:"3",ry:"3"}),o.jsxRuntimeExports.jsx(Ee,{x1:"30",y1:"3",x2:"30",y2:"13",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"30",y1:"17",x2:"30",y2:"25",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Ee,{x1:"30",y1:"29",x2:"30",y2:"39",strokeLinecap:"round"})]})]}),Jd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("flow-straightener"),e),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:97,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50,top:93,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:72,height:36},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"2.5",y:"2.5",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M10.5 26.5H60.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M10.5 9.5H60.5",strokeLinecap:"round"})]})]}),Qd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("heater-element"),e),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:11.9,top:5.55555556,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:11.9,top:94,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:21,height:36},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M2.5 34.0005H14.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M2.5 2.00049L14.5 2.00049",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M14.3793 10.0013C14.9046 10.0013 15.4248 10.1048 15.9101 10.3058C16.3954 10.5068 16.8363 10.8015 17.2078 11.1729C17.5792 11.5443 17.8738 11.9853 18.0749 12.4706C18.2759 12.9559 18.3793 13.4761 18.3793 14.0013C18.3793 14.5266 18.2759 15.0468 18.0749 15.5321C17.8738 16.0174 17.5792 16.4583 17.2078 16.8298C16.8363 17.2012 16.3954 17.4958 15.9101 17.6969C15.4248 17.8979 14.9046 18.0013 14.3793 18.0013"}),o.jsxRuntimeExports.jsx(T,{d:"M14.5 2.00049C15.0253 2.00049 15.5454 2.10395 16.0307 2.30497C16.516 2.50599 16.957 2.80063 17.3284 3.17206C17.6999 3.5435 17.9945 3.98445 18.1955 4.46975C18.3965 4.95506 18.5 5.4752 18.5 6.00049C18.5 6.52578 18.3965 7.04592 18.1955 7.53122C17.9945 8.01652 17.6999 8.45748 17.3284 8.82892C16.957 9.20035 16.516 9.49499 16.0307 9.69601C15.5454 9.89703 15.0253 10.0005 14.5 10.0005"}),o.jsxRuntimeExports.jsx(T,{d:"M14.5 18.0005C15.0253 18.0005 15.5454 18.104 16.0307 18.305C16.516 18.506 16.957 18.8006 17.3284 19.1721C17.6999 19.5435 17.9945 19.9845 18.1955 20.4698C18.3965 20.9551 18.5 21.4752 18.5 22.0005C18.5 22.5258 18.3965 23.0459 18.1955 23.5312C17.9945 24.0165 17.6999 24.4575 17.3284 24.8289C16.957 25.2003 16.516 25.495 16.0307 25.696C15.5454 25.897 15.0253 26.0005 14.5 26.0005"}),o.jsxRuntimeExports.jsx(T,{d:"M14.6206 25.9995C15.1459 25.9995 15.6661 26.103 16.1514 26.304C16.6367 26.505 17.0776 26.7997 17.4491 27.1711C17.8205 27.5425 18.1151 27.9835 18.3162 28.4688C18.5172 28.9541 18.6206 29.4742 18.6206 29.9995C18.6206 30.5248 18.5172 31.0449 18.3162 31.5302C18.1151 32.0155 17.8205 32.4565 17.4491 32.8279C17.0776 33.1994 16.6367 33.494 16.1514 33.695C15.6661 33.896 15.1459 33.9995 14.6206 33.9995"})]})]}),ex=({className:e,dimensions:t=Cd,borderRadius:n=Zr,boxBorderRadius:s,color:r,backgroundColor:i,...l})=>{const c=Rd(n),a=Q.use(),d=g.useMemo(()=>[t,n,c],[c.bottomLeft,c.bottomRight,c.topLeft,c.topRight,t.height,t.width]),x=u.od.cssString(r??a.colors.gray.l11),p=i==null?void 0:u.od.cssString(i),m=t.width/66,f=t.height/180,h=`scale(${m},${f})`;return o.jsxRuntimeExports.jsxs(re,{className:u.CSS(e,u.CSS.B("cylinder")),style:{...t},...l,children:[o.jsxRuntimeExports.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${t.width} ${t.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:h,children:o.jsxRuntimeExports.jsx("path",{d:"M23 33.6712C11.9844 36.0332 3 42.4382 3 52.8862V174.568C3 176.225 4.34315 177.568 6 177.568H60C61.6569 177.568 63 176.225 63 174.568V52.8862C63 36.3342 40.4511 29.9292 23 33.6712ZM23 33.6712V13.3181C23 0.318109 42.9975 0.318123 42.9975 13.3181V33.6712",vectorEffect:"non-scaling-stroke",strokeWidth:"2",stroke:x,transform:h,fill:p})}),o.jsxRuntimeExports.jsxs(G,{refreshDeps:d,orientation:"left",children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:"left",left:50,top:2,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:35,top:10,id:"9"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:65,top:10,id:"10"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:"left",left:50,top:98.3333,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:4,top:40,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:96,top:40,id:"4"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:4,top:60,id:"5"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:96,top:60,id:"6"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:"left",left:4,top:80,id:"7"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:"left",left:96,top:80,id:"8"})]})]})},tx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>{const l=u.od.cssString(n);return o.jsxRuntimeExports.jsxs(ye,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:2.1373,top:69.0785,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.7416,top:72.368,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:89,height:76},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M46.3625 54.1079C45.6312 54.4779 45.6311 55.5223 46.3624 55.8924L81.7435 73.7989C83.7389 74.8088 86.098 73.3588 86.0982 71.1224L86.1002 38.883C86.1003 36.6465 83.7414 35.1962 81.7458 36.2059L46.3625 54.1079Z",stroke:l}),o.jsxRuntimeExports.jsx(T,{d:"M71 38.0014V72.0014",stroke:l,strokeWidth:4,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M41.6389 55.8923C42.3702 55.5222 42.3702 54.4778 41.6389 54.1077L6.2567 36.2035C4.26118 35.1937 1.90217 36.6438 1.90217 38.8803L1.90217 71.1197C1.90217 73.3562 4.26119 74.8063 6.2567 73.7965L41.6389 55.8923Z",stroke:l}),o.jsxRuntimeExports.jsx(Ie,{cx:"44",cy:"55",r:"4",fill:l}),o.jsxRuntimeExports.jsx(T,{d:"M45 4C45 3.44772 44.5523 3 44 3C43.4477 3 43 3.44772 43 4H45ZM37.5777 24.7889L38.0249 23.8944L37.5777 24.7889ZM37.5777 21.2111L38.0249 22.1056L37.5777 21.2111ZM50.4223 31.2111L49.9751 32.1056L50.4223 31.2111ZM37.5777 44.7889L37.1305 45.6833L37.5777 44.7889ZM37.5777 41.2111L37.1305 40.3167L37.5777 41.2111ZM42.8944 47.4472L42.4472 48.3416L42.8944 47.4472ZM45 52V49.2361H43V52H45ZM43.3416 46.5528L38.0249 43.8944L37.1305 45.6833L42.4472 48.3416L43.3416 46.5528ZM38.0249 42.1056L50.8695 35.6833L49.9751 33.8944L37.1305 40.3167L38.0249 42.1056ZM50.8695 30.3167L38.0249 23.8944L37.1305 25.6833L49.9751 32.1056L50.8695 30.3167ZM38.0249 22.1056L50.8695 15.6833L49.9751 13.8944L37.1305 20.3167L38.0249 22.1056ZM50.8695 10.3167L45.5528 7.65836L44.6584 9.44721L49.9751 12.1056L50.8695 10.3167ZM45 6.76393V4H43V6.76393H45ZM45.5528 7.65836C45.214 7.48897 45 7.1427 45 6.76393H43C43 7.90025 43.642 8.93904 44.6584 9.44721L45.5528 7.65836ZM50.8695 15.6833C53.0806 14.5777 53.0807 11.4223 50.8695 10.3167L49.9751 12.1056C50.7121 12.4741 50.7121 13.5259 49.9751 13.8944L50.8695 15.6833ZM38.0249 23.8944C37.2879 23.5259 37.2879 22.4741 38.0249 22.1056L37.1305 20.3167C34.9193 21.4223 34.9194 24.5777 37.1305 25.6833L38.0249 23.8944ZM50.8695 35.6833C53.0806 34.5777 53.0807 31.4223 50.8695 30.3167L49.9751 32.1056C50.7121 32.4741 50.7121 33.5259 49.9751 33.8944L50.8695 35.6833ZM38.0249 43.8944C37.2879 43.5259 37.2879 42.4741 38.0249 42.1056L37.1305 40.3167C34.9193 41.4223 34.9194 44.5777 37.1305 45.6833L38.0249 43.8944ZM45 49.2361C45 48.0998 44.358 47.061 43.3416 46.5528L42.4472 48.3416C42.786 48.511 43 48.8573 43 49.2361H45Z",fill:l,strokeWidth:1})]})]})},nx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>{const l=u.od.cssString(n);return o.jsxRuntimeExports.jsxs(ye,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:31.8182,top:98,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:95.6061,top:55.5185,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:101},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M23.3625 55.6237C22.6312 55.9937 22.6311 57.0381 23.3624 57.4082L58.7435 75.3147C60.7389 76.3246 63.098 74.8747 63.0981 72.6382L63.1001 40.3988C63.1003 38.1624 60.7414 36.7121 58.7458 37.7217L23.3625 55.6237Z"}),o.jsxRuntimeExports.jsx(T,{d:"M48 38.633V72.633",strokeLinecap:"round",strokeWidth:4}),o.jsxRuntimeExports.jsx(T,{d:"M21.8923 58.4348C21.5222 57.7035 20.4778 57.7035 20.1077 58.4348L2.20349 93.817C1.19372 95.8125 2.64384 98.1715 4.8803 98.1715H37.1197C39.3562 98.1715 40.8063 95.8125 39.7965 93.817L21.8923 58.4348Z"}),o.jsxRuntimeExports.jsx(Ie,{cx:"21",cy:"56.0737",r:"4",fill:l}),o.jsxRuntimeExports.jsx(T,{d:"M21 53.0105V50.0225C21 49.3397 20.6516 48.704 20.0759 48.3366L15.6419 45.507C14.4098 44.7207 14.4098 42.9214 15.6419 42.1351L26.3581 35.2965C27.5902 34.5102 27.5902 32.7109 26.3581 31.9246L15.6419 25.0859C14.4098 24.2997 14.4098 22.5003 15.6419 21.714L26.3581 14.8754C27.5902 14.0891 27.5902 12.2898 26.3581 11.5035L21.9241 8.67393C21.3484 8.30656 21 7.67087 21 6.98798V4",stroke:l,strokeLinecap:"round"})]})]})},sx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("t-junction"),e),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.8462,top:22.3095,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.1538,top:22.3095,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50,top:92.8571,id:"3"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:39,height:21},color:n,orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M1.5 5.5V3.5C1.5 2.39543 2.39543 1.5 3.5 1.5H35.5C36.6046 1.5 37.5 2.39543 37.5 3.5V5.5C37.5 6.60457 36.6046 7.5 35.5 7.5H24.5C23.3954 7.5 22.5 8.39543 22.5 9.5V17.5C22.5 18.6046 21.6046 19.5 20.5 19.5H18.5C17.3954 19.5 16.5 18.6046 16.5 17.5V9.5C16.5 8.39543 15.6046 7.5 14.5 7.5H3.5C2.39543 7.5 1.5 6.60457 1.5 5.5Z",fill:u.od.cssString(n),stroke:"none"})})]}),ox=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{className:u.CSS(u.CSS.B("t-junction"),e),...r,children:[o.jsxRuntimeExports.jsxs(G,{orientation:t,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:t,left:3.8462,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:t,left:96.1539,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:t,left:50.5,top:96.1539,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:t,left:50.5,top:3.8462,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:39,height:39},color:n,orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M22.5 35.5C22.5 36.6046 21.6046 37.5 20.5 37.5H18.5C17.3954 37.5 16.5 36.6046 16.5 35.5V24.5C16.5 23.3954 15.6046 22.5 14.5 22.5H3.5C2.39543 22.5 1.5 21.6046 1.5 20.5V18.5C1.5 17.3954 2.39543 16.5 3.5 16.5H14.5C15.6046 16.5 16.5 15.6046 16.5 14.5V3.5C16.5 2.39543 17.3954 1.5 18.5 1.5H20.5C21.6046 1.5 22.5 2.39543 22.5 3.5V14.5C22.5 15.6046 23.3954 16.5 24.5 16.5H35.5C36.6046 16.5 37.5 17.3954 37.5 18.5V20.5C37.5 21.6046 36.6046 22.5 35.5 22.5H24.5C23.3954 22.5 22.5 23.3954 22.5 24.5V35.5Z",fill:u.od.cssString(n),stroke:"none"})})]}),Xe=({position:e,color:t})=>o.jsxRuntimeExports.jsx("text",{x:(e==null?void 0:e.x)??57,y:(e==null?void 0:e.y)??27,style:{fill:u.od.cssString(t),fontWeight:450},stroke:"none",children:"F"}),rx=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-general"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(Xe,{position:{x:56,y:25},color:s})]})]}),ix=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Electromagnetic"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M47.5 17.5H55.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M15.5 17.5H23.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M23.5 17.5C23.5 16.9747 23.6035 16.4546 23.8045 15.9693C24.0055 15.484 24.3001 15.043 24.6716 14.6716C25.043 14.3001 25.484 14.0055 25.9693 13.8045C26.4546 13.6035 26.9747 13.5 27.5 13.5C28.0253 13.5 28.5454 13.6035 29.0307 13.8045C29.516 14.0055 29.957 14.3001 30.3284 14.6716C30.6999 15.043 30.9945 15.484 31.1955 15.9693C31.3965 16.4546 31.5 16.9747 31.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M31.5 17.5C31.5 16.9747 31.6035 16.4546 31.8045 15.9693C32.0055 15.484 32.3001 15.043 32.6716 14.6716C33.043 14.3001 33.484 14.0055 33.9693 13.8045C34.4546 13.6035 34.9747 13.5 35.5 13.5C36.0253 13.5 36.5454 13.6035 37.0307 13.8045C37.516 14.0055 37.957 14.3001 38.3284 14.6716C38.6999 15.043 38.9945 15.484 39.1955 15.9693C39.3965 16.4546 39.5 16.9747 39.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M39.5 17.5C39.5 16.9747 39.6035 16.4546 39.8045 15.9693C40.0055 15.484 40.3001 15.043 40.6716 14.6716C41.043 14.3001 41.484 14.0055 41.9693 13.8045C42.4546 13.6035 42.9747 13.5 43.5 13.5C44.0253 13.5 44.5454 13.6035 45.0307 13.8045C45.516 14.0055 45.957 14.3001 46.3284 14.6716C46.6999 15.043 46.9945 15.484 47.1955 15.9693C47.3965 16.4546 47.5 16.9747 47.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Xe,{position:{x:58,y:29},color:s})]})]}),lx=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-VariableArea"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M46 10V25"}),o.jsxRuntimeExports.jsx(T,{d:"M23 13V22"}),o.jsxRuntimeExports.jsx(T,{d:"M23 13L46 10"}),o.jsxRuntimeExports.jsx(T,{d:"M23 22L46 25"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),cx=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Coriolis"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M2 17.6024H28.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M28.5 17.6024L34.6834 14.0324",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M34.8 14L45.9058 20.9666",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M51.5 17.6024L46.0141 20.8987",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M20.5 17.6024L26.6574 14.0474",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M26.75 14.1024L37.788 21.0265",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 17.6024L37.8427 21.0017",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 17.6024H69",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Xe,{position:{x:58,y:29},color:s})]})]}),ax=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Nozzle"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M24 2V7V12",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24 12H34",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24 23H29H34",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24 33V23",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),ux=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Venturi"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M8 33L26.5329 22.3",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M8 2L26.5329 12.7",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M56 33L26.5876 22.2948",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M56 2L26.5876 12.7052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Xe,{position:{x:56,y:29},color:s})]})]}),dx=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-RingPiston"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(Ie,{cx:"36.5",cy:"17.5",r:"10.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Ie,{cx:"36.5",cy:"21.5",r:"6.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Xe,{position:{x:56,y:29},color:s})]})]}),xx=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-PositiveDisplacement"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:72,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M41 13C41 15.4853 38.9853 17.5 36.5 17.5C34.0147 17.5 32 15.4853 32 13C32 10.5147 34.0147 8.5 36.5 8.5C38.9853 8.5 41 10.5147 41 13Z",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M41 22C41 24.4853 38.9853 26.5 36.5 26.5C34.0147 26.5 32 24.4853 32 22C32 19.5147 34.0147 17.5 36.5 17.5C38.9853 17.5 41 19.5147 41 22Z",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),px=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Turbine"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M16.5 17.5H54.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M32.5 9L35.4756 17.1753",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M38.5 26L35.5244 17.8247",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M32.5 26L35.4756 17.8247",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M38.5 9L35.5244 17.1753",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M32.5 9C32.5 8.20435 32.8161 7.44129 33.3787 6.87868C33.9413 6.31607 34.7044 6 35.5 6C36.2956 6 37.0587 6.31607 37.6213 6.87868C38.1839 7.44129 38.5 8.20435 38.5 9",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M38.5 26C38.5 26.7956 38.1839 27.5587 37.6213 28.1213C37.0587 28.6839 36.2956 29 35.5 29C34.7044 29 33.9413 28.6839 33.3787 28.1213C32.8161 27.5587 32.5 26.7956 32.5 26",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),mx=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Pulse"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M31 13.5H39",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M23 21.5H31",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M39 21.5H47",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M39 13.5V21.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31 13.5V21.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),fx=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-FloatSensor"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M25 8H46",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31 27H40",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31 27L25.046 8.11641",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M40 27L45.954 8.11641",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),hx=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("flowmeter-Orifice"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:72,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 2V7.5V13",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 33V22",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Xe,{color:s})]})]}),gx=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("heat-exchanger-general"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.545,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.454,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.545,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.454,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(T,{d:"M3 33H18.3956L33.1284 18.1508M33.4276 47.8492L48.1604 33H63M33.278 48V18"}),o.jsxRuntimeExports.jsx(T,{d:"M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33L63 33Z"})]})]}),jx=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:89,top:27.27,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:89,top:72.73,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.545,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.455,id:"4"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.545,top:50,id:"5"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(T,{d:"M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33L63 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M58.9698 18H23.56L38.5623 33.0023M38.5623 32.9977L23.56 48H58.9698"})]})]}),Ex=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(re,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:9,top:6.25,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:24,top:93.75,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:76,top:6.25,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:91,top:93.75,id:"4"}),o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:1.508,top:50,id:"5"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:98.492,top:50,id:"6"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:199,height:48},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(Re,{x:"3",y:"3",width:"193",height:"42",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Re,{x:"32.397",y:"3",width:"134.206",height:"42",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Re,{x:"32.397",y:"13.5",width:"134.206",height:"21",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Ee,{x1:"32.3769",y1:"24",x2:"166.623",y2:"24",strokeWidth:"2"})]})]}),yx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M62 32C62 48.5685 48.5685 62 32 62M62 32C62 15.4315 48.5685 2 32 2C15.4315 2 2 15.4315 2 32C2 48.5685 15.4315 62 32 62M62 32L32 62M32 2.00269L62.0025 32.0052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31 62C29.2204 62 27.3855 61.332 25.5927 59.9086C23.791 58.4782 22.0952 56.3316 20.6377 53.5381C19.1829 50.7496 18.0147 47.4106 17.214 43.7054C16.4137 40.0021 16 36.0237 16 32C16 27.9763 16.4137 23.9979 17.214 20.2946C18.0147 16.5895 19.1829 13.2504 20.6377 10.4619C22.0952 7.66841 23.791 5.52179 25.5927 4.09136C27.3855 2.66801 29.2204 2 31 2",strokeWidth:"2"})]})]}),Sx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M62 32C62 48.5685 48.5685 62 32 62M62 32C62 15.4315 48.5685 2 32 2C15.4315 2 2 15.4315 2 32C2 48.5685 15.4315 62 32 62M62 32L32 62M32 2.00269L62.0025 32.0052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M50.3827 20.3601C47.1902 21.7605 43.4002 22.8046 39.2752 23.4077C35.1519 24.0105 30.8103 24.1557 26.5584 23.8319C22.3057 23.508 18.2597 22.7238 14.7044 21.5418C11.1449 20.3584 8.19358 18.8149 6.03181 17.0454M6.02374 46.9613C8.18198 45.1925 11.129 43.6491 14.6841 42.465C18.2349 41.2824 22.2765 40.4968 26.5256 40.1707C30.774 39.8447 35.113 39.9871 39.2353 40.5866C43.3592 41.1864 47.15 42.2268 50.3455 43.6237",strokeLinecap:"round"})]})]}),Rx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("compressor"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z",strokeLinecap:"round"})})]}),Cx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(Ie,{cx:"33",cy:"33",r:"14.5"})]})]}),wx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M35 12.4V20.4"}),o.jsxRuntimeExports.jsx(T,{d:"M3 33H16"}),o.jsxRuntimeExports.jsx(T,{d:"M35 53.6V45.6"})]})]}),bx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M39 33C39 33.7879 38.8448 34.5681 38.5433 35.2961C38.2417 36.0241 37.7998 36.6855 37.2426 37.2426C36.6855 37.7998 36.0241 38.2417 35.2961 38.5433C34.5681 38.8448 33.7879 39 33 39C32.2121 39 31.4319 38.8448 30.7039 38.5433C29.9759 38.2417 29.3145 37.7998 28.7574 37.2426C28.2002 36.6855 27.7583 36.0241 27.4567 35.2961C27.1552 34.5681 27 33.7879 27 33C27 32.2121 27.1552 31.4319 27.4567 30.7039C27.7583 29.9759 28.2002 29.3145 28.7574 28.7574C29.3145 28.2002 29.9759 27.7583 30.7039 27.4567C31.4319 27.1552 32.2121 27 33 27C33.7879 27 34.5681 27.1552 35.2961 27.4567C36.0241 27.7583 36.6855 28.2002 37.2426 28.7574C37.7998 29.3145 38.2417 29.9759 38.5433 30.7039C38.8448 31.4319 39 32.2121 39 33L39 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M39 33H47"}),o.jsxRuntimeExports.jsx(T,{d:"M27 33H19"}),o.jsxRuntimeExports.jsx(T,{d:"M36 27.804L40 20.8758"}),o.jsxRuntimeExports.jsx(T,{d:"M30 27.804L26 20.8758"}),o.jsxRuntimeExports.jsx(T,{d:"M30 38.196L26 45.1242"}),o.jsxRuntimeExports.jsx(T,{d:"M36 38.196L40 45.1242"})]})]}),vx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M49.1214 16.2515C43.5325 21.3055 36.2463 24.0711 28.7115 23.9986C21.1766 23.9262 13.945 21.0209 8.45428 15.8604M8.4838 50.112C13.9718 44.968 21.1918 42.0733 28.7133 42.0014C36.2348 41.9295 43.5089 44.6858 49.0942 49.7239"})]})]}),kx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ye,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M3 33H63"})]})]}),Mx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:7.575,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:92.425,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(X,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M16.5 2.5L16.5 66.5M2.5 34.5H30.5M2.5 18.9848H30.5M2.5 50.0152H30.5M5.3 66.5H27.7C29.2464 66.5 30.5 65.1976 30.5 63.5909V5.40909C30.5 3.80244 29.2464 2.5 27.7 2.5H5.3C3.7536 2.5 2.5 3.80245 2.5 5.40909V63.5909C2.5 65.1976 3.7536 66.5 5.3 66.5Z",strokeLinecap:"round"})})]}),Px=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(T,{d:"M29.121 3.37903L61 34.5"}),o.jsxRuntimeExports.jsx(T,{d:"M29.12 65.62L61 34.5"})]})]}),_x=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:60,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2.5",width:"56",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M30 2.5L30 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"})]})]}),Lx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(T,{d:"M29 2.5C33.2023 2.5 37.3635 3.3277 41.2459 4.93586C45.1283 6.54401 48.656 8.90111 51.6274 11.8726C54.5989 14.8441 56.956 18.3717 58.5642 22.2541C60.1723 26.1366 61 30.2977 61 34.5C61 38.7023 60.1723 42.8635 58.5642 46.7459C56.956 50.6283 54.5989 54.1559 51.6274 57.1274C48.6559 60.0989 45.1283 62.456 41.2459 64.0641C37.3635 65.6723 33.2023 66.5 29 66.5",strokeLinecap:"square"}),o.jsxRuntimeExports.jsx(Ee,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),o.jsxRuntimeExports.jsx(Ee,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),Nx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(T,{d:"M29.121 3.37903L61 34.5"}),o.jsxRuntimeExports.jsx(T,{d:"M29.12 65.62L61 34.5"}),o.jsxRuntimeExports.jsx(T,{d:"M29 2.5C33.2023 2.5 37.3635 3.3277 41.2459 4.93586C45.1283 6.54401 48.656 8.90111 51.6274 11.8726C54.5989 14.8441 56.956 18.3717 58.5642 22.2541C60.1723 26.1366 61 30.2977 61 34.5C61 38.7023 60.1723 42.8635 58.5642 46.7459C56.956 50.6283 54.5989 54.1559 51.6274 57.1274C48.6559 60.0989 45.1283 62.456 41.2459 64.0641C37.3635 65.6723 33.2023 66.5 29 66.5"}),o.jsxRuntimeExports.jsx(Ee,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),o.jsxRuntimeExports.jsx(Ee,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),Tx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("thruster"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:25.3,top:4.76,id:"3"}),o.jsxRuntimeExports.jsx(w,{location:"bottom",orientation:n,left:25.3,top:95.24,id:"4"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:81,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"2.5",y:"2",width:"38",height:"38",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M78.5 37.5117V4.51172"}),o.jsxRuntimeExports.jsx(T,{d:"M40.5 11.5L76.0072 2.6232"}),o.jsxRuntimeExports.jsx(T,{d:"M40.5 30.5L76.0072 39.3768"}),o.jsxRuntimeExports.jsx(T,{d:"M75.6192 2.71597C75.9231 2.56695 76.2597 2.49745 76.5977 2.51399C76.9357 2.53052 77.264 2.63256 77.5518 2.81053C77.8397 2.98851 78.0776 3.23661 78.2435 3.53161C78.4093 3.82661 78.4975 4.15886 78.4999 4.49726"}),o.jsxRuntimeExports.jsx(T,{d:"M78.4994 37.5101C78.4914 37.8382 78.4028 38.1592 78.2414 38.445C78.0801 38.7307 77.8509 38.9723 77.574 39.1486C77.2972 39.3248 76.9813 39.4302 76.6541 39.4555C76.3269 39.4808 75.9986 39.4252 75.698 39.2936"})]})]}),Ax=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("nozzle"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:18.75,top:17.46,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"top",orientation:n,left:50,top:1.5873,id:"2"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:81.25,top:17.46,id:"3"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:64,height:126},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"12",y:"1.6667",width:"40",height:"40",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M1.3333 124H62.6667",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M50.1883 41.6667C41.7748 41.6667 35.0143 46.3333 42.6923 59.3333C59.3476 87.5333 63.6327 119 62.855 124",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M14 41.6667C22.4135 41.6667 29.174 46.3333 21.496 59.3333C4.84066 87.5333 0.555555 119 1.33333 124",strokeLinecap:"round"})]})]}),Ix=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("strainer"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:6.06,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:93.04,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M2.293 2.29297L29.9383 66.7986",strokeDasharray:"6 6"})]})]}),$x=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(re,{...r,className:u.CSS(u.CSS.B("strainer"),t),children:[o.jsxRuntimeExports.jsxs(G,{orientation:n,children:[o.jsxRuntimeExports.jsx(w,{location:"left",orientation:n,left:6.06,top:50,id:"1"}),o.jsxRuntimeExports.jsx(w,{location:"right",orientation:n,left:93.04,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(X,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(Re,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M31 34.5L2.30611 2.33992",strokeDasharray:"6 6"}),o.jsxRuntimeExports.jsx(T,{d:"M31 34.5L2.30611 66.6601",strokeDasharray:"6 6"})]})]}),TS=({aetherKey:e,sink:t,mode:n})=>{const s=Ae.useMemoDeepEqualProps({sink:t,mode:n}),r=g.useRef({trigger:0,...s}),{setState:i}=Q.useLifecycle({aetherKey:e,type:B.Button.TYPE,schema:B.buttonStateZ,initialState:r.current});g.useEffect(()=>{r.current={...r.current,...s},i(r.current)},[s,i,e]);const l=g.useCallback(()=>{r.current.trigger+=B.MOUSE_UP_INCREMENT,i(r.current)},[i]),c=g.useCallback(()=>{r.current.trigger+=B.MOUSE_DOWN_INCREMENT,i(r.current)},[i]);return{onClick:l,onMouseDown:c,onMouseUp:l}},AS=({aetherKey:e,source:t})=>{const n=Ae.useMemoDeepEqualProps({source:t}),[,{enabled:s},r]=Q.use$1({aetherKey:e,type:B.Light.TYPE,schema:B.lightStateZ,initialState:{enabled:!1,...n}});return g.useEffect(()=>r(i=>({...i,...n})),[n,r]),{enabled:s}},IS=({aetherKey:e,source:t,sink:n})=>{const s=Ae.useMemoDeepEqualProps({source:t,sink:n}),[,{value:r},i]=Q.use$1({aetherKey:e,type:B.Setpoint.TYPE,schema:B.setpointStateZ,initialState:{trigger:0,value:0,...s}});return g.useEffect(()=>{i(c=>({...c,...s}))},[s,i]),{set:g.useCallback(c=>i(a=>({...a,trigger:a.trigger+1,command:c})),[i]),value:r}},$S=({aetherKey:e,source:t,sink:n})=>{const s=Ae.useMemoDeepEqualProps({source:t,sink:n}),[,{triggered:r,enabled:i},l]=Q.use$1({aetherKey:e,type:B.Toggle.TYPE,schema:B.toggleStateZ,initialState:{triggered:!1,enabled:!1,...s}});return g.useEffect(()=>{l(a=>({...a,...s}))},[s,l]),{toggle:g.useCallback(()=>l(a=>({...a,triggered:!a.triggered})),[l]),triggered:r,enabled:i}},dn=(e,t)=>{if(e==null)return null;const{label:n,level:s="p",orientation:r="top",direction:i,align:l,maxInlineSize:c}=e;return n==null||n.length===0?null:{key:"label",element:o.jsxRuntimeExports.jsx(K.Editable,{className:u.CSS(u.CSS.BE("symbol","label"),u.CSS.dir(i)),level:s,value:n,onChange:a=>t==null?void 0:t({label:{...e,label:a}}),allowEmpty:!0,style:{textAlign:l,maxInlineSize:c}}),location:r}},Yr=e=>{if(e==null)return null;const{show:t=!0,showChip:n=!0,showIndicator:s=!0,chip:r,indicator:i,orientation:l="bottom"}=e;return{key:"control",element:o.jsxRuntimeExports.jsxs(ne.Space,{direction:u.g.swap(l),align:"center",className:u.CSS(u.CSS.B("control-state")),size:"small",children:[t&&n&&o.jsxRuntimeExports.jsx(Vc,{size:"small",...r}),t&&s&&o.jsxRuntimeExports.jsx(Zc,{...i})]}),location:l}},ve=e=>{const t=({symbolKey:n,control:s,source:r,sink:i,label:l,onChange:c,selected:a,orientation:d="left",position:x,...p})=>{const{enabled:m,triggered:f,toggle:h}=$S({aetherKey:n,source:r,sink:i}),j=[],y=dn(l,c);y!=null&&j.push(y);const S=Yr(s);return S!=null&&j.push(S),o.jsxRuntimeExports.jsx(Ht,{editable:a,symbolKey:n,items:j,onRotate:()=>c({orientation:u.K$1.rotate90(d)}),onLocationChange:(b,E)=>{b==="label"&&c({label:{...l,orientation:E}}),b==="control"&&c({control:{...s,orientation:E}})},children:o.jsxRuntimeExports.jsx(e,{enabled:m,triggered:f,onClick:h,orientation:d,...p})})};return t.displayName=e.displayName,t},de=(e,t)=>{const n=({symbolKey:s,label:r,onChange:i,selected:l,position:c,orientation:a="left",...d})=>{const x=[],p=dn(r,i);return p!=null&&x.push(p),o.jsxRuntimeExports.jsx(Ht,{...t==null?void 0:t.grid,items:x,editable:l,symbolKey:s,onRotate:()=>i({orientation:u.K$1.rotate90(a)}),onLocationChange:(m,f)=>{m==="label"&&i({label:{...r,orientation:f}})},children:o.jsxRuntimeExports.jsx(e,{orientation:a,...d})})};return n.displayName=e.displayName,n},Lt=e=>{const t=({symbolKey:n,label:s,onChange:r,selected:i,position:l,orientation:c="left",enabled:a=!1,clickable:d=!1,...x})=>{const p=[],m=dn(s,r);m!=null&&p.push(m);const f=()=>{d&&r({enabled:!a})};return o.jsxRuntimeExports.jsx(Ht,{items:p,editable:i,symbolKey:n,onRotate:()=>r({orientation:u.K$1.rotate90(c)}),onLocationChange:(h,j)=>{h==="label"&&r({label:{...s,orientation:j}})},children:o.jsxRuntimeExports.jsx(e,{orientation:c,enabled:a,onClick:f,...x})})};return t.displayName=e.displayName,t},Bx=ve(ed),Dx=ve(td),Ox=ve(nd),zx=ve(Qu),Vx=ve(ld),Fx=ve(md),Hx=ve(yx),Zx=ve(Sx),Kx=ve(Id),Wx=ve($d),Yx=ve(Bd),Gx=ve(Od),qx=ve(Hd),Xx=ve(Zd),Ux=ve(Kd),Jx=ve(Wd),Qx=ve(Yd),ep=ve(Gd),tp=ve(Ad),np=ve(Rx),sp=ve(Cx),op=ve(wx),rp=ve(bx),ip=ve(vx),lp=ve(kx),cp=ve(dd),ap=ve(xd),up=ve(cd),dp=ve(ad),xp=ve(ud),pp=de(bd),mp=de(vd),fp=de(Vd),hp=de(Fd),gp=de(fd),jp=de(gd),Ep=de(jd),yp=de(Sd),Sp=de(od),Rp=de(rd),Cp=de(id),wp=de(kd),bp=ve(Ld),vp=de(Xd),kp=de(yd),Mp=de(Ud),Pp=de(Jd),_p=de(Qd),Lp=de(hd),Np=de(sx),Tp=de(ox,{grid:{allowRotate:!1}}),Ap=de(Dd),Ip=de(rx),$p=de(ix),Bp=de(lx),Dp=de(cx),Op=de(ax),zp=de(ux),Vp=de(dx),Fp=de(xx),Hp=de(px),Zp=de(mx),Kp=de(fx),Wp=de(hx),Yp=de(gx),Gp=de(jx),qp=de(Ex),Xp=de(Mx),Up=de(_x),Jp=de(Px),Qp=de(Lx),em=de(Nx),tm=de(Tx),nm=de(Ax),sm=de(Ix),om=de($x),rm=Lt(Md),im=Lt(sd),lm=Lt(tx),cm=Lt(nx),am=Lt(Ed),um=Lt(Pd),dm=Lt(pd),xm=de(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:r,borderRadius:i})=>o.jsxRuntimeExports.jsx(io,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:r,borderRadius:i,backgroundColor:e}),{grid:{allowCenter:!0,allowRotate:!1}}),pm=e=>o.jsxRuntimeExports.jsx(io,{...e,dimensions:{width:25,height:50}}),BS=de(({sideLength:e,rotation:t,color:n,backgroundColor:s,numSides:r,...i})=>o.jsxRuntimeExports.jsx(Kr,{numSides:3,sideLength:e,rotation:t,color:n,backgroundColor:s,...i})),mm=de(({numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:r,backgroundColor:i,strokeWidth:l,...c})=>o.jsxRuntimeExports.jsx(Kr,{numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:r,backgroundColor:i,strokeWidth:l,...c})),fm=de(({radius:e,color:t,backgroundColor:n,strokeWidth:s,...r})=>o.jsxRuntimeExports.jsx(wd,{radius:e,color:t,backgroundColor:n,strokeWidth:s,...r}),{grid:{allowRotate:!1}}),hm=de(({backgroundColor:e,borderRadius:t,onChange:n,orientation:s,color:r,dimensions:i,strokeWidth:l})=>o.jsxRuntimeExports.jsx(io,{onResize:c=>n({dimensions:c}),orientation:s,color:r,dimensions:i,boxBorderRadius:t,backgroundColor:e,strokeWidth:l}),{grid:{allowCenter:!0,allowRotate:!1}}),gm=e=>o.jsxRuntimeExports.jsx(io,{...e,dimensions:{width:25,height:50},borderRadius:0}),jm=({label:e,symbolKey:t,orientation:n="left",control:s,units:r,source:i,sink:l,color:c,onChange:a,selected:d,draggable:x,size:p,disabled:m})=>{const{value:f,set:h}=IS({aetherKey:t,source:i,sink:l}),j=[],y=Yr(s);y!=null&&j.push(y);const S=dn(e,a);return S!=null&&j.push(S),o.jsxRuntimeExports.jsx(Ht,{symbolKey:t,allowRotate:!1,editable:d&&!x,onRotate:()=>a({orientation:u.K$1.rotate90(n)}),items:j,onLocationChange:(b,E)=>{b==="label"&&a({label:{...e,orientation:E}})},children:o.jsxRuntimeExports.jsx(Td,{value:f,onChange:h,units:r,color:c,orientation:n,disabled:m,size:p})})},Em=({className:e,...t})=>o.jsxRuntimeExports.jsx(Td,{value:12,onChange:()=>{},units:"mV",style:{width:120,transform:"scale(0.95)"},className:u.CSS(u.CSS.BM("setpoint","preview"),e),disabled:!0,...t,children:o.jsxRuntimeExports.jsx(K.Text,{level:"p",children:"10.0"})}),ym=({symbolKey:e,label:t,level:n="p",position:s,textColor:r,color:i,telem:l,units:c,onChange:a,inlineSize:d=70,selected:x,draggable:p,notation:m})=>{const f=er.useTypography(n),h=(f.lineHeight+.5)*f.baseSize+2,{width:j}=br({aetherKey:e,color:r,level:n,box:u.Pt.construct(u.K.translateY({...s},1),{height:h,width:d}),telem:l,minWidth:d,notation:m}),y=[],S=dn(t,a);return S!=null&&y.push(S),o.jsxRuntimeExports.jsx(Ht,{editable:x&&!p,symbolKey:e,items:y,allowRotate:!1,onLocationChange:(b,E)=>{b==="label"&&a({label:{...t,orientation:E}})},children:o.jsxRuntimeExports.jsx(_d,{color:i,dimensions:{height:h,width:j},inlineSize:d,units:c,unitsLevel:ce.downLevel(n)})})},Sm=({color:e})=>o.jsxRuntimeExports.jsx(_d,{color:e,dimensions:{width:60,height:25},units:"psi",children:o.jsxRuntimeExports.jsx(K.Text,{level:"p",children:"50.00"})}),Rm=({symbolKey:e,label:t,orientation:n="left",sink:s,control:r,selected:i,draggable:l,onChange:c,mode:a,...d})=>{const{onMouseDown:x,onMouseUp:p}=TS({aetherKey:e,sink:s,mode:a}),m=[],f=Yr(r);return f!=null&&m.push(f),o.jsxRuntimeExports.jsx(Ht,{onRotate:()=>c({orientation:u.K$1.rotate90(n)}),editable:i,symbolKey:e,items:m,onLocationChange:(h,j)=>{h==="label"&&c({label:{...t,orientation:j}})},children:o.jsxRuntimeExports.jsx(Nd,{...t,onMouseDown:x,onMouseUp:p,orientation:n,...d})})},Cm=({label:e,...t})=>o.jsxRuntimeExports.jsx(Nd,{label:"Button",...t}),wm=({symbolKey:e,label:t,source:n,onChange:s,selected:r,...i})=>{const{enabled:l}=AS({aetherKey:e,source:n}),c=[],a=dn(t,s);return a!=null&&c.push(a),o.jsxRuntimeExports.jsx(Ht,{items:c,allowRotate:!1,editable:r,symbolKey:e,onLocationChange:(d,x)=>{d==="label"&&s({label:{...t,orientation:x}})},children:o.jsxRuntimeExports.jsx(zd,{enabled:l,...i})})},bm=({label:{label:e,level:t},orientation:n,color:s,onChange:r})=>o.jsxRuntimeExports.jsx(qd,{className:ro,onLabelChange:i=>r({label:{label:i,level:t}}),label:e,level:t,orientation:n,color:s}),vm=({label:e,...t})=>o.jsxRuntimeExports.jsx(qd,{label:"Off Page",...t,orientation:"right"}),km=de(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:r,borderRadius:i})=>o.jsxRuntimeExports.jsx(ex,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:r,borderRadius:i,backgroundColor:e})),Mm=e=>o.jsxRuntimeExports.jsx(ex,{...e,dimensions:{width:25,height:50}}),DS=({onChange:e,symbolKey:t,color:n,width:s,align:r,autoFit:i,level:l,value:c})=>o.jsxRuntimeExports.jsx(Wr,{className:ro,onChange:a=>e({value:a}),value:c,level:l,color:n,width:s,align:r,autoFit:i},t),Pm=e=>o.jsxRuntimeExports.jsx(Wr,{...e,autoFit:!0,value:"Text Box"}),q=4,Hn=2,OS=["agitator","angledReliefValve","angledSpringLoadedReliefValve","angledValve","ballValve","threeWayBallValve","gateValve","butterflyValveOne","butterflyValveTwo","breatherValve","offPageReference","box","burstDisc","isoBurstDisc","button","cap","cavityPump","checkValve","cylinder","crossBeamAgitator","electricRegulator","electricRegulatorMotorized","filter","flowStraightener","heaterElement","checkValveWithArrow","flatBladeAgitator","flowmeterGeneral","flowmeterElectromagnetic","flowmeterVariableArea","flowmeterCoriolis","flowmeterNozzle","flowmeterVenturi","flowmeterRingPiston","flowmeterPositiveDisplacement","flowmeterTurbine","flowmeterPulse","flowmeterFloatSensor","flowmeterOrifice","fourWayValve","helicalAgitator","isoCap","isoCheckValve","isoFilter","light","manualValve","needleValve","orifice","orificePlate","paddleAgitator","propellerAgitator","pistonPump","pump","regulator","regulatorManual","reliefValve","rotaryMixer","screwPump","setpoint","solenoidValve","springLoadedReliefValve","staticMixer","switch","tank","polygon","circle","textBox","threeWayValve","vacuumPump","value","valve","vent","tJunction","crossJunction","heatExchangerGeneral","heatExchangerM","heatExchangerStraightTube","diaphragmPump","ejectionPump","compressor","turboCompressor","rollerVaneCompressor","liquidRingCompressor","ejectorCompressor","centrifugalCompressor","flameArrestor","flameArrestorDetonation","flameArrestorExplosion","flameArrestorFireRes","flameArrestorFireResDetonation","thruster","nozzle","strainer","strainerCone"],zS=ce._enum(OS),ie={orientation:"left",scale:1},VS={source:B.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:B.streamChannelValue({channel:0}),rollingAverage:B.rollingAverage({windowSize:1}),stringifier:B.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"})},FS={...ie,source:B.sourcePipeline("number",{connections:[],segments:{valueStream:B.streamChannelValue({channel:0})},outlet:"valueStream"})},HS={...ie,sink:B.sinkPipeline("number",{connections:[],segments:{setter:B.setChannelValue({channel:0})},inlet:"setter"})},_m={...ie,source:B.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:B.streamChannelValue({channel:0}),threshold:B.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"})},Lm={...ie,control:{show:!0},sink:B.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:B.setChannelValue({channel:0}),setpoint:B.setpoint({truthy:1,falsy:0})},inlet:"setpoint"})},ke={..._m,...Lm},Kt={...ie,enabled:!1,clickable:!1},Y=e=>({label:{label:e,level:"p",orientation:"top",maxInlineSize:150,align:"center",direction:"x"}}),ZS={width:125,height:200},Gr={dimensions:ZS},KS=3,WS={name:"Three Way Valve",key:"threeWayValve",Form:be,Symbol:Bx,defaultProps:e=>({color:e.colors.gray.l11,...Y("Three Way Valve"),...ke}),Preview:ed,zIndex:q},YS={name:"Valve",key:"valve",Form:be,Symbol:Dx,defaultProps:e=>({color:e.colors.gray.l11,...Y("Valve"),...ke}),Preview:td,zIndex:q},GS={name:"Solenoid Valve",key:"solenoidValve",Form:be,Symbol:Ox,defaultProps:e=>({color:e.colors.gray.l11,...Y("Solenoid Valve"),normallyOpen:!1,...ke}),Preview:nd,zIndex:q},qS={name:"Four Way Valve",key:"fourWayValve",Form:be,Symbol:zx,defaultProps:e=>({color:e.colors.gray.l11,...Y("Four Way Valve"),...ke}),Preview:Qu,zIndex:q},XS={name:"Angled Valve",key:"angledValve",Form:be,Symbol:Vx,defaultProps:e=>({color:e.colors.gray.l11,...Y("Angled Valve"),...ke}),Preview:ld,zIndex:q},US={name:"Ball Valve",key:"ballValve",Form:be,Symbol:up,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ball Valve"),...ke}),Preview:cd,zIndex:q},JS={name:"Three-Way Ball Valve",key:"threeWayBallValve",Form:be,Symbol:dp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Three-Way Ball Valve"),...ke}),Preview:ad,zIndex:q},QS={name:"Gate Valve",key:"gateValve",Form:be,Symbol:xp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Gate Valve"),...ke}),Preview:ud,zIndex:q},e6={name:"Butterfly Valve (Remote)",key:"butterflyValveOne",Form:be,Symbol:cp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Butterfly Valve (Remote)"),...ke}),Preview:dd,zIndex:q},t6={name:"Butterfly Valve (Manual)",key:"butterflyValveTwo",Form:be,Symbol:ap,defaultProps:e=>({color:e.colors.gray.l11,...Y("Butterfly Valve (Manual)"),...ke}),Preview:xd,zIndex:q},n6={name:"Breather Valve",key:"breatherValve",Form:Zt,Symbol:dm,defaultProps:e=>({color:e.colors.gray.l11,...Y("Breather Valve"),...Kt}),Preview:lt(pd,["clickable"]),zIndex:q},s6={name:"Pump",key:"pump",Form:be,Symbol:Fx,defaultProps:e=>({color:e.colors.gray.l11,...Y("Pump"),...ke}),Preview:md,zIndex:q},o6={name:"Screw Pump",key:"screwPump",Form:be,Symbol:tp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Screw Pump"),...ke}),Preview:Ad,zIndex:q},r6={name:"Tank",key:"tank",Form:Uu,Symbol:xm,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.od.setAlpha(e.colors.gray.l1,0),...Y("Tank"),borderRadius:Zr,...Gr,...ie}),Preview:pm,zIndex:Hn},i6={name:"Polygon",key:"polygon",Symbol:mm,Form:aS,defaultProps:e=>({numSides:6,sideLength:_S,cornerRounding:0,rotation:0,color:e.colors.gray.l11,backgroundColor:u.od.setAlpha(e.colors.gray.l1,0),strokeWidth:2,...Y("Polygon")}),Preview:lt(Kr,["clickable"]),zIndex:Hn},l6={name:"Circle",key:"circle",Symbol:fm,Form:uS,defaultProps:e=>({radius:20,color:e.colors.gray.l11,backgroundColor:u.od.setAlpha(e.colors.gray.l1,0),...Y("Circle"),strokeWidth:2}),Preview:lt(wd,["clickable"]),zIndex:Hn},c6={name:"Cylinder",key:"cylinder",Form:SS,Symbol:km,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.od.setAlpha(e.colors.gray.l1,0),...Y("cylinder"),dimensions:{width:66,height:181},...ie}),Preview:Mm,zIndex:Hn},a6={name:"Box",key:"box",Form:RS,Symbol:hm,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.od.setAlpha(e.colors.gray.l1,0),...Y("Box"),borderRadius:KS,strokeWidth:2,...Gr,...ie}),Preview:gm,zIndex:Hn},u6={name:"Relief Valve",key:"reliefValve",Form:Zt,Symbol:im,defaultProps:e=>({color:e.colors.gray.l11,...Y("Relief Valve"),...Kt}),Preview:lt(sd,["clickable"]),zIndex:q},d6={name:"Spring Loaded Relief Valve",key:"springLoadedReliefValve",Form:Zt,Symbol:lm,defaultProps:e=>({color:e.colors.gray.l11,...Y("Spring Loaded Relief Valve"),...Kt}),Preview:lt(tx,["clickable"]),zIndex:q},x6={name:"Angled Spring Loaded Relief Valve",key:"angledSpringLoadedReliefValve",Form:Zt,Symbol:cm,defaultProps:e=>({color:e.colors.gray.l11,...Y("Angled Spring Loaded Relief Valve"),...Kt}),Preview:lt(nx,["clickable"]),zIndex:q},p6={name:"Regulator",key:"regulator",Form:pe,Symbol:pp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Regulator"),...ie}),Preview:bd,zIndex:q},m6={name:"Manual Regulator",key:"regulatorManual",Form:pe,Symbol:mp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Manual Regulator"),...ie}),Preview:lt(vd,["clickable"]),zIndex:q},f6={name:"Electric Regulator",key:"electricRegulator",Form:pe,Symbol:fp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Electric Regulator"),...ie}),Preview:Vd,zIndex:q},h6={name:"Electric Regulator Motorized",key:"electricRegulatorMotorized",Form:pe,Symbol:hp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Electric Regulator Motorized"),...ie}),Preview:Fd,zIndex:q},g6={name:"Burst Disc",key:"burstDisc",Form:pe,Symbol:gp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Burst Disc"),...ie}),Preview:fd,zIndex:q},j6={name:"ISO Burst Disc",key:"isoBurstDisc",Form:pe,Symbol:Lp,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Burst Disc"),...ie}),Preview:hd,zIndex:q},E6={name:"Cap",key:"cap",Form:pe,Symbol:jp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Cap"),...ie}),Preview:gd,zIndex:q},y6={name:"ISO Cap",key:"isoCap",Form:pe,Symbol:Ep,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Cap"),...ie}),Preview:jd,zIndex:q},S6={name:"Manual Valve",key:"manualValve",Form:Zt,Symbol:am,defaultProps:e=>({color:e.colors.gray.l11,...Y("Manual Valve"),...Kt}),Preview:lt(Ed,["clickable"]),zIndex:q},R6={name:"Orifice Plate",key:"orificePlate",Form:pe,Symbol:kp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Orifice Plate"),...ie}),Preview:yd,zIndex:q},C6={name:"ISO Filter",key:"isoFilter",Form:pe,Symbol:Mp,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Filter"),...ie}),Preview:Ud,zIndex:q},w6={name:"Filter",key:"filter",Form:pe,Symbol:yp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Filter"),...ie}),Preview:Sd,zIndex:q},b6={name:"Flow Straightener",key:"flowStraightener",Form:pe,Symbol:Pp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flow Straightener"),...ie}),Preview:Jd,zIndex:q},v6={name:"Heater Element",key:"heaterElement",Form:pe,Symbol:_p,defaultProps:e=>({color:e.colors.gray.l11,...Y("Heater Element"),...ie}),Preview:Qd,zIndex:q},k6={name:"Needle Valve",key:"needleValve",Form:Zt,Symbol:rm,defaultProps:e=>({color:e.colors.gray.l11,...Y("Needle Valve"),...Kt}),Preview:lt(Md,["clickable"]),zIndex:q},M6={name:"Check Valve",key:"checkValve",Form:pe,Symbol:Sp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Check Valve"),...ie}),Preview:od,zIndex:q},P6={name:"Orifice",key:"orifice",Form:pe,Symbol:wp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Orifice"),...ie}),Preview:kd,zIndex:q},_6={name:"Angled Relief Valve",key:"angledReliefValve",Form:Zt,Symbol:um,defaultProps:e=>({color:e.colors.gray.l11,...Y("Angled Relief Valve"),...Kt}),Preview:lt(Pd,["clickable"]),zIndex:q},L6={name:"Value",key:"value",Form:dS,Symbol:ym,Preview:Sm,defaultProps:e=>({color:e.colors.gray.l11,units:"psi",level:"h5",inlineSize:70,...Y("Value"),...ie,telem:VS.source}),zIndex:q},N6={name:"Button",key:"button",Symbol:Rm,Form:hS,Preview:Cm,defaultProps:e=>({color:e.colors.primary.z,...Y("Button"),...Lm,mode:"fire",onClickDelay:0,scale:null}),zIndex:q},T6={name:"Switch",key:"switch",Symbol:bp,Form:CS,defaultProps:()=>({...Y("Switch"),...ke,scale:null}),Preview:Ld,zIndex:q},A6={name:"Vacuum Pump",key:"vacuumPump",Symbol:Kx,Form:be,defaultProps:e=>({color:e.colors.gray.l11,...Y("Vacuum Pump"),...ke}),Preview:Id,zIndex:q},I6={name:"Compressor",key:"compressor",Symbol:np,Form:be,defaultProps:e=>({color:e.colors.gray.l11,...Y("Compressor"),...ke}),Preview:Rx,zIndex:q},$6={name:"Cavity Pump",key:"cavityPump",Symbol:Wx,Form:be,defaultProps:e=>({color:e.colors.gray.l11,...Y("Cavity Pump"),...ke}),Preview:$d,zIndex:q},B6={name:"Piston Pump",key:"pistonPump",Symbol:Yx,Form:be,defaultProps:e=>({color:e.colors.gray.l11,...Y("Piston Pump"),...ke}),Preview:Bd,zIndex:q},D6={name:"Static Mixer",key:"staticMixer",Symbol:Ap,Form:pe,defaultProps:e=>({color:e.colors.gray.l11,...Y("Static Mixer"),...ie}),Preview:Dd,zIndex:q},O6={name:"Rotary Mixer",key:"rotaryMixer",Symbol:Gx,Form:be,defaultProps:e=>({color:e.colors.gray.l11,...Y("Rotary Mixer"),...ke}),Preview:Od,zIndex:q},z6={name:"Light",key:"light",Symbol:wm,Form:pS,defaultProps:e=>({color:e.colors.gray.l11,...Y("Light"),..._m}),Preview:zd,zIndex:q},V6={name:"Setpoint",key:"setpoint",Symbol:jm,Form:jS,defaultProps:e=>({units:"mV",color:e.colors.gray.l11,size:"small",...Y("Setpoint"),...FS,...HS}),Preview:Em,zIndex:q},F6={name:"Agitator",key:"agitator",Symbol:qx,Form:be,defaultProps:e=>({color:e.colors.gray.l11,...Y("Agitator"),...ke}),Preview:Hd,zIndex:q},H6={name:"Propeller Agitator",key:"propellerAgitator",Symbol:Xx,Form:be,defaultProps:e=>({color:e.colors.gray.l11,...Y("Propeller Agitator"),...ke}),Preview:Zd,zIndex:q},Z6={name:"Flat Blade Agitator",key:"flatBladeAgitator",Symbol:Ux,Form:be,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flat Blade Agitator"),...ke}),Preview:Kd,zIndex:q},K6={name:"Paddle Agitator",key:"paddleAgitator",Symbol:Jx,Form:be,defaultProps:e=>({color:e.colors.gray.l11,...Y("Paddle Agitator"),...ke}),Preview:Wd,zIndex:q},W6={name:"Cross Beam Agitator",key:"crossBeamAgitator",Symbol:Qx,Form:be,defaultProps:e=>({color:e.colors.gray.l11,...Y("Cross Beam Agitator"),...ke}),Preview:Yd,zIndex:q},Y6={name:"Helical Agitator",key:"helicalAgitator",Symbol:ep,Form:be,defaultProps:e=>({color:e.colors.gray.l11,...Y("Helical Agitator"),...ke}),Preview:Gd,zIndex:q},G6={name:"Text Box",key:"textBox",Symbol:Wr,Form:ES,defaultProps:e=>({color:e.colors.gray.l11,autoFit:!0,align:"center",...Y("Text Box"),...ie,...Gr,level:"p",value:"Text Box",width:75}),Preview:Pm,zIndex:q},q6={name:"Off Page Reference",key:"offPageReference",Form:yS,Symbol:bm,defaultProps:e=>({color:e.colors.gray.l11,orientation:"right",...Y("Off Page Reference")}),Preview:vm,zIndex:q},X6={name:"ISO Check Valve",key:"isoCheckValve",Form:pe,Symbol:Rp,defaultProps:e=>({color:e.colors.gray.l11,...Y("ISO Check Valve"),...ie}),Preview:rd,zIndex:q},U6={name:"Check Valve Variant",key:"checkValveWithArrow",Form:pe,Symbol:Cp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Check Valve"),...ie}),Preview:id,zIndex:q},J6={name:"Vent",key:"vent",Form:pe,Symbol:vp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Vent"),...ie}),Preview:Xd,zIndex:q},Q6={name:"T Junction",key:"tJunction",Form:pe,Symbol:Np,defaultProps:e=>({color:e.colors.gray.l11,...Y(""),...ie}),Preview:sx,zIndex:q+20},eR={name:"Cross Junction",key:"crossJunction",Form:pe,Symbol:Tp,defaultProps:e=>({color:e.colors.gray.l11,...Y(""),...ie}),Preview:ox,zIndex:q+20},tR={name:"Flowmeter General",key:"flowmeterGeneral",Form:pe,Symbol:Ip,defaultProps:e=>({color:e.colors.gray.l11,...Y("General Flowmeter"),...ie}),Preview:rx,zIndex:q},nR={name:"Flowmeter Electromagnetic",key:"flowmeterElectromagnetic",Form:pe,Symbol:$p,defaultProps:e=>({color:e.colors.gray.l11,...Y("Electromagnetic Flowmeter"),...ie}),Preview:ix,zIndex:q},sR={name:"Flowmeter Variable Area",key:"flowmeterVariableArea",Form:pe,Symbol:Bp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Variable Area Flowmeter"),...ie}),Preview:lx,zIndex:q},oR={name:"Flowmeter Coriolis",key:"flowmeterCoriolis",Form:pe,Symbol:Dp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Coriolis Flowmeter"),...ie}),Preview:cx,zIndex:q},rR={name:"Flowmeter Nozzle",key:"flowmeterNozzle",Form:pe,Symbol:Op,defaultProps:e=>({color:e.colors.gray.l11,...Y("Nozzle Flowmeter"),...ie}),Preview:ax,zIndex:q},iR={name:"Flowmeter Venturi",key:"flowmeterVenturi",Form:pe,Symbol:zp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Venturi Flowmeter"),...ie}),Preview:ux,zIndex:q},lR={name:"Flowmeter Ring Piston",key:"flowmeterRingPiston",Form:pe,Symbol:Vp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ring Piston Flowmeter"),...ie}),Preview:dx,zIndex:q},cR={name:"Flowmeter Positive Displacement",key:"flowmeterPositiveDisplacement",Form:pe,Symbol:Fp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Positive Displacement Flowmeter"),...ie}),Preview:xx,zIndex:q},aR={name:"Flowmeter Turbine",key:"flowmeterTurbine",Form:pe,Symbol:Hp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Turbine Flowmeter"),...ie}),Preview:px,zIndex:q},uR={name:"Flowmeter Pulse",key:"flowmeterPulse",Form:pe,Symbol:Zp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Pulse Flowmeter"),...ie}),Preview:mx,zIndex:q},dR={name:"Flowmeter Float Sensor",key:"flowmeterFloatSensor",Form:pe,Symbol:Kp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Float Sensor Flowmeter"),...ie}),Preview:fx,zIndex:q},xR={name:"Flowmeter Orifice",key:"flowmeterOrifice",Form:pe,Symbol:Wp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Orifice Flowmeter"),...ie}),Preview:hx,zIndex:q},pR={name:"Heat Exchanger General",key:"heatExchangerGeneral",Form:pe,Symbol:Yp,defaultProps:e=>({color:e.colors.gray.l11,...Y("General Heat Exchanger"),...ie}),Preview:gx,zIndex:q},mR={name:"Heat Exchanger M",key:"heatExchangerM",Form:pe,Symbol:Gp,defaultProps:e=>({color:e.colors.gray.l11,...Y("M Heat Exchanger"),...ie}),Preview:jx,zIndex:q},fR={name:"Heat Exchanger Straight Tube",key:"heatExchangerStraightTube",Form:pe,Symbol:qp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Straight Tube Heat Exchanger"),...ie}),Preview:Ex,zIndex:q},hR={name:"Turbo Compressor",key:"turboCompressor",Form:be,Symbol:sp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Turbo Compressor"),...ke}),Preview:Cx,zIndex:q},gR={name:"Roller Vane Compressor",key:"rollerVaneCompressor",Form:be,Symbol:op,defaultProps:e=>({color:e.colors.gray.l11,...Y("Roller Vane Compressor"),...ke}),Preview:wx,zIndex:q},jR={name:"Liquid Ring Compressor",key:"liquidRingCompressor",Form:be,Symbol:rp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Liquid Ring Compressor"),...ke}),Preview:bx,zIndex:q},ER={name:"Ejector Compressor",key:"ejectorCompressor",Form:be,Symbol:ip,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ejector Compressor"),...ke}),Preview:vx,zIndex:q},yR={name:"Centrifugal Compressor",key:"centrifugalCompressor",Form:be,Symbol:lp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Centrifugal Compressor"),...ke}),Preview:kx,zIndex:q},SR={name:"Diaphragm Pump",key:"diaphragmPump",Form:be,Symbol:Hx,defaultProps:e=>({color:e.colors.gray.l11,...Y("Diaphragm Pump"),...ke}),Preview:yx,zIndex:q},RR={name:"Ejection Pump",key:"ejectionPump",Form:be,Symbol:Zx,defaultProps:e=>({color:e.colors.gray.l11,...Y("Ejection Pump"),...ke}),Preview:Sx,zIndex:q},CR={name:"Flame Arrestor",key:"flameArrestor",Form:pe,Symbol:Xp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor"),...ie}),Preview:Mx,zIndex:q},wR={name:"Flame Arrestor (Explosion-Proof)",key:"flameArrestorExplosion",Form:pe,Symbol:Up,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Explosion-Proof)"),...ie}),Preview:_x,zIndex:q},bR={name:"Flame Arrestor (Detonation-Proof)",key:"flameArrestorDetonation",Form:pe,Symbol:Jp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Detonation-Proof)"),...ie}),Preview:Px,zIndex:q},vR={name:"Flame Arrestor (Fire Resistant)",key:"flameArrestorFireRes",Form:pe,Symbol:Qp,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Fire Resistant)"),...ie}),Preview:Lx,zIndex:q},kR={name:"Flame Arrestor (Fire Resistant and Detonation-Proof)",key:"flameArrestorFireResDetonation",Form:pe,Symbol:em,defaultProps:e=>({color:e.colors.gray.l11,...Y("Flame Arrestor (Fire Resistant and Detonation-Proof)"),...ie}),Preview:Nx,zIndex:q},MR={name:"Thruster",key:"thruster",Form:be,Symbol:tm,defaultProps:e=>({color:e.colors.gray.l11,...Y("Thruster"),...ke}),Preview:Tx,zIndex:q},PR={name:"Nozzle",key:"nozzle",Form:pe,Symbol:nm,defaultProps:e=>({color:e.colors.gray.l11,...Y("Nozzle"),...ie}),Preview:Ax,zIndex:q},_R={name:"Strainer",key:"strainer",Form:pe,Symbol:sm,defaultProps:e=>({color:e.colors.gray.l11,...Y("Strainer"),...ie}),Preview:Ix,zIndex:q},LR={name:"Strainer Cone",key:"strainerCone",Form:pe,Symbol:om,defaultProps:e=>({color:e.colors.gray.l11,...Y("Strainer Cone"),...ie}),Preview:$x,zIndex:q},NR={value:L6,button:N6,tank:r6,polygon:i6,circle:l6,tJunction:Q6,crossJunction:eR,switch:T6,offPageReference:q6,light:z6,setpoint:V6,box:a6,textBox:G6,valve:YS,solenoidValve:GS,threeWayValve:WS,fourWayValve:qS,angledValve:XS,ballValve:US,threeWayBallValve:JS,gateValve:QS,butterflyValveOne:e6,butterflyValveTwo:t6,breatherValve:n6,manualValve:S6,needleValve:k6,reliefValve:u6,angledReliefValve:_6,checkValve:M6,regulator:p6,regulatorManual:m6,electricRegulator:f6,electricRegulatorMotorized:h6,springLoadedReliefValve:d6,angledSpringLoadedReliefValve:x6,pump:s6,pistonPump:B6,screwPump:o6,cavityPump:$6,diaphragmPump:SR,ejectionPump:RR,vacuumPump:A6,compressor:I6,turboCompressor:hR,rollerVaneCompressor:gR,liquidRingCompressor:jR,ejectorCompressor:ER,centrifugalCompressor:yR,staticMixer:D6,rotaryMixer:O6,burstDisc:g6,isoBurstDisc:j6,cap:E6,isoCap:y6,filter:w6,isoFilter:C6,flowStraightener:b6,heaterElement:v6,orifice:P6,orificePlate:R6,agitator:F6,propellerAgitator:H6,flatBladeAgitator:Z6,paddleAgitator:K6,crossBeamAgitator:W6,helicalAgitator:Y6,isoCheckValve:X6,checkValveWithArrow:U6,vent:J6,cylinder:c6,flowmeterGeneral:tR,flowmeterElectromagnetic:nR,flowmeterVariableArea:sR,flowmeterCoriolis:oR,flowmeterNozzle:rR,flowmeterVenturi:iR,flowmeterRingPiston:lR,flowmeterPositiveDisplacement:cR,flowmeterTurbine:aR,flowmeterPulse:uR,flowmeterFloatSensor:dR,flowmeterOrifice:xR,heatExchangerGeneral:pR,heatExchangerM:mR,heatExchangerStraightTube:fR,flameArrestor:CR,flameArrestorExplosion:wR,flameArrestorDetonation:bR,flameArrestorFireRes:vR,flameArrestorFireResDetonation:kR,thruster:MR,nozzle:PR,strainer:_R,strainerCone:LR},TR=Object.freeze(Object.defineProperty({__proto__:null,Agitator:qx,AngledReliefValve:um,AngledSpringLoadedReliefValve:cm,AngledValve:Vx,BallValve:up,Box:hm,BoxPreview:gm,BreatherValve:dm,BurstDisc:gp,ButterflyValveOne:cp,ButterflyValveTwo:ap,Button:Rm,ButtonPreview:Cm,Cap:jp,CavityPump:Wx,CentrifugalCompressor:lp,CheckValve:Sp,CheckValveWithArrow:Cp,Circle:fm,Compressor:np,CrossBeamAgitator:Qx,CrossJunction:Tp,Cylinder:km,CylinderPreview:Mm,DRAG_HANDLE_CLASS:ro,DiaphragmPump:Hx,EjectionPump:Zx,EjectorCompressor:ip,ElectricRegulator:fp,ElectricRegulatorMotorized:hp,Filter:yp,FlameArrestor:Xp,FlameArrestorDetonation:Jp,FlameArrestorExplosion:Up,FlameArrestorFireRes:Qp,FlameArrestorFireResDetonation:em,FlatBladeAgitator:Ux,FlowStraightener:Pp,FlowmeterCoriolis:Dp,FlowmeterElectromagnetic:$p,FlowmeterFloatSensor:Kp,FlowmeterGeneral:Ip,FlowmeterNozzle:Op,FlowmeterOrifice:Wp,FlowmeterPositiveDisplacement:Fp,FlowmeterPulse:Zp,FlowmeterRingPiston:Vp,FlowmeterTurbine:Hp,FlowmeterVariableArea:Bp,FlowmeterVenturi:zp,FourWayValve:zx,GateValve:xp,HeatExchangerGeneral:Yp,HeatExchangerM:Gp,HeatExchangerStraightTube:qp,HeaterElement:_p,HelicalAgitator:ep,ISOBurstDisc:Lp,ISOCap:Ep,ISOCheckValve:Rp,ISOFilter:Mp,Light:wm,LiquidRingCompressor:rp,ManualValve:am,NeedleValve:rm,Nozzle:nm,OffPageReference:bm,OffPageReferencePreview:vm,Orifice:wp,OrificePlate:kp,PaddleAgitator:Jx,PistonPump:Yx,PolygonSymbol:mm,PropellerAgitator:Xx,Pump:Fx,Regulator:pp,RegulatorManual:mp,ReliefValve:im,RollerVaneCompressor:op,RotaryMixer:Gx,SYMBOLS:NR,ScrewPump:tp,Setpoint:jm,SetpointPreview:Em,SolenoidValve:Ox,SpringLoadedReliefValve:lm,StaticMixer:Ap,Strainer:sm,StrainerCone:om,Switch:bp,TJunction:Np,Tank:xm,TankPreview:pm,TextBox:DS,TextBoxPreview:Pm,ThreeWayBallValve:dp,ThreeWayValve:Bx,Thruster:tm,Triangle:BS,TurboCompressor:sp,VacuumPump:Kx,Value:ym,ValuePreview:Sm,Valve:Dx,Vent:vp,createDummyToggle:Lt,createLabeled:de,createToggle:ve,variantZ:zS},Symbol.toStringTag,{value:"Module"}));exports.useCombinedRefs=K.useCombinedRefs;exports.useCombinedStateAndRef=K.useCombinedStateAndRef;exports.useInitializerRef=K.useInitializerRef;exports.usePrevious=K.usePrevious;exports.useStateRef=K.useStateRef;exports.useSyncedRef=K.useSyncedRef;exports.CSS=u.CSS;exports.DataType=u.m;exports.Density=u.I;exports.MultiSeries=u.ve;exports.Rate=u.Y;exports.Series=u.V;exports.TimeRange=u.B$1;exports.TimeSpan=u.g$2;exports.TimeStamp=u.d;exports.newBEM=u.newBEM;exports.Header=os.external;exports.state=ce.state;exports.Generic=$f.Generic;exports.Input=he.external;exports.preventDefault=he.preventDefault;exports.stopPropagation=he.stopPropagation;exports.Aether=Q.main;exports.Worker=Q.Context;exports.useAsyncEffect=Q.useAsyncEffect;exports.useEffectCompare=Q.useEffectCompare;exports.Align=Df.external;exports.Icon=Te.Icon;exports.Tabs=Te.external;exports.Text=bl.external;exports.Divider=As.Divider$1;exports.Button=Of.external;exports.Caret=An.Animated$1;exports.Tree=An.external;exports.componentRenderProp=fe.componentRenderProp;exports.isRenderProp=fe.isRenderProp;exports.useTransforms=Ce.useTransforms;exports.telem=B.external;exports.Haul=me.Haul;exports.compareArrayDeps=Ae.compareArrayDeps;exports.useMemoCompare=Ae.useMemoCompare;exports.useMemoDeepEqualProps=Ae.useMemoDeepEqualProps;exports.useMemoPrimitiveArray=Ae.useMemoPrimitiveArray;exports.Dialog=Ye.use$1;exports.Dropdown=Ye.Dropdown;exports.Modal=Ye.Modal;exports.useResize=Ye.useResize;exports.Color=Ge.external;exports.Triggers=vl.external;exports.List=kt.external;exports.createFilterTransform=kt.createFilterTransform;exports.fuseFilter=kt.fuseFilter;exports.proxyMemo=kt.proxyMemo;exports.createHexOpacityVariants=Ml.createHexOpacityVariants;exports.unitProperty=Ml.unitProperty;exports.useClickOutside=Vf.useClickOutside;exports.useDebouncedCallback=tr.useDebouncedCallback;exports.Menu=Ff.external;exports.Theming=Hf.external;exports.Video=Zf.Video;exports.Accordion=dh;exports.Breadcrumb=mh;exports.Canvas=Dh;exports.Channel=K1;exports.Control=Ug;exports.Device=cg;exports.Diagram=Uy;exports.Eraser=Eh;exports.Form=rg;exports.Label=gg;exports.Legend=Zh;exports.Line=Wh;exports.LinePlot=_1;exports.Log=Qy;exports.Measure=A1;exports.Mosaic=Ag;exports.Nav=Rh;exports.Note=$g;exports.OS=Vg;exports.Observe=sg;exports.Override=Hg;exports.Pluto=t0;exports.Portal=vg;exports.Progress=s0;exports.Rack=dg;exports.Range=N1;exports.Ranger=u0;exports.Resize=sh;exports.Rule=I1;exports.Schematic=TR;exports.Select=f1;exports.Status=gh;exports.Steps=x0;exports.Synnax=bh;exports.Table=g0;exports.TableCells=I0;exports.Tag=a1;exports.Telem=Wg;exports.Tooltip=qf;exports.Value=S0;exports.Viewport=M1;exports.axis=Ah;exports.control=Yg;exports.useDelayedState=Gf;
|
|
38
|
+
`)),x=d.reduce((p,m)=>p.concat(...m),[]);return[d,x]}return[[],[]]},[e]);return g.useEffect(()=>{const c=t?.target??jl,d=t?.actInsideInputWithModifier??!0;if(e!==null){const x=h=>{if(r.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!r.current||r.current&&!d)&&$u(h))return!1;const E=yl(h.code,a);if(i.current.add(h[E]),El(l,i.current,!1)){const S=h.composedPath?.()?.[0]||h.target,R=S?.nodeName==="BUTTON"||S?.nodeName==="A";t.preventDefault!==!1&&(r.current||!R)&&h.preventDefault(),s(!0)}},p=h=>{const j=yl(h.code,a);El(l,i.current,!0)?(s(!1),i.current.clear()):i.current.delete(h[j]),h.key==="Meta"&&i.current.clear(),r.current=!1},m=()=>{i.current.clear(),s(!1)};return c?.addEventListener("keydown",x),c?.addEventListener("keyup",p),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c?.removeEventListener("keydown",x),c?.removeEventListener("keyup",p),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,s]),n}function El(e,t,n){return e.filter(s=>n||s.length===t.size).some(s=>s.every(r=>t.has(r)))}function yl(e,t){return t.includes(e)?"code":"key"}const rS=()=>{const e=be();return g.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:s}=e.getState();return s?s.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[s,r,i],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??s,y:t.y??r,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,s]=e.getState().transform;return{x:t,y:n,zoom:s}},setCenter:async(t,n,s)=>e.getState().setCenter(t,n,s),fitBounds:async(t,n)=>{const{width:s,height:r,minZoom:i,maxZoom:l,panZoom:a}=e.getState(),c=Gr(t,s,r,i,l,n?.padding??.1);return a?(await a.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:s,snapGrid:r,snapToGrid:i,domNode:l}=e.getState();if(!l)return t;const{x:a,y:c}=l.getBoundingClientRect(),d={x:t.x-a,y:t.y-c},x=n.snapGrid??r,p=n.snapToGrid??i;return On(d,s,p,x)},flowToScreenPosition:t=>{const{transform:n,domNode:s}=e.getState();if(!s)return t;const{x:r,y:i}=s.getBoundingClientRect(),l=Ss(t,n);return{x:l.x+r,y:l.y+i}}}),[])};function ld(e,t){const n=[],s=new Map,r=[];for(const i of e)if(i.type==="add"){r.push(i);continue}else if(i.type==="remove"||i.type==="replace")s.set(i.id,[i]);else{const l=s.get(i.id);l?l.push(i):s.set(i.id,[i])}for(const i of t){const l=s.get(i.id);if(!l){n.push(i);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}const a={...i};for(const c of l)iS(c,a);n.push(a)}return r.length&&r.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function iS(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??={},t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function ad(e,t){return ld(e,t)}function cd(e,t){return ld(e,t)}function Ct(e,t){return{id:e,type:"select",selected:t}}function Kt(e,t=new Set,n=!1){const s=[];for(const[r,i]of e){const l=t.has(r);!(i.selected===void 0&&!l)&&i.selected!==l&&(n&&(i.selected=l),s.push(Ct(i.id,l)))}return s}function Sl({items:e=[],lookup:t}){const n=[],s=new Map(e.map(r=>[r.id,r]));for(const[r,i]of e.entries()){const l=t.get(i.id),a=l?.internals?.userNode??l;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:"replace"}),a===void 0&&n.push({item:i,type:"add",index:r})}for(const[r]of t)s.get(r)===void 0&&n.push({id:r,type:"remove"});return n}function Rl(e){return{id:e.id,type:"remove"}}const Cl=e=>P5(e),lS=e=>Nu(e);function ud(e){return g.forwardRef(e)}const aS=typeof window<"u"?g.useLayoutEffect:g.useEffect;function wl(e){const[t,n]=g.useState(BigInt(0)),[s]=g.useState(()=>cS(()=>n(r=>r+BigInt(1))));return aS(()=>{const r=s.get();r.length&&(e(r),s.reset())},[t]),s}function cS(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const dd=g.createContext(null);function uS({children:e}){const t=be(),n=g.useCallback(a=>{const{nodes:c=[],setNodes:d,hasDefaultNodes:x,onNodesChange:p,nodeLookup:m,fitViewQueued:h}=t.getState();let j=c;for(const S of a)j=typeof S=="function"?S(j):S;const E=Sl({items:j,lookup:m});x&&d(j),E.length>0?p?.(E):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:S,nodes:R,setNodes:v}=t.getState();S&&v(R)})},[]),s=wl(n),r=g.useCallback(a=>{const{edges:c=[],setEdges:d,hasDefaultEdges:x,onEdgesChange:p,edgeLookup:m}=t.getState();let h=c;for(const j of a)h=typeof j=="function"?j(h):j;x?d(h):p&&p(Sl({items:h,lookup:m}))},[]),i=wl(r),l=g.useMemo(()=>({nodeQueue:s,edgeQueue:i}),[]);return o.jsxRuntimeExports.jsx(dd.Provider,{value:l,children:e})}function dS(){const e=g.useContext(dd);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const xS=e=>!!e.panZoom;function Bt(){const e=rS(),t=be(),n=dS(),s=je(xS),r=g.useMemo(()=>{const i=p=>t.getState().nodeLookup.get(p),l=p=>{n.nodeQueue.push(p)},a=p=>{n.edgeQueue.push(p)},c=p=>{const{nodeLookup:m,nodeOrigin:h}=t.getState(),j=Cl(p)?p:m.get(p.id),E=j.parentId?Iu(j.position,j.measured,j.parentId,m,h):j.position,S={...j,position:E,width:j.measured?.width??j.width,height:j.measured?.height??j.height};return Qt(S)},d=(p,m,h={replace:!1})=>{l(j=>j.map(E=>{if(E.id===p){const S=typeof m=="function"?m(E):m;return h.replace&&Cl(S)?S:{...E,...S}}return E}))},x=(p,m,h={replace:!1})=>{a(j=>j.map(E=>{if(E.id===p){const S=typeof m=="function"?m(E):m;return h.replace&&lS(S)?S:{...E,...S}}return E}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>i(p)?.internals.userNode,getInternalNode:i,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(m=>({...m}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:l,setEdges:a,addNodes:p=>{const m=Array.isArray(p)?p:[p];n.nodeQueue.push(h=>[...h,...m])},addEdges:p=>{const m=Array.isArray(p)?p:[p];n.edgeQueue.push(h=>[...h,...m])},toObject:()=>{const{nodes:p=[],edges:m=[],transform:h}=t.getState(),[j,E,S]=h;return{nodes:p.map(R=>({...R})),edges:m.map(R=>({...R})),viewport:{x:j,y:E,zoom:S}}},deleteElements:async({nodes:p=[],edges:m=[]})=>{const{nodes:h,edges:j,onNodesDelete:E,onEdgesDelete:S,triggerNodeChanges:R,triggerEdgeChanges:v,onDelete:y,onBeforeDelete:C}=t.getState(),{nodes:M,edges:k}=await $5({nodesToRemove:p,edgesToRemove:m,nodes:h,edges:j,onBeforeDelete:C}),A=k.length>0,I=M.length>0;if(A){const B=k.map(Rl);S?.(k),v(B)}if(I){const B=M.map(Rl);E?.(M),R(B)}return(I||A)&&y?.({nodes:M,edges:k}),{deletedNodes:M,deletedEdges:k}},getIntersectingNodes:(p,m=!0,h)=>{const j=Gi(p),E=j?p:c(p),S=h!==void 0;return E?(h||t.getState().nodes).filter(R=>{const v=t.getState().nodeLookup.get(R.id);if(v&&!j&&(R.id===p.id||!v.internals.positionAbsolute))return!1;const y=Qt(S?R:v),C=wn(y,E);return m&&C>0||C>=E.width*E.height}):[]},isNodeIntersecting:(p,m,h=!0)=>{const E=Gi(p)?p:c(p);if(!E)return!1;const S=wn(E,m);return h&&S>0||S>=E.width*E.height},updateNode:d,updateNodeData:(p,m,h={replace:!1})=>{d(p,j=>{const E=typeof m=="function"?m(j):m;return h.replace?{...j,data:E}:{...j,data:{...j.data,...E}}},h)},updateEdge:x,updateEdgeData:(p,m,h={replace:!1})=>{x(p,j=>{const E=typeof m=="function"?m(j):m;return h.replace?{...j,data:E}:{...j,data:{...j.data,...E}}},h)},getNodesBounds:p=>{const{nodeLookup:m,nodeOrigin:h}=t.getState();return T5(p,{nodeLookup:m,nodeOrigin:h})},getHandleConnections:({type:p,id:m,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${p}${m?`-${m}`:""}`)?.values()??[]),getNodeConnections:({type:p,handleId:m,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${p?m?`-${p}-${m}`:`-${p}`:""}`)?.values()??[]),fitView:async p=>{const m=t.getState().fitViewResolver??z5();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:m}),n.nodeQueue.push(h=>[...h]),m.promise}}},[]);return g.useMemo(()=>({...r,...e,viewportInitialized:s}),[s])}const bl=e=>e.selected,pS=typeof window<"u"?window:void 0;function mS({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=be(),{deleteElements:s}=Bt(),r=vn(e,{actInsideInputWithModifier:!1}),i=vn(t,{target:pS});g.useEffect(()=>{if(r){const{edges:l,nodes:a}=n.getState();s({nodes:a.filter(bl),edges:l.filter(bl)}),n.setState({nodesSelectionActive:!1})}},[r]),g.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function fS(e){const t=be();g.useEffect(()=>{const n=()=>{if(!e.current)return!1;const s=Xr(e.current);(s.height===0||s.width===0)&&t.getState().onError?.("004",Ae.error004()),t.setState({width:s.width||500,height:s.height||500})};if(e.current){n(),window.addEventListener("resize",n);const s=new ResizeObserver(()=>n());return s.observe(e.current),()=>{window.removeEventListener("resize",n),s&&e.current&&s.unobserve(e.current)}}},[])}const Ys={position:"absolute",width:"100%",height:"100%",top:0,left:0},hS=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function gS({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:s=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=bt.Free,zoomOnDoubleClick:l=!0,panOnDrag:a=!0,defaultViewport:c,translateExtent:d,minZoom:x,maxZoom:p,zoomActivationKeyCode:m,preventScrolling:h=!0,children:j,noWheelClassName:E,noPanClassName:S,onViewportChange:R,isControlledViewport:v,paneClickDistance:y}){const C=be(),M=g.useRef(null),{userSelectionActive:k,lib:A}=je(hS,ve),I=vn(m),B=g.useRef();fS(M);const V=g.useCallback(D=>{R?.({x:D[0],y:D[1],zoom:D[2]}),v||C.setState({transform:D})},[R,v]);return g.useEffect(()=>{if(M.current){B.current=yy({domNode:M.current,minZoom:x,maxZoom:p,translateExtent:d,viewport:c,paneClickDistance:y,onDraggingChange:w=>C.setState({paneDragging:w}),onPanZoomStart:(w,P)=>{const{onViewportChangeStart:L,onMoveStart:O}=C.getState();O?.(w,P),L?.(P)},onPanZoom:(w,P)=>{const{onViewportChange:L,onMove:O}=C.getState();O?.(w,P),L?.(P)},onPanZoomEnd:(w,P)=>{const{onViewportChangeEnd:L,onMoveEnd:O}=C.getState();O?.(w,P),L?.(P)}});const{x:D,y:$,zoom:H}=B.current.getViewport();return C.setState({panZoom:B.current,transform:[D,$,H],domNode:M.current.closest(".react-flow")}),()=>{B.current?.destroy()}}},[]),g.useEffect(()=>{B.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:s,panOnScrollSpeed:r,panOnScrollMode:i,zoomOnDoubleClick:l,panOnDrag:a,zoomActivationKeyPressed:I,preventScrolling:h,noPanClassName:S,userSelectionActive:k,noWheelClassName:E,lib:A,onTransformChange:V})},[e,t,n,s,r,i,l,a,I,h,S,k,E,A,V]),o.jsxRuntimeExports.jsx("div",{className:"react-flow__renderer",ref:M,style:Ys,children:j})}const jS=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function ES(){const{userSelectionActive:e,userSelectionRect:t}=je(jS,ve);return e&&t?o.jsxRuntimeExports.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const yo=(e,t)=>n=>{n.target===t.current&&e?.(n)},yS=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function SS({isSelecting:e,selectionKeyPressed:t,selectionMode:n=qt.Full,panOnDrag:s,selectionOnDrag:r,onSelectionStart:i,onSelectionEnd:l,onPaneClick:a,onPaneContextMenu:c,onPaneScroll:d,onPaneMouseEnter:x,onPaneMouseMove:p,onPaneMouseLeave:m,children:h}){const j=be(),{userSelectionActive:E,elementsSelectable:S,dragging:R,connectionInProgress:v}=je(yS,ve),y=S&&(e||E),C=g.useRef(null),M=g.useRef(),k=g.useRef(new Set),A=g.useRef(new Set),I=g.useRef(!1),B=g.useRef(!1),V=O=>{if(I.current||v){I.current=!1;return}a?.(O),j.getState().resetSelectedElements(),j.setState({nodesSelectionActive:!1})},D=O=>{if(Array.isArray(s)&&s?.includes(2)){O.preventDefault();return}c?.(O)},$=d?O=>d(O):void 0,H=O=>{const{resetSelectedElements:z,domNode:F}=j.getState();if(M.current=F?.getBoundingClientRect(),!S||!e||O.button!==0||O.target!==C.current||!M.current)return;O.target?.setPointerCapture?.(O.pointerId),B.current=!0,I.current=!1;const{x:Z,y:Y}=qe(O.nativeEvent,M.current);z(),j.setState({userSelectionRect:{width:0,height:0,startX:Z,startY:Y,x:Z,y:Y}}),i?.(O)},w=O=>{const{userSelectionRect:z,transform:F,nodeLookup:Z,edgeLookup:Y,connectionLookup:q,triggerNodeChanges:oe,triggerEdgeChanges:Q,defaultEdgeOptions:ue}=j.getState();if(!M.current||!z)return;I.current=!0;const{x:te,y:ne}=qe(O.nativeEvent,M.current),{startX:ee,startY:le}=z,ge={startX:ee,startY:le,x:te<ee?te:ee,y:ne<le?ne:le,width:Math.abs(te-ee),height:Math.abs(ne-le)},ye=k.current,G=A.current;k.current=new Set(Kr(Z,ge,F,n===qt.Partial,!0).map(ie=>ie.id)),A.current=new Set;const re=ue?.selectable??!0;for(const ie of k.current){const we=q.get(ie);if(we)for(const{edgeId:ke}of we.values()){const st=Y.get(ke);st&&(st.selectable??re)&&A.current.add(ke)}}if(!Xi(ye,k.current)){const ie=Kt(Z,k.current,!0);oe(ie)}if(!Xi(G,A.current)){const ie=Kt(Y,A.current);Q(ie)}j.setState({userSelectionRect:ge,userSelectionActive:!0,nodesSelectionActive:!1})},P=O=>{if(O.button!==0||!B.current)return;O.target?.releasePointerCapture?.(O.pointerId);const{userSelectionRect:z}=j.getState();!E&&z&&O.target===C.current&&V?.(O),j.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:k.current.size>0}),l?.(O),(t||r)&&(I.current=!1),B.current=!1},L=s===!0||Array.isArray(s)&&s.includes(0);return o.jsxRuntimeExports.jsxs("div",{className:Me(["react-flow__pane",{draggable:L,dragging:R,selection:e}]),onClick:y?void 0:yo(V,C),onContextMenu:yo(D,C),onWheel:yo($,C),onPointerEnter:y?void 0:x,onPointerDown:y?H:p,onPointerMove:y?w:p,onPointerUp:y?P:void 0,onPointerLeave:m,ref:C,style:Ys,children:[h,o.jsxRuntimeExports.jsx(ES,{})]})}function Ko({id:e,store:t,unselect:n=!1,nodeRef:s}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:l,nodeLookup:a,onError:c}=t.getState(),d=a.get(e);if(!d){c?.("012",Ae.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&l)&&(i({nodes:[d],edges:[]}),requestAnimationFrame(()=>s?.current?.blur())):r([e])}function xd({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:s,nodeId:r,isSelectable:i,nodeClickDistance:l}){const a=be(),[c,d]=g.useState(!1),x=g.useRef();return g.useEffect(()=>{x.current=ry({getStoreItems:()=>a.getState(),onNodeMouseDown:p=>{Ko({id:p,store:a,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),g.useEffect(()=>{if(t)x.current?.destroy();else if(e.current)return x.current?.update({noDragClassName:n,handleSelector:s,domNode:e.current,isSelectable:i,nodeId:r,nodeClickDistance:l}),()=>{x.current?.destroy()}},[n,s,t,i,e,r]),c}const RS=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function pd(){const e=be();return g.useCallback(n=>{const{nodeExtent:s,snapToGrid:r,snapGrid:i,nodesDraggable:l,onError:a,updateNodePositions:c,nodeLookup:d,nodeOrigin:x}=e.getState(),p=new Map,m=RS(l),h=r?i[0]:5,j=r?i[1]:5,E=n.direction.x*h*n.factor,S=n.direction.y*j*n.factor;for(const[,R]of d){if(!m(R))continue;let v={x:R.internals.positionAbsolute.x+E,y:R.internals.positionAbsolute.y+S};r&&(v=Hs(v,i));const{position:y,positionAbsolute:C}=ku({nodeId:R.id,nextPosition:v,nodeLookup:d,nodeExtent:s,nodeOrigin:x,onError:a});R.position=y,R.internals.positionAbsolute=C,p.set(R.id,R)}c(p)},[])}const ei=g.createContext(null),CS=ei.Provider;ei.Consumer;const md=()=>g.useContext(ei),wS=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),bS=(e,t,n)=>s=>{const{connectionClickStartHandle:r,connectionMode:i,connection:l}=s,{fromHandle:a,toHandle:c,isValid:d}=l,x=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:a?.nodeId===e&&a?.id===t&&a?.type===n,connectingTo:x,clickConnecting:r?.nodeId===e&&r?.id===t&&r?.type===n,isPossibleEndHandle:i===Tt.Strict?a?.type!==n:e!==a?.nodeId||t!==a?.id,connectionInProcess:!!a,clickConnectionInProcess:!!r,valid:x&&d}};function vS({type:e="source",position:t=J.Top,isValidConnection:n,isConnectable:s=!0,isConnectableStart:r=!0,isConnectableEnd:i=!0,id:l,onConnect:a,children:c,className:d,onMouseDown:x,onTouchStart:p,...m},h){const j=l||null,E=e==="target",S=be(),R=md(),{connectOnClick:v,noPanClassName:y,rfId:C}=je(wS,ve),{connectingFrom:M,connectingTo:k,clickConnecting:A,isPossibleEndHandle:I,connectionInProcess:B,clickConnectionInProcess:V,valid:D}=je(bS(R,j,e),ve);R||S.getState().onError?.("010",Ae.error010());const $=P=>{const{defaultEdgeOptions:L,onConnect:O,hasDefaultEdges:z}=S.getState(),F={...L,...P};if(z){const{edges:Z,setEdges:Y}=S.getState();Y(Fu(F,Z))}O?.(F),a?.(F)},H=P=>{if(!R)return;const L=Bu(P.nativeEvent);if(r&&(L&&P.button===0||!L)){const O=S.getState();Wo.onPointerDown(P.nativeEvent,{autoPanOnConnect:O.autoPanOnConnect,connectionMode:O.connectionMode,connectionRadius:O.connectionRadius,domNode:O.domNode,nodeLookup:O.nodeLookup,lib:O.lib,isTarget:E,handleId:j,nodeId:R,flowId:O.rfId,panBy:O.panBy,cancelConnection:O.cancelConnection,onConnectStart:O.onConnectStart,onConnectEnd:O.onConnectEnd,updateConnection:O.updateConnection,onConnect:$,isValidConnection:n||O.isValidConnection,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:O.autoPanSpeed,dragThreshold:O.connectionDragThreshold})}L?x?.(P):p?.(P)},w=P=>{const{onClickConnectStart:L,onClickConnectEnd:O,connectionClickStartHandle:z,connectionMode:F,isValidConnection:Z,lib:Y,rfId:q,nodeLookup:oe,connection:Q}=S.getState();if(!R||!z&&!r)return;if(!z){L?.(P.nativeEvent,{nodeId:R,handleId:j,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:R,type:e,id:j}});return}const ue=Ou(P.target),te=n||Z,{connection:ne,isValid:ee}=Wo.isValid(P.nativeEvent,{handle:{nodeId:R,id:j,type:e},connectionMode:F,fromNodeId:z.nodeId,fromHandleId:z.id||null,fromType:z.type,isValidConnection:te,flowId:q,doc:ue,lib:Y,nodeLookup:oe});ee&&ne&&$(ne);const le=structuredClone(Q);delete le.inProgress,le.toPosition=le.toHandle?le.toHandle.position:null,O?.(P,le),S.setState({connectionClickStartHandle:null})};return o.jsxRuntimeExports.jsx("div",{"data-handleid":j,"data-nodeid":R,"data-handlepos":t,"data-id":`${C}-${R}-${j}-${e}`,className:Me(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,d,{source:!E,target:E,connectable:s,connectablestart:r,connectableend:i,clickconnecting:A,connectingfrom:M,connectingto:k,valid:D,connectionindicator:s&&(!B||I)&&(B||V?i:r)}]),onMouseDown:H,onTouchStart:H,onClick:v?w:void 0,ref:h,...m,children:c})}const _n=g.memo(ud(vS));function _S({data:e,isConnectable:t,sourcePosition:n=J.Bottom}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[e?.label,o.jsxRuntimeExports.jsx(_n,{type:"source",position:n,isConnectable:t})]})}function MS({data:e,isConnectable:t,targetPosition:n=J.Top,sourcePosition:s=J.Bottom}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(_n,{type:"target",position:n,isConnectable:t}),e?.label,o.jsxRuntimeExports.jsx(_n,{type:"source",position:s,isConnectable:t})]})}function NS(){return null}function kS({data:e,isConnectable:t,targetPosition:n=J.Top}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(_n,{type:"target",position:n,isConnectable:t}),e?.label]})}const Cs={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},vl={input:_S,default:MS,output:kS,group:NS};function LS(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}const PS=e=>{const{width:t,height:n,x:s,y:r}=In(e.nodeLookup,{filter:i=>!!i.selected});return{width:Ye(t)?t:null,height:Ye(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${s}px,${r}px)`}};function TS({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const s=be(),{width:r,height:i,transformString:l,userSelectionActive:a}=je(PS,ve),c=pd(),d=g.useRef(null);if(g.useEffect(()=>{n||d.current?.focus({preventScroll:!0})},[n]),xd({nodeRef:d}),a||!r||!i)return null;const x=e?m=>{const h=s.getState().nodes.filter(j=>j.selected);e(m,h)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(Cs,m.key)&&(m.preventDefault(),c({direction:Cs[m.key],factor:m.shiftKey?4:1}))};return o.jsxRuntimeExports.jsx("div",{className:Me(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:o.jsxRuntimeExports.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:r,height:i}})})}const _l=typeof window<"u"?window:void 0,AS=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function fd({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:l,paneClickDistance:a,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:x,selectionMode:p,onSelectionStart:m,onSelectionEnd:h,multiSelectionKeyCode:j,panActivationKeyCode:E,zoomActivationKeyCode:S,elementsSelectable:R,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:M,panOnScrollMode:k,zoomOnDoubleClick:A,panOnDrag:I,defaultViewport:B,translateExtent:V,minZoom:D,maxZoom:$,preventScrolling:H,onSelectionContextMenu:w,noWheelClassName:P,noPanClassName:L,disableKeyboardA11y:O,onViewportChange:z,isControlledViewport:F}){const{nodesSelectionActive:Z,userSelectionActive:Y}=je(AS),q=vn(d,{target:_l}),oe=vn(E,{target:_l}),Q=oe||I,ue=oe||C,te=x&&Q!==!0,ne=q||Y||te;return mS({deleteKeyCode:c,multiSelectionKeyCode:j}),o.jsxRuntimeExports.jsx(gS,{onPaneContextMenu:i,elementsSelectable:R,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:ue,panOnScrollSpeed:M,panOnScrollMode:k,zoomOnDoubleClick:A,panOnDrag:!q&&Q,defaultViewport:B,translateExtent:V,minZoom:D,maxZoom:$,zoomActivationKeyCode:S,preventScrolling:H,noWheelClassName:P,noPanClassName:L,onViewportChange:z,isControlledViewport:F,paneClickDistance:a,children:o.jsxRuntimeExports.jsxs(SS,{onSelectionStart:m,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:l,panOnDrag:Q,isSelecting:!!ne,selectionMode:p,selectionKeyPressed:q,selectionOnDrag:te,children:[e,Z&&o.jsxRuntimeExports.jsx(TS,{onSelectionContextMenu:w,noPanClassName:L,disableKeyboardA11y:O})]})})}fd.displayName="FlowRenderer";const IS=g.memo(fd),OS=e=>t=>e?Kr(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function $S(e){return je(g.useCallback(OS(e),[e]),ve)}const BS=e=>e.updateNodeInternals;function DS(){const e=je(BS),[t]=g.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const s=new Map;n.forEach(r=>{const i=r.target.getAttribute("data-id");s.set(i,{id:i,nodeElement:r.target,force:!0})}),e(s)}));return g.useEffect(()=>()=>{t?.disconnect()},[t]),t}function zS({node:e,nodeType:t,hasDimensions:n,resizeObserver:s}){const r=be(),i=g.useRef(null),l=g.useRef(null),a=g.useRef(e.sourcePosition),c=g.useRef(e.targetPosition),d=g.useRef(t),x=n&&!!e.internals.handleBounds;return g.useEffect(()=>{i.current&&!e.hidden&&(!x||l.current!==i.current)&&(l.current&&s?.unobserve(l.current),s?.observe(i.current),l.current=i.current)},[x,e.hidden]),g.useEffect(()=>()=>{l.current&&(s?.unobserve(l.current),l.current=null)},[]),g.useEffect(()=>{if(i.current){const p=d.current!==t,m=a.current!==e.sourcePosition,h=c.current!==e.targetPosition;(p||m||h)&&(d.current=t,a.current=e.sourcePosition,c.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function HS({id:e,onClick:t,onMouseEnter:n,onMouseMove:s,onMouseLeave:r,onContextMenu:i,onDoubleClick:l,nodesDraggable:a,elementsSelectable:c,nodesConnectable:d,nodesFocusable:x,resizeObserver:p,noDragClassName:m,noPanClassName:h,disableKeyboardA11y:j,rfId:E,nodeTypes:S,nodeClickDistance:R,onError:v}){const{node:y,internals:C,isParent:M}=je(ee=>{const le=ee.nodeLookup.get(e),ge=ee.parentLookup.has(e);return{node:le,internals:le.internals,isParent:ge}},ve);let k=y.type||"default",A=S?.[k]||vl[k];A===void 0&&(v?.("003",Ae.error003(k)),k="default",A=vl.default);const I=!!(y.draggable||a&&typeof y.draggable>"u"),B=!!(y.selectable||c&&typeof y.selectable>"u"),V=!!(y.connectable||d&&typeof y.connectable>"u"),D=!!(y.focusable||x&&typeof y.focusable>"u"),$=be(),H=Au(y),w=zS({node:y,nodeType:k,hasDimensions:H,resizeObserver:p}),P=xd({nodeRef:w,disabled:y.hidden||!I,noDragClassName:m,handleSelector:y.dragHandle,nodeId:e,isSelectable:B,nodeClickDistance:R}),L=pd();if(y.hidden)return null;const O=ut(y),z=LS(y),F=B||I||t||n||s||r,Z=n?ee=>n(ee,{...C.userNode}):void 0,Y=s?ee=>s(ee,{...C.userNode}):void 0,q=r?ee=>r(ee,{...C.userNode}):void 0,oe=i?ee=>i(ee,{...C.userNode}):void 0,Q=l?ee=>l(ee,{...C.userNode}):void 0,ue=ee=>{const{selectNodesOnDrag:le,nodeDragThreshold:ge}=$.getState();B&&(!le||!I||ge>0)&&Ko({id:e,store:$,nodeRef:w}),t&&t(ee,{...C.userNode})},te=ee=>{if(!($u(ee.nativeEvent)||j)){if(bu.includes(ee.key)&&B){const le=ee.key==="Escape";Ko({id:e,store:$,unselect:le,nodeRef:w})}else if(I&&y.selected&&Object.prototype.hasOwnProperty.call(Cs,ee.key)){ee.preventDefault();const{ariaLabelConfig:le}=$.getState();$.setState({ariaLiveMessage:le["node.a11yDescription.ariaLiveMessage"]({direction:ee.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),L({direction:Cs[ee.key],factor:ee.shiftKey?4:1})}}},ne=()=>{if(j||!w.current?.matches(":focus-visible"))return;const{transform:ee,width:le,height:ge,autoPanOnNodeFocus:ye,setCenter:G}=$.getState();if(!ye)return;Kr(new Map([[e,y]]),{x:0,y:0,width:le,height:ge},ee,!0).length>0||G(y.position.x+O.width/2,y.position.y+O.height/2,{zoom:ee[2]})};return o.jsxRuntimeExports.jsx("div",{className:Me(["react-flow__node",`react-flow__node-${k}`,{[h]:I},y.className,{selected:y.selected,selectable:B,parent:M,draggable:I,dragging:P}]),ref:w,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:F?"all":"none",visibility:H?"visible":"hidden",...y.style,...z},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:Z,onMouseMove:Y,onMouseLeave:q,onContextMenu:oe,onClick:ue,onDoubleClick:Q,onKeyDown:D?te:void 0,tabIndex:D?0:void 0,onFocus:D?ne:void 0,role:y.ariaRole??(D?"group":void 0),"aria-roledescription":"node","aria-describedby":j?void 0:`${od}-${E}`,"aria-label":y.ariaLabel,...y.domAttributes,children:o.jsxRuntimeExports.jsx(CS,{value:e,children:o.jsxRuntimeExports.jsx(A,{id:e,data:y.data,type:k,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:B,draggable:I,deletable:y.deletable??!0,isConnectable:V,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:P,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...O})})})}const VS=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function hd(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:r,onError:i}=je(VS,ve),l=$S(e.onlyRenderVisibleElements),a=DS();return o.jsxRuntimeExports.jsx("div",{className:"react-flow__nodes",style:Ys,children:l.map(c=>o.jsxRuntimeExports.jsx(HS,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:a,nodesDraggable:t,nodesConnectable:n,nodesFocusable:s,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}hd.displayName="NodeRenderer";const FS=g.memo(hd);function ZS(e){return je(g.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const s=[];if(n.width&&n.height)for(const r of n.edges){const i=n.nodeLookup.get(r.source),l=n.nodeLookup.get(r.target);i&&l&&Z5({sourceNode:i,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&s.push(r.id)}return s},[e]),ve)}const YS=({color:e="none",strokeWidth:t=1})=>o.jsxRuntimeExports.jsx("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),WS=({color:e="none",strokeWidth:t=1})=>o.jsxRuntimeExports.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),Ml={[js.Arrow]:YS,[js.ArrowClosed]:WS};function KS(e){const t=be();return g.useMemo(()=>Object.prototype.hasOwnProperty.call(Ml,e)?Ml[e]:(t.getState().onError?.("009",Ae.error009(e)),null),[e])}const GS=({id:e,type:t,color:n,width:s=12.5,height:r=12.5,markerUnits:i="strokeWidth",strokeWidth:l,orient:a="auto-start-reverse"})=>{const c=KS(t);return c?o.jsxRuntimeExports.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${s}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:a,refX:"0",refY:"0",children:o.jsxRuntimeExports.jsx(c,{color:n,strokeWidth:l})}):null},gd=({defaultColor:e,rfId:t})=>{const n=je(i=>i.edges),s=je(i=>i.defaultEdgeOptions),r=g.useMemo(()=>q5(n,{id:t,defaultColor:e,defaultMarkerStart:s?.markerStart,defaultMarkerEnd:s?.markerEnd}),[n,s,t,e]);return r.length?o.jsxRuntimeExports.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:o.jsxRuntimeExports.jsx("defs",{children:r.map(i=>o.jsxRuntimeExports.jsx(GS,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};gd.displayName="MarkerDefinitions";var XS=g.memo(gd);function jd({x:e,y:t,label:n,labelStyle:s,labelShowBg:r=!0,labelBgStyle:i,labelBgPadding:l=[2,4],labelBgBorderRadius:a=2,children:c,className:d,...x}){const[p,m]=g.useState({x:1,y:0,width:0,height:0}),h=Me(["react-flow__edge-textwrapper",d]),j=g.useRef(null);return g.useEffect(()=>{if(j.current){const E=j.current.getBBox();m({x:E.x,y:E.y,width:E.width,height:E.height})}},[n]),n?o.jsxRuntimeExports.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:h,visibility:p.width?"visible":"hidden",...x,children:[r&&o.jsxRuntimeExports.jsx("rect",{width:p.width+2*l[0],x:-l[0],y:-l[1],height:p.height+2*l[1],className:"react-flow__edge-textbg",style:i,rx:a,ry:a}),o.jsxRuntimeExports.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:j,style:s,children:n}),c]}):null}jd.displayName="EdgeText";const US=g.memo(jd);function We({path:e,labelX:t,labelY:n,label:s,labelStyle:r,labelShowBg:i,labelBgStyle:l,labelBgPadding:a,labelBgBorderRadius:c,interactionWidth:d=20,...x}){return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("path",{...x,d:e,fill:"none",className:Me(["react-flow__edge-path",x.className])}),d&&o.jsxRuntimeExports.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}),s&&Ye(t)&&Ye(n)?o.jsxRuntimeExports.jsx(US,{x:t,y:n,label:s,labelStyle:r,labelShowBg:i,labelBgStyle:l,labelBgPadding:a,labelBgBorderRadius:c}):null]})}function Nl({pos:e,x1:t,y1:n,x2:s,y2:r}){return e===J.Left||e===J.Right?[.5*(t+s),n]:[t,.5*(n+r)]}function Ed({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:s,targetY:r,targetPosition:i=J.Top}){const[l,a]=Nl({pos:n,x1:e,y1:t,x2:s,y2:r}),[c,d]=Nl({pos:i,x1:s,y1:r,x2:e,y2:t}),[x,p,m,h]=Du({sourceX:e,sourceY:t,targetX:s,targetY:r,sourceControlX:l,sourceControlY:a,targetControlX:c,targetControlY:d});return[`M${e},${t} C${l},${a} ${c},${d} ${s},${r}`,x,p,m,h]}function yd(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,sourcePosition:l,targetPosition:a,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:j,markerEnd:E,markerStart:S,interactionWidth:R})=>{const[v,y,C]=Ed({sourceX:n,sourceY:s,sourcePosition:l,targetX:r,targetY:i,targetPosition:a}),M=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(We,{id:M,path:v,labelX:y,labelY:C,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:j,markerEnd:E,markerStart:S,interactionWidth:R})})}const qS=yd({isInternal:!1}),Sd=yd({isInternal:!0});qS.displayName="SimpleBezierEdge";Sd.displayName="SimpleBezierEdgeInternal";function Rd(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,sourcePosition:h=J.Bottom,targetPosition:j=J.Top,markerEnd:E,markerStart:S,pathOptions:R,interactionWidth:v})=>{const[y,C,M]=Fo({sourceX:n,sourceY:s,sourcePosition:h,targetX:r,targetY:i,targetPosition:j,borderRadius:R?.borderRadius,offset:R?.offset}),k=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(We,{id:k,path:y,labelX:C,labelY:M,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:E,markerStart:S,interactionWidth:v})})}const Cd=Rd({isInternal:!1}),wd=Rd({isInternal:!0});Cd.displayName="SmoothStepEdge";wd.displayName="SmoothStepEdgeInternal";function bd(e){return g.memo(({id:t,...n})=>{const s=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(Cd,{...n,id:s,pathOptions:g.useMemo(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}const JS=bd({isInternal:!1}),vd=bd({isInternal:!0});JS.displayName="StepEdge";vd.displayName="StepEdgeInternal";function _d(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:j,interactionWidth:E})=>{const[S,R,v]=Zu({sourceX:n,sourceY:s,targetX:r,targetY:i}),y=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(We,{id:y,path:S,labelX:R,labelY:v,label:l,labelStyle:a,labelShowBg:c,labelBgStyle:d,labelBgPadding:x,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:j,interactionWidth:E})})}const QS=_d({isInternal:!1}),Md=_d({isInternal:!0});QS.displayName="StraightEdge";Md.displayName="StraightEdgeInternal";function Nd(e){return g.memo(({id:t,sourceX:n,sourceY:s,targetX:r,targetY:i,sourcePosition:l=J.Bottom,targetPosition:a=J.Top,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:j,markerEnd:E,markerStart:S,pathOptions:R,interactionWidth:v})=>{const[y,C,M]=zu({sourceX:n,sourceY:s,sourcePosition:l,targetX:r,targetY:i,targetPosition:a,curvature:R?.curvature}),k=e.isInternal?void 0:t;return o.jsxRuntimeExports.jsx(We,{id:k,path:y,labelX:C,labelY:M,label:c,labelStyle:d,labelShowBg:x,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:j,markerEnd:E,markerStart:S,interactionWidth:v})})}const e4=Nd({isInternal:!1}),kd=Nd({isInternal:!0});e4.displayName="BezierEdge";kd.displayName="BezierEdgeInternal";const kl={default:kd,straight:Md,step:vd,smoothstep:wd,simplebezier:Sd},Ll={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},t4=(e,t,n)=>n===J.Left?e-t:n===J.Right?e+t:e,n4=(e,t,n)=>n===J.Top?e-t:n===J.Bottom?e+t:e,Pl="react-flow__edgeupdater";function Tl({position:e,centerX:t,centerY:n,radius:s=10,onMouseDown:r,onMouseEnter:i,onMouseOut:l,type:a}){return o.jsxRuntimeExports.jsx("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:l,className:Me([Pl,`${Pl}-${a}`]),cx:t4(t,s,e),cy:n4(n,s,e),r:s,stroke:"transparent",fill:"transparent"})}function s4({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:s,sourceY:r,targetX:i,targetY:l,sourcePosition:a,targetPosition:c,onReconnect:d,onReconnectStart:x,onReconnectEnd:p,setReconnecting:m,setUpdateHover:h}){const j=be(),E=(C,M)=>{if(C.button!==0)return;const{autoPanOnConnect:k,domNode:A,isValidConnection:I,connectionMode:B,connectionRadius:V,lib:D,onConnectStart:$,onConnectEnd:H,cancelConnection:w,nodeLookup:P,rfId:L,panBy:O,updateConnection:z}=j.getState(),F=M.type==="target",Z=(oe,Q)=>{m(!1),p?.(oe,n,M.type,Q)},Y=oe=>d?.(n,oe),q=(oe,Q)=>{m(!0),x?.(C,n,M.type),$?.(oe,Q)};Wo.onPointerDown(C.nativeEvent,{autoPanOnConnect:k,connectionMode:B,connectionRadius:V,domNode:A,handleId:M.id,nodeId:M.nodeId,nodeLookup:P,isTarget:F,edgeUpdaterType:M.type,lib:D,flowId:L,cancelConnection:w,panBy:O,isValidConnection:I,onConnect:Y,onConnectStart:q,onConnectEnd:H,onReconnectEnd:Z,updateConnection:z,getTransform:()=>j.getState().transform,getFromHandle:()=>j.getState().connection.fromHandle,dragThreshold:j.getState().connectionDragThreshold})},S=C=>E(C,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),R=C=>E(C,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),v=()=>h(!0),y=()=>h(!1);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[(e===!0||e==="source")&&o.jsxRuntimeExports.jsx(Tl,{position:a,centerX:s,centerY:r,radius:t,onMouseDown:S,onMouseEnter:v,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&o.jsxRuntimeExports.jsx(Tl,{position:c,centerX:i,centerY:l,radius:t,onMouseDown:R,onMouseEnter:v,onMouseOut:y,type:"target"})]})}function o4({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:s,onClick:r,onDoubleClick:i,onContextMenu:l,onMouseEnter:a,onMouseMove:c,onMouseLeave:d,reconnectRadius:x,onReconnect:p,onReconnectStart:m,onReconnectEnd:h,rfId:j,edgeTypes:E,noPanClassName:S,onError:R,disableKeyboardA11y:v}){let y=je(G=>G.edgeLookup.get(e));const C=je(G=>G.defaultEdgeOptions);y=C?{...C,...y}:y;let M=y.type||"default",k=E?.[M]||kl[M];k===void 0&&(R?.("011",Ae.error011(M)),M="default",k=kl.default);const A=!!(y.focusable||t&&typeof y.focusable>"u"),I=typeof p<"u"&&(y.reconnectable||n&&typeof y.reconnectable>"u"),B=!!(y.selectable||s&&typeof y.selectable>"u"),V=g.useRef(null),[D,$]=g.useState(!1),[H,w]=g.useState(!1),P=be(),{zIndex:L,sourceX:O,sourceY:z,targetX:F,targetY:Z,sourcePosition:Y,targetPosition:q}=je(g.useCallback(G=>{const re=G.nodeLookup.get(y.source),ie=G.nodeLookup.get(y.target);if(!re||!ie)return{zIndex:y.zIndex,...Ll};const we=U5({id:e,sourceNode:re,targetNode:ie,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:G.connectionMode,onError:R});return{zIndex:F5({selected:y.selected,zIndex:y.zIndex,sourceNode:re,targetNode:ie,elevateOnSelect:G.elevateEdgesOnSelect}),...we||Ll}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),ve),oe=g.useMemo(()=>y.markerStart?`url('#${Zo(y.markerStart,j)}')`:void 0,[y.markerStart,j]),Q=g.useMemo(()=>y.markerEnd?`url('#${Zo(y.markerEnd,j)}')`:void 0,[y.markerEnd,j]);if(y.hidden||O===null||z===null||F===null||Z===null)return null;const ue=G=>{const{addSelectedEdges:re,unselectNodesAndEdges:ie,multiSelectionActive:we}=P.getState();B&&(P.setState({nodesSelectionActive:!1}),y.selected&&we?(ie({nodes:[],edges:[y]}),V.current?.blur()):re([e])),r&&r(G,y)},te=i?G=>{i(G,{...y})}:void 0,ne=l?G=>{l(G,{...y})}:void 0,ee=a?G=>{a(G,{...y})}:void 0,le=c?G=>{c(G,{...y})}:void 0,ge=d?G=>{d(G,{...y})}:void 0,ye=G=>{if(!v&&bu.includes(G.key)&&B){const{unselectNodesAndEdges:re,addSelectedEdges:ie}=P.getState();G.key==="Escape"?(V.current?.blur(),re({edges:[y]})):ie([e])}};return o.jsxRuntimeExports.jsx("svg",{style:{zIndex:L},children:o.jsxRuntimeExports.jsxs("g",{className:Me(["react-flow__edge",`react-flow__edge-${M}`,y.className,S,{selected:y.selected,animated:y.animated,inactive:!B&&!r,updating:D,selectable:B}]),onClick:ue,onDoubleClick:te,onContextMenu:ne,onMouseEnter:ee,onMouseMove:le,onMouseLeave:ge,onKeyDown:A?ye:void 0,tabIndex:A?0:void 0,role:y.ariaRole??(A?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":A?`${rd}-${j}`:void 0,ref:V,...y.domAttributes,children:[!H&&o.jsxRuntimeExports.jsx(k,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:B,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:O,sourceY:z,targetX:F,targetY:Z,sourcePosition:Y,targetPosition:q,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:oe,markerEnd:Q,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),I&&o.jsxRuntimeExports.jsx(s4,{edge:y,isReconnectable:I,reconnectRadius:x,onReconnect:p,onReconnectStart:m,onReconnectEnd:h,sourceX:O,sourceY:z,targetX:F,targetY:Z,sourcePosition:Y,targetPosition:q,setUpdateHover:$,setReconnecting:w})]})})}const r4=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Ld({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:s,noPanClassName:r,onReconnect:i,onEdgeContextMenu:l,onEdgeMouseEnter:a,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:x,reconnectRadius:p,onEdgeDoubleClick:m,onReconnectStart:h,onReconnectEnd:j,disableKeyboardA11y:E}){const{edgesFocusable:S,edgesReconnectable:R,elementsSelectable:v,onError:y}=je(r4,ve),C=ZS(t);return o.jsxRuntimeExports.jsxs("div",{className:"react-flow__edges",children:[o.jsxRuntimeExports.jsx(XS,{defaultColor:e,rfId:n}),C.map(M=>o.jsxRuntimeExports.jsx(o4,{id:M,edgesFocusable:S,edgesReconnectable:R,elementsSelectable:v,noPanClassName:r,onReconnect:i,onContextMenu:l,onMouseEnter:a,onMouseMove:c,onMouseLeave:d,onClick:x,reconnectRadius:p,onDoubleClick:m,onReconnectStart:h,onReconnectEnd:j,rfId:n,onError:y,edgeTypes:s,disableKeyboardA11y:E},M))]})}Ld.displayName="EdgeRenderer";const i4=g.memo(Ld),l4=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function a4({children:e}){const t=je(l4);return o.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function c4(e){const t=Bt(),n=g.useRef(!1);g.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const u4=e=>e.panZoom?.syncViewport;function d4(e){const t=je(u4),n=be();return g.useEffect(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function x4(e){return e.connection.inProgress?{...e.connection,to:On(e.connection.to,e.transform)}:{...e.connection}}function p4(e){return x4}function m4(e){const t=p4();return je(t,ve)}const f4=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function h4({containerStyle:e,style:t,type:n,component:s}){const{nodesConnectable:r,width:i,height:l,isValid:a,inProgress:c}=je(f4,ve);return!(i&&r&&c)?null:o.jsxRuntimeExports.jsx("svg",{style:e,width:i,height:l,className:"react-flow__connectionline react-flow__container",children:o.jsxRuntimeExports.jsx("g",{className:Me(["react-flow__connection",Mu(a)]),children:o.jsxRuntimeExports.jsx(Pd,{style:t,type:n,CustomComponent:s,isValid:a})})})}const Pd=({style:e,type:t=ft.Bezier,CustomComponent:n,isValid:s})=>{const{inProgress:r,from:i,fromNode:l,fromHandle:a,fromPosition:c,to:d,toNode:x,toHandle:p,toPosition:m}=m4();if(!r)return;if(n)return o.jsxRuntimeExports.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:a,fromX:i.x,fromY:i.y,toX:d.x,toY:d.y,fromPosition:c,toPosition:m,connectionStatus:Mu(s),toNode:x,toHandle:p});let h="";const j={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:d.x,targetY:d.y,targetPosition:m};switch(t){case ft.Bezier:[h]=zu(j);break;case ft.SimpleBezier:[h]=Ed(j);break;case ft.Step:[h]=Fo({...j,borderRadius:0});break;case ft.SmoothStep:[h]=Fo(j);break;default:[h]=Zu(j)}return o.jsxRuntimeExports.jsx("path",{d:h,fill:"none",className:"react-flow__connection-path",style:e})};Pd.displayName="ConnectionLine";const g4={};function Al(e=g4){const t=g.useRef(e),n=be();g.useEffect(()=>{if(process.env.NODE_ENV==="development"){const s=new Set([...Object.keys(t.current),...Object.keys(e)]);for(const r of s)if(t.current[r]!==e[r]){n.getState().onError?.("002",Ae.error002());break}t.current=e}},[e])}function j4(){const e=be(),t=g.useRef(!1);g.useEffect(()=>{if(process.env.NODE_ENV==="development"&&!t.current){const n=document.querySelector(".react-flow__pane");n&&window.getComputedStyle(n).zIndex!=="1"&&e.getState().onError?.("013",Ae.error013("react")),t.current=!0}},[])}function Td({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:s,onEdgeClick:r,onNodeDoubleClick:i,onEdgeDoubleClick:l,onNodeMouseEnter:a,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:x,onSelectionContextMenu:p,onSelectionStart:m,onSelectionEnd:h,connectionLineType:j,connectionLineStyle:E,connectionLineComponent:S,connectionLineContainerStyle:R,selectionKeyCode:v,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:M,panActivationKeyCode:k,zoomActivationKeyCode:A,deleteKeyCode:I,onlyRenderVisibleElements:B,elementsSelectable:V,defaultViewport:D,translateExtent:$,minZoom:H,maxZoom:w,preventScrolling:P,defaultMarkerColor:L,zoomOnScroll:O,zoomOnPinch:z,panOnScroll:F,panOnScrollSpeed:Z,panOnScrollMode:Y,zoomOnDoubleClick:q,panOnDrag:oe,onPaneClick:Q,onPaneMouseEnter:ue,onPaneMouseMove:te,onPaneMouseLeave:ne,onPaneScroll:ee,onPaneContextMenu:le,paneClickDistance:ge,nodeClickDistance:ye,onEdgeContextMenu:G,onEdgeMouseEnter:re,onEdgeMouseMove:ie,onEdgeMouseLeave:we,reconnectRadius:ke,onReconnect:st,onReconnectStart:Vt,onReconnectEnd:zn,noDragClassName:Hn,noWheelClassName:Vn,noPanClassName:rn,disableKeyboardA11y:ln,nodeExtent:Us,rfId:Fn,viewport:Ft,onViewportChange:an}){return Al(e),Al(t),j4(),c4(n),d4(Ft),o.jsxRuntimeExports.jsx(IS,{onPaneClick:Q,onPaneMouseEnter:ue,onPaneMouseMove:te,onPaneMouseLeave:ne,onPaneContextMenu:le,onPaneScroll:ee,paneClickDistance:ge,deleteKeyCode:I,selectionKeyCode:v,selectionOnDrag:y,selectionMode:C,onSelectionStart:m,onSelectionEnd:h,multiSelectionKeyCode:M,panActivationKeyCode:k,zoomActivationKeyCode:A,elementsSelectable:V,zoomOnScroll:O,zoomOnPinch:z,zoomOnDoubleClick:q,panOnScroll:F,panOnScrollSpeed:Z,panOnScrollMode:Y,panOnDrag:oe,defaultViewport:D,translateExtent:$,minZoom:H,maxZoom:w,onSelectionContextMenu:p,preventScrolling:P,noDragClassName:Hn,noWheelClassName:Vn,noPanClassName:rn,disableKeyboardA11y:ln,onViewportChange:an,isControlledViewport:!!Ft,children:o.jsxRuntimeExports.jsxs(a4,{children:[o.jsxRuntimeExports.jsx(i4,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:l,onReconnect:st,onReconnectStart:Vt,onReconnectEnd:zn,onlyRenderVisibleElements:B,onEdgeContextMenu:G,onEdgeMouseEnter:re,onEdgeMouseMove:ie,onEdgeMouseLeave:we,reconnectRadius:ke,defaultMarkerColor:L,noPanClassName:rn,disableKeyboardA11y:ln,rfId:Fn}),o.jsxRuntimeExports.jsx(h4,{style:E,type:j,component:S,containerStyle:R}),o.jsxRuntimeExports.jsx("div",{className:"react-flow__edgelabel-renderer"}),o.jsxRuntimeExports.jsx(FS,{nodeTypes:e,onNodeClick:s,onNodeDoubleClick:i,onNodeMouseEnter:a,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:x,nodeClickDistance:ye,onlyRenderVisibleElements:B,noPanClassName:rn,noDragClassName:Hn,disableKeyboardA11y:ln,nodeExtent:Us,rfId:Fn}),o.jsxRuntimeExports.jsx("div",{className:"react-flow__viewport-portal"})]})})}Td.displayName="GraphView";const E4=g.memo(Td),Il=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,fitViewOptions:a,minZoom:c=.5,maxZoom:d=2,nodeOrigin:x,nodeExtent:p}={})=>{const m=new Map,h=new Map,j=new Map,E=new Map,S=s??t??[],R=n??e??[],v=x??[0,0],y=p??Cn;Wu(j,E,S);const C=Yo(R,m,h,{nodeOrigin:v,nodeExtent:y,elevateNodesOnSelect:!1});let M=[0,0,1];if(l&&r&&i){const k=In(m,{filter:V=>!!((V.width||V.initialWidth)&&(V.height||V.initialHeight))}),{x:A,y:I,zoom:B}=Gr(k,r,i,c,d,a?.padding??.1);M=[A,I,B]}return{rfId:"1",width:0,height:0,transform:M,nodes:R,nodesInitialized:C,nodeLookup:m,parentLookup:h,edges:S,edgeLookup:E,connectionLookup:j,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:c,maxZoom:d,translateExtent:Cn,nodeExtent:y,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Tt.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:v,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:l??!1,fitViewOptions:a,fitViewResolver:null,connection:{..._u},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:ys,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:vu}},y4=({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:l,fitViewOptions:a,minZoom:c,maxZoom:d,nodeOrigin:x,nodeExtent:p})=>zy((m,h)=>{async function j(){const{nodeLookup:E,panZoom:S,fitViewOptions:R,fitViewResolver:v,width:y,height:C,minZoom:M,maxZoom:k}=h();S&&(await O5({nodes:E,width:y,height:C,panZoom:S,minZoom:M,maxZoom:k},R),v?.resolve(!0),m({fitViewResolver:null}))}return{...Il({nodes:e,edges:t,width:r,height:i,fitView:l,fitViewOptions:a,minZoom:c,maxZoom:d,nodeOrigin:x,nodeExtent:p,defaultNodes:n,defaultEdges:s}),setNodes:E=>{const{nodeLookup:S,parentLookup:R,nodeOrigin:v,elevateNodesOnSelect:y,fitViewQueued:C}=h(),M=Yo(E,S,R,{nodeOrigin:v,nodeExtent:p,elevateNodesOnSelect:y,checkEquality:!0});C&&M?(j(),m({nodes:E,nodesInitialized:M,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:E,nodesInitialized:M})},setEdges:E=>{const{connectionLookup:S,edgeLookup:R}=h();Wu(S,R,E),m({edges:E})},setDefaultNodesAndEdges:(E,S)=>{if(E){const{setNodes:R}=h();R(E),m({hasDefaultNodes:!0})}if(S){const{setEdges:R}=h();R(S),m({hasDefaultEdges:!0})}},updateNodeInternals:E=>{const{triggerNodeChanges:S,nodeLookup:R,parentLookup:v,domNode:y,nodeOrigin:C,nodeExtent:M,debug:k,fitViewQueued:A}=h(),{changes:I,updatedInternals:B}=ny(E,R,v,y,C,M);B&&(Q5(R,v,{nodeOrigin:C,nodeExtent:M}),A?(j(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),I?.length>0&&(k&&console.log("React Flow: trigger node changes",I),S?.(I)))},updateNodePositions:(E,S=!1)=>{const R=[],v=[],{nodeLookup:y,triggerNodeChanges:C}=h();for(const[M,k]of E){const A=y.get(M),I=!!(A?.expandParent&&A?.parentId&&k?.position),B={id:M,type:"position",position:I?{x:Math.max(0,k.position.x),y:Math.max(0,k.position.y)}:k.position,dragging:S};I&&A.parentId&&R.push({id:M,parentId:A.parentId,rect:{...k.internals.positionAbsolute,width:k.measured.width??0,height:k.measured.height??0}}),v.push(B)}if(R.length>0){const{parentLookup:M,nodeOrigin:k}=h(),A=Qr(R,y,M,k);v.push(...A)}C(v)},triggerNodeChanges:E=>{const{onNodesChange:S,setNodes:R,nodes:v,hasDefaultNodes:y,debug:C}=h();if(E?.length){if(y){const M=ad(E,v);R(M)}C&&console.log("React Flow: trigger node changes",E),S?.(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:S,setEdges:R,edges:v,hasDefaultEdges:y,debug:C}=h();if(E?.length){if(y){const M=cd(E,v);R(M)}C&&console.log("React Flow: trigger edge changes",E),S?.(E)}},addSelectedNodes:E=>{const{multiSelectionActive:S,edgeLookup:R,nodeLookup:v,triggerNodeChanges:y,triggerEdgeChanges:C}=h();if(S){const M=E.map(k=>Ct(k,!0));y(M);return}y(Kt(v,new Set([...E]),!0)),C(Kt(R))},addSelectedEdges:E=>{const{multiSelectionActive:S,edgeLookup:R,nodeLookup:v,triggerNodeChanges:y,triggerEdgeChanges:C}=h();if(S){const M=E.map(k=>Ct(k,!0));C(M);return}C(Kt(R,new Set([...E]))),y(Kt(v,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:S}={})=>{const{edges:R,nodes:v,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:M}=h(),k=E||v,A=S||R,I=k.map(V=>{const D=y.get(V.id);return D&&(D.selected=!1),Ct(V.id,!1)}),B=A.map(V=>Ct(V.id,!1));C(I),M(B)},setMinZoom:E=>{const{panZoom:S,maxZoom:R}=h();S?.setScaleExtent([E,R]),m({minZoom:E})},setMaxZoom:E=>{const{panZoom:S,minZoom:R}=h();S?.setScaleExtent([R,E]),m({maxZoom:E})},setTranslateExtent:E=>{h().panZoom?.setTranslateExtent(E),m({translateExtent:E})},setPaneClickDistance:E=>{h().panZoom?.setClickDistance(E)},resetSelectedElements:()=>{const{edges:E,nodes:S,triggerNodeChanges:R,triggerEdgeChanges:v,elementsSelectable:y}=h();if(!y)return;const C=S.reduce((k,A)=>A.selected?[...k,Ct(A.id,!1)]:k,[]),M=E.reduce((k,A)=>A.selected?[...k,Ct(A.id,!1)]:k,[]);R(C),v(M)},setNodeExtent:E=>{const{nodes:S,nodeLookup:R,parentLookup:v,nodeOrigin:y,elevateNodesOnSelect:C,nodeExtent:M}=h();E[0][0]===M[0][0]&&E[0][1]===M[0][1]&&E[1][0]===M[1][0]&&E[1][1]===M[1][1]||(Yo(S,R,v,{nodeOrigin:y,nodeExtent:E,elevateNodesOnSelect:C,checkEquality:!1}),m({nodeExtent:E}))},panBy:E=>{const{transform:S,width:R,height:v,panZoom:y,translateExtent:C}=h();return sy({delta:E,panZoom:y,transform:S,translateExtent:C,width:R,height:v})},setCenter:async(E,S,R)=>{const{width:v,height:y,maxZoom:C,panZoom:M}=h();if(!M)return Promise.resolve(!1);const k=typeof R?.zoom<"u"?R.zoom:C;return await M.setViewport({x:v/2-E*k,y:y/2-S*k,zoom:k},{duration:R?.duration,ease:R?.ease,interpolate:R?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{..._u}})},updateConnection:E=>{m({connection:E})},reset:()=>m({...Il()})}},Object.is);function Ad({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:s,initialWidth:r,initialHeight:i,initialMinZoom:l,initialMaxZoom:a,initialFitViewOptions:c,fitView:d,nodeOrigin:x,nodeExtent:p,children:m}){const[h]=g.useState(()=>y4({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,width:r,height:i,fitView:d,minZoom:l,maxZoom:a,fitViewOptions:c,nodeOrigin:x,nodeExtent:p}));return o.jsxRuntimeExports.jsx(Hy,{value:h,children:o.jsxRuntimeExports.jsx(uS,{children:m})})}function S4({children:e,nodes:t,edges:n,defaultNodes:s,defaultEdges:r,width:i,height:l,fitView:a,fitViewOptions:c,minZoom:d,maxZoom:x,nodeOrigin:p,nodeExtent:m}){return g.useContext(Fs)?o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:e}):o.jsxRuntimeExports.jsx(Ad,{initialNodes:t,initialEdges:n,defaultNodes:s,defaultEdges:r,initialWidth:i,initialHeight:l,fitView:a,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:x,nodeOrigin:p,nodeExtent:m,children:e})}const R4={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function C4({nodes:e,edges:t,defaultNodes:n,defaultEdges:s,className:r,nodeTypes:i,edgeTypes:l,onNodeClick:a,onEdgeClick:c,onInit:d,onMove:x,onMoveStart:p,onMoveEnd:m,onConnect:h,onConnectStart:j,onConnectEnd:E,onClickConnectStart:S,onClickConnectEnd:R,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:M,onNodeDoubleClick:k,onNodeDragStart:A,onNodeDrag:I,onNodeDragStop:B,onNodesDelete:V,onEdgesDelete:D,onDelete:$,onSelectionChange:H,onSelectionDragStart:w,onSelectionDrag:P,onSelectionDragStop:L,onSelectionContextMenu:O,onSelectionStart:z,onSelectionEnd:F,onBeforeDelete:Z,connectionMode:Y,connectionLineType:q=ft.Bezier,connectionLineStyle:oe,connectionLineComponent:Q,connectionLineContainerStyle:ue,deleteKeyCode:te="Backspace",selectionKeyCode:ne="Shift",selectionOnDrag:ee=!1,selectionMode:le=qt.Full,panActivationKeyCode:ge="Space",multiSelectionKeyCode:ye=Rs()?"Meta":"Control",zoomActivationKeyCode:G=Rs()?"Meta":"Control",snapToGrid:re,snapGrid:ie,onlyRenderVisibleElements:we=!1,selectNodesOnDrag:ke,nodesDraggable:st,autoPanOnNodeFocus:Vt,nodesConnectable:zn,nodesFocusable:Hn,nodeOrigin:Vn=id,edgesFocusable:rn,edgesReconnectable:ln,elementsSelectable:Us=!0,defaultViewport:Fn=eS,minZoom:Ft=.5,maxZoom:an=2,translateExtent:li=Cn,preventScrolling:Nf=!0,nodeExtent:qs,defaultMarkerColor:kf="#b1b1b7",zoomOnScroll:Lf=!0,zoomOnPinch:Pf=!0,panOnScroll:Tf=!1,panOnScrollSpeed:Af=.5,panOnScrollMode:If=bt.Free,zoomOnDoubleClick:Of=!0,panOnDrag:$f=!0,onPaneClick:Bf,onPaneMouseEnter:Df,onPaneMouseMove:zf,onPaneMouseLeave:Hf,onPaneScroll:Vf,onPaneContextMenu:Ff,paneClickDistance:ai=0,nodeClickDistance:Zf=0,children:Yf,onReconnect:Wf,onReconnectStart:Kf,onReconnectEnd:Gf,onEdgeContextMenu:Xf,onEdgeDoubleClick:Uf,onEdgeMouseEnter:qf,onEdgeMouseMove:Jf,onEdgeMouseLeave:Qf,reconnectRadius:eh=10,onNodesChange:th,onEdgesChange:nh,noDragClassName:sh="nodrag",noWheelClassName:oh="nowheel",noPanClassName:ci="nopan",fitView:ui,fitViewOptions:di,connectOnClick:rh,attributionPosition:ih,proOptions:lh,defaultEdgeOptions:ah,elevateNodesOnSelect:ch,elevateEdgesOnSelect:uh,disableKeyboardA11y:xi=!1,autoPanOnConnect:dh,autoPanOnNodeDrag:xh,autoPanSpeed:ph,connectionRadius:mh,isValidConnection:fh,onError:hh,style:gh,id:pi,nodeDragThreshold:jh,connectionDragThreshold:Eh,viewport:yh,onViewportChange:Sh,width:Rh,height:Ch,colorMode:wh="light",debug:bh,onScroll:mi,ariaLabelConfig:vh,..._h},Mh){const Js=pi||"1",Nh=oS(wh),kh=g.useCallback(fi=>{fi.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),mi?.(fi)},[mi]);return o.jsxRuntimeExports.jsx("div",{"data-testid":"rf__wrapper",..._h,onScroll:kh,style:{...gh,...R4},ref:Mh,className:Me(["react-flow",r,Nh]),id:pi,role:"application",children:o.jsxRuntimeExports.jsxs(S4,{nodes:e,edges:t,width:Rh,height:Ch,fitView:ui,fitViewOptions:di,minZoom:Ft,maxZoom:an,nodeOrigin:Vn,nodeExtent:qs,children:[o.jsxRuntimeExports.jsx(E4,{onInit:d,onNodeClick:a,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:M,onNodeDoubleClick:k,nodeTypes:i,edgeTypes:l,connectionLineType:q,connectionLineStyle:oe,connectionLineComponent:Q,connectionLineContainerStyle:ue,selectionKeyCode:ne,selectionOnDrag:ee,selectionMode:le,deleteKeyCode:te,multiSelectionKeyCode:ye,panActivationKeyCode:ge,zoomActivationKeyCode:G,onlyRenderVisibleElements:we,defaultViewport:Fn,translateExtent:li,minZoom:Ft,maxZoom:an,preventScrolling:Nf,zoomOnScroll:Lf,zoomOnPinch:Pf,zoomOnDoubleClick:Of,panOnScroll:Tf,panOnScrollSpeed:Af,panOnScrollMode:If,panOnDrag:$f,onPaneClick:Bf,onPaneMouseEnter:Df,onPaneMouseMove:zf,onPaneMouseLeave:Hf,onPaneScroll:Vf,onPaneContextMenu:Ff,paneClickDistance:ai,nodeClickDistance:Zf,onSelectionContextMenu:O,onSelectionStart:z,onSelectionEnd:F,onReconnect:Wf,onReconnectStart:Kf,onReconnectEnd:Gf,onEdgeContextMenu:Xf,onEdgeDoubleClick:Uf,onEdgeMouseEnter:qf,onEdgeMouseMove:Jf,onEdgeMouseLeave:Qf,reconnectRadius:eh,defaultMarkerColor:kf,noDragClassName:sh,noWheelClassName:oh,noPanClassName:ci,rfId:Js,disableKeyboardA11y:xi,nodeExtent:qs,viewport:yh,onViewportChange:Sh}),o.jsxRuntimeExports.jsx(sS,{nodes:e,edges:t,defaultNodes:n,defaultEdges:s,onConnect:h,onConnectStart:j,onConnectEnd:E,onClickConnectStart:S,onClickConnectEnd:R,nodesDraggable:st,autoPanOnNodeFocus:Vt,nodesConnectable:zn,nodesFocusable:Hn,edgesFocusable:rn,edgesReconnectable:ln,elementsSelectable:Us,elevateNodesOnSelect:ch,elevateEdgesOnSelect:uh,minZoom:Ft,maxZoom:an,nodeExtent:qs,onNodesChange:th,onEdgesChange:nh,snapToGrid:re,snapGrid:ie,connectionMode:Y,translateExtent:li,connectOnClick:rh,defaultEdgeOptions:ah,fitView:ui,fitViewOptions:di,onNodesDelete:V,onEdgesDelete:D,onDelete:$,onNodeDragStart:A,onNodeDrag:I,onNodeDragStop:B,onSelectionDrag:P,onSelectionDragStart:w,onSelectionDragStop:L,onMove:x,onMoveStart:p,onMoveEnd:m,noPanClassName:ci,nodeOrigin:Vn,rfId:Js,autoPanOnConnect:dh,autoPanOnNodeDrag:xh,autoPanSpeed:ph,onError:hh,connectionRadius:mh,isValidConnection:fh,selectNodesOnDrag:ke,nodeDragThreshold:jh,connectionDragThreshold:Eh,onBeforeDelete:Z,paneClickDistance:ai,debug:bh,ariaLabelConfig:vh}),o.jsxRuntimeExports.jsx(Qy,{onSelectionChange:H}),Yf,o.jsxRuntimeExports.jsx(Gy,{proOptions:lh,position:ih}),o.jsxRuntimeExports.jsx(Ky,{rfId:Js,disableKeyboardA11y:xi})]})})}var w4=ud(C4);function b4(){const e=be();return g.useCallback(t=>{const{domNode:n,updateNodeInternals:s}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach(l=>{const a=n?.querySelector(`.react-flow__node[data-id="${l}"]`);a&&i.set(l,{id:l,nodeElement:a,force:!0})}),requestAnimationFrame(()=>s(i,{triggerFitView:!1}))},[])}function v4({onStart:e,onChange:t,onEnd:n}){const s=be();g.useEffect(()=>{s.setState({onViewportChangeStart:e})},[e]),g.useEffect(()=>{s.setState({onViewportChange:t})},[t]),g.useEffect(()=>{s.setState({onViewportChangeEnd:n})},[n])}function _4({dimensions:e,lineWidth:t,variant:n,className:s}){return o.jsxRuntimeExports.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Me(["react-flow__background-pattern",n,s])})}function M4({radius:e,className:t}){return o.jsxRuntimeExports.jsx("circle",{cx:e,cy:e,r:e,className:Me(["react-flow__background-pattern","dots",t])})}var gt;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(gt||(gt={}));const N4={[gt.Dots]:1,[gt.Lines]:1,[gt.Cross]:6},k4=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Id({id:e,variant:t=gt.Dots,gap:n=20,size:s,lineWidth:r=1,offset:i=0,color:l,bgColor:a,style:c,className:d,patternClassName:x}){const p=g.useRef(null),{transform:m,patternId:h}=je(k4,ve),j=s||N4[t],E=t===gt.Dots,S=t===gt.Cross,R=Array.isArray(n)?n:[n,n],v=[R[0]*m[2]||1,R[1]*m[2]||1],y=j*m[2],C=Array.isArray(i)?i:[i,i],M=S?[y,y]:v,k=[C[0]*m[2]||1+M[0]/2,C[1]*m[2]||1+M[1]/2],A=`${h}${e||""}`;return o.jsxRuntimeExports.jsxs("svg",{className:Me(["react-flow__background",d]),style:{...c,...Ys,"--xy-background-color-props":a,"--xy-background-pattern-color-props":l},ref:p,"data-testid":"rf__background",children:[o.jsxRuntimeExports.jsx("pattern",{id:A,x:m[0]%v[0],y:m[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${k[0]},-${k[1]})`,children:E?o.jsxRuntimeExports.jsx(M4,{radius:y/2,className:x}):o.jsxRuntimeExports.jsx(_4,{dimensions:M,lineWidth:r,variant:t,className:x})}),o.jsxRuntimeExports.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${A})`})]})}Id.displayName="Background";const L4=g.memo(Id);function P4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:o.jsxRuntimeExports.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function T4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:o.jsxRuntimeExports.jsx("path",{d:"M0 0h32v4.2H0z"})})}function A4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:o.jsxRuntimeExports.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function I4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsxRuntimeExports.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function O4(){return o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsxRuntimeExports.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Qn({children:e,className:t,...n}){return o.jsxRuntimeExports.jsx("button",{type:"button",className:Me(["react-flow__controls-button",t]),...n,children:e})}const $4=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Od({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:s=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:l,onFitView:a,onInteractiveChange:c,className:d,children:x,position:p="bottom-left",orientation:m="vertical","aria-label":h}){const j=be(),{isInteractive:E,minZoomReached:S,maxZoomReached:R,ariaLabelConfig:v}=je($4,ve),{zoomIn:y,zoomOut:C,fitView:M}=Bt(),k=()=>{y(),i?.()},A=()=>{C(),l?.()},I=()=>{M(r),a?.()},B=()=>{j.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),c?.(!E)},V=m==="horizontal"?"horizontal":"vertical";return o.jsxRuntimeExports.jsxs(Zs,{className:Me(["react-flow__controls",V,d]),position:p,style:e,"data-testid":"rf__controls","aria-label":h??v["controls.ariaLabel"],children:[t&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(Qn,{onClick:k,className:"react-flow__controls-zoomin",title:v["controls.zoomIn.ariaLabel"],"aria-label":v["controls.zoomIn.ariaLabel"],disabled:R,children:o.jsxRuntimeExports.jsx(P4,{})}),o.jsxRuntimeExports.jsx(Qn,{onClick:A,className:"react-flow__controls-zoomout",title:v["controls.zoomOut.ariaLabel"],"aria-label":v["controls.zoomOut.ariaLabel"],disabled:S,children:o.jsxRuntimeExports.jsx(T4,{})})]}),n&&o.jsxRuntimeExports.jsx(Qn,{className:"react-flow__controls-fitview",onClick:I,title:v["controls.fitView.ariaLabel"],"aria-label":v["controls.fitView.ariaLabel"],children:o.jsxRuntimeExports.jsx(A4,{})}),s&&o.jsxRuntimeExports.jsx(Qn,{className:"react-flow__controls-interactive",onClick:B,title:v["controls.interactive.ariaLabel"],"aria-label":v["controls.interactive.ariaLabel"],children:E?o.jsxRuntimeExports.jsx(O4,{}):o.jsxRuntimeExports.jsx(I4,{})}),x]})}Od.displayName="Controls";g.memo(Od);function B4({id:e,x:t,y:n,width:s,height:r,style:i,color:l,strokeColor:a,strokeWidth:c,className:d,borderRadius:x,shapeRendering:p,selected:m,onClick:h}){const{background:j,backgroundColor:E}=i||{},S=l||j||E;return o.jsxRuntimeExports.jsx("rect",{className:Me(["react-flow__minimap-node",{selected:m},d]),x:t,y:n,rx:x,ry:x,width:s,height:r,style:{fill:S,stroke:a,strokeWidth:c},shapeRendering:p,onClick:h?R=>h(R,e):void 0})}const D4=g.memo(B4),z4=e=>e.nodes.map(t=>t.id),So=e=>e instanceof Function?e:()=>e;function H4({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:s=5,nodeStrokeWidth:r,nodeComponent:i=D4,onClick:l}){const a=je(z4,ve),c=So(t),d=So(e),x=So(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:a.map(m=>o.jsxRuntimeExports.jsx(F4,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:d,nodeClassNameFunc:x,nodeBorderRadius:s,nodeStrokeWidth:r,NodeComponent:i,onClick:l,shapeRendering:p},m))})}function V4({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:s,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:l,NodeComponent:a,onClick:c}){const{node:d,x,y:p,width:m,height:h}=je(j=>{const{internals:E}=j.nodeLookup.get(e),S=E.userNode,{x:R,y:v}=E.positionAbsolute,{width:y,height:C}=ut(S);return{node:S,x:R,y:v,width:y,height:C}},ve);return!d||d.hidden||!Au(d)?null:o.jsxRuntimeExports.jsx(a,{x,y:p,width:m,height:h,style:d.style,selected:!!d.selected,className:s(d),color:t(d),borderRadius:r,strokeColor:n(d),strokeWidth:i,shapeRendering:l,onClick:c,id:d.id})}const F4=g.memo(V4);var Z4=g.memo(H4);const Y4=200,W4=150,K4=e=>!e.hidden,G4=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Tu(In(e.nodeLookup,{filter:K4}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},X4="react-flow__minimap-desc";function $d({style:e,className:t,nodeStrokeColor:n,nodeColor:s,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:l,nodeComponent:a,bgColor:c,maskColor:d,maskStrokeColor:x,maskStrokeWidth:p,position:m="bottom-right",onClick:h,onNodeClick:j,pannable:E=!1,zoomable:S=!1,ariaLabel:R,inversePan:v,zoomStep:y=10,offsetScale:C=5}){const M=be(),k=g.useRef(null),{boundingRect:A,viewBB:I,rfId:B,panZoom:V,translateExtent:D,flowWidth:$,flowHeight:H,ariaLabelConfig:w}=je(G4,ve),P=e?.width??Y4,L=e?.height??W4,O=A.width/P,z=A.height/L,F=Math.max(O,z),Z=F*P,Y=F*L,q=C*F,oe=A.x-(Z-A.width)/2-q,Q=A.y-(Y-A.height)/2-q,ue=Z+q*2,te=Y+q*2,ne=`${X4}-${B}`,ee=g.useRef(0),le=g.useRef();ee.current=F,g.useEffect(()=>{if(k.current&&V)return le.current=dy({domNode:k.current,panZoom:V,getTransform:()=>M.getState().transform,getViewScale:()=>ee.current}),()=>{le.current?.destroy()}},[V]),g.useEffect(()=>{le.current?.update({translateExtent:D,width:$,height:H,inversePan:v,pannable:E,zoomStep:y,zoomable:S})},[E,S,v,y,D,$,H]);const ge=h?re=>{const[ie,we]=le.current?.pointer(re)||[0,0];h(re,{x:ie,y:we})}:void 0,ye=j?g.useCallback((re,ie)=>{const we=M.getState().nodeLookup.get(ie).internals.userNode;j(re,we)},[]):void 0,G=R??w["minimap.ariaLabel"];return o.jsxRuntimeExports.jsx(Zs,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*F:void 0,"--xy-minimap-node-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:Me(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:o.jsxRuntimeExports.jsxs("svg",{width:P,height:L,viewBox:`${oe} ${Q} ${ue} ${te}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ne,ref:k,onClick:ge,children:[G&&o.jsxRuntimeExports.jsx("title",{id:ne,children:G}),o.jsxRuntimeExports.jsx(Z4,{onClick:ye,nodeColor:s,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:r,nodeStrokeWidth:l,nodeComponent:a}),o.jsxRuntimeExports.jsx("path",{className:"react-flow__minimap-mask",d:`M${oe-q},${Q-q}h${ue+q*2}v${te+q*2}h${-ue-q*2}z
|
|
39
|
+
M${I.x},${I.y}h${I.width}v${I.height}h${-I.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}$d.displayName="MiniMap";g.memo($d);const U4=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,q4={[tn.Line]:"right",[tn.Handle]:"bottom-right"};function J4({nodeId:e,position:t,variant:n=tn.Handle,className:s,style:r=void 0,children:i,color:l,minWidth:a=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:x=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:m,autoScale:h=!0,shouldResize:j,onResizeStart:E,onResize:S,onResizeEnd:R}){const v=md(),y=typeof e=="string"?e:v,C=be(),M=g.useRef(null),k=n===tn.Handle,A=je(g.useCallback(U4(k&&h),[k,h]),ve),I=g.useRef(null),B=t??q4[n];g.useEffect(()=>{if(!(!M.current||!y))return I.current||(I.current=_y({domNode:M.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:D,transform:$,snapGrid:H,snapToGrid:w,nodeOrigin:P,domNode:L}=C.getState();return{nodeLookup:D,transform:$,snapGrid:H,snapToGrid:w,nodeOrigin:P,paneDomNode:L}},onChange:(D,$)=>{const{triggerNodeChanges:H,nodeLookup:w,parentLookup:P,nodeOrigin:L}=C.getState(),O=[],z={x:D.x,y:D.y},F=w.get(y);if(F&&F.expandParent&&F.parentId){const Z=F.origin??L,Y=D.width??F.measured.width??0,q=D.height??F.measured.height??0,oe={id:F.id,parentId:F.parentId,rect:{width:Y,height:q,...Iu({x:D.x??F.position.x,y:D.y??F.position.y},{width:Y,height:q},F.parentId,w,Z)}},Q=Qr([oe],w,P,L);O.push(...Q),z.x=D.x?Math.max(Z[0]*Y,D.x):void 0,z.y=D.y?Math.max(Z[1]*q,D.y):void 0}if(z.x!==void 0&&z.y!==void 0){const Z={id:y,type:"position",position:{...z}};O.push(Z)}if(D.width!==void 0&&D.height!==void 0){const Y={id:y,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:D.width,height:D.height}};O.push(Y)}for(const Z of $){const Y={...Z,type:"position"};O.push(Y)}H(O)},onEnd:({width:D,height:$})=>{const H={id:y,type:"dimensions",resizing:!1,dimensions:{width:D,height:$}};C.getState().triggerNodeChanges([H])}})),I.current.update({controlPosition:B,boundaries:{minWidth:a,minHeight:c,maxWidth:d,maxHeight:x},keepAspectRatio:p,resizeDirection:m,onResizeStart:E,onResize:S,onResizeEnd:R,shouldResize:j}),()=>{I.current?.destroy()}},[B,a,c,d,x,p,E,S,R,j]);const V=B.split("-");return o.jsxRuntimeExports.jsx("div",{className:Me(["react-flow__resize-control","nodrag",...V,n,s]),ref:M,style:{...r,scale:A,...l&&{[k?"backgroundColor":"borderColor"]:l}},children:i})}g.memo(J4);const Q4=(e,t)=>e.map((n,s)=>u.J.translate(n,t[s])),Bd=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(We,{path:jt(e),style:{stroke:u.ir.cssString(t)},...n}),eR=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(We,{path:jt(e),style:{stroke:u.ir.cssString(t),strokeDasharray:"12,4"},...n}),tR=({points:e,color:t,...n})=>o.jsxRuntimeExports.jsx(We,{path:jt(e),style:{stroke:u.ir.cssString(t),strokeDasharray:"12,4,4"},...n}),nR=({points:e,color:t,...n})=>{const s=u.J.calculateMiters(e,6),r=e.map((c,d)=>u.J.translate(c,s[d])),i=e.map((c,d)=>u.J.translate(c,u.J.scale(s[d],-1))),l=u.ir.cssString(t),a=.7;return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(We,{path:jt(r),style:{stroke:l,opacity:a},...n}),o.jsxRuntimeExports.jsx(We,{path:jt(e),style:{stroke:l},...n}),o.jsxRuntimeExports.jsx(We,{path:jt(i),style:{stroke:l,opacity:a},...n})]})},Ol=5,sR=(e,t)=>{const n=[],s=[];for(let a=0;a<e.length-1;a++){const c=u.J.distance(e[a],e[a+1]);s.push(c)}const r=t;let i=0,l=r;for(let a=0;a<s.length;a++){const c=s[a],d=e[a],x=e[a+1];for(;i+c>=l;){const p=(l-i)/c,m={x:d.x+p*(x.x-d.x),y:d.y+p*(x.y-d.y)};let h="x";Math.abs(x.x-d.x)<1&&(h="y"),l+=r,!(u.J.distance(m,x)<Ol||u.J.distance(m,d)<Ol)&&n.push({position:m,direction:h})}i+=c}return n},oR=({color:e,position:t,direction:n})=>{const r="M0,0 L0,-10 L10,-10";return n==="x"?t.y+=10/2:t.x+=10/2,o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.ir.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(270)`,strokeLinecap:"round"})},rR=({color:e,position:t,direction:n})=>{const r="M0,0 L0,-10";n==="x"?t.y+=10/3:t.x-=10/3;let i=u.J.translateX(t,-10),l=45;return n==="y"&&(i=u.J.translateY(t,-10),l+=90),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.ir.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${t.x},${t.y}) rotate(${l})`,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx("path",{d:r,stroke:u.ir.cssString(e),fill:"none",strokeWidth:2,transform:`translate(${i.x},${i.y}) rotate(${l})`,strokeLinecap:"round"})]})},iR=({color:e,position:t})=>o.jsxRuntimeExports.jsx("circle",{cx:t.x,cy:t.y,r:3,fill:"var(--pluto-gray-l0)",stroke:u.ir.cssString(e),strokeWidth:2}),ti=e=>{const t=({points:n,color:s,...r})=>{const i=jt(n),l=sR(n,40);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(We,{path:i,...r,style:{stroke:u.ir.cssString(s)}}),l.map(({position:a,direction:c},d)=>o.jsxRuntimeExports.jsx(e,{position:a,direction:c,color:s},d))]})};return t.displayName=`SymbolLine(${e.displayName})`,t},lR=ti(oR),aR=ti(rR),cR=ti(iR),jt=e=>{let t="";const s=e.length+-1;for(let r=0;r<s;r++){const i=e[r%e.length],l=e[(r+1)%e.length],a=Math.min(6/Math.hypot(l.x-i.x,l.y-i.y),.5);r>0&&(t+=`Q${i.x},${i.y} ${i.x*(1-a)+l.x*a},${i.y*(1-a)+l.y*a}`),r===0?t+=`M${i.x},${i.y}`:r===0&&(t+=`M${i.x*(1-a)+l.x*a},${i.y*(1-a)+l.y*a}`),r===s-1?t+=`L${l.x},${l.y}`:r<s-1&&(t+=`L${i.x*a+l.x*(1-a)},${i.y*a+l.y*(1-a)}`)}return t},Dd={pipe:Bd,electric:eR,secondary:tR,jacketed:nR,hydraulic:lR,pneumatic:aR,data:cR},zd=Bd,uR=[{key:"pipe",name:"Pipe"},{key:"electric",name:"Electric Signal"},{key:"secondary",name:"Secondary"},{key:"jacketed",name:"Jacketed"},{key:"hydraulic",name:"Hydraulic"},{key:"pneumatic",name:"Pneumatic"},{key:"data",name:"Data"}],dR=e=>o.jsxRuntimeExports.jsx(Mn,{data:uR,...e,resourceName:"Path Type"}),Ws=e=>{const t=document.querySelector(`[data-id="${e}"]`);if(t==null)throw new Error(`[diagram] - cannot find node with key: ${e}`);return t},Oe=(e,t)=>{const n=Ws(t),s=e.getNodes().find(r=>r.id===t);if(s==null)throw new Error(`[diagram] - cannot find node with key: ${t}`);return u.$t.construct(s.position,u._.scale(u.$t.dims(u.$t.construct(n)),1/e.getZoom()))},xR=(e,t)=>Ks.fromFlow(e,t);class Hd{node_=null;position;orientation;constructor(t,n){this.position=t,this.orientation=n}set node(t){this.node_=t}get node(){if(this.node_==null)throw new Error("[schematic] - handle has no node");return this.node_}get absolutePosition(){return u.J.translate(u.$t.topLeft(this.node.box),this.position)}}class Ks{key;box;handles;constructor(t,n,s){this.key=t,this.box=n,this.handles=s,s.forEach(r=>r.node=this)}static fromFlow(t,n){const s=Oe(n,t),r=Ws(t),i=r.getElementsByClassName("react-flow__handle"),l=u.$t.construct(r),a=Array.from(i).map(c=>{const d=u.$t.center(u.$t.construct(c)),x=u.J.translation(u.$t.topLeft(l),d),p=c.className.match(/react-flow__handle-(\w+)/);if(p==null)throw new Error("[schematic] - cannot find handle orientation");const m=u.K.construct(p[0]);return new Hd(x,m)});return new Ks(t,s,a)}}const pR=({fromX:e,fromY:t,toX:n,toY:s,fromPosition:r,toPosition:i,fromNode:l,connectionLineStyle:a,connectionStatus:c})=>{const x=document.querySelector(".react-flow__handle-connecting")?.className.match(/react-flow__handle-(\w+)/);if(x!=null){const j=u.K.outer.safeParse(x[1]);j.success&&(i=j.data)}const p=Bt(),m=Yt({sourcePos:u.J.construct(e,t),targetPos:u.J.construct(n,s),sourceOrientation:r,targetOrientation:i,sourceBox:Oe(p,l?.id??""),targetBox:Oe(p,l?.id??"")}),h=Kc(u.J.construct(e,t),m,p.getZoom(),!1);return o.jsxRuntimeExports.jsx(zd,{points:h,style:{...a,stroke:u.ir.cssString(c==="invalid"?"var(--pluto-error-z)":"var(--pluto-gray-l11)"),strokeWidth:2,fill:"none"}})},mR=({id:e,source:t,target:n,sourcePosition:s,targetHandleId:r,targetPosition:i,style:l,segments:a=[],onSegmentsChange:c,color:d="var(--pluto-gray-l11)",selected:x=!1,variant:p="pipe",...m})=>{const h=u.J.construct(m.sourceX,m.sourceY),j=g.useRef(h),E=u.J.equals(h,j.current),S=u.J.construct(m.targetX,m.targetY),R=g.useRef(S),v=u.J.equals(S,R.current),y=Bt(),[C,M,k]=f.useCombinedStateAndRef(()=>a.length>0?a:Yt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Oe(y,t),targetBox:Oe(y,n)})),A=g.useRef(i),I=g.useRef(s),B=Pe.useDebouncedCallback(c,100,[c]);if(!E||!v){let w=C;const P=u.J.translation(j.current,h),L=u.J.translation(S,R.current);u.J.equals(P,u.J.scale(L,-1),.001)?(j.current=h,R.current=S):(E?v||(w=C2({delta:L,segments:w}),A.current!==i&&(A.current=i,w=Yt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Oe(y,t),targetBox:Oe(y,n)})),Ti({sourcePos:h,targetPos:S,next:w,prev:C})||(w=Yt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Oe(y,t),targetBox:Oe(y,n)})),R.current=S):(w=R2({delta:P,segments:w}),I.current!==s&&(I.current=s,w=Yt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Oe(y,t),targetBox:Oe(y,n)})),Ti({sourcePos:h,targetPos:S,next:w,prev:C})||(w=Yt({sourcePos:h,targetPos:S,sourceOrientation:s,targetOrientation:i,sourceBox:Oe(y,t),targetBox:Oe(y,n)})),j.current=h),B(w),M(w))}const V=g.useRef(null),D=Pe.useCursorDrag({onStart:g.useCallback((w,P,L)=>{V.current={index:Number(L.currentTarget.id.split("-")[1]),segments:[...k.current]}},[]),onMove:g.useCallback(w=>{if(V.current==null)return;const P=j2({segments:V.current.segments,index:V.current.index,magnitude:u.$t.dim(w,u.g.swap(V.current.segments[V.current.index].direction),!0)/y.getZoom()});M(P)},[]),onEnd:g.useCallback(()=>c(k.current),[c])}),$=Kc(h,C,y.getZoom(),!0),H=Dd[p];return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(H,{points:$,color:d}),x&&fR($).map((w,P)=>{const L=C[P].direction,O=u.g.swap(L),z={[u.g.dimension(L)]:"18px",[u.g.dimension(O)]:"4px"},F={[L]:w[L]-9,[O]:w[O]-2};return o.jsxRuntimeExports.jsxs(g.Fragment,{children:[o.jsxRuntimeExports.jsx("rect",{className:u.CSS.BE("diagram-edge-handle","background"),fill:"var(--pluto-gray-l0)",stroke:"var(--pluto-primary-z)",...z,...F,rx:"2px",ry:"2px"}),o.jsxRuntimeExports.jsx("foreignObject",{x:w.x-9,y:w.y-9,width:"18px",height:"18px",children:o.jsxRuntimeExports.jsx("div",{id:`handle-${P}`,className:u.CSS(u.CSS.BE("diagram-edge-handle","dragger"),u.CSS.dir(L)),draggable:!0,onDragStart:D})})]},P)})]})},fR=e=>e.slice(1).map((t,n)=>{const s=e[n];return u.J.construct((t.x+s.x)/2,(t.y+s.y)/2)}),hR=({initialNodes:e,initialEdges:t,allowEdit:n=!0,initialViewport:s={position:u.J.ZERO,zoom:1}})=>{const[r,i]=g.useState(n),[l,a]=g.useState(e),[c,d]=g.useState(t),[x,p]=g.useState(s),[m,h]=g.useState(!1);return{viewport:x,onViewportChange:p,edges:c,nodes:l,onNodesChange:a,onEdgesChange:d,editable:r,onEditableChange:i,fitViewOnResize:m,setFitViewOnResize:h}},gR=()=>!0,jR={nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,zoomOnDoubleClick:!1,nodeClickDistance:5,reconnectRadius:15,connectionRadius:30},ER={connectionRadius:0,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!1,panOnScroll:!1,zoomOnScroll:!1,zoomOnDoubleClick:!1,zoomOnPinch:!1,edgesFocusable:!1,edgesReconnectable:!1,nodesFocusable:!1,reconnectRadius:0},Go={maxZoom:1,minZoom:.5,padding:.05},yR={hideAttribution:!0},Vd=g.createContext({editable:!0,visible:!0,onEditableChange:()=>{},registerNodeRenderer:()=>{},fitViewOnResize:!1,setFitViewOnResize:()=>{}}),$n=()=>g.use(Vd),Fd=g.memo(({children:e})=>{const{registerNodeRenderer:t}=$n();return g.useEffect(()=>t(e),[t,e]),null});Fd.displayName="NodeRenderer";const SR=["Backspace","Delete"],RR=({aetherKey:e,onNodesChange:t,onEdgesChange:n,nodes:s,edges:r,onEditableChange:i,editable:l,viewport:a,triggers:c,onViewportChange:d,fitViewOnResize:x,setFitViewOnResize:p,visible:m,dragHandleSelector:h,...j})=>{const E=f.useMemoDeepEqual({visible:m}),[{path:S},,R]=f.use$2({aetherKey:e,type:_.Diagram$1.TYPE,schema:_.diagramStateZ,initialState:{position:a.position,region:u.$t.ZERO,zoom:a.zoom,...E}}),{fitView:v}=Bt(),y=Pe.useDebouncedCallback(G=>void v(G),50,[v]),C=Ln(g.useCallback(G=>{x&&y(Go),R(re=>({...re,region:G}))},[R,y,x]));g.useEffect(()=>R(G=>({...G,...E})),[E]);const M=u.ir.hex(f.use().colors.gray.l11),k=f.useMemoCompare(()=>c??br.zoom,f.compareModeConfigs,[c]),A=g.useRef(null),I=g.useCallback(G=>{const re=A.current;re!=null&&re.x===G.x&&re.y===G.y&&re.zoom===G.zoom||(A.current=G,!(isNaN(G.x)||isNaN(G.y)||isNaN(G.zoom))&&(R(ie=>({...ie,position:G,zoom:G.zoom})),d(Qc(G))))},[R,d]);v4({onStart:I,onChange:I,onEnd:I});const[B,V]=g.useState(()=>()=>null),D=g.useCallback(G=>V(()=>G),[]),$=g.useMemo(()=>({custom:({id:G,positionAbsoluteX:re,positionAbsoluteY:ie,selected:we=!1,draggable:ke=!0})=>B({symbolKey:G,position:{x:re,y:ie},selected:we,draggable:ke})}),[B]),H=g.useRef(r),w=g.useMemo(()=>(H.current=r,zr(r)),[r]),P=g.useRef(s),L=g.useMemo(()=>(P.current=s,Dr(s,h)),[s,h]),O=g.useCallback(G=>t(eu(P.current,re=>ad(G,re)),G),[t]),z=g.useCallback(G=>n(ns(H.current,re=>cd(G,re),M)),[n,M]),F=g.useCallback((G,re)=>n(ns(H.current,ie=>W5(G,re,ie),M)),[]),Z=g.useCallback(G=>n(ns(H.current,re=>Fu(G,re),M)),[n,M]),Y=g.useCallback((G,re)=>{const ie=[...H.current],we=ie.findIndex(ke=>ke.key===G);we!==-1&&(ie[we]={...ie[we],segments:re},H.current=ie,n(ie))},[n]),q=l?jR:ER,oe=f.useSyncedRef(Y),Q=g.useMemo(()=>({default:G=>o.jsxRuntimeExports.jsx(mR,{...G,segments:G.data?.segments??[],color:G.data?.color,variant:G.data?.variant,onSegmentsChange:g.useCallback(re=>oe.current(G.id,re),[G.id])},G.id)}),[]),ue=g.useRef(null);f.use$1({triggers:k.zoomReset,callback:g.useCallback(({stage:G,cursor:re})=>{const ie=ue.current;ie==null||G!=="start"||!u.$t.contains(ie,re)||v()},[v])});const te=f.purgeMouse(k.select)[0]??null,ne=f.purgeMouse(k.pan)[0]??null,ee=f.purgeMouse(k.zoom)[0]??null,le={selectionOnDrag:te==null,panOnDrag:ne==null,selectionKeyCode:te,panActivationKeyCode:ne,zoomActivationKeyCode:ee},ge=f.useCombinedRefs(ue,C),ye=g.useMemo(()=>({visible:m,editable:l,onEditableChange:i,registerNodeRenderer:D,fitViewOnResize:x,setFitViewOnResize:p}),[l,m,i,D,x]);return o.jsxRuntimeExports.jsx(Vd,{value:ye,children:o.jsxRuntimeExports.jsx(f.Composite,{path:S,children:m&&o.jsxRuntimeExports.jsx(w4,{...le,className:u.CSS(u.CSS.B("diagram"),u.CSS.editable(l),u.CSS.BE("symbol","container")),nodes:L,edges:w,nodeTypes:$,edgeTypes:Q,ref:ge,fitView:!0,onNodesChange:O,onEdgesChange:z,onConnect:Z,onReconnect:F,defaultViewport:Jc(a),connectionLineComponent:pR,elevateEdgesOnSelect:!0,minZoom:.5,maxZoom:1.2,isValidConnection:gR,connectionMode:Tt.Loose,fitViewOptions:Go,selectionMode:qt.Partial,proOptions:yR,deleteKeyCode:SR,...j,style:{[u.CSS.var("diagram-zoom")]:a.zoom,...j.style},...q,nodesDraggable:l})})})},CR=()=>{const{editable:e}=$n();return e?o.jsxRuntimeExports.jsx(L4,{}):null},wR=e=>o.jsxRuntimeExports.jsx(f.Box,{pack:!0,borderColor:5,className:u.CSS.BE("diagram","controls"),...e}),bR=({onClick:e,...t})=>{const{editable:n,onEditableChange:s}=$n();return o.jsxRuntimeExports.jsx(Wl.Toggle,{onChange:()=>s(!n),value:n,uncheckedVariant:"outlined",checkedVariant:"filled",tooltipLocation:u.K.BOTTOM_LEFT,size:"small",tooltip:`${n?"Disable":"Enable"} editing`,...t,children:n?o.jsxRuntimeExports.jsx(f.EditOff,{}):o.jsxRuntimeExports.jsx(f.Edit,{})})},vR=({onClick:e,...t})=>{const{fitView:n}=Bt(),{fitViewOnResize:s,setFitViewOnResize:r}=$n();return o.jsxRuntimeExports.jsx(Wl.Toggle,{onClick:i=>{n(Go),e?.(i)},value:s,onChange:r,rightClickToggle:!0,tooltip:o.jsxRuntimeExports.jsx(f.Text,{level:"small",children:"Fit view to contents"}),tooltipLocation:u.K.BOTTOM_LEFT,size:"small",...t,children:o.jsxRuntimeExports.jsx(f.Expand,{})})},_R=e=>o.jsxRuntimeExports.jsx(Ad,{children:o.jsxRuntimeExports.jsx(RR,{...e})}),MR=Object.freeze(Object.defineProperty({__proto__:null,Background:CR,Controls:wR,DefaultPath:zd,Diagram:_R,FitViewControl:vR,HandleLayout:Hd,NodeLayout:Ks,NodeRenderer:Fd,PATHS:Dd,SelectPathType:dR,ToggleEditControl:bR,alignNodes:_2,calcPath:jt,edgeConverter:ns,edgeZ:b2,nodeConverter:eu,nodeZ:v2,offsetPath:Q4,rfEdgeDataZ:Xc,selectNode:Ws,selectNodeBox:Oe,selectNodeLayout:xR,translateEdgesBackward:qc,translateEdgesForward:zr,translateNodesBackward:Uc,translateNodesForward:Dr,translateViewportBackward:Qc,translateViewportForward:Jc,use:hR,useContext:$n,viewportZ:w2},Symbol.toStringTag,{value:"Module"})),NR=({aetherKey:e,font:t,className:n,visible:s=!0,emptyContent:r=o.jsxRuntimeExports.jsx(f.Summary,{center:!0,level:"h3",variant:"disabled",hideIcon:!0,children:"Empty Log"}),color:i,telem:l,...a})=>{const c=f.useMemoDeepEqual({font:t,color:i,telem:l,visible:s}),[,{scrolling:d,empty:x},p]=f.use$2({type:_.Log.TYPE,schema:_.logState,initialState:{empty:!0,region:u.$t.ZERO,scrolling:!1,wheelPos:0,...c}});g.useEffect(()=>{p(h=>({...h,...c}))},[c,p]);const m=Ln(g.useCallback(h=>p(j=>({...j,region:h})),[p]));return o.jsxRuntimeExports.jsx("div",{ref:m,className:u.CSS(u.CSS.B("log"),n),onWheel:h=>{p(j=>({...j,wheelPos:j.wheelPos-h.deltaY,scrolling:j.scrolling?j.scrolling:h.deltaY<0}))},...a,children:x?r:o.jsxRuntimeExports.jsx(f.Button,{className:u.CSS(u.CSS.BE("log","live"),d&&u.CSS.M("active")),variant:"outlined",onClick:()=>p(h=>({...h,scrolling:!h.scrolling})),tooltip:d?"Resume Scrolling":"Pause Scrolling",tooltipLocation:u.K.BOTTOM_LEFT,children:o.jsxRuntimeExports.jsx(f.Dynamic,{})})})},kR=Object.freeze(Object.defineProperty({__proto__:null,Log:NR},Symbol.toStringTag,{value:"Module"})),LR="Schematic.Grid",Gs=u.CSS.B("drag-handle"),PR=e=>{const n=Ws(e).closest(".react-flow__pane");n!=null&&f.triggerReflow(n)},Bn=e=>{const t=({symbolKey:s,items:r,onLocationChange:i})=>{const l=`${s}.${LR}`,[a,c]=g.useState(!1),d=g.useMemo(()=>f.canDropOfType(l),[l]),x=f.useSyncedRef(i),{startDrag:p,onDragEnd:m,...h}=f.useDragAndDrop({type:l,canDrop:d,onDrop:g.useCallback(({items:R})=>(c(!1),R),[]),onDragOver:g.useCallback(R=>{const{items:v}=R;c(d(R)),v.forEach(({key:y})=>x.current(y,e))},[])}),j=r.filter(R=>R.location===e),E=g.useCallback((R,v)=>{p([{key:v,type:l}]),document.addEventListener("mousemove",m,{once:!0})},[p,l,m]),S=d(f.useDraggingState());return o.jsxRuntimeExports.jsx(f.Box,{direction:u.K.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e),u.CSS.dropRegion(S),a&&u.CSS.B("dragging-over"),S&&u.CSS.B("dragging")),onDragLeave:()=>c(!1),empty:!0,...h,children:j.map(({element:R,key:v})=>o.jsxRuntimeExports.jsx(g.Fragment,{children:g.cloneElement(R,{draggable:!0,onDragStart:y=>E(y,v),onDragEnd:m,style:{...R.props.style,cursor:"grab"}})},v))})};return({symbolKey:s,...r})=>{const{editable:i,items:l}=r;if(i)return o.jsxRuntimeExports.jsx(t,{symbolKey:s,...r});const a=l.filter(c=>c.location===e);return a.length===0?null:o.jsxRuntimeExports.jsx(f.Box,{direction:u.K.direction(e),className:u.CSS(u.CSS.BE("grid","item"),u.CSS.loc(e)),empty:!0,children:a.map(({element:c,key:d})=>o.jsxRuntimeExports.jsx(g.Fragment,{children:c},d))})}},TR=Bn("top"),AR=Bn("left"),IR=Bn("right"),OR=Bn("bottom"),$R=Bn("center"),Dt=({editable:e,allowRotate:t=!0,children:n,allowCenter:s,onRotate:r,symbolKey:i,...l})=>{const a=g.useRef(e);return e!==a.current&&(PR(i),a.current=e),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(TR,{editable:e,symbolKey:i,...l},`top-${i}`),o.jsxRuntimeExports.jsx(AR,{editable:e,symbolKey:i,...l},`left-${i}`),o.jsxRuntimeExports.jsx(IR,{editable:e,symbolKey:i,...l},`right-${i}`),o.jsxRuntimeExports.jsx(OR,{editable:e,symbolKey:i,...l},`bottom-${i}`),s&&o.jsxRuntimeExports.jsx($R,{editable:e,symbolKey:i,...l},`center-${i}`),e&&t&&o.jsxRuntimeExports.jsx(f.Button,{className:u.CSS.BE("grid","rotate"),size:"tiny",variant:"filled",onClick:r,children:o.jsxRuntimeExports.jsx(f.Rotate,{})}),o.jsxRuntimeExports.jsx("div",{className:Gs,children:n})]})},BR=_.MODES,DR=({aetherKey:e,sink:t,mode:n})=>{const s=f.useMemoDeepEqual({sink:t,mode:n}),r=g.useRef({trigger:0,...s}),{setState:i}=f.useLifecycle({aetherKey:e,type:_.Button.TYPE,schema:_.buttonStateZ,initialState:r.current});g.useEffect(()=>{r.current={...r.current,...s},i(r.current)},[s,i,e]);const l=g.useCallback(()=>{r.current.trigger+=_.MOUSE_UP_INCREMENT,i(r.current)},[i]),a=g.useCallback(()=>{r.current.trigger+=_.MOUSE_DOWN_INCREMENT,i(r.current)},[i]);return{onClick:l,onMouseDown:a,onMouseUp:l}},zR=e=>o.jsxRuntimeExports.jsxs(fe.Buttons,{...e,keys:BR,children:[o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"fire",tooltip:"Output true when clicked",children:"Fire"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"momentary",tooltip:"Output true on press, false on release",children:"Momentary"}),o.jsxRuntimeExports.jsx(fe.Button,{itemKey:"pulse",tooltip:"Output true and then immediately output false on click",children:"Pulse"})]}),HR=({value:e,hideOuter:t=!1,showOuterCenter:n=!1,hideInner:s,onChange:r})=>{const{outer:i}=e,l=c=>()=>r({...e,...c}),a=u.CSS.B("select","orientation");return t?o.jsxRuntimeExports.jsx($l,{className:a,value:e,onChange:r}):o.jsxRuntimeExports.jsxs(f.Box,{className:a,align:"center",justify:"center",gap:"tiny",children:[o.jsxRuntimeExports.jsx(rt,{selected:i==="top",onClick:l({outer:"top"})}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",justify:"center",gap:"tiny",children:[o.jsxRuntimeExports.jsx(rt,{selected:i==="left",onClick:l({outer:"left"})}),o.jsxRuntimeExports.jsx($l,{hideInner:s,value:e,onChange:r,showOuterCenter:n}),o.jsxRuntimeExports.jsx(rt,{selected:i==="right",onClick:l({outer:"right"})})]}),o.jsxRuntimeExports.jsx(rt,{selected:i==="bottom",onClick:l({outer:"bottom"})})]})},$l=({value:e,onChange:t,className:n,hideInner:s=!1,showOuterCenter:r=!1,...i})=>{const{inner:l}=e,a=x=>()=>t({...e,...x});let c={};s&&(c={opacity:0,userSelect:"none",width:"1.5rem",height:"1.5rem"});let d=null;return r?d=o.jsxRuntimeExports.jsx(rt,{selected:e.outer==="center",onClick:a({outer:"center"})}):d=o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:l==="top",onClick:a({inner:"top"})}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"center",justify:"center",children:[o.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,selected:l==="left",onClick:a({inner:"left"})}),o.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,selected:l==="right",onClick:a({inner:"right"})})]}),o.jsxRuntimeExports.jsx(rt,{style:c,disabled:s,className:u.CSS(u.CSS.dir("y")),selected:l==="bottom",onClick:a({inner:"bottom"})})]}),o.jsxRuntimeExports.jsx(f.Box,{className:u.CSS(n,u.CSS.B("value"),r&&u.CSS.M("show-outer-center")),y:!0,align:"center",justify:"center",empty:!0,...i,children:d})},rt=({selected:e,className:t,...n})=>o.jsxRuntimeExports.jsx(f.Button,{variant:"text",className:u.CSS(t,u.CSS.selected(e)),size:"tiny",...n,children:o.jsxRuntimeExports.jsx("div",{className:"symbol"})}),Le=({className:e,direction:t,...n})=>o.jsxRuntimeExports.jsx(f.Box,{direction:t,align:"stretch",className:u.CSS(u.CSS.B("symbol-form"),e),gap:t==="x"?"large":"medium",...n}),yt=({hideOuter:e,hideInner:t,showOuterCenter:n,...s})=>t&&e?null:o.jsxRuntimeExports.jsx(Ee,{label:"Orientation",padHelpText:!1,...s,children:({value:r,onChange:i})=>o.jsxRuntimeExports.jsx(HR,{value:{inner:r.orientation??"top",outer:r.label?.orientation??"top"},hideInner:t,hideOuter:e,showOuterCenter:n,onChange:l=>i({...r,orientation:l.inner,label:{...r.label,orientation:l.outer}})})}),dt=({path:e,omit:t=[]})=>o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(Ee,{path:`${e}.label`,label:"Label",padHelpText:!1,grow:!0,children:n=>o.jsxRuntimeExports.jsx(f.Text$2,{selectOnFocus:!0,...n})}),o.jsxRuntimeExports.jsx(De,{visible:!t.includes("maxInlineSize"),style:{maxWidth:125},path:`${e}.maxInlineSize`,hideIfNull:!0,label:"Label Wrap Width",inputProps:{endContent:"px",dragScale:{x:1,y:.5}},padHelpText:!1}),o.jsxRuntimeExports.jsx(Ee,{hideIfNull:!0,visible:!t.includes("level"),path:`${e}.level`,label:"Label Size",padHelpText:!1,children:({value:n,onChange:s})=>o.jsxRuntimeExports.jsx(nn,{value:n,onChange:s})}),o.jsxRuntimeExports.jsx(Ee,{visible:!t.includes("align"),path:`${e}.align`,label:"Label Alignment",padHelpText:!1,hideIfNull:!0,children:({value:n,onChange:s})=>o.jsxRuntimeExports.jsx(fe.SelectAlignment,{value:n,onChange:s})}),o.jsxRuntimeExports.jsx(Ee,{visible:!t.includes("direction"),path:`${e}.direction`,label:"Label Direction",padHelpText:!1,hideIfNull:!0,children:({value:n,onChange:s})=>o.jsxRuntimeExports.jsx(gc,{value:n,onChange:s,yDirection:"down"})})]}),Be=e=>o.jsxRuntimeExports.jsx(Ee,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n,variant:s,...r})=>o.jsxRuntimeExports.jsx(Pe.Swatch,{value:t??u.ir.setAlpha(u.ir.ZERO,1),onChange:n,...r,bordered:!0})}),Zd=e=>o.jsxRuntimeExports.jsx(Ee,{hideIfNull:!0,label:"Scale",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(f.Numeric,{dragScale:{x:.75,y:.5},bounds:{lower:50,upper:1e3},endContent:"%",value:Math.round(t*100),onChange:s=>n(parseFloat((s/100).toFixed(2)))})}),xe=({omit:e,hideInnerOrientation:t,hideOuterOrientation:n})=>o.jsxRuntimeExports.jsxs(Le,{x:!0,align:"stretch",empty:!0,children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{omit:e,path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color",optional:!0}),o.jsxRuntimeExports.jsx(Ee,{path:"normallyOpen",label:"Normally Open",padHelpText:!1,hideIfNull:!0,optional:!0,children:s=>o.jsxRuntimeExports.jsx(f.Switch$1,{...s})}),o.jsxRuntimeExports.jsx(Zd,{path:"scale"})]})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideInner:t,hideOuter:n})]}),VR=({path:e})=>{const{value:t,onChange:n}=Et(e),s=_.sourcePipelinePropsZ.parse(t.source?.props),r=_.sinkPipelinePropsZ.parse(t.sink?.props),i=_.streamChannelValuePropsZ.parse(s.segments.valueStream.props),l=_.setChannelValuePropsZ.parse(r.segments.setter.props),a=d=>{d??=0;const x=_.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:_.streamChannelValue({channel:d}),threshold:_.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"});n({...t,source:x})},c=d=>{d??=0;const x=_.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:_.setChannelValue({channel:d}),setpoint:_.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),p=_.authoritySource({channel:d}),m=_.acquireChannelControl({channel:d,authority:255});n({...t,sink:x,control:{showChip:!0,showIndicator:!0,...t.control,chip:{sink:m,source:p},indicator:{statusSource:p}}})};return o.jsxRuntimeExports.jsxs(Le,{x:!0,grow:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(Te.Item,{label:"State Channel",grow:!0,children:o.jsxRuntimeExports.jsx(Nt,{value:i.channel,onChange:a})}),o.jsxRuntimeExports.jsx(Te.Item,{label:"Command Channel",grow:!0,children:o.jsxRuntimeExports.jsx(Nt,{value:l.channel,onChange:c})}),o.jsxRuntimeExports.jsx(Ms,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},ni=[{tabKey:"style",name:"Style"},{tabKey:"control",name:"Control"}],Se=({hideInnerOrientation:e})=>{const t=g.useCallback(({tabKey:s})=>{switch(s){case"control":return o.jsxRuntimeExports.jsx(VR,{path:""});default:return o.jsxRuntimeExports.jsx(xe,{hideInnerOrientation:e})}},[e]),n=Ne.useStatic({tabs:ni,content:t});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...n})},mt={y:2,x:.25},jn={lower:0,upper:2e3},Bl={lower:0,upper:51},Yd=({includeBorderRadius:e=!1,includeStrokeWidth:t=!1})=>o.jsxRuntimeExports.jsxs(Le,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Be,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(Ee,{path:"borderRadius.x",hideIfNull:!0,optional:!0,label:"X Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:Bl,endContent:"%",...n})}),o.jsxRuntimeExports.jsx(Ee,{path:"borderRadius.y",hideIfNull:!0,optional:!0,label:"Y Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:Bl,endContent:"%",...n})}),e&&o.jsxRuntimeExports.jsx(Ee,{path:"borderRadius",hideIfNull:!0,optional:!0,label:"Border Radius",grow:!0,children:n=>o.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:jn,endContent:"px",...n})}),t&&o.jsxRuntimeExports.jsx(Ee,{path:"strokeWidth",hideIfNull:!0,optional:!0,label:"Border Width",grow:!0,children:n=>o.jsxRuntimeExports.jsx(f.Numeric,{dragScale:mt,bounds:{lower:0,upper:21},endContent:"px",...n})}),o.jsxRuntimeExports.jsx(Ee,{path:"dimensions.width",label:"Width",grow:!0,children:({value:n,...s})=>o.jsxRuntimeExports.jsx(f.Numeric,{value:n??200,dragScale:mt,bounds:jn,endContent:"px",...s})}),o.jsxRuntimeExports.jsx(Ee,{path:"dimensions.height",label:"Height",grow:!0,children:({value:n,...s})=>o.jsxRuntimeExports.jsx(f.Numeric,{value:n??200,dragScale:mt,bounds:jn,endContent:"px",...s})})]})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideInner:!0,showOuterCenter:!0,label:"Label Location"})]}),FR=()=>o.jsxRuntimeExports.jsx(Le,{direction:"x",align:"stretch",children:o.jsxRuntimeExports.jsxs(f.Box,{direction:"y",grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{direction:"x",children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Be,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(De,{path:"rotation",label:"Rotation",inputProps:{dragScale:{x:1,y:.25},bounds:{lower:0,upper:360},endContent:"°"},grow:!0}),o.jsxRuntimeExports.jsx(De,{path:"numSides",label:"Number of Sides",inputProps:{dragScale:{x:.5,y:.1},bounds:{lower:3,upper:21}},grow:!0}),o.jsxRuntimeExports.jsx(De,{path:"sideLength",label:"Side Length",inputProps:{dragScale:{x:1,y:1},bounds:{lower:10,upper:500},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(De,{path:"cornerRounding",label:"Corner Rounding",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:181},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(De,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),ZR=()=>o.jsxRuntimeExports.jsx(Le,{direction:"x",align:"stretch",children:o.jsxRuntimeExports.jsxs(f.Box,{direction:"y",grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{direction:"x",children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Be,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(De,{path:"radius",label:"Radius",inputProps:{dragScale:{x:1,y:1},bounds:{lower:0,upper:500},endContent:"px"},grow:!0}),o.jsxRuntimeExports.jsx(De,{path:"strokeWidth",label:"Border Width",inputProps:{dragScale:{x:1,y:1},bounds:{lower:1,upper:21},endContent:"px"},grow:!0})]})]})}),Wd=[{tabKey:"style",name:"Style"},{tabKey:"telemetry",name:"Telemetry"},{tabKey:"redline",name:"Redline"}],YR={dragScale:{x:1,y:.25},bounds:{lower:40,upper:500},endContent:"px"},WR=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return o.jsxRuntimeExports.jsxs(Le,{y:!0,empty:!0,children:[o.jsxRuntimeExports.jsx(Or,{path:""}),";"]});case"redline":return o.jsxRuntimeExports.jsx(Le,{y:!0,empty:!0,children:o.jsxRuntimeExports.jsx(Ir,{path:"redline"})});default:return o.jsxRuntimeExports.jsxs(Le,{x:!0,children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Ee,{path:"units",label:"Units",align:"start",padHelpText:!1,children:s=>o.jsxRuntimeExports.jsx(f.Text$2,{...s})}),o.jsxRuntimeExports.jsx(De,{path:"inlineSize",label:"Value Width",hideIfNull:!0,inputProps:YR}),o.jsxRuntimeExports.jsx(Ee,{path:"level",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:s,onChange:r})=>o.jsxRuntimeExports.jsx(nn,{value:s,onChange:r})})]})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideInner:!0})]})}},[]),t=Ne.useStatic({tabs:Wd,content:e});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...t})},KR=({path:e})=>{const{value:t,onChange:n}=Et(e),s=_.sourcePipelinePropsZ.parse(t.source?.props),r=_.streamChannelValuePropsZ.parse(s.segments.valueStream.props),i=_.withinBoundsProps.parse(s.segments.threshold.props),l=d=>{d??=0;const x=_.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:_.streamChannelValue({channel:d}),threshold:_.withinBounds({trueBound:{lower:i.trueBound.lower??.9,upper:i.trueBound.upper??1.1}})},outlet:"threshold"});n({...t,source:x})},a=d=>{const x=_.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:_.streamChannelValue({channel:r.channel}),threshold:_.withinBounds({trueBound:d})},outlet:"threshold"});n({...t,source:x})},[c]=Ns(r.channel);return g.useEffect(()=>n({...t}),[c]),o.jsxRuntimeExports.jsxs(Le,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(Te.Item,{label:"Input Channel",grow:!0,children:o.jsxRuntimeExports.jsx(Nt,{value:r.channel,onChange:l})}),o.jsxRuntimeExports.jsx(Te.Item,{label:"Lower Threshold",children:o.jsxRuntimeExports.jsx(f.Numeric,{value:i.trueBound.lower??.9,onChange:d=>a({...i.trueBound,lower:d})})}),o.jsxRuntimeExports.jsx(Te.Item,{label:"Upper Threshold",children:o.jsxRuntimeExports.jsx(f.Numeric,{value:i.trueBound.upper??1.1,onChange:d=>a({...i.trueBound,upper:d})})})]})},GR=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return o.jsxRuntimeExports.jsx(KR,{path:""});default:return o.jsxRuntimeExports.jsx(xe,{})}},[]),t=Ne.useStatic({tabs:Wd,content:e});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...t})},XR=({path:e})=>{const{value:t,onChange:n}=Et(e),s=_.sinkPipelinePropsZ.parse(t.sink?.props),r=_.setChannelValuePropsZ.parse(s.segments.setter.props),i=l=>{l??=0;const a=_.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:_.setChannelValue({channel:l}),setpoint:_.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),c=_.authoritySource({channel:l}),d=_.acquireChannelControl({channel:l,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:d,source:c},showIndicator:!0,indicator:{statusSource:c}}})};return o.jsxRuntimeExports.jsxs(Le,{y:!0,empty:!0,children:[o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Te.Item,{label:"Output Channel",grow:!0,padHelpText:!1,children:o.jsxRuntimeExports.jsx(Nt,{value:r.channel,onChange:i})}),o.jsxRuntimeExports.jsx(De,{label:"Activation Delay",path:"onClickDelay",inputProps:{endContent:"ms"},hideIfNull:!0,padHelpText:!1}),o.jsxRuntimeExports.jsx(Ms,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0,padHelpText:!1})]}),o.jsxRuntimeExports.jsx(Ee,{path:"mode",label:"Mode",optional:!0,children:({value:l,onChange:a})=>o.jsxRuntimeExports.jsx(zR,{value:l,onChange:a})})]})},UR=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"control":return o.jsxRuntimeExports.jsx(XR,{path:""});default:return o.jsxRuntimeExports.jsx(xe,{omit:["align","maxInlineSize"],hideInnerOrientation:!0,hideOuterOrientation:!0})}},[]),t=Ne.useStatic({tabs:ni,content:e});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...t})},qR=({path:e})=>{const{value:t,onChange:n}=Et(e),s=_.sinkPipelinePropsZ.parse(t.sink?.props),r=_.setChannelValuePropsZ.parse(s.segments.setter.props),i=l=>{l??=0;const a=_.sinkPipeline("number",{connections:[],segments:{setter:_.setChannelValue({channel:l})},inlet:"setter"}),c=_.authoritySource({channel:l}),d=_.acquireChannelControl({channel:l,authority:255});n({...t,sink:a,control:{...t.control,showChip:!0,chip:{sink:d,source:c},showIndicator:!0,indicator:{statusSource:c}},disabled:l==0})};return o.jsxRuntimeExports.jsx(Le,{x:!0,grow:!0,align:"stretch",children:o.jsxRuntimeExports.jsx(Te.Item,{label:"Command Channel",grow:!0,children:o.jsxRuntimeExports.jsx(Nt,{value:r.channel,onChange:i})})})},JR=()=>{const e=g.useCallback(({tabKey:n})=>{switch(n){case"control":return o.jsxRuntimeExports.jsx(qR,{path:""});default:return o.jsxRuntimeExports.jsxs(Le,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,align:"stretch",grow:!0,gap:"small",children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(ur,{path:"units",label:"Units",align:"start",padHelpText:!1}),o.jsxRuntimeExports.jsx(Ee,{path:"size",label:"Size",hideIfNull:!0,padHelpText:!1,children:({value:s,onChange:r})=>o.jsxRuntimeExports.jsx(ia,{value:s,onChange:r})}),o.jsxRuntimeExports.jsx(Be,{path:"color"})]})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideInner:!0})]})}},[]),t=Ne.useStatic({tabs:ni,content:e});return o.jsxRuntimeExports.jsx(Ne.Tabs,{...t})},QR=()=>{const e=Et("autoFit",{optional:!0});return o.jsxRuntimeExports.jsxs(Le,{x:!0,align:"stretch",grow:!0,children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsxs(f.Box,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsx(Ee,{path:"value",label:"Text",padHelpText:!1,grow:!0,children:t=>o.jsxRuntimeExports.jsx(f.Text$2,{...t})}),o.jsxRuntimeExports.jsx(Ee,{path:"level",label:"Text Size",padHelpText:!1,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(nn,{value:t,onChange:n})}),o.jsxRuntimeExports.jsx(Ee,{path:"align",label:"Alignment",padHelpText:!1,hideIfNull:!0,children:({value:t,onChange:n})=>o.jsxRuntimeExports.jsx(fe.SelectAlignment,{value:t,onChange:n})})]}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Ee,{onChange:(t,{set:n})=>n("autoFit",!1),path:"width",label:"Wrap Width",padHelpText:!1,children:t=>o.jsxRuntimeExports.jsx(f.Numeric,{...t,bounds:{lower:0,upper:2e3},dragScale:5,endContent:"px",children:o.jsxRuntimeExports.jsx(f.Button,{onClick:()=>e?.onChange(!0),disabled:e?.value===!0,variant:"outlined",tooltip:e?.value===!0?"Manually enter value to disable auto fit":"Enable auto fit",children:o.jsxRuntimeExports.jsx(f.AutoFitWidth,{})})})})]})]}),o.jsxRuntimeExports.jsx(yt,{path:""})]})},eC=()=>o.jsxRuntimeExports.jsxs(Le,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label",omit:["maxInlineSize","align","direction"]}),o.jsxRuntimeExports.jsx(Be,{path:"color"})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideOuter:!0})]}),tC=()=>o.jsxRuntimeExports.jsxs(Le,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Be,{path:"backgroundColor",label:"Background Color"}),o.jsxRuntimeExports.jsx(Ee,{path:"dimensions.width",label:"Width",grow:!0,children:({value:e,...t})=>o.jsxRuntimeExports.jsx(f.Numeric,{value:e??200,dragScale:mt,bounds:jn,endContent:"px",...t})}),o.jsxRuntimeExports.jsx(Ee,{path:"dimensions.height",label:"Height",grow:!0,children:({value:e,...t})=>o.jsxRuntimeExports.jsx(f.Numeric,{value:e??200,dragScale:mt,bounds:jn,endContent:"px",...t})})]})]}),o.jsxRuntimeExports.jsx(yt,{path:"",hideInner:!0})]}),zt=()=>o.jsxRuntimeExports.jsxs(Le,{x:!0,align:"stretch",children:[o.jsxRuntimeExports.jsxs(f.Box,{y:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(dt,{path:"label"}),o.jsxRuntimeExports.jsxs(f.Box,{x:!0,grow:!0,children:[o.jsxRuntimeExports.jsx(Be,{path:"color"}),o.jsxRuntimeExports.jsx(Zd,{path:"scale"}),o.jsxRuntimeExports.jsx(Ms,{path:"clickable",label:"Clickable",hideIfNull:!0,optional:!0})]})]}),o.jsxRuntimeExports.jsx(yt,{path:""})]}),nC=()=>o.jsxRuntimeExports.jsx(Yd,{includeBorderRadius:!0,includeStrokeWidth:!0}),sC=()=>o.jsxRuntimeExports.jsx(Se,{hideInnerOrientation:!0}),T=e=>o.jsxRuntimeExports.jsx("path",{vectorEffect:"non-scaling-stroke",...e}),he=e=>o.jsxRuntimeExports.jsx("rect",{vectorEffect:"non-scaling-stroke",...e}),_e=e=>o.jsxRuntimeExports.jsx("circle",{vectorEffect:"non-scaling-stroke",...e}),pe=e=>o.jsxRuntimeExports.jsx("line",{vectorEffect:"non-scaling-stroke",...e}),oC={left:{left:J.Left,right:J.Right,top:J.Top,bottom:J.Bottom},right:{left:J.Right,right:J.Left,top:J.Bottom,bottom:J.Top},top:{left:J.Bottom,right:J.Top,top:J.Left,bottom:J.Right},bottom:{left:J.Top,right:J.Bottom,top:J.Right,bottom:J.Left}},rC=(e,t)=>oC[t][e],iC=(e,t=!1)=>{if(t)return e;switch(e){case J.Left:return J.Right;case J.Right:return J.Left;case J.Top:return J.Bottom;case J.Bottom:return J.Top;default:return J.Top}},lC=(e,t,n,s=!1)=>s?{left:t,top:e}:n==="left"?{top:e,left:t}:n==="right"?{top:100-e,left:100-t}:n==="top"?{top:100-t,left:e}:{top:t,left:100-e},K=({children:e,orientation:t,refreshDeps:n})=>{let s;try{s=b4()}catch{return null}const r=g.useRef(null),i=g.useRef(!0);return g.useEffect(()=>{if(r.current==null)return;if(i.current){i.current=!1;return}const a=r.current.closest(".react-flow__node")?.getAttribute("data-id");a!=null&&s?.(a)},[t,n]),o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("span",{ref:r}),e]})},b=({location:e,orientation:t,preventAutoAdjust:n,left:s,swap:r,top:i,style:l,...a})=>{const c=lC(i,s,t,n);return o.jsxRuntimeExports.jsx(_n,{position:iC(rC(e,t),!r),...a,type:"source",onClick:d=>d.stopPropagation(),className:(u.CSS.B("handle"),u.CSS.BE("handle",a.id)),style:{left:`${c.left}%`,top:`${c.top}%`,...l}})},me=({className:e,enabled:t=!1,triggered:n=!1,orientation:s="left",color:r,...i})=>o.jsxRuntimeExports.jsx("button",{className:u.CSS(u.CSS.B("symbol-primitive"),u.CSS.B("symbol-primitive-toggle"),s!=null&&u.CSS.loc(s),t&&u.CSS.M("enabled"),n&&u.CSS.M("triggered"),e),color:u.ir.cssString(r),...i}),ae=({className:e,...t})=>o.jsxRuntimeExports.jsx("div",{className:u.CSS(u.CSS.B("symbol-primitive"),e),...t}),aC=.8,U=({dimensions:e,orientation:t="left",children:n,className:s,color:r,style:i={},scale:l=1,...a})=>{e=u.g.construct(t)==="y"?u._.swap(e):e;const d=u.ir.cssString(r),x=f.use();let p={...i,aspectRatio:`${e.width} / ${e.height}`,width:u._.scale(e,l*aC).width};return r!=null&&(p={...p,[u.CSS.var("symbol-color")]:u.ir.rgbString(r),[u.CSS.var("symbol-color-contrast")]:u.ir.rgbString(u.ir.pickByContrast(r,x.colors.gray.l0,x.colors.gray.l11))}),o.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:u._.svgViewBox(e),className:u.CSS(u.CSS.loc(t),s),fill:d,stroke:d,...a,style:p,children:o.jsxRuntimeExports.jsx("g",{children:n})})},Kd=({className:e,orientation:t="left",scale:n,color:s,...r})=>{const i=u.ir.cssString(s);return o.jsxRuntimeExports.jsxs(me,{...r,orientation:t,className:u.CSS(u.CSS.B("four-way-valve"),e),children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:12.037,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:87.963,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:7.2916,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:92.6084,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:108,height:96},color:s,scale:n,children:[o.jsxRuntimeExports.jsx(T,{d:"M3.02937 72.7038C2.50936 73.1041 2.50936 73.8883 3.02937 74.2886L7.14001 77.453C7.79757 77.9592 8.75 77.4904 8.75 76.6606V70.3318C8.75 69.502 7.79757 69.0332 7.14001 69.5394L3.02937 72.7038Z",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M54.2 48L17.0545 29.2035C15.059 28.1937 12.7 29.6438 12.7 31.8803V64.1197C12.7 66.3562 15.059 67.8063 17.0545 66.7965L54.2 48ZM54.2 48L91.3455 29.2035C93.341 28.1937 95.7 29.6438 95.7 31.8803V64.1197C95.7 66.3562 93.341 67.8063 91.3455 66.7965L54.2 48Z"}),o.jsxRuntimeExports.jsx(T,{d:"M54.2 48L35.4035 85.1455C34.3937 87.141 35.8439 89.5 38.0803 89.5H70.3197C72.5562 89.5 74.0063 87.141 72.9965 85.1455L54.2 48ZM54.2 48L35.4035 10.8545C34.3937 8.85901 35.8439 6.5 38.0803 6.5H70.3197C72.5562 6.5 74.0063 8.85901 72.9965 10.8545L54.2 48Z"}),o.jsxRuntimeExports.jsx(T,{d:"M8.70001 73.5C24.7 73.5 28.7 86.8333 28.7 93.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M105.371 23.2962C105.891 22.8959 105.891 22.1117 105.371 21.7114L101.26 18.547C100.602 18.0408 99.65 18.5096 99.65 19.3394V25.6682C99.65 26.498 100.602 26.9668 101.26 26.4606L105.371 23.2962Z",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M99.7 22.5C83.7 22.5 79.7 9.16667 79.7 2.5",strokeLinecap:"round"})]})]})},Gd=({color:e,orientation:t="left",scale:n,...s})=>o.jsxRuntimeExports.jsxs(me,{...s,className:u.CSS(u.CSS.B("three-way-valve")),orientation:t,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:97.0278,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:33.1308,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:33.1308,id:"3"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:64},color:e,orientation:t,scale:n,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(T,{d:"M44.3923 22.3611C44.0222 21.6298 42.9778 21.6298 42.6077 22.3611L24.7035 57.7433C23.6937 59.7388 25.1438 62.0978 27.3803 62.0978L59.6197 62.0978C61.8562 62.0978 63.3063 59.7388 62.2965 57.7433L44.3923 22.3611Z"})]})]}),Xd=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(me,{...s,children:[o.jsxRuntimeExports.jsxs(K,{orientation:e,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:e,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:e,left:97.7701,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(U,{dimensions:{width:87,height:42},color:t,orientation:e,scale:n,children:o.jsxRuntimeExports.jsx(T,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"})})]}),Ud=({className:e,color:t,orientation:n="left",normallyOpen:s=!1,scale:r,...i})=>o.jsxRuntimeExports.jsxs(me,{className:u.CSS(u.CSS.B("solenoid-valve"),s&&u.CSS.M("normally-open"),e),...i,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:69.5652,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:69.5652,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:33.3333,top:17.7778,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:2.8986,id:"4"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:66.6667,top:17.7778,id:"5"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:69},color:t,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(T,{className:u.CSS.B("body"),d:"M43.5 48L6.35453 29.2035C4.35901 28.1937 2 29.6438 2 31.8803V64.1197C2 66.3562 4.35901 67.8063 6.35453 66.7965L43.5 48ZM43.5 48L80.6455 29.2035C82.641 28.1937 85 29.6438 85 31.8803V64.1197C85 66.3562 82.641 67.8063 80.6455 66.7965L43.5 48Z"}),o.jsxRuntimeExports.jsx(pe,{x1:43.5,x2:43.5,y1:24.5333,y2:48}),o.jsxRuntimeExports.jsx(he,{x:"29",y:"2",width:"29",height:"22.5333",rx:"1"})]})]}),qd=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(me,{className:u.CSS(u.CSS.B("relief-valve"),e),enabled:r,...i,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:63.7931,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:63.7931,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:58},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 37L6.35453 18.2035C4.35901 17.1937 2 18.6438 2 20.8803V53.1197C2 55.3562 4.35901 56.8063 6.35453 55.7965L43.5 37ZM43.5 37L80.6455 18.2035C82.641 17.1937 85 18.6438 85 20.8803V53.1197C85 55.3562 82.641 56.8063 80.6455 55.7965L43.5 37Z"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 2 L43.5 37",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31.8011 14.0802L55.1773 4.29611",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31.8011 20.0802L55.1773 10.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31.8011 26.0802L55.1773 16.2961",strokeLinecap:"round"})]})]}),Jd=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{orientation:t,className:u.CSS(u.CSS.B("check-valve"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:4.2222,top:48.8372,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:94.2038,top:48.8372,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:45,height:43},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(pe,{x1:"42.3917",y1:"2",x2:"42.3917",y2:"41",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M41.6607 21.8946C42.3917 21.5238 42.3906 20.4794 41.6589 20.1101L6.25889 2.2412C4.26237 1.23341 1.90481 2.68589 1.90704 4.92235L1.93925 37.1617C1.94148 39.3982 4.30194 40.846 6.29644 39.8342L41.6607 21.8946Z"})]})]}),Qd=({className:e,orientation:t="left",color:n,scale:s,...r})=>{const i=u.ir.cssString(n);return o.jsxRuntimeExports.jsxs(ae,{...r,orientation:t,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:8.3333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.4286,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:84,height:42},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(_e,{cx:"7",cy:"7",r:"4",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M7 39.5V11.5941C7 9.42886 9.22384 7.97669 11.2063 8.84738L76.7937 37.6526C78.7762 38.5233 81 37.0711 81 34.9059V6",strokeLinecap:"round"})]})]})},ex=({className:e,orientation:t="left",color:n,scale:s,...r})=>{const i=u.ir.cssString(n);return o.jsxRuntimeExports.jsxs(ae,{orientation:t,className:u.CSS(u.CSS.B("check-valve-with-arrow"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:8.602,top:60.65,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.775,top:60.65,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:93,height:57},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M67.4706 5.20759C67.9906 5.6079 67.9906 6.3921 67.4706 6.79241L63.36 9.95678C62.7024 10.463 61.75 9.99421 61.75 9.16437V2.83563C61.75 2.00579 62.7024 1.53702 63.36 2.04322L67.4706 5.20759Z",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M62.5 6H32.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(_e,{cx:"7.5",cy:"13.5",r:"6",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M49 34.5L11.8545 15.7035C9.85901 14.6937 7.5 16.1438 7.5 18.3803V50.6197C7.5 52.8562 9.85901 54.3063 11.8545 53.2965L49 34.5ZM49 34.5L86.1455 15.7035C88.141 14.6937 90.5 16.1438 90.5 18.3803V50.6197C90.5 52.8562 88.141 54.3063 86.1455 53.2965L49 34.5Z"})]})]})},tx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,orientation:n,className:u.CSS(u.CSS.B("angled-valve"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:32.8125,top:97.0278,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.0278,top:32.8125,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M22.3611 20.1077C21.6298 20.4778 21.6298 21.5222 22.3611 21.8923L57.7433 39.7965C59.7388 40.8063 62.0978 39.3562 62.0978 37.1197L62.0978 4.88029C62.0978 2.64384 59.7388 1.19372 57.7433 2.2035L22.3611 20.1077Z"}),o.jsxRuntimeExports.jsx(T,{d:"M21.8923 22.3611C21.5222 21.6298 20.4778 21.6298 20.1077 22.3611L2.20349 57.7433C1.19372 59.7388 2.64384 62.0978 4.8803 62.0978L37.1197 62.0978C39.3562 62.0978 40.8063 59.7388 39.7965 57.7433L21.8923 22.3611Z"})]})]}),nx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(me,{...i,orientation:n,className:u.CSS(u.CSS.B("ball-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(_e,{cx:"43.5978",cy:"20.972",r:"19"}),o.jsxRuntimeExports.jsx(T,{d:"M26.5 12.8472L6.35452 2.17563C4.35901 1.16585 2 2.61598 2 4.85243V37.0918C2 39.3283 4.35901 40.7784 6.35453 39.7686L26.5 29.3472"}),o.jsxRuntimeExports.jsx(T,{d:"M60.5 28.8486L80.6455 39.5202C82.641 40.5299 85 39.0798 85 36.8434V4.60396C85 2.36751 82.641 0.917381 80.6455 1.92716L60.5 12.3486"})]})]}),sx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(me,{...i,orientation:n,className:u.CSS(u.CSS.B("three-way-ball-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.8,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:33.1308,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:33.1308,id:"3"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(_e,{cx:"43.5978",cy:"21.722",r:"19"}),o.jsxRuntimeExports.jsx(T,{d:"M26.5 13.5972L6.35452 2.92563C4.35901 1.91585 2 3.36598 2 5.60243V37.8418C2 40.0783 4.35901 41.5284 6.35453 40.5186L26.5 30.0972"}),o.jsxRuntimeExports.jsx(T,{d:"M60.5 29.5986L80.6455 40.2702C82.641 41.2799 85 39.8298 85 37.5934V5.35396C85 3.11751 82.641 1.66738 80.6455 2.67716L60.5 13.0986"}),o.jsxRuntimeExports.jsx(T,{d:"M35.3737 38.7499L24.7021 58.8954C23.6923 60.8909 25.1425 63.2499 27.3789 63.2499H59.6183C61.8548 63.2499 63.3049 60.8909 62.2951 58.8954L51.8737 38.7499"})]})]}),ox=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(me,{...i,orientation:n,className:u.CSS(u.CSS.B("gate-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 2 L43.5 39.7965"})]})]}),rx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(me,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-one"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 2V40"}),o.jsxRuntimeExports.jsx(_e,{cx:"43.5",cy:"21",r:"10",fill:u.ir.cssString(e)})]})]}),ix=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(me,{...i,orientation:n,className:u.CSS(u.CSS.B("butterfly-valve-two"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(_e,{cx:"43.5",cy:"21",r:"10",fill:u.ir.cssString(e)}),o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"83",height:"38",rx:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M2.29001 2.29004L84.7069 39.676"})]})]}),lx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(me,{...i,orientation:n,className:u.CSS(u.CSS.B("breather-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:8.081,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:91.919,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:99,height:57},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(_e,{cx:"91",cy:"49.5",r:"6",fill:u.ir.cssString(e)}),o.jsxRuntimeExports.jsx(_e,{cx:"8",cy:"7.5",r:"6",fill:u.ir.cssString(e)}),o.jsxRuntimeExports.jsx(T,{d:"M49.5 28.5L12.3545 9.70349C10.359 8.69372 8 10.1438 8 12.3803V44.6197C8 46.8562 10.359 48.3063 12.3545 47.2965L49.5 28.5ZM49.5 28.5L86.6455 9.70349C88.641 8.69372 91 10.1438 91 12.3803V44.6197C91 46.8562 88.641 48.3063 86.6455 47.2965L49.5 28.5Z"})]})]}),ax=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(_e,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(pe,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(pe,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)})]})]}),cx=({className:e,color:t,orientation:n="left",scale:s,...r})=>{const i=u.ir.cssString(t);return o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("symbol"),e),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:5,top:50,id:"1"})}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:40,height:48},color:t,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"}),o.jsxRuntimeExports.jsx(T,{d:"M37.9706 23.2076C38.4906 23.6079 38.4906 24.3921 37.9706 24.7924L33.86 27.9568C33.2024 28.463 32.25 27.9942 32.25 27.1644V20.8356C32.25 20.0058 33.2024 19.537 33.86 20.0432L37.9706 23.2076Z",fill:i}),o.jsxRuntimeExports.jsx(T,{d:"M33 24H2",strokeLinecap:"round"})]})]})},ux=({className:e,color:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("symbol"),e),children:[o.jsxRuntimeExports.jsx(K,{orientation:n,children:o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:11.1111,top:50,id:"1"})}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:36,height:72},color:t,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"4",y:"4",width:"28",height:"64",rx:"2",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M13 68V47C13 46.4477 13.4489 45.9892 13.9928 45.8933C16.1351 45.5152 21 43.7981 21 36C21 28.2019 16.1351 26.4848 13.9928 26.1068C13.4489 26.0108 13 25.5523 13 25V4",strokeWidth:"2"})]})]}),dx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("cap"),e),...r,children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:7.6923,top:50,id:"1"})}),o.jsxRuntimeExports.jsx(U,{color:n,dimensions:{width:26,height:48},orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"})})]}),xx=({className:e,orientation:t="left",color:n,scale:s=1,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("cap"),e),...r,children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:50,top:50,id:"1"})}),o.jsxRuntimeExports.jsx(U,{color:n,dimensions:{width:36,height:48},orientation:t,scale:s*.6,children:o.jsxRuntimeExports.jsx(T,{d:"M3 3H30C31.6569 3 33 4.34315 33 6V42C33 43.6569 31.6569 45 30 45H3",strokeLinecap:"round"})})]}),px=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(me,{...i,orientation:t,className:u.CSS(u.CSS.B("manual-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:56.25,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:56.25,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:48},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(pe,{x1:"43.5",y1:"27",x2:"43.5",y2:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M19.64 1 L66.68 1",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 27L6.35453 8.20349C4.35901 7.19372 2 8.64384 2 10.8803V43.1197C2 45.3562 4.35901 46.8063 6.35453 45.7965L43.5 27ZM43.5 27L80.6455 8.20349C82.641 7.19372 85 8.64384 85 10.8803V43.1197C85 45.3562 82.641 46.8063 80.6455 45.7965L43.5 27Z"})]})]}),mx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("orifice_plate"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.875,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{color:n,dimensions:{width:72,height:36},orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 2V7.5V13",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 33V22",strokeLinecap:"round"})]})]}),Dl=(e,t)=>e/t*100,fx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("filter"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:11.5385,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:88.4615,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(U,{dimensions:{width:52,height:34},orientation:t,color:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M6 17L24.8 2.9C25.5111 2.36667 26.4889 2.36667 27.2 2.9L46 17M6 17L24.8 31.1C25.5111 31.6333 26.4889 31.6333 27.2 31.1L46 17"})})]}),hx=e=>typeof e=="number"?{topLeft:u.J.construct(e),topRight:u.J.construct(e),bottomLeft:u.J.construct(e),bottomRight:u.J.construct(e)}:"x"in e?{topLeft:e,topRight:e,bottomLeft:e,bottomRight:e}:typeof e.bottomLeft=="number"?{topLeft:u.J.construct(e.topLeft),topRight:u.J.construct(e.topRight),bottomLeft:u.J.construct(e.bottomLeft),bottomRight:u.J.construct(e.bottomRight)}:e,cC=e=>{const{topLeft:t,topRight:n,bottomLeft:s,bottomRight:r}=e;return`${t.x}% ${n.x}% ${r.x}% ${s.x}% / ${t.y}% ${n.y}% ${r.y}% ${s.y}%`},gx={width:40,height:80},si={x:50,y:10},Xs=({className:e,dimensions:t=gx,borderRadius:n=si,boxBorderRadius:s,color:r,backgroundColor:i,strokeWidth:l=2,...a})=>{const c=hx(n),d=s==null,x=f.use(),{width:p,height:m}=t,h=g.useMemo(()=>[t,n,c],[c.bottomLeft,c.bottomRight,c.topLeft,c.topRight,m,p]),j=Dl(1,p),E=100-j,S=Dl(1,m),R=100-S;return o.jsxRuntimeExports.jsx(ae,{className:u.CSS(e,u.CSS.B("tank")),style:{...t,borderRadius:s??cC(c),borderColor:u.ir.cssString(r??x.colors.gray.l11),backgroundColor:u.ir.cssString(i),borderWidth:l},...a,children:o.jsxRuntimeExports.jsxs(K,{refreshDeps:h,orientation:"left",children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:S,id:"1"}),d&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:j,top:c.topLeft.y,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:E,top:c.topRight.y,id:"3"})]}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:R,id:"4"}),d&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:j,top:100-c.bottomLeft.y,id:"5"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:E,top:100-c.bottomRight.y,id:"6"})]}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:j,top:50,id:"7"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:E,top:50,id:"8"})]})})},uC=20,dC=(e,t,n=0,s=4)=>{const r=2*Math.PI/e,i=n*Math.PI/180,l=t/(2*Math.sin(Math.PI/e)),a=l+s/2;return Array.from({length:e}).map((c,d)=>{const x=r*d+i-Math.PI/2;return{x:a+l*Math.cos(x),y:a+l*Math.sin(x)}})},xC=(e,t,n)=>{const s=[],r=Math.min(n,t/2),i=e.length;if(i<3||r<=0)return`M ${e.map(l=>`${l.x},${l.y}`).join(" L ")} Z`;for(let l=0;l<i;l++){const a=e[(l-1+i)%i],c=e[l],d=e[(l+1)%i],x=c.x-a.x,p=c.y-a.y,m=d.x-c.x,h=d.y-c.y,j=Math.hypot(x,p),E=Math.hypot(m,h),S=r/j,R=r/E,v=c.x-x*S,y=c.y-p*S,C=c.x+m*R,M=c.y+h*R;l===0?s.push(`M ${v},${y}`):s.push(`L ${v},${y}`),s.push(`Q ${c.x},${c.y} ${C},${M}`)}return s.push("Z"),s.join(" ")},oi=({numSides:e,sideLength:t,rotation:n=0,color:s,backgroundColor:r,className:i,cornerRounding:l,strokeWidth:a,...c})=>{const d=f.use(),x=g.useMemo(()=>2*((a??2)+1),[a]),p=g.useMemo(()=>dC(e,t,n,x),[e,t,n,x]),m=g.useMemo(()=>xC(p,t,l??0),[p,t,l]),h=g.useMemo(()=>2*(t/(2*Math.sin(Math.PI/e)))+x,[t,e,x]);return o.jsxRuntimeExports.jsx(ae,{className:u.CSS(i,u.CSS.B("polygon")),...c,children:o.jsxRuntimeExports.jsx(U,{dimensions:{width:h,height:h},children:o.jsxRuntimeExports.jsx(T,{d:m,fill:u.ir.cssString(r??d.colors.gray.l1),stroke:u.ir.cssString(s??d.colors.gray.l9),strokeWidth:a??2})})})},jx=({radius:e,color:t,backgroundColor:n,className:s,strokeWidth:r,...i})=>{const l=(r??2)+1,a=e*2,c=a+2*l,d=a+2*l;return o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(s,u.CSS.B("circle-shape")),...i,children:[o.jsxRuntimeExports.jsxs(K,{orientation:"left",refreshDeps:e,children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:l/d*100,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:(d-l)/d*100,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:l/c*100,top:50,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:(c-l)/c*100,top:50,id:"4"})]}),o.jsxRuntimeExports.jsx(U,{dimensions:{width:c,height:d},children:o.jsxRuntimeExports.jsx(_e,{cx:c/2,cy:d/2,r:e,stroke:u.ir.cssString(t),strokeWidth:r??2,fill:u.ir.cssString(n)})})]})},Ex=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(e,u.CSS.B("regulator")),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.4091,top:66.25,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7273,top:66.25,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50.9091,top:12.5,id:"3"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:88,height:80},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M44.5 53L7.35453 34.2035C5.35901 33.1937 3 34.6438 3 36.8803V69.1197C3 71.3562 5.35901 72.8063 7.35453 71.7965L44.5 53ZM44.5 53L81.6455 34.2035C83.641 33.1937 86 34.6438 86 36.8803V69.1197C86 71.3562 83.641 72.8063 81.6455 71.7965L44.5 53Z"}),o.jsxRuntimeExports.jsx(T,{d:"M61 30C62.6569 30 64.0231 28.6494 63.7755 27.0111C63.141 22.8129 61.181 18.8968 58.1421 15.8579C54.3914 12.1071 49.3043 10 44 10C38.6957 10 33.6086 12.1071 29.8579 15.8579C26.819 18.8968 24.859 22.8129 24.2245 27.0111C23.9769 28.6494 25.3431 30 27 30L44.5 30H61Z"}),o.jsxRuntimeExports.jsx(pe,{x1:"44.5",y1:"53",x2:"44.5",y2:"30",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M44.5 10V8C44.5 6.34315 45.3431 5 47 5H80C81.6569 5 83 6.34315 83 8V24.4281C83 25.4126 82.517 26.3344 81.7076 26.8947L44.5 53"})]})]}),yx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(e,u.CSS.B("regulator-manual")),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:2.2989,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.381,top:75,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.619,top:75,id:"3"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:84},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 20L43.5 2",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M19.5 2L67.5 2",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 63L6.35453 44.2035C4.35901 43.1937 2 44.6438 2 46.8803V79.1197C2 81.3562 4.35901 82.8063 6.35453 81.7965L43.5 63ZM43.5 63L80.6455 44.2035C82.641 43.1937 85 44.6438 85 46.8803V79.1197C85 81.3562 82.641 82.8063 80.6455 81.7965L43.5 63Z"}),o.jsxRuntimeExports.jsx(T,{d:"M60.5 40C62.1569 40 63.5231 38.6494 63.2755 37.0111C62.641 32.8129 60.681 28.8968 57.6421 25.8579C53.8914 22.1071 48.8043 20 43.5 20C38.1957 20 33.1086 22.1071 29.3579 25.8579C26.319 28.8968 24.359 32.8129 23.7245 37.0111C23.4769 38.6494 24.8431 40 26.5 40L43.5 40H60.5Z"}),o.jsxRuntimeExports.jsx(T,{d:"M60.5 40C62.1569 40 63.5231 38.6494 63.2755 37.0111C62.641 32.8129 60.681 28.8968 57.6421 25.8579C53.8914 22.1071 48.8043 20 43.5 20C38.1957 20 33.1086 22.1071 29.3579 25.8579C26.319 28.8968 24.359 32.8129 23.7245 37.0111C23.4769 38.6494 24.8431 40 26.5 40L43.5 40H60.5Z"}),o.jsxRuntimeExports.jsx(pe,{x1:"43.5",y1:"63",x2:"43.5",y2:"40"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 20V18C43.5 16.3431 44.8431 15 46.5 15H79.5C81.1569 15 82.5 16.3431 82.5 18V34.4281C82.5 35.4126 82.017 36.3344 81.2076 36.8947L43.5 63"})]})]}),Sx=({className:e,orientation:t="left",scale:n,color:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("orifice"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.8571,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.1429,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:70,height:34},orientation:t,color:s,scale:n,children:[o.jsxRuntimeExports.jsx(T,{d:"M2 2.5C27.451 21.3469 60.0915 12.0132 68 2.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M2 32.5C27.451 13.6531 60.0915 22.9868 68 32.5",strokeLinecap:"round"})]})]}),Rx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(me,{...i,orientation:t,className:u.CSS(u.CSS.B("needle-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:51.1905,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:51.1905,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:42},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.0152 21.5391L38.237 2.62245C38.1573 2.30658 38.396 2 38.7218 2L48.2782 2C48.604 2 48.8427 2.30658 48.763 2.62245L43.9848 21.5391C43.8576 22.0425 43.1424 22.0425 43.0152 21.5391Z",fill:u.ir.cssString(n)}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 21.5L6.35453 2.70349C4.35901 1.69372 2 3.14384 2 5.38029V37.6197C2 39.8562 4.35901 41.3063 6.35453 40.2965L43.5 21.5ZM43.5 21.5L80.6455 2.70349C82.641 1.69372 85 3.14384 85 5.3803V37.6197C85 39.8562 82.641 41.3063 80.6455 40.2965L43.5 21.5Z"})]})]}),Cx=({color:e,className:t,orientation:n="left",scale:s,enabled:r=!1,...i})=>o.jsxRuntimeExports.jsxs(me,{...i,orientation:n,className:u.CSS(u.CSS.B("angled-relief-valve"),t),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:32.8125,top:97.5922,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.0278,top:45.5639,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:64,height:79},orientation:n,color:e,scale:s,children:[o.jsxRuntimeExports.jsx(pe,{x1:21,y1:2,x2:21,y2:36.7,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M9.05106 14.0802L32.4273 4.29611",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M9.05106 20.0802L32.4273 10.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M9.05106 26.0802L32.4273 16.2961",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M22.3611 35.1077C21.6298 35.4778 21.6298 36.5222 22.3611 36.8923L57.7433 54.7965C59.7388 55.8063 62.0978 54.3562 62.0978 52.1197L62.0978 19.8803C62.0978 17.6438 59.7388 16.1937 57.7433 17.2035L22.3611 35.1077Z"}),o.jsxRuntimeExports.jsx(T,{d:"M21.8923 37.3611C21.5222 36.6298 20.4778 36.6298 20.1077 37.3611L2.20349 72.7433C1.19372 74.7388 2.64384 77.0978 4.8803 77.0978H37.1197C39.3562 77.0978 40.8063 74.7388 39.7965 72.7433L21.8923 37.3611Z"})]})]}),wx=({className:e,color:t,dimensions:n,orientation:s="left",units:r="psi",unitsLevel:i="small",children:l,inlineSize:a=80,...c})=>{const d=u.ir.cssString(t),x=f.use(),p=t==null?"var(--pluto-gray-l0)":u.ir.cssString(u.ir.pickByContrast(t,x.colors.gray.l0,x.colors.gray.l11));return o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("value"),e),...c,style:{borderColor:d,height:n?.height,width:"100%"},children:[o.jsxRuntimeExports.jsx("div",{className:u.CSS.BE("value","content"),style:{flexGrow:1,minWidth:n?.width,inlineSize:a,maxWidth:n?.width},children:l}),o.jsxRuntimeExports.jsxs(K,{orientation:s,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:100,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:-2,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:102,id:"4"})]}),o.jsxRuntimeExports.jsx("div",{className:u.CSS(u.CSS.BE("value","units"),u.CSS.M(i)),style:{background:d},children:o.jsxRuntimeExports.jsx(f.Text,{level:i,color:p,children:r})})]})},bx=({enabled:e=!1,onClick:t,orientation:n="left"})=>o.jsxRuntimeExports.jsxs(ae,{orientation:n,children:[o.jsxRuntimeExports.jsx(f.Switch$1,{value:e,onClick:t,onChange:()=>{}}),o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:100,top:50,id:"2"})]})]}),vx=({onClick:e,onMouseDown:t,onMouseUp:n,orientation:s="left",label:r="",color:i,size:l,level:a,onClickDelay:c})=>o.jsxRuntimeExports.jsxs(ae,{orientation:s,children:[o.jsxRuntimeExports.jsx(f.Button,{variant:"filled",onClick:e,onMouseDown:t,onMouseUp:n,color:i,size:l,level:a,onClickDelay:c,children:r}),o.jsxRuntimeExports.jsxs(K,{orientation:s,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:s,left:0,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:s,left:100,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:s,left:50,top:0,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:s,left:50,top:100,id:"4"})]})]}),_x=({className:e,orientation:t="left",width:n,color:s,level:r,autoFit:i,align:l="center",value:a,onChange:c,...d})=>{const x={textAlign:l};return u.g.construct(t)==="y"?x.height=i?"fit-content":n:x.width=i?"fit-content":n,o.jsxRuntimeExports.jsx(ae,{style:x,orientation:t,className:u.CSS(u.CSS.B("text-box"),u.CSS.loc(t),e),...d,children:o.jsxRuntimeExports.jsx(f.MaybeEditable,{className:u.CSS.BE("symbol","label"),color:u.ir.cssString(s),level:r,value:a,onChange:c})})},Mx=({orientation:e="left",className:t,onClick:n,children:s,value:r,units:i,color:l,onChange:a,size:c="small",disabled:d,...x})=>{const[p,m]=g.useState(r);return o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("setpoint"),t),orientation:e,...x,children:[o.jsxRuntimeExports.jsxs(K,{orientation:e,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:e,left:.5,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:e,left:100,top:50,id:"2",style:{zIndex:5}}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:e,left:50,top:-2,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:e,left:50,top:102,id:"4"})]}),o.jsxRuntimeExports.jsx(f.Numeric,{size:c,value:p,onChange:m,showDragHandle:!1,selectOnFocus:!0,endContent:i,color:l,borderWidth:1,disabled:d,children:o.jsxRuntimeExports.jsx(f.Button,{size:c,variant:"filled",onClick:()=>a(p),color:l,children:"Set"})})]})},Nx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("screw-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(_e,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(pe,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(pe,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(T,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(32, 32)",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(T,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(42, 32)",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)})]})]}),kx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("vacuum-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsx(U,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"})})]}),Lx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("cavity-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(_e,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(pe,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(pe,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(T,{d:"M 17 26 C 17 20.6667 23 20.6667 23 26 C 23 31.3333 29 31.3333 29 26 C 29 20.6667 35 20.6667 35 26",strokeLinecap:"round",transform:"translate(6, 6)",className:u.CSS(u.CSS.M("detail"),t)})]})]}),Px=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("piston-pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(_e,{cx:"32",cy:"32",r:"30"}),o.jsxRuntimeExports.jsx(pe,{x1:"32",y1:"2",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(pe,{x1:"32",y1:"62",x2:"62",y2:"32",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(T,{d:"M 23 32, h 16, m 0 -8, v 16",className:u.CSS(u.CSS.M("detail"),t),strokeLinecap:"round"})]})]}),Tx=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("static-mixer"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.5152,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.4848,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.3333,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.6667,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:66,height:30},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"1",y:"1",width:"64",height:"28",rx:"2",ry:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M17 10C23 10 27 20 33 20C39 20 43 10 49 10",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M17 20C23 20 27 10 33 10C39 10 43 20 49 20",strokeLinecap:"round"})]})]}),Ax=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("rotary-mixer"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2,top:48.4849,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.5,top:48.4849,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:50,height:33},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M1 30V2C1 1.44772 1.44772 1 2 1H35.4545C35.7434 1 36.0181 1.12487 36.208 1.34247L48.4262 15.3425C48.7549 15.7192 48.7549 16.2808 48.4262 16.6575L36.208 30.6575C36.0181 30.8751 35.7434 31 35.4545 31H2C1.44772 31 1 30.5523 1 30Z"}),o.jsxRuntimeExports.jsx(pe,{x1:"32",y1:"16",x2:"40",y2:"16",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(pe,{x1:"32",y1:"16",x2:"28",y2:"22.9282",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)}),o.jsxRuntimeExports.jsx(pe,{x1:"32",y1:"16",x2:"28",y2:"9.0717",strokeLinecap:"round",className:u.CSS(u.CSS.M("detail"),t)})]})]}),Ix=({className:e,color:t,orientation:n="left",enabled:s,scale:r,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,orientation:n,className:u.CSS(u.CSS.B("light"),s&&u.CSS.M("enabled"),e),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.75,id:"4"})]}),o.jsxRuntimeExports.jsx(U,{dimensions:{width:64,height:64},color:t,orientation:n,scale:r,children:o.jsxRuntimeExports.jsx(_e,{cx:"32",cy:"32",r:"30"})})]}),Ox=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(e,u.CSS.B("regulator")),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.29885,top:69.565,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.70115,top:69.565,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:23.1479,top:23.61,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:11.11,id:"4"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:76.8521,top:23.61,id:"5"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:69},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 49L6.35453 30.2035C4.35901 29.1937 2 30.6438 2 32.8803V65.1197C2 67.3562 4.35901 68.8063 6.35453 67.7965L43.5 49ZM43.5 49L80.6455 30.2035C82.641 29.1937 85 30.6438 85 32.8803V65.1197C85 67.3562 82.641 68.8063 80.6455 67.7965L43.5 49Z"}),o.jsxRuntimeExports.jsx(he,{x:"21",y:"6.5",width:"44",height:"18",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M43 6.5V4C43 2.34315 44.3431 1 46 1H79C80.6569 1 82 2.34315 82 4V20.4281C82 21.4126 81.517 22.3344 80.7076 22.8947L43 49"}),o.jsxRuntimeExports.jsx(pe,{x1:"43",y1:"49",x2:"43",y2:"24.5"})]})]}),$x=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(e,u.CSS.B("regulator-motorized")),...r,orientation:t,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:35.6321,top:13.72549,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:1.96078,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:64.3679,top:13.72549,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:24.1379,top:46.078,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:75.8621,top:46.078,id:"5"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:78.43137,id:"6"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:78.43137,id:"7"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:102},orientation:t,color:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 80.5L6.35453 61.7035C4.35901 60.6937 2 62.1438 2 64.3803V96.6197C2 98.8562 4.35901 100.306 6.35453 99.2965L43.5 80.5ZM43.5 80.5L80.6455 61.7035C82.641 60.6937 85 62.1438 85 64.3803V96.6197C85 98.8562 82.641 100.306 80.6455 99.2965L43.5 80.5Z"}),o.jsxRuntimeExports.jsx(pe,{x1:"43",y1:"80.5",x2:"43",y2:"56"}),o.jsxRuntimeExports.jsx(T,{d:"M43 38V35.5C43 33.8431 44.3431 32.5 46 32.5H79C80.6569 32.5 82 33.8431 82 35.5V51.9281C82 52.9126 81.517 53.8344 80.7076 54.3947L43 80.5"}),o.jsxRuntimeExports.jsx(he,{x:"21",y:"38",width:"44",height:"18",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M43 38V26",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(_e,{cx:"43",cy:"14",r:"12"})]})]}),Bx=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(me,{...s,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:e,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:e,left:50,top:1,id:"4"})}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:88,height:86},color:t,orientation:e,scale:n,children:[o.jsxRuntimeExports.jsx(T,{d:"M1 85V48.8541C1 46.624 3.34694 45.1735 5.34164 46.1708L80.6584 83.8292 C82.6531 84.8265 85 83.376 85 81.1459 V44"}),o.jsxRuntimeExports.jsx(T,{d:"M43 1L45 65"})]})]}),Dx=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(me,{...s,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:e,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:e,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:87},color:t,orientation:e,scale:n,children:[o.jsxRuntimeExports.jsx(T,{d:"M43.5 69.573L14.9534 55.6147C8.97428 52.6911 2 57.0443 2 63.6999V75.4462C2 82.1018 8.97429 86.455 14.9534 83.5314L43.5 69.573ZM43.5 69.573L72.0466 55.6147C78.0257 52.6911 85 57.0443 85 63.6999V75.4462C85 82.1018 78.0257 86.455 72.0466 83.5314L43.5 69.573Z"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 69.6L43.5 2",strokeLinecap:"round"})]})]}),zx=({orientation:e="left",color:t,scale:n,...s})=>o.jsxRuntimeExports.jsxs(me,{...s,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:e,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:e,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:87},color:t,orientation:e,scale:n,children:[o.jsxRuntimeExports.jsx(pe,{x1:"43",y1:"1",x2:"43",y2:"49"}),o.jsxRuntimeExports.jsx(he,{x:"3",y:"49",width:"80",height:"34",rx:"3",strokeLinecap:"round"})]})]}),Hx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(pe,{x1:"43",y1:"1",x2:"43",y2:"49"}),o.jsxRuntimeExports.jsx(he,{x:"3",y:"49",width:"80",height:"34",rx:"3"}),o.jsxRuntimeExports.jsx(pe,{x1:"3.8",y1:"82.1",x2:"43",y2:"49",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(pe,{x1:"43",y1:"49",x2:"43",y2:"83",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(pe,{x1:"43",y1:"83",x2:"82.2",y2:"49.9",className:u.CSS(u.CSS.M("detail"),e),strokeLinecap:"round"})]})]}),Vx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(pe,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(pe,{x1:"3",y1:"49",x2:"83",y2:"49",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(pe,{x1:"3",y1:"83",x2:"83",y2:"83",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(pe,{x1:"43",y1:"49",x2:"43",y2:"83",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(he,{x:"3",y:"49",width:"80",height:"34",strokeWidth:0})]})]}),Fx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("agitator")),children:[o.jsxRuntimeExports.jsx(K,{orientation:t,children:o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:51,top:2,id:"4"})}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:87,height:87},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(pe,{x1:43,y1:1,x2:43,y2:60,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M5.375 36L70.8204 48.7138C74.0584 49.3428 74.0573 53.9765 70.8189 54.6039L14.7952 65.4584C11.5729 66.0827 11.5494 70.6856 14.7651 71.3429L81.5208 84.9873",strokeLinecap:"round"})]})]}),Zx=({id:e,className:t,orientation:n="right",label:s="text",color:r,level:i="p",onLabelChange:l,...a})=>{const c=document.querySelector(`[data-id="${e}"]`);c&&c.classList.add(n);const d=u.g.construct(n)==="y";return o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("arrow"),u.CSS.loc(n),t),orientation:n,...a,children:[o.jsxRuntimeExports.jsx("div",{className:"wrapper",children:o.jsxRuntimeExports.jsx("div",{className:"outline",style:{backgroundColor:u.ir.cssString(r)},children:o.jsxRuntimeExports.jsx("div",{className:"bg",children:o.jsxRuntimeExports.jsx(f.MaybeEditable,{value:s,onChange:l,level:i,className:u.CSS.BE("symbol","label")})})})}),o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,preventAutoAdjust:!0,left:98,top:50,swap:d,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",preventAutoAdjust:!0,orientation:n,left:1,top:50,swap:d,id:"2"})]}),o.jsxRuntimeExports.jsx("svg",{style:{visibility:"hidden",position:"absolute"},width:"0",height:"0",xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:o.jsxRuntimeExports.jsx("defs",{children:o.jsxRuntimeExports.jsxs("filter",{id:"goo",children:[o.jsxRuntimeExports.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.5",result:"blur"}),o.jsxRuntimeExports.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9",result:"goo"}),o.jsxRuntimeExports.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})})]})},Yx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("vent"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:22.7273,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:80,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(U,{color:n,dimensions:{width:22,height:32},orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M5 3L16.6325 13.8016C17.9107 14.9885 17.9107 17.0115 16.6325 18.1984L5 29",strokeLinecap:"round"})})]}),Wx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("iso-filter"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:95,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:5,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:60,height:42},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"3",y:"3",width:"54",height:"36",rx:"3",ry:"3"}),o.jsxRuntimeExports.jsx(pe,{x1:"30",y1:"3",x2:"30",y2:"13",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(pe,{x1:"30",y1:"17",x2:"30",y2:"25",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(pe,{x1:"30",y1:"29",x2:"30",y2:"39",strokeLinecap:"round"})]})]}),Kx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("flow-straightener"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:93,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:72,height:36},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"2.5",y:"2.5",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M10.5 26.5H60.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M10.5 9.5H60.5",strokeLinecap:"round"})]})]}),Gx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("heater-element"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:11.9,top:5.55555556,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:11.9,top:94,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:21,height:36},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M2.5 34.0005H14.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M2.5 2.00049L14.5 2.00049",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M14.3793 10.0013C14.9046 10.0013 15.4248 10.1048 15.9101 10.3058C16.3954 10.5068 16.8363 10.8015 17.2078 11.1729C17.5792 11.5443 17.8738 11.9853 18.0749 12.4706C18.2759 12.9559 18.3793 13.4761 18.3793 14.0013C18.3793 14.5266 18.2759 15.0468 18.0749 15.5321C17.8738 16.0174 17.5792 16.4583 17.2078 16.8298C16.8363 17.2012 16.3954 17.4958 15.9101 17.6969C15.4248 17.8979 14.9046 18.0013 14.3793 18.0013"}),o.jsxRuntimeExports.jsx(T,{d:"M14.5 2.00049C15.0253 2.00049 15.5454 2.10395 16.0307 2.30497C16.516 2.50599 16.957 2.80063 17.3284 3.17206C17.6999 3.5435 17.9945 3.98445 18.1955 4.46975C18.3965 4.95506 18.5 5.4752 18.5 6.00049C18.5 6.52578 18.3965 7.04592 18.1955 7.53122C17.9945 8.01652 17.6999 8.45748 17.3284 8.82892C16.957 9.20035 16.516 9.49499 16.0307 9.69601C15.5454 9.89703 15.0253 10.0005 14.5 10.0005"}),o.jsxRuntimeExports.jsx(T,{d:"M14.5 18.0005C15.0253 18.0005 15.5454 18.104 16.0307 18.305C16.516 18.506 16.957 18.8006 17.3284 19.1721C17.6999 19.5435 17.9945 19.9845 18.1955 20.4698C18.3965 20.9551 18.5 21.4752 18.5 22.0005C18.5 22.5258 18.3965 23.0459 18.1955 23.5312C17.9945 24.0165 17.6999 24.4575 17.3284 24.8289C16.957 25.2003 16.516 25.495 16.0307 25.696C15.5454 25.897 15.0253 26.0005 14.5 26.0005"}),o.jsxRuntimeExports.jsx(T,{d:"M14.6206 25.9995C15.1459 25.9995 15.6661 26.103 16.1514 26.304C16.6367 26.505 17.0776 26.7997 17.4491 27.1711C17.8205 27.5425 18.1151 27.9835 18.3162 28.4688C18.5172 28.9541 18.6206 29.4742 18.6206 29.9995C18.6206 30.5248 18.5172 31.0449 18.3162 31.5302C18.1151 32.0155 17.8205 32.4565 17.4491 32.8279C17.0776 33.1994 16.6367 33.494 16.1514 33.695C15.6661 33.896 15.1459 33.9995 14.6206 33.9995"})]})]}),Xx=({className:e,dimensions:t=gx,borderRadius:n=si,boxBorderRadius:s,color:r,backgroundColor:i,...l})=>{const a=hx(n),c=f.use(),d=g.useMemo(()=>[t,n,a],[a.bottomLeft,a.bottomRight,a.topLeft,a.topRight,t.height,t.width]),x=u.ir.cssString(r??c.colors.gray.l11),p=i==null?void 0:u.ir.cssString(i),m=t.width/66,h=t.height/180,j=`scale(${m},${h})`;return o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(e,u.CSS.B("cylinder")),style:{...t},...l,children:[o.jsxRuntimeExports.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${t.width} ${t.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:j,children:o.jsxRuntimeExports.jsx("path",{d:"M23 33.6712C11.9844 36.0332 3 42.4382 3 52.8862V174.568C3 176.225 4.34315 177.568 6 177.568H60C61.6569 177.568 63 176.225 63 174.568V52.8862C63 36.3342 40.4511 29.9292 23 33.6712ZM23 33.6712V13.3181C23 0.318109 42.9975 0.318123 42.9975 13.3181V33.6712",vectorEffect:"non-scaling-stroke",strokeWidth:"2",stroke:x,transform:j,fill:p})}),o.jsxRuntimeExports.jsxs(K,{refreshDeps:d,orientation:"left",children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:2,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:35,top:10,id:"9"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:65,top:10,id:"10"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:98.3333,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:4,top:40,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:96,top:40,id:"4"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:4,top:60,id:"5"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:96,top:60,id:"6"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:4,top:80,id:"7"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:96,top:80,id:"8"})]})]})},Ux=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>{const l=u.ir.cssString(n);return o.jsxRuntimeExports.jsxs(me,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.1373,top:69.0785,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.7416,top:72.368,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:89,height:76},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M46.3625 54.1079C45.6312 54.4779 45.6311 55.5223 46.3624 55.8924L81.7435 73.7989C83.7389 74.8088 86.098 73.3588 86.0982 71.1224L86.1002 38.883C86.1003 36.6465 83.7414 35.1962 81.7458 36.2059L46.3625 54.1079Z",stroke:l}),o.jsxRuntimeExports.jsx(T,{d:"M71 38.0014V72.0014",stroke:l,strokeWidth:4,strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M41.6389 55.8923C42.3702 55.5222 42.3702 54.4778 41.6389 54.1077L6.2567 36.2035C4.26118 35.1937 1.90217 36.6438 1.90217 38.8803L1.90217 71.1197C1.90217 73.3562 4.26119 74.8063 6.2567 73.7965L41.6389 55.8923Z",stroke:l}),o.jsxRuntimeExports.jsx(_e,{cx:"44",cy:"55",r:"4",fill:l}),o.jsxRuntimeExports.jsx(T,{d:"M45 4C45 3.44772 44.5523 3 44 3C43.4477 3 43 3.44772 43 4H45ZM37.5777 24.7889L38.0249 23.8944L37.5777 24.7889ZM37.5777 21.2111L38.0249 22.1056L37.5777 21.2111ZM50.4223 31.2111L49.9751 32.1056L50.4223 31.2111ZM37.5777 44.7889L37.1305 45.6833L37.5777 44.7889ZM37.5777 41.2111L37.1305 40.3167L37.5777 41.2111ZM42.8944 47.4472L42.4472 48.3416L42.8944 47.4472ZM45 52V49.2361H43V52H45ZM43.3416 46.5528L38.0249 43.8944L37.1305 45.6833L42.4472 48.3416L43.3416 46.5528ZM38.0249 42.1056L50.8695 35.6833L49.9751 33.8944L37.1305 40.3167L38.0249 42.1056ZM50.8695 30.3167L38.0249 23.8944L37.1305 25.6833L49.9751 32.1056L50.8695 30.3167ZM38.0249 22.1056L50.8695 15.6833L49.9751 13.8944L37.1305 20.3167L38.0249 22.1056ZM50.8695 10.3167L45.5528 7.65836L44.6584 9.44721L49.9751 12.1056L50.8695 10.3167ZM45 6.76393V4H43V6.76393H45ZM45.5528 7.65836C45.214 7.48897 45 7.1427 45 6.76393H43C43 7.90025 43.642 8.93904 44.6584 9.44721L45.5528 7.65836ZM50.8695 15.6833C53.0806 14.5777 53.0807 11.4223 50.8695 10.3167L49.9751 12.1056C50.7121 12.4741 50.7121 13.5259 49.9751 13.8944L50.8695 15.6833ZM38.0249 23.8944C37.2879 23.5259 37.2879 22.4741 38.0249 22.1056L37.1305 20.3167C34.9193 21.4223 34.9194 24.5777 37.1305 25.6833L38.0249 23.8944ZM50.8695 35.6833C53.0806 34.5777 53.0807 31.4223 50.8695 30.3167L49.9751 32.1056C50.7121 32.4741 50.7121 33.5259 49.9751 33.8944L50.8695 35.6833ZM38.0249 43.8944C37.2879 43.5259 37.2879 42.4741 38.0249 42.1056L37.1305 40.3167C34.9193 41.4223 34.9194 44.5777 37.1305 45.6833L38.0249 43.8944ZM45 49.2361C45 48.0998 44.358 47.061 43.3416 46.5528L42.4472 48.3416C42.786 48.511 43 48.8573 43 49.2361H45Z",fill:l,strokeWidth:1})]})]})},qx=({className:e,orientation:t="left",color:n,scale:s,enabled:r=!1,...i})=>{const l=u.ir.cssString(n);return o.jsxRuntimeExports.jsxs(me,{...i,orientation:t,className:u.CSS(u.CSS.B("spring-loaded-relief-valve"),e),enabled:r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:31.8182,top:98,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:95.6061,top:55.5185,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:66,height:101},color:n,orientation:t,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M23.3625 55.6237C22.6312 55.9937 22.6311 57.0381 23.3624 57.4082L58.7435 75.3147C60.7389 76.3246 63.098 74.8747 63.0981 72.6382L63.1001 40.3988C63.1003 38.1624 60.7414 36.7121 58.7458 37.7217L23.3625 55.6237Z"}),o.jsxRuntimeExports.jsx(T,{d:"M48 38.633V72.633",strokeLinecap:"round",strokeWidth:4}),o.jsxRuntimeExports.jsx(T,{d:"M21.8923 58.4348C21.5222 57.7035 20.4778 57.7035 20.1077 58.4348L2.20349 93.817C1.19372 95.8125 2.64384 98.1715 4.8803 98.1715H37.1197C39.3562 98.1715 40.8063 95.8125 39.7965 93.817L21.8923 58.4348Z"}),o.jsxRuntimeExports.jsx(_e,{cx:"21",cy:"56.0737",r:"4",fill:l}),o.jsxRuntimeExports.jsx(T,{d:"M21 53.0105V50.0225C21 49.3397 20.6516 48.704 20.0759 48.3366L15.6419 45.507C14.4098 44.7207 14.4098 42.9214 15.6419 42.1351L26.3581 35.2965C27.5902 34.5102 27.5902 32.7109 26.3581 31.9246L15.6419 25.0859C14.4098 24.2997 14.4098 22.5003 15.6419 21.714L26.3581 14.8754C27.5902 14.0891 27.5902 12.2898 26.3581 11.5035L21.9241 8.67393C21.3484 8.30656 21 7.67087 21 6.98798V4",stroke:l,strokeLinecap:"round"})]})]})},Jx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("t-junction"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.8462,top:22.3095,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.1538,top:22.3095,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:92.8571,id:"3"})]}),o.jsxRuntimeExports.jsx(U,{dimensions:{width:39,height:21},color:n,orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M1.5 5.5V3.5C1.5 2.39543 2.39543 1.5 3.5 1.5H35.5C36.6046 1.5 37.5 2.39543 37.5 3.5V5.5C37.5 6.60457 36.6046 7.5 35.5 7.5H24.5C23.3954 7.5 22.5 8.39543 22.5 9.5V17.5C22.5 18.6046 21.6046 19.5 20.5 19.5H18.5C17.3954 19.5 16.5 18.6046 16.5 17.5V9.5C16.5 8.39543 15.6046 7.5 14.5 7.5H3.5C2.39543 7.5 1.5 6.60457 1.5 5.5Z",fill:u.ir.cssString(n),stroke:"none"})})]}),Qx=({className:e,orientation:t="left",color:n,scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{className:u.CSS(u.CSS.B("t-junction"),e),...r,children:[o.jsxRuntimeExports.jsxs(K,{orientation:t,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.8462,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:96.1539,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50.5,top:96.1539,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50.5,top:3.8462,id:"4"})]}),o.jsxRuntimeExports.jsx(U,{dimensions:{width:39,height:39},color:n,orientation:t,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M22.5 35.5C22.5 36.6046 21.6046 37.5 20.5 37.5H18.5C17.3954 37.5 16.5 36.6046 16.5 35.5V24.5C16.5 23.3954 15.6046 22.5 14.5 22.5H3.5C2.39543 22.5 1.5 21.6046 1.5 20.5V18.5C1.5 17.3954 2.39543 16.5 3.5 16.5H14.5C15.6046 16.5 16.5 15.6046 16.5 14.5V3.5C16.5 2.39543 17.3954 1.5 18.5 1.5H20.5C21.6046 1.5 22.5 2.39543 22.5 3.5V14.5C22.5 15.6046 23.3954 16.5 24.5 16.5H35.5C36.6046 16.5 37.5 17.3954 37.5 18.5V20.5C37.5 21.6046 36.6046 22.5 35.5 22.5H24.5C23.3954 22.5 22.5 23.3954 22.5 24.5V35.5Z",fill:u.ir.cssString(n),stroke:"none"})})]}),Fe=({position:e,color:t})=>o.jsxRuntimeExports.jsx("text",{x:e?.x??57,y:e?.y??27,style:{fill:u.ir.cssString(t),fontWeight:450},stroke:"none",children:"F"}),ep=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-general"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(Fe,{position:{x:56,y:25},color:s})]})]}),tp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-Electromagnetic"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M47.5 17.5H55.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M15.5 17.5H23.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M23.5 17.5C23.5 16.9747 23.6035 16.4546 23.8045 15.9693C24.0055 15.484 24.3001 15.043 24.6716 14.6716C25.043 14.3001 25.484 14.0055 25.9693 13.8045C26.4546 13.6035 26.9747 13.5 27.5 13.5C28.0253 13.5 28.5454 13.6035 29.0307 13.8045C29.516 14.0055 29.957 14.3001 30.3284 14.6716C30.6999 15.043 30.9945 15.484 31.1955 15.9693C31.3965 16.4546 31.5 16.9747 31.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M31.5 17.5C31.5 16.9747 31.6035 16.4546 31.8045 15.9693C32.0055 15.484 32.3001 15.043 32.6716 14.6716C33.043 14.3001 33.484 14.0055 33.9693 13.8045C34.4546 13.6035 34.9747 13.5 35.5 13.5C36.0253 13.5 36.5454 13.6035 37.0307 13.8045C37.516 14.0055 37.957 14.3001 38.3284 14.6716C38.6999 15.043 38.9945 15.484 39.1955 15.9693C39.3965 16.4546 39.5 16.9747 39.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M39.5 17.5C39.5 16.9747 39.6035 16.4546 39.8045 15.9693C40.0055 15.484 40.3001 15.043 40.6716 14.6716C41.043 14.3001 41.484 14.0055 41.9693 13.8045C42.4546 13.6035 42.9747 13.5 43.5 13.5C44.0253 13.5 44.5454 13.6035 45.0307 13.8045C45.516 14.0055 45.957 14.3001 46.3284 14.6716C46.6999 15.043 46.9945 15.484 47.1955 15.9693C47.3965 16.4546 47.5 16.9747 47.5 17.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Fe,{position:{x:58,y:29},color:s})]})]}),np=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-VariableArea"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M46 10V25"}),o.jsxRuntimeExports.jsx(T,{d:"M23 13V22"}),o.jsxRuntimeExports.jsx(T,{d:"M23 13L46 10"}),o.jsxRuntimeExports.jsx(T,{d:"M23 22L46 25"}),o.jsxRuntimeExports.jsx(Fe,{color:s})]})]}),sp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-Coriolis"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M2 17.6024H28.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M28.5 17.6024L34.6834 14.0324",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M34.8 14L45.9058 20.9666",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M51.5 17.6024L46.0141 20.8987",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M20.5 17.6024L26.6574 14.0474",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M26.75 14.1024L37.788 21.0265",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 17.6024L37.8427 21.0017",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M43.5 17.6024H69",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Fe,{position:{x:58,y:29},color:s})]})]}),op=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-Nozzle"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M24 2V7V12",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24 12H34",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24 23H29H34",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24 33V23",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Fe,{color:s})]})]}),rp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-Venturi"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.3333,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M8 33L26.5329 22.3",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M8 2L26.5329 12.7",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M56 33L26.5876 22.2948",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M56 2L26.5876 12.7052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Fe,{position:{x:56,y:29},color:s})]})]}),ip=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-RingPiston"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.6667,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:5.714,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:94.386,id:"3"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(_e,{cx:"36.5",cy:"17.5",r:"10.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(_e,{cx:"36.5",cy:"21.5",r:"6.5",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Fe,{position:{x:56,y:29},color:s})]})]}),lp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-PositiveDisplacement"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:72,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M41 13C41 15.4853 38.9853 17.5 36.5 17.5C34.0147 17.5 32 15.4853 32 13C32 10.5147 34.0147 8.5 36.5 8.5C38.9853 8.5 41 10.5147 41 13Z",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M41 22C41 24.4853 38.9853 26.5 36.5 26.5C34.0147 26.5 32 24.4853 32 22C32 19.5147 34.0147 17.5 36.5 17.5C38.9853 17.5 41 19.5147 41 22Z",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Fe,{color:s})]})]}),ap=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-Turbine"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M16.5 17.5H54.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M32.5 9L35.4756 17.1753",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M38.5 26L35.5244 17.8247",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M32.5 26L35.4756 17.8247",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M38.5 9L35.5244 17.1753",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M32.5 9C32.5 8.20435 32.8161 7.44129 33.3787 6.87868C33.9413 6.31607 34.7044 6 35.5 6C36.2956 6 37.0587 6.31607 37.6213 6.87868C38.1839 7.44129 38.5 8.20435 38.5 9",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M38.5 26C38.5 26.7956 38.1839 27.5587 37.6213 28.1213C37.0587 28.6839 36.2956 29 35.5 29C34.7044 29 33.9413 28.6839 33.3787 28.1213C32.8161 27.5587 32.5 26.7956 32.5 26",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(Fe,{color:s})]})]}),cp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-Pulse"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M31 13.5H39",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M23 21.5H31",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M39 21.5H47",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M39 13.5V21.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31 13.5V21.5",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Fe,{color:s})]})]}),up=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-FloatSensor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:71,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M25 8H46",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31 27H40",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31 27L25.046 8.11641",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M40 27L45.954 8.11641",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Fe,{color:s})]})]}),dp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("flowmeter-Orifice"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:6,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:91,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:72,height:36},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"2.5",y:"2",width:"67",height:"31",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 2V7.5V13",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M24.5 33V22",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(Fe,{color:s})]})]}),xp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("heat-exchanger-general"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.545,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.454,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.545,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.454,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:66,height:66},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(T,{d:"M3 33H18.3956L33.1284 18.1508M33.4276 47.8492L48.1604 33H63M33.278 48V18"}),o.jsxRuntimeExports.jsx(T,{d:"M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33L63 33Z"})]})]}),pp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:89,top:27.27,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:89,top:72.73,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.545,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.455,id:"4"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.545,top:50,id:"5"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:66,height:66},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(T,{d:"M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33L63 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M58.9698 18H23.56L38.5623 33.0023M38.5623 32.9977L23.56 48H58.9698"})]})]}),mp=({id:e,className:t,orientation:n="right",color:s,scale:r=1,...i})=>o.jsxRuntimeExports.jsxs(ae,{...i,className:u.CSS(u.CSS.B("heat-exchanger-M"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:9,top:6.25,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:24,top:93.75,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:76,top:6.25,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:91,top:93.75,id:"4"}),o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.508,top:50,id:"5"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.492,top:50,id:"6"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:199,height:48},color:s,orientation:n,scale:r,children:[o.jsxRuntimeExports.jsx(he,{x:"3",y:"3",width:"193",height:"42",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(he,{x:"32.397",y:"3",width:"134.206",height:"42",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(he,{x:"32.397",y:"13.5",width:"134.206",height:"21",rx:"1",strokeWidth:"2"}),o.jsxRuntimeExports.jsx(pe,{x1:"32.3769",y1:"24",x2:"166.623",y2:"24",strokeWidth:"2"})]})]}),fp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M62 32C62 48.5685 48.5685 62 32 62M62 32C62 15.4315 48.5685 2 32 2C15.4315 2 2 15.4315 2 32C2 48.5685 15.4315 62 32 62M62 32L32 62M32 2.00269L62.0025 32.0052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M31 62C29.2204 62 27.3855 61.332 25.5927 59.9086C23.791 58.4782 22.0952 56.3316 20.6377 53.5381C19.1829 50.7496 18.0147 47.4106 17.214 43.7054C16.4137 40.0021 16 36.0237 16 32C16 27.9763 16.4137 23.9979 17.214 20.2946C18.0147 16.5895 19.1829 13.2504 20.6377 10.4619C22.0952 7.66841 23.791 5.52179 25.5927 4.09136C27.3855 2.66801 29.2204 2 31 2",strokeWidth:"2"})]})]}),hp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.875,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:64,height:64},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M62 32C62 48.5685 48.5685 62 32 62M62 32C62 15.4315 48.5685 2 32 2C15.4315 2 2 15.4315 2 32C2 48.5685 15.4315 62 32 62M62 32L32 62M32 2.00269L62.0025 32.0052",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M50.3827 20.3601C47.1902 21.7605 43.4002 22.8046 39.2752 23.4077C35.1519 24.0105 30.8103 24.1557 26.5584 23.8319C22.3057 23.508 18.2597 22.7238 14.7044 21.5418C11.1449 20.3584 8.19358 18.8149 6.03181 17.0454M6.02374 46.9613C8.18198 45.1925 11.129 43.6491 14.6841 42.465C18.2349 41.2824 22.2765 40.4968 26.5256 40.1707C30.774 39.8447 35.113 39.9871 39.2353 40.5866C43.3592 41.1864 47.15 42.2268 50.3455 43.6237",strokeLinecap:"round"})]})]}),gp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("compressor"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsx(U,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z",strokeLinecap:"round"})})]}),jp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(_e,{cx:"33",cy:"33",r:"14.5"})]})]}),Ep=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M35 12.4V20.4"}),o.jsxRuntimeExports.jsx(T,{d:"M3 33H16"}),o.jsxRuntimeExports.jsx(T,{d:"M35 53.6V45.6"})]})]}),yp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M39 33C39 33.7879 38.8448 34.5681 38.5433 35.2961C38.2417 36.0241 37.7998 36.6855 37.2426 37.2426C36.6855 37.7998 36.0241 38.2417 35.2961 38.5433C34.5681 38.8448 33.7879 39 33 39C32.2121 39 31.4319 38.8448 30.7039 38.5433C29.9759 38.2417 29.3145 37.7998 28.7574 37.2426C28.2002 36.6855 27.7583 36.0241 27.4567 35.2961C27.1552 34.5681 27 33.7879 27 33C27 32.2121 27.1552 31.4319 27.4567 30.7039C27.7583 29.9759 28.2002 29.3145 28.7574 28.7574C29.3145 28.2002 29.9759 27.7583 30.7039 27.4567C31.4319 27.1552 32.2121 27 33 27C33.7879 27 34.5681 27.1552 35.2961 27.4567C36.0241 27.7583 36.6855 28.2002 37.2426 28.7574C37.7998 29.3145 38.2417 29.9759 38.5433 30.7039C38.8448 31.4319 39 32.2121 39 33L39 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M39 33H47"}),o.jsxRuntimeExports.jsx(T,{d:"M27 33H19"}),o.jsxRuntimeExports.jsx(T,{d:"M36 27.804L40 20.8758"}),o.jsxRuntimeExports.jsx(T,{d:"M30 27.804L26 20.8758"}),o.jsxRuntimeExports.jsx(T,{d:"M30 38.196L26 45.1242"}),o.jsxRuntimeExports.jsx(T,{d:"M36 38.196L40 45.1242"})]})]}),Sp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M49.1214 16.2515C43.5325 21.3055 36.2463 24.0711 28.7115 23.9986C21.1766 23.9262 13.945 21.0209 8.45428 15.8604M8.4838 50.112C13.9718 44.968 21.1918 42.0733 28.7133 42.0014C36.2348 41.9295 43.5089 44.6858 49.0942 49.7239"})]})]}),Rp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(me,{...r,className:u.CSS(u.CSS.B("pump"),t),orientation:n,children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:4.55,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95.45,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:4.55,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:95.45,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:66,height:66},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(T,{d:"M17 7.59998L59.5394 18.9984M17 58.3984L59.5394 47M63 33C63 36.9397 62.224 40.8407 60.7164 44.4805C59.2087 48.1203 56.999 51.4274 54.2132 54.2132C51.4274 56.999 48.1203 59.2087 44.4805 60.7164C40.8407 62.224 36.9397 63 33 63C29.0603 63 25.1593 62.224 21.5195 60.7164C17.8797 59.2087 14.5726 56.999 11.7868 54.2132C9.00104 51.4274 6.79125 48.1203 5.28361 44.4805C3.77597 40.8407 3 36.9397 3 33C3 29.0603 3.77597 25.1593 5.28362 21.5195C6.79126 17.8797 9.00104 14.5726 11.7868 11.7868C14.5726 9.00104 17.8797 6.79125 21.5195 5.28361C25.1593 3.77597 29.0603 3 33 3C36.9397 3 40.8407 3.77597 44.4805 5.28362C48.1203 6.79126 51.4274 9.00104 54.2132 11.7868C56.999 14.5726 59.2087 17.8797 60.7164 21.5195C62.224 25.1593 63 29.0603 63 33Z"}),o.jsxRuntimeExports.jsx(T,{d:"M3 33H63"})]})]}),Cp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:7.575,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:92.425,top:50,id:"2"})]}),o.jsxRuntimeExports.jsx(U,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:o.jsxRuntimeExports.jsx(T,{d:"M16.5 2.5L16.5 66.5M2.5 34.5H30.5M2.5 18.9848H30.5M2.5 50.0152H30.5M5.3 66.5H27.7C29.2464 66.5 30.5 65.1976 30.5 63.5909V5.40909C30.5 3.80244 29.2464 2.5 27.7 2.5H5.3C3.7536 2.5 2.5 3.80245 2.5 5.40909V63.5909C2.5 65.1976 3.7536 66.5 5.3 66.5Z",strokeLinecap:"round"})})]}),wp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(T,{d:"M29.121 3.37903L61 34.5"}),o.jsxRuntimeExports.jsx(T,{d:"M29.12 65.62L61 34.5"})]})]}),bp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:60,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2.5",width:"56",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M30 2.5L30 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"})]})]}),vp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(T,{d:"M29 2.5C33.2023 2.5 37.3635 3.3277 41.2459 4.93586C45.1283 6.54401 48.656 8.90111 51.6274 11.8726C54.5989 14.8441 56.956 18.3717 58.5642 22.2541C60.1723 26.1366 61 30.2977 61 34.5C61 38.7023 60.1723 42.8635 58.5642 46.7459C56.956 50.6283 54.5989 54.1559 51.6274 57.1274C48.6559 60.0989 45.1283 62.456 41.2459 64.0641C37.3635 65.6723 33.2023 66.5 29 66.5",strokeLinecap:"square"}),o.jsxRuntimeExports.jsx(pe,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),o.jsxRuntimeExports.jsx(pe,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),_p=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("flame-arrestor"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.333,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.667,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:63,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2.5",width:"28",height:"64",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M16 2.5L16 66.5"}),o.jsxRuntimeExports.jsx(T,{d:"M2 34.5H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 19H30"}),o.jsxRuntimeExports.jsx(T,{d:"M2 50H30"}),o.jsxRuntimeExports.jsx(T,{d:"M29.121 3.37903L61 34.5"}),o.jsxRuntimeExports.jsx(T,{d:"M29.12 65.62L61 34.5"}),o.jsxRuntimeExports.jsx(T,{d:"M29 2.5C33.2023 2.5 37.3635 3.3277 41.2459 4.93586C45.1283 6.54401 48.656 8.90111 51.6274 11.8726C54.5989 14.8441 56.956 18.3717 58.5642 22.2541C60.1723 26.1366 61 30.2977 61 34.5C61 38.7023 60.1723 42.8635 58.5642 46.7459C56.956 50.6283 54.5989 54.1559 51.6274 57.1274C48.6559 60.0989 45.1283 62.456 41.2459 64.0641C37.3635 65.6723 33.2023 66.5 29 66.5"}),o.jsxRuntimeExports.jsx(pe,{x1:"27",y1:"66.5",x2:"29",y2:"66.5"}),o.jsxRuntimeExports.jsx(pe,{x1:"27",y1:"2.5",x2:"29",y2:"2.5"})]})]}),Mp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("thruster"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:25.3,top:4.76,id:"3"}),o.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:25.3,top:95.24,id:"4"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:81,height:42},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"2.5",y:"2",width:"38",height:"38",rx:"3"}),o.jsxRuntimeExports.jsx(T,{d:"M78.5 37.5117V4.51172"}),o.jsxRuntimeExports.jsx(T,{d:"M40.5 11.5L76.0072 2.6232"}),o.jsxRuntimeExports.jsx(T,{d:"M40.5 30.5L76.0072 39.3768"}),o.jsxRuntimeExports.jsx(T,{d:"M75.6192 2.71597C75.9231 2.56695 76.2597 2.49745 76.5977 2.51399C76.9357 2.53052 77.264 2.63256 77.5518 2.81053C77.8397 2.98851 78.0776 3.23661 78.2435 3.53161C78.4093 3.82661 78.4975 4.15886 78.4999 4.49726"}),o.jsxRuntimeExports.jsx(T,{d:"M78.4994 37.5101C78.4914 37.8382 78.4028 38.1592 78.2414 38.445C78.0801 38.7307 77.8509 38.9723 77.574 39.1486C77.2972 39.3248 76.9813 39.4302 76.6541 39.4555C76.3269 39.4808 75.9986 39.4252 75.698 39.2936"})]})]}),Np=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("nozzle"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:18.75,top:17.46,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:1.5873,id:"2"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:81.25,top:17.46,id:"3"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:64,height:126},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"12",y:"1.6667",width:"40",height:"40",rx:"2"}),o.jsxRuntimeExports.jsx(T,{d:"M1.3333 124H62.6667",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M50.1883 41.6667C41.7748 41.6667 35.0143 46.3333 42.6923 59.3333C59.3476 87.5333 63.6327 119 62.855 124",strokeLinecap:"round"}),o.jsxRuntimeExports.jsx(T,{d:"M14 41.6667C22.4135 41.6667 29.174 46.3333 21.496 59.3333C4.84066 87.5333 0.555555 119 1.33333 124",strokeLinecap:"round"})]})]}),kp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("strainer"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:6.06,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:93.04,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M2.293 2.29297L29.9383 66.7986",strokeDasharray:"6 6"})]})]}),Lp=({color:e,className:t,orientation:n="left",scale:s,...r})=>o.jsxRuntimeExports.jsxs(ae,{...r,className:u.CSS(u.CSS.B("strainer"),t),children:[o.jsxRuntimeExports.jsxs(K,{orientation:n,children:[o.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:6.06,top:50,id:"1"}),o.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:93.04,top:50,id:"2"})]}),o.jsxRuntimeExports.jsxs(U,{dimensions:{width:33,height:69},color:e,orientation:n,scale:s,children:[o.jsxRuntimeExports.jsx(he,{x:"2",y:"2",width:"29",height:"65",rx:"1"}),o.jsxRuntimeExports.jsx(T,{d:"M31 34.5L2.30611 2.33992",strokeDasharray:"6 6"}),o.jsxRuntimeExports.jsx(T,{d:"M31 34.5L2.30611 66.6601",strokeDasharray:"6 6"})]})]}),pC=({aetherKey:e,source:t})=>{const n=f.useMemoDeepEqual({source:t}),[,{enabled:s},r]=f.use$2({aetherKey:e,type:_.Light.TYPE,schema:_.lightStateZ,initialState:{enabled:!1,...n}});return g.useEffect(()=>r(i=>({...i,...n})),[n,r]),{enabled:s}},mC=({aetherKey:e,source:t,sink:n})=>{const s=f.useMemoDeepEqual({source:t,sink:n}),[,{value:r},i]=f.use$2({aetherKey:e,type:_.Setpoint.TYPE,schema:_.setpointStateZ,initialState:{trigger:0,value:0,...s}});return g.useEffect(()=>{i(a=>({...a,...s}))},[s,i]),{set:g.useCallback(a=>i(c=>({...c,trigger:c.trigger+1,command:a})),[i]),value:r}},fC=({aetherKey:e,source:t,sink:n})=>{const s=f.useMemoDeepEqual({source:t,sink:n}),[,{triggered:r,enabled:i},l]=f.use$2({aetherKey:e,type:_.Toggle.TYPE,schema:_.toggleStateZ,initialState:{triggered:!1,enabled:!1,...s}});return g.useEffect(()=>{l(c=>({...c,...s}))},[s,l]),{toggle:g.useCallback(()=>l(c=>({...c,triggered:!c.triggered})),[l]),triggered:r,enabled:i}},on=(e,t)=>{if(e==null)return null;const{label:n,level:s="p",orientation:r="top",direction:i,align:l,maxInlineSize:a}=e;return n==null||n.length===0?null:{key:"label",element:o.jsxRuntimeExports.jsx(f.Editable,{className:u.CSS(u.CSS.BE("symbol","label"),u.CSS.dir(i)),level:s,value:n,onChange:c=>t?.({label:{...e,label:c}}),allowEmpty:!0,style:{textAlign:l,maxInlineSize:a}}),location:r}},ri=e=>{if(e==null)return null;const{show:t=!0,showChip:n=!0,showIndicator:s=!0,chip:r,indicator:i,orientation:l="bottom"}=e;return{key:"control",element:o.jsxRuntimeExports.jsxs(f.Box,{direction:u.g.swap(l),align:"center",className:u.CSS(u.CSS.B("control-state")),gap:"small",children:[t&&n&&o.jsxRuntimeExports.jsx(Pc,{size:"small",...r}),t&&s&&o.jsxRuntimeExports.jsx(Ic,{...i})]}),location:l}},Re=(e,t)=>{const n=({symbolKey:s,control:r,source:i,sink:l,label:a,onChange:c,selected:d,orientation:x="left",position:p,...m})=>{const{enabled:h,triggered:j,toggle:E}=fC({aetherKey:s,source:i,sink:l}),S=[],R=on(a,c);R!=null&&S.push(R);const v=ri(r);return v!=null&&S.push(v),o.jsxRuntimeExports.jsx(Dt,{editable:d,symbolKey:s,items:S,onRotate:()=>c({orientation:u.K.rotate90(x)}),onLocationChange:(y,C)=>{y==="label"&&c({label:{...a,orientation:C}}),y==="control"&&c({control:{...r,orientation:C}})},...t?.grid,children:o.jsxRuntimeExports.jsx(e,{enabled:h,triggered:j,onClick:E,orientation:x,...m})})};return n.displayName=e.displayName,n},de=(e,t)=>{const n=({symbolKey:s,label:r,onChange:i,selected:l,position:a,orientation:c="left",...d})=>{const x=[],p=on(r,i);return p!=null&&x.push(p),o.jsxRuntimeExports.jsx(Dt,{...t?.grid,items:x,editable:l,symbolKey:s,onRotate:()=>i({orientation:u.K.rotate90(c)}),onLocationChange:(m,h)=>{m==="label"&&i({label:{...r,orientation:h}})},children:o.jsxRuntimeExports.jsx(e,{orientation:c,...d})})};return n.displayName=e.displayName,n},St=e=>{const t=({symbolKey:n,label:s,onChange:r,selected:i,position:l,orientation:a="left",enabled:c=!1,clickable:d=!1,...x})=>{const p=[],m=on(s,r);m!=null&&p.push(m);const h=()=>{d&&r({enabled:!c})};return o.jsxRuntimeExports.jsx(Dt,{items:p,editable:i,symbolKey:n,onRotate:()=>r({orientation:u.K.rotate90(a)}),onLocationChange:(j,E)=>{j==="label"&&r({label:{...s,orientation:E}})},children:o.jsxRuntimeExports.jsx(e,{orientation:a,enabled:c,onClick:h,...x})})};return t.displayName=e.displayName,t},Pp=Re(Gd),Tp=Re(Xd),Ap=Re(Ud),Ip=Re(Kd),Op=Re(tx),$p=Re(ax),Bp=Re(fp),Dp=Re(hp),zp=Re(kx),Hp=Re(Lx),Vp=Re(Px),Fp=Re(Ax),Zp=Re(Bx),Yp=Re(Dx),Wp=Re(zx),Kp=Re(Hx),Gp=Re(Vx),Xp=Re(Fx),Up=Re(Nx),qp=Re(gp),Jp=Re(jp),Qp=Re(Ep),em=Re(yp),tm=Re(Sp),nm=Re(Rp),sm=Re(rx),om=Re(ix),rm=Re(nx),im=Re(sx),lm=Re(ox),am=de(Ex),cm=de(yx),um=de(Ox),dm=de($x),xm=de(cx),pm=de(dx),mm=de(xx),fm=de(fx),hm=de(Jd),gm=de(Qd),jm=de(ex),Em=de(Sx),ym=Re(bx,{grid:{allowRotate:!1}}),Sm=de(Yx),Rm=de(mx),Cm=de(Wx),wm=de(Kx),bm=de(Gx),vm=de(ux),_m=de(Jx),Mm=de(Qx,{grid:{allowRotate:!1}}),Nm=de(Tx),km=de(ep),Lm=de(tp),Pm=de(np),Tm=de(sp),Am=de(op),Im=de(rp),Om=de(ip),$m=de(lp),Bm=de(ap),Dm=de(cp),zm=de(up),Hm=de(dp),Vm=de(xp),Fm=de(pp),Zm=de(mp),Ym=de(Cp),Wm=de(bp),Km=de(wp),Gm=de(vp),Xm=de(_p),Um=de(Mp),qm=de(Np),Jm=de(kp),Qm=de(Lp),ef=St(Rx),tf=St(qd),nf=St(Ux),sf=St(qx),of=St(px),rf=St(Cx),lf=St(lx),af=de(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:r,borderRadius:i})=>o.jsxRuntimeExports.jsx(Xs,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:r,borderRadius:i,backgroundColor:e}),{grid:{allowCenter:!0,allowRotate:!1}}),cf=e=>o.jsxRuntimeExports.jsx(Xs,{...e,dimensions:{width:25,height:50}}),hC=de(({sideLength:e,rotation:t,color:n,backgroundColor:s,numSides:r,...i})=>o.jsxRuntimeExports.jsx(oi,{numSides:3,sideLength:e,rotation:t,color:n,backgroundColor:s,...i})),uf=de(({numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:r,backgroundColor:i,strokeWidth:l,...a})=>o.jsxRuntimeExports.jsx(oi,{numSides:e,sideLength:t,cornerRounding:n,rotation:s,color:r,backgroundColor:i,strokeWidth:l,...a})),df=de(({radius:e,color:t,backgroundColor:n,strokeWidth:s,...r})=>o.jsxRuntimeExports.jsx(jx,{radius:e,color:t,backgroundColor:n,strokeWidth:s,...r}),{grid:{allowRotate:!1}}),xf=de(({backgroundColor:e,borderRadius:t,onChange:n,orientation:s,color:r,dimensions:i,strokeWidth:l})=>o.jsxRuntimeExports.jsx(Xs,{onResize:a=>n({dimensions:a}),orientation:s,color:r,dimensions:i,boxBorderRadius:t,backgroundColor:e,strokeWidth:l}),{grid:{allowCenter:!0,allowRotate:!1}}),pf=e=>o.jsxRuntimeExports.jsx(Xs,{...e,dimensions:{width:25,height:50},borderRadius:0}),mf=({label:e,symbolKey:t,orientation:n="left",control:s,units:r,source:i,sink:l,color:a,onChange:c,selected:d,draggable:x,size:p,disabled:m})=>{const{value:h,set:j}=mC({aetherKey:t,source:i,sink:l}),E=[],S=ri(s);S!=null&&E.push(S);const R=on(e,c);return R!=null&&E.push(R),o.jsxRuntimeExports.jsx(Dt,{symbolKey:t,allowRotate:!1,editable:d&&!x,onRotate:()=>c({orientation:u.K.rotate90(n)}),items:E,onLocationChange:(v,y)=>{v==="label"&&c({label:{...e,orientation:y}})},children:o.jsxRuntimeExports.jsx(Mx,{value:h,onChange:j,units:r,color:a,orientation:n,disabled:m,size:p})})},ff=({className:e,...t})=>o.jsxRuntimeExports.jsx(Mx,{value:12,onChange:()=>{},units:"mV",style:{width:120,transform:"scale(0.95)"},className:u.CSS(u.CSS.BM("setpoint","preview"),e),disabled:!0,...t,children:o.jsxRuntimeExports.jsx(f.Text,{children:"10.0"})}),gC=u.J.construct(10,-1),jC=u.J.construct(1,1),hf=({symbolKey:e,label:t,level:n="p",position:s,textColor:r,color:i,telem:l,units:a,onChange:c,inlineSize:d=70,selected:x,draggable:p,notation:m,redline:h})=>{const j=ws.useTypography(n),E=(j.lineHeight+.5)*j.baseSize+2,S=g.useMemo(()=>{if(l==null||h==null)return;const{bounds:C,gradient:M}=h;return _.sourcePipeline("color",{connections:[{from:"source",to:"scale"},{from:"scale",to:"gradient"}],segments:{source:l,scale:_.scaleNumber({scale:u.C.Scale.scale(C).scale(0,1).transform}),gradient:_.colorGradient({gradient:M})},outlet:"gradient"})},[l,h]),{width:R}=$r({aetherKey:e,color:r,level:n,box:u.$t.construct(u.J.translateY({...s},1),{height:E,width:d}),telem:l,backgroundTelem:S,minWidth:d,notation:m,useWidthForBackground:!0,valueBackgroundOverScan:gC,valueBackgroundShift:jC}),v=[],y=on(t,c);return y!=null&&v.push(y),o.jsxRuntimeExports.jsx(Dt,{editable:x&&!p,symbolKey:e,items:v,allowRotate:!1,onLocationChange:(C,M)=>{C==="label"&&c({label:{...t,orientation:M}})},children:o.jsxRuntimeExports.jsx(wx,{color:i,dimensions:{height:E,width:R},inlineSize:d,units:a,unitsLevel:N.downLevel(n)})})},gf=({color:e})=>o.jsxRuntimeExports.jsx(wx,{color:e,dimensions:{width:60,height:25},units:"psi",children:o.jsxRuntimeExports.jsx(f.Text,{children:"50.00"})}),jf=({symbolKey:e,label:t,orientation:n="left",sink:s,control:r,selected:i,draggable:l,onChange:a,mode:c,...d})=>{const{onMouseDown:x,onMouseUp:p}=DR({aetherKey:e,sink:s,mode:c}),m=[],h=ri(r);return h!=null&&m.push(h),o.jsxRuntimeExports.jsx(Dt,{onRotate:()=>a({orientation:u.K.rotate90(n)}),allowRotate:!1,editable:i,symbolKey:e,items:m,onLocationChange:(j,E)=>{j==="label"&&a({label:{...t,orientation:E}})},children:o.jsxRuntimeExports.jsx(vx,{...t,onMouseDown:x,onMouseUp:p,orientation:n,...d})})},Ef=({label:e,...t})=>o.jsxRuntimeExports.jsx(vx,{label:"Button",...t}),yf=({symbolKey:e,label:t,source:n,onChange:s,selected:r,...i})=>{const{enabled:l}=pC({aetherKey:e,source:n}),a=[],c=on(t,s);return c!=null&&a.push(c),o.jsxRuntimeExports.jsx(Dt,{items:a,allowRotate:!1,editable:r,symbolKey:e,onLocationChange:(d,x)=>{d==="label"&&s({label:{...t,orientation:x}})},children:o.jsxRuntimeExports.jsx(Ix,{enabled:l,...i})})},Sf=({label:{label:e,level:t},orientation:n,color:s,onChange:r})=>o.jsxRuntimeExports.jsx(Zx,{className:Gs,onLabelChange:i=>r({label:{label:i,level:t}}),label:e,level:t,orientation:n,color:s}),Rf=({label:e,...t})=>o.jsxRuntimeExports.jsx(Zx,{label:"Off Page",...t,orientation:"right"}),Cf=de(({backgroundColor:e,onChange:t,orientation:n,color:s,dimensions:r,borderRadius:i})=>o.jsxRuntimeExports.jsx(Xx,{onResize:l=>t({dimensions:l}),orientation:n,color:s,dimensions:r,borderRadius:i,backgroundColor:e})),wf=e=>o.jsxRuntimeExports.jsx(Xx,{...e,dimensions:{width:25,height:50}}),bf=({onChange:e,symbolKey:t,color:n,width:s,align:r,autoFit:i,level:l,value:a})=>o.jsxRuntimeExports.jsx(_x,{className:Gs,onChange:c=>e({value:c}),value:a,level:l,color:n,width:s,align:r,autoFit:i},t),vf=e=>o.jsxRuntimeExports.jsx(_x,{...e,autoFit:!0,value:"Text Box"}),X=4,Dn=2,EC=["agitator","angledReliefValve","angledSpringLoadedReliefValve","angledValve","ballValve","threeWayBallValve","gateValve","butterflyValveOne","butterflyValveTwo","breatherValve","offPageReference","box","burstDisc","isoBurstDisc","button","cap","cavityPump","checkValve","cylinder","crossBeamAgitator","electricRegulator","electricRegulatorMotorized","filter","flowStraightener","heaterElement","checkValveWithArrow","flatBladeAgitator","flowmeterGeneral","flowmeterElectromagnetic","flowmeterVariableArea","flowmeterCoriolis","flowmeterNozzle","flowmeterVenturi","flowmeterRingPiston","flowmeterPositiveDisplacement","flowmeterTurbine","flowmeterPulse","flowmeterFloatSensor","flowmeterOrifice","fourWayValve","helicalAgitator","isoCap","isoCheckValve","isoFilter","light","manualValve","needleValve","orifice","orificePlate","paddleAgitator","propellerAgitator","pistonPump","pump","regulator","regulatorManual","reliefValve","rotaryMixer","screwPump","setpoint","solenoidValve","springLoadedReliefValve","staticMixer","switch","tank","polygon","circle","textBox","threeWayValve","vacuumPump","value","valve","vent","tJunction","crossJunction","heatExchangerGeneral","heatExchangerM","heatExchangerStraightTube","diaphragmPump","ejectionPump","compressor","turboCompressor","rollerVaneCompressor","liquidRingCompressor","ejectorCompressor","centrifugalCompressor","flameArrestor","flameArrestorDetonation","flameArrestorExplosion","flameArrestorFireRes","flameArrestorFireResDetonation","thruster","nozzle","strainer","strainerCone"],yC=se.z.enum(EC),ce={orientation:"left",scale:1},SC={source:_.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:_.streamChannelValue({channel:0}),rollingAverage:_.rollingAverage({windowSize:1}),stringifier:_.stringifyNumber({precision:2,notation:"standard"})},outlet:"stringifier"})},RC={...ce,source:_.sourcePipeline("number",{connections:[],segments:{valueStream:_.streamChannelValue({channel:0})},outlet:"valueStream"})},CC={...ce,sink:_.sinkPipeline("number",{connections:[],segments:{setter:_.setChannelValue({channel:0})},inlet:"setter"})},_f={...ce,source:_.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:_.streamChannelValue({channel:0}),threshold:_.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"})},Mf={...ce,control:{show:!0},sink:_.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:_.setChannelValue({channel:0}),setpoint:_.setpoint({truthy:1,falsy:0})},inlet:"setpoint"})},Ce={..._f,...Mf},Ht={...ce,enabled:!1,clickable:!1},W=e=>({label:{label:e,level:"p",orientation:"top",maxInlineSize:150,align:"center",direction:"x"}}),wC={width:125,height:200},ii={dimensions:wC},bC=3,vC={name:"Three Way Valve",key:"threeWayValve",Form:Se,Symbol:Pp,defaultProps:e=>({color:e.colors.gray.l11,...W("Three Way Valve"),...Ce}),Preview:Gd,zIndex:X},_C={name:"Valve",key:"valve",Form:Se,Symbol:Tp,defaultProps:e=>({color:e.colors.gray.l11,...W("Valve"),...Ce}),Preview:Xd,zIndex:X},MC={name:"Solenoid Valve",key:"solenoidValve",Form:Se,Symbol:Ap,defaultProps:e=>({color:e.colors.gray.l11,...W("Solenoid Valve"),normallyOpen:!1,...Ce}),Preview:Ud,zIndex:X},NC={name:"Four Way Valve",key:"fourWayValve",Form:Se,Symbol:Ip,defaultProps:e=>({color:e.colors.gray.l11,...W("Four Way Valve"),...Ce}),Preview:Kd,zIndex:X},kC={name:"Angled Valve",key:"angledValve",Form:Se,Symbol:Op,defaultProps:e=>({color:e.colors.gray.l11,...W("Angled Valve"),...Ce}),Preview:tx,zIndex:X},LC={name:"Ball Valve",key:"ballValve",Form:Se,Symbol:rm,defaultProps:e=>({color:e.colors.gray.l11,...W("Ball Valve"),...Ce}),Preview:nx,zIndex:X},PC={name:"Three-Way Ball Valve",key:"threeWayBallValve",Form:Se,Symbol:im,defaultProps:e=>({color:e.colors.gray.l11,...W("Three-Way Ball Valve"),...Ce}),Preview:sx,zIndex:X},TC={name:"Gate Valve",key:"gateValve",Form:Se,Symbol:lm,defaultProps:e=>({color:e.colors.gray.l11,...W("Gate Valve"),...Ce}),Preview:ox,zIndex:X},AC={name:"Butterfly Valve (Remote)",key:"butterflyValveOne",Form:Se,Symbol:sm,defaultProps:e=>({color:e.colors.gray.l11,...W("Butterfly Valve (Remote)"),...Ce}),Preview:rx,zIndex:X},IC={name:"Butterfly Valve (Manual)",key:"butterflyValveTwo",Form:Se,Symbol:om,defaultProps:e=>({color:e.colors.gray.l11,...W("Butterfly Valve (Manual)"),...Ce}),Preview:ix,zIndex:X},OC={name:"Breather Valve",key:"breatherValve",Form:zt,Symbol:lf,defaultProps:e=>({color:e.colors.gray.l11,...W("Breather Valve"),...Ht}),Preview:Ge(lx,["clickable"]),zIndex:X},$C={name:"Pump",key:"pump",Form:Se,Symbol:$p,defaultProps:e=>({color:e.colors.gray.l11,...W("Pump"),...Ce}),Preview:ax,zIndex:X},BC={name:"Screw Pump",key:"screwPump",Form:Se,Symbol:Up,defaultProps:e=>({color:e.colors.gray.l11,...W("Screw Pump"),...Ce}),Preview:Nx,zIndex:X},DC={name:"Tank",key:"tank",Form:Yd,Symbol:af,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.ir.setAlpha(e.colors.gray.l1,0),...W("Tank"),borderRadius:si,...ii,...ce}),Preview:cf,zIndex:Dn},zC={name:"Polygon",key:"polygon",Symbol:uf,Form:FR,defaultProps:e=>({numSides:6,sideLength:uC,cornerRounding:0,rotation:0,color:e.colors.gray.l11,backgroundColor:u.ir.setAlpha(e.colors.gray.l1,0),strokeWidth:2,...W("Polygon")}),Preview:Ge(oi,["clickable"]),zIndex:Dn},HC={name:"Circle",key:"circle",Symbol:df,Form:ZR,defaultProps:e=>({radius:20,color:e.colors.gray.l11,backgroundColor:u.ir.setAlpha(e.colors.gray.l1,0),...W("Circle"),strokeWidth:2}),Preview:Ge(jx,["clickable"]),zIndex:Dn},VC={name:"Cylinder",key:"cylinder",Form:tC,Symbol:Cf,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.ir.setAlpha(e.colors.gray.l1,0),...W("cylinder"),dimensions:{width:66,height:181},...ce}),Preview:wf,zIndex:Dn},FC={name:"Box",key:"box",Form:nC,Symbol:xf,defaultProps:e=>({color:e.colors.gray.l11,backgroundColor:u.ir.setAlpha(e.colors.gray.l1,0),...W("Box"),borderRadius:bC,strokeWidth:2,...ii,...ce}),Preview:pf,zIndex:Dn},ZC={name:"Relief Valve",key:"reliefValve",Form:zt,Symbol:tf,defaultProps:e=>({color:e.colors.gray.l11,...W("Relief Valve"),...Ht}),Preview:Ge(qd,["clickable"]),zIndex:X},YC={name:"Spring Loaded Relief Valve",key:"springLoadedReliefValve",Form:zt,Symbol:nf,defaultProps:e=>({color:e.colors.gray.l11,...W("Spring Loaded Relief Valve"),...Ht}),Preview:Ge(Ux,["clickable"]),zIndex:X},WC={name:"Angled Spring Loaded Relief Valve",key:"angledSpringLoadedReliefValve",Form:zt,Symbol:sf,defaultProps:e=>({color:e.colors.gray.l11,...W("Angled Spring Loaded Relief Valve"),...Ht}),Preview:Ge(qx,["clickable"]),zIndex:X},KC={name:"Regulator",key:"regulator",Form:xe,Symbol:am,defaultProps:e=>({color:e.colors.gray.l11,...W("Regulator"),...ce}),Preview:Ex,zIndex:X},GC={name:"Manual Regulator",key:"regulatorManual",Form:xe,Symbol:cm,defaultProps:e=>({color:e.colors.gray.l11,...W("Manual Regulator"),...ce}),Preview:Ge(yx,["clickable"]),zIndex:X},XC={name:"Electric Regulator",key:"electricRegulator",Form:xe,Symbol:um,defaultProps:e=>({color:e.colors.gray.l11,...W("Electric Regulator"),...ce}),Preview:Ox,zIndex:X},UC={name:"Electric Regulator Motorized",key:"electricRegulatorMotorized",Form:xe,Symbol:dm,defaultProps:e=>({color:e.colors.gray.l11,...W("Electric Regulator Motorized"),...ce}),Preview:$x,zIndex:X},qC={name:"Burst Disc",key:"burstDisc",Form:xe,Symbol:xm,defaultProps:e=>({color:e.colors.gray.l11,...W("Burst Disc"),...ce}),Preview:cx,zIndex:X},JC={name:"ISO Burst Disc",key:"isoBurstDisc",Form:xe,Symbol:vm,defaultProps:e=>({color:e.colors.gray.l11,...W("ISO Burst Disc"),...ce}),Preview:ux,zIndex:X},QC={name:"Cap",key:"cap",Form:xe,Symbol:pm,defaultProps:e=>({color:e.colors.gray.l11,...W("Cap"),...ce}),Preview:dx,zIndex:X},e6={name:"ISO Cap",key:"isoCap",Form:xe,Symbol:mm,defaultProps:e=>({color:e.colors.gray.l11,...W("ISO Cap"),...ce}),Preview:xx,zIndex:X},t6={name:"Manual Valve",key:"manualValve",Form:zt,Symbol:of,defaultProps:e=>({color:e.colors.gray.l11,...W("Manual Valve"),...Ht}),Preview:Ge(px,["clickable"]),zIndex:X},n6={name:"Orifice Plate",key:"orificePlate",Form:xe,Symbol:Rm,defaultProps:e=>({color:e.colors.gray.l11,...W("Orifice Plate"),...ce}),Preview:mx,zIndex:X},s6={name:"ISO Filter",key:"isoFilter",Form:xe,Symbol:Cm,defaultProps:e=>({color:e.colors.gray.l11,...W("ISO Filter"),...ce}),Preview:Wx,zIndex:X},o6={name:"Filter",key:"filter",Form:xe,Symbol:fm,defaultProps:e=>({color:e.colors.gray.l11,...W("Filter"),...ce}),Preview:fx,zIndex:X},r6={name:"Flow Straightener",key:"flowStraightener",Form:xe,Symbol:wm,defaultProps:e=>({color:e.colors.gray.l11,...W("Flow Straightener"),...ce}),Preview:Kx,zIndex:X},i6={name:"Heater Element",key:"heaterElement",Form:xe,Symbol:bm,defaultProps:e=>({color:e.colors.gray.l11,...W("Heater Element"),...ce}),Preview:Gx,zIndex:X},l6={name:"Needle Valve",key:"needleValve",Form:zt,Symbol:ef,defaultProps:e=>({color:e.colors.gray.l11,...W("Needle Valve"),...Ht}),Preview:Ge(Rx,["clickable"]),zIndex:X},a6={name:"Check Valve",key:"checkValve",Form:xe,Symbol:hm,defaultProps:e=>({color:e.colors.gray.l11,...W("Check Valve"),...ce}),Preview:Jd,zIndex:X},c6={name:"Orifice",key:"orifice",Form:xe,Symbol:Em,defaultProps:e=>({color:e.colors.gray.l11,...W("Orifice"),...ce}),Preview:Sx,zIndex:X},u6={name:"Angled Relief Valve",key:"angledReliefValve",Form:zt,Symbol:rf,defaultProps:e=>({color:e.colors.gray.l11,...W("Angled Relief Valve"),...Ht}),Preview:Ge(Cx,["clickable"]),zIndex:X},d6={name:"Value",key:"value",Form:WR,Symbol:hf,Preview:gf,defaultProps:e=>({color:e.colors.gray.l11,units:"psi",level:"h5",inlineSize:70,...W("Value"),...ce,telem:SC.source,redline:Ar}),zIndex:X},x6={name:"Button",key:"button",Symbol:jf,Form:UR,Preview:Ef,defaultProps:e=>({color:e.colors.primary.z,...W("Button"),...Mf,mode:"fire",onClickDelay:0,scale:null}),zIndex:X},p6={name:"Switch",key:"switch",Symbol:ym,Form:sC,defaultProps:()=>({...W("Switch"),...Ce,scale:null}),Preview:bx,zIndex:X},m6={name:"Vacuum Pump",key:"vacuumPump",Symbol:zp,Form:Se,defaultProps:e=>({color:e.colors.gray.l11,...W("Vacuum Pump"),...Ce}),Preview:kx,zIndex:X},f6={name:"Compressor",key:"compressor",Symbol:qp,Form:Se,defaultProps:e=>({color:e.colors.gray.l11,...W("Compressor"),...Ce}),Preview:gp,zIndex:X},h6={name:"Cavity Pump",key:"cavityPump",Symbol:Hp,Form:Se,defaultProps:e=>({color:e.colors.gray.l11,...W("Cavity Pump"),...Ce}),Preview:Lx,zIndex:X},g6={name:"Piston Pump",key:"pistonPump",Symbol:Vp,Form:Se,defaultProps:e=>({color:e.colors.gray.l11,...W("Piston Pump"),...Ce}),Preview:Px,zIndex:X},j6={name:"Static Mixer",key:"staticMixer",Symbol:Nm,Form:xe,defaultProps:e=>({color:e.colors.gray.l11,...W("Static Mixer"),...ce}),Preview:Tx,zIndex:X},E6={name:"Rotary Mixer",key:"rotaryMixer",Symbol:Fp,Form:Se,defaultProps:e=>({color:e.colors.gray.l11,...W("Rotary Mixer"),...Ce}),Preview:Ax,zIndex:X},y6={name:"Light",key:"light",Symbol:yf,Form:GR,defaultProps:e=>({color:e.colors.gray.l11,...W("Light"),..._f}),Preview:Ix,zIndex:X},S6={name:"Setpoint",key:"setpoint",Symbol:mf,Form:JR,defaultProps:e=>({units:"mV",color:e.colors.gray.l11,size:"small",...W("Setpoint"),...RC,...CC}),Preview:ff,zIndex:X},R6={name:"Agitator",key:"agitator",Symbol:Zp,Form:Se,defaultProps:e=>({color:e.colors.gray.l11,...W("Agitator"),...Ce}),Preview:Bx,zIndex:X},C6={name:"Propeller Agitator",key:"propellerAgitator",Symbol:Yp,Form:Se,defaultProps:e=>({color:e.colors.gray.l11,...W("Propeller Agitator"),...Ce}),Preview:Dx,zIndex:X},w6={name:"Flat Blade Agitator",key:"flatBladeAgitator",Symbol:Wp,Form:Se,defaultProps:e=>({color:e.colors.gray.l11,...W("Flat Blade Agitator"),...Ce}),Preview:zx,zIndex:X},b6={name:"Paddle Agitator",key:"paddleAgitator",Symbol:Kp,Form:Se,defaultProps:e=>({color:e.colors.gray.l11,...W("Paddle Agitator"),...Ce}),Preview:Hx,zIndex:X},v6={name:"Cross Beam Agitator",key:"crossBeamAgitator",Symbol:Gp,Form:Se,defaultProps:e=>({color:e.colors.gray.l11,...W("Cross Beam Agitator"),...Ce}),Preview:Vx,zIndex:X},_6={name:"Helical Agitator",key:"helicalAgitator",Symbol:Xp,Form:Se,defaultProps:e=>({color:e.colors.gray.l11,...W("Helical Agitator"),...Ce}),Preview:Fx,zIndex:X},M6={name:"Text Box",key:"textBox",Symbol:bf,Form:QR,defaultProps:e=>({color:e.colors.gray.l11,autoFit:!0,align:"center",...W("Text Box"),...ce,...ii,level:"p",value:"Text Box",width:75}),Preview:vf,zIndex:X},N6={name:"Off Page Reference",key:"offPageReference",Form:eC,Symbol:Sf,defaultProps:e=>({color:e.colors.gray.l11,orientation:"right",...W("Off Page Reference")}),Preview:Rf,zIndex:X},k6={name:"ISO Check Valve",key:"isoCheckValve",Form:xe,Symbol:gm,defaultProps:e=>({color:e.colors.gray.l11,...W("ISO Check Valve"),...ce}),Preview:Qd,zIndex:X},L6={name:"Check Valve Variant",key:"checkValveWithArrow",Form:xe,Symbol:jm,defaultProps:e=>({color:e.colors.gray.l11,...W("Check Valve"),...ce}),Preview:ex,zIndex:X},P6={name:"Vent",key:"vent",Form:xe,Symbol:Sm,defaultProps:e=>({color:e.colors.gray.l11,...W("Vent"),...ce}),Preview:Yx,zIndex:X},T6={name:"T Junction",key:"tJunction",Form:xe,Symbol:_m,defaultProps:e=>({color:e.colors.gray.l11,...W(""),...ce}),Preview:Jx,zIndex:X+20},A6={name:"Cross Junction",key:"crossJunction",Form:xe,Symbol:Mm,defaultProps:e=>({color:e.colors.gray.l11,...W(""),...ce}),Preview:Qx,zIndex:X+20},I6={name:"Flowmeter General",key:"flowmeterGeneral",Form:xe,Symbol:km,defaultProps:e=>({color:e.colors.gray.l11,...W("General Flowmeter"),...ce}),Preview:ep,zIndex:X},O6={name:"Flowmeter Electromagnetic",key:"flowmeterElectromagnetic",Form:xe,Symbol:Lm,defaultProps:e=>({color:e.colors.gray.l11,...W("Electromagnetic Flowmeter"),...ce}),Preview:tp,zIndex:X},$6={name:"Flowmeter Variable Area",key:"flowmeterVariableArea",Form:xe,Symbol:Pm,defaultProps:e=>({color:e.colors.gray.l11,...W("Variable Area Flowmeter"),...ce}),Preview:np,zIndex:X},B6={name:"Flowmeter Coriolis",key:"flowmeterCoriolis",Form:xe,Symbol:Tm,defaultProps:e=>({color:e.colors.gray.l11,...W("Coriolis Flowmeter"),...ce}),Preview:sp,zIndex:X},D6={name:"Flowmeter Nozzle",key:"flowmeterNozzle",Form:xe,Symbol:Am,defaultProps:e=>({color:e.colors.gray.l11,...W("Nozzle Flowmeter"),...ce}),Preview:op,zIndex:X},z6={name:"Flowmeter Venturi",key:"flowmeterVenturi",Form:xe,Symbol:Im,defaultProps:e=>({color:e.colors.gray.l11,...W("Venturi Flowmeter"),...ce}),Preview:rp,zIndex:X},H6={name:"Flowmeter Ring Piston",key:"flowmeterRingPiston",Form:xe,Symbol:Om,defaultProps:e=>({color:e.colors.gray.l11,...W("Ring Piston Flowmeter"),...ce}),Preview:ip,zIndex:X},V6={name:"Flowmeter Positive Displacement",key:"flowmeterPositiveDisplacement",Form:xe,Symbol:$m,defaultProps:e=>({color:e.colors.gray.l11,...W("Positive Displacement Flowmeter"),...ce}),Preview:lp,zIndex:X},F6={name:"Flowmeter Turbine",key:"flowmeterTurbine",Form:xe,Symbol:Bm,defaultProps:e=>({color:e.colors.gray.l11,...W("Turbine Flowmeter"),...ce}),Preview:ap,zIndex:X},Z6={name:"Flowmeter Pulse",key:"flowmeterPulse",Form:xe,Symbol:Dm,defaultProps:e=>({color:e.colors.gray.l11,...W("Pulse Flowmeter"),...ce}),Preview:cp,zIndex:X},Y6={name:"Flowmeter Float Sensor",key:"flowmeterFloatSensor",Form:xe,Symbol:zm,defaultProps:e=>({color:e.colors.gray.l11,...W("Float Sensor Flowmeter"),...ce}),Preview:up,zIndex:X},W6={name:"Flowmeter Orifice",key:"flowmeterOrifice",Form:xe,Symbol:Hm,defaultProps:e=>({color:e.colors.gray.l11,...W("Orifice Flowmeter"),...ce}),Preview:dp,zIndex:X},K6={name:"Heat Exchanger General",key:"heatExchangerGeneral",Form:xe,Symbol:Vm,defaultProps:e=>({color:e.colors.gray.l11,...W("General Heat Exchanger"),...ce}),Preview:xp,zIndex:X},G6={name:"Heat Exchanger M",key:"heatExchangerM",Form:xe,Symbol:Fm,defaultProps:e=>({color:e.colors.gray.l11,...W("M Heat Exchanger"),...ce}),Preview:pp,zIndex:X},X6={name:"Heat Exchanger Straight Tube",key:"heatExchangerStraightTube",Form:xe,Symbol:Zm,defaultProps:e=>({color:e.colors.gray.l11,...W("Straight Tube Heat Exchanger"),...ce}),Preview:mp,zIndex:X},U6={name:"Turbo Compressor",key:"turboCompressor",Form:Se,Symbol:Jp,defaultProps:e=>({color:e.colors.gray.l11,...W("Turbo Compressor"),...Ce}),Preview:jp,zIndex:X},q6={name:"Roller Vane Compressor",key:"rollerVaneCompressor",Form:Se,Symbol:Qp,defaultProps:e=>({color:e.colors.gray.l11,...W("Roller Vane Compressor"),...Ce}),Preview:Ep,zIndex:X},J6={name:"Liquid Ring Compressor",key:"liquidRingCompressor",Form:Se,Symbol:em,defaultProps:e=>({color:e.colors.gray.l11,...W("Liquid Ring Compressor"),...Ce}),Preview:yp,zIndex:X},Q6={name:"Ejector Compressor",key:"ejectorCompressor",Form:Se,Symbol:tm,defaultProps:e=>({color:e.colors.gray.l11,...W("Ejector Compressor"),...Ce}),Preview:Sp,zIndex:X},e9={name:"Centrifugal Compressor",key:"centrifugalCompressor",Form:Se,Symbol:nm,defaultProps:e=>({color:e.colors.gray.l11,...W("Centrifugal Compressor"),...Ce}),Preview:Rp,zIndex:X},t9={name:"Diaphragm Pump",key:"diaphragmPump",Form:Se,Symbol:Bp,defaultProps:e=>({color:e.colors.gray.l11,...W("Diaphragm Pump"),...Ce}),Preview:fp,zIndex:X},n9={name:"Ejection Pump",key:"ejectionPump",Form:Se,Symbol:Dp,defaultProps:e=>({color:e.colors.gray.l11,...W("Ejection Pump"),...Ce}),Preview:hp,zIndex:X},s9={name:"Flame Arrestor",key:"flameArrestor",Form:xe,Symbol:Ym,defaultProps:e=>({color:e.colors.gray.l11,...W("Flame Arrestor"),...ce}),Preview:Cp,zIndex:X},o9={name:"Flame Arrestor (Explosion-Proof)",key:"flameArrestorExplosion",Form:xe,Symbol:Wm,defaultProps:e=>({color:e.colors.gray.l11,...W("Flame Arrestor (Explosion-Proof)"),...ce}),Preview:bp,zIndex:X},r9={name:"Flame Arrestor (Detonation-Proof)",key:"flameArrestorDetonation",Form:xe,Symbol:Km,defaultProps:e=>({color:e.colors.gray.l11,...W("Flame Arrestor (Detonation-Proof)"),...ce}),Preview:wp,zIndex:X},i9={name:"Flame Arrestor (Fire Resistant)",key:"flameArrestorFireRes",Form:xe,Symbol:Gm,defaultProps:e=>({color:e.colors.gray.l11,...W("Flame Arrestor (Fire Resistant)"),...ce}),Preview:vp,zIndex:X},l9={name:"Flame Arrestor (Fire Resistant and Detonation-Proof)",key:"flameArrestorFireResDetonation",Form:xe,Symbol:Xm,defaultProps:e=>({color:e.colors.gray.l11,...W("Flame Arrestor (Fire Resistant and Detonation-Proof)"),...ce}),Preview:_p,zIndex:X},a9={name:"Thruster",key:"thruster",Form:Se,Symbol:Um,defaultProps:e=>({color:e.colors.gray.l11,...W("Thruster"),...Ce}),Preview:Mp,zIndex:X},c9={name:"Nozzle",key:"nozzle",Form:xe,Symbol:qm,defaultProps:e=>({color:e.colors.gray.l11,...W("Nozzle"),...ce}),Preview:Np,zIndex:X},u9={name:"Strainer",key:"strainer",Form:xe,Symbol:Jm,defaultProps:e=>({color:e.colors.gray.l11,...W("Strainer"),...ce}),Preview:kp,zIndex:X},d9={name:"Strainer Cone",key:"strainerCone",Form:xe,Symbol:Qm,defaultProps:e=>({color:e.colors.gray.l11,...W("Strainer Cone"),...ce}),Preview:Lp,zIndex:X},x9={value:d6,button:x6,tank:DC,polygon:zC,circle:HC,tJunction:T6,crossJunction:A6,switch:p6,offPageReference:N6,light:y6,setpoint:S6,box:FC,textBox:M6,valve:_C,solenoidValve:MC,threeWayValve:vC,fourWayValve:NC,angledValve:kC,ballValve:LC,threeWayBallValve:PC,gateValve:TC,butterflyValveOne:AC,butterflyValveTwo:IC,breatherValve:OC,manualValve:t6,needleValve:l6,reliefValve:ZC,angledReliefValve:u6,checkValve:a6,regulator:KC,regulatorManual:GC,electricRegulator:XC,electricRegulatorMotorized:UC,springLoadedReliefValve:YC,angledSpringLoadedReliefValve:WC,pump:$C,pistonPump:g6,screwPump:BC,cavityPump:h6,diaphragmPump:t9,ejectionPump:n9,vacuumPump:m6,compressor:f6,turboCompressor:U6,rollerVaneCompressor:q6,liquidRingCompressor:J6,ejectorCompressor:Q6,centrifugalCompressor:e9,staticMixer:j6,rotaryMixer:E6,burstDisc:qC,isoBurstDisc:JC,cap:QC,isoCap:e6,filter:o6,isoFilter:s6,flowStraightener:r6,heaterElement:i6,orifice:c6,orificePlate:n6,agitator:R6,propellerAgitator:C6,flatBladeAgitator:w6,paddleAgitator:b6,crossBeamAgitator:v6,helicalAgitator:_6,isoCheckValve:k6,checkValveWithArrow:L6,vent:P6,cylinder:VC,flowmeterGeneral:I6,flowmeterElectromagnetic:O6,flowmeterVariableArea:$6,flowmeterCoriolis:B6,flowmeterNozzle:D6,flowmeterVenturi:z6,flowmeterRingPiston:H6,flowmeterPositiveDisplacement:V6,flowmeterTurbine:F6,flowmeterPulse:Z6,flowmeterFloatSensor:Y6,flowmeterOrifice:W6,heatExchangerGeneral:K6,heatExchangerM:G6,heatExchangerStraightTube:X6,flameArrestor:s9,flameArrestorExplosion:o9,flameArrestorDetonation:r9,flameArrestorFireRes:i9,flameArrestorFireResDetonation:l9,thruster:a9,nozzle:c9,strainer:u9,strainerCone:d9},p9=Object.freeze(Object.defineProperty({__proto__:null,Agitator:Zp,AngledReliefValve:rf,AngledSpringLoadedReliefValve:sf,AngledValve:Op,BallValve:rm,Box:xf,BoxPreview:pf,BreatherValve:lf,BurstDisc:xm,ButterflyValveOne:sm,ButterflyValveTwo:om,Button:jf,ButtonPreview:Ef,Cap:pm,CavityPump:Hp,CentrifugalCompressor:nm,CheckValve:hm,CheckValveWithArrow:jm,Circle:df,Compressor:qp,CrossBeamAgitator:Gp,CrossJunction:Mm,Cylinder:Cf,CylinderPreview:wf,DRAG_HANDLE_CLASS:Gs,DiaphragmPump:Bp,EjectionPump:Dp,EjectorCompressor:tm,ElectricRegulator:um,ElectricRegulatorMotorized:dm,Filter:fm,FlameArrestor:Ym,FlameArrestorDetonation:Km,FlameArrestorExplosion:Wm,FlameArrestorFireRes:Gm,FlameArrestorFireResDetonation:Xm,FlatBladeAgitator:Wp,FlowStraightener:wm,FlowmeterCoriolis:Tm,FlowmeterElectromagnetic:Lm,FlowmeterFloatSensor:zm,FlowmeterGeneral:km,FlowmeterNozzle:Am,FlowmeterOrifice:Hm,FlowmeterPositiveDisplacement:$m,FlowmeterPulse:Dm,FlowmeterRingPiston:Om,FlowmeterTurbine:Bm,FlowmeterVariableArea:Pm,FlowmeterVenturi:Im,FourWayValve:Ip,GateValve:lm,HeatExchangerGeneral:Vm,HeatExchangerM:Fm,HeatExchangerStraightTube:Zm,HeaterElement:bm,HelicalAgitator:Xp,ISOBurstDisc:vm,ISOCap:mm,ISOCheckValve:gm,ISOFilter:Cm,Light:yf,LiquidRingCompressor:em,ManualValve:of,NeedleValve:ef,Nozzle:qm,OffPageReference:Sf,OffPageReferencePreview:Rf,Orifice:Em,OrificePlate:Rm,PaddleAgitator:Kp,PistonPump:Vp,PolygonSymbol:uf,PropellerAgitator:Yp,Pump:$p,Regulator:am,RegulatorManual:cm,ReliefValve:tf,RollerVaneCompressor:Qp,RotaryMixer:Fp,SYMBOLS:x9,ScrewPump:Up,Setpoint:mf,SetpointPreview:ff,SolenoidValve:Ap,SpringLoadedReliefValve:nf,StaticMixer:Nm,Strainer:Jm,StrainerCone:Qm,Switch:ym,TJunction:_m,Tank:af,TankPreview:cf,TextBox:bf,TextBoxPreview:vf,ThreeWayBallValve:im,ThreeWayValve:Pp,Thruster:Um,Triangle:hC,TurboCompressor:Jp,VacuumPump:zp,Value:hf,ValuePreview:gf,Valve:Tp,Vent:Sm,createDummyToggle:St,createLabeled:de,createToggle:Re,variantZ:yC},Symbol.toStringTag,{value:"Module"})),m9=ct({name:"Workspace",retrieve:({params:e,client:t})=>t.workspaces.retrieve(e.key)}),f9=Ve({name:"Workspace",retrieve:async({client:e,params:t})=>await e.workspaces.retrieve(t),retrieveByKey:async({client:e,key:t})=>await e.workspaces.retrieve(t),listeners:[{channel:N.ow.SET_CHANNEL_NAME,onChange:_.parsedHandler(N.ow.workspaceZ,async({onChange:e,changed:t})=>e(t.key,t))},{channel:N.ow.DELETE_CHANNEL_NAME,onChange:_.parsedHandler(N.ow.keyZ,async({onDelete:e,changed:t})=>e(t))}]}),h9=Object.freeze(Object.defineProperty({__proto__:null,retrieve:m9,useList:f9},Symbol.toStringTag,{value:"Module"}));exports.Aether=f.main;exports.Generic=f.Generic;exports.Haul=f.Haul;exports.Worker=f.Context;exports.compareArrayDeps=f.compareArrayDeps;exports.preventDefault=f.preventDefault;exports.stopPropagation=f.stopPropagation;exports.useClickOutside=f.useClickOutside;exports.useCombinedRefs=f.useCombinedRefs;exports.useCombinedStateAndRef=f.useCombinedStateAndRef;exports.useEffectCompare=f.useEffectCompare;exports.useInitializerRef=f.useInitializerRef;exports.useMemoCompare=f.useMemoCompare;exports.useMemoDeepEqual=f.useMemoDeepEqual;exports.useMemoPrimitiveArray=f.useMemoPrimitiveArray;exports.usePrevious=f.usePrevious;exports.useRequiredContext=f.useRequiredContext;exports.useResize=f.useResize;exports.useStateRef=f.useStateRef;exports.useSyncedRef=f.useSyncedRef;exports.CSS=u.CSS;exports.DataType=u.r;exports.Density=u.d;exports.MultiSeries=u.Vt;exports.Rate=u.E;exports.Series=u.I;exports.TimeRange=u.w;exports.TimeSpan=u.a;exports.TimeStamp=u.n;exports.newBEM=u.newBEM;exports.state=N.state;exports.Button=Lh.external;exports.Caret=zl.Animated$1;exports.telem=_.external;exports.List=Qe.external;exports.Dialog=Vl.external;exports.Input=Te.external;exports.Color=Pe.external;exports.useDebouncedCallback=Pe.useDebouncedCallback;exports.Theming=ws.external;exports.Triggers=Fl.external;exports.Divider=Zl.Divider$2;exports.Flex=fe.external;exports.createHexOpacityVariants=Yl.createHexOpacityVariants;exports.unitProperty=Yl.unitProperty;exports.Header=Ph.external;exports.Menu=Th.external;exports.Tabs=Ne.external;exports.Text=Ah.external;exports.Tree=Ih.external;exports.Video=Oh.Video;exports.Breadcrumb=bg;exports.Canvas=K1;exports.Channel=O0;exports.Component=fg;exports.Control=Oj;exports.Device=V0;exports.Diagram=MR;exports.Direction=$0;exports.Eraser=ag;exports.Flux=n1;exports.Form=Vg;exports.Icon=qh;exports.Label=R1;exports.Legend=Q1;exports.Line=t0;exports.LinePlot=j0;exports.Log=kR;exports.Measure=R0;exports.Mosaic=hj;exports.Nav=dg;exports.Note=jj;exports.OS=Cj;exports.Observe=zg;exports.Ontology=c1;exports.Override=bj;exports.Pluto=zj;exports.Portal=aj;exports.Progress=Vj;exports.Rack=K0;exports.Range=y0;exports.Ranger=F1;exports.Resize=ig;exports.Rule=C0;exports.Schematic=p9;exports.Select=Rg;exports.Status=mg;exports.Steps=Zj;exports.Synnax=Ng;exports.Table=Xj;exports.TableCells=x2;exports.Tag=hg;exports.Task=Q0;exports.Telem=Pj;exports.Tooltip=Jh;exports.Value=e2;exports.Viewport=h0;exports.Workspace=h9;exports.axis=e1;exports.control=Wg;exports.proxyMemo=Gh;exports.useAsyncEffect=Ke;exports.useDelayedState=Xh;exports.useTransforms=Uh;
|